@splitsoftware/splitio-commons 3.0.0-rc.6 → 3.0.0-rc.7

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/package.json +1 -1
  2. package/types/splitio.d.ts +52 -42
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio-commons",
3
- "version": "3.0.0-rc.6",
3
+ "version": "3.0.0-rc.7",
4
4
  "description": "Split JavaScript SDK common components",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -26,7 +26,7 @@ interface ISharedSettings {
26
26
  * List of feature flag filters. These filters are used to fetch a subset of the feature flag definitions in your environment, in order to reduce the delay of the SDK to be ready.
27
27
  *
28
28
  * NOTES:
29
- * - This configuration is only meaningful when the SDK is working in `"standalone"` mode.
29
+ * - This configuration is only meaningful when the SDK is working in `'standalone'` mode.
30
30
  * - If `bySet` filter is provided, `byName` and `byPrefix` filters are ignored.
31
31
  * - If both `byName` and `byPrefix` filters are provided, the intersection of the two groups of feature flags is fetched.
32
32
  *
@@ -2311,64 +2311,73 @@ declare namespace SplitIO {
2311
2311
  */
2312
2312
  interface ConfigsClientSettings {
2313
2313
  /**
2314
- * Your SDK key.
2314
+ * SDK key used to authenticate with Harness services.
2315
2315
  *
2316
2316
  * @see {@link https://developer.harness.io/docs/feature-management-experimentation/management-and-administration/account-settings/api-keys/}
2317
2317
  */
2318
2318
  sdkKey: string;
2319
2319
  /**
2320
- * Polling rate for configs and segments refresh, in seconds. Minimum value: 5.
2321
- *
2322
- * @defaultValue `60`
2323
- */
2324
- pollingRate?: number;
2325
- /**
2326
- * Push rate for events and impressions, in seconds. Minimum value: 60.
2327
- *
2328
- * @defaultValue `60`
2329
- */
2330
- pushRate?: number;
2331
- /**
2332
- * Maximum queue size for events and impressions. When the queue reaches this size, a flush is triggered. Minimum value: 1000.
2333
- *
2334
- * @defaultValue `10000`
2335
- */
2336
- queueSize?: number;
2337
- /**
2338
- * Logging level.
2339
- *
2340
- * @defaultValue `'NONE'`
2341
- */
2342
- logLevel?: LogLevel;
2343
- /**
2344
- * Time in seconds before emitting the `SDK_READY_TIMED_OUT` event.
2345
- * A value of `-1` disables the timeout and thus the event is never emitted.
2346
- *
2347
- * @defaultValue `10`
2320
+ * Log level for SDK logging.
2321
+ * - `'none'`: No logging
2322
+ * - `'error'`: Log errors only
2323
+ * - `'warn'`: Log warnings and errors
2324
+ * - `'info'`: Log info, warnings, and errors
2325
+ * - `'debug'`: Log debug info and above
2326
+ * @defaultValue `'none'`
2348
2327
  */
2349
- readyTimeout?: number;
2328
+ logLevel?: 'none' | 'error' | 'warn' | 'info' | 'debug';
2350
2329
  /**
2351
- * Custom endpoints to replace the default ones used by the SDK.
2330
+ * Synchronization configuration.
2352
2331
  */
2353
- urls?: {
2332
+ sync?: {
2354
2333
  /**
2355
- * String property to override the base URL where the SDK will get JWT authentication credentials.
2334
+ * Polling rate for configs and segments refresh, in seconds. Minimum value: 5.
2356
2335
  *
2357
- * @defaultValue `'https://auth.split.io'`
2336
+ * @defaultValue `60`
2358
2337
  */
2359
- auth?: string;
2338
+ pollingRate?: number;
2360
2339
  /**
2361
- * String property to override the base URL where the SDK will get rollout plan related data, like configs and segments definitions.
2340
+ * Push rate for events and impressions, in seconds. Minimum value: 60.
2362
2341
  *
2363
- * @defaultValue `'https://configs.split.io'`
2342
+ * @defaultValue `60`
2364
2343
  */
2365
- configs?: string;
2344
+ pushRate?: number;
2366
2345
  /**
2367
- * String property to override the base URL where the SDK will post event-related information like impressions.
2346
+ * Maximum queue size for events and impressions. When the queue reaches this size, a flush is triggered. Minimum value: 1000.
2347
+ *
2348
+ * @defaultValue `10000`
2349
+ */
2350
+ queueSize?: number;
2351
+ /**
2352
+ * Time in seconds before emitting the `SDK_READY_TIMED_OUT` event.
2353
+ * A value of `-1` disables the timeout and thus the event is never emitted.
2368
2354
  *
2369
- * @defaultValue `'https://events.split.io'`
2355
+ * @defaultValue `10`
2370
2356
  */
2371
- events?: string;
2357
+ readyTimeout?: number;
2358
+ /**
2359
+ * Base URLs used by the SDK for different services.
2360
+ */
2361
+ serviceEndpoints?: {
2362
+ /**
2363
+ * String property to override the base URL where the SDK will get JWT authentication credentials.
2364
+ *
2365
+ * @defaultValue `'https://auth.split.io'`
2366
+ */
2367
+ auth?: string;
2368
+ /**
2369
+ * String property to override the base URL where the SDK will get rollout plan related data, like configs and segments definitions.
2370
+ *
2371
+ * @defaultValue `'https://configs.split.io'`
2372
+ */
2373
+ configs?: string;
2374
+ /**
2375
+ * String property to override the base URL where the SDK will post event-related information like impressions.
2376
+ *
2377
+ * @defaultValue `'https://events.split.io'`
2378
+ */
2379
+ events?: string;
2380
+ };
2372
2381
  };
2373
2382
  /**
2374
2383
  * Fallback configuration objects returned by the `client.getConfig` method when the SDK is not ready or the provided config name is not found.
@@ -2385,6 +2394,7 @@ declare namespace SplitIO {
2385
2394
  * You can use it, for example, for certificate pinning or setting a network proxy:
2386
2395
  *
2387
2396
  * ```
2397
+ * const { ConfigsClient } = require('@splitsoftware/splitio-configs');
2388
2398
  * const { HttpsProxyAgent } = require('https-proxy-agent');
2389
2399
  *
2390
2400
  * const proxyAgent = new HttpsProxyAgent(process.env.HTTPS_PROXY || 'http://10.10.1.10:1080');