@syntrologie/adapt-faq 2.1.0 → 2.2.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.
package/dist/schema.d.ts CHANGED
@@ -37,40 +37,40 @@ export declare const FAQQuestionSchema: z.ZodObject<{
37
37
  height: z.ZodOptional<z.ZodNumber>;
38
38
  }, "strip", z.ZodTypeAny, {
39
39
  type: "image" | "video";
40
- src: string;
41
40
  id: string;
42
- alt?: string | undefined;
41
+ src: string;
43
42
  height?: number | undefined;
44
43
  width?: number | undefined;
44
+ alt?: string | undefined;
45
45
  }, {
46
46
  type: "image" | "video";
47
- src: string;
48
47
  id: string;
49
- alt?: string | undefined;
48
+ src: string;
50
49
  height?: number | undefined;
51
50
  width?: number | undefined;
51
+ alt?: string | undefined;
52
52
  }>, "many">>;
53
53
  }, "strip", z.ZodTypeAny, {
54
54
  type: "markdown";
55
55
  content: string;
56
56
  assets?: {
57
57
  type: "image" | "video";
58
- src: string;
59
58
  id: string;
60
- alt?: string | undefined;
59
+ src: string;
61
60
  height?: number | undefined;
62
61
  width?: number | undefined;
62
+ alt?: string | undefined;
63
63
  }[] | undefined;
64
64
  }, {
65
65
  type: "markdown";
66
66
  content: string;
67
67
  assets?: {
68
68
  type: "image" | "video";
69
- src: string;
70
69
  id: string;
71
- alt?: string | undefined;
70
+ src: string;
72
71
  height?: number | undefined;
73
72
  width?: number | undefined;
73
+ alt?: string | undefined;
74
74
  }[] | undefined;
75
75
  }>]>;
76
76
  /** Optional category for grouping */
@@ -104,11 +104,11 @@ export declare const FAQQuestionSchema: z.ZodObject<{
104
104
  content: string;
105
105
  assets?: {
106
106
  type: "image" | "video";
107
- src: string;
108
107
  id: string;
109
- alt?: string | undefined;
108
+ src: string;
110
109
  height?: number | undefined;
111
110
  width?: number | undefined;
111
+ alt?: string | undefined;
112
112
  }[] | undefined;
113
113
  };
114
114
  id: string;
@@ -130,11 +130,11 @@ export declare const FAQQuestionSchema: z.ZodObject<{
130
130
  content: string;
131
131
  assets?: {
132
132
  type: "image" | "video";
133
- src: string;
134
133
  id: string;
135
- alt?: string | undefined;
134
+ src: string;
136
135
  height?: number | undefined;
137
136
  width?: number | undefined;
137
+ alt?: string | undefined;
138
138
  }[] | undefined;
139
139
  };
140
140
  id: string;
@@ -255,11 +255,11 @@ export declare const FAQQuestionSchema: z.ZodObject<{
255
255
  content: string;
256
256
  assets?: {
257
257
  type: "image" | "video";
258
- src: string;
259
258
  id: string;
260
- alt?: string | undefined;
259
+ src: string;
261
260
  height?: number | undefined;
262
261
  width?: number | undefined;
262
+ alt?: string | undefined;
263
263
  }[] | undefined;
264
264
  };
265
265
  id: string;
@@ -312,11 +312,11 @@ export declare const FAQQuestionSchema: z.ZodObject<{
312
312
  content: string;
313
313
  assets?: {
314
314
  type: "image" | "video";
315
- src: string;
316
315
  id: string;
317
- alt?: string | undefined;
316
+ src: string;
318
317
  height?: number | undefined;
319
318
  width?: number | undefined;
319
+ alt?: string | undefined;
320
320
  }[] | undefined;
321
321
  };
322
322
  id: string;
@@ -364,6 +364,8 @@ export type FAQQuestionSchemaType = z.infer<typeof FAQQuestionSchema>;
364
364
  * Full configuration schema for adaptive-faq.
365
365
  */
366
366
  export declare const configSchema: z.ZodObject<{
367
+ /** Display title for the FAQ widget */
368
+ title: z.ZodOptional<z.ZodString>;
367
369
  /** Whether only one or multiple questions can be expanded at once */
368
370
  expandBehavior: z.ZodDefault<z.ZodEnum<["single", "multiple"]>>;
369
371
  /** Whether to show a search/filter input */
@@ -400,40 +402,40 @@ export declare const configSchema: z.ZodObject<{
400
402
  height: z.ZodOptional<z.ZodNumber>;
401
403
  }, "strip", z.ZodTypeAny, {
402
404
  type: "image" | "video";
403
- src: string;
404
405
  id: string;
405
- alt?: string | undefined;
406
+ src: string;
406
407
  height?: number | undefined;
407
408
  width?: number | undefined;
409
+ alt?: string | undefined;
408
410
  }, {
409
411
  type: "image" | "video";
410
- src: string;
411
412
  id: string;
412
- alt?: string | undefined;
413
+ src: string;
413
414
  height?: number | undefined;
414
415
  width?: number | undefined;
416
+ alt?: string | undefined;
415
417
  }>, "many">>;
416
418
  }, "strip", z.ZodTypeAny, {
417
419
  type: "markdown";
418
420
  content: string;
419
421
  assets?: {
420
422
  type: "image" | "video";
421
- src: string;
422
423
  id: string;
423
- alt?: string | undefined;
424
+ src: string;
424
425
  height?: number | undefined;
425
426
  width?: number | undefined;
427
+ alt?: string | undefined;
426
428
  }[] | undefined;
427
429
  }, {
428
430
  type: "markdown";
429
431
  content: string;
430
432
  assets?: {
431
433
  type: "image" | "video";
432
- src: string;
433
434
  id: string;
434
- alt?: string | undefined;
435
+ src: string;
435
436
  height?: number | undefined;
436
437
  width?: number | undefined;
438
+ alt?: string | undefined;
437
439
  }[] | undefined;
438
440
  }>]>;
439
441
  /** Optional category for grouping */
@@ -467,11 +469,11 @@ export declare const configSchema: z.ZodObject<{
467
469
  content: string;
468
470
  assets?: {
469
471
  type: "image" | "video";
470
- src: string;
471
472
  id: string;
472
- alt?: string | undefined;
473
+ src: string;
473
474
  height?: number | undefined;
474
475
  width?: number | undefined;
476
+ alt?: string | undefined;
475
477
  }[] | undefined;
476
478
  };
477
479
  id: string;
@@ -493,11 +495,11 @@ export declare const configSchema: z.ZodObject<{
493
495
  content: string;
494
496
  assets?: {
495
497
  type: "image" | "video";
496
- src: string;
497
498
  id: string;
498
- alt?: string | undefined;
499
+ src: string;
499
500
  height?: number | undefined;
500
501
  width?: number | undefined;
502
+ alt?: string | undefined;
501
503
  }[] | undefined;
502
504
  };
503
505
  id: string;
@@ -618,11 +620,11 @@ export declare const configSchema: z.ZodObject<{
618
620
  content: string;
619
621
  assets?: {
620
622
  type: "image" | "video";
621
- src: string;
622
623
  id: string;
623
- alt?: string | undefined;
624
+ src: string;
624
625
  height?: number | undefined;
625
626
  width?: number | undefined;
627
+ alt?: string | undefined;
626
628
  }[] | undefined;
627
629
  };
628
630
  id: string;
@@ -675,11 +677,11 @@ export declare const configSchema: z.ZodObject<{
675
677
  content: string;
676
678
  assets?: {
677
679
  type: "image" | "video";
678
- src: string;
679
680
  id: string;
680
- alt?: string | undefined;
681
+ src: string;
681
682
  height?: number | undefined;
682
683
  width?: number | undefined;
684
+ alt?: string | undefined;
683
685
  }[] | undefined;
684
686
  };
685
687
  id: string;
@@ -871,40 +873,40 @@ export declare const configSchema: z.ZodObject<{
871
873
  height: z.ZodOptional<z.ZodNumber>;
872
874
  }, "strip", z.ZodTypeAny, {
873
875
  type: "image" | "video";
874
- src: string;
875
876
  id: string;
876
- alt?: string | undefined;
877
+ src: string;
877
878
  height?: number | undefined;
878
879
  width?: number | undefined;
880
+ alt?: string | undefined;
879
881
  }, {
880
882
  type: "image" | "video";
881
- src: string;
882
883
  id: string;
883
- alt?: string | undefined;
884
+ src: string;
884
885
  height?: number | undefined;
885
886
  width?: number | undefined;
887
+ alt?: string | undefined;
886
888
  }>, "many">>;
887
889
  }, "strip", z.ZodTypeAny, {
888
890
  type: "markdown";
889
891
  content: string;
890
892
  assets?: {
891
893
  type: "image" | "video";
892
- src: string;
893
894
  id: string;
894
- alt?: string | undefined;
895
+ src: string;
895
896
  height?: number | undefined;
896
897
  width?: number | undefined;
898
+ alt?: string | undefined;
897
899
  }[] | undefined;
898
900
  }, {
899
901
  type: "markdown";
900
902
  content: string;
901
903
  assets?: {
902
904
  type: "image" | "video";
903
- src: string;
904
905
  id: string;
905
- alt?: string | undefined;
906
+ src: string;
906
907
  height?: number | undefined;
907
908
  width?: number | undefined;
909
+ alt?: string | undefined;
908
910
  }[] | undefined;
909
911
  }>]>;
910
912
  /** Optional category for grouping */
@@ -938,11 +940,11 @@ export declare const configSchema: z.ZodObject<{
938
940
  content: string;
939
941
  assets?: {
940
942
  type: "image" | "video";
941
- src: string;
942
943
  id: string;
943
- alt?: string | undefined;
944
+ src: string;
944
945
  height?: number | undefined;
945
946
  width?: number | undefined;
947
+ alt?: string | undefined;
946
948
  }[] | undefined;
947
949
  };
948
950
  id: string;
@@ -964,11 +966,11 @@ export declare const configSchema: z.ZodObject<{
964
966
  content: string;
965
967
  assets?: {
966
968
  type: "image" | "video";
967
- src: string;
968
969
  id: string;
969
- alt?: string | undefined;
970
+ src: string;
970
971
  height?: number | undefined;
971
972
  width?: number | undefined;
973
+ alt?: string | undefined;
972
974
  }[] | undefined;
973
975
  };
974
976
  id: string;
@@ -1089,11 +1091,11 @@ export declare const configSchema: z.ZodObject<{
1089
1091
  content: string;
1090
1092
  assets?: {
1091
1093
  type: "image" | "video";
1092
- src: string;
1093
1094
  id: string;
1094
- alt?: string | undefined;
1095
+ src: string;
1095
1096
  height?: number | undefined;
1096
1097
  width?: number | undefined;
1098
+ alt?: string | undefined;
1097
1099
  }[] | undefined;
1098
1100
  };
1099
1101
  id: string;
@@ -1146,11 +1148,11 @@ export declare const configSchema: z.ZodObject<{
1146
1148
  content: string;
1147
1149
  assets?: {
1148
1150
  type: "image" | "video";
1149
- src: string;
1150
1151
  id: string;
1151
- alt?: string | undefined;
1152
+ src: string;
1152
1153
  height?: number | undefined;
1153
1154
  width?: number | undefined;
1155
+ alt?: string | undefined;
1154
1156
  }[] | undefined;
1155
1157
  };
1156
1158
  id: string;
@@ -1207,11 +1209,11 @@ export declare const configSchema: z.ZodObject<{
1207
1209
  content: string;
1208
1210
  assets?: {
1209
1211
  type: "image" | "video";
1210
- src: string;
1211
1212
  id: string;
1212
- alt?: string | undefined;
1213
+ src: string;
1213
1214
  height?: number | undefined;
1214
1215
  width?: number | undefined;
1216
+ alt?: string | undefined;
1215
1217
  }[] | undefined;
1216
1218
  };
1217
1219
  id: string;
@@ -1296,11 +1298,11 @@ export declare const configSchema: z.ZodObject<{
1296
1298
  content: string;
1297
1299
  assets?: {
1298
1300
  type: "image" | "video";
1299
- src: string;
1300
1301
  id: string;
1301
- alt?: string | undefined;
1302
+ src: string;
1302
1303
  height?: number | undefined;
1303
1304
  width?: number | undefined;
1305
+ alt?: string | undefined;
1304
1306
  }[] | undefined;
1305
1307
  };
1306
1308
  id: string;
@@ -1374,6 +1376,20 @@ export declare const configSchema: z.ZodObject<{
1374
1376
  position?: "prepend" | "append" | undefined;
1375
1377
  once?: boolean | undefined;
1376
1378
  }>, "many">>;
