@syntrologie/adapt-nav 2.4.1 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/NavWidget.d.ts +3 -3
- package/dist/NavWidget.d.ts.map +1 -1
- package/dist/NavWidget.js +47 -81
- package/dist/cdn.d.ts.map +1 -1
- package/dist/editor.d.ts.map +1 -1
- package/dist/editor.js +50 -20
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +5 -4
- package/dist/schema.d.ts +554 -95
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +6 -8
- package/dist/summarize.d.ts +2 -2
- package/dist/summarize.d.ts.map +1 -1
- package/dist/summarize.js +5 -5
- package/dist/types.d.ts +7 -49
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/node_modules/@syntrologie/sdk-contracts/dist/index.d.ts +105 -2
- package/node_modules/@syntrologie/sdk-contracts/dist/index.js +5 -3
- package/node_modules/@syntrologie/sdk-contracts/dist/schemas.d.ts +798 -1
- package/node_modules/@syntrologie/sdk-contracts/dist/schemas.js +21 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/__tests__/AnchorPicker.test.d.ts +2 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/__tests__/AnchorPicker.test.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/__tests__/AnchorPicker.test.js +224 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/__tests__/ConditionStatusLine.test.js +102 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/__tests__/DetectionBadge.test.js +58 -6
- package/node_modules/@syntrologie/shared-editor-ui/dist/__tests__/DismissedSection.test.js +18 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/__tests__/EditorCard.test.js +61 -2
- package/node_modules/@syntrologie/shared-editor-ui/dist/__tests__/EditorPanelShell.test.js +478 -7
- package/node_modules/@syntrologie/shared-editor-ui/dist/__tests__/ElementHighlight.test.js +54 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/__tests__/selectorGenerator.test.d.ts +2 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/__tests__/selectorGenerator.test.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/__tests__/selectorGenerator.test.js +257 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/__tests__/useTriggerWhenStatus.test.d.ts +2 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/__tests__/useTriggerWhenStatus.test.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/__tests__/useTriggerWhenStatus.test.js +1015 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/AnchorPicker.js +1 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.d.ts +4 -4
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.d.ts.map +1 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/ConditionStatusLine.js +2 -2
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.d.ts +2 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.d.ts.map +1 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/DetectionBadge.js +20 -3
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.d.ts +10 -8
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.d.ts.map +1 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/EditorPanelShell.js +350 -87
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/ElementHighlight.js +1 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.d.ts +3 -3
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.d.ts.map +1 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/components/TriggerJourney.js +1 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.d.ts +1 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.d.ts.map +1 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/formatConditionLabel.js +5 -2
- package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.d.ts +24 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useTriggerWhenStatus.d.ts.map +1 -0
- package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/{useShowWhenStatus.js → useTriggerWhenStatus.js} +18 -15
- package/node_modules/@syntrologie/shared-editor-ui/dist/index.d.ts +3 -3
- package/node_modules/@syntrologie/shared-editor-ui/dist/index.d.ts.map +1 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/index.js +1 -1
- package/package.json +1 -1
- package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useShowWhenStatus.d.ts +0 -24
- package/node_modules/@syntrologie/shared-editor-ui/dist/hooks/useShowWhenStatus.d.ts.map +0 -1
|
@@ -5,6 +5,16 @@
|
|
|
5
5
|
* should import from here instead of duplicating.
|
|
6
6
|
*/
|
|
7
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
|
+
}>;
|
|
8
18
|
export declare const PageUrlConditionZ: z.ZodObject<{
|
|
9
19
|
type: z.ZodLiteral<"page_url">;
|
|
10
20
|
url: z.ZodString;
|
|
@@ -141,24 +151,98 @@ export declare const FrequencyLimitConditionZ: z.ZodObject<{
|
|
|
141
151
|
limit: number;
|
|
142
152
|
inverted?: boolean | undefined;
|
|
143
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
|
+
}>;
|
|
144
189
|
export declare const EventCountConditionZ: z.ZodObject<{
|
|
145
190
|
type: z.ZodLiteral<"event_count">;
|
|
146
191
|
key: z.ZodString;
|
|
147
192
|
operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
|
|
148
193
|
count: z.ZodNumber;
|
|
149
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
|
+
}>>;
|
|
150
220
|
}, "strip", z.ZodTypeAny, {
|
|
151
221
|
type: "event_count";
|
|
152
222
|
key: string;
|
|
153
223
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
154
224
|
count: number;
|
|
155
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;
|
|
156
233
|
}, {
|
|
157
234
|
type: "event_count";
|
|
158
235
|
key: string;
|
|
159
236
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
160
237
|
count: number;
|
|
161
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;
|
|
162
246
|
}>;
|
|
163
247
|
export declare const ConditionZ: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
164
248
|
type: z.ZodLiteral<"page_url">;
|
|
@@ -292,18 +376,57 @@ export declare const ConditionZ: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
292
376
|
operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
|
|
293
377
|
count: z.ZodNumber;
|
|
294
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
|
+
}>>;
|
|
295
404
|
}, "strip", z.ZodTypeAny, {
|
|
296
405
|
type: "event_count";
|
|
297
406
|
key: string;
|
|
298
407
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
299
408
|
count: number;
|
|
300
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;
|
|
301
417
|
}, {
|
|
302
418
|
type: "event_count";
|
|
303
419
|
key: string;
|
|
304
420
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
305
421
|
count: number;
|
|
306
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;
|
|
307
430
|
}>]>;
|
|
308
431
|
export declare const RuleZ: z.ZodObject<{
|
|
309
432
|
conditions: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
@@ -438,18 +561,57 @@ export declare const RuleZ: z.ZodObject<{
|
|
|
438
561
|
operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
|
|
439
562
|
count: z.ZodNumber;
|
|
440
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
|
+
}>>;
|
|
441
589
|
}, "strip", z.ZodTypeAny, {
|
|
442
590
|
type: "event_count";
|
|
443
591
|
key: string;
|
|
444
592
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
445
593
|
count: number;
|
|
446
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;
|
|
447
602
|
}, {
|
|
448
603
|
type: "event_count";
|
|
449
604
|
key: string;
|
|
450
605
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
451
606
|
count: number;
|
|
452
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;
|
|
453
615
|
}>]>, "many">;
|
|
454
616
|
value: z.ZodUnknown;
|
|
455
617
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -501,6 +663,13 @@ export declare const RuleZ: z.ZodObject<{
|
|
|
501
663
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
502
664
|
count: number;
|
|
503
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;
|
|
504
673
|
})[];
|
|
505
674
|
value?: unknown;
|
|
506
675
|
}, {
|
|
@@ -552,6 +721,13 @@ export declare const RuleZ: z.ZodObject<{
|
|
|
552
721
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
553
722
|
count: number;
|
|
554
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;
|
|
555
731
|
})[];
|
|
556
732
|
value?: unknown;
|
|
557
733
|
}>;
|
|
@@ -690,18 +866,57 @@ export declare const RuleStrategyZ: z.ZodObject<{
|
|
|
690
866
|
operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
|
|
691
867
|
count: z.ZodNumber;
|
|
692
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
|
+
}>>;
|
|
693
894
|
}, "strip", z.ZodTypeAny, {
|
|
694
895
|
type: "event_count";
|
|
695
896
|
key: string;
|
|
696
897
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
697
898
|
count: number;
|
|
698
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;
|
|
699
907
|
}, {
|
|
700
908
|
type: "event_count";
|
|
701
909
|
key: string;
|
|
702
910
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
703
911
|
count: number;
|
|
704
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;
|
|
705
920
|
}>]>, "many">;
|
|
706
921
|
value: z.ZodUnknown;
|
|
707
922
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -753,6 +968,13 @@ export declare const RuleStrategyZ: z.ZodObject<{
|
|
|
753
968
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
754
969
|
count: number;
|
|
755
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;
|
|
756
978
|
})[];
|
|
757
979
|
value?: unknown;
|
|
758
980
|
}, {
|
|
@@ -804,6 +1026,13 @@ export declare const RuleStrategyZ: z.ZodObject<{
|
|
|
804
1026
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
805
1027
|
count: number;
|
|
806
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;
|
|
807
1036
|
})[];
|
|
808
1037
|
value?: unknown;
|
|
809
1038
|
}>, "many">;
|
|
@@ -859,6 +1088,13 @@ export declare const RuleStrategyZ: z.ZodObject<{
|
|
|
859
1088
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
860
1089
|
count: number;
|
|
861
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;
|
|
862
1098
|
})[];
|
|
863
1099
|
value?: unknown;
|
|
864
1100
|
}[];
|
|
@@ -914,6 +1150,13 @@ export declare const RuleStrategyZ: z.ZodObject<{
|
|
|
914
1150
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
915
1151
|
count: number;
|
|
916
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;
|
|
917
1160
|
})[];
|
|
918
1161
|
value?: unknown;
|
|
919
1162
|
}[];
|
|
@@ -1111,18 +1354,57 @@ export declare const DecisionStrategyZ: z.ZodDiscriminatedUnion<"type", [z.ZodOb
|
|
|
1111
1354
|
operator: z.ZodEnum<["gte", "lte", "eq", "gt", "lt"]>;
|
|
1112
1355
|
count: z.ZodNumber;
|
|
1113
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
|
+
}>>;
|
|
1114
1382
|
}, "strip", z.ZodTypeAny, {
|
|
1115
1383
|
type: "event_count";
|
|
1116
1384
|
key: string;
|
|
1117
1385
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
1118
1386
|
count: number;
|
|
1119
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;
|
|
1120
1395
|
}, {
|
|
1121
1396
|
type: "event_count";
|
|
1122
1397
|
key: string;
|
|
1123
1398
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
1124
1399
|
count: number;
|
|
1125
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;
|
|
1126
1408
|
}>]>, "many">;
|
|
1127
1409
|
value: z.ZodUnknown;
|
|
1128
1410
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1174,6 +1456,13 @@ export declare const DecisionStrategyZ: z.ZodDiscriminatedUnion<"type", [z.ZodOb
|
|
|
1174
1456
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
1175
1457
|
count: number;
|
|
1176
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;
|
|
1177
1466
|
})[];
|
|
1178
1467
|
value?: unknown;
|
|
1179
1468
|
}, {
|
|
@@ -1225,6 +1514,13 @@ export declare const DecisionStrategyZ: z.ZodDiscriminatedUnion<"type", [z.ZodOb
|
|
|
1225
1514
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
1226
1515
|
count: number;
|
|
1227
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;
|
|
1228
1524
|
})[];
|
|
1229
1525
|
value?: unknown;
|
|
1230
1526
|
}>, "many">;
|
|
@@ -1280,6 +1576,13 @@ export declare const DecisionStrategyZ: z.ZodDiscriminatedUnion<"type", [z.ZodOb
|
|
|
1280
1576
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
1281
1577
|
count: number;
|
|
1282
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;
|
|
1283
1586
|
})[];
|
|
1284
1587
|
value?: unknown;
|
|
1285
1588
|
}[];
|
|
@@ -1335,6 +1638,13 @@ export declare const DecisionStrategyZ: z.ZodDiscriminatedUnion<"type", [z.ZodOb
|
|
|
1335
1638
|
operator: "gte" | "lte" | "eq" | "gt" | "lt";
|
|
1336
1639
|
count: number;
|
|
1337
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;
|
|
1338
1648
|
})[];
|
|
1339
1649
|
value?: unknown;
|
|
1340
1650
|
}[];
|
|
@@ -1394,6 +1704,493 @@ export declare const DecisionStrategyZ: z.ZodDiscriminatedUnion<"type", [z.ZodOb
|
|
|
1394
1704
|
method?: "GET" | "POST" | undefined;
|
|
1395
1705
|
timeoutMs?: number | undefined;
|
|
1396
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>;
|
|
1397
2194
|
/** Scopes a widget to specific events/URLs. */
|
|
1398
2195
|
export declare const EventScopeZ: z.ZodObject<{
|
|
1399
2196
|
events: z.ZodArray<z.ZodString, "many">;
|
|
@@ -1408,7 +2205,7 @@ export declare const EventScopeZ: z.ZodObject<{
|
|
|
1408
2205
|
urlContains?: string | undefined;
|
|
1409
2206
|
props?: Record<string, string | number | boolean> | undefined;
|
|
1410
2207
|
}>;
|
|
1411
|
-
/** Toast notification config for
|
|
2208
|
+
/** Toast notification config for triggerWhen transitions. */
|
|
1412
2209
|
export declare const NotifyZ: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1413
2210
|
title: z.ZodOptional<z.ZodString>;
|
|
1414
2211
|
body: z.ZodOptional<z.ZodString>;
|