@aws-sdk/client-connectcases 3.477.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 (37) hide show
  1. package/dist-cjs/pagination/GetCasePaginator.js +2 -23
  2. package/dist-cjs/pagination/ListCasesForContactPaginator.js +2 -24
  3. package/dist-cjs/pagination/ListDomainsPaginator.js +2 -24
  4. package/dist-cjs/pagination/ListFieldOptionsPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListFieldsPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListLayoutsPaginator.js +2 -24
  7. package/dist-cjs/pagination/ListTemplatesPaginator.js +2 -24
  8. package/dist-cjs/pagination/SearchCasesPaginator.js +2 -24
  9. package/dist-cjs/pagination/SearchRelatedItemsPaginator.js +2 -24
  10. package/dist-es/pagination/GetCasePaginator.js +2 -22
  11. package/dist-es/pagination/ListCasesForContactPaginator.js +2 -23
  12. package/dist-es/pagination/ListDomainsPaginator.js +2 -23
  13. package/dist-es/pagination/ListFieldOptionsPaginator.js +2 -23
  14. package/dist-es/pagination/ListFieldsPaginator.js +2 -23
  15. package/dist-es/pagination/ListLayoutsPaginator.js +2 -23
  16. package/dist-es/pagination/ListTemplatesPaginator.js +2 -23
  17. package/dist-es/pagination/SearchCasesPaginator.js +2 -23
  18. package/dist-es/pagination/SearchRelatedItemsPaginator.js +2 -23
  19. package/dist-types/pagination/GetCasePaginator.d.ts +1 -1
  20. package/dist-types/pagination/ListCasesForContactPaginator.d.ts +1 -1
  21. package/dist-types/pagination/ListDomainsPaginator.d.ts +1 -1
  22. package/dist-types/pagination/ListFieldOptionsPaginator.d.ts +1 -1
  23. package/dist-types/pagination/ListFieldsPaginator.d.ts +1 -1
  24. package/dist-types/pagination/ListLayoutsPaginator.d.ts +1 -1
  25. package/dist-types/pagination/ListTemplatesPaginator.d.ts +1 -1
  26. package/dist-types/pagination/SearchCasesPaginator.d.ts +1 -1
  27. package/dist-types/pagination/SearchRelatedItemsPaginator.d.ts +1 -1
  28. package/dist-types/ts3.4/pagination/GetCasePaginator.d.ts +3 -3
  29. package/dist-types/ts3.4/pagination/ListCasesForContactPaginator.d.ts +3 -3
  30. package/dist-types/ts3.4/pagination/ListDomainsPaginator.d.ts +3 -3
  31. package/dist-types/ts3.4/pagination/ListFieldOptionsPaginator.d.ts +3 -3
  32. package/dist-types/ts3.4/pagination/ListFieldsPaginator.d.ts +3 -3
  33. package/dist-types/ts3.4/pagination/ListLayoutsPaginator.d.ts +3 -3
  34. package/dist-types/ts3.4/pagination/ListTemplatesPaginator.d.ts +3 -3
  35. package/dist-types/ts3.4/pagination/SearchCasesPaginator.d.ts +3 -3
  36. package/dist-types/ts3.4/pagination/SearchRelatedItemsPaginator.d.ts +3 -3
  37. package/package.json +5 -5
