@xapp/stentor-lex-v2 1.86.9 → 1.86.11

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 (2) hide show
  1. package/README.md +19 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,19 @@
1
+ ## @xapp/stentor-lex-v2
2
+
3
+ Stentor channel for Amazon Lex V2 fulfillment requests (recognized by `bot.aliasId` + `invocationSource`), including calls routed through Amazon Connect, Genesys, or the Lex V2 test console. It guesses the originating channel from `sessionState.sessionAttributes`/`requestAttributes` to compute device capabilities and translates the V2 request/response shape using its own Lex V2 models (it uses `untagIntent` from `@xapp/stentor-service-lex` to strip the V2 intent suffix). Like `@xapp/stentor-lex-connect`, it ships a `preExecution` hook that short-circuits NLU-test calls (user ids starting with `query.`) by returning the detected intent and slots in the session attributes instead of running the full conversation.
4
+
5
+ ### Usage
6
+
7
+ ```ts
8
+ import { LexV2Channel } from "@xapp/stentor-lex-v2";
9
+
10
+ const channel = LexV2Channel();
11
+ // channel.test(body) -> true for Lex V2 fulfillment requests
12
+ // channel.request.translate(body) -> normalized Stentor Request
13
+ // channel.response -> translates a Stentor Response into a Lex V2 response
14
+ ```
15
+
16
+ ### Documentation
17
+
18
+ - [Amazon Lex V2 Developer Guide](https://docs.aws.amazon.com/lexv2/latest/dg/what-is.html)
19
+ - [Amazon Connect Lex V2 integration](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-lex.html)
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "1.86.9",
7
+ "version": "1.86.11",
8
8
  "description": "Stentor Lex V2 channel for stentor",
9
9
  "types": "lib/index",
10
10
  "main": "lib/index",
@@ -35,8 +35,8 @@
35
35
  "dependencies": {
36
36
  "@xapp/patterns": "2.0.3",
37
37
  "@xapp/stentor-alexa-lib": "1.86.6",
38
- "@xapp/stentor-lex-lib": "1.86.9",
39
- "@xapp/stentor-service-lex": "1.86.9"
38
+ "@xapp/stentor-lex-lib": "1.86.11",
39
+ "@xapp/stentor-service-lex": "1.86.11"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "stentor-channel": "1.x",