@aws-sdk/client-sns 3.476.0 → 3.478.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.
Files changed (35) hide show
  1. package/dist-cjs/pagination/ListEndpointsByPlatformApplicationPaginator.js +2 -23
  2. package/dist-cjs/pagination/ListOriginationNumbersPaginator.js +2 -24
  3. package/dist-cjs/pagination/ListPhoneNumbersOptedOutPaginator.js +2 -23
  4. package/dist-cjs/pagination/ListPlatformApplicationsPaginator.js +2 -23
  5. package/dist-cjs/pagination/ListSMSSandboxPhoneNumbersPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListSubscriptionsByTopicPaginator.js +2 -23
  7. package/dist-cjs/pagination/ListSubscriptionsPaginator.js +2 -23
  8. package/dist-cjs/pagination/ListTopicsPaginator.js +2 -23
  9. package/dist-cjs/protocols/Aws_query.js +604 -492
  10. package/dist-es/pagination/ListEndpointsByPlatformApplicationPaginator.js +2 -22
  11. package/dist-es/pagination/ListOriginationNumbersPaginator.js +2 -23
  12. package/dist-es/pagination/ListPhoneNumbersOptedOutPaginator.js +2 -22
  13. package/dist-es/pagination/ListPlatformApplicationsPaginator.js +2 -22
  14. package/dist-es/pagination/ListSMSSandboxPhoneNumbersPaginator.js +2 -23
  15. package/dist-es/pagination/ListSubscriptionsByTopicPaginator.js +2 -22
  16. package/dist-es/pagination/ListSubscriptionsPaginator.js +2 -22
  17. package/dist-es/pagination/ListTopicsPaginator.js +2 -22
  18. package/dist-es/protocols/Aws_query.js +604 -492
  19. package/dist-types/pagination/ListEndpointsByPlatformApplicationPaginator.d.ts +1 -1
  20. package/dist-types/pagination/ListOriginationNumbersPaginator.d.ts +1 -1
  21. package/dist-types/pagination/ListPhoneNumbersOptedOutPaginator.d.ts +1 -1
  22. package/dist-types/pagination/ListPlatformApplicationsPaginator.d.ts +1 -1
  23. package/dist-types/pagination/ListSMSSandboxPhoneNumbersPaginator.d.ts +1 -1
  24. package/dist-types/pagination/ListSubscriptionsByTopicPaginator.d.ts +1 -1
  25. package/dist-types/pagination/ListSubscriptionsPaginator.d.ts +1 -1
  26. package/dist-types/pagination/ListTopicsPaginator.d.ts +1 -1
  27. package/dist-types/ts3.4/pagination/ListEndpointsByPlatformApplicationPaginator.d.ts +3 -3
  28. package/dist-types/ts3.4/pagination/ListOriginationNumbersPaginator.d.ts +3 -3
  29. package/dist-types/ts3.4/pagination/ListPhoneNumbersOptedOutPaginator.d.ts +3 -3
  30. package/dist-types/ts3.4/pagination/ListPlatformApplicationsPaginator.d.ts +3 -3
  31. package/dist-types/ts3.4/pagination/ListSMSSandboxPhoneNumbersPaginator.d.ts +3 -3
  32. package/dist-types/ts3.4/pagination/ListSubscriptionsByTopicPaginator.d.ts +3 -3
  33. package/dist-types/ts3.4/pagination/ListSubscriptionsPaginator.d.ts +3 -3
  34. package/dist-types/ts3.4/pagination/ListTopicsPaginator.d.ts +3 -3
  35. package/package.json +7 -6