@@ -1,28 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateGetCase = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const GetCaseCommand_1 = require("../commands/GetCaseCommand");
5
6
  const ConnectCasesClient_1 = require("../ConnectCasesClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new GetCaseCommand_1.GetCaseCommand(input), ...args);
8
- };
9
- async function* paginateGetCase(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 ConnectCasesClient_1.ConnectCasesClient) {
16
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
17
- }
18
- else {
19
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
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.paginateGetCase = paginateGetCase;
7
+ exports.paginateGetCase = (0, core_1.createPaginator)(ConnectCasesClient_1.ConnectCasesClient, GetCaseCommand_1.GetCaseCommand, "nextToken", "nextToken", "");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListCasesForContact = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListCasesForContactCommand_1 = require("../commands/ListCasesForContactCommand");
5
6
  const ConnectCasesClient_1 = require("../ConnectCasesClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListCasesForContactCommand_1.ListCasesForContactCommand(input), ...args);
8
- };
9
- async function* paginateListCasesForContact(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 ConnectCasesClient_1.ConnectCasesClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
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.paginateListCasesForContact = paginateListCasesForContact;
7
+ exports.paginateListCasesForContact = (0, core_1.createPaginator)(ConnectCasesClient_1.ConnectCasesClient, ListCasesForContactCommand_1.ListCasesForContactCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListDomains = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListDomainsCommand_1 = require("../commands/ListDomainsCommand");
5
6
  const ConnectCasesClient_1 = require("../ConnectCasesClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListDomainsCommand_1.ListDomainsCommand(input), ...args);
8
- };
9
- async function* paginateListDomains(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 ConnectCasesClient_1.ConnectCasesClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
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.paginateListDomains = paginateListDomains;
7
+ exports.paginateListDomains = (0, core_1.createPaginator)(ConnectCasesClient_1.ConnectCasesClient, ListDomainsCommand_1.ListDomainsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListFieldOptions = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListFieldOptionsCommand_1 = require("../commands/ListFieldOptionsCommand");
5
6
  const ConnectCasesClient_1 = require("../ConnectCasesClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListFieldOptionsCommand_1.ListFieldOptionsCommand(input), ...args);
8
- };
9
- async function* paginateListFieldOptions(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 ConnectCasesClient_1.ConnectCasesClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
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.paginateListFieldOptions = paginateListFieldOptions;
7
+ exports.paginateListFieldOptions = (0, core_1.createPaginator)(ConnectCasesClient_1.ConnectCasesClient, ListFieldOptionsCommand_1.ListFieldOptionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListFields = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListFieldsCommand_1 = require("../commands/ListFieldsCommand");
5
6
  const ConnectCasesClient_1 = require("../ConnectCasesClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListFieldsCommand_1.ListFieldsCommand(input), ...args);
8
- };
9
- async function* paginateListFields(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 ConnectCasesClient_1.ConnectCasesClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
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.paginateListFields = paginateListFields;
7
+ exports.paginateListFields = (0, core_1.createPaginator)(ConnectCasesClient_1.ConnectCasesClient, ListFieldsCommand_1.ListFieldsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListLayouts = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListLayoutsCommand_1 = require("../commands/ListLayoutsCommand");
5
6
  const ConnectCasesClient_1 = require("../ConnectCasesClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListLayoutsCommand_1.ListLayoutsCommand(input), ...args);
8
- };
9
- async function* paginateListLayouts(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 ConnectCasesClient_1.ConnectCasesClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
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.paginateListLayouts = paginateListLayouts;
7
+ exports.paginateListLayouts = (0, core_1.createPaginator)(ConnectCasesClient_1.ConnectCasesClient, ListLayoutsCommand_1.ListLayoutsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListTemplates = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListTemplatesCommand_1 = require("../commands/ListTemplatesCommand");
5
6
  const ConnectCasesClient_1 = require("../ConnectCasesClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListTemplatesCommand_1.ListTemplatesCommand(input), ...args);
8
- };
9
- async function* paginateListTemplates(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 ConnectCasesClient_1.ConnectCasesClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
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.paginateListTemplates = paginateListTemplates;
7
+ exports.paginateListTemplates = (0, core_1.createPaginator)(ConnectCasesClient_1.ConnectCasesClient, ListTemplatesCommand_1.ListTemplatesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateSearchCases = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const SearchCasesCommand_1 = require("../commands/SearchCasesCommand");
5
6
  const ConnectCasesClient_1 = require("../ConnectCasesClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new SearchCasesCommand_1.SearchCasesCommand(input), ...args);
8
- };
9
- async function* paginateSearchCases(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 ConnectCasesClient_1.ConnectCasesClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
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.paginateSearchCases = paginateSearchCases;
7
+ exports.paginateSearchCases = (0, core_1.createPaginator)(ConnectCasesClient_1.ConnectCasesClient, SearchCasesCommand_1.SearchCasesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateSearchRelatedItems = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const SearchRelatedItemsCommand_1 = require("../commands/SearchRelatedItemsCommand");
5
6
  const ConnectCasesClient_1 = require("../ConnectCasesClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new SearchRelatedItemsCommand_1.SearchRelatedItemsCommand(input), ...args);
8
- };
9
- async function* paginateSearchRelatedItems(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 ConnectCasesClient_1.ConnectCasesClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
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.paginateSearchRelatedItems = paginateSearchRelatedItems;
7
+ exports.paginateSearchRelatedItems = (0, core_1.createPaginator)(ConnectCasesClient_1.ConnectCasesClient, SearchRelatedItemsCommand_1.SearchRelatedItemsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,24 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { GetCaseCommand } from "../commands/GetCaseCommand";
2
3
  import { ConnectCasesClient } from "../ConnectCasesClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new GetCaseCommand(input), ...args);
5
- };
6
- export async function* paginateGetCase(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- if (config.client instanceof ConnectCasesClient) {
13
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
14
- }
15
- else {
16
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
17
- }
18
- yield page;
19
- const prevToken = token;
20
- token = page.nextToken;
21
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
22
- }
23
- return undefined;
24
- }
4
+ export const paginateGetCase = createPaginator(ConnectCasesClient, GetCaseCommand, "nextToken", "nextToken", "");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListCasesForContactCommand, } from "../commands/ListCasesForContactCommand";
2
3
  import { ConnectCasesClient } from "../ConnectCasesClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListCasesForContactCommand(input), ...args);
5
- };
6
- export async function* paginateListCasesForContact(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- input["maxResults"] = config.pageSize;
13
- if (config.client instanceof ConnectCasesClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListCasesForContact = createPaginator(ConnectCasesClient, ListCasesForContactCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListDomainsCommand } from "../commands/ListDomainsCommand";
2
3
  import { ConnectCasesClient } from "../ConnectCasesClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListDomainsCommand(input), ...args);
5
- };
6
- export async function* paginateListDomains(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- input["maxResults"] = config.pageSize;
13
- if (config.client instanceof ConnectCasesClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListDomains = createPaginator(ConnectCasesClient, ListDomainsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListFieldOptionsCommand, } from "../commands/ListFieldOptionsCommand";
2
3
  import { ConnectCasesClient } from "../ConnectCasesClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListFieldOptionsCommand(input), ...args);
5
- };
6
- export async function* paginateListFieldOptions(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- input["maxResults"] = config.pageSize;
13
- if (config.client instanceof ConnectCasesClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListFieldOptions = createPaginator(ConnectCasesClient, ListFieldOptionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListFieldsCommand } from "../commands/ListFieldsCommand";
2
3
  import { ConnectCasesClient } from "../ConnectCasesClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListFieldsCommand(input), ...args);
5
- };
6
- export async function* paginateListFields(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- input["maxResults"] = config.pageSize;
13
- if (config.client instanceof ConnectCasesClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListFields = createPaginator(ConnectCasesClient, ListFieldsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListLayoutsCommand } from "../commands/ListLayoutsCommand";
2
3
  import { ConnectCasesClient } from "../ConnectCasesClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListLayoutsCommand(input), ...args);
5
- };
6
- export async function* paginateListLayouts(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- input["maxResults"] = config.pageSize;
13
- if (config.client instanceof ConnectCasesClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListLayouts = createPaginator(ConnectCasesClient, ListLayoutsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListTemplatesCommand, } from "../commands/ListTemplatesCommand";
2
3
  import { ConnectCasesClient } from "../ConnectCasesClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListTemplatesCommand(input), ...args);
5
- };
6
- export async function* paginateListTemplates(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- input["maxResults"] = config.pageSize;
13
- if (config.client instanceof ConnectCasesClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListTemplates = createPaginator(ConnectCasesClient, ListTemplatesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { SearchCasesCommand } from "../commands/SearchCasesCommand";
2
3
  import { ConnectCasesClient } from "../ConnectCasesClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new SearchCasesCommand(input), ...args);
5
- };
6
- export async function* paginateSearchCases(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- input["maxResults"] = config.pageSize;
13
- if (config.client instanceof ConnectCasesClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateSearchCases = createPaginator(ConnectCasesClient, SearchCasesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { SearchRelatedItemsCommand, } from "../commands/SearchRelatedItemsCommand";
2
3
  import { ConnectCasesClient } from "../ConnectCasesClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new SearchRelatedItemsCommand(input), ...args);
5
- };
6
- export async function* paginateSearchRelatedItems(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- input["maxResults"] = config.pageSize;
13
- if (config.client instanceof ConnectCasesClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateSearchRelatedItems = createPaginator(ConnectCasesClient, SearchRelatedItemsCommand, "nextToken", "nextToken", "maxResults");
@@ -4,4 +4,4 @@ import { ConnectCasesPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateGetCase(config: ConnectCasesPaginationConfiguration, input: GetCaseCommandInput, ...additionalArguments: any): Paginator<GetCaseCommandOutput>;
7
+ export declare const paginateGetCase: (config: ConnectCasesPaginationConfiguration, input: GetCaseCommandInput, ...rest: any[]) => Paginator<GetCaseCommandOutput>;
@@ -4,4 +4,4 @@ import { ConnectCasesPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListCasesForContact(config: ConnectCasesPaginationConfiguration, input: ListCasesForContactCommandInput, ...additionalArguments: any): Paginator<ListCasesForContactCommandOutput>;
7
+ export declare const paginateListCasesForContact: (config: ConnectCasesPaginationConfiguration, input: ListCasesForContactCommandInput, ...rest: any[]) => Paginator<ListCasesForContactCommandOutput>;
@@ -4,4 +4,4 @@ import { ConnectCasesPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListDomains(config: ConnectCasesPaginationConfiguration, input: ListDomainsCommandInput, ...additionalArguments: any): Paginator<ListDomainsCommandOutput>;
7
+ export declare const paginateListDomains: (config: ConnectCasesPaginationConfiguration, input: ListDomainsCommandInput, ...rest: any[]) => Paginator<ListDomainsCommandOutput>;
@@ -4,4 +4,4 @@ import { ConnectCasesPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListFieldOptions(config: ConnectCasesPaginationConfiguration, input: ListFieldOptionsCommandInput, ...additionalArguments: any): Paginator<ListFieldOptionsCommandOutput>;
7
+ export declare const paginateListFieldOptions: (config: ConnectCasesPaginationConfiguration, input: ListFieldOptionsCommandInput, ...rest: any[]) => Paginator<ListFieldOptionsCommandOutput>;
@@ -4,4 +4,4 @@ import { ConnectCasesPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListFields(config: ConnectCasesPaginationConfiguration, input: ListFieldsCommandInput, ...additionalArguments: any): Paginator<ListFieldsCommandOutput>;
7
+ export declare const paginateListFields: (config: ConnectCasesPaginationConfiguration, input: ListFieldsCommandInput, ...rest: any[]) => Paginator<ListFieldsCommandOutput>;
@@ -4,4 +4,4 @@ import { ConnectCasesPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListLayouts(config: ConnectCasesPaginationConfiguration, input: ListLayoutsCommandInput, ...additionalArguments: any): Paginator<ListLayoutsCommandOutput>;
7
+ export declare const paginateListLayouts: (config: ConnectCasesPaginationConfiguration, input: ListLayoutsCommandInput, ...rest: any[]) => Paginator<ListLayoutsCommandOutput>;
@@ -4,4 +4,4 @@ import { ConnectCasesPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListTemplates(config: ConnectCasesPaginationConfiguration, input: ListTemplatesCommandInput, ...additionalArguments: any): Paginator<ListTemplatesCommandOutput>;
7
+ export declare const paginateListTemplates: (config: ConnectCasesPaginationConfiguration, input: ListTemplatesCommandInput, ...rest: any[]) => Paginator<ListTemplatesCommandOutput>;
@@ -4,4 +4,4 @@ import { ConnectCasesPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateSearchCases(config: ConnectCasesPaginationConfiguration, input: SearchCasesCommandInput, ...additionalArguments: any): Paginator<SearchCasesCommandOutput>;
7
+ export declare const paginateSearchCases: (config: ConnectCasesPaginationConfiguration, input: SearchCasesCommandInput, ...rest: any[]) => Paginator<SearchCasesCommandOutput>;
@@ -4,4 +4,4 @@ import { ConnectCasesPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateSearchRelatedItems(config: ConnectCasesPaginationConfiguration, input: SearchRelatedItemsCommandInput, ...additionalArguments: any): Paginator<SearchRelatedItemsCommandOutput>;
7
+ export declare const paginateSearchRelatedItems: (config: ConnectCasesPaginationConfiguration, input: SearchRelatedItemsCommandInput, ...rest: any[]) => Paginator<SearchRelatedItemsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  GetCaseCommandOutput,
5
5
  } from "../commands/GetCaseCommand";
6
6
  import { ConnectCasesPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateGetCase(
7
+ export declare const paginateGetCase: (
8
8
  config: ConnectCasesPaginationConfiguration,
9
9
  input: GetCaseCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<GetCaseCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<GetCaseCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListCasesForContactCommandOutput,
5
5
  } from "../commands/ListCasesForContactCommand";
6
6
  import { ConnectCasesPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListCasesForContact(
7
+ export declare const paginateListCasesForContact: (
8
8
  config: ConnectCasesPaginationConfiguration,
9
9
  input: ListCasesForContactCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListCasesForContactCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListCasesForContactCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListDomainsCommandOutput,
5
5
  } from "../commands/ListDomainsCommand";
6
6
  import { ConnectCasesPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListDomains(
7
+ export declare const paginateListDomains: (
8
8
  config: ConnectCasesPaginationConfiguration,
9
9
  input: ListDomainsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListDomainsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListDomainsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListFieldOptionsCommandOutput,
5
5
  } from "../commands/ListFieldOptionsCommand";
6
6
  import { ConnectCasesPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListFieldOptions(
7
+ export declare const paginateListFieldOptions: (
8
8
  config: ConnectCasesPaginationConfiguration,
9
9
  input: ListFieldOptionsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListFieldOptionsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListFieldOptionsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListFieldsCommandOutput,
5
5
  } from "../commands/ListFieldsCommand";
6
6
  import { ConnectCasesPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListFields(
7
+ export declare const paginateListFields: (
8
8
  config: ConnectCasesPaginationConfiguration,
9
9
  input: ListFieldsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListFieldsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListFieldsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListLayoutsCommandOutput,
5
5
  } from "../commands/ListLayoutsCommand";
6
6
  import { ConnectCasesPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListLayouts(
7
+ export declare const paginateListLayouts: (
8
8
  config: ConnectCasesPaginationConfiguration,
9
9
  input: ListLayoutsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListLayoutsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListLayoutsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListTemplatesCommandOutput,
5
5
  } from "../commands/ListTemplatesCommand";
6
6
  import { ConnectCasesPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListTemplates(
7
+ export declare const paginateListTemplates: (
8
8
  config: ConnectCasesPaginationConfiguration,
9
9
  input: ListTemplatesCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListTemplatesCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListTemplatesCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  SearchCasesCommandOutput,
5
5
  } from "../commands/SearchCasesCommand";
6
6
  import { ConnectCasesPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateSearchCases(
7
+ export declare const paginateSearchCases: (
8
8
  config: ConnectCasesPaginationConfiguration,
9
9
  input: SearchCasesCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<SearchCasesCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<SearchCasesCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  SearchRelatedItemsCommandOutput,
5
5
  } from "../commands/SearchRelatedItemsCommand";
6
6
  import { ConnectCasesPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateSearchRelatedItems(
7
+ export declare const paginateSearchRelatedItems: (
8
8
  config: ConnectCasesPaginationConfiguration,
9
9
  input: SearchRelatedItemsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<SearchRelatedItemsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<SearchRelatedItemsCommandOutput>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-connectcases",
3
3
  "description": "AWS SDK for JavaScript Connectcases Client for Node.js, Browser and React Native",
4
- "version": "3.477.0",
4
+ "version": "3.478.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,17 +20,17 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.477.0",
23
+ "@aws-sdk/client-sts": "3.478.0",
24
24
  "@aws-sdk/core": "3.477.0",
25
- "@aws-sdk/credential-provider-node": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.478.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
29
29
  "@aws-sdk/middleware-signing": "3.468.0",
30
- "@aws-sdk/middleware-user-agent": "3.470.0",
30
+ "@aws-sdk/middleware-user-agent": "3.478.0",
31
31
  "@aws-sdk/region-config-resolver": "3.470.0",
32
32
  "@aws-sdk/types": "3.468.0",
33
- "@aws-sdk/util-endpoints": "3.470.0",
33
+ "@aws-sdk/util-endpoints": "3.478.0",
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",