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;
}
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
-
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
-
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
-
entityName: string
-
id: string
-
Optionalimad?: string
-
Optionalmemo?: string
-
Optionalomad?: string
-
Optionalreference?: string
-
OptionalsenderName?: 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;
}
-
account: string
-
accountUrl: string
-
OptionalachName?: string
-
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
-
status: "PENDING" | "CANCELLED" | "SUCCEEDED"
-
supportUrl: string
-
targetAccount: string
-
targetAccountUrl: string
-
OptionaltargetCustomerName?: 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
CustomerNotificationServiceand renders these payloads for its SendGrid templates.Hoisted out of
sendso 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
dbrather thannotification-servicesbecause the registry it feeds sits next to theb2b.email_templatetables it seeds, and those tables'templateKey/statusVariantcolumns are typed from it. Pure types, sonotification-servicesre-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.