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

    Type Alias EmailNotification

    EmailNotification:
        | {
            achName?: string;
            customerName: string;
            depositUrl: string;
            id: string;
            name: string;
            status: | "PENDING_VERIFICATION"
            | "ACTIVE"
            | "REVIEW"
            | "DISABLED"
            | "BLOCKED"
            | "DELETED";
            supportUrl: string;
            template: "IDENTITY";
            url: string;
            wireName?: string;
        }
        | {
            achName?: string;
            customerName: string;
            depositUrl: string;
            id: string;
            name: string;
            status: "PENDING_VERIFICATION"
            | "ACTIVE"
            | "DISABLED";
            supportUrl: string;
            template: "ORGANIZATION";
            url: string;
            wireName?: string;
        }
        | {
            customerName: string;
            id: string;
            name: string;
            supportUrl: string;
            template: "LEDGER_ACCOUNT";
            url: string;
        }
        | {
            customerName: string;
            id: string;
            name: string;
            paymentUrl: string;
            status: "PENDING_VERIFICATION"
            | "ACTIVE"
            | "BLOCKED";
            supportUrl: string;
            template: "PAYMENT_INSTRUMENT";
            type: "SWIFT_WIRE" | "US_ACH" | "US_WIRE" | "WALLET";
            url: string;
        }
        | {
            account: string;
            accountUrl: string;
            amount: string;
            customerName: string;
            date?: string;
            entityName: string;
            id: string;
            imad?: string;
            memo?: string;
            omad?: string;
            reference?: string;
            senderName?: string;
            status: "PENDING"
            | "DEPOSITED"
            | "CANCELLED";
            supportUrl: string;
            template: "DEPOSIT";
            type: "DIRECT" | "US_BANK_ACH" | "US_WIRE" | "SWIFT_WIRE";
            url: string;
        }
        | {
            account: string;
            accountUrl: string;
            achName?: string;
            amount: string;
            customerName: string;
            entityName: string;
            id: string;
            imad?: string;
            omad?: string;
            paymentInstrumentName: string;
            status: "PENDING"
            | "COMPLETED"
            | "RETURNED";
            supportUrl: string;
            template: "WITHDRAW";
            type: "SWIFT_WIRE" | "US_ACH" | "US_WIRE" | "BLOCKCHAIN";
            url: string;
            wireName?: string;
        }
        | {
            amount: string;
            customerName: string;
            id: string;
            senderMessage?: string;
            sourceAccount: string;
            sourceAccountUrl: string;
            sourceCustomerName?: string;
            status: "PENDING"
            | "CANCELLED"
            | "SUCCEEDED";
            supportUrl: string;
            targetAccount: string;
            targetAccountUrl: string;
            targetCustomerName?: string;
            template: "TRANSFER";
            type: "INTERNAL" | "NETWORK_SENDER" | "NETWORK_RECEIVER";
            url: string;
        }
        | {
            amount: string;
            card: string;
            id: string;
            merchantName: string;
            reason?: string;
            status: "PENDING"
            | "DECLINED"
            | "AUTHORIZED"
            | "COMPLETED";
            supportUrl: string;
            template: "CARD_TRANSACTION";
            type: "AUTHORIZATION" | "REVERSAL";
            url: string;
        }

    The email notification payload union: one member per code-registered template key, carrying the merge variables that key's copy may interpolate.

    This is the shape the event-driven sender builds each notification from — the lambda resolves recipients through CustomerNotificationService and renders these payloads for its SendGrid templates.

    Hoisted out of send so the email template registry can derive its condition vocabulary from it (see ./schema/email_template.ts) without a circular type alias — the registry's key type comes from this union, and the sender's signature comes from the registry.

    Lives in db rather than notification-services because the registry it feeds sits next to the b2b.email_template tables it seeds, and those tables' templateKey / statusVariant columns are typed from it. Pure types, so notification-services re-exports them from here at no runtime cost and the eleven sending services import the same names as before.

    A template can only interpolate variables a sending app actually provides, so this union is the authority on the vocabulary. Adding a merge variable is a change here plus a change in every sending app that builds that member.

    Type Declaration

    • {
          achName?: string;
          customerName: string;
          depositUrl: string;
          id: string;
          name: string;
          status:
              | "PENDING_VERIFICATION"
              | "ACTIVE"
              | "REVIEW"
              | "DISABLED"
              | "BLOCKED"
              | "DELETED";
          supportUrl: string;
          template: "IDENTITY";
          url: string;
          wireName?: string;
      }
      • OptionalachName?: string

        The entity's own beneficiary names, as they appear on an INCOMING payment (docs/BENEFICIARY_NAMES.md). Optional because the producer may predate them; copy that uses one must guard it.

      • customerName: string
      • depositUrl: string
      • id: string
      • name: string
      • status:
            | "PENDING_VERIFICATION"
            | "ACTIVE"
            | "REVIEW"
            | "DISABLED"
            | "BLOCKED"
            | "DELETED"
      • supportUrl: string
      • template: "IDENTITY"
      • url: string
      • OptionalwireName?: string
    • {
          achName?: string;
          customerName: string;
          depositUrl: string;
          id: string;
          name: string;
          status: "PENDING_VERIFICATION" | "ACTIVE" | "DISABLED";
          supportUrl: string;
          template: "ORGANIZATION";
          url: string;
          wireName?: string;
      }
      • OptionalachName?: string

        The entity's own beneficiary names, as they appear on an INCOMING payment (docs/BENEFICIARY_NAMES.md). Optional because the producer may predate them; copy that uses one must guard it.

      • customerName: string
      • depositUrl: string
      • id: string
      • name: string
      • status: "PENDING_VERIFICATION" | "ACTIVE" | "DISABLED"
      • supportUrl: string
      • template: "ORGANIZATION"
      • url: string
      • OptionalwireName?: string
    • {
          customerName: string;
          id: string;
          name: string;
          supportUrl: string;
          template: "LEDGER_ACCOUNT";
          url: string;
      }
    • {
          customerName: string;
          id: string;
          name: string;
          paymentUrl: string;
          status: "PENDING_VERIFICATION" | "ACTIVE" | "BLOCKED";
          supportUrl: string;
          template: "PAYMENT_INSTRUMENT";
          type: "SWIFT_WIRE" | "US_ACH" | "US_WIRE" | "WALLET";
          url: string;
      }
    • {
          account: string;
          accountUrl: string;
          amount: string;
          customerName: string;
          date?: string;
          entityName: string;
          id: string;
          imad?: string;
          memo?: string;
          omad?: string;
          reference?: string;
          senderName?: string;
          status: "PENDING" | "DEPOSITED" | "CANCELLED";
          supportUrl: string;
          template: "DEPOSIT";
          type: "DIRECT" | "US_BANK_ACH" | "US_WIRE" | "SWIFT_WIRE";
          url: string;
      }
      • account: string
      • accountUrl: string
      • amount: string
      • customerName: string
      • Optionaldate?: string

        Transaction date, preformatted for display.

      • entityName: string
      • id: string
      • Optionalimad?: string
      • Optionalmemo?: string

        Description / transaction notes (FFC memo for wires).

      • Optionalomad?: string
      • Optionalreference?: string

        Reference number (IMAD for SWIFT wires).

      • OptionalsenderName?: string

        Originator / name of sender. For SWIFT deposits with no originator on the wire this is "Originator not specified" (ENG-2911).

      • status: "PENDING" | "DEPOSITED" | "CANCELLED"
      • supportUrl: string
      • template: "DEPOSIT"
      • type: "DIRECT" | "US_BANK_ACH" | "US_WIRE" | "SWIFT_WIRE"
      • url: string
    • {
          account: string;
          accountUrl: string;
          achName?: string;
          amount: string;
          customerName: string;
          entityName: string;
          id: string;
          imad?: string;
          omad?: string;
          paymentInstrumentName: string;
          status: "PENDING" | "COMPLETED" | "RETURNED";
          supportUrl: string;
          template: "WITHDRAW";
          type: "SWIFT_WIRE" | "US_ACH" | "US_WIRE" | "BLOCKCHAIN";
          url: string;
          wireName?: string;
      }
      • account: string
      • accountUrl: string
      • OptionalachName?: string

        The paying entity's own beneficiary names (docs/BENEFICIARY_NAMES.md), for copy naming how the payment appears to the payee. Never the payee's own name — that is paymentInstrumentName.

      • amount: string
      • customerName: string
      • entityName: string
      • id: string
      • Optionalimad?: string
      • Optionalomad?: string
      • paymentInstrumentName: string
      • status: "PENDING" | "COMPLETED" | "RETURNED"
      • supportUrl: string
      • template: "WITHDRAW"
      • type: "SWIFT_WIRE" | "US_ACH" | "US_WIRE" | "BLOCKCHAIN"
      • url: string
      • OptionalwireName?: string
    • {
          amount: string;
          customerName: string;
          id: string;
          senderMessage?: string;
          sourceAccount: string;
          sourceAccountUrl: string;
          sourceCustomerName?: string;
          status: "PENDING" | "CANCELLED" | "SUCCEEDED";
          supportUrl: string;
          targetAccount: string;
          targetAccountUrl: string;
          targetCustomerName?: string;
          template: "TRANSFER";
          type: "INTERNAL" | "NETWORK_SENDER" | "NETWORK_RECEIVER";
          url: string;
      }
      • amount: string
      • customerName: string
      • id: string
      • OptionalsenderMessage?: string
      • sourceAccount: string
      • sourceAccountUrl: string
      • OptionalsourceCustomerName?: string

        May be omitted: a cross-customer transfer resolves only one side, and the counterparty ledger account may have no public projection visible to this customer — the transfer path drops the field for that case rather than sending an empty string (ENG-3003), so copy has to read correctly without it.

      • status: "PENDING" | "CANCELLED" | "SUCCEEDED"
      • supportUrl: string
      • targetAccount: string
      • targetAccountUrl: string
      • OptionaltargetCustomerName?: string

        May be omitted, as sourceCustomerName.

      • template: "TRANSFER"
      • type: "INTERNAL" | "NETWORK_SENDER" | "NETWORK_RECEIVER"
      • url: string
    • {
          amount: string;
          card: string;
          id: string;
          merchantName: string;
          reason?: string;
          status: "PENDING" | "DECLINED" | "AUTHORIZED" | "COMPLETED";
          supportUrl: string;
          template: "CARD_TRANSACTION";
          type: "AUTHORIZATION" | "REVERSAL";
          url: string;
      }