@syntrologie/adapt-nav 2.8.0-canary.31 → 2.8.0-canary.310

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 (144) hide show
  1. package/dist/NavWidgetLit.d.ts +56 -0
  2. package/dist/NavWidgetLit.d.ts.map +1 -0
  3. package/dist/NavWidgetLit.editable.d.ts +151 -0
  4. package/dist/NavWidgetLit.editable.d.ts.map +1 -0
  5. package/dist/NavWidgetLit.test.d.ts +8 -0
  6. package/dist/NavWidgetLit.test.d.ts.map +1 -0
  7. package/dist/chunk-SX36IHRC.js +640 -0
  8. package/dist/chunk-SX36IHRC.js.map +7 -0
  9. package/dist/editor.d.ts +66 -21
  10. package/dist/editor.d.ts.map +1 -1
  11. package/dist/editor.js +5627 -307
  12. package/dist/editor.js.map +7 -0
  13. package/dist/nav-item-editor.d.ts +43 -0
  14. package/dist/nav-item-editor.d.ts.map +1 -0
  15. package/dist/resolveNavTarget.d.ts +61 -0
  16. package/dist/resolveNavTarget.d.ts.map +1 -0
  17. package/dist/resolveNavTarget.test.d.ts +2 -0
  18. package/dist/resolveNavTarget.test.d.ts.map +1 -0
  19. package/dist/runtime.d.ts +22 -6
  20. package/dist/runtime.d.ts.map +1 -1
  21. package/dist/runtime.js +643 -142
  22. package/dist/runtime.js.map +7 -0
  23. package/dist/schema.d.ts +316 -174
  24. package/dist/schema.d.ts.map +1 -1
  25. package/dist/schema.js +155 -125
  26. package/dist/schema.js.map +7 -0
  27. package/dist/types.d.ts +7 -0
  28. package/dist/types.d.ts.map +1 -1
  29. package/package.json +12 -16
  30. package/dist/NavWidget.d.ts +0 -31
  31. package/dist/NavWidget.d.ts.map +0 -1
  32. package/dist/NavWidget.js +0 -491
  33. package/dist/cdn.d.ts +0 -62
  34. package/dist/cdn.d.ts.map +0 -1
  35. package/dist/cdn.js +0 -48
  36. package/dist/summarize.js +0 -51
  37. package/dist/types.js +0 -18
  38. package/node_modules/@syntro/design-system/README.md +0 -335
  39. package/node_modules/@syntro/design-system/dist/assets/syntrologie-logo.svg +0 -21
  40. package/node_modules/@syntro/design-system/dist/assets/syntrologie-logomark.svg +0 -10
  41. package/node_modules/@syntro/design-system/dist/index.d.ts +0 -8
  42. package/node_modules/@syntro/design-system/dist/index.d.ts.map +0 -1
  43. package/node_modules/@syntro/design-system/dist/index.js +0 -7
  44. package/node_modules/@syntro/design-system/dist/tailwind-preset.d.ts +0 -19
  45. package/node_modules/@syntro/design-system/dist/tailwind-preset.d.ts.map +0 -1
  46. package/node_modules/@syntro/design-system/dist/tailwind-preset.js +0 -453
  47. package/node_modules/@syntro/design-system/dist/tokens/colors.css +0 -464
  48. package/node_modules/@syntro/design-system/dist/tokens/colors.d.ts +0 -874
  49. package/node_modules/@syntro/design-system/dist/tokens/colors.d.ts.map +0 -1
  50. package/node_modules/@syntro/design-system/dist/tokens/colors.js +0 -564
  51. package/node_modules/@syntro/design-system/dist/tokens/effects.css +0 -43
  52. package/node_modules/@syntro/design-system/dist/tokens/effects.d.ts +0 -85
  53. package/node_modules/@syntro/design-system/dist/tokens/effects.d.ts.map +0 -1
  54. package/node_modules/@syntro/design-system/dist/tokens/effects.js +0 -77
  55. package/node_modules/@syntro/design-system/dist/tokens/index.d.ts +0 -10
  56. package/node_modules/@syntro/design-system/dist/tokens/index.d.ts.map +0 -1
  57. package/node_modules/@syntro/design-system/dist/tokens/index.js +0 -9
  58. package/node_modules/@syntro/design-system/package.json +0 -55
  59. package/node_modules/@syntro/design-system/src/assets/syntrologie-logo.svg +0 -21
  60. package/node_modules/@syntro/design-system/src/assets/syntrologie-logomark.svg +0 -10
  61. package/node_modules/@syntrologie/sdk-contracts/dist/index.d.ts +0 -129
  62. package/node_modules/@syntrologie/sdk-contracts/dist/index.js +0 -15
  63. package/node_modules/@syntrologie/sdk-contracts/dist/schemas.d.ts +0 -2225
  64. package/node_modules/@syntrologie/sdk-contracts/dist/schemas.js +0 -162
  65. package/node_modules/@syntrologie/sdk-contracts/package.json +0 -33
  66. package/node_modules/@syntrologie/shared-editor-ui/dist/cn.d.ts +0 -2
  67. package/node_modules/@syntrologie/shared-editor-ui/dist/cn.d.ts.map +0 -1
  68. package/node_modules/@syntrologie/shared-editor-ui/dist/cn.js +0 -3
  69. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPicker.d.ts +0 -34
  70. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPicker.d.ts.map +0 -1
  71. package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPicker.js +0 -158
  72. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggle.d.ts +0 -7
  73. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggle.d.ts.map +0 -1
  74. package/node_modules/@syntrologie/shared-editor-ui/dist/components/BeforeAfterToggle.js +0 -9
  75. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.d.ts +0 -23
  76. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.d.ts.map +0 -1
  77. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.js +0 -40
  78. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.d.ts +0 -7
  79. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.d.ts.map +0 -1
  80. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.js +0 -22
  81. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSection.d.ts +0 -8
  82. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSection.d.ts.map +0 -1
  83. package/node_modules/@syntrologie/shared-editor-ui/dist/components/DismissedSection.js +0 -9
  84. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButton.d.ts +0 -7
  85. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButton.d.ts.map +0 -1
  86. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditBackButton.js +0 -4
  87. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBody.d.ts +0 -7
  88. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBody.d.ts.map +0 -1
  89. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorBody.js +0 -4
  90. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCard.d.ts +0 -13
  91. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCard.d.ts.map +0 -1
  92. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorCard.js +0 -15
  93. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooter.d.ts +0 -7
  94. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooter.d.ts.map +0 -1
  95. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorFooter.js +0 -4
  96. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeader.d.ts +0 -9
  97. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeader.d.ts.map +0 -1
  98. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorHeader.js +0 -4
  99. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInput.d.ts +0 -8
  100. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInput.d.ts.map +0 -1
  101. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorInput.js +0 -8
  102. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayout.d.ts +0 -7
  103. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayout.d.ts.map +0 -1
  104. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorLayout.js +0 -4
  105. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.d.ts +0 -25
  106. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.d.ts.map +0 -1
  107. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.js +0 -379
  108. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelect.d.ts +0 -8
  109. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelect.d.ts.map +0 -1
  110. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorSelect.js +0 -8
  111. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextarea.d.ts +0 -8
  112. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextarea.d.ts.map +0 -1
  113. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorTextarea.js +0 -17
  114. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlight.d.ts +0 -32
  115. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlight.d.ts.map +0 -1
  116. package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlight.js +0 -85
  117. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyState.d.ts +0 -6
  118. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyState.d.ts.map +0 -1
  119. package/node_modules/@syntrologie/shared-editor-ui/dist/components/EmptyState.js +0 -4
  120. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeader.d.ts +0 -8
  121. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeader.d.ts.map +0 -1
  122. package/node_modules/@syntrologie/shared-editor-ui/dist/components/GroupHeader.js +0 -5
  123. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.d.ts +0 -12
  124. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.d.ts.map +0 -1
  125. package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.js +0 -40
  126. package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.d.ts +0 -26
  127. package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.d.ts.map +0 -1
  128. package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.js +0 -202
  129. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useElementRect.d.ts +0 -8
  130. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useElementRect.d.ts.map +0 -1
  131. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useElementRect.js +0 -46
  132. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.d.ts +0 -24
  133. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.d.ts.map +0 -1
  134. package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.js +0 -86
  135. package/node_modules/@syntrologie/shared-editor-ui/dist/index.d.ts +0 -34
  136. package/node_modules/@syntrologie/shared-editor-ui/dist/index.d.ts.map +0 -1
  137. package/node_modules/@syntrologie/shared-editor-ui/dist/index.js +0 -25
  138. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.d.ts +0 -37
  139. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.d.ts.map +0 -1
  140. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/elementChainRecommender.js +0 -52
  141. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/selectorGenerator.d.ts +0 -22
  142. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/selectorGenerator.d.ts.map +0 -1
  143. package/node_modules/@syntrologie/shared-editor-ui/dist/utils/selectorGenerator.js +0 -143
  144. package/node_modules/@syntrologie/shared-editor-ui/package.json +0 -45
