@aws-sdk/client-ses 3.975.0 → 3.978.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-cjs/index.js CHANGED
@@ -3224,6 +3224,47 @@ class VerifyEmailIdentityCommand extends smithyClient.Command
3224
3224
  .build() {
3225
3225
  }
3226
3226
 
3227
+ const paginateListCustomVerificationEmailTemplates = core.createPaginator(SESClient, ListCustomVerificationEmailTemplatesCommand, "NextToken", "NextToken", "MaxResults");
3228
+
3229
+ const paginateListIdentities = core.createPaginator(SESClient, ListIdentitiesCommand, "NextToken", "NextToken", "MaxItems");
3230
+
3231
+ const checkState = async (client, input) => {
3232
+ let reason;
3233
+ try {
3234
+ let result = await client.send(new GetIdentityVerificationAttributesCommand(input));
3235
+ reason = result;
3236
+ try {
3237
+ const returnComparator = () => {
3238
+ let objectProjection_2 = Object.values(result.VerificationAttributes).map((element_1) => {
3239
+ return element_1.VerificationStatus;
3240
+ });
3241
+ return objectProjection_2;
3242
+ };
3243
+ let allStringEq_4 = (returnComparator().length > 0);
3244
+ for (let element_3 of returnComparator()) {
3245
+ allStringEq_4 = allStringEq_4 && (element_3 == "Success");
3246
+ }
3247
+ if (allStringEq_4) {
3248
+ return { state: utilWaiter.WaiterState.SUCCESS, reason };
3249
+ }
3250
+ }
3251
+ catch (e) { }
3252
+ }
3253
+ catch (exception) {
3254
+ reason = exception;
3255
+ }
3256
+ return { state: utilWaiter.WaiterState.RETRY, reason };
3257
+ };
3258
+ const waitForIdentityExists = async (params, input) => {
3259
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
3260
+ return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
3261
+ };
3262
+ const waitUntilIdentityExists = async (params, input) => {
3263
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
3264
+ const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
3265
+ return utilWaiter.checkExceptions(result);
3266
+ };
3267
+
3227
3268
  const commands = {
3228
3269
  CloneReceiptRuleSetCommand,
3229
3270
  CreateConfigurationSetCommand,
@@ -3297,50 +3338,16 @@ const commands = {
3297
3338
  VerifyEmailAddressCommand,
3298
3339
  VerifyEmailIdentityCommand,
3299
3340
  };
3300
- class SES extends SESClient {
3301
- }
3302
- smithyClient.createAggregatedClient(commands, SES);
3303
-
3304
- const paginateListCustomVerificationEmailTemplates = core.createPaginator(SESClient, ListCustomVerificationEmailTemplatesCommand, "NextToken", "NextToken", "MaxResults");
3305
-
3306
- const paginateListIdentities = core.createPaginator(SESClient, ListIdentitiesCommand, "NextToken", "NextToken", "MaxItems");
3307
-
3308
- const checkState = async (client, input) => {
3309
- let reason;
3310
- try {
3311
- let result = await client.send(new GetIdentityVerificationAttributesCommand(input));
3312
- reason = result;
3313
- try {
3314
- const returnComparator = () => {
3315
- let objectProjection_2 = Object.values(result.VerificationAttributes).map((element_1) => {
3316
- return element_1.VerificationStatus;
3317
- });
3318
- return objectProjection_2;
3319
- };
3320
- let allStringEq_4 = (returnComparator().length > 0);
3321
- for (let element_3 of returnComparator()) {
3322
- allStringEq_4 = allStringEq_4 && (element_3 == "Success");
3323
- }
3324
- if (allStringEq_4) {
3325
- return { state: utilWaiter.WaiterState.SUCCESS, reason };
3326
- }
3327
- }
3328
- catch (e) { }
3329
- }
3330
- catch (exception) {
3331
- reason = exception;
3332
- }
3333
- return { state: utilWaiter.WaiterState.RETRY, reason };
3334
- };
3335
- const waitForIdentityExists = async (params, input) => {
3336
- const serviceDefaults = { minDelay: 3, maxDelay: 120 };
3337
- return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
3341
+ const paginators = {
3342
+ paginateListCustomVerificationEmailTemplates,
3343
+ paginateListIdentities,
3338
3344
  };
3339
- const waitUntilIdentityExists = async (params, input) => {
3340
- const serviceDefaults = { minDelay: 3, maxDelay: 120 };
3341
- const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
3342
- return utilWaiter.checkExceptions(result);
3345
+ const waiters = {
3346
+ waitUntilIdentityExists,
3343
3347
  };
3348
+ class SES extends SESClient {
3349
+ }
3350
+ smithyClient.createAggregatedClient(commands, SES, { paginators, waiters });
3344
3351
 
3345
3352
  const BehaviorOnMXFailure = {
3346
3353
  RejectMessage: "RejectMessage",
package/dist-es/SES.js CHANGED
@@ -70,7 +70,10 @@ import { VerifyDomainDkimCommand, } from "./commands/VerifyDomainDkimCommand";
70
70
  import { VerifyDomainIdentityCommand, } from "./commands/VerifyDomainIdentityCommand";
71
71
  import { VerifyEmailAddressCommand, } from "./commands/VerifyEmailAddressCommand";
72
72
  import { VerifyEmailIdentityCommand, } from "./commands/VerifyEmailIdentityCommand";
73
+ import { paginateListCustomVerificationEmailTemplates, } from "./pagination/ListCustomVerificationEmailTemplatesPaginator";
74
+ import { paginateListIdentities } from "./pagination/ListIdentitiesPaginator";
73
75
  import { SESClient } from "./SESClient";
76
+ import { waitUntilIdentityExists } from "./waiters/waitForIdentityExists";
74
77
  const commands = {
75
78
  CloneReceiptRuleSetCommand,
76
79
  CreateConfigurationSetCommand,
@@ -144,6 +147,13 @@ const commands = {
144
147
  VerifyEmailAddressCommand,
145
148
  VerifyEmailIdentityCommand,
146
149
  };
150
+ const paginators = {
151
+ paginateListCustomVerificationEmailTemplates,
152
+ paginateListIdentities,
153
+ };
154
+ const waiters = {
155
+ waitUntilIdentityExists,
156
+ };
147
157
  export class SES extends SESClient {
148
158
  }
149
- createAggregatedClient(commands, SES);
159
+ createAggregatedClient(commands, SES, { paginators, waiters });
@@ -1,4 +1,5 @@
1
- import type { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
1
+ import type { HttpHandlerOptions as __HttpHandlerOptions, PaginationConfiguration, Paginator, WaiterConfiguration } from "@smithy/types";
2
+ import type { WaiterResult } from "@smithy/util-waiter";
2
3
  import { CloneReceiptRuleSetCommandInput, CloneReceiptRuleSetCommandOutput } from "./commands/CloneReceiptRuleSetCommand";
3
4
  import { CreateConfigurationSetCommandInput, CreateConfigurationSetCommandOutput } from "./commands/CreateConfigurationSetCommand";
4
5
  import { CreateConfigurationSetEventDestinationCommandInput, CreateConfigurationSetEventDestinationCommandOutput } from "./commands/CreateConfigurationSetEventDestinationCommand";
@@ -511,6 +512,26 @@ export interface SES {
511
512
  verifyEmailIdentity(args: VerifyEmailIdentityCommandInput, options?: __HttpHandlerOptions): Promise<VerifyEmailIdentityCommandOutput>;
512
513
  verifyEmailIdentity(args: VerifyEmailIdentityCommandInput, cb: (err: any, data?: VerifyEmailIdentityCommandOutput) => void): void;
513
514
  verifyEmailIdentity(args: VerifyEmailIdentityCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: VerifyEmailIdentityCommandOutput) => void): void;
515
+ /**
516
+ * @see {@link ListCustomVerificationEmailTemplatesCommand}
517
+ * @param args - command input.
518
+ * @param paginationConfig - optional pagination config.
519
+ * @returns AsyncIterable of {@link ListCustomVerificationEmailTemplatesCommandOutput}.
520
+ */
521
+ paginateListCustomVerificationEmailTemplates(args?: ListCustomVerificationEmailTemplatesCommandInput, paginationConfig?: Omit<PaginationConfiguration, "client">): Paginator<ListCustomVerificationEmailTemplatesCommandOutput>;
522
+ /**
523
+ * @see {@link ListIdentitiesCommand}
524
+ * @param args - command input.
525
+ * @param paginationConfig - optional pagination config.
526
+ * @returns AsyncIterable of {@link ListIdentitiesCommandOutput}.
527
+ */
528
+ paginateListIdentities(args?: ListIdentitiesCommandInput, paginationConfig?: Omit<PaginationConfiguration, "client">): Paginator<ListIdentitiesCommandOutput>;
529
+ /**
530
+ * @see {@link GetIdentityVerificationAttributesCommand}
531
+ * @param args - command input.
532
+ * @param waiterConfig - `maxWaitTime` in seconds or waiter config object.
533
+ */
534
+ waitUntilIdentityExists(args: GetIdentityVerificationAttributesCommandInput, waiterConfig: number | Omit<WaiterConfiguration<SES>, "client">): Promise<WaiterResult>;
514
535
  }
515
536
  /**
516
537
  * <fullname>Amazon Simple Email Service</fullname>
@@ -1,4 +1,10 @@
1
- import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
1
+ import {
2
+ HttpHandlerOptions as __HttpHandlerOptions,
3
+ PaginationConfiguration,
4
+ Paginator,
5
+ WaiterConfiguration,
6
+ } from "@smithy/types";
7
+ import { WaiterResult } from "@smithy/util-waiter";
2
8
  import {
3
9
  CloneReceiptRuleSetCommandInput,
4
10
  CloneReceiptRuleSetCommandOutput,
@@ -1335,5 +1341,28 @@ export interface SES {
1335
1341
  options: __HttpHandlerOptions,
1336
1342
  cb: (err: any, data?: VerifyEmailIdentityCommandOutput) => void
1337
1343
  ): void;
1344
+ paginateListCustomVerificationEmailTemplates(
1345
+ args?: ListCustomVerificationEmailTemplatesCommandInput,
1346
+ paginationConfig?: Pick<
1347
+ PaginationConfiguration,
1348
+ Exclude<keyof PaginationConfiguration, "client">
1349
+ >
1350
+ ): Paginator<ListCustomVerificationEmailTemplatesCommandOutput>;
1351
+ paginateListIdentities(
1352
+ args?: ListIdentitiesCommandInput,
1353
+ paginationConfig?: Pick<
1354
+ PaginationConfiguration,
1355
+ Exclude<keyof PaginationConfiguration, "client">
1356
+ >
1357
+ ): Paginator<ListIdentitiesCommandOutput>;
1358
+ waitUntilIdentityExists(
1359
+ args: GetIdentityVerificationAttributesCommandInput,
1360
+ waiterConfig:
1361
+ | number
1362
+ | Pick<
1363
+ WaiterConfiguration<SES>,
1364
+ Exclude<keyof WaiterConfiguration<SES>, "client">
1365
+ >
1366
+ ): Promise<WaiterResult>;
1338
1367
  }
1339
1368
  export declare class SES extends SESClient implements SES {}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-ses",
3
3
  "description": "AWS SDK for JavaScript Ses Client for Node.js, Browser and React Native",
4
- "version": "3.975.0",
4
+ "version": "3.978.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-ses",
@@ -23,38 +23,38 @@
23
23
  "dependencies": {
24
24
  "@aws-crypto/sha256-browser": "5.2.0",
25
25
  "@aws-crypto/sha256-js": "5.2.0",
26
- "@aws-sdk/core": "^3.973.1",
27
- "@aws-sdk/credential-provider-node": "^3.972.1",
28
- "@aws-sdk/middleware-host-header": "^3.972.1",
29
- "@aws-sdk/middleware-logger": "^3.972.1",
30
- "@aws-sdk/middleware-recursion-detection": "^3.972.1",
31
- "@aws-sdk/middleware-user-agent": "^3.972.2",
32
- "@aws-sdk/region-config-resolver": "^3.972.1",
33
- "@aws-sdk/types": "^3.973.0",
26
+ "@aws-sdk/core": "^3.973.4",
27
+ "@aws-sdk/credential-provider-node": "^3.972.2",
28
+ "@aws-sdk/middleware-host-header": "^3.972.2",
29
+ "@aws-sdk/middleware-logger": "^3.972.2",
30
+ "@aws-sdk/middleware-recursion-detection": "^3.972.2",
31
+ "@aws-sdk/middleware-user-agent": "^3.972.4",
32
+ "@aws-sdk/region-config-resolver": "^3.972.2",
33
+ "@aws-sdk/types": "^3.973.1",
34
34
  "@aws-sdk/util-endpoints": "3.972.0",
35
- "@aws-sdk/util-user-agent-browser": "^3.972.1",
36
- "@aws-sdk/util-user-agent-node": "^3.972.1",
35
+ "@aws-sdk/util-user-agent-browser": "^3.972.2",
36
+ "@aws-sdk/util-user-agent-node": "^3.972.2",
37
37
  "@smithy/config-resolver": "^4.4.6",
38
- "@smithy/core": "^3.21.1",
38
+ "@smithy/core": "^3.22.0",
39
39
  "@smithy/fetch-http-handler": "^5.3.9",
40
40
  "@smithy/hash-node": "^4.2.8",
41
41
  "@smithy/invalid-dependency": "^4.2.8",
42
42
  "@smithy/middleware-content-length": "^4.2.8",
43
- "@smithy/middleware-endpoint": "^4.4.11",
44
- "@smithy/middleware-retry": "^4.4.27",
43
+ "@smithy/middleware-endpoint": "^4.4.12",
44
+ "@smithy/middleware-retry": "^4.4.29",
45
45
  "@smithy/middleware-serde": "^4.2.9",
46
46
  "@smithy/middleware-stack": "^4.2.8",
47
47
  "@smithy/node-config-provider": "^4.3.8",
48
48
  "@smithy/node-http-handler": "^4.4.8",
49
49
  "@smithy/protocol-http": "^5.3.8",
50
- "@smithy/smithy-client": "^4.10.12",
50
+ "@smithy/smithy-client": "^4.11.1",
51
51
  "@smithy/types": "^4.12.0",
52
52
  "@smithy/url-parser": "^4.2.8",
53
53
  "@smithy/util-base64": "^4.3.0",
54
54
  "@smithy/util-body-length-browser": "^4.2.0",
55
55
  "@smithy/util-body-length-node": "^4.2.1",
56
- "@smithy/util-defaults-mode-browser": "^4.3.26",
57
- "@smithy/util-defaults-mode-node": "^4.2.29",
56
+ "@smithy/util-defaults-mode-browser": "^4.3.28",
57
+ "@smithy/util-defaults-mode-node": "^4.2.31",
58
58
  "@smithy/util-endpoints": "^3.2.8",
59
59
  "@smithy/util-middleware": "^4.2.8",
60
60
  "@smithy/util-retry": "^4.2.8",