@superdurable/connector-amazon-ses 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,7 +2,74 @@ import {
2
2
  ConfigSchema,
3
3
  Connection,
4
4
  ConnectorID,
5
+ CreateCustomVerificationEmailTemplateBranch,
6
+ CreateCustomVerificationEmailTemplateBranchCreated,
7
+ CreateCustomVerificationEmailTemplateBranchDefect,
8
+ CreateCustomVerificationEmailTemplateBranchProviderRejected,
9
+ CreateCustomVerificationEmailTemplateBranchUncertain,
10
+ CreateCustomVerificationEmailTemplateDefinition,
11
+ CreateCustomVerificationEmailTemplateInputSchema,
12
+ CreateCustomVerificationEmailTemplateMetadata,
13
+ CreateEmailIdentityBranch,
14
+ CreateEmailIdentityBranchCreated,
15
+ CreateEmailIdentityBranchDefect,
16
+ CreateEmailIdentityBranchProviderRejected,
17
+ CreateEmailIdentityBranchUncertain,
18
+ CreateEmailIdentityDefinition,
19
+ CreateEmailIdentityInputSchema,
20
+ CreateEmailIdentityMetadata,
21
+ CreateEmailTemplateBranch,
22
+ CreateEmailTemplateBranchCreated,
23
+ CreateEmailTemplateBranchDefect,
24
+ CreateEmailTemplateBranchProviderRejected,
25
+ CreateEmailTemplateBranchUncertain,
26
+ CreateEmailTemplateDefinition,
27
+ CreateEmailTemplateInputSchema,
28
+ CreateEmailTemplateMetadata,
29
+ CreatedEmailIdentitySchema,
30
+ CredentialMaterialError,
31
+ CustomVerificationEmailTemplatePageSchema,
32
+ CustomVerificationEmailTemplateSchema,
33
+ CustomVerificationEmailTemplateSummarySchema,
34
+ DeleteCustomVerificationEmailTemplateBranch,
35
+ DeleteCustomVerificationEmailTemplateBranchDefect,
36
+ DeleteCustomVerificationEmailTemplateBranchDeleted,
37
+ DeleteCustomVerificationEmailTemplateBranchProviderRejected,
38
+ DeleteCustomVerificationEmailTemplateDefinition,
39
+ DeleteCustomVerificationEmailTemplateInputSchema,
40
+ DeleteCustomVerificationEmailTemplateMetadata,
41
+ DeleteEmailIdentityBranch,
42
+ DeleteEmailIdentityBranchDefect,
43
+ DeleteEmailIdentityBranchDeleted,
44
+ DeleteEmailIdentityBranchProviderRejected,
45
+ DeleteEmailIdentityDefinition,
46
+ DeleteEmailIdentityInputSchema,
47
+ DeleteEmailIdentityMetadata,
48
+ DeleteEmailTemplateBranch,
49
+ DeleteEmailTemplateBranchDefect,
50
+ DeleteEmailTemplateBranchDeleted,
51
+ DeleteEmailTemplateBranchProviderRejected,
52
+ DeleteEmailTemplateDefinition,
53
+ DeleteEmailTemplateInputSchema,
54
+ DeleteEmailTemplateMetadata,
55
+ DeletedEmailIdentitySchema,
56
+ DeletedEmailTemplateSchema,
5
57
  EmailIdentityDetailsSchema,
58
+ EmailIdentityPageSchema,
59
+ EmailIdentitySummarySchema,
60
+ EmailTemplateContentSchema,
61
+ EmailTemplatePageSchema,
62
+ EmailTemplateSchema,
63
+ EmailTemplateSummarySchema,
64
+ GetCustomVerificationEmailTemplateBranch,
65
+ GetCustomVerificationEmailTemplateBranchDefect,
66
+ GetCustomVerificationEmailTemplateBranchFound,
67
+ GetCustomVerificationEmailTemplateBranchInvalidResponse,
68
+ GetCustomVerificationEmailTemplateBranchMissing,
69
+ GetCustomVerificationEmailTemplateBranchProviderRejected,
70
+ GetCustomVerificationEmailTemplateDefinition,
71
+ GetCustomVerificationEmailTemplateInputSchema,
72
+ GetCustomVerificationEmailTemplateMetadata,
6
73
  GetEmailIdentityBranch,
7
74
  GetEmailIdentityBranchDefect,
8
75
  GetEmailIdentityBranchFound,
@@ -12,24 +79,254 @@ import {
12
79
  GetEmailIdentityDefinition,
13
80
  GetEmailIdentityInputSchema,
14
81
  GetEmailIdentityMetadata,
82
+ GetEmailTemplateBranch,
83
+ GetEmailTemplateBranchDefect,
84
+ GetEmailTemplateBranchFound,
85
+ GetEmailTemplateBranchInvalidResponse,
86
+ GetEmailTemplateBranchMissing,
87
+ GetEmailTemplateBranchProviderRejected,
88
+ GetEmailTemplateDefinition,
89
+ GetEmailTemplateInputSchema,
90
+ GetEmailTemplateMetadata,
91
+ ListCustomVerificationEmailTemplatesBranch,
92
+ ListCustomVerificationEmailTemplatesBranchDefect,
93
+ ListCustomVerificationEmailTemplatesBranchInvalidResponse,
94
+ ListCustomVerificationEmailTemplatesBranchPage,
95
+ ListCustomVerificationEmailTemplatesBranchProviderRejected,
96
+ ListCustomVerificationEmailTemplatesDefinition,
97
+ ListCustomVerificationEmailTemplatesInputSchema,
98
+ ListCustomVerificationEmailTemplatesMetadata,
99
+ ListEmailIdentitiesBranch,
100
+ ListEmailIdentitiesBranchDefect,
101
+ ListEmailIdentitiesBranchInvalidResponse,
102
+ ListEmailIdentitiesBranchPage,
103
+ ListEmailIdentitiesBranchProviderRejected,
104
+ ListEmailIdentitiesDefinition,
105
+ ListEmailIdentitiesInputSchema,
106
+ ListEmailIdentitiesMetadata,
107
+ ListEmailTemplatesBranch,
108
+ ListEmailTemplatesBranchDefect,
109
+ ListEmailTemplatesBranchInvalidResponse,
110
+ ListEmailTemplatesBranchPage,
111
+ ListEmailTemplatesBranchProviderRejected,
112
+ ListEmailTemplatesDefinition,
113
+ ListEmailTemplatesInputSchema,
114
+ ListEmailTemplatesMetadata,
15
115
  ProviderID,
116
+ SendCustomVerificationEmailBranch,
117
+ SendCustomVerificationEmailBranchDefect,
118
+ SendCustomVerificationEmailBranchProviderRejected,
119
+ SendCustomVerificationEmailBranchSent,
120
+ SendCustomVerificationEmailBranchUncertain,
121
+ SendCustomVerificationEmailDefinition,
122
+ SendCustomVerificationEmailInputSchema,
123
+ SendCustomVerificationEmailMetadata,
124
+ SendEmailBranch,
125
+ SendEmailBranchDefect,
126
+ SendEmailBranchProviderRejected,
127
+ SendEmailBranchSent,
128
+ SendEmailBranchUncertain,
129
+ SendEmailDefinition,
130
+ SendEmailInputSchema,
131
+ SendEmailMetadata,
132
+ SendTemplatedEmailBranch,
133
+ SendTemplatedEmailBranchDefect,
134
+ SendTemplatedEmailBranchProviderRejected,
135
+ SendTemplatedEmailBranchSent,
136
+ SendTemplatedEmailBranchUncertain,
137
+ SendTemplatedEmailDefinition,
138
+ SendTemplatedEmailInputSchema,
139
+ SendTemplatedEmailMetadata,
140
+ SentEmailSchema,
141
+ UpdateCustomVerificationEmailTemplateBranch,
142
+ UpdateCustomVerificationEmailTemplateBranchDefect,
143
+ UpdateCustomVerificationEmailTemplateBranchProviderRejected,
144
+ UpdateCustomVerificationEmailTemplateBranchUpdated,
145
+ UpdateCustomVerificationEmailTemplateDefinition,
146
+ UpdateCustomVerificationEmailTemplateInputSchema,
147
+ UpdateCustomVerificationEmailTemplateMetadata,
148
+ UpdateEmailTemplateBranch,
149
+ UpdateEmailTemplateBranchDefect,
150
+ UpdateEmailTemplateBranchProviderRejected,
151
+ UpdateEmailTemplateBranchUpdated,
152
+ UpdateEmailTemplateDefinition,
153
+ UpdateEmailTemplateInputSchema,
154
+ UpdateEmailTemplateMetadata,
16
155
  decodeCredentials,
156
+ isCredentialMaterialError,
17
157
  newConnection,
18
158
  newConnectionWithOperations,
19
159
  newProjectConnection
20
- } from "./chunk-6NP3EK7O.js";
160
+ } from "./chunk-WYO3XI32.js";
21
161
 
22
162
  // src/generated/steps.ts
