@uniformdev/context 12.2.1-alpha.107 → 12.2.1-alpha.121

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