@wix/auto_sdk_forms_interactive-form-sessions 1.0.2 → 1.0.4
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/build/cjs/index.d.ts +18 -9
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +274 -162
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +202 -117
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +18 -9
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +274 -162
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +202 -117
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +18 -9
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +274 -162
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +202 -117
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +18 -9
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +274 -162
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +202 -117
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,445 +1,530 @@
|
|
|
1
1
|
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* An interactive form session enables AI-powered conversational form completion.
|
|
5
|
+
* The session maintains conversation context and tracks form data extraction throughout
|
|
6
|
+
* the user's interaction with the AI assistant.
|
|
7
|
+
*/
|
|
3
8
|
interface InteractiveFormSession {
|
|
4
9
|
/**
|
|
5
|
-
*
|
|
10
|
+
* Interactive form session ID.
|
|
6
11
|
* @format GUID
|
|
7
12
|
* @readonly
|
|
8
13
|
*/
|
|
9
14
|
_id?: string;
|
|
10
15
|
/**
|
|
11
|
-
* Form
|
|
16
|
+
* Form ID.
|
|
12
17
|
* @format GUID
|
|
13
18
|
*/
|
|
14
19
|
formId?: string;
|
|
15
20
|
}
|
|
16
21
|
interface CreateInteractiveFormSessionRequest {
|
|
17
22
|
/**
|
|
18
|
-
*
|
|
23
|
+
* Form ID to create an interactive session for.
|
|
19
24
|
* @format GUID
|
|
20
25
|
*/
|
|
21
26
|
formId: string;
|
|
22
27
|
/**
|
|
23
|
-
* ID
|
|
28
|
+
* Custom prompt ID to use for the AI assistant's conversation style and behavior.
|
|
29
|
+
* When not provided, uses the form's default chat settings configured in the Chat Settings API.
|
|
24
30
|
* @format GUID
|
|
25
31
|
*/
|
|
26
32
|
promptId?: string | null;
|
|
27
33
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* For example
|
|
31
|
-
*
|
|
32
|
-
* it will override the existing value.
|
|
34
|
+
* Pre-filled values to apply to the form, to initialize the session with existing data.
|
|
35
|
+
* Field keys must match the form schema field names.
|
|
36
|
+
* For example: `{"firstName": "John", "email": "john@example.com", "age": 25}`.
|
|
37
|
+
* These values are merged with any data extracted during the conversation.
|
|
33
38
|
*/
|
|
34
39
|
currentValues?: Record<string, any> | null;
|
|
35
40
|
/**
|
|
36
|
-
*
|
|
41
|
+
* Whether the session should run in dry run mode for testing and preview purposes.
|
|
42
|
+
* In dry run mode, the full conversational flow works normally and form data is extracted,
|
|
43
|
+
* but no actual form submission occurs.
|
|
37
44
|
* @immutable
|
|
38
45
|
*/
|
|
39
46
|
dryRun?: boolean;
|
|
40
47
|
/**
|
|
41
|
-
*
|
|
48
|
+
* Deprecated, use `clientTime` instead.
|
|
42
49
|
* @minLength 1
|
|
43
50
|
* @maxLength 200
|
|
44
51
|
*/
|
|
45
52
|
currentTime?: string | null;
|
|
46
|
-
/** Current date-time of api client */
|
|
53
|
+
/** Current date-time of api client. */
|
|
47
54
|
clientTime?: ClientTime;
|
|
48
55
|
}
|
|
49
56
|
interface ClientTime {
|
|
50
57
|
/**
|
|
51
|
-
* Current date
|
|
58
|
+
* Current date and time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC format.
|
|
59
|
+
* For example, `2023-10-01T12:00:00Z`.
|
|
52
60
|
* @minLength 1
|
|
53
61
|
* @maxLength 200
|
|
54
62
|
*/
|
|
55
63
|
currentTime?: string | null;
|
|
56
64
|
/**
|
|
57
|
-
*
|
|
65
|
+
* Caller's timezone identifier for localizing date and time values in IANA timezone format (for example, `Europe/Vilnius`, `America/New_York`).
|
|
58
66
|
* @minLength 1
|
|
59
67
|
* @maxLength 50
|
|
60
68
|
*/
|
|
61
69
|
timeZone?: string | null;
|
|
62
70
|
}
|
|
63
71
|
interface CreateInteractiveFormSessionResponse {
|
|
64
|
-
/**
|
|
72
|
+
/** Created interactive form session. */
|
|
65
73
|
interactiveFormSession?: InteractiveFormSession;
|
|
66
|
-
/**
|
|
74
|
+
/** AI assistant response chunks for the interactive form session. */
|
|
67
75
|
responseChunks?: InteractiveFormSessionResponseChunk[];
|
|
68
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* AI assistant response chunk, containing different types of conversational content.
|
|
79
|
+
* Chunks are delivered sequentially and must be processed in order to build the complete
|
|
80
|
+
* conversation interface. Each chunk type requires different UI handling.
|
|
81
|
+
*/
|
|
69
82
|
interface InteractiveFormSessionResponseChunk extends InteractiveFormSessionResponseChunkOfOneOf {
|
|
70
|
-
/**
|
|
83
|
+
/** Conversational text message for display to the user. */
|
|
71
84
|
textDetails?: TextDetails;
|
|
72
|
-
/**
|
|
85
|
+
/** Structured data extracted from user input and mapped to specific form fields. */
|
|
73
86
|
textDataDetails?: TextDataDetails;
|
|
74
|
-
/**
|
|
87
|
+
/** Selector for selecting multiple options from a predefined list. */
|
|
75
88
|
multiSelectInputDetails?: MultiSelectInputDetails;
|
|
76
|
-
/**
|
|
89
|
+
/** Selector for numeric input with optional range and validation constraints. */
|
|
77
90
|
numberInputDetails?: NumberInputDetails;
|
|
78
|
-
/**
|
|
91
|
+
/** Visual separator element for organizing conversation flow. */
|
|
79
92
|
separatorDetails?: SeparatorDetails;
|
|
80
|
-
/**
|
|
93
|
+
/** Selector for selecting a single option from a predefined list. */
|
|
81
94
|
singleSelectInputDetails?: SingleSelectInputDetails;
|
|
82
|
-
/**
|
|
95
|
+
/** Error information when processing fails or validation errors occur. */
|
|
83
96
|
errorDetails?: ErrorDetails;
|
|
84
|
-
/** Form submission
|
|
97
|
+
/** Form submission confirmation containing form submission ID and ecom checkout ID, if relevant. */
|
|
85
98
|
submissionDetails?: SubmissionDetails;
|
|
86
|
-
/** Important information
|
|
99
|
+
/** Important contextual information that may influence data extraction or user decisions. */
|
|
87
100
|
importantTextDetails?: ImportantTextDetails;
|
|
88
|
-
/**
|
|
101
|
+
/** Diagnostic information for development, debugging, and performance monitoring. */
|
|
89
102
|
debugDetails?: DebugDetails;
|
|
90
|
-
/**
|
|
103
|
+
/** Stream completion signal indicating no more chunks will be sent in this response. */
|
|
91
104
|
endOfResponseDetails?: EndOfResponseDetails;
|
|
92
|
-
/**
|
|
105
|
+
/** Input for file upload with field targeting. Not supported. */
|
|
93
106
|
fileUploadDetails?: FileUploadDetails;
|
|
94
|
-
/**
|
|
107
|
+
/** Input for digital signature capture with field targeting. Not supported. */
|
|
95
108
|
signatureDetails?: SignatureDetails;
|
|
96
|
-
/**
|
|
109
|
+
/** Response chunk type, that determines how the content should be processed and displayed. */
|
|
97
110
|
chunkType?: ChunkTypeWithLiterals;
|
|
98
|
-
/**
|
|
111
|
+
/**
|
|
112
|
+
* Indicates which portion of the original user input was meaningful for data extraction.
|
|
113
|
+
* Can be used to highlight relevant parts of the user's message in the UI.
|
|
114
|
+
*/
|
|
99
115
|
meaningfulInput?: MeaningfulInput;
|
|
100
116
|
}
|
|
101
117
|
/** @oneof */
|
|
102
118
|
interface InteractiveFormSessionResponseChunkOfOneOf {
|
|
103
|
-
/**
|
|
119
|
+
/** Conversational text message for display to the user. */
|
|
104
120
|
textDetails?: TextDetails;
|
|
105
|
-
/**
|
|
121
|
+
/** Structured data extracted from user input and mapped to specific form fields. */
|
|
106
122
|
textDataDetails?: TextDataDetails;
|
|
107
|
-
/**
|
|
123
|
+
/** Selector for selecting multiple options from a predefined list. */
|
|
108
124
|
multiSelectInputDetails?: MultiSelectInputDetails;
|
|
109
|
-
/**
|
|
125
|
+
/** Selector for numeric input with optional range and validation constraints. */
|
|
110
126
|
numberInputDetails?: NumberInputDetails;
|
|
111
|
-
/**
|
|
127
|
+
/** Visual separator element for organizing conversation flow. */
|
|
112
128
|
separatorDetails?: SeparatorDetails;
|
|
113
|
-
/**
|
|
129
|
+
/** Selector for selecting a single option from a predefined list. */
|
|
114
130
|
singleSelectInputDetails?: SingleSelectInputDetails;
|
|
115
|
-
/**
|
|
131
|
+
/** Error information when processing fails or validation errors occur. */
|
|
116
132
|
errorDetails?: ErrorDetails;
|
|
117
|
-
/** Form submission
|
|
133
|
+
/** Form submission confirmation containing form submission ID and ecom checkout ID, if relevant. */
|
|
118
134
|
submissionDetails?: SubmissionDetails;
|
|
119
|
-
/** Important information
|
|
135
|
+
/** Important contextual information that may influence data extraction or user decisions. */
|
|
120
136
|
importantTextDetails?: ImportantTextDetails;
|
|
121
|
-
/**
|
|
137
|
+
/** Diagnostic information for development, debugging, and performance monitoring. */
|
|
122
138
|
debugDetails?: DebugDetails;
|
|
123
|
-
/**
|
|
139
|
+
/** Stream completion signal indicating no more chunks will be sent in this response. */
|
|
124
140
|
endOfResponseDetails?: EndOfResponseDetails;
|
|
125
|
-
/**
|
|
141
|
+
/** Input for file upload with field targeting. Not supported. */
|
|
126
142
|
fileUploadDetails?: FileUploadDetails;
|
|
127
|
-
/**
|
|
143
|
+
/** Input for digital signature capture with field targeting. Not supported. */
|
|
128
144
|
signatureDetails?: SignatureDetails;
|
|
129
145
|
}
|
|
130
146
|
declare enum ChunkType {
|
|
147
|
+
/** Unknown chunk type. */
|
|
131
148
|
UNKNOWN_CHUNK_TYPE = "UNKNOWN_CHUNK_TYPE",
|
|
132
|
-
/** Text
|
|
149
|
+
/** Text message for display to the user. */
|
|
133
150
|
TEXT = "TEXT",
|
|
134
|
-
/**
|
|
151
|
+
/** Structured data extracted from user input and mapped to form fields. */
|
|
135
152
|
TEXT_DATA = "TEXT_DATA",
|
|
136
|
-
/**
|
|
153
|
+
/** Selector for selecting multiple options from a list. */
|
|
137
154
|
MULTI_SELECT_INPUT = "MULTI_SELECT_INPUT",
|
|
138
|
-
/**
|
|
155
|
+
/** Selector for numeric input with optional validation. */
|
|
139
156
|
NUMBER_INPUT = "NUMBER_INPUT",
|
|
157
|
+
/** Visual separator element such as paragraph breaks. */
|
|
140
158
|
SEPARATOR = "SEPARATOR",
|
|
141
|
-
/**
|
|
159
|
+
/** Selector for selecting one option from a list. */
|
|
142
160
|
SINGLE_SELECT_INPUT = "SINGLE_SELECT_INPUT",
|
|
143
|
-
/**
|
|
161
|
+
/** Error message when processing fails or validation errors occur. */
|
|
144
162
|
ERROR = "ERROR",
|
|
145
|
-
/** Form submission
|
|
163
|
+
/** Form submission confirmation with submission ID and checkout ID, if relevant. */
|
|
146
164
|
SUBMISSION = "SUBMISSION",
|
|
147
|
-
/**
|
|
165
|
+
/** Highlighted information that may influence form data extraction. */
|
|
148
166
|
IMPORTANT_TEXT = "IMPORTANT_TEXT",
|
|
149
|
-
/**
|
|
167
|
+
/** Diagnostic information for troubleshooting and development. */
|
|
150
168
|
DEBUG = "DEBUG",
|
|
151
|
-
/**
|
|
169
|
+
/** Signals the completion of a response stream. */
|
|
152
170
|
END_OF_RESPONSE = "END_OF_RESPONSE",
|
|
153
|
-
/**
|
|
171
|
+
/** Input for file upload. Not supported. */
|
|
154
172
|
FILE_UPLOAD = "FILE_UPLOAD",
|
|
155
|
-
/**
|
|
173
|
+
/** Input for digital signature capture. Not supported. */
|
|
156
174
|
SIGNATURE = "SIGNATURE"
|
|
157
175
|
}
|
|
158
176
|
/** @enumType */
|
|
159
177
|
type ChunkTypeWithLiterals = ChunkType | 'UNKNOWN_CHUNK_TYPE' | 'TEXT' | 'TEXT_DATA' | 'MULTI_SELECT_INPUT' | 'NUMBER_INPUT' | 'SEPARATOR' | 'SINGLE_SELECT_INPUT' | 'ERROR' | 'SUBMISSION' | 'IMPORTANT_TEXT' | 'DEBUG' | 'END_OF_RESPONSE' | 'FILE_UPLOAD' | 'SIGNATURE';
|
|
178
|
+
/** Conversational text content from the AI assistant. */
|
|
160
179
|
interface TextDetails {
|
|
161
180
|
/**
|
|
162
|
-
* Text content to display
|
|
181
|
+
* Text content to display to the user.
|
|
163
182
|
* @minLength 1
|
|
164
183
|
* @maxLength 10000
|
|
165
184
|
*/
|
|
166
185
|
text?: string;
|
|
167
|
-
/**
|
|
186
|
+
/** Text formatting style for visual presentation. */
|
|
168
187
|
style?: StyleWithLiterals;
|
|
169
188
|
}
|
|
170
189
|
declare enum Style {
|
|
190
|
+
/** Unknown text style. */
|
|
171
191
|
UNKNOWN_STYLE = "UNKNOWN_STYLE",
|
|
192
|
+
/** Regular conversational text. */
|
|
172
193
|
NORMAL = "NORMAL",
|
|
194
|
+
/** Bold text for emphasis. */
|
|
173
195
|
BOLD = "BOLD"
|
|
174
196
|
}
|
|
175
197
|
/** @enumType */
|
|
176
198
|
type StyleWithLiterals = Style | 'UNKNOWN_STYLE' | 'NORMAL' | 'BOLD';
|
|
199
|
+
/** Structured data extracted from user input and mapped to form fields. */
|
|
177
200
|
interface TextDataDetails {
|
|
178
201
|
/**
|
|
179
|
-
*
|
|
202
|
+
* Form field identifier that this extracted data maps to.
|
|
203
|
+
* Matches a field name in the form schema.
|
|
180
204
|
* @minLength 1
|
|
181
205
|
* @maxLength 200
|
|
182
206
|
*/
|
|
183
207
|
fieldTarget?: string;
|
|
184
208
|
/**
|
|
185
|
-
*
|
|
209
|
+
* Human-readable text representation of the extracted data to display to the user.
|
|
186
210
|
* @minLength 1
|
|
187
211
|
* @maxLength 10000
|
|
188
212
|
*/
|
|
189
213
|
text?: string;
|
|
190
|
-
/**
|
|
214
|
+
/**
|
|
215
|
+
* Structured value for form submission (for example, boolean `true`/`false`, number, or string).
|
|
216
|
+
* This is the actual data value that will be submitted with the form.
|
|
217
|
+
*/
|
|
191
218
|
value?: any;
|
|
192
219
|
/**
|
|
193
|
-
* User
|
|
220
|
+
* User-friendly display representation of the value (for example, "Yes"/"No" for boolean, "25 years old" for age).
|
|
221
|
+
* Use this to display confirmation of what was extracted from the user's input.
|
|
194
222
|
* @minLength 1
|
|
195
223
|
* @maxLength 10000
|
|
196
224
|
*/
|
|
197
225
|
displayValue?: string;
|
|
198
226
|
}
|
|
227
|
+
/** Interactive prompt for selecting multiple options from a predefined list. */
|
|
199
228
|
interface MultiSelectInputDetails {
|
|
200
229
|
/**
|
|
201
|
-
*
|
|
230
|
+
* Form field identifier for the multi-select input.
|
|
202
231
|
* @minLength 1
|
|
203
232
|
* @maxLength 200
|
|
204
233
|
*/
|
|
205
234
|
fieldTarget?: string;
|
|
206
235
|
/**
|
|
207
|
-
* Options available for selection
|
|
236
|
+
* Options available for selection, when relevant. Users can choose multiple options from this list.
|
|
208
237
|
* @minSize 1
|
|
209
238
|
* @maxSize 100
|
|
210
239
|
*/
|
|
211
240
|
options?: Option[];
|
|
212
|
-
/**
|
|
241
|
+
/** When present, allows users to provide custom values not in the predefined options list. */
|
|
213
242
|
allowedCustomValue?: CustomValue;
|
|
214
243
|
}
|
|
244
|
+
/** Selection option for input prompts. */
|
|
215
245
|
interface Option {
|
|
216
246
|
/**
|
|
217
|
-
* Value to be submitted
|
|
247
|
+
* Value to be submitted when this option is selected.
|
|
248
|
+
* This is the technical value used in form processing and submission.
|
|
218
249
|
* @minLength 1
|
|
219
250
|
* @maxLength 10000
|
|
220
251
|
*/
|
|
221
252
|
value?: string;
|
|
222
253
|
/**
|
|
223
|
-
*
|
|
254
|
+
* Human-readable label displayed to the user for this option.
|
|
224
255
|
* @minLength 1
|
|
225
256
|
* @maxLength 10000
|
|
226
257
|
*/
|
|
227
258
|
label?: string;
|
|
228
259
|
}
|
|
260
|
+
/** Custom value configuration for input prompts. */
|
|
229
261
|
interface CustomValue {
|
|
230
262
|
/**
|
|
231
|
-
* Description of expected custom value
|
|
263
|
+
* Description of the expected custom value format or content.
|
|
264
|
+
* Displayed to guide users when they choose to provide a custom option.
|
|
232
265
|
* @maxLength 10000
|
|
233
266
|
*/
|
|
234
267
|
description?: string;
|
|
235
268
|
}
|
|
269
|
+
/** Interactive prompt for numeric input with validation constraints. */
|
|
236
270
|
interface NumberInputDetails {
|
|
237
271
|
/**
|
|
238
|
-
*
|
|
272
|
+
* Form field identifier for the numeric input.
|
|
239
273
|
* @minLength 1
|
|
240
274
|
* @maxLength 200
|
|
241
275
|
*/
|
|
242
276
|
fieldTarget?: string;
|
|
243
|
-
/**
|
|
277
|
+
/** Minimum and maximum value constraints for the numeric input. */
|
|
244
278
|
rangeLimit?: NumberRangeLimit;
|
|
245
|
-
/**
|
|
279
|
+
/**
|
|
280
|
+
* When provided, restricts input to multiples of this value.
|
|
281
|
+
* For example, `2.5` would allow 2.5, 5.0, 7.5, and so on.
|
|
282
|
+
*/
|
|
246
283
|
multipleOf?: number | null;
|
|
247
284
|
}
|
|
285
|
+
/** Numeric range constraints for number input validation. */
|
|
248
286
|
interface NumberRangeLimit extends NumberRangeLimitEndOneOf {
|
|
249
|
-
/** Maximum value
|
|
287
|
+
/** Maximum allowed value (inclusive). */
|
|
250
288
|
maxInclusiveValue?: number | null;
|
|
251
|
-
/** Maximum value
|
|
289
|
+
/** Maximum allowed value (exclusive). */
|
|
252
290
|
maxExclusiveValue?: number | null;
|
|
253
|
-
/** Minimum value
|
|
291
|
+
/** Minimum allowed value (inclusive). */
|
|
254
292
|
minInclusiveValue?: number | null;
|
|
255
293
|
}
|
|
256
294
|
/** @oneof */
|
|
257
295
|
interface NumberRangeLimitEndOneOf {
|
|
258
|
-
/** Maximum value
|
|
296
|
+
/** Maximum allowed value (inclusive). */
|
|
259
297
|
maxInclusiveValue?: number | null;
|
|
260
|
-
/** Maximum value
|
|
298
|
+
/** Maximum allowed value (exclusive). */
|
|
261
299
|
maxExclusiveValue?: number | null;
|
|
262
300
|
}
|
|
301
|
+
/** Visual separator element for organizing conversation flow. */
|
|
263
302
|
interface SeparatorDetails {
|
|
264
|
-
/** Type of separator
|
|
303
|
+
/** Type of visual separator to display in the conversation flow. */
|
|
265
304
|
type?: TypeWithLiterals;
|
|
266
305
|
}
|
|
267
306
|
declare enum Type {
|
|
307
|
+
/** Unknown separator type. */
|
|
268
308
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
309
|
+
/** Paragraph break for visual content separation. */
|
|
269
310
|
PARAGRAPH = "PARAGRAPH"
|
|
270
311
|
}
|
|
271
312
|
/** @enumType */
|
|
272
313
|
type TypeWithLiterals = Type | 'UNKNOWN_TYPE' | 'PARAGRAPH';
|
|
314
|
+
/** Selector for selecting a single option from a predefined list. */
|
|
273
315
|
interface SingleSelectInputDetails {
|
|
274
316
|
/**
|
|
275
|
-
*
|
|
317
|
+
* Form field identifier for the single-select input.
|
|
276
318
|
* @minLength 1
|
|
277
319
|
* @maxLength 200
|
|
278
320
|
*/
|
|
279
321
|
fieldTarget?: string;
|
|
280
322
|
/**
|
|
281
|
-
* Options available for selection
|
|
323
|
+
* Options available for selection. Users can choose only one option from this list.
|
|
282
324
|
* @minSize 1
|
|
283
325
|
* @maxSize 100
|
|
284
326
|
*/
|
|
285
327
|
options?: Option[];
|
|
286
|
-
/**
|
|
328
|
+
/** When present, allows users to provide a custom value not in the predefined options list. */
|
|
287
329
|
allowedCustomValue?: CustomValue;
|
|
288
330
|
}
|
|
331
|
+
/** Error information when processing fails or validation errors occur. */
|
|
289
332
|
interface ErrorDetails {
|
|
290
333
|
/**
|
|
291
|
-
* Error message
|
|
334
|
+
* Error message detailing what went wrong during processing.
|
|
335
|
+
* For display to the user when the AI cannot process their input or when validation fails.
|
|
292
336
|
* @minLength 1
|
|
293
337
|
* @maxLength 1000
|
|
294
338
|
*/
|
|
295
339
|
messageText?: string;
|
|
296
340
|
}
|
|
341
|
+
/** Form submission confirmation containing submission and checkout information. */
|
|
297
342
|
interface SubmissionDetails {
|
|
298
343
|
/**
|
|
299
|
-
*
|
|
344
|
+
* Form submission ID created when the form is successfully completed and submitted.
|
|
300
345
|
* @format GUID
|
|
301
346
|
*/
|
|
302
347
|
submissionId?: string;
|
|
303
348
|
/**
|
|
304
|
-
*
|
|
349
|
+
* Wix eCommerce checkout ID when the form includes payment processing.
|
|
350
|
+
* Only present for forms that have payment fields or are connected to eCommerce flows.
|
|
305
351
|
* @format GUID
|
|
306
352
|
* @readonly
|
|
307
353
|
*/
|
|
308
354
|
checkoutId?: string | null;
|
|
309
355
|
}
|
|
356
|
+
/** Important contextual information that may influence data extraction or user decisions. */
|
|
310
357
|
interface ImportantTextDetails {
|
|
311
358
|
/**
|
|
312
|
-
*
|
|
359
|
+
* Form field identifier that this important information relates to.
|
|
313
360
|
* @minLength 1
|
|
314
361
|
* @maxLength 200
|
|
315
362
|
*/
|
|
316
363
|
fieldTarget?: string;
|
|
317
364
|
/**
|
|
318
|
-
* Important
|
|
365
|
+
* Important contextual information to highlight for the user.
|
|
366
|
+
* This might include validation requirements, format expectations, or clarifying questions.
|
|
319
367
|
* @minLength 1
|
|
320
368
|
* @maxLength 10000
|
|
321
369
|
*/
|
|
322
370
|
text?: string;
|
|
323
371
|
}
|
|
372
|
+
/** Diagnostic information for development and troubleshooting. */
|
|
324
373
|
interface DebugDetails {
|
|
325
|
-
/**
|
|
374
|
+
/**
|
|
375
|
+
* Diagnostic data for development and troubleshooting.
|
|
376
|
+
* Contains information such as AI tools called, processing times, and internal state.
|
|
377
|
+
*/
|
|
326
378
|
data?: Record<string, any> | null;
|
|
327
379
|
}
|
|
380
|
+
/** Stream completion signal indicating the end of a response stream. */
|
|
328
381
|
interface EndOfResponseDetails {
|
|
329
|
-
/**
|
|
382
|
+
/**
|
|
383
|
+
* Whether the response stream completed successfully.
|
|
384
|
+
* When `false`, there may have been processing errors or interruptions.
|
|
385
|
+
*/
|
|
330
386
|
success?: boolean;
|
|
331
387
|
}
|
|
388
|
+
/** Interactive prompt for file upload input. */
|
|
332
389
|
interface FileUploadDetails {
|
|
333
390
|
/**
|
|
334
|
-
*
|
|
391
|
+
* Form field identifier for the file upload input.
|
|
335
392
|
* @minLength 1
|
|
336
393
|
* @maxLength 200
|
|
337
394
|
*/
|
|
338
395
|
fieldTarget?: string;
|
|
339
396
|
}
|
|
397
|
+
/** Interactive prompt for digital signature capture. */
|
|
340
398
|
interface SignatureDetails {
|
|
341
399
|
/**
|
|
342
|
-
*
|
|
400
|
+
* Form field identifier for the digital signature input.
|
|
343
401
|
* @minLength 1
|
|
344
402
|
* @maxLength 200
|
|
345
403
|
*/
|
|
346
404
|
fieldTarget?: string;
|
|
347
405
|
}
|
|
406
|
+
/** Indicates which portion of user input was meaningful for data extraction. */
|
|
348
407
|
interface MeaningfulInput {
|
|
349
408
|
/**
|
|
350
|
-
* Character
|
|
409
|
+
* Character position (0-indexed) where the meaningful portion of user input begins.
|
|
351
410
|
* @max 10000
|
|
352
411
|
*/
|
|
353
412
|
startOffset?: number;
|
|
354
413
|
/**
|
|
355
|
-
* Length of the meaningful
|
|
414
|
+
* Length in characters of the meaningful portion of user input.
|
|
415
|
+
* Use this with `startOffset` to highlight the relevant text that was processed for data extraction.
|
|
356
416
|
* @max 10000
|
|
357
417
|
*/
|
|
358
418
|
length?: number;
|
|
359
419
|
}
|
|
360
420
|
interface CreateInteractiveFormSessionStreamedRequest {
|
|
361
421
|
/**
|
|
362
|
-
*
|
|
422
|
+
* Form ID to create an interactive session for.
|
|
363
423
|
* @format GUID
|
|
364
424
|
*/
|
|
365
425
|
formId: string;
|
|
366
426
|
/**
|
|
367
|
-
* ID
|
|
427
|
+
* Custom prompt ID to use for the AI assistant's conversation style and behavior.
|
|
428
|
+
* When not provided, uses the form's default chat settings configured in the Chat Settings API.
|
|
368
429
|
* @format GUID
|
|
369
430
|
*/
|
|
370
431
|
promptId?: string | null;
|
|
371
|
-
/**
|
|
432
|
+
/**
|
|
433
|
+
* Pre-filled values to apply to the form, to initialize the session with existing data.
|
|
434
|
+
* Field keys must match the form schema field names.
|
|
435
|
+
* For example: `{"firstName": "John", "email": "john@example.com", "age": 25}`.
|
|
436
|
+
* These values are merged with any data extracted during the conversation.
|
|
437
|
+
*/
|
|
372
438
|
currentValues?: Record<string, any> | null;
|
|
373
439
|
/**
|
|
374
|
-
*
|
|
440
|
+
* Whether the session should run in dry run mode when no actual form submission occurs.
|
|
441
|
+
* In dry run mode, the full conversational flow works normally and form data is extracted,
|
|
442
|
+
* but no actual form submission occurs.
|
|
443
|
+
*
|
|
444
|
+
* Default: `false`
|
|
375
445
|
* @immutable
|
|
376
446
|
*/
|
|
377
447
|
dryRun?: boolean;
|
|
378
448
|
/**
|
|
379
|
-
* Current date
|
|
449
|
+
* Current date and time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC format.
|
|
450
|
+
* For example, `2023-10-01T12:00:00Z`.
|
|
451
|
+
* If not provided, server time is used.
|
|
380
452
|
* @minLength 1
|
|
381
453
|
* @maxLength 200
|
|
382
454
|
*/
|
|
383
455
|
currentTime?: string | null;
|
|
384
|
-
/**
|
|
456
|
+
/** Caller's local date and time. */
|
|
385
457
|
clientTime?: ClientTime;
|
|
386
458
|
}
|
|
387
459
|
interface CreateInteractiveFormSessionStreamedResponse {
|
|
388
|
-
/**
|
|
460
|
+
/**
|
|
461
|
+
* AI assistant response chunk, streamed in real-time.
|
|
462
|
+
* Process each chunk as it arrives to provide progressive user feedback.
|
|
463
|
+
*/
|
|
389
464
|
responseChunk?: InteractiveFormSessionResponseChunk;
|
|
390
|
-
/**
|
|
465
|
+
/**
|
|
466
|
+
* Information about the created interactive form session.
|
|
467
|
+
* Only included in the first chunk of the stream to provide session details immediately.
|
|
468
|
+
*/
|
|
391
469
|
interactiveFormSession?: InteractiveFormSession;
|
|
392
470
|
}
|
|
393
471
|
interface SendUserMessageRequest {
|
|
394
472
|
/**
|
|
395
|
-
* Interactive form session
|
|
473
|
+
* Interactive form session ID to send the message to.
|
|
396
474
|
* @format GUID
|
|
397
475
|
*/
|
|
398
476
|
interactiveFormSessionId: string;
|
|
399
477
|
/**
|
|
400
|
-
* User
|
|
478
|
+
* User's natural language input.
|
|
479
|
+
* The AI assistant analyzes this text to extract form field data and determine the next conversation step.
|
|
480
|
+
* Maximum length: 10,000 characters.
|
|
401
481
|
* @maxLength 10000
|
|
402
482
|
*/
|
|
403
483
|
input?: string | null;
|
|
404
484
|
/**
|
|
405
|
-
*
|
|
406
|
-
*
|
|
407
|
-
*
|
|
408
|
-
* "
|
|
409
|
-
* it will override the existing value.
|
|
485
|
+
* Form field values to apply to the session.
|
|
486
|
+
* Use this to update form data from other sources while the conversation is ongoing.
|
|
487
|
+
* These values override any existing data for the same field keys.
|
|
488
|
+
* For example: `{"lastName": "Smith", "phoneNumber": "+1234567890"}`.
|
|
410
489
|
*/
|
|
411
490
|
currentValues?: Record<string, any> | null;
|
|
412
491
|
}
|
|
413
492
|
interface SendUserMessageResponse {
|
|
414
|
-
/**
|
|
493
|
+
/** Updated interactive form session after the user input is processed. */
|
|
415
494
|
interactiveFormSession?: InteractiveFormSession;
|
|
416
|
-
/**
|
|
495
|
+
/**
|
|
496
|
+
* AI assistant response chunks generated from processing the user's message.
|
|
497
|
+
* These can include extracted data, follow-up questions, input prompts, or submission confirmation.
|
|
498
|
+
*/
|
|
417
499
|
responseChunks?: InteractiveFormSessionResponseChunk[];
|
|
418
500
|
}
|
|
419
501
|
interface SendUserMessageStreamedRequest {
|
|
420
502
|
/**
|
|
421
|
-
* Interactive form session
|
|
503
|
+
* Interactive form session ID to send the message to.
|
|
422
504
|
* @format GUID
|
|
423
505
|
*/
|
|
424
506
|
interactiveFormSessionId: string;
|
|
425
507
|
/**
|
|
426
|
-
* User
|
|
508
|
+
* User's natural language input to process.
|
|
509
|
+
* The AI assistant analyzes this text to extract form field data and determine the next conversation step.
|
|
427
510
|
* @maxLength 10000
|
|
428
511
|
*/
|
|
429
512
|
input?: string | null;
|
|
430
513
|
/**
|
|
431
|
-
*
|
|
432
|
-
*
|
|
433
|
-
*
|
|
434
|
-
* "
|
|
435
|
-
* it will override the existing value.
|
|
514
|
+
* Form field values to apply to the session.
|
|
515
|
+
* Use this to update form data from other sources while the conversation is ongoing.
|
|
516
|
+
* These values override any existing data for the same field keys.
|
|
517
|
+
* For example: `{"lastName": "Smith", "phoneNumber": "+1234567890"}`.
|
|
436
518
|
*/
|
|
437
519
|
currentValues?: Record<string, any> | null;
|
|
438
520
|
}
|
|
439
521
|
interface SendUserMessageStreamedResponse {
|
|
440
|
-
/**
|
|
522
|
+
/** AI assistant response chunk streamed in real-time as the message is processed. */
|
|
441
523
|
responseChunk?: InteractiveFormSessionResponseChunk;
|
|
442
|
-
/**
|
|
524
|
+
/**
|
|
525
|
+
* Updated interactive form session information.
|
|
526
|
+
* Included in response chunks to provide current session state.
|
|
527
|
+
*/
|
|
443
528
|
interactiveFormSession?: InteractiveFormSession;
|
|
444
529
|
}
|
|
445
530
|
interface ConverseRequest extends ConverseRequestRequestOneOf {
|
|
@@ -474,11 +559,6 @@ interface GetStateRequest {
|
|
|
474
559
|
* @format GUID
|
|
475
560
|
*/
|
|
476
561
|
interactiveFormSessionId?: string;
|
|
477
|
-
/**
|
|
478
|
-
* System prompt ID
|
|
479
|
-
* @format GUID
|
|
480
|
-
*/
|
|
481
|
-
promptId?: string;
|
|
482
562
|
}
|
|
483
563
|
interface CallToolsRequest {
|
|
484
564
|
/**
|
|
@@ -657,11 +737,17 @@ interface ContextMessageOptionsOneOf {
|
|
|
657
737
|
developerOptions?: DeveloperOptions;
|
|
658
738
|
}
|
|
659
739
|
declare enum Role {
|
|
740
|
+
/** Unknown message role. */
|
|
660
741
|
UNKNOWN_ROLE = "UNKNOWN_ROLE",
|
|
742
|
+
/** Message from the user. */
|
|
661
743
|
USER = "USER",
|
|
744
|
+
/** Message from the AI assistant. */
|
|
662
745
|
ASSISTANT = "ASSISTANT",
|
|
746
|
+
/** Function call message. */
|
|
663
747
|
FUNCTION_CALL = "FUNCTION_CALL",
|
|
748
|
+
/** Function call output message. */
|
|
664
749
|
FUNCTION_CALL_OUTPUT = "FUNCTION_CALL_OUTPUT",
|
|
750
|
+
/** Message from the developer/system. */
|
|
665
751
|
DEVELOPER = "DEVELOPER"
|
|
666
752
|
}
|
|
667
753
|
/** @enumType */
|
|
@@ -734,7 +820,7 @@ interface Response {
|
|
|
734
820
|
response?: Record<string, any> | null;
|
|
735
821
|
}
|
|
736
822
|
interface AcknowledgmentResponse {
|
|
737
|
-
/**
|
|
823
|
+
/** Whether request processing was successful. */
|
|
738
824
|
success?: boolean;
|
|
739
825
|
}
|
|
740
826
|
interface OutputInteractiveFormSessionStreamedRequest {
|
|
@@ -750,14 +836,15 @@ interface OutputInteractiveFormSessionStreamedResponse {
|
|
|
750
836
|
/** Assistant response chunk for the session */
|
|
751
837
|
responseChunk?: InteractiveFormSessionResponseChunk;
|
|
752
838
|
}
|
|
839
|
+
/** Request to report a conversation for quality assurance. */
|
|
753
840
|
interface ReportConversationRequest {
|
|
754
841
|
/**
|
|
755
|
-
* Interactive form session
|
|
842
|
+
* Interactive form session ID to report.
|
|
756
843
|
* @format GUID
|
|
757
844
|
*/
|
|
758
845
|
interactiveFormSessionId?: string;
|
|
759
846
|
/**
|
|
760
|
-
*
|
|
847
|
+
* Details about the issue or feedback.
|
|
761
848
|
* @minLength 1
|
|
762
849
|
* @maxLength 10000
|
|
763
850
|
*/
|
|
@@ -768,11 +855,12 @@ interface ReportConversationRequest {
|
|
|
768
855
|
*/
|
|
769
856
|
viewerDebugUrl?: string;
|
|
770
857
|
}
|
|
858
|
+
/** Response confirming conversation report submission. */
|
|
771
859
|
interface ReportConversationResponse {
|
|
772
|
-
/**
|
|
860
|
+
/** Whether the report was successfully created. */
|
|
773
861
|
success?: boolean | null;
|
|
774
862
|
/**
|
|
775
|
-
* Error message
|
|
863
|
+
* Error message.
|
|
776
864
|
* @maxLength 10000
|
|
777
865
|
*/
|
|
778
866
|
errorMessage?: string | null;
|
|
@@ -924,48 +1012,54 @@ type SendUserMessageStreamedApplicationErrors = {
|
|
|
924
1012
|
data?: Record<string, any>;
|
|
925
1013
|
};
|
|
926
1014
|
/**
|
|
927
|
-
*
|
|
928
|
-
*
|
|
1015
|
+
* Creates an interactive form session for AI-powered conversational form completion.
|
|
1016
|
+
*
|
|
1017
|
+
* For implementations that require real-time streaming, call [Create Interactive Form Session Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session-streamed) instead.
|
|
1018
|
+
* @param formId - Form ID to create an interactive session for.
|
|
929
1019
|
* @public
|
|
930
1020
|
* @documentationMaturity preview
|
|
931
1021
|
* @requiredField formId
|
|
932
1022
|
* @permissionId WIX_FORMS.CREATE_INTERACTIVE_FORM_SESSION
|
|
933
1023
|
* @applicableIdentity APP
|
|
934
|
-
* @returns
|
|
1024
|
+
* @returns Created interactive form session.
|
|
935
1025
|
* @fqn wix.forms.ai.v1.InteractiveFormSessionsService.CreateInteractiveFormSession
|
|
936
1026
|
*/
|
|
937
1027
|
declare function createInteractiveFormSession(formId: string, options?: CreateInteractiveFormSessionOptions): Promise<NonNullablePaths<InteractiveFormSession, `_id` | `formId`, 2>>;
|
|
938
1028
|
interface CreateInteractiveFormSessionOptions {
|
|
939
1029
|
/**
|
|
940
|
-
* ID
|
|
1030
|
+
* Custom prompt ID to use for the AI assistant's conversation style and behavior.
|
|
1031
|
+
* When not provided, uses the form's default chat settings configured in the Chat Settings API.
|
|
941
1032
|
* @format GUID
|
|
942
1033
|
*/
|
|
943
1034
|
promptId?: string | null;
|
|
944
1035
|
/**
|
|
945
|
-
*
|
|
946
|
-
*
|
|
947
|
-
* For example
|
|
948
|
-
*
|
|
949
|
-
* it will override the existing value.
|
|
1036
|
+
* Pre-filled values to apply to the form, to initialize the session with existing data.
|
|
1037
|
+
* Field keys must match the form schema field names.
|
|
1038
|
+
* For example: `{"firstName": "John", "email": "john@example.com", "age": 25}`.
|
|
1039
|
+
* These values are merged with any data extracted during the conversation.
|
|
950
1040
|
*/
|
|
951
1041
|
currentValues?: Record<string, any> | null;
|
|
952
1042
|
/**
|
|
953
|
-
*
|
|
1043
|
+
* Whether the session should run in dry run mode for testing and preview purposes.
|
|
1044
|
+
* In dry run mode, the full conversational flow works normally and form data is extracted,
|
|
1045
|
+
* but no actual form submission occurs.
|
|
954
1046
|
* @immutable
|
|
955
1047
|
*/
|
|
956
1048
|
dryRun?: boolean;
|
|
957
1049
|
/**
|
|
958
|
-
*
|
|
1050
|
+
* Deprecated, use `clientTime` instead.
|
|
959
1051
|
* @minLength 1
|
|
960
1052
|
* @maxLength 200
|
|
961
1053
|
*/
|
|
962
1054
|
currentTime?: string | null;
|
|
963
|
-
/** Current date-time of api client */
|
|
1055
|
+
/** Current date-time of api client. */
|
|
964
1056
|
clientTime?: ClientTime;
|
|
965
1057
|
}
|
|
966
1058
|
/**
|
|
967
|
-
*
|
|
968
|
-
*
|
|
1059
|
+
* Creates an interactive form session for AI-powered conversational form completion, with real-time streaming.
|
|
1060
|
+
*
|
|
1061
|
+
* For implementations that prefer to wait for the complete response, call [Create Interactive Form Session](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session) instead.
|
|
1062
|
+
* @param formId - Form ID to create an interactive session for.
|
|
969
1063
|
* @public
|
|
970
1064
|
* @documentationMaturity preview
|
|
971
1065
|
* @requiredField formId
|
|
@@ -976,29 +1070,44 @@ interface CreateInteractiveFormSessionOptions {
|
|
|
976
1070
|
declare function createInteractiveFormSessionStreamed(formId: string, options?: CreateInteractiveFormSessionStreamedOptions): Promise<NonNullablePaths<CreateInteractiveFormSessionStreamedResponse, `responseChunk.textDetails.text` | `responseChunk.textDetails.style` | `responseChunk.textDataDetails.fieldTarget` | `responseChunk.textDataDetails.text` | `responseChunk.textDataDetails.displayValue` | `responseChunk.multiSelectInputDetails.fieldTarget` | `responseChunk.multiSelectInputDetails.options` | `responseChunk.multiSelectInputDetails.options.${number}.value` | `responseChunk.multiSelectInputDetails.options.${number}.label` | `responseChunk.multiSelectInputDetails.allowedCustomValue.description` | `responseChunk.numberInputDetails.fieldTarget` | `responseChunk.separatorDetails.type` | `responseChunk.singleSelectInputDetails.fieldTarget` | `responseChunk.singleSelectInputDetails.options` | `responseChunk.errorDetails.messageText` | `responseChunk.submissionDetails.submissionId` | `responseChunk.importantTextDetails.fieldTarget` | `responseChunk.importantTextDetails.text` | `responseChunk.endOfResponseDetails.success` | `responseChunk.fileUploadDetails.fieldTarget` | `responseChunk.signatureDetails.fieldTarget` | `responseChunk.chunkType` | `responseChunk.meaningfulInput.startOffset` | `responseChunk.meaningfulInput.length` | `interactiveFormSession._id` | `interactiveFormSession.formId`, 6>>;
|
|
977
1071
|
interface CreateInteractiveFormSessionStreamedOptions {
|
|
978
1072
|
/**
|
|
979
|
-
* ID
|
|
1073
|
+
* Custom prompt ID to use for the AI assistant's conversation style and behavior.
|
|
1074
|
+
* When not provided, uses the form's default chat settings configured in the Chat Settings API.
|
|
980
1075
|
* @format GUID
|
|
981
1076
|
*/
|
|
982
1077
|
promptId?: string | null;
|
|
983
|
-
/**
|
|
1078
|
+
/**
|
|
1079
|
+
* Pre-filled values to apply to the form, to initialize the session with existing data.
|
|
1080
|
+
* Field keys must match the form schema field names.
|
|
1081
|
+
* For example: `{"firstName": "John", "email": "john@example.com", "age": 25}`.
|
|
1082
|
+
* These values are merged with any data extracted during the conversation.
|
|
1083
|
+
*/
|
|
984
1084
|
currentValues?: Record<string, any> | null;
|
|
985
1085
|
/**
|
|
986
|
-
*
|
|
1086
|
+
* Whether the session should run in dry run mode when no actual form submission occurs.
|
|
1087
|
+
* In dry run mode, the full conversational flow works normally and form data is extracted,
|
|
1088
|
+
* but no actual form submission occurs.
|
|
1089
|
+
*
|
|
1090
|
+
* Default: `false`
|
|
987
1091
|
* @immutable
|
|
988
1092
|
*/
|
|
989
1093
|
dryRun?: boolean;
|
|
990
1094
|
/**
|
|
991
|
-
* Current date
|
|
1095
|
+
* Current date and time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC format.
|
|
1096
|
+
* For example, `2023-10-01T12:00:00Z`.
|
|
1097
|
+
* If not provided, server time is used.
|
|
992
1098
|
* @minLength 1
|
|
993
1099
|
* @maxLength 200
|
|
994
1100
|
*/
|
|
995
1101
|
currentTime?: string | null;
|
|
996
|
-
/**
|
|
1102
|
+
/** Caller's local date and time. */
|
|
997
1103
|
clientTime?: ClientTime;
|
|
998
1104
|
}
|
|
999
1105
|
/**
|
|
1000
|
-
* Sends user message to
|
|
1001
|
-
*
|
|
1106
|
+
* Sends a user message to an existing interactive form session and processes the conversational input.
|
|
1107
|
+
* User messages support up to 10,000 characters.
|
|
1108
|
+
*
|
|
1109
|
+
* For implementations that require real-time streaming, call [Send User Message Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message-streamed) instead.
|
|
1110
|
+
* @param interactiveFormSessionId - Interactive form session ID to send the message to.
|
|
1002
1111
|
* @public
|
|
1003
1112
|
* @documentationMaturity preview
|
|
1004
1113
|
* @requiredField interactiveFormSessionId
|
|
@@ -1011,22 +1120,25 @@ declare function sendUserMessage(interactiveFormSessionId: string, options?: Sen
|
|
|
1011
1120
|
}>;
|
|
1012
1121
|
interface SendUserMessageOptions {
|
|
1013
1122
|
/**
|
|
1014
|
-
* User
|
|
1123
|
+
* User's natural language input.
|
|
1124
|
+
* The AI assistant analyzes this text to extract form field data and determine the next conversation step.
|
|
1125
|
+
* Maximum length: 10,000 characters.
|
|
1015
1126
|
* @maxLength 10000
|
|
1016
1127
|
*/
|
|
1017
1128
|
input?: string | null;
|
|
1018
1129
|
/**
|
|
1019
|
-
*
|
|
1020
|
-
*
|
|
1021
|
-
*
|
|
1022
|
-
* "
|
|
1023
|
-
* it will override the existing value.
|
|
1130
|
+
* Form field values to apply to the session.
|
|
1131
|
+
* Use this to update form data from other sources while the conversation is ongoing.
|
|
1132
|
+
* These values override any existing data for the same field keys.
|
|
1133
|
+
* For example: `{"lastName": "Smith", "phoneNumber": "+1234567890"}`.
|
|
1024
1134
|
*/
|
|
1025
1135
|
currentValues?: Record<string, any> | null;
|
|
1026
1136
|
}
|
|
1027
1137
|
/**
|
|
1028
|
-
* Sends user message to
|
|
1029
|
-
*
|
|
1138
|
+
* Sends a user message to an existing interactive form session and processes the conversational input, with real-time streaming.
|
|
1139
|
+
*
|
|
1140
|
+
* For implementations that prefer to wait for the complete response, call [Send User Message](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message) instead.
|
|
1141
|
+
* @param interactiveFormSessionId - Interactive form session ID to send the message to.
|
|
1030
1142
|
* @public
|
|
1031
1143
|
* @documentationMaturity preview
|
|
1032
1144
|
* @requiredField interactiveFormSessionId
|
|
@@ -1039,16 +1151,16 @@ declare function sendUserMessageStreamed(interactiveFormSessionId: string, optio
|
|
|
1039
1151
|
}>;
|
|
1040
1152
|
interface SendUserMessageStreamedOptions {
|
|
1041
1153
|
/**
|
|
1042
|
-
* User
|
|
1154
|
+
* User's natural language input to process.
|
|
1155
|
+
* The AI assistant analyzes this text to extract form field data and determine the next conversation step.
|
|
1043
1156
|
* @maxLength 10000
|
|
1044
1157
|
*/
|
|
1045
1158
|
input?: string | null;
|
|
1046
1159
|
/**
|
|
1047
|
-
*
|
|
1048
|
-
*
|
|
1049
|
-
*
|
|
1050
|
-
* "
|
|
1051
|
-
* it will override the existing value.
|
|
1160
|
+
* Form field values to apply to the session.
|
|
1161
|
+
* Use this to update form data from other sources while the conversation is ongoing.
|
|
1162
|
+
* These values override any existing data for the same field keys.
|
|
1163
|
+
* For example: `{"lastName": "Smith", "phoneNumber": "+1234567890"}`.
|
|
1052
1164
|
*/
|
|
1053
1165
|
currentValues?: Record<string, any> | null;
|
|
1054
1166
|
}
|