23
- import { goToBranch, newQueryStep } from "@superdurable/connectors-sdk";
163
+ import { goToBranch, newMutationStep, newQueryStep } from "@superdurable/connectors-sdk";
164
+ function newCreateEmailIdentityStep(configuration) {
165
+ const { connection, connectionName, created, providerRejected, uncertain, defect: defect2, ...stepConfiguration } = configuration;
166
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
167
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.createEmailIdentity(), connection: connection.reference, branches: [
168
+ goToBranch("created", created),
169
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
170
+ ...uncertain ? [goToBranch("uncertain", uncertain)] : [],
171
+ ...defect2 ? [goToBranch("defect", defect2)] : []
172
+ ] });
173
+ }
24
174
  function newGetEmailIdentityStep(configuration) {
25
- const { connection, connectionName, found, missing, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
175
+ const { connection, connectionName, found, missing, providerRejected, invalidResponse, defect: defect2, ...stepConfiguration } = configuration;
26
176
  if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
27
177
  return newQueryStep({ ...stepConfiguration, operation: connection.operations.getEmailIdentity(), connection: connection.reference, branches: [
28
178
  goToBranch("found", found),
29
179
  ...missing ? [goToBranch("missing", missing)] : [],
30
180
  ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
31
181
  ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
32
- ...defect ? [goToBranch("defect", defect)] : []
182
+ ...defect2 ? [goToBranch("defect", defect2)] : []
183
+ ] });
184
+ }
185
+ function newListEmailIdentitiesStep(configuration) {
186
+ const { connection, connectionName, page: page2, providerRejected, invalidResponse, defect: defect2, ...stepConfiguration } = configuration;
187
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
188
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.listEmailIdentities(), connection: connection.reference, branches: [
189
+ goToBranch("page", page2),
190
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
191
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
192
+ ...defect2 ? [goToBranch("defect", defect2)] : []
193
+ ] });
194
+ }
195
+ function newDeleteEmailIdentityStep(configuration) {
196
+ const { connection, connectionName, deleted, providerRejected, defect: defect2, maxSends, ...stepConfiguration } = configuration;
197
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
198
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.deleteEmailIdentity(), connection: connection.reference, branches: [
199
+ goToBranch("deleted", deleted),
200
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
201
+ ...defect2 ? [goToBranch("defect", defect2)] : []
202
+ ] });
203
+ }
204
+ function newSendEmailStep(configuration) {
205
+ const { connection, connectionName, sent: sent2, providerRejected, uncertain, defect: defect2, ...stepConfiguration } = configuration;
206
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
207
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.sendEmail(), connection: connection.reference, branches: [
208
+ goToBranch("sent", sent2),
209
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
210
+ ...uncertain ? [goToBranch("uncertain", uncertain)] : [],
211
+ ...defect2 ? [goToBranch("defect", defect2)] : []
212
+ ] });
213
+ }
214
+ function newCreateEmailTemplateStep(configuration) {
215
+ const { connection, connectionName, created, providerRejected, uncertain, defect: defect2, ...stepConfiguration } = configuration;
216
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
217
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.createEmailTemplate(), connection: connection.reference, branches: [
218
+ goToBranch("created", created),
219
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
220
+ ...uncertain ? [goToBranch("uncertain", uncertain)] : [],
221
+ ...defect2 ? [goToBranch("defect", defect2)] : []
222
+ ] });
223
+ }
224
+ function newGetEmailTemplateStep(configuration) {
225
+ const { connection, connectionName, found, missing, providerRejected, invalidResponse, defect: defect2, ...stepConfiguration } = configuration;
226
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
227
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.getEmailTemplate(), connection: connection.reference, branches: [
228
+ goToBranch("found", found),
229
+ ...missing ? [goToBranch("missing", missing)] : [],
230
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
231
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
232
+ ...defect2 ? [goToBranch("defect", defect2)] : []
233
+ ] });
234
+ }
235
+ function newListEmailTemplatesStep(configuration) {
236
+ const { connection, connectionName, page: page2, providerRejected, invalidResponse, defect: defect2, ...stepConfiguration } = configuration;
237
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
238
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.listEmailTemplates(), connection: connection.reference, branches: [
239
+ goToBranch("page", page2),
240
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
241
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
242
+ ...defect2 ? [goToBranch("defect", defect2)] : []
243
+ ] });
244
+ }
245
+ function newUpdateEmailTemplateStep(configuration) {
246
+ const { connection, connectionName, updated, providerRejected, defect: defect2, maxSends, ...stepConfiguration } = configuration;
247
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
248
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.updateEmailTemplate(), connection: connection.reference, branches: [
249
+ goToBranch("updated", updated),
250
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
251
+ ...defect2 ? [goToBranch("defect", defect2)] : []
252
+ ] });
253
+ }
254
+ function newDeleteEmailTemplateStep(configuration) {
255
+ const { connection, connectionName, deleted, providerRejected, defect: defect2, maxSends, ...stepConfiguration } = configuration;
256
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
257
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.deleteEmailTemplate(), connection: connection.reference, branches: [
258
+ goToBranch("deleted", deleted),
259
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
260
+ ...defect2 ? [goToBranch("defect", defect2)] : []
261
+ ] });
262
+ }
263
+ function newSendTemplatedEmailStep(configuration) {
264
+ const { connection, connectionName, sent: sent2, providerRejected, uncertain, defect: defect2, ...stepConfiguration } = configuration;
265
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
266
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.sendTemplatedEmail(), connection: connection.reference, branches: [
267
+ goToBranch("sent", sent2),
268
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
269
+ ...uncertain ? [goToBranch("uncertain", uncertain)] : [],
270
+ ...defect2 ? [goToBranch("defect", defect2)] : []
271
+ ] });
272
+ }
273
+ function newCreateCustomVerificationEmailTemplateStep(configuration) {
274
+ const { connection, connectionName, created, providerRejected, uncertain, defect: defect2, ...stepConfiguration } = configuration;
275
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
276
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.createCustomVerificationEmailTemplate(), connection: connection.reference, branches: [
277
+ goToBranch("created", created),
278
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
279
+ ...uncertain ? [goToBranch("uncertain", uncertain)] : [],
280
+ ...defect2 ? [goToBranch("defect", defect2)] : []
281
+ ] });
282
+ }
283
+ function newGetCustomVerificationEmailTemplateStep(configuration) {
284
+ const { connection, connectionName, found, missing, providerRejected, invalidResponse, defect: defect2, ...stepConfiguration } = configuration;
285
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
286
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.getCustomVerificationEmailTemplate(), connection: connection.reference, branches: [
287
+ goToBranch("found", found),
288
+ ...missing ? [goToBranch("missing", missing)] : [],
289
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
290
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
291
+ ...defect2 ? [goToBranch("defect", defect2)] : []
292
+ ] });
293
+ }
294
+ function newListCustomVerificationEmailTemplatesStep(configuration) {
295
+ const { connection, connectionName, page: page2, providerRejected, invalidResponse, defect: defect2, ...stepConfiguration } = configuration;
296
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
297
+ return newQueryStep({ ...stepConfiguration, operation: connection.operations.listCustomVerificationEmailTemplates(), connection: connection.reference, branches: [
298
+ goToBranch("page", page2),
299
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
300
+ ...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
301
+ ...defect2 ? [goToBranch("defect", defect2)] : []
302
+ ] });
303
+ }
304
+ function newUpdateCustomVerificationEmailTemplateStep(configuration) {
305
+ const { connection, connectionName, updated, providerRejected, defect: defect2, maxSends, ...stepConfiguration } = configuration;
306
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
307
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.updateCustomVerificationEmailTemplate(), connection: connection.reference, branches: [
308
+ goToBranch("updated", updated),
309
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
310
+ ...defect2 ? [goToBranch("defect", defect2)] : []
311
+ ] });
312
+ }
313
+ function newDeleteCustomVerificationEmailTemplateStep(configuration) {
314
+ const { connection, connectionName, deleted, providerRejected, defect: defect2, maxSends, ...stepConfiguration } = configuration;
315
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
316
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.deleteCustomVerificationEmailTemplate(), connection: connection.reference, branches: [
317
+ goToBranch("deleted", deleted),
318
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
319
+ ...defect2 ? [goToBranch("defect", defect2)] : []
320
+ ] });
321
+ }
322
+ function newSendCustomVerificationEmailStep(configuration) {
323
+ const { connection, connectionName, sent: sent2, providerRejected, uncertain, defect: defect2, ...stepConfiguration } = configuration;
324
+ if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
325
+ return newMutationStep({ ...stepConfiguration, operation: connection.operations.sendCustomVerificationEmail(), connection: connection.reference, branches: [
326
+ goToBranch("sent", sent2),
327
+ ...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
328
+ ...uncertain ? [goToBranch("uncertain", uncertain)] : [],
329
+ ...defect2 ? [goToBranch("defect", defect2)] : []
33
330
  ] });
34
331
  }
35
332
 
@@ -39,8 +336,653 @@ import { z } from "zod";
39
336
 
40
337
  // src/client.ts
41
338
  import { createHash, createHmac } from "crypto";
