export interface WidgetSettings { /** * Widget settings ID. * @readonly */ _id?: string | null; /** Whether the AI Site-Chat is enabled on the site. */ enabled?: boolean; /** AI Site-Chat introduction. This is shown in the chat when a site visitor starts a new conversation. */ introMessage?: IntroMessage; /** Settings for the contact form. */ contactForm?: ContactForm; /** * Date and time the widget settings were created. * @readonly */ _createdDate?: Date | null; /** * Date and time the widget settings were updated. * @readonly */ _updatedDate?: Date | null; /** Whether to open the AI Site-Chat automatically when the site loads. */ autoOpen?: boolean; /** Times the AI assistant is available on the site. */ activeHours?: ActiveHours; /** Defines what the AI Site-Chat provides during the non-active hours. */ offlineBehavior?: OfflineBehavior; /** Extended fields. */ extendedFields?: ExtendedFields; } /** Intro message */ export interface IntroMessage { /** Main message settings. */ message?: SettingsMessage; /** Legal disclaimer message settings. */ legalDisclaimer?: SettingsMessage; /** Offline message settings. */ offlineDisclaimer?: SettingsMessage; } export interface SettingsMessage { /** Whether the message is enabled. */ enabled?: boolean; /** Message content. */ text?: string; } export interface ContactForm { /** When the AI Site-Chat should send the contact form. */ conditions?: Conditions; /** Contact form fields. */ fields?: Fields; } /** Contact form conditions */ export interface Conditions { /** Whether the AI Site-Chat should send the contact form if the AI is unable to answer the site visitor's question. */ cannotAnswer?: boolean; /** Whether the AI Site-Chat should send the contact form if the site visitor requests to chat with a real person. */ requestForPerson?: boolean; } /** Contact form fields */ export interface Fields { /** Whether to include a name field in the form. */ name?: boolean; /** Whether to include an email field in the form. */ email?: boolean; /** Whether to include a phone number field in the form. */ phone?: boolean; /** Whether to include a message field in the form. */ message?: boolean; } /** Working hours settings */ export interface ActiveHours { /** Whether the AI Assistant is always online. If `true`, `schedule` and `timeZone` are ignored. */ always?: boolean; /** Times at which the AI Assistant is online. */ schedule?: Schedule; /** Timezone used for the schedule. */ timeZone?: string; } /** Schedule */ export interface Schedule { /** Monday schedule. */ monday?: DaySchedule; /** Tuesday schedule. */ tuesday?: DaySchedule; /** Wednesday schedule. */ wednesday?: DaySchedule; /** Thursday schedule. */ thursday?: DaySchedule; /** Friday schedule. */ friday?: DaySchedule; /** Saturday schedule. */ saturday?: DaySchedule; /** Sunday schedule. */ sunday?: DaySchedule; } /** Day schedule */ export interface DaySchedule { /** Whether the day is enabled. */ enabled?: boolean; /** Array of times during which the AI Assistant is active. */ frames?: WorkingHoursFrame[]; } /** Working hours frame */ export interface WorkingHoursFrame { /** Start time of the active hours. */ start?: number; /** End time of the active hours. */ end?: number; } export declare enum OfflineBehavior { /** Unknown offline behavior. */ UNKNOWN_OFFLINE_BEHAVIOR = "UNKNOWN_OFFLINE_BEHAVIOR", /** Allows the site visitor to write messages, but doesn't send a contact form. */ CHAT_ONLY = "CHAT_ONLY", /** Hides the AI Site-Chat from the site. */ HIDE = "HIDE", /** Doesn't allow the site visitor to write messages, but does send a contact form. */ CONTACT_FORM_WITHOUT_CHAT = "CONTACT_FORM_WITHOUT_CHAT", /** Allows the site visitor to write messages and sends a contact form. */ CONTACT_FORM_WITH_CHAT = "CONTACT_FORM_WITH_CHAT" } export interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } export interface GetWidgetSettingsRequest { } export interface GetWidgetSettingsResponse { /** Retrieved widget settings. */ widgetSettings?: WidgetSettings; /** * Whether the assistant is currently online. * @readonly */ assistantOnline?: boolean; } export interface SetWidgetSettingsRequest { /** Widget settings to update. */ widgetSettings: WidgetSettings; } export interface SetWidgetSettingsResponse { /** Updated widget settings. */ widgetSettings?: WidgetSettings; } interface SettingsMessageNonNullableFields { enabled: boolean; text: string; } interface IntroMessageNonNullableFields { message?: SettingsMessageNonNullableFields; legalDisclaimer?: SettingsMessageNonNullableFields; offlineDisclaimer?: SettingsMessageNonNullableFields; } interface ConditionsNonNullableFields { cannotAnswer: boolean; requestForPerson: boolean; } interface FieldsNonNullableFields { name: boolean; email: boolean; phone: boolean; message: boolean; } interface ContactFormNonNullableFields { conditions?: ConditionsNonNullableFields; fields?: FieldsNonNullableFields; } interface WorkingHoursFrameNonNullableFields { start: number; end: number; } interface DayScheduleNonNullableFields { enabled: boolean; frames: WorkingHoursFrameNonNullableFields[]; } interface ScheduleNonNullableFields { monday?: DayScheduleNonNullableFields; tuesday?: DayScheduleNonNullableFields; wednesday?: DayScheduleNonNullableFields; thursday?: DayScheduleNonNullableFields; friday?: DayScheduleNonNullableFields; saturday?: DayScheduleNonNullableFields; sunday?: DayScheduleNonNullableFields; } interface ActiveHoursNonNullableFields { always: boolean; schedule?: ScheduleNonNullableFields; timeZone: string; } interface WidgetSettingsNonNullableFields { enabled: boolean; introMessage?: IntroMessageNonNullableFields; contactForm?: ContactFormNonNullableFields; autoOpen: boolean; activeHours?: ActiveHoursNonNullableFields; offlineBehavior: OfflineBehavior; } export interface GetWidgetSettingsResponseNonNullableFields { widgetSettings?: WidgetSettingsNonNullableFields; assistantOnline: boolean; } export interface SetWidgetSettingsResponseNonNullableFields { widgetSettings?: WidgetSettingsNonNullableFields; } /** * Retrieves the widget settings for the site. * @public * @documentationMaturity preview * @permissionId INNOVATION_LAB.CHAT_WIDGET * @permissionScope Manage Bookings Services and Settings * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION * @permissionScope Manage Portfolio * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @applicableIdentity APP * @applicableIdentity VISITOR * @fqn wix.innovation.assistant.widget.v1.Settings.GetWidgetSettings */ export declare function getWidgetSettings(): Promise; /** * Sets the widget settings for the site. * @param widgetSettings - Widget settings to update. * @public * @documentationMaturity preview * @requiredField widgetSettings * @requiredField widgetSettings.activeHours * @requiredField widgetSettings.contactForm * @requiredField widgetSettings.contactForm.conditions * @requiredField widgetSettings.contactForm.fields * @requiredField widgetSettings.introMessage * @permissionId INNOVATION_LAB.CHAT_WIDGET_SETTINGS_SET * @fqn wix.innovation.assistant.widget.v1.Settings.SetWidgetSettings */ export declare function setWidgetSettings(widgetSettings: WidgetSettings): Promise; export {};