@splitsoftware/splitio-browserjs 0.9.4-rc.0 → 0.9.5-rc.0

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/CHANGES.txt CHANGED
@@ -1,5 +1,12 @@
1
- 0.9.4 (April 26, 2023)
2
- - Bugfixing - Updated `unfetch` package as a runtime dependency, required when using the full entrypoint (`import { SplitFactory } from '@splitsoftware/splitio-browserjs/full'`).
1
+ 0.9.5 (May 15, 2023)
2
+ - Updated @splitsoftware/splitio-commons package to version 1.8.2 that includes minor improvements.
3
+ - Updated terminology on the SDKs codebase to be more aligned with current standard without causing a breaking change. The core change is the term split for feature flag on things like logs and IntelliSense comments.
4
+ - Updated split storage modules to optimize some operations when using Redis and pluggable storages.
5
+ - Updated some transitive dependencies for vulnerability fixes.
6
+
7
+ 0.9.4 (May 4, 2023)
8
+ - Updated some transitive dependencies for vulnerability fixes.
9
+ - Bugfixing - Updated `unfetch` package as a runtime dependency, required when using the "full" entrypoint (`import { SplitFactory } from '@splitsoftware/splitio-browserjs/full'`).
3
10
 
4
11
  0.9.3 (March 20, 2023)
5
12
  - Updated @splitsoftware/splitio-commons package to version 1.8.1 that includes minor improvements.
@@ -15,7 +22,7 @@
15
22
  0.9.0 (October 5, 2022)
16
23
  - Added a new impressions mode for the SDK called NONE, to be used in factory when there is no desire to capture impressions on an SDK factory to feed Split's analytics engine. Running NONE mode, the SDK will only capture unique keys evaluated for a particular feature flag instead of full blown impressions.
17
24
  - Updated default value of `scheduler.featuresRefreshRate` config parameter from 30 seconds to 60 seconds.
18
- - Updated @splitsoftware/splitio-commons package to version 1.7.1, that improves the performance of split evaluations (i.e., `getTreatment(s)` method calls) when using the default storage in memory, among other improvements.
25
+ - Updated @splitsoftware/splitio-commons package to version 1.7.1, that improves the performance of feature flag evaluations (i.e., `getTreatment(s)` method calls) when using the default storage in memory, among other improvements.
19
26
 
20
27
  0.8.0 (July 22, 2022)
21
28
  - Added `autoRequire` configuration option to the Google Analytics to Split integration, which takes care of requiring the splitTracker plugin on trackers dynamically created by Google tag managers (See https://help.split.io/hc/en-us/articles/360040838752#set-up-with-gtm-and-gtag.js).
@@ -24,7 +31,7 @@
24
31
  - Updated some dependencies for vulnerability fixes.
25
32
 
26
33
  0.7.0 (June 29, 2022)
27
- - Added a new config option to control the tasks that listen or poll for updates on feature flags and segments, via the new config sync.enabled . Running online Split will always pull the most recent updates upon initialization, this only affects updates fetching on a running instance. Useful when a consistent session experience is a must or to save resources when updates are not being used.
34
+ - Added a new config option to control the tasks that listen or poll for updates on feature flags and segments, via the new config sync.enabled . Running online, Split will always pull the most recent updates upon initialization, this only affects updates fetching on a running instance. Useful when a consistent session experience is a must or to save resources when updates are not being used.
28
35
  - Updated telemetry logic to track the anonymous config for user consent flag set to declined or unknown.
29
36
  - Updated submitters logic, to avoid duplicating the post of impressions to Split cloud when the SDK is destroyed while its periodic post of impressions is running.
30
37
  - Bugfixing - Updated submitters logic, to avoid dropping impressions and events that are being tracked while POST request is pending.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![npm version](https://badge.fury.io/js/%40splitsoftware%2Fsplitio-browserjs.svg)](https://badge.fury.io/js/%40splitsoftware%2Fsplitio-browserjs) [![Build Status](https://github.com/splitio/javascript-browser-client/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/splitio/javascript-browser-client/actions/workflows/ci-cd.yml)
4
4
 
5
5
  ## Overview
6
- This SDK is designed to work with Split, the platform for controlled rollouts, which serves features to your users via a Split feature flag to manage your complete customer experience.
6
+ This SDK is designed to work with Split, the platform for controlled rollouts, which serves features to your users via feature flags to manage your complete customer experience.
7
7
 
8
8
  [![Twitter Follow](https://img.shields.io/twitter/follow/splitsoftware.svg?style=social&label=Follow&maxAge=1529000)](https://twitter.com/intent/follow?screen_name=splitsoftware)
9
9
 
@@ -21,7 +21,7 @@ import { SplitFactory } from '@splitsoftware/splitio-browserjs';
21
21
  // Instantiate the SDK
22
22
  var factory = SplitFactory({
23
23
  core: {
24
- authorizationKey: 'YOUR_SDK_API_KEY',
24
+ authorizationKey: 'YOUR_SDK_KEY',
25
25
  key: 'CUSTOMER_ID'
26
26
  }
27
27
  });
@@ -31,7 +31,7 @@ var client = factory.client();
31
31
 
32
32
  // Set a callback to listen for the SDK_READY event, to make sure the SDK is properly loaded before asking for a treatment
33
33
  client.on(client.Event.SDK_READY, function() {
34
- var treatment = client.getTreatment('SPLIT_NAME');
34
+ var treatment = client.getTreatment('FEATURE_FLAG_NAME');
35
35
  if (treatment == 'on') {
36
36
  // insert code here for on treatment
37
37
  } else if (treatment == 'off') {
package/cjs/index.js CHANGED
@@ -1,19 +1,4 @@
1
1
  "use strict";
2
- /**
3
- Copyright 2022 Split Software
4
-
5
- Licensed under the Apache License, Version 2.0 (the "License");
6
- you may not use this file except in compliance with the License.
7
- You may obtain a copy of the License at
8
-
9
- http://www.apache.org/licenses/LICENSE-2.0
10
-
11
- Unless required by applicable law or agreed to in writing, software
12
- distributed under the License is distributed on an "AS IS" BASIS,
13
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- See the License for the specific language governing permissions and
15
- limitations under the License.
16
- **/
17
2
  Object.defineProperty(exports, "__esModule", { value: true });
18
3
  exports.PluggableStorage = exports.LocalhostFromObject = exports.DebugLogger = exports.InfoLogger = exports.WarnLogger = exports.ErrorLogger = exports.SplitToGoogleAnalytics = exports.GoogleAnalyticsToSplit = exports.InLocalStorage = exports.SplitFactory = void 0;
19
4
  var splitFactory_1 = require("./splitFactory");
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaults = void 0;
4
4
  var index_1 = require("@splitsoftware/splitio-commons/cjs/logger/index");
5
5
  var constants_1 = require("@splitsoftware/splitio-commons/cjs/utils/constants");
6
- var packageVersion = '0.9.4-rc.0';
6
+ var packageVersion = '0.9.5-rc.0';
7
7
  /**
8
8
  * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
9
9
  * Acceptable values are: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'NONE'.
package/esm/index.js CHANGED
@@ -1,18 +1,3 @@
1
- /**
2
- Copyright 2022 Split Software
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- **/
16
1
  export { SplitFactory } from './splitFactory';
17
2
  export { InLocalStorage } from '@splitsoftware/splitio-commons/esm/storages/inLocalStorage/index';
18
3
  export { GoogleAnalyticsToSplit } from '@splitsoftware/splitio-commons/esm/integrations/ga/GoogleAnalyticsToSplit';
@@ -1,6 +1,6 @@
1
1
  import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/esm/logger/index';
2
2
  import { CONSENT_GRANTED } from '@splitsoftware/splitio-commons/esm/utils/constants';
3
- var packageVersion = '0.9.4-rc.0';
3
+ var packageVersion = '0.9.5-rc.0';
4
4
  /**
5
5
  * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
6
6
  * Acceptable values are: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'NONE'.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splitsoftware/splitio-browserjs",
3
- "version": "0.9.4-rc.0",
3
+ "version": "0.9.5-rc.0",
4
4
  "description": "Split SDK for JavaScript on Browser",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -64,7 +64,7 @@
64
64
  "bugs": "https://github.com/splitio/javascript-browser-client/issues",
65
65
  "homepage": "https://github.com/splitio/javascript-browser-client#readme",
66
66
  "dependencies": {
67
- "@splitsoftware/splitio-commons": "1.8.1",
67
+ "@splitsoftware/splitio-commons": "1.8.2-rc.2",
68
68
  "@types/google.analytics": "0.0.40",
69
69
  "unfetch": "^4.2.0"
70
70
  },
package/src/index.ts CHANGED
@@ -1,19 +1,3 @@
1
- /**
2
- Copyright 2022 Split Software
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- **/
16
-
17
1
  export { SplitFactory } from './splitFactory';
18
2
  export { InLocalStorage } from '@splitsoftware/splitio-commons/src/storages/inLocalStorage/index';
19
3
  export { GoogleAnalyticsToSplit } from '@splitsoftware/splitio-commons/src/integrations/ga/GoogleAnalyticsToSplit';
@@ -2,7 +2,7 @@ import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/src/
2
2
  import { ConsentStatus, LogLevel } from '@splitsoftware/splitio-commons/src/types';
3
3
  import { CONSENT_GRANTED } from '@splitsoftware/splitio-commons/src/utils/constants';
4
4
 
5
- const packageVersion = '0.9.4-rc.0';
5
+ const packageVersion = '0.9.5-rc.0';
6
6
 
7
7
  /**
8
8
  * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
@@ -202,25 +202,24 @@ interface ISharedSettings {
202
202
  */
203
203
  sync?: {
204
204
  /**
205
- * List of Split filters. These filters are used to fetch a subset of the Splits definitions in your environment, in order to reduce the delay of the SDK to be ready.
205
+ * 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.
206
206
  * This configuration is only meaningful when the SDK is working in "standalone" mode.
207
207
  *
208
- * At the moment, two types of split filters are supported: by name and by prefix.
208
+ * At the moment, only one type of feature flag filter is supported: by name.
209
209
  *
210
210
  * Example:
211
211
  * `splitFilter: [
212
- * { type: 'byName', values: ['my_split_1', 'my_split_2'] }, // will fetch splits named 'my_split_1' and 'my_split_2'
213
- * { type: 'byPrefix', values: ['testing'] } // will fetch splits whose names start with 'testing__' prefix
212
+ * { type: 'byName', values: ['my_feature_flag_1', 'my_feature_flag_2'] }, // will fetch feature flags named 'my_feature_flag_1' and 'my_feature_flag_2'
214
213
  * ]`
215
214
  * @property {SplitIO.SplitFilter[]} splitFilters
216
215
  */
217
216
  splitFilters?: SplitIO.SplitFilter[]
218
217
  /**
219
- * Impressions Collection Mode. Option to determine how impressions are going to be sent to Split Servers.
218
+ * Impressions Collection Mode. Option to determine how impressions are going to be sent to Split servers.
220
219
  * Possible values are 'DEBUG', 'OPTIMIZED', and 'NONE'.
221
220
  * - DEBUG: will send all the impressions generated (recommended only for debugging purposes).
222
- * - OPTIMIZED: will send unique impressions to Split Servers, avoiding a considerable amount of traffic that duplicated impressions could generate.
223
- * - NONE: will send unique keys evaluated per feature to Split Servers instead of full blown impressions, avoiding a considerable amount of traffic that impressions could generate.
221
+ * - OPTIMIZED: will send unique impressions to Split servers, avoiding a considerable amount of traffic that duplicated impressions could generate.
222
+ * - NONE: will send unique keys evaluated per feature to Split servers instead of full blown impressions, avoiding a considerable amount of traffic that impressions could generate.
224
223
  *
225
224
  * @property {String} impressionsMode
226
225
  * @default 'OPTIMIZED'
@@ -269,7 +268,7 @@ interface IStatusInterface extends IEventEmitter {
269
268
  */
270
269
  Event: EventConsts,
271
270
  /**
272
- * Returns a promise that will be resolved once the SDK has finished loading (SDK_READY event emitted) or rejected if the SDK has timedout (SDK_READY_TIMED_OUT event emitted).
271
+ * Returns a promise that resolves once the SDK has finished loading (SDK_READY event emitted) or rejected if the SDK has timedout (SDK_READY_TIMED_OUT event emitted).
273
272
  * As it's meant to provide similar flexibility to the event approach, given that the SDK might be eventually ready after a timeout event, calling the `ready` method after the
274
273
  * SDK had timed out will return a new promise that should eventually resolve if the SDK gets ready.
275
274
  *
@@ -303,7 +302,7 @@ interface IBasicClient extends IStatusInterface {
303
302
  * In 'consumer' and 'partial consumer' modes, this method also disconnects the SDK from the Pluggable storage.
304
303
  *
305
304
  * @function destroy
306
- * @returns {Promise<void>} A promise that will be resolved once the client is destroyed.
305
+ * @returns {Promise<void>} A promise that resolves once the client is destroyed.
307
306
  */
308
307
  destroy(): Promise<void>
309
308
  }
@@ -336,17 +335,17 @@ interface IBasicSDK {
336
335
  */
337
336
  declare namespace SplitIO {
338
337
  /**
339
- * Split treatment value, returned by getTreatment.
338
+ * Feature flag treatment value, returned by getTreatment.
340
339
  * @typedef {string} Treatment
341
340
  */
342
341
  type Treatment = string;
343
342
  /**
344
- * Split treatment promise that will resolve to actual treatment value.
343
+ * Feature flag treatment promise that resolves to actual treatment value.
345
344
  * @typedef {Promise<string>} AsyncTreatment
346
345
  */
347
346
  type AsyncTreatment = Promise<string>;
348
347
  /**
349
- * An object with the treatments for a bulk of splits, returned by getTreatments. For example:
348
+ * An object with the treatments for a bulk of feature flags, returned by getTreatments. For example:
350
349
  * {
351
350
  * feature1: 'on',
352
351
  * feature2: 'off
@@ -357,14 +356,14 @@ declare namespace SplitIO {
357
356
  [featureName: string]: Treatment
358
357
  };
359
358
  /**
360
- * Split treatments promise that will resolve to the actual SplitIO.Treatments object.
359
+ * Feature flags treatments promise that resolves to the actual SplitIO.Treatments object.
361
360
  * @typedef {Promise<Treatments>} AsyncTreatments
362
361
  */
363
362
  type AsyncTreatments = Promise<Treatments>;
364
363
  /**
365
- * Split evaluation result with treatment and configuration, returned by getTreatmentWithConfig.
364
+ * Feature flag evaluation result with treatment and configuration, returned by getTreatmentWithConfig.
366
365
  * @typedef {Object} TreatmentWithConfig
367
- * @property {string} treatment The treatment result
366
+ * @property {string} treatment The treatment string
368
367
  * @property {string | null} config The stringified version of the JSON config defined for that treatment, null if there is no config for the resulting treatment.
369
368
  */
370
369
  type TreatmentWithConfig = {
@@ -372,13 +371,13 @@ declare namespace SplitIO {
372
371
  config: string | null
373
372
  };
374
373
  /**
375
- * Split treatment promise that will resolve to actual treatment with config value.
374
+ * Feature flag treatment promise that resolves to actual treatment with config value.
376
375
  * @typedef {Promise<TreatmentWithConfig>} AsyncTreatmentWithConfig
377
376
  */
378
377
  type AsyncTreatmentWithConfig = Promise<TreatmentWithConfig>;
379
378
  /**
380
- * An object with the treatments with configs for a bulk of splits, returned by getTreatmentsWithConfig.
381
- * Each existing configuration is a stringified version of the JSON you defined on the Split web console. For example:
379
+ * An object with the treatments with configs for a bulk of feature flags, returned by getTreatmentsWithConfig.
380
+ * Each existing configuration is a stringified version of the JSON you defined on the Split user interface. For example:
382
381
  * {
383
382
  * feature1: { treatment: 'on', config: null }
384
383
  * feature2: { treatment: 'off', config: '{"bannerText":"Click here."}' }
@@ -389,7 +388,7 @@ declare namespace SplitIO {
389
388
  [featureName: string]: TreatmentWithConfig
390
389
  };
391
390
  /**
392
- * Split treatments promise that will resolve to the actual SplitIO.TreatmentsWithConfig object.
391
+ * Feature flags treatments promise that resolves to the actual SplitIO.TreatmentsWithConfig object.
393
392
  * @typedef {Promise<TreatmentsWithConfig>} AsyncTreatmentsWithConfig
394
393
  */
395
394
  type AsyncTreatmentsWithConfig = Promise<TreatmentsWithConfig>;
@@ -399,7 +398,7 @@ declare namespace SplitIO {
399
398
  */
400
399
  type Event = 'init::timeout' | 'init::ready' | 'init::cache-ready' | 'state::update';
401
400
  /**
402
- * Split attributes should be on object with values of type string or number (dates should be sent as millis since epoch).
401
+ * Attributes should be on object with values of type string or number (dates should be sent as millis since epoch).
403
402
  * @typedef {Object.<AttributeType>} Attributes
404
403
  * @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#attribute-syntax}
405
404
  */
@@ -412,7 +411,7 @@ declare namespace SplitIO {
412
411
  */
413
412
  type AttributeType = string | number | boolean | Array<string | number>;
414
413
  /**
415
- * Split properties should be an object with values of type string, number, boolean or null. Size limit of ~31kb.
414
+ * Properties should be an object with values of type string, number, boolean or null. Size limit of ~31kb.
416
415
  * @typedef {Object.<number, string, boolean, null>} Attributes
417
416
  * @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#track
418
417
  */
@@ -463,38 +462,38 @@ declare namespace SplitIO {
463
462
  sdkLanguageVersion: string
464
463
  };
465
464
  /**
466
- * Data corresponding to one Split view.
465
+ * Data corresponding to one feature flag view.
467
466
  * @typedef {Object} SplitView
468
467
  */
469
468
  type SplitView = {
470
469
  /**
471
- * The name of the split.
470
+ * The name of the feature flag.
472
471
  * @property {string} name
473
472
  */
474
473
  name: string,
475
474
  /**
476
- * The traffic type of the split.
475
+ * The traffic type of the feature flag.
477
476
  * @property {string} trafficType
478
477
  */
479
478
  trafficType: string,
480
479
  /**
481
- * Whether the split is killed or not.
480
+ * Whether the feature flag is killed or not.
482
481
  * @property {boolean} killed
483
482
  */
484
483
  killed: boolean,
485
484
  /**
486
- * The list of treatments available for the split.
485
+ * The list of treatments available for the feature flag.
487
486
  * @property {Array<string>} treatments
488
487
  */
489
488
  treatments: Array<string>,
490
489
  /**
491
- * Current change number of the split.
490
+ * Current change number of the feature flag.
492
491
  * @property {number} changeNumber
493
492
  */
494
493
  changeNumber: number,
495
494
  /**
496
495
  * Map of configurations per treatment.
497
- * Each existing configuration is a stringified version of the JSON you defined on the Split web console.
496
+ * Each existing configuration is a stringified version of the JSON you defined on the Split user interface.
498
497
  * @property {Object.<string>} configs
499
498
  */
500
499
  configs: {
@@ -502,7 +501,7 @@ declare namespace SplitIO {
502
501
  }
503
502
  };
504
503
  /**
505
- * A promise that will be resolved with that SplitView.
504
+ * A promise that resolves to a feature flag view.
506
505
  * @typedef {Promise<SplitView>} SplitView
507
506
  */
508
507
  type SplitViewAsync = Promise<SplitView>;
@@ -511,17 +510,17 @@ declare namespace SplitIO {
511
510
  */
512
511
  type SplitViews = Array<SplitView>;
513
512
  /**
514
- * A promise that will be resolved with an SplitIO.SplitViews array.
513
+ * A promise that resolves to an SplitIO.SplitViews array.
515
514
  * @typedef {Promise<SplitViews>} SplitViewsAsync
516
515
  */
517
516
  type SplitViewsAsync = Promise<SplitViews>;
518
517
  /**
519
- * An array of split names.
518
+ * An array of feature flag names.
520
519
  * @typedef {Array<string>} SplitNames
521
520
  */
522
521
  type SplitNames = Array<string>;
523
522
  /**
524
- * A promise that will be resolved with an array of split names.
523
+ * A promise that resolves to an array of feature flag names.
525
524
  * @typedef {Promise<SplitNames>} SplitNamesAsync
526
525
  */
527
526
  type SplitNamesAsync = Promise<SplitNames>;
@@ -761,7 +760,7 @@ declare namespace SplitIO {
761
760
  */
762
761
  type UrlSettings = {
763
762
  /**
764
- * String property to override the base URL where the SDK will get feature flagging related data like a Split rollout plan or segments information.
763
+ * String property to override the base URL where the SDK will get rollout plan related data, like feature flags and segments definitions.
765
764
  * @property {string} sdk
766
765
  * @default 'https://sdk.split.io/api'
767
766
  */
@@ -794,20 +793,23 @@ declare namespace SplitIO {
794
793
 
795
794
  /**
796
795
  * SplitFilter type.
796
+ *
797
797
  * @typedef {string} SplitFilterType
798
798
  */
799
799
  type SplitFilterType = 'byName' | 'byPrefix';
800
800
  /**
801
- * Defines a split filter, described by a type and list of values.
801
+ * Defines a feature flag filter, described by a type and list of values.
802
802
  */
803
803
  interface SplitFilter {
804
804
  /**
805
805
  * Type of the filter.
806
+ *
806
807
  * @property {SplitFilterType} type
807
808
  */
808
809
  type: SplitFilterType,
809
810
  /**
810
- * List of values: split names for 'byName' filter type, and split prefixes for 'byPrefix' type.
811
+ * List of values: feature flag names for 'byName' filter type, and feature flag name prefixes for 'byPrefix' type.
812
+ *
811
813
  * @property {string[]} values
812
814
  */
813
815
  values: string[],
@@ -842,7 +844,7 @@ declare namespace SplitIO {
842
844
  */
843
845
  core: {
844
846
  /**
845
- * Your API key. More information: @see {@link https://help.split.io/hc/en-us/articles/360019916211-API-keys}
847
+ * Your SDK key. More information: @see {@link https://help.split.io/hc/en-us/articles/360019916211-API-keys}
846
848
  * @property {string} authorizationKey
847
849
  */
848
850
  authorizationKey: string,
@@ -960,7 +962,7 @@ declare namespace SplitIO {
960
962
  */
961
963
  scheduler?: {
962
964
  /**
963
- * The SDK polls Split servers for changes to feature roll-out plans. This parameter controls this polling period in seconds.
965
+ * The SDK polls Split servers for changes to feature flag definitions. This parameter controls this polling period in seconds.
964
966
  * @property {number} featuresRefreshRate
965
967
  * @default 60
966
968
  */
@@ -1178,41 +1180,41 @@ declare namespace SplitIO {
1178
1180
  * Returns a Treatment value, which is the treatment string for the given feature.
1179
1181
  * @function getTreatment
1180
1182
  * @param {string} key - The string key representing the consumer.
1181
- * @param {string} splitName - The string that represents the split we wan't to get the treatment.
1183
+ * @param {string} featureFlagName - The string that represents the feature flag we want to get the treatment.
1182
1184
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1183
1185
  * @returns {Treatment} The treatment string.
1184
1186
  */
1185
- getTreatment(key: SplitKey, splitName: string, attributes?: Attributes): Treatment,
1187
+ getTreatment(key: SplitKey, featureFlagName: string, attributes?: Attributes): Treatment,
1186
1188
  /**
1187
1189
  * Returns a TreatmentWithConfig value, which is an object with both treatment and config string for the given feature.
1188
1190
  * @function getTreatmentWithConfig
1189
1191
  * @param {string} key - The string key representing the consumer.
1190
- * @param {string} splitName - The string that represents the split we wan't to get the treatment.
1192
+ * @param {string} featureFlagName - The string that represents the feature flag we want to get the treatment.
1191
1193
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1192
1194
  * @returns {TreatmentWithConfig} The TreatmentWithConfig, the object containing the treatment string and the
1193
1195
  * configuration stringified JSON (or null if there was no config for that treatment).
1194
1196
  */
1195
- getTreatmentWithConfig(key: SplitKey, splitName: string, attributes?: Attributes): TreatmentWithConfig,
1197
+ getTreatmentWithConfig(key: SplitKey, featureFlagName: string, attributes?: Attributes): TreatmentWithConfig,
1196
1198
  /**
1197
1199
  * Returns a Treatments value, which is an object map with the treatments for the given features.
1198
1200
  * @function getTreatments
1199
1201
  * @param {string} key - The string key representing the consumer.
1200
- * @param {Array<string>} splitNames - An array of the split names we wan't to get the treatments.
1202
+ * @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments.
1201
1203
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1202
1204
  * @returns {Treatments} The treatments object map.
1203
1205
  */
1204
- getTreatments(key: SplitKey, splitNames: string[], attributes?: Attributes): Treatments,
1206
+ getTreatments(key: SplitKey, featureFlagNames: string[], attributes?: Attributes): Treatments,
1205
1207
  /**
1206
1208
  * Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the given features.
1207
1209
  * @function getTreatmentsWithConfig
1208
1210
  * @param {string} key - The string key representing the consumer.
1209
- * @param {Array<string>} splitNames - An array of the split names we wan't to get the treatments.
1211
+ * @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments.
1210
1212
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1211
1213
  * @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
1212
1214
  */
1213
- getTreatmentsWithConfig(key: SplitKey, splitNames: string[], attributes?: Attributes): TreatmentsWithConfig,
1215
+ getTreatmentsWithConfig(key: SplitKey, featureFlagNames: string[], attributes?: Attributes): TreatmentsWithConfig,
1214
1216
  /**
1215
- * Tracks an event to be fed to the results product on Split Webconsole.
1217
+ * Tracks an event to be fed to the results product on Split user interface.
1216
1218
  * @function track
1217
1219
  * @param {SplitKey} key - The key that identifies the entity related to this event.
1218
1220
  * @param {string} trafficType - The traffic type of the entity related to this event.
@@ -1235,44 +1237,44 @@ declare namespace SplitIO {
1235
1237
  * NOTE: Treatment will be a promise only in async storages, like REDIS.
1236
1238
  * @function getTreatment
1237
1239
  * @param {string} key - The string key representing the consumer.
1238
- * @param {string} splitName - The string that represents the split we wan't to get the treatment.
1240
+ * @param {string} featureFlagName - The string that represents the feature flag we want to get the treatment.
1239
1241
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1240
- * @returns {AsyncTreatment} Treatment promise which will resolve to the treatment string.
1242
+ * @returns {AsyncTreatment} Treatment promise that resolves to the treatment string.
1241
1243
  */
1242
- getTreatment(key: SplitKey, splitName: string, attributes?: Attributes): AsyncTreatment,
1244
+ getTreatment(key: SplitKey, featureFlagName: string, attributes?: Attributes): AsyncTreatment,
1243
1245
  /**
1244
1246
  * Returns a TreatmentWithConfig value, which will be (or eventually be) an object with both treatment and config string for the given feature.
1245
1247
  * For usage on NodeJS as we don't have only one key.
1246
1248
  * NOTE: Treatment will be a promise only in async storages, like REDIS.
1247
1249
  * @function getTreatmentWithConfig
1248
1250
  * @param {string} key - The string key representing the consumer.
1249
- * @param {string} splitName - The string that represents the split we wan't to get the treatment.
1251
+ * @param {string} featureFlagName - The string that represents the feature flag we want to get the treatment.
1250
1252
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1251
- * @returns {AsyncTreatmentWithConfig} TreatmentWithConfig promise which will resolve to the TreatmentWithConfig object.
1253
+ * @returns {AsyncTreatmentWithConfig} TreatmentWithConfig promise that resolves to the TreatmentWithConfig object.
1252
1254
  */
1253
- getTreatmentWithConfig(key: SplitKey, splitName: string, attributes?: Attributes): AsyncTreatmentWithConfig,
1255
+ getTreatmentWithConfig(key: SplitKey, featureFlagName: string, attributes?: Attributes): AsyncTreatmentWithConfig,
1254
1256
  /**
1255
1257
  * Returns a Treatments value, which will be (or eventually be) an object map with the treatments for the given features.
1256
1258
  * For usage on NodeJS as we don't have only one key.
1257
1259
  * @function getTreatments
1258
1260
  * @param {string} key - The string key representing the consumer.
1259
- * @param {Array<string>} splitNames - An array of the split names we wan't to get the treatments.
1261
+ * @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments.
1260
1262
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1261
- * @returns {AsyncTreatments} Treatments promise which will resolve to the treatments object map.
1263
+ * @returns {AsyncTreatments} Treatments promise that resolves to the treatments object map.
1262
1264
  */
1263
- getTreatments(key: SplitKey, splitNames: string[], attributes?: Attributes): AsyncTreatments,
1265
+ getTreatments(key: SplitKey, featureFlagNames: string[], attributes?: Attributes): AsyncTreatments,
1264
1266
  /**
1265
1267
  * Returns a TreatmentsWithConfig value, which will be (or eventually be) an object map with the TreatmentWithConfig (an object with both treatment and config string) for the given features.
1266
1268
  * For usage on NodeJS as we don't have only one key.
1267
1269
  * @function getTreatmentsWithConfig
1268
1270
  * @param {string} key - The string key representing the consumer.
1269
- * @param {Array<string>} splitNames - An array of the split names we wan't to get the treatments.
1271
+ * @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments.
1270
1272
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1271
- * @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise which will resolve to the map of TreatmentsWithConfig objects.
1273
+ * @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the map of TreatmentsWithConfig objects.
1272
1274
  */
1273
- getTreatmentsWithConfig(key: SplitKey, splitNames: string[], attributes?: Attributes): AsyncTreatmentsWithConfig,
1275
+ getTreatmentsWithConfig(key: SplitKey, featureFlagNames: string[], attributes?: Attributes): AsyncTreatmentsWithConfig,
1274
1276
  /**
1275
- * Tracks an event to be fed to the results product on Split Webconsole and returns a promise to signal when the event was successfully queued (or not).
1277
+ * Tracks an event to be fed to the results product on Split user interface, and returns a promise to signal when the event was successfully queued (or not).
1276
1278
  * @function track
1277
1279
  * @param {SplitKey} key - The key that identifies the entity related to this event.
1278
1280
  * @param {string} trafficType - The traffic type of the entity related to this event.
@@ -1292,37 +1294,37 @@ declare namespace SplitIO {
1292
1294
  /**
1293
1295
  * Returns a Treatment value, which is the treatment string for the given feature.
1294
1296
  * @function getTreatment
1295
- * @param {string} splitName - The string that represents the split we wan't to get the treatment.
1297
+ * @param {string} featureFlagName - The string that represents the feature flag we want to get the treatment.
1296
1298
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1297
1299
  * @returns {Treatment} The treatment string.
1298
1300
  */
1299
- getTreatment(splitName: string, attributes?: Attributes): Treatment,
1301
+ getTreatment(featureFlagName: string, attributes?: Attributes): Treatment,
1300
1302
  /**
1301
1303
  * Returns a TreatmentWithConfig value, which is an object with both treatment and config string for the given feature.
1302
1304
  * @function getTreatmentWithConfig
1303
- * @param {string} splitName - The string that represents the split we wan't to get the treatment.
1305
+ * @param {string} featureFlagName - The string that represents the feature flag we want to get the treatment.
1304
1306
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1305
1307
  * @returns {TreatmentWithConfig} The map containing the treatment and the configuration stringified JSON (or null if there was no config for that treatment).
1306
1308
  */
1307
- getTreatmentWithConfig(splitName: string, attributes?: Attributes): TreatmentWithConfig,
1309
+ getTreatmentWithConfig(featureFlagName: string, attributes?: Attributes): TreatmentWithConfig,
1308
1310
  /**
1309
1311
  * Returns a Treatments value, which is an object map with the treatments for the given features.
1310
1312
  * @function getTreatments
1311
- * @param {Array<string>} splitNames - An array of the split names we wan't to get the treatments.
1313
+ * @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments.
1312
1314
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1313
1315
  * @returns {Treatments} The treatments object map.
1314
1316
  */
1315
- getTreatments(splitNames: string[], attributes?: Attributes): Treatments,
1317
+ getTreatments(featureFlagNames: string[], attributes?: Attributes): Treatments,
1316
1318
  /**
1317
1319
  * Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the given features.
1318
1320
  * @function getTreatmentsWithConfig
1319
- * @param {Array<string>} splitNames - An array of the split names we wan't to get the treatments.
1321
+ * @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments.
1320
1322
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1321
1323
  * @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
1322
1324
  */
1323
- getTreatmentsWithConfig(splitNames: string[], attributes?: Attributes): TreatmentsWithConfig,
1325
+ getTreatmentsWithConfig(featureFlagNames: string[], attributes?: Attributes): TreatmentsWithConfig,
1324
1326
  /**
1325
- * Tracks an event to be fed to the results product on Split Webconsole.
1327
+ * Tracks an event to be fed to the results product on Split user interface.
1326
1328
  * @function track
1327
1329
  * @param {string} trafficType - The traffic type of the entity related to this event.
1328
1330
  * @param {string} eventType - The event type corresponding to this event.
@@ -1382,37 +1384,37 @@ declare namespace SplitIO {
1382
1384
  /**
1383
1385
  * Returns a Treatment value, which will be (or eventually be) the treatment string for the given feature.
1384
1386
  * @function getTreatment
1385
- * @param {string} splitName - The string that represents the split we wan't to get the treatment.
1387
+ * @param {string} featureFlagName - The string that represents the feature flag we want to get the treatment.
1386
1388
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1387
- * @returns {AsyncTreatment} Treatment promise which will resolve to the treatment string.
1389
+ * @returns {AsyncTreatment} Treatment promise that resolves to the treatment string.
1388
1390
  */
1389
- getTreatment(splitName: string, attributes?: Attributes): AsyncTreatment,
1391
+ getTreatment(featureFlagName: string, attributes?: Attributes): AsyncTreatment,
1390
1392
  /**
1391
1393
  * Returns a TreatmentWithConfig value, which will be (or eventually be) an object with both treatment and config string for the given feature.
1392
1394
  * @function getTreatmentWithConfig
1393
- * @param {string} splitName - The string that represents the split we wan't to get the treatment.
1395
+ * @param {string} featureFlagName - The string that represents the feature flag we want to get the treatment.
1394
1396
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1395
- * @returns {AsyncTreatmentWithConfig} TreatmentWithConfig promise which will resolve to the TreatmentWithConfig object.
1397
+ * @returns {AsyncTreatmentWithConfig} TreatmentWithConfig promise that resolves to the TreatmentWithConfig object.
1396
1398
  */
1397
- getTreatmentWithConfig(splitName: string, attributes?: Attributes): AsyncTreatmentWithConfig,
1399
+ getTreatmentWithConfig(featureFlagName: string, attributes?: Attributes): AsyncTreatmentWithConfig,
1398
1400
  /**
1399
1401
  * Returns a Treatments value, which will be (or eventually be) an object map with the treatments for the given features.
1400
1402
  * @function getTreatments
1401
- * @param {Array<string>} splitNames - An array of the split names we wan't to get the treatments.
1403
+ * @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments.
1402
1404
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1403
- * @returns {AsyncTreatments} Treatments promise which will resolve to the treatments object map.
1405
+ * @returns {AsyncTreatments} Treatments promise that resolves to the treatments object map.
1404
1406
  */
1405
- getTreatments(splitNames: string[], attributes?: Attributes): AsyncTreatments,
1407
+ getTreatments(featureFlagNames: string[], attributes?: Attributes): AsyncTreatments,
1406
1408
  /**
1407
1409
  * Returns a TreatmentsWithConfig value, which will be (or eventually be) an object map with the TreatmentWithConfig (an object with both treatment and config string) for the given features.
1408
1410
  * @function getTreatmentsWithConfig
1409
- * @param {Array<string>} splitNames - An array of the split names we wan't to get the treatments.
1411
+ * @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments.
1410
1412
  * @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
1411
- * @returns {TreatmentsWithConfig} TreatmentsWithConfig promise which will resolve to the map of TreatmentsWithConfig objects.
1413
+ * @returns {TreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the map of TreatmentsWithConfig objects.
1412
1414
  */
1413
- getTreatmentsWithConfig(splitNames: string[], attributes?: Attributes): AsyncTreatmentsWithConfig,
1415
+ getTreatmentsWithConfig(featureFlagNames: string[], attributes?: Attributes): AsyncTreatmentsWithConfig,
1414
1416
  /**
1415
- * Tracks an event to be fed to the results product on Split Webconsole and returns a promise to signal when the event was successfully queued (or not).
1417
+ * Tracks an event to be fed to the results product on Split user interface, and returns a promise to signal when the event was successfully queued (or not).
1416
1418
  * @function track
1417
1419
  * @param {string} trafficType - The traffic type of the entity related to this event.
1418
1420
  * @param {string} eventType - The event type corresponding to this event.
@@ -1470,13 +1472,13 @@ declare namespace SplitIO {
1470
1472
  */
1471
1473
  interface IManager extends IStatusInterface {
1472
1474
  /**
1473
- * Get the array of Split names.
1475
+ * Get the array of feature flag names.
1474
1476
  * @function names
1475
- * @returns {SplitNames} The lists of Split names.
1477
+ * @returns {SplitNames} The list of feature flag names.
1476
1478
  */
1477
1479
  names(): SplitNames,
1478
1480
  /**
1479
- * Get the array of splits data in SplitView format.
1481
+ * Get the array of feature flags data in SplitView format.
1480
1482
  * @function splits
1481
1483
  * @returns {SplitViews} The list of SplitIO.SplitView.
1482
1484
  */
@@ -1484,10 +1486,10 @@ declare namespace SplitIO {
1484
1486
  /**
1485
1487
  * Get the data of a split in SplitView format.
1486
1488
  * @function split
1487
- * @param {string} splitName The name of the split we wan't to get info of.
1489
+ * @param {string} featureFlagName The name of the feature flag we want to get info of.
1488
1490
  * @returns {SplitView} The SplitIO.SplitView of the given split.
1489
1491
  */
1490
- split(splitName: string): SplitView,
1492
+ split(featureFlagName: string): SplitView,
1491
1493
  }
1492
1494
  /**
1493
1495
  * Representation of a manager instance with asynchronous storage of the SDK.
@@ -1496,23 +1498,23 @@ declare namespace SplitIO {
1496
1498
  */
1497
1499
  interface IAsyncManager extends IStatusInterface {
1498
1500
  /**
1499
- * Get the array of Split names.
1501
+ * Get the array of feature flag names.
1500
1502
  * @function names
1501
- * @returns {SplitNamesAsync} A promise that will resolve to the array of Splitio.SplitNames.
1503
+ * @returns {SplitNamesAsync} A promise that resolves to the list of feature flag names.
1502
1504
  */
1503
1505
  names(): SplitNamesAsync,
1504
1506
  /**
1505
- * Get the array of splits data in SplitView format.
1507
+ * Get the array of feature flags data in SplitView format.
1506
1508
  * @function splits
1507
- * @returns {SplitViewsAsync} A promise that will resolve to the SplitIO.SplitView list.
1509
+ * @returns {SplitViewsAsync} A promise that resolves to the SplitIO.SplitView list.
1508
1510
  */
1509
1511
  splits(): SplitViewsAsync,
1510
1512
  /**
1511
1513
  * Get the data of a split in SplitView format.
1512
1514
  * @function split
1513
- * @param {string} splitName The name of the split we wan't to get info of.
1514
- * @returns {SplitViewAsync} A promise that will resolve to the SplitIO.SplitView value.
1515
+ * @param {string} featureFlagName The name of the feature flag we want to get info of.
1516
+ * @returns {SplitViewAsync} A promise that resolves to the SplitIO.SplitView value.
1515
1517
  */
1516
- split(splitName: string): SplitViewAsync,
1518
+ split(featureFlagName: string): SplitViewAsync,
1517
1519
  }
1518
1520
  }