@wix/auto_sdk_forms_interactive-form-sessions 1.0.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/build/cjs/index.d.ts +56 -0
- package/build/cjs/index.js +538 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1082 -0
- package/build/cjs/index.typings.js +489 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +494 -0
- package/build/cjs/meta.js +357 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +56 -0
- package/build/es/index.mjs +505 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +1082 -0
- package/build/es/index.typings.mjs +456 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +494 -0
- package/build/es/meta.mjs +326 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +56 -0
- package/build/internal/cjs/index.js +538 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1082 -0
- package/build/internal/cjs/index.typings.js +489 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +494 -0
- package/build/internal/cjs/meta.js +357 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/es/index.d.mts +56 -0
- package/build/internal/es/index.mjs +505 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +1082 -0
- package/build/internal/es/index.typings.mjs +456 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +494 -0
- package/build/internal/es/meta.mjs +326 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +54 -0
|
@@ -0,0 +1,489 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// index.typings.ts
|
|
21
|
+
var index_typings_exports = {};
|
|
22
|
+
__export(index_typings_exports, {
|
|
23
|
+
ChunkType: () => ChunkType,
|
|
24
|
+
Role: () => Role,
|
|
25
|
+
Style: () => Style,
|
|
26
|
+
Type: () => Type,
|
|
27
|
+
WebhookIdentityType: () => WebhookIdentityType,
|
|
28
|
+
createInteractiveFormSession: () => createInteractiveFormSession2,
|
|
29
|
+
createInteractiveFormSessionStreamed: () => createInteractiveFormSessionStreamed2,
|
|
30
|
+
reportConversation: () => reportConversation2,
|
|
31
|
+
sendUserMessage: () => sendUserMessage2,
|
|
32
|
+
sendUserMessageStreamed: () => sendUserMessageStreamed2
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(index_typings_exports);
|
|
35
|
+
|
|
36
|
+
// src/forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.ts
|
|
37
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
38
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
39
|
+
|
|
40
|
+
// src/forms-ai-v1-interactive-form-session-interactive-form-sessions.http.ts
|
|
41
|
+
var import_float = require("@wix/sdk-runtime/transformations/float");
|
|
42
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
43
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
44
|
+
function resolveWixFormsAiV1InteractiveFormSessionsServiceUrl(opts) {
|
|
45
|
+
const domainToMappings = {
|
|
46
|
+
"bo._base_domain_": [
|
|
47
|
+
{
|
|
48
|
+
srcPath: "/_api/form-ai-assistant",
|
|
49
|
+
destPath: ""
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"wixbo.ai": [
|
|
53
|
+
{
|
|
54
|
+
srcPath: "/_api/form-ai-assistant",
|
|
55
|
+
destPath: ""
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"wix-bo.com": [
|
|
59
|
+
{
|
|
60
|
+
srcPath: "/_api/form-ai-assistant",
|
|
61
|
+
destPath: ""
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"*.wixforms.com": [
|
|
65
|
+
{
|
|
66
|
+
srcPath: "/_api/form-ai-assistant",
|
|
67
|
+
destPath: ""
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"manage._base_domain_": [
|
|
71
|
+
{
|
|
72
|
+
srcPath: "/_api/form-ai-assistant",
|
|
73
|
+
destPath: ""
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
_: [
|
|
77
|
+
{
|
|
78
|
+
srcPath: "/_api/form-ai-assistant",
|
|
79
|
+
destPath: ""
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"www.wixapis.com": [
|
|
83
|
+
{
|
|
84
|
+
srcPath: "/forms/ai/v1/chat-settings",
|
|
85
|
+
destPath: "/v1/chat-settings"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"*.dev.wix-code.com": [
|
|
89
|
+
{
|
|
90
|
+
srcPath: "/_api/form-ai-assistant",
|
|
91
|
+
destPath: ""
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
};
|
|
95
|
+
return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
96
|
+
}
|
|
97
|
+
var PACKAGE_NAME = "@wix/auto_sdk_forms_interactive-form-sessions";
|
|
98
|
+
function createInteractiveFormSession(payload) {
|
|
99
|
+
function __createInteractiveFormSession({ host }) {
|
|
100
|
+
const metadata = {
|
|
101
|
+
entityFqdn: "wix.forms.ai.v1.interactive_form_session",
|
|
102
|
+
method: "POST",
|
|
103
|
+
methodFqn: "wix.forms.ai.v1.InteractiveFormSessionsService.CreateInteractiveFormSession",
|
|
104
|
+
packageName: PACKAGE_NAME,
|
|
105
|
+
url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({
|
|
106
|
+
protoPath: "/v1/interactive-form-sessions",
|
|
107
|
+
data: payload,
|
|
108
|
+
host
|
|
109
|
+
}),
|
|
110
|
+
data: payload,
|
|
111
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
112
|
+
{
|
|
113
|
+
transformFn: import_float.transformRESTFloatToSDKFloat,
|
|
114
|
+
paths: [
|
|
115
|
+
{ path: "responseChunks.numberInputDetails.multipleOf" },
|
|
116
|
+
{
|
|
117
|
+
path: "responseChunks.numberInputDetails.rangeLimit.maxInclusiveValue"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
path: "responseChunks.numberInputDetails.rangeLimit.maxExclusiveValue"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
path: "responseChunks.numberInputDetails.rangeLimit.minInclusiveValue"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
])
|
|
128
|
+
};
|
|
129
|
+
return metadata;
|
|
130
|
+
}
|
|
131
|
+
return __createInteractiveFormSession;
|
|
132
|
+
}
|
|
133
|
+
function createInteractiveFormSessionStreamed(payload) {
|
|
134
|
+
function __createInteractiveFormSessionStreamed({ host }) {
|
|
135
|
+
const metadata = {
|
|
136
|
+
entityFqdn: "wix.forms.ai.v1.interactive_form_session",
|
|
137
|
+
method: "POST",
|
|
138
|
+
methodFqn: "wix.forms.ai.v1.InteractiveFormSessionsService.CreateInteractiveFormSessionStreamed",
|
|
139
|
+
packageName: PACKAGE_NAME,
|
|
140
|
+
url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({
|
|
141
|
+
protoPath: "/v1/interactive-form-sessions/create-streamed",
|
|
142
|
+
data: payload,
|
|
143
|
+
host
|
|
144
|
+
}),
|
|
145
|
+
data: payload,
|
|
146
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
147
|
+
{
|
|
148
|
+
transformFn: import_float.transformRESTFloatToSDKFloat,
|
|
149
|
+
paths: [
|
|
150
|
+
{ path: "responseChunk.numberInputDetails.multipleOf" },
|
|
151
|
+
{
|
|
152
|
+
path: "responseChunk.numberInputDetails.rangeLimit.maxInclusiveValue"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
path: "responseChunk.numberInputDetails.rangeLimit.maxExclusiveValue"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
path: "responseChunk.numberInputDetails.rangeLimit.minInclusiveValue"
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
])
|
|
163
|
+
};
|
|
164
|
+
return metadata;
|
|
165
|
+
}
|
|
166
|
+
return __createInteractiveFormSessionStreamed;
|
|
167
|
+
}
|
|
168
|
+
function sendUserMessage(payload) {
|
|
169
|
+
function __sendUserMessage({ host }) {
|
|
170
|
+
const metadata = {
|
|
171
|
+
entityFqdn: "wix.forms.ai.v1.interactive_form_session",
|
|
172
|
+
method: "POST",
|
|
173
|
+
methodFqn: "wix.forms.ai.v1.InteractiveFormSessionsService.SendUserMessage",
|
|
174
|
+
packageName: PACKAGE_NAME,
|
|
175
|
+
url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({
|
|
176
|
+
protoPath: "/v1/interactive-form-sessions/{interactiveFormSessionId}/send-user-message",
|
|
177
|
+
data: payload,
|
|
178
|
+
host
|
|
179
|
+
}),
|
|
180
|
+
data: payload,
|
|
181
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
182
|
+
{
|
|
183
|
+
transformFn: import_float.transformRESTFloatToSDKFloat,
|
|
184
|
+
paths: [
|
|
185
|
+
{ path: "responseChunks.numberInputDetails.multipleOf" },
|
|
186
|
+
{
|
|
187
|
+
path: "responseChunks.numberInputDetails.rangeLimit.maxInclusiveValue"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
path: "responseChunks.numberInputDetails.rangeLimit.maxExclusiveValue"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
path: "responseChunks.numberInputDetails.rangeLimit.minInclusiveValue"
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
])
|
|
198
|
+
};
|
|
199
|
+
return metadata;
|
|
200
|
+
}
|
|
201
|
+
return __sendUserMessage;
|
|
202
|
+
}
|
|
203
|
+
function sendUserMessageStreamed(payload) {
|
|
204
|
+
function __sendUserMessageStreamed({ host }) {
|
|
205
|
+
const metadata = {
|
|
206
|
+
entityFqdn: "wix.forms.ai.v1.interactive_form_session",
|
|
207
|
+
method: "POST",
|
|
208
|
+
methodFqn: "wix.forms.ai.v1.InteractiveFormSessionsService.SendUserMessageStreamed",
|
|
209
|
+
packageName: PACKAGE_NAME,
|
|
210
|
+
url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({
|
|
211
|
+
protoPath: "/v1/interactive-form-sessions/{interactiveFormSessionId}/send-user-message-streamed",
|
|
212
|
+
data: payload,
|
|
213
|
+
host
|
|
214
|
+
}),
|
|
215
|
+
data: payload,
|
|
216
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
217
|
+
{
|
|
218
|
+
transformFn: import_float.transformRESTFloatToSDKFloat,
|
|
219
|
+
paths: [
|
|
220
|
+
{ path: "responseChunk.numberInputDetails.multipleOf" },
|
|
221
|
+
{
|
|
222
|
+
path: "responseChunk.numberInputDetails.rangeLimit.maxInclusiveValue"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
path: "responseChunk.numberInputDetails.rangeLimit.maxExclusiveValue"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
path: "responseChunk.numberInputDetails.rangeLimit.minInclusiveValue"
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
])
|
|
233
|
+
};
|
|
234
|
+
return metadata;
|
|
235
|
+
}
|
|
236
|
+
return __sendUserMessageStreamed;
|
|
237
|
+
}
|
|
238
|
+
function reportConversation(payload) {
|
|
239
|
+
function __reportConversation({ host }) {
|
|
240
|
+
const metadata = {
|
|
241
|
+
entityFqdn: "wix.forms.ai.v1.interactive_form_session",
|
|
242
|
+
method: "POST",
|
|
243
|
+
methodFqn: "wix.forms.ai.v1.InteractiveFormSessionsService.ReportConversation",
|
|
244
|
+
packageName: PACKAGE_NAME,
|
|
245
|
+
url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({
|
|
246
|
+
protoPath: "/v1/interactive-form-sessions/report",
|
|
247
|
+
data: payload,
|
|
248
|
+
host
|
|
249
|
+
}),
|
|
250
|
+
data: payload
|
|
251
|
+
};
|
|
252
|
+
return metadata;
|
|
253
|
+
}
|
|
254
|
+
return __reportConversation;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// src/forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.ts
|
|
258
|
+
var ChunkType = /* @__PURE__ */ ((ChunkType2) => {
|
|
259
|
+
ChunkType2["UNKNOWN_CHUNK_TYPE"] = "UNKNOWN_CHUNK_TYPE";
|
|
260
|
+
ChunkType2["TEXT"] = "TEXT";
|
|
261
|
+
ChunkType2["TEXT_DATA"] = "TEXT_DATA";
|
|
262
|
+
ChunkType2["MULTI_SELECT_INPUT"] = "MULTI_SELECT_INPUT";
|
|
263
|
+
ChunkType2["NUMBER_INPUT"] = "NUMBER_INPUT";
|
|
264
|
+
ChunkType2["SEPARATOR"] = "SEPARATOR";
|
|
265
|
+
ChunkType2["SINGLE_SELECT_INPUT"] = "SINGLE_SELECT_INPUT";
|
|
266
|
+
ChunkType2["ERROR"] = "ERROR";
|
|
267
|
+
ChunkType2["SUBMISSION"] = "SUBMISSION";
|
|
268
|
+
ChunkType2["IMPORTANT_TEXT"] = "IMPORTANT_TEXT";
|
|
269
|
+
ChunkType2["DEBUG"] = "DEBUG";
|
|
270
|
+
ChunkType2["END_OF_RESPONSE"] = "END_OF_RESPONSE";
|
|
271
|
+
ChunkType2["FILE_UPLOAD"] = "FILE_UPLOAD";
|
|
272
|
+
ChunkType2["SIGNATURE"] = "SIGNATURE";
|
|
273
|
+
return ChunkType2;
|
|
274
|
+
})(ChunkType || {});
|
|
275
|
+
var Style = /* @__PURE__ */ ((Style2) => {
|
|
276
|
+
Style2["UNKNOWN_STYLE"] = "UNKNOWN_STYLE";
|
|
277
|
+
Style2["NORMAL"] = "NORMAL";
|
|
278
|
+
Style2["BOLD"] = "BOLD";
|
|
279
|
+
return Style2;
|
|
280
|
+
})(Style || {});
|
|
281
|
+
var Type = /* @__PURE__ */ ((Type2) => {
|
|
282
|
+
Type2["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
283
|
+
Type2["PARAGRAPH"] = "PARAGRAPH";
|
|
284
|
+
return Type2;
|
|
285
|
+
})(Type || {});
|
|
286
|
+
var Role = /* @__PURE__ */ ((Role2) => {
|
|
287
|
+
Role2["UNKNOWN_ROLE"] = "UNKNOWN_ROLE";
|
|
288
|
+
Role2["USER"] = "USER";
|
|
289
|
+
Role2["ASSISTANT"] = "ASSISTANT";
|
|
290
|
+
Role2["FUNCTION_CALL"] = "FUNCTION_CALL";
|
|
291
|
+
Role2["FUNCTION_CALL_OUTPUT"] = "FUNCTION_CALL_OUTPUT";
|
|
292
|
+
Role2["DEVELOPER"] = "DEVELOPER";
|
|
293
|
+
return Role2;
|
|
294
|
+
})(Role || {});
|
|
295
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
296
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
297
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
298
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
299
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
300
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
301
|
+
return WebhookIdentityType2;
|
|
302
|
+
})(WebhookIdentityType || {});
|
|
303
|
+
async function createInteractiveFormSession2(formId, options) {
|
|
304
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
305
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
306
|
+
formId,
|
|
307
|
+
promptId: options?.promptId,
|
|
308
|
+
currentValues: options?.currentValues,
|
|
309
|
+
dryRun: options?.dryRun,
|
|
310
|
+
currentTime: options?.currentTime,
|
|
311
|
+
clientTime: options?.clientTime
|
|
312
|
+
});
|
|
313
|
+
const reqOpts = createInteractiveFormSession(
|
|
314
|
+
payload
|
|
315
|
+
);
|
|
316
|
+
sideEffects?.onSiteCall?.();
|
|
317
|
+
try {
|
|
318
|
+
const result = await httpClient.request(reqOpts);
|
|
319
|
+
sideEffects?.onSuccess?.(result);
|
|
320
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.interactiveFormSession;
|
|
321
|
+
} catch (err) {
|
|
322
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
323
|
+
err,
|
|
324
|
+
{
|
|
325
|
+
spreadPathsToArguments: {},
|
|
326
|
+
explicitPathsToArguments: {
|
|
327
|
+
formId: "$[0]",
|
|
328
|
+
promptId: "$[1].promptId",
|
|
329
|
+
currentValues: "$[1].currentValues",
|
|
330
|
+
dryRun: "$[1].dryRun",
|
|
331
|
+
currentTime: "$[1].currentTime",
|
|
332
|
+
clientTime: "$[1].clientTime"
|
|
333
|
+
},
|
|
334
|
+
singleArgumentUnchanged: false
|
|
335
|
+
},
|
|
336
|
+
["formId", "options"]
|
|
337
|
+
);
|
|
338
|
+
sideEffects?.onError?.(err);
|
|
339
|
+
throw transformedError;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
async function createInteractiveFormSessionStreamed2(formId, options) {
|
|
343
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
344
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
345
|
+
formId,
|
|
346
|
+
promptId: options?.promptId,
|
|
347
|
+
currentValues: options?.currentValues,
|
|
348
|
+
dryRun: options?.dryRun,
|
|
349
|
+
currentTime: options?.currentTime,
|
|
350
|
+
clientTime: options?.clientTime
|
|
351
|
+
});
|
|
352
|
+
const reqOpts = createInteractiveFormSessionStreamed(
|
|
353
|
+
payload
|
|
354
|
+
);
|
|
355
|
+
sideEffects?.onSiteCall?.();
|
|
356
|
+
try {
|
|
357
|
+
const result = await httpClient.request(reqOpts);
|
|
358
|
+
sideEffects?.onSuccess?.(result);
|
|
359
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
360
|
+
} catch (err) {
|
|
361
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
362
|
+
err,
|
|
363
|
+
{
|
|
364
|
+
spreadPathsToArguments: {},
|
|
365
|
+
explicitPathsToArguments: {
|
|
366
|
+
formId: "$[0]",
|
|
367
|
+
promptId: "$[1].promptId",
|
|
368
|
+
currentValues: "$[1].currentValues",
|
|
369
|
+
dryRun: "$[1].dryRun",
|
|
370
|
+
currentTime: "$[1].currentTime",
|
|
371
|
+
clientTime: "$[1].clientTime"
|
|
372
|
+
},
|
|
373
|
+
singleArgumentUnchanged: false
|
|
374
|
+
},
|
|
375
|
+
["formId", "options"]
|
|
376
|
+
);
|
|
377
|
+
sideEffects?.onError?.(err);
|
|
378
|
+
throw transformedError;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
async function sendUserMessage2(interactiveFormSessionId, options) {
|
|
382
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
383
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
384
|
+
interactiveFormSessionId,
|
|
385
|
+
input: options?.input,
|
|
386
|
+
currentValues: options?.currentValues
|
|
387
|
+
});
|
|
388
|
+
const reqOpts = sendUserMessage(payload);
|
|
389
|
+
sideEffects?.onSiteCall?.();
|
|
390
|
+
try {
|
|
391
|
+
const result = await httpClient.request(reqOpts);
|
|
392
|
+
sideEffects?.onSuccess?.(result);
|
|
393
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
394
|
+
} catch (err) {
|
|
395
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
396
|
+
err,
|
|
397
|
+
{
|
|
398
|
+
spreadPathsToArguments: {},
|
|
399
|
+
explicitPathsToArguments: {
|
|
400
|
+
interactiveFormSessionId: "$[0]",
|
|
401
|
+
input: "$[1].input",
|
|
402
|
+
currentValues: "$[1].currentValues"
|
|
403
|
+
},
|
|
404
|
+
singleArgumentUnchanged: false
|
|
405
|
+
},
|
|
406
|
+
["interactiveFormSessionId", "options"]
|
|
407
|
+
);
|
|
408
|
+
sideEffects?.onError?.(err);
|
|
409
|
+
throw transformedError;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
async function sendUserMessageStreamed2(interactiveFormSessionId, options) {
|
|
413
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
414
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
415
|
+
interactiveFormSessionId,
|
|
416
|
+
input: options?.input,
|
|
417
|
+
currentValues: options?.currentValues
|
|
418
|
+
});
|
|
419
|
+
const reqOpts = sendUserMessageStreamed(
|
|
420
|
+
payload
|
|
421
|
+
);
|
|
422
|
+
sideEffects?.onSiteCall?.();
|
|
423
|
+
try {
|
|
424
|
+
const result = await httpClient.request(reqOpts);
|
|
425
|
+
sideEffects?.onSuccess?.(result);
|
|
426
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
427
|
+
} catch (err) {
|
|
428
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
429
|
+
err,
|
|
430
|
+
{
|
|
431
|
+
spreadPathsToArguments: {},
|
|
432
|
+
explicitPathsToArguments: {
|
|
433
|
+
interactiveFormSessionId: "$[0]",
|
|
434
|
+
input: "$[1].input",
|
|
435
|
+
currentValues: "$[1].currentValues"
|
|
436
|
+
},
|
|
437
|
+
singleArgumentUnchanged: false
|
|
438
|
+
},
|
|
439
|
+
["interactiveFormSessionId", "options"]
|
|
440
|
+
);
|
|
441
|
+
sideEffects?.onError?.(err);
|
|
442
|
+
throw transformedError;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
async function reportConversation2(options) {
|
|
446
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
447
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
448
|
+
interactiveFormSessionId: options?.interactiveFormSessionId,
|
|
449
|
+
description: options?.description,
|
|
450
|
+
viewerDebugUrl: options?.viewerDebugUrl
|
|
451
|
+
});
|
|
452
|
+
const reqOpts = reportConversation(payload);
|
|
453
|
+
sideEffects?.onSiteCall?.();
|
|
454
|
+
try {
|
|
455
|
+
const result = await httpClient.request(reqOpts);
|
|
456
|
+
sideEffects?.onSuccess?.(result);
|
|
457
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
458
|
+
} catch (err) {
|
|
459
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
460
|
+
err,
|
|
461
|
+
{
|
|
462
|
+
spreadPathsToArguments: {},
|
|
463
|
+
explicitPathsToArguments: {
|
|
464
|
+
interactiveFormSessionId: "$[0].interactiveFormSessionId",
|
|
465
|
+
description: "$[0].description",
|
|
466
|
+
viewerDebugUrl: "$[0].viewerDebugUrl"
|
|
467
|
+
},
|
|
468
|
+
singleArgumentUnchanged: false
|
|
469
|
+
},
|
|
470
|
+
["options"]
|
|
471
|
+
);
|
|
472
|
+
sideEffects?.onError?.(err);
|
|
473
|
+
throw transformedError;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
477
|
+
0 && (module.exports = {
|
|
478
|
+
ChunkType,
|
|
479
|
+
Role,
|
|
480
|
+
Style,
|
|
481
|
+
Type,
|
|
482
|
+
WebhookIdentityType,
|
|
483
|
+
createInteractiveFormSession,
|
|
484
|
+
createInteractiveFormSessionStreamed,
|
|
485
|
+
reportConversation,
|
|
486
|
+
sendUserMessage,
|
|
487
|
+
sendUserMessageStreamed
|
|
488
|
+
});
|
|
489
|
+
//# sourceMappingURL=index.typings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../index.typings.ts","../../../src/forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.ts","../../../src/forms-ai-v1-interactive-form-session-interactive-form-sessions.http.ts"],"sourcesContent":["export * from './src/forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixFormsAiV1InteractiveFormSession from './forms-ai-v1-interactive-form-session-interactive-form-sessions.http.js';\n\nexport interface InteractiveFormSession {\n /**\n * Form completion id\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Form id to complete\n * @format GUID\n */\n formId?: string;\n}\n\nexport interface CreateInteractiveFormSessionRequest {\n /**\n * Interactive form session to be created.\n * @format GUID\n */\n formId: string;\n /**\n * ID of the prompt to use.\n * @format GUID\n */\n promptId?: string | null;\n /**\n * Sets current values for the form fields, used to pre-fill the form (e.g. when switching from classic form to chat form).\n * These values are merged with existing values in the session.\n * For example, if user has already filled field \"Name\" and then sends a message with current_values containing\n * \"LastName\" field, \"Name\" will remain unchanged. If user sends a message with current_values containing \"Name\" field,\n * it will override the existing value.\n */\n currentValues?: Record<string, any> | null;\n /**\n * Dry run mode. The completion will not conduct submission if set to true. Intended for preview mode.\n * @immutable\n */\n dryRun?: boolean;\n /**\n * Current date-time string with user's timezone offset in ISO 8601 format (e.g. \"2023-10-01T12:00:00+03:00\").\n * @minLength 1\n * @maxLength 200\n */\n currentTime?: string | null;\n /** Current date-time of api client */\n clientTime?: ClientTime;\n}\n\nexport interface ClientTime {\n /**\n * Current date-time string UTC in ISO 8601 format (e.g. \"2023-10-01T12:00:00Z).\n * @minLength 1\n * @maxLength 200\n */\n currentTime?: string | null;\n /**\n * Current time zone in format like: \"Europe/Vilnius\".\n * @minLength 1\n * @maxLength 50\n */\n timeZone?: string | null;\n}\n\nexport interface CreateInteractiveFormSessionResponse {\n /** Interactive form session created */\n interactiveFormSession?: InteractiveFormSession;\n /** Assistant response chunks for the session */\n responseChunks?: InteractiveFormSessionResponseChunk[];\n}\n\nexport interface InteractiveFormSessionResponseChunk\n extends InteractiveFormSessionResponseChunkOfOneOf {\n /** Text chunk to display to the user */\n textDetails?: TextDetails;\n /** Data chunk which was extracted from the user input */\n textDataDetails?: TextDataDetails;\n /** Multi-select input chunk to display to the user */\n multiSelectInputDetails?: MultiSelectInputDetails;\n /** Number input chunk to display to the user */\n numberInputDetails?: NumberInputDetails;\n /** Separator chunk (e.g. paragraph break) */\n separatorDetails?: SeparatorDetails;\n /** Single-select input chunk to display to the user */\n singleSelectInputDetails?: SingleSelectInputDetails;\n /** Exception happened during processing, contains error message and details */\n errorDetails?: ErrorDetails;\n /** Form submission event acknowledgment chunk, contains submission id and checkout id if applicable */\n submissionDetails?: SubmissionDetails;\n /** Important information which might be used to derive TEXT_DATA */\n importantTextDetails?: ImportantTextDetails;\n /** Debug information, what tools were called, what was the input, etc. */\n debugDetails?: DebugDetails;\n /** End of chunk stream, indicates that no more chunks will be sent */\n endOfResponseDetails?: EndOfResponseDetails;\n /** Multi-select input chunk to display to the user */\n fileUploadDetails?: FileUploadDetails;\n /** Multi-select input chunk to display to the user */\n signatureDetails?: SignatureDetails;\n /** Type of the chunk */\n chunkType?: ChunkTypeWithLiterals;\n /** Marks which part of the original user input deemed meaningful by the assistant for extracting the answer. */\n meaningfulInput?: MeaningfulInput;\n}\n\n/** @oneof */\nexport interface InteractiveFormSessionResponseChunkOfOneOf {\n /** Text chunk to display to the user */\n textDetails?: TextDetails;\n /** Data chunk which was extracted from the user input */\n textDataDetails?: TextDataDetails;\n /** Multi-select input chunk to display to the user */\n multiSelectInputDetails?: MultiSelectInputDetails;\n /** Number input chunk to display to the user */\n numberInputDetails?: NumberInputDetails;\n /** Separator chunk (e.g. paragraph break) */\n separatorDetails?: SeparatorDetails;\n /** Single-select input chunk to display to the user */\n singleSelectInputDetails?: SingleSelectInputDetails;\n /** Exception happened during processing, contains error message and details */\n errorDetails?: ErrorDetails;\n /** Form submission event acknowledgment chunk, contains submission id and checkout id if applicable */\n submissionDetails?: SubmissionDetails;\n /** Important information which might be used to derive TEXT_DATA */\n importantTextDetails?: ImportantTextDetails;\n /** Debug information, what tools were called, what was the input, etc. */\n debugDetails?: DebugDetails;\n /** End of chunk stream, indicates that no more chunks will be sent */\n endOfResponseDetails?: EndOfResponseDetails;\n /** Multi-select input chunk to display to the user */\n fileUploadDetails?: FileUploadDetails;\n /** Multi-select input chunk to display to the user */\n signatureDetails?: SignatureDetails;\n}\n\nexport enum ChunkType {\n UNKNOWN_CHUNK_TYPE = 'UNKNOWN_CHUNK_TYPE',\n /** Text chunk to display to the user */\n TEXT = 'TEXT',\n /** Data chunk which was extracted from the user input */\n TEXT_DATA = 'TEXT_DATA',\n /** Multi-select input chunk to display to the user */\n MULTI_SELECT_INPUT = 'MULTI_SELECT_INPUT',\n /** Number input chunk to display to the user */\n NUMBER_INPUT = 'NUMBER_INPUT',\n SEPARATOR = 'SEPARATOR',\n /** Single-select input chunk to display to the user */\n SINGLE_SELECT_INPUT = 'SINGLE_SELECT_INPUT',\n /** Exception happened during processing, contains error message and details */\n ERROR = 'ERROR',\n /** Form submission event acknowledgment chunk, contains submission id and checkout id if applicable */\n SUBMISSION = 'SUBMISSION',\n /** Important information which might be used to derive TEXT_DATA */\n IMPORTANT_TEXT = 'IMPORTANT_TEXT',\n /** Debug information, what tools were called, what was the input, etc. */\n DEBUG = 'DEBUG',\n /** End of chunk stream, indicates that no more chunks will be sent */\n END_OF_RESPONSE = 'END_OF_RESPONSE',\n /** File Upload input chunk to display to the user */\n FILE_UPLOAD = 'FILE_UPLOAD',\n /** Signature input chunk to display to the user */\n SIGNATURE = 'SIGNATURE',\n}\n\n/** @enumType */\nexport type ChunkTypeWithLiterals =\n | ChunkType\n | 'UNKNOWN_CHUNK_TYPE'\n | 'TEXT'\n | 'TEXT_DATA'\n | 'MULTI_SELECT_INPUT'\n | 'NUMBER_INPUT'\n | 'SEPARATOR'\n | 'SINGLE_SELECT_INPUT'\n | 'ERROR'\n | 'SUBMISSION'\n | 'IMPORTANT_TEXT'\n | 'DEBUG'\n | 'END_OF_RESPONSE'\n | 'FILE_UPLOAD'\n | 'SIGNATURE';\n\nexport interface TextDetails {\n /**\n * Text content to display\n * @minLength 1\n * @maxLength 10000\n */\n text?: string;\n /** Style of the text (e.g. normal, bold) */\n style?: StyleWithLiterals;\n}\n\nexport enum Style {\n UNKNOWN_STYLE = 'UNKNOWN_STYLE',\n NORMAL = 'NORMAL',\n BOLD = 'BOLD',\n}\n\n/** @enumType */\nexport type StyleWithLiterals = Style | 'UNKNOWN_STYLE' | 'NORMAL' | 'BOLD';\n\nexport interface TextDataDetails {\n /**\n * Target field key for the data\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n /**\n * Text content to display\n * @minLength 1\n * @maxLength 10000\n */\n text?: string;\n /** \"Technical\" value used for the form submission, e.g. if it's boolean, value will be `true` or `false` */\n value?: any;\n /**\n * User friendly string to display user's submitted value, e.g. if it's boolean, value will be \"Yes\" or \"No\"\n * @minLength 1\n * @maxLength 10000\n */\n displayValue?: string;\n}\n\nexport interface MultiSelectInputDetails {\n /**\n * Field id for the multi-select input\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n /**\n * Options available for selection\n * @minSize 1\n * @maxSize 100\n */\n options?: Option[];\n /** If present, then user is allowed to provide custom values */\n allowedCustomValue?: CustomValue;\n}\n\nexport interface Option {\n /**\n * Value to be submitted for the option\n * @minLength 1\n * @maxLength 10000\n */\n value?: string;\n /**\n * Label to display for the option\n * @minLength 1\n * @maxLength 10000\n */\n label?: string;\n}\n\nexport interface CustomValue {\n /**\n * Description of expected custom value\n * @maxLength 10000\n */\n description?: string;\n}\n\nexport interface NumberInputDetails {\n /**\n * Field id for the number input\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n /** Limit min and max range for the input */\n rangeLimit?: NumberRangeLimit;\n /** If provided, only multiples of this value are accepted */\n multipleOf?: number | null;\n}\n\nexport interface NumberRangeLimit extends NumberRangeLimitEndOneOf {\n /** Maximum value of the range (inclusive) */\n maxInclusiveValue?: number | null;\n /** Maximum value of the range (exclusive) */\n maxExclusiveValue?: number | null;\n /** Minimum value of the range (inclusive) */\n minInclusiveValue?: number | null;\n}\n\n/** @oneof */\nexport interface NumberRangeLimitEndOneOf {\n /** Maximum value of the range (inclusive) */\n maxInclusiveValue?: number | null;\n /** Maximum value of the range (exclusive) */\n maxExclusiveValue?: number | null;\n}\n\nexport interface SeparatorDetails {\n /** Type of separator (e.g. paragraph) */\n type?: TypeWithLiterals;\n}\n\nexport enum Type {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n PARAGRAPH = 'PARAGRAPH',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'UNKNOWN_TYPE' | 'PARAGRAPH';\n\nexport interface SingleSelectInputDetails {\n /**\n * Field id for the single-select input\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n /**\n * Options available for selection\n * @minSize 1\n * @maxSize 100\n */\n options?: Option[];\n /** If present, then user is allowed to provide custom values */\n allowedCustomValue?: CustomValue;\n}\n\nexport interface ErrorDetails {\n /**\n * Error message text\n * @minLength 1\n * @maxLength 1000\n */\n messageText?: string;\n}\n\nexport interface SubmissionDetails {\n /**\n * Created submission id\n * @format GUID\n */\n submissionId?: string;\n /**\n * ID of the ecom checkout related to submission (only applicable if a form has payments).\n * @format GUID\n * @readonly\n */\n checkoutId?: string | null;\n}\n\nexport interface ImportantTextDetails {\n /**\n * Target field key for the important text\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n /**\n * Important text content to display\n * @minLength 1\n * @maxLength 10000\n */\n text?: string;\n}\n\nexport interface DebugDetails {\n /** Debug data for troubleshooting */\n data?: Record<string, any> | null;\n}\n\nexport interface EndOfResponseDetails {\n /** If the response was successful */\n success?: boolean;\n}\n\nexport interface FileUploadDetails {\n /**\n * Field id for the file upload input\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n}\n\nexport interface SignatureDetails {\n /**\n * Field id for the signature input\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n}\n\nexport interface MeaningfulInput {\n /**\n * Character offset (0-indexed) from the start of the user input to where the meaningful text starts\n * @max 10000\n */\n startOffset?: number;\n /**\n * Length of the meaningful text in characters\n * @max 10000\n */\n length?: number;\n}\n\nexport interface CreateInteractiveFormSessionStreamedRequest {\n /**\n * Interactive form session to be created.\n * @format GUID\n */\n formId: string;\n /**\n * ID of the prompt to use.\n * @format GUID\n */\n promptId?: string | null;\n /** Sets current values for the form fields, used to pre-fill the form (e.g. when switching from classic form to chat form). */\n currentValues?: Record<string, any> | null;\n /**\n * Dry run mode. The completion will not conduct submission if set to true. Intended for preview mode.\n * @immutable\n */\n dryRun?: boolean;\n /**\n * Current date-time string with user's timezone offset in ISO 8601 format (e.g. \"2023-10-01T12:00:00+03:00\").\n * @minLength 1\n * @maxLength 200\n */\n currentTime?: string | null;\n /** Current date-time of api client */\n clientTime?: ClientTime;\n}\n\nexport interface CreateInteractiveFormSessionStreamedResponse {\n /** Assistant response chunk */\n responseChunk?: InteractiveFormSessionResponseChunk;\n /** Interactive form session. Only returned on the 1st chunk of the stream. */\n interactiveFormSession?: InteractiveFormSession;\n}\n\nexport interface SendUserMessageRequest {\n /**\n * Interactive form session id\n * @format GUID\n */\n interactiveFormSessionId: string;\n /**\n * User input to add to the session\n * @maxLength 10000\n */\n input?: string | null;\n /**\n * Sets current values for the form fields, used to pre-fill the form (e.g. when switching from classic form to chat form).\n * These values are merged with existing values in the session.\n * For example, if user has already filled field \"Name\" and then sends a message with current_values containing\n * \"LastName\" field, \"Name\" will remain unchanged. If user sends a message with current_values containing \"Name\" field,\n * it will override the existing value.\n */\n currentValues?: Record<string, any> | null;\n}\n\nexport interface SendUserMessageResponse {\n /** Interactive form session after input is added */\n interactiveFormSession?: InteractiveFormSession;\n /** Assistant response chunks for the input */\n responseChunks?: InteractiveFormSessionResponseChunk[];\n}\n\nexport interface SendUserMessageStreamedRequest {\n /**\n * Interactive form session id\n * @format GUID\n */\n interactiveFormSessionId: string;\n /**\n * User input to add to the session\n * @maxLength 10000\n */\n input?: string | null;\n /**\n * Sets current values for the form fields, used to pre-fill the form (e.g. when switching from classic form to chat form).\n * These values are merged with existing values in the session.\n * For example, if user has already filled field \"Name\" and then sends a message with current_values containing\n * \"LastName\" field, \"Name\" will remain unchanged. If user sends a message with current_values containing \"Name\" field,\n * it will override the existing value.\n */\n currentValues?: Record<string, any> | null;\n}\n\nexport interface SendUserMessageStreamedResponse {\n /** Assistant response chunk for the streamed input */\n responseChunk?: InteractiveFormSessionResponseChunk;\n /** Interactive form session after input is added */\n interactiveFormSession?: InteractiveFormSession;\n}\n\nexport interface ConverseRequest extends ConverseRequestRequestOneOf {\n /** Get state request */\n getStateRequest?: GetStateRequest;\n /** Call tools request */\n callToolsRequest?: CallToolsRequest;\n /** Relay assistant message request */\n relayAssistantMessage?: RelayAssistantMessageRequest;\n /** Usage request */\n usageRequest?: UsageRequest;\n /**\n * Request ID used for mapping the request to the response\n * @format GUID\n */\n requestId?: string;\n}\n\n/** @oneof */\nexport interface ConverseRequestRequestOneOf {\n /** Get state request */\n getStateRequest?: GetStateRequest;\n /** Call tools request */\n callToolsRequest?: CallToolsRequest;\n /** Relay assistant message request */\n relayAssistantMessage?: RelayAssistantMessageRequest;\n /** Usage request */\n usageRequest?: UsageRequest;\n}\n\nexport interface GetStateRequest {\n /**\n * Interactive form session ID\n * @format GUID\n */\n interactiveFormSessionId?: string;\n /**\n * System prompt ID\n * @format GUID\n */\n promptId?: string;\n}\n\nexport interface CallToolsRequest {\n /**\n * Tool calls to be executed\n * @maxSize 100\n */\n calls?: Call[];\n /**\n * Interactive form session ID\n * @format GUID\n */\n interactiveFormSessionId?: string;\n}\n\nexport interface Call {\n /** Tool call arguments */\n args?: Record<string, any> | null;\n /**\n * Tool name to call\n * @minLength 1\n * @maxLength 100\n */\n toolName?: string;\n /**\n * Tool call ID\n * @minLength 1\n * @maxLength 100\n */\n callId?: string;\n}\n\nexport interface RelayAssistantMessageRequest {\n /**\n * Assistant message text\n * @minLength 1\n * @maxLength 10000\n */\n text?: string;\n /**\n * Interactive form session ID\n * @format GUID\n */\n interactiveFormSessionId?: string;\n}\n\nexport interface UsageRequest {\n /** Microcents spent for the request */\n microcentsSpent?: string;\n /**\n * Interactive form session ID\n * @format GUID\n */\n interactiveFormSessionId?: string;\n /**\n * Form ID\n * @format GUID\n */\n formId?: string;\n /** Usage details for the request */\n usage?: Usage;\n}\n\nexport interface Usage {\n /**\n * Model name used for the session\n * @minLength 1\n * @maxLength 100\n */\n model?: string | null;\n /** The total number of tokens in the Response including input and output text and audio tokens */\n totalTokens?: string;\n /** The number of input tokens used in the Response, including text and audio tokens. */\n inputTokens?: string;\n /** The number of output tokens sent in the Response, including text and audio tokens. */\n outputTokens?: string;\n /** Token details */\n tokenDetails?: Record<string, any> | null;\n}\n\nexport interface ConverseResponse extends ConverseResponseResponseOneOf {\n /** Get state response */\n getStateResponse?: GetStateResponse;\n /** Call tools response */\n callToolsResponse?: CallToolsResponse;\n /** Assistant response chunk */\n responseChunk?: InteractiveFormSessionResponseChunk;\n /** Response that signals that the request has been processed */\n acknowledgmentResponse?: AcknowledgmentResponse;\n /**\n * Request ID used for mapping the request to the response\n * @format GUID\n */\n requestId?: string;\n}\n\n/** @oneof */\nexport interface ConverseResponseResponseOneOf {\n /** Get state response */\n getStateResponse?: GetStateResponse;\n /** Call tools response */\n callToolsResponse?: CallToolsResponse;\n /** Assistant response chunk */\n responseChunk?: InteractiveFormSessionResponseChunk;\n /** Response that signals that the request has been processed */\n acknowledgmentResponse?: AcknowledgmentResponse;\n}\n\nexport interface GetStateResponse {\n /**\n * Available tools for the session\n * @maxSize 100\n */\n tools?: Tool[];\n /**\n * Context messages for the session\n * @maxSize 10000\n */\n contextMessages?: ContextMessage[];\n /**\n * System prompt text\n * @minLength 1\n * @maxLength 10000\n */\n systemPrompt?: string;\n /**\n * Form ID for the session\n * @format GUID\n */\n formId?: string;\n /**\n * Submission state message\n * @maxLength 10000\n */\n submissionStateMessage?: string | null;\n}\n\nexport interface Tool {\n /**\n * Tool type identifier\n * @minLength 1\n * @maxLength 10000\n */\n type?: string;\n /**\n * Tool name\n * @minLength 1\n * @maxLength 10000\n */\n name?: string | null;\n /**\n * Tool description\n * @minLength 1\n * @maxLength 10000\n */\n description?: string | null;\n /** Tool parameters */\n parameters?: Record<string, any> | null;\n}\n\nexport interface ContextMessage extends ContextMessageOptionsOneOf {\n /** User options */\n userOptions?: UserOptions;\n /** Assistant options */\n assistantOptions?: AssistantOptions;\n /** Function call options */\n functionCallOptions?: FunctionCallOptions;\n /** Function call output options */\n functionCallOutputOptions?: FunctionCallOutputOptions;\n /** Developer options */\n developerOptions?: DeveloperOptions;\n /** Role of the message sender */\n role?: RoleWithLiterals;\n}\n\n/** @oneof */\nexport interface ContextMessageOptionsOneOf {\n /** User options */\n userOptions?: UserOptions;\n /** Assistant options */\n assistantOptions?: AssistantOptions;\n /** Function call options */\n functionCallOptions?: FunctionCallOptions;\n /** Function call output options */\n functionCallOutputOptions?: FunctionCallOutputOptions;\n /** Developer options */\n developerOptions?: DeveloperOptions;\n}\n\nexport enum Role {\n UNKNOWN_ROLE = 'UNKNOWN_ROLE',\n USER = 'USER',\n ASSISTANT = 'ASSISTANT',\n FUNCTION_CALL = 'FUNCTION_CALL',\n FUNCTION_CALL_OUTPUT = 'FUNCTION_CALL_OUTPUT',\n DEVELOPER = 'DEVELOPER',\n}\n\n/** @enumType */\nexport type RoleWithLiterals =\n | Role\n | 'UNKNOWN_ROLE'\n | 'USER'\n | 'ASSISTANT'\n | 'FUNCTION_CALL'\n | 'FUNCTION_CALL_OUTPUT'\n | 'DEVELOPER';\n\nexport interface UserOptions {\n /**\n * User message content\n * @minLength 1\n * @maxLength 10000\n */\n content?: string;\n}\n\nexport interface AssistantOptions {\n /**\n * Assistant message content\n * @minLength 1\n * @maxLength 10000\n */\n content?: string;\n}\n\nexport interface FunctionCallOptions {\n /**\n * Call name\n * @minLength 1\n * @maxLength 100\n */\n functionName?: string;\n /** Call arguments */\n args?: Record<string, any> | null;\n /**\n * Call ID\n * @minLength 1\n * @maxLength 100\n */\n callId?: string;\n}\n\nexport interface FunctionCallOutputOptions {\n /** Call output data */\n output?: Record<string, any> | null;\n /**\n * Call ID\n * @minLength 1\n * @maxLength 100\n */\n callId?: string;\n}\n\nexport interface DeveloperOptions {\n /**\n * Developer message content\n * @minLength 1\n * @maxLength 10000\n */\n content?: string;\n}\n\nexport interface CallToolsResponse {\n /**\n * Tool call responses\n * @maxSize 100\n */\n responses?: Response[];\n}\n\nexport interface Response {\n /**\n * Tool call ID\n * @minLength 1\n * @maxLength 100\n */\n callId?: string;\n /** Tool call response data */\n response?: Record<string, any> | null;\n}\n\nexport interface AcknowledgmentResponse {\n /** If request processing is successful */\n success?: boolean;\n}\n\nexport interface OutputInteractiveFormSessionStreamedRequest {\n /**\n * Interactive form session id to output\n * @format GUID\n */\n interactiveFormSessionId?: string;\n}\n\nexport interface OutputInteractiveFormSessionStreamedResponse {\n /** Interactive form session id */\n interactiveFormSession?: InteractiveFormSession;\n /** Assistant response chunk for the session */\n responseChunk?: InteractiveFormSessionResponseChunk;\n}\n\nexport interface ReportConversationRequest {\n /**\n * Interactive form session id\n * @format GUID\n */\n interactiveFormSessionId?: string;\n /**\n * Report description\n * @minLength 1\n * @maxLength 10000\n */\n description?: string;\n /**\n * Viewer debug URL of the conversation\n * @format WEB_URL\n */\n viewerDebugUrl?: string;\n}\n\nexport interface ReportConversationResponse {\n /** If the report was successfully created */\n success?: boolean | null;\n /**\n * Error message if the report creation failed\n * @maxLength 10000\n */\n errorMessage?: string | null;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type SendUserMessageApplicationErrors = {\n code?: 'EMPTY_REQUEST';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type SendUserMessageStreamedApplicationErrors = {\n code?: 'EMPTY_REQUEST';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Starts interactive form session for a given form\n * @param formId - Interactive form session to be created.\n * @public\n * @documentationMaturity preview\n * @requiredField formId\n * @permissionId WIX_FORMS.CREATE_INTERACTIVE_FORM_SESSION\n * @applicableIdentity APP\n * @returns Interactive form session created\n * @fqn wix.forms.ai.v1.InteractiveFormSessionsService.CreateInteractiveFormSession\n */\nexport async function createInteractiveFormSession(\n formId: string,\n options?: CreateInteractiveFormSessionOptions\n): Promise<NonNullablePaths<InteractiveFormSession, `_id` | `formId`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n formId: formId,\n promptId: options?.promptId,\n currentValues: options?.currentValues,\n dryRun: options?.dryRun,\n currentTime: options?.currentTime,\n clientTime: options?.clientTime,\n });\n\n const reqOpts =\n ambassadorWixFormsAiV1InteractiveFormSession.createInteractiveFormSession(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)\n ?.interactiveFormSession!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n formId: '$[0]',\n promptId: '$[1].promptId',\n currentValues: '$[1].currentValues',\n dryRun: '$[1].dryRun',\n currentTime: '$[1].currentTime',\n clientTime: '$[1].clientTime',\n },\n singleArgumentUnchanged: false,\n },\n ['formId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateInteractiveFormSessionOptions {\n /**\n * ID of the prompt to use.\n * @format GUID\n */\n promptId?: string | null;\n /**\n * Sets current values for the form fields, used to pre-fill the form (e.g. when switching from classic form to chat form).\n * These values are merged with existing values in the session.\n * For example, if user has already filled field \"Name\" and then sends a message with current_values containing\n * \"LastName\" field, \"Name\" will remain unchanged. If user sends a message with current_values containing \"Name\" field,\n * it will override the existing value.\n */\n currentValues?: Record<string, any> | null;\n /**\n * Dry run mode. The completion will not conduct submission if set to true. Intended for preview mode.\n * @immutable\n */\n dryRun?: boolean;\n /**\n * Current date-time string with user's timezone offset in ISO 8601 format (e.g. \"2023-10-01T12:00:00+03:00\").\n * @minLength 1\n * @maxLength 200\n */\n currentTime?: string | null;\n /** Current date-time of api client */\n clientTime?: ClientTime;\n}\n\n/**\n * Starts interactive form session for a given form with streamed response\n * @param formId - Interactive form session to be created.\n * @public\n * @documentationMaturity preview\n * @requiredField formId\n * @permissionId WIX_FORMS.CREATE_INTERACTIVE_FORM_SESSION\n * @applicableIdentity APP\n * @fqn wix.forms.ai.v1.InteractiveFormSessionsService.CreateInteractiveFormSessionStreamed\n */\nexport async function createInteractiveFormSessionStreamed(\n formId: string,\n options?: CreateInteractiveFormSessionStreamedOptions\n): Promise<\n NonNullablePaths<\n CreateInteractiveFormSessionStreamedResponse,\n | `responseChunk.textDetails.text`\n | `responseChunk.textDetails.style`\n | `responseChunk.textDataDetails.fieldTarget`\n | `responseChunk.textDataDetails.text`\n | `responseChunk.textDataDetails.displayValue`\n | `responseChunk.multiSelectInputDetails.fieldTarget`\n | `responseChunk.multiSelectInputDetails.options`\n | `responseChunk.multiSelectInputDetails.options.${number}.value`\n | `responseChunk.multiSelectInputDetails.options.${number}.label`\n | `responseChunk.multiSelectInputDetails.allowedCustomValue.description`\n | `responseChunk.numberInputDetails.fieldTarget`\n | `responseChunk.separatorDetails.type`\n | `responseChunk.singleSelectInputDetails.fieldTarget`\n | `responseChunk.singleSelectInputDetails.options`\n | `responseChunk.errorDetails.messageText`\n | `responseChunk.submissionDetails.submissionId`\n | `responseChunk.importantTextDetails.fieldTarget`\n | `responseChunk.importantTextDetails.text`\n | `responseChunk.endOfResponseDetails.success`\n | `responseChunk.fileUploadDetails.fieldTarget`\n | `responseChunk.signatureDetails.fieldTarget`\n | `responseChunk.chunkType`\n | `responseChunk.meaningfulInput.startOffset`\n | `responseChunk.meaningfulInput.length`\n | `interactiveFormSession._id`\n | `interactiveFormSession.formId`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n formId: formId,\n promptId: options?.promptId,\n currentValues: options?.currentValues,\n dryRun: options?.dryRun,\n currentTime: options?.currentTime,\n clientTime: options?.clientTime,\n });\n\n const reqOpts =\n ambassadorWixFormsAiV1InteractiveFormSession.createInteractiveFormSessionStreamed(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n formId: '$[0]',\n promptId: '$[1].promptId',\n currentValues: '$[1].currentValues',\n dryRun: '$[1].dryRun',\n currentTime: '$[1].currentTime',\n clientTime: '$[1].clientTime',\n },\n singleArgumentUnchanged: false,\n },\n ['formId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateInteractiveFormSessionStreamedOptions {\n /**\n * ID of the prompt to use.\n * @format GUID\n */\n promptId?: string | null;\n /** Sets current values for the form fields, used to pre-fill the form (e.g. when switching from classic form to chat form). */\n currentValues?: Record<string, any> | null;\n /**\n * Dry run mode. The completion will not conduct submission if set to true. Intended for preview mode.\n * @immutable\n */\n dryRun?: boolean;\n /**\n * Current date-time string with user's timezone offset in ISO 8601 format (e.g. \"2023-10-01T12:00:00+03:00\").\n * @minLength 1\n * @maxLength 200\n */\n currentTime?: string | null;\n /** Current date-time of api client */\n clientTime?: ClientTime;\n}\n\n/**\n * Sends user message to the interactive form session\n * @param interactiveFormSessionId - Interactive form session id\n * @public\n * @documentationMaturity preview\n * @requiredField interactiveFormSessionId\n * @permissionId WIX_FORMS.SEND_USER_MESSAGE_TO_INTERACTIVE_FORM_SESSION\n * @applicableIdentity APP\n * @fqn wix.forms.ai.v1.InteractiveFormSessionsService.SendUserMessage\n */\nexport async function sendUserMessage(\n interactiveFormSessionId: string,\n options?: SendUserMessageOptions\n): Promise<\n NonNullablePaths<\n SendUserMessageResponse,\n | `interactiveFormSession._id`\n | `interactiveFormSession.formId`\n | `responseChunks`\n | `responseChunks.${number}.textDetails.text`\n | `responseChunks.${number}.textDetails.style`\n | `responseChunks.${number}.textDataDetails.fieldTarget`\n | `responseChunks.${number}.textDataDetails.text`\n | `responseChunks.${number}.textDataDetails.displayValue`\n | `responseChunks.${number}.multiSelectInputDetails.fieldTarget`\n | `responseChunks.${number}.multiSelectInputDetails.allowedCustomValue.description`\n | `responseChunks.${number}.numberInputDetails.fieldTarget`\n | `responseChunks.${number}.separatorDetails.type`\n | `responseChunks.${number}.singleSelectInputDetails.fieldTarget`\n | `responseChunks.${number}.errorDetails.messageText`\n | `responseChunks.${number}.submissionDetails.submissionId`\n | `responseChunks.${number}.importantTextDetails.fieldTarget`\n | `responseChunks.${number}.importantTextDetails.text`\n | `responseChunks.${number}.endOfResponseDetails.success`\n | `responseChunks.${number}.fileUploadDetails.fieldTarget`\n | `responseChunks.${number}.signatureDetails.fieldTarget`\n | `responseChunks.${number}.chunkType`\n | `responseChunks.${number}.meaningfulInput.startOffset`\n | `responseChunks.${number}.meaningfulInput.length`,\n 6\n > & {\n __applicationErrorsType?: SendUserMessageApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n interactiveFormSessionId: interactiveFormSessionId,\n input: options?.input,\n currentValues: options?.currentValues,\n });\n\n const reqOpts =\n ambassadorWixFormsAiV1InteractiveFormSession.sendUserMessage(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n interactiveFormSessionId: '$[0]',\n input: '$[1].input',\n currentValues: '$[1].currentValues',\n },\n singleArgumentUnchanged: false,\n },\n ['interactiveFormSessionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SendUserMessageOptions {\n /**\n * User input to add to the session\n * @maxLength 10000\n */\n input?: string | null;\n /**\n * Sets current values for the form fields, used to pre-fill the form (e.g. when switching from classic form to chat form).\n * These values are merged with existing values in the session.\n * For example, if user has already filled field \"Name\" and then sends a message with current_values containing\n * \"LastName\" field, \"Name\" will remain unchanged. If user sends a message with current_values containing \"Name\" field,\n * it will override the existing value.\n */\n currentValues?: Record<string, any> | null;\n}\n\n/**\n * Sends user message to the interactive form session with streamed response\n * @param interactiveFormSessionId - Interactive form session id\n * @public\n * @documentationMaturity preview\n * @requiredField interactiveFormSessionId\n * @permissionId WIX_FORMS.SEND_USER_MESSAGE_TO_INTERACTIVE_FORM_SESSION\n * @applicableIdentity APP\n * @fqn wix.forms.ai.v1.InteractiveFormSessionsService.SendUserMessageStreamed\n */\nexport async function sendUserMessageStreamed(\n interactiveFormSessionId: string,\n options?: SendUserMessageStreamedOptions\n): Promise<\n NonNullablePaths<\n SendUserMessageStreamedResponse,\n | `responseChunk.textDetails.text`\n | `responseChunk.textDetails.style`\n | `responseChunk.textDataDetails.fieldTarget`\n | `responseChunk.textDataDetails.text`\n | `responseChunk.textDataDetails.displayValue`\n | `responseChunk.multiSelectInputDetails.fieldTarget`\n | `responseChunk.multiSelectInputDetails.options`\n | `responseChunk.multiSelectInputDetails.options.${number}.value`\n | `responseChunk.multiSelectInputDetails.options.${number}.label`\n | `responseChunk.multiSelectInputDetails.allowedCustomValue.description`\n | `responseChunk.numberInputDetails.fieldTarget`\n | `responseChunk.separatorDetails.type`\n | `responseChunk.singleSelectInputDetails.fieldTarget`\n | `responseChunk.singleSelectInputDetails.options`\n | `responseChunk.errorDetails.messageText`\n | `responseChunk.submissionDetails.submissionId`\n | `responseChunk.importantTextDetails.fieldTarget`\n | `responseChunk.importantTextDetails.text`\n | `responseChunk.endOfResponseDetails.success`\n | `responseChunk.fileUploadDetails.fieldTarget`\n | `responseChunk.signatureDetails.fieldTarget`\n | `responseChunk.chunkType`\n | `responseChunk.meaningfulInput.startOffset`\n | `responseChunk.meaningfulInput.length`\n | `interactiveFormSession._id`\n | `interactiveFormSession.formId`,\n 6\n > & {\n __applicationErrorsType?: SendUserMessageStreamedApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n interactiveFormSessionId: interactiveFormSessionId,\n input: options?.input,\n currentValues: options?.currentValues,\n });\n\n const reqOpts =\n ambassadorWixFormsAiV1InteractiveFormSession.sendUserMessageStreamed(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n interactiveFormSessionId: '$[0]',\n input: '$[1].input',\n currentValues: '$[1].currentValues',\n },\n singleArgumentUnchanged: false,\n },\n ['interactiveFormSessionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SendUserMessageStreamedOptions {\n /**\n * User input to add to the session\n * @maxLength 10000\n */\n input?: string | null;\n /**\n * Sets current values for the form fields, used to pre-fill the form (e.g. when switching from classic form to chat form).\n * These values are merged with existing values in the session.\n * For example, if user has already filled field \"Name\" and then sends a message with current_values containing\n * \"LastName\" field, \"Name\" will remain unchanged. If user sends a message with current_values containing \"Name\" field,\n * it will override the existing value.\n */\n currentValues?: Record<string, any> | null;\n}\n\n/**\n * Report conversation for quality assurance\n * @public\n * @documentationMaturity preview\n * @permissionId WIX_FORMS.REPORT_INTERACTIVE_FORM_SESSION\n * @fqn wix.forms.ai.v1.InteractiveFormSessionsService.ReportConversation\n */\nexport async function reportConversation(\n options?: ReportConversationOptions\n): Promise<ReportConversationResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n interactiveFormSessionId: options?.interactiveFormSessionId,\n description: options?.description,\n viewerDebugUrl: options?.viewerDebugUrl,\n });\n\n const reqOpts =\n ambassadorWixFormsAiV1InteractiveFormSession.reportConversation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n interactiveFormSessionId: '$[0].interactiveFormSessionId',\n description: '$[0].description',\n viewerDebugUrl: '$[0].viewerDebugUrl',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ReportConversationOptions {\n /**\n * Interactive form session id\n * @format GUID\n */\n interactiveFormSessionId?: string;\n /**\n * Report description\n * @minLength 1\n * @maxLength 10000\n */\n description?: string;\n /**\n * Viewer debug URL of the conversation\n * @format WEB_URL\n */\n viewerDebugUrl?: string;\n}\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixFormsAiV1InteractiveFormSessionsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n '*.wixforms.com': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/forms/ai/v1/chat-settings',\n destPath: '/v1/chat-settings',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/form-ai-assistant',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_forms_interactive-form-sessions';\n\n/** Starts interactive form session for a given form */\nexport function createInteractiveFormSession(\n payload: object\n): RequestOptionsFactory<any> {\n function __createInteractiveFormSession({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.forms.ai.v1.interactive_form_session',\n method: 'POST' as any,\n methodFqn:\n 'wix.forms.ai.v1.InteractiveFormSessionsService.CreateInteractiveFormSession',\n packageName: PACKAGE_NAME,\n url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({\n protoPath: '/v1/interactive-form-sessions',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'responseChunks.numberInputDetails.multipleOf' },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.maxInclusiveValue',\n },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.maxExclusiveValue',\n },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.minInclusiveValue',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createInteractiveFormSession;\n}\n\n/** Starts interactive form session for a given form with streamed response */\nexport function createInteractiveFormSessionStreamed(\n payload: object\n): RequestOptionsFactory<any> {\n function __createInteractiveFormSessionStreamed({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.forms.ai.v1.interactive_form_session',\n method: 'POST' as any,\n methodFqn:\n 'wix.forms.ai.v1.InteractiveFormSessionsService.CreateInteractiveFormSessionStreamed',\n packageName: PACKAGE_NAME,\n url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({\n protoPath: '/v1/interactive-form-sessions/create-streamed',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'responseChunk.numberInputDetails.multipleOf' },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.maxInclusiveValue',\n },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.maxExclusiveValue',\n },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.minInclusiveValue',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createInteractiveFormSessionStreamed;\n}\n\n/** Sends user message to the interactive form session */\nexport function sendUserMessage(payload: object): RequestOptionsFactory<any> {\n function __sendUserMessage({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.forms.ai.v1.interactive_form_session',\n method: 'POST' as any,\n methodFqn:\n 'wix.forms.ai.v1.InteractiveFormSessionsService.SendUserMessage',\n packageName: PACKAGE_NAME,\n url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({\n protoPath:\n '/v1/interactive-form-sessions/{interactiveFormSessionId}/send-user-message',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'responseChunks.numberInputDetails.multipleOf' },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.maxInclusiveValue',\n },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.maxExclusiveValue',\n },\n {\n path: 'responseChunks.numberInputDetails.rangeLimit.minInclusiveValue',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __sendUserMessage;\n}\n\n/** Sends user message to the interactive form session with streamed response */\nexport function sendUserMessageStreamed(\n payload: object\n): RequestOptionsFactory<any> {\n function __sendUserMessageStreamed({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.forms.ai.v1.interactive_form_session',\n method: 'POST' as any,\n methodFqn:\n 'wix.forms.ai.v1.InteractiveFormSessionsService.SendUserMessageStreamed',\n packageName: PACKAGE_NAME,\n url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({\n protoPath:\n '/v1/interactive-form-sessions/{interactiveFormSessionId}/send-user-message-streamed',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'responseChunk.numberInputDetails.multipleOf' },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.maxInclusiveValue',\n },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.maxExclusiveValue',\n },\n {\n path: 'responseChunk.numberInputDetails.rangeLimit.minInclusiveValue',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __sendUserMessageStreamed;\n}\n\n/** Report conversation for quality assurance */\nexport function reportConversation(\n payload: object\n): RequestOptionsFactory<any> {\n function __reportConversation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.forms.ai.v1.interactive_form_session',\n method: 'POST' as any,\n methodFqn:\n 'wix.forms.ai.v1.InteractiveFormSessionsService.ReportConversation',\n packageName: PACKAGE_NAME,\n url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({\n protoPath: '/v1/interactive-form-sessions/report',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __reportConversation;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sCAAAA;AAAA,EAAA,4CAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,+BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,mBAA6C;AAC7C,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,qDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,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SAAS;AAAA,IACnC,aAAa,SAAS;AAAA,IACtB,gBAAgB,SAAS;AAAA,EAC3B,CAAC;AAED,QAAM,UACyC,mBAAmB,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAJ;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,0BAA0B;AAAA,UAC1B,aAAa;AAAA,UACb,gBAAgB;AAAA,QAClB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["createInteractiveFormSession","createInteractiveFormSessionStreamed","reportConversation","sendUserMessage","sendUserMessageStreamed","payload","ChunkType","Style","Type","Role","WebhookIdentityType","createInteractiveFormSession","sdkTransformError","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed","reportConversation"]}
|