@statsig/client-core 3.16.2 → 3.17.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statsig/client-core",
3
- "version": "3.16.2",
3
+ "version": "3.17.1",
4
4
  "license": "ISC",
5
5
  "homepage": "https://github.com/statsig-io/js-client-monorepo",
6
6
  "repository": {
@@ -5,6 +5,7 @@ export type StatsigGlobal = {
5
5
  firstInstance?: StatsigClientInterface;
6
6
  acInstances?: Record<string, unknown>;
7
7
  srInstances?: Record<string, unknown>;
8
+ firstSRInstance?: unknown;
8
9
  instance: (sdkKey?: string) => StatsigClientInterface | undefined;
9
10
  };
10
11
  declare global {
@@ -3,6 +3,7 @@ import { ParamStoreConfig } from './ParamStoreTypes';
3
3
  import { StatsigUser } from './StatsigUser';
4
4
  type SessionReplayFields = {
5
5
  can_record_session?: boolean;
6
+ recording_blocked?: boolean;
6
7
  session_recording_rate?: number;
7
8
  passes_session_recording_targeting?: boolean;
8
9
  session_recording_event_triggers?: Record<string, SessionReplayTrigger>;
@@ -10,6 +11,7 @@ type SessionReplayFields = {
10
11
  };
11
12
  type SessionReplayTrigger = {
12
13
  values?: string[];
14
+ passes_sampling?: boolean;
13
15
  };
14
16
  type AutoCaptureFields = {
15
17
  auto_capture_settings?: {
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "3.16.2";
1
+ export declare const SDK_VERSION = "3.17.1";
2
2
  export type StatsigMetadata = {
3
3
  readonly [key: string]: string | undefined | null;
4
4
  readonly appVersion?: string;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StatsigMetadataProvider = exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = '3.16.2';
4
+ exports.SDK_VERSION = '3.17.1';
5
5
  let metadata = {
6
6
  sdkVersion: exports.SDK_VERSION,
7
7
  sdkType: 'js-mono', // js-mono is overwritten by Precomp and OnDevice clients
@@ -3,19 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports._makeTypedGet = exports._mergeOverride = exports._makeLayer = exports._makeExperiment = exports._makeDynamicConfig = exports._makeFeatureGate = void 0;
4
4
  const Log_1 = require("./Log");
5
5
  const TypingUtils_1 = require("./TypingUtils");
6
- const DEFAULT_RULE = 'default';
7
6
  function _makeEvaluation(name, details, evaluation, value) {
8
7
  var _a;
9
8
  return {
10
9
  name,
11
10
  details,
12
- ruleID: (_a = evaluation === null || evaluation === void 0 ? void 0 : evaluation.rule_id) !== null && _a !== void 0 ? _a : DEFAULT_RULE,
11
+ ruleID: (_a = evaluation === null || evaluation === void 0 ? void 0 : evaluation.rule_id) !== null && _a !== void 0 ? _a : '',
13
12
  __evaluation: evaluation,
14
13
  value,
15
14
  };
16
15
  }
17
16
  function _makeFeatureGate(name, details, evaluation) {
18
- return _makeEvaluation(name, details, evaluation, (evaluation === null || evaluation === void 0 ? void 0 : evaluation.value) === true);
17
+ var _a;
18
+ return Object.assign(Object.assign({}, _makeEvaluation(name, details, evaluation, (evaluation === null || evaluation === void 0 ? void 0 : evaluation.value) === true)), { idType: (_a = evaluation === null || evaluation === void 0 ? void 0 : evaluation.id_type) !== null && _a !== void 0 ? _a : null });
19
19
  }
20
20
  exports._makeFeatureGate = _makeFeatureGate;
21
21
  function _makeDynamicConfig(name, details, evaluation) {
@@ -10,6 +10,7 @@ export type FeatureGate = Flatten<{
10
10
  readonly ruleID: string;
11
11
  readonly details: EvaluationDetails;
12
12
  readonly value: boolean;
13
+ readonly idType: string | null;
13
14
  readonly __evaluation: GateEvaluation | null;
14
15
  }>;
15
16
  export type Experiment = Flatten<{