@aws-sdk/client-wisdom 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 (43) hide show
  1. package/dist-cjs/pagination/ListAssistantAssociationsPaginator.js +2 -24
  2. package/dist-cjs/pagination/ListAssistantsPaginator.js +2 -24
  3. package/dist-cjs/pagination/ListContentsPaginator.js +2 -24
  4. package/dist-cjs/pagination/ListImportJobsPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListKnowledgeBasesPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListQuickResponsesPaginator.js +2 -24
  7. package/dist-cjs/pagination/QueryAssistantPaginator.js +2 -24
  8. package/dist-cjs/pagination/SearchContentPaginator.js +2 -24
  9. package/dist-cjs/pagination/SearchQuickResponsesPaginator.js +2 -24
  10. package/dist-cjs/pagination/SearchSessionsPaginator.js +2 -24
  11. package/dist-cjs/protocols/Aws_restJson1.js +242 -559
  12. package/dist-es/pagination/ListAssistantAssociationsPaginator.js +2 -23
  13. package/dist-es/pagination/ListAssistantsPaginator.js +2 -23
  14. package/dist-es/pagination/ListContentsPaginator.js +2 -23
  15. package/dist-es/pagination/ListImportJobsPaginator.js +2 -23
  16. package/dist-es/pagination/ListKnowledgeBasesPaginator.js +2 -23
  17. package/dist-es/pagination/ListQuickResponsesPaginator.js +2 -23
  18. package/dist-es/pagination/QueryAssistantPaginator.js +2 -23
  19. package/dist-es/pagination/SearchContentPaginator.js +2 -23
  20. package/dist-es/pagination/SearchQuickResponsesPaginator.js +2 -23
  21. package/dist-es/pagination/SearchSessionsPaginator.js +2 -23
  22. package/dist-es/protocols/Aws_restJson1.js +243 -560
  23. package/dist-types/pagination/ListAssistantAssociationsPaginator.d.ts +1 -1
  24. package/dist-types/pagination/ListAssistantsPaginator.d.ts +1 -1
  25. package/dist-types/pagination/ListContentsPaginator.d.ts +1 -1
  26. package/dist-types/pagination/ListImportJobsPaginator.d.ts +1 -1
  27. package/dist-types/pagination/ListKnowledgeBasesPaginator.d.ts +1 -1
  28. package/dist-types/pagination/ListQuickResponsesPaginator.d.ts +1 -1
  29. package/dist-types/pagination/QueryAssistantPaginator.d.ts +1 -1
  30. package/dist-types/pagination/SearchContentPaginator.d.ts +1 -1
  31. package/dist-types/pagination/SearchQuickResponsesPaginator.d.ts +1 -1
  32. package/dist-types/pagination/SearchSessionsPaginator.d.ts +1 -1
  33. package/dist-types/ts3.4/pagination/ListAssistantAssociationsPaginator.d.ts +3 -3
  34. package/dist-types/ts3.4/pagination/ListAssistantsPaginator.d.ts +3 -3
  35. package/dist-types/ts3.4/pagination/ListContentsPaginator.d.ts +3 -3
  36. package/dist-types/ts3.4/pagination/ListImportJobsPaginator.d.ts +3 -3
  37. package/dist-types/ts3.4/pagination/ListKnowledgeBasesPaginator.d.ts +3 -3
  38. package/dist-types/ts3.4/pagination/ListQuickResponsesPaginator.d.ts +3 -3
  39. package/dist-types/ts3.4/pagination/QueryAssistantPaginator.d.ts +3 -3
  40. package/dist-types/ts3.4/pagination/SearchContentPaginator.d.ts +3 -3
  41. package/dist-types/ts3.4/pagination/SearchQuickResponsesPaginator.d.ts +3 -3
  42. package/dist-types/ts3.4/pagination/SearchSessionsPaginator.d.ts +3 -3
  43. package/package.json +7 -6
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListAssistantAssociationsCommand, } from "../commands/ListAssistantAssociationsCommand";
2
3
  import { WisdomClient } from "../WisdomClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAssistantAssociationsCommand(input), ...args);
