@wix/auto_sdk_ai-site-chat_widget-settings 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +24 -1
- package/build/cjs/index.js +253 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +206 -1
- package/build/cjs/index.typings.js +233 -15
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +196 -1
- package/build/cjs/meta.js +219 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +24 -0
- package/build/es/index.mjs +230 -0
- package/build/es/index.mjs.map +1 -0
- package/build/{internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.universal.d.ts → es/index.typings.d.mts} +56 -110
- package/build/es/index.typings.mjs +210 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/{src/innovation-widget-v1-widget-settings-widget-settings.types.d.ts → meta.d.mts} +64 -91
- package/build/es/meta.mjs +193 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +24 -1
- package/build/internal/cjs/index.js +253 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +206 -1
- package/build/internal/cjs/index.typings.js +233 -15
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +196 -1
- package/build/internal/cjs/meta.js +219 -15
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +24 -0
- package/build/internal/es/index.mjs +230 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/{src/innovation-widget-v1-widget-settings-widget-settings.universal.d.ts → index.typings.d.mts} +56 -110
- package/build/internal/es/index.typings.mjs +210 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/{cjs/src/innovation-widget-v1-widget-settings-widget-settings.types.d.ts → internal/es/meta.d.mts} +64 -91
- package/build/internal/es/meta.mjs +193 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +12 -10
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.context.d.ts +0 -6
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.context.js +0 -10
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.context.js.map +0 -1
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.http.d.ts +0 -5
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.http.js +0 -136
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.http.js.map +0 -1
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.meta.d.ts +0 -14
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.meta.js +0 -66
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.meta.js.map +0 -1
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.public.d.ts +0 -21
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.public.js +0 -20
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.public.js.map +0 -1
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.types.js +0 -17
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.types.js.map +0 -1
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.universal.d.ts +0 -260
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.universal.js +0 -124
- package/build/cjs/src/innovation-widget-v1-widget-settings-widget-settings.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.context.d.ts +0 -6
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.context.js +0 -6
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.context.js.map +0 -1
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.http.d.ts +0 -5
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.http.js +0 -131
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.http.js.map +0 -1
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.meta.d.ts +0 -14
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.meta.js +0 -38
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.meta.js.map +0 -1
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.public.d.ts +0 -21
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.public.js +0 -14
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.public.js.map +0 -1
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.types.js +0 -14
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.types.js.map +0 -1
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.universal.d.ts +0 -260
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.universal.js +0 -96
- package/build/es/src/innovation-widget-v1-widget-settings-widget-settings.universal.js.map +0 -1
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.context.d.ts +0 -6
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.context.js +0 -10
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.context.js.map +0 -1
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.http.d.ts +0 -5
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.http.js +0 -136
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.http.js.map +0 -1
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.meta.d.ts +0 -14
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.meta.js +0 -66
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.meta.js.map +0 -1
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.public.d.ts +0 -21
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.public.js +0 -20
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.public.js.map +0 -1
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.types.d.ts +0 -223
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.types.js +0 -17
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.types.js.map +0 -1
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.universal.js +0 -124
- package/build/internal/cjs/src/innovation-widget-v1-widget-settings-widget-settings.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.context.d.ts +0 -6
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.context.js +0 -6
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.context.js.map +0 -1
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.http.d.ts +0 -5
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.http.js +0 -131
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.http.js.map +0 -1
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.meta.d.ts +0 -14
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.meta.js +0 -38
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.meta.js.map +0 -1
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.public.d.ts +0 -21
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.public.js +0 -14
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.public.js.map +0 -1
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.types.d.ts +0 -223
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.types.js +0 -14
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.types.js.map +0 -1
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.universal.js +0 -96
- package/build/internal/es/src/innovation-widget-v1-widget-settings-widget-settings.universal.js.map +0 -1
package/build/es/{src/innovation-widget-v1-widget-settings-widget-settings.types.d.ts → meta.d.mts}
RENAMED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { GetWidgetSettingsRequest as GetWidgetSettingsRequest$1, GetWidgetSettingsResponse as GetWidgetSettingsResponse$1, SetWidgetSettingsRequest as SetWidgetSettingsRequest$1, SetWidgetSettingsResponse as SetWidgetSettingsResponse$1 } from './index.typings.mjs';
|
|
2
|
+
import '@wix/sdk-types';
|
|
3
|
+
|
|
4
|
+
interface WidgetSettings {
|
|
2
5
|
/**
|
|
3
6
|
* Widget settings ID.
|
|
4
7
|
* @format GUID
|
|
@@ -25,21 +28,32 @@ export interface WidgetSettings {
|
|
|
25
28
|
autoOpen?: boolean;
|
|
26
29
|
/** Times the AI assistant is available on the site. */
|
|
27
30
|
activeHours?: ActiveHours;
|
|
28
|
-
/** Defines
|
|
29
|
-
offlineBehavior?:
|
|
30
|
-
/**
|
|
31
|
-
|
|
31
|
+
/** Defines how the AI Site-Chat functions during the non-active hours. */
|
|
32
|
+
offlineBehavior?: OfflineBehaviorWithLiterals;
|
|
33
|
+
/** Whether the AI Site-Chat should send a summary of the site visitor's navigation on the site. */
|
|
34
|
+
navigationSummary?: boolean | null;
|
|
35
|
+
/**
|
|
36
|
+
* Wix Media image ID used for the AI assistant.
|
|
37
|
+
* @maxLength 500
|
|
38
|
+
*/
|
|
39
|
+
avatar?: string | null;
|
|
40
|
+
/** Whether to display example questions from the AI assistant. */
|
|
41
|
+
generatedQuestions?: boolean | null;
|
|
32
42
|
}
|
|
33
43
|
/** Intro message */
|
|
34
|
-
|
|
44
|
+
interface IntroMessage {
|
|
35
45
|
/** Main message settings. */
|
|
36
46
|
message?: SettingsMessage;
|
|
37
47
|
/** Legal disclaimer message settings. */
|
|
38
48
|
legalDisclaimer?: SettingsMessage;
|
|
39
49
|
/** Offline message settings. */
|
|
40
50
|
offlineDisclaimer?: SettingsMessage;
|
|
51
|
+
/** Message shown as popup to engage the site visitor with the AI assistant. */
|
|
52
|
+
engage?: SettingsMessage;
|
|
53
|
+
/** Suggested questions shown to the site visitor to help them get started. */
|
|
54
|
+
suggestions?: SuggestedQuestions;
|
|
41
55
|
}
|
|
42
|
-
|
|
56
|
+
interface SettingsMessage {
|
|
43
57
|
/** Whether the message is enabled. */
|
|
44
58
|
enabled?: boolean;
|
|
45
59
|
/**
|
|
@@ -48,21 +62,35 @@ export interface SettingsMessage {
|
|
|
48
62
|
*/
|
|
49
63
|
text?: string;
|
|
50
64
|
}
|
|
51
|
-
|
|
65
|
+
interface SuggestedQuestions {
|
|
66
|
+
/** Whether suggesting questions is enabled. */
|
|
67
|
+
enabled?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Suggested questions shown to the site visitor to help them get started.
|
|
70
|
+
* @minSize 1
|
|
71
|
+
* @maxSize 5
|
|
72
|
+
*/
|
|
73
|
+
questions?: SettingsMessage[];
|
|
74
|
+
/** Introduction message for the suggested questions. */
|
|
75
|
+
introduction?: SettingsMessage;
|
|
76
|
+
}
|
|
77
|
+
interface ContactForm {
|
|
52
78
|
/** When the AI Site-Chat should send the contact form. */
|
|
53
79
|
conditions?: Conditions;
|
|
54
80
|
/** Contact form fields. */
|
|
55
81
|
fields?: Fields;
|
|
56
82
|
}
|
|
57
83
|
/** Contact form conditions */
|
|
58
|
-
|
|
84
|
+
interface Conditions {
|
|
59
85
|
/** Whether the AI Site-Chat should send the contact form if the AI is unable to answer the site visitor's question. */
|
|
60
86
|
cannotAnswer?: boolean;
|
|
61
87
|
/** Whether the AI Site-Chat should send the contact form if the site visitor requests to chat with a real person. */
|
|
62
88
|
requestForPerson?: boolean;
|
|
89
|
+
/** Require site visitor to fill contact form before starting a conversation. */
|
|
90
|
+
beforeChat?: boolean | null;
|
|
63
91
|
}
|
|
64
92
|
/** Contact form fields */
|
|
65
|
-
|
|
93
|
+
interface Fields {
|
|
66
94
|
/** Whether to include a name field in the form. */
|
|
67
95
|
name?: boolean;
|
|
68
96
|
/** Whether to include an email field in the form. */
|
|
@@ -73,7 +101,7 @@ export interface Fields {
|
|
|
73
101
|
message?: boolean;
|
|
74
102
|
}
|
|
75
103
|
/** Working hours settings */
|
|
76
|
-
|
|
104
|
+
interface ActiveHours {
|
|
77
105
|
/** Whether the AI Assistant is always online. If `true`, `schedule` and `timeZone` are ignored. */
|
|
78
106
|
always?: boolean;
|
|
79
107
|
/** Times at which the AI Assistant is online. */
|
|
@@ -85,7 +113,7 @@ export interface ActiveHours {
|
|
|
85
113
|
timeZone?: string;
|
|
86
114
|
}
|
|
87
115
|
/** Schedule */
|
|
88
|
-
|
|
116
|
+
interface Schedule {
|
|
89
117
|
/** Monday schedule. */
|
|
90
118
|
monday?: DaySchedule;
|
|
91
119
|
/** Tuesday schedule. */
|
|
@@ -102,7 +130,7 @@ export interface Schedule {
|
|
|
102
130
|
sunday?: DaySchedule;
|
|
103
131
|
}
|
|
104
132
|
/** Day schedule */
|
|
105
|
-
|
|
133
|
+
interface DaySchedule {
|
|
106
134
|
/** Whether the day is enabled. */
|
|
107
135
|
enabled?: boolean;
|
|
108
136
|
/**
|
|
@@ -112,13 +140,13 @@ export interface DaySchedule {
|
|
|
112
140
|
frames?: WorkingHoursFrame[];
|
|
113
141
|
}
|
|
114
142
|
/** Working hours frame */
|
|
115
|
-
|
|
143
|
+
interface WorkingHoursFrame {
|
|
116
144
|
/** Start time of the active hours. */
|
|
117
145
|
start?: number;
|
|
118
146
|
/** End time of the active hours. */
|
|
119
147
|
end?: number;
|
|
120
148
|
}
|
|
121
|
-
|
|
149
|
+
declare enum OfflineBehavior {
|
|
122
150
|
/** Unknown offline behavior. */
|
|
123
151
|
UNKNOWN_OFFLINE_BEHAVIOR = "UNKNOWN_OFFLINE_BEHAVIOR",
|
|
124
152
|
/** Allows the site visitor to write messages, but doesn't send a contact form. */
|
|
@@ -130,20 +158,11 @@ export declare enum OfflineBehavior {
|
|
|
130
158
|
/** Allows the site visitor to write messages and sends a contact form. */
|
|
131
159
|
CONTACT_FORM_WITH_CHAT = "CONTACT_FORM_WITH_CHAT"
|
|
132
160
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
137
|
-
*
|
|
138
|
-
* You can only access fields for which you have the appropriate permissions.
|
|
139
|
-
*
|
|
140
|
-
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
141
|
-
*/
|
|
142
|
-
namespaces?: Record<string, Record<string, any>>;
|
|
143
|
-
}
|
|
144
|
-
export interface GetWidgetSettingsRequest {
|
|
161
|
+
/** @enumType */
|
|
162
|
+
type OfflineBehaviorWithLiterals = OfflineBehavior | 'UNKNOWN_OFFLINE_BEHAVIOR' | 'CHAT_ONLY' | 'HIDE' | 'CONTACT_FORM_WITHOUT_CHAT' | 'CONTACT_FORM_WITH_CHAT';
|
|
163
|
+
interface GetWidgetSettingsRequest {
|
|
145
164
|
}
|
|
146
|
-
|
|
165
|
+
interface GetWidgetSettingsResponse {
|
|
147
166
|
/** Retrieved widget settings. */
|
|
148
167
|
widgetSettings?: WidgetSettings;
|
|
149
168
|
/**
|
|
@@ -152,72 +171,26 @@ export interface GetWidgetSettingsResponse {
|
|
|
152
171
|
*/
|
|
153
172
|
assistantOnline?: boolean;
|
|
154
173
|
}
|
|
155
|
-
|
|
174
|
+
interface SetWidgetSettingsRequest {
|
|
156
175
|
/** Widget settings to update. */
|
|
157
176
|
widgetSettings: WidgetSettings;
|
|
158
177
|
}
|
|
159
|
-
|
|
178
|
+
interface SetWidgetSettingsResponse {
|
|
160
179
|
/** Updated widget settings. */
|
|
161
180
|
widgetSettings?: WidgetSettings;
|
|
162
181
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
email: boolean;
|
|
179
|
-
phone: boolean;
|
|
180
|
-
message: boolean;
|
|
181
|
-
}
|
|
182
|
-
interface ContactFormNonNullableFields {
|
|
183
|
-
conditions?: ConditionsNonNullableFields;
|
|
184
|
-
fields?: FieldsNonNullableFields;
|
|
185
|
-
}
|
|
186
|
-
interface WorkingHoursFrameNonNullableFields {
|
|
187
|
-
start: number;
|
|
188
|
-
end: number;
|
|
189
|
-
}
|
|
190
|
-
interface DayScheduleNonNullableFields {
|
|
191
|
-
enabled: boolean;
|
|
192
|
-
frames: WorkingHoursFrameNonNullableFields[];
|
|
193
|
-
}
|
|
194
|
-
interface ScheduleNonNullableFields {
|
|
195
|
-
monday?: DayScheduleNonNullableFields;
|
|
196
|
-
tuesday?: DayScheduleNonNullableFields;
|
|
197
|
-
wednesday?: DayScheduleNonNullableFields;
|
|
198
|
-
thursday?: DayScheduleNonNullableFields;
|
|
199
|
-
friday?: DayScheduleNonNullableFields;
|
|
200
|
-
saturday?: DayScheduleNonNullableFields;
|
|
201
|
-
sunday?: DayScheduleNonNullableFields;
|
|
202
|
-
}
|
|
203
|
-
interface ActiveHoursNonNullableFields {
|
|
204
|
-
always: boolean;
|
|
205
|
-
schedule?: ScheduleNonNullableFields;
|
|
206
|
-
timeZone: string;
|
|
207
|
-
}
|
|
208
|
-
interface WidgetSettingsNonNullableFields {
|
|
209
|
-
enabled: boolean;
|
|
210
|
-
introMessage?: IntroMessageNonNullableFields;
|
|
211
|
-
contactForm?: ContactFormNonNullableFields;
|
|
212
|
-
autoOpen: boolean;
|
|
213
|
-
activeHours?: ActiveHoursNonNullableFields;
|
|
214
|
-
offlineBehavior: OfflineBehavior;
|
|
215
|
-
}
|
|
216
|
-
export interface GetWidgetSettingsResponseNonNullableFields {
|
|
217
|
-
widgetSettings?: WidgetSettingsNonNullableFields;
|
|
218
|
-
assistantOnline: boolean;
|
|
219
|
-
}
|
|
220
|
-
export interface SetWidgetSettingsResponseNonNullableFields {
|
|
221
|
-
widgetSettings?: WidgetSettingsNonNullableFields;
|
|
222
|
-
}
|
|
223
|
-
export {};
|
|
182
|
+
|
|
183
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
184
|
+
getUrl: (context: any) => string;
|
|
185
|
+
httpMethod: K;
|
|
186
|
+
path: string;
|
|
187
|
+
pathParams: M;
|
|
188
|
+
__requestType: T;
|
|
189
|
+
__originalRequestType: S;
|
|
190
|
+
__responseType: Q;
|
|
191
|
+
__originalResponseType: R;
|
|
192
|
+
};
|
|
193
|
+
declare function getWidgetSettings(): __PublicMethodMetaInfo<'GET', {}, GetWidgetSettingsRequest$1, GetWidgetSettingsRequest, GetWidgetSettingsResponse$1, GetWidgetSettingsResponse>;
|
|
194
|
+
declare function setWidgetSettings(): __PublicMethodMetaInfo<'POST', {}, SetWidgetSettingsRequest$1, SetWidgetSettingsRequest, SetWidgetSettingsResponse$1, SetWidgetSettingsResponse>;
|
|
195
|
+
|
|
196
|
+
export { type ActiveHours as ActiveHoursOriginal, type Conditions as ConditionsOriginal, type ContactForm as ContactFormOriginal, type DaySchedule as DayScheduleOriginal, type Fields as FieldsOriginal, type GetWidgetSettingsRequest as GetWidgetSettingsRequestOriginal, type GetWidgetSettingsResponse as GetWidgetSettingsResponseOriginal, type IntroMessage as IntroMessageOriginal, OfflineBehavior as OfflineBehaviorOriginal, type OfflineBehaviorWithLiterals as OfflineBehaviorWithLiteralsOriginal, type Schedule as ScheduleOriginal, type SetWidgetSettingsRequest as SetWidgetSettingsRequestOriginal, type SetWidgetSettingsResponse as SetWidgetSettingsResponseOriginal, type SettingsMessage as SettingsMessageOriginal, type SuggestedQuestions as SuggestedQuestionsOriginal, type WidgetSettings as WidgetSettingsOriginal, type WorkingHoursFrame as WorkingHoursFrameOriginal, type __PublicMethodMetaInfo, getWidgetSettings, setWidgetSettings };
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// src/innovation-widget-v1-widget-settings-widget-settings.http.ts
|
|
2
|
+
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
3
|
+
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
4
|
+
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
5
|
+
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
6
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
7
|
+
function resolveWixInnovationAssistantWidgetV1SettingsUrl(opts) {
|
|
8
|
+
const domainToMappings = {
|
|
9
|
+
"manage._base_domain_": [
|
|
10
|
+
{
|
|
11
|
+
srcPath: "/wix-assistant-widget",
|
|
12
|
+
destPath: ""
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
_: [
|
|
16
|
+
{
|
|
17
|
+
srcPath: "/wix-assistant-widget",
|
|
18
|
+
destPath: ""
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"editor._base_domain_": [
|
|
22
|
+
{
|
|
23
|
+
srcPath: "/wix-assistant-widget",
|
|
24
|
+
destPath: ""
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"blocks._base_domain_": [
|
|
28
|
+
{
|
|
29
|
+
srcPath: "/wix-assistant-widget",
|
|
30
|
+
destPath: ""
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"create.editorx": [
|
|
34
|
+
{
|
|
35
|
+
srcPath: "/wix-assistant-widget",
|
|
36
|
+
destPath: ""
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"*.dev.wix-code.com": [
|
|
40
|
+
{
|
|
41
|
+
srcPath: "/wix-assistant-widget",
|
|
42
|
+
destPath: ""
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"editor.wixapps.net": [
|
|
46
|
+
{
|
|
47
|
+
srcPath: "/wix-assistant-widget",
|
|
48
|
+
destPath: ""
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"www.wixapis.com": [
|
|
52
|
+
{
|
|
53
|
+
srcPath: "/wix-assistant-widget",
|
|
54
|
+
destPath: ""
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
srcPath: "/innovation/widget",
|
|
58
|
+
destPath: ""
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"www._base_domain_": [
|
|
62
|
+
{
|
|
63
|
+
srcPath: "/_api/wix-assistant-widget",
|
|
64
|
+
destPath: ""
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
};
|
|
68
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
69
|
+
}
|
|
70
|
+
var PACKAGE_NAME = "@wix/auto_sdk_ai-site-chat_widget-settings";
|
|
71
|
+
function getWidgetSettings(payload) {
|
|
72
|
+
function __getWidgetSettings({ host }) {
|
|
73
|
+
const metadata = {
|
|
74
|
+
entityFqdn: "wix.innovation.widget.v1.widget_settings",
|
|
75
|
+
method: "GET",
|
|
76
|
+
methodFqn: "wix.innovation.assistant.widget.v1.Settings.GetWidgetSettings",
|
|
77
|
+
packageName: PACKAGE_NAME,
|
|
78
|
+
migrationOptions: {
|
|
79
|
+
optInTransformResponse: true
|
|
80
|
+
},
|
|
81
|
+
url: resolveWixInnovationAssistantWidgetV1SettingsUrl({
|
|
82
|
+
protoPath: "/v1/settings",
|
|
83
|
+
data: payload,
|
|
84
|
+
host
|
|
85
|
+
}),
|
|
86
|
+
params: toURLSearchParams(payload),
|
|
87
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
88
|
+
{
|
|
89
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
90
|
+
paths: [
|
|
91
|
+
{ path: "widgetSettings.createdDate" },
|
|
92
|
+
{ path: "widgetSettings.updatedDate" }
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
])
|
|
96
|
+
};
|
|
97
|
+
return metadata;
|
|
98
|
+
}
|
|
99
|
+
return __getWidgetSettings;
|
|
100
|
+
}
|
|
101
|
+
function setWidgetSettings(payload) {
|
|
102
|
+
function __setWidgetSettings({ host }) {
|
|
103
|
+
const serializedData = transformPaths(payload, [
|
|
104
|
+
{
|
|
105
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
106
|
+
paths: [
|
|
107
|
+
{ path: "widgetSettings.createdDate" },
|
|
108
|
+
{ path: "widgetSettings.updatedDate" }
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
]);
|
|
112
|
+
const metadata = {
|
|
113
|
+
entityFqdn: "wix.innovation.widget.v1.widget_settings",
|
|
114
|
+
method: "POST",
|
|
115
|
+
methodFqn: "wix.innovation.assistant.widget.v1.Settings.SetWidgetSettings",
|
|
116
|
+
packageName: PACKAGE_NAME,
|
|
117
|
+
migrationOptions: {
|
|
118
|
+
optInTransformResponse: true
|
|
119
|
+
},
|
|
120
|
+
url: resolveWixInnovationAssistantWidgetV1SettingsUrl({
|
|
121
|
+
protoPath: "/v1/settings",
|
|
122
|
+
data: serializedData,
|
|
123
|
+
host
|
|
124
|
+
}),
|
|
125
|
+
data: serializedData,
|
|
126
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
127
|
+
{
|
|
128
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
129
|
+
paths: [
|
|
130
|
+
{ path: "widgetSettings.createdDate" },
|
|
131
|
+
{ path: "widgetSettings.updatedDate" }
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
])
|
|
135
|
+
};
|
|
136
|
+
return metadata;
|
|
137
|
+
}
|
|
138
|
+
return __setWidgetSettings;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// src/innovation-widget-v1-widget-settings-widget-settings.types.ts
|
|
142
|
+
var OfflineBehavior = /* @__PURE__ */ ((OfflineBehavior2) => {
|
|
143
|
+
OfflineBehavior2["UNKNOWN_OFFLINE_BEHAVIOR"] = "UNKNOWN_OFFLINE_BEHAVIOR";
|
|
144
|
+
OfflineBehavior2["CHAT_ONLY"] = "CHAT_ONLY";
|
|
145
|
+
OfflineBehavior2["HIDE"] = "HIDE";
|
|
146
|
+
OfflineBehavior2["CONTACT_FORM_WITHOUT_CHAT"] = "CONTACT_FORM_WITHOUT_CHAT";
|
|
147
|
+
OfflineBehavior2["CONTACT_FORM_WITH_CHAT"] = "CONTACT_FORM_WITH_CHAT";
|
|
148
|
+
return OfflineBehavior2;
|
|
149
|
+
})(OfflineBehavior || {});
|
|
150
|
+
|
|
151
|
+
// src/innovation-widget-v1-widget-settings-widget-settings.meta.ts
|
|
152
|
+
function getWidgetSettings2() {
|
|
153
|
+
const payload = {};
|
|
154
|
+
const getRequestOptions = getWidgetSettings(payload);
|
|
155
|
+
const getUrl = (context) => {
|
|
156
|
+
const { url } = getRequestOptions(context);
|
|
157
|
+
return url;
|
|
158
|
+
};
|
|
159
|
+
return {
|
|
160
|
+
getUrl,
|
|
161
|
+
httpMethod: "GET",
|
|
162
|
+
path: "/v1/settings",
|
|
163
|
+
pathParams: {},
|
|
164
|
+
__requestType: null,
|
|
165
|
+
__originalRequestType: null,
|
|
166
|
+
__responseType: null,
|
|
167
|
+
__originalResponseType: null
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
function setWidgetSettings2() {
|
|
171
|
+
const payload = {};
|
|
172
|
+
const getRequestOptions = setWidgetSettings(payload);
|
|
173
|
+
const getUrl = (context) => {
|
|
174
|
+
const { url } = getRequestOptions(context);
|
|
175
|
+
return url;
|
|
176
|
+
};
|
|
177
|
+
return {
|
|
178
|
+
getUrl,
|
|
179
|
+
httpMethod: "POST",
|
|
180
|
+
path: "/v1/settings",
|
|
181
|
+
pathParams: {},
|
|
182
|
+
__requestType: null,
|
|
183
|
+
__originalRequestType: null,
|
|
184
|
+
__responseType: null,
|
|
185
|
+
__originalResponseType: null
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
export {
|
|
189
|
+
OfflineBehavior as OfflineBehaviorOriginal,
|
|
190
|
+
getWidgetSettings2 as getWidgetSettings,
|
|
191
|
+
setWidgetSettings2 as setWidgetSettings
|
|
192
|
+
};
|
|
193
|
+
//# sourceMappingURL=meta.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../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":["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 /** Whether the AI Site-Chat is enabled on the site. */\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 assistant 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 assistant.\n * @maxLength 500\n */\n avatar?: string | null;\n /** Whether to display example questions from the AI assistant. */\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}\n\n/** Contact form conditions */\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 /** Require site visitor to fill contact form before starting a conversation. */\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/** Working hours settings */\nexport interface ActiveHours {\n /** Whether the AI Assistant is always online. If `true`, `schedule` and `timeZone` are ignored. */\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}\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 Assistant is active.\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}\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 */\n assistantOnline?: boolean;\n}\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 ActiveHours as ActiveHoursOriginal,\n Schedule as ScheduleOriginal,\n DaySchedule as DayScheduleOriginal,\n WorkingHoursFrame as WorkingHoursFrameOriginal,\n OfflineBehavior as OfflineBehaviorOriginal,\n OfflineBehaviorWithLiterals as OfflineBehaviorWithLiteralsOriginal,\n GetWidgetSettingsRequest as GetWidgetSettingsRequestOriginal,\n GetWidgetSettingsResponse as GetWidgetSettingsResponseOriginal,\n SetWidgetSettingsRequest as SetWidgetSettingsRequestOriginal,\n SetWidgetSettingsResponse as SetWidgetSettingsResponseOriginal,\n} from './innovation-widget-v1-widget-settings-widget-settings.types.js';\n"],"mappings":"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","names":["payload","OfflineBehavior","getWidgetSettings","setWidgetSettings"]}
|
|
@@ -1 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
+
import { GetWidgetSettingsResponse, WidgetSettings, SetWidgetSettingsResponse } from './index.typings.js';
|
|
3
|
+
export { ActiveHours, Conditions, ContactForm, DaySchedule, Fields, GetWidgetSettingsRequest, IntroMessage, OfflineBehavior, OfflineBehaviorWithLiterals, Schedule, SetWidgetSettingsRequest, SettingsMessage, SuggestedQuestions, WorkingHoursFrame } from './index.typings.js';
|
|
4
|
+
|
|
5
|
+
declare function getWidgetSettings$1(httpClient: HttpClient): GetWidgetSettingsSignature;
|
|
6
|
+
interface GetWidgetSettingsSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves the widget settings for the site.
|
|
9
|
+
*/
|
|
10
|
+
(): Promise<NonNullablePaths<GetWidgetSettingsResponse, `widgetSettings.enabled` | `widgetSettings.introMessage.message.enabled` | `widgetSettings.introMessage.message.text` | `widgetSettings.introMessage.suggestions.enabled` | `widgetSettings.introMessage.suggestions.questions` | `widgetSettings.contactForm.conditions.cannotAnswer` | `widgetSettings.contactForm.conditions.requestForPerson` | `widgetSettings.contactForm.fields.name` | `widgetSettings.contactForm.fields.email` | `widgetSettings.contactForm.fields.phone` | `widgetSettings.contactForm.fields.message` | `widgetSettings.autoOpen` | `widgetSettings.activeHours.always` | `widgetSettings.activeHours.schedule.monday.enabled` | `widgetSettings.activeHours.schedule.monday.frames` | `widgetSettings.activeHours.schedule.monday.frames.${number}.start` | `widgetSettings.activeHours.schedule.monday.frames.${number}.end` | `widgetSettings.activeHours.timeZone` | `widgetSettings.offlineBehavior` | `assistantOnline`, 8>>;
|
|
11
|
+
}
|
|
12
|
+
declare function setWidgetSettings$1(httpClient: HttpClient): SetWidgetSettingsSignature;
|
|
13
|
+
interface SetWidgetSettingsSignature {
|
|
14
|
+
/**
|
|
15
|
+
* Sets the widget settings for the site.
|
|
16
|
+
* @param - Widget settings to update.
|
|
17
|
+
*/
|
|
18
|
+
(widgetSettings: NonNullablePaths<WidgetSettings, `activeHours` | `contactForm` | `contactForm.conditions` | `contactForm.fields` | `introMessage` | `offlineBehavior`, 3>): Promise<NonNullablePaths<SetWidgetSettingsResponse, `widgetSettings.enabled` | `widgetSettings.introMessage.message.enabled` | `widgetSettings.introMessage.message.text` | `widgetSettings.introMessage.suggestions.enabled` | `widgetSettings.introMessage.suggestions.questions` | `widgetSettings.contactForm.conditions.cannotAnswer` | `widgetSettings.contactForm.conditions.requestForPerson` | `widgetSettings.contactForm.fields.name` | `widgetSettings.contactForm.fields.email` | `widgetSettings.contactForm.fields.phone` | `widgetSettings.contactForm.fields.message` | `widgetSettings.autoOpen` | `widgetSettings.activeHours.always` | `widgetSettings.activeHours.schedule.monday.enabled` | `widgetSettings.activeHours.schedule.monday.frames` | `widgetSettings.activeHours.schedule.monday.frames.${number}.start` | `widgetSettings.activeHours.schedule.monday.frames.${number}.end` | `widgetSettings.activeHours.timeZone` | `widgetSettings.offlineBehavior`, 8>>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare const getWidgetSettings: MaybeContext<BuildRESTFunction<typeof getWidgetSettings$1> & typeof getWidgetSettings$1>;
|
|
22
|
+
declare const setWidgetSettings: MaybeContext<BuildRESTFunction<typeof setWidgetSettings$1> & typeof setWidgetSettings$1>;
|
|
23
|
+
|
|
24
|
+
export { GetWidgetSettingsResponse, SetWidgetSettingsResponse, WidgetSettings, getWidgetSettings, setWidgetSettings };
|