@xapp/stentor-lex-v2 1.86.8 → 1.86.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.
- package/README.md +19 -0
- package/package.json +5 -5
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.
|
|
7
|
+
"version": "1.86.10",
|
|
8
8
|
"description": "Stentor Lex V2 channel for stentor",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"main": "lib/index",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"stentor-channel": "1.74.9",
|
|
25
25
|
"stentor-constants": "1.74.5",
|
|
26
26
|
"stentor-interaction-model": "1.74.9",
|
|
27
|
-
"stentor-media": "1.74.
|
|
27
|
+
"stentor-media": "1.74.11",
|
|
28
28
|
"stentor-models": "1.79.0",
|
|
29
29
|
"stentor-request": "1.74.9",
|
|
30
|
-
"stentor-response": "1.74.
|
|
30
|
+
"stentor-response": "1.74.11",
|
|
31
31
|
"stentor-utils": "1.76.0",
|
|
32
32
|
"ts-node": "10.9.2",
|
|
33
33
|
"typescript": "5.9.3"
|
|
@@ -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.
|
|
39
|
-
"@xapp/stentor-service-lex": "1.86.
|
|
38
|
+
"@xapp/stentor-lex-lib": "1.86.10",
|
|
39
|
+
"@xapp/stentor-service-lex": "1.86.10"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"stentor-channel": "1.x",
|