/** * Mexico Bank Accounts Resource * * Extends BankAccountsResource to return MexBankAccount models * with Mexico-specific helpers (CLABE formatting, etc.). */ import type { AtomicBatchResult, BankAccountFilter, BankAccountSort, CreateBankAccountInput, ListOptions, MexBankAccountFilter, MexBankAccountSort, PaginatedResponse, PartialBatchResult, SyncItem, SyncResult, UpdateBankAccountInput, UpsertBankAccountByExternalIdInput, UpsertBankAccountInput, UpsertResult } from "@artu-ai/shared"; import { type BankAccountData, MexBankAccount } from "../../models"; import { BankAccountsResource } from "../bank-accounts"; /** * Mexico-scoped bank accounts resource. * * Identical to BankAccountsResource but returns MexBankAccount models * with Mexico-specific helpers like CLABE formatting. * * @example * ```typescript * const mexSdk = new ComplianceSDK({ * apiKey, * environment: "test", * scope: "MX", * }); * * const account = await mexSdk.bankAccounts.create({ * clientId: "client_123", * accountNumber: "1234567890", * bankName: "BBVA México", * type: "checking", * currency: "MXN", * country: "MX", * clabe: "012180001234567890", * }); * * // Returns MexBankAccount with helpers * console.log(account.clabe); * console.log(account.formattedClabe); // "012 180 00123456789 0" * console.log(account.maskedClabe); // "**************7890" * ``` */ export declare class MexBankAccountsResource extends BankAccountsResource { create(data: CreateBankAccountInput): Promise; retrieve(id: string): Promise; retrieveByMetadata(key: string, value: string): Promise; retrieveByExternalId(externalId: string): Promise; update(id: string, data: UpdateBankAccountInput): Promise; /** * Lists bank accounts with optional filtering. * * Accepts flattened MX filter (MX-specific fields at root level). */ list(options?: ListOptions): Promise>; listByClient(clientId: string, options?: { cursor?: string; limit?: number; }): Promise>; /** * Counts bank accounts matching the given filter. * * @param filter - Optional filter criteria (with MX fields at root level) * @returns The count of matching bank accounts */ count(filter?: MexBankAccountFilter): Promise; /** * Iterates over bank accounts. * * Accepts flattened MX filter (MX-specific fields at root level). */ iterate(options?: { filter?: MexBankAccountFilter; sort?: TSort; pageSize?: number; }): AsyncGenerator; createMany(accounts: CreateBankAccountInput[], options?: { atomic?: true; }): Promise>; createMany(accounts: CreateBankAccountInput[], options: { atomic: false; }): Promise>; updateMany(updates: { id: string; data: UpdateBankAccountInput; }[], options?: { atomic?: true; }): Promise>; updateMany(updates: { id: string; data: UpdateBankAccountInput; }[], options: { atomic: false; }): Promise>; sync(clientId: string, items: SyncItem[], options: { replaceMode: true; }): Promise>; sync(clientId: string, items: SyncItem[], options?: { replaceMode?: boolean; }): Promise>; upsertByExternalId(data: UpsertBankAccountByExternalIdInput): Promise>; upsertManyByExternalId(accounts: UpsertBankAccountInput[], options?: { atomic?: true; }): Promise>>; upsertManyByExternalId(accounts: UpsertBankAccountInput[], options: { atomic: false; }): Promise>>; setPrimary(id: string): Promise; activate(id: string): Promise; deactivate(id: string): Promise; getPrimary(clientId: string): Promise; /** * Transforms flattened MX filter to nested API format. * * Mexico-specific filter fields (clabe, codigoBanco, codigoPlaza) are stored * in `scopeData.MX`. Base fields pass through unchanged. */ protected applyScopeToFilter(filter?: MexBankAccountFilter): BankAccountFilter; /** * Transforms a flattened MexBankAccountSort to nested BankAccountSort format. * * Maps flattened field names to their full API paths. * * Note: Uses unknown parameter to allow derived classes to override with their own sort types. */ protected applyScopeToSort(sort?: TSort): BankAccountSort | undefined; protected instantiate(data: BankAccountData): MexBankAccount; }