@aws-sdk/client-lex-models-v2 3.180.0 → 3.183.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 (103) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist-cjs/protocols/Aws_restJson1.js +73 -67
  3. package/dist-es/LexModelsV2.js +270 -277
  4. package/dist-es/LexModelsV2Client.js +22 -28
  5. package/dist-es/commands/BuildBotLocaleCommand.js +21 -28
  6. package/dist-es/commands/CreateBotAliasCommand.js +21 -28
  7. package/dist-es/commands/CreateBotCommand.js +21 -28
  8. package/dist-es/commands/CreateBotLocaleCommand.js +21 -28
  9. package/dist-es/commands/CreateBotVersionCommand.js +21 -28
  10. package/dist-es/commands/CreateExportCommand.js +21 -28
  11. package/dist-es/commands/CreateIntentCommand.js +21 -28
  12. package/dist-es/commands/CreateResourcePolicyCommand.js +21 -28
  13. package/dist-es/commands/CreateResourcePolicyStatementCommand.js +21 -28
  14. package/dist-es/commands/CreateSlotCommand.js +21 -28
  15. package/dist-es/commands/CreateSlotTypeCommand.js +21 -28
  16. package/dist-es/commands/CreateUploadUrlCommand.js +21 -28
  17. package/dist-es/commands/DeleteBotAliasCommand.js +21 -28
  18. package/dist-es/commands/DeleteBotCommand.js +21 -28
  19. package/dist-es/commands/DeleteBotLocaleCommand.js +21 -28
  20. package/dist-es/commands/DeleteBotVersionCommand.js +21 -28
  21. package/dist-es/commands/DeleteCustomVocabularyCommand.js +21 -28
  22. package/dist-es/commands/DeleteExportCommand.js +21 -28
  23. package/dist-es/commands/DeleteImportCommand.js +21 -28
  24. package/dist-es/commands/DeleteIntentCommand.js +22 -29
  25. package/dist-es/commands/DeleteResourcePolicyCommand.js +21 -28
  26. package/dist-es/commands/DeleteResourcePolicyStatementCommand.js +21 -28
  27. package/dist-es/commands/DeleteSlotCommand.js +22 -29
  28. package/dist-es/commands/DeleteSlotTypeCommand.js +22 -29
  29. package/dist-es/commands/DeleteUtterancesCommand.js +21 -28
  30. package/dist-es/commands/DescribeBotAliasCommand.js +21 -28
  31. package/dist-es/commands/DescribeBotCommand.js +21 -28
  32. package/dist-es/commands/DescribeBotLocaleCommand.js +21 -28
  33. package/dist-es/commands/DescribeBotRecommendationCommand.js +21 -28
  34. package/dist-es/commands/DescribeBotVersionCommand.js +21 -28
  35. package/dist-es/commands/DescribeCustomVocabularyMetadataCommand.js +21 -28
  36. package/dist-es/commands/DescribeExportCommand.js +21 -28
  37. package/dist-es/commands/DescribeImportCommand.js +21 -28
  38. package/dist-es/commands/DescribeIntentCommand.js +21 -28
  39. package/dist-es/commands/DescribeResourcePolicyCommand.js +21 -28
  40. package/dist-es/commands/DescribeSlotCommand.js +21 -28
  41. package/dist-es/commands/DescribeSlotTypeCommand.js +21 -28
  42. package/dist-es/commands/ListAggregatedUtterancesCommand.js +21 -28
  43. package/dist-es/commands/ListBotAliasesCommand.js +21 -28
  44. package/dist-es/commands/ListBotLocalesCommand.js +21 -28
  45. package/dist-es/commands/ListBotRecommendationsCommand.js +21 -28
  46. package/dist-es/commands/ListBotVersionsCommand.js +21 -28
  47. package/dist-es/commands/ListBotsCommand.js +21 -28
  48. package/dist-es/commands/ListBuiltInIntentsCommand.js +21 -28
  49. package/dist-es/commands/ListBuiltInSlotTypesCommand.js +21 -28
  50. package/dist-es/commands/ListExportsCommand.js +21 -28
  51. package/dist-es/commands/ListImportsCommand.js +21 -28
  52. package/dist-es/commands/ListIntentsCommand.js +21 -28
  53. package/dist-es/commands/ListRecommendedIntentsCommand.js +21 -28
  54. package/dist-es/commands/ListSlotTypesCommand.js +21 -28
  55. package/dist-es/commands/ListSlotsCommand.js +21 -28
  56. package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
  57. package/dist-es/commands/SearchAssociatedTranscriptsCommand.js +21 -28
  58. package/dist-es/commands/StartBotRecommendationCommand.js +21 -28
  59. package/dist-es/commands/StartImportCommand.js +21 -28
  60. package/dist-es/commands/StopBotRecommendationCommand.js +21 -28
  61. package/dist-es/commands/TagResourceCommand.js +21 -28
  62. package/dist-es/commands/UntagResourceCommand.js +21 -28
  63. package/dist-es/commands/UpdateBotAliasCommand.js +21 -28
  64. package/dist-es/commands/UpdateBotCommand.js +21 -28
  65. package/dist-es/commands/UpdateBotLocaleCommand.js +21 -28
  66. package/dist-es/commands/UpdateBotRecommendationCommand.js +21 -28
  67. package/dist-es/commands/UpdateExportCommand.js +21 -28
  68. package/dist-es/commands/UpdateIntentCommand.js +21 -28
  69. package/dist-es/commands/UpdateResourcePolicyCommand.js +21 -28
  70. package/dist-es/commands/UpdateSlotCommand.js +21 -28
  71. package/dist-es/commands/UpdateSlotTypeCommand.js +21 -28
  72. package/dist-es/endpoints.js +8 -8
  73. package/dist-es/models/LexModelsV2ServiceException.js +5 -10
  74. package/dist-es/models/models_0.js +808 -319
  75. package/dist-es/models/models_1.js +78 -27
  76. package/dist-es/pagination/ListAggregatedUtterancesPaginator.js +25 -68
  77. package/dist-es/pagination/ListBotAliasesPaginator.js +25 -68
  78. package/dist-es/pagination/ListBotLocalesPaginator.js +25 -68
  79. package/dist-es/pagination/ListBotRecommendationsPaginator.js +25 -68
  80. package/dist-es/pagination/ListBotVersionsPaginator.js +25 -68
  81. package/dist-es/pagination/ListBotsPaginator.js +25 -68
  82. package/dist-es/pagination/ListBuiltInIntentsPaginator.js +25 -68
  83. package/dist-es/pagination/ListBuiltInSlotTypesPaginator.js +25 -68
  84. package/dist-es/pagination/ListExportsPaginator.js +25 -68
  85. package/dist-es/pagination/ListImportsPaginator.js +25 -68
  86. package/dist-es/pagination/ListIntentsPaginator.js +25 -68
  87. package/dist-es/pagination/ListRecommendedIntentsPaginator.js +25 -68
  88. package/dist-es/pagination/ListSlotTypesPaginator.js +25 -68
  89. package/dist-es/pagination/ListSlotsPaginator.js +25 -68
  90. package/dist-es/protocols/Aws_restJson1.js +7152 -8733
  91. package/dist-es/runtimeConfig.browser.js +26 -12
  92. package/dist-es/runtimeConfig.js +30 -12
  93. package/dist-es/runtimeConfig.native.js +8 -5
  94. package/dist-es/runtimeConfig.shared.js +8 -11
  95. package/dist-es/waiters/waitForBotAliasAvailable.js +45 -65
  96. package/dist-es/waiters/waitForBotAvailable.js +54 -74
  97. package/dist-es/waiters/waitForBotExportCompleted.js +45 -65
  98. package/dist-es/waiters/waitForBotImportCompleted.js +45 -65
  99. package/dist-es/waiters/waitForBotLocaleBuilt.js +54 -74
  100. package/dist-es/waiters/waitForBotLocaleCreated.js +63 -83
  101. package/dist-es/waiters/waitForBotLocaleExpressTestingAvailable.js +63 -83
  102. package/dist-es/waiters/waitForBotVersionAvailable.js +48 -68
  103. package/package.json +34 -34
