@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, and importing one from a services package would invert the dependency direction.

    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;
        originatorAddressLine1: string | null;
        originatorAddressLine2: string | null;
        originatorAddressLine3: 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
    originatorAddressLine1: string | null

    The originator's address block as the three discrete lines Fedwire carries. The number is part of the address, so an absent line 2 leaves line 3 where the bank put it.

    originatorAddressLine2: string | null
    originatorAddressLine3: 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.