@uniformdev/context 12.2.1-alpha.177 → 14.2.1-alpha.34

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.
@@ -1,3 +1,4 @@
1
+ import { c as components, e as external } from './v2-manifest.swagger-d0899723';
1
2
  import * as mitt from 'mitt';
2
3
 
3
4
  declare type StorageCommand<TID extends string = string, TData = unknown> = {
@@ -220,6 +221,8 @@ declare type LogMessages = {
220
221
  3: MessageFunc<ScoreVector>;
221
222
  /** Context emitted updated quirks */
222
223
  4: MessageFunc<Quirks>;
224
+ /** Tried to set enrichment category that did not exist */
225
+ 5: MessageFunc<EnrichmentData>;
223
226
  /** Storage received update commands */
224
227
  101: MessageFunc<StorageCommands[]>;
225
228
  /** Storage data was updated */
@@ -358,290 +361,6 @@ declare class ManifestInstance {
358
361
  getDimensionByKey(scoreKey: string): EnrichmentCategory | Signal | undefined;
359
362
  }
360
363
 
361
- /**
362
- * This file was auto-generated by openapi-typescript.
363
- * Do not make direct changes to the file.
364
- */
365
- interface paths {
366
- "/api/v2/manifest": {
367
- /**
368
- * Fetches the Intent Manifest for a given project.
369
- * If no manifest has ever been published, and an API key is used that has preview manifest permissions then the current preview manifest will be returned (in delivery format).
370
- */
371
- get: {
372
- parameters: {
373
- query: {
374
- preview?: boolean;
375
- projectId: string;
376
- };
377
- };
378
- responses: {
379
- /** OK */
380
- 200: {
381
- content: {
382
- "application/json": components["schemas"]["ManifestV2"];
383
- };
384
- };
385
- 400: external["swagger.yml"]["components"]["responses"]["BadRequestError"];
386
- 401: external["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
387
- 403: external["swagger.yml"]["components"]["responses"]["ForbiddenError"];
388
- /** No manifest has ever been published, and the API key does not have preview permissions */
389
- 404: {
390
- content: {
391
- "text/plain": string;
392
- };
393
- };
394
- 429: external["swagger.yml"]["components"]["responses"]["RateLimitError"];
395
- 500: external["swagger.yml"]["components"]["responses"]["InternalServerError"];
396
- };
397
- };
398
- };
399
- }
400
- interface components {
401
- schemas: {
402
- ManifestV2: {
403
- project: {
404
- pz?: components["schemas"]["PersonalizationManifest"];
405
- /** @description A/B test settings */
406
- test?: {
407
- [key: string]: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["Test"];
408
- };
409
- };
410
- };
411
- PersonalizationManifest: {
412
- /** @description Map of all signals defined for personalization criteria */
413
- sig?: {
414
- [key: string]: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["Signal"];
415
- };
416
- /** @description Map of all enrichment categories defined for personalization criteria */
417
- enr?: {
418
- [key: string]: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["EnrichmentCategory"];
419
- };
420
- /** @description Map of all aggregate dimensions (intents or audiences) defined for personalization criteria */
421
- agg?: {
422
- [key: string]: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["AggregateDimension"];
423
- };
424
- /** @description Percentage of visitors that will be used as a personalization control group (not shown any personalization) */
425
- control?: number;
426
- };
427
- };
428
- }
429
- interface external {
430
- "swagger.yml": {
431
- paths: {};
432
- components: {
433
- schemas: {
434
- Error: {
435
- /** @description Error message(s) that occurred while processing the request */
436
- errorMessage?: string[] | string;
437
- };
438
- };
439
- responses: {
440
- /** Request input validation failed */
441
- BadRequestError: {
442
- content: {
443
- "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
444
- };
445
- };
446
- /** API key or token was not valid */
447
- UnauthorizedError: {
448
- content: {
449
- "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
450
- };
451
- };
452
- /** Permission was denied */
453
- ForbiddenError: {
454
- content: {
455
- "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
456
- };
457
- };
458
- /** Too many requests in allowed time period */
459
- RateLimitError: unknown;
460
- /** Execution error occurred */
461
- InternalServerError: unknown;
462
- };
463
- };
464
- operations: {};
465
- };
466
- "uniform-context-types.swagger.yml": {
467
- paths: {};
468
- components: {
469
- schemas: {
470
- EnrichmentCategory: {
471
- /** @description The maximum visitor score allowed for enrichment keys in this category */
472
- cap: number;
473
- };
474
- PreviewSignal: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["Signal"] & {
475
- /** @description Friendly name of the signal */
476
- name: string;
477
- /** @description Description of the signal */
478
- description?: string;
479
- };
480
- Signal: {
481
- /** @description The signal strength per activation (each time its criteria are true, this score is added) */
482
- str: number;
483
- /** @description The maximum visitor score allowed for this signal */
484
- cap: number;
485
- /**
486
- * @description How long the signal's score should persist
487
- * 's' = current session (expires after a period of inactivity)
488
- * 'p' = permanent (expires as far in the future as possible, may be limited by browser security settings)
489
- * 't' = transient (score tracks the current state of the criteria every time scores are updated)
490
- */
491
- dur: "s" | "p" | "t";
492
- crit: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["RootSignalCriteriaGroup"];
493
- };
494
- RootSignalCriteriaGroup: {
495
- /** @description Criteria type (Group of other criteria) */
496
- type: "G";
497
- /**
498
- * @description The logical operator to apply to the criteria groups
499
- * & = AND
500
- * | = OR
501
- *
502
- * Default is `&` if unspecified.
503
- *
504
- * @default &
505
- */
506
- op?: "&" | "|";
507
- /** @description The criteria clauses that make up this grouping of criteria */
508
- clauses: (external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteriaGroup"] | external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteria"])[];
509
- };
510
- SignalCriteriaGroup: {
511
- /** @description Criteria type (Group of other criteria) */
512
- type: "G";
513
- /**
514
- * @description The logical operator to apply to the criteria groups
515
- * & = AND
516
- * | = OR
517
- *
518
- * Default is `&` if unspecified.
519
- */
520
- op?: "&" | "|";
521
- /** @description The criteria clauses that make up this grouping of criteria */
522
- clauses: (external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteriaGroup"] | external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteria"])[];
523
- };
524
- 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"];
525
- /** @description Matches a URL query string parameter value */
526
- QueryStringCriteria: {
527
- type: "QS";
528
- /** @description The name of the query string parameter to match */
529
- queryName: string;
530
- /** @description The value to match the query string parameter against */
531
- match: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
532
- };
533
- /** @description Matches a web cookie value */
534
- CookieCriteria: {
535
- type: "CK";
536
- /** @description The name of the cookie to match */
537
- cookieName: string;
538
- /** @description The value to match the cookie against */
539
- match: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
540
- };
541
- /** @description Matches a visitor quirk key and value */
542
- QuirkCriteria: {
543
- type: "QK";
544
- /** @description The name of the quirk key to match */
545
- key: string;
546
- /** @description The quirk value to match against */
547
- match: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
548
- };
549
- /** @description Matches an analytics event name being fired */
550
- EventCriteria: {
551
- type: "EVT";
552
- /** @description How to match the event name */
553
- event: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
554
- };
555
- /**
556
- * @description Matches the current page's absolute path (i.e. /path/to/page.html)
557
- * Does not include the query string or protocol and hostname (i.e. NOT https://foo.com/path/to/page.html?query=something)
558
- */
559
- CurrentPageCriteria: {
560
- type: "PV";
561
- /** @description The page/route path to match as a page that has been visited */
562
- path: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
563
- };
564
- PageViewCountCriteria: {
565
- type: "PVC";
566
- /** @description The expression to match the page view count against */
567
- match: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["NumberMatch"];
568
- };
569
- /** @description Describes a match expression on a string */
570
- StringMatch: {
571
- /** @description The right hand side of the match expression */
572
- rhs: string;
573
- /**
574
- * @description The match operator
575
- * '=' = exact match
576
- * '~' = contains match
577
- * '//' = regular expression match
578
- *
579
- * Any of the above can be prefixed with '!' to invert the match (i.e. != for 'not an exact match')
580
- */
581
- op: "=" | "~" | "//" | "!=" | "!~" | "!//";
582
- /** @description The case sensitivity of the match. Defaults to false if unspecified. */
583
- cs?: boolean;
584
- } | {
585
- /**
586
- * @description The type of match to perform
587
- * '*' = exists with any value
588
- * '!*' = does not exist
589
- */
590
- op: "*" | "!*";
591
- };
592
- /** @description Describes a match expression on a number */
593
- NumberMatch: {
594
- /** @description The right hand side of the match expression */
595
- rhs: number;
596
- /**
597
- * @description The type of match to perform
598
- * '=' = exact match
599
- * '!=' = not an exact match
600
- * '<' = less than match expression
601
- * '>' = greater than match expression
602
- */
603
- op: "=" | "<" | ">" | "!=";
604
- };
605
- /** @description Defines an aggregate dimension that is a grouping of other dimensions' scores; an intent or audience. */
606
- AggregateDimension: {
607
- /** @description Input dimensions to the aggregate dimension */
608
- inputs: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["AggregateDimensionInput"][];
609
- };
610
- /** @description Defines an input dimension to an aggregate dimension */
611
- AggregateDimensionInput: {
612
- /**
613
- * @description Dimension name to reference as an input.
614
- * For enrichment inputs, use CATEGORY_KEY as the dimension.
615
- * Enrichments, signals, and other aggregate dimensions may be referenced.
616
- *
617
- * Note that creating a cycle of aggregate dimensions is allowed, however
618
- * the final score will _ignore_ the cycled aggregate dimension in the result.
619
- * This can be used to create mutually exclusive aggregates.
620
- */
621
- dim: string;
622
- /**
623
- * @description The sign of the input dimension controls how it affects the aggregate dimension's final score.
624
- *
625
- * '+' = add to the final score
626
- * '-' = subtract from the final score
627
- * 'c' = clear the final score (if the input dimension has any score at all, this aggreate will have no score regardless of other inputs)
628
- *
629
- * Default if unspecified: '+'
630
- *
631
- * @default +
632
- */
633
- sign?: "+" | "-" | "c";
634
- };
635
- Test: {
636
- /** @description Winning variation ID - if set, the test will not run and this variation is shown to all visitors (the test is closed) */
637
- wv?: string;
638
- };
639
- };
640
- };
641
- operations: {};
642
- };
643
- }
644
-
645
364
  declare type SharedTypes = external['uniform-context-types.swagger.yml']['components']['schemas'];
646
365
  declare type ManifestV2 = components['schemas']['ManifestV2'];
647
366
  declare type PersonalizationManifest = components['schemas']['PersonalizationManifest'];
@@ -984,4 +703,4 @@ declare global {
984
703
  }
985
704
  }
