@statsig/statsig-node-core 0.0.6-beta.2 → 0.0.6-beta.5
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/index.d.ts +41 -1
- package/index.js +1 -0
- 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
|
|
@@ -40,6 +54,11 @@ export declare class Statsig {
|
|
|
40
54
|
manuallyLogDynamicConfigExposure(user: StatsigUser, configName: string): void
|
|
41
55
|
manuallyLogExperimentExposure(user: StatsigUser, experimentName: string): void
|
|
42
56
|
manuallyLogLayerParamExposure(user: StatsigUser, layerName: string, paramName: string): void
|
|
57
|
+
overrideGate(gateName: string, value: boolean, adapter?: OverrideAdapterType | undefined | null): void
|
|
58
|
+
overrideDynamicConfig(configName: string, value: Record<string, any>, adapter?: OverrideAdapterType | undefined | null): void
|
|
59
|
+
overrideExperiment(experimentName: string, value: Record<string, any>, adapter?: OverrideAdapterType | undefined | null): void
|
|
60
|
+
overrideExperimentByGroupName(experimentName: string, groupName: string, adapter?: OverrideAdapterType | undefined | null): void
|
|
61
|
+
overrideLayer(layerName: string, value: Record<string, any>, adapter?: OverrideAdapterType | undefined | null): void
|
|
43
62
|
}
|
|
44
63
|
|
|
45
64
|
export declare class StatsigUser {
|
|
@@ -95,6 +114,12 @@ export interface DynamicConfigEvaluationOptions {
|
|
|
95
114
|
disableExposureLogging?: boolean
|
|
96
115
|
}
|
|
97
116
|
|
|
117
|
+
export interface EvaluationDetails {
|
|
118
|
+
reason: string
|
|
119
|
+
lcut?: number
|
|
120
|
+
receivedAt?: number
|
|
121
|
+
}
|
|
122
|
+
|
|
98
123
|
export interface ExperimentEvaluationOptions {
|
|
99
124
|
disableExposureLogging?: boolean
|
|
100
125
|
}
|
|
@@ -121,6 +146,20 @@ export interface ObservabilityClient {
|
|
|
121
146
|
dist?: (metricName: string, value: number, tags: Record<string, string>) => void
|
|
122
147
|
}
|
|
123
148
|
|
|
149
|
+
export interface OverrideAdapterConfig {
|
|
150
|
+
adapterType: OverrideAdapterType
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export declare const enum OverrideAdapterType {
|
|
154
|
+
LocalOverride = 0
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface SecondaryExposure {
|
|
158
|
+
gate: string
|
|
159
|
+
gateValue: string
|
|
160
|
+
ruleId: string
|
|
161
|
+
}
|
|
162
|
+
|
|
124
163
|
export interface SpecAdapterConfig {
|
|
125
164
|
adapterType: 'data_store' | 'network_grpc_websocket' | 'network_http'
|
|
126
165
|
specsUrl?: string
|
|
@@ -145,6 +184,7 @@ export interface StatsigOptions {
|
|
|
145
184
|
specsUrl?: string
|
|
146
185
|
specsSyncIntervalMs?: number
|
|
147
186
|
serviceName?: string
|
|
187
|
+
overrideAdapterConfig?: Array<OverrideAdapterConfig>
|
|
148
188
|
}
|
|
149
189
|
|
|
150
190
|
export interface StatsigResult {
|
package/index.js
CHANGED
|
@@ -371,3 +371,4 @@ module.exports.Statsig = nativeBinding.Statsig
|
|
|
371
371
|
module.exports.StatsigUser = nativeBinding.StatsigUser
|
|
372
372
|
module.exports.__internal__testDataStore = nativeBinding.__internal__testDataStore
|
|
373
373
|
module.exports.__internal__testObservabilityClient = nativeBinding.__internal__testObservabilityClient
|
|
374
|
+
module.exports.OverrideAdapterType = nativeBinding.OverrideAdapterType
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statsig/statsig-node-core",
|
|
3
|
-
"version": "0.0.6-beta.
|
|
3
|
+
"version": "0.0.6-beta.5",
|
|
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.
|
|
44
|
-
"@statsig/statsig-node-core-win32-ia32-msvc": "0.0.6-beta.
|
|
45
|
-
"@statsig/statsig-node-core-linux-x64-musl": "0.0.6-beta.
|
|
46
|
-
"@statsig/statsig-node-core-linux-x64-gnu": "0.0.6-beta.
|
|
47
|
-
"@statsig/statsig-node-core-linux-arm64-musl": "0.0.6-beta.
|
|
48
|
-
"@statsig/statsig-node-core-linux-arm64-gnu": "0.0.6-beta.
|
|
49
|
-
"@statsig/statsig-node-core-darwin-x64": "0.0.6-beta.
|
|
50
|
-
"@statsig/statsig-node-core-darwin-arm64": "0.0.6-beta.
|
|
43
|
+
"@statsig/statsig-node-core-win32-x64-msvc": "0.0.6-beta.5",
|
|
44
|
+
"@statsig/statsig-node-core-win32-ia32-msvc": "0.0.6-beta.5",
|
|
45
|
+
"@statsig/statsig-node-core-linux-x64-musl": "0.0.6-beta.5",
|
|
46
|
+
"@statsig/statsig-node-core-linux-x64-gnu": "0.0.6-beta.5",
|
|
47
|
+
"@statsig/statsig-node-core-linux-arm64-musl": "0.0.6-beta.5",
|
|
48
|
+
"@statsig/statsig-node-core-linux-arm64-gnu": "0.0.6-beta.5",
|
|
49
|
+
"@statsig/statsig-node-core-darwin-x64": "0.0.6-beta.5",
|
|
50
|
+
"@statsig/statsig-node-core-darwin-arm64": "0.0.6-beta.5"
|
|
51
51
|
}
|
|
52
52
|
}
|