import * as z from "zod/v3"; import { Decimal as Decimal$ } from "../../types/decimal.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { BankAccountStatus } from "./bankaccountstatus.js"; import { DataType } from "./datatype.js"; import { PushOperationChange } from "./pushoperationchange.js"; import { PushOperationStatus } from "./pushoperationstatus.js"; import { Validation } from "./validation.js"; /** * The type of transactions and balances on the account. * * @remarks * For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. * For Debit accounts, positive balances are assets, and positive transactions **increase** assets. */ export declare const BankAccountCreateResponseBankAccountType: { readonly Unknown: "Unknown"; readonly Credit: "Credit"; readonly Debit: "Debit"; }; /** * The type of transactions and balances on the account. * * @remarks * For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. * For Debit accounts, positive balances are assets, and positive transactions **increase** assets. */ export type BankAccountCreateResponseBankAccountType = ClosedEnum; export type BankAccountCreateResponseMetadata = { /** * Indicates whether the record has been deleted in the third-party system this record originated from. */ isDeleted?: boolean | null | undefined; }; /** * Supplemental data is additional data you can include in our standard data types. * * @remarks * * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. */ export type BankAccountCreateResponseSupplementalData = { content?: { [k: string]: { [k: string]: any; }; } | null | undefined; }; /** * > **Accessing Bank Accounts through Banking API** * * @remarks * > * > This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators. * > * > To view bank account data through the Banking API, please refer to the new [Banking: Account](https://docs.codat.io/bank-feeds-api#/schemas/Account) data type. * * ## Overview * * A list of bank accounts associated with a company and a specific data connection. * * Bank accounts data includes: * * The name and ID of the account in the accounting software. * * The currency and balance of the account. * * The sort code and account number. * * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. */ export type BankAccountCreateResponseAccountingBankAccount = { modifiedDate?: string | undefined; sourceModifiedDate?: string | undefined; /** * Identifier for the account, unique for the company in the accounting software. */ id?: string | undefined; /** * Name of the bank account in the accounting software. */ accountName?: string | null | undefined; /** * The type of transactions and balances on the account. * * @remarks * For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. * For Debit accounts, positive balances are assets, and positive transactions **increase** assets. */ accountType?: BankAccountCreateResponseBankAccountType | undefined; /** * Code used to identify each nominal account for a business. */ nominalCode?: string | null | undefined; /** * Sort code for the bank account. * * @remarks * * Xero integrations * The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. */ sortCode?: string | null | undefined; /** * Account number for the bank account. * * @remarks * * Xero integrations * Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated. * * FreeAgent integrations * For Credit accounts, only the last four digits are required. For other types, the field is optional. */ accountNumber?: string | null | undefined; /** * International bank account number of the account. Often used when making or receiving international payments. */ iBan?: string | null | undefined; /** * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. * * @remarks * * ## Unknown currencies * * In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction. * * There are only a very small number of edge cases where this currency code is returned by the Codat system. */ currency?: string | undefined; /** * Balance of the bank account. */ balance?: Decimal$ | number | null | undefined; /** * The institution of the bank account. */ institution?: string | null | undefined; /** * Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example. */ availableBalance?: Decimal$ | number | null | undefined; /** * Pre-arranged overdraft limit of the account. * * @remarks * * The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. */ overdraftLimit?: Decimal$ | number | null | undefined; /** * Status of the bank account. */ status?: BankAccountStatus | undefined; metadata?: BankAccountCreateResponseMetadata | undefined; /** * Supplemental data is additional data you can include in our standard data types. * * @remarks * * It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. */ supplementalData?: BankAccountCreateResponseSupplementalData | undefined; }; export type BankAccountCreateResponse = { data?: BankAccountCreateResponseAccountingBankAccount | null | undefined; /** * Contains a single entry that communicates which record has changed and the manner in which it changed. */ changes?: Array | null | undefined; /** * Available data types */ dataType?: DataType | undefined; /** * Unique identifier for your SMB in Codat. */ companyId: string; /** * A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. */ pushOperationKey: string; /** * Unique identifier for a company's data connection. */ dataConnectionKey: string; /** * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: * * @remarks * * ``` * 2020-10-08T22:40:50Z * 2021-01-01T00:00:00 * ``` * * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: * * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` * - Unqualified local time: `2021-11-15T01:00:00` * - UTC time offsets: `2021-11-15T01:00:00-05:00` * * > Time zones * > * > Not all dates from Codat will contain information about time zones. * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. */ requestedOnUtc: string; /** * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: * * @remarks * * ``` * 2020-10-08T22:40:50Z * 2021-01-01T00:00:00 * ``` * * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: * * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` * - Unqualified local time: `2021-11-15T01:00:00` * - UTC time offsets: `2021-11-15T01:00:00-05:00` * * > Time zones * > * > Not all dates from Codat will contain information about time zones. * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. */ completedOnUtc?: string | undefined; /** * Number of minutes the push operation must complete within before it times out. */ timeoutInMinutes?: number | null | undefined; /** * Number of seconds the push operation must complete within before it times out. * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ timeoutInSeconds?: number | null | undefined; /** * The current status of the push operation. */ status: PushOperationStatus; /** * A message about the error. */ errorMessage?: string | null | undefined; /** * A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. */ validation?: Validation | undefined; /** * Push status code. */ statusCode: number; }; /** @internal */ export declare const BankAccountCreateResponseBankAccountType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const BankAccountCreateResponseMetadata$inboundSchema: z.ZodType; export declare function bankAccountCreateResponseMetadataFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const BankAccountCreateResponseSupplementalData$inboundSchema: z.ZodType; export declare function bankAccountCreateResponseSupplementalDataFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const BankAccountCreateResponseAccountingBankAccount$inboundSchema: z.ZodType; export declare function bankAccountCreateResponseAccountingBankAccountFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const BankAccountCreateResponse$inboundSchema: z.ZodType; export declare function bankAccountCreateResponseFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=bankaccountcreateresponse.d.ts.map