986
705
 
987
- export { Severity as $, AggregateDimension as A, VisitorDataStoreOptions as B, CookieAdapter as C, DecayFunction as D, EnrichmentCategory as E, VisitorDataStoreEvents as F, GroupCriteriaEvaluator as G, VisitorDataStore as H, IdentifyCommand as I, ServerToClientTransitionState as J, SERVER_STATE_ID as K, LogDrain as L, ManifestInstance as M, NumberMatch as N, OutputSeverity as O, PersonalizationManifest as P, Quirks as Q, TransitionDataStoreEvents as R, StorageCommands as S, TransitionDataStore as T, ContextOptions as U, VisitorData as V, PersonalizationEvent as W, TestEvent as X, ContextEvents as Y, Context as Z, LogMessages as _, TransitionDataStoreOptions as a, MessageFunc as a0, LogMessage as a1, testVariations as a2, TestOptions as a3, PersonalizeOptions as a4, personalizeVariations as a5, DimensionMatch as a6, BehaviorTag as a7, PersonalizedVariant as a8, PersonalizedResult as a9, TestVariant as aa, TestResult as ab, TaggedContent as ac, DevToolsUiVersion as ad, DevToolsState as ae, DevToolsActions as af, DevToolsEvent as ag, DevToolsEvents as ah, DevToolsLogEvent as ai, DevToolsDataEvent as aj, DevToolsHelloEvent as ak, DevToolsUpdateEvent as al, DevToolsRawCommandsEvent as am, DevToolsForgetEvent as an, paths as ao, ContextPlugin as b, CriteriaEvaluator as c, StringMatch as d, ScoreVector as e, VariantMatchCriteria as f, ManifestV2 as g, Signal as h, SignalCriteriaGroup as i, SignalCriteria as j, TestDefinition as k, AggregateDimensionInput as l, Tests as m, EnrichmentData as n, EventData as o, emptyVisitorData as p, ContextState as q, ContextStateUpdate as r, StorageCommand as s, ModifyScoreCommand as t, ModifySessionScoreCommand as u, SetConsentCommand as v, SetQuirkCommand as w, SetTestCommand as x, SetControlGroupCommand as y, DecayOptions as z };
706
+ export { Severity as $, AggregateDimension as A, VisitorDataStoreOptions as B, CookieAdapter as C, DecayFunction as D, EnrichmentCategory as E, VisitorDataStoreEvents as F, GroupCriteriaEvaluator as G, VisitorDataStore as H, IdentifyCommand as I, ServerToClientTransitionState as J, SERVER_STATE_ID as K, LogDrain as L, ManifestInstance as M, NumberMatch as N, OutputSeverity as O, PersonalizationManifest as P, Quirks as Q, TransitionDataStoreEvents as R, StorageCommands as S, TransitionDataStore as T, ContextOptions as U, VisitorData as V, PersonalizationEvent as W, TestEvent as X, ContextEvents as Y, Context as Z, LogMessages as _, TransitionDataStoreOptions as a, MessageFunc as a0, LogMessage as a1, testVariations as a2, TestOptions as a3, PersonalizeOptions as a4, personalizeVariations as a5, DimensionMatch as a6, BehaviorTag as a7, PersonalizedVariant as a8, PersonalizedResult as a9, TestVariant as aa, TestResult as ab, TaggedContent as ac, DevToolsUiVersion as ad, DevToolsState as ae, DevToolsActions as af, DevToolsEvent as ag, DevToolsEvents as ah, DevToolsLogEvent as ai, DevToolsDataEvent as aj, DevToolsHelloEvent as ak, DevToolsUpdateEvent as al, DevToolsRawCommandsEvent as am, DevToolsForgetEvent as an, ContextPlugin as b, CriteriaEvaluator as c, StringMatch as d, ScoreVector as e, VariantMatchCriteria as f, ManifestV2 as g, Signal as h, SignalCriteriaGroup as i, SignalCriteria as j, TestDefinition as k, AggregateDimensionInput as l, Tests as m, EnrichmentData as n, EventData as o, emptyVisitorData as p, ContextState as q, ContextStateUpdate as r, StorageCommand as s, ModifyScoreCommand as t, ModifySessionScoreCommand as u, SetConsentCommand as v, SetQuirkCommand as w, SetTestCommand as x, SetControlGroupCommand as y, DecayOptions as z };
@@ -0,0 +1,285 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ interface paths {
6
+ "/api/v2/manifest": {
7
+ /**
8
+ * Fetches the Intent Manifest for a given project.
9
+ * If no manifest has ever been published, and an API key is used that has preview manifest permissions then the current preview manifest will be returned (in delivery format).
10
+ */
11
+ get: {
12
+ parameters: {
13
+ query: {
14
+ preview?: boolean;
15
+ projectId: string;
16
+ };
17
+ };
18
+ responses: {
19
+ /** OK */
20
+ 200: {
21
+ content: {
22
+ "application/json": components["schemas"]["ManifestV2"];
23
+ };
24
+ };
25
+ 400: external["swagger.yml"]["components"]["responses"]["BadRequestError"];
26
+ 401: external["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
27
+ 403: external["swagger.yml"]["components"]["responses"]["ForbiddenError"];
28
+ /** No manifest has ever been published, and the API key does not have preview permissions */
29
+ 404: {
30
+ content: {
31
+ "text/plain": string;
32
+ };
33
+ };
34
+ 429: external["swagger.yml"]["components"]["responses"]["RateLimitError"];
35
+ 500: external["swagger.yml"]["components"]["responses"]["InternalServerError"];
36
+ };
37
+ };
38
+ };
39
+ }
40
+ interface components {
41
+ schemas: {
42
+ ManifestV2: {
43
+ project: {
44
+ pz?: components["schemas"]["PersonalizationManifest"];
45
+ /** @description A/B test settings */
46
+ test?: {
47
+ [key: string]: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["Test"];
48
+ };
49
+ };
50
+ };
51
+ PersonalizationManifest: {
52
+ /** @description Map of all signals defined for personalization criteria */
53
+ sig?: {
54
+ [key: string]: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["Signal"];
55
+ };
56
+ /** @description Map of all enrichment categories defined for personalization criteria */
57
+ enr?: {
58
+ [key: string]: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["EnrichmentCategory"];
59
+ };
60
+ /** @description Map of all aggregate dimensions (intents or audiences) defined for personalization criteria */
61
+ agg?: {
62
+ [key: string]: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["AggregateDimension"];
63
+ };
64
+ /** @description Percentage of visitors that will be used as a personalization control group (not shown any personalization) */
65
+ control?: number;
66
+ };
67
+ };
68
+ }
69
+ interface external {
70
+ "swagger.yml": {
71
+ paths: {};
72
+ components: {
73
+ schemas: {
74
+ Error: {
75
+ /** @description Error message(s) that occurred while processing the request */
76
+ errorMessage?: string[] | string;
77
+ };
78
+ };
79
+ responses: {
80
+ /** Request input validation failed */
81
+ BadRequestError: {
82
+ content: {
83
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
84
+ };
85
+ };
86
+ /** API key or token was not valid */
87
+ UnauthorizedError: {
88
+ content: {
89
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
90
+ };
91
+ };
92
+ /** Permission was denied */
93
+ ForbiddenError: {
94
+ content: {
95
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
96
+ };
97
+ };
98
+ /** Too many requests in allowed time period */
99
+ RateLimitError: unknown;
100
+ /** Execution error occurred */
101
+ InternalServerError: unknown;
102
+ };
103
+ };
104
+ operations: {};
105
+ };
106
+ "uniform-context-types.swagger.yml": {
107
+ paths: {};
108
+ components: {
109
+ schemas: {
110
+ EnrichmentCategory: {
111
+ /** @description The maximum visitor score allowed for enrichment keys in this category */
112
+ cap: number;
113
+ };
114
+ PreviewSignal: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["Signal"] & {
115
+ /** @description Friendly name of the signal */
116
+ name: string;
117
+ /** @description Description of the signal */
118
+ description?: string;
119
+ };
120
+ Signal: {
121
+ /** @description The signal strength per activation (each time its criteria are true, this score is added) */
122
+ str: number;
123
+ /** @description The maximum visitor score allowed for this signal */
124
+ cap: number;
125
+ /**
126
+ * @description How long the signal's score should persist
127
+ * 's' = current session (expires after a period of inactivity)
128
+ * 'p' = permanent (expires as far in the future as possible, may be limited by browser security settings)
129
+ * 't' = transient (score tracks the current state of the criteria every time scores are updated)
130
+ */
131
+ dur: "s" | "p" | "t";
132
+ crit: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["RootSignalCriteriaGroup"];
133
+ };
134
+ RootSignalCriteriaGroup: {
135
+ /** @description Criteria type (Group of other criteria) */
136
+ type: "G";
137
+ /**
138
+ * @description The logical operator to apply to the criteria groups
139
+ * & = AND
140
+ * | = OR
141
+ *
142
+ * Default is `&` if unspecified.
143
+ *
144
+ * @default &
145
+ */
146
+ op?: "&" | "|";
147
+ /** @description The criteria clauses that make up this grouping of criteria */
148
+ clauses: (external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteriaGroup"] | external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteria"])[];
149
+ };
150
+ SignalCriteriaGroup: {
151
+ /** @description Criteria type (Group of other criteria) */
152
+ type: "G";
153
+ /**
154
+ * @description The logical operator to apply to the criteria groups
155
+ * & = AND
156
+ * | = OR
157
+ *
158
+ * Default is `&` if unspecified.
159
+ */
160
+ op?: "&" | "|";
161
+ /** @description The criteria clauses that make up this grouping of criteria */
162
+ clauses: (external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteriaGroup"] | external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteria"])[];
163
+ };
164
+ 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"];
165
+ /** @description Matches a URL query string parameter value */
166
+ QueryStringCriteria: {
167
+ type: "QS";
168
+ /** @description The name of the query string parameter to match */
169
+ queryName: string;
170
+ /** @description The value to match the query string parameter against */
171
+ match: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
172
+ };
173
+ /** @description Matches a web cookie value */
174
+ CookieCriteria: {
175
+ type: "CK";
176
+ /** @description The name of the cookie to match */
177
+ cookieName: string;
178
+ /** @description The value to match the cookie against */
179
+ match: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
180
+ };
181
+ /** @description Matches a visitor quirk key and value */
182
+ QuirkCriteria: {
183
+ type: "QK";
184
+ /** @description The name of the quirk key to match */
185
+ key: string;
186
+ /** @description The quirk value to match against */
187
+ match: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
188
+ };
189
+ /** @description Matches an analytics event name being fired */
190
+ EventCriteria: {
191
+ type: "EVT";
192
+ /** @description How to match the event name */
193
+ event: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
194
+ };
195
+ /**
196
+ * @description Matches the current page's absolute path (i.e. /path/to/page.html)
197
+ * Does not include the query string or protocol and hostname (i.e. NOT https://foo.com/path/to/page.html?query=something)
198
+ */
199
+ CurrentPageCriteria: {
200
+ type: "PV";
201
+ /** @description The page/route path to match as a page that has been visited */
202
+ path: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
203
+ };
204
+ PageViewCountCriteria: {
205
+ type: "PVC";
206
+ /** @description The expression to match the page view count against */
207
+ match: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["NumberMatch"];
208
+ };
209
+ /** @description Describes a match expression on a string */
210
+ StringMatch: {
211
+ /** @description The right hand side of the match expression */
212
+ rhs: string;
213
+ /**
214
+ * @description The match operator
215
+ * '=' = exact match
216
+ * '~' = contains match
217
+ * '//' = regular expression match
218
+ *
219
+ * Any of the above can be prefixed with '!' to invert the match (i.e. != for 'not an exact match')
220
+ */
221
+ op: "=" | "~" | "//" | "!=" | "!~" | "!//";
222
+ /** @description The case sensitivity of the match. Defaults to false if unspecified. */
223
+ cs?: boolean;
224
+ } | {
225
+ /**
226
+ * @description The type of match to perform
227
+ * '*' = exists with any value
228
+ * '!*' = does not exist
229
+ */
230
+ op: "*" | "!*";
231
+ };
232
+ /** @description Describes a match expression on a number */
233
+ NumberMatch: {
234
+ /** @description The right hand side of the match expression */
235
+ rhs: number;
236
+ /**
237
+ * @description The type of match to perform
238
+ * '=' = exact match
239
+ * '!=' = not an exact match
240
+ * '<' = less than match expression
241
+ * '>' = greater than match expression
242
+ */
243
+ op: "=" | "<" | ">" | "!=";
244
+ };
245
+ /** @description Defines an aggregate dimension that is a grouping of other dimensions' scores; an intent or audience. */
246
+ AggregateDimension: {
247
+ /** @description Input dimensions to the aggregate dimension */
248
+ inputs: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["AggregateDimensionInput"][];
249
+ };
250
+ /** @description Defines an input dimension to an aggregate dimension */
251
+ AggregateDimensionInput: {
252
+ /**
253
+ * @description Dimension name to reference as an input.
254
+ * For enrichment inputs, use CATEGORY_KEY as the dimension.
255
+ * Enrichments, signals, and other aggregate dimensions may be referenced.
256
+ *
257
+ * Note that creating a cycle of aggregate dimensions is allowed, however
258
+ * the final score will _ignore_ the cycled aggregate dimension in the result.
259
+ * This can be used to create mutually exclusive aggregates.
260
+ */
261
+ dim: string;
262
+ /**
263
+ * @description The sign of the input dimension controls how it affects the aggregate dimension's final score.
264
+ *
265
+ * '+' = add to the final score
266
+ * '-' = subtract from the final score
267
+ * 'c' = clear the final score (if the input dimension has any score at all, this aggreate will have no score regardless of other inputs)
268
+ *
269
+ * Default if unspecified: '+'
270
+ *
271
+ * @default +
272
+ */
273
+ sign?: "+" | "-" | "c";
274
+ };
275
+ Test: {
276
+ /** @description Winning variation ID - if set, the test will not run and this variation is shown to all visitors (the test is closed) */
277
+ wv?: string;
278
+ };
279
+ };
280
+ };
281
+ operations: {};
282
+ };
283
+ }
284
+
285
+ export { components as c, external as e, paths as p };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/context",
3
- "version": "12.2.1-alpha.177+62e00ad7",
3
+ "version": "14.2.1-alpha.34+baf2e926f",
4
4
  "description": "Uniform Context core package",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -38,36 +38,23 @@