1379
+ /** Event scope for the FAQ widget */
1380
+ scope: z.ZodOptional<z.ZodObject<{
1381
+ events: z.ZodArray<z.ZodString, "many">;
1382
+ urlContains: z.ZodOptional<z.ZodString>;
1383
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
1384
+ }, "strip", z.ZodTypeAny, {
1385
+ events: string[];
1386
+ urlContains?: string | undefined;
1387
+ props?: Record<string, string | number | boolean> | undefined;
1388
+ }, {
1389
+ events: string[];
1390
+ urlContains?: string | undefined;
1391
+ props?: Record<string, string | number | boolean> | undefined;
1392
+ }>>;
1377
1393
  }, "strip", z.ZodTypeAny, {
1378
1394
  theme: "light" | "dark" | "auto";
1379
1395
  searchable: boolean;
@@ -1389,11 +1405,11 @@ export declare const configSchema: z.ZodObject<{
1389
1405
  content: string;
1390
1406
  assets?: {
1391
1407
  type: "image" | "video";
1392
- src: string;
1393
1408
  id: string;
1394
- alt?: string | undefined;
1409
+ src: string;
1395
1410
  height?: number | undefined;
1396
1411
  width?: number | undefined;
1412
+ alt?: string | undefined;
1397
1413
  }[] | undefined;
1398
1414
  };
1399
1415
  id: string;
@@ -1456,11 +1472,11 @@ export declare const configSchema: z.ZodObject<{
1456
1472
  content: string;
1457
1473
  assets?: {
1458
1474
  type: "image" | "video";
1459
- src: string;
1460
1475
  id: string;
1461
- alt?: string | undefined;
1476
+ src: string;
1462
1477
  height?: number | undefined;
1463
1478
  width?: number | undefined;
1479
+ alt?: string | undefined;
1464
1480
  }[] | undefined;
1465
1481
  };
1466
1482
  id: string;
@@ -1534,6 +1550,12 @@ export declare const configSchema: z.ZodObject<{
1534
1550
  position?: "prepend" | "append" | undefined;
1535
1551
  once?: boolean | undefined;
1536
1552
  }[] | undefined;
1553
+ scope?: {
1554
+ events: string[];
1555
+ urlContains?: string | undefined;
1556
+ props?: Record<string, string | number | boolean> | undefined;
1557
+ } | undefined;
1558
+ title?: string | undefined;
1537
1559
  }, {
1538
1560
  theme?: "light" | "dark" | "auto" | undefined;
1539
1561
  searchable?: boolean | undefined;
@@ -1549,11 +1571,11 @@ export declare const configSchema: z.ZodObject<{
1549
1571
  content: string;
1550
1572
  assets?: {
1551
1573
  type: "image" | "video";
1552
- src: string;
1553
1574
  id: string;
1554
- alt?: string | undefined;
1575
+ src: string;
1555
1576
  height?: number | undefined;
1556
1577
  width?: number | undefined;
1578
+ alt?: string | undefined;
1557
1579
  }[] | undefined;
1558
1580
  };
1559
1581
  id: string;
@@ -1616,11 +1638,11 @@ export declare const configSchema: z.ZodObject<{
1616
1638
  content: string;
1617
1639
  assets?: {
1618
1640
  type: "image" | "video";
1619
- src: string;
1620
1641
  id: string;
1621
- alt?: string | undefined;
1642
+ src: string;
1622
1643
  height?: number | undefined;
1623
1644
  width?: number | undefined;
1645
+ alt?: string | undefined;
1624
1646
  }[] | undefined;
1625
1647
  };
1626
1648
  id: string;
@@ -1694,6 +1716,12 @@ export declare const configSchema: z.ZodObject<{
1694
1716
  position?: "prepend" | "append" | undefined;
1695
1717
  once?: boolean | undefined;
1696
1718
  }[] | undefined;
1719
+ scope?: {
1720
+ events: string[];
1721
+ urlContains?: string | undefined;
1722
+ props?: Record<string, string | number | boolean> | undefined;
1723
+ } | undefined;
1724
+ title?: string | undefined;
1697
1725
  }>;
1698
1726
  export type FAQConfig = z.infer<typeof configSchema>;
1699
1727
  /**
@@ -1796,40 +1824,40 @@ export declare const UpdateFaqSchema: z.ZodObject<{
1796
1824
  height: z.ZodOptional<z.ZodNumber>;
1797
1825
  }, "strip", z.ZodTypeAny, {
1798
1826
  type: "image" | "video";
1799
- src: string;
1800
1827
  id: string;
1801
- alt?: string | undefined;
1828
+ src: string;
1802
1829
  height?: number | undefined;
1803
1830
  width?: number | undefined;
1831
+ alt?: string | undefined;
1804
1832
  }, {
1805
1833
  type: "image" | "video";
1806
- src: string;
1807
1834
  id: string;
1808
- alt?: string | undefined;
1835
+ src: string;
1809
1836
  height?: number | undefined;
1810
1837
  width?: number | undefined;
1838
+ alt?: string | undefined;
1811
1839
  }>, "many">>;
1812
1840
  }, "strip", z.ZodTypeAny, {
1813
1841
  type: "markdown";
1814
1842
  content: string;
1815
1843
  assets?: {
1816
1844
  type: "image" | "video";
1817
- src: string;
1818
1845
  id: string;
1819
- alt?: string | undefined;
1846
+ src: string;
1820
1847
  height?: number | undefined;
1821
1848
  width?: number | undefined;
1849
+ alt?: string | undefined;
1822
1850
  }[] | undefined;
1823
1851
  }, {
1824
1852
  type: "markdown";
1825
1853
  content: string;
1826
1854
  assets?: {
1827
1855
  type: "image" | "video";
1828
- src: string;
1829
1856
  id: string;
1830
- alt?: string | undefined;
1857
+ src: string;
1831
1858
  height?: number | undefined;
1832
1859
  width?: number | undefined;
1860
+ alt?: string | undefined;
1833
1861
  }[] | undefined;
1834
1862
  }>]>;
1835
1863
  /** Optional category for grouping */
@@ -1863,11 +1891,11 @@ export declare const UpdateFaqSchema: z.ZodObject<{
1863
1891
  content: string;
1864
1892
  assets?: {
1865
1893
  type: "image" | "video";
1866
- src: string;
1867
1894
  id: string;
1868
- alt?: string | undefined;
1895
+ src: string;
1869
1896
  height?: number | undefined;
1870
1897
  width?: number | undefined;
1898
+ alt?: string | undefined;
1871
1899
  }[] | undefined;
1872
1900
  };
1873
1901
  id: string;
@@ -1889,11 +1917,11 @@ export declare const UpdateFaqSchema: z.ZodObject<{
1889
1917
  content: string;
1890
1918
  assets?: {
1891
1919
  type: "image" | "video";
1892
- src: string;
1893
1920
  id: string;
1894
- alt?: string | undefined;
1921
+ src: string;
1895
1922
  height?: number | undefined;
1896
1923
  width?: number | undefined;
1924
+ alt?: string | undefined;
1897
1925
  }[] | undefined;
1898
1926
  };
1899
1927
  id: string;
@@ -2014,11 +2042,11 @@ export declare const UpdateFaqSchema: z.ZodObject<{
2014
2042
  content: string;
2015
2043
  assets?: {
2016
2044
  type: "image" | "video";
2017
- src: string;
2018
2045
  id: string;
2019
- alt?: string | undefined;
2046
+ src: string;
2020
2047
  height?: number | undefined;
2021
2048
  width?: number | undefined;
2049
+ alt?: string | undefined;
2022
2050
  }[] | undefined;
2023
2051
  };
2024
2052
  id: string;
@@ -2071,11 +2099,11 @@ export declare const UpdateFaqSchema: z.ZodObject<{
2071
2099
  content: string;
2072
2100
  assets?: {
2073
2101
  type: "image" | "video";
2074
- src: string;
2075
2102
  id: string;
2076
- alt?: string | undefined;
2103
+ src: string;
2077
2104
  height?: number | undefined;
2078
2105
  width?: number | undefined;
2106
+ alt?: string | undefined;
2079
2107
  }[] | undefined;
2080
2108
  };
2081
2109
  id: string;
@@ -2137,11 +2165,11 @@ export declare const UpdateFaqSchema: z.ZodObject<{
2137
2165
  content: string;
2138
2166
  assets?: {
2139
2167
  type: "image" | "video";
2140
- src: string;
2141
2168
  id: string;
2142
- alt?: string | undefined;
2169
+ src: string;
2143
2170
  height?: number | undefined;
2144
2171
  width?: number | undefined;
2172
+ alt?: string | undefined;
2145
2173
  }[] | undefined;
2146
2174
  };
2147
2175
  id: string;
@@ -2184,8 +2212,8 @@ export declare const UpdateFaqSchema: z.ZodObject<{
2184
2212
  timeoutMs?: number | undefined;
2185
2213
  } | null | undefined;
2186
2214
  }[] | undefined;
2187
- anchorId?: string | undefined;
2188
2215
  position?: "prepend" | "append" | "before" | "after" | undefined;
2216
+ anchorId?: string | undefined;
2189
2217
  order?: string[] | undefined;
2190
2218
  }, {
2191
2219
  operation: "add" | "remove" | "reorder" | "replace";
@@ -2202,11 +2230,11 @@ export declare const UpdateFaqSchema: z.ZodObject<{
2202
2230
  content: string;
2203
2231
  assets?: {
2204
2232
  type: "image" | "video";
2205
- src: string;
2206
2233
  id: string;
2207
- alt?: string | undefined;
2234
+ src: string;
2208
2235
  height?: number | undefined;
2209
2236
  width?: number | undefined;
2237
+ alt?: string | undefined;
2210
2238
  }[] | undefined;
2211
2239
  };
2212
2240
  id: string;
@@ -2249,8 +2277,8 @@ export declare const UpdateFaqSchema: z.ZodObject<{
2249
2277
  timeoutMs?: number | undefined;
2250
2278
  } | null | undefined;
2251
2279
  }[] | undefined;
2252
- anchorId?: string | undefined;
2253
2280
  position?: "prepend" | "append" | "before" | "after" | undefined;
2281
+ anchorId?: string | undefined;
2254
2282
  order?: string[] | undefined;
2255
2283
  }>;
