@syntrologie/adapt-chatbot 2.8.0-canary.43 → 2.8.0-canary.430

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 (178) hide show
  1. package/dist/AdaptiveChatBar.d.ts +175 -0
  2. package/dist/AdaptiveChatBar.d.ts.map +1 -0
  3. package/dist/AdaptiveChatBar.js +11 -0
  4. package/dist/AdaptiveChatBar.js.map +7 -0
  5. package/dist/AdaptiveChatBarMountable.d.ts +80 -0
  6. package/dist/AdaptiveChatBarMountable.d.ts.map +1 -0
  7. package/dist/AdaptiveChatTrail.anchor-scroll.test.d.ts +2 -0
  8. package/dist/AdaptiveChatTrail.anchor-scroll.test.d.ts.map +1 -0
  9. package/dist/AdaptiveChatTrail.d.ts +415 -0
  10. package/dist/AdaptiveChatTrail.d.ts.map +1 -0
  11. package/dist/AdaptiveChatTrail.js +11 -0
  12. package/dist/AdaptiveChatTrail.js.map +7 -0
  13. package/dist/AdaptiveChatTrail.test.d.ts +2 -0
  14. package/dist/AdaptiveChatTrail.test.d.ts.map +1 -0
  15. package/dist/AdaptiveChipsStrip.d.ts +1150 -0
  16. package/dist/AdaptiveChipsStrip.d.ts.map +1 -0
  17. package/dist/AdaptiveChipsStrip.js +11 -0
  18. package/dist/AdaptiveChipsStrip.js.map +7 -0
  19. package/dist/AdaptiveChipsStripMountable.d.ts +24 -0
  20. package/dist/AdaptiveChipsStripMountable.d.ts.map +1 -0
  21. package/dist/ChatAssistantLit.d.ts +60 -0
  22. package/dist/ChatAssistantLit.d.ts.map +1 -0
  23. package/dist/ChatAssistantLit.js +13 -0
  24. package/dist/ChatAssistantLit.js.map +7 -0
  25. package/dist/ChatSession.d.ts +230 -0
  26. package/dist/ChatSession.d.ts.map +1 -0
  27. package/dist/ChatTransport.d.ts +360 -0
  28. package/dist/ChatTransport.d.ts.map +1 -0
  29. package/dist/InlineRegistryWidgetMount.test.d.ts +2 -0
  30. package/dist/InlineRegistryWidgetMount.test.d.ts.map +1 -0
  31. package/dist/InlineWidgetLiveMount.test.d.ts +2 -0
  32. package/dist/InlineWidgetLiveMount.test.d.ts.map +1 -0
  33. package/dist/NavLinkMountable.d.ts +25 -0
  34. package/dist/NavLinkMountable.d.ts.map +1 -0
  35. package/dist/NavLinkMountable.test.d.ts +2 -0
  36. package/dist/NavLinkMountable.test.d.ts.map +1 -0
  37. package/dist/TextAnswerMountable.d.ts +17 -0
  38. package/dist/TextAnswerMountable.d.ts.map +1 -0
  39. package/dist/TextAnswerMountable.test.d.ts +2 -0
  40. package/dist/TextAnswerMountable.test.d.ts.map +1 -0
  41. package/dist/Turnstile.d.ts +83 -0
  42. package/dist/Turnstile.d.ts.map +1 -0
  43. package/dist/cdn.d.ts +2 -6
  44. package/dist/cdn.d.ts.map +1 -1
  45. package/dist/chunk-5W75LR6M.js +460 -0
  46. package/dist/chunk-5W75LR6M.js.map +7 -0
  47. package/dist/chunk-7WSMNAKW.js +3824 -0
  48. package/dist/chunk-7WSMNAKW.js.map +7 -0
  49. package/dist/chunk-EWPPVPJ4.js +14 -0
  50. package/dist/chunk-EWPPVPJ4.js.map +7 -0
  51. package/dist/chunk-GP4OSTZT.js +641 -0
  52. package/dist/chunk-GP4OSTZT.js.map +7 -0
  53. package/dist/chunk-HELUC5JI.js +8971 -0
  54. package/dist/chunk-HELUC5JI.js.map +7 -0
  55. package/dist/chunk-HVGQJZMP.js +1520 -0
  56. package/dist/chunk-HVGQJZMP.js.map +7 -0
  57. package/dist/chunk-KPWW7N27.js +235 -0
  58. package/dist/chunk-KPWW7N27.js.map +7 -0
  59. package/dist/chunk-UVKRO5ER.js +13 -0
  60. package/dist/chunk-UVKRO5ER.js.map +7 -0
  61. package/dist/editor-lit.d.ts +37 -0
  62. package/dist/editor-lit.d.ts.map +1 -0
  63. package/dist/editor-lit.js +134 -0
  64. package/dist/editor-lit.js.map +7 -0
  65. package/dist/elements/ActionHandler.d.ts +34 -0
  66. package/dist/elements/ActionHandler.d.ts.map +1 -0
  67. package/dist/elements/ElementInstanceStore.d.ts +207 -0
  68. package/dist/elements/ElementInstanceStore.d.ts.map +1 -0
  69. package/dist/elements/ElementInstanceStore.test.d.ts +2 -0
  70. package/dist/elements/ElementInstanceStore.test.d.ts.map +1 -0
  71. package/dist/elements/ElementTypeHandler.d.ts +77 -0
  72. package/dist/elements/ElementTypeHandler.d.ts.map +1 -0
  73. package/dist/elements/ItemHandler.d.ts +60 -0
  74. package/dist/elements/ItemHandler.d.ts.map +1 -0
  75. package/dist/elements/ItemHandler.test.d.ts +2 -0
  76. package/dist/elements/ItemHandler.test.d.ts.map +1 -0
  77. package/dist/elements/TileHandler.d.ts +52 -0
  78. package/dist/elements/TileHandler.d.ts.map +1 -0
  79. package/dist/elements/TileHandler.test.d.ts +2 -0
  80. package/dist/elements/TileHandler.test.d.ts.map +1 -0
  81. package/dist/elements/__tests__/ElementInstanceStore.recall.test.d.ts +2 -0
  82. package/dist/elements/__tests__/ElementInstanceStore.recall.test.d.ts.map +1 -0
  83. package/dist/elements/blockRenderer.d.ts +46 -0
  84. package/dist/elements/blockRenderer.d.ts.map +1 -0
  85. package/dist/elements/blockRenderer.test.d.ts +13 -0
  86. package/dist/elements/blockRenderer.test.d.ts.map +1 -0
  87. package/dist/elements/blocks.d.ts +58 -0
  88. package/dist/elements/blocks.d.ts.map +1 -0
  89. package/dist/elements/envelope.d.ts +24 -0
  90. package/dist/elements/envelope.d.ts.map +1 -0
  91. package/dist/elements/fetcher.d.ts +40 -0
  92. package/dist/elements/fetcher.d.ts.map +1 -0
  93. package/dist/elements/index.d.ts +33 -0
  94. package/dist/elements/index.d.ts.map +1 -0
  95. package/dist/elements/store-singleton.d.ts +4 -0
  96. package/dist/elements/store-singleton.d.ts.map +1 -0
  97. package/dist/elements/types.d.ts +106 -0
  98. package/dist/elements/types.d.ts.map +1 -0
  99. package/dist/observer/__tests__/allowlist.test.d.ts +9 -0
  100. package/dist/observer/__tests__/allowlist.test.d.ts.map +1 -0
  101. package/dist/observer/__tests__/bus-translate.test.d.ts +16 -0
  102. package/dist/observer/__tests__/bus-translate.test.d.ts.map +1 -0
  103. package/dist/observer/__tests__/lifecycle.test.d.ts +2 -0
  104. package/dist/observer/__tests__/lifecycle.test.d.ts.map +1 -0
  105. package/dist/observer/__tests__/observer-enrich.test.d.ts +10 -0
  106. package/dist/observer/__tests__/observer-enrich.test.d.ts.map +1 -0
  107. package/dist/observer/__tests__/observer-isolation.test.d.ts +13 -0
  108. package/dist/observer/__tests__/observer-isolation.test.d.ts.map +1 -0
  109. package/dist/observer/__tests__/queue.test.d.ts +2 -0
  110. package/dist/observer/__tests__/queue.test.d.ts.map +1 -0
  111. package/dist/observer/__tests__/transport.test.d.ts +2 -0
  112. package/dist/observer/__tests__/transport.test.d.ts.map +1 -0
  113. package/dist/observer/allowlist.d.ts +30 -0
  114. package/dist/observer/allowlist.d.ts.map +1 -0
  115. package/dist/observer/bus-translate.d.ts +33 -0
  116. package/dist/observer/bus-translate.d.ts.map +1 -0
  117. package/dist/observer/index.d.ts +44 -0
  118. package/dist/observer/index.d.ts.map +1 -0
  119. package/dist/observer/queue.d.ts +63 -0
  120. package/dist/observer/queue.d.ts.map +1 -0
  121. package/dist/observer/transport.d.ts +27 -0
  122. package/dist/observer/transport.d.ts.map +1 -0
  123. package/dist/runtime-lit.d.ts +8 -0
  124. package/dist/runtime-lit.d.ts.map +1 -0
  125. package/dist/runtime.d.ts +10 -3
  126. package/dist/runtime.d.ts.map +1 -1
  127. package/dist/runtime.js +2232 -29
  128. package/dist/runtime.js.map +7 -0
  129. package/dist/schema.d.ts +3340 -11
  130. package/dist/schema.d.ts.map +1 -1
  131. package/dist/schema.js +220 -31
  132. package/dist/schema.js.map +7 -0
  133. package/dist/test/setup.d.ts +1 -0
  134. package/dist/test/setup.d.ts.map +1 -0
  135. package/dist/types.d.ts +61 -40
  136. package/dist/types.d.ts.map +1 -1
  137. package/package.json +44 -23
  138. package/dist/ChatAssistant.d.ts +0 -18
  139. package/dist/ChatAssistant.d.ts.map +0 -1
  140. package/dist/ChatAssistant.js +0 -178
  141. package/dist/SyntroChatbot.d.ts +0 -14
  142. package/dist/SyntroChatbot.d.ts.map +0 -1
  143. package/dist/SyntroChatbot.js +0 -56
  144. package/dist/actionParser.d.ts +0 -15
  145. package/dist/actionParser.d.ts.map +0 -1
  146. package/dist/actionParser.js +0 -52
  147. package/dist/apiClient.d.ts +0 -23
  148. package/dist/apiClient.d.ts.map +0 -1
  149. package/dist/apiClient.js +0 -51
  150. package/dist/cdn.js +0 -37
  151. package/dist/editor.d.ts +0 -17
  152. package/dist/editor.d.ts.map +0 -1
  153. package/dist/editor.js +0 -36
  154. package/dist/tools/bridge.d.ts +0 -26
  155. package/dist/tools/bridge.d.ts.map +0 -1
  156. package/dist/tools/bridge.js +0 -25
  157. package/dist/tools/expanders.d.ts +0 -17
  158. package/dist/tools/expanders.d.ts.map +0 -1
  159. package/dist/tools/expanders.js +0 -41
  160. package/dist/tools/index.d.ts +0 -14
  161. package/dist/tools/index.d.ts.map +0 -1
  162. package/dist/tools/index.js +0 -11
  163. package/dist/tools/registrations/GetContextTool.d.ts +0 -7
  164. package/dist/tools/registrations/GetContextTool.d.ts.map +0 -1
  165. package/dist/tools/registrations/GetContextTool.js +0 -18
  166. package/dist/tools/registrations/ScrollToTool.d.ts +0 -7
  167. package/dist/tools/registrations/ScrollToTool.d.ts.map +0 -1
  168. package/dist/tools/registrations/ScrollToTool.js +0 -38
  169. package/dist/tools/registrations/ShowOverlayTool.d.ts +0 -7
  170. package/dist/tools/registrations/ShowOverlayTool.d.ts.map +0 -1
  171. package/dist/tools/registrations/ShowOverlayTool.js +0 -47
  172. package/dist/tools/registrations/index.d.ts +0 -19
  173. package/dist/tools/registrations/index.d.ts.map +0 -1
  174. package/dist/tools/registrations/index.js +0 -7
  175. package/dist/types.js +0 -6
  176. package/dist/useChat.d.ts +0 -25
  177. package/dist/useChat.d.ts.map +0 -1
  178. package/dist/useChat.js +0 -106
package/dist/schema.d.ts CHANGED
@@ -5,64 +5,3393 @@
5
5
  */
6
6
  import { z } from 'zod';
7
7
  export declare const configSchema: z.ZodObject<{
8
- /** Backend URL for the chat API endpoint */
9
- backendUrl: z.ZodString;
8
+ /** Backend URL for the chat API endpoint. "" for same-origin, or an absolute http(s):// URL. */
9
+ backendUrl: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
10
10
  /** MLflow run ID for experiment tracking */
11
11
  mlflowRunId: z.ZodOptional<z.ZodString>;
12
12
  /** Greeting message shown when the chat opens */
13
13
  greeting: z.ZodDefault<z.ZodString>;
14
14
  /** Maximum number of history messages sent to the backend */
15
15
  maxHistory: z.ZodDefault<z.ZodNumber>;
16
+ /** Quick-reply suggestions shown in the empty state */
17
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
18
+ /**
19
+ * Per-customer fallback card rendered when chat can't open (Turnstile
20
+ * failure, network error, etc.). The end-user is redirected to the
21
+ * customer's normal support path — no Cloudflare-branded challenge is
22
+ * ever shown.
23
+ */
24
+ fallback: z.ZodOptional<z.ZodObject<{
25
+ /** Header shown on the fallback card. Defaults to a generic "unavailable" copy. */
26
+ title: z.ZodOptional<z.ZodString>;
27
+ /** Body copy explaining the situation in the customer's voice. */
28
+ message: z.ZodOptional<z.ZodString>;
29
+ /** Label for the call-to-action link. If `ctaHref` is set this should be too. */
30
+ ctaLabel: z.ZodOptional<z.ZodString>;
31
+ /** Target of the CTA link — typically the customer's existing support path. */
32
+ ctaHref: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
33
+ }, "strict", z.ZodTypeAny, {
34
+ message?: string | undefined;
35
+ title?: string | undefined;
36
+ ctaLabel?: string | undefined;
37
+ ctaHref?: string | undefined;
38
+ }, {
39
+ message?: string | undefined;
40
+ title?: string | undefined;
41
+ ctaLabel?: string | undefined;
42
+ ctaHref?: string | undefined;
43
+ }>>;
16
44
  }, "strip", z.ZodTypeAny, {
17
- backendUrl: string;
18
45
  greeting: string;
46
+ backendUrl: string;
19
47
  maxHistory: number;
20
48
  mlflowRunId?: string | undefined;
49
+ suggestions?: string[] | undefined;
50
+ fallback?: {
51
+ message?: string | undefined;
52
+ title?: string | undefined;
53
+ ctaLabel?: string | undefined;
54
+ ctaHref?: string | undefined;
55
+ } | undefined;
21
56
  }, {
22
57
  backendUrl: string;
23
58
  greeting?: string | undefined;
24
- maxHistory?: number | undefined;
25
59
  mlflowRunId?: string | undefined;
60
+ maxHistory?: number | undefined;
61
+ suggestions?: string[] | undefined;
62
+ fallback?: {
63
+ message?: string | undefined;
64
+ title?: string | undefined;
65
+ ctaLabel?: string | undefined;
66
+ ctaHref?: string | undefined;
67
+ } | undefined;
26
68
  }>;
27
69
  export type ChatbotConfigSchema = z.infer<typeof configSchema>;
