@statsig/statsig-node-core 0.24.0 → 0.24.1-rc.2610302338

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.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Experimental APIs. These may change or be removed without notice.
3
+ * Import from `@statsig/statsig-node-core/experimental` to opt in.
4
+ */
5
+ import { experimental } from './statsig-generated';
6
+ export declare const ForwardProxyUserEnrichmentProvider: typeof experimental.ForwardProxyUserEnrichmentProvider;
7
+ export type ForwardProxyUserEnrichmentProvider = experimental.ForwardProxyUserEnrichmentProvider;
8
+ export declare const StatsigFPUserBuilder: typeof experimental.StatsigFPUserBuilder;
9
+ export type StatsigFPUserBuilder = experimental.StatsigFPUserBuilder;
10
+ export type ForwardProxyEnrichmentOptions = experimental.ForwardProxyEnrichmentOptions;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StatsigFPUserBuilder = exports.ForwardProxyUserEnrichmentProvider = void 0;
4
+ /**
5
+ * Experimental APIs. These may change or be removed without notice.
6
+ * Import from `@statsig/statsig-node-core/experimental` to opt in.
7
+ */
8
+ const statsig_generated_1 = require("./statsig-generated");
9
+ exports.ForwardProxyUserEnrichmentProvider = statsig_generated_1.experimental.ForwardProxyUserEnrichmentProvider;
10
+ exports.StatsigFPUserBuilder = statsig_generated_1.experimental.StatsigFPUserBuilder;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statsig/statsig-node-core",
3
- "version": "0.24.0",
3
+ "version": "0.24.1-rc.2610302338",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "jest --colors"
@@ -55,15 +55,22 @@
55
55
  "minimatch": "10.2.1"
56
56
  }
57
57
  },
58
+ "exports": {
59
+ ".": "./index.js",
60
+ "./experimental": {
61
+ "types": "./experimental.d.ts",
62
+ "default": "./experimental.js"
63
+ },
64
+ "./*": "./*"
65
+ },
58
66
  "optionalDependencies": {
59
- "@statsig/statsig-node-core-linux-x64-musl": "0.24.0",
60
- "@statsig/statsig-node-core-linux-x64-gnu": "0.24.0",
61
- "@statsig/statsig-node-core-win32-x64-msvc": "0.24.0",
62
- "@statsig/statsig-node-core-darwin-x64": "0.24.0",
63
- "@statsig/statsig-node-core-win32-ia32-msvc": "0.24.0",
64
- "@statsig/statsig-node-core-linux-arm64-musl": "0.24.0",
65
- "@statsig/statsig-node-core-linux-arm64-gnu": "0.24.0",
66
- "@statsig/statsig-node-core-win32-arm64-msvc": "0.24.0",
67
- "@statsig/statsig-node-core-darwin-arm64": "0.24.0"
67
+ "@statsig/statsig-node-core-linux-x64-musl": "0.24.1-rc.2610302338",
68
+ "@statsig/statsig-node-core-linux-x64-gnu": "0.24.1-rc.2610302338",
69
+ "@statsig/statsig-node-core-win32-x64-msvc": "0.24.1-rc.2610302338",
70
+ "@statsig/statsig-node-core-darwin-x64": "0.24.1-rc.2610302338",
71
+ "@statsig/statsig-node-core-win32-ia32-msvc": "0.24.1-rc.2610302338",
72
+ "@statsig/statsig-node-core-linux-arm64-musl": "0.24.1-rc.2610302338",
73
+ "@statsig/statsig-node-core-linux-arm64-gnu": "0.24.1-rc.2610302338",
74
+ "@statsig/statsig-node-core-darwin-arm64": "0.24.1-rc.2610302338"
68
75
  }
69
76
  }
@@ -334,6 +334,30 @@ export interface StatsigUserArgs {
334
334
  custom?: Record<string, string | number | boolean | Array<string | number | boolean> | null | undefined | Record<string, unknown>>
335
335
  privateAttributes?: Record<string, string | number | boolean | Array<string | number | boolean> | Record<string, unknown>>
336
336
  }
337
+
338
+ export declare namespace experimental {
339
+ /** **Experimental.** Resolves ID-list memberships through a Statsig forward proxy. */
340
+ export class ForwardProxyUserEnrichmentProvider {
341
+ static create(sdkKey: string, options: ForwardProxyEnrichmentOptions): ForwardProxyUserEnrichmentProvider
342
+ }
343
+ export type ForwardProxyUserEnrichmentProviderNapi = ForwardProxyUserEnrichmentProvider
344
+ /**
345
+ * **Experimental.** Builds a `StatsigUser` whose ID-list memberships were
346
+ * resolved through a forward proxy. `build()` returns a normal `StatsigUser`.
347
+ */
348
+ export class StatsigFPUserBuilder {
349
+ constructor(provider: ForwardProxyUserEnrichmentProvider, args?: StatsigUserArgs | undefined | null)
350
+ build(): Promise<StatsigUser>
351
+ }
352
+ export type StatsigFPUserBuilderNapi = StatsigFPUserBuilder
353
+ /** **Experimental.** Options for `ForwardProxyUserEnrichmentProvider`. */
354
+ export interface ForwardProxyEnrichmentOptions {
355
+ url: string
356
+ timeoutMs?: number
357
+ retries?: number
358
+ proxyConfig?: ProxyConfig
359
+ }
360
+ }
337
361
  // ---- Manually defined typing section -----
338
362
 
339
363
  export type StickyValues = {
@@ -376,3 +376,4 @@ module.exports.__internal__testPersistentStorage = nativeBinding.__internal__tes
376
376
  module.exports.GCIRResponseFormat = nativeBinding.GCIRResponseFormat
377
377
  module.exports.OverrideAdapterType = nativeBinding.OverrideAdapterType
378
378
  module.exports.statsigCaptureLogLine = nativeBinding.statsigCaptureLogLine
379
+ module.exports.experimental = nativeBinding.experimental