@syntrologie/runtime-sdk 2.4.0-canary.18 → 2.4.0-canary.19

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 (36) hide show
  1. package/dist/actions/schema.d.ts +7256 -384
  2. package/dist/actions/schema.js +2 -2
  3. package/dist/actions/types.d.ts +7 -0
  4. package/dist/anchor/AnchorResolver.d.ts +18 -0
  5. package/dist/anchor/index.d.ts +2 -0
  6. package/dist/{chunk-LZLDT5DA.js → chunk-LR5AA5SE.js} +2 -2
  7. package/dist/{chunk-NR57IT54.js → chunk-LRN3K2VD.js} +282 -100
  8. package/dist/chunk-LRN3K2VD.js.map +7 -0
  9. package/dist/{chunk-4NYS7GAW.js → chunk-P5G4KT2U.js} +39 -6
  10. package/dist/chunk-P5G4KT2U.js.map +7 -0
  11. package/dist/config/schema.d.ts +448 -40
  12. package/dist/config/schema.js +1 -1
  13. package/dist/context/schema.d.ts +8 -8
  14. package/dist/decisions/schema.d.ts +424 -1408
  15. package/dist/decisions/schema.js +5 -1
  16. package/dist/decisions/types.d.ts +22 -0
  17. package/dist/events/registerConfigPredicates.d.ts +6 -10
  18. package/dist/events/schema.d.ts +8 -8
  19. package/dist/index.d.ts +1 -0
  20. package/dist/index.js +9 -77
  21. package/dist/index.js.map +3 -3
  22. package/dist/overlays/schema.d.ts +22 -22
  23. package/dist/react.js +3 -3
  24. package/dist/runtime.d.ts +3 -0
  25. package/dist/smart-canvas.esm.js +36 -37
  26. package/dist/smart-canvas.esm.js.map +4 -4
  27. package/dist/smart-canvas.js +318 -177
  28. package/dist/smart-canvas.js.map +4 -4
  29. package/dist/smart-canvas.min.js +36 -37
  30. package/dist/smart-canvas.min.js.map +4 -4
  31. package/dist/version.d.ts +1 -1
  32. package/package.json +7 -7
  33. package/schema/canvas-config.schema.json +996 -56
  34. package/dist/chunk-4NYS7GAW.js.map +0 -7
  35. package/dist/chunk-NR57IT54.js.map +0 -7
  36. /package/dist/{chunk-LZLDT5DA.js.map → chunk-LR5AA5SE.js.map} +0 -0