@@ -1,27 +1,78 @@
1
- import { __assign } from "tslib";
2
- export var UpdateSlotTypeResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
3
- export var SlotValueOverrideFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
4
- export var IntentOverrideFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
5
- export var DialogStateFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
6
- export var ConditionalBranchFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
7
- export var DefaultConditionalBranchFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
8
- export var ConditionalSpecificationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
9
- export var IntentClosingSettingFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
10
- export var PostDialogCodeHookInvocationSpecificationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
11
- export var PostFulfillmentStatusSpecificationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
12
- export var DialogCodeHookInvocationSettingFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
13
- export var FulfillmentCodeHookSettingsFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
14
- export var InitialResponseSettingFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
15
- export var SlotCaptureSettingFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
16
- export var SlotValueElicitationSettingFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
17
- export var IntentConfirmationSettingFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
18
- export var CreateSlotRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
19
- export var CreateSlotResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
20
- export var DescribeSlotResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
21
- export var UpdateSlotRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
22
- export var UpdateSlotResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
23
- export var CreateIntentRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
24
- export var CreateIntentResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
25
- export var DescribeIntentResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
26
- export var UpdateIntentRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
27
- export var UpdateIntentResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
1
+ export const UpdateSlotTypeResponseFilterSensitiveLog = (obj) => ({
2
+ ...obj,
3
+ });
4
+ export const SlotValueOverrideFilterSensitiveLog = (obj) => ({
5
+ ...obj,
6
+ });
7
+ export const IntentOverrideFilterSensitiveLog = (obj) => ({
8
+ ...obj,
9
+ });
10
+ export const DialogStateFilterSensitiveLog = (obj) => ({
11
+ ...obj,
12
+ });
13
+ export const ConditionalBranchFilterSensitiveLog = (obj) => ({
14
+ ...obj,
15
+ });
16
+ export const DefaultConditionalBranchFilterSensitiveLog = (obj) => ({
17
+ ...obj,
18
+ });
19
+ export const ConditionalSpecificationFilterSensitiveLog = (obj) => ({
20
+ ...obj,
21
+ });
22
+ export const IntentClosingSettingFilterSensitiveLog = (obj) => ({
23
+ ...obj,
24
+ });
25
+ export const PostDialogCodeHookInvocationSpecificationFilterSensitiveLog = (obj) => ({
26
+ ...obj,
27
+ });
28
+ export const PostFulfillmentStatusSpecificationFilterSensitiveLog = (obj) => ({
29
+ ...obj,
30
+ });
31
+ export const DialogCodeHookInvocationSettingFilterSensitiveLog = (obj) => ({
32
+ ...obj,
33
+ });
34
+ export const FulfillmentCodeHookSettingsFilterSensitiveLog = (obj) => ({
35
+ ...obj,
36
+ });
37
+ export const InitialResponseSettingFilterSensitiveLog = (obj) => ({
38
+ ...obj,
39
+ });
40
+ export const SlotCaptureSettingFilterSensitiveLog = (obj) => ({
41
+ ...obj,
42
+ });
43
+ export const SlotValueElicitationSettingFilterSensitiveLog = (obj) => ({
44
+ ...obj,
45
+ });
46
+ export const IntentConfirmationSettingFilterSensitiveLog = (obj) => ({
47
+ ...obj,
48
+ });
49
+ export const CreateSlotRequestFilterSensitiveLog = (obj) => ({
50
+ ...obj,
51
+ });
52
+ export const CreateSlotResponseFilterSensitiveLog = (obj) => ({
53
+ ...obj,
54
+ });
55
+ export const DescribeSlotResponseFilterSensitiveLog = (obj) => ({
56
+ ...obj,
57
+ });
58
+ export const UpdateSlotRequestFilterSensitiveLog = (obj) => ({
59
+ ...obj,
60
+ });
61
+ export const UpdateSlotResponseFilterSensitiveLog = (obj) => ({
62
+ ...obj,
63
+ });
64
+ export const CreateIntentRequestFilterSensitiveLog = (obj) => ({
65
+ ...obj,
66
+ });
67
+ export const CreateIntentResponseFilterSensitiveLog = (obj) => ({
68
+ ...obj,
69
+ });
70
+ export const DescribeIntentResponseFilterSensitiveLog = (obj) => ({
71
+ ...obj,
72
+ });
73
+ export const UpdateIntentRequestFilterSensitiveLog = (obj) => ({
74
+ ...obj,
75
+ });
76
+ export const UpdateIntentResponseFilterSensitiveLog = (obj) => ({
77
+ ...obj,
78
+ });
@@ -1,75 +1,32 @@
1
- import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
1
  import { ListAggregatedUtterancesCommand, } from "../commands/ListAggregatedUtterancesCommand";
