@syntrologie/runtime-sdk 2.4.0-canary.2 → 2.4.0-canary.21

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 (62) hide show
  1. package/CAPABILITIES.md +116 -1
  2. package/dist/SmartCanvasApp.d.ts +5 -3
  3. package/dist/actions/executors/index.d.ts +1 -2
  4. package/dist/actions/index.d.ts +2 -2
  5. package/dist/actions/schema.d.ts +58243 -201
  6. package/dist/actions/schema.js +5 -2
  7. package/dist/actions/types.d.ts +45 -48
  8. package/dist/anchor/AnchorResolver.d.ts +18 -0
  9. package/dist/anchor/index.d.ts +2 -0
  10. package/dist/api.d.ts +3 -8
  11. package/dist/apps/examples/gamification-app.example.d.ts +8 -8
  12. package/dist/chunk-2UYZ5DWI.js +126 -0
  13. package/dist/chunk-2UYZ5DWI.js.map +7 -0
  14. package/dist/{chunk-DOJR7R46.js → chunk-HF3D7YFQ.js} +49 -31
  15. package/dist/chunk-HF3D7YFQ.js.map +7 -0
  16. package/dist/{chunk-ZDZ3IYFN.js → chunk-IPU3WVPY.js} +3449 -2110
  17. package/dist/chunk-IPU3WVPY.js.map +7 -0
  18. package/dist/{chunk-BIYMC56J.js → chunk-P5G4KT2U.js} +54 -6
  19. package/dist/chunk-P5G4KT2U.js.map +7 -0
  20. package/dist/components/ShadowCanvasOverlay.d.ts +1 -20
  21. package/dist/config/schema.d.ts +1797 -267
  22. package/dist/config/schema.js +19 -62
  23. package/dist/config/schema.js.map +3 -3
  24. package/dist/context/schema.d.ts +8 -8
  25. package/dist/decisions/schema.d.ts +506 -1490
  26. package/dist/decisions/schema.js +5 -2
  27. package/dist/decisions/types.d.ts +22 -0
  28. package/dist/events/registerConfigPredicates.d.ts +7 -10
  29. package/dist/events/schema.d.ts +12 -12
  30. package/dist/experiments/adapters/growthbook.d.ts +2 -0
  31. package/dist/experiments/types.d.ts +7 -0
  32. package/dist/hooks/useShadowCanvasConfig.d.ts +4 -2
  33. package/dist/index.d.ts +1 -0
  34. package/dist/index.js +72 -98
  35. package/dist/index.js.map +3 -3
  36. package/dist/overlays/schema.d.ts +48 -48
  37. package/dist/react.js +4 -3
  38. package/dist/react.js.map +1 -1
  39. package/dist/runtime.d.ts +3 -0
  40. package/dist/smart-canvas.esm.js +62 -66
  41. package/dist/smart-canvas.esm.js.map +4 -4
  42. package/dist/smart-canvas.js +2591 -1167
  43. package/dist/smart-canvas.js.map +4 -4
  44. package/dist/smart-canvas.min.js +62 -66
  45. package/dist/smart-canvas.min.js.map +4 -4
  46. package/dist/surfaces/types.d.ts +2 -1
  47. package/dist/theme/ThemeProvider.d.ts +11 -16
  48. package/dist/theme/defaultTheme.d.ts +6 -1
  49. package/dist/theme/index.d.ts +3 -4
  50. package/dist/theme/types.d.ts +10 -0
  51. package/dist/version.d.ts +1 -1
  52. package/package.json +7 -7
  53. package/schema/canvas-config.schema.json +9418 -790
  54. package/scripts/validate-config.mjs +78 -0
  55. package/dist/actions/executors/tour.d.ts +0 -18
  56. package/dist/chunk-BIYMC56J.js.map +0 -7
  57. package/dist/chunk-DOJR7R46.js.map +0 -7
  58. package/dist/chunk-JMHRHAEL.js +0 -18
  59. package/dist/chunk-JMHRHAEL.js.map +0 -7
  60. package/dist/chunk-ZDZ3IYFN.js.map +0 -7
  61. package/dist/hooks/useHostPatches.d.ts +0 -9
  62. package/dist/theme/extractHostTheme.d.ts +0 -14
