@aws-amplify/interactions 6.0.1-unstable.cfbde4c.0 → 6.0.1
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 → dist/cjs}/errors/InteractionsError.js +3 -1
- package/dist/cjs/errors/InteractionsError.js.map +1 -0
- package/{lib → dist/cjs}/errors/assertValidationError.js +3 -1
- package/dist/cjs/errors/assertValidationError.js.map +1 -0
- package/{lib → dist/cjs}/errors/index.js +3 -1
- package/dist/cjs/errors/index.js.map +1 -0
- package/{lib → dist/cjs}/errors/validation.js +4 -2
- package/dist/cjs/errors/validation.js.map +1 -0
- package/{lib → dist/cjs}/index.js +3 -1
- package/dist/cjs/index.js.map +1 -0
- package/{lib → dist/cjs}/lex-v1/AWSLexProvider.js +3 -3
- package/dist/cjs/lex-v1/AWSLexProvider.js.map +1 -0
- package/{lib → dist/cjs}/lex-v1/apis/index.js +3 -1
- package/dist/cjs/lex-v1/apis/index.js.map +1 -0
- package/{lib → dist/cjs}/lex-v1/apis/onComplete.js +3 -1
- package/dist/cjs/lex-v1/apis/onComplete.js.map +1 -0
- package/{lib → dist/cjs}/lex-v1/apis/send.js +3 -1
- package/dist/cjs/lex-v1/apis/send.js.map +1 -0
- package/{lib → dist/cjs}/lex-v1/index.js +3 -1
- package/dist/cjs/lex-v1/index.js.map +1 -0
- package/{lib → dist/cjs}/lex-v1/types/AWSLexProviderOption.js +3 -1
- package/dist/cjs/lex-v1/types/AWSLexProviderOption.js.map +1 -0
- package/{lib/lex-v2 → dist/cjs/lex-v1}/types/index.js +3 -1
- package/dist/cjs/lex-v1/types/index.js.map +1 -0
- package/{lib/lex-v2 → dist/cjs/lex-v1}/types/inputs.js +3 -1
- package/dist/cjs/lex-v1/types/inputs.js.map +1 -0
- package/{lib/lex-v2 → dist/cjs/lex-v1}/types/outputs.js +3 -1
- package/dist/cjs/lex-v1/types/outputs.js.map +1 -0
- package/{lib/lex-v2 → dist/cjs/lex-v1}/utils/index.js +3 -1
- package/dist/cjs/lex-v1/utils/index.js.map +1 -0
- package/{lib → dist/cjs}/lex-v1/utils/resolveBotConfig.js +3 -1
- package/dist/cjs/lex-v1/utils/resolveBotConfig.js.map +1 -0
- package/{lib → dist/cjs}/lex-v2/AWSLexV2Provider.js +3 -3
- package/dist/cjs/lex-v2/AWSLexV2Provider.js.map +1 -0
- package/{lib → dist/cjs}/lex-v2/apis/index.js +3 -1
- package/dist/cjs/lex-v2/apis/index.js.map +1 -0
- package/{lib → dist/cjs}/lex-v2/apis/onComplete.js +3 -1
- package/dist/cjs/lex-v2/apis/onComplete.js.map +1 -0
- package/{lib → dist/cjs}/lex-v2/apis/send.js +3 -1
- package/dist/cjs/lex-v2/apis/send.js.map +1 -0
- package/{lib → dist/cjs}/lex-v2/index.js +3 -1
- package/dist/cjs/lex-v2/index.js.map +1 -0
- package/{lib → dist/cjs}/lex-v2/types/AWSLexV2ProviderOption.js +3 -1
- package/dist/cjs/lex-v2/types/AWSLexV2ProviderOption.js.map +1 -0
- package/{lib/lex-v1 → dist/cjs/lex-v2}/types/index.js +3 -1
- package/dist/cjs/lex-v2/types/index.js.map +1 -0
- package/{lib/lex-v1 → dist/cjs/lex-v2}/types/inputs.js +3 -1
- package/dist/cjs/lex-v2/types/inputs.js.map +1 -0
- package/{lib → dist/cjs/lex-v2}/types/outputs.js +3 -1
- package/dist/cjs/lex-v2/types/outputs.js.map +1 -0
- package/{lib/lex-v1 → dist/cjs/lex-v2}/utils/index.js +3 -1
- package/dist/cjs/lex-v2/utils/index.js.map +1 -0
- package/{lib → dist/cjs}/lex-v2/utils/resolveBotConfig.js +3 -1
- package/dist/cjs/lex-v2/utils/resolveBotConfig.js.map +1 -0
- package/{lib → dist/cjs}/types/Interactions.js +3 -1
- package/dist/cjs/types/Interactions.js.map +1 -0
- package/{lib → dist/cjs}/types/index.js +3 -1
- package/dist/cjs/types/index.js.map +1 -0
- package/{lib → dist/cjs}/types/inputs.js +3 -1
- package/dist/cjs/types/inputs.js.map +1 -0
- package/{lib/lex-v1 → dist/cjs}/types/outputs.js +3 -1
- package/dist/cjs/types/outputs.js.map +1 -0
- package/{lib → dist/cjs}/utils/commonUtils.js +3 -1
- package/dist/cjs/utils/commonUtils.js.map +1 -0
- package/{lib → dist/cjs}/utils/index.js +3 -1
- package/dist/cjs/utils/index.js.map +1 -0
- package/{lib → dist/cjs}/utils/utils.js +3 -1
- package/dist/cjs/utils/utils.js.map +1 -0
- package/{lib → dist/cjs}/utils/utils.native.js +3 -1
- package/dist/cjs/utils/utils.native.js.map +1 -0
- package/{lib-esm/errors/InteractionsError.js → dist/esm/errors/InteractionsError.mjs} +6 -2
- package/dist/esm/errors/InteractionsError.mjs.map +1 -0
- package/{lib-esm/errors/assertValidationError.js → dist/esm/errors/assertValidationError.mjs} +7 -3
- package/dist/esm/errors/assertValidationError.mjs.map +1 -0
- package/dist/esm/errors/index.mjs +3 -0
- package/dist/esm/errors/index.mjs.map +1 -0
- package/{lib-esm/errors/validation.js → dist/esm/errors/validation.mjs} +5 -2
- package/dist/esm/errors/validation.mjs.map +1 -0
- package/dist/esm/index.mjs +2 -0
- package/dist/esm/index.mjs.map +1 -0
- package/{lib-esm/lex-v1/AWSLexProvider.js → dist/esm/lex-v1/AWSLexProvider.mjs} +7 -5
- package/dist/esm/lex-v1/AWSLexProvider.mjs.map +1 -0
- package/dist/esm/lex-v1/apis/index.mjs +3 -0
- package/dist/esm/lex-v1/apis/index.mjs.map +1 -0
- package/dist/esm/lex-v1/apis/onComplete.mjs +16 -0
- package/dist/esm/lex-v1/apis/onComplete.mjs.map +1 -0
- package/{lib-esm/lex-v2/apis/send.js → dist/esm/lex-v1/apis/send.mjs} +9 -4
- package/dist/esm/lex-v1/apis/send.mjs.map +1 -0
- package/{lib-esm/lex-v1/index.js → dist/esm/lex-v1/index.mjs} +7 -2
- package/dist/esm/lex-v1/index.mjs.map +1 -0
- package/dist/esm/lex-v1/types/AWSLexProviderOption.mjs +2 -0
- package/dist/esm/lex-v1/types/AWSLexProviderOption.mjs.map +1 -0
- package/dist/esm/lex-v1/types/index.mjs +2 -0
- package/dist/esm/lex-v1/types/index.mjs.map +1 -0
- package/dist/esm/lex-v1/types/inputs.mjs +2 -0
- package/dist/esm/lex-v1/types/inputs.mjs.map +1 -0
- package/dist/esm/lex-v1/types/outputs.mjs +2 -0
- package/dist/esm/lex-v1/types/outputs.mjs.map +1 -0
- package/dist/esm/lex-v1/utils/index.mjs +2 -0
- package/dist/esm/lex-v1/utils/index.mjs.map +1 -0
- package/{lib-esm/lex-v1/utils/resolveBotConfig.js → dist/esm/lex-v1/utils/resolveBotConfig.mjs} +6 -2
- package/dist/esm/lex-v1/utils/resolveBotConfig.mjs.map +1 -0
- package/{lib-esm/lex-v2/AWSLexV2Provider.js → dist/esm/lex-v2/AWSLexV2Provider.mjs} +10 -7
- package/dist/esm/lex-v2/AWSLexV2Provider.mjs.map +1 -0
- package/dist/esm/lex-v2/apis/index.mjs +3 -0
- package/dist/esm/lex-v2/apis/index.mjs.map +1 -0
- package/dist/esm/lex-v2/apis/onComplete.mjs +16 -0
- package/dist/esm/lex-v2/apis/onComplete.mjs.map +1 -0
- package/{lib-esm/lex-v1/apis/send.js → dist/esm/lex-v2/apis/send.mjs} +9 -4
- package/dist/esm/lex-v2/apis/send.mjs.map +1 -0
- package/dist/esm/lex-v2/index.mjs +12 -0
- package/dist/esm/lex-v2/index.mjs.map +1 -0
- package/dist/esm/lex-v2/types/AWSLexV2ProviderOption.mjs +2 -0
- package/dist/esm/lex-v2/types/AWSLexV2ProviderOption.mjs.map +1 -0
- package/dist/esm/lex-v2/types/index.mjs +2 -0
- package/dist/esm/lex-v2/types/index.mjs.map +1 -0
- package/dist/esm/lex-v2/types/inputs.mjs +2 -0
- package/dist/esm/lex-v2/types/inputs.mjs.map +1 -0
- package/dist/esm/lex-v2/types/outputs.mjs +2 -0
- package/dist/esm/lex-v2/types/outputs.mjs.map +1 -0
- package/dist/esm/lex-v2/utils/index.mjs +2 -0
- package/dist/esm/lex-v2/utils/index.mjs.map +1 -0
- package/{lib-esm/lex-v2/utils/resolveBotConfig.js → dist/esm/lex-v2/utils/resolveBotConfig.mjs} +6 -2
- package/dist/esm/lex-v2/utils/resolveBotConfig.mjs.map +1 -0
- package/dist/esm/types/Interactions.mjs +2 -0
- package/dist/esm/types/Interactions.mjs.map +1 -0
- package/dist/esm/types/index.mjs +2 -0
- package/dist/esm/types/index.mjs.map +1 -0
- package/dist/esm/types/inputs.mjs +2 -0
- package/dist/esm/types/inputs.mjs.map +1 -0
- package/dist/esm/types/outputs.mjs +2 -0
- package/dist/esm/types/outputs.mjs.map +1 -0
- package/{lib-esm/utils/commonUtils.js → dist/esm/utils/commonUtils.mjs} +6 -2
- package/dist/esm/utils/commonUtils.mjs.map +1 -0
- package/dist/esm/utils/index.mjs +3 -0
- package/dist/esm/utils/index.mjs.map +1 -0
- package/{lib-esm/utils/utils.js → dist/esm/utils/utils.mjs} +8 -4
- package/dist/esm/utils/utils.mjs.map +1 -0
- package/{lib-esm/utils/utils.native.js → dist/esm/utils/utils.native.mjs} +9 -5
- package/dist/esm/utils/utils.native.mjs.map +1 -0
- package/lex-v1/package.json +5 -4
- package/lex-v2/package.json +5 -4
- package/package.json +38 -38
- package/lib/errors/InteractionsError.d.ts +0 -4
- package/lib/errors/assertValidationError.d.ts +0 -2
- package/lib/errors/index.d.ts +0 -2
- package/lib/errors/validation.d.ts +0 -5
- package/lib/index.d.ts +0 -2
- package/lib/lex-v1/AWSLexProvider.d.ts +0 -20
- package/lib/lex-v1/apis/index.d.ts +0 -2
- package/lib/lex-v1/apis/onComplete.d.ts +0 -2
- package/lib/lex-v1/apis/send.d.ts +0 -2
- package/lib/lex-v1/index.d.ts +0 -6
- package/lib/lex-v1/types/AWSLexProviderOption.d.ts +0 -11
- package/lib/lex-v1/types/index.d.ts +0 -3
- package/lib/lex-v1/types/inputs.d.ts +0 -9
- package/lib/lex-v1/types/outputs.d.ts +0 -5
- package/lib/lex-v1/utils/index.d.ts +0 -1
- package/lib/lex-v1/utils/resolveBotConfig.d.ts +0 -2
- package/lib/lex-v2/AWSLexV2Provider.d.ts +0 -52
- package/lib/lex-v2/apis/index.d.ts +0 -2
- package/lib/lex-v2/apis/onComplete.d.ts +0 -2
- package/lib/lex-v2/apis/send.d.ts +0 -2
- package/lib/lex-v2/index.d.ts +0 -3
- package/lib/lex-v2/types/AWSLexV2ProviderOption.d.ts +0 -13
- package/lib/lex-v2/types/index.d.ts +0 -3
- package/lib/lex-v2/types/inputs.d.ts +0 -9
- package/lib/lex-v2/types/outputs.d.ts +0 -5
- package/lib/lex-v2/utils/index.d.ts +0 -1
- package/lib/lex-v2/utils/resolveBotConfig.d.ts +0 -2
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/types/Interactions.d.ts +0 -17
- package/lib/types/index.d.ts +0 -2
- package/lib/types/inputs.d.ts +0 -9
- package/lib/types/outputs.d.ts +0 -2
- package/lib/utils/commonUtils.d.ts +0 -1
- package/lib/utils/index.d.ts +0 -2
- package/lib/utils/utils.d.ts +0 -3
- package/lib/utils/utils.native.d.ts +0 -3
- package/lib-esm/errors/index.js +0 -4
- package/lib-esm/index.js +0 -3
- package/lib-esm/lex-v1/apis/index.js +0 -4
- package/lib-esm/lex-v1/apis/onComplete.js +0 -11
- package/lib-esm/lex-v1/types/AWSLexProviderOption.js +0 -3
- package/lib-esm/lex-v1/types/index.js +0 -3
- package/lib-esm/lex-v1/types/inputs.js +0 -3
- package/lib-esm/lex-v1/types/outputs.js +0 -3
- package/lib-esm/lex-v1/utils/index.js +0 -3
- package/lib-esm/lex-v2/apis/index.js +0 -4
- package/lib-esm/lex-v2/apis/onComplete.js +0 -11
- package/lib-esm/lex-v2/index.js +0 -7
- package/lib-esm/lex-v2/types/AWSLexV2ProviderOption.js +0 -3
- package/lib-esm/lex-v2/types/index.js +0 -3
- package/lib-esm/lex-v2/types/inputs.js +0 -3
- package/lib-esm/lex-v2/types/outputs.js +0 -3
- package/lib-esm/lex-v2/utils/index.js +0 -3
- package/lib-esm/tsconfig.tsbuildinfo +0 -1
- package/lib-esm/types/Interactions.js +0 -3
- package/lib-esm/types/index.js +0 -3
- package/lib-esm/types/inputs.js +0 -3
- package/lib-esm/types/outputs.js +0 -3
- package/lib-esm/utils/index.js +0 -4
- /package/{lib-esm → dist/esm}/errors/InteractionsError.d.ts +0 -0
- /package/{lib-esm → dist/esm}/errors/assertValidationError.d.ts +0 -0
- /package/{lib-esm → dist/esm}/errors/index.d.ts +0 -0
- /package/{lib-esm → dist/esm}/errors/validation.d.ts +0 -0
- /package/{lib-esm → dist/esm}/index.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v1/AWSLexProvider.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v1/apis/index.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v1/apis/onComplete.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v1/apis/send.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v1/index.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v1/types/AWSLexProviderOption.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v1/types/index.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v1/types/inputs.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v1/types/outputs.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v1/utils/index.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v1/utils/resolveBotConfig.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v2/AWSLexV2Provider.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v2/apis/index.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v2/apis/onComplete.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v2/apis/send.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v2/index.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v2/types/AWSLexV2ProviderOption.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v2/types/index.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v2/types/inputs.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v2/types/outputs.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v2/utils/index.d.ts +0 -0
- /package/{lib-esm → dist/esm}/lex-v2/utils/resolveBotConfig.d.ts +0 -0
- /package/{lib-esm → dist/esm}/types/Interactions.d.ts +0 -0
- /package/{lib-esm → dist/esm}/types/index.d.ts +0 -0
- /package/{lib-esm → dist/esm}/types/inputs.d.ts +0 -0
- /package/{lib-esm → dist/esm}/types/outputs.d.ts +0 -0
- /package/{lib-esm → dist/esm}/utils/commonUtils.d.ts +0 -0
- /package/{lib-esm → dist/esm}/utils/index.d.ts +0 -0
- /package/{lib-esm → dist/esm}/utils/utils.d.ts +0 -0
- /package/{lib-esm → dist/esm}/utils/utils.native.d.ts +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -14,3 +15,4 @@ class InteractionsError extends utils_1.AmplifyError {
|
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
exports.InteractionsError = InteractionsError;
|
|
18
|
+
//# sourceMappingURL=InteractionsError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InteractionsError.js","sources":["../../../src/errors/InteractionsError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InteractionsError = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nclass InteractionsError extends utils_1.AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = InteractionsError;\n Object.setPrototypeOf(this, InteractionsError.prototype);\n }\n}\nexports.InteractionsError = InteractionsError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,iBAAiB,GAAG,KAAK,CAAC,CAAC;AACnC,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,iBAAiB,SAAS,OAAO,CAAC,YAAY,CAAC;AACrD,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,CAAC,MAAM,CAAC,CAAC;AACtB;AACA;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,iBAAiB,CAAC;AAC7C,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;AACjE,KAAK;AACL,CAAC;AACD,OAAO,CAAC,iBAAiB,GAAG,iBAAiB;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -16,3 +17,4 @@ function assertValidationError(assertion, name, message) {
|
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
exports.assertValidationError = assertValidationError;
|
|
20
|
+
//# sourceMappingURL=assertValidationError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertValidationError.js","sources":["../../../src/errors/assertValidationError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertValidationError = void 0;\nconst validation_1 = require(\"./validation\");\nconst InteractionsError_1 = require(\"./InteractionsError\");\nfunction assertValidationError(assertion, name, message) {\n if (!assertion) {\n const { message: defaultMessage, recoverySuggestion } = validation_1.validationErrorMap[name];\n throw new InteractionsError_1.InteractionsError({\n name,\n message: message ?? defaultMessage,\n recoverySuggestion,\n });\n }\n}\nexports.assertValidationError = assertValidationError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,qBAAqB,GAAG,KAAK,CAAC,CAAC;AACvC,MAAM,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAC7C,MAAM,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAC3D,SAAS,qBAAqB,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE;AACzD,IAAI,IAAI,CAAC,SAAS,EAAE;AACpB,QAAQ,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,GAAG,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;AACtG,QAAQ,MAAM,IAAI,mBAAmB,CAAC,iBAAiB,CAAC;AACxD,YAAY,IAAI;AAChB,YAAY,OAAO,EAAE,OAAO,IAAI,cAAc;AAC9C,YAAY,kBAAkB;AAC9B,SAAS,CAAC,CAAC;AACX,KAAK;AACL,CAAC;AACD,OAAO,CAAC,qBAAqB,GAAG,qBAAqB;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7,3 +8,4 @@ var assertValidationError_1 = require("./assertValidationError");
|
|
|
7
8
|
Object.defineProperty(exports, "assertValidationError", { enumerable: true, get: function () { return assertValidationError_1.assertValidationError; } });
|
|
8
9
|
var validation_1 = require("./validation");
|
|
9
10
|
Object.defineProperty(exports, "InteractionsValidationErrorCode", { enumerable: true, get: function () { return validation_1.InteractionsValidationErrorCode; } });
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/errors/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InteractionsValidationErrorCode = exports.assertValidationError = void 0;\nvar assertValidationError_1 = require(\"./assertValidationError\");\nObject.defineProperty(exports, \"assertValidationError\", { enumerable: true, get: function () { return assertValidationError_1.assertValidationError; } });\nvar validation_1 = require(\"./validation\");\nObject.defineProperty(exports, \"InteractionsValidationErrorCode\", { enumerable: true, get: function () { return validation_1.InteractionsValidationErrorCode; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,+BAA+B,GAAG,OAAO,CAAC,qBAAqB,GAAG,KAAK,CAAC,CAAC;AACjF,IAAI,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;AACjE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,uBAAuB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,uBAAuB,CAAC,qBAAqB,CAAC,EAAE,EAAE,CAAC,CAAC;AAC1J,IAAI,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAC3C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,iCAAiC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,YAAY,CAAC,+BAA+B,CAAC,EAAE,EAAE,CAAC;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -6,9 +7,10 @@ exports.validationErrorMap = exports.InteractionsValidationErrorCode = void 0;
|
|
|
6
7
|
var InteractionsValidationErrorCode;
|
|
7
8
|
(function (InteractionsValidationErrorCode) {
|
|
8
9
|
InteractionsValidationErrorCode["NoBotConfig"] = "NoBotConfig";
|
|
9
|
-
})(InteractionsValidationErrorCode
|
|
10
|
+
})(InteractionsValidationErrorCode = exports.InteractionsValidationErrorCode || (exports.InteractionsValidationErrorCode = {}));
|
|
10
11
|
exports.validationErrorMap = {
|
|
11
12
|
[InteractionsValidationErrorCode.NoBotConfig]: {
|
|
12
13
|
message: 'Missing configuration for the bot',
|
|
13
14
|
},
|
|
14
15
|
};
|
|
16
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sources":["../../../src/errors/validation.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validationErrorMap = exports.InteractionsValidationErrorCode = void 0;\nvar InteractionsValidationErrorCode;\n(function (InteractionsValidationErrorCode) {\n InteractionsValidationErrorCode[\"NoBotConfig\"] = \"NoBotConfig\";\n})(InteractionsValidationErrorCode = exports.InteractionsValidationErrorCode || (exports.InteractionsValidationErrorCode = {}));\nexports.validationErrorMap = {\n [InteractionsValidationErrorCode.NoBotConfig]: {\n message: 'Missing configuration for the bot',\n },\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,+BAA+B,GAAG,KAAK,CAAC,CAAC;AAC9E,IAAI,+BAA+B,CAAC;AACpC,CAAC,UAAU,+BAA+B,EAAE;AAC5C,IAAI,+BAA+B,CAAC,aAAa,CAAC,GAAG,aAAa,CAAC;AACnE,CAAC,EAAE,+BAA+B,GAAG,OAAO,CAAC,+BAA+B,KAAK,OAAO,CAAC,+BAA+B,GAAG,EAAE,CAAC,CAAC,CAAC;AAChI,OAAO,CAAC,kBAAkB,GAAG;AAC7B,IAAI,CAAC,+BAA+B,CAAC,WAAW,GAAG;AACnD,QAAQ,OAAO,EAAE,mCAAmC;AACpD,KAAK;AACL,CAAC;;"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
6
|
exports.Interactions = void 0;
|
|
6
7
|
var lex_v2_1 = require("./lex-v2");
|
|
7
8
|
Object.defineProperty(exports, "Interactions", { enumerable: true, get: function () { return lex_v2_1.Interactions; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Interactions = void 0;\nvar lex_v2_1 = require(\"./lex-v2\");\nObject.defineProperty(exports, \"Interactions\", { enumerable: true, get: function () { return lex_v2_1.Interactions; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC;AAC9B,IAAI,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACnC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,QAAQ,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.lexProvider = void 0;
|
|
4
5
|
const client_lex_runtime_service_1 = require("@aws-sdk/client-lex-runtime-service");
|
|
@@ -30,8 +31,6 @@ class AWSLexProvider {
|
|
|
30
31
|
case client_lex_runtime_service_1.DialogState.FAILED:
|
|
31
32
|
callback(new Error('Bot conversation failed'));
|
|
32
33
|
break;
|
|
33
|
-
default:
|
|
34
|
-
break;
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
async sendMessage(botConfig, message) {
|
|
@@ -117,3 +116,4 @@ class AWSLexProvider {
|
|
|
117
116
|
}
|
|
118
117
|
}
|
|
119
118
|
exports.lexProvider = new AWSLexProvider();
|
|
119
|
+
//# sourceMappingURL=AWSLexProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AWSLexProvider.js","sources":["../../../src/lex-v1/AWSLexProvider.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lexProvider = void 0;\nconst client_lex_runtime_service_1 = require(\"@aws-sdk/client-lex-runtime-service\");\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst core_1 = require(\"@aws-amplify/core\");\nconst utils_2 = require(\"../utils\");\nconst logger = new core_1.ConsoleLogger('AWSLexProvider');\nclass AWSLexProvider {\n constructor() {\n this._botsCompleteCallback = {};\n }\n /**\n * @deprecated\n * This is used internally by 'sendMessage' to call onComplete callback\n * for a bot if configured\n */\n reportBotStatus(data, { name }) {\n const callback = this._botsCompleteCallback[name];\n if (!callback) {\n return;\n }\n // Check if state is fulfilled to resolve onFullfilment promise\n logger.debug('postContent state', data.dialogState);\n switch (data.dialogState) {\n case client_lex_runtime_service_1.DialogState.READY_FOR_FULFILLMENT:\n case client_lex_runtime_service_1.DialogState.FULFILLED:\n callback(undefined, data);\n break;\n case client_lex_runtime_service_1.DialogState.FAILED:\n callback(new Error('Bot conversation failed'));\n break;\n default:\n break;\n }\n }\n async sendMessage(botConfig, message) {\n // check if credentials are present\n let session;\n try {\n session = await (0, core_1.fetchAuthSession)();\n }\n catch (error) {\n return Promise.reject('No credentials');\n }\n const { name, region, alias } = botConfig;\n const client = new client_lex_runtime_service_1.LexRuntimeServiceClient({\n region,\n credentials: session.credentials,\n customUserAgent: (0, utils_1.getAmplifyUserAgentObject)(),\n });\n let params;\n if (typeof message === 'string') {\n params = {\n botAlias: alias,\n botName: name,\n inputText: message,\n userId: session.identityId,\n };\n logger.debug('postText to lex', message);\n try {\n const postTextCommand = new client_lex_runtime_service_1.PostTextCommand(params);\n const data = await client.send(postTextCommand);\n this.reportBotStatus(data, botConfig);\n return data;\n }\n catch (err) {\n return Promise.reject(err);\n }\n }\n else {\n const { content, options: { messageType }, } = message;\n if (messageType === 'voice') {\n if (typeof content !== 'object') {\n return Promise.reject('invalid content type');\n }\n const inputStream = content instanceof Uint8Array ? content : await (0, utils_2.convert)(content);\n params = {\n botAlias: alias,\n botName: name,\n contentType: 'audio/x-l16; sample-rate=16000; channel-count=1',\n userId: session.identityId,\n accept: 'audio/mpeg',\n inputStream,\n };\n }\n else {\n if (typeof content !== 'string')\n return Promise.reject('invalid content type');\n params = {\n botAlias: alias,\n botName: name,\n contentType: 'text/plain; charset=utf-8',\n inputStream: content,\n userId: session.identityId,\n accept: 'audio/mpeg',\n };\n }\n logger.debug('postContent to lex', message);\n try {\n const postContentCommand = new client_lex_runtime_service_1.PostContentCommand(params);\n const data = await client.send(postContentCommand);\n const audioArray = data.audioStream\n ? await (0, utils_2.convert)(data.audioStream)\n : undefined;\n const response = { ...data, ...{ audioStream: audioArray } };\n this.reportBotStatus(response, botConfig);\n return response;\n }\n catch (err) {\n return Promise.reject(err);\n }\n }\n }\n onComplete({ name }, callback) {\n this._botsCompleteCallback[name] = callback;\n }\n}\nexports.lexProvider = new AWSLexProvider();\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,WAAW,GAAG,KAAK,CAAC,CAAC;AAC7B,MAAM,4BAA4B,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACpF,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACpC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;AAC1D,MAAM,cAAc,CAAC;AACrB,IAAI,WAAW,GAAG;AAClB,QAAQ,IAAI,CAAC,qBAAqB,GAAG,EAAE,CAAC;AACxC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI,eAAe,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE;AACpC,QAAQ,MAAM,QAAQ,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;AAC1D,QAAQ,IAAI,CAAC,QAAQ,EAAE;AACvB,YAAY,OAAO;A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AE,EAAE,QAAQ,EAAE;AACnC,QAAQ,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;AACpD,KAAK;AACL,CAAC;AACD,OAAO,CAAC,WAAW,GAAG,IAAI,cAAc,EAAE;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7,3 +8,4 @@ var send_1 = require("./send");
|
|
|
7
8
|
Object.defineProperty(exports, "send", { enumerable: true, get: function () { return send_1.send; } });
|
|
8
9
|
var onComplete_1 = require("./onComplete");
|
|
9
10
|
Object.defineProperty(exports, "onComplete", { enumerable: true, get: function () { return onComplete_1.onComplete; } });
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/lex-v1/apis/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onComplete = exports.send = void 0;\nvar send_1 = require(\"./send\");\nObject.defineProperty(exports, \"send\", { enumerable: true, get: function () { return send_1.send; } });\nvar onComplete_1 = require(\"./onComplete\");\nObject.defineProperty(exports, \"onComplete\", { enumerable: true, get: function () { return onComplete_1.onComplete; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC/B,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;AACvG,IAAI,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAC3C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,YAAY,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -13,3 +14,4 @@ const onComplete = (input) => {
|
|
|
13
14
|
AWSLexProvider_1.lexProvider.onComplete(botConfig, callback);
|
|
14
15
|
};
|
|
15
16
|
exports.onComplete = onComplete;
|
|
17
|
+
//# sourceMappingURL=onComplete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onComplete.js","sources":["../../../../src/lex-v1/apis/onComplete.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onComplete = void 0;\nconst utils_1 = require(\"../utils\");\nconst AWSLexProvider_1 = require(\"../AWSLexProvider\");\nconst errors_1 = require(\"../../errors\");\nconst onComplete = (input) => {\n const { botName, callback } = input;\n const botConfig = (0, utils_1.resolveBotConfig)(botName);\n (0, errors_1.assertValidationError)(!!botConfig, errors_1.InteractionsValidationErrorCode.NoBotConfig, `Bot ${botName} does not exist.`);\n AWSLexProvider_1.lexProvider.onComplete(botConfig, callback);\n};\nexports.onComplete = onComplete;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,UAAU,GAAG,KAAK,CAAC,CAAC;AAC5B,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACpC,MAAM,gBAAgB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AACtD,MAAM,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AACzC,MAAM,UAAU,GAAG,CAAC,KAAK,KAAK;AAC9B,IAAI,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;AACxC,IAAI,MAAM,SAAS,GAAG,IAAI,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAC7D,IAAI,IAAI,QAAQ,CAAC,qBAAqB,EAAE,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,+BAA+B,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAC7I,IAAI,gBAAgB,CAAC,WAAW,CAAC,UAAU,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AACjE,CAAC,CAAC;AACF,OAAO,CAAC,UAAU,GAAG,UAAU;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -13,3 +14,4 @@ const send = async (input) => {
|
|
|
13
14
|
return AWSLexProvider_1.lexProvider.sendMessage(botConfig, message);
|
|
14
15
|
};
|
|
15
16
|
exports.send = send;
|
|
17
|
+
//# sourceMappingURL=send.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send.js","sources":["../../../../src/lex-v1/apis/send.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.send = void 0;\nconst utils_1 = require(\"../utils\");\nconst AWSLexProvider_1 = require(\"../AWSLexProvider\");\nconst errors_1 = require(\"../../errors\");\nconst send = async (input) => {\n const { botName, message } = input;\n const botConfig = (0, utils_1.resolveBotConfig)(botName);\n (0, errors_1.assertValidationError)(!!botConfig, errors_1.InteractionsValidationErrorCode.NoBotConfig, `Bot ${botName} does not exist.`);\n return AWSLexProvider_1.lexProvider.sendMessage(botConfig, message);\n};\nexports.send = send;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;AACtB,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACpC,MAAM,gBAAgB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AACtD,MAAM,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AACzC,MAAM,IAAI,GAAG,OAAO,KAAK,KAAK;AAC9B,IAAI,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AACvC,IAAI,MAAM,SAAS,GAAG,IAAI,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAC7D,IAAI,IAAI,QAAQ,CAAC,qBAAqB,EAAE,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,+BAA+B,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAC7I,IAAI,OAAO,gBAAgB,CAAC,WAAW,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACxE,CAAC,CAAC;AACF,OAAO,CAAC,IAAI,GAAG,IAAI;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -11,3 +12,4 @@ exports.Interactions = {
|
|
|
11
12
|
send: apis_1.send,
|
|
12
13
|
onComplete: apis_1.onComplete,
|
|
13
14
|
};
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/lex-v1/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Interactions = void 0;\nconst apis_1 = require(\"./apis\");\n/**\n * @deprecated recommend to migrate to AWS Lex V2 instead\n * */\nexports.Interactions = {\n send: apis_1.send,\n onComplete: apis_1.onComplete,\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC;AAC9B,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC;AACA;AACA;AACA,OAAO,CAAC,YAAY,GAAG;AACvB,IAAI,IAAI,EAAE,MAAM,CAAC,IAAI;AACrB,IAAI,UAAU,EAAE,MAAM,CAAC,UAAU;AACjC,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AWSLexProviderOption.js","sources":["../../../../src/lex-v1/types/AWSLexProviderOption.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/lex-v1/types/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputs.js","sources":["../../../../src/lex-v1/types/inputs.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputs.js","sources":["../../../../src/lex-v1/types/outputs.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
6
|
exports.resolveBotConfig = void 0;
|
|
6
7
|
var resolveBotConfig_1 = require("./resolveBotConfig");
|
|
7
8
|
Object.defineProperty(exports, "resolveBotConfig", { enumerable: true, get: function () { return resolveBotConfig_1.resolveBotConfig; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/lex-v1/utils/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveBotConfig = void 0;\nvar resolveBotConfig_1 = require(\"./resolveBotConfig\");\nObject.defineProperty(exports, \"resolveBotConfig\", { enumerable: true, get: function () { return resolveBotConfig_1.resolveBotConfig; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;AAClC,IAAI,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AACvD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,kBAAkB,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -11,3 +12,4 @@ const resolveBotConfig = (botName) => {
|
|
|
11
12
|
}
|
|
12
13
|
};
|
|
13
14
|
exports.resolveBotConfig = resolveBotConfig;
|
|
15
|
+
//# sourceMappingURL=resolveBotConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveBotConfig.js","sources":["../../../../src/lex-v1/utils/resolveBotConfig.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveBotConfig = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst resolveBotConfig = (botName) => {\n const { [botName]: botConfig = undefined } = core_1.Amplify.getConfig().Interactions?.LexV1 ?? {};\n if (botConfig !== undefined) {\n return { ...botConfig, name: botName };\n }\n};\nexports.resolveBotConfig = resolveBotConfig;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;AAClC,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,gBAAgB,GAAG,CAAC,OAAO,KAAK;AACtC,IAAI,MAAM,EAAE,CAAC,OAAO,GAAG,SAAS,GAAG,SAAS,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE,CAAC;AACtG,IAAI,IAAI,SAAS,KAAK,SAAS,EAAE;AACjC,QAAQ,OAAO,EAAE,GAAG,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC/C,KAAK;AACL,CAAC,CAAC;AACF,OAAO,CAAC,gBAAgB,GAAG,gBAAgB;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.lexProvider = void 0;
|
|
4
5
|
const client_lex_runtime_v2_1 = require("@aws-sdk/client-lex-runtime-v2");
|
|
@@ -78,8 +79,6 @@ class AWSLexV2Provider {
|
|
|
78
79
|
case client_lex_runtime_v2_1.IntentState.FAILED:
|
|
79
80
|
callback(new Error('Bot conversation failed'));
|
|
80
81
|
break;
|
|
81
|
-
default:
|
|
82
|
-
break;
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
84
|
/**
|
|
@@ -164,3 +163,4 @@ class AWSLexV2Provider {
|
|
|
164
163
|
}
|
|
165
164
|
}
|
|
166
165
|
exports.lexProvider = new AWSLexV2Provider();
|
|
166
|
+
//# sourceMappingURL=AWSLexV2Provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AWSLexV2Provider.js","sources":["../../../src/lex-v2/AWSLexV2Provider.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lexProvider = void 0;\nconst client_lex_runtime_v2_1 = require(\"@aws-sdk/client-lex-runtime-v2\");\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst core_1 = require(\"@aws-amplify/core\");\nconst utils_2 = require(\"../utils\");\nconst uuid_1 = require(\"uuid\");\nconst logger = new core_1.ConsoleLogger('AWSLexV2Provider');\nclass AWSLexV2Provider {\n constructor() {\n this._botsCompleteCallback = {};\n this.defaultSessionId = (0, uuid_1.v4)();\n }\n /**\n * Send a message to a bot\n * @async\n * @param {AWSLexV2ProviderOption} botConfig - Bot configuration for sending the message\n * @param {string | InteractionsMessage} message - message to send to the bot\n * @return {Promise<InteractionsResponse>} A promise resolves to the response from the bot\n */\n async sendMessage(botConfig, message) {\n // check if credentials are present\n let session;\n try {\n session = await (0, core_1.fetchAuthSession)();\n }\n catch (error) {\n return Promise.reject('No credentials');\n }\n const { region, aliasId, localeId, botId } = botConfig;\n const client = new client_lex_runtime_v2_1.LexRuntimeV2Client({\n region,\n credentials: session.credentials,\n customUserAgent: (0, utils_1.getAmplifyUserAgentObject)(),\n });\n let response;\n // common base params for all requests\n const reqBaseParams = {\n botAliasId: aliasId,\n botId,\n localeId,\n sessionId: session.identityId ?? this.defaultSessionId,\n };\n if (typeof message === 'string') {\n response = await this._handleRecognizeTextCommand(botConfig, message, reqBaseParams, client);\n }\n else {\n response = await this._handleRecognizeUtteranceCommand(botConfig, message, reqBaseParams, client);\n }\n return response;\n }\n /**\n * Attach a onComplete callback function to a bot.\n * The callback is called once the bot's intent is fulfilled\n * @param {AWSLexV2ProviderOption} botConfig - Bot configuration to attach the onComplete callback\n * @param {InteractionsOnCompleteCallback} callback - called when Intent Fulfilled\n */\n onComplete({ name }, callback) {\n this._botsCompleteCallback[name] = callback;\n }\n /**\n * call onComplete callback for a bot if configured\n */\n _reportBotStatus(data, { name }) {\n const sessionState = data?.sessionState;\n // Check if state is fulfilled to resolve onFullfilment promise\n logger.debug('postContent state', sessionState?.intent?.state);\n const callback = this._botsCompleteCallback[name];\n if (!callback) {\n return;\n }\n switch (sessionState?.intent?.state) {\n case client_lex_runtime_v2_1.IntentState.READY_FOR_FULFILLMENT:\n case client_lex_runtime_v2_1.IntentState.FULFILLED:\n callback(undefined, data);\n break;\n case client_lex_runtime_v2_1.IntentState.FAILED:\n callback(new Error('Bot conversation failed'));\n break;\n default:\n break;\n }\n }\n /**\n * Format UtteranceCommandOutput's response\n * decompress attributes\n * update audioStream format\n */\n async _formatUtteranceCommandOutput(data) {\n return {\n ...data,\n messages: await (0, utils_2.unGzipBase64AsJson)(data.messages),\n sessionState: await (0, utils_2.unGzipBase64AsJson)(data.sessionState),\n interpretations: await (0, utils_2.unGzipBase64AsJson)(data.interpretations),\n requestAttributes: await (0, utils_2.unGzipBase64AsJson)(data.requestAttributes),\n inputTranscript: await (0, utils_2.unGzipBase64AsJson)(data.inputTranscript),\n audioStream: data.audioStream\n ? await (0, utils_2.convert)(data.audioStream)\n : undefined,\n };\n }\n /**\n * handle client's `RecognizeTextCommand`\n * used for sending simple text message\n */\n async _handleRecognizeTextCommand(botConfig, data, baseParams, client) {\n logger.debug('postText to lex2', data);\n const params = {\n ...baseParams,\n text: data,\n };\n try {\n const recognizeTextCommand = new client_lex_runtime_v2_1.RecognizeTextCommand(params);\n const data = await client.send(recognizeTextCommand);\n this._reportBotStatus(data, botConfig);\n return data;\n }\n catch (err) {\n return Promise.reject(err);\n }\n }\n /**\n * handle client's `RecognizeUtteranceCommand`\n * used for obj text or obj voice message\n */\n async _handleRecognizeUtteranceCommand(botConfig, data, baseParams, client) {\n const { content, options: { messageType }, } = data;\n logger.debug('postContent to lex2', data);\n let params;\n // prepare params\n if (messageType === 'voice') {\n if (typeof content !== 'object') {\n return Promise.reject('invalid content type');\n }\n const inputStream = content instanceof Uint8Array ? content : await (0, utils_2.convert)(content);\n params = {\n ...baseParams,\n requestContentType: 'audio/x-l16; sample-rate=16000; channel-count=1',\n inputStream,\n };\n }\n else {\n // text input\n if (typeof content !== 'string')\n return Promise.reject('invalid content type');\n params = {\n ...baseParams,\n requestContentType: 'text/plain; charset=utf-8',\n inputStream: content,\n };\n }\n // make API call to lex\n try {\n const recognizeUtteranceCommand = new client_lex_runtime_v2_1.RecognizeUtteranceCommand(params);\n const data = await client.send(recognizeUtteranceCommand);\n const response = await this._formatUtteranceCommandOutput(data);\n this._reportBotStatus(response, botConfig);\n return response;\n }\n catch (err) {\n return Promise.reject(err);\n }\n }\n}\nexports.lexProvider = new AWSLexV2Provider();\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;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AACA,YAAY,IAAI,OAAO,OAAO,KAAK,QAAQ;AAC3C,gBAAgB,OAAO,OAAO,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAC9D,YAAY,MAAM,GAAG;AACrB,gBAAgB,GAAG,UAAU;AAC7B,gBAAgB,kBAAkB,EAAE,2BAA2B;AAC/D,gBAAgB,WAAW,EAAE,OAAO;AACpC,aAAa,CAAC;AACd,SAAS;AACT;AACA,QAAQ,IAAI;AACZ,YAAY,MAAM,yBAAyB,GAAG,IAAI,uBAAuB,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAC5G,YAAY,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;AACtE,YAAY,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,6BAA6B,CAAC,IAAI,CAAC,CAAC;AAC5E,YAAY,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;AACvD,YAAY,OAAO,QAAQ,CAAC;AAC5B,SAAS;AACT,QAAQ,OAAO,GAAG,EAAE;AACpB,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACvC,SAAS;AACT,KAAK;AACL,CAAC;AACD,OAAO,CAAC,WAAW,GAAG,IAAI,gBAAgB,EAAE;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7,3 +8,4 @@ var send_1 = require("./send");
|
|
|
7
8
|
Object.defineProperty(exports, "send", { enumerable: true, get: function () { return send_1.send; } });
|
|
8
9
|
var onComplete_1 = require("./onComplete");
|
|
9
10
|
Object.defineProperty(exports, "onComplete", { enumerable: true, get: function () { return onComplete_1.onComplete; } });
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/lex-v2/apis/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onComplete = exports.send = void 0;\nvar send_1 = require(\"./send\");\nObject.defineProperty(exports, \"send\", { enumerable: true, get: function () { return send_1.send; } });\nvar onComplete_1 = require(\"./onComplete\");\nObject.defineProperty(exports, \"onComplete\", { enumerable: true, get: function () { return onComplete_1.onComplete; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC/B,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;AACvG,IAAI,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAC3C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,YAAY,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -13,3 +14,4 @@ const onComplete = (input) => {
|
|
|
13
14
|
AWSLexV2Provider_1.lexProvider.onComplete(botConfig, callback);
|
|
14
15
|
};
|
|
15
16
|
exports.onComplete = onComplete;
|
|
17
|
+
//# sourceMappingURL=onComplete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onComplete.js","sources":["../../../../src/lex-v2/apis/onComplete.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onComplete = void 0;\nconst utils_1 = require(\"../utils\");\nconst AWSLexV2Provider_1 = require(\"../AWSLexV2Provider\");\nconst errors_1 = require(\"../../errors\");\nconst onComplete = (input) => {\n const { botName, callback } = input;\n const botConfig = (0, utils_1.resolveBotConfig)(botName);\n (0, errors_1.assertValidationError)(!!botConfig, errors_1.InteractionsValidationErrorCode.NoBotConfig, `Bot ${botName} does not exist.`);\n AWSLexV2Provider_1.lexProvider.onComplete(botConfig, callback);\n};\nexports.onComplete = onComplete;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,UAAU,GAAG,KAAK,CAAC,CAAC;AAC5B,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACpC,MAAM,kBAAkB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAC1D,MAAM,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AACzC,MAAM,UAAU,GAAG,CAAC,KAAK,KAAK;AAC9B,IAAI,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;AACxC,IAAI,MAAM,SAAS,GAAG,IAAI,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAC7D,IAAI,IAAI,QAAQ,CAAC,qBAAqB,EAAE,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,+BAA+B,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAC7I,IAAI,kBAAkB,CAAC,WAAW,CAAC,UAAU,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AACnE,CAAC,CAAC;AACF,OAAO,CAAC,UAAU,GAAG,UAAU;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -13,3 +14,4 @@ const send = async (input) => {
|
|
|
13
14
|
return AWSLexV2Provider_1.lexProvider.sendMessage(botConfig, message);
|
|
14
15
|
};
|
|
15
16
|
exports.send = send;
|
|
17
|
+
//# sourceMappingURL=send.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send.js","sources":["../../../../src/lex-v2/apis/send.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.send = void 0;\nconst AWSLexV2Provider_1 = require(\"../AWSLexV2Provider\");\nconst utils_1 = require(\"../utils\");\nconst errors_1 = require(\"../../errors\");\nconst send = async (input) => {\n const { botName, message } = input;\n const botConfig = (0, utils_1.resolveBotConfig)(botName);\n (0, errors_1.assertValidationError)(!!botConfig, errors_1.InteractionsValidationErrorCode.NoBotConfig, `Bot ${botName} does not exist.`);\n return AWSLexV2Provider_1.lexProvider.sendMessage(botConfig, message);\n};\nexports.send = send;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;AACtB,MAAM,kBAAkB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAC1D,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACpC,MAAM,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AACzC,MAAM,IAAI,GAAG,OAAO,KAAK,KAAK;AAC9B,IAAI,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AACvC,IAAI,MAAM,SAAS,GAAG,IAAI,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAC7D,IAAI,IAAI,QAAQ,CAAC,qBAAqB,EAAE,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,+BAA+B,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAC7I,IAAI,OAAO,kBAAkB,CAAC,WAAW,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAC1E,CAAC,CAAC;AACF,OAAO,CAAC,IAAI,GAAG,IAAI;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -8,3 +9,4 @@ exports.Interactions = {
|
|
|
8
9
|
send: apis_1.send,
|
|
9
10
|
onComplete: apis_1.onComplete,
|
|
10
11
|
};
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/lex-v2/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Interactions = void 0;\nconst apis_1 = require(\"./apis\");\nexports.Interactions = {\n send: apis_1.send,\n onComplete: apis_1.onComplete,\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC;AAC9B,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,OAAO,CAAC,YAAY,GAAG;AACvB,IAAI,IAAI,EAAE,MAAM,CAAC,IAAI;AACrB,IAAI,UAAU,EAAE,MAAM,CAAC,UAAU;AACjC,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AWSLexV2ProviderOption.js","sources":["../../../../src/lex-v2/types/AWSLexV2ProviderOption.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/lex-v2/types/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputs.js","sources":["../../../../src/lex-v2/types/inputs.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputs.js","sources":["../../../../src/lex-v2/types/outputs.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
6
|
exports.resolveBotConfig = void 0;
|
|
6
7
|
var resolveBotConfig_1 = require("./resolveBotConfig");
|
|
7
8
|
Object.defineProperty(exports, "resolveBotConfig", { enumerable: true, get: function () { return resolveBotConfig_1.resolveBotConfig; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/lex-v2/utils/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveBotConfig = void 0;\nvar resolveBotConfig_1 = require(\"./resolveBotConfig\");\nObject.defineProperty(exports, \"resolveBotConfig\", { enumerable: true, get: function () { return resolveBotConfig_1.resolveBotConfig; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;AAClC,IAAI,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AACvD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,kBAAkB,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -11,3 +12,4 @@ const resolveBotConfig = (botName) => {
|
|
|
11
12
|
}
|
|
12
13
|
};
|
|
13
14
|
exports.resolveBotConfig = resolveBotConfig;
|
|
15
|
+
//# sourceMappingURL=resolveBotConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveBotConfig.js","sources":["../../../../src/lex-v2/utils/resolveBotConfig.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveBotConfig = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst resolveBotConfig = (botName) => {\n const { [botName]: botConfig = undefined } = core_1.Amplify.getConfig().Interactions?.LexV2 ?? {};\n if (botConfig !== undefined) {\n return { ...botConfig, name: botName };\n }\n};\nexports.resolveBotConfig = resolveBotConfig;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;AAClC,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,gBAAgB,GAAG,CAAC,OAAO,KAAK;AACtC,IAAI,MAAM,EAAE,CAAC,OAAO,GAAG,SAAS,GAAG,SAAS,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE,CAAC;AACtG,IAAI,IAAI,SAAS,KAAK,SAAS,EAAE;AACjC,QAAQ,OAAO,EAAE,GAAG,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC/C,KAAK;AACL,CAAC,CAAC;AACF,OAAO,CAAC,gBAAgB,GAAG,gBAAgB;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Interactions.js","sources":["../../../src/types/Interactions.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/types/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputs.js","sources":["../../../src/types/inputs.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputs.js","sources":["../../../src/types/outputs.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.unGzipBase64AsJson = void 0;
|
|
4
5
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
@@ -17,3 +18,4 @@ const unGzipBase64AsJson = async (gzipBase64) => {
|
|
|
17
18
|
}
|
|
18
19
|
};
|
|
19
20
|
exports.unGzipBase64AsJson = unGzipBase64AsJson;
|
|
21
|
+
//# sourceMappingURL=commonUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commonUtils.js","sources":["../../../src/utils/commonUtils.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unGzipBase64AsJson = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst utils_1 = require(\"./utils\");\nconst unGzipBase64AsJson = async (gzipBase64) => {\n if (typeof gzipBase64 === 'undefined')\n return undefined;\n try {\n const decodedArrayBuffer = (0, utils_1.base64ToArrayBuffer)(gzipBase64);\n const objString = await (0, utils_1.gzipDecompressToString)(decodedArrayBuffer);\n return JSON.parse(objString);\n }\n catch (error) {\n return Promise.reject('unable to decode and decompress ' + error);\n }\n};\nexports.unGzipBase64AsJson = unGzipBase64AsJson;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,kBAAkB,GAAG,KAAK,CAAC,CAAC;AACpC;AACA;AACA,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AACnC,MAAM,kBAAkB,GAAG,OAAO,UAAU,KAAK;AACjD,IAAI,IAAI,OAAO,UAAU,KAAK,WAAW;AACzC,QAAQ,OAAO,SAAS,CAAC;AACzB,IAAI,IAAI;AACR,QAAQ,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC;AAChF,QAAQ,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAAC;AACxF,QAAQ,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACrC,KAAK;AACL,IAAI,OAAO,KAAK,EAAE;AAClB,QAAQ,OAAO,OAAO,CAAC,MAAM,CAAC,kCAAkC,GAAG,KAAK,CAAC,CAAC;AAC1E,KAAK;AACL,CAAC,CAAC;AACF,OAAO,CAAC,kBAAkB,GAAG,kBAAkB;;"}
|