@uniformdev/context 19.154.1-alpha.22 → 19.154.1-alpha.26

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.
@@ -158,6 +158,7 @@ type SetPersonalizeVariantControlCommand = StorageCommand<'setpersonalizecontrol
158
158
  index: number;
159
159
  control: boolean;
160
160
  }>;
161
+ declare const areCommandsEqual: (a: StorageCommands, b: StorageCommands) => boolean;
161
162
 
162
163
  type TransitionDataStoreOptions = {
163
164
  initialData?: Partial<VisitorData>;
@@ -169,6 +170,10 @@ type ServerToClientTransitionState = Pick<Partial<VisitorData>, 'quirks' | 'test
169
170
  * recomputation.
170
171
  */
171
172
  ssv?: ScoreVector;
173
+ /**
174
+ * Storage commands that the server
175
+ */
176
+ commands?: StorageCommands[];
172
177
  };
173
178
  declare const SERVER_STATE_ID = "__UNIFORM_DATA__";
174
179
  type TransitionDataStoreEvents = {
@@ -528,7 +533,7 @@ interface external {
528
533
  * & = AND
529
534
  * | = OR
530
535
  *
531
- * Default is `&` if unspecified.
536
+ * Default is `&` if unspecified
532
537
  *
533
538
  * @default &
534
539
  * @enum {string}
@@ -555,7 +560,7 @@ interface external {
555
560
  * & = AND
556
561
  * | = OR
557
562
  *
558
- * Default is `&` if unspecified.
563
+ * Default is `&` if unspecified
559
564
  *
560
565
  * @enum {string}
561
566
  */
@@ -616,7 +621,7 @@ interface external {
616
621
  };
617
622
  /** @description Describes a match expression on a string */
618
623
  StringMatch: {
619
- /** @description The right hand side of the match expression */
624
+ /** @description The right-hand side of the match expression */
620
625
  rhs: string;
621
626
  /**
622
627
  * @description The match operator
@@ -629,7 +634,7 @@ interface external {
629
634
  * @enum {string}
630
635
  */
631
636
  op: "=" | "~" | "//" | "!=" | "!~" | "!//";
632
- /** @description The case sensitivity of the match. Defaults to false if unspecified. */
637
+ /** @description The case sensitivity of the match. Defaults to false if unspecified */
633
638
  cs?: boolean;
634
639
  } | {
635
640
  /**
@@ -643,7 +648,7 @@ interface external {
643
648
  };
644
649
  /** @description Describes a match expression on a number */
645
650
  NumberMatch: {
646
- /** @description The right hand side of the match expression */
651
+ /** @description The right-hand side of the match expression */
647
652
  rhs: number;
648
653
  /**
649
654
  * @description The type of match to perform
@@ -656,7 +661,7 @@ interface external {
656
661
  */
657
662
  op: "=" | "<" | ">" | "!=";
658
663
  };
659
- /** @description Defines an aggregate dimension that is a grouping of other dimensions' scores; an intent or audience. */
664
+ /** @description Defines an aggregate dimension that is a grouping of other dimensions' scores; an intent or audience */
660
665
  AggregateDimension: {
661
666
  /** @description Input dimensions to the aggregate dimension */
662
667
  inputs: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["AggregateDimensionInput"][];
@@ -670,7 +675,7 @@ interface external {
670
675
  *
671
676
  * Note that creating a cycle of aggregate dimensions is allowed, however
672
677
  * the final score will _ignore_ the cycled aggregate dimension in the result.
673
- * This can be used to create mutually exclusive aggregates.
678
+ * This can be used to create mutually exclusive aggregates
674
679
  */
675
680
  dim: string;
676
681
  /**
@@ -678,7 +683,7 @@ interface external {
678
683
  *
679
684
  * '+' = add to the final score
680
685
  * '-' = subtract from the final score
681
- * 'c' = clear the final score (if the input dimension has any score at all, this aggreate will have no score regardless of other inputs)
686
+ * 'c' = clear the final score (if the input dimension has any score at all, this aggregate will have no score regardless of other inputs)
682
687
  *
683
688
  * Default if unspecified: '+'
684
689
  *
@@ -1112,6 +1117,10 @@ declare class Context implements ContextInstance {
1112
1117
  * will NOT result in a recomputation of signal state.
1113
1118
  */
1114
1119
  update(newData: Partial<ContextState>): Promise<void>;
1120
+ processServerCommands({ serverCommands, commands, }: {
1121
+ serverCommands: StorageCommands[] | undefined;
1122
+ commands: StorageCommands[];
1123
+ }): Promise<void>;
1115
1124
  /** use test() instead */
1116
1125
  getTestVariantId(testName: string): string | null | undefined;
1117
1126
  /** use test() instead */
@@ -1207,4 +1216,4 @@ declare global {
1207
1216
  }
1208
1217
  }
1209
1218
 
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 GoalStateUpdate as aA, type paths as aB, type SetGoalCommand as aa, type ModifyScoreCommand as ab, type ModifySessionScoreCommand as ac, type SetConsentCommand as ad, type SetQuirkCommand as ae, type SetTestCommand as af, type IdentifyCommand as ag, type SetControlGroupCommand as ah, type SetPersonalizeVariantControlCommand as ai, type ServerToClientTransitionState as aj, SERVER_STATE_ID as ak, type TransitionDataStoreEvents as al, type DecayOptions as am, type VisitorDataStoreOptions as an, type VisitorDataStoreEvents as ao, VisitorDataStore as ap, type Quirks as aq, type Tests as ar, type Goals as as, type EnrichmentData as at, type PersonalizeControlVariant as au, type PersonalizeVariants as av, type EventData as aw, emptyVisitorData as ax, type ContextState as ay, type ContextStateUpdate as az, 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 };
1219
+ 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 ContextStateUpdate as aA, type GoalStateUpdate as aB, type paths as aC, type SetGoalCommand as aa, type ModifyScoreCommand as ab, type ModifySessionScoreCommand as ac, type SetConsentCommand as ad, type SetQuirkCommand as ae, type SetTestCommand as af, type IdentifyCommand as ag, type SetControlGroupCommand as ah, type SetPersonalizeVariantControlCommand as ai, areCommandsEqual as aj, type ServerToClientTransitionState as ak, SERVER_STATE_ID as al, type TransitionDataStoreEvents as am, type DecayOptions as an, type VisitorDataStoreOptions as ao, type VisitorDataStoreEvents as ap, VisitorDataStore as aq, type Quirks as ar, type Tests as as, type Goals as at, type EnrichmentData as au, type PersonalizeControlVariant as av, type PersonalizeVariants as aw, type EventData as ax, emptyVisitorData as ay, type ContextState as az, 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 };
@@ -158,6 +158,7 @@ type SetPersonalizeVariantControlCommand = StorageCommand<'setpersonalizecontrol
158
158
  index: number;
159
159
  control: boolean;
160
160
  }>;
161
+ declare const areCommandsEqual: (a: StorageCommands, b: StorageCommands) => boolean;
161
162
 
162
163
  type TransitionDataStoreOptions = {
163
164
  initialData?: Partial<VisitorData>;
@@ -169,6 +170,10 @@ type ServerToClientTransitionState = Pick<Partial<VisitorData>, 'quirks' | 'test
169
170
  * recomputation.
170
171
  */
171
172
  ssv?: ScoreVector;
173
+ /**
174
+ * Storage commands that the server
175
+ */
176
+ commands?: StorageCommands[];
172
177
  };
173
178
  declare const SERVER_STATE_ID = "__UNIFORM_DATA__";
174
179
  type TransitionDataStoreEvents = {
@@ -528,7 +533,7 @@ interface external {
528
533
  * & = AND
529
534
  * | = OR
530
535
  *
531
- * Default is `&` if unspecified.
536
+ * Default is `&` if unspecified
532
537
  *
533
538
  * @default &
534
539
  * @enum {string}
@@ -555,7 +560,7 @@ interface external {
555
560
  * & = AND
556
561
  * | = OR
557
562
  *
558
- * Default is `&` if unspecified.
563
+ * Default is `&` if unspecified
559
564
  *
560
565
  * @enum {string}
561
566
  */
@@ -616,7 +621,7 @@ interface external {
616
621
  };
617
622
  /** @description Describes a match expression on a string */
618
623
  StringMatch: {
619
- /** @description The right hand side of the match expression */
624
+ /** @description The right-hand side of the match expression */
620
625
  rhs: string;
621
626
  /**
622
627
  * @description The match operator
@@ -629,7 +634,7 @@ interface external {
629
634
  * @enum {string}
630
635
  */
631
636
  op: "=" | "~" | "//" | "!=" | "!~" | "!//";
632
- /** @description The case sensitivity of the match. Defaults to false if unspecified. */
637
+ /** @description The case sensitivity of the match. Defaults to false if unspecified */
633
638
  cs?: boolean;
634
639
  } | {
635
640
  /**
@@ -643,7 +648,7 @@ interface external {
643
648
  };
644
649
  /** @description Describes a match expression on a number */
645
650
  NumberMatch: {
646
- /** @description The right hand side of the match expression */
651
+ /** @description The right-hand side of the match expression */
647
652
  rhs: number;
648
653
  /**
649
654
  * @description The type of match to perform
@@ -656,7 +661,7 @@ interface external {
656
661
  */
657
662
  op: "=" | "<" | ">" | "!=";
658
663
  };
659
- /** @description Defines an aggregate dimension that is a grouping of other dimensions' scores; an intent or audience. */
664
+ /** @description Defines an aggregate dimension that is a grouping of other dimensions' scores; an intent or audience */
660
665
  AggregateDimension: {
661
666
  /** @description Input dimensions to the aggregate dimension */
662
667
  inputs: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["AggregateDimensionInput"][];
@@ -670,7 +675,7 @@ interface external {
670
675
  *
671
676
  * Note that creating a cycle of aggregate dimensions is allowed, however
672
677
  * the final score will _ignore_ the cycled aggregate dimension in the result.
673
- * This can be used to create mutually exclusive aggregates.
678
+ * This can be used to create mutually exclusive aggregates
674
679
  */
675
680
  dim: string;
676
681
  /**
@@ -678,7 +683,7 @@ interface external {
678
683
  *
679
684
  * '+' = add to the final score
680
685
  * '-' = subtract from the final score
681
- * 'c' = clear the final score (if the input dimension has any score at all, this aggreate will have no score regardless of other inputs)
686
+ * 'c' = clear the final score (if the input dimension has any score at all, this aggregate will have no score regardless of other inputs)
682
687
  *
683
688
  * Default if unspecified: '+'
684
689
  *
@@ -1112,6 +1117,10 @@ declare class Context implements ContextInstance {
1112
1117
  * will NOT result in a recomputation of signal state.
1113
1118
  */
1114
1119
  update(newData: Partial<ContextState>): Promise<void>;
1120
+ processServerCommands({ serverCommands, commands, }: {
1121
+ serverCommands: StorageCommands[] | undefined;
1122
+ commands: StorageCommands[];
1123
+ }): Promise<void>;
1115
1124
  /** use test() instead */
1116
1125
  getTestVariantId(testName: string): string | null | undefined;
1117
1126
  /** use test() instead */
@@ -1207,4 +1216,4 @@ declare global {
1207
1216
  }
1208
1217
  }
1209
1218
 
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 GoalStateUpdate as aA, type paths as aB, type SetGoalCommand as aa, type ModifyScoreCommand as ab, type ModifySessionScoreCommand as ac, type SetConsentCommand as ad, type SetQuirkCommand as ae, type SetTestCommand as af, type IdentifyCommand as ag, type SetControlGroupCommand as ah, type SetPersonalizeVariantControlCommand as ai, type ServerToClientTransitionState as aj, SERVER_STATE_ID as ak, type TransitionDataStoreEvents as al, type DecayOptions as am, type VisitorDataStoreOptions as an, type VisitorDataStoreEvents as ao, VisitorDataStore as ap, type Quirks as aq, type Tests as ar, type Goals as as, type EnrichmentData as at, type PersonalizeControlVariant as au, type PersonalizeVariants as av, type EventData as aw, emptyVisitorData as ax, type ContextState as ay, type ContextStateUpdate as az, 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 };
1219
+ 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 ContextStateUpdate as aA, type GoalStateUpdate as aB, type paths as aC, type SetGoalCommand as aa, type ModifyScoreCommand as ab, type ModifySessionScoreCommand as ac, type SetConsentCommand as ad, type SetQuirkCommand as ae, type SetTestCommand as af, type IdentifyCommand as ag, type SetControlGroupCommand as ah, type SetPersonalizeVariantControlCommand as ai, areCommandsEqual as aj, type ServerToClientTransitionState as ak, SERVER_STATE_ID as al, type TransitionDataStoreEvents as am, type DecayOptions as an, type VisitorDataStoreOptions as ao, type VisitorDataStoreEvents as ap, VisitorDataStore as aq, type Quirks as ar, type Tests as as, type Goals as at, type EnrichmentData as au, type PersonalizeControlVariant as av, type PersonalizeVariants as aw, type EventData as ax, emptyVisitorData as ay, type ContextState as az, 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.154.1-alpha.22+47eb3efd47",
3
+ "version": "19.154.1-alpha.26+791f903a70",
4
4
  "description": "Uniform Context core package",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "47eb3efd47e7582cd4b509a6f5a943dcbb12b0ee"
71
+ "gitHead": "791f903a7000c4e5402004190fad51d8cb2b13d5"
72
72
  }