@wix/auto_sdk_ai-site-chat_widget-settings 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +2 -2
- package/build/cjs/index.typings.js +1 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -2
- package/build/cjs/meta.js +1 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +2 -2
- package/build/es/index.typings.mjs +1 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +2 -2
- package/build/es/meta.mjs +1 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js +1 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +2 -2
- package/build/internal/cjs/index.typings.js +1 -1
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +2 -2
- package/build/internal/cjs/meta.js +1 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs +1 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +2 -2
- package/build/internal/es/index.typings.mjs +1 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +2 -2
- package/build/internal/es/meta.mjs +1 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.js
CHANGED
|
@@ -200,7 +200,7 @@ var OfflineBehavior = /* @__PURE__ */ ((OfflineBehavior2) => {
|
|
|
200
200
|
var ChatHandler = /* @__PURE__ */ ((ChatHandler2) => {
|
|
201
201
|
ChatHandler2["UNKNOWN_HANDLER"] = "UNKNOWN_HANDLER";
|
|
202
202
|
ChatHandler2["AI"] = "AI";
|
|
203
|
-
ChatHandler2["
|
|
203
|
+
ChatHandler2["WIX_USER"] = "WIX_USER";
|
|
204
204
|
return ChatHandler2;
|
|
205
205
|
})(ChatHandler || {});
|
|
206
206
|
async function getWidgetSettings2() {
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.universal.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.http.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.public.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.context.ts"],"sourcesContent":["export * from './src/innovation-widget-v1-widget-settings-widget-settings.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixInnovationWidgetV1WidgetSettings from './innovation-widget-v1-widget-settings-widget-settings.http.js';\n\nexport interface WidgetSettings {\n /**\n * Widget settings ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Whether the AI Site-Chat is enabled on the site.\n * @deprecated Whether the AI Site-Chat is enabled on the site.\n * @replacedBy active_hours\n * @targetRemovalDate 2025-12-01\n */\n enabled?: boolean;\n /** AI Site-Chat introduction. This is shown in the chat when a site visitor starts a new conversation. */\n introMessage?: IntroMessage;\n /** Settings for the contact form. */\n contactForm?: ContactForm;\n /**\n * Date and time the widget settings were created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the widget settings were updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Whether to open the AI Site-Chat automatically when the site loads. */\n autoOpen?: boolean;\n /** Times the AI Site-Chat is available on the site. */\n activeHours?: ActiveHours;\n /** Defines how the AI Site-Chat functions during the non-active hours. */\n offlineBehavior?: OfflineBehaviorWithLiterals;\n /** Whether the AI Site-Chat should send a summary of the site visitor's navigation on the site. */\n navigationSummary?: boolean | null;\n /**\n * Wix Media image ID used for the AI Site-Chat.\n * @maxLength 500\n */\n avatar?: string | null;\n /** Whether to display example questions from the AI Site-Chat. */\n generatedQuestions?: boolean | null;\n}\n\n/** Intro message */\nexport interface IntroMessage {\n /** Main message settings. */\n message?: SettingsMessage;\n /** Legal disclaimer message settings. */\n legalDisclaimer?: SettingsMessage;\n /** Offline message settings. */\n offlineDisclaimer?: SettingsMessage;\n /** Message shown as popup to engage the site visitor with the AI assistant. */\n engage?: SettingsMessage;\n /** Suggested questions shown to the site visitor to help them get started. */\n suggestions?: SuggestedQuestions;\n}\n\nexport interface SettingsMessage {\n /** Whether the message is enabled. */\n enabled?: boolean;\n /**\n * Message content.\n * @maxLength 1000\n */\n text?: string;\n}\n\nexport interface SuggestedQuestions {\n /** Whether suggesting questions is enabled. */\n enabled?: boolean;\n /**\n * Suggested questions shown to the site visitor to help them get started.\n * @minSize 1\n * @maxSize 5\n */\n questions?: SettingsMessage[];\n /** Introduction message for the suggested questions. */\n introduction?: SettingsMessage;\n}\n\nexport interface ContactForm {\n /** When the AI Site-Chat should send the contact form. */\n conditions?: Conditions;\n /** Contact form fields. */\n fields?: Fields;\n /** When to show contact form if site owner is available. */\n userConditions?: UserConditions;\n}\n\n/** Contact form conditions for AI Site-Chat */\nexport interface Conditions {\n /** Whether the AI Site-Chat should send the contact form if the AI is unable to answer the site visitor's question. */\n cannotAnswer?: boolean;\n /** Whether the AI Site-Chat should send the contact form if the site visitor requests to chat with a real person. */\n requestForPerson?: boolean;\n /**\n * Require site visitor to fill contact form before starting a conversation.\n * @deprecated Require site visitor to fill contact form before starting a conversation.\n * @targetRemovalDate 2025-12-01\n */\n beforeChat?: boolean | null;\n}\n\n/** Contact form fields */\nexport interface Fields {\n /** Whether to include a name field in the form. */\n name?: boolean;\n /** Whether to include an email field in the form. */\n email?: boolean;\n /** Whether to include a phone number field in the form. */\n phone?: boolean;\n /** Whether to include a message field in the form. */\n message?: boolean;\n}\n\n/** Contact form conditions for when site owner is available */\nexport interface UserConditions {\n /** Show site visitor contact form before starting a conversation. */\n beforeChat?: boolean;\n /** Show site visitor contact form after their first message. */\n afterFirstMessage?: boolean;\n /** Never show site visitor contact form. */\n never?: boolean;\n}\n\n/** Working hours settings */\nexport interface ActiveHours {\n /**\n * Whether the AI Assistant is always online. If `true`, `schedule` and `timeZone` are ignored.\n * @deprecated Whether the AI Assistant is always online. If `true`, `schedule` and `timeZone` are ignored.\n * @replacedBy availability\n * @targetRemovalDate 2025-12-01\n */\n always?: boolean;\n /** Times at which the AI Assistant is online. */\n schedule?: Schedule;\n /**\n * Timezone used for the schedule.\n * @maxLength 256\n */\n timeZone?: string;\n /** Hours when AI assistant or site owner are available. */\n mode?: ChatHandlerModeWithLiterals;\n}\n\n/** Schedule */\nexport interface Schedule {\n /** Monday schedule. */\n monday?: DaySchedule;\n /** Tuesday schedule. */\n tuesday?: DaySchedule;\n /** Wednesday schedule. */\n wednesday?: DaySchedule;\n /** Thursday schedule. */\n thursday?: DaySchedule;\n /** Friday schedule. */\n friday?: DaySchedule;\n /** Saturday schedule. */\n saturday?: DaySchedule;\n /** Sunday schedule. */\n sunday?: DaySchedule;\n}\n\n/** Day schedule */\nexport interface DaySchedule {\n /** Whether the day is enabled. */\n enabled?: boolean;\n /**\n * Array of times during which the AI Site-Chat or site owner are available.\n * @maxSize 24\n */\n frames?: WorkingHoursFrame[];\n}\n\n/** Working hours frame */\nexport interface WorkingHoursFrame {\n /** Start time of the active hours. */\n start?: number;\n /** End time of the active hours. */\n end?: number;\n /** Who is available during timeframe, AI chat or user chat */\n frameType?: FrameHandlerTypeWithLiterals;\n}\n\n/** Who is available during timeframe, AI chat or user chat */\nexport enum FrameHandlerType {\n /** Unknown frame type. */\n UNKNOWN_FRAME_TYPE = 'UNKNOWN_FRAME_TYPE',\n /** Frame type not selected. */\n NOT_SELECTED = 'NOT_SELECTED',\n /** AI Chat available in time frame. */\n AI_CHAT = 'AI_CHAT',\n /** Chat with human in time frame. */\n WIX_USER_CHAT = 'WIX_USER_CHAT',\n}\n\n/** @enumType */\nexport type FrameHandlerTypeWithLiterals =\n | FrameHandlerType\n | 'UNKNOWN_FRAME_TYPE'\n | 'NOT_SELECTED'\n | 'AI_CHAT'\n | 'WIX_USER_CHAT';\n\n/** Chat availability options */\nexport enum ChatHandlerMode {\n /** Unknown availability. */\n UNKNOWN_MODE = 'UNKNOWN_MODE',\n /** AI assistant is always available. */\n ALWAYS_WITH_AI = 'ALWAYS_WITH_AI',\n /** Chat with site owner is always available. */\n ALWAYS_WITH_WIX_USER = 'ALWAYS_WITH_WIX_USER',\n /** AI and site owner are available according to schedule. */\n SCHEDULED = 'SCHEDULED',\n /** AI assistant and site owner are always offline. */\n OFF = 'OFF',\n}\n\n/** @enumType */\nexport type ChatHandlerModeWithLiterals =\n | ChatHandlerMode\n | 'UNKNOWN_MODE'\n | 'ALWAYS_WITH_AI'\n | 'ALWAYS_WITH_WIX_USER'\n | 'SCHEDULED'\n | 'OFF';\n\nexport enum OfflineBehavior {\n /** Unknown offline behavior. */\n UNKNOWN_OFFLINE_BEHAVIOR = 'UNKNOWN_OFFLINE_BEHAVIOR',\n /** Allows the site visitor to write messages, but doesn't send a contact form. */\n CHAT_ONLY = 'CHAT_ONLY',\n /** Hides the AI Site-Chat from the site. */\n HIDE = 'HIDE',\n /** Doesn't allow the site visitor to write messages, but does send a contact form. */\n CONTACT_FORM_WITHOUT_CHAT = 'CONTACT_FORM_WITHOUT_CHAT',\n /** Allows the site visitor to write messages and sends a contact form. */\n CONTACT_FORM_WITH_CHAT = 'CONTACT_FORM_WITH_CHAT',\n}\n\n/** @enumType */\nexport type OfflineBehaviorWithLiterals =\n | OfflineBehavior\n | 'UNKNOWN_OFFLINE_BEHAVIOR'\n | 'CHAT_ONLY'\n | 'HIDE'\n | 'CONTACT_FORM_WITHOUT_CHAT'\n | 'CONTACT_FORM_WITH_CHAT';\n\nexport interface GetWidgetSettingsRequest {}\n\nexport interface GetWidgetSettingsResponse {\n /** Retrieved widget settings. */\n widgetSettings?: WidgetSettings;\n /**\n * Whether the assistant is currently online.\n * @readonly\n * @deprecated Whether the assistant is currently online.\n * @replacedBy active_handlers\n * @targetRemovalDate 2025-12-01\n */\n assistantOnline?: boolean;\n /**\n * Active chat handlers (e.g., AI assistant, site owner).\n * @readonly\n */\n activeHandlers?: ChatHandlerWithLiterals[];\n}\n\nexport enum ChatHandler {\n /** Unknown handler. */\n UNKNOWN_HANDLER = 'UNKNOWN_HANDLER',\n /** AI assistant is handling chats. */\n AI = 'AI',\n /** Site owner is handling chats. */\n SITE_OWNER = 'SITE_OWNER',\n}\n\n/** @enumType */\nexport type ChatHandlerWithLiterals =\n | ChatHandler\n | 'UNKNOWN_HANDLER'\n | 'AI'\n | 'SITE_OWNER';\n\nexport interface SetWidgetSettingsRequest {\n /** Widget settings to update. */\n widgetSettings: WidgetSettings;\n}\n\nexport interface SetWidgetSettingsResponse {\n /** Updated widget settings. */\n widgetSettings?: WidgetSettings;\n}\n\n/**\n * Retrieves the widget settings for the site.\n * @public\n * @permissionId INNOVATION_LAB.CHAT_WIDGET_SETTINGS_READ\n * @applicableIdentity APP\n * @fqn wix.innovation.assistant.widget.v1.Settings.GetWidgetSettings\n */\nexport async function getWidgetSettings(): Promise<\n NonNullablePaths<\n GetWidgetSettingsResponse,\n | `widgetSettings.enabled`\n | `widgetSettings.introMessage.message.enabled`\n | `widgetSettings.introMessage.message.text`\n | `widgetSettings.introMessage.suggestions.enabled`\n | `widgetSettings.introMessage.suggestions.questions`\n | `widgetSettings.contactForm.conditions.cannotAnswer`\n | `widgetSettings.contactForm.conditions.requestForPerson`\n | `widgetSettings.contactForm.fields.name`\n | `widgetSettings.contactForm.fields.email`\n | `widgetSettings.contactForm.fields.phone`\n | `widgetSettings.contactForm.fields.message`\n | `widgetSettings.contactForm.userConditions.beforeChat`\n | `widgetSettings.contactForm.userConditions.afterFirstMessage`\n | `widgetSettings.contactForm.userConditions.never`\n | `widgetSettings.autoOpen`\n | `widgetSettings.activeHours.always`\n | `widgetSettings.activeHours.schedule.monday.enabled`\n | `widgetSettings.activeHours.schedule.monday.frames`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.start`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.end`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.frameType`\n | `widgetSettings.activeHours.timeZone`\n | `widgetSettings.activeHours.mode`\n | `widgetSettings.offlineBehavior`\n | `assistantOnline`\n | `activeHandlers`,\n 8\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixInnovationWidgetV1WidgetSettings.getWidgetSettings(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 singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Sets the widget settings for the site.\n * @param widgetSettings - Widget settings to update.\n * @public\n * @requiredField widgetSettings\n * @requiredField widgetSettings.activeHours\n * @requiredField widgetSettings.contactForm\n * @requiredField widgetSettings.contactForm.conditions\n * @requiredField widgetSettings.contactForm.fields\n * @requiredField widgetSettings.introMessage\n * @requiredField widgetSettings.offlineBehavior\n * @permissionId INNOVATION_LAB.CHAT_WIDGET_SETTINGS_WRITE\n * @applicableIdentity APP\n * @fqn wix.innovation.assistant.widget.v1.Settings.SetWidgetSettings\n */\nexport async function setWidgetSettings(\n widgetSettings: NonNullablePaths<\n WidgetSettings,\n | `activeHours`\n | `contactForm`\n | `contactForm.conditions`\n | `contactForm.fields`\n | `introMessage`\n | `offlineBehavior`,\n 3\n >\n): Promise<\n NonNullablePaths<\n SetWidgetSettingsResponse,\n | `widgetSettings.enabled`\n | `widgetSettings.introMessage.message.enabled`\n | `widgetSettings.introMessage.message.text`\n | `widgetSettings.introMessage.suggestions.enabled`\n | `widgetSettings.introMessage.suggestions.questions`\n | `widgetSettings.contactForm.conditions.cannotAnswer`\n | `widgetSettings.contactForm.conditions.requestForPerson`\n | `widgetSettings.contactForm.fields.name`\n | `widgetSettings.contactForm.fields.email`\n | `widgetSettings.contactForm.fields.phone`\n | `widgetSettings.contactForm.fields.message`\n | `widgetSettings.contactForm.userConditions.beforeChat`\n | `widgetSettings.contactForm.userConditions.afterFirstMessage`\n | `widgetSettings.contactForm.userConditions.never`\n | `widgetSettings.autoOpen`\n | `widgetSettings.activeHours.always`\n | `widgetSettings.activeHours.schedule.monday.enabled`\n | `widgetSettings.activeHours.schedule.monday.frames`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.start`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.end`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.frameType`\n | `widgetSettings.activeHours.timeZone`\n | `widgetSettings.activeHours.mode`\n | `widgetSettings.offlineBehavior`,\n 8\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n widgetSettings: widgetSettings,\n });\n\n const reqOpts =\n ambassadorWixInnovationWidgetV1WidgetSettings.setWidgetSettings(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: { widgetSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['widgetSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixInnovationAssistantWidgetV1SettingsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n {\n srcPath: '/innovation/widget',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/wix-assistant-widget',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ai-site-chat_widget-settings';\n\n/** Retrieves the widget settings for the site. */\nexport function getWidgetSettings(payload: object): RequestOptionsFactory<any> {\n function __getWidgetSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.innovation.widget.v1.widget_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.innovation.assistant.widget.v1.Settings.GetWidgetSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInnovationAssistantWidgetV1SettingsUrl({\n protoPath: '/v1/settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getWidgetSettings;\n}\n\n/** Sets the widget settings for the site. */\nexport function setWidgetSettings(payload: object): RequestOptionsFactory<any> {\n function __setWidgetSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.innovation.widget.v1.widget_settings',\n method: 'POST' as any,\n methodFqn:\n 'wix.innovation.assistant.widget.v1.Settings.SetWidgetSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInnovationAssistantWidgetV1SettingsUrl({\n protoPath: '/v1/settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __setWidgetSettings;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetWidgetSettingsResponse,\n SetWidgetSettingsResponse,\n WidgetSettings,\n getWidgetSettings as universalGetWidgetSettings,\n setWidgetSettings as universalSetWidgetSettings,\n} from './innovation-widget-v1-widget-settings-widget-settings.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ai-site-chat' };\n\nexport function getWidgetSettings(\n httpClient: HttpClient\n): GetWidgetSettingsSignature {\n return () =>\n universalGetWidgetSettings(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetWidgetSettingsSignature {\n /**\n * Retrieves the widget settings for the site.\n */\n (): Promise<\n NonNullablePaths<\n GetWidgetSettingsResponse,\n | `widgetSettings.enabled`\n | `widgetSettings.introMessage.message.enabled`\n | `widgetSettings.introMessage.message.text`\n | `widgetSettings.introMessage.suggestions.enabled`\n | `widgetSettings.introMessage.suggestions.questions`\n | `widgetSettings.contactForm.conditions.cannotAnswer`\n | `widgetSettings.contactForm.conditions.requestForPerson`\n | `widgetSettings.contactForm.fields.name`\n | `widgetSettings.contactForm.fields.email`\n | `widgetSettings.contactForm.fields.phone`\n | `widgetSettings.contactForm.fields.message`\n | `widgetSettings.contactForm.userConditions.beforeChat`\n | `widgetSettings.contactForm.userConditions.afterFirstMessage`\n | `widgetSettings.contactForm.userConditions.never`\n | `widgetSettings.autoOpen`\n | `widgetSettings.activeHours.always`\n | `widgetSettings.activeHours.schedule.monday.enabled`\n | `widgetSettings.activeHours.schedule.monday.frames`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.start`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.end`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.frameType`\n | `widgetSettings.activeHours.timeZone`\n | `widgetSettings.activeHours.mode`\n | `widgetSettings.offlineBehavior`\n | `assistantOnline`\n | `activeHandlers`,\n 8\n >\n >;\n}\n\nexport function setWidgetSettings(\n httpClient: HttpClient\n): SetWidgetSettingsSignature {\n return (\n widgetSettings: NonNullablePaths<\n WidgetSettings,\n | `activeHours`\n | `contactForm`\n | `contactForm.conditions`\n | `contactForm.fields`\n | `introMessage`\n | `offlineBehavior`,\n 3\n >\n ) =>\n universalSetWidgetSettings(\n widgetSettings,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SetWidgetSettingsSignature {\n /**\n * Sets the widget settings for the site.\n * @param - Widget settings to update.\n */\n (\n widgetSettings: NonNullablePaths<\n WidgetSettings,\n | `activeHours`\n | `contactForm`\n | `contactForm.conditions`\n | `contactForm.fields`\n | `introMessage`\n | `offlineBehavior`,\n 3\n >\n ): Promise<\n NonNullablePaths<\n SetWidgetSettingsResponse,\n | `widgetSettings.enabled`\n | `widgetSettings.introMessage.message.enabled`\n | `widgetSettings.introMessage.message.text`\n | `widgetSettings.introMessage.suggestions.enabled`\n | `widgetSettings.introMessage.suggestions.questions`\n | `widgetSettings.contactForm.conditions.cannotAnswer`\n | `widgetSettings.contactForm.conditions.requestForPerson`\n | `widgetSettings.contactForm.fields.name`\n | `widgetSettings.contactForm.fields.email`\n | `widgetSettings.contactForm.fields.phone`\n | `widgetSettings.contactForm.fields.message`\n | `widgetSettings.contactForm.userConditions.beforeChat`\n | `widgetSettings.contactForm.userConditions.afterFirstMessage`\n | `widgetSettings.contactForm.userConditions.never`\n | `widgetSettings.autoOpen`\n | `widgetSettings.activeHours.always`\n | `widgetSettings.activeHours.schedule.monday.enabled`\n | `widgetSettings.activeHours.schedule.monday.frames`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.start`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.end`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.frameType`\n | `widgetSettings.activeHours.timeZone`\n | `widgetSettings.activeHours.mode`\n | `widgetSettings.offlineBehavior`,\n 8\n >\n >;\n}\n\nexport {\n ActiveHours,\n ChatHandler,\n ChatHandlerMode,\n Conditions,\n ContactForm,\n DaySchedule,\n Fields,\n FrameHandlerType,\n GetWidgetSettingsRequest,\n GetWidgetSettingsResponse,\n IntroMessage,\n OfflineBehavior,\n Schedule,\n SetWidgetSettingsRequest,\n SetWidgetSettingsResponse,\n SettingsMessage,\n SuggestedQuestions,\n UserConditions,\n WidgetSettings,\n WorkingHoursFrame,\n} from './innovation-widget-v1-widget-settings-widget-settings.universal.js';\n","import {\n getWidgetSettings as publicGetWidgetSettings,\n setWidgetSettings as publicSetWidgetSettings,\n} from './innovation-widget-v1-widget-settings-widget-settings.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getWidgetSettings: MaybeContext<\n BuildRESTFunction<typeof publicGetWidgetSettings> &\n typeof publicGetWidgetSettings\n> = /*#__PURE__*/ createRESTModule(publicGetWidgetSettings);\nexport const setWidgetSettings: MaybeContext<\n BuildRESTFunction<typeof publicSetWidgetSettings> &\n typeof publicSetWidgetSettings\n> = /*#__PURE__*/ createRESTModule(publicSetWidgetSettings);\n\nexport {\n FrameHandlerType,\n ChatHandlerMode,\n OfflineBehavior,\n ChatHandler,\n} from './innovation-widget-v1-widget-settings-widget-settings.universal.js';\nexport {\n WidgetSettings,\n IntroMessage,\n SettingsMessage,\n SuggestedQuestions,\n ContactForm,\n Conditions,\n Fields,\n UserConditions,\n ActiveHours,\n Schedule,\n DaySchedule,\n WorkingHoursFrame,\n GetWidgetSettingsRequest,\n GetWidgetSettingsResponse,\n SetWidgetSettingsRequest,\n SetWidgetSettingsResponse,\n} from './innovation-widget-v1-widget-settings-widget-settings.universal.js';\nexport {\n FrameHandlerTypeWithLiterals,\n ChatHandlerModeWithLiterals,\n OfflineBehaviorWithLiterals,\n ChatHandlerWithLiterals,\n} from './innovation-widget-v1-widget-settings-widget-settings.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,iDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AA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,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,gBAAgB,OAAO;AAAA,QACnD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,gBAAgB;AAAA,IACnB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEvcO,SAASE,mBACd,YAC4B;AAC5B,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;AAwCO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CACL,mBAWAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC3EA,IAAAC,uBAAiC;AAG1B,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,qBAGK,2DAAiBA,kBAAuB;","names":["getWidgetSettings","setWidgetSettings","import_timestamp","import_rest_modules","payload","FrameHandlerType","ChatHandlerMode","OfflineBehavior","ChatHandler","getWidgetSettings","sdkTransformError","setWidgetSettings","getWidgetSettings","setWidgetSettings","import_rest_modules","getWidgetSettings","setWidgetSettings"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.universal.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.http.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.public.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.context.ts"],"sourcesContent":["export * from './src/innovation-widget-v1-widget-settings-widget-settings.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixInnovationWidgetV1WidgetSettings from './innovation-widget-v1-widget-settings-widget-settings.http.js';\n\nexport interface WidgetSettings {\n /**\n * Widget settings ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Whether the AI Site-Chat is enabled on the site.\n * @deprecated Whether the AI Site-Chat is enabled on the site.\n * @replacedBy active_hours\n * @targetRemovalDate 2025-12-01\n */\n enabled?: boolean;\n /** AI Site-Chat introduction. This is shown in the chat when a site visitor starts a new conversation. */\n introMessage?: IntroMessage;\n /** Settings for the contact form. */\n contactForm?: ContactForm;\n /**\n * Date and time the widget settings were created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the widget settings were updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Whether to open the AI Site-Chat automatically when the site loads. */\n autoOpen?: boolean;\n /** Times the AI Site-Chat is available on the site. */\n activeHours?: ActiveHours;\n /** Defines how the AI Site-Chat functions during the non-active hours. */\n offlineBehavior?: OfflineBehaviorWithLiterals;\n /** Whether the AI Site-Chat should send a summary of the site visitor's navigation on the site. */\n navigationSummary?: boolean | null;\n /**\n * Wix Media image ID used for the AI Site-Chat.\n * @maxLength 500\n */\n avatar?: string | null;\n /** Whether to display example questions from the AI Site-Chat. */\n generatedQuestions?: boolean | null;\n}\n\n/** Intro message */\nexport interface IntroMessage {\n /** Main message settings. */\n message?: SettingsMessage;\n /** Legal disclaimer message settings. */\n legalDisclaimer?: SettingsMessage;\n /** Offline message settings. */\n offlineDisclaimer?: SettingsMessage;\n /** Message shown as popup to engage the site visitor with the AI assistant. */\n engage?: SettingsMessage;\n /** Suggested questions shown to the site visitor to help them get started. */\n suggestions?: SuggestedQuestions;\n}\n\nexport interface SettingsMessage {\n /** Whether the message is enabled. */\n enabled?: boolean;\n /**\n * Message content.\n * @maxLength 1000\n */\n text?: string;\n}\n\nexport interface SuggestedQuestions {\n /** Whether suggesting questions is enabled. */\n enabled?: boolean;\n /**\n * Suggested questions shown to the site visitor to help them get started.\n * @minSize 1\n * @maxSize 5\n */\n questions?: SettingsMessage[];\n /** Introduction message for the suggested questions. */\n introduction?: SettingsMessage;\n}\n\nexport interface ContactForm {\n /** When the AI Site-Chat should send the contact form. */\n conditions?: Conditions;\n /** Contact form fields. */\n fields?: Fields;\n /** When to show contact form if site owner is available. */\n userConditions?: UserConditions;\n}\n\n/** Contact form conditions for AI Site-Chat */\nexport interface Conditions {\n /** Whether the AI Site-Chat should send the contact form if the AI is unable to answer the site visitor's question. */\n cannotAnswer?: boolean;\n /** Whether the AI Site-Chat should send the contact form if the site visitor requests to chat with a real person. */\n requestForPerson?: boolean;\n /**\n * Require site visitor to fill contact form before starting a conversation.\n * @deprecated Require site visitor to fill contact form before starting a conversation.\n * @targetRemovalDate 2025-12-01\n */\n beforeChat?: boolean | null;\n}\n\n/** Contact form fields */\nexport interface Fields {\n /** Whether to include a name field in the form. */\n name?: boolean;\n /** Whether to include an email field in the form. */\n email?: boolean;\n /** Whether to include a phone number field in the form. */\n phone?: boolean;\n /** Whether to include a message field in the form. */\n message?: boolean;\n}\n\n/** Contact form conditions for when site owner is available */\nexport interface UserConditions {\n /** Show site visitor contact form before starting a conversation. */\n beforeChat?: boolean;\n /** Show site visitor contact form after their first message. */\n afterFirstMessage?: boolean;\n /** Never show site visitor contact form. */\n never?: boolean;\n}\n\n/** Working hours settings */\nexport interface ActiveHours {\n /**\n * Whether the AI Assistant is always online. If `true`, `schedule` and `timeZone` are ignored.\n * @deprecated Whether the AI Assistant is always online. If `true`, `schedule` and `timeZone` are ignored.\n * @replacedBy availability\n * @targetRemovalDate 2025-12-01\n */\n always?: boolean;\n /** Times at which the AI Assistant is online. */\n schedule?: Schedule;\n /**\n * Timezone used for the schedule.\n * @maxLength 256\n */\n timeZone?: string;\n /** Hours when AI assistant or site owner are available. */\n mode?: ChatHandlerModeWithLiterals;\n}\n\n/** Schedule */\nexport interface Schedule {\n /** Monday schedule. */\n monday?: DaySchedule;\n /** Tuesday schedule. */\n tuesday?: DaySchedule;\n /** Wednesday schedule. */\n wednesday?: DaySchedule;\n /** Thursday schedule. */\n thursday?: DaySchedule;\n /** Friday schedule. */\n friday?: DaySchedule;\n /** Saturday schedule. */\n saturday?: DaySchedule;\n /** Sunday schedule. */\n sunday?: DaySchedule;\n}\n\n/** Day schedule */\nexport interface DaySchedule {\n /** Whether the day is enabled. */\n enabled?: boolean;\n /**\n * Array of times during which the AI Site-Chat or site owner are available.\n * @maxSize 24\n */\n frames?: WorkingHoursFrame[];\n}\n\n/** Working hours frame */\nexport interface WorkingHoursFrame {\n /** Start time of the active hours. */\n start?: number;\n /** End time of the active hours. */\n end?: number;\n /** Who is available during timeframe, AI chat or user chat */\n frameType?: FrameHandlerTypeWithLiterals;\n}\n\n/** Who is available during timeframe, AI chat or user chat */\nexport enum FrameHandlerType {\n /** Unknown frame type. */\n UNKNOWN_FRAME_TYPE = 'UNKNOWN_FRAME_TYPE',\n /** Frame type not selected. */\n NOT_SELECTED = 'NOT_SELECTED',\n /** AI Chat available in time frame. */\n AI_CHAT = 'AI_CHAT',\n /** Chat with human in time frame. */\n WIX_USER_CHAT = 'WIX_USER_CHAT',\n}\n\n/** @enumType */\nexport type FrameHandlerTypeWithLiterals =\n | FrameHandlerType\n | 'UNKNOWN_FRAME_TYPE'\n | 'NOT_SELECTED'\n | 'AI_CHAT'\n | 'WIX_USER_CHAT';\n\n/** Chat availability options */\nexport enum ChatHandlerMode {\n /** Unknown availability. */\n UNKNOWN_MODE = 'UNKNOWN_MODE',\n /** AI assistant is always available. */\n ALWAYS_WITH_AI = 'ALWAYS_WITH_AI',\n /** Chat with site owner is always available. */\n ALWAYS_WITH_WIX_USER = 'ALWAYS_WITH_WIX_USER',\n /** AI and site owner are available according to schedule. */\n SCHEDULED = 'SCHEDULED',\n /** AI assistant and site owner are always offline. */\n OFF = 'OFF',\n}\n\n/** @enumType */\nexport type ChatHandlerModeWithLiterals =\n | ChatHandlerMode\n | 'UNKNOWN_MODE'\n | 'ALWAYS_WITH_AI'\n | 'ALWAYS_WITH_WIX_USER'\n | 'SCHEDULED'\n | 'OFF';\n\nexport enum OfflineBehavior {\n /** Unknown offline behavior. */\n UNKNOWN_OFFLINE_BEHAVIOR = 'UNKNOWN_OFFLINE_BEHAVIOR',\n /** Allows the site visitor to write messages, but doesn't send a contact form. */\n CHAT_ONLY = 'CHAT_ONLY',\n /** Hides the AI Site-Chat from the site. */\n HIDE = 'HIDE',\n /** Doesn't allow the site visitor to write messages, but does send a contact form. */\n CONTACT_FORM_WITHOUT_CHAT = 'CONTACT_FORM_WITHOUT_CHAT',\n /** Allows the site visitor to write messages and sends a contact form. */\n CONTACT_FORM_WITH_CHAT = 'CONTACT_FORM_WITH_CHAT',\n}\n\n/** @enumType */\nexport type OfflineBehaviorWithLiterals =\n | OfflineBehavior\n | 'UNKNOWN_OFFLINE_BEHAVIOR'\n | 'CHAT_ONLY'\n | 'HIDE'\n | 'CONTACT_FORM_WITHOUT_CHAT'\n | 'CONTACT_FORM_WITH_CHAT';\n\nexport interface GetWidgetSettingsRequest {}\n\nexport interface GetWidgetSettingsResponse {\n /** Retrieved widget settings. */\n widgetSettings?: WidgetSettings;\n /**\n * Whether the assistant is currently online.\n * @readonly\n * @deprecated Whether the assistant is currently online.\n * @replacedBy active_handlers\n * @targetRemovalDate 2025-12-01\n */\n assistantOnline?: boolean;\n /**\n * Active chat handlers (e.g., AI assistant, site owner).\n * @readonly\n */\n activeHandlers?: ChatHandlerWithLiterals[];\n}\n\nexport enum ChatHandler {\n /** Unknown handler. */\n UNKNOWN_HANDLER = 'UNKNOWN_HANDLER',\n /** AI assistant is handling chats. */\n AI = 'AI',\n /** Site owner is handling chats. */\n WIX_USER = 'WIX_USER',\n}\n\n/** @enumType */\nexport type ChatHandlerWithLiterals =\n | ChatHandler\n | 'UNKNOWN_HANDLER'\n | 'AI'\n | 'WIX_USER';\n\nexport interface SetWidgetSettingsRequest {\n /** Widget settings to update. */\n widgetSettings: WidgetSettings;\n}\n\nexport interface SetWidgetSettingsResponse {\n /** Updated widget settings. */\n widgetSettings?: WidgetSettings;\n}\n\n/**\n * Retrieves the widget settings for the site.\n * @public\n * @permissionId INNOVATION_LAB.CHAT_WIDGET_SETTINGS_READ\n * @applicableIdentity APP\n * @fqn wix.innovation.assistant.widget.v1.Settings.GetWidgetSettings\n */\nexport async function getWidgetSettings(): Promise<\n NonNullablePaths<\n GetWidgetSettingsResponse,\n | `widgetSettings.enabled`\n | `widgetSettings.introMessage.message.enabled`\n | `widgetSettings.introMessage.message.text`\n | `widgetSettings.introMessage.suggestions.enabled`\n | `widgetSettings.introMessage.suggestions.questions`\n | `widgetSettings.contactForm.conditions.cannotAnswer`\n | `widgetSettings.contactForm.conditions.requestForPerson`\n | `widgetSettings.contactForm.fields.name`\n | `widgetSettings.contactForm.fields.email`\n | `widgetSettings.contactForm.fields.phone`\n | `widgetSettings.contactForm.fields.message`\n | `widgetSettings.contactForm.userConditions.beforeChat`\n | `widgetSettings.contactForm.userConditions.afterFirstMessage`\n | `widgetSettings.contactForm.userConditions.never`\n | `widgetSettings.autoOpen`\n | `widgetSettings.activeHours.always`\n | `widgetSettings.activeHours.schedule.monday.enabled`\n | `widgetSettings.activeHours.schedule.monday.frames`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.start`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.end`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.frameType`\n | `widgetSettings.activeHours.timeZone`\n | `widgetSettings.activeHours.mode`\n | `widgetSettings.offlineBehavior`\n | `assistantOnline`\n | `activeHandlers`,\n 8\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixInnovationWidgetV1WidgetSettings.getWidgetSettings(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 singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Sets the widget settings for the site.\n * @param widgetSettings - Widget settings to update.\n * @public\n * @requiredField widgetSettings\n * @requiredField widgetSettings.activeHours\n * @requiredField widgetSettings.contactForm\n * @requiredField widgetSettings.contactForm.conditions\n * @requiredField widgetSettings.contactForm.fields\n * @requiredField widgetSettings.introMessage\n * @requiredField widgetSettings.offlineBehavior\n * @permissionId INNOVATION_LAB.CHAT_WIDGET_SETTINGS_WRITE\n * @applicableIdentity APP\n * @fqn wix.innovation.assistant.widget.v1.Settings.SetWidgetSettings\n */\nexport async function setWidgetSettings(\n widgetSettings: NonNullablePaths<\n WidgetSettings,\n | `activeHours`\n | `contactForm`\n | `contactForm.conditions`\n | `contactForm.fields`\n | `introMessage`\n | `offlineBehavior`,\n 3\n >\n): Promise<\n NonNullablePaths<\n SetWidgetSettingsResponse,\n | `widgetSettings.enabled`\n | `widgetSettings.introMessage.message.enabled`\n | `widgetSettings.introMessage.message.text`\n | `widgetSettings.introMessage.suggestions.enabled`\n | `widgetSettings.introMessage.suggestions.questions`\n | `widgetSettings.contactForm.conditions.cannotAnswer`\n | `widgetSettings.contactForm.conditions.requestForPerson`\n | `widgetSettings.contactForm.fields.name`\n | `widgetSettings.contactForm.fields.email`\n | `widgetSettings.contactForm.fields.phone`\n | `widgetSettings.contactForm.fields.message`\n | `widgetSettings.contactForm.userConditions.beforeChat`\n | `widgetSettings.contactForm.userConditions.afterFirstMessage`\n | `widgetSettings.contactForm.userConditions.never`\n | `widgetSettings.autoOpen`\n | `widgetSettings.activeHours.always`\n | `widgetSettings.activeHours.schedule.monday.enabled`\n | `widgetSettings.activeHours.schedule.monday.frames`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.start`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.end`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.frameType`\n | `widgetSettings.activeHours.timeZone`\n | `widgetSettings.activeHours.mode`\n | `widgetSettings.offlineBehavior`,\n 8\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n widgetSettings: widgetSettings,\n });\n\n const reqOpts =\n ambassadorWixInnovationWidgetV1WidgetSettings.setWidgetSettings(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: { widgetSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['widgetSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixInnovationAssistantWidgetV1SettingsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n {\n srcPath: '/innovation/widget',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/wix-assistant-widget',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ai-site-chat_widget-settings';\n\n/** Retrieves the widget settings for the site. */\nexport function getWidgetSettings(payload: object): RequestOptionsFactory<any> {\n function __getWidgetSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.innovation.widget.v1.widget_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.innovation.assistant.widget.v1.Settings.GetWidgetSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInnovationAssistantWidgetV1SettingsUrl({\n protoPath: '/v1/settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getWidgetSettings;\n}\n\n/** Sets the widget settings for the site. */\nexport function setWidgetSettings(payload: object): RequestOptionsFactory<any> {\n function __setWidgetSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.innovation.widget.v1.widget_settings',\n method: 'POST' as any,\n methodFqn:\n 'wix.innovation.assistant.widget.v1.Settings.SetWidgetSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInnovationAssistantWidgetV1SettingsUrl({\n protoPath: '/v1/settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __setWidgetSettings;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetWidgetSettingsResponse,\n SetWidgetSettingsResponse,\n WidgetSettings,\n getWidgetSettings as universalGetWidgetSettings,\n setWidgetSettings as universalSetWidgetSettings,\n} from './innovation-widget-v1-widget-settings-widget-settings.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ai-site-chat' };\n\nexport function getWidgetSettings(\n httpClient: HttpClient\n): GetWidgetSettingsSignature {\n return () =>\n universalGetWidgetSettings(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetWidgetSettingsSignature {\n /**\n * Retrieves the widget settings for the site.\n */\n (): Promise<\n NonNullablePaths<\n GetWidgetSettingsResponse,\n | `widgetSettings.enabled`\n | `widgetSettings.introMessage.message.enabled`\n | `widgetSettings.introMessage.message.text`\n | `widgetSettings.introMessage.suggestions.enabled`\n | `widgetSettings.introMessage.suggestions.questions`\n | `widgetSettings.contactForm.conditions.cannotAnswer`\n | `widgetSettings.contactForm.conditions.requestForPerson`\n | `widgetSettings.contactForm.fields.name`\n | `widgetSettings.contactForm.fields.email`\n | `widgetSettings.contactForm.fields.phone`\n | `widgetSettings.contactForm.fields.message`\n | `widgetSettings.contactForm.userConditions.beforeChat`\n | `widgetSettings.contactForm.userConditions.afterFirstMessage`\n | `widgetSettings.contactForm.userConditions.never`\n | `widgetSettings.autoOpen`\n | `widgetSettings.activeHours.always`\n | `widgetSettings.activeHours.schedule.monday.enabled`\n | `widgetSettings.activeHours.schedule.monday.frames`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.start`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.end`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.frameType`\n | `widgetSettings.activeHours.timeZone`\n | `widgetSettings.activeHours.mode`\n | `widgetSettings.offlineBehavior`\n | `assistantOnline`\n | `activeHandlers`,\n 8\n >\n >;\n}\n\nexport function setWidgetSettings(\n httpClient: HttpClient\n): SetWidgetSettingsSignature {\n return (\n widgetSettings: NonNullablePaths<\n WidgetSettings,\n | `activeHours`\n | `contactForm`\n | `contactForm.conditions`\n | `contactForm.fields`\n | `introMessage`\n | `offlineBehavior`,\n 3\n >\n ) =>\n universalSetWidgetSettings(\n widgetSettings,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SetWidgetSettingsSignature {\n /**\n * Sets the widget settings for the site.\n * @param - Widget settings to update.\n */\n (\n widgetSettings: NonNullablePaths<\n WidgetSettings,\n | `activeHours`\n | `contactForm`\n | `contactForm.conditions`\n | `contactForm.fields`\n | `introMessage`\n | `offlineBehavior`,\n 3\n >\n ): Promise<\n NonNullablePaths<\n SetWidgetSettingsResponse,\n | `widgetSettings.enabled`\n | `widgetSettings.introMessage.message.enabled`\n | `widgetSettings.introMessage.message.text`\n | `widgetSettings.introMessage.suggestions.enabled`\n | `widgetSettings.introMessage.suggestions.questions`\n | `widgetSettings.contactForm.conditions.cannotAnswer`\n | `widgetSettings.contactForm.conditions.requestForPerson`\n | `widgetSettings.contactForm.fields.name`\n | `widgetSettings.contactForm.fields.email`\n | `widgetSettings.contactForm.fields.phone`\n | `widgetSettings.contactForm.fields.message`\n | `widgetSettings.contactForm.userConditions.beforeChat`\n | `widgetSettings.contactForm.userConditions.afterFirstMessage`\n | `widgetSettings.contactForm.userConditions.never`\n | `widgetSettings.autoOpen`\n | `widgetSettings.activeHours.always`\n | `widgetSettings.activeHours.schedule.monday.enabled`\n | `widgetSettings.activeHours.schedule.monday.frames`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.start`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.end`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.frameType`\n | `widgetSettings.activeHours.timeZone`\n | `widgetSettings.activeHours.mode`\n | `widgetSettings.offlineBehavior`,\n 8\n >\n >;\n}\n\nexport {\n ActiveHours,\n ChatHandler,\n ChatHandlerMode,\n Conditions,\n ContactForm,\n DaySchedule,\n Fields,\n FrameHandlerType,\n GetWidgetSettingsRequest,\n GetWidgetSettingsResponse,\n IntroMessage,\n OfflineBehavior,\n Schedule,\n SetWidgetSettingsRequest,\n SetWidgetSettingsResponse,\n SettingsMessage,\n SuggestedQuestions,\n UserConditions,\n WidgetSettings,\n WorkingHoursFrame,\n} from './innovation-widget-v1-widget-settings-widget-settings.universal.js';\n","import {\n getWidgetSettings as publicGetWidgetSettings,\n setWidgetSettings as publicSetWidgetSettings,\n} from './innovation-widget-v1-widget-settings-widget-settings.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getWidgetSettings: MaybeContext<\n BuildRESTFunction<typeof publicGetWidgetSettings> &\n typeof publicGetWidgetSettings\n> = /*#__PURE__*/ createRESTModule(publicGetWidgetSettings);\nexport const setWidgetSettings: MaybeContext<\n BuildRESTFunction<typeof publicSetWidgetSettings> &\n typeof publicSetWidgetSettings\n> = /*#__PURE__*/ createRESTModule(publicSetWidgetSettings);\n\nexport {\n FrameHandlerType,\n ChatHandlerMode,\n OfflineBehavior,\n ChatHandler,\n} from './innovation-widget-v1-widget-settings-widget-settings.universal.js';\nexport {\n WidgetSettings,\n IntroMessage,\n SettingsMessage,\n SuggestedQuestions,\n ContactForm,\n Conditions,\n Fields,\n UserConditions,\n ActiveHours,\n Schedule,\n DaySchedule,\n WorkingHoursFrame,\n GetWidgetSettingsRequest,\n GetWidgetSettingsResponse,\n SetWidgetSettingsRequest,\n SetWidgetSettingsResponse,\n} from './innovation-widget-v1-widget-settings-widget-settings.universal.js';\nexport {\n FrameHandlerTypeWithLiterals,\n ChatHandlerModeWithLiterals,\n OfflineBehaviorWithLiterals,\n ChatHandlerWithLiterals,\n} from './innovation-widget-v1-widget-settings-widget-settings.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,iDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;A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,IAAMC,qBAGK,2DAAiBA,kBAAuB;","names":["getWidgetSettings","setWidgetSettings","import_timestamp","import_rest_modules","payload","FrameHandlerType","ChatHandlerMode","OfflineBehavior","ChatHandler","getWidgetSettings","sdkTransformError","setWidgetSettings","getWidgetSettings","setWidgetSettings","import_rest_modules","getWidgetSettings","setWidgetSettings"]}
|
|
@@ -241,10 +241,10 @@ declare enum ChatHandler {
|
|
|
241
241
|
/** AI assistant is handling chats. */
|
|
242
242
|
AI = "AI",
|
|
243
243
|
/** Site owner is handling chats. */
|
|
244
|
-
|
|
244
|
+
WIX_USER = "WIX_USER"
|
|
245
245
|
}
|
|
246
246
|
/** @enumType */
|
|
247
|
-
type ChatHandlerWithLiterals = ChatHandler | 'UNKNOWN_HANDLER' | 'AI' | '
|
|
247
|
+
type ChatHandlerWithLiterals = ChatHandler | 'UNKNOWN_HANDLER' | 'AI' | 'WIX_USER';
|
|
248
248
|
interface SetWidgetSettingsRequest {
|
|
249
249
|
/** Widget settings to update. */
|
|
250
250
|
widgetSettings: WidgetSettings;
|
|
@@ -200,7 +200,7 @@ var OfflineBehavior = /* @__PURE__ */ ((OfflineBehavior2) => {
|
|
|
200
200
|
var ChatHandler = /* @__PURE__ */ ((ChatHandler2) => {
|
|
201
201
|
ChatHandler2["UNKNOWN_HANDLER"] = "UNKNOWN_HANDLER";
|
|
202
202
|
ChatHandler2["AI"] = "AI";
|
|
203
|
-
ChatHandler2["
|
|
203
|
+
ChatHandler2["WIX_USER"] = "WIX_USER";
|
|
204
204
|
return ChatHandler2;
|
|
205
205
|
})(ChatHandler || {});
|
|
206
206
|
async function getWidgetSettings2() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.universal.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.http.ts"],"sourcesContent":["export * from './src/innovation-widget-v1-widget-settings-widget-settings.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixInnovationWidgetV1WidgetSettings from './innovation-widget-v1-widget-settings-widget-settings.http.js';\n\nexport interface WidgetSettings {\n /**\n * Widget settings ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Whether the AI Site-Chat is enabled on the site.\n * @deprecated Whether the AI Site-Chat is enabled on the site.\n * @replacedBy active_hours\n * @targetRemovalDate 2025-12-01\n */\n enabled?: boolean;\n /** AI Site-Chat introduction. This is shown in the chat when a site visitor starts a new conversation. */\n introMessage?: IntroMessage;\n /** Settings for the contact form. */\n contactForm?: ContactForm;\n /**\n * Date and time the widget settings were created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the widget settings were updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Whether to open the AI Site-Chat automatically when the site loads. */\n autoOpen?: boolean;\n /** Times the AI Site-Chat is available on the site. */\n activeHours?: ActiveHours;\n /** Defines how the AI Site-Chat functions during the non-active hours. */\n offlineBehavior?: OfflineBehaviorWithLiterals;\n /** Whether the AI Site-Chat should send a summary of the site visitor's navigation on the site. */\n navigationSummary?: boolean | null;\n /**\n * Wix Media image ID used for the AI Site-Chat.\n * @maxLength 500\n */\n avatar?: string | null;\n /** Whether to display example questions from the AI Site-Chat. */\n generatedQuestions?: boolean | null;\n}\n\n/** Intro message */\nexport interface IntroMessage {\n /** Main message settings. */\n message?: SettingsMessage;\n /** Legal disclaimer message settings. */\n legalDisclaimer?: SettingsMessage;\n /** Offline message settings. */\n offlineDisclaimer?: SettingsMessage;\n /** Message shown as popup to engage the site visitor with the AI assistant. */\n engage?: SettingsMessage;\n /** Suggested questions shown to the site visitor to help them get started. */\n suggestions?: SuggestedQuestions;\n}\n\nexport interface SettingsMessage {\n /** Whether the message is enabled. */\n enabled?: boolean;\n /**\n * Message content.\n * @maxLength 1000\n */\n text?: string;\n}\n\nexport interface SuggestedQuestions {\n /** Whether suggesting questions is enabled. */\n enabled?: boolean;\n /**\n * Suggested questions shown to the site visitor to help them get started.\n * @minSize 1\n * @maxSize 5\n */\n questions?: SettingsMessage[];\n /** Introduction message for the suggested questions. */\n introduction?: SettingsMessage;\n}\n\nexport interface ContactForm {\n /** When the AI Site-Chat should send the contact form. */\n conditions?: Conditions;\n /** Contact form fields. */\n fields?: Fields;\n /** When to show contact form if site owner is available. */\n userConditions?: UserConditions;\n}\n\n/** Contact form conditions for AI Site-Chat */\nexport interface Conditions {\n /** Whether the AI Site-Chat should send the contact form if the AI is unable to answer the site visitor's question. */\n cannotAnswer?: boolean;\n /** Whether the AI Site-Chat should send the contact form if the site visitor requests to chat with a real person. */\n requestForPerson?: boolean;\n /**\n * Require site visitor to fill contact form before starting a conversation.\n * @deprecated Require site visitor to fill contact form before starting a conversation.\n * @targetRemovalDate 2025-12-01\n */\n beforeChat?: boolean | null;\n}\n\n/** Contact form fields */\nexport interface Fields {\n /** Whether to include a name field in the form. */\n name?: boolean;\n /** Whether to include an email field in the form. */\n email?: boolean;\n /** Whether to include a phone number field in the form. */\n phone?: boolean;\n /** Whether to include a message field in the form. */\n message?: boolean;\n}\n\n/** Contact form conditions for when site owner is available */\nexport interface UserConditions {\n /** Show site visitor contact form before starting a conversation. */\n beforeChat?: boolean;\n /** Show site visitor contact form after their first message. */\n afterFirstMessage?: boolean;\n /** Never show site visitor contact form. */\n never?: boolean;\n}\n\n/** Working hours settings */\nexport interface ActiveHours {\n /**\n * Whether the AI Assistant is always online. If `true`, `schedule` and `timeZone` are ignored.\n * @deprecated Whether the AI Assistant is always online. If `true`, `schedule` and `timeZone` are ignored.\n * @replacedBy availability\n * @targetRemovalDate 2025-12-01\n */\n always?: boolean;\n /** Times at which the AI Assistant is online. */\n schedule?: Schedule;\n /**\n * Timezone used for the schedule.\n * @maxLength 256\n */\n timeZone?: string;\n /** Hours when AI assistant or site owner are available. */\n mode?: ChatHandlerModeWithLiterals;\n}\n\n/** Schedule */\nexport interface Schedule {\n /** Monday schedule. */\n monday?: DaySchedule;\n /** Tuesday schedule. */\n tuesday?: DaySchedule;\n /** Wednesday schedule. */\n wednesday?: DaySchedule;\n /** Thursday schedule. */\n thursday?: DaySchedule;\n /** Friday schedule. */\n friday?: DaySchedule;\n /** Saturday schedule. */\n saturday?: DaySchedule;\n /** Sunday schedule. */\n sunday?: DaySchedule;\n}\n\n/** Day schedule */\nexport interface DaySchedule {\n /** Whether the day is enabled. */\n enabled?: boolean;\n /**\n * Array of times during which the AI Site-Chat or site owner are available.\n * @maxSize 24\n */\n frames?: WorkingHoursFrame[];\n}\n\n/** Working hours frame */\nexport interface WorkingHoursFrame {\n /** Start time of the active hours. */\n start?: number;\n /** End time of the active hours. */\n end?: number;\n /** Who is available during timeframe, AI chat or user chat */\n frameType?: FrameHandlerTypeWithLiterals;\n}\n\n/** Who is available during timeframe, AI chat or user chat */\nexport enum FrameHandlerType {\n /** Unknown frame type. */\n UNKNOWN_FRAME_TYPE = 'UNKNOWN_FRAME_TYPE',\n /** Frame type not selected. */\n NOT_SELECTED = 'NOT_SELECTED',\n /** AI Chat available in time frame. */\n AI_CHAT = 'AI_CHAT',\n /** Chat with human in time frame. */\n WIX_USER_CHAT = 'WIX_USER_CHAT',\n}\n\n/** @enumType */\nexport type FrameHandlerTypeWithLiterals =\n | FrameHandlerType\n | 'UNKNOWN_FRAME_TYPE'\n | 'NOT_SELECTED'\n | 'AI_CHAT'\n | 'WIX_USER_CHAT';\n\n/** Chat availability options */\nexport enum ChatHandlerMode {\n /** Unknown availability. */\n UNKNOWN_MODE = 'UNKNOWN_MODE',\n /** AI assistant is always available. */\n ALWAYS_WITH_AI = 'ALWAYS_WITH_AI',\n /** Chat with site owner is always available. */\n ALWAYS_WITH_WIX_USER = 'ALWAYS_WITH_WIX_USER',\n /** AI and site owner are available according to schedule. */\n SCHEDULED = 'SCHEDULED',\n /** AI assistant and site owner are always offline. */\n OFF = 'OFF',\n}\n\n/** @enumType */\nexport type ChatHandlerModeWithLiterals =\n | ChatHandlerMode\n | 'UNKNOWN_MODE'\n | 'ALWAYS_WITH_AI'\n | 'ALWAYS_WITH_WIX_USER'\n | 'SCHEDULED'\n | 'OFF';\n\nexport enum OfflineBehavior {\n /** Unknown offline behavior. */\n UNKNOWN_OFFLINE_BEHAVIOR = 'UNKNOWN_OFFLINE_BEHAVIOR',\n /** Allows the site visitor to write messages, but doesn't send a contact form. */\n CHAT_ONLY = 'CHAT_ONLY',\n /** Hides the AI Site-Chat from the site. */\n HIDE = 'HIDE',\n /** Doesn't allow the site visitor to write messages, but does send a contact form. */\n CONTACT_FORM_WITHOUT_CHAT = 'CONTACT_FORM_WITHOUT_CHAT',\n /** Allows the site visitor to write messages and sends a contact form. */\n CONTACT_FORM_WITH_CHAT = 'CONTACT_FORM_WITH_CHAT',\n}\n\n/** @enumType */\nexport type OfflineBehaviorWithLiterals =\n | OfflineBehavior\n | 'UNKNOWN_OFFLINE_BEHAVIOR'\n | 'CHAT_ONLY'\n | 'HIDE'\n | 'CONTACT_FORM_WITHOUT_CHAT'\n | 'CONTACT_FORM_WITH_CHAT';\n\nexport interface GetWidgetSettingsRequest {}\n\nexport interface GetWidgetSettingsResponse {\n /** Retrieved widget settings. */\n widgetSettings?: WidgetSettings;\n /**\n * Whether the assistant is currently online.\n * @readonly\n * @deprecated Whether the assistant is currently online.\n * @replacedBy active_handlers\n * @targetRemovalDate 2025-12-01\n */\n assistantOnline?: boolean;\n /**\n * Active chat handlers (e.g., AI assistant, site owner).\n * @readonly\n */\n activeHandlers?: ChatHandlerWithLiterals[];\n}\n\nexport enum ChatHandler {\n /** Unknown handler. */\n UNKNOWN_HANDLER = 'UNKNOWN_HANDLER',\n /** AI assistant is handling chats. */\n AI = 'AI',\n /** Site owner is handling chats. */\n SITE_OWNER = 'SITE_OWNER',\n}\n\n/** @enumType */\nexport type ChatHandlerWithLiterals =\n | ChatHandler\n | 'UNKNOWN_HANDLER'\n | 'AI'\n | 'SITE_OWNER';\n\nexport interface SetWidgetSettingsRequest {\n /** Widget settings to update. */\n widgetSettings: WidgetSettings;\n}\n\nexport interface SetWidgetSettingsResponse {\n /** Updated widget settings. */\n widgetSettings?: WidgetSettings;\n}\n\n/**\n * Retrieves the widget settings for the site.\n * @public\n * @permissionId INNOVATION_LAB.CHAT_WIDGET_SETTINGS_READ\n * @applicableIdentity APP\n * @fqn wix.innovation.assistant.widget.v1.Settings.GetWidgetSettings\n */\nexport async function getWidgetSettings(): Promise<\n NonNullablePaths<\n GetWidgetSettingsResponse,\n | `widgetSettings.enabled`\n | `widgetSettings.introMessage.message.enabled`\n | `widgetSettings.introMessage.message.text`\n | `widgetSettings.introMessage.suggestions.enabled`\n | `widgetSettings.introMessage.suggestions.questions`\n | `widgetSettings.contactForm.conditions.cannotAnswer`\n | `widgetSettings.contactForm.conditions.requestForPerson`\n | `widgetSettings.contactForm.fields.name`\n | `widgetSettings.contactForm.fields.email`\n | `widgetSettings.contactForm.fields.phone`\n | `widgetSettings.contactForm.fields.message`\n | `widgetSettings.contactForm.userConditions.beforeChat`\n | `widgetSettings.contactForm.userConditions.afterFirstMessage`\n | `widgetSettings.contactForm.userConditions.never`\n | `widgetSettings.autoOpen`\n | `widgetSettings.activeHours.always`\n | `widgetSettings.activeHours.schedule.monday.enabled`\n | `widgetSettings.activeHours.schedule.monday.frames`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.start`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.end`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.frameType`\n | `widgetSettings.activeHours.timeZone`\n | `widgetSettings.activeHours.mode`\n | `widgetSettings.offlineBehavior`\n | `assistantOnline`\n | `activeHandlers`,\n 8\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixInnovationWidgetV1WidgetSettings.getWidgetSettings(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 singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Sets the widget settings for the site.\n * @param widgetSettings - Widget settings to update.\n * @public\n * @requiredField widgetSettings\n * @requiredField widgetSettings.activeHours\n * @requiredField widgetSettings.contactForm\n * @requiredField widgetSettings.contactForm.conditions\n * @requiredField widgetSettings.contactForm.fields\n * @requiredField widgetSettings.introMessage\n * @requiredField widgetSettings.offlineBehavior\n * @permissionId INNOVATION_LAB.CHAT_WIDGET_SETTINGS_WRITE\n * @applicableIdentity APP\n * @fqn wix.innovation.assistant.widget.v1.Settings.SetWidgetSettings\n */\nexport async function setWidgetSettings(\n widgetSettings: NonNullablePaths<\n WidgetSettings,\n | `activeHours`\n | `contactForm`\n | `contactForm.conditions`\n | `contactForm.fields`\n | `introMessage`\n | `offlineBehavior`,\n 3\n >\n): Promise<\n NonNullablePaths<\n SetWidgetSettingsResponse,\n | `widgetSettings.enabled`\n | `widgetSettings.introMessage.message.enabled`\n | `widgetSettings.introMessage.message.text`\n | `widgetSettings.introMessage.suggestions.enabled`\n | `widgetSettings.introMessage.suggestions.questions`\n | `widgetSettings.contactForm.conditions.cannotAnswer`\n | `widgetSettings.contactForm.conditions.requestForPerson`\n | `widgetSettings.contactForm.fields.name`\n | `widgetSettings.contactForm.fields.email`\n | `widgetSettings.contactForm.fields.phone`\n | `widgetSettings.contactForm.fields.message`\n | `widgetSettings.contactForm.userConditions.beforeChat`\n | `widgetSettings.contactForm.userConditions.afterFirstMessage`\n | `widgetSettings.contactForm.userConditions.never`\n | `widgetSettings.autoOpen`\n | `widgetSettings.activeHours.always`\n | `widgetSettings.activeHours.schedule.monday.enabled`\n | `widgetSettings.activeHours.schedule.monday.frames`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.start`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.end`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.frameType`\n | `widgetSettings.activeHours.timeZone`\n | `widgetSettings.activeHours.mode`\n | `widgetSettings.offlineBehavior`,\n 8\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n widgetSettings: widgetSettings,\n });\n\n const reqOpts =\n ambassadorWixInnovationWidgetV1WidgetSettings.setWidgetSettings(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: { widgetSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['widgetSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixInnovationAssistantWidgetV1SettingsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n {\n srcPath: '/innovation/widget',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/wix-assistant-widget',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ai-site-chat_widget-settings';\n\n/** Retrieves the widget settings for the site. */\nexport function getWidgetSettings(payload: object): RequestOptionsFactory<any> {\n function __getWidgetSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.innovation.widget.v1.widget_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.innovation.assistant.widget.v1.Settings.GetWidgetSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInnovationAssistantWidgetV1SettingsUrl({\n protoPath: '/v1/settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getWidgetSettings;\n}\n\n/** Sets the widget settings for the site. */\nexport function setWidgetSettings(payload: object): RequestOptionsFactory<any> {\n function __setWidgetSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.innovation.widget.v1.widget_settings',\n method: 'POST' as any,\n methodFqn:\n 'wix.innovation.assistant.widget.v1.Settings.SetWidgetSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInnovationAssistantWidgetV1SettingsUrl({\n protoPath: '/v1/settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __setWidgetSettings;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,iDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MA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,EACR;AACF;","names":["getWidgetSettings","setWidgetSettings","import_timestamp","import_rest_modules","payload","FrameHandlerType","ChatHandlerMode","OfflineBehavior","ChatHandler","getWidgetSettings","sdkTransformError","setWidgetSettings"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.universal.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.http.ts"],"sourcesContent":["export * from './src/innovation-widget-v1-widget-settings-widget-settings.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixInnovationWidgetV1WidgetSettings from './innovation-widget-v1-widget-settings-widget-settings.http.js';\n\nexport interface WidgetSettings {\n /**\n * Widget settings ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Whether the AI Site-Chat is enabled on the site.\n * @deprecated Whether the AI Site-Chat is enabled on the site.\n * @replacedBy active_hours\n * @targetRemovalDate 2025-12-01\n */\n enabled?: boolean;\n /** AI Site-Chat introduction. This is shown in the chat when a site visitor starts a new conversation. */\n introMessage?: IntroMessage;\n /** Settings for the contact form. */\n contactForm?: ContactForm;\n /**\n * Date and time the widget settings were created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the widget settings were updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Whether to open the AI Site-Chat automatically when the site loads. */\n autoOpen?: boolean;\n /** Times the AI Site-Chat is available on the site. */\n activeHours?: ActiveHours;\n /** Defines how the AI Site-Chat functions during the non-active hours. */\n offlineBehavior?: OfflineBehaviorWithLiterals;\n /** Whether the AI Site-Chat should send a summary of the site visitor's navigation on the site. */\n navigationSummary?: boolean | null;\n /**\n * Wix Media image ID used for the AI Site-Chat.\n * @maxLength 500\n */\n avatar?: string | null;\n /** Whether to display example questions from the AI Site-Chat. */\n generatedQuestions?: boolean | null;\n}\n\n/** Intro message */\nexport interface IntroMessage {\n /** Main message settings. */\n message?: SettingsMessage;\n /** Legal disclaimer message settings. */\n legalDisclaimer?: SettingsMessage;\n /** Offline message settings. */\n offlineDisclaimer?: SettingsMessage;\n /** Message shown as popup to engage the site visitor with the AI assistant. */\n engage?: SettingsMessage;\n /** Suggested questions shown to the site visitor to help them get started. */\n suggestions?: SuggestedQuestions;\n}\n\nexport interface SettingsMessage {\n /** Whether the message is enabled. */\n enabled?: boolean;\n /**\n * Message content.\n * @maxLength 1000\n */\n text?: string;\n}\n\nexport interface SuggestedQuestions {\n /** Whether suggesting questions is enabled. */\n enabled?: boolean;\n /**\n * Suggested questions shown to the site visitor to help them get started.\n * @minSize 1\n * @maxSize 5\n */\n questions?: SettingsMessage[];\n /** Introduction message for the suggested questions. */\n introduction?: SettingsMessage;\n}\n\nexport interface ContactForm {\n /** When the AI Site-Chat should send the contact form. */\n conditions?: Conditions;\n /** Contact form fields. */\n fields?: Fields;\n /** When to show contact form if site owner is available. */\n userConditions?: UserConditions;\n}\n\n/** Contact form conditions for AI Site-Chat */\nexport interface Conditions {\n /** Whether the AI Site-Chat should send the contact form if the AI is unable to answer the site visitor's question. */\n cannotAnswer?: boolean;\n /** Whether the AI Site-Chat should send the contact form if the site visitor requests to chat with a real person. */\n requestForPerson?: boolean;\n /**\n * Require site visitor to fill contact form before starting a conversation.\n * @deprecated Require site visitor to fill contact form before starting a conversation.\n * @targetRemovalDate 2025-12-01\n */\n beforeChat?: boolean | null;\n}\n\n/** Contact form fields */\nexport interface Fields {\n /** Whether to include a name field in the form. */\n name?: boolean;\n /** Whether to include an email field in the form. */\n email?: boolean;\n /** Whether to include a phone number field in the form. */\n phone?: boolean;\n /** Whether to include a message field in the form. */\n message?: boolean;\n}\n\n/** Contact form conditions for when site owner is available */\nexport interface UserConditions {\n /** Show site visitor contact form before starting a conversation. */\n beforeChat?: boolean;\n /** Show site visitor contact form after their first message. */\n afterFirstMessage?: boolean;\n /** Never show site visitor contact form. */\n never?: boolean;\n}\n\n/** Working hours settings */\nexport interface ActiveHours {\n /**\n * Whether the AI Assistant is always online. If `true`, `schedule` and `timeZone` are ignored.\n * @deprecated Whether the AI Assistant is always online. If `true`, `schedule` and `timeZone` are ignored.\n * @replacedBy availability\n * @targetRemovalDate 2025-12-01\n */\n always?: boolean;\n /** Times at which the AI Assistant is online. */\n schedule?: Schedule;\n /**\n * Timezone used for the schedule.\n * @maxLength 256\n */\n timeZone?: string;\n /** Hours when AI assistant or site owner are available. */\n mode?: ChatHandlerModeWithLiterals;\n}\n\n/** Schedule */\nexport interface Schedule {\n /** Monday schedule. */\n monday?: DaySchedule;\n /** Tuesday schedule. */\n tuesday?: DaySchedule;\n /** Wednesday schedule. */\n wednesday?: DaySchedule;\n /** Thursday schedule. */\n thursday?: DaySchedule;\n /** Friday schedule. */\n friday?: DaySchedule;\n /** Saturday schedule. */\n saturday?: DaySchedule;\n /** Sunday schedule. */\n sunday?: DaySchedule;\n}\n\n/** Day schedule */\nexport interface DaySchedule {\n /** Whether the day is enabled. */\n enabled?: boolean;\n /**\n * Array of times during which the AI Site-Chat or site owner are available.\n * @maxSize 24\n */\n frames?: WorkingHoursFrame[];\n}\n\n/** Working hours frame */\nexport interface WorkingHoursFrame {\n /** Start time of the active hours. */\n start?: number;\n /** End time of the active hours. */\n end?: number;\n /** Who is available during timeframe, AI chat or user chat */\n frameType?: FrameHandlerTypeWithLiterals;\n}\n\n/** Who is available during timeframe, AI chat or user chat */\nexport enum FrameHandlerType {\n /** Unknown frame type. */\n UNKNOWN_FRAME_TYPE = 'UNKNOWN_FRAME_TYPE',\n /** Frame type not selected. */\n NOT_SELECTED = 'NOT_SELECTED',\n /** AI Chat available in time frame. */\n AI_CHAT = 'AI_CHAT',\n /** Chat with human in time frame. */\n WIX_USER_CHAT = 'WIX_USER_CHAT',\n}\n\n/** @enumType */\nexport type FrameHandlerTypeWithLiterals =\n | FrameHandlerType\n | 'UNKNOWN_FRAME_TYPE'\n | 'NOT_SELECTED'\n | 'AI_CHAT'\n | 'WIX_USER_CHAT';\n\n/** Chat availability options */\nexport enum ChatHandlerMode {\n /** Unknown availability. */\n UNKNOWN_MODE = 'UNKNOWN_MODE',\n /** AI assistant is always available. */\n ALWAYS_WITH_AI = 'ALWAYS_WITH_AI',\n /** Chat with site owner is always available. */\n ALWAYS_WITH_WIX_USER = 'ALWAYS_WITH_WIX_USER',\n /** AI and site owner are available according to schedule. */\n SCHEDULED = 'SCHEDULED',\n /** AI assistant and site owner are always offline. */\n OFF = 'OFF',\n}\n\n/** @enumType */\nexport type ChatHandlerModeWithLiterals =\n | ChatHandlerMode\n | 'UNKNOWN_MODE'\n | 'ALWAYS_WITH_AI'\n | 'ALWAYS_WITH_WIX_USER'\n | 'SCHEDULED'\n | 'OFF';\n\nexport enum OfflineBehavior {\n /** Unknown offline behavior. */\n UNKNOWN_OFFLINE_BEHAVIOR = 'UNKNOWN_OFFLINE_BEHAVIOR',\n /** Allows the site visitor to write messages, but doesn't send a contact form. */\n CHAT_ONLY = 'CHAT_ONLY',\n /** Hides the AI Site-Chat from the site. */\n HIDE = 'HIDE',\n /** Doesn't allow the site visitor to write messages, but does send a contact form. */\n CONTACT_FORM_WITHOUT_CHAT = 'CONTACT_FORM_WITHOUT_CHAT',\n /** Allows the site visitor to write messages and sends a contact form. */\n CONTACT_FORM_WITH_CHAT = 'CONTACT_FORM_WITH_CHAT',\n}\n\n/** @enumType */\nexport type OfflineBehaviorWithLiterals =\n | OfflineBehavior\n | 'UNKNOWN_OFFLINE_BEHAVIOR'\n | 'CHAT_ONLY'\n | 'HIDE'\n | 'CONTACT_FORM_WITHOUT_CHAT'\n | 'CONTACT_FORM_WITH_CHAT';\n\nexport interface GetWidgetSettingsRequest {}\n\nexport interface GetWidgetSettingsResponse {\n /** Retrieved widget settings. */\n widgetSettings?: WidgetSettings;\n /**\n * Whether the assistant is currently online.\n * @readonly\n * @deprecated Whether the assistant is currently online.\n * @replacedBy active_handlers\n * @targetRemovalDate 2025-12-01\n */\n assistantOnline?: boolean;\n /**\n * Active chat handlers (e.g., AI assistant, site owner).\n * @readonly\n */\n activeHandlers?: ChatHandlerWithLiterals[];\n}\n\nexport enum ChatHandler {\n /** Unknown handler. */\n UNKNOWN_HANDLER = 'UNKNOWN_HANDLER',\n /** AI assistant is handling chats. */\n AI = 'AI',\n /** Site owner is handling chats. */\n WIX_USER = 'WIX_USER',\n}\n\n/** @enumType */\nexport type ChatHandlerWithLiterals =\n | ChatHandler\n | 'UNKNOWN_HANDLER'\n | 'AI'\n | 'WIX_USER';\n\nexport interface SetWidgetSettingsRequest {\n /** Widget settings to update. */\n widgetSettings: WidgetSettings;\n}\n\nexport interface SetWidgetSettingsResponse {\n /** Updated widget settings. */\n widgetSettings?: WidgetSettings;\n}\n\n/**\n * Retrieves the widget settings for the site.\n * @public\n * @permissionId INNOVATION_LAB.CHAT_WIDGET_SETTINGS_READ\n * @applicableIdentity APP\n * @fqn wix.innovation.assistant.widget.v1.Settings.GetWidgetSettings\n */\nexport async function getWidgetSettings(): Promise<\n NonNullablePaths<\n GetWidgetSettingsResponse,\n | `widgetSettings.enabled`\n | `widgetSettings.introMessage.message.enabled`\n | `widgetSettings.introMessage.message.text`\n | `widgetSettings.introMessage.suggestions.enabled`\n | `widgetSettings.introMessage.suggestions.questions`\n | `widgetSettings.contactForm.conditions.cannotAnswer`\n | `widgetSettings.contactForm.conditions.requestForPerson`\n | `widgetSettings.contactForm.fields.name`\n | `widgetSettings.contactForm.fields.email`\n | `widgetSettings.contactForm.fields.phone`\n | `widgetSettings.contactForm.fields.message`\n | `widgetSettings.contactForm.userConditions.beforeChat`\n | `widgetSettings.contactForm.userConditions.afterFirstMessage`\n | `widgetSettings.contactForm.userConditions.never`\n | `widgetSettings.autoOpen`\n | `widgetSettings.activeHours.always`\n | `widgetSettings.activeHours.schedule.monday.enabled`\n | `widgetSettings.activeHours.schedule.monday.frames`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.start`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.end`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.frameType`\n | `widgetSettings.activeHours.timeZone`\n | `widgetSettings.activeHours.mode`\n | `widgetSettings.offlineBehavior`\n | `assistantOnline`\n | `activeHandlers`,\n 8\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixInnovationWidgetV1WidgetSettings.getWidgetSettings(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 singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Sets the widget settings for the site.\n * @param widgetSettings - Widget settings to update.\n * @public\n * @requiredField widgetSettings\n * @requiredField widgetSettings.activeHours\n * @requiredField widgetSettings.contactForm\n * @requiredField widgetSettings.contactForm.conditions\n * @requiredField widgetSettings.contactForm.fields\n * @requiredField widgetSettings.introMessage\n * @requiredField widgetSettings.offlineBehavior\n * @permissionId INNOVATION_LAB.CHAT_WIDGET_SETTINGS_WRITE\n * @applicableIdentity APP\n * @fqn wix.innovation.assistant.widget.v1.Settings.SetWidgetSettings\n */\nexport async function setWidgetSettings(\n widgetSettings: NonNullablePaths<\n WidgetSettings,\n | `activeHours`\n | `contactForm`\n | `contactForm.conditions`\n | `contactForm.fields`\n | `introMessage`\n | `offlineBehavior`,\n 3\n >\n): Promise<\n NonNullablePaths<\n SetWidgetSettingsResponse,\n | `widgetSettings.enabled`\n | `widgetSettings.introMessage.message.enabled`\n | `widgetSettings.introMessage.message.text`\n | `widgetSettings.introMessage.suggestions.enabled`\n | `widgetSettings.introMessage.suggestions.questions`\n | `widgetSettings.contactForm.conditions.cannotAnswer`\n | `widgetSettings.contactForm.conditions.requestForPerson`\n | `widgetSettings.contactForm.fields.name`\n | `widgetSettings.contactForm.fields.email`\n | `widgetSettings.contactForm.fields.phone`\n | `widgetSettings.contactForm.fields.message`\n | `widgetSettings.contactForm.userConditions.beforeChat`\n | `widgetSettings.contactForm.userConditions.afterFirstMessage`\n | `widgetSettings.contactForm.userConditions.never`\n | `widgetSettings.autoOpen`\n | `widgetSettings.activeHours.always`\n | `widgetSettings.activeHours.schedule.monday.enabled`\n | `widgetSettings.activeHours.schedule.monday.frames`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.start`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.end`\n | `widgetSettings.activeHours.schedule.monday.frames.${number}.frameType`\n | `widgetSettings.activeHours.timeZone`\n | `widgetSettings.activeHours.mode`\n | `widgetSettings.offlineBehavior`,\n 8\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n widgetSettings: widgetSettings,\n });\n\n const reqOpts =\n ambassadorWixInnovationWidgetV1WidgetSettings.setWidgetSettings(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: { widgetSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['widgetSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixInnovationAssistantWidgetV1SettingsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n {\n srcPath: '/innovation/widget',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/wix-assistant-widget',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ai-site-chat_widget-settings';\n\n/** Retrieves the widget settings for the site. */\nexport function getWidgetSettings(payload: object): RequestOptionsFactory<any> {\n function __getWidgetSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.innovation.widget.v1.widget_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.innovation.assistant.widget.v1.Settings.GetWidgetSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInnovationAssistantWidgetV1SettingsUrl({\n protoPath: '/v1/settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getWidgetSettings;\n}\n\n/** Sets the widget settings for the site. */\nexport function setWidgetSettings(payload: object): RequestOptionsFactory<any> {\n function __setWidgetSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.innovation.widget.v1.widget_settings',\n method: 'POST' as any,\n methodFqn:\n 'wix.innovation.assistant.widget.v1.Settings.SetWidgetSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInnovationAssistantWidgetV1SettingsUrl({\n protoPath: '/v1/settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __setWidgetSettings;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,iDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAA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AAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,gBAAgB,OAAO;AAAA,QACnD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,gBAAgB;AAAA,IACnB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["getWidgetSettings","setWidgetSettings","import_timestamp","import_rest_modules","payload","FrameHandlerType","ChatHandlerMode","OfflineBehavior","ChatHandler","getWidgetSettings","sdkTransformError","setWidgetSettings"]}
|
package/build/cjs/meta.d.ts
CHANGED
|
@@ -242,10 +242,10 @@ declare enum ChatHandler {
|
|
|
242
242
|
/** AI assistant is handling chats. */
|
|
243
243
|
AI = "AI",
|
|
244
244
|
/** Site owner is handling chats. */
|
|
245
|
-
|
|
245
|
+
WIX_USER = "WIX_USER"
|
|
246
246
|
}
|
|
247
247
|
/** @enumType */
|
|
248
|
-
type ChatHandlerWithLiterals = ChatHandler | 'UNKNOWN_HANDLER' | 'AI' | '
|
|
248
|
+
type ChatHandlerWithLiterals = ChatHandler | 'UNKNOWN_HANDLER' | 'AI' | 'WIX_USER';
|
|
249
249
|
interface SetWidgetSettingsRequest {
|
|
250
250
|
/** Widget settings to update. */
|
|
251
251
|
widgetSettings: WidgetSettings;
|
package/build/cjs/meta.js
CHANGED
|
@@ -196,7 +196,7 @@ var OfflineBehavior = /* @__PURE__ */ ((OfflineBehavior2) => {
|
|
|
196
196
|
var ChatHandler = /* @__PURE__ */ ((ChatHandler2) => {
|
|
197
197
|
ChatHandler2["UNKNOWN_HANDLER"] = "UNKNOWN_HANDLER";
|
|
198
198
|
ChatHandler2["AI"] = "AI";
|
|
199
|
-
ChatHandler2["
|
|
199
|
+
ChatHandler2["WIX_USER"] = "WIX_USER";
|
|
200
200
|
return ChatHandler2;
|
|
201
201
|
})(ChatHandler || {});
|
|
202
202
|
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../meta.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.http.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.types.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.meta.ts"],"sourcesContent":["export * from './src/innovation-widget-v1-widget-settings-widget-settings.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixInnovationAssistantWidgetV1SettingsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n {\n srcPath: '/innovation/widget',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/wix-assistant-widget',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ai-site-chat_widget-settings';\n\n/** Retrieves the widget settings for the site. */\nexport function getWidgetSettings(payload: object): RequestOptionsFactory<any> {\n function __getWidgetSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.innovation.widget.v1.widget_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.innovation.assistant.widget.v1.Settings.GetWidgetSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInnovationAssistantWidgetV1SettingsUrl({\n protoPath: '/v1/settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getWidgetSettings;\n}\n\n/** Sets the widget settings for the site. */\nexport function setWidgetSettings(payload: object): RequestOptionsFactory<any> {\n function __setWidgetSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.innovation.widget.v1.widget_settings',\n method: 'POST' as any,\n methodFqn:\n 'wix.innovation.assistant.widget.v1.Settings.SetWidgetSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInnovationAssistantWidgetV1SettingsUrl({\n protoPath: '/v1/settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __setWidgetSettings;\n}\n","export interface WidgetSettings {\n /**\n * Widget settings ID.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /**\n * Whether the AI Site-Chat is enabled on the site.\n * @deprecated Whether the AI Site-Chat is enabled on the site.\n * @replacedBy active_hours\n * @targetRemovalDate 2025-12-01\n */\n enabled?: boolean;\n /** AI Site-Chat introduction. This is shown in the chat when a site visitor starts a new conversation. */\n introMessage?: IntroMessage;\n /** Settings for the contact form. */\n contactForm?: ContactForm;\n /**\n * Date and time the widget settings were created.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the widget settings were updated.\n * @readonly\n */\n updatedDate?: Date | null;\n /** Whether to open the AI Site-Chat automatically when the site loads. */\n autoOpen?: boolean;\n /** Times the AI Site-Chat is available on the site. */\n activeHours?: ActiveHours;\n /** Defines how the AI Site-Chat functions during the non-active hours. */\n offlineBehavior?: OfflineBehaviorWithLiterals;\n /** Whether the AI Site-Chat should send a summary of the site visitor's navigation on the site. */\n navigationSummary?: boolean | null;\n /**\n * Wix Media image ID used for the AI Site-Chat.\n * @maxLength 500\n */\n avatar?: string | null;\n /** Whether to display example questions from the AI Site-Chat. */\n generatedQuestions?: boolean | null;\n}\n\n/** Intro message */\nexport interface IntroMessage {\n /** Main message settings. */\n message?: SettingsMessage;\n /** Legal disclaimer message settings. */\n legalDisclaimer?: SettingsMessage;\n /** Offline message settings. */\n offlineDisclaimer?: SettingsMessage;\n /** Message shown as popup to engage the site visitor with the AI assistant. */\n engage?: SettingsMessage;\n /** Suggested questions shown to the site visitor to help them get started. */\n suggestions?: SuggestedQuestions;\n}\n\nexport interface SettingsMessage {\n /** Whether the message is enabled. */\n enabled?: boolean;\n /**\n * Message content.\n * @maxLength 1000\n */\n text?: string;\n}\n\nexport interface SuggestedQuestions {\n /** Whether suggesting questions is enabled. */\n enabled?: boolean;\n /**\n * Suggested questions shown to the site visitor to help them get started.\n * @minSize 1\n * @maxSize 5\n */\n questions?: SettingsMessage[];\n /** Introduction message for the suggested questions. */\n introduction?: SettingsMessage;\n}\n\nexport interface ContactForm {\n /** When the AI Site-Chat should send the contact form. */\n conditions?: Conditions;\n /** Contact form fields. */\n fields?: Fields;\n /** When to show contact form if site owner is available. */\n userConditions?: UserConditions;\n}\n\n/** Contact form conditions for AI Site-Chat */\nexport interface Conditions {\n /** Whether the AI Site-Chat should send the contact form if the AI is unable to answer the site visitor's question. */\n cannotAnswer?: boolean;\n /** Whether the AI Site-Chat should send the contact form if the site visitor requests to chat with a real person. */\n requestForPerson?: boolean;\n /**\n * Require site visitor to fill contact form before starting a conversation.\n * @deprecated Require site visitor to fill contact form before starting a conversation.\n * @targetRemovalDate 2025-12-01\n */\n beforeChat?: boolean | null;\n}\n\n/** Contact form fields */\nexport interface Fields {\n /** Whether to include a name field in the form. */\n name?: boolean;\n /** Whether to include an email field in the form. */\n email?: boolean;\n /** Whether to include a phone number field in the form. */\n phone?: boolean;\n /** Whether to include a message field in the form. */\n message?: boolean;\n}\n\n/** Contact form conditions for when site owner is available */\nexport interface UserConditions {\n /** Show site visitor contact form before starting a conversation. */\n beforeChat?: boolean;\n /** Show site visitor contact form after their first message. */\n afterFirstMessage?: boolean;\n /** Never show site visitor contact form. */\n never?: boolean;\n}\n\n/** Working hours settings */\nexport interface ActiveHours {\n /**\n * Whether the AI Assistant is always online. If `true`, `schedule` and `timeZone` are ignored.\n * @deprecated Whether the AI Assistant is always online. If `true`, `schedule` and `timeZone` are ignored.\n * @replacedBy availability\n * @targetRemovalDate 2025-12-01\n */\n always?: boolean;\n /** Times at which the AI Assistant is online. */\n schedule?: Schedule;\n /**\n * Timezone used for the schedule.\n * @maxLength 256\n */\n timeZone?: string;\n /** Hours when AI assistant or site owner are available. */\n mode?: ChatHandlerModeWithLiterals;\n}\n\n/** Schedule */\nexport interface Schedule {\n /** Monday schedule. */\n monday?: DaySchedule;\n /** Tuesday schedule. */\n tuesday?: DaySchedule;\n /** Wednesday schedule. */\n wednesday?: DaySchedule;\n /** Thursday schedule. */\n thursday?: DaySchedule;\n /** Friday schedule. */\n friday?: DaySchedule;\n /** Saturday schedule. */\n saturday?: DaySchedule;\n /** Sunday schedule. */\n sunday?: DaySchedule;\n}\n\n/** Day schedule */\nexport interface DaySchedule {\n /** Whether the day is enabled. */\n enabled?: boolean;\n /**\n * Array of times during which the AI Site-Chat or site owner are available.\n * @maxSize 24\n */\n frames?: WorkingHoursFrame[];\n}\n\n/** Working hours frame */\nexport interface WorkingHoursFrame {\n /** Start time of the active hours. */\n start?: number;\n /** End time of the active hours. */\n end?: number;\n /** Who is available during timeframe, AI chat or user chat */\n frameType?: FrameHandlerTypeWithLiterals;\n}\n\n/** Who is available during timeframe, AI chat or user chat */\nexport enum FrameHandlerType {\n /** Unknown frame type. */\n UNKNOWN_FRAME_TYPE = 'UNKNOWN_FRAME_TYPE',\n /** Frame type not selected. */\n NOT_SELECTED = 'NOT_SELECTED',\n /** AI Chat available in time frame. */\n AI_CHAT = 'AI_CHAT',\n /** Chat with human in time frame. */\n WIX_USER_CHAT = 'WIX_USER_CHAT',\n}\n\n/** @enumType */\nexport type FrameHandlerTypeWithLiterals =\n | FrameHandlerType\n | 'UNKNOWN_FRAME_TYPE'\n | 'NOT_SELECTED'\n | 'AI_CHAT'\n | 'WIX_USER_CHAT';\n\n/** Chat availability options */\nexport enum ChatHandlerMode {\n /** Unknown availability. */\n UNKNOWN_MODE = 'UNKNOWN_MODE',\n /** AI assistant is always available. */\n ALWAYS_WITH_AI = 'ALWAYS_WITH_AI',\n /** Chat with site owner is always available. */\n ALWAYS_WITH_WIX_USER = 'ALWAYS_WITH_WIX_USER',\n /** AI and site owner are available according to schedule. */\n SCHEDULED = 'SCHEDULED',\n /** AI assistant and site owner are always offline. */\n OFF = 'OFF',\n}\n\n/** @enumType */\nexport type ChatHandlerModeWithLiterals =\n | ChatHandlerMode\n | 'UNKNOWN_MODE'\n | 'ALWAYS_WITH_AI'\n | 'ALWAYS_WITH_WIX_USER'\n | 'SCHEDULED'\n | 'OFF';\n\nexport enum OfflineBehavior {\n /** Unknown offline behavior. */\n UNKNOWN_OFFLINE_BEHAVIOR = 'UNKNOWN_OFFLINE_BEHAVIOR',\n /** Allows the site visitor to write messages, but doesn't send a contact form. */\n CHAT_ONLY = 'CHAT_ONLY',\n /** Hides the AI Site-Chat from the site. */\n HIDE = 'HIDE',\n /** Doesn't allow the site visitor to write messages, but does send a contact form. */\n CONTACT_FORM_WITHOUT_CHAT = 'CONTACT_FORM_WITHOUT_CHAT',\n /** Allows the site visitor to write messages and sends a contact form. */\n CONTACT_FORM_WITH_CHAT = 'CONTACT_FORM_WITH_CHAT',\n}\n\n/** @enumType */\nexport type OfflineBehaviorWithLiterals =\n | OfflineBehavior\n | 'UNKNOWN_OFFLINE_BEHAVIOR'\n | 'CHAT_ONLY'\n | 'HIDE'\n | 'CONTACT_FORM_WITHOUT_CHAT'\n | 'CONTACT_FORM_WITH_CHAT';\n\nexport interface GetWidgetSettingsRequest {}\n\nexport interface GetWidgetSettingsResponse {\n /** Retrieved widget settings. */\n widgetSettings?: WidgetSettings;\n /**\n * Whether the assistant is currently online.\n * @readonly\n * @deprecated Whether the assistant is currently online.\n * @replacedBy active_handlers\n * @targetRemovalDate 2025-12-01\n */\n assistantOnline?: boolean;\n /**\n * Active chat handlers (e.g., AI assistant, site owner).\n * @readonly\n */\n activeHandlers?: ChatHandlerWithLiterals[];\n}\n\nexport enum ChatHandler {\n /** Unknown handler. */\n UNKNOWN_HANDLER = 'UNKNOWN_HANDLER',\n /** AI assistant is handling chats. */\n AI = 'AI',\n /** Site owner is handling chats. */\n SITE_OWNER = 'SITE_OWNER',\n}\n\n/** @enumType */\nexport type ChatHandlerWithLiterals =\n | ChatHandler\n | 'UNKNOWN_HANDLER'\n | 'AI'\n | 'SITE_OWNER';\n\nexport interface SetWidgetSettingsRequest {\n /** Widget settings to update. */\n widgetSettings: WidgetSettings;\n}\n\nexport interface SetWidgetSettingsResponse {\n /** Updated widget settings. */\n widgetSettings?: WidgetSettings;\n}\n","import * as ambassadorWixInnovationWidgetV1WidgetSettings from './innovation-widget-v1-widget-settings-widget-settings.http.js';\nimport * as ambassadorWixInnovationWidgetV1WidgetSettingsTypes from './innovation-widget-v1-widget-settings-widget-settings.types.js';\nimport * as ambassadorWixInnovationWidgetV1WidgetSettingsUniversalTypes from './innovation-widget-v1-widget-settings-widget-settings.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function getWidgetSettings(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixInnovationWidgetV1WidgetSettingsUniversalTypes.GetWidgetSettingsRequest,\n ambassadorWixInnovationWidgetV1WidgetSettingsTypes.GetWidgetSettingsRequest,\n ambassadorWixInnovationWidgetV1WidgetSettingsUniversalTypes.GetWidgetSettingsResponse,\n ambassadorWixInnovationWidgetV1WidgetSettingsTypes.GetWidgetSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixInnovationWidgetV1WidgetSettings.getWidgetSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/settings',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function setWidgetSettings(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixInnovationWidgetV1WidgetSettingsUniversalTypes.SetWidgetSettingsRequest,\n ambassadorWixInnovationWidgetV1WidgetSettingsTypes.SetWidgetSettingsRequest,\n ambassadorWixInnovationWidgetV1WidgetSettingsUniversalTypes.SetWidgetSettingsResponse,\n ambassadorWixInnovationWidgetV1WidgetSettingsTypes.SetWidgetSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixInnovationWidgetV1WidgetSettings.setWidgetSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/settings',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n WidgetSettings as WidgetSettingsOriginal,\n IntroMessage as IntroMessageOriginal,\n SettingsMessage as SettingsMessageOriginal,\n SuggestedQuestions as SuggestedQuestionsOriginal,\n ContactForm as ContactFormOriginal,\n Conditions as ConditionsOriginal,\n Fields as FieldsOriginal,\n UserConditions as UserConditionsOriginal,\n ActiveHours as ActiveHoursOriginal,\n Schedule as ScheduleOriginal,\n DaySchedule as DayScheduleOriginal,\n WorkingHoursFrame as WorkingHoursFrameOriginal,\n FrameHandlerType as FrameHandlerTypeOriginal,\n FrameHandlerTypeWithLiterals as FrameHandlerTypeWithLiteralsOriginal,\n ChatHandlerMode as ChatHandlerModeOriginal,\n ChatHandlerModeWithLiterals as ChatHandlerModeWithLiteralsOriginal,\n OfflineBehavior as OfflineBehaviorOriginal,\n OfflineBehaviorWithLiterals as OfflineBehaviorWithLiteralsOriginal,\n GetWidgetSettingsRequest as GetWidgetSettingsRequestOriginal,\n GetWidgetSettingsResponse as GetWidgetSettingsResponseOriginal,\n ChatHandler as ChatHandlerOriginal,\n ChatHandlerWithLiterals as ChatHandlerWithLiteralsOriginal,\n SetWidgetSettingsRequest as SetWidgetSettingsRequestOriginal,\n SetWidgetSettingsResponse as SetWidgetSettingsResponseOriginal,\n} from './innovation-widget-v1-widget-settings-widget-settings.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,E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A,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["getWidgetSettings","setWidgetSettings","import_timestamp","import_rest_modules","payload","FrameHandlerType","ChatHandlerMode","OfflineBehavior","ChatHandler","getWidgetSettings","setWidgetSettings"]}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.http.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.types.ts","../../src/innovation-widget-v1-widget-settings-widget-settings.meta.ts"],"sourcesContent":["export * from './src/innovation-widget-v1-widget-settings-widget-settings.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveWixInnovationAssistantWidgetV1SettingsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/wix-assistant-widget',\n destPath: '',\n },\n {\n srcPath: '/innovation/widget',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/wix-assistant-widget',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ai-site-chat_widget-settings';\n\n/** Retrieves the widget settings for the site. */\nexport function getWidgetSettings(payload: object): RequestOptionsFactory<any> {\n function __getWidgetSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.innovation.widget.v1.widget_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.innovation.assistant.widget.v1.Settings.GetWidgetSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInnovationAssistantWidgetV1SettingsUrl({\n protoPath: '/v1/settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getWidgetSettings;\n}\n\n/** Sets the widget settings for the site. */\nexport function setWidgetSettings(payload: object): RequestOptionsFactory<any> {\n function __setWidgetSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.innovation.widget.v1.widget_settings',\n method: 'POST' as any,\n methodFqn:\n 'wix.innovation.assistant.widget.v1.Settings.SetWidgetSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixInnovationAssistantWidgetV1SettingsUrl({\n protoPath: '/v1/settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'widgetSettings.createdDate' },\n { path: 'widgetSettings.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __setWidgetSettings;\n}\n","export interface WidgetSettings {\n /**\n * Widget settings ID.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /**\n * Whether the AI Site-Chat is enabled on the site.\n * @deprecated Whether the AI Site-Chat is enabled on the site.\n * @replacedBy active_hours\n * @targetRemovalDate 2025-12-01\n */\n enabled?: boolean;\n /** AI Site-Chat introduction. This is shown in the chat when a site visitor starts a new conversation. */\n introMessage?: IntroMessage;\n /** Settings for the contact form. */\n contactForm?: ContactForm;\n /**\n * Date and time the widget settings were created.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the widget settings were updated.\n * @readonly\n */\n updatedDate?: Date | null;\n /** Whether to open the AI Site-Chat automatically when the site loads. */\n autoOpen?: boolean;\n /** Times the AI Site-Chat is available on the site. */\n activeHours?: ActiveHours;\n /** Defines how the AI Site-Chat functions during the non-active hours. */\n offlineBehavior?: OfflineBehaviorWithLiterals;\n /** Whether the AI Site-Chat should send a summary of the site visitor's navigation on the site. */\n navigationSummary?: boolean | null;\n /**\n * Wix Media image ID used for the AI Site-Chat.\n * @maxLength 500\n */\n avatar?: string | null;\n /** Whether to display example questions from the AI Site-Chat. */\n generatedQuestions?: boolean | null;\n}\n\n/** Intro message */\nexport interface IntroMessage {\n /** Main message settings. */\n message?: SettingsMessage;\n /** Legal disclaimer message settings. */\n legalDisclaimer?: SettingsMessage;\n /** Offline message settings. */\n offlineDisclaimer?: SettingsMessage;\n /** Message shown as popup to engage the site visitor with the AI assistant. */\n engage?: SettingsMessage;\n /** Suggested questions shown to the site visitor to help them get started. */\n suggestions?: SuggestedQuestions;\n}\n\nexport interface SettingsMessage {\n /** Whether the message is enabled. */\n enabled?: boolean;\n /**\n * Message content.\n * @maxLength 1000\n */\n text?: string;\n}\n\nexport interface SuggestedQuestions {\n /** Whether suggesting questions is enabled. */\n enabled?: boolean;\n /**\n * Suggested questions shown to the site visitor to help them get started.\n * @minSize 1\n * @maxSize 5\n */\n questions?: SettingsMessage[];\n /** Introduction message for the suggested questions. */\n introduction?: SettingsMessage;\n}\n\nexport interface ContactForm {\n /** When the AI Site-Chat should send the contact form. */\n conditions?: Conditions;\n /** Contact form fields. */\n fields?: Fields;\n /** When to show contact form if site owner is available. */\n userConditions?: UserConditions;\n}\n\n/** Contact form conditions for AI Site-Chat */\nexport interface Conditions {\n /** Whether the AI Site-Chat should send the contact form if the AI is unable to answer the site visitor's question. */\n cannotAnswer?: boolean;\n /** Whether the AI Site-Chat should send the contact form if the site visitor requests to chat with a real person. */\n requestForPerson?: boolean;\n /**\n * Require site visitor to fill contact form before starting a conversation.\n * @deprecated Require site visitor to fill contact form before starting a conversation.\n * @targetRemovalDate 2025-12-01\n */\n beforeChat?: boolean | null;\n}\n\n/** Contact form fields */\nexport interface Fields {\n /** Whether to include a name field in the form. */\n name?: boolean;\n /** Whether to include an email field in the form. */\n email?: boolean;\n /** Whether to include a phone number field in the form. */\n phone?: boolean;\n /** Whether to include a message field in the form. */\n message?: boolean;\n}\n\n/** Contact form conditions for when site owner is available */\nexport interface UserConditions {\n /** Show site visitor contact form before starting a conversation. */\n beforeChat?: boolean;\n /** Show site visitor contact form after their first message. */\n afterFirstMessage?: boolean;\n /** Never show site visitor contact form. */\n never?: boolean;\n}\n\n/** Working hours settings */\nexport interface ActiveHours {\n /**\n * Whether the AI Assistant is always online. If `true`, `schedule` and `timeZone` are ignored.\n * @deprecated Whether the AI Assistant is always online. If `true`, `schedule` and `timeZone` are ignored.\n * @replacedBy availability\n * @targetRemovalDate 2025-12-01\n */\n always?: boolean;\n /** Times at which the AI Assistant is online. */\n schedule?: Schedule;\n /**\n * Timezone used for the schedule.\n * @maxLength 256\n */\n timeZone?: string;\n /** Hours when AI assistant or site owner are available. */\n mode?: ChatHandlerModeWithLiterals;\n}\n\n/** Schedule */\nexport interface Schedule {\n /** Monday schedule. */\n monday?: DaySchedule;\n /** Tuesday schedule. */\n tuesday?: DaySchedule;\n /** Wednesday schedule. */\n wednesday?: DaySchedule;\n /** Thursday schedule. */\n thursday?: DaySchedule;\n /** Friday schedule. */\n friday?: DaySchedule;\n /** Saturday schedule. */\n saturday?: DaySchedule;\n /** Sunday schedule. */\n sunday?: DaySchedule;\n}\n\n/** Day schedule */\nexport interface DaySchedule {\n /** Whether the day is enabled. */\n enabled?: boolean;\n /**\n * Array of times during which the AI Site-Chat or site owner are available.\n * @maxSize 24\n */\n frames?: WorkingHoursFrame[];\n}\n\n/** Working hours frame */\nexport interface WorkingHoursFrame {\n /** Start time of the active hours. */\n start?: number;\n /** End time of the active hours. */\n end?: number;\n /** Who is available during timeframe, AI chat or user chat */\n frameType?: FrameHandlerTypeWithLiterals;\n}\n\n/** Who is available during timeframe, AI chat or user chat */\nexport enum FrameHandlerType {\n /** Unknown frame type. */\n UNKNOWN_FRAME_TYPE = 'UNKNOWN_FRAME_TYPE',\n /** Frame type not selected. */\n NOT_SELECTED = 'NOT_SELECTED',\n /** AI Chat available in time frame. */\n AI_CHAT = 'AI_CHAT',\n /** Chat with human in time frame. */\n WIX_USER_CHAT = 'WIX_USER_CHAT',\n}\n\n/** @enumType */\nexport type FrameHandlerTypeWithLiterals =\n | FrameHandlerType\n | 'UNKNOWN_FRAME_TYPE'\n | 'NOT_SELECTED'\n | 'AI_CHAT'\n | 'WIX_USER_CHAT';\n\n/** Chat availability options */\nexport enum ChatHandlerMode {\n /** Unknown availability. */\n UNKNOWN_MODE = 'UNKNOWN_MODE',\n /** AI assistant is always available. */\n ALWAYS_WITH_AI = 'ALWAYS_WITH_AI',\n /** Chat with site owner is always available. */\n ALWAYS_WITH_WIX_USER = 'ALWAYS_WITH_WIX_USER',\n /** AI and site owner are available according to schedule. */\n SCHEDULED = 'SCHEDULED',\n /** AI assistant and site owner are always offline. */\n OFF = 'OFF',\n}\n\n/** @enumType */\nexport type ChatHandlerModeWithLiterals =\n | ChatHandlerMode\n | 'UNKNOWN_MODE'\n | 'ALWAYS_WITH_AI'\n | 'ALWAYS_WITH_WIX_USER'\n | 'SCHEDULED'\n | 'OFF';\n\nexport enum OfflineBehavior {\n /** Unknown offline behavior. */\n UNKNOWN_OFFLINE_BEHAVIOR = 'UNKNOWN_OFFLINE_BEHAVIOR',\n /** Allows the site visitor to write messages, but doesn't send a contact form. */\n CHAT_ONLY = 'CHAT_ONLY',\n /** Hides the AI Site-Chat from the site. */\n HIDE = 'HIDE',\n /** Doesn't allow the site visitor to write messages, but does send a contact form. */\n CONTACT_FORM_WITHOUT_CHAT = 'CONTACT_FORM_WITHOUT_CHAT',\n /** Allows the site visitor to write messages and sends a contact form. */\n CONTACT_FORM_WITH_CHAT = 'CONTACT_FORM_WITH_CHAT',\n}\n\n/** @enumType */\nexport type OfflineBehaviorWithLiterals =\n | OfflineBehavior\n | 'UNKNOWN_OFFLINE_BEHAVIOR'\n | 'CHAT_ONLY'\n | 'HIDE'\n | 'CONTACT_FORM_WITHOUT_CHAT'\n | 'CONTACT_FORM_WITH_CHAT';\n\nexport interface GetWidgetSettingsRequest {}\n\nexport interface GetWidgetSettingsResponse {\n /** Retrieved widget settings. */\n widgetSettings?: WidgetSettings;\n /**\n * Whether the assistant is currently online.\n * @readonly\n * @deprecated Whether the assistant is currently online.\n * @replacedBy active_handlers\n * @targetRemovalDate 2025-12-01\n */\n assistantOnline?: boolean;\n /**\n * Active chat handlers (e.g., AI assistant, site owner).\n * @readonly\n */\n activeHandlers?: ChatHandlerWithLiterals[];\n}\n\nexport enum ChatHandler {\n /** Unknown handler. */\n UNKNOWN_HANDLER = 'UNKNOWN_HANDLER',\n /** AI assistant is handling chats. */\n AI = 'AI',\n /** Site owner is handling chats. */\n WIX_USER = 'WIX_USER',\n}\n\n/** @enumType */\nexport type ChatHandlerWithLiterals =\n | ChatHandler\n | 'UNKNOWN_HANDLER'\n | 'AI'\n | 'WIX_USER';\n\nexport interface SetWidgetSettingsRequest {\n /** Widget settings to update. */\n widgetSettings: WidgetSettings;\n}\n\nexport interface SetWidgetSettingsResponse {\n /** Updated widget settings. */\n widgetSettings?: WidgetSettings;\n}\n","import * as ambassadorWixInnovationWidgetV1WidgetSettings from './innovation-widget-v1-widget-settings-widget-settings.http.js';\nimport * as ambassadorWixInnovationWidgetV1WidgetSettingsTypes from './innovation-widget-v1-widget-settings-widget-settings.types.js';\nimport * as ambassadorWixInnovationWidgetV1WidgetSettingsUniversalTypes from './innovation-widget-v1-widget-settings-widget-settings.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function getWidgetSettings(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixInnovationWidgetV1WidgetSettingsUniversalTypes.GetWidgetSettingsRequest,\n ambassadorWixInnovationWidgetV1WidgetSettingsTypes.GetWidgetSettingsRequest,\n ambassadorWixInnovationWidgetV1WidgetSettingsUniversalTypes.GetWidgetSettingsResponse,\n ambassadorWixInnovationWidgetV1WidgetSettingsTypes.GetWidgetSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixInnovationWidgetV1WidgetSettings.getWidgetSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/settings',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function setWidgetSettings(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixInnovationWidgetV1WidgetSettingsUniversalTypes.SetWidgetSettingsRequest,\n ambassadorWixInnovationWidgetV1WidgetSettingsTypes.SetWidgetSettingsRequest,\n ambassadorWixInnovationWidgetV1WidgetSettingsUniversalTypes.SetWidgetSettingsResponse,\n ambassadorWixInnovationWidgetV1WidgetSettingsTypes.SetWidgetSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixInnovationWidgetV1WidgetSettings.setWidgetSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/settings',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n WidgetSettings as WidgetSettingsOriginal,\n IntroMessage as IntroMessageOriginal,\n SettingsMessage as SettingsMessageOriginal,\n SuggestedQuestions as SuggestedQuestionsOriginal,\n ContactForm as ContactFormOriginal,\n Conditions as ConditionsOriginal,\n Fields as FieldsOriginal,\n UserConditions as UserConditionsOriginal,\n ActiveHours as ActiveHoursOriginal,\n Schedule as ScheduleOriginal,\n DaySchedule as DayScheduleOriginal,\n WorkingHoursFrame as WorkingHoursFrameOriginal,\n FrameHandlerType as FrameHandlerTypeOriginal,\n FrameHandlerTypeWithLiterals as FrameHandlerTypeWithLiteralsOriginal,\n ChatHandlerMode as ChatHandlerModeOriginal,\n ChatHandlerModeWithLiterals as ChatHandlerModeWithLiteralsOriginal,\n OfflineBehavior as OfflineBehaviorOriginal,\n OfflineBehaviorWithLiterals as OfflineBehaviorWithLiteralsOriginal,\n GetWidgetSettingsRequest as GetWidgetSettingsRequestOriginal,\n GetWidgetSettingsResponse as GetWidgetSettingsResponseOriginal,\n ChatHandler as ChatHandlerOriginal,\n ChatHandlerWithLiterals as ChatHandlerWithLiteralsOriginal,\n SetWidgetSettingsRequest as SetWidgetSettingsRequestOriginal,\n SetWidgetSettingsResponse as SetWidgetSettingsResponseOriginal,\n} from './innovation-widget-v1-widget-settings-widget-settings.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,iDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,C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CAAC;AAEjB,QAAM,oBAC0C,kBAAkB,OAAO;AAEzE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["getWidgetSettings","setWidgetSettings","import_timestamp","import_rest_modules","payload","FrameHandlerType","ChatHandlerMode","OfflineBehavior","ChatHandler","getWidgetSettings","setWidgetSettings"]}
|
package/build/es/index.mjs
CHANGED
|
@@ -172,7 +172,7 @@ var OfflineBehavior = /* @__PURE__ */ ((OfflineBehavior2) => {
|
|
|
172
172
|
var ChatHandler = /* @__PURE__ */ ((ChatHandler2) => {
|
|
173
173
|
ChatHandler2["UNKNOWN_HANDLER"] = "UNKNOWN_HANDLER";
|
|
174
174
|
ChatHandler2["AI"] = "AI";
|
|
175
|
-
ChatHandler2["
|
|
175
|
+
ChatHandler2["WIX_USER"] = "WIX_USER";
|
|
176
176
|
return ChatHandler2;
|
|
177
177
|
})(ChatHandler || {});
|
|
178
178
|
async function getWidgetSettings2() {
|