/** * BankAccount Model * * Bank account information for a client. * Uses discriminated union based on `country` field. */ import { type BankAccount as BankAccountSchema, BankAccountType, type CurrencyCode } from "@artu-ai/shared"; import { BaseModel } from "./base"; /** * Bank account data structure from the API (discriminated union) */ export type BankAccountData = BankAccountSchema; /** * BankAccount Model. * * Base class for bank account data. The concrete type depends on * the `country` field: * - `country === "MX"` → MexBankAccount with clabe, codigoBanco, codigoPlaza * - Other countries → GenericBankAccount * * @example * ```typescript * const account = await sdk.bankAccounts.retrieve(id); * * // Check country for type narrowing * if (account.country === "MX") { * console.log(account.clabe); // MexBankAccount * } * ``` */ export declare class BankAccount extends BaseModel { /** * Unique bank account identifier */ get id(): string; /** * ID of the client this bank account belongs to */ get clientId(): string; /** * Account number */ get accountNumber(): string; /** * Bank name */ get bankName(): string; /** * Bank code (e.g., SWIFT, routing number) */ get bankCode(): string | undefined; /** * Country where the bank account is held (ISO 3166-1 alpha-2) * * This is the discriminator field - determines which fields are available. */ get country(): string; /** * Account type (checking, savings, investment, other) */ get type(): BankAccountType; /** * Account currency (ISO 4217 code) */ get currency(): CurrencyCode; /** * Whether this is the primary bank account */ get isPrimary(): boolean; /** * Whether this account is active */ get isActive(): boolean; /** * Optional label (e.g., "Personal Checking") */ get label(): string | undefined; /** * External ID */ get externalId(): string | undefined; /** * Additional metadata */ get metadata(): Record | undefined; /** * When the bank account was created */ get createdAt(): Date; /** * When the bank account was last updated */ get updatedAt(): Date; /** * Whether this is a checking account */ get isChecking(): boolean; /** * Whether this is a savings account */ get isSavings(): boolean; /** * Whether this is an investment account */ get isInvestment(): boolean; /** * Whether this is a Mexican bank account */ get isMexican(): boolean; /** * Returns a masked account number (shows last 4 digits) */ get maskedAccountNumber(): string; /** * Returns a display string with bank name and masked account */ get display(): string; toString(): string; } /** * Check if value is any type of BankAccount model */ export declare function isBankAccount(value: unknown): value is BankAccount;