@uniformdev/context 18.11.1-alpha.4 → 18.11.1-alpha.5

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.
@@ -0,0 +1,1718 @@
1
+ import { p as paths$7 } from './v2-manifest.swagger-200ca5ee.js';
2
+
3
+ interface components$6 {
4
+ schemas: {
5
+ EnrichmentCategory: {
6
+ /** @description The maximum visitor score allowed for enrichment keys in this category */
7
+ cap: number;
8
+ };
9
+ PreviewSignal: components$6["schemas"]["Signal"] & {
10
+ /** @description Friendly name of the signal */
11
+ name: string;
12
+ /** @description Description of the signal */
13
+ description?: string;
14
+ };
15
+ Signal: {
16
+ /** @description The signal strength per activation (each time its criteria are true, this score is added) */
17
+ str: number;
18
+ /** @description The maximum visitor score allowed for this signal */
19
+ cap: number;
20
+ /**
21
+ * @description How long the signal's score should persist
22
+ * 's' = current session (expires after a period of inactivity)
23
+ * 'p' = permanent (expires as far in the future as possible, may be limited by browser security settings)
24
+ * 't' = transient (score tracks the current state of the criteria every time scores are updated)
25
+ *
26
+ * @enum {string}
27
+ */
28
+ dur: "s" | "p" | "t";
29
+ crit: components$6["schemas"]["RootSignalCriteriaGroup"];
30
+ };
31
+ RootSignalCriteriaGroup: {
32
+ /**
33
+ * @description Criteria type (Group of other criteria)
34
+ * @enum {string}
35
+ */
36
+ type: "G";
37
+ /**
38
+ * @description The logical operator to apply to the criteria groups
39
+ * & = AND
40
+ * | = OR
41
+ *
42
+ * Default is `&` if unspecified.
43
+ *
44
+ * @default &
45
+ * @enum {string}
46
+ */
47
+ op?: "&" | "|";
48
+ /** @description The criteria clauses that make up this grouping of criteria */
49
+ clauses: (components$6["schemas"]["SignalCriteriaGroup"] | components$6["schemas"]["SignalCriteria"])[];
50
+ };
51
+ SignalCriteriaGroup: {
52
+ /**
53
+ * @description Criteria type (Group of other criteria)
54
+ * @enum {string}
55
+ */
56
+ type: "G";
57
+ /**
58
+ * @description The logical operator to apply to the criteria groups
59
+ * & = AND
60
+ * | = OR
61
+ *
62
+ * Default is `&` if unspecified.
63
+ *
64
+ * @enum {string}
65
+ */
66
+ op?: "&" | "|";
67
+ /** @description The criteria clauses that make up this grouping of criteria */
68
+ clauses: (components$6["schemas"]["SignalCriteriaGroup"] | components$6["schemas"]["SignalCriteria"])[];
69
+ };
70
+ SignalCriteria: components$6["schemas"]["CookieCriteria"] | components$6["schemas"]["QueryStringCriteria"] | components$6["schemas"]["QuirkCriteria"] | components$6["schemas"]["EventCriteria"] | components$6["schemas"]["CurrentPageCriteria"] | components$6["schemas"]["PageViewCountCriteria"];
71
+ /** @description Matches a URL query string parameter value */
72
+ QueryStringCriteria: {
73
+ /** @enum {string} */
74
+ type: "QS";
75
+ /** @description The name of the query string parameter to match */
76
+ queryName: string;
77
+ /** @description The value to match the query string parameter against */
78
+ match: components$6["schemas"]["StringMatch"];
79
+ };
80
+ /** @description Matches a web cookie value */
81
+ CookieCriteria: {
82
+ /** @enum {string} */
83
+ type: "CK";
84
+ /** @description The name of the cookie to match */
85
+ cookieName: string;
86
+ /** @description The value to match the cookie against */
87
+ match: components$6["schemas"]["StringMatch"];
88
+ };
89
+ /** @description Matches a visitor quirk key and value */
90
+ QuirkCriteria: {
91
+ /** @enum {string} */
92
+ type: "QK";
93
+ /** @description The name of the quirk key to match */
94
+ key: string;
95
+ /** @description The quirk value to match against */
96
+ match: components$6["schemas"]["StringMatch"];
97
+ };
98
+ /** @description Matches an analytics event name being fired */
99
+ EventCriteria: {
100
+ /** @enum {string} */
101
+ type: "EVT";
102
+ /** @description How to match the event name */
103
+ event: components$6["schemas"]["StringMatch"];
104
+ };
105
+ /**
106
+ * @description Matches the current page's absolute path (i.e. /path/to/page.html)
107
+ * Does not include the query string or protocol and hostname (i.e. NOT https://foo.com/path/to/page.html?query=something)
108
+ */
109
+ CurrentPageCriteria: {
110
+ /** @enum {string} */
111
+ type: "PV";
112
+ /** @description The page/route path to match as a page that has been visited */
113
+ path: components$6["schemas"]["StringMatch"];
114
+ };
115
+ PageViewCountCriteria: {
116
+ /** @enum {string} */
117
+ type: "PVC";
118
+ /** @description The expression to match the page view count against */
119
+ match: components$6["schemas"]["NumberMatch"];
120
+ };
121
+ /** @description Describes a match expression on a string */
122
+ StringMatch: {
123
+ /** @description The right hand side of the match expression */
124
+ rhs: string;
125
+ /**
126
+ * @description The match operator
127
+ * '=' = exact match
128
+ * '~' = contains match
129
+ * '//' = regular expression match
130
+ *
131
+ * Any of the above can be prefixed with '!' to invert the match (i.e. != for 'not an exact match')
132
+ *
133
+ * @enum {string}
134
+ */
135
+ op: "=" | "~" | "//" | "!=" | "!~" | "!//";
136
+ /** @description The case sensitivity of the match. Defaults to false if unspecified. */
137
+ cs?: boolean;
138
+ } | {
139
+ /**
140
+ * @description The type of match to perform
141
+ * '*' = exists with any value
142
+ * '!*' = does not exist
143
+ *
144
+ * @enum {string}
145
+ */
146
+ op: "*" | "!*";
147
+ };
148
+ /** @description Describes a match expression on a number */
149
+ NumberMatch: {
150
+ /** @description The right hand side of the match expression */
151
+ rhs: number;
152
+ /**
153
+ * @description The type of match to perform
154
+ * '=' = exact match
155
+ * '!=' = not an exact match
156
+ * '<' = less than match expression
157
+ * '>' = greater than match expression
158
+ *
159
+ * @enum {string}
160
+ */
161
+ op: "=" | "<" | ">" | "!=";
162
+ };
163
+ /** @description Defines an aggregate dimension that is a grouping of other dimensions' scores; an intent or audience. */
164
+ AggregateDimension: {
165
+ /** @description Input dimensions to the aggregate dimension */
166
+ inputs: components$6["schemas"]["AggregateDimensionInput"][];
167
+ };
168
+ /** @description Defines an input dimension to an aggregate dimension */
169
+ AggregateDimensionInput: {
170
+ /**
171
+ * @description Dimension name to reference as an input.
172
+ * For enrichment inputs, use CATEGORY_KEY as the dimension.
173
+ * Enrichments, signals, and other aggregate dimensions may be referenced.
174
+ *
175
+ * Note that creating a cycle of aggregate dimensions is allowed, however
176
+ * the final score will _ignore_ the cycled aggregate dimension in the result.
177
+ * This can be used to create mutually exclusive aggregates.
178
+ */
179
+ dim: string;
180
+ /**
181
+ * @description The sign of the input dimension controls how it affects the aggregate dimension's final score.
182
+ *
183
+ * '+' = add to the final score
184
+ * '-' = subtract from the final score
185
+ * 'c' = clear the final score (if the input dimension has any score at all, this aggreate will have no score regardless of other inputs)
186
+ *
187
+ * Default if unspecified: '+'
188
+ *
189
+ * @default +
190
+ * @enum {string}
191
+ */
192
+ sign?: "+" | "-" | "c";
193
+ };
194
+ Test: {
195
+ /** @description Winning variation ID - if set, the test will not run and this variation is shown to all visitors (the test is closed) */
196
+ wv?: string;
197
+ };
198
+ };
199
+ }
200
+
201
+ /**
202
+ * This file was auto-generated by openapi-typescript.
203
+ * Do not make direct changes to the file.
204
+ */
205
+ interface paths$6 {
206
+ "/api/v1/enrichment-values": {
207
+ put: {
208
+ responses: {
209
+ /** OK */
210
+ 204: never;
211
+ 400: external$6["swagger.yml"]["components"]["responses"]["BadRequestError"];
212
+ 401: external$6["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
213
+ 403: external$6["swagger.yml"]["components"]["responses"]["ForbiddenError"];
214
+ 429: external$6["swagger.yml"]["components"]["responses"]["RateLimitError"];
215
+ 500: external$6["swagger.yml"]["components"]["responses"]["InternalServerError"];
216
+ };
217
+ requestBody: {
218
+ content: {
219
+ "application/json": {
220
+ enrichmentValue: external$6["v1-enrichments.swagger.yml"]["components"]["schemas"]["EnrichmentValue"];
221
+ enrichmentId: string;
222
+ /** Format: uuid */
223
+ projectId: string;
224
+ };
225
+ };
226
+ };
227
+ };
228
+ delete: {
229
+ responses: {
230
+ /** OK */
231
+ 204: never;
232
+ 400: external$6["swagger.yml"]["components"]["responses"]["BadRequestError"];
233
+ 401: external$6["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
234
+ 403: external$6["swagger.yml"]["components"]["responses"]["ForbiddenError"];
235
+ /** Parent enrichment category was not found */
236
+ 404: unknown;
237
+ 429: external$6["swagger.yml"]["components"]["responses"]["RateLimitError"];
238
+ 500: external$6["swagger.yml"]["components"]["responses"]["InternalServerError"];
239
+ };
240
+ requestBody: {
241
+ content: {
242
+ "application/json": {
243
+ enrichmentId: string;
244
+ /** Format: uuid */
245
+ projectId: string;
246
+ enrichmentValueId: string;
247
+ };
248
+ };
249
+ };
250
+ };
251
+ /** Handles preflight requests. This endpoint allows CORS. */
252
+ options: {
253
+ responses: {
254
+ /** OK */
255
+ 204: never;
256
+ };
257
+ };
258
+ };
259
+ }
260
+ interface external$6 {
261
+ "swagger.yml": {
262
+ paths: {};
263
+ components: {
264
+ schemas: {
265
+ Error: {
266
+ /** @description Error message(s) that occurred while processing the request */
267
+ errorMessage?: string[] | string;
268
+ };
269
+ };
270
+ responses: {
271
+ /** Request input validation failed */
272
+ BadRequestError: {
273
+ content: {
274
+ "application/json": external$6["swagger.yml"]["components"]["schemas"]["Error"];
275
+ };
276
+ };
277
+ /** API key or token was not valid */
278
+ UnauthorizedError: {
279
+ content: {
280
+ "application/json": external$6["swagger.yml"]["components"]["schemas"]["Error"];
281
+ };
282
+ };
283
+ /** Permission was denied */
284
+ ForbiddenError: {
285
+ content: {
286
+ "application/json": external$6["swagger.yml"]["components"]["schemas"]["Error"];
287
+ };
288
+ };
289
+ /** Resource not found */
290
+ NotFoundError: {
291
+ content: {
292
+ "application/json": external$6["swagger.yml"]["components"]["schemas"]["Error"];
293
+ };
294
+ };
295
+ /** Too many requests in allowed time period */
296
+ RateLimitError: unknown;
297
+ /** Execution error occurred */
298
+ InternalServerError: unknown;
299
+ };
300
+ };
301
+ operations: {};
302
+ };
303
+ "v1-enrichments.swagger.yml": {
304
+ paths: {
305
+ "/api/v1/enrichments": {
306
+ get: {
307
+ parameters: {
308
+ query: {
309
+ projectId: string;
310
+ };
311
+ };
312
+ responses: {
313
+ /** OK */
314
+ 200: {
315
+ content: {
316
+ "application/json": {
317
+ enrichments: external$6["v1-enrichments.swagger.yml"]["components"]["schemas"]["EnrichmentCategoryWithValues"][];
318
+ };
319
+ };
320
+ };
321
+ 400: external$6["swagger.yml"]["components"]["responses"]["BadRequestError"];
322
+ 401: external$6["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
323
+ 403: external$6["swagger.yml"]["components"]["responses"]["ForbiddenError"];
324
+ 429: external$6["swagger.yml"]["components"]["responses"]["RateLimitError"];
325
+ 500: external$6["swagger.yml"]["components"]["responses"]["InternalServerError"];
326
+ };
327
+ };
328
+ put: {
329
+ responses: {
330
+ /** OK */
331
+ 204: never;
332
+ 400: external$6["swagger.yml"]["components"]["responses"]["BadRequestError"];
333
+ 401: external$6["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
334
+ 403: external$6["swagger.yml"]["components"]["responses"]["ForbiddenError"];
335
+ 429: external$6["swagger.yml"]["components"]["responses"]["RateLimitError"];
336
+ 500: external$6["swagger.yml"]["components"]["responses"]["InternalServerError"];
337
+ };
338
+ requestBody: {
339
+ content: {
340
+ "application/json": {
341
+ enrichment: external$6["v1-enrichments.swagger.yml"]["components"]["schemas"]["EnrichmentCategory"];
342
+ /** Format: uuid */
343
+ projectId: string;
344
+ };
345
+ };
346
+ };
347
+ };
348
+ delete: {
349
+ responses: {
350
+ /** OK */
351
+ 204: never;
352
+ 400: external$6["swagger.yml"]["components"]["responses"]["BadRequestError"];
353
+ 401: external$6["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
354
+ 403: external$6["swagger.yml"]["components"]["responses"]["ForbiddenError"];
355
+ 429: external$6["swagger.yml"]["components"]["responses"]["RateLimitError"];
356
+ 500: external$6["swagger.yml"]["components"]["responses"]["InternalServerError"];
357
+ };
358
+ requestBody: {
359
+ content: {
360
+ "application/json": {
361
+ enrichmentId: string;
362
+ /** Format: uuid */
363
+ projectId: string;
364
+ };
365
+ };
366
+ };
367
+ };
368
+ /** Handles preflight requests. This endpoint allows CORS. */
369
+ options: {
370
+ responses: {
371
+ /** OK */
372
+ 204: never;
373
+ };
374
+ };
375
+ };
376
+ };
377
+ components: {
378
+ schemas: {
379
+ EnrichmentCategory: {
380
+ /** @description Public ID of the enrichment category */
381
+ id: string;
382
+ /** @description Display name of the enrichment category */
383
+ name: string;
384
+ /** @description Optional sort order of the enrichment category (if not set, sorts by name) */
385
+ sortOrder?: number | null;
386
+ /**
387
+ * @description The maximum visitor score allowed for enrichment keys in this category
388
+ * @default 99999999
389
+ */
390
+ cap?: number;
391
+ };
392
+ EnrichmentCategoryWithValues: external$6["v1-enrichments.swagger.yml"]["components"]["schemas"]["EnrichmentCategory"] & {
393
+ values: external$6["v1-enrichments.swagger.yml"]["components"]["schemas"]["EnrichmentValue"][];
394
+ };
395
+ EnrichmentValue: {
396
+ /** @description Public ID of the enrichment value */
397
+ id: string;
398
+ /** @description Display name of the enrichment value */
399
+ value: string;
400
+ /** @description Optional sort order of the enrichment value (if not set, sorts by name) */
401
+ sortOrder?: number | null;
402
+ };
403
+ };
404
+ };
405
+ operations: {};
406
+ };
407
+ }
408
+
409
+ /**
410
+ * This file was auto-generated by openapi-typescript.
411
+ * Do not make direct changes to the file.
412
+ */
413
+ interface paths$5 {
414
+ "/api/v1/enrichments": {
415
+ get: {
416
+ parameters: {
417
+ query: {
418
+ projectId: string;
419
+ };
420
+ };
421
+ responses: {
422
+ /** OK */
423
+ 200: {
424
+ content: {
425
+ "application/json": {
426
+ enrichments: components$5["schemas"]["EnrichmentCategoryWithValues"][];
427
+ };
428
+ };
429
+ };
430
+ 400: external$5["swagger.yml"]["components"]["responses"]["BadRequestError"];
431
+ 401: external$5["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
432
+ 403: external$5["swagger.yml"]["components"]["responses"]["ForbiddenError"];
433
+ 429: external$5["swagger.yml"]["components"]["responses"]["RateLimitError"];
434
+ 500: external$5["swagger.yml"]["components"]["responses"]["InternalServerError"];
435
+ };
436
+ };
437
+ put: {
438
+ responses: {
439
+ /** OK */
440
+ 204: never;
441
+ 400: external$5["swagger.yml"]["components"]["responses"]["BadRequestError"];
442
+ 401: external$5["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
443
+ 403: external$5["swagger.yml"]["components"]["responses"]["ForbiddenError"];
444
+ 429: external$5["swagger.yml"]["components"]["responses"]["RateLimitError"];
445
+ 500: external$5["swagger.yml"]["components"]["responses"]["InternalServerError"];
446
+ };
447
+ requestBody: {
448
+ content: {
449
+ "application/json": {
450
+ enrichment: components$5["schemas"]["EnrichmentCategory"];
451
+ /** Format: uuid */
452
+ projectId: string;
453
+ };
454
+ };
455
+ };
456
+ };
457
+ delete: {
458
+ responses: {
459
+ /** OK */
460
+ 204: never;
461
+ 400: external$5["swagger.yml"]["components"]["responses"]["BadRequestError"];
462
+ 401: external$5["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
463
+ 403: external$5["swagger.yml"]["components"]["responses"]["ForbiddenError"];
464
+ 429: external$5["swagger.yml"]["components"]["responses"]["RateLimitError"];
465
+ 500: external$5["swagger.yml"]["components"]["responses"]["InternalServerError"];
466
+ };
467
+ requestBody: {
468
+ content: {
469
+ "application/json": {
470
+ enrichmentId: string;
471
+ /** Format: uuid */
472
+ projectId: string;
473
+ };
474
+ };
475
+ };
476
+ };
477
+ /** Handles preflight requests. This endpoint allows CORS. */
478
+ options: {
479
+ responses: {
480
+ /** OK */
481
+ 204: never;
482
+ };
483
+ };
484
+ };
485
+ }
486
+ interface components$5 {
487
+ schemas: {
488
+ EnrichmentCategory: {
489
+ /** @description Public ID of the enrichment category */
490
+ id: string;
491
+ /** @description Display name of the enrichment category */
492
+ name: string;
493
+ /** @description Optional sort order of the enrichment category (if not set, sorts by name) */
494
+ sortOrder?: number | null;
495
+ /**
496
+ * @description The maximum visitor score allowed for enrichment keys in this category
497
+ * @default 99999999
498
+ */
499
+ cap?: number;
500
+ };
501
+ EnrichmentCategoryWithValues: components$5["schemas"]["EnrichmentCategory"] & {
502
+ values: components$5["schemas"]["EnrichmentValue"][];
503
+ };
504
+ EnrichmentValue: {
505
+ /** @description Public ID of the enrichment value */
506
+ id: string;
507
+ /** @description Display name of the enrichment value */
508
+ value: string;
509
+ /** @description Optional sort order of the enrichment value (if not set, sorts by name) */
510
+ sortOrder?: number | null;
511
+ };
512
+ };
513
+ }
514
+ interface external$5 {
515
+ "swagger.yml": {
516
+ paths: {};
517
+ components: {
518
+ schemas: {
519
+ Error: {
520
+ /** @description Error message(s) that occurred while processing the request */
521
+ errorMessage?: string[] | string;
522
+ };
523
+ };
524
+ responses: {
525
+ /** Request input validation failed */
526
+ BadRequestError: {
527
+ content: {
528
+ "application/json": external$5["swagger.yml"]["components"]["schemas"]["Error"];
529
+ };
530
+ };
531
+ /** API key or token was not valid */
532
+ UnauthorizedError: {
533
+ content: {
534
+ "application/json": external$5["swagger.yml"]["components"]["schemas"]["Error"];
535
+ };
536
+ };
537
+ /** Permission was denied */
538
+ ForbiddenError: {
539
+ content: {
540
+ "application/json": external$5["swagger.yml"]["components"]["schemas"]["Error"];
541
+ };
542
+ };
543
+ /** Resource not found */
544
+ NotFoundError: {
545
+ content: {
546
+ "application/json": external$5["swagger.yml"]["components"]["schemas"]["Error"];
547
+ };
548
+ };
549
+ /** Too many requests in allowed time period */
550
+ RateLimitError: unknown;
551
+ /** Execution error occurred */
552
+ InternalServerError: unknown;
553
+ };
554
+ };
555
+ operations: {};
556
+ };
557
+ }
558
+
559
+ /**
560
+ * This file was auto-generated by openapi-typescript.
561
+ * Do not make direct changes to the file.
562
+ */
563
+ interface paths$4 {
564
+ "/api/v2/aggregate": {
565
+ get: {
566
+ parameters: {
567
+ query: {
568
+ /** The project to fetch aggregates for */
569
+ projectId: string;
570
+ /** Limit the results to a specific aggregate ID */
571
+ aggregateId?: string;
572
+ /**
573
+ * Limit the results to a specific aggregate type
574
+ * 0: Audience
575
+ * 1: Intent
576
+ */
577
+ type?: 0 | 1;
578
+ };
579
+ };
580
+ responses: {
581
+ /** OK */
582
+ 200: {
583
+ content: {
584
+ "application/json": {
585
+ aggregates: components$4["schemas"]["AggregateData"][];
586
+ };
587
+ };
588
+ };
589
+ 400: external$4["swagger.yml"]["components"]["responses"]["BadRequestError"];
590
+ 401: external$4["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
591
+ 403: external$4["swagger.yml"]["components"]["responses"]["ForbiddenError"];
592
+ 429: external$4["swagger.yml"]["components"]["responses"]["RateLimitError"];
593
+ 500: external$4["swagger.yml"]["components"]["responses"]["InternalServerError"];
594
+ };
595
+ };
596
+ put: {
597
+ responses: {
598
+ /** OK */
599
+ 204: never;
600
+ 400: external$4["swagger.yml"]["components"]["responses"]["BadRequestError"];
601
+ 401: external$4["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
602
+ 403: external$4["swagger.yml"]["components"]["responses"]["ForbiddenError"];
603
+ 429: external$4["swagger.yml"]["components"]["responses"]["RateLimitError"];
604
+ 500: external$4["swagger.yml"]["components"]["responses"]["InternalServerError"];
605
+ };
606
+ requestBody: {
607
+ content: {
608
+ "application/json": {
609
+ aggregate: components$4["schemas"]["AggregateData"];
610
+ /** Format: uuid */
611
+ projectId: string;
612
+ /**
613
+ * @description Skips updating aggregate inputs and upserts only the aggregate definition.
614
+ * Inputs data is still required, but is ignored and not saved or validated.
615
+ * Useful when creating aggregates that reference each other: Create the definitions, then the inputs.
616
+ *
617
+ * @default false
618
+ */
619
+ skipInputs?: boolean;
620
+ };
621
+ };
622
+ };
623
+ };
624
+ delete: {
625
+ responses: {
626
+ /** OK */
627
+ 204: never;
628
+ 400: external$4["swagger.yml"]["components"]["responses"]["BadRequestError"];
629
+ 401: external$4["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
630
+ 403: external$4["swagger.yml"]["components"]["responses"]["ForbiddenError"];
631
+ 429: external$4["swagger.yml"]["components"]["responses"]["RateLimitError"];
632
+ 500: external$4["swagger.yml"]["components"]["responses"]["InternalServerError"];
633
+ };
634
+ requestBody: {
635
+ content: {
636
+ "application/json": {
637
+ aggregateId: string;
638
+ /** Format: uuid */
639
+ projectId: string;
640
+ };
641
+ };
642
+ };
643
+ };
644
+ /** Handles preflight requests. This endpoint allows CORS. */
645
+ options: {
646
+ responses: {
647
+ /** OK */
648
+ 204: never;
649
+ };
650
+ };
651
+ };
652
+ }
653
+ interface components$4 {
654
+ schemas: {
655
+ AggregateData: {
656
+ id: string;
657
+ name: string;
658
+ description?: string;
659
+ /**
660
+ * @description The type of aggregate
661
+ * 0: Audience
662
+ * 1: Intent
663
+ *
664
+ * @enum {number}
665
+ */
666
+ type: 0 | 1;
667
+ inputs: external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["AggregateDimensionInput"][];
668
+ };
669
+ };
670
+ }
671
+ interface external$4 {
672
+ "swagger.yml": {
673
+ paths: {};
674
+ components: {
675
+ schemas: {
676
+ Error: {
677
+ /** @description Error message(s) that occurred while processing the request */
678
+ errorMessage?: string[] | string;
679
+ };
680
+ };
681
+ responses: {
682
+ /** Request input validation failed */
683
+ BadRequestError: {
684
+ content: {
685
+ "application/json": external$4["swagger.yml"]["components"]["schemas"]["Error"];
686
+ };
687
+ };
688
+ /** API key or token was not valid */
689
+ UnauthorizedError: {
690
+ content: {
691
+ "application/json": external$4["swagger.yml"]["components"]["schemas"]["Error"];
692
+ };
693
+ };
694
+ /** Permission was denied */
695
+ ForbiddenError: {
696
+ content: {
697
+ "application/json": external$4["swagger.yml"]["components"]["schemas"]["Error"];
698
+ };
699
+ };
700
+ /** Resource not found */
701
+ NotFoundError: {
702
+ content: {
703
+ "application/json": external$4["swagger.yml"]["components"]["schemas"]["Error"];
704
+ };
705
+ };
706
+ /** Too many requests in allowed time period */
707
+ RateLimitError: unknown;
708
+ /** Execution error occurred */
709
+ InternalServerError: unknown;
710
+ };
711
+ };
712
+ operations: {};
713
+ };
714
+ "uniform-context-types.swagger.yml": {
715
+ paths: {};
716
+ components: {
717
+ schemas: {
718
+ EnrichmentCategory: {
719
+ /** @description The maximum visitor score allowed for enrichment keys in this category */
720
+ cap: number;
721
+ };
722
+ PreviewSignal: external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["Signal"] & {
723
+ /** @description Friendly name of the signal */
724
+ name: string;
725
+ /** @description Description of the signal */
726
+ description?: string;
727
+ };
728
+ Signal: {
729
+ /** @description The signal strength per activation (each time its criteria are true, this score is added) */
730
+ str: number;
731
+ /** @description The maximum visitor score allowed for this signal */
732
+ cap: number;
733
+ /**
734
+ * @description How long the signal's score should persist
735
+ * 's' = current session (expires after a period of inactivity)
736
+ * 'p' = permanent (expires as far in the future as possible, may be limited by browser security settings)
737
+ * 't' = transient (score tracks the current state of the criteria every time scores are updated)
738
+ *
739
+ * @enum {string}
740
+ */
741
+ dur: "s" | "p" | "t";
742
+ crit: external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["RootSignalCriteriaGroup"];
743
+ };
744
+ RootSignalCriteriaGroup: {
745
+ /**
746
+ * @description Criteria type (Group of other criteria)
747
+ * @enum {string}
748
+ */
749
+ type: "G";
750
+ /**
751
+ * @description The logical operator to apply to the criteria groups
752
+ * & = AND
753
+ * | = OR
754
+ *
755
+ * Default is `&` if unspecified.
756
+ *
757
+ * @default &
758
+ * @enum {string}
759
+ */
760
+ op?: "&" | "|";
761
+ /** @description The criteria clauses that make up this grouping of criteria */
762
+ clauses: (external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteriaGroup"] | external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteria"])[];
763
+ };
764
+ SignalCriteriaGroup: {
765
+ /**
766
+ * @description Criteria type (Group of other criteria)
767
+ * @enum {string}
768
+ */
769
+ type: "G";
770
+ /**
771
+ * @description The logical operator to apply to the criteria groups
772
+ * & = AND
773
+ * | = OR
774
+ *
775
+ * Default is `&` if unspecified.
776
+ *
777
+ * @enum {string}
778
+ */
779
+ op?: "&" | "|";
780
+ /** @description The criteria clauses that make up this grouping of criteria */
781
+ clauses: (external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteriaGroup"] | external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteria"])[];
782
+ };
783
+ SignalCriteria: external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["CookieCriteria"] | external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["QueryStringCriteria"] | external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["QuirkCriteria"] | external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["EventCriteria"] | external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["CurrentPageCriteria"] | external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["PageViewCountCriteria"];
784
+ /** @description Matches a URL query string parameter value */
785
+ QueryStringCriteria: {
786
+ /** @enum {string} */
787
+ type: "QS";
788
+ /** @description The name of the query string parameter to match */
789
+ queryName: string;
790
+ /** @description The value to match the query string parameter against */
791
+ match: external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
792
+ };
793
+ /** @description Matches a web cookie value */
794
+ CookieCriteria: {
795
+ /** @enum {string} */
796
+ type: "CK";
797
+ /** @description The name of the cookie to match */
798
+ cookieName: string;
799
+ /** @description The value to match the cookie against */
800
+ match: external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
801
+ };
802
+ /** @description Matches a visitor quirk key and value */
803
+ QuirkCriteria: {
804
+ /** @enum {string} */
805
+ type: "QK";
806
+ /** @description The name of the quirk key to match */
807
+ key: string;
808
+ /** @description The quirk value to match against */
809
+ match: external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
810
+ };
811
+ /** @description Matches an analytics event name being fired */
812
+ EventCriteria: {
813
+ /** @enum {string} */
814
+ type: "EVT";
815
+ /** @description How to match the event name */
816
+ event: external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
817
+ };
818
+ /**
819
+ * @description Matches the current page's absolute path (i.e. /path/to/page.html)
820
+ * Does not include the query string or protocol and hostname (i.e. NOT https://foo.com/path/to/page.html?query=something)
821
+ */
822
+ CurrentPageCriteria: {
823
+ /** @enum {string} */
824
+ type: "PV";
825
+ /** @description The page/route path to match as a page that has been visited */
826
+ path: external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
827
+ };
828
+ PageViewCountCriteria: {
829
+ /** @enum {string} */
830
+ type: "PVC";
831
+ /** @description The expression to match the page view count against */
832
+ match: external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["NumberMatch"];
833
+ };
834
+ /** @description Describes a match expression on a string */
835
+ StringMatch: {
836
+ /** @description The right hand side of the match expression */
837
+ rhs: string;
838
+ /**
839
+ * @description The match operator
840
+ * '=' = exact match
841
+ * '~' = contains match
842
+ * '//' = regular expression match
843
+ *
844
+ * Any of the above can be prefixed with '!' to invert the match (i.e. != for 'not an exact match')
845
+ *
846
+ * @enum {string}
847
+ */
848
+ op: "=" | "~" | "//" | "!=" | "!~" | "!//";
849
+ /** @description The case sensitivity of the match. Defaults to false if unspecified. */
850
+ cs?: boolean;
851
+ } | {
852
+ /**
853
+ * @description The type of match to perform
854
+ * '*' = exists with any value
855
+ * '!*' = does not exist
856
+ *
857
+ * @enum {string}
858
+ */
859
+ op: "*" | "!*";
860
+ };
861
+ /** @description Describes a match expression on a number */
862
+ NumberMatch: {
863
+ /** @description The right hand side of the match expression */
864
+ rhs: number;
865
+ /**
866
+ * @description The type of match to perform
867
+ * '=' = exact match
868
+ * '!=' = not an exact match
869
+ * '<' = less than match expression
870
+ * '>' = greater than match expression
871
+ *
872
+ * @enum {string}
873
+ */
874
+ op: "=" | "<" | ">" | "!=";
875
+ };
876
+ /** @description Defines an aggregate dimension that is a grouping of other dimensions' scores; an intent or audience. */
877
+ AggregateDimension: {
878
+ /** @description Input dimensions to the aggregate dimension */
879
+ inputs: external$4["uniform-context-types.swagger.yml"]["components"]["schemas"]["AggregateDimensionInput"][];
880
+ };
881
+ /** @description Defines an input dimension to an aggregate dimension */
882
+ AggregateDimensionInput: {
883
+ /**
884
+ * @description Dimension name to reference as an input.
885
+ * For enrichment inputs, use CATEGORY_KEY as the dimension.
886
+ * Enrichments, signals, and other aggregate dimensions may be referenced.
887
+ *
888
+ * Note that creating a cycle of aggregate dimensions is allowed, however
889
+ * the final score will _ignore_ the cycled aggregate dimension in the result.
890
+ * This can be used to create mutually exclusive aggregates.
891
+ */
892
+ dim: string;
893
+ /**
894
+ * @description The sign of the input dimension controls how it affects the aggregate dimension's final score.
895
+ *
896
+ * '+' = add to the final score
897
+ * '-' = subtract from the final score
898
+ * 'c' = clear the final score (if the input dimension has any score at all, this aggreate will have no score regardless of other inputs)
899
+ *
900
+ * Default if unspecified: '+'
901
+ *
902
+ * @default +
903
+ * @enum {string}
904
+ */
905
+ sign?: "+" | "-" | "c";
906
+ };
907
+ Test: {
908
+ /** @description Winning variation ID - if set, the test will not run and this variation is shown to all visitors (the test is closed) */
909
+ wv?: string;
910
+ };
911
+ };
912
+ };
913
+ operations: {};
914
+ };
915
+ }
916
+
917
+ /**
918
+ * This file was auto-generated by openapi-typescript.
919
+ * Do not make direct changes to the file.
920
+ */
921
+ interface paths$3 {
922
+ "/api/v2/dimension": {
923
+ get: {
924
+ parameters: {
925
+ query: {
926
+ /** The project to fetch dimensions for */
927
+ projectId: string;
928
+ };
929
+ };
930
+ responses: {
931
+ /** OK */
932
+ 200: {
933
+ content: {
934
+ "application/json": {
935
+ dimensions: components$3["schemas"]["DimensionDefinition"][];
936
+ };
937
+ };
938
+ };
939
+ 400: external$3["swagger.yml"]["components"]["responses"]["BadRequestError"];
940
+ 401: external$3["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
941
+ 403: external$3["swagger.yml"]["components"]["responses"]["ForbiddenError"];
942
+ 429: external$3["swagger.yml"]["components"]["responses"]["RateLimitError"];
943
+ 500: external$3["swagger.yml"]["components"]["responses"]["InternalServerError"];
944
+ };
945
+ };
946
+ /** Handles preflight requests. This endpoint allows CORS. */
947
+ options: {
948
+ responses: {
949
+ /** OK */
950
+ 204: never;
951
+ };
952
+ };
953
+ };
954
+ }
955
+ interface components$3 {
956
+ schemas: {
957
+ DimensionDefinition: {
958
+ /** @description The dimension name (score key) */
959
+ dim: string;
960
+ /**
961
+ * @description The dimension type
962
+ * AGG: Aggregation (intent or audience)
963
+ * ENR: Enrichment
964
+ * SIG: Signal
965
+ *
966
+ * @enum {string}
967
+ */
968
+ category: "AGG" | "ENR" | "SIG";
969
+ /**
970
+ * @description Subtype of the dimension
971
+ * AGG:0: Audience
972
+ * AGG:1: Intent
973
+ * ENR: Enrichment Category name
974
+ * SIG: null
975
+ */
976
+ subcategory?: string;
977
+ /** @description The dimension's name (without category) */
978
+ name: string;
979
+ /** @description The minimum score possible for the dimension */
980
+ min: number;
981
+ /** @description The maximum score possible for the dimension */
982
+ cap: number;
983
+ };
984
+ };
985
+ }
986
+ interface external$3 {
987
+ "swagger.yml": {
988
+ paths: {};
989
+ components: {
990
+ schemas: {
991
+ Error: {
992
+ /** @description Error message(s) that occurred while processing the request */
993
+ errorMessage?: string[] | string;
994
+ };
995
+ };
996
+ responses: {
997
+ /** Request input validation failed */
998
+ BadRequestError: {
999
+ content: {
1000
+ "application/json": external$3["swagger.yml"]["components"]["schemas"]["Error"];
1001
+ };
1002
+ };
1003
+ /** API key or token was not valid */
1004
+ UnauthorizedError: {
1005
+ content: {
1006
+ "application/json": external$3["swagger.yml"]["components"]["schemas"]["Error"];
1007
+ };
1008
+ };
1009
+ /** Permission was denied */
1010
+ ForbiddenError: {
1011
+ content: {
1012
+ "application/json": external$3["swagger.yml"]["components"]["schemas"]["Error"];
1013
+ };
1014
+ };
1015
+ /** Resource not found */
1016
+ NotFoundError: {
1017
+ content: {
1018
+ "application/json": external$3["swagger.yml"]["components"]["schemas"]["Error"];
1019
+ };
1020
+ };
1021
+ /** Too many requests in allowed time period */
1022
+ RateLimitError: unknown;
1023
+ /** Execution error occurred */
1024
+ InternalServerError: unknown;
1025
+ };
1026
+ };
1027
+ operations: {};
1028
+ };
1029
+ }
1030
+
1031
+ /**
1032
+ * This file was auto-generated by openapi-typescript.
1033
+ * Do not make direct changes to the file.
1034
+ */
1035
+ interface paths$2 {
1036
+ "/api/v2/quirk": {
1037
+ /** Gets quirk definitions for a project */
1038
+ get: {
1039
+ parameters: {
1040
+ query: {
1041
+ /** The project to fetch quirk definitions for */
1042
+ projectId: string;
1043
+ /** Limit the results to a specific quirk ID */
1044
+ quirkId?: string;
1045
+ /** Include quirks that are defined by integrations */
1046
+ withIntegrations?: boolean;
1047
+ };
1048
+ };
1049
+ responses: {
1050
+ /** OK */
1051
+ 200: {
1052
+ content: {
1053
+ "application/json": {
1054
+ quirks: components$2["schemas"]["Quirk"][];
1055
+ };
1056
+ };
1057
+ };
1058
+ 400: external$2["swagger.yml"]["components"]["responses"]["BadRequestError"];
1059
+ 401: external$2["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
1060
+ 403: external$2["swagger.yml"]["components"]["responses"]["ForbiddenError"];
1061
+ 429: external$2["swagger.yml"]["components"]["responses"]["RateLimitError"];
1062
+ 500: external$2["swagger.yml"]["components"]["responses"]["InternalServerError"];
1063
+ };
1064
+ };
1065
+ put: {
1066
+ responses: {
1067
+ /** OK */
1068
+ 204: never;
1069
+ 400: external$2["swagger.yml"]["components"]["responses"]["BadRequestError"];
1070
+ 401: external$2["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
1071
+ 403: external$2["swagger.yml"]["components"]["responses"]["ForbiddenError"];
1072
+ 429: external$2["swagger.yml"]["components"]["responses"]["RateLimitError"];
1073
+ 500: external$2["swagger.yml"]["components"]["responses"]["InternalServerError"];
1074
+ };
1075
+ requestBody: {
1076
+ content: {
1077
+ "application/json": {
1078
+ quirk: components$2["schemas"]["Quirk"];
1079
+ /** Format: uuid */
1080
+ projectId: string;
1081
+ };
1082
+ };
1083
+ };
1084
+ };
1085
+ delete: {
1086
+ responses: {
1087
+ /** OK */
1088
+ 204: never;
1089
+ 400: external$2["swagger.yml"]["components"]["responses"]["BadRequestError"];
1090
+ 401: external$2["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
1091
+ 403: external$2["swagger.yml"]["components"]["responses"]["ForbiddenError"];
1092
+ 429: external$2["swagger.yml"]["components"]["responses"]["RateLimitError"];
1093
+ 500: external$2["swagger.yml"]["components"]["responses"]["InternalServerError"];
1094
+ };
1095
+ requestBody: {
1096
+ content: {
1097
+ "application/json": {
1098
+ quirkId: string;
1099
+ /** Format: uuid */
1100
+ projectId: string;
1101
+ };
1102
+ };
1103
+ };
1104
+ };
1105
+ /** Handles preflight requests. This endpoint allows CORS. */
1106
+ options: {
1107
+ responses: {
1108
+ /** OK */
1109
+ 204: never;
1110
+ };
1111
+ };
1112
+ };
1113
+ }
1114
+ interface components$2 {
1115
+ schemas: {
1116
+ Quirk: {
1117
+ id: string;
1118
+ name: string;
1119
+ description?: string | null;
1120
+ options?: components$2["schemas"]["QuirkOptions"][];
1121
+ source?: components$2["schemas"]["QuirkSource"];
1122
+ };
1123
+ QuirkOptions: {
1124
+ name: string;
1125
+ value: string;
1126
+ };
1127
+ /** @description The source of this quirk. When not defined, it is user specified. */
1128
+ QuirkSource: {
1129
+ name: string;
1130
+ id: string;
1131
+ };
1132
+ };
1133
+ }
1134
+ interface external$2 {
1135
+ "swagger.yml": {
1136
+ paths: {};
1137
+ components: {
1138
+ schemas: {
1139
+ Error: {
1140
+ /** @description Error message(s) that occurred while processing the request */
1141
+ errorMessage?: string[] | string;
1142
+ };
1143
+ };
1144
+ responses: {
1145
+ /** Request input validation failed */
1146
+ BadRequestError: {
1147
+ content: {
1148
+ "application/json": external$2["swagger.yml"]["components"]["schemas"]["Error"];
1149
+ };
1150
+ };
1151
+ /** API key or token was not valid */
1152
+ UnauthorizedError: {
1153
+ content: {
1154
+ "application/json": external$2["swagger.yml"]["components"]["schemas"]["Error"];
1155
+ };
1156
+ };
1157
+ /** Permission was denied */
1158
+ ForbiddenError: {
1159
+ content: {
1160
+ "application/json": external$2["swagger.yml"]["components"]["schemas"]["Error"];
1161
+ };
1162
+ };
1163
+ /** Resource not found */
1164
+ NotFoundError: {
1165
+ content: {
1166
+ "application/json": external$2["swagger.yml"]["components"]["schemas"]["Error"];
1167
+ };
1168
+ };
1169
+ /** Too many requests in allowed time period */
1170
+ RateLimitError: unknown;
1171
+ /** Execution error occurred */
1172
+ InternalServerError: unknown;
1173
+ };
1174
+ };
1175
+ operations: {};
1176
+ };
1177
+ }
1178
+
1179
+ /**
1180
+ * This file was auto-generated by openapi-typescript.
1181
+ * Do not make direct changes to the file.
1182
+ */
1183
+ interface paths$1 {
1184
+ "/api/v2/signal": {
1185
+ get: {
1186
+ parameters: {
1187
+ query: {
1188
+ /** The project to fetch signals for */
1189
+ projectId: string;
1190
+ /** Limit the results to a specific signal ID */
1191
+ signalId?: string;
1192
+ };
1193
+ };
1194
+ responses: {
1195
+ /** OK */
1196
+ 200: {
1197
+ content: {
1198
+ "application/json": {
1199
+ signals: components$1["schemas"]["SignalWithId"][];
1200
+ };
1201
+ };
1202
+ };
1203
+ 400: external$1["swagger.yml"]["components"]["responses"]["BadRequestError"];
1204
+ 401: external$1["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
1205
+ 403: external$1["swagger.yml"]["components"]["responses"]["ForbiddenError"];
1206
+ 429: external$1["swagger.yml"]["components"]["responses"]["RateLimitError"];
1207
+ 500: external$1["swagger.yml"]["components"]["responses"]["InternalServerError"];
1208
+ };
1209
+ };
1210
+ put: {
1211
+ responses: {
1212
+ /** OK */
1213
+ 204: never;
1214
+ 400: external$1["swagger.yml"]["components"]["responses"]["BadRequestError"];
1215
+ 401: external$1["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
1216
+ 403: external$1["swagger.yml"]["components"]["responses"]["ForbiddenError"];
1217
+ 429: external$1["swagger.yml"]["components"]["responses"]["RateLimitError"];
1218
+ 500: external$1["swagger.yml"]["components"]["responses"]["InternalServerError"];
1219
+ };
1220
+ requestBody: {
1221
+ content: {
1222
+ "application/json": {
1223
+ signal: components$1["schemas"]["SignalWithId"];
1224
+ /** Format: uuid */
1225
+ projectId: string;
1226
+ };
1227
+ };
1228
+ };
1229
+ };
1230
+ delete: {
1231
+ responses: {
1232
+ /** OK */
1233
+ 204: never;
1234
+ 400: external$1["swagger.yml"]["components"]["responses"]["BadRequestError"];
1235
+ 401: external$1["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
1236
+ 403: external$1["swagger.yml"]["components"]["responses"]["ForbiddenError"];
1237
+ 429: external$1["swagger.yml"]["components"]["responses"]["RateLimitError"];
1238
+ 500: external$1["swagger.yml"]["components"]["responses"]["InternalServerError"];
1239
+ };
1240
+ requestBody: {
1241
+ content: {
1242
+ "application/json": {
1243
+ signalId: string;
1244
+ /** Format: uuid */
1245
+ projectId: string;
1246
+ };
1247
+ };
1248
+ };
1249
+ };
1250
+ /** Handles preflight requests. This endpoint allows CORS. */
1251
+ options: {
1252
+ responses: {
1253
+ /** OK */
1254
+ 204: never;
1255
+ };
1256
+ };
1257
+ };
1258
+ }
1259
+ interface components$1 {
1260
+ schemas: {
1261
+ SignalWithId: {
1262
+ id: string;
1263
+ } & external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["PreviewSignal"];
1264
+ };
1265
+ }
1266
+ interface external$1 {
1267
+ "swagger.yml": {
1268
+ paths: {};
1269
+ components: {
1270
+ schemas: {
1271
+ Error: {
1272
+ /** @description Error message(s) that occurred while processing the request */
1273
+ errorMessage?: string[] | string;
1274
+ };
1275
+ };
1276
+ responses: {
1277
+ /** Request input validation failed */
1278
+ BadRequestError: {
1279
+ content: {
1280
+ "application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
1281
+ };
1282
+ };
1283
+ /** API key or token was not valid */
1284
+ UnauthorizedError: {
1285
+ content: {
1286
+ "application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
1287
+ };
1288
+ };
1289
+ /** Permission was denied */
1290
+ ForbiddenError: {
1291
+ content: {
1292
+ "application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
1293
+ };
1294
+ };
1295
+ /** Resource not found */
1296
+ NotFoundError: {
1297
+ content: {
1298
+ "application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
1299
+ };
1300
+ };
1301
+ /** Too many requests in allowed time period */
1302
+ RateLimitError: unknown;
1303
+ /** Execution error occurred */
1304
+ InternalServerError: unknown;
1305
+ };
1306
+ };
1307
+ operations: {};
1308
+ };
1309
+ "uniform-context-types.swagger.yml": {
1310
+ paths: {};
1311
+ components: {
1312
+ schemas: {
1313
+ EnrichmentCategory: {
1314
+ /** @description The maximum visitor score allowed for enrichment keys in this category */
1315
+ cap: number;
1316
+ };
1317
+ PreviewSignal: external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["Signal"] & {
1318
+ /** @description Friendly name of the signal */
1319
+ name: string;
1320
+ /** @description Description of the signal */
1321
+ description?: string;
1322
+ };
1323
+ Signal: {
1324
+ /** @description The signal strength per activation (each time its criteria are true, this score is added) */
1325
+ str: number;
1326
+ /** @description The maximum visitor score allowed for this signal */
1327
+ cap: number;
1328
+ /**
1329
+ * @description How long the signal's score should persist
1330
+ * 's' = current session (expires after a period of inactivity)
1331
+ * 'p' = permanent (expires as far in the future as possible, may be limited by browser security settings)
1332
+ * 't' = transient (score tracks the current state of the criteria every time scores are updated)
1333
+ *
1334
+ * @enum {string}
1335
+ */
1336
+ dur: "s" | "p" | "t";
1337
+ crit: external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["RootSignalCriteriaGroup"];
1338
+ };
1339
+ RootSignalCriteriaGroup: {
1340
+ /**
1341
+ * @description Criteria type (Group of other criteria)
1342
+ * @enum {string}
1343
+ */
1344
+ type: "G";
1345
+ /**
1346
+ * @description The logical operator to apply to the criteria groups
1347
+ * & = AND
1348
+ * | = OR
1349
+ *
1350
+ * Default is `&` if unspecified.
1351
+ *
1352
+ * @default &
1353
+ * @enum {string}
1354
+ */
1355
+ op?: "&" | "|";
1356
+ /** @description The criteria clauses that make up this grouping of criteria */
1357
+ clauses: (external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteriaGroup"] | external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteria"])[];
1358
+ };
1359
+ SignalCriteriaGroup: {
1360
+ /**
1361
+ * @description Criteria type (Group of other criteria)
1362
+ * @enum {string}
1363
+ */
1364
+ type: "G";
1365
+ /**
1366
+ * @description The logical operator to apply to the criteria groups
1367
+ * & = AND
1368
+ * | = OR
1369
+ *
1370
+ * Default is `&` if unspecified.
1371
+ *
1372
+ * @enum {string}
1373
+ */
1374
+ op?: "&" | "|";
1375
+ /** @description The criteria clauses that make up this grouping of criteria */
1376
+ clauses: (external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteriaGroup"] | external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteria"])[];
1377
+ };
1378
+ SignalCriteria: external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["CookieCriteria"] | external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["QueryStringCriteria"] | external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["QuirkCriteria"] | external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["EventCriteria"] | external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["CurrentPageCriteria"] | external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["PageViewCountCriteria"];
1379
+ /** @description Matches a URL query string parameter value */
1380
+ QueryStringCriteria: {
1381
+ /** @enum {string} */
1382
+ type: "QS";
1383
+ /** @description The name of the query string parameter to match */
1384
+ queryName: string;
1385
+ /** @description The value to match the query string parameter against */
1386
+ match: external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
1387
+ };
1388
+ /** @description Matches a web cookie value */
1389
+ CookieCriteria: {
1390
+ /** @enum {string} */
1391
+ type: "CK";
1392
+ /** @description The name of the cookie to match */
1393
+ cookieName: string;
1394
+ /** @description The value to match the cookie against */
1395
+ match: external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
1396
+ };
1397
+ /** @description Matches a visitor quirk key and value */
1398
+ QuirkCriteria: {
1399
+ /** @enum {string} */
1400
+ type: "QK";
1401
+ /** @description The name of the quirk key to match */
1402
+ key: string;
1403
+ /** @description The quirk value to match against */
1404
+ match: external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
1405
+ };
1406
+ /** @description Matches an analytics event name being fired */
1407
+ EventCriteria: {
1408
+ /** @enum {string} */
1409
+ type: "EVT";
1410
+ /** @description How to match the event name */
1411
+ event: external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
1412
+ };
1413
+ /**
1414
+ * @description Matches the current page's absolute path (i.e. /path/to/page.html)
1415
+ * Does not include the query string or protocol and hostname (i.e. NOT https://foo.com/path/to/page.html?query=something)
1416
+ */
1417
+ CurrentPageCriteria: {
1418
+ /** @enum {string} */
1419
+ type: "PV";
1420
+ /** @description The page/route path to match as a page that has been visited */
1421
+ path: external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
1422
+ };
1423
+ PageViewCountCriteria: {
1424
+ /** @enum {string} */
1425
+ type: "PVC";
1426
+ /** @description The expression to match the page view count against */
1427
+ match: external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["NumberMatch"];
1428
+ };
1429
+ /** @description Describes a match expression on a string */
1430
+ StringMatch: {
1431
+ /** @description The right hand side of the match expression */
1432
+ rhs: string;
1433
+ /**
1434
+ * @description The match operator
1435
+ * '=' = exact match
1436
+ * '~' = contains match
1437
+ * '//' = regular expression match
1438
+ *
1439
+ * Any of the above can be prefixed with '!' to invert the match (i.e. != for 'not an exact match')
1440
+ *
1441
+ * @enum {string}
1442
+ */
1443
+ op: "=" | "~" | "//" | "!=" | "!~" | "!//";
1444
+ /** @description The case sensitivity of the match. Defaults to false if unspecified. */
1445
+ cs?: boolean;
1446
+ } | {
1447
+ /**
1448
+ * @description The type of match to perform
1449
+ * '*' = exists with any value
1450
+ * '!*' = does not exist
1451
+ *
1452
+ * @enum {string}
1453
+ */
1454
+ op: "*" | "!*";
1455
+ };
1456
+ /** @description Describes a match expression on a number */
1457
+ NumberMatch: {
1458
+ /** @description The right hand side of the match expression */
1459
+ rhs: number;
1460
+ /**
1461
+ * @description The type of match to perform
1462
+ * '=' = exact match
1463
+ * '!=' = not an exact match
1464
+ * '<' = less than match expression
1465
+ * '>' = greater than match expression
1466
+ *
1467
+ * @enum {string}
1468
+ */
1469
+ op: "=" | "<" | ">" | "!=";
1470
+ };
1471
+ /** @description Defines an aggregate dimension that is a grouping of other dimensions' scores; an intent or audience. */
1472
+ AggregateDimension: {
1473
+ /** @description Input dimensions to the aggregate dimension */
1474
+ inputs: external$1["uniform-context-types.swagger.yml"]["components"]["schemas"]["AggregateDimensionInput"][];
1475
+ };
1476
+ /** @description Defines an input dimension to an aggregate dimension */
1477
+ AggregateDimensionInput: {
1478
+ /**
1479
+ * @description Dimension name to reference as an input.
1480
+ * For enrichment inputs, use CATEGORY_KEY as the dimension.
1481
+ * Enrichments, signals, and other aggregate dimensions may be referenced.
1482
+ *
1483
+ * Note that creating a cycle of aggregate dimensions is allowed, however
1484
+ * the final score will _ignore_ the cycled aggregate dimension in the result.
1485
+ * This can be used to create mutually exclusive aggregates.
1486
+ */
1487
+ dim: string;
1488
+ /**
1489
+ * @description The sign of the input dimension controls how it affects the aggregate dimension's final score.
1490
+ *
1491
+ * '+' = add to the final score
1492
+ * '-' = subtract from the final score
1493
+ * 'c' = clear the final score (if the input dimension has any score at all, this aggreate will have no score regardless of other inputs)
1494
+ *
1495
+ * Default if unspecified: '+'
1496
+ *
1497
+ * @default +
1498
+ * @enum {string}
1499
+ */
1500
+ sign?: "+" | "-" | "c";
1501
+ };
1502
+ Test: {
1503
+ /** @description Winning variation ID - if set, the test will not run and this variation is shown to all visitors (the test is closed) */
1504
+ wv?: string;
1505
+ };
1506
+ };
1507
+ };
1508
+ operations: {};
1509
+ };
1510
+ }
1511
+
1512
+ /**
1513
+ * This file was auto-generated by openapi-typescript.
1514
+ * Do not make direct changes to the file.
1515
+ */
1516
+ interface paths {
1517
+ "/api/v2/test": {
1518
+ /** Gets A/B test definitions for a project */
1519
+ get: {
1520
+ parameters: {
1521
+ query: {
1522
+ /** The project to fetch tests for */
1523
+ projectId: string;
1524
+ /** Limit the results to a specific test public ID */
1525
+ testId?: string;
1526
+ };
1527
+ };
1528
+ responses: {
1529
+ /** OK */
1530
+ 200: {
1531
+ content: {
1532
+ "application/json": {
1533
+ tests: components["schemas"]["Test"][];
1534
+ };
1535
+ };
1536
+ };
1537
+ 400: external["swagger.yml"]["components"]["responses"]["BadRequestError"];
1538
+ 401: external["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
1539
+ 403: external["swagger.yml"]["components"]["responses"]["ForbiddenError"];
1540
+ 429: external["swagger.yml"]["components"]["responses"]["RateLimitError"];
1541
+ 500: external["swagger.yml"]["components"]["responses"]["InternalServerError"];
1542
+ };
1543
+ };
1544
+ put: {
1545
+ responses: {
1546
+ /** OK */
1547
+ 204: never;
1548
+ 400: external["swagger.yml"]["components"]["responses"]["BadRequestError"];
1549
+ 401: external["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
1550
+ 403: external["swagger.yml"]["components"]["responses"]["ForbiddenError"];
1551
+ 429: external["swagger.yml"]["components"]["responses"]["RateLimitError"];
1552
+ 500: external["swagger.yml"]["components"]["responses"]["InternalServerError"];
1553
+ };
1554
+ requestBody: {
1555
+ content: {
1556
+ "application/json": {
1557
+ test: components["schemas"]["Test"];
1558
+ /** Format: uuid */
1559
+ projectId: string;
1560
+ };
1561
+ };
1562
+ };
1563
+ };
1564
+ delete: {
1565
+ responses: {
1566
+ /** OK */
1567
+ 204: never;
1568
+ 400: external["swagger.yml"]["components"]["responses"]["BadRequestError"];
1569
+ 401: external["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
1570
+ 403: external["swagger.yml"]["components"]["responses"]["ForbiddenError"];
1571
+ 429: external["swagger.yml"]["components"]["responses"]["RateLimitError"];
1572
+ 500: external["swagger.yml"]["components"]["responses"]["InternalServerError"];
1573
+ };
1574
+ requestBody: {
1575
+ content: {
1576
+ "application/json": {
1577
+ testId: string;
1578
+ /** Format: uuid */
1579
+ projectId: string;
1580
+ };
1581
+ };
1582
+ };
1583
+ };
1584
+ /** Handles preflight requests. This endpoint allows CORS. */
1585
+ options: {
1586
+ responses: {
1587
+ /** OK */
1588
+ 204: never;
1589
+ };
1590
+ };
1591
+ };
1592
+ }
1593
+ interface components {
1594
+ schemas: {
1595
+ Test: {
1596
+ id: string;
1597
+ name: string;
1598
+ winning_variant_id?: string;
1599
+ default_variant_id?: string;
1600
+ /** @default false */
1601
+ closed?: boolean;
1602
+ };
1603
+ };
1604
+ }
1605
+ interface external {
1606
+ "swagger.yml": {
1607
+ paths: {};
1608
+ components: {
1609
+ schemas: {
1610
+ Error: {
1611
+ /** @description Error message(s) that occurred while processing the request */
1612
+ errorMessage?: string[] | string;
1613
+ };
1614
+ };
1615
+ responses: {
1616
+ /** Request input validation failed */
1617
+ BadRequestError: {
1618
+ content: {
1619
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
1620
+ };
1621
+ };
1622
+ /** API key or token was not valid */
1623
+ UnauthorizedError: {
1624
+ content: {
1625
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
1626
+ };
1627
+ };
1628
+ /** Permission was denied */
1629
+ ForbiddenError: {
1630
+ content: {
1631
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
1632
+ };
1633
+ };
1634
+ /** Resource not found */
1635
+ NotFoundError: {
1636
+ content: {
1637
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
1638
+ };
1639
+ };
1640
+ /** Too many requests in allowed time period */
1641
+ RateLimitError: unknown;
1642
+ /** Execution error occurred */
1643
+ InternalServerError: unknown;
1644
+ };
1645
+ };
1646
+ operations: {};
1647
+ };
1648
+ }
1649
+
1650
+ declare type EnrichmentGet = paths$5['/api/v1/enrichments']['get'];
1651
+ declare type EnrichmentGetParameters = EnrichmentGet['parameters']['query'];
1652
+ declare type EnrichmentGetResponse = EnrichmentGet['responses']['200']['content']['application/json'];
1653
+ declare type EnrichmentCategory = components$5['schemas']['EnrichmentCategory'];
1654
+ declare type EnrichmentCategoryWithValues = components$5['schemas']['EnrichmentCategoryWithValues'];
1655
+ declare type EnrichmentValue = components$5['schemas']['EnrichmentValue'];
1656
+ declare type EnrichmentPut = paths$5['/api/v1/enrichments']['put'];
1657
+ declare type EnrichmentPutParameters = EnrichmentPut['requestBody']['content']['application/json'];
1658
+ declare type EnrichmentDelete = paths$5['/api/v1/enrichments']['delete'];
1659
+ declare type EnrichmentDeleteParameters = EnrichmentDelete['requestBody']['content']['application/json'];
1660
+ declare type EnrichmentValuePut = paths$6['/api/v1/enrichment-values']['put'];
1661
+ declare type EnrichmentValuePutParameters = EnrichmentValuePut['requestBody']['content']['application/json'];
1662
+ declare type EnrichmentValueDelete = paths$6['/api/v1/enrichment-values']['delete'];
1663
+ declare type EnrichmentValueDeleteParameters = EnrichmentValueDelete['requestBody']['content']['application/json'];
1664
+ declare type ManifestGet = paths$7['/api/v2/manifest']['get'];
1665
+ declare type ManifestGetParameters = ManifestGet['parameters']['query'];
1666
+ declare type ManifestGetResponse = ManifestGet['responses']['200']['content']['application/json'];
1667
+ declare type AggregateGet = paths$4['/api/v2/aggregate']['get'];
1668
+ declare type AggregateGetParameters = AggregateGet['parameters']['query'];
1669
+ declare type AggregateGetResponse = AggregateGet['responses']['200']['content']['application/json'];
1670
+ declare type Aggregate = components$4['schemas']['AggregateData'];
1671
+ declare type AggregatePut = paths$4['/api/v2/aggregate']['put'];
1672
+ declare type AggregatePutParameters = AggregatePut['requestBody']['content']['application/json'];
1673
+ declare type AggregateDelete = paths$4['/api/v2/aggregate']['delete'];
1674
+ declare type AggregateDeleteParameters = AggregateDelete['requestBody']['content']['application/json'];
1675
+ declare type DimensionGet = paths$3['/api/v2/dimension']['get'];
1676
+ declare type DimensionGetParameters = DimensionGet['parameters']['query'];
1677
+ declare type DimensionGetResponse = DimensionGet['responses']['200']['content']['application/json'];
1678
+ declare type DimensionDefinition = components$3['schemas']['DimensionDefinition'];
1679
+ declare type QuirkGet = paths$2['/api/v2/quirk']['get'];
1680
+ declare type QuirkGetParameters = QuirkGet['parameters']['query'];
1681
+ declare type QuirkGetResponse = QuirkGet['responses']['200']['content']['application/json'];
1682
+ declare type Quirk = components$2['schemas']['Quirk'];
1683
+ declare type QuirkPut = paths$2['/api/v2/quirk']['put'];
1684
+ declare type QuirkPutParameters = QuirkPut['requestBody']['content']['application/json'];
1685
+ declare type QuirkDelete = paths$2['/api/v2/quirk']['delete'];
1686
+ declare type QuirkDeleteParameters = QuirkDelete['requestBody']['content']['application/json'];
1687
+ declare type TestGet = paths['/api/v2/test']['get'];
1688
+ declare type TestGetParameters = TestGet['parameters']['query'];
1689
+ declare type TestGetResponse = TestGet['responses']['200']['content']['application/json'];
1690
+ declare type Test = components['schemas']['Test'];
1691
+ declare type TestPut = paths['/api/v2/test']['put'];
1692
+ declare type TestPutParameters = TestPut['requestBody']['content']['application/json'];
1693
+ declare type TestDelete = paths['/api/v2/test']['delete'];
1694
+ declare type TestDeleteParameters = TestDelete['requestBody']['content']['application/json'];
1695
+ declare type SignalGet = paths$1['/api/v2/signal']['get'];
1696
+ declare type SignalGetParameters = SignalGet['parameters']['query'];
1697
+ declare type SignalGetResponse = SignalGet['responses']['200']['content']['application/json'];
1698
+ declare type SignalWithId = components$1['schemas']['SignalWithId'];
1699
+ declare type RootSignalCriteriaGroup = components$6['schemas']['RootSignalCriteriaGroup'];
1700
+ declare type CookieCriteria = components$6['schemas']['CookieCriteria'];
1701
+ declare type QueryStringCriteria = components$6['schemas']['QueryStringCriteria'];
1702
+ declare type QuirkCriteria = components$6['schemas']['QuirkCriteria'];
1703
+ declare type EventCriteria = components$6['schemas']['EventCriteria'];
1704
+ declare type CurrentPageCriteria = components$6['schemas']['CurrentPageCriteria'];
1705
+ declare type PageViewCountCriteria = components$6['schemas']['PageViewCountCriteria'];
1706
+ declare type SignalPut = paths$1['/api/v2/signal']['put'];
1707
+ declare type SignalPutParameters = SignalPut['requestBody']['content']['application/json'];
1708
+ declare type SignalDelete = paths$1['/api/v2/signal']['delete'];
1709
+ declare type SignalDeleteParameters = SignalDelete['requestBody']['content']['application/json'];
1710
+ declare type ContextDefinitions = {
1711
+ aggregates?: Array<Aggregate>;
1712
+ quirks?: Array<Quirk>;
1713
+ signals?: Array<SignalWithId>;
1714
+ enrichments?: Array<EnrichmentCategoryWithValues>;
1715
+ tests?: Array<Test>;
1716
+ };
1717
+
1718
+ export { AggregateGetParameters as A, SignalWithId as B, ContextDefinitions as C, DimensionDefinition as D, EnrichmentGetParameters as E, CookieCriteria as F, QueryStringCriteria as G, QuirkCriteria as H, EventCriteria as I, CurrentPageCriteria as J, ManifestGetParameters as M, PageViewCountCriteria as P, QuirkGetParameters as Q, RootSignalCriteriaGroup as R, SignalGetParameters as S, TestGetParameters as T, AggregateGetResponse as a, AggregatePutParameters as b, AggregateDeleteParameters as c, DimensionGetParameters as d, DimensionGetResponse as e, EnrichmentGetResponse as f, EnrichmentPutParameters as g, EnrichmentDeleteParameters as h, EnrichmentValuePutParameters as i, EnrichmentValueDeleteParameters as j, ManifestGetResponse as k, QuirkGetResponse as l, QuirkPutParameters as m, QuirkDeleteParameters as n, SignalGetResponse as o, SignalPutParameters as p, SignalDeleteParameters as q, TestGetResponse as r, TestPutParameters as s, TestDeleteParameters as t, EnrichmentCategory as u, EnrichmentCategoryWithValues as v, EnrichmentValue as w, Aggregate as x, Quirk as y, Test as z };