@cfxlabsinc/b2b-services
    Preparing search index...

    Type Alias BankAccount

    A row of b2b.bank_account_view.

    The nine balance fields are null — never zero — when keyable is false. "Cannot be measured" and "is empty" are different claims, and the view goes out of its way to keep them distinguishable (§ 6); collapsing them here would throw that away at the last step.

    type BankAccount = {
        accountNumber: string | null;
        bankId: BankId | null;
        bankName: string | null;
        createdAt: Date;
        credits: BigNumber | null;
        creditsExInternal: BigNumber | null;
        currency: string;
        customerId: string | null;
        customerName: string | null;
        debits: BigNumber | null;
        debitsExInternal: BigNumber | null;
        deletedAt: Date | null;
        entityId: string | null;
        entityName: string | null;
        entityType: string | null;
        firstPostedAt: Date | null;
        id: string;
        impliedBalance: BigNumber | null;
        impliedBalanceExInternal: BigNumber | null;
        key: string;
        keyable: boolean;
        lastPostedAt: Date | null;
        ledgerAccountId: string | null;
        memo: string | null;
        name: string | null;
        parentKey: string | null;
        provider: string | null;
        providerAccountId: string | null;
        routingNumber: string | null;
        source:
            | "VICTOR_ACCOUNT"
            | "VIRTUAL_ACCOUNT"
            | "MANUAL"
            | "BANK_INSTRUCTION"
            | "OBSERVED";
        sourceRecordId: string
        | null;
        status: string;
        transactionCount: number | null;
        type: string | null;
        updatedAt: Date;
    }
    Index
    accountNumber: string | null
    bankId: BankId | null
    bankName: string | null
    createdAt: Date
    credits: BigNumber | null
    creditsExInternal: BigNumber | null
    currency: string
    customerId: string | null
    customerName: string | null
    debits: BigNumber | null
    debitsExInternal: BigNumber | null
    deletedAt: Date | null

    Set only on the arms that surface a tombstone. The arms that fall back to OBSERVED when their source row is soft-deleted project NULL here instead — the account is still live, it is just no longer registered.

    entityId: string | null
    entityName: string | null
    entityType: string | null
    firstPostedAt: Date | null
    id: string
    impliedBalance: BigNumber | null
    impliedBalanceExInternal: BigNumber | null
    key: string
    keyable: boolean
    lastPostedAt: Date | null
    ledgerAccountId: string | null
    memo: string | null
    name: string | null
    parentKey: string | null
    provider: string | null
    providerAccountId: string | null
    routingNumber: string | null
    source:
        | "VICTOR_ACCOUNT"
        | "VIRTUAL_ACCOUNT"
        | "MANUAL"
        | "BANK_INSTRUCTION"
        | "OBSERVED"

    Which arm the row came from. A literal in every arm, so the planner prunes on it.

    sourceRecordId: string | null
    status: string
    transactionCount: number | null
    type: string | null
    updatedAt: Date