@syntrologie/adapt-faq 2.16.0 → 2.18.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.
Files changed (43) hide show
  1. package/dist/chunk-5WRI5ZAA.js +31 -0
  2. package/dist/chunk-5WRI5ZAA.js.map +7 -0
  3. package/dist/chunk-S6WIENQP.js +578 -0
  4. package/dist/chunk-S6WIENQP.js.map +7 -0
  5. package/dist/editor.d.ts +35 -33
  6. package/dist/editor.d.ts.map +1 -1
  7. package/dist/editor.js +4821 -308
  8. package/dist/editor.js.map +7 -0
  9. package/dist/runtime.d.ts +3 -5
  10. package/dist/runtime.d.ts.map +1 -1
  11. package/dist/runtime.js +848 -91
  12. package/dist/runtime.js.map +7 -0
  13. package/dist/schema.d.ts +609 -77
  14. package/dist/schema.d.ts.map +1 -1
  15. package/dist/schema.js +444 -206
  16. package/dist/schema.js.map +7 -0
  17. package/dist/types.d.ts +19 -0
  18. package/dist/types.d.ts.map +1 -1
  19. package/package.json +4 -20
  20. package/dist/FAQWidget.d.ts +0 -33
  21. package/dist/FAQWidget.d.ts.map +0 -1
  22. package/dist/FAQWidget.js +0 -375
  23. package/dist/FAQWidgetLit.js +0 -534
  24. package/dist/cdn.d.ts +0 -70
  25. package/dist/cdn.d.ts.map +0 -1
  26. package/dist/cdn.js +0 -46
  27. package/dist/editor-lit.d.ts +0 -37
  28. package/dist/editor-lit.d.ts.map +0 -1
  29. package/dist/editor-lit.js +0 -195
  30. package/dist/executors.js +0 -150
  31. package/dist/faq-styles.js +0 -204
  32. package/dist/faq-types.js +0 -7
  33. package/dist/runtime-lit.d.ts +0 -85
  34. package/dist/runtime-lit.d.ts.map +0 -1
  35. package/dist/runtime-lit.js +0 -94
  36. package/dist/state.js +0 -132
  37. package/dist/summarize.js +0 -62
  38. package/dist/types.js +0 -17
  39. package/node_modules/@syntrologie/sdk-contracts/dist/index.d.ts +0 -129
  40. package/node_modules/@syntrologie/sdk-contracts/dist/index.js +0 -17
  41. package/node_modules/@syntrologie/sdk-contracts/dist/schemas.d.ts +0 -2296
  42. package/node_modules/@syntrologie/sdk-contracts/dist/schemas.js +0 -361
  43. package/node_modules/@syntrologie/sdk-contracts/package.json +0 -33
