@aws-sdk/client-lex-models-v2 3.185.0 → 3.188.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 +16 -0
- package/dist-es/LexModelsV2.js +270 -277
- package/dist-es/LexModelsV2Client.js +22 -28
- package/dist-es/commands/BuildBotLocaleCommand.js +21 -28
- package/dist-es/commands/CreateBotAliasCommand.js +21 -28
- package/dist-es/commands/CreateBotCommand.js +21 -28
- package/dist-es/commands/CreateBotLocaleCommand.js +21 -28
- package/dist-es/commands/CreateBotVersionCommand.js +21 -28
- package/dist-es/commands/CreateExportCommand.js +21 -28
- package/dist-es/commands/CreateIntentCommand.js +21 -28
- package/dist-es/commands/CreateResourcePolicyCommand.js +21 -28
- package/dist-es/commands/CreateResourcePolicyStatementCommand.js +21 -28
- package/dist-es/commands/CreateSlotCommand.js +21 -28
- package/dist-es/commands/CreateSlotTypeCommand.js +21 -28
- package/dist-es/commands/CreateUploadUrlCommand.js +21 -28
- package/dist-es/commands/DeleteBotAliasCommand.js +21 -28
- package/dist-es/commands/DeleteBotCommand.js +21 -28
- package/dist-es/commands/DeleteBotLocaleCommand.js +21 -28
- package/dist-es/commands/DeleteBotVersionCommand.js +21 -28
- package/dist-es/commands/DeleteCustomVocabularyCommand.js +21 -28
- package/dist-es/commands/DeleteExportCommand.js +21 -28
- package/dist-es/commands/DeleteImportCommand.js +21 -28
- package/dist-es/commands/DeleteIntentCommand.js +22 -29
- package/dist-es/commands/DeleteResourcePolicyCommand.js +21 -28
- package/dist-es/commands/DeleteResourcePolicyStatementCommand.js +21 -28
- package/dist-es/commands/DeleteSlotCommand.js +22 -29
- package/dist-es/commands/DeleteSlotTypeCommand.js +22 -29
- package/dist-es/commands/DeleteUtterancesCommand.js +21 -28
- package/dist-es/commands/DescribeBotAliasCommand.js +21 -28
- package/dist-es/commands/DescribeBotCommand.js +21 -28
- package/dist-es/commands/DescribeBotLocaleCommand.js +21 -28
- package/dist-es/commands/DescribeBotRecommendationCommand.js +21 -28
- package/dist-es/commands/DescribeBotVersionCommand.js +21 -28
- package/dist-es/commands/DescribeCustomVocabularyMetadataCommand.js +21 -28
- package/dist-es/commands/DescribeExportCommand.js +21 -28
- package/dist-es/commands/DescribeImportCommand.js +21 -28
- package/dist-es/commands/DescribeIntentCommand.js +21 -28
- package/dist-es/commands/DescribeResourcePolicyCommand.js +21 -28
- package/dist-es/commands/DescribeSlotCommand.js +21 -28
- package/dist-es/commands/DescribeSlotTypeCommand.js +21 -28
- package/dist-es/commands/ListAggregatedUtterancesCommand.js +21 -28
- package/dist-es/commands/ListBotAliasesCommand.js +21 -28
- package/dist-es/commands/ListBotLocalesCommand.js +21 -28
- package/dist-es/commands/ListBotRecommendationsCommand.js +21 -28
- package/dist-es/commands/ListBotVersionsCommand.js +21 -28
- package/dist-es/commands/ListBotsCommand.js +21 -28
- package/dist-es/commands/ListBuiltInIntentsCommand.js +21 -28
- package/dist-es/commands/ListBuiltInSlotTypesCommand.js +21 -28
- package/dist-es/commands/ListExportsCommand.js +21 -28
- package/dist-es/commands/ListImportsCommand.js +21 -28
- package/dist-es/commands/ListIntentsCommand.js +21 -28
- package/dist-es/commands/ListRecommendedIntentsCommand.js +21 -28
- package/dist-es/commands/ListSlotTypesCommand.js +21 -28
- package/dist-es/commands/ListSlotsCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/SearchAssociatedTranscriptsCommand.js +21 -28
- package/dist-es/commands/StartBotRecommendationCommand.js +21 -28
- package/dist-es/commands/StartImportCommand.js +21 -28
- package/dist-es/commands/StopBotRecommendationCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateBotAliasCommand.js +21 -28
- package/dist-es/commands/UpdateBotCommand.js +21 -28
- package/dist-es/commands/UpdateBotLocaleCommand.js +21 -28
- package/dist-es/commands/UpdateBotRecommendationCommand.js +21 -28
- package/dist-es/commands/UpdateExportCommand.js +21 -28
- package/dist-es/commands/UpdateIntentCommand.js +21 -28
- package/dist-es/commands/UpdateResourcePolicyCommand.js +21 -28
- package/dist-es/commands/UpdateSlotCommand.js +21 -28
- package/dist-es/commands/UpdateSlotTypeCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/LexModelsV2ServiceException.js +5 -10
- package/dist-es/models/models_0.js +808 -319
- package/dist-es/models/models_1.js +78 -27
- package/dist-es/pagination/ListAggregatedUtterancesPaginator.js +25 -68
- package/dist-es/pagination/ListBotAliasesPaginator.js +25 -68
- package/dist-es/pagination/ListBotLocalesPaginator.js +25 -68
- package/dist-es/pagination/ListBotRecommendationsPaginator.js +25 -68
- package/dist-es/pagination/ListBotVersionsPaginator.js +25 -68
- package/dist-es/pagination/ListBotsPaginator.js +25 -68
- package/dist-es/pagination/ListBuiltInIntentsPaginator.js +25 -68
- package/dist-es/pagination/ListBuiltInSlotTypesPaginator.js +25 -68
- package/dist-es/pagination/ListExportsPaginator.js +25 -68
- package/dist-es/pagination/ListImportsPaginator.js +25 -68
- package/dist-es/pagination/ListIntentsPaginator.js +25 -68
- package/dist-es/pagination/ListRecommendedIntentsPaginator.js +25 -68
- package/dist-es/pagination/ListSlotTypesPaginator.js +25 -68
- package/dist-es/pagination/ListSlotsPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +7152 -8746
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/dist-es/waiters/waitForBotAliasAvailable.js +45 -65
- package/dist-es/waiters/waitForBotAvailable.js +54 -74
- package/dist-es/waiters/waitForBotExportCompleted.js +45 -65
- package/dist-es/waiters/waitForBotImportCompleted.js +45 -65
- package/dist-es/waiters/waitForBotLocaleBuilt.js +54 -74
- package/dist-es/waiters/waitForBotLocaleCreated.js +63 -83
- package/dist-es/waiters/waitForBotLocaleExpressTestingAvailable.js +63 -83
- package/dist-es/waiters/waitForBotVersionAvailable.js +48 -68
- package/package.json +34 -34
|
@@ -1,78 +1,58 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
3
2
|
import { DescribeBotLocaleCommand } from "../commands/DescribeBotLocaleCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return result_1.botLocaleStatus;
|
|
17
|
-
};
|
|
18
|
-
if (returnComparator() === "Built") {
|
|
19
|
-
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
catch (e) { }
|
|
23
|
-
try {
|
|
24
|
-
returnComparator = function () {
|
|
25
|
-
return result_1.botLocaleStatus;
|
|
26
|
-
};
|
|
27
|
-
if (returnComparator() === "Deleting") {
|
|
28
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
catch (e) { }
|
|
32
|
-
try {
|
|
33
|
-
returnComparator = function () {
|
|
34
|
-
return result_1.botLocaleStatus;
|
|
35
|
-
};
|
|
36
|
-
if (returnComparator() === "Failed") {
|
|
37
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
catch (e) { }
|
|
41
|
-
try {
|
|
42
|
-
returnComparator = function () {
|
|
43
|
-
return result_1.botLocaleStatus;
|
|
44
|
-
};
|
|
45
|
-
if (returnComparator() === "NotBuilt") {
|
|
46
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
catch (e) { }
|
|
50
|
-
return [3, 3];
|
|
51
|
-
case 2:
|
|
52
|
-
exception_1 = _a.sent();
|
|
53
|
-
reason = exception_1;
|
|
54
|
-
return [3, 3];
|
|
55
|
-
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
3
|
+
const checkState = async (client, input) => {
|
|
4
|
+
let reason;
|
|
5
|
+
try {
|
|
6
|
+
const result = await client.send(new DescribeBotLocaleCommand(input));
|
|
7
|
+
reason = result;
|
|
8
|
+
try {
|
|
9
|
+
const returnComparator = () => {
|
|
10
|
+
return result.botLocaleStatus;
|
|
11
|
+
};
|
|
12
|
+
if (returnComparator() === "Built") {
|
|
13
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
14
|
+
}
|
|
56
15
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}); };
|
|
66
|
-
export var waitUntilBotLocaleBuilt = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
|
|
67
|
-
var serviceDefaults, result;
|
|
68
|
-
return __generator(this, function (_a) {
|
|
69
|
-
switch (_a.label) {
|
|
70
|
-
case 0:
|
|
71
|
-
serviceDefaults = { minDelay: 10, maxDelay: 120 };
|
|
72
|
-
return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
73
|
-
case 1:
|
|
74
|
-
result = _a.sent();
|
|
75
|
-
return [2, checkExceptions(result)];
|
|
16
|
+
catch (e) { }
|
|
17
|
+
try {
|
|
18
|
+
const returnComparator = () => {
|
|
19
|
+
return result.botLocaleStatus;
|
|
20
|
+
};
|
|
21
|
+
if (returnComparator() === "Deleting") {
|
|
22
|
+
return { state: WaiterState.FAILURE, reason };
|
|
23
|
+
}
|
|
76
24
|
}
|
|
77
|
-
|
|
78
|
-
|
|
25
|
+
catch (e) { }
|
|
26
|
+
try {
|
|
27
|
+
const returnComparator = () => {
|
|
28
|
+
return result.botLocaleStatus;
|
|
29
|
+
};
|
|
30
|
+
if (returnComparator() === "Failed") {
|
|
31
|
+
return { state: WaiterState.FAILURE, reason };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch (e) { }
|
|
35
|
+
try {
|
|
36
|
+
const returnComparator = () => {
|
|
37
|
+
return result.botLocaleStatus;
|
|
38
|
+
};
|
|
39
|
+
if (returnComparator() === "NotBuilt") {
|
|
40
|
+
return { state: WaiterState.FAILURE, reason };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch (e) { }
|
|
44
|
+
}
|
|
45
|
+
catch (exception) {
|
|
46
|
+
reason = exception;
|
|
47
|
+
}
|
|
48
|
+
return { state: WaiterState.RETRY, reason };
|
|
49
|
+
};
|
|
50
|
+
export const waitForBotLocaleBuilt = async (params, input) => {
|
|
51
|
+
const serviceDefaults = { minDelay: 10, maxDelay: 120 };
|
|
52
|
+
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
53
|
+
};
|
|
54
|
+
export const waitUntilBotLocaleBuilt = async (params, input) => {
|
|
55
|
+
const serviceDefaults = { minDelay: 10, maxDelay: 120 };
|
|
56
|
+
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
57
|
+
return checkExceptions(result);
|
|
58
|
+
};
|
|
@@ -1,87 +1,67 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
3
2
|
import { DescribeBotLocaleCommand } from "../commands/DescribeBotLocaleCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return result_1.botLocaleStatus;
|
|
17
|
-
};
|
|
18
|
-
if (returnComparator() === "Built") {
|
|
19
|
-
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
catch (e) { }
|
|
23
|
-
try {
|
|
24
|
-
returnComparator = function () {
|
|
25
|
-
return result_1.botLocaleStatus;
|
|
26
|
-
};
|
|
27
|
-
if (returnComparator() === "ReadyExpressTesting") {
|
|
28
|
-
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
catch (e) { }
|
|
32
|
-
try {
|
|
33
|
-
returnComparator = function () {
|
|
34
|
-
return result_1.botLocaleStatus;
|
|
35
|
-
};
|
|
36
|
-
if (returnComparator() === "NotBuilt") {
|
|
37
|
-
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
catch (e) { }
|
|
41
|
-
try {
|
|
42
|
-
returnComparator = function () {
|
|
43
|
-
return result_1.botLocaleStatus;
|
|
44
|
-
};
|
|
45
|
-
if (returnComparator() === "Deleting") {
|
|
46
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
catch (e) { }
|
|
50
|
-
try {
|
|
51
|
-
returnComparator = function () {
|
|
52
|
-
return result_1.botLocaleStatus;
|
|
53
|
-
};
|
|
54
|
-
if (returnComparator() === "Failed") {
|
|
55
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
catch (e) { }
|
|
59
|
-
return [3, 3];
|
|
60
|
-
case 2:
|
|
61
|
-
exception_1 = _a.sent();
|
|
62
|
-
reason = exception_1;
|
|
63
|
-
return [3, 3];
|
|
64
|
-
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
3
|
+
const checkState = async (client, input) => {
|
|
4
|
+
let reason;
|
|
5
|
+
try {
|
|
6
|
+
const result = await client.send(new DescribeBotLocaleCommand(input));
|
|
7
|
+
reason = result;
|
|
8
|
+
try {
|
|
9
|
+
const returnComparator = () => {
|
|
10
|
+
return result.botLocaleStatus;
|
|
11
|
+
};
|
|
12
|
+
if (returnComparator() === "Built") {
|
|
13
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
14
|
+
}
|
|
65
15
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}); };
|
|
75
|
-
export var waitUntilBotLocaleCreated = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
|
|
76
|
-
var serviceDefaults, result;
|
|
77
|
-
return __generator(this, function (_a) {
|
|
78
|
-
switch (_a.label) {
|
|
79
|
-
case 0:
|
|
80
|
-
serviceDefaults = { minDelay: 10, maxDelay: 120 };
|
|
81
|
-
return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
82
|
-
case 1:
|
|
83
|
-
result = _a.sent();
|
|
84
|
-
return [2, checkExceptions(result)];
|
|
16
|
+
catch (e) { }
|
|
17
|
+
try {
|
|
18
|
+
const returnComparator = () => {
|
|
19
|
+
return result.botLocaleStatus;
|
|
20
|
+
};
|
|
21
|
+
if (returnComparator() === "ReadyExpressTesting") {
|
|
22
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
23
|
+
}
|
|
85
24
|
}
|
|
86
|
-
|
|
87
|
-
|
|
25
|
+
catch (e) { }
|
|
26
|
+
try {
|
|
27
|
+
const returnComparator = () => {
|
|
28
|
+
return result.botLocaleStatus;
|
|
29
|
+
};
|
|
30
|
+
if (returnComparator() === "NotBuilt") {
|
|
31
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch (e) { }
|
|
35
|
+
try {
|
|
36
|
+
const returnComparator = () => {
|
|
37
|
+
return result.botLocaleStatus;
|
|
38
|
+
};
|
|
39
|
+
if (returnComparator() === "Deleting") {
|
|
40
|
+
return { state: WaiterState.FAILURE, reason };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch (e) { }
|
|
44
|
+
try {
|
|
45
|
+
const returnComparator = () => {
|
|
46
|
+
return result.botLocaleStatus;
|
|
47
|
+
};
|
|
48
|
+
if (returnComparator() === "Failed") {
|
|
49
|
+
return { state: WaiterState.FAILURE, reason };
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (e) { }
|
|
53
|
+
}
|
|
54
|
+
catch (exception) {
|
|
55
|
+
reason = exception;
|
|
56
|
+
}
|
|
57
|
+
return { state: WaiterState.RETRY, reason };
|
|
58
|
+
};
|
|
59
|
+
export const waitForBotLocaleCreated = async (params, input) => {
|
|
60
|
+
const serviceDefaults = { minDelay: 10, maxDelay: 120 };
|
|
61
|
+
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
62
|
+
};
|
|
63
|
+
export const waitUntilBotLocaleCreated = async (params, input) => {
|
|
64
|
+
const serviceDefaults = { minDelay: 10, maxDelay: 120 };
|
|
65
|
+
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
66
|
+
return checkExceptions(result);
|
|
67
|
+
};
|
|
@@ -1,87 +1,67 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
3
2
|
import { DescribeBotLocaleCommand } from "../commands/DescribeBotLocaleCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return result_1.botLocaleStatus;
|
|
17
|
-
};
|
|
18
|
-
if (returnComparator() === "Built") {
|
|
19
|
-
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
catch (e) { }
|
|
23
|
-
try {
|
|
24
|
-
returnComparator = function () {
|
|
25
|
-
return result_1.botLocaleStatus;
|
|
26
|
-
};
|
|
27
|
-
if (returnComparator() === "ReadyExpressTesting") {
|
|
28
|
-
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
catch (e) { }
|
|
32
|
-
try {
|
|
33
|
-
returnComparator = function () {
|
|
34
|
-
return result_1.botLocaleStatus;
|
|
35
|
-
};
|
|
36
|
-
if (returnComparator() === "Deleting") {
|
|
37
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
catch (e) { }
|
|
41
|
-
try {
|
|
42
|
-
returnComparator = function () {
|
|
43
|
-
return result_1.botLocaleStatus;
|
|
44
|
-
};
|
|
45
|
-
if (returnComparator() === "Failed") {
|
|
46
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
catch (e) { }
|
|
50
|
-
try {
|
|
51
|
-
returnComparator = function () {
|
|
52
|
-
return result_1.botLocaleStatus;
|
|
53
|
-
};
|
|
54
|
-
if (returnComparator() === "NotBuilt") {
|
|
55
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
catch (e) { }
|
|
59
|
-
return [3, 3];
|
|
60
|
-
case 2:
|
|
61
|
-
exception_1 = _a.sent();
|
|
62
|
-
reason = exception_1;
|
|
63
|
-
return [3, 3];
|
|
64
|
-
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
3
|
+
const checkState = async (client, input) => {
|
|
4
|
+
let reason;
|
|
5
|
+
try {
|
|
6
|
+
const result = await client.send(new DescribeBotLocaleCommand(input));
|
|
7
|
+
reason = result;
|
|
8
|
+
try {
|
|
9
|
+
const returnComparator = () => {
|
|
10
|
+
return result.botLocaleStatus;
|
|
11
|
+
};
|
|
12
|
+
if (returnComparator() === "Built") {
|
|
13
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
14
|
+
}
|
|
65
15
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}); };
|
|
75
|
-
export var waitUntilBotLocaleExpressTestingAvailable = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
|
|
76
|
-
var serviceDefaults, result;
|
|
77
|
-
return __generator(this, function (_a) {
|
|
78
|
-
switch (_a.label) {
|
|
79
|
-
case 0:
|
|
80
|
-
serviceDefaults = { minDelay: 10, maxDelay: 120 };
|
|
81
|
-
return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
82
|
-
case 1:
|
|
83
|
-
result = _a.sent();
|
|
84
|
-
return [2, checkExceptions(result)];
|
|
16
|
+
catch (e) { }
|
|
17
|
+
try {
|
|
18
|
+
const returnComparator = () => {
|
|
19
|
+
return result.botLocaleStatus;
|
|
20
|
+
};
|
|
21
|
+
if (returnComparator() === "ReadyExpressTesting") {
|
|
22
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
23
|
+
}
|
|
85
24
|
}
|
|
86
|
-
|
|
87
|
-
|
|
25
|
+
catch (e) { }
|
|
26
|
+
try {
|
|
27
|
+
const returnComparator = () => {
|
|
28
|
+
return result.botLocaleStatus;
|
|
29
|
+
};
|
|
30
|
+
if (returnComparator() === "Deleting") {
|
|
31
|
+
return { state: WaiterState.FAILURE, reason };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch (e) { }
|
|
35
|
+
try {
|
|
36
|
+
const returnComparator = () => {
|
|
37
|
+
return result.botLocaleStatus;
|
|
38
|
+
};
|
|
39
|
+
if (returnComparator() === "Failed") {
|
|
40
|
+
return { state: WaiterState.FAILURE, reason };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch (e) { }
|
|
44
|
+
try {
|
|
45
|
+
const returnComparator = () => {
|
|
46
|
+
return result.botLocaleStatus;
|
|
47
|
+
};
|
|
48
|
+
if (returnComparator() === "NotBuilt") {
|
|
49
|
+
return { state: WaiterState.FAILURE, reason };
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (e) { }
|
|
53
|
+
}
|
|
54
|
+
catch (exception) {
|
|
55
|
+
reason = exception;
|
|
56
|
+
}
|
|
57
|
+
return { state: WaiterState.RETRY, reason };
|
|
58
|
+
};
|
|
59
|
+
export const waitForBotLocaleExpressTestingAvailable = async (params, input) => {
|
|
60
|
+
const serviceDefaults = { minDelay: 10, maxDelay: 120 };
|
|
61
|
+
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
62
|
+
};
|
|
63
|
+
export const waitUntilBotLocaleExpressTestingAvailable = async (params, input) => {
|
|
64
|
+
const serviceDefaults = { minDelay: 10, maxDelay: 120 };
|
|
65
|
+
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
66
|
+
return checkExceptions(result);
|
|
67
|
+
};
|
|
@@ -1,72 +1,52 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
3
2
|
import { DescribeBotVersionCommand } from "../commands/DescribeBotVersionCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return result_1.botStatus;
|
|
17
|
-
};
|
|
18
|
-
if (returnComparator() === "Available") {
|
|
19
|
-
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
catch (e) { }
|
|
23
|
-
try {
|
|
24
|
-
returnComparator = function () {
|
|
25
|
-
return result_1.botStatus;
|
|
26
|
-
};
|
|
27
|
-
if (returnComparator() === "Deleting") {
|
|
28
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
catch (e) { }
|
|
32
|
-
try {
|
|
33
|
-
returnComparator = function () {
|
|
34
|
-
return result_1.botStatus;
|
|
35
|
-
};
|
|
36
|
-
if (returnComparator() === "Failed") {
|
|
37
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
catch (e) { }
|
|
41
|
-
return [3, 3];
|
|
42
|
-
case 2:
|
|
43
|
-
exception_1 = _a.sent();
|
|
44
|
-
reason = exception_1;
|
|
45
|
-
if (exception_1.name && exception_1.name == "ResourceNotFoundException") {
|
|
46
|
-
return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
47
|
-
}
|
|
48
|
-
return [3, 3];
|
|
49
|
-
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
3
|
+
const checkState = async (client, input) => {
|
|
4
|
+
let reason;
|
|
5
|
+
try {
|
|
6
|
+
const result = await client.send(new DescribeBotVersionCommand(input));
|
|
7
|
+
reason = result;
|
|
8
|
+
try {
|
|
9
|
+
const returnComparator = () => {
|
|
10
|
+
return result.botStatus;
|
|
11
|
+
};
|
|
12
|
+
if (returnComparator() === "Available") {
|
|
13
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
14
|
+
}
|
|
50
15
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}); };
|
|
60
|
-
export var waitUntilBotVersionAvailable = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
|
|
61
|
-
var serviceDefaults, result;
|
|
62
|
-
return __generator(this, function (_a) {
|
|
63
|
-
switch (_a.label) {
|
|
64
|
-
case 0:
|
|
65
|
-
serviceDefaults = { minDelay: 10, maxDelay: 120 };
|
|
66
|
-
return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
67
|
-
case 1:
|
|
68
|
-
result = _a.sent();
|
|
69
|
-
return [2, checkExceptions(result)];
|
|
16
|
+
catch (e) { }
|
|
17
|
+
try {
|
|
18
|
+
const returnComparator = () => {
|
|
19
|
+
return result.botStatus;
|
|
20
|
+
};
|
|
21
|
+
if (returnComparator() === "Deleting") {
|
|
22
|
+
return { state: WaiterState.FAILURE, reason };
|
|
23
|
+
}
|
|
70
24
|
}
|
|
71
|
-
|
|
72
|
-
|
|
25
|
+
catch (e) { }
|
|
26
|
+
try {
|
|
27
|
+
const returnComparator = () => {
|
|
28
|
+
return result.botStatus;
|
|
29
|
+
};
|
|
30
|
+
if (returnComparator() === "Failed") {
|
|
31
|
+
return { state: WaiterState.FAILURE, reason };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch (e) { }
|
|
35
|
+
}
|
|
36
|
+
catch (exception) {
|
|
37
|
+
reason = exception;
|
|
38
|
+
if (exception.name && exception.name == "ResourceNotFoundException") {
|
|
39
|
+
return { state: WaiterState.RETRY, reason };
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return { state: WaiterState.RETRY, reason };
|
|
43
|
+
};
|
|
44
|
+
export const waitForBotVersionAvailable = async (params, input) => {
|
|
45
|
+
const serviceDefaults = { minDelay: 10, maxDelay: 120 };
|
|
46
|
+
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
47
|
+
};
|
|
48
|
+
export const waitUntilBotVersionAvailable = async (params, input) => {
|
|
49
|
+
const serviceDefaults = { minDelay: 10, maxDelay: 120 };
|
|
50
|
+
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
51
|
+
return checkExceptions(result);
|
|
52
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-lex-models-v2",
|
|
3
3
|
"description": "AWS SDK for JavaScript Lex Models V2 Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.188.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",
|
|
@@ -19,42 +19,42 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
21
21
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
22
|
-
"@aws-sdk/client-sts": "3.
|
|
23
|
-
"@aws-sdk/config-resolver": "3.
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
25
|
-
"@aws-sdk/fetch-http-handler": "3.
|
|
26
|
-
"@aws-sdk/hash-node": "3.
|
|
27
|
-
"@aws-sdk/invalid-dependency": "3.
|
|
28
|
-
"@aws-sdk/middleware-content-length": "3.
|
|
29
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
30
|
-
"@aws-sdk/middleware-logger": "3.
|
|
31
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
32
|
-
"@aws-sdk/middleware-retry": "3.
|
|
33
|
-
"@aws-sdk/middleware-serde": "3.
|
|
34
|
-
"@aws-sdk/middleware-signing": "3.
|
|
35
|
-
"@aws-sdk/middleware-stack": "3.
|
|
36
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
37
|
-
"@aws-sdk/node-config-provider": "3.
|
|
38
|
-
"@aws-sdk/node-http-handler": "3.
|
|
39
|
-
"@aws-sdk/protocol-http": "3.
|
|
40
|
-
"@aws-sdk/smithy-client": "3.
|
|
41
|
-
"@aws-sdk/types": "3.
|
|
42
|
-
"@aws-sdk/url-parser": "3.
|
|
43
|
-
"@aws-sdk/util-base64-browser": "3.
|
|
44
|
-
"@aws-sdk/util-base64-node": "3.
|
|
45
|
-
"@aws-sdk/util-body-length-browser": "3.
|
|
46
|
-
"@aws-sdk/util-body-length-node": "3.
|
|
47
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
48
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
50
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
51
|
-
"@aws-sdk/util-utf8-browser": "3.
|
|
52
|
-
"@aws-sdk/util-utf8-node": "3.
|
|
53
|
-
"@aws-sdk/util-waiter": "3.
|
|
22
|
+
"@aws-sdk/client-sts": "3.188.0",
|
|
23
|
+
"@aws-sdk/config-resolver": "3.188.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.188.0",
|
|
25
|
+
"@aws-sdk/fetch-http-handler": "3.188.0",
|
|
26
|
+
"@aws-sdk/hash-node": "3.188.0",
|
|
27
|
+
"@aws-sdk/invalid-dependency": "3.188.0",
|
|
28
|
+
"@aws-sdk/middleware-content-length": "3.188.0",
|
|
29
|
+
"@aws-sdk/middleware-host-header": "3.188.0",
|
|
30
|
+
"@aws-sdk/middleware-logger": "3.188.0",
|
|
31
|
+
"@aws-sdk/middleware-recursion-detection": "3.188.0",
|
|
32
|
+
"@aws-sdk/middleware-retry": "3.188.0",
|
|
33
|
+
"@aws-sdk/middleware-serde": "3.188.0",
|
|
34
|
+
"@aws-sdk/middleware-signing": "3.188.0",
|
|
35
|
+
"@aws-sdk/middleware-stack": "3.188.0",
|
|
36
|
+
"@aws-sdk/middleware-user-agent": "3.188.0",
|
|
37
|
+
"@aws-sdk/node-config-provider": "3.188.0",
|
|
38
|
+
"@aws-sdk/node-http-handler": "3.188.0",
|
|
39
|
+
"@aws-sdk/protocol-http": "3.188.0",
|
|
40
|
+
"@aws-sdk/smithy-client": "3.188.0",
|
|
41
|
+
"@aws-sdk/types": "3.188.0",
|
|
42
|
+
"@aws-sdk/url-parser": "3.188.0",
|
|
43
|
+
"@aws-sdk/util-base64-browser": "3.188.0",
|
|
44
|
+
"@aws-sdk/util-base64-node": "3.188.0",
|
|
45
|
+
"@aws-sdk/util-body-length-browser": "3.188.0",
|
|
46
|
+
"@aws-sdk/util-body-length-node": "3.188.0",
|
|
47
|
+
"@aws-sdk/util-defaults-mode-browser": "3.188.0",
|
|
48
|
+
"@aws-sdk/util-defaults-mode-node": "3.188.0",
|
|
49
|
+
"@aws-sdk/util-user-agent-browser": "3.188.0",
|
|
50
|
+
"@aws-sdk/util-user-agent-node": "3.188.0",
|
|
51
|
+
"@aws-sdk/util-utf8-browser": "3.188.0",
|
|
52
|
+
"@aws-sdk/util-utf8-node": "3.188.0",
|
|
53
|
+
"@aws-sdk/util-waiter": "3.188.0",
|
|
54
54
|
"tslib": "^2.3.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@aws-sdk/service-client-documentation-generator": "3.
|
|
57
|
+
"@aws-sdk/service-client-documentation-generator": "3.188.0",
|
|
58
58
|
"@tsconfig/recommended": "1.0.1",
|
|
59
59
|
"@types/node": "^12.7.5",
|
|
60
60
|
"concurrently": "7.0.0",
|