@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
@@ -0,0 +1,4107 @@
1
+ /**
2
+ * Zod schemas for canvas configuration types.
3
+ *
4
+ * Single source of truth for tile, theme, launcher, and top-level
5
+ * CanvasConfigResponse shapes. These schemas are converted to JSON Schema
6
+ * during build and merged into the unified canvas-config.schema.json.
7
+ *
8
+ * Design decisions:
9
+ * - `.strict()` on every object → `additionalProperties: false` in JSON Schema
10
+ * - Matches runtime usage (includes fields like colorTextSecondary, schemaVersion
11
+ * that were previously missing from the hand-written JSON schema)
12
+ */
13
+ import { z } from 'zod';
14
+ declare const NotificationDeepLinkZ: z.ZodObject<{
15
+ tileId: z.ZodString;
16
+ itemId: z.ZodOptional<z.ZodString>;
17
+ }, "strict", z.ZodTypeAny, {
18
+ tileId: string;
19
+ itemId?: string | undefined;
20
+ }, {
21
+ tileId: string;
22
+ itemId?: string | undefined;
23
+ }>;
24
+ declare const TileNotificationRuleZ: z.ZodObject<{
25
+ on: z.ZodString;
26
+ title: z.ZodString;
27
+ body: z.ZodOptional<z.ZodString>;
28
+ icon: z.ZodOptional<z.ZodString>;
29
+ ttl: z.ZodOptional<z.ZodNumber>;
30
+ cooldown: z.ZodOptional<z.ZodNumber>;
31
+ deepLink: z.ZodOptional<z.ZodObject<{
32
+ tileId: z.ZodString;
33
+ itemId: z.ZodOptional<z.ZodString>;
34
+ }, "strict", z.ZodTypeAny, {
35
+ tileId: string;
36
+ itemId?: string | undefined;
37
+ }, {
38
+ tileId: string;
39
+ itemId?: string | undefined;
40
+ }>>;
41
+ }, "strict", z.ZodTypeAny, {
42
+ on: string;
43
+ title: string;
44
+ body?: string | undefined;
45
+ icon?: string | undefined;
46
+ ttl?: number | undefined;
47
+ cooldown?: number | undefined;
48
+ deepLink?: {
49
+ tileId: string;
50
+ itemId?: string | undefined;
51
+ } | undefined;
52
+ }, {
53
+ on: string;
54
+ title: string;
55
+ body?: string | undefined;
56
+ icon?: string | undefined;
57
+ ttl?: number | undefined;
58
+ cooldown?: number | undefined;
59
+ deepLink?: {
60
+ tileId: string;
61
+ itemId?: string | undefined;
62
+ } | undefined;
63
+ }>;
64
+ export declare const TileZ: z.ZodObject<{
65
+ id: z.ZodString;
66
+ title: z.ZodOptional<z.ZodString>;
67
+ priority: z.ZodOptional<z.ZodNumber>;
68
+ widget: z.ZodString;
69
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
70
+ activation: z.ZodOptional<z.ZodObject<{
71
+ routes: z.ZodObject<{
72
+ include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
73
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ exclude?: string[] | undefined;
76
+ include?: string[] | undefined;
77
+ }, {
78
+ exclude?: string[] | undefined;
79
+ include?: string[] | undefined;
80
+ }>;
81
+ strategy: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
82
+ type: z.ZodLiteral<"rules">;
83
+ rules: z.ZodArray<z.ZodObject<{
84
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
85
+ type: z.ZodLiteral<"page_url">;
86
+ url: z.ZodString;
87
+ }, "strip", z.ZodTypeAny, {
88
+ url: string;
89
+ type: "page_url";
90
+ }, {
91
+ url: string;
92
+ type: "page_url";
93
+ }>, z.ZodObject<{
94
+ type: z.ZodLiteral<"route">;
95
+ routeId: z.ZodString;
96
+ }, "strip", z.ZodTypeAny, {
97
+ type: "route";
98
+ routeId: string;
99
+ }, {
100
+ type: "route";
101
+ routeId: string;
102
+ }>, z.ZodObject<{
103
+ type: z.ZodLiteral<"anchor_visible">;
104
+ anchorId: z.ZodString;
105
+ state: z.ZodEnum<["visible", "present", "absent"]>;
106
+ }, "strip", z.ZodTypeAny, {
107
+ anchorId: string;
108
+ state: "visible" | "present" | "absent";
109
+ type: "anchor_visible";
110
+ }, {
111
+ anchorId: string;
112
+ state: "visible" | "present" | "absent";
113
+ type: "anchor_visible";
114
+ }>, z.ZodObject<{
115
+ type: z.ZodLiteral<"event_occurred">;
116
+ eventName: z.ZodString;
117
+ withinMs: z.ZodOptional<z.ZodNumber>;
118
+ }, "strip", z.ZodTypeAny, {
119
+ type: "event_occurred";
120
+ eventName: string;
121
+ withinMs?: number | undefined;
122
+ }, {
123
+ type: "event_occurred";
124
+ eventName: string;
125
+ withinMs?: number | undefined;
126
+ }>, z.ZodObject<{
127
+ type: z.ZodLiteral<"state_equals">;
128
+ key: z.ZodString;
129
+ value: z.ZodUnknown;
130
+ }, "strip", z.ZodTypeAny, {
131
+ type: "state_equals";
132
+ key: string;
133
+ value?: unknown;
134
+ }, {
135
+ type: "state_equals";
136
+ key: string;
137
+ value?: unknown;
138
+ }>, z.ZodObject<{
139
+ type: z.ZodLiteral<"viewport">;
140
+ minWidth: z.ZodOptional<z.ZodNumber>;
141
+ maxWidth: z.ZodOptional<z.ZodNumber>;
142
+ minHeight: z.ZodOptional<z.ZodNumber>;
143
+ maxHeight: z.ZodOptional<z.ZodNumber>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ type: "viewport";
146
+ minWidth?: number | undefined;
147
+ maxWidth?: number | undefined;
148
+ minHeight?: number | undefined;
149
+ maxHeight?: number | undefined;
150
+ }, {
151
+ type: "viewport";
152
+ minWidth?: number | undefined;
153
+ maxWidth?: number | undefined;
154
+ minHeight?: number | undefined;
155
+ maxHeight?: number | undefined;
156
+ }>, z.ZodObject<{
157
+ type: z.ZodLiteral<"session_metric">;
158
+ key: z.ZodString;
159
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
160
+ threshold: z.ZodNumber;
161
+ }, "strip", z.ZodTypeAny, {
162
+ type: "session_metric";
163
+ key: string;
164
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
165
+ threshold: number;
166
+ }, {
167
+ type: "session_metric";
168
+ key: string;
169
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
170
+ threshold: number;
171
+ }>, z.ZodObject<{
172
+ type: z.ZodLiteral<"dismissed">;
173
+ key: z.ZodString;
174
+ inverted: z.ZodOptional<z.ZodBoolean>;
175
+ }, "strip", z.ZodTypeAny, {
176
+ type: "dismissed";
177
+ key: string;
178
+ inverted?: boolean | undefined;
179
+ }, {
180
+ type: "dismissed";
181
+ key: string;
182
+ inverted?: boolean | undefined;
183
+ }>, z.ZodObject<{
184
+ type: z.ZodLiteral<"cooldown_active">;
185
+ key: z.ZodString;
186
+ inverted: z.ZodOptional<z.ZodBoolean>;
187
+ }, "strip", z.ZodTypeAny, {
188
+ type: "cooldown_active";
189
+ key: string;
190
+ inverted?: boolean | undefined;
191
+ }, {
192
+ type: "cooldown_active";
193
+ key: string;
194
+ inverted?: boolean | undefined;
195
+ }>, z.ZodObject<{
196
+ type: z.ZodLiteral<"frequency_limit">;
197
+ key: z.ZodString;
198
+ limit: z.ZodNumber;
199
+ inverted: z.ZodOptional<z.ZodBoolean>;
200
+ }, "strip", z.ZodTypeAny, {
201
+ type: "frequency_limit";
202
+ key: string;
203
+ limit: number;
204
+ inverted?: boolean | undefined;
205
+ }, {
206
+ type: "frequency_limit";
207
+ key: string;
208
+ limit: number;
209
+ inverted?: boolean | undefined;
210
+ }>, z.ZodObject<{
211
+ type: z.ZodLiteral<"event_count">;
212
+ key: z.ZodString;
213
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
214
+ count: z.ZodNumber;
215
+ withinMs: z.ZodOptional<z.ZodNumber>;
216
+ }, "strip", z.ZodTypeAny, {
217
+ type: "event_count";
218
+ key: string;
219
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
220
+ count: number;
221
+ withinMs?: number | undefined;
222
+ }, {
223
+ type: "event_count";
224
+ key: string;
225
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
226
+ count: number;
227
+ withinMs?: number | undefined;
228
+ }>]>, "many">;
229
+ value: z.ZodUnknown;
230
+ }, "strip", z.ZodTypeAny, {
231
+ conditions: ({
232
+ url: string;
233
+ type: "page_url";
234
+ } | {
235
+ type: "route";
236
+ routeId: string;
237
+ } | {
238
+ anchorId: string;
239
+ state: "visible" | "present" | "absent";
240
+ type: "anchor_visible";
241
+ } | {
242
+ type: "event_occurred";
243
+ eventName: string;
244
+ withinMs?: number | undefined;
245
+ } | {
246
+ type: "state_equals";
247
+ key: string;
248
+ value?: unknown;
249
+ } | {
250
+ type: "viewport";
251
+ minWidth?: number | undefined;
252
+ maxWidth?: number | undefined;
253
+ minHeight?: number | undefined;
254
+ maxHeight?: number | undefined;
255
+ } | {
256
+ type: "session_metric";
257
+ key: string;
258
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
259
+ threshold: number;
260
+ } | {
261
+ type: "dismissed";
262
+ key: string;
263
+ inverted?: boolean | undefined;
264
+ } | {
265
+ type: "cooldown_active";
266
+ key: string;
267
+ inverted?: boolean | undefined;
268
+ } | {
269
+ type: "frequency_limit";
270
+ key: string;
271
+ limit: number;
272
+ inverted?: boolean | undefined;
273
+ } | {
274
+ type: "event_count";
275
+ key: string;
276
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
277
+ count: number;
278
+ withinMs?: number | undefined;
279
+ })[];
280
+ value?: unknown;
281
+ }, {
282
+ conditions: ({
283
+ url: string;
284
+ type: "page_url";
285
+ } | {
286
+ type: "route";
287
+ routeId: string;
288
+ } | {
289
+ anchorId: string;
290
+ state: "visible" | "present" | "absent";
291
+ type: "anchor_visible";
292
+ } | {
293
+ type: "event_occurred";
294
+ eventName: string;
295
+ withinMs?: number | undefined;
296
+ } | {
297
+ type: "state_equals";
298
+ key: string;
299
+ value?: unknown;
300
+ } | {
301
+ type: "viewport";
302
+ minWidth?: number | undefined;
303
+ maxWidth?: number | undefined;
304
+ minHeight?: number | undefined;
305
+ maxHeight?: number | undefined;
306
+ } | {
307
+ type: "session_metric";
308
+ key: string;
309
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
310
+ threshold: number;
311
+ } | {
312
+ type: "dismissed";
313
+ key: string;
314
+ inverted?: boolean | undefined;
315
+ } | {
316
+ type: "cooldown_active";
317
+ key: string;
318
+ inverted?: boolean | undefined;
319
+ } | {
320
+ type: "frequency_limit";
321
+ key: string;
322
+ limit: number;
323
+ inverted?: boolean | undefined;
324
+ } | {
325
+ type: "event_count";
326
+ key: string;
327
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
328
+ count: number;
329
+ withinMs?: number | undefined;
330
+ })[];
331
+ value?: unknown;
332
+ }>, "many">;
333
+ default: z.ZodUnknown;
334
+ }, "strip", z.ZodTypeAny, {
335
+ type: "rules";
336
+ rules: {
337
+ conditions: ({
338
+ url: string;
339
+ type: "page_url";
340
+ } | {
341
+ type: "route";
342
+ routeId: string;
343
+ } | {
344
+ anchorId: string;
345
+ state: "visible" | "present" | "absent";
346
+ type: "anchor_visible";
347
+ } | {
348
+ type: "event_occurred";
349
+ eventName: string;
350
+ withinMs?: number | undefined;
351
+ } | {
352
+ type: "state_equals";
353
+ key: string;
354
+ value?: unknown;
355
+ } | {
356
+ type: "viewport";
357
+ minWidth?: number | undefined;
358
+ maxWidth?: number | undefined;
359
+ minHeight?: number | undefined;
360
+ maxHeight?: number | undefined;
361
+ } | {
362
+ type: "session_metric";
363
+ key: string;
364
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
365
+ threshold: number;
366
+ } | {
367
+ type: "dismissed";
368
+ key: string;
369
+ inverted?: boolean | undefined;
370
+ } | {
371
+ type: "cooldown_active";
372
+ key: string;
373
+ inverted?: boolean | undefined;
374
+ } | {
375
+ type: "frequency_limit";
376
+ key: string;
377
+ limit: number;
378
+ inverted?: boolean | undefined;
379
+ } | {
380
+ type: "event_count";
381
+ key: string;
382
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
383
+ count: number;
384
+ withinMs?: number | undefined;
385
+ })[];
386
+ value?: unknown;
387
+ }[];
388
+ default?: unknown;
389
+ }, {
390
+ type: "rules";
391
+ rules: {
392
+ conditions: ({
393
+ url: string;
394
+ type: "page_url";
395
+ } | {
396
+ type: "route";
397
+ routeId: string;
398
+ } | {
399
+ anchorId: string;
400
+ state: "visible" | "present" | "absent";
401
+ type: "anchor_visible";
402
+ } | {
403
+ type: "event_occurred";
404
+ eventName: string;
405
+ withinMs?: number | undefined;
406
+ } | {
407
+ type: "state_equals";
408
+ key: string;
409
+ value?: unknown;
410
+ } | {
411
+ type: "viewport";
412
+ minWidth?: number | undefined;
413
+ maxWidth?: number | undefined;
414
+ minHeight?: number | undefined;
415
+ maxHeight?: number | undefined;
416
+ } | {
417
+ type: "session_metric";
418
+ key: string;
419
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
420
+ threshold: number;
421
+ } | {
422
+ type: "dismissed";
423
+ key: string;
424
+ inverted?: boolean | undefined;
425
+ } | {
426
+ type: "cooldown_active";
427
+ key: string;
428
+ inverted?: boolean | undefined;
429
+ } | {
430
+ type: "frequency_limit";
431
+ key: string;
432
+ limit: number;
433
+ inverted?: boolean | undefined;
434
+ } | {
435
+ type: "event_count";
436
+ key: string;
437
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
438
+ count: number;
439
+ withinMs?: number | undefined;
440
+ })[];
441
+ value?: unknown;
442
+ }[];
443
+ default?: unknown;
444
+ }>, z.ZodObject<{
445
+ type: z.ZodLiteral<"score">;
446
+ field: z.ZodString;
447
+ threshold: z.ZodNumber;
448
+ above: z.ZodUnknown;
449
+ below: z.ZodUnknown;
450
+ }, "strip", z.ZodTypeAny, {
451
+ type: "score";
452
+ threshold: number;
453
+ field: string;
454
+ above?: unknown;
455
+ below?: unknown;
456
+ }, {
457
+ type: "score";
458
+ threshold: number;
459
+ field: string;
460
+ above?: unknown;
461
+ below?: unknown;
462
+ }>, z.ZodObject<{
463
+ type: z.ZodLiteral<"model">;
464
+ modelId: z.ZodString;
465
+ inputs: z.ZodArray<z.ZodString, "many">;
466
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
467
+ default: z.ZodUnknown;
468
+ }, "strip", z.ZodTypeAny, {
469
+ type: "model";
470
+ modelId: string;
471
+ inputs: string[];
472
+ outputMapping: Record<string, unknown>;
473
+ default?: unknown;
474
+ }, {
475
+ type: "model";
476
+ modelId: string;
477
+ inputs: string[];
478
+ outputMapping: Record<string, unknown>;
479
+ default?: unknown;
480
+ }>, z.ZodObject<{
481
+ type: z.ZodLiteral<"external">;
482
+ endpoint: z.ZodString;
483
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
484
+ default: z.ZodUnknown;
485
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
486
+ }, "strip", z.ZodTypeAny, {
487
+ type: "external";
488
+ endpoint: string;
489
+ timeoutMs?: number | undefined;
490
+ default?: unknown;
491
+ method?: "GET" | "POST" | undefined;
492
+ }, {
493
+ type: "external";
494
+ endpoint: string;
495
+ timeoutMs?: number | undefined;
496
+ default?: unknown;
497
+ method?: "GET" | "POST" | undefined;
498
+ }>]>>;
499
+ }, "strip", z.ZodTypeAny, {
500
+ routes: {
501
+ exclude?: string[] | undefined;
502
+ include?: string[] | undefined;
503
+ };
504
+ strategy?: {
505
+ type: "rules";
506
+ rules: {
507
+ conditions: ({
508
+ url: string;
509
+ type: "page_url";
510
+ } | {
511
+ type: "route";
512
+ routeId: string;
513
+ } | {
514
+ anchorId: string;
515
+ state: "visible" | "present" | "absent";
516
+ type: "anchor_visible";
517
+ } | {
518
+ type: "event_occurred";
519
+ eventName: string;
520
+ withinMs?: number | undefined;
521
+ } | {
522
+ type: "state_equals";
523
+ key: string;
524
+ value?: unknown;
525
+ } | {
526
+ type: "viewport";
527
+ minWidth?: number | undefined;
528
+ maxWidth?: number | undefined;
529
+ minHeight?: number | undefined;
530
+ maxHeight?: number | undefined;
531
+ } | {
532
+ type: "session_metric";
533
+ key: string;
534
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
535
+ threshold: number;
536
+ } | {
537
+ type: "dismissed";
538
+ key: string;
539
+ inverted?: boolean | undefined;
540
+ } | {
541
+ type: "cooldown_active";
542
+ key: string;
543
+ inverted?: boolean | undefined;
544
+ } | {
545
+ type: "frequency_limit";
546
+ key: string;
547
+ limit: number;
548
+ inverted?: boolean | undefined;
549
+ } | {
550
+ type: "event_count";
551
+ key: string;
552
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
553
+ count: number;
554
+ withinMs?: number | undefined;
555
+ })[];
556
+ value?: unknown;
557
+ }[];
558
+ default?: unknown;
559
+ } | {
560
+ type: "score";
561
+ threshold: number;
562
+ field: string;
563
+ above?: unknown;
564
+ below?: unknown;
565
+ } | {
566
+ type: "model";
567
+ modelId: string;
568
+ inputs: string[];
569
+ outputMapping: Record<string, unknown>;
570
+ default?: unknown;
571
+ } | {
572
+ type: "external";
573
+ endpoint: string;
574
+ timeoutMs?: number | undefined;
575
+ default?: unknown;
576
+ method?: "GET" | "POST" | undefined;
577
+ } | undefined;
578
+ }, {
579
+ routes: {
580
+ exclude?: string[] | undefined;
581
+ include?: string[] | undefined;
582
+ };
583
+ strategy?: {
584
+ type: "rules";
585
+ rules: {
586
+ conditions: ({
587
+ url: string;
588
+ type: "page_url";
589
+ } | {
590
+ type: "route";
591
+ routeId: string;
592
+ } | {
593
+ anchorId: string;
594
+ state: "visible" | "present" | "absent";
595
+ type: "anchor_visible";
596
+ } | {
597
+ type: "event_occurred";
598
+ eventName: string;
599
+ withinMs?: number | undefined;
600
+ } | {
601
+ type: "state_equals";
602
+ key: string;
603
+ value?: unknown;
604
+ } | {
605
+ type: "viewport";
606
+ minWidth?: number | undefined;
607
+ maxWidth?: number | undefined;
608
+ minHeight?: number | undefined;
609
+ maxHeight?: number | undefined;
610
+ } | {
611
+ type: "session_metric";
612
+ key: string;
613
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
614
+ threshold: number;
615
+ } | {
616
+ type: "dismissed";
617
+ key: string;
618
+ inverted?: boolean | undefined;
619
+ } | {
620
+ type: "cooldown_active";
621
+ key: string;
622
+ inverted?: boolean | undefined;
623
+ } | {
624
+ type: "frequency_limit";
625
+ key: string;
626
+ limit: number;
627
+ inverted?: boolean | undefined;
628
+ } | {
629
+ type: "event_count";
630
+ key: string;
631
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
632
+ count: number;
633
+ withinMs?: number | undefined;
634
+ })[];
635
+ value?: unknown;
636
+ }[];
637
+ default?: unknown;
638
+ } | {
639
+ type: "score";
640
+ threshold: number;
641
+ field: string;
642
+ above?: unknown;
643
+ below?: unknown;
644
+ } | {
645
+ type: "model";
646
+ modelId: string;
647
+ inputs: string[];
648
+ outputMapping: Record<string, unknown>;
649
+ default?: unknown;
650
+ } | {
651
+ type: "external";
652
+ endpoint: string;
653
+ timeoutMs?: number | undefined;
654
+ default?: unknown;
655
+ method?: "GET" | "POST" | undefined;
656
+ } | undefined;
657
+ }>>;
658
+ notifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
659
+ on: z.ZodString;
660
+ title: z.ZodString;
661
+ body: z.ZodOptional<z.ZodString>;
662
+ icon: z.ZodOptional<z.ZodString>;
663
+ ttl: z.ZodOptional<z.ZodNumber>;
664
+ cooldown: z.ZodOptional<z.ZodNumber>;
665
+ deepLink: z.ZodOptional<z.ZodObject<{
666
+ tileId: z.ZodString;
667
+ itemId: z.ZodOptional<z.ZodString>;
668
+ }, "strict", z.ZodTypeAny, {
669
+ tileId: string;
670
+ itemId?: string | undefined;
671
+ }, {
672
+ tileId: string;
673
+ itemId?: string | undefined;
674
+ }>>;
675
+ }, "strict", z.ZodTypeAny, {
676
+ on: string;
677
+ title: string;
678
+ body?: string | undefined;
679
+ icon?: string | undefined;
680
+ ttl?: number | undefined;
681
+ cooldown?: number | undefined;
682
+ deepLink?: {
683
+ tileId: string;
684
+ itemId?: string | undefined;
685
+ } | undefined;
686
+ }, {
687
+ on: string;
688
+ title: string;
689
+ body?: string | undefined;
690
+ icon?: string | undefined;
691
+ ttl?: number | undefined;
692
+ cooldown?: number | undefined;
693
+ deepLink?: {
694
+ tileId: string;
695
+ itemId?: string | undefined;
696
+ } | undefined;
697
+ }>, "many">>;
698
+ }, "strict", z.ZodTypeAny, {
699
+ widget: string;
700
+ id: string;
701
+ props?: Record<string, unknown> | undefined;
702
+ priority?: number | undefined;
703
+ title?: string | undefined;
704
+ activation?: {
705
+ routes: {
706
+ exclude?: string[] | undefined;
707
+ include?: string[] | undefined;
708
+ };
709
+ strategy?: {
710
+ type: "rules";
711
+ rules: {
712
+ conditions: ({
713
+ url: string;
714
+ type: "page_url";
715
+ } | {
716
+ type: "route";
717
+ routeId: string;
718
+ } | {
719
+ anchorId: string;
720
+ state: "visible" | "present" | "absent";
721
+ type: "anchor_visible";
722
+ } | {
723
+ type: "event_occurred";
724
+ eventName: string;
725
+ withinMs?: number | undefined;
726
+ } | {
727
+ type: "state_equals";
728
+ key: string;
729
+ value?: unknown;
730
+ } | {
731
+ type: "viewport";
732
+ minWidth?: number | undefined;
733
+ maxWidth?: number | undefined;
734
+ minHeight?: number | undefined;
735
+ maxHeight?: number | undefined;
736
+ } | {
737
+ type: "session_metric";
738
+ key: string;
739
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
740
+ threshold: number;
741
+ } | {
742
+ type: "dismissed";
743
+ key: string;
744
+ inverted?: boolean | undefined;
745
+ } | {
746
+ type: "cooldown_active";
747
+ key: string;
748
+ inverted?: boolean | undefined;
749
+ } | {
750
+ type: "frequency_limit";
751
+ key: string;
752
+ limit: number;
753
+ inverted?: boolean | undefined;
754
+ } | {
755
+ type: "event_count";
756
+ key: string;
757
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
758
+ count: number;
759
+ withinMs?: number | undefined;
760
+ })[];
761
+ value?: unknown;
762
+ }[];
763
+ default?: unknown;
764
+ } | {
765
+ type: "score";
766
+ threshold: number;
767
+ field: string;
768
+ above?: unknown;
769
+ below?: unknown;
770
+ } | {
771
+ type: "model";
772
+ modelId: string;
773
+ inputs: string[];
774
+ outputMapping: Record<string, unknown>;
775
+ default?: unknown;
776
+ } | {
777
+ type: "external";
778
+ endpoint: string;
779
+ timeoutMs?: number | undefined;
780
+ default?: unknown;
781
+ method?: "GET" | "POST" | undefined;
782
+ } | undefined;
783
+ } | undefined;
784
+ notifications?: {
785
+ on: string;
786
+ title: string;
787
+ body?: string | undefined;
788
+ icon?: string | undefined;
789
+ ttl?: number | undefined;
790
+ cooldown?: number | undefined;
791
+ deepLink?: {
792
+ tileId: string;
793
+ itemId?: string | undefined;
794
+ } | undefined;
795
+ }[] | undefined;
796
+ }, {
797
+ widget: string;
798
+ id: string;
799
+ props?: Record<string, unknown> | undefined;
800
+ priority?: number | undefined;
801
+ title?: string | undefined;
802
+ activation?: {
803
+ routes: {
804
+ exclude?: string[] | undefined;
805
+ include?: string[] | undefined;
806
+ };
807
+ strategy?: {
808
+ type: "rules";
809
+ rules: {
810
+ conditions: ({
811
+ url: string;
812
+ type: "page_url";
813
+ } | {
814
+ type: "route";
815
+ routeId: string;
816
+ } | {
817
+ anchorId: string;
818
+ state: "visible" | "present" | "absent";
819
+ type: "anchor_visible";
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
+ default?: unknown;
862
+ } | {
863
+ type: "score";
864
+ threshold: number;
865
+ field: string;
866
+ above?: unknown;
867
+ below?: unknown;
868
+ } | {
869
+ type: "model";
870
+ modelId: string;
871
+ inputs: string[];
872
+ outputMapping: Record<string, unknown>;
873
+ default?: unknown;
874
+ } | {
875
+ type: "external";
876
+ endpoint: string;
877
+ timeoutMs?: number | undefined;
878
+ default?: unknown;
879
+ method?: "GET" | "POST" | undefined;
880
+ } | undefined;
881
+ } | undefined;
882
+ notifications?: {
883
+ on: string;
884
+ title: string;
885
+ body?: string | undefined;
886
+ icon?: string | undefined;
887
+ ttl?: number | undefined;
888
+ cooldown?: number | undefined;
889
+ deepLink?: {
890
+ tileId: string;
891
+ itemId?: string | undefined;
892
+ } | undefined;
893
+ }[] | undefined;
894
+ }>;
895
+ export declare const CanvasThemeConfigZ: z.ZodObject<{
896
+ name: z.ZodOptional<z.ZodString>;
897
+ mode: z.ZodOptional<z.ZodEnum<["dark", "light"]>>;
898
+ position: z.ZodOptional<z.ZodEnum<["left", "right"]>>;
899
+ colorPrimary: z.ZodOptional<z.ZodString>;
900
+ colorBackground: z.ZodOptional<z.ZodString>;
901
+ colorText: z.ZodOptional<z.ZodString>;
902
+ colorTextSecondary: z.ZodOptional<z.ZodString>;
903
+ borderRadius: z.ZodOptional<z.ZodString>;
904
+ }, "strict", z.ZodTypeAny, {
905
+ position?: "right" | "left" | undefined;
906
+ name?: string | undefined;
907
+ mode?: "dark" | "light" | undefined;
908
+ colorPrimary?: string | undefined;
909
+ colorBackground?: string | undefined;
910
+ colorText?: string | undefined;
911
+ colorTextSecondary?: string | undefined;
912
+ borderRadius?: string | undefined;
913
+ }, {
914
+ position?: "right" | "left" | undefined;
915
+ name?: string | undefined;
916
+ mode?: "dark" | "light" | undefined;
917
+ colorPrimary?: string | undefined;
918
+ colorBackground?: string | undefined;
919
+ colorText?: string | undefined;
920
+ colorTextSecondary?: string | undefined;
921
+ borderRadius?: string | undefined;
922
+ }>;
923
+ export declare const LauncherConfigZ: z.ZodObject<{
924
+ enabled: z.ZodOptional<z.ZodBoolean>;
925
+ label: z.ZodOptional<z.ZodString>;
926
+ position: z.ZodOptional<z.ZodString>;
927
+ animate: z.ZodOptional<z.ZodBoolean>;
928
+ animationStyle: z.ZodOptional<z.ZodEnum<["pulse", "bounce", "glow"]>>;
929
+ notificationCount: z.ZodOptional<z.ZodNumber>;
930
+ }, "strict", z.ZodTypeAny, {
931
+ position?: string | undefined;
932
+ label?: string | undefined;
933
+ enabled?: boolean | undefined;
934
+ animate?: boolean | undefined;
935
+ animationStyle?: "pulse" | "bounce" | "glow" | undefined;
936
+ notificationCount?: number | undefined;
937
+ }, {
938
+ position?: string | undefined;
939
+ label?: string | undefined;
940
+ enabled?: boolean | undefined;
941
+ animate?: boolean | undefined;
942
+ animationStyle?: "pulse" | "bounce" | "glow" | undefined;
943
+ notificationCount?: number | undefined;
944
+ }>;
945
+ export declare const CanvasConfigResponseZ: z.ZodObject<{
946
+ schemaVersion: z.ZodOptional<z.ZodString>;
947
+ fetchedAt: z.ZodString;
948
+ configVersion: z.ZodOptional<z.ZodString>;
949
+ canvasTitle: z.ZodOptional<z.ZodString>;
950
+ tiles: z.ZodArray<z.ZodObject<{
951
+ id: z.ZodString;
952
+ title: z.ZodOptional<z.ZodString>;
953
+ priority: z.ZodOptional<z.ZodNumber>;
954
+ widget: z.ZodString;
955
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
956
+ activation: z.ZodOptional<z.ZodObject<{
957
+ routes: z.ZodObject<{
958
+ include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
959
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
960
+ }, "strip", z.ZodTypeAny, {
961
+ exclude?: string[] | undefined;
962
+ include?: string[] | undefined;
963
+ }, {
964
+ exclude?: string[] | undefined;
965
+ include?: string[] | undefined;
966
+ }>;
967
+ strategy: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
968
+ type: z.ZodLiteral<"rules">;
969
+ rules: z.ZodArray<z.ZodObject<{
970
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
971
+ type: z.ZodLiteral<"page_url">;
972
+ url: z.ZodString;
973
+ }, "strip", z.ZodTypeAny, {
974
+ url: string;
975
+ type: "page_url";
976
+ }, {
977
+ url: string;
978
+ type: "page_url";
979
+ }>, z.ZodObject<{
980
+ type: z.ZodLiteral<"route">;
981
+ routeId: z.ZodString;
982
+ }, "strip", z.ZodTypeAny, {
983
+ type: "route";
984
+ routeId: string;
985
+ }, {
986
+ type: "route";
987
+ routeId: string;
988
+ }>, z.ZodObject<{
989
+ type: z.ZodLiteral<"anchor_visible">;
990
+ anchorId: z.ZodString;
991
+ state: z.ZodEnum<["visible", "present", "absent"]>;
992
+ }, "strip", z.ZodTypeAny, {
993
+ anchorId: string;
994
+ state: "visible" | "present" | "absent";
995
+ type: "anchor_visible";
996
+ }, {
997
+ anchorId: string;
998
+ state: "visible" | "present" | "absent";
999
+ type: "anchor_visible";
1000
+ }>, z.ZodObject<{
1001
+ type: z.ZodLiteral<"event_occurred">;
1002
+ eventName: z.ZodString;
1003
+ withinMs: z.ZodOptional<z.ZodNumber>;
1004
+ }, "strip", z.ZodTypeAny, {
1005
+ type: "event_occurred";
1006
+ eventName: string;
1007
+ withinMs?: number | undefined;
1008
+ }, {
1009
+ type: "event_occurred";
1010
+ eventName: string;
1011
+ withinMs?: number | undefined;
1012
+ }>, z.ZodObject<{
1013
+ type: z.ZodLiteral<"state_equals">;
1014
+ key: z.ZodString;
1015
+ value: z.ZodUnknown;
1016
+ }, "strip", z.ZodTypeAny, {
1017
+ type: "state_equals";
1018
+ key: string;
1019
+ value?: unknown;
1020
+ }, {
1021
+ type: "state_equals";
1022
+ key: string;
1023
+ value?: unknown;
1024
+ }>, z.ZodObject<{
1025
+ type: z.ZodLiteral<"viewport">;
1026
+ minWidth: z.ZodOptional<z.ZodNumber>;
1027
+ maxWidth: z.ZodOptional<z.ZodNumber>;
1028
+ minHeight: z.ZodOptional<z.ZodNumber>;
1029
+ maxHeight: z.ZodOptional<z.ZodNumber>;
1030
+ }, "strip", z.ZodTypeAny, {
1031
+ type: "viewport";
1032
+ minWidth?: number | undefined;
1033
+ maxWidth?: number | undefined;
1034
+ minHeight?: number | undefined;
1035
+ maxHeight?: number | undefined;
1036
+ }, {
1037
+ type: "viewport";
1038
+ minWidth?: number | undefined;
1039
+ maxWidth?: number | undefined;
1040
+ minHeight?: number | undefined;
1041
+ maxHeight?: number | undefined;
1042
+ }>, z.ZodObject<{
1043
+ type: z.ZodLiteral<"session_metric">;
1044
+ key: z.ZodString;
1045
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1046
+ threshold: z.ZodNumber;
1047
+ }, "strip", z.ZodTypeAny, {
1048
+ type: "session_metric";
1049
+ key: string;
1050
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1051
+ threshold: number;
1052
+ }, {
1053
+ type: "session_metric";
1054
+ key: string;
1055
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1056
+ threshold: number;
1057
+ }>, z.ZodObject<{
1058
+ type: z.ZodLiteral<"dismissed">;
1059
+ key: z.ZodString;
1060
+ inverted: z.ZodOptional<z.ZodBoolean>;
1061
+ }, "strip", z.ZodTypeAny, {
1062
+ type: "dismissed";
1063
+ key: string;
1064
+ inverted?: boolean | undefined;
1065
+ }, {
1066
+ type: "dismissed";
1067
+ key: string;
1068
+ inverted?: boolean | undefined;
1069
+ }>, z.ZodObject<{
1070
+ type: z.ZodLiteral<"cooldown_active">;
1071
+ key: z.ZodString;
1072
+ inverted: z.ZodOptional<z.ZodBoolean>;
1073
+ }, "strip", z.ZodTypeAny, {
1074
+ type: "cooldown_active";
1075
+ key: string;
1076
+ inverted?: boolean | undefined;
1077
+ }, {
1078
+ type: "cooldown_active";
1079
+ key: string;
1080
+ inverted?: boolean | undefined;
1081
+ }>, z.ZodObject<{
1082
+ type: z.ZodLiteral<"frequency_limit">;
1083
+ key: z.ZodString;
1084
+ limit: z.ZodNumber;
1085
+ inverted: z.ZodOptional<z.ZodBoolean>;
1086
+ }, "strip", z.ZodTypeAny, {
1087
+ type: "frequency_limit";
1088
+ key: string;
1089
+ limit: number;
1090
+ inverted?: boolean | undefined;
1091
+ }, {
1092
+ type: "frequency_limit";
1093
+ key: string;
1094
+ limit: number;
1095
+ inverted?: boolean | undefined;
1096
+ }>, z.ZodObject<{
1097
+ type: z.ZodLiteral<"event_count">;
1098
+ key: z.ZodString;
1099
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1100
+ count: z.ZodNumber;
1101
+ withinMs: z.ZodOptional<z.ZodNumber>;
1102
+ }, "strip", z.ZodTypeAny, {
1103
+ type: "event_count";
1104
+ key: string;
1105
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1106
+ count: number;
1107
+ withinMs?: number | undefined;
1108
+ }, {
1109
+ type: "event_count";
1110
+ key: string;
1111
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1112
+ count: number;
1113
+ withinMs?: number | undefined;
1114
+ }>]>, "many">;
1115
+ value: z.ZodUnknown;
1116
+ }, "strip", z.ZodTypeAny, {
1117
+ conditions: ({
1118
+ url: string;
1119
+ type: "page_url";
1120
+ } | {
1121
+ type: "route";
1122
+ routeId: string;
1123
+ } | {
1124
+ anchorId: string;
1125
+ state: "visible" | "present" | "absent";
1126
+ type: "anchor_visible";
1127
+ } | {
1128
+ type: "event_occurred";
1129
+ eventName: string;
1130
+ withinMs?: number | undefined;
1131
+ } | {
1132
+ type: "state_equals";
1133
+ key: string;
1134
+ value?: unknown;
1135
+ } | {
1136
+ type: "viewport";
1137
+ minWidth?: number | undefined;
1138
+ maxWidth?: number | undefined;
1139
+ minHeight?: number | undefined;
1140
+ maxHeight?: number | undefined;
1141
+ } | {
1142
+ type: "session_metric";
1143
+ key: string;
1144
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1145
+ threshold: number;
1146
+ } | {
1147
+ type: "dismissed";
1148
+ key: string;
1149
+ inverted?: boolean | undefined;
1150
+ } | {
1151
+ type: "cooldown_active";
1152
+ key: string;
1153
+ inverted?: boolean | undefined;
1154
+ } | {
1155
+ type: "frequency_limit";
1156
+ key: string;
1157
+ limit: number;
1158
+ inverted?: boolean | undefined;
1159
+ } | {
1160
+ type: "event_count";
1161
+ key: string;
1162
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1163
+ count: number;
1164
+ withinMs?: number | undefined;
1165
+ })[];
1166
+ value?: unknown;
1167
+ }, {
1168
+ conditions: ({
1169
+ url: string;
1170
+ type: "page_url";
1171
+ } | {
1172
+ type: "route";
1173
+ routeId: string;
1174
+ } | {
1175
+ anchorId: string;
1176
+ state: "visible" | "present" | "absent";
1177
+ type: "anchor_visible";
1178
+ } | {
1179
+ type: "event_occurred";
1180
+ eventName: string;
1181
+ withinMs?: number | undefined;
1182
+ } | {
1183
+ type: "state_equals";
1184
+ key: string;
1185
+ value?: unknown;
1186
+ } | {
1187
+ type: "viewport";
1188
+ minWidth?: number | undefined;
1189
+ maxWidth?: number | undefined;
1190
+ minHeight?: number | undefined;
1191
+ maxHeight?: number | undefined;
1192
+ } | {
1193
+ type: "session_metric";
1194
+ key: string;
1195
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1196
+ threshold: number;
1197
+ } | {
1198
+ type: "dismissed";
1199
+ key: string;
1200
+ inverted?: boolean | undefined;
1201
+ } | {
1202
+ type: "cooldown_active";
1203
+ key: string;
1204
+ inverted?: boolean | undefined;
1205
+ } | {
1206
+ type: "frequency_limit";
1207
+ key: string;
1208
+ limit: number;
1209
+ inverted?: boolean | undefined;
1210
+ } | {
1211
+ type: "event_count";
1212
+ key: string;
1213
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1214
+ count: number;
1215
+ withinMs?: number | undefined;
1216
+ })[];
1217
+ value?: unknown;
1218
+ }>, "many">;
1219
+ default: z.ZodUnknown;
1220
+ }, "strip", z.ZodTypeAny, {
1221
+ type: "rules";
1222
+ rules: {
1223
+ conditions: ({
1224
+ url: string;
1225
+ type: "page_url";
1226
+ } | {
1227
+ type: "route";
1228
+ routeId: string;
1229
+ } | {
1230
+ anchorId: string;
1231
+ state: "visible" | "present" | "absent";
1232
+ type: "anchor_visible";
1233
+ } | {
1234
+ type: "event_occurred";
1235
+ eventName: string;
1236
+ withinMs?: number | undefined;
1237
+ } | {
1238
+ type: "state_equals";
1239
+ key: string;
1240
+ value?: unknown;
1241
+ } | {
1242
+ type: "viewport";
1243
+ minWidth?: number | undefined;
1244
+ maxWidth?: number | undefined;
1245
+ minHeight?: number | undefined;
1246
+ maxHeight?: number | undefined;
1247
+ } | {
1248
+ type: "session_metric";
1249
+ key: string;
1250
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1251
+ threshold: number;
1252
+ } | {
1253
+ type: "dismissed";
1254
+ key: string;
1255
+ inverted?: boolean | undefined;
1256
+ } | {
1257
+ type: "cooldown_active";
1258
+ key: string;
1259
+ inverted?: boolean | undefined;
1260
+ } | {
1261
+ type: "frequency_limit";
1262
+ key: string;
1263
+ limit: number;
1264
+ inverted?: boolean | undefined;
1265
+ } | {
1266
+ type: "event_count";
1267
+ key: string;
1268
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1269
+ count: number;
1270
+ withinMs?: number | undefined;
1271
+ })[];
1272
+ value?: unknown;
1273
+ }[];
1274
+ default?: unknown;
1275
+ }, {
1276
+ type: "rules";
1277
+ rules: {
1278
+ conditions: ({
1279
+ url: string;
1280
+ type: "page_url";
1281
+ } | {
1282
+ type: "route";
1283
+ routeId: string;
1284
+ } | {
1285
+ anchorId: string;
1286
+ state: "visible" | "present" | "absent";
1287
+ type: "anchor_visible";
1288
+ } | {
1289
+ type: "event_occurred";
1290
+ eventName: string;
1291
+ withinMs?: number | undefined;
1292
+ } | {
1293
+ type: "state_equals";
1294
+ key: string;
1295
+ value?: unknown;
1296
+ } | {
1297
+ type: "viewport";
1298
+ minWidth?: number | undefined;
1299
+ maxWidth?: number | undefined;
1300
+ minHeight?: number | undefined;
1301
+ maxHeight?: number | undefined;
1302
+ } | {
1303
+ type: "session_metric";
1304
+ key: string;
1305
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1306
+ threshold: number;
1307
+ } | {
1308
+ type: "dismissed";
1309
+ key: string;
1310
+ inverted?: boolean | undefined;
1311
+ } | {
1312
+ type: "cooldown_active";
1313
+ key: string;
1314
+ inverted?: boolean | undefined;
1315
+ } | {
1316
+ type: "frequency_limit";
1317
+ key: string;
1318
+ limit: number;
1319
+ inverted?: boolean | undefined;
1320
+ } | {
1321
+ type: "event_count";
1322
+ key: string;
1323
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1324
+ count: number;
1325
+ withinMs?: number | undefined;
1326
+ })[];
1327
+ value?: unknown;
1328
+ }[];
1329
+ default?: unknown;
1330
+ }>, z.ZodObject<{
1331
+ type: z.ZodLiteral<"score">;
1332
+ field: z.ZodString;
1333
+ threshold: z.ZodNumber;
1334
+ above: z.ZodUnknown;
1335
+ below: z.ZodUnknown;
1336
+ }, "strip", z.ZodTypeAny, {
1337
+ type: "score";
1338
+ threshold: number;
1339
+ field: string;
1340
+ above?: unknown;
1341
+ below?: unknown;
1342
+ }, {
1343
+ type: "score";
1344
+ threshold: number;
1345
+ field: string;
1346
+ above?: unknown;
1347
+ below?: unknown;
1348
+ }>, z.ZodObject<{
1349
+ type: z.ZodLiteral<"model">;
1350
+ modelId: z.ZodString;
1351
+ inputs: z.ZodArray<z.ZodString, "many">;
1352
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1353
+ default: z.ZodUnknown;
1354
+ }, "strip", z.ZodTypeAny, {
1355
+ type: "model";
1356
+ modelId: string;
1357
+ inputs: string[];
1358
+ outputMapping: Record<string, unknown>;
1359
+ default?: unknown;
1360
+ }, {
1361
+ type: "model";
1362
+ modelId: string;
1363
+ inputs: string[];
1364
+ outputMapping: Record<string, unknown>;
1365
+ default?: unknown;
1366
+ }>, z.ZodObject<{
1367
+ type: z.ZodLiteral<"external">;
1368
+ endpoint: z.ZodString;
1369
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
1370
+ default: z.ZodUnknown;
1371
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
1372
+ }, "strip", z.ZodTypeAny, {
1373
+ type: "external";
1374
+ endpoint: string;
1375
+ timeoutMs?: number | undefined;
1376
+ default?: unknown;
1377
+ method?: "GET" | "POST" | undefined;
1378
+ }, {
1379
+ type: "external";
1380
+ endpoint: string;
1381
+ timeoutMs?: number | undefined;
1382
+ default?: unknown;
1383
+ method?: "GET" | "POST" | undefined;
1384
+ }>]>>;
1385
+ }, "strip", z.ZodTypeAny, {
1386
+ routes: {
1387
+ exclude?: string[] | undefined;
1388
+ include?: string[] | undefined;
1389
+ };
1390
+ strategy?: {
1391
+ type: "rules";
1392
+ rules: {
1393
+ conditions: ({
1394
+ url: string;
1395
+ type: "page_url";
1396
+ } | {
1397
+ type: "route";
1398
+ routeId: string;
1399
+ } | {
1400
+ anchorId: string;
1401
+ state: "visible" | "present" | "absent";
1402
+ type: "anchor_visible";
1403
+ } | {
1404
+ type: "event_occurred";
1405
+ eventName: string;
1406
+ withinMs?: number | undefined;
1407
+ } | {
1408
+ type: "state_equals";
1409
+ key: string;
1410
+ value?: unknown;
1411
+ } | {
1412
+ type: "viewport";
1413
+ minWidth?: number | undefined;
1414
+ maxWidth?: number | undefined;
1415
+ minHeight?: number | undefined;
1416
+ maxHeight?: number | undefined;
1417
+ } | {
1418
+ type: "session_metric";
1419
+ key: string;
1420
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1421
+ threshold: number;
1422
+ } | {
1423
+ type: "dismissed";
1424
+ key: string;
1425
+ inverted?: boolean | undefined;
1426
+ } | {
1427
+ type: "cooldown_active";
1428
+ key: string;
1429
+ inverted?: boolean | undefined;
1430
+ } | {
1431
+ type: "frequency_limit";
1432
+ key: string;
1433
+ limit: number;
1434
+ inverted?: boolean | undefined;
1435
+ } | {
1436
+ type: "event_count";
1437
+ key: string;
1438
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1439
+ count: number;
1440
+ withinMs?: number | undefined;
1441
+ })[];
1442
+ value?: unknown;
1443
+ }[];
1444
+ default?: unknown;
1445
+ } | {
1446
+ type: "score";
1447
+ threshold: number;
1448
+ field: string;
1449
+ above?: unknown;
1450
+ below?: unknown;
1451
+ } | {
1452
+ type: "model";
1453
+ modelId: string;
1454
+ inputs: string[];
1455
+ outputMapping: Record<string, unknown>;
1456
+ default?: unknown;
1457
+ } | {
1458
+ type: "external";
1459
+ endpoint: string;
1460
+ timeoutMs?: number | undefined;
1461
+ default?: unknown;
1462
+ method?: "GET" | "POST" | undefined;
1463
+ } | undefined;
1464
+ }, {
1465
+ routes: {
1466
+ exclude?: string[] | undefined;
1467
+ include?: string[] | undefined;
1468
+ };
1469
+ strategy?: {
1470
+ type: "rules";
1471
+ rules: {
1472
+ conditions: ({
1473
+ url: string;
1474
+ type: "page_url";
1475
+ } | {
1476
+ type: "route";
1477
+ routeId: string;
1478
+ } | {
1479
+ anchorId: string;
1480
+ state: "visible" | "present" | "absent";
1481
+ type: "anchor_visible";
1482
+ } | {
1483
+ type: "event_occurred";
1484
+ eventName: string;
1485
+ withinMs?: number | undefined;
1486
+ } | {
1487
+ type: "state_equals";
1488
+ key: string;
1489
+ value?: unknown;
1490
+ } | {
1491
+ type: "viewport";
1492
+ minWidth?: number | undefined;
1493
+ maxWidth?: number | undefined;
1494
+ minHeight?: number | undefined;
1495
+ maxHeight?: number | undefined;
1496
+ } | {
1497
+ type: "session_metric";
1498
+ key: string;
1499
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1500
+ threshold: number;
1501
+ } | {
1502
+ type: "dismissed";
1503
+ key: string;
1504
+ inverted?: boolean | undefined;
1505
+ } | {
1506
+ type: "cooldown_active";
1507
+ key: string;
1508
+ inverted?: boolean | undefined;
1509
+ } | {
1510
+ type: "frequency_limit";
1511
+ key: string;
1512
+ limit: number;
1513
+ inverted?: boolean | undefined;
1514
+ } | {
1515
+ type: "event_count";
1516
+ key: string;
1517
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1518
+ count: number;
1519
+ withinMs?: number | undefined;
1520
+ })[];
1521
+ value?: unknown;
1522
+ }[];
1523
+ default?: unknown;
1524
+ } | {
1525
+ type: "score";
1526
+ threshold: number;
1527
+ field: string;
1528
+ above?: unknown;
1529
+ below?: unknown;
1530
+ } | {
1531
+ type: "model";
1532
+ modelId: string;
1533
+ inputs: string[];
1534
+ outputMapping: Record<string, unknown>;
1535
+ default?: unknown;
1536
+ } | {
1537
+ type: "external";
1538
+ endpoint: string;
1539
+ timeoutMs?: number | undefined;
1540
+ default?: unknown;
1541
+ method?: "GET" | "POST" | undefined;
1542
+ } | undefined;
1543
+ }>>;
1544
+ notifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
1545
+ on: z.ZodString;
1546
+ title: z.ZodString;
1547
+ body: z.ZodOptional<z.ZodString>;
1548
+ icon: z.ZodOptional<z.ZodString>;
1549
+ ttl: z.ZodOptional<z.ZodNumber>;
1550
+ cooldown: z.ZodOptional<z.ZodNumber>;
1551
+ deepLink: z.ZodOptional<z.ZodObject<{
1552
+ tileId: z.ZodString;
1553
+ itemId: z.ZodOptional<z.ZodString>;
1554
+ }, "strict", z.ZodTypeAny, {
1555
+ tileId: string;
1556
+ itemId?: string | undefined;
1557
+ }, {
1558
+ tileId: string;
1559
+ itemId?: string | undefined;
1560
+ }>>;
1561
+ }, "strict", z.ZodTypeAny, {
1562
+ on: string;
1563
+ title: string;
1564
+ body?: string | undefined;
1565
+ icon?: string | undefined;
1566
+ ttl?: number | undefined;
1567
+ cooldown?: number | undefined;
1568
+ deepLink?: {
1569
+ tileId: string;
1570
+ itemId?: string | undefined;
1571
+ } | undefined;
1572
+ }, {
1573
+ on: string;
1574
+ title: string;
1575
+ body?: string | undefined;
1576
+ icon?: string | undefined;
1577
+ ttl?: number | undefined;
1578
+ cooldown?: number | undefined;
1579
+ deepLink?: {
1580
+ tileId: string;
1581
+ itemId?: string | undefined;
1582
+ } | undefined;
1583
+ }>, "many">>;
1584
+ }, "strict", z.ZodTypeAny, {
1585
+ widget: string;
1586
+ id: string;
1587
+ props?: Record<string, unknown> | undefined;
1588
+ priority?: number | undefined;
1589
+ title?: string | undefined;
1590
+ activation?: {
1591
+ routes: {
1592
+ exclude?: string[] | undefined;
1593
+ include?: string[] | undefined;
1594
+ };
1595
+ strategy?: {
1596
+ type: "rules";
1597
+ rules: {
1598
+ conditions: ({
1599
+ url: string;
1600
+ type: "page_url";
1601
+ } | {
1602
+ type: "route";
1603
+ routeId: string;
1604
+ } | {
1605
+ anchorId: string;
1606
+ state: "visible" | "present" | "absent";
1607
+ type: "anchor_visible";
1608
+ } | {
1609
+ type: "event_occurred";
1610
+ eventName: string;
1611
+ withinMs?: number | undefined;
1612
+ } | {
1613
+ type: "state_equals";
1614
+ key: string;
1615
+ value?: unknown;
1616
+ } | {
1617
+ type: "viewport";
1618
+ minWidth?: number | undefined;
1619
+ maxWidth?: number | undefined;
1620
+ minHeight?: number | undefined;
1621
+ maxHeight?: number | undefined;
1622
+ } | {
1623
+ type: "session_metric";
1624
+ key: string;
1625
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1626
+ threshold: number;
1627
+ } | {
1628
+ type: "dismissed";
1629
+ key: string;
1630
+ inverted?: boolean | undefined;
1631
+ } | {
1632
+ type: "cooldown_active";
1633
+ key: string;
1634
+ inverted?: boolean | undefined;
1635
+ } | {
1636
+ type: "frequency_limit";
1637
+ key: string;
1638
+ limit: number;
1639
+ inverted?: boolean | undefined;
1640
+ } | {
1641
+ type: "event_count";
1642
+ key: string;
1643
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1644
+ count: number;
1645
+ withinMs?: number | undefined;
1646
+ })[];
1647
+ value?: unknown;
1648
+ }[];
1649
+ default?: unknown;
1650
+ } | {
1651
+ type: "score";
1652
+ threshold: number;
1653
+ field: string;
1654
+ above?: unknown;
1655
+ below?: unknown;
1656
+ } | {
1657
+ type: "model";
1658
+ modelId: string;
1659
+ inputs: string[];
1660
+ outputMapping: Record<string, unknown>;
1661
+ default?: unknown;
1662
+ } | {
1663
+ type: "external";
1664
+ endpoint: string;
1665
+ timeoutMs?: number | undefined;
1666
+ default?: unknown;
1667
+ method?: "GET" | "POST" | undefined;
1668
+ } | undefined;
1669
+ } | undefined;
1670
+ notifications?: {
1671
+ on: string;
1672
+ title: string;
1673
+ body?: string | undefined;
1674
+ icon?: string | undefined;
1675
+ ttl?: number | undefined;
1676
+ cooldown?: number | undefined;
1677
+ deepLink?: {
1678
+ tileId: string;
1679
+ itemId?: string | undefined;
1680
+ } | undefined;
1681
+ }[] | undefined;
1682
+ }, {
1683
+ widget: string;
1684
+ id: string;
1685
+ props?: Record<string, unknown> | undefined;
1686
+ priority?: number | undefined;
1687
+ title?: string | undefined;
1688
+ activation?: {
1689
+ routes: {
1690
+ exclude?: string[] | undefined;
1691
+ include?: string[] | undefined;
1692
+ };
1693
+ strategy?: {
1694
+ type: "rules";
1695
+ rules: {
1696
+ conditions: ({
1697
+ url: string;
1698
+ type: "page_url";
1699
+ } | {
1700
+ type: "route";
1701
+ routeId: string;
1702
+ } | {
1703
+ anchorId: string;
1704
+ state: "visible" | "present" | "absent";
1705
+ type: "anchor_visible";
1706
+ } | {
1707
+ type: "event_occurred";
1708
+ eventName: string;
1709
+ withinMs?: number | undefined;
1710
+ } | {
1711
+ type: "state_equals";
1712
+ key: string;
1713
+ value?: unknown;
1714
+ } | {
1715
+ type: "viewport";
1716
+ minWidth?: number | undefined;
1717
+ maxWidth?: number | undefined;
1718
+ minHeight?: number | undefined;
1719
+ maxHeight?: number | undefined;
1720
+ } | {
1721
+ type: "session_metric";
1722
+ key: string;
1723
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1724
+ threshold: number;
1725
+ } | {
1726
+ type: "dismissed";
1727
+ key: string;
1728
+ inverted?: boolean | undefined;
1729
+ } | {
1730
+ type: "cooldown_active";
1731
+ key: string;
1732
+ inverted?: boolean | undefined;
1733
+ } | {
1734
+ type: "frequency_limit";
1735
+ key: string;
1736
+ limit: number;
1737
+ inverted?: boolean | undefined;
1738
+ } | {
1739
+ type: "event_count";
1740
+ key: string;
1741
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1742
+ count: number;
1743
+ withinMs?: number | undefined;
1744
+ })[];
1745
+ value?: unknown;
1746
+ }[];
1747
+ default?: unknown;
1748
+ } | {
1749
+ type: "score";
1750
+ threshold: number;
1751
+ field: string;
1752
+ above?: unknown;
1753
+ below?: unknown;
1754
+ } | {
1755
+ type: "model";
1756
+ modelId: string;
1757
+ inputs: string[];
1758
+ outputMapping: Record<string, unknown>;
1759
+ default?: unknown;
1760
+ } | {
1761
+ type: "external";
1762
+ endpoint: string;
1763
+ timeoutMs?: number | undefined;
1764
+ default?: unknown;
1765
+ method?: "GET" | "POST" | undefined;
1766
+ } | undefined;
1767
+ } | undefined;
1768
+ notifications?: {
1769
+ on: string;
1770
+ title: string;
1771
+ body?: string | undefined;
1772
+ icon?: string | undefined;
1773
+ ttl?: number | undefined;
1774
+ cooldown?: number | undefined;
1775
+ deepLink?: {
1776
+ tileId: string;
1777
+ itemId?: string | undefined;
1778
+ } | undefined;
1779
+ }[] | undefined;
1780
+ }>, "many">;
1781
+ actions: z.ZodArray<z.ZodAny, "many">;
1782
+ theme: z.ZodOptional<z.ZodObject<{
1783
+ name: z.ZodOptional<z.ZodString>;
1784
+ mode: z.ZodOptional<z.ZodEnum<["dark", "light"]>>;
1785
+ position: z.ZodOptional<z.ZodEnum<["left", "right"]>>;
1786
+ colorPrimary: z.ZodOptional<z.ZodString>;
1787
+ colorBackground: z.ZodOptional<z.ZodString>;
1788
+ colorText: z.ZodOptional<z.ZodString>;
1789
+ colorTextSecondary: z.ZodOptional<z.ZodString>;
1790
+ borderRadius: z.ZodOptional<z.ZodString>;
1791
+ }, "strict", z.ZodTypeAny, {
1792
+ position?: "right" | "left" | undefined;
1793
+ name?: string | undefined;
1794
+ mode?: "dark" | "light" | undefined;
1795
+ colorPrimary?: string | undefined;
1796
+ colorBackground?: string | undefined;
1797
+ colorText?: string | undefined;
1798
+ colorTextSecondary?: string | undefined;
1799
+ borderRadius?: string | undefined;
1800
+ }, {
1801
+ position?: "right" | "left" | undefined;
1802
+ name?: string | undefined;
1803
+ mode?: "dark" | "light" | undefined;
1804
+ colorPrimary?: string | undefined;
1805
+ colorBackground?: string | undefined;
1806
+ colorText?: string | undefined;
1807
+ colorTextSecondary?: string | undefined;
1808
+ borderRadius?: string | undefined;
1809
+ }>>;
1810
+ launcher: z.ZodOptional<z.ZodObject<{
1811
+ enabled: z.ZodOptional<z.ZodBoolean>;
1812
+ label: z.ZodOptional<z.ZodString>;
1813
+ position: z.ZodOptional<z.ZodString>;
1814
+ animate: z.ZodOptional<z.ZodBoolean>;
1815
+ animationStyle: z.ZodOptional<z.ZodEnum<["pulse", "bounce", "glow"]>>;
1816
+ notificationCount: z.ZodOptional<z.ZodNumber>;
1817
+ }, "strict", z.ZodTypeAny, {
1818
+ position?: string | undefined;
1819
+ label?: string | undefined;
1820
+ enabled?: boolean | undefined;
1821
+ animate?: boolean | undefined;
1822
+ animationStyle?: "pulse" | "bounce" | "glow" | undefined;
1823
+ notificationCount?: number | undefined;
1824
+ }, {
1825
+ position?: string | undefined;
1826
+ label?: string | undefined;
1827
+ enabled?: boolean | undefined;
1828
+ animate?: boolean | undefined;
1829
+ animationStyle?: "pulse" | "bounce" | "glow" | undefined;
1830
+ notificationCount?: number | undefined;
1831
+ }>>;
1832
+ }, "strict", z.ZodTypeAny, {
1833
+ actions: any[];
1834
+ fetchedAt: string;
1835
+ tiles: {
1836
+ widget: string;
1837
+ id: string;
1838
+ props?: Record<string, unknown> | undefined;
1839
+ priority?: number | undefined;
1840
+ title?: string | undefined;
1841
+ activation?: {
1842
+ routes: {
1843
+ exclude?: string[] | undefined;
1844
+ include?: string[] | undefined;
1845
+ };
1846
+ strategy?: {
1847
+ type: "rules";
1848
+ rules: {
1849
+ conditions: ({
1850
+ url: string;
1851
+ type: "page_url";
1852
+ } | {
1853
+ type: "route";
1854
+ routeId: string;
1855
+ } | {
1856
+ anchorId: string;
1857
+ state: "visible" | "present" | "absent";
1858
+ type: "anchor_visible";
1859
+ } | {
1860
+ type: "event_occurred";
1861
+ eventName: string;
1862
+ withinMs?: number | undefined;
1863
+ } | {
1864
+ type: "state_equals";
1865
+ key: string;
1866
+ value?: unknown;
1867
+ } | {
1868
+ type: "viewport";
1869
+ minWidth?: number | undefined;
1870
+ maxWidth?: number | undefined;
1871
+ minHeight?: number | undefined;
1872
+ maxHeight?: number | undefined;
1873
+ } | {
1874
+ type: "session_metric";
1875
+ key: string;
1876
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1877
+ threshold: number;
1878
+ } | {
1879
+ type: "dismissed";
1880
+ key: string;
1881
+ inverted?: boolean | undefined;
1882
+ } | {
1883
+ type: "cooldown_active";
1884
+ key: string;
1885
+ inverted?: boolean | undefined;
1886
+ } | {
1887
+ type: "frequency_limit";
1888
+ key: string;
1889
+ limit: number;
1890
+ inverted?: boolean | undefined;
1891
+ } | {
1892
+ type: "event_count";
1893
+ key: string;
1894
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1895
+ count: number;
1896
+ withinMs?: number | undefined;
1897
+ })[];
1898
+ value?: unknown;
1899
+ }[];
1900
+ default?: unknown;
1901
+ } | {
1902
+ type: "score";
1903
+ threshold: number;
1904
+ field: string;
1905
+ above?: unknown;
1906
+ below?: unknown;
1907
+ } | {
1908
+ type: "model";
1909
+ modelId: string;
1910
+ inputs: string[];
1911
+ outputMapping: Record<string, unknown>;
1912
+ default?: unknown;
1913
+ } | {
1914
+ type: "external";
1915
+ endpoint: string;
1916
+ timeoutMs?: number | undefined;
1917
+ default?: unknown;
1918
+ method?: "GET" | "POST" | undefined;
1919
+ } | undefined;
1920
+ } | undefined;
1921
+ notifications?: {
1922
+ on: string;
1923
+ title: string;
1924
+ body?: string | undefined;
1925
+ icon?: string | undefined;
1926
+ ttl?: number | undefined;
1927
+ cooldown?: number | undefined;
1928
+ deepLink?: {
1929
+ tileId: string;
1930
+ itemId?: string | undefined;
1931
+ } | undefined;
1932
+ }[] | undefined;
1933
+ }[];
1934
+ schemaVersion?: string | undefined;
1935
+ configVersion?: string | undefined;
1936
+ canvasTitle?: string | undefined;
1937
+ theme?: {
1938
+ position?: "right" | "left" | undefined;
1939
+ name?: string | undefined;
1940
+ mode?: "dark" | "light" | undefined;
1941
+ colorPrimary?: string | undefined;
1942
+ colorBackground?: string | undefined;
1943
+ colorText?: string | undefined;
1944
+ colorTextSecondary?: string | undefined;
1945
+ borderRadius?: string | undefined;
1946
+ } | undefined;
1947
+ launcher?: {
1948
+ position?: string | undefined;
1949
+ label?: string | undefined;
1950
+ enabled?: boolean | undefined;
1951
+ animate?: boolean | undefined;
1952
+ animationStyle?: "pulse" | "bounce" | "glow" | undefined;
1953
+ notificationCount?: number | undefined;
1954
+ } | undefined;
1955
+ }, {
1956
+ actions: any[];
1957
+ fetchedAt: string;
1958
+ tiles: {
1959
+ widget: string;
1960
+ id: string;
1961
+ props?: Record<string, unknown> | undefined;
1962
+ priority?: number | undefined;
1963
+ title?: string | undefined;
1964
+ activation?: {
1965
+ routes: {
1966
+ exclude?: string[] | undefined;
1967
+ include?: string[] | undefined;
1968
+ };
1969
+ strategy?: {
1970
+ type: "rules";
1971
+ rules: {
1972
+ conditions: ({
1973
+ url: string;
1974
+ type: "page_url";
1975
+ } | {
1976
+ type: "route";
1977
+ routeId: string;
1978
+ } | {
1979
+ anchorId: string;
1980
+ state: "visible" | "present" | "absent";
1981
+ type: "anchor_visible";
1982
+ } | {
1983
+ type: "event_occurred";
1984
+ eventName: string;
1985
+ withinMs?: number | undefined;
1986
+ } | {
1987
+ type: "state_equals";
1988
+ key: string;
1989
+ value?: unknown;
1990
+ } | {
1991
+ type: "viewport";
1992
+ minWidth?: number | undefined;
1993
+ maxWidth?: number | undefined;
1994
+ minHeight?: number | undefined;
1995
+ maxHeight?: number | undefined;
1996
+ } | {
1997
+ type: "session_metric";
1998
+ key: string;
1999
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2000
+ threshold: number;
2001
+ } | {
2002
+ type: "dismissed";
2003
+ key: string;
2004
+ inverted?: boolean | undefined;
2005
+ } | {
2006
+ type: "cooldown_active";
2007
+ key: string;
2008
+ inverted?: boolean | undefined;
2009
+ } | {
2010
+ type: "frequency_limit";
2011
+ key: string;
2012
+ limit: number;
2013
+ inverted?: boolean | undefined;
2014
+ } | {
2015
+ type: "event_count";
2016
+ key: string;
2017
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2018
+ count: number;
2019
+ withinMs?: number | undefined;
2020
+ })[];
2021
+ value?: unknown;
2022
+ }[];
2023
+ default?: unknown;
2024
+ } | {
2025
+ type: "score";
2026
+ threshold: number;
2027
+ field: string;
2028
+ above?: unknown;
2029
+ below?: unknown;
2030
+ } | {
2031
+ type: "model";
2032
+ modelId: string;
2033
+ inputs: string[];
2034
+ outputMapping: Record<string, unknown>;
2035
+ default?: unknown;
2036
+ } | {
2037
+ type: "external";
2038
+ endpoint: string;
2039
+ timeoutMs?: number | undefined;
2040
+ default?: unknown;
2041
+ method?: "GET" | "POST" | undefined;
2042
+ } | undefined;
2043
+ } | undefined;
2044
+ notifications?: {
2045
+ on: string;
2046
+ title: string;
2047
+ body?: string | undefined;
2048
+ icon?: string | undefined;
2049
+ ttl?: number | undefined;
2050
+ cooldown?: number | undefined;
2051
+ deepLink?: {
2052
+ tileId: string;
2053
+ itemId?: string | undefined;
2054
+ } | undefined;
2055
+ }[] | undefined;
2056
+ }[];
2057
+ schemaVersion?: string | undefined;
2058
+ configVersion?: string | undefined;
2059
+ canvasTitle?: string | undefined;
2060
+ theme?: {
2061
+ position?: "right" | "left" | undefined;
2062
+ name?: string | undefined;
2063
+ mode?: "dark" | "light" | undefined;
2064
+ colorPrimary?: string | undefined;
2065
+ colorBackground?: string | undefined;
2066
+ colorText?: string | undefined;
2067
+ colorTextSecondary?: string | undefined;
2068
+ borderRadius?: string | undefined;
2069
+ } | undefined;
2070
+ launcher?: {
2071
+ position?: string | undefined;
2072
+ label?: string | undefined;
2073
+ enabled?: boolean | undefined;
2074
+ animate?: boolean | undefined;
2075
+ animationStyle?: "pulse" | "bounce" | "glow" | undefined;
2076
+ notificationCount?: number | undefined;
2077
+ } | undefined;
2078
+ }>;
2079
+ /**
2080
+ * Config schemas for unified JSON Schema generation.
2081
+ * The generator imports this array and converts each to a JSON Schema $def.
2082
+ */
2083
+ export declare const configSchemas: ({
2084
+ defName: string;
2085
+ schema: z.ZodObject<{
2086
+ id: z.ZodString;
2087
+ title: z.ZodOptional<z.ZodString>;
2088
+ priority: z.ZodOptional<z.ZodNumber>;
2089
+ widget: z.ZodString;
2090
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2091
+ activation: z.ZodOptional<z.ZodObject<{
2092
+ routes: z.ZodObject<{
2093
+ include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2094
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2095
+ }, "strip", z.ZodTypeAny, {
2096
+ exclude?: string[] | undefined;
2097
+ include?: string[] | undefined;
2098
+ }, {
2099
+ exclude?: string[] | undefined;
2100
+ include?: string[] | undefined;
2101
+ }>;
2102
+ strategy: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2103
+ type: z.ZodLiteral<"rules">;
2104
+ rules: z.ZodArray<z.ZodObject<{
2105
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2106
+ type: z.ZodLiteral<"page_url">;
2107
+ url: z.ZodString;
2108
+ }, "strip", z.ZodTypeAny, {
2109
+ url: string;
2110
+ type: "page_url";
2111
+ }, {
2112
+ url: string;
2113
+ type: "page_url";
2114
+ }>, z.ZodObject<{
2115
+ type: z.ZodLiteral<"route">;
2116
+ routeId: z.ZodString;
2117
+ }, "strip", z.ZodTypeAny, {
2118
+ type: "route";
2119
+ routeId: string;
2120
+ }, {
2121
+ type: "route";
2122
+ routeId: string;
2123
+ }>, z.ZodObject<{
2124
+ type: z.ZodLiteral<"anchor_visible">;
2125
+ anchorId: z.ZodString;
2126
+ state: z.ZodEnum<["visible", "present", "absent"]>;
2127
+ }, "strip", z.ZodTypeAny, {
2128
+ anchorId: string;
2129
+ state: "visible" | "present" | "absent";
2130
+ type: "anchor_visible";
2131
+ }, {
2132
+ anchorId: string;
2133
+ state: "visible" | "present" | "absent";
2134
+ type: "anchor_visible";
2135
+ }>, z.ZodObject<{
2136
+ type: z.ZodLiteral<"event_occurred">;
2137
+ eventName: z.ZodString;
2138
+ withinMs: z.ZodOptional<z.ZodNumber>;
2139
+ }, "strip", z.ZodTypeAny, {
2140
+ type: "event_occurred";
2141
+ eventName: string;
2142
+ withinMs?: number | undefined;
2143
+ }, {
2144
+ type: "event_occurred";
2145
+ eventName: string;
2146
+ withinMs?: number | undefined;
2147
+ }>, z.ZodObject<{
2148
+ type: z.ZodLiteral<"state_equals">;
2149
+ key: z.ZodString;
2150
+ value: z.ZodUnknown;
2151
+ }, "strip", z.ZodTypeAny, {
2152
+ type: "state_equals";
2153
+ key: string;
2154
+ value?: unknown;
2155
+ }, {
2156
+ type: "state_equals";
2157
+ key: string;
2158
+ value?: unknown;
2159
+ }>, z.ZodObject<{
2160
+ type: z.ZodLiteral<"viewport">;
2161
+ minWidth: z.ZodOptional<z.ZodNumber>;
2162
+ maxWidth: z.ZodOptional<z.ZodNumber>;
2163
+ minHeight: z.ZodOptional<z.ZodNumber>;
2164
+ maxHeight: z.ZodOptional<z.ZodNumber>;
2165
+ }, "strip", z.ZodTypeAny, {
2166
+ type: "viewport";
2167
+ minWidth?: number | undefined;
2168
+ maxWidth?: number | undefined;
2169
+ minHeight?: number | undefined;
2170
+ maxHeight?: number | undefined;
2171
+ }, {
2172
+ type: "viewport";
2173
+ minWidth?: number | undefined;
2174
+ maxWidth?: number | undefined;
2175
+ minHeight?: number | undefined;
2176
+ maxHeight?: number | undefined;
2177
+ }>, z.ZodObject<{
2178
+ type: z.ZodLiteral<"session_metric">;
2179
+ key: z.ZodString;
2180
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
2181
+ threshold: z.ZodNumber;
2182
+ }, "strip", z.ZodTypeAny, {
2183
+ type: "session_metric";
2184
+ key: string;
2185
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2186
+ threshold: number;
2187
+ }, {
2188
+ type: "session_metric";
2189
+ key: string;
2190
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2191
+ threshold: number;
2192
+ }>, z.ZodObject<{
2193
+ type: z.ZodLiteral<"dismissed">;
2194
+ key: z.ZodString;
2195
+ inverted: z.ZodOptional<z.ZodBoolean>;
2196
+ }, "strip", z.ZodTypeAny, {
2197
+ type: "dismissed";
2198
+ key: string;
2199
+ inverted?: boolean | undefined;
2200
+ }, {
2201
+ type: "dismissed";
2202
+ key: string;
2203
+ inverted?: boolean | undefined;
2204
+ }>, z.ZodObject<{
2205
+ type: z.ZodLiteral<"cooldown_active">;
2206
+ key: z.ZodString;
2207
+ inverted: z.ZodOptional<z.ZodBoolean>;
2208
+ }, "strip", z.ZodTypeAny, {
2209
+ type: "cooldown_active";
2210
+ key: string;
2211
+ inverted?: boolean | undefined;
2212
+ }, {
2213
+ type: "cooldown_active";
2214
+ key: string;
2215
+ inverted?: boolean | undefined;
2216
+ }>, z.ZodObject<{
2217
+ type: z.ZodLiteral<"frequency_limit">;
2218
+ key: z.ZodString;
2219
+ limit: z.ZodNumber;
2220
+ inverted: z.ZodOptional<z.ZodBoolean>;
2221
+ }, "strip", z.ZodTypeAny, {
2222
+ type: "frequency_limit";
2223
+ key: string;
2224
+ limit: number;
2225
+ inverted?: boolean | undefined;
2226
+ }, {
2227
+ type: "frequency_limit";
2228
+ key: string;
2229
+ limit: number;
2230
+ inverted?: boolean | undefined;
2231
+ }>, z.ZodObject<{
2232
+ type: z.ZodLiteral<"event_count">;
2233
+ key: z.ZodString;
2234
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
2235
+ count: z.ZodNumber;
2236
+ withinMs: z.ZodOptional<z.ZodNumber>;
2237
+ }, "strip", z.ZodTypeAny, {
2238
+ type: "event_count";
2239
+ key: string;
2240
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2241
+ count: number;
2242
+ withinMs?: number | undefined;
2243
+ }, {
2244
+ type: "event_count";
2245
+ key: string;
2246
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2247
+ count: number;
2248
+ withinMs?: number | undefined;
2249
+ }>]>, "many">;
2250
+ value: z.ZodUnknown;
2251
+ }, "strip", z.ZodTypeAny, {
2252
+ conditions: ({
2253
+ url: string;
2254
+ type: "page_url";
2255
+ } | {
2256
+ type: "route";
2257
+ routeId: string;
2258
+ } | {
2259
+ anchorId: string;
2260
+ state: "visible" | "present" | "absent";
2261
+ type: "anchor_visible";
2262
+ } | {
2263
+ type: "event_occurred";
2264
+ eventName: string;
2265
+ withinMs?: number | undefined;
2266
+ } | {
2267
+ type: "state_equals";
2268
+ key: string;
2269
+ value?: unknown;
2270
+ } | {
2271
+ type: "viewport";
2272
+ minWidth?: number | undefined;
2273
+ maxWidth?: number | undefined;
2274
+ minHeight?: number | undefined;
2275
+ maxHeight?: number | undefined;
2276
+ } | {
2277
+ type: "session_metric";
2278
+ key: string;
2279
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2280
+ threshold: number;
2281
+ } | {
2282
+ type: "dismissed";
2283
+ key: string;
2284
+ inverted?: boolean | undefined;
2285
+ } | {
2286
+ type: "cooldown_active";
2287
+ key: string;
2288
+ inverted?: boolean | undefined;
2289
+ } | {
2290
+ type: "frequency_limit";
2291
+ key: string;
2292
+ limit: number;
2293
+ inverted?: boolean | undefined;
2294
+ } | {
2295
+ type: "event_count";
2296
+ key: string;
2297
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2298
+ count: number;
2299
+ withinMs?: number | undefined;
2300
+ })[];
2301
+ value?: unknown;
2302
+ }, {
2303
+ conditions: ({
2304
+ url: string;
2305
+ type: "page_url";
2306
+ } | {
2307
+ type: "route";
2308
+ routeId: string;
2309
+ } | {
2310
+ anchorId: string;
2311
+ state: "visible" | "present" | "absent";
2312
+ type: "anchor_visible";
2313
+ } | {
2314
+ type: "event_occurred";
2315
+ eventName: string;
2316
+ withinMs?: number | undefined;
2317
+ } | {
2318
+ type: "state_equals";
2319
+ key: string;
2320
+ value?: unknown;
2321
+ } | {
2322
+ type: "viewport";
2323
+ minWidth?: number | undefined;
2324
+ maxWidth?: number | undefined;
2325
+ minHeight?: number | undefined;
2326
+ maxHeight?: number | undefined;
2327
+ } | {
2328
+ type: "session_metric";
2329
+ key: string;
2330
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2331
+ threshold: number;
2332
+ } | {
2333
+ type: "dismissed";
2334
+ key: string;
2335
+ inverted?: boolean | undefined;
2336
+ } | {
2337
+ type: "cooldown_active";
2338
+ key: string;
2339
+ inverted?: boolean | undefined;
2340
+ } | {
2341
+ type: "frequency_limit";
2342
+ key: string;
2343
+ limit: number;
2344
+ inverted?: boolean | undefined;
2345
+ } | {
2346
+ type: "event_count";
2347
+ key: string;
2348
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2349
+ count: number;
2350
+ withinMs?: number | undefined;
2351
+ })[];
2352
+ value?: unknown;
2353
+ }>, "many">;
2354
+ default: z.ZodUnknown;
2355
+ }, "strip", z.ZodTypeAny, {
2356
+ type: "rules";
2357
+ rules: {
2358
+ conditions: ({
2359
+ url: string;
2360
+ type: "page_url";
2361
+ } | {
2362
+ type: "route";
2363
+ routeId: string;
2364
+ } | {
2365
+ anchorId: string;
2366
+ state: "visible" | "present" | "absent";
2367
+ type: "anchor_visible";
2368
+ } | {
2369
+ type: "event_occurred";
2370
+ eventName: string;
2371
+ withinMs?: number | undefined;
2372
+ } | {
2373
+ type: "state_equals";
2374
+ key: string;
2375
+ value?: unknown;
2376
+ } | {
2377
+ type: "viewport";
2378
+ minWidth?: number | undefined;
2379
+ maxWidth?: number | undefined;
2380
+ minHeight?: number | undefined;
2381
+ maxHeight?: number | undefined;
2382
+ } | {
2383
+ type: "session_metric";
2384
+ key: string;
2385
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2386
+ threshold: number;
2387
+ } | {
2388
+ type: "dismissed";
2389
+ key: string;
2390
+ inverted?: boolean | undefined;
2391
+ } | {
2392
+ type: "cooldown_active";
2393
+ key: string;
2394
+ inverted?: boolean | undefined;
2395
+ } | {
2396
+ type: "frequency_limit";
2397
+ key: string;
2398
+ limit: number;
2399
+ inverted?: boolean | undefined;
2400
+ } | {
2401
+ type: "event_count";
2402
+ key: string;
2403
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2404
+ count: number;
2405
+ withinMs?: number | undefined;
2406
+ })[];
2407
+ value?: unknown;
2408
+ }[];
2409
+ default?: unknown;
2410
+ }, {
2411
+ type: "rules";
2412
+ rules: {
2413
+ conditions: ({
2414
+ url: string;
2415
+ type: "page_url";
2416
+ } | {
2417
+ type: "route";
2418
+ routeId: string;
2419
+ } | {
2420
+ anchorId: string;
2421
+ state: "visible" | "present" | "absent";
2422
+ type: "anchor_visible";
2423
+ } | {
2424
+ type: "event_occurred";
2425
+ eventName: string;
2426
+ withinMs?: number | undefined;
2427
+ } | {
2428
+ type: "state_equals";
2429
+ key: string;
2430
+ value?: unknown;
2431
+ } | {
2432
+ type: "viewport";
2433
+ minWidth?: number | undefined;
2434
+ maxWidth?: number | undefined;
2435
+ minHeight?: number | undefined;
2436
+ maxHeight?: number | undefined;
2437
+ } | {
2438
+ type: "session_metric";
2439
+ key: string;
2440
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2441
+ threshold: number;
2442
+ } | {
2443
+ type: "dismissed";
2444
+ key: string;
2445
+ inverted?: boolean | undefined;
2446
+ } | {
2447
+ type: "cooldown_active";
2448
+ key: string;
2449
+ inverted?: boolean | undefined;
2450
+ } | {
2451
+ type: "frequency_limit";
2452
+ key: string;
2453
+ limit: number;
2454
+ inverted?: boolean | undefined;
2455
+ } | {
2456
+ type: "event_count";
2457
+ key: string;
2458
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2459
+ count: number;
2460
+ withinMs?: number | undefined;
2461
+ })[];
2462
+ value?: unknown;
2463
+ }[];
2464
+ default?: unknown;
2465
+ }>, z.ZodObject<{
2466
+ type: z.ZodLiteral<"score">;
2467
+ field: z.ZodString;
2468
+ threshold: z.ZodNumber;
2469
+ above: z.ZodUnknown;
2470
+ below: z.ZodUnknown;
2471
+ }, "strip", z.ZodTypeAny, {
2472
+ type: "score";
2473
+ threshold: number;
2474
+ field: string;
2475
+ above?: unknown;
2476
+ below?: unknown;
2477
+ }, {
2478
+ type: "score";
2479
+ threshold: number;
2480
+ field: string;
2481
+ above?: unknown;
2482
+ below?: unknown;
2483
+ }>, z.ZodObject<{
2484
+ type: z.ZodLiteral<"model">;
2485
+ modelId: z.ZodString;
2486
+ inputs: z.ZodArray<z.ZodString, "many">;
2487
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2488
+ default: z.ZodUnknown;
2489
+ }, "strip", z.ZodTypeAny, {
2490
+ type: "model";
2491
+ modelId: string;
2492
+ inputs: string[];
2493
+ outputMapping: Record<string, unknown>;
2494
+ default?: unknown;
2495
+ }, {
2496
+ type: "model";
2497
+ modelId: string;
2498
+ inputs: string[];
2499
+ outputMapping: Record<string, unknown>;
2500
+ default?: unknown;
2501
+ }>, z.ZodObject<{
2502
+ type: z.ZodLiteral<"external">;
2503
+ endpoint: z.ZodString;
2504
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
2505
+ default: z.ZodUnknown;
2506
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
2507
+ }, "strip", z.ZodTypeAny, {
2508
+ type: "external";
2509
+ endpoint: string;
2510
+ timeoutMs?: number | undefined;
2511
+ default?: unknown;
2512
+ method?: "GET" | "POST" | undefined;
2513
+ }, {
2514
+ type: "external";
2515
+ endpoint: string;
2516
+ timeoutMs?: number | undefined;
2517
+ default?: unknown;
2518
+ method?: "GET" | "POST" | undefined;
2519
+ }>]>>;
2520
+ }, "strip", z.ZodTypeAny, {
2521
+ routes: {
2522
+ exclude?: string[] | undefined;
2523
+ include?: string[] | undefined;
2524
+ };
2525
+ strategy?: {
2526
+ type: "rules";
2527
+ rules: {
2528
+ conditions: ({
2529
+ url: string;
2530
+ type: "page_url";
2531
+ } | {
2532
+ type: "route";
2533
+ routeId: string;
2534
+ } | {
2535
+ anchorId: string;
2536
+ state: "visible" | "present" | "absent";
2537
+ type: "anchor_visible";
2538
+ } | {
2539
+ type: "event_occurred";
2540
+ eventName: string;
2541
+ withinMs?: number | undefined;
2542
+ } | {
2543
+ type: "state_equals";
2544
+ key: string;
2545
+ value?: unknown;
2546
+ } | {
2547
+ type: "viewport";
2548
+ minWidth?: number | undefined;
2549
+ maxWidth?: number | undefined;
2550
+ minHeight?: number | undefined;
2551
+ maxHeight?: number | undefined;
2552
+ } | {
2553
+ type: "session_metric";
2554
+ key: string;
2555
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2556
+ threshold: number;
2557
+ } | {
2558
+ type: "dismissed";
2559
+ key: string;
2560
+ inverted?: boolean | undefined;
2561
+ } | {
2562
+ type: "cooldown_active";
2563
+ key: string;
2564
+ inverted?: boolean | undefined;
2565
+ } | {
2566
+ type: "frequency_limit";
2567
+ key: string;
2568
+ limit: number;
2569
+ inverted?: boolean | undefined;
2570
+ } | {
2571
+ type: "event_count";
2572
+ key: string;
2573
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2574
+ count: number;
2575
+ withinMs?: number | undefined;
2576
+ })[];
2577
+ value?: unknown;
2578
+ }[];
2579
+ default?: unknown;
2580
+ } | {
2581
+ type: "score";
2582
+ threshold: number;
2583
+ field: string;
2584
+ above?: unknown;
2585
+ below?: unknown;
2586
+ } | {
2587
+ type: "model";
2588
+ modelId: string;
2589
+ inputs: string[];
2590
+ outputMapping: Record<string, unknown>;
2591
+ default?: unknown;
2592
+ } | {
2593
+ type: "external";
2594
+ endpoint: string;
2595
+ timeoutMs?: number | undefined;
2596
+ default?: unknown;
2597
+ method?: "GET" | "POST" | undefined;
2598
+ } | undefined;
2599
+ }, {
2600
+ routes: {
2601
+ exclude?: string[] | undefined;
2602
+ include?: string[] | undefined;
2603
+ };
2604
+ strategy?: {
2605
+ type: "rules";
2606
+ rules: {
2607
+ conditions: ({
2608
+ url: string;
2609
+ type: "page_url";
2610
+ } | {
2611
+ type: "route";
2612
+ routeId: string;
2613
+ } | {
2614
+ anchorId: string;
2615
+ state: "visible" | "present" | "absent";
2616
+ type: "anchor_visible";
2617
+ } | {
2618
+ type: "event_occurred";
2619
+ eventName: string;
2620
+ withinMs?: number | undefined;
2621
+ } | {
2622
+ type: "state_equals";
2623
+ key: string;
2624
+ value?: unknown;
2625
+ } | {
2626
+ type: "viewport";
2627
+ minWidth?: number | undefined;
2628
+ maxWidth?: number | undefined;
2629
+ minHeight?: number | undefined;
2630
+ maxHeight?: number | undefined;
2631
+ } | {
2632
+ type: "session_metric";
2633
+ key: string;
2634
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2635
+ threshold: number;
2636
+ } | {
2637
+ type: "dismissed";
2638
+ key: string;
2639
+ inverted?: boolean | undefined;
2640
+ } | {
2641
+ type: "cooldown_active";
2642
+ key: string;
2643
+ inverted?: boolean | undefined;
2644
+ } | {
2645
+ type: "frequency_limit";
2646
+ key: string;
2647
+ limit: number;
2648
+ inverted?: boolean | undefined;
2649
+ } | {
2650
+ type: "event_count";
2651
+ key: string;
2652
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2653
+ count: number;
2654
+ withinMs?: number | undefined;
2655
+ })[];
2656
+ value?: unknown;
2657
+ }[];
2658
+ default?: unknown;
2659
+ } | {
2660
+ type: "score";
2661
+ threshold: number;
2662
+ field: string;
2663
+ above?: unknown;
2664
+ below?: unknown;
2665
+ } | {
2666
+ type: "model";
2667
+ modelId: string;
2668
+ inputs: string[];
2669
+ outputMapping: Record<string, unknown>;
2670
+ default?: unknown;
2671
+ } | {
2672
+ type: "external";
2673
+ endpoint: string;
2674
+ timeoutMs?: number | undefined;
2675
+ default?: unknown;
2676
+ method?: "GET" | "POST" | undefined;
2677
+ } | undefined;
2678
+ }>>;
2679
+ notifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
2680
+ on: z.ZodString;
2681
+ title: z.ZodString;
2682
+ body: z.ZodOptional<z.ZodString>;
2683
+ icon: z.ZodOptional<z.ZodString>;
2684
+ ttl: z.ZodOptional<z.ZodNumber>;
2685
+ cooldown: z.ZodOptional<z.ZodNumber>;
2686
+ deepLink: z.ZodOptional<z.ZodObject<{
2687
+ tileId: z.ZodString;
2688
+ itemId: z.ZodOptional<z.ZodString>;
2689
+ }, "strict", z.ZodTypeAny, {
2690
+ tileId: string;
2691
+ itemId?: string | undefined;
2692
+ }, {
2693
+ tileId: string;
2694
+ itemId?: string | undefined;
2695
+ }>>;
2696
+ }, "strict", z.ZodTypeAny, {
2697
+ on: string;
2698
+ title: string;
2699
+ body?: string | undefined;
2700
+ icon?: string | undefined;
2701
+ ttl?: number | undefined;
2702
+ cooldown?: number | undefined;
2703
+ deepLink?: {
2704
+ tileId: string;
2705
+ itemId?: string | undefined;
2706
+ } | undefined;
2707
+ }, {
2708
+ on: string;
2709
+ title: string;
2710
+ body?: string | undefined;
2711
+ icon?: string | undefined;
2712
+ ttl?: number | undefined;
2713
+ cooldown?: number | undefined;
2714
+ deepLink?: {
2715
+ tileId: string;
2716
+ itemId?: string | undefined;
2717
+ } | undefined;
2718
+ }>, "many">>;
2719
+ }, "strict", z.ZodTypeAny, {
2720
+ widget: string;
2721
+ id: string;
2722
+ props?: Record<string, unknown> | undefined;
2723
+ priority?: number | undefined;
2724
+ title?: string | undefined;
2725
+ activation?: {
2726
+ routes: {
2727
+ exclude?: string[] | undefined;
2728
+ include?: string[] | undefined;
2729
+ };
2730
+ strategy?: {
2731
+ type: "rules";
2732
+ rules: {
2733
+ conditions: ({
2734
+ url: string;
2735
+ type: "page_url";
2736
+ } | {
2737
+ type: "route";
2738
+ routeId: string;
2739
+ } | {
2740
+ anchorId: string;
2741
+ state: "visible" | "present" | "absent";
2742
+ type: "anchor_visible";
2743
+ } | {
2744
+ type: "event_occurred";
2745
+ eventName: string;
2746
+ withinMs?: number | undefined;
2747
+ } | {
2748
+ type: "state_equals";
2749
+ key: string;
2750
+ value?: unknown;
2751
+ } | {
2752
+ type: "viewport";
2753
+ minWidth?: number | undefined;
2754
+ maxWidth?: number | undefined;
2755
+ minHeight?: number | undefined;
2756
+ maxHeight?: number | undefined;
2757
+ } | {
2758
+ type: "session_metric";
2759
+ key: string;
2760
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2761
+ threshold: number;
2762
+ } | {
2763
+ type: "dismissed";
2764
+ key: string;
2765
+ inverted?: boolean | undefined;
2766
+ } | {
2767
+ type: "cooldown_active";
2768
+ key: string;
2769
+ inverted?: boolean | undefined;
2770
+ } | {
2771
+ type: "frequency_limit";
2772
+ key: string;
2773
+ limit: number;
2774
+ inverted?: boolean | undefined;
2775
+ } | {
2776
+ type: "event_count";
2777
+ key: string;
2778
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2779
+ count: number;
2780
+ withinMs?: number | undefined;
2781
+ })[];
2782
+ value?: unknown;
2783
+ }[];
2784
+ default?: unknown;
2785
+ } | {
2786
+ type: "score";
2787
+ threshold: number;
2788
+ field: string;
2789
+ above?: unknown;
2790
+ below?: unknown;
2791
+ } | {
2792
+ type: "model";
2793
+ modelId: string;
2794
+ inputs: string[];
2795
+ outputMapping: Record<string, unknown>;
2796
+ default?: unknown;
2797
+ } | {
2798
+ type: "external";
2799
+ endpoint: string;
2800
+ timeoutMs?: number | undefined;
2801
+ default?: unknown;
2802
+ method?: "GET" | "POST" | undefined;
2803
+ } | undefined;
2804
+ } | undefined;
2805
+ notifications?: {
2806
+ on: string;
2807
+ title: string;
2808
+ body?: string | undefined;
2809
+ icon?: string | undefined;
2810
+ ttl?: number | undefined;
2811
+ cooldown?: number | undefined;
2812
+ deepLink?: {
2813
+ tileId: string;
2814
+ itemId?: string | undefined;
2815
+ } | undefined;
2816
+ }[] | undefined;
2817
+ }, {
2818
+ widget: string;
2819
+ id: string;
2820
+ props?: Record<string, unknown> | undefined;
2821
+ priority?: number | undefined;
2822
+ title?: string | undefined;
2823
+ activation?: {
2824
+ routes: {
2825
+ exclude?: string[] | undefined;
2826
+ include?: string[] | undefined;
2827
+ };
2828
+ strategy?: {
2829
+ type: "rules";
2830
+ rules: {
2831
+ conditions: ({
2832
+ url: string;
2833
+ type: "page_url";
2834
+ } | {
2835
+ type: "route";
2836
+ routeId: string;
2837
+ } | {
2838
+ anchorId: string;
2839
+ state: "visible" | "present" | "absent";
2840
+ type: "anchor_visible";
2841
+ } | {
2842
+ type: "event_occurred";
2843
+ eventName: string;
2844
+ withinMs?: number | undefined;
2845
+ } | {
2846
+ type: "state_equals";
2847
+ key: string;
2848
+ value?: unknown;
2849
+ } | {
2850
+ type: "viewport";
2851
+ minWidth?: number | undefined;
2852
+ maxWidth?: number | undefined;
2853
+ minHeight?: number | undefined;
2854
+ maxHeight?: number | undefined;
2855
+ } | {
2856
+ type: "session_metric";
2857
+ key: string;
2858
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2859
+ threshold: number;
2860
+ } | {
2861
+ type: "dismissed";
2862
+ key: string;
2863
+ inverted?: boolean | undefined;
2864
+ } | {
2865
+ type: "cooldown_active";
2866
+ key: string;
2867
+ inverted?: boolean | undefined;
2868
+ } | {
2869
+ type: "frequency_limit";
2870
+ key: string;
2871
+ limit: number;
2872
+ inverted?: boolean | undefined;
2873
+ } | {
2874
+ type: "event_count";
2875
+ key: string;
2876
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2877
+ count: number;
2878
+ withinMs?: number | undefined;
2879
+ })[];
2880
+ value?: unknown;
2881
+ }[];
2882
+ default?: unknown;
2883
+ } | {
2884
+ type: "score";
2885
+ threshold: number;
2886
+ field: string;
2887
+ above?: unknown;
2888
+ below?: unknown;
2889
+ } | {
2890
+ type: "model";
2891
+ modelId: string;
2892
+ inputs: string[];
2893
+ outputMapping: Record<string, unknown>;
2894
+ default?: unknown;
2895
+ } | {
2896
+ type: "external";
2897
+ endpoint: string;
2898
+ timeoutMs?: number | undefined;
2899
+ default?: unknown;
2900
+ method?: "GET" | "POST" | undefined;
2901
+ } | undefined;
2902
+ } | undefined;
2903
+ notifications?: {
2904
+ on: string;
2905
+ title: string;
2906
+ body?: string | undefined;
2907
+ icon?: string | undefined;
2908
+ ttl?: number | undefined;
2909
+ cooldown?: number | undefined;
2910
+ deepLink?: {
2911
+ tileId: string;
2912
+ itemId?: string | undefined;
2913
+ } | undefined;
2914
+ }[] | undefined;
2915
+ }>;
2916
+ } | {
2917
+ defName: string;
2918
+ schema: z.ZodObject<{
2919
+ name: z.ZodOptional<z.ZodString>;
2920
+ mode: z.ZodOptional<z.ZodEnum<["dark", "light"]>>;
2921
+ position: z.ZodOptional<z.ZodEnum<["left", "right"]>>;
2922
+ colorPrimary: z.ZodOptional<z.ZodString>;
2923
+ colorBackground: z.ZodOptional<z.ZodString>;
2924
+ colorText: z.ZodOptional<z.ZodString>;
2925
+ colorTextSecondary: z.ZodOptional<z.ZodString>;
2926
+ borderRadius: z.ZodOptional<z.ZodString>;
2927
+ }, "strict", z.ZodTypeAny, {
2928
+ position?: "right" | "left" | undefined;
2929
+ name?: string | undefined;
2930
+ mode?: "dark" | "light" | undefined;
2931
+ colorPrimary?: string | undefined;
2932
+ colorBackground?: string | undefined;
2933
+ colorText?: string | undefined;
2934
+ colorTextSecondary?: string | undefined;
2935
+ borderRadius?: string | undefined;
2936
+ }, {
2937
+ position?: "right" | "left" | undefined;
2938
+ name?: string | undefined;
2939
+ mode?: "dark" | "light" | undefined;
2940
+ colorPrimary?: string | undefined;
2941
+ colorBackground?: string | undefined;
2942
+ colorText?: string | undefined;
2943
+ colorTextSecondary?: string | undefined;
2944
+ borderRadius?: string | undefined;
2945
+ }>;
2946
+ } | {
2947
+ defName: string;
2948
+ schema: z.ZodObject<{
2949
+ enabled: z.ZodOptional<z.ZodBoolean>;
2950
+ label: z.ZodOptional<z.ZodString>;
2951
+ position: z.ZodOptional<z.ZodString>;
2952
+ animate: z.ZodOptional<z.ZodBoolean>;
2953
+ animationStyle: z.ZodOptional<z.ZodEnum<["pulse", "bounce", "glow"]>>;
2954
+ notificationCount: z.ZodOptional<z.ZodNumber>;
2955
+ }, "strict", z.ZodTypeAny, {
2956
+ position?: string | undefined;
2957
+ label?: string | undefined;
2958
+ enabled?: boolean | undefined;
2959
+ animate?: boolean | undefined;
2960
+ animationStyle?: "pulse" | "bounce" | "glow" | undefined;
2961
+ notificationCount?: number | undefined;
2962
+ }, {
2963
+ position?: string | undefined;
2964
+ label?: string | undefined;
2965
+ enabled?: boolean | undefined;
2966
+ animate?: boolean | undefined;
2967
+ animationStyle?: "pulse" | "bounce" | "glow" | undefined;
2968
+ notificationCount?: number | undefined;
2969
+ }>;
2970
+ } | {
2971
+ defName: string;
2972
+ schema: z.ZodObject<{
2973
+ schemaVersion: z.ZodOptional<z.ZodString>;
2974
+ fetchedAt: z.ZodString;
2975
+ configVersion: z.ZodOptional<z.ZodString>;
2976
+ canvasTitle: z.ZodOptional<z.ZodString>;
2977
+ tiles: z.ZodArray<z.ZodObject<{
2978
+ id: z.ZodString;
2979
+ title: z.ZodOptional<z.ZodString>;
2980
+ priority: z.ZodOptional<z.ZodNumber>;
2981
+ widget: z.ZodString;
2982
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2983
+ activation: z.ZodOptional<z.ZodObject<{
2984
+ routes: z.ZodObject<{
2985
+ include: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2986
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2987
+ }, "strip", z.ZodTypeAny, {
2988
+ exclude?: string[] | undefined;
2989
+ include?: string[] | undefined;
2990
+ }, {
2991
+ exclude?: string[] | undefined;
2992
+ include?: string[] | undefined;
2993
+ }>;
2994
+ strategy: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2995
+ type: z.ZodLiteral<"rules">;
2996
+ rules: z.ZodArray<z.ZodObject<{
2997
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2998
+ type: z.ZodLiteral<"page_url">;
2999
+ url: z.ZodString;
3000
+ }, "strip", z.ZodTypeAny, {
3001
+ url: string;
3002
+ type: "page_url";
3003
+ }, {
3004
+ url: string;
3005
+ type: "page_url";
3006
+ }>, z.ZodObject<{
3007
+ type: z.ZodLiteral<"route">;
3008
+ routeId: z.ZodString;
3009
+ }, "strip", z.ZodTypeAny, {
3010
+ type: "route";
3011
+ routeId: string;
3012
+ }, {
3013
+ type: "route";
3014
+ routeId: string;
3015
+ }>, z.ZodObject<{
3016
+ type: z.ZodLiteral<"anchor_visible">;
3017
+ anchorId: z.ZodString;
3018
+ state: z.ZodEnum<["visible", "present", "absent"]>;
3019
+ }, "strip", z.ZodTypeAny, {
3020
+ anchorId: string;
3021
+ state: "visible" | "present" | "absent";
3022
+ type: "anchor_visible";
3023
+ }, {
3024
+ anchorId: string;
3025
+ state: "visible" | "present" | "absent";
3026
+ type: "anchor_visible";
3027
+ }>, z.ZodObject<{
3028
+ type: z.ZodLiteral<"event_occurred">;
3029
+ eventName: z.ZodString;
3030
+ withinMs: z.ZodOptional<z.ZodNumber>;
3031
+ }, "strip", z.ZodTypeAny, {
3032
+ type: "event_occurred";
3033
+ eventName: string;
3034
+ withinMs?: number | undefined;
3035
+ }, {
3036
+ type: "event_occurred";
3037
+ eventName: string;
3038
+ withinMs?: number | undefined;
3039
+ }>, z.ZodObject<{
3040
+ type: z.ZodLiteral<"state_equals">;
3041
+ key: z.ZodString;
3042
+ value: z.ZodUnknown;
3043
+ }, "strip", z.ZodTypeAny, {
3044
+ type: "state_equals";
3045
+ key: string;
3046
+ value?: unknown;
3047
+ }, {
3048
+ type: "state_equals";
3049
+ key: string;
3050
+ value?: unknown;
3051
+ }>, z.ZodObject<{
3052
+ type: z.ZodLiteral<"viewport">;
3053
+ minWidth: z.ZodOptional<z.ZodNumber>;
3054
+ maxWidth: z.ZodOptional<z.ZodNumber>;
3055
+ minHeight: z.ZodOptional<z.ZodNumber>;
3056
+ maxHeight: z.ZodOptional<z.ZodNumber>;
3057
+ }, "strip", z.ZodTypeAny, {
3058
+ type: "viewport";
3059
+ minWidth?: number | undefined;
3060
+ maxWidth?: number | undefined;
3061
+ minHeight?: number | undefined;
3062
+ maxHeight?: number | undefined;
3063
+ }, {
3064
+ type: "viewport";
3065
+ minWidth?: number | undefined;
3066
+ maxWidth?: number | undefined;
3067
+ minHeight?: number | undefined;
3068
+ maxHeight?: number | undefined;
3069
+ }>, z.ZodObject<{
3070
+ type: z.ZodLiteral<"session_metric">;
3071
+ key: z.ZodString;
3072
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
3073
+ threshold: z.ZodNumber;
3074
+ }, "strip", z.ZodTypeAny, {
3075
+ type: "session_metric";
3076
+ key: string;
3077
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3078
+ threshold: number;
3079
+ }, {
3080
+ type: "session_metric";
3081
+ key: string;
3082
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3083
+ threshold: number;
3084
+ }>, z.ZodObject<{
3085
+ type: z.ZodLiteral<"dismissed">;
3086
+ key: z.ZodString;
3087
+ inverted: z.ZodOptional<z.ZodBoolean>;
3088
+ }, "strip", z.ZodTypeAny, {
3089
+ type: "dismissed";
3090
+ key: string;
3091
+ inverted?: boolean | undefined;
3092
+ }, {
3093
+ type: "dismissed";
3094
+ key: string;
3095
+ inverted?: boolean | undefined;
3096
+ }>, z.ZodObject<{
3097
+ type: z.ZodLiteral<"cooldown_active">;
3098
+ key: z.ZodString;
3099
+ inverted: z.ZodOptional<z.ZodBoolean>;
3100
+ }, "strip", z.ZodTypeAny, {
3101
+ type: "cooldown_active";
3102
+ key: string;
3103
+ inverted?: boolean | undefined;
3104
+ }, {
3105
+ type: "cooldown_active";
3106
+ key: string;
3107
+ inverted?: boolean | undefined;
3108
+ }>, z.ZodObject<{
3109
+ type: z.ZodLiteral<"frequency_limit">;
3110
+ key: z.ZodString;
3111
+ limit: z.ZodNumber;
3112
+ inverted: z.ZodOptional<z.ZodBoolean>;
3113
+ }, "strip", z.ZodTypeAny, {
3114
+ type: "frequency_limit";
3115
+ key: string;
3116
+ limit: number;
3117
+ inverted?: boolean | undefined;
3118
+ }, {
3119
+ type: "frequency_limit";
3120
+ key: string;
3121
+ limit: number;
3122
+ inverted?: boolean | undefined;
3123
+ }>, z.ZodObject<{
3124
+ type: z.ZodLiteral<"event_count">;
3125
+ key: z.ZodString;
3126
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
3127
+ count: z.ZodNumber;
3128
+ withinMs: z.ZodOptional<z.ZodNumber>;
3129
+ }, "strip", z.ZodTypeAny, {
3130
+ type: "event_count";
3131
+ key: string;
3132
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3133
+ count: number;
3134
+ withinMs?: number | undefined;
3135
+ }, {
3136
+ type: "event_count";
3137
+ key: string;
3138
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3139
+ count: number;
3140
+ withinMs?: number | undefined;
3141
+ }>]>, "many">;
3142
+ value: z.ZodUnknown;
3143
+ }, "strip", z.ZodTypeAny, {
3144
+ conditions: ({
3145
+ url: string;
3146
+ type: "page_url";
3147
+ } | {
3148
+ type: "route";
3149
+ routeId: string;
3150
+ } | {
3151
+ anchorId: string;
3152
+ state: "visible" | "present" | "absent";
3153
+ type: "anchor_visible";
3154
+ } | {
3155
+ type: "event_occurred";
3156
+ eventName: string;
3157
+ withinMs?: number | undefined;
3158
+ } | {
3159
+ type: "state_equals";
3160
+ key: string;
3161
+ value?: unknown;
3162
+ } | {
3163
+ type: "viewport";
3164
+ minWidth?: number | undefined;
3165
+ maxWidth?: number | undefined;
3166
+ minHeight?: number | undefined;
3167
+ maxHeight?: number | undefined;
3168
+ } | {
3169
+ type: "session_metric";
3170
+ key: string;
3171
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3172
+ threshold: number;
3173
+ } | {
3174
+ type: "dismissed";
3175
+ key: string;
3176
+ inverted?: boolean | undefined;
3177
+ } | {
3178
+ type: "cooldown_active";
3179
+ key: string;
3180
+ inverted?: boolean | undefined;
3181
+ } | {
3182
+ type: "frequency_limit";
3183
+ key: string;
3184
+ limit: number;
3185
+ inverted?: boolean | undefined;
3186
+ } | {
3187
+ type: "event_count";
3188
+ key: string;
3189
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3190
+ count: number;
3191
+ withinMs?: number | undefined;
3192
+ })[];
3193
+ value?: unknown;
3194
+ }, {
3195
+ conditions: ({
3196
+ url: string;
3197
+ type: "page_url";
3198
+ } | {
3199
+ type: "route";
3200
+ routeId: string;
3201
+ } | {
3202
+ anchorId: string;
3203
+ state: "visible" | "present" | "absent";
3204
+ type: "anchor_visible";
3205
+ } | {
3206
+ type: "event_occurred";
3207
+ eventName: string;
3208
+ withinMs?: number | undefined;
3209
+ } | {
3210
+ type: "state_equals";
3211
+ key: string;
3212
+ value?: unknown;
3213
+ } | {
3214
+ type: "viewport";
3215
+ minWidth?: number | undefined;
3216
+ maxWidth?: number | undefined;
3217
+ minHeight?: number | undefined;
3218
+ maxHeight?: number | undefined;
3219
+ } | {
3220
+ type: "session_metric";
3221
+ key: string;
3222
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3223
+ threshold: number;
3224
+ } | {
3225
+ type: "dismissed";
3226
+ key: string;
3227
+ inverted?: boolean | undefined;
3228
+ } | {
3229
+ type: "cooldown_active";
3230
+ key: string;
3231
+ inverted?: boolean | undefined;
3232
+ } | {
3233
+ type: "frequency_limit";
3234
+ key: string;
3235
+ limit: number;
3236
+ inverted?: boolean | undefined;
3237
+ } | {
3238
+ type: "event_count";
3239
+ key: string;
3240
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3241
+ count: number;
3242
+ withinMs?: number | undefined;
3243
+ })[];
3244
+ value?: unknown;
3245
+ }>, "many">;
3246
+ default: z.ZodUnknown;
3247
+ }, "strip", z.ZodTypeAny, {
3248
+ type: "rules";
3249
+ rules: {
3250
+ conditions: ({
3251
+ url: string;
3252
+ type: "page_url";
3253
+ } | {
3254
+ type: "route";
3255
+ routeId: string;
3256
+ } | {
3257
+ anchorId: string;
3258
+ state: "visible" | "present" | "absent";
3259
+ type: "anchor_visible";
3260
+ } | {
3261
+ type: "event_occurred";
3262
+ eventName: string;
3263
+ withinMs?: number | undefined;
3264
+ } | {
3265
+ type: "state_equals";
3266
+ key: string;
3267
+ value?: unknown;
3268
+ } | {
3269
+ type: "viewport";
3270
+ minWidth?: number | undefined;
3271
+ maxWidth?: number | undefined;
3272
+ minHeight?: number | undefined;
3273
+ maxHeight?: number | undefined;
3274
+ } | {
3275
+ type: "session_metric";
3276
+ key: string;
3277
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3278
+ threshold: number;
3279
+ } | {
3280
+ type: "dismissed";
3281
+ key: string;
3282
+ inverted?: boolean | undefined;
3283
+ } | {
3284
+ type: "cooldown_active";
3285
+ key: string;
3286
+ inverted?: boolean | undefined;
3287
+ } | {
3288
+ type: "frequency_limit";
3289
+ key: string;
3290
+ limit: number;
3291
+ inverted?: boolean | undefined;
3292
+ } | {
3293
+ type: "event_count";
3294
+ key: string;
3295
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3296
+ count: number;
3297
+ withinMs?: number | undefined;
3298
+ })[];
3299
+ value?: unknown;
3300
+ }[];
3301
+ default?: unknown;
3302
+ }, {
3303
+ type: "rules";
3304
+ rules: {
3305
+ conditions: ({
3306
+ url: string;
3307
+ type: "page_url";
3308
+ } | {
3309
+ type: "route";
3310
+ routeId: string;
3311
+ } | {
3312
+ anchorId: string;
3313
+ state: "visible" | "present" | "absent";
3314
+ type: "anchor_visible";
3315
+ } | {
3316
+ type: "event_occurred";
3317
+ eventName: string;
3318
+ withinMs?: number | undefined;
3319
+ } | {
3320
+ type: "state_equals";
3321
+ key: string;
3322
+ value?: unknown;
3323
+ } | {
3324
+ type: "viewport";
3325
+ minWidth?: number | undefined;
3326
+ maxWidth?: number | undefined;
3327
+ minHeight?: number | undefined;
3328
+ maxHeight?: number | undefined;
3329
+ } | {
3330
+ type: "session_metric";
3331
+ key: string;
3332
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3333
+ threshold: number;
3334
+ } | {
3335
+ type: "dismissed";
3336
+ key: string;
3337
+ inverted?: boolean | undefined;
3338
+ } | {
3339
+ type: "cooldown_active";
3340
+ key: string;
3341
+ inverted?: boolean | undefined;
3342
+ } | {
3343
+ type: "frequency_limit";
3344
+ key: string;
3345
+ limit: number;
3346
+ inverted?: boolean | undefined;
3347
+ } | {
3348
+ type: "event_count";
3349
+ key: string;
3350
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3351
+ count: number;
3352
+ withinMs?: number | undefined;
3353
+ })[];
3354
+ value?: unknown;
3355
+ }[];
3356
+ default?: unknown;
3357
+ }>, z.ZodObject<{
3358
+ type: z.ZodLiteral<"score">;
3359
+ field: z.ZodString;
3360
+ threshold: z.ZodNumber;
3361
+ above: z.ZodUnknown;
3362
+ below: z.ZodUnknown;
3363
+ }, "strip", z.ZodTypeAny, {
3364
+ type: "score";
3365
+ threshold: number;
3366
+ field: string;
3367
+ above?: unknown;
3368
+ below?: unknown;
3369
+ }, {
3370
+ type: "score";
3371
+ threshold: number;
3372
+ field: string;
3373
+ above?: unknown;
3374
+ below?: unknown;
3375
+ }>, z.ZodObject<{
3376
+ type: z.ZodLiteral<"model">;
3377
+ modelId: z.ZodString;
3378
+ inputs: z.ZodArray<z.ZodString, "many">;
3379
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3380
+ default: z.ZodUnknown;
3381
+ }, "strip", z.ZodTypeAny, {
3382
+ type: "model";
3383
+ modelId: string;
3384
+ inputs: string[];
3385
+ outputMapping: Record<string, unknown>;
3386
+ default?: unknown;
3387
+ }, {
3388
+ type: "model";
3389
+ modelId: string;
3390
+ inputs: string[];
3391
+ outputMapping: Record<string, unknown>;
3392
+ default?: unknown;
3393
+ }>, z.ZodObject<{
3394
+ type: z.ZodLiteral<"external">;
3395
+ endpoint: z.ZodString;
3396
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
3397
+ default: z.ZodUnknown;
3398
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
3399
+ }, "strip", z.ZodTypeAny, {
3400
+ type: "external";
3401
+ endpoint: string;
3402
+ timeoutMs?: number | undefined;
3403
+ default?: unknown;
3404
+ method?: "GET" | "POST" | undefined;
3405
+ }, {
3406
+ type: "external";
3407
+ endpoint: string;
3408
+ timeoutMs?: number | undefined;
3409
+ default?: unknown;
3410
+ method?: "GET" | "POST" | undefined;
3411
+ }>]>>;
3412
+ }, "strip", z.ZodTypeAny, {
3413
+ routes: {
3414
+ exclude?: string[] | undefined;
3415
+ include?: string[] | undefined;
3416
+ };
3417
+ strategy?: {
3418
+ type: "rules";
3419
+ rules: {
3420
+ conditions: ({
3421
+ url: string;
3422
+ type: "page_url";
3423
+ } | {
3424
+ type: "route";
3425
+ routeId: string;
3426
+ } | {
3427
+ anchorId: string;
3428
+ state: "visible" | "present" | "absent";
3429
+ type: "anchor_visible";
3430
+ } | {
3431
+ type: "event_occurred";
3432
+ eventName: string;
3433
+ withinMs?: number | undefined;
3434
+ } | {
3435
+ type: "state_equals";
3436
+ key: string;
3437
+ value?: unknown;
3438
+ } | {
3439
+ type: "viewport";
3440
+ minWidth?: number | undefined;
3441
+ maxWidth?: number | undefined;
3442
+ minHeight?: number | undefined;
3443
+ maxHeight?: number | undefined;
3444
+ } | {
3445
+ type: "session_metric";
3446
+ key: string;
3447
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3448
+ threshold: number;
3449
+ } | {
3450
+ type: "dismissed";
3451
+ key: string;
3452
+ inverted?: boolean | undefined;
3453
+ } | {
3454
+ type: "cooldown_active";
3455
+ key: string;
3456
+ inverted?: boolean | undefined;
3457
+ } | {
3458
+ type: "frequency_limit";
3459
+ key: string;
3460
+ limit: number;
3461
+ inverted?: boolean | undefined;
3462
+ } | {
3463
+ type: "event_count";
3464
+ key: string;
3465
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3466
+ count: number;
3467
+ withinMs?: number | undefined;
3468
+ })[];
3469
+ value?: unknown;
3470
+ }[];
3471
+ default?: unknown;
3472
+ } | {
3473
+ type: "score";
3474
+ threshold: number;
3475
+ field: string;
3476
+ above?: unknown;
3477
+ below?: unknown;
3478
+ } | {
3479
+ type: "model";
3480
+ modelId: string;
3481
+ inputs: string[];
3482
+ outputMapping: Record<string, unknown>;
3483
+ default?: unknown;
3484
+ } | {
3485
+ type: "external";
3486
+ endpoint: string;
3487
+ timeoutMs?: number | undefined;
3488
+ default?: unknown;
3489
+ method?: "GET" | "POST" | undefined;
3490
+ } | undefined;
3491
+ }, {
3492
+ routes: {
3493
+ exclude?: string[] | undefined;
3494
+ include?: string[] | undefined;
3495
+ };
3496
+ strategy?: {
3497
+ type: "rules";
3498
+ rules: {
3499
+ conditions: ({
3500
+ url: string;
3501
+ type: "page_url";
3502
+ } | {
3503
+ type: "route";
3504
+ routeId: string;
3505
+ } | {
3506
+ anchorId: string;
3507
+ state: "visible" | "present" | "absent";
3508
+ type: "anchor_visible";
3509
+ } | {
3510
+ type: "event_occurred";
3511
+ eventName: string;
3512
+ withinMs?: number | undefined;
3513
+ } | {
3514
+ type: "state_equals";
3515
+ key: string;
3516
+ value?: unknown;
3517
+ } | {
3518
+ type: "viewport";
3519
+ minWidth?: number | undefined;
3520
+ maxWidth?: number | undefined;
3521
+ minHeight?: number | undefined;
3522
+ maxHeight?: number | undefined;
3523
+ } | {
3524
+ type: "session_metric";
3525
+ key: string;
3526
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3527
+ threshold: number;
3528
+ } | {
3529
+ type: "dismissed";
3530
+ key: string;
3531
+ inverted?: boolean | undefined;
3532
+ } | {
3533
+ type: "cooldown_active";
3534
+ key: string;
3535
+ inverted?: boolean | undefined;
3536
+ } | {
3537
+ type: "frequency_limit";
3538
+ key: string;
3539
+ limit: number;
3540
+ inverted?: boolean | undefined;
3541
+ } | {
3542
+ type: "event_count";
3543
+ key: string;
3544
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3545
+ count: number;
3546
+ withinMs?: number | undefined;
3547
+ })[];
3548
+ value?: unknown;
3549
+ }[];
3550
+ default?: unknown;
3551
+ } | {
3552
+ type: "score";
3553
+ threshold: number;
3554
+ field: string;
3555
+ above?: unknown;
3556
+ below?: unknown;
3557
+ } | {
3558
+ type: "model";
3559
+ modelId: string;
3560
+ inputs: string[];
3561
+ outputMapping: Record<string, unknown>;
3562
+ default?: unknown;
3563
+ } | {
3564
+ type: "external";
3565
+ endpoint: string;
3566
+ timeoutMs?: number | undefined;
3567
+ default?: unknown;
3568
+ method?: "GET" | "POST" | undefined;
3569
+ } | undefined;
3570
+ }>>;
3571
+ notifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
3572
+ on: z.ZodString;
3573
+ title: z.ZodString;
3574
+ body: z.ZodOptional<z.ZodString>;
3575
+ icon: z.ZodOptional<z.ZodString>;
3576
+ ttl: z.ZodOptional<z.ZodNumber>;
3577
+ cooldown: z.ZodOptional<z.ZodNumber>;
3578
+ deepLink: z.ZodOptional<z.ZodObject<{
3579
+ tileId: z.ZodString;
3580
+ itemId: z.ZodOptional<z.ZodString>;
3581
+ }, "strict", z.ZodTypeAny, {
3582
+ tileId: string;
3583
+ itemId?: string | undefined;
3584
+ }, {
3585
+ tileId: string;
3586
+ itemId?: string | undefined;
3587
+ }>>;
3588
+ }, "strict", z.ZodTypeAny, {
3589
+ on: string;
3590
+ title: string;
3591
+ body?: string | undefined;
3592
+ icon?: string | undefined;
3593
+ ttl?: number | undefined;
3594
+ cooldown?: number | undefined;
3595
+ deepLink?: {
3596
+ tileId: string;
3597
+ itemId?: string | undefined;
3598
+ } | undefined;
3599
+ }, {
3600
+ on: string;
3601
+ title: string;
3602
+ body?: string | undefined;
3603
+ icon?: string | undefined;
3604
+ ttl?: number | undefined;
3605
+ cooldown?: number | undefined;
3606
+ deepLink?: {
3607
+ tileId: string;
3608
+ itemId?: string | undefined;
3609
+ } | undefined;
3610
+ }>, "many">>;
3611
+ }, "strict", z.ZodTypeAny, {
3612
+ widget: string;
3613
+ id: string;
3614
+ props?: Record<string, unknown> | undefined;
3615
+ priority?: number | undefined;
3616
+ title?: string | undefined;
3617
+ activation?: {
3618
+ routes: {
3619
+ exclude?: string[] | undefined;
3620
+ include?: string[] | undefined;
3621
+ };
3622
+ strategy?: {
3623
+ type: "rules";
3624
+ rules: {
3625
+ conditions: ({
3626
+ url: string;
3627
+ type: "page_url";
3628
+ } | {
3629
+ type: "route";
3630
+ routeId: string;
3631
+ } | {
3632
+ anchorId: string;
3633
+ state: "visible" | "present" | "absent";
3634
+ type: "anchor_visible";
3635
+ } | {
3636
+ type: "event_occurred";
3637
+ eventName: string;
3638
+ withinMs?: number | undefined;
3639
+ } | {
3640
+ type: "state_equals";
3641
+ key: string;
3642
+ value?: unknown;
3643
+ } | {
3644
+ type: "viewport";
3645
+ minWidth?: number | undefined;
3646
+ maxWidth?: number | undefined;
3647
+ minHeight?: number | undefined;
3648
+ maxHeight?: number | undefined;
3649
+ } | {
3650
+ type: "session_metric";
3651
+ key: string;
3652
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3653
+ threshold: number;
3654
+ } | {
3655
+ type: "dismissed";
3656
+ key: string;
3657
+ inverted?: boolean | undefined;
3658
+ } | {
3659
+ type: "cooldown_active";
3660
+ key: string;
3661
+ inverted?: boolean | undefined;
3662
+ } | {
3663
+ type: "frequency_limit";
3664
+ key: string;
3665
+ limit: number;
3666
+ inverted?: boolean | undefined;
3667
+ } | {
3668
+ type: "event_count";
3669
+ key: string;
3670
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3671
+ count: number;
3672
+ withinMs?: number | undefined;
3673
+ })[];
3674
+ value?: unknown;
3675
+ }[];
3676
+ default?: unknown;
3677
+ } | {
3678
+ type: "score";
3679
+ threshold: number;
3680
+ field: string;
3681
+ above?: unknown;
3682
+ below?: unknown;
3683
+ } | {
3684
+ type: "model";
3685
+ modelId: string;
3686
+ inputs: string[];
3687
+ outputMapping: Record<string, unknown>;
3688
+ default?: unknown;
3689
+ } | {
3690
+ type: "external";
3691
+ endpoint: string;
3692
+ timeoutMs?: number | undefined;
3693
+ default?: unknown;
3694
+ method?: "GET" | "POST" | undefined;
3695
+ } | undefined;
3696
+ } | undefined;
3697
+ notifications?: {
3698
+ on: string;
3699
+ title: string;
3700
+ body?: string | undefined;
3701
+ icon?: string | undefined;
3702
+ ttl?: number | undefined;
3703
+ cooldown?: number | undefined;
3704
+ deepLink?: {
3705
+ tileId: string;
3706
+ itemId?: string | undefined;
3707
+ } | undefined;
3708
+ }[] | undefined;
3709
+ }, {
3710
+ widget: string;
3711
+ id: string;
3712
+ props?: Record<string, unknown> | undefined;
3713
+ priority?: number | undefined;
3714
+ title?: string | undefined;
3715
+ activation?: {
3716
+ routes: {
3717
+ exclude?: string[] | undefined;
3718
+ include?: string[] | undefined;
3719
+ };
3720
+ strategy?: {
3721
+ type: "rules";
3722
+ rules: {
3723
+ conditions: ({
3724
+ url: string;
3725
+ type: "page_url";
3726
+ } | {
3727
+ type: "route";
3728
+ routeId: string;
3729
+ } | {
3730
+ anchorId: string;
3731
+ state: "visible" | "present" | "absent";
3732
+ type: "anchor_visible";
3733
+ } | {
3734
+ type: "event_occurred";
3735
+ eventName: string;
3736
+ withinMs?: number | undefined;
3737
+ } | {
3738
+ type: "state_equals";
3739
+ key: string;
3740
+ value?: unknown;
3741
+ } | {
3742
+ type: "viewport";
3743
+ minWidth?: number | undefined;
3744
+ maxWidth?: number | undefined;
3745
+ minHeight?: number | undefined;
3746
+ maxHeight?: number | undefined;
3747
+ } | {
3748
+ type: "session_metric";
3749
+ key: string;
3750
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3751
+ threshold: number;
3752
+ } | {
3753
+ type: "dismissed";
3754
+ key: string;
3755
+ inverted?: boolean | undefined;
3756
+ } | {
3757
+ type: "cooldown_active";
3758
+ key: string;
3759
+ inverted?: boolean | undefined;
3760
+ } | {
3761
+ type: "frequency_limit";
3762
+ key: string;
3763
+ limit: number;
3764
+ inverted?: boolean | undefined;
3765
+ } | {
3766
+ type: "event_count";
3767
+ key: string;
3768
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3769
+ count: number;
3770
+ withinMs?: number | undefined;
3771
+ })[];
3772
+ value?: unknown;
3773
+ }[];
3774
+ default?: unknown;
3775
+ } | {
3776
+ type: "score";
3777
+ threshold: number;
3778
+ field: string;
3779
+ above?: unknown;
3780
+ below?: unknown;
3781
+ } | {
3782
+ type: "model";
3783
+ modelId: string;
3784
+ inputs: string[];
3785
+ outputMapping: Record<string, unknown>;
3786
+ default?: unknown;
3787
+ } | {
3788
+ type: "external";
3789
+ endpoint: string;
3790
+ timeoutMs?: number | undefined;
3791
+ default?: unknown;
3792
+ method?: "GET" | "POST" | undefined;
3793
+ } | undefined;
3794
+ } | undefined;
3795
+ notifications?: {
3796
+ on: string;
3797
+ title: string;
3798
+ body?: string | undefined;
3799
+ icon?: string | undefined;
3800
+ ttl?: number | undefined;
3801
+ cooldown?: number | undefined;
3802
+ deepLink?: {
3803
+ tileId: string;
3804
+ itemId?: string | undefined;
3805
+ } | undefined;
3806
+ }[] | undefined;
3807
+ }>, "many">;
3808
+ actions: z.ZodArray<z.ZodAny, "many">;
3809
+ theme: z.ZodOptional<z.ZodObject<{
3810
+ name: z.ZodOptional<z.ZodString>;
3811
+ mode: z.ZodOptional<z.ZodEnum<["dark", "light"]>>;
3812
+ position: z.ZodOptional<z.ZodEnum<["left", "right"]>>;
3813
+ colorPrimary: z.ZodOptional<z.ZodString>;
3814
+ colorBackground: z.ZodOptional<z.ZodString>;
3815
+ colorText: z.ZodOptional<z.ZodString>;
3816
+ colorTextSecondary: z.ZodOptional<z.ZodString>;
3817
+ borderRadius: z.ZodOptional<z.ZodString>;
3818
+ }, "strict", z.ZodTypeAny, {
3819
+ position?: "right" | "left" | undefined;
3820
+ name?: string | undefined;
3821
+ mode?: "dark" | "light" | undefined;
3822
+ colorPrimary?: string | undefined;
3823
+ colorBackground?: string | undefined;
3824
+ colorText?: string | undefined;
3825
+ colorTextSecondary?: string | undefined;
3826
+ borderRadius?: string | undefined;
3827
+ }, {
3828
+ position?: "right" | "left" | undefined;
3829
+ name?: string | undefined;
3830
+ mode?: "dark" | "light" | undefined;
3831
+ colorPrimary?: string | undefined;
3832
+ colorBackground?: string | undefined;
3833
+ colorText?: string | undefined;
3834
+ colorTextSecondary?: string | undefined;
3835
+ borderRadius?: string | undefined;
3836
+ }>>;
3837
+ launcher: z.ZodOptional<z.ZodObject<{
3838
+ enabled: z.ZodOptional<z.ZodBoolean>;
3839
+ label: z.ZodOptional<z.ZodString>;
3840
+ position: z.ZodOptional<z.ZodString>;
3841
+ animate: z.ZodOptional<z.ZodBoolean>;
3842
+ animationStyle: z.ZodOptional<z.ZodEnum<["pulse", "bounce", "glow"]>>;
3843
+ notificationCount: z.ZodOptional<z.ZodNumber>;
3844
+ }, "strict", z.ZodTypeAny, {
3845
+ position?: string | undefined;
3846
+ label?: string | undefined;
3847
+ enabled?: boolean | undefined;
3848
+ animate?: boolean | undefined;
3849
+ animationStyle?: "pulse" | "bounce" | "glow" | undefined;
3850
+ notificationCount?: number | undefined;
3851
+ }, {
3852
+ position?: string | undefined;
3853
+ label?: string | undefined;
3854
+ enabled?: boolean | undefined;
3855
+ animate?: boolean | undefined;
3856
+ animationStyle?: "pulse" | "bounce" | "glow" | undefined;
3857
+ notificationCount?: number | undefined;
3858
+ }>>;
3859
+ }, "strict", z.ZodTypeAny, {
3860
+ actions: any[];
3861
+ fetchedAt: string;
3862
+ tiles: {
3863
+ widget: string;
3864
+ id: string;
3865
+ props?: Record<string, unknown> | undefined;
3866
+ priority?: number | undefined;
3867
+ title?: string | undefined;
3868
+ activation?: {
3869
+ routes: {
3870
+ exclude?: string[] | undefined;
3871
+ include?: string[] | undefined;
3872
+ };
3873
+ strategy?: {
3874
+ type: "rules";
3875
+ rules: {
3876
+ conditions: ({
3877
+ url: string;
3878
+ type: "page_url";
3879
+ } | {
3880
+ type: "route";
3881
+ routeId: string;
3882
+ } | {
3883
+ anchorId: string;
3884
+ state: "visible" | "present" | "absent";
3885
+ type: "anchor_visible";
3886
+ } | {
3887
+ type: "event_occurred";
3888
+ eventName: string;
3889
+ withinMs?: number | undefined;
3890
+ } | {
3891
+ type: "state_equals";
3892
+ key: string;
3893
+ value?: unknown;
3894
+ } | {
3895
+ type: "viewport";
3896
+ minWidth?: number | undefined;
3897
+ maxWidth?: number | undefined;
3898
+ minHeight?: number | undefined;
3899
+ maxHeight?: number | undefined;
3900
+ } | {
3901
+ type: "session_metric";
3902
+ key: string;
3903
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3904
+ threshold: number;
3905
+ } | {
3906
+ type: "dismissed";
3907
+ key: string;
3908
+ inverted?: boolean | undefined;
3909
+ } | {
3910
+ type: "cooldown_active";
3911
+ key: string;
3912
+ inverted?: boolean | undefined;
3913
+ } | {
3914
+ type: "frequency_limit";
3915
+ key: string;
3916
+ limit: number;
3917
+ inverted?: boolean | undefined;
3918
+ } | {
3919
+ type: "event_count";
3920
+ key: string;
3921
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3922
+ count: number;
3923
+ withinMs?: number | undefined;
3924
+ })[];
3925
+ value?: unknown;
3926
+ }[];
3927
+ default?: unknown;
3928
+ } | {
3929
+ type: "score";
3930
+ threshold: number;
3931
+ field: string;
3932
+ above?: unknown;
3933
+ below?: unknown;
3934
+ } | {
3935
+ type: "model";
3936
+ modelId: string;
3937
+ inputs: string[];
3938
+ outputMapping: Record<string, unknown>;
3939
+ default?: unknown;
3940
+ } | {
3941
+ type: "external";
3942
+ endpoint: string;
3943
+ timeoutMs?: number | undefined;
3944
+ default?: unknown;
3945
+ method?: "GET" | "POST" | undefined;
3946
+ } | undefined;
3947
+ } | undefined;
3948
+ notifications?: {
3949
+ on: string;
3950
+ title: string;
3951
+ body?: string | undefined;
3952
+ icon?: string | undefined;
3953
+ ttl?: number | undefined;
3954
+ cooldown?: number | undefined;
3955
+ deepLink?: {
3956
+ tileId: string;
3957
+ itemId?: string | undefined;
3958
+ } | undefined;
3959
+ }[] | undefined;
3960
+ }[];
3961
+ schemaVersion?: string | undefined;
3962
+ configVersion?: string | undefined;
3963
+ canvasTitle?: string | undefined;
3964
+ theme?: {
3965
+ position?: "right" | "left" | undefined;
3966
+ name?: string | undefined;
3967
+ mode?: "dark" | "light" | undefined;
3968
+ colorPrimary?: string | undefined;
3969
+ colorBackground?: string | undefined;
3970
+ colorText?: string | undefined;
3971
+ colorTextSecondary?: string | undefined;
3972
+ borderRadius?: string | undefined;
3973
+ } | undefined;
3974
+ launcher?: {
3975
+ position?: string | undefined;
3976
+ label?: string | undefined;
3977
+ enabled?: boolean | undefined;
3978
+ animate?: boolean | undefined;
3979
+ animationStyle?: "pulse" | "bounce" | "glow" | undefined;
3980
+ notificationCount?: number | undefined;
3981
+ } | undefined;
3982
+ }, {
3983
+ actions: any[];
3984
+ fetchedAt: string;
3985
+ tiles: {
3986
+ widget: string;
3987
+ id: string;
3988
+ props?: Record<string, unknown> | undefined;
3989
+ priority?: number | undefined;
3990
+ title?: string | undefined;
3991
+ activation?: {
3992
+ routes: {
3993
+ exclude?: string[] | undefined;
3994
+ include?: string[] | undefined;
3995
+ };
3996
+ strategy?: {
3997
+ type: "rules";
3998
+ rules: {
3999
+ conditions: ({
4000
+ url: string;
4001
+ type: "page_url";
4002
+ } | {
4003
+ type: "route";
4004
+ routeId: string;
4005
+ } | {
4006
+ anchorId: string;
4007
+ state: "visible" | "present" | "absent";
4008
+ type: "anchor_visible";
4009
+ } | {
4010
+ type: "event_occurred";
4011
+ eventName: string;
4012
+ withinMs?: number | undefined;
4013
+ } | {
4014
+ type: "state_equals";
4015
+ key: string;
4016
+ value?: unknown;
4017
+ } | {
4018
+ type: "viewport";
4019
+ minWidth?: number | undefined;
4020
+ maxWidth?: number | undefined;
4021
+ minHeight?: number | undefined;
4022
+ maxHeight?: number | undefined;
4023
+ } | {
4024
+ type: "session_metric";
4025
+ key: string;
4026
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4027
+ threshold: number;
4028
+ } | {
4029
+ type: "dismissed";
4030
+ key: string;
4031
+ inverted?: boolean | undefined;
4032
+ } | {
4033
+ type: "cooldown_active";
4034
+ key: string;
4035
+ inverted?: boolean | undefined;
4036
+ } | {
4037
+ type: "frequency_limit";
4038
+ key: string;
4039
+ limit: number;
4040
+ inverted?: boolean | undefined;
4041
+ } | {
4042
+ type: "event_count";
4043
+ key: string;
4044
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
4045
+ count: number;
4046
+ withinMs?: number | undefined;
4047
+ })[];
4048
+ value?: unknown;
4049
+ }[];
4050
+ default?: unknown;
4051
+ } | {
4052
+ type: "score";
4053
+ threshold: number;
4054
+ field: string;
4055
+ above?: unknown;
4056
+ below?: unknown;
4057
+ } | {
4058
+ type: "model";
4059
+ modelId: string;
4060
+ inputs: string[];
4061
+ outputMapping: Record<string, unknown>;
4062
+ default?: unknown;
4063
+ } | {
4064
+ type: "external";
4065
+ endpoint: string;
4066
+ timeoutMs?: number | undefined;
4067
+ default?: unknown;
4068
+ method?: "GET" | "POST" | undefined;
4069
+ } | undefined;
4070
+ } | undefined;
4071
+ notifications?: {
4072
+ on: string;
4073
+ title: string;
4074
+ body?: string | undefined;
4075
+ icon?: string | undefined;
4076
+ ttl?: number | undefined;
4077
+ cooldown?: number | undefined;
4078
+ deepLink?: {
4079
+ tileId: string;
4080
+ itemId?: string | undefined;
4081
+ } | undefined;
4082
+ }[] | undefined;
4083
+ }[];
4084
+ schemaVersion?: string | undefined;
4085
+ configVersion?: string | undefined;
4086
+ canvasTitle?: string | undefined;
4087
+ theme?: {
4088
+ position?: "right" | "left" | undefined;
4089
+ name?: string | undefined;
4090
+ mode?: "dark" | "light" | undefined;
4091
+ colorPrimary?: string | undefined;
4092
+ colorBackground?: string | undefined;
4093
+ colorText?: string | undefined;
4094
+ colorTextSecondary?: string | undefined;
4095
+ borderRadius?: string | undefined;
4096
+ } | undefined;
4097
+ launcher?: {
4098
+ position?: string | undefined;
4099
+ label?: string | undefined;
4100
+ enabled?: boolean | undefined;
4101
+ animate?: boolean | undefined;
4102
+ animationStyle?: "pulse" | "bounce" | "glow" | undefined;
4103
+ notificationCount?: number | undefined;
4104
+ } | undefined;
4105
+ }>;
4106
+ })[];
4107
+ export { NotificationDeepLinkZ, TileNotificationRuleZ };