5
- };
6
- export async function* paginateListAssistantAssociations(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 WisdomClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Wisdom | WisdomClient");
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 paginateListAssistantAssociations = createPaginator(WisdomClient, ListAssistantAssociationsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListAssistantsCommand, } from "../commands/ListAssistantsCommand";
2
3
  import { WisdomClient } from "../WisdomClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAssistantsCommand(input), ...args);
5
- };
6
- export async function* paginateListAssistants(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 WisdomClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Wisdom | WisdomClient");
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 paginateListAssistants = createPaginator(WisdomClient, ListAssistantsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListContentsCommand, } from "../commands/ListContentsCommand";
2
3
  import { WisdomClient } from "../WisdomClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListContentsCommand(input), ...args);
5
- };
6
- export async function* paginateListContents(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 WisdomClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Wisdom | WisdomClient");
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 paginateListContents = createPaginator(WisdomClient, ListContentsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListImportJobsCommand, } from "../commands/ListImportJobsCommand";
2
3
  import { WisdomClient } from "../WisdomClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListImportJobsCommand(input), ...args);
5
- };
6
- export async function* paginateListImportJobs(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 WisdomClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Wisdom | WisdomClient");
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 paginateListImportJobs = createPaginator(WisdomClient, ListImportJobsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListKnowledgeBasesCommand, } from "../commands/ListKnowledgeBasesCommand";
2
3
  import { WisdomClient } from "../WisdomClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListKnowledgeBasesCommand(input), ...args);
5
- };
6
- export async function* paginateListKnowledgeBases(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 WisdomClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Wisdom | WisdomClient");
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 paginateListKnowledgeBases = createPaginator(WisdomClient, ListKnowledgeBasesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListQuickResponsesCommand, } from "../commands/ListQuickResponsesCommand";
2
3
  import { WisdomClient } from "../WisdomClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListQuickResponsesCommand(input), ...args);
5
- };
6
- export async function* paginateListQuickResponses(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 WisdomClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Wisdom | WisdomClient");
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 paginateListQuickResponses = createPaginator(WisdomClient, ListQuickResponsesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { QueryAssistantCommand, } from "../commands/QueryAssistantCommand";
2
3
  import { WisdomClient } from "../WisdomClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new QueryAssistantCommand(input), ...args);
5
- };
6
- export async function* paginateQueryAssistant(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 WisdomClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Wisdom | WisdomClient");
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 paginateQueryAssistant = createPaginator(WisdomClient, QueryAssistantCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { SearchContentCommand, } from "../commands/SearchContentCommand";
2
3
  import { WisdomClient } from "../WisdomClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new SearchContentCommand(input), ...args);
5
- };
6
- export async function* paginateSearchContent(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 WisdomClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Wisdom | WisdomClient");
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 paginateSearchContent = createPaginator(WisdomClient, SearchContentCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { SearchQuickResponsesCommand, } from "../commands/SearchQuickResponsesCommand";
2
3
  import { WisdomClient } from "../WisdomClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new SearchQuickResponsesCommand(input), ...args);
5
- };
6
- export async function* paginateSearchQuickResponses(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 WisdomClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Wisdom | WisdomClient");
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 paginateSearchQuickResponses = createPaginator(WisdomClient, SearchQuickResponsesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { SearchSessionsCommand, } from "../commands/SearchSessionsCommand";
2
3
  import { WisdomClient } from "../WisdomClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new SearchSessionsCommand(input), ...args);
5
- };
6
- export async function* paginateSearchSessions(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 WisdomClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Wisdom | WisdomClient");
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 paginateSearchSessions = createPaginator(WisdomClient, SearchSessionsCommand, "nextToken", "nextToken", "maxResults");