@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.
Files changed (37) hide show
  1. package/lib/AWSCredentialsRetriever.d.ts +9 -3
  2. package/lib/AWSCredentialsRetriever.js +61 -11
  3. package/lib/AWSCredentialsRetriever.js.map +1 -1
  4. package/lib/LexV2/models/LexRequestModel.d.ts +8 -8
  5. package/lib/LexV2/models/LexRequestModel.js.map +1 -1
  6. package/lib/LexV2/services/LexResourceListerV2.d.ts +11 -11
  7. package/lib/LexV2/services/LexResourceListerV2.js +22 -14
  8. package/lib/LexV2/services/LexResourceListerV2.js.map +1 -1
  9. package/lib/LexV2/services/LexResourceWaiterV2.d.ts +9 -9
  10. package/lib/LexV2/services/LexResourceWaiterV2.js +60 -41
  11. package/lib/LexV2/services/LexResourceWaiterV2.js.map +1 -1
  12. package/lib/LexV2/services/LexServiceBaseV2.d.ts +6 -5
  13. package/lib/LexV2/services/LexServiceBaseV2.js +8 -7
  14. package/lib/LexV2/services/LexServiceBaseV2.js.map +1 -1
  15. package/lib/LexV2/services/LexServiceV2.js +71 -83
  16. package/lib/LexV2/services/LexServiceV2.js.map +1 -1
  17. package/lib/LexV2/translators/TranslateToLexBotAliasRequest.d.ts +5 -5
  18. package/lib/LexV2/translators/TranslateToLexBotAliasRequest.js.map +1 -1
  19. package/lib/LexV2/translators/TranslateToLexBotLocalRequest.d.ts +5 -5
  20. package/lib/LexV2/translators/TranslateToLexBotLocalRequest.js.map +1 -1
  21. package/lib/LexV2/translators/TranslateToLexBotRequest.d.ts +5 -5
  22. package/lib/LexV2/translators/TranslateToLexBotRequest.js.map +1 -1
  23. package/lib/LexV2/translators/TranslateToLexIntentRequest.d.ts +5 -5
  24. package/lib/LexV2/translators/TranslateToLexIntentRequest.js.map +1 -1
  25. package/lib/LexV2/translators/TranslateToLexSlotRequest.d.ts +5 -5
  26. package/lib/LexV2/translators/TranslateToLexSlotRequest.js +3 -2
  27. package/lib/LexV2/translators/TranslateToLexSlotRequest.js.map +1 -1
  28. package/lib/LexV2/translators/TranslateToLexSlotTypeRequest.d.ts +5 -5
  29. package/lib/LexV2/translators/TranslateToLexSlotTypeRequest.js +3 -1
  30. package/lib/LexV2/translators/TranslateToLexSlotTypeRequest.js.map +1 -1
  31. package/lib/index.d.ts +0 -1
  32. package/lib/index.js +0 -1
  33. package/lib/index.js.map +1 -1
  34. package/package.json +13 -11
  35. package/lib/LexService.d.ts +0 -101
  36. package/lib/LexService.js +0 -216
  37. package/lib/LexService.js.map +0 -1