@@ -1,2296 +0,0 @@
1
- /**
2
- * Shared Zod schemas for decision strategies, conditions, and event scoping.
3
- *
4
- * These are the canonical definitions — runtime-sdk and all adaptive packages
5
- * should import from here instead of duplicating.
6
- */
7
- import { z } from 'zod';
8
- export declare const AnchorIdZ: z.ZodObject<{
9
- selector: z.ZodString;
10
- route: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
11
- }, "strict", z.ZodTypeAny, {
12
- selector: string;
13
- route: string | string[];
14
- }, {
15
- selector: string;
16
- route: string | string[];
17
- }>;
18
- /** Events that can be counted in event_count conditions. */
19
- export declare const COUNTABLE_EVENTS: readonly ["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "nav.page_view", "nav.page_leave", "behavior.rage_click", "behavior.hesitation", "behavior.confusion"];
20
- export declare const CountableEventZ: z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "nav.page_view", "nav.page_leave", "behavior.rage_click", "behavior.hesitation", "behavior.confusion"]>;
21
- /** Valid session metric keys. */
22
- export declare const SESSION_METRIC_KEYS: readonly ["time_on_page", "page_views", "scroll_depth"];
23
- export declare const SessionMetricKeyZ: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
24
- /** Element chain match field prefixes for counter filters. */
25
- export declare const ELEMENT_MATCH_FIELDS: readonly ["tag_name", "$el_text"];
26
- export declare const PageUrlConditionZ: z.ZodObject<{
27
- type: z.ZodLiteral<"page_url">;
28
- url: z.ZodString;
29
- }, "strip", z.ZodTypeAny, {
30
- type: "page_url";
31
- url: string;
32
- }, {
33
- type: "page_url";
34
- url: string;
35
- }>;
36
- export declare const RouteConditionZ: z.ZodObject<{
37
- type: z.ZodLiteral<"route">;
38
- routeId: z.ZodString;
39
- }, "strip", z.ZodTypeAny, {
40
- type: "route";
41
- routeId: string;
42
- }, {
43
- type: "route";
44
- routeId: string;
45
- }>;
46
- export declare const AnchorVisibleConditionZ: z.ZodObject<{
47
- type: z.ZodLiteral<"anchor_visible">;
48
- anchorId: z.ZodString;
49
- state: z.ZodEnum<["visible", "present", "absent"]>;
50
- }, "strip", z.ZodTypeAny, {
51
- type: "anchor_visible";
52
- anchorId: string;
53
- state: "visible" | "present" | "absent";
54
- }, {
55
- type: "anchor_visible";
56
- anchorId: string;
57
- state: "visible" | "present" | "absent";
58
- }>;
59
- export declare const EventOccurredConditionZ: z.ZodObject<{
60
- type: z.ZodLiteral<"event_occurred">;
61
- eventName: z.ZodString;
62
- withinMs: z.ZodOptional<z.ZodNumber>;
63
- }, "strip", z.ZodTypeAny, {
64
- type: "event_occurred";
65
- eventName: string;
66
- withinMs?: number | undefined;
67
- }, {
68
- type: "event_occurred";
69
- eventName: string;
70
- withinMs?: number | undefined;
71
- }>;
72
- export declare const StateEqualsConditionZ: z.ZodObject<{
73
- type: z.ZodLiteral<"state_equals">;
74
- key: z.ZodString;
75
- value: z.ZodUnknown;
76
- }, "strip", z.ZodTypeAny, {
77
- type: "state_equals";
78
- key: string;
79
- value?: unknown;
80
- }, {
81
- type: "state_equals";
82
- key: string;
83
- value?: unknown;
84
- }>;
85
- export declare const ViewportConditionZ: z.ZodObject<{
86
- type: z.ZodLiteral<"viewport">;
87
- minWidth: z.ZodOptional<z.ZodNumber>;
88
- maxWidth: z.ZodOptional<z.ZodNumber>;
89
- minHeight: z.ZodOptional<z.ZodNumber>;
90
- maxHeight: z.ZodOptional<z.ZodNumber>;
91
- }, "strip", z.ZodTypeAny, {
92
- type: "viewport";
93
- minWidth?: number | undefined;
94
- maxWidth?: number | undefined;
95
- minHeight?: number | undefined;
96
- maxHeight?: number | undefined;
97
- }, {
98
- type: "viewport";
99
- minWidth?: number | undefined;
100
- maxWidth?: number | undefined;
101
- minHeight?: number | undefined;
102
- maxHeight?: number | undefined;
103
- }>;
104
- export declare const SessionMetricConditionZ: z.ZodObject<{
105
- type: z.ZodLiteral<"session_metric">;
106
- key: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
107
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
108
- threshold: z.ZodNumber;
109
- }, "strip", z.ZodTypeAny, {
110
- type: "session_metric";
111
- key: "time_on_page" | "page_views" | "scroll_depth";
112
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
113
- threshold: number;
114
- }, {
115
- type: "session_metric";
116
- key: "time_on_page" | "page_views" | "scroll_depth";
117
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
118
- threshold: number;
119
- }>;
120
- export declare const DismissedConditionZ: z.ZodObject<{
121
- type: z.ZodLiteral<"dismissed">;
122
- key: z.ZodString;
123
- inverted: z.ZodOptional<z.ZodBoolean>;
124
- }, "strip", z.ZodTypeAny, {
125
- type: "dismissed";
126
- key: string;
127
- inverted?: boolean | undefined;
128
- }, {
129
- type: "dismissed";
130
- key: string;
131
- inverted?: boolean | undefined;
132
- }>;
133
- export declare const CooldownActiveConditionZ: z.ZodObject<{
134
- type: z.ZodLiteral<"cooldown_active">;
135
- key: z.ZodString;
136
- inverted: z.ZodOptional<z.ZodBoolean>;
137
- }, "strip", z.ZodTypeAny, {
138
- type: "cooldown_active";
139
- key: string;
140
- inverted?: boolean | undefined;
141
- }, {
142
- type: "cooldown_active";
143
- key: string;
144
- inverted?: boolean | undefined;
145
- }>;
146
- export declare const FrequencyLimitConditionZ: z.ZodObject<{
147
- type: z.ZodLiteral<"frequency_limit">;
148
- key: z.ZodString;
149
- limit: z.ZodNumber;
150
- inverted: z.ZodOptional<z.ZodBoolean>;
151
- }, "strip", z.ZodTypeAny, {
152
- type: "frequency_limit";
153
- key: string;
154
- limit: number;
155
- inverted?: boolean | undefined;
156
- }, {
157
- type: "frequency_limit";
158
- key: string;
159
- limit: number;
160
- inverted?: boolean | undefined;
161
- }>;
162
- export declare const MatchOpZ: z.ZodObject<{
163
- equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
164
- contains: z.ZodOptional<z.ZodString>;
165
- }, "strip", z.ZodTypeAny, {
166
- equals?: string | number | boolean | undefined;
167
- contains?: string | undefined;
168
- }, {
169
- equals?: string | number | boolean | undefined;
170
- contains?: string | undefined;
171
- }>;
172
- export declare const CounterDefZ: z.ZodObject<{
173
- events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "nav.page_view", "nav.page_leave", "behavior.rage_click", "behavior.hesitation", "behavior.confusion"]>, "many">;
174
- match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
175
- equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
176
- contains: z.ZodOptional<z.ZodString>;
177
- }, "strip", z.ZodTypeAny, {
178
- equals?: string | number | boolean | undefined;
179
- contains?: string | undefined;
180
- }, {
181
- equals?: string | number | boolean | undefined;
182
- contains?: string | undefined;
183
- }>>>;
184
- }, "strip", z.ZodTypeAny, {
185
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
186
- match?: Record<string, {
187
- equals?: string | number | boolean | undefined;
188
- contains?: string | undefined;
189
- }> | undefined;
190
- }, {
191
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
192
- match?: Record<string, {
193
- equals?: string | number | boolean | undefined;
194
- contains?: string | undefined;
195
- }> | undefined;
196
- }>;
197
- export declare const EventCountConditionZ: z.ZodObject<{
198
- type: z.ZodLiteral<"event_count">;
199
- key: z.ZodString;
200
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
201
- count: z.ZodNumber;
202
- withinMs: z.ZodOptional<z.ZodNumber>;
203
- counter: z.ZodOptional<z.ZodObject<{
204
- events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "nav.page_view", "nav.page_leave", "behavior.rage_click", "behavior.hesitation", "behavior.confusion"]>, "many">;
205
- match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
206
- equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
207
- contains: z.ZodOptional<z.ZodString>;
208
- }, "strip", z.ZodTypeAny, {
209
- equals?: string | number | boolean | undefined;
210
- contains?: string | undefined;
211
- }, {
212
- equals?: string | number | boolean | undefined;
213
- contains?: string | undefined;
214
- }>>>;
215
- }, "strip", z.ZodTypeAny, {
216
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
217
- match?: Record<string, {
218
- equals?: string | number | boolean | undefined;
219
- contains?: string | undefined;
220
- }> | undefined;
221
- }, {
222
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
223
- match?: Record<string, {
224
- equals?: string | number | boolean | undefined;
225
- contains?: string | undefined;
226
- }> | undefined;
227
- }>>;
228
- }, "strip", z.ZodTypeAny, {
229
- type: "event_count";
230
- key: string;
231
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
232
- count: number;
233
- withinMs?: number | undefined;
234
- counter?: {
235
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
236
- match?: Record<string, {
237
- equals?: string | number | boolean | undefined;
238
- contains?: string | undefined;
239
- }> | undefined;
240
- } | undefined;
241
- }, {
242
- type: "event_count";
243
- key: string;
244
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
245
- count: number;
246
- withinMs?: number | undefined;
247
- counter?: {
248
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
249
- match?: Record<string, {
250
- equals?: string | number | boolean | undefined;
251
- contains?: string | undefined;
252
- }> | undefined;
253
- } | undefined;
254
- }>;
255
- export declare const ConditionZ: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
256
- type: z.ZodLiteral<"page_url">;
257
- url: z.ZodString;
258
- }, "strip", z.ZodTypeAny, {
259
- type: "page_url";
260
- url: string;
261
- }, {
262
- type: "page_url";
263
- url: string;
264
- }>, z.ZodObject<{
265
- type: z.ZodLiteral<"route">;
266
- routeId: z.ZodString;
267
- }, "strip", z.ZodTypeAny, {
268
- type: "route";
269
- routeId: string;
270
- }, {
271
- type: "route";
272
- routeId: string;
273
- }>, z.ZodObject<{
274
- type: z.ZodLiteral<"anchor_visible">;
275
- anchorId: z.ZodString;
276
- state: z.ZodEnum<["visible", "present", "absent"]>;
277
- }, "strip", z.ZodTypeAny, {
278
- type: "anchor_visible";
279
- anchorId: string;
280
- state: "visible" | "present" | "absent";
281
- }, {
282
- type: "anchor_visible";
283
- anchorId: string;
284
- state: "visible" | "present" | "absent";
285
- }>, z.ZodObject<{
286
- type: z.ZodLiteral<"event_occurred">;
287
- eventName: z.ZodString;
288
- withinMs: z.ZodOptional<z.ZodNumber>;
289
- }, "strip", z.ZodTypeAny, {
290
- type: "event_occurred";
291
- eventName: string;
292
- withinMs?: number | undefined;
293
- }, {
294
- type: "event_occurred";
295
- eventName: string;
296
- withinMs?: number | undefined;
297
- }>, z.ZodObject<{
298
- type: z.ZodLiteral<"state_equals">;
299
- key: z.ZodString;
300
- value: z.ZodUnknown;
301
- }, "strip", z.ZodTypeAny, {
302
- type: "state_equals";
303
- key: string;
304
- value?: unknown;
305
- }, {
306
- type: "state_equals";
307
- key: string;
308
- value?: unknown;
309
- }>, z.ZodObject<{
310
- type: z.ZodLiteral<"viewport">;
311
- minWidth: z.ZodOptional<z.ZodNumber>;
312
- maxWidth: z.ZodOptional<z.ZodNumber>;
313
- minHeight: z.ZodOptional<z.ZodNumber>;
314
- maxHeight: z.ZodOptional<z.ZodNumber>;
315
- }, "strip", z.ZodTypeAny, {
316
- type: "viewport";
317
- minWidth?: number | undefined;
318
- maxWidth?: number | undefined;
319
- minHeight?: number | undefined;
320
- maxHeight?: number | undefined;
321
- }, {
322
- type: "viewport";
323
- minWidth?: number | undefined;
324
- maxWidth?: number | undefined;
325
- minHeight?: number | undefined;
326
- maxHeight?: number | undefined;
327
- }>, z.ZodObject<{
328
- type: z.ZodLiteral<"session_metric">;
329
- key: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
330
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
331
- threshold: z.ZodNumber;
332
- }, "strip", z.ZodTypeAny, {
333
- type: "session_metric";
334
- key: "time_on_page" | "page_views" | "scroll_depth";
335
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
336
- threshold: number;
337
- }, {
338
- type: "session_metric";
339
- key: "time_on_page" | "page_views" | "scroll_depth";
340
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
341
- threshold: number;
342
- }>, z.ZodObject<{
343
- type: z.ZodLiteral<"dismissed">;
344
- key: z.ZodString;
345
- inverted: z.ZodOptional<z.ZodBoolean>;
346
- }, "strip", z.ZodTypeAny, {
347
- type: "dismissed";
348
- key: string;
349
- inverted?: boolean | undefined;
350
- }, {
351
- type: "dismissed";
352
- key: string;
353
- inverted?: boolean | undefined;
354
- }>, z.ZodObject<{
355
- type: z.ZodLiteral<"cooldown_active">;
356
- key: z.ZodString;
357
- inverted: z.ZodOptional<z.ZodBoolean>;
358
- }, "strip", z.ZodTypeAny, {
359
- type: "cooldown_active";
360
- key: string;
361
- inverted?: boolean | undefined;
362
- }, {
363
- type: "cooldown_active";
364
- key: string;
365
- inverted?: boolean | undefined;
366
- }>, z.ZodObject<{
367
- type: z.ZodLiteral<"frequency_limit">;
368
- key: z.ZodString;
369
- limit: z.ZodNumber;
370
- inverted: z.ZodOptional<z.ZodBoolean>;
371
- }, "strip", z.ZodTypeAny, {
372
- type: "frequency_limit";
373
- key: string;
374
- limit: number;
375
- inverted?: boolean | undefined;
376
- }, {
377
- type: "frequency_limit";
378
- key: string;
379
- limit: number;
380
- inverted?: boolean | undefined;
381
- }>, z.ZodObject<{
382
- type: z.ZodLiteral<"event_count">;
383
- key: z.ZodString;
384
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
385
- count: z.ZodNumber;
386
- withinMs: z.ZodOptional<z.ZodNumber>;
387
- counter: z.ZodOptional<z.ZodObject<{
388
- events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "nav.page_view", "nav.page_leave", "behavior.rage_click", "behavior.hesitation", "behavior.confusion"]>, "many">;
389
- match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
390
- equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
391
- contains: z.ZodOptional<z.ZodString>;
392
- }, "strip", z.ZodTypeAny, {
393
- equals?: string | number | boolean | undefined;
394
- contains?: string | undefined;
395
- }, {
396
- equals?: string | number | boolean | undefined;
397
- contains?: string | undefined;
398
- }>>>;
399
- }, "strip", z.ZodTypeAny, {
400
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
401
- match?: Record<string, {
402
- equals?: string | number | boolean | undefined;
403
- contains?: string | undefined;
404
- }> | undefined;
405
- }, {
406
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
407
- match?: Record<string, {
408
- equals?: string | number | boolean | undefined;
409
- contains?: string | undefined;
410
- }> | undefined;
411
- }>>;
412
- }, "strip", z.ZodTypeAny, {
413
- type: "event_count";
414
- key: string;
415
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
416
- count: number;
417
- withinMs?: number | undefined;
418
- counter?: {
419
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
420
- match?: Record<string, {
421
- equals?: string | number | boolean | undefined;
422
- contains?: string | undefined;
423
- }> | undefined;
424
- } | undefined;
425
- }, {
426
- type: "event_count";
427
- key: string;
428
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
429
- count: number;
430
- withinMs?: number | undefined;
431
- counter?: {
432
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
433
- match?: Record<string, {
434
- equals?: string | number | boolean | undefined;
435
- contains?: string | undefined;
436
- }> | undefined;
437
- } | undefined;
438
- }>]>;
439
- export declare const RuleZ: z.ZodObject<{
440
- conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
441
- type: z.ZodLiteral<"page_url">;
442
- url: z.ZodString;
443
- }, "strip", z.ZodTypeAny, {
444
- type: "page_url";
445
- url: string;
446
- }, {
447
- type: "page_url";
448
- url: string;
449
- }>, z.ZodObject<{
450
- type: z.ZodLiteral<"route">;
451
- routeId: z.ZodString;
452
- }, "strip", z.ZodTypeAny, {
453
- type: "route";
454
- routeId: string;
455
- }, {
456
- type: "route";
457
- routeId: string;
458
- }>, z.ZodObject<{
459
- type: z.ZodLiteral<"anchor_visible">;
460
- anchorId: z.ZodString;
461
- state: z.ZodEnum<["visible", "present", "absent"]>;
462
- }, "strip", z.ZodTypeAny, {
463
- type: "anchor_visible";
464
- anchorId: string;
465
- state: "visible" | "present" | "absent";
466
- }, {
467
- type: "anchor_visible";
468
- anchorId: string;
469
- state: "visible" | "present" | "absent";
470
- }>, z.ZodObject<{
471
- type: z.ZodLiteral<"event_occurred">;
472
- eventName: z.ZodString;
473
- withinMs: z.ZodOptional<z.ZodNumber>;
474
- }, "strip", z.ZodTypeAny, {
475
- type: "event_occurred";
476
- eventName: string;
477
- withinMs?: number | undefined;
478
- }, {
479
- type: "event_occurred";
480
- eventName: string;
481
- withinMs?: number | undefined;
482
- }>, z.ZodObject<{
483
- type: z.ZodLiteral<"state_equals">;
484
- key: z.ZodString;
485
- value: z.ZodUnknown;
486
- }, "strip", z.ZodTypeAny, {
487
- type: "state_equals";
488
- key: string;
489
- value?: unknown;
490
- }, {
491
- type: "state_equals";
492
- key: string;
493
- value?: unknown;
494
- }>, z.ZodObject<{
495
- type: z.ZodLiteral<"viewport">;
496
- minWidth: z.ZodOptional<z.ZodNumber>;
497
- maxWidth: z.ZodOptional<z.ZodNumber>;
498
- minHeight: z.ZodOptional<z.ZodNumber>;
499
- maxHeight: z.ZodOptional<z.ZodNumber>;
500
- }, "strip", z.ZodTypeAny, {
501
- type: "viewport";
502
- minWidth?: number | undefined;
503
- maxWidth?: number | undefined;
504
- minHeight?: number | undefined;
505
- maxHeight?: number | undefined;
506
- }, {
507
- type: "viewport";
508
- minWidth?: number | undefined;
509
- maxWidth?: number | undefined;
510
- minHeight?: number | undefined;
511
- maxHeight?: number | undefined;
512
- }>, z.ZodObject<{
513
- type: z.ZodLiteral<"session_metric">;
514
- key: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
515
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
516
- threshold: z.ZodNumber;
517
- }, "strip", z.ZodTypeAny, {
518
- type: "session_metric";
519
- key: "time_on_page" | "page_views" | "scroll_depth";
520
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
521
- threshold: number;
522
- }, {
523
- type: "session_metric";
524
- key: "time_on_page" | "page_views" | "scroll_depth";
525
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
526
- threshold: number;
527
- }>, z.ZodObject<{
528
- type: z.ZodLiteral<"dismissed">;
529
- key: z.ZodString;
530
- inverted: z.ZodOptional<z.ZodBoolean>;
531
- }, "strip", z.ZodTypeAny, {
532
- type: "dismissed";
533
- key: string;
534
- inverted?: boolean | undefined;
535
- }, {
536
- type: "dismissed";
537
- key: string;
538
- inverted?: boolean | undefined;
539
- }>, z.ZodObject<{
540
- type: z.ZodLiteral<"cooldown_active">;
541
- key: z.ZodString;
542
- inverted: z.ZodOptional<z.ZodBoolean>;
543
- }, "strip", z.ZodTypeAny, {
544
- type: "cooldown_active";
545
- key: string;
546
- inverted?: boolean | undefined;
547
- }, {
548
- type: "cooldown_active";
549
- key: string;
550
- inverted?: boolean | undefined;
551
- }>, z.ZodObject<{
552
- type: z.ZodLiteral<"frequency_limit">;
553
- key: z.ZodString;
554
- limit: z.ZodNumber;
555
- inverted: z.ZodOptional<z.ZodBoolean>;
556
- }, "strip", z.ZodTypeAny, {
557
- type: "frequency_limit";
558
- key: string;
559
- limit: number;
560
- inverted?: boolean | undefined;
561
- }, {
562
- type: "frequency_limit";
563
- key: string;
564
- limit: number;
565
- inverted?: boolean | undefined;
566
- }>, z.ZodObject<{
567
- type: z.ZodLiteral<"event_count">;
568
- key: z.ZodString;
569
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
570
- count: z.ZodNumber;
571
- withinMs: z.ZodOptional<z.ZodNumber>;
572
- counter: z.ZodOptional<z.ZodObject<{
573
- events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "nav.page_view", "nav.page_leave", "behavior.rage_click", "behavior.hesitation", "behavior.confusion"]>, "many">;
574
- match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
575
- equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
576
- contains: z.ZodOptional<z.ZodString>;
577
- }, "strip", z.ZodTypeAny, {
578
- equals?: string | number | boolean | undefined;
579
- contains?: string | undefined;
580
- }, {
581
- equals?: string | number | boolean | undefined;
582
- contains?: string | undefined;
583
- }>>>;
584
- }, "strip", z.ZodTypeAny, {
585
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
586
- match?: Record<string, {
587
- equals?: string | number | boolean | undefined;
588
- contains?: string | undefined;
589
- }> | undefined;
590
- }, {
591
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
592
- match?: Record<string, {
593
- equals?: string | number | boolean | undefined;
594
- contains?: string | undefined;
595
- }> | undefined;
596
- }>>;
597
- }, "strip", z.ZodTypeAny, {
598
- type: "event_count";
599
- key: string;
600
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
601
- count: number;
602
- withinMs?: number | undefined;
603
- counter?: {
604
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
605
- match?: Record<string, {
606
- equals?: string | number | boolean | undefined;
607
- contains?: string | undefined;
608
- }> | undefined;
609
- } | undefined;
610
- }, {
611
- type: "event_count";
612
- key: string;
613
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
614
- count: number;
615
- withinMs?: number | undefined;
616
- counter?: {
617
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
618
- match?: Record<string, {
619
- equals?: string | number | boolean | undefined;
620
- contains?: string | undefined;
621
- }> | undefined;
622
- } | undefined;
623
- }>]>, "many">;
624
- value: z.ZodUnknown;
625
- }, "strip", z.ZodTypeAny, {
626
- conditions: ({
627
- type: "page_url";
628
- url: string;
629
- } | {
630
- type: "route";
631
- routeId: string;
632
- } | {
633
- type: "anchor_visible";
634
- anchorId: string;
635
- state: "visible" | "present" | "absent";
636
- } | {
637
- type: "event_occurred";
638
- eventName: string;
639
- withinMs?: number | undefined;
640
- } | {
641
- type: "state_equals";
642
- key: string;
643
- value?: unknown;
644
- } | {
645
- type: "viewport";
646
- minWidth?: number | undefined;
647
- maxWidth?: number | undefined;
648
- minHeight?: number | undefined;
649
- maxHeight?: number | undefined;
650
- } | {
651
- type: "session_metric";
652
- key: "time_on_page" | "page_views" | "scroll_depth";
653
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
654
- threshold: number;
655
- } | {
656
- type: "dismissed";
657
- key: string;
658
- inverted?: boolean | undefined;
659
- } | {
660
- type: "cooldown_active";
661
- key: string;
662
- inverted?: boolean | undefined;
663
- } | {
664
- type: "frequency_limit";
665
- key: string;
666
- limit: number;
667
- inverted?: boolean | undefined;
668
- } | {
669
- type: "event_count";
670
- key: string;
671
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
672
- count: number;
673
- withinMs?: number | undefined;
674
- counter?: {
675
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
676
- match?: Record<string, {
677
- equals?: string | number | boolean | undefined;
678
- contains?: string | undefined;
679
- }> | undefined;
680
- } | undefined;
681
- })[];
682
- value?: unknown;
683
- }, {
684
- conditions: ({
685
- type: "page_url";
686
- url: string;
687
- } | {
688
- type: "route";
689
- routeId: string;
690
- } | {
691
- type: "anchor_visible";
692
- anchorId: string;
693
- state: "visible" | "present" | "absent";
694
- } | {
695
- type: "event_occurred";
696
- eventName: string;
697
- withinMs?: number | undefined;
698
- } | {
699
- type: "state_equals";
700
- key: string;
701
- value?: unknown;
702
- } | {
703
- type: "viewport";
704
- minWidth?: number | undefined;
705
- maxWidth?: number | undefined;
706
- minHeight?: number | undefined;
707
- maxHeight?: number | undefined;
708
- } | {
709
- type: "session_metric";
710
- key: "time_on_page" | "page_views" | "scroll_depth";
711
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
712
- threshold: number;
713
- } | {
714
- type: "dismissed";
715
- key: string;
716
- inverted?: boolean | undefined;
717
- } | {
718
- type: "cooldown_active";
719
- key: string;
720
- inverted?: boolean | undefined;
721
- } | {
722
- type: "frequency_limit";
723
- key: string;
724
- limit: number;
725
- inverted?: boolean | undefined;
726
- } | {
727
- type: "event_count";
728
- key: string;
729
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
730
- count: number;
731
- withinMs?: number | undefined;
732
- counter?: {
733
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
734
- match?: Record<string, {
735
- equals?: string | number | boolean | undefined;
736
- contains?: string | undefined;
737
- }> | undefined;
738
- } | undefined;
739
- })[];
740
- value?: unknown;
741
- }>;
742
- export declare const RuleStrategyZ: z.ZodObject<{
743
- type: z.ZodLiteral<"rules">;
744
- rules: z.ZodArray<z.ZodObject<{
745
- conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
746
- type: z.ZodLiteral<"page_url">;
747
- url: z.ZodString;
748
- }, "strip", z.ZodTypeAny, {
749
- type: "page_url";
750
- url: string;
751
- }, {
752
- type: "page_url";
753
- url: string;
754
- }>, z.ZodObject<{
755
- type: z.ZodLiteral<"route">;
756
- routeId: z.ZodString;
757
- }, "strip", z.ZodTypeAny, {
758
- type: "route";
759
- routeId: string;
760
- }, {
761
- type: "route";
762
- routeId: string;
763
- }>, z.ZodObject<{
764
- type: z.ZodLiteral<"anchor_visible">;
765
- anchorId: z.ZodString;
766
- state: z.ZodEnum<["visible", "present", "absent"]>;
767
- }, "strip", z.ZodTypeAny, {
768
- type: "anchor_visible";
769
- anchorId: string;
770
- state: "visible" | "present" | "absent";
771
- }, {
772
- type: "anchor_visible";
773
- anchorId: string;
774
- state: "visible" | "present" | "absent";
775
- }>, z.ZodObject<{
776
- type: z.ZodLiteral<"event_occurred">;
777
- eventName: z.ZodString;
778
- withinMs: z.ZodOptional<z.ZodNumber>;
779
- }, "strip", z.ZodTypeAny, {
780
- type: "event_occurred";
781
- eventName: string;
782
- withinMs?: number | undefined;
783
- }, {
784
- type: "event_occurred";
785
- eventName: string;
786
- withinMs?: number | undefined;
787
- }>, z.ZodObject<{
788
- type: z.ZodLiteral<"state_equals">;
789
- key: z.ZodString;
790
- value: z.ZodUnknown;
791
- }, "strip", z.ZodTypeAny, {
792
- type: "state_equals";
793
- key: string;
794
- value?: unknown;
795
- }, {
796
- type: "state_equals";
797
- key: string;
798
- value?: unknown;
799
- }>, z.ZodObject<{
800
- type: z.ZodLiteral<"viewport">;
801
- minWidth: z.ZodOptional<z.ZodNumber>;
802
- maxWidth: z.ZodOptional<z.ZodNumber>;
803
- minHeight: z.ZodOptional<z.ZodNumber>;
804
- maxHeight: z.ZodOptional<z.ZodNumber>;
805
- }, "strip", z.ZodTypeAny, {
806
- type: "viewport";
807
- minWidth?: number | undefined;
808
- maxWidth?: number | undefined;
809
- minHeight?: number | undefined;
810
- maxHeight?: number | undefined;
811
- }, {
812
- type: "viewport";
813
- minWidth?: number | undefined;
814
- maxWidth?: number | undefined;
815
- minHeight?: number | undefined;
816
- maxHeight?: number | undefined;
817
- }>, z.ZodObject<{
818
- type: z.ZodLiteral<"session_metric">;
819
- key: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
820
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
821
- threshold: z.ZodNumber;
822
- }, "strip", z.ZodTypeAny, {
823
- type: "session_metric";
824
- key: "time_on_page" | "page_views" | "scroll_depth";
825
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
826
- threshold: number;
827
- }, {
828
- type: "session_metric";
829
- key: "time_on_page" | "page_views" | "scroll_depth";
830
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
831
- threshold: number;
832
- }>, z.ZodObject<{
833
- type: z.ZodLiteral<"dismissed">;
834
- key: z.ZodString;
835
- inverted: z.ZodOptional<z.ZodBoolean>;
836
- }, "strip", z.ZodTypeAny, {
837
- type: "dismissed";
838
- key: string;
839
- inverted?: boolean | undefined;
840
- }, {
841
- type: "dismissed";
842
- key: string;
843
- inverted?: boolean | undefined;
844
- }>, z.ZodObject<{
845
- type: z.ZodLiteral<"cooldown_active">;
846
- key: z.ZodString;
847
- inverted: z.ZodOptional<z.ZodBoolean>;
848
- }, "strip", z.ZodTypeAny, {
849
- type: "cooldown_active";
850
- key: string;
851
- inverted?: boolean | undefined;
852
- }, {
853
- type: "cooldown_active";
854
- key: string;
855
- inverted?: boolean | undefined;
856
- }>, z.ZodObject<{
857
- type: z.ZodLiteral<"frequency_limit">;
858
- key: z.ZodString;
859
- limit: z.ZodNumber;
860
- inverted: z.ZodOptional<z.ZodBoolean>;
861
- }, "strip", z.ZodTypeAny, {
862
- type: "frequency_limit";
863
- key: string;
864
- limit: number;
865
- inverted?: boolean | undefined;
866
- }, {
867
- type: "frequency_limit";
868
- key: string;
869
- limit: number;
870
- inverted?: boolean | undefined;
871
- }>, z.ZodObject<{
872
- type: z.ZodLiteral<"event_count">;
873
- key: z.ZodString;
874
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
875
- count: z.ZodNumber;
876
- withinMs: z.ZodOptional<z.ZodNumber>;
877
- counter: z.ZodOptional<z.ZodObject<{
878
- events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "nav.page_view", "nav.page_leave", "behavior.rage_click", "behavior.hesitation", "behavior.confusion"]>, "many">;
879
- match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
880
- equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
881
- contains: z.ZodOptional<z.ZodString>;
882
- }, "strip", z.ZodTypeAny, {
883
- equals?: string | number | boolean | undefined;
884
- contains?: string | undefined;
885
- }, {
886
- equals?: string | number | boolean | undefined;
887
- contains?: string | undefined;
888
- }>>>;
889
- }, "strip", z.ZodTypeAny, {
890
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
891
- match?: Record<string, {
892
- equals?: string | number | boolean | undefined;
893
- contains?: string | undefined;
894
- }> | undefined;
895
- }, {
896
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
897
- match?: Record<string, {
898
- equals?: string | number | boolean | undefined;
899
- contains?: string | undefined;
900
- }> | undefined;
901
- }>>;
902
- }, "strip", z.ZodTypeAny, {
903
- type: "event_count";
904
- key: string;
905
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
906
- count: number;
907
- withinMs?: number | undefined;
908
- counter?: {
909
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
910
- match?: Record<string, {
911
- equals?: string | number | boolean | undefined;
912
- contains?: string | undefined;
913
- }> | undefined;
914
- } | undefined;
915
- }, {
916
- type: "event_count";
917
- key: string;
918
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
919
- count: number;
920
- withinMs?: number | undefined;
921
- counter?: {
922
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
923
- match?: Record<string, {
924
- equals?: string | number | boolean | undefined;
925
- contains?: string | undefined;
926
- }> | undefined;
927
- } | undefined;
928
- }>]>, "many">;
929
- value: z.ZodUnknown;
930
- }, "strip", z.ZodTypeAny, {
931
- conditions: ({
932
- type: "page_url";
933
- url: string;
934
- } | {
935
- type: "route";
936
- routeId: string;
937
- } | {
938
- type: "anchor_visible";
939
- anchorId: string;
940
- state: "visible" | "present" | "absent";
941
- } | {
942
- type: "event_occurred";
943
- eventName: string;
944
- withinMs?: number | undefined;
945
- } | {
946
- type: "state_equals";
947
- key: string;
948
- value?: unknown;
949
- } | {
950
- type: "viewport";
951
- minWidth?: number | undefined;
952
- maxWidth?: number | undefined;
953
- minHeight?: number | undefined;
954
- maxHeight?: number | undefined;
955
- } | {
956
- type: "session_metric";
957
- key: "time_on_page" | "page_views" | "scroll_depth";
958
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
959
- threshold: number;
960
- } | {
961
- type: "dismissed";
962
- key: string;
963
- inverted?: boolean | undefined;
964
- } | {
965
- type: "cooldown_active";
966
- key: string;
967
- inverted?: boolean | undefined;
968
- } | {
969
- type: "frequency_limit";
970
- key: string;
971
- limit: number;
972
- inverted?: boolean | undefined;
973
- } | {
974
- type: "event_count";
975
- key: string;
976
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
977
- count: number;
978
- withinMs?: number | undefined;
979
- counter?: {
980
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
981
- match?: Record<string, {
982
- equals?: string | number | boolean | undefined;
983
- contains?: string | undefined;
984
- }> | undefined;
985
- } | undefined;
986
- })[];
987
- value?: unknown;
988
- }, {
989
- conditions: ({
990
- type: "page_url";
991
- url: string;
992
- } | {
993
- type: "route";
994
- routeId: string;
995
- } | {
996
- type: "anchor_visible";
997
- anchorId: string;
998
- state: "visible" | "present" | "absent";
999
- } | {
1000
- type: "event_occurred";
1001
- eventName: string;
1002
- withinMs?: number | undefined;
1003
- } | {
1004
- type: "state_equals";
1005
- key: string;
1006
- value?: unknown;
1007
- } | {
1008
- type: "viewport";
1009
- minWidth?: number | undefined;
1010
- maxWidth?: number | undefined;
1011
- minHeight?: number | undefined;
1012
- maxHeight?: number | undefined;
1013
- } | {
1014
- type: "session_metric";
1015
- key: "time_on_page" | "page_views" | "scroll_depth";
1016
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1017
- threshold: number;
1018
- } | {
1019
- type: "dismissed";
1020
- key: string;
1021
- inverted?: boolean | undefined;
1022
- } | {
1023
- type: "cooldown_active";
1024
- key: string;
1025
- inverted?: boolean | undefined;
1026
- } | {
1027
- type: "frequency_limit";
1028
- key: string;
1029
- limit: number;
1030
- inverted?: boolean | undefined;
1031
- } | {
1032
- type: "event_count";
1033
- key: string;
1034
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1035
- count: number;
1036
- withinMs?: number | undefined;
1037
- counter?: {
1038
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1039
- match?: Record<string, {
1040
- equals?: string | number | boolean | undefined;
1041
- contains?: string | undefined;
1042
- }> | undefined;
1043
- } | undefined;
1044
- })[];
1045
- value?: unknown;
1046
- }>, "many">;
1047
- default: z.ZodUnknown;
1048
- }, "strip", z.ZodTypeAny, {
1049
- type: "rules";
1050
- rules: {
1051
- conditions: ({
1052
- type: "page_url";
1053
- url: string;
1054
- } | {
1055
- type: "route";
1056
- routeId: string;
1057
- } | {
1058
- type: "anchor_visible";
1059
- anchorId: string;
1060
- state: "visible" | "present" | "absent";
1061
- } | {
1062
- type: "event_occurred";
1063
- eventName: string;
1064
- withinMs?: number | undefined;
1065
- } | {
1066
- type: "state_equals";
1067
- key: string;
1068
- value?: unknown;
1069
- } | {
1070
- type: "viewport";
1071
- minWidth?: number | undefined;
1072
- maxWidth?: number | undefined;
1073
- minHeight?: number | undefined;
1074
- maxHeight?: number | undefined;
1075
- } | {
1076
- type: "session_metric";
1077
- key: "time_on_page" | "page_views" | "scroll_depth";
1078
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1079
- threshold: number;
1080
- } | {
1081
- type: "dismissed";
1082
- key: string;
1083
- inverted?: boolean | undefined;
1084
- } | {
1085
- type: "cooldown_active";
1086
- key: string;
1087
- inverted?: boolean | undefined;
1088
- } | {
1089
- type: "frequency_limit";
1090
- key: string;
1091
- limit: number;
1092
- inverted?: boolean | undefined;
1093
- } | {
1094
- type: "event_count";
1095
- key: string;
1096
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1097
- count: number;
1098
- withinMs?: number | undefined;
1099
- counter?: {
1100
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1101
- match?: Record<string, {
1102
- equals?: string | number | boolean | undefined;
1103
- contains?: string | undefined;
1104
- }> | undefined;
1105
- } | undefined;
1106
- })[];
1107
- value?: unknown;
1108
- }[];
1109
- default?: unknown;
1110
- }, {
1111
- type: "rules";
1112
- rules: {
1113
- conditions: ({
1114
- type: "page_url";
1115
- url: string;
1116
- } | {
1117
- type: "route";
1118
- routeId: string;
1119
- } | {
1120
- type: "anchor_visible";
1121
- anchorId: string;
1122
- state: "visible" | "present" | "absent";
1123
- } | {
1124
- type: "event_occurred";
1125
- eventName: string;
1126
- withinMs?: number | undefined;
1127
- } | {
1128
- type: "state_equals";
1129
- key: string;
1130
- value?: unknown;
1131
- } | {
1132
- type: "viewport";
1133
- minWidth?: number | undefined;
1134
- maxWidth?: number | undefined;
1135
- minHeight?: number | undefined;
1136
- maxHeight?: number | undefined;
1137
- } | {
1138
- type: "session_metric";
1139
- key: "time_on_page" | "page_views" | "scroll_depth";
1140
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1141
- threshold: number;
1142
- } | {
1143
- type: "dismissed";
1144
- key: string;
1145
- inverted?: boolean | undefined;
1146
- } | {
1147
- type: "cooldown_active";
1148
- key: string;
1149
- inverted?: boolean | undefined;
1150
- } | {
1151
- type: "frequency_limit";
1152
- key: string;
1153
- limit: number;
1154
- inverted?: boolean | undefined;
1155
- } | {
1156
- type: "event_count";
1157
- key: string;
1158
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1159
- count: number;
1160
- withinMs?: number | undefined;
1161
- counter?: {
1162
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1163
- match?: Record<string, {
1164
- equals?: string | number | boolean | undefined;
1165
- contains?: string | undefined;
1166
- }> | undefined;
1167
- } | undefined;
1168
- })[];
1169
- value?: unknown;
1170
- }[];
1171
- default?: unknown;
1172
- }>;
1173
- export declare const ScoreStrategyZ: z.ZodObject<{
1174
- type: z.ZodLiteral<"score">;
1175
- field: z.ZodString;
1176
- threshold: z.ZodNumber;
1177
- above: z.ZodUnknown;
1178
- below: z.ZodUnknown;
1179
- }, "strip", z.ZodTypeAny, {
1180
- type: "score";
1181
- threshold: number;
1182
- field: string;
1183
- above?: unknown;
1184
- below?: unknown;
1185
- }, {
1186
- type: "score";
1187
- threshold: number;
1188
- field: string;
1189
- above?: unknown;
1190
- below?: unknown;
1191
- }>;
1192
- export declare const ModelStrategyZ: z.ZodObject<{
1193
- type: z.ZodLiteral<"model">;
1194
- modelId: z.ZodString;
1195
- inputs: z.ZodArray<z.ZodString, "many">;
1196
- outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1197
- default: z.ZodUnknown;
1198
- }, "strip", z.ZodTypeAny, {
1199
- type: "model";
1200
- modelId: string;
1201
- inputs: string[];
1202
- outputMapping: Record<string, unknown>;
1203
- default?: unknown;
1204
- }, {
1205
- type: "model";
1206
- modelId: string;
1207
- inputs: string[];
1208
- outputMapping: Record<string, unknown>;
1209
- default?: unknown;
1210
- }>;
1211
- export declare const ExternalStrategyZ: z.ZodObject<{
1212
- type: z.ZodLiteral<"external">;
1213
- endpoint: z.ZodString;
1214
- method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
1215
- default: z.ZodUnknown;
1216
- timeoutMs: z.ZodOptional<z.ZodNumber>;
1217
- }, "strip", z.ZodTypeAny, {
1218
- type: "external";
1219
- endpoint: string;
1220
- default?: unknown;
1221
- method?: "GET" | "POST" | undefined;
1222
- timeoutMs?: number | undefined;
1223
- }, {
1224
- type: "external";
1225
- endpoint: string;
1226
- default?: unknown;
1227
- method?: "GET" | "POST" | undefined;
1228
- timeoutMs?: number | undefined;
1229
- }>;
1230
- export declare const DecisionStrategyZ: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1231
- type: z.ZodLiteral<"rules">;
1232
- rules: z.ZodArray<z.ZodObject<{
1233
- conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1234
- type: z.ZodLiteral<"page_url">;
1235
- url: z.ZodString;
1236
- }, "strip", z.ZodTypeAny, {
1237
- type: "page_url";
1238
- url: string;
1239
- }, {
1240
- type: "page_url";
1241
- url: string;
1242
- }>, z.ZodObject<{
1243
- type: z.ZodLiteral<"route">;
1244
- routeId: z.ZodString;
1245
- }, "strip", z.ZodTypeAny, {
1246
- type: "route";
1247
- routeId: string;
1248
- }, {
1249
- type: "route";
1250
- routeId: string;
1251
- }>, z.ZodObject<{
1252
- type: z.ZodLiteral<"anchor_visible">;
1253
- anchorId: z.ZodString;
1254
- state: z.ZodEnum<["visible", "present", "absent"]>;
1255
- }, "strip", z.ZodTypeAny, {
1256
- type: "anchor_visible";
1257
- anchorId: string;
1258
- state: "visible" | "present" | "absent";
1259
- }, {
1260
- type: "anchor_visible";
1261
- anchorId: string;
1262
- state: "visible" | "present" | "absent";
1263
- }>, z.ZodObject<{
1264
- type: z.ZodLiteral<"event_occurred">;
1265
- eventName: z.ZodString;
1266
- withinMs: z.ZodOptional<z.ZodNumber>;
1267
- }, "strip", z.ZodTypeAny, {
1268
- type: "event_occurred";
1269
- eventName: string;
1270
- withinMs?: number | undefined;
1271
- }, {
1272
- type: "event_occurred";
1273
- eventName: string;
1274
- withinMs?: number | undefined;
1275
- }>, z.ZodObject<{
1276
- type: z.ZodLiteral<"state_equals">;
1277
- key: z.ZodString;
1278
- value: z.ZodUnknown;
1279
- }, "strip", z.ZodTypeAny, {
1280
- type: "state_equals";
1281
- key: string;
1282
- value?: unknown;
1283
- }, {
1284
- type: "state_equals";
1285
- key: string;
1286
- value?: unknown;
1287
- }>, z.ZodObject<{
1288
- type: z.ZodLiteral<"viewport">;
1289
- minWidth: z.ZodOptional<z.ZodNumber>;
1290
- maxWidth: z.ZodOptional<z.ZodNumber>;
1291
- minHeight: z.ZodOptional<z.ZodNumber>;
1292
- maxHeight: z.ZodOptional<z.ZodNumber>;
1293
- }, "strip", z.ZodTypeAny, {
1294
- type: "viewport";
1295
- minWidth?: number | undefined;
1296
- maxWidth?: number | undefined;
1297
- minHeight?: number | undefined;
1298
- maxHeight?: number | undefined;
1299
- }, {
1300
- type: "viewport";
1301
- minWidth?: number | undefined;
1302
- maxWidth?: number | undefined;
1303
- minHeight?: number | undefined;
1304
- maxHeight?: number | undefined;
1305
- }>, z.ZodObject<{
1306
- type: z.ZodLiteral<"session_metric">;
1307
- key: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
1308
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1309
- threshold: z.ZodNumber;
1310
- }, "strip", z.ZodTypeAny, {
1311
- type: "session_metric";
1312
- key: "time_on_page" | "page_views" | "scroll_depth";
1313
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1314
- threshold: number;
1315
- }, {
1316
- type: "session_metric";
1317
- key: "time_on_page" | "page_views" | "scroll_depth";
1318
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1319
- threshold: number;
1320
- }>, z.ZodObject<{
1321
- type: z.ZodLiteral<"dismissed">;
1322
- key: z.ZodString;
1323
- inverted: z.ZodOptional<z.ZodBoolean>;
1324
- }, "strip", z.ZodTypeAny, {
1325
- type: "dismissed";
1326
- key: string;
1327
- inverted?: boolean | undefined;
1328
- }, {
1329
- type: "dismissed";
1330
- key: string;
1331
- inverted?: boolean | undefined;
1332
- }>, z.ZodObject<{
1333
- type: z.ZodLiteral<"cooldown_active">;
1334
- key: z.ZodString;
1335
- inverted: z.ZodOptional<z.ZodBoolean>;
1336
- }, "strip", z.ZodTypeAny, {
1337
- type: "cooldown_active";
1338
- key: string;
1339
- inverted?: boolean | undefined;
1340
- }, {
1341
- type: "cooldown_active";
1342
- key: string;
1343
- inverted?: boolean | undefined;
1344
- }>, z.ZodObject<{
1345
- type: z.ZodLiteral<"frequency_limit">;
1346
- key: z.ZodString;
1347
- limit: z.ZodNumber;
1348
- inverted: z.ZodOptional<z.ZodBoolean>;
1349
- }, "strip", z.ZodTypeAny, {
1350
- type: "frequency_limit";
1351
- key: string;
1352
- limit: number;
1353
- inverted?: boolean | undefined;
1354
- }, {
1355
- type: "frequency_limit";
1356
- key: string;
1357
- limit: number;
1358
- inverted?: boolean | undefined;
1359
- }>, z.ZodObject<{
1360
- type: z.ZodLiteral<"event_count">;
1361
- key: z.ZodString;
1362
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1363
- count: z.ZodNumber;
1364
- withinMs: z.ZodOptional<z.ZodNumber>;
1365
- counter: z.ZodOptional<z.ZodObject<{
1366
- events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "nav.page_view", "nav.page_leave", "behavior.rage_click", "behavior.hesitation", "behavior.confusion"]>, "many">;
1367
- match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1368
- equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1369
- contains: z.ZodOptional<z.ZodString>;
1370
- }, "strip", z.ZodTypeAny, {
1371
- equals?: string | number | boolean | undefined;
1372
- contains?: string | undefined;
1373
- }, {
1374
- equals?: string | number | boolean | undefined;
1375
- contains?: string | undefined;
1376
- }>>>;
1377
- }, "strip", z.ZodTypeAny, {
1378
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1379
- match?: Record<string, {
1380
- equals?: string | number | boolean | undefined;
1381
- contains?: string | undefined;
1382
- }> | undefined;
1383
- }, {
1384
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1385
- match?: Record<string, {
1386
- equals?: string | number | boolean | undefined;
1387
- contains?: string | undefined;
1388
- }> | undefined;
1389
- }>>;
1390
- }, "strip", z.ZodTypeAny, {
1391
- type: "event_count";
1392
- key: string;
1393
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1394
- count: number;
1395
- withinMs?: number | undefined;
1396
- counter?: {
1397
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1398
- match?: Record<string, {
1399
- equals?: string | number | boolean | undefined;
1400
- contains?: string | undefined;
1401
- }> | undefined;
1402
- } | undefined;
1403
- }, {
1404
- type: "event_count";
1405
- key: string;
1406
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1407
- count: number;
1408
- withinMs?: number | undefined;
1409
- counter?: {
1410
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1411
- match?: Record<string, {
1412
- equals?: string | number | boolean | undefined;
1413
- contains?: string | undefined;
1414
- }> | undefined;
1415
- } | undefined;
1416
- }>]>, "many">;
1417
- value: z.ZodUnknown;
1418
- }, "strip", z.ZodTypeAny, {
1419
- conditions: ({
1420
- type: "page_url";
1421
- url: string;
1422
- } | {
1423
- type: "route";
1424
- routeId: string;
1425
- } | {
1426
- type: "anchor_visible";
1427
- anchorId: string;
1428
- state: "visible" | "present" | "absent";
1429
- } | {
1430
- type: "event_occurred";
1431
- eventName: string;
1432
- withinMs?: number | undefined;
1433
- } | {
1434
- type: "state_equals";
1435
- key: string;
1436
- value?: unknown;
1437
- } | {
1438
- type: "viewport";
1439
- minWidth?: number | undefined;
1440
- maxWidth?: number | undefined;
1441
- minHeight?: number | undefined;
1442
- maxHeight?: number | undefined;
1443
- } | {
1444
- type: "session_metric";
1445
- key: "time_on_page" | "page_views" | "scroll_depth";
1446
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1447
- threshold: number;
1448
- } | {
1449
- type: "dismissed";
1450
- key: string;
1451
- inverted?: boolean | undefined;
1452
- } | {
1453
- type: "cooldown_active";
1454
- key: string;
1455
- inverted?: boolean | undefined;
1456
- } | {
1457
- type: "frequency_limit";
1458
- key: string;
1459
- limit: number;
1460
- inverted?: boolean | undefined;
1461
- } | {
1462
- type: "event_count";
1463
- key: string;
1464
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1465
- count: number;
1466
- withinMs?: number | undefined;
1467
- counter?: {
1468
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1469
- match?: Record<string, {
1470
- equals?: string | number | boolean | undefined;
1471
- contains?: string | undefined;
1472
- }> | undefined;
1473
- } | undefined;
1474
- })[];
1475
- value?: unknown;
1476
- }, {
1477
- conditions: ({
1478
- type: "page_url";
1479
- url: string;
1480
- } | {
1481
- type: "route";
1482
- routeId: string;
1483
- } | {
1484
- type: "anchor_visible";
1485
- anchorId: string;
1486
- state: "visible" | "present" | "absent";
1487
- } | {
1488
- type: "event_occurred";
1489
- eventName: string;
1490
- withinMs?: number | undefined;
1491
- } | {
1492
- type: "state_equals";
1493
- key: string;
1494
- value?: unknown;
1495
- } | {
1496
- type: "viewport";
1497
- minWidth?: number | undefined;
1498
- maxWidth?: number | undefined;
1499
- minHeight?: number | undefined;
1500
- maxHeight?: number | undefined;
1501
- } | {
1502
- type: "session_metric";
1503
- key: "time_on_page" | "page_views" | "scroll_depth";
1504
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1505
- threshold: number;
1506
- } | {
1507
- type: "dismissed";
1508
- key: string;
1509
- inverted?: boolean | undefined;
1510
- } | {
1511
- type: "cooldown_active";
1512
- key: string;
1513
- inverted?: boolean | undefined;
1514
- } | {
1515
- type: "frequency_limit";
1516
- key: string;
1517
- limit: number;
1518
- inverted?: boolean | undefined;
1519
- } | {
1520
- type: "event_count";
1521
- key: string;
1522
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1523
- count: number;
1524
- withinMs?: number | undefined;
1525
- counter?: {
1526
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1527
- match?: Record<string, {
1528
- equals?: string | number | boolean | undefined;
1529
- contains?: string | undefined;
1530
- }> | undefined;
1531
- } | undefined;
1532
- })[];
1533
- value?: unknown;
1534
- }>, "many">;
1535
- default: z.ZodUnknown;
1536
- }, "strip", z.ZodTypeAny, {
1537
- type: "rules";
1538
- rules: {
1539
- conditions: ({
1540
- type: "page_url";
1541
- url: string;
1542
- } | {
1543
- type: "route";
1544
- routeId: string;
1545
- } | {
1546
- type: "anchor_visible";
1547
- anchorId: string;
1548
- state: "visible" | "present" | "absent";
1549
- } | {
1550
- type: "event_occurred";
1551
- eventName: string;
1552
- withinMs?: number | undefined;
1553
- } | {
1554
- type: "state_equals";
1555
- key: string;
1556
- value?: unknown;
1557
- } | {
1558
- type: "viewport";
1559
- minWidth?: number | undefined;
1560
- maxWidth?: number | undefined;
1561
- minHeight?: number | undefined;
1562
- maxHeight?: number | undefined;
1563
- } | {
1564
- type: "session_metric";
1565
- key: "time_on_page" | "page_views" | "scroll_depth";
1566
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1567
- threshold: number;
1568
- } | {
1569
- type: "dismissed";
1570
- key: string;
1571
- inverted?: boolean | undefined;
1572
- } | {
1573
- type: "cooldown_active";
1574
- key: string;
1575
- inverted?: boolean | undefined;
1576
- } | {
1577
- type: "frequency_limit";
1578
- key: string;
1579
- limit: number;
1580
- inverted?: boolean | undefined;
1581
- } | {
1582
- type: "event_count";
1583
- key: string;
1584
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1585
- count: number;
1586
- withinMs?: number | undefined;
1587
- counter?: {
1588
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1589
- match?: Record<string, {
1590
- equals?: string | number | boolean | undefined;
1591
- contains?: string | undefined;
1592
- }> | undefined;
1593
- } | undefined;
1594
- })[];
1595
- value?: unknown;
1596
- }[];
1597
- default?: unknown;
1598
- }, {
1599
- type: "rules";
1600
- rules: {
1601
- conditions: ({
1602
- type: "page_url";
1603
- url: string;
1604
- } | {
1605
- type: "route";
1606
- routeId: string;
1607
- } | {
1608
- type: "anchor_visible";
1609
- anchorId: string;
1610
- state: "visible" | "present" | "absent";
1611
- } | {
1612
- type: "event_occurred";
1613
- eventName: string;
1614
- withinMs?: number | undefined;
1615
- } | {
1616
- type: "state_equals";
1617
- key: string;
1618
- value?: unknown;
1619
- } | {
1620
- type: "viewport";
1621
- minWidth?: number | undefined;
1622
- maxWidth?: number | undefined;
1623
- minHeight?: number | undefined;
1624
- maxHeight?: number | undefined;
1625
- } | {
1626
- type: "session_metric";
1627
- key: "time_on_page" | "page_views" | "scroll_depth";
1628
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1629
- threshold: number;
1630
- } | {
1631
- type: "dismissed";
1632
- key: string;
1633
- inverted?: boolean | undefined;
1634
- } | {
1635
- type: "cooldown_active";
1636
- key: string;
1637
- inverted?: boolean | undefined;
1638
- } | {
1639
- type: "frequency_limit";
1640
- key: string;
1641
- limit: number;
1642
- inverted?: boolean | undefined;
1643
- } | {
1644
- type: "event_count";
1645
- key: string;
1646
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1647
- count: number;
1648
- withinMs?: number | undefined;
1649
- counter?: {
1650
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1651
- match?: Record<string, {
1652
- equals?: string | number | boolean | undefined;
1653
- contains?: string | undefined;
1654
- }> | undefined;
1655
- } | undefined;
1656
- })[];
1657
- value?: unknown;
1658
- }[];
1659
- default?: unknown;
1660
- }>, z.ZodObject<{
1661
- type: z.ZodLiteral<"score">;
1662
- field: z.ZodString;
1663
- threshold: z.ZodNumber;
1664
- above: z.ZodUnknown;
1665
- below: z.ZodUnknown;
1666
- }, "strip", z.ZodTypeAny, {
1667
- type: "score";
1668
- threshold: number;
1669
- field: string;
1670
- above?: unknown;
1671
- below?: unknown;
1672
- }, {
1673
- type: "score";
1674
- threshold: number;
1675
- field: string;
1676
- above?: unknown;
1677
- below?: unknown;
1678
- }>, z.ZodObject<{
1679
- type: z.ZodLiteral<"model">;
1680
- modelId: z.ZodString;
1681
- inputs: z.ZodArray<z.ZodString, "many">;
1682
- outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1683
- default: z.ZodUnknown;
1684
- }, "strip", z.ZodTypeAny, {
1685
- type: "model";
1686
- modelId: string;
1687
- inputs: string[];
1688
- outputMapping: Record<string, unknown>;
1689
- default?: unknown;
1690
- }, {
1691
- type: "model";
1692
- modelId: string;
1693
- inputs: string[];
1694
- outputMapping: Record<string, unknown>;
1695
- default?: unknown;
1696
- }>, z.ZodObject<{
1697
- type: z.ZodLiteral<"external">;
1698
- endpoint: z.ZodString;
1699
- method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
1700
- default: z.ZodUnknown;
1701
- timeoutMs: z.ZodOptional<z.ZodNumber>;
1702
- }, "strip", z.ZodTypeAny, {
1703
- type: "external";
1704
- endpoint: string;
1705
- default?: unknown;
1706
- method?: "GET" | "POST" | undefined;
1707
- timeoutMs?: number | undefined;
1708
- }, {
1709
- type: "external";
1710
- endpoint: string;
1711
- default?: unknown;
1712
- method?: "GET" | "POST" | undefined;
1713
- timeoutMs?: number | undefined;
1714
- }>]>;
1715
- /** Canonical Zod schema for the optional triggerWhen field on actions and adaptive items. */
1716
- export declare const TriggerWhenZ: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1717
- type: z.ZodLiteral<"rules">;
1718
- rules: z.ZodArray<z.ZodObject<{
1719
- conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1720
- type: z.ZodLiteral<"page_url">;
1721
- url: z.ZodString;
1722
- }, "strip", z.ZodTypeAny, {
1723
- type: "page_url";
1724
- url: string;
1725
- }, {
1726
- type: "page_url";
1727
- url: string;
1728
- }>, z.ZodObject<{
1729
- type: z.ZodLiteral<"route">;
1730
- routeId: z.ZodString;
1731
- }, "strip", z.ZodTypeAny, {
1732
- type: "route";
1733
- routeId: string;
1734
- }, {
1735
- type: "route";
1736
- routeId: string;
1737
- }>, z.ZodObject<{
1738
- type: z.ZodLiteral<"anchor_visible">;
1739
- anchorId: z.ZodString;
1740
- state: z.ZodEnum<["visible", "present", "absent"]>;
1741
- }, "strip", z.ZodTypeAny, {
1742
- type: "anchor_visible";
1743
- anchorId: string;
1744
- state: "visible" | "present" | "absent";
1745
- }, {
1746
- type: "anchor_visible";
1747
- anchorId: string;
1748
- state: "visible" | "present" | "absent";
1749
- }>, z.ZodObject<{
1750
- type: z.ZodLiteral<"event_occurred">;
1751
- eventName: z.ZodString;
1752
- withinMs: z.ZodOptional<z.ZodNumber>;
1753
- }, "strip", z.ZodTypeAny, {
1754
- type: "event_occurred";
1755
- eventName: string;
1756
- withinMs?: number | undefined;
1757
- }, {
1758
- type: "event_occurred";
1759
- eventName: string;
1760
- withinMs?: number | undefined;
1761
- }>, z.ZodObject<{
1762
- type: z.ZodLiteral<"state_equals">;
1763
- key: z.ZodString;
1764
- value: z.ZodUnknown;
1765
- }, "strip", z.ZodTypeAny, {
1766
- type: "state_equals";
1767
- key: string;
1768
- value?: unknown;
1769
- }, {
1770
- type: "state_equals";
1771
- key: string;
1772
- value?: unknown;
1773
- }>, z.ZodObject<{
1774
- type: z.ZodLiteral<"viewport">;
1775
- minWidth: z.ZodOptional<z.ZodNumber>;
1776
- maxWidth: z.ZodOptional<z.ZodNumber>;
1777
- minHeight: z.ZodOptional<z.ZodNumber>;
1778
- maxHeight: z.ZodOptional<z.ZodNumber>;
1779
- }, "strip", z.ZodTypeAny, {
1780
- type: "viewport";
1781
- minWidth?: number | undefined;
1782
- maxWidth?: number | undefined;
1783
- minHeight?: number | undefined;
1784
- maxHeight?: number | undefined;
1785
- }, {
1786
- type: "viewport";
1787
- minWidth?: number | undefined;
1788
- maxWidth?: number | undefined;
1789
- minHeight?: number | undefined;
1790
- maxHeight?: number | undefined;
1791
- }>, z.ZodObject<{
1792
- type: z.ZodLiteral<"session_metric">;
1793
- key: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
1794
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1795
- threshold: z.ZodNumber;
1796
- }, "strip", z.ZodTypeAny, {
1797
- type: "session_metric";
1798
- key: "time_on_page" | "page_views" | "scroll_depth";
1799
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1800
- threshold: number;
1801
- }, {
1802
- type: "session_metric";
1803
- key: "time_on_page" | "page_views" | "scroll_depth";
1804
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1805
- threshold: number;
1806
- }>, z.ZodObject<{
1807
- type: z.ZodLiteral<"dismissed">;
1808
- key: z.ZodString;
1809
- inverted: z.ZodOptional<z.ZodBoolean>;
1810
- }, "strip", z.ZodTypeAny, {
1811
- type: "dismissed";
1812
- key: string;
1813
- inverted?: boolean | undefined;
1814
- }, {
1815
- type: "dismissed";
1816
- key: string;
1817
- inverted?: boolean | undefined;
1818
- }>, z.ZodObject<{
1819
- type: z.ZodLiteral<"cooldown_active">;
1820
- key: z.ZodString;
1821
- inverted: z.ZodOptional<z.ZodBoolean>;
1822
- }, "strip", z.ZodTypeAny, {
1823
- type: "cooldown_active";
1824
- key: string;
1825
- inverted?: boolean | undefined;
1826
- }, {
1827
- type: "cooldown_active";
1828
- key: string;
1829
- inverted?: boolean | undefined;
1830
- }>, z.ZodObject<{
1831
- type: z.ZodLiteral<"frequency_limit">;
1832
- key: z.ZodString;
1833
- limit: z.ZodNumber;
1834
- inverted: z.ZodOptional<z.ZodBoolean>;
1835
- }, "strip", z.ZodTypeAny, {
1836
- type: "frequency_limit";
1837
- key: string;
1838
- limit: number;
1839
- inverted?: boolean | undefined;
1840
- }, {
1841
- type: "frequency_limit";
1842
- key: string;
1843
- limit: number;
1844
- inverted?: boolean | undefined;
1845
- }>, z.ZodObject<{
1846
- type: z.ZodLiteral<"event_count">;
1847
- key: z.ZodString;
1848
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1849
- count: z.ZodNumber;
1850
- withinMs: z.ZodOptional<z.ZodNumber>;
1851
- counter: z.ZodOptional<z.ZodObject<{
1852
- events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "nav.page_view", "nav.page_leave", "behavior.rage_click", "behavior.hesitation", "behavior.confusion"]>, "many">;
1853
- match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1854
- equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1855
- contains: z.ZodOptional<z.ZodString>;
1856
- }, "strip", z.ZodTypeAny, {
1857
- equals?: string | number | boolean | undefined;
1858
- contains?: string | undefined;
1859
- }, {
1860
- equals?: string | number | boolean | undefined;
1861
- contains?: string | undefined;
1862
- }>>>;
1863
- }, "strip", z.ZodTypeAny, {
1864
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1865
- match?: Record<string, {
1866
- equals?: string | number | boolean | undefined;
1867
- contains?: string | undefined;
1868
- }> | undefined;
1869
- }, {
1870
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1871
- match?: Record<string, {
1872
- equals?: string | number | boolean | undefined;
1873
- contains?: string | undefined;
1874
- }> | undefined;
1875
- }>>;
1876
- }, "strip", z.ZodTypeAny, {
1877
- type: "event_count";
1878
- key: string;
1879
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1880
- count: number;
1881
- withinMs?: number | undefined;
1882
- counter?: {
1883
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1884
- match?: Record<string, {
1885
- equals?: string | number | boolean | undefined;
1886
- contains?: string | undefined;
1887
- }> | undefined;
1888
- } | undefined;
1889
- }, {
1890
- type: "event_count";
1891
- key: string;
1892
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1893
- count: number;
1894
- withinMs?: number | undefined;
1895
- counter?: {
1896
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1897
- match?: Record<string, {
1898
- equals?: string | number | boolean | undefined;
1899
- contains?: string | undefined;
1900
- }> | undefined;
1901
- } | undefined;
1902
- }>]>, "many">;
1903
- value: z.ZodUnknown;
1904
- }, "strip", z.ZodTypeAny, {
1905
- conditions: ({
1906
- type: "page_url";
1907
- url: string;
1908
- } | {
1909
- type: "route";
1910
- routeId: string;
1911
- } | {
1912
- type: "anchor_visible";
1913
- anchorId: string;
1914
- state: "visible" | "present" | "absent";
1915
- } | {
1916
- type: "event_occurred";
1917
- eventName: string;
1918
- withinMs?: number | undefined;
1919
- } | {
1920
- type: "state_equals";
1921
- key: string;
1922
- value?: unknown;
1923
- } | {
1924
- type: "viewport";
1925
- minWidth?: number | undefined;
1926
- maxWidth?: number | undefined;
1927
- minHeight?: number | undefined;
1928
- maxHeight?: number | undefined;
1929
- } | {
1930
- type: "session_metric";
1931
- key: "time_on_page" | "page_views" | "scroll_depth";
1932
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1933
- threshold: number;
1934
- } | {
1935
- type: "dismissed";
1936
- key: string;
1937
- inverted?: boolean | undefined;
1938
- } | {
1939
- type: "cooldown_active";
1940
- key: string;
1941
- inverted?: boolean | undefined;
1942
- } | {
1943
- type: "frequency_limit";
1944
- key: string;
1945
- limit: number;
1946
- inverted?: boolean | undefined;
1947
- } | {
1948
- type: "event_count";
1949
- key: string;
1950
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1951
- count: number;
1952
- withinMs?: number | undefined;
1953
- counter?: {
1954
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
1955
- match?: Record<string, {
1956
- equals?: string | number | boolean | undefined;
1957
- contains?: string | undefined;
1958
- }> | undefined;
1959
- } | undefined;
1960
- })[];
1961
- value?: unknown;
1962
- }, {
1963
- conditions: ({
1964
- type: "page_url";
1965
- url: string;
1966
- } | {
1967
- type: "route";
1968
- routeId: string;
1969
- } | {
1970
- type: "anchor_visible";
1971
- anchorId: string;
1972
- state: "visible" | "present" | "absent";
1973
- } | {
1974
- type: "event_occurred";
1975
- eventName: string;
1976
- withinMs?: number | undefined;
1977
- } | {
1978
- type: "state_equals";
1979
- key: string;
1980
- value?: unknown;
1981
- } | {
1982
- type: "viewport";
1983
- minWidth?: number | undefined;
1984
- maxWidth?: number | undefined;
1985
- minHeight?: number | undefined;
1986
- maxHeight?: number | undefined;
1987
- } | {
1988
- type: "session_metric";
1989
- key: "time_on_page" | "page_views" | "scroll_depth";
1990
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1991
- threshold: number;
1992
- } | {
1993
- type: "dismissed";
1994
- key: string;
1995
- inverted?: boolean | undefined;
1996
- } | {
1997
- type: "cooldown_active";
1998
- key: string;
1999
- inverted?: boolean | undefined;
2000
- } | {
2001
- type: "frequency_limit";
2002
- key: string;
2003
- limit: number;
2004
- inverted?: boolean | undefined;
2005
- } | {
2006
- type: "event_count";
2007
- key: string;
2008
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
2009
- count: number;
2010
- withinMs?: number | undefined;
2011
- counter?: {
2012
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
2013
- match?: Record<string, {
2014
- equals?: string | number | boolean | undefined;
2015
- contains?: string | undefined;
2016
- }> | undefined;
2017
- } | undefined;
2018
- })[];
2019
- value?: unknown;
2020
- }>, "many">;
2021
- default: z.ZodUnknown;
2022
- }, "strip", z.ZodTypeAny, {
2023
- type: "rules";
2024
- rules: {
2025
- conditions: ({
2026
- type: "page_url";
2027
- url: string;
2028
- } | {
2029
- type: "route";
2030
- routeId: string;
2031
- } | {
2032
- type: "anchor_visible";
2033
- anchorId: string;
2034
- state: "visible" | "present" | "absent";
2035
- } | {
2036
- type: "event_occurred";
2037
- eventName: string;
2038
- withinMs?: number | undefined;
2039
- } | {
2040
- type: "state_equals";
2041
- key: string;
2042
- value?: unknown;
2043
- } | {
2044
- type: "viewport";
2045
- minWidth?: number | undefined;
2046
- maxWidth?: number | undefined;
2047
- minHeight?: number | undefined;
2048
- maxHeight?: number | undefined;
2049
- } | {
2050
- type: "session_metric";
2051
- key: "time_on_page" | "page_views" | "scroll_depth";
2052
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
2053
- threshold: number;
2054
- } | {
2055
- type: "dismissed";
2056
- key: string;
2057
- inverted?: boolean | undefined;
2058
- } | {
2059
- type: "cooldown_active";
2060
- key: string;
2061
- inverted?: boolean | undefined;
2062
- } | {
2063
- type: "frequency_limit";
2064
- key: string;
2065
- limit: number;
2066
- inverted?: boolean | undefined;
2067
- } | {
2068
- type: "event_count";
2069
- key: string;
2070
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
2071
- count: number;
2072
- withinMs?: number | undefined;
2073
- counter?: {
2074
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
2075
- match?: Record<string, {
2076
- equals?: string | number | boolean | undefined;
2077
- contains?: string | undefined;
2078
- }> | undefined;
2079
- } | undefined;
2080
- })[];
2081
- value?: unknown;
2082
- }[];
2083
- default?: unknown;
2084
- }, {
2085
- type: "rules";
2086
- rules: {
2087
- conditions: ({
2088
- type: "page_url";
2089
- url: string;
2090
- } | {
2091
- type: "route";
2092
- routeId: string;
2093
- } | {
2094
- type: "anchor_visible";
2095
- anchorId: string;
2096
- state: "visible" | "present" | "absent";
2097
- } | {
2098
- type: "event_occurred";
2099
- eventName: string;
2100
- withinMs?: number | undefined;
2101
- } | {
2102
- type: "state_equals";
2103
- key: string;
2104
- value?: unknown;
2105
- } | {
2106
- type: "viewport";
2107
- minWidth?: number | undefined;
2108
- maxWidth?: number | undefined;
2109
- minHeight?: number | undefined;
2110
- maxHeight?: number | undefined;
2111
- } | {
2112
- type: "session_metric";
2113
- key: "time_on_page" | "page_views" | "scroll_depth";
2114
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
2115
- threshold: number;
2116
- } | {
2117
- type: "dismissed";
2118
- key: string;
2119
- inverted?: boolean | undefined;
2120
- } | {
2121
- type: "cooldown_active";
2122
- key: string;
2123
- inverted?: boolean | undefined;
2124
- } | {
2125
- type: "frequency_limit";
2126
- key: string;
2127
- limit: number;
2128
- inverted?: boolean | undefined;
2129
- } | {
2130
- type: "event_count";
2131
- key: string;
2132
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
2133
- count: number;
2134
- withinMs?: number | undefined;
2135
- counter?: {
2136
- events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "nav.page_view" | "nav.page_leave" | "behavior.rage_click" | "behavior.hesitation" | "behavior.confusion")[];
2137
- match?: Record<string, {
2138
- equals?: string | number | boolean | undefined;
2139
- contains?: string | undefined;
2140
- }> | undefined;
2141
- } | undefined;
2142
- })[];
2143
- value?: unknown;
2144
- }[];
2145
- default?: unknown;
2146
- }>, z.ZodObject<{
2147
- type: z.ZodLiteral<"score">;
2148
- field: z.ZodString;
2149
- threshold: z.ZodNumber;
2150
- above: z.ZodUnknown;
2151
- below: z.ZodUnknown;
2152
- }, "strip", z.ZodTypeAny, {
2153
- type: "score";
2154
- threshold: number;
2155
- field: string;
2156
- above?: unknown;
2157
- below?: unknown;
2158
- }, {
2159
- type: "score";
2160
- threshold: number;
2161
- field: string;
2162
- above?: unknown;
2163
- below?: unknown;
2164
- }>, z.ZodObject<{
2165
- type: z.ZodLiteral<"model">;
2166
- modelId: z.ZodString;
2167
- inputs: z.ZodArray<z.ZodString, "many">;
2168
- outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2169
- default: z.ZodUnknown;
2170
- }, "strip", z.ZodTypeAny, {
2171
- type: "model";
2172
- modelId: string;
2173
- inputs: string[];
2174
- outputMapping: Record<string, unknown>;
2175
- default?: unknown;
2176
- }, {
2177
- type: "model";
2178
- modelId: string;
2179
- inputs: string[];
2180
- outputMapping: Record<string, unknown>;
2181
- default?: unknown;
2182
- }>, z.ZodObject<{
2183
- type: z.ZodLiteral<"external">;
2184
- endpoint: z.ZodString;
2185
- method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
2186
- default: z.ZodUnknown;
2187
- timeoutMs: z.ZodOptional<z.ZodNumber>;
2188
- }, "strip", z.ZodTypeAny, {
2189
- type: "external";
2190
- endpoint: string;
2191
- default?: unknown;
2192
- method?: "GET" | "POST" | undefined;
2193
- timeoutMs?: number | undefined;
2194
- }, {
2195
- type: "external";
2196
- endpoint: string;
2197
- default?: unknown;
2198
- method?: "GET" | "POST" | undefined;
2199
- timeoutMs?: number | undefined;
2200
- }>]>>>;
2201
- export type TriggerWhenSchema = z.infer<typeof TriggerWhenZ>;
2202
- /** Complete triggerWhen examples showing the full rules wrapper structure. */
2203
- export declare const TRIGGER_EXAMPLES: ({
2204
- name: string;
2205
- description: string;
2206
- triggerWhen: {
2207
- type: "rules";
2208
- rules: {
2209
- conditions: {
2210
- type: "event_count";
2211
- key: string;
2212
- operator: "gte";
2213
- count: number;
2214
- counter: {
2215
- events: string[];
2216
- match: {
2217
- 'attr__data-id': {
2218
- equals: string;
2219
- };
2220
- };
2221
- };
2222
- }[];
2223
- value: boolean;
2224
- }[];
2225
- default: boolean;
2226
- };
2227
- } | {
2228
- name: string;
2229
- description: string;
2230
- triggerWhen: {
2231
- type: "rules";
2232
- rules: {
2233
- conditions: {
2234
- type: "session_metric";
2235
- key: string;
2236
- operator: "gte";
2237
- threshold: number;
2238
- }[];
2239
- value: boolean;
2240
- }[];
2241
- default: boolean;
2242
- };
2243
- } | {
2244
- name: string;
2245
- description: string;
2246
- triggerWhen: {
2247
- type: "rules";
2248
- rules: {
2249
- conditions: {
2250
- type: "anchor_visible";
2251
- anchorId: string;
2252
- state: "visible";
2253
- }[];
2254
- value: boolean;
2255
- }[];
2256
- default: boolean;
2257
- };
2258
- } | {
2259
- name: string;
2260
- description: string;
2261
- triggerWhen: null;
2262
- })[];
2263
- /** Documentation for counter.match field keys. */
2264
- export declare const MATCH_FIELD_DOCS: Record<string, string>;
2265
- /** Scopes a widget to specific events/URLs. */
2266
- export declare const EventScopeZ: z.ZodObject<{
2267
- events: z.ZodArray<z.ZodString, "many">;
2268
- urlContains: z.ZodOptional<z.ZodString>;
2269
- props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
2270
- }, "strip", z.ZodTypeAny, {
2271
- events: string[];
2272
- urlContains?: string | undefined;
2273
- props?: Record<string, string | number | boolean> | undefined;
2274
- }, {
2275
- events: string[];
2276
- urlContains?: string | undefined;
2277
- props?: Record<string, string | number | boolean> | undefined;
2278
- }>;
2279
- /** Toast notification config for triggerWhen transitions. */
2280
- export declare const NotifyZ: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2281
- title: z.ZodOptional<z.ZodString>;
2282
- body: z.ZodOptional<z.ZodString>;
2283
- icon: z.ZodOptional<z.ZodString>;
2284
- }, "strip", z.ZodTypeAny, {
2285
- title?: string | undefined;
2286
- body?: string | undefined;
2287
- icon?: string | undefined;
2288
- }, {
2289
- title?: string | undefined;
2290
- body?: string | undefined;
2291
- icon?: string | undefined;
2292
- }>>>;
2293
- export type ConditionSchema = z.infer<typeof ConditionZ>;
2294
- export type RuleSchema = z.infer<typeof RuleZ>;
2295
- export type DecisionStrategySchema = z.infer<typeof DecisionStrategyZ>;
2296
- export type EventScopeSchema = z.infer<typeof EventScopeZ>;