3
2
  import { LexModelsV2 } from "../LexModelsV2";
4
3
  import { LexModelsV2Client } from "../LexModelsV2Client";
5
- var makePagedClientRequest = function (client, input) {
6
- var args = [];
7
- for (var _i = 2; _i < arguments.length; _i++) {
8
- args[_i - 2] = arguments[_i];
9
- }
10
- return __awaiter(void 0, void 0, void 0, function () {
11
- return __generator(this, function (_a) {
12
- switch (_a.label) {
13
- case 0: return [4, client.send.apply(client, __spreadArray([new ListAggregatedUtterancesCommand(input)], __read(args), false))];
14
- case 1: return [2, _a.sent()];
15
- }
16
- });
17
- });
4
+ const makePagedClientRequest = async (client, input, ...args) => {
5
+ return await client.send(new ListAggregatedUtterancesCommand(input), ...args);
18
6
  };
19
- var makePagedRequest = function (client, input) {
20
- var args = [];
21
- for (var _i = 2; _i < arguments.length; _i++) {
22
- args[_i - 2] = arguments[_i];
23
- }
24
- return __awaiter(void 0, void 0, void 0, function () {
25
- return __generator(this, function (_a) {
26
- switch (_a.label) {
27
- case 0: return [4, client.listAggregatedUtterances.apply(client, __spreadArray([input], __read(args), false))];
28
- case 1: return [2, _a.sent()];
29
- }
30
- });
31
- });
7
+ const makePagedRequest = async (client, input, ...args) => {
8
+ return await client.listAggregatedUtterances(input, ...args);
32
9
  };
33
- export function paginateListAggregatedUtterances(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateListAggregatedUtterances(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 LexModelsV2) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof LexModelsV2Client) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected LexModelsV2 | LexModelsV2Client");
25
+ }
26
+ yield page;
27
+ const prevToken = token;
28
+ token = page.nextToken;
29
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
37
30
  }
