@guidelytech/shared 0.0.0-stage → 0.1.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,3186 @@
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
+ /** Validation beyond Zod shape: returns human-readable problems that block publishing. */
1527
+ interface ValidationIssue {
1528
+ level: "error" | "warning";
1529
+ stepId?: string;
1530
+ message: string;
1531
+ }
1532
+ declare function validateGuideConfig(kind: GuideKind, config: GuideConfig): ValidationIssue[];
1533
+ interface ProjectTheme {
1534
+ primaryColor: string;
1535
+ backgroundColor: string;
1536
+ textColor: string;
1537
+ borderRadius: number;
1538
+ fontFamily: string;
1539
+ logoUrl?: string;
1540
+ brandName?: string;
1541
+ }
1542
+ declare const ProjectThemeSchema: z.ZodObject<{
1543
+ primaryColor: z.ZodDefault<z.ZodString>;
1544
+ backgroundColor: z.ZodDefault<z.ZodString>;
1545
+ textColor: z.ZodDefault<z.ZodString>;
1546
+ borderRadius: z.ZodDefault<z.ZodNumber>;
1547
+ fontFamily: z.ZodDefault<z.ZodString>;
1548
+ logoUrl: z.ZodOptional<z.ZodString>;
1549
+ brandName: z.ZodOptional<z.ZodString>;
1550
+ }, "strip", z.ZodTypeAny, {
1551
+ primaryColor: string;
1552
+ backgroundColor: string;
1553
+ textColor: string;
1554
+ borderRadius: number;
1555
+ fontFamily: string;
1556
+ logoUrl?: string | undefined;
1557
+ brandName?: string | undefined;
1558
+ }, {
1559
+ primaryColor?: string | undefined;
1560
+ backgroundColor?: string | undefined;
1561
+ textColor?: string | undefined;
1562
+ borderRadius?: number | undefined;
1563
+ fontFamily?: string | undefined;
1564
+ logoUrl?: string | undefined;
1565
+ brandName?: string | undefined;
1566
+ }>;
1567
+
1568
+ 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", "custom", "page_view", "identify"];
1569
+ type EventName = (typeof EVENT_NAMES)[number];
1570
+ declare const GUIDE_LIFECYCLE_EVENTS: readonly ["guide_viewed", "guide_started", "step_viewed", "step_completed", "guide_completed", "guide_skipped", "guide_dismissed", "guide_abandoned"];
1571
+ /** Event as produced by the SDK and accepted by POST /api/v1/sdk/events */
1572
+ declare const SdkEventSchema: z.ZodObject<{
1573
+ eventId: z.ZodString;
1574
+ 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", "custom", "page_view", "identify"]>;
1575
+ /** For `custom` events: the application-defined name. */
1576
+ customName: z.ZodOptional<z.ZodString>;
1577
+ occurredAt: z.ZodString;
1578
+ anonymousId: z.ZodString;
1579
+ userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1580
+ accountId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1581
+ sessionId: z.ZodOptional<z.ZodString>;
1582
+ guideId: z.ZodOptional<z.ZodString>;
1583
+ guideVersion: z.ZodOptional<z.ZodNumber>;
1584
+ stepId: z.ZodOptional<z.ZodString>;
1585
+ stepIndex: z.ZodOptional<z.ZodNumber>;
1586
+ url: z.ZodOptional<z.ZodString>;
1587
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1588
+ }, "strip", z.ZodTypeAny, {
1589
+ eventId: string;
1590
+ 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" | "page_view" | "identify";
1591
+ occurredAt: string;
1592
+ anonymousId: string;
1593
+ url?: string | undefined;
1594
+ customName?: string | undefined;
1595
+ userId?: string | null | undefined;
1596
+ accountId?: string | null | undefined;
1597
+ sessionId?: string | undefined;
1598
+ guideId?: string | undefined;
1599
+ guideVersion?: number | undefined;
1600
+ stepId?: string | undefined;
1601
+ stepIndex?: number | undefined;
1602
+ properties?: Record<string, unknown> | undefined;
1603
+ }, {
1604
+ eventId: string;
1605
+ 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" | "page_view" | "identify";
1606
+ occurredAt: string;
1607
+ anonymousId: string;
1608
+ url?: string | undefined;
1609
+ customName?: string | undefined;
1610
+ userId?: string | null | undefined;
1611
+ accountId?: string | null | undefined;
1612
+ sessionId?: string | undefined;
1613
+ guideId?: string | undefined;
1614
+ guideVersion?: number | undefined;
1615
+ stepId?: string | undefined;
1616
+ stepIndex?: number | undefined;
1617
+ properties?: Record<string, unknown> | undefined;
1618
+ }>;
1619
+ type SdkEvent = z.infer<typeof SdkEventSchema>;
1620
+ declare const EventBatchSchema: z.ZodObject<{
1621
+ events: z.ZodArray<z.ZodObject<{
1622
+ eventId: z.ZodString;
1623
+ 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", "custom", "page_view", "identify"]>;
1624
+ /** For `custom` events: the application-defined name. */
1625
+ customName: z.ZodOptional<z.ZodString>;
1626
+ occurredAt: z.ZodString;
1627
+ anonymousId: z.ZodString;
1628
+ userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1629
+ accountId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1630
+ sessionId: z.ZodOptional<z.ZodString>;
1631
+ guideId: z.ZodOptional<z.ZodString>;
1632
+ guideVersion: z.ZodOptional<z.ZodNumber>;
1633
+ stepId: z.ZodOptional<z.ZodString>;
1634
+ stepIndex: z.ZodOptional<z.ZodNumber>;
1635
+ url: z.ZodOptional<z.ZodString>;
1636
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1637
+ }, "strip", z.ZodTypeAny, {
1638
+ eventId: string;
1639
+ 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" | "page_view" | "identify";
1640
+ occurredAt: string;
1641
+ anonymousId: string;
1642
+ url?: string | undefined;
1643
+ customName?: string | undefined;
1644
+ userId?: string | null | undefined;
1645
+ accountId?: string | null | undefined;
1646
+ sessionId?: string | undefined;
1647
+ guideId?: string | undefined;
1648
+ guideVersion?: number | undefined;
1649
+ stepId?: string | undefined;
1650
+ stepIndex?: number | undefined;
1651
+ properties?: Record<string, unknown> | undefined;
1652
+ }, {
1653
+ eventId: string;
1654
+ 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" | "page_view" | "identify";
1655
+ occurredAt: string;
1656
+ anonymousId: string;
1657
+ url?: string | undefined;
1658
+ customName?: string | undefined;
1659
+ userId?: string | null | undefined;
1660
+ accountId?: string | null | undefined;
1661
+ sessionId?: string | undefined;
1662
+ guideId?: string | undefined;
1663
+ guideVersion?: number | undefined;
1664
+ stepId?: string | undefined;
1665
+ stepIndex?: number | undefined;
1666
+ properties?: Record<string, unknown> | undefined;
1667
+ }>, "many">;
1668
+ sentAt: z.ZodOptional<z.ZodString>;
1669
+ sdk: z.ZodOptional<z.ZodObject<{
1670
+ name: z.ZodString;
1671
+ version: z.ZodString;
1672
+ }, "strip", z.ZodTypeAny, {
1673
+ name: string;
1674
+ version: string;
1675
+ }, {
1676
+ name: string;
1677
+ version: string;
1678
+ }>>;
1679
+ }, "strip", z.ZodTypeAny, {
1680
+ events: {
1681
+ eventId: string;
1682
+ 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" | "page_view" | "identify";
1683
+ occurredAt: string;
1684
+ anonymousId: string;
1685
+ url?: string | undefined;
1686
+ customName?: string | undefined;
1687
+ userId?: string | null | undefined;
1688
+ accountId?: string | null | undefined;
1689
+ sessionId?: string | undefined;
1690
+ guideId?: string | undefined;
1691
+ guideVersion?: number | undefined;
1692
+ stepId?: string | undefined;
1693
+ stepIndex?: number | undefined;
1694
+ properties?: Record<string, unknown> | undefined;
1695
+ }[];
1696
+ sentAt?: string | undefined;
1697
+ sdk?: {
1698
+ name: string;
1699
+ version: string;
1700
+ } | undefined;
1701
+ }, {
1702
+ events: {
1703
+ eventId: string;
1704
+ 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" | "page_view" | "identify";
1705
+ occurredAt: string;
1706
+ anonymousId: string;
1707
+ url?: string | undefined;
1708
+ customName?: string | undefined;
1709
+ userId?: string | null | undefined;
1710
+ accountId?: string | null | undefined;
1711
+ sessionId?: string | undefined;
1712
+ guideId?: string | undefined;
1713
+ guideVersion?: number | undefined;
1714
+ stepId?: string | undefined;
1715
+ stepIndex?: number | undefined;
1716
+ properties?: Record<string, unknown> | undefined;
1717
+ }[];
1718
+ sentAt?: string | undefined;
1719
+ sdk?: {
1720
+ name: string;
1721
+ version: string;
1722
+ } | undefined;
1723
+ }>;
1724
+ type EventBatch = z.infer<typeof EventBatchSchema>;
1725
+
1726
+ /** A published guide as delivered to the SDK. Draft-only data (author, notes) is never included. */
1727
+ interface PublishedGuide {
1728
+ id: string;
1729
+ key: string;
1730
+ name: string;
1731
+ kind: GuideKind;
1732
+ version: number;
1733
+ config: GuideConfig;
1734
+ publishedAt: string;
1735
+ }
1736
+ interface ResourceCenterArticle {
1737
+ id: string;
1738
+ slug: string;
1739
+ title: string;
1740
+ summary: string;
1741
+ body: string;
1742
+ collectionId?: string | null;
1743
+ externalUrl?: string | null;
1744
+ updatedAt: string;
1745
+ }
1746
+ interface ResourceCenterConfig {
1747
+ enabled: boolean;
1748
+ title: string;
1749
+ launcher: {
1750
+ position: "bottom-right" | "bottom-left";
1751
+ label: string;
1752
+ showIcon: boolean;
1753
+ };
1754
+ collections: Array<{
1755
+ id: string;
1756
+ name: string;
1757
+ description: string;
1758
+ order: number;
1759
+ }>;
1760
+ articles: ResourceCenterArticle[];
1761
+ recommendedGuideIds: string[];
1762
+ checklistGuideIds: string[];
1763
+ links: Array<{
1764
+ id: string;
1765
+ label: string;
1766
+ url: string;
1767
+ }>;
1768
+ faqs: Array<{
1769
+ id: string;
1770
+ question: string;
1771
+ answer: string;
1772
+ }>;
1773
+ }
1774
+ interface SdkConfigResponse {
1775
+ projectId: string;
1776
+ environment: string;
1777
+ configVersion: number;
1778
+ theme: z.infer<typeof ProjectThemeSchema>;
1779
+ guides: PublishedGuide[];
1780
+ resourceCenter: ResourceCenterConfig | null;
1781
+ settings: {
1782
+ analyticsEnabled: boolean;
1783
+ collectUrls: boolean;
1784
+ maskSelectors: string[];
1785
+ sessionTimeoutMinutes: number;
1786
+ };
1787
+ generatedAt: string;
1788
+ }
1789
+ declare const IdentifyRequestSchema: z.ZodObject<{
1790
+ anonymousId: z.ZodString;
1791
+ userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1792
+ traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1793
+ account: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1794
+ id: z.ZodString;
1795
+ traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1796
+ }, "strip", z.ZodTypeAny, {
1797
+ id: string;
1798
+ traits?: Record<string, unknown> | undefined;
1799
+ }, {
1800
+ id: string;
1801
+ traits?: Record<string, unknown> | undefined;
1802
+ }>>>;
1803
+ sessionId: z.ZodOptional<z.ZodString>;
1804
+ url: z.ZodOptional<z.ZodString>;
1805
+ }, "strip", z.ZodTypeAny, {
1806
+ anonymousId: string;
1807
+ url?: string | undefined;
1808
+ userId?: string | null | undefined;
1809
+ sessionId?: string | undefined;
1810
+ traits?: Record<string, unknown> | undefined;
1811
+ account?: {
1812
+ id: string;
1813
+ traits?: Record<string, unknown> | undefined;
1814
+ } | null | undefined;
1815
+ }, {
1816
+ anonymousId: string;
1817
+ url?: string | undefined;
1818
+ userId?: string | null | undefined;
1819
+ sessionId?: string | undefined;
1820
+ traits?: Record<string, unknown> | undefined;
1821
+ account?: {
1822
+ id: string;
1823
+ traits?: Record<string, unknown> | undefined;
1824
+ } | null | undefined;
1825
+ }>;
1826
+ type IdentifyRequest = z.infer<typeof IdentifyRequestSchema>;
1827
+ /** Server-held state the SDK needs for targeting & frequency. */
1828
+ interface IdentifyResponse {
1829
+ endUserId: string;
1830
+ audienceIds: string[];
1831
+ guideState: Record<string, {
1832
+ impressions: number;
1833
+ completedAt?: string | null;
1834
+ dismissedAt?: string | null;
1835
+ lastShownAt?: string | null;
1836
+ }>;
1837
+ checklistProgress: Record<string, {
1838
+ completedTaskIds: string[];
1839
+ completedAt?: string | null;
1840
+ dismissedAt?: string | null;
1841
+ }>;
1842
+ surveysSubmitted: string[];
1843
+ firstSeenAt: string;
1844
+ }
1845
+ declare const ChecklistProgressRequestSchema: z.ZodObject<{
1846
+ anonymousId: z.ZodString;
1847
+ userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1848
+ guideVersion: z.ZodOptional<z.ZodNumber>;
1849
+ completedTaskIds: z.ZodArray<z.ZodString, "many">;
1850
+ dismissed: z.ZodOptional<z.ZodBoolean>;
1851
+ completed: z.ZodOptional<z.ZodBoolean>;
1852
+ }, "strip", z.ZodTypeAny, {
1853
+ anonymousId: string;
1854
+ completedTaskIds: string[];
1855
+ userId?: string | null | undefined;
1856
+ guideVersion?: number | undefined;
1857
+ dismissed?: boolean | undefined;
1858
+ completed?: boolean | undefined;
1859
+ }, {
1860
+ anonymousId: string;
1861
+ completedTaskIds: string[];
1862
+ userId?: string | null | undefined;
1863
+ guideVersion?: number | undefined;
1864
+ dismissed?: boolean | undefined;
1865
+ completed?: boolean | undefined;
1866
+ }>;
1867
+ type ChecklistProgressRequest = z.infer<typeof ChecklistProgressRequestSchema>;
1868
+ declare const SurveyResponseRequestSchema: z.ZodObject<{
1869
+ anonymousId: z.ZodString;
1870
+ userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1871
+ accountId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1872
+ guideVersion: z.ZodNumber;
1873
+ answers: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
1874
+ responseId: z.ZodString;
1875
+ }, "strip", z.ZodTypeAny, {
1876
+ anonymousId: string;
1877
+ guideVersion: number;
1878
+ answers: Record<string, string | number | boolean | string[]>;
1879
+ responseId: string;
1880
+ userId?: string | null | undefined;
1881
+ accountId?: string | null | undefined;
1882
+ }, {
1883
+ anonymousId: string;
1884
+ guideVersion: number;
1885
+ answers: Record<string, string | number | boolean | string[]>;
1886
+ responseId: string;
1887
+ userId?: string | null | undefined;
1888
+ accountId?: string | null | undefined;
1889
+ }>;
1890
+ type SurveyResponseRequest = z.infer<typeof SurveyResponseRequestSchema>;
1891
+ declare const GuideStateUpdateSchema: z.ZodObject<{
1892
+ anonymousId: z.ZodString;
1893
+ userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1894
+ updates: z.ZodArray<z.ZodObject<{
1895
+ guideId: z.ZodString;
1896
+ impression: z.ZodOptional<z.ZodBoolean>;
1897
+ completed: z.ZodOptional<z.ZodBoolean>;
1898
+ dismissed: z.ZodOptional<z.ZodBoolean>;
1899
+ }, "strip", z.ZodTypeAny, {
1900
+ guideId: string;
1901
+ dismissed?: boolean | undefined;
1902
+ completed?: boolean | undefined;
1903
+ impression?: boolean | undefined;
1904
+ }, {
1905
+ guideId: string;
1906
+ dismissed?: boolean | undefined;
1907
+ completed?: boolean | undefined;
1908
+ impression?: boolean | undefined;
1909
+ }>, "many">;
1910
+ }, "strip", z.ZodTypeAny, {
1911
+ anonymousId: string;
1912
+ updates: {
1913
+ guideId: string;
1914
+ dismissed?: boolean | undefined;
1915
+ completed?: boolean | undefined;
1916
+ impression?: boolean | undefined;
1917
+ }[];
1918
+ userId?: string | null | undefined;
1919
+ }, {
1920
+ anonymousId: string;
1921
+ updates: {
1922
+ guideId: string;
1923
+ dismissed?: boolean | undefined;
1924
+ completed?: boolean | undefined;
1925
+ impression?: boolean | undefined;
1926
+ }[];
1927
+ userId?: string | null | undefined;
1928
+ }>;
1929
+ declare const AuthoringPickSchema: z.ZodObject<{
1930
+ stepId: z.ZodOptional<z.ZodString>;
1931
+ selectors: z.ZodArray<z.ZodObject<{
1932
+ kind: z.ZodString;
1933
+ value: z.ZodString;
1934
+ label: z.ZodOptional<z.ZodString>;
1935
+ }, "strip", z.ZodTypeAny, {
1936
+ value: string;
1937
+ kind: string;
1938
+ label?: string | undefined;
1939
+ }, {
1940
+ value: string;
1941
+ kind: string;
1942
+ label?: string | undefined;
1943
+ }>, "many">;
1944
+ textSnapshot: z.ZodOptional<z.ZodString>;
1945
+ url: z.ZodOptional<z.ZodString>;
1946
+ rect: z.ZodOptional<z.ZodObject<{
1947
+ x: z.ZodNumber;
1948
+ y: z.ZodNumber;
1949
+ width: z.ZodNumber;
1950
+ height: z.ZodNumber;
1951
+ }, "strip", z.ZodTypeAny, {
1952
+ width: number;
1953
+ x: number;
1954
+ y: number;
1955
+ height: number;
1956
+ }, {
1957
+ width: number;
1958
+ x: number;
1959
+ y: number;
1960
+ height: number;
1961
+ }>>;
1962
+ }, "strip", z.ZodTypeAny, {
1963
+ selectors: {
1964
+ value: string;
1965
+ kind: string;
1966
+ label?: string | undefined;
1967
+ }[];
1968
+ textSnapshot?: string | undefined;
1969
+ url?: string | undefined;
1970
+ stepId?: string | undefined;
1971
+ rect?: {
1972
+ width: number;
1973
+ x: number;
1974
+ y: number;
1975
+ height: number;
1976
+ } | undefined;
1977
+ }, {
1978
+ selectors: {
1979
+ value: string;
1980
+ kind: string;
1981
+ label?: string | undefined;
1982
+ }[];
1983
+ textSnapshot?: string | undefined;
1984
+ url?: string | undefined;
1985
+ stepId?: string | undefined;
1986
+ rect?: {
1987
+ width: number;
1988
+ x: number;
1989
+ y: number;
1990
+ height: number;
1991
+ } | undefined;
1992
+ }>;
1993
+ type AuthoringPick = z.infer<typeof AuthoringPickSchema>;
1994
+ interface AuthoringSessionInfo {
1995
+ id: string;
1996
+ projectId: string;
1997
+ environment: string;
1998
+ guideId: string | null;
1999
+ dashboardOrigin: string;
2000
+ expiresAt: string;
2001
+ /** Draft guide config to preview while authoring (not published). */
2002
+ draft: {
2003
+ id: string;
2004
+ key: string;
2005
+ name: string;
2006
+ kind: GuideKind;
2007
+ config: GuideConfig;
2008
+ } | null;
2009
+ }
2010
+ declare const PublishedGuideSchema: z.ZodObject<{
2011
+ id: z.ZodString;
2012
+ key: z.ZodString;
2013
+ name: z.ZodString;
2014
+ kind: z.ZodString;
2015
+ version: z.ZodNumber;
2016
+ config: z.ZodObject<{
2017
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
2018
+ id: z.ZodString;
2019
+ type: z.ZodEnum<["modal", "tooltip", "popover", "spotlight", "hotspot", "banner", "slideout", "checklist", "custom", "survey"]>;
2020
+ title: z.ZodDefault<z.ZodString>;
2021
+ body: z.ZodDefault<z.ZodString>;
2022
+ imageUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
2023
+ buttons: z.ZodDefault<z.ZodArray<z.ZodObject<{
2024
+ id: z.ZodString;
2025
+ label: z.ZodString;
2026
+ action: z.ZodEnum<["next", "back", "dismiss", "complete", "skip", "url", "start_guide", "event", "open_resource_center", "none"]>;
2027
+ variant: z.ZodDefault<z.ZodEnum<["primary", "secondary", "ghost", "link"]>>;
2028
+ value: z.ZodOptional<z.ZodString>;
2029
+ newTab: z.ZodOptional<z.ZodBoolean>;
2030
+ }, "strip", z.ZodTypeAny, {
2031
+ id: string;
2032
+ label: string;
2033
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
2034
+ variant: "primary" | "secondary" | "ghost" | "link";
2035
+ value?: string | undefined;
2036
+ newTab?: boolean | undefined;
2037
+ }, {
2038
+ id: string;
2039
+ label: string;
2040
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
2041
+ value?: string | undefined;
2042
+ variant?: "primary" | "secondary" | "ghost" | "link" | undefined;
2043
+ newTab?: boolean | undefined;
2044
+ }>, "many">>;
2045
+ target: z.ZodOptional<z.ZodObject<{
2046
+ selectors: z.ZodArray<z.ZodObject<{
2047
+ kind: z.ZodEnum<["css", "id", "data-attr", "aria", "text", "xpath"]>;
2048
+ value: z.ZodString;
2049
+ label: z.ZodOptional<z.ZodString>;
2050
+ }, "strip", z.ZodTypeAny, {
2051
+ value: string;
2052
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2053
+ label?: string | undefined;
2054
+ }, {
2055
+ value: string;
2056
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2057
+ label?: string | undefined;
2058
+ }>, "many">;
2059
+ waitMs: z.ZodDefault<z.ZodNumber>;
2060
+ fallback: z.ZodDefault<z.ZodEnum<["skip", "show_as_modal", "end_guide", "wait"]>>;
2061
+ scrollIntoView: z.ZodDefault<z.ZodBoolean>;
2062
+ textSnapshot: z.ZodOptional<z.ZodString>;
2063
+ }, "strip", z.ZodTypeAny, {
2064
+ selectors: {
2065
+ value: string;
2066
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2067
+ label?: string | undefined;
2068
+ }[];
2069
+ waitMs: number;
2070
+ fallback: "skip" | "show_as_modal" | "end_guide" | "wait";
2071
+ scrollIntoView: boolean;
2072
+ textSnapshot?: string | undefined;
2073
+ }, {
2074
+ selectors: {
2075
+ value: string;
2076
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2077
+ label?: string | undefined;
2078
+ }[];
2079
+ waitMs?: number | undefined;
2080
+ fallback?: "skip" | "show_as_modal" | "end_guide" | "wait" | undefined;
2081
+ scrollIntoView?: boolean | undefined;
2082
+ textSnapshot?: string | undefined;
2083
+ }>>;
2084
+ 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"]>>;
2085
+ offset: z.ZodDefault<z.ZodNumber>;
2086
+ showOverlay: z.ZodDefault<z.ZodBoolean>;
2087
+ showProgress: z.ZodDefault<z.ZodBoolean>;
2088
+ showClose: z.ZodDefault<z.ZodBoolean>;
2089
+ dismissOnOutsideClick: z.ZodDefault<z.ZodBoolean>;
2090
+ spotlightPadding: z.ZodDefault<z.ZodNumber>;
2091
+ position: z.ZodDefault<z.ZodEnum<["top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right", "center"]>>;
2092
+ url: z.ZodOptional<z.ZodString>;
2093
+ advanceOn: z.ZodDefault<z.ZodEnum<["button", "element_click", "element_visible", "event", "delay", "any"]>>;
2094
+ advanceValue: z.ZodOptional<z.ZodString>;
2095
+ advanceDelayMs: z.ZodOptional<z.ZodNumber>;
2096
+ branches: z.ZodDefault<z.ZodArray<z.ZodObject<{
2097
+ id: z.ZodString;
2098
+ when: z.ZodType<RuleGroup, z.ZodTypeDef, RuleGroup>;
2099
+ goTo: z.ZodString;
2100
+ }, "strip", z.ZodTypeAny, {
2101
+ id: string;
2102
+ when: RuleGroup;
2103
+ goTo: string;
2104
+ }, {
2105
+ id: string;
2106
+ when: RuleGroup;
2107
+ goTo: string;
2108
+ }>, "many">>;
2109
+ width: z.ZodOptional<z.ZodNumber>;
2110
+ targeting: z.ZodOptional<z.ZodType<RuleGroup, z.ZodTypeDef, RuleGroup>>;
2111
+ hotspot: z.ZodOptional<z.ZodObject<{
2112
+ size: z.ZodDefault<z.ZodNumber>;
2113
+ pulse: z.ZodDefault<z.ZodBoolean>;
2114
+ openOn: z.ZodDefault<z.ZodEnum<["click", "hover"]>>;
2115
+ }, "strip", z.ZodTypeAny, {
2116
+ size: number;
2117
+ pulse: boolean;
2118
+ openOn: "click" | "hover";
2119
+ }, {
2120
+ size?: number | undefined;
2121
+ pulse?: boolean | undefined;
2122
+ openOn?: "click" | "hover" | undefined;
2123
+ }>>;
2124
+ customHtml: z.ZodOptional<z.ZodString>;
2125
+ }, "strip", z.ZodTypeAny, {
2126
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
2127
+ id: string;
2128
+ title: string;
2129
+ body: string;
2130
+ buttons: {
2131
+ id: string;
2132
+ label: string;
2133
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
2134
+ variant: "primary" | "secondary" | "ghost" | "link";
2135
+ value?: string | undefined;
2136
+ newTab?: boolean | undefined;
2137
+ }[];
2138
+ placement: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto";
2139
+ offset: number;
2140
+ showOverlay: boolean;
2141
+ showProgress: boolean;
2142
+ showClose: boolean;
2143
+ dismissOnOutsideClick: boolean;
2144
+ spotlightPadding: number;
2145
+ position: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center";
2146
+ advanceOn: "event" | "button" | "element_click" | "element_visible" | "delay" | "any";
2147
+ branches: {
2148
+ id: string;
2149
+ when: RuleGroup;
2150
+ goTo: string;
2151
+ }[];
2152
+ hotspot?: {
2153
+ size: number;
2154
+ pulse: boolean;
2155
+ openOn: "click" | "hover";
2156
+ } | undefined;
2157
+ url?: string | undefined;
2158
+ imageUrl?: string | undefined;
2159
+ target?: {
2160
+ selectors: {
2161
+ value: string;
2162
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2163
+ label?: string | undefined;
2164
+ }[];
2165
+ waitMs: number;
2166
+ fallback: "skip" | "show_as_modal" | "end_guide" | "wait";
2167
+ scrollIntoView: boolean;
2168
+ textSnapshot?: string | undefined;
2169
+ } | undefined;
2170
+ advanceValue?: string | undefined;
2171
+ advanceDelayMs?: number | undefined;
2172
+ width?: number | undefined;
2173
+ targeting?: RuleGroup | undefined;
2174
+ customHtml?: string | undefined;
2175
+ }, {
2176
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
2177
+ id: string;
2178
+ hotspot?: {
2179
+ size?: number | undefined;
2180
+ pulse?: boolean | undefined;
2181
+ openOn?: "click" | "hover" | undefined;
2182
+ } | undefined;
2183
+ url?: string | undefined;
2184
+ title?: string | undefined;
2185
+ body?: string | undefined;
2186
+ imageUrl?: string | undefined;
2187
+ buttons?: {
2188
+ id: string;
2189
+ label: string;
2190
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
2191
+ value?: string | undefined;
2192
+ variant?: "primary" | "secondary" | "ghost" | "link" | undefined;
2193
+ newTab?: boolean | undefined;
2194
+ }[] | undefined;
2195
+ target?: {
2196
+ selectors: {
2197
+ value: string;
2198
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2199
+ label?: string | undefined;
2200
+ }[];
2201
+ waitMs?: number | undefined;
2202
+ fallback?: "skip" | "show_as_modal" | "end_guide" | "wait" | undefined;
2203
+ scrollIntoView?: boolean | undefined;
2204
+ textSnapshot?: string | undefined;
2205
+ } | undefined;
2206
+ placement?: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto" | undefined;
2207
+ offset?: number | undefined;
2208
+ showOverlay?: boolean | undefined;
2209
+ showProgress?: boolean | undefined;
2210
+ showClose?: boolean | undefined;
2211
+ dismissOnOutsideClick?: boolean | undefined;
2212
+ spotlightPadding?: number | undefined;
2213
+ position?: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center" | undefined;
2214
+ advanceOn?: "event" | "button" | "element_click" | "element_visible" | "delay" | "any" | undefined;
2215
+ advanceValue?: string | undefined;
2216
+ advanceDelayMs?: number | undefined;
2217
+ branches?: {
2218
+ id: string;
2219
+ when: RuleGroup;
2220
+ goTo: string;
2221
+ }[] | undefined;
2222
+ width?: number | undefined;
2223
+ targeting?: RuleGroup | undefined;
2224
+ customHtml?: string | undefined;
2225
+ }>, "many">>;
2226
+ targeting: z.ZodDefault<z.ZodType<RuleGroup, z.ZodTypeDef, RuleGroup>>;
2227
+ trigger: z.ZodDefault<z.ZodObject<{
2228
+ type: z.ZodDefault<z.ZodEnum<["page_load", "url_match", "event", "element_click", "element_visible", "manual", "delay", "after_guide", "segment_enter"]>>;
2229
+ value: z.ZodOptional<z.ZodString>;
2230
+ delayMs: z.ZodDefault<z.ZodNumber>;
2231
+ urlPattern: z.ZodOptional<z.ZodString>;
2232
+ }, "strip", z.ZodTypeAny, {
2233
+ type: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter";
2234
+ delayMs: number;
2235
+ value?: string | undefined;
2236
+ urlPattern?: string | undefined;
2237
+ }, {
2238
+ value?: string | undefined;
2239
+ type?: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter" | undefined;
2240
+ delayMs?: number | undefined;
2241
+ urlPattern?: string | undefined;
2242
+ }>>;
2243
+ frequency: z.ZodDefault<z.ZodObject<{
2244
+ mode: z.ZodDefault<z.ZodEnum<["once", "once_per_session", "every_time", "interval"]>>;
2245
+ intervalHours: z.ZodOptional<z.ZodNumber>;
2246
+ maxImpressions: z.ZodOptional<z.ZodNumber>;
2247
+ cooldownHours: z.ZodDefault<z.ZodNumber>;
2248
+ priority: z.ZodDefault<z.ZodNumber>;
2249
+ mutuallyExclusiveWith: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2250
+ reshowAfterDismiss: z.ZodDefault<z.ZodBoolean>;
2251
+ }, "strip", z.ZodTypeAny, {
2252
+ mode: "once" | "once_per_session" | "every_time" | "interval";
2253
+ cooldownHours: number;
2254
+ priority: number;
2255
+ mutuallyExclusiveWith: string[];
2256
+ reshowAfterDismiss: boolean;
2257
+ intervalHours?: number | undefined;
2258
+ maxImpressions?: number | undefined;
2259
+ }, {
2260
+ mode?: "once" | "once_per_session" | "every_time" | "interval" | undefined;
2261
+ intervalHours?: number | undefined;
2262
+ maxImpressions?: number | undefined;
2263
+ cooldownHours?: number | undefined;
2264
+ priority?: number | undefined;
2265
+ mutuallyExclusiveWith?: string[] | undefined;
2266
+ reshowAfterDismiss?: boolean | undefined;
2267
+ }>>;
2268
+ appearance: z.ZodDefault<z.ZodObject<{
2269
+ theme: z.ZodDefault<z.ZodEnum<["light", "dark", "auto"]>>;
2270
+ primaryColor: z.ZodOptional<z.ZodString>;
2271
+ backgroundColor: z.ZodOptional<z.ZodString>;
2272
+ textColor: z.ZodOptional<z.ZodString>;
2273
+ borderRadius: z.ZodOptional<z.ZodNumber>;
2274
+ fontFamily: z.ZodOptional<z.ZodString>;
2275
+ overlayOpacity: z.ZodOptional<z.ZodNumber>;
2276
+ zIndex: z.ZodOptional<z.ZodNumber>;
2277
+ preset: z.ZodOptional<z.ZodString>;
2278
+ animation: z.ZodDefault<z.ZodEnum<["fade", "slide", "none"]>>;
2279
+ }, "strip", z.ZodTypeAny, {
2280
+ theme: "auto" | "light" | "dark";
2281
+ animation: "none" | "fade" | "slide";
2282
+ primaryColor?: string | undefined;
2283
+ backgroundColor?: string | undefined;
2284
+ textColor?: string | undefined;
2285
+ borderRadius?: number | undefined;
2286
+ fontFamily?: string | undefined;
2287
+ overlayOpacity?: number | undefined;
2288
+ zIndex?: number | undefined;
2289
+ preset?: string | undefined;
2290
+ }, {
2291
+ theme?: "auto" | "light" | "dark" | undefined;
2292
+ primaryColor?: string | undefined;
2293
+ backgroundColor?: string | undefined;
2294
+ textColor?: string | undefined;
2295
+ borderRadius?: number | undefined;
2296
+ fontFamily?: string | undefined;
2297
+ overlayOpacity?: number | undefined;
2298
+ zIndex?: number | undefined;
2299
+ preset?: string | undefined;
2300
+ animation?: "none" | "fade" | "slide" | undefined;
2301
+ }>>;
2302
+ checklist: z.ZodOptional<z.ZodObject<{
2303
+ tasks: z.ZodArray<z.ZodObject<{
2304
+ id: z.ZodString;
2305
+ title: z.ZodString;
2306
+ description: z.ZodDefault<z.ZodString>;
2307
+ completion: z.ZodDefault<z.ZodEnum<["manual", "event", "guide_completed", "url_visited", "click"]>>;
2308
+ completionValue: z.ZodOptional<z.ZodString>;
2309
+ action: z.ZodDefault<z.ZodEnum<["none", "start_guide", "url", "event"]>>;
2310
+ actionValue: z.ZodOptional<z.ZodString>;
2311
+ required: z.ZodDefault<z.ZodBoolean>;
2312
+ }, "strip", z.ZodTypeAny, {
2313
+ id: string;
2314
+ action: "url" | "start_guide" | "event" | "none";
2315
+ title: string;
2316
+ description: string;
2317
+ completion: "event" | "click" | "manual" | "guide_completed" | "url_visited";
2318
+ required: boolean;
2319
+ completionValue?: string | undefined;
2320
+ actionValue?: string | undefined;
2321
+ }, {
2322
+ id: string;
2323
+ title: string;
2324
+ action?: "url" | "start_guide" | "event" | "none" | undefined;
2325
+ description?: string | undefined;
2326
+ completion?: "event" | "click" | "manual" | "guide_completed" | "url_visited" | undefined;
2327
+ completionValue?: string | undefined;
2328
+ actionValue?: string | undefined;
2329
+ required?: boolean | undefined;
2330
+ }>, "many">;
2331
+ ordered: z.ZodDefault<z.ZodBoolean>;
2332
+ launcherLabel: z.ZodDefault<z.ZodString>;
2333
+ position: z.ZodDefault<z.ZodEnum<["bottom-right", "bottom-left"]>>;
2334
+ completionTitle: z.ZodDefault<z.ZodString>;
2335
+ completionBody: z.ZodDefault<z.ZodString>;
2336
+ autoOpen: z.ZodDefault<z.ZodBoolean>;
2337
+ dismissible: z.ZodDefault<z.ZodBoolean>;
2338
+ }, "strip", z.ZodTypeAny, {
2339
+ position: "bottom-left" | "bottom-right";
2340
+ tasks: {
2341
+ id: string;
2342
+ action: "url" | "start_guide" | "event" | "none";
2343
+ title: string;
2344
+ description: string;
2345
+ completion: "event" | "click" | "manual" | "guide_completed" | "url_visited";
2346
+ required: boolean;
2347
+ completionValue?: string | undefined;
2348
+ actionValue?: string | undefined;
2349
+ }[];
2350
+ ordered: boolean;
2351
+ launcherLabel: string;
2352
+ completionTitle: string;
2353
+ completionBody: string;
2354
+ autoOpen: boolean;
2355
+ dismissible: boolean;
2356
+ }, {
2357
+ tasks: {
2358
+ id: string;
2359
+ title: string;
2360
+ action?: "url" | "start_guide" | "event" | "none" | undefined;
2361
+ description?: string | undefined;
2362
+ completion?: "event" | "click" | "manual" | "guide_completed" | "url_visited" | undefined;
2363
+ completionValue?: string | undefined;
2364
+ actionValue?: string | undefined;
2365
+ required?: boolean | undefined;
2366
+ }[];
2367
+ position?: "bottom-left" | "bottom-right" | undefined;
2368
+ ordered?: boolean | undefined;
2369
+ launcherLabel?: string | undefined;
2370
+ completionTitle?: string | undefined;
2371
+ completionBody?: string | undefined;
2372
+ autoOpen?: boolean | undefined;
2373
+ dismissible?: boolean | undefined;
2374
+ }>>;
2375
+ survey: z.ZodOptional<z.ZodObject<{
2376
+ questions: z.ZodArray<z.ZodObject<{
2377
+ id: z.ZodString;
2378
+ type: z.ZodEnum<["nps", "csat", "thumbs", "single_choice", "multiple_choice", "text", "rating"]>;
2379
+ title: z.ZodString;
2380
+ description: z.ZodDefault<z.ZodString>;
2381
+ required: z.ZodDefault<z.ZodBoolean>;
2382
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
2383
+ id: z.ZodString;
2384
+ label: z.ZodString;
2385
+ }, "strip", z.ZodTypeAny, {
2386
+ id: string;
2387
+ label: string;
2388
+ }, {
2389
+ id: string;
2390
+ label: string;
2391
+ }>, "many">>;
2392
+ scaleMax: z.ZodOptional<z.ZodNumber>;
2393
+ lowLabel: z.ZodOptional<z.ZodString>;
2394
+ highLabel: z.ZodOptional<z.ZodString>;
2395
+ placeholder: z.ZodOptional<z.ZodString>;
2396
+ showWhen: z.ZodOptional<z.ZodObject<{
2397
+ questionId: z.ZodString;
2398
+ op: z.ZodEnum<["equals", "lte", "gte", "in"]>;
2399
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodArray<z.ZodString, "many">]>;
2400
+ }, "strip", z.ZodTypeAny, {
2401
+ value: string | number | string[];
2402
+ op: "equals" | "gte" | "lte" | "in";
2403
+ questionId: string;
2404
+ }, {
2405
+ value: string | number | string[];
2406
+ op: "equals" | "gte" | "lte" | "in";
2407
+ questionId: string;
2408
+ }>>;
2409
+ }, "strip", z.ZodTypeAny, {
2410
+ options: {
2411
+ id: string;
2412
+ label: string;
2413
+ }[];
2414
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
2415
+ id: string;
2416
+ title: string;
2417
+ description: string;
2418
+ required: boolean;
2419
+ scaleMax?: number | undefined;
2420
+ lowLabel?: string | undefined;
2421
+ highLabel?: string | undefined;
2422
+ placeholder?: string | undefined;
2423
+ showWhen?: {
2424
+ value: string | number | string[];
2425
+ op: "equals" | "gte" | "lte" | "in";
2426
+ questionId: string;
2427
+ } | undefined;
2428
+ }, {
2429
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
2430
+ id: string;
2431
+ title: string;
2432
+ options?: {
2433
+ id: string;
2434
+ label: string;
2435
+ }[] | undefined;
2436
+ description?: string | undefined;
2437
+ required?: boolean | undefined;
2438
+ scaleMax?: number | undefined;
2439
+ lowLabel?: string | undefined;
2440
+ highLabel?: string | undefined;
2441
+ placeholder?: string | undefined;
2442
+ showWhen?: {
2443
+ value: string | number | string[];
2444
+ op: "equals" | "gte" | "lte" | "in";
2445
+ questionId: string;
2446
+ } | undefined;
2447
+ }>, "many">;
2448
+ thankYouTitle: z.ZodDefault<z.ZodString>;
2449
+ thankYouBody: z.ZodDefault<z.ZodString>;
2450
+ position: z.ZodDefault<z.ZodEnum<["bottom-right", "bottom-left", "center"]>>;
2451
+ startAt: z.ZodOptional<z.ZodString>;
2452
+ endAt: z.ZodOptional<z.ZodString>;
2453
+ }, "strip", z.ZodTypeAny, {
2454
+ position: "bottom-left" | "bottom-right" | "center";
2455
+ questions: {
2456
+ options: {
2457
+ id: string;
2458
+ label: string;
2459
+ }[];
2460
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
2461
+ id: string;
2462
+ title: string;
2463
+ description: string;
2464
+ required: boolean;
2465
+ scaleMax?: number | undefined;
2466
+ lowLabel?: string | undefined;
2467
+ highLabel?: string | undefined;
2468
+ placeholder?: string | undefined;
2469
+ showWhen?: {
2470
+ value: string | number | string[];
2471
+ op: "equals" | "gte" | "lte" | "in";
2472
+ questionId: string;
2473
+ } | undefined;
2474
+ }[];
2475
+ thankYouTitle: string;
2476
+ thankYouBody: string;
2477
+ startAt?: string | undefined;
2478
+ endAt?: string | undefined;
2479
+ }, {
2480
+ questions: {
2481
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
2482
+ id: string;
2483
+ title: string;
2484
+ options?: {
2485
+ id: string;
2486
+ label: string;
2487
+ }[] | undefined;
2488
+ description?: string | undefined;
2489
+ required?: boolean | undefined;
2490
+ scaleMax?: number | undefined;
2491
+ lowLabel?: string | undefined;
2492
+ highLabel?: string | undefined;
2493
+ placeholder?: string | undefined;
2494
+ showWhen?: {
2495
+ value: string | number | string[];
2496
+ op: "equals" | "gte" | "lte" | "in";
2497
+ questionId: string;
2498
+ } | undefined;
2499
+ }[];
2500
+ position?: "bottom-left" | "bottom-right" | "center" | undefined;
2501
+ thankYouTitle?: string | undefined;
2502
+ thankYouBody?: string | undefined;
2503
+ startAt?: string | undefined;
2504
+ endAt?: string | undefined;
2505
+ }>>;
2506
+ urlPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2507
+ }, "strip", z.ZodTypeAny, {
2508
+ targeting: RuleGroup;
2509
+ steps: {
2510
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
2511
+ id: string;
2512
+ title: string;
2513
+ body: string;
2514
+ buttons: {
2515
+ id: string;
2516
+ label: string;
2517
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
2518
+ variant: "primary" | "secondary" | "ghost" | "link";
2519
+ value?: string | undefined;
2520
+ newTab?: boolean | undefined;
2521
+ }[];
2522
+ placement: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto";
2523
+ offset: number;
2524
+ showOverlay: boolean;
2525
+ showProgress: boolean;
2526
+ showClose: boolean;
2527
+ dismissOnOutsideClick: boolean;
2528
+ spotlightPadding: number;
2529
+ position: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center";
2530
+ advanceOn: "event" | "button" | "element_click" | "element_visible" | "delay" | "any";
2531
+ branches: {
2532
+ id: string;
2533
+ when: RuleGroup;
2534
+ goTo: string;
2535
+ }[];
2536
+ hotspot?: {
2537
+ size: number;
2538
+ pulse: boolean;
2539
+ openOn: "click" | "hover";
2540
+ } | undefined;
2541
+ url?: string | undefined;
2542
+ imageUrl?: string | undefined;
2543
+ target?: {
2544
+ selectors: {
2545
+ value: string;
2546
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2547
+ label?: string | undefined;
2548
+ }[];
2549
+ waitMs: number;
2550
+ fallback: "skip" | "show_as_modal" | "end_guide" | "wait";
2551
+ scrollIntoView: boolean;
2552
+ textSnapshot?: string | undefined;
2553
+ } | undefined;
2554
+ advanceValue?: string | undefined;
2555
+ advanceDelayMs?: number | undefined;
2556
+ width?: number | undefined;
2557
+ targeting?: RuleGroup | undefined;
2558
+ customHtml?: string | undefined;
2559
+ }[];
2560
+ trigger: {
2561
+ type: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter";
2562
+ delayMs: number;
2563
+ value?: string | undefined;
2564
+ urlPattern?: string | undefined;
2565
+ };
2566
+ frequency: {
2567
+ mode: "once" | "once_per_session" | "every_time" | "interval";
2568
+ cooldownHours: number;
2569
+ priority: number;
2570
+ mutuallyExclusiveWith: string[];
2571
+ reshowAfterDismiss: boolean;
2572
+ intervalHours?: number | undefined;
2573
+ maxImpressions?: number | undefined;
2574
+ };
2575
+ appearance: {
2576
+ theme: "auto" | "light" | "dark";
2577
+ animation: "none" | "fade" | "slide";
2578
+ primaryColor?: string | undefined;
2579
+ backgroundColor?: string | undefined;
2580
+ textColor?: string | undefined;
2581
+ borderRadius?: number | undefined;
2582
+ fontFamily?: string | undefined;
2583
+ overlayOpacity?: number | undefined;
2584
+ zIndex?: number | undefined;
2585
+ preset?: string | undefined;
2586
+ };
2587
+ urlPatterns: string[];
2588
+ checklist?: {
2589
+ position: "bottom-left" | "bottom-right";
2590
+ tasks: {
2591
+ id: string;
2592
+ action: "url" | "start_guide" | "event" | "none";
2593
+ title: string;
2594
+ description: string;
2595
+ completion: "event" | "click" | "manual" | "guide_completed" | "url_visited";
2596
+ required: boolean;
2597
+ completionValue?: string | undefined;
2598
+ actionValue?: string | undefined;
2599
+ }[];
2600
+ ordered: boolean;
2601
+ launcherLabel: string;
2602
+ completionTitle: string;
2603
+ completionBody: string;
2604
+ autoOpen: boolean;
2605
+ dismissible: boolean;
2606
+ } | undefined;
2607
+ survey?: {
2608
+ position: "bottom-left" | "bottom-right" | "center";
2609
+ questions: {
2610
+ options: {
2611
+ id: string;
2612
+ label: string;
2613
+ }[];
2614
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
2615
+ id: string;
2616
+ title: string;
2617
+ description: string;
2618
+ required: boolean;
2619
+ scaleMax?: number | undefined;
2620
+ lowLabel?: string | undefined;
2621
+ highLabel?: string | undefined;
2622
+ placeholder?: string | undefined;
2623
+ showWhen?: {
2624
+ value: string | number | string[];
2625
+ op: "equals" | "gte" | "lte" | "in";
2626
+ questionId: string;
2627
+ } | undefined;
2628
+ }[];
2629
+ thankYouTitle: string;
2630
+ thankYouBody: string;
2631
+ startAt?: string | undefined;
2632
+ endAt?: string | undefined;
2633
+ } | undefined;
2634
+ }, {
2635
+ checklist?: {
2636
+ tasks: {
2637
+ id: string;
2638
+ title: string;
2639
+ action?: "url" | "start_guide" | "event" | "none" | undefined;
2640
+ description?: string | undefined;
2641
+ completion?: "event" | "click" | "manual" | "guide_completed" | "url_visited" | undefined;
2642
+ completionValue?: string | undefined;
2643
+ actionValue?: string | undefined;
2644
+ required?: boolean | undefined;
2645
+ }[];
2646
+ position?: "bottom-left" | "bottom-right" | undefined;
2647
+ ordered?: boolean | undefined;
2648
+ launcherLabel?: string | undefined;
2649
+ completionTitle?: string | undefined;
2650
+ completionBody?: string | undefined;
2651
+ autoOpen?: boolean | undefined;
2652
+ dismissible?: boolean | undefined;
2653
+ } | undefined;
2654
+ survey?: {
2655
+ questions: {
2656
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
2657
+ id: string;
2658
+ title: string;
2659
+ options?: {
2660
+ id: string;
2661
+ label: string;
2662
+ }[] | undefined;
2663
+ description?: string | undefined;
2664
+ required?: boolean | undefined;
2665
+ scaleMax?: number | undefined;
2666
+ lowLabel?: string | undefined;
2667
+ highLabel?: string | undefined;
2668
+ placeholder?: string | undefined;
2669
+ showWhen?: {
2670
+ value: string | number | string[];
2671
+ op: "equals" | "gte" | "lte" | "in";
2672
+ questionId: string;
2673
+ } | undefined;
2674
+ }[];
2675
+ position?: "bottom-left" | "bottom-right" | "center" | undefined;
2676
+ thankYouTitle?: string | undefined;
2677
+ thankYouBody?: string | undefined;
2678
+ startAt?: string | undefined;
2679
+ endAt?: string | undefined;
2680
+ } | undefined;
2681
+ targeting?: RuleGroup | undefined;
2682
+ steps?: {
2683
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
2684
+ id: string;
2685
+ hotspot?: {
2686
+ size?: number | undefined;
2687
+ pulse?: boolean | undefined;
2688
+ openOn?: "click" | "hover" | undefined;
2689
+ } | undefined;
2690
+ url?: string | undefined;
2691
+ title?: string | undefined;
2692
+ body?: string | undefined;
2693
+ imageUrl?: string | undefined;
2694
+ buttons?: {
2695
+ id: string;
2696
+ label: string;
2697
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
2698
+ value?: string | undefined;
2699
+ variant?: "primary" | "secondary" | "ghost" | "link" | undefined;
2700
+ newTab?: boolean | undefined;
2701
+ }[] | undefined;
2702
+ target?: {
2703
+ selectors: {
2704
+ value: string;
2705
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2706
+ label?: string | undefined;
2707
+ }[];
2708
+ waitMs?: number | undefined;
2709
+ fallback?: "skip" | "show_as_modal" | "end_guide" | "wait" | undefined;
2710
+ scrollIntoView?: boolean | undefined;
2711
+ textSnapshot?: string | undefined;
2712
+ } | undefined;
2713
+ placement?: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto" | undefined;
2714
+ offset?: number | undefined;
2715
+ showOverlay?: boolean | undefined;
2716
+ showProgress?: boolean | undefined;
2717
+ showClose?: boolean | undefined;
2718
+ dismissOnOutsideClick?: boolean | undefined;
2719
+ spotlightPadding?: number | undefined;
2720
+ position?: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center" | undefined;
2721
+ advanceOn?: "event" | "button" | "element_click" | "element_visible" | "delay" | "any" | undefined;
2722
+ advanceValue?: string | undefined;
2723
+ advanceDelayMs?: number | undefined;
2724
+ branches?: {
2725
+ id: string;
2726
+ when: RuleGroup;
2727
+ goTo: string;
2728
+ }[] | undefined;
2729
+ width?: number | undefined;
2730
+ targeting?: RuleGroup | undefined;
2731
+ customHtml?: string | undefined;
2732
+ }[] | undefined;
2733
+ trigger?: {
2734
+ value?: string | undefined;
2735
+ type?: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter" | undefined;
2736
+ delayMs?: number | undefined;
2737
+ urlPattern?: string | undefined;
2738
+ } | undefined;
2739
+ frequency?: {
2740
+ mode?: "once" | "once_per_session" | "every_time" | "interval" | undefined;
2741
+ intervalHours?: number | undefined;
2742
+ maxImpressions?: number | undefined;
2743
+ cooldownHours?: number | undefined;
2744
+ priority?: number | undefined;
2745
+ mutuallyExclusiveWith?: string[] | undefined;
2746
+ reshowAfterDismiss?: boolean | undefined;
2747
+ } | undefined;
2748
+ appearance?: {
2749
+ theme?: "auto" | "light" | "dark" | undefined;
2750
+ primaryColor?: string | undefined;
2751
+ backgroundColor?: string | undefined;
2752
+ textColor?: string | undefined;
2753
+ borderRadius?: number | undefined;
2754
+ fontFamily?: string | undefined;
2755
+ overlayOpacity?: number | undefined;
2756
+ zIndex?: number | undefined;
2757
+ preset?: string | undefined;
2758
+ animation?: "none" | "fade" | "slide" | undefined;
2759
+ } | undefined;
2760
+ urlPatterns?: string[] | undefined;
2761
+ }>;
2762
+ publishedAt: z.ZodString;
2763
+ }, "strip", z.ZodTypeAny, {
2764
+ id: string;
2765
+ key: string;
2766
+ kind: string;
2767
+ name: string;
2768
+ version: number;
2769
+ config: {
2770
+ targeting: RuleGroup;
2771
+ steps: {
2772
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
2773
+ id: string;
2774
+ title: string;
2775
+ body: string;
2776
+ buttons: {
2777
+ id: string;
2778
+ label: string;
2779
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
2780
+ variant: "primary" | "secondary" | "ghost" | "link";
2781
+ value?: string | undefined;
2782
+ newTab?: boolean | undefined;
2783
+ }[];
2784
+ placement: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto";
2785
+ offset: number;
2786
+ showOverlay: boolean;
2787
+ showProgress: boolean;
2788
+ showClose: boolean;
2789
+ dismissOnOutsideClick: boolean;
2790
+ spotlightPadding: number;
2791
+ position: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center";
2792
+ advanceOn: "event" | "button" | "element_click" | "element_visible" | "delay" | "any";
2793
+ branches: {
2794
+ id: string;
2795
+ when: RuleGroup;
2796
+ goTo: string;
2797
+ }[];
2798
+ hotspot?: {
2799
+ size: number;
2800
+ pulse: boolean;
2801
+ openOn: "click" | "hover";
2802
+ } | undefined;
2803
+ url?: string | undefined;
2804
+ imageUrl?: string | undefined;
2805
+ target?: {
2806
+ selectors: {
2807
+ value: string;
2808
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2809
+ label?: string | undefined;
2810
+ }[];
2811
+ waitMs: number;
2812
+ fallback: "skip" | "show_as_modal" | "end_guide" | "wait";
2813
+ scrollIntoView: boolean;
2814
+ textSnapshot?: string | undefined;
2815
+ } | undefined;
2816
+ advanceValue?: string | undefined;
2817
+ advanceDelayMs?: number | undefined;
2818
+ width?: number | undefined;
2819
+ targeting?: RuleGroup | undefined;
2820
+ customHtml?: string | undefined;
2821
+ }[];
2822
+ trigger: {
2823
+ type: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter";
2824
+ delayMs: number;
2825
+ value?: string | undefined;
2826
+ urlPattern?: string | undefined;
2827
+ };
2828
+ frequency: {
2829
+ mode: "once" | "once_per_session" | "every_time" | "interval";
2830
+ cooldownHours: number;
2831
+ priority: number;
2832
+ mutuallyExclusiveWith: string[];
2833
+ reshowAfterDismiss: boolean;
2834
+ intervalHours?: number | undefined;
2835
+ maxImpressions?: number | undefined;
2836
+ };
2837
+ appearance: {
2838
+ theme: "auto" | "light" | "dark";
2839
+ animation: "none" | "fade" | "slide";
2840
+ primaryColor?: string | undefined;
2841
+ backgroundColor?: string | undefined;
2842
+ textColor?: string | undefined;
2843
+ borderRadius?: number | undefined;
2844
+ fontFamily?: string | undefined;
2845
+ overlayOpacity?: number | undefined;
2846
+ zIndex?: number | undefined;
2847
+ preset?: string | undefined;
2848
+ };
2849
+ urlPatterns: string[];
2850
+ checklist?: {
2851
+ position: "bottom-left" | "bottom-right";
2852
+ tasks: {
2853
+ id: string;
2854
+ action: "url" | "start_guide" | "event" | "none";
2855
+ title: string;
2856
+ description: string;
2857
+ completion: "event" | "click" | "manual" | "guide_completed" | "url_visited";
2858
+ required: boolean;
2859
+ completionValue?: string | undefined;
2860
+ actionValue?: string | undefined;
2861
+ }[];
2862
+ ordered: boolean;
2863
+ launcherLabel: string;
2864
+ completionTitle: string;
2865
+ completionBody: string;
2866
+ autoOpen: boolean;
2867
+ dismissible: boolean;
2868
+ } | undefined;
2869
+ survey?: {
2870
+ position: "bottom-left" | "bottom-right" | "center";
2871
+ questions: {
2872
+ options: {
2873
+ id: string;
2874
+ label: string;
2875
+ }[];
2876
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
2877
+ id: string;
2878
+ title: string;
2879
+ description: string;
2880
+ required: boolean;
2881
+ scaleMax?: number | undefined;
2882
+ lowLabel?: string | undefined;
2883
+ highLabel?: string | undefined;
2884
+ placeholder?: string | undefined;
2885
+ showWhen?: {
2886
+ value: string | number | string[];
2887
+ op: "equals" | "gte" | "lte" | "in";
2888
+ questionId: string;
2889
+ } | undefined;
2890
+ }[];
2891
+ thankYouTitle: string;
2892
+ thankYouBody: string;
2893
+ startAt?: string | undefined;
2894
+ endAt?: string | undefined;
2895
+ } | undefined;
2896
+ };
2897
+ publishedAt: string;
2898
+ }, {
2899
+ id: string;
2900
+ key: string;
2901
+ kind: string;
2902
+ name: string;
2903
+ version: number;
2904
+ config: {
2905
+ checklist?: {
2906
+ tasks: {
2907
+ id: string;
2908
+ title: string;
2909
+ action?: "url" | "start_guide" | "event" | "none" | undefined;
2910
+ description?: string | undefined;
2911
+ completion?: "event" | "click" | "manual" | "guide_completed" | "url_visited" | undefined;
2912
+ completionValue?: string | undefined;
2913
+ actionValue?: string | undefined;
2914
+ required?: boolean | undefined;
2915
+ }[];
2916
+ position?: "bottom-left" | "bottom-right" | undefined;
2917
+ ordered?: boolean | undefined;
2918
+ launcherLabel?: string | undefined;
2919
+ completionTitle?: string | undefined;
2920
+ completionBody?: string | undefined;
2921
+ autoOpen?: boolean | undefined;
2922
+ dismissible?: boolean | undefined;
2923
+ } | undefined;
2924
+ survey?: {
2925
+ questions: {
2926
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
2927
+ id: string;
2928
+ title: string;
2929
+ options?: {
2930
+ id: string;
2931
+ label: string;
2932
+ }[] | undefined;
2933
+ description?: string | undefined;
2934
+ required?: boolean | undefined;
2935
+ scaleMax?: number | undefined;
2936
+ lowLabel?: string | undefined;
2937
+ highLabel?: string | undefined;
2938
+ placeholder?: string | undefined;
2939
+ showWhen?: {
2940
+ value: string | number | string[];
2941
+ op: "equals" | "gte" | "lte" | "in";
2942
+ questionId: string;
2943
+ } | undefined;
2944
+ }[];
2945
+ position?: "bottom-left" | "bottom-right" | "center" | undefined;
2946
+ thankYouTitle?: string | undefined;
2947
+ thankYouBody?: string | undefined;
2948
+ startAt?: string | undefined;
2949
+ endAt?: string | undefined;
2950
+ } | undefined;
2951
+ targeting?: RuleGroup | undefined;
2952
+ steps?: {
2953
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
2954
+ id: string;
2955
+ hotspot?: {
2956
+ size?: number | undefined;
2957
+ pulse?: boolean | undefined;
2958
+ openOn?: "click" | "hover" | undefined;
2959
+ } | undefined;
2960
+ url?: string | undefined;
2961
+ title?: string | undefined;
2962
+ body?: string | undefined;
2963
+ imageUrl?: string | undefined;
2964
+ buttons?: {
2965
+ id: string;
2966
+ label: string;
2967
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
2968
+ value?: string | undefined;
2969
+ variant?: "primary" | "secondary" | "ghost" | "link" | undefined;
2970
+ newTab?: boolean | undefined;
2971
+ }[] | undefined;
2972
+ target?: {
2973
+ selectors: {
2974
+ value: string;
2975
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
2976
+ label?: string | undefined;
2977
+ }[];
2978
+ waitMs?: number | undefined;
2979
+ fallback?: "skip" | "show_as_modal" | "end_guide" | "wait" | undefined;
2980
+ scrollIntoView?: boolean | undefined;
2981
+ textSnapshot?: string | undefined;
2982
+ } | undefined;
2983
+ placement?: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto" | undefined;
2984
+ offset?: number | undefined;
2985
+ showOverlay?: boolean | undefined;
2986
+ showProgress?: boolean | undefined;
2987
+ showClose?: boolean | undefined;
2988
+ dismissOnOutsideClick?: boolean | undefined;
2989
+ spotlightPadding?: number | undefined;
2990
+ position?: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center" | undefined;
2991
+ advanceOn?: "event" | "button" | "element_click" | "element_visible" | "delay" | "any" | undefined;
2992
+ advanceValue?: string | undefined;
2993
+ advanceDelayMs?: number | undefined;
2994
+ branches?: {
2995
+ id: string;
2996
+ when: RuleGroup;
2997
+ goTo: string;
2998
+ }[] | undefined;
2999
+ width?: number | undefined;
3000
+ targeting?: RuleGroup | undefined;
3001
+ customHtml?: string | undefined;
3002
+ }[] | undefined;
3003
+ trigger?: {
3004
+ value?: string | undefined;
3005
+ type?: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter" | undefined;
3006
+ delayMs?: number | undefined;
3007
+ urlPattern?: string | undefined;
3008
+ } | undefined;
3009
+ frequency?: {
3010
+ mode?: "once" | "once_per_session" | "every_time" | "interval" | undefined;
3011
+ intervalHours?: number | undefined;
3012
+ maxImpressions?: number | undefined;
3013
+ cooldownHours?: number | undefined;
3014
+ priority?: number | undefined;
3015
+ mutuallyExclusiveWith?: string[] | undefined;
3016
+ reshowAfterDismiss?: boolean | undefined;
3017
+ } | undefined;
3018
+ appearance?: {
3019
+ theme?: "auto" | "light" | "dark" | undefined;
3020
+ primaryColor?: string | undefined;
3021
+ backgroundColor?: string | undefined;
3022
+ textColor?: string | undefined;
3023
+ borderRadius?: number | undefined;
3024
+ fontFamily?: string | undefined;
3025
+ overlayOpacity?: number | undefined;
3026
+ zIndex?: number | undefined;
3027
+ preset?: string | undefined;
3028
+ animation?: "none" | "fade" | "slide" | undefined;
3029
+ } | undefined;
3030
+ urlPatterns?: string[] | undefined;
3031
+ };
3032
+ publishedAt: string;
3033
+ }>;
3034
+ interface ApiError {
3035
+ error: {
3036
+ code: string;
3037
+ message: string;
3038
+ details?: unknown;
3039
+ };
3040
+ }
3041
+
3042
+ interface GuideTemplate {
3043
+ id: string;
3044
+ name: string;
3045
+ description: string;
3046
+ kind: GuideKind;
3047
+ category: "onboarding" | "feature" | "setup" | "forms" | "announcement" | "help" | "feedback";
3048
+ config: GuideConfigInput;
3049
+ }
3050
+ declare const GUIDE_TEMPLATES: GuideTemplate[];
3051
+ declare function templateConfig(id: string): {
3052
+ template: GuideTemplate;
3053
+ config: {
3054
+ targeting: RuleGroup;
3055
+ steps: {
3056
+ type: "custom" | "modal" | "tooltip" | "banner" | "checklist" | "survey" | "popover" | "spotlight" | "hotspot" | "slideout";
3057
+ id: string;
3058
+ title: string;
3059
+ body: string;
3060
+ buttons: {
3061
+ id: string;
3062
+ label: string;
3063
+ action: "skip" | "next" | "back" | "dismiss" | "complete" | "url" | "start_guide" | "event" | "open_resource_center" | "none";
3064
+ variant: "primary" | "secondary" | "ghost" | "link";
3065
+ value?: string | undefined;
3066
+ newTab?: boolean | undefined;
3067
+ }[];
3068
+ placement: "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "auto";
3069
+ offset: number;
3070
+ showOverlay: boolean;
3071
+ showProgress: boolean;
3072
+ showClose: boolean;
3073
+ dismissOnOutsideClick: boolean;
3074
+ spotlightPadding: number;
3075
+ position: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center";
3076
+ advanceOn: "event" | "button" | "element_click" | "element_visible" | "delay" | "any";
3077
+ branches: {
3078
+ id: string;
3079
+ when: RuleGroup;
3080
+ goTo: string;
3081
+ }[];
3082
+ hotspot?: {
3083
+ size: number;
3084
+ pulse: boolean;
3085
+ openOn: "click" | "hover";
3086
+ } | undefined;
3087
+ url?: string | undefined;
3088
+ imageUrl?: string | undefined;
3089
+ target?: {
3090
+ selectors: {
3091
+ value: string;
3092
+ kind: "id" | "css" | "data-attr" | "aria" | "text" | "xpath";
3093
+ label?: string | undefined;
3094
+ }[];
3095
+ waitMs: number;
3096
+ fallback: "skip" | "show_as_modal" | "end_guide" | "wait";
3097
+ scrollIntoView: boolean;
3098
+ textSnapshot?: string | undefined;
3099
+ } | undefined;
3100
+ advanceValue?: string | undefined;
3101
+ advanceDelayMs?: number | undefined;
3102
+ width?: number | undefined;
3103
+ targeting?: RuleGroup | undefined;
3104
+ customHtml?: string | undefined;
3105
+ }[];
3106
+ trigger: {
3107
+ type: "event" | "element_click" | "element_visible" | "delay" | "page_load" | "url_match" | "manual" | "after_guide" | "segment_enter";
3108
+ delayMs: number;
3109
+ value?: string | undefined;
3110
+ urlPattern?: string | undefined;
3111
+ };
3112
+ frequency: {
3113
+ mode: "once" | "once_per_session" | "every_time" | "interval";
3114
+ cooldownHours: number;
3115
+ priority: number;
3116
+ mutuallyExclusiveWith: string[];
3117
+ reshowAfterDismiss: boolean;
3118
+ intervalHours?: number | undefined;
3119
+ maxImpressions?: number | undefined;
3120
+ };
3121
+ appearance: {
3122
+ theme: "auto" | "light" | "dark";
3123
+ animation: "none" | "fade" | "slide";
3124
+ primaryColor?: string | undefined;
3125
+ backgroundColor?: string | undefined;
3126
+ textColor?: string | undefined;
3127
+ borderRadius?: number | undefined;
3128
+ fontFamily?: string | undefined;
3129
+ overlayOpacity?: number | undefined;
3130
+ zIndex?: number | undefined;
3131
+ preset?: string | undefined;
3132
+ };
3133
+ urlPatterns: string[];
3134
+ checklist?: {
3135
+ position: "bottom-left" | "bottom-right";
3136
+ tasks: {
3137
+ id: string;
3138
+ action: "url" | "start_guide" | "event" | "none";
3139
+ title: string;
3140
+ description: string;
3141
+ completion: "event" | "click" | "manual" | "guide_completed" | "url_visited";
3142
+ required: boolean;
3143
+ completionValue?: string | undefined;
3144
+ actionValue?: string | undefined;
3145
+ }[];
3146
+ ordered: boolean;
3147
+ launcherLabel: string;
3148
+ completionTitle: string;
3149
+ completionBody: string;
3150
+ autoOpen: boolean;
3151
+ dismissible: boolean;
3152
+ } | undefined;
3153
+ survey?: {
3154
+ position: "bottom-left" | "bottom-right" | "center";
3155
+ questions: {
3156
+ options: {
3157
+ id: string;
3158
+ label: string;
3159
+ }[];
3160
+ type: "text" | "nps" | "csat" | "thumbs" | "single_choice" | "multiple_choice" | "rating";
3161
+ id: string;
3162
+ title: string;
3163
+ description: string;
3164
+ required: boolean;
3165
+ scaleMax?: number | undefined;
3166
+ lowLabel?: string | undefined;
3167
+ highLabel?: string | undefined;
3168
+ placeholder?: string | undefined;
3169
+ showWhen?: {
3170
+ value: string | number | string[];
3171
+ op: "equals" | "gte" | "lte" | "in";
3172
+ questionId: string;
3173
+ } | undefined;
3174
+ }[];
3175
+ thankYouTitle: string;
3176
+ thankYouBody: string;
3177
+ startAt?: string | undefined;
3178
+ endAt?: string | undefined;
3179
+ } | undefined;
3180
+ };
3181
+ } | null;
3182
+
3183
+ declare const SDK_API_VERSION = "v1";
3184
+ declare const SHARED_VERSION = "0.1.0";
3185
+
3186
+ export { ADVANCE_ON, type ApiError, type Appearance, AppearanceSchema, type AuthoringPick, AuthoringPickSchema, type AuthoringSessionInfo, BUTTON_ACTIONS, ButtonSchema, type ChecklistConfig, ChecklistConfigSchema, type ChecklistProgressRequest, ChecklistProgressRequestSchema, type ChecklistTask, ChecklistTaskSchema, 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, PLACEMENTS, type Placement, 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 SdkConfigResponse, type SdkEvent, SdkEventSchema, type SelectorStrategy, SelectorStrategySchema, 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 };