@uniformdev/context 19.146.1-alpha.1 → 19.146.2
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.mts +1 -25
- package/dist/api/api.d.ts +1 -25
- package/dist/index.d.mts +3 -12
- package/dist/index.d.ts +3 -12
- package/dist/index.esm.js +7 -447
- package/dist/index.js +7 -448
- package/dist/index.mjs +7 -447
- package/dist/{types-DqYG-dCc.d.mts → types-WtfxfDct.d.mts} +2 -36
- package/dist/{types-DqYG-dCc.d.ts → types-WtfxfDct.d.ts} +2 -36
- package/package.json +3 -5
@@ -9,9 +9,6 @@ type Tests = {
|
|
9
9
|
type ScoreVector = {
|
10
10
|
[key: string]: number;
|
11
11
|
};
|
12
|
-
type Goals = {
|
13
|
-
[key: string]: boolean;
|
14
|
-
};
|
15
12
|
type EnrichmentData = {
|
16
13
|
/** Enrichment category name */
|
17
14
|
cat: string;
|
@@ -50,10 +47,6 @@ type VisitorData = {
|
|
50
47
|
* NOTE: Context.scores is more commonly correct to read scores instead of this value.
|
51
48
|
*/
|
52
49
|
scores: ScoreVector;
|
53
|
-
/**
|
54
|
-
* Goals that this user has triggered.
|
55
|
-
*/
|
56
|
-
goals?: Goals;
|
57
50
|
/**
|
58
51
|
* Whether consent has been given to store the visitor data
|
59
52
|
* If false or not set: visitor data is stored in memory and is lost if the browser refreshes
|
@@ -91,23 +84,13 @@ type ContextStateUpdate = {
|
|
91
84
|
visitor: VisitorData;
|
92
85
|
scores: ScoreVector;
|
93
86
|
};
|
94
|
-
type GoalStateUpdate = {
|
95
|
-
scores: ScoreVector | undefined;
|
96
|
-
quirks: Quirks | undefined;
|
97
|
-
};
|
98
87
|
|
99
88
|
type StorageCommand<TID extends string = string, TData = unknown> = {
|
100
89
|
type: TID;
|
101
90
|
data: TData;
|
102
91
|
};
|
103
92
|
/** Commands that can be issued to alter the storage of Uniform Context data */
|
104
|
-
type StorageCommands = ModifyScoreCommand | ModifySessionScoreCommand | SetConsentCommand | SetQuirkCommand | SetTestCommand | IdentifyCommand | SetControlGroupCommand | SetPersonalizeVariantControlCommand
|
105
|
-
/**
|
106
|
-
* Converts the goal specified.
|
107
|
-
*/
|
108
|
-
type SetGoalCommand = StorageCommand<'setgoal', {
|
109
|
-
goal: string;
|
110
|
-
}>;
|
93
|
+
type StorageCommands = ModifyScoreCommand | ModifySessionScoreCommand | SetConsentCommand | SetQuirkCommand | SetTestCommand | IdentifyCommand | SetControlGroupCommand | SetPersonalizeVariantControlCommand;
|
111
94
|
/**
|
112
95
|
* Changes the visitor's permanent score for a given dimension
|
113
96
|
*/
|
@@ -303,12 +286,6 @@ type VisitorDataStoreEvents = {
|
|
303
286
|
* Fired when visitor control group membership is changed
|
304
287
|
*/
|
305
288
|
controlGroupUpdated: Pick<VisitorData, 'controlGroup'>;
|
306
|
-
/**
|
307
|
-
* Fired when a goal is converted
|
308
|
-
*/
|
309
|
-
goalConverted: {
|
310
|
-
goalId: string;
|
311
|
-
};
|
312
289
|
};
|
313
290
|
declare class VisitorDataStore {
|
314
291
|
#private;
|
@@ -351,7 +328,6 @@ declare class ManifestInstance {
|
|
351
328
|
rollForControlGroup(): boolean;
|
352
329
|
getTest(name: string): TestDefinition | undefined;
|
353
330
|
computeSignals(update: ContextStateUpdate): StorageCommands[];
|
354
|
-
computeGoals(data: GoalStateUpdate): StorageCommands[];
|
355
331
|
/**
|
356
332
|
* Computes aggregated scores based on other dimensions
|
357
333
|
*/
|
@@ -515,7 +491,6 @@ interface external {
|
|
515
491
|
*/
|
516
492
|
dur: "s" | "p" | "t";
|
517
493
|
crit: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["RootSignalCriteriaGroup"];
|
518
|
-
conversion?: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["Conversion"] | null;
|
519
494
|
};
|
520
495
|
RootSignalCriteriaGroup: {
|
521
496
|
/**
|
@@ -537,13 +512,6 @@ interface external {
|
|
537
512
|
/** @description The criteria clauses that make up this grouping of criteria */
|
538
513
|
clauses: (external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteriaGroup"] | external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteria"])[];
|
539
514
|
};
|
540
|
-
Conversion: {
|
541
|
-
/**
|
542
|
-
* @description The frequency of the conversion event
|
543
|
-
* @enum {string}
|
544
|
-
*/
|
545
|
-
freq: "O";
|
546
|
-
};
|
547
515
|
SignalCriteriaGroup: {
|
548
516
|
/**
|
549
517
|
* @description Criteria type (Group of other criteria)
|
@@ -994,8 +962,6 @@ declare const CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID = "contextual_editing_
|
|
994
962
|
type ContextPlugin = {
|
995
963
|
logDrain?: LogDrain;
|
996
964
|
init?: (context: Context) => () => void;
|
997
|
-
forget?: () => Promise<void> | void;
|
998
|
-
update?: (newData: Partial<ContextState>) => Promise<void> | void;
|
999
965
|
};
|
1000
966
|
type ContextOptions = {
|
1001
967
|
/** The Context Manifest to load (from the Context API) */
|
@@ -1207,4 +1173,4 @@ declare global {
|
|
1207
1173
|
}
|
1208
1174
|
}
|
1209
1175
|
|
1210
|
-
export { type TestOptions as $, type AggregateDimension as A, type MessageFunc as B, type ContextPlugin as C, type DecayFunction as D, type LogMessageSingle as E, type LogMessageGroup as F, ManifestInstance as G, GroupCriteriaEvaluator as H, type CriteriaEvaluatorResult as I, type CriteriaEvaluatorParameters as J, type SignalData as K, type LogDrain as L, type MessageCategory as M, type ManifestV2 as N, type OutputSeverity as O, type PersonalizationEvent as P, type PersonalizationManifest as Q, type Signal as R, type ScoreVector as S, TransitionDataStore as T, type SignalCriteriaGroup as U, type VisitorData as V, type SignalCriteria as W, type EnrichmentCategory as X, type NumberMatch as Y, type TestDefinition as Z, type AggregateDimensionInput as _, type StorageCommands as a, testVariations as a0, type DimensionMatch as a1, type PersonalizeOptions as a2, personalizeVariations as a3, type BehaviorTag as a4, type PersonalizedVariant as a5, type PersonalizedResult as a6, type TestVariant as a7, type TestResult as a8, type StorageCommand as a9, type
|
1176
|
+
export { type TestOptions as $, type AggregateDimension as A, type MessageFunc as B, type ContextPlugin as C, type DecayFunction as D, type LogMessageSingle as E, type LogMessageGroup as F, ManifestInstance as G, GroupCriteriaEvaluator as H, type CriteriaEvaluatorResult as I, type CriteriaEvaluatorParameters as J, type SignalData as K, type LogDrain as L, type MessageCategory as M, type ManifestV2 as N, type OutputSeverity as O, type PersonalizationEvent as P, type PersonalizationManifest as Q, type Signal as R, type ScoreVector as S, TransitionDataStore as T, type SignalCriteriaGroup as U, type VisitorData as V, type SignalCriteria as W, type EnrichmentCategory as X, type NumberMatch as Y, type TestDefinition as Z, type AggregateDimensionInput as _, type StorageCommands as a, testVariations as a0, type DimensionMatch as a1, type PersonalizeOptions as a2, personalizeVariations as a3, type BehaviorTag as a4, type PersonalizedVariant as a5, type PersonalizedResult as a6, type TestVariant as a7, type TestResult as a8, type StorageCommand as a9, type ModifyScoreCommand as aa, type ModifySessionScoreCommand as ab, type SetConsentCommand as ac, type SetQuirkCommand as ad, type SetTestCommand as ae, type IdentifyCommand as af, type SetControlGroupCommand as ag, type SetPersonalizeVariantControlCommand as ah, type ServerToClientTransitionState as ai, SERVER_STATE_ID as aj, type TransitionDataStoreEvents as ak, type DecayOptions as al, type VisitorDataStoreOptions as am, type VisitorDataStoreEvents as an, VisitorDataStore as ao, type Quirks as ap, type Tests as aq, type EnrichmentData as ar, type PersonalizeControlVariant as as, type PersonalizeVariants as at, type EventData as au, emptyVisitorData as av, type ContextState as aw, type ContextStateUpdate as ax, type paths as ay, type TransitionDataStoreOptions as b, type CriteriaEvaluator as c, type StringMatch as d, type VariantMatchCriteria as e, type LogMessage as f, type DevToolsEvents as g, CONTEXTUAL_EDITING_TEST_NAME as h, CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID as i, type ContextOptions as j, type TestEvent as k, type ContextEvents as l, type ContextInstance as m, Context as n, type DevToolsUiVersion as o, type DevToolsState as p, type DevToolsActions as q, type DevToolsEvent as r, type DevToolsLogEvent as s, type DevToolsDataEvent as t, type DevToolsHelloEvent as u, type DevToolsUpdateEvent as v, type DevToolsRawCommandsEvent as w, type DevToolsForgetEvent as x, type LogMessages as y, type Severity as z };
|
@@ -9,9 +9,6 @@ type Tests = {
|
|
9
9
|
type ScoreVector = {
|
10
10
|
[key: string]: number;
|
11
11
|
};
|
12
|
-
type Goals = {
|
13
|
-
[key: string]: boolean;
|
14
|
-
};
|
15
12
|
type EnrichmentData = {
|
16
13
|
/** Enrichment category name */
|
17
14
|
cat: string;
|
@@ -50,10 +47,6 @@ type VisitorData = {
|
|
50
47
|
* NOTE: Context.scores is more commonly correct to read scores instead of this value.
|
51
48
|
*/
|
52
49
|
scores: ScoreVector;
|
53
|
-
/**
|
54
|
-
* Goals that this user has triggered.
|
55
|
-
*/
|
56
|
-
goals?: Goals;
|
57
50
|
/**
|
58
51
|
* Whether consent has been given to store the visitor data
|
59
52
|
* If false or not set: visitor data is stored in memory and is lost if the browser refreshes
|
@@ -91,23 +84,13 @@ type ContextStateUpdate = {
|
|
91
84
|
visitor: VisitorData;
|
92
85
|
scores: ScoreVector;
|
93
86
|
};
|
94
|
-
type GoalStateUpdate = {
|
95
|
-
scores: ScoreVector | undefined;
|
96
|
-
quirks: Quirks | undefined;
|
97
|
-
};
|
98
87
|
|
99
88
|
type StorageCommand<TID extends string = string, TData = unknown> = {
|
100
89
|
type: TID;
|
101
90
|
data: TData;
|
102
91
|
};
|
103
92
|
/** Commands that can be issued to alter the storage of Uniform Context data */
|
104
|
-
type StorageCommands = ModifyScoreCommand | ModifySessionScoreCommand | SetConsentCommand | SetQuirkCommand | SetTestCommand | IdentifyCommand | SetControlGroupCommand | SetPersonalizeVariantControlCommand
|
105
|
-
/**
|
106
|
-
* Converts the goal specified.
|
107
|
-
*/
|
108
|
-
type SetGoalCommand = StorageCommand<'setgoal', {
|
109
|
-
goal: string;
|
110
|
-
}>;
|
93
|
+
type StorageCommands = ModifyScoreCommand | ModifySessionScoreCommand | SetConsentCommand | SetQuirkCommand | SetTestCommand | IdentifyCommand | SetControlGroupCommand | SetPersonalizeVariantControlCommand;
|
111
94
|
/**
|
112
95
|
* Changes the visitor's permanent score for a given dimension
|
113
96
|
*/
|
@@ -303,12 +286,6 @@ type VisitorDataStoreEvents = {
|
|
303
286
|
* Fired when visitor control group membership is changed
|
304
287
|
*/
|
305
288
|
controlGroupUpdated: Pick<VisitorData, 'controlGroup'>;
|
306
|
-
/**
|
307
|
-
* Fired when a goal is converted
|
308
|
-
*/
|
309
|
-
goalConverted: {
|
310
|
-
goalId: string;
|
311
|
-
};
|
312
289
|
};
|
313
290
|
declare class VisitorDataStore {
|
314
291
|
#private;
|
@@ -351,7 +328,6 @@ declare class ManifestInstance {
|
|
351
328
|
rollForControlGroup(): boolean;
|
352
329
|
getTest(name: string): TestDefinition | undefined;
|
353
330
|
computeSignals(update: ContextStateUpdate): StorageCommands[];
|
354
|
-
computeGoals(data: GoalStateUpdate): StorageCommands[];
|
355
331
|
/**
|
356
332
|
* Computes aggregated scores based on other dimensions
|
357
333
|
*/
|
@@ -515,7 +491,6 @@ interface external {
|
|
515
491
|
*/
|
516
492
|
dur: "s" | "p" | "t";
|
517
493
|
crit: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["RootSignalCriteriaGroup"];
|
518
|
-
conversion?: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["Conversion"] | null;
|
519
494
|
};
|
520
495
|
RootSignalCriteriaGroup: {
|
521
496
|
/**
|
@@ -537,13 +512,6 @@ interface external {
|
|
537
512
|
/** @description The criteria clauses that make up this grouping of criteria */
|
538
513
|
clauses: (external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteriaGroup"] | external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteria"])[];
|
539
514
|
};
|
540
|
-
Conversion: {
|
541
|
-
/**
|
542
|
-
* @description The frequency of the conversion event
|
543
|
-
* @enum {string}
|
544
|
-
*/
|
545
|
-
freq: "O";
|
546
|
-
};
|
547
515
|
SignalCriteriaGroup: {
|
548
516
|
/**
|
549
517
|
* @description Criteria type (Group of other criteria)
|
@@ -994,8 +962,6 @@ declare const CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID = "contextual_editing_
|
|
994
962
|
type ContextPlugin = {
|
995
963
|
logDrain?: LogDrain;
|
996
964
|
init?: (context: Context) => () => void;
|
997
|
-
forget?: () => Promise<void> | void;
|
998
|
-
update?: (newData: Partial<ContextState>) => Promise<void> | void;
|
999
965
|
};
|
1000
966
|
type ContextOptions = {
|
1001
967
|
/** The Context Manifest to load (from the Context API) */
|
@@ -1207,4 +1173,4 @@ declare global {
|
|
1207
1173
|
}
|
1208
1174
|
}
|
1209
1175
|
|
1210
|
-
export { type TestOptions as $, type AggregateDimension as A, type MessageFunc as B, type ContextPlugin as C, type DecayFunction as D, type LogMessageSingle as E, type LogMessageGroup as F, ManifestInstance as G, GroupCriteriaEvaluator as H, type CriteriaEvaluatorResult as I, type CriteriaEvaluatorParameters as J, type SignalData as K, type LogDrain as L, type MessageCategory as M, type ManifestV2 as N, type OutputSeverity as O, type PersonalizationEvent as P, type PersonalizationManifest as Q, type Signal as R, type ScoreVector as S, TransitionDataStore as T, type SignalCriteriaGroup as U, type VisitorData as V, type SignalCriteria as W, type EnrichmentCategory as X, type NumberMatch as Y, type TestDefinition as Z, type AggregateDimensionInput as _, type StorageCommands as a, testVariations as a0, type DimensionMatch as a1, type PersonalizeOptions as a2, personalizeVariations as a3, type BehaviorTag as a4, type PersonalizedVariant as a5, type PersonalizedResult as a6, type TestVariant as a7, type TestResult as a8, type StorageCommand as a9, type
|
1176
|
+
export { type TestOptions as $, type AggregateDimension as A, type MessageFunc as B, type ContextPlugin as C, type DecayFunction as D, type LogMessageSingle as E, type LogMessageGroup as F, ManifestInstance as G, GroupCriteriaEvaluator as H, type CriteriaEvaluatorResult as I, type CriteriaEvaluatorParameters as J, type SignalData as K, type LogDrain as L, type MessageCategory as M, type ManifestV2 as N, type OutputSeverity as O, type PersonalizationEvent as P, type PersonalizationManifest as Q, type Signal as R, type ScoreVector as S, TransitionDataStore as T, type SignalCriteriaGroup as U, type VisitorData as V, type SignalCriteria as W, type EnrichmentCategory as X, type NumberMatch as Y, type TestDefinition as Z, type AggregateDimensionInput as _, type StorageCommands as a, testVariations as a0, type DimensionMatch as a1, type PersonalizeOptions as a2, personalizeVariations as a3, type BehaviorTag as a4, type PersonalizedVariant as a5, type PersonalizedResult as a6, type TestVariant as a7, type TestResult as a8, type StorageCommand as a9, type ModifyScoreCommand as aa, type ModifySessionScoreCommand as ab, type SetConsentCommand as ac, type SetQuirkCommand as ad, type SetTestCommand as ae, type IdentifyCommand as af, type SetControlGroupCommand as ag, type SetPersonalizeVariantControlCommand as ah, type ServerToClientTransitionState as ai, SERVER_STATE_ID as aj, type TransitionDataStoreEvents as ak, type DecayOptions as al, type VisitorDataStoreOptions as am, type VisitorDataStoreEvents as an, VisitorDataStore as ao, type Quirks as ap, type Tests as aq, type EnrichmentData as ar, type PersonalizeControlVariant as as, type PersonalizeVariants as at, type EventData as au, emptyVisitorData as av, type ContextState as aw, type ContextStateUpdate as ax, type paths as ay, type TransitionDataStoreOptions as b, type CriteriaEvaluator as c, type StringMatch as d, type VariantMatchCriteria as e, type LogMessage as f, type DevToolsEvents as g, CONTEXTUAL_EDITING_TEST_NAME as h, CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID as i, type ContextOptions as j, type TestEvent as k, type ContextEvents as l, type ContextInstance as m, Context as n, type DevToolsUiVersion as o, type DevToolsState as p, type DevToolsActions as q, type DevToolsEvent as r, type DevToolsLogEvent as s, type DevToolsDataEvent as t, type DevToolsHelloEvent as u, type DevToolsUpdateEvent as v, type DevToolsRawCommandsEvent as w, type DevToolsForgetEvent as x, type LogMessages as y, type Severity as z };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uniformdev/context",
|
3
|
-
"version": "19.146.
|
3
|
+
"version": "19.146.2",
|
4
4
|
"description": "Uniform Context core package",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"main": "./dist/index.js",
|
@@ -51,7 +51,6 @@
|
|
51
51
|
},
|
52
52
|
"devDependencies": {
|
53
53
|
"@types/js-cookie": "3.0.6",
|
54
|
-
"@types/uuid": "9.0.4",
|
55
54
|
"benny": "3.7.1"
|
56
55
|
},
|
57
56
|
"dependencies": {
|
@@ -59,8 +58,7 @@
|
|
59
58
|
"js-cookie": "3.0.5",
|
60
59
|
"mitt": "^3.0.0",
|
61
60
|
"p-limit": "^3.1.0",
|
62
|
-
"rfdc": "^1.3.0"
|
63
|
-
"uuid": "9.0.1"
|
61
|
+
"rfdc": "^1.3.0"
|
64
62
|
},
|
65
63
|
"files": [
|
66
64
|
"/dist"
|
@@ -68,5 +66,5 @@
|
|
68
66
|
"publishConfig": {
|
69
67
|
"access": "public"
|
70
68
|
},
|
71
|
-
"gitHead": "
|
69
|
+
"gitHead": "b50ddfe5e2c16293966e69c78dd1daa70222c52e"
|
72
70
|
}
|