42
- import { SecretString, newQueryBranch, newQueryRetry } from "@superdurable/connectors-sdk";
43
- import { BodyTooLargeError, isHeaderSafeCredential, parseRetryAfter, sendProviderRequest, validateBaseURL } from "@superdurable/connectors-sdk/providerhttp";
339
+ import { SecretString, newQueryBranch as newQueryBranch2, newQueryRetry as newQueryRetry2 } from "@superdurable/connectors-sdk";
340
+ import { BodyTooLargeError, ProviderStalledError, ProviderTransportError, isHeaderSafeCredential, parseRetryAfter, sendProviderRequest, validateBaseURL } from "@superdurable/connectors-sdk/providerhttp";
341
+
342
+ // src/management.ts
343
+ import {
344
+ definitionMaxSends,
345
+ newMutationBranch,
346
+ newMutationRetry,
347
+ newMutationUncertain,
348
+ newQueryBranch,
349
+ newQueryRetry
350
+ } from "@superdurable/connectors-sdk";
351
+ import { encodeQueryValues } from "@superdurable/connectors-sdk/providerhttp";
352
+ import { CheckpointError, DispatchNotAllowedError, InsufficientTimeError, newFence } from "@superdurable/connectors-sdk/singledispatch";
353
+ var identityPattern = /^[A-Za-z0-9._+@-]{1,254}(?![\s\S])/;
354
+ var namePattern = /^[A-Za-z0-9_-]{1,64}(?![\s\S])/;
355
+ var emailPattern = /^[^\t\n\f\r @]+@[^\t\n\f\r @]+\.[^\t\n\f\r @]+(?![\s\S])/;
356
+ var identitiesPath = "/v2/email/identities";
357
+ var templatesPath = "/v2/email/templates";
358
+ var customTemplatesPath = "/v2/email/custom-verification-email-templates";
359
+ var outboundPath = "/v2/email/outbound-emails";
360
+ var refusalStatuses = /* @__PURE__ */ new Set([400, 401, 403, 404, 411, 413, 414, 415, 422]);
361
+ var verificationStatuses = /* @__PURE__ */ new Set(["PENDING", "SUCCESS", "FAILED", "TEMPORARY_FAILURE", "NOT_STARTED"]);
362
+ var emptyEmail = () => ({ messageId: "" });
363
+ var emptyTemplate = () => ({ name: "", content: { subject: "" } });
364
+ var emptyVerification = () => ({
365
+ name: "",
366
+ fromEmailAddress: "",
367
+ subject: "",
368
+ content: "",
369
+ successRedirectionURL: "",
370
+ failureRedirectionURL: ""
371
+ });
372
+ var htmlEscapes = {
373
+ "<": "\\u003c",
374
+ ">": "\\u003e",
375
+ "&": "\\u0026",
376
+ "\u2028": "\\u2028",
377
+ "\u2029": "\\u2029"
378
+ };
379
+ var SESQuery = class {
380
+ /** Bind the provider client. */
381
+ constructor(client) {
382
+ this.client = client;
383
+ }
384
+ client;
385
+ /** Return the generated query definition. */
386
+ definition() {
387
+ return this.contract;
388
+ }
389
+ };
390
+ var SESMutation = class {
391
+ /** Bind the provider client. */
392
+ constructor(client) {
393
+ this.client = client;
394
+ }
395
+ client;
396
+ /** Return the generated mutation definition. */
397
+ definition() {
398
+ return this.contract;
399
+ }
400
+ /** Use the same invocation identity across all attempts. */
401
+ idempotencyKey(callID) {
402
+ return callID;
403
+ }
404
+ };
405
+ var CreateEmailIdentityOperation = class extends SESMutation {
406
+ contract = CreateEmailIdentityDefinition;
407
+ /** Submit a fenced identity request. */
408
+ async invoke(call, input) {
409
+ const name = input.emailIdentity;
410
+ const empty = { name: "", identityType: "", verifiedForSending: false };
411
+ if (!identityPattern.test(name)) return defect(call, empty, "SES email identity name is invalid");
412
+ return limited(
413
+ this.client,
414
+ call,
415
+ this.contract,
416
+ identitiesPath,
417
+ { EmailIdentity: name },
418
+ "created",
419
+ empty,
420
+ empty,
421
+ (value) => createdIdentity(name, value),
422
+ "identity creation"
423
+ );
424
+ }
425
+ };
426
+ var ListEmailIdentitiesOperation = class extends SESQuery {
427
+ contract = ListEmailIdentitiesDefinition;
428
+ /** Return one identity page and its continuation token. */
429
+ async invoke(call, input) {
430
+ const empty = { identities: [] };
431
+ const count = input.pageSize || 100;
432
+ const token = input.nextToken ?? "";
433
+ if (!validPage(count, token, 1e3)) return queryDefect(call, empty, "SES identity page size or token is invalid");
434
+ const payload = { ...token ? { NextToken: token } : {}, PageSize: count };
435
+ return read(this.client, call, "/v2/email/list-identities", empty, "page", (value) => {
436
+ const { items, nextToken } = page(value, "EmailIdentities", count);
437
+ const identities = items.map((item) => {
438
+ const name = text(item, "IdentityName");
439
+ const identityType = text(item, "IdentityType");
440
+ const verificationStatus = text(item, "VerificationStatus");
441
+ if (!identityPattern.test(name) || !["EMAIL_ADDRESS", "DOMAIN"].includes(identityType) || !verificationStatuses.has(verificationStatus)) throw new TypeError("invalid identity");
442
+ return { name, identityType, verificationStatus, sendingEnabled: flag(item, "SendingEnabled") };
443
+ });
444
+ return { identities, ...nextToken };
445
+ }, { payload });
446
+ }
447
+ };
448
+ var DeleteEmailIdentityOperation = class extends SESMutation {
449
+ contract = DeleteEmailIdentityDefinition;
450
+ /** Treat an absent identity as deleted. */
451
+ async invoke(call, input) {
452
+ const name = input.emailIdentity;
453
+ if (!identityPattern.test(name)) return defect(call, { name: "" }, "SES email identity name is invalid");
454
+ const value = { name };
455
+ return safeWrite(
456
+ this.client,
457
+ call,
458
+ "DELETE",
459
+ identitiesPath + "/" + identityPathSegment(name),
460
+ "deleted",
461
+ value,
462
+ value,
463
+ name,
464
+ { accepted: [200, 204, 404] }
465
+ );
466
+ }
467
+ };
468
+ var SendEmailOperation = class extends SESMutation {
469
+ contract = SendEmailDefinition;
470
+ /** Return the provider message ID when SES acknowledges the email. */
471
+ async invoke(call, input) {
472
+ if (!emailPattern.test(input.fromEmailAddress) || !emailPattern.test(input.toEmailAddress) || !validSubject(input.subject) || !input.textBody || !isValidUTF8(input.textBody) || size(input.textBody) > 100 * 1024)
473
+ return defect(call, emptyEmail(), "SES sender, recipient, subject, or text body is invalid");
474
+ const payload = {
475
+ FromEmailAddress: input.fromEmailAddress,
476
+ Destination: { ToAddresses: [input.toEmailAddress] },
477
+ Content: { Simple: {
478
+ Subject: { Data: input.subject, Charset: "UTF-8" },
479
+ Body: { Text: { Data: input.textBody, Charset: "UTF-8" } }
480
+ } }
481
+ };
482
+ return limited(
483
+ this.client,
484
+ call,
485
+ this.contract,
486
+ outboundPath,
487
+ payload,
488
+ "sent",
489
+ emptyEmail(),
490
+ emptyEmail(),
491
+ sent,
492
+ "send",
493
+ true
494
+ );
495
+ }
496
+ };
497
+ var CreateEmailTemplateOperation = class extends SESMutation {
498
+ contract = CreateEmailTemplateDefinition;
499
+ /** Return the submitted template when SES acknowledges creation. */
500
+ async invoke(call, input) {
501
+ if (!namePattern.test(input.templateName) || !validContent(input.content))
502
+ return defect(call, emptyTemplate(), "SES template name or content is invalid");
503
+ const value = { name: input.templateName, content: input.content };
504
+ const payload = { TemplateName: value.name, TemplateContent: contentWire(value.content) };
505
+ return limited(
506
+ this.client,
507
+ call,
508
+ this.contract,
509
+ templatesPath,
510
+ payload,
511
+ "created",
512
+ emptyTemplate(),
513
+ value,
514
+ () => ({ value, id: value.name }),
515
+ "template creation",
516
+ true
517
+ );
518
+ }
519
+ };
520
+ var GetEmailTemplateOperation = class extends SESQuery {
521
+ contract = GetEmailTemplateDefinition;
522
+ /** Return the stored template or route an absent name to missing. */
523
+ async invoke(call, input) {
524
+ const name = input.templateName;
525
+ if (!namePattern.test(name)) return queryDefect(call, emptyTemplate(), "SES template name is invalid");
526
+ return read(this.client, call, templatesPath + "/" + name, emptyTemplate(), "found", (value) => {
527
+ const wire = object(value);
528
+ const returned = text(wire, "TemplateName");
529
+ if (returned && returned !== name) throw new TypeError("SES returned another template");
530
+ const fields = object(wire.TemplateContent);
531
+ const subject = text(fields, "Subject");
532
+ const body = text(fields, "Text");
533
+ const html = text(fields, "Html");
534
+ const content = { subject, ...body ? { text: body } : {}, ...html ? { html } : {} };
535
+ if (!validContent(content)) throw new TypeError("SES returned invalid template content");
536
+ return { name, content };
537
+ }, { missing: true });
538
+ }
539
+ };
540
+ var ListEmailTemplatesOperation = class extends SESQuery {
541
+ contract = ListEmailTemplatesDefinition;
542
+ /** Return template names and UTC creation times. */
543
+ async invoke(call, input) {
544
+ const empty = { templates: [] };
545
+ const count = input.pageSize || 10;
546
+ const token = input.nextToken ?? "";
547
+ if (!validPage(count, token, 100)) return queryDefect(call, empty, "SES template page size or token is invalid");
548
+ return read(this.client, call, pagePath(templatesPath, count, token), empty, "page", (value) => {
549
+ const { items, nextToken } = page(value, "TemplatesMetadata", count);
550
+ const templates = items.map((item) => {
551
+ const name = text(item, "TemplateName");
552
+ const timestamp = item.CreatedTimestamp;
553
+ if (!namePattern.test(name) || typeof timestamp !== "number" || !(timestamp > 0 && timestamp <= 1e11))
554
+ throw new TypeError("SES returned invalid template metadata");
555
+ const createdAt = new Date(Math.trunc(timestamp) * 1e3).toISOString().replace(".000Z", "Z");
556
+ return { name, createdAt };
557
+ });
558
+ return { templates, ...nextToken };
559
+ });
560
+ }
561
+ };
562
+ var UpdateEmailTemplateOperation = class extends SESMutation {
563
+ contract = UpdateEmailTemplateDefinition;
564
+ /** Return the replacement when SES acknowledges the write. */
565
+ async invoke(call, input) {
566
+ if (!namePattern.test(input.templateName) || !validContent(input.content))
567
+ return defect(call, emptyTemplate(), "SES template name or content is invalid");
568
+ const value = { name: input.templateName, content: input.content };
569
+ return safeWrite(
570
+ this.client,
571
+ call,
572
+ "PUT",
573
+ templatesPath + "/" + value.name,
574
+ "updated",
575
+ emptyTemplate(),
576
+ value,
577
+ value.name,
578
+ { payload: { TemplateContent: contentWire(value.content) } }
579
+ );
580
+ }
581
+ };
582
+ var DeleteEmailTemplateOperation = class extends SESMutation {
583
+ contract = DeleteEmailTemplateDefinition;
584
+ /** Treat a missing template as deleted. */
585
+ async invoke(call, input) {
586
+ return deleteTemplate(this.client, call, templatesPath, input.templateName);
587
+ }
588
+ };
589
+ var SendTemplatedEmailOperation = class extends SESMutation {
590
+ contract = SendTemplatedEmailDefinition;
591
+ /** Return the message ID from an acknowledged templated send. */
592
+ async invoke(call, input) {
593
+ const data = Object.entries(input.templateData ?? {});
594
+ if (!emailPattern.test(input.fromEmailAddress) || !emailPattern.test(input.toEmailAddress) || !namePattern.test(input.templateName) || data.length > 100 || data.some(([key, value]) => !isValidUTF8(key) || !isValidUTF8(value)))
595
+ return defect(call, emptyEmail(), "SES sender, recipient, template name, or data is invalid");
596
+ data.sort(([left], [right]) => Buffer.compare(Buffer.from(left), Buffer.from(right)));
597
+ const templateData = "{" + data.map(([key, value]) => json(key) + ":" + json(value)).join(",") + "}";
598
+ if (size(templateData) > 100 * 1024) return defect(call, emptyEmail(), "SES template data exceeds 100 KiB");
599
+ const payload = {
600
+ FromEmailAddress: input.fromEmailAddress,
601
+ Destination: { ToAddresses: [input.toEmailAddress] },
602
+ Content: { Template: { TemplateName: input.templateName, TemplateData: templateData } }
603
+ };
604
+ return limited(
605
+ this.client,
606
+ call,
607
+ this.contract,
608
+ outboundPath,
609
+ payload,
610
+ "sent",
611
+ emptyEmail(),
612
+ emptyEmail(),
613
+ sent,
614
+ "templated send",
615
+ true
616
+ );
617
+ }
618
+ };
619
+ var CreateCustomVerificationEmailTemplateOperation = class extends SESMutation {
620
+ contract = CreateCustomVerificationEmailTemplateDefinition;
621
+ /** Return the verification template when SES acknowledges creation. */
622
+ async invoke(call, input) {
623
+ const value = input.template;
624
+ if (!validVerification(value)) return defect(call, emptyVerification(), "SES verification template is invalid");
625
+ return limited(
626
+ this.client,
627
+ call,
628
+ this.contract,
629
+ customTemplatesPath,
630
+ verificationWire(value, true),
631
+ "created",
632
+ emptyVerification(),
633
+ value,
634
+ () => ({ value, id: value.name }),
635
+ "verification template creation",
636
+ true
637
+ );
638
+ }
639
+ };
640
+ var GetCustomVerificationEmailTemplateOperation = class extends SESQuery {
641
+ contract = GetCustomVerificationEmailTemplateDefinition;
642
+ /** Return the saved template or route an absent name to missing. */
643
+ async invoke(call, input) {
644
+ const name = input.templateName;
645
+ if (!namePattern.test(name)) return queryDefect(call, emptyVerification(), "SES template name is invalid");
646
+ return read(this.client, call, customTemplatesPath + "/" + name, emptyVerification(), "found", (value) => {
647
+ const wire = object(value);
648
+ const returned = text(wire, "TemplateName");
649
+ if (returned && returned !== name) throw new TypeError("SES returned another template");
650
+ const template = { ...verificationSummary(wire, name), content: text(wire, "TemplateContent") };
651
+ if (!validVerification(template)) throw new TypeError("SES returned invalid verification template content");
652
+ return template;
653
+ }, { missing: true });
654
+ }
655
+ };
656
+ var ListCustomVerificationEmailTemplatesOperation = class extends SESQuery {
657
+ contract = ListCustomVerificationEmailTemplatesDefinition;
658
+ /** Return template metadata and the continuation token. */
659
+ async invoke(call, input) {
660
+ const empty = { templates: [] };
661
+ const count = input.pageSize || 10;
662
+ const token = input.nextToken ?? "";
663
+ if (!validPage(count, token, 50)) return queryDefect(call, empty, "SES template page size or token is invalid");
664
+ return read(this.client, call, pagePath(customTemplatesPath, count, token), empty, "page", (value) => {
665
+ const { items, nextToken } = page(value, "CustomVerificationEmailTemplates", count);
666
+ const templates = items.map((item) => {
667
+ const entry = verificationSummary(item, text(item, "TemplateName"));
668
+ if (!namePattern.test(entry.name) || !emailPattern.test(entry.fromEmailAddress))
669
+ throw new TypeError("SES returned invalid verification template metadata");
670
+ return entry;
671
+ });
672
+ return { templates, ...nextToken };
673
+ });
674
+ }
675
+ };
676
+ var UpdateCustomVerificationEmailTemplateOperation = class extends SESMutation {
677
+ contract = UpdateCustomVerificationEmailTemplateDefinition;
678
+ /** Return the replacement when SES acknowledges the write. */
679
+ async invoke(call, input) {
680
+ const value = input.template;
681
+ if (!validVerification(value)) return defect(call, emptyVerification(), "SES verification template is invalid");
682
+ return safeWrite(
683
+ this.client,
684
+ call,
685
+ "PUT",
686
+ customTemplatesPath + "/" + value.name,
687
+ "updated",
688
+ emptyVerification(),
689
+ value,
690
+ value.name,
691
+ { payload: verificationWire(value, false) }
692
+ );
693
+ }
694
+ };
695
+ var DeleteCustomVerificationEmailTemplateOperation = class extends SESMutation {
696
+ contract = DeleteCustomVerificationEmailTemplateDefinition;
697
+ /** Treat a missing template as deleted. */
698
+ async invoke(call, input) {
699
+ return deleteTemplate(this.client, call, customTemplatesPath, input.templateName);
700
+ }
701
+ };
702
+ var SendCustomVerificationEmailOperation = class extends SESMutation {
703
+ contract = SendCustomVerificationEmailDefinition;
704
+ /** Return the message ID from an acknowledged verification send. */
705
+ async invoke(call, input) {
706
+ const name = input.configurationSetName ?? "";
707
+ if (!emailPattern.test(input.emailAddress) || !namePattern.test(input.templateName) || !isValidUTF8(name) || size(name) > 64)
708
+ return defect(call, emptyEmail(), "SES verification recipient, template, or configuration set is invalid");
709
+ const payload = {
710
+ EmailAddress: input.emailAddress,
711
+ TemplateName: input.templateName,
712
+ ...name ? { ConfigurationSetName: name } : {}
713
+ };
714
+ return limited(
715
+ this.client,
716
+ call,
717
+ this.contract,
718
+ "/v2/email/outbound-custom-verification-emails",
719
+ payload,
720
+ "sent",
721
+ emptyEmail(),
722
+ emptyEmail(),
723
+ sent,
724
+ "verification send",
725
+ true
726
+ );
727
+ }
728
+ };
729
+ async function read(client, call, path, empty, branch, decode, options = {}) {
730
+ const response = await client.request(
731
+ call,
732
+ options.payload ? "POST" : "GET",
733
+ path,
734
+ options.payload ? json(options.payload) : void 0
735
+ );
736
+ if (response.error === "credential") return newQueryBranch(
737
+ "defect",
738
+ empty,
739
+ {},
740
+ failure(call, "AUTHENTICATION", "SES credentials are unavailable")
741
+ );
742
+ if (response.error === "request") return newQueryRetry(failure(call, "TRANSPORT", "SES query request failed"));
743
+ if (transient(response.status)) return newQueryRetry(
744
+ failure(call, retryKind(response.status), "SES request is temporarily unavailable"),
745
+ response.retryAfterMs
746
+ );
747
+ if (options.missing && response.status === 404) return newQueryBranch("missing", empty);
748
+ if (response.status !== 200) return newQueryBranch(
749
+ "providerRejected",
750
+ empty,
751
+ {},
752
+ failure(call, "PROVIDER_REJECTION", `SES rejected HTTP ${response.status}`)
753
+ );
754
+ if (response.error === "tooLarge") return newQueryBranch(
755
+ "invalidResponse",
756
+ empty,
757
+ {},
758
+ failure(call, "RESPONSE_TOO_LARGE", "SES response exceeded the configured limit")
759
+ );
760
+ if (response.error) return newQueryRetry(failure(call, "TRANSPORT", "SES response was interrupted"));
761
+ try {
762
+ return newQueryBranch(branch, decode(parse(response.body)));
763
+ } catch {
764
+ return newQueryBranch("invalidResponse", empty, {}, failure(call, "PROTOCOL", "SES returned invalid JSON"));
765
+ }
766
+ }
767
+ async function safeWrite(client, call, method, path, branch, empty, value, id, options = {}) {
768
+ const response = await client.request(call, method, path, options.payload ? json(options.payload) : void 0);
769
+ const attempt = call.context.attempt ?? 1;
770
+ if (response.error === "credential") {
771
+ const error = failure(call, "AUTHENTICATION", "SES credentials are unavailable");
772
+ return attempt > 1 ? newMutationRetry(error) : newMutationBranch("defect", empty, {}, error);
773
+ }
774
+ if (response.error === "request") return retry(call, "TRANSPORT", "SES request failed");
775
+ if (transient(response.status)) return retry(call, retryKind(response.status), "SES request is temporarily unavailable", response.retryAfterMs);
776
+ if (!response.error && (options.accepted ?? [200]).includes(response.status))
777
+ return newMutationBranch(branch, value, receipt(call, id));
778
+ if (attempt === 1 && definiteRefusal(response))
779
+ return mutationBranch(call, empty, "providerRejected", "PROVIDER_REJECTION", `SES rejected HTTP ${response.status}`);
780
+ return retry(call, "TRANSPORT", "SES write outcome is unknown");
781
+ }
782
+ function deleteTemplate(client, call, path, name) {
783
+ const empty = { name: "" };
784
+ if (!namePattern.test(name)) return Promise.resolve(defect(call, empty, "SES template name is invalid"));
785
+ return safeWrite(client, call, "DELETE", path + "/" + name, "deleted", empty, { name }, name, { accepted: [200, 404] });
786
+ }
787
+ async function limited(client, call, contract, path, payload, branch, empty, uncertain, decode, subject, reflectedIsProtocol = false) {
788
+ const maxSends = call.maxSendsOverride ?? definitionMaxSends(contract);
789
+ let fence;
790
+ try {
791
+ fence = newFence(call, contract.stepDefaults.executeMethodTimeoutMs, { maxSends });
792
+ } catch {
793
+ return mutationBranch(call, empty, "defect", "LOCAL_DEFECT", `SES ${subject} fence could not be initialized`);
794
+ }
795
+ const decision = await fence.decide();
796
+ if (decision.kind === "failClosed") return retry(call, "AVAILABILITY", `SES ${subject} checkpoint is unavailable`);
797
+ if (decision.kind === "readBackRequired") return newMutationUncertain(
798
+ uncertain,
799
+ failure(call, "TRANSPORT", `SES ${subject} could not be confirmed after the send cap`)
800
+ );
801
+ const priorSends = decision.priorSendUpperBound ?? 0;
802
+ const credentials = await client.signingCredentials(call);
803
+ if (!credentials) {
804
+ try {
805
+ await fence.recordNotSent();
806
+ } catch (error) {
807
+ if (!(error instanceof DispatchNotAllowedError)) return retry(call, "AVAILABILITY", "SES unsent checkpoint could not be recorded");
808
+ }
809
+ if (priorSends) return retry(call, "AUTHENTICATION", "SES credentials are unavailable after an earlier send");
810
+ return mutationBranch(call, empty, "defect", "AUTHENTICATION", "SES credentials are unavailable or invalid");
811
+ }
812
+ const unknown = (kind, message) => priorSends + 1 >= maxSends ? newMutationUncertain(uncertain, failure(call, kind, message)) : retry(call, kind, message);
813
+ let response;
814
+ try {
815
+ response = await fence.dispatch((signal) => client.request(call, "POST", path, json(payload), signal, credentials));
816
+ } catch (error) {
817
+ if (error instanceof CheckpointError || error instanceof DispatchNotAllowedError || error instanceof InsufficientTimeError)
818
+ return retry(call, "AVAILABILITY", `SES ${subject} dispatch checkpoint is unavailable`);
819
+ return unknown("TRANSPORT", `SES ${subject} outcome is unknown`);
820
+ }
821
+ if (response.status === 429 || response.status === 503) {
822
+ try {
823
+ await fence.recordCanResend();
824
+ } catch {
825
+ return retry(call, "AVAILABILITY", "SES resend checkpoint could not be recorded");
826
+ }
827
+ return retry(call, retryKind(response.status), "SES asked the connector to retry", response.retryAfterMs);
828
+ }
829
+ if (response.error === "credential" && reflectedIsProtocol)
830
+ return unknown("PROTOCOL", "SES response repeated a credential");
831
+ if (response.error || response.status === 408 || response.status >= 500)
832
+ return unknown("TRANSPORT", `SES ${subject} outcome is unknown`);
833
+ if (response.status !== 200) {
834
+ if (priorSends || !definiteRefusal(response)) return unknown("TRANSPORT", `SES ${subject} response is inconclusive`);
835
+ try {
836
+ await fence.recordCanResend();
837
+ } catch {
838
+ return retry(call, "AVAILABILITY", "SES refusal checkpoint is unavailable");
839
+ }
840
+ return mutationBranch(call, empty, "providerRejected", "PROVIDER_REJECTION", `SES rejected ${subject}`);
841
+ }
842
+ try {
843
+ const { value, id } = decode(response.body);
844
+ return newMutationBranch(branch, value, receipt(call, id));
845
+ } catch {
846
+ return unknown("PROTOCOL", `SES ${subject} response is invalid`);
847
+ }
848
+ }
849
+ function createdIdentity(name, body) {
850
+ const wire = object(parse(body));
851
+ const identityType = text(wire, "IdentityType");
852
+ const attributes = object(wire.DkimAttributes ?? {});
853
+ const tokens = attributes.Tokens ?? [];
854
+ if (!["DOMAIN", "EMAIL_ADDRESS"].includes(identityType) || !Array.isArray(tokens) || tokens.length > 3 || tokens.some((token) => typeof token !== "string" || !token || size(token) > 256))
855
+ throw new TypeError("SES returned invalid identity creation metadata");
856
+ const verifiedForSending = flag(wire, "VerifiedForSendingStatus");
857
+ return { id: name, value: { name, identityType, verifiedForSending, ...tokens.length ? { dkimTokens: tokens } : {} } };
858
+ }
859
+ function sent(body) {
860
+ const id = text(object(parse(body)), "MessageId");
861
+ if (!id || size(id) > 512) throw new TypeError("SES returned an invalid message ID");
862
+ return { id, value: { messageId: id } };
863
+ }
864
+ function validVerification(value) {
865
+ return namePattern.test(value.name) && emailPattern.test(value.fromEmailAddress) && validSubject(value.subject) && Boolean(value.content && isValidUTF8(value.content) && size(value.content) < 10 * 1024 * 1024 && [value.successRedirectionURL, value.failureRedirectionURL].every(absoluteURL));
866
+ }
867
+ function absoluteURL(value) {
868
+ if (!/^https?:\/\/[^/?#]+/i.test(value) || [...value].some((character) => character.charCodeAt(0) < 32 || character.charCodeAt(0) === 127)) return false;
869
+ try {
870
+ const parsed = new URL(value);
871
+ return Boolean(parsed.host && ["https:", "http:"].includes(parsed.protocol));
872
+ } catch {
873
+ return false;
874
+ }
875
+ }
876
+ function validContent(value) {
877
+ const parts = [value.text ?? "", value.html ?? ""];
878
+ return validSubject(value.subject) && parts.some(Boolean) && parts.every((part) => isValidUTF8(part) && size(part) <= 100 * 1024);
879
+ }
880
+ function validSubject(value) {
881
+ return Boolean(value && isValidUTF8(value) && size(value) <= 998 && !/[\r\n]/.test(value));
882
+ }
883
+ function verificationSummary(item, name) {
884
+ return {
885
+ name,
886
+ fromEmailAddress: text(item, "FromEmailAddress"),
887
+ subject: text(item, "TemplateSubject"),
888
+ successRedirectionURL: text(item, "SuccessRedirectionURL"),
889
+ failureRedirectionURL: text(item, "FailureRedirectionURL")
890
+ };
891
+ }
892
+ function verificationWire(value, includeName) {
893
+ return {
894
+ ...includeName ? { TemplateName: value.name } : {},
895
+ FromEmailAddress: value.fromEmailAddress,
896
+ TemplateSubject: value.subject,
897
+ TemplateContent: value.content,
898
+ SuccessRedirectionURL: value.successRedirectionURL,
899
+ FailureRedirectionURL: value.failureRedirectionURL
900
+ };
901
+ }
902
+ function contentWire(value) {
903
+ return { Subject: value.subject, ...value.text ? { Text: value.text } : {}, ...value.html ? { Html: value.html } : {} };
904
+ }
905
+ function json(value) {
906
+ return JSON.stringify(value).replace(/[<>&\u2028\u2029]/g, (character) => htmlEscapes[character]);
907
+ }
908
+ function parse(body) {
909
+ return JSON.parse(Buffer.from(body).toString("utf8"));
910
+ }
911
+ function validPage(count, token, maximum) {
912
+ return Number.isInteger(count) && count >= 1 && count <= maximum && isValidUTF8(token) && size(token) <= 4096 && !/[\r\n]/.test(token);
913
+ }
914
+ function pagePath(path, count, token) {
915
+ return path + "?" + encodeQueryValues({ PageSize: [String(count)], ...token ? { NextToken: [token] } : {} });
916
+ }
917
+ function page(value, key, count) {
918
+ const response = object(value);
919
+ const items = response[key];
920
+ const token = text(response, "NextToken");
921
+ if (!Array.isArray(items) || items.length > count || size(token) > 4096) throw new TypeError("SES returned invalid page");
922
+ return { items: items.map(object), nextToken: token ? { nextToken: token } : {} };
923
+ }
924
+ function object(value) {
925
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new TypeError("SES response is missing an object");
926
+ return value;
927
+ }
928
+ function text(value, key) {
929
+ const item = value[key] ?? "";
930
+ if (typeof item !== "string") throw new TypeError("SES returned invalid text");
931
+ return item;
932
+ }
933
+ function flag(value, key) {
934
+ const item = value[key] ?? false;
935
+ if (typeof item !== "boolean") throw new TypeError("SES returned an invalid boolean");
936
+ return item;
937
+ }
938
+ function size(value) {
939
+ return Buffer.byteLength(value);
940
+ }
941
+ function isValidUTF8(value) {
942
+ return !/[\uD800-\uDFFF]/u.test(value);
943
+ }
944
+ function transient(status) {
945
+ return status === 408 || status === 429 || status >= 500;
946
+ }
947
+ function retryKind(status) {
948
+ return status === 429 ? "RATE_LIMIT" : "AVAILABILITY";
949
+ }
950
+ function definiteRefusal(response) {
951
+ if (!refusalStatuses.has(response.status)) return false;
952
+ try {
953
+ const wire = object(parse(response.body));
954
+ const type = text(wire, "__type");
955
+ const code = text(wire, "code");
956
+ return Boolean(type || code);
957
+ } catch {
958
+ return false;
959
+ }
960
+ }
961
+ function failure(call, kind, message) {
962
+ return { provider: "amazon-ses", operation: call.operation.operationId, kind, message };
963
+ }
964
+ function receipt(call, id) {
965
+ return {
966
+ provider: "amazon-ses",
967
+ callId: call.id,
968
+ providerObjectId: id,
969
+ ...call.idempotencyKey ? { idempotencyKey: call.idempotencyKey } : {}
970
+ };
971
+ }
972
+ function queryDefect(call, empty, message) {
973
+ return newQueryBranch("defect", empty, {}, failure(call, "VALIDATION", message));
974
+ }
975
+ function defect(call, empty, message) {
976
+ return mutationBranch(call, empty, "defect", "VALIDATION", message);
977
+ }
978
+ function mutationBranch(call, empty, branch, kind, message) {
979
+ return newMutationBranch(branch, empty, {}, failure(call, kind, message));
980
+ }
981
+ function retry(call, kind, message, delay = 0) {
982
+ return newMutationRetry(failure(call, kind, message), delay);
983
+ }
984
+
985
+ // src/client.ts
44
986
  var emptyDetails = () => ({ name: "", verificationStatus: "" });
45
987
  var emailIdentityPattern = /^[A-Za-z0-9._+@-]{1,254}$/;
46
988
  var regionPattern = /^[a-z]{2}(?:-gov)?-[a-z]+-[0-9]+$/;
@@ -70,37 +1012,115 @@ var AmazonSESClient = class {
70
1012
  getEmailIdentity() {
71
1013
  return new GetEmailIdentityOperation(this);
72
1014
  }
1015
+ /** Bind the create email identity operation. */
1016
+ createEmailIdentity() {
1017
+ return new CreateEmailIdentityOperation(this);
1018
+ }
1019
+ /** Bind the list email identities operation. */
1020
+ listEmailIdentities() {
1021
+ return new ListEmailIdentitiesOperation(this);
1022
+ }
1023
+ /** Bind the delete email identity operation. */
1024
+ deleteEmailIdentity() {
1025
+ return new DeleteEmailIdentityOperation(this);
1026
+ }
1027
+ /** Bind the send email operation. */
1028
+ sendEmail() {
1029
+ return new SendEmailOperation(this);
1030
+ }
1031
+ /** Bind the create email template operation. */
1032
+ createEmailTemplate() {
1033
+ return new CreateEmailTemplateOperation(this);
1034
+ }
1035
+ /** Bind the get email template operation. */
1036
+ getEmailTemplate() {
1037
+ return new GetEmailTemplateOperation(this);
1038
+ }
1039
+ /** Bind the list email templates operation. */
1040
+ listEmailTemplates() {
1041
+ return new ListEmailTemplatesOperation(this);
1042
+ }
1043
+ /** Bind the update email template operation. */
1044
+ updateEmailTemplate() {
1045
+ return new UpdateEmailTemplateOperation(this);
1046
+ }
1047
+ /** Bind the delete email template operation. */
1048
+ deleteEmailTemplate() {
1049
+ return new DeleteEmailTemplateOperation(this);
1050
+ }
1051
+ /** Bind the send templated email operation. */
1052
+ sendTemplatedEmail() {
1053
+ return new SendTemplatedEmailOperation(this);
1054
+ }
1055
+ /** Bind the create custom verification email template operation. */
1056
+ createCustomVerificationEmailTemplate() {
1057
+ return new CreateCustomVerificationEmailTemplateOperation(this);
1058
+ }
1059
+ /** Bind the get custom verification email template operation. */
1060
+ getCustomVerificationEmailTemplate() {
1061
+ return new GetCustomVerificationEmailTemplateOperation(this);
1062
+ }
1063
+ /** Bind the list custom verification email templates operation. */
1064
+ listCustomVerificationEmailTemplates() {
1065
+ return new ListCustomVerificationEmailTemplatesOperation(this);
1066
+ }
1067
+ /** Bind the update custom verification email template operation. */
1068
+ updateCustomVerificationEmailTemplate() {
1069
+ return new UpdateCustomVerificationEmailTemplateOperation(this);
1070
+ }
1071
+ /** Bind the delete custom verification email template operation. */
1072
+ deleteCustomVerificationEmailTemplate() {
1073
+ return new DeleteCustomVerificationEmailTemplateOperation(this);
1074
+ }
1075
+ /** Bind the send custom verification email operation. */
1076
+ sendCustomVerificationEmail() {
1077
+ return new SendCustomVerificationEmailOperation(this);
1078
+ }
73
1079
  /** Sign and send one bounded GetEmailIdentity request. */
74
1080
  async readIdentity(call, name) {
1081
+ return this.request(call, "GET", "/v2/email/identities/" + identityPathSegment(name));
1082
+ }
1083
+ /** Check regional signing material before a fenced dispatch. */
1084
+ async signingCredentials(call, signal = call.context.cancellationSignal) {
75
1085
  let accessKey;
76
1086
  let secretKey;
77
1087
  let sessionToken;
78
1088
  try {
79
- const credentials = await this.credentials.resolve(call, call.context.cancellationSignal);
1089
+ const credentials = await this.credentials.resolve(call, signal);
80
1090
  accessKey = credentials.accessKeyId instanceof SecretString ? credentials.accessKeyId.reveal() : "";
81
1091
  secretKey = credentials.secretAccessKey instanceof SecretString ? credentials.secretAccessKey.reveal() : "";
82
1092
  sessionToken = credentials.sessionToken instanceof SecretString ? credentials.sessionToken.reveal() : "";
83
1093
  } catch {
84
- return emptyExchange("credential");
1094
+ return void 0;
85
1095
  }
86
- if (!accessKey || !secretKey || !isHeaderSafeCredential(accessKey) || !isHeaderSafeCredential(secretKey) || sessionToken && !isHeaderSafeCredential(sessionToken)) return emptyExchange("credential");
87
- const url = `${this.endpoint}/v2/email/identities/${encodeURIComponent(name)}`;
1096
+ if (!accessKey || !secretKey || !isHeaderSafeCredential(accessKey) || !isHeaderSafeCredential(secretKey) || sessionToken && !isHeaderSafeCredential(sessionToken)) return void 0;
1097
+ return [accessKey, secretKey, sessionToken];
1098
+ }
1099
+ /** Sign and send one bounded regional request. */
1100
+ async request(call, method, path, payload, signal = call.context.cancellationSignal, credentials) {
1101
+ const signingCredentials = credentials ?? await this.signingCredentials(call, signal);
1102
+ if (!signingCredentials) return emptyExchange("credential");
1103
+ const [accessKey, secretKey, sessionToken] = signingCredentials;
1104
+ const url = this.endpoint + path;
1105
+ const parsed = new URL(url);
88
1106
  const now = this.now();
89
1107
  const timestamp = now.toISOString().replace(/[-:]|\.\d{3}/g, "");
90
1108
  const day = timestamp.slice(0, 8);
91
- const host = new URL(url).host;
92
- const signedHeaders = sessionToken ? "host;x-amz-date;x-amz-security-token" : "host;x-amz-date";
93
- const canonicalHeaders = `host:${host}
94
- x-amz-date:${timestamp}
95
- ` + (sessionToken ? `x-amz-security-token:${sessionToken}
96
- ` : "");
97
- const payloadHash = createHash("sha256").update("").digest("hex");
98
- const canonicalRequest = `GET
99
- /v2/email/identities/${encodeURIComponent(name)}
100
-
101
- ${canonicalHeaders}
102
- ${signedHeaders}
103
- ${payloadHash}`;
1109
+ const body = payload === void 0 ? void 0 : Buffer.from(payload);
1110
+ const canonical = { host: parsed.host, "x-amz-date": timestamp };
1111
+ if (body) {
1112
+ canonical["content-type"] = "application/json";
1113
+ canonical["content-length"] = String(body.length);
1114
+ }
1115
+ if (sessionToken) canonical["x-amz-security-token"] = sessionToken;
1116
+ const names = Object.keys(canonical).sort();
1117
+ const signedHeaders = names.join(";");
1118
+ const canonicalHeaders = names.map((name) => `${name}:${canonical[name]}
1119
+ `).join("");
1120
+ const canonicalQuery = parsed.search.slice(1).replace(/\+/g, "%20");
1121
+ const canonicalPath = parsed.pathname.split("/").map(awsEscape).join("/");
1122
+ const payloadHash = createHash("sha256").update(body ?? "").digest("hex");
1123
+ const canonicalRequest = [method, canonicalPath, canonicalQuery, canonicalHeaders, signedHeaders, payloadHash].join("\n");
104
1124
  const scope = `${day}/${this.region}/ses/aws4_request`;
105
1125
  const stringToSign = `AWS4-HMAC-SHA256
106
1126
  ${timestamp}
@@ -113,15 +1133,20 @@ ${createHash("sha256").update(canonicalRequest).digest("hex")}`;
113
1133
  "X-Amz-Date": timestamp,
114
1134
  Authorization: `AWS4-HMAC-SHA256 Credential=${accessKey}/${scope}, SignedHeaders=${signedHeaders}, Signature=${signature}`
115
1135
  };
1136
+ if (body) {
1137
+ headers["Content-Type"] = "application/json";
1138
+ headers["Content-Length"] = String(body.length);
1139
+ }
116
1140
  if (sessionToken) headers["X-Amz-Security-Token"] = sessionToken;
117
1141
  const request = {
118
1142
  url,
119
- method: "GET",
1143
+ method,
120
1144
  headers,
1145
+ ...body ? { body } : {},
121
1146
  maxResponseBytes: this.maxResponseBytes,
122
1147
  timeoutMs: this.timeoutMs,
123
1148
  addressPolicy: this.endpoint.startsWith("https://") ? "publicHTTPS" : "privateNetworkHTTP",
124
- signal: call.context.cancellationSignal
1149
+ signal
125
1150
  };
126
1151
  let response;
127
1152
  let isTooLarge = false;
@@ -131,9 +1156,16 @@ ${createHash("sha256").update(canonicalRequest).digest("hex")}`;
131
1156
  if (error instanceof BodyTooLargeError && error.status !== void 0) {
132
1157
  response = { status: error.status, headers: error.headers ?? {}, body: new Uint8Array() };
133
1158
  isTooLarge = true;
1159
+ } else if ((error instanceof ProviderTransportError || error instanceof ProviderStalledError) && error.status !== void 0) {
1160
+ return {
1161
+ status: error.status,
1162
+ body: new Uint8Array(),
1163
+ retryAfterMs: parseRetryAfter(header(error.headers ?? {}, "retry-after"), now),
1164
+ error: "interrupted"
1165
+ };
134
1166
  } else return emptyExchange("request");
135
1167
  }
136
- const retryAfterMs = parseRetryAfter(header(response.headers, "retry-after"));
1168
+ const retryAfterMs = parseRetryAfter(header(response.headers, "retry-after"), now);
137
1169
  if (isTooLarge || response.body.length > this.maxResponseBytes)
138
1170
  return { status: response.status, body: new Uint8Array(), retryAfterMs, error: "tooLarge" };
139
1171
  if ([accessKey, secretKey, sessionToken].some((secret) => secret && Buffer.from(response.body).includes(secret)))
@@ -157,12 +1189,13 @@ var GetEmailIdentityOperation = class {
157
1189
  return terminal("defect", "VALIDATION", "SES email identity is invalid");
158
1190
  const exchange = await this.client.readIdentity(call, input.emailIdentity);
159
1191
  if (exchange.error === "credential") return terminal("defect", "AUTHENTICATION", "SES credentials are unavailable or invalid");
160
- if (exchange.error === "request") return retry("TRANSPORT", "SES request failed");
161
- if (exchange.status === 429) return retry("RATE_LIMIT", "SES rate limited the request", exchange.retryAfterMs);
162
- if (exchange.status === 408 || exchange.status >= 500) return retry("AVAILABILITY", "SES is temporarily unavailable", exchange.retryAfterMs);
163
- if (exchange.status === 404) return newQueryBranch("missing", emptyDetails());
1192
+ if (exchange.error === "request") return retry2("TRANSPORT", "SES request failed");
1193
+ if (exchange.status === 429) return retry2("RATE_LIMIT", "SES rate limited the request", exchange.retryAfterMs);
1194
+ if (exchange.status === 408 || exchange.status >= 500) return retry2("AVAILABILITY", "SES is temporarily unavailable", exchange.retryAfterMs);
1195
+ if (exchange.status === 404) return newQueryBranch2("missing", emptyDetails());
164
1196
  if (exchange.status !== 200) return terminal("providerRejected", "PROVIDER_REJECTION", `SES rejected HTTP ${exchange.status}`);
165
1197
  if (exchange.error === "tooLarge") return terminal("invalidResponse", "RESPONSE_TOO_LARGE", "SES response exceeded the configured limit");
1198
+ if (exchange.error === "interrupted") return retry2("TRANSPORT", "SES response was interrupted");
166
1199
  let document;
167
1200
  try {
168
1201
  document = JSON.parse(Buffer.from(exchange.body).toString("utf8"));
@@ -171,7 +1204,7 @@ var GetEmailIdentityOperation = class {
171
1204
  }
172
1205
  if (!isObject(document) || typeof document.VerificationStatus !== "string" || !["PENDING", "SUCCESS", "FAILED", "TEMPORARY_FAILURE", "NOT_STARTED"].includes(document.VerificationStatus))
173
1206
  return terminal("invalidResponse", "PROTOCOL", "SES returned invalid identity JSON");
174
- return newQueryBranch("found", { name: input.emailIdentity, verificationStatus: document.VerificationStatus });
1207
+ return newQueryBranch2("found", { name: input.emailIdentity, verificationStatus: document.VerificationStatus });
175
1208
  }
176
1209
  };
177
1210
  function isObject(value) {
@@ -180,19 +1213,25 @@ function isObject(value) {
180
1213
  function emptyExchange(error) {
181
1214
  return { status: 0, body: new Uint8Array(), retryAfterMs: 0, error };
182
1215
  }
183
- function failure(kind, message) {
1216
+ function failure2(kind, message) {
184
1217
  return { provider: "amazon-ses", operation: "getEmailIdentity", kind, message };
185
1218
  }
186
1219
  function terminal(branch, kind, message) {
187
- return newQueryBranch(branch, emptyDetails(), {}, failure(kind, message));
1220
+ return newQueryBranch2(branch, emptyDetails(), {}, failure2(kind, message));
188
1221
  }
189
- function retry(kind, message, delay = 0) {
190
- return newQueryRetry(failure(kind, message), delay);
1222
+ function retry2(kind, message, delay = 0) {
1223
+ return newQueryRetry2(failure2(kind, message), delay);
191
1224
  }
192
1225
  function header(headers, name) {
193
1226
  const entry = Object.entries(headers).find(([key]) => key.toLowerCase() === name.toLowerCase())?.[1];
194
1227
  return Array.isArray(entry) ? entry[0] ?? "" : entry ?? "";
195
1228
  }
1229
+ function identityPathSegment(name) {
1230
+ return awsEscape(name).replaceAll("%40", "@").replaceAll("%2B", "+");
1231
+ }
1232
+ function awsEscape(value) {
1233
+ return encodeURIComponent(value).replace(/[!'()*]/g, (character) => "%" + character.charCodeAt(0).toString(16).toUpperCase());
1234
+ }
196
1235
 
197
1236
  // src/project.ts
198
1237
  function newProjectConnection2(project, connectionName) {
@@ -235,7 +1274,81 @@ export {
235
1274
  ConfigSchema,
236
1275
  Connection,
237
1276
  ConnectorID,
1277
+ CreateCustomVerificationEmailTemplateBranch,
1278
+ CreateCustomVerificationEmailTemplateBranchCreated,
1279
+ CreateCustomVerificationEmailTemplateBranchDefect,
1280
+ CreateCustomVerificationEmailTemplateBranchProviderRejected,
1281
+ CreateCustomVerificationEmailTemplateBranchUncertain,
1282
+ CreateCustomVerificationEmailTemplateDefinition,
1283
+ CreateCustomVerificationEmailTemplateInputSchema,
1284
+ CreateCustomVerificationEmailTemplateMetadata,
1285
+ CreateCustomVerificationEmailTemplateOperation,
1286
+ CreateEmailIdentityBranch,
1287
+ CreateEmailIdentityBranchCreated,
1288
+ CreateEmailIdentityBranchDefect,
1289
+ CreateEmailIdentityBranchProviderRejected,
1290
+ CreateEmailIdentityBranchUncertain,
1291
+ CreateEmailIdentityDefinition,
1292
+ CreateEmailIdentityInputSchema,
1293
+ CreateEmailIdentityMetadata,
1294
+ CreateEmailIdentityOperation,
1295
+ CreateEmailTemplateBranch,
1296
+ CreateEmailTemplateBranchCreated,
1297
+ CreateEmailTemplateBranchDefect,
1298
+ CreateEmailTemplateBranchProviderRejected,
1299
+ CreateEmailTemplateBranchUncertain,
1300
+ CreateEmailTemplateDefinition,
1301
+ CreateEmailTemplateInputSchema,
1302
+ CreateEmailTemplateMetadata,
1303
+ CreateEmailTemplateOperation,
1304
+ CreatedEmailIdentitySchema,
1305
+ CredentialMaterialError,
1306
+ CustomVerificationEmailTemplatePageSchema,
1307
+ CustomVerificationEmailTemplateSchema,
1308
+ CustomVerificationEmailTemplateSummarySchema,
1309
+ DeleteCustomVerificationEmailTemplateBranch,
1310
+ DeleteCustomVerificationEmailTemplateBranchDefect,
1311
+ DeleteCustomVerificationEmailTemplateBranchDeleted,
1312
+ DeleteCustomVerificationEmailTemplateBranchProviderRejected,
1313
+ DeleteCustomVerificationEmailTemplateDefinition,
1314
+ DeleteCustomVerificationEmailTemplateInputSchema,
1315
+ DeleteCustomVerificationEmailTemplateMetadata,
1316
+ DeleteCustomVerificationEmailTemplateOperation,
1317
+ DeleteEmailIdentityBranch,
1318
+ DeleteEmailIdentityBranchDefect,
1319
+ DeleteEmailIdentityBranchDeleted,
1320
+ DeleteEmailIdentityBranchProviderRejected,
1321
+ DeleteEmailIdentityDefinition,
1322
+ DeleteEmailIdentityInputSchema,
1323
+ DeleteEmailIdentityMetadata,
1324
+ DeleteEmailIdentityOperation,
1325
+ DeleteEmailTemplateBranch,
1326
+ DeleteEmailTemplateBranchDefect,
1327
+ DeleteEmailTemplateBranchDeleted,
1328
+ DeleteEmailTemplateBranchProviderRejected,
1329
+ DeleteEmailTemplateDefinition,
1330
+ DeleteEmailTemplateInputSchema,
1331
+ DeleteEmailTemplateMetadata,
1332
+ DeleteEmailTemplateOperation,
1333
+ DeletedEmailIdentitySchema,
1334
+ DeletedEmailTemplateSchema,
238
1335
  EmailIdentityDetailsSchema,
1336
+ EmailIdentityPageSchema,
1337
+ EmailIdentitySummarySchema,
1338
+ EmailTemplateContentSchema,
1339
+ EmailTemplatePageSchema,
1340
+ EmailTemplateSchema,
1341
+ EmailTemplateSummarySchema,
1342
+ GetCustomVerificationEmailTemplateBranch,
1343
+ GetCustomVerificationEmailTemplateBranchDefect,
1344
+ GetCustomVerificationEmailTemplateBranchFound,
1345
+ GetCustomVerificationEmailTemplateBranchInvalidResponse,
1346
+ GetCustomVerificationEmailTemplateBranchMissing,
1347
+ GetCustomVerificationEmailTemplateBranchProviderRejected,
1348
+ GetCustomVerificationEmailTemplateDefinition,
1349
+ GetCustomVerificationEmailTemplateInputSchema,
1350
+ GetCustomVerificationEmailTemplateMetadata,
1351
+ GetCustomVerificationEmailTemplateOperation,
239
1352
  GetEmailIdentityBranch,
240
1353
  GetEmailIdentityBranchDefect,
241
1354
  GetEmailIdentityBranchFound,
@@ -246,10 +1359,108 @@ export {
246
1359
  GetEmailIdentityInputSchema,
247
1360
  GetEmailIdentityMetadata,
248
1361
  GetEmailIdentityOperation,
1362
+ GetEmailTemplateBranch,
1363
+ GetEmailTemplateBranchDefect,
1364
+ GetEmailTemplateBranchFound,
1365
+ GetEmailTemplateBranchInvalidResponse,
1366
+ GetEmailTemplateBranchMissing,
1367
+ GetEmailTemplateBranchProviderRejected,
1368
+ GetEmailTemplateDefinition,
1369
+ GetEmailTemplateInputSchema,
1370
+ GetEmailTemplateMetadata,
1371
+ GetEmailTemplateOperation,
1372
+ ListCustomVerificationEmailTemplatesBranch,
1373
+ ListCustomVerificationEmailTemplatesBranchDefect,
1374
+ ListCustomVerificationEmailTemplatesBranchInvalidResponse,
1375
+ ListCustomVerificationEmailTemplatesBranchPage,
1376
+ ListCustomVerificationEmailTemplatesBranchProviderRejected,
1377
+ ListCustomVerificationEmailTemplatesDefinition,
1378
+ ListCustomVerificationEmailTemplatesInputSchema,
1379
+ ListCustomVerificationEmailTemplatesMetadata,
1380
+ ListCustomVerificationEmailTemplatesOperation,
1381
+ ListEmailIdentitiesBranch,
1382
+ ListEmailIdentitiesBranchDefect,
1383
+ ListEmailIdentitiesBranchInvalidResponse,
1384
+ ListEmailIdentitiesBranchPage,
1385
+ ListEmailIdentitiesBranchProviderRejected,
1386
+ ListEmailIdentitiesDefinition,
1387
+ ListEmailIdentitiesInputSchema,
1388
+ ListEmailIdentitiesMetadata,
1389
+ ListEmailIdentitiesOperation,
1390
+ ListEmailTemplatesBranch,
1391
+ ListEmailTemplatesBranchDefect,
1392
+ ListEmailTemplatesBranchInvalidResponse,
1393
+ ListEmailTemplatesBranchPage,
1394
+ ListEmailTemplatesBranchProviderRejected,
1395
+ ListEmailTemplatesDefinition,
1396
+ ListEmailTemplatesInputSchema,
1397
+ ListEmailTemplatesMetadata,
1398
+ ListEmailTemplatesOperation,
249
1399
  ProviderID,
1400
+ SendCustomVerificationEmailBranch,
1401
+ SendCustomVerificationEmailBranchDefect,
1402
+ SendCustomVerificationEmailBranchProviderRejected,
1403
+ SendCustomVerificationEmailBranchSent,
1404
+ SendCustomVerificationEmailBranchUncertain,
1405
+ SendCustomVerificationEmailDefinition,
1406
+ SendCustomVerificationEmailInputSchema,
1407
+ SendCustomVerificationEmailMetadata,
1408
+ SendCustomVerificationEmailOperation,
1409
+ SendEmailBranch,
1410
+ SendEmailBranchDefect,
1411
+ SendEmailBranchProviderRejected,
1412
+ SendEmailBranchSent,
1413
+ SendEmailBranchUncertain,
1414
+ SendEmailDefinition,
1415
+ SendEmailInputSchema,
1416
+ SendEmailMetadata,
1417
+ SendEmailOperation,
1418
+ SendTemplatedEmailBranch,
1419
+ SendTemplatedEmailBranchDefect,
1420
+ SendTemplatedEmailBranchProviderRejected,
1421
+ SendTemplatedEmailBranchSent,
1422
+ SendTemplatedEmailBranchUncertain,
1423
+ SendTemplatedEmailDefinition,
1424
+ SendTemplatedEmailInputSchema,
1425
+ SendTemplatedEmailMetadata,
1426
+ SendTemplatedEmailOperation,
1427
+ SentEmailSchema,
1428
+ UpdateCustomVerificationEmailTemplateBranch,
1429
+ UpdateCustomVerificationEmailTemplateBranchDefect,
1430
+ UpdateCustomVerificationEmailTemplateBranchProviderRejected,
1431
+ UpdateCustomVerificationEmailTemplateBranchUpdated,
1432
+ UpdateCustomVerificationEmailTemplateDefinition,
1433
+ UpdateCustomVerificationEmailTemplateInputSchema,
1434
+ UpdateCustomVerificationEmailTemplateMetadata,
1435
+ UpdateCustomVerificationEmailTemplateOperation,
1436
+ UpdateEmailTemplateBranch,
1437
+ UpdateEmailTemplateBranchDefect,
1438
+ UpdateEmailTemplateBranchProviderRejected,
1439
+ UpdateEmailTemplateBranchUpdated,
1440
+ UpdateEmailTemplateDefinition,
1441
+ UpdateEmailTemplateInputSchema,
1442
+ UpdateEmailTemplateMetadata,
1443
+ UpdateEmailTemplateOperation,
250
1444
  decodeCredentials,
1445
+ isCredentialMaterialError,
251
1446
  newConnection,
252
1447
  newConnectionWithOperations,
1448
+ newCreateCustomVerificationEmailTemplateStep,
1449
+ newCreateEmailIdentityStep,
1450
+ newCreateEmailTemplateStep,
1451
+ newDeleteCustomVerificationEmailTemplateStep,
1452
+ newDeleteEmailIdentityStep,
1453
+ newDeleteEmailTemplateStep,
1454
+ newGetCustomVerificationEmailTemplateStep,
253
1455
  newGetEmailIdentityStep,
254
- newProjectConnection2 as newProjectConnection
1456
+ newGetEmailTemplateStep,
1457
+ newListCustomVerificationEmailTemplatesStep,
1458
+ newListEmailIdentitiesStep,
1459
+ newListEmailTemplatesStep,
1460
+ newProjectConnection2 as newProjectConnection,
1461
+ newSendCustomVerificationEmailStep,
1462
+ newSendEmailStep,
1463
+ newSendTemplatedEmailStep,
1464
+ newUpdateCustomVerificationEmailTemplateStep,
1465
+ newUpdateEmailTemplateStep
255
1466
  };