@epam/ai-dial-chat-visualizer-connector 0.44.0-rc.99 → 0.44.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/README.md +40 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -36,6 +36,7 @@ interface CustomVisualizer {
|
|
|
36
36
|
contentType: string;
|
|
37
37
|
url: string;
|
|
38
38
|
passAuthInfo?: boolean;
|
|
39
|
+
passExplicitToken?: boolean;
|
|
39
40
|
}
|
|
40
41
|
```
|
|
41
42
|
|
|
@@ -65,6 +66,7 @@ interface ApplicationVisualizerConfig {
|
|
|
65
66
|
contentType: string;
|
|
66
67
|
url: string;
|
|
67
68
|
passAuthInfo?: boolean;
|
|
69
|
+
passExplicitToken?: boolean;
|
|
68
70
|
}
|
|
69
71
|
```
|
|
70
72
|
|
|
@@ -81,6 +83,43 @@ APPLICATION_VISUALIZERS={
|
|
|
81
83
|
|
|
82
84
|
**Key difference:** The key in `APPLICATION_VISUALIZERS` must match the `applicationId` (from `message.model.id`) that generates the attachments.
|
|
83
85
|
|
|
86
|
+
## Authentication Options
|
|
87
|
+
|
|
88
|
+
Both `CUSTOM_VISUALIZERS` and `APPLICATION_VISUALIZERS` support optional flags to forward auth information from DIAL Chat into the visualizer via `layout` fields.
|
|
89
|
+
|
|
90
|
+
### `passAuthInfo`
|
|
91
|
+
|
|
92
|
+
When `true`, the current user's session data is included in the layout sent to the visualizer:
|
|
93
|
+
|
|
94
|
+
| Layout field | Value |
|
|
95
|
+
| ------------ | ----------------------------------------- |
|
|
96
|
+
| `logInHint` | User's email address |
|
|
97
|
+
| `providerId` | OAuth provider ID from the active session |
|
|
98
|
+
|
|
99
|
+
### `passExplicitToken`
|
|
100
|
+
|
|
101
|
+
When `true`, the access token supplied by the parent application in [overlay mode](`signInOptions.explicitToken`) is forwarded to the visualizer:
|
|
102
|
+
|
|
103
|
+
| Layout field | Value |
|
|
104
|
+
| ------------- | ---------------------------------- |
|
|
105
|
+
| `accessToken` | Bearer token from the overlay host |
|
|
106
|
+
|
|
107
|
+
This is useful when the visualizer itself needs to call DIAL APIs and the chat is embedded as an overlay widget authenticated via an explicit token from the parent app. If no overlay token is present (e.g. standalone mode), `accessToken` is omitted.
|
|
108
|
+
|
|
109
|
+
Both flags are independent and can be combined:
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"applicationId": {
|
|
114
|
+
"title": "MY_VISUALIZER",
|
|
115
|
+
"contentType": "application/vnd.custom+json",
|
|
116
|
+
"url": "https://my-visualizer.example.com",
|
|
117
|
+
"passAuthInfo": true,
|
|
118
|
+
"passExplicitToken": true
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
84
123
|
## Data Structures
|
|
85
124
|
|
|
86
125
|
### Single Attachment Data (CUSTOM_VISUALIZERS)
|
|
@@ -97,6 +136,7 @@ export interface CustomVisualizerDataLayout {
|
|
|
97
136
|
themeId?: string;
|
|
98
137
|
logInHint?: string;
|
|
99
138
|
providerId?: string;
|
|
139
|
+
accessToken?: string;
|
|
100
140
|
}
|
|
101
141
|
|
|
102
142
|
export interface CustomVisualizerData {
|
package/package.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "@epam/ai-dial-chat-visualizer-connector",
|
|
3
3
|
"description": "Package for custom visualizer to connect with DIAL Chat",
|
|
4
4
|
"homepage": "https://dialx.ai",
|
|
5
|
-
"version": "0.44.
|
|
5
|
+
"version": "0.44.1",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@epam/ai-dial-shared": "0.44.
|
|
7
|
+
"@epam/ai-dial-shared": "0.44.1"
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"bugs": {
|