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

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.js +2 -1
  2. package/dist/chunk-BIYMC56J.js +165 -0
  3. package/dist/chunk-BIYMC56J.js.map +7 -0
  4. package/dist/{chunk-AYTRRBR5.js → chunk-DOJR7R46.js} +1 -16
  5. package/dist/{chunk-AYTRRBR5.js.map → chunk-DOJR7R46.js.map} +1 -1
  6. package/dist/chunk-JMHRHAEL.js +18 -0
  7. package/dist/chunk-JMHRHAEL.js.map +7 -0
  8. package/dist/{chunk-RUKIPJEJ.js → chunk-ZDZ3IYFN.js} +16 -41
  9. package/dist/chunk-ZDZ3IYFN.js.map +7 -0
  10. package/dist/config/schema.d.ts +4107 -0
  11. package/dist/config/schema.js +73 -0
  12. package/dist/config/schema.js.map +7 -0
  13. package/dist/context/ContextManager.d.ts +3 -3
  14. package/dist/context/types.d.ts +1 -1
  15. package/dist/decisions/schema.d.ts +1487 -49
  16. package/dist/decisions/schema.js +54 -0
  17. package/dist/decisions/schema.js.map +7 -0
  18. package/dist/decisions/types.d.ts +1 -1
  19. package/dist/hooks/useShadowCanvasConfig.d.ts +1 -3
  20. package/dist/index.js +48 -149
  21. package/dist/index.js.map +4 -4
  22. package/dist/react.js +3 -2
  23. package/dist/react.js.map +1 -1
  24. package/dist/runtime.d.ts +4 -4
  25. package/dist/smart-canvas.esm.js +27 -27
  26. package/dist/smart-canvas.esm.js.map +3 -3
  27. package/dist/smart-canvas.js +22 -36
  28. package/dist/smart-canvas.js.map +3 -3
  29. package/dist/smart-canvas.min.js +27 -27
  30. package/dist/smart-canvas.min.js.map +3 -3
  31. package/dist/types.d.ts +17 -76
  32. package/dist/version.d.ts +1 -1
  33. package/package.json +7 -7
  34. package/schema/canvas-config.schema.json +2044 -299
  35. package/dist/chunk-RUKIPJEJ.js.map +0 -7
  36. package/schema/canvas-config.base.schema.json +0 -351
@@ -147,14 +147,14 @@ export declare const EventCountConditionZ: z.ZodObject<{
147
147
  }, "strip", z.ZodTypeAny, {
148
148
  type: "event_count";
149
149
  key: string;
150
- count: number;
151
150
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
151
+ count: number;
152
152
  withinMs?: number | undefined;
153
153
  }, {
154
154
  type: "event_count";
155
155
  key: string;
156
- count: number;
157
156
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
157
+ count: number;
158
158
  withinMs?: number | undefined;
159
159
  }>;
160
160
  export declare const ConditionZ: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -292,14 +292,14 @@ export declare const ConditionZ: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
292
292
  }, "strip", z.ZodTypeAny, {
293
293
  type: "event_count";
294
294
  key: string;
295
- count: number;
296
295
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
296
+ count: number;
297
297
  withinMs?: number | undefined;
298
298
  }, {
299
299
  type: "event_count";
300
300
  key: string;
301
- count: number;
302
301
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
302
+ count: number;
303
303
  withinMs?: number | undefined;
304
304
  }>]>;
305
305
  export declare const RuleZ: z.ZodObject<{
@@ -438,14 +438,14 @@ export declare const RuleZ: z.ZodObject<{
438
438
  }, "strip", z.ZodTypeAny, {
439
439
  type: "event_count";
440
440
  key: string;
441
- count: number;
442
441
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
442
+ count: number;
443
443
  withinMs?: number | undefined;
444
444
  }, {
445
445
  type: "event_count";
446
446
  key: string;
447
- count: number;
448
447
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
448
+ count: number;
449
449
  withinMs?: number | undefined;
450
450
  }>]>, "many">;
451
451
  value: z.ZodUnknown;
@@ -495,8 +495,8 @@ export declare const RuleZ: z.ZodObject<{
495
495
  } | {
496
496
  type: "event_count";
497
497
  key: string;
498
- count: number;
499
498
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
499
+ count: number;
500
500
  withinMs?: number | undefined;
501
501
  })[];
502
502
  value?: unknown;
@@ -546,8 +546,8 @@ export declare const RuleZ: z.ZodObject<{
546
546
  } | {
547
547
  type: "event_count";
548
548
  key: string;
549
- count: number;
550
549
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
550
+ count: number;
551
551
  withinMs?: number | undefined;
552
552
  })[];
553
553
  value?: unknown;
@@ -690,14 +690,14 @@ export declare const RuleStrategyZ: z.ZodObject<{
690
690
  }, "strip", z.ZodTypeAny, {
691
691
  type: "event_count";
692
692
  key: string;
693
- count: number;
694
693
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
694
+ count: number;
695
695
  withinMs?: number | undefined;
696
696
  }, {
697
697
  type: "event_count";
698
698
  key: string;
699
- count: number;
700
699
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
700
+ count: number;
701
701
  withinMs?: number | undefined;
702
702
  }>]>, "many">;
703
703
  value: z.ZodUnknown;
@@ -747,8 +747,8 @@ export declare const RuleStrategyZ: z.ZodObject<{
747
747
  } | {
748
748
  type: "event_count";
749
749
  key: string;
750
- count: number;
751
750
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
751
+ count: number;
752
752
  withinMs?: number | undefined;
753
753
  })[];
754
754
  value?: unknown;
@@ -798,8 +798,8 @@ export declare const RuleStrategyZ: z.ZodObject<{
798
798
  } | {
799
799
  type: "event_count";
800
800
  key: string;
801
- count: number;
802
801
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
802
+ count: number;
803
803
  withinMs?: number | undefined;
804
804
  })[];
805
805
  value?: unknown;
@@ -853,8 +853,8 @@ export declare const RuleStrategyZ: z.ZodObject<{
853
853
  } | {
854
854
  type: "event_count";
855
855
  key: string;
856
- count: number;
857
856
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
857
+ count: number;
858
858
  withinMs?: number | undefined;
859
859
  })[];
860
860
  value?: unknown;
@@ -908,8 +908,8 @@ export declare const RuleStrategyZ: z.ZodObject<{
908
908
  } | {
909
909
  type: "event_count";
910
910
  key: string;
911
- count: number;
912
911
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
912
+ count: number;
913
913
  withinMs?: number | undefined;
914
914
  })[];
915
915
  value?: unknown;
@@ -1111,14 +1111,14 @@ export declare const DecisionStrategyZ: z.ZodDiscriminatedUnion<"type", [z.ZodOb
1111
1111
  }, "strip", z.ZodTypeAny, {
1112
1112
  type: "event_count";
1113
1113
  key: string;
1114
- count: number;
1115
1114
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1115
+ count: number;
1116
1116
  withinMs?: number | undefined;
1117
1117
  }, {
1118
1118
  type: "event_count";
1119
1119
  key: string;
1120
- count: number;
1121
1120
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1121
+ count: number;
1122
1122
  withinMs?: number | undefined;
1123
1123
  }>]>, "many">;
1124
1124
  value: z.ZodUnknown;
@@ -1168,8 +1168,8 @@ export declare const DecisionStrategyZ: z.ZodDiscriminatedUnion<"type", [z.ZodOb
1168
1168
  } | {
1169
1169
  type: "event_count";
1170
1170
  key: string;
1171
- count: number;
1172
1171
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1172
+ count: number;
1173
1173
  withinMs?: number | undefined;
1174
1174
  })[];
1175
1175
  value?: unknown;
@@ -1219,8 +1219,8 @@ export declare const DecisionStrategyZ: z.ZodDiscriminatedUnion<"type", [z.ZodOb
1219
1219
  } | {
1220
1220
  type: "event_count";
1221
1221
  key: string;
1222
- count: number;
1223
1222
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1223
+ count: number;
1224
1224
  withinMs?: number | undefined;
1225
1225
  })[];
1226
1226
  value?: unknown;
@@ -1274,8 +1274,8 @@ export declare const DecisionStrategyZ: z.ZodDiscriminatedUnion<"type", [z.ZodOb
1274
1274
  } | {
1275
1275
  type: "event_count";
1276
1276
  key: string;
1277
- count: number;
1278
1277
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1278
+ count: number;
1279
1279
  withinMs?: number | undefined;
1280
1280
  })[];
1281
1281
  value?: unknown;
@@ -1329,8 +1329,8 @@ export declare const DecisionStrategyZ: z.ZodDiscriminatedUnion<"type", [z.ZodOb
1329
1329
  } | {
1330
1330
  type: "event_count";
1331
1331
  key: string;
1332
- count: number;
1333
1332
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1333
+ count: number;
1334
1334
  withinMs?: number | undefined;
1335
1335
  })[];
