@wix/auto_sdk_forms_interactive-form-sessions 1.0.0 → 1.0.2
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 +3 -11
- package/build/cjs/index.js +4 -59
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -27
- package/build/cjs/index.typings.js +4 -51
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -30
- package/build/cjs/meta.js +4 -38
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +3 -11
- package/build/es/index.mjs +4 -58
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -27
- package/build/es/index.typings.mjs +4 -50
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +2 -30
- package/build/es/meta.mjs +4 -37
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +3 -11
- package/build/internal/cjs/index.js +4 -59
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +1 -27
- package/build/internal/cjs/index.typings.js +4 -51
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +2 -30
- package/build/internal/cjs/meta.js +4 -38
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +3 -11
- package/build/internal/es/index.mjs +4 -58
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +1 -27
- package/build/internal/es/index.typings.mjs +4 -50
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +2 -30
- package/build/internal/es/meta.mjs +4 -37
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { CreateInteractiveFormSessionOptions, InteractiveFormSession, CreateInteractiveFormSessionStreamedOptions, CreateInteractiveFormSessionStreamedResponse, SendUserMessageOptions, SendUserMessageResponse, SendUserMessageApplicationErrors, SendUserMessageStreamedOptions, SendUserMessageStreamedResponse, SendUserMessageStreamedApplicationErrors
|
|
3
|
-
export { AcknowledgmentResponse, ActionEvent, AssistantOptions, Call, CallToolsRequest, CallToolsResponse, ChunkType, ChunkTypeWithLiterals, ClientTime, ContextMessage, ContextMessageOptionsOneOf, ConverseRequest, ConverseRequestRequestOneOf, ConverseResponse, ConverseResponseResponseOneOf, CreateInteractiveFormSessionRequest, CreateInteractiveFormSessionResponse, CreateInteractiveFormSessionStreamedRequest, CustomValue, DebugDetails, DeveloperOptions, DomainEvent, DomainEventBodyOneOf, EndOfResponseDetails, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ErrorDetails, FileUploadDetails, FunctionCallOptions, FunctionCallOutputOptions, GetStateRequest, GetStateResponse, IdentificationData, IdentificationDataIdOneOf, ImportantTextDetails, InteractiveFormSessionResponseChunk, InteractiveFormSessionResponseChunkOfOneOf, MeaningfulInput, MessageEnvelope, MultiSelectInputDetails, NumberInputDetails, NumberRangeLimit, NumberRangeLimitEndOneOf, Option, OutputInteractiveFormSessionStreamedRequest, OutputInteractiveFormSessionStreamedResponse, RelayAssistantMessageRequest, ReportConversationRequest, Response, RestoreInfo, Role, RoleWithLiterals, SendUserMessageRequest, SendUserMessageStreamedRequest, SeparatorDetails, SignatureDetails, SingleSelectInputDetails, Style, StyleWithLiterals, SubmissionDetails, TextDataDetails, TextDetails, Tool, Type, TypeWithLiterals, Usage, UsageRequest, UserOptions, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
|
|
2
|
+
import { CreateInteractiveFormSessionOptions, InteractiveFormSession, CreateInteractiveFormSessionStreamedOptions, CreateInteractiveFormSessionStreamedResponse, SendUserMessageOptions, SendUserMessageResponse, SendUserMessageApplicationErrors, SendUserMessageStreamedOptions, SendUserMessageStreamedResponse, SendUserMessageStreamedApplicationErrors } from './index.typings.mjs';
|
|
3
|
+
export { AcknowledgmentResponse, ActionEvent, AssistantOptions, Call, CallToolsRequest, CallToolsResponse, ChunkType, ChunkTypeWithLiterals, ClientTime, ContextMessage, ContextMessageOptionsOneOf, ConverseRequest, ConverseRequestRequestOneOf, ConverseResponse, ConverseResponseResponseOneOf, CreateInteractiveFormSessionRequest, CreateInteractiveFormSessionResponse, CreateInteractiveFormSessionStreamedRequest, CustomValue, DebugDetails, DeveloperOptions, DomainEvent, DomainEventBodyOneOf, EndOfResponseDetails, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ErrorDetails, FileUploadDetails, FunctionCallOptions, FunctionCallOutputOptions, GetStateRequest, GetStateResponse, IdentificationData, IdentificationDataIdOneOf, ImportantTextDetails, InteractiveFormSessionResponseChunk, InteractiveFormSessionResponseChunkOfOneOf, MeaningfulInput, MessageEnvelope, MultiSelectInputDetails, NumberInputDetails, NumberRangeLimit, NumberRangeLimitEndOneOf, Option, OutputInteractiveFormSessionStreamedRequest, OutputInteractiveFormSessionStreamedResponse, RelayAssistantMessageRequest, ReportConversationRequest, ReportConversationResponse, Response, RestoreInfo, Role, RoleWithLiterals, SendUserMessageRequest, SendUserMessageStreamedRequest, SeparatorDetails, SignatureDetails, SingleSelectInputDetails, Style, StyleWithLiterals, SubmissionDetails, TextDataDetails, TextDetails, Tool, Type, TypeWithLiterals, Usage, UsageRequest, UserOptions, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
declare function createInteractiveFormSession$1(httpClient: HttpClient): CreateInteractiveFormSessionSignature;
|
|
6
6
|
interface CreateInteractiveFormSessionSignature {
|
|
@@ -39,18 +39,10 @@ interface SendUserMessageStreamedSignature {
|
|
|
39
39
|
__applicationErrorsType?: SendUserMessageStreamedApplicationErrors;
|
|
40
40
|
}>;
|
|
41
41
|
}
|
|
42
|
-
declare function reportConversation$1(httpClient: HttpClient): ReportConversationSignature;
|
|
43
|
-
interface ReportConversationSignature {
|
|
44
|
-
/**
|
|
45
|
-
* Report conversation for quality assurance
|
|
46
|
-
*/
|
|
47
|
-
(options?: ReportConversationOptions): Promise<ReportConversationResponse>;
|
|
48
|
-
}
|
|
49
42
|
|
|
50
43
|
declare const createInteractiveFormSession: MaybeContext<BuildRESTFunction<typeof createInteractiveFormSession$1> & typeof createInteractiveFormSession$1>;
|
|
51
44
|
declare const createInteractiveFormSessionStreamed: MaybeContext<BuildRESTFunction<typeof createInteractiveFormSessionStreamed$1> & typeof createInteractiveFormSessionStreamed$1>;
|
|
52
45
|
declare const sendUserMessage: MaybeContext<BuildRESTFunction<typeof sendUserMessage$1> & typeof sendUserMessage$1>;
|
|
53
46
|
declare const sendUserMessageStreamed: MaybeContext<BuildRESTFunction<typeof sendUserMessageStreamed$1> & typeof sendUserMessageStreamed$1>;
|
|
54
|
-
declare const reportConversation: MaybeContext<BuildRESTFunction<typeof reportConversation$1> & typeof reportConversation$1>;
|
|
55
47
|
|
|
56
|
-
export { CreateInteractiveFormSessionOptions, CreateInteractiveFormSessionStreamedOptions, CreateInteractiveFormSessionStreamedResponse, InteractiveFormSession,
|
|
48
|
+
export { CreateInteractiveFormSessionOptions, CreateInteractiveFormSessionStreamedOptions, CreateInteractiveFormSessionStreamedResponse, InteractiveFormSession, SendUserMessageApplicationErrors, SendUserMessageOptions, SendUserMessageResponse, SendUserMessageStreamedApplicationErrors, SendUserMessageStreamedOptions, SendUserMessageStreamedResponse, createInteractiveFormSession, createInteractiveFormSessionStreamed, sendUserMessage, sendUserMessageStreamed };
|
package/build/es/index.mjs
CHANGED
|
@@ -51,6 +51,10 @@ function resolveWixFormsAiV1InteractiveFormSessionsServiceUrl(opts) {
|
|
|
51
51
|
{
|
|
52
52
|
srcPath: "/forms/ai/v1/chat-settings",
|
|
53
53
|
destPath: "/v1/chat-settings"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
srcPath: "/forms/ai/v1/interactive-form-sessions",
|
|
57
|
+
destPath: "/v1/interactive-form-sessions"
|
|
54
58
|
}
|
|
55
59
|
],
|
|
56
60
|
"*.dev.wix-code.com": [
|
|
@@ -203,24 +207,6 @@ function sendUserMessageStreamed(payload) {
|
|
|
203
207
|
}
|
|
204
208
|
return __sendUserMessageStreamed;
|
|
205
209
|
}
|
|
206
|
-
function reportConversation(payload) {
|
|
207
|
-
function __reportConversation({ host }) {
|
|
208
|
-
const metadata = {
|
|
209
|
-
entityFqdn: "wix.forms.ai.v1.interactive_form_session",
|
|
210
|
-
method: "POST",
|
|
211
|
-
methodFqn: "wix.forms.ai.v1.InteractiveFormSessionsService.ReportConversation",
|
|
212
|
-
packageName: PACKAGE_NAME,
|
|
213
|
-
url: resolveWixFormsAiV1InteractiveFormSessionsServiceUrl({
|
|
214
|
-
protoPath: "/v1/interactive-form-sessions/report",
|
|
215
|
-
data: payload,
|
|
216
|
-
host
|
|
217
|
-
}),
|
|
218
|
-
data: payload
|
|
219
|
-
};
|
|
220
|
-
return metadata;
|
|
221
|
-
}
|
|
222
|
-
return __reportConversation;
|
|
223
|
-
}
|
|
224
210
|
|
|
225
211
|
// src/forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.ts
|
|
226
212
|
var ChunkType = /* @__PURE__ */ ((ChunkType2) => {
|
|
@@ -410,37 +396,6 @@ async function sendUserMessageStreamed2(interactiveFormSessionId, options) {
|
|
|
410
396
|
throw transformedError;
|
|
411
397
|
}
|
|
412
398
|
}
|
|
413
|
-
async function reportConversation2(options) {
|
|
414
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
415
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
416
|
-
interactiveFormSessionId: options?.interactiveFormSessionId,
|
|
417
|
-
description: options?.description,
|
|
418
|
-
viewerDebugUrl: options?.viewerDebugUrl
|
|
419
|
-
});
|
|
420
|
-
const reqOpts = reportConversation(payload);
|
|
421
|
-
sideEffects?.onSiteCall?.();
|
|
422
|
-
try {
|
|
423
|
-
const result = await httpClient.request(reqOpts);
|
|
424
|
-
sideEffects?.onSuccess?.(result);
|
|
425
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
426
|
-
} catch (err) {
|
|
427
|
-
const transformedError = sdkTransformError(
|
|
428
|
-
err,
|
|
429
|
-
{
|
|
430
|
-
spreadPathsToArguments: {},
|
|
431
|
-
explicitPathsToArguments: {
|
|
432
|
-
interactiveFormSessionId: "$[0].interactiveFormSessionId",
|
|
433
|
-
description: "$[0].description",
|
|
434
|
-
viewerDebugUrl: "$[0].viewerDebugUrl"
|
|
435
|
-
},
|
|
436
|
-
singleArgumentUnchanged: false
|
|
437
|
-
},
|
|
438
|
-
["options"]
|
|
439
|
-
);
|
|
440
|
-
sideEffects?.onError?.(err);
|
|
441
|
-
throw transformedError;
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
399
|
|
|
445
400
|
// src/forms-ai-v1-interactive-form-session-interactive-form-sessions.public.ts
|
|
446
401
|
function createInteractiveFormSession3(httpClient) {
|
|
@@ -475,13 +430,6 @@ function sendUserMessageStreamed3(httpClient) {
|
|
|
475
430
|
{ httpClient }
|
|
476
431
|
);
|
|
477
432
|
}
|
|
478
|
-
function reportConversation3(httpClient) {
|
|
479
|
-
return (options) => reportConversation2(
|
|
480
|
-
options,
|
|
481
|
-
// @ts-ignore
|
|
482
|
-
{ httpClient }
|
|
483
|
-
);
|
|
484
|
-
}
|
|
485
433
|
|
|
486
434
|
// src/forms-ai-v1-interactive-form-session-interactive-form-sessions.context.ts
|
|
487
435
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
@@ -489,7 +437,6 @@ var createInteractiveFormSession4 = /* @__PURE__ */ createRESTModule(createInter
|
|
|
489
437
|
var createInteractiveFormSessionStreamed4 = /* @__PURE__ */ createRESTModule(createInteractiveFormSessionStreamed3);
|
|
490
438
|
var sendUserMessage4 = /* @__PURE__ */ createRESTModule(sendUserMessage3);
|
|
491
439
|
var sendUserMessageStreamed4 = /* @__PURE__ */ createRESTModule(sendUserMessageStreamed3);
|
|
492
|
-
var reportConversation4 = /* @__PURE__ */ createRESTModule(reportConversation3);
|
|
493
440
|
export {
|
|
494
441
|
ChunkType,
|
|
495
442
|
Role,
|
|
@@ -498,7 +445,6 @@ export {
|
|
|
498
445
|
WebhookIdentityType,
|
|
499
446
|
createInteractiveFormSession4 as createInteractiveFormSession,
|
|
500
447
|
createInteractiveFormSessionStreamed4 as createInteractiveFormSessionStreamed,
|
|
501
|
-
reportConversation4 as reportConversation,
|
|
502
448
|
sendUserMessage4 as sendUserMessage,
|
|
503
449
|
sendUserMessageStreamed4 as sendUserMessageStreamed
|
|
504
450
|
};
|
package/build/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.ts","../../src/forms-ai-v1-interactive-form-session-interactive-form-sessions.http.ts","../../src/forms-ai-v1-interactive-form-session-interactive-form-sessions.public.ts","../../src/forms-ai-v1-interactive-form-session-interactive-form-sessions.context.ts"],"sourcesContent":["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","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateInteractiveFormSessionOptions,\n CreateInteractiveFormSessionStreamedOptions,\n CreateInteractiveFormSessionStreamedResponse,\n InteractiveFormSession,\n ReportConversationOptions,\n ReportConversationResponse,\n SendUserMessageApplicationErrors,\n SendUserMessageOptions,\n SendUserMessageResponse,\n SendUserMessageStreamedApplicationErrors,\n SendUserMessageStreamedOptions,\n SendUserMessageStreamedResponse,\n createInteractiveFormSession as universalCreateInteractiveFormSession,\n createInteractiveFormSessionStreamed as universalCreateInteractiveFormSessionStreamed,\n reportConversation as universalReportConversation,\n sendUserMessage as universalSendUserMessage,\n sendUserMessageStreamed as universalSendUserMessageStreamed,\n} from './forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/forms' };\n\nexport function createInteractiveFormSession(\n httpClient: HttpClient\n): CreateInteractiveFormSessionSignature {\n return (formId: string, options?: CreateInteractiveFormSessionOptions) =>\n universalCreateInteractiveFormSession(\n formId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateInteractiveFormSessionSignature {\n /**\n * Starts interactive form session for a given form\n * @param - Interactive form session to be created.\n * @returns Interactive form session created\n */\n (formId: string, options?: CreateInteractiveFormSessionOptions): Promise<\n NonNullablePaths<InteractiveFormSession, `_id` | `formId`, 2>\n >;\n}\n\nexport function createInteractiveFormSessionStreamed(\n httpClient: HttpClient\n): CreateInteractiveFormSessionStreamedSignature {\n return (\n formId: string,\n options?: CreateInteractiveFormSessionStreamedOptions\n ) =>\n universalCreateInteractiveFormSessionStreamed(\n formId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateInteractiveFormSessionStreamedSignature {\n /**\n * Starts interactive form session for a given form with streamed response\n * @param - Interactive form session to be created.\n */\n (\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}\n\nexport function sendUserMessage(\n httpClient: HttpClient\n): SendUserMessageSignature {\n return (interactiveFormSessionId: string, options?: SendUserMessageOptions) =>\n universalSendUserMessage(\n interactiveFormSessionId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SendUserMessageSignature {\n /**\n * Sends user message to the interactive form session\n * @param - Interactive form session id\n */\n (interactiveFormSessionId: string, options?: SendUserMessageOptions): 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}\n\nexport function sendUserMessageStreamed(\n httpClient: HttpClient\n): SendUserMessageStreamedSignature {\n return (\n interactiveFormSessionId: string,\n options?: SendUserMessageStreamedOptions\n ) =>\n universalSendUserMessageStreamed(\n interactiveFormSessionId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SendUserMessageStreamedSignature {\n /**\n * Sends user message to the interactive form session with streamed response\n * @param - Interactive form session id\n */\n (\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}\n\nexport function reportConversation(\n httpClient: HttpClient\n): ReportConversationSignature {\n return (options?: ReportConversationOptions) =>\n universalReportConversation(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ReportConversationSignature {\n /**\n * Report conversation for quality assurance\n */\n (options?: ReportConversationOptions): Promise<ReportConversationResponse>;\n}\n\nexport {\n AcknowledgmentResponse,\n ActionEvent,\n AssistantOptions,\n Call,\n CallToolsRequest,\n CallToolsResponse,\n ChunkType,\n ClientTime,\n ContextMessage,\n ContextMessageOptionsOneOf,\n ConverseRequest,\n ConverseRequestRequestOneOf,\n ConverseResponse,\n ConverseResponseResponseOneOf,\n CreateInteractiveFormSessionOptions,\n CreateInteractiveFormSessionRequest,\n CreateInteractiveFormSessionResponse,\n CreateInteractiveFormSessionStreamedOptions,\n CreateInteractiveFormSessionStreamedRequest,\n CreateInteractiveFormSessionStreamedResponse,\n CustomValue,\n DebugDetails,\n DeveloperOptions,\n DomainEvent,\n DomainEventBodyOneOf,\n EndOfResponseDetails,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n ErrorDetails,\n FileUploadDetails,\n FunctionCallOptions,\n FunctionCallOutputOptions,\n GetStateRequest,\n GetStateResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ImportantTextDetails,\n InteractiveFormSession,\n InteractiveFormSessionResponseChunk,\n InteractiveFormSessionResponseChunkOfOneOf,\n MeaningfulInput,\n MessageEnvelope,\n MultiSelectInputDetails,\n NumberInputDetails,\n NumberRangeLimit,\n NumberRangeLimitEndOneOf,\n Option,\n OutputInteractiveFormSessionStreamedRequest,\n OutputInteractiveFormSessionStreamedResponse,\n RelayAssistantMessageRequest,\n ReportConversationOptions,\n ReportConversationRequest,\n ReportConversationResponse,\n Response,\n RestoreInfo,\n Role,\n SendUserMessageOptions,\n SendUserMessageRequest,\n SendUserMessageResponse,\n SendUserMessageStreamedOptions,\n SendUserMessageStreamedRequest,\n SendUserMessageStreamedResponse,\n SeparatorDetails,\n SignatureDetails,\n SingleSelectInputDetails,\n Style,\n SubmissionDetails,\n TextDataDetails,\n TextDetails,\n Tool,\n Type,\n Usage,\n UsageRequest,\n UserOptions,\n WebhookIdentityType,\n} from './forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.js';\n","import {\n createInteractiveFormSession as publicCreateInteractiveFormSession,\n createInteractiveFormSessionStreamed as publicCreateInteractiveFormSessionStreamed,\n sendUserMessage as publicSendUserMessage,\n sendUserMessageStreamed as publicSendUserMessageStreamed,\n reportConversation as publicReportConversation,\n} from './forms-ai-v1-interactive-form-session-interactive-form-sessions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const createInteractiveFormSession: MaybeContext<\n BuildRESTFunction<typeof publicCreateInteractiveFormSession> &\n typeof publicCreateInteractiveFormSession\n> = /*#__PURE__*/ createRESTModule(publicCreateInteractiveFormSession);\nexport const createInteractiveFormSessionStreamed: MaybeContext<\n BuildRESTFunction<typeof publicCreateInteractiveFormSessionStreamed> &\n typeof publicCreateInteractiveFormSessionStreamed\n> = /*#__PURE__*/ createRESTModule(publicCreateInteractiveFormSessionStreamed);\nexport const sendUserMessage: MaybeContext<\n BuildRESTFunction<typeof publicSendUserMessage> & typeof publicSendUserMessage\n> = /*#__PURE__*/ createRESTModule(publicSendUserMessage);\nexport const sendUserMessageStreamed: MaybeContext<\n BuildRESTFunction<typeof publicSendUserMessageStreamed> &\n typeof publicSendUserMessageStreamed\n> = /*#__PURE__*/ createRESTModule(publicSendUserMessageStreamed);\nexport const reportConversation: MaybeContext<\n BuildRESTFunction<typeof publicReportConversation> &\n typeof publicReportConversation\n> = /*#__PURE__*/ createRESTModule(publicReportConversation);\n\nexport {\n ChunkType,\n Style,\n Type,\n Role,\n WebhookIdentityType,\n} from './forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.js';\nexport {\n InteractiveFormSession,\n CreateInteractiveFormSessionRequest,\n ClientTime,\n CreateInteractiveFormSessionResponse,\n InteractiveFormSessionResponseChunk,\n InteractiveFormSessionResponseChunkOfOneOf,\n TextDetails,\n TextDataDetails,\n MultiSelectInputDetails,\n Option,\n CustomValue,\n NumberInputDetails,\n NumberRangeLimit,\n NumberRangeLimitEndOneOf,\n SeparatorDetails,\n SingleSelectInputDetails,\n ErrorDetails,\n SubmissionDetails,\n ImportantTextDetails,\n DebugDetails,\n EndOfResponseDetails,\n FileUploadDetails,\n SignatureDetails,\n MeaningfulInput,\n CreateInteractiveFormSessionStreamedRequest,\n CreateInteractiveFormSessionStreamedResponse,\n SendUserMessageRequest,\n SendUserMessageResponse,\n SendUserMessageStreamedRequest,\n SendUserMessageStreamedResponse,\n ConverseRequest,\n ConverseRequestRequestOneOf,\n GetStateRequest,\n CallToolsRequest,\n Call,\n RelayAssistantMessageRequest,\n UsageRequest,\n Usage,\n ConverseResponse,\n ConverseResponseResponseOneOf,\n GetStateResponse,\n Tool,\n ContextMessage,\n ContextMessageOptionsOneOf,\n UserOptions,\n AssistantOptions,\n FunctionCallOptions,\n FunctionCallOutputOptions,\n DeveloperOptions,\n CallToolsResponse,\n Response,\n AcknowledgmentResponse,\n OutputInteractiveFormSessionStreamedRequest,\n OutputInteractiveFormSessionStreamedResponse,\n ReportConversationRequest,\n ReportConversationResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n CreateInteractiveFormSessionOptions,\n CreateInteractiveFormSessionStreamedOptions,\n SendUserMessageOptions,\n SendUserMessageStreamedOptions,\n ReportConversationOptions,\n} from './forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.js';\nexport {\n ChunkTypeWithLiterals,\n StyleWithLiterals,\n TypeWithLiterals,\n RoleWithLiterals,\n WebhookIdentityTypeWithLiterals,\n SendUserMessageApplicationErrors,\n SendUserMessageStreamedApplicationErrors,\n} from './forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,qDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;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AAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACtNA,SAAS,wBAAwB;AAG1B,IAAMC,gCAGK,iCAAiBA,6BAAkC;AAC9D,IAAMC,wCAGK,iCAAiBA,qCAA0C;AACtE,IAAMC,mBAEK,iCAAiBA,gBAAqB;AACjD,IAAMC,2BAGK,iCAAiBA,wBAA6B;AACzD,IAAMC,sBAGK,iCAAiBA,mBAAwB;","names":["payload","ChunkType","Style","Type","Role","WebhookIdentityType","createInteractiveFormSession","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed","reportConversation","createInteractiveFormSession","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed","reportConversation","createInteractiveFormSession","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed","reportConversation"]}
|
|
1
|
+
{"version":3,"sources":["../../src/forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.ts","../../src/forms-ai-v1-interactive-form-session-interactive-form-sessions.http.ts","../../src/forms-ai-v1-interactive-form-session-interactive-form-sessions.public.ts","../../src/forms-ai-v1-interactive-form-session-interactive-form-sessions.context.ts"],"sourcesContent":["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","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 srcPath: '/forms/ai/v1/interactive-form-sessions',\n destPath: '/v1/interactive-form-sessions',\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","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateInteractiveFormSessionOptions,\n CreateInteractiveFormSessionStreamedOptions,\n CreateInteractiveFormSessionStreamedResponse,\n InteractiveFormSession,\n SendUserMessageApplicationErrors,\n SendUserMessageOptions,\n SendUserMessageResponse,\n SendUserMessageStreamedApplicationErrors,\n SendUserMessageStreamedOptions,\n SendUserMessageStreamedResponse,\n createInteractiveFormSession as universalCreateInteractiveFormSession,\n createInteractiveFormSessionStreamed as universalCreateInteractiveFormSessionStreamed,\n sendUserMessage as universalSendUserMessage,\n sendUserMessageStreamed as universalSendUserMessageStreamed,\n} from './forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/forms' };\n\nexport function createInteractiveFormSession(\n httpClient: HttpClient\n): CreateInteractiveFormSessionSignature {\n return (formId: string, options?: CreateInteractiveFormSessionOptions) =>\n universalCreateInteractiveFormSession(\n formId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateInteractiveFormSessionSignature {\n /**\n * Starts interactive form session for a given form\n * @param - Interactive form session to be created.\n * @returns Interactive form session created\n */\n (formId: string, options?: CreateInteractiveFormSessionOptions): Promise<\n NonNullablePaths<InteractiveFormSession, `_id` | `formId`, 2>\n >;\n}\n\nexport function createInteractiveFormSessionStreamed(\n httpClient: HttpClient\n): CreateInteractiveFormSessionStreamedSignature {\n return (\n formId: string,\n options?: CreateInteractiveFormSessionStreamedOptions\n ) =>\n universalCreateInteractiveFormSessionStreamed(\n formId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateInteractiveFormSessionStreamedSignature {\n /**\n * Starts interactive form session for a given form with streamed response\n * @param - Interactive form session to be created.\n */\n (\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}\n\nexport function sendUserMessage(\n httpClient: HttpClient\n): SendUserMessageSignature {\n return (interactiveFormSessionId: string, options?: SendUserMessageOptions) =>\n universalSendUserMessage(\n interactiveFormSessionId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SendUserMessageSignature {\n /**\n * Sends user message to the interactive form session\n * @param - Interactive form session id\n */\n (interactiveFormSessionId: string, options?: SendUserMessageOptions): 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}\n\nexport function sendUserMessageStreamed(\n httpClient: HttpClient\n): SendUserMessageStreamedSignature {\n return (\n interactiveFormSessionId: string,\n options?: SendUserMessageStreamedOptions\n ) =>\n universalSendUserMessageStreamed(\n interactiveFormSessionId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SendUserMessageStreamedSignature {\n /**\n * Sends user message to the interactive form session with streamed response\n * @param - Interactive form session id\n */\n (\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}\n\nexport {\n AcknowledgmentResponse,\n ActionEvent,\n AssistantOptions,\n Call,\n CallToolsRequest,\n CallToolsResponse,\n ChunkType,\n ClientTime,\n ContextMessage,\n ContextMessageOptionsOneOf,\n ConverseRequest,\n ConverseRequestRequestOneOf,\n ConverseResponse,\n ConverseResponseResponseOneOf,\n CreateInteractiveFormSessionOptions,\n CreateInteractiveFormSessionRequest,\n CreateInteractiveFormSessionResponse,\n CreateInteractiveFormSessionStreamedOptions,\n CreateInteractiveFormSessionStreamedRequest,\n CreateInteractiveFormSessionStreamedResponse,\n CustomValue,\n DebugDetails,\n DeveloperOptions,\n DomainEvent,\n DomainEventBodyOneOf,\n EndOfResponseDetails,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n ErrorDetails,\n FileUploadDetails,\n FunctionCallOptions,\n FunctionCallOutputOptions,\n GetStateRequest,\n GetStateResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ImportantTextDetails,\n InteractiveFormSession,\n InteractiveFormSessionResponseChunk,\n InteractiveFormSessionResponseChunkOfOneOf,\n MeaningfulInput,\n MessageEnvelope,\n MultiSelectInputDetails,\n NumberInputDetails,\n NumberRangeLimit,\n NumberRangeLimitEndOneOf,\n Option,\n OutputInteractiveFormSessionStreamedRequest,\n OutputInteractiveFormSessionStreamedResponse,\n RelayAssistantMessageRequest,\n ReportConversationRequest,\n ReportConversationResponse,\n Response,\n RestoreInfo,\n Role,\n SendUserMessageOptions,\n SendUserMessageRequest,\n SendUserMessageResponse,\n SendUserMessageStreamedOptions,\n SendUserMessageStreamedRequest,\n SendUserMessageStreamedResponse,\n SeparatorDetails,\n SignatureDetails,\n SingleSelectInputDetails,\n Style,\n SubmissionDetails,\n TextDataDetails,\n TextDetails,\n Tool,\n Type,\n Usage,\n UsageRequest,\n UserOptions,\n WebhookIdentityType,\n} from './forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.js';\n","import {\n createInteractiveFormSession as publicCreateInteractiveFormSession,\n createInteractiveFormSessionStreamed as publicCreateInteractiveFormSessionStreamed,\n sendUserMessage as publicSendUserMessage,\n sendUserMessageStreamed as publicSendUserMessageStreamed,\n} from './forms-ai-v1-interactive-form-session-interactive-form-sessions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const createInteractiveFormSession: MaybeContext<\n BuildRESTFunction<typeof publicCreateInteractiveFormSession> &\n typeof publicCreateInteractiveFormSession\n> = /*#__PURE__*/ createRESTModule(publicCreateInteractiveFormSession);\nexport const createInteractiveFormSessionStreamed: MaybeContext<\n BuildRESTFunction<typeof publicCreateInteractiveFormSessionStreamed> &\n typeof publicCreateInteractiveFormSessionStreamed\n> = /*#__PURE__*/ createRESTModule(publicCreateInteractiveFormSessionStreamed);\nexport const sendUserMessage: MaybeContext<\n BuildRESTFunction<typeof publicSendUserMessage> & typeof publicSendUserMessage\n> = /*#__PURE__*/ createRESTModule(publicSendUserMessage);\nexport const sendUserMessageStreamed: MaybeContext<\n BuildRESTFunction<typeof publicSendUserMessageStreamed> &\n typeof publicSendUserMessageStreamed\n> = /*#__PURE__*/ createRESTModule(publicSendUserMessageStreamed);\n\nexport {\n ChunkType,\n Style,\n Type,\n Role,\n WebhookIdentityType,\n} from './forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.js';\nexport {\n InteractiveFormSession,\n CreateInteractiveFormSessionRequest,\n ClientTime,\n CreateInteractiveFormSessionResponse,\n InteractiveFormSessionResponseChunk,\n InteractiveFormSessionResponseChunkOfOneOf,\n TextDetails,\n TextDataDetails,\n MultiSelectInputDetails,\n Option,\n CustomValue,\n NumberInputDetails,\n NumberRangeLimit,\n NumberRangeLimitEndOneOf,\n SeparatorDetails,\n SingleSelectInputDetails,\n ErrorDetails,\n SubmissionDetails,\n ImportantTextDetails,\n DebugDetails,\n EndOfResponseDetails,\n FileUploadDetails,\n SignatureDetails,\n MeaningfulInput,\n CreateInteractiveFormSessionStreamedRequest,\n CreateInteractiveFormSessionStreamedResponse,\n SendUserMessageRequest,\n SendUserMessageResponse,\n SendUserMessageStreamedRequest,\n SendUserMessageStreamedResponse,\n ConverseRequest,\n ConverseRequestRequestOneOf,\n GetStateRequest,\n CallToolsRequest,\n Call,\n RelayAssistantMessageRequest,\n UsageRequest,\n Usage,\n ConverseResponse,\n ConverseResponseResponseOneOf,\n GetStateResponse,\n Tool,\n ContextMessage,\n ContextMessageOptionsOneOf,\n UserOptions,\n AssistantOptions,\n FunctionCallOptions,\n FunctionCallOutputOptions,\n DeveloperOptions,\n CallToolsResponse,\n Response,\n AcknowledgmentResponse,\n OutputInteractiveFormSessionStreamedRequest,\n OutputInteractiveFormSessionStreamedResponse,\n ReportConversationRequest,\n ReportConversationResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n CreateInteractiveFormSessionOptions,\n CreateInteractiveFormSessionStreamedOptions,\n SendUserMessageOptions,\n SendUserMessageStreamedOptions,\n} from './forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.js';\nexport {\n ChunkTypeWithLiterals,\n StyleWithLiterals,\n TypeWithLiterals,\n RoleWithLiterals,\n WebhookIdentityTypeWithLiterals,\n SendUserMessageApplicationErrors,\n SendUserMessageStreamedApplicationErrors,\n} from './forms-ai-v1-interactive-form-session-interactive-form-sessions.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;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,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;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","names":["payload","ChunkType","Style","Type","Role","WebhookIdentityType","createInteractiveFormSession","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed","createInteractiveFormSession","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed","createInteractiveFormSession","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed"]}
|
|
@@ -1052,31 +1052,5 @@ interface SendUserMessageStreamedOptions {
|
|
|
1052
1052
|
*/
|
|
1053
1053
|
currentValues?: Record<string, any> | null;
|
|
1054
1054
|
}
|
|
1055
|
-
/**
|
|
1056
|
-
* Report conversation for quality assurance
|
|
1057
|
-
* @public
|
|
1058
|
-
* @documentationMaturity preview
|
|
1059
|
-
* @permissionId WIX_FORMS.REPORT_INTERACTIVE_FORM_SESSION
|
|
1060
|
-
* @fqn wix.forms.ai.v1.InteractiveFormSessionsService.ReportConversation
|
|
1061
|
-
*/
|
|
1062
|
-
declare function reportConversation(options?: ReportConversationOptions): Promise<ReportConversationResponse>;
|
|
1063
|
-
interface ReportConversationOptions {
|
|
1064
|
-
/**
|
|
1065
|
-
* Interactive form session id
|
|
1066
|
-
* @format GUID
|
|
1067
|
-
*/
|
|
1068
|
-
interactiveFormSessionId?: string;
|
|
1069
|
-
/**
|
|
1070
|
-
* Report description
|
|
1071
|
-
* @minLength 1
|
|
1072
|
-
* @maxLength 10000
|
|
1073
|
-
*/
|
|
1074
|
-
description?: string;
|
|
1075
|
-
/**
|
|
1076
|
-
* Viewer debug URL of the conversation
|
|
1077
|
-
* @format WEB_URL
|
|
1078
|
-
*/
|
|
1079
|
-
viewerDebugUrl?: string;
|
|
1080
|
-
}
|
|
1081
1055
|
|
|
1082
|
-
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
|
|
1056
|
+
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 };
|