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

    Type Alias BankAccountRegistration

    Admin-tier projection of a bank_account row. id is the external id; every FK is projected as the referenced row's external id, so nothing internal leaks across the service boundary.

    type BankAccountRegistration = {
        accountNumber: string | null;
        bankId: string | null;
        bankName: string | null;
        createdAt: Date;
        currency: string;
        customerId: string | null;
        customerName: string | null;
        discoveredFrom: "MANUAL" | "OBSERVED" | "PROVIDER";
        id: string;
        identityId: string | null;
        key: string;
        ledgerAccountId: string | null;
        memo: string | null;
        name: string;
        notes: string | null;
        organizationId: string | null;
        parentKey: string | null;
        programId: Program["id"] | null;
        provider: string | null;
        providerAccountId: string | null;
        registeredBy: string | null;
        routingNumber: string | null;
        status: "ACTIVE" | "CLOSED" | "DELETED";
        type: BankAccountType;
        updatedAt: Date;
        victorCounterparty: typeof bankAccountTable.$inferSelect["victorCounterparty"];
    }
    Index
    accountNumber: string | null
    bankId: string | null

    The bank slug, or null when the counterparty's bank is not a CFX partner.

    bankName: string | null
    createdAt: Date
    currency: string
    customerId: string | null
    customerName: string | null

    Resolved alongside customerId so a selector trigger can show a name rather than an id.

    discoveredFrom: "MANUAL" | "OBSERVED" | "PROVIDER"
    id: string
    identityId: string | null
    key: string

    This registration's row key in b2b.bank_account_view, so a caller can look the account up there without reassembling the key — including when the view resolves the key to a different arm, which is exactly the case a caller cannot reconstruct on its own (§ 4.7).

    ledgerAccountId: string | null
    memo: string | null
    name: string
    notes: string | null
    organizationId: string | null
    parentKey: string | null
    programId: Program["id"] | null

    The program the account belongs to; null for accounts outside any program.

    provider: string | null
    providerAccountId: string | null
    registeredBy: string | null
    routingNumber: string | null
    status: "ACTIVE" | "CLOSED" | "DELETED"
    updatedAt: Date
    victorCounterparty: typeof bankAccountTable.$inferSelect["victorCounterparty"]

    Victor's US wire counterparty for the account, with the numbers and beneficiary it pays.