38
- return __asyncGenerator(this, arguments, function paginateListAggregatedUtterances_1() {
39
- var token, hasNext, page, prevToken;
40
- return __generator(this, function (_a) {
41
- switch (_a.label) {
42
- case 0:
43
- token = config.startingToken || undefined;
44
- hasNext = true;
45
- _a.label = 1;
46
- case 1:
47
- if (!hasNext) return [3, 9];
48
- input.nextToken = token;
49
- input["maxResults"] = config.pageSize;
50
- if (!(config.client instanceof LexModelsV2)) return [3, 3];
51
- return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
52
- case 2:
53
- page = _a.sent();
54
- return [3, 6];
55
- case 3:
56
- if (!(config.client instanceof LexModelsV2Client)) return [3, 5];
57
- return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
58
- case 4:
59
- page = _a.sent();
60
- return [3, 6];
61
- case 5: throw new Error("Invalid client, expected LexModelsV2 | LexModelsV2Client");
62
- case 6: return [4, __await(page)];
63
- case 7: return [4, _a.sent()];
64
- case 8:
65
- _a.sent();
66
- prevToken = token;
67
- token = page.nextToken;
68
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
69
- return [3, 1];
70
- case 9: return [4, __await(undefined)];
71
- case 10: return [2, _a.sent()];
72
- }
73
- });
74
- });
31
+ return undefined;
75
32
  }
@@ -1,75 +1,32 @@
1
- import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
1
  import { ListBotAliasesCommand, } from "../commands/ListBotAliasesCommand";
3
2
  import { LexModelsV2 } from "../LexModelsV2";
4
3
  import { LexModelsV2Client } from "../LexModelsV2Client";