@@ -1,2225 +0,0 @@
1
- /**
2
- * Shared Zod schemas for decision strategies, conditions, and event scoping.
3
- *
4
- * These are the canonical definitions — runtime-sdk and all adaptive packages
5
- * should import from here instead of duplicating.
6
- */
7
- import { z } from 'zod';
8
- export declare const AnchorIdZ: z.ZodObject<{
9
- selector: z.ZodString;
10
- route: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
11
- }, "strict", z.ZodTypeAny, {
12
- selector: string;
13
- route: string | string[];
14
- }, {
15
- selector: string;
16
- route: string | string[];
17
- }>;
18
- export declare const PageUrlConditionZ: z.ZodObject<{
19
- type: z.ZodLiteral<"page_url">;
20
- url: z.ZodString;
21
- }, "strip", z.ZodTypeAny, {
22
- type: "page_url";
23
- url: string;
24
- }, {
25
- type: "page_url";
26
- url: string;
27
- }>;
28
- export declare const RouteConditionZ: z.ZodObject<{
29
- type: z.ZodLiteral<"route">;
30
- routeId: z.ZodString;
31
- }, "strip", z.ZodTypeAny, {
32
- type: "route";
33
- routeId: string;
34
- }, {
35
- type: "route";
36
- routeId: string;
37
- }>;
38
- export declare const AnchorVisibleConditionZ: z.ZodObject<{
39
- type: z.ZodLiteral<"anchor_visible">;
40
- anchorId: z.ZodString;
41
- state: z.ZodEnum<["visible", "present", "absent"]>;
42
- }, "strip", z.ZodTypeAny, {
43
- type: "anchor_visible";
44
- anchorId: string;
45
- state: "visible" | "present" | "absent";
46
- }, {
47
- type: "anchor_visible";
48
- anchorId: string;
49
- state: "visible" | "present" | "absent";
50
- }>;
51
- export declare const EventOccurredConditionZ: z.ZodObject<{
52
- type: z.ZodLiteral<"event_occurred">;
53
- eventName: z.ZodString;
54
- withinMs: z.ZodOptional<z.ZodNumber>;
55
- }, "strip", z.ZodTypeAny, {
56
- type: "event_occurred";
57
- eventName: string;
58
- withinMs?: number | undefined;
59
- }, {
60
- type: "event_occurred";
61
- eventName: string;
62
- withinMs?: number | undefined;
63
- }>;
64
- export declare const StateEqualsConditionZ: z.ZodObject<{
65
- type: z.ZodLiteral<"state_equals">;
66
- key: z.ZodString;
67
- value: z.ZodUnknown;
68
- }, "strip", z.ZodTypeAny, {
69
- type: "state_equals";
70
- key: string;
71
- value?: unknown;
72
- }, {
73
- type: "state_equals";
74
- key: string;
75
- value?: unknown;
76
- }>;
77
- export declare const ViewportConditionZ: z.ZodObject<{
78
- type: z.ZodLiteral<"viewport">;
79
- minWidth: z.ZodOptional<z.ZodNumber>;
80
- maxWidth: z.ZodOptional<z.ZodNumber>;
81
- minHeight: z.ZodOptional<z.ZodNumber>;
82
- maxHeight: z.ZodOptional<z.ZodNumber>;
83
- }, "strip", z.ZodTypeAny, {
84
- type: "viewport";
85
- minWidth?: number | undefined;
86
- maxWidth?: number | undefined;
87
- minHeight?: number | undefined;
88
- maxHeight?: number | undefined;
89
- }, {
90
- type: "viewport";
91
- minWidth?: number | undefined;
92
- maxWidth?: number | undefined;
93
- minHeight?: number | undefined;
94
- maxHeight?: number | undefined;
95
- }>;
96
- export declare const SessionMetricConditionZ: z.ZodObject<{
97
- type: z.ZodLiteral<"session_metric">;
98
- key: z.ZodString;
99
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
100
- threshold: z.ZodNumber;
101
- }, "strip", z.ZodTypeAny, {
102
- type: "session_metric";
103
- key: string;
104
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
105
- threshold: number;
106
- }, {
107
- type: "session_metric";
108
- key: string;
109
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
110
- threshold: number;
111
- }>;
112
- export declare const DismissedConditionZ: z.ZodObject<{
113
- type: z.ZodLiteral<"dismissed">;
114
- key: z.ZodString;
115
- inverted: z.ZodOptional<z.ZodBoolean>;
116
- }, "strip", z.ZodTypeAny, {
117
- type: "dismissed";
118
- key: string;
119
- inverted?: boolean | undefined;
120
- }, {
121
- type: "dismissed";
122
- key: string;
123
- inverted?: boolean | undefined;
124
- }>;
125
- export declare const CooldownActiveConditionZ: z.ZodObject<{
126
- type: z.ZodLiteral<"cooldown_active">;
127
- key: z.ZodString;
128
- inverted: z.ZodOptional<z.ZodBoolean>;
129
- }, "strip", z.ZodTypeAny, {
130
- type: "cooldown_active";
131
- key: string;
132
- inverted?: boolean | undefined;
133
- }, {
134
- type: "cooldown_active";
135
- key: string;
136
- inverted?: boolean | undefined;
137
- }>;
138
- export declare const FrequencyLimitConditionZ: z.ZodObject<{
139
- type: z.ZodLiteral<"frequency_limit">;
140
- key: z.ZodString;
141
- limit: z.ZodNumber;
142
- inverted: z.ZodOptional<z.ZodBoolean>;
143
- }, "strip", z.ZodTypeAny, {
144
- type: "frequency_limit";
145
- key: string;
146
- limit: number;
147
- inverted?: boolean | undefined;
148
- }, {
149
- type: "frequency_limit";
150
- key: string;
151
- limit: number;
152
- inverted?: boolean | undefined;
153
- }>;
154
- export declare const MatchOpZ: z.ZodObject<{
155
- equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
156
- contains: z.ZodOptional<z.ZodString>;
157
- }, "strip", z.ZodTypeAny, {
158
- equals?: string | number | boolean | undefined;
159
- contains?: string | undefined;
160
- }, {
161
- equals?: string | number | boolean | undefined;
162
- contains?: string | undefined;
163
- }>;
164
- export declare const CounterDefZ: z.ZodObject<{
165
- events: z.ZodArray<z.ZodString, "many">;
166
- match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
167
- equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
168
- contains: z.ZodOptional<z.ZodString>;
169
- }, "strip", z.ZodTypeAny, {
170
- equals?: string | number | boolean | undefined;
171
- contains?: string | undefined;
172
- }, {
173
- equals?: string | number | boolean | undefined;
174
- contains?: string | undefined;
175
- }>>>;
176
- }, "strip", z.ZodTypeAny, {
177
- events: string[];
178
- match?: Record<string, {
179
- equals?: string | number | boolean | undefined;
180
- contains?: string | undefined;
181
- }> | undefined;
182
- }, {
183
- events: string[];
184
- match?: Record<string, {
185
- equals?: string | number | boolean | undefined;
186
- contains?: string | undefined;
187
- }> | undefined;
188
- }>;
189
- export declare const EventCountConditionZ: z.ZodObject<{
190
- type: z.ZodLiteral<"event_count">;
191
- key: z.ZodString;
192
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
193
- count: z.ZodNumber;
194
- withinMs: z.ZodOptional<z.ZodNumber>;
195
- counter: z.ZodOptional<z.ZodObject<{
196
- events: z.ZodArray<z.ZodString, "many">;
197
- match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
198
- equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
199
- contains: z.ZodOptional<z.ZodString>;
200
- }, "strip", z.ZodTypeAny, {
201
- equals?: string | number | boolean | undefined;
202
- contains?: string | undefined;
203
- }, {
204
- equals?: string | number | boolean | undefined;
205
- contains?: string | undefined;
206
- }>>>;
207
- }, "strip", z.ZodTypeAny, {
208
- events: string[];
209
- match?: Record<string, {
210
- equals?: string | number | boolean | undefined;
211
- contains?: string | undefined;
212
- }> | undefined;
213
- }, {
214
- events: string[];
215
- match?: Record<string, {
216
- equals?: string | number | boolean | undefined;
217
- contains?: string | undefined;
218
- }> | undefined;
219
- }>>;
220
- }, "strip", z.ZodTypeAny, {
221
- type: "event_count";
222
- key: string;
223
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
224
- count: number;
225
- withinMs?: number | undefined;
226
- counter?: {
227
- events: string[];
228
- match?: Record<string, {
229
- equals?: string | number | boolean | undefined;
230
- contains?: string | undefined;
231
- }> | undefined;
232
- } | undefined;
233
- }, {
234
- type: "event_count";
235
- key: string;
236
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
237
- count: number;
238
- withinMs?: number | undefined;
239
- counter?: {
240
- events: string[];
241
- match?: Record<string, {
242
- equals?: string | number | boolean | undefined;
243
- contains?: string | undefined;
244
- }> | undefined;
245
- } | undefined;
246
- }>;
247
- export declare const ConditionZ: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
248
- type: z.ZodLiteral<"page_url">;
249
- url: z.ZodString;
250
- }, "strip", z.ZodTypeAny, {
251
- type: "page_url";
252
- url: string;
253
- }, {
254
- type: "page_url";
255
- url: string;
256
- }>, z.ZodObject<{
257
- type: z.ZodLiteral<"route">;
258
- routeId: z.ZodString;
259
- }, "strip", z.ZodTypeAny, {
260
- type: "route";
261
- routeId: string;
262
- }, {
263
- type: "route";
264
- routeId: string;
265
- }>, z.ZodObject<{
266
- type: z.ZodLiteral<"anchor_visible">;
267
- anchorId: z.ZodString;
268
- state: z.ZodEnum<["visible", "present", "absent"]>;
269
- }, "strip", z.ZodTypeAny, {
270
- type: "anchor_visible";
271
- anchorId: string;
272
- state: "visible" | "present" | "absent";
273
- }, {
274
- type: "anchor_visible";
275
- anchorId: string;
276
- state: "visible" | "present" | "absent";
277
- }>, z.ZodObject<{
278
- type: z.ZodLiteral<"event_occurred">;
279
- eventName: z.ZodString;
280
- withinMs: z.ZodOptional<z.ZodNumber>;
281
- }, "strip", z.ZodTypeAny, {
282
- type: "event_occurred";
283
- eventName: string;
284
- withinMs?: number | undefined;
285
- }, {
286
- type: "event_occurred";
287
- eventName: string;
288
- withinMs?: number | undefined;
289
- }>, z.ZodObject<{
290
- type: z.ZodLiteral<"state_equals">;
291
- key: z.ZodString;
292
- value: z.ZodUnknown;
293
- }, "strip", z.ZodTypeAny, {
294
- type: "state_equals";
295
- key: string;
296
- value?: unknown;
297
- }, {
298
- type: "state_equals";
299
- key: string;
300
- value?: unknown;
301
- }>, z.ZodObject<{
302
- type: z.ZodLiteral<"viewport">;
303
- minWidth: z.ZodOptional<z.ZodNumber>;
304
- maxWidth: z.ZodOptional<z.ZodNumber>;
305
- minHeight: z.ZodOptional<z.ZodNumber>;
306
- maxHeight: z.ZodOptional<z.ZodNumber>;
307
- }, "strip", z.ZodTypeAny, {
308
- type: "viewport";
309
- minWidth?: number | undefined;
310
- maxWidth?: number | undefined;
311
- minHeight?: number | undefined;
312
- maxHeight?: number | undefined;
313
- }, {
314
- type: "viewport";
315
- minWidth?: number | undefined;
316
- maxWidth?: number | undefined;
317
- minHeight?: number | undefined;
318
- maxHeight?: number | undefined;
319
- }>, z.ZodObject<{
320
- type: z.ZodLiteral<"session_metric">;
321
- key: z.ZodString;
322
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
323
- threshold: z.ZodNumber;
324
- }, "strip", z.ZodTypeAny, {
325
- type: "session_metric";
326
- key: string;
327
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
328
- threshold: number;
329
- }, {
330
- type: "session_metric";
331
- key: string;
332
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
333
- threshold: number;
334
- }>, z.ZodObject<{
335
- type: z.ZodLiteral<"dismissed">;
336
- key: z.ZodString;
337
- inverted: z.ZodOptional<z.ZodBoolean>;
338
- }, "strip", z.ZodTypeAny, {
339
- type: "dismissed";
340
- key: string;
341
- inverted?: boolean | undefined;
342
- }, {
343
- type: "dismissed";
344
- key: string;
345
- inverted?: boolean | undefined;
346
- }>, z.ZodObject<{
347
- type: z.ZodLiteral<"cooldown_active">;
348
- key: z.ZodString;
349
- inverted: z.ZodOptional<z.ZodBoolean>;
350
- }, "strip", z.ZodTypeAny, {
351
- type: "cooldown_active";
352
- key: string;
353
- inverted?: boolean | undefined;
354
- }, {
355
- type: "cooldown_active";
356
- key: string;
357
- inverted?: boolean | undefined;
358
- }>, z.ZodObject<{
359
- type: z.ZodLiteral<"frequency_limit">;
360
- key: z.ZodString;
361
- limit: z.ZodNumber;
362
- inverted: z.ZodOptional<z.ZodBoolean>;
363
- }, "strip", z.ZodTypeAny, {
364
- type: "frequency_limit";
365
- key: string;
366
- limit: number;
367
- inverted?: boolean | undefined;
368
- }, {
369
- type: "frequency_limit";
370
- key: string;
371
- limit: number;
372
- inverted?: boolean | undefined;
373
- }>, z.ZodObject<{
374
- type: z.ZodLiteral<"event_count">;
375
- key: z.ZodString;
376
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
377
- count: z.ZodNumber;
378
- withinMs: z.ZodOptional<z.ZodNumber>;
379
- counter: z.ZodOptional<z.ZodObject<{
380
- events: z.ZodArray<z.ZodString, "many">;
381
- match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
382
- equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
383
- contains: z.ZodOptional<z.ZodString>;
384
- }, "strip", z.ZodTypeAny, {
385
- equals?: string | number | boolean | undefined;
386
- contains?: string | undefined;
387
- }, {
388
- equals?: string | number | boolean | undefined;
389
- contains?: string | undefined;
390
- }>>>;
391
- }, "strip", z.ZodTypeAny, {
392
- events: string[];
393
- match?: Record<string, {
394
- equals?: string | number | boolean | undefined;
395
- contains?: string | undefined;
396
- }> | undefined;
397
- }, {
398
- events: string[];
399
- match?: Record<string, {
400
- equals?: string | number | boolean | undefined;
401
- contains?: string | undefined;
402
- }> | undefined;
403
- }>>;
404
- }, "strip", z.ZodTypeAny, {
405
- type: "event_count";
406
- key: string;
407
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
408
- count: number;
409
- withinMs?: number | undefined;
410
- counter?: {
411
- events: string[];
412
- match?: Record<string, {
413
- equals?: string | number | boolean | undefined;
414
- contains?: string | undefined;
415
- }> | undefined;
416
- } | undefined;
417
- }, {
418
- type: "event_count";
419
- key: string;
420
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
421
- count: number;
422
- withinMs?: number | undefined;
423
- counter?: {
424
- events: string[];
425
- match?: Record<string, {
426
- equals?: string | number | boolean | undefined;
427
- contains?: string | undefined;
428
- }> | undefined;
429
- } | undefined;
430
- }>]>;
431
- export declare const RuleZ: z.ZodObject<{
432
- conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
433
- type: z.ZodLiteral<"page_url">;
434
- url: z.ZodString;
435
- }, "strip", z.ZodTypeAny, {
436
- type: "page_url";
437
- url: string;
438
- }, {
439
- type: "page_url";
440
- url: string;
441
- }>, z.ZodObject<{
442
- type: z.ZodLiteral<"route">;
443
- routeId: z.ZodString;
444
- }, "strip", z.ZodTypeAny, {
445
- type: "route";
446
- routeId: string;
447
- }, {
448
- type: "route";
449
- routeId: string;
450
- }>, z.ZodObject<{
451
- type: z.ZodLiteral<"anchor_visible">;
452
- anchorId: z.ZodString;
453
- state: z.ZodEnum<["visible", "present", "absent"]>;
454
- }, "strip", z.ZodTypeAny, {
455
- type: "anchor_visible";
456
- anchorId: string;
457
- state: "visible" | "present" | "absent";
458
- }, {
459
- type: "anchor_visible";
460
- anchorId: string;
461
- state: "visible" | "present" | "absent";
462
- }>, z.ZodObject<{
463
- type: z.ZodLiteral<"event_occurred">;
464
- eventName: z.ZodString;
465
- withinMs: z.ZodOptional<z.ZodNumber>;
466
- }, "strip", z.ZodTypeAny, {
467
- type: "event_occurred";
468
- eventName: string;
469
- withinMs?: number | undefined;
470
- }, {
471
- type: "event_occurred";
472
- eventName: string;
473
- withinMs?: number | undefined;
474
- }>, z.ZodObject<{
475
- type: z.ZodLiteral<"state_equals">;
476
- key: z.ZodString;
477
- value: z.ZodUnknown;
478
- }, "strip", z.ZodTypeAny, {
479
- type: "state_equals";
480
- key: string;
481
- value?: unknown;
482
- }, {
483
- type: "state_equals";
484
- key: string;
485
- value?: unknown;
486
- }>, z.ZodObject<{
487
- type: z.ZodLiteral<"viewport">;
488
- minWidth: z.ZodOptional<z.ZodNumber>;
489
- maxWidth: z.ZodOptional<z.ZodNumber>;
490
- minHeight: z.ZodOptional<z.ZodNumber>;
491
- maxHeight: z.ZodOptional<z.ZodNumber>;
492
- }, "strip", z.ZodTypeAny, {
493
- type: "viewport";
494
- minWidth?: number | undefined;
495
- maxWidth?: number | undefined;
496
- minHeight?: number | undefined;
497
- maxHeight?: number | undefined;
498
- }, {
499
- type: "viewport";
500
- minWidth?: number | undefined;
501
- maxWidth?: number | undefined;
502
- minHeight?: number | undefined;
503
- maxHeight?: number | undefined;
504
- }>, z.ZodObject<{
505
- type: z.ZodLiteral<"session_metric">;
506
- key: z.ZodString;
507
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
508
- threshold: z.ZodNumber;
509
- }, "strip", z.ZodTypeAny, {
510
- type: "session_metric";
511
- key: string;
512
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
513
- threshold: number;
514
- }, {
515
- type: "session_metric";
516
- key: string;
517
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
518
- threshold: number;
519
- }>, z.ZodObject<{
520
- type: z.ZodLiteral<"dismissed">;
521
- key: z.ZodString;
522
- inverted: z.ZodOptional<z.ZodBoolean>;
523
- }, "strip", z.ZodTypeAny, {
524
- type: "dismissed";
525
- key: string;
526
- inverted?: boolean | undefined;
527
- }, {
528
- type: "dismissed";
529
- key: string;
530
- inverted?: boolean | undefined;
531
- }>, z.ZodObject<{
532
- type: z.ZodLiteral<"cooldown_active">;
533
- key: z.ZodString;
534
- inverted: z.ZodOptional<z.ZodBoolean>;
535
- }, "strip", z.ZodTypeAny, {
536
- type: "cooldown_active";
537
- key: string;
538
- inverted?: boolean | undefined;
539
- }, {
540
- type: "cooldown_active";
541
- key: string;
542
- inverted?: boolean | undefined;
543
- }>, z.ZodObject<{
544
- type: z.ZodLiteral<"frequency_limit">;
545
- key: z.ZodString;
546
- limit: z.ZodNumber;
547
- inverted: z.ZodOptional<z.ZodBoolean>;
548
- }, "strip", z.ZodTypeAny, {
549
- type: "frequency_limit";
550
- key: string;
551
- limit: number;
552
- inverted?: boolean | undefined;
553
- }, {
554
- type: "frequency_limit";
555
- key: string;
556
- limit: number;
557
- inverted?: boolean | undefined;
558
- }>, z.ZodObject<{
559
- type: z.ZodLiteral<"event_count">;
560
- key: z.ZodString;
561
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
562
- count: z.ZodNumber;
563
- withinMs: z.ZodOptional<z.ZodNumber>;
564
- counter: z.ZodOptional<z.ZodObject<{
565
- events: z.ZodArray<z.ZodString, "many">;
566
- match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
567
- equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
568
- contains: z.ZodOptional<z.ZodString>;
569
- }, "strip", z.ZodTypeAny, {
570
- equals?: string | number | boolean | undefined;
571
- contains?: string | undefined;
572
- }, {
573
- equals?: string | number | boolean | undefined;
574
- contains?: string | undefined;
575
- }>>>;
576
- }, "strip", z.ZodTypeAny, {
577
- events: string[];
578
- match?: Record<string, {
579
- equals?: string | number | boolean | undefined;
580
- contains?: string | undefined;
581
- }> | undefined;
582
- }, {
583
- events: string[];
584
- match?: Record<string, {
585
- equals?: string | number | boolean | undefined;
586
- contains?: string | undefined;
587
- }> | undefined;
588
- }>>;
589
- }, "strip", z.ZodTypeAny, {
590
- type: "event_count";
591
- key: string;
592
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
593
- count: number;
594
- withinMs?: number | undefined;
595
- counter?: {
596
- events: string[];
597
- match?: Record<string, {
598
- equals?: string | number | boolean | undefined;
599
- contains?: string | undefined;
600
- }> | undefined;
601
- } | undefined;
602
- }, {
603
- type: "event_count";
604
- key: string;
605
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
606
- count: number;
607
- withinMs?: number | undefined;
608
- counter?: {
609
- events: string[];
610
- match?: Record<string, {
611
- equals?: string | number | boolean | undefined;
612
- contains?: string | undefined;
613
- }> | undefined;
614
- } | undefined;
615
- }>]>, "many">;
616
- value: z.ZodUnknown;
617
- }, "strip", z.ZodTypeAny, {
618
- conditions: ({
619
- type: "page_url";
620
- url: string;
621
- } | {
622
- type: "route";
623
- routeId: string;
624
- } | {
625
- type: "anchor_visible";
626
- anchorId: string;
627
- state: "visible" | "present" | "absent";
628
- } | {
629
- type: "event_occurred";
630
- eventName: string;
631
- withinMs?: number | undefined;
632
- } | {
633
- type: "state_equals";
634
- key: string;
635
- value?: unknown;
636
- } | {
637
- type: "viewport";
638
- minWidth?: number | undefined;
639
- maxWidth?: number | undefined;
640
- minHeight?: number | undefined;
641
- maxHeight?: number | undefined;
642
- } | {
643
- type: "session_metric";
644
- key: string;
645
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
646
- threshold: number;
647
- } | {
648
- type: "dismissed";
649
- key: string;
650
- inverted?: boolean | undefined;
651
- } | {
652
- type: "cooldown_active";
653
- key: string;
654
- inverted?: boolean | undefined;
655
- } | {
656
- type: "frequency_limit";
657
- key: string;
658
- limit: number;
659
- inverted?: boolean | undefined;
660
- } | {
661
- type: "event_count";
662
- key: string;
663
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
664
- count: number;
665
- withinMs?: number | undefined;
666
- counter?: {
667
- events: string[];
668
- match?: Record<string, {
669
- equals?: string | number | boolean | undefined;
670
- contains?: string | undefined;
671
- }> | undefined;
672
- } | undefined;
673
- })[];
674
- value?: unknown;
675
- }, {
676
- conditions: ({
677
- type: "page_url";
678
- url: string;
679
- } | {
680
- type: "route";
681
- routeId: string;
682
- } | {
683
- type: "anchor_visible";
684
- anchorId: string;
685
- state: "visible" | "present" | "absent";
686
- } | {
687
- type: "event_occurred";
688
- eventName: string;
689
- withinMs?: number | undefined;
690
- } | {
691
- type: "state_equals";
692
- key: string;
693
- value?: unknown;
694
- } | {
695
- type: "viewport";
696
- minWidth?: number | undefined;
697
- maxWidth?: number | undefined;
698
- minHeight?: number | undefined;
699
- maxHeight?: number | undefined;
700
- } | {
701
- type: "session_metric";
702
- key: string;
703
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
704
- threshold: number;
705
- } | {
706
- type: "dismissed";
707
- key: string;
708
- inverted?: boolean | undefined;
709
- } | {
710
- type: "cooldown_active";
711
- key: string;
712
- inverted?: boolean | undefined;
713
- } | {
714
- type: "frequency_limit";
715
- key: string;
716
- limit: number;
717
- inverted?: boolean | undefined;
718
- } | {
719
- type: "event_count";
720
- key: string;
721
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
722
- count: number;
723
- withinMs?: number | undefined;
724
- counter?: {
725
- events: string[];
726
- match?: Record<string, {
727
- equals?: string | number | boolean | undefined;
728
- contains?: string | undefined;
729
- }> | undefined;
730
- } | undefined;
731
- })[];
732
- value?: unknown;
733
- }>;
734
- export declare const RuleStrategyZ: z.ZodObject<{
735
- type: z.ZodLiteral<"rules">;
736
- rules: z.ZodArray<z.ZodObject<{
737
- conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
738
- type: z.ZodLiteral<"page_url">;
739
- url: z.ZodString;
740
- }, "strip", z.ZodTypeAny, {
741
- type: "page_url";
742
- url: string;
743
- }, {
744
- type: "page_url";
745
- url: string;
746
- }>, z.ZodObject<{
747
- type: z.ZodLiteral<"route">;
748
- routeId: z.ZodString;
749
- }, "strip", z.ZodTypeAny, {
750
- type: "route";
751
- routeId: string;
752
- }, {
753
- type: "route";
754
- routeId: string;
755
- }>, z.ZodObject<{
756
- type: z.ZodLiteral<"anchor_visible">;
757
- anchorId: z.ZodString;
758
- state: z.ZodEnum<["visible", "present", "absent"]>;
759
- }, "strip", z.ZodTypeAny, {
760
- type: "anchor_visible";
761
- anchorId: string;
762
- state: "visible" | "present" | "absent";
763
- }, {
764
- type: "anchor_visible";
765
- anchorId: string;
766
- state: "visible" | "present" | "absent";
767
- }>, z.ZodObject<{
768
- type: z.ZodLiteral<"event_occurred">;
769
- eventName: z.ZodString;
770
- withinMs: z.ZodOptional<z.ZodNumber>;
771
- }, "strip", z.ZodTypeAny, {
772
- type: "event_occurred";
773
- eventName: string;
774
- withinMs?: number | undefined;
775
- }, {
776
- type: "event_occurred";
777
- eventName: string;
778
- withinMs?: number | undefined;
779
- }>, z.ZodObject<{
780
- type: z.ZodLiteral<"state_equals">;
781
- key: z.ZodString;
782
- value: z.ZodUnknown;
783
- }, "strip", z.ZodTypeAny, {
784
- type: "state_equals";
785
- key: string;
786
- value?: unknown;
787
- }, {
788
- type: "state_equals";
789
- key: string;
790
- value?: unknown;
791
- }>, z.ZodObject<{
792
- type: z.ZodLiteral<"viewport">;
793
- minWidth: z.ZodOptional<z.ZodNumber>;
794
- maxWidth: z.ZodOptional<z.ZodNumber>;
795
- minHeight: z.ZodOptional<z.ZodNumber>;
796
- maxHeight: z.ZodOptional<z.ZodNumber>;
797
- }, "strip", z.ZodTypeAny, {
798
- type: "viewport";
799
- minWidth?: number | undefined;
800
- maxWidth?: number | undefined;
801
- minHeight?: number | undefined;
802
- maxHeight?: number | undefined;
803
- }, {
804
- type: "viewport";
805
- minWidth?: number | undefined;
806
- maxWidth?: number | undefined;
807
- minHeight?: number | undefined;
808
- maxHeight?: number | undefined;
809
- }>, z.ZodObject<{
810
- type: z.ZodLiteral<"session_metric">;
811
- key: z.ZodString;
812
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
813
- threshold: z.ZodNumber;
814
- }, "strip", z.ZodTypeAny, {
815
- type: "session_metric";
816
- key: string;
817
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
818
- threshold: number;
819
- }, {
820
- type: "session_metric";
821
- key: string;
822
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
823
- threshold: number;
824
- }>, z.ZodObject<{
825
- type: z.ZodLiteral<"dismissed">;
826
- key: z.ZodString;
827
- inverted: z.ZodOptional<z.ZodBoolean>;
828
- }, "strip", z.ZodTypeAny, {
829
- type: "dismissed";
830
- key: string;
831
- inverted?: boolean | undefined;
832
- }, {
833
- type: "dismissed";
834
- key: string;
835
- inverted?: boolean | undefined;
836
- }>, z.ZodObject<{
837
- type: z.ZodLiteral<"cooldown_active">;
838
- key: z.ZodString;
839
- inverted: z.ZodOptional<z.ZodBoolean>;
840
- }, "strip", z.ZodTypeAny, {
841
- type: "cooldown_active";
842
- key: string;
843
- inverted?: boolean | undefined;
844
- }, {
845
- type: "cooldown_active";
846
- key: string;
847
- inverted?: boolean | undefined;
848
- }>, z.ZodObject<{
849
- type: z.ZodLiteral<"frequency_limit">;
850
- key: z.ZodString;
851
- limit: z.ZodNumber;
852
- inverted: z.ZodOptional<z.ZodBoolean>;
853
- }, "strip", z.ZodTypeAny, {
854
- type: "frequency_limit";
855
- key: string;
856
- limit: number;
857
- inverted?: boolean | undefined;
858
- }, {
859
- type: "frequency_limit";
860
- key: string;
861
- limit: number;
862
- inverted?: boolean | undefined;
863
- }>, z.ZodObject<{
864
- type: z.ZodLiteral<"event_count">;
865
- key: z.ZodString;
866
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
867
- count: z.ZodNumber;
868
- withinMs: z.ZodOptional<z.ZodNumber>;
869
- counter: z.ZodOptional<z.ZodObject<{
870
- events: z.ZodArray<z.ZodString, "many">;
871
- match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
872
- equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
873
- contains: z.ZodOptional<z.ZodString>;
874
- }, "strip", z.ZodTypeAny, {
875
- equals?: string | number | boolean | undefined;
876
- contains?: string | undefined;
877
- }, {
878
- equals?: string | number | boolean | undefined;
879
- contains?: string | undefined;
880
- }>>>;
881
- }, "strip", z.ZodTypeAny, {
882
- events: string[];
883
- match?: Record<string, {
884
- equals?: string | number | boolean | undefined;
885
- contains?: string | undefined;
886
- }> | undefined;
887
- }, {
888
- events: string[];
889
- match?: Record<string, {
890
- equals?: string | number | boolean | undefined;
891
- contains?: string | undefined;
892
- }> | undefined;
893
- }>>;
894
- }, "strip", z.ZodTypeAny, {
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: string[];
902
- match?: Record<string, {
903
- equals?: string | number | boolean | undefined;
904
- contains?: string | undefined;
905
- }> | undefined;
906
- } | undefined;
907
- }, {
908
- type: "event_count";
909
- key: string;
910
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
911
- count: number;
912
- withinMs?: number | undefined;
913
- counter?: {
914
- events: string[];
915
- match?: Record<string, {
916
- equals?: string | number | boolean | undefined;
917
- contains?: string | undefined;
918
- }> | undefined;
919
- } | undefined;
920
- }>]>, "many">;
921
- value: z.ZodUnknown;
922
- }, "strip", z.ZodTypeAny, {
923
- conditions: ({
924
- type: "page_url";
925
- url: string;
926
- } | {
927
- type: "route";
928
- routeId: string;
929
- } | {
930
- type: "anchor_visible";
931
- anchorId: string;
932
- state: "visible" | "present" | "absent";
933
- } | {
934
- type: "event_occurred";
935
- eventName: string;
936
- withinMs?: number | undefined;
937
- } | {
938
- type: "state_equals";
939
- key: string;
940
- value?: unknown;
941
- } | {
942
- type: "viewport";
943
- minWidth?: number | undefined;
944
- maxWidth?: number | undefined;
945
- minHeight?: number | undefined;
946
- maxHeight?: number | undefined;
947
- } | {
948
- type: "session_metric";
949
- key: string;
950
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
951
- threshold: number;
952
- } | {
953
- type: "dismissed";
954
- key: string;
955
- inverted?: boolean | undefined;
956
- } | {
957
- type: "cooldown_active";
958
- key: string;
959
- inverted?: boolean | undefined;
960
- } | {
961
- type: "frequency_limit";
962
- key: string;
963
- limit: number;
964
- inverted?: boolean | undefined;
965
- } | {
966
- type: "event_count";
967
- key: string;
968
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
969
- count: number;
970
- withinMs?: number | undefined;
971
- counter?: {
972
- events: string[];
973
- match?: Record<string, {
974
- equals?: string | number | boolean | undefined;
975
- contains?: string | undefined;
976
- }> | undefined;
977
- } | undefined;
978
- })[];
979
- value?: unknown;
980
- }, {
981
- conditions: ({
982
- type: "page_url";
983
- url: string;
984
- } | {
985
- type: "route";
986
- routeId: string;
987
- } | {
988
- type: "anchor_visible";
989
- anchorId: string;
990
- state: "visible" | "present" | "absent";
991
- } | {
992
- type: "event_occurred";
993
- eventName: string;
994
- withinMs?: number | undefined;
995
- } | {
996
- type: "state_equals";
997
- key: string;
998
- value?: unknown;
999
- } | {
1000
- type: "viewport";
1001
- minWidth?: number | undefined;
1002
- maxWidth?: number | undefined;
1003
- minHeight?: number | undefined;
1004
- maxHeight?: number | undefined;
1005
- } | {
1006
- type: "session_metric";
1007
- key: string;
1008
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1009
- threshold: number;
1010
- } | {
1011
- type: "dismissed";
1012
- key: string;
1013
- inverted?: boolean | undefined;
1014
- } | {
1015
- type: "cooldown_active";
1016
- key: string;
1017
- inverted?: boolean | undefined;
1018
- } | {
1019
- type: "frequency_limit";
1020
- key: string;
1021
- limit: number;
1022
- inverted?: boolean | undefined;
1023
- } | {
1024
- type: "event_count";
1025
- key: string;
1026
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1027
- count: number;
1028
- withinMs?: number | undefined;
1029
- counter?: {
1030
- events: string[];
1031
- match?: Record<string, {
1032
- equals?: string | number | boolean | undefined;
1033
- contains?: string | undefined;
1034
- }> | undefined;
1035
- } | undefined;
1036
- })[];
1037
- value?: unknown;
1038
- }>, "many">;
1039
- default: z.ZodUnknown;
1040
- }, "strip", z.ZodTypeAny, {
1041
- type: "rules";
1042
- rules: {
1043
- conditions: ({
1044
- type: "page_url";
1045
- url: string;
1046
- } | {
1047
- type: "route";
1048
- routeId: string;
1049
- } | {
1050
- type: "anchor_visible";
1051
- anchorId: string;
1052
- state: "visible" | "present" | "absent";
1053
- } | {
1054
- type: "event_occurred";
1055
- eventName: string;
1056
- withinMs?: number | undefined;
1057
- } | {
1058
- type: "state_equals";
1059
- key: string;
1060
- value?: unknown;
1061
- } | {
1062
- type: "viewport";
1063
- minWidth?: number | undefined;
1064
- maxWidth?: number | undefined;
1065
- minHeight?: number | undefined;
1066
- maxHeight?: number | undefined;
1067
- } | {
1068
- type: "session_metric";
1069
- key: string;
1070
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1071
- threshold: number;
1072
- } | {
1073
- type: "dismissed";
1074
- key: string;
1075
- inverted?: boolean | undefined;
1076
- } | {
1077
- type: "cooldown_active";
1078
- key: string;
1079
- inverted?: boolean | undefined;
1080
- } | {
1081
- type: "frequency_limit";
1082
- key: string;
1083
- limit: number;
1084
- inverted?: boolean | undefined;
1085
- } | {
1086
- type: "event_count";
1087
- key: string;
1088
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1089
- count: number;
1090
- withinMs?: number | undefined;
1091
- counter?: {
1092
- events: string[];
1093
- match?: Record<string, {
1094
- equals?: string | number | boolean | undefined;
1095
- contains?: string | undefined;
1096
- }> | undefined;
1097
- } | undefined;
1098
- })[];
1099
- value?: unknown;
1100
- }[];
1101
- default?: unknown;
1102
- }, {
1103
- type: "rules";
1104
- rules: {
1105
- conditions: ({
1106
- type: "page_url";
1107
- url: string;
1108
- } | {
1109
- type: "route";
1110
- routeId: string;
1111
- } | {
1112
- type: "anchor_visible";
1113
- anchorId: string;
1114
- state: "visible" | "present" | "absent";
1115
- } | {
1116
- type: "event_occurred";
1117
- eventName: string;
1118
- withinMs?: number | undefined;
1119
- } | {
1120
- type: "state_equals";
1121
- key: string;
1122
- value?: unknown;
1123
- } | {
1124
- type: "viewport";
1125
- minWidth?: number | undefined;
1126
- maxWidth?: number | undefined;
1127
- minHeight?: number | undefined;
1128
- maxHeight?: number | undefined;
1129
- } | {
1130
- type: "session_metric";
1131
- key: string;
1132
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1133
- threshold: number;
1134
- } | {
1135
- type: "dismissed";
1136
- key: string;
1137
- inverted?: boolean | undefined;
1138
- } | {
1139
- type: "cooldown_active";
1140
- key: string;
1141
- inverted?: boolean | undefined;
1142
- } | {
1143
- type: "frequency_limit";
1144
- key: string;
1145
- limit: number;
1146
- inverted?: boolean | undefined;
1147
- } | {
1148
- type: "event_count";
1149
- key: string;
1150
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1151
- count: number;
1152
- withinMs?: number | undefined;
1153
- counter?: {
1154
- events: string[];
1155
- match?: Record<string, {
1156
- equals?: string | number | boolean | undefined;
1157
- contains?: string | undefined;
1158
- }> | undefined;
1159
- } | undefined;
1160
- })[];
1161
- value?: unknown;
1162
- }[];
1163
- default?: unknown;
1164
- }>;
1165
- export declare const ScoreStrategyZ: z.ZodObject<{
1166
- type: z.ZodLiteral<"score">;
1167
- field: z.ZodString;
1168
- threshold: z.ZodNumber;
1169
- above: z.ZodUnknown;
1170
- below: z.ZodUnknown;
1171
- }, "strip", z.ZodTypeAny, {
1172
- type: "score";
1173
- threshold: number;
1174
- field: string;
1175
- above?: unknown;
1176
- below?: unknown;
1177
- }, {
1178
- type: "score";
1179
- threshold: number;
1180
- field: string;
1181
- above?: unknown;
1182
- below?: unknown;
1183
- }>;
1184
- export declare const ModelStrategyZ: z.ZodObject<{
1185
- type: z.ZodLiteral<"model">;
1186
- modelId: z.ZodString;
1187
- inputs: z.ZodArray<z.ZodString, "many">;
1188
- outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1189
- default: z.ZodUnknown;
1190
- }, "strip", z.ZodTypeAny, {
1191
- type: "model";
1192
- modelId: string;
1193
- inputs: string[];
1194
- outputMapping: Record<string, unknown>;
1195
- default?: unknown;
1196
- }, {
1197
- type: "model";
1198
- modelId: string;
1199
- inputs: string[];
1200
- outputMapping: Record<string, unknown>;
1201
- default?: unknown;
1202
- }>;
1203
- export declare const ExternalStrategyZ: z.ZodObject<{
1204
- type: z.ZodLiteral<"external">;
1205
- endpoint: z.ZodString;
1206
- method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
1207
- default: z.ZodUnknown;
1208
- timeoutMs: z.ZodOptional<z.ZodNumber>;
1209
- }, "strip", z.ZodTypeAny, {
1210
- type: "external";
1211
- endpoint: string;
1212
- default?: unknown;
1213
- method?: "GET" | "POST" | undefined;
1214
- timeoutMs?: number | undefined;
1215
- }, {
1216
- type: "external";
1217
- endpoint: string;
1218
- default?: unknown;
1219
- method?: "GET" | "POST" | undefined;
1220
- timeoutMs?: number | undefined;
1221
- }>;
1222
- export declare const DecisionStrategyZ: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1223
- type: z.ZodLiteral<"rules">;
1224
- rules: z.ZodArray<z.ZodObject<{
1225
- conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1226
- type: z.ZodLiteral<"page_url">;
1227
- url: z.ZodString;
1228
- }, "strip", z.ZodTypeAny, {
1229
- type: "page_url";
1230
- url: string;
1231
- }, {
1232
- type: "page_url";
1233
- url: string;
1234
- }>, z.ZodObject<{
1235
- type: z.ZodLiteral<"route">;
1236
- routeId: z.ZodString;
1237
- }, "strip", z.ZodTypeAny, {
1238
- type: "route";
1239
- routeId: string;
1240
- }, {
1241
- type: "route";
1242
- routeId: string;
1243
- }>, z.ZodObject<{
1244
- type: z.ZodLiteral<"anchor_visible">;
1245
- anchorId: z.ZodString;
1246
- state: z.ZodEnum<["visible", "present", "absent"]>;
1247
- }, "strip", z.ZodTypeAny, {
1248
- type: "anchor_visible";
1249
- anchorId: string;
1250
- state: "visible" | "present" | "absent";
1251
- }, {
1252
- type: "anchor_visible";
1253
- anchorId: string;
1254
- state: "visible" | "present" | "absent";
1255
- }>, z.ZodObject<{
1256
- type: z.ZodLiteral<"event_occurred">;
1257
- eventName: z.ZodString;
1258
- withinMs: z.ZodOptional<z.ZodNumber>;
1259
- }, "strip", z.ZodTypeAny, {
1260
- type: "event_occurred";
1261
- eventName: string;
1262
- withinMs?: number | undefined;
1263
- }, {
1264
- type: "event_occurred";
1265
- eventName: string;
1266
- withinMs?: number | undefined;
1267
- }>, z.ZodObject<{
1268
- type: z.ZodLiteral<"state_equals">;
1269
- key: z.ZodString;
1270
- value: z.ZodUnknown;
1271
- }, "strip", z.ZodTypeAny, {
1272
- type: "state_equals";
1273
- key: string;
1274
- value?: unknown;
1275
- }, {
1276
- type: "state_equals";
1277
- key: string;
1278
- value?: unknown;
1279
- }>, z.ZodObject<{
1280
- type: z.ZodLiteral<"viewport">;
1281
- minWidth: z.ZodOptional<z.ZodNumber>;
1282
- maxWidth: z.ZodOptional<z.ZodNumber>;
1283
- minHeight: z.ZodOptional<z.ZodNumber>;
1284
- maxHeight: z.ZodOptional<z.ZodNumber>;
1285
- }, "strip", z.ZodTypeAny, {
1286
- type: "viewport";
1287
- minWidth?: number | undefined;
1288
- maxWidth?: number | undefined;
1289
- minHeight?: number | undefined;
1290
- maxHeight?: number | undefined;
1291
- }, {
1292
- type: "viewport";
1293
- minWidth?: number | undefined;
1294
- maxWidth?: number | undefined;
1295
- minHeight?: number | undefined;
1296
- maxHeight?: number | undefined;
1297
- }>, z.ZodObject<{
1298
- type: z.ZodLiteral<"session_metric">;
1299
- key: z.ZodString;
1300
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1301
- threshold: z.ZodNumber;
1302
- }, "strip", z.ZodTypeAny, {
1303
- type: "session_metric";
1304
- key: string;
1305
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1306
- threshold: number;
1307
- }, {
1308
- type: "session_metric";
1309
- key: string;
1310
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1311
- threshold: number;
1312
- }>, z.ZodObject<{
1313
- type: z.ZodLiteral<"dismissed">;
1314
- key: z.ZodString;
1315
- inverted: z.ZodOptional<z.ZodBoolean>;
1316
- }, "strip", z.ZodTypeAny, {
1317
- type: "dismissed";
1318
- key: string;
1319
- inverted?: boolean | undefined;
1320
- }, {
1321
- type: "dismissed";
1322
- key: string;
1323
- inverted?: boolean | undefined;
1324
- }>, z.ZodObject<{
1325
- type: z.ZodLiteral<"cooldown_active">;
1326
- key: z.ZodString;
1327
- inverted: z.ZodOptional<z.ZodBoolean>;
1328
- }, "strip", z.ZodTypeAny, {
1329
- type: "cooldown_active";
1330
- key: string;
1331
- inverted?: boolean | undefined;
1332
- }, {
1333
- type: "cooldown_active";
1334
- key: string;
1335
- inverted?: boolean | undefined;
1336
- }>, z.ZodObject<{
1337
- type: z.ZodLiteral<"frequency_limit">;
1338
- key: z.ZodString;
1339
- limit: z.ZodNumber;
1340
- inverted: z.ZodOptional<z.ZodBoolean>;
1341
- }, "strip", z.ZodTypeAny, {
1342
- type: "frequency_limit";
1343
- key: string;
1344
- limit: number;
1345
- inverted?: boolean | undefined;
1346
- }, {
1347
- type: "frequency_limit";
1348
- key: string;
1349
- limit: number;
1350
- inverted?: boolean | undefined;
1351
- }>, z.ZodObject<{
1352
- type: z.ZodLiteral<"event_count">;
1353
- key: z.ZodString;
1354
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1355
- count: z.ZodNumber;
1356
- withinMs: z.ZodOptional<z.ZodNumber>;
1357
- counter: z.ZodOptional<z.ZodObject<{
1358
- events: z.ZodArray<z.ZodString, "many">;
1359
- match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1360
- equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1361
- contains: z.ZodOptional<z.ZodString>;
1362
- }, "strip", z.ZodTypeAny, {
1363
- equals?: string | number | boolean | undefined;
1364
- contains?: string | undefined;
1365
- }, {
1366
- equals?: string | number | boolean | undefined;
1367
- contains?: string | undefined;
1368
- }>>>;
1369
- }, "strip", z.ZodTypeAny, {
1370
- events: string[];
1371
- match?: Record<string, {
1372
- equals?: string | number | boolean | undefined;
1373
- contains?: string | undefined;
1374
- }> | undefined;
1375
- }, {
1376
- events: string[];
1377
- match?: Record<string, {
1378
- equals?: string | number | boolean | undefined;
1379
- contains?: string | undefined;
1380
- }> | undefined;
1381
- }>>;
1382
- }, "strip", z.ZodTypeAny, {
1383
- type: "event_count";
1384
- key: string;
1385
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1386
- count: number;
1387
- withinMs?: number | undefined;
1388
- counter?: {
1389
- events: string[];
1390
- match?: Record<string, {
1391
- equals?: string | number | boolean | undefined;
1392
- contains?: string | undefined;
1393
- }> | undefined;
1394
- } | undefined;
1395
- }, {
1396
- type: "event_count";
1397
- key: string;
1398
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1399
- count: number;
1400
- withinMs?: number | undefined;
1401
- counter?: {
1402
- events: string[];
1403
- match?: Record<string, {
1404
- equals?: string | number | boolean | undefined;
1405
- contains?: string | undefined;
1406
- }> | undefined;
1407
- } | undefined;
1408
- }>]>, "many">;
1409
- value: z.ZodUnknown;
1410
- }, "strip", z.ZodTypeAny, {
1411
- conditions: ({
1412
- type: "page_url";
1413
- url: string;
1414
- } | {
1415
- type: "route";
1416
- routeId: string;
1417
- } | {
1418
- type: "anchor_visible";
1419
- anchorId: string;
1420
- state: "visible" | "present" | "absent";
1421
- } | {
1422
- type: "event_occurred";
1423
- eventName: string;
1424
- withinMs?: number | undefined;
1425
- } | {
1426
- type: "state_equals";
1427
- key: string;
1428
- value?: unknown;
1429
- } | {
1430
- type: "viewport";
1431
- minWidth?: number | undefined;
1432
- maxWidth?: number | undefined;
1433
- minHeight?: number | undefined;
1434
- maxHeight?: number | undefined;
1435
- } | {
1436
- type: "session_metric";
1437
- key: string;
1438
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1439
- threshold: number;
1440
- } | {
1441
- type: "dismissed";
1442
- key: string;
1443
- inverted?: boolean | undefined;
1444
- } | {
1445
- type: "cooldown_active";
1446
- key: string;
1447
- inverted?: boolean | undefined;
1448
- } | {
1449
- type: "frequency_limit";
1450
- key: string;
1451
- limit: number;
1452
- inverted?: boolean | undefined;
1453
- } | {
1454
- type: "event_count";
1455
- key: string;
1456
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1457
- count: number;
1458
- withinMs?: number | undefined;
1459
- counter?: {
1460
- events: string[];
1461
- match?: Record<string, {
1462
- equals?: string | number | boolean | undefined;
1463
- contains?: string | undefined;
1464
- }> | undefined;
1465
- } | undefined;
1466
- })[];
1467
- value?: unknown;
1468
- }, {
1469
- conditions: ({
1470
- type: "page_url";
1471
- url: string;
1472
- } | {
1473
- type: "route";
1474
- routeId: string;
1475
- } | {
1476
- type: "anchor_visible";
1477
- anchorId: string;
1478
- state: "visible" | "present" | "absent";
1479
- } | {
1480
- type: "event_occurred";
1481
- eventName: string;
1482
- withinMs?: number | undefined;
1483
- } | {
1484
- type: "state_equals";
1485
- key: string;
1486
- value?: unknown;
1487
- } | {
1488
- type: "viewport";
1489
- minWidth?: number | undefined;
1490
- maxWidth?: number | undefined;
1491
- minHeight?: number | undefined;
1492
- maxHeight?: number | undefined;
1493
- } | {
1494
- type: "session_metric";
1495
- key: string;
1496
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1497
- threshold: number;
1498
- } | {
1499
- type: "dismissed";
1500
- key: string;
1501
- inverted?: boolean | undefined;
1502
- } | {
1503
- type: "cooldown_active";
1504
- key: string;
1505
- inverted?: boolean | undefined;
1506
- } | {
1507
- type: "frequency_limit";
1508
- key: string;
1509
- limit: number;
1510
- inverted?: boolean | undefined;
1511
- } | {
1512
- type: "event_count";
1513
- key: string;
1514
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1515
- count: number;
1516
- withinMs?: number | undefined;
1517
- counter?: {
1518
- events: string[];
1519
- match?: Record<string, {
1520
- equals?: string | number | boolean | undefined;
1521
- contains?: string | undefined;
1522
- }> | undefined;
1523
- } | undefined;
1524
- })[];
1525
- value?: unknown;
1526
- }>, "many">;
1527
- default: z.ZodUnknown;
1528
- }, "strip", z.ZodTypeAny, {
1529
- type: "rules";
1530
- rules: {
1531
- conditions: ({
1532
- type: "page_url";
1533
- url: string;
1534
- } | {
1535
- type: "route";
1536
- routeId: string;
1537
- } | {
1538
- type: "anchor_visible";
1539
- anchorId: string;
1540
- state: "visible" | "present" | "absent";
1541
- } | {
1542
- type: "event_occurred";
1543
- eventName: string;
1544
- withinMs?: number | undefined;
1545
- } | {
1546
- type: "state_equals";
1547
- key: string;
1548
- value?: unknown;
1549
- } | {
1550
- type: "viewport";
1551
- minWidth?: number | undefined;
1552
- maxWidth?: number | undefined;
1553
- minHeight?: number | undefined;
1554
- maxHeight?: number | undefined;
1555
- } | {
1556
- type: "session_metric";
1557
- key: string;
1558
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1559
- threshold: number;
1560
- } | {
1561
- type: "dismissed";
1562
- key: string;
1563
- inverted?: boolean | undefined;
1564
- } | {
1565
- type: "cooldown_active";
1566
- key: string;
1567
- inverted?: boolean | undefined;
1568
- } | {
1569
- type: "frequency_limit";
1570
- key: string;
1571
- limit: number;
1572
- inverted?: boolean | undefined;
1573
- } | {
1574
- type: "event_count";
1575
- key: string;
1576
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1577
- count: number;
1578
- withinMs?: number | undefined;
1579
- counter?: {
1580
- events: string[];
1581
- match?: Record<string, {
1582
- equals?: string | number | boolean | undefined;
1583
- contains?: string | undefined;
1584
- }> | undefined;
1585
- } | undefined;
1586
- })[];
1587
- value?: unknown;
1588
- }[];
1589
- default?: unknown;
1590
- }, {
1591
- type: "rules";
1592
- rules: {
1593
- conditions: ({
1594
- type: "page_url";
1595
- url: string;
1596
- } | {
1597
- type: "route";
1598
- routeId: string;
1599
- } | {
1600
- type: "anchor_visible";
1601
- anchorId: string;
1602
- state: "visible" | "present" | "absent";
1603
- } | {
1604
- type: "event_occurred";
1605
- eventName: string;
1606
- withinMs?: number | undefined;
1607
- } | {
1608
- type: "state_equals";
1609
- key: string;
1610
- value?: unknown;
1611
- } | {
1612
- type: "viewport";
1613
- minWidth?: number | undefined;
1614
- maxWidth?: number | undefined;
1615
- minHeight?: number | undefined;
1616
- maxHeight?: number | undefined;
1617
- } | {
1618
- type: "session_metric";
1619
- key: string;
1620
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1621
- threshold: number;
1622
- } | {
1623
- type: "dismissed";
1624
- key: string;
1625
- inverted?: boolean | undefined;
1626
- } | {
1627
- type: "cooldown_active";
1628
- key: string;
1629
- inverted?: boolean | undefined;
1630
- } | {
1631
- type: "frequency_limit";
1632
- key: string;
1633
- limit: number;
1634
- inverted?: boolean | undefined;
1635
- } | {
1636
- type: "event_count";
1637
- key: string;
1638
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1639
- count: number;
1640
- withinMs?: number | undefined;
1641
- counter?: {
1642
- events: string[];
1643
- match?: Record<string, {
1644
- equals?: string | number | boolean | undefined;
1645
- contains?: string | undefined;
1646
- }> | undefined;
1647
- } | undefined;
1648
- })[];
1649
- value?: unknown;
1650
- }[];
1651
- default?: unknown;
1652
- }>, z.ZodObject<{
1653
- type: z.ZodLiteral<"score">;
1654
- field: z.ZodString;
1655
- threshold: z.ZodNumber;
1656
- above: z.ZodUnknown;
1657
- below: z.ZodUnknown;
1658
- }, "strip", z.ZodTypeAny, {
1659
- type: "score";
1660
- threshold: number;
1661
- field: string;
1662
- above?: unknown;
1663
- below?: unknown;
1664
- }, {
1665
- type: "score";
1666
- threshold: number;
1667
- field: string;
1668
- above?: unknown;
1669
- below?: unknown;
1670
- }>, z.ZodObject<{
1671
- type: z.ZodLiteral<"model">;
1672
- modelId: z.ZodString;
1673
- inputs: z.ZodArray<z.ZodString, "many">;
1674
- outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1675
- default: z.ZodUnknown;
1676
- }, "strip", z.ZodTypeAny, {
1677
- type: "model";
1678
- modelId: string;
1679
- inputs: string[];
1680
- outputMapping: Record<string, unknown>;
1681
- default?: unknown;
1682
- }, {
1683
- type: "model";
1684
- modelId: string;
1685
- inputs: string[];
1686
- outputMapping: Record<string, unknown>;
1687
- default?: unknown;
1688
- }>, z.ZodObject<{
1689
- type: z.ZodLiteral<"external">;
1690
- endpoint: z.ZodString;
1691
- method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
1692
- default: z.ZodUnknown;
1693
- timeoutMs: z.ZodOptional<z.ZodNumber>;
1694
- }, "strip", z.ZodTypeAny, {
1695
- type: "external";
1696
- endpoint: string;
1697
- default?: unknown;
1698
- method?: "GET" | "POST" | undefined;
1699
- timeoutMs?: number | undefined;
1700
- }, {
1701
- type: "external";
1702
- endpoint: string;
1703
- default?: unknown;
1704
- method?: "GET" | "POST" | undefined;
1705
- timeoutMs?: number | undefined;
1706
- }>]>;
1707
- /** Canonical Zod schema for the optional triggerWhen field on actions and adaptive items. */
1708
- export declare const TriggerWhenZ: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1709
- type: z.ZodLiteral<"rules">;
1710
- rules: z.ZodArray<z.ZodObject<{
1711
- conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1712
- type: z.ZodLiteral<"page_url">;
1713
- url: z.ZodString;
1714
- }, "strip", z.ZodTypeAny, {
1715
- type: "page_url";
1716
- url: string;
1717
- }, {
1718
- type: "page_url";
1719
- url: string;
1720
- }>, z.ZodObject<{
1721
- type: z.ZodLiteral<"route">;
1722
- routeId: z.ZodString;
1723
- }, "strip", z.ZodTypeAny, {
1724
- type: "route";
1725
- routeId: string;
1726
- }, {
1727
- type: "route";
1728
- routeId: string;
1729
- }>, z.ZodObject<{
1730
- type: z.ZodLiteral<"anchor_visible">;
1731
- anchorId: z.ZodString;
1732
- state: z.ZodEnum<["visible", "present", "absent"]>;
1733
- }, "strip", z.ZodTypeAny, {
1734
- type: "anchor_visible";
1735
- anchorId: string;
1736
- state: "visible" | "present" | "absent";
1737
- }, {
1738
- type: "anchor_visible";
1739
- anchorId: string;
1740
- state: "visible" | "present" | "absent";
1741
- }>, z.ZodObject<{
1742
- type: z.ZodLiteral<"event_occurred">;
1743
- eventName: z.ZodString;
1744
- withinMs: z.ZodOptional<z.ZodNumber>;
1745
- }, "strip", z.ZodTypeAny, {
1746
- type: "event_occurred";
1747
- eventName: string;
1748
- withinMs?: number | undefined;
1749
- }, {
1750
- type: "event_occurred";
1751
- eventName: string;
1752
- withinMs?: number | undefined;
1753
- }>, z.ZodObject<{
1754
- type: z.ZodLiteral<"state_equals">;
1755
- key: z.ZodString;
1756
- value: z.ZodUnknown;
1757
- }, "strip", z.ZodTypeAny, {
1758
- type: "state_equals";
1759
- key: string;
1760
- value?: unknown;
1761
- }, {
1762
- type: "state_equals";
1763
- key: string;
1764
- value?: unknown;
1765
- }>, z.ZodObject<{
1766
- type: z.ZodLiteral<"viewport">;
1767
- minWidth: z.ZodOptional<z.ZodNumber>;
1768
- maxWidth: z.ZodOptional<z.ZodNumber>;
1769
- minHeight: z.ZodOptional<z.ZodNumber>;
1770
- maxHeight: z.ZodOptional<z.ZodNumber>;
1771
- }, "strip", z.ZodTypeAny, {
1772
- type: "viewport";
1773
- minWidth?: number | undefined;
1774
- maxWidth?: number | undefined;
1775
- minHeight?: number | undefined;
1776
- maxHeight?: number | undefined;
1777
- }, {
1778
- type: "viewport";
1779
- minWidth?: number | undefined;
1780
- maxWidth?: number | undefined;
1781
- minHeight?: number | undefined;
1782
- maxHeight?: number | undefined;
1783
- }>, z.ZodObject<{
1784
- type: z.ZodLiteral<"session_metric">;
1785
- key: z.ZodString;
1786
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1787
- threshold: z.ZodNumber;
1788
- }, "strip", z.ZodTypeAny, {
1789
- type: "session_metric";
1790
- key: string;
1791
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1792
- threshold: number;
1793
- }, {
1794
- type: "session_metric";
1795
- key: string;
1796
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1797
- threshold: number;
1798
- }>, z.ZodObject<{
1799
- type: z.ZodLiteral<"dismissed">;
1800
- key: z.ZodString;
1801
- inverted: z.ZodOptional<z.ZodBoolean>;
1802
- }, "strip", z.ZodTypeAny, {
1803
- type: "dismissed";
1804
- key: string;
1805
- inverted?: boolean | undefined;
1806
- }, {
1807
- type: "dismissed";
1808
- key: string;
1809
- inverted?: boolean | undefined;
1810
- }>, z.ZodObject<{
1811
- type: z.ZodLiteral<"cooldown_active">;
1812
- key: z.ZodString;
1813
- inverted: z.ZodOptional<z.ZodBoolean>;
1814
- }, "strip", z.ZodTypeAny, {
1815
- type: "cooldown_active";
1816
- key: string;
1817
- inverted?: boolean | undefined;
1818
- }, {
1819
- type: "cooldown_active";
1820
- key: string;
1821
- inverted?: boolean | undefined;
1822
- }>, z.ZodObject<{
1823
- type: z.ZodLiteral<"frequency_limit">;
1824
- key: z.ZodString;
1825
- limit: z.ZodNumber;
1826
- inverted: z.ZodOptional<z.ZodBoolean>;
1827
- }, "strip", z.ZodTypeAny, {
1828
- type: "frequency_limit";
1829
- key: string;
1830
- limit: number;
1831
- inverted?: boolean | undefined;
1832
- }, {
1833
- type: "frequency_limit";
1834
- key: string;
1835
- limit: number;
1836
- inverted?: boolean | undefined;
1837
- }>, z.ZodObject<{
1838
- type: z.ZodLiteral<"event_count">;
1839
- key: z.ZodString;
1840
- operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
1841
- count: z.ZodNumber;
1842
- withinMs: z.ZodOptional<z.ZodNumber>;
1843
- counter: z.ZodOptional<z.ZodObject<{
1844
- events: z.ZodArray<z.ZodString, "many">;
1845
- match: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1846
- equals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1847
- contains: z.ZodOptional<z.ZodString>;
1848
- }, "strip", z.ZodTypeAny, {
1849
- equals?: string | number | boolean | undefined;
1850
- contains?: string | undefined;
1851
- }, {
1852
- equals?: string | number | boolean | undefined;
1853
- contains?: string | undefined;
1854
- }>>>;
1855
- }, "strip", z.ZodTypeAny, {
1856
- events: string[];
1857
- match?: Record<string, {
1858
- equals?: string | number | boolean | undefined;
1859
- contains?: string | undefined;
1860
- }> | undefined;
1861
- }, {
1862
- events: string[];
1863
- match?: Record<string, {
1864
- equals?: string | number | boolean | undefined;
1865
- contains?: string | undefined;
1866
- }> | undefined;
1867
- }>>;
1868
- }, "strip", z.ZodTypeAny, {
1869
- type: "event_count";
1870
- key: string;
1871
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1872
- count: number;
1873
- withinMs?: number | undefined;
1874
- counter?: {
1875
- events: string[];
1876
- match?: Record<string, {
1877
- equals?: string | number | boolean | undefined;
1878
- contains?: string | undefined;
1879
- }> | undefined;
1880
- } | undefined;
1881
- }, {
1882
- type: "event_count";
1883
- key: string;
1884
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1885
- count: number;
1886
- withinMs?: number | undefined;
1887
- counter?: {
1888
- events: string[];
1889
- match?: Record<string, {
1890
- equals?: string | number | boolean | undefined;
1891
- contains?: string | undefined;
1892
- }> | undefined;
1893
- } | undefined;
1894
- }>]>, "many">;
1895
- value: z.ZodUnknown;
1896
- }, "strip", z.ZodTypeAny, {
1897
- conditions: ({
1898
- type: "page_url";
1899
- url: string;
1900
- } | {
1901
- type: "route";
1902
- routeId: string;
1903
- } | {
1904
- type: "anchor_visible";
1905
- anchorId: string;
1906
- state: "visible" | "present" | "absent";
1907
- } | {
1908
- type: "event_occurred";
1909
- eventName: string;
1910
- withinMs?: number | undefined;
1911
- } | {
1912
- type: "state_equals";
1913
- key: string;
1914
- value?: unknown;
1915
- } | {
1916
- type: "viewport";
1917
- minWidth?: number | undefined;
1918
- maxWidth?: number | undefined;
1919
- minHeight?: number | undefined;
1920
- maxHeight?: number | undefined;
1921
- } | {
1922
- type: "session_metric";
1923
- key: string;
1924
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1925
- threshold: number;
1926
- } | {
1927
- type: "dismissed";
1928
- key: string;
1929
- inverted?: boolean | undefined;
1930
- } | {
1931
- type: "cooldown_active";
1932
- key: string;
1933
- inverted?: boolean | undefined;
1934
- } | {
1935
- type: "frequency_limit";
1936
- key: string;
1937
- limit: number;
1938
- inverted?: boolean | undefined;
1939
- } | {
1940
- type: "event_count";
1941
- key: string;
1942
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1943
- count: number;
1944
- withinMs?: number | undefined;
1945
- counter?: {
1946
- events: string[];
1947
- match?: Record<string, {
1948
- equals?: string | number | boolean | undefined;
1949
- contains?: string | undefined;
1950
- }> | undefined;
1951
- } | undefined;
1952
- })[];
1953
- value?: unknown;
1954
- }, {
1955
- conditions: ({
1956
- type: "page_url";
1957
- url: string;
1958
- } | {
1959
- type: "route";
1960
- routeId: string;
1961
- } | {
1962
- type: "anchor_visible";
1963
- anchorId: string;
1964
- state: "visible" | "present" | "absent";
1965
- } | {
1966
- type: "event_occurred";
1967
- eventName: string;
1968
- withinMs?: number | undefined;
1969
- } | {
1970
- type: "state_equals";
1971
- key: string;
1972
- value?: unknown;
1973
- } | {
1974
- type: "viewport";
1975
- minWidth?: number | undefined;
1976
- maxWidth?: number | undefined;
1977
- minHeight?: number | undefined;
1978
- maxHeight?: number | undefined;
1979
- } | {
1980
- type: "session_metric";
1981
- key: string;
1982
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
1983
- threshold: number;
1984
- } | {
1985
- type: "dismissed";
1986
- key: string;
1987
- inverted?: boolean | undefined;
1988
- } | {
1989
- type: "cooldown_active";
1990
- key: string;
1991
- inverted?: boolean | undefined;
1992
- } | {
1993
- type: "frequency_limit";
1994
- key: string;
1995
- limit: number;
1996
- inverted?: boolean | undefined;
1997
- } | {
1998
- type: "event_count";
1999
- key: string;
2000
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
2001
- count: number;
2002
- withinMs?: number | undefined;
2003
- counter?: {
2004
- events: string[];
2005
- match?: Record<string, {
2006
- equals?: string | number | boolean | undefined;
2007
- contains?: string | undefined;
2008
- }> | undefined;
2009
- } | undefined;
2010
- })[];
2011
- value?: unknown;
2012
- }>, "many">;
2013
- default: z.ZodUnknown;
2014
- }, "strip", z.ZodTypeAny, {
2015
- type: "rules";
2016
- rules: {
2017
- conditions: ({
2018
- type: "page_url";
2019
- url: string;
2020
- } | {
2021
- type: "route";
2022
- routeId: string;
2023
- } | {
2024
- type: "anchor_visible";
2025
- anchorId: string;
2026
- state: "visible" | "present" | "absent";
2027
- } | {
2028
- type: "event_occurred";
2029
- eventName: string;
2030
- withinMs?: number | undefined;
2031
- } | {
2032
- type: "state_equals";
2033
- key: string;
2034
- value?: unknown;
2035
- } | {
2036
- type: "viewport";
2037
- minWidth?: number | undefined;
2038
- maxWidth?: number | undefined;
2039
- minHeight?: number | undefined;
2040
- maxHeight?: number | undefined;
2041
- } | {
2042
- type: "session_metric";
2043
- key: string;
2044
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
2045
- threshold: number;
2046
- } | {
2047
- type: "dismissed";
2048
- key: string;
2049
- inverted?: boolean | undefined;
2050
- } | {
2051
- type: "cooldown_active";
2052
- key: string;
2053
- inverted?: boolean | undefined;
2054
- } | {
2055
- type: "frequency_limit";
2056
- key: string;
2057
- limit: number;
2058
- inverted?: boolean | undefined;
2059
- } | {
2060
- type: "event_count";
2061
- key: string;
2062
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
2063
- count: number;
2064
- withinMs?: number | undefined;
2065
- counter?: {
2066
- events: string[];
2067
- match?: Record<string, {
2068
- equals?: string | number | boolean | undefined;
2069
- contains?: string | undefined;
2070
- }> | undefined;
2071
- } | undefined;
2072
- })[];
2073
- value?: unknown;
2074
- }[];
2075
- default?: unknown;
2076
- }, {
2077
- type: "rules";
2078
- rules: {
2079
- conditions: ({
2080
- type: "page_url";
2081
- url: string;
2082
- } | {
2083
- type: "route";
2084
- routeId: string;
2085
- } | {
2086
- type: "anchor_visible";
2087
- anchorId: string;
2088
- state: "visible" | "present" | "absent";
2089
- } | {
2090
- type: "event_occurred";
2091
- eventName: string;
2092
- withinMs?: number | undefined;
2093
- } | {
2094
- type: "state_equals";
2095
- key: string;
2096
- value?: unknown;
2097
- } | {
2098
- type: "viewport";
2099
- minWidth?: number | undefined;
2100
- maxWidth?: number | undefined;
2101
- minHeight?: number | undefined;
2102
- maxHeight?: number | undefined;
2103
- } | {
2104
- type: "session_metric";
2105
- key: string;
2106
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
2107
- threshold: number;
2108
- } | {
2109
- type: "dismissed";
2110
- key: string;
2111
- inverted?: boolean | undefined;
2112
- } | {
2113
- type: "cooldown_active";
2114
- key: string;
2115
- inverted?: boolean | undefined;
2116
- } | {
2117
- type: "frequency_limit";
2118
- key: string;
2119
- limit: number;
2120
- inverted?: boolean | undefined;
2121
- } | {
2122
- type: "event_count";
2123
- key: string;
2124
- operator: "gte" | "lte" | "eq" | "gt" | "lt";
2125
- count: number;
2126
- withinMs?: number | undefined;
2127
- counter?: {
2128
- events: string[];
2129
- match?: Record<string, {
2130
- equals?: string | number | boolean | undefined;
2131
- contains?: string | undefined;
2132
- }> | undefined;
2133
- } | undefined;
2134
- })[];
2135
- value?: unknown;
2136
- }[];
2137
- default?: unknown;
2138
- }>, z.ZodObject<{
2139
- type: z.ZodLiteral<"score">;
2140
- field: z.ZodString;
2141
- threshold: z.ZodNumber;
2142
- above: z.ZodUnknown;
2143
- below: z.ZodUnknown;
2144
- }, "strip", z.ZodTypeAny, {
2145
- type: "score";
2146
- threshold: number;
2147
- field: string;
2148
- above?: unknown;
2149
- below?: unknown;
2150
- }, {
2151
- type: "score";
2152
- threshold: number;
2153
- field: string;
2154
- above?: unknown;
2155
- below?: unknown;
2156
- }>, z.ZodObject<{
2157
- type: z.ZodLiteral<"model">;
2158
- modelId: z.ZodString;
2159
- inputs: z.ZodArray<z.ZodString, "many">;
2160
- outputMapping: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2161
- default: z.ZodUnknown;
2162
- }, "strip", z.ZodTypeAny, {
2163
- type: "model";
2164
- modelId: string;
2165
- inputs: string[];
2166
- outputMapping: Record<string, unknown>;
2167
- default?: unknown;
2168
- }, {
2169
- type: "model";
2170
- modelId: string;
2171
- inputs: string[];
2172
- outputMapping: Record<string, unknown>;
2173
- default?: unknown;
2174
- }>, z.ZodObject<{
2175
- type: z.ZodLiteral<"external">;
2176
- endpoint: z.ZodString;
2177
- method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
2178
- default: z.ZodUnknown;
2179
- timeoutMs: z.ZodOptional<z.ZodNumber>;
2180
- }, "strip", z.ZodTypeAny, {
2181
- type: "external";
2182
- endpoint: string;
2183
- default?: unknown;
2184
- method?: "GET" | "POST" | undefined;
2185
- timeoutMs?: number | undefined;
2186
- }, {
2187
- type: "external";
2188
- endpoint: string;
2189
- default?: unknown;
2190
- method?: "GET" | "POST" | undefined;
2191
- timeoutMs?: number | undefined;
2192
- }>]>>>;
2193
- export type TriggerWhenSchema = z.infer<typeof TriggerWhenZ>;
2194
- /** Scopes a widget to specific events/URLs. */
2195
- export declare const EventScopeZ: z.ZodObject<{
2196
- events: z.ZodArray<z.ZodString, "many">;
2197
- urlContains: z.ZodOptional<z.ZodString>;
2198
- props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
2199
- }, "strip", z.ZodTypeAny, {
2200
- events: string[];
2201
- urlContains?: string | undefined;
2202
- props?: Record<string, string | number | boolean> | undefined;
2203
- }, {
2204
- events: string[];
2205
- urlContains?: string | undefined;
2206
- props?: Record<string, string | number | boolean> | undefined;
2207
- }>;
2208
- /** Toast notification config for triggerWhen transitions. */
2209
- export declare const NotifyZ: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2210
- title: z.ZodOptional<z.ZodString>;
2211
- body: z.ZodOptional<z.ZodString>;
2212
- icon: z.ZodOptional<z.ZodString>;
2213
- }, "strip", z.ZodTypeAny, {
2214
- title?: string | undefined;
2215
- body?: string | undefined;
2216
- icon?: string | undefined;
2217
- }, {
2218
- title?: string | undefined;
2219
- body?: string | undefined;
2220
- icon?: string | undefined;
2221
- }>>>;
2222
- export type ConditionSchema = z.infer<typeof ConditionZ>;
2223
- export type RuleSchema = z.infer<typeof RuleZ>;
2224
- export type DecisionStrategySchema = z.infer<typeof DecisionStrategyZ>;
2225
- export type EventScopeSchema = z.infer<typeof EventScopeZ>;