@@ -1,1416 +1,33 @@
1
1
  /**
2
2
  * Zod schemas for decision strategy validation.
3
- */
4
- import { z } from 'zod';
5
- export declare const PageUrlConditionZ: z.ZodObject<{
6
- type: z.ZodLiteral<"page_url">;
7
- url: z.ZodString;
8
- }, "strip", z.ZodTypeAny, {
9
- url: string;
10
- type: "page_url";
11
- }, {
12
- url: string;
13
- type: "page_url";
14
- }>;
15
- export declare const RouteConditionZ: z.ZodObject<{
16
- type: z.ZodLiteral<"route">;
17
- routeId: z.ZodString;
18
- }, "strip", z.ZodTypeAny, {
19
- type: "route";
20
- routeId: string;
21
- }, {
22
- type: "route";
23
- routeId: string;
24
- }>;
25
- export declare const AnchorVisibleConditionZ: z.ZodObject<{
26
- type: z.ZodLiteral<"anchor_visible">;
27
- anchorId: z.ZodString;
28
- state: z.ZodEnum<["visible", "present", "absent"]>;
29
- }, "strip", z.ZodTypeAny, {
30
- anchorId: string;
31
- state: "visible" | "present" | "absent";
32
- type: "anchor_visible";
33
- }, {
34
- anchorId: string;
35
- state: "visible" | "present" | "absent";
36
- type: "anchor_visible";
37
- }>;
38
- export declare const EventOccurredConditionZ: z.ZodObject<{
39
- type: z.ZodLiteral<"event_occurred">;
40
- eventName: z.ZodString;
41
- withinMs: z.ZodOptional<z.ZodNumber>;
42
- }, "strip", z.ZodTypeAny, {
43
- type: "event_occurred";
44
- eventName: string;
45
- withinMs?: number | undefined;
46
- }, {
47
- type: "event_occurred";
48
- eventName: string;
49
- withinMs?: number | undefined;
50
- }>;
51
- export declare const StateEqualsConditionZ: z.ZodObject<{
52
- type: z.ZodLiteral<"state_equals">;
53
- key: z.ZodString;
54
- value: z.ZodUnknown;
55
- }, "strip", z.ZodTypeAny, {
56
- type: "state_equals";
57
- key: string;
58
- value?: unknown;
59
- }, {
60
- type: "state_equals";
61
- key: string;
62
- value?: unknown;
63
- }>;
64
- export declare const ViewportConditionZ: z.ZodObject<{
65
- type: z.ZodLiteral<"viewport">;
66
- minWidth: z.ZodOptional<z.ZodNumber>;
67
- maxWidth: z.ZodOptional<z.ZodNumber>;
68
- minHeight: z.ZodOptional<z.ZodNumber>;
69
- maxHeight: z.ZodOptional<z.ZodNumber>;
70
- }, "strip", z.ZodTypeAny, {
71
- type: "viewport";
72
- minWidth?: number | undefined;
73
- maxWidth?: number | undefined;
74
- minHeight?: number | undefined;
75
- maxHeight?: number | undefined;
76
- }, {
77
- type: "viewport";
78
- minWidth?: number | undefined;
79
- maxWidth?: number | undefined;
80
- minHeight?: number | undefined;
81
- maxHeight?: number | undefined;
82
- }>;
83
- export declare const SessionMetricConditionZ: z.ZodObject<{
84
- type: z.ZodLiteral<"session_metric">;
85
- key: z.ZodString;
86
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
87
- threshold: z.ZodNumber;
88
- }, "strip", z.ZodTypeAny, {
89
- type: "session_metric";
90
- key: string;
91
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
92
- threshold: number;
93
- }, {
94
- type: "session_metric";
95
- key: string;
96
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
97
- threshold: number;
98
- }>;
99
- export declare const DismissedConditionZ: z.ZodObject<{
100
- type: z.ZodLiteral<"dismissed">;
101
- key: z.ZodString;
102
- inverted: z.ZodOptional<z.ZodBoolean>;
103
- }, "strip", z.ZodTypeAny, {
104
- type: "dismissed";
105
- key: string;
106
- inverted?: boolean | undefined;
107
- }, {
108
- type: "dismissed";
109
- key: string;
110
- inverted?: boolean | undefined;
111
- }>;
112
- export declare const CooldownActiveConditionZ: z.ZodObject<{
113
- type: z.ZodLiteral<"cooldown_active">;
114
- key: z.ZodString;
115
- inverted: z.ZodOptional<z.ZodBoolean>;
116
- }, "strip", z.ZodTypeAny, {
117
- type: "cooldown_active";
118
- key: string;
119
- inverted?: boolean | undefined;
120
- }, {
121
- type: "cooldown_active";
122
- key: string;
123
- inverted?: boolean | undefined;
124
- }>;
125
- export declare const FrequencyLimitConditionZ: z.ZodObject<{
126
- type: z.ZodLiteral<"frequency_limit">;
127
- key: z.ZodString;
128
- limit: z.ZodNumber;
129
- inverted: z.ZodOptional<z.ZodBoolean>;
130
- }, "strip", z.ZodTypeAny, {
131
- type: "frequency_limit";
132
- key: string;
133
- limit: number;
134
- inverted?: boolean | undefined;
135
- }, {
136
- type: "frequency_limit";
137
- key: string;
138
- limit: number;
139
- inverted?: boolean | undefined;
140
- }>;
141
- export declare const EventCountConditionZ: z.ZodObject<{
142
- type: z.ZodLiteral<"event_count">;
143
- key: z.ZodString;
144
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
145
- count: z.ZodNumber;
146
- withinMs: z.ZodOptional<z.ZodNumber>;
147
- }, "strip", z.ZodTypeAny, {
148
- type: "event_count";
149
- key: string;
150
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
151
- count: number;
152
- withinMs?: number | undefined;
153
- }, {
154
- type: "event_count";
155
- key: string;
156
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
157
- count: number;
158
- withinMs?: number | undefined;
159
- }>;
160
- export declare const ConditionZ: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
161
- type: z.ZodLiteral<"page_url">;
162
- url: z.ZodString;
163
- }, "strip", z.ZodTypeAny, {
164
- url: string;
165
- type: "page_url";
166
- }, {
167
- url: string;
168
- type: "page_url";
169
- }>, z.ZodObject<{
170
- type: z.ZodLiteral<"route">;
171
- routeId: z.ZodString;
172
- }, "strip", z.ZodTypeAny, {
173
- type: "route";
174
- routeId: string;
175
- }, {
176
- type: "route";
177
- routeId: string;
178
- }>, z.ZodObject<{
179
- type: z.ZodLiteral<"anchor_visible">;
180
- anchorId: z.ZodString;
181
- state: z.ZodEnum<["visible", "present", "absent"]>;
182
- }, "strip", z.ZodTypeAny, {
183
- anchorId: string;
184
- state: "visible" | "present" | "absent";
185
- type: "anchor_visible";
186
- }, {
187
- anchorId: string;
188
- state: "visible" | "present" | "absent";
189
- type: "anchor_visible";
190
- }>, z.ZodObject<{
191
- type: z.ZodLiteral<"event_occurred">;
192
- eventName: z.ZodString;
193
- withinMs: z.ZodOptional<z.ZodNumber>;
194
- }, "strip", z.ZodTypeAny, {
195
- type: "event_occurred";
196
- eventName: string;
197
- withinMs?: number | undefined;
198
- }, {
199
- type: "event_occurred";
200
- eventName: string;
201
- withinMs?: number | undefined;
202
- }>, z.ZodObject<{
203
- type: z.ZodLiteral<"state_equals">;
204
- key: z.ZodString;
205
- value: z.ZodUnknown;
206
- }, "strip", z.ZodTypeAny, {
207
- type: "state_equals";
208
- key: string;
209
- value?: unknown;
210
- }, {
211
- type: "state_equals";
212
- key: string;
213
- value?: unknown;
214
- }>, z.ZodObject<{
215
- type: z.ZodLiteral<"viewport">;
216
- minWidth: z.ZodOptional<z.ZodNumber>;
217
- maxWidth: z.ZodOptional<z.ZodNumber>;
218
- minHeight: z.ZodOptional<z.ZodNumber>;
219
- maxHeight: z.ZodOptional<z.ZodNumber>;
220
- }, "strip", z.ZodTypeAny, {
221
- type: "viewport";
222
- minWidth?: number | undefined;
223
- maxWidth?: number | undefined;
224
- minHeight?: number | undefined;
225
- maxHeight?: number | undefined;
226
- }, {
227
- type: "viewport";
228
- minWidth?: number | undefined;
229
- maxWidth?: number | undefined;
230
- minHeight?: number | undefined;
231
- maxHeight?: number | undefined;
232
- }>, z.ZodObject<{
233
- type: z.ZodLiteral<"session_metric">;
234
- key: z.ZodString;
235
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
236
- threshold: z.ZodNumber;
237
- }, "strip", z.ZodTypeAny, {
238
- type: "session_metric";
239
- key: string;
240
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
241
- threshold: number;
242
- }, {
243
- type: "session_metric";
244
- key: string;
245
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
246
- threshold: number;
247
- }>, z.ZodObject<{
248
- type: z.ZodLiteral<"dismissed">;
249
- key: z.ZodString;
250
- inverted: z.ZodOptional<z.ZodBoolean>;
251
- }, "strip", z.ZodTypeAny, {
252
- type: "dismissed";
253
- key: string;
254
- inverted?: boolean | undefined;
255
- }, {
256
- type: "dismissed";
257
- key: string;
258
- inverted?: boolean | undefined;
259
- }>, z.ZodObject<{
260
- type: z.ZodLiteral<"cooldown_active">;
261
- key: z.ZodString;
262
- inverted: z.ZodOptional<z.ZodBoolean>;
263
- }, "strip", z.ZodTypeAny, {
264
- type: "cooldown_active";
265
- key: string;
266
- inverted?: boolean | undefined;
267
- }, {
268
- type: "cooldown_active";
269
- key: string;
270
- inverted?: boolean | undefined;
271
- }>, z.ZodObject<{
272
- type: z.ZodLiteral<"frequency_limit">;
273
- key: z.ZodString;
274
- limit: z.ZodNumber;
275
- inverted: z.ZodOptional<z.ZodBoolean>;
276
- }, "strip", z.ZodTypeAny, {
277
- type: "frequency_limit";
278
- key: string;
279
- limit: number;
280
- inverted?: boolean | undefined;
281
- }, {
282
- type: "frequency_limit";
283
- key: string;
284
- limit: number;
285
- inverted?: boolean | undefined;
286
- }>, z.ZodObject<{
287
- type: z.ZodLiteral<"event_count">;
288
- key: z.ZodString;
289
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
290
- count: z.ZodNumber;
291
- withinMs: z.ZodOptional<z.ZodNumber>;
292
- }, "strip", z.ZodTypeAny, {
293
- type: "event_count";
294
- key: string;
295
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
296
- count: number;
297
- withinMs?: number | undefined;
298
- }, {
299
- type: "event_count";
300
- key: string;
301
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
302
- count: number;
303
- withinMs?: number | undefined;
304
- }>]>;
305
- export declare const RuleZ: z.ZodObject<{
306
- conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
307
- type: z.ZodLiteral<"page_url">;
308
- url: z.ZodString;
309
- }, "strip", z.ZodTypeAny, {
310
- url: string;
311
- type: "page_url";
312
- }, {
313
- url: string;
314
- type: "page_url";
315
- }>, z.ZodObject<{
316
- type: z.ZodLiteral<"route">;
317
- routeId: z.ZodString;
318
- }, "strip", z.ZodTypeAny, {
319
- type: "route";
320
- routeId: string;
321
- }, {
322
- type: "route";
323
- routeId: string;
324
- }>, z.ZodObject<{
325
- type: z.ZodLiteral<"anchor_visible">;
326
- anchorId: z.ZodString;
327
- state: z.ZodEnum<["visible", "present", "absent"]>;
328
- }, "strip", z.ZodTypeAny, {
329
- anchorId: string;
330
- state: "visible" | "present" | "absent";
331
- type: "anchor_visible";
332
- }, {
333
- anchorId: string;
334
- state: "visible" | "present" | "absent";
335
- type: "anchor_visible";
336
- }>, z.ZodObject<{
337
- type: z.ZodLiteral<"event_occurred">;
338
- eventName: z.ZodString;
339
- withinMs: z.ZodOptional<z.ZodNumber>;
340
- }, "strip", z.ZodTypeAny, {
341
- type: "event_occurred";
342
- eventName: string;
343
- withinMs?: number | undefined;
344
- }, {
345
- type: "event_occurred";
346
- eventName: string;
347
- withinMs?: number | undefined;
348
- }>, z.ZodObject<{
349
- type: z.ZodLiteral<"state_equals">;
350
- key: z.ZodString;
351
- value: z.ZodUnknown;
352
- }, "strip", z.ZodTypeAny, {
353
- type: "state_equals";
354
- key: string;
355
- value?: unknown;
356
- }, {
357
- type: "state_equals";
358
- key: string;
359
- value?: unknown;
360
- }>, z.ZodObject<{
361
- type: z.ZodLiteral<"viewport">;
362
- minWidth: z.ZodOptional<z.ZodNumber>;
363
- maxWidth: z.ZodOptional<z.ZodNumber>;
364
- minHeight: z.ZodOptional<z.ZodNumber>;
365
- maxHeight: z.ZodOptional<z.ZodNumber>;
366
- }, "strip", z.ZodTypeAny, {
367
- type: "viewport";
368
- minWidth?: number | undefined;
369
- maxWidth?: number | undefined;
370
- minHeight?: number | undefined;
371
- maxHeight?: number | undefined;
372
- }, {
373
- type: "viewport";
374
- minWidth?: number | undefined;
375
- maxWidth?: number | undefined;
376
- minHeight?: number | undefined;
377
- maxHeight?: number | undefined;
378
- }>, z.ZodObject<{
379
- type: z.ZodLiteral<"session_metric">;
380
- key: z.ZodString;
381
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
382
- threshold: z.ZodNumber;
383
- }, "strip", z.ZodTypeAny, {
384
- type: "session_metric";
385
- key: string;
386
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
387
- threshold: number;
388
- }, {
389
- type: "session_metric";
390
- key: string;
391
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
392
- threshold: number;
393
- }>, z.ZodObject<{
394
- type: z.ZodLiteral<"dismissed">;
395
- key: z.ZodString;
396
- inverted: z.ZodOptional<z.ZodBoolean>;
397
- }, "strip", z.ZodTypeAny, {
398
- type: "dismissed";
399
- key: string;
400
- inverted?: boolean | undefined;
401
- }, {
402
- type: "dismissed";
403
- key: string;
404
- inverted?: boolean | undefined;
405
- }>, z.ZodObject<{
406
- type: z.ZodLiteral<"cooldown_active">;
407
- key: z.ZodString;
408
- inverted: z.ZodOptional<z.ZodBoolean>;
409
- }, "strip", z.ZodTypeAny, {
410
- type: "cooldown_active";
411
- key: string;
412
- inverted?: boolean | undefined;
413
- }, {
414
- type: "cooldown_active";
415
- key: string;
416
- inverted?: boolean | undefined;
417
- }>, z.ZodObject<{
418
- type: z.ZodLiteral<"frequency_limit">;
419
- key: z.ZodString;
420
- limit: z.ZodNumber;
421
- inverted: z.ZodOptional<z.ZodBoolean>;
422
- }, "strip", z.ZodTypeAny, {
423
- type: "frequency_limit";
424
- key: string;
425
- limit: number;
426
- inverted?: boolean | undefined;
427
- }, {
428
- type: "frequency_limit";
429
- key: string;
430
- limit: number;
431
- inverted?: boolean | undefined;
432
- }>, z.ZodObject<{
433
- type: z.ZodLiteral<"event_count">;
434
- key: z.ZodString;
435
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
436
- count: z.ZodNumber;
437
- withinMs: z.ZodOptional<z.ZodNumber>;
438
- }, "strip", z.ZodTypeAny, {
439
- type: "event_count";
440
- key: string;
441
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
442
- count: number;
443
- withinMs?: number | undefined;
444
- }, {
445
- type: "event_count";
446
- key: string;
447
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
448
- count: number;
449
- withinMs?: number | undefined;
450
- }>]>, "many">;
451
- value: z.ZodUnknown;
452
- }, "strip", z.ZodTypeAny, {
453
- conditions: ({
454
- url: string;
455
- type: "page_url";
456
- } | {
457
- type: "route";
458
- routeId: string;
459
- } | {
460
- anchorId: string;
461
- state: "visible" | "present" | "absent";
462
- type: "anchor_visible";
463
- } | {
464
- type: "event_occurred";
465
- eventName: string;
466
- withinMs?: number | undefined;
467
- } | {
468
- type: "state_equals";
469
- key: string;
470
- value?: unknown;
471
- } | {
472
- type: "viewport";
473
- minWidth?: number | undefined;
474
- maxWidth?: number | undefined;
475
- minHeight?: number | undefined;
476
- maxHeight?: number | undefined;
477
- } | {
478
- type: "session_metric";
479
- key: string;
480
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
481
- threshold: number;
482
- } | {
483
- type: "dismissed";
484
- key: string;
485
- inverted?: boolean | undefined;
486
- } | {
487
- type: "cooldown_active";
488
- key: string;
489
- inverted?: boolean | undefined;
490
- } | {
491
- type: "frequency_limit";
492
- key: string;
493
- limit: number;
494
- inverted?: boolean | undefined;
495
- } | {
496
- type: "event_count";
497
- key: string;
498
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
499
- count: number;
500
- withinMs?: number | undefined;
501
- })[];
502
- value?: unknown;
503
- }, {
504
- conditions: ({
505
- url: string;
506
- type: "page_url";
507
- } | {
508
- type: "route";
509
- routeId: string;
510
- } | {
511
- anchorId: string;
512
- state: "visible" | "present" | "absent";
513
- type: "anchor_visible";
514
- } | {
515
- type: "event_occurred";
516
- eventName: string;
517
- withinMs?: number | undefined;
518
- } | {
519
- type: "state_equals";
520
- key: string;
521
- value?: unknown;
522
- } | {
523
- type: "viewport";
524
- minWidth?: number | undefined;
525
- maxWidth?: number | undefined;
526
- minHeight?: number | undefined;
527
- maxHeight?: number | undefined;
528
- } | {
529
- type: "session_metric";
530
- key: string;
531
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
532
- threshold: number;
533
- } | {
534
- type: "dismissed";
535
- key: string;
536
- inverted?: boolean | undefined;
537
- } | {
538
- type: "cooldown_active";
539
- key: string;
540
- inverted?: boolean | undefined;
541
- } | {
542
- type: "frequency_limit";
543
- key: string;
544
- limit: number;
545
- inverted?: boolean | undefined;
546
- } | {
547
- type: "event_count";
548
- key: string;
549
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
550
- count: number;
551
- withinMs?: number | undefined;
552
- })[];
553
- value?: unknown;
554
- }>;
555
- export declare const RuleStrategyZ: z.ZodObject<{
556
- type: z.ZodLiteral<"rules">;
557
- rules: z.ZodArray<z.ZodObject<{
558
- conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
559
- type: z.ZodLiteral<"page_url">;
560
- url: z.ZodString;
561
- }, "strip", z.ZodTypeAny, {
562
- url: string;
563
- type: "page_url";
564
- }, {
565
- url: string;
566
- type: "page_url";
567
- }>, z.ZodObject<{
568
- type: z.ZodLiteral<"route">;
569
- routeId: z.ZodString;
570
- }, "strip", z.ZodTypeAny, {
571
- type: "route";
572
- routeId: string;
573
- }, {
574
- type: "route";
575
- routeId: string;
576
- }>, z.ZodObject<{
577
- type: z.ZodLiteral<"anchor_visible">;
578
- anchorId: z.ZodString;
579
- state: z.ZodEnum<["visible", "present", "absent"]>;
580
- }, "strip", z.ZodTypeAny, {
581
- anchorId: string;
582
- state: "visible" | "present" | "absent";
583
- type: "anchor_visible";
584
- }, {
585
- anchorId: string;
586
- state: "visible" | "present" | "absent";
587
- type: "anchor_visible";
588
- }>, z.ZodObject<{
589
- type: z.ZodLiteral<"event_occurred">;
590
- eventName: z.ZodString;
591
- withinMs: z.ZodOptional<z.ZodNumber>;
592
- }, "strip", z.ZodTypeAny, {
593
- type: "event_occurred";
594
- eventName: string;
595
- withinMs?: number | undefined;
596
- }, {
597
- type: "event_occurred";
598
- eventName: string;
599
- withinMs?: number | undefined;
600
- }>, z.ZodObject<{
601
- type: z.ZodLiteral<"state_equals">;
602
- key: z.ZodString;
603
- value: z.ZodUnknown;
604
- }, "strip", z.ZodTypeAny, {
605
- type: "state_equals";
606
- key: string;
607
- value?: unknown;
608
- }, {
609
- type: "state_equals";
610
- key: string;
611
- value?: unknown;
612
- }>, z.ZodObject<{
613
- type: z.ZodLiteral<"viewport">;
614
- minWidth: z.ZodOptional<z.ZodNumber>;
615
- maxWidth: z.ZodOptional<z.ZodNumber>;
616
- minHeight: z.ZodOptional<z.ZodNumber>;
617
- maxHeight: z.ZodOptional<z.ZodNumber>;
618
- }, "strip", z.ZodTypeAny, {
619
- type: "viewport";
620
- minWidth?: number | undefined;
621
- maxWidth?: number | undefined;
622
- minHeight?: number | undefined;
623
- maxHeight?: number | undefined;
624
- }, {
625
- type: "viewport";
626
- minWidth?: number | undefined;
627
- maxWidth?: number | undefined;
628
- minHeight?: number | undefined;
629
- maxHeight?: number | undefined;
630
- }>, z.ZodObject<{
631
- type: z.ZodLiteral<"session_metric">;
632
- key: z.ZodString;
633
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
634
- threshold: z.ZodNumber;
635
- }, "strip", z.ZodTypeAny, {
636
- type: "session_metric";
637
- key: string;
638
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
639
- threshold: number;
640
- }, {
641
- type: "session_metric";
642
- key: string;
643
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
644
- threshold: number;
645
- }>, z.ZodObject<{
646
- type: z.ZodLiteral<"dismissed">;
647
- key: z.ZodString;
648
- inverted: z.ZodOptional<z.ZodBoolean>;
649
- }, "strip", z.ZodTypeAny, {
650
- type: "dismissed";
651
- key: string;
652
- inverted?: boolean | undefined;
653
- }, {
654
- type: "dismissed";
655
- key: string;
656
- inverted?: boolean | undefined;
657
- }>, z.ZodObject<{
658
- type: z.ZodLiteral<"cooldown_active">;
659
- key: z.ZodString;
660
- inverted: z.ZodOptional<z.ZodBoolean>;
661
- }, "strip", z.ZodTypeAny, {
662
- type: "cooldown_active";
663
- key: string;
664
- inverted?: boolean | undefined;
665
- }, {
666
- type: "cooldown_active";
667
- key: string;
668
- inverted?: boolean | undefined;
669
- }>, z.ZodObject<{
670
- type: z.ZodLiteral<"frequency_limit">;
671
- key: z.ZodString;
672
- limit: z.ZodNumber;
673
- inverted: z.ZodOptional<z.ZodBoolean>;
674
- }, "strip", z.ZodTypeAny, {
675
- type: "frequency_limit";
676
- key: string;
677
- limit: number;
678
- inverted?: boolean | undefined;
679
- }, {
680
- type: "frequency_limit";
681
- key: string;
682
- limit: number;
683
- inverted?: boolean | undefined;
684
- }>, z.ZodObject<{
685
- type: z.ZodLiteral<"event_count">;
686
- key: z.ZodString;
687
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
688
- count: z.ZodNumber;
689
- withinMs: z.ZodOptional<z.ZodNumber>;
690
- }, "strip", z.ZodTypeAny, {
691
- type: "event_count";
692
- key: string;
693
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
694
- count: number;
695
- withinMs?: number | undefined;
696
- }, {
697
- type: "event_count";
698
- key: string;
699
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
700
- count: number;
701
- withinMs?: number | undefined;
702
- }>]>, "many">;
703
- value: z.ZodUnknown;
704
- }, "strip", z.ZodTypeAny, {
705
- conditions: ({
706
- url: string;
707
- type: "page_url";
708
- } | {
709
- type: "route";
710
- routeId: string;
711
- } | {
712
- anchorId: string;
713
- state: "visible" | "present" | "absent";
714
- type: "anchor_visible";
715
- } | {
716
- type: "event_occurred";
717
- eventName: string;
718
- withinMs?: number | undefined;
719
- } | {
720
- type: "state_equals";
721
- key: string;
722
- value?: unknown;
723
- } | {
724
- type: "viewport";
725
- minWidth?: number | undefined;
726
- maxWidth?: number | undefined;
727
- minHeight?: number | undefined;
728
- maxHeight?: number | undefined;
729
- } | {
730
- type: "session_metric";
731
- key: string;
732
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
733
- threshold: number;
734
- } | {
735
- type: "dismissed";
736
- key: string;
737
- inverted?: boolean | undefined;
738
- } | {
739
- type: "cooldown_active";
740
- key: string;
741
- inverted?: boolean | undefined;
742
- } | {
743
- type: "frequency_limit";
744
- key: string;
745
- limit: number;
746
- inverted?: boolean | undefined;
747
- } | {
748
- type: "event_count";
749
- key: string;
750
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
751
- count: number;
752
- withinMs?: number | undefined;
753
- })[];
754
- value?: unknown;
755
- }, {
756
- conditions: ({
757
- url: string;
758
- type: "page_url";
759
- } | {
760
- type: "route";
761
- routeId: string;
762
- } | {
763
- anchorId: string;
764
- state: "visible" | "present" | "absent";
765
- type: "anchor_visible";
766
- } | {
767
- type: "event_occurred";
768
- eventName: string;
769
- withinMs?: number | undefined;
770
- } | {
771
- type: "state_equals";
772
- key: string;
773
- value?: unknown;
774
- } | {
775
- type: "viewport";
776
- minWidth?: number | undefined;
777
- maxWidth?: number | undefined;
778
- minHeight?: number | undefined;
779
- maxHeight?: number | undefined;
780
- } | {
781
- type: "session_metric";
782
- key: string;
783
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
784
- threshold: number;
785
- } | {
786
- type: "dismissed";
787
- key: string;
788
- inverted?: boolean | undefined;
789
- } | {
790
- type: "cooldown_active";
791
- key: string;
792
- inverted?: boolean | undefined;
793
- } | {
794
- type: "frequency_limit";
795
- key: string;
796
- limit: number;
797
- inverted?: boolean | undefined;
798
- } | {
799
- type: "event_count";
800
- key: string;
801
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
802
- count: number;
803
- withinMs?: number | undefined;
804
- })[];
805
- value?: unknown;
806
- }>, "many">;
807
- default: z.ZodUnknown;
808
- }, "strip", z.ZodTypeAny, {
809
- type: "rules";
810
- rules: {
811
- conditions: ({
812
- url: string;
813
- type: "page_url";
814
- } | {
815
- type: "route";
816
- routeId: string;
817
- } | {
818
- anchorId: string;
819
- state: "visible" | "present" | "absent";
820
- type: "anchor_visible";
821
- } | {
822
- type: "event_occurred";
823
- eventName: string;
824
- withinMs?: number | undefined;
825
- } | {
826
- type: "state_equals";
827
- key: string;
828
- value?: unknown;
829
- } | {
830
- type: "viewport";
831
- minWidth?: number | undefined;
832
- maxWidth?: number | undefined;
833
- minHeight?: number | undefined;
834
- maxHeight?: number | undefined;
835
- } | {
836
- type: "session_metric";
837
- key: string;
838
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
839
- threshold: number;
840
- } | {
841
- type: "dismissed";
842
- key: string;
843
- inverted?: boolean | undefined;
844
- } | {
845
- type: "cooldown_active";
846
- key: string;
847
- inverted?: boolean | undefined;
848
- } | {
849
- type: "frequency_limit";
850
- key: string;
851
- limit: number;
852
- inverted?: boolean | undefined;
853
- } | {
854
- type: "event_count";
855
- key: string;
856
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
857
- count: number;
858
- withinMs?: number | undefined;
859
- })[];
860
- value?: unknown;
861
- }[];
862
- default?: unknown;
863
- }, {
864
- type: "rules";
865
- rules: {
866
- conditions: ({
867
- url: string;
868
- type: "page_url";
869
- } | {
870
- type: "route";
871
- routeId: string;
872
- } | {
873
- anchorId: string;
874
- state: "visible" | "present" | "absent";
875
- type: "anchor_visible";
876
- } | {
877
- type: "event_occurred";
878
- eventName: string;
879
- withinMs?: number | undefined;
880
- } | {
881
- type: "state_equals";
882
- key: string;
883
- value?: unknown;
884
- } | {
885
- type: "viewport";
886
- minWidth?: number | undefined;
887
- maxWidth?: number | undefined;
888
- minHeight?: number | undefined;
889
- maxHeight?: number | undefined;
890
- } | {
891
- type: "session_metric";
892
- key: string;
893
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
894
- threshold: number;
895
- } | {
896
- type: "dismissed";
897
- key: string;
898
- inverted?: boolean | undefined;
899
- } | {
900
- type: "cooldown_active";
901
- key: string;
902
- inverted?: boolean | undefined;
903
- } | {
904
- type: "frequency_limit";
905
- key: string;
906
- limit: number;
907
- inverted?: boolean | undefined;
908
- } | {
909
- type: "event_count";
910
- key: string;
911
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
912
- count: number;
913
- withinMs?: number | undefined;
914
- })[];
915
- value?: unknown;
916
- }[];
917
- default?: unknown;
918
- }>;
919
- export declare const ScoreStrategyZ: z.ZodObject<{
920
- type: z.ZodLiteral<"score">;
921
- field: z.ZodString;
922
- threshold: z.ZodNumber;
923
- above: z.ZodUnknown;
924
- below: z.ZodUnknown;
925
- }, "strip", z.ZodTypeAny, {
926
- type: "score";
927
- threshold: number;
928
- field: string;
929
- above?: unknown;
930
- below?: unknown;
931
- }, {
932
- type: "score";
933
- threshold: number;
934
- field: string;
935
- above?: unknown;
936
- below?: unknown;
937
- }>;
938
- export declare const ModelStrategyZ: z.ZodObject<{
939
- type: z.ZodLiteral<"model">;
940
- modelId: z.ZodString;
941
- inputs: z.ZodArray<z.ZodString, "many">;
942
- outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
943
- default: z.ZodUnknown;
944
- }, "strip", z.ZodTypeAny, {
945
- type: "model";
946
- modelId: string;
947
- inputs: string[];
948
- outputMapping: Record<string, unknown>;
949
- default?: unknown;
950
- }, {
951
- type: "model";
952
- modelId: string;
953
- inputs: string[];
954
- outputMapping: Record<string, unknown>;
955
- default?: unknown;
956
- }>;
957
- export declare const ExternalStrategyZ: z.ZodObject<{
958
- type: z.ZodLiteral<"external">;
959
- endpoint: z.ZodString;
960
- method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
961
- default: z.ZodUnknown;
962
- timeoutMs: z.ZodOptional<z.ZodNumber>;
963
- }, "strip", z.ZodTypeAny, {
964
- type: "external";
965
- endpoint: string;
966
- timeoutMs?: number | undefined;
967
- default?: unknown;
968
- method?: "GET" | "POST" | undefined;
969
- }, {
970
- type: "external";
971
- endpoint: string;
972
- timeoutMs?: number | undefined;
973
- default?: unknown;
974
- method?: "GET" | "POST" | undefined;
975
- }>;
976
- export declare const DecisionStrategyZ: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
977
- type: z.ZodLiteral<"rules">;
978
- rules: z.ZodArray<z.ZodObject<{
979
- conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
980
- type: z.ZodLiteral<"page_url">;
981
- url: z.ZodString;
982
- }, "strip", z.ZodTypeAny, {
983
- url: string;
984
- type: "page_url";
985
- }, {
986
- url: string;
987
- type: "page_url";
988
- }>, z.ZodObject<{
989
- type: z.ZodLiteral<"route">;
990
- routeId: z.ZodString;
991
- }, "strip", z.ZodTypeAny, {
992
- type: "route";
993
- routeId: string;
994
- }, {
995
- type: "route";
996
- routeId: string;
997
- }>, z.ZodObject<{
998
- type: z.ZodLiteral<"anchor_visible">;
999
- anchorId: z.ZodString;
1000
- state: z.ZodEnum<["visible", "present", "absent"]>;
1001
- }, "strip", z.ZodTypeAny, {
1002
- anchorId: string;
1003
- state: "visible" | "present" | "absent";
1004
- type: "anchor_visible";
1005
- }, {
1006
- anchorId: string;
1007
- state: "visible" | "present" | "absent";
1008
- type: "anchor_visible";
1009
- }>, z.ZodObject<{
1010
- type: z.ZodLiteral<"event_occurred">;
1011
- eventName: z.ZodString;
1012
- withinMs: z.ZodOptional<z.ZodNumber>;
1013
- }, "strip", z.ZodTypeAny, {
1014
- type: "event_occurred";
1015
- eventName: string;
1016
- withinMs?: number | undefined;
1017
- }, {
1018
- type: "event_occurred";
1019
- eventName: string;
1020
- withinMs?: number | undefined;
1021
- }>, z.ZodObject<{
1022
- type: z.ZodLiteral<"state_equals">;
1023
- key: z.ZodString;
1024
- value: z.ZodUnknown;
1025
- }, "strip", z.ZodTypeAny, {
1026
- type: "state_equals";
1027
- key: string;
1028
- value?: unknown;
1029
- }, {
1030
- type: "state_equals";
1031
- key: string;
1032
- value?: unknown;
1033
- }>, z.ZodObject<{
1034
- type: z.ZodLiteral<"viewport">;
1035
- minWidth: z.ZodOptional<z.ZodNumber>;
1036
- maxWidth: z.ZodOptional<z.ZodNumber>;
1037
- minHeight: z.ZodOptional<z.ZodNumber>;
1038
- maxHeight: z.ZodOptional<z.ZodNumber>;
1039
- }, "strip", z.ZodTypeAny, {
1040
- type: "viewport";
1041
- minWidth?: number | undefined;
1042
- maxWidth?: number | undefined;
1043
- minHeight?: number | undefined;
1044
- maxHeight?: number | undefined;
1045
- }, {
1046
- type: "viewport";
1047
- minWidth?: number | undefined;
1048
- maxWidth?: number | undefined;
1049
- minHeight?: number | undefined;
1050
- maxHeight?: number | undefined;
1051
- }>, z.ZodObject<{
1052
- type: z.ZodLiteral<"session_metric">;
1053
- key: z.ZodString;
1054
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1055
- threshold: z.ZodNumber;
1056
- }, "strip", z.ZodTypeAny, {
1057
- type: "session_metric";
1058
- key: string;
1059
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1060
- threshold: number;
1061
- }, {
1062
- type: "session_metric";
1063
- key: string;
1064
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1065
- threshold: number;
1066
- }>, z.ZodObject<{
1067
- type: z.ZodLiteral<"dismissed">;
1068
- key: z.ZodString;
1069
- inverted: z.ZodOptional<z.ZodBoolean>;
1070
- }, "strip", z.ZodTypeAny, {
1071
- type: "dismissed";
1072
- key: string;
1073
- inverted?: boolean | undefined;
1074
- }, {
1075
- type: "dismissed";
1076
- key: string;
1077
- inverted?: boolean | undefined;
1078
- }>, z.ZodObject<{
1079
- type: z.ZodLiteral<"cooldown_active">;
1080
- key: z.ZodString;
1081
- inverted: z.ZodOptional<z.ZodBoolean>;
1082
- }, "strip", z.ZodTypeAny, {
1083
- type: "cooldown_active";
1084
- key: string;
1085
- inverted?: boolean | undefined;
1086
- }, {
1087
- type: "cooldown_active";
1088
- key: string;
1089
- inverted?: boolean | undefined;
1090
- }>, z.ZodObject<{
1091
- type: z.ZodLiteral<"frequency_limit">;
1092
- key: z.ZodString;
1093
- limit: z.ZodNumber;
1094
- inverted: z.ZodOptional<z.ZodBoolean>;
1095
- }, "strip", z.ZodTypeAny, {
1096
- type: "frequency_limit";
1097
- key: string;
1098
- limit: number;
1099
- inverted?: boolean | undefined;
1100
- }, {
1101
- type: "frequency_limit";
1102
- key: string;
1103
- limit: number;
1104
- inverted?: boolean | undefined;
1105
- }>, z.ZodObject<{
1106
- type: z.ZodLiteral<"event_count">;
1107
- key: z.ZodString;
1108
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1109
- count: z.ZodNumber;
1110
- withinMs: z.ZodOptional<z.ZodNumber>;
1111
- }, "strip", z.ZodTypeAny, {
1112
- type: "event_count";
1113
- key: string;
1114
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1115
- count: number;
1116
- withinMs?: number | undefined;
1117
- }, {
1118
- type: "event_count";
1119
- key: string;
1120
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1121
- count: number;
1122
- withinMs?: number | undefined;
1123
- }>]>, "many">;
1124
- value: z.ZodUnknown;
1125
- }, "strip", z.ZodTypeAny, {
1126
- conditions: ({
1127
- url: string;
1128
- type: "page_url";
1129
- } | {
1130
- type: "route";
1131
- routeId: string;
1132
- } | {
1133
- anchorId: string;
1134
- state: "visible" | "present" | "absent";
1135
- type: "anchor_visible";
1136
- } | {
1137
- type: "event_occurred";
1138
- eventName: string;
1139
- withinMs?: number | undefined;
1140
- } | {
1141
- type: "state_equals";
1142
- key: string;
1143
- value?: unknown;
1144
- } | {
1145
- type: "viewport";
1146
- minWidth?: number | undefined;
1147
- maxWidth?: number | undefined;
1148
- minHeight?: number | undefined;
1149
- maxHeight?: number | undefined;
1150
- } | {
1151
- type: "session_metric";
1152
- key: string;
1153
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1154
- threshold: number;
1155
- } | {
1156
- type: "dismissed";
1157
- key: string;
1158
- inverted?: boolean | undefined;
1159
- } | {
1160
- type: "cooldown_active";
1161
- key: string;
1162
- inverted?: boolean | undefined;
1163
- } | {
1164
- type: "frequency_limit";
1165
- key: string;
1166
- limit: number;
1167
- inverted?: boolean | undefined;
1168
- } | {
1169
- type: "event_count";
1170
- key: string;
1171
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1172
- count: number;
1173
- withinMs?: number | undefined;
1174
- })[];
1175
- value?: unknown;
1176
- }, {
1177
- conditions: ({
1178
- url: string;
1179
- type: "page_url";
1180
- } | {
1181
- type: "route";
1182
- routeId: string;
1183
- } | {
1184
- anchorId: string;
1185
- state: "visible" | "present" | "absent";
1186
- type: "anchor_visible";
1187
- } | {
1188
- type: "event_occurred";
1189
- eventName: string;
1190
- withinMs?: number | undefined;
1191
- } | {
1192
- type: "state_equals";
1193
- key: string;
1194
- value?: unknown;
1195
- } | {
1196
- type: "viewport";
1197
- minWidth?: number | undefined;
1198
- maxWidth?: number | undefined;
1199
- minHeight?: number | undefined;
1200
- maxHeight?: number | undefined;
1201
- } | {
1202
- type: "session_metric";
1203
- key: string;
1204
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1205
- threshold: number;
1206
- } | {
1207
- type: "dismissed";
1208
- key: string;
1209
- inverted?: boolean | undefined;
1210
- } | {
1211
- type: "cooldown_active";
1212
- key: string;
1213
- inverted?: boolean | undefined;
1214
- } | {
1215
- type: "frequency_limit";
1216
- key: string;
1217
- limit: number;
1218
- inverted?: boolean | undefined;
1219
- } | {
1220
- type: "event_count";
1221
- key: string;
1222
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1223
- count: number;
1224
- withinMs?: number | undefined;
1225
- })[];
1226
- value?: unknown;
1227
- }>, "many">;
1228
- default: z.ZodUnknown;
1229
- }, "strip", z.ZodTypeAny, {
1230
- type: "rules";
1231
- rules: {
1232
- conditions: ({
1233
- url: string;
1234
- type: "page_url";
1235
- } | {
1236
- type: "route";
1237
- routeId: string;
1238
- } | {
1239
- anchorId: string;
1240
- state: "visible" | "present" | "absent";
1241
- type: "anchor_visible";
1242
- } | {
1243
- type: "event_occurred";
1244
- eventName: string;
1245
- withinMs?: number | undefined;
1246
- } | {
1247
- type: "state_equals";
1248
- key: string;
1249
- value?: unknown;
1250
- } | {
1251
- type: "viewport";
1252
- minWidth?: number | undefined;
1253
- maxWidth?: number | undefined;
1254
- minHeight?: number | undefined;
1255
- maxHeight?: number | undefined;
1256
- } | {
1257
- type: "session_metric";
1258
- key: string;
1259
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1260
- threshold: number;
1261
- } | {
1262
- type: "dismissed";
1263
- key: string;
1264
- inverted?: boolean | undefined;
1265
- } | {
1266
- type: "cooldown_active";
1267
- key: string;
1268
- inverted?: boolean | undefined;
1269
- } | {
1270
- type: "frequency_limit";
1271
- key: string;
1272
- limit: number;
1273
- inverted?: boolean | undefined;
1274
- } | {
1275
- type: "event_count";
1276
- key: string;
1277
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1278
- count: number;
1279
- withinMs?: number | undefined;
1280
- })[];
1281
- value?: unknown;
1282
- }[];
1283
- default?: unknown;
1284
- }, {
1285
- type: "rules";
1286
- rules: {
1287
- conditions: ({
1288
- url: string;
1289
- type: "page_url";
1290
- } | {
1291
- type: "route";
1292
- routeId: string;
1293
- } | {
1294
- anchorId: string;
1295
- state: "visible" | "present" | "absent";
1296
- type: "anchor_visible";
1297
- } | {
1298
- type: "event_occurred";
1299
- eventName: string;
1300
- withinMs?: number | undefined;
1301
- } | {
1302
- type: "state_equals";
1303
- key: string;
1304
- value?: unknown;
1305
- } | {
1306
- type: "viewport";
1307
- minWidth?: number | undefined;
1308
- maxWidth?: number | undefined;
1309
- minHeight?: number | undefined;
1310
- maxHeight?: number | undefined;
1311
- } | {
1312
- type: "session_metric";
1313
- key: string;
1314
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1315
- threshold: number;
1316
- } | {
1317
- type: "dismissed";
1318
- key: string;
1319
- inverted?: boolean | undefined;
1320
- } | {
1321
- type: "cooldown_active";
1322
- key: string;
1323
- inverted?: boolean | undefined;
1324
- } | {
1325
- type: "frequency_limit";
1326
- key: string;
1327
- limit: number;
1328
- inverted?: boolean | undefined;
1329
- } | {
1330
- type: "event_count";
1331
- key: string;
1332
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1333
- count: number;
1334
- withinMs?: number | undefined;
1335
- })[];
1336
- value?: unknown;
1337
- }[];
1338
- default?: unknown;
1339
- }>, z.ZodObject<{
1340
- type: z.ZodLiteral<"score">;
1341
- field: z.ZodString;
1342
- threshold: z.ZodNumber;
1343
- above: z.ZodUnknown;
1344
- below: z.ZodUnknown;
1345
- }, "strip", z.ZodTypeAny, {
1346
- type: "score";
1347
- threshold: number;
1348
- field: string;
1349
- above?: unknown;
1350
- below?: unknown;
1351
- }, {
1352
- type: "score";
1353
- threshold: number;
1354
- field: string;
1355
- above?: unknown;
1356
- below?: unknown;
1357
- }>, z.ZodObject<{
1358
- type: z.ZodLiteral<"model">;
1359
- modelId: z.ZodString;
1360
- inputs: z.ZodArray<z.ZodString, "many">;
1361
- outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1362
- default: z.ZodUnknown;
1363
- }, "strip", z.ZodTypeAny, {
1364
- type: "model";
1365
- modelId: string;
1366
- inputs: string[];
1367
- outputMapping: Record<string, unknown>;
1368
- default?: unknown;
1369
- }, {
1370
- type: "model";
1371
- modelId: string;
1372
- inputs: string[];
1373
- outputMapping: Record<string, unknown>;
1374
- default?: unknown;
1375
- }>, z.ZodObject<{
1376
- type: z.ZodLiteral<"external">;
1377
- endpoint: z.ZodString;
1378
- method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
1379
- default: z.ZodUnknown;
1380
- timeoutMs: z.ZodOptional<z.ZodNumber>;
1381
- }, "strip", z.ZodTypeAny, {
1382
- type: "external";
1383
- endpoint: string;
1384
- timeoutMs?: number | undefined;
1385
- default?: unknown;
1386
- method?: "GET" | "POST" | undefined;
1387
- }, {
1388
- type: "external";
1389
- endpoint: string;
1390
- timeoutMs?: number | undefined;
1391
- default?: unknown;
1392
- method?: "GET" | "POST" | undefined;
1393
- }>]>;
3
+ *
4
+ * Condition and strategy schemas are canonical in @syntrologie/sdk-contracts.
5
+ * This module re-exports them and adds runtime-specific schemas
6
+ * (ActivationConfig, RouteFilter) plus the decisionSchemas array for
7
+ * unified JSON Schema generation.
8
+ */
9
+ import { z } from 'zod';
10
+ export { AnchorVisibleConditionZ, type ConditionSchema, ConditionZ, CooldownActiveConditionZ, CounterDefZ, type DecisionStrategySchema, DecisionStrategyZ, DismissedConditionZ, EventCountConditionZ, EventOccurredConditionZ, ExternalStrategyZ, FrequencyLimitConditionZ, MatchOpZ, ModelStrategyZ, PageUrlConditionZ, RouteConditionZ, type RuleSchema, RuleStrategyZ, RuleZ, ScoreStrategyZ, SessionMetricConditionZ, StateEqualsConditionZ, ViewportConditionZ, } from '@syntrologie/sdk-contracts';
1394
11
  export declare const RouteFilterZ: z.ZodObject<{
1395
12
  include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1396
13
  exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1397
14
  }, "strip", z.ZodTypeAny, {
1398
- exclude?: string[] | undefined;
1399
15
  include?: string[] | undefined;
1400
- }, {
1401
16
  exclude?: string[] | undefined;
17
+ }, {
1402
18
  include?: string[] | undefined;
19
+ exclude?: string[] | undefined;
1403
20
  }>;
