@xapp/stentor-lex-connect 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 +23 -0
- package/package.json +4 -4
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## @xapp/stentor-lex-connect
|
|
2
|
+
|
|
3
|
+
Stentor channel for Amazon Lex (V1, classic runtime) fulfillment requests, including calls routed through Amazon Connect, Genesys, the Lex test console, or an embedded chat widget. It recognizes a request by its `bot.alias` + `invocationSource === "FulfillmentCodeHook"` shape, guesses the originating channel from session/request attributes (`connect`, `genesys`, `widget`, `console`, `studio-nlu-test`) to compute device capabilities, and translates Lex requests/responses using the shared models in `@xapp/stentor-lex-lib`. It also ships a `preExecution` hook that short-circuits NLU-test calls (user ids starting with `query.`) by returning the parsed slots in the session attributes instead of running the full conversation.
|
|
4
|
+
|
|
5
|
+
### Required Environment Variables
|
|
6
|
+
|
|
7
|
+
- `STUDIO_APP_ID` - app id passed to `TranslateLexConnectRequest`; it is used to derive the per-app postfix (`createPostFix`) that is stripped from Lex intent and slot type names.
|
|
8
|
+
|
|
9
|
+
### Usage
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { LexConnect } from "@xapp/stentor-lex-connect";
|
|
13
|
+
|
|
14
|
+
const channel = LexConnect();
|
|
15
|
+
// channel.test(body) -> true for Lex V1 fulfillment requests
|
|
16
|
+
// channel.request.translate(body) -> normalized Stentor Request
|
|
17
|
+
// channel.response -> translates a Stentor Response into a Lex V1 response
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Documentation
|
|
21
|
+
|
|
22
|
+
- [Amazon Lex V1 Developer Guide](https://docs.aws.amazon.com/lex/latest/dg/what-is.html)
|
|
23
|
+
- [Amazon Connect Lex 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 Connect 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,7 +35,7 @@
|
|
|
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.
|
|
38
|
+
"@xapp/stentor-lex-lib": "1.86.10"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"stentor-channel": "1.x",
|