Type Alias WireEmailPostOutcome
WireEmailPostOutcome:
| { accountKey: string; bankTransactionId: string; status: "POSTED" }
| {
bankTransactionId: string;
status: "MATCHED_EXISTING";
type: BankTransaction["type"];
}
| {
reason: "no-account-match"
| "ambiguous-account-match";
status: "UNRESOLVED";
}
| {
reason: "bank-not-enabled"
| "not-a-credit"
| "no-account-ending";
status: "SKIPPED";
}
Type Declaration
- { accountKey: string; bankTransactionId: string; status: "POSTED" }
- {
bankTransactionId: string;
status: "MATCHED_EXISTING";
type: BankTransaction["type"];
}
-
bankTransactionId: string
-
status: "MATCHED_EXISTING"
-
type: BankTransaction["type"]
- { reason: "no-account-match" | "ambiguous-account-match"; status: "UNRESOLVED" }
- {
reason: "bank-not-enabled" | "not-a-credit" | "no-account-ending";
status: "SKIPPED";
}
What came of posting one wire email.
UNRESOLVEDandSKIPPEDboth mean "no row was written", and they are separate statuses because the caller owes them different things: we TRIED to place anUNRESOLVEDwire and failed, so it needs a human and an alert, while aSKIPPEDone was never a candidate. Folding them into one status with a reason code pushed that judgement onto every caller, and buried the handful that need attention among the hundreds working as designed.