5
- var makePagedClientRequest = function (client, input) {
6
- var args = [];
7
- for (var _i = 2; _i < arguments.length; _i++) {
8
- args[_i - 2] = arguments[_i];
9
- }
10
- return __awaiter(void 0, void 0, void 0, function () {
11
- return __generator(this, function (_a) {
12
- switch (_a.label) {
13
- case 0: return [4, client.send.apply(client, __spreadArray([new ListBotAliasesCommand(input)], __read(args), false))];
14
- case 1: return [2, _a.sent()];
15
- }
16
- });
17
- });
4
+ const makePagedClientRequest = async (client, input, ...args) => {
5
+ return await client.send(new ListBotAliasesCommand(input), ...args);
18
6
  };
19
- var makePagedRequest = function (client, input) {
20
- var args = [];
21
- for (var _i = 2; _i < arguments.length; _i++) {
22
- args[_i - 2] = arguments[_i];
23
- }
24
- return __awaiter(void 0, void 0, void 0, function () {
25
- return __generator(this, function (_a) {
26
- switch (_a.label) {
27
- case 0: return [4, client.listBotAliases.apply(client, __spreadArray([input], __read(args), false))];
28
- case 1: return [2, _a.sent()];
29
- }
30
- });
31
- });
7
+ const makePagedRequest = async (client, input, ...args) => {
8
+ return await client.listBotAliases(input, ...args);
32
9
  };
33
- export function paginateListBotAliases(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateListBotAliases(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 LexModelsV2) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof LexModelsV2Client) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected LexModelsV2 | LexModelsV2Client");
25
+ }
26
+ yield page;
27
+ const prevToken = token;
28
+ token = page.nextToken;
29
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
37
30
  }
38
- return __asyncGenerator(this, arguments, function paginateListBotAliases_1() {
39
- var token, hasNext, page, prevToken;
40
- return __generator(this, function (_a) {
41
- switch (_a.label) {
42
- case 0:
43
- token = config.startingToken || undefined;
44
- hasNext = true;
45
- _a.label = 1;
46
- case 1:
47
- if (!hasNext) return [3, 9];
48
- input.nextToken = token;
49
- input["maxResults"] = config.pageSize;
50
- if (!(config.client instanceof LexModelsV2)) return [3, 3];
51
- return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
52
- case 2:
53
- page = _a.sent();
54
- return [3, 6];
55
- case 3:
56
- if (!(config.client instanceof LexModelsV2Client)) return [3, 5];
57
- return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
58
- case 4:
59
- page = _a.sent();
60
- return [3, 6];
61
- case 5: throw new Error("Invalid client, expected LexModelsV2 | LexModelsV2Client");
62
- case 6: return [4, __await(page)];
63
- case 7: return [4, _a.sent()];
64
- case 8:
65
- _a.sent();
66
- prevToken = token;
67
- token = page.nextToken;
68
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
69
- return [3, 1];
70
- case 9: return [4, __await(undefined)];
71
- case 10: return [2, _a.sent()];
72
- }
73
- });
74
- });
31
+ return undefined;
75
32
  }
@@ -1,75 +1,32 @@
1
- import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
1
  import { ListBotLocalesCommand, } from "../commands/ListBotLocalesCommand";
3
2
  import { LexModelsV2 } from "../LexModelsV2";
4
3
  import { LexModelsV2Client } from "../LexModelsV2Client";
5
- var makePagedClientRequest = function (client, input) {
6
- var args = [];
7
- for (var _i = 2; _i < arguments.length; _i++) {
8
- args[_i - 2] = arguments[_i];
9
- }
10
- return __awaiter(void 0, void 0, void 0, function () {
11
- return __generator(this, function (_a) {
12
- switch (_a.label) {
13
- case 0: return [4, client.send.apply(client, __spreadArray([new ListBotLocalesCommand(input)], __read(args), false))];
14
- case 1: return [2, _a.sent()];
15
- }
16
- });
17
- });
4
+ const makePagedClientRequest = async (client, input, ...args) => {
5
+ return await client.send(new ListBotLocalesCommand(input), ...args);
18
6
  };
19
- var makePagedRequest = function (client, input) {
20
- var args = [];
21
- for (var _i = 2; _i < arguments.length; _i++) {
22
- args[_i - 2] = arguments[_i];
23
- }
24
- return __awaiter(void 0, void 0, void 0, function () {
25
- return __generator(this, function (_a) {
26
- switch (_a.label) {
27
- case 0: return [4, client.listBotLocales.apply(client, __spreadArray([input], __read(args), false))];
28
- case 1: return [2, _a.sent()];
29
- }
30
- });
31
- });
7
+ const makePagedRequest = async (client, input, ...args) => {
8
+ return await client.listBotLocales(input, ...args);
32
9
  };
33
- export function paginateListBotLocales(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateListBotLocales(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 LexModelsV2) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof LexModelsV2Client) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected LexModelsV2 | LexModelsV2Client");
25
+ }
26
+ yield page;
27
+ const prevToken = token;
28
+ token = page.nextToken;
29
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
37
30
  }
