@statsig/statsig-node-core 0.0.6-beta.7 → 0.0.6-beta.9

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 +9 -4
  2. package/package.json +9 -9
package/index.d.ts CHANGED
@@ -46,9 +46,13 @@ export declare class Statsig {
46
46
  logEvent(user: StatsigUser, eventName: string, value?: string | number | null, metadata?: Record<string, string> | undefined | null): void
47
47
  checkGate(user: StatsigUser, gateName: string, options?: FeatureGateEvaluationOptions | undefined | null): boolean
48
48
  getFeatureGate(user: StatsigUser, featureName: string, options?: FeatureGateEvaluationOptions | undefined | null): FeatureGate
49
+ getFieldsNeededForGate(gateName: string): Array<string>
49
50
  getDynamicConfig(user: StatsigUser, configName: string, options?: DynamicConfigEvaluationOptions | undefined | null): DynamicConfig
51
+ getFieldsNeededForDynamicConfig(configName: string): Array<string>
50
52
  getExperiment(user: StatsigUser, experimentName: string, options?: ExperimentEvaluationOptions | undefined | null): Experiment
53
+ getFieldsNeededForExperiment(experimentName: string): Array<string>
51
54
  getLayer(user: StatsigUser, layerName: string, options?: LayerEvaluationOptions | undefined | null): Layer
55
+ getFieldsNeededForLayer(layerName: string): Array<string>
52
56
  getClientInitializeResponse(user: StatsigUser, options?: ClientInitResponseOptions | undefined | null): string
53
57
  manuallyLogFeatureGateExposure(user: StatsigUser, gateName: string): void
54
58
  manuallyLogDynamicConfigExposure(user: StatsigUser, configName: string): void
@@ -62,9 +66,9 @@ export declare class Statsig {
62
66
  }
63
67
 
64
68
  export declare class StatsigUser {
65
- constructor(args: StatsigUserArgs)
69
+ constructor(args: ({userID: string} | {customIDs: Record<string, string> }) & StatsigUserArgs)
66
70
  static withUserID(userId: string): StatsigUser
67
- static withCustomIDs(customIds: Record<string, any>): StatsigUser
71
+ static withCustomIDs(customIds: Record<string, string>): StatsigUser
68
72
  get customIDs(): Record<string, string> | null
69
73
  set customIDs(value: Record<string, string> | null)
70
74
  get custom(): Record<string, string> | null
@@ -171,6 +175,7 @@ export interface StatsigOptions {
171
175
  disableAllLogging?: boolean
172
176
  enableIdLists?: boolean
173
177
  enableUserAgentParsing?: boolean
178
+ enableCountryLookup?: boolean
174
179
  environment?: string
175
180
  eventLoggingFlushIntervalMs?: number
176
181
  eventLoggingMaxQueueSize?: number
@@ -194,8 +199,8 @@ export interface StatsigResult {
194
199
  }
195
200
 
196
201
  export interface StatsigUserArgs {
197
- userID: string
198
- customIDs: Record<string, string | number | number>
202
+ userID?: string
203
+ customIDs?: Record<string, string>
199
204
  email?: string
200
205
  ip?: string
201
206
  userAgent?: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statsig/statsig-node-core",
3
- "version": "0.0.6-beta.7",
3
+ "version": "0.0.6-beta.9",
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.7",
44
- "@statsig/statsig-node-core-win32-ia32-msvc": "0.0.6-beta.7",
45
- "@statsig/statsig-node-core-linux-x64-musl": "0.0.6-beta.7",
46
- "@statsig/statsig-node-core-linux-x64-gnu": "0.0.6-beta.7",
47
- "@statsig/statsig-node-core-linux-arm64-musl": "0.0.6-beta.7",
48
- "@statsig/statsig-node-core-linux-arm64-gnu": "0.0.6-beta.7",
49
- "@statsig/statsig-node-core-darwin-x64": "0.0.6-beta.7",
50
- "@statsig/statsig-node-core-darwin-arm64": "0.0.6-beta.7"
43
+ "@statsig/statsig-node-core-win32-x64-msvc": "0.0.6-beta.9",
44
+ "@statsig/statsig-node-core-win32-ia32-msvc": "0.0.6-beta.9",
45
+ "@statsig/statsig-node-core-linux-x64-musl": "0.0.6-beta.9",
46
+ "@statsig/statsig-node-core-linux-x64-gnu": "0.0.6-beta.9",
47
+ "@statsig/statsig-node-core-linux-arm64-musl": "0.0.6-beta.9",
48
+ "@statsig/statsig-node-core-linux-arm64-gnu": "0.0.6-beta.9",
49
+ "@statsig/statsig-node-core-darwin-x64": "0.0.6-beta.9",
50
+ "@statsig/statsig-node-core-darwin-arm64": "0.0.6-beta.9"
51
51
  }
52
52
  }