@nlxai/touchpoint-ui 1.2.4-alpha.1 → 1.2.4-alpha.5
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 +3 -1
- package/docs/@nlxai/namespaces/Icons.md +377 -0
- package/docs/@nlxai/namespaces/React/README.md +221390 -0
- package/docs/@nlxai/namespaces/React/namespaces/JSX.md +3050 -0
- package/docs/README.md +1143 -268
- package/lib/components/Messages.d.ts +1 -0
- package/lib/index.js +6024 -5994
- package/lib/index.umd.js +53 -53
- package/package.json +3 -3
- package/docs/.nojekyll +0 -1
- package/docs/interfaces/BidirectionalContext.md +0 -51
- package/docs/interfaces/BidirectionalCustomCommand.md +0 -79
- package/docs/interfaces/ChoiceMessage.md +0 -39
- package/docs/interfaces/CustomCardProps.md +0 -83
- package/docs/interfaces/CustomCardRowProps.md +0 -39
- package/docs/interfaces/DateInputProps.md +0 -41
- package/docs/interfaces/IconButtonProps.md +0 -71
- package/docs/interfaces/Icons.IconProps.md +0 -29
- package/docs/interfaces/InputField.md +0 -27
- package/docs/interfaces/InteractiveElementInfo.md +0 -21
- package/docs/interfaces/PageForms.md +0 -27
- package/docs/interfaces/PageState.md +0 -39
- package/docs/interfaces/TextButtonProps.md +0 -72
- package/docs/interfaces/Theme.md +0 -303
- package/docs/interfaces/TouchpointConfiguration.md +0 -209
- package/docs/interfaces/TouchpointInstance.md +0 -121
- package/docs/modules/Icons.md +0 -878
package/docs/interfaces/Theme.md
DELETED
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
# Interface: Theme
|
|
2
|
-
|
|
3
|
-
The full theme expressed as CSS custom properties
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
### fontFamily
|
|
8
|
-
|
|
9
|
-
• **fontFamily**: `string`
|
|
10
|
-
|
|
11
|
-
Font family
|
|
12
|
-
|
|
13
|
-
#### Defined in
|
|
14
|
-
|
|
15
|
-
[packages/touchpoint-ui/src/interface.ts:71](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L71)
|
|
16
|
-
|
|
17
|
-
___
|
|
18
|
-
|
|
19
|
-
### primary80
|
|
20
|
-
|
|
21
|
-
• **primary80**: `string`
|
|
22
|
-
|
|
23
|
-
Primary color with 80% opacity
|
|
24
|
-
|
|
25
|
-
#### Defined in
|
|
26
|
-
|
|
27
|
-
[packages/touchpoint-ui/src/interface.ts:76](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L76)
|
|
28
|
-
|
|
29
|
-
___
|
|
30
|
-
|
|
31
|
-
### primary60
|
|
32
|
-
|
|
33
|
-
• **primary60**: `string`
|
|
34
|
-
|
|
35
|
-
Primary color with 60% opacity
|
|
36
|
-
|
|
37
|
-
#### Defined in
|
|
38
|
-
|
|
39
|
-
[packages/touchpoint-ui/src/interface.ts:80](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L80)
|
|
40
|
-
|
|
41
|
-
___
|
|
42
|
-
|
|
43
|
-
### primary40
|
|
44
|
-
|
|
45
|
-
• **primary40**: `string`
|
|
46
|
-
|
|
47
|
-
Primary color with 40% opacity
|
|
48
|
-
|
|
49
|
-
#### Defined in
|
|
50
|
-
|
|
51
|
-
[packages/touchpoint-ui/src/interface.ts:84](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L84)
|
|
52
|
-
|
|
53
|
-
___
|
|
54
|
-
|
|
55
|
-
### primary20
|
|
56
|
-
|
|
57
|
-
• **primary20**: `string`
|
|
58
|
-
|
|
59
|
-
Primary color with 20% opacity
|
|
60
|
-
|
|
61
|
-
#### Defined in
|
|
62
|
-
|
|
63
|
-
[packages/touchpoint-ui/src/interface.ts:88](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L88)
|
|
64
|
-
|
|
65
|
-
___
|
|
66
|
-
|
|
67
|
-
### primary10
|
|
68
|
-
|
|
69
|
-
• **primary10**: `string`
|
|
70
|
-
|
|
71
|
-
Primary color with 10% opacity
|
|
72
|
-
|
|
73
|
-
#### Defined in
|
|
74
|
-
|
|
75
|
-
[packages/touchpoint-ui/src/interface.ts:92](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L92)
|
|
76
|
-
|
|
77
|
-
___
|
|
78
|
-
|
|
79
|
-
### primary5
|
|
80
|
-
|
|
81
|
-
• **primary5**: `string`
|
|
82
|
-
|
|
83
|
-
Primary color with 5% opacity
|
|
84
|
-
|
|
85
|
-
#### Defined in
|
|
86
|
-
|
|
87
|
-
[packages/touchpoint-ui/src/interface.ts:96](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L96)
|
|
88
|
-
|
|
89
|
-
___
|
|
90
|
-
|
|
91
|
-
### primary1
|
|
92
|
-
|
|
93
|
-
• **primary1**: `string`
|
|
94
|
-
|
|
95
|
-
Primary color with 1% opacity
|
|
96
|
-
|
|
97
|
-
#### Defined in
|
|
98
|
-
|
|
99
|
-
[packages/touchpoint-ui/src/interface.ts:100](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L100)
|
|
100
|
-
|
|
101
|
-
___
|
|
102
|
-
|
|
103
|
-
### secondary80
|
|
104
|
-
|
|
105
|
-
• **secondary80**: `string`
|
|
106
|
-
|
|
107
|
-
Secondary color with 80% opacity
|
|
108
|
-
|
|
109
|
-
#### Defined in
|
|
110
|
-
|
|
111
|
-
[packages/touchpoint-ui/src/interface.ts:105](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L105)
|
|
112
|
-
|
|
113
|
-
___
|
|
114
|
-
|
|
115
|
-
### secondary60
|
|
116
|
-
|
|
117
|
-
• **secondary60**: `string`
|
|
118
|
-
|
|
119
|
-
Secondary color with 60% opacity
|
|
120
|
-
|
|
121
|
-
#### Defined in
|
|
122
|
-
|
|
123
|
-
[packages/touchpoint-ui/src/interface.ts:109](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L109)
|
|
124
|
-
|
|
125
|
-
___
|
|
126
|
-
|
|
127
|
-
### secondary40
|
|
128
|
-
|
|
129
|
-
• **secondary40**: `string`
|
|
130
|
-
|
|
131
|
-
Secondary color with 40% opacity
|
|
132
|
-
|
|
133
|
-
#### Defined in
|
|
134
|
-
|
|
135
|
-
[packages/touchpoint-ui/src/interface.ts:113](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L113)
|
|
136
|
-
|
|
137
|
-
___
|
|
138
|
-
|
|
139
|
-
### secondary20
|
|
140
|
-
|
|
141
|
-
• **secondary20**: `string`
|
|
142
|
-
|
|
143
|
-
Secondary color with 20% opacity
|
|
144
|
-
|
|
145
|
-
#### Defined in
|
|
146
|
-
|
|
147
|
-
[packages/touchpoint-ui/src/interface.ts:117](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L117)
|
|
148
|
-
|
|
149
|
-
___
|
|
150
|
-
|
|
151
|
-
### secondary10
|
|
152
|
-
|
|
153
|
-
• **secondary10**: `string`
|
|
154
|
-
|
|
155
|
-
Secondary color with 10% opacity
|
|
156
|
-
|
|
157
|
-
#### Defined in
|
|
158
|
-
|
|
159
|
-
[packages/touchpoint-ui/src/interface.ts:121](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L121)
|
|
160
|
-
|
|
161
|
-
___
|
|
162
|
-
|
|
163
|
-
### secondary5
|
|
164
|
-
|
|
165
|
-
• **secondary5**: `string`
|
|
166
|
-
|
|
167
|
-
Secondary color with 5% opacity
|
|
168
|
-
|
|
169
|
-
#### Defined in
|
|
170
|
-
|
|
171
|
-
[packages/touchpoint-ui/src/interface.ts:125](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L125)
|
|
172
|
-
|
|
173
|
-
___
|
|
174
|
-
|
|
175
|
-
### secondary1
|
|
176
|
-
|
|
177
|
-
• **secondary1**: `string`
|
|
178
|
-
|
|
179
|
-
Secondary color with 1% opacity
|
|
180
|
-
|
|
181
|
-
#### Defined in
|
|
182
|
-
|
|
183
|
-
[packages/touchpoint-ui/src/interface.ts:129](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L129)
|
|
184
|
-
|
|
185
|
-
___
|
|
186
|
-
|
|
187
|
-
### accent
|
|
188
|
-
|
|
189
|
-
• **accent**: `string`
|
|
190
|
-
|
|
191
|
-
Accent color used e.g. for prominent buttons, the loader animation as well as selected card outlines
|
|
192
|
-
|
|
193
|
-
#### Defined in
|
|
194
|
-
|
|
195
|
-
[packages/touchpoint-ui/src/interface.ts:134](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L134)
|
|
196
|
-
|
|
197
|
-
___
|
|
198
|
-
|
|
199
|
-
### accent20
|
|
200
|
-
|
|
201
|
-
• **accent20**: `string`
|
|
202
|
-
|
|
203
|
-
Accent color with 20% opacity
|
|
204
|
-
|
|
205
|
-
#### Defined in
|
|
206
|
-
|
|
207
|
-
[packages/touchpoint-ui/src/interface.ts:138](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L138)
|
|
208
|
-
|
|
209
|
-
___
|
|
210
|
-
|
|
211
|
-
### background
|
|
212
|
-
|
|
213
|
-
• **background**: `string`
|
|
214
|
-
|
|
215
|
-
The background color of the main Touchpoint interface
|
|
216
|
-
|
|
217
|
-
#### Defined in
|
|
218
|
-
|
|
219
|
-
[packages/touchpoint-ui/src/interface.ts:142](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L142)
|
|
220
|
-
|
|
221
|
-
___
|
|
222
|
-
|
|
223
|
-
### overlay
|
|
224
|
-
|
|
225
|
-
• **overlay**: `string`
|
|
226
|
-
|
|
227
|
-
The color of the overlay covering the visible portion of the website when the Touchpoint interface does not cover the full screen
|
|
228
|
-
|
|
229
|
-
#### Defined in
|
|
230
|
-
|
|
231
|
-
[packages/touchpoint-ui/src/interface.ts:146](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L146)
|
|
232
|
-
|
|
233
|
-
___
|
|
234
|
-
|
|
235
|
-
### warningPrimary
|
|
236
|
-
|
|
237
|
-
• **warningPrimary**: `string`
|
|
238
|
-
|
|
239
|
-
Primary warning color
|
|
240
|
-
|
|
241
|
-
#### Defined in
|
|
242
|
-
|
|
243
|
-
[packages/touchpoint-ui/src/interface.ts:151](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L151)
|
|
244
|
-
|
|
245
|
-
___
|
|
246
|
-
|
|
247
|
-
### warningSecondary
|
|
248
|
-
|
|
249
|
-
• **warningSecondary**: `string`
|
|
250
|
-
|
|
251
|
-
Secondary warning color
|
|
252
|
-
|
|
253
|
-
#### Defined in
|
|
254
|
-
|
|
255
|
-
[packages/touchpoint-ui/src/interface.ts:155](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L155)
|
|
256
|
-
|
|
257
|
-
___
|
|
258
|
-
|
|
259
|
-
### errorPrimary
|
|
260
|
-
|
|
261
|
-
• **errorPrimary**: `string`
|
|
262
|
-
|
|
263
|
-
Primary error color
|
|
264
|
-
|
|
265
|
-
#### Defined in
|
|
266
|
-
|
|
267
|
-
[packages/touchpoint-ui/src/interface.ts:159](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L159)
|
|
268
|
-
|
|
269
|
-
___
|
|
270
|
-
|
|
271
|
-
### errorSecondary
|
|
272
|
-
|
|
273
|
-
• **errorSecondary**: `string`
|
|
274
|
-
|
|
275
|
-
Secondary error color
|
|
276
|
-
|
|
277
|
-
#### Defined in
|
|
278
|
-
|
|
279
|
-
[packages/touchpoint-ui/src/interface.ts:163](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L163)
|
|
280
|
-
|
|
281
|
-
___
|
|
282
|
-
|
|
283
|
-
### innerBorderRadius
|
|
284
|
-
|
|
285
|
-
• **innerBorderRadius**: `string`
|
|
286
|
-
|
|
287
|
-
Inner border radius: used for most buttons
|
|
288
|
-
|
|
289
|
-
#### Defined in
|
|
290
|
-
|
|
291
|
-
[packages/touchpoint-ui/src/interface.ts:168](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L168)
|
|
292
|
-
|
|
293
|
-
___
|
|
294
|
-
|
|
295
|
-
### outerBorderRadius
|
|
296
|
-
|
|
297
|
-
• **outerBorderRadius**: `string`
|
|
298
|
-
|
|
299
|
-
Outer border radius: generally used for elements that contain buttons that have inner border radius. Also used by the launch button.
|
|
300
|
-
|
|
301
|
-
#### Defined in
|
|
302
|
-
|
|
303
|
-
[packages/touchpoint-ui/src/interface.ts:172](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L172)
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
# Interface: TouchpointConfiguration
|
|
2
|
-
|
|
3
|
-
Main Touchpoint creation properties object
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
### config
|
|
8
|
-
|
|
9
|
-
• **config**: `Config`
|
|
10
|
-
|
|
11
|
-
Connection information for the @nlxai/core conversation handler
|
|
12
|
-
|
|
13
|
-
#### Defined in
|
|
14
|
-
|
|
15
|
-
[packages/touchpoint-ui/src/interface.ts:365](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L365)
|
|
16
|
-
|
|
17
|
-
___
|
|
18
|
-
|
|
19
|
-
### windowSize
|
|
20
|
-
|
|
21
|
-
• `Optional` **windowSize**: [`WindowSize`](../README.md#windowsize)
|
|
22
|
-
|
|
23
|
-
Optional window size for the chat window, defaults to `half`
|
|
24
|
-
|
|
25
|
-
#### Defined in
|
|
26
|
-
|
|
27
|
-
[packages/touchpoint-ui/src/interface.ts:369](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L369)
|
|
28
|
-
|
|
29
|
-
___
|
|
30
|
-
|
|
31
|
-
### colorMode
|
|
32
|
-
|
|
33
|
-
• `Optional` **colorMode**: [`ColorMode`](../README.md#colormode)
|
|
34
|
-
|
|
35
|
-
Optional color mode for the chat window, defaults to `dark`
|
|
36
|
-
|
|
37
|
-
#### Defined in
|
|
38
|
-
|
|
39
|
-
[packages/touchpoint-ui/src/interface.ts:373](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L373)
|
|
40
|
-
|
|
41
|
-
___
|
|
42
|
-
|
|
43
|
-
### brandIcon
|
|
44
|
-
|
|
45
|
-
• `Optional` **brandIcon**: `string`
|
|
46
|
-
|
|
47
|
-
URL of icon used to display the brand in the chat header
|
|
48
|
-
|
|
49
|
-
#### Defined in
|
|
50
|
-
|
|
51
|
-
[packages/touchpoint-ui/src/interface.ts:377](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L377)
|
|
52
|
-
|
|
53
|
-
___
|
|
54
|
-
|
|
55
|
-
### animate
|
|
56
|
-
|
|
57
|
-
• `Optional` **animate**: `boolean`
|
|
58
|
-
|
|
59
|
-
Include border animation. Currently only supported in Voice Mini.
|
|
60
|
-
|
|
61
|
-
#### Defined in
|
|
62
|
-
|
|
63
|
-
[packages/touchpoint-ui/src/interface.ts:381](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L381)
|
|
64
|
-
|
|
65
|
-
___
|
|
66
|
-
|
|
67
|
-
### launchIcon
|
|
68
|
-
|
|
69
|
-
• `Optional` **launchIcon**: `string` \| `boolean` \| [`CustomLaunchButton`](../README.md#customlaunchbutton)
|
|
70
|
-
|
|
71
|
-
URL of icon used on the launch icon in the bottom right when the experience is collapsed.
|
|
72
|
-
|
|
73
|
-
When set to `false`, no launch button is shown at all. When not set or set to `true`, the default launch icon is rendered.
|
|
74
|
-
|
|
75
|
-
#### Defined in
|
|
76
|
-
|
|
77
|
-
[packages/touchpoint-ui/src/interface.ts:387](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L387)
|
|
78
|
-
|
|
79
|
-
___
|
|
80
|
-
|
|
81
|
-
### userMessageBubble
|
|
82
|
-
|
|
83
|
-
• `Optional` **userMessageBubble**: `boolean`
|
|
84
|
-
|
|
85
|
-
Specifies whether the user message has bubbles or not
|
|
86
|
-
|
|
87
|
-
#### Defined in
|
|
88
|
-
|
|
89
|
-
[packages/touchpoint-ui/src/interface.ts:391](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L391)
|
|
90
|
-
|
|
91
|
-
___
|
|
92
|
-
|
|
93
|
-
### agentMessageBubble
|
|
94
|
-
|
|
95
|
-
• `Optional` **agentMessageBubble**: `boolean`
|
|
96
|
-
|
|
97
|
-
Specifies whether the agent message has bubbles or not
|
|
98
|
-
|
|
99
|
-
#### Defined in
|
|
100
|
-
|
|
101
|
-
[packages/touchpoint-ui/src/interface.ts:395](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L395)
|
|
102
|
-
|
|
103
|
-
___
|
|
104
|
-
|
|
105
|
-
### chatMode
|
|
106
|
-
|
|
107
|
-
• `Optional` **chatMode**: `boolean`
|
|
108
|
-
|
|
109
|
-
Enables chat mode, a classic chat experience with inline loaders and the chat history visible at all times.
|
|
110
|
-
|
|
111
|
-
#### Defined in
|
|
112
|
-
|
|
113
|
-
[packages/touchpoint-ui/src/interface.ts:399](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L399)
|
|
114
|
-
|
|
115
|
-
___
|
|
116
|
-
|
|
117
|
-
### theme
|
|
118
|
-
|
|
119
|
-
• `Optional` **theme**: `Partial`\<[`Theme`](Theme.md)\>
|
|
120
|
-
|
|
121
|
-
Optional theme object to override default theme values
|
|
122
|
-
|
|
123
|
-
#### Defined in
|
|
124
|
-
|
|
125
|
-
[packages/touchpoint-ui/src/interface.ts:403](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L403)
|
|
126
|
-
|
|
127
|
-
___
|
|
128
|
-
|
|
129
|
-
### modalityComponents
|
|
130
|
-
|
|
131
|
-
• `Optional` **modalityComponents**: `Record`\<`string`, [`CustomModalityComponent`](../README.md#custommodalitycomponent)\<`unknown`\>\>
|
|
132
|
-
|
|
133
|
-
Optional custom modality components to render in Touchpoint
|
|
134
|
-
|
|
135
|
-
#### Defined in
|
|
136
|
-
|
|
137
|
-
[packages/touchpoint-ui/src/interface.ts:407](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L407)
|
|
138
|
-
|
|
139
|
-
___
|
|
140
|
-
|
|
141
|
-
### customModalities
|
|
142
|
-
|
|
143
|
-
• `Optional` **customModalities**: `Record`\<`string`, [`CustomModalityComponent`](../README.md#custommodalitycomponent)\<`unknown`\>\>
|
|
144
|
-
|
|
145
|
-
Optional custom modality components to render in Touchpoint
|
|
146
|
-
|
|
147
|
-
**`Deprecated`**
|
|
148
|
-
|
|
149
|
-
use [TouchpointConfiguration.modalityComponents](TouchpointConfiguration.md#modalitycomponents) instead.
|
|
150
|
-
|
|
151
|
-
#### Defined in
|
|
152
|
-
|
|
153
|
-
[packages/touchpoint-ui/src/interface.ts:412](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L412)
|
|
154
|
-
|
|
155
|
-
___
|
|
156
|
-
|
|
157
|
-
### initializeConversation
|
|
158
|
-
|
|
159
|
-
• `Optional` **initializeConversation**: [`InitializeConversation`](../README.md#initializeconversation)
|
|
160
|
-
|
|
161
|
-
Custom conversation init method. Defaults to sending the welcome intent
|
|
162
|
-
|
|
163
|
-
**`Param`**
|
|
164
|
-
|
|
165
|
-
the conversation handler.
|
|
166
|
-
|
|
167
|
-
**`Param`**
|
|
168
|
-
|
|
169
|
-
the context object
|
|
170
|
-
|
|
171
|
-
#### Defined in
|
|
172
|
-
|
|
173
|
-
[packages/touchpoint-ui/src/interface.ts:418](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L418)
|
|
174
|
-
|
|
175
|
-
___
|
|
176
|
-
|
|
177
|
-
### input
|
|
178
|
-
|
|
179
|
-
• `Optional` **input**: [`Input`](../README.md#input)
|
|
180
|
-
|
|
181
|
-
Controls the ways in which the user can communicate with the application. Defaults to `"text"`
|
|
182
|
-
|
|
183
|
-
#### Defined in
|
|
184
|
-
|
|
185
|
-
[packages/touchpoint-ui/src/interface.ts:422](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L422)
|
|
186
|
-
|
|
187
|
-
___
|
|
188
|
-
|
|
189
|
-
### initialContext
|
|
190
|
-
|
|
191
|
-
• `Optional` **initialContext**: `Context`
|
|
192
|
-
|
|
193
|
-
Context sent with the initial request.
|
|
194
|
-
|
|
195
|
-
#### Defined in
|
|
196
|
-
|
|
197
|
-
[packages/touchpoint-ui/src/interface.ts:426](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L426)
|
|
198
|
-
|
|
199
|
-
___
|
|
200
|
-
|
|
201
|
-
### bidirectional
|
|
202
|
-
|
|
203
|
-
• `Optional` **bidirectional**: [`BidirectionalConfig`](../README.md#bidirectionalconfig)
|
|
204
|
-
|
|
205
|
-
Enables bidirectional mode of voice+. Will automatically set the bidirectional flag in the config.
|
|
206
|
-
|
|
207
|
-
#### Defined in
|
|
208
|
-
|
|
209
|
-
[packages/touchpoint-ui/src/interface.ts:432](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L432)
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
# Interface: TouchpointInstance
|
|
2
|
-
|
|
3
|
-
Instance of a Touchpoint UI component
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
### expanded
|
|
8
|
-
|
|
9
|
-
• **expanded**: `boolean`
|
|
10
|
-
|
|
11
|
-
Controls whether the Touchpoint UI is expanded or collapsed
|
|
12
|
-
|
|
13
|
-
#### Defined in
|
|
14
|
-
|
|
15
|
-
[packages/touchpoint-ui/src/interface.ts:476](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L476)
|
|
16
|
-
|
|
17
|
-
___
|
|
18
|
-
|
|
19
|
-
### conversationHandler
|
|
20
|
-
|
|
21
|
-
• **conversationHandler**: `ConversationHandler`
|
|
22
|
-
|
|
23
|
-
The conversation handler instance for interacting with the application
|
|
24
|
-
|
|
25
|
-
#### Defined in
|
|
26
|
-
|
|
27
|
-
[packages/touchpoint-ui/src/interface.ts:480](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L480)
|
|
28
|
-
|
|
29
|
-
___
|
|
30
|
-
|
|
31
|
-
### teardown
|
|
32
|
-
|
|
33
|
-
• **teardown**: () => `void`
|
|
34
|
-
|
|
35
|
-
Method to remove the Touchpoint UI from the DOM
|
|
36
|
-
|
|
37
|
-
#### Type declaration
|
|
38
|
-
|
|
39
|
-
▸ (): `void`
|
|
40
|
-
|
|
41
|
-
##### Returns
|
|
42
|
-
|
|
43
|
-
`void`
|
|
44
|
-
|
|
45
|
-
#### Defined in
|
|
46
|
-
|
|
47
|
-
[packages/touchpoint-ui/src/interface.ts:484](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L484)
|
|
48
|
-
|
|
49
|
-
___
|
|
50
|
-
|
|
51
|
-
### setCustomBidirectionalCommands
|
|
52
|
-
|
|
53
|
-
• **setCustomBidirectionalCommands**: (`commands`: [`BidirectionalCustomCommand`](BidirectionalCustomCommand.md)[]) => `void`
|
|
54
|
-
|
|
55
|
-
Sets currently available custom bidirectional commands.
|
|
56
|
-
This allows you to define custom commands that can be used in the voice bot.
|
|
57
|
-
The commands will be available in the voice bot and can be used to trigger actions.
|
|
58
|
-
|
|
59
|
-
Example:
|
|
60
|
-
```javascript
|
|
61
|
-
client.setCustomBidirectionalCommands([
|
|
62
|
-
{
|
|
63
|
-
action: "Meal",
|
|
64
|
-
description: "add a meal to your flight",
|
|
65
|
-
schema: {
|
|
66
|
-
enum: ["standard", "vegetarian", "vegan", "gluten-free"],
|
|
67
|
-
},
|
|
68
|
-
handler: (value) => {
|
|
69
|
-
console.log("Meal option:", value);
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
]);
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
This will allow the voice bot to use the command `Meal` with the value `standard`, `vegetarian`, `vegan`, or `gluten-free`.
|
|
76
|
-
|
|
77
|
-
When using more complex arguments, a library such as [Zod](https://zod.dev) can be useful:
|
|
78
|
-
|
|
79
|
-
```javascript
|
|
80
|
-
import * as z from "zod/v4";
|
|
81
|
-
|
|
82
|
-
const schema = z.object({
|
|
83
|
-
"name": z.string().describe("The customer's name, such as John Doe"),
|
|
84
|
-
"email": z.string().email().describe("The customer's email address"),
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
client.setCustomBidirectionalCommands([
|
|
88
|
-
{
|
|
89
|
-
action: "Meal",
|
|
90
|
-
description: "add a meal to your flight",
|
|
91
|
-
schema: z.toJSONSchema(schema, {io: "input"}),
|
|
92
|
-
handler: (value) => {
|
|
93
|
-
const result = z.safeParse(schema, value);
|
|
94
|
-
if (result.success) {
|
|
95
|
-
// result.data is now type safe and TypeScript can reason about it
|
|
96
|
-
console.log("Meal option:", result.data);
|
|
97
|
-
} else {
|
|
98
|
-
console.error("Failed to parse Meal option:", result.error);
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
]);
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
#### Type declaration
|
|
106
|
-
|
|
107
|
-
▸ (`commands`): `void`
|
|
108
|
-
|
|
109
|
-
##### Parameters
|
|
110
|
-
|
|
111
|
-
| Name | Type | Description |
|
|
112
|
-
| :------ | :------ | :------ |
|
|
113
|
-
| `commands` | [`BidirectionalCustomCommand`](BidirectionalCustomCommand.md)[] | A list containing the custom commands to set. |
|
|
114
|
-
|
|
115
|
-
##### Returns
|
|
116
|
-
|
|
117
|
-
`void`
|
|
118
|
-
|
|
119
|
-
#### Defined in
|
|
120
|
-
|
|
121
|
-
[packages/touchpoint-ui/src/interface.ts:538](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L538)
|