38
- return __asyncGenerator(this, arguments, function paginateListBotLocales_1() {
39
- var token, hasNext, page, prevToken;
40
- return __generator(this, function (_a) {
41
- switch (_a.label) {
42
- case 0:
43
- token = config.startingToken || undefined;
44
- hasNext = true;
45
- _a.label = 1;
46
- case 1:
47
- if (!hasNext) return [3, 9];
48
- input.nextToken = token;
49
- input["maxResults"] = config.pageSize;
50
- if (!(config.client instanceof LexModelsV2)) return [3, 3];
51
- return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
52
- case 2:
53
- page = _a.sent();
54
- return [3, 6];
55
- case 3:
56
- if (!(config.client instanceof LexModelsV2Client)) return [3, 5];
57
- return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
58
- case 4:
59
- page = _a.sent();
60
- return [3, 6];
61
- case 5: throw new Error("Invalid client, expected LexModelsV2 | LexModelsV2Client");
62
- case 6: return [4, __await(page)];
63
- case 7: return [4, _a.sent()];
64
- case 8:
65
- _a.sent();
66
- prevToken = token;
67
- token = page.nextToken;
68
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
69
- return [3, 1];
70
- case 9: return [4, __await(undefined)];
71
- case 10: return [2, _a.sent()];
72
- }
73
- });
74
- });
31
+ return undefined;
75
32
  }
@@ -1,75 +1,32 @@
1
- import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
1
  import { ListBotRecommendationsCommand, } from "../commands/ListBotRecommendationsCommand";
3
2
  import { LexModelsV2 } from "../LexModelsV2";
4
3
  import { LexModelsV2Client } from "../LexModelsV2Client";
5
- var makePagedClientRequest = function (client, input) {
6
- var args = [];
7
- for (var _i = 2; _i < arguments.length; _i++) {
8
- args[_i - 2] = arguments[_i];
9
- }
10
- return __awaiter(void 0, void 0, void 0, function () {
11
- return __generator(this, function (_a) {
12
- switch (_a.label) {
13
- case 0: return [4, client.send.apply(client, __spreadArray([new ListBotRecommendationsCommand(input)], __read(args), false))];
14
- case 1: return [2, _a.sent()];
15
- }
16
- });
17
- });
4
+ const makePagedClientRequest = async (client, input, ...args) => {
5
+ return await client.send(new ListBotRecommendationsCommand(input), ...args);
18
6
  };
19
- var makePagedRequest = function (client, input) {
20
- var args = [];
21
- for (var _i = 2; _i < arguments.length; _i++) {
22
- args[_i - 2] = arguments[_i];
23
- }
24
- return __awaiter(void 0, void 0, void 0, function () {
25
- return __generator(this, function (_a) {
26
- switch (_a.label) {
27
- case 0: return [4, client.listBotRecommendations.apply(client, __spreadArray([input], __read(args), false))];
28
- case 1: return [2, _a.sent()];
29
- }
30
- });
31
- });
7
+ const makePagedRequest = async (client, input, ...args) => {
8
+ return await client.listBotRecommendations(input, ...args);
32
9
  };
33
- export function paginateListBotRecommendations(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateListBotRecommendations(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 LexModelsV2) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof LexModelsV2Client) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected LexModelsV2 | LexModelsV2Client");
25
+ }
26
+ yield page;
27
+ const prevToken = token;
28
+ token = page.nextToken;
29
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
37
30
  }
