@nlxai/touchpoint-ui 1.2.1 → 1.2.2-alpha.0

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 CHANGED
@@ -26,3 +26,9 @@ const touchpoint = await create({
26
26
 
27
27
  `npm install`
28
28
  `npm run dev`
29
+
30
+ ## Styling
31
+
32
+ Touchpoint UI is styled with [Tailwind](https://tailwindcss.com), with the compiled CSS injected inside the custom element's shadow root.
33
+
34
+ > Since the @property rule doesn't work properly inside the shadow root, translation-related classes must specify both x and y coordinates, for example `transform translate-x-full translate-y-0` (where normally the last class name is not necessary).
package/docs/README.md CHANGED
@@ -6,17 +6,36 @@
6
6
 
7
7
  ## Interfaces
8
8
 
9
+ - [InteractiveElementInfo](interfaces/InteractiveElementInfo.md)
10
+ - [PageForms](interfaces/PageForms.md)
9
11
  - [CustomCardProps](interfaces/CustomCardProps.md)
10
12
  - [CustomCardRowProps](interfaces/CustomCardRowProps.md)
11
13
  - [DateInputProps](interfaces/DateInputProps.md)
12
14
  - [IconButtonProps](interfaces/IconButtonProps.md)
13
15
  - [TextButtonProps](interfaces/TextButtonProps.md)
14
- - [TouchpointInstance](interfaces/TouchpointInstance.md)
16
+ - [ChoiceMessage](interfaces/ChoiceMessage.md)
15
17
  - [Theme](interfaces/Theme.md)
18
+ - [InputField](interfaces/InputField.md)
19
+ - [PageState](interfaces/PageState.md)
20
+ - [BidirectionalContext](interfaces/BidirectionalContext.md)
16
21
  - [TouchpointConfiguration](interfaces/TouchpointConfiguration.md)
22
+ - [BidirectionalCustomCommand](interfaces/BidirectionalCustomCommand.md)
23
+ - [TouchpointInstance](interfaces/TouchpointInstance.md)
17
24
 
18
25
  ## Type Aliases
19
26
 
27
+ ### AccessibilityInformation
28
+
29
+ Ƭ **AccessibilityInformation**: `Record`\<`string`, `any`\>
30
+
31
+ Accessibility information
32
+
33
+ #### Defined in
34
+
35
+ [packages/touchpoint-ui/src/bidirectional/analyzePageForms.ts:9](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/bidirectional/analyzePageForms.ts#L9)
36
+
37
+ ___
38
+
20
39
  ### IconButtonType
21
40
 
22
41
  Ƭ **IconButtonType**: ``"main"`` \| ``"ghost"`` \| ``"activated"`` \| ``"coverup"`` \| ``"error"`` \| ``"overlay"``
@@ -31,7 +50,7 @@ Represents the different types of icon buttons available in the application.
31
50
 
32
51
  #### Defined in
33
52
 
34
- [packages/touchpoint-ui/src/components/ui/IconButton.tsx:16](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/IconButton.tsx#L16)
53
+ [packages/touchpoint-ui/src/components/ui/IconButton.tsx:16](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/IconButton.tsx#L16)
35
54
 
36
55
  ___
37
56
 
@@ -43,7 +62,7 @@ Window size configuration
43
62
 
44
63
  #### Defined in
45
64
 
46
- [packages/touchpoint-ui/src/types.ts:7](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/types.ts#L7)
65
+ [packages/touchpoint-ui/src/interface.ts:13](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L13)
47
66
 
48
67
  ___
49
68
 
@@ -55,13 +74,13 @@ Color mode configuration (light/dark modes)
55
74
 
56
75
  #### Defined in
57
76
 
58
- [packages/touchpoint-ui/src/types.ts:12](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/types.ts#L12)
77
+ [packages/touchpoint-ui/src/interface.ts:18](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L18)
59
78
 
60
79
  ___
61
80
 
62
81
  ### CustomModalityComponent
63
82
 
64
- Ƭ **CustomModalityComponent**\<`Data`\>: `FC`\<\{ `data`: `Data` ; `conversationHandler`: `ConversationHandler` ; `enabled`: `boolean` }\>
83
+ Ƭ **CustomModalityComponent**\<`Data`\>: `ComponentType`\<\{ `data`: `Data` ; `conversationHandler`: `ConversationHandler` ; `enabled`: `boolean` ; `className?`: `string` }\>
65
84
 
66
85
  Custom Modalities allow rendering of rich components from nodes.
67
86
  See: https://docs.studio.nlx.ai/build/resources/modalities
@@ -74,25 +93,26 @@ See: https://docs.studio.nlx.ai/build/resources/modalities
74
93
 
75
94
  #### Defined in
76
95
 
77
- [packages/touchpoint-ui/src/types.ts:36](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/types.ts#L36)
96
+ [packages/touchpoint-ui/src/interface.ts:42](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L42)
78
97
 
79
98
  ___
80
99
 
81
100
  ### InitializeConversation
82
101
 
83
- Ƭ **InitializeConversation**: (`handler`: `ConversationHandler`) => `void`
102
+ Ƭ **InitializeConversation**: (`handler`: `ConversationHandler`, `context?`: `Context`) => `void`
84
103
 
85
104
  Custom conversation init method. Defaults to sending the welcome intent
86
105
 
87
106
  #### Type declaration
88
107
 
89
- ▸ (`handler`): `void`
108
+ ▸ (`handler`, `context?`): `void`
90
109
 
91
110
  ##### Parameters
92
111
 
93
112
  | Name | Type | Description |
94
113
  | :------ | :------ | :------ |
95
114
  | `handler` | `ConversationHandler` | the conversation handler. |
115
+ | `context?` | `Context` | context set via TouchpointConfiguration.initialContext |
96
116
 
97
117
  ##### Returns
98
118
 
@@ -100,10 +120,99 @@ Custom conversation init method. Defaults to sending the welcome intent
100
120
 
101
121
  #### Defined in
102
122
 
103
- [packages/touchpoint-ui/src/types.ts:169](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/types.ts#L169)
123
+ [packages/touchpoint-ui/src/interface.ts:180](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L180)
124
+
125
+ ___
126
+
127
+ ### CustomLaunchButton
128
+
129
+ Ƭ **CustomLaunchButton**: `ComponentType`\<\{ `className?`: `string` ; `onClick?`: () => `void` }\>
130
+
131
+ Fully custom launch icon
132
+
133
+ #### Defined in
134
+
135
+ [packages/touchpoint-ui/src/interface.ts:188](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L188)
136
+
137
+ ___
138
+
139
+ ### Input
140
+
141
+ Ƭ **Input**: ``"text"`` \| ``"voice"`` \| ``"voiceMini"``
142
+
143
+ Input type for the experience
144
+
145
+ #### Defined in
146
+
147
+ [packages/touchpoint-ui/src/interface.ts:202](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L202)
148
+
149
+ ___
150
+
151
+ ### BidirectionalConfig
152
+
153
+ Ƭ **BidirectionalConfig**: \{ `automaticContext?`: ``true`` ; `navigation?`: (`action`: ``"page_next"`` \| ``"page_previous"`` \| ``"page_custom"`` \| ``"page_unknown"``, `destination`: `string` \| `undefined`, `destinations`: `Record`\<`string`, `string`\>) => `void` ; `input?`: (`fields`: [`InputField`](interfaces/InputField.md)[], `pageFields`: `Record`\<`string`, `Element`\>) => `void` ; `custom?`: (`action`: `string`, `payload`: `unknown`) => `void` ; `customizeAutomaticContext?`: (`arg`: \{ `context`: [`BidirectionalContext`](interfaces/BidirectionalContext.md) ; `state`: [`PageState`](interfaces/PageState.md) }) => \{ `context`: [`BidirectionalContext`](interfaces/BidirectionalContext.md) ; `state`: [`PageState`](interfaces/PageState.md) } } \| \{ `automaticContext`: ``false`` ; `navigation?`: (`action`: ``"page_next"`` \| ``"page_previous"`` \| ``"page_custom"`` \| ``"page_unknown"``, `destination?`: `string`) => `void` ; `input?`: (`fields`: [`InputField`](interfaces/InputField.md)[]) => `void` ; `custom?`: (`action`: `string`, `payload`: `unknown`) => `void` }
154
+
155
+ Configuration for bidirectional mode of voice+.
156
+
157
+ #### Defined in
158
+
159
+ [packages/touchpoint-ui/src/interface.ts:256](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L256)
160
+
161
+ ## Variables
162
+
163
+ ### version
164
+
165
+ • `Const` **version**: `string` = `packageJson.version`
166
+
167
+ Package version
168
+
169
+ #### Defined in
170
+
171
+ [packages/touchpoint-ui/src/index.tsx:52](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/index.tsx#L52)
104
172
 
105
173
  ## Functions
106
174
 
175
+ ### analyzePageForms
176
+
177
+ ▸ **analyzePageForms**(): [`PageForms`](interfaces/PageForms.md)
178
+
179
+ Analyze page forms
180
+
181
+ #### Returns
182
+
183
+ [`PageForms`](interfaces/PageForms.md)
184
+
185
+ pageForms
186
+
187
+ #### Defined in
188
+
189
+ [packages/touchpoint-ui/src/bidirectional/analyzePageForms.ts:89](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/bidirectional/analyzePageForms.ts#L89)
190
+
191
+ ___
192
+
193
+ ### Ripple
194
+
195
+ ▸ **Ripple**(`props`, `deprecatedLegacyContext?`): `ReactNode`
196
+
197
+ #### Parameters
198
+
199
+ | Name | Type | Description |
200
+ | :------ | :------ | :------ |
201
+ | `props` | `Object` | - |
202
+ | `props.className?` | `string` | - |
203
+ | `props.style?` | `CSSProperties` | - |
204
+ | `deprecatedLegacyContext?` | `any` | **`Deprecated`** **`See`** [React Docs](https://legacy.reactjs.org/docs/legacy-context.html#referencing-context-in-lifecycle-methods) |
205
+
206
+ #### Returns
207
+
208
+ `ReactNode`
209
+
210
+ #### Defined in
211
+
212
+ [packages/touchpoint-ui/src/components/Ripple.tsx:24](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/Ripple.tsx#L24)
213
+
214
+ ___
215
+
107
216
  ### Carousel
108
217
 
109
218
  ▸ **Carousel**(`props`, `deprecatedLegacyContext?`): `ReactNode`
@@ -113,7 +222,8 @@ Custom conversation init method. Defaults to sending the welcome intent
113
222
  | Name | Type | Description |
114
223
  | :------ | :------ | :------ |
115
224
  | `props` | `Object` | - |
116
- | `props.children` | `ReactNode` | - |
225
+ | `props.className?` | `string` | - |
226
+ | `props.children?` | `ReactNode` | - |
117
227
  | `deprecatedLegacyContext?` | `any` | **`Deprecated`** **`See`** [React Docs](https://legacy.reactjs.org/docs/legacy-context.html#referencing-context-in-lifecycle-methods) |
118
228
 
119
229
  #### Returns
@@ -122,7 +232,7 @@ Custom conversation init method. Defaults to sending the welcome intent
122
232
 
123
233
  #### Defined in
124
234
 
125
- [packages/touchpoint-ui/src/components/ui/Carousel.tsx:5](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/Carousel.tsx#L5)
235
+ [packages/touchpoint-ui/src/components/ui/Carousel.tsx:17](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/Carousel.tsx#L17)
126
236
 
127
237
  ___
128
238
 
@@ -143,7 +253,7 @@ ___
143
253
 
144
254
  #### Defined in
145
255
 
146
- [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:25](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L25)
256
+ [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:38](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L38)
147
257
 
148
258
  ___
149
259
 
@@ -166,7 +276,7 @@ ___
166
276
 
167
277
  #### Defined in
168
278
 
169
- [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:44](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L44)
279
+ [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:96](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L96)
170
280
 
171
281
  ___
172
282
 
@@ -187,7 +297,7 @@ ___
187
297
 
188
298
  #### Defined in
189
299
 
190
- [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:69](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L69)
300
+ [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:121](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L121)
191
301
 
192
302
  ___
193
303
 
@@ -208,7 +318,7 @@ ___
208
318
 
209
319
  #### Defined in
210
320
 
211
- [packages/touchpoint-ui/src/components/ui/DateInput.tsx:25](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/DateInput.tsx#L25)
321
+ [packages/touchpoint-ui/src/components/ui/DateInput.tsx:29](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/DateInput.tsx#L29)
212
322
 
213
323
  ___
214
324
 
@@ -229,7 +339,7 @@ ___
229
339
 
230
340
  #### Defined in
231
341
 
232
- [packages/touchpoint-ui/src/components/ui/IconButton.tsx:67](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/IconButton.tsx#L67)
342
+ [packages/touchpoint-ui/src/components/ui/IconButton.tsx:94](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/IconButton.tsx#L94)
233
343
 
234
344
  ___
235
345
 
@@ -250,7 +360,7 @@ ___
250
360
 
251
361
  #### Defined in
252
362
 
253
- [packages/touchpoint-ui/src/components/ui/TextButton.tsx:33](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/TextButton.tsx#L33)
363
+ [packages/touchpoint-ui/src/components/ui/TextButton.tsx:33](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/TextButton.tsx#L33)
254
364
 
255
365
  ___
256
366
 
@@ -265,6 +375,7 @@ ___
265
375
  | `props` | `Object` | - |
266
376
  | `props.children` | `ReactNode` | - |
267
377
  | `props.faded?` | `boolean` | - |
378
+ | `props.className?` | `string` | - |
268
379
  | `deprecatedLegacyContext?` | `any` | **`Deprecated`** **`See`** [React Docs](https://legacy.reactjs.org/docs/legacy-context.html#referencing-context-in-lifecycle-methods) |
269
380
 
270
381
  #### Returns
@@ -273,7 +384,7 @@ ___
273
384
 
274
385
  #### Defined in
275
386
 
276
- [packages/touchpoint-ui/src/components/ui/Typography.tsx:5](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/Typography.tsx#L5)
387
+ [packages/touchpoint-ui/src/components/ui/Typography.tsx:5](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/Typography.tsx#L5)
277
388
 
278
389
  ___
279
390
 
@@ -287,6 +398,7 @@ ___
287
398
  | :------ | :------ | :------ |
288
399
  | `props` | `Object` | - |
289
400
  | `props.children` | `ReactNode` | - |
401
+ | `props.className?` | `string` | - |
290
402
  | `deprecatedLegacyContext?` | `any` | **`Deprecated`** **`See`** [React Docs](https://legacy.reactjs.org/docs/legacy-context.html#referencing-context-in-lifecycle-methods) |
291
403
 
292
404
  #### Returns
@@ -295,7 +407,7 @@ ___
295
407
 
296
408
  #### Defined in
297
409
 
298
- [packages/touchpoint-ui/src/components/ui/Typography.tsx:16](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/Typography.tsx#L16)
410
+ [packages/touchpoint-ui/src/components/ui/Typography.tsx:21](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/Typography.tsx#L21)
299
411
 
300
412
  ___
301
413
 
@@ -316,7 +428,7 @@ ___
316
428
 
317
429
  #### Defined in
318
430
 
319
- [packages/touchpoint-ui/src/index.tsx:33](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/index.tsx#L33)
431
+ [packages/touchpoint-ui/src/index.tsx:61](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/index.tsx#L61)
320
432
 
321
433
  ___
322
434
 
@@ -340,7 +452,7 @@ A promise that resolves to a TouchpointInstance
340
452
 
341
453
  #### Defined in
342
454
 
343
- [packages/touchpoint-ui/src/index.tsx:202](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/index.tsx#L202)
455
+ [packages/touchpoint-ui/src/index.tsx:342](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/index.tsx#L342)
344
456
 
345
457
  ___
346
458
 
@@ -364,4 +476,4 @@ ___
364
476
 
365
477
  #### Defined in
366
478
 
367
- [packages/touchpoint-ui/src/preview.tsx:10](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/preview.tsx#L10)
479
+ [packages/touchpoint-ui/src/preview.tsx:10](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/preview.tsx#L10)
@@ -0,0 +1,51 @@
1
+ # Interface: BidirectionalContext
2
+
3
+ Bidirectional context information that is sent to the LLM.
4
+
5
+ ## Properties
6
+
7
+ ### uri
8
+
9
+ • `Optional` **uri**: `string`
10
+
11
+ Identifier for which page you are currently on. This can be used to filter the relevant KB pages.
12
+
13
+ #### Defined in
14
+
15
+ [packages/touchpoint-ui/src/interface.ts:235](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L235)
16
+
17
+ ___
18
+
19
+ ### fields
20
+
21
+ • `Optional` **fields**: [`InteractiveElementInfo`](InteractiveElementInfo.md)[]
22
+
23
+ The active form fields that can be filled in.
24
+
25
+ #### Defined in
26
+
27
+ [packages/touchpoint-ui/src/interface.ts:237](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L237)
28
+
29
+ ___
30
+
31
+ ### destinations
32
+
33
+ • `Optional` **destinations**: `string`[]
34
+
35
+ Human readable location names that can be navigated to.
36
+
37
+ #### Defined in
38
+
39
+ [packages/touchpoint-ui/src/interface.ts:239](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L239)
40
+
41
+ ___
42
+
43
+ ### actions
44
+
45
+ • `Optional` **actions**: \{ `action`: `string` ; `description?`: `string` ; `schema?`: `any` }[]
46
+
47
+ Custom actions that can be performed.
48
+
49
+ #### Defined in
50
+
51
+ [packages/touchpoint-ui/src/interface.ts:243](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L243)
@@ -0,0 +1,79 @@
1
+ # Interface: BidirectionalCustomCommand
2
+
3
+ During a Voice+ bidirectional conversation, you can indicate to the application the availability of
4
+ custom commands that the user can invoke.
5
+
6
+ **`Type Param`**
7
+
8
+ Commands can take a single parameter which will be generated from this schema.
9
+
10
+ ## Properties
11
+
12
+ ### action
13
+
14
+ • **action**: `string`
15
+
16
+ The name of the command, used to invoke it. Should be unique and descriptive in the context of the LLM.
17
+
18
+ #### Defined in
19
+
20
+ [packages/touchpoint-ui/src/interface.ts:444](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L444)
21
+
22
+ ___
23
+
24
+ ### description
25
+
26
+ • `Optional` **description**: `string`
27
+
28
+ A short description of the command, used to help the LLM understand its purpose.
29
+
30
+ If omitted, then the command will not be sent to the application and must be triggered
31
+ from the application side.
32
+
33
+ #### Defined in
34
+
35
+ [packages/touchpoint-ui/src/interface.ts:451](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L451)
36
+
37
+ ___
38
+
39
+ ### schema
40
+
41
+ • `Optional` **schema**: `any`
42
+
43
+ A JSON Schema that defines the structure of the command's input.
44
+
45
+ Use descriptive names and `description` fields to give the underlying LLM plenty of context for
46
+ it to generate reasonable parameters. Note that the LLM output will be validated (and transformed)
47
+ with this schema, so you are guaranteed type safe inputs to your handler.
48
+
49
+ Should follow the JSONSchema specification.
50
+
51
+ #### Defined in
52
+
53
+ [packages/touchpoint-ui/src/interface.ts:462](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L462)
54
+
55
+ ___
56
+
57
+ ### handler
58
+
59
+ • **handler**: (`value`: `any`) => `void`
60
+
61
+ A handler that will be called with an argument matching the schema when the command is invoked.
62
+
63
+ #### Type declaration
64
+
65
+ ▸ (`value`): `void`
66
+
67
+ ##### Parameters
68
+
69
+ | Name | Type |
70
+ | :------ | :------ |
71
+ | `value` | `any` |
72
+
73
+ ##### Returns
74
+
75
+ `void`
76
+
77
+ #### Defined in
78
+
79
+ [packages/touchpoint-ui/src/interface.ts:466](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L466)
@@ -0,0 +1,39 @@
1
+ # Interface: ChoiceMessage
2
+
3
+ Choice message with metadata
4
+
5
+ ## Properties
6
+
7
+ ### message
8
+
9
+ • **message**: `ApplicationMessage`
10
+
11
+ Message contents
12
+
13
+ #### Defined in
14
+
15
+ [packages/touchpoint-ui/src/interface.ts:27](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L27)
16
+
17
+ ___
18
+
19
+ ### responseIndex
20
+
21
+ • **responseIndex**: `number`
22
+
23
+ Index in the response transcript history
24
+
25
+ #### Defined in
26
+
27
+ [packages/touchpoint-ui/src/interface.ts:31](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L31)
28
+
29
+ ___
30
+
31
+ ### messageIndex
32
+
33
+ • **messageIndex**: `number`
34
+
35
+ Message index in the current response
36
+
37
+ #### Defined in
38
+
39
+ [packages/touchpoint-ui/src/interface.ts:35](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/interface.ts#L35)
@@ -4,6 +4,18 @@ Props for the CustomCard component
4
4
 
5
5
  ## Properties
6
6
 
7
+ ### className
8
+
9
+ • `Optional` **className**: `string`
10
+
11
+ Class name
12
+
13
+ #### Defined in
14
+
15
+ [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:15](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L15)
16
+
17
+ ___
18
+
7
19
  ### children
8
20
 
9
21
  • **children**: `ReactNode`
@@ -12,7 +24,7 @@ Content to be rendered inside the card.
12
24
 
13
25
  #### Defined in
14
26
 
15
- [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:14](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L14)
27
+ [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:19](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L19)
16
28
 
17
29
  ___
18
30
 
@@ -24,7 +36,7 @@ Whether the card is in a selected state. Used to highlight the card.
24
36
 
25
37
  #### Defined in
26
38
 
27
- [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:18](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L18)
39
+ [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:23](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L23)
28
40
 
29
41
  ___
30
42
 
@@ -44,4 +56,28 @@ Handler function for when the card is clicked
44
56
 
45
57
  #### Defined in
46
58
 
47
- [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:22](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L22)
59
+ [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:27](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L27)
60
+
61
+ ___
62
+
63
+ ### href
64
+
65
+ • `Optional` **href**: `string`
66
+
67
+ Transform the card into an anchor tag with the href specified
68
+
69
+ #### Defined in
70
+
71
+ [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:31](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L31)
72
+
73
+ ___
74
+
75
+ ### newTab
76
+
77
+ • `Optional` **newTab**: `boolean`
78
+
79
+ Specify whether the URL should take the user to a new tab
80
+
81
+ #### Defined in
82
+
83
+ [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:35](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L35)
@@ -12,7 +12,7 @@ Content to be displayed on the left side of the row
12
12
 
13
13
  #### Defined in
14
14
 
15
- [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:58](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L58)
15
+ [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:110](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L110)
16
16
 
17
17
  ___
18
18
 
@@ -24,7 +24,7 @@ Content to be displayed on the right side of the row
24
24
 
25
25
  #### Defined in
26
26
 
27
- [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:62](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L62)
27
+ [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:114](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L114)
28
28
 
29
29
  ___
30
30
 
@@ -36,4 +36,4 @@ Optional icon to be displayed in the center of the row
36
36
 
37
37
  #### Defined in
38
38
 
39
- [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:66](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L66)
39
+ [packages/touchpoint-ui/src/components/ui/CustomCard.tsx:118](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/CustomCard.tsx#L118)
@@ -26,4 +26,16 @@ Handler function called when the date is submitted
26
26
 
27
27
  #### Defined in
28
28
 
29
- [packages/touchpoint-ui/src/components/ui/DateInput.tsx:16](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/DateInput.tsx#L16)
29
+ [packages/touchpoint-ui/src/components/ui/DateInput.tsx:16](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/DateInput.tsx#L16)
30
+
31
+ ___
32
+
33
+ ### className
34
+
35
+ • `Optional` **className**: `string`
36
+
37
+ Class name
38
+
39
+ #### Defined in
40
+
41
+ [packages/touchpoint-ui/src/components/ui/DateInput.tsx:20](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/DateInput.tsx#L20)
@@ -20,7 +20,7 @@ Handler function called when the button is clicked
20
20
 
21
21
  #### Defined in
22
22
 
23
- [packages/touchpoint-ui/src/components/ui/IconButton.tsx:31](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/IconButton.tsx#L31)
23
+ [packages/touchpoint-ui/src/components/ui/IconButton.tsx:31](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/IconButton.tsx#L31)
24
24
 
25
25
  ___
26
26
 
@@ -32,7 +32,7 @@ Accessible label for the button
32
32
 
33
33
  #### Defined in
34
34
 
35
- [packages/touchpoint-ui/src/components/ui/IconButton.tsx:35](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/IconButton.tsx#L35)
35
+ [packages/touchpoint-ui/src/components/ui/IconButton.tsx:35](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/IconButton.tsx#L35)
36
36
 
37
37
  ___
38
38
 
@@ -44,7 +44,7 @@ Additional CSS classes to apply to the button
44
44
 
45
45
  #### Defined in
46
46
 
47
- [packages/touchpoint-ui/src/components/ui/IconButton.tsx:39](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/IconButton.tsx#L39)
47
+ [packages/touchpoint-ui/src/components/ui/IconButton.tsx:39](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/IconButton.tsx#L39)
48
48
 
49
49
  ___
50
50
 
@@ -56,7 +56,7 @@ Visual style variant of the button. One of IconButtonType.
56
56
 
57
57
  #### Defined in
58
58
 
59
- [packages/touchpoint-ui/src/components/ui/IconButton.tsx:43](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/IconButton.tsx#L43)
59
+ [packages/touchpoint-ui/src/components/ui/IconButton.tsx:43](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/IconButton.tsx#L43)
60
60
 
61
61
  ___
62
62
 
@@ -68,4 +68,4 @@ Icon component to display inside the button
68
68
 
69
69
  #### Defined in
70
70
 
71
- [packages/touchpoint-ui/src/components/ui/IconButton.tsx:47](https://github.com/nlxai/sdk/blob/4ed1b691443f6f0d50583f93b653454e560516a7/packages/touchpoint-ui/src/components/ui/IconButton.tsx#L47)
71
+ [packages/touchpoint-ui/src/components/ui/IconButton.tsx:47](https://github.com/nlxai/sdk/blob/e13e2baae9abf0ee3add35f3a4b4c3fe47e8f43d/packages/touchpoint-ui/src/components/ui/IconButton.tsx#L47)