@helpai/elements 0.62.1 → 0.63.1
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/configurator.d.ts +59 -93
- package/configurator.mjs +2 -1540
- package/elements-web-component.esm.js +28 -28
- package/elements-web-component.esm.js.map +3 -3
- package/elements.cjs.js +28 -28
- package/elements.cjs.js.map +3 -3
- package/elements.esm.js +28 -28
- package/elements.esm.js.map +3 -3
- package/elements.js +28 -28
- package/elements.js.map +3 -3
- package/index.d.ts +2966 -1097
- package/index.mjs +13 -9741
- package/package.json +1 -1
- package/schema.d.ts +2612 -731
- package/schema.json +16 -4
- package/schema.mjs +2 -964
- package/style.css +1 -1
- package/web-component.d.ts +3 -1
- package/web-component.mjs +13 -9577
package/schema.d.ts
CHANGED
|
@@ -1,570 +1,535 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/schema/primitives.d.ts
|
|
3
|
+
/** A single image asset (logo, hero, icon). */
|
|
4
|
+
declare const assetSchema: z.ZodObject<{
|
|
5
|
+
url: z.ZodString;
|
|
6
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
type Asset = z.infer<typeof assetSchema>;
|
|
9
|
+
/** A navigation link / link card. `href` is optional so it can also be used as a heading. */
|
|
10
|
+
declare const linkSchema: z.ZodObject<{
|
|
11
|
+
id: z.ZodOptional<z.ZodString>;
|
|
12
|
+
label: z.ZodString;
|
|
13
|
+
href: z.ZodOptional<z.ZodString>;
|
|
14
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
15
|
+
description: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$loose>;
|
|
17
|
+
type Link = z.infer<typeof linkSchema>;
|
|
18
|
+
/**
|
|
19
|
+
* CSS length string — `"640px"`, `"80vh"`, `"calc(100vh - 64px)"`, etc.
|
|
20
|
+
* We don't validate the syntax (CSS grammar is huge); just enforce a
|
|
21
|
+
* reasonable string size so the dashboard form catches obvious typos.
|
|
22
|
+
*/
|
|
23
|
+
declare const cssLengthSchema: z.ZodString;
|
|
24
|
+
/** CSS color — hex, rgb(), hsl(), oklch(), named colors, var(). */
|
|
25
|
+
declare const cssColorSchema: z.ZodString;
|
|
26
|
+
/** BCP-47 locale tag (e.g. `"en"`, `"fr-CA"`, `"zh-Hant-HK"`). Lenient — actual negotiation happens at runtime. */
|
|
27
|
+
declare const localeSchema: z.ZodString;
|
|
4
28
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
29
|
+
* UUID v7 (RFC 9562) — the one id format across the whole system. Every
|
|
30
|
+
* identifier (visitorId / conversationId / message / file / content row) is a
|
|
31
|
+
* UUIDv7 string; there are no Mongo ObjectIds or prefix-truncated ids on
|
|
32
|
+
* the wire. `z.uuidv7()` serializes to JSON Schema as
|
|
33
|
+
* `{ type: "string", format: "uuid", pattern: <v7> }`, so generated specs
|
|
34
|
+
* carry `"format": "uuid"` automatically.
|
|
8
35
|
*/
|
|
9
|
-
|
|
36
|
+
declare const uuid7Schema: z.ZodUUID;
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/schema/widget/presentation.d.ts
|
|
10
39
|
declare const modeSchema: z.ZodEnum<{
|
|
40
|
+
floating: "floating";
|
|
41
|
+
inline: "inline";
|
|
42
|
+
standalone: "standalone";
|
|
43
|
+
page: "page";
|
|
44
|
+
modal: "modal";
|
|
45
|
+
drawer: "drawer";
|
|
46
|
+
}>;
|
|
47
|
+
type Mode = z.infer<typeof modeSchema>;
|
|
48
|
+
declare const positionSchema: z.ZodEnum<{
|
|
49
|
+
"bottom-right": "bottom-right";
|
|
50
|
+
"bottom-left": "bottom-left";
|
|
51
|
+
"top-right": "top-right";
|
|
52
|
+
"top-left": "top-left";
|
|
53
|
+
}>;
|
|
54
|
+
type Position = z.infer<typeof positionSchema>;
|
|
55
|
+
declare const presentationSchema: z.ZodObject<{
|
|
56
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
11
57
|
floating: "floating";
|
|
12
58
|
inline: "inline";
|
|
13
59
|
standalone: "standalone";
|
|
14
60
|
page: "page";
|
|
15
61
|
modal: "modal";
|
|
16
62
|
drawer: "drawer";
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare const positionSchema: z.ZodEnum<{
|
|
63
|
+
}>>;
|
|
64
|
+
position: z.ZodDefault<z.ZodEnum<{
|
|
20
65
|
"bottom-right": "bottom-right";
|
|
21
66
|
"bottom-left": "bottom-left";
|
|
22
67
|
"top-right": "top-right";
|
|
23
68
|
"top-left": "top-left";
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
modal: "modal";
|
|
33
|
-
drawer: "drawer";
|
|
34
|
-
}>>;
|
|
35
|
-
position: z.ZodDefault<z.ZodEnum<{
|
|
36
|
-
"bottom-right": "bottom-right";
|
|
37
|
-
"bottom-left": "bottom-left";
|
|
38
|
-
"top-right": "top-right";
|
|
39
|
-
"top-left": "top-left";
|
|
40
|
-
}>>;
|
|
41
|
-
iframe: z.ZodDefault<z.ZodBoolean>;
|
|
42
|
-
size: z.ZodOptional<z.ZodObject<{
|
|
43
|
-
width: z.ZodOptional<z.ZodString>;
|
|
44
|
-
height: z.ZodOptional<z.ZodString>;
|
|
45
|
-
expanded: z.ZodOptional<z.ZodObject<{
|
|
46
|
-
width: z.ZodOptional<z.ZodString>;
|
|
47
|
-
height: z.ZodOptional<z.ZodString>;
|
|
48
|
-
}, z.core.$loose>>;
|
|
49
|
-
resize: z.ZodOptional<z.ZodObject<{
|
|
50
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
51
|
-
minWidth: z.ZodOptional<z.ZodString>;
|
|
52
|
-
maxWidth: z.ZodOptional<z.ZodString>;
|
|
53
|
-
minHeight: z.ZodOptional<z.ZodString>;
|
|
54
|
-
maxHeight: z.ZodOptional<z.ZodString>;
|
|
55
|
-
}, z.core.$loose>>;
|
|
56
|
-
inset: z.ZodOptional<z.ZodString>;
|
|
57
|
-
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
58
|
-
fullscreen: "fullscreen";
|
|
59
|
-
expanded: "expanded";
|
|
60
|
-
auto: "auto";
|
|
61
|
-
normal: "normal";
|
|
62
|
-
}>>;
|
|
63
|
-
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
69
|
+
}>>;
|
|
70
|
+
iframe: z.ZodDefault<z.ZodBoolean>;
|
|
71
|
+
size: z.ZodOptional<z.ZodObject<{
|
|
72
|
+
width: z.ZodOptional<z.ZodString>;
|
|
73
|
+
height: z.ZodOptional<z.ZodString>;
|
|
74
|
+
expanded: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
width: z.ZodOptional<z.ZodString>;
|
|
76
|
+
height: z.ZodOptional<z.ZodString>;
|
|
64
77
|
}, z.core.$loose>>;
|
|
78
|
+
resize: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
80
|
+
minWidth: z.ZodOptional<z.ZodString>;
|
|
81
|
+
maxWidth: z.ZodOptional<z.ZodString>;
|
|
82
|
+
minHeight: z.ZodOptional<z.ZodString>;
|
|
83
|
+
maxHeight: z.ZodOptional<z.ZodString>;
|
|
84
|
+
}, z.core.$loose>>;
|
|
85
|
+
inset: z.ZodOptional<z.ZodString>;
|
|
86
|
+
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
87
|
+
expanded: "expanded";
|
|
88
|
+
normal: "normal";
|
|
89
|
+
fullscreen: "fullscreen";
|
|
90
|
+
auto: "auto";
|
|
91
|
+
}>>;
|
|
92
|
+
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
93
|
+
}, z.core.$loose>>;
|
|
65
94
|
}, z.core.$loose>;
|
|
66
95
|
type Presentation = z.infer<typeof presentationSchema>;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
* Behaviour section schema — non-visual runtime choices that affect
|
|
70
|
-
* how the widget feels but not what it looks like.
|
|
71
|
-
*/
|
|
72
|
-
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/schema/widget/behavior.d.ts
|
|
73
98
|
declare const responseModeSchema: z.ZodEnum<{
|
|
74
|
-
|
|
75
|
-
|
|
99
|
+
streaming: "streaming";
|
|
100
|
+
buffered: "buffered";
|
|
76
101
|
}>;
|
|
77
102
|
type ResponseMode = z.infer<typeof responseModeSchema>;
|
|
78
103
|
declare const behaviorSchema: z.ZodObject<{
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
104
|
+
startMinimized: z.ZodDefault<z.ZodBoolean>;
|
|
105
|
+
responseMode: z.ZodDefault<z.ZodEnum<{
|
|
106
|
+
streaming: "streaming";
|
|
107
|
+
buffered: "buffered";
|
|
108
|
+
}>>;
|
|
109
|
+
showReasoning: z.ZodDefault<z.ZodBoolean>;
|
|
110
|
+
showToolCalls: z.ZodDefault<z.ZodBoolean>;
|
|
111
|
+
showSources: z.ZodDefault<z.ZodBoolean>;
|
|
112
|
+
disableMessageFeedback: z.ZodDefault<z.ZodBoolean>;
|
|
113
|
+
autoSendSuggestions: z.ZodDefault<z.ZodBoolean>;
|
|
89
114
|
}, z.core.$loose>;
|
|
90
115
|
type Behavior = z.infer<typeof behaviorSchema>;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
* Theme section schemas — what the dashboard renders under "Theme".
|
|
94
|
-
*
|
|
95
|
-
* Two shapes flow through the same `theme` field:
|
|
96
|
-
*
|
|
97
|
-
* - A preference enum (`"auto" | "light" | "dark"`) — picks light/dark
|
|
98
|
-
* mode without changing brand tokens.
|
|
99
|
-
* - A token-overrides object (`{ accent, accentText, radius, fontFamily }`)
|
|
100
|
-
* — re-skins the widget at the CSS-custom-property layer.
|
|
101
|
-
*
|
|
102
|
-
* The runtime resolver splits the union back into `themeMode` +
|
|
103
|
-
* `themeOverrides` on `ResolvedOptions`. Schema keeps them unified so
|
|
104
|
-
* the dashboard form can render "preset or custom" as one control.
|
|
105
|
-
*/
|
|
106
|
-
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region src/schema/widget/theme.d.ts
|
|
107
118
|
declare const themePreferenceSchema: z.ZodEnum<{
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
119
|
+
auto: "auto";
|
|
120
|
+
light: "light";
|
|
121
|
+
dark: "dark";
|
|
111
122
|
}>;
|
|
112
123
|
type ThemePreference = z.infer<typeof themePreferenceSchema>;
|
|
113
124
|
declare const themeOverridesSchema: z.ZodObject<{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
125
|
+
accent: z.ZodOptional<z.ZodString>;
|
|
126
|
+
accentText: z.ZodOptional<z.ZodString>;
|
|
127
|
+
radius: z.ZodOptional<z.ZodString>;
|
|
128
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
129
|
+
contentMaxWidth: z.ZodOptional<z.ZodString>;
|
|
119
130
|
}, z.core.$loose>;
|
|
120
131
|
type ThemeOverrides = z.infer<typeof themeOverridesSchema>;
|
|
121
132
|
/** `theme` accepts either a preference (auto/light/dark) or an overrides object. */
|
|
122
133
|
declare const themeFieldSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
134
|
+
auto: "auto";
|
|
135
|
+
light: "light";
|
|
136
|
+
dark: "dark";
|
|
126
137
|
}>, z.ZodObject<{
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
138
|
+
accent: z.ZodOptional<z.ZodString>;
|
|
139
|
+
accentText: z.ZodOptional<z.ZodString>;
|
|
140
|
+
radius: z.ZodOptional<z.ZodString>;
|
|
141
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
142
|
+
contentMaxWidth: z.ZodOptional<z.ZodString>;
|
|
132
143
|
}, z.core.$loose>]>;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
* Launcher section schemas — FAB appearance + the pre-engagement
|
|
136
|
-
* callout bubble that sits next to it. Only meaningful in `floating`
|
|
137
|
-
* mode (the FAB doesn't render in inline / standalone / page / modal /
|
|
138
|
-
* drawer; the callout is gated by the same).
|
|
139
|
-
*/
|
|
140
|
-
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/schema/widget/launcher.d.ts
|
|
141
146
|
declare const launcherVariantSchema: z.ZodEnum<{
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
147
|
+
circle: "circle";
|
|
148
|
+
pill: "pill";
|
|
149
|
+
bar: "bar";
|
|
150
|
+
minimal: "minimal";
|
|
146
151
|
}>;
|
|
147
152
|
type LauncherVariant = z.infer<typeof launcherVariantSchema>;
|
|
148
153
|
declare const launcherSizeSchema: z.ZodEnum<{
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
154
|
+
sm: "sm";
|
|
155
|
+
md: "md";
|
|
156
|
+
lg: "lg";
|
|
152
157
|
}>;
|
|
153
158
|
type LauncherSize = z.infer<typeof launcherSizeSchema>;
|
|
154
159
|
declare const calloutShapeSchema: z.ZodEnum<{
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
160
|
+
pill: "pill";
|
|
161
|
+
bubble: "bubble";
|
|
162
|
+
callout: "callout";
|
|
158
163
|
}>;
|
|
159
164
|
type CalloutShape = z.infer<typeof calloutShapeSchema>;
|
|
160
165
|
declare const calloutPositionSchema: z.ZodEnum<{
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
166
|
+
auto: "auto";
|
|
167
|
+
horizontal: "horizontal";
|
|
168
|
+
vertical: "vertical";
|
|
164
169
|
}>;
|
|
165
170
|
type CalloutPosition = z.infer<typeof calloutPositionSchema>;
|
|
166
171
|
declare const launcherCalloutSchema: z.ZodObject<{
|
|
172
|
+
text: z.ZodDefault<z.ZodString>;
|
|
173
|
+
shape: z.ZodDefault<z.ZodEnum<{
|
|
174
|
+
pill: "pill";
|
|
175
|
+
bubble: "bubble";
|
|
176
|
+
callout: "callout";
|
|
177
|
+
}>>;
|
|
178
|
+
position: z.ZodDefault<z.ZodEnum<{
|
|
179
|
+
auto: "auto";
|
|
180
|
+
horizontal: "horizontal";
|
|
181
|
+
vertical: "vertical";
|
|
182
|
+
}>>;
|
|
183
|
+
delayMs: z.ZodDefault<z.ZodNumber>;
|
|
184
|
+
autoDismissMs: z.ZodDefault<z.ZodNumber>;
|
|
185
|
+
animated: z.ZodDefault<z.ZodBoolean>;
|
|
186
|
+
persistent: z.ZodDefault<z.ZodBoolean>;
|
|
187
|
+
}, z.core.$loose>;
|
|
188
|
+
type LauncherCallout = z.infer<typeof launcherCalloutSchema>;
|
|
189
|
+
declare const launcherOptionsSchema: z.ZodObject<{
|
|
190
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
191
|
+
circle: "circle";
|
|
192
|
+
pill: "pill";
|
|
193
|
+
bar: "bar";
|
|
194
|
+
minimal: "minimal";
|
|
195
|
+
}>>;
|
|
196
|
+
size: z.ZodDefault<z.ZodEnum<{
|
|
197
|
+
sm: "sm";
|
|
198
|
+
md: "md";
|
|
199
|
+
lg: "lg";
|
|
200
|
+
}>>;
|
|
201
|
+
label: z.ZodOptional<z.ZodString>;
|
|
202
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
203
|
+
hidden: z.ZodDefault<z.ZodBoolean>;
|
|
204
|
+
callout: z.ZodOptional<z.ZodObject<{
|
|
167
205
|
text: z.ZodDefault<z.ZodString>;
|
|
168
206
|
shape: z.ZodDefault<z.ZodEnum<{
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
207
|
+
pill: "pill";
|
|
208
|
+
bubble: "bubble";
|
|
209
|
+
callout: "callout";
|
|
172
210
|
}>>;
|
|
173
211
|
position: z.ZodDefault<z.ZodEnum<{
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
212
|
+
auto: "auto";
|
|
213
|
+
horizontal: "horizontal";
|
|
214
|
+
vertical: "vertical";
|
|
177
215
|
}>>;
|
|
178
216
|
delayMs: z.ZodDefault<z.ZodNumber>;
|
|
179
217
|
autoDismissMs: z.ZodDefault<z.ZodNumber>;
|
|
180
218
|
animated: z.ZodDefault<z.ZodBoolean>;
|
|
181
219
|
persistent: z.ZodDefault<z.ZodBoolean>;
|
|
182
|
-
}, z.core.$loose
|
|
183
|
-
type LauncherCallout = z.infer<typeof launcherCalloutSchema>;
|
|
184
|
-
declare const launcherOptionsSchema: z.ZodObject<{
|
|
185
|
-
variant: z.ZodDefault<z.ZodEnum<{
|
|
186
|
-
circle: "circle";
|
|
187
|
-
pill: "pill";
|
|
188
|
-
bar: "bar";
|
|
189
|
-
minimal: "minimal";
|
|
190
|
-
}>>;
|
|
191
|
-
size: z.ZodDefault<z.ZodEnum<{
|
|
192
|
-
sm: "sm";
|
|
193
|
-
md: "md";
|
|
194
|
-
lg: "lg";
|
|
195
|
-
}>>;
|
|
196
|
-
label: z.ZodOptional<z.ZodString>;
|
|
197
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
198
|
-
hidden: z.ZodDefault<z.ZodBoolean>;
|
|
199
|
-
callout: z.ZodOptional<z.ZodObject<{
|
|
200
|
-
text: z.ZodDefault<z.ZodString>;
|
|
201
|
-
shape: z.ZodDefault<z.ZodEnum<{
|
|
202
|
-
pill: "pill";
|
|
203
|
-
bubble: "bubble";
|
|
204
|
-
callout: "callout";
|
|
205
|
-
}>>;
|
|
206
|
-
position: z.ZodDefault<z.ZodEnum<{
|
|
207
|
-
auto: "auto";
|
|
208
|
-
horizontal: "horizontal";
|
|
209
|
-
vertical: "vertical";
|
|
210
|
-
}>>;
|
|
211
|
-
delayMs: z.ZodDefault<z.ZodNumber>;
|
|
212
|
-
autoDismissMs: z.ZodDefault<z.ZodNumber>;
|
|
213
|
-
animated: z.ZodDefault<z.ZodBoolean>;
|
|
214
|
-
persistent: z.ZodDefault<z.ZodBoolean>;
|
|
215
|
-
}, z.core.$loose>>;
|
|
220
|
+
}, z.core.$loose>>;
|
|
216
221
|
}, z.core.$loose>;
|
|
217
222
|
type LauncherOptions = z.infer<typeof launcherOptionsSchema>;
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
* Size section schemas — panel dimensions, plus the drawer-specific
|
|
221
|
-
* edge `inset`, the optional `expanded` tier, and the drag-resize
|
|
222
|
-
* grip.
|
|
223
|
-
*
|
|
224
|
-
* Per-mode size semantics (set by `:host([data-mode="..."])` in
|
|
225
|
-
* `src/styles/panel.css`):
|
|
226
|
-
*
|
|
227
|
-
* • **floating** — compact popover. Defaults: `380×600` from
|
|
228
|
-
* `tokens.css`. Three tiers (`normal` / `expanded` / `fullscreen`)
|
|
229
|
-
* selected by the header expand button.
|
|
230
|
-
* • **modal** — centered dialog with a backdrop. Defaults:
|
|
231
|
-
* `min(960px, 92vw) × min(720px, 88vh)`. Hard-capped to
|
|
232
|
-
* `calc(100vw - 48px) × calc(100vh - 48px)` so the backdrop
|
|
233
|
-
* gutter is always visible.
|
|
234
|
-
* • **drawer** — side-docked flyout (does NOT dim the page).
|
|
235
|
-
* Defaults: `min(440px, calc(100vw - 32px)) × 100vh`, clamped to
|
|
236
|
-
* the inset budget so the actual height is
|
|
237
|
-
* `calc(100vh - inset-y * 2)`. Default inset is `3vh` vertical /
|
|
238
|
-
* `12px` horizontal — tight flyout, ~94vh tall.
|
|
239
|
-
* • **inline / standalone / page** — fill the parent container;
|
|
240
|
-
* ignore `width` / `height` (the host element's CSS controls
|
|
241
|
-
* them) but `expanded` and `initialSize` still apply where
|
|
242
|
-
* multiple tiers exist.
|
|
243
|
-
*/
|
|
244
|
-
|
|
223
|
+
//#endregion
|
|
224
|
+
//#region src/schema/widget/size.d.ts
|
|
245
225
|
declare const initialSizeSchema: z.ZodEnum<{
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
226
|
+
expanded: "expanded";
|
|
227
|
+
normal: "normal";
|
|
228
|
+
fullscreen: "fullscreen";
|
|
229
|
+
auto: "auto";
|
|
250
230
|
}>;
|
|
251
231
|
declare const resizeOptionsSchema: z.ZodObject<{
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
232
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
233
|
+
minWidth: z.ZodOptional<z.ZodString>;
|
|
234
|
+
maxWidth: z.ZodOptional<z.ZodString>;
|
|
235
|
+
minHeight: z.ZodOptional<z.ZodString>;
|
|
236
|
+
maxHeight: z.ZodOptional<z.ZodString>;
|
|
257
237
|
}, z.core.$loose>;
|
|
258
238
|
type ResizeOptions = z.infer<typeof resizeOptionsSchema>;
|
|
259
239
|
declare const sizeOptionsSchema: z.ZodObject<{
|
|
240
|
+
width: z.ZodOptional<z.ZodString>;
|
|
241
|
+
height: z.ZodOptional<z.ZodString>;
|
|
242
|
+
expanded: z.ZodOptional<z.ZodObject<{
|
|
260
243
|
width: z.ZodOptional<z.ZodString>;
|
|
261
244
|
height: z.ZodOptional<z.ZodString>;
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
normal: "normal";
|
|
279
|
-
}>>;
|
|
280
|
-
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
245
|
+
}, z.core.$loose>>;
|
|
246
|
+
resize: z.ZodOptional<z.ZodObject<{
|
|
247
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
248
|
+
minWidth: z.ZodOptional<z.ZodString>;
|
|
249
|
+
maxWidth: z.ZodOptional<z.ZodString>;
|
|
250
|
+
minHeight: z.ZodOptional<z.ZodString>;
|
|
251
|
+
maxHeight: z.ZodOptional<z.ZodString>;
|
|
252
|
+
}, z.core.$loose>>;
|
|
253
|
+
inset: z.ZodOptional<z.ZodString>;
|
|
254
|
+
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
255
|
+
expanded: "expanded";
|
|
256
|
+
normal: "normal";
|
|
257
|
+
fullscreen: "fullscreen";
|
|
258
|
+
auto: "auto";
|
|
259
|
+
}>>;
|
|
260
|
+
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
281
261
|
}, z.core.$loose>;
|
|
282
262
|
type SizeOptions = z.infer<typeof sizeOptionsSchema>;
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
* Capability flags — what the user can do inside the chat panel.
|
|
286
|
-
*
|
|
287
|
-
* Files, voice input mode, and the backend tools the assistant may
|
|
288
|
-
* invoke. Tools is the only nested shape that accepts either a bare
|
|
289
|
-
* string (`"tool:send-money"`) or a rich `{ code, config }` ref.
|
|
290
|
-
*/
|
|
291
|
-
|
|
263
|
+
//#endregion
|
|
264
|
+
//#region src/schema/widget/features.d.ts
|
|
292
265
|
declare const voiceModeSchema: z.ZodEnum<{
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
266
|
+
local: "local";
|
|
267
|
+
server: "server";
|
|
268
|
+
disabled: "disabled";
|
|
296
269
|
}>;
|
|
297
270
|
type VoiceMode = z.infer<typeof voiceModeSchema>;
|
|
298
271
|
declare const toolRefSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
299
|
-
|
|
300
|
-
|
|
272
|
+
code: z.ZodString;
|
|
273
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
301
274
|
}, z.core.$loose>]>;
|
|
302
275
|
declare const featureFlagsSchema: z.ZodObject<{
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
276
|
+
disableFileUpload: z.ZodDefault<z.ZodBoolean>;
|
|
277
|
+
voice: z.ZodDefault<z.ZodEnum<{
|
|
278
|
+
local: "local";
|
|
279
|
+
server: "server";
|
|
280
|
+
disabled: "disabled";
|
|
281
|
+
}>>;
|
|
282
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
283
|
+
code: z.ZodString;
|
|
284
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
285
|
+
}, z.core.$loose>]>>>;
|
|
286
|
+
disableHumanInLoop: z.ZodDefault<z.ZodBoolean>;
|
|
287
|
+
enableOperatorRequest: z.ZodDefault<z.ZodBoolean>;
|
|
314
288
|
}, z.core.$loose>;
|
|
315
289
|
type FeatureFlags = z.infer<typeof featureFlagsSchema>;
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
* Header section schema — which actions the panel header exposes.
|
|
319
|
-
*
|
|
320
|
-
* `history` + `close` render as dedicated buttons; everything else lives in the
|
|
321
|
-
* ⋯ overflow menu (fixed layout, so list order is irrelevant — it's a set).
|
|
322
|
-
* Per-mode defaults live in `core/config/defaults.ts`
|
|
323
|
-
* (`DEFAULT_ACTIONS_BY_MODE`). The `isActionVisible(...)` helper in
|
|
324
|
-
* `ui/action-visibility.ts` filters at render time so a listed action can still
|
|
325
|
-
* be hidden in a state where it would no-op (e.g. `close` in inline-normal,
|
|
326
|
-
* `fullscreen` in standalone).
|
|
327
|
-
*/
|
|
328
|
-
|
|
290
|
+
//#endregion
|
|
291
|
+
//#region src/schema/widget/header.d.ts
|
|
329
292
|
declare const actionNameSchema: z.ZodEnum<{
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
293
|
+
fullscreen: "fullscreen";
|
|
294
|
+
theme: "theme";
|
|
295
|
+
clear: "clear";
|
|
296
|
+
expand: "expand";
|
|
297
|
+
sound: "sound";
|
|
298
|
+
history: "history";
|
|
299
|
+
language: "language";
|
|
300
|
+
textSize: "textSize";
|
|
301
|
+
close: "close";
|
|
339
302
|
}>;
|
|
340
303
|
type ActionName = z.infer<typeof actionNameSchema>;
|
|
341
304
|
declare const headerActionsSchema: z.ZodArray<z.ZodEnum<{
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
305
|
+
fullscreen: "fullscreen";
|
|
306
|
+
theme: "theme";
|
|
307
|
+
clear: "clear";
|
|
308
|
+
expand: "expand";
|
|
309
|
+
sound: "sound";
|
|
310
|
+
history: "history";
|
|
311
|
+
language: "language";
|
|
312
|
+
textSize: "textSize";
|
|
313
|
+
close: "close";
|
|
351
314
|
}>>;
|
|
352
315
|
type HeaderActions = z.infer<typeof headerActionsSchema>;
|
|
353
316
|
/** Section wrapper — `actions` list wrapped under `header` in the dashboard form. */
|
|
354
317
|
declare const headerSchema: z.ZodObject<{
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}, z.core.$loose>;
|
|
367
|
-
type HeaderOptions = z.infer<typeof headerSchema>;
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
declare const
|
|
379
|
-
|
|
318
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
319
|
+
fullscreen: "fullscreen";
|
|
320
|
+
theme: "theme";
|
|
321
|
+
clear: "clear";
|
|
322
|
+
expand: "expand";
|
|
323
|
+
sound: "sound";
|
|
324
|
+
history: "history";
|
|
325
|
+
language: "language";
|
|
326
|
+
textSize: "textSize";
|
|
327
|
+
close: "close";
|
|
328
|
+
}>>>;
|
|
329
|
+
}, z.core.$loose>;
|
|
330
|
+
type HeaderOptions = z.infer<typeof headerSchema>;
|
|
331
|
+
//#endregion
|
|
332
|
+
//#region src/schema/widget/feedback.d.ts
|
|
333
|
+
declare const feedbackEventSchema: z.ZodEnum<{
|
|
334
|
+
error: "error";
|
|
335
|
+
messageReceived: "messageReceived";
|
|
336
|
+
messageSent: "messageSent";
|
|
337
|
+
voiceStart: "voiceStart";
|
|
338
|
+
voiceStop: "voiceStop";
|
|
339
|
+
}>;
|
|
340
|
+
type FeedbackEvent = z.infer<typeof feedbackEventSchema>;
|
|
341
|
+
declare const soundOptionsSchema: z.ZodObject<{
|
|
342
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
343
|
+
volume: z.ZodDefault<z.ZodNumber>;
|
|
344
|
+
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
345
|
+
error: "error";
|
|
346
|
+
messageReceived: "messageReceived";
|
|
347
|
+
messageSent: "messageSent";
|
|
348
|
+
voiceStart: "voiceStart";
|
|
380
349
|
voiceStop: "voiceStop";
|
|
350
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
351
|
+
}, z.core.$loose>;
|
|
352
|
+
type SoundOptions = z.infer<typeof soundOptionsSchema>;
|
|
353
|
+
declare const hapticsOptionsSchema: z.ZodObject<{
|
|
354
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
355
|
+
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
381
356
|
error: "error";
|
|
382
357
|
messageReceived: "messageReceived";
|
|
383
358
|
messageSent: "messageSent";
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
359
|
+
voiceStart: "voiceStart";
|
|
360
|
+
voiceStop: "voiceStop";
|
|
361
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
362
|
+
}, z.core.$loose>;
|
|
363
|
+
type HapticsOptions = z.infer<typeof hapticsOptionsSchema>;
|
|
364
|
+
declare const feedbackSchema: z.ZodObject<{
|
|
365
|
+
sound: z.ZodOptional<z.ZodObject<{
|
|
387
366
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
388
367
|
volume: z.ZodDefault<z.ZodNumber>;
|
|
389
368
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
369
|
+
error: "error";
|
|
370
|
+
messageReceived: "messageReceived";
|
|
371
|
+
messageSent: "messageSent";
|
|
372
|
+
voiceStart: "voiceStart";
|
|
373
|
+
voiceStop: "voiceStop";
|
|
395
374
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
396
|
-
}, z.core.$loose
|
|
397
|
-
|
|
398
|
-
declare const hapticsOptionsSchema: z.ZodObject<{
|
|
375
|
+
}, z.core.$loose>>;
|
|
376
|
+
haptics: z.ZodOptional<z.ZodObject<{
|
|
399
377
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
400
378
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
379
|
+
error: "error";
|
|
380
|
+
messageReceived: "messageReceived";
|
|
381
|
+
messageSent: "messageSent";
|
|
382
|
+
voiceStart: "voiceStart";
|
|
383
|
+
voiceStop: "voiceStop";
|
|
406
384
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
407
|
-
}, z.core.$loose
|
|
408
|
-
type HapticsOptions = z.infer<typeof hapticsOptionsSchema>;
|
|
409
|
-
declare const feedbackSchema: z.ZodObject<{
|
|
410
|
-
sound: z.ZodOptional<z.ZodObject<{
|
|
411
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
412
|
-
volume: z.ZodDefault<z.ZodNumber>;
|
|
413
|
-
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
414
|
-
voiceStart: "voiceStart";
|
|
415
|
-
voiceStop: "voiceStop";
|
|
416
|
-
error: "error";
|
|
417
|
-
messageReceived: "messageReceived";
|
|
418
|
-
messageSent: "messageSent";
|
|
419
|
-
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
420
|
-
}, z.core.$loose>>;
|
|
421
|
-
haptics: z.ZodOptional<z.ZodObject<{
|
|
422
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
423
|
-
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
424
|
-
voiceStart: "voiceStart";
|
|
425
|
-
voiceStop: "voiceStop";
|
|
426
|
-
error: "error";
|
|
427
|
-
messageReceived: "messageReceived";
|
|
428
|
-
messageSent: "messageSent";
|
|
429
|
-
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
430
|
-
}, z.core.$loose>>;
|
|
385
|
+
}, z.core.$loose>>;
|
|
431
386
|
}, z.core.$loose>;
|
|
432
387
|
type FeedbackOptions = z.infer<typeof feedbackSchema>;
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
* Composer section schemas — send-button styling + attachment
|
|
436
|
-
* limits. Both are part of the composer's chrome at the bottom of the
|
|
437
|
-
* panel.
|
|
438
|
-
*/
|
|
439
|
-
|
|
388
|
+
//#endregion
|
|
389
|
+
//#region src/schema/widget/composer.d.ts
|
|
440
390
|
declare const sendButtonShapeSchema: z.ZodEnum<{
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
391
|
+
circle: "circle";
|
|
392
|
+
pill: "pill";
|
|
393
|
+
square: "square";
|
|
444
394
|
}>;
|
|
445
395
|
declare const sendButtonIconSchema: z.ZodEnum<{
|
|
446
|
-
|
|
396
|
+
arrowUp: "arrowUp";
|
|
397
|
+
paperPlane: "paperPlane";
|
|
398
|
+
send: "send";
|
|
399
|
+
chevron: "chevron";
|
|
400
|
+
}>;
|
|
401
|
+
declare const sendButtonVariantSchema: z.ZodEnum<{
|
|
402
|
+
filled: "filled";
|
|
403
|
+
outline: "outline";
|
|
404
|
+
ghost: "ghost";
|
|
405
|
+
}>;
|
|
406
|
+
declare const sendButtonOptionsSchema: z.ZodObject<{
|
|
407
|
+
shape: z.ZodDefault<z.ZodEnum<{
|
|
408
|
+
circle: "circle";
|
|
409
|
+
pill: "pill";
|
|
410
|
+
square: "square";
|
|
411
|
+
}>>;
|
|
412
|
+
icon: z.ZodDefault<z.ZodEnum<{
|
|
447
413
|
arrowUp: "arrowUp";
|
|
448
414
|
paperPlane: "paperPlane";
|
|
415
|
+
send: "send";
|
|
449
416
|
chevron: "chevron";
|
|
450
|
-
}
|
|
451
|
-
|
|
417
|
+
}>>;
|
|
418
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
452
419
|
filled: "filled";
|
|
453
420
|
outline: "outline";
|
|
454
421
|
ghost: "ghost";
|
|
455
|
-
}
|
|
456
|
-
|
|
422
|
+
}>>;
|
|
423
|
+
}, z.core.$loose>;
|
|
424
|
+
type SendButtonOptions = z.infer<typeof sendButtonOptionsSchema>;
|
|
425
|
+
declare const attachmentLimitsSchema: z.ZodObject<{
|
|
426
|
+
maxBytes: z.ZodDefault<z.ZodNumber>;
|
|
427
|
+
maxCount: z.ZodDefault<z.ZodNumber>;
|
|
428
|
+
accept: z.ZodDefault<z.ZodString>;
|
|
429
|
+
}, z.core.$loose>;
|
|
430
|
+
type AttachmentLimits = z.infer<typeof attachmentLimitsSchema>;
|
|
431
|
+
declare const composerOptionsSchema: z.ZodObject<{
|
|
432
|
+
sendButton: z.ZodOptional<z.ZodObject<{
|
|
457
433
|
shape: z.ZodDefault<z.ZodEnum<{
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
434
|
+
circle: "circle";
|
|
435
|
+
pill: "pill";
|
|
436
|
+
square: "square";
|
|
461
437
|
}>>;
|
|
462
438
|
icon: z.ZodDefault<z.ZodEnum<{
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
439
|
+
arrowUp: "arrowUp";
|
|
440
|
+
paperPlane: "paperPlane";
|
|
441
|
+
send: "send";
|
|
442
|
+
chevron: "chevron";
|
|
467
443
|
}>>;
|
|
468
444
|
variant: z.ZodDefault<z.ZodEnum<{
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
445
|
+
filled: "filled";
|
|
446
|
+
outline: "outline";
|
|
447
|
+
ghost: "ghost";
|
|
472
448
|
}>>;
|
|
473
|
-
}, z.core.$loose
|
|
474
|
-
|
|
475
|
-
declare const attachmentLimitsSchema: z.ZodObject<{
|
|
449
|
+
}, z.core.$loose>>;
|
|
450
|
+
attachments: z.ZodOptional<z.ZodObject<{
|
|
476
451
|
maxBytes: z.ZodDefault<z.ZodNumber>;
|
|
477
452
|
maxCount: z.ZodDefault<z.ZodNumber>;
|
|
478
453
|
accept: z.ZodDefault<z.ZodString>;
|
|
479
|
-
}, z.core.$loose
|
|
480
|
-
type AttachmentLimits = z.infer<typeof attachmentLimitsSchema>;
|
|
481
|
-
declare const composerOptionsSchema: z.ZodObject<{
|
|
482
|
-
sendButton: z.ZodOptional<z.ZodObject<{
|
|
483
|
-
shape: z.ZodDefault<z.ZodEnum<{
|
|
484
|
-
circle: "circle";
|
|
485
|
-
square: "square";
|
|
486
|
-
pill: "pill";
|
|
487
|
-
}>>;
|
|
488
|
-
icon: z.ZodDefault<z.ZodEnum<{
|
|
489
|
-
send: "send";
|
|
490
|
-
arrowUp: "arrowUp";
|
|
491
|
-
paperPlane: "paperPlane";
|
|
492
|
-
chevron: "chevron";
|
|
493
|
-
}>>;
|
|
494
|
-
variant: z.ZodDefault<z.ZodEnum<{
|
|
495
|
-
filled: "filled";
|
|
496
|
-
outline: "outline";
|
|
497
|
-
ghost: "ghost";
|
|
498
|
-
}>>;
|
|
499
|
-
}, z.core.$loose>>;
|
|
500
|
-
attachments: z.ZodOptional<z.ZodObject<{
|
|
501
|
-
maxBytes: z.ZodDefault<z.ZodNumber>;
|
|
502
|
-
maxCount: z.ZodDefault<z.ZodNumber>;
|
|
503
|
-
accept: z.ZodDefault<z.ZodString>;
|
|
504
|
-
}, z.core.$loose>>;
|
|
454
|
+
}, z.core.$loose>>;
|
|
505
455
|
}, z.core.$loose>;
|
|
506
456
|
type ComposerOptions = z.infer<typeof composerOptionsSchema>;
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
* Footer section schemas — the area below the composer.
|
|
510
|
-
*
|
|
511
|
-
* Two things live here: the "Powered by …" attribution (with optional
|
|
512
|
-
* link + logo) and the small disclaimer (like ChatGPT's "ChatGPT can
|
|
513
|
-
* make mistakes."). Brand defaults supply a sensible `Powered by
|
|
514
|
-
* <displayName>` attribution at runtime if the customer doesn't override.
|
|
515
|
-
*/
|
|
516
|
-
|
|
457
|
+
//#endregion
|
|
458
|
+
//#region src/schema/widget/footer.d.ts
|
|
517
459
|
declare const poweredBySchema: z.ZodObject<{
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
460
|
+
text: z.ZodOptional<z.ZodString>;
|
|
461
|
+
href: z.ZodOptional<z.ZodURL>;
|
|
462
|
+
logoUrl: z.ZodOptional<z.ZodURL>;
|
|
521
463
|
}, z.core.$loose>;
|
|
522
464
|
type PoweredBy = z.infer<typeof poweredBySchema>;
|
|
523
465
|
declare const footerSchema: z.ZodObject<{
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
466
|
+
poweredBy: z.ZodOptional<z.ZodObject<{
|
|
467
|
+
text: z.ZodOptional<z.ZodString>;
|
|
468
|
+
href: z.ZodOptional<z.ZodURL>;
|
|
469
|
+
logoUrl: z.ZodOptional<z.ZodURL>;
|
|
470
|
+
}, z.core.$loose>>;
|
|
471
|
+
composerDisclaimer: z.ZodOptional<z.ZodString>;
|
|
530
472
|
}, z.core.$loose>;
|
|
531
473
|
type FooterOptions = z.infer<typeof footerSchema>;
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
* Forms section — an **event-driven forms engine**. A deployment declares an
|
|
535
|
-
* ordered array of form definitions, each bound to trigger event(s), shown as a
|
|
536
|
-
* a prompt that replaces the composer (gating chat until submit/skip), deduped
|
|
537
|
-
* by frequency, and recorded via one shared submit endpoint (`endpoints.submitForm`).
|
|
538
|
-
*
|
|
539
|
-
* Generic across verticals (healthcare, insurance, dealerships, clinics) — the
|
|
540
|
-
* widget has NO industry logic; a clinic triage intake, an insurance claim form,
|
|
541
|
-
* a CSAT survey, and a sales lead capture are all just different `forms` config.
|
|
542
|
-
* The same field shape powers the AI ask-questions tool. See
|
|
543
|
-
* `docs/api/hitl-and-forms.md` + `docs/features/forms-and-hitl.md`.
|
|
544
|
-
*/
|
|
545
|
-
|
|
474
|
+
//#endregion
|
|
475
|
+
//#region src/schema/widget/forms.d.ts
|
|
546
476
|
declare const fieldTypeSchema: z.ZodEnum<{
|
|
477
|
+
number: "number";
|
|
478
|
+
url: "url";
|
|
479
|
+
email: "email";
|
|
480
|
+
date: "date";
|
|
481
|
+
text: "text";
|
|
482
|
+
tel: "tel";
|
|
483
|
+
time: "time";
|
|
484
|
+
textarea: "textarea";
|
|
485
|
+
select: "select";
|
|
486
|
+
radio: "radio";
|
|
487
|
+
checkbox: "checkbox";
|
|
488
|
+
multiselect: "multiselect";
|
|
489
|
+
}>;
|
|
490
|
+
type FieldType = z.infer<typeof fieldTypeSchema>;
|
|
491
|
+
declare const fieldOptionSchema: z.ZodObject<{
|
|
492
|
+
value: z.ZodString;
|
|
493
|
+
label: z.ZodOptional<z.ZodString>;
|
|
494
|
+
description: z.ZodOptional<z.ZodString>;
|
|
495
|
+
}, z.core.$loose>;
|
|
496
|
+
type FieldOption = z.infer<typeof fieldOptionSchema>;
|
|
497
|
+
declare const fieldValidationSchema: z.ZodObject<{
|
|
498
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
499
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
500
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
501
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
502
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
503
|
+
minSelections: z.ZodOptional<z.ZodNumber>;
|
|
504
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
505
|
+
}, z.core.$loose>;
|
|
506
|
+
type FieldValidation = z.infer<typeof fieldValidationSchema>;
|
|
507
|
+
declare const formFieldSchema: z.ZodObject<{
|
|
508
|
+
name: z.ZodString;
|
|
509
|
+
label: z.ZodString;
|
|
510
|
+
type: z.ZodEnum<{
|
|
547
511
|
number: "number";
|
|
548
|
-
text: "text";
|
|
549
512
|
url: "url";
|
|
550
513
|
email: "email";
|
|
551
|
-
tel: "tel";
|
|
552
514
|
date: "date";
|
|
515
|
+
text: "text";
|
|
516
|
+
tel: "tel";
|
|
553
517
|
time: "time";
|
|
554
518
|
textarea: "textarea";
|
|
555
519
|
select: "select";
|
|
556
520
|
radio: "radio";
|
|
557
521
|
checkbox: "checkbox";
|
|
558
522
|
multiselect: "multiselect";
|
|
559
|
-
}>;
|
|
560
|
-
|
|
561
|
-
|
|
523
|
+
}>;
|
|
524
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
525
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
526
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
527
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
562
528
|
value: z.ZodString;
|
|
563
529
|
label: z.ZodOptional<z.ZodString>;
|
|
564
530
|
description: z.ZodOptional<z.ZodString>;
|
|
565
|
-
}, z.core.$loose
|
|
566
|
-
|
|
567
|
-
declare const fieldValidationSchema: z.ZodObject<{
|
|
531
|
+
}, z.core.$loose>>>;
|
|
532
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
568
533
|
pattern: z.ZodOptional<z.ZodString>;
|
|
569
534
|
minLength: z.ZodOptional<z.ZodNumber>;
|
|
570
535
|
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
@@ -572,44 +537,9 @@ declare const fieldValidationSchema: z.ZodObject<{
|
|
|
572
537
|
max: z.ZodOptional<z.ZodNumber>;
|
|
573
538
|
minSelections: z.ZodOptional<z.ZodNumber>;
|
|
574
539
|
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
575
|
-
}, z.core.$loose
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
name: z.ZodString;
|
|
579
|
-
label: z.ZodString;
|
|
580
|
-
type: z.ZodEnum<{
|
|
581
|
-
number: "number";
|
|
582
|
-
text: "text";
|
|
583
|
-
url: "url";
|
|
584
|
-
email: "email";
|
|
585
|
-
tel: "tel";
|
|
586
|
-
date: "date";
|
|
587
|
-
time: "time";
|
|
588
|
-
textarea: "textarea";
|
|
589
|
-
select: "select";
|
|
590
|
-
radio: "radio";
|
|
591
|
-
checkbox: "checkbox";
|
|
592
|
-
multiselect: "multiselect";
|
|
593
|
-
}>;
|
|
594
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
595
|
-
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
596
|
-
defaultValue: z.ZodOptional<z.ZodString>;
|
|
597
|
-
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
598
|
-
value: z.ZodString;
|
|
599
|
-
label: z.ZodOptional<z.ZodString>;
|
|
600
|
-
description: z.ZodOptional<z.ZodString>;
|
|
601
|
-
}, z.core.$loose>>>;
|
|
602
|
-
validation: z.ZodOptional<z.ZodObject<{
|
|
603
|
-
pattern: z.ZodOptional<z.ZodString>;
|
|
604
|
-
minLength: z.ZodOptional<z.ZodNumber>;
|
|
605
|
-
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
606
|
-
min: z.ZodOptional<z.ZodNumber>;
|
|
607
|
-
max: z.ZodOptional<z.ZodNumber>;
|
|
608
|
-
minSelections: z.ZodOptional<z.ZodNumber>;
|
|
609
|
-
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
610
|
-
}, z.core.$loose>>;
|
|
611
|
-
allowOther: z.ZodOptional<z.ZodBoolean>;
|
|
612
|
-
validationHint: z.ZodOptional<z.ZodString>;
|
|
540
|
+
}, z.core.$loose>>;
|
|
541
|
+
allowOther: z.ZodOptional<z.ZodBoolean>;
|
|
542
|
+
validationHint: z.ZodOptional<z.ZodString>;
|
|
613
543
|
}, z.core.$loose>;
|
|
614
544
|
type FormField = z.infer<typeof formFieldSchema>;
|
|
615
545
|
/**
|
|
@@ -619,10 +549,10 @@ type FormField = z.infer<typeof formFieldSchema>;
|
|
|
619
549
|
*/
|
|
620
550
|
declare const formTriggerSchema: z.ZodString;
|
|
621
551
|
declare const formConditionSchema: z.ZodObject<{
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
552
|
+
missingContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
553
|
+
pageArea: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
554
|
+
minMessages: z.ZodOptional<z.ZodNumber>;
|
|
555
|
+
maxMessages: z.ZodOptional<z.ZodNumber>;
|
|
626
556
|
}, z.core.$loose>;
|
|
627
557
|
type FormCondition = z.infer<typeof formConditionSchema>;
|
|
628
558
|
/**
|
|
@@ -634,273 +564,643 @@ type FormCondition = z.infer<typeof formConditionSchema>;
|
|
|
634
564
|
* requested `?locale=` (≤1 entry); the widget overlays it (`overlayFormDef`).
|
|
635
565
|
*/
|
|
636
566
|
declare const fieldOptionTranslationSchema: z.ZodObject<{
|
|
567
|
+
value: z.ZodString;
|
|
568
|
+
label: z.ZodOptional<z.ZodString>;
|
|
569
|
+
description: z.ZodOptional<z.ZodString>;
|
|
570
|
+
}, z.core.$loose>;
|
|
571
|
+
declare const formFieldTranslationSchema: z.ZodObject<{
|
|
572
|
+
name: z.ZodString;
|
|
573
|
+
label: z.ZodOptional<z.ZodString>;
|
|
574
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
575
|
+
validationHint: z.ZodOptional<z.ZodString>;
|
|
576
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
637
577
|
value: z.ZodString;
|
|
638
578
|
label: z.ZodOptional<z.ZodString>;
|
|
639
579
|
description: z.ZodOptional<z.ZodString>;
|
|
580
|
+
}, z.core.$loose>>>;
|
|
640
581
|
}, z.core.$loose>;
|
|
641
|
-
declare const
|
|
582
|
+
declare const formTranslationSchema: z.ZodObject<{
|
|
583
|
+
locale: z.ZodString;
|
|
584
|
+
title: z.ZodOptional<z.ZodString>;
|
|
585
|
+
description: z.ZodOptional<z.ZodString>;
|
|
586
|
+
submitLabel: z.ZodOptional<z.ZodString>;
|
|
587
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
642
588
|
name: z.ZodString;
|
|
643
589
|
label: z.ZodOptional<z.ZodString>;
|
|
644
590
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
645
591
|
validationHint: z.ZodOptional<z.ZodString>;
|
|
646
592
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
593
|
+
value: z.ZodString;
|
|
594
|
+
label: z.ZodOptional<z.ZodString>;
|
|
595
|
+
description: z.ZodOptional<z.ZodString>;
|
|
650
596
|
}, z.core.$loose>>>;
|
|
597
|
+
}, z.core.$loose>>>;
|
|
651
598
|
}, z.core.$loose>;
|
|
652
|
-
|
|
599
|
+
type FormTranslation = z.infer<typeof formTranslationSchema>;
|
|
600
|
+
declare const formDefSchema: z.ZodObject<{
|
|
601
|
+
id: z.ZodString;
|
|
602
|
+
on: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
603
|
+
when: z.ZodOptional<z.ZodObject<{
|
|
604
|
+
missingContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
605
|
+
pageArea: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
606
|
+
minMessages: z.ZodOptional<z.ZodNumber>;
|
|
607
|
+
maxMessages: z.ZodOptional<z.ZodNumber>;
|
|
608
|
+
}, z.core.$loose>>;
|
|
609
|
+
fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
610
|
+
name: z.ZodString;
|
|
611
|
+
label: z.ZodString;
|
|
612
|
+
type: z.ZodEnum<{
|
|
613
|
+
number: "number";
|
|
614
|
+
url: "url";
|
|
615
|
+
email: "email";
|
|
616
|
+
date: "date";
|
|
617
|
+
text: "text";
|
|
618
|
+
tel: "tel";
|
|
619
|
+
time: "time";
|
|
620
|
+
textarea: "textarea";
|
|
621
|
+
select: "select";
|
|
622
|
+
radio: "radio";
|
|
623
|
+
checkbox: "checkbox";
|
|
624
|
+
multiselect: "multiselect";
|
|
625
|
+
}>;
|
|
626
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
627
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
628
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
629
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
630
|
+
value: z.ZodString;
|
|
631
|
+
label: z.ZodOptional<z.ZodString>;
|
|
632
|
+
description: z.ZodOptional<z.ZodString>;
|
|
633
|
+
}, z.core.$loose>>>;
|
|
634
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
635
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
636
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
637
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
638
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
639
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
640
|
+
minSelections: z.ZodOptional<z.ZodNumber>;
|
|
641
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
642
|
+
}, z.core.$loose>>;
|
|
643
|
+
allowOther: z.ZodOptional<z.ZodBoolean>;
|
|
644
|
+
validationHint: z.ZodOptional<z.ZodString>;
|
|
645
|
+
}, z.core.$loose>>>;
|
|
646
|
+
title: z.ZodOptional<z.ZodString>;
|
|
647
|
+
description: z.ZodOptional<z.ZodString>;
|
|
648
|
+
submitLabel: z.ZodOptional<z.ZodString>;
|
|
649
|
+
skippable: z.ZodDefault<z.ZodBoolean>;
|
|
650
|
+
frequency: z.ZodDefault<z.ZodEnum<{
|
|
651
|
+
once: "once";
|
|
652
|
+
conversation: "conversation";
|
|
653
|
+
always: "always";
|
|
654
|
+
}>>;
|
|
655
|
+
mirrorToContext: z.ZodDefault<z.ZodBoolean>;
|
|
656
|
+
reopenable: z.ZodDefault<z.ZodBoolean>;
|
|
657
|
+
reviewable: z.ZodDefault<z.ZodBoolean>;
|
|
658
|
+
defaultLocale: z.ZodOptional<z.ZodString>;
|
|
659
|
+
translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
653
660
|
locale: z.ZodString;
|
|
654
661
|
title: z.ZodOptional<z.ZodString>;
|
|
655
662
|
description: z.ZodOptional<z.ZodString>;
|
|
656
663
|
submitLabel: z.ZodOptional<z.ZodString>;
|
|
657
664
|
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
658
|
-
|
|
665
|
+
name: z.ZodString;
|
|
666
|
+
label: z.ZodOptional<z.ZodString>;
|
|
667
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
668
|
+
validationHint: z.ZodOptional<z.ZodString>;
|
|
669
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
670
|
+
value: z.ZodString;
|
|
659
671
|
label: z.ZodOptional<z.ZodString>;
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
663
|
-
value: z.ZodString;
|
|
664
|
-
label: z.ZodOptional<z.ZodString>;
|
|
665
|
-
description: z.ZodOptional<z.ZodString>;
|
|
666
|
-
}, z.core.$loose>>>;
|
|
672
|
+
description: z.ZodOptional<z.ZodString>;
|
|
673
|
+
}, z.core.$loose>>>;
|
|
667
674
|
}, z.core.$loose>>>;
|
|
675
|
+
}, z.core.$loose>>>;
|
|
668
676
|
}, z.core.$loose>;
|
|
669
|
-
type
|
|
670
|
-
declare const
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
}, z.core.$loose>>>;
|
|
704
|
-
validation: z.ZodOptional<z.ZodObject<{
|
|
705
|
-
pattern: z.ZodOptional<z.ZodString>;
|
|
706
|
-
minLength: z.ZodOptional<z.ZodNumber>;
|
|
707
|
-
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
708
|
-
min: z.ZodOptional<z.ZodNumber>;
|
|
709
|
-
max: z.ZodOptional<z.ZodNumber>;
|
|
710
|
-
minSelections: z.ZodOptional<z.ZodNumber>;
|
|
711
|
-
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
712
|
-
}, z.core.$loose>>;
|
|
713
|
-
allowOther: z.ZodOptional<z.ZodBoolean>;
|
|
714
|
-
validationHint: z.ZodOptional<z.ZodString>;
|
|
677
|
+
type FormDef = z.infer<typeof formDefSchema>;
|
|
678
|
+
declare const formsSchema: z.ZodArray<z.ZodObject<{
|
|
679
|
+
id: z.ZodString;
|
|
680
|
+
on: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
681
|
+
when: z.ZodOptional<z.ZodObject<{
|
|
682
|
+
missingContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
683
|
+
pageArea: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
684
|
+
minMessages: z.ZodOptional<z.ZodNumber>;
|
|
685
|
+
maxMessages: z.ZodOptional<z.ZodNumber>;
|
|
686
|
+
}, z.core.$loose>>;
|
|
687
|
+
fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
688
|
+
name: z.ZodString;
|
|
689
|
+
label: z.ZodString;
|
|
690
|
+
type: z.ZodEnum<{
|
|
691
|
+
number: "number";
|
|
692
|
+
url: "url";
|
|
693
|
+
email: "email";
|
|
694
|
+
date: "date";
|
|
695
|
+
text: "text";
|
|
696
|
+
tel: "tel";
|
|
697
|
+
time: "time";
|
|
698
|
+
textarea: "textarea";
|
|
699
|
+
select: "select";
|
|
700
|
+
radio: "radio";
|
|
701
|
+
checkbox: "checkbox";
|
|
702
|
+
multiselect: "multiselect";
|
|
703
|
+
}>;
|
|
704
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
705
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
706
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
707
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
708
|
+
value: z.ZodString;
|
|
709
|
+
label: z.ZodOptional<z.ZodString>;
|
|
710
|
+
description: z.ZodOptional<z.ZodString>;
|
|
715
711
|
}, z.core.$loose>>>;
|
|
712
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
713
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
714
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
715
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
716
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
717
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
718
|
+
minSelections: z.ZodOptional<z.ZodNumber>;
|
|
719
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
720
|
+
}, z.core.$loose>>;
|
|
721
|
+
allowOther: z.ZodOptional<z.ZodBoolean>;
|
|
722
|
+
validationHint: z.ZodOptional<z.ZodString>;
|
|
723
|
+
}, z.core.$loose>>>;
|
|
724
|
+
title: z.ZodOptional<z.ZodString>;
|
|
725
|
+
description: z.ZodOptional<z.ZodString>;
|
|
726
|
+
submitLabel: z.ZodOptional<z.ZodString>;
|
|
727
|
+
skippable: z.ZodDefault<z.ZodBoolean>;
|
|
728
|
+
frequency: z.ZodDefault<z.ZodEnum<{
|
|
729
|
+
once: "once";
|
|
730
|
+
conversation: "conversation";
|
|
731
|
+
always: "always";
|
|
732
|
+
}>>;
|
|
733
|
+
mirrorToContext: z.ZodDefault<z.ZodBoolean>;
|
|
734
|
+
reopenable: z.ZodDefault<z.ZodBoolean>;
|
|
735
|
+
reviewable: z.ZodDefault<z.ZodBoolean>;
|
|
736
|
+
defaultLocale: z.ZodOptional<z.ZodString>;
|
|
737
|
+
translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
738
|
+
locale: z.ZodString;
|
|
716
739
|
title: z.ZodOptional<z.ZodString>;
|
|
717
740
|
description: z.ZodOptional<z.ZodString>;
|
|
718
741
|
submitLabel: z.ZodOptional<z.ZodString>;
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
reviewable: z.ZodDefault<z.ZodBoolean>;
|
|
728
|
-
defaultLocale: z.ZodOptional<z.ZodString>;
|
|
729
|
-
translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
730
|
-
locale: z.ZodString;
|
|
731
|
-
title: z.ZodOptional<z.ZodString>;
|
|
742
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
743
|
+
name: z.ZodString;
|
|
744
|
+
label: z.ZodOptional<z.ZodString>;
|
|
745
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
746
|
+
validationHint: z.ZodOptional<z.ZodString>;
|
|
747
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
748
|
+
value: z.ZodString;
|
|
749
|
+
label: z.ZodOptional<z.ZodString>;
|
|
732
750
|
description: z.ZodOptional<z.ZodString>;
|
|
733
|
-
|
|
734
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
735
|
-
name: z.ZodString;
|
|
736
|
-
label: z.ZodOptional<z.ZodString>;
|
|
737
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
738
|
-
validationHint: z.ZodOptional<z.ZodString>;
|
|
739
|
-
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
740
|
-
value: z.ZodString;
|
|
741
|
-
label: z.ZodOptional<z.ZodString>;
|
|
742
|
-
description: z.ZodOptional<z.ZodString>;
|
|
743
|
-
}, z.core.$loose>>>;
|
|
744
|
-
}, z.core.$loose>>>;
|
|
751
|
+
}, z.core.$loose>>>;
|
|
745
752
|
}, z.core.$loose>>>;
|
|
753
|
+
}, z.core.$loose>>>;
|
|
754
|
+
}, z.core.$loose>>;
|
|
755
|
+
type Forms = z.infer<typeof formsSchema>;
|
|
756
|
+
//#endregion
|
|
757
|
+
//#region src/schema/widget/i18n.d.ts
|
|
758
|
+
declare const stringsOverrideSchema: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>]>;
|
|
759
|
+
type StringsOverride = z.infer<typeof stringsOverrideSchema>;
|
|
760
|
+
declare const i18nSchema: z.ZodObject<{
|
|
761
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
762
|
+
defaultLocale: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodString]>>;
|
|
763
|
+
availableLocales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
764
|
+
strings: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>]>>;
|
|
746
765
|
}, z.core.$loose>;
|
|
747
|
-
type
|
|
748
|
-
|
|
766
|
+
type I18nOptions = z.infer<typeof i18nSchema>;
|
|
767
|
+
//#endregion
|
|
768
|
+
//#region src/schema/widget/modules.d.ts
|
|
769
|
+
declare const moduleLayoutSchema: z.ZodEnum<{
|
|
770
|
+
home: "home";
|
|
771
|
+
chat: "chat";
|
|
772
|
+
help: "help";
|
|
773
|
+
news: "news";
|
|
774
|
+
}>;
|
|
775
|
+
type ModuleLayout = z.infer<typeof moduleLayoutSchema>;
|
|
776
|
+
declare const moduleSchema: z.ZodObject<{
|
|
777
|
+
label: z.ZodString;
|
|
778
|
+
layout: z.ZodEnum<{
|
|
779
|
+
home: "home";
|
|
780
|
+
chat: "chat";
|
|
781
|
+
help: "help";
|
|
782
|
+
news: "news";
|
|
783
|
+
}>;
|
|
784
|
+
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
785
|
+
id: z.ZodOptional<z.ZodString>;
|
|
786
|
+
brandName: z.ZodOptional<z.ZodString>;
|
|
787
|
+
hideGreeting: z.ZodOptional<z.ZodBoolean>;
|
|
788
|
+
greetingText: z.ZodOptional<z.ZodString>;
|
|
789
|
+
userAvatars: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
790
|
+
name: z.ZodString;
|
|
791
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
792
|
+
role: z.ZodOptional<z.ZodString>;
|
|
793
|
+
}, z.core.$loose>>>;
|
|
794
|
+
hideSearchBar: z.ZodOptional<z.ZodBoolean>;
|
|
795
|
+
hideRecentConversations: z.ZodOptional<z.ZodBoolean>;
|
|
796
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
797
|
+
text: z.ZodOptional<z.ZodString>;
|
|
798
|
+
level: z.ZodOptional<z.ZodString>;
|
|
799
|
+
url: z.ZodOptional<z.ZodString>;
|
|
800
|
+
}, z.core.$strip>>;
|
|
801
|
+
contentBlockTitle: z.ZodOptional<z.ZodString>;
|
|
802
|
+
}, z.core.$loose>;
|
|
803
|
+
type ModuleOptions = z.infer<typeof moduleSchema>;
|
|
804
|
+
declare const modulesSchema: z.ZodArray<z.ZodObject<{
|
|
805
|
+
label: z.ZodString;
|
|
806
|
+
layout: z.ZodEnum<{
|
|
807
|
+
home: "home";
|
|
808
|
+
chat: "chat";
|
|
809
|
+
help: "help";
|
|
810
|
+
news: "news";
|
|
811
|
+
}>;
|
|
812
|
+
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
813
|
+
id: z.ZodOptional<z.ZodString>;
|
|
814
|
+
brandName: z.ZodOptional<z.ZodString>;
|
|
815
|
+
hideGreeting: z.ZodOptional<z.ZodBoolean>;
|
|
816
|
+
greetingText: z.ZodOptional<z.ZodString>;
|
|
817
|
+
userAvatars: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
818
|
+
name: z.ZodString;
|
|
819
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
820
|
+
role: z.ZodOptional<z.ZodString>;
|
|
821
|
+
}, z.core.$loose>>>;
|
|
822
|
+
hideSearchBar: z.ZodOptional<z.ZodBoolean>;
|
|
823
|
+
hideRecentConversations: z.ZodOptional<z.ZodBoolean>;
|
|
824
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
825
|
+
text: z.ZodOptional<z.ZodString>;
|
|
826
|
+
level: z.ZodOptional<z.ZodString>;
|
|
827
|
+
url: z.ZodOptional<z.ZodString>;
|
|
828
|
+
}, z.core.$strip>>;
|
|
829
|
+
contentBlockTitle: z.ZodOptional<z.ZodString>;
|
|
830
|
+
}, z.core.$loose>>;
|
|
831
|
+
type ModulesOptions = z.infer<typeof modulesSchema>;
|
|
832
|
+
//#endregion
|
|
833
|
+
//#region src/schema/widget/tracking.d.ts
|
|
834
|
+
declare const trackingSchema: z.ZodObject<{
|
|
835
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
836
|
+
endpoint: z.ZodOptional<z.ZodURL>;
|
|
837
|
+
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
838
|
+
token: z.ZodOptional<z.ZodString>;
|
|
839
|
+
}, z.core.$loose>;
|
|
840
|
+
type TrackingSettings = z.infer<typeof trackingSchema>;
|
|
841
|
+
//#endregion
|
|
842
|
+
//#region src/schema/widget.d.ts
|
|
843
|
+
declare const endpointsSchema: z.ZodObject<{
|
|
844
|
+
upload: z.ZodDefault<z.ZodString>;
|
|
845
|
+
transcribe: z.ZodDefault<z.ZodString>;
|
|
846
|
+
submitForm: z.ZodDefault<z.ZodString>;
|
|
847
|
+
}, z.core.$loose>;
|
|
848
|
+
type Endpoints = z.infer<typeof endpointsSchema>;
|
|
849
|
+
/**
|
|
850
|
+
* Host-asserted, **informational** context about the end-user — never an auth
|
|
851
|
+
* credential (auth is the workspace `publicKey`). The widget runs on
|
|
852
|
+
* third-party sites; some have their own login, some are guest-only, and we
|
|
853
|
+
* don't register or authenticate these users. `id` / `email` / `name` are
|
|
854
|
+
* recognised fields; any extra scalar fields are forwarded to the agent as
|
|
855
|
+
* custom context. Untrusted input — sanitised client-side before sending.
|
|
856
|
+
*/
|
|
857
|
+
declare const userContextSchema: z.ZodObject<{
|
|
858
|
+
id: z.ZodOptional<z.ZodString>;
|
|
859
|
+
email: z.ZodOptional<z.ZodString>;
|
|
860
|
+
name: z.ZodOptional<z.ZodString>;
|
|
861
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
862
|
+
role: z.ZodOptional<z.ZodString>;
|
|
863
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
864
|
+
}, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
865
|
+
type UserContext = z.infer<typeof userContextSchema>;
|
|
866
|
+
/** Suggested (not enforced) values for {@link pageContextSchema} `area`. */
|
|
867
|
+
declare const PAGE_AREA_SUGGESTIONS: readonly ["home", "docs", "help-desk", "support", "pricing", "checkout", "orders", "account", "blog"];
|
|
868
|
+
/**
|
|
869
|
+
* Host-asserted, **informational** context about the page / visit — where the
|
|
870
|
+
* visitor is and which surface they're on. Separate from {@link userContextSchema}
|
|
871
|
+
* (who the visitor is). `url` auto-fills from the host page when omitted. The
|
|
872
|
+
* `area` differentiator lets the agent adapt to the surface (a docs reader ≠ a
|
|
873
|
+
* pricing visitor ≠ a help-desk ticket). Untrusted — sanitised client-side.
|
|
874
|
+
*/
|
|
875
|
+
declare const pageContextSchema: z.ZodObject<{
|
|
876
|
+
area: z.ZodOptional<z.ZodString>;
|
|
877
|
+
url: z.ZodOptional<z.ZodString>;
|
|
878
|
+
path: z.ZodOptional<z.ZodString>;
|
|
879
|
+
title: z.ZodOptional<z.ZodString>;
|
|
880
|
+
}, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
881
|
+
type PageContext = z.infer<typeof pageContextSchema>;
|
|
882
|
+
/**
|
|
883
|
+
* Where the widget talks to and how it authenticates. Owned by the
|
|
884
|
+
* **embedding developer** — typically baked into the page template or
|
|
885
|
+
* an env var, not user-editable. Distinct from {@link widgetSettingsSchema}
|
|
886
|
+
* which is the dashboard-pushed UX surface.
|
|
887
|
+
*/
|
|
888
|
+
declare const connectionConfigSchema: z.ZodObject<{
|
|
889
|
+
widgetId: z.ZodDefault<z.ZodString>;
|
|
890
|
+
publicKey: z.ZodOptional<z.ZodString>;
|
|
891
|
+
aiAgentDeploymentId: z.ZodOptional<z.ZodString>;
|
|
892
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
893
|
+
agentApiBaseUrl: z.ZodOptional<z.ZodString>;
|
|
894
|
+
dataApiBaseUrl: z.ZodOptional<z.ZodString>;
|
|
895
|
+
userContext: z.ZodOptional<z.ZodObject<{
|
|
896
|
+
id: z.ZodOptional<z.ZodString>;
|
|
897
|
+
email: z.ZodOptional<z.ZodString>;
|
|
898
|
+
name: z.ZodOptional<z.ZodString>;
|
|
899
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
900
|
+
role: z.ZodOptional<z.ZodString>;
|
|
901
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
902
|
+
}, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
903
|
+
pageContext: z.ZodOptional<z.ZodObject<{
|
|
904
|
+
area: z.ZodOptional<z.ZodString>;
|
|
905
|
+
url: z.ZodOptional<z.ZodString>;
|
|
906
|
+
path: z.ZodOptional<z.ZodString>;
|
|
907
|
+
title: z.ZodOptional<z.ZodString>;
|
|
908
|
+
}, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
909
|
+
endpoints: z.ZodOptional<z.ZodObject<{
|
|
910
|
+
upload: z.ZodDefault<z.ZodString>;
|
|
911
|
+
transcribe: z.ZodDefault<z.ZodString>;
|
|
912
|
+
submitForm: z.ZodDefault<z.ZodString>;
|
|
913
|
+
}, z.core.$loose>>;
|
|
914
|
+
debug: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
|
|
915
|
+
error: "error";
|
|
916
|
+
off: "off";
|
|
917
|
+
warn: "warn";
|
|
918
|
+
info: "info";
|
|
919
|
+
debug: "debug";
|
|
920
|
+
trace: "trace";
|
|
921
|
+
}>]>>;
|
|
922
|
+
}, z.core.$loose>;
|
|
923
|
+
type ConnectionConfig = z.infer<typeof connectionConfigSchema>;
|
|
924
|
+
/**
|
|
925
|
+
* Everything that controls **how the widget looks and behaves** —
|
|
926
|
+
* the UX surface a dashboard / customer-success operator would
|
|
927
|
+
* configure. The backend pushes this same shape on
|
|
928
|
+
* `/pai/handshake` (under `config`); the dev configurator lets
|
|
929
|
+
* you edit it in real time.
|
|
930
|
+
*
|
|
931
|
+
* Composed from the section schemas under `./widget/*` so the
|
|
932
|
+
* dashboard form has obvious tabs without extra metadata.
|
|
933
|
+
*/
|
|
934
|
+
declare const widgetSettingsSchema: z.ZodObject<{
|
|
935
|
+
presentation: z.ZodOptional<z.ZodObject<{
|
|
936
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
937
|
+
floating: "floating";
|
|
938
|
+
inline: "inline";
|
|
939
|
+
standalone: "standalone";
|
|
940
|
+
page: "page";
|
|
941
|
+
modal: "modal";
|
|
942
|
+
drawer: "drawer";
|
|
943
|
+
}>>;
|
|
944
|
+
position: z.ZodDefault<z.ZodEnum<{
|
|
945
|
+
"bottom-right": "bottom-right";
|
|
946
|
+
"bottom-left": "bottom-left";
|
|
947
|
+
"top-right": "top-right";
|
|
948
|
+
"top-left": "top-left";
|
|
949
|
+
}>>;
|
|
950
|
+
iframe: z.ZodDefault<z.ZodBoolean>;
|
|
951
|
+
size: z.ZodOptional<z.ZodObject<{
|
|
952
|
+
width: z.ZodOptional<z.ZodString>;
|
|
953
|
+
height: z.ZodOptional<z.ZodString>;
|
|
954
|
+
expanded: z.ZodOptional<z.ZodObject<{
|
|
955
|
+
width: z.ZodOptional<z.ZodString>;
|
|
956
|
+
height: z.ZodOptional<z.ZodString>;
|
|
957
|
+
}, z.core.$loose>>;
|
|
958
|
+
resize: z.ZodOptional<z.ZodObject<{
|
|
959
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
960
|
+
minWidth: z.ZodOptional<z.ZodString>;
|
|
961
|
+
maxWidth: z.ZodOptional<z.ZodString>;
|
|
962
|
+
minHeight: z.ZodOptional<z.ZodString>;
|
|
963
|
+
maxHeight: z.ZodOptional<z.ZodString>;
|
|
964
|
+
}, z.core.$loose>>;
|
|
965
|
+
inset: z.ZodOptional<z.ZodString>;
|
|
966
|
+
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
967
|
+
expanded: "expanded";
|
|
968
|
+
normal: "normal";
|
|
969
|
+
fullscreen: "fullscreen";
|
|
970
|
+
auto: "auto";
|
|
971
|
+
}>>;
|
|
972
|
+
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
973
|
+
}, z.core.$loose>>;
|
|
974
|
+
}, z.core.$loose>>;
|
|
975
|
+
behavior: z.ZodOptional<z.ZodObject<{
|
|
976
|
+
startMinimized: z.ZodDefault<z.ZodBoolean>;
|
|
977
|
+
responseMode: z.ZodDefault<z.ZodEnum<{
|
|
978
|
+
streaming: "streaming";
|
|
979
|
+
buffered: "buffered";
|
|
980
|
+
}>>;
|
|
981
|
+
showReasoning: z.ZodDefault<z.ZodBoolean>;
|
|
982
|
+
showToolCalls: z.ZodDefault<z.ZodBoolean>;
|
|
983
|
+
showSources: z.ZodDefault<z.ZodBoolean>;
|
|
984
|
+
disableMessageFeedback: z.ZodDefault<z.ZodBoolean>;
|
|
985
|
+
autoSendSuggestions: z.ZodDefault<z.ZodBoolean>;
|
|
986
|
+
}, z.core.$loose>>;
|
|
987
|
+
theme: z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
|
|
988
|
+
auto: "auto";
|
|
989
|
+
light: "light";
|
|
990
|
+
dark: "dark";
|
|
991
|
+
}>, z.ZodObject<{
|
|
992
|
+
accent: z.ZodOptional<z.ZodString>;
|
|
993
|
+
accentText: z.ZodOptional<z.ZodString>;
|
|
994
|
+
radius: z.ZodOptional<z.ZodString>;
|
|
995
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
996
|
+
contentMaxWidth: z.ZodOptional<z.ZodString>;
|
|
997
|
+
}, z.core.$loose>]>>;
|
|
998
|
+
launcher: z.ZodOptional<z.ZodObject<{
|
|
999
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
1000
|
+
circle: "circle";
|
|
1001
|
+
pill: "pill";
|
|
1002
|
+
bar: "bar";
|
|
1003
|
+
minimal: "minimal";
|
|
1004
|
+
}>>;
|
|
1005
|
+
size: z.ZodDefault<z.ZodEnum<{
|
|
1006
|
+
sm: "sm";
|
|
1007
|
+
md: "md";
|
|
1008
|
+
lg: "lg";
|
|
1009
|
+
}>>;
|
|
1010
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1011
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1012
|
+
hidden: z.ZodDefault<z.ZodBoolean>;
|
|
1013
|
+
callout: z.ZodOptional<z.ZodObject<{
|
|
1014
|
+
text: z.ZodDefault<z.ZodString>;
|
|
1015
|
+
shape: z.ZodDefault<z.ZodEnum<{
|
|
1016
|
+
pill: "pill";
|
|
1017
|
+
bubble: "bubble";
|
|
1018
|
+
callout: "callout";
|
|
1019
|
+
}>>;
|
|
1020
|
+
position: z.ZodDefault<z.ZodEnum<{
|
|
1021
|
+
auto: "auto";
|
|
1022
|
+
horizontal: "horizontal";
|
|
1023
|
+
vertical: "vertical";
|
|
1024
|
+
}>>;
|
|
1025
|
+
delayMs: z.ZodDefault<z.ZodNumber>;
|
|
1026
|
+
autoDismissMs: z.ZodDefault<z.ZodNumber>;
|
|
1027
|
+
animated: z.ZodDefault<z.ZodBoolean>;
|
|
1028
|
+
persistent: z.ZodDefault<z.ZodBoolean>;
|
|
1029
|
+
}, z.core.$loose>>;
|
|
1030
|
+
}, z.core.$loose>>;
|
|
1031
|
+
header: z.ZodOptional<z.ZodObject<{
|
|
1032
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1033
|
+
fullscreen: "fullscreen";
|
|
1034
|
+
theme: "theme";
|
|
1035
|
+
clear: "clear";
|
|
1036
|
+
expand: "expand";
|
|
1037
|
+
sound: "sound";
|
|
1038
|
+
history: "history";
|
|
1039
|
+
language: "language";
|
|
1040
|
+
textSize: "textSize";
|
|
1041
|
+
close: "close";
|
|
1042
|
+
}>>>;
|
|
1043
|
+
}, z.core.$loose>>;
|
|
1044
|
+
composer: z.ZodOptional<z.ZodObject<{
|
|
1045
|
+
sendButton: z.ZodOptional<z.ZodObject<{
|
|
1046
|
+
shape: z.ZodDefault<z.ZodEnum<{
|
|
1047
|
+
circle: "circle";
|
|
1048
|
+
pill: "pill";
|
|
1049
|
+
square: "square";
|
|
1050
|
+
}>>;
|
|
1051
|
+
icon: z.ZodDefault<z.ZodEnum<{
|
|
1052
|
+
arrowUp: "arrowUp";
|
|
1053
|
+
paperPlane: "paperPlane";
|
|
1054
|
+
send: "send";
|
|
1055
|
+
chevron: "chevron";
|
|
1056
|
+
}>>;
|
|
1057
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
1058
|
+
filled: "filled";
|
|
1059
|
+
outline: "outline";
|
|
1060
|
+
ghost: "ghost";
|
|
1061
|
+
}>>;
|
|
1062
|
+
}, z.core.$loose>>;
|
|
1063
|
+
attachments: z.ZodOptional<z.ZodObject<{
|
|
1064
|
+
maxBytes: z.ZodDefault<z.ZodNumber>;
|
|
1065
|
+
maxCount: z.ZodDefault<z.ZodNumber>;
|
|
1066
|
+
accept: z.ZodDefault<z.ZodString>;
|
|
1067
|
+
}, z.core.$loose>>;
|
|
1068
|
+
}, z.core.$loose>>;
|
|
1069
|
+
feedback: z.ZodOptional<z.ZodObject<{
|
|
1070
|
+
sound: z.ZodOptional<z.ZodObject<{
|
|
1071
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1072
|
+
volume: z.ZodDefault<z.ZodNumber>;
|
|
1073
|
+
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
1074
|
+
error: "error";
|
|
1075
|
+
messageReceived: "messageReceived";
|
|
1076
|
+
messageSent: "messageSent";
|
|
1077
|
+
voiceStart: "voiceStart";
|
|
1078
|
+
voiceStop: "voiceStop";
|
|
1079
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
1080
|
+
}, z.core.$loose>>;
|
|
1081
|
+
haptics: z.ZodOptional<z.ZodObject<{
|
|
1082
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1083
|
+
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
1084
|
+
error: "error";
|
|
1085
|
+
messageReceived: "messageReceived";
|
|
1086
|
+
messageSent: "messageSent";
|
|
1087
|
+
voiceStart: "voiceStart";
|
|
1088
|
+
voiceStop: "voiceStop";
|
|
1089
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
1090
|
+
}, z.core.$loose>>;
|
|
1091
|
+
}, z.core.$loose>>;
|
|
1092
|
+
i18n: z.ZodOptional<z.ZodObject<{
|
|
1093
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
1094
|
+
defaultLocale: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodString]>>;
|
|
1095
|
+
availableLocales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1096
|
+
strings: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>]>>;
|
|
1097
|
+
}, z.core.$loose>>;
|
|
1098
|
+
footer: z.ZodOptional<z.ZodObject<{
|
|
1099
|
+
poweredBy: z.ZodOptional<z.ZodObject<{
|
|
1100
|
+
text: z.ZodOptional<z.ZodString>;
|
|
1101
|
+
href: z.ZodOptional<z.ZodURL>;
|
|
1102
|
+
logoUrl: z.ZodOptional<z.ZodURL>;
|
|
1103
|
+
}, z.core.$loose>>;
|
|
1104
|
+
composerDisclaimer: z.ZodOptional<z.ZodString>;
|
|
1105
|
+
}, z.core.$loose>>;
|
|
1106
|
+
features: z.ZodOptional<z.ZodObject<{
|
|
1107
|
+
disableFileUpload: z.ZodDefault<z.ZodBoolean>;
|
|
1108
|
+
voice: z.ZodDefault<z.ZodEnum<{
|
|
1109
|
+
local: "local";
|
|
1110
|
+
server: "server";
|
|
1111
|
+
disabled: "disabled";
|
|
1112
|
+
}>>;
|
|
1113
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1114
|
+
code: z.ZodString;
|
|
1115
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1116
|
+
}, z.core.$loose>]>>>;
|
|
1117
|
+
disableHumanInLoop: z.ZodDefault<z.ZodBoolean>;
|
|
1118
|
+
enableOperatorRequest: z.ZodDefault<z.ZodBoolean>;
|
|
1119
|
+
}, z.core.$loose>>;
|
|
1120
|
+
forms: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
749
1121
|
id: z.ZodString;
|
|
750
1122
|
on: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
751
1123
|
when: z.ZodOptional<z.ZodObject<{
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
1124
|
+
missingContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1125
|
+
pageArea: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
1126
|
+
minMessages: z.ZodOptional<z.ZodNumber>;
|
|
1127
|
+
maxMessages: z.ZodOptional<z.ZodNumber>;
|
|
756
1128
|
}, z.core.$loose>>;
|
|
757
1129
|
fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
1130
|
+
name: z.ZodString;
|
|
1131
|
+
label: z.ZodString;
|
|
1132
|
+
type: z.ZodEnum<{
|
|
1133
|
+
number: "number";
|
|
1134
|
+
url: "url";
|
|
1135
|
+
email: "email";
|
|
1136
|
+
date: "date";
|
|
1137
|
+
text: "text";
|
|
1138
|
+
tel: "tel";
|
|
1139
|
+
time: "time";
|
|
1140
|
+
textarea: "textarea";
|
|
1141
|
+
select: "select";
|
|
1142
|
+
radio: "radio";
|
|
1143
|
+
checkbox: "checkbox";
|
|
1144
|
+
multiselect: "multiselect";
|
|
1145
|
+
}>;
|
|
1146
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
1147
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1148
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
1149
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1150
|
+
value: z.ZodString;
|
|
1151
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1152
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1153
|
+
}, z.core.$loose>>>;
|
|
1154
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
1155
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
1156
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
1157
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
1158
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1159
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1160
|
+
minSelections: z.ZodOptional<z.ZodNumber>;
|
|
1161
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
1162
|
+
}, z.core.$loose>>;
|
|
1163
|
+
allowOther: z.ZodOptional<z.ZodBoolean>;
|
|
1164
|
+
validationHint: z.ZodOptional<z.ZodString>;
|
|
793
1165
|
}, z.core.$loose>>>;
|
|
794
1166
|
title: z.ZodOptional<z.ZodString>;
|
|
795
1167
|
description: z.ZodOptional<z.ZodString>;
|
|
796
1168
|
submitLabel: z.ZodOptional<z.ZodString>;
|
|
797
1169
|
skippable: z.ZodDefault<z.ZodBoolean>;
|
|
798
1170
|
frequency: z.ZodDefault<z.ZodEnum<{
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
1171
|
+
once: "once";
|
|
1172
|
+
conversation: "conversation";
|
|
1173
|
+
always: "always";
|
|
802
1174
|
}>>;
|
|
803
1175
|
mirrorToContext: z.ZodDefault<z.ZodBoolean>;
|
|
804
1176
|
reopenable: z.ZodDefault<z.ZodBoolean>;
|
|
805
1177
|
reviewable: z.ZodDefault<z.ZodBoolean>;
|
|
806
1178
|
defaultLocale: z.ZodOptional<z.ZodString>;
|
|
807
1179
|
translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
name: z.ZodString;
|
|
814
|
-
label: z.ZodOptional<z.ZodString>;
|
|
815
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
816
|
-
validationHint: z.ZodOptional<z.ZodString>;
|
|
817
|
-
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
818
|
-
value: z.ZodString;
|
|
819
|
-
label: z.ZodOptional<z.ZodString>;
|
|
820
|
-
description: z.ZodOptional<z.ZodString>;
|
|
821
|
-
}, z.core.$loose>>>;
|
|
822
|
-
}, z.core.$loose>>>;
|
|
823
|
-
}, z.core.$loose>>>;
|
|
824
|
-
}, z.core.$loose>>;
|
|
825
|
-
type Forms = z.infer<typeof formsSchema>;
|
|
826
|
-
|
|
827
|
-
/**
|
|
828
|
-
* i18n section schemas — locale resolution + per-instance string
|
|
829
|
-
* overrides.
|
|
830
|
-
*
|
|
831
|
-
* The runtime layers three sources to pick the active locale (highest
|
|
832
|
-
* wins): user picker → server-pushed → `locale` field → `defaultLocale`
|
|
833
|
-
* (or `"auto"` → `navigator.language`). `availableLocales` controls the
|
|
834
|
-
* runtime language switcher's option list.
|
|
835
|
-
*/
|
|
836
|
-
|
|
837
|
-
declare const stringsOverrideSchema: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>]>;
|
|
838
|
-
type StringsOverride = z.infer<typeof stringsOverrideSchema>;
|
|
839
|
-
declare const i18nSchema: z.ZodObject<{
|
|
840
|
-
locale: z.ZodOptional<z.ZodString>;
|
|
841
|
-
defaultLocale: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodString]>>;
|
|
842
|
-
availableLocales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
843
|
-
strings: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>]>>;
|
|
844
|
-
}, z.core.$loose>;
|
|
845
|
-
type I18nOptions = z.infer<typeof i18nSchema>;
|
|
846
|
-
|
|
847
|
-
/**
|
|
848
|
-
* Modules section — the Intercom-style "messenger" surface, modeled as a
|
|
849
|
-
* **data-driven, ordered list of tabs**. Each tab picks a UI `layout`, an
|
|
850
|
-
* optional content `category` to scope its content to, and a translatable
|
|
851
|
-
* `label`. Up to 4 tabs; the `chat` layout is the conversation, the rest
|
|
852
|
-
* (`home` / `help` / `news`) render content from the unified content API.
|
|
853
|
-
*
|
|
854
|
-
* One tab → no tab bar (just that content). Zero → an empty state. Only
|
|
855
|
-
* meaningful in `floating` / `drawer` / `modal` modes.
|
|
856
|
-
*
|
|
857
|
-
* The list arrives via the handshake (`config.modules`); each non-chat
|
|
858
|
-
* tab lazy-fetches its content from `GET /content` scoped by its
|
|
859
|
-
* `category`. See `docs/api/messenger-modules.md` + `docs/api/content.md`.
|
|
860
|
-
*/
|
|
861
|
-
|
|
862
|
-
declare const moduleLayoutSchema: z.ZodEnum<{
|
|
863
|
-
home: "home";
|
|
864
|
-
chat: "chat";
|
|
865
|
-
help: "help";
|
|
866
|
-
news: "news";
|
|
867
|
-
}>;
|
|
868
|
-
type ModuleLayout = z.infer<typeof moduleLayoutSchema>;
|
|
869
|
-
declare const moduleSchema: z.ZodObject<{
|
|
870
|
-
label: z.ZodString;
|
|
871
|
-
layout: z.ZodEnum<{
|
|
872
|
-
home: "home";
|
|
873
|
-
chat: "chat";
|
|
874
|
-
help: "help";
|
|
875
|
-
news: "news";
|
|
876
|
-
}>;
|
|
877
|
-
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
878
|
-
id: z.ZodOptional<z.ZodString>;
|
|
879
|
-
brandName: z.ZodOptional<z.ZodString>;
|
|
880
|
-
hideGreeting: z.ZodOptional<z.ZodBoolean>;
|
|
881
|
-
greetingText: z.ZodOptional<z.ZodString>;
|
|
882
|
-
userAvatars: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1180
|
+
locale: z.ZodString;
|
|
1181
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1182
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1183
|
+
submitLabel: z.ZodOptional<z.ZodString>;
|
|
1184
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
883
1185
|
name: z.ZodString;
|
|
884
|
-
|
|
885
|
-
|
|
1186
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1187
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
1188
|
+
validationHint: z.ZodOptional<z.ZodString>;
|
|
1189
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1190
|
+
value: z.ZodString;
|
|
1191
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1192
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1193
|
+
}, z.core.$loose>>>;
|
|
1194
|
+
}, z.core.$loose>>>;
|
|
886
1195
|
}, z.core.$loose>>>;
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
status: z.ZodOptional<z.ZodObject<{
|
|
890
|
-
text: z.ZodOptional<z.ZodString>;
|
|
891
|
-
level: z.ZodOptional<z.ZodString>;
|
|
892
|
-
url: z.ZodOptional<z.ZodString>;
|
|
893
|
-
}, z.core.$strip>>;
|
|
894
|
-
contentBlockTitle: z.ZodOptional<z.ZodString>;
|
|
895
|
-
}, z.core.$loose>;
|
|
896
|
-
type ModuleOptions = z.infer<typeof moduleSchema>;
|
|
897
|
-
declare const modulesSchema: z.ZodArray<z.ZodObject<{
|
|
1196
|
+
}, z.core.$loose>>>;
|
|
1197
|
+
modules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
898
1198
|
label: z.ZodString;
|
|
899
1199
|
layout: z.ZodEnum<{
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
1200
|
+
home: "home";
|
|
1201
|
+
chat: "chat";
|
|
1202
|
+
help: "help";
|
|
1203
|
+
news: "news";
|
|
904
1204
|
}>;
|
|
905
1205
|
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
906
1206
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -908,53 +1208,1632 @@ declare const modulesSchema: z.ZodArray<z.ZodObject<{
|
|
|
908
1208
|
hideGreeting: z.ZodOptional<z.ZodBoolean>;
|
|
909
1209
|
greetingText: z.ZodOptional<z.ZodString>;
|
|
910
1210
|
userAvatars: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
1211
|
+
name: z.ZodString;
|
|
1212
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
1213
|
+
role: z.ZodOptional<z.ZodString>;
|
|
914
1214
|
}, z.core.$loose>>>;
|
|
915
1215
|
hideSearchBar: z.ZodOptional<z.ZodBoolean>;
|
|
916
1216
|
hideRecentConversations: z.ZodOptional<z.ZodBoolean>;
|
|
917
1217
|
status: z.ZodOptional<z.ZodObject<{
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
1218
|
+
text: z.ZodOptional<z.ZodString>;
|
|
1219
|
+
level: z.ZodOptional<z.ZodString>;
|
|
1220
|
+
url: z.ZodOptional<z.ZodString>;
|
|
921
1221
|
}, z.core.$strip>>;
|
|
922
1222
|
contentBlockTitle: z.ZodOptional<z.ZodString>;
|
|
923
|
-
}, z.core.$loose
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
/**
|
|
927
|
-
* Tracking section schema — built-in anonymous usage analytics for the
|
|
928
|
-
* widget owner (utm.gif-style pixel hits). Off by default; a deployment
|
|
929
|
-
* turns it on to get event / page / device / locale insights without
|
|
930
|
-
* wiring its own analytics. No message content or form values ever ride
|
|
931
|
-
* a hit — payload fields pass a static per-event allowlist in the
|
|
932
|
-
* runtime tracker.
|
|
933
|
-
*/
|
|
934
|
-
|
|
935
|
-
declare const trackingSchema: z.ZodObject<{
|
|
1223
|
+
}, z.core.$loose>>>;
|
|
1224
|
+
tracking: z.ZodOptional<z.ZodObject<{
|
|
936
1225
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
937
1226
|
endpoint: z.ZodOptional<z.ZodURL>;
|
|
938
1227
|
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
939
1228
|
token: z.ZodOptional<z.ZodString>;
|
|
1229
|
+
}, z.core.$loose>>;
|
|
940
1230
|
}, z.core.$loose>;
|
|
941
|
-
type
|
|
942
|
-
|
|
1231
|
+
type WidgetSettings = z.infer<typeof widgetSettingsSchema>;
|
|
943
1232
|
/**
|
|
944
|
-
*
|
|
945
|
-
*
|
|
946
|
-
*
|
|
947
|
-
* `
|
|
948
|
-
* `floating`, `behavior.startMinimized` is meaningless in modes that
|
|
949
|
-
* are always open, etc. Returning a per-mode schema lets the
|
|
950
|
-
* dashboard / dev configurator render ONLY the sections that affect
|
|
951
|
-
* the active mode.
|
|
952
|
-
*
|
|
953
|
-
* Filtering is done with Zod's `.pick()` at the section level so the
|
|
954
|
-
* returned schema stays compatible with the configurator's
|
|
955
|
-
* introspection (it's still a `ZodObject`, just narrower).
|
|
1233
|
+
* Full client widget config — connection + widget settings + page-mode
|
|
1234
|
+
* extras. The dashboard / dev configurator typically only edits one
|
|
1235
|
+
* of the two halves at a time (`widgetSettingsSchema` for the dashboard
|
|
1236
|
+
* surface, `connectionConfigSchema` for the developer-facing fields).
|
|
956
1237
|
*/
|
|
957
|
-
|
|
1238
|
+
declare const widgetConfigSchema: z.ZodObject<{
|
|
1239
|
+
widgetId: z.ZodDefault<z.ZodString>;
|
|
1240
|
+
publicKey: z.ZodOptional<z.ZodString>;
|
|
1241
|
+
aiAgentDeploymentId: z.ZodOptional<z.ZodString>;
|
|
1242
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
1243
|
+
agentApiBaseUrl: z.ZodOptional<z.ZodString>;
|
|
1244
|
+
dataApiBaseUrl: z.ZodOptional<z.ZodString>;
|
|
1245
|
+
userContext: z.ZodOptional<z.ZodObject<{
|
|
1246
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1247
|
+
email: z.ZodOptional<z.ZodString>;
|
|
1248
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1249
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
1250
|
+
role: z.ZodOptional<z.ZodString>;
|
|
1251
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
1252
|
+
}, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
1253
|
+
pageContext: z.ZodOptional<z.ZodObject<{
|
|
1254
|
+
area: z.ZodOptional<z.ZodString>;
|
|
1255
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1256
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1257
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1258
|
+
}, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
1259
|
+
endpoints: z.ZodOptional<z.ZodObject<{
|
|
1260
|
+
upload: z.ZodDefault<z.ZodString>;
|
|
1261
|
+
transcribe: z.ZodDefault<z.ZodString>;
|
|
1262
|
+
submitForm: z.ZodDefault<z.ZodString>;
|
|
1263
|
+
}, z.core.$loose>>;
|
|
1264
|
+
debug: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
|
|
1265
|
+
error: "error";
|
|
1266
|
+
off: "off";
|
|
1267
|
+
warn: "warn";
|
|
1268
|
+
info: "info";
|
|
1269
|
+
debug: "debug";
|
|
1270
|
+
trace: "trace";
|
|
1271
|
+
}>]>>;
|
|
1272
|
+
site: z.ZodOptional<z.ZodUnknown>;
|
|
1273
|
+
blocks: z.ZodOptional<z.ZodUnknown>;
|
|
1274
|
+
presentation: z.ZodOptional<z.ZodObject<{
|
|
1275
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
1276
|
+
floating: "floating";
|
|
1277
|
+
inline: "inline";
|
|
1278
|
+
standalone: "standalone";
|
|
1279
|
+
page: "page";
|
|
1280
|
+
modal: "modal";
|
|
1281
|
+
drawer: "drawer";
|
|
1282
|
+
}>>;
|
|
1283
|
+
position: z.ZodDefault<z.ZodEnum<{
|
|
1284
|
+
"bottom-right": "bottom-right";
|
|
1285
|
+
"bottom-left": "bottom-left";
|
|
1286
|
+
"top-right": "top-right";
|
|
1287
|
+
"top-left": "top-left";
|
|
1288
|
+
}>>;
|
|
1289
|
+
iframe: z.ZodDefault<z.ZodBoolean>;
|
|
1290
|
+
size: z.ZodOptional<z.ZodObject<{
|
|
1291
|
+
width: z.ZodOptional<z.ZodString>;
|
|
1292
|
+
height: z.ZodOptional<z.ZodString>;
|
|
1293
|
+
expanded: z.ZodOptional<z.ZodObject<{
|
|
1294
|
+
width: z.ZodOptional<z.ZodString>;
|
|
1295
|
+
height: z.ZodOptional<z.ZodString>;
|
|
1296
|
+
}, z.core.$loose>>;
|
|
1297
|
+
resize: z.ZodOptional<z.ZodObject<{
|
|
1298
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1299
|
+
minWidth: z.ZodOptional<z.ZodString>;
|
|
1300
|
+
maxWidth: z.ZodOptional<z.ZodString>;
|
|
1301
|
+
minHeight: z.ZodOptional<z.ZodString>;
|
|
1302
|
+
maxHeight: z.ZodOptional<z.ZodString>;
|
|
1303
|
+
}, z.core.$loose>>;
|
|
1304
|
+
inset: z.ZodOptional<z.ZodString>;
|
|
1305
|
+
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
1306
|
+
expanded: "expanded";
|
|
1307
|
+
normal: "normal";
|
|
1308
|
+
fullscreen: "fullscreen";
|
|
1309
|
+
auto: "auto";
|
|
1310
|
+
}>>;
|
|
1311
|
+
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
1312
|
+
}, z.core.$loose>>;
|
|
1313
|
+
}, z.core.$loose>>;
|
|
1314
|
+
behavior: z.ZodOptional<z.ZodObject<{
|
|
1315
|
+
startMinimized: z.ZodDefault<z.ZodBoolean>;
|
|
1316
|
+
responseMode: z.ZodDefault<z.ZodEnum<{
|
|
1317
|
+
streaming: "streaming";
|
|
1318
|
+
buffered: "buffered";
|
|
1319
|
+
}>>;
|
|
1320
|
+
showReasoning: z.ZodDefault<z.ZodBoolean>;
|
|
1321
|
+
showToolCalls: z.ZodDefault<z.ZodBoolean>;
|
|
1322
|
+
showSources: z.ZodDefault<z.ZodBoolean>;
|
|
1323
|
+
disableMessageFeedback: z.ZodDefault<z.ZodBoolean>;
|
|
1324
|
+
autoSendSuggestions: z.ZodDefault<z.ZodBoolean>;
|
|
1325
|
+
}, z.core.$loose>>;
|
|
1326
|
+
theme: z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1327
|
+
auto: "auto";
|
|
1328
|
+
light: "light";
|
|
1329
|
+
dark: "dark";
|
|
1330
|
+
}>, z.ZodObject<{
|
|
1331
|
+
accent: z.ZodOptional<z.ZodString>;
|
|
1332
|
+
accentText: z.ZodOptional<z.ZodString>;
|
|
1333
|
+
radius: z.ZodOptional<z.ZodString>;
|
|
1334
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
1335
|
+
contentMaxWidth: z.ZodOptional<z.ZodString>;
|
|
1336
|
+
}, z.core.$loose>]>>;
|
|
1337
|
+
launcher: z.ZodOptional<z.ZodObject<{
|
|
1338
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
1339
|
+
circle: "circle";
|
|
1340
|
+
pill: "pill";
|
|
1341
|
+
bar: "bar";
|
|
1342
|
+
minimal: "minimal";
|
|
1343
|
+
}>>;
|
|
1344
|
+
size: z.ZodDefault<z.ZodEnum<{
|
|
1345
|
+
sm: "sm";
|
|
1346
|
+
md: "md";
|
|
1347
|
+
lg: "lg";
|
|
1348
|
+
}>>;
|
|
1349
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1350
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1351
|
+
hidden: z.ZodDefault<z.ZodBoolean>;
|
|
1352
|
+
callout: z.ZodOptional<z.ZodObject<{
|
|
1353
|
+
text: z.ZodDefault<z.ZodString>;
|
|
1354
|
+
shape: z.ZodDefault<z.ZodEnum<{
|
|
1355
|
+
pill: "pill";
|
|
1356
|
+
bubble: "bubble";
|
|
1357
|
+
callout: "callout";
|
|
1358
|
+
}>>;
|
|
1359
|
+
position: z.ZodDefault<z.ZodEnum<{
|
|
1360
|
+
auto: "auto";
|
|
1361
|
+
horizontal: "horizontal";
|
|
1362
|
+
vertical: "vertical";
|
|
1363
|
+
}>>;
|
|
1364
|
+
delayMs: z.ZodDefault<z.ZodNumber>;
|
|
1365
|
+
autoDismissMs: z.ZodDefault<z.ZodNumber>;
|
|
1366
|
+
animated: z.ZodDefault<z.ZodBoolean>;
|
|
1367
|
+
persistent: z.ZodDefault<z.ZodBoolean>;
|
|
1368
|
+
}, z.core.$loose>>;
|
|
1369
|
+
}, z.core.$loose>>;
|
|
1370
|
+
header: z.ZodOptional<z.ZodObject<{
|
|
1371
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1372
|
+
fullscreen: "fullscreen";
|
|
1373
|
+
theme: "theme";
|
|
1374
|
+
clear: "clear";
|
|
1375
|
+
expand: "expand";
|
|
1376
|
+
sound: "sound";
|
|
1377
|
+
history: "history";
|
|
1378
|
+
language: "language";
|
|
1379
|
+
textSize: "textSize";
|
|
1380
|
+
close: "close";
|
|
1381
|
+
}>>>;
|
|
1382
|
+
}, z.core.$loose>>;
|
|
1383
|
+
composer: z.ZodOptional<z.ZodObject<{
|
|
1384
|
+
sendButton: z.ZodOptional<z.ZodObject<{
|
|
1385
|
+
shape: z.ZodDefault<z.ZodEnum<{
|
|
1386
|
+
circle: "circle";
|
|
1387
|
+
pill: "pill";
|
|
1388
|
+
square: "square";
|
|
1389
|
+
}>>;
|
|
1390
|
+
icon: z.ZodDefault<z.ZodEnum<{
|
|
1391
|
+
arrowUp: "arrowUp";
|
|
1392
|
+
paperPlane: "paperPlane";
|
|
1393
|
+
send: "send";
|
|
1394
|
+
chevron: "chevron";
|
|
1395
|
+
}>>;
|
|
1396
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
1397
|
+
filled: "filled";
|
|
1398
|
+
outline: "outline";
|
|
1399
|
+
ghost: "ghost";
|
|
1400
|
+
}>>;
|
|
1401
|
+
}, z.core.$loose>>;
|
|
1402
|
+
attachments: z.ZodOptional<z.ZodObject<{
|
|
1403
|
+
maxBytes: z.ZodDefault<z.ZodNumber>;
|
|
1404
|
+
maxCount: z.ZodDefault<z.ZodNumber>;
|
|
1405
|
+
accept: z.ZodDefault<z.ZodString>;
|
|
1406
|
+
}, z.core.$loose>>;
|
|
1407
|
+
}, z.core.$loose>>;
|
|
1408
|
+
feedback: z.ZodOptional<z.ZodObject<{
|
|
1409
|
+
sound: z.ZodOptional<z.ZodObject<{
|
|
1410
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1411
|
+
volume: z.ZodDefault<z.ZodNumber>;
|
|
1412
|
+
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
1413
|
+
error: "error";
|
|
1414
|
+
messageReceived: "messageReceived";
|
|
1415
|
+
messageSent: "messageSent";
|
|
1416
|
+
voiceStart: "voiceStart";
|
|
1417
|
+
voiceStop: "voiceStop";
|
|
1418
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
1419
|
+
}, z.core.$loose>>;
|
|
1420
|
+
haptics: z.ZodOptional<z.ZodObject<{
|
|
1421
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1422
|
+
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
1423
|
+
error: "error";
|
|
1424
|
+
messageReceived: "messageReceived";
|
|
1425
|
+
messageSent: "messageSent";
|
|
1426
|
+
voiceStart: "voiceStart";
|
|
1427
|
+
voiceStop: "voiceStop";
|
|
1428
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
1429
|
+
}, z.core.$loose>>;
|
|
1430
|
+
}, z.core.$loose>>;
|
|
1431
|
+
i18n: z.ZodOptional<z.ZodObject<{
|
|
1432
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
1433
|
+
defaultLocale: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodString]>>;
|
|
1434
|
+
availableLocales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1435
|
+
strings: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>]>>;
|
|
1436
|
+
}, z.core.$loose>>;
|
|
1437
|
+
footer: z.ZodOptional<z.ZodObject<{
|
|
1438
|
+
poweredBy: z.ZodOptional<z.ZodObject<{
|
|
1439
|
+
text: z.ZodOptional<z.ZodString>;
|
|
1440
|
+
href: z.ZodOptional<z.ZodURL>;
|
|
1441
|
+
logoUrl: z.ZodOptional<z.ZodURL>;
|
|
1442
|
+
}, z.core.$loose>>;
|
|
1443
|
+
composerDisclaimer: z.ZodOptional<z.ZodString>;
|
|
1444
|
+
}, z.core.$loose>>;
|
|
1445
|
+
features: z.ZodOptional<z.ZodObject<{
|
|
1446
|
+
disableFileUpload: z.ZodDefault<z.ZodBoolean>;
|
|
1447
|
+
voice: z.ZodDefault<z.ZodEnum<{
|
|
1448
|
+
local: "local";
|
|
1449
|
+
server: "server";
|
|
1450
|
+
disabled: "disabled";
|
|
1451
|
+
}>>;
|
|
1452
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1453
|
+
code: z.ZodString;
|
|
1454
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1455
|
+
}, z.core.$loose>]>>>;
|
|
1456
|
+
disableHumanInLoop: z.ZodDefault<z.ZodBoolean>;
|
|
1457
|
+
enableOperatorRequest: z.ZodDefault<z.ZodBoolean>;
|
|
1458
|
+
}, z.core.$loose>>;
|
|
1459
|
+
forms: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1460
|
+
id: z.ZodString;
|
|
1461
|
+
on: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
1462
|
+
when: z.ZodOptional<z.ZodObject<{
|
|
1463
|
+
missingContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1464
|
+
pageArea: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
1465
|
+
minMessages: z.ZodOptional<z.ZodNumber>;
|
|
1466
|
+
maxMessages: z.ZodOptional<z.ZodNumber>;
|
|
1467
|
+
}, z.core.$loose>>;
|
|
1468
|
+
fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1469
|
+
name: z.ZodString;
|
|
1470
|
+
label: z.ZodString;
|
|
1471
|
+
type: z.ZodEnum<{
|
|
1472
|
+
number: "number";
|
|
1473
|
+
url: "url";
|
|
1474
|
+
email: "email";
|
|
1475
|
+
date: "date";
|
|
1476
|
+
text: "text";
|
|
1477
|
+
tel: "tel";
|
|
1478
|
+
time: "time";
|
|
1479
|
+
textarea: "textarea";
|
|
1480
|
+
select: "select";
|
|
1481
|
+
radio: "radio";
|
|
1482
|
+
checkbox: "checkbox";
|
|
1483
|
+
multiselect: "multiselect";
|
|
1484
|
+
}>;
|
|
1485
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
1486
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1487
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
1488
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1489
|
+
value: z.ZodString;
|
|
1490
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1491
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1492
|
+
}, z.core.$loose>>>;
|
|
1493
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
1494
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
1495
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
1496
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
1497
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1498
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1499
|
+
minSelections: z.ZodOptional<z.ZodNumber>;
|
|
1500
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
1501
|
+
}, z.core.$loose>>;
|
|
1502
|
+
allowOther: z.ZodOptional<z.ZodBoolean>;
|
|
1503
|
+
validationHint: z.ZodOptional<z.ZodString>;
|
|
1504
|
+
}, z.core.$loose>>>;
|
|
1505
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1506
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1507
|
+
submitLabel: z.ZodOptional<z.ZodString>;
|
|
1508
|
+
skippable: z.ZodDefault<z.ZodBoolean>;
|
|
1509
|
+
frequency: z.ZodDefault<z.ZodEnum<{
|
|
1510
|
+
once: "once";
|
|
1511
|
+
conversation: "conversation";
|
|
1512
|
+
always: "always";
|
|
1513
|
+
}>>;
|
|
1514
|
+
mirrorToContext: z.ZodDefault<z.ZodBoolean>;
|
|
1515
|
+
reopenable: z.ZodDefault<z.ZodBoolean>;
|
|
1516
|
+
reviewable: z.ZodDefault<z.ZodBoolean>;
|
|
1517
|
+
defaultLocale: z.ZodOptional<z.ZodString>;
|
|
1518
|
+
translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1519
|
+
locale: z.ZodString;
|
|
1520
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1521
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1522
|
+
submitLabel: z.ZodOptional<z.ZodString>;
|
|
1523
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1524
|
+
name: z.ZodString;
|
|
1525
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1526
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
1527
|
+
validationHint: z.ZodOptional<z.ZodString>;
|
|
1528
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1529
|
+
value: z.ZodString;
|
|
1530
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1531
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1532
|
+
}, z.core.$loose>>>;
|
|
1533
|
+
}, z.core.$loose>>>;
|
|
1534
|
+
}, z.core.$loose>>>;
|
|
1535
|
+
}, z.core.$loose>>>;
|
|
1536
|
+
modules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1537
|
+
label: z.ZodString;
|
|
1538
|
+
layout: z.ZodEnum<{
|
|
1539
|
+
home: "home";
|
|
1540
|
+
chat: "chat";
|
|
1541
|
+
help: "help";
|
|
1542
|
+
news: "news";
|
|
1543
|
+
}>;
|
|
1544
|
+
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1545
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1546
|
+
brandName: z.ZodOptional<z.ZodString>;
|
|
1547
|
+
hideGreeting: z.ZodOptional<z.ZodBoolean>;
|
|
1548
|
+
greetingText: z.ZodOptional<z.ZodString>;
|
|
1549
|
+
userAvatars: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1550
|
+
name: z.ZodString;
|
|
1551
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
1552
|
+
role: z.ZodOptional<z.ZodString>;
|
|
1553
|
+
}, z.core.$loose>>>;
|
|
1554
|
+
hideSearchBar: z.ZodOptional<z.ZodBoolean>;
|
|
1555
|
+
hideRecentConversations: z.ZodOptional<z.ZodBoolean>;
|
|
1556
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
1557
|
+
text: z.ZodOptional<z.ZodString>;
|
|
1558
|
+
level: z.ZodOptional<z.ZodString>;
|
|
1559
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1560
|
+
}, z.core.$strip>>;
|
|
1561
|
+
contentBlockTitle: z.ZodOptional<z.ZodString>;
|
|
1562
|
+
}, z.core.$loose>>>;
|
|
1563
|
+
tracking: z.ZodOptional<z.ZodObject<{
|
|
1564
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1565
|
+
endpoint: z.ZodOptional<z.ZodURL>;
|
|
1566
|
+
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
1567
|
+
token: z.ZodOptional<z.ZodString>;
|
|
1568
|
+
}, z.core.$loose>>;
|
|
1569
|
+
}, z.core.$loose>;
|
|
1570
|
+
type WidgetConfig = z.infer<typeof widgetConfigSchema>;
|
|
1571
|
+
/**
|
|
1572
|
+
* Partial schema — used when validating server-pushed patches that
|
|
1573
|
+
* override individual fields on top of the resolved config. Every field
|
|
1574
|
+
* becomes optional; defaults are NOT applied.
|
|
1575
|
+
*/
|
|
1576
|
+
declare const widgetConfigPartialSchema: z.ZodObject<{
|
|
1577
|
+
widgetId: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
1578
|
+
publicKey: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1579
|
+
aiAgentDeploymentId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1580
|
+
baseUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1581
|
+
agentApiBaseUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1582
|
+
dataApiBaseUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1583
|
+
userContext: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1584
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1585
|
+
email: z.ZodOptional<z.ZodString>;
|
|
1586
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1587
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
1588
|
+
role: z.ZodOptional<z.ZodString>;
|
|
1589
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
1590
|
+
}, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>>;
|
|
1591
|
+
pageContext: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1592
|
+
area: z.ZodOptional<z.ZodString>;
|
|
1593
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1594
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1595
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1596
|
+
}, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>>;
|
|
1597
|
+
endpoints: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1598
|
+
upload: z.ZodDefault<z.ZodString>;
|
|
1599
|
+
transcribe: z.ZodDefault<z.ZodString>;
|
|
1600
|
+
submitForm: z.ZodDefault<z.ZodString>;
|
|
1601
|
+
}, z.core.$loose>>>;
|
|
1602
|
+
debug: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
|
|
1603
|
+
error: "error";
|
|
1604
|
+
off: "off";
|
|
1605
|
+
warn: "warn";
|
|
1606
|
+
info: "info";
|
|
1607
|
+
debug: "debug";
|
|
1608
|
+
trace: "trace";
|
|
1609
|
+
}>]>>>;
|
|
1610
|
+
site: z.ZodOptional<z.ZodOptional<z.ZodUnknown>>;
|
|
1611
|
+
blocks: z.ZodOptional<z.ZodOptional<z.ZodUnknown>>;
|
|
1612
|
+
presentation: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1613
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
1614
|
+
floating: "floating";
|
|
1615
|
+
inline: "inline";
|
|
1616
|
+
standalone: "standalone";
|
|
1617
|
+
page: "page";
|
|
1618
|
+
modal: "modal";
|
|
1619
|
+
drawer: "drawer";
|
|
1620
|
+
}>>;
|
|
1621
|
+
position: z.ZodDefault<z.ZodEnum<{
|
|
1622
|
+
"bottom-right": "bottom-right";
|
|
1623
|
+
"bottom-left": "bottom-left";
|
|
1624
|
+
"top-right": "top-right";
|
|
1625
|
+
"top-left": "top-left";
|
|
1626
|
+
}>>;
|
|
1627
|
+
iframe: z.ZodDefault<z.ZodBoolean>;
|
|
1628
|
+
size: z.ZodOptional<z.ZodObject<{
|
|
1629
|
+
width: z.ZodOptional<z.ZodString>;
|
|
1630
|
+
height: z.ZodOptional<z.ZodString>;
|
|
1631
|
+
expanded: z.ZodOptional<z.ZodObject<{
|
|
1632
|
+
width: z.ZodOptional<z.ZodString>;
|
|
1633
|
+
height: z.ZodOptional<z.ZodString>;
|
|
1634
|
+
}, z.core.$loose>>;
|
|
1635
|
+
resize: z.ZodOptional<z.ZodObject<{
|
|
1636
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1637
|
+
minWidth: z.ZodOptional<z.ZodString>;
|
|
1638
|
+
maxWidth: z.ZodOptional<z.ZodString>;
|
|
1639
|
+
minHeight: z.ZodOptional<z.ZodString>;
|
|
1640
|
+
maxHeight: z.ZodOptional<z.ZodString>;
|
|
1641
|
+
}, z.core.$loose>>;
|
|
1642
|
+
inset: z.ZodOptional<z.ZodString>;
|
|
1643
|
+
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
1644
|
+
expanded: "expanded";
|
|
1645
|
+
normal: "normal";
|
|
1646
|
+
fullscreen: "fullscreen";
|
|
1647
|
+
auto: "auto";
|
|
1648
|
+
}>>;
|
|
1649
|
+
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
1650
|
+
}, z.core.$loose>>;
|
|
1651
|
+
}, z.core.$loose>>>;
|
|
1652
|
+
behavior: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1653
|
+
startMinimized: z.ZodDefault<z.ZodBoolean>;
|
|
1654
|
+
responseMode: z.ZodDefault<z.ZodEnum<{
|
|
1655
|
+
streaming: "streaming";
|
|
1656
|
+
buffered: "buffered";
|
|
1657
|
+
}>>;
|
|
1658
|
+
showReasoning: z.ZodDefault<z.ZodBoolean>;
|
|
1659
|
+
showToolCalls: z.ZodDefault<z.ZodBoolean>;
|
|
1660
|
+
showSources: z.ZodDefault<z.ZodBoolean>;
|
|
1661
|
+
disableMessageFeedback: z.ZodDefault<z.ZodBoolean>;
|
|
1662
|
+
autoSendSuggestions: z.ZodDefault<z.ZodBoolean>;
|
|
1663
|
+
}, z.core.$loose>>>;
|
|
1664
|
+
theme: z.ZodOptional<z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1665
|
+
auto: "auto";
|
|
1666
|
+
light: "light";
|
|
1667
|
+
dark: "dark";
|
|
1668
|
+
}>, z.ZodObject<{
|
|
1669
|
+
accent: z.ZodOptional<z.ZodString>;
|
|
1670
|
+
accentText: z.ZodOptional<z.ZodString>;
|
|
1671
|
+
radius: z.ZodOptional<z.ZodString>;
|
|
1672
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
1673
|
+
contentMaxWidth: z.ZodOptional<z.ZodString>;
|
|
1674
|
+
}, z.core.$loose>]>>>;
|
|
1675
|
+
launcher: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1676
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
1677
|
+
circle: "circle";
|
|
1678
|
+
pill: "pill";
|
|
1679
|
+
bar: "bar";
|
|
1680
|
+
minimal: "minimal";
|
|
1681
|
+
}>>;
|
|
1682
|
+
size: z.ZodDefault<z.ZodEnum<{
|
|
1683
|
+
sm: "sm";
|
|
1684
|
+
md: "md";
|
|
1685
|
+
lg: "lg";
|
|
1686
|
+
}>>;
|
|
1687
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1688
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1689
|
+
hidden: z.ZodDefault<z.ZodBoolean>;
|
|
1690
|
+
callout: z.ZodOptional<z.ZodObject<{
|
|
1691
|
+
text: z.ZodDefault<z.ZodString>;
|
|
1692
|
+
shape: z.ZodDefault<z.ZodEnum<{
|
|
1693
|
+
pill: "pill";
|
|
1694
|
+
bubble: "bubble";
|
|
1695
|
+
callout: "callout";
|
|
1696
|
+
}>>;
|
|
1697
|
+
position: z.ZodDefault<z.ZodEnum<{
|
|
1698
|
+
auto: "auto";
|
|
1699
|
+
horizontal: "horizontal";
|
|
1700
|
+
vertical: "vertical";
|
|
1701
|
+
}>>;
|
|
1702
|
+
delayMs: z.ZodDefault<z.ZodNumber>;
|
|
1703
|
+
autoDismissMs: z.ZodDefault<z.ZodNumber>;
|
|
1704
|
+
animated: z.ZodDefault<z.ZodBoolean>;
|
|
1705
|
+
persistent: z.ZodDefault<z.ZodBoolean>;
|
|
1706
|
+
}, z.core.$loose>>;
|
|
1707
|
+
}, z.core.$loose>>>;
|
|
1708
|
+
header: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1709
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1710
|
+
fullscreen: "fullscreen";
|
|
1711
|
+
theme: "theme";
|
|
1712
|
+
clear: "clear";
|
|
1713
|
+
expand: "expand";
|
|
1714
|
+
sound: "sound";
|
|
1715
|
+
history: "history";
|
|
1716
|
+
language: "language";
|
|
1717
|
+
textSize: "textSize";
|
|
1718
|
+
close: "close";
|
|
1719
|
+
}>>>;
|
|
1720
|
+
}, z.core.$loose>>>;
|
|
1721
|
+
composer: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1722
|
+
sendButton: z.ZodOptional<z.ZodObject<{
|
|
1723
|
+
shape: z.ZodDefault<z.ZodEnum<{
|
|
1724
|
+
circle: "circle";
|
|
1725
|
+
pill: "pill";
|
|
1726
|
+
square: "square";
|
|
1727
|
+
}>>;
|
|
1728
|
+
icon: z.ZodDefault<z.ZodEnum<{
|
|
1729
|
+
arrowUp: "arrowUp";
|
|
1730
|
+
paperPlane: "paperPlane";
|
|
1731
|
+
send: "send";
|
|
1732
|
+
chevron: "chevron";
|
|
1733
|
+
}>>;
|
|
1734
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
1735
|
+
filled: "filled";
|
|
1736
|
+
outline: "outline";
|
|
1737
|
+
ghost: "ghost";
|
|
1738
|
+
}>>;
|
|
1739
|
+
}, z.core.$loose>>;
|
|
1740
|
+
attachments: z.ZodOptional<z.ZodObject<{
|
|
1741
|
+
maxBytes: z.ZodDefault<z.ZodNumber>;
|
|
1742
|
+
maxCount: z.ZodDefault<z.ZodNumber>;
|
|
1743
|
+
accept: z.ZodDefault<z.ZodString>;
|
|
1744
|
+
}, z.core.$loose>>;
|
|
1745
|
+
}, z.core.$loose>>>;
|
|
1746
|
+
feedback: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1747
|
+
sound: z.ZodOptional<z.ZodObject<{
|
|
1748
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1749
|
+
volume: z.ZodDefault<z.ZodNumber>;
|
|
1750
|
+
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
1751
|
+
error: "error";
|
|
1752
|
+
messageReceived: "messageReceived";
|
|
1753
|
+
messageSent: "messageSent";
|
|
1754
|
+
voiceStart: "voiceStart";
|
|
1755
|
+
voiceStop: "voiceStop";
|
|
1756
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
1757
|
+
}, z.core.$loose>>;
|
|
1758
|
+
haptics: z.ZodOptional<z.ZodObject<{
|
|
1759
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1760
|
+
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
1761
|
+
error: "error";
|
|
1762
|
+
messageReceived: "messageReceived";
|
|
1763
|
+
messageSent: "messageSent";
|
|
1764
|
+
voiceStart: "voiceStart";
|
|
1765
|
+
voiceStop: "voiceStop";
|
|
1766
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
1767
|
+
}, z.core.$loose>>;
|
|
1768
|
+
}, z.core.$loose>>>;
|
|
1769
|
+
i18n: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1770
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
1771
|
+
defaultLocale: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodString]>>;
|
|
1772
|
+
availableLocales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1773
|
+
strings: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>]>>;
|
|
1774
|
+
}, z.core.$loose>>>;
|
|
1775
|
+
footer: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1776
|
+
poweredBy: z.ZodOptional<z.ZodObject<{
|
|
1777
|
+
text: z.ZodOptional<z.ZodString>;
|
|
1778
|
+
href: z.ZodOptional<z.ZodURL>;
|
|
1779
|
+
logoUrl: z.ZodOptional<z.ZodURL>;
|
|
1780
|
+
}, z.core.$loose>>;
|
|
1781
|
+
composerDisclaimer: z.ZodOptional<z.ZodString>;
|
|
1782
|
+
}, z.core.$loose>>>;
|
|
1783
|
+
features: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1784
|
+
disableFileUpload: z.ZodDefault<z.ZodBoolean>;
|
|
1785
|
+
voice: z.ZodDefault<z.ZodEnum<{
|
|
1786
|
+
local: "local";
|
|
1787
|
+
server: "server";
|
|
1788
|
+
disabled: "disabled";
|
|
1789
|
+
}>>;
|
|
1790
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1791
|
+
code: z.ZodString;
|
|
1792
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1793
|
+
}, z.core.$loose>]>>>;
|
|
1794
|
+
disableHumanInLoop: z.ZodDefault<z.ZodBoolean>;
|
|
1795
|
+
enableOperatorRequest: z.ZodDefault<z.ZodBoolean>;
|
|
1796
|
+
}, z.core.$loose>>>;
|
|
1797
|
+
forms: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1798
|
+
id: z.ZodString;
|
|
1799
|
+
on: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
1800
|
+
when: z.ZodOptional<z.ZodObject<{
|
|
1801
|
+
missingContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1802
|
+
pageArea: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
1803
|
+
minMessages: z.ZodOptional<z.ZodNumber>;
|
|
1804
|
+
maxMessages: z.ZodOptional<z.ZodNumber>;
|
|
1805
|
+
}, z.core.$loose>>;
|
|
1806
|
+
fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1807
|
+
name: z.ZodString;
|
|
1808
|
+
label: z.ZodString;
|
|
1809
|
+
type: z.ZodEnum<{
|
|
1810
|
+
number: "number";
|
|
1811
|
+
url: "url";
|
|
1812
|
+
email: "email";
|
|
1813
|
+
date: "date";
|
|
1814
|
+
text: "text";
|
|
1815
|
+
tel: "tel";
|
|
1816
|
+
time: "time";
|
|
1817
|
+
textarea: "textarea";
|
|
1818
|
+
select: "select";
|
|
1819
|
+
radio: "radio";
|
|
1820
|
+
checkbox: "checkbox";
|
|
1821
|
+
multiselect: "multiselect";
|
|
1822
|
+
}>;
|
|
1823
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
1824
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1825
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
1826
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1827
|
+
value: z.ZodString;
|
|
1828
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1829
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1830
|
+
}, z.core.$loose>>>;
|
|
1831
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
1832
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
1833
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
1834
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
1835
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
1836
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1837
|
+
minSelections: z.ZodOptional<z.ZodNumber>;
|
|
1838
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
1839
|
+
}, z.core.$loose>>;
|
|
1840
|
+
allowOther: z.ZodOptional<z.ZodBoolean>;
|
|
1841
|
+
validationHint: z.ZodOptional<z.ZodString>;
|
|
1842
|
+
}, z.core.$loose>>>;
|
|
1843
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1844
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1845
|
+
submitLabel: z.ZodOptional<z.ZodString>;
|
|
1846
|
+
skippable: z.ZodDefault<z.ZodBoolean>;
|
|
1847
|
+
frequency: z.ZodDefault<z.ZodEnum<{
|
|
1848
|
+
once: "once";
|
|
1849
|
+
conversation: "conversation";
|
|
1850
|
+
always: "always";
|
|
1851
|
+
}>>;
|
|
1852
|
+
mirrorToContext: z.ZodDefault<z.ZodBoolean>;
|
|
1853
|
+
reopenable: z.ZodDefault<z.ZodBoolean>;
|
|
1854
|
+
reviewable: z.ZodDefault<z.ZodBoolean>;
|
|
1855
|
+
defaultLocale: z.ZodOptional<z.ZodString>;
|
|
1856
|
+
translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1857
|
+
locale: z.ZodString;
|
|
1858
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1859
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1860
|
+
submitLabel: z.ZodOptional<z.ZodString>;
|
|
1861
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1862
|
+
name: z.ZodString;
|
|
1863
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1864
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
1865
|
+
validationHint: z.ZodOptional<z.ZodString>;
|
|
1866
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1867
|
+
value: z.ZodString;
|
|
1868
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1869
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1870
|
+
}, z.core.$loose>>>;
|
|
1871
|
+
}, z.core.$loose>>>;
|
|
1872
|
+
}, z.core.$loose>>>;
|
|
1873
|
+
}, z.core.$loose>>>>;
|
|
1874
|
+
modules: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1875
|
+
label: z.ZodString;
|
|
1876
|
+
layout: z.ZodEnum<{
|
|
1877
|
+
home: "home";
|
|
1878
|
+
chat: "chat";
|
|
1879
|
+
help: "help";
|
|
1880
|
+
news: "news";
|
|
1881
|
+
}>;
|
|
1882
|
+
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1883
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1884
|
+
brandName: z.ZodOptional<z.ZodString>;
|
|
1885
|
+
hideGreeting: z.ZodOptional<z.ZodBoolean>;
|
|
1886
|
+
greetingText: z.ZodOptional<z.ZodString>;
|
|
1887
|
+
userAvatars: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1888
|
+
name: z.ZodString;
|
|
1889
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
1890
|
+
role: z.ZodOptional<z.ZodString>;
|
|
1891
|
+
}, z.core.$loose>>>;
|
|
1892
|
+
hideSearchBar: z.ZodOptional<z.ZodBoolean>;
|
|
1893
|
+
hideRecentConversations: z.ZodOptional<z.ZodBoolean>;
|
|
1894
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
1895
|
+
text: z.ZodOptional<z.ZodString>;
|
|
1896
|
+
level: z.ZodOptional<z.ZodString>;
|
|
1897
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1898
|
+
}, z.core.$strip>>;
|
|
1899
|
+
contentBlockTitle: z.ZodOptional<z.ZodString>;
|
|
1900
|
+
}, z.core.$loose>>>>;
|
|
1901
|
+
tracking: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1902
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1903
|
+
endpoint: z.ZodOptional<z.ZodURL>;
|
|
1904
|
+
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
1905
|
+
token: z.ZodOptional<z.ZodString>;
|
|
1906
|
+
}, z.core.$loose>>>;
|
|
1907
|
+
}, z.core.$loose>;
|
|
1908
|
+
type WidgetConfigPartial = z.infer<typeof widgetConfigPartialSchema>;
|
|
1909
|
+
declare const widgetSettingsPartialSchema: z.ZodObject<{
|
|
1910
|
+
presentation: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1911
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
1912
|
+
floating: "floating";
|
|
1913
|
+
inline: "inline";
|
|
1914
|
+
standalone: "standalone";
|
|
1915
|
+
page: "page";
|
|
1916
|
+
modal: "modal";
|
|
1917
|
+
drawer: "drawer";
|
|
1918
|
+
}>>;
|
|
1919
|
+
position: z.ZodDefault<z.ZodEnum<{
|
|
1920
|
+
"bottom-right": "bottom-right";
|
|
1921
|
+
"bottom-left": "bottom-left";
|
|
1922
|
+
"top-right": "top-right";
|
|
1923
|
+
"top-left": "top-left";
|
|
1924
|
+
}>>;
|
|
1925
|
+
iframe: z.ZodDefault<z.ZodBoolean>;
|
|
1926
|
+
size: z.ZodOptional<z.ZodObject<{
|
|
1927
|
+
width: z.ZodOptional<z.ZodString>;
|
|
1928
|
+
height: z.ZodOptional<z.ZodString>;
|
|
1929
|
+
expanded: z.ZodOptional<z.ZodObject<{
|
|
1930
|
+
width: z.ZodOptional<z.ZodString>;
|
|
1931
|
+
height: z.ZodOptional<z.ZodString>;
|
|
1932
|
+
}, z.core.$loose>>;
|
|
1933
|
+
resize: z.ZodOptional<z.ZodObject<{
|
|
1934
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1935
|
+
minWidth: z.ZodOptional<z.ZodString>;
|
|
1936
|
+
maxWidth: z.ZodOptional<z.ZodString>;
|
|
1937
|
+
minHeight: z.ZodOptional<z.ZodString>;
|
|
1938
|
+
maxHeight: z.ZodOptional<z.ZodString>;
|
|
1939
|
+
}, z.core.$loose>>;
|
|
1940
|
+
inset: z.ZodOptional<z.ZodString>;
|
|
1941
|
+
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
1942
|
+
expanded: "expanded";
|
|
1943
|
+
normal: "normal";
|
|
1944
|
+
fullscreen: "fullscreen";
|
|
1945
|
+
auto: "auto";
|
|
1946
|
+
}>>;
|
|
1947
|
+
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
1948
|
+
}, z.core.$loose>>;
|
|
1949
|
+
}, z.core.$loose>>>;
|
|
1950
|
+
behavior: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1951
|
+
startMinimized: z.ZodDefault<z.ZodBoolean>;
|
|
1952
|
+
responseMode: z.ZodDefault<z.ZodEnum<{
|
|
1953
|
+
streaming: "streaming";
|
|
1954
|
+
buffered: "buffered";
|
|
1955
|
+
}>>;
|
|
1956
|
+
showReasoning: z.ZodDefault<z.ZodBoolean>;
|
|
1957
|
+
showToolCalls: z.ZodDefault<z.ZodBoolean>;
|
|
1958
|
+
showSources: z.ZodDefault<z.ZodBoolean>;
|
|
1959
|
+
disableMessageFeedback: z.ZodDefault<z.ZodBoolean>;
|
|
1960
|
+
autoSendSuggestions: z.ZodDefault<z.ZodBoolean>;
|
|
1961
|
+
}, z.core.$loose>>>;
|
|
1962
|
+
theme: z.ZodOptional<z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1963
|
+
auto: "auto";
|
|
1964
|
+
light: "light";
|
|
1965
|
+
dark: "dark";
|
|
1966
|
+
}>, z.ZodObject<{
|
|
1967
|
+
accent: z.ZodOptional<z.ZodString>;
|
|
1968
|
+
accentText: z.ZodOptional<z.ZodString>;
|
|
1969
|
+
radius: z.ZodOptional<z.ZodString>;
|
|
1970
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
1971
|
+
contentMaxWidth: z.ZodOptional<z.ZodString>;
|
|
1972
|
+
}, z.core.$loose>]>>>;
|
|
1973
|
+
launcher: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1974
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
1975
|
+
circle: "circle";
|
|
1976
|
+
pill: "pill";
|
|
1977
|
+
bar: "bar";
|
|
1978
|
+
minimal: "minimal";
|
|
1979
|
+
}>>;
|
|
1980
|
+
size: z.ZodDefault<z.ZodEnum<{
|
|
1981
|
+
sm: "sm";
|
|
1982
|
+
md: "md";
|
|
1983
|
+
lg: "lg";
|
|
1984
|
+
}>>;
|
|
1985
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1986
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1987
|
+
hidden: z.ZodDefault<z.ZodBoolean>;
|
|
1988
|
+
callout: z.ZodOptional<z.ZodObject<{
|
|
1989
|
+
text: z.ZodDefault<z.ZodString>;
|
|
1990
|
+
shape: z.ZodDefault<z.ZodEnum<{
|
|
1991
|
+
pill: "pill";
|
|
1992
|
+
bubble: "bubble";
|
|
1993
|
+
callout: "callout";
|
|
1994
|
+
}>>;
|
|
1995
|
+
position: z.ZodDefault<z.ZodEnum<{
|
|
1996
|
+
auto: "auto";
|
|
1997
|
+
horizontal: "horizontal";
|
|
1998
|
+
vertical: "vertical";
|
|
1999
|
+
}>>;
|
|
2000
|
+
delayMs: z.ZodDefault<z.ZodNumber>;
|
|
2001
|
+
autoDismissMs: z.ZodDefault<z.ZodNumber>;
|
|
2002
|
+
animated: z.ZodDefault<z.ZodBoolean>;
|
|
2003
|
+
persistent: z.ZodDefault<z.ZodBoolean>;
|
|
2004
|
+
}, z.core.$loose>>;
|
|
2005
|
+
}, z.core.$loose>>>;
|
|
2006
|
+
header: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2007
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
2008
|
+
fullscreen: "fullscreen";
|
|
2009
|
+
theme: "theme";
|
|
2010
|
+
clear: "clear";
|
|
2011
|
+
expand: "expand";
|
|
2012
|
+
sound: "sound";
|
|
2013
|
+
history: "history";
|
|
2014
|
+
language: "language";
|
|
2015
|
+
textSize: "textSize";
|
|
2016
|
+
close: "close";
|
|
2017
|
+
}>>>;
|
|
2018
|
+
}, z.core.$loose>>>;
|
|
2019
|
+
composer: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2020
|
+
sendButton: z.ZodOptional<z.ZodObject<{
|
|
2021
|
+
shape: z.ZodDefault<z.ZodEnum<{
|
|
2022
|
+
circle: "circle";
|
|
2023
|
+
pill: "pill";
|
|
2024
|
+
square: "square";
|
|
2025
|
+
}>>;
|
|
2026
|
+
icon: z.ZodDefault<z.ZodEnum<{
|
|
2027
|
+
arrowUp: "arrowUp";
|
|
2028
|
+
paperPlane: "paperPlane";
|
|
2029
|
+
send: "send";
|
|
2030
|
+
chevron: "chevron";
|
|
2031
|
+
}>>;
|
|
2032
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
2033
|
+
filled: "filled";
|
|
2034
|
+
outline: "outline";
|
|
2035
|
+
ghost: "ghost";
|
|
2036
|
+
}>>;
|
|
2037
|
+
}, z.core.$loose>>;
|
|
2038
|
+
attachments: z.ZodOptional<z.ZodObject<{
|
|
2039
|
+
maxBytes: z.ZodDefault<z.ZodNumber>;
|
|
2040
|
+
maxCount: z.ZodDefault<z.ZodNumber>;
|
|
2041
|
+
accept: z.ZodDefault<z.ZodString>;
|
|
2042
|
+
}, z.core.$loose>>;
|
|
2043
|
+
}, z.core.$loose>>>;
|
|
2044
|
+
feedback: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2045
|
+
sound: z.ZodOptional<z.ZodObject<{
|
|
2046
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2047
|
+
volume: z.ZodDefault<z.ZodNumber>;
|
|
2048
|
+
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
2049
|
+
error: "error";
|
|
2050
|
+
messageReceived: "messageReceived";
|
|
2051
|
+
messageSent: "messageSent";
|
|
2052
|
+
voiceStart: "voiceStart";
|
|
2053
|
+
voiceStop: "voiceStop";
|
|
2054
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
2055
|
+
}, z.core.$loose>>;
|
|
2056
|
+
haptics: z.ZodOptional<z.ZodObject<{
|
|
2057
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2058
|
+
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
2059
|
+
error: "error";
|
|
2060
|
+
messageReceived: "messageReceived";
|
|
2061
|
+
messageSent: "messageSent";
|
|
2062
|
+
voiceStart: "voiceStart";
|
|
2063
|
+
voiceStop: "voiceStop";
|
|
2064
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
2065
|
+
}, z.core.$loose>>;
|
|
2066
|
+
}, z.core.$loose>>>;
|
|
2067
|
+
i18n: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2068
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
2069
|
+
defaultLocale: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodString]>>;
|
|
2070
|
+
availableLocales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2071
|
+
strings: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>]>>;
|
|
2072
|
+
}, z.core.$loose>>>;
|
|
2073
|
+
footer: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2074
|
+
poweredBy: z.ZodOptional<z.ZodObject<{
|
|
2075
|
+
text: z.ZodOptional<z.ZodString>;
|
|
2076
|
+
href: z.ZodOptional<z.ZodURL>;
|
|
2077
|
+
logoUrl: z.ZodOptional<z.ZodURL>;
|
|
2078
|
+
}, z.core.$loose>>;
|
|
2079
|
+
composerDisclaimer: z.ZodOptional<z.ZodString>;
|
|
2080
|
+
}, z.core.$loose>>>;
|
|
2081
|
+
features: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2082
|
+
disableFileUpload: z.ZodDefault<z.ZodBoolean>;
|
|
2083
|
+
voice: z.ZodDefault<z.ZodEnum<{
|
|
2084
|
+
local: "local";
|
|
2085
|
+
server: "server";
|
|
2086
|
+
disabled: "disabled";
|
|
2087
|
+
}>>;
|
|
2088
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
2089
|
+
code: z.ZodString;
|
|
2090
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2091
|
+
}, z.core.$loose>]>>>;
|
|
2092
|
+
disableHumanInLoop: z.ZodDefault<z.ZodBoolean>;
|
|
2093
|
+
enableOperatorRequest: z.ZodDefault<z.ZodBoolean>;
|
|
2094
|
+
}, z.core.$loose>>>;
|
|
2095
|
+
forms: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2096
|
+
id: z.ZodString;
|
|
2097
|
+
on: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
2098
|
+
when: z.ZodOptional<z.ZodObject<{
|
|
2099
|
+
missingContext: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2100
|
+
pageArea: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
2101
|
+
minMessages: z.ZodOptional<z.ZodNumber>;
|
|
2102
|
+
maxMessages: z.ZodOptional<z.ZodNumber>;
|
|
2103
|
+
}, z.core.$loose>>;
|
|
2104
|
+
fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2105
|
+
name: z.ZodString;
|
|
2106
|
+
label: z.ZodString;
|
|
2107
|
+
type: z.ZodEnum<{
|
|
2108
|
+
number: "number";
|
|
2109
|
+
url: "url";
|
|
2110
|
+
email: "email";
|
|
2111
|
+
date: "date";
|
|
2112
|
+
text: "text";
|
|
2113
|
+
tel: "tel";
|
|
2114
|
+
time: "time";
|
|
2115
|
+
textarea: "textarea";
|
|
2116
|
+
select: "select";
|
|
2117
|
+
radio: "radio";
|
|
2118
|
+
checkbox: "checkbox";
|
|
2119
|
+
multiselect: "multiselect";
|
|
2120
|
+
}>;
|
|
2121
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
2122
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
2123
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
2124
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2125
|
+
value: z.ZodString;
|
|
2126
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2127
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2128
|
+
}, z.core.$loose>>>;
|
|
2129
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
2130
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
2131
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
2132
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
2133
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
2134
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
2135
|
+
minSelections: z.ZodOptional<z.ZodNumber>;
|
|
2136
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
2137
|
+
}, z.core.$loose>>;
|
|
2138
|
+
allowOther: z.ZodOptional<z.ZodBoolean>;
|
|
2139
|
+
validationHint: z.ZodOptional<z.ZodString>;
|
|
2140
|
+
}, z.core.$loose>>>;
|
|
2141
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2142
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2143
|
+
submitLabel: z.ZodOptional<z.ZodString>;
|
|
2144
|
+
skippable: z.ZodDefault<z.ZodBoolean>;
|
|
2145
|
+
frequency: z.ZodDefault<z.ZodEnum<{
|
|
2146
|
+
once: "once";
|
|
2147
|
+
conversation: "conversation";
|
|
2148
|
+
always: "always";
|
|
2149
|
+
}>>;
|
|
2150
|
+
mirrorToContext: z.ZodDefault<z.ZodBoolean>;
|
|
2151
|
+
reopenable: z.ZodDefault<z.ZodBoolean>;
|
|
2152
|
+
reviewable: z.ZodDefault<z.ZodBoolean>;
|
|
2153
|
+
defaultLocale: z.ZodOptional<z.ZodString>;
|
|
2154
|
+
translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2155
|
+
locale: z.ZodString;
|
|
2156
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2157
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2158
|
+
submitLabel: z.ZodOptional<z.ZodString>;
|
|
2159
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2160
|
+
name: z.ZodString;
|
|
2161
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2162
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
2163
|
+
validationHint: z.ZodOptional<z.ZodString>;
|
|
2164
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2165
|
+
value: z.ZodString;
|
|
2166
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2167
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2168
|
+
}, z.core.$loose>>>;
|
|
2169
|
+
}, z.core.$loose>>>;
|
|
2170
|
+
}, z.core.$loose>>>;
|
|
2171
|
+
}, z.core.$loose>>>>;
|
|
2172
|
+
modules: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2173
|
+
label: z.ZodString;
|
|
2174
|
+
layout: z.ZodEnum<{
|
|
2175
|
+
home: "home";
|
|
2176
|
+
chat: "chat";
|
|
2177
|
+
help: "help";
|
|
2178
|
+
news: "news";
|
|
2179
|
+
}>;
|
|
2180
|
+
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2181
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2182
|
+
brandName: z.ZodOptional<z.ZodString>;
|
|
2183
|
+
hideGreeting: z.ZodOptional<z.ZodBoolean>;
|
|
2184
|
+
greetingText: z.ZodOptional<z.ZodString>;
|
|
2185
|
+
userAvatars: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2186
|
+
name: z.ZodString;
|
|
2187
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
2188
|
+
role: z.ZodOptional<z.ZodString>;
|
|
2189
|
+
}, z.core.$loose>>>;
|
|
2190
|
+
hideSearchBar: z.ZodOptional<z.ZodBoolean>;
|
|
2191
|
+
hideRecentConversations: z.ZodOptional<z.ZodBoolean>;
|
|
2192
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
2193
|
+
text: z.ZodOptional<z.ZodString>;
|
|
2194
|
+
level: z.ZodOptional<z.ZodString>;
|
|
2195
|
+
url: z.ZodOptional<z.ZodString>;
|
|
2196
|
+
}, z.core.$strip>>;
|
|
2197
|
+
contentBlockTitle: z.ZodOptional<z.ZodString>;
|
|
2198
|
+
}, z.core.$loose>>>>;
|
|
2199
|
+
tracking: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2200
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2201
|
+
endpoint: z.ZodOptional<z.ZodURL>;
|
|
2202
|
+
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
2203
|
+
token: z.ZodOptional<z.ZodString>;
|
|
2204
|
+
}, z.core.$loose>>>;
|
|
2205
|
+
}, z.core.$loose>;
|
|
2206
|
+
type WidgetSettingsPartial = z.infer<typeof widgetSettingsPartialSchema>;
|
|
2207
|
+
declare const connectionConfigPartialSchema: z.ZodObject<{
|
|
2208
|
+
widgetId: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
2209
|
+
publicKey: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2210
|
+
aiAgentDeploymentId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2211
|
+
baseUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2212
|
+
agentApiBaseUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2213
|
+
dataApiBaseUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2214
|
+
userContext: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2215
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2216
|
+
email: z.ZodOptional<z.ZodString>;
|
|
2217
|
+
name: z.ZodOptional<z.ZodString>;
|
|
2218
|
+
plan: z.ZodOptional<z.ZodString>;
|
|
2219
|
+
role: z.ZodOptional<z.ZodString>;
|
|
2220
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
2221
|
+
}, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>>;
|
|
2222
|
+
pageContext: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2223
|
+
area: z.ZodOptional<z.ZodString>;
|
|
2224
|
+
url: z.ZodOptional<z.ZodString>;
|
|
2225
|
+
path: z.ZodOptional<z.ZodString>;
|
|
2226
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2227
|
+
}, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>>;
|
|
2228
|
+
endpoints: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2229
|
+
upload: z.ZodDefault<z.ZodString>;
|
|
2230
|
+
transcribe: z.ZodDefault<z.ZodString>;
|
|
2231
|
+
submitForm: z.ZodDefault<z.ZodString>;
|
|
2232
|
+
}, z.core.$loose>>>;
|
|
2233
|
+
debug: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
|
|
2234
|
+
error: "error";
|
|
2235
|
+
off: "off";
|
|
2236
|
+
warn: "warn";
|
|
2237
|
+
info: "info";
|
|
2238
|
+
debug: "debug";
|
|
2239
|
+
trace: "trace";
|
|
2240
|
+
}>]>>>;
|
|
2241
|
+
}, z.core.$loose>;
|
|
2242
|
+
type ConnectionConfigPartial = z.infer<typeof connectionConfigPartialSchema>;
|
|
2243
|
+
//#endregion
|
|
2244
|
+
//#region src/schema/deployment.d.ts
|
|
2245
|
+
/**
|
|
2246
|
+
* Server-pushable widget settings. Same surface as the editable
|
|
2247
|
+
* {@link widgetSettingsSchema} but every field is optional (the server
|
|
2248
|
+
* pushes patches, not full configs). Connection fields (publicKey,
|
|
2249
|
+
* aiAgentDeploymentId, baseUrl, user, iframe) are deliberately
|
|
2250
|
+
* excluded — those are client concerns.
|
|
2251
|
+
*
|
|
2252
|
+
* Two deltas vs the editable surface:
|
|
2253
|
+
* - `forms` is omitted — resolved form definitions are served by the
|
|
2254
|
+
* data-API (`GET /forms`), not pushed on the handshake. A stale
|
|
2255
|
+
* backend still sending `config.forms` passes through `.loose()` and is
|
|
2256
|
+
* ignored by the runtime merge.
|
|
2257
|
+
* - `dataApiBaseUrl` is pushable — lets a deployment point the widget at its
|
|
2258
|
+
* data-API base (adopted only when the host didn't set one).
|
|
2259
|
+
* - `storageVersion` is pushable — a handshake-only force-reset lever (never an
|
|
2260
|
+
* embed attribute / `init` option). Bumping it folds a `.v<version>` segment
|
|
2261
|
+
* into every client-storage key on the next load, abandoning the prior
|
|
2262
|
+
* namespace for all visitors.
|
|
2263
|
+
*/
|
|
2264
|
+
declare const serverConfigSchema: z.ZodObject<{
|
|
2265
|
+
presentation: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2266
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
2267
|
+
floating: "floating";
|
|
2268
|
+
inline: "inline";
|
|
2269
|
+
standalone: "standalone";
|
|
2270
|
+
page: "page";
|
|
2271
|
+
modal: "modal";
|
|
2272
|
+
drawer: "drawer";
|
|
2273
|
+
}>>;
|
|
2274
|
+
position: z.ZodDefault<z.ZodEnum<{
|
|
2275
|
+
"bottom-right": "bottom-right";
|
|
2276
|
+
"bottom-left": "bottom-left";
|
|
2277
|
+
"top-right": "top-right";
|
|
2278
|
+
"top-left": "top-left";
|
|
2279
|
+
}>>;
|
|
2280
|
+
iframe: z.ZodDefault<z.ZodBoolean>;
|
|
2281
|
+
size: z.ZodOptional<z.ZodObject<{
|
|
2282
|
+
width: z.ZodOptional<z.ZodString>;
|
|
2283
|
+
height: z.ZodOptional<z.ZodString>;
|
|
2284
|
+
expanded: z.ZodOptional<z.ZodObject<{
|
|
2285
|
+
width: z.ZodOptional<z.ZodString>;
|
|
2286
|
+
height: z.ZodOptional<z.ZodString>;
|
|
2287
|
+
}, z.core.$loose>>;
|
|
2288
|
+
resize: z.ZodOptional<z.ZodObject<{
|
|
2289
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2290
|
+
minWidth: z.ZodOptional<z.ZodString>;
|
|
2291
|
+
maxWidth: z.ZodOptional<z.ZodString>;
|
|
2292
|
+
minHeight: z.ZodOptional<z.ZodString>;
|
|
2293
|
+
maxHeight: z.ZodOptional<z.ZodString>;
|
|
2294
|
+
}, z.core.$loose>>;
|
|
2295
|
+
inset: z.ZodOptional<z.ZodString>;
|
|
2296
|
+
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
2297
|
+
expanded: "expanded";
|
|
2298
|
+
normal: "normal";
|
|
2299
|
+
fullscreen: "fullscreen";
|
|
2300
|
+
auto: "auto";
|
|
2301
|
+
}>>;
|
|
2302
|
+
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
2303
|
+
}, z.core.$loose>>;
|
|
2304
|
+
}, z.core.$loose>>>;
|
|
2305
|
+
behavior: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2306
|
+
startMinimized: z.ZodDefault<z.ZodBoolean>;
|
|
2307
|
+
responseMode: z.ZodDefault<z.ZodEnum<{
|
|
2308
|
+
streaming: "streaming";
|
|
2309
|
+
buffered: "buffered";
|
|
2310
|
+
}>>;
|
|
2311
|
+
showReasoning: z.ZodDefault<z.ZodBoolean>;
|
|
2312
|
+
showToolCalls: z.ZodDefault<z.ZodBoolean>;
|
|
2313
|
+
showSources: z.ZodDefault<z.ZodBoolean>;
|
|
2314
|
+
disableMessageFeedback: z.ZodDefault<z.ZodBoolean>;
|
|
2315
|
+
autoSendSuggestions: z.ZodDefault<z.ZodBoolean>;
|
|
2316
|
+
}, z.core.$loose>>>;
|
|
2317
|
+
theme: z.ZodOptional<z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2318
|
+
auto: "auto";
|
|
2319
|
+
light: "light";
|
|
2320
|
+
dark: "dark";
|
|
2321
|
+
}>, z.ZodObject<{
|
|
2322
|
+
accent: z.ZodOptional<z.ZodString>;
|
|
2323
|
+
accentText: z.ZodOptional<z.ZodString>;
|
|
2324
|
+
radius: z.ZodOptional<z.ZodString>;
|
|
2325
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
2326
|
+
contentMaxWidth: z.ZodOptional<z.ZodString>;
|
|
2327
|
+
}, z.core.$loose>]>>>;
|
|
2328
|
+
launcher: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2329
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
2330
|
+
circle: "circle";
|
|
2331
|
+
pill: "pill";
|
|
2332
|
+
bar: "bar";
|
|
2333
|
+
minimal: "minimal";
|
|
2334
|
+
}>>;
|
|
2335
|
+
size: z.ZodDefault<z.ZodEnum<{
|
|
2336
|
+
sm: "sm";
|
|
2337
|
+
md: "md";
|
|
2338
|
+
lg: "lg";
|
|
2339
|
+
}>>;
|
|
2340
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2341
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
2342
|
+
hidden: z.ZodDefault<z.ZodBoolean>;
|
|
2343
|
+
callout: z.ZodOptional<z.ZodObject<{
|
|
2344
|
+
text: z.ZodDefault<z.ZodString>;
|
|
2345
|
+
shape: z.ZodDefault<z.ZodEnum<{
|
|
2346
|
+
pill: "pill";
|
|
2347
|
+
bubble: "bubble";
|
|
2348
|
+
callout: "callout";
|
|
2349
|
+
}>>;
|
|
2350
|
+
position: z.ZodDefault<z.ZodEnum<{
|
|
2351
|
+
auto: "auto";
|
|
2352
|
+
horizontal: "horizontal";
|
|
2353
|
+
vertical: "vertical";
|
|
2354
|
+
}>>;
|
|
2355
|
+
delayMs: z.ZodDefault<z.ZodNumber>;
|
|
2356
|
+
autoDismissMs: z.ZodDefault<z.ZodNumber>;
|
|
2357
|
+
animated: z.ZodDefault<z.ZodBoolean>;
|
|
2358
|
+
persistent: z.ZodDefault<z.ZodBoolean>;
|
|
2359
|
+
}, z.core.$loose>>;
|
|
2360
|
+
}, z.core.$loose>>>;
|
|
2361
|
+
header: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2362
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
2363
|
+
fullscreen: "fullscreen";
|
|
2364
|
+
theme: "theme";
|
|
2365
|
+
clear: "clear";
|
|
2366
|
+
expand: "expand";
|
|
2367
|
+
sound: "sound";
|
|
2368
|
+
history: "history";
|
|
2369
|
+
language: "language";
|
|
2370
|
+
textSize: "textSize";
|
|
2371
|
+
close: "close";
|
|
2372
|
+
}>>>;
|
|
2373
|
+
}, z.core.$loose>>>;
|
|
2374
|
+
composer: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2375
|
+
sendButton: z.ZodOptional<z.ZodObject<{
|
|
2376
|
+
shape: z.ZodDefault<z.ZodEnum<{
|
|
2377
|
+
circle: "circle";
|
|
2378
|
+
pill: "pill";
|
|
2379
|
+
square: "square";
|
|
2380
|
+
}>>;
|
|
2381
|
+
icon: z.ZodDefault<z.ZodEnum<{
|
|
2382
|
+
arrowUp: "arrowUp";
|
|
2383
|
+
paperPlane: "paperPlane";
|
|
2384
|
+
send: "send";
|
|
2385
|
+
chevron: "chevron";
|
|
2386
|
+
}>>;
|
|
2387
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
2388
|
+
filled: "filled";
|
|
2389
|
+
outline: "outline";
|
|
2390
|
+
ghost: "ghost";
|
|
2391
|
+
}>>;
|
|
2392
|
+
}, z.core.$loose>>;
|
|
2393
|
+
attachments: z.ZodOptional<z.ZodObject<{
|
|
2394
|
+
maxBytes: z.ZodDefault<z.ZodNumber>;
|
|
2395
|
+
maxCount: z.ZodDefault<z.ZodNumber>;
|
|
2396
|
+
accept: z.ZodDefault<z.ZodString>;
|
|
2397
|
+
}, z.core.$loose>>;
|
|
2398
|
+
}, z.core.$loose>>>;
|
|
2399
|
+
feedback: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2400
|
+
sound: z.ZodOptional<z.ZodObject<{
|
|
2401
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2402
|
+
volume: z.ZodDefault<z.ZodNumber>;
|
|
2403
|
+
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
2404
|
+
error: "error";
|
|
2405
|
+
messageReceived: "messageReceived";
|
|
2406
|
+
messageSent: "messageSent";
|
|
2407
|
+
voiceStart: "voiceStart";
|
|
2408
|
+
voiceStop: "voiceStop";
|
|
2409
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
2410
|
+
}, z.core.$loose>>;
|
|
2411
|
+
haptics: z.ZodOptional<z.ZodObject<{
|
|
2412
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2413
|
+
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
2414
|
+
error: "error";
|
|
2415
|
+
messageReceived: "messageReceived";
|
|
2416
|
+
messageSent: "messageSent";
|
|
2417
|
+
voiceStart: "voiceStart";
|
|
2418
|
+
voiceStop: "voiceStop";
|
|
2419
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
2420
|
+
}, z.core.$loose>>;
|
|
2421
|
+
}, z.core.$loose>>>;
|
|
2422
|
+
i18n: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2423
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
2424
|
+
defaultLocale: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodString]>>;
|
|
2425
|
+
availableLocales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2426
|
+
strings: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>]>>;
|
|
2427
|
+
}, z.core.$loose>>>;
|
|
2428
|
+
footer: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2429
|
+
poweredBy: z.ZodOptional<z.ZodObject<{
|
|
2430
|
+
text: z.ZodOptional<z.ZodString>;
|
|
2431
|
+
href: z.ZodOptional<z.ZodURL>;
|
|
2432
|
+
logoUrl: z.ZodOptional<z.ZodURL>;
|
|
2433
|
+
}, z.core.$loose>>;
|
|
2434
|
+
composerDisclaimer: z.ZodOptional<z.ZodString>;
|
|
2435
|
+
}, z.core.$loose>>>;
|
|
2436
|
+
features: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2437
|
+
disableFileUpload: z.ZodDefault<z.ZodBoolean>;
|
|
2438
|
+
voice: z.ZodDefault<z.ZodEnum<{
|
|
2439
|
+
local: "local";
|
|
2440
|
+
server: "server";
|
|
2441
|
+
disabled: "disabled";
|
|
2442
|
+
}>>;
|
|
2443
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
2444
|
+
code: z.ZodString;
|
|
2445
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2446
|
+
}, z.core.$loose>]>>>;
|
|
2447
|
+
disableHumanInLoop: z.ZodDefault<z.ZodBoolean>;
|
|
2448
|
+
enableOperatorRequest: z.ZodDefault<z.ZodBoolean>;
|
|
2449
|
+
}, z.core.$loose>>>;
|
|
2450
|
+
modules: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2451
|
+
label: z.ZodString;
|
|
2452
|
+
layout: z.ZodEnum<{
|
|
2453
|
+
home: "home";
|
|
2454
|
+
chat: "chat";
|
|
2455
|
+
help: "help";
|
|
2456
|
+
news: "news";
|
|
2457
|
+
}>;
|
|
2458
|
+
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2459
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2460
|
+
brandName: z.ZodOptional<z.ZodString>;
|
|
2461
|
+
hideGreeting: z.ZodOptional<z.ZodBoolean>;
|
|
2462
|
+
greetingText: z.ZodOptional<z.ZodString>;
|
|
2463
|
+
userAvatars: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2464
|
+
name: z.ZodString;
|
|
2465
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
2466
|
+
role: z.ZodOptional<z.ZodString>;
|
|
2467
|
+
}, z.core.$loose>>>;
|
|
2468
|
+
hideSearchBar: z.ZodOptional<z.ZodBoolean>;
|
|
2469
|
+
hideRecentConversations: z.ZodOptional<z.ZodBoolean>;
|
|
2470
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
2471
|
+
text: z.ZodOptional<z.ZodString>;
|
|
2472
|
+
level: z.ZodOptional<z.ZodString>;
|
|
2473
|
+
url: z.ZodOptional<z.ZodString>;
|
|
2474
|
+
}, z.core.$strip>>;
|
|
2475
|
+
contentBlockTitle: z.ZodOptional<z.ZodString>;
|
|
2476
|
+
}, z.core.$loose>>>>;
|
|
2477
|
+
tracking: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2478
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2479
|
+
endpoint: z.ZodOptional<z.ZodURL>;
|
|
2480
|
+
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
2481
|
+
token: z.ZodOptional<z.ZodString>;
|
|
2482
|
+
}, z.core.$loose>>>;
|
|
2483
|
+
dataApiBaseUrl: z.ZodOptional<z.ZodString>;
|
|
2484
|
+
storageVersion: z.ZodOptional<z.ZodString>;
|
|
2485
|
+
}, z.core.$loose>;
|
|
2486
|
+
type ServerConfig = z.infer<typeof serverConfigSchema>;
|
|
2487
|
+
/**
|
|
2488
|
+
* Page-mode brand identity rendered at the top of the sidebar.
|
|
2489
|
+
*
|
|
2490
|
+
* Just the two things the widget actually paints: a brand name (used
|
|
2491
|
+
* as the logo's accessible alt-text fallback) and the logo asset
|
|
2492
|
+
* itself, with an optional dark-theme variant. Backend-side concerns
|
|
2493
|
+
* (custom domain, SEO meta tags, theme colours, favicons, hero
|
|
2494
|
+
* images) live outside this widget — the SSR / dashboard / DNS
|
|
2495
|
+
* layers own them.
|
|
2496
|
+
*
|
|
2497
|
+
* `.loose()` so unknown server-pushed fields still validate; only
|
|
2498
|
+
* the rendered subset is typed.
|
|
2499
|
+
*/
|
|
2500
|
+
declare const siteConfigSchema: z.ZodObject<{
|
|
2501
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2502
|
+
logo: z.ZodOptional<z.ZodObject<{
|
|
2503
|
+
url: z.ZodString;
|
|
2504
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
2505
|
+
}, z.core.$strict>>;
|
|
2506
|
+
logoDark: z.ZodOptional<z.ZodObject<{
|
|
2507
|
+
url: z.ZodString;
|
|
2508
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
2509
|
+
}, z.core.$strict>>;
|
|
2510
|
+
}, z.core.$loose>;
|
|
2511
|
+
type SiteConfig = z.infer<typeof siteConfigSchema>;
|
|
2512
|
+
/**
|
|
2513
|
+
* Page-mode content blocks rendered in the sidebar.
|
|
2514
|
+
*
|
|
2515
|
+
* The dashboard configures lists of links here; the widget walks
|
|
2516
|
+
* them and renders one section per non-empty list. Each entry
|
|
2517
|
+
* follows {@link linkSchema} (`label` + optional `href` / `icon` /
|
|
2518
|
+
* `description` / `id`).
|
|
2519
|
+
*/
|
|
2520
|
+
declare const blocksConfigSchema: z.ZodObject<{
|
|
2521
|
+
navigation: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2522
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2523
|
+
label: z.ZodString;
|
|
2524
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2525
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
2526
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2527
|
+
}, z.core.$loose>>>;
|
|
2528
|
+
linkCards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2529
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2530
|
+
label: z.ZodString;
|
|
2531
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2532
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
2533
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2534
|
+
}, z.core.$loose>>>;
|
|
2535
|
+
}, z.core.$loose>;
|
|
2536
|
+
type BlocksConfig = z.infer<typeof blocksConfigSchema>;
|
|
2537
|
+
declare const handshakeResponseSchema: z.ZodObject<{
|
|
2538
|
+
deployment: z.ZodObject<{
|
|
2539
|
+
id: z.ZodString;
|
|
2540
|
+
name: z.ZodString;
|
|
2541
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
2542
|
+
publicKey: z.ZodOptional<z.ZodString>;
|
|
2543
|
+
}, z.core.$loose>;
|
|
2544
|
+
agent: z.ZodObject<{
|
|
2545
|
+
id: z.ZodString;
|
|
2546
|
+
name: z.ZodString;
|
|
2547
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2548
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
2549
|
+
online: "online";
|
|
2550
|
+
away: "away";
|
|
2551
|
+
offline: "offline";
|
|
2552
|
+
}>>;
|
|
2553
|
+
}, z.core.$loose>;
|
|
2554
|
+
config: z.ZodOptional<z.ZodObject<{
|
|
2555
|
+
presentation: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2556
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
2557
|
+
floating: "floating";
|
|
2558
|
+
inline: "inline";
|
|
2559
|
+
standalone: "standalone";
|
|
2560
|
+
page: "page";
|
|
2561
|
+
modal: "modal";
|
|
2562
|
+
drawer: "drawer";
|
|
2563
|
+
}>>;
|
|
2564
|
+
position: z.ZodDefault<z.ZodEnum<{
|
|
2565
|
+
"bottom-right": "bottom-right";
|
|
2566
|
+
"bottom-left": "bottom-left";
|
|
2567
|
+
"top-right": "top-right";
|
|
2568
|
+
"top-left": "top-left";
|
|
2569
|
+
}>>;
|
|
2570
|
+
iframe: z.ZodDefault<z.ZodBoolean>;
|
|
2571
|
+
size: z.ZodOptional<z.ZodObject<{
|
|
2572
|
+
width: z.ZodOptional<z.ZodString>;
|
|
2573
|
+
height: z.ZodOptional<z.ZodString>;
|
|
2574
|
+
expanded: z.ZodOptional<z.ZodObject<{
|
|
2575
|
+
width: z.ZodOptional<z.ZodString>;
|
|
2576
|
+
height: z.ZodOptional<z.ZodString>;
|
|
2577
|
+
}, z.core.$loose>>;
|
|
2578
|
+
resize: z.ZodOptional<z.ZodObject<{
|
|
2579
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2580
|
+
minWidth: z.ZodOptional<z.ZodString>;
|
|
2581
|
+
maxWidth: z.ZodOptional<z.ZodString>;
|
|
2582
|
+
minHeight: z.ZodOptional<z.ZodString>;
|
|
2583
|
+
maxHeight: z.ZodOptional<z.ZodString>;
|
|
2584
|
+
}, z.core.$loose>>;
|
|
2585
|
+
inset: z.ZodOptional<z.ZodString>;
|
|
2586
|
+
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
2587
|
+
expanded: "expanded";
|
|
2588
|
+
normal: "normal";
|
|
2589
|
+
fullscreen: "fullscreen";
|
|
2590
|
+
auto: "auto";
|
|
2591
|
+
}>>;
|
|
2592
|
+
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
2593
|
+
}, z.core.$loose>>;
|
|
2594
|
+
}, z.core.$loose>>>;
|
|
2595
|
+
behavior: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2596
|
+
startMinimized: z.ZodDefault<z.ZodBoolean>;
|
|
2597
|
+
responseMode: z.ZodDefault<z.ZodEnum<{
|
|
2598
|
+
streaming: "streaming";
|
|
2599
|
+
buffered: "buffered";
|
|
2600
|
+
}>>;
|
|
2601
|
+
showReasoning: z.ZodDefault<z.ZodBoolean>;
|
|
2602
|
+
showToolCalls: z.ZodDefault<z.ZodBoolean>;
|
|
2603
|
+
showSources: z.ZodDefault<z.ZodBoolean>;
|
|
2604
|
+
disableMessageFeedback: z.ZodDefault<z.ZodBoolean>;
|
|
2605
|
+
autoSendSuggestions: z.ZodDefault<z.ZodBoolean>;
|
|
2606
|
+
}, z.core.$loose>>>;
|
|
2607
|
+
theme: z.ZodOptional<z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2608
|
+
auto: "auto";
|
|
2609
|
+
light: "light";
|
|
2610
|
+
dark: "dark";
|
|
2611
|
+
}>, z.ZodObject<{
|
|
2612
|
+
accent: z.ZodOptional<z.ZodString>;
|
|
2613
|
+
accentText: z.ZodOptional<z.ZodString>;
|
|
2614
|
+
radius: z.ZodOptional<z.ZodString>;
|
|
2615
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
2616
|
+
contentMaxWidth: z.ZodOptional<z.ZodString>;
|
|
2617
|
+
}, z.core.$loose>]>>>;
|
|
2618
|
+
launcher: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2619
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
2620
|
+
circle: "circle";
|
|
2621
|
+
pill: "pill";
|
|
2622
|
+
bar: "bar";
|
|
2623
|
+
minimal: "minimal";
|
|
2624
|
+
}>>;
|
|
2625
|
+
size: z.ZodDefault<z.ZodEnum<{
|
|
2626
|
+
sm: "sm";
|
|
2627
|
+
md: "md";
|
|
2628
|
+
lg: "lg";
|
|
2629
|
+
}>>;
|
|
2630
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2631
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
2632
|
+
hidden: z.ZodDefault<z.ZodBoolean>;
|
|
2633
|
+
callout: z.ZodOptional<z.ZodObject<{
|
|
2634
|
+
text: z.ZodDefault<z.ZodString>;
|
|
2635
|
+
shape: z.ZodDefault<z.ZodEnum<{
|
|
2636
|
+
pill: "pill";
|
|
2637
|
+
bubble: "bubble";
|
|
2638
|
+
callout: "callout";
|
|
2639
|
+
}>>;
|
|
2640
|
+
position: z.ZodDefault<z.ZodEnum<{
|
|
2641
|
+
auto: "auto";
|
|
2642
|
+
horizontal: "horizontal";
|
|
2643
|
+
vertical: "vertical";
|
|
2644
|
+
}>>;
|
|
2645
|
+
delayMs: z.ZodDefault<z.ZodNumber>;
|
|
2646
|
+
autoDismissMs: z.ZodDefault<z.ZodNumber>;
|
|
2647
|
+
animated: z.ZodDefault<z.ZodBoolean>;
|
|
2648
|
+
persistent: z.ZodDefault<z.ZodBoolean>;
|
|
2649
|
+
}, z.core.$loose>>;
|
|
2650
|
+
}, z.core.$loose>>>;
|
|
2651
|
+
header: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2652
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
2653
|
+
fullscreen: "fullscreen";
|
|
2654
|
+
theme: "theme";
|
|
2655
|
+
clear: "clear";
|
|
2656
|
+
expand: "expand";
|
|
2657
|
+
sound: "sound";
|
|
2658
|
+
history: "history";
|
|
2659
|
+
language: "language";
|
|
2660
|
+
textSize: "textSize";
|
|
2661
|
+
close: "close";
|
|
2662
|
+
}>>>;
|
|
2663
|
+
}, z.core.$loose>>>;
|
|
2664
|
+
composer: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2665
|
+
sendButton: z.ZodOptional<z.ZodObject<{
|
|
2666
|
+
shape: z.ZodDefault<z.ZodEnum<{
|
|
2667
|
+
circle: "circle";
|
|
2668
|
+
pill: "pill";
|
|
2669
|
+
square: "square";
|
|
2670
|
+
}>>;
|
|
2671
|
+
icon: z.ZodDefault<z.ZodEnum<{
|
|
2672
|
+
arrowUp: "arrowUp";
|
|
2673
|
+
paperPlane: "paperPlane";
|
|
2674
|
+
send: "send";
|
|
2675
|
+
chevron: "chevron";
|
|
2676
|
+
}>>;
|
|
2677
|
+
variant: z.ZodDefault<z.ZodEnum<{
|
|
2678
|
+
filled: "filled";
|
|
2679
|
+
outline: "outline";
|
|
2680
|
+
ghost: "ghost";
|
|
2681
|
+
}>>;
|
|
2682
|
+
}, z.core.$loose>>;
|
|
2683
|
+
attachments: z.ZodOptional<z.ZodObject<{
|
|
2684
|
+
maxBytes: z.ZodDefault<z.ZodNumber>;
|
|
2685
|
+
maxCount: z.ZodDefault<z.ZodNumber>;
|
|
2686
|
+
accept: z.ZodDefault<z.ZodString>;
|
|
2687
|
+
}, z.core.$loose>>;
|
|
2688
|
+
}, z.core.$loose>>>;
|
|
2689
|
+
feedback: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2690
|
+
sound: z.ZodOptional<z.ZodObject<{
|
|
2691
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2692
|
+
volume: z.ZodDefault<z.ZodNumber>;
|
|
2693
|
+
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
2694
|
+
error: "error";
|
|
2695
|
+
messageReceived: "messageReceived";
|
|
2696
|
+
messageSent: "messageSent";
|
|
2697
|
+
voiceStart: "voiceStart";
|
|
2698
|
+
voiceStop: "voiceStop";
|
|
2699
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
2700
|
+
}, z.core.$loose>>;
|
|
2701
|
+
haptics: z.ZodOptional<z.ZodObject<{
|
|
2702
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2703
|
+
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
2704
|
+
error: "error";
|
|
2705
|
+
messageReceived: "messageReceived";
|
|
2706
|
+
messageSent: "messageSent";
|
|
2707
|
+
voiceStart: "voiceStart";
|
|
2708
|
+
voiceStop: "voiceStop";
|
|
2709
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
2710
|
+
}, z.core.$loose>>;
|
|
2711
|
+
}, z.core.$loose>>>;
|
|
2712
|
+
i18n: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2713
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
2714
|
+
defaultLocale: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodString]>>;
|
|
2715
|
+
availableLocales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2716
|
+
strings: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>]>>;
|
|
2717
|
+
}, z.core.$loose>>>;
|
|
2718
|
+
footer: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2719
|
+
poweredBy: z.ZodOptional<z.ZodObject<{
|
|
2720
|
+
text: z.ZodOptional<z.ZodString>;
|
|
2721
|
+
href: z.ZodOptional<z.ZodURL>;
|
|
2722
|
+
logoUrl: z.ZodOptional<z.ZodURL>;
|
|
2723
|
+
}, z.core.$loose>>;
|
|
2724
|
+
composerDisclaimer: z.ZodOptional<z.ZodString>;
|
|
2725
|
+
}, z.core.$loose>>>;
|
|
2726
|
+
features: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2727
|
+
disableFileUpload: z.ZodDefault<z.ZodBoolean>;
|
|
2728
|
+
voice: z.ZodDefault<z.ZodEnum<{
|
|
2729
|
+
local: "local";
|
|
2730
|
+
server: "server";
|
|
2731
|
+
disabled: "disabled";
|
|
2732
|
+
}>>;
|
|
2733
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
2734
|
+
code: z.ZodString;
|
|
2735
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2736
|
+
}, z.core.$loose>]>>>;
|
|
2737
|
+
disableHumanInLoop: z.ZodDefault<z.ZodBoolean>;
|
|
2738
|
+
enableOperatorRequest: z.ZodDefault<z.ZodBoolean>;
|
|
2739
|
+
}, z.core.$loose>>>;
|
|
2740
|
+
modules: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2741
|
+
label: z.ZodString;
|
|
2742
|
+
layout: z.ZodEnum<{
|
|
2743
|
+
home: "home";
|
|
2744
|
+
chat: "chat";
|
|
2745
|
+
help: "help";
|
|
2746
|
+
news: "news";
|
|
2747
|
+
}>;
|
|
2748
|
+
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2749
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2750
|
+
brandName: z.ZodOptional<z.ZodString>;
|
|
2751
|
+
hideGreeting: z.ZodOptional<z.ZodBoolean>;
|
|
2752
|
+
greetingText: z.ZodOptional<z.ZodString>;
|
|
2753
|
+
userAvatars: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2754
|
+
name: z.ZodString;
|
|
2755
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
2756
|
+
role: z.ZodOptional<z.ZodString>;
|
|
2757
|
+
}, z.core.$loose>>>;
|
|
2758
|
+
hideSearchBar: z.ZodOptional<z.ZodBoolean>;
|
|
2759
|
+
hideRecentConversations: z.ZodOptional<z.ZodBoolean>;
|
|
2760
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
2761
|
+
text: z.ZodOptional<z.ZodString>;
|
|
2762
|
+
level: z.ZodOptional<z.ZodString>;
|
|
2763
|
+
url: z.ZodOptional<z.ZodString>;
|
|
2764
|
+
}, z.core.$strip>>;
|
|
2765
|
+
contentBlockTitle: z.ZodOptional<z.ZodString>;
|
|
2766
|
+
}, z.core.$loose>>>>;
|
|
2767
|
+
tracking: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
2768
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2769
|
+
endpoint: z.ZodOptional<z.ZodURL>;
|
|
2770
|
+
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
2771
|
+
token: z.ZodOptional<z.ZodString>;
|
|
2772
|
+
}, z.core.$loose>>>;
|
|
2773
|
+
dataApiBaseUrl: z.ZodOptional<z.ZodString>;
|
|
2774
|
+
storageVersion: z.ZodOptional<z.ZodString>;
|
|
2775
|
+
}, z.core.$loose>>;
|
|
2776
|
+
site: z.ZodOptional<z.ZodObject<{
|
|
2777
|
+
title: z.ZodOptional<z.ZodString>;
|
|
2778
|
+
logo: z.ZodOptional<z.ZodObject<{
|
|
2779
|
+
url: z.ZodString;
|
|
2780
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
2781
|
+
}, z.core.$strict>>;
|
|
2782
|
+
logoDark: z.ZodOptional<z.ZodObject<{
|
|
2783
|
+
url: z.ZodString;
|
|
2784
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
2785
|
+
}, z.core.$strict>>;
|
|
2786
|
+
}, z.core.$loose>>;
|
|
2787
|
+
blocks: z.ZodOptional<z.ZodObject<{
|
|
2788
|
+
navigation: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2789
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2790
|
+
label: z.ZodString;
|
|
2791
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2792
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
2793
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2794
|
+
}, z.core.$loose>>>;
|
|
2795
|
+
linkCards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2796
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2797
|
+
label: z.ZodString;
|
|
2798
|
+
href: z.ZodOptional<z.ZodString>;
|
|
2799
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
2800
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2801
|
+
}, z.core.$loose>>>;
|
|
2802
|
+
}, z.core.$loose>>;
|
|
2803
|
+
welcome: z.ZodOptional<z.ZodObject<{
|
|
2804
|
+
messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2805
|
+
id: z.ZodString;
|
|
2806
|
+
role: z.ZodEnum<{
|
|
2807
|
+
assistant: "assistant";
|
|
2808
|
+
system: "system";
|
|
2809
|
+
}>;
|
|
2810
|
+
text: z.ZodString;
|
|
2811
|
+
}, z.core.$loose>>>;
|
|
2812
|
+
suggestions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2813
|
+
id: z.ZodString;
|
|
2814
|
+
label: z.ZodString;
|
|
2815
|
+
text: z.ZodOptional<z.ZodString>;
|
|
2816
|
+
}, z.core.$loose>>>;
|
|
2817
|
+
}, z.core.$loose>>;
|
|
2818
|
+
visitorId: z.ZodString;
|
|
2819
|
+
conversationId: z.ZodString;
|
|
2820
|
+
userPrefs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2821
|
+
rebind: z.ZodOptional<z.ZodObject<{
|
|
2822
|
+
visitorId: z.ZodOptional<z.ZodEnum<{
|
|
2823
|
+
conflict: "conflict";
|
|
2824
|
+
expired: "expired";
|
|
2825
|
+
invalid: "invalid";
|
|
2826
|
+
}>>;
|
|
2827
|
+
conversationId: z.ZodOptional<z.ZodEnum<{
|
|
2828
|
+
conflict: "conflict";
|
|
2829
|
+
expired: "expired";
|
|
2830
|
+
invalid: "invalid";
|
|
2831
|
+
}>>;
|
|
2832
|
+
}, z.core.$loose>>;
|
|
2833
|
+
}, z.core.$loose>;
|
|
2834
|
+
type HandshakeResponse = z.infer<typeof handshakeResponseSchema>;
|
|
2835
|
+
//#endregion
|
|
2836
|
+
//#region src/schema/per-mode.d.ts
|
|
958
2837
|
/**
|
|
959
2838
|
* Return a `widgetSettingsSchema` projection containing only the
|
|
960
2839
|
* sections supported by `mode`, ordered for UX flow (extras first,
|
|
@@ -965,7 +2844,8 @@ type TrackingSettings = z.infer<typeof trackingSchema>;
|
|
|
965
2844
|
declare function widgetSettingsSchemaForMode(mode: Mode): z.ZodObject<z.ZodRawShape>;
|
|
966
2845
|
/** The exhaustive widget-mode list. Mirrors the schema's enum. */
|
|
967
2846
|
declare const ALL_MODES: readonly Mode[];
|
|
968
|
-
|
|
2847
|
+
//#endregion
|
|
2848
|
+
//#region src/schema/json-schema.d.ts
|
|
969
2849
|
/**
|
|
970
2850
|
* JSON Schema emit helper. Converts the Zod source-of-truth into a
|
|
971
2851
|
* standard JSON Schema document that the dashboard / 3rd-party tooling
|
|
@@ -980,5 +2860,6 @@ declare const ALL_MODES: readonly Mode[];
|
|
|
980
2860
|
* `$ref: "#/definitions/WidgetConfig"`.
|
|
981
2861
|
*/
|
|
982
2862
|
declare function emitJsonSchema(): unknown;
|
|
983
|
-
|
|
984
|
-
export { ALL_MODES,
|
|
2863
|
+
//#endregion
|
|
2864
|
+
export { ALL_MODES, ActionName, Asset, AttachmentLimits, Behavior, BlocksConfig, CalloutPosition, CalloutShape, ComposerOptions, ConnectionConfig, ConnectionConfigPartial, Endpoints, FeatureFlags, FeedbackEvent, FeedbackOptions, FieldOption, FieldType, FieldValidation, FooterOptions, FormCondition, FormDef, FormField, FormTranslation, Forms, HandshakeResponse, HapticsOptions, HeaderActions, HeaderOptions, I18nOptions, LauncherCallout, LauncherOptions, LauncherSize, LauncherVariant, Link, Mode, ModuleLayout, ModuleOptions, ModulesOptions, PAGE_AREA_SUGGESTIONS, PageContext, Position, PoweredBy, Presentation, ResizeOptions, ResponseMode, SendButtonOptions, ServerConfig, SiteConfig, SizeOptions, SoundOptions, StringsOverride, ThemeOverrides, ThemePreference, TrackingSettings, UserContext, VoiceMode, WidgetConfig, WidgetConfigPartial, WidgetSettings, WidgetSettingsPartial, actionNameSchema, assetSchema, attachmentLimitsSchema, behaviorSchema, blocksConfigSchema, calloutPositionSchema, calloutShapeSchema, composerOptionsSchema, connectionConfigPartialSchema, connectionConfigSchema, cssColorSchema, cssLengthSchema, emitJsonSchema, endpointsSchema, featureFlagsSchema, feedbackEventSchema, feedbackSchema, fieldOptionSchema, fieldOptionTranslationSchema, fieldTypeSchema, fieldValidationSchema, footerSchema, formConditionSchema, formDefSchema, formFieldSchema, formFieldTranslationSchema, formTranslationSchema, formTriggerSchema, formsSchema, handshakeResponseSchema, hapticsOptionsSchema, headerActionsSchema, headerSchema, i18nSchema, initialSizeSchema, launcherCalloutSchema, launcherOptionsSchema, launcherSizeSchema, launcherVariantSchema, linkSchema, localeSchema, modeSchema, moduleLayoutSchema, moduleSchema, modulesSchema, pageContextSchema, positionSchema, poweredBySchema, presentationSchema, resizeOptionsSchema, responseModeSchema, sendButtonIconSchema, sendButtonOptionsSchema, sendButtonShapeSchema, sendButtonVariantSchema, serverConfigSchema, siteConfigSchema, sizeOptionsSchema, soundOptionsSchema, stringsOverrideSchema, themeFieldSchema, themeOverridesSchema, themePreferenceSchema, toolRefSchema, trackingSchema, userContextSchema, uuid7Schema, voiceModeSchema, widgetConfigPartialSchema, widgetConfigSchema, widgetSettingsPartialSchema, widgetSettingsSchema, widgetSettingsSchemaForMode };
|
|
2865
|
+
//# sourceMappingURL=schema.d.ts.map
|