diff --git a/server/graphql/v2/object/Expense.ts b/server/graphql/v2/object/Expense.ts index ef71231b246..f607f496b55 100644 --- a/server/graphql/v2/object/Expense.ts +++ b/server/graphql/v2/object/Expense.ts @@ -669,6 +669,22 @@ export const GraphQLExpense = new GraphQLObjectType, InferCreationAttributes> { - declare public readonly id: CreationOptional; - declare public UserId: ForeignKey; - declare public lastEditedById: ForeignKey; - declare public HostCollectiveId: number; - declare public FromCollectiveId: number; - declare public CollectiveId: number; - declare public PayoutMethodId: ForeignKey; - declare public PaymentMethodId: number; - declare public VirtualCardId: ForeignKey; - declare public RecurringExpenseId: ForeignKey; - declare public AccountingCategoryId: ForeignKey; - - declare public payeeLocation: Location; - declare public data: Record & { + public declare readonly id: CreationOptional; + public declare UserId: ForeignKey; + public declare lastEditedById: ForeignKey; + public declare HostCollectiveId: number; + public declare FromCollectiveId: number; + public declare CollectiveId: number; + public declare PayoutMethodId: ForeignKey; + public declare PaymentMethodId: number; + public declare VirtualCardId: ForeignKey; + public declare RecurringExpenseId: ForeignKey; + public declare AccountingCategoryId: ForeignKey; + + public declare payeeLocation: Location; + public declare data: Record & { batchGroup?: BatchGroup; quote?: ExpenseDataQuoteV2 | ExpenseDataQuoteV3; paymentOption?: QuoteV2PaymentOption | QuoteV3PaymentOption; @@ -110,40 +110,45 @@ class Expense extends Model, InferCreationAttributes; - declare public privateMessage: CreationOptional; - declare public invoiceInfo: CreationOptional; - declare public legacyPayoutMethod: 'paypal' | 'manual' | 'donation' | 'other'; - - declare public status: keyof typeof ExpenseStatus; - declare public onHold: boolean; - declare public type: ExpenseType; - declare public feesPayer: 'COLLECTIVE' | 'PAYEE'; - declare public tags: string[]; - - declare public incurredAt: CreationOptional; - declare public createdAt: CreationOptional; - declare public updatedAt: CreationOptional; - declare public deletedAt: CreationOptional; - - declare public activities?: Activity[]; - declare public Transactions?: Transaction[]; - declare public collective?: Collective; - declare public fromCollective?: Collective; - declare public host?: Collective; - declare public User?: User; - declare public PayoutMethod?: PayoutMethod; - declare public PaymentMethod?: PaymentMethod; - declare public virtualCard?: VirtualCard; - declare public items?: ExpenseItem[]; - declare public attachedFiles?: ExpenseAttachedFile[]; - declare public accountingCategory?: AccountingCategory; - declare public reference: string; + public declare currency: SupportedCurrency; + public declare amount: number; + public declare description: string; + public declare longDescription: CreationOptional; + public declare privateMessage: CreationOptional; + public declare invoiceInfo: CreationOptional; + public declare legacyPayoutMethod: 'paypal' | 'manual' | 'donation' | 'other'; + + public declare status: keyof typeof ExpenseStatus; + public declare onHold: boolean; + public declare type: ExpenseType; + public declare feesPayer: 'COLLECTIVE' | 'PAYEE'; + public declare tags: string[]; + + public declare incurredAt: CreationOptional; + public declare createdAt: CreationOptional; + public declare updatedAt: CreationOptional; + public declare deletedAt: CreationOptional; + + public declare activities?: Activity[]; + public declare Transactions?: Transaction[]; + public declare collective?: Collective; + public declare fromCollective?: Collective; + public declare host?: Collective; + public declare User?: User; + public declare PayoutMethod?: PayoutMethod; + public declare PaymentMethod?: PaymentMethod; + public declare virtualCard?: VirtualCard; + public declare items?: ExpenseItem[]; + public declare attachedFiles?: ExpenseAttachedFile[]; + public declare accountingCategory?: AccountingCategory; + public declare reference: string; // Association getters declare getActivities: HasManyGetAssociationsMixin;