@uniformdev/context 19.35.2 → 19.35.3-alpha.82

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