@@ -1,1396 +1,13 @@
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
- type: "page_url";
10
- url: string;
11
- }, {
12
- type: "page_url";
13
- url: string;
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
- type: "anchor_visible";
31
- anchorId: string;
32
- state: "visible" | "present" | "absent";
33
- }, {
34
- type: "anchor_visible";
35
- anchorId: string;
36
- state: "visible" | "present" | "absent";
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
- type: "page_url";
165
- url: string;
166
- }, {
167
- type: "page_url";
168
- url: string;
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
- type: "anchor_visible";
184
- anchorId: string;
185
- state: "visible" | "present" | "absent";
186
- }, {
187
- type: "anchor_visible";
188
- anchorId: string;
189
- state: "visible" | "present" | "absent";
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
- type: "page_url";
311
- url: string;
312
- }, {
313
- type: "page_url";
314
- url: string;
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
- type: "anchor_visible";
330
- anchorId: string;
331
- state: "visible" | "present" | "absent";
332
- }, {
333
- type: "anchor_visible";
334
- anchorId: string;
335
- state: "visible" | "present" | "absent";
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
- type: "page_url";
455
- url: string;
456
- } | {
457
- type: "route";
458
- routeId: string;
459
- } | {
460
- type: "anchor_visible";
461
- anchorId: string;
462
- state: "visible" | "present" | "absent";
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
- type: "page_url";
506
- url: string;
507
- } | {
508
- type: "route";
509
- routeId: string;
510
- } | {
511
- type: "anchor_visible";
512
- anchorId: string;
513
- state: "visible" | "present" | "absent";
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
- type: "page_url";
563
- url: string;
564
- }, {
565
- type: "page_url";
566
- url: string;
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
- type: "anchor_visible";
582
- anchorId: string;
583
- state: "visible" | "present" | "absent";
584
- }, {
585
- type: "anchor_visible";
586
- anchorId: string;
587
- state: "visible" | "present" | "absent";
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
- type: "page_url";
707
- url: string;
708
- } | {
709
- type: "route";
710
- routeId: string;
711
- } | {
712
- type: "anchor_visible";
713
- anchorId: string;
714
- state: "visible" | "present" | "absent";
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
- type: "page_url";
758
- url: string;
759
- } | {
760
- type: "route";
761
- routeId: string;
762
- } | {
763
- type: "anchor_visible";
764
- anchorId: string;
765
- state: "visible" | "present" | "absent";
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
- rules: {
810
- conditions: ({
811
- type: "page_url";
812
- url: string;
813
- } | {
814
- type: "route";
815
- routeId: string;
816
- } | {
817
- type: "anchor_visible";
818
- anchorId: string;
819
- state: "visible" | "present" | "absent";
820
- } | {
821
- type: "event_occurred";
822
- eventName: string;
823
- withinMs?: number | undefined;
824
- } | {
825
- type: "state_equals";
826
- key: string;
827
- value?: unknown;
828
- } | {
829
- type: "viewport";
830
- minWidth?: number | undefined;
831
- maxWidth?: number | undefined;
832
- minHeight?: number | undefined;
833
- maxHeight?: number | undefined;
834
- } | {
835
- type: "session_metric";
836
- key: string;
837
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
838
- threshold: number;
839
- } | {
840
- type: "dismissed";
841
- key: string;
842
- inverted?: boolean | undefined;
843
- } | {
844
- type: "cooldown_active";
845
- key: string;
846
- inverted?: boolean | undefined;
847
- } | {
848
- type: "frequency_limit";
849
- key: string;
850
- limit: number;
851
- inverted?: boolean | undefined;
852
- } | {
853
- type: "event_count";
854
- key: string;
855
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
856
- count: number;
857
- withinMs?: number | undefined;
858
- })[];
859
- value?: unknown;
860
- }[];
861
- type: "rules";
862
- default?: unknown;
863
- }, {
864
- rules: {
865
- conditions: ({
866
- type: "page_url";
867
- url: string;
868
- } | {
869
- type: "route";
870
- routeId: string;
871
- } | {
872
- type: "anchor_visible";
873
- anchorId: string;
874
- state: "visible" | "present" | "absent";
875
- } | {
876
- type: "event_occurred";
877
- eventName: string;
878
- withinMs?: number | undefined;
879
- } | {
880
- type: "state_equals";
881
- key: string;
882
- value?: unknown;
883
- } | {
884
- type: "viewport";
885
- minWidth?: number | undefined;
886
- maxWidth?: number | undefined;
887
- minHeight?: number | undefined;
888
- maxHeight?: number | undefined;
889
- } | {
890
- type: "session_metric";
891
- key: string;
892
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
893
- threshold: number;
894
- } | {
895
- type: "dismissed";
896
- key: string;
897
- inverted?: boolean | undefined;
898
- } | {
899
- type: "cooldown_active";
900
- key: string;
901
- inverted?: boolean | undefined;
902
- } | {
903
- type: "frequency_limit";
904
- key: string;
905
- limit: number;
906
- inverted?: boolean | undefined;
907
- } | {
908
- type: "event_count";
909
- key: string;
910
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
911
- count: number;
912
- withinMs?: number | undefined;
913
- })[];
914
- value?: unknown;
915
- }[];
916
- type: "rules";
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
- default?: unknown;
967
- method?: "GET" | "POST" | undefined;
968
- timeoutMs?: number | undefined;
969
- }, {
970
- type: "external";
971
- endpoint: string;
972
- default?: unknown;
973
- method?: "GET" | "POST" | undefined;
974
- timeoutMs?: number | 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
- type: "page_url";
984
- url: string;
985
- }, {
986
- type: "page_url";
987
- url: string;
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
- type: "anchor_visible";
1003
- anchorId: string;
1004
- state: "visible" | "present" | "absent";
1005
- }, {
1006
- type: "anchor_visible";
1007
- anchorId: string;
1008
- state: "visible" | "present" | "absent";
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
- type: "page_url";
1128
- url: string;
1129
- } | {
1130
- type: "route";
1131
- routeId: string;
1132
- } | {
1133
- type: "anchor_visible";
1134
- anchorId: string;
1135
- state: "visible" | "present" | "absent";
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
- type: "page_url";
1179
- url: string;
1180
- } | {
1181
- type: "route";
1182
- routeId: string;
1183
- } | {
1184
- type: "anchor_visible";
1185
- anchorId: string;
1186
- state: "visible" | "present" | "absent";
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
- rules: {
1231
- conditions: ({
1232
- type: "page_url";
1233
- url: string;
1234
- } | {
1235
- type: "route";
1236
- routeId: string;
1237
- } | {
1238
- type: "anchor_visible";
1239
- anchorId: string;
1240
- state: "visible" | "present" | "absent";
1241
- } | {
1242
- type: "event_occurred";
1243
- eventName: string;
1244
- withinMs?: number | undefined;
1245
- } | {
1246
- type: "state_equals";
1247
- key: string;
1248
- value?: unknown;
1249
- } | {
1250
- type: "viewport";
1251
- minWidth?: number | undefined;
1252
- maxWidth?: number | undefined;
1253
- minHeight?: number | undefined;
1254
- maxHeight?: number | undefined;
1255
- } | {
1256
- type: "session_metric";
1257
- key: string;
1258
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1259
- threshold: number;
1260
- } | {
1261
- type: "dismissed";
1262
- key: string;
1263
- inverted?: boolean | undefined;
1264
- } | {
1265
- type: "cooldown_active";
1266
- key: string;
1267
- inverted?: boolean | undefined;
1268
- } | {
1269
- type: "frequency_limit";
1270
- key: string;
1271
- limit: number;
1272
- inverted?: boolean | undefined;
1273
- } | {
1274
- type: "event_count";
1275
- key: string;
1276
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1277
- count: number;
1278
- withinMs?: number | undefined;
1279
- })[];
1280
- value?: unknown;
1281
- }[];
1282
- type: "rules";
1283
- default?: unknown;
1284
- }, {
1285
- rules: {
1286
- conditions: ({
1287
- type: "page_url";
1288
- url: string;
1289
- } | {
1290
- type: "route";
1291
- routeId: string;
1292
- } | {
1293
- type: "anchor_visible";
1294
- anchorId: string;
1295
- state: "visible" | "present" | "absent";
1296
- } | {
1297
- type: "event_occurred";
1298
- eventName: string;
1299
- withinMs?: number | undefined;
1300
- } | {
1301
- type: "state_equals";
1302
- key: string;
1303
- value?: unknown;
1304
- } | {
1305
- type: "viewport";
1306
- minWidth?: number | undefined;
1307
- maxWidth?: number | undefined;
1308
- minHeight?: number | undefined;
1309
- maxHeight?: number | undefined;
1310
- } | {
1311
- type: "session_metric";
1312
- key: string;
1313
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1314
- threshold: number;
1315
- } | {
1316
- type: "dismissed";
1317
- key: string;
1318
- inverted?: boolean | undefined;
1319
- } | {
1320
- type: "cooldown_active";
1321
- key: string;
1322
- inverted?: boolean | undefined;
1323
- } | {
1324
- type: "frequency_limit";
1325
- key: string;
1326
- limit: number;
1327
- inverted?: boolean | undefined;
1328
- } | {
1329
- type: "event_count";
1330
- key: string;
1331
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1332
- count: number;
1333
- withinMs?: number | undefined;
1334
- })[];
1335
- value?: unknown;
1336
- }[];
1337
- type: "rules";
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
- default?: unknown;
1385
- method?: "GET" | "POST" | undefined;
1386
- timeoutMs?: number | undefined;
1387
- }, {
1388
- type: "external";
1389
- endpoint: string;
1390
- default?: unknown;
1391
- method?: "GET" | "POST" | undefined;
1392
- timeoutMs?: number | 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">>;
@@ -1547,18 +164,57 @@ 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, {
@@ -1610,6 +266,13 @@ 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
  }, {
@@ -1661,11 +324,19 @@ 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">;
1667
337
  default: z.ZodUnknown;
1668
338
  }, "strip", z.ZodTypeAny, {
339
+ type: "rules";
1669
340
  rules: {
1670
341
  conditions: ({
1671
342
  type: "page_url";
@@ -1715,12 +386,19 @@ export declare const ActivationConfigZ: z.ZodObject<{
1715
386
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1716
387
  count: number;
1717
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;
1718
396
  })[];
1719
397
  value?: unknown;
1720
398
  }[];
1721
- type: "rules";
1722
399
  default?: unknown;
1723
400
  }, {
401
+ type: "rules";
1724
402
  rules: {
1725
403
  conditions: ({
1726
404
  type: "page_url";
@@ -1770,10 +448,16 @@ export declare const ActivationConfigZ: z.ZodObject<{
1770
448
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1771
449
  count: number;
1772
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;
1773
458
  })[];
1774
459
  value?: unknown;
1775
460
  }[];
1776
- type: "rules";
1777
461
  default?: unknown;
1778
462
  }>, z.ZodObject<{
1779
463
  type: z.ZodLiteral<"score">;
@@ -1836,6 +520,7 @@ export declare const ActivationConfigZ: z.ZodObject<{
1836
520
  exclude?: string[] | undefined;
1837
521
  };
1838
522
  strategy?: {
523
+ type: "rules";
1839
524
  rules: {
1840
525
  conditions: ({
1841
526
  type: "page_url";
@@ -1885,10 +570,16 @@ export declare const ActivationConfigZ: z.ZodObject<{
1885
570
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1886
571
  count: number;
1887
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;
1888
580
  })[];
1889
581
  value?: unknown;
1890
582
  }[];
1891
- type: "rules";
1892
583
  default?: unknown;
1893
584
  } | {
1894
585
  type: "score";
@@ -1915,6 +606,7 @@ export declare const ActivationConfigZ: z.ZodObject<{
1915
606
  exclude?: string[] | undefined;
1916
607
  };
1917
608
  strategy?: {
609
+ type: "rules";
1918
610
  rules: {
1919
611
  conditions: ({
1920
612
  type: "page_url";
@@ -1964,10 +656,16 @@ export declare const ActivationConfigZ: z.ZodObject<{
1964
656
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1965
657
  count: number;
1966
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;
1967
666
  })[];
1968
667
  value?: unknown;
1969
668
  }[];
1970
- type: "rules";
1971
669
  default?: unknown;
1972
670
  } | {
1973
671
  type: "score";
@@ -2040,6 +738,13 @@ 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
749
  type: "page_url";
2045
750
  url: string;
@@ -2088,11 +793,19 @@ 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.
2094
806
  */
2095
807
  export declare function validateStrategy(data: unknown): z.SafeParseReturnType<{
808
+ type: "rules";
2096
809
  rules: {
2097
810
  conditions: ({
2098
811
  type: "page_url";
@@ -2142,10 +855,16 @@ export declare function validateStrategy(data: unknown): z.SafeParseReturnType<{
2142
855
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2143
856
  count: number;
2144
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;
2145
865
  })[];
2146
866
  value?: unknown;
2147
867
  }[];
2148
- type: "rules";
2149
868
  default?: unknown;
2150
869
  } | {
2151
870
  type: "score";
@@ -2166,6 +885,7 @@ export declare function validateStrategy(data: unknown): z.SafeParseReturnType<{
2166
885
  method?: "GET" | "POST" | undefined;
2167
886
  timeoutMs?: number | undefined;
2168
887
  }, {
888
+ type: "rules";
2169
889
  rules: {
2170
890
  conditions: ({
2171
891
  type: "page_url";
@@ -2215,10 +935,16 @@ export declare function validateStrategy(data: unknown): z.SafeParseReturnType<{
2215
935
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2216
936
  count: number;
2217
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;
2218
945
  })[];
2219
946
  value?: unknown;
2220
947
  }[];
2221
- type: "rules";
2222
948
  default?: unknown;
2223
949
  } | {
2224
950
  type: "score";
@@ -2248,6 +974,7 @@ export declare function validateActivationConfig(data: unknown): z.SafeParseRetu
2248
974
  exclude?: string[] | undefined;
2249
975
  };
2250
976
  strategy?: {
977
+ type: "rules";
2251
978
  rules: {
2252
979
  conditions: ({
2253
980
  type: "page_url";
@@ -2297,10 +1024,16 @@ export declare function validateActivationConfig(data: unknown): z.SafeParseRetu
2297
1024
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2298
1025
  count: number;
2299
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;
2300
1034
  })[];
2301
1035
  value?: unknown;
2302
1036
  }[];
2303
- type: "rules";
2304
1037
  default?: unknown;
2305
1038
  } | {
2306
1039
  type: "score";
@@ -2327,6 +1060,7 @@ export declare function validateActivationConfig(data: unknown): z.SafeParseRetu
2327
1060
  exclude?: string[] | undefined;
2328
1061
  };
2329
1062
  strategy?: {
1063
+ type: "rules";
2330
1064
  rules: {
2331
1065
  conditions: ({
2332
1066
  type: "page_url";
@@ -2376,10 +1110,16 @@ export declare function validateActivationConfig(data: unknown): z.SafeParseRetu
2376
1110
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2377
1111
  count: number;
2378
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;
2379
1120
  })[];
2380
1121
  value?: unknown;
2381
1122
  }[];
2382
- type: "rules";
2383
1123
  default?: unknown;
2384
1124
  } | {
2385
1125
  type: "score";
@@ -2409,6 +1149,45 @@ 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<{
@@ -2556,18 +1335,57 @@ 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, {
@@ -2619,6 +1437,13 @@ 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
  }, {
@@ -2670,11 +1495,19 @@ 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">;
2676
1508
  default: z.ZodUnknown;
2677
1509
  }, "strip", z.ZodTypeAny, {
1510
+ type: "rules";
2678
1511
  rules: {
2679
1512
  conditions: ({
2680
1513
  type: "page_url";
@@ -2724,12 +1557,19 @@ export declare const decisionSchemas: ({
2724
1557
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2725
1558
  count: number;
2726
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;
2727
1567
  })[];
2728
1568
  value?: unknown;
2729
1569
  }[];
2730
- type: "rules";
2731
1570
  default?: unknown;
2732
1571
  }, {
1572
+ type: "rules";
2733
1573
  rules: {
2734
1574
  conditions: ({
2735
1575
  type: "page_url";
@@ -2779,10 +1619,16 @@ export declare const decisionSchemas: ({
2779
1619
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2780
1620
  count: number;
2781
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;
2782
1629
  })[];
2783
1630
  value?: unknown;
2784
1631
  }[];
2785
- type: "rules";
2786
1632
  default?: unknown;
2787
1633
  }>, z.ZodObject<{
2788
1634
  type: z.ZodLiteral<"score">;
@@ -2845,6 +1691,7 @@ export declare const decisionSchemas: ({
2845
1691
  exclude?: string[] | undefined;
2846
1692
  };
2847
1693
  strategy?: {
1694
+ type: "rules";
2848
1695
  rules: {
2849
1696
  conditions: ({
2850
1697
  type: "page_url";
@@ -2894,10 +1741,16 @@ export declare const decisionSchemas: ({
2894
1741
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2895
1742
  count: number;
2896
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;
2897
1751
  })[];
2898
1752
  value?: unknown;
2899
1753
  }[];
2900
- type: "rules";
2901
1754
  default?: unknown;
2902
1755
  } | {
2903
1756
  type: "score";
@@ -2924,6 +1777,7 @@ export declare const decisionSchemas: ({
2924
1777
  exclude?: string[] | undefined;
2925
1778
  };
2926
1779
  strategy?: {
1780
+ type: "rules";
2927
1781
  rules: {
2928
1782
  conditions: ({
2929
1783
  type: "page_url";
@@ -2973,10 +1827,16 @@ export declare const decisionSchemas: ({
2973
1827
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2974
1828
  count: number;
2975
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;
2976
1837
  })[];
2977
1838
  value?: unknown;
2978
1839
  }[];
2979
- type: "rules";
2980
1840
  default?: unknown;
2981
1841
  } | {
2982
1842
  type: "score";
@@ -3147,18 +2007,57 @@ 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, {
@@ -3210,6 +2109,13 @@ 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
  }, {
@@ -3261,11 +2167,19 @@ 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">;
3267
2180
  default: z.ZodUnknown;
3268
2181
  }, "strip", z.ZodTypeAny, {
2182
+ type: "rules";
3269
2183
  rules: {
3270
2184
  conditions: ({
3271
2185
  type: "page_url";
@@ -3315,12 +2229,19 @@ export declare const decisionSchemas: ({
3315
2229
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
3316
2230
  count: number;
3317
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;
3318
2239
  })[];
3319
2240
  value?: unknown;
3320
2241
  }[];
3321
- type: "rules";
3322
2242
  default?: unknown;
3323
2243
  }, {
2244
+ type: "rules";
3324
2245
  rules: {
3325
2246
  conditions: ({
3326
2247
  type: "page_url";
@@ -3370,10 +2291,16 @@ export declare const decisionSchemas: ({
3370
2291
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
3371
2292
  count: number;
3372
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;
3373
2301
  })[];
3374
2302
  value?: unknown;
3375
2303
  }[];
3376
- type: "rules";
3377
2304
  default?: unknown;
3378
2305
  }>;
3379
2306
  } | {
@@ -3574,18 +2501,57 @@ 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, {
@@ -3637,6 +2603,13 @@ 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
  }, {
@@ -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
  }>;
@@ -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>;