1404
21
  export declare const ActivationConfigZ: z.ZodObject<{
1405
22
  routes: z.ZodObject<{
1406
23
  include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1407
24
  exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1408
25
  }, "strip", z.ZodTypeAny, {
1409
- exclude?: string[] | undefined;
1410
26
  include?: string[] | undefined;
1411
- }, {
1412
27
  exclude?: string[] | undefined;
28
+ }, {
1413
29
  include?: string[] | undefined;
30
+ exclude?: string[] | undefined;
1414
31
  }>;
1415
32
  strategy: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1416
33
  type: z.ZodLiteral<"rules">;
@@ -1419,11 +36,11 @@ export declare const ActivationConfigZ: z.ZodObject<{
1419
36
  type: z.ZodLiteral<"page_url">;
1420
37
  url: z.ZodString;
1421
38
  }, "strip", z.ZodTypeAny, {
1422
- url: string;
1423
39
  type: "page_url";
1424
- }, {
1425
40
  url: string;
41
+ }, {
1426
42
  type: "page_url";
43
+ url: string;
1427
44
  }>, z.ZodObject<{
1428
45
  type: z.ZodLiteral<"route">;
1429
46
  routeId: z.ZodString;
@@ -1438,13 +55,13 @@ export declare const ActivationConfigZ: z.ZodObject<{
1438
55
  anchorId: z.ZodString;
1439
56
  state: z.ZodEnum<["visible", "present", "absent"]>;
1440
57
  }, "strip", z.ZodTypeAny, {
58
+ type: "anchor_visible";
1441
59
  anchorId: string;
1442
60
  state: "visible" | "present" | "absent";
1443
- type: "anchor_visible";
1444
61
  }, {
62
+ type: "anchor_visible";
1445
63
  anchorId: string;
1446
64
  state: "visible" | "present" | "absent";
1447
- type: "anchor_visible";
1448
65
  }>, z.ZodObject<{
1449
66
  type: z.ZodLiteral<"event_occurred">;
1450
67
  eventName: z.ZodString;
@@ -1547,31 +164,70 @@ export declare const ActivationConfigZ: z.ZodObject<{
1547
164
  operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1548
165
  count: z.ZodNumber;
1549
166
  withinMs: z.ZodOptional<z.ZodNumber>;
167
+ counter: z.ZodOptional<z.ZodObject<{
168
+ events: z.ZodArray<z.ZodString, "many">;
169
+ match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
170
+ equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
171
+ contains: z.ZodOptional<z.ZodString>;
172
+ }, "strip", z.ZodTypeAny, {
173
+ equals?: string | number | boolean | undefined;
174
+ contains?: string | undefined;
175
+ }, {
176
+ equals?: string | number | boolean | undefined;
177
+ contains?: string | undefined;
178
+ }>>>;
179
+ }, "strip", z.ZodTypeAny, {
180
+ events: string[];
181
+ match?: Record<string, {
182
+ equals?: string | number | boolean | undefined;
183
+ contains?: string | undefined;
184
+ }> | undefined;
185
+ }, {
186
+ events: string[];
187
+ match?: Record<string, {
188
+ equals?: string | number | boolean | undefined;
189
+ contains?: string | undefined;
190
+ }> | undefined;
191
+ }>>;
1550
192
  }, "strip", z.ZodTypeAny, {
1551
193
  type: "event_count";
1552
194
  key: string;
1553
195
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1554
196
  count: number;
1555
197
  withinMs?: number | undefined;
198
+ counter?: {
199
+ events: string[];
200
+ match?: Record<string, {
201
+ equals?: string | number | boolean | undefined;
202
+ contains?: string | undefined;
203
+ }> | undefined;
204
+ } | undefined;
1556
205
  }, {
1557
206
  type: "event_count";
1558
207
  key: string;
1559
208
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1560
209
  count: number;
1561
210
  withinMs?: number | undefined;
211
+ counter?: {
212
+ events: string[];
213
+ match?: Record<string, {
214
+ equals?: string | number | boolean | undefined;
215
+ contains?: string | undefined;
216
+ }> | undefined;
217
+ } | undefined;
1562
218
  }>]>, "many">;
1563
219
  value: z.ZodUnknown;
1564
220
  }, "strip", z.ZodTypeAny, {
1565
221
  conditions: ({
1566
- url: string;
1567
222
  type: "page_url";
223
+ url: string;
1568
224
  } | {
1569
225
  type: "route";
1570
226
  routeId: string;
1571
227
  } | {
228
+ type: "anchor_visible";
1572
229
  anchorId: string;
1573
230
  state: "visible" | "present" | "absent";
1574
- type: "anchor_visible";
1575
231
  } | {
1576
232
  type: "event_occurred";
1577
233
  eventName: string;
@@ -1610,19 +266,26 @@ export declare const ActivationConfigZ: z.ZodObject<{
1610
266
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1611
267
  count: number;
1612
268
  withinMs?: number | undefined;
269
+ counter?: {
270
+ events: string[];
271
+ match?: Record<string, {
272
+ equals?: string | number | boolean | undefined;
273
+ contains?: string | undefined;
274
+ }> | undefined;
275
+ } | undefined;
1613
276
  })[];
1614
277
  value?: unknown;
1615
278
  }, {
1616
279
  conditions: ({
1617
- url: string;
1618
280
  type: "page_url";
281
+ url: string;
1619
282
  } | {
1620
283
  type: "route";
1621
284
  routeId: string;
1622
285
  } | {
286
+ type: "anchor_visible";
1623
287
  anchorId: string;
1624
288
  state: "visible" | "present" | "absent";
1625
- type: "anchor_visible";
1626
289
  } | {
1627
290
  type: "event_occurred";
1628
291
  eventName: string;
@@ -1661,6 +324,13 @@ export declare const ActivationConfigZ: z.ZodObject<{
1661
324
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1662
325
  count: number;
1663
326
  withinMs?: number | undefined;
327
+ counter?: {
328
+ events: string[];
329
+ match?: Record<string, {
330
+ equals?: string | number | boolean | undefined;
331
+ contains?: string | undefined;
332
+ }> | undefined;
333
+ } | undefined;
1664
334
  })[];
1665
335
  value?: unknown;
1666
336
  }>, "many">;
@@ -1669,15 +339,15 @@ export declare const ActivationConfigZ: z.ZodObject<{
1669
339
  type: "rules";
1670
340
  rules: {
1671
341
  conditions: ({
1672
- url: string;
1673
342
  type: "page_url";
343
+ url: string;
1674
344
  } | {
1675
345
  type: "route";
1676
346
  routeId: string;
1677
347
  } | {
348
+ type: "anchor_visible";
1678
349
  anchorId: string;
1679
350
  state: "visible" | "present" | "absent";
1680
- type: "anchor_visible";
1681
351
  } | {
1682
352
  type: "event_occurred";
1683
353
  eventName: string;
@@ -1716,6 +386,13 @@ export declare const ActivationConfigZ: z.ZodObject<{
1716
386
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1717
387
  count: number;
1718
388
  withinMs?: number | undefined;
389
+ counter?: {
390
+ events: string[];
391
+ match?: Record<string, {
392
+ equals?: string | number | boolean | undefined;
393
+ contains?: string | undefined;
394
+ }> | undefined;
395
+ } | undefined;
1719
396
  })[];
1720
397
  value?: unknown;
1721
398
  }[];
@@ -1724,15 +401,15 @@ export declare const ActivationConfigZ: z.ZodObject<{
1724
401
  type: "rules";
1725
402
  rules: {
1726
403
  conditions: ({
1727
- url: string;
1728
404
  type: "page_url";
405
+ url: string;
1729
406
  } | {
1730
407
  type: "route";
1731
408
  routeId: string;
1732
409
  } | {
410
+ type: "anchor_visible";
1733
411
  anchorId: string;
1734
412
  state: "visible" | "present" | "absent";
1735
- type: "anchor_visible";
1736
413
  } | {
1737
414
  type: "event_occurred";
1738
415
  eventName: string;
@@ -1771,6 +448,13 @@ export declare const ActivationConfigZ: z.ZodObject<{
1771
448
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1772
449
  count: number;
1773
450
  withinMs?: number | undefined;
451
+ counter?: {
452
+ events: string[];
453
+ match?: Record<string, {
454
+ equals?: string | number | boolean | undefined;
455
+ contains?: string | undefined;
456
+ }> | undefined;
457
+ } | undefined;
1774
458
  })[];
1775
459
  value?: unknown;
1776
460
  }[];
@@ -1820,34 +504,34 @@ export declare const ActivationConfigZ: z.ZodObject<{
1820
504
  }, "strip", z.ZodTypeAny, {
1821
505
  type: "external";
1822
506
  endpoint: string;
1823
- timeoutMs?: number | undefined;
1824
507
  default?: unknown;
1825
508
  method?: "GET" | "POST" | undefined;
509
+ timeoutMs?: number | undefined;
1826
510
  }, {
1827
511
  type: "external";
1828
512
  endpoint: string;
1829
- timeoutMs?: number | undefined;
1830
513
  default?: unknown;
1831
514
  method?: "GET" | "POST" | undefined;
515
+ timeoutMs?: number | undefined;
1832
516
  }>]>>;
1833
517
  }, "strip", z.ZodTypeAny, {
1834
518
  routes: {
1835
- exclude?: string[] | undefined;
1836
519
  include?: string[] | undefined;
520
+ exclude?: string[] | undefined;
1837
521
  };
1838
522
  strategy?: {
1839
523
  type: "rules";
1840
524
  rules: {
1841
525
  conditions: ({
1842
- url: string;
1843
526
  type: "page_url";
527
+ url: string;
1844
528
  } | {
1845
529
  type: "route";
1846
530
  routeId: string;
1847
531
  } | {
532
+ type: "anchor_visible";
1848
533
  anchorId: string;
1849
534
  state: "visible" | "present" | "absent";
1850
- type: "anchor_visible";
1851
535
  } | {
1852
536
  type: "event_occurred";
1853
537
  eventName: string;
@@ -1886,6 +570,13 @@ export declare const ActivationConfigZ: z.ZodObject<{
1886
570
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1887
571
  count: number;
1888
572
  withinMs?: number | undefined;
573
+ counter?: {
574
+ events: string[];
575
+ match?: Record<string, {
576
+ equals?: string | number | boolean | undefined;
577
+ contains?: string | undefined;
578
+ }> | undefined;
579
+ } | undefined;
1889
580
  })[];
1890
581
  value?: unknown;
1891
582
  }[];
@@ -1905,28 +596,28 @@ export declare const ActivationConfigZ: z.ZodObject<{
1905
596
  } | {
1906
597
  type: "external";
1907
598
  endpoint: string;
1908
- timeoutMs?: number | undefined;
1909
599
  default?: unknown;
1910
600
  method?: "GET" | "POST" | undefined;
601
+ timeoutMs?: number | undefined;
1911
602
  } | undefined;
1912
603
  }, {
1913
604
  routes: {
1914
- exclude?: string[] | undefined;
1915
605
  include?: string[] | undefined;
606
+ exclude?: string[] | undefined;
1916
607
  };
1917
608
  strategy?: {
1918
609
  type: "rules";
1919
610
  rules: {
1920
611
  conditions: ({
1921
- url: string;
1922
612
  type: "page_url";
613
+ url: string;
1923
614
  } | {
1924
615
  type: "route";
1925
616
  routeId: string;
1926
617
  } | {
618
+ type: "anchor_visible";
1927
619
  anchorId: string;
1928
620
  state: "visible" | "present" | "absent";
1929
- type: "anchor_visible";
1930
621
  } | {
1931
622
  type: "event_occurred";
1932
623
  eventName: string;
@@ -1965,6 +656,13 @@ export declare const ActivationConfigZ: z.ZodObject<{
1965
656
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1966
657
  count: number;
1967
658
  withinMs?: number | undefined;
659
+ counter?: {
660
+ events: string[];
661
+ match?: Record<string, {
662
+ equals?: string | number | boolean | undefined;
663
+ contains?: string | undefined;
664
+ }> | undefined;
665
+ } | undefined;
1968
666
  })[];
1969
667
  value?: unknown;
1970
668
  }[];
@@ -1984,24 +682,24 @@ export declare const ActivationConfigZ: z.ZodObject<{
1984
682
  } | {
1985
683
  type: "external";
1986
684
  endpoint: string;
1987
- timeoutMs?: number | undefined;
1988
685
  default?: unknown;
1989
686
  method?: "GET" | "POST" | undefined;
687
+ timeoutMs?: number | undefined;
1990
688
  } | undefined;
1991
689
  }>;
1992
690
  /**
1993
691
  * Validate a Condition object.
1994
692
  */
1995
693
  export declare function validateCondition(data: unknown): z.SafeParseReturnType<{
1996
- url: string;
1997
694
  type: "page_url";
695
+ url: string;
1998
696
  } | {
1999
697
  type: "route";
2000
698
  routeId: string;
2001
699
  } | {
700
+ type: "anchor_visible";
2002
701
  anchorId: string;
2003
702
  state: "visible" | "present" | "absent";
2004
- type: "anchor_visible";
2005
703
  } | {
2006
704
  type: "event_occurred";
2007
705
  eventName: string;
@@ -2040,16 +738,23 @@ export declare function validateCondition(data: unknown): z.SafeParseReturnType<
2040
738
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2041
739
  count: number;
2042
740
  withinMs?: number | undefined;
741
+ counter?: {
742
+ events: string[];
743
+ match?: Record<string, {
744
+ equals?: string | number | boolean | undefined;
745
+ contains?: string | undefined;
746
+ }> | undefined;
747
+ } | undefined;
2043
748
  }, {
2044
- url: string;
2045
749
  type: "page_url";
750
+ url: string;
2046
751
  } | {
2047
752
  type: "route";
2048
753
  routeId: string;
2049
754
  } | {
755
+ type: "anchor_visible";
2050
756
  anchorId: string;
2051
757
  state: "visible" | "present" | "absent";
2052
- type: "anchor_visible";
2053
758
  } | {
2054
759
  type: "event_occurred";
2055
760
  eventName: string;
@@ -2088,6 +793,13 @@ export declare function validateCondition(data: unknown): z.SafeParseReturnType<
2088
793
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2089
794
  count: number;
2090
795
  withinMs?: number | undefined;
796
+ counter?: {
797
+ events: string[];
798
+ match?: Record<string, {
799
+ equals?: string | number | boolean | undefined;
800
+ contains?: string | undefined;
801
+ }> | undefined;
802
+ } | undefined;
2091
803
  }>;
2092
804
  /**
2093
805
  * Validate a DecisionStrategy object.
@@ -2096,15 +808,15 @@ export declare function validateStrategy(data: unknown): z.SafeParseReturnType<{
2096
808
  type: "rules";
2097
809
  rules: {
2098
810
  conditions: ({
2099
- url: string;
2100
811
  type: "page_url";
812
+ url: string;
2101
813
  } | {
2102
814
  type: "route";
2103
815
  routeId: string;
2104
816
  } | {
817
+ type: "anchor_visible";
2105
818
  anchorId: string;
2106
819
  state: "visible" | "present" | "absent";
2107
- type: "anchor_visible";
2108
820
  } | {
2109
821
  type: "event_occurred";
2110
822
  eventName: string;
@@ -2143,6 +855,13 @@ export declare function validateStrategy(data: unknown): z.SafeParseReturnType<{
2143
855
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2144
856
  count: number;
2145
857
  withinMs?: number | undefined;
858
+ counter?: {
859
+ events: string[];
860
+ match?: Record<string, {
861
+ equals?: string | number | boolean | undefined;
862
+ contains?: string | undefined;
863
+ }> | undefined;
864
+ } | undefined;
2146
865
  })[];
2147
866
  value?: unknown;
2148
867
  }[];
@@ -2162,22 +881,22 @@ export declare function validateStrategy(data: unknown): z.SafeParseReturnType<{
2162
881
  } | {
2163
882
  type: "external";
2164
883
  endpoint: string;
2165
- timeoutMs?: number | undefined;
2166
884
  default?: unknown;
2167
885
  method?: "GET" | "POST" | undefined;
886
+ timeoutMs?: number | undefined;
2168
887
  }, {
2169
888
  type: "rules";
2170
889
  rules: {
2171
890
  conditions: ({
2172
- url: string;
2173
891
  type: "page_url";
892
+ url: string;
2174
893
  } | {
2175
894
  type: "route";
2176
895
  routeId: string;
2177
896
  } | {
897
+ type: "anchor_visible";
2178
898
  anchorId: string;
2179
899
  state: "visible" | "present" | "absent";
2180
- type: "anchor_visible";
2181
900
  } | {
2182
901
  type: "event_occurred";
2183
902
  eventName: string;
@@ -2216,6 +935,13 @@ export declare function validateStrategy(data: unknown): z.SafeParseReturnType<{
2216
935
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2217
936
  count: number;
2218
937
  withinMs?: number | undefined;
938
+ counter?: {
939
+ events: string[];
940
+ match?: Record<string, {
941
+ equals?: string | number | boolean | undefined;
942
+ contains?: string | undefined;
943
+ }> | undefined;
944
+ } | undefined;
2219
945
  })[];
2220
946
  value?: unknown;
2221
947
  }[];
@@ -2235,31 +961,31 @@ export declare function validateStrategy(data: unknown): z.SafeParseReturnType<{
2235
961
  } | {
2236
962
  type: "external";
2237
963
  endpoint: string;
2238
- timeoutMs?: number | undefined;
2239
964
  default?: unknown;
2240
965
  method?: "GET" | "POST" | undefined;
966
+ timeoutMs?: number | undefined;
2241
967
  }>;
2242
968
  /**
2243
969
  * Validate an ActivationConfig object.
2244
970
  */
2245
971
  export declare function validateActivationConfig(data: unknown): z.SafeParseReturnType<{
2246
972
  routes: {
2247
- exclude?: string[] | undefined;
2248
973
  include?: string[] | undefined;
974
+ exclude?: string[] | undefined;
2249
975
  };
2250
976
  strategy?: {
2251
977
  type: "rules";
2252
978
  rules: {
2253
979
  conditions: ({
2254
- url: string;
2255
980
  type: "page_url";
981
+ url: string;
2256
982
  } | {
2257
983
  type: "route";
2258
984
  routeId: string;
2259
985
  } | {
986
+ type: "anchor_visible";
2260
987
  anchorId: string;
2261
988
  state: "visible" | "present" | "absent";
2262
- type: "anchor_visible";
2263
989
  } | {
2264
990
  type: "event_occurred";
2265
991
  eventName: string;
@@ -2298,6 +1024,13 @@ export declare function validateActivationConfig(data: unknown): z.SafeParseRetu
2298
1024
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2299
1025
  count: number;
2300
1026
  withinMs?: number | undefined;
1027
+ counter?: {
1028
+ events: string[];
1029
+ match?: Record<string, {
1030
+ equals?: string | number | boolean | undefined;
1031
+ contains?: string | undefined;
1032
+ }> | undefined;
1033
+ } | undefined;
2301
1034
  })[];
2302
1035
  value?: unknown;
2303
1036
  }[];
@@ -2317,28 +1050,28 @@ export declare function validateActivationConfig(data: unknown): z.SafeParseRetu
2317
1050
  } | {
2318
1051
  type: "external";
2319
1052
  endpoint: string;
2320
- timeoutMs?: number | undefined;
2321
1053
  default?: unknown;
2322
1054
  method?: "GET" | "POST" | undefined;
1055
+ timeoutMs?: number | undefined;
2323
1056
  } | undefined;
2324
1057
  }, {
2325
1058
  routes: {
2326
- exclude?: string[] | undefined;
2327
1059
  include?: string[] | undefined;
1060
+ exclude?: string[] | undefined;
2328
1061
  };
2329
1062
  strategy?: {
2330
1063
  type: "rules";
2331
1064
  rules: {
2332
1065
  conditions: ({
2333
- url: string;
2334
1066
  type: "page_url";
1067
+ url: string;
2335
1068
  } | {
2336
1069
  type: "route";
2337
1070
  routeId: string;
2338
1071
  } | {
1072
+ type: "anchor_visible";
2339
1073
  anchorId: string;
2340
1074
  state: "visible" | "present" | "absent";
2341
- type: "anchor_visible";
2342
1075
  } | {
2343
1076
  type: "event_occurred";
2344
1077
  eventName: string;
@@ -2377,6 +1110,13 @@ export declare function validateActivationConfig(data: unknown): z.SafeParseRetu
2377
1110
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2378
1111
  count: number;
2379
1112
  withinMs?: number | undefined;
1113
+ counter?: {
1114
+ events: string[];
1115
+ match?: Record<string, {
1116
+ equals?: string | number | boolean | undefined;
1117
+ contains?: string | undefined;
1118
+ }> | undefined;
1119
+ } | undefined;
2380
1120
  })[];
2381
1121
  value?: unknown;
2382
1122
  }[];
@@ -2396,9 +1136,9 @@ export declare function validateActivationConfig(data: unknown): z.SafeParseRetu
2396
1136
  } | {
2397
1137
  type: "external";
2398
1138
  endpoint: string;
2399
- timeoutMs?: number | undefined;
2400
1139
  default?: unknown;
2401
1140
  method?: "GET" | "POST" | undefined;
1141
+ timeoutMs?: number | undefined;
2402
1142
  } | undefined;
2403
1143
  }>;
2404
1144
  /**
@@ -2409,17 +1149,56 @@ export declare function validateActivationConfig(data: unknown): z.SafeParseRetu
2409
1149
  * the generator builds from $refs to the four strategy defs.
2410
1150
  */
2411
1151
  export declare const decisionSchemas: ({
1152
+ defName: string;
1153
+ schema: z.ZodObject<{
1154
+ equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1155
+ contains: z.ZodOptional<z.ZodString>;
1156
+ }, "strip", z.ZodTypeAny, {
1157
+ equals?: string | number | boolean | undefined;
1158
+ contains?: string | undefined;
1159
+ }, {
1160
+ equals?: string | number | boolean | undefined;
1161
+ contains?: string | undefined;
1162
+ }>;
1163
+ } | {
1164
+ defName: string;
1165
+ schema: z.ZodObject<{
1166
+ events: z.ZodArray<z.ZodString, "many">;
1167
+ match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1168
+ equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1169
+ contains: z.ZodOptional<z.ZodString>;
1170
+ }, "strip", z.ZodTypeAny, {
1171
+ equals?: string | number | boolean | undefined;
1172
+ contains?: string | undefined;
1173
+ }, {
1174
+ equals?: string | number | boolean | undefined;
1175
+ contains?: string | undefined;
1176
+ }>>>;
1177
+ }, "strip", z.ZodTypeAny, {
1178
+ events: string[];
1179
+ match?: Record<string, {
1180
+ equals?: string | number | boolean | undefined;
1181
+ contains?: string | undefined;
1182
+ }> | undefined;
1183
+ }, {
1184
+ events: string[];
1185
+ match?: Record<string, {
1186
+ equals?: string | number | boolean | undefined;
1187
+ contains?: string | undefined;
1188
+ }> | undefined;
1189
+ }>;
1190
+ } | {
2412
1191
  defName: string;
2413
1192
  schema: z.ZodObject<{
2414
1193
  routes: z.ZodObject<{
2415
1194
  include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2416
1195
  exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2417
1196
  }, "strip", z.ZodTypeAny, {
2418
- exclude?: string[] | undefined;
2419
1197
  include?: string[] | undefined;
2420
- }, {
2421
1198
  exclude?: string[] | undefined;
1199
+ }, {
2422
1200
  include?: string[] | undefined;
1201
+ exclude?: string[] | undefined;
2423
1202
  }>;
2424
1203
  strategy: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2425
1204
  type: z.ZodLiteral<"rules">;
@@ -2428,11 +1207,11 @@ export declare const decisionSchemas: ({
2428
1207
  type: z.ZodLiteral<"page_url">;
2429
1208
  url: z.ZodString;
2430
1209
  }, "strip", z.ZodTypeAny, {
2431
- url: string;
2432
1210
  type: "page_url";
2433
- }, {
2434
1211
  url: string;
1212
+ }, {
2435
1213
  type: "page_url";
1214
+ url: string;
2436
1215
  }>, z.ZodObject<{
2437
1216
  type: z.ZodLiteral<"route">;
2438
1217
  routeId: z.ZodString;
@@ -2447,13 +1226,13 @@ export declare const decisionSchemas: ({
2447
1226
  anchorId: z.ZodString;
2448
1227
  state: z.ZodEnum<["visible", "present", "absent"]>;
2449
1228
  }, "strip", z.ZodTypeAny, {
1229
+ type: "anchor_visible";
2450
1230
  anchorId: string;
2451
1231
  state: "visible" | "present" | "absent";
2452
- type: "anchor_visible";
2453
1232
  }, {
1233
+ type: "anchor_visible";
2454
1234
  anchorId: string;
2455
1235
  state: "visible" | "present" | "absent";
2456
- type: "anchor_visible";
2457
1236
  }>, z.ZodObject<{
2458
1237
  type: z.ZodLiteral<"event_occurred">;
2459
1238
  eventName: z.ZodString;
@@ -2556,31 +1335,70 @@ export declare const decisionSchemas: ({
2556
1335
  operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
2557
1336
  count: z.ZodNumber;
2558
1337
  withinMs: z.ZodOptional<z.ZodNumber>;
1338
+ counter: z.ZodOptional<z.ZodObject<{
1339
+ events: z.ZodArray<z.ZodString, "many">;
1340
+ match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1341
+ equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1342
+ contains: z.ZodOptional<z.ZodString>;
1343
+ }, "strip", z.ZodTypeAny, {
1344
+ equals?: string | number | boolean | undefined;
1345
+ contains?: string | undefined;
1346
+ }, {
1347
+ equals?: string | number | boolean | undefined;
1348
+ contains?: string | undefined;
1349
+ }>>>;
1350
+ }, "strip", z.ZodTypeAny, {
1351
+ events: string[];
1352
+ match?: Record<string, {
1353
+ equals?: string | number | boolean | undefined;
1354
+ contains?: string | undefined;
1355
+ }> | undefined;
1356
+ }, {
1357
+ events: string[];
1358
+ match?: Record<string, {
1359
+ equals?: string | number | boolean | undefined;
1360
+ contains?: string | undefined;
1361
+ }> | undefined;
1362
+ }>>;
2559
1363
  }, "strip", z.ZodTypeAny, {
2560
1364
  type: "event_count";
2561
1365
  key: string;
2562
1366
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2563
1367
  count: number;
2564
1368
  withinMs?: number | undefined;
1369
+ counter?: {
1370
+ events: string[];
1371
+ match?: Record<string, {
1372
+ equals?: string | number | boolean | undefined;
1373
+ contains?: string | undefined;
1374
+ }> | undefined;
1375
+ } | undefined;
2565
1376
  }, {
2566
1377
  type: "event_count";
2567
1378
  key: string;
2568
1379
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2569
1380
  count: number;
2570
1381
  withinMs?: number | undefined;
1382
+ counter?: {
1383
+ events: string[];
1384
+ match?: Record<string, {
1385
+ equals?: string | number | boolean | undefined;
1386
+ contains?: string | undefined;
1387
+ }> | undefined;
1388
+ } | undefined;
2571
1389
  }>]>, "many">;
2572
1390
  value: z.ZodUnknown;
2573
1391
  }, "strip", z.ZodTypeAny, {
2574
1392
  conditions: ({
2575
- url: string;
2576
1393
  type: "page_url";
1394
+ url: string;
2577
1395
  } | {
2578
1396
  type: "route";
2579
1397
  routeId: string;
2580
1398
  } | {
1399
+ type: "anchor_visible";
2581
1400
  anchorId: string;
2582
1401
  state: "visible" | "present" | "absent";
2583
- type: "anchor_visible";
2584
1402
  } | {
2585
1403
  type: "event_occurred";
2586
1404
  eventName: string;
@@ -2619,19 +1437,26 @@ export declare const decisionSchemas: ({
2619
1437
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2620
1438
  count: number;
2621
1439
  withinMs?: number | undefined;
1440
+ counter?: {
1441
+ events: string[];
1442
+ match?: Record<string, {
1443
+ equals?: string | number | boolean | undefined;
1444
+ contains?: string | undefined;
1445
+ }> | undefined;
1446
+ } | undefined;
2622
1447
  })[];
2623
1448
  value?: unknown;
2624
1449
  }, {
2625
1450
  conditions: ({
2626
- url: string;
2627
1451
  type: "page_url";
1452
+ url: string;
2628
1453
  } | {
2629
1454
  type: "route";
2630
1455
  routeId: string;
2631
1456
  } | {
1457
+ type: "anchor_visible";
2632
1458
  anchorId: string;
2633
1459
  state: "visible" | "present" | "absent";
2634
- type: "anchor_visible";
2635
1460
  } | {
2636
1461
  type: "event_occurred";
2637
1462
  eventName: string;
@@ -2670,6 +1495,13 @@ export declare const decisionSchemas: ({
2670
1495
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2671
1496
  count: number;
2672
1497
  withinMs?: number | undefined;
1498
+ counter?: {
1499
+ events: string[];
1500
+ match?: Record<string, {
1501
+ equals?: string | number | boolean | undefined;
1502
+ contains?: string | undefined;
1503
+ }> | undefined;
1504
+ } | undefined;
2673
1505
  })[];
2674
1506
  value?: unknown;
2675
1507
  }>, "many">;
@@ -2678,15 +1510,15 @@ export declare const decisionSchemas: ({
2678
1510
  type: "rules";
2679
1511
  rules: {
2680
1512
  conditions: ({
2681
- url: string;
2682
1513
  type: "page_url";
1514
+ url: string;
2683
1515
  } | {
2684
1516
  type: "route";
2685
1517
  routeId: string;
2686
1518
  } | {
1519
+ type: "anchor_visible";
2687
1520
  anchorId: string;
2688
1521
  state: "visible" | "present" | "absent";
2689
- type: "anchor_visible";
2690
1522
  } | {
2691
1523
  type: "event_occurred";
2692
1524
  eventName: string;
@@ -2725,6 +1557,13 @@ export declare const decisionSchemas: ({
2725
1557
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2726
1558
  count: number;
2727
1559
  withinMs?: number | undefined;
1560
+ counter?: {
1561
+ events: string[];
1562
+ match?: Record<string, {
1563
+ equals?: string | number | boolean | undefined;
1564
+ contains?: string | undefined;
1565
+ }> | undefined;
1566
+ } | undefined;
2728
1567
  })[];
2729
1568
  value?: unknown;
2730
1569
  }[];
@@ -2733,15 +1572,15 @@ export declare const decisionSchemas: ({
2733
1572
  type: "rules";
2734
1573
  rules: {
2735
1574
  conditions: ({
2736
- url: string;
2737
1575
  type: "page_url";
1576
+ url: string;
2738
1577
  } | {
2739
1578
  type: "route";
2740
1579
  routeId: string;
2741
1580
  } | {
1581
+ type: "anchor_visible";
2742
1582
  anchorId: string;
2743
1583
  state: "visible" | "present" | "absent";
2744
- type: "anchor_visible";
2745
1584
  } | {
2746
1585
  type: "event_occurred";
2747
1586
  eventName: string;
@@ -2780,6 +1619,13 @@ export declare const decisionSchemas: ({
2780
1619
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2781
1620
  count: number;
2782
1621
  withinMs?: number | undefined;
1622
+ counter?: {
1623
+ events: string[];
1624
+ match?: Record<string, {
1625
+ equals?: string | number | boolean | undefined;
1626
+ contains?: string | undefined;
1627
+ }> | undefined;
1628
+ } | undefined;
2783
1629
  })[];
2784
1630
  value?: unknown;
2785
1631
  }[];
@@ -2829,34 +1675,34 @@ export declare const decisionSchemas: ({
2829
1675
  }, "strip", z.ZodTypeAny, {
2830
1676
  type: "external";
2831
1677
  endpoint: string;
2832
- timeoutMs?: number | undefined;
2833
1678
  default?: unknown;
2834
1679
  method?: "GET" | "POST" | undefined;
1680
+ timeoutMs?: number | undefined;
2835
1681
  }, {
2836
1682
  type: "external";
2837
1683
  endpoint: string;
2838
- timeoutMs?: number | undefined;
2839
1684
  default?: unknown;
2840
1685
  method?: "GET" | "POST" | undefined;
1686
+ timeoutMs?: number | undefined;
2841
1687
  }>]>>;
2842
1688
  }, "strip", z.ZodTypeAny, {
2843
1689
  routes: {
2844
- exclude?: string[] | undefined;
2845
1690
  include?: string[] | undefined;
1691
+ exclude?: string[] | undefined;
2846
1692
  };
2847
1693
  strategy?: {
2848
1694
  type: "rules";
2849
1695
  rules: {
2850
1696
  conditions: ({
2851
- url: string;
2852
1697
  type: "page_url";
1698
+ url: string;
2853
1699
  } | {
2854
1700
  type: "route";
2855
1701
  routeId: string;
2856
1702
  } | {
1703
+ type: "anchor_visible";
2857
1704
  anchorId: string;
2858
1705
  state: "visible" | "present" | "absent";
2859
- type: "anchor_visible";
2860
1706
  } | {
2861
1707
  type: "event_occurred";
2862
1708
  eventName: string;
@@ -2895,6 +1741,13 @@ export declare const decisionSchemas: ({
2895
1741
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2896
1742
  count: number;
2897
1743
  withinMs?: number | undefined;
1744
+ counter?: {
1745
+ events: string[];
1746
+ match?: Record<string, {
1747
+ equals?: string | number | boolean | undefined;
1748
+ contains?: string | undefined;
1749
+ }> | undefined;
1750
+ } | undefined;
2898
1751
  })[];
2899
1752
  value?: unknown;
2900
1753
  }[];
@@ -2914,28 +1767,28 @@ export declare const decisionSchemas: ({
2914
1767
  } | {
2915
1768
  type: "external";
2916
1769
  endpoint: string;
2917
- timeoutMs?: number | undefined;
2918
1770
  default?: unknown;
2919
1771
  method?: "GET" | "POST" | undefined;
1772
+ timeoutMs?: number | undefined;
2920
1773
  } | undefined;
2921
1774
  }, {
2922
1775
  routes: {
2923
- exclude?: string[] | undefined;
2924
1776
  include?: string[] | undefined;
1777
+ exclude?: string[] | undefined;
2925
1778
  };
2926
1779
  strategy?: {
2927
1780
  type: "rules";
2928
1781
  rules: {
2929
1782
  conditions: ({
2930
- url: string;
2931
1783
  type: "page_url";
1784
+ url: string;
2932
1785
  } | {
2933
1786
  type: "route";
2934
1787
  routeId: string;
2935
1788
  } | {
1789
+ type: "anchor_visible";
2936
1790
  anchorId: string;
2937
1791
  state: "visible" | "present" | "absent";
2938
- type: "anchor_visible";
2939
1792
  } | {
2940
1793
  type: "event_occurred";
2941
1794
  eventName: string;
@@ -2974,6 +1827,13 @@ export declare const decisionSchemas: ({
2974
1827
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2975
1828
  count: number;
2976
1829
  withinMs?: number | undefined;
1830
+ counter?: {
1831
+ events: string[];
1832
+ match?: Record<string, {
1833
+ equals?: string | number | boolean | undefined;
1834
+ contains?: string | undefined;
1835
+ }> | undefined;
1836
+ } | undefined;
2977
1837
  })[];
2978
1838
  value?: unknown;
2979
1839
  }[];
@@ -2993,9 +1853,9 @@ export declare const decisionSchemas: ({
2993
1853
  } | {
2994
1854
  type: "external";
2995
1855
  endpoint: string;
2996
- timeoutMs?: number | undefined;
2997
1856
  default?: unknown;
2998
1857
  method?: "GET" | "POST" | undefined;
1858
+ timeoutMs?: number | undefined;
2999
1859
  } | undefined;
3000
1860
  }>;
3001
1861
  } | {
@@ -3004,11 +1864,11 @@ export declare const decisionSchemas: ({
3004
1864
  include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3005
1865
  exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3006
1866
  }, "strip", z.ZodTypeAny, {
3007
- exclude?: string[] | undefined;
3008
1867
  include?: string[] | undefined;
3009
- }, {
3010
1868
  exclude?: string[] | undefined;
1869
+ }, {
3011
1870
  include?: string[] | undefined;
1871
+ exclude?: string[] | undefined;
3012
1872
  }>;
3013
1873
  } | {
3014
1874
  defName: string;
@@ -3019,11 +1879,11 @@ export declare const decisionSchemas: ({
3019
1879
  type: z.ZodLiteral<"page_url">;
3020
1880
  url: z.ZodString;
3021
1881
  }, "strip", z.ZodTypeAny, {
3022
- url: string;
3023
1882
  type: "page_url";
3024
- }, {
3025
1883
  url: string;
1884
+ }, {
3026
1885
  type: "page_url";
1886
+ url: string;
3027
1887
  }>, z.ZodObject<{
3028
1888
  type: z.ZodLiteral<"route">;
3029
1889
  routeId: z.ZodString;
@@ -3038,13 +1898,13 @@ export declare const decisionSchemas: ({
3038
1898
  anchorId: z.ZodString;
3039
1899
  state: z.ZodEnum<["visible", "present", "absent"]>;
3040
1900
  }, "strip", z.ZodTypeAny, {
1901
+ type: "anchor_visible";
3041
1902
  anchorId: string;
3042
1903
  state: "visible" | "present" | "absent";
3043
- type: "anchor_visible";
3044
1904
  }, {
1905
+ type: "anchor_visible";
3045
1906
  anchorId: string;
3046
1907
  state: "visible" | "present" | "absent";
3047
- type: "anchor_visible";
3048
1908
  }>, z.ZodObject<{
3049
1909
  type: z.ZodLiteral<"event_occurred">;
3050
1910
  eventName: z.ZodString;
@@ -3147,31 +2007,70 @@ export declare const decisionSchemas: ({
3147
2007
  operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
3148
2008
  count: z.ZodNumber;
3149
2009
  withinMs: z.ZodOptional<z.ZodNumber>;
2010
+ counter: z.ZodOptional<z.ZodObject<{
2011
+ events: z.ZodArray<z.ZodString, "many">;
2012
+ match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2013
+ equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
2014
+ contains: z.ZodOptional<z.ZodString>;
2015
+ }, "strip", z.ZodTypeAny, {
2016
+ equals?: string | number | boolean | undefined;
2017
+ contains?: string | undefined;
2018
+ }, {
2019
+ equals?: string | number | boolean | undefined;
2020
+ contains?: string | undefined;
2021
+ }>>>;
2022
+ }, "strip", z.ZodTypeAny, {
2023
+ events: string[];
2024
+ match?: Record<string, {
2025
+ equals?: string | number | boolean | undefined;
2026
+ contains?: string | undefined;
2027
+ }> | undefined;
2028
+ }, {
2029
+ events: string[];
2030
+ match?: Record<string, {
2031
+ equals?: string | number | boolean | undefined;
2032
+ contains?: string | undefined;
2033
+ }> | undefined;
2034
+ }>>;
3150
2035
  }, "strip", z.ZodTypeAny, {
3151
2036
  type: "event_count";
3152
2037
  key: string;
3153
2038
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
3154
2039
  count: number;
3155
2040
  withinMs?: number | undefined;
2041
+ counter?: {
2042
+ events: string[];
2043
+ match?: Record<string, {
2044
+ equals?: string | number | boolean | undefined;
2045
+ contains?: string | undefined;
2046
+ }> | undefined;
2047
+ } | undefined;
3156
2048
  }, {
3157
2049
  type: "event_count";
3158
2050
  key: string;
3159
2051
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
3160
2052
  count: number;
3161
2053
  withinMs?: number | undefined;
2054
+ counter?: {
2055
+ events: string[];
2056
+ match?: Record<string, {
2057
+ equals?: string | number | boolean | undefined;
2058
+ contains?: string | undefined;
2059
+ }> | undefined;
2060
+ } | undefined;
3162
2061
  }>]>, "many">;
3163
2062
  value: z.ZodUnknown;
3164
2063
  }, "strip", z.ZodTypeAny, {
3165
2064
  conditions: ({
3166
- url: string;
3167
2065
  type: "page_url";
2066
+ url: string;
3168
2067
  } | {
3169
2068
  type: "route";
3170
2069
  routeId: string;
3171
2070
  } | {
2071
+ type: "anchor_visible";
3172
2072
  anchorId: string;
3173
2073
  state: "visible" | "present" | "absent";
3174
- type: "anchor_visible";
3175
2074
  } | {
3176
2075
  type: "event_occurred";
3177
2076
  eventName: string;
@@ -3210,19 +2109,26 @@ export declare const decisionSchemas: ({
3210
2109
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
3211
2110
  count: number;
3212
2111
  withinMs?: number | undefined;
2112
+ counter?: {
2113
+ events: string[];
2114
+ match?: Record<string, {
2115
+ equals?: string | number | boolean | undefined;
2116
+ contains?: string | undefined;
2117
+ }> | undefined;
2118
+ } | undefined;
3213
2119
  })[];
3214
2120
  value?: unknown;
3215
2121
  }, {
3216
2122
  conditions: ({
3217
- url: string;
3218
2123
  type: "page_url";
2124
+ url: string;
3219
2125
  } | {
3220
2126
  type: "route";
3221
2127
  routeId: string;
3222
2128
  } | {
2129
+ type: "anchor_visible";
3223
2130
  anchorId: string;
3224
2131
  state: "visible" | "present" | "absent";
3225
- type: "anchor_visible";
3226
2132
  } | {
3227
2133
  type: "event_occurred";
3228
2134
  eventName: string;
@@ -3261,6 +2167,13 @@ export declare const decisionSchemas: ({
3261
2167
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
3262
2168
  count: number;
3263
2169
  withinMs?: number | undefined;
2170
+ counter?: {
2171
+ events: string[];
2172
+ match?: Record<string, {
2173
+ equals?: string | number | boolean | undefined;
2174
+ contains?: string | undefined;
2175
+ }> | undefined;
2176
+ } | undefined;
3264
2177
  })[];
3265
2178
  value?: unknown;
3266
2179
  }>, "many">;
@@ -3269,15 +2182,15 @@ export declare const decisionSchemas: ({
3269
2182
  type: "rules";
3270
2183
  rules: {
3271
2184
  conditions: ({
3272
- url: string;
3273
2185
  type: "page_url";
2186
+ url: string;
3274
2187
  } | {
3275
2188
  type: "route";
3276
2189
  routeId: string;
3277
2190
  } | {
2191
+ type: "anchor_visible";
3278
2192
  anchorId: string;
3279
2193
  state: "visible" | "present" | "absent";
3280
- type: "anchor_visible";
3281
2194
  } | {
3282
2195
  type: "event_occurred";
3283
2196
  eventName: string;
@@ -3316,6 +2229,13 @@ export declare const decisionSchemas: ({
3316
2229
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
3317
2230
  count: number;
3318
2231
  withinMs?: number | undefined;
2232
+ counter?: {
2233
+ events: string[];
2234
+ match?: Record<string, {
2235
+ equals?: string | number | boolean | undefined;
2236
+ contains?: string | undefined;
2237
+ }> | undefined;
2238
+ } | undefined;
3319
2239
  })[];
3320
2240
  value?: unknown;
3321
2241
  }[];
@@ -3324,15 +2244,15 @@ export declare const decisionSchemas: ({
3324
2244
  type: "rules";
3325
2245
  rules: {
3326
2246
  conditions: ({
3327
- url: string;
3328
2247
  type: "page_url";
2248
+ url: string;
3329
2249
  } | {
3330
2250
  type: "route";
3331
2251
  routeId: string;
3332
2252
  } | {
2253
+ type: "anchor_visible";
3333
2254
  anchorId: string;
3334
2255
  state: "visible" | "present" | "absent";
3335
- type: "anchor_visible";
3336
2256
  } | {
3337
2257
  type: "event_occurred";
3338
2258
  eventName: string;
@@ -3371,6 +2291,13 @@ export declare const decisionSchemas: ({
3371
2291
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
3372
2292
  count: number;
3373
2293
  withinMs?: number | undefined;
2294
+ counter?: {
2295
+ events: string[];
2296
+ match?: Record<string, {
2297
+ equals?: string | number | boolean | undefined;
2298
+ contains?: string | undefined;
2299
+ }> | undefined;
2300
+ } | undefined;
3374
2301
  })[];
3375
2302
  value?: unknown;
3376
2303
  }[];
@@ -3429,15 +2356,15 @@ export declare const decisionSchemas: ({
3429
2356
  }, "strip", z.ZodTypeAny, {
3430
2357
  type: "external";
3431
2358
  endpoint: string;
3432
- timeoutMs?: number | undefined;
3433
2359
  default?: unknown;
3434
2360
  method?: "GET" | "POST" | undefined;
2361
+ timeoutMs?: number | undefined;
3435
2362
  }, {
3436
2363
  type: "external";
3437
2364
  endpoint: string;
3438
- timeoutMs?: number | undefined;
3439
2365
  default?: unknown;
3440
2366
  method?: "GET" | "POST" | undefined;
2367
+ timeoutMs?: number | undefined;
3441
2368
  }>;
3442
2369
  } | {
3443
2370
  defName: string;
@@ -3446,11 +2373,11 @@ export declare const decisionSchemas: ({
3446
2373
  type: z.ZodLiteral<"page_url">;
3447
2374
  url: z.ZodString;
3448
2375
  }, "strip", z.ZodTypeAny, {
3449
- url: string;
3450
2376
  type: "page_url";
3451
- }, {
3452
2377
  url: string;
2378
+ }, {
3453
2379
  type: "page_url";
2380
+ url: string;
3454
2381
  }>, z.ZodObject<{
3455
2382
  type: z.ZodLiteral<"route">;
3456
2383
  routeId: z.ZodString;
@@ -3465,13 +2392,13 @@ export declare const decisionSchemas: ({
3465
2392
  anchorId: z.ZodString;
3466
2393
  state: z.ZodEnum<["visible", "present", "absent"]>;
3467
2394
  }, "strip", z.ZodTypeAny, {
2395
+ type: "anchor_visible";
3468
2396
  anchorId: string;
3469
2397
  state: "visible" | "present" | "absent";
3470
- type: "anchor_visible";
3471
2398
  }, {
2399
+ type: "anchor_visible";
3472
2400
  anchorId: string;
3473
2401
  state: "visible" | "present" | "absent";
3474
- type: "anchor_visible";
3475
2402
  }>, z.ZodObject<{
3476
2403
  type: z.ZodLiteral<"event_occurred">;
3477
2404
  eventName: z.ZodString;
@@ -3574,31 +2501,70 @@ export declare const decisionSchemas: ({
3574
2501
  operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
3575
2502
  count: z.ZodNumber;
3576
2503
  withinMs: z.ZodOptional<z.ZodNumber>;
2504
+ counter: z.ZodOptional<z.ZodObject<{
2505
+ events: z.ZodArray<z.ZodString, "many">;
2506
+ match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2507
+ equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
2508
+ contains: z.ZodOptional<z.ZodString>;
2509
+ }, "strip", z.ZodTypeAny, {
2510
+ equals?: string | number | boolean | undefined;
2511
+ contains?: string | undefined;
2512
+ }, {
2513
+ equals?: string | number | boolean | undefined;
2514
+ contains?: string | undefined;
2515
+ }>>>;
2516
+ }, "strip", z.ZodTypeAny, {
2517
+ events: string[];
2518
+ match?: Record<string, {
2519
+ equals?: string | number | boolean | undefined;
2520
+ contains?: string | undefined;
2521
+ }> | undefined;
2522
+ }, {
2523
+ events: string[];
2524
+ match?: Record<string, {
2525
+ equals?: string | number | boolean | undefined;
2526
+ contains?: string | undefined;
2527
+ }> | undefined;
2528
+ }>>;
3577
2529
  }, "strip", z.ZodTypeAny, {
3578
2530
  type: "event_count";
3579
2531
  key: string;
3580
2532
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
3581
2533
  count: number;
3582
2534
  withinMs?: number | undefined;
2535
+ counter?: {
2536
+ events: string[];
2537
+ match?: Record<string, {
2538
+ equals?: string | number | boolean | undefined;
2539
+ contains?: string | undefined;
2540
+ }> | undefined;
2541
+ } | undefined;
3583
2542
  }, {
3584
2543
  type: "event_count";
3585
2544
  key: string;
3586
2545
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
3587
2546
  count: number;
3588
2547
  withinMs?: number | undefined;
2548
+ counter?: {
2549
+ events: string[];
2550
+ match?: Record<string, {
2551
+ equals?: string | number | boolean | undefined;
2552
+ contains?: string | undefined;
2553
+ }> | undefined;
2554
+ } | undefined;
3589
2555
  }>]>, "many">;
3590
2556
  value: z.ZodUnknown;
3591
2557
  }, "strip", z.ZodTypeAny, {
3592
2558
  conditions: ({
3593
- url: string;
3594
2559
  type: "page_url";
2560
+ url: string;
3595
2561
  } | {
3596
2562
  type: "route";
3597
2563
  routeId: string;
3598
2564
  } | {
2565
+ type: "anchor_visible";
3599
2566
  anchorId: string;
3600
2567
  state: "visible" | "present" | "absent";
3601
- type: "anchor_visible";
3602
2568
  } | {
3603
2569
  type: "event_occurred";
3604
2570
  eventName: string;
@@ -3637,19 +2603,26 @@ export declare const decisionSchemas: ({
3637
2603
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
3638
2604
  count: number;
3639
2605
  withinMs?: number | undefined;
2606
+ counter?: {
2607
+ events: string[];
2608
+ match?: Record<string, {
2609
+ equals?: string | number | boolean | undefined;
2610
+ contains?: string | undefined;
2611
+ }> | undefined;
2612
+ } | undefined;
3640
2613
  })[];
3641
2614
  value?: unknown;
3642
2615
  }, {
3643
2616
  conditions: ({
3644
- url: string;
3645
2617
  type: "page_url";
2618
+ url: string;
3646
2619
  } | {
3647
2620
  type: "route";
3648
2621
  routeId: string;
3649
2622
  } | {
2623
+ type: "anchor_visible";
3650
2624
  anchorId: string;
3651
2625
  state: "visible" | "present" | "absent";
3652
- type: "anchor_visible";
3653
2626
  } | {
3654
2627
  type: "event_occurred";
3655
2628
  eventName: string;
@@ -3688,6 +2661,13 @@ export declare const decisionSchemas: ({
3688
2661
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
3689
2662
  count: number;
3690
2663
  withinMs?: number | undefined;
2664
+ counter?: {
2665
+ events: string[];
2666
+ match?: Record<string, {
2667
+ equals?: string | number | boolean | undefined;
2668
+ contains?: string | undefined;
2669
+ }> | undefined;
2670
+ } | undefined;
3691
2671
  })[];
3692
2672
  value?: unknown;
3693
2673
  }>;
@@ -3697,11 +2677,11 @@ export declare const decisionSchemas: ({
3697
2677
  type: z.ZodLiteral<"page_url">;
3698
2678
  url: z.ZodString;
3699
2679
  }, "strip", z.ZodTypeAny, {
3700
- url: string;
3701
2680
  type: "page_url";
3702
- }, {
3703
2681
  url: string;
2682
+ }, {
3704
2683
  type: "page_url";
2684
+ url: string;
3705
2685
  }>, z.ZodObject<{
3706
2686
  type: z.ZodLiteral<"route">;
3707
2687
  routeId: z.ZodString;
@@ -3716,13 +2696,13 @@ export declare const decisionSchemas: ({
3716
2696
  anchorId: z.ZodString;
3717
2697
  state: z.ZodEnum<["visible", "present", "absent"]>;
3718
2698
  }, "strip", z.ZodTypeAny, {
2699
+ type: "anchor_visible";
3719
2700
  anchorId: string;
3720
2701
  state: "visible" | "present" | "absent";
3721
- type: "anchor_visible";
3722
2702
  }, {
2703
+ type: "anchor_visible";
3723
2704
  anchorId: string;
3724
2705
  state: "visible" | "present" | "absent";
3725
- type: "anchor_visible";
3726
2706
  }>, z.ZodObject<{
3727
2707
  type: z.ZodLiteral<"event_occurred">;
3728
2708
  eventName: z.ZodString;
@@ -3825,21 +2805,57 @@ export declare const decisionSchemas: ({
3825
2805
  operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
3826
2806
  count: z.ZodNumber;
3827
2807
  withinMs: z.ZodOptional<z.ZodNumber>;
2808
+ counter: z.ZodOptional<z.ZodObject<{
2809
+ events: z.ZodArray<z.ZodString, "many">;
2810
+ match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2811
+ equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
2812
+ contains: z.ZodOptional<z.ZodString>;
2813
+ }, "strip", z.ZodTypeAny, {
2814
+ equals?: string | number | boolean | undefined;
2815
+ contains?: string | undefined;
2816
+ }, {
2817
+ equals?: string | number | boolean | undefined;
2818
+ contains?: string | undefined;
2819
+ }>>>;
2820
+ }, "strip", z.ZodTypeAny, {
2821
+ events: string[];
2822
+ match?: Record<string, {
2823
+ equals?: string | number | boolean | undefined;
2824
+ contains?: string | undefined;
2825
+ }> | undefined;
2826
+ }, {
2827
+ events: string[];
2828
+ match?: Record<string, {
2829
+ equals?: string | number | boolean | undefined;
2830
+ contains?: string | undefined;
2831
+ }> | undefined;
2832
+ }>>;
3828
2833
  }, "strip", z.ZodTypeAny, {
3829
2834
  type: "event_count";
3830
2835
  key: string;
3831
2836
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
3832
2837
  count: number;
3833
2838
  withinMs?: number | undefined;
2839
+ counter?: {
2840
+ events: string[];
2841
+ match?: Record<string, {
2842
+ equals?: string | number | boolean | undefined;
2843
+ contains?: string | undefined;
2844
+ }> | undefined;
2845
+ } | undefined;
3834
2846
  }, {
3835
2847
  type: "event_count";
3836
2848
  key: string;
3837
2849
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
3838
2850
  count: number;
3839
2851
  withinMs?: number | undefined;
2852
+ counter?: {
2853
+ events: string[];
2854
+ match?: Record<string, {
2855
+ equals?: string | number | boolean | undefined;
2856
+ contains?: string | undefined;
2857
+ }> | undefined;
2858
+ } | undefined;
3840
2859
  }>]>;
3841
2860
  })[];
3842
- export type ConditionSchema = z.infer<typeof ConditionZ>;
3843
- export type RuleSchema = z.infer<typeof RuleZ>;
3844
- export type DecisionStrategySchema = z.infer<typeof DecisionStrategyZ>;
3845
2861
  export type ActivationConfigSchema = z.infer<typeof ActivationConfigZ>;