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

    Type Alias WireEmailParsed

    Parsed wire fields extracted from an inbound bank wire-notification email.

    Defined locally: db owns column-bound types. Do NOT import MetcapWireEmail from @cfxlabsinc/metcap-services — that would invert the dependency direction (services depend on db, not the reverse).

    type WireEmailParsed = {
        accountEndingWith?: string | null;
        amount: number;
        date: string;
        exchangeRate: string | null;
        foreignExchangeContract: string | null;
        imad: string;
        method: "SWIFT" | "FEDWIRE";
        omad: string | null;
        originatingFI: string | null;
        originatorAddress: string | null;
        originatorInfo: string | null;
        senderName: string | null;
        sendingFI: { code: string; name: string } | null;
        tradeDate: string | null;
        type: "CREDIT" | "DEBIT";
        wireNumber: string | null;
    }
    Index
    accountEndingWith?: string | null

    Trailing digits of the CFX account the wire moved through, as the bank quoted them ("Credited to account ending with 454" → "454"). Joined against bank_account_view to resolve the real account.

    OPTIONAL rather than string | null, and the difference is load-bearing: every row written before this field existed simply has no such key, and typing those as null would claim the bank sent no account line when in fact nobody looked. null means the parser looked and the email had none (every Burling debit); undefined means the row predates the parser.

    amount: number
    date: string
    exchangeRate: string | null
    foreignExchangeContract: string | null
    imad: string
    method: "SWIFT" | "FEDWIRE"
    omad: string | null
    originatingFI: string | null
    originatorAddress: string | null
    originatorInfo: string | null
    senderName: string | null
    sendingFI: { code: string; name: string } | null
    tradeDate: string | null
    type: "CREDIT" | "DEBIT"
    wireNumber: string | null

    Null when the bank's notification carries no usable sequence number.