@wix/auto_sdk_forms_interactive-form-sessions 1.0.7 → 1.0.9

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.
@@ -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\n/**\n * An interactive form session enables AI-powered conversational form completion.\n * The session maintains conversation context and tracks form data extraction throughout\n * the user's interaction with the AI assistant.\n */\nexport interface InteractiveFormSession {\n /**\n * Interactive form session ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Form ID.\n * @format GUID\n */\n formId?: string;\n}\n\nexport interface CreateInteractiveFormSessionRequest {\n /**\n * Form ID to create an interactive session for.\n * @format GUID\n */\n formId: string;\n /**\n * Custom prompt ID to use for the AI assistant's conversation style and behavior.\n * When not provided, uses the form's default chat settings configured in the Chat Settings API.\n * @format GUID\n */\n promptId?: string | null;\n /**\n * Pre-filled values to apply to the form, to initialize the session with existing data.\n * Field keys must match the form schema field names.\n * For example: `{\"firstName\": \"John\", \"email\": \"john@example.com\", \"age\": 25}`.\n * These values are merged with any data extracted during the conversation.\n */\n currentValues?: Record<string, any> | null;\n /**\n * Whether the session should run in dry run mode for testing and preview purposes.\n * In dry run mode, the full conversational flow works normally and form data is extracted,\n * but no actual form submission occurs.\n * @immutable\n */\n dryRun?: boolean;\n /** Current date-time of api client. */\n clientTime?: ClientTime;\n}\n\nexport interface ClientTime {\n /**\n * Current date and time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC format.\n * For example, `2023-10-01T12:00:00Z`.\n * @minLength 1\n * @maxLength 200\n */\n currentTime?: string | null;\n /**\n * Caller's timezone identifier for localizing date and time values in IANA timezone format (for example, `Europe/Vilnius`, `America/New_York`).\n * @minLength 1\n * @maxLength 50\n */\n timeZone?: string | null;\n}\n\nexport interface CreateInteractiveFormSessionResponse {\n /** Created interactive form session. */\n interactiveFormSession?: InteractiveFormSession;\n /** AI assistant response chunks for the interactive form session. */\n responseChunks?: InteractiveFormSessionResponseChunk[];\n}\n\n/**\n * AI assistant response chunk, containing different types of conversational content.\n * Chunks are delivered sequentially and must be processed in order to build the complete\n * conversation interface. Each chunk type requires different UI handling.\n */\nexport interface InteractiveFormSessionResponseChunk\n extends InteractiveFormSessionResponseChunkOfOneOf {\n /** Conversational text message for display to the user. */\n textDetails?: TextDetails;\n /** Structured data extracted from user input and mapped to specific form fields. */\n textDataDetails?: TextDataDetails;\n /** Selector for selecting multiple options from a predefined list. */\n multiSelectInputDetails?: MultiSelectInputDetails;\n /** Selector for numeric input with optional range and validation constraints. */\n numberInputDetails?: NumberInputDetails;\n /** Visual separator element for organizing conversation flow. */\n separatorDetails?: SeparatorDetails;\n /** Selector for selecting a single option from a predefined list. */\n singleSelectInputDetails?: SingleSelectInputDetails;\n /** Error information when processing fails or validation errors occur. */\n errorDetails?: ErrorDetails;\n /** Form submission confirmation containing form submission ID and ecom checkout ID, if relevant. */\n submissionDetails?: SubmissionDetails;\n /** Important contextual information that may influence data extraction or user decisions. */\n importantTextDetails?: ImportantTextDetails;\n /** Diagnostic information for development, debugging, and performance monitoring. */\n debugDetails?: DebugDetails;\n /** Stream completion signal indicating no more chunks will be sent in this response. */\n endOfResponseDetails?: EndOfResponseDetails;\n /** Input for file upload with field targeting. Not supported. */\n fileUploadDetails?: FileUploadDetails;\n /** Input for digital signature capture with field targeting. Not supported. */\n signatureDetails?: SignatureDetails;\n /** Response chunk type, that determines how the content should be processed and displayed. */\n chunkType?: ChunkTypeWithLiterals;\n /**\n * Indicates which portion of the original user input was meaningful for data extraction.\n * Can be used to highlight relevant parts of the user's message in the UI.\n */\n meaningfulInput?: MeaningfulInput;\n}\n\n/** @oneof */\nexport interface InteractiveFormSessionResponseChunkOfOneOf {\n /** Conversational text message for display to the user. */\n textDetails?: TextDetails;\n /** Structured data extracted from user input and mapped to specific form fields. */\n textDataDetails?: TextDataDetails;\n /** Selector for selecting multiple options from a predefined list. */\n multiSelectInputDetails?: MultiSelectInputDetails;\n /** Selector for numeric input with optional range and validation constraints. */\n numberInputDetails?: NumberInputDetails;\n /** Visual separator element for organizing conversation flow. */\n separatorDetails?: SeparatorDetails;\n /** Selector for selecting a single option from a predefined list. */\n singleSelectInputDetails?: SingleSelectInputDetails;\n /** Error information when processing fails or validation errors occur. */\n errorDetails?: ErrorDetails;\n /** Form submission confirmation containing form submission ID and ecom checkout ID, if relevant. */\n submissionDetails?: SubmissionDetails;\n /** Important contextual information that may influence data extraction or user decisions. */\n importantTextDetails?: ImportantTextDetails;\n /** Diagnostic information for development, debugging, and performance monitoring. */\n debugDetails?: DebugDetails;\n /** Stream completion signal indicating no more chunks will be sent in this response. */\n endOfResponseDetails?: EndOfResponseDetails;\n /** Input for file upload with field targeting. Not supported. */\n fileUploadDetails?: FileUploadDetails;\n /** Input for digital signature capture with field targeting. Not supported. */\n signatureDetails?: SignatureDetails;\n}\n\nexport enum ChunkType {\n /** Unknown chunk type. */\n UNKNOWN_CHUNK_TYPE = 'UNKNOWN_CHUNK_TYPE',\n /** Text message for display to the user. */\n TEXT = 'TEXT',\n /** Structured data extracted from user input and mapped to form fields. */\n TEXT_DATA = 'TEXT_DATA',\n /** Selector for selecting multiple options from a list. */\n MULTI_SELECT_INPUT = 'MULTI_SELECT_INPUT',\n /** Selector for numeric input with optional validation. */\n NUMBER_INPUT = 'NUMBER_INPUT',\n /** Visual separator element such as paragraph breaks. */\n SEPARATOR = 'SEPARATOR',\n /** Selector for selecting one option from a list. */\n SINGLE_SELECT_INPUT = 'SINGLE_SELECT_INPUT',\n /** Error message when processing fails or validation errors occur. */\n ERROR = 'ERROR',\n /** Form submission confirmation with submission ID and checkout ID, if relevant. */\n SUBMISSION = 'SUBMISSION',\n /** Highlighted information that may influence form data extraction. */\n IMPORTANT_TEXT = 'IMPORTANT_TEXT',\n /** Diagnostic information for troubleshooting and development. */\n DEBUG = 'DEBUG',\n /** Signals the completion of a response stream. */\n END_OF_RESPONSE = 'END_OF_RESPONSE',\n /** Input for file upload. Not supported. */\n FILE_UPLOAD = 'FILE_UPLOAD',\n /** Input for digital signature capture. Not supported. */\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\n/** Conversational text content from the AI assistant. */\nexport interface TextDetails {\n /**\n * Text content to display to the user.\n * @minLength 1\n * @maxLength 10000\n */\n text?: string;\n /** Text formatting style for visual presentation. */\n style?: StyleWithLiterals;\n}\n\nexport enum Style {\n /** Unknown text style. */\n UNKNOWN_STYLE = 'UNKNOWN_STYLE',\n /** Regular conversational text. */\n NORMAL = 'NORMAL',\n /** Bold text for emphasis. */\n BOLD = 'BOLD',\n}\n\n/** @enumType */\nexport type StyleWithLiterals = Style | 'UNKNOWN_STYLE' | 'NORMAL' | 'BOLD';\n\n/** Structured data extracted from user input and mapped to form fields. */\nexport interface TextDataDetails {\n /**\n * Form field identifier that this extracted data maps to.\n * Matches a field name in the form schema.\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n /**\n * Human-readable text representation of the extracted data to display to the user.\n * @minLength 1\n * @maxLength 10000\n */\n text?: string;\n /**\n * Structured value for form submission (for example, boolean `true`/`false`, number, or string).\n * This is the actual data value that will be submitted with the form.\n */\n value?: any;\n /**\n * User-friendly display representation of the value (for example, \"Yes\"/\"No\" for boolean, \"25 years old\" for age).\n * Use this to display confirmation of what was extracted from the user's input.\n * @minLength 1\n * @maxLength 10000\n */\n displayValue?: string;\n}\n\n/** Interactive prompt for selecting multiple options from a predefined list. */\nexport interface MultiSelectInputDetails {\n /**\n * Form field identifier for the multi-select input.\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n /**\n * Options available for selection, when relevant. Users can choose multiple options from this list.\n * @minSize 1\n * @maxSize 100\n */\n options?: Option[];\n /** When present, allows users to provide custom values not in the predefined options list. */\n allowedCustomValue?: CustomValue;\n}\n\n/** Selection option for input prompts. */\nexport interface Option {\n /**\n * Value to be submitted when this option is selected.\n * This is the technical value used in form processing and submission.\n * @minLength 1\n * @maxLength 10000\n */\n value?: string;\n /**\n * Human-readable label displayed to the user for this option.\n * @minLength 1\n * @maxLength 10000\n */\n label?: string;\n}\n\n/** Custom value configuration for input prompts. */\nexport interface CustomValue {\n /**\n * Description of the expected custom value format or content.\n * Displayed to guide users when they choose to provide a custom option.\n * @maxLength 10000\n */\n description?: string;\n}\n\n/** Interactive prompt for numeric input with validation constraints. */\nexport interface NumberInputDetails {\n /**\n * Form field identifier for the numeric input.\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n /** Minimum and maximum value constraints for the numeric input. */\n rangeLimit?: NumberRangeLimit;\n /**\n * When provided, restricts input to multiples of this value.\n * For example, `2.5` would allow 2.5, 5.0, 7.5, and so on.\n */\n multipleOf?: number | null;\n}\n\n/** Numeric range constraints for number input validation. */\nexport interface NumberRangeLimit extends NumberRangeLimitEndOneOf {\n /** Maximum allowed value (inclusive). */\n maxInclusiveValue?: number | null;\n /** Maximum allowed value (exclusive). */\n maxExclusiveValue?: number | null;\n /** Minimum allowed value (inclusive). */\n minInclusiveValue?: number | null;\n}\n\n/** @oneof */\nexport interface NumberRangeLimitEndOneOf {\n /** Maximum allowed value (inclusive). */\n maxInclusiveValue?: number | null;\n /** Maximum allowed value (exclusive). */\n maxExclusiveValue?: number | null;\n}\n\n/** Visual separator element for organizing conversation flow. */\nexport interface SeparatorDetails {\n /** Type of visual separator to display in the conversation flow. */\n type?: TypeWithLiterals;\n}\n\nexport enum Type {\n /** Unknown separator type. */\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n /** Paragraph break for visual content separation. */\n PARAGRAPH = 'PARAGRAPH',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'UNKNOWN_TYPE' | 'PARAGRAPH';\n\n/** Selector for selecting a single option from a predefined list. */\nexport interface SingleSelectInputDetails {\n /**\n * Form field identifier for the single-select input.\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n /**\n * Options available for selection. Users can choose only one option from this list.\n * @minSize 1\n * @maxSize 100\n */\n options?: Option[];\n /** When present, allows users to provide a custom value not in the predefined options list. */\n allowedCustomValue?: CustomValue;\n}\n\n/** Error information when processing fails or validation errors occur. */\nexport interface ErrorDetails {\n /**\n * Error message detailing what went wrong during processing.\n * For display to the user when the AI cannot process their input or when validation fails.\n * @minLength 1\n * @maxLength 1000\n */\n messageText?: string;\n}\n\n/** Form submission confirmation containing submission and checkout information. */\nexport interface SubmissionDetails {\n /**\n * Form submission ID created when the form is successfully completed and submitted.\n * @format GUID\n */\n submissionId?: string;\n /**\n * Wix eCommerce checkout ID when the form includes payment processing.\n * Only present for forms that have payment fields or are connected to eCommerce flows.\n * @format GUID\n * @readonly\n */\n checkoutId?: string | null;\n}\n\n/** Important contextual information that may influence data extraction or user decisions. */\nexport interface ImportantTextDetails {\n /**\n * Form field identifier that this important information relates to.\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n /**\n * Important contextual information to highlight for the user.\n * This might include validation requirements, format expectations, or clarifying questions.\n * @minLength 1\n * @maxLength 10000\n */\n text?: string;\n}\n\n/** Diagnostic information for development and troubleshooting. */\nexport interface DebugDetails {\n /**\n * Diagnostic data for development and troubleshooting.\n * Contains information such as AI tools called, processing times, and internal state.\n */\n data?: Record<string, any> | null;\n}\n\n/** Stream completion signal indicating the end of a response stream. */\nexport interface EndOfResponseDetails {\n /**\n * Whether the response stream completed successfully.\n * When `false`, there may have been processing errors or interruptions.\n */\n success?: boolean;\n}\n\n/** Interactive prompt for file upload input. */\nexport interface FileUploadDetails {\n /**\n * Form field identifier for the file upload input.\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n}\n\n/** Interactive prompt for digital signature capture. */\nexport interface SignatureDetails {\n /**\n * Form field identifier for the digital signature input.\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n}\n\n/** Indicates which portion of user input was meaningful for data extraction. */\nexport interface MeaningfulInput {\n /**\n * Character position (0-indexed) where the meaningful portion of user input begins.\n * @max 10000\n */\n startOffset?: number;\n /**\n * Length in characters of the meaningful portion of user input.\n * Use this with `startOffset` to highlight the relevant text that was processed for data extraction.\n * @max 10000\n */\n length?: number;\n}\n\nexport interface CreateInteractiveFormSessionStreamedRequest {\n /**\n * Form ID to create an interactive session for.\n * @format GUID\n */\n formId: string;\n /**\n * Custom prompt ID to use for the AI assistant's conversation style and behavior.\n * When not provided, uses the form's default chat settings configured in the Chat Settings API.\n * @format GUID\n */\n promptId?: string | null;\n /**\n * Pre-filled values to apply to the form, to initialize the session with existing data.\n * Field keys must match the form schema field names.\n * For example: `{\"firstName\": \"John\", \"email\": \"john@example.com\", \"age\": 25}`.\n * These values are merged with any data extracted during the conversation.\n */\n currentValues?: Record<string, any> | null;\n /**\n * Whether the session should run in dry run mode when no actual form submission occurs.\n * In dry run mode, the full conversational flow works normally and form data is extracted,\n * but no actual form submission occurs.\n *\n * Default: `false`\n * @immutable\n */\n dryRun?: boolean;\n /** Caller's local date and time. */\n clientTime?: ClientTime;\n}\n\nexport interface CreateInteractiveFormSessionStreamedResponse {\n /**\n * AI assistant response chunk, streamed in real-time.\n * Process each chunk as it arrives to provide progressive user feedback.\n */\n responseChunk?: InteractiveFormSessionResponseChunk;\n /**\n * Information about the created interactive form session.\n * Only included in the first chunk of the stream to provide session details immediately.\n */\n interactiveFormSession?: InteractiveFormSession;\n}\n\nexport interface SendUserMessageRequest {\n /**\n * Interactive form session ID to send the message to.\n * @format GUID\n */\n interactiveFormSessionId: string;\n /**\n * User's natural language input.\n * The AI assistant analyzes this text to extract form field data and determine the next conversation step.\n * Maximum length: 10,000 characters.\n * @maxLength 10000\n */\n input?: string | null;\n /**\n * Form field values to apply to the session.\n * Use this to update form data from other sources while the conversation is ongoing.\n * These values override any existing data for the same field keys.\n * For example: `{\"lastName\": \"Smith\", \"phoneNumber\": \"+1234567890\"}`.\n */\n currentValues?: Record<string, any> | null;\n}\n\nexport interface SendUserMessageResponse {\n /** Updated interactive form session after the user input is processed. */\n interactiveFormSession?: InteractiveFormSession;\n /**\n * AI assistant response chunks generated from processing the user's message.\n * These can include extracted data, follow-up questions, input prompts, or submission confirmation.\n */\n responseChunks?: InteractiveFormSessionResponseChunk[];\n}\n\nexport interface SendUserMessageStreamedRequest {\n /**\n * Interactive form session ID to send the message to.\n * @format GUID\n */\n interactiveFormSessionId: string;\n /**\n * User's natural language input to process.\n * The AI assistant analyzes this text to extract form field data and determine the next conversation step.\n * @maxLength 10000\n */\n input?: string | null;\n /**\n * Form field values to apply to the session.\n * Use this to update form data from other sources while the conversation is ongoing.\n * These values override any existing data for the same field keys.\n * For example: `{\"lastName\": \"Smith\", \"phoneNumber\": \"+1234567890\"}`.\n */\n currentValues?: Record<string, any> | null;\n}\n\nexport interface SendUserMessageStreamedResponse {\n /** AI assistant response chunk streamed in real-time as the message is processed. */\n responseChunk?: InteractiveFormSessionResponseChunk;\n /**\n * Updated interactive form session information.\n * Included in response chunks to provide current session state.\n */\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\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 message role. */\n UNKNOWN_ROLE = 'UNKNOWN_ROLE',\n /** Message from the user. */\n USER = 'USER',\n /** Message from the AI assistant. */\n ASSISTANT = 'ASSISTANT',\n /** Function call message. */\n FUNCTION_CALL = 'FUNCTION_CALL',\n /** Function call output message. */\n FUNCTION_CALL_OUTPUT = 'FUNCTION_CALL_OUTPUT',\n /** Message from the developer/system. */\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 /** Whether request processing was 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\n/** Request to report a conversation for quality assurance. */\nexport interface ReportConversationRequest {\n /**\n * Interactive form session ID to report.\n * @format GUID\n */\n interactiveFormSessionId?: string;\n /**\n * Details about the issue or feedback.\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\n/** Response confirming conversation report submission. */\nexport interface ReportConversationResponse {\n /** Whether the report was successfully created. */\n success?: boolean | null;\n /**\n * Error message.\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 * Creates an interactive form session for AI-powered conversational form completion.\n *\n * For implementations that require real-time streaming, call [Create Interactive Form Session Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session-streamed) instead.\n * @param formId - Form ID to create an interactive session for.\n * @public\n * @documentationMaturity preview\n * @requiredField formId\n * @permissionId WIX_FORMS.CREATE_INTERACTIVE_FORM_SESSION\n * @applicableIdentity APP\n * @returns Created interactive form session.\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 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 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 * Custom prompt ID to use for the AI assistant's conversation style and behavior.\n * When not provided, uses the form's default chat settings configured in the Chat Settings API.\n * @format GUID\n */\n promptId?: string | null;\n /**\n * Pre-filled values to apply to the form, to initialize the session with existing data.\n * Field keys must match the form schema field names.\n * For example: `{\"firstName\": \"John\", \"email\": \"john@example.com\", \"age\": 25}`.\n * These values are merged with any data extracted during the conversation.\n */\n currentValues?: Record<string, any> | null;\n /**\n * Whether the session should run in dry run mode for testing and preview purposes.\n * In dry run mode, the full conversational flow works normally and form data is extracted,\n * but no actual form submission occurs.\n * @immutable\n */\n dryRun?: boolean;\n /** Current date-time of api client. */\n clientTime?: ClientTime;\n}\n\n/**\n * Creates an interactive form session for AI-powered conversational form completion, with real-time streaming.\n *\n * For implementations that prefer to wait for the complete response, call [Create Interactive Form Session](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session) instead.\n * @param formId - Form ID to create an interactive session for.\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 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 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 * Custom prompt ID to use for the AI assistant's conversation style and behavior.\n * When not provided, uses the form's default chat settings configured in the Chat Settings API.\n * @format GUID\n */\n promptId?: string | null;\n /**\n * Pre-filled values to apply to the form, to initialize the session with existing data.\n * Field keys must match the form schema field names.\n * For example: `{\"firstName\": \"John\", \"email\": \"john@example.com\", \"age\": 25}`.\n * These values are merged with any data extracted during the conversation.\n */\n currentValues?: Record<string, any> | null;\n /**\n * Whether the session should run in dry run mode when no actual form submission occurs.\n * In dry run mode, the full conversational flow works normally and form data is extracted,\n * but no actual form submission occurs.\n *\n * Default: `false`\n * @immutable\n */\n dryRun?: boolean;\n /** Caller's local date and time. */\n clientTime?: ClientTime;\n}\n\n/**\n * Sends a user message to an existing interactive form session and processes the conversational input.\n * User messages support up to 10,000 characters.\n *\n * For implementations that require real-time streaming, call [Send User Message Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message-streamed) instead.\n * @param interactiveFormSessionId - Interactive form session ID to send the message to.\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's natural language input.\n * The AI assistant analyzes this text to extract form field data and determine the next conversation step.\n * Maximum length: 10,000 characters.\n * @maxLength 10000\n */\n input?: string | null;\n /**\n * Form field values to apply to the session.\n * Use this to update form data from other sources while the conversation is ongoing.\n * These values override any existing data for the same field keys.\n * For example: `{\"lastName\": \"Smith\", \"phoneNumber\": \"+1234567890\"}`.\n */\n currentValues?: Record<string, any> | null;\n}\n\n/**\n * Sends a user message to an existing interactive form session and processes the conversational input, with real-time streaming.\n *\n * For implementations that prefer to wait for the complete response, call [Send User Message](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message) instead.\n * @param interactiveFormSessionId - Interactive form session ID to send the message to.\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's natural language input to process.\n * The AI assistant analyzes this text to extract form field data and determine the next conversation step.\n * @maxLength 10000\n */\n input?: string | null;\n /**\n * Form field values to apply to the session.\n * Use this to update form data from other sources while the conversation is ongoing.\n * These values override any existing data for the same field keys.\n * For example: `{\"lastName\": \"Smith\", \"phoneNumber\": \"+1234567890\"}`.\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/**\n * Creates an interactive form session for AI-powered conversational form completion.\n *\n * For implementations that require real-time streaming, call [Create Interactive Form Session Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session-streamed) instead.\n */\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/**\n * Creates an interactive form session for AI-powered conversational form completion, with real-time streaming.\n *\n * For implementations that prefer to wait for the complete response, call [Create Interactive Form Session](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session) instead.\n */\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/**\n * Sends a user message to an existing interactive form session and processes the conversational input.\n * User messages support up to 10,000 characters.\n *\n * For implementations that require real-time streaming, call [Send User Message Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message-streamed) instead.\n */\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/**\n * Sends a user message to an existing interactive form session and processes the conversational input, with real-time streaming.\n *\n * For implementations that prefer to wait for the complete response, call [Send User Message](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message) instead.\n */\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 * Creates an interactive form session for AI-powered conversational form completion.\n *\n * For implementations that require real-time streaming, call [Create Interactive Form Session Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session-streamed) instead.\n * @param - Form ID to create an interactive session for.\n * @returns Created interactive form session.\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 * Creates an interactive form session for AI-powered conversational form completion, with real-time streaming.\n *\n * For implementations that prefer to wait for the complete response, call [Create Interactive Form Session](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session) instead.\n * @param - Form ID to create an interactive session for.\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 a user message to an existing interactive form session and processes the conversational input.\n * User messages support up to 10,000 characters.\n *\n * For implementations that require real-time streaming, call [Send User Message Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message-streamed) instead.\n * @param - Interactive form session ID to send the message to.\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 a user message to an existing interactive form session and processes the conversational input, with real-time streaming.\n *\n * For implementations that prefer to wait for the complete response, call [Send User Message](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message) instead.\n * @param - Interactive form session ID to send the message to.\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,M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SAAO,CAAC,0BAAkC,YACxCA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA2CO,SAASC,yBACd,YACkC;AAClC,SAAO,CACL,0BACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACpKA,SAAS,wBAAwB;AAG1B,IAAMC,gCAGK,iCAAiBA,6BAAkC;AAC9D,IAAMC,wCAGK,iCAAiBA,qCAA0C;AACtE,IAAMC,mBAEK,iCAAiBA,gBAAqB;AACjD,IAAMC,2BAGK,iCAAiBA,wBAA6B;","names":["payload","ChunkType","Style","Type","Role","WebhookIdentityType","createInteractiveFormSession","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed","createInteractiveFormSession","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed","createInteractiveFormSession","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed"]}
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\n/**\n * An interactive form session enables AI-powered conversational form completion.\n * The session maintains conversation context and tracks form data extraction throughout\n * the user's interaction with the AI assistant.\n */\nexport interface InteractiveFormSession {\n /**\n * Interactive form session ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Form ID.\n * @format GUID\n */\n formId?: string;\n}\n\nexport interface CreateInteractiveFormSessionRequest {\n /**\n * Form ID to create an interactive session for.\n * @format GUID\n */\n formId: string;\n /**\n * Pre-filled values to apply to the form, to initialize the session with existing data.\n * Field keys must match the form schema field names.\n * For example: `{\"firstName\": \"John\", \"email\": \"john@example.com\", \"age\": 25}`.\n * These values are merged with any data extracted during the conversation.\n */\n currentValues?: Record<string, any> | null;\n /**\n * Whether the session should run in dry run mode for testing and preview purposes.\n * In dry run mode, the full conversational flow works normally and form data is extracted,\n * but no actual form submission occurs.\n * @immutable\n */\n dryRun?: boolean;\n /** Current date-time of api client. */\n clientTime?: ClientTime;\n}\n\nexport interface ClientTime {\n /**\n * Current date and time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC format.\n * For example, `2023-10-01T12:00:00Z`.\n * @minLength 1\n * @maxLength 200\n */\n currentTime?: string | null;\n /**\n * Browser's timezone identifier for localizing date and time values in IANA timezone format (for example, `Europe/Vilnius`, `America/New_York`).\n * @minLength 1\n * @maxLength 50\n */\n timeZone?: string | null;\n}\n\nexport interface CreateInteractiveFormSessionResponse {\n /** Created interactive form session. */\n interactiveFormSession?: InteractiveFormSession;\n /** AI assistant response chunks for the interactive form session. */\n responseChunks?: InteractiveFormSessionResponseChunk[];\n}\n\n/**\n * AI assistant response chunk, containing different types of conversational content.\n * Chunks are delivered sequentially and must be processed in the order they are received to build the complete\n * conversation interface. Each chunk type requires different UI handling.\n */\nexport interface InteractiveFormSessionResponseChunk\n extends InteractiveFormSessionResponseChunkOfOneOf {\n /** Conversational text message for display. */\n textDetails?: TextDetails;\n /** Structured data extracted from user input and mapped to specific form fields. */\n textDataDetails?: TextDataDetails;\n /** Selector for selecting multiple options from a predefined list. */\n multiSelectInputDetails?: MultiSelectInputDetails;\n /** Selector for numeric input with optional range and validation constraints. */\n numberInputDetails?: NumberInputDetails;\n /** Visual separator element for organizing conversation flow. */\n separatorDetails?: SeparatorDetails;\n /** Selector for selecting a single option from a predefined list. */\n singleSelectInputDetails?: SingleSelectInputDetails;\n /** Error information when processing fails or validation errors occur. */\n errorDetails?: ErrorDetails;\n /** Form submission confirmation including a form submission ID. A checkout ID will also be returned here if the user selected products for purchase. */\n submissionDetails?: SubmissionDetails;\n /** Important contextual information that may influence data extraction or user decisions. */\n importantTextDetails?: ImportantTextDetails;\n /** Diagnostic information for development, debugging, and performance monitoring. */\n debugDetails?: DebugDetails;\n /** Stream completion signal indicating no more chunks will be sent in this response. */\n endOfResponseDetails?: EndOfResponseDetails;\n /** Input for file upload with field targeting. Not supported. */\n fileUploadDetails?: FileUploadDetails;\n /** Input for digital signature capture with field targeting. Not supported. */\n signatureDetails?: SignatureDetails;\n /** Response chunk type, that determines how the content should be processed and displayed. */\n chunkType?: ChunkTypeWithLiterals;\n /**\n * Indicates which portion of the original user input was meaningful for data extraction.\n * Can be used to highlight relevant parts of the user's message in the UI.\n */\n meaningfulInput?: MeaningfulInput;\n}\n\n/** @oneof */\nexport interface InteractiveFormSessionResponseChunkOfOneOf {\n /** Conversational text message for display. */\n textDetails?: TextDetails;\n /** Structured data extracted from user input and mapped to specific form fields. */\n textDataDetails?: TextDataDetails;\n /** Selector for selecting multiple options from a predefined list. */\n multiSelectInputDetails?: MultiSelectInputDetails;\n /** Selector for numeric input with optional range and validation constraints. */\n numberInputDetails?: NumberInputDetails;\n /** Visual separator element for organizing conversation flow. */\n separatorDetails?: SeparatorDetails;\n /** Selector for selecting a single option from a predefined list. */\n singleSelectInputDetails?: SingleSelectInputDetails;\n /** Error information when processing fails or validation errors occur. */\n errorDetails?: ErrorDetails;\n /** Form submission confirmation including a form submission ID. A checkout ID will also be returned here if the user selected products for purchase. */\n submissionDetails?: SubmissionDetails;\n /** Important contextual information that may influence data extraction or user decisions. */\n importantTextDetails?: ImportantTextDetails;\n /** Diagnostic information for development, debugging, and performance monitoring. */\n debugDetails?: DebugDetails;\n /** Stream completion signal indicating no more chunks will be sent in this response. */\n endOfResponseDetails?: EndOfResponseDetails;\n /** Input for file upload with field targeting. Not supported. */\n fileUploadDetails?: FileUploadDetails;\n /** Input for digital signature capture with field targeting. Not supported. */\n signatureDetails?: SignatureDetails;\n}\n\nexport enum ChunkType {\n /** Unknown chunk type. */\n UNKNOWN_CHUNK_TYPE = 'UNKNOWN_CHUNK_TYPE',\n /** Text message for display to the user. */\n TEXT = 'TEXT',\n /** Structured data extracted from user input and mapped to form fields. */\n TEXT_DATA = 'TEXT_DATA',\n /** Selector for selecting multiple options from a list. */\n MULTI_SELECT_INPUT = 'MULTI_SELECT_INPUT',\n /** Selector for numeric input with optional validation. */\n NUMBER_INPUT = 'NUMBER_INPUT',\n /** Visual separator element such as paragraph breaks. */\n SEPARATOR = 'SEPARATOR',\n /** Selector for selecting one option from a list. */\n SINGLE_SELECT_INPUT = 'SINGLE_SELECT_INPUT',\n /** Error message when processing fails or validation errors occur. */\n ERROR = 'ERROR',\n /** Form submission confirmation including a submission ID. */\n SUBMISSION = 'SUBMISSION',\n /** Highlighted information that may influence form data extraction. */\n IMPORTANT_TEXT = 'IMPORTANT_TEXT',\n /** Diagnostic information for troubleshooting and development. */\n DEBUG = 'DEBUG',\n /** Signals the completion of a response stream. */\n END_OF_RESPONSE = 'END_OF_RESPONSE',\n /** Input for file upload. Not supported. */\n FILE_UPLOAD = 'FILE_UPLOAD',\n /** Input for digital signature capture. Not supported. */\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\n/** Conversational text content from the AI assistant. */\nexport interface TextDetails {\n /**\n * Text content to display.\n * @minLength 1\n * @maxLength 10000\n */\n text?: string;\n /** Text formatting style for visual presentation. */\n style?: StyleWithLiterals;\n}\n\nexport enum Style {\n /** Unknown text style. */\n UNKNOWN_STYLE = 'UNKNOWN_STYLE',\n /** Regular conversational text. */\n NORMAL = 'NORMAL',\n /** Bold text for emphasis. */\n BOLD = 'BOLD',\n}\n\n/** @enumType */\nexport type StyleWithLiterals = Style | 'UNKNOWN_STYLE' | 'NORMAL' | 'BOLD';\n\n/** Structured data extracted from user input and mapped to form fields. */\nexport interface TextDataDetails {\n /**\n * Form field identifier that this extracted data maps to.\n * Matches a field name in the form schema.\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n /**\n * Human-readable text representation of the extracted data to display.\n * @minLength 1\n * @maxLength 10000\n */\n text?: string;\n /**\n * Structured value for form submission (for example, boolean `true`/`false`, number, or string).\n * This is the actual data value that will be submitted with the form.\n */\n value?: any;\n /**\n * User-friendly display representation of the value (for example, \"Yes\"/\"No\" for boolean, \"25 years old\" for age).\n * Use this to display confirmation of what was extracted from the user's input.\n * @minLength 1\n * @maxLength 10000\n */\n displayValue?: string;\n}\n\n/** Interactive prompt for selecting multiple options from a predefined list. */\nexport interface MultiSelectInputDetails {\n /**\n * Form field identifier for the multi-select input.\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n /**\n * Options available for selection, when relevant. Users can choose multiple options from this list.\n * @minSize 1\n * @maxSize 100\n */\n options?: Option[];\n /** When present, allows users to provide custom values not in the predefined options list. */\n allowedCustomValue?: CustomValue;\n}\n\n/** Selection option for input prompts. */\nexport interface Option {\n /**\n * Value to be submitted when this option is selected.\n * This is the technical value used in form processing and submission.\n * @minLength 1\n * @maxLength 10000\n */\n value?: string;\n /**\n * Human-readable label for display for this option.\n * @minLength 1\n * @maxLength 10000\n */\n label?: string;\n}\n\n/** Custom value configuration for input prompts. */\nexport interface CustomValue {\n /**\n * Description of the expected custom value format or content.\n * Displayed to guide users when they choose to provide a custom option.\n * @maxLength 10000\n */\n description?: string;\n}\n\n/** Interactive prompt for numeric input with validation constraints. */\nexport interface NumberInputDetails {\n /**\n * Form field identifier for the numeric input.\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n /** Minimum and maximum value constraints for the numeric input. */\n rangeLimit?: NumberRangeLimit;\n /**\n * When provided, restricts input to multiples of this value.\n * For example, `2.5` would allow 2.5, 5.0, 7.5, and so on.\n */\n multipleOf?: number | null;\n}\n\n/** Numeric range constraints for number input validation. */\nexport interface NumberRangeLimit extends NumberRangeLimitEndOneOf {\n /** Maximum allowed value (inclusive). */\n maxInclusiveValue?: number | null;\n /** Maximum allowed value (exclusive). */\n maxExclusiveValue?: number | null;\n /** Minimum allowed value (inclusive). */\n minInclusiveValue?: number | null;\n}\n\n/** @oneof */\nexport interface NumberRangeLimitEndOneOf {\n /** Maximum allowed value (inclusive). */\n maxInclusiveValue?: number | null;\n /** Maximum allowed value (exclusive). */\n maxExclusiveValue?: number | null;\n}\n\n/** Visual separator element for organizing conversation flow. */\nexport interface SeparatorDetails {\n /** Type of visual separator to display in the conversation flow. */\n type?: TypeWithLiterals;\n}\n\nexport enum Type {\n /** Unknown separator type. */\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n /** Paragraph break for visual content separation. */\n PARAGRAPH = 'PARAGRAPH',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'UNKNOWN_TYPE' | 'PARAGRAPH';\n\n/** Selector for selecting a single option from a predefined list. */\nexport interface SingleSelectInputDetails {\n /**\n * Form field identifier for the single-select input.\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n /**\n * Options available for selection. Users can choose only one option from this list.\n * @minSize 1\n * @maxSize 100\n */\n options?: Option[];\n /** When present, allows users to provide a custom value not in the predefined options list. */\n allowedCustomValue?: CustomValue;\n}\n\n/** Error information when processing fails or validation errors occur. */\nexport interface ErrorDetails {\n /**\n * Error message detailing what went wrong during processing.\n * For display to the user when the AI cannot process their input or when validation fails.\n * @minLength 1\n * @maxLength 1000\n */\n messageText?: string;\n}\n\n/** Form submission confirmation containing submission information. */\nexport interface SubmissionDetails {\n /**\n * Form submission ID created when the form is successfully completed and submitted.\n * @format GUID\n */\n submissionId?: string;\n /**\n * Wix eCommerce checkout ID when the form includes payment processing.\n * Only present for forms that have payment fields or are connected to eCommerce flows.\n * @format GUID\n * @readonly\n */\n checkoutId?: string | null;\n}\n\n/** Important contextual information that may influence data extraction or user decisions. */\nexport interface ImportantTextDetails {\n /**\n * Form field identifier that this important information relates to.\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n /**\n * Important contextual information to highlight.\n * This might include validation requirements, format expectations, or clarifying questions.\n * @minLength 1\n * @maxLength 10000\n */\n text?: string;\n}\n\n/** Diagnostic information for development and troubleshooting. */\nexport interface DebugDetails {\n /**\n * Diagnostic data for development and troubleshooting.\n * Contains information such as AI tools called, processing times, and internal state.\n */\n data?: Record<string, any> | null;\n}\n\n/** Stream completion signal indicating the end of a response stream. */\nexport interface EndOfResponseDetails {\n /**\n * Whether the response stream completed successfully.\n * When `false`, there may have been processing errors or interruptions.\n */\n success?: boolean;\n}\n\n/** Interactive prompt for file upload input. */\nexport interface FileUploadDetails {\n /**\n * Form field identifier for the file upload input.\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n}\n\n/** Interactive prompt for digital signature capture. */\nexport interface SignatureDetails {\n /**\n * Form field identifier for the digital signature input.\n * @minLength 1\n * @maxLength 200\n */\n fieldTarget?: string;\n}\n\n/** Indicates which portion of user input was meaningful for data extraction. */\nexport interface MeaningfulInput {\n /**\n * Character position (0-indexed) where the meaningful portion of user input begins.\n * @max 10000\n */\n startOffset?: number;\n /**\n * Length in characters of the meaningful portion of user input.\n * Use this with `startOffset` to highlight the relevant text that was processed for data extraction.\n * @max 10000\n */\n length?: number;\n}\n\nexport interface CreateInteractiveFormSessionStreamedRequest {\n /**\n * Form ID to create an interactive session for.\n * @format GUID\n */\n formId: string;\n /**\n * Pre-filled values to apply to the form, to initialize the session with existing data.\n * Field keys must match the form schema field names.\n * For example: `{\"firstName\": \"John\", \"email\": \"john@example.com\", \"age\": 25}`.\n * These values are merged with any data extracted during the conversation.\n */\n currentValues?: Record<string, any> | null;\n /**\n * Whether the session should run in dry run mode when no actual form submission occurs.\n * In dry run mode, the full conversational flow works normally and form data is extracted,\n * but no actual form submission occurs.\n *\n * Default: `false`\n * @immutable\n */\n dryRun?: boolean;\n /** Caller's local date and time. */\n clientTime?: ClientTime;\n}\n\nexport interface CreateInteractiveFormSessionStreamedResponse {\n /**\n * AI assistant response chunk, streamed in real-time.\n * Process each chunk as it arrives to provide progressive user feedback.\n */\n responseChunk?: InteractiveFormSessionResponseChunk;\n /**\n * Information about the created interactive form session.\n * Only included in the first chunk of the stream to provide session details immediately.\n */\n interactiveFormSession?: InteractiveFormSession;\n}\n\nexport interface SendUserMessageRequest {\n /**\n * Interactive form session ID to send the message to.\n * @format GUID\n */\n interactiveFormSessionId: string;\n /**\n * User's natural language input.\n * The AI assistant analyzes this text to extract form field data and determine the next conversation step.\n * Maximum length: 10,000 characters.\n * @maxLength 10000\n */\n input?: string | null;\n /**\n * Form field values to apply to the session.\n * Use this to update form data from other sources while the conversation is ongoing.\n * These values override any existing data for the same field keys.\n * For example: `{\"lastName\": \"Smith\", \"phoneNumber\": \"+1234567890\"}`.\n */\n currentValues?: Record<string, any> | null;\n}\n\nexport interface SendUserMessageResponse {\n /** Updated interactive form session after the user input is processed. */\n interactiveFormSession?: InteractiveFormSession;\n /**\n * AI assistant response chunks generated from processing the user's message.\n * These can include extracted data, follow-up questions, input selectors, or submission confirmation.\n */\n responseChunks?: InteractiveFormSessionResponseChunk[];\n}\n\nexport interface SendUserMessageStreamedRequest {\n /**\n * Interactive form session ID to send the message to.\n * @format GUID\n */\n interactiveFormSessionId: string;\n /**\n * User's natural language input to process.\n * The AI assistant analyzes this text to extract form field data and determine the next conversation step.\n * @maxLength 10000\n */\n input?: string | null;\n /**\n * Form field values to apply to the session.\n * Use this to update form data from other sources while the conversation is ongoing.\n * These values override any existing data for the same field keys.\n * For example: `{\"lastName\": \"Smith\", \"phoneNumber\": \"+1234567890\"}`.\n */\n currentValues?: Record<string, any> | null;\n}\n\nexport interface SendUserMessageStreamedResponse {\n /** AI assistant response chunk streamed in real-time as the message is processed. */\n responseChunk?: InteractiveFormSessionResponseChunk;\n /**\n * Updated interactive form session information.\n * Session data, including session ID and form ID. Returned in the first chunk of the streamed response.\n */\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\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 message role. */\n UNKNOWN_ROLE = 'UNKNOWN_ROLE',\n /** Message from the user. */\n USER = 'USER',\n /** Message from the AI assistant. */\n ASSISTANT = 'ASSISTANT',\n /** Function call message. */\n FUNCTION_CALL = 'FUNCTION_CALL',\n /** Function call output message. */\n FUNCTION_CALL_OUTPUT = 'FUNCTION_CALL_OUTPUT',\n /** Message from the developer/system. */\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 /** Whether request processing was 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\n/** Request to report a conversation for quality assurance. */\nexport interface ReportConversationRequest {\n /**\n * Interactive form session ID to report.\n * @format GUID\n */\n interactiveFormSessionId?: string;\n /**\n * Details about the issue or feedback.\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\n/** Response confirming conversation report submission. */\nexport interface ReportConversationResponse {\n /** Whether the report was successfully created. */\n success?: boolean | null;\n /**\n * Error message.\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 * Creates an interactive form session for AI-powered conversational form completion.\n *\n * For implementations that require real-time streaming, call [Create Interactive Form Session Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session-streamed) instead.\n * @param formId - Form ID to create an interactive session for.\n * @public\n * @documentationMaturity preview\n * @requiredField formId\n * @permissionId WIX_FORMS.CREATE_INTERACTIVE_FORM_SESSION\n * @applicableIdentity APP\n * @returns Created interactive form session.\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 currentValues: options?.currentValues,\n dryRun: options?.dryRun,\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 currentValues: '$[1].currentValues',\n dryRun: '$[1].dryRun',\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 * Pre-filled values to apply to the form, to initialize the session with existing data.\n * Field keys must match the form schema field names.\n * For example: `{\"firstName\": \"John\", \"email\": \"john@example.com\", \"age\": 25}`.\n * These values are merged with any data extracted during the conversation.\n */\n currentValues?: Record<string, any> | null;\n /**\n * Whether the session should run in dry run mode for testing and preview purposes.\n * In dry run mode, the full conversational flow works normally and form data is extracted,\n * but no actual form submission occurs.\n * @immutable\n */\n dryRun?: boolean;\n /** Current date-time of api client. */\n clientTime?: ClientTime;\n}\n\n/**\n * Creates an interactive form session for AI-powered conversational form completion, with real-time streaming.\n *\n * For implementations that prefer to wait for the complete response, call [Create Interactive Form Session](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session) instead.\n * @param formId - Form ID to create an interactive session for.\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 currentValues: options?.currentValues,\n dryRun: options?.dryRun,\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 currentValues: '$[1].currentValues',\n dryRun: '$[1].dryRun',\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 * Pre-filled values to apply to the form, to initialize the session with existing data.\n * Field keys must match the form schema field names.\n * For example: `{\"firstName\": \"John\", \"email\": \"john@example.com\", \"age\": 25}`.\n * These values are merged with any data extracted during the conversation.\n */\n currentValues?: Record<string, any> | null;\n /**\n * Whether the session should run in dry run mode when no actual form submission occurs.\n * In dry run mode, the full conversational flow works normally and form data is extracted,\n * but no actual form submission occurs.\n *\n * Default: `false`\n * @immutable\n */\n dryRun?: boolean;\n /** Caller's local date and time. */\n clientTime?: ClientTime;\n}\n\n/**\n * Submits a user message to an existing interactive form session and processes the conversational input.\n * User messages support up to 10,000 characters.\n *\n * For implementations that require real-time streaming, call [Send User Message Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message-streamed) instead.\n * @param interactiveFormSessionId - Interactive form session ID to send the message to.\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's natural language input.\n * The AI assistant analyzes this text to extract form field data and determine the next conversation step.\n * Maximum length: 10,000 characters.\n * @maxLength 10000\n */\n input?: string | null;\n /**\n * Form field values to apply to the session.\n * Use this to update form data from other sources while the conversation is ongoing.\n * These values override any existing data for the same field keys.\n * For example: `{\"lastName\": \"Smith\", \"phoneNumber\": \"+1234567890\"}`.\n */\n currentValues?: Record<string, any> | null;\n}\n\n/**\n * Submits a user message to an existing interactive form session and processes the conversational input, with real-time streaming.\n *\n * For implementations that prefer to wait for the complete response, call [Send User Message](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message) instead.\n * @param interactiveFormSessionId - Interactive form session ID to send the message to.\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's natural language input to process.\n * The AI assistant analyzes this text to extract form field data and determine the next conversation step.\n * @maxLength 10000\n */\n input?: string | null;\n /**\n * Form field values to apply to the session.\n * Use this to update form data from other sources while the conversation is ongoing.\n * These values override any existing data for the same field keys.\n * For example: `{\"lastName\": \"Smith\", \"phoneNumber\": \"+1234567890\"}`.\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/**\n * Creates an interactive form session for AI-powered conversational form completion.\n *\n * For implementations that require real-time streaming, call [Create Interactive Form Session Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session-streamed) instead.\n */\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/**\n * Creates an interactive form session for AI-powered conversational form completion, with real-time streaming.\n *\n * For implementations that prefer to wait for the complete response, call [Create Interactive Form Session](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session) instead.\n */\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/**\n * Submits a user message to an existing interactive form session and processes the conversational input.\n * User messages support up to 10,000 characters.\n *\n * For implementations that require real-time streaming, call [Send User Message Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message-streamed) instead.\n */\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/**\n * Submits a user message to an existing interactive form session and processes the conversational input, with real-time streaming.\n *\n * For implementations that prefer to wait for the complete response, call [Send User Message](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message) instead.\n */\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 * Creates an interactive form session for AI-powered conversational form completion.\n *\n * For implementations that require real-time streaming, call [Create Interactive Form Session Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session-streamed) instead.\n * @param - Form ID to create an interactive session for.\n * @returns Created interactive form session.\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 * Creates an interactive form session for AI-powered conversational form completion, with real-time streaming.\n *\n * For implementations that prefer to wait for the complete response, call [Create Interactive Form Session](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/create-interactive-form-session) instead.\n * @param - Form ID to create an interactive session for.\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 * Submits a user message to an existing interactive form session and processes the conversational input.\n * User messages support up to 10,000 characters.\n *\n * For implementations that require real-time streaming, call [Send User Message Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message-streamed) instead.\n * @param - Interactive form session ID to send the message to.\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 * Submits a user message to an existing interactive form session and processes the conversational input, with real-time streaming.\n *\n * For implementations that prefer to wait for the complete response, call [Send User Message](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message) instead.\n * @param - Interactive form session ID to send the message to.\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;A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;AACJ;AA2CO,SAASC,yBACd,YACkC;AAClC,SAAO,CACL,0BACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACpKA,SAAS,wBAAwB;AAG1B,IAAMC,gCAGK,iCAAiBA,6BAAkC;AAC9D,IAAMC,wCAGK,iCAAiBA,qCAA0C;AACtE,IAAMC,mBAEK,iCAAiBA,gBAAqB;AACjD,IAAMC,2BAGK,iCAAiBA,wBAA6B;","names":["payload","ChunkType","Style","Type","Role","WebhookIdentityType","createInteractiveFormSession","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed","createInteractiveFormSession","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed","createInteractiveFormSession","createInteractiveFormSessionStreamed","sendUserMessage","sendUserMessageStreamed"]}
@@ -24,12 +24,6 @@ interface CreateInteractiveFormSessionRequest {
24
24
  * @format GUID
25
25
  */
26
26
  formId: string;
27
- /**
28
- * Custom prompt ID to use for the AI assistant's conversation style and behavior.
29
- * When not provided, uses the form's default chat settings configured in the Chat Settings API.
30
- * @format GUID
31
- */
32
- promptId?: string | null;
33
27
  /**
34
28
  * Pre-filled values to apply to the form, to initialize the session with existing data.
35
29
  * Field keys must match the form schema field names.
@@ -56,7 +50,7 @@ interface ClientTime {
56
50
  */
57
51
  currentTime?: string | null;
58
52
  /**
59
- * Caller's timezone identifier for localizing date and time values in IANA timezone format (for example, `Europe/Vilnius`, `America/New_York`).
53
+ * Browser's timezone identifier for localizing date and time values in IANA timezone format (for example, `Europe/Vilnius`, `America/New_York`).
60
54
  * @minLength 1
61
55
  * @maxLength 50
62
56
  */
@@ -70,11 +64,11 @@ interface CreateInteractiveFormSessionResponse {
70
64
  }
71
65
  /**
72
66
  * AI assistant response chunk, containing different types of conversational content.
73
- * Chunks are delivered sequentially and must be processed in order to build the complete
67
+ * Chunks are delivered sequentially and must be processed in the order they are received to build the complete
74
68
  * conversation interface. Each chunk type requires different UI handling.
75
69
  */
76
70
  interface InteractiveFormSessionResponseChunk extends InteractiveFormSessionResponseChunkOfOneOf {
77
- /** Conversational text message for display to the user. */
71
+ /** Conversational text message for display. */
78
72
  textDetails?: TextDetails;
79
73
  /** Structured data extracted from user input and mapped to specific form fields. */
80
74
  textDataDetails?: TextDataDetails;
@@ -88,7 +82,7 @@ interface InteractiveFormSessionResponseChunk extends InteractiveFormSessionResp
88
82
  singleSelectInputDetails?: SingleSelectInputDetails;
89
83
  /** Error information when processing fails or validation errors occur. */
90
84
  errorDetails?: ErrorDetails;
91
- /** Form submission confirmation containing form submission ID and ecom checkout ID, if relevant. */
85
+ /** Form submission confirmation including a form submission ID. A checkout ID will also be returned here if the user selected products for purchase. */
92
86
  submissionDetails?: SubmissionDetails;
93
87
  /** Important contextual information that may influence data extraction or user decisions. */
94
88
  importantTextDetails?: ImportantTextDetails;
@@ -110,7 +104,7 @@ interface InteractiveFormSessionResponseChunk extends InteractiveFormSessionResp
110
104
  }
111
105
  /** @oneof */
112
106
  interface InteractiveFormSessionResponseChunkOfOneOf {
113
- /** Conversational text message for display to the user. */
107
+ /** Conversational text message for display. */
114
108
  textDetails?: TextDetails;
115
109
  /** Structured data extracted from user input and mapped to specific form fields. */
116
110
  textDataDetails?: TextDataDetails;
@@ -124,7 +118,7 @@ interface InteractiveFormSessionResponseChunkOfOneOf {
124
118
  singleSelectInputDetails?: SingleSelectInputDetails;
125
119
  /** Error information when processing fails or validation errors occur. */
126
120
  errorDetails?: ErrorDetails;
127
- /** Form submission confirmation containing form submission ID and ecom checkout ID, if relevant. */
121
+ /** Form submission confirmation including a form submission ID. A checkout ID will also be returned here if the user selected products for purchase. */
128
122
  submissionDetails?: SubmissionDetails;
129
123
  /** Important contextual information that may influence data extraction or user decisions. */
130
124
  importantTextDetails?: ImportantTextDetails;
@@ -154,7 +148,7 @@ declare enum ChunkType {
154
148
  SINGLE_SELECT_INPUT = "SINGLE_SELECT_INPUT",
155
149
  /** Error message when processing fails or validation errors occur. */
156
150
  ERROR = "ERROR",
157
- /** Form submission confirmation with submission ID and checkout ID, if relevant. */
151
+ /** Form submission confirmation including a submission ID. */
158
152
  SUBMISSION = "SUBMISSION",
159
153
  /** Highlighted information that may influence form data extraction. */
160
154
  IMPORTANT_TEXT = "IMPORTANT_TEXT",
@@ -172,7 +166,7 @@ type ChunkTypeWithLiterals = ChunkType | 'UNKNOWN_CHUNK_TYPE' | 'TEXT' | 'TEXT_D
172
166
  /** Conversational text content from the AI assistant. */
173
167
  interface TextDetails {
174
168
  /**
175
- * Text content to display to the user.
169
+ * Text content to display.
176
170
  * @minLength 1
177
171
  * @maxLength 10000
178
172
  */
@@ -200,7 +194,7 @@ interface TextDataDetails {
200
194
  */
201
195
  fieldTarget?: string;
202
196
  /**
203
- * Human-readable text representation of the extracted data to display to the user.
197
+ * Human-readable text representation of the extracted data to display.
204
198
  * @minLength 1
205
199
  * @maxLength 10000
206
200
  */
@@ -245,7 +239,7 @@ interface Option {
245
239
  */
246
240
  value?: string;
247
241
  /**
248
- * Human-readable label displayed to the user for this option.
242
+ * Human-readable label for display for this option.
249
243
  * @minLength 1
250
244
  * @maxLength 10000
251
245
  */
@@ -332,7 +326,7 @@ interface ErrorDetails {
332
326
  */
333
327
  messageText?: string;
334
328
  }
335
- /** Form submission confirmation containing submission and checkout information. */
329
+ /** Form submission confirmation containing submission information. */
336
330
  interface SubmissionDetails {
337
331
  /**
338
332
  * Form submission ID created when the form is successfully completed and submitted.
@@ -356,7 +350,7 @@ interface ImportantTextDetails {
356
350
  */
357
351
  fieldTarget?: string;
358
352
  /**
359
- * Important contextual information to highlight for the user.
353
+ * Important contextual information to highlight.
360
354
  * This might include validation requirements, format expectations, or clarifying questions.
361
355
  * @minLength 1
362
356
  * @maxLength 10000
@@ -417,12 +411,6 @@ interface CreateInteractiveFormSessionStreamedRequest {
417
411
  * @format GUID
418
412
  */
419
413
  formId: string;
420
- /**
421
- * Custom prompt ID to use for the AI assistant's conversation style and behavior.
422
- * When not provided, uses the form's default chat settings configured in the Chat Settings API.
423
- * @format GUID
424
- */
425
- promptId?: string | null;
426
414
  /**
427
415
  * Pre-filled values to apply to the form, to initialize the session with existing data.
428
416
  * Field keys must match the form schema field names.
@@ -480,7 +468,7 @@ interface SendUserMessageResponse {
480
468
  interactiveFormSession?: InteractiveFormSession;
481
469
  /**
482
470
  * AI assistant response chunks generated from processing the user's message.
483
- * These can include extracted data, follow-up questions, input prompts, or submission confirmation.
471
+ * These can include extracted data, follow-up questions, input selectors, or submission confirmation.
484
472
  */
485
473
  responseChunks?: InteractiveFormSessionResponseChunk[];
486
474
  }
@@ -509,7 +497,7 @@ interface SendUserMessageStreamedResponse {
509
497
  responseChunk?: InteractiveFormSessionResponseChunk;
510
498
  /**
511
499
  * Updated interactive form session information.
512
- * Included in response chunks to provide current session state.
500
+ * Session data, including session ID and form ID. Returned in the first chunk of the streamed response.
513
501
  */
514
502
  interactiveFormSession?: InteractiveFormSession;
515
503
  }
@@ -1012,12 +1000,6 @@ type SendUserMessageStreamedApplicationErrors = {
1012
1000
  */
1013
1001
  declare function createInteractiveFormSession(formId: string, options?: CreateInteractiveFormSessionOptions): Promise<NonNullablePaths<InteractiveFormSession, `_id` | `formId`, 2>>;
1014
1002
  interface CreateInteractiveFormSessionOptions {
1015
- /**
1016
- * Custom prompt ID to use for the AI assistant's conversation style and behavior.
1017
- * When not provided, uses the form's default chat settings configured in the Chat Settings API.
1018
- * @format GUID
1019
- */
1020
- promptId?: string | null;
1021
1003
  /**
1022
1004
  * Pre-filled values to apply to the form, to initialize the session with existing data.
1023
1005
  * Field keys must match the form schema field names.
@@ -1049,12 +1031,6 @@ interface CreateInteractiveFormSessionOptions {
1049
1031
  */
1050
1032
  declare function createInteractiveFormSessionStreamed(formId: string, options?: CreateInteractiveFormSessionStreamedOptions): Promise<NonNullablePaths<CreateInteractiveFormSessionStreamedResponse, `responseChunk.textDetails.text` | `responseChunk.textDetails.style` | `responseChunk.textDataDetails.fieldTarget` | `responseChunk.textDataDetails.text` | `responseChunk.textDataDetails.displayValue` | `responseChunk.multiSelectInputDetails.fieldTarget` | `responseChunk.multiSelectInputDetails.options` | `responseChunk.multiSelectInputDetails.options.${number}.value` | `responseChunk.multiSelectInputDetails.options.${number}.label` | `responseChunk.multiSelectInputDetails.allowedCustomValue.description` | `responseChunk.numberInputDetails.fieldTarget` | `responseChunk.separatorDetails.type` | `responseChunk.singleSelectInputDetails.fieldTarget` | `responseChunk.singleSelectInputDetails.options` | `responseChunk.errorDetails.messageText` | `responseChunk.submissionDetails.submissionId` | `responseChunk.importantTextDetails.fieldTarget` | `responseChunk.importantTextDetails.text` | `responseChunk.endOfResponseDetails.success` | `responseChunk.fileUploadDetails.fieldTarget` | `responseChunk.signatureDetails.fieldTarget` | `responseChunk.chunkType` | `responseChunk.meaningfulInput.startOffset` | `responseChunk.meaningfulInput.length` | `interactiveFormSession._id` | `interactiveFormSession.formId`, 6>>;
1051
1033
  interface CreateInteractiveFormSessionStreamedOptions {
1052
- /**
1053
- * Custom prompt ID to use for the AI assistant's conversation style and behavior.
1054
- * When not provided, uses the form's default chat settings configured in the Chat Settings API.
1055
- * @format GUID
1056
- */
1057
- promptId?: string | null;
1058
1034
  /**
1059
1035
  * Pre-filled values to apply to the form, to initialize the session with existing data.
1060
1036
  * Field keys must match the form schema field names.
@@ -1075,7 +1051,7 @@ interface CreateInteractiveFormSessionStreamedOptions {
1075
1051
  clientTime?: ClientTime;
1076
1052
  }
1077
1053
  /**
1078
- * Sends a user message to an existing interactive form session and processes the conversational input.
1054
+ * Submits a user message to an existing interactive form session and processes the conversational input.
1079
1055
  * User messages support up to 10,000 characters.
1080
1056
  *
1081
1057
  * For implementations that require real-time streaming, call [Send User Message Streamed](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message-streamed) instead.
@@ -1107,7 +1083,7 @@ interface SendUserMessageOptions {
1107
1083
  currentValues?: Record<string, any> | null;
1108
1084
  }
1109
1085
  /**
1110
- * Sends a user message to an existing interactive form session and processes the conversational input, with real-time streaming.
1086
+ * Submits a user message to an existing interactive form session and processes the conversational input, with real-time streaming.
1111
1087
  *
1112
1088
  * For implementations that prefer to wait for the complete response, call [Send User Message](https://dev.wix.com/docs/api-reference/crm/forms/interactive-form-session/send-user-message) instead.
1113
1089
  * @param interactiveFormSessionId - Interactive form session ID to send the message to.