@@ -1,28 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListEndpointsByPlatformApplication = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListEndpointsByPlatformApplicationCommand_1 = require("../commands/ListEndpointsByPlatformApplicationCommand");
5
6
  const SNSClient_1 = require("../SNSClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListEndpointsByPlatformApplicationCommand_1.ListEndpointsByPlatformApplicationCommand(input), ...args);
8
- };
9
- async function* paginateListEndpointsByPlatformApplication(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- if (config.client instanceof SNSClient_1.SNSClient) {
16
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
17
- }
18
- else {
19
- throw new Error("Invalid client, expected SNS | SNSClient");
20
- }
21
- yield page;
22
- const prevToken = token;
23
- token = page.NextToken;
24
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
25
- }
26
- return undefined;
27
- }
28
- exports.paginateListEndpointsByPlatformApplication = paginateListEndpointsByPlatformApplication;
7
+ exports.paginateListEndpointsByPlatformApplication = (0, core_1.createPaginator)(SNSClient_1.SNSClient, ListEndpointsByPlatformApplicationCommand_1.ListEndpointsByPlatformApplicationCommand, "NextToken", "NextToken", "");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListOriginationNumbers = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListOriginationNumbersCommand_1 = require("../commands/ListOriginationNumbersCommand");
5
6
  const SNSClient_1 = require("../SNSClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListOriginationNumbersCommand_1.ListOriginationNumbersCommand(input), ...args);
8
- };
9
- async function* paginateListOriginationNumbers(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof SNSClient_1.SNSClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected SNS | SNSClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListOriginationNumbers = paginateListOriginationNumbers;
7
+ exports.paginateListOriginationNumbers = (0, core_1.createPaginator)(SNSClient_1.SNSClient, ListOriginationNumbersCommand_1.ListOriginationNumbersCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,28 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListPhoneNumbersOptedOut = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListPhoneNumbersOptedOutCommand_1 = require("../commands/ListPhoneNumbersOptedOutCommand");
5
6
  const SNSClient_1 = require("../SNSClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListPhoneNumbersOptedOutCommand_1.ListPhoneNumbersOptedOutCommand(input), ...args);
8
- };
9
- async function* paginateListPhoneNumbersOptedOut(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.nextToken = token;
15
- if (config.client instanceof SNSClient_1.SNSClient) {
16
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
17
- }
18
- else {
19
- throw new Error("Invalid client, expected SNS | SNSClient");
20
- }
21
- yield page;
22
- const prevToken = token;
23
- token = page.nextToken;
24
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
25
- }
26
- return undefined;
27
- }
28
- exports.paginateListPhoneNumbersOptedOut = paginateListPhoneNumbersOptedOut;
7
+ exports.paginateListPhoneNumbersOptedOut = (0, core_1.createPaginator)(SNSClient_1.SNSClient, ListPhoneNumbersOptedOutCommand_1.ListPhoneNumbersOptedOutCommand, "nextToken", "nextToken", "");
@@ -1,28 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListPlatformApplications = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListPlatformApplicationsCommand_1 = require("../commands/ListPlatformApplicationsCommand");
5
6
  const SNSClient_1 = require("../SNSClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListPlatformApplicationsCommand_1.ListPlatformApplicationsCommand(input), ...args);
8
- };
9
- async function* paginateListPlatformApplications(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- if (config.client instanceof SNSClient_1.SNSClient) {
16
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
17
- }
18
- else {
19
- throw new Error("Invalid client, expected SNS | SNSClient");
20
- }
21
- yield page;
22
- const prevToken = token;
23
- token = page.NextToken;
24
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
25
- }
26
- return undefined;
27
- }
28
- exports.paginateListPlatformApplications = paginateListPlatformApplications;
7
+ exports.paginateListPlatformApplications = (0, core_1.createPaginator)(SNSClient_1.SNSClient, ListPlatformApplicationsCommand_1.ListPlatformApplicationsCommand, "NextToken", "NextToken", "");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListSMSSandboxPhoneNumbers = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListSMSSandboxPhoneNumbersCommand_1 = require("../commands/ListSMSSandboxPhoneNumbersCommand");
5
6
  const SNSClient_1 = require("../SNSClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListSMSSandboxPhoneNumbersCommand_1.ListSMSSandboxPhoneNumbersCommand(input), ...args);
8
- };
9
- async function* paginateListSMSSandboxPhoneNumbers(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof SNSClient_1.SNSClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected SNS | SNSClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListSMSSandboxPhoneNumbers = paginateListSMSSandboxPhoneNumbers;
7
+ exports.paginateListSMSSandboxPhoneNumbers = (0, core_1.createPaginator)(SNSClient_1.SNSClient, ListSMSSandboxPhoneNumbersCommand_1.ListSMSSandboxPhoneNumbersCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,28 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListSubscriptionsByTopic = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListSubscriptionsByTopicCommand_1 = require("../commands/ListSubscriptionsByTopicCommand");
5
6
  const SNSClient_1 = require("../SNSClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListSubscriptionsByTopicCommand_1.ListSubscriptionsByTopicCommand(input), ...args);
8
- };
9
- async function* paginateListSubscriptionsByTopic(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- if (config.client instanceof SNSClient_1.SNSClient) {
16
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
17
- }
18
- else {
19
- throw new Error("Invalid client, expected SNS | SNSClient");
20
- }
21
- yield page;
22
- const prevToken = token;
23
- token = page.NextToken;
24
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
25
- }
26
- return undefined;
27
- }
28
- exports.paginateListSubscriptionsByTopic = paginateListSubscriptionsByTopic;
7
+ exports.paginateListSubscriptionsByTopic = (0, core_1.createPaginator)(SNSClient_1.SNSClient, ListSubscriptionsByTopicCommand_1.ListSubscriptionsByTopicCommand, "NextToken", "NextToken", "");
@@ -1,28 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListSubscriptions = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListSubscriptionsCommand_1 = require("../commands/ListSubscriptionsCommand");
5
6
  const SNSClient_1 = require("../SNSClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListSubscriptionsCommand_1.ListSubscriptionsCommand(input), ...args);
8
- };
9
- async function* paginateListSubscriptions(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- if (config.client instanceof SNSClient_1.SNSClient) {
16
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
17
- }
18
- else {
19
- throw new Error("Invalid client, expected SNS | SNSClient");
20
- }
21
- yield page;
22
- const prevToken = token;
23
- token = page.NextToken;
24
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
25
- }
26
- return undefined;
27
- }
28
- exports.paginateListSubscriptions = paginateListSubscriptions;
7
+ exports.paginateListSubscriptions = (0, core_1.createPaginator)(SNSClient_1.SNSClient, ListSubscriptionsCommand_1.ListSubscriptionsCommand, "NextToken", "NextToken", "");
@@ -1,28 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListTopics = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListTopicsCommand_1 = require("../commands/ListTopicsCommand");
5
6
  const SNSClient_1 = require("../SNSClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListTopicsCommand_1.ListTopicsCommand(input), ...args);
8
- };
9
- async function* paginateListTopics(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- if (config.client instanceof SNSClient_1.SNSClient) {
16
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
17
- }
18
- else {
19
- throw new Error("Invalid client, expected SNS | SNSClient");
20
- }
21
- yield page;
22
- const prevToken = token;
23
- token = page.NextToken;
24
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
25
- }
26
- return undefined;
27
- }
28
- exports.paginateListTopics = paginateListTopics;
7
+ exports.paginateListTopics = (0, core_1.createPaginator)(SNSClient_1.SNSClient, ListTopicsCommand_1.ListTopicsCommand, "NextToken", "NextToken", "");