38
- return __asyncGenerator(this, arguments, function paginateListBotRecommendations_1() {
39
- var token, hasNext, page, prevToken;
40
- return __generator(this, function (_a) {
41
- switch (_a.label) {
42
- case 0:
43
- token = config.startingToken || undefined;
44
- hasNext = true;
45
- _a.label = 1;
46
- case 1:
47
- if (!hasNext) return [3, 9];
48
- input.nextToken = token;
49
- input["maxResults"] = config.pageSize;
50
- if (!(config.client instanceof LexModelsV2)) return [3, 3];
51
- return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
52
- case 2:
53
- page = _a.sent();
54
- return [3, 6];
55
- case 3:
56
- if (!(config.client instanceof LexModelsV2Client)) return [3, 5];
57
- return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
58
- case 4:
59
- page = _a.sent();
60
- return [3, 6];
61
- case 5: throw new Error("Invalid client, expected LexModelsV2 | LexModelsV2Client");
62
- case 6: return [4, __await(page)];
63
- case 7: return [4, _a.sent()];
64
- case 8:
65
- _a.sent();
66
- prevToken = token;
67
- token = page.nextToken;
68
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
69
- return [3, 1];
70
- case 9: return [4, __await(undefined)];
71
- case 10: return [2, _a.sent()];
72
- }
73
- });
74
- });
31
+ return undefined;
75
32
  }
@@ -1,75 +1,32 @@
1
- import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
1
  import { ListBotVersionsCommand, } from "../commands/ListBotVersionsCommand";
3
2
  import { LexModelsV2 } from "../LexModelsV2";
4
3
  import { LexModelsV2Client } from "../LexModelsV2Client";
5
- var makePagedClientRequest = function (client, input) {
6
- var args = [];
7
- for (var _i = 2; _i < arguments.length; _i++) {
8
- args[_i - 2] = arguments[_i];
9
- }
10
- return __awaiter(void 0, void 0, void 0, function () {
11
- return __generator(this, function (_a) {
12
- switch (_a.label) {
13
- case 0: return [4, client.send.apply(client, __spreadArray([new ListBotVersionsCommand(input)], __read(args), false))];
14
- case 1: return [2, _a.sent()];
15
- }
16
- });
17
- });
4
+ const makePagedClientRequest = async (client, input, ...args) => {
5
+ return await client.send(new ListBotVersionsCommand(input), ...args);
18
6
  };
19
- var makePagedRequest = function (client, input) {
20
- var args = [];
21
- for (var _i = 2; _i < arguments.length; _i++) {
22
- args[_i - 2] = arguments[_i];
23
- }
24
- return __awaiter(void 0, void 0, void 0, function () {
25
- return __generator(this, function (_a) {
26
- switch (_a.label) {
27
- case 0: return [4, client.listBotVersions.apply(client, __spreadArray([input], __read(args), false))];
28
- case 1: return [2, _a.sent()];
29
- }
30
- });
31
- });
7
+ const makePagedRequest = async (client, input, ...args) => {
8
+ return await client.listBotVersions(input, ...args);
32
9
  };
33
- export function paginateListBotVersions(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateListBotVersions(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 LexModelsV2) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof LexModelsV2Client) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected LexModelsV2 | LexModelsV2Client");
25
+ }
26
+ yield page;
27
+ const prevToken = token;
28
+ token = page.nextToken;
29
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
37
30
  }
38
- return __asyncGenerator(this, arguments, function paginateListBotVersions_1() {
39
- var token, hasNext, page, prevToken;
40
- return __generator(this, function (_a) {
41
- switch (_a.label) {
42
- case 0:
43
- token = config.startingToken || undefined;
44
- hasNext = true;
45
- _a.label = 1;
46
- case 1:
47
- if (!hasNext) return [3, 9];
48
- input.nextToken = token;
49
- input["maxResults"] = config.pageSize;
50
- if (!(config.client instanceof LexModelsV2)) return [3, 3];
51
- return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
52
- case 2:
53
- page = _a.sent();
54
- return [3, 6];
55
- case 3:
56
- if (!(config.client instanceof LexModelsV2Client)) return [3, 5];
57
- return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
58
- case 4:
59
- page = _a.sent();
60
- return [3, 6];
61
- case 5: throw new Error("Invalid client, expected LexModelsV2 | LexModelsV2Client");
62
- case 6: return [4, __await(page)];
63
- case 7: return [4, _a.sent()];
64
- case 8:
65
- _a.sent();
66
- prevToken = token;
67
- token = page.nextToken;
68
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
69
- return [3, 1];
70
- case 9: return [4, __await(undefined)];
71
- case 10: return [2, _a.sent()];
72
- }
73
- });
74
- });
31
+ return undefined;
75
32
  }