1336
1336
  value?: unknown;
@@ -1402,7 +1402,7 @@ export declare const RouteFilterZ: z.ZodObject<{
1402
1402
  include?: string[] | undefined;
1403
1403
  }>;
1404
1404
  export declare const ActivationConfigZ: z.ZodObject<{
1405
- routes: z.ZodOptional<z.ZodObject<{
1405
+ routes: z.ZodObject<{
1406
1406
  include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1407
1407
  exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1408
1408
  }, "strip", z.ZodTypeAny, {
@@ -1411,7 +1411,7 @@ export declare const ActivationConfigZ: z.ZodObject<{
1411
1411
  }, {
1412
1412
  exclude?: string[] | undefined;
1413
1413
  include?: string[] | undefined;
1414
- }>>;
1414
+ }>;
1415
1415
  strategy: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1416
1416
  type: z.ZodLiteral<"rules">;
1417
1417
  rules: z.ZodArray<z.ZodObject<{
@@ -1550,14 +1550,14 @@ export declare const ActivationConfigZ: z.ZodObject<{
1550
1550
  }, "strip", z.ZodTypeAny, {
1551
1551
  type: "event_count";
1552
1552
  key: string;
1553
- count: number;
1554
1553
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1554
+ count: number;
1555
1555
  withinMs?: number | undefined;
1556
1556
  }, {
1557
1557
  type: "event_count";
1558
1558
  key: string;
1559
- count: number;
1560
1559
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1560
+ count: number;
1561
1561
  withinMs?: number | undefined;
1562
1562
  }>]>, "many">;
1563
1563
  value: z.ZodUnknown;
@@ -1607,8 +1607,8 @@ export declare const ActivationConfigZ: z.ZodObject<{
1607
1607
  } | {
1608
1608
  type: "event_count";
1609
1609
  key: string;
1610
- count: number;
1611
1610
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1611
+ count: number;
1612
1612
  withinMs?: number | undefined;
1613
1613
  })[];
1614
1614
  value?: unknown;
@@ -1658,8 +1658,8 @@ export declare const ActivationConfigZ: z.ZodObject<{
1658
1658
  } | {
1659
1659
  type: "event_count";
1660
1660
  key: string;
1661
- count: number;
1662
1661
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1662
+ count: number;
1663
1663
  withinMs?: number | undefined;
1664
1664
  })[];
1665
1665
  value?: unknown;
@@ -1713,8 +1713,8 @@ export declare const ActivationConfigZ: z.ZodObject<{
1713
1713
  } | {
1714
1714
  type: "event_count";
1715
1715
  key: string;
1716
- count: number;
1717
1716
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1717
+ count: number;
1718
1718
  withinMs?: number | undefined;
1719
1719
  })[];
1720
1720
  value?: unknown;
@@ -1768,8 +1768,8 @@ export declare const ActivationConfigZ: z.ZodObject<{
1768
1768
  } | {
1769
1769
  type: "event_count";
1770
1770
  key: string;
1771
- count: number;
1772
1771
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1772
+ count: number;
1773
1773
  withinMs?: number | undefined;
1774
1774
  })[];
1775
1775
  value?: unknown;
@@ -1831,6 +1831,10 @@ export declare const ActivationConfigZ: z.ZodObject<{
1831
1831
  method?: "GET" | "POST" | undefined;
1832
1832
  }>]>>;
