@guidelytech/shared 0.0.0-stage → 0.2.0

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.
@@ -0,0 +1,3356 @@
1
+ import { RuleGroup, Rule } from './runtime.cjs';
2
+ export { MAX_PROPERTY_BYTES, RULE_FIELDS, RULE_OPERATORS, RuleField, RuleOperator, SENSITIVE_PROPERTY_PATTERN, SERVER_ASSISTED_FIELDS, TargetingContext, clamp, compare, describeRule, emptyRuleGroup, evaluateRule, evaluateRules, fnv1a, getPath, isPlainObject, isRuleGroup, matchUrlPattern, randomId, rolloutBucket, safeRegExp, sanitizeProperties, slugify, stripOrigin } from './runtime.cjs';
3
+ import { z } from 'zod';
4
+
5
+ declare const RuleSchema: z.ZodType<Rule>;
6
+ declare const RuleGroupSchema: z.ZodType<RuleGroup>;
7
+
8
+ declare const GUIDE_KINDS: readonly ["flow", "modal", "tooltip", "banner", "checklist", "survey", "announcement"];
9
+ type GuideKind = (typeof GUIDE_KINDS)[number];
10
+ declare const GUIDE_STATUSES: readonly ["draft", "published", "paused", "archived"];
11
+ type GuideStatus = (typeof GUIDE_STATUSES)[number];
12
+ declare const STEP_TYPES: readonly ["modal", "tooltip", "popover", "spotlight", "hotspot", "banner", "slideout", "checklist", "custom", "survey"];
13
+ type StepType = (typeof STEP_TYPES)[number];
14
+ declare const PLACEMENTS: readonly ["top", "top-start", "top-end", "right", "right-start", "right-end", "bottom", "bottom-start", "bottom-end", "left", "left-start", "left-end", "auto"];
15
+ type Placement = (typeof PLACEMENTS)[number];
16
+ declare const SELECTOR_KINDS: readonly ["css", "id", "data-attr", "aria", "text", "xpath"];
17
+ declare const SelectorStrategySchema: z.ZodObject<{
18
+ kind: z.ZodEnum<["css", "id", "data-attr", "aria", "text", "xpath"]>;
19
+ value: z.ZodString;
20
+ /** Optional human-readable label captured at pick time. */
21
+ label: z.ZodOptional<z.ZodString>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ value: string;
24
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
25
+ label?: string | undefined;
26
+ }, {
27
+ value: string;
28
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
29
+ label?: string | undefined;
30
+ }>;
31
+ type SelectorStrategy = z.infer<typeof SelectorStrategySchema>;
32
+ declare const TargetSchema: z.ZodObject<{
33
+ /** Ordered strategies; the first one resolving to exactly one element wins. */
34
+ selectors: z.ZodArray<z.ZodObject<{
35
+ kind: z.ZodEnum<["css", "id", "data-attr", "aria", "text", "xpath"]>;
36
+ value: z.ZodString;
37
+ /** Optional human-readable label captured at pick time. */
38
+ label: z.ZodOptional<z.ZodString>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ value: string;
41
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
42
+ label?: string | undefined;
43
+ }, {
44
+ value: string;
45
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
46
+ label?: string | undefined;
47
+ }>, "many">;
48
+ /** How long to wait for the element before applying fallback. */
49
+ waitMs: z.ZodDefault<z.ZodNumber>;
50
+ /** What to do when the element never shows up. */
51
+ fallback: z.ZodDefault<z.ZodEnum<["skip", "show_as_modal", "end_guide", "wait"]>>;
52
+ /** Scroll the element into view before positioning. */
53
+ scrollIntoView: z.ZodDefault<z.ZodBoolean>;
54
+ /** Text snapshot captured at pick time; used for authoring warnings. */
55
+ textSnapshot: z.ZodOptional<z.ZodString>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ selectors: {
58
+ value: string;
59
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
60
+ label?: string | undefined;
61
+ }[];
62
+ waitMs: number;
63
+ fallback: "skip" | "show_as_modal" | "end_guide" | "wait";
64
+ scrollIntoView: boolean;
65
+ textSnapshot?: string | undefined;
66
+ }, {
67
+ selectors: {
68
+ value: string;
69
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
70
+ label?: string | undefined;
71
+ }[];
72
+ waitMs?: number | undefined;
73
+ fallback?: "skip" | "show_as_modal" | "end_guide" | "wait" | undefined;
74
+ scrollIntoView?: boolean | undefined;
75
+ textSnapshot?: string | undefined;
76
+ }>;
77
+ type StepTarget = z.infer<typeof TargetSchema>;
78
+ declare const BUTTON_ACTIONS: readonly ["next", "back", "dismiss", "complete", "skip", "url", "start_guide", "event", "open_resource_center", "none"];
79
+ declare const ButtonSchema: z.ZodObject<{
80
+ id: z.ZodString;
81
+ label: z.ZodString;
82
+ action: z.ZodEnum<["next", "back", "dismiss", "complete", "skip", "url", "start_guide", "event", "open_resource_center", "none"]>;
83
+ variant: z.ZodDefault<z.ZodEnum<["primary", "secondary", "ghost", "link"]>>;
84
+ /** url for `url`, guide id for `start_guide`, event name for `event`, step id for `next` branch override */
85
+ value: z.ZodOptional<z.ZodString>;
86
+ newTab: z.ZodOptional<z.ZodBoolean>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ id: string;
89
+ label: string;
90
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
91
+ variant: "primary" | "secondary" | "ghost" | "link";
92
+ value?: string | undefined;
93
+ newTab?: boolean | undefined;
94
+ }, {
95
+ id: string;
96
+ label: string;
97
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
98
+ value?: string | undefined;
99
+ variant?: "primary" | "secondary" | "ghost" | "link" | undefined;
100
+ newTab?: boolean | undefined;
101
+ }>;
102
+ type StepButton = z.infer<typeof ButtonSchema>;
103
+ declare const StepBranchSchema: z.ZodObject<{
104
+ id: z.ZodString;
105
+ /** Rule group evaluated against targeting context when leaving the step. */
106
+ when: z.ZodType<RuleGroup, z.ZodTypeDef, RuleGroup>;
107
+ /** Step id to jump to. */
108
+ goTo: z.ZodString;
109
+ }, "strip", z.ZodTypeAny, {
110
+ id: string;
111
+ when: RuleGroup;
112
+ goTo: string;
113
+ }, {
114
+ id: string;
115
+ when: RuleGroup;
116
+ goTo: string;
117
+ }>;
118
+ declare const ADVANCE_ON: readonly ["button", "element_click", "element_visible", "event", "delay", "any"];
119
+ declare const StepSchema: z.ZodObject<{
120
+ id: z.ZodString;
121
+ type: z.ZodEnum<["modal", "tooltip", "popover", "spotlight", "hotspot", "banner", "slideout", "checklist", "custom", "survey"]>;
122
+ title: z.ZodDefault<z.ZodString>;
123
+ /** Sanitized HTML body (links, images, lists, formatting). */
124
+ body: z.ZodDefault<z.ZodString>;
125
+ imageUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
126
+ buttons: z.ZodDefault<z.ZodArray<z.ZodObject<{
127
+ id: z.ZodString;
128
+ label: z.ZodString;
129
+ action: z.ZodEnum<["next", "back", "dismiss", "complete", "skip", "url", "start_guide", "event", "open_resource_center", "none"]>;
130
+ variant: z.ZodDefault<z.ZodEnum<["primary", "secondary", "ghost", "link"]>>;
131
+ /** url for `url`, guide id for `start_guide`, event name for `event`, step id for `next` branch override */
132
+ value: z.ZodOptional<z.ZodString>;
133
+ newTab: z.ZodOptional<z.ZodBoolean>;
134
+ }, "strip", z.ZodTypeAny, {
135
+ id: string;
136
+ label: string;
137
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
138
+ variant: "primary" | "secondary" | "ghost" | "link";
139
+ value?: string | undefined;
140
+ newTab?: boolean | undefined;
141
+ }, {
142
+ id: string;
143
+ label: string;
144
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
145
+ value?: string | undefined;
146
+ variant?: "primary" | "secondary" | "ghost" | "link" | undefined;
147
+ newTab?: boolean | undefined;
148
+ }>, "many">>;
149
+ target: z.ZodOptional<z.ZodObject<{
150
+ /** Ordered strategies; the first one resolving to exactly one element wins. */
151
+ selectors: z.ZodArray<z.ZodObject<{
152
+ kind: z.ZodEnum<["css", "id", "data-attr", "aria", "text", "xpath"]>;
153
+ value: z.ZodString;
154
+ /** Optional human-readable label captured at pick time. */
155
+ label: z.ZodOptional<z.ZodString>;
156
+ }, "strip", z.ZodTypeAny, {
157
+ value: string;
158
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
159
+ label?: string | undefined;
160
+ }, {
161
+ value: string;
162
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
163
+ label?: string | undefined;
164
+ }>, "many">;
165
+ /** How long to wait for the element before applying fallback. */
166
+ waitMs: z.ZodDefault<z.ZodNumber>;
167
+ /** What to do when the element never shows up. */
168
+ fallback: z.ZodDefault<z.ZodEnum<["skip", "show_as_modal", "end_guide", "wait"]>>;
169
+ /** Scroll the element into view before positioning. */
170
+ scrollIntoView: z.ZodDefault<z.ZodBoolean>;
171
+ /** Text snapshot captured at pick time; used for authoring warnings. */
172
+ textSnapshot: z.ZodOptional<z.ZodString>;
173
+ }, "strip", z.ZodTypeAny, {
174
+ selectors: {
175
+ value: string;
176
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
177
+ label?: string | undefined;
178
+ }[];
179
+ waitMs: number;
180
+ fallback: "skip" | "show_as_modal" | "end_guide" | "wait";
181
+ scrollIntoView: boolean;
182
+ textSnapshot?: string | undefined;
183
+ }, {
184
+ selectors: {
185
+ value: string;
186
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
187
+ label?: string | undefined;
188
+ }[];
189
+ waitMs?: number | undefined;
190
+ fallback?: "skip" | "show_as_modal" | "end_guide" | "wait" | undefined;
191
+ scrollIntoView?: boolean | undefined;
192
+ textSnapshot?: string | undefined;
193
+ }>>;
194
+ placement: z.ZodDefault<z.ZodEnum<["top", "top-start", "top-end", "right", "right-start", "right-end", "bottom", "bottom-start", "bottom-end", "left", "left-start", "left-end", "auto"]>>;
195
+ /** Pixel offset between anchor and card. */
196
+ offset: z.ZodDefault<z.ZodNumber>;
197
+ showOverlay: z.ZodDefault<z.ZodBoolean>;
198
+ showProgress: z.ZodDefault<z.ZodBoolean>;
199
+ showClose: z.ZodDefault<z.ZodBoolean>;
200
+ dismissOnOutsideClick: z.ZodDefault<z.ZodBoolean>;
201
+ /** Highlight padding for spotlight. */
202
+ spotlightPadding: z.ZodDefault<z.ZodNumber>;
203
+ /** Banner/slideout position. */
204
+ position: z.ZodDefault<z.ZodEnum<["top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right", "center"]>>;
205
+ /** URL pattern this step belongs to (for multi-page flows). */
206
+ url: z.ZodOptional<z.ZodString>;
207
+ /** Automatic advancement. */
208
+ advanceOn: z.ZodDefault<z.ZodEnum<["button", "element_click", "element_visible", "event", "delay", "any"]>>;
209
+ advanceValue: z.ZodOptional<z.ZodString>;
210
+ advanceDelayMs: z.ZodOptional<z.ZodNumber>;
211
+ branches: z.ZodDefault<z.ZodArray<z.ZodObject<{
212
+ id: z.ZodString;
213
+ /** Rule group evaluated against targeting context when leaving the step. */
214
+ when: z.ZodType<RuleGroup, z.ZodTypeDef, RuleGroup>;
215
+ /** Step id to jump to. */
216
+ goTo: z.ZodString;
217
+ }, "strip", z.ZodTypeAny, {
218
+ id: string;
219
+ when: RuleGroup;
220
+ goTo: string;
221
+ }, {
222
+ id: string;
223
+ when: RuleGroup;
224
+ goTo: string;
225
+ }>, "many">>;
226
+ width: z.ZodOptional<z.ZodNumber>;
227
+ /** Step-level targeting: skip step when rules do not match. */
228
+ targeting: z.ZodOptional<z.ZodType<RuleGroup, z.ZodTypeDef, RuleGroup>>;
229
+ /** Hotspot pulse dot settings. */
230
+ hotspot: z.ZodOptional<z.ZodObject<{
231
+ size: z.ZodDefault<z.ZodNumber>;
232
+ pulse: z.ZodDefault<z.ZodBoolean>;
233
+ openOn: z.ZodDefault<z.ZodEnum<["click", "hover"]>>;
234
+ }, "strip", z.ZodTypeAny, {
235
+ size: number;
236
+ pulse: boolean;
237
+ openOn: "click" | "hover";
238
+ }, {
239
+ size?: number | undefined;
240
+ pulse?: boolean | undefined;
241
+ openOn?: "click" | "hover" | undefined;
242
+ }>>;
243
+ /** Custom step: arbitrary sanitized HTML with no chrome. */
244
+ customHtml: z.ZodOptional<z.ZodString>;
245
+ }, "strip", z.ZodTypeAny, {
246
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
247
+ id: string;
248
+ title: string;
249
+ body: string;
250
+ buttons: {
251
+ id: string;
252
+ label: string;
253
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
254
+ variant: "primary" | "secondary" | "ghost" | "link";
255
+ value?: string | undefined;
256
+ newTab?: boolean | undefined;
257
+ }[];
258
+ placement: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto";
259
+ offset: number;
260
+ showOverlay: boolean;
261
+ showProgress: boolean;
262
+ showClose: boolean;
263
+ dismissOnOutsideClick: boolean;
264
+ spotlightPadding: number;
265
+ position: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center";
266
+ advanceOn: "event" | "button" | "element_click" | "element_visible" | "delay" | "any";
267
+ branches: {
268
+ id: string;
269
+ when: RuleGroup;
270
+ goTo: string;
271
+ }[];
272
+ hotspot?: {
273
+ size: number;
274
+ pulse: boolean;
275
+ openOn: "click" | "hover";
276
+ } | undefined;
277
+ url?: string | undefined;
278
+ imageUrl?: string | undefined;
279
+ target?: {
280
+ selectors: {
281
+ value: string;
282
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
283
+ label?: string | undefined;
284
+ }[];
285
+ waitMs: number;
286
+ fallback: "skip" | "show_as_modal" | "end_guide" | "wait";
287
+ scrollIntoView: boolean;
288
+ textSnapshot?: string | undefined;
289
+ } | undefined;
290
+ advanceValue?: string | undefined;
291
+ advanceDelayMs?: number | undefined;
292
+ width?: number | undefined;
293
+ targeting?: RuleGroup | undefined;
294
+ customHtml?: string | undefined;
295
+ }, {
296
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
297
+ id: string;
298
+ hotspot?: {
299
+ size?: number | undefined;
300
+ pulse?: boolean | undefined;
301
+ openOn?: "click" | "hover" | undefined;
302
+ } | undefined;
303
+ url?: string | undefined;
304
+ title?: string | undefined;
305
+ body?: string | undefined;
306
+ imageUrl?: string | undefined;
307
+ buttons?: {
308
+ id: string;
309
+ label: string;
310
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
311
+ value?: string | undefined;
312
+ variant?: "primary" | "secondary" | "ghost" | "link" | undefined;
313
+ newTab?: boolean | undefined;
314
+ }[] | undefined;
315
+ target?: {
316
+ selectors: {
317
+ value: string;
318
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
319
+ label?: string | undefined;
320
+ }[];
321
+ waitMs?: number | undefined;
322
+ fallback?: "skip" | "show_as_modal" | "end_guide" | "wait" | undefined;
323
+ scrollIntoView?: boolean | undefined;
324
+ textSnapshot?: string | undefined;
325
+ } | undefined;
326
+ placement?: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto" | undefined;
327
+ offset?: number | undefined;
328
+ showOverlay?: boolean | undefined;
329
+ showProgress?: boolean | undefined;
330
+ showClose?: boolean | undefined;
331
+ dismissOnOutsideClick?: boolean | undefined;
332
+ spotlightPadding?: number | undefined;
333
+ position?: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center" | undefined;
334
+ advanceOn?: "event" | "button" | "element_click" | "element_visible" | "delay" | "any" | undefined;
335
+ advanceValue?: string | undefined;
336
+ advanceDelayMs?: number | undefined;
337
+ branches?: {
338
+ id: string;
339
+ when: RuleGroup;
340
+ goTo: string;
341
+ }[] | undefined;
342
+ width?: number | undefined;
343
+ targeting?: RuleGroup | undefined;
344
+ customHtml?: string | undefined;
345
+ }>;
346
+ type GuideStep = z.infer<typeof StepSchema>;
347
+ type GuideStepInput = z.input<typeof StepSchema>;
348
+ declare const TRIGGER_TYPES: readonly ["page_load", "url_match", "event", "element_click", "element_visible", "manual", "delay", "after_guide", "segment_enter"];
349
+ declare const TriggerSchema: z.ZodObject<{
350
+ type: z.ZodDefault<z.ZodEnum<["page_load", "url_match", "event", "element_click", "element_visible", "manual", "delay", "after_guide", "segment_enter"]>>;
351
+ /** url pattern, event name, selector, guide id, audience id depending on type */
352
+ value: z.ZodOptional<z.ZodString>;
353
+ delayMs: z.ZodDefault<z.ZodNumber>;
354
+ /** Also require URL to match this pattern (any trigger). */
355
+ urlPattern: z.ZodOptional<z.ZodString>;
356
+ }, "strip", z.ZodTypeAny, {
357
+ type: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter";
358
+ delayMs: number;
359
+ value?: string | undefined;
360
+ urlPattern?: string | undefined;
361
+ }, {
362
+ value?: string | undefined;
363
+ type?: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter" | undefined;
364
+ delayMs?: number | undefined;
365
+ urlPattern?: string | undefined;
366
+ }>;
367
+ type TriggerConfig = z.infer<typeof TriggerSchema>;
368
+ declare const FrequencySchema: z.ZodObject<{
369
+ mode: z.ZodDefault<z.ZodEnum<["once", "once_per_session", "every_time", "interval"]>>;
370
+ intervalHours: z.ZodOptional<z.ZodNumber>;
371
+ maxImpressions: z.ZodOptional<z.ZodNumber>;
372
+ /** Hours to wait after dismissal before eligible again (when not `once`). */
373
+ cooldownHours: z.ZodDefault<z.ZodNumber>;
374
+ /** Lower number wins when multiple guides qualify. */
375
+ priority: z.ZodDefault<z.ZodNumber>;
376
+ /** Guide ids that must not be active at the same time. */
377
+ mutuallyExclusiveWith: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
378
+ /** Re-show if dismissed (otherwise dismissal counts as completion for frequency). */
379
+ reshowAfterDismiss: z.ZodDefault<z.ZodBoolean>;
380
+ }, "strip", z.ZodTypeAny, {
381
+ mode: "once" | "once_per_session" | "every_time" | "interval";
382
+ cooldownHours: number;
383
+ priority: number;
384
+ mutuallyExclusiveWith: string[];
385
+ reshowAfterDismiss: boolean;
386
+ intervalHours?: number | undefined;
387
+ maxImpressions?: number | undefined;
388
+ }, {
389
+ mode?: "once" | "once_per_session" | "every_time" | "interval" | undefined;
390
+ intervalHours?: number | undefined;
391
+ maxImpressions?: number | undefined;
392
+ cooldownHours?: number | undefined;
393
+ priority?: number | undefined;
394
+ mutuallyExclusiveWith?: string[] | undefined;
395
+ reshowAfterDismiss?: boolean | undefined;
396
+ }>;
397
+ type FrequencyConfig = z.infer<typeof FrequencySchema>;
398
+ declare const AppearanceSchema: z.ZodObject<{
399
+ theme: z.ZodDefault<z.ZodEnum<["light", "dark", "auto"]>>;
400
+ primaryColor: z.ZodOptional<z.ZodString>;
401
+ backgroundColor: z.ZodOptional<z.ZodString>;
402
+ textColor: z.ZodOptional<z.ZodString>;
403
+ borderRadius: z.ZodOptional<z.ZodNumber>;
404
+ fontFamily: z.ZodOptional<z.ZodString>;
405
+ overlayOpacity: z.ZodOptional<z.ZodNumber>;
406
+ zIndex: z.ZodOptional<z.ZodNumber>;
407
+ preset: z.ZodOptional<z.ZodString>;
408
+ animation: z.ZodDefault<z.ZodEnum<["fade", "slide", "none"]>>;
409
+ }, "strip", z.ZodTypeAny, {
410
+ theme: "auto" | "light" | "dark";
411
+ animation: "none" | "fade" | "slide";
412
+ primaryColor?: string | undefined;
413
+ backgroundColor?: string | undefined;
414
+ textColor?: string | undefined;
415
+ borderRadius?: number | undefined;
416
+ fontFamily?: string | undefined;
417
+ overlayOpacity?: number | undefined;
418
+ zIndex?: number | undefined;
419
+ preset?: string | undefined;
420
+ }, {
421
+ theme?: "auto" | "light" | "dark" | undefined;
422
+ primaryColor?: string | undefined;
423
+ backgroundColor?: string | undefined;
424
+ textColor?: string | undefined;
425
+ borderRadius?: number | undefined;
426
+ fontFamily?: string | undefined;
427
+ overlayOpacity?: number | undefined;
428
+ zIndex?: number | undefined;
429
+ preset?: string | undefined;
430
+ animation?: "none" | "fade" | "slide" | undefined;
431
+ }>;
432
+ type Appearance = z.infer<typeof AppearanceSchema>;
433
+ declare const ChecklistTaskSchema: z.ZodObject<{
434
+ id: z.ZodString;
435
+ title: z.ZodString;
436
+ description: z.ZodDefault<z.ZodString>;
437
+ /** How the task completes. */
438
+ completion: z.ZodDefault<z.ZodEnum<["manual", "event", "guide_completed", "url_visited", "click"]>>;
439
+ completionValue: z.ZodOptional<z.ZodString>;
440
+ /** Optional action when clicking the task. */
441
+ action: z.ZodDefault<z.ZodEnum<["none", "start_guide", "url", "event"]>>;
442
+ actionValue: z.ZodOptional<z.ZodString>;
443
+ required: z.ZodDefault<z.ZodBoolean>;
444
+ }, "strip", z.ZodTypeAny, {
445
+ id: string;
446
+ action: "url" | "start_guide" | "event" | "none";
447
+ title: string;
448
+ description: string;
449
+ completion: "event" | "click" | "manual" | "guide_completed" | "url_visited";
450
+ required: boolean;
451
+ completionValue?: string | undefined;
452
+ actionValue?: string | undefined;
453
+ }, {
454
+ id: string;
455
+ title: string;
456
+ action?: "url" | "start_guide" | "event" | "none" | undefined;
457
+ description?: string | undefined;
458
+ completion?: "event" | "click" | "manual" | "guide_completed" | "url_visited" | undefined;
459
+ completionValue?: string | undefined;
460
+ actionValue?: string | undefined;
461
+ required?: boolean | undefined;
462
+ }>;
463
+ type ChecklistTask = z.infer<typeof ChecklistTaskSchema>;
464
+ declare const ChecklistConfigSchema: z.ZodObject<{
465
+ tasks: z.ZodArray<z.ZodObject<{
466
+ id: z.ZodString;
467
+ title: z.ZodString;
468
+ description: z.ZodDefault<z.ZodString>;
469
+ /** How the task completes. */
470
+ completion: z.ZodDefault<z.ZodEnum<["manual", "event", "guide_completed", "url_visited", "click"]>>;
471
+ completionValue: z.ZodOptional<z.ZodString>;
472
+ /** Optional action when clicking the task. */
473
+ action: z.ZodDefault<z.ZodEnum<["none", "start_guide", "url", "event"]>>;
474
+ actionValue: z.ZodOptional<z.ZodString>;
475
+ required: z.ZodDefault<z.ZodBoolean>;
476
+ }, "strip", z.ZodTypeAny, {
477
+ id: string;
478
+ action: "url" | "start_guide" | "event" | "none";
479
+ title: string;
480
+ description: string;
481
+ completion: "event" | "click" | "manual" | "guide_completed" | "url_visited";
482
+ required: boolean;
483
+ completionValue?: string | undefined;
484
+ actionValue?: string | undefined;
485
+ }, {
486
+ id: string;
487
+ title: string;
488
+ action?: "url" | "start_guide" | "event" | "none" | undefined;
489
+ description?: string | undefined;
490
+ completion?: "event" | "click" | "manual" | "guide_completed" | "url_visited" | undefined;
491
+ completionValue?: string | undefined;
492
+ actionValue?: string | undefined;
493
+ required?: boolean | undefined;
494
+ }>, "many">;
495
+ ordered: z.ZodDefault<z.ZodBoolean>;
496
+ launcherLabel: z.ZodDefault<z.ZodString>;
497
+ position: z.ZodDefault<z.ZodEnum<["bottom-right", "bottom-left"]>>;
498
+ completionTitle: z.ZodDefault<z.ZodString>;
499
+ completionBody: z.ZodDefault<z.ZodString>;
500
+ autoOpen: z.ZodDefault<z.ZodBoolean>;
501
+ dismissible: z.ZodDefault<z.ZodBoolean>;
502
+ }, "strip", z.ZodTypeAny, {
503
+ position: "bottom-left" | "bottom-right";
504
+ tasks: {
505
+ id: string;
506
+ action: "url" | "start_guide" | "event" | "none";
507
+ title: string;
508
+ description: string;
509
+ completion: "event" | "click" | "manual" | "guide_completed" | "url_visited";
510
+ required: boolean;
511
+ completionValue?: string | undefined;
512
+ actionValue?: string | undefined;
513
+ }[];
514
+ ordered: boolean;
515
+ launcherLabel: string;
516
+ completionTitle: string;
517
+ completionBody: string;
518
+ autoOpen: boolean;
519
+ dismissible: boolean;
520
+ }, {
521
+ tasks: {
522
+ id: string;
523
+ title: string;
524
+ action?: "url" | "start_guide" | "event" | "none" | undefined;
525
+ description?: string | undefined;
526
+ completion?: "event" | "click" | "manual" | "guide_completed" | "url_visited" | undefined;
527
+ completionValue?: string | undefined;
528
+ actionValue?: string | undefined;
529
+ required?: boolean | undefined;
530
+ }[];
531
+ position?: "bottom-left" | "bottom-right" | undefined;
532
+ ordered?: boolean | undefined;
533
+ launcherLabel?: string | undefined;
534
+ completionTitle?: string | undefined;
535
+ completionBody?: string | undefined;
536
+ autoOpen?: boolean | undefined;
537
+ dismissible?: boolean | undefined;
538
+ }>;
539
+ type ChecklistConfig = z.infer<typeof ChecklistConfigSchema>;
540
+ declare const SURVEY_QUESTION_TYPES: readonly ["nps", "csat", "thumbs", "single_choice", "multiple_choice", "text", "rating"];
541
+ declare const SurveyQuestionSchema: z.ZodObject<{
542
+ id: z.ZodString;
543
+ type: z.ZodEnum<["nps", "csat", "thumbs", "single_choice", "multiple_choice", "text", "rating"]>;
544
+ title: z.ZodString;
545
+ description: z.ZodDefault<z.ZodString>;
546
+ required: z.ZodDefault<z.ZodBoolean>;
547
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
548
+ id: z.ZodString;
549
+ label: z.ZodString;
550
+ }, "strip", z.ZodTypeAny, {
551
+ id: string;
552
+ label: string;
553
+ }, {
554
+ id: string;
555
+ label: string;
556
+ }>, "many">>;
557
+ scaleMax: z.ZodOptional<z.ZodNumber>;
558
+ lowLabel: z.ZodOptional<z.ZodString>;
559
+ highLabel: z.ZodOptional<z.ZodString>;
560
+ placeholder: z.ZodOptional<z.ZodString>;
561
+ /** Conditional follow-up: show only when a previous answer matches. */
562
+ showWhen: z.ZodOptional<z.ZodObject<{
563
+ questionId: z.ZodString;
564
+ op: z.ZodEnum<["equals", "lte", "gte", "in"]>;
565
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodArray<z.ZodString, "many">]>;
566
+ }, "strip", z.ZodTypeAny, {
567
+ value: string | number | string[];
568
+ op: "equals" | "gte" | "lte" | "in";
569
+ questionId: string;
570
+ }, {
571
+ value: string | number | string[];
572
+ op: "equals" | "gte" | "lte" | "in";
573
+ questionId: string;
574
+ }>>;
575
+ }, "strip", z.ZodTypeAny, {
576
+ options: {
577
+ id: string;
578
+ label: string;
579
+ }[];
580
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
581
+ id: string;
582
+ title: string;
583
+ description: string;
584
+ required: boolean;
585
+ scaleMax?: number | undefined;
586
+ lowLabel?: string | undefined;
587
+ highLabel?: string | undefined;
588
+ placeholder?: string | undefined;
589
+ showWhen?: {
590
+ value: string | number | string[];
591
+ op: "equals" | "gte" | "lte" | "in";
592
+ questionId: string;
593
+ } | undefined;
594
+ }, {
595
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
596
+ id: string;
597
+ title: string;
598
+ options?: {
599
+ id: string;
600
+ label: string;
601
+ }[] | undefined;
602
+ description?: string | undefined;
603
+ required?: boolean | undefined;
604
+ scaleMax?: number | undefined;
605
+ lowLabel?: string | undefined;
606
+ highLabel?: string | undefined;
607
+ placeholder?: string | undefined;
608
+ showWhen?: {
609
+ value: string | number | string[];
610
+ op: "equals" | "gte" | "lte" | "in";
611
+ questionId: string;
612
+ } | undefined;
613
+ }>;
614
+ type SurveyQuestion = z.infer<typeof SurveyQuestionSchema>;
615
+ declare const SurveyConfigSchema: z.ZodObject<{
616
+ questions: z.ZodArray<z.ZodObject<{
617
+ id: z.ZodString;
618
+ type: z.ZodEnum<["nps", "csat", "thumbs", "single_choice", "multiple_choice", "text", "rating"]>;
619
+ title: z.ZodString;
620
+ description: z.ZodDefault<z.ZodString>;
621
+ required: z.ZodDefault<z.ZodBoolean>;
622
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
623
+ id: z.ZodString;
624
+ label: z.ZodString;
625
+ }, "strip", z.ZodTypeAny, {
626
+ id: string;
627
+ label: string;
628
+ }, {
629
+ id: string;
630
+ label: string;
631
+ }>, "many">>;
632
+ scaleMax: z.ZodOptional<z.ZodNumber>;
633
+ lowLabel: z.ZodOptional<z.ZodString>;
634
+ highLabel: z.ZodOptional<z.ZodString>;
635
+ placeholder: z.ZodOptional<z.ZodString>;
636
+ /** Conditional follow-up: show only when a previous answer matches. */
637
+ showWhen: z.ZodOptional<z.ZodObject<{
638
+ questionId: z.ZodString;
639
+ op: z.ZodEnum<["equals", "lte", "gte", "in"]>;
640
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodArray<z.ZodString, "many">]>;
641
+ }, "strip", z.ZodTypeAny, {
642
+ value: string | number | string[];
643
+ op: "equals" | "gte" | "lte" | "in";
644
+ questionId: string;
645
+ }, {
646
+ value: string | number | string[];
647
+ op: "equals" | "gte" | "lte" | "in";
648
+ questionId: string;
649
+ }>>;
650
+ }, "strip", z.ZodTypeAny, {
651
+ options: {
652
+ id: string;
653
+ label: string;
654
+ }[];
655
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
656
+ id: string;
657
+ title: string;
658
+ description: string;
659
+ required: boolean;
660
+ scaleMax?: number | undefined;
661
+ lowLabel?: string | undefined;
662
+ highLabel?: string | undefined;
663
+ placeholder?: string | undefined;
664
+ showWhen?: {
665
+ value: string | number | string[];
666
+ op: "equals" | "gte" | "lte" | "in";
667
+ questionId: string;
668
+ } | undefined;
669
+ }, {
670
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
671
+ id: string;
672
+ title: string;
673
+ options?: {
674
+ id: string;
675
+ label: string;
676
+ }[] | undefined;
677
+ description?: string | undefined;
678
+ required?: boolean | undefined;
679
+ scaleMax?: number | undefined;
680
+ lowLabel?: string | undefined;
681
+ highLabel?: string | undefined;
682
+ placeholder?: string | undefined;
683
+ showWhen?: {
684
+ value: string | number | string[];
685
+ op: "equals" | "gte" | "lte" | "in";
686
+ questionId: string;
687
+ } | undefined;
688
+ }>, "many">;
689
+ thankYouTitle: z.ZodDefault<z.ZodString>;
690
+ thankYouBody: z.ZodDefault<z.ZodString>;
691
+ position: z.ZodDefault<z.ZodEnum<["bottom-right", "bottom-left", "center"]>>;
692
+ startAt: z.ZodOptional<z.ZodString>;
693
+ endAt: z.ZodOptional<z.ZodString>;
694
+ }, "strip", z.ZodTypeAny, {
695
+ position: "bottom-left" | "bottom-right" | "center";
696
+ questions: {
697
+ options: {
698
+ id: string;
699
+ label: string;
700
+ }[];
701
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
702
+ id: string;
703
+ title: string;
704
+ description: string;
705
+ required: boolean;
706
+ scaleMax?: number | undefined;
707
+ lowLabel?: string | undefined;
708
+ highLabel?: string | undefined;
709
+ placeholder?: string | undefined;
710
+ showWhen?: {
711
+ value: string | number | string[];
712
+ op: "equals" | "gte" | "lte" | "in";
713
+ questionId: string;
714
+ } | undefined;
715
+ }[];
716
+ thankYouTitle: string;
717
+ thankYouBody: string;
718
+ startAt?: string | undefined;
719
+ endAt?: string | undefined;
720
+ }, {
721
+ questions: {
722
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
723
+ id: string;
724
+ title: string;
725
+ options?: {
726
+ id: string;
727
+ label: string;
728
+ }[] | undefined;
729
+ description?: string | undefined;
730
+ required?: boolean | undefined;
731
+ scaleMax?: number | undefined;
732
+ lowLabel?: string | undefined;
733
+ highLabel?: string | undefined;
734
+ placeholder?: string | undefined;
735
+ showWhen?: {
736
+ value: string | number | string[];
737
+ op: "equals" | "gte" | "lte" | "in";
738
+ questionId: string;
739
+ } | undefined;
740
+ }[];
741
+ position?: "bottom-left" | "bottom-right" | "center" | undefined;
742
+ thankYouTitle?: string | undefined;
743
+ thankYouBody?: string | undefined;
744
+ startAt?: string | undefined;
745
+ endAt?: string | undefined;
746
+ }>;
747
+ type SurveyConfig = z.infer<typeof SurveyConfigSchema>;
748
+ declare const GuideConfigSchema: z.ZodObject<{
749
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
750
+ id: z.ZodString;
751
+ type: z.ZodEnum<["modal", "tooltip", "popover", "spotlight", "hotspot", "banner", "slideout", "checklist", "custom", "survey"]>;
752
+ title: z.ZodDefault<z.ZodString>;
753
+ /** Sanitized HTML body (links, images, lists, formatting). */
754
+ body: z.ZodDefault<z.ZodString>;
755
+ imageUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
756
+ buttons: z.ZodDefault<z.ZodArray<z.ZodObject<{
757
+ id: z.ZodString;
758
+ label: z.ZodString;
759
+ action: z.ZodEnum<["next", "back", "dismiss", "complete", "skip", "url", "start_guide", "event", "open_resource_center", "none"]>;
760
+ variant: z.ZodDefault<z.ZodEnum<["primary", "secondary", "ghost", "link"]>>;
761
+ /** url for `url`, guide id for `start_guide`, event name for `event`, step id for `next` branch override */
762
+ value: z.ZodOptional<z.ZodString>;
763
+ newTab: z.ZodOptional<z.ZodBoolean>;
764
+ }, "strip", z.ZodTypeAny, {
765
+ id: string;
766
+ label: string;
767
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
768
+ variant: "primary" | "secondary" | "ghost" | "link";
769
+ value?: string | undefined;
770
+ newTab?: boolean | undefined;
771
+ }, {
772
+ id: string;
773
+ label: string;
774
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
775
+ value?: string | undefined;
776
+ variant?: "primary" | "secondary" | "ghost" | "link" | undefined;
777
+ newTab?: boolean | undefined;
778
+ }>, "many">>;
779
+ target: z.ZodOptional<z.ZodObject<{
780
+ /** Ordered strategies; the first one resolving to exactly one element wins. */
781
+ selectors: z.ZodArray<z.ZodObject<{
782
+ kind: z.ZodEnum<["css", "id", "data-attr", "aria", "text", "xpath"]>;
783
+ value: z.ZodString;
784
+ /** Optional human-readable label captured at pick time. */
785
+ label: z.ZodOptional<z.ZodString>;
786
+ }, "strip", z.ZodTypeAny, {
787
+ value: string;
788
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
789
+ label?: string | undefined;
790
+ }, {
791
+ value: string;
792
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
793
+ label?: string | undefined;
794
+ }>, "many">;
795
+ /** How long to wait for the element before applying fallback. */
796
+ waitMs: z.ZodDefault<z.ZodNumber>;
797
+ /** What to do when the element never shows up. */
798
+ fallback: z.ZodDefault<z.ZodEnum<["skip", "show_as_modal", "end_guide", "wait"]>>;
799
+ /** Scroll the element into view before positioning. */
800
+ scrollIntoView: z.ZodDefault<z.ZodBoolean>;
801
+ /** Text snapshot captured at pick time; used for authoring warnings. */
802
+ textSnapshot: z.ZodOptional<z.ZodString>;
803
+ }, "strip", z.ZodTypeAny, {
804
+ selectors: {
805
+ value: string;
806
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
807
+ label?: string | undefined;
808
+ }[];
809
+ waitMs: number;
810
+ fallback: "skip" | "show_as_modal" | "end_guide" | "wait";
811
+ scrollIntoView: boolean;
812
+ textSnapshot?: string | undefined;
813
+ }, {
814
+ selectors: {
815
+ value: string;
816
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
817
+ label?: string | undefined;
818
+ }[];
819
+ waitMs?: number | undefined;
820
+ fallback?: "skip" | "show_as_modal" | "end_guide" | "wait" | undefined;
821
+ scrollIntoView?: boolean | undefined;
822
+ textSnapshot?: string | undefined;
823
+ }>>;
824
+ placement: z.ZodDefault<z.ZodEnum<["top", "top-start", "top-end", "right", "right-start", "right-end", "bottom", "bottom-start", "bottom-end", "left", "left-start", "left-end", "auto"]>>;
825
+ /** Pixel offset between anchor and card. */
826
+ offset: z.ZodDefault<z.ZodNumber>;
827
+ showOverlay: z.ZodDefault<z.ZodBoolean>;
828
+ showProgress: z.ZodDefault<z.ZodBoolean>;
829
+ showClose: z.ZodDefault<z.ZodBoolean>;
830
+ dismissOnOutsideClick: z.ZodDefault<z.ZodBoolean>;
831
+ /** Highlight padding for spotlight. */
832
+ spotlightPadding: z.ZodDefault<z.ZodNumber>;
833
+ /** Banner/slideout position. */
834
+ position: z.ZodDefault<z.ZodEnum<["top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right", "center"]>>;
835
+ /** URL pattern this step belongs to (for multi-page flows). */
836
+ url: z.ZodOptional<z.ZodString>;
837
+ /** Automatic advancement. */
838
+ advanceOn: z.ZodDefault<z.ZodEnum<["button", "element_click", "element_visible", "event", "delay", "any"]>>;
839
+ advanceValue: z.ZodOptional<z.ZodString>;
840
+ advanceDelayMs: z.ZodOptional<z.ZodNumber>;
841
+ branches: z.ZodDefault<z.ZodArray<z.ZodObject<{
842
+ id: z.ZodString;
843
+ /** Rule group evaluated against targeting context when leaving the step. */
844
+ when: z.ZodType<RuleGroup, z.ZodTypeDef, RuleGroup>;
845
+ /** Step id to jump to. */
846
+ goTo: z.ZodString;
847
+ }, "strip", z.ZodTypeAny, {
848
+ id: string;
849
+ when: RuleGroup;
850
+ goTo: string;
851
+ }, {
852
+ id: string;
853
+ when: RuleGroup;
854
+ goTo: string;
855
+ }>, "many">>;
856
+ width: z.ZodOptional<z.ZodNumber>;
857
+ /** Step-level targeting: skip step when rules do not match. */
858
+ targeting: z.ZodOptional<z.ZodType<RuleGroup, z.ZodTypeDef, RuleGroup>>;
859
+ /** Hotspot pulse dot settings. */
860
+ hotspot: z.ZodOptional<z.ZodObject<{
861
+ size: z.ZodDefault<z.ZodNumber>;
862
+ pulse: z.ZodDefault<z.ZodBoolean>;
863
+ openOn: z.ZodDefault<z.ZodEnum<["click", "hover"]>>;
864
+ }, "strip", z.ZodTypeAny, {
865
+ size: number;
866
+ pulse: boolean;
867
+ openOn: "click" | "hover";
868
+ }, {
869
+ size?: number | undefined;
870
+ pulse?: boolean | undefined;
871
+ openOn?: "click" | "hover" | undefined;
872
+ }>>;
873
+ /** Custom step: arbitrary sanitized HTML with no chrome. */
874
+ customHtml: z.ZodOptional<z.ZodString>;
875
+ }, "strip", z.ZodTypeAny, {
876
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
877
+ id: string;
878
+ title: string;
879
+ body: string;
880
+ buttons: {
881
+ id: string;
882
+ label: string;
883
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
884
+ variant: "primary" | "secondary" | "ghost" | "link";
885
+ value?: string | undefined;
886
+ newTab?: boolean | undefined;
887
+ }[];
888
+ placement: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto";
889
+ offset: number;
890
+ showOverlay: boolean;
891
+ showProgress: boolean;
892
+ showClose: boolean;
893
+ dismissOnOutsideClick: boolean;
894
+ spotlightPadding: number;
895
+ position: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center";
896
+ advanceOn: "event" | "button" | "element_click" | "element_visible" | "delay" | "any";
897
+ branches: {
898
+ id: string;
899
+ when: RuleGroup;
900
+ goTo: string;
901
+ }[];
902
+ hotspot?: {
903
+ size: number;
904
+ pulse: boolean;
905
+ openOn: "click" | "hover";
906
+ } | undefined;
907
+ url?: string | undefined;
908
+ imageUrl?: string | undefined;
909
+ target?: {
910
+ selectors: {
911
+ value: string;
912
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
913
+ label?: string | undefined;
914
+ }[];
915
+ waitMs: number;
916
+ fallback: "skip" | "show_as_modal" | "end_guide" | "wait";
917
+ scrollIntoView: boolean;
918
+ textSnapshot?: string | undefined;
919
+ } | undefined;
920
+ advanceValue?: string | undefined;
921
+ advanceDelayMs?: number | undefined;
922
+ width?: number | undefined;
923
+ targeting?: RuleGroup | undefined;
924
+ customHtml?: string | undefined;
925
+ }, {
926
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
927
+ id: string;
928
+ hotspot?: {
929
+ size?: number | undefined;
930
+ pulse?: boolean | undefined;
931
+ openOn?: "click" | "hover" | undefined;
932
+ } | undefined;
933
+ url?: string | undefined;
934
+ title?: string | undefined;
935
+ body?: string | undefined;
936
+ imageUrl?: string | undefined;
937
+ buttons?: {
938
+ id: string;
939
+ label: string;
940
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
941
+ value?: string | undefined;
942
+ variant?: "primary" | "secondary" | "ghost" | "link" | undefined;
943
+ newTab?: boolean | undefined;
944
+ }[] | undefined;
945
+ target?: {
946
+ selectors: {
947
+ value: string;
948
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
949
+ label?: string | undefined;
950
+ }[];
951
+ waitMs?: number | undefined;
952
+ fallback?: "skip" | "show_as_modal" | "end_guide" | "wait" | undefined;
953
+ scrollIntoView?: boolean | undefined;
954
+ textSnapshot?: string | undefined;
955
+ } | undefined;
956
+ placement?: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto" | undefined;
957
+ offset?: number | undefined;
958
+ showOverlay?: boolean | undefined;
959
+ showProgress?: boolean | undefined;
960
+ showClose?: boolean | undefined;
961
+ dismissOnOutsideClick?: boolean | undefined;
962
+ spotlightPadding?: number | undefined;
963
+ position?: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center" | undefined;
964
+ advanceOn?: "event" | "button" | "element_click" | "element_visible" | "delay" | "any" | undefined;
965
+ advanceValue?: string | undefined;
966
+ advanceDelayMs?: number | undefined;
967
+ branches?: {
968
+ id: string;
969
+ when: RuleGroup;
970
+ goTo: string;
971
+ }[] | undefined;
972
+ width?: number | undefined;
973
+ targeting?: RuleGroup | undefined;
974
+ customHtml?: string | undefined;
975
+ }>, "many">>;
976
+ targeting: z.ZodDefault<z.ZodType<RuleGroup, z.ZodTypeDef, RuleGroup>>;
977
+ trigger: z.ZodDefault<z.ZodObject<{
978
+ type: z.ZodDefault<z.ZodEnum<["page_load", "url_match", "event", "element_click", "element_visible", "manual", "delay", "after_guide", "segment_enter"]>>;
979
+ /** url pattern, event name, selector, guide id, audience id depending on type */
980
+ value: z.ZodOptional<z.ZodString>;
981
+ delayMs: z.ZodDefault<z.ZodNumber>;
982
+ /** Also require URL to match this pattern (any trigger). */
983
+ urlPattern: z.ZodOptional<z.ZodString>;
984
+ }, "strip", z.ZodTypeAny, {
985
+ type: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter";
986
+ delayMs: number;
987
+ value?: string | undefined;
988
+ urlPattern?: string | undefined;
989
+ }, {
990
+ value?: string | undefined;
991
+ type?: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter" | undefined;
992
+ delayMs?: number | undefined;
993
+ urlPattern?: string | undefined;
994
+ }>>;
995
+ frequency: z.ZodDefault<z.ZodObject<{
996
+ mode: z.ZodDefault<z.ZodEnum<["once", "once_per_session", "every_time", "interval"]>>;
997
+ intervalHours: z.ZodOptional<z.ZodNumber>;
998
+ maxImpressions: z.ZodOptional<z.ZodNumber>;
999
+ /** Hours to wait after dismissal before eligible again (when not `once`). */
1000
+ cooldownHours: z.ZodDefault<z.ZodNumber>;
1001
+ /** Lower number wins when multiple guides qualify. */
1002
+ priority: z.ZodDefault<z.ZodNumber>;
1003
+ /** Guide ids that must not be active at the same time. */
1004
+ mutuallyExclusiveWith: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1005
+ /** Re-show if dismissed (otherwise dismissal counts as completion for frequency). */
1006
+ reshowAfterDismiss: z.ZodDefault<z.ZodBoolean>;
1007
+ }, "strip", z.ZodTypeAny, {
1008
+ mode: "once" | "once_per_session" | "every_time" | "interval";
1009
+ cooldownHours: number;
1010
+ priority: number;
1011
+ mutuallyExclusiveWith: string[];
1012
+ reshowAfterDismiss: boolean;
1013
+ intervalHours?: number | undefined;
1014
+ maxImpressions?: number | undefined;
1015
+ }, {
1016
+ mode?: "once" | "once_per_session" | "every_time" | "interval" | undefined;
1017
+ intervalHours?: number | undefined;
1018
+ maxImpressions?: number | undefined;
1019
+ cooldownHours?: number | undefined;
1020
+ priority?: number | undefined;
1021
+ mutuallyExclusiveWith?: string[] | undefined;
1022
+ reshowAfterDismiss?: boolean | undefined;
1023
+ }>>;
1024
+ appearance: z.ZodDefault<z.ZodObject<{
1025
+ theme: z.ZodDefault<z.ZodEnum<["light", "dark", "auto"]>>;
1026
+ primaryColor: z.ZodOptional<z.ZodString>;
1027
+ backgroundColor: z.ZodOptional<z.ZodString>;
1028
+ textColor: z.ZodOptional<z.ZodString>;
1029
+ borderRadius: z.ZodOptional<z.ZodNumber>;
1030
+ fontFamily: z.ZodOptional<z.ZodString>;
1031
+ overlayOpacity: z.ZodOptional<z.ZodNumber>;
1032
+ zIndex: z.ZodOptional<z.ZodNumber>;
1033
+ preset: z.ZodOptional<z.ZodString>;
1034
+ animation: z.ZodDefault<z.ZodEnum<["fade", "slide", "none"]>>;
1035
+ }, "strip", z.ZodTypeAny, {
1036
+ theme: "auto" | "light" | "dark";
1037
+ animation: "none" | "fade" | "slide";
1038
+ primaryColor?: string | undefined;
1039
+ backgroundColor?: string | undefined;
1040
+ textColor?: string | undefined;
1041
+ borderRadius?: number | undefined;
1042
+ fontFamily?: string | undefined;
1043
+ overlayOpacity?: number | undefined;
1044
+ zIndex?: number | undefined;
1045
+ preset?: string | undefined;
1046
+ }, {
1047
+ theme?: "auto" | "light" | "dark" | undefined;
1048
+ primaryColor?: string | undefined;
1049
+ backgroundColor?: string | undefined;
1050
+ textColor?: string | undefined;
1051
+ borderRadius?: number | undefined;
1052
+ fontFamily?: string | undefined;
1053
+ overlayOpacity?: number | undefined;
1054
+ zIndex?: number | undefined;
1055
+ preset?: string | undefined;
1056
+ animation?: "none" | "fade" | "slide" | undefined;
1057
+ }>>;
1058
+ checklist: z.ZodOptional<z.ZodObject<{
1059
+ tasks: z.ZodArray<z.ZodObject<{
1060
+ id: z.ZodString;
1061
+ title: z.ZodString;
1062
+ description: z.ZodDefault<z.ZodString>;
1063
+ /** How the task completes. */
1064
+ completion: z.ZodDefault<z.ZodEnum<["manual", "event", "guide_completed", "url_visited", "click"]>>;
1065
+ completionValue: z.ZodOptional<z.ZodString>;
1066
+ /** Optional action when clicking the task. */
1067
+ action: z.ZodDefault<z.ZodEnum<["none", "start_guide", "url", "event"]>>;
1068
+ actionValue: z.ZodOptional<z.ZodString>;
1069
+ required: z.ZodDefault<z.ZodBoolean>;
1070
+ }, "strip", z.ZodTypeAny, {
1071
+ id: string;
1072
+ action: "url" | "start_guide" | "event" | "none";
1073
+ title: string;
1074
+ description: string;
1075
+ completion: "event" | "click" | "manual" | "guide_completed" | "url_visited";
1076
+ required: boolean;
1077
+ completionValue?: string | undefined;
1078
+ actionValue?: string | undefined;
1079
+ }, {
1080
+ id: string;
1081
+ title: string;
1082
+ action?: "url" | "start_guide" | "event" | "none" | undefined;
1083
+ description?: string | undefined;
1084
+ completion?: "event" | "click" | "manual" | "guide_completed" | "url_visited" | undefined;
1085
+ completionValue?: string | undefined;
1086
+ actionValue?: string | undefined;
1087
+ required?: boolean | undefined;
1088
+ }>, "many">;
1089
+ ordered: z.ZodDefault<z.ZodBoolean>;
1090
+ launcherLabel: z.ZodDefault<z.ZodString>;
1091
+ position: z.ZodDefault<z.ZodEnum<["bottom-right", "bottom-left"]>>;
1092
+ completionTitle: z.ZodDefault<z.ZodString>;
1093
+ completionBody: z.ZodDefault<z.ZodString>;
1094
+ autoOpen: z.ZodDefault<z.ZodBoolean>;
1095
+ dismissible: z.ZodDefault<z.ZodBoolean>;
1096
+ }, "strip", z.ZodTypeAny, {
1097
+ position: "bottom-left" | "bottom-right";
1098
+ tasks: {
1099
+ id: string;
1100
+ action: "url" | "start_guide" | "event" | "none";
1101
+ title: string;
1102
+ description: string;
1103
+ completion: "event" | "click" | "manual" | "guide_completed" | "url_visited";
1104
+ required: boolean;
1105
+ completionValue?: string | undefined;
1106
+ actionValue?: string | undefined;
1107
+ }[];
1108
+ ordered: boolean;
1109
+ launcherLabel: string;
1110
+ completionTitle: string;
1111
+ completionBody: string;
1112
+ autoOpen: boolean;
1113
+ dismissible: boolean;
1114
+ }, {
1115
+ tasks: {
1116
+ id: string;
1117
+ title: string;
1118
+ action?: "url" | "start_guide" | "event" | "none" | undefined;
1119
+ description?: string | undefined;
1120
+ completion?: "event" | "click" | "manual" | "guide_completed" | "url_visited" | undefined;
1121
+ completionValue?: string | undefined;
1122
+ actionValue?: string | undefined;
1123
+ required?: boolean | undefined;
1124
+ }[];
1125
+ position?: "bottom-left" | "bottom-right" | undefined;
1126
+ ordered?: boolean | undefined;
1127
+ launcherLabel?: string | undefined;
1128
+ completionTitle?: string | undefined;
1129
+ completionBody?: string | undefined;
1130
+ autoOpen?: boolean | undefined;
1131
+ dismissible?: boolean | undefined;
1132
+ }>>;
1133
+ survey: z.ZodOptional<z.ZodObject<{
1134
+ questions: z.ZodArray<z.ZodObject<{
1135
+ id: z.ZodString;
1136
+ type: z.ZodEnum<["nps", "csat", "thumbs", "single_choice", "multiple_choice", "text", "rating"]>;
1137
+ title: z.ZodString;
1138
+ description: z.ZodDefault<z.ZodString>;
1139
+ required: z.ZodDefault<z.ZodBoolean>;
1140
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
1141
+ id: z.ZodString;
1142
+ label: z.ZodString;
1143
+ }, "strip", z.ZodTypeAny, {
1144
+ id: string;
1145
+ label: string;
1146
+ }, {
1147
+ id: string;
1148
+ label: string;
1149
+ }>, "many">>;
1150
+ scaleMax: z.ZodOptional<z.ZodNumber>;
1151
+ lowLabel: z.ZodOptional<z.ZodString>;
1152
+ highLabel: z.ZodOptional<z.ZodString>;
1153
+ placeholder: z.ZodOptional<z.ZodString>;
1154
+ /** Conditional follow-up: show only when a previous answer matches. */
1155
+ showWhen: z.ZodOptional<z.ZodObject<{
1156
+ questionId: z.ZodString;
1157
+ op: z.ZodEnum<["equals", "lte", "gte", "in"]>;
1158
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodArray<z.ZodString, "many">]>;
1159
+ }, "strip", z.ZodTypeAny, {
1160
+ value: string | number | string[];
1161
+ op: "equals" | "gte" | "lte" | "in";
1162
+ questionId: string;
1163
+ }, {
1164
+ value: string | number | string[];
1165
+ op: "equals" | "gte" | "lte" | "in";
1166
+ questionId: string;
1167
+ }>>;
1168
+ }, "strip", z.ZodTypeAny, {
1169
+ options: {
1170
+ id: string;
1171
+ label: string;
1172
+ }[];
1173
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
1174
+ id: string;
1175
+ title: string;
1176
+ description: string;
1177
+ required: boolean;
1178
+ scaleMax?: number | undefined;
1179
+ lowLabel?: string | undefined;
1180
+ highLabel?: string | undefined;
1181
+ placeholder?: string | undefined;
1182
+ showWhen?: {
1183
+ value: string | number | string[];
1184
+ op: "equals" | "gte" | "lte" | "in";
1185
+ questionId: string;
1186
+ } | undefined;
1187
+ }, {
1188
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
1189
+ id: string;
1190
+ title: string;
1191
+ options?: {
1192
+ id: string;
1193
+ label: string;
1194
+ }[] | undefined;
1195
+ description?: string | undefined;
1196
+ required?: boolean | undefined;
1197
+ scaleMax?: number | undefined;
1198
+ lowLabel?: string | undefined;
1199
+ highLabel?: string | undefined;
1200
+ placeholder?: string | undefined;
1201
+ showWhen?: {
1202
+ value: string | number | string[];
1203
+ op: "equals" | "gte" | "lte" | "in";
1204
+ questionId: string;
1205
+ } | undefined;
1206
+ }>, "many">;
1207
+ thankYouTitle: z.ZodDefault<z.ZodString>;
1208
+ thankYouBody: z.ZodDefault<z.ZodString>;
1209
+ position: z.ZodDefault<z.ZodEnum<["bottom-right", "bottom-left", "center"]>>;
1210
+ startAt: z.ZodOptional<z.ZodString>;
1211
+ endAt: z.ZodOptional<z.ZodString>;
1212
+ }, "strip", z.ZodTypeAny, {
1213
+ position: "bottom-left" | "bottom-right" | "center";
1214
+ questions: {
1215
+ options: {
1216
+ id: string;
1217
+ label: string;
1218
+ }[];
1219
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
1220
+ id: string;
1221
+ title: string;
1222
+ description: string;
1223
+ required: boolean;
1224
+ scaleMax?: number | undefined;
1225
+ lowLabel?: string | undefined;
1226
+ highLabel?: string | undefined;
1227
+ placeholder?: string | undefined;
1228
+ showWhen?: {
1229
+ value: string | number | string[];
1230
+ op: "equals" | "gte" | "lte" | "in";
1231
+ questionId: string;
1232
+ } | undefined;
1233
+ }[];
1234
+ thankYouTitle: string;
1235
+ thankYouBody: string;
1236
+ startAt?: string | undefined;
1237
+ endAt?: string | undefined;
1238
+ }, {
1239
+ questions: {
1240
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
1241
+ id: string;
1242
+ title: string;
1243
+ options?: {
1244
+ id: string;
1245
+ label: string;
1246
+ }[] | undefined;
1247
+ description?: string | undefined;
1248
+ required?: boolean | undefined;
1249
+ scaleMax?: number | undefined;
1250
+ lowLabel?: string | undefined;
1251
+ highLabel?: string | undefined;
1252
+ placeholder?: string | undefined;
1253
+ showWhen?: {
1254
+ value: string | number | string[];
1255
+ op: "equals" | "gte" | "lte" | "in";
1256
+ questionId: string;
1257
+ } | undefined;
1258
+ }[];
1259
+ position?: "bottom-left" | "bottom-right" | "center" | undefined;
1260
+ thankYouTitle?: string | undefined;
1261
+ thankYouBody?: string | undefined;
1262
+ startAt?: string | undefined;
1263
+ endAt?: string | undefined;
1264
+ }>>;
1265
+ /** Restrict guide to url pattern(s) (applied before trigger). */
1266
+ urlPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1267
+ }, "strip", z.ZodTypeAny, {
1268
+ targeting: RuleGroup;
1269
+ steps: {
1270
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
1271
+ id: string;
1272
+ title: string;
1273
+ body: string;
1274
+ buttons: {
1275
+ id: string;
1276
+ label: string;
1277
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
1278
+ variant: "primary" | "secondary" | "ghost" | "link";
1279
+ value?: string | undefined;
1280
+ newTab?: boolean | undefined;
1281
+ }[];
1282
+ placement: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto";
1283
+ offset: number;
1284
+ showOverlay: boolean;
1285
+ showProgress: boolean;
1286
+ showClose: boolean;
1287
+ dismissOnOutsideClick: boolean;
1288
+ spotlightPadding: number;
1289
+ position: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center";
1290
+ advanceOn: "event" | "button" | "element_click" | "element_visible" | "delay" | "any";
1291
+ branches: {
1292
+ id: string;
1293
+ when: RuleGroup;
1294
+ goTo: string;
1295
+ }[];
1296
+ hotspot?: {
1297
+ size: number;
1298
+ pulse: boolean;
1299
+ openOn: "click" | "hover";
1300
+ } | undefined;
1301
+ url?: string | undefined;
1302
+ imageUrl?: string | undefined;
1303
+ target?: {
1304
+ selectors: {
1305
+ value: string;
1306
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
1307
+ label?: string | undefined;
1308
+ }[];
1309
+ waitMs: number;
1310
+ fallback: "skip" | "show_as_modal" | "end_guide" | "wait";
1311
+ scrollIntoView: boolean;
1312
+ textSnapshot?: string | undefined;
1313
+ } | undefined;
1314
+ advanceValue?: string | undefined;
1315
+ advanceDelayMs?: number | undefined;
1316
+ width?: number | undefined;
1317
+ targeting?: RuleGroup | undefined;
1318
+ customHtml?: string | undefined;
1319
+ }[];
1320
+ trigger: {
1321
+ type: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter";
1322
+ delayMs: number;
1323
+ value?: string | undefined;
1324
+ urlPattern?: string | undefined;
1325
+ };
1326
+ frequency: {
1327
+ mode: "once" | "once_per_session" | "every_time" | "interval";
1328
+ cooldownHours: number;
1329
+ priority: number;
1330
+ mutuallyExclusiveWith: string[];
1331
+ reshowAfterDismiss: boolean;
1332
+ intervalHours?: number | undefined;
1333
+ maxImpressions?: number | undefined;
1334
+ };
1335
+ appearance: {
1336
+ theme: "auto" | "light" | "dark";
1337
+ animation: "none" | "fade" | "slide";
1338
+ primaryColor?: string | undefined;
1339
+ backgroundColor?: string | undefined;
1340
+ textColor?: string | undefined;
1341
+ borderRadius?: number | undefined;
1342
+ fontFamily?: string | undefined;
1343
+ overlayOpacity?: number | undefined;
1344
+ zIndex?: number | undefined;
1345
+ preset?: string | undefined;
1346
+ };
1347
+ urlPatterns: string[];
1348
+ checklist?: {
1349
+ position: "bottom-left" | "bottom-right";
1350
+ tasks: {
1351
+ id: string;
1352
+ action: "url" | "start_guide" | "event" | "none";
1353
+ title: string;
1354
+ description: string;
1355
+ completion: "event" | "click" | "manual" | "guide_completed" | "url_visited";
1356
+ required: boolean;
1357
+ completionValue?: string | undefined;
1358
+ actionValue?: string | undefined;
1359
+ }[];
1360
+ ordered: boolean;
1361
+ launcherLabel: string;
1362
+ completionTitle: string;
1363
+ completionBody: string;
1364
+ autoOpen: boolean;
1365
+ dismissible: boolean;
1366
+ } | undefined;
1367
+ survey?: {
1368
+ position: "bottom-left" | "bottom-right" | "center";
1369
+ questions: {
1370
+ options: {
1371
+ id: string;
1372
+ label: string;
1373
+ }[];
1374
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
1375
+ id: string;
1376
+ title: string;
1377
+ description: string;
1378
+ required: boolean;
1379
+ scaleMax?: number | undefined;
1380
+ lowLabel?: string | undefined;
1381
+ highLabel?: string | undefined;
1382
+ placeholder?: string | undefined;
1383
+ showWhen?: {
1384
+ value: string | number | string[];
1385
+ op: "equals" | "gte" | "lte" | "in";
1386
+ questionId: string;
1387
+ } | undefined;
1388
+ }[];
1389
+ thankYouTitle: string;
1390
+ thankYouBody: string;
1391
+ startAt?: string | undefined;
1392
+ endAt?: string | undefined;
1393
+ } | undefined;
1394
+ }, {
1395
+ checklist?: {
1396
+ tasks: {
1397
+ id: string;
1398
+ title: string;
1399
+ action?: "url" | "start_guide" | "event" | "none" | undefined;
1400
+ description?: string | undefined;
1401
+ completion?: "event" | "click" | "manual" | "guide_completed" | "url_visited" | undefined;
1402
+ completionValue?: string | undefined;
1403
+ actionValue?: string | undefined;
1404
+ required?: boolean | undefined;
1405
+ }[];
1406
+ position?: "bottom-left" | "bottom-right" | undefined;
1407
+ ordered?: boolean | undefined;
1408
+ launcherLabel?: string | undefined;
1409
+ completionTitle?: string | undefined;
1410
+ completionBody?: string | undefined;
1411
+ autoOpen?: boolean | undefined;
1412
+ dismissible?: boolean | undefined;
1413
+ } | undefined;
1414
+ survey?: {
1415
+ questions: {
1416
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
1417
+ id: string;
1418
+ title: string;
1419
+ options?: {
1420
+ id: string;
1421
+ label: string;
1422
+ }[] | undefined;
1423
+ description?: string | undefined;
1424
+ required?: boolean | undefined;
1425
+ scaleMax?: number | undefined;
1426
+ lowLabel?: string | undefined;
1427
+ highLabel?: string | undefined;
1428
+ placeholder?: string | undefined;
1429
+ showWhen?: {
1430
+ value: string | number | string[];
1431
+ op: "equals" | "gte" | "lte" | "in";
1432
+ questionId: string;
1433
+ } | undefined;
1434
+ }[];
1435
+ position?: "bottom-left" | "bottom-right" | "center" | undefined;
1436
+ thankYouTitle?: string | undefined;
1437
+ thankYouBody?: string | undefined;
1438
+ startAt?: string | undefined;
1439
+ endAt?: string | undefined;
1440
+ } | undefined;
1441
+ targeting?: RuleGroup | undefined;
1442
+ steps?: {
1443
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
1444
+ id: string;
1445
+ hotspot?: {
1446
+ size?: number | undefined;
1447
+ pulse?: boolean | undefined;
1448
+ openOn?: "click" | "hover" | undefined;
1449
+ } | undefined;
1450
+ url?: string | undefined;
1451
+ title?: string | undefined;
1452
+ body?: string | undefined;
1453
+ imageUrl?: string | undefined;
1454
+ buttons?: {
1455
+ id: string;
1456
+ label: string;
1457
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
1458
+ value?: string | undefined;
1459
+ variant?: "primary" | "secondary" | "ghost" | "link" | undefined;
1460
+ newTab?: boolean | undefined;
1461
+ }[] | undefined;
1462
+ target?: {
1463
+ selectors: {
1464
+ value: string;
1465
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
1466
+ label?: string | undefined;
1467
+ }[];
1468
+ waitMs?: number | undefined;
1469
+ fallback?: "skip" | "show_as_modal" | "end_guide" | "wait" | undefined;
1470
+ scrollIntoView?: boolean | undefined;
1471
+ textSnapshot?: string | undefined;
1472
+ } | undefined;
1473
+ placement?: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto" | undefined;
1474
+ offset?: number | undefined;
1475
+ showOverlay?: boolean | undefined;
1476
+ showProgress?: boolean | undefined;
1477
+ showClose?: boolean | undefined;
1478
+ dismissOnOutsideClick?: boolean | undefined;
1479
+ spotlightPadding?: number | undefined;
1480
+ position?: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center" | undefined;
1481
+ advanceOn?: "event" | "button" | "element_click" | "element_visible" | "delay" | "any" | undefined;
1482
+ advanceValue?: string | undefined;
1483
+ advanceDelayMs?: number | undefined;
1484
+ branches?: {
1485
+ id: string;
1486
+ when: RuleGroup;
1487
+ goTo: string;
1488
+ }[] | undefined;
1489
+ width?: number | undefined;
1490
+ targeting?: RuleGroup | undefined;
1491
+ customHtml?: string | undefined;
1492
+ }[] | undefined;
1493
+ trigger?: {
1494
+ value?: string | undefined;
1495
+ type?: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter" | undefined;
1496
+ delayMs?: number | undefined;
1497
+ urlPattern?: string | undefined;
1498
+ } | undefined;
1499
+ frequency?: {
1500
+ mode?: "once" | "once_per_session" | "every_time" | "interval" | undefined;
1501
+ intervalHours?: number | undefined;
1502
+ maxImpressions?: number | undefined;
1503
+ cooldownHours?: number | undefined;
1504
+ priority?: number | undefined;
1505
+ mutuallyExclusiveWith?: string[] | undefined;
1506
+ reshowAfterDismiss?: boolean | undefined;
1507
+ } | undefined;
1508
+ appearance?: {
1509
+ theme?: "auto" | "light" | "dark" | undefined;
1510
+ primaryColor?: string | undefined;
1511
+ backgroundColor?: string | undefined;
1512
+ textColor?: string | undefined;
1513
+ borderRadius?: number | undefined;
1514
+ fontFamily?: string | undefined;
1515
+ overlayOpacity?: number | undefined;
1516
+ zIndex?: number | undefined;
1517
+ preset?: string | undefined;
1518
+ animation?: "none" | "fade" | "slide" | undefined;
1519
+ } | undefined;
1520
+ urlPatterns?: string[] | undefined;
1521
+ }>;
1522
+ type GuideConfig = z.infer<typeof GuideConfigSchema>;
1523
+ type GuideConfigInput = z.input<typeof GuideConfigSchema>;
1524
+ declare function defaultGuideConfig(kind: GuideKind): GuideConfig;
1525
+ declare function defaultStep(type: StepType, overrides?: Partial<GuideStepInput>): GuideStep;
1526
+ /** Buttons to show for a step; "back" buttons are hidden when there is no previous step to return to. */
1527
+ declare function visibleButtons(step: GuideStep, canGoBack: boolean): GuideStep["buttons"];
1528
+ /** Validation beyond Zod shape: returns human-readable problems that block publishing. */
1529
+ interface ValidationIssue {
1530
+ level: "error" | "warning";
1531
+ stepId?: string;
1532
+ message: string;
1533
+ }
1534
+ declare function validateGuideConfig(kind: GuideKind, config: GuideConfig): ValidationIssue[];
1535
+ interface ProjectTheme {
1536
+ primaryColor: string;
1537
+ backgroundColor: string;
1538
+ textColor: string;
1539
+ borderRadius: number;
1540
+ fontFamily: string;
1541
+ logoUrl?: string;
1542
+ brandName?: string;
1543
+ }
1544
+ declare const ProjectThemeSchema: z.ZodObject<{
1545
+ primaryColor: z.ZodDefault<z.ZodString>;
1546
+ backgroundColor: z.ZodDefault<z.ZodString>;
1547
+ textColor: z.ZodDefault<z.ZodString>;
1548
+ borderRadius: z.ZodDefault<z.ZodNumber>;
1549
+ fontFamily: z.ZodDefault<z.ZodString>;
1550
+ logoUrl: z.ZodOptional<z.ZodString>;
1551
+ brandName: z.ZodOptional<z.ZodString>;
1552
+ }, "strip", z.ZodTypeAny, {
1553
+ primaryColor: string;
1554
+ backgroundColor: string;
1555
+ textColor: string;
1556
+ borderRadius: number;
1557
+ fontFamily: string;
1558
+ logoUrl?: string | undefined;
1559
+ brandName?: string | undefined;
1560
+ }, {
1561
+ primaryColor?: string | undefined;
1562
+ backgroundColor?: string | undefined;
1563
+ textColor?: string | undefined;
1564
+ borderRadius?: number | undefined;
1565
+ fontFamily?: string | undefined;
1566
+ logoUrl?: string | undefined;
1567
+ brandName?: string | undefined;
1568
+ }>;
1569
+
1570
+ declare const EVENT_NAMES: readonly ["guide_viewed", "guide_started", "step_viewed", "step_completed", "guide_completed", "guide_skipped", "guide_dismissed", "guide_abandoned", "checklist_task_completed", "checklist_completed", "checklist_dismissed", "survey_displayed", "survey_submitted", "survey_dismissed", "resource_center_opened", "article_viewed", "messenger_opened", "conversation_started", "conversation_handed_off", "scout_answered", "custom", "page_view", "identify"];
1571
+ type EventName = (typeof EVENT_NAMES)[number];
1572
+ declare const GUIDE_LIFECYCLE_EVENTS: readonly ["guide_viewed", "guide_started", "step_viewed", "step_completed", "guide_completed", "guide_skipped", "guide_dismissed", "guide_abandoned"];
1573
+ /** Event as produced by the SDK and accepted by POST /api/v1/sdk/events */
1574
+ declare const SdkEventSchema: z.ZodObject<{
1575
+ eventId: z.ZodString;
1576
+ name: z.ZodEnum<["guide_viewed", "guide_started", "step_viewed", "step_completed", "guide_completed", "guide_skipped", "guide_dismissed", "guide_abandoned", "checklist_task_completed", "checklist_completed", "checklist_dismissed", "survey_displayed", "survey_submitted", "survey_dismissed", "resource_center_opened", "article_viewed", "messenger_opened", "conversation_started", "conversation_handed_off", "scout_answered", "custom", "page_view", "identify"]>;
1577
+ /** For `custom` events: the application-defined name. */
1578
+ customName: z.ZodOptional<z.ZodString>;
1579
+ occurredAt: z.ZodString;
1580
+ anonymousId: z.ZodString;
1581
+ userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1582
+ accountId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1583
+ sessionId: z.ZodOptional<z.ZodString>;
1584
+ guideId: z.ZodOptional<z.ZodString>;
1585
+ guideVersion: z.ZodOptional<z.ZodNumber>;
1586
+ stepId: z.ZodOptional<z.ZodString>;
1587
+ stepIndex: z.ZodOptional<z.ZodNumber>;
1588
+ url: z.ZodOptional<z.ZodString>;
1589
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1590
+ }, "strip", z.ZodTypeAny, {
1591
+ eventId: string;
1592
+ name: "custom" | "guide_completed" | "guide_viewed" | "guide_started" | "step_viewed" | "step_completed" | "guide_skipped" | "guide_dismissed" | "guide_abandoned" | "checklist_task_completed" | "checklist_completed" | "checklist_dismissed" | "survey_displayed" | "survey_submitted" | "survey_dismissed" | "resource_center_opened" | "article_viewed" | "messenger_opened" | "conversation_started" | "conversation_handed_off" | "scout_answered" | "page_view" | "identify";
1593
+ occurredAt: string;
1594
+ anonymousId: string;
1595
+ url?: string | undefined;
1596
+ customName?: string | undefined;
1597
+ userId?: string | null | undefined;
1598
+ accountId?: string | null | undefined;
1599
+ sessionId?: string | undefined;
1600
+ guideId?: string | undefined;
1601
+ guideVersion?: number | undefined;
1602
+ stepId?: string | undefined;
1603
+ stepIndex?: number | undefined;
1604
+ properties?: Record<string, unknown> | undefined;
1605
+ }, {
1606
+ eventId: string;
1607
+ name: "custom" | "guide_completed" | "guide_viewed" | "guide_started" | "step_viewed" | "step_completed" | "guide_skipped" | "guide_dismissed" | "guide_abandoned" | "checklist_task_completed" | "checklist_completed" | "checklist_dismissed" | "survey_displayed" | "survey_submitted" | "survey_dismissed" | "resource_center_opened" | "article_viewed" | "messenger_opened" | "conversation_started" | "conversation_handed_off" | "scout_answered" | "page_view" | "identify";
1608
+ occurredAt: string;
1609
+ anonymousId: string;
1610
+ url?: string | undefined;
1611
+ customName?: string | undefined;
1612
+ userId?: string | null | undefined;
1613
+ accountId?: string | null | undefined;
1614
+ sessionId?: string | undefined;
1615
+ guideId?: string | undefined;
1616
+ guideVersion?: number | undefined;
1617
+ stepId?: string | undefined;
1618
+ stepIndex?: number | undefined;
1619
+ properties?: Record<string, unknown> | undefined;
1620
+ }>;
1621
+ type SdkEvent = z.infer<typeof SdkEventSchema>;
1622
+ declare const EventBatchSchema: z.ZodObject<{
1623
+ events: z.ZodArray<z.ZodObject<{
1624
+ eventId: z.ZodString;
1625
+ name: z.ZodEnum<["guide_viewed", "guide_started", "step_viewed", "step_completed", "guide_completed", "guide_skipped", "guide_dismissed", "guide_abandoned", "checklist_task_completed", "checklist_completed", "checklist_dismissed", "survey_displayed", "survey_submitted", "survey_dismissed", "resource_center_opened", "article_viewed", "messenger_opened", "conversation_started", "conversation_handed_off", "scout_answered", "custom", "page_view", "identify"]>;
1626
+ /** For `custom` events: the application-defined name. */
1627
+ customName: z.ZodOptional<z.ZodString>;
1628
+ occurredAt: z.ZodString;
1629
+ anonymousId: z.ZodString;
1630
+ userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1631
+ accountId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1632
+ sessionId: z.ZodOptional<z.ZodString>;
1633
+ guideId: z.ZodOptional<z.ZodString>;
1634
+ guideVersion: z.ZodOptional<z.ZodNumber>;
1635
+ stepId: z.ZodOptional<z.ZodString>;
1636
+ stepIndex: z.ZodOptional<z.ZodNumber>;
1637
+ url: z.ZodOptional<z.ZodString>;
1638
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1639
+ }, "strip", z.ZodTypeAny, {
1640
+ eventId: string;
1641
+ name: "custom" | "guide_completed" | "guide_viewed" | "guide_started" | "step_viewed" | "step_completed" | "guide_skipped" | "guide_dismissed" | "guide_abandoned" | "checklist_task_completed" | "checklist_completed" | "checklist_dismissed" | "survey_displayed" | "survey_submitted" | "survey_dismissed" | "resource_center_opened" | "article_viewed" | "messenger_opened" | "conversation_started" | "conversation_handed_off" | "scout_answered" | "page_view" | "identify";
1642
+ occurredAt: string;
1643
+ anonymousId: string;
1644
+ url?: string | undefined;
1645
+ customName?: string | undefined;
1646
+ userId?: string | null | undefined;
1647
+ accountId?: string | null | undefined;
1648
+ sessionId?: string | undefined;
1649
+ guideId?: string | undefined;
1650
+ guideVersion?: number | undefined;
1651
+ stepId?: string | undefined;
1652
+ stepIndex?: number | undefined;
1653
+ properties?: Record<string, unknown> | undefined;
1654
+ }, {
1655
+ eventId: string;
1656
+ name: "custom" | "guide_completed" | "guide_viewed" | "guide_started" | "step_viewed" | "step_completed" | "guide_skipped" | "guide_dismissed" | "guide_abandoned" | "checklist_task_completed" | "checklist_completed" | "checklist_dismissed" | "survey_displayed" | "survey_submitted" | "survey_dismissed" | "resource_center_opened" | "article_viewed" | "messenger_opened" | "conversation_started" | "conversation_handed_off" | "scout_answered" | "page_view" | "identify";
1657
+ occurredAt: string;
1658
+ anonymousId: string;
1659
+ url?: string | undefined;
1660
+ customName?: string | undefined;
1661
+ userId?: string | null | undefined;
1662
+ accountId?: string | null | undefined;
1663
+ sessionId?: string | undefined;
1664
+ guideId?: string | undefined;
1665
+ guideVersion?: number | undefined;
1666
+ stepId?: string | undefined;
1667
+ stepIndex?: number | undefined;
1668
+ properties?: Record<string, unknown> | undefined;
1669
+ }>, "many">;
1670
+ sentAt: z.ZodOptional<z.ZodString>;
1671
+ sdk: z.ZodOptional<z.ZodObject<{
1672
+ name: z.ZodString;
1673
+ version: z.ZodString;
1674
+ }, "strip", z.ZodTypeAny, {
1675
+ name: string;
1676
+ version: string;
1677
+ }, {
1678
+ name: string;
1679
+ version: string;
1680
+ }>>;
1681
+ }, "strip", z.ZodTypeAny, {
1682
+ events: {
1683
+ eventId: string;
1684
+ name: "custom" | "guide_completed" | "guide_viewed" | "guide_started" | "step_viewed" | "step_completed" | "guide_skipped" | "guide_dismissed" | "guide_abandoned" | "checklist_task_completed" | "checklist_completed" | "checklist_dismissed" | "survey_displayed" | "survey_submitted" | "survey_dismissed" | "resource_center_opened" | "article_viewed" | "messenger_opened" | "conversation_started" | "conversation_handed_off" | "scout_answered" | "page_view" | "identify";
1685
+ occurredAt: string;
1686
+ anonymousId: string;
1687
+ url?: string | undefined;
1688
+ customName?: string | undefined;
1689
+ userId?: string | null | undefined;
1690
+ accountId?: string | null | undefined;
1691
+ sessionId?: string | undefined;
1692
+ guideId?: string | undefined;
1693
+ guideVersion?: number | undefined;
1694
+ stepId?: string | undefined;
1695
+ stepIndex?: number | undefined;
1696
+ properties?: Record<string, unknown> | undefined;
1697
+ }[];
1698
+ sentAt?: string | undefined;
1699
+ sdk?: {
1700
+ name: string;
1701
+ version: string;
1702
+ } | undefined;
1703
+ }, {
1704
+ events: {
1705
+ eventId: string;
1706
+ name: "custom" | "guide_completed" | "guide_viewed" | "guide_started" | "step_viewed" | "step_completed" | "guide_skipped" | "guide_dismissed" | "guide_abandoned" | "checklist_task_completed" | "checklist_completed" | "checklist_dismissed" | "survey_displayed" | "survey_submitted" | "survey_dismissed" | "resource_center_opened" | "article_viewed" | "messenger_opened" | "conversation_started" | "conversation_handed_off" | "scout_answered" | "page_view" | "identify";
1707
+ occurredAt: string;
1708
+ anonymousId: string;
1709
+ url?: string | undefined;
1710
+ customName?: string | undefined;
1711
+ userId?: string | null | undefined;
1712
+ accountId?: string | null | undefined;
1713
+ sessionId?: string | undefined;
1714
+ guideId?: string | undefined;
1715
+ guideVersion?: number | undefined;
1716
+ stepId?: string | undefined;
1717
+ stepIndex?: number | undefined;
1718
+ properties?: Record<string, unknown> | undefined;
1719
+ }[];
1720
+ sentAt?: string | undefined;
1721
+ sdk?: {
1722
+ name: string;
1723
+ version: string;
1724
+ } | undefined;
1725
+ }>;
1726
+ type EventBatch = z.infer<typeof EventBatchSchema>;
1727
+
1728
+ /** Messenger settings delivered to the SDK in `SdkConfigResponse.messenger`. */
1729
+ interface MessengerConfig {
1730
+ enabled: boolean;
1731
+ /** Display name of the AI agent ("Scout"). */
1732
+ name: string;
1733
+ greeting: string;
1734
+ /** Scout answers with AI; when false every conversation goes to the team inbox. */
1735
+ aiAvailable: boolean;
1736
+ handoffEnabled: boolean;
1737
+ launcher: {
1738
+ position: "bottom-right" | "bottom-left";
1739
+ };
1740
+ }
1741
+ declare const MESSAGE_AUTHORS: readonly ["user", "scout", "agent", "system"];
1742
+ type MessageAuthor = (typeof MESSAGE_AUTHORS)[number];
1743
+ type ConversationStatus = "bot" | "open" | "closed";
1744
+ interface MessengerCitation {
1745
+ articleId: string;
1746
+ title: string;
1747
+ }
1748
+ interface MessengerSuggestedGuide {
1749
+ key: string;
1750
+ name: string;
1751
+ }
1752
+ interface MessengerMessage {
1753
+ id: string;
1754
+ author: MessageAuthor;
1755
+ /** Team member name for `agent` messages. */
1756
+ authorName?: string | null;
1757
+ body: string;
1758
+ citations: MessengerCitation[];
1759
+ suggestedGuides: MessengerSuggestedGuide[];
1760
+ status: "pending" | "complete" | "failed";
1761
+ createdAt: string;
1762
+ }
1763
+ interface MessengerConversation {
1764
+ id: string;
1765
+ status: ConversationStatus;
1766
+ subject: string;
1767
+ lastMessageAt: string;
1768
+ lastMessagePreview: string;
1769
+ unread: number;
1770
+ rating: number | null;
1771
+ }
1772
+ declare const MAX_MESSAGE_LENGTH = 4000;
1773
+ declare const StartConversationSchema: z.ZodObject<{
1774
+ anonymousId: z.ZodString;
1775
+ userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1776
+ message: z.ZodString;
1777
+ pageUrl: z.ZodOptional<z.ZodString>;
1778
+ }, "strip", z.ZodTypeAny, {
1779
+ message: string;
1780
+ anonymousId: string;
1781
+ userId?: string | null | undefined;
1782
+ pageUrl?: string | undefined;
1783
+ }, {
1784
+ message: string;
1785
+ anonymousId: string;
1786
+ userId?: string | null | undefined;
1787
+ pageUrl?: string | undefined;
1788
+ }>;
1789
+ type StartConversationRequest = z.infer<typeof StartConversationSchema>;
1790
+ interface StartConversationResponse {
1791
+ conversation: MessengerConversation;
1792
+ /** Secret that authorises this browser to read and post in the conversation. Store it; it is not shown again. */
1793
+ token: string;
1794
+ messages: MessengerMessage[];
1795
+ }
1796
+ declare const ConversationLookupSchema: z.ZodObject<{
1797
+ tokens: z.ZodArray<z.ZodString, "many">;
1798
+ }, "strip", z.ZodTypeAny, {
1799
+ tokens: string[];
1800
+ }, {
1801
+ tokens: string[];
1802
+ }>;
1803
+ interface ConversationLookupResponse {
1804
+ conversations: Array<MessengerConversation & {
1805
+ token: string;
1806
+ }>;
1807
+ }
1808
+ declare const PostMessageSchema: z.ZodObject<{
1809
+ message: z.ZodString;
1810
+ }, "strip", z.ZodTypeAny, {
1811
+ message: string;
1812
+ }, {
1813
+ message: string;
1814
+ }>;
1815
+ declare const ConversationRatingSchema: z.ZodObject<{
1816
+ rating: z.ZodNumber;
1817
+ comment: z.ZodOptional<z.ZodString>;
1818
+ }, "strip", z.ZodTypeAny, {
1819
+ rating: number;
1820
+ comment?: string | undefined;
1821
+ }, {
1822
+ rating: number;
1823
+ comment?: string | undefined;
1824
+ }>;
1825
+ interface ConversationMessagesResponse {
1826
+ conversation: MessengerConversation;
1827
+ messages: MessengerMessage[];
1828
+ }
1829
+ /**
1830
+ * Server-sent events streamed by `POST /sdk/conversations` and `POST /sdk/conversations/:id/messages`
1831
+ * while Scout replies. `conversation` (start only) carries the new conversation and its token, `message`
1832
+ * each stored message, `delta` reply text as it is generated, and `done` the final stored message.
1833
+ */
1834
+ type ScoutStreamEvent = {
1835
+ event: "conversation";
1836
+ data: StartConversationResponse;
1837
+ } | {
1838
+ event: "message";
1839
+ data: MessengerMessage;
1840
+ } | {
1841
+ event: "delta";
1842
+ data: {
1843
+ messageId: string;
1844
+ text: string;
1845
+ };
1846
+ } | {
1847
+ event: "done";
1848
+ data: {
1849
+ message: MessengerMessage;
1850
+ conversation: MessengerConversation;
1851
+ };
1852
+ } | {
1853
+ event: "error";
1854
+ data: {
1855
+ message: string;
1856
+ };
1857
+ };
1858
+ /** Article list entry for the messenger Help tab (bodies are fetched on demand). */
1859
+ interface SdkArticleSummary {
1860
+ id: string;
1861
+ slug: string;
1862
+ title: string;
1863
+ summary: string;
1864
+ collectionId: string | null;
1865
+ externalUrl: string | null;
1866
+ updatedAt: string;
1867
+ }
1868
+ interface SdkArticlesResponse {
1869
+ collections: Array<{
1870
+ id: string;
1871
+ name: string;
1872
+ description: string;
1873
+ order: number;
1874
+ }>;
1875
+ articles: SdkArticleSummary[];
1876
+ }
1877
+
1878
+ /** A published guide as delivered to the SDK. Draft-only data (author, notes) is never included. */
1879
+ interface PublishedGuide {
1880
+ id: string;
1881
+ key: string;
1882
+ name: string;
1883
+ kind: GuideKind;
1884
+ version: number;
1885
+ config: GuideConfig;
1886
+ publishedAt: string;
1887
+ }
1888
+ interface ResourceCenterArticle {
1889
+ id: string;
1890
+ slug: string;
1891
+ title: string;
1892
+ summary: string;
1893
+ body: string;
1894
+ /** True when `body` was left out of the config to keep it small; fetch it from `GET /sdk/articles/:id`. */
1895
+ bodyOmitted?: boolean;
1896
+ collectionId?: string | null;
1897
+ externalUrl?: string | null;
1898
+ updatedAt: string;
1899
+ }
1900
+ interface ResourceCenterConfig {
1901
+ enabled: boolean;
1902
+ title: string;
1903
+ launcher: {
1904
+ position: "bottom-right" | "bottom-left";
1905
+ label: string;
1906
+ showIcon: boolean;
1907
+ };
1908
+ collections: Array<{
1909
+ id: string;
1910
+ name: string;
1911
+ description: string;
1912
+ order: number;
1913
+ }>;
1914
+ articles: ResourceCenterArticle[];
1915
+ recommendedGuideIds: string[];
1916
+ checklistGuideIds: string[];
1917
+ links: Array<{
1918
+ id: string;
1919
+ label: string;
1920
+ url: string;
1921
+ }>;
1922
+ faqs: Array<{
1923
+ id: string;
1924
+ question: string;
1925
+ answer: string;
1926
+ }>;
1927
+ }
1928
+ interface SdkConfigResponse {
1929
+ projectId: string;
1930
+ environment: string;
1931
+ configVersion: number;
1932
+ theme: z.infer<typeof ProjectThemeSchema>;
1933
+ guides: PublishedGuide[];
1934
+ resourceCenter: ResourceCenterConfig | null;
1935
+ /** Scout messenger; absent from servers that predate it. */
1936
+ messenger?: MessengerConfig | null;
1937
+ settings: {
1938
+ analyticsEnabled: boolean;
1939
+ collectUrls: boolean;
1940
+ maskSelectors: string[];
1941
+ sessionTimeoutMinutes: number;
1942
+ };
1943
+ generatedAt: string;
1944
+ }
1945
+ declare const IdentifyRequestSchema: z.ZodObject<{
1946
+ anonymousId: z.ZodString;
1947
+ userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1948
+ traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1949
+ account: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1950
+ id: z.ZodString;
1951
+ traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1952
+ }, "strip", z.ZodTypeAny, {
1953
+ id: string;
1954
+ traits?: Record<string, unknown> | undefined;
1955
+ }, {
1956
+ id: string;
1957
+ traits?: Record<string, unknown> | undefined;
1958
+ }>>>;
1959
+ sessionId: z.ZodOptional<z.ZodString>;
1960
+ url: z.ZodOptional<z.ZodString>;
1961
+ }, "strip", z.ZodTypeAny, {
1962
+ anonymousId: string;
1963
+ url?: string | undefined;
1964
+ userId?: string | null | undefined;
1965
+ sessionId?: string | undefined;
1966
+ traits?: Record<string, unknown> | undefined;
1967
+ account?: {
1968
+ id: string;
1969
+ traits?: Record<string, unknown> | undefined;
1970
+ } | null | undefined;
1971
+ }, {
1972
+ anonymousId: string;
1973
+ url?: string | undefined;
1974
+ userId?: string | null | undefined;
1975
+ sessionId?: string | undefined;
1976
+ traits?: Record<string, unknown> | undefined;
1977
+ account?: {
1978
+ id: string;
1979
+ traits?: Record<string, unknown> | undefined;
1980
+ } | null | undefined;
1981
+ }>;
1982
+ type IdentifyRequest = z.infer<typeof IdentifyRequestSchema>;
1983
+ /** Server-held state the SDK needs for targeting & frequency. */
1984
+ interface IdentifyResponse {
1985
+ endUserId: string;
1986
+ audienceIds: string[];
1987
+ guideState: Record<string, {
1988
+ impressions: number;
1989
+ completedAt?: string | null;
1990
+ dismissedAt?: string | null;
1991
+ lastShownAt?: string | null;
1992
+ }>;
1993
+ checklistProgress: Record<string, {
1994
+ completedTaskIds: string[];
1995
+ completedAt?: string | null;
1996
+ dismissedAt?: string | null;
1997
+ }>;
1998
+ surveysSubmitted: string[];
1999
+ firstSeenAt: string;
2000
+ }
2001
+ declare const ChecklistProgressRequestSchema: z.ZodObject<{
2002
+ anonymousId: z.ZodString;
2003
+ userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2004
+ guideVersion: z.ZodOptional<z.ZodNumber>;
2005
+ completedTaskIds: z.ZodArray<z.ZodString, "many">;
2006
+ dismissed: z.ZodOptional<z.ZodBoolean>;
2007
+ completed: z.ZodOptional<z.ZodBoolean>;
2008
+ }, "strip", z.ZodTypeAny, {
2009
+ anonymousId: string;
2010
+ completedTaskIds: string[];
2011
+ userId?: string | null | undefined;
2012
+ guideVersion?: number | undefined;
2013
+ dismissed?: boolean | undefined;
2014
+ completed?: boolean | undefined;
2015
+ }, {
2016
+ anonymousId: string;
2017
+ completedTaskIds: string[];
2018
+ userId?: string | null | undefined;
2019
+ guideVersion?: number | undefined;
2020
+ dismissed?: boolean | undefined;
2021
+ completed?: boolean | undefined;
2022
+ }>;
2023
+ type ChecklistProgressRequest = z.infer<typeof ChecklistProgressRequestSchema>;
2024
+ declare const SurveyResponseRequestSchema: z.ZodObject<{
2025
+ anonymousId: z.ZodString;
2026
+ userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2027
+ accountId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2028
+ guideVersion: z.ZodNumber;
2029
+ answers: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
2030
+ responseId: z.ZodString;
2031
+ }, "strip", z.ZodTypeAny, {
2032
+ anonymousId: string;
2033
+ guideVersion: number;
2034
+ answers: Record<string, string | number | boolean | string[]>;
2035
+ responseId: string;
2036
+ userId?: string | null | undefined;
2037
+ accountId?: string | null | undefined;
2038
+ }, {
2039
+ anonymousId: string;
2040
+ guideVersion: number;
2041
+ answers: Record<string, string | number | boolean | string[]>;
2042
+ responseId: string;
2043
+ userId?: string | null | undefined;
2044
+ accountId?: string | null | undefined;
2045
+ }>;
2046
+ type SurveyResponseRequest = z.infer<typeof SurveyResponseRequestSchema>;
2047
+ declare const GuideStateUpdateSchema: z.ZodObject<{
2048
+ anonymousId: z.ZodString;
2049
+ userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2050
+ updates: z.ZodArray<z.ZodObject<{
2051
+ guideId: z.ZodString;
2052
+ impression: z.ZodOptional<z.ZodBoolean>;
2053
+ completed: z.ZodOptional<z.ZodBoolean>;
2054
+ dismissed: z.ZodOptional<z.ZodBoolean>;
2055
+ }, "strip", z.ZodTypeAny, {
2056
+ guideId: string;
2057
+ dismissed?: boolean | undefined;
2058
+ completed?: boolean | undefined;
2059
+ impression?: boolean | undefined;
2060
+ }, {
2061
+ guideId: string;
2062
+ dismissed?: boolean | undefined;
2063
+ completed?: boolean | undefined;
2064
+ impression?: boolean | undefined;
2065
+ }>, "many">;
2066
+ }, "strip", z.ZodTypeAny, {
2067
+ anonymousId: string;
2068
+ updates: {
2069
+ guideId: string;
2070
+ dismissed?: boolean | undefined;
2071
+ completed?: boolean | undefined;
2072
+ impression?: boolean | undefined;
2073
+ }[];
2074
+ userId?: string | null | undefined;
2075
+ }, {
2076
+ anonymousId: string;
2077
+ updates: {
2078
+ guideId: string;
2079
+ dismissed?: boolean | undefined;
2080
+ completed?: boolean | undefined;
2081
+ impression?: boolean | undefined;
2082
+ }[];
2083
+ userId?: string | null | undefined;
2084
+ }>;
2085
+ declare const AuthoringPickSchema: z.ZodObject<{
2086
+ stepId: z.ZodOptional<z.ZodString>;
2087
+ selectors: z.ZodArray<z.ZodObject<{
2088
+ kind: z.ZodString;
2089
+ value: z.ZodString;
2090
+ label: z.ZodOptional<z.ZodString>;
2091
+ }, "strip", z.ZodTypeAny, {
2092
+ value: string;
2093
+ kind: string;
2094
+ label?: string | undefined;
2095
+ }, {
2096
+ value: string;
2097
+ kind: string;
2098
+ label?: string | undefined;
2099
+ }>, "many">;
2100
+ textSnapshot: z.ZodOptional<z.ZodString>;
2101
+ url: z.ZodOptional<z.ZodString>;
2102
+ rect: z.ZodOptional<z.ZodObject<{
2103
+ x: z.ZodNumber;
2104
+ y: z.ZodNumber;
2105
+ width: z.ZodNumber;
2106
+ height: z.ZodNumber;
2107
+ }, "strip", z.ZodTypeAny, {
2108
+ width: number;
2109
+ x: number;
2110
+ y: number;
2111
+ height: number;
2112
+ }, {
2113
+ width: number;
2114
+ x: number;
2115
+ y: number;
2116
+ height: number;
2117
+ }>>;
2118
+ }, "strip", z.ZodTypeAny, {
2119
+ selectors: {
2120
+ value: string;
2121
+ kind: string;
2122
+ label?: string | undefined;
2123
+ }[];
2124
+ textSnapshot?: string | undefined;
2125
+ url?: string | undefined;
2126
+ stepId?: string | undefined;
2127
+ rect?: {
2128
+ width: number;
2129
+ x: number;
2130
+ y: number;
2131
+ height: number;
2132
+ } | undefined;
2133
+ }, {
2134
+ selectors: {
2135
+ value: string;
2136
+ kind: string;
2137
+ label?: string | undefined;
2138
+ }[];
2139
+ textSnapshot?: string | undefined;
2140
+ url?: string | undefined;
2141
+ stepId?: string | undefined;
2142
+ rect?: {
2143
+ width: number;
2144
+ x: number;
2145
+ y: number;
2146
+ height: number;
2147
+ } | undefined;
2148
+ }>;
2149
+ type AuthoringPick = z.infer<typeof AuthoringPickSchema>;
2150
+ /**
2151
+ * Static, script-free copy of the page an authoring session is connected to. The SDK posts it to
2152
+ * the dashboard (never to the API) so the editor canvas can show the customer's real app.
2153
+ */
2154
+ interface AppSnapshot {
2155
+ /** Full HTML document (doctype included) with scripts and Guidely UI removed and a `<base>` pointing at `url`. */
2156
+ html: string;
2157
+ url: string;
2158
+ title: string;
2159
+ /** Viewport the snapshot was taken at, in CSS pixels. */
2160
+ width: number;
2161
+ height: number;
2162
+ capturedAt: string;
2163
+ }
2164
+ interface AuthoringSessionInfo {
2165
+ id: string;
2166
+ projectId: string;
2167
+ environment: string;
2168
+ guideId: string | null;
2169
+ dashboardOrigin: string;
2170
+ expiresAt: string;
2171
+ /** Draft guide config to preview while authoring (not published). */
2172
+ draft: {
2173
+ id: string;
2174
+ key: string;
2175
+ name: string;
2176
+ kind: GuideKind;
2177
+ config: GuideConfig;
2178
+ } | null;
2179
+ }
2180
+ declare const PublishedGuideSchema: z.ZodObject<{
2181
+ id: z.ZodString;
2182
+ key: z.ZodString;
2183
+ name: z.ZodString;
2184
+ kind: z.ZodString;
2185
+ version: z.ZodNumber;
2186
+ config: z.ZodObject<{
2187
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
2188
+ id: z.ZodString;
2189
+ type: z.ZodEnum<["modal", "tooltip", "popover", "spotlight", "hotspot", "banner", "slideout", "checklist", "custom", "survey"]>;
2190
+ title: z.ZodDefault<z.ZodString>;
2191
+ body: z.ZodDefault<z.ZodString>;
2192
+ imageUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
2193
+ buttons: z.ZodDefault<z.ZodArray<z.ZodObject<{
2194
+ id: z.ZodString;
2195
+ label: z.ZodString;
2196
+ action: z.ZodEnum<["next", "back", "dismiss", "complete", "skip", "url", "start_guide", "event", "open_resource_center", "none"]>;
2197
+ variant: z.ZodDefault<z.ZodEnum<["primary", "secondary", "ghost", "link"]>>;
2198
+ value: z.ZodOptional<z.ZodString>;
2199
+ newTab: z.ZodOptional<z.ZodBoolean>;
2200
+ }, "strip", z.ZodTypeAny, {
2201
+ id: string;
2202
+ label: string;
2203
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
2204
+ variant: "primary" | "secondary" | "ghost" | "link";
2205
+ value?: string | undefined;
2206
+ newTab?: boolean | undefined;
2207
+ }, {
2208
+ id: string;
2209
+ label: string;
2210
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
2211
+ value?: string | undefined;
2212
+ variant?: "primary" | "secondary" | "ghost" | "link" | undefined;
2213
+ newTab?: boolean | undefined;
2214
+ }>, "many">>;
2215
+ target: z.ZodOptional<z.ZodObject<{
2216
+ selectors: z.ZodArray<z.ZodObject<{
2217
+ kind: z.ZodEnum<["css", "id", "data-attr", "aria", "text", "xpath"]>;
2218
+ value: z.ZodString;
2219
+ label: z.ZodOptional<z.ZodString>;
2220
+ }, "strip", z.ZodTypeAny, {
2221
+ value: string;
2222
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2223
+ label?: string | undefined;
2224
+ }, {
2225
+ value: string;
2226
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2227
+ label?: string | undefined;
2228
+ }>, "many">;
2229
+ waitMs: z.ZodDefault<z.ZodNumber>;
2230
+ fallback: z.ZodDefault<z.ZodEnum<["skip", "show_as_modal", "end_guide", "wait"]>>;
2231
+ scrollIntoView: z.ZodDefault<z.ZodBoolean>;
2232
+ textSnapshot: z.ZodOptional<z.ZodString>;
2233
+ }, "strip", z.ZodTypeAny, {
2234
+ selectors: {
2235
+ value: string;
2236
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2237
+ label?: string | undefined;
2238
+ }[];
2239
+ waitMs: number;
2240
+ fallback: "skip" | "show_as_modal" | "end_guide" | "wait";
2241
+ scrollIntoView: boolean;
2242
+ textSnapshot?: string | undefined;
2243
+ }, {
2244
+ selectors: {
2245
+ value: string;
2246
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2247
+ label?: string | undefined;
2248
+ }[];
2249
+ waitMs?: number | undefined;
2250
+ fallback?: "skip" | "show_as_modal" | "end_guide" | "wait" | undefined;
2251
+ scrollIntoView?: boolean | undefined;
2252
+ textSnapshot?: string | undefined;
2253
+ }>>;
2254
+ placement: z.ZodDefault<z.ZodEnum<["top", "top-start", "top-end", "right", "right-start", "right-end", "bottom", "bottom-start", "bottom-end", "left", "left-start", "left-end", "auto"]>>;
2255
+ offset: z.ZodDefault<z.ZodNumber>;
2256
+ showOverlay: z.ZodDefault<z.ZodBoolean>;
2257
+ showProgress: z.ZodDefault<z.ZodBoolean>;
2258
+ showClose: z.ZodDefault<z.ZodBoolean>;
2259
+ dismissOnOutsideClick: z.ZodDefault<z.ZodBoolean>;
2260
+ spotlightPadding: z.ZodDefault<z.ZodNumber>;
2261
+ position: z.ZodDefault<z.ZodEnum<["top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right", "center"]>>;
2262
+ url: z.ZodOptional<z.ZodString>;
2263
+ advanceOn: z.ZodDefault<z.ZodEnum<["button", "element_click", "element_visible", "event", "delay", "any"]>>;
2264
+ advanceValue: z.ZodOptional<z.ZodString>;
2265
+ advanceDelayMs: z.ZodOptional<z.ZodNumber>;
2266
+ branches: z.ZodDefault<z.ZodArray<z.ZodObject<{
2267
+ id: z.ZodString;
2268
+ when: z.ZodType<RuleGroup, z.ZodTypeDef, RuleGroup>;
2269
+ goTo: z.ZodString;
2270
+ }, "strip", z.ZodTypeAny, {
2271
+ id: string;
2272
+ when: RuleGroup;
2273
+ goTo: string;
2274
+ }, {
2275
+ id: string;
2276
+ when: RuleGroup;
2277
+ goTo: string;
2278
+ }>, "many">>;
2279
+ width: z.ZodOptional<z.ZodNumber>;
2280
+ targeting: z.ZodOptional<z.ZodType<RuleGroup, z.ZodTypeDef, RuleGroup>>;
2281
+ hotspot: z.ZodOptional<z.ZodObject<{
2282
+ size: z.ZodDefault<z.ZodNumber>;
2283
+ pulse: z.ZodDefault<z.ZodBoolean>;
2284
+ openOn: z.ZodDefault<z.ZodEnum<["click", "hover"]>>;
2285
+ }, "strip", z.ZodTypeAny, {
2286
+ size: number;
2287
+ pulse: boolean;
2288
+ openOn: "click" | "hover";
2289
+ }, {
2290
+ size?: number | undefined;
2291
+ pulse?: boolean | undefined;
2292
+ openOn?: "click" | "hover" | undefined;
2293
+ }>>;
2294
+ customHtml: z.ZodOptional<z.ZodString>;
2295
+ }, "strip", z.ZodTypeAny, {
2296
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
2297
+ id: string;
2298
+ title: string;
2299
+ body: string;
2300
+ buttons: {
2301
+ id: string;
2302
+ label: string;
2303
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
2304
+ variant: "primary" | "secondary" | "ghost" | "link";
2305
+ value?: string | undefined;
2306
+ newTab?: boolean | undefined;
2307
+ }[];
2308
+ placement: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto";
2309
+ offset: number;
2310
+ showOverlay: boolean;
2311
+ showProgress: boolean;
2312
+ showClose: boolean;
2313
+ dismissOnOutsideClick: boolean;
2314
+ spotlightPadding: number;
2315
+ position: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center";
2316
+ advanceOn: "event" | "button" | "element_click" | "element_visible" | "delay" | "any";
2317
+ branches: {
2318
+ id: string;
2319
+ when: RuleGroup;
2320
+ goTo: string;
2321
+ }[];
2322
+ hotspot?: {
2323
+ size: number;
2324
+ pulse: boolean;
2325
+ openOn: "click" | "hover";
2326
+ } | undefined;
2327
+ url?: string | undefined;
2328
+ imageUrl?: string | undefined;
2329
+ target?: {
2330
+ selectors: {
2331
+ value: string;
2332
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2333
+ label?: string | undefined;
2334
+ }[];
2335
+ waitMs: number;
2336
+ fallback: "skip" | "show_as_modal" | "end_guide" | "wait";
2337
+ scrollIntoView: boolean;
2338
+ textSnapshot?: string | undefined;
2339
+ } | undefined;
2340
+ advanceValue?: string | undefined;
2341
+ advanceDelayMs?: number | undefined;
2342
+ width?: number | undefined;
2343
+ targeting?: RuleGroup | undefined;
2344
+ customHtml?: string | undefined;
2345
+ }, {
2346
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
2347
+ id: string;
2348
+ hotspot?: {
2349
+ size?: number | undefined;
2350
+ pulse?: boolean | undefined;
2351
+ openOn?: "click" | "hover" | undefined;
2352
+ } | undefined;
2353
+ url?: string | undefined;
2354
+ title?: string | undefined;
2355
+ body?: string | undefined;
2356
+ imageUrl?: string | undefined;
2357
+ buttons?: {
2358
+ id: string;
2359
+ label: string;
2360
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
2361
+ value?: string | undefined;
2362
+ variant?: "primary" | "secondary" | "ghost" | "link" | undefined;
2363
+ newTab?: boolean | undefined;
2364
+ }[] | undefined;
2365
+ target?: {
2366
+ selectors: {
2367
+ value: string;
2368
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2369
+ label?: string | undefined;
2370
+ }[];
2371
+ waitMs?: number | undefined;
2372
+ fallback?: "skip" | "show_as_modal" | "end_guide" | "wait" | undefined;
2373
+ scrollIntoView?: boolean | undefined;
2374
+ textSnapshot?: string | undefined;
2375
+ } | undefined;
2376
+ placement?: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto" | undefined;
2377
+ offset?: number | undefined;
2378
+ showOverlay?: boolean | undefined;
2379
+ showProgress?: boolean | undefined;
2380
+ showClose?: boolean | undefined;
2381
+ dismissOnOutsideClick?: boolean | undefined;
2382
+ spotlightPadding?: number | undefined;
2383
+ position?: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center" | undefined;
2384
+ advanceOn?: "event" | "button" | "element_click" | "element_visible" | "delay" | "any" | undefined;
2385
+ advanceValue?: string | undefined;
2386
+ advanceDelayMs?: number | undefined;
2387
+ branches?: {
2388
+ id: string;
2389
+ when: RuleGroup;
2390
+ goTo: string;
2391
+ }[] | undefined;
2392
+ width?: number | undefined;
2393
+ targeting?: RuleGroup | undefined;
2394
+ customHtml?: string | undefined;
2395
+ }>, "many">>;
2396
+ targeting: z.ZodDefault<z.ZodType<RuleGroup, z.ZodTypeDef, RuleGroup>>;
2397
+ trigger: z.ZodDefault<z.ZodObject<{
2398
+ type: z.ZodDefault<z.ZodEnum<["page_load", "url_match", "event", "element_click", "element_visible", "manual", "delay", "after_guide", "segment_enter"]>>;
2399
+ value: z.ZodOptional<z.ZodString>;
2400
+ delayMs: z.ZodDefault<z.ZodNumber>;
2401
+ urlPattern: z.ZodOptional<z.ZodString>;
2402
+ }, "strip", z.ZodTypeAny, {
2403
+ type: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter";
2404
+ delayMs: number;
2405
+ value?: string | undefined;
2406
+ urlPattern?: string | undefined;
2407
+ }, {
2408
+ value?: string | undefined;
2409
+ type?: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter" | undefined;
2410
+ delayMs?: number | undefined;
2411
+ urlPattern?: string | undefined;
2412
+ }>>;
2413
+ frequency: z.ZodDefault<z.ZodObject<{
2414
+ mode: z.ZodDefault<z.ZodEnum<["once", "once_per_session", "every_time", "interval"]>>;
2415
+ intervalHours: z.ZodOptional<z.ZodNumber>;
2416
+ maxImpressions: z.ZodOptional<z.ZodNumber>;
2417
+ cooldownHours: z.ZodDefault<z.ZodNumber>;
2418
+ priority: z.ZodDefault<z.ZodNumber>;
2419
+ mutuallyExclusiveWith: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2420
+ reshowAfterDismiss: z.ZodDefault<z.ZodBoolean>;
2421
+ }, "strip", z.ZodTypeAny, {
2422
+ mode: "once" | "once_per_session" | "every_time" | "interval";
2423
+ cooldownHours: number;
2424
+ priority: number;
2425
+ mutuallyExclusiveWith: string[];
2426
+ reshowAfterDismiss: boolean;
2427
+ intervalHours?: number | undefined;
2428
+ maxImpressions?: number | undefined;
2429
+ }, {
2430
+ mode?: "once" | "once_per_session" | "every_time" | "interval" | undefined;
2431
+ intervalHours?: number | undefined;
2432
+ maxImpressions?: number | undefined;
2433
+ cooldownHours?: number | undefined;
2434
+ priority?: number | undefined;
2435
+ mutuallyExclusiveWith?: string[] | undefined;
2436
+ reshowAfterDismiss?: boolean | undefined;
2437
+ }>>;
2438
+ appearance: z.ZodDefault<z.ZodObject<{
2439
+ theme: z.ZodDefault<z.ZodEnum<["light", "dark", "auto"]>>;
2440
+ primaryColor: z.ZodOptional<z.ZodString>;
2441
+ backgroundColor: z.ZodOptional<z.ZodString>;
2442
+ textColor: z.ZodOptional<z.ZodString>;
2443
+ borderRadius: z.ZodOptional<z.ZodNumber>;
2444
+ fontFamily: z.ZodOptional<z.ZodString>;
2445
+ overlayOpacity: z.ZodOptional<z.ZodNumber>;
2446
+ zIndex: z.ZodOptional<z.ZodNumber>;
2447
+ preset: z.ZodOptional<z.ZodString>;
2448
+ animation: z.ZodDefault<z.ZodEnum<["fade", "slide", "none"]>>;
2449
+ }, "strip", z.ZodTypeAny, {
2450
+ theme: "auto" | "light" | "dark";
2451
+ animation: "none" | "fade" | "slide";
2452
+ primaryColor?: string | undefined;
2453
+ backgroundColor?: string | undefined;
2454
+ textColor?: string | undefined;
2455
+ borderRadius?: number | undefined;
2456
+ fontFamily?: string | undefined;
2457
+ overlayOpacity?: number | undefined;
2458
+ zIndex?: number | undefined;
2459
+ preset?: string | undefined;
2460
+ }, {
2461
+ theme?: "auto" | "light" | "dark" | undefined;
2462
+ primaryColor?: string | undefined;
2463
+ backgroundColor?: string | undefined;
2464
+ textColor?: string | undefined;
2465
+ borderRadius?: number | undefined;
2466
+ fontFamily?: string | undefined;
2467
+ overlayOpacity?: number | undefined;
2468
+ zIndex?: number | undefined;
2469
+ preset?: string | undefined;
2470
+ animation?: "none" | "fade" | "slide" | undefined;
2471
+ }>>;
2472
+ checklist: z.ZodOptional<z.ZodObject<{
2473
+ tasks: z.ZodArray<z.ZodObject<{
2474
+ id: z.ZodString;
2475
+ title: z.ZodString;
2476
+ description: z.ZodDefault<z.ZodString>;
2477
+ completion: z.ZodDefault<z.ZodEnum<["manual", "event", "guide_completed", "url_visited", "click"]>>;
2478
+ completionValue: z.ZodOptional<z.ZodString>;
2479
+ action: z.ZodDefault<z.ZodEnum<["none", "start_guide", "url", "event"]>>;
2480
+ actionValue: z.ZodOptional<z.ZodString>;
2481
+ required: z.ZodDefault<z.ZodBoolean>;
2482
+ }, "strip", z.ZodTypeAny, {
2483
+ id: string;
2484
+ action: "url" | "start_guide" | "event" | "none";
2485
+ title: string;
2486
+ description: string;
2487
+ completion: "event" | "click" | "manual" | "guide_completed" | "url_visited";
2488
+ required: boolean;
2489
+ completionValue?: string | undefined;
2490
+ actionValue?: string | undefined;
2491
+ }, {
2492
+ id: string;
2493
+ title: string;
2494
+ action?: "url" | "start_guide" | "event" | "none" | undefined;
2495
+ description?: string | undefined;
2496
+ completion?: "event" | "click" | "manual" | "guide_completed" | "url_visited" | undefined;
2497
+ completionValue?: string | undefined;
2498
+ actionValue?: string | undefined;
2499
+ required?: boolean | undefined;
2500
+ }>, "many">;
2501
+ ordered: z.ZodDefault<z.ZodBoolean>;
2502
+ launcherLabel: z.ZodDefault<z.ZodString>;
2503
+ position: z.ZodDefault<z.ZodEnum<["bottom-right", "bottom-left"]>>;
2504
+ completionTitle: z.ZodDefault<z.ZodString>;
2505
+ completionBody: z.ZodDefault<z.ZodString>;
2506
+ autoOpen: z.ZodDefault<z.ZodBoolean>;
2507
+ dismissible: z.ZodDefault<z.ZodBoolean>;
2508
+ }, "strip", z.ZodTypeAny, {
2509
+ position: "bottom-left" | "bottom-right";
2510
+ tasks: {
2511
+ id: string;
2512
+ action: "url" | "start_guide" | "event" | "none";
2513
+ title: string;
2514
+ description: string;
2515
+ completion: "event" | "click" | "manual" | "guide_completed" | "url_visited";
2516
+ required: boolean;
2517
+ completionValue?: string | undefined;
2518
+ actionValue?: string | undefined;
2519
+ }[];
2520
+ ordered: boolean;
2521
+ launcherLabel: string;
2522
+ completionTitle: string;
2523
+ completionBody: string;
2524
+ autoOpen: boolean;
2525
+ dismissible: boolean;
2526
+ }, {
2527
+ tasks: {
2528
+ id: string;
2529
+ title: string;
2530
+ action?: "url" | "start_guide" | "event" | "none" | undefined;
2531
+ description?: string | undefined;
2532
+ completion?: "event" | "click" | "manual" | "guide_completed" | "url_visited" | undefined;
2533
+ completionValue?: string | undefined;
2534
+ actionValue?: string | undefined;
2535
+ required?: boolean | undefined;
2536
+ }[];
2537
+ position?: "bottom-left" | "bottom-right" | undefined;
2538
+ ordered?: boolean | undefined;
2539
+ launcherLabel?: string | undefined;
2540
+ completionTitle?: string | undefined;
2541
+ completionBody?: string | undefined;
2542
+ autoOpen?: boolean | undefined;
2543
+ dismissible?: boolean | undefined;
2544
+ }>>;
2545
+ survey: z.ZodOptional<z.ZodObject<{
2546
+ questions: z.ZodArray<z.ZodObject<{
2547
+ id: z.ZodString;
2548
+ type: z.ZodEnum<["nps", "csat", "thumbs", "single_choice", "multiple_choice", "text", "rating"]>;
2549
+ title: z.ZodString;
2550
+ description: z.ZodDefault<z.ZodString>;
2551
+ required: z.ZodDefault<z.ZodBoolean>;
2552
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
2553
+ id: z.ZodString;
2554
+ label: z.ZodString;
2555
+ }, "strip", z.ZodTypeAny, {
2556
+ id: string;
2557
+ label: string;
2558
+ }, {
2559
+ id: string;
2560
+ label: string;
2561
+ }>, "many">>;
2562
+ scaleMax: z.ZodOptional<z.ZodNumber>;
2563
+ lowLabel: z.ZodOptional<z.ZodString>;
2564
+ highLabel: z.ZodOptional<z.ZodString>;
2565
+ placeholder: z.ZodOptional<z.ZodString>;
2566
+ showWhen: z.ZodOptional<z.ZodObject<{
2567
+ questionId: z.ZodString;
2568
+ op: z.ZodEnum<["equals", "lte", "gte", "in"]>;
2569
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodArray<z.ZodString, "many">]>;
2570
+ }, "strip", z.ZodTypeAny, {
2571
+ value: string | number | string[];
2572
+ op: "equals" | "gte" | "lte" | "in";
2573
+ questionId: string;
2574
+ }, {
2575
+ value: string | number | string[];
2576
+ op: "equals" | "gte" | "lte" | "in";
2577
+ questionId: string;
2578
+ }>>;
2579
+ }, "strip", z.ZodTypeAny, {
2580
+ options: {
2581
+ id: string;
2582
+ label: string;
2583
+ }[];
2584
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
2585
+ id: string;
2586
+ title: string;
2587
+ description: string;
2588
+ required: boolean;
2589
+ scaleMax?: number | undefined;
2590
+ lowLabel?: string | undefined;
2591
+ highLabel?: string | undefined;
2592
+ placeholder?: string | undefined;
2593
+ showWhen?: {
2594
+ value: string | number | string[];
2595
+ op: "equals" | "gte" | "lte" | "in";
2596
+ questionId: string;
2597
+ } | undefined;
2598
+ }, {
2599
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
2600
+ id: string;
2601
+ title: string;
2602
+ options?: {
2603
+ id: string;
2604
+ label: string;
2605
+ }[] | undefined;
2606
+ description?: string | undefined;
2607
+ required?: boolean | undefined;
2608
+ scaleMax?: number | undefined;
2609
+ lowLabel?: string | undefined;
2610
+ highLabel?: string | undefined;
2611
+ placeholder?: string | undefined;
2612
+ showWhen?: {
2613
+ value: string | number | string[];
2614
+ op: "equals" | "gte" | "lte" | "in";
2615
+ questionId: string;
2616
+ } | undefined;
2617
+ }>, "many">;
2618
+ thankYouTitle: z.ZodDefault<z.ZodString>;
2619
+ thankYouBody: z.ZodDefault<z.ZodString>;
2620
+ position: z.ZodDefault<z.ZodEnum<["bottom-right", "bottom-left", "center"]>>;
2621
+ startAt: z.ZodOptional<z.ZodString>;
2622
+ endAt: z.ZodOptional<z.ZodString>;
2623
+ }, "strip", z.ZodTypeAny, {
2624
+ position: "bottom-left" | "bottom-right" | "center";
2625
+ questions: {
2626
+ options: {
2627
+ id: string;
2628
+ label: string;
2629
+ }[];
2630
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
2631
+ id: string;
2632
+ title: string;
2633
+ description: string;
2634
+ required: boolean;
2635
+ scaleMax?: number | undefined;
2636
+ lowLabel?: string | undefined;
2637
+ highLabel?: string | undefined;
2638
+ placeholder?: string | undefined;
2639
+ showWhen?: {
2640
+ value: string | number | string[];
2641
+ op: "equals" | "gte" | "lte" | "in";
2642
+ questionId: string;
2643
+ } | undefined;
2644
+ }[];
2645
+ thankYouTitle: string;
2646
+ thankYouBody: string;
2647
+ startAt?: string | undefined;
2648
+ endAt?: string | undefined;
2649
+ }, {
2650
+ questions: {
2651
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
2652
+ id: string;
2653
+ title: string;
2654
+ options?: {
2655
+ id: string;
2656
+ label: string;
2657
+ }[] | undefined;
2658
+ description?: string | undefined;
2659
+ required?: boolean | undefined;
2660
+ scaleMax?: number | undefined;
2661
+ lowLabel?: string | undefined;
2662
+ highLabel?: string | undefined;
2663
+ placeholder?: string | undefined;
2664
+ showWhen?: {
2665
+ value: string | number | string[];
2666
+ op: "equals" | "gte" | "lte" | "in";
2667
+ questionId: string;
2668
+ } | undefined;
2669
+ }[];
2670
+ position?: "bottom-left" | "bottom-right" | "center" | undefined;
2671
+ thankYouTitle?: string | undefined;
2672
+ thankYouBody?: string | undefined;
2673
+ startAt?: string | undefined;
2674
+ endAt?: string | undefined;
2675
+ }>>;
2676
+ urlPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2677
+ }, "strip", z.ZodTypeAny, {
2678
+ targeting: RuleGroup;
2679
+ steps: {
2680
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
2681
+ id: string;
2682
+ title: string;
2683
+ body: string;
2684
+ buttons: {
2685
+ id: string;
2686
+ label: string;
2687
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
2688
+ variant: "primary" | "secondary" | "ghost" | "link";
2689
+ value?: string | undefined;
2690
+ newTab?: boolean | undefined;
2691
+ }[];
2692
+ placement: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto";
2693
+ offset: number;
2694
+ showOverlay: boolean;
2695
+ showProgress: boolean;
2696
+ showClose: boolean;
2697
+ dismissOnOutsideClick: boolean;
2698
+ spotlightPadding: number;
2699
+ position: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center";
2700
+ advanceOn: "event" | "button" | "element_click" | "element_visible" | "delay" | "any";
2701
+ branches: {
2702
+ id: string;
2703
+ when: RuleGroup;
2704
+ goTo: string;
2705
+ }[];
2706
+ hotspot?: {
2707
+ size: number;
2708
+ pulse: boolean;
2709
+ openOn: "click" | "hover";
2710
+ } | undefined;
2711
+ url?: string | undefined;
2712
+ imageUrl?: string | undefined;
2713
+ target?: {
2714
+ selectors: {
2715
+ value: string;
2716
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2717
+ label?: string | undefined;
2718
+ }[];
2719
+ waitMs: number;
2720
+ fallback: "skip" | "show_as_modal" | "end_guide" | "wait";
2721
+ scrollIntoView: boolean;
2722
+ textSnapshot?: string | undefined;
2723
+ } | undefined;
2724
+ advanceValue?: string | undefined;
2725
+ advanceDelayMs?: number | undefined;
2726
+ width?: number | undefined;
2727
+ targeting?: RuleGroup | undefined;
2728
+ customHtml?: string | undefined;
2729
+ }[];
2730
+ trigger: {
2731
+ type: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter";
2732
+ delayMs: number;
2733
+ value?: string | undefined;
2734
+ urlPattern?: string | undefined;
2735
+ };
2736
+ frequency: {
2737
+ mode: "once" | "once_per_session" | "every_time" | "interval";
2738
+ cooldownHours: number;
2739
+ priority: number;
2740
+ mutuallyExclusiveWith: string[];
2741
+ reshowAfterDismiss: boolean;
2742
+ intervalHours?: number | undefined;
2743
+ maxImpressions?: number | undefined;
2744
+ };
2745
+ appearance: {
2746
+ theme: "auto" | "light" | "dark";
2747
+ animation: "none" | "fade" | "slide";
2748
+ primaryColor?: string | undefined;
2749
+ backgroundColor?: string | undefined;
2750
+ textColor?: string | undefined;
2751
+ borderRadius?: number | undefined;
2752
+ fontFamily?: string | undefined;
2753
+ overlayOpacity?: number | undefined;
2754
+ zIndex?: number | undefined;
2755
+ preset?: string | undefined;
2756
+ };
2757
+ urlPatterns: string[];
2758
+ checklist?: {
2759
+ position: "bottom-left" | "bottom-right";
2760
+ tasks: {
2761
+ id: string;
2762
+ action: "url" | "start_guide" | "event" | "none";
2763
+ title: string;
2764
+ description: string;
2765
+ completion: "event" | "click" | "manual" | "guide_completed" | "url_visited";
2766
+ required: boolean;
2767
+ completionValue?: string | undefined;
2768
+ actionValue?: string | undefined;
2769
+ }[];
2770
+ ordered: boolean;
2771
+ launcherLabel: string;
2772
+ completionTitle: string;
2773
+ completionBody: string;
2774
+ autoOpen: boolean;
2775
+ dismissible: boolean;
2776
+ } | undefined;
2777
+ survey?: {
2778
+ position: "bottom-left" | "bottom-right" | "center";
2779
+ questions: {
2780
+ options: {
2781
+ id: string;
2782
+ label: string;
2783
+ }[];
2784
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
2785
+ id: string;
2786
+ title: string;
2787
+ description: string;
2788
+ required: boolean;
2789
+ scaleMax?: number | undefined;
2790
+ lowLabel?: string | undefined;
2791
+ highLabel?: string | undefined;
2792
+ placeholder?: string | undefined;
2793
+ showWhen?: {
2794
+ value: string | number | string[];
2795
+ op: "equals" | "gte" | "lte" | "in";
2796
+ questionId: string;
2797
+ } | undefined;
2798
+ }[];
2799
+ thankYouTitle: string;
2800
+ thankYouBody: string;
2801
+ startAt?: string | undefined;
2802
+ endAt?: string | undefined;
2803
+ } | undefined;
2804
+ }, {
2805
+ checklist?: {
2806
+ tasks: {
2807
+ id: string;
2808
+ title: string;
2809
+ action?: "url" | "start_guide" | "event" | "none" | undefined;
2810
+ description?: string | undefined;
2811
+ completion?: "event" | "click" | "manual" | "guide_completed" | "url_visited" | undefined;
2812
+ completionValue?: string | undefined;
2813
+ actionValue?: string | undefined;
2814
+ required?: boolean | undefined;
2815
+ }[];
2816
+ position?: "bottom-left" | "bottom-right" | undefined;
2817
+ ordered?: boolean | undefined;
2818
+ launcherLabel?: string | undefined;
2819
+ completionTitle?: string | undefined;
2820
+ completionBody?: string | undefined;
2821
+ autoOpen?: boolean | undefined;
2822
+ dismissible?: boolean | undefined;
2823
+ } | undefined;
2824
+ survey?: {
2825
+ questions: {
2826
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
2827
+ id: string;
2828
+ title: string;
2829
+ options?: {
2830
+ id: string;
2831
+ label: string;
2832
+ }[] | undefined;
2833
+ description?: string | undefined;
2834
+ required?: boolean | undefined;
2835
+ scaleMax?: number | undefined;
2836
+ lowLabel?: string | undefined;
2837
+ highLabel?: string | undefined;
2838
+ placeholder?: string | undefined;
2839
+ showWhen?: {
2840
+ value: string | number | string[];
2841
+ op: "equals" | "gte" | "lte" | "in";
2842
+ questionId: string;
2843
+ } | undefined;
2844
+ }[];
2845
+ position?: "bottom-left" | "bottom-right" | "center" | undefined;
2846
+ thankYouTitle?: string | undefined;
2847
+ thankYouBody?: string | undefined;
2848
+ startAt?: string | undefined;
2849
+ endAt?: string | undefined;
2850
+ } | undefined;
2851
+ targeting?: RuleGroup | undefined;
2852
+ steps?: {
2853
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
2854
+ id: string;
2855
+ hotspot?: {
2856
+ size?: number | undefined;
2857
+ pulse?: boolean | undefined;
2858
+ openOn?: "click" | "hover" | undefined;
2859
+ } | undefined;
2860
+ url?: string | undefined;
2861
+ title?: string | undefined;
2862
+ body?: string | undefined;
2863
+ imageUrl?: string | undefined;
2864
+ buttons?: {
2865
+ id: string;
2866
+ label: string;
2867
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
2868
+ value?: string | undefined;
2869
+ variant?: "primary" | "secondary" | "ghost" | "link" | undefined;
2870
+ newTab?: boolean | undefined;
2871
+ }[] | undefined;
2872
+ target?: {
2873
+ selectors: {
2874
+ value: string;
2875
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2876
+ label?: string | undefined;
2877
+ }[];
2878
+ waitMs?: number | undefined;
2879
+ fallback?: "skip" | "show_as_modal" | "end_guide" | "wait" | undefined;
2880
+ scrollIntoView?: boolean | undefined;
2881
+ textSnapshot?: string | undefined;
2882
+ } | undefined;
2883
+ placement?: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto" | undefined;
2884
+ offset?: number | undefined;
2885
+ showOverlay?: boolean | undefined;
2886
+ showProgress?: boolean | undefined;
2887
+ showClose?: boolean | undefined;
2888
+ dismissOnOutsideClick?: boolean | undefined;
2889
+ spotlightPadding?: number | undefined;
2890
+ position?: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center" | undefined;
2891
+ advanceOn?: "event" | "button" | "element_click" | "element_visible" | "delay" | "any" | undefined;
2892
+ advanceValue?: string | undefined;
2893
+ advanceDelayMs?: number | undefined;
2894
+ branches?: {
2895
+ id: string;
2896
+ when: RuleGroup;
2897
+ goTo: string;
2898
+ }[] | undefined;
2899
+ width?: number | undefined;
2900
+ targeting?: RuleGroup | undefined;
2901
+ customHtml?: string | undefined;
2902
+ }[] | undefined;
2903
+ trigger?: {
2904
+ value?: string | undefined;
2905
+ type?: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter" | undefined;
2906
+ delayMs?: number | undefined;
2907
+ urlPattern?: string | undefined;
2908
+ } | undefined;
2909
+ frequency?: {
2910
+ mode?: "once" | "once_per_session" | "every_time" | "interval" | undefined;
2911
+ intervalHours?: number | undefined;
2912
+ maxImpressions?: number | undefined;
2913
+ cooldownHours?: number | undefined;
2914
+ priority?: number | undefined;
2915
+ mutuallyExclusiveWith?: string[] | undefined;
2916
+ reshowAfterDismiss?: boolean | undefined;
2917
+ } | undefined;
2918
+ appearance?: {
2919
+ theme?: "auto" | "light" | "dark" | undefined;
2920
+ primaryColor?: string | undefined;
2921
+ backgroundColor?: string | undefined;
2922
+ textColor?: string | undefined;
2923
+ borderRadius?: number | undefined;
2924
+ fontFamily?: string | undefined;
2925
+ overlayOpacity?: number | undefined;
2926
+ zIndex?: number | undefined;
2927
+ preset?: string | undefined;
2928
+ animation?: "none" | "fade" | "slide" | undefined;
2929
+ } | undefined;
2930
+ urlPatterns?: string[] | undefined;
2931
+ }>;
2932
+ publishedAt: z.ZodString;
2933
+ }, "strip", z.ZodTypeAny, {
2934
+ id: string;
2935
+ key: string;
2936
+ kind: string;
2937
+ name: string;
2938
+ version: number;
2939
+ config: {
2940
+ targeting: RuleGroup;
2941
+ steps: {
2942
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
2943
+ id: string;
2944
+ title: string;
2945
+ body: string;
2946
+ buttons: {
2947
+ id: string;
2948
+ label: string;
2949
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
2950
+ variant: "primary" | "secondary" | "ghost" | "link";
2951
+ value?: string | undefined;
2952
+ newTab?: boolean | undefined;
2953
+ }[];
2954
+ placement: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto";
2955
+ offset: number;
2956
+ showOverlay: boolean;
2957
+ showProgress: boolean;
2958
+ showClose: boolean;
2959
+ dismissOnOutsideClick: boolean;
2960
+ spotlightPadding: number;
2961
+ position: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center";
2962
+ advanceOn: "event" | "button" | "element_click" | "element_visible" | "delay" | "any";
2963
+ branches: {
2964
+ id: string;
2965
+ when: RuleGroup;
2966
+ goTo: string;
2967
+ }[];
2968
+ hotspot?: {
2969
+ size: number;
2970
+ pulse: boolean;
2971
+ openOn: "click" | "hover";
2972
+ } | undefined;
2973
+ url?: string | undefined;
2974
+ imageUrl?: string | undefined;
2975
+ target?: {
2976
+ selectors: {
2977
+ value: string;
2978
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2979
+ label?: string | undefined;
2980
+ }[];
2981
+ waitMs: number;
2982
+ fallback: "skip" | "show_as_modal" | "end_guide" | "wait";
2983
+ scrollIntoView: boolean;
2984
+ textSnapshot?: string | undefined;
2985
+ } | undefined;
2986
+ advanceValue?: string | undefined;
2987
+ advanceDelayMs?: number | undefined;
2988
+ width?: number | undefined;
2989
+ targeting?: RuleGroup | undefined;
2990
+ customHtml?: string | undefined;
2991
+ }[];
2992
+ trigger: {
2993
+ type: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter";
2994
+ delayMs: number;
2995
+ value?: string | undefined;
2996
+ urlPattern?: string | undefined;
2997
+ };
2998
+ frequency: {
2999
+ mode: "once" | "once_per_session" | "every_time" | "interval";
3000
+ cooldownHours: number;
3001
+ priority: number;
3002
+ mutuallyExclusiveWith: string[];
3003
+ reshowAfterDismiss: boolean;
3004
+ intervalHours?: number | undefined;
3005
+ maxImpressions?: number | undefined;
3006
+ };
3007
+ appearance: {
3008
+ theme: "auto" | "light" | "dark";
3009
+ animation: "none" | "fade" | "slide";
3010
+ primaryColor?: string | undefined;
3011
+ backgroundColor?: string | undefined;
3012
+ textColor?: string | undefined;
3013
+ borderRadius?: number | undefined;
3014
+ fontFamily?: string | undefined;
3015
+ overlayOpacity?: number | undefined;
3016
+ zIndex?: number | undefined;
3017
+ preset?: string | undefined;
3018
+ };
3019
+ urlPatterns: string[];
3020
+ checklist?: {
3021
+ position: "bottom-left" | "bottom-right";
3022
+ tasks: {
3023
+ id: string;
3024
+ action: "url" | "start_guide" | "event" | "none";
3025
+ title: string;
3026
+ description: string;
3027
+ completion: "event" | "click" | "manual" | "guide_completed" | "url_visited";
3028
+ required: boolean;
3029
+ completionValue?: string | undefined;
3030
+ actionValue?: string | undefined;
3031
+ }[];
3032
+ ordered: boolean;
3033
+ launcherLabel: string;
3034
+ completionTitle: string;
3035
+ completionBody: string;
3036
+ autoOpen: boolean;
3037
+ dismissible: boolean;
3038
+ } | undefined;
3039
+ survey?: {
3040
+ position: "bottom-left" | "bottom-right" | "center";
3041
+ questions: {
3042
+ options: {
3043
+ id: string;
3044
+ label: string;
3045
+ }[];
3046
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
3047
+ id: string;
3048
+ title: string;
3049
+ description: string;
3050
+ required: boolean;
3051
+ scaleMax?: number | undefined;
3052
+ lowLabel?: string | undefined;
3053
+ highLabel?: string | undefined;
3054
+ placeholder?: string | undefined;
3055
+ showWhen?: {
3056
+ value: string | number | string[];
3057
+ op: "equals" | "gte" | "lte" | "in";
3058
+ questionId: string;
3059
+ } | undefined;
3060
+ }[];
3061
+ thankYouTitle: string;
3062
+ thankYouBody: string;
3063
+ startAt?: string | undefined;
3064
+ endAt?: string | undefined;
3065
+ } | undefined;
3066
+ };
3067
+ publishedAt: string;
3068
+ }, {
3069
+ id: string;
3070
+ key: string;
3071
+ kind: string;
3072
+ name: string;
3073
+ version: number;
3074
+ config: {
3075
+ checklist?: {
3076
+ tasks: {
3077
+ id: string;
3078
+ title: string;
3079
+ action?: "url" | "start_guide" | "event" | "none" | undefined;
3080
+ description?: string | undefined;
3081
+ completion?: "event" | "click" | "manual" | "guide_completed" | "url_visited" | undefined;
3082
+ completionValue?: string | undefined;
3083
+ actionValue?: string | undefined;
3084
+ required?: boolean | undefined;
3085
+ }[];
3086
+ position?: "bottom-left" | "bottom-right" | undefined;
3087
+ ordered?: boolean | undefined;
3088
+ launcherLabel?: string | undefined;
3089
+ completionTitle?: string | undefined;
3090
+ completionBody?: string | undefined;
3091
+ autoOpen?: boolean | undefined;
3092
+ dismissible?: boolean | undefined;
3093
+ } | undefined;
3094
+ survey?: {
3095
+ questions: {
3096
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
3097
+ id: string;
3098
+ title: string;
3099
+ options?: {
3100
+ id: string;
3101
+ label: string;
3102
+ }[] | undefined;
3103
+ description?: string | undefined;
3104
+ required?: boolean | undefined;
3105
+ scaleMax?: number | undefined;
3106
+ lowLabel?: string | undefined;
3107
+ highLabel?: string | undefined;
3108
+ placeholder?: string | undefined;
3109
+ showWhen?: {
3110
+ value: string | number | string[];
3111
+ op: "equals" | "gte" | "lte" | "in";
3112
+ questionId: string;
3113
+ } | undefined;
3114
+ }[];
3115
+ position?: "bottom-left" | "bottom-right" | "center" | undefined;
3116
+ thankYouTitle?: string | undefined;
3117
+ thankYouBody?: string | undefined;
3118
+ startAt?: string | undefined;
3119
+ endAt?: string | undefined;
3120
+ } | undefined;
3121
+ targeting?: RuleGroup | undefined;
3122
+ steps?: {
3123
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
3124
+ id: string;
3125
+ hotspot?: {
3126
+ size?: number | undefined;
3127
+ pulse?: boolean | undefined;
3128
+ openOn?: "click" | "hover" | undefined;
3129
+ } | undefined;
3130
+ url?: string | undefined;
3131
+ title?: string | undefined;
3132
+ body?: string | undefined;
3133
+ imageUrl?: string | undefined;
3134
+ buttons?: {
3135
+ id: string;
3136
+ label: string;
3137
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
3138
+ value?: string | undefined;
3139
+ variant?: "primary" | "secondary" | "ghost" | "link" | undefined;
3140
+ newTab?: boolean | undefined;
3141
+ }[] | undefined;
3142
+ target?: {
3143
+ selectors: {
3144
+ value: string;
3145
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
3146
+ label?: string | undefined;
3147
+ }[];
3148
+ waitMs?: number | undefined;
3149
+ fallback?: "skip" | "show_as_modal" | "end_guide" | "wait" | undefined;
3150
+ scrollIntoView?: boolean | undefined;
3151
+ textSnapshot?: string | undefined;
3152
+ } | undefined;
3153
+ placement?: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto" | undefined;
3154
+ offset?: number | undefined;
3155
+ showOverlay?: boolean | undefined;
3156
+ showProgress?: boolean | undefined;
3157
+ showClose?: boolean | undefined;
3158
+ dismissOnOutsideClick?: boolean | undefined;
3159
+ spotlightPadding?: number | undefined;
3160
+ position?: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center" | undefined;
3161
+ advanceOn?: "event" | "button" | "element_click" | "element_visible" | "delay" | "any" | undefined;
3162
+ advanceValue?: string | undefined;
3163
+ advanceDelayMs?: number | undefined;
3164
+ branches?: {
3165
+ id: string;
3166
+ when: RuleGroup;
3167
+ goTo: string;
3168
+ }[] | undefined;
3169
+ width?: number | undefined;
3170
+ targeting?: RuleGroup | undefined;
3171
+ customHtml?: string | undefined;
3172
+ }[] | undefined;
3173
+ trigger?: {
3174
+ value?: string | undefined;
3175
+ type?: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter" | undefined;
3176
+ delayMs?: number | undefined;
3177
+ urlPattern?: string | undefined;
3178
+ } | undefined;
3179
+ frequency?: {
3180
+ mode?: "once" | "once_per_session" | "every_time" | "interval" | undefined;
3181
+ intervalHours?: number | undefined;
3182
+ maxImpressions?: number | undefined;
3183
+ cooldownHours?: number | undefined;
3184
+ priority?: number | undefined;
3185
+ mutuallyExclusiveWith?: string[] | undefined;
3186
+ reshowAfterDismiss?: boolean | undefined;
3187
+ } | undefined;
3188
+ appearance?: {
3189
+ theme?: "auto" | "light" | "dark" | undefined;
3190
+ primaryColor?: string | undefined;
3191
+ backgroundColor?: string | undefined;
3192
+ textColor?: string | undefined;
3193
+ borderRadius?: number | undefined;
3194
+ fontFamily?: string | undefined;
3195
+ overlayOpacity?: number | undefined;
3196
+ zIndex?: number | undefined;
3197
+ preset?: string | undefined;
3198
+ animation?: "none" | "fade" | "slide" | undefined;
3199
+ } | undefined;
3200
+ urlPatterns?: string[] | undefined;
3201
+ };
3202
+ publishedAt: string;
3203
+ }>;
3204
+ interface ApiError {
3205
+ error: {
3206
+ code: string;
3207
+ message: string;
3208
+ details?: unknown;
3209
+ };
3210
+ }
3211
+
3212
+ interface GuideTemplate {
3213
+ id: string;
3214
+ name: string;
3215
+ description: string;
3216
+ kind: GuideKind;
3217
+ category: "onboarding" | "feature" | "setup" | "forms" | "announcement" | "help" | "feedback";
3218
+ config: GuideConfigInput;
3219
+ }
3220
+ declare const GUIDE_TEMPLATES: GuideTemplate[];
3221
+ declare function templateConfig(id: string): {
3222
+ template: GuideTemplate;
3223
+ config: {
3224
+ targeting: RuleGroup;
3225
+ steps: {
3226
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
3227
+ id: string;
3228
+ title: string;
3229
+ body: string;
3230
+ buttons: {
3231
+ id: string;
3232
+ label: string;
3233
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
3234
+ variant: "primary" | "secondary" | "ghost" | "link";
3235
+ value?: string | undefined;
3236
+ newTab?: boolean | undefined;
3237
+ }[];
3238
+ placement: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto";
3239
+ offset: number;
3240
+ showOverlay: boolean;
3241
+ showProgress: boolean;
3242
+ showClose: boolean;
3243
+ dismissOnOutsideClick: boolean;
3244
+ spotlightPadding: number;
3245
+ position: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center";
3246
+ advanceOn: "event" | "button" | "element_click" | "element_visible" | "delay" | "any";
3247
+ branches: {
3248
+ id: string;
3249
+ when: RuleGroup;
3250
+ goTo: string;
3251
+ }[];
3252
+ hotspot?: {
3253
+ size: number;
3254
+ pulse: boolean;
3255
+ openOn: "click" | "hover";
3256
+ } | undefined;
3257
+ url?: string | undefined;
3258
+ imageUrl?: string | undefined;
3259
+ target?: {
3260
+ selectors: {
3261
+ value: string;
3262
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
3263
+ label?: string | undefined;
3264
+ }[];
3265
+ waitMs: number;
3266
+ fallback: "skip" | "show_as_modal" | "end_guide" | "wait";
3267
+ scrollIntoView: boolean;
3268
+ textSnapshot?: string | undefined;
3269
+ } | undefined;
3270
+ advanceValue?: string | undefined;
3271
+ advanceDelayMs?: number | undefined;
3272
+ width?: number | undefined;
3273
+ targeting?: RuleGroup | undefined;
3274
+ customHtml?: string | undefined;
3275
+ }[];
3276
+ trigger: {
3277
+ type: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter";
3278
+ delayMs: number;
3279
+ value?: string | undefined;
3280
+ urlPattern?: string | undefined;
3281
+ };
3282
+ frequency: {
3283
+ mode: "once" | "once_per_session" | "every_time" | "interval";
3284
+ cooldownHours: number;
3285
+ priority: number;
3286
+ mutuallyExclusiveWith: string[];
3287
+ reshowAfterDismiss: boolean;
3288
+ intervalHours?: number | undefined;
3289
+ maxImpressions?: number | undefined;
3290
+ };
3291
+ appearance: {
3292
+ theme: "auto" | "light" | "dark";
3293
+ animation: "none" | "fade" | "slide";
3294
+ primaryColor?: string | undefined;
3295
+ backgroundColor?: string | undefined;
3296
+ textColor?: string | undefined;
3297
+ borderRadius?: number | undefined;
3298
+ fontFamily?: string | undefined;
3299
+ overlayOpacity?: number | undefined;
3300
+ zIndex?: number | undefined;
3301
+ preset?: string | undefined;
3302
+ };
3303
+ urlPatterns: string[];
3304
+ checklist?: {
3305
+ position: "bottom-left" | "bottom-right";
3306
+ tasks: {
3307
+ id: string;
3308
+ action: "url" | "start_guide" | "event" | "none";
3309
+ title: string;
3310
+ description: string;
3311
+ completion: "event" | "click" | "manual" | "guide_completed" | "url_visited";
3312
+ required: boolean;
3313
+ completionValue?: string | undefined;
3314
+ actionValue?: string | undefined;
3315
+ }[];
3316
+ ordered: boolean;
3317
+ launcherLabel: string;
3318
+ completionTitle: string;
3319
+ completionBody: string;
3320
+ autoOpen: boolean;
3321
+ dismissible: boolean;
3322
+ } | undefined;
3323
+ survey?: {
3324
+ position: "bottom-left" | "bottom-right" | "center";
3325
+ questions: {
3326
+ options: {
3327
+ id: string;
3328
+ label: string;
3329
+ }[];
3330
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
3331
+ id: string;
3332
+ title: string;
3333
+ description: string;
3334
+ required: boolean;
3335
+ scaleMax?: number | undefined;
3336
+ lowLabel?: string | undefined;
3337
+ highLabel?: string | undefined;
3338
+ placeholder?: string | undefined;
3339
+ showWhen?: {
3340
+ value: string | number | string[];
3341
+ op: "equals" | "gte" | "lte" | "in";
3342
+ questionId: string;
3343
+ } | undefined;
3344
+ }[];
3345
+ thankYouTitle: string;
3346
+ thankYouBody: string;
3347
+ startAt?: string | undefined;
3348
+ endAt?: string | undefined;
3349
+ } | undefined;
3350
+ };
3351
+ } | null;
3352
+
3353
+ declare const SDK_API_VERSION = "v1";
3354
+ declare const SHARED_VERSION = "0.2.0";
3355
+
3356
+ export { ADVANCE_ON, type ApiError, type AppSnapshot, type Appearance, AppearanceSchema, type AuthoringPick, AuthoringPickSchema, type AuthoringSessionInfo, BUTTON_ACTIONS, ButtonSchema, type ChecklistConfig, ChecklistConfigSchema, type ChecklistProgressRequest, ChecklistProgressRequestSchema, type ChecklistTask, ChecklistTaskSchema, type ConversationLookupResponse, ConversationLookupSchema, type ConversationMessagesResponse, ConversationRatingSchema, type ConversationStatus, EVENT_NAMES, type EventBatch, EventBatchSchema, type EventName, type FrequencyConfig, FrequencySchema, GUIDE_KINDS, GUIDE_LIFECYCLE_EVENTS, GUIDE_STATUSES, GUIDE_TEMPLATES, type GuideConfig, type GuideConfigInput, GuideConfigSchema, type GuideKind, GuideStateUpdateSchema, type GuideStatus, type GuideStep, type GuideStepInput, type GuideTemplate, type IdentifyRequest, IdentifyRequestSchema, type IdentifyResponse, MAX_MESSAGE_LENGTH, MESSAGE_AUTHORS, type MessageAuthor, type MessengerCitation, type MessengerConfig, type MessengerConversation, type MessengerMessage, type MessengerSuggestedGuide, PLACEMENTS, type Placement, PostMessageSchema, type ProjectTheme, ProjectThemeSchema, type PublishedGuide, PublishedGuideSchema, type ResourceCenterArticle, type ResourceCenterConfig, Rule, RuleGroup, RuleGroupSchema, RuleSchema, SDK_API_VERSION, SELECTOR_KINDS, SHARED_VERSION, STEP_TYPES, SURVEY_QUESTION_TYPES, type ScoutStreamEvent, type SdkArticleSummary, type SdkArticlesResponse, type SdkConfigResponse, type SdkEvent, SdkEventSchema, type SelectorStrategy, SelectorStrategySchema, type StartConversationRequest, type StartConversationResponse, StartConversationSchema, StepBranchSchema, type StepButton, StepSchema, type StepTarget, type StepType, type SurveyConfig, SurveyConfigSchema, type SurveyQuestion, SurveyQuestionSchema, type SurveyResponseRequest, SurveyResponseRequestSchema, TRIGGER_TYPES, TargetSchema, type TriggerConfig, TriggerSchema, type ValidationIssue, defaultGuideConfig, defaultStep, templateConfig, validateGuideConfig, visibleButtons };