38
38
  },
39
39
  "sideEffects": false,
40
40
  "scripts": {
41
- "build": "tsup",
41
+ "build": "tsup --minify",
42
42
  "dev": "tsup --watch",
43
43
  "clean": "rimraf dist",
44
44
  "test": "jest --maxWorkers=1",
45
45
  "lint": "eslint \"src/**/*.{js,ts,tsx}\"",
46
46
  "format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
47
- "ci:verify": "run-p lint test",
48
- "ci:build": "tsup --minify --clean",
49
47
  "update-openapi": "node ./update-openapi.cjs",
50
48
  "benchmark:build": "tsup src/storage/__benchmarks__/storage.benchmark.ts",
51
49
  "benchmark:run": "node ./dist/storage.benchmark.js"
52
50
  },
53
51
  "devDependencies": {
54
- "@types/jest": "27.4.0",
55
- "@types/node": "16.11.12",
56
- "@types/yargs": "17.0.8",
57
- "@uniformdev/cli": "^12.2.1-alpha.177+62e00ad7",
58
- "benny": "^3.7.1",
59
- "eslint": "8.7.0",
60
- "eslint-plugin-react": "7.28.0",
61
- "eslint-plugin-react-hooks": "4.3.0",
62
- "jest": "27.4.7",
63
- "npm-run-all": "4.1.5",
64
- "rimraf": "3.0.2",
65
- "ts-jest": "27.1.3",
66
- "tsup": "5.11.11",
52
+ "@types/yargs": "17.0.9",
53
+ "@uniformdev/cli": "^14.2.1-alpha.34+baf2e926f",
54
+ "benny": "3.7.1",
67
55
  "yargs": "17.3.1"
68
56
  },
69
57
  "dependencies": {
70
- "chalk": "^4.1.2",
71
58
  "dequal": "^2.0.2",
72
59
  "isomorphic-unfetch": "^3.1.0",
73
60
  "mitt": "^3.0.0",
@@ -77,5 +64,5 @@
77
64
  "files": [
78
65
  "/dist"
79
66
  ],
80
- "gitHead": "62e00ad7698fe93306fcbc58a1faaffbbe04f778"
67
+ "gitHead": "baf2e926f0015c9dd4b67ac99dcc8ee1f553d735"
81
68
  }
@@ -1 +0,0 @@
1
- import{i as R}from"./chunk-KZPEO35A.mjs";R();var A="_";export{A as a};