28
70
  export declare function validateChatbotConfig(data: unknown): z.SafeParseReturnType<{
29
71
  backendUrl: string;
30
72
  greeting?: string | undefined;
31
- maxHistory?: number | undefined;
32
73
  mlflowRunId?: string | undefined;
74
+ maxHistory?: number | undefined;
75
+ suggestions?: string[] | undefined;
76
+ fallback?: {
77
+ message?: string | undefined;
78
+ title?: string | undefined;
79
+ ctaLabel?: string | undefined;
80
+ ctaHref?: string | undefined;
81
+ } | undefined;
33
82
  }, {
34
- backendUrl: string;
35
83
  greeting: string;
84
+ backendUrl: string;
36
85
  maxHistory: number;
37
86
  mlflowRunId?: string | undefined;
87
+ suggestions?: string[] | undefined;
88
+ fallback?: {
89
+ message?: string | undefined;
90
+ title?: string | undefined;
91
+ ctaLabel?: string | undefined;
92
+ ctaHref?: string | undefined;
93
+ } | undefined;
94
+ }>;
95
+ /**
96
+ * Props schema for the `adaptive-chatbot:chat-bar` widget. This is the
97
+ * headless chat-input shell — no transport, no message persistence.
98
+ * Customers wire `chat-message-sent` / `chat-interrupt` / `canvas-close`
99
+ * to their own pipeline.
100
+ *
101
+ * All fields are optional: the bar renders an empty trail + send-only
102
+ * placeholder if nothing is passed. Authors who want a stateful chat
103
+ * use `adaptive-chatbot:assistant` instead.
104
+ */
105
+ export declare const chatBarPropsSchema: z.ZodObject<{
106
+ placeholder: z.ZodOptional<z.ZodString>;
107
+ assistantName: z.ZodOptional<z.ZodString>;
108
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
109
+ id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
110
+ role: z.ZodEnum<["user", "assistant"]>;
111
+ text: z.ZodString;
112
+ }, "strip", z.ZodTypeAny, {
113
+ id: string | number;
114
+ text: string;
115
+ role: "user" | "assistant";
116
+ }, {
117
+ id: string | number;
118
+ text: string;
119
+ role: "user" | "assistant";
120
+ }>, "many">>;
121
+ inFlight: z.ZodOptional<z.ZodBoolean>;
122
+ forceExpanded: z.ZodOptional<z.ZodBoolean>;
123
+ backendUrl: z.ZodOptional<z.ZodString>;
124
+ greeting: z.ZodOptional<z.ZodString>;
125
+ introSuggestion: z.ZodOptional<z.ZodObject<{
126
+ label: z.ZodString;
127
+ prompt: z.ZodString;
128
+ }, "strip", z.ZodTypeAny, {
129
+ label: string;
130
+ prompt: string;
131
+ }, {
132
+ label: string;
133
+ prompt: string;
134
+ }>>;
135
+ fallback: z.ZodOptional<z.ZodObject<{
136
+ title: z.ZodOptional<z.ZodString>;
137
+ message: z.ZodOptional<z.ZodString>;
138
+ ctaLabel: z.ZodOptional<z.ZodString>;
139
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
140
+ title: z.ZodOptional<z.ZodString>;
141
+ message: z.ZodOptional<z.ZodString>;
142
+ ctaLabel: z.ZodOptional<z.ZodString>;
143
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
144
+ title: z.ZodOptional<z.ZodString>;
145
+ message: z.ZodOptional<z.ZodString>;
146
+ ctaLabel: z.ZodOptional<z.ZodString>;
147
+ }, z.ZodTypeAny, "passthrough">>>;
148
+ elementsEnabled: z.ZodOptional<z.ZodBoolean>;
149
+ uiTemplates: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>;
150
+ }, "strict", z.ZodTypeAny, {
151
+ messages?: {
152
+ id: string | number;
153
+ text: string;
154
+ role: "user" | "assistant";
155
+ }[] | undefined;
156
+ greeting?: string | undefined;
157
+ forceExpanded?: boolean | undefined;
158
+ inFlight?: boolean | undefined;
159
+ introSuggestion?: {
160
+ label: string;
161
+ prompt: string;
162
+ } | undefined;
163
+ placeholder?: string | undefined;
164
+ assistantName?: string | undefined;
165
+ backendUrl?: string | undefined;
166
+ fallback?: z.objectOutputType<{
167
+ title: z.ZodOptional<z.ZodString>;
168
+ message: z.ZodOptional<z.ZodString>;
169
+ ctaLabel: z.ZodOptional<z.ZodString>;
170
+ }, z.ZodTypeAny, "passthrough"> | undefined;
171
+ elementsEnabled?: boolean | undefined;
172
+ uiTemplates?: Record<string, unknown> | undefined;
173
+ }, {
174
+ messages?: {
175
+ id: string | number;
176
+ text: string;
177
+ role: "user" | "assistant";
178
+ }[] | undefined;
179
+ greeting?: string | undefined;
180
+ forceExpanded?: boolean | undefined;
181
+ inFlight?: boolean | undefined;
182
+ introSuggestion?: {
183
+ label: string;
184
+ prompt: string;
185
+ } | undefined;
186
+ placeholder?: string | undefined;
187
+ assistantName?: string | undefined;
188
+ backendUrl?: string | undefined;
189
+ fallback?: z.objectInputType<{
190
+ title: z.ZodOptional<z.ZodString>;
191
+ message: z.ZodOptional<z.ZodString>;
192
+ ctaLabel: z.ZodOptional<z.ZodString>;
193
+ }, z.ZodTypeAny, "passthrough"> | undefined;
194
+ elementsEnabled?: boolean | undefined;
195
+ uiTemplates?: Record<string, unknown> | undefined;
196
+ }>;
197
+ export type ChatBarProps = z.infer<typeof chatBarPropsSchema>;
198
+ /**
199
+ * Props schema for the `adaptive-chatbot:chips-strip` widget. Chips
200
+ * follow the compositional-action shape (see SuggestionChipSchema in
201
+ * AdaptiveChipsStrip.ts) — same pattern as faq:question.
202
+ */
203
+ export declare const chipsStripPropsSchema: z.ZodObject<{
204
+ chips: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
205
+ kind: z.ZodLiteral<"suggestions:chip">;
206
+ config: z.ZodObject<{
207
+ id: z.ZodString;
208
+ title: z.ZodString;
209
+ payload: z.ZodObject<{
210
+ widget: z.ZodString;
211
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
212
+ }, "strict", z.ZodTypeAny, {
213
+ widget: string;
214
+ props?: Record<string, unknown> | undefined;
215
+ }, {
216
+ widget: string;
217
+ props?: Record<string, unknown> | undefined;
218
+ }>;
219
+ }, "strip", z.ZodTypeAny, {
220
+ id: string;
221
+ title: string;
222
+ payload: {
223
+ widget: string;
224
+ props?: Record<string, unknown> | undefined;
225
+ };
226
+ }, {
227
+ id: string;
228
+ title: string;
229
+ payload: {
230
+ widget: string;
231
+ props?: Record<string, unknown> | undefined;
232
+ };
233
+ }>;
234
+ triggerWhen: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
235
+ type: z.ZodLiteral<"rules">;
236
+ rules: z.ZodArray<z.ZodObject<{
237
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
238
+ type: z.ZodLiteral<"page_url">;
239
+ url: z.ZodString;
240
+ }, "strip", z.ZodTypeAny, {
241
+ type: "page_url";
242
+ url: string;
243
+ }, {
244
+ type: "page_url";
245
+ url: string;
246
+ }>, z.ZodObject<{
247
+ type: z.ZodLiteral<"route">;
248
+ routeId: z.ZodString;
249
+ }, "strip", z.ZodTypeAny, {
250
+ type: "route";
251
+ routeId: string;
252
+ }, {
253
+ type: "route";
254
+ routeId: string;
255
+ }>, z.ZodObject<{
256
+ type: z.ZodLiteral<"anchor_visible">;
257
+ anchorId: z.ZodString;
258
+ state: z.ZodEnum<["visible", "present", "absent"]>;
259
+ }, "strip", z.ZodTypeAny, {
260
+ type: "anchor_visible";
261
+ anchorId: string;
262
+ state: "visible" | "present" | "absent";
263
+ }, {
264
+ type: "anchor_visible";
265
+ anchorId: string;
266
+ state: "visible" | "present" | "absent";
267
+ }>, z.ZodObject<{
268
+ type: z.ZodLiteral<"event_occurred">;
269
+ eventName: z.ZodString;
270
+ withinMs: z.ZodOptional<z.ZodNumber>;
271
+ }, "strip", z.ZodTypeAny, {
272
+ type: "event_occurred";
273
+ eventName: string;
274
+ withinMs?: number | undefined;
275
+ }, {
276
+ type: "event_occurred";
277
+ eventName: string;
278
+ withinMs?: number | undefined;
279
+ }>, z.ZodObject<{
280
+ type: z.ZodLiteral<"state_equals">;
281
+ key: z.ZodString;
282
+ value: z.ZodUnknown;
283
+ }, "strip", z.ZodTypeAny, {
284
+ type: "state_equals";
285
+ key: string;
286
+ value?: unknown;
287
+ }, {
288
+ type: "state_equals";
289
+ key: string;
290
+ value?: unknown;
291
+ }>, z.ZodObject<{
292
+ type: z.ZodLiteral<"viewport">;
293
+ minWidth: z.ZodOptional<z.ZodNumber>;
294
+ maxWidth: z.ZodOptional<z.ZodNumber>;
295
+ minHeight: z.ZodOptional<z.ZodNumber>;
296
+ maxHeight: z.ZodOptional<z.ZodNumber>;
297
+ }, "strip", z.ZodTypeAny, {
298
+ type: "viewport";
299
+ minWidth?: number | undefined;
300
+ maxWidth?: number | undefined;
301
+ minHeight?: number | undefined;
302
+ maxHeight?: number | undefined;
303
+ }, {
304
+ type: "viewport";
305
+ minWidth?: number | undefined;
306
+ maxWidth?: number | undefined;
307
+ minHeight?: number | undefined;
308
+ maxHeight?: number | undefined;
309
+ }>, z.ZodObject<{
310
+ type: z.ZodLiteral<"session_metric">;
311
+ key: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
312
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
313
+ threshold: z.ZodNumber;
314
+ }, "strip", z.ZodTypeAny, {
315
+ type: "session_metric";
316
+ key: "time_on_page" | "page_views" | "scroll_depth";
317
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
318
+ threshold: number;
319
+ }, {
320
+ type: "session_metric";
321
+ key: "time_on_page" | "page_views" | "scroll_depth";
322
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
323
+ threshold: number;
324
+ }>, z.ZodObject<{
325
+ type: z.ZodLiteral<"dismissed">;
326
+ key: z.ZodString;
327
+ inverted: z.ZodOptional<z.ZodBoolean>;
328
+ }, "strip", z.ZodTypeAny, {
329
+ type: "dismissed";
330
+ key: string;
331
+ inverted?: boolean | undefined;
332
+ }, {
333
+ type: "dismissed";
334
+ key: string;
335
+ inverted?: boolean | undefined;
336
+ }>, z.ZodObject<{
337
+ type: z.ZodLiteral<"cooldown_active">;
338
+ key: z.ZodString;
339
+ inverted: z.ZodOptional<z.ZodBoolean>;
340
+ }, "strip", z.ZodTypeAny, {
341
+ type: "cooldown_active";
342
+ key: string;
343
+ inverted?: boolean | undefined;
344
+ }, {
345
+ type: "cooldown_active";
346
+ key: string;
347
+ inverted?: boolean | undefined;
348
+ }>, z.ZodObject<{
349
+ type: z.ZodLiteral<"frequency_limit">;
350
+ key: z.ZodString;
351
+ limit: z.ZodNumber;
352
+ inverted: z.ZodOptional<z.ZodBoolean>;
353
+ }, "strip", z.ZodTypeAny, {
354
+ type: "frequency_limit";
355
+ key: string;
356
+ limit: number;
357
+ inverted?: boolean | undefined;
358
+ }, {
359
+ type: "frequency_limit";
360
+ key: string;
361
+ limit: number;
362
+ inverted?: boolean | undefined;
363
+ }>, z.ZodObject<{
364
+ type: z.ZodLiteral<"event_count">;
365
+ key: z.ZodString;
366
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
367
+ count: z.ZodNumber;
368
+ withinMs: z.ZodOptional<z.ZodNumber>;
369
+ counter: z.ZodOptional<z.ZodObject<{
370
+ events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "ui.hesitate", "ui.rage_click", "nav.page_view", "nav.page_leave"]>, "many">;
371
+ match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
372
+ equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
373
+ contains: z.ZodOptional<z.ZodString>;
374
+ }, "strip", z.ZodTypeAny, {
375
+ equals?: string | number | boolean | undefined;
376
+ contains?: string | undefined;
377
+ }, {
378
+ equals?: string | number | boolean | undefined;
379
+ contains?: string | undefined;
380
+ }>>>;
381
+ }, "strip", z.ZodTypeAny, {
382
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
383
+ match?: Record<string, {
384
+ equals?: string | number | boolean | undefined;
385
+ contains?: string | undefined;
386
+ }> | undefined;
387
+ }, {
388
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
389
+ match?: Record<string, {
390
+ equals?: string | number | boolean | undefined;
391
+ contains?: string | undefined;
392
+ }> | undefined;
393
+ }>>;
394
+ }, "strip", z.ZodTypeAny, {
395
+ type: "event_count";
396
+ key: string;
397
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
398
+ count: number;
399
+ withinMs?: number | undefined;
400
+ counter?: {
401
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
402
+ match?: Record<string, {
403
+ equals?: string | number | boolean | undefined;
404
+ contains?: string | undefined;
405
+ }> | undefined;
406
+ } | undefined;
407
+ }, {
408
+ type: "event_count";
409
+ key: string;
410
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
411
+ count: number;
412
+ withinMs?: number | undefined;
413
+ counter?: {
414
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
415
+ match?: Record<string, {
416
+ equals?: string | number | boolean | undefined;
417
+ contains?: string | undefined;
418
+ }> | undefined;
419
+ } | undefined;
420
+ }>]>, "many">;
421
+ value: z.ZodUnknown;
422
+ }, "strip", z.ZodTypeAny, {
423
+ conditions: ({
424
+ type: "page_url";
425
+ url: string;
426
+ } | {
427
+ type: "route";
428
+ routeId: string;
429
+ } | {
430
+ type: "anchor_visible";
431
+ anchorId: string;
432
+ state: "visible" | "present" | "absent";
433
+ } | {
434
+ type: "event_occurred";
435
+ eventName: string;
436
+ withinMs?: number | undefined;
437
+ } | {
438
+ type: "state_equals";
439
+ key: string;
440
+ value?: unknown;
441
+ } | {
442
+ type: "viewport";
443
+ minWidth?: number | undefined;
444
+ maxWidth?: number | undefined;
445
+ minHeight?: number | undefined;
446
+ maxHeight?: number | undefined;
447
+ } | {
448
+ type: "session_metric";
449
+ key: "time_on_page" | "page_views" | "scroll_depth";
450
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
451
+ threshold: number;
452
+ } | {
453
+ type: "dismissed";
454
+ key: string;
455
+ inverted?: boolean | undefined;
456
+ } | {
457
+ type: "cooldown_active";
458
+ key: string;
459
+ inverted?: boolean | undefined;
460
+ } | {
461
+ type: "frequency_limit";
462
+ key: string;
463
+ limit: number;
464
+ inverted?: boolean | undefined;
465
+ } | {
466
+ type: "event_count";
467
+ key: string;
468
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
469
+ count: number;
470
+ withinMs?: number | undefined;
471
+ counter?: {
472
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
473
+ match?: Record<string, {
474
+ equals?: string | number | boolean | undefined;
475
+ contains?: string | undefined;
476
+ }> | undefined;
477
+ } | undefined;
478
+ })[];
479
+ value?: unknown;
480
+ }, {
481
+ conditions: ({
482
+ type: "page_url";
483
+ url: string;
484
+ } | {
485
+ type: "route";
486
+ routeId: string;
487
+ } | {
488
+ type: "anchor_visible";
489
+ anchorId: string;
490
+ state: "visible" | "present" | "absent";
491
+ } | {
492
+ type: "event_occurred";
493
+ eventName: string;
494
+ withinMs?: number | undefined;
495
+ } | {
496
+ type: "state_equals";
497
+ key: string;
498
+ value?: unknown;
499
+ } | {
500
+ type: "viewport";
501
+ minWidth?: number | undefined;
502
+ maxWidth?: number | undefined;
503
+ minHeight?: number | undefined;
504
+ maxHeight?: number | undefined;
505
+ } | {
506
+ type: "session_metric";
507
+ key: "time_on_page" | "page_views" | "scroll_depth";
508
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
509
+ threshold: number;
510
+ } | {
511
+ type: "dismissed";
512
+ key: string;
513
+ inverted?: boolean | undefined;
514
+ } | {
515
+ type: "cooldown_active";
516
+ key: string;
517
+ inverted?: boolean | undefined;
518
+ } | {
519
+ type: "frequency_limit";
520
+ key: string;
521
+ limit: number;
522
+ inverted?: boolean | undefined;
523
+ } | {
524
+ type: "event_count";
525
+ key: string;
526
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
527
+ count: number;
528
+ withinMs?: number | undefined;
529
+ counter?: {
530
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
531
+ match?: Record<string, {
532
+ equals?: string | number | boolean | undefined;
533
+ contains?: string | undefined;
534
+ }> | undefined;
535
+ } | undefined;
536
+ })[];
537
+ value?: unknown;
538
+ }>, "many">;
539
+ default: z.ZodUnknown;
540
+ }, "strip", z.ZodTypeAny, {
541
+ type: "rules";
542
+ rules: {
543
+ conditions: ({
544
+ type: "page_url";
545
+ url: string;
546
+ } | {
547
+ type: "route";
548
+ routeId: string;
549
+ } | {
550
+ type: "anchor_visible";
551
+ anchorId: string;
552
+ state: "visible" | "present" | "absent";
553
+ } | {
554
+ type: "event_occurred";
555
+ eventName: string;
556
+ withinMs?: number | undefined;
557
+ } | {
558
+ type: "state_equals";
559
+ key: string;
560
+ value?: unknown;
561
+ } | {
562
+ type: "viewport";
563
+ minWidth?: number | undefined;
564
+ maxWidth?: number | undefined;
565
+ minHeight?: number | undefined;
566
+ maxHeight?: number | undefined;
567
+ } | {
568
+ type: "session_metric";
569
+ key: "time_on_page" | "page_views" | "scroll_depth";
570
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
571
+ threshold: number;
572
+ } | {
573
+ type: "dismissed";
574
+ key: string;
575
+ inverted?: boolean | undefined;
576
+ } | {
577
+ type: "cooldown_active";
578
+ key: string;
579
+ inverted?: boolean | undefined;
580
+ } | {
581
+ type: "frequency_limit";
582
+ key: string;
583
+ limit: number;
584
+ inverted?: boolean | undefined;
585
+ } | {
586
+ type: "event_count";
587
+ key: string;
588
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
589
+ count: number;
590
+ withinMs?: number | undefined;
591
+ counter?: {
592
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
593
+ match?: Record<string, {
594
+ equals?: string | number | boolean | undefined;
595
+ contains?: string | undefined;
596
+ }> | undefined;
597
+ } | undefined;
598
+ })[];
599
+ value?: unknown;
600
+ }[];
601
+ default?: unknown;
602
+ }, {
603
+ type: "rules";
604
+ rules: {
605
+ conditions: ({
606
+ type: "page_url";
607
+ url: string;
608
+ } | {
609
+ type: "route";
610
+ routeId: string;
611
+ } | {
612
+ type: "anchor_visible";
613
+ anchorId: string;
614
+ state: "visible" | "present" | "absent";
615
+ } | {
616
+ type: "event_occurred";
617
+ eventName: string;
618
+ withinMs?: number | undefined;
619
+ } | {
620
+ type: "state_equals";
621
+ key: string;
622
+ value?: unknown;
623
+ } | {
624
+ type: "viewport";
625
+ minWidth?: number | undefined;
626
+ maxWidth?: number | undefined;
627
+ minHeight?: number | undefined;
628
+ maxHeight?: number | undefined;
629
+ } | {
630
+ type: "session_metric";
631
+ key: "time_on_page" | "page_views" | "scroll_depth";
632
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
633
+ threshold: number;
634
+ } | {
635
+ type: "dismissed";
636
+ key: string;
637
+ inverted?: boolean | undefined;
638
+ } | {
639
+ type: "cooldown_active";
640
+ key: string;
641
+ inverted?: boolean | undefined;
642
+ } | {
643
+ type: "frequency_limit";
644
+ key: string;
645
+ limit: number;
646
+ inverted?: boolean | undefined;
647
+ } | {
648
+ type: "event_count";
649
+ key: string;
650
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
651
+ count: number;
652
+ withinMs?: number | undefined;
653
+ counter?: {
654
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
655
+ match?: Record<string, {
656
+ equals?: string | number | boolean | undefined;
657
+ contains?: string | undefined;
658
+ }> | undefined;
659
+ } | undefined;
660
+ })[];
661
+ value?: unknown;
662
+ }[];
663
+ default?: unknown;
664
+ }>, z.ZodObject<{
665
+ type: z.ZodLiteral<"score">;
666
+ field: z.ZodString;
667
+ threshold: z.ZodNumber;
668
+ above: z.ZodUnknown;
669
+ below: z.ZodUnknown;
670
+ }, "strip", z.ZodTypeAny, {
671
+ type: "score";
672
+ threshold: number;
673
+ field: string;
674
+ above?: unknown;
675
+ below?: unknown;
676
+ }, {
677
+ type: "score";
678
+ threshold: number;
679
+ field: string;
680
+ above?: unknown;
681
+ below?: unknown;
682
+ }>, z.ZodObject<{
683
+ type: z.ZodLiteral<"model">;
684
+ modelId: z.ZodString;
685
+ inputs: z.ZodArray<z.ZodString, "many">;
686
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
687
+ default: z.ZodUnknown;
688
+ }, "strip", z.ZodTypeAny, {
689
+ type: "model";
690
+ modelId: string;
691
+ inputs: string[];
692
+ outputMapping: Record<string, unknown>;
693
+ default?: unknown;
694
+ }, {
695
+ type: "model";
696
+ modelId: string;
697
+ inputs: string[];
698
+ outputMapping: Record<string, unknown>;
699
+ default?: unknown;
700
+ }>, z.ZodObject<{
701
+ type: z.ZodLiteral<"external">;
702
+ endpoint: z.ZodString;
703
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
704
+ default: z.ZodUnknown;
705
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
706
+ }, "strip", z.ZodTypeAny, {
707
+ type: "external";
708
+ endpoint: string;
709
+ default?: unknown;
710
+ method?: "GET" | "POST" | undefined;
711
+ timeoutMs?: number | undefined;
712
+ }, {
713
+ type: "external";
714
+ endpoint: string;
715
+ default?: unknown;
716
+ method?: "GET" | "POST" | undefined;
717
+ timeoutMs?: number | undefined;
718
+ }>]>>>;
719
+ notify: z.ZodOptional<z.ZodNullable<z.ZodObject<{
720
+ title: z.ZodOptional<z.ZodString>;
721
+ body: z.ZodOptional<z.ZodString>;
722
+ icon: z.ZodOptional<z.ZodString>;
723
+ }, "strip", z.ZodTypeAny, {
724
+ title?: string | undefined;
725
+ body?: string | undefined;
726
+ icon?: string | undefined;
727
+ }, {
728
+ title?: string | undefined;
729
+ body?: string | undefined;
730
+ icon?: string | undefined;
731
+ }>>>;
732
+ id: z.ZodOptional<z.ZodString>;
733
+ title: z.ZodOptional<z.ZodString>;
734
+ description: z.ZodOptional<z.ZodString>;
735
+ validation: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
736
+ }, "strip", z.ZodTypeAny, {
737
+ config: {
738
+ id: string;
739
+ title: string;
740
+ payload: {
741
+ widget: string;
742
+ props?: Record<string, unknown> | undefined;
743
+ };
744
+ };
745
+ kind: "suggestions:chip";
746
+ id?: string | undefined;
747
+ title?: string | undefined;
748
+ validation?: string[] | undefined;
749
+ triggerWhen?: {
750
+ type: "rules";
751
+ rules: {
752
+ conditions: ({
753
+ type: "page_url";
754
+ url: string;
755
+ } | {
756
+ type: "route";
757
+ routeId: string;
758
+ } | {
759
+ type: "anchor_visible";
760
+ anchorId: string;
761
+ state: "visible" | "present" | "absent";
762
+ } | {
763
+ type: "event_occurred";
764
+ eventName: string;
765
+ withinMs?: number | undefined;
766
+ } | {
767
+ type: "state_equals";
768
+ key: string;
769
+ value?: unknown;
770
+ } | {
771
+ type: "viewport";
772
+ minWidth?: number | undefined;
773
+ maxWidth?: number | undefined;
774
+ minHeight?: number | undefined;
775
+ maxHeight?: number | undefined;
776
+ } | {
777
+ type: "session_metric";
778
+ key: "time_on_page" | "page_views" | "scroll_depth";
779
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
780
+ threshold: number;
781
+ } | {
782
+ type: "dismissed";
783
+ key: string;
784
+ inverted?: boolean | undefined;
785
+ } | {
786
+ type: "cooldown_active";
787
+ key: string;
788
+ inverted?: boolean | undefined;
789
+ } | {
790
+ type: "frequency_limit";
791
+ key: string;
792
+ limit: number;
793
+ inverted?: boolean | undefined;
794
+ } | {
795
+ type: "event_count";
796
+ key: string;
797
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
798
+ count: number;
799
+ withinMs?: number | undefined;
800
+ counter?: {
801
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
802
+ match?: Record<string, {
803
+ equals?: string | number | boolean | undefined;
804
+ contains?: string | undefined;
805
+ }> | undefined;
806
+ } | undefined;
807
+ })[];
808
+ value?: unknown;
809
+ }[];
810
+ default?: unknown;
811
+ } | {
812
+ type: "score";
813
+ threshold: number;
814
+ field: string;
815
+ above?: unknown;
816
+ below?: unknown;
817
+ } | {
818
+ type: "model";
819
+ modelId: string;
820
+ inputs: string[];
821
+ outputMapping: Record<string, unknown>;
822
+ default?: unknown;
823
+ } | {
824
+ type: "external";
825
+ endpoint: string;
826
+ default?: unknown;
827
+ method?: "GET" | "POST" | undefined;
828
+ timeoutMs?: number | undefined;
829
+ } | null | undefined;
830
+ notify?: {
831
+ title?: string | undefined;
832
+ body?: string | undefined;
833
+ icon?: string | undefined;
834
+ } | null | undefined;
835
+ description?: string | undefined;
836
+ }, {
837
+ config: {
838
+ id: string;
839
+ title: string;
840
+ payload: {
841
+ widget: string;
842
+ props?: Record<string, unknown> | undefined;
843
+ };
844
+ };
845
+ kind: "suggestions:chip";
846
+ id?: string | undefined;
847
+ title?: string | undefined;
848
+ validation?: string[] | undefined;
849
+ triggerWhen?: {
850
+ type: "rules";
851
+ rules: {
852
+ conditions: ({
853
+ type: "page_url";
854
+ url: string;
855
+ } | {
856
+ type: "route";
857
+ routeId: string;
858
+ } | {
859
+ type: "anchor_visible";
860
+ anchorId: string;
861
+ state: "visible" | "present" | "absent";
862
+ } | {
863
+ type: "event_occurred";
864
+ eventName: string;
865
+ withinMs?: number | undefined;
866
+ } | {
867
+ type: "state_equals";
868
+ key: string;
869
+ value?: unknown;
870
+ } | {
871
+ type: "viewport";
872
+ minWidth?: number | undefined;
873
+ maxWidth?: number | undefined;
874
+ minHeight?: number | undefined;
875
+ maxHeight?: number | undefined;
876
+ } | {
877
+ type: "session_metric";
878
+ key: "time_on_page" | "page_views" | "scroll_depth";
879
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
880
+ threshold: number;
881
+ } | {
882
+ type: "dismissed";
883
+ key: string;
884
+ inverted?: boolean | undefined;
885
+ } | {
886
+ type: "cooldown_active";
887
+ key: string;
888
+ inverted?: boolean | undefined;
889
+ } | {
890
+ type: "frequency_limit";
891
+ key: string;
892
+ limit: number;
893
+ inverted?: boolean | undefined;
894
+ } | {
895
+ type: "event_count";
896
+ key: string;
897
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
898
+ count: number;
899
+ withinMs?: number | undefined;
900
+ counter?: {
901
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
902
+ match?: Record<string, {
903
+ equals?: string | number | boolean | undefined;
904
+ contains?: string | undefined;
905
+ }> | undefined;
906
+ } | undefined;
907
+ })[];
908
+ value?: unknown;
909
+ }[];
910
+ default?: unknown;
911
+ } | {
912
+ type: "score";
913
+ threshold: number;
914
+ field: string;
915
+ above?: unknown;
916
+ below?: unknown;
917
+ } | {
918
+ type: "model";
919
+ modelId: string;
920
+ inputs: string[];
921
+ outputMapping: Record<string, unknown>;
922
+ default?: unknown;
923
+ } | {
924
+ type: "external";
925
+ endpoint: string;
926
+ default?: unknown;
927
+ method?: "GET" | "POST" | undefined;
928
+ timeoutMs?: number | undefined;
929
+ } | null | undefined;
930
+ notify?: {
931
+ title?: string | undefined;
932
+ body?: string | undefined;
933
+ icon?: string | undefined;
934
+ } | null | undefined;
935
+ description?: string | undefined;
936
+ }>, {
937
+ config: {
938
+ id: string;
939
+ title: string;
940
+ payload: {
941
+ widget: string;
942
+ props?: Record<string, unknown> | undefined;
943
+ };
944
+ };
945
+ kind: "suggestions:chip";
946
+ id?: string | undefined;
947
+ title?: string | undefined;
948
+ validation?: string[] | undefined;
949
+ triggerWhen?: {
950
+ type: "rules";
951
+ rules: {
952
+ conditions: ({
953
+ type: "page_url";
954
+ url: string;
955
+ } | {
956
+ type: "route";
957
+ routeId: string;
958
+ } | {
959
+ type: "anchor_visible";
960
+ anchorId: string;
961
+ state: "visible" | "present" | "absent";
962
+ } | {
963
+ type: "event_occurred";
964
+ eventName: string;
965
+ withinMs?: number | undefined;
966
+ } | {
967
+ type: "state_equals";
968
+ key: string;
969
+ value?: unknown;
970
+ } | {
971
+ type: "viewport";
972
+ minWidth?: number | undefined;
973
+ maxWidth?: number | undefined;
974
+ minHeight?: number | undefined;
975
+ maxHeight?: number | undefined;
976
+ } | {
977
+ type: "session_metric";
978
+ key: "time_on_page" | "page_views" | "scroll_depth";
979
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
980
+ threshold: number;
981
+ } | {
982
+ type: "dismissed";
983
+ key: string;
984
+ inverted?: boolean | undefined;
985
+ } | {
986
+ type: "cooldown_active";
987
+ key: string;
988
+ inverted?: boolean | undefined;
989
+ } | {
990
+ type: "frequency_limit";
991
+ key: string;
992
+ limit: number;
993
+ inverted?: boolean | undefined;
994
+ } | {
995
+ type: "event_count";
996
+ key: string;
997
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
998
+ count: number;
999
+ withinMs?: number | undefined;
1000
+ counter?: {
1001
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1002
+ match?: Record<string, {
1003
+ equals?: string | number | boolean | undefined;
1004
+ contains?: string | undefined;
1005
+ }> | undefined;
1006
+ } | undefined;
1007
+ })[];
1008
+ value?: unknown;
1009
+ }[];
1010
+ default?: unknown;
1011
+ } | {
1012
+ type: "score";
1013
+ threshold: number;
1014
+ field: string;
1015
+ above?: unknown;
1016
+ below?: unknown;
1017
+ } | {
1018
+ type: "model";
1019
+ modelId: string;
1020
+ inputs: string[];
1021
+ outputMapping: Record<string, unknown>;
1022
+ default?: unknown;
1023
+ } | {
1024
+ type: "external";
1025
+ endpoint: string;
1026
+ default?: unknown;
1027
+ method?: "GET" | "POST" | undefined;
1028
+ timeoutMs?: number | undefined;
1029
+ } | null | undefined;
1030
+ notify?: {
1031
+ title?: string | undefined;
1032
+ body?: string | undefined;
1033
+ icon?: string | undefined;
1034
+ } | null | undefined;
1035
+ description?: string | undefined;
1036
+ }, {
1037
+ config: {
1038
+ id: string;
1039
+ title: string;
1040
+ payload: {
1041
+ widget: string;
1042
+ props?: Record<string, unknown> | undefined;
1043
+ };
1044
+ };
1045
+ kind: "suggestions:chip";
1046
+ id?: string | undefined;
1047
+ title?: string | undefined;
1048
+ validation?: string[] | undefined;
1049
+ triggerWhen?: {
1050
+ type: "rules";
1051
+ rules: {
1052
+ conditions: ({
1053
+ type: "page_url";
1054
+ url: string;
1055
+ } | {
1056
+ type: "route";
1057
+ routeId: string;
1058
+ } | {
1059
+ type: "anchor_visible";
1060
+ anchorId: string;
1061
+ state: "visible" | "present" | "absent";
1062
+ } | {
1063
+ type: "event_occurred";
1064
+ eventName: string;
1065
+ withinMs?: number | undefined;
1066
+ } | {
1067
+ type: "state_equals";
1068
+ key: string;
1069
+ value?: unknown;
1070
+ } | {
1071
+ type: "viewport";
1072
+ minWidth?: number | undefined;
1073
+ maxWidth?: number | undefined;
1074
+ minHeight?: number | undefined;
1075
+ maxHeight?: number | undefined;
1076
+ } | {
1077
+ type: "session_metric";
1078
+ key: "time_on_page" | "page_views" | "scroll_depth";
1079
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1080
+ threshold: number;
1081
+ } | {
1082
+ type: "dismissed";
1083
+ key: string;
1084
+ inverted?: boolean | undefined;
1085
+ } | {
1086
+ type: "cooldown_active";
1087
+ key: string;
1088
+ inverted?: boolean | undefined;
1089
+ } | {
1090
+ type: "frequency_limit";
1091
+ key: string;
1092
+ limit: number;
1093
+ inverted?: boolean | undefined;
1094
+ } | {
1095
+ type: "event_count";
1096
+ key: string;
1097
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1098
+ count: number;
1099
+ withinMs?: number | undefined;
1100
+ counter?: {
1101
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1102
+ match?: Record<string, {
1103
+ equals?: string | number | boolean | undefined;
1104
+ contains?: string | undefined;
1105
+ }> | undefined;
1106
+ } | undefined;
1107
+ })[];
1108
+ value?: unknown;
1109
+ }[];
1110
+ default?: unknown;
1111
+ } | {
1112
+ type: "score";
1113
+ threshold: number;
1114
+ field: string;
1115
+ above?: unknown;
1116
+ below?: unknown;
1117
+ } | {
1118
+ type: "model";
1119
+ modelId: string;
1120
+ inputs: string[];
1121
+ outputMapping: Record<string, unknown>;
1122
+ default?: unknown;
1123
+ } | {
1124
+ type: "external";
1125
+ endpoint: string;
1126
+ default?: unknown;
1127
+ method?: "GET" | "POST" | undefined;
1128
+ timeoutMs?: number | undefined;
1129
+ } | null | undefined;
1130
+ notify?: {
1131
+ title?: string | undefined;
1132
+ body?: string | undefined;
1133
+ icon?: string | undefined;
1134
+ } | null | undefined;
1135
+ description?: string | undefined;
1136
+ }>, "many">>;
1137
+ }, "strict", z.ZodTypeAny, {
1138
+ chips: {
1139
+ config: {
1140
+ id: string;
1141
+ title: string;
1142
+ payload: {
1143
+ widget: string;
1144
+ props?: Record<string, unknown> | undefined;
1145
+ };
1146
+ };
1147
+ kind: "suggestions:chip";
1148
+ id?: string | undefined;
1149
+ title?: string | undefined;
1150
+ validation?: string[] | undefined;
1151
+ triggerWhen?: {
1152
+ type: "rules";
1153
+ rules: {
1154
+ conditions: ({
1155
+ type: "page_url";
1156
+ url: string;
1157
+ } | {
1158
+ type: "route";
1159
+ routeId: string;
1160
+ } | {
1161
+ type: "anchor_visible";
1162
+ anchorId: string;
1163
+ state: "visible" | "present" | "absent";
1164
+ } | {
1165
+ type: "event_occurred";
1166
+ eventName: string;
1167
+ withinMs?: number | undefined;
1168
+ } | {
1169
+ type: "state_equals";
1170
+ key: string;
1171
+ value?: unknown;
1172
+ } | {
1173
+ type: "viewport";
1174
+ minWidth?: number | undefined;
1175
+ maxWidth?: number | undefined;
1176
+ minHeight?: number | undefined;
1177
+ maxHeight?: number | undefined;
1178
+ } | {
1179
+ type: "session_metric";
1180
+ key: "time_on_page" | "page_views" | "scroll_depth";
1181
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1182
+ threshold: number;
1183
+ } | {
1184
+ type: "dismissed";
1185
+ key: string;
1186
+ inverted?: boolean | undefined;
1187
+ } | {
1188
+ type: "cooldown_active";
1189
+ key: string;
1190
+ inverted?: boolean | undefined;
1191
+ } | {
1192
+ type: "frequency_limit";
1193
+ key: string;
1194
+ limit: number;
1195
+ inverted?: boolean | undefined;
1196
+ } | {
1197
+ type: "event_count";
1198
+ key: string;
1199
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1200
+ count: number;
1201
+ withinMs?: number | undefined;
1202
+ counter?: {
1203
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1204
+ match?: Record<string, {
1205
+ equals?: string | number | boolean | undefined;
1206
+ contains?: string | undefined;
1207
+ }> | undefined;
1208
+ } | undefined;
1209
+ })[];
1210
+ value?: unknown;
1211
+ }[];
1212
+ default?: unknown;
1213
+ } | {
1214
+ type: "score";
1215
+ threshold: number;
1216
+ field: string;
1217
+ above?: unknown;
1218
+ below?: unknown;
1219
+ } | {
1220
+ type: "model";
1221
+ modelId: string;
1222
+ inputs: string[];
1223
+ outputMapping: Record<string, unknown>;
1224
+ default?: unknown;
1225
+ } | {
1226
+ type: "external";
1227
+ endpoint: string;
1228
+ default?: unknown;
1229
+ method?: "GET" | "POST" | undefined;
1230
+ timeoutMs?: number | undefined;
1231
+ } | null | undefined;
1232
+ notify?: {
1233
+ title?: string | undefined;
1234
+ body?: string | undefined;
1235
+ icon?: string | undefined;
1236
+ } | null | undefined;
1237
+ description?: string | undefined;
1238
+ }[];
1239
+ }, {
1240
+ chips?: {
1241
+ config: {
1242
+ id: string;
1243
+ title: string;
1244
+ payload: {
1245
+ widget: string;
1246
+ props?: Record<string, unknown> | undefined;
1247
+ };
1248
+ };
1249
+ kind: "suggestions:chip";
1250
+ id?: string | undefined;
1251
+ title?: string | undefined;
1252
+ validation?: string[] | undefined;
1253
+ triggerWhen?: {
1254
+ type: "rules";
1255
+ rules: {
1256
+ conditions: ({
1257
+ type: "page_url";
1258
+ url: string;
1259
+ } | {
1260
+ type: "route";
1261
+ routeId: string;
1262
+ } | {
1263
+ type: "anchor_visible";
1264
+ anchorId: string;
1265
+ state: "visible" | "present" | "absent";
1266
+ } | {
1267
+ type: "event_occurred";
1268
+ eventName: string;
1269
+ withinMs?: number | undefined;
1270
+ } | {
1271
+ type: "state_equals";
1272
+ key: string;
1273
+ value?: unknown;
1274
+ } | {
1275
+ type: "viewport";
1276
+ minWidth?: number | undefined;
1277
+ maxWidth?: number | undefined;
1278
+ minHeight?: number | undefined;
1279
+ maxHeight?: number | undefined;
1280
+ } | {
1281
+ type: "session_metric";
1282
+ key: "time_on_page" | "page_views" | "scroll_depth";
1283
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1284
+ threshold: number;
1285
+ } | {
1286
+ type: "dismissed";
1287
+ key: string;
1288
+ inverted?: boolean | undefined;
1289
+ } | {
1290
+ type: "cooldown_active";
1291
+ key: string;
1292
+ inverted?: boolean | undefined;
1293
+ } | {
1294
+ type: "frequency_limit";
1295
+ key: string;
1296
+ limit: number;
1297
+ inverted?: boolean | undefined;
1298
+ } | {
1299
+ type: "event_count";
1300
+ key: string;
1301
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1302
+ count: number;
1303
+ withinMs?: number | undefined;
1304
+ counter?: {
1305
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1306
+ match?: Record<string, {
1307
+ equals?: string | number | boolean | undefined;
1308
+ contains?: string | undefined;
1309
+ }> | undefined;
1310
+ } | undefined;
1311
+ })[];
1312
+ value?: unknown;
1313
+ }[];
1314
+ default?: unknown;
1315
+ } | {
1316
+ type: "score";
1317
+ threshold: number;
1318
+ field: string;
1319
+ above?: unknown;
1320
+ below?: unknown;
1321
+ } | {
1322
+ type: "model";
1323
+ modelId: string;
1324
+ inputs: string[];
1325
+ outputMapping: Record<string, unknown>;
1326
+ default?: unknown;
1327
+ } | {
1328
+ type: "external";
1329
+ endpoint: string;
1330
+ default?: unknown;
1331
+ method?: "GET" | "POST" | undefined;
1332
+ timeoutMs?: number | undefined;
1333
+ } | null | undefined;
1334
+ notify?: {
1335
+ title?: string | undefined;
1336
+ body?: string | undefined;
1337
+ icon?: string | undefined;
1338
+ } | null | undefined;
1339
+ description?: string | undefined;
1340
+ }[] | undefined;
38
1341
  }>;
