@aws-sdk/client-connectcases 3.184.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/CHANGELOG.md +11 -0
- package/LICENSE +201 -0
- package/README.md +210 -0
- package/dist-cjs/ConnectCases.js +442 -0
- package/dist-cjs/ConnectCasesClient.js +37 -0
- package/dist-cjs/commands/BatchGetFieldCommand.js +36 -0
- package/dist-cjs/commands/BatchPutFieldOptionsCommand.js +36 -0
- package/dist-cjs/commands/CreateCaseCommand.js +36 -0
- package/dist-cjs/commands/CreateDomainCommand.js +36 -0
- package/dist-cjs/commands/CreateFieldCommand.js +36 -0
- package/dist-cjs/commands/CreateLayoutCommand.js +36 -0
- package/dist-cjs/commands/CreateRelatedItemCommand.js +36 -0
- package/dist-cjs/commands/CreateTemplateCommand.js +36 -0
- package/dist-cjs/commands/GetCaseCommand.js +36 -0
- package/dist-cjs/commands/GetCaseEventConfigurationCommand.js +36 -0
- package/dist-cjs/commands/GetDomainCommand.js +36 -0
- package/dist-cjs/commands/GetLayoutCommand.js +36 -0
- package/dist-cjs/commands/GetTemplateCommand.js +36 -0
- package/dist-cjs/commands/ListCasesForContactCommand.js +36 -0
- package/dist-cjs/commands/ListDomainsCommand.js +36 -0
- package/dist-cjs/commands/ListFieldOptionsCommand.js +36 -0
- package/dist-cjs/commands/ListFieldsCommand.js +36 -0
- package/dist-cjs/commands/ListLayoutsCommand.js +36 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +36 -0
- package/dist-cjs/commands/ListTemplatesCommand.js +36 -0
- package/dist-cjs/commands/PutCaseEventConfigurationCommand.js +36 -0
- package/dist-cjs/commands/SearchCasesCommand.js +36 -0
- package/dist-cjs/commands/SearchRelatedItemsCommand.js +36 -0
- package/dist-cjs/commands/TagResourceCommand.js +36 -0
- package/dist-cjs/commands/UntagResourceCommand.js +36 -0
- package/dist-cjs/commands/UpdateCaseCommand.js +36 -0
- package/dist-cjs/commands/UpdateFieldCommand.js +36 -0
- package/dist-cjs/commands/UpdateLayoutCommand.js +36 -0
- package/dist-cjs/commands/UpdateTemplateCommand.js +36 -0
- package/dist-cjs/commands/index.js +32 -0
- package/dist-cjs/endpoints.js +132 -0
- package/dist-cjs/index.js +11 -0
- package/dist-cjs/models/ConnectCasesServiceException.js +11 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +661 -0
- package/dist-cjs/pagination/GetCasePaginator.js +35 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListCasesForContactPaginator.js +36 -0
- package/dist-cjs/pagination/ListDomainsPaginator.js +36 -0
- package/dist-cjs/pagination/ListFieldOptionsPaginator.js +36 -0
- package/dist-cjs/pagination/ListFieldsPaginator.js +36 -0
- package/dist-cjs/pagination/ListLayoutsPaginator.js +36 -0
- package/dist-cjs/pagination/ListTemplatesPaginator.js +36 -0
- package/dist-cjs/pagination/SearchCasesPaginator.js +36 -0
- package/dist-cjs/pagination/SearchRelatedItemsPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +13 -0
- package/dist-cjs/protocols/Aws_restJson1.js +2920 -0
- package/dist-cjs/runtimeConfig.browser.js +45 -0
- package/dist-cjs/runtimeConfig.js +52 -0
- package/dist-cjs/runtimeConfig.native.js +16 -0
- package/dist-cjs/runtimeConfig.shared.js +17 -0
- package/dist-es/ConnectCases.js +438 -0
- package/dist-es/ConnectCasesClient.js +33 -0
- package/dist-es/commands/BatchGetFieldCommand.js +32 -0
- package/dist-es/commands/BatchPutFieldOptionsCommand.js +32 -0
- package/dist-es/commands/CreateCaseCommand.js +32 -0
- package/dist-es/commands/CreateDomainCommand.js +32 -0
- package/dist-es/commands/CreateFieldCommand.js +32 -0
- package/dist-es/commands/CreateLayoutCommand.js +32 -0
- package/dist-es/commands/CreateRelatedItemCommand.js +32 -0
- package/dist-es/commands/CreateTemplateCommand.js +32 -0
- package/dist-es/commands/GetCaseCommand.js +32 -0
- package/dist-es/commands/GetCaseEventConfigurationCommand.js +32 -0
- package/dist-es/commands/GetDomainCommand.js +32 -0
- package/dist-es/commands/GetLayoutCommand.js +32 -0
- package/dist-es/commands/GetTemplateCommand.js +32 -0
- package/dist-es/commands/ListCasesForContactCommand.js +32 -0
- package/dist-es/commands/ListDomainsCommand.js +32 -0
- package/dist-es/commands/ListFieldOptionsCommand.js +32 -0
- package/dist-es/commands/ListFieldsCommand.js +32 -0
- package/dist-es/commands/ListLayoutsCommand.js +32 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +32 -0
- package/dist-es/commands/ListTemplatesCommand.js +32 -0
- package/dist-es/commands/PutCaseEventConfigurationCommand.js +32 -0
- package/dist-es/commands/SearchCasesCommand.js +32 -0
- package/dist-es/commands/SearchRelatedItemsCommand.js +32 -0
- package/dist-es/commands/TagResourceCommand.js +32 -0
- package/dist-es/commands/UntagResourceCommand.js +32 -0
- package/dist-es/commands/UpdateCaseCommand.js +32 -0
- package/dist-es/commands/UpdateFieldCommand.js +32 -0
- package/dist-es/commands/UpdateLayoutCommand.js +32 -0
- package/dist-es/commands/UpdateTemplateCommand.js +32 -0
- package/dist-es/commands/index.js +29 -0
- package/dist-es/endpoints.js +128 -0
- package/dist-es/index.js +6 -0
- package/dist-es/models/ConnectCasesServiceException.js +7 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +556 -0
- package/dist-es/pagination/GetCasePaginator.js +31 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListCasesForContactPaginator.js +32 -0
- package/dist-es/pagination/ListDomainsPaginator.js +32 -0
- package/dist-es/pagination/ListFieldOptionsPaginator.js +32 -0
- package/dist-es/pagination/ListFieldsPaginator.js +32 -0
- package/dist-es/pagination/ListLayoutsPaginator.js +32 -0
- package/dist-es/pagination/ListTemplatesPaginator.js +32 -0
- package/dist-es/pagination/SearchCasesPaginator.js +32 -0
- package/dist-es/pagination/SearchRelatedItemsPaginator.js +32 -0
- package/dist-es/pagination/index.js +10 -0
- package/dist-es/protocols/Aws_restJson1.js +2853 -0
- package/dist-es/runtimeConfig.browser.js +40 -0
- package/dist-es/runtimeConfig.js +48 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +10 -0
- package/dist-types/ConnectCases.d.ts +276 -0
- package/dist-types/ConnectCasesClient.d.ts +178 -0
- package/dist-types/commands/BatchGetFieldCommand.d.ts +35 -0
- package/dist-types/commands/BatchPutFieldOptionsCommand.d.ts +36 -0
- package/dist-types/commands/CreateCaseCommand.d.ts +40 -0
- package/dist-types/commands/CreateDomainCommand.d.ts +42 -0
- package/dist-types/commands/CreateFieldCommand.d.ts +36 -0
- package/dist-types/commands/CreateLayoutCommand.d.ts +48 -0
- package/dist-types/commands/CreateRelatedItemCommand.d.ts +43 -0
- package/dist-types/commands/CreateTemplateCommand.d.ts +38 -0
- package/dist-types/commands/GetCaseCommand.d.ts +35 -0
- package/dist-types/commands/GetCaseEventConfigurationCommand.d.ts +35 -0
- package/dist-types/commands/GetDomainCommand.d.ts +35 -0
- package/dist-types/commands/GetLayoutCommand.d.ts +35 -0
- package/dist-types/commands/GetTemplateCommand.d.ts +35 -0
- package/dist-types/commands/ListCasesForContactCommand.d.ts +35 -0
- package/dist-types/commands/ListDomainsCommand.d.ts +36 -0
- package/dist-types/commands/ListFieldOptionsCommand.d.ts +35 -0
- package/dist-types/commands/ListFieldsCommand.d.ts +35 -0
- package/dist-types/commands/ListLayoutsCommand.d.ts +36 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +35 -0
- package/dist-types/commands/ListTemplatesCommand.d.ts +36 -0
- package/dist-types/commands/PutCaseEventConfigurationCommand.d.ts +35 -0
- package/dist-types/commands/SearchCasesCommand.d.ts +36 -0
- package/dist-types/commands/SearchRelatedItemsCommand.d.ts +39 -0
- package/dist-types/commands/TagResourceCommand.d.ts +35 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +35 -0
- package/dist-types/commands/UpdateCaseCommand.d.ts +38 -0
- package/dist-types/commands/UpdateFieldCommand.d.ts +35 -0
- package/dist-types/commands/UpdateLayoutCommand.d.ts +43 -0
- package/dist-types/commands/UpdateTemplateCommand.d.ts +39 -0
- package/dist-types/commands/index.d.ts +29 -0
- package/dist-types/endpoints.d.ts +2 -0
- package/dist-types/index.d.ts +6 -0
- package/dist-types/models/ConnectCasesServiceException.d.ts +10 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +1985 -0
- package/dist-types/pagination/GetCasePaginator.d.ts +4 -0
- package/dist-types/pagination/Interfaces.d.ts +6 -0
- package/dist-types/pagination/ListCasesForContactPaginator.d.ts +4 -0
- package/dist-types/pagination/ListDomainsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListFieldOptionsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListFieldsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListLayoutsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListTemplatesPaginator.d.ts +4 -0
- package/dist-types/pagination/SearchCasesPaginator.d.ts +4 -0
- package/dist-types/pagination/SearchRelatedItemsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +10 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +89 -0
- package/dist-types/runtimeConfig.browser.d.ts +40 -0
- package/dist-types/runtimeConfig.d.ts +40 -0
- package/dist-types/runtimeConfig.native.d.ts +39 -0
- package/dist-types/runtimeConfig.shared.d.ts +13 -0
- package/dist-types/ts3.4/ConnectCases.d.ts +497 -0
- package/dist-types/ts3.4/ConnectCasesClient.d.ts +279 -0
- package/dist-types/ts3.4/commands/BatchGetFieldCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/BatchPutFieldOptionsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/CreateCaseCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/CreateDomainCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/CreateFieldCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/CreateLayoutCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/CreateRelatedItemCommand.d.ts +36 -0
- package/dist-types/ts3.4/commands/CreateTemplateCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/GetCaseCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/GetCaseEventConfigurationCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/GetDomainCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/GetLayoutCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/GetTemplateCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/ListCasesForContactCommand.d.ts +36 -0
- package/dist-types/ts3.4/commands/ListDomainsCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/ListFieldOptionsCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/ListFieldsCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/ListLayoutsCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +36 -0
- package/dist-types/ts3.4/commands/ListTemplatesCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/PutCaseEventConfigurationCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/SearchCasesCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/SearchRelatedItemsCommand.d.ts +36 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +30 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +30 -0
- package/dist-types/ts3.4/commands/UpdateCaseCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/UpdateFieldCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/UpdateLayoutCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/UpdateTemplateCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/index.d.ts +29 -0
- package/dist-types/ts3.4/endpoints.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +6 -0
- package/dist-types/ts3.4/models/ConnectCasesServiceException.d.ts +7 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +988 -0
- package/dist-types/ts3.4/pagination/GetCasePaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +7 -0
- package/dist-types/ts3.4/pagination/ListCasesForContactPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListDomainsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListFieldOptionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListFieldsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListLayoutsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListTemplatesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/SearchCasesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/SearchRelatedItemsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +10 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +353 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +67 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +67 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +68 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +10 -0
- package/package.json +102 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ListFieldsCommand } from "../commands/ListFieldsCommand";
|
|
2
|
+
import { ConnectCases } from "../ConnectCases";
|
|
3
|
+
import { ConnectCasesClient } from "../ConnectCasesClient";
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new ListFieldsCommand(input), ...args);
|
|
6
|
+
};
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.listFields(input, ...args);
|
|
9
|
+
};
|
|
10
|
+
export async function* paginateListFields(config, input, ...additionalArguments) {
|
|
11
|
+
let token = config.startingToken || undefined;
|
|
12
|
+
let hasNext = true;
|
|
13
|
+
let page;
|
|
14
|
+
while (hasNext) {
|
|
15
|
+
input.nextToken = token;
|
|
16
|
+
input["maxResults"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof ConnectCases) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof ConnectCasesClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.nextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ListLayoutsCommand } from "../commands/ListLayoutsCommand";
|
|
2
|
+
import { ConnectCases } from "../ConnectCases";
|
|
3
|
+
import { ConnectCasesClient } from "../ConnectCasesClient";
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new ListLayoutsCommand(input), ...args);
|
|
6
|
+
};
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.listLayouts(input, ...args);
|
|
9
|
+
};
|
|
10
|
+
export async function* paginateListLayouts(config, input, ...additionalArguments) {
|
|
11
|
+
let token = config.startingToken || undefined;
|
|
12
|
+
let hasNext = true;
|
|
13
|
+
let page;
|
|
14
|
+
while (hasNext) {
|
|
15
|
+
input.nextToken = token;
|
|
16
|
+
input["maxResults"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof ConnectCases) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof ConnectCasesClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.nextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ListTemplatesCommand, } from "../commands/ListTemplatesCommand";
|
|
2
|
+
import { ConnectCases } from "../ConnectCases";
|
|
3
|
+
import { ConnectCasesClient } from "../ConnectCasesClient";
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new ListTemplatesCommand(input), ...args);
|
|
6
|
+
};
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.listTemplates(input, ...args);
|
|
9
|
+
};
|
|
10
|
+
export async function* paginateListTemplates(config, input, ...additionalArguments) {
|
|
11
|
+
let token = config.startingToken || undefined;
|
|
12
|
+
let hasNext = true;
|
|
13
|
+
let page;
|
|
14
|
+
while (hasNext) {
|
|
15
|
+
input.nextToken = token;
|
|
16
|
+
input["maxResults"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof ConnectCases) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof ConnectCasesClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.nextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SearchCasesCommand } from "../commands/SearchCasesCommand";
|
|
2
|
+
import { ConnectCases } from "../ConnectCases";
|
|
3
|
+
import { ConnectCasesClient } from "../ConnectCasesClient";
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new SearchCasesCommand(input), ...args);
|
|
6
|
+
};
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.searchCases(input, ...args);
|
|
9
|
+
};
|
|
10
|
+
export async function* paginateSearchCases(config, input, ...additionalArguments) {
|
|
11
|
+
let token = config.startingToken || undefined;
|
|
12
|
+
let hasNext = true;
|
|
13
|
+
let page;
|
|
14
|
+
while (hasNext) {
|
|
15
|
+
input.nextToken = token;
|
|
16
|
+
input["maxResults"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof ConnectCases) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof ConnectCasesClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.nextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SearchRelatedItemsCommand, } from "../commands/SearchRelatedItemsCommand";
|
|
2
|
+
import { ConnectCases } from "../ConnectCases";
|
|
3
|
+
import { ConnectCasesClient } from "../ConnectCasesClient";
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new SearchRelatedItemsCommand(input), ...args);
|
|
6
|
+
};
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.searchRelatedItems(input, ...args);
|
|
9
|
+
};
|
|
10
|
+
export async function* paginateSearchRelatedItems(config, input, ...additionalArguments) {
|
|
11
|
+
let token = config.startingToken || undefined;
|
|
12
|
+
let hasNext = true;
|
|
13
|
+
let page;
|
|
14
|
+
while (hasNext) {
|
|
15
|
+
input.nextToken = token;
|
|
16
|
+
input["maxResults"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof ConnectCases) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof ConnectCasesClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected ConnectCases | ConnectCasesClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.nextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./GetCasePaginator";
|
|
2
|
+
export * from "./Interfaces";
|
|
3
|
+
export * from "./ListCasesForContactPaginator";
|
|
4
|
+
export * from "./ListDomainsPaginator";
|
|
5
|
+
export * from "./ListFieldOptionsPaginator";
|
|
6
|
+
export * from "./ListFieldsPaginator";
|
|
7
|
+
export * from "./ListLayoutsPaginator";
|
|
8
|
+
export * from "./ListTemplatesPaginator";
|
|
9
|
+
export * from "./SearchCasesPaginator";
|
|
10
|
+
export * from "./SearchRelatedItemsPaginator";
|