1833
1833
  }, "strip", z.ZodTypeAny, {
1834
+ routes: {
1835
+ exclude?: string[] | undefined;
1836
+ include?: string[] | undefined;
1837
+ };
1834
1838
  strategy?: {
1835
1839
  type: "rules";
1836
1840
  rules: {
@@ -1879,8 +1883,8 @@ export declare const ActivationConfigZ: z.ZodObject<{
1879
1883
  } | {
1880
1884
  type: "event_count";
1881
1885
  key: string;
1882
- count: number;
1883
1886
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1887
+ count: number;
1884
1888
  withinMs?: number | undefined;
1885
1889
  })[];
1886
1890
  value?: unknown;
@@ -1905,11 +1909,11 @@ export declare const ActivationConfigZ: z.ZodObject<{
1905
1909
  default?: unknown;
1906
1910
  method?: "GET" | "POST" | undefined;
1907
1911
  } | undefined;
1908
- routes?: {
1912
+ }, {
1913
+ routes: {
1909
1914
  exclude?: string[] | undefined;
1910
1915
  include?: string[] | undefined;
1911
- } | undefined;
1912
- }, {
1916
+ };
1913
1917
  strategy?: {
1914
1918
  type: "rules";
1915
1919
  rules: {
@@ -1958,8 +1962,8 @@ export declare const ActivationConfigZ: z.ZodObject<{
1958
1962
  } | {
1959
1963
  type: "event_count";
1960
1964
  key: string;
1961
- count: number;
1962
1965
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
1966
+ count: number;
1963
1967
  withinMs?: number | undefined;
1964
1968
  })[];
1965
1969
  value?: unknown;
@@ -1984,10 +1988,6 @@ export declare const ActivationConfigZ: z.ZodObject<{
1984
1988
  default?: unknown;
1985
1989
  method?: "GET" | "POST" | undefined;
1986
1990
  } | undefined;
1987
- routes?: {
1988
- exclude?: string[] | undefined;
1989
- include?: string[] | undefined;
1990
- } | undefined;
1991
1991
  }>;
1992
1992
  /**
1993
1993
  * Validate a Condition object.
@@ -2037,8 +2037,8 @@ export declare function validateCondition(data: unknown): z.SafeParseReturnType<
2037
2037
  } | {
2038
2038
  type: "event_count";
2039
2039
  key: string;
2040
- count: number;
2041
2040
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2041
+ count: number;
2042
2042
  withinMs?: number | undefined;
2043
2043
  }, {
2044
2044
  url: string;
@@ -2085,8 +2085,8 @@ export declare function validateCondition(data: unknown): z.SafeParseReturnType<
2085
2085
  } | {
2086
2086
  type: "event_count";
2087
2087
  key: string;
2088
- count: number;
2089
2088
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2089
+ count: number;
2090
2090
  withinMs?: number | undefined;
2091
2091
  }>;
2092
2092
  /**
@@ -2140,8 +2140,8 @@ export declare function validateStrategy(data: unknown): z.SafeParseReturnType<{
2140
2140
  } | {
2141
2141
  type: "event_count";
2142
2142
  key: string;
2143
- count: number;
2144
2143
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2144
+ count: number;
2145
2145
  withinMs?: number | undefined;
2146
2146
  })[];
2147
2147
  value?: unknown;
@@ -2213,8 +2213,8 @@ export declare function validateStrategy(data: unknown): z.SafeParseReturnType<{
2213
2213
  } | {
2214
2214
  type: "event_count";
2215
2215
  key: string;
2216
- count: number;
2217
2216
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2217
+ count: number;
2218
2218
  withinMs?: number | undefined;
2219
2219
  })[];
2220
2220
  value?: unknown;
@@ -2243,6 +2243,10 @@ export declare function validateStrategy(data: unknown): z.SafeParseReturnType<{
2243
2243
  * Validate an ActivationConfig object.
2244
2244
  */
2245
2245
  export declare function validateActivationConfig(data: unknown): z.SafeParseReturnType<{
2246
+ routes: {
2247
+ exclude?: string[] | undefined;
2248
+ include?: string[] | undefined;
2249
+ };
2246
2250
  strategy?: {
2247
2251
  type: "rules";
2248
2252
  rules: {
@@ -2291,8 +2295,8 @@ export declare function validateActivationConfig(data: unknown): z.SafeParseRetu
2291
2295
  } | {
2292
2296
  type: "event_count";
2293
2297
  key: string;
2294
- count: number;
2295
2298
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2299
+ count: number;
2296
2300
  withinMs?: number | undefined;
2297
2301
  })[];
2298
2302
  value?: unknown;
@@ -2317,11 +2321,11 @@ export declare function validateActivationConfig(data: unknown): z.SafeParseRetu
2317
2321
  default?: unknown;
2318
2322
  method?: "GET" | "POST" | undefined;
2319
2323
  } | undefined;
2320
- routes?: {
2324
+ }, {
2325
+ routes: {
2321
2326
  exclude?: string[] | undefined;
2322
2327
  include?: string[] | undefined;
2323
- } | undefined;
2324
- }, {
2328
+ };
2325
2329
  strategy?: {
2326
2330
  type: "rules";
2327
2331
  rules: {
@@ -2370,8 +2374,8 @@ export declare function validateActivationConfig(data: unknown): z.SafeParseRetu
2370
2374
  } | {
2371
2375
  type: "event_count";
2372
2376
  key: string;
2373
- count: number;
2374
2377
  operator: "gte" | "lte" | "eq" | "gt" | "lt";
2378
+ count: number;
2375
2379
  withinMs?: number | undefined;
2376
2380
  })[];
2377
2381
  value?: unknown;
@@ -2396,11 +2400,1445 @@ export declare function validateActivationConfig(data: unknown): z.SafeParseRetu
2396
2400
  default?: unknown;
2397
2401
  method?: "GET" | "POST" | undefined;
2398
2402
  } | undefined;
2399
- routes?: {
2403
+ }>;
2404
+ /**
2405
+ * Decision schemas for unified JSON Schema generation.
2406
+ * The generator imports this array and converts each to a JSON Schema $def.
2407
+ *
2408
+ * Note: `decisionStrategy` is NOT included here — it's a oneOf wrapper that
2409
+ * the generator builds from $refs to the four strategy defs.
2410
+ */
2411
+ export declare const decisionSchemas: ({
2412
+ defName: string;
2413
+ schema: z.ZodObject<{
2414
+ routes: z.ZodObject<{
2415
+ include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2416
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2417
+ }, "strip", z.ZodTypeAny, {
2418
+ exclude?: string[] | undefined;
2419
+ include?: string[] | undefined;
2420
+ }, {
2421
+ exclude?: string[] | undefined;
2422
+ include?: string[] | undefined;
2423
+ }>;
2424
+ strategy: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2425
+ type: z.ZodLiteral<"rules">;
2426
+ rules: z.ZodArray<z.ZodObject<{
2427
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2428
+ type: z.ZodLiteral<"page_url">;
2429
+ url: z.ZodString;
2430
+ }, "strip", z.ZodTypeAny, {
2431
+ url: string;
2432
+ type: "page_url";
2433
+ }, {
2434
+ url: string;
2435
+ type: "page_url";
2436
+ }>, z.ZodObject<{
2437
+ type: z.ZodLiteral<"route">;
2438
+ routeId: z.ZodString;
2439
+ }, "strip", z.ZodTypeAny, {
2440
+ type: "route";
2441
+ routeId: string;
2442
+ }, {
2443
+ type: "route";
2444
+ routeId: string;
2445
+ }>, z.ZodObject<{
2446
+ type: z.ZodLiteral<"anchor_visible">;
2447
+ anchorId: z.ZodString;
2448
+ state: z.ZodEnum<["visible", "present", "absent"]>;
2449
+ }, "strip", z.ZodTypeAny, {
2450
+ anchorId: string;
2451
+ state: "visible" | "present" | "absent";
2452
+ type: "anchor_visible";
2453
+ }, {
2454
+ anchorId: string;
2455
+ state: "visible" | "present" | "absent";
2456
+ type: "anchor_visible";
2457
+ }>, z.ZodObject<{
2458
+ type: z.ZodLiteral<"event_occurred">;
2459
+ eventName: z.ZodString;
2460
+ withinMs: z.ZodOptional<z.ZodNumber>;
2461
+ }, "strip", z.ZodTypeAny, {
2462
+ type: "event_occurred";
2463
+ eventName: string;
2464
+ withinMs?: number | undefined;
2465
+ }, {
2466
+ type: "event_occurred";
2467
+ eventName: string;
2468
+ withinMs?: number | undefined;
2469
+ }>, z.ZodObject<{
2470
+ type: z.ZodLiteral<"state_equals">;
2471
+ key: z.ZodString;
2472
+ value: z.ZodUnknown;
2473
+ }, "strip", z.ZodTypeAny, {
2474
+ type: "state_equals";
2475
+ key: string;
2476
+ value?: unknown;
2477
+ }, {
2478
+ type: "state_equals";
2479
+ key: string;
2480
+ value?: unknown;
2481
+ }>, z.ZodObject<{
2482
+ type: z.ZodLiteral<"viewport">;
2483
+ minWidth: z.ZodOptional<z.ZodNumber>;
2484
+ maxWidth: z.ZodOptional<z.ZodNumber>;
2485
+ minHeight: z.ZodOptional<z.ZodNumber>;
2486
+ maxHeight: z.ZodOptional<z.ZodNumber>;
2487
+ }, "strip", z.ZodTypeAny, {
2488
+ type: "viewport";
2489
+ minWidth?: number | undefined;
2490
+ maxWidth?: number | undefined;
2491
+ minHeight?: number | undefined;
2492
+ maxHeight?: number | undefined;
2493
+ }, {
2494
+ type: "viewport";
2495
+ minWidth?: number | undefined;
2496
+ maxWidth?: number | undefined;
2497
+ minHeight?: number | undefined;
2498
+ maxHeight?: number | undefined;
2499
+ }>, z.ZodObject<{
2500
+ type: z.ZodLiteral<"session_metric">;
2501
+ key: z.ZodString;
2502
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
2503
+ threshold: z.ZodNumber;
2504
+ }, "strip", z.ZodTypeAny, {
2505
+ type: "session_metric";
2506
+ key: string;
2507
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2508
+ threshold: number;
2509
+ }, {
2510
+ type: "session_metric";
2511
+ key: string;
2512
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2513
+ threshold: number;
2514
+ }>, z.ZodObject<{
2515
+ type: z.ZodLiteral<"dismissed">;
2516
+ key: z.ZodString;
2517
+ inverted: z.ZodOptional<z.ZodBoolean>;
2518
+ }, "strip", z.ZodTypeAny, {
2519
+ type: "dismissed";
2520
+ key: string;
2521
+ inverted?: boolean | undefined;
2522
+ }, {
2523
+ type: "dismissed";
2524
+ key: string;
2525
+ inverted?: boolean | undefined;
2526
+ }>, z.ZodObject<{
2527
+ type: z.ZodLiteral<"cooldown_active">;
2528
+ key: z.ZodString;
2529
+ inverted: z.ZodOptional<z.ZodBoolean>;
2530
+ }, "strip", z.ZodTypeAny, {
2531
+ type: "cooldown_active";
2532
+ key: string;
2533
+ inverted?: boolean | undefined;
2534
+ }, {
2535
+ type: "cooldown_active";
2536
+ key: string;
2537
+ inverted?: boolean | undefined;
2538
+ }>, z.ZodObject<{
2539
+ type: z.ZodLiteral<"frequency_limit">;
2540
+ key: z.ZodString;
2541
+ limit: z.ZodNumber;
2542
+ inverted: z.ZodOptional<z.ZodBoolean>;
2543
+ }, "strip", z.ZodTypeAny, {
2544
+ type: "frequency_limit";
2545
+ key: string;
2546
+ limit: number;
2547
+ inverted?: boolean | undefined;
2548
+ }, {
2549
+ type: "frequency_limit";
2550
+ key: string;
2551
+ limit: number;
2552
+ inverted?: boolean | undefined;
2553
+ }>, z.ZodObject<{
2554
+ type: z.ZodLiteral<"event_count">;
2555
+ key: z.ZodString;
2556
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
2557
+ count: z.ZodNumber;
2558
+ withinMs: z.ZodOptional<z.ZodNumber>;
2559
+ }, "strip", z.ZodTypeAny, {
2560
+ type: "event_count";
2561
+ key: string;
2562
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2563
+ count: number;
2564
+ withinMs?: number | undefined;
2565
+ }, {
2566
+ type: "event_count";
2567
+ key: string;
2568
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2569
+ count: number;
2570
+ withinMs?: number | undefined;
2571
+ }>]>, "many">;
2572
+ value: z.ZodUnknown;
2573
+ }, "strip", z.ZodTypeAny, {
2574
+ conditions: ({
2575
+ url: string;
2576
+ type: "page_url";
2577
+ } | {
2578
+ type: "route";
2579
+ routeId: string;
2580
+ } | {
2581
+ anchorId: string;
2582
+ state: "visible" | "present" | "absent";
2583
+ type: "anchor_visible";
2584
+ } | {
2585
+ type: "event_occurred";
2586
+ eventName: string;
2587
+ withinMs?: number | undefined;
2588
+ } | {
2589
+ type: "state_equals";
2590
+ key: string;
2591
+ value?: unknown;
2592
+ } | {
2593
+ type: "viewport";
2594
+ minWidth?: number | undefined;
2595
+ maxWidth?: number | undefined;
2596
+ minHeight?: number | undefined;
2597
+ maxHeight?: number | undefined;
2598
+ } | {
2599
+ type: "session_metric";
2600
+ key: string;
2601
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2602
+ threshold: number;
2603
+ } | {
2604
+ type: "dismissed";
2605
+ key: string;
2606
+ inverted?: boolean | undefined;
2607
+ } | {
2608
+ type: "cooldown_active";
2609
+ key: string;
2610
+ inverted?: boolean | undefined;
2611
+ } | {
2612
+ type: "frequency_limit";
2613
+ key: string;
2614
+ limit: number;
2615
+ inverted?: boolean | undefined;
2616
+ } | {
2617
+ type: "event_count";
2618
+ key: string;
2619
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2620
+ count: number;
2621
+ withinMs?: number | undefined;
2622
+ })[];
2623
+ value?: unknown;
2624
+ }, {
2625
+ conditions: ({
2626
+ url: string;
2627
+ type: "page_url";
2628
+ } | {
2629
+ type: "route";
2630
+ routeId: string;
2631
+ } | {
2632
+ anchorId: string;
2633
+ state: "visible" | "present" | "absent";
2634
+ type: "anchor_visible";
2635
+ } | {
2636
+ type: "event_occurred";
2637
+ eventName: string;
2638
+ withinMs?: number | undefined;
2639
+ } | {
2640
+ type: "state_equals";
2641
+ key: string;
2642
+ value?: unknown;
2643
+ } | {
2644
+ type: "viewport";
2645
+ minWidth?: number | undefined;
2646
+ maxWidth?: number | undefined;
2647
+ minHeight?: number | undefined;
2648
+ maxHeight?: number | undefined;
2649
+ } | {
2650
+ type: "session_metric";
2651
+ key: string;
2652
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2653
+ threshold: number;
2654
+ } | {
2655
+ type: "dismissed";
2656
+ key: string;
2657
+ inverted?: boolean | undefined;
2658
+ } | {
2659
+ type: "cooldown_active";
2660
+ key: string;
2661
+ inverted?: boolean | undefined;
2662
+ } | {
2663
+ type: "frequency_limit";
2664
+ key: string;
2665
+ limit: number;
2666
+ inverted?: boolean | undefined;
2667
+ } | {
2668
+ type: "event_count";
2669
+ key: string;
2670
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2671
+ count: number;
2672
+ withinMs?: number | undefined;
2673
+ })[];
2674
+ value?: unknown;
2675
+ }>, "many">;
2676
+ default: z.ZodUnknown;
2677
+ }, "strip", z.ZodTypeAny, {
2678
+ type: "rules";
2679
+ rules: {
2680
+ conditions: ({
2681
+ url: string;
2682
+ type: "page_url";
2683
+ } | {
2684
+ type: "route";
2685
+ routeId: string;
2686
+ } | {
2687
+ anchorId: string;
2688
+ state: "visible" | "present" | "absent";
2689
+ type: "anchor_visible";
2690
+ } | {
2691
+ type: "event_occurred";
2692
+ eventName: string;
2693
+ withinMs?: number | undefined;
2694
+ } | {
2695
+ type: "state_equals";
2696
+ key: string;
2697
+ value?: unknown;
2698
+ } | {
2699
+ type: "viewport";
2700
+ minWidth?: number | undefined;
2701
+ maxWidth?: number | undefined;
2702
+ minHeight?: number | undefined;
2703
+ maxHeight?: number | undefined;
2704
+ } | {
2705
+ type: "session_metric";
2706
+ key: string;
2707
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2708
+ threshold: number;
2709
+ } | {
2710
+ type: "dismissed";
2711
+ key: string;
2712
+ inverted?: boolean | undefined;
2713
+ } | {
2714
+ type: "cooldown_active";
2715
+ key: string;
2716
+ inverted?: boolean | undefined;
2717
+ } | {
2718
+ type: "frequency_limit";
2719
+ key: string;
2720
+ limit: number;
2721
+ inverted?: boolean | undefined;
2722
+ } | {
2723
+ type: "event_count";
2724
+ key: string;
2725
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2726
+ count: number;
2727
+ withinMs?: number | undefined;
2728
+ })[];
2729
+ value?: unknown;
2730
+ }[];
2731
+ default?: unknown;
2732
+ }, {
2733
+ type: "rules";
2734
+ rules: {
2735
+ conditions: ({
2736
+ url: string;
2737
+ type: "page_url";
2738
+ } | {
2739
+ type: "route";
2740
+ routeId: string;
2741
+ } | {
2742
+ anchorId: string;
2743
+ state: "visible" | "present" | "absent";
2744
+ type: "anchor_visible";
2745
+ } | {
2746
+ type: "event_occurred";
2747
+ eventName: string;
2748
+ withinMs?: number | undefined;
2749
+ } | {
2750
+ type: "state_equals";
2751
+ key: string;
2752
+ value?: unknown;
2753
+ } | {
2754
+ type: "viewport";
2755
+ minWidth?: number | undefined;
2756
+ maxWidth?: number | undefined;
2757
+ minHeight?: number | undefined;
2758
+ maxHeight?: number | undefined;
2759
+ } | {
2760
+ type: "session_metric";
2761
+ key: string;
2762
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2763
+ threshold: number;
2764
+ } | {
2765
+ type: "dismissed";
2766
+ key: string;
2767
+ inverted?: boolean | undefined;
2768
+ } | {
2769
+ type: "cooldown_active";
2770
+ key: string;
2771
+ inverted?: boolean | undefined;
2772
+ } | {
2773
+ type: "frequency_limit";
2774
+ key: string;
2775
+ limit: number;
2776
+ inverted?: boolean | undefined;
2777
+ } | {
2778
+ type: "event_count";
2779
+ key: string;
2780
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2781
+ count: number;
2782
+ withinMs?: number | undefined;
2783
+ })[];
2784
+ value?: unknown;
2785
+ }[];
2786
+ default?: unknown;
2787
+ }>, z.ZodObject<{
2788
+ type: z.ZodLiteral<"score">;
2789
+ field: z.ZodString;
2790
+ threshold: z.ZodNumber;
2791
+ above: z.ZodUnknown;
2792
+ below: z.ZodUnknown;
2793
+ }, "strip", z.ZodTypeAny, {
2794
+ type: "score";
2795
+ threshold: number;
2796
+ field: string;
2797
+ above?: unknown;
2798
+ below?: unknown;
2799
+ }, {
2800
+ type: "score";
2801
+ threshold: number;
2802
+ field: string;
2803
+ above?: unknown;
2804
+ below?: unknown;
2805
+ }>, z.ZodObject<{
2806
+ type: z.ZodLiteral<"model">;
2807
+ modelId: z.ZodString;
2808
+ inputs: z.ZodArray<z.ZodString, "many">;
2809
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2810
+ default: z.ZodUnknown;
2811
+ }, "strip", z.ZodTypeAny, {
2812
+ type: "model";
2813
+ modelId: string;
2814
+ inputs: string[];
2815
+ outputMapping: Record<string, unknown>;
2816
+ default?: unknown;
2817
+ }, {
2818
+ type: "model";
2819
+ modelId: string;
2820
+ inputs: string[];
2821
+ outputMapping: Record<string, unknown>;
2822
+ default?: unknown;
2823
+ }>, z.ZodObject<{
2824
+ type: z.ZodLiteral<"external">;
2825
+ endpoint: z.ZodString;
2826
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
2827
+ default: z.ZodUnknown;
2828
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
2829
+ }, "strip", z.ZodTypeAny, {
2830
+ type: "external";
2831
+ endpoint: string;
2832
+ timeoutMs?: number | undefined;
2833
+ default?: unknown;
2834
+ method?: "GET" | "POST" | undefined;
2835
+ }, {
2836
+ type: "external";
2837
+ endpoint: string;
2838
+ timeoutMs?: number | undefined;
2839
+ default?: unknown;
2840
+ method?: "GET" | "POST" | undefined;
2841
+ }>]>>;
2842
+ }, "strip", z.ZodTypeAny, {
2843
+ routes: {
2844
+ exclude?: string[] | undefined;
2845
+ include?: string[] | undefined;
2846
+ };
2847
+ strategy?: {
2848
+ type: "rules";
2849
+ rules: {
2850
+ conditions: ({
2851
+ url: string;
2852
+ type: "page_url";
2853
+ } | {
2854
+ type: "route";
2855
+ routeId: string;
2856
+ } | {
2857
+ anchorId: string;
2858
+ state: "visible" | "present" | "absent";
2859
+ type: "anchor_visible";
2860
+ } | {
2861
+ type: "event_occurred";
2862
+ eventName: string;
2863
+ withinMs?: number | undefined;
2864
+ } | {
2865
+ type: "state_equals";
2866
+ key: string;
2867
+ value?: unknown;
2868
+ } | {
2869
+ type: "viewport";
2870
+ minWidth?: number | undefined;
2871
+ maxWidth?: number | undefined;
2872
+ minHeight?: number | undefined;
2873
+ maxHeight?: number | undefined;
2874
+ } | {
2875
+ type: "session_metric";
2876
+ key: string;
2877
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2878
+ threshold: number;
2879
+ } | {
2880
+ type: "dismissed";
2881
+ key: string;
2882
+ inverted?: boolean | undefined;
2883
+ } | {
2884
+ type: "cooldown_active";
2885
+ key: string;
2886
+ inverted?: boolean | undefined;
2887
+ } | {
2888
+ type: "frequency_limit";
2889
+ key: string;
2890
+ limit: number;
2891
+ inverted?: boolean | undefined;
2892
+ } | {
2893
+ type: "event_count";
2894
+ key: string;
2895
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2896
+ count: number;
2897
+ withinMs?: number | undefined;
2898
+ })[];
2899
+ value?: unknown;
2900
+ }[];
2901
+ default?: unknown;
2902
+ } | {
2903
+ type: "score";
2904
+ threshold: number;
2905
+ field: string;
2906
+ above?: unknown;
2907
+ below?: unknown;
2908
+ } | {
2909
+ type: "model";
2910
+ modelId: string;
2911
+ inputs: string[];
2912
+ outputMapping: Record<string, unknown>;
2913
+ default?: unknown;
2914
+ } | {
2915
+ type: "external";
2916
+ endpoint: string;
2917
+ timeoutMs?: number | undefined;
2918
+ default?: unknown;
2919
+ method?: "GET" | "POST" | undefined;
2920
+ } | undefined;
2921
+ }, {
2922
+ routes: {
2923
+ exclude?: string[] | undefined;
2924
+ include?: string[] | undefined;
2925
+ };
2926
+ strategy?: {
2927
+ type: "rules";
2928
+ rules: {
2929
+ conditions: ({
2930
+ url: string;
2931
+ type: "page_url";
2932
+ } | {
2933
+ type: "route";
2934
+ routeId: string;
2935
+ } | {
2936
+ anchorId: string;
2937
+ state: "visible" | "present" | "absent";
2938
+ type: "anchor_visible";
2939
+ } | {
2940
+ type: "event_occurred";
2941
+ eventName: string;
2942
+ withinMs?: number | undefined;
2943
+ } | {
2944
+ type: "state_equals";
2945
+ key: string;
2946
+ value?: unknown;
2947
+ } | {
2948
+ type: "viewport";
2949
+ minWidth?: number | undefined;
2950
+ maxWidth?: number | undefined;
2951
+ minHeight?: number | undefined;
2952
+ maxHeight?: number | undefined;
2953
+ } | {
2954
+ type: "session_metric";
2955
+ key: string;
2956
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2957
+ threshold: number;
2958
+ } | {
2959
+ type: "dismissed";
2960
+ key: string;
2961
+ inverted?: boolean | undefined;
2962
+ } | {
2963
+ type: "cooldown_active";
2964
+ key: string;
2965
+ inverted?: boolean | undefined;
2966
+ } | {
2967
+ type: "frequency_limit";
2968
+ key: string;
2969
+ limit: number;
2970
+ inverted?: boolean | undefined;
2971
+ } | {
2972
+ type: "event_count";
2973
+ key: string;
2974
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2975
+ count: number;
2976
+ withinMs?: number | undefined;
2977
+ })[];
2978
+ value?: unknown;
2979
+ }[];
2980
+ default?: unknown;
2981
+ } | {
2982
+ type: "score";
2983
+ threshold: number;
2984
+ field: string;
2985
+ above?: unknown;
2986
+ below?: unknown;
2987
+ } | {
2988
+ type: "model";
2989
+ modelId: string;
2990
+ inputs: string[];
2991
+ outputMapping: Record<string, unknown>;
2992
+ default?: unknown;
2993
+ } | {
2994
+ type: "external";
2995
+ endpoint: string;
2996
+ timeoutMs?: number | undefined;
2997
+ default?: unknown;
2998
+ method?: "GET" | "POST" | undefined;
2999
+ } | undefined;
3000
+ }>;
3001
+ } | {
3002
+ defName: string;
3003
+ schema: z.ZodObject<{
3004
+ include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3005
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3006
+ }, "strip", z.ZodTypeAny, {
2400
3007
  exclude?: string[] | undefined;
2401
3008
  include?: string[] | undefined;
2402
- } | undefined;
2403
- }>;
3009
+ }, {
3010
+ exclude?: string[] | undefined;
3011
+ include?: string[] | undefined;
3012
+ }>;
3013
+ } | {
3014
+ defName: string;
3015
+ schema: z.ZodObject<{
3016
+ type: z.ZodLiteral<"rules">;
3017
+ rules: z.ZodArray<z.ZodObject<{
3018
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3019
+ type: z.ZodLiteral<"page_url">;
3020
+ url: z.ZodString;
3021
+ }, "strip", z.ZodTypeAny, {
3022
+ url: string;
3023
+ type: "page_url";
3024
+ }, {
3025
+ url: string;
3026
+ type: "page_url";
3027
+ }>, z.ZodObject<{
3028
+ type: z.ZodLiteral<"route">;
3029
+ routeId: z.ZodString;
3030
+ }, "strip", z.ZodTypeAny, {
3031
+ type: "route";
3032
+ routeId: string;
3033
+ }, {
3034
+ type: "route";
3035
+ routeId: string;
3036
+ }>, z.ZodObject<{
3037
+ type: z.ZodLiteral<"anchor_visible">;
3038
+ anchorId: z.ZodString;
3039
+ state: z.ZodEnum<["visible", "present", "absent"]>;
3040
+ }, "strip", z.ZodTypeAny, {
3041
+ anchorId: string;
3042
+ state: "visible" | "present" | "absent";
3043
+ type: "anchor_visible";
3044
+ }, {
3045
+ anchorId: string;
3046
+ state: "visible" | "present" | "absent";
3047
+ type: "anchor_visible";
3048
+ }>, z.ZodObject<{
3049
+ type: z.ZodLiteral<"event_occurred">;
3050
+ eventName: z.ZodString;
3051
+ withinMs: z.ZodOptional<z.ZodNumber>;
3052
+ }, "strip", z.ZodTypeAny, {
3053
+ type: "event_occurred";
3054
+ eventName: string;
3055
+ withinMs?: number | undefined;
3056
+ }, {
3057
+ type: "event_occurred";
3058
+ eventName: string;
3059
+ withinMs?: number | undefined;
3060
+ }>, z.ZodObject<{
3061
+ type: z.ZodLiteral<"state_equals">;
3062
+ key: z.ZodString;
3063
+ value: z.ZodUnknown;
3064
+ }, "strip", z.ZodTypeAny, {
3065
+ type: "state_equals";
3066
+ key: string;
3067
+ value?: unknown;
3068
+ }, {
3069
+ type: "state_equals";
3070
+ key: string;
3071
+ value?: unknown;
3072
+ }>, z.ZodObject<{
3073
+ type: z.ZodLiteral<"viewport">;
3074
+ minWidth: z.ZodOptional<z.ZodNumber>;
3075
+ maxWidth: z.ZodOptional<z.ZodNumber>;
3076
+ minHeight: z.ZodOptional<z.ZodNumber>;
3077
+ maxHeight: z.ZodOptional<z.ZodNumber>;
3078
+ }, "strip", z.ZodTypeAny, {
3079
+ type: "viewport";
3080
+ minWidth?: number | undefined;
3081
+ maxWidth?: number | undefined;
3082
+ minHeight?: number | undefined;
3083
+ maxHeight?: number | undefined;
3084
+ }, {
3085
+ type: "viewport";
3086
+ minWidth?: number | undefined;
3087
+ maxWidth?: number | undefined;
3088
+ minHeight?: number | undefined;
3089
+ maxHeight?: number | undefined;
3090
+ }>, z.ZodObject<{
3091
+ type: z.ZodLiteral<"session_metric">;
3092
+ key: z.ZodString;
3093
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
3094
+ threshold: z.ZodNumber;
3095
+ }, "strip", z.ZodTypeAny, {
3096
+ type: "session_metric";
3097
+ key: string;
3098
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3099
+ threshold: number;
3100
+ }, {
3101
+ type: "session_metric";
3102
+ key: string;
3103
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3104
+ threshold: number;
3105
+ }>, z.ZodObject<{
3106
+ type: z.ZodLiteral<"dismissed">;
3107
+ key: z.ZodString;
3108
+ inverted: z.ZodOptional<z.ZodBoolean>;
3109
+ }, "strip", z.ZodTypeAny, {
3110
+ type: "dismissed";
3111
+ key: string;
3112
+ inverted?: boolean | undefined;
3113
+ }, {
3114
+ type: "dismissed";
3115
+ key: string;
3116
+ inverted?: boolean | undefined;
3117
+ }>, z.ZodObject<{
3118
+ type: z.ZodLiteral<"cooldown_active">;
3119
+ key: z.ZodString;
3120
+ inverted: z.ZodOptional<z.ZodBoolean>;
3121
+ }, "strip", z.ZodTypeAny, {
3122
+ type: "cooldown_active";
3123
+ key: string;
3124
+ inverted?: boolean | undefined;
3125
+ }, {
3126
+ type: "cooldown_active";
3127
+ key: string;
3128
+ inverted?: boolean | undefined;
3129
+ }>, z.ZodObject<{
3130
+ type: z.ZodLiteral<"frequency_limit">;
3131
+ key: z.ZodString;
3132
+ limit: z.ZodNumber;
3133
+ inverted: z.ZodOptional<z.ZodBoolean>;
3134
+ }, "strip", z.ZodTypeAny, {
3135
+ type: "frequency_limit";
3136
+ key: string;
3137
+ limit: number;
3138
+ inverted?: boolean | undefined;
3139
+ }, {
3140
+ type: "frequency_limit";
3141
+ key: string;
3142
+ limit: number;
3143
+ inverted?: boolean | undefined;
3144
+ }>, z.ZodObject<{
3145
+ type: z.ZodLiteral<"event_count">;
3146
+ key: z.ZodString;
3147
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
3148
+ count: z.ZodNumber;
3149
+ withinMs: z.ZodOptional<z.ZodNumber>;
3150
+ }, "strip", z.ZodTypeAny, {
3151
+ type: "event_count";
3152
+ key: string;
3153
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3154
+ count: number;
3155
+ withinMs?: number | undefined;
3156
+ }, {
3157
+ type: "event_count";
3158
+ key: string;
3159
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3160
+ count: number;
3161
+ withinMs?: number | undefined;
3162
+ }>]>, "many">;
3163
+ value: z.ZodUnknown;
3164
+ }, "strip", z.ZodTypeAny, {
3165
+ conditions: ({
3166
+ url: string;
3167
+ type: "page_url";
3168
+ } | {
3169
+ type: "route";
3170
+ routeId: string;
3171
+ } | {
3172
+ anchorId: string;
3173
+ state: "visible" | "present" | "absent";
3174
+ type: "anchor_visible";
3175
+ } | {
3176
+ type: "event_occurred";
3177
+ eventName: string;
3178
+ withinMs?: number | undefined;
3179
+ } | {
3180
+ type: "state_equals";
3181
+ key: string;
3182
+ value?: unknown;
3183
+ } | {
3184
+ type: "viewport";
3185
+ minWidth?: number | undefined;
3186
+ maxWidth?: number | undefined;
3187
+ minHeight?: number | undefined;
3188
+ maxHeight?: number | undefined;
3189
+ } | {
3190
+ type: "session_metric";
3191
+ key: string;
3192
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3193
+ threshold: number;
3194
+ } | {
3195
+ type: "dismissed";
3196
+ key: string;
3197
+ inverted?: boolean | undefined;
3198
+ } | {
3199
+ type: "cooldown_active";
3200
+ key: string;
3201
+ inverted?: boolean | undefined;
3202
+ } | {
3203
+ type: "frequency_limit";
3204
+ key: string;
3205
+ limit: number;
3206
+ inverted?: boolean | undefined;
3207
+ } | {
3208
+ type: "event_count";
3209
+ key: string;
3210
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3211
+ count: number;
3212
+ withinMs?: number | undefined;
3213
+ })[];
3214
+ value?: unknown;
3215
+ }, {
3216
+ conditions: ({
3217
+ url: string;
3218
+ type: "page_url";
3219
+ } | {
3220
+ type: "route";
3221
+ routeId: string;
3222
+ } | {
3223
+ anchorId: string;
3224
+ state: "visible" | "present" | "absent";
3225
+ type: "anchor_visible";
3226
+ } | {
3227
+ type: "event_occurred";
3228
+ eventName: string;
3229
+ withinMs?: number | undefined;
3230
+ } | {
3231
+ type: "state_equals";
3232
+ key: string;
3233
+ value?: unknown;
3234
+ } | {
3235
+ type: "viewport";
3236
+ minWidth?: number | undefined;
3237
+ maxWidth?: number | undefined;
3238
+ minHeight?: number | undefined;
3239
+ maxHeight?: number | undefined;
3240
+ } | {
3241
+ type: "session_metric";
3242
+ key: string;
3243
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3244
+ threshold: number;
3245
+ } | {
3246
+ type: "dismissed";
3247
+ key: string;
3248
+ inverted?: boolean | undefined;
3249
+ } | {
3250
+ type: "cooldown_active";
3251
+ key: string;
3252
+ inverted?: boolean | undefined;
3253
+ } | {
3254
+ type: "frequency_limit";
3255
+ key: string;
3256
+ limit: number;
3257
+ inverted?: boolean | undefined;
3258
+ } | {
3259
+ type: "event_count";
3260
+ key: string;
3261
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3262
+ count: number;
3263
+ withinMs?: number | undefined;
3264
+ })[];
3265
+ value?: unknown;
3266
+ }>, "many">;
3267
+ default: z.ZodUnknown;
3268
+ }, "strip", z.ZodTypeAny, {
3269
+ type: "rules";
3270
+ rules: {
3271
+ conditions: ({
3272
+ url: string;
3273
+ type: "page_url";
3274
+ } | {
3275
+ type: "route";
3276
+ routeId: string;
3277
+ } | {
3278
+ anchorId: string;
3279
+ state: "visible" | "present" | "absent";
3280
+ type: "anchor_visible";
3281
+ } | {
3282
+ type: "event_occurred";
3283
+ eventName: string;
3284
+ withinMs?: number | undefined;
3285
+ } | {
3286
+ type: "state_equals";
3287
+ key: string;
3288
+ value?: unknown;
3289
+ } | {
3290
+ type: "viewport";
3291
+ minWidth?: number | undefined;
3292
+ maxWidth?: number | undefined;
3293
+ minHeight?: number | undefined;
3294
+ maxHeight?: number | undefined;
3295
+ } | {
3296
+ type: "session_metric";
3297
+ key: string;
3298
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3299
+ threshold: number;
3300
+ } | {
3301
+ type: "dismissed";
3302
+ key: string;
3303
+ inverted?: boolean | undefined;
3304
+ } | {
3305
+ type: "cooldown_active";
3306
+ key: string;
3307
+ inverted?: boolean | undefined;
3308
+ } | {
3309
+ type: "frequency_limit";
3310
+ key: string;
3311
+ limit: number;
3312
+ inverted?: boolean | undefined;
3313
+ } | {
3314
+ type: "event_count";
3315
+ key: string;
3316
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3317
+ count: number;
3318
+ withinMs?: number | undefined;
3319
+ })[];
3320
+ value?: unknown;
3321
+ }[];
3322
+ default?: unknown;
3323
+ }, {
3324
+ type: "rules";
3325
+ rules: {
3326
+ conditions: ({
3327
+ url: string;
3328
+ type: "page_url";
3329
+ } | {
3330
+ type: "route";
3331
+ routeId: string;
3332
+ } | {
3333
+ anchorId: string;
3334
+ state: "visible" | "present" | "absent";
3335
+ type: "anchor_visible";
3336
+ } | {
3337
+ type: "event_occurred";
3338
+ eventName: string;
3339
+ withinMs?: number | undefined;
3340
+ } | {
3341
+ type: "state_equals";
3342
+ key: string;
3343
+ value?: unknown;
3344
+ } | {
3345
+ type: "viewport";
3346
+ minWidth?: number | undefined;
3347
+ maxWidth?: number | undefined;
3348
+ minHeight?: number | undefined;
3349
+ maxHeight?: number | undefined;
3350
+ } | {
3351
+ type: "session_metric";
3352
+ key: string;
3353
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3354
+ threshold: number;
3355
+ } | {
3356
+ type: "dismissed";
3357
+ key: string;
3358
+ inverted?: boolean | undefined;
3359
+ } | {
3360
+ type: "cooldown_active";
3361
+ key: string;
3362
+ inverted?: boolean | undefined;
3363
+ } | {
3364
+ type: "frequency_limit";
3365
+ key: string;
3366
+ limit: number;
3367
+ inverted?: boolean | undefined;
3368
+ } | {
3369
+ type: "event_count";
3370
+ key: string;
3371
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3372
+ count: number;
3373
+ withinMs?: number | undefined;
3374
+ })[];
3375
+ value?: unknown;
3376
+ }[];
3377
+ default?: unknown;
3378
+ }>;
3379
+ } | {
3380
+ defName: string;
3381
+ schema: z.ZodObject<{
3382
+ type: z.ZodLiteral<"score">;
3383
+ field: z.ZodString;
3384
+ threshold: z.ZodNumber;
3385
+ above: z.ZodUnknown;
3386
+ below: z.ZodUnknown;
3387
+ }, "strip", z.ZodTypeAny, {
3388
+ type: "score";
3389
+ threshold: number;
3390
+ field: string;
3391
+ above?: unknown;
3392
+ below?: unknown;
3393
+ }, {
3394
+ type: "score";
3395
+ threshold: number;
3396
+ field: string;
3397
+ above?: unknown;
3398
+ below?: unknown;
3399
+ }>;
3400
+ } | {
3401
+ defName: string;
3402
+ schema: z.ZodObject<{
3403
+ type: z.ZodLiteral<"model">;
3404
+ modelId: z.ZodString;
3405
+ inputs: z.ZodArray<z.ZodString, "many">;
3406
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3407
+ default: z.ZodUnknown;
3408
+ }, "strip", z.ZodTypeAny, {
3409
+ type: "model";
3410
+ modelId: string;
3411
+ inputs: string[];
3412
+ outputMapping: Record<string, unknown>;
3413
+ default?: unknown;
3414
+ }, {
3415
+ type: "model";
3416
+ modelId: string;
3417
+ inputs: string[];
3418
+ outputMapping: Record<string, unknown>;
3419
+ default?: unknown;
3420
+ }>;
3421
+ } | {
3422
+ defName: string;
3423
+ schema: z.ZodObject<{
3424
+ type: z.ZodLiteral<"external">;
3425
+ endpoint: z.ZodString;
3426
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
3427
+ default: z.ZodUnknown;
3428
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
3429
+ }, "strip", z.ZodTypeAny, {
3430
+ type: "external";
3431
+ endpoint: string;
3432
+ timeoutMs?: number | undefined;
3433
+ default?: unknown;
3434
+ method?: "GET" | "POST" | undefined;
3435
+ }, {
3436
+ type: "external";
3437
+ endpoint: string;
3438
+ timeoutMs?: number | undefined;
3439
+ default?: unknown;
3440
+ method?: "GET" | "POST" | undefined;
3441
+ }>;
3442
+ } | {
3443
+ defName: string;
3444
+ schema: z.ZodObject<{
3445
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3446
+ type: z.ZodLiteral<"page_url">;
3447
+ url: z.ZodString;
3448
+ }, "strip", z.ZodTypeAny, {
3449
+ url: string;
3450
+ type: "page_url";
3451
+ }, {
3452
+ url: string;
3453
+ type: "page_url";
3454
+ }>, z.ZodObject<{
3455
+ type: z.ZodLiteral<"route">;
3456
+ routeId: z.ZodString;
3457
+ }, "strip", z.ZodTypeAny, {
3458
+ type: "route";
3459
+ routeId: string;
3460
+ }, {
3461
+ type: "route";
3462
+ routeId: string;
3463
+ }>, z.ZodObject<{
3464
+ type: z.ZodLiteral<"anchor_visible">;
3465
+ anchorId: z.ZodString;
3466
+ state: z.ZodEnum<["visible", "present", "absent"]>;
3467
+ }, "strip", z.ZodTypeAny, {
3468
+ anchorId: string;
3469
+ state: "visible" | "present" | "absent";
3470
+ type: "anchor_visible";
3471
+ }, {
3472
+ anchorId: string;
3473
+ state: "visible" | "present" | "absent";
3474
+ type: "anchor_visible";
3475
+ }>, z.ZodObject<{
3476
+ type: z.ZodLiteral<"event_occurred">;
3477
+ eventName: z.ZodString;
3478
+ withinMs: z.ZodOptional<z.ZodNumber>;
3479
+ }, "strip", z.ZodTypeAny, {
3480
+ type: "event_occurred";
3481
+ eventName: string;
3482
+ withinMs?: number | undefined;
3483
+ }, {
3484
+ type: "event_occurred";
3485
+ eventName: string;
3486
+ withinMs?: number | undefined;
3487
+ }>, z.ZodObject<{
3488
+ type: z.ZodLiteral<"state_equals">;
3489
+ key: z.ZodString;
3490
+ value: z.ZodUnknown;
3491
+ }, "strip", z.ZodTypeAny, {
3492
+ type: "state_equals";
3493
+ key: string;
3494
+ value?: unknown;
3495
+ }, {
3496
+ type: "state_equals";
3497
+ key: string;
3498
+ value?: unknown;
3499
+ }>, z.ZodObject<{
3500
+ type: z.ZodLiteral<"viewport">;
3501
+ minWidth: z.ZodOptional<z.ZodNumber>;
3502
+ maxWidth: z.ZodOptional<z.ZodNumber>;
3503
+ minHeight: z.ZodOptional<z.ZodNumber>;
3504
+ maxHeight: z.ZodOptional<z.ZodNumber>;
3505
+ }, "strip", z.ZodTypeAny, {
3506
+ type: "viewport";
3507
+ minWidth?: number | undefined;
3508
+ maxWidth?: number | undefined;
3509
+ minHeight?: number | undefined;
3510
+ maxHeight?: number | undefined;
3511
+ }, {
3512
+ type: "viewport";
3513
+ minWidth?: number | undefined;
3514
+ maxWidth?: number | undefined;
3515
+ minHeight?: number | undefined;
3516
+ maxHeight?: number | undefined;
3517
+ }>, z.ZodObject<{
3518
+ type: z.ZodLiteral<"session_metric">;
3519
+ key: z.ZodString;
3520
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
3521
+ threshold: z.ZodNumber;
3522
+ }, "strip", z.ZodTypeAny, {
3523
+ type: "session_metric";
3524
+ key: string;
3525
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3526
+ threshold: number;
3527
+ }, {
3528
+ type: "session_metric";
3529
+ key: string;
3530
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3531
+ threshold: number;
3532
+ }>, z.ZodObject<{
3533
+ type: z.ZodLiteral<"dismissed">;
3534
+ key: z.ZodString;
3535
+ inverted: z.ZodOptional<z.ZodBoolean>;
3536
+ }, "strip", z.ZodTypeAny, {
3537
+ type: "dismissed";
3538
+ key: string;
3539
+ inverted?: boolean | undefined;
3540
+ }, {
3541
+ type: "dismissed";
3542
+ key: string;
3543
+ inverted?: boolean | undefined;
3544
+ }>, z.ZodObject<{
3545
+ type: z.ZodLiteral<"cooldown_active">;
3546
+ key: z.ZodString;
3547
+ inverted: z.ZodOptional<z.ZodBoolean>;
3548
+ }, "strip", z.ZodTypeAny, {
3549
+ type: "cooldown_active";
3550
+ key: string;
3551
+ inverted?: boolean | undefined;
3552
+ }, {
3553
+ type: "cooldown_active";
3554
+ key: string;
3555
+ inverted?: boolean | undefined;
3556
+ }>, z.ZodObject<{
3557
+ type: z.ZodLiteral<"frequency_limit">;
3558
+ key: z.ZodString;
3559
+ limit: z.ZodNumber;
3560
+ inverted: z.ZodOptional<z.ZodBoolean>;
3561
+ }, "strip", z.ZodTypeAny, {
3562
+ type: "frequency_limit";
3563
+ key: string;
3564
+ limit: number;
3565
+ inverted?: boolean | undefined;
3566
+ }, {
3567
+ type: "frequency_limit";
3568
+ key: string;
3569
+ limit: number;
3570
+ inverted?: boolean | undefined;
3571
+ }>, z.ZodObject<{
3572
+ type: z.ZodLiteral<"event_count">;
3573
+ key: z.ZodString;
3574
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
3575
+ count: z.ZodNumber;
3576
+ withinMs: z.ZodOptional<z.ZodNumber>;
3577
+ }, "strip", z.ZodTypeAny, {
3578
+ type: "event_count";
3579
+ key: string;
3580
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3581
+ count: number;
3582
+ withinMs?: number | undefined;
3583
+ }, {
3584
+ type: "event_count";
3585
+ key: string;
3586
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3587
+ count: number;
3588
+ withinMs?: number | undefined;
3589
+ }>]>, "many">;
3590
+ value: z.ZodUnknown;
3591
+ }, "strip", z.ZodTypeAny, {
3592
+ conditions: ({
3593
+ url: string;
3594
+ type: "page_url";
3595
+ } | {
3596
+ type: "route";
3597
+ routeId: string;
3598
+ } | {
3599
+ anchorId: string;
3600
+ state: "visible" | "present" | "absent";
3601
+ type: "anchor_visible";
3602
+ } | {
3603
+ type: "event_occurred";
3604
+ eventName: string;
3605
+ withinMs?: number | undefined;
3606
+ } | {
3607
+ type: "state_equals";
3608
+ key: string;
3609
+ value?: unknown;
3610
+ } | {
3611
+ type: "viewport";
3612
+ minWidth?: number | undefined;
3613
+ maxWidth?: number | undefined;
3614
+ minHeight?: number | undefined;
3615
+ maxHeight?: number | undefined;
3616
+ } | {
3617
+ type: "session_metric";
3618
+ key: string;
3619
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3620
+ threshold: number;
3621
+ } | {
3622
+ type: "dismissed";
3623
+ key: string;
3624
+ inverted?: boolean | undefined;
3625
+ } | {
3626
+ type: "cooldown_active";
3627
+ key: string;
3628
+ inverted?: boolean | undefined;
3629
+ } | {
3630
+ type: "frequency_limit";
3631
+ key: string;
3632
+ limit: number;
3633
+ inverted?: boolean | undefined;
3634
+ } | {
3635
+ type: "event_count";
3636
+ key: string;
3637
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3638
+ count: number;
3639
+ withinMs?: number | undefined;
3640
+ })[];
3641
+ value?: unknown;
3642
+ }, {
3643
+ conditions: ({
3644
+ url: string;
3645
+ type: "page_url";
3646
+ } | {
3647
+ type: "route";
3648
+ routeId: string;
3649
+ } | {
3650
+ anchorId: string;
3651
+ state: "visible" | "present" | "absent";
3652
+ type: "anchor_visible";
3653
+ } | {
3654
+ type: "event_occurred";
3655
+ eventName: string;
3656
+ withinMs?: number | undefined;
3657
+ } | {
3658
+ type: "state_equals";
3659
+ key: string;
3660
+ value?: unknown;
3661
+ } | {
3662
+ type: "viewport";
3663
+ minWidth?: number | undefined;
3664
+ maxWidth?: number | undefined;
3665
+ minHeight?: number | undefined;
3666
+ maxHeight?: number | undefined;
3667
+ } | {
3668
+ type: "session_metric";
3669
+ key: string;
3670
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3671
+ threshold: number;
3672
+ } | {
3673
+ type: "dismissed";
3674
+ key: string;
3675
+ inverted?: boolean | undefined;
3676
+ } | {
3677
+ type: "cooldown_active";
3678
+ key: string;
3679
+ inverted?: boolean | undefined;
3680
+ } | {
3681
+ type: "frequency_limit";
3682
+ key: string;
3683
+ limit: number;
3684
+ inverted?: boolean | undefined;
3685
+ } | {
3686
+ type: "event_count";
3687
+ key: string;
3688
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3689
+ count: number;
3690
+ withinMs?: number | undefined;
3691
+ })[];
3692
+ value?: unknown;
3693
+ }>;
3694
+ } | {
3695
+ defName: string;
3696
+ schema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3697
+ type: z.ZodLiteral<"page_url">;
3698
+ url: z.ZodString;
3699
+ }, "strip", z.ZodTypeAny, {
3700
+ url: string;
3701
+ type: "page_url";
3702
+ }, {
3703
+ url: string;
3704
+ type: "page_url";
3705
+ }>, z.ZodObject<{
3706
+ type: z.ZodLiteral<"route">;
3707
+ routeId: z.ZodString;
3708
+ }, "strip", z.ZodTypeAny, {
3709
+ type: "route";
3710
+ routeId: string;
3711
+ }, {
3712
+ type: "route";
3713
+ routeId: string;
3714
+ }>, z.ZodObject<{
3715
+ type: z.ZodLiteral<"anchor_visible">;
3716
+ anchorId: z.ZodString;
3717
+ state: z.ZodEnum<["visible", "present", "absent"]>;
3718
+ }, "strip", z.ZodTypeAny, {
3719
+ anchorId: string;
3720
+ state: "visible" | "present" | "absent";
3721
+ type: "anchor_visible";
3722
+ }, {
3723
+ anchorId: string;
3724
+ state: "visible" | "present" | "absent";
3725
+ type: "anchor_visible";
3726
+ }>, z.ZodObject<{
3727
+ type: z.ZodLiteral<"event_occurred">;
3728
+ eventName: z.ZodString;
3729
+ withinMs: z.ZodOptional<z.ZodNumber>;
3730
+ }, "strip", z.ZodTypeAny, {
3731
+ type: "event_occurred";
3732
+ eventName: string;
3733
+ withinMs?: number | undefined;
3734
+ }, {
3735
+ type: "event_occurred";
3736
+ eventName: string;
3737
+ withinMs?: number | undefined;
3738
+ }>, z.ZodObject<{
3739
+ type: z.ZodLiteral<"state_equals">;
3740
+ key: z.ZodString;
3741
+ value: z.ZodUnknown;
3742
+ }, "strip", z.ZodTypeAny, {
3743
+ type: "state_equals";
3744
+ key: string;
3745
+ value?: unknown;
3746
+ }, {
3747
+ type: "state_equals";
3748
+ key: string;
3749
+ value?: unknown;
3750
+ }>, z.ZodObject<{
3751
+ type: z.ZodLiteral<"viewport">;
3752
+ minWidth: z.ZodOptional<z.ZodNumber>;
3753
+ maxWidth: z.ZodOptional<z.ZodNumber>;
3754
+ minHeight: z.ZodOptional<z.ZodNumber>;
3755
+ maxHeight: z.ZodOptional<z.ZodNumber>;
3756
+ }, "strip", z.ZodTypeAny, {
3757
+ type: "viewport";
3758
+ minWidth?: number | undefined;
3759
+ maxWidth?: number | undefined;
3760
+ minHeight?: number | undefined;
3761
+ maxHeight?: number | undefined;
3762
+ }, {
3763
+ type: "viewport";
3764
+ minWidth?: number | undefined;
3765
+ maxWidth?: number | undefined;
3766
+ minHeight?: number | undefined;
3767
+ maxHeight?: number | undefined;
3768
+ }>, z.ZodObject<{
3769
+ type: z.ZodLiteral<"session_metric">;
3770
+ key: z.ZodString;
3771
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
3772
+ threshold: z.ZodNumber;
3773
+ }, "strip", z.ZodTypeAny, {
3774
+ type: "session_metric";
3775
+ key: string;
3776
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3777
+ threshold: number;
3778
+ }, {
3779
+ type: "session_metric";
3780
+ key: string;
3781
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3782
+ threshold: number;
3783
+ }>, z.ZodObject<{
3784
+ type: z.ZodLiteral<"dismissed">;
3785
+ key: z.ZodString;
3786
+ inverted: z.ZodOptional<z.ZodBoolean>;
3787
+ }, "strip", z.ZodTypeAny, {
3788
+ type: "dismissed";
3789
+ key: string;
3790
+ inverted?: boolean | undefined;
3791
+ }, {
3792
+ type: "dismissed";
3793
+ key: string;
3794
+ inverted?: boolean | undefined;
3795
+ }>, z.ZodObject<{
3796
+ type: z.ZodLiteral<"cooldown_active">;
3797
+ key: z.ZodString;
3798
+ inverted: z.ZodOptional<z.ZodBoolean>;
3799
+ }, "strip", z.ZodTypeAny, {
3800
+ type: "cooldown_active";
3801
+ key: string;
3802
+ inverted?: boolean | undefined;
3803
+ }, {
3804
+ type: "cooldown_active";
3805
+ key: string;
3806
+ inverted?: boolean | undefined;
3807
+ }>, z.ZodObject<{
3808
+ type: z.ZodLiteral<"frequency_limit">;
3809
+ key: z.ZodString;
3810
+ limit: z.ZodNumber;
3811
+ inverted: z.ZodOptional<z.ZodBoolean>;
3812
+ }, "strip", z.ZodTypeAny, {
3813
+ type: "frequency_limit";
3814
+ key: string;
3815
+ limit: number;
3816
+ inverted?: boolean | undefined;
3817
+ }, {
3818
+ type: "frequency_limit";
3819
+ key: string;
3820
+ limit: number;
3821
+ inverted?: boolean | undefined;
3822
+ }>, z.ZodObject<{
3823
+ type: z.ZodLiteral<"event_count">;
3824
+ key: z.ZodString;
3825
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
3826
+ count: z.ZodNumber;
3827
+ withinMs: z.ZodOptional<z.ZodNumber>;
3828
+ }, "strip", z.ZodTypeAny, {
3829
+ type: "event_count";
3830
+ key: string;
3831
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3832
+ count: number;
3833
+ withinMs?: number | undefined;
3834
+ }, {
3835
+ type: "event_count";
3836
+ key: string;
3837
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3838
+ count: number;
3839
+ withinMs?: number | undefined;
3840
+ }>]>;
3841
+ })[];
2404
3842
  export type ConditionSchema = z.infer<typeof ConditionZ>;
2405
3843
  export type RuleSchema = z.infer<typeof RuleZ>;
2406
3844
  export type DecisionStrategySchema = z.infer<typeof DecisionStrategyZ>;