1342
+ export type ChipsStripProps = z.infer<typeof chipsStripPropsSchema>;
39
1343
  /**
40
1344
  * Tile widget definitions for unified JSON Schema generation.
41
1345
  * Maps widget IDs to their props validation schema so the build script
42
1346
  * can inject if/then constraints on tile.props.
43
1347
  */
44
- export declare const tileWidgets: {
1348
+ export declare const tileWidgets: ({
45
1349
  widget: string;
46
1350
  defName: string;
47
1351
  propsSchema: z.ZodObject<{
48
- /** Backend URL for the chat API endpoint */
49
- backendUrl: z.ZodString;
1352
+ /** Backend URL for the chat API endpoint. "" for same-origin, or an absolute http(s):// URL. */
1353
+ backendUrl: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
50
1354
  /** MLflow run ID for experiment tracking */
51
1355
  mlflowRunId: z.ZodOptional<z.ZodString>;
52
1356
  /** Greeting message shown when the chat opens */
53
1357
  greeting: z.ZodDefault<z.ZodString>;
54
1358
  /** Maximum number of history messages sent to the backend */
55
1359
  maxHistory: z.ZodDefault<z.ZodNumber>;
1360
+ /** Quick-reply suggestions shown in the empty state */
1361
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1362
+ /**
1363
+ * Per-customer fallback card rendered when chat can't open (Turnstile
1364
+ * failure, network error, etc.). The end-user is redirected to the
1365
+ * customer's normal support path — no Cloudflare-branded challenge is
1366
+ * ever shown.
1367
+ */
1368
+ fallback: z.ZodOptional<z.ZodObject<{
1369
+ /** Header shown on the fallback card. Defaults to a generic "unavailable" copy. */
1370
+ title: z.ZodOptional<z.ZodString>;
1371
+ /** Body copy explaining the situation in the customer's voice. */
1372
+ message: z.ZodOptional<z.ZodString>;
1373
+ /** Label for the call-to-action link. If `ctaHref` is set this should be too. */
1374
+ ctaLabel: z.ZodOptional<z.ZodString>;
1375
+ /** Target of the CTA link — typically the customer's existing support path. */
1376
+ ctaHref: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
1377
+ }, "strict", z.ZodTypeAny, {
1378
+ message?: string | undefined;
1379
+ title?: string | undefined;
1380
+ ctaLabel?: string | undefined;
1381
+ ctaHref?: string | undefined;
1382
+ }, {
1383
+ message?: string | undefined;
1384
+ title?: string | undefined;
1385
+ ctaLabel?: string | undefined;
1386
+ ctaHref?: string | undefined;
1387
+ }>>;
56
1388
  }, "strip", z.ZodTypeAny, {
57
- backendUrl: string;
58
1389
  greeting: string;
1390
+ backendUrl: string;
59
1391
  maxHistory: number;
60
1392
  mlflowRunId?: string | undefined;
1393
+ suggestions?: string[] | undefined;
1394
+ fallback?: {
1395
+ message?: string | undefined;
1396
+ title?: string | undefined;
1397
+ ctaLabel?: string | undefined;
1398
+ ctaHref?: string | undefined;
1399
+ } | undefined;
61
1400
  }, {
62
1401
  backendUrl: string;
63
1402
  greeting?: string | undefined;
64
- maxHistory?: number | undefined;
65
1403
  mlflowRunId?: string | undefined;
1404
+ maxHistory?: number | undefined;
1405
+ suggestions?: string[] | undefined;
1406
+ fallback?: {
1407
+ message?: string | undefined;
1408
+ title?: string | undefined;
1409
+ ctaLabel?: string | undefined;
1410
+ ctaHref?: string | undefined;
1411
+ } | undefined;
1412
+ }>;
1413
+ } | {
1414
+ widget: string;
1415
+ defName: string;
1416
+ propsSchema: z.ZodObject<{
1417
+ placeholder: z.ZodOptional<z.ZodString>;
1418
+ assistantName: z.ZodOptional<z.ZodString>;
1419
+ messages: z.ZodOptional<z.ZodArray<z.ZodObject<{
1420
+ id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
1421
+ role: z.ZodEnum<["user", "assistant"]>;
1422
+ text: z.ZodString;
1423
+ }, "strip", z.ZodTypeAny, {
1424
+ id: string | number;
1425
+ text: string;
1426
+ role: "user" | "assistant";
1427
+ }, {
1428
+ id: string | number;
1429
+ text: string;
1430
+ role: "user" | "assistant";
1431
+ }>, "many">>;
1432
+ inFlight: z.ZodOptional<z.ZodBoolean>;
1433
+ forceExpanded: z.ZodOptional<z.ZodBoolean>;
1434
+ backendUrl: z.ZodOptional<z.ZodString>;
1435
+ greeting: z.ZodOptional<z.ZodString>;
1436
+ introSuggestion: z.ZodOptional<z.ZodObject<{
1437
+ label: z.ZodString;
1438
+ prompt: z.ZodString;
1439
+ }, "strip", z.ZodTypeAny, {
1440
+ label: string;
1441
+ prompt: string;
1442
+ }, {
1443
+ label: string;
1444
+ prompt: string;
1445
+ }>>;
1446
+ fallback: z.ZodOptional<z.ZodObject<{
1447
+ title: z.ZodOptional<z.ZodString>;
1448
+ message: z.ZodOptional<z.ZodString>;
1449
+ ctaLabel: z.ZodOptional<z.ZodString>;
1450
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1451
+ title: z.ZodOptional<z.ZodString>;
1452
+ message: z.ZodOptional<z.ZodString>;
1453
+ ctaLabel: z.ZodOptional<z.ZodString>;
1454
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1455
+ title: z.ZodOptional<z.ZodString>;
1456
+ message: z.ZodOptional<z.ZodString>;
1457
+ ctaLabel: z.ZodOptional<z.ZodString>;
1458
+ }, z.ZodTypeAny, "passthrough">>>;
1459
+ elementsEnabled: z.ZodOptional<z.ZodBoolean>;
1460
+ uiTemplates: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>;
1461
+ }, "strict", z.ZodTypeAny, {
1462
+ messages?: {
1463
+ id: string | number;
1464
+ text: string;
1465
+ role: "user" | "assistant";
1466
+ }[] | undefined;
1467
+ greeting?: string | undefined;
1468
+ forceExpanded?: boolean | undefined;
1469
+ inFlight?: boolean | undefined;
1470
+ introSuggestion?: {
1471
+ label: string;
1472
+ prompt: string;
1473
+ } | undefined;
1474
+ placeholder?: string | undefined;
1475
+ assistantName?: string | undefined;
1476
+ backendUrl?: string | undefined;
1477
+ fallback?: z.objectOutputType<{
1478
+ title: z.ZodOptional<z.ZodString>;
1479
+ message: z.ZodOptional<z.ZodString>;
1480
+ ctaLabel: z.ZodOptional<z.ZodString>;
1481
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1482
+ elementsEnabled?: boolean | undefined;
1483
+ uiTemplates?: Record<string, unknown> | undefined;
1484
+ }, {
1485
+ messages?: {
1486
+ id: string | number;
1487
+ text: string;
1488
+ role: "user" | "assistant";
1489
+ }[] | undefined;
1490
+ greeting?: string | undefined;
1491
+ forceExpanded?: boolean | undefined;
1492
+ inFlight?: boolean | undefined;
1493
+ introSuggestion?: {
1494
+ label: string;
1495
+ prompt: string;
1496
+ } | undefined;
1497
+ placeholder?: string | undefined;
1498
+ assistantName?: string | undefined;
1499
+ backendUrl?: string | undefined;
1500
+ fallback?: z.objectInputType<{
1501
+ title: z.ZodOptional<z.ZodString>;
1502
+ message: z.ZodOptional<z.ZodString>;
1503
+ ctaLabel: z.ZodOptional<z.ZodString>;
1504
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1505
+ elementsEnabled?: boolean | undefined;
1506
+ uiTemplates?: Record<string, unknown> | undefined;
1507
+ }>;
1508
+ } | {
1509
+ widget: string;
1510
+ defName: string;
1511
+ propsSchema: z.ZodObject<{
1512
+ chips: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
1513
+ kind: z.ZodLiteral<"suggestions:chip">;
1514
+ config: z.ZodObject<{
1515
+ id: z.ZodString;
1516
+ title: z.ZodString;
1517
+ payload: z.ZodObject<{
1518
+ widget: z.ZodString;
1519
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1520
+ }, "strict", z.ZodTypeAny, {
1521
+ widget: string;
1522
+ props?: Record<string, unknown> | undefined;
1523
+ }, {
1524
+ widget: string;
1525
+ props?: Record<string, unknown> | undefined;
1526
+ }>;
1527
+ }, "strip", z.ZodTypeAny, {
1528
+ id: string;
1529
+ title: string;
1530
+ payload: {
1531
+ widget: string;
1532
+ props?: Record<string, unknown> | undefined;
1533
+ };
1534
+ }, {
1535
+ id: string;
1536
+ title: string;
1537
+ payload: {
1538
+ widget: string;
1539
+ props?: Record<string, unknown> | undefined;
1540
+ };
1541
+ }>;
1542
+ triggerWhen: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1543
+ type: z.ZodLiteral<"rules">;
1544
+ rules: z.ZodArray<z.ZodObject<{
1545
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1546
+ type: z.ZodLiteral<"page_url">;
1547
+ url: z.ZodString;
1548
+ }, "strip", z.ZodTypeAny, {
1549
+ type: "page_url";
1550
+ url: string;
1551
+ }, {
1552
+ type: "page_url";
1553
+ url: string;
1554
+ }>, z.ZodObject<{
1555
+ type: z.ZodLiteral<"route">;
1556
+ routeId: z.ZodString;
1557
+ }, "strip", z.ZodTypeAny, {
1558
+ type: "route";
1559
+ routeId: string;
1560
+ }, {
1561
+ type: "route";
1562
+ routeId: string;
1563
+ }>, z.ZodObject<{
1564
+ type: z.ZodLiteral<"anchor_visible">;
1565
+ anchorId: z.ZodString;
1566
+ state: z.ZodEnum<["visible", "present", "absent"]>;
1567
+ }, "strip", z.ZodTypeAny, {
1568
+ type: "anchor_visible";
1569
+ anchorId: string;
1570
+ state: "visible" | "present" | "absent";
1571
+ }, {
1572
+ type: "anchor_visible";
1573
+ anchorId: string;
1574
+ state: "visible" | "present" | "absent";
1575
+ }>, z.ZodObject<{
1576
+ type: z.ZodLiteral<"event_occurred">;
1577
+ eventName: z.ZodString;
1578
+ withinMs: z.ZodOptional<z.ZodNumber>;
1579
+ }, "strip", z.ZodTypeAny, {
1580
+ type: "event_occurred";
1581
+ eventName: string;
1582
+ withinMs?: number | undefined;
1583
+ }, {
1584
+ type: "event_occurred";
1585
+ eventName: string;
1586
+ withinMs?: number | undefined;
1587
+ }>, z.ZodObject<{
1588
+ type: z.ZodLiteral<"state_equals">;
1589
+ key: z.ZodString;
1590
+ value: z.ZodUnknown;
1591
+ }, "strip", z.ZodTypeAny, {
1592
+ type: "state_equals";
1593
+ key: string;
1594
+ value?: unknown;
1595
+ }, {
1596
+ type: "state_equals";
1597
+ key: string;
1598
+ value?: unknown;
1599
+ }>, z.ZodObject<{
1600
+ type: z.ZodLiteral<"viewport">;
1601
+ minWidth: z.ZodOptional<z.ZodNumber>;
1602
+ maxWidth: z.ZodOptional<z.ZodNumber>;
1603
+ minHeight: z.ZodOptional<z.ZodNumber>;
1604
+ maxHeight: z.ZodOptional<z.ZodNumber>;
1605
+ }, "strip", z.ZodTypeAny, {
1606
+ type: "viewport";
1607
+ minWidth?: number | undefined;
1608
+ maxWidth?: number | undefined;
1609
+ minHeight?: number | undefined;
1610
+ maxHeight?: number | undefined;
1611
+ }, {
1612
+ type: "viewport";
1613
+ minWidth?: number | undefined;
1614
+ maxWidth?: number | undefined;
1615
+ minHeight?: number | undefined;
1616
+ maxHeight?: number | undefined;
1617
+ }>, z.ZodObject<{
1618
+ type: z.ZodLiteral<"session_metric">;
1619
+ key: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
1620
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1621
+ threshold: z.ZodNumber;
1622
+ }, "strip", z.ZodTypeAny, {
1623
+ type: "session_metric";
1624
+ key: "time_on_page" | "page_views" | "scroll_depth";
1625
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1626
+ threshold: number;
1627
+ }, {
1628
+ type: "session_metric";
1629
+ key: "time_on_page" | "page_views" | "scroll_depth";
1630
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1631
+ threshold: number;
1632
+ }>, z.ZodObject<{
1633
+ type: z.ZodLiteral<"dismissed">;
1634
+ key: z.ZodString;
1635
+ inverted: z.ZodOptional<z.ZodBoolean>;
1636
+ }, "strip", z.ZodTypeAny, {
1637
+ type: "dismissed";
1638
+ key: string;
1639
+ inverted?: boolean | undefined;
1640
+ }, {
1641
+ type: "dismissed";
1642
+ key: string;
1643
+ inverted?: boolean | undefined;
1644
+ }>, z.ZodObject<{
1645
+ type: z.ZodLiteral<"cooldown_active">;
1646
+ key: z.ZodString;
1647
+ inverted: z.ZodOptional<z.ZodBoolean>;
1648
+ }, "strip", z.ZodTypeAny, {
1649
+ type: "cooldown_active";
1650
+ key: string;
1651
+ inverted?: boolean | undefined;
1652
+ }, {
1653
+ type: "cooldown_active";
1654
+ key: string;
1655
+ inverted?: boolean | undefined;
1656
+ }>, z.ZodObject<{
1657
+ type: z.ZodLiteral<"frequency_limit">;
1658
+ key: z.ZodString;
1659
+ limit: z.ZodNumber;
1660
+ inverted: z.ZodOptional<z.ZodBoolean>;
1661
+ }, "strip", z.ZodTypeAny, {
1662
+ type: "frequency_limit";
1663
+ key: string;
1664
+ limit: number;
1665
+ inverted?: boolean | undefined;
1666
+ }, {
1667
+ type: "frequency_limit";
1668
+ key: string;
1669
+ limit: number;
1670
+ inverted?: boolean | undefined;
1671
+ }>, z.ZodObject<{
1672
+ type: z.ZodLiteral<"event_count">;
1673
+ key: z.ZodString;
1674
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1675
+ count: z.ZodNumber;
1676
+ withinMs: z.ZodOptional<z.ZodNumber>;
1677
+ counter: z.ZodOptional<z.ZodObject<{
1678
+ events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "ui.hesitate", "ui.rage_click", "nav.page_view", "nav.page_leave"]>, "many">;
1679
+ match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1680
+ equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1681
+ contains: z.ZodOptional<z.ZodString>;
1682
+ }, "strip", z.ZodTypeAny, {
1683
+ equals?: string | number | boolean | undefined;
1684
+ contains?: string | undefined;
1685
+ }, {
1686
+ equals?: string | number | boolean | undefined;
1687
+ contains?: string | undefined;
1688
+ }>>>;
1689
+ }, "strip", z.ZodTypeAny, {
1690
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1691
+ match?: Record<string, {
1692
+ equals?: string | number | boolean | undefined;
1693
+ contains?: string | undefined;
1694
+ }> | undefined;
1695
+ }, {
1696
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1697
+ match?: Record<string, {
1698
+ equals?: string | number | boolean | undefined;
1699
+ contains?: string | undefined;
1700
+ }> | undefined;
1701
+ }>>;
1702
+ }, "strip", z.ZodTypeAny, {
1703
+ type: "event_count";
1704
+ key: string;
1705
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1706
+ count: number;
1707
+ withinMs?: number | undefined;
1708
+ counter?: {
1709
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1710
+ match?: Record<string, {
1711
+ equals?: string | number | boolean | undefined;
1712
+ contains?: string | undefined;
1713
+ }> | undefined;
1714
+ } | undefined;
1715
+ }, {
1716
+ type: "event_count";
1717
+ key: string;
1718
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1719
+ count: number;
1720
+ withinMs?: number | undefined;
1721
+ counter?: {
1722
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1723
+ match?: Record<string, {
1724
+ equals?: string | number | boolean | undefined;
1725
+ contains?: string | undefined;
1726
+ }> | undefined;
1727
+ } | undefined;
1728
+ }>]>, "many">;
1729
+ value: z.ZodUnknown;
1730
+ }, "strip", z.ZodTypeAny, {
1731
+ conditions: ({
1732
+ type: "page_url";
1733
+ url: string;
1734
+ } | {
1735
+ type: "route";
1736
+ routeId: string;
1737
+ } | {
1738
+ type: "anchor_visible";
1739
+ anchorId: string;
1740
+ state: "visible" | "present" | "absent";
1741
+ } | {
1742
+ type: "event_occurred";
1743
+ eventName: string;
1744
+ withinMs?: number | undefined;
1745
+ } | {
1746
+ type: "state_equals";
1747
+ key: string;
1748
+ value?: unknown;
1749
+ } | {
1750
+ type: "viewport";
1751
+ minWidth?: number | undefined;
1752
+ maxWidth?: number | undefined;
1753
+ minHeight?: number | undefined;
1754
+ maxHeight?: number | undefined;
1755
+ } | {
1756
+ type: "session_metric";
1757
+ key: "time_on_page" | "page_views" | "scroll_depth";
1758
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1759
+ threshold: number;
1760
+ } | {
1761
+ type: "dismissed";
1762
+ key: string;
1763
+ inverted?: boolean | undefined;
1764
+ } | {
1765
+ type: "cooldown_active";
1766
+ key: string;
1767
+ inverted?: boolean | undefined;
1768
+ } | {
1769
+ type: "frequency_limit";
1770
+ key: string;
1771
+ limit: number;
1772
+ inverted?: boolean | undefined;
1773
+ } | {
1774
+ type: "event_count";
1775
+ key: string;
1776
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1777
+ count: number;
1778
+ withinMs?: number | undefined;
1779
+ counter?: {
1780
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1781
+ match?: Record<string, {
1782
+ equals?: string | number | boolean | undefined;
1783
+ contains?: string | undefined;
1784
+ }> | undefined;
1785
+ } | undefined;
1786
+ })[];
1787
+ value?: unknown;
1788
+ }, {
1789
+ conditions: ({
1790
+ type: "page_url";
1791
+ url: string;
1792
+ } | {
1793
+ type: "route";
1794
+ routeId: string;
1795
+ } | {
1796
+ type: "anchor_visible";
1797
+ anchorId: string;
1798
+ state: "visible" | "present" | "absent";
1799
+ } | {
1800
+ type: "event_occurred";
1801
+ eventName: string;
1802
+ withinMs?: number | undefined;
1803
+ } | {
1804
+ type: "state_equals";
1805
+ key: string;
1806
+ value?: unknown;
1807
+ } | {
1808
+ type: "viewport";
1809
+ minWidth?: number | undefined;
1810
+ maxWidth?: number | undefined;
1811
+ minHeight?: number | undefined;
1812
+ maxHeight?: number | undefined;
1813
+ } | {
1814
+ type: "session_metric";
1815
+ key: "time_on_page" | "page_views" | "scroll_depth";
1816
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1817
+ threshold: number;
1818
+ } | {
1819
+ type: "dismissed";
1820
+ key: string;
1821
+ inverted?: boolean | undefined;
1822
+ } | {
1823
+ type: "cooldown_active";
1824
+ key: string;
1825
+ inverted?: boolean | undefined;
1826
+ } | {
1827
+ type: "frequency_limit";
1828
+ key: string;
1829
+ limit: number;
1830
+ inverted?: boolean | undefined;
1831
+ } | {
1832
+ type: "event_count";
1833
+ key: string;
1834
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1835
+ count: number;
1836
+ withinMs?: number | undefined;
1837
+ counter?: {
1838
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1839
+ match?: Record<string, {
1840
+ equals?: string | number | boolean | undefined;
1841
+ contains?: string | undefined;
1842
+ }> | undefined;
1843
+ } | undefined;
1844
+ })[];
1845
+ value?: unknown;
1846
+ }>, "many">;
1847
+ default: z.ZodUnknown;
1848
+ }, "strip", z.ZodTypeAny, {
1849
+ type: "rules";
1850
+ rules: {
1851
+ conditions: ({
1852
+ type: "page_url";
1853
+ url: string;
1854
+ } | {
1855
+ type: "route";
1856
+ routeId: string;
1857
+ } | {
1858
+ type: "anchor_visible";
1859
+ anchorId: string;
1860
+ state: "visible" | "present" | "absent";
1861
+ } | {
1862
+ type: "event_occurred";
1863
+ eventName: string;
1864
+ withinMs?: number | undefined;
1865
+ } | {
1866
+ type: "state_equals";
1867
+ key: string;
1868
+ value?: unknown;
1869
+ } | {
1870
+ type: "viewport";
1871
+ minWidth?: number | undefined;
1872
+ maxWidth?: number | undefined;
1873
+ minHeight?: number | undefined;
1874
+ maxHeight?: number | undefined;
1875
+ } | {
1876
+ type: "session_metric";
1877
+ key: "time_on_page" | "page_views" | "scroll_depth";
1878
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1879
+ threshold: number;
1880
+ } | {
1881
+ type: "dismissed";
1882
+ key: string;
1883
+ inverted?: boolean | undefined;
1884
+ } | {
1885
+ type: "cooldown_active";
1886
+ key: string;
1887
+ inverted?: boolean | undefined;
1888
+ } | {
1889
+ type: "frequency_limit";
1890
+ key: string;
1891
+ limit: number;
1892
+ inverted?: boolean | undefined;
1893
+ } | {
1894
+ type: "event_count";
1895
+ key: string;
1896
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1897
+ count: number;
1898
+ withinMs?: number | undefined;
1899
+ counter?: {
1900
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1901
+ match?: Record<string, {
1902
+ equals?: string | number | boolean | undefined;
1903
+ contains?: string | undefined;
1904
+ }> | undefined;
1905
+ } | undefined;
1906
+ })[];
1907
+ value?: unknown;
1908
+ }[];
1909
+ default?: unknown;
1910
+ }, {
1911
+ type: "rules";
1912
+ rules: {
1913
+ conditions: ({
1914
+ type: "page_url";
1915
+ url: string;
1916
+ } | {
1917
+ type: "route";
1918
+ routeId: string;
1919
+ } | {
1920
+ type: "anchor_visible";
1921
+ anchorId: string;
1922
+ state: "visible" | "present" | "absent";
1923
+ } | {
1924
+ type: "event_occurred";
1925
+ eventName: string;
1926
+ withinMs?: number | undefined;
1927
+ } | {
1928
+ type: "state_equals";
1929
+ key: string;
1930
+ value?: unknown;
1931
+ } | {
1932
+ type: "viewport";
1933
+ minWidth?: number | undefined;
1934
+ maxWidth?: number | undefined;
1935
+ minHeight?: number | undefined;
1936
+ maxHeight?: number | undefined;
1937
+ } | {
1938
+ type: "session_metric";
1939
+ key: "time_on_page" | "page_views" | "scroll_depth";
1940
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1941
+ threshold: number;
1942
+ } | {
1943
+ type: "dismissed";
1944
+ key: string;
1945
+ inverted?: boolean | undefined;
1946
+ } | {
1947
+ type: "cooldown_active";
1948
+ key: string;
1949
+ inverted?: boolean | undefined;
1950
+ } | {
1951
+ type: "frequency_limit";
1952
+ key: string;
1953
+ limit: number;
1954
+ inverted?: boolean | undefined;
1955
+ } | {
1956
+ type: "event_count";
1957
+ key: string;
1958
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
1959
+ count: number;
1960
+ withinMs?: number | undefined;
1961
+ counter?: {
1962
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
1963
+ match?: Record<string, {
1964
+ equals?: string | number | boolean | undefined;
1965
+ contains?: string | undefined;
1966
+ }> | undefined;
1967
+ } | undefined;
1968
+ })[];
1969
+ value?: unknown;
1970
+ }[];
1971
+ default?: unknown;
1972
+ }>, z.ZodObject<{
1973
+ type: z.ZodLiteral<"score">;
1974
+ field: z.ZodString;
1975
+ threshold: z.ZodNumber;
1976
+ above: z.ZodUnknown;
1977
+ below: z.ZodUnknown;
1978
+ }, "strip", z.ZodTypeAny, {
1979
+ type: "score";
1980
+ threshold: number;
1981
+ field: string;
1982
+ above?: unknown;
1983
+ below?: unknown;
1984
+ }, {
1985
+ type: "score";
1986
+ threshold: number;
1987
+ field: string;
1988
+ above?: unknown;
1989
+ below?: unknown;
1990
+ }>, z.ZodObject<{
1991
+ type: z.ZodLiteral<"model">;
1992
+ modelId: z.ZodString;
1993
+ inputs: z.ZodArray<z.ZodString, "many">;
1994
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1995
+ default: z.ZodUnknown;
1996
+ }, "strip", z.ZodTypeAny, {
1997
+ type: "model";
1998
+ modelId: string;
1999
+ inputs: string[];
2000
+ outputMapping: Record<string, unknown>;
2001
+ default?: unknown;
2002
+ }, {
2003
+ type: "model";
2004
+ modelId: string;
2005
+ inputs: string[];
2006
+ outputMapping: Record<string, unknown>;
2007
+ default?: unknown;
2008
+ }>, z.ZodObject<{
2009
+ type: z.ZodLiteral<"external">;
2010
+ endpoint: z.ZodString;
2011
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
2012
+ default: z.ZodUnknown;
2013
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
2014
+ }, "strip", z.ZodTypeAny, {
2015
+ type: "external";
2016
+ endpoint: string;
2017
+ default?: unknown;
2018
+ method?: "GET" | "POST" | undefined;
2019
+ timeoutMs?: number | undefined;
2020
+ }, {
2021
+ type: "external";
2022
+ endpoint: string;
2023
+ default?: unknown;
2024
+ method?: "GET" | "POST" | undefined;
2025
+ timeoutMs?: number | undefined;
2026
+ }>]>>>;
2027
+ notify: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2028
+ title: z.ZodOptional<z.ZodString>;
2029
+ body: z.ZodOptional<z.ZodString>;
2030
+ icon: z.ZodOptional<z.ZodString>;
2031
+ }, "strip", z.ZodTypeAny, {
2032
+ title?: string | undefined;
2033
+ body?: string | undefined;
2034
+ icon?: string | undefined;
2035
+ }, {
2036
+ title?: string | undefined;
2037
+ body?: string | undefined;
2038
+ icon?: string | undefined;
2039
+ }>>>;
2040
+ id: z.ZodOptional<z.ZodString>;
2041
+ title: z.ZodOptional<z.ZodString>;
2042
+ description: z.ZodOptional<z.ZodString>;
2043
+ validation: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2044
+ }, "strip", z.ZodTypeAny, {
2045
+ config: {
2046
+ id: string;
2047
+ title: string;
2048
+ payload: {
2049
+ widget: string;
2050
+ props?: Record<string, unknown> | undefined;
2051
+ };
2052
+ };
2053
+ kind: "suggestions:chip";
2054
+ id?: string | undefined;
2055
+ title?: string | undefined;
2056
+ validation?: string[] | undefined;
2057
+ triggerWhen?: {
2058
+ type: "rules";
2059
+ rules: {
2060
+ conditions: ({
2061
+ type: "page_url";
2062
+ url: string;
2063
+ } | {
2064
+ type: "route";
2065
+ routeId: string;
2066
+ } | {
2067
+ type: "anchor_visible";
2068
+ anchorId: string;
2069
+ state: "visible" | "present" | "absent";
2070
+ } | {
2071
+ type: "event_occurred";
2072
+ eventName: string;
2073
+ withinMs?: number | undefined;
2074
+ } | {
2075
+ type: "state_equals";
2076
+ key: string;
2077
+ value?: unknown;
2078
+ } | {
2079
+ type: "viewport";
2080
+ minWidth?: number | undefined;
2081
+ maxWidth?: number | undefined;
2082
+ minHeight?: number | undefined;
2083
+ maxHeight?: number | undefined;
2084
+ } | {
2085
+ type: "session_metric";
2086
+ key: "time_on_page" | "page_views" | "scroll_depth";
2087
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2088
+ threshold: number;
2089
+ } | {
2090
+ type: "dismissed";
2091
+ key: string;
2092
+ inverted?: boolean | undefined;
2093
+ } | {
2094
+ type: "cooldown_active";
2095
+ key: string;
2096
+ inverted?: boolean | undefined;
2097
+ } | {
2098
+ type: "frequency_limit";
2099
+ key: string;
2100
+ limit: number;
2101
+ inverted?: boolean | undefined;
2102
+ } | {
2103
+ type: "event_count";
2104
+ key: string;
2105
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2106
+ count: number;
2107
+ withinMs?: number | undefined;
2108
+ counter?: {
2109
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2110
+ match?: Record<string, {
2111
+ equals?: string | number | boolean | undefined;
2112
+ contains?: string | undefined;
2113
+ }> | undefined;
2114
+ } | undefined;
2115
+ })[];
2116
+ value?: unknown;
2117
+ }[];
2118
+ default?: unknown;
2119
+ } | {
2120
+ type: "score";
2121
+ threshold: number;
2122
+ field: string;
2123
+ above?: unknown;
2124
+ below?: unknown;
2125
+ } | {
2126
+ type: "model";
2127
+ modelId: string;
2128
+ inputs: string[];
2129
+ outputMapping: Record<string, unknown>;
2130
+ default?: unknown;
2131
+ } | {
2132
+ type: "external";
2133
+ endpoint: string;
2134
+ default?: unknown;
2135
+ method?: "GET" | "POST" | undefined;
2136
+ timeoutMs?: number | undefined;
2137
+ } | null | undefined;
2138
+ notify?: {
2139
+ title?: string | undefined;
2140
+ body?: string | undefined;
2141
+ icon?: string | undefined;
2142
+ } | null | undefined;
2143
+ description?: string | undefined;
2144
+ }, {
2145
+ config: {
2146
+ id: string;
2147
+ title: string;
2148
+ payload: {
2149
+ widget: string;
2150
+ props?: Record<string, unknown> | undefined;
2151
+ };
2152
+ };
2153
+ kind: "suggestions:chip";
2154
+ id?: string | undefined;
2155
+ title?: string | undefined;
2156
+ validation?: string[] | undefined;
2157
+ triggerWhen?: {
2158
+ type: "rules";
2159
+ rules: {
2160
+ conditions: ({
2161
+ type: "page_url";
2162
+ url: string;
2163
+ } | {
2164
+ type: "route";
2165
+ routeId: string;
2166
+ } | {
2167
+ type: "anchor_visible";
2168
+ anchorId: string;
2169
+ state: "visible" | "present" | "absent";
2170
+ } | {
2171
+ type: "event_occurred";
2172
+ eventName: string;
2173
+ withinMs?: number | undefined;
2174
+ } | {
2175
+ type: "state_equals";
2176
+ key: string;
2177
+ value?: unknown;
2178
+ } | {
2179
+ type: "viewport";
2180
+ minWidth?: number | undefined;
2181
+ maxWidth?: number | undefined;
2182
+ minHeight?: number | undefined;
2183
+ maxHeight?: number | undefined;
2184
+ } | {
2185
+ type: "session_metric";
2186
+ key: "time_on_page" | "page_views" | "scroll_depth";
2187
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2188
+ threshold: number;
2189
+ } | {
2190
+ type: "dismissed";
2191
+ key: string;
2192
+ inverted?: boolean | undefined;
2193
+ } | {
2194
+ type: "cooldown_active";
2195
+ key: string;
2196
+ inverted?: boolean | undefined;
2197
+ } | {
2198
+ type: "frequency_limit";
2199
+ key: string;
2200
+ limit: number;
2201
+ inverted?: boolean | undefined;
2202
+ } | {
2203
+ type: "event_count";
2204
+ key: string;
2205
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2206
+ count: number;
2207
+ withinMs?: number | undefined;
2208
+ counter?: {
2209
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2210
+ match?: Record<string, {
2211
+ equals?: string | number | boolean | undefined;
2212
+ contains?: string | undefined;
2213
+ }> | undefined;
2214
+ } | undefined;
2215
+ })[];
2216
+ value?: unknown;
2217
+ }[];
2218
+ default?: unknown;
2219
+ } | {
2220
+ type: "score";
2221
+ threshold: number;
2222
+ field: string;
2223
+ above?: unknown;
2224
+ below?: unknown;
2225
+ } | {
2226
+ type: "model";
2227
+ modelId: string;
2228
+ inputs: string[];
2229
+ outputMapping: Record<string, unknown>;
2230
+ default?: unknown;
2231
+ } | {
2232
+ type: "external";
2233
+ endpoint: string;
2234
+ default?: unknown;
2235
+ method?: "GET" | "POST" | undefined;
2236
+ timeoutMs?: number | undefined;
2237
+ } | null | undefined;
2238
+ notify?: {
2239
+ title?: string | undefined;
2240
+ body?: string | undefined;
2241
+ icon?: string | undefined;
2242
+ } | null | undefined;
2243
+ description?: string | undefined;
2244
+ }>, {
2245
+ config: {
2246
+ id: string;
2247
+ title: string;
2248
+ payload: {
2249
+ widget: string;
2250
+ props?: Record<string, unknown> | undefined;
2251
+ };
2252
+ };
2253
+ kind: "suggestions:chip";
2254
+ id?: string | undefined;
2255
+ title?: string | undefined;
2256
+ validation?: string[] | undefined;
2257
+ triggerWhen?: {
2258
+ type: "rules";
2259
+ rules: {
2260
+ conditions: ({
2261
+ type: "page_url";
2262
+ url: string;
2263
+ } | {
2264
+ type: "route";
2265
+ routeId: string;
2266
+ } | {
2267
+ type: "anchor_visible";
2268
+ anchorId: string;
2269
+ state: "visible" | "present" | "absent";
2270
+ } | {
2271
+ type: "event_occurred";
2272
+ eventName: string;
2273
+ withinMs?: number | undefined;
2274
+ } | {
2275
+ type: "state_equals";
2276
+ key: string;
2277
+ value?: unknown;
2278
+ } | {
2279
+ type: "viewport";
2280
+ minWidth?: number | undefined;
2281
+ maxWidth?: number | undefined;
2282
+ minHeight?: number | undefined;
2283
+ maxHeight?: number | undefined;
2284
+ } | {
2285
+ type: "session_metric";
2286
+ key: "time_on_page" | "page_views" | "scroll_depth";
2287
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2288
+ threshold: number;
2289
+ } | {
2290
+ type: "dismissed";
2291
+ key: string;
2292
+ inverted?: boolean | undefined;
2293
+ } | {
2294
+ type: "cooldown_active";
2295
+ key: string;
2296
+ inverted?: boolean | undefined;
2297
+ } | {
2298
+ type: "frequency_limit";
2299
+ key: string;
2300
+ limit: number;
2301
+ inverted?: boolean | undefined;
2302
+ } | {
2303
+ type: "event_count";
2304
+ key: string;
2305
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2306
+ count: number;
2307
+ withinMs?: number | undefined;
2308
+ counter?: {
2309
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2310
+ match?: Record<string, {
2311
+ equals?: string | number | boolean | undefined;
2312
+ contains?: string | undefined;
2313
+ }> | undefined;
2314
+ } | undefined;
2315
+ })[];
2316
+ value?: unknown;
2317
+ }[];
2318
+ default?: unknown;
2319
+ } | {
2320
+ type: "score";
2321
+ threshold: number;
2322
+ field: string;
2323
+ above?: unknown;
2324
+ below?: unknown;
2325
+ } | {
2326
+ type: "model";
2327
+ modelId: string;
2328
+ inputs: string[];
2329
+ outputMapping: Record<string, unknown>;
2330
+ default?: unknown;
2331
+ } | {
2332
+ type: "external";
2333
+ endpoint: string;
2334
+ default?: unknown;
2335
+ method?: "GET" | "POST" | undefined;
2336
+ timeoutMs?: number | undefined;
2337
+ } | null | undefined;
2338
+ notify?: {
2339
+ title?: string | undefined;
2340
+ body?: string | undefined;
2341
+ icon?: string | undefined;
2342
+ } | null | undefined;
2343
+ description?: string | undefined;
2344
+ }, {
2345
+ config: {
2346
+ id: string;
2347
+ title: string;
2348
+ payload: {
2349
+ widget: string;
2350
+ props?: Record<string, unknown> | undefined;
2351
+ };
2352
+ };
2353
+ kind: "suggestions:chip";
2354
+ id?: string | undefined;
2355
+ title?: string | undefined;
2356
+ validation?: string[] | undefined;
2357
+ triggerWhen?: {
2358
+ type: "rules";
2359
+ rules: {
2360
+ conditions: ({
2361
+ type: "page_url";
2362
+ url: string;
2363
+ } | {
2364
+ type: "route";
2365
+ routeId: string;
2366
+ } | {
2367
+ type: "anchor_visible";
2368
+ anchorId: string;
2369
+ state: "visible" | "present" | "absent";
2370
+ } | {
2371
+ type: "event_occurred";
2372
+ eventName: string;
2373
+ withinMs?: number | undefined;
2374
+ } | {
2375
+ type: "state_equals";
2376
+ key: string;
2377
+ value?: unknown;
2378
+ } | {
2379
+ type: "viewport";
2380
+ minWidth?: number | undefined;
2381
+ maxWidth?: number | undefined;
2382
+ minHeight?: number | undefined;
2383
+ maxHeight?: number | undefined;
2384
+ } | {
2385
+ type: "session_metric";
2386
+ key: "time_on_page" | "page_views" | "scroll_depth";
2387
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2388
+ threshold: number;
2389
+ } | {
2390
+ type: "dismissed";
2391
+ key: string;
2392
+ inverted?: boolean | undefined;
2393
+ } | {
2394
+ type: "cooldown_active";
2395
+ key: string;
2396
+ inverted?: boolean | undefined;
2397
+ } | {
2398
+ type: "frequency_limit";
2399
+ key: string;
2400
+ limit: number;
2401
+ inverted?: boolean | undefined;
2402
+ } | {
2403
+ type: "event_count";
2404
+ key: string;
2405
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2406
+ count: number;
2407
+ withinMs?: number | undefined;
2408
+ counter?: {
2409
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2410
+ match?: Record<string, {
2411
+ equals?: string | number | boolean | undefined;
2412
+ contains?: string | undefined;
2413
+ }> | undefined;
2414
+ } | undefined;
2415
+ })[];
2416
+ value?: unknown;
2417
+ }[];
2418
+ default?: unknown;
2419
+ } | {
2420
+ type: "score";
2421
+ threshold: number;
2422
+ field: string;
2423
+ above?: unknown;
2424
+ below?: unknown;
2425
+ } | {
2426
+ type: "model";
2427
+ modelId: string;
2428
+ inputs: string[];
2429
+ outputMapping: Record<string, unknown>;
2430
+ default?: unknown;
2431
+ } | {
2432
+ type: "external";
2433
+ endpoint: string;
2434
+ default?: unknown;
2435
+ method?: "GET" | "POST" | undefined;
2436
+ timeoutMs?: number | undefined;
2437
+ } | null | undefined;
2438
+ notify?: {
2439
+ title?: string | undefined;
2440
+ body?: string | undefined;
2441
+ icon?: string | undefined;
2442
+ } | null | undefined;
2443
+ description?: string | undefined;
2444
+ }>, "many">>;
2445
+ }, "strict", z.ZodTypeAny, {
2446
+ chips: {
2447
+ config: {
2448
+ id: string;
2449
+ title: string;
2450
+ payload: {
2451
+ widget: string;
2452
+ props?: Record<string, unknown> | undefined;
2453
+ };
2454
+ };
2455
+ kind: "suggestions:chip";
2456
+ id?: string | undefined;
2457
+ title?: string | undefined;
2458
+ validation?: string[] | undefined;
2459
+ triggerWhen?: {
2460
+ type: "rules";
2461
+ rules: {
2462
+ conditions: ({
2463
+ type: "page_url";
2464
+ url: string;
2465
+ } | {
2466
+ type: "route";
2467
+ routeId: string;
2468
+ } | {
2469
+ type: "anchor_visible";
2470
+ anchorId: string;
2471
+ state: "visible" | "present" | "absent";
2472
+ } | {
2473
+ type: "event_occurred";
2474
+ eventName: string;
2475
+ withinMs?: number | undefined;
2476
+ } | {
2477
+ type: "state_equals";
2478
+ key: string;
2479
+ value?: unknown;
2480
+ } | {
2481
+ type: "viewport";
2482
+ minWidth?: number | undefined;
2483
+ maxWidth?: number | undefined;
2484
+ minHeight?: number | undefined;
2485
+ maxHeight?: number | undefined;
2486
+ } | {
2487
+ type: "session_metric";
2488
+ key: "time_on_page" | "page_views" | "scroll_depth";
2489
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2490
+ threshold: number;
2491
+ } | {
2492
+ type: "dismissed";
2493
+ key: string;
2494
+ inverted?: boolean | undefined;
2495
+ } | {
2496
+ type: "cooldown_active";
2497
+ key: string;
2498
+ inverted?: boolean | undefined;
2499
+ } | {
2500
+ type: "frequency_limit";
2501
+ key: string;
2502
+ limit: number;
2503
+ inverted?: boolean | undefined;
2504
+ } | {
2505
+ type: "event_count";
2506
+ key: string;
2507
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2508
+ count: number;
2509
+ withinMs?: number | undefined;
2510
+ counter?: {
2511
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2512
+ match?: Record<string, {
2513
+ equals?: string | number | boolean | undefined;
2514
+ contains?: string | undefined;
2515
+ }> | undefined;
2516
+ } | undefined;
2517
+ })[];
2518
+ value?: unknown;
2519
+ }[];
2520
+ default?: unknown;
2521
+ } | {
2522
+ type: "score";
2523
+ threshold: number;
2524
+ field: string;
2525
+ above?: unknown;
2526
+ below?: unknown;
2527
+ } | {
2528
+ type: "model";
2529
+ modelId: string;
2530
+ inputs: string[];
2531
+ outputMapping: Record<string, unknown>;
2532
+ default?: unknown;
2533
+ } | {
2534
+ type: "external";
2535
+ endpoint: string;
2536
+ default?: unknown;
2537
+ method?: "GET" | "POST" | undefined;
2538
+ timeoutMs?: number | undefined;
2539
+ } | null | undefined;
2540
+ notify?: {
2541
+ title?: string | undefined;
2542
+ body?: string | undefined;
2543
+ icon?: string | undefined;
2544
+ } | null | undefined;
2545
+ description?: string | undefined;
2546
+ }[];
2547
+ }, {
2548
+ chips?: {
2549
+ config: {
2550
+ id: string;
2551
+ title: string;
2552
+ payload: {
2553
+ widget: string;
2554
+ props?: Record<string, unknown> | undefined;
2555
+ };
2556
+ };
2557
+ kind: "suggestions:chip";
2558
+ id?: string | undefined;
2559
+ title?: string | undefined;
2560
+ validation?: string[] | undefined;
2561
+ triggerWhen?: {
2562
+ type: "rules";
2563
+ rules: {
2564
+ conditions: ({
2565
+ type: "page_url";
2566
+ url: string;
2567
+ } | {
2568
+ type: "route";
2569
+ routeId: string;
2570
+ } | {
2571
+ type: "anchor_visible";
2572
+ anchorId: string;
2573
+ state: "visible" | "present" | "absent";
2574
+ } | {
2575
+ type: "event_occurred";
2576
+ eventName: string;
2577
+ withinMs?: number | undefined;
2578
+ } | {
2579
+ type: "state_equals";
2580
+ key: string;
2581
+ value?: unknown;
2582
+ } | {
2583
+ type: "viewport";
2584
+ minWidth?: number | undefined;
2585
+ maxWidth?: number | undefined;
2586
+ minHeight?: number | undefined;
2587
+ maxHeight?: number | undefined;
2588
+ } | {
2589
+ type: "session_metric";
2590
+ key: "time_on_page" | "page_views" | "scroll_depth";
2591
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2592
+ threshold: number;
2593
+ } | {
2594
+ type: "dismissed";
2595
+ key: string;
2596
+ inverted?: boolean | undefined;
2597
+ } | {
2598
+ type: "cooldown_active";
2599
+ key: string;
2600
+ inverted?: boolean | undefined;
2601
+ } | {
2602
+ type: "frequency_limit";
2603
+ key: string;
2604
+ limit: number;
2605
+ inverted?: boolean | undefined;
2606
+ } | {
2607
+ type: "event_count";
2608
+ key: string;
2609
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2610
+ count: number;
2611
+ withinMs?: number | undefined;
2612
+ counter?: {
2613
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2614
+ match?: Record<string, {
2615
+ equals?: string | number | boolean | undefined;
2616
+ contains?: string | undefined;
2617
+ }> | undefined;
2618
+ } | undefined;
2619
+ })[];
2620
+ value?: unknown;
2621
+ }[];
2622
+ default?: unknown;
2623
+ } | {
2624
+ type: "score";
2625
+ threshold: number;
2626
+ field: string;
2627
+ above?: unknown;
2628
+ below?: unknown;
2629
+ } | {
2630
+ type: "model";
2631
+ modelId: string;
2632
+ inputs: string[];
2633
+ outputMapping: Record<string, unknown>;
2634
+ default?: unknown;
2635
+ } | {
2636
+ type: "external";
2637
+ endpoint: string;
2638
+ default?: unknown;
2639
+ method?: "GET" | "POST" | undefined;
2640
+ timeoutMs?: number | undefined;
2641
+ } | null | undefined;
2642
+ notify?: {
2643
+ title?: string | undefined;
2644
+ body?: string | undefined;
2645
+ icon?: string | undefined;
2646
+ } | null | undefined;
2647
+ description?: string | undefined;
2648
+ }[] | undefined;
2649
+ }>;
2650
+ })[];
2651
+ /**
2652
+ * Action step schemas — registered into the unified canvas-config
2653
+ * JSON Schema's action-step union so authors (and the tactician LLM)
2654
+ * can emit `suggestions:chip` items inside a chips-strip tile's
2655
+ * `props.chips` array with full validation.
2656
+ *
2657
+ * `.innerType()` strips the `.refine()` wrapper (cross-field
2658
+ * refinements don't translate to JSON Schema); runtime Zod still
2659
+ * enforces them.
2660
+ */
2661
+ export declare const actionStepSchemas: {
2662
+ defName: string;
2663
+ schema: z.ZodObject<{
2664
+ kind: z.ZodLiteral<"suggestions:chip">;
2665
+ config: z.ZodObject<{
2666
+ id: z.ZodString;
2667
+ title: z.ZodString;
2668
+ payload: z.ZodObject<{
2669
+ widget: z.ZodString;
2670
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2671
+ }, "strict", z.ZodTypeAny, {
2672
+ widget: string;
2673
+ props?: Record<string, unknown> | undefined;
2674
+ }, {
2675
+ widget: string;
2676
+ props?: Record<string, unknown> | undefined;
2677
+ }>;
2678
+ }, "strip", z.ZodTypeAny, {
2679
+ id: string;
2680
+ title: string;
2681
+ payload: {
2682
+ widget: string;
2683
+ props?: Record<string, unknown> | undefined;
2684
+ };
2685
+ }, {
2686
+ id: string;
2687
+ title: string;
2688
+ payload: {
2689
+ widget: string;
2690
+ props?: Record<string, unknown> | undefined;
2691
+ };
2692
+ }>;
2693
+ triggerWhen: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2694
+ type: z.ZodLiteral<"rules">;
2695
+ rules: z.ZodArray<z.ZodObject<{
2696
+ conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2697
+ type: z.ZodLiteral<"page_url">;
2698
+ url: z.ZodString;
2699
+ }, "strip", z.ZodTypeAny, {
2700
+ type: "page_url";
2701
+ url: string;
2702
+ }, {
2703
+ type: "page_url";
2704
+ url: string;
2705
+ }>, z.ZodObject<{
2706
+ type: z.ZodLiteral<"route">;
2707
+ routeId: z.ZodString;
2708
+ }, "strip", z.ZodTypeAny, {
2709
+ type: "route";
2710
+ routeId: string;
2711
+ }, {
2712
+ type: "route";
2713
+ routeId: string;
2714
+ }>, z.ZodObject<{
2715
+ type: z.ZodLiteral<"anchor_visible">;
2716
+ anchorId: z.ZodString;
2717
+ state: z.ZodEnum<["visible", "present", "absent"]>;
2718
+ }, "strip", z.ZodTypeAny, {
2719
+ type: "anchor_visible";
2720
+ anchorId: string;
2721
+ state: "visible" | "present" | "absent";
2722
+ }, {
2723
+ type: "anchor_visible";
2724
+ anchorId: string;
2725
+ state: "visible" | "present" | "absent";
2726
+ }>, z.ZodObject<{
2727
+ type: z.ZodLiteral<"event_occurred">;
2728
+ eventName: z.ZodString;
2729
+ withinMs: z.ZodOptional<z.ZodNumber>;
2730
+ }, "strip", z.ZodTypeAny, {
2731
+ type: "event_occurred";
2732
+ eventName: string;
2733
+ withinMs?: number | undefined;
2734
+ }, {
2735
+ type: "event_occurred";
2736
+ eventName: string;
2737
+ withinMs?: number | undefined;
2738
+ }>, z.ZodObject<{
2739
+ type: z.ZodLiteral<"state_equals">;
2740
+ key: z.ZodString;
2741
+ value: z.ZodUnknown;
2742
+ }, "strip", z.ZodTypeAny, {
2743
+ type: "state_equals";
2744
+ key: string;
2745
+ value?: unknown;
2746
+ }, {
2747
+ type: "state_equals";
2748
+ key: string;
2749
+ value?: unknown;
2750
+ }>, z.ZodObject<{
2751
+ type: z.ZodLiteral<"viewport">;
2752
+ minWidth: z.ZodOptional<z.ZodNumber>;
2753
+ maxWidth: z.ZodOptional<z.ZodNumber>;
2754
+ minHeight: z.ZodOptional<z.ZodNumber>;
2755
+ maxHeight: z.ZodOptional<z.ZodNumber>;
2756
+ }, "strip", z.ZodTypeAny, {
2757
+ type: "viewport";
2758
+ minWidth?: number | undefined;
2759
+ maxWidth?: number | undefined;
2760
+ minHeight?: number | undefined;
2761
+ maxHeight?: number | undefined;
2762
+ }, {
2763
+ type: "viewport";
2764
+ minWidth?: number | undefined;
2765
+ maxWidth?: number | undefined;
2766
+ minHeight?: number | undefined;
2767
+ maxHeight?: number | undefined;
2768
+ }>, z.ZodObject<{
2769
+ type: z.ZodLiteral<"session_metric">;
2770
+ key: z.ZodEnum<["time_on_page", "page_views", "scroll_depth"]>;
2771
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
2772
+ threshold: z.ZodNumber;
2773
+ }, "strip", z.ZodTypeAny, {
2774
+ type: "session_metric";
2775
+ key: "time_on_page" | "page_views" | "scroll_depth";
2776
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2777
+ threshold: number;
2778
+ }, {
2779
+ type: "session_metric";
2780
+ key: "time_on_page" | "page_views" | "scroll_depth";
2781
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2782
+ threshold: number;
2783
+ }>, z.ZodObject<{
2784
+ type: z.ZodLiteral<"dismissed">;
2785
+ key: z.ZodString;
2786
+ inverted: z.ZodOptional<z.ZodBoolean>;
2787
+ }, "strip", z.ZodTypeAny, {
2788
+ type: "dismissed";
2789
+ key: string;
2790
+ inverted?: boolean | undefined;
2791
+ }, {
2792
+ type: "dismissed";
2793
+ key: string;
2794
+ inverted?: boolean | undefined;
2795
+ }>, z.ZodObject<{
2796
+ type: z.ZodLiteral<"cooldown_active">;
2797
+ key: z.ZodString;
2798
+ inverted: z.ZodOptional<z.ZodBoolean>;
2799
+ }, "strip", z.ZodTypeAny, {
2800
+ type: "cooldown_active";
2801
+ key: string;
2802
+ inverted?: boolean | undefined;
2803
+ }, {
2804
+ type: "cooldown_active";
2805
+ key: string;
2806
+ inverted?: boolean | undefined;
2807
+ }>, z.ZodObject<{
2808
+ type: z.ZodLiteral<"frequency_limit">;
2809
+ key: z.ZodString;
2810
+ limit: z.ZodNumber;
2811
+ inverted: z.ZodOptional<z.ZodBoolean>;
2812
+ }, "strip", z.ZodTypeAny, {
2813
+ type: "frequency_limit";
2814
+ key: string;
2815
+ limit: number;
2816
+ inverted?: boolean | undefined;
2817
+ }, {
2818
+ type: "frequency_limit";
2819
+ key: string;
2820
+ limit: number;
2821
+ inverted?: boolean | undefined;
2822
+ }>, z.ZodObject<{
2823
+ type: z.ZodLiteral<"event_count">;
2824
+ key: z.ZodString;
2825
+ operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
2826
+ count: z.ZodNumber;
2827
+ withinMs: z.ZodOptional<z.ZodNumber>;
2828
+ counter: z.ZodOptional<z.ZodObject<{
2829
+ events: z.ZodArray<z.ZodEnum<["ui.click", "ui.scroll", "ui.input", "ui.change", "ui.submit", "ui.hover", "ui.idle", "ui.scroll_thrash", "ui.focus_bounce", "ui.hesitate", "ui.rage_click", "nav.page_view", "nav.page_leave"]>, "many">;
2830
+ match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2831
+ equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
2832
+ contains: z.ZodOptional<z.ZodString>;
2833
+ }, "strip", z.ZodTypeAny, {
2834
+ equals?: string | number | boolean | undefined;
2835
+ contains?: string | undefined;
2836
+ }, {
2837
+ equals?: string | number | boolean | undefined;
2838
+ contains?: string | undefined;
2839
+ }>>>;
2840
+ }, "strip", z.ZodTypeAny, {
2841
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2842
+ match?: Record<string, {
2843
+ equals?: string | number | boolean | undefined;
2844
+ contains?: string | undefined;
2845
+ }> | undefined;
2846
+ }, {
2847
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2848
+ match?: Record<string, {
2849
+ equals?: string | number | boolean | undefined;
2850
+ contains?: string | undefined;
2851
+ }> | undefined;
2852
+ }>>;
2853
+ }, "strip", z.ZodTypeAny, {
2854
+ type: "event_count";
2855
+ key: string;
2856
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2857
+ count: number;
2858
+ withinMs?: number | undefined;
2859
+ counter?: {
2860
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2861
+ match?: Record<string, {
2862
+ equals?: string | number | boolean | undefined;
2863
+ contains?: string | undefined;
2864
+ }> | undefined;
2865
+ } | undefined;
2866
+ }, {
2867
+ type: "event_count";
2868
+ key: string;
2869
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2870
+ count: number;
2871
+ withinMs?: number | undefined;
2872
+ counter?: {
2873
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2874
+ match?: Record<string, {
2875
+ equals?: string | number | boolean | undefined;
2876
+ contains?: string | undefined;
2877
+ }> | undefined;
2878
+ } | undefined;
2879
+ }>]>, "many">;
2880
+ value: z.ZodUnknown;
2881
+ }, "strip", z.ZodTypeAny, {
2882
+ conditions: ({
2883
+ type: "page_url";
2884
+ url: string;
2885
+ } | {
2886
+ type: "route";
2887
+ routeId: string;
2888
+ } | {
2889
+ type: "anchor_visible";
2890
+ anchorId: string;
2891
+ state: "visible" | "present" | "absent";
2892
+ } | {
2893
+ type: "event_occurred";
2894
+ eventName: string;
2895
+ withinMs?: number | undefined;
2896
+ } | {
2897
+ type: "state_equals";
2898
+ key: string;
2899
+ value?: unknown;
2900
+ } | {
2901
+ type: "viewport";
2902
+ minWidth?: number | undefined;
2903
+ maxWidth?: number | undefined;
2904
+ minHeight?: number | undefined;
2905
+ maxHeight?: number | undefined;
2906
+ } | {
2907
+ type: "session_metric";
2908
+ key: "time_on_page" | "page_views" | "scroll_depth";
2909
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2910
+ threshold: number;
2911
+ } | {
2912
+ type: "dismissed";
2913
+ key: string;
2914
+ inverted?: boolean | undefined;
2915
+ } | {
2916
+ type: "cooldown_active";
2917
+ key: string;
2918
+ inverted?: boolean | undefined;
2919
+ } | {
2920
+ type: "frequency_limit";
2921
+ key: string;
2922
+ limit: number;
2923
+ inverted?: boolean | undefined;
2924
+ } | {
2925
+ type: "event_count";
2926
+ key: string;
2927
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2928
+ count: number;
2929
+ withinMs?: number | undefined;
2930
+ counter?: {
2931
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2932
+ match?: Record<string, {
2933
+ equals?: string | number | boolean | undefined;
2934
+ contains?: string | undefined;
2935
+ }> | undefined;
2936
+ } | undefined;
2937
+ })[];
2938
+ value?: unknown;
2939
+ }, {
2940
+ conditions: ({
2941
+ type: "page_url";
2942
+ url: string;
2943
+ } | {
2944
+ type: "route";
2945
+ routeId: string;
2946
+ } | {
2947
+ type: "anchor_visible";
2948
+ anchorId: string;
2949
+ state: "visible" | "present" | "absent";
2950
+ } | {
2951
+ type: "event_occurred";
2952
+ eventName: string;
2953
+ withinMs?: number | undefined;
2954
+ } | {
2955
+ type: "state_equals";
2956
+ key: string;
2957
+ value?: unknown;
2958
+ } | {
2959
+ type: "viewport";
2960
+ minWidth?: number | undefined;
2961
+ maxWidth?: number | undefined;
2962
+ minHeight?: number | undefined;
2963
+ maxHeight?: number | undefined;
2964
+ } | {
2965
+ type: "session_metric";
2966
+ key: "time_on_page" | "page_views" | "scroll_depth";
2967
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2968
+ threshold: number;
2969
+ } | {
2970
+ type: "dismissed";
2971
+ key: string;
2972
+ inverted?: boolean | undefined;
2973
+ } | {
2974
+ type: "cooldown_active";
2975
+ key: string;
2976
+ inverted?: boolean | undefined;
2977
+ } | {
2978
+ type: "frequency_limit";
2979
+ key: string;
2980
+ limit: number;
2981
+ inverted?: boolean | undefined;
2982
+ } | {
2983
+ type: "event_count";
2984
+ key: string;
2985
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
2986
+ count: number;
2987
+ withinMs?: number | undefined;
2988
+ counter?: {
2989
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
2990
+ match?: Record<string, {
2991
+ equals?: string | number | boolean | undefined;
2992
+ contains?: string | undefined;
2993
+ }> | undefined;
2994
+ } | undefined;
2995
+ })[];
2996
+ value?: unknown;
2997
+ }>, "many">;
2998
+ default: z.ZodUnknown;
2999
+ }, "strip", z.ZodTypeAny, {
3000
+ type: "rules";
3001
+ rules: {
3002
+ conditions: ({
3003
+ type: "page_url";
3004
+ url: string;
3005
+ } | {
3006
+ type: "route";
3007
+ routeId: string;
3008
+ } | {
3009
+ type: "anchor_visible";
3010
+ anchorId: string;
3011
+ state: "visible" | "present" | "absent";
3012
+ } | {
3013
+ type: "event_occurred";
3014
+ eventName: string;
3015
+ withinMs?: number | undefined;
3016
+ } | {
3017
+ type: "state_equals";
3018
+ key: string;
3019
+ value?: unknown;
3020
+ } | {
3021
+ type: "viewport";
3022
+ minWidth?: number | undefined;
3023
+ maxWidth?: number | undefined;
3024
+ minHeight?: number | undefined;
3025
+ maxHeight?: number | undefined;
3026
+ } | {
3027
+ type: "session_metric";
3028
+ key: "time_on_page" | "page_views" | "scroll_depth";
3029
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3030
+ threshold: number;
3031
+ } | {
3032
+ type: "dismissed";
3033
+ key: string;
3034
+ inverted?: boolean | undefined;
3035
+ } | {
3036
+ type: "cooldown_active";
3037
+ key: string;
3038
+ inverted?: boolean | undefined;
3039
+ } | {
3040
+ type: "frequency_limit";
3041
+ key: string;
3042
+ limit: number;
3043
+ inverted?: boolean | undefined;
3044
+ } | {
3045
+ type: "event_count";
3046
+ key: string;
3047
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3048
+ count: number;
3049
+ withinMs?: number | undefined;
3050
+ counter?: {
3051
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
3052
+ match?: Record<string, {
3053
+ equals?: string | number | boolean | undefined;
3054
+ contains?: string | undefined;
3055
+ }> | undefined;
3056
+ } | undefined;
3057
+ })[];
3058
+ value?: unknown;
3059
+ }[];
3060
+ default?: unknown;
3061
+ }, {
3062
+ type: "rules";
3063
+ rules: {
3064
+ conditions: ({
3065
+ type: "page_url";
3066
+ url: string;
3067
+ } | {
3068
+ type: "route";
3069
+ routeId: string;
3070
+ } | {
3071
+ type: "anchor_visible";
3072
+ anchorId: string;
3073
+ state: "visible" | "present" | "absent";
3074
+ } | {
3075
+ type: "event_occurred";
3076
+ eventName: string;
3077
+ withinMs?: number | undefined;
3078
+ } | {
3079
+ type: "state_equals";
3080
+ key: string;
3081
+ value?: unknown;
3082
+ } | {
3083
+ type: "viewport";
3084
+ minWidth?: number | undefined;
3085
+ maxWidth?: number | undefined;
3086
+ minHeight?: number | undefined;
3087
+ maxHeight?: number | undefined;
3088
+ } | {
3089
+ type: "session_metric";
3090
+ key: "time_on_page" | "page_views" | "scroll_depth";
3091
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3092
+ threshold: number;
3093
+ } | {
3094
+ type: "dismissed";
3095
+ key: string;
3096
+ inverted?: boolean | undefined;
3097
+ } | {
3098
+ type: "cooldown_active";
3099
+ key: string;
3100
+ inverted?: boolean | undefined;
3101
+ } | {
3102
+ type: "frequency_limit";
3103
+ key: string;
3104
+ limit: number;
3105
+ inverted?: boolean | undefined;
3106
+ } | {
3107
+ type: "event_count";
3108
+ key: string;
3109
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3110
+ count: number;
3111
+ withinMs?: number | undefined;
3112
+ counter?: {
3113
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
3114
+ match?: Record<string, {
3115
+ equals?: string | number | boolean | undefined;
3116
+ contains?: string | undefined;
3117
+ }> | undefined;
3118
+ } | undefined;
3119
+ })[];
3120
+ value?: unknown;
3121
+ }[];
3122
+ default?: unknown;
3123
+ }>, z.ZodObject<{
3124
+ type: z.ZodLiteral<"score">;
3125
+ field: z.ZodString;
3126
+ threshold: z.ZodNumber;
3127
+ above: z.ZodUnknown;
3128
+ below: z.ZodUnknown;
3129
+ }, "strip", z.ZodTypeAny, {
3130
+ type: "score";
3131
+ threshold: number;
3132
+ field: string;
3133
+ above?: unknown;
3134
+ below?: unknown;
3135
+ }, {
3136
+ type: "score";
3137
+ threshold: number;
3138
+ field: string;
3139
+ above?: unknown;
3140
+ below?: unknown;
3141
+ }>, z.ZodObject<{
3142
+ type: z.ZodLiteral<"model">;
3143
+ modelId: z.ZodString;
3144
+ inputs: z.ZodArray<z.ZodString, "many">;
3145
+ outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3146
+ default: z.ZodUnknown;
3147
+ }, "strip", z.ZodTypeAny, {
3148
+ type: "model";
3149
+ modelId: string;
3150
+ inputs: string[];
3151
+ outputMapping: Record<string, unknown>;
3152
+ default?: unknown;
3153
+ }, {
3154
+ type: "model";
3155
+ modelId: string;
3156
+ inputs: string[];
3157
+ outputMapping: Record<string, unknown>;
3158
+ default?: unknown;
3159
+ }>, z.ZodObject<{
3160
+ type: z.ZodLiteral<"external">;
3161
+ endpoint: z.ZodString;
3162
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
3163
+ default: z.ZodUnknown;
3164
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
3165
+ }, "strip", z.ZodTypeAny, {
3166
+ type: "external";
3167
+ endpoint: string;
3168
+ default?: unknown;
3169
+ method?: "GET" | "POST" | undefined;
3170
+ timeoutMs?: number | undefined;
3171
+ }, {
3172
+ type: "external";
3173
+ endpoint: string;
3174
+ default?: unknown;
3175
+ method?: "GET" | "POST" | undefined;
3176
+ timeoutMs?: number | undefined;
3177
+ }>]>>>;
3178
+ notify: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3179
+ title: z.ZodOptional<z.ZodString>;
3180
+ body: z.ZodOptional<z.ZodString>;
3181
+ icon: z.ZodOptional<z.ZodString>;
3182
+ }, "strip", z.ZodTypeAny, {
3183
+ title?: string | undefined;
3184
+ body?: string | undefined;
3185
+ icon?: string | undefined;
3186
+ }, {
3187
+ title?: string | undefined;
3188
+ body?: string | undefined;
3189
+ icon?: string | undefined;
3190
+ }>>>;
3191
+ id: z.ZodOptional<z.ZodString>;
3192
+ title: z.ZodOptional<z.ZodString>;
3193
+ description: z.ZodOptional<z.ZodString>;
3194
+ validation: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3195
+ }, "strip", z.ZodTypeAny, {
3196
+ config: {
3197
+ id: string;
3198
+ title: string;
3199
+ payload: {
3200
+ widget: string;
3201
+ props?: Record<string, unknown> | undefined;
3202
+ };
3203
+ };
3204
+ kind: "suggestions:chip";
3205
+ id?: string | undefined;
3206
+ title?: string | undefined;
3207
+ validation?: string[] | undefined;
3208
+ triggerWhen?: {
3209
+ type: "rules";
3210
+ rules: {
3211
+ conditions: ({
3212
+ type: "page_url";
3213
+ url: string;
3214
+ } | {
3215
+ type: "route";
3216
+ routeId: string;
3217
+ } | {
3218
+ type: "anchor_visible";
3219
+ anchorId: string;
3220
+ state: "visible" | "present" | "absent";
3221
+ } | {
3222
+ type: "event_occurred";
3223
+ eventName: string;
3224
+ withinMs?: number | undefined;
3225
+ } | {
3226
+ type: "state_equals";
3227
+ key: string;
3228
+ value?: unknown;
3229
+ } | {
3230
+ type: "viewport";
3231
+ minWidth?: number | undefined;
3232
+ maxWidth?: number | undefined;
3233
+ minHeight?: number | undefined;
3234
+ maxHeight?: number | undefined;
3235
+ } | {
3236
+ type: "session_metric";
3237
+ key: "time_on_page" | "page_views" | "scroll_depth";
3238
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3239
+ threshold: number;
3240
+ } | {
3241
+ type: "dismissed";
3242
+ key: string;
3243
+ inverted?: boolean | undefined;
3244
+ } | {
3245
+ type: "cooldown_active";
3246
+ key: string;
3247
+ inverted?: boolean | undefined;
3248
+ } | {
3249
+ type: "frequency_limit";
3250
+ key: string;
3251
+ limit: number;
3252
+ inverted?: boolean | undefined;
3253
+ } | {
3254
+ type: "event_count";
3255
+ key: string;
3256
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3257
+ count: number;
3258
+ withinMs?: number | undefined;
3259
+ counter?: {
3260
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
3261
+ match?: Record<string, {
3262
+ equals?: string | number | boolean | undefined;
3263
+ contains?: string | undefined;
3264
+ }> | undefined;
3265
+ } | undefined;
3266
+ })[];
3267
+ value?: unknown;
3268
+ }[];
3269
+ default?: unknown;
3270
+ } | {
3271
+ type: "score";
3272
+ threshold: number;
3273
+ field: string;
3274
+ above?: unknown;
3275
+ below?: unknown;
3276
+ } | {
3277
+ type: "model";
3278
+ modelId: string;
3279
+ inputs: string[];
3280
+ outputMapping: Record<string, unknown>;
3281
+ default?: unknown;
3282
+ } | {
3283
+ type: "external";
3284
+ endpoint: string;
3285
+ default?: unknown;
3286
+ method?: "GET" | "POST" | undefined;
3287
+ timeoutMs?: number | undefined;
3288
+ } | null | undefined;
3289
+ notify?: {
3290
+ title?: string | undefined;
3291
+ body?: string | undefined;
3292
+ icon?: string | undefined;
3293
+ } | null | undefined;
3294
+ description?: string | undefined;
3295
+ }, {
3296
+ config: {
3297
+ id: string;
3298
+ title: string;
3299
+ payload: {
3300
+ widget: string;
3301
+ props?: Record<string, unknown> | undefined;
3302
+ };
3303
+ };
3304
+ kind: "suggestions:chip";
3305
+ id?: string | undefined;
3306
+ title?: string | undefined;
3307
+ validation?: string[] | undefined;
3308
+ triggerWhen?: {
3309
+ type: "rules";
3310
+ rules: {
3311
+ conditions: ({
3312
+ type: "page_url";
3313
+ url: string;
3314
+ } | {
3315
+ type: "route";
3316
+ routeId: string;
3317
+ } | {
3318
+ type: "anchor_visible";
3319
+ anchorId: string;
3320
+ state: "visible" | "present" | "absent";
3321
+ } | {
3322
+ type: "event_occurred";
3323
+ eventName: string;
3324
+ withinMs?: number | undefined;
3325
+ } | {
3326
+ type: "state_equals";
3327
+ key: string;
3328
+ value?: unknown;
3329
+ } | {
3330
+ type: "viewport";
3331
+ minWidth?: number | undefined;
3332
+ maxWidth?: number | undefined;
3333
+ minHeight?: number | undefined;
3334
+ maxHeight?: number | undefined;
3335
+ } | {
3336
+ type: "session_metric";
3337
+ key: "time_on_page" | "page_views" | "scroll_depth";
3338
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3339
+ threshold: number;
3340
+ } | {
3341
+ type: "dismissed";
3342
+ key: string;
3343
+ inverted?: boolean | undefined;
3344
+ } | {
3345
+ type: "cooldown_active";
3346
+ key: string;
3347
+ inverted?: boolean | undefined;
3348
+ } | {
3349
+ type: "frequency_limit";
3350
+ key: string;
3351
+ limit: number;
3352
+ inverted?: boolean | undefined;
3353
+ } | {
3354
+ type: "event_count";
3355
+ key: string;
3356
+ operator: "gte" | "lte" | "eq" | "gt" | "lt";
3357
+ count: number;
3358
+ withinMs?: number | undefined;
3359
+ counter?: {
3360
+ events: ("ui.click" | "ui.scroll" | "ui.input" | "ui.change" | "ui.submit" | "ui.hover" | "ui.idle" | "ui.scroll_thrash" | "ui.focus_bounce" | "ui.hesitate" | "ui.rage_click" | "nav.page_view" | "nav.page_leave")[];
3361
+ match?: Record<string, {
3362
+ equals?: string | number | boolean | undefined;
3363
+ contains?: string | undefined;
3364
+ }> | undefined;
3365
+ } | undefined;
3366
+ })[];
3367
+ value?: unknown;
3368
+ }[];
3369
+ default?: unknown;
3370
+ } | {
3371
+ type: "score";
3372
+ threshold: number;
3373
+ field: string;
3374
+ above?: unknown;
3375
+ below?: unknown;
3376
+ } | {
3377
+ type: "model";
3378
+ modelId: string;
3379
+ inputs: string[];
3380
+ outputMapping: Record<string, unknown>;
3381
+ default?: unknown;
3382
+ } | {
3383
+ type: "external";
3384
+ endpoint: string;
3385
+ default?: unknown;
3386
+ method?: "GET" | "POST" | undefined;
3387
+ timeoutMs?: number | undefined;
3388
+ } | null | undefined;
3389
+ notify?: {
3390
+ title?: string | undefined;
3391
+ body?: string | undefined;
3392
+ icon?: string | undefined;
3393
+ } | null | undefined;
3394
+ description?: string | undefined;
66
3395
  }>;
67
3396
  }[];
68
3397
  //# sourceMappingURL=schema.d.ts.map