@@ -1,101 +0,0 @@
1
- /*! Copyright (c) 2020, XAPPmedia */
2
- import { LexRuntime, LexModelBuildingService } from "aws-sdk/clients/all";
3
- import { MergeStrategy, GetImportResponse, StartImportResponse } from "aws-sdk/clients/lexmodelbuildingservice";
4
- export { GetImportResponse, StartImportResponse };
5
- import { NLUService, NLUQueryResponse, NLURequestProps } from "stentor-models";
6
- export interface LexServiceConfig {
7
- botAlias?: string;
8
- botName?: string;
9
- credentials?: {
10
- /**
11
- * The region that the lex bot is contained in.
12
- *
13
- * @type {string}
14
- */
15
- region?: string;
16
- /**
17
- * The access key for the account that the lex bot is in.
18
- * This must be accompanied by an secretAccessKey.
19
- * @type {string}
20
- */
21
- accessKeyId?: string;
22
- /**
23
- * The secret access key for the account that the lex bot is in.
24
- *
25
- * This must be accompanied by an accessKeyId.
26
- *
27
- * @type {string}
28
- */
29
- secretAccessKey?: string;
30
- /**
31
- * The ARN for the role that the service can assume to access the Lex bot.
32
- *
33
- * The role must have the necessary credentials to perform the action. The session duration
34
- * must be long enough for the lex service to perform its actions.
35
- *
36
- * @type {string}
37
- */
38
- role?: {
39
- arn: string;
40
- externalId: string;
41
- };
42
- };
43
- }
44
- export interface LexServiceProps {
45
- config?: LexServiceConfig;
46
- postFix?: string;
47
- /**
48
- *Provide when unit testing, defaults to AWS SDK services
49
- *
50
- * @type {Promise<LexRuntime>}
51
- * @memberof LexServiceProps
52
- */
53
- lexRuntime?: Promise<LexRuntime>;
54
- /**
55
- *Provide when unit testing, defaults to AWS SDK services
56
- *
57
- * @type {Promise<LexModelBuildingService>}
58
- * @memberof LexServiceProps
59
- */
60
- lexManagement?: Promise<LexModelBuildingService>;
61
- }
62
- /**
63
- * Service to communicate with AWS LEX.
64
- *
65
- * Accommodates both runtime and management of AWS LEX.
66
- *
67
- * To configure, either pass in a configuration on the constructor or set
68
- * the following environment variables:
69
- * LEX_BOT_ALIAS
70
- * LEX_BOT_NAME
71
- */
72
- export declare class LexService implements NLUService {
73
- private config;
74
- private readonly postFix?;
75
- private readonly credsReceiver;
76
- private lexRuntime;
77
- private lexManagement;
78
- constructor(props?: LexServiceProps);
79
- /**
80
- * Start import into LEX from a zip at the specified path.
81
- *
82
- * Note: This only supports importing resourceType "BOT"
83
- *
84
- * @param buffer - A buffer of the zip with a single JSON file.
85
- * @param mergeStrategy - Defaults to FAIL_ON_CONFLICT, other option is OVERWRITE_LATEST
86
- */
87
- startImport(buffer: Buffer, mergeStrategy?: MergeStrategy): Promise<StartImportResponse>;
88
- /**
89
- * Get the status of an import after calling {@link startImport}
90
- *
91
- * @param importId - Import ID provided by {@link startImport}
92
- */
93
- getImport(importId: string): Promise<GetImportResponse>;
94
- /**
95
- * Convert raw text to intent and entities.
96
- *
97
- * @param q - Raw text
98
- * @param props - Optional properties with userId, sessionId, requestAttributes, and activeContexts.
99
- */
100
- query(q: string, props?: NLURequestProps): Promise<NLUQueryResponse>;
101
- }
package/lib/LexService.js DELETED
@@ -1,216 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.LexService = void 0;
13
- /*! Copyright (c) 2020, XAPPmedia */
14
- const all_1 = require("aws-sdk/clients/all");
15
- const aws_sdk_1 = require("aws-sdk");
16
- const AWSCredentialsRetriever_1 = require("./AWSCredentialsRetriever");
17
- const merge = require("lodash.merge");
18
- const stentor_alexa_lib_1 = require("@xapp/stentor-alexa-lib");
19
- const stentor_constants_1 = require("stentor-constants");
20
- /**
21
- * Service to communicate with AWS LEX.
22
- *
23
- * Accommodates both runtime and management of AWS LEX.
24
- *
25
- * To configure, either pass in a configuration on the constructor or set
26
- * the following environment variables:
27
- * LEX_BOT_ALIAS
28
- * LEX_BOT_NAME
29
- */
30
- class LexService {
31
- constructor(props) {
32
- var _a, _b, _c, _d, _e, _f;
33
- this.config = {
34
- botAlias: process.env.LEX_BOT_ALIAS || "",
35
- botName: process.env.LEX_BOT_NAME || "",
36
- credentials: {
37
- region: process.env.AWS_DEFAULT_REGION || "",
38
- accessKeyId: process.env.AWS_ACCESS_KEY_ID || "",
39
- secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY || "",
40
- role: {
41
- arn: process.env.AWS_LEX_ROLE_ARN,
42
- externalId: process.env.AWS_LEX_ROLE_ARN,
43
- },
44
- },
45
- };
46
- if (props) {
47
- if (props.config) {
48
- this.config = merge(this.config, props.config);
49
- }
50
- this.lexManagement = props.lexManagement;
51
- this.lexRuntime = props.lexRuntime;
52
- this.postFix = props.postFix;
53
- }
54
- this.credsReceiver = new AWSCredentialsRetriever_1.AWSCredentialsRetriever({
55
- key: {
56
- accessKeyId: (_a = this.config.credentials) === null || _a === void 0 ? void 0 : _a.accessKeyId,
57
- secretAccessKey: (_b = this.config.credentials) === null || _b === void 0 ? void 0 : _b.secretAccessKey,
58
- },
59
- role: {
60
- arn: (_d = (_c = this.config.credentials) === null || _c === void 0 ? void 0 : _c.role) === null || _d === void 0 ? void 0 : _d.arn,
61
- sessionName: "stentor-lex-service",
62
- externalId: (_f = (_e = this.config.credentials) === null || _e === void 0 ? void 0 : _e.role) === null || _f === void 0 ? void 0 : _f.externalId,
63
- },
64
- });
65
- if (!this.config.credentials.accessKeyId && process.env.AWS_PROFILE) {
66
- // None provided but we have a profile set, load em up
67
- const credentials = new aws_sdk_1.SharedIniFileCredentials({ profile: process.env.AWS_PROFILE });
68
- this.config.credentials = merge(this.config.credentials, credentials);
69
- }
70
- if (!this.lexRuntime) {
71
- // Used for runtime operations like NLU queries
72
- this.lexRuntime = this.credsReceiver.getCredentials().then((credentials) => new all_1.LexRuntime({
73
- region: this.config.credentials.region,
74
- credentials,
75
- }));
76
- }
77
- if (!this.lexManagement) {
78
- // Used for management operations like model updates
79
- this.lexManagement = this.credsReceiver.getCredentials().then((credentials) => new all_1.LexModelBuildingService({
80
- region: this.config.credentials.region,
81
- credentials,
82
- }));
83
- }
84
- }
85
- /**
86
- * Start import into LEX from a zip at the specified path.
87
- *
88
- * Note: This only supports importing resourceType "BOT"
89
- *
90
- * @param buffer - A buffer of the zip with a single JSON file.
91
- * @param mergeStrategy - Defaults to FAIL_ON_CONFLICT, other option is OVERWRITE_LATEST
92
- */
93
- startImport(buffer_1) {
94
- return __awaiter(this, arguments, void 0, function* (buffer, mergeStrategy = "FAIL_ON_CONFLICT") {
95
- const lexManagement = yield this.lexManagement;
96
- return new Promise((resolve, reject) => {
97
- lexManagement.startImport({
98
- payload: buffer,
99
- resourceType: "BOT",
100
- mergeStrategy,
101
- }, (error, data) => {
102
- if (error) {
103
- reject(error);
104
- }
105
- resolve(data);
106
- });
107
- });
108
- });
109
- }
110
- /**
111
- * Get the status of an import after calling {@link startImport}
112
- *
113
- * @param importId - Import ID provided by {@link startImport}
114
- */
115
- getImport(importId) {
116
- return __awaiter(this, void 0, void 0, function* () {
117
- const lexManagement = yield this.lexManagement;
118
- return new Promise((resolve, reject) => {
119
- lexManagement.getImport({ importId }, (error, data) => {
120
- if (error) {
121
- reject(error);
122
- }
123
- resolve(data);
124
- });
125
- });
126
- });
127
- }
128
- /**
129
- * Convert raw text to intent and entities.
130
- *
131
- * @param q - Raw text
132
- * @param props - Optional properties with userId, sessionId, requestAttributes, and activeContexts.
133
- */
134
- query(q, props) {
135
- return __awaiter(this, void 0, void 0, function* () {
136
- const lexRuntime = yield this.lexRuntime;
137
- return new Promise((resolve, reject) => {
138
- // Do some quick validation
139
- if (!this.config.botAlias) {
140
- throw new Error("Bot Alias is required to query LEX NLU");
141
- }
142
- if (!this.config.botName) {
143
- throw new Error("Bot Name is required to query LEX NLU");
144
- }
145
- let userId;
146
- let requestAttributes;
147
- if (props) {
148
- userId = props.userId;
149
- requestAttributes = props.requestAttributes;
150
- }
151
- if (!userId) {
152
- userId = `query.${Date.now()}`;
153
- }
154
- lexRuntime.postText({
155
- userId,
156
- botAlias: this.config.botAlias,
157
- botName: this.config.botName,
158
- inputText: q,
159
- requestAttributes
160
- }, (error, data) => {
161
- if (error) {
162
- reject(error);
163
- return;
164
- }
165
- const type = new stentor_alexa_lib_1.TranslateAlexaIntentType({ translateFor: "LEX", postFix: this.postFix });
166
- const intentId = type.translate(data.intentName);
167
- let nluQueryResponse;
168
- if (intentId === stentor_constants_1.INPUT_UNKNOWN_ID) {
169
- nluQueryResponse = {
170
- type: "INPUT_UNKNOWN_REQUEST",
171
- intentId
172
- };
173
- }
174
- else {
175
- const intentRequest = {
176
- type: "INTENT_REQUEST",
177
- intentId,
178
- };
179
- if (data.sessionAttributes && typeof data.sessionAttributes === "object" && typeof data.sessionAttributes.slots === "string") {
180
- try {
181
- intentRequest.slots = JSON.parse(data.sessionAttributes.slots);
182
- }
183
- catch (e) {
184
- throw new Error(`Unable to parse slots from session attributes ${e}`);
185
- }
186
- }
187
- else if (typeof data.slots === "object") {
188
- // Iterate through the keys.
189
- Object.keys(data.slots).forEach((slotName) => {
190
- const slotValue = data.slots[slotName];
191
- if (slotValue) {
192
- if (!intentRequest.slots) {
193
- intentRequest.slots = {};
194
- }
195
- intentRequest.slots[slotName] = {
196
- name: slotName,
197
- value: slotValue,
198
- };
199
- }
200
- });
201
- }
202
- nluQueryResponse = intentRequest;
203
- }
204
- if (!data.intentName || nluQueryResponse.intentId === stentor_constants_1.INPUT_UNKNOWN_ID) {
205
- // Couldn't match, it is an InputUnknown
206
- nluQueryResponse.type = "INPUT_UNKNOWN_REQUEST";
207
- nluQueryResponse.intentId = stentor_constants_1.INPUT_UNKNOWN_ID;
208
- }
209
- resolve(nluQueryResponse);
210
- });
211
- });
212
- });
213
- }
214
- }
215
- exports.LexService = LexService;
216
- //# sourceMappingURL=LexService.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LexService.js","sourceRoot":"","sources":["../src/LexService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAoC;AACpC,6CAA0E;AAC1E,qCAAmD;AACnD,uEAAoE;AAKpE,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAEtC,+DAAmE;AACnE,yDAAqD;AA6DrD;;;;;;;;;GASG;AACH,MAAa,UAAU;IAuBnB,YAAY,KAAuB;;QAtB3B,WAAM,GAAqB;YAC/B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,EAAE;YACzC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,EAAE;YACvC,WAAW,EAAE;gBACT,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,EAAE;gBAC5C,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE;gBAChD,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,EAAE;gBACxD,IAAI,EAAE;oBACF,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;oBACjC,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;iBAC3C;aACJ;SACJ,CAAC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