@uniformdev/context 18.16.0 → 18.17.1-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/api.d.ts +1723 -5
- package/dist/api/api.js +16 -0
- package/dist/api/api.mjs +13 -0
- package/dist/index.d.ts +2 -3
- package/dist/{types-1c9fdbd2.d.ts → types-6909e78d.d.ts} +331 -2
- package/package.json +3 -14
- package/dist/cli/cli.d.ts +0 -12
- package/dist/cli/cli.js +0 -21432
- package/dist/cli/cli.mjs +0 -21428
- package/dist/contextTypes-defd0c5d.d.ts +0 -1718
- package/dist/v2-manifest.swagger-74a3dcac.d.ts +0 -331
package/dist/api/api.js
CHANGED
@@ -48,12 +48,14 @@ __export(api_exports, {
|
|
48
48
|
CachedManifestClient: () => CachedManifestClient,
|
49
49
|
CachedQuirkClient: () => CachedQuirkClient,
|
50
50
|
CachedSignalClient: () => CachedSignalClient,
|
51
|
+
CachedTestClient: () => CachedTestClient,
|
51
52
|
ContextClient: () => ContextClient,
|
52
53
|
DimensionClient: () => DimensionClient,
|
53
54
|
EnrichmentClient: () => EnrichmentClient,
|
54
55
|
ManifestClient: () => ManifestClient,
|
55
56
|
QuirkClient: () => QuirkClient,
|
56
57
|
SignalClient: () => SignalClient,
|
58
|
+
TestClient: () => TestClient,
|
57
59
|
UncachedAggregateClient: () => UncachedAggregateClient,
|
58
60
|
UncachedContextClient: () => UncachedContextClient,
|
59
61
|
UncachedDimensionClient: () => UncachedDimensionClient,
|
@@ -61,6 +63,7 @@ __export(api_exports, {
|
|
61
63
|
UncachedManifestClient: () => UncachedManifestClient,
|
62
64
|
UncachedQuirkClient: () => UncachedQuirkClient,
|
63
65
|
UncachedSignalClient: () => UncachedSignalClient,
|
66
|
+
UncachedTestClient: () => UncachedTestClient,
|
64
67
|
computeDimensionDefinitionDisplayData: () => computeDimensionDefinitionDisplayData,
|
65
68
|
computeDimensionDisplayData: () => computeDimensionDisplayData,
|
66
69
|
computeDimensionDisplayName: () => computeDimensionDisplayName,
|
@@ -543,6 +546,16 @@ var _TestClient = class extends ApiClient {
|
|
543
546
|
var TestClient = _TestClient;
|
544
547
|
_url7 = new WeakMap();
|
545
548
|
__privateAdd(TestClient, _url7, "/api/v2/test");
|
549
|
+
var UncachedTestClient = class extends TestClient {
|
550
|
+
constructor(options) {
|
551
|
+
super({ ...options, bypassCache: true });
|
552
|
+
}
|
553
|
+
};
|
554
|
+
var CachedTestClient = class extends TestClient {
|
555
|
+
constructor(options) {
|
556
|
+
super({ ...options, bypassCache: false });
|
557
|
+
}
|
558
|
+
};
|
546
559
|
|
547
560
|
// src/api/ContextClient.ts
|
548
561
|
var ContextClient = class {
|
@@ -585,12 +598,14 @@ var CachedContextClient = class extends ContextClient {
|
|
585
598
|
CachedManifestClient,
|
586
599
|
CachedQuirkClient,
|
587
600
|
CachedSignalClient,
|
601
|
+
CachedTestClient,
|
588
602
|
ContextClient,
|
589
603
|
DimensionClient,
|
590
604
|
EnrichmentClient,
|
591
605
|
ManifestClient,
|
592
606
|
QuirkClient,
|
593
607
|
SignalClient,
|
608
|
+
TestClient,
|
594
609
|
UncachedAggregateClient,
|
595
610
|
UncachedContextClient,
|
596
611
|
UncachedDimensionClient,
|
@@ -598,6 +613,7 @@ var CachedContextClient = class extends ContextClient {
|
|
598
613
|
UncachedManifestClient,
|
599
614
|
UncachedQuirkClient,
|
600
615
|
UncachedSignalClient,
|
616
|
+
UncachedTestClient,
|
601
617
|
computeDimensionDefinitionDisplayData,
|
602
618
|
computeDimensionDisplayData,
|
603
619
|
computeDimensionDisplayName,
|
package/dist/api/api.mjs
CHANGED
@@ -492,6 +492,16 @@ var _TestClient = class extends ApiClient {
|
|
492
492
|
var TestClient = _TestClient;
|
493
493
|
_url7 = new WeakMap();
|
494
494
|
__privateAdd(TestClient, _url7, "/api/v2/test");
|
495
|
+
var UncachedTestClient = class extends TestClient {
|
496
|
+
constructor(options) {
|
497
|
+
super({ ...options, bypassCache: true });
|
498
|
+
}
|
499
|
+
};
|
500
|
+
var CachedTestClient = class extends TestClient {
|
501
|
+
constructor(options) {
|
502
|
+
super({ ...options, bypassCache: false });
|
503
|
+
}
|
504
|
+
};
|
495
505
|
|
496
506
|
// src/api/ContextClient.ts
|
497
507
|
var ContextClient = class {
|
@@ -533,12 +543,14 @@ export {
|
|
533
543
|
CachedManifestClient,
|
534
544
|
CachedQuirkClient,
|
535
545
|
CachedSignalClient,
|
546
|
+
CachedTestClient,
|
536
547
|
ContextClient,
|
537
548
|
DimensionClient,
|
538
549
|
EnrichmentClient,
|
539
550
|
ManifestClient,
|
540
551
|
QuirkClient,
|
541
552
|
SignalClient,
|
553
|
+
TestClient,
|
542
554
|
UncachedAggregateClient,
|
543
555
|
UncachedContextClient,
|
544
556
|
UncachedDimensionClient,
|
@@ -546,6 +558,7 @@ export {
|
|
546
558
|
UncachedManifestClient,
|
547
559
|
UncachedQuirkClient,
|
548
560
|
UncachedSignalClient,
|
561
|
+
UncachedTestClient,
|
549
562
|
computeDimensionDefinitionDisplayData,
|
550
563
|
computeDimensionDisplayData,
|
551
564
|
computeDimensionDisplayName,
|
package/dist/index.d.ts
CHANGED
@@ -1,8 +1,7 @@
|
|
1
|
-
import { O as OutputSeverity, L as LogDrain, C as ContextPlugin, S as ScoreVector, A as AggregateDimension, T as TransitionDataStore, a as StorageCommands, V as VisitorData, b as TransitionDataStoreOptions, D as DecayFunction, c as CriteriaEvaluator, d as StringMatch, e as VariantMatchCriteria, f as LogMessage } from './types-
|
2
|
-
export { X as AggregateDimensionInput, a1 as BehaviorTag, j as Context, i as ContextEvents, g as ContextOptions, aq as ContextState, ar as ContextStateUpdate, F as CriteriaEvaluatorParameters, E as CriteriaEvaluatorResult, ah as DecayOptions, m as DevToolsActions, q as DevToolsDataEvent, n as DevToolsEvent, o as DevToolsEvents, u as DevToolsForgetEvent, r as DevToolsHelloEvent, p as DevToolsLogEvent, t as DevToolsRawCommandsEvent, l as DevToolsState, k as DevToolsUiVersion, s as DevToolsUpdateEvent, _ as DimensionMatch, R as EnrichmentCategory, an as EnrichmentData, ao as EventData, G as GroupCriteriaEvaluator, ac as IdentifyCommand, z as LogMessageGroup, y as LogMessageSingle, v as LogMessages, B as ManifestInstance, I as ManifestV2, M as MessageCategory, x as MessageFunc, a7 as ModifyScoreCommand, a8 as ModifySessionScoreCommand, U as NumberMatch, P as PersonalizationEvent, J as PersonalizationManifest, $ as PersonalizeOptions, a3 as PersonalizedResult, a2 as PersonalizedVariant, al as Quirks, af as SERVER_STATE_ID, ae as ServerToClientTransitionState, a9 as SetConsentCommand, ad as SetControlGroupCommand, aa as SetQuirkCommand, ab as SetTestCommand, w as Severity, K as Signal, Q as SignalCriteria, N as SignalCriteriaGroup, H as SignalData, a6 as StorageCommand, W as TestDefinition, h as TestEvent, Y as TestOptions, a5 as TestResult, a4 as TestVariant, am as Tests, ag as TransitionDataStoreEvents, ak as VisitorDataStore, aj as VisitorDataStoreEvents, ai as VisitorDataStoreOptions, ap as emptyVisitorData, a0 as personalizeVariations, Z as testVariations } from './types-
|
1
|
+
import { O as OutputSeverity, L as LogDrain, C as ContextPlugin, S as ScoreVector, A as AggregateDimension, T as TransitionDataStore, a as StorageCommands, V as VisitorData, b as TransitionDataStoreOptions, D as DecayFunction, c as CriteriaEvaluator, d as StringMatch, e as VariantMatchCriteria, f as LogMessage } from './types-6909e78d.js';
|
2
|
+
export { X as AggregateDimensionInput, a1 as BehaviorTag, j as Context, i as ContextEvents, g as ContextOptions, aq as ContextState, ar as ContextStateUpdate, F as CriteriaEvaluatorParameters, E as CriteriaEvaluatorResult, ah as DecayOptions, m as DevToolsActions, q as DevToolsDataEvent, n as DevToolsEvent, o as DevToolsEvents, u as DevToolsForgetEvent, r as DevToolsHelloEvent, p as DevToolsLogEvent, t as DevToolsRawCommandsEvent, l as DevToolsState, k as DevToolsUiVersion, s as DevToolsUpdateEvent, _ as DimensionMatch, R as EnrichmentCategory, an as EnrichmentData, ao as EventData, G as GroupCriteriaEvaluator, ac as IdentifyCommand, z as LogMessageGroup, y as LogMessageSingle, v as LogMessages, B as ManifestInstance, I as ManifestV2, M as MessageCategory, x as MessageFunc, a7 as ModifyScoreCommand, a8 as ModifySessionScoreCommand, U as NumberMatch, P as PersonalizationEvent, J as PersonalizationManifest, $ as PersonalizeOptions, a3 as PersonalizedResult, a2 as PersonalizedVariant, al as Quirks, af as SERVER_STATE_ID, ae as ServerToClientTransitionState, a9 as SetConsentCommand, ad as SetControlGroupCommand, aa as SetQuirkCommand, ab as SetTestCommand, w as Severity, K as Signal, Q as SignalCriteria, N as SignalCriteriaGroup, H as SignalData, a6 as StorageCommand, W as TestDefinition, h as TestEvent, Y as TestOptions, a5 as TestResult, a4 as TestVariant, am as Tests, ag as TransitionDataStoreEvents, ak as VisitorDataStore, aj as VisitorDataStoreEvents, ai as VisitorDataStoreOptions, ap as emptyVisitorData, a0 as personalizeVariations, Z as testVariations } from './types-6909e78d.js';
|
3
3
|
import Cookies from 'js-cookie';
|
4
4
|
import 'mitt';
|
5
|
-
import './v2-manifest.swagger-74a3dcac.js';
|
6
5
|
|
7
6
|
/**
|
8
7
|
* Creates a new log drain that will log to the console.
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import * as mitt from 'mitt';
|
2
|
-
import { c as components, e as external } from './v2-manifest.swagger-74a3dcac.js';
|
3
2
|
|
4
3
|
type Quirks = {
|
5
4
|
[key: string]: string;
|
@@ -320,6 +319,336 @@ declare class ManifestInstance {
|
|
320
319
|
getDimensionByKey(scoreKey: string): EnrichmentCategory | Signal | undefined;
|
321
320
|
}
|
322
321
|
|
322
|
+
/**
|
323
|
+
* This file was auto-generated by openapi-typescript.
|
324
|
+
* Do not make direct changes to the file.
|
325
|
+
*/
|
326
|
+
interface paths {
|
327
|
+
"/api/v2/manifest": {
|
328
|
+
/**
|
329
|
+
* Fetches the Intent Manifest for a given project.
|
330
|
+
* 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).
|
331
|
+
*/
|
332
|
+
get: {
|
333
|
+
parameters: {
|
334
|
+
query: {
|
335
|
+
preview?: boolean;
|
336
|
+
projectId: string;
|
337
|
+
};
|
338
|
+
};
|
339
|
+
responses: {
|
340
|
+
/** OK */
|
341
|
+
200: {
|
342
|
+
content: {
|
343
|
+
"application/json": components["schemas"]["ManifestV2"];
|
344
|
+
};
|
345
|
+
};
|
346
|
+
400: external["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
347
|
+
401: external["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
348
|
+
403: external["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
349
|
+
/** No manifest has ever been published, and the API key does not have preview permissions */
|
350
|
+
404: {
|
351
|
+
content: {
|
352
|
+
"text/plain": string;
|
353
|
+
};
|
354
|
+
};
|
355
|
+
429: external["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
356
|
+
500: external["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
357
|
+
};
|
358
|
+
};
|
359
|
+
/** Handles preflight requests. This endpoint allows CORS. */
|
360
|
+
options: {
|
361
|
+
responses: {
|
362
|
+
/** OK */
|
363
|
+
204: never;
|
364
|
+
};
|
365
|
+
};
|
366
|
+
};
|
367
|
+
}
|
368
|
+
interface components {
|
369
|
+
schemas: {
|
370
|
+
ManifestV2: {
|
371
|
+
project: {
|
372
|
+
/**
|
373
|
+
* Format: uuid
|
374
|
+
* @description is not present unless getting a preview manifest
|
375
|
+
*/
|
376
|
+
id?: string;
|
377
|
+
/** @description is not present unless getting a preview manifest */
|
378
|
+
name?: string;
|
379
|
+
/** @description is not present unless getting a preview manifest */
|
380
|
+
ui_version?: number;
|
381
|
+
pz?: components["schemas"]["PersonalizationManifest"];
|
382
|
+
/** @description A/B test settings */
|
383
|
+
test?: {
|
384
|
+
[key: string]: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["Test"];
|
385
|
+
};
|
386
|
+
};
|
387
|
+
};
|
388
|
+
PersonalizationManifest: {
|
389
|
+
/** @description Map of all signals defined for personalization criteria */
|
390
|
+
sig?: {
|
391
|
+
[key: string]: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["Signal"];
|
392
|
+
};
|
393
|
+
/** @description Map of all enrichment categories defined for personalization criteria */
|
394
|
+
enr?: {
|
395
|
+
[key: string]: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["EnrichmentCategory"];
|
396
|
+
};
|
397
|
+
/** @description Map of all aggregate dimensions (intents or audiences) defined for personalization criteria */
|
398
|
+
agg?: {
|
399
|
+
[key: string]: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["AggregateDimension"];
|
400
|
+
};
|
401
|
+
/** @description Percentage of visitors that will be used as a personalization control group (not shown any personalization) */
|
402
|
+
control?: number;
|
403
|
+
};
|
404
|
+
};
|
405
|
+
}
|
406
|
+
interface external {
|
407
|
+
"swagger.yml": {
|
408
|
+
paths: {};
|
409
|
+
components: {
|
410
|
+
schemas: {
|
411
|
+
Error: {
|
412
|
+
/** @description Error message(s) that occurred while processing the request */
|
413
|
+
errorMessage?: string[] | string;
|
414
|
+
};
|
415
|
+
};
|
416
|
+
responses: {
|
417
|
+
/** Request input validation failed */
|
418
|
+
BadRequestError: {
|
419
|
+
content: {
|
420
|
+
"application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
|
421
|
+
};
|
422
|
+
};
|
423
|
+
/** API key or token was not valid */
|
424
|
+
UnauthorizedError: {
|
425
|
+
content: {
|
426
|
+
"application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
|
427
|
+
};
|
428
|
+
};
|
429
|
+
/** Permission was denied */
|
430
|
+
ForbiddenError: {
|
431
|
+
content: {
|
432
|
+
"application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
|
433
|
+
};
|
434
|
+
};
|
435
|
+
/** Resource not found */
|
436
|
+
NotFoundError: {
|
437
|
+
content: {
|
438
|
+
"application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
|
439
|
+
};
|
440
|
+
};
|
441
|
+
/** Too many requests in allowed time period */
|
442
|
+
RateLimitError: unknown;
|
443
|
+
/** Execution error occurred */
|
444
|
+
InternalServerError: unknown;
|
445
|
+
};
|
446
|
+
};
|
447
|
+
operations: {};
|
448
|
+
};
|
449
|
+
"uniform-context-types.swagger.yml": {
|
450
|
+
paths: {};
|
451
|
+
components: {
|
452
|
+
schemas: {
|
453
|
+
EnrichmentCategory: {
|
454
|
+
/** @description The maximum visitor score allowed for enrichment keys in this category */
|
455
|
+
cap: number;
|
456
|
+
};
|
457
|
+
PreviewSignal: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["Signal"] & {
|
458
|
+
/** @description Friendly name of the signal */
|
459
|
+
name: string;
|
460
|
+
/** @description Description of the signal */
|
461
|
+
description?: string;
|
462
|
+
};
|
463
|
+
Signal: {
|
464
|
+
/** @description The signal strength per activation (each time its criteria are true, this score is added) */
|
465
|
+
str: number;
|
466
|
+
/** @description The maximum visitor score allowed for this signal */
|
467
|
+
cap: number;
|
468
|
+
/**
|
469
|
+
* @description How long the signal's score should persist
|
470
|
+
* 's' = current session (expires after a period of inactivity)
|
471
|
+
* 'p' = permanent (expires as far in the future as possible, may be limited by browser security settings)
|
472
|
+
* 't' = transient (score tracks the current state of the criteria every time scores are updated)
|
473
|
+
*
|
474
|
+
* @enum {string}
|
475
|
+
*/
|
476
|
+
dur: "s" | "p" | "t";
|
477
|
+
crit: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["RootSignalCriteriaGroup"];
|
478
|
+
};
|
479
|
+
RootSignalCriteriaGroup: {
|
480
|
+
/**
|
481
|
+
* @description Criteria type (Group of other criteria)
|
482
|
+
* @enum {string}
|
483
|
+
*/
|
484
|
+
type: "G";
|
485
|
+
/**
|
486
|
+
* @description The logical operator to apply to the criteria groups
|
487
|
+
* & = AND
|
488
|
+
* | = OR
|
489
|
+
*
|
490
|
+
* Default is `&` if unspecified.
|
491
|
+
*
|
492
|
+
* @default &
|
493
|
+
* @enum {string}
|
494
|
+
*/
|
495
|
+
op?: "&" | "|";
|
496
|
+
/** @description The criteria clauses that make up this grouping of criteria */
|
497
|
+
clauses: (external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteriaGroup"] | external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteria"])[];
|
498
|
+
};
|
499
|
+
SignalCriteriaGroup: {
|
500
|
+
/**
|
501
|
+
* @description Criteria type (Group of other criteria)
|
502
|
+
* @enum {string}
|
503
|
+
*/
|
504
|
+
type: "G";
|
505
|
+
/**
|
506
|
+
* @description The logical operator to apply to the criteria groups
|
507
|
+
* & = AND
|
508
|
+
* | = OR
|
509
|
+
*
|
510
|
+
* Default is `&` if unspecified.
|
511
|
+
*
|
512
|
+
* @enum {string}
|
513
|
+
*/
|
514
|
+
op?: "&" | "|";
|
515
|
+
/** @description The criteria clauses that make up this grouping of criteria */
|
516
|
+
clauses: (external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteriaGroup"] | external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteria"])[];
|
517
|
+
};
|
518
|
+
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"];
|
519
|
+
/** @description Matches a URL query string parameter value */
|
520
|
+
QueryStringCriteria: {
|
521
|
+
/** @enum {string} */
|
522
|
+
type: "QS";
|
523
|
+
/** @description The name of the query string parameter to match */
|
524
|
+
queryName: string;
|
525
|
+
/** @description The value to match the query string parameter against */
|
526
|
+
match: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
|
527
|
+
};
|
528
|
+
/** @description Matches a web cookie value */
|
529
|
+
CookieCriteria: {
|
530
|
+
/** @enum {string} */
|
531
|
+
type: "CK";
|
532
|
+
/** @description The name of the cookie to match */
|
533
|
+
cookieName: string;
|
534
|
+
/** @description The value to match the cookie against */
|
535
|
+
match: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
|
536
|
+
};
|
537
|
+
/** @description Matches a visitor quirk key and value */
|
538
|
+
QuirkCriteria: {
|
539
|
+
/** @enum {string} */
|
540
|
+
type: "QK";
|
541
|
+
/** @description The name of the quirk key to match */
|
542
|
+
key: string;
|
543
|
+
/** @description The quirk value to match against */
|
544
|
+
match: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
|
545
|
+
};
|
546
|
+
/** @description Matches an analytics event name being fired */
|
547
|
+
EventCriteria: {
|
548
|
+
/** @enum {string} */
|
549
|
+
type: "EVT";
|
550
|
+
/** @description How to match the event name */
|
551
|
+
event: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
|
552
|
+
};
|
553
|
+
/**
|
554
|
+
* @description Matches the current page's absolute path (i.e. /path/to/page.html)
|
555
|
+
* Does not include the query string or protocol and hostname (i.e. NOT https://foo.com/path/to/page.html?query=something)
|
556
|
+
*/
|
557
|
+
CurrentPageCriteria: {
|
558
|
+
/** @enum {string} */
|
559
|
+
type: "PV";
|
560
|
+
/** @description The page/route path to match as a page that has been visited */
|
561
|
+
path: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
|
562
|
+
};
|
563
|
+
PageViewCountCriteria: {
|
564
|
+
/** @enum {string} */
|
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
|
+
* @enum {string}
|
582
|
+
*/
|
583
|
+
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
584
|
+
/** @description The case sensitivity of the match. Defaults to false if unspecified. */
|
585
|
+
cs?: boolean;
|
586
|
+
} | {
|
587
|
+
/**
|
588
|
+
* @description The type of match to perform
|
589
|
+
* '*' = exists with any value
|
590
|
+
* '!*' = does not exist
|
591
|
+
*
|
592
|
+
* @enum {string}
|
593
|
+
*/
|
594
|
+
op: "*" | "!*";
|
595
|
+
};
|
596
|
+
/** @description Describes a match expression on a number */
|
597
|
+
NumberMatch: {
|
598
|
+
/** @description The right hand side of the match expression */
|
599
|
+
rhs: number;
|
600
|
+
/**
|
601
|
+
* @description The type of match to perform
|
602
|
+
* '=' = exact match
|
603
|
+
* '!=' = not an exact match
|
604
|
+
* '<' = less than match expression
|
605
|
+
* '>' = greater than match expression
|
606
|
+
*
|
607
|
+
* @enum {string}
|
608
|
+
*/
|
609
|
+
op: "=" | "<" | ">" | "!=";
|
610
|
+
};
|
611
|
+
/** @description Defines an aggregate dimension that is a grouping of other dimensions' scores; an intent or audience. */
|
612
|
+
AggregateDimension: {
|
613
|
+
/** @description Input dimensions to the aggregate dimension */
|
614
|
+
inputs: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["AggregateDimensionInput"][];
|
615
|
+
};
|
616
|
+
/** @description Defines an input dimension to an aggregate dimension */
|
617
|
+
AggregateDimensionInput: {
|
618
|
+
/**
|
619
|
+
* @description Dimension name to reference as an input.
|
620
|
+
* For enrichment inputs, use CATEGORY_KEY as the dimension.
|
621
|
+
* Enrichments, signals, and other aggregate dimensions may be referenced.
|
622
|
+
*
|
623
|
+
* Note that creating a cycle of aggregate dimensions is allowed, however
|
624
|
+
* the final score will _ignore_ the cycled aggregate dimension in the result.
|
625
|
+
* This can be used to create mutually exclusive aggregates.
|
626
|
+
*/
|
627
|
+
dim: string;
|
628
|
+
/**
|
629
|
+
* @description The sign of the input dimension controls how it affects the aggregate dimension's final score.
|
630
|
+
*
|
631
|
+
* '+' = add to the final score
|
632
|
+
* '-' = subtract from the final score
|
633
|
+
* 'c' = clear the final score (if the input dimension has any score at all, this aggreate will have no score regardless of other inputs)
|
634
|
+
*
|
635
|
+
* Default if unspecified: '+'
|
636
|
+
*
|
637
|
+
* @default +
|
638
|
+
* @enum {string}
|
639
|
+
*/
|
640
|
+
sign?: "+" | "-" | "c";
|
641
|
+
};
|
642
|
+
Test: {
|
643
|
+
/** @description Winning variation ID - if set, the test will not run and this variation is shown to all visitors (the test is closed) */
|
644
|
+
wv?: string;
|
645
|
+
};
|
646
|
+
};
|
647
|
+
};
|
648
|
+
operations: {};
|
649
|
+
};
|
650
|
+
}
|
651
|
+
|
323
652
|
type SharedTypes = external['uniform-context-types.swagger.yml']['components']['schemas'];
|
324
653
|
type ManifestV2 = components['schemas']['ManifestV2'];
|
325
654
|
type PersonalizationManifest = components['schemas']['PersonalizationManifest'];
|
@@ -794,4 +1123,4 @@ declare global {
|
|
794
1123
|
}
|
795
1124
|
}
|
796
1125
|
|
797
|
-
export { PersonalizeOptions as $, AggregateDimension as A, ManifestInstance as B, ContextPlugin as C, DecayFunction as D, CriteriaEvaluatorResult as E, CriteriaEvaluatorParameters as F, GroupCriteriaEvaluator as G, SignalData as H, ManifestV2 as I, PersonalizationManifest as J, Signal as K, LogDrain as L, MessageCategory as M, SignalCriteriaGroup as N, OutputSeverity as O, PersonalizationEvent as P, SignalCriteria as Q, EnrichmentCategory as R, ScoreVector as S, TransitionDataStore as T, NumberMatch as U, VisitorData as V, TestDefinition as W, AggregateDimensionInput as X, TestOptions as Y, testVariations as Z, DimensionMatch as _, StorageCommands as a, personalizeVariations as a0, BehaviorTag as a1, PersonalizedVariant as a2, PersonalizedResult as a3, TestVariant as a4, TestResult as a5, StorageCommand as a6, ModifyScoreCommand as a7, ModifySessionScoreCommand as a8, SetConsentCommand as a9, SetQuirkCommand as aa, SetTestCommand as ab, IdentifyCommand as ac, SetControlGroupCommand as ad, ServerToClientTransitionState as ae, SERVER_STATE_ID as af, TransitionDataStoreEvents as ag, DecayOptions as ah, VisitorDataStoreOptions as ai, VisitorDataStoreEvents as aj, VisitorDataStore as ak, Quirks as al, Tests as am, EnrichmentData as an, EventData as ao, emptyVisitorData as ap, ContextState as aq, ContextStateUpdate as ar, TransitionDataStoreOptions as b, CriteriaEvaluator as c, StringMatch as d, VariantMatchCriteria as e, LogMessage as f, ContextOptions as g, TestEvent as h, ContextEvents as i, Context as j, DevToolsUiVersion as k, DevToolsState as l, DevToolsActions as m, DevToolsEvent as n, DevToolsEvents as o, DevToolsLogEvent as p, DevToolsDataEvent as q, DevToolsHelloEvent as r, DevToolsUpdateEvent as s, DevToolsRawCommandsEvent as t, DevToolsForgetEvent as u, LogMessages as v, Severity as w, MessageFunc as x, LogMessageSingle as y, LogMessageGroup as z };
|
1126
|
+
export { PersonalizeOptions as $, AggregateDimension as A, ManifestInstance as B, ContextPlugin as C, DecayFunction as D, CriteriaEvaluatorResult as E, CriteriaEvaluatorParameters as F, GroupCriteriaEvaluator as G, SignalData as H, ManifestV2 as I, PersonalizationManifest as J, Signal as K, LogDrain as L, MessageCategory as M, SignalCriteriaGroup as N, OutputSeverity as O, PersonalizationEvent as P, SignalCriteria as Q, EnrichmentCategory as R, ScoreVector as S, TransitionDataStore as T, NumberMatch as U, VisitorData as V, TestDefinition as W, AggregateDimensionInput as X, TestOptions as Y, testVariations as Z, DimensionMatch as _, StorageCommands as a, personalizeVariations as a0, BehaviorTag as a1, PersonalizedVariant as a2, PersonalizedResult as a3, TestVariant as a4, TestResult as a5, StorageCommand as a6, ModifyScoreCommand as a7, ModifySessionScoreCommand as a8, SetConsentCommand as a9, SetQuirkCommand as aa, SetTestCommand as ab, IdentifyCommand as ac, SetControlGroupCommand as ad, ServerToClientTransitionState as ae, SERVER_STATE_ID as af, TransitionDataStoreEvents as ag, DecayOptions as ah, VisitorDataStoreOptions as ai, VisitorDataStoreEvents as aj, VisitorDataStore as ak, Quirks as al, Tests as am, EnrichmentData as an, EventData as ao, emptyVisitorData as ap, ContextState as aq, ContextStateUpdate as ar, paths as as, TransitionDataStoreOptions as b, CriteriaEvaluator as c, StringMatch as d, VariantMatchCriteria as e, LogMessage as f, ContextOptions as g, TestEvent as h, ContextEvents as i, Context as j, DevToolsUiVersion as k, DevToolsState as l, DevToolsActions as m, DevToolsEvent as n, DevToolsEvents as o, DevToolsLogEvent as p, DevToolsDataEvent as q, DevToolsHelloEvent as r, DevToolsUpdateEvent as s, DevToolsRawCommandsEvent as t, DevToolsForgetEvent as u, LogMessages as v, Severity as w, MessageFunc as x, LogMessageSingle as y, LogMessageGroup as z };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uniformdev/context",
|
3
|
-
"version": "18.
|
3
|
+
"version": "18.17.1-alpha.13+77f2eaabc",
|
4
4
|
"description": "Uniform Context core package",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"main": "./dist/index.js",
|
@@ -17,11 +17,6 @@
|
|
17
17
|
"default": "./dist/index.js"
|
18
18
|
}
|
19
19
|
},
|
20
|
-
"./cli": {
|
21
|
-
"types": "./dist/cli/cli.d.ts",
|
22
|
-
"import": "./dist/cli/cli.mjs",
|
23
|
-
"require": "./dist/cli/cli.js"
|
24
|
-
},
|
25
20
|
"./api": {
|
26
21
|
"types": "./dist/api/api.d.ts",
|
27
22
|
"import": "./dist/api/api.mjs",
|
@@ -34,9 +29,6 @@
|
|
34
29
|
"*": [
|
35
30
|
"./dist/index.d.ts"
|
36
31
|
],
|
37
|
-
"cli": [
|
38
|
-
"./dist/cli/cli.d.ts"
|
39
|
-
],
|
40
32
|
"api": [
|
41
33
|
"./dist/api/api.d.ts"
|
42
34
|
]
|
@@ -58,10 +50,7 @@
|
|
58
50
|
},
|
59
51
|
"devDependencies": {
|
60
52
|
"@types/js-cookie": "3.0.2",
|
61
|
-
"
|
62
|
-
"@uniformdev/cli": "18.16.0",
|
63
|
-
"benny": "3.7.1",
|
64
|
-
"yargs": "17.6.2"
|
53
|
+
"benny": "3.7.1"
|
65
54
|
},
|
66
55
|
"dependencies": {
|
67
56
|
"dequal": "^2.0.2",
|
@@ -76,5 +65,5 @@
|
|
76
65
|
"publishConfig": {
|
77
66
|
"access": "public"
|
78
67
|
},
|
79
|
-
"gitHead": "
|
68
|
+
"gitHead": "77f2eaabc380a8251c040f8bdd21d5451351022f"
|
80
69
|
}
|
package/dist/cli/cli.d.ts
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
import { UniformCLIPlugin } from '@uniformdev/cli';
|
2
|
-
import { UniformPackage } from '@uniformdev/cli/sync';
|
3
|
-
import { C as ContextDefinitions } from '../contextTypes-defd0c5d.js';
|
4
|
-
import '../v2-manifest.swagger-74a3dcac.js';
|
5
|
-
|
6
|
-
type ContextPackage = UniformPackage & ContextDefinitions;
|
7
|
-
declare function readContextPackage(filename: string, assertExists: boolean): ContextPackage;
|
8
|
-
declare function writeContextPackage(filename: string, packageContents: ContextPackage): void;
|
9
|
-
|
10
|
-
declare const uniformCLI: UniformCLIPlugin;
|
11
|
-
|
12
|
-
export { ContextPackage, readContextPackage, uniformCLI, writeContextPackage };
|