@statsig/statsig-node-core 0.0.6-beta.2 → 0.0.6-beta.3

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.
Files changed (2) hide show
  1. package/index.d.ts +27 -1
  2. package/package.json +9 -9
package/index.d.ts CHANGED
@@ -6,6 +6,10 @@ export declare class DynamicConfig {
6
6
  ruleID: string
7
7
  idType: string
8
8
  get(paramName: string, fallback: any): any
9
+ getRuleId(): string
10
+ getIdType(): string
11
+ getEvaluationDetails(): EvaluationDetails
12
+ getSecondaryExposures(): Array<SecondaryExposure> | null
9
13
  }
10
14
 
11
15
  export declare class Experiment {
@@ -15,19 +19,29 @@ export declare class Experiment {
15
19
  idType: string
16
20
  groupName?: string
17
21
  get(paramName: string, fallback: any): any
22
+ getRuleId(): string
23
+ getIdType(): string
24
+ getGroupName(): string | null
25
+ getEvaluationDetails(): EvaluationDetails
26
+ getSecondaryExposures(): Array<SecondaryExposure> | null
18
27
  }
19
28
 
20
29
  export declare class Layer {
21
30
  name: string
22
31
  ruleID: string
23
32
  groupName?: string
33
+ allocatedExperimentName?: string
24
34
  get(paramName: string, fallback: any): any
35
+ getRuleId(): string
36
+ getGroupName(): string | null
37
+ getEvaluationDetails(): EvaluationDetails
38
+ getSecondaryExposures(): Array<SecondaryExposure> | null
25
39
  }
26
40
 
27
41
  export declare class Statsig {
28
42
  constructor(sdkKey: string, options?: StatsigOptions | undefined | null)
29
43
  initialize(): Promise<StatsigResult>
30
- shutdown(): Promise<StatsigResult>
44
+ shutdown(timeoutMs?: number | undefined | null): Promise<StatsigResult>
31
45
  flushEvents(): Promise<StatsigResult>
32
46
  logEvent(user: StatsigUser, eventName: string, value?: string | number | null, metadata?: Record<string, string> | undefined | null): void
33
47
  checkGate(user: StatsigUser, gateName: string, options?: FeatureGateEvaluationOptions | undefined | null): boolean
@@ -95,6 +109,12 @@ export interface DynamicConfigEvaluationOptions {
95
109
  disableExposureLogging?: boolean
96
110
  }
97
111
 
112
+ export interface EvaluationDetails {
113
+ reason: string
114
+ lcut?: number
115
+ receivedAt?: number
116
+ }
117
+
98
118
  export interface ExperimentEvaluationOptions {
99
119
  disableExposureLogging?: boolean
100
120
  }
@@ -121,6 +141,12 @@ export interface ObservabilityClient {
121
141
  dist?: (metricName: string, value: number, tags: Record<string, string>) => void
122
142
  }
123
143
 
144
+ export interface SecondaryExposure {
145
+ gate: string
146
+ gateValue: string
147
+ ruleId: string
148
+ }
149
+
124
150
  export interface SpecAdapterConfig {
125
151
  adapterType: 'data_store' | 'network_grpc_websocket' | 'network_http'
126
152
  specsUrl?: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statsig/statsig-node-core",
3
- "version": "0.0.6-beta.2",
3
+ "version": "0.0.6-beta.3",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "jest --colors",
@@ -40,13 +40,13 @@
40
40
  ]
41
41
  },
42
42
  "optionalDependencies": {
43
- "@statsig/statsig-node-core-win32-x64-msvc": "0.0.6-beta.2",
44
- "@statsig/statsig-node-core-win32-ia32-msvc": "0.0.6-beta.2",
45
- "@statsig/statsig-node-core-linux-x64-musl": "0.0.6-beta.2",
46
- "@statsig/statsig-node-core-linux-x64-gnu": "0.0.6-beta.2",
47
- "@statsig/statsig-node-core-linux-arm64-musl": "0.0.6-beta.2",
48
- "@statsig/statsig-node-core-linux-arm64-gnu": "0.0.6-beta.2",
49
- "@statsig/statsig-node-core-darwin-x64": "0.0.6-beta.2",
50
- "@statsig/statsig-node-core-darwin-arm64": "0.0.6-beta.2"
43
+ "@statsig/statsig-node-core-win32-x64-msvc": "0.0.6-beta.3",
44
+ "@statsig/statsig-node-core-win32-ia32-msvc": "0.0.6-beta.3",
45
+ "@statsig/statsig-node-core-linux-x64-musl": "0.0.6-beta.3",
46
+ "@statsig/statsig-node-core-linux-x64-gnu": "0.0.6-beta.3",
47
+ "@statsig/statsig-node-core-linux-arm64-musl": "0.0.6-beta.3",
48
+ "@statsig/statsig-node-core-linux-arm64-gnu": "0.0.6-beta.3",
49
+ "@statsig/statsig-node-core-darwin-x64": "0.0.6-beta.3",
50
+ "@statsig/statsig-node-core-darwin-arm64": "0.0.6-beta.3"
51
51
  }
52
52
  }