UNPKG

@accounter/client

Version:
1,370 lines (1,284 loc) 1.38 MB
/* eslint-disable */ /** Internal type. DO NOT USE DIRECTLY. */ type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] }; /** Internal type. DO NOT USE DIRECTLY. */ export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; import type { TimelessDateString } from '../helpers/index.js'; import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; /** represents accountant approval status */ export const AccountantStatus = { Approved: 'APPROVED', Pending: 'PENDING', Unapproved: 'UNAPPROVED' } as const; export type AccountantStatus = typeof AccountantStatus[keyof typeof AccountantStatus]; /** Accounting method enum (שיטת חשבונאות) */ export const AccountingMethod = { /** Double-entry (כפולה) */ DoubleEntry: 'DOUBLE_ENTRY', /** Single-entry (חד צידית) */ SingleEntry: 'SINGLE_ENTRY' } as const; export type AccountingMethod = typeof AccountingMethod[keyof typeof AccountingMethod]; /** Business accounting system enum (הנח''ש של העסק) */ export const AccountingSystem = { /** Computerized (ממוחשב) */ Computerized: 'COMPUTERIZED', /** Manual (ידני) */ Manual: 'MANUAL' } as const; export type AccountingSystem = typeof AccountingSystem[keyof typeof AccountingSystem]; /** the input for adding a new business trip accommodation expense */ export type AddBusinessTripAccommodationsExpenseInput = { amount?: number | null | undefined; attendeesStay?: Array<BusinessTripAttendeeStayInput> | null | undefined; businessTripId: string; country?: string | null | undefined; currency?: Currency | null | undefined; date?: TimelessDateString | null | undefined; employeeBusinessId?: string | null | undefined; nightsCount?: number | null | undefined; valueDate?: TimelessDateString | null | undefined; }; /** the input for adding a new business trip T&S expense */ export type AddBusinessTripCarRentalExpenseInput = { amount?: number | null | undefined; businessTripId: string; currency?: Currency | null | undefined; date?: TimelessDateString | null | undefined; days?: number | null | undefined; employeeBusinessId?: string | null | undefined; isFuelExpense?: boolean | null | undefined; valueDate?: TimelessDateString | null | undefined; }; /** the input for adding a new business trip flights expense */ export type AddBusinessTripFlightsExpenseInput = { amount?: number | null | undefined; attendeeIds?: Array<string> | null | undefined; businessTripId: string; currency?: Currency | null | undefined; date?: TimelessDateString | null | undefined; employeeBusinessId?: string | null | undefined; flightClass?: FlightClass | null | undefined; path?: Array<string> | null | undefined; valueDate?: TimelessDateString | null | undefined; }; /** the input for adding a new business trip other expense */ export type AddBusinessTripOtherExpenseInput = { amount?: number | null | undefined; businessTripId: string; currency?: Currency | null | undefined; date?: TimelessDateString | null | undefined; deductibleExpense?: boolean | null | undefined; description?: string | null | undefined; employeeBusinessId?: string | null | undefined; valueDate?: TimelessDateString | null | undefined; }; /** the input for adding a new business trip T&S expense */ export type AddBusinessTripTravelAndSubsistenceExpenseInput = { amount?: number | null | undefined; businessTripId: string; currency?: Currency | null | undefined; date?: TimelessDateString | null | undefined; employeeBusinessId?: string | null | undefined; expenseType?: string | null | undefined; valueDate?: TimelessDateString | null | undefined; }; /** Input for an American Express credit card transaction */ export type AmexTransactionInput = { adendum?: string | null | undefined; card: string; cardIndex: number; chargingDate?: string | null | undefined; city?: string | null | undefined; clientIpAddress?: string | null | undefined; currencyId?: string | null | undefined; currentPaymentCurrency?: string | null | undefined; dealSum?: string | null | undefined; dealSumOutbound?: string | null | undefined; dealSumType?: string | null | undefined; dealsInbound?: string | null | undefined; displayProperties?: string | null | undefined; esbServicesCall?: string | null | undefined; fullPaymentDate?: string | null | undefined; fullPurchaseDate?: string | null | undefined; fullPurchaseDateOutbound?: string | null | undefined; fullSupplierNameHeb?: string | null | undefined; fullSupplierNameOutbound?: string | null | undefined; horaatKeva?: string | null | undefined; isButton: string; isCaptcha: string; isError: string; isHoraatKeva: string; isShowDealsOutbound?: string | null | undefined; isShowLinkForSupplierDetails?: string | null | undefined; kodMatbeaMekori?: string | null | undefined; message?: string | null | undefined; moreInfo?: string | null | undefined; paymentDate?: string | null | undefined; paymentSum?: string | null | undefined; paymentSumOutbound?: string | null | undefined; paymentSumSign?: string | null | undefined; purchaseDate?: string | null | undefined; purchaseDateOutbound?: string | null | undefined; returnCode?: string | null | undefined; returnMessage?: string | null | undefined; siteName?: string | null | undefined; solek?: string | null | undefined; specificDate?: string | null | undefined; stage?: string | null | undefined; supplierId?: number | null | undefined; supplierName?: string | null | undefined; supplierNameOutbound?: string | null | undefined; tablePageNum: boolean; voucherNumber?: number | null | undefined; voucherNumberRatz?: number | null | undefined; voucherNumberRatzOutbound?: number | null | undefined; }; /** User type classification for annual audit opening balance step */ export const AnnualAuditOpeningBalanceUserType = { Continuing: 'CONTINUING', Error: 'ERROR', Migrating: 'MIGRATING', New: 'NEW' } as const; export type AnnualAuditOpeningBalanceUserType = typeof AnnualAuditOpeningBalanceUserType[keyof typeof AnnualAuditOpeningBalanceUserType]; /** Status values for annual audit steps */ export const AnnualAuditStepStatus = { Blocked: 'BLOCKED', Completed: 'COMPLETED', InProgress: 'IN_PROGRESS', Pending: 'PENDING' } as const; export type AnnualAuditStepStatus = typeof AnnualAuditStepStatus[keyof typeof AnnualAuditStepStatus]; /** Input type representing an annual identifier for tax purposes. */ export type AnnualIdInput = { id: string; year: number; }; /** annual revenue report filter */ export type AnnualRevenueReportFilter = { adminBusinessId?: string | null | undefined; year: number; }; /** Audit opinion type enum (חוות דעת) */ export const AuditOpinionType = { /** Adverse opinion (שלילית) */ Adverse: 'ADVERSE', /** Disclaimer of opinion (המנעות) */ Disclaimer: 'DISCLAIMER', /** No audit opinion (אין חוות דעת) */ None: 'NONE', /** Qualified opinion (הסתייגות) */ Qualified: 'QUALIFIED', /** Unqualified opinion (נוסח אחיד (בלתי מסוייג)) */ Unqualified: 'UNQUALIFIED', /** Unqualified opinion with emphasis on going concern (בנוסח אחיד עם הפניית תשומת לב להערת עסק חי) */ UnqualifiedWithGoingConcern: 'UNQUALIFIED_WITH_GOING_CONCERN', /** Unqualified opinion with other emphases (בנוסח אחיד עם הפניות תשומת לב אחרת) */ UnqualifiedWithOtherEmphases: 'UNQUALIFIED_WITH_OTHER_EMPHASES' } as const; export type AuditOpinionType = typeof AuditOpinionType[keyof typeof AuditOpinionType]; /** input type for creating a bank account */ export type BankAccountInsertInput = { accountAgreementOpeningDate?: number | null | undefined; accountClosingReasonCode?: number | null | undefined; accountDealDate?: number | null | undefined; accountUpdateDate?: number | null | undefined; bankNumber: number; branchNumber: number; branchTypeCode?: number | null | undefined; extendedBankNumber?: number | null | undefined; iban?: string | null | undefined; kodHarshaatPeilut?: number | null | undefined; metegDoarNet?: number | null | undefined; mymailEntitlementSwitch?: number | null | undefined; partyAccountInvolvementCode?: number | null | undefined; partyPreferredIndication?: number | null | undefined; productLabel?: string | null | undefined; serviceAuthorizationDesc?: string | null | undefined; swiftCode?: string | null | undefined; }; /** input type for updating a bank account */ export type BankAccountUpdateInput = { accountAgreementOpeningDate?: number | null | undefined; accountClosingReasonCode?: number | null | undefined; accountDealDate?: number | null | undefined; accountUpdateDate?: number | null | undefined; bankNumber?: number | null | undefined; branchNumber?: number | null | undefined; branchTypeCode?: number | null | undefined; extendedBankNumber?: number | null | undefined; iban?: string | null | undefined; kodHarshaatPeilut?: number | null | undefined; metegDoarNet?: number | null | undefined; mymailEntitlementSwitch?: number | null | undefined; partyAccountInvolvementCode?: number | null | undefined; partyPreferredIndication?: number | null | undefined; productLabel?: string | null | undefined; serviceAuthorizationDesc?: string | null | undefined; swiftCode?: string | null | undefined; }; /** contract billing cycle */ export const BillingCycle = { Annual: 'ANNUAL', Monthly: 'MONTHLY' } as const; export type BillingCycle = typeof BillingCycle[keyof typeof BillingCycle]; /** input variables for businessTransactions */ export type BusinessTransactionsFilter = { businessIDs?: Array<string> | null | undefined; fromDate?: TimelessDateString | null | undefined; includeRevaluation?: boolean | null | undefined; ownerIds?: Array<string> | null | undefined; toDate?: TimelessDateString | null | undefined; type?: FinancialEntityType | null | undefined; }; /** the input for attendee accommodation stay info */ export type BusinessTripAttendeeStayInput = { attendeeId: string; nightsCount: number; }; /** the input for updating a business trip attendee */ export type BusinessTripAttendeeUpdateInput = { arrivalDate?: TimelessDateString | null | undefined; attendeeId: string; businessTripId: string; departureDate?: TimelessDateString | null | undefined; }; /** represent category type of business trip summary */ export const BusinessTripExpenseCategories = { Accommodation: 'ACCOMMODATION', CarRental: 'CAR_RENTAL', Flight: 'FLIGHT', Other: 'OTHER', TravelAndSubsistence: 'TRAVEL_AND_SUBSISTENCE' } as const; export type BusinessTripExpenseCategories = typeof BusinessTripExpenseCategories[keyof typeof BusinessTripExpenseCategories]; /** represent category type of business trip summary */ export const BusinessTripSummaryCategories = { Accommodation: 'ACCOMMODATION', CarRental: 'CAR_RENTAL', Flight: 'FLIGHT', Other: 'OTHER', Total: 'TOTAL', TravelAndSubsistence: 'TRAVEL_AND_SUBSISTENCE' } as const; export type BusinessTripSummaryCategories = typeof BusinessTripSummaryCategories[keyof typeof BusinessTripSummaryCategories]; /** Business type enum (סוג עסק) */ export const BusinessType = { /** Combination (שילוב) */ Combination: 'COMBINATION', /** Commercial (מסחרי) */ Commercial: 'COMMERCIAL', /** Industrial (תעשייתי) */ Industrial: 'INDUSTRIAL', /** Report includes more than one business (הדוח כולל יותר מעסק אחד) */ Multiple: 'MULTIPLE', /** Service providers (נותני שירותים) */ Service: 'SERVICE' } as const; export type BusinessType = typeof BusinessType[keyof typeof BusinessType]; /** Input for a Cal (Visa Cal) credit card transaction */ export type CalTransactionInput = { amtBeforeConvAndIndex?: string | null | undefined; branchCodeDesc?: string | null | undefined; card: number; cashAccountTrnAmt?: string | null | undefined; chargeExternalToCardComment?: string | null | undefined; crdExtIdNumTypeCode?: string | null | undefined; curPaymentNum?: number | null | undefined; debCrdCurrencySymbol?: string | null | undefined; debCrdDate?: string | null | undefined; debitSpreadInd?: boolean | null | undefined; earlyPaymentInd?: boolean | null | undefined; isAbroadTransaction?: boolean | null | undefined; isImmediateCommentInd?: boolean | null | undefined; isImmediateHhkInd?: boolean | null | undefined; isMargarita?: boolean | null | undefined; isSpreadPaymenstAbroad?: boolean | null | undefined; merchantAddress?: string | null | undefined; merchantId?: string | null | undefined; merchantName?: string | null | undefined; merchantPhoneNo?: string | null | undefined; numOfPayments?: number | null | undefined; onGoingTransactionsComment?: string | null | undefined; refundInd?: boolean | null | undefined; tokenInd?: number | null | undefined; tokenNumberPart4?: string | null | undefined; transCardPresentInd?: boolean | null | undefined; transSource?: string | null | undefined; trnAmt?: string | null | undefined; trnCurrencySymbol?: string | null | undefined; trnExacWay?: number | null | undefined; trnIntId?: string | null | undefined; trnNumaretor?: number | null | undefined; trnPurchaseDate?: string | null | undefined; trnType?: string | null | undefined; trnTypeCode?: string | null | undefined; walletProviderCode?: number | null | undefined; walletProviderDesc?: string | null | undefined; }; /** the input for categorizing a business trip expense */ export type CategorizeBusinessTripExpenseInput = { amount?: number | null | undefined; businessTripId: string; category?: BusinessTripExpenseCategories | null | undefined; transactionId: string; }; /** the input for categorizing into an existing business trip expense */ export type CategorizeIntoExistingBusinessTripExpenseInput = { amount?: number | null | undefined; businessTripExpenseId: string; transactionId: string; }; /** input variables for charge filtering */ export type ChargeFilter = { accountantStatus?: Array<AccountantStatus> | null | undefined; /** filter by business trip (should be later in business trip module?) */ businessTrip?: string | null | undefined; /** Include only charges tied to one of these business trips */ byBusinessTrips?: Array<string> | null | undefined; /** Include only charges including specific business */ byBusinesses?: Array<string> | null | undefined; /** Include only charges resolved to one of these concrete types (by __typename) */ byChargeTypes?: Array<ChargeType> | null | undefined; /** Include only charges related to specific financial accounts */ byFinancialAccounts?: Array<string> | null | undefined; /** Include only charges related to specific owners financial entities */ byOwners?: Array<string> | null | undefined; /** Include only charges with those tags */ byTags?: Array<string> | null | undefined; chargesType?: ChargeFilterType | null | undefined; /** Include only charges with user description | transactions description / reference | documents description / remarks / serial that contains this text */ freeText?: string | null | undefined; /** Include only charges with any doc/transaction date occurred after this date */ fromAnyDate?: TimelessDateString | null | undefined; /** Include only charges with main date occurred after this date */ fromDate?: TimelessDateString | null | undefined; sortBy?: ChargeSortBy | null | undefined; /** Include only charges with any doc/transaction date occurred before this date */ toAnyDate?: TimelessDateString | null | undefined; /** Include only charges with main date occurred before this date */ toDate?: TimelessDateString | null | undefined; /** Include only charges that are not balances */ unbalanced?: boolean | null | undefined; /** Include only charges with a missing counterparty: a transaction without a business, or a document without a creditor / debtor */ withMissingCounterparty?: boolean | null | undefined; withOpenDocuments?: boolean | null | undefined; /** Include only charges that doesn't have documents linked */ withoutDocuments?: boolean | null | undefined; /** Include only charges that doesn't have invoice document linked */ withoutInvoice?: boolean | null | undefined; /** Include only charges that doesn't have ledger records linked */ withoutLedger?: boolean | null | undefined; /** Include only charges that doesn't have receipt document linked */ withoutReceipt?: boolean | null | undefined; /** Include only charges that doesn't have transactions linked */ withoutTransactions?: boolean | null | undefined; }; /** filter charges by income / expense flow */ export const ChargeFilterType = { All: 'ALL', Expense: 'EXPENSE', Income: 'INCOME' } as const; export type ChargeFilterType = typeof ChargeFilterType[keyof typeof ChargeFilterType]; /** input variables for sorting charges */ export type ChargeSortBy = { asc?: boolean | null | undefined; field: ChargeSortByField; }; /** fields that can be used to sort charges */ export const ChargeSortByField = { AbsAmount: 'ABS_AMOUNT', Amount: 'AMOUNT', Date: 'DATE' } as const; export type ChargeSortByField = typeof ChargeSortByField[keyof typeof ChargeSortByField]; /** Charge type enum */ export const ChargeType = { BankDeposit: 'BANK_DEPOSIT', BusinessTrip: 'BUSINESS_TRIP', Common: 'COMMON', Conversion: 'CONVERSION', CreditcardBank: 'CREDITCARD_BANK', Dividend: 'DIVIDEND', Financial: 'FINANCIAL', ForeignSecurities: 'FOREIGN_SECURITIES', Internal: 'INTERNAL', Payroll: 'PAYROLL', Vat: 'VAT' } as const; export type ChargeType = typeof ChargeType[keyof typeof ChargeType]; /** fields for inserting a new client */ export type ClientInsertInput = { businessId: string; emails?: Array<string> | null | undefined; generatedDocumentType: DocumentType; integrations?: ClientIntegrationsInput | null | undefined; }; /** integrations input for client insert/update */ export type ClientIntegrationsInput = { greenInvoiceId?: string | null | undefined; hiveId?: string | null | undefined; linearId?: string | null | undefined; notionId?: string | null | undefined; slackChannelKey?: string | null | undefined; workflowyUrl?: string | null | undefined; }; /** fields for updating an existing client */ export type ClientUpdateInput = { emails?: Array<string> | null | undefined; generatedDocumentType?: DocumentType | null | undefined; integrations?: ClientIntegrationsInput | null | undefined; newBusinessId?: string | null | undefined; }; /** input for creating a new contract */ export type CreateContractInput = { amount: FinancialAmountInput; billingCycle: BillingCycle; clientId: string; deactivateContracts?: Array<string> | null | undefined; documentType: DocumentType; endDate: TimelessDateString; isActive: boolean; msCloud?: URL | string | null | undefined; operationsLimit?: bigint | null | undefined; plan?: SubscriptionPlan | null | undefined; product?: Product | null | undefined; purchaseOrders: Array<string>; remarks?: string | null | undefined; startDate: TimelessDateString; }; /** input type for creating a financial account */ export type CreateFinancialAccountInput = { bankAccountDetails?: BankAccountInsertInput | null | undefined; currencies?: Array<FinancialAccountCurrencyInput> | null | undefined; name: string; number: string; ownerId: string; privateOrBusiness: PrivateOrBusinessType; type: FinancialAccountType; }; /** All possible currencies */ export const Currency = { /** FIAT currencies */ Aud: 'AUD', Cad: 'CAD', /** Crypto currencies */ Eth: 'ETH', Eur: 'EUR', Gbp: 'GBP', Grt: 'GRT', Ils: 'ILS', Jpy: 'JPY', Sek: 'SEK', Usd: 'USD', Usdc: 'USDC' } as const; export type Currency = typeof Currency[keyof typeof Currency]; /** Input for daily currency exchange rates */ export type CurrencyRateInput = { aud?: number | null | undefined; cad?: number | null | undefined; eur?: number | null | undefined; exchangeDate: TimelessDateString; gbp?: number | null | undefined; jpy?: number | null | undefined; sek?: number | null | undefined; usd?: number | null | undefined; }; /** Currency reporting type enum (דיווח מטבע) */ export const CurrencyType = { /** Amounts in dollars (הסכומים בדולרים) */ Dollars: 'DOLLARS', /** Amounts in shekels (הסכומים בשקלים) */ Shekels: 'SHEKELS' } as const; export type CurrencyType = typeof CurrencyType[keyof typeof CurrencyType]; /** the input for removing a business trip attendee */ export type DeleteBusinessTripAttendeeInput = { attendeeId: string; businessTripId: string; }; /** input variables for depreciationReport */ export type DepreciationReportFilter = { financialEntityId?: string | null | undefined; year: number; }; /** depreciation type */ export const DepreciationType = { GeneralAndManagement: 'GENERAL_AND_MANAGEMENT', Marketing: 'MARKETING', ResearchAndDevelopment: 'RESEARCH_AND_DEVELOPMENT' } as const; export type DepreciationType = typeof DepreciationType[keyof typeof DepreciationType]; /** Input for a Discount Bank account transaction */ export type DiscountTransactionInput = { accountNumber?: string | null | undefined; balanceAfterOperation?: string | null | undefined; branchTreasuryNumber?: string | null | undefined; businessDayDate?: string | null | undefined; categoryCode?: number | null | undefined; categoryDescCode?: number | null | undefined; categoryDescription?: string | null | undefined; channel?: string | null | undefined; channelName?: string | null | undefined; checkNumber?: number | null | undefined; commissionChannelCode?: string | null | undefined; commissionChannelName?: string | null | undefined; commissionTypeName?: string | null | undefined; eventName?: string | null | undefined; instituteCode?: string | null | undefined; isLastSeen?: boolean | null | undefined; operationAmount?: string | null | undefined; operationBank?: number | null | undefined; operationBranch?: number | null | undefined; operationCode?: string | null | undefined; operationDate?: string | null | undefined; operationDescription?: string | null | undefined; operationDescription2?: string | null | undefined; operationDescription3?: string | null | undefined; operationDescriptionToDisplay?: string | null | undefined; operationDetailsServiceName?: string | null | undefined; operationNumber?: number | null | undefined; operationOrder?: number | null | undefined; urn?: string | null | undefined; valueDate?: string | null | undefined; }; /** client input */ export type DocumentClientInput = { add?: boolean | null | undefined; address?: string | null | undefined; city?: string | null | undefined; country?: string | null | undefined; emails?: Array<string> | null | undefined; fax?: string | null | undefined; id: string; mobile?: string | null | undefined; name?: string | null | undefined; phone?: string | null | undefined; self?: boolean | null | undefined; taxId?: string | null | undefined; zipCode?: string | null | undefined; }; /** discount input */ export type DocumentDiscountInput = { amount: number; type: DocumentDiscountType; }; /** discount type enum */ export const DocumentDiscountType = { Percentage: 'PERCENTAGE', Sum: 'SUM' } as const; export type DocumentDiscountType = typeof DocumentDiscountType[keyof typeof DocumentDiscountType]; /** income input */ export type DocumentIncomeRecordInput = { amount?: number | null | undefined; amountTotal?: number | null | undefined; catalogNum?: string | null | undefined; currency: Currency; currencyRate?: number | null | undefined; description: string; itemId?: string | null | undefined; price: number; quantity: number; vat?: number | null | undefined; vatRate?: number | null | undefined; vatType: DocumentVatType; }; /** input for issuing or previewing document */ export type DocumentIssueInput = { client?: DocumentClientInput | null | undefined; currency: Currency; date?: string | null | undefined; description?: string | null | undefined; discount?: DocumentDiscountInput | null | undefined; dueDate?: string | null | undefined; footer?: string | null | undefined; income?: Array<DocumentIncomeRecordInput> | null | undefined; language: DocumentLanguage; linkType?: DocumentLinkType | null | undefined; linkedDocumentIds?: Array<string> | null | undefined; linkedPaymentId?: string | null | undefined; maxPayments?: number | null | undefined; payment?: Array<DocumentPaymentRecordInput> | null | undefined; remarks?: string | null | undefined; rounding?: boolean | null | undefined; signed?: boolean | null | undefined; type: DocumentType; vatType: DocumentVatType; }; /** document language enum */ export const DocumentLanguage = { English: 'ENGLISH', Hebrew: 'HEBREW' } as const; export type DocumentLanguage = typeof DocumentLanguage[keyof typeof DocumentLanguage]; /** link type enum */ export const DocumentLinkType = { Cancel: 'CANCEL', Link: 'LINK' } as const; export type DocumentLinkType = typeof DocumentLinkType[keyof typeof DocumentLinkType]; /** card type enum */ export const DocumentPaymentRecordCardType = { AmericanExpress: 'AMERICAN_EXPRESS', Diners: 'DINERS', Isracard: 'ISRACARD', Mastercard: 'MASTERCARD', Unknown: 'UNKNOWN', Visa: 'VISA' } as const; export type DocumentPaymentRecordCardType = typeof DocumentPaymentRecordCardType[keyof typeof DocumentPaymentRecordCardType]; /** payment input */ export type DocumentPaymentRecordInput = { accountId?: string | null | undefined; bankAccount?: string | null | undefined; bankBranch?: string | null | undefined; bankName?: string | null | undefined; cardNum?: string | null | undefined; cardType?: DocumentPaymentRecordCardType | null | undefined; chequeNum?: string | null | undefined; currency: Currency; currencyRate?: number | null | undefined; date?: string | null | undefined; firstPayment?: number | null | undefined; numPayments?: number | null | undefined; price: number; transactionId?: string | null | undefined; type: PaymentType; }; /** Document status */ export const DocumentStatus = { Cancelled: 'CANCELLED', CancelledByOtherDoc: 'CANCELLED_BY_OTHER_DOC', Closed: 'CLOSED', ManuallyClosed: 'MANUALLY_CLOSED', Open: 'OPEN' } as const; export type DocumentStatus = typeof DocumentStatus[keyof typeof DocumentStatus]; /** All possible document types */ export const DocumentType = { CreditInvoice: 'CREDIT_INVOICE', Invoice: 'INVOICE', InvoiceReceipt: 'INVOICE_RECEIPT', Other: 'OTHER', Proforma: 'PROFORMA', Receipt: 'RECEIPT', Unprocessed: 'UNPROCESSED' } as const; export type DocumentType = typeof DocumentType[keyof typeof DocumentType]; /** VAT type enum */ export const DocumentVatType = { Default: 'DEFAULT', Exempt: 'EXEMPT', Mixed: 'MIXED' } as const; export type DocumentVatType = typeof DocumentVatType[keyof typeof DocumentVatType]; /** input variables for documents filtering */ export type DocumentsFilters = { businessIDs?: Array<string> | null | undefined; fromDate?: TimelessDateString | null | undefined; ownerIDs?: Array<string> | null | undefined; toDate?: TimelessDateString | null | undefined; /** Include only documents without matching transactions */ unmatched?: boolean | null | undefined; }; /** types of email attachments that can be parsed */ export const EmailAttachmentType = { Jpeg: 'JPEG', Pdf: 'PDF', Png: 'PNG' } as const; export type EmailAttachmentType = typeof EmailAttachmentType[keyof typeof EmailAttachmentType]; /** Metadata for a single document extracted from the email */ export type ExtractedDocumentInput = { /** Base64-encoded document bytes (inline transport, Option B); omitted = metadata only */ content?: string | null | undefined; /** Optional filename */ filename?: string | null | undefined; /** SHA-256 hash of the document content */ hash: string; /** MIME type */ mimeType: string; /** Document size in bytes */ sizeBytes: number; }; /** input type for financial account currency and tax category */ export type FinancialAccountCurrencyInput = { currency: Currency; taxCategoryId: string; }; /** general types of financial accounts */ export const FinancialAccountType = { BankAccount: 'BANK_ACCOUNT', BankDepositAccount: 'BANK_DEPOSIT_ACCOUNT', CreditCard: 'CREDIT_CARD', CryptoWallet: 'CRYPTO_WALLET', ForeignSecurities: 'FOREIGN_SECURITIES' } as const; export type FinancialAccountType = typeof FinancialAccountType[keyof typeof FinancialAccountType]; /** input variables for updateCharge.FinancialAmount */ export type FinancialAmountInput = { currency: Currency; raw: number; }; /** represent financial entity type */ export const FinancialEntityType = { Business: 'BUSINESS', TaxCategory: 'TAX_CATEGORY' } as const; export type FinancialEntityType = typeof FinancialEntityType[keyof typeof FinancialEntityType]; /** represent flight classes */ export const FlightClass = { Business: 'BUSINESS', Economy: 'ECONOMY', FirstClass: 'FIRST_CLASS', PremiumEconomy: 'PREMIUM_ECONOMY' } as const; export type FlightClass = typeof FlightClass[keyof typeof FlightClass]; /** IFRS reporting option enum (דווח בחלופה - יישום תקני חשבונאות) */ export const IfrsReportingOption = { /** No IFRS implementation (במידה ואין יישום תקני חשבונאות) */ None: 'NONE', /** Option 1 (חלופה 1) */ Option_1: 'OPTION_1', /** Accounting adjustments for those who implemented Option 2 per directive 7/2010 (התאמות חשבונאיות למי שיישם את חלופה 2 בהוראת ביצוע 7/2010) */ Option_2Adjustments: 'OPTION_2_ADJUSTMENTS', /** Accounting adjustments for those who implemented Option 3 per directive 7/2010 (התאמות חשבונאיות למי שיישם את חלופה 3 בהוראת ביצוע 7/2010) */ Option_3Adjustments: 'OPTION_3_ADJUSTMENTS' } as const; export type IfrsReportingOption = typeof IfrsReportingOption[keyof typeof IfrsReportingOption]; /** input variables for incomeExpenseChart filters */ export type IncomeExpenseChartFilters = { currency?: Currency | null | undefined; fromDate: TimelessDateString; toDate: TimelessDateString; }; /** Input for requesting a short-lived ingest control grant */ export type IngestControlInput = { /** Optional correlation ID for distributed tracing */ correlationId?: string | null | undefined; /** RFC 2822 Message-ID header */ messageId: string; /** SHA-256 hex hash of the raw MIME message */ rawMessageHash: string; /** ISO-8601 timestamp the message was received (reserved for future replay-window validation) */ receivedAt?: string | null | undefined; /** Recipient alias the message was delivered to */ recipientAlias: string; /** Sender evidence used to recognize the issuing business (issuer-selection runs server-side) */ senderEvidence?: SenderEvidenceInput | null | undefined; }; /** Input for the v2 ingest endpoint */ export type IngestEmailInput = { /** Optional correlation ID for distributed tracing */ correlationId?: string | null | undefined; /** Extracted document metadata from MIME parsing */ extractedDocuments: Array<ExtractedDocumentInput>; /** JTI of the ingest grant from requestIngestControl */ grantJti: string; /** Gateway-supplied idempotency key */ idempotencyKey: string; /** RFC 2822 Message-ID header */ messageId: string; /** SHA-256 hex hash of the raw MIME message */ rawMessageHash: string; /** Tenant ID from the grant (validated server-side) */ tenantId: string; }; /** Outcome of a v2 ingest operation */ export const IngestOutcome = { Duplicate: 'DUPLICATE', Inserted: 'INSERTED', Quarantined: 'QUARANTINED', Rejected: 'REJECTED' } as const; export type IngestOutcome = typeof IngestOutcome[keyof typeof IngestOutcome]; /** the input for adding an attendee to a business trip */ export type InsertBusinessTripAttendeeInput = { arrivalDate?: TimelessDateString | null | undefined; attendeeId: string; businessTripId: string; departureDate?: TimelessDateString | null | undefined; }; /** the input for creating a business trip */ export type InsertBusinessTripInput = { destinationCode?: string | null | undefined; fromDate?: TimelessDateString | null | undefined; name: string; toDate?: TimelessDateString | null | undefined; tripPurpose?: string | null | undefined; }; /** input variables for insertDepreciationRecord */ export type InsertDepreciationRecordInput = { activationDate: TimelessDateString; amount?: number | null | undefined; categoryId: string; chargeId: string; currency?: Currency | null | undefined; type?: DepreciationType | null | undefined; }; /** input variables for insertDocument */ export type InsertDocumentInput = { allocationNumber?: string | null | undefined; amount?: FinancialAmountInput | null | undefined; chargeId?: string | null | undefined; creditorId?: string | null | undefined; date?: TimelessDateString | null | undefined; debtorId?: string | null | undefined; description?: string | null | undefined; documentType?: DocumentType | null | undefined; exchangeRateOverride?: number | null | undefined; file?: URL | string | null | undefined; image?: URL | string | null | undefined; noVatAmount?: number | null | undefined; remarks?: string | null | undefined; serialNumber?: string | null | undefined; vat?: FinancialAmountInput | null | undefined; vatReportDateOverride?: TimelessDateString | null | undefined; }; /** input variables for insertMiscExpense */ export type InsertMiscExpenseInput = { amount: number; creditorId: string; currency: Currency; debtorId: string; description?: string | null | undefined; invoiceDate: TimelessDateString; valueDate: Date; }; /** input for insertNewBusiness */ export type InsertNewBusinessInput = { address?: string | null | undefined; city?: string | null | undefined; country?: string | null | undefined; email?: string | null | undefined; exemptDealer?: boolean | null | undefined; governmentId?: string | null | undefined; hebrewName?: string | null | undefined; irsCode?: number | null | undefined; isActive?: boolean | null | undefined; isDocumentsOptional?: boolean | null | undefined; isReceiptEnough?: boolean | null | undefined; name: string; optionalVAT?: boolean | null | undefined; pcn874RecordType?: Pcn874RecordType | null | undefined; phoneNumber?: string | null | undefined; sortCode?: number | null | undefined; suggestions?: SuggestionsInput | null | undefined; taxCategory?: string | null | undefined; website?: string | null | undefined; zipCode?: string | null | undefined; }; /** input for insertTaxCategory */ export type InsertTaxCategoryInput = { hashavshevetName?: string | null | undefined; irsCode?: number | null | undefined; isActive?: boolean | null | undefined; name: string; sortCode?: number | null | undefined; taxExcluded?: boolean | null | undefined; }; /** Input for an Isracard credit card transaction */ export type IsracardTransactionInput = { adendum?: string | null | undefined; card: string; cardIndex: number; chargingDate?: string | null | undefined; city?: string | null | undefined; clientIpAddress?: string | null | undefined; currencyId?: string | null | undefined; currentPaymentCurrency?: string | null | undefined; dealSum?: string | null | undefined; dealSumOutbound?: string | null | undefined; dealSumType?: string | null | undefined; dealsInbound?: string | null | undefined; displayProperties?: string | null | undefined; esbServicesCall?: string | null | undefined; fullPaymentDate?: string | null | undefined; fullPurchaseDate?: string | null | undefined; fullPurchaseDateOutbound?: string | null | undefined; fullSupplierNameHeb?: string | null | undefined; fullSupplierNameOutbound?: string | null | undefined; horaatKeva?: string | null | undefined; isButton: string; isCaptcha: string; isError: string; isHoraatKeva: string; isShowDealsOutbound?: string | null | undefined; isShowLinkForSupplierDetails?: string | null | undefined; kodMatbeaMekori?: string | null | undefined; message?: string | null | undefined; moreInfo?: string | null | undefined; paymentDate?: string | null | undefined; paymentSum?: string | null | undefined; paymentSumOutbound?: string | null | undefined; paymentSumSign?: string | null | undefined; purchaseDate?: string | null | undefined; purchaseDateOutbound?: string | null | undefined; returnCode?: string | null | undefined; returnMessage?: string | null | undefined; siteName?: string | null | undefined; solek?: string | null | undefined; specificDate?: string | null | undefined; stage?: string | null | undefined; supplierId?: number | null | undefined; supplierName?: string | null | undefined; supplierNameOutbound?: string | null | undefined; tablePageNum: boolean; voucherNumber?: number | null | undefined; voucherNumberRatz?: number | null | undefined; voucherNumberRatzOutbound?: number | null | undefined; }; /** represent charge's metadata ledger validation status */ export const LedgerValidationStatus = { Diff: 'DIFF', Invalid: 'INVALID', Valid: 'VALID' } as const; export type LedgerValidationStatus = typeof LedgerValidationStatus[keyof typeof LedgerValidationStatus]; /** Input for a Max (formerly Leumi Card) credit card transaction */ export type MaxTransactionInput = { actualPaymentAmount: string; arn: string; cardIndex: number; categoryId: number; comments: string; dealDataAcq: string; dealDataAdjustmentAmount?: string | null | undefined; dealDataAdjustmentType: string; dealDataAmount: string; dealDataAmountIls: string; dealDataAmountLeft: string; dealDataArn: string; dealDataAuthorizationNumber: string; dealDataCardName?: string | null | undefined; dealDataCardToken?: string | null | undefined; dealDataCommissionVat: string; dealDataDirectExchange?: string | null | undefined; dealDataExchangeCommissionAmount?: string | null | undefined; dealDataExchangeCommissionMaam?: string | null | undefined; dealDataExchangeCommissionType?: string | null | undefined; dealDataExchangeDirect: string; dealDataExchangeRate: string; dealDataIndexRateBase?: string | null | undefined; dealDataIndexRatePmt?: string | null | undefined; dealDataInterestAmount: string; dealDataIsAllowedSpreadWithBenefit: boolean; dealDataIssuerCurrency: string; dealDataIssuerExchangeRate?: string | null | undefined; dealDataOriginalTerm?: string | null | undefined; dealDataPercentMaam?: string | null | undefined; dealDataPlan: string; dealDataPosEntryEmv: string; dealDataProcessingDate: string; dealDataPurchaseAmount?: string | null | undefined; dealDataPurchaseTime?: string | null | undefined; dealDataRefNbr: string; dealDataShowCancelDebit: boolean; dealDataShowSpread: boolean; dealDataShowSpreadBenefitButton: boolean; dealDataShowSpreadButton: boolean; dealDataShowSpreadForLeumi: boolean; dealDataTdmCardToken: string; dealDataTdmTransactionType: number; dealDataTransactionType: number; dealDataTxnCode: number; dealDataUserName: string; dealDataWithdrawalCommissionAmount?: string | null | undefined; discountKeyAmount?: string | null | undefined; discountKeyRecType?: string | null | undefined; ethocaInd: boolean; fundsTransferComment?: string | null | undefined; fundsTransferReceiverOrTransfer?: string | null | undefined; isRegisterCh: boolean; isSpreadingAutorizationAllowed: boolean; issuerId: number; merchant: string; merchantAddress?: string | null | undefined; merchantCommercialName?: string | null | undefined; merchantCoordinates?: string | null | undefined; merchantMaxPhone: boolean; merchantName: string; merchantNumber: string; merchantPhone: string; merchantTaxId: string; originalAmount: string; originalCurrency: string; paymentCurrency?: number | null | undefined; paymentDate: string; planName: string; planTypeId: number; promotionAmount?: string | null | undefined; promotionClub: string; promotionType?: string | null | undefined; purchaseDate: string; receiptPDF?: string | null | undefined; refIndex: number; runtimeReferenceId?: string | null | undefined; runtimeReferenceInternalId: string; runtimeReferenceType: number; shortCardNumber?: string | null | undefined; spreadTransactionByCampainInd: boolean; spreadTransactionByCampainNumber?: number | null | undefined; tableType: number; tag?: string | null | undefined; uid: string; upSaleForTransactionResult?: string | null | undefined; userIndex: number; }; /** represent a missing info attributes for a charge */ export const MissingChargeInfo = { Counterparty: 'COUNTERPARTY', Description: 'DESCRIPTION', Documents: 'DOCUMENTS', Tags: 'TAGS', TaxCategory: 'TAX_CATEGORY', Transactions: 'TRANSACTIONS', Vat: 'VAT' } as const; export type MissingChargeInfo = typeof MissingChargeInfo[keyof typeof MissingChargeInfo]; /** Input for an Otsar HaHayal credit card transaction */ export type OtsarHahayalCreditCardTransactionInput = { /** Card type code (from CreditCardsResponse) */ cardType: number; /** Charged amount in charge currency */ chargeAmount: number; /** Currency the charge is made in */ chargeCurrency: string; /** Charge date */ chargeDate: string; /** Counter for deduplicating identical transactions in the same billing period */ counter: number; /** Transaction date */ date: string; /** Original deal amount in deal currency */ dealAmount: number; /** Currency of the original deal */ dealCurrency: string; /** Deal group key (e.g. localDeals, euroDeals) */ dealGroup: string; /** Masked PAN of the card (from CreditCardsResponse) */ maskedPan: string; /** Merchant / transaction name */ name: string; /** Additional notes */ notes: string; /** UUID of the card resource (from CreditCardsResponse) */ resourceId: string; /** Wallet type code */ walletType: number; }; /** Input for an Otsar HaHayal foreign currency bank account transaction */ export type OtsarHahayalForeignTransactionInput = { account: number; accountType: string; balance?: number | null | undefined; branch: number; credit: number; currency: string; date: string; debit: number; description: string; openingBalance: number; reference: string; sp?: number | null | undefined; subTransactions: string; valueDate: string; }; /** Input for an Otsar HaHayal ILS (NIS) bank account transaction */ export type OtsarHahayalIlsTransactionInput = { accountNumber: number; accountType: number; actionCode: number; bfbSource: string; branchNumber: number; closingBalance: number; correspondentAccount: number; correspondentAccountType: number; correspondentBank: number; correspondentBranch: number; creditAmount: number; customerName: string; dateOfBusinessDay: string; dateOfRegistration: string; debitAmount: number; depositorId: number; description: string; drillDownData?: string | null | undefined; drillDownUrl: string; firstTransactionOfDay: boolean; lastTransactionOfDay: boolean; name: string; openingBalance: number; operationSource: string; originReference?: string | null | undefined; reference: number; salaryInd: number; transactionReason: string; transactionSource: string; }; /** payment type enum */ export const PaymentType = { Cash: 'CASH', Cheque: 'CHEQUE', CreditCard: 'CREDIT_CARD', Other: 'OTHER', OtherDeduction: 'OTHER_DEDUCTION', PaymentApp: 'PAYMENT_APP', Paypal: 'PAYPAL', TaxDeduction: 'TAX_DEDUCTION', WireTransfer: 'WIRE_TRANSFER' } as const; export type PaymentType = typeof PaymentType[keyof typeof PaymentType]; /** record type of PCN874 report */ export const Pcn874RecordType = { C: 'C', H: 'H', I: 'I', K: 'K', L1: 'L1', L2: 'L2', M: 'M', P: 'P', R: 'R', S1: 'S1', S2: 'S2', T: 'T', Y: 'Y' } as const; export type Pcn874RecordType = typeof Pcn874RecordType[keyof typeof Pcn874RecordType]; /** Input for a Poalim foreign currency bank account transaction */ export type PoalimForeignTransactionInput = { accountName?: string | null | undefined; accountNumber: number; activityDescription: string; activityTypeCode: number; bankNumber: number; branchNumber: number; commentExistenceSwitch: boolean; comments?: string | null | undefined; contraAccountFieldNameLable?: string | null | undefined; contraAccountNumber: number; contraBankNumber: number; contraBranchNumber: number; contraCurrencyCode: number; currency: Currency; currencyLongDescription: string; currencyRate: number; currencySwiftCode: string; currentBalance: number; dataGroupCode: boolean; eventActivityTypeCode: number; eventAmount: number; eventDetails?: string | null | undefined; eventNumber: number; executingDate: string; formattedExecutingDate: string; formattedValueDate?: string | null | undefined; metadataAttributesContraAccountFieldNameLable?: string | null | undefined; metadataAttributesContraAccountNumber?: string | null | undefined; metadataAttributesContraBankNumber?: string | null | undefined; metadataAttributesContraBranchNumber?: string | null | undefined; metadataAttributesContraCurrencyCode?: string | null | undefined; metadataAttributesCurrencyRate?: string | null | undefined; metadataAttributesDataGroupCode?: string | null | undefined; metadataAttributesOriginalEventKey?: string | null | undefined; metadataAttributesRateFixingCode?: string | null | undefined; originalEventKey: boolean; originalSystemId: number; rateFixingCode: number; rateFixingDescription?: string | null | undefined; rateFixingShortDescription: string; referenceCatenatedNumber: number; referenceNumber: string; transactionType: string; urlAddress?: string | null | undefined; urlAddressNiar?: string | null | undefined; validityDate: string; valueDate: string; }; /** Input for a Poalim ILS (NIS) bank account transaction */ export type PoalimIlsTransactionInput = { accountNumber: number; activityDescription: string; activityDescriptionIncludeValueDate?: string | null | undefined; activityTypeCode: number; bankNumber: number; beneficiaryDetailsData?: string | null | undefined; beneficiaryDetailsDataMessageDetail?: string | null | undefined; beneficiaryDetailsDataMessageHeadline?: string | null | undefined; beneficiaryDetailsDataPartyHeadline?: string | null | undefined; beneficiaryDetailsDataPartyName?: string | null | undefined; beneficiaryDetailsDataRecordNumber?: number | null | undefined; beneficiaryDetailsDataTableNumber?: number | null | undefined; branchNumber: number; comment?: string | null | undefined; commentExistenceSwitch: boolean; contraAccountNumber: number; contraAccountTypeCode: number; contraBankNumber: number; contraBranchNumber: number; currentBalance: number; dataGroupCode: number; details?: string | null | undefined; differentDateIndication: string; englishActionDesc?: string | null | undefined; eventActivityTypeCode: number; eventAmount: number; eventDate: string; eventId: string; executingBranchNumber: number; expandedEventDate: string; fieldDescDisplaySwitch: boolean; formattedEventDate: string; formattedOriginalEventCreateDate?: string | null | undefined; formattedValueDate?: string | null | undefined; internalLinkCode: number; marketingOfferContext: boolean; offerActivityContext?: string | null | undefined; originalEventCreateDate: number; pfmDetails?: string | null | undefined; recordNumber: number; referenceCatenatedNumber: number; referenceNumber: string; rejectedDataEventPertainingIndication?: string | null | undefined; serialNumber: number; tableNumber: number; textCode: number; transactionType: string; urlAddressNiar?: string | null | undefined; valueDate: string; }; /** Input for a Poalim SWIFT international wire transfer */ export type PoalimSwiftTransactionInput = { accountNumber?: number | null | undefined; amount?: number | null | undefined; bankNumber?: number | null | undefined; beneficiaryEnglishCityName?: string | null | undefined; beneficiaryEnglishCountryName?: string | null | undefined; beneficiaryEnglishStreetName?: string | null | undefined; branchNumber?: number | null | undefined; chargePartyName?: string | null | undefined; currencyCodeCatenatedKey?: string | null | undefined; currencyLongDescription?: string | null | undefined; dataOriginCode?: string | null | undefined; formattedStartDate?: string | null | undefined; orderCustomerName?: string | null | undefined; referenceNumber?: string | null | undefined; startDate?: string | null | undefined; swiftAccountWithInstitution57?: string | null | undefined; swiftBankCode?: string | null | undefined; swiftBankOperationCode23B?: string | null | undefined; swiftBeneficiaryCustomer59?: string | null | undefined; swiftCurrencyInstructedAmount33B?: string | null | undefined; swiftDetailsOfCharges71A?: string | null | undefined; swiftExchangeRate36?: string | null | undefined; swiftInstructionCode23E?: string | null | undefined; swiftIsnSerialNumber?: string | null | undefined; swiftOrderingCustomer50K?: string | null | undefined; swif