@xapp/stentor-lex-lib 1.43.7 → 1.43.10

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.
@@ -1,6 +1,10 @@
1
1
  /*! Copyright (c) 2019, XAPPmedia */
2
2
  import { Attributes } from "./Attributes";
3
3
  import { CurrentIntent } from "./Intent";
4
+ export interface SentimentResponse {
5
+ sentimentLabel: "POSITIVE" | "NEUTRAL" | "NEGATIVE" | "MIXED" | string;
6
+ sentimentScore: string;
7
+ }
4
8
  /**
5
9
  * Incoming payload to the Lex fulfillment lambda
6
10
  *
@@ -17,6 +21,7 @@ export interface LexRequest {
17
21
  currentIntent: CurrentIntent;
18
22
  inputTranscript: string;
19
23
  kendraResponse?: KendraResponse;
24
+ sentimentResponse?: SentimentResponse;
20
25
  }
21
26
  export interface Bot {
22
27
  name: string;
@@ -2,6 +2,11 @@
2
2
  import { Translator } from "@xapp/patterns";
3
3
  import { Response } from "stentor-models";
4
4
  import { LexRuntimeV2 } from "aws-sdk/clients/all";
5
+ /**
6
+ * Translates a response from the RecognizeText
7
+ *
8
+ * @see https://docs.aws.amazon.com/lexv2/latest/APIReference/API_runtime_RecognizeText.html
9
+ */
5
10
  export declare class TranslateLexV2PostTextResponse extends Translator<LexRuntimeV2.RecognizeTextResponse, Response> {
6
11
  translate(response: LexRuntimeV2.RecognizeTextResponse): Response;
7
12
  }
@@ -3,6 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TranslateLexV2PostTextResponse = void 0;
4
4
  /*! Copyright (c) 2020, XAPPmedia */
5
5
  const patterns_1 = require("@xapp/patterns");
6
+ /**
7
+ * Translates a response from the RecognizeText
8
+ *
9
+ * @see https://docs.aws.amazon.com/lexv2/latest/APIReference/API_runtime_RecognizeText.html
10
+ */
6
11
  class TranslateLexV2PostTextResponse extends patterns_1.Translator {
7
12
  translate(response) {
8
13
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"TranslateLexV2PostTextResponse.js","sourceRoot":"","sources":["../../src/translators/TranslateLexV2PostTextResponse.ts"],"names":[],"mappings":";;;AAAA,oCAAoC;AACpC,6CAA4C;AAK5C,MAAa,8BAA+B,SAAQ,qBAAwD;IAExG,SAAS,CAAC,QAA4C;;QAElD,sEAAsE;QACtE,IAAI,KAAqB,CAAC;QAE1B,MAAM,OAAO,GAAG,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,QAAQ,0CAAG,CAAC,CAAC,CAAC;QACxC,MAAM,WAAW,GAAoC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,CAAC;QAC1E,MAAM,OAAO,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC;QAEjC,IAAI,CAAC,OAAO,IAAI,CAAC,WAAW,IAAI,CAAC,OAAO,EAAE;YACtC,MAAM,IAAI,KAAK,CAAC,qFAAqF,CAAC,CAAC;SAC1G;QAED,iEAAiE;QAEjE,QAAQ,WAAW,EAAE;YACjB,KAAK,eAAe;gBAChB,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;oBAC7B,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;iBAC/B;qBAAM;oBACH,MAAM,KAAK,CAAC,2EAA2E,CAAC,CAAC;iBAC5F;gBACD,MAAM;YACV,KAAK,WAAW;gBACZ,KAAK,GAAG;oBACJ,YAAY,EAAE;wBACV,WAAW,EAAE,OAAO;qBACvB;iBACJ,CAAC;gBACF,MAAM;YACV,KAAK,MAAM;gBACP,KAAK,GAAG;oBACJ,YAAY,EAAE;wBACV,IAAI,EAAE,OAAO;qBAChB;iBACJ,CAAC;gBACF,MAAM;YACV,4BAA4B;YAC5B,aAAa;YACb;gBACI,MAAM,KAAK,CAAC,gEAAgE,WAAW,GAAG,CAAC,CAAC;SACnG;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AA/CD,wEA+CC"}
1
+ {"version":3,"file":"TranslateLexV2PostTextResponse.js","sourceRoot":"","sources":["../../src/translators/TranslateLexV2PostTextResponse.ts"],"names":[],"mappings":";;;AAAA,oCAAoC;AACpC,6CAA4C;AAK5C;;;;GAIG;AACH,MAAa,8BAA+B,SAAQ,qBAAwD;IAExG,SAAS,CAAC,QAA4C;;QAElD,sEAAsE;QACtE,IAAI,KAAqB,CAAC;QAE1B,MAAM,OAAO,GAAG,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,QAAQ,0CAAG,CAAC,CAAC,CAAC;QACxC,MAAM,WAAW,GAAoC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,CAAC;QAC1E,MAAM,OAAO,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC;QAEjC,IAAI,CAAC,OAAO,IAAI,CAAC,WAAW,IAAI,CAAC,OAAO,EAAE;YACtC,MAAM,IAAI,KAAK,CAAC,qFAAqF,CAAC,CAAC;SAC1G;QAED,iEAAiE;QAEjE,QAAQ,WAAW,EAAE;YACjB,KAAK,eAAe;gBAChB,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;oBAC7B,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;iBAC/B;qBAAM;oBACH,MAAM,KAAK,CAAC,2EAA2E,CAAC,CAAC;iBAC5F;gBACD,MAAM;YACV,KAAK,WAAW;gBACZ,KAAK,GAAG;oBACJ,YAAY,EAAE;wBACV,WAAW,EAAE,OAAO;qBACvB;iBACJ,CAAC;gBACF,MAAM;YACV,KAAK,MAAM;gBACP,KAAK,GAAG;oBACJ,YAAY,EAAE;wBACV,IAAI,EAAE,OAAO;qBAChB;iBACJ,CAAC;gBACF,MAAM;YACV,4BAA4B;YAC5B,aAAa;YACb;gBACI,MAAM,KAAK,CAAC,gEAAgE,WAAW,GAAG,CAAC,CAAC;SACnG;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AA/CD,wEA+CC"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "1.43.7",
7
+ "version": "1.43.10",
8
8
  "description": "Shared AWS LEX Library for :mega: stentor",
9
9
  "types": "lib/index",
10
10
  "main": "lib/index",
@@ -22,16 +22,16 @@
22
22
  "chai": "4.3.7",
23
23
  "mocha": "10.1.0",
24
24
  "sinon": "14.0.2",
25
- "stentor-interaction-model": "1.57.10",
26
- "stentor-locales": "1.57.10",
27
- "stentor-models": "1.57.10",
28
- "stentor-request": "1.57.10",
29
- "stentor-utils": "1.57.10",
25
+ "stentor-interaction-model": "1.57.12",
26
+ "stentor-locales": "1.57.12",
27
+ "stentor-models": "1.57.12",
28
+ "stentor-request": "1.57.12",
29
+ "stentor-utils": "1.57.12",
30
30
  "ts-node": "10.9.1",
31
31
  "typescript": "4.8.4"
32
32
  },
33
33
  "dependencies": {
34
- "@xapp/stentor-alexa-lib": "1.43.7",
34
+ "@xapp/stentor-alexa-lib": "1.43.9",
35
35
  "lodash.merge": "4.6.2"
36
36
  },
37
37
  "peerDependencies": {
@@ -46,5 +46,5 @@
46
46
  "clean": "rm -rf ./lib/*",
47
47
  "test": "mocha --recursive -r ts-node/register \"./src/**/*.test.ts\""
48
48
  },
49
- "gitHead": "847d84421506a6cbbcf675e030339eb1bb78412a"
49
+ "gitHead": "28611a3b82d8c33e3cfff3873181b42b4e8375cb"
50
50
  }