@wix/auto_sdk_forms_interactive-form-sessions 1.0.3 → 1.0.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/build/cjs/index.d.ts +19 -10
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +287 -158
- 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 +19 -10
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +287 -158
- 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 +19 -10
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +287 -158
- 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 +19 -10
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +287 -158
- 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 {
|
|
@@ -652,11 +737,17 @@ interface ContextMessageOptionsOneOf {
|
|
|
652
737
|
developerOptions?: DeveloperOptions;
|
|
653
738
|
}
|
|
654
739
|
declare enum Role {
|
|
740
|
+
/** Unknown message role. */
|
|
655
741
|
UNKNOWN_ROLE = "UNKNOWN_ROLE",
|
|
742
|
+
/** Message from the user. */
|
|
656
743
|
USER = "USER",
|
|
744
|
+
/** Message from the AI assistant. */
|
|
657
745
|
ASSISTANT = "ASSISTANT",
|
|
746
|
+
/** Function call message. */
|
|
658
747
|
FUNCTION_CALL = "FUNCTION_CALL",
|
|
748
|
+
/** Function call output message. */
|
|
659
749
|
FUNCTION_CALL_OUTPUT = "FUNCTION_CALL_OUTPUT",
|
|
750
|
+
/** Message from the developer/system. */
|
|
660
751
|
DEVELOPER = "DEVELOPER"
|
|
661
752
|
}
|
|
662
753
|
/** @enumType */
|
|
@@ -729,7 +820,7 @@ interface Response {
|
|
|
729
820
|
response?: Record<string, any> | null;
|
|
730
821
|
}
|
|
731
822
|
interface AcknowledgmentResponse {
|
|
732
|
-
/**
|
|
823
|
+
/** Whether request processing was successful. */
|
|
733
824
|
success?: boolean;
|
|
734
825
|
}
|
|
735
826
|
interface OutputInteractiveFormSessionStreamedRequest {
|
|
@@ -745,14 +836,15 @@ interface OutputInteractiveFormSessionStreamedResponse {
|
|
|
745
836
|
/** Assistant response chunk for the session */
|
|
746
837
|
responseChunk?: InteractiveFormSessionResponseChunk;
|
|
747
838
|
}
|
|
839
|
+
/** Request to report a conversation for quality assurance. */
|
|
748
840
|
interface ReportConversationRequest {
|
|
749
841
|
/**
|
|
750
|
-
* Interactive form session
|
|
842
|
+
* Interactive form session ID to report.
|
|
751
843
|
* @format GUID
|
|
752
844
|
*/
|
|
753
845
|
interactiveFormSessionId?: string;
|
|
754
846
|
/**
|
|
755
|
-
*
|
|
847
|
+
* Details about the issue or feedback.
|
|
756
848
|
* @minLength 1
|
|
757
849
|
* @maxLength 10000
|
|
758
850
|
*/
|
|
@@ -763,15 +855,28 @@ interface ReportConversationRequest {
|
|
|
763
855
|
*/
|
|
764
856
|
viewerDebugUrl?: string;
|
|
765
857
|
}
|
|
858
|
+
/** Response confirming conversation report submission. */
|
|
766
859
|
interface ReportConversationResponse {
|
|
767
|
-
/**
|
|
860
|
+
/** Whether the report was successfully created. */
|
|
768
861
|
success?: boolean | null;
|
|
769
862
|
/**
|
|
770
|
-
* Error message
|
|
863
|
+
* Error message.
|
|
771
864
|
* @maxLength 10000
|
|
772
865
|
*/
|
|
773
866
|
errorMessage?: string | null;
|
|
774
867
|
}
|
|
868
|
+
/** TEMPORARY: Request message for test error endpoints */
|
|
869
|
+
interface TestErrorRegularRequest {
|
|
870
|
+
}
|
|
871
|
+
/** TEMPORARY: Response message for regular test error endpoint */
|
|
872
|
+
interface TestErrorRegularResponse {
|
|
873
|
+
}
|
|
874
|
+
/** TEMPORARY: Request message for test error endpoints */
|
|
875
|
+
interface TestErrorStreamingRequest {
|
|
876
|
+
}
|
|
877
|
+
/** TEMPORARY: Response message for streaming test error endpoint */
|
|
878
|
+
interface TestErrorStreamingResponse {
|
|
879
|
+
}
|
|
775
880
|
interface DomainEvent extends DomainEventBodyOneOf {
|
|
776
881
|
createdEvent?: EntityCreatedEvent;
|
|
777
882
|
updatedEvent?: EntityUpdatedEvent;
|
|
@@ -919,48 +1024,54 @@ type SendUserMessageStreamedApplicationErrors = {
|
|
|
919
1024
|
data?: Record<string, any>;
|
|
920
1025
|
};
|
|
921
1026
|
/**
|
|
922
|
-
*
|
|
923
|
-
*
|
|
1027
|
+
* Creates an interactive form session for AI-powered conversational form completion.
|
|
1028
|
+
*
|
|
1029
|
+
* 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.
|
|
1030
|
+
* @param formId - Form ID to create an interactive session for.
|
|
924
1031
|
* @public
|
|
925
1032
|
* @documentationMaturity preview
|
|
926
1033
|
* @requiredField formId
|
|
927
1034
|
* @permissionId WIX_FORMS.CREATE_INTERACTIVE_FORM_SESSION
|
|
928
1035
|
* @applicableIdentity APP
|
|
929
|
-
* @returns
|
|
1036
|
+
* @returns Created interactive form session.
|
|
930
1037
|
* @fqn wix.forms.ai.v1.InteractiveFormSessionsService.CreateInteractiveFormSession
|
|
931
1038
|
*/
|
|
932
1039
|
declare function createInteractiveFormSession(formId: string, options?: CreateInteractiveFormSessionOptions): Promise<NonNullablePaths<InteractiveFormSession, `_id` | `formId`, 2>>;
|
|
933
1040
|
interface CreateInteractiveFormSessionOptions {
|
|
934
1041
|
/**
|
|
935
|
-
* ID
|
|
1042
|
+
* Custom prompt ID to use for the AI assistant's conversation style and behavior.
|
|
1043
|
+
* When not provided, uses the form's default chat settings configured in the Chat Settings API.
|
|
936
1044
|
* @format GUID
|
|
937
1045
|
*/
|
|
938
1046
|
promptId?: string | null;
|
|
939
1047
|
/**
|
|
940
|
-
*
|
|
941
|
-
*
|
|
942
|
-
* For example
|
|
943
|
-
*
|
|
944
|
-
* it will override the existing value.
|
|
1048
|
+
* Pre-filled values to apply to the form, to initialize the session with existing data.
|
|
1049
|
+
* Field keys must match the form schema field names.
|
|
1050
|
+
* For example: `{"firstName": "John", "email": "john@example.com", "age": 25}`.
|
|
1051
|
+
* These values are merged with any data extracted during the conversation.
|
|
945
1052
|
*/
|
|
946
1053
|
currentValues?: Record<string, any> | null;
|
|
947
1054
|
/**
|
|
948
|
-
*
|
|
1055
|
+
* Whether the session should run in dry run mode for testing and preview purposes.
|
|
1056
|
+
* In dry run mode, the full conversational flow works normally and form data is extracted,
|
|
1057
|
+
* but no actual form submission occurs.
|
|
949
1058
|
* @immutable
|
|
950
1059
|
*/
|
|
951
1060
|
dryRun?: boolean;
|
|
952
1061
|
/**
|
|
953
|
-
*
|
|
1062
|
+
* Deprecated, use `clientTime` instead.
|
|
954
1063
|
* @minLength 1
|
|
955
1064
|
* @maxLength 200
|
|
956
1065
|
*/
|
|
957
1066
|
currentTime?: string | null;
|
|
958
|
-
/** Current date-time of api client */
|
|
1067
|
+
/** Current date-time of api client. */
|
|
959
1068
|
clientTime?: ClientTime;
|
|
960
1069
|
}
|
|
961
1070
|
/**
|
|
962
|
-
*
|
|
963
|
-
*
|
|
1071
|
+
* Creates an interactive form session for AI-powered conversational form completion, with real-time streaming.
|
|
1072
|
+
*
|
|
1073
|
+
* 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.
|
|
1074
|
+
* @param formId - Form ID to create an interactive session for.
|
|
964
1075
|
* @public
|
|
965
1076
|
* @documentationMaturity preview
|
|
966
1077
|
* @requiredField formId
|
|
@@ -971,29 +1082,44 @@ interface CreateInteractiveFormSessionOptions {
|
|
|
971
1082
|
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>>;
|
|
972
1083
|
interface CreateInteractiveFormSessionStreamedOptions {
|
|
973
1084
|
/**
|
|
974
|
-
* ID
|
|
1085
|
+
* Custom prompt ID to use for the AI assistant's conversation style and behavior.
|
|
1086
|
+
* When not provided, uses the form's default chat settings configured in the Chat Settings API.
|
|
975
1087
|
* @format GUID
|
|
976
1088
|
*/
|
|
977
1089
|
promptId?: string | null;
|
|
978
|
-
/**
|
|
1090
|
+
/**
|
|
1091
|
+
* Pre-filled values to apply to the form, to initialize the session with existing data.
|
|
1092
|
+
* Field keys must match the form schema field names.
|
|
1093
|
+
* For example: `{"firstName": "John", "email": "john@example.com", "age": 25}`.
|
|
1094
|
+
* These values are merged with any data extracted during the conversation.
|
|
1095
|
+
*/
|
|
979
1096
|
currentValues?: Record<string, any> | null;
|
|
980
1097
|
/**
|
|
981
|
-
*
|
|
1098
|
+
* Whether the session should run in dry run mode when no actual form submission occurs.
|
|
1099
|
+
* In dry run mode, the full conversational flow works normally and form data is extracted,
|
|
1100
|
+
* but no actual form submission occurs.
|
|
1101
|
+
*
|
|
1102
|
+
* Default: `false`
|
|
982
1103
|
* @immutable
|
|
983
1104
|
*/
|
|
984
1105
|
dryRun?: boolean;
|
|
985
1106
|
/**
|
|
986
|
-
* Current date
|
|
1107
|
+
* Current date and time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC format.
|
|
1108
|
+
* For example, `2023-10-01T12:00:00Z`.
|
|
1109
|
+
* If not provided, server time is used.
|
|
987
1110
|
* @minLength 1
|
|
988
1111
|
* @maxLength 200
|
|
989
1112
|
*/
|
|
990
1113
|
currentTime?: string | null;
|
|
991
|
-
/**
|
|
1114
|
+
/** Caller's local date and time. */
|
|
992
1115
|
clientTime?: ClientTime;
|
|
993
1116
|
}
|
|
994
1117
|
/**
|
|
995
|
-
* Sends user message to
|
|
996
|
-
*
|
|
1118
|
+
* Sends a user message to an existing interactive form session and processes the conversational input.
|
|
1119
|
+
* User messages support up to 10,000 characters.
|
|
1120
|
+
*
|
|
1121
|
+
* 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.
|
|
1122
|
+
* @param interactiveFormSessionId - Interactive form session ID to send the message to.
|
|
997
1123
|
* @public
|
|
998
1124
|
* @documentationMaturity preview
|
|
999
1125
|
* @requiredField interactiveFormSessionId
|
|
@@ -1006,22 +1132,25 @@ declare function sendUserMessage(interactiveFormSessionId: string, options?: Sen
|
|
|
1006
1132
|
}>;
|
|
1007
1133
|
interface SendUserMessageOptions {
|
|
1008
1134
|
/**
|
|
1009
|
-
* User
|
|
1135
|
+
* User's natural language input.
|
|
1136
|
+
* The AI assistant analyzes this text to extract form field data and determine the next conversation step.
|
|
1137
|
+
* Maximum length: 10,000 characters.
|
|
1010
1138
|
* @maxLength 10000
|
|
1011
1139
|
*/
|
|
1012
1140
|
input?: string | null;
|
|
1013
1141
|
/**
|
|
1014
|
-
*
|
|
1015
|
-
*
|
|
1016
|
-
*
|
|
1017
|
-
* "
|
|
1018
|
-
* it will override the existing value.
|
|
1142
|
+
* Form field values to apply to the session.
|
|
1143
|
+
* Use this to update form data from other sources while the conversation is ongoing.
|
|
1144
|
+
* These values override any existing data for the same field keys.
|
|
1145
|
+
* For example: `{"lastName": "Smith", "phoneNumber": "+1234567890"}`.
|
|
1019
1146
|
*/
|
|
1020
1147
|
currentValues?: Record<string, any> | null;
|
|
1021
1148
|
}
|
|
1022
1149
|
/**
|
|
1023
|
-
* Sends user message to
|
|
1024
|
-
*
|
|
1150
|
+
* Sends a user message to an existing interactive form session and processes the conversational input, with real-time streaming.
|
|
1151
|
+
*
|
|
1152
|
+
* 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.
|
|
1153
|
+
* @param interactiveFormSessionId - Interactive form session ID to send the message to.
|
|
1025
1154
|
* @public
|
|
1026
1155
|
* @documentationMaturity preview
|
|
1027
1156
|
* @requiredField interactiveFormSessionId
|
|
@@ -1034,18 +1163,18 @@ declare function sendUserMessageStreamed(interactiveFormSessionId: string, optio
|
|
|
1034
1163
|
}>;
|
|
1035
1164
|
interface SendUserMessageStreamedOptions {
|
|
1036
1165
|
/**
|
|
1037
|
-
* User
|
|
1166
|
+
* User's natural language input to process.
|
|
1167
|
+
* The AI assistant analyzes this text to extract form field data and determine the next conversation step.
|
|
1038
1168
|
* @maxLength 10000
|
|
1039
1169
|
*/
|
|
1040
1170
|
input?: string | null;
|
|
1041
1171
|
/**
|
|
1042
|
-
*
|
|
1043
|
-
*
|
|
1044
|
-
*
|
|
1045
|
-
* "
|
|
1046
|
-
* it will override the existing value.
|
|
1172
|
+
* Form field values to apply to the session.
|
|
1173
|
+
* Use this to update form data from other sources while the conversation is ongoing.
|
|
1174
|
+
* These values override any existing data for the same field keys.
|
|
1175
|
+
* For example: `{"lastName": "Smith", "phoneNumber": "+1234567890"}`.
|
|
1047
1176
|
*/
|
|
1048
1177
|
currentValues?: Record<string, any> | null;
|
|
1049
1178
|
}
|
|
1050
1179
|
|
|
1051
|
-
export { type AcknowledgmentResponse, type ActionEvent, type AssistantOptions, type Call, type CallToolsRequest, type CallToolsResponse, ChunkType, type ChunkTypeWithLiterals, type ClientTime, type ContextMessage, type ContextMessageOptionsOneOf, type ConverseRequest, type ConverseRequestRequestOneOf, type ConverseResponse, type ConverseResponseResponseOneOf, type CreateInteractiveFormSessionOptions, type CreateInteractiveFormSessionRequest, type CreateInteractiveFormSessionResponse, type CreateInteractiveFormSessionStreamedOptions, type CreateInteractiveFormSessionStreamedRequest, type CreateInteractiveFormSessionStreamedResponse, type CustomValue, type DebugDetails, type DeveloperOptions, type DomainEvent, type DomainEventBodyOneOf, type EndOfResponseDetails, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ErrorDetails, type FileUploadDetails, type FunctionCallOptions, type FunctionCallOutputOptions, type GetStateRequest, type GetStateResponse, type IdentificationData, type IdentificationDataIdOneOf, type ImportantTextDetails, type InteractiveFormSession, type InteractiveFormSessionResponseChunk, type InteractiveFormSessionResponseChunkOfOneOf, type MeaningfulInput, type MessageEnvelope, type MultiSelectInputDetails, type NumberInputDetails, type NumberRangeLimit, type NumberRangeLimitEndOneOf, type Option, type OutputInteractiveFormSessionStreamedRequest, type OutputInteractiveFormSessionStreamedResponse, type RelayAssistantMessageRequest, type ReportConversationRequest, type ReportConversationResponse, type Response, type RestoreInfo, Role, type RoleWithLiterals, type SendUserMessageApplicationErrors, type SendUserMessageOptions, type SendUserMessageRequest, type SendUserMessageResponse, type SendUserMessageStreamedApplicationErrors, type SendUserMessageStreamedOptions, type SendUserMessageStreamedRequest, type SendUserMessageStreamedResponse, type SeparatorDetails, type SignatureDetails, type SingleSelectInputDetails, Style, type StyleWithLiterals, type SubmissionDetails, type TextDataDetails, type TextDetails, type Tool, Type, type TypeWithLiterals, type Usage, type UsageRequest, type UserOptions, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createInteractiveFormSession, createInteractiveFormSessionStreamed, sendUserMessage, sendUserMessageStreamed };
|
|
1180
|
+
export { type AcknowledgmentResponse, type ActionEvent, type AssistantOptions, type Call, type CallToolsRequest, type CallToolsResponse, ChunkType, type ChunkTypeWithLiterals, type ClientTime, type ContextMessage, type ContextMessageOptionsOneOf, type ConverseRequest, type ConverseRequestRequestOneOf, type ConverseResponse, type ConverseResponseResponseOneOf, type CreateInteractiveFormSessionOptions, type CreateInteractiveFormSessionRequest, type CreateInteractiveFormSessionResponse, type CreateInteractiveFormSessionStreamedOptions, type CreateInteractiveFormSessionStreamedRequest, type CreateInteractiveFormSessionStreamedResponse, type CustomValue, type DebugDetails, type DeveloperOptions, type DomainEvent, type DomainEventBodyOneOf, type EndOfResponseDetails, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ErrorDetails, type FileUploadDetails, type FunctionCallOptions, type FunctionCallOutputOptions, type GetStateRequest, type GetStateResponse, type IdentificationData, type IdentificationDataIdOneOf, type ImportantTextDetails, type InteractiveFormSession, type InteractiveFormSessionResponseChunk, type InteractiveFormSessionResponseChunkOfOneOf, type MeaningfulInput, type MessageEnvelope, type MultiSelectInputDetails, type NumberInputDetails, type NumberRangeLimit, type NumberRangeLimitEndOneOf, type Option, type OutputInteractiveFormSessionStreamedRequest, type OutputInteractiveFormSessionStreamedResponse, type RelayAssistantMessageRequest, type ReportConversationRequest, type ReportConversationResponse, type Response, type RestoreInfo, Role, type RoleWithLiterals, type SendUserMessageApplicationErrors, type SendUserMessageOptions, type SendUserMessageRequest, type SendUserMessageResponse, type SendUserMessageStreamedApplicationErrors, type SendUserMessageStreamedOptions, type SendUserMessageStreamedRequest, type SendUserMessageStreamedResponse, type SeparatorDetails, type SignatureDetails, type SingleSelectInputDetails, Style, type StyleWithLiterals, type SubmissionDetails, type TestErrorRegularRequest, type TestErrorRegularResponse, type TestErrorStreamingRequest, type TestErrorStreamingResponse, type TextDataDetails, type TextDetails, type Tool, Type, type TypeWithLiterals, type Usage, type UsageRequest, type UserOptions, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createInteractiveFormSession, createInteractiveFormSessionStreamed, sendUserMessage, sendUserMessageStreamed };
|