2256
2284
  /**
@@ -2267,11 +2295,11 @@ export declare function validateFAQQuestion(data: unknown): z.SafeParseReturnTyp
2267
2295
  content: string;
2268
2296
  assets?: {
2269
2297
  type: "image" | "video";
2270
- src: string;
2271
2298
  id: string;
2272
- alt?: string | undefined;
2299
+ src: string;
2273
2300
  height?: number | undefined;
2274
2301
  width?: number | undefined;
2302
+ alt?: string | undefined;
2275
2303
  }[] | undefined;
2276
2304
  };
2277
2305
  id: string;
@@ -2324,11 +2352,11 @@ export declare function validateFAQQuestion(data: unknown): z.SafeParseReturnTyp
2324
2352
  content: string;
2325
2353
  assets?: {
2326
2354
  type: "image" | "video";
2327
- src: string;
2328
2355
  id: string;
2329
- alt?: string | undefined;
2356
+ src: string;
2330
2357
  height?: number | undefined;
2331
2358
  width?: number | undefined;
2359
+ alt?: string | undefined;
2332
2360
  }[] | undefined;
2333
2361
  };
2334
2362
  id: string;
@@ -2389,11 +2417,11 @@ export declare function validateFAQConfig(data: unknown): z.SafeParseReturnType<
2389
2417
  content: string;
2390
2418
  assets?: {
2391
2419
  type: "image" | "video";
2392
- src: string;
2393
2420
  id: string;
2394
- alt?: string | undefined;
2421
+ src: string;
2395
2422
  height?: number | undefined;
2396
2423
  width?: number | undefined;
2424
+ alt?: string | undefined;
2397
2425
  }[] | undefined;
2398
2426
  };
2399
2427
  id: string;
@@ -2456,11 +2484,11 @@ export declare function validateFAQConfig(data: unknown): z.SafeParseReturnType<
2456
2484
  content: string;
2457
2485
  assets?: {
2458
2486
  type: "image" | "video";
2459
- src: string;
2460
2487
  id: string;
2461
- alt?: string | undefined;
2488
+ src: string;
2462
2489
  height?: number | undefined;
2463
2490
  width?: number | undefined;
2491
+ alt?: string | undefined;
2464
2492
  }[] | undefined;
2465
2493
  };
2466
2494
  id: string;
@@ -2534,6 +2562,12 @@ export declare function validateFAQConfig(data: unknown): z.SafeParseReturnType<
2534
2562
  position?: "prepend" | "append" | undefined;
2535
2563
  once?: boolean | undefined;
2536
2564
  }[] | undefined;
2565
+ scope?: {
2566
+ events: string[];
2567
+ urlContains?: string | undefined;
2568
+ props?: Record<string, string | number | boolean> | undefined;
2569
+ } | undefined;
2570
+ title?: string | undefined;
2537
2571
  }, {
2538
2572
  theme: "light" | "dark" | "auto";
2539
2573
  searchable: boolean;
@@ -2549,11 +2583,11 @@ export declare function validateFAQConfig(data: unknown): z.SafeParseReturnType<
2549
2583
  content: string;
2550
2584
  assets?: {
2551
2585
  type: "image" | "video";
2552
- src: string;
2553
2586
  id: string;
2554
- alt?: string | undefined;
2587
+ src: string;
2555
2588
  height?: number | undefined;
2556
2589
  width?: number | undefined;
2590
+ alt?: string | undefined;
2557
2591
  }[] | undefined;
2558
2592
  };
2559
2593
  id: string;
@@ -2616,11 +2650,11 @@ export declare function validateFAQConfig(data: unknown): z.SafeParseReturnType<
2616
2650
  content: string;
2617
2651
  assets?: {
2618
2652
  type: "image" | "video";
2619
- src: string;
2620
2653
  id: string;
2621
- alt?: string | undefined;
2654
+ src: string;
2622
2655
  height?: number | undefined;
2623
2656
  width?: number | undefined;
2657
+ alt?: string | undefined;
2624
2658
  }[] | undefined;
2625
2659
  };
2626
2660
  id: string;
@@ -2694,5 +2728,2272 @@ export declare function validateFAQConfig(data: unknown): z.SafeParseReturnType<
2694
2728
  position?: "prepend" | "append" | undefined;
2695
2729
  once?: boolean | undefined;
2696
2730
  }[] | undefined;
2731
+ scope?: {
2732
+ events: string[];
2733
+ urlContains?: string | undefined;
2734
+ props?: Record<string, string | number | boolean> | undefined;
2735
+ } | undefined;
2736
+ title?: string | undefined;
2697
2737
  }>;
2738
+ /**
2739
+ * Action step schemas for unified JSON Schema generation.
2740
+ * The build script reads this array to merge adaptive actions into the
2741
+ * unified canvas-config.schema.json.
2742
+ *
2743
+ * Note: `.innerType()` strips the `.refine()` wrapper since JSON Schema
2744
+ * cannot express cross-field refinements; runtime Zod handles that.
2745
+ */
2746
+ export declare const actionStepSchemas: ({
2747
+ defName: string;
2748
+ schema: z.ZodObject<{
2749
+ kind: z.ZodLiteral<"faq:question">;
2750
+ config: z.ZodObject<{
2751
+ /** Unique identifier for this question */
2752
+ id: z.ZodString;
2753
+ /** The question text */
2754
+ question: z.ZodString;
2755
+ /** The answer content (plain string, rich HTML, or enhanced markdown) */
2756
+ answer: z.ZodUnion<[z.ZodString, z.ZodObject<{
2757
+ type: z.ZodLiteral<"rich">;
2758
+ html: z.ZodString;
2759
+ }, "strip", z.ZodTypeAny, {
2760
+ type: "rich";
2761
+ html: string;
2762
+ }, {
2763
+ type: "rich";
2764
+ html: string;
2765
+ }>, z.ZodObject<{
2766
+ type: z.ZodLiteral<"markdown">;
2767
+ content: z.ZodString;
2768
+ assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
2769
+ id: z.ZodString;
2770
+ type: z.ZodEnum<["image", "video"]>;
2771
+ src: z.ZodString;
2772
+ alt: z.ZodOptional<z.ZodString>;
2773
+ width: z.ZodOptional<z.ZodNumber>;
2774
+ height: z.ZodOptional<z.ZodNumber>;
2775
+ }, "strip", z.ZodTypeAny, {
2776
+ type: "image" | "video";
2777
+ id: string;
2778
+ src: string;
2779
+ height?: number | undefined;
2780
+ width?: number | undefined;
2781
+ alt?: string | undefined;
2782
+ }, {
2783
+ type: "image" | "video";
2784
+ id: string;
2785
+ src: string;
2786
+ height?: number | undefined;
2787
+ width?: number | undefined;
2788
+ alt?: string | undefined;
2789
+ }>, "many">>;
2790
+ }, "strip", z.ZodTypeAny, {
2791
+ type: "markdown";
2792
+ content: string;
2793
+ assets?: {
2794
+ type: "image" | "video";
2795
+ id: string;
2796
+ src: string;
2797
+ height?: number | undefined;
2798
+ width?: number | undefined;
2799
+ alt?: string | undefined;
2800
+ }[] | undefined;
2801
+ }, {
2802
+ type: "markdown";
2803
+ content: string;
2804
+ assets?: {
2805
+ type: "image" | "video";
2806
+ id: string;
2807
+ src: string;
2808
+ height?: number | undefined;
2809
+ width?: number | undefined;
2810
+ alt?: string | undefined;
2811
+ }[] | undefined;
2812
+ }>]>;
2813
+ /** Optional category for grouping */
2814
+ category: z.ZodOptional<z.ZodString>;
2815
+ /** Optional priority for ordering */
2816
+ priority: z.ZodOptional<z.ZodNumber>;
2817
+ /** Optional AI answer generation strategy */
2818
+ answerStrategy: z.ZodOptional<z.ZodObject<{
2819
+ endpoint: z.ZodString;
2820
+ context: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2821
+ cache: z.ZodOptional<z.ZodEnum<["session", "none"]>>;
2822
+ fallback: z.ZodOptional<z.ZodString>;
2823
+ }, "strip", z.ZodTypeAny, {
2824
+ endpoint: string;
2825
+ context?: string[] | undefined;
2826
+ cache?: "session" | "none" | undefined;
2827
+ fallback?: string | undefined;
2828
+ }, {
2829
+ endpoint: string;
2830
+ context?: string[] | undefined;
2831
+ cache?: "session" | "none" | undefined;
2832
+ fallback?: string | undefined;
2833
+ }>>;
2834
+ }, "strip", z.ZodTypeAny, {
2835
+ question: string;
2836
+ answer: string | {
2837
+ type: "rich";
2838
+ html: string;
2839
+ } | {
2840
+ type: "markdown";
2841
+ content: string;
2842
+ assets?: {
2843
+ type: "image" | "video";
2844
+ id: string;
2845
+ src: string;
2846
+ height?: number | undefined;
2847
+ width?: number | undefined;
2848
+ alt?: string | undefined;
2849
+ }[] | undefined;
2850
+ };
2851
+ id: string;
2852
+ priority?: number | undefined;
2853
+ category?: string | undefined;
2854
+ answerStrategy?: {
2855
+ endpoint: string;
2856
+ context?: string[] | undefined;
2857
+ cache?: "session" | "none" | undefined;
2858
+ fallback?: string | undefined;
2859
+ } | undefined;
2860
+ }, {
2861
+ question: string;
2862
+ answer: string | {
2863
+ type: "rich";
2864
+ html: string;
2865
+ } | {
2866
+ type: "markdown";
2867
+ content: string;
2868
+ assets?: {
2869
+ type: "image" | "video";
2870
+ id: string;
2871
+ src: string;
2872
+ height?: number | undefined;
2873
+ width?: number | undefined;
2874
+ alt?: string | undefined;
2875
+ }[] | undefined;
2876
+ };
2877
+ id: string;
2878
+ priority?: number | undefined;
2879
+ category?: string | undefined;
2880
+ answerStrategy?: {
2881
+ endpoint: string;
2882
+ context?: string[] | undefined;
2883
+ cache?: "session" | "none" | undefined;
2884
+ fallback?: string | undefined;
2885
+ } | undefined;
2886
+ }>;
2887
+ /** Per-item activation strategy (null = always show) */
2888
+ showWhen: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2889
+ type: z.ZodLiteral<"rules">;
2890
+ rules: z.ZodArray<z.ZodObject<{
2891
+ conditions: z.ZodArray<z.ZodObject<{
2892
+ type: z.ZodString;
2893
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2894
+ type: z.ZodString;
2895
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2896
+ type: z.ZodString;
2897
+ }, z.ZodTypeAny, "passthrough">>, "many">;
2898
+ value: z.ZodUnknown;
2899
+ }, "strip", z.ZodTypeAny, {
2900
+ conditions: z.objectOutputType<{
2901
+ type: z.ZodString;
2902
+ }, z.ZodTypeAny, "passthrough">[];
2903
+ value?: unknown;
2904
+ }, {
2905
+ conditions: z.objectInputType<{
2906
+ type: z.ZodString;
2907
+ }, z.ZodTypeAny, "passthrough">[];
2908
+ value?: unknown;
2909
+ }>, "many">;
2910
+ default: z.ZodUnknown;
2911
+ }, "strip", z.ZodTypeAny, {
2912
+ rules: {
2913
+ conditions: z.objectOutputType<{
2914
+ type: z.ZodString;
2915
+ }, z.ZodTypeAny, "passthrough">[];
2916
+ value?: unknown;
2917
+ }[];
2918
+ type: "rules";
2919
+ default?: unknown;
2920
+ }, {
2921
+ rules: {
2922
+ conditions: z.objectInputType<{
2923
+ type: z.ZodString;
2924
+ }, z.ZodTypeAny, "passthrough">[];
2925
+ value?: unknown;
2926
+ }[];
2927
+ type: "rules";
2928
+ default?: unknown;
2929
+ }>, z.ZodObject<{
2930
+ type: z.ZodLiteral<"score">;
2931
+ field: z.ZodString;
2932
+ threshold: z.ZodNumber;
2933
+ above: z.ZodUnknown;
2934
+ below: z.ZodUnknown;
2935
+ }, "strip", z.ZodTypeAny, {
2936
+ type: "score";
2937
+ threshold: number;
2938
+ field: string;
2939
+ above?: unknown;
2940
+ below?: unknown;
2941
+ }, {
2942
+ type: "score";
2943
+ threshold: number;
2944
+ field: string;
2945
+ above?: unknown;
2946
+ below?: unknown;
2947
+ }>, z.ZodObject<{
2948
+ type: z.ZodLiteral<"model">;
2949
+ modelId: z.ZodString;
2950
+ inputs: z.ZodArray<z.ZodString, "many">;
2951
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2952
+ default: z.ZodUnknown;
2953
+ }, "strip", z.ZodTypeAny, {
2954
+ type: "model";
2955
+ modelId: string;
2956
+ inputs: string[];
2957
+ outputMapping: Record<string, unknown>;
2958
+ default?: unknown;
2959
+ }, {
2960
+ type: "model";
2961
+ modelId: string;
2962
+ inputs: string[];
2963
+ outputMapping: Record<string, unknown>;
2964
+ default?: unknown;
2965
+ }>, z.ZodObject<{
2966
+ type: z.ZodLiteral<"external">;
2967
+ endpoint: z.ZodString;
2968
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
2969
+ default: z.ZodUnknown;
2970
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
2971
+ }, "strip", z.ZodTypeAny, {
2972
+ type: "external";
2973
+ endpoint: string;
2974
+ default?: unknown;
2975
+ method?: "GET" | "POST" | undefined;
2976
+ timeoutMs?: number | undefined;
2977
+ }, {
2978
+ type: "external";
2979
+ endpoint: string;
2980
+ default?: unknown;
2981
+ method?: "GET" | "POST" | undefined;
2982
+ timeoutMs?: number | undefined;
2983
+ }>]>>>;
2984
+ }, "strip", z.ZodTypeAny, {
2985
+ config: {
2986
+ question: string;
2987
+ answer: string | {
2988
+ type: "rich";
2989
+ html: string;
2990
+ } | {
2991
+ type: "markdown";
2992
+ content: string;
2993
+ assets?: {
2994
+ type: "image" | "video";
2995
+ id: string;
2996
+ src: string;
2997
+ height?: number | undefined;
2998
+ width?: number | undefined;
2999
+ alt?: string | undefined;
3000
+ }[] | undefined;
3001
+ };
3002
+ id: string;
3003
+ priority?: number | undefined;
3004
+ category?: string | undefined;
3005
+ answerStrategy?: {
3006
+ endpoint: string;
3007
+ context?: string[] | undefined;
3008
+ cache?: "session" | "none" | undefined;
3009
+ fallback?: string | undefined;
3010
+ } | undefined;
3011
+ };
3012
+ kind: "faq:question";
3013
+ showWhen?: {
3014
+ rules: {
3015
+ conditions: z.objectOutputType<{
3016
+ type: z.ZodString;
3017
+ }, z.ZodTypeAny, "passthrough">[];
3018
+ value?: unknown;
3019
+ }[];
3020
+ type: "rules";
3021
+ default?: unknown;
3022
+ } | {
3023
+ type: "score";
3024
+ threshold: number;
3025
+ field: string;
3026
+ above?: unknown;
3027
+ below?: unknown;
3028
+ } | {
3029
+ type: "model";
3030
+ modelId: string;
3031
+ inputs: string[];
3032
+ outputMapping: Record<string, unknown>;
3033
+ default?: unknown;
3034
+ } | {
3035
+ type: "external";
3036
+ endpoint: string;
3037
+ default?: unknown;
3038
+ method?: "GET" | "POST" | undefined;
3039
+ timeoutMs?: number | undefined;
3040
+ } | null | undefined;
3041
+ }, {
3042
+ config: {
3043
+ question: string;
3044
+ answer: string | {
3045
+ type: "rich";
3046
+ html: string;
3047
+ } | {
3048
+ type: "markdown";
3049
+ content: string;
3050
+ assets?: {
3051
+ type: "image" | "video";
3052
+ id: string;
3053
+ src: string;
3054
+ height?: number | undefined;
3055
+ width?: number | undefined;
3056
+ alt?: string | undefined;
3057
+ }[] | undefined;
3058
+ };
3059
+ id: string;
3060
+ priority?: number | undefined;
3061
+ category?: string | undefined;
3062
+ answerStrategy?: {
3063
+ endpoint: string;
3064
+ context?: string[] | undefined;
3065
+ cache?: "session" | "none" | undefined;
3066
+ fallback?: string | undefined;
3067
+ } | undefined;
3068
+ };
3069
+ kind: "faq:question";
3070
+ showWhen?: {
3071
+ rules: {
3072
+ conditions: z.objectInputType<{
3073
+ type: z.ZodString;
3074
+ }, z.ZodTypeAny, "passthrough">[];
3075
+ value?: unknown;
3076
+ }[];
3077
+ type: "rules";
3078
+ default?: unknown;
3079
+ } | {
3080
+ type: "score";
3081
+ threshold: number;
3082
+ field: string;
3083
+ above?: unknown;
3084
+ below?: unknown;
3085
+ } | {
3086
+ type: "model";
3087
+ modelId: string;
3088
+ inputs: string[];
3089
+ outputMapping: Record<string, unknown>;
3090
+ default?: unknown;
3091
+ } | {
3092
+ type: "external";
3093
+ endpoint: string;
3094
+ default?: unknown;
3095
+ method?: "GET" | "POST" | undefined;
3096
+ timeoutMs?: number | undefined;
3097
+ } | null | undefined;
3098
+ }>;
3099
+ } | {
3100
+ defName: string;
3101
+ schema: z.ZodObject<{
3102
+ kind: z.ZodLiteral<"faq:scroll_to">;
3103
+ itemId: z.ZodOptional<z.ZodString>;
3104
+ itemQuestion: z.ZodOptional<z.ZodString>;
3105
+ expand: z.ZodOptional<z.ZodBoolean>;
3106
+ behavior: z.ZodOptional<z.ZodEnum<["smooth", "instant", "auto"]>>;
3107
+ }, "strip", z.ZodTypeAny, {
3108
+ kind: "faq:scroll_to";
3109
+ itemId?: string | undefined;
3110
+ behavior?: "auto" | "smooth" | "instant" | undefined;
3111
+ itemQuestion?: string | undefined;
3112
+ expand?: boolean | undefined;
3113
+ }, {
3114
+ kind: "faq:scroll_to";
3115
+ itemId?: string | undefined;
3116
+ behavior?: "auto" | "smooth" | "instant" | undefined;
3117
+ itemQuestion?: string | undefined;
3118
+ expand?: boolean | undefined;
3119
+ }>;
3120
+ } | {
3121
+ defName: string;
3122
+ schema: z.ZodObject<{
3123
+ kind: z.ZodLiteral<"faq:toggle_item">;
3124
+ itemId: z.ZodOptional<z.ZodString>;
3125
+ itemQuestion: z.ZodOptional<z.ZodString>;
3126
+ state: z.ZodDefault<z.ZodEnum<["open", "closed", "toggle"]>>;
3127
+ }, "strip", z.ZodTypeAny, {
3128
+ state: "open" | "closed" | "toggle";
3129
+ kind: "faq:toggle_item";
3130
+ itemId?: string | undefined;
3131
+ itemQuestion?: string | undefined;
3132
+ }, {
3133
+ kind: "faq:toggle_item";
3134
+ itemId?: string | undefined;
3135
+ state?: "open" | "closed" | "toggle" | undefined;
3136
+ itemQuestion?: string | undefined;
3137
+ }>;
3138
+ } | {
3139
+ defName: string;
3140
+ schema: z.ZodObject<{
3141
+ kind: z.ZodLiteral<"faq:update">;
3142
+ operation: z.ZodEnum<["add", "remove", "reorder", "replace"]>;
3143
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
3144
+ kind: z.ZodLiteral<"faq:question">;
3145
+ config: z.ZodObject<{
3146
+ /** Unique identifier for this question */
3147
+ id: z.ZodString;
3148
+ /** The question text */
3149
+ question: z.ZodString;
3150
+ /** The answer content (plain string, rich HTML, or enhanced markdown) */
3151
+ answer: z.ZodUnion<[z.ZodString, z.ZodObject<{
3152
+ type: z.ZodLiteral<"rich">;
3153
+ html: z.ZodString;
3154
+ }, "strip", z.ZodTypeAny, {
3155
+ type: "rich";
3156
+ html: string;
3157
+ }, {
3158
+ type: "rich";
3159
+ html: string;
3160
+ }>, z.ZodObject<{
3161
+ type: z.ZodLiteral<"markdown">;
3162
+ content: z.ZodString;
3163
+ assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
3164
+ id: z.ZodString;
3165
+ type: z.ZodEnum<["image", "video"]>;
3166
+ src: z.ZodString;
3167
+ alt: z.ZodOptional<z.ZodString>;
3168
+ width: z.ZodOptional<z.ZodNumber>;
3169
+ height: z.ZodOptional<z.ZodNumber>;
3170
+ }, "strip", z.ZodTypeAny, {
3171
+ type: "image" | "video";
3172
+ id: string;
3173
+ src: string;
3174
+ height?: number | undefined;
3175
+ width?: number | undefined;
3176
+ alt?: string | undefined;
3177
+ }, {
3178
+ type: "image" | "video";
3179
+ id: string;
3180
+ src: string;
3181
+ height?: number | undefined;
3182
+ width?: number | undefined;
3183
+ alt?: string | undefined;
3184
+ }>, "many">>;
3185
+ }, "strip", z.ZodTypeAny, {
3186
+ type: "markdown";
3187
+ content: string;
3188
+ assets?: {
3189
+ type: "image" | "video";
3190
+ id: string;
3191
+ src: string;
3192
+ height?: number | undefined;
3193
+ width?: number | undefined;
3194
+ alt?: string | undefined;
3195
+ }[] | undefined;
3196
+ }, {
3197
+ type: "markdown";
3198
+ content: string;
3199
+ assets?: {
3200
+ type: "image" | "video";
3201
+ id: string;
3202
+ src: string;
3203
+ height?: number | undefined;
3204
+ width?: number | undefined;
3205
+ alt?: string | undefined;
3206
+ }[] | undefined;
3207
+ }>]>;
3208
+ /** Optional category for grouping */
3209
+ category: z.ZodOptional<z.ZodString>;
3210
+ /** Optional priority for ordering */
3211
+ priority: z.ZodOptional<z.ZodNumber>;
3212
+ /** Optional AI answer generation strategy */
3213
+ answerStrategy: z.ZodOptional<z.ZodObject<{
3214
+ endpoint: z.ZodString;
3215
+ context: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3216
+ cache: z.ZodOptional<z.ZodEnum<["session", "none"]>>;
3217
+ fallback: z.ZodOptional<z.ZodString>;
3218
+ }, "strip", z.ZodTypeAny, {
3219
+ endpoint: string;
3220
+ context?: string[] | undefined;
3221
+ cache?: "session" | "none" | undefined;
3222
+ fallback?: string | undefined;
3223
+ }, {
3224
+ endpoint: string;
3225
+ context?: string[] | undefined;
3226
+ cache?: "session" | "none" | undefined;
3227
+ fallback?: string | undefined;
3228
+ }>>;
3229
+ }, "strip", z.ZodTypeAny, {
3230
+ question: string;
3231
+ answer: string | {
3232
+ type: "rich";
3233
+ html: string;
3234
+ } | {
3235
+ type: "markdown";
3236
+ content: string;
3237
+ assets?: {
3238
+ type: "image" | "video";
3239
+ id: string;
3240
+ src: string;
3241
+ height?: number | undefined;
3242
+ width?: number | undefined;
3243
+ alt?: string | undefined;
3244
+ }[] | undefined;
3245
+ };
3246
+ id: string;
3247
+ priority?: number | undefined;
3248
+ category?: string | undefined;
3249
+ answerStrategy?: {
3250
+ endpoint: string;
3251
+ context?: string[] | undefined;
3252
+ cache?: "session" | "none" | undefined;
3253
+ fallback?: string | undefined;
3254
+ } | undefined;
3255
+ }, {
3256
+ question: string;
3257
+ answer: string | {
3258
+ type: "rich";
3259
+ html: string;
3260
+ } | {
3261
+ type: "markdown";
3262
+ content: string;
3263
+ assets?: {
3264
+ type: "image" | "video";
3265
+ id: string;
3266
+ src: string;
3267
+ height?: number | undefined;
3268
+ width?: number | undefined;
3269
+ alt?: string | undefined;
3270
+ }[] | undefined;
3271
+ };
3272
+ id: string;
3273
+ priority?: number | undefined;
3274
+ category?: string | undefined;
3275
+ answerStrategy?: {
3276
+ endpoint: string;
3277
+ context?: string[] | undefined;
3278
+ cache?: "session" | "none" | undefined;
3279
+ fallback?: string | undefined;
3280
+ } | undefined;
3281
+ }>;
3282
+ /** Per-item activation strategy (null = always show) */
3283
+ showWhen: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3284
+ type: z.ZodLiteral<"rules">;
3285
+ rules: z.ZodArray<z.ZodObject<{
3286
+ conditions: z.ZodArray<z.ZodObject<{
3287
+ type: z.ZodString;
3288
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3289
+ type: z.ZodString;
3290
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3291
+ type: z.ZodString;
3292
+ }, z.ZodTypeAny, "passthrough">>, "many">;
3293
+ value: z.ZodUnknown;
3294
+ }, "strip", z.ZodTypeAny, {
3295
+ conditions: z.objectOutputType<{
3296
+ type: z.ZodString;
3297
+ }, z.ZodTypeAny, "passthrough">[];
3298
+ value?: unknown;
3299
+ }, {
3300
+ conditions: z.objectInputType<{
3301
+ type: z.ZodString;
3302
+ }, z.ZodTypeAny, "passthrough">[];
3303
+ value?: unknown;
3304
+ }>, "many">;
3305
+ default: z.ZodUnknown;
3306
+ }, "strip", z.ZodTypeAny, {
3307
+ rules: {
3308
+ conditions: z.objectOutputType<{
3309
+ type: z.ZodString;
3310
+ }, z.ZodTypeAny, "passthrough">[];
3311
+ value?: unknown;
3312
+ }[];
3313
+ type: "rules";
3314
+ default?: unknown;
3315
+ }, {
3316
+ rules: {
3317
+ conditions: z.objectInputType<{
3318
+ type: z.ZodString;
3319
+ }, z.ZodTypeAny, "passthrough">[];
3320
+ value?: unknown;
3321
+ }[];
3322
+ type: "rules";
3323
+ default?: unknown;
3324
+ }>, z.ZodObject<{
3325
+ type: z.ZodLiteral<"score">;
3326
+ field: z.ZodString;
3327
+ threshold: z.ZodNumber;
3328
+ above: z.ZodUnknown;
3329
+ below: z.ZodUnknown;
3330
+ }, "strip", z.ZodTypeAny, {
3331
+ type: "score";
3332
+ threshold: number;
3333
+ field: string;
3334
+ above?: unknown;
3335
+ below?: unknown;
3336
+ }, {
3337
+ type: "score";
3338
+ threshold: number;
3339
+ field: string;
3340
+ above?: unknown;
3341
+ below?: unknown;
3342
+ }>, z.ZodObject<{
3343
+ type: z.ZodLiteral<"model">;
3344
+ modelId: z.ZodString;
3345
+ inputs: z.ZodArray<z.ZodString, "many">;
3346
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3347
+ default: z.ZodUnknown;
3348
+ }, "strip", z.ZodTypeAny, {
3349
+ type: "model";
3350
+ modelId: string;
3351
+ inputs: string[];
3352
+ outputMapping: Record<string, unknown>;
3353
+ default?: unknown;
3354
+ }, {
3355
+ type: "model";
3356
+ modelId: string;
3357
+ inputs: string[];
3358
+ outputMapping: Record<string, unknown>;
3359
+ default?: unknown;
3360
+ }>, z.ZodObject<{
3361
+ type: z.ZodLiteral<"external">;
3362
+ endpoint: z.ZodString;
3363
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
3364
+ default: z.ZodUnknown;
3365
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
3366
+ }, "strip", z.ZodTypeAny, {
3367
+ type: "external";
3368
+ endpoint: string;
3369
+ default?: unknown;
3370
+ method?: "GET" | "POST" | undefined;
3371
+ timeoutMs?: number | undefined;
3372
+ }, {
3373
+ type: "external";
3374
+ endpoint: string;
3375
+ default?: unknown;
3376
+ method?: "GET" | "POST" | undefined;
3377
+ timeoutMs?: number | undefined;
3378
+ }>]>>>;
3379
+ }, "strip", z.ZodTypeAny, {
3380
+ config: {
3381
+ question: string;
3382
+ answer: string | {
3383
+ type: "rich";
3384
+ html: string;
3385
+ } | {
3386
+ type: "markdown";
3387
+ content: string;
3388
+ assets?: {
3389
+ type: "image" | "video";
3390
+ id: string;
3391
+ src: string;
3392
+ height?: number | undefined;
3393
+ width?: number | undefined;
3394
+ alt?: string | undefined;
3395
+ }[] | undefined;
3396
+ };
3397
+ id: string;
3398
+ priority?: number | undefined;
3399
+ category?: string | undefined;
3400
+ answerStrategy?: {
3401
+ endpoint: string;
3402
+ context?: string[] | undefined;
3403
+ cache?: "session" | "none" | undefined;
3404
+ fallback?: string | undefined;
3405
+ } | undefined;
3406
+ };
3407
+ kind: "faq:question";
3408
+ showWhen?: {
3409
+ rules: {
3410
+ conditions: z.objectOutputType<{
3411
+ type: z.ZodString;
3412
+ }, z.ZodTypeAny, "passthrough">[];
3413
+ value?: unknown;
3414
+ }[];
3415
+ type: "rules";
3416
+ default?: unknown;
3417
+ } | {
3418
+ type: "score";
3419
+ threshold: number;
3420
+ field: string;
3421
+ above?: unknown;
3422
+ below?: unknown;
3423
+ } | {
3424
+ type: "model";
3425
+ modelId: string;
3426
+ inputs: string[];
3427
+ outputMapping: Record<string, unknown>;
3428
+ default?: unknown;
3429
+ } | {
3430
+ type: "external";
3431
+ endpoint: string;
3432
+ default?: unknown;
3433
+ method?: "GET" | "POST" | undefined;
3434
+ timeoutMs?: number | undefined;
3435
+ } | null | undefined;
3436
+ }, {
3437
+ config: {
3438
+ question: string;
3439
+ answer: string | {
3440
+ type: "rich";
3441
+ html: string;
3442
+ } | {
3443
+ type: "markdown";
3444
+ content: string;
3445
+ assets?: {
3446
+ type: "image" | "video";
3447
+ id: string;
3448
+ src: string;
3449
+ height?: number | undefined;
3450
+ width?: number | undefined;
3451
+ alt?: string | undefined;
3452
+ }[] | undefined;
3453
+ };
3454
+ id: string;
3455
+ priority?: number | undefined;
3456
+ category?: string | undefined;
3457
+ answerStrategy?: {
3458
+ endpoint: string;
3459
+ context?: string[] | undefined;
3460
+ cache?: "session" | "none" | undefined;
3461
+ fallback?: string | undefined;
3462
+ } | undefined;
3463
+ };
3464
+ kind: "faq:question";
3465
+ showWhen?: {
3466
+ rules: {
3467
+ conditions: z.objectInputType<{
3468
+ type: z.ZodString;
3469
+ }, z.ZodTypeAny, "passthrough">[];
3470
+ value?: unknown;
3471
+ }[];
3472
+ type: "rules";
3473
+ default?: unknown;
3474
+ } | {
3475
+ type: "score";
3476
+ threshold: number;
3477
+ field: string;
3478
+ above?: unknown;
3479
+ below?: unknown;
3480
+ } | {
3481
+ type: "model";
3482
+ modelId: string;
3483
+ inputs: string[];
3484
+ outputMapping: Record<string, unknown>;
3485
+ default?: unknown;
3486
+ } | {
3487
+ type: "external";
3488
+ endpoint: string;
3489
+ default?: unknown;
3490
+ method?: "GET" | "POST" | undefined;
3491
+ timeoutMs?: number | undefined;
3492
+ } | null | undefined;
3493
+ }>, "many">>;
3494
+ itemId: z.ZodOptional<z.ZodString>;
3495
+ order: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3496
+ position: z.ZodOptional<z.ZodEnum<["prepend", "append", "before", "after"]>>;
3497
+ anchorId: z.ZodOptional<z.ZodString>;
3498
+ }, "strip", z.ZodTypeAny, {
3499
+ operation: "add" | "remove" | "reorder" | "replace";
3500
+ kind: "faq:update";
3501
+ itemId?: string | undefined;
3502
+ items?: {
3503
+ config: {
3504
+ question: string;
3505
+ answer: string | {
3506
+ type: "rich";
3507
+ html: string;
3508
+ } | {
3509
+ type: "markdown";
3510
+ content: string;
3511
+ assets?: {
3512
+ type: "image" | "video";
3513
+ id: string;
3514
+ src: string;
3515
+ height?: number | undefined;
3516
+ width?: number | undefined;
3517
+ alt?: string | undefined;
3518
+ }[] | undefined;
3519
+ };
3520
+ id: string;
3521
+ priority?: number | undefined;
3522
+ category?: string | undefined;
3523
+ answerStrategy?: {
3524
+ endpoint: string;
3525
+ context?: string[] | undefined;
3526
+ cache?: "session" | "none" | undefined;
3527
+ fallback?: string | undefined;
3528
+ } | undefined;
3529
+ };
3530
+ kind: "faq:question";
3531
+ showWhen?: {
3532
+ rules: {
3533
+ conditions: z.objectOutputType<{
3534
+ type: z.ZodString;
3535
+ }, z.ZodTypeAny, "passthrough">[];
3536
+ value?: unknown;
3537
+ }[];
3538
+ type: "rules";
3539
+ default?: unknown;
3540
+ } | {
3541
+ type: "score";
3542
+ threshold: number;
3543
+ field: string;
3544
+ above?: unknown;
3545
+ below?: unknown;
3546
+ } | {
3547
+ type: "model";
3548
+ modelId: string;
3549
+ inputs: string[];
3550
+ outputMapping: Record<string, unknown>;
3551
+ default?: unknown;
3552
+ } | {
3553
+ type: "external";
3554
+ endpoint: string;
3555
+ default?: unknown;
3556
+ method?: "GET" | "POST" | undefined;
3557
+ timeoutMs?: number | undefined;
3558
+ } | null | undefined;
3559
+ }[] | undefined;
3560
+ position?: "prepend" | "append" | "before" | "after" | undefined;
3561
+ anchorId?: string | undefined;
3562
+ order?: string[] | undefined;
3563
+ }, {
3564
+ operation: "add" | "remove" | "reorder" | "replace";
3565
+ kind: "faq:update";
3566
+ itemId?: string | undefined;
3567
+ items?: {
3568
+ config: {
3569
+ question: string;
3570
+ answer: string | {
3571
+ type: "rich";
3572
+ html: string;
3573
+ } | {
3574
+ type: "markdown";
3575
+ content: string;
3576
+ assets?: {
3577
+ type: "image" | "video";
3578
+ id: string;
3579
+ src: string;
3580
+ height?: number | undefined;
3581
+ width?: number | undefined;
3582
+ alt?: string | undefined;
3583
+ }[] | undefined;
3584
+ };
3585
+ id: string;
3586
+ priority?: number | undefined;
3587
+ category?: string | undefined;
3588
+ answerStrategy?: {
3589
+ endpoint: string;
3590
+ context?: string[] | undefined;
3591
+ cache?: "session" | "none" | undefined;
3592
+ fallback?: string | undefined;
3593
+ } | undefined;
3594
+ };
3595
+ kind: "faq:question";
3596
+ showWhen?: {
3597
+ rules: {
3598
+ conditions: z.objectInputType<{
3599
+ type: z.ZodString;
3600
+ }, z.ZodTypeAny, "passthrough">[];
3601
+ value?: unknown;
3602
+ }[];
3603
+ type: "rules";
3604
+ default?: unknown;
3605
+ } | {
3606
+ type: "score";
3607
+ threshold: number;
3608
+ field: string;
3609
+ above?: unknown;
3610
+ below?: unknown;
3611
+ } | {
3612
+ type: "model";
3613
+ modelId: string;
3614
+ inputs: string[];
3615
+ outputMapping: Record<string, unknown>;
3616
+ default?: unknown;
3617
+ } | {
3618
+ type: "external";
3619
+ endpoint: string;
3620
+ default?: unknown;
3621
+ method?: "GET" | "POST" | undefined;
3622
+ timeoutMs?: number | undefined;
3623
+ } | null | undefined;
3624
+ }[] | undefined;
3625
+ position?: "prepend" | "append" | "before" | "after" | undefined;
3626
+ anchorId?: string | undefined;
3627
+ order?: string[] | undefined;
3628
+ }>;
3629
+ })[];
3630
+ /**
3631
+ * Tile widget definitions for unified JSON Schema generation.
3632
+ * Maps widget IDs to their props validation schema so the build script
3633
+ * can inject if/then constraints on tile.props.
3634
+ */
3635
+ export declare const tileWidgets: {
3636
+ widget: string;
3637
+ defName: string;
3638
+ propsSchema: z.ZodObject<{
3639
+ /** Display title for the FAQ widget */
3640
+ title: z.ZodOptional<z.ZodString>;
3641
+ /** Whether only one or multiple questions can be expanded at once */
3642
+ expandBehavior: z.ZodDefault<z.ZodEnum<["single", "multiple"]>>;
3643
+ /** Whether to show a search/filter input */
3644
+ searchable: z.ZodDefault<z.ZodBoolean>;
3645
+ /** Color theme */
3646
+ theme: z.ZodDefault<z.ZodEnum<["light", "dark", "auto"]>>;
3647
+ /** FAQ questions (compositional actions) */
3648
+ actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
3649
+ kind: z.ZodLiteral<"faq:question">;
3650
+ config: z.ZodObject<{
3651
+ /** Unique identifier for this question */
3652
+ id: z.ZodString;
3653
+ /** The question text */
3654
+ question: z.ZodString;
3655
+ /** The answer content (plain string, rich HTML, or enhanced markdown) */
3656
+ answer: z.ZodUnion<[z.ZodString, z.ZodObject<{
3657
+ type: z.ZodLiteral<"rich">;
3658
+ html: z.ZodString;
3659
+ }, "strip", z.ZodTypeAny, {
3660
+ type: "rich";
3661
+ html: string;
3662
+ }, {
3663
+ type: "rich";
3664
+ html: string;
3665
+ }>, z.ZodObject<{
3666
+ type: z.ZodLiteral<"markdown">;
3667
+ content: z.ZodString;
3668
+ assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
3669
+ id: z.ZodString;
3670
+ type: z.ZodEnum<["image", "video"]>;
3671
+ src: z.ZodString;
3672
+ alt: z.ZodOptional<z.ZodString>;
3673
+ width: z.ZodOptional<z.ZodNumber>;
3674
+ height: z.ZodOptional<z.ZodNumber>;
3675
+ }, "strip", z.ZodTypeAny, {
3676
+ type: "image" | "video";
3677
+ id: string;
3678
+ src: string;
3679
+ height?: number | undefined;
3680
+ width?: number | undefined;
3681
+ alt?: string | undefined;
3682
+ }, {
3683
+ type: "image" | "video";
3684
+ id: string;
3685
+ src: string;
3686
+ height?: number | undefined;
3687
+ width?: number | undefined;
3688
+ alt?: string | undefined;
3689
+ }>, "many">>;
3690
+ }, "strip", z.ZodTypeAny, {
3691
+ type: "markdown";
3692
+ content: string;
3693
+ assets?: {
3694
+ type: "image" | "video";
3695
+ id: string;
3696
+ src: string;
3697
+ height?: number | undefined;
3698
+ width?: number | undefined;
3699
+ alt?: string | undefined;
3700
+ }[] | undefined;
3701
+ }, {
3702
+ type: "markdown";
3703
+ content: string;
3704
+ assets?: {
3705
+ type: "image" | "video";
3706
+ id: string;
3707
+ src: string;
3708
+ height?: number | undefined;
3709
+ width?: number | undefined;
3710
+ alt?: string | undefined;
3711
+ }[] | undefined;
3712
+ }>]>;
3713
+ /** Optional category for grouping */
3714
+ category: z.ZodOptional<z.ZodString>;
3715
+ /** Optional priority for ordering */
3716
+ priority: z.ZodOptional<z.ZodNumber>;
3717
+ /** Optional AI answer generation strategy */
3718
+ answerStrategy: z.ZodOptional<z.ZodObject<{
3719
+ endpoint: z.ZodString;
3720
+ context: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3721
+ cache: z.ZodOptional<z.ZodEnum<["session", "none"]>>;
3722
+ fallback: z.ZodOptional<z.ZodString>;
3723
+ }, "strip", z.ZodTypeAny, {
3724
+ endpoint: string;
3725
+ context?: string[] | undefined;
3726
+ cache?: "session" | "none" | undefined;
3727
+ fallback?: string | undefined;
3728
+ }, {
3729
+ endpoint: string;
3730
+ context?: string[] | undefined;
3731
+ cache?: "session" | "none" | undefined;
3732
+ fallback?: string | undefined;
3733
+ }>>;
3734
+ }, "strip", z.ZodTypeAny, {
3735
+ question: string;
3736
+ answer: string | {
3737
+ type: "rich";
3738
+ html: string;
3739
+ } | {
3740
+ type: "markdown";
3741
+ content: string;
3742
+ assets?: {
3743
+ type: "image" | "video";
3744
+ id: string;
3745
+ src: string;
3746
+ height?: number | undefined;
3747
+ width?: number | undefined;
3748
+ alt?: string | undefined;
3749
+ }[] | undefined;
3750
+ };
3751
+ id: string;
3752
+ priority?: number | undefined;
3753
+ category?: string | undefined;
3754
+ answerStrategy?: {
3755
+ endpoint: string;
3756
+ context?: string[] | undefined;
3757
+ cache?: "session" | "none" | undefined;
3758
+ fallback?: string | undefined;
3759
+ } | undefined;
3760
+ }, {
3761
+ question: string;
3762
+ answer: string | {
3763
+ type: "rich";
3764
+ html: string;
3765
+ } | {
3766
+ type: "markdown";
3767
+ content: string;
3768
+ assets?: {
3769
+ type: "image" | "video";
3770
+ id: string;
3771
+ src: string;
3772
+ height?: number | undefined;
3773
+ width?: number | undefined;
3774
+ alt?: string | undefined;
3775
+ }[] | undefined;
3776
+ };
3777
+ id: string;
3778
+ priority?: number | undefined;
3779
+ category?: string | undefined;
3780
+ answerStrategy?: {
3781
+ endpoint: string;
3782
+ context?: string[] | undefined;
3783
+ cache?: "session" | "none" | undefined;
3784
+ fallback?: string | undefined;
3785
+ } | undefined;
3786
+ }>;
3787
+ /** Per-item activation strategy (null = always show) */
3788
+ showWhen: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3789
+ type: z.ZodLiteral<"rules">;
3790
+ rules: z.ZodArray<z.ZodObject<{
3791
+ conditions: z.ZodArray<z.ZodObject<{
3792
+ type: z.ZodString;
3793
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3794
+ type: z.ZodString;
3795
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3796
+ type: z.ZodString;
3797
+ }, z.ZodTypeAny, "passthrough">>, "many">;
3798
+ value: z.ZodUnknown;
3799
+ }, "strip", z.ZodTypeAny, {
3800
+ conditions: z.objectOutputType<{
3801
+ type: z.ZodString;
3802
+ }, z.ZodTypeAny, "passthrough">[];
3803
+ value?: unknown;
3804
+ }, {
3805
+ conditions: z.objectInputType<{
3806
+ type: z.ZodString;
3807
+ }, z.ZodTypeAny, "passthrough">[];
3808
+ value?: unknown;
3809
+ }>, "many">;
3810
+ default: z.ZodUnknown;
3811
+ }, "strip", z.ZodTypeAny, {
3812
+ rules: {
3813
+ conditions: z.objectOutputType<{
3814
+ type: z.ZodString;
3815
+ }, z.ZodTypeAny, "passthrough">[];
3816
+ value?: unknown;
3817
+ }[];
3818
+ type: "rules";
3819
+ default?: unknown;
3820
+ }, {
3821
+ rules: {
3822
+ conditions: z.objectInputType<{
3823
+ type: z.ZodString;
3824
+ }, z.ZodTypeAny, "passthrough">[];
3825
+ value?: unknown;
3826
+ }[];
3827
+ type: "rules";
3828
+ default?: unknown;
3829
+ }>, z.ZodObject<{
3830
+ type: z.ZodLiteral<"score">;
3831
+ field: z.ZodString;
3832
+ threshold: z.ZodNumber;
3833
+ above: z.ZodUnknown;
3834
+ below: z.ZodUnknown;
3835
+ }, "strip", z.ZodTypeAny, {
3836
+ type: "score";
3837
+ threshold: number;
3838
+ field: string;
3839
+ above?: unknown;
3840
+ below?: unknown;
3841
+ }, {
3842
+ type: "score";
3843
+ threshold: number;
3844
+ field: string;
3845
+ above?: unknown;
3846
+ below?: unknown;
3847
+ }>, z.ZodObject<{
3848
+ type: z.ZodLiteral<"model">;
3849
+ modelId: z.ZodString;
3850
+ inputs: z.ZodArray<z.ZodString, "many">;
3851
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3852
+ default: z.ZodUnknown;
3853
+ }, "strip", z.ZodTypeAny, {
3854
+ type: "model";
3855
+ modelId: string;
3856
+ inputs: string[];
3857
+ outputMapping: Record<string, unknown>;
3858
+ default?: unknown;
3859
+ }, {
3860
+ type: "model";
3861
+ modelId: string;
3862
+ inputs: string[];
3863
+ outputMapping: Record<string, unknown>;
3864
+ default?: unknown;
3865
+ }>, z.ZodObject<{
3866
+ type: z.ZodLiteral<"external">;
3867
+ endpoint: z.ZodString;
3868
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
3869
+ default: z.ZodUnknown;
3870
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
3871
+ }, "strip", z.ZodTypeAny, {
3872
+ type: "external";
3873
+ endpoint: string;
3874
+ default?: unknown;
3875
+ method?: "GET" | "POST" | undefined;
3876
+ timeoutMs?: number | undefined;
3877
+ }, {
3878
+ type: "external";
3879
+ endpoint: string;
3880
+ default?: unknown;
3881
+ method?: "GET" | "POST" | undefined;
3882
+ timeoutMs?: number | undefined;
3883
+ }>]>>>;
3884
+ }, "strip", z.ZodTypeAny, {
3885
+ config: {
3886
+ question: string;
3887
+ answer: string | {
3888
+ type: "rich";
3889
+ html: string;
3890
+ } | {
3891
+ type: "markdown";
3892
+ content: string;
3893
+ assets?: {
3894
+ type: "image" | "video";
3895
+ id: string;
3896
+ src: string;
3897
+ height?: number | undefined;
3898
+ width?: number | undefined;
3899
+ alt?: string | undefined;
3900
+ }[] | undefined;
3901
+ };
3902
+ id: string;
3903
+ priority?: number | undefined;
3904
+ category?: string | undefined;
3905
+ answerStrategy?: {
3906
+ endpoint: string;
3907
+ context?: string[] | undefined;
3908
+ cache?: "session" | "none" | undefined;
3909
+ fallback?: string | undefined;
3910
+ } | undefined;
3911
+ };
3912
+ kind: "faq:question";
3913
+ showWhen?: {
3914
+ rules: {
3915
+ conditions: z.objectOutputType<{
3916
+ type: z.ZodString;
3917
+ }, z.ZodTypeAny, "passthrough">[];
3918
+ value?: unknown;
3919
+ }[];
3920
+ type: "rules";
3921
+ default?: unknown;
3922
+ } | {
3923
+ type: "score";
3924
+ threshold: number;
3925
+ field: string;
3926
+ above?: unknown;
3927
+ below?: unknown;
3928
+ } | {
3929
+ type: "model";
3930
+ modelId: string;
3931
+ inputs: string[];
3932
+ outputMapping: Record<string, unknown>;
3933
+ default?: unknown;
3934
+ } | {
3935
+ type: "external";
3936
+ endpoint: string;
3937
+ default?: unknown;
3938
+ method?: "GET" | "POST" | undefined;
3939
+ timeoutMs?: number | undefined;
3940
+ } | null | undefined;
3941
+ }, {
3942
+ config: {
3943
+ question: string;
3944
+ answer: string | {
3945
+ type: "rich";
3946
+ html: string;
3947
+ } | {
3948
+ type: "markdown";
3949
+ content: string;
3950
+ assets?: {
3951
+ type: "image" | "video";
3952
+ id: string;
3953
+ src: string;
3954
+ height?: number | undefined;
3955
+ width?: number | undefined;
3956
+ alt?: string | undefined;
3957
+ }[] | undefined;
3958
+ };
3959
+ id: string;
3960
+ priority?: number | undefined;
3961
+ category?: string | undefined;
3962
+ answerStrategy?: {
3963
+ endpoint: string;
3964
+ context?: string[] | undefined;
3965
+ cache?: "session" | "none" | undefined;
3966
+ fallback?: string | undefined;
3967
+ } | undefined;
3968
+ };
3969
+ kind: "faq:question";
3970
+ showWhen?: {
3971
+ rules: {
3972
+ conditions: z.objectInputType<{
3973
+ type: z.ZodString;
3974
+ }, z.ZodTypeAny, "passthrough">[];
3975
+ value?: unknown;
3976
+ }[];
3977
+ type: "rules";
3978
+ default?: unknown;
3979
+ } | {
3980
+ type: "score";
3981
+ threshold: number;
3982
+ field: string;
3983
+ above?: unknown;
3984
+ below?: unknown;
3985
+ } | {
3986
+ type: "model";
3987
+ modelId: string;
3988
+ inputs: string[];
3989
+ outputMapping: Record<string, unknown>;
3990
+ default?: unknown;
3991
+ } | {
3992
+ type: "external";
3993
+ endpoint: string;
3994
+ default?: unknown;
3995
+ method?: "GET" | "POST" | undefined;
3996
+ timeoutMs?: number | undefined;
3997
+ } | null | undefined;
3998
+ }>, "many">>;
3999
+ /** Feedback widget configuration */
4000
+ feedback: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
4001
+ style: z.ZodEnum<["thumbs", "rating"]>;
4002
+ prompt: z.ZodOptional<z.ZodString>;
4003
+ }, "strip", z.ZodTypeAny, {
4004
+ style: "thumbs" | "rating";
4005
+ prompt?: string | undefined;
4006
+ }, {
4007
+ style: "thumbs" | "rating";
4008
+ prompt?: string | undefined;
4009
+ }>]>>;
4010
+ /** Question ordering strategy */
4011
+ ordering: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["static", "priority"]>, z.ZodObject<{
4012
+ type: z.ZodLiteral<"segment">;
4013
+ segmentWeights: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>;
4014
+ }, "strip", z.ZodTypeAny, {
4015
+ type: "segment";
4016
+ segmentWeights: Record<string, string[]>;
4017
+ }, {
4018
+ type: "segment";
4019
+ segmentWeights: Record<string, string[]>;
4020
+ }>]>>;
4021
+ /** Dynamic FAQ injection rules */
4022
+ injections: z.ZodOptional<z.ZodArray<z.ZodObject<{
4023
+ trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4024
+ type: z.ZodLiteral<"rules">;
4025
+ rules: z.ZodArray<z.ZodObject<{
4026
+ conditions: z.ZodArray<z.ZodObject<{
4027
+ type: z.ZodString;
4028
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4029
+ type: z.ZodString;
4030
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4031
+ type: z.ZodString;
4032
+ }, z.ZodTypeAny, "passthrough">>, "many">;
4033
+ value: z.ZodUnknown;
4034
+ }, "strip", z.ZodTypeAny, {
4035
+ conditions: z.objectOutputType<{
4036
+ type: z.ZodString;
4037
+ }, z.ZodTypeAny, "passthrough">[];
4038
+ value?: unknown;
4039
+ }, {
4040
+ conditions: z.objectInputType<{
4041
+ type: z.ZodString;
4042
+ }, z.ZodTypeAny, "passthrough">[];
4043
+ value?: unknown;
4044
+ }>, "many">;
4045
+ default: z.ZodUnknown;
4046
+ }, "strip", z.ZodTypeAny, {
4047
+ rules: {
4048
+ conditions: z.objectOutputType<{
4049
+ type: z.ZodString;
4050
+ }, z.ZodTypeAny, "passthrough">[];
4051
+ value?: unknown;
4052
+ }[];
4053
+ type: "rules";
4054
+ default?: unknown;
4055
+ }, {
4056
+ rules: {
4057
+ conditions: z.objectInputType<{
4058
+ type: z.ZodString;
4059
+ }, z.ZodTypeAny, "passthrough">[];
4060
+ value?: unknown;
4061
+ }[];
4062
+ type: "rules";
4063
+ default?: unknown;
4064
+ }>, z.ZodObject<{
4065
+ type: z.ZodLiteral<"score">;
4066
+ field: z.ZodString;
4067
+ threshold: z.ZodNumber;
4068
+ above: z.ZodUnknown;
4069
+ below: z.ZodUnknown;
4070
+ }, "strip", z.ZodTypeAny, {
4071
+ type: "score";
4072
+ threshold: number;
4073
+ field: string;
4074
+ above?: unknown;
4075
+ below?: unknown;
4076
+ }, {
4077
+ type: "score";
4078
+ threshold: number;
4079
+ field: string;
4080
+ above?: unknown;
4081
+ below?: unknown;
4082
+ }>, z.ZodObject<{
4083
+ type: z.ZodLiteral<"model">;
4084
+ modelId: z.ZodString;
4085
+ inputs: z.ZodArray<z.ZodString, "many">;
4086
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4087
+ default: z.ZodUnknown;
4088
+ }, "strip", z.ZodTypeAny, {
4089
+ type: "model";
4090
+ modelId: string;
4091
+ inputs: string[];
4092
+ outputMapping: Record<string, unknown>;
4093
+ default?: unknown;
4094
+ }, {
4095
+ type: "model";
4096
+ modelId: string;
4097
+ inputs: string[];
4098
+ outputMapping: Record<string, unknown>;
4099
+ default?: unknown;
4100
+ }>, z.ZodObject<{
4101
+ type: z.ZodLiteral<"external">;
4102
+ endpoint: z.ZodString;
4103
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
4104
+ default: z.ZodUnknown;
4105
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
4106
+ }, "strip", z.ZodTypeAny, {
4107
+ type: "external";
4108
+ endpoint: string;
4109
+ default?: unknown;
4110
+ method?: "GET" | "POST" | undefined;
4111
+ timeoutMs?: number | undefined;
4112
+ }, {
4113
+ type: "external";
4114
+ endpoint: string;
4115
+ default?: unknown;
4116
+ method?: "GET" | "POST" | undefined;
4117
+ timeoutMs?: number | undefined;
4118
+ }>]>;
4119
+ items: z.ZodArray<z.ZodLazy<z.ZodObject<{
4120
+ kind: z.ZodLiteral<"faq:question">;
4121
+ config: z.ZodObject<{
4122
+ /** Unique identifier for this question */
4123
+ id: z.ZodString;
4124
+ /** The question text */
4125
+ question: z.ZodString;
4126
+ /** The answer content (plain string, rich HTML, or enhanced markdown) */
4127
+ answer: z.ZodUnion<[z.ZodString, z.ZodObject<{
4128
+ type: z.ZodLiteral<"rich">;
4129
+ html: z.ZodString;
4130
+ }, "strip", z.ZodTypeAny, {
4131
+ type: "rich";
4132
+ html: string;
4133
+ }, {
4134
+ type: "rich";
4135
+ html: string;
4136
+ }>, z.ZodObject<{
4137
+ type: z.ZodLiteral<"markdown">;
4138
+ content: z.ZodString;
4139
+ assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
4140
+ id: z.ZodString;
4141
+ type: z.ZodEnum<["image", "video"]>;
4142
+ src: z.ZodString;
4143
+ alt: z.ZodOptional<z.ZodString>;
4144
+ width: z.ZodOptional<z.ZodNumber>;
4145
+ height: z.ZodOptional<z.ZodNumber>;
4146
+ }, "strip", z.ZodTypeAny, {
4147
+ type: "image" | "video";
4148
+ id: string;
4149
+ src: string;
4150
+ height?: number | undefined;
4151
+ width?: number | undefined;
4152
+ alt?: string | undefined;
4153
+ }, {
4154
+ type: "image" | "video";
4155
+ id: string;
4156
+ src: string;
4157
+ height?: number | undefined;
4158
+ width?: number | undefined;
4159
+ alt?: string | undefined;
4160
+ }>, "many">>;
4161
+ }, "strip", z.ZodTypeAny, {
4162
+ type: "markdown";
4163
+ content: string;
4164
+ assets?: {
4165
+ type: "image" | "video";
4166
+ id: string;
4167
+ src: string;
4168
+ height?: number | undefined;
4169
+ width?: number | undefined;
4170
+ alt?: string | undefined;
4171
+ }[] | undefined;
4172
+ }, {
4173
+ type: "markdown";
4174
+ content: string;
4175
+ assets?: {
4176
+ type: "image" | "video";
4177
+ id: string;
4178
+ src: string;
4179
+ height?: number | undefined;
4180
+ width?: number | undefined;
4181
+ alt?: string | undefined;
4182
+ }[] | undefined;
4183
+ }>]>;
4184
+ /** Optional category for grouping */
4185
+ category: z.ZodOptional<z.ZodString>;
4186
+ /** Optional priority for ordering */
4187
+ priority: z.ZodOptional<z.ZodNumber>;
4188
+ /** Optional AI answer generation strategy */
4189
+ answerStrategy: z.ZodOptional<z.ZodObject<{
4190
+ endpoint: z.ZodString;
4191
+ context: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4192
+ cache: z.ZodOptional<z.ZodEnum<["session", "none"]>>;
4193
+ fallback: z.ZodOptional<z.ZodString>;
4194
+ }, "strip", z.ZodTypeAny, {
4195
+ endpoint: string;
4196
+ context?: string[] | undefined;
4197
+ cache?: "session" | "none" | undefined;
4198
+ fallback?: string | undefined;
4199
+ }, {
4200
+ endpoint: string;
4201
+ context?: string[] | undefined;
4202
+ cache?: "session" | "none" | undefined;
4203
+ fallback?: string | undefined;
4204
+ }>>;
4205
+ }, "strip", z.ZodTypeAny, {
4206
+ question: string;
4207
+ answer: string | {
4208
+ type: "rich";
4209
+ html: string;
4210
+ } | {
4211
+ type: "markdown";
4212
+ content: string;
4213
+ assets?: {
4214
+ type: "image" | "video";
4215
+ id: string;
4216
+ src: string;
4217
+ height?: number | undefined;
4218
+ width?: number | undefined;
4219
+ alt?: string | undefined;
4220
+ }[] | undefined;
4221
+ };
4222
+ id: string;
4223
+ priority?: number | undefined;
4224
+ category?: string | undefined;
4225
+ answerStrategy?: {
4226
+ endpoint: string;
4227
+ context?: string[] | undefined;
4228
+ cache?: "session" | "none" | undefined;
4229
+ fallback?: string | undefined;
4230
+ } | undefined;
4231
+ }, {
4232
+ question: string;
4233
+ answer: string | {
4234
+ type: "rich";
4235
+ html: string;
4236
+ } | {
4237
+ type: "markdown";
4238
+ content: string;
4239
+ assets?: {
4240
+ type: "image" | "video";
4241
+ id: string;
4242
+ src: string;
4243
+ height?: number | undefined;
4244
+ width?: number | undefined;
4245
+ alt?: string | undefined;
4246
+ }[] | undefined;
4247
+ };
4248
+ id: string;
4249
+ priority?: number | undefined;
4250
+ category?: string | undefined;
4251
+ answerStrategy?: {
4252
+ endpoint: string;
4253
+ context?: string[] | undefined;
4254
+ cache?: "session" | "none" | undefined;
4255
+ fallback?: string | undefined;
4256
+ } | undefined;
4257
+ }>;
4258
+ /** Per-item activation strategy (null = always show) */
4259
+ showWhen: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4260
+ type: z.ZodLiteral<"rules">;
4261
+ rules: z.ZodArray<z.ZodObject<{
4262
+ conditions: z.ZodArray<z.ZodObject<{
4263
+ type: z.ZodString;
4264
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4265
+ type: z.ZodString;
4266
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4267
+ type: z.ZodString;
4268
+ }, z.ZodTypeAny, "passthrough">>, "many">;
4269
+ value: z.ZodUnknown;
4270
+ }, "strip", z.ZodTypeAny, {
4271
+ conditions: z.objectOutputType<{
4272
+ type: z.ZodString;
4273
+ }, z.ZodTypeAny, "passthrough">[];
4274
+ value?: unknown;
4275
+ }, {
4276
+ conditions: z.objectInputType<{
4277
+ type: z.ZodString;
4278
+ }, z.ZodTypeAny, "passthrough">[];
4279
+ value?: unknown;
4280
+ }>, "many">;
4281
+ default: z.ZodUnknown;
4282
+ }, "strip", z.ZodTypeAny, {
4283
+ rules: {
4284
+ conditions: z.objectOutputType<{
4285
+ type: z.ZodString;
4286
+ }, z.ZodTypeAny, "passthrough">[];
4287
+ value?: unknown;
4288
+ }[];
4289
+ type: "rules";
4290
+ default?: unknown;
4291
+ }, {
4292
+ rules: {
4293
+ conditions: z.objectInputType<{
4294
+ type: z.ZodString;
4295
+ }, z.ZodTypeAny, "passthrough">[];
4296
+ value?: unknown;
4297
+ }[];
4298
+ type: "rules";
4299
+ default?: unknown;
4300
+ }>, z.ZodObject<{
4301
+ type: z.ZodLiteral<"score">;
4302
+ field: z.ZodString;
4303
+ threshold: z.ZodNumber;
4304
+ above: z.ZodUnknown;
4305
+ below: z.ZodUnknown;
4306
+ }, "strip", z.ZodTypeAny, {
4307
+ type: "score";
4308
+ threshold: number;
4309
+ field: string;
4310
+ above?: unknown;
4311
+ below?: unknown;
4312
+ }, {
4313
+ type: "score";
4314
+ threshold: number;
4315
+ field: string;
4316
+ above?: unknown;
4317
+ below?: unknown;
4318
+ }>, z.ZodObject<{
4319
+ type: z.ZodLiteral<"model">;
4320
+ modelId: z.ZodString;
4321
+ inputs: z.ZodArray<z.ZodString, "many">;
4322
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4323
+ default: z.ZodUnknown;
4324
+ }, "strip", z.ZodTypeAny, {
4325
+ type: "model";
4326
+ modelId: string;
4327
+ inputs: string[];
4328
+ outputMapping: Record<string, unknown>;
4329
+ default?: unknown;
4330
+ }, {
4331
+ type: "model";
4332
+ modelId: string;
4333
+ inputs: string[];
4334
+ outputMapping: Record<string, unknown>;
4335
+ default?: unknown;
4336
+ }>, z.ZodObject<{
4337
+ type: z.ZodLiteral<"external">;
4338
+ endpoint: z.ZodString;
4339
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
4340
+ default: z.ZodUnknown;
4341
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
4342
+ }, "strip", z.ZodTypeAny, {
4343
+ type: "external";
4344
+ endpoint: string;
4345
+ default?: unknown;
4346
+ method?: "GET" | "POST" | undefined;
4347
+ timeoutMs?: number | undefined;
4348
+ }, {
4349
+ type: "external";
4350
+ endpoint: string;
4351
+ default?: unknown;
4352
+ method?: "GET" | "POST" | undefined;
4353
+ timeoutMs?: number | undefined;
4354
+ }>]>>>;
4355
+ }, "strip", z.ZodTypeAny, {
4356
+ config: {
4357
+ question: string;
4358
+ answer: string | {
4359
+ type: "rich";
4360
+ html: string;
4361
+ } | {
4362
+ type: "markdown";
4363
+ content: string;
4364
+ assets?: {
4365
+ type: "image" | "video";
4366
+ id: string;
4367
+ src: string;
4368
+ height?: number | undefined;
4369
+ width?: number | undefined;
4370
+ alt?: string | undefined;
4371
+ }[] | undefined;
4372
+ };
4373
+ id: string;
4374
+ priority?: number | undefined;
4375
+ category?: string | undefined;
4376
+ answerStrategy?: {
4377
+ endpoint: string;
4378
+ context?: string[] | undefined;
4379
+ cache?: "session" | "none" | undefined;
4380
+ fallback?: string | undefined;
4381
+ } | undefined;
4382
+ };
4383
+ kind: "faq:question";
4384
+ showWhen?: {
4385
+ rules: {
4386
+ conditions: z.objectOutputType<{
4387
+ type: z.ZodString;
4388
+ }, z.ZodTypeAny, "passthrough">[];
4389
+ value?: unknown;
4390
+ }[];
4391
+ type: "rules";
4392
+ default?: unknown;
4393
+ } | {
4394
+ type: "score";
4395
+ threshold: number;
4396
+ field: string;
4397
+ above?: unknown;
4398
+ below?: unknown;
4399
+ } | {
4400
+ type: "model";
4401
+ modelId: string;
4402
+ inputs: string[];
4403
+ outputMapping: Record<string, unknown>;
4404
+ default?: unknown;
4405
+ } | {
4406
+ type: "external";
4407
+ endpoint: string;
4408
+ default?: unknown;
4409
+ method?: "GET" | "POST" | undefined;
4410
+ timeoutMs?: number | undefined;
4411
+ } | null | undefined;
4412
+ }, {
4413
+ config: {
4414
+ question: string;
4415
+ answer: string | {
4416
+ type: "rich";
4417
+ html: string;
4418
+ } | {
4419
+ type: "markdown";
4420
+ content: string;
4421
+ assets?: {
4422
+ type: "image" | "video";
4423
+ id: string;
4424
+ src: string;
4425
+ height?: number | undefined;
4426
+ width?: number | undefined;
4427
+ alt?: string | undefined;
4428
+ }[] | undefined;
4429
+ };
4430
+ id: string;
4431
+ priority?: number | undefined;
4432
+ category?: string | undefined;
4433
+ answerStrategy?: {
4434
+ endpoint: string;
4435
+ context?: string[] | undefined;
4436
+ cache?: "session" | "none" | undefined;
4437
+ fallback?: string | undefined;
4438
+ } | undefined;
4439
+ };
4440
+ kind: "faq:question";
4441
+ showWhen?: {
4442
+ rules: {
4443
+ conditions: z.objectInputType<{
4444
+ type: z.ZodString;
4445
+ }, z.ZodTypeAny, "passthrough">[];
4446
+ value?: unknown;
4447
+ }[];
4448
+ type: "rules";
4449
+ default?: unknown;
4450
+ } | {
4451
+ type: "score";
4452
+ threshold: number;
4453
+ field: string;
4454
+ above?: unknown;
4455
+ below?: unknown;
4456
+ } | {
4457
+ type: "model";
4458
+ modelId: string;
4459
+ inputs: string[];
4460
+ outputMapping: Record<string, unknown>;
4461
+ default?: unknown;
4462
+ } | {
4463
+ type: "external";
4464
+ endpoint: string;
4465
+ default?: unknown;
4466
+ method?: "GET" | "POST" | undefined;
4467
+ timeoutMs?: number | undefined;
4468
+ } | null | undefined;
4469
+ }>>, "many">;
4470
+ position: z.ZodOptional<z.ZodEnum<["prepend", "append"]>>;
4471
+ once: z.ZodOptional<z.ZodBoolean>;
4472
+ }, "strip", z.ZodTypeAny, {
4473
+ items: {
4474
+ config: {
4475
+ question: string;
4476
+ answer: string | {
4477
+ type: "rich";
4478
+ html: string;
4479
+ } | {
4480
+ type: "markdown";
4481
+ content: string;
4482
+ assets?: {
4483
+ type: "image" | "video";
4484
+ id: string;
4485
+ src: string;
4486
+ height?: number | undefined;
4487
+ width?: number | undefined;
4488
+ alt?: string | undefined;
4489
+ }[] | undefined;
4490
+ };
4491
+ id: string;
4492
+ priority?: number | undefined;
4493
+ category?: string | undefined;
4494
+ answerStrategy?: {
4495
+ endpoint: string;
4496
+ context?: string[] | undefined;
4497
+ cache?: "session" | "none" | undefined;
4498
+ fallback?: string | undefined;
4499
+ } | undefined;
4500
+ };
4501
+ kind: "faq:question";
4502
+ showWhen?: {
4503
+ rules: {
4504
+ conditions: z.objectOutputType<{
4505
+ type: z.ZodString;
4506
+ }, z.ZodTypeAny, "passthrough">[];
4507
+ value?: unknown;
4508
+ }[];
4509
+ type: "rules";
4510
+ default?: unknown;
4511
+ } | {
4512
+ type: "score";
4513
+ threshold: number;
4514
+ field: string;
4515
+ above?: unknown;
4516
+ below?: unknown;
4517
+ } | {
4518
+ type: "model";
4519
+ modelId: string;
4520
+ inputs: string[];
4521
+ outputMapping: Record<string, unknown>;
4522
+ default?: unknown;
4523
+ } | {
4524
+ type: "external";
4525
+ endpoint: string;
4526
+ default?: unknown;
4527
+ method?: "GET" | "POST" | undefined;
4528
+ timeoutMs?: number | undefined;
4529
+ } | null | undefined;
4530
+ }[];
4531
+ trigger: {
4532
+ rules: {
4533
+ conditions: z.objectOutputType<{
4534
+ type: z.ZodString;
4535
+ }, z.ZodTypeAny, "passthrough">[];
4536
+ value?: unknown;
4537
+ }[];
4538
+ type: "rules";
4539
+ default?: unknown;
4540
+ } | {
4541
+ type: "score";
4542
+ threshold: number;
4543
+ field: string;
4544
+ above?: unknown;
4545
+ below?: unknown;
4546
+ } | {
4547
+ type: "model";
4548
+ modelId: string;
4549
+ inputs: string[];
4550
+ outputMapping: Record<string, unknown>;
4551
+ default?: unknown;
4552
+ } | {
4553
+ type: "external";
4554
+ endpoint: string;
4555
+ default?: unknown;
4556
+ method?: "GET" | "POST" | undefined;
4557
+ timeoutMs?: number | undefined;
4558
+ };
4559
+ position?: "prepend" | "append" | undefined;
4560
+ once?: boolean | undefined;
4561
+ }, {
4562
+ items: {
4563
+ config: {
4564
+ question: string;
4565
+ answer: string | {
4566
+ type: "rich";
4567
+ html: string;
4568
+ } | {
4569
+ type: "markdown";
4570
+ content: string;
4571
+ assets?: {
4572
+ type: "image" | "video";
4573
+ id: string;
4574
+ src: string;
4575
+ height?: number | undefined;
4576
+ width?: number | undefined;
4577
+ alt?: string | undefined;
4578
+ }[] | undefined;
4579
+ };
4580
+ id: string;
4581
+ priority?: number | undefined;
4582
+ category?: string | undefined;
4583
+ answerStrategy?: {
4584
+ endpoint: string;
4585
+ context?: string[] | undefined;
4586
+ cache?: "session" | "none" | undefined;
4587
+ fallback?: string | undefined;
4588
+ } | undefined;
4589
+ };
4590
+ kind: "faq:question";
4591
+ showWhen?: {
4592
+ rules: {
4593
+ conditions: z.objectInputType<{
4594
+ type: z.ZodString;
4595
+ }, z.ZodTypeAny, "passthrough">[];
4596
+ value?: unknown;
4597
+ }[];
4598
+ type: "rules";
4599
+ default?: unknown;
4600
+ } | {
4601
+ type: "score";
4602
+ threshold: number;
4603
+ field: string;
4604
+ above?: unknown;
4605
+ below?: unknown;
4606
+ } | {
4607
+ type: "model";
4608
+ modelId: string;
4609
+ inputs: string[];
4610
+ outputMapping: Record<string, unknown>;
4611
+ default?: unknown;
4612
+ } | {
4613
+ type: "external";
4614
+ endpoint: string;
4615
+ default?: unknown;
4616
+ method?: "GET" | "POST" | undefined;
4617
+ timeoutMs?: number | undefined;
4618
+ } | null | undefined;
4619
+ }[];
4620
+ trigger: {
4621
+ rules: {
4622
+ conditions: z.objectInputType<{
4623
+ type: z.ZodString;
4624
+ }, z.ZodTypeAny, "passthrough">[];
4625
+ value?: unknown;
4626
+ }[];
4627
+ type: "rules";
4628
+ default?: unknown;
4629
+ } | {
4630
+ type: "score";
4631
+ threshold: number;
4632
+ field: string;
4633
+ above?: unknown;
4634
+ below?: unknown;
4635
+ } | {
4636
+ type: "model";
4637
+ modelId: string;
4638
+ inputs: string[];
4639
+ outputMapping: Record<string, unknown>;
4640
+ default?: unknown;
4641
+ } | {
4642
+ type: "external";
4643
+ endpoint: string;
4644
+ default?: unknown;
4645
+ method?: "GET" | "POST" | undefined;
4646
+ timeoutMs?: number | undefined;
4647
+ };
4648
+ position?: "prepend" | "append" | undefined;
4649
+ once?: boolean | undefined;
4650
+ }>, "many">>;
4651
+ /** Event scope for the FAQ widget */
4652
+ scope: z.ZodOptional<z.ZodObject<{
4653
+ events: z.ZodArray<z.ZodString, "many">;
4654
+ urlContains: z.ZodOptional<z.ZodString>;
4655
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
4656
+ }, "strip", z.ZodTypeAny, {
4657
+ events: string[];
4658
+ urlContains?: string | undefined;
4659
+ props?: Record<string, string | number | boolean> | undefined;
4660
+ }, {
4661
+ events: string[];
4662
+ urlContains?: string | undefined;
4663
+ props?: Record<string, string | number | boolean> | undefined;
4664
+ }>>;
4665
+ }, "strip", z.ZodTypeAny, {
4666
+ theme: "light" | "dark" | "auto";
4667
+ searchable: boolean;
4668
+ expandBehavior: "single" | "multiple";
4669
+ actions: {
4670
+ config: {
4671
+ question: string;
4672
+ answer: string | {
4673
+ type: "rich";
4674
+ html: string;
4675
+ } | {
4676
+ type: "markdown";
4677
+ content: string;
4678
+ assets?: {
4679
+ type: "image" | "video";
4680
+ id: string;
4681
+ src: string;
4682
+ height?: number | undefined;
4683
+ width?: number | undefined;
4684
+ alt?: string | undefined;
4685
+ }[] | undefined;
4686
+ };
4687
+ id: string;
4688
+ priority?: number | undefined;
4689
+ category?: string | undefined;
4690
+ answerStrategy?: {
4691
+ endpoint: string;
4692
+ context?: string[] | undefined;
4693
+ cache?: "session" | "none" | undefined;
4694
+ fallback?: string | undefined;
4695
+ } | undefined;
4696
+ };
4697
+ kind: "faq:question";
4698
+ showWhen?: {
4699
+ rules: {
4700
+ conditions: z.objectOutputType<{
4701
+ type: z.ZodString;
4702
+ }, z.ZodTypeAny, "passthrough">[];
4703
+ value?: unknown;
4704
+ }[];
4705
+ type: "rules";
4706
+ default?: unknown;
4707
+ } | {
4708
+ type: "score";
4709
+ threshold: number;
4710
+ field: string;
4711
+ above?: unknown;
4712
+ below?: unknown;
4713
+ } | {
4714
+ type: "model";
4715
+ modelId: string;
4716
+ inputs: string[];
4717
+ outputMapping: Record<string, unknown>;
4718
+ default?: unknown;
4719
+ } | {
4720
+ type: "external";
4721
+ endpoint: string;
4722
+ default?: unknown;
4723
+ method?: "GET" | "POST" | undefined;
4724
+ timeoutMs?: number | undefined;
4725
+ } | null | undefined;
4726
+ }[];
4727
+ feedback?: boolean | {
4728
+ style: "thumbs" | "rating";
4729
+ prompt?: string | undefined;
4730
+ } | undefined;
4731
+ ordering?: "static" | "priority" | {
4732
+ type: "segment";
4733
+ segmentWeights: Record<string, string[]>;
4734
+ } | undefined;
4735
+ injections?: {
4736
+ items: {
4737
+ config: {
4738
+ question: string;
4739
+ answer: string | {
4740
+ type: "rich";
4741
+ html: string;
4742
+ } | {
4743
+ type: "markdown";
4744
+ content: string;
4745
+ assets?: {
4746
+ type: "image" | "video";
4747
+ id: string;
4748
+ src: string;
4749
+ height?: number | undefined;
4750
+ width?: number | undefined;
4751
+ alt?: string | undefined;
4752
+ }[] | undefined;
4753
+ };
4754
+ id: string;
4755
+ priority?: number | undefined;
4756
+ category?: string | undefined;
4757
+ answerStrategy?: {
4758
+ endpoint: string;
4759
+ context?: string[] | undefined;
4760
+ cache?: "session" | "none" | undefined;
4761
+ fallback?: string | undefined;
4762
+ } | undefined;
4763
+ };
4764
+ kind: "faq:question";
4765
+ showWhen?: {
4766
+ rules: {
4767
+ conditions: z.objectOutputType<{
4768
+ type: z.ZodString;
4769
+ }, z.ZodTypeAny, "passthrough">[];
4770
+ value?: unknown;
4771
+ }[];
4772
+ type: "rules";
4773
+ default?: unknown;
4774
+ } | {
4775
+ type: "score";
4776
+ threshold: number;
4777
+ field: string;
4778
+ above?: unknown;
4779
+ below?: unknown;
4780
+ } | {
4781
+ type: "model";
4782
+ modelId: string;
4783
+ inputs: string[];
4784
+ outputMapping: Record<string, unknown>;
4785
+ default?: unknown;
4786
+ } | {
4787
+ type: "external";
4788
+ endpoint: string;
4789
+ default?: unknown;
4790
+ method?: "GET" | "POST" | undefined;
4791
+ timeoutMs?: number | undefined;
4792
+ } | null | undefined;
4793
+ }[];
4794
+ trigger: {
4795
+ rules: {
4796
+ conditions: z.objectOutputType<{
4797
+ type: z.ZodString;
4798
+ }, z.ZodTypeAny, "passthrough">[];
4799
+ value?: unknown;
4800
+ }[];
4801
+ type: "rules";
4802
+ default?: unknown;
4803
+ } | {
4804
+ type: "score";
4805
+ threshold: number;
4806
+ field: string;
4807
+ above?: unknown;
4808
+ below?: unknown;
4809
+ } | {
4810
+ type: "model";
4811
+ modelId: string;
4812
+ inputs: string[];
4813
+ outputMapping: Record<string, unknown>;
4814
+ default?: unknown;
4815
+ } | {
4816
+ type: "external";
4817
+ endpoint: string;
4818
+ default?: unknown;
4819
+ method?: "GET" | "POST" | undefined;
4820
+ timeoutMs?: number | undefined;
4821
+ };
4822
+ position?: "prepend" | "append" | undefined;
4823
+ once?: boolean | undefined;
4824
+ }[] | undefined;
4825
+ scope?: {
4826
+ events: string[];
4827
+ urlContains?: string | undefined;
4828
+ props?: Record<string, string | number | boolean> | undefined;
4829
+ } | undefined;
4830
+ title?: string | undefined;
4831
+ }, {
4832
+ theme?: "light" | "dark" | "auto" | undefined;
4833
+ searchable?: boolean | undefined;
4834
+ expandBehavior?: "single" | "multiple" | undefined;
4835
+ actions?: {
4836
+ config: {
4837
+ question: string;
4838
+ answer: string | {
4839
+ type: "rich";
4840
+ html: string;
4841
+ } | {
4842
+ type: "markdown";
4843
+ content: string;
4844
+ assets?: {
4845
+ type: "image" | "video";
4846
+ id: string;
4847
+ src: string;
4848
+ height?: number | undefined;
4849
+ width?: number | undefined;
4850
+ alt?: string | undefined;
4851
+ }[] | undefined;
4852
+ };
4853
+ id: string;
4854
+ priority?: number | undefined;
4855
+ category?: string | undefined;
4856
+ answerStrategy?: {
4857
+ endpoint: string;
4858
+ context?: string[] | undefined;
4859
+ cache?: "session" | "none" | undefined;
4860
+ fallback?: string | undefined;
4861
+ } | undefined;
4862
+ };
4863
+ kind: "faq:question";
4864
+ showWhen?: {
4865
+ rules: {
4866
+ conditions: z.objectInputType<{
4867
+ type: z.ZodString;
4868
+ }, z.ZodTypeAny, "passthrough">[];
4869
+ value?: unknown;
4870
+ }[];
4871
+ type: "rules";
4872
+ default?: unknown;
4873
+ } | {
4874
+ type: "score";
4875
+ threshold: number;
4876
+ field: string;
4877
+ above?: unknown;
4878
+ below?: unknown;
4879
+ } | {
4880
+ type: "model";
4881
+ modelId: string;
4882
+ inputs: string[];
4883
+ outputMapping: Record<string, unknown>;
4884
+ default?: unknown;
4885
+ } | {
4886
+ type: "external";
4887
+ endpoint: string;
4888
+ default?: unknown;
4889
+ method?: "GET" | "POST" | undefined;
4890
+ timeoutMs?: number | undefined;
4891
+ } | null | undefined;
4892
+ }[] | undefined;
4893
+ feedback?: boolean | {
4894
+ style: "thumbs" | "rating";
4895
+ prompt?: string | undefined;
4896
+ } | undefined;
4897
+ ordering?: "static" | "priority" | {
4898
+ type: "segment";
4899
+ segmentWeights: Record<string, string[]>;
4900
+ } | undefined;
4901
+ injections?: {
4902
+ items: {
4903
+ config: {
4904
+ question: string;
4905
+ answer: string | {
4906
+ type: "rich";
4907
+ html: string;
4908
+ } | {
4909
+ type: "markdown";
4910
+ content: string;
4911
+ assets?: {
4912
+ type: "image" | "video";
4913
+ id: string;
4914
+ src: string;
4915
+ height?: number | undefined;
4916
+ width?: number | undefined;
4917
+ alt?: string | undefined;
4918
+ }[] | undefined;
4919
+ };
4920
+ id: string;
4921
+ priority?: number | undefined;
4922
+ category?: string | undefined;
4923
+ answerStrategy?: {
4924
+ endpoint: string;
4925
+ context?: string[] | undefined;
4926
+ cache?: "session" | "none" | undefined;
4927
+ fallback?: string | undefined;
4928
+ } | undefined;
4929
+ };
4930
+ kind: "faq:question";
4931
+ showWhen?: {
4932
+ rules: {
4933
+ conditions: z.objectInputType<{
4934
+ type: z.ZodString;
4935
+ }, z.ZodTypeAny, "passthrough">[];
4936
+ value?: unknown;
4937
+ }[];
4938
+ type: "rules";
4939
+ default?: unknown;
4940
+ } | {
4941
+ type: "score";
4942
+ threshold: number;
4943
+ field: string;
4944
+ above?: unknown;
4945
+ below?: unknown;
4946
+ } | {
4947
+ type: "model";
4948
+ modelId: string;
4949
+ inputs: string[];
4950
+ outputMapping: Record<string, unknown>;
4951
+ default?: unknown;
4952
+ } | {
4953
+ type: "external";
4954
+ endpoint: string;
4955
+ default?: unknown;
4956
+ method?: "GET" | "POST" | undefined;
4957
+ timeoutMs?: number | undefined;
4958
+ } | null | undefined;
4959
+ }[];
4960
+ trigger: {
4961
+ rules: {
4962
+ conditions: z.objectInputType<{
4963
+ type: z.ZodString;
4964
+ }, z.ZodTypeAny, "passthrough">[];
4965
+ value?: unknown;
4966
+ }[];
4967
+ type: "rules";
4968
+ default?: unknown;
4969
+ } | {
4970
+ type: "score";
4971
+ threshold: number;
4972
+ field: string;
4973
+ above?: unknown;
4974
+ below?: unknown;
4975
+ } | {
4976
+ type: "model";
4977
+ modelId: string;
4978
+ inputs: string[];
4979
+ outputMapping: Record<string, unknown>;
4980
+ default?: unknown;
4981
+ } | {
4982
+ type: "external";
4983
+ endpoint: string;
4984
+ default?: unknown;
4985
+ method?: "GET" | "POST" | undefined;
4986
+ timeoutMs?: number | undefined;
4987
+ };
4988
+ position?: "prepend" | "append" | undefined;
4989
+ once?: boolean | undefined;
4990
+ }[] | undefined;
4991
+ scope?: {
4992
+ events: string[];
4993
+ urlContains?: string | undefined;
4994
+ props?: Record<string, string | number | boolean> | undefined;
4995
+ } | undefined;
4996
+ title?: string | undefined;
4997
+ }>;
4998
+ }[];
2698
4999
  //# sourceMappingURL=schema.d.ts.map