@xapp/stentor-service-lex 1.73.6 → 1.73.12
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/lib/AWSCredentialsRetriever.d.ts +9 -3
- package/lib/AWSCredentialsRetriever.js +61 -11
- package/lib/AWSCredentialsRetriever.js.map +1 -1
- package/lib/LexV2/models/LexRequestModel.d.ts +8 -8
- package/lib/LexV2/models/LexRequestModel.js.map +1 -1
- package/lib/LexV2/services/LexResourceListerV2.d.ts +11 -11
- package/lib/LexV2/services/LexResourceListerV2.js +22 -14
- package/lib/LexV2/services/LexResourceListerV2.js.map +1 -1
- package/lib/LexV2/services/LexResourceWaiterV2.d.ts +9 -9
- package/lib/LexV2/services/LexResourceWaiterV2.js +60 -41
- package/lib/LexV2/services/LexResourceWaiterV2.js.map +1 -1
- package/lib/LexV2/services/LexServiceBaseV2.d.ts +6 -5
- package/lib/LexV2/services/LexServiceBaseV2.js +8 -7
- package/lib/LexV2/services/LexServiceBaseV2.js.map +1 -1
- package/lib/LexV2/services/LexServiceV2.js +71 -83
- package/lib/LexV2/services/LexServiceV2.js.map +1 -1
- package/lib/LexV2/translators/TranslateToLexBotAliasRequest.d.ts +5 -5
- package/lib/LexV2/translators/TranslateToLexBotAliasRequest.js.map +1 -1
- package/lib/LexV2/translators/TranslateToLexBotLocalRequest.d.ts +5 -5
- package/lib/LexV2/translators/TranslateToLexBotLocalRequest.js.map +1 -1
- package/lib/LexV2/translators/TranslateToLexBotRequest.d.ts +5 -5
- package/lib/LexV2/translators/TranslateToLexBotRequest.js.map +1 -1
- package/lib/LexV2/translators/TranslateToLexIntentRequest.d.ts +5 -5
- package/lib/LexV2/translators/TranslateToLexIntentRequest.js.map +1 -1
- package/lib/LexV2/translators/TranslateToLexSlotRequest.d.ts +5 -5
- package/lib/LexV2/translators/TranslateToLexSlotRequest.js +3 -2
- package/lib/LexV2/translators/TranslateToLexSlotRequest.js.map +1 -1
- package/lib/LexV2/translators/TranslateToLexSlotTypeRequest.d.ts +5 -5
- package/lib/LexV2/translators/TranslateToLexSlotTypeRequest.js +3 -1
- package/lib/LexV2/translators/TranslateToLexSlotTypeRequest.js.map +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/package.json +13 -11
- package/lib/LexService.d.ts +0 -101
- package/lib/LexService.js +0 -216
- package/lib/LexService.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! Copyright (c) 2020, XAPPmedia */
|
|
2
|
-
import {
|
|
2
|
+
import { STSClient } from "@aws-sdk/client-sts";
|
|
3
3
|
export interface AWSProps {
|
|
4
|
-
sts?:
|
|
4
|
+
sts?: STSClient;
|
|
5
5
|
}
|
|
6
6
|
export interface Props {
|
|
7
7
|
/**
|
|
@@ -76,8 +76,14 @@ export interface Credentials {
|
|
|
76
76
|
export declare class AWSCredentialsRetriever {
|
|
77
77
|
private readonly config;
|
|
78
78
|
private readonly sts;
|
|
79
|
-
private attemptedToRetrieveCreds;
|
|
80
79
|
private cachedCredentials;
|
|
80
|
+
private credentialExpiration;
|
|
81
|
+
private hasStaticCredentials;
|
|
81
82
|
constructor(props?: Props, awsProps?: AWSProps);
|
|
83
|
+
/**
|
|
84
|
+
* Check if cached credentials are expired or about to expire.
|
|
85
|
+
* Returns true if credentials need to be refreshed.
|
|
86
|
+
*/
|
|
87
|
+
private needsRefresh;
|
|
82
88
|
getCredentials(): Promise<Credentials>;
|
|
83
89
|
}
|
|
@@ -11,37 +11,87 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AWSCredentialsRetriever = void 0;
|
|
13
13
|
/*! Copyright (c) 2020, XAPPmedia */
|
|
14
|
-
const
|
|
14
|
+
const client_sts_1 = require("@aws-sdk/client-sts");
|
|
15
|
+
/**
|
|
16
|
+
* Buffer time (in milliseconds) before actual expiration to refresh credentials.
|
|
17
|
+
* Default is 5 minutes (300000ms) to ensure credentials don't expire during a request.
|
|
18
|
+
*/
|
|
19
|
+
const CREDENTIAL_EXPIRATION_BUFFER_MS = 5 * 60 * 1000;
|
|
15
20
|
class AWSCredentialsRetriever {
|
|
16
21
|
constructor(props = {}, awsProps = {}) {
|
|
17
|
-
|
|
22
|
+
this.hasStaticCredentials = false;
|
|
23
|
+
const { sts = new client_sts_1.STSClient({}) } = awsProps;
|
|
18
24
|
this.config = props;
|
|
19
25
|
this.sts = sts;
|
|
20
|
-
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Check if cached credentials are expired or about to expire.
|
|
29
|
+
* Returns true if credentials need to be refreshed.
|
|
30
|
+
*/
|
|
31
|
+
needsRefresh() {
|
|
32
|
+
// Static credentials (from key config) never expire
|
|
33
|
+
if (this.hasStaticCredentials) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
// No cached credentials means we need to fetch
|
|
37
|
+
if (!this.cachedCredentials) {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
// No expiration tracked means credentials don't expire (e.g., profile-based without role)
|
|
41
|
+
if (!this.credentialExpiration) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
// Check if credentials are expired or will expire within the buffer time
|
|
45
|
+
const now = new Date();
|
|
46
|
+
const expirationWithBuffer = new Date(this.credentialExpiration.getTime() - CREDENTIAL_EXPIRATION_BUFFER_MS);
|
|
47
|
+
return now >= expirationWithBuffer;
|
|
21
48
|
}
|
|
22
49
|
getCredentials() {
|
|
23
50
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
if
|
|
51
|
+
// Return cached credentials if they're still valid
|
|
52
|
+
if (!this.needsRefresh()) {
|
|
25
53
|
return this.cachedCredentials;
|
|
26
54
|
}
|
|
27
55
|
if (this.config.role && this.config.role.arn && this.config.role.sessionName) {
|
|
28
|
-
const
|
|
29
|
-
.assumeRole({
|
|
56
|
+
const command = new client_sts_1.AssumeRoleCommand({
|
|
30
57
|
RoleArn: this.config.role.arn,
|
|
31
58
|
RoleSessionName: this.config.role.sessionName,
|
|
32
59
|
ExternalId: this.config.role.externalId,
|
|
33
|
-
})
|
|
34
|
-
|
|
60
|
+
});
|
|
61
|
+
const response = yield this.sts.send(command);
|
|
35
62
|
this.cachedCredentials = {
|
|
36
63
|
accessKeyId: response.Credentials.AccessKeyId,
|
|
37
64
|
secretAccessKey: response.Credentials.SecretAccessKey,
|
|
38
65
|
sessionToken: response.Credentials.SessionToken,
|
|
39
66
|
};
|
|
67
|
+
// Track expiration for assumed role credentials
|
|
68
|
+
this.credentialExpiration = response.Credentials.Expiration;
|
|
69
|
+
this.hasStaticCredentials = false;
|
|
40
70
|
}
|
|
41
71
|
else if (this.config.profile) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
72
|
+
// Dynamic import to avoid ESM/CJS interoperability issues with credential-providers
|
|
73
|
+
const { fromIni } = yield Promise.resolve().then(() => require("@aws-sdk/credential-providers"));
|
|
74
|
+
const awsCredentials = yield fromIni({ profile: this.config.profile })();
|
|
75
|
+
this.cachedCredentials = {
|
|
76
|
+
accessKeyId: awsCredentials.accessKeyId,
|
|
77
|
+
secretAccessKey: awsCredentials.secretAccessKey,
|
|
78
|
+
sessionToken: awsCredentials.sessionToken,
|
|
79
|
+
};
|
|
80
|
+
// Profile credentials may have expiration if they use role assumption
|
|
81
|
+
this.credentialExpiration = awsCredentials.expiration;
|
|
82
|
+
this.hasStaticCredentials = false;
|
|
83
|
+
}
|
|
84
|
+
else if (this.config.key && this.config.key.accessKeyId && this.config.key.secretAccessKey) {
|
|
85
|
+
// Static credentials from config - these never expire
|
|
86
|
+
this.cachedCredentials = {
|
|
87
|
+
accessKeyId: this.config.key.accessKeyId,
|
|
88
|
+
secretAccessKey: this.config.key.secretAccessKey,
|
|
89
|
+
sessionToken: this.config.key.sessionToken,
|
|
90
|
+
};
|
|
91
|
+
this.hasStaticCredentials = true;
|
|
92
|
+
this.credentialExpiration = undefined;
|
|
93
|
+
}
|
|
94
|
+
// Else return undefined to use the system's default credentials
|
|
45
95
|
return this.cachedCredentials;
|
|
46
96
|
});
|
|
47
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AWSCredentialsRetriever.js","sourceRoot":"","sources":["../src/AWSCredentialsRetriever.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"AWSCredentialsRetriever.js","sourceRoot":"","sources":["../src/AWSCredentialsRetriever.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAoC;AACpC,oDAAmE;AAEnE;;;GAGG;AACH,MAAM,+BAA+B,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AA8EtD,MAAa,uBAAuB;IAQhC,YAAY,QAAe,EAAE,EAAE,WAAqB,EAAE;QAF9C,yBAAoB,GAAY,KAAK,CAAC;QAG1C,MAAM,EAAE,GAAG,GAAG,IAAI,sBAAS,CAAC,EAAE,CAAC,EAAE,GAAG,QAAQ,CAAC;QAE7C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACnB,CAAC;IAED;;;OAGG;IACK,YAAY;QAChB,oDAAoD;QACpD,IAAI,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC5B,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,+CAA+C;QAC/C,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC1B,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,0FAA0F;QAC1F,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC7B,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,yEAAyE;QACzE,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,oBAAoB,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,oBAAoB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,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;gBACzE,IAAI,CAAC,iBAAiB,GAAG;oBACrB,WAAW,EAAE,cAAc,CAAC,WAAW;oBACvC,eAAe,EAAE,cAAc,CAAC,eAAe;oBAC/C,YAAY,EAAE,cAAc,CAAC,YAAY;iBAC5C,CAAC;gBACF,sEAAsE;gBACtE,IAAI,CAAC,oBAAoB,GAAG,cAAc,CAAC,UAAU,CAAC;gBACtD,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC;YACtC,CAAC;iBAAM,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC;gBAC3F,sDAAsD;gBACtD,IAAI,CAAC,iBAAiB,GAAG;oBACrB,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW;oBACxC,eAAe,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe;oBAChD,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY;iBAC7C,CAAC;gBACF,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC;gBACjC,IAAI,CAAC,oBAAoB,GAAG,SAAS,CAAC;YAC1C,CAAC;YACD,gEAAgE;YAEhE,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAClC,CAAC;KAAA;CACJ;AAxFD,0DAwFC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! Copyright (c) 2020, XAPPmedia */
|
|
2
|
-
import {
|
|
2
|
+
import { BotSummary, BotLocaleSummary, IntentSummary, SlotSummary, SlotTypeSummary, UpdateBotRequest, UpdateBotAliasRequest, UpdateBotLocaleRequest, UpdateIntentRequest, UpdateSlotRequest, UpdateSlotTypeRequest } from "@aws-sdk/client-lex-models-v2";
|
|
3
3
|
export type LexSyncStateV2 = "IN_PROGRESS" | "FAILED" | "COMPLETE";
|
|
4
4
|
export interface LexSyncStatusV2 {
|
|
5
5
|
botId: string;
|
|
@@ -10,7 +10,7 @@ export interface LexSyncStatusV2 {
|
|
|
10
10
|
message?: string;
|
|
11
11
|
}
|
|
12
12
|
export declare const LEX_V2_INTENT_SUFFIX = "_intent";
|
|
13
|
-
export type LexSummary =
|
|
13
|
+
export type LexSummary = BotSummary | BotLocaleSummary | IntentSummary | SlotSummary | SlotTypeSummary;
|
|
14
14
|
export interface SummaryMap {
|
|
15
15
|
[resourceId: string]: LexSummary;
|
|
16
16
|
}
|
|
@@ -25,24 +25,24 @@ export interface AlexaMap {
|
|
|
25
25
|
*/
|
|
26
26
|
export interface LexRequestTree {
|
|
27
27
|
[name: string]: {
|
|
28
|
-
botRequest:
|
|
29
|
-
botAliasRequest:
|
|
28
|
+
botRequest: UpdateBotRequest;
|
|
29
|
+
botAliasRequest: UpdateBotAliasRequest;
|
|
30
30
|
botLocales: {
|
|
31
31
|
[name: string]: {
|
|
32
|
-
botLocalRequest:
|
|
32
|
+
botLocalRequest: UpdateBotLocaleRequest;
|
|
33
33
|
intents?: {
|
|
34
34
|
[name: string]: {
|
|
35
|
-
intentRequest: ModDated<
|
|
35
|
+
intentRequest: ModDated<UpdateIntentRequest>;
|
|
36
36
|
slots?: {
|
|
37
37
|
[name: string]: {
|
|
38
|
-
slotRequest: ModDated<
|
|
38
|
+
slotRequest: ModDated<UpdateSlotRequest>;
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
slotTypes?: {
|
|
44
44
|
[name: string]: {
|
|
45
|
-
slotTypeRequest: ModDated<
|
|
45
|
+
slotTypeRequest: ModDated<UpdateSlotTypeRequest>;
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LexRequestModel.js","sourceRoot":"","sources":["../../../src/LexV2/models/LexRequestModel.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"LexRequestModel.js","sourceRoot":"","sources":["../../../src/LexV2/models/LexRequestModel.ts"],"names":[],"mappings":";;;AA+EA,0BAMC;AAED,8BAEC;AAMD,sBAEC;AAED,8BAEC;AAED,kCAMC;AAjFY,QAAA,oBAAoB,GAAG,SAAS,CAAC;AAmD9C,SAAgB,OAAO,CAAI,OAAU,EAAE,mBAA0B;IAC7D,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACvB,mBAAmB,GAAG,IAAI,IAAI,EAAE,CAAC,CAAC,MAAM;IAC5C,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,mBAAmB,EAAE,CAAC,CAAC;AAC3D,CAAC;AAED,SAAgB,SAAS,CAAI,OAAoB;IAC7C,uCAAY,OAAO,KAAE,mBAAmB,EAAE,SAAS,IAAG;AAC1D,CAAC;AAMD,SAAgB,KAAK,CAAI,CAAI,EAAE,QAAiB;IAC5C,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC1C,CAAC;AAED,SAAgB,SAAS,CAAC,MAAc;IACpC,OAAO,GAAG,MAAM,GAAG,4BAAoB,EAAE,CAAC;AAC9C,CAAC;AAED,SAAgB,WAAW,CAAC,MAAc;IACtC,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,4BAAoB,CAAC,EAAE,CAAC;QACpD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,4BAAoB,CAAC,MAAM,CAAC,CAAC;AAC5E,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! Copyright (c) 2020, XAPPmedia */
|
|
2
|
-
import {
|
|
2
|
+
import { LexModelsV2Client, BotSummary, BotAliasSummary, BotLocaleSummary, IntentSummary, SlotSummary, SlotTypeSummary, UpdateBotRequest, UpdateBotLocaleRequest, UpdateBotAliasRequest, UpdateIntentRequest, UpdateSlotRequest, UpdateSlotTypeRequest } from "@aws-sdk/client-lex-models-v2";
|
|
3
3
|
import { Adopted, LexRequestTree } from "../models";
|
|
4
4
|
export declare class LexResourceListerV2 {
|
|
5
5
|
private readonly lexManagement;
|
|
@@ -10,7 +10,7 @@ export declare class LexResourceListerV2 {
|
|
|
10
10
|
private lexSlots;
|
|
11
11
|
private lexSlotTypes;
|
|
12
12
|
private readonly idsFound;
|
|
13
|
-
constructor(lexManagement:
|
|
13
|
+
constructor(lexManagement: LexModelsV2Client);
|
|
14
14
|
/**
|
|
15
15
|
* Collect all existing summaries for the bot for later (to check if updates are needed)
|
|
16
16
|
*
|
|
@@ -23,13 +23,13 @@ export declare class LexResourceListerV2 {
|
|
|
23
23
|
private listIntents;
|
|
24
24
|
private listSlots;
|
|
25
25
|
private listSlotTypes;
|
|
26
|
-
findBot(request:
|
|
27
|
-
findBotLocale(request:
|
|
28
|
-
findBotAlias(request:
|
|
29
|
-
findIntent(request:
|
|
30
|
-
findSlot(request:
|
|
31
|
-
findSlotType(request:
|
|
32
|
-
getIntentsToDelete():
|
|
33
|
-
getSlotsToDelete(): Adopted<
|
|
34
|
-
getSlotTypesToDelete():
|
|
26
|
+
findBot(request: UpdateBotRequest): BotSummary;
|
|
27
|
+
findBotLocale(request: UpdateBotLocaleRequest): BotLocaleSummary;
|
|
28
|
+
findBotAlias(request: UpdateBotAliasRequest): Promise<BotAliasSummary>;
|
|
29
|
+
findIntent(request: UpdateIntentRequest): IntentSummary;
|
|
30
|
+
findSlot(request: UpdateSlotRequest): SlotSummary;
|
|
31
|
+
findSlotType(request: UpdateSlotTypeRequest): SlotTypeSummary;
|
|
32
|
+
getIntentsToDelete(): IntentSummary[];
|
|
33
|
+
getSlotsToDelete(): Adopted<SlotSummary>[];
|
|
34
|
+
getSlotTypesToDelete(): SlotTypeSummary[];
|
|
35
35
|
}
|
|
@@ -10,6 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.LexResourceListerV2 = void 0;
|
|
13
|
+
/*! Copyright (c) 2020, XAPPmedia */
|
|
14
|
+
const client_lex_models_v2_1 = require("@aws-sdk/client-lex-models-v2");
|
|
13
15
|
const models_1 = require("../models");
|
|
14
16
|
const translators_1 = require("../translators");
|
|
15
17
|
const stentor_logger_1 = require("stentor-logger");
|
|
@@ -68,57 +70,62 @@ class LexResourceListerV2 {
|
|
|
68
70
|
const filters = botName ?
|
|
69
71
|
[
|
|
70
72
|
{
|
|
71
|
-
name:
|
|
73
|
+
name: client_lex_models_v2_1.BotFilterName.BotName,
|
|
74
|
+
operator: client_lex_models_v2_1.BotFilterOperator.Equals,
|
|
75
|
+
values: [botName]
|
|
72
76
|
}
|
|
73
77
|
] : undefined;
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
}).promise();
|
|
78
|
+
const command = new client_lex_models_v2_1.ListBotsCommand({ filters });
|
|
79
|
+
const response = yield this.lexManagement.send(command);
|
|
77
80
|
return response.botSummaries;
|
|
78
81
|
});
|
|
79
82
|
}
|
|
80
83
|
listBotLocales(botSummary) {
|
|
81
84
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
85
|
stentor_logger_1.default.info(`Listing bot locales`);
|
|
83
|
-
const
|
|
86
|
+
const command = new client_lex_models_v2_1.ListBotLocalesCommand({
|
|
84
87
|
botId: botSummary.botId,
|
|
85
88
|
botVersion: botSummary.latestBotVersion,
|
|
86
89
|
maxResults: MAX_LIST_RESULTS
|
|
87
|
-
})
|
|
90
|
+
});
|
|
91
|
+
const response = yield this.lexManagement.send(command);
|
|
88
92
|
return response.botLocaleSummaries;
|
|
89
93
|
});
|
|
90
94
|
}
|
|
91
95
|
listBotAliases(botSummary) {
|
|
92
96
|
return __awaiter(this, void 0, void 0, function* () {
|
|
93
97
|
stentor_logger_1.default.info(`Listing bot aliases`);
|
|
94
|
-
const
|
|
98
|
+
const command = new client_lex_models_v2_1.ListBotAliasesCommand({
|
|
95
99
|
botId: botSummary.botId
|
|
96
|
-
})
|
|
100
|
+
});
|
|
101
|
+
const response = yield this.lexManagement.send(command);
|
|
97
102
|
return response.botAliasSummaries;
|
|
98
103
|
});
|
|
99
104
|
}
|
|
100
105
|
listIntents(botSummary, lexBotLocalSummary) {
|
|
101
106
|
return __awaiter(this, void 0, void 0, function* () {
|
|
102
107
|
stentor_logger_1.default.info(`Listing intents for locale: ${lexBotLocalSummary.localeName}`);
|
|
103
|
-
const
|
|
108
|
+
const command = new client_lex_models_v2_1.ListIntentsCommand({
|
|
104
109
|
botId: botSummary.botId,
|
|
105
110
|
botVersion: botSummary.latestBotVersion,
|
|
106
111
|
localeId: lexBotLocalSummary.localeId,
|
|
107
112
|
maxResults: MAX_LIST_RESULTS
|
|
108
|
-
})
|
|
113
|
+
});
|
|
114
|
+
const response = yield this.lexManagement.send(command);
|
|
109
115
|
return response.intentSummaries;
|
|
110
116
|
});
|
|
111
117
|
}
|
|
112
118
|
listSlots(botSummary, lexBotLocalSummary, lexIntentSummary) {
|
|
113
119
|
return __awaiter(this, void 0, void 0, function* () {
|
|
114
120
|
stentor_logger_1.default.info(`Listing slots for intent: ${lexIntentSummary.intentName}`);
|
|
115
|
-
const
|
|
121
|
+
const command = new client_lex_models_v2_1.ListSlotsCommand({
|
|
116
122
|
botId: botSummary.botId,
|
|
117
123
|
botVersion: botSummary.latestBotVersion,
|
|
118
124
|
localeId: lexBotLocalSummary.localeId,
|
|
119
125
|
intentId: lexIntentSummary.intentId,
|
|
120
126
|
maxResults: MAX_LIST_RESULTS
|
|
121
|
-
})
|
|
127
|
+
});
|
|
128
|
+
const response = yield this.lexManagement.send(command);
|
|
122
129
|
return response.slotSummaries.map(summary => {
|
|
123
130
|
return (0, models_1.adopt)(summary, lexIntentSummary.intentId);
|
|
124
131
|
});
|
|
@@ -127,12 +134,13 @@ class LexResourceListerV2 {
|
|
|
127
134
|
listSlotTypes(botSummary, lexBotLocalSummary) {
|
|
128
135
|
return __awaiter(this, void 0, void 0, function* () {
|
|
129
136
|
stentor_logger_1.default.info(`Listing slot types for locale: ${lexBotLocalSummary.localeName}`);
|
|
130
|
-
const
|
|
137
|
+
const command = new client_lex_models_v2_1.ListSlotTypesCommand({
|
|
131
138
|
botId: botSummary.botId,
|
|
132
139
|
botVersion: botSummary.latestBotVersion,
|
|
133
140
|
localeId: lexBotLocalSummary.localeId,
|
|
134
141
|
maxResults: MAX_LIST_RESULTS
|
|
135
|
-
})
|
|
142
|
+
});
|
|
143
|
+
const response = yield this.lexManagement.send(command);
|
|
136
144
|
return response.slotTypeSummaries;
|
|
137
145
|
});
|
|
138
146
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LexResourceListerV2.js","sourceRoot":"","sources":["../../../src/LexV2/services/LexResourceListerV2.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"LexResourceListerV2.js","sourceRoot":"","sources":["../../../src/LexV2/services/LexResourceListerV2.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAoC;AACpC,wEAuBuC;AACvC,sCAA2D;AAC3D,gDAMwB;AAExB,mDAAiC;AACjC,gGAA6F;AAE7F,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,MAAa,mBAAmB;IAY5B,YAAY,aAAgC;QATpC,YAAO,GAAiB,EAAE,CAAC;QAC3B,kBAAa,GAAsB,EAAE,CAAC;QACtC,kBAAa,GAAuB,EAAE,CAAC;QACvC,eAAU,GAAoB,EAAE,CAAC;QACjC,aAAQ,GAA2B,EAAE,CAAC;QACtC,iBAAY,GAAsB,EAAE,CAAC;QAKzC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACvB,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,CAAC,CAAC,CAAC;IACP,CAAC;IAEM,oBAAoB;QACvB,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;YACtC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AArPD,kDAqPC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! Copyright (c) 2020, XAPPmedia */
|
|
2
|
-
import {
|
|
2
|
+
import { LexModelsV2Client, UpdateBotRequest, UpdateBotLocaleRequest, UpdateBotAliasRequest, UpdateIntentRequest, UpdateSlotRequest, UpdateSlotTypeRequest } from "@aws-sdk/client-lex-models-v2";
|
|
3
3
|
import { ModDated } from "../models";
|
|
4
4
|
import { LexWaitStatus } from "../models/LexExportModel";
|
|
5
5
|
import { LexResourceListerV2 } from "./LexResourceListerV2";
|
|
@@ -17,7 +17,7 @@ export declare class LexResourceWaiterV2 {
|
|
|
17
17
|
private readonly lexManagement;
|
|
18
18
|
private readonly lexLister;
|
|
19
19
|
private readonly slotTypeIdMap;
|
|
20
|
-
constructor(lexManagement:
|
|
20
|
+
constructor(lexManagement: LexModelsV2Client, lexLister?: LexResourceListerV2);
|
|
21
21
|
private waitFor;
|
|
22
22
|
private waitWhile;
|
|
23
23
|
getStatusForResource(resource: LexResourceWaitResource, ids: LexIdList): Promise<LexWaitStatus>;
|
|
@@ -26,37 +26,37 @@ export declare class LexResourceWaiterV2 {
|
|
|
26
26
|
*
|
|
27
27
|
* @param request
|
|
28
28
|
*/
|
|
29
|
-
waitForBot(request:
|
|
29
|
+
waitForBot(request: UpdateBotRequest): Promise<string>;
|
|
30
30
|
/**
|
|
31
31
|
* Update or create, then wait for it.
|
|
32
32
|
*
|
|
33
33
|
* @param request
|
|
34
34
|
*/
|
|
35
|
-
waitForBotLocale(request:
|
|
35
|
+
waitForBotLocale(request: UpdateBotLocaleRequest): Promise<string>;
|
|
36
36
|
/**
|
|
37
37
|
* Update or create, then wait for it.
|
|
38
38
|
*
|
|
39
39
|
* @param request
|
|
40
40
|
*/
|
|
41
|
-
waitForBotAlias(request:
|
|
41
|
+
waitForBotAlias(request: UpdateBotAliasRequest): Promise<string>;
|
|
42
42
|
/**
|
|
43
43
|
* Update or create, then wait for it.
|
|
44
44
|
*
|
|
45
45
|
* @param modDatedRequest
|
|
46
46
|
*/
|
|
47
|
-
waitForIntent(modDatedRequest: ModDated<
|
|
47
|
+
waitForIntent(modDatedRequest: ModDated<UpdateIntentRequest>): Promise<string>;
|
|
48
48
|
/**
|
|
49
49
|
* Update or create, then wait for it.
|
|
50
50
|
*
|
|
51
51
|
* @param modDatedRequest
|
|
52
52
|
*/
|
|
53
|
-
waitForSlot(modDatedRequest: ModDated<
|
|
53
|
+
waitForSlot(modDatedRequest: ModDated<UpdateSlotRequest>): Promise<string>;
|
|
54
54
|
/**
|
|
55
55
|
* Update or create, then wait for it.
|
|
56
56
|
*
|
|
57
57
|
* @param modDatedRequest
|
|
58
58
|
*/
|
|
59
|
-
waitForSlotType(modDatedRequest: ModDated<
|
|
59
|
+
waitForSlotType(modDatedRequest: ModDated<UpdateSlotTypeRequest>): Promise<string>;
|
|
60
60
|
/**
|
|
61
61
|
* Delete, then wait for it.
|
|
62
62
|
*
|
|
@@ -64,7 +64,7 @@ export declare class LexResourceWaiterV2 {
|
|
|
64
64
|
*/
|
|
65
65
|
waitForBotDelete(botName: string): Promise<string>;
|
|
66
66
|
waitForIds(botName: string, botAlias?: string): Promise<LexIdList>;
|
|
67
|
-
waitForBuild(request:
|
|
67
|
+
waitForBuild(request: UpdateBotLocaleRequest): Promise<void>;
|
|
68
68
|
deleteUnused(ids: LexIdList): Promise<void>;
|
|
69
69
|
/**
|
|
70
70
|
* The create and the update are very similar. These are here in case we want to tweak the requests.
|