DownloadEmails
Download email benefit schema and validated constructor; construction sends no message.
Declaration
Section titled “Declaration”const DownloadEmails: Schema.Union<readonly [Schema.Struct<{ recipient: Schema.Literal<"customer">; trigger: Schema.Literal<"eligible_settlement">; type: Schema.tag<"download_email">; asset: Schema.Struct<{ key: Schema.brand<Schema.String, "DownloadAssetKey">; revision: Schema.brand<Schema.Int, "DefinitionRevision">; }>;}>]> & { discriminants: readonly ["download_email"]; cases: { download_email: Schema.Struct<{ recipient: Schema.Literal<"customer">; trigger: Schema.Literal<"eligible_settlement">; type: Schema.tag<"download_email">; asset: Schema.Struct<{ key: Schema.brand<Schema.String, "DownloadAssetKey">; revision: Schema.brand<Schema.Int, "DefinitionRevision">; }>; }>; }; isAnyOf: <Keys>(keys) => (value) => value is Extract<{ recipient: "customer"; trigger: "eligible_settlement"; type: "download_email"; asset: { key: string & any; revision: number & any } }, { type: Keys }>; guards: { download_email: (u) => u is { recipient: "customer"; trigger: "eligible_settlement"; type: "download_email"; asset: { key: string & any; revision: number & any } }; }; match: { <Cases> (value, cases): Cases[keyof Cases] extends (value) => R ? any : never; <Cases> (cases): (value) => Cases[keyof Cases] extends (value) => R ? any : never; };} & { customer: (input) => Effect.Effect<typeof DownloadEmailBenefit.Type, Schema.SchemaError>;};Type Declaration
Section titled “Type Declaration”discriminants
Section titled “discriminants”readonly discriminants: readonly ["download_email"];readonly cases: { download_email: Schema.Struct<{ recipient: Schema.Literal<"customer">; trigger: Schema.Literal<"eligible_settlement">; type: Schema.tag<"download_email">; asset: Schema.Struct<{ key: Schema.brand<Schema.String, "DownloadAssetKey">; revision: Schema.brand<Schema.Int, "DefinitionRevision">; }>; }>;};cases.download_email
Section titled “cases.download_email”download_email: Schema.Struct<{ recipient: Schema.Literal<"customer">; trigger: Schema.Literal<"eligible_settlement">; type: Schema.tag<"download_email">; asset: Schema.Struct<{ key: Schema.brand<Schema.String, "DownloadAssetKey">; revision: Schema.brand<Schema.Int, "DefinitionRevision">; }>;}>;isAnyOf
Section titled “isAnyOf”readonly isAnyOf: <Keys>(keys) => (value) => value is Extract<{ recipient: "customer"; trigger: "eligible_settlement"; type: "download_email"; asset: { key: string & any; revision: number & any } }, { type: Keys }>;Type Parameters
Section titled “Type Parameters”Keys
Parameters
Section titled “Parameters”readonly Keys[]
Returns
Section titled “Returns”(value) => value is Extract<{ recipient: "customer"; trigger: "eligible_settlement"; type: "download_email"; asset: { key: string & any; revision: number & any } }, { type: Keys }>
guards
Section titled “guards”readonly guards: { download_email: (u) => u is { recipient: "customer"; trigger: "eligible_settlement"; type: "download_email"; asset: { key: string & any; revision: number & any } };};guards.download_email
Section titled “guards.download_email”download_email: (u) => u is { recipient: "customer"; trigger: "eligible_settlement"; type: "download_email"; asset: { key: string & any; revision: number & any } };Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”u is { recipient: "customer"; trigger: "eligible_settlement"; type: "download_email"; asset: { key: string & any; revision: number & any } }
readonly match: {<Cases> (value, cases): Cases[keyof Cases] extends (value) => R ? any : never;<Cases> (cases): (value) => Cases[keyof Cases] extends (value) => R ? any : never;};Call Signature
Section titled “Call Signature”<Cases>(value, cases): Cases[keyof Cases] extends (value) => R ? any : never;Type Parameters
Section titled “Type Parameters”Cases extends {
[key: string]: (value) => any;
}
Parameters
Section titled “Parameters”recipient
Section titled “recipient”"customer"
trigger
Section titled “trigger”"eligible_settlement"
"download_email"
{
key: string & any;
revision: number & any;
}
asset.key
Section titled “asset.key”string & any
asset.revision
Section titled “asset.revision”number & any
Cases
Returns
Section titled “Returns”Cases[keyof Cases] extends (value) => R ? any : never
Call Signature
Section titled “Call Signature”<Cases>(cases): (value) => Cases[keyof Cases] extends (value) => R ? any : never;Type Parameters
Section titled “Type Parameters”Cases extends {
[key: string]: (value) => any;
}
Parameters
Section titled “Parameters”Cases
Returns
Section titled “Returns”(value) => Cases[keyof Cases] extends (value) => R ? any : never
Type Declaration
Section titled “Type Declaration”customer
Section titled “customer”customer: (input) => Effect.Effect<typeof DownloadEmailBenefit.Type, Schema.SchemaError>;Parses customer download email delivery with its fixed recipient and trigger.
Parameters
Section titled “Parameters”Omit<typeof DownloadEmailBenefit.Encoded, "type" | "recipient" | "trigger">
Returns
Section titled “Returns”Effect.Effect<typeof DownloadEmailBenefit.Type, Schema.SchemaError>