@splitsoftware/splitio-browserjs
Advanced tools
Comparing version 0.9.4 to 0.9.5-rc.0
@@ -0,1 +1,7 @@ | ||
0.9.5 (May 15, 2023) | ||
- Updated @splitsoftware/splitio-commons package to version 1.8.2 that includes minor improvements. | ||
- 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. | ||
- Updated split storage modules to optimize some operations when using Redis and pluggable storages. | ||
- Updated some transitive dependencies for vulnerability fixes. | ||
0.9.4 (May 4, 2023) | ||
@@ -19,3 +25,3 @@ - Updated some transitive dependencies for vulnerability fixes. | ||
- Updated default value of `scheduler.featuresRefreshRate` config parameter from 30 seconds to 60 seconds. | ||
- 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. | ||
- 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. | ||
@@ -29,3 +35,3 @@ 0.8.0 (July 22, 2022) | ||
0.7.0 (June 29, 2022) | ||
- 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. | ||
- 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. | ||
- Updated telemetry logic to track the anonymous config for user consent flag set to declined or unknown. | ||
@@ -32,0 +38,0 @@ - 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. |
"use strict"; | ||
/** | ||
Copyright 2022 Split Software | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
**/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -18,0 +3,0 @@ exports.PluggableStorage = exports.LocalhostFromObject = exports.DebugLogger = exports.InfoLogger = exports.WarnLogger = exports.ErrorLogger = exports.SplitToGoogleAnalytics = exports.GoogleAnalyticsToSplit = exports.InLocalStorage = exports.SplitFactory = void 0; |
@@ -6,3 +6,3 @@ "use strict"; | ||
var constants_1 = require("@splitsoftware/splitio-commons/cjs/utils/constants"); | ||
var packageVersion = '0.9.4'; | ||
var packageVersion = '0.9.5-rc.0'; | ||
/** | ||
@@ -9,0 +9,0 @@ * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item. |
@@ -1,16 +0,1 @@ | ||
/** | ||
Copyright 2022 Split Software | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
**/ | ||
export { SplitFactory } from './splitFactory'; | ||
@@ -17,0 +2,0 @@ export { InLocalStorage } from '@splitsoftware/splitio-commons/esm/storages/inLocalStorage/index'; |
import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/esm/logger/index'; | ||
import { CONSENT_GRANTED } from '@splitsoftware/splitio-commons/esm/utils/constants'; | ||
var packageVersion = '0.9.4'; | ||
var packageVersion = '0.9.5-rc.0'; | ||
/** | ||
@@ -5,0 +5,0 @@ * In browser, the default debug level, can be set via the `localStorage.splitio_debug` item. |
{ | ||
"name": "@splitsoftware/splitio-browserjs", | ||
"version": "0.9.4", | ||
"version": "0.9.5-rc.0", | ||
"description": "Split SDK for JavaScript on Browser", | ||
@@ -67,3 +67,3 @@ "main": "cjs/index.js", | ||
"dependencies": { | ||
"@splitsoftware/splitio-commons": "1.8.1", | ||
"@splitsoftware/splitio-commons": "1.8.2-rc.2", | ||
"@types/google.analytics": "0.0.40", | ||
@@ -70,0 +70,0 @@ "unfetch": "^4.2.0" |
@@ -6,3 +6,3 @@ # Split JavaScript SDK for Browsers | ||
## Overview | ||
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. | ||
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. | ||
@@ -25,3 +25,3 @@ [![Twitter Follow](https://img.shields.io/twitter/follow/splitsoftware.svg?style=social&label=Follow&maxAge=1529000)](https://twitter.com/intent/follow?screen_name=splitsoftware) | ||
core: { | ||
authorizationKey: 'YOUR_SDK_API_KEY', | ||
authorizationKey: 'YOUR_SDK_KEY', | ||
key: 'CUSTOMER_ID' | ||
@@ -36,3 +36,3 @@ } | ||
client.on(client.Event.SDK_READY, function() { | ||
var treatment = client.getTreatment('SPLIT_NAME'); | ||
var treatment = client.getTreatment('FEATURE_FLAG_NAME'); | ||
if (treatment == 'on') { | ||
@@ -39,0 +39,0 @@ // insert code here for on treatment |
@@ -1,17 +0,1 @@ | ||
/** | ||
Copyright 2022 Split Software | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
**/ | ||
export { SplitFactory } from './splitFactory'; | ||
@@ -18,0 +2,0 @@ export { InLocalStorage } from '@splitsoftware/splitio-commons/src/storages/inLocalStorage/index'; |
@@ -5,3 +5,3 @@ import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/src/logger/index'; | ||
const packageVersion = '0.9.4'; | ||
const packageVersion = '0.9.5-rc.0'; | ||
@@ -8,0 +8,0 @@ /** |
@@ -205,11 +205,10 @@ // Type definitions for JavaScript Browser Split Software SDK | ||
/** | ||
* 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. | ||
* 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. | ||
* This configuration is only meaningful when the SDK is working in "standalone" mode. | ||
* | ||
* At the moment, two types of split filters are supported: by name and by prefix. | ||
* At the moment, only one type of feature flag filter is supported: by name. | ||
* | ||
* Example: | ||
* `splitFilter: [ | ||
* { type: 'byName', values: ['my_split_1', 'my_split_2'] }, // will fetch splits named 'my_split_1' and 'my_split_2' | ||
* { type: 'byPrefix', values: ['testing'] } // will fetch splits whose names start with 'testing__' prefix | ||
* { 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' | ||
* ]` | ||
@@ -220,7 +219,7 @@ * @property {SplitIO.SplitFilter[]} splitFilters | ||
/** | ||
* Impressions Collection Mode. Option to determine how impressions are going to be sent to Split Servers. | ||
* Impressions Collection Mode. Option to determine how impressions are going to be sent to Split servers. | ||
* Possible values are 'DEBUG', 'OPTIMIZED', and 'NONE'. | ||
* - DEBUG: will send all the impressions generated (recommended only for debugging purposes). | ||
* - OPTIMIZED: will send unique impressions to Split Servers, avoiding a considerable amount of traffic that duplicated impressions could generate. | ||
* - 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. | ||
* - OPTIMIZED: will send unique impressions to Split servers, avoiding a considerable amount of traffic that duplicated impressions could generate. | ||
* - 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. | ||
* | ||
@@ -274,3 +273,3 @@ * @property {String} impressionsMode | ||
/** | ||
* 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). | ||
* 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). | ||
* 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 | ||
@@ -309,3 +308,3 @@ * SDK had timed out will return a new promise that should eventually resolve if the SDK gets ready. | ||
* @function destroy | ||
* @returns {Promise<void>} A promise that will be resolved once the client is destroyed. | ||
* @returns {Promise<void>} A promise that resolves once the client is destroyed. | ||
*/ | ||
@@ -343,3 +342,3 @@ destroy(): Promise<void> | ||
/** | ||
* Split treatment value, returned by getTreatment. | ||
* Feature flag treatment value, returned by getTreatment. | ||
* @typedef {string} Treatment | ||
@@ -349,3 +348,3 @@ */ | ||
/** | ||
* Split treatment promise that will resolve to actual treatment value. | ||
* Feature flag treatment promise that resolves to actual treatment value. | ||
* @typedef {Promise<string>} AsyncTreatment | ||
@@ -355,3 +354,3 @@ */ | ||
/** | ||
* An object with the treatments for a bulk of splits, returned by getTreatments. For example: | ||
* An object with the treatments for a bulk of feature flags, returned by getTreatments. For example: | ||
* { | ||
@@ -367,3 +366,3 @@ * feature1: 'on', | ||
/** | ||
* Split treatments promise that will resolve to the actual SplitIO.Treatments object. | ||
* Feature flags treatments promise that resolves to the actual SplitIO.Treatments object. | ||
* @typedef {Promise<Treatments>} AsyncTreatments | ||
@@ -373,5 +372,5 @@ */ | ||
/** | ||
* Split evaluation result with treatment and configuration, returned by getTreatmentWithConfig. | ||
* Feature flag evaluation result with treatment and configuration, returned by getTreatmentWithConfig. | ||
* @typedef {Object} TreatmentWithConfig | ||
* @property {string} treatment The treatment result | ||
* @property {string} treatment The treatment string | ||
* @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. | ||
@@ -384,3 +383,3 @@ */ | ||
/** | ||
* Split treatment promise that will resolve to actual treatment with config value. | ||
* Feature flag treatment promise that resolves to actual treatment with config value. | ||
* @typedef {Promise<TreatmentWithConfig>} AsyncTreatmentWithConfig | ||
@@ -390,4 +389,4 @@ */ | ||
/** | ||
* An object with the treatments with configs for a bulk of splits, returned by getTreatmentsWithConfig. | ||
* Each existing configuration is a stringified version of the JSON you defined on the Split web console. For example: | ||
* An object with the treatments with configs for a bulk of feature flags, returned by getTreatmentsWithConfig. | ||
* Each existing configuration is a stringified version of the JSON you defined on the Split user interface. For example: | ||
* { | ||
@@ -403,3 +402,3 @@ * feature1: { treatment: 'on', config: null } | ||
/** | ||
* Split treatments promise that will resolve to the actual SplitIO.TreatmentsWithConfig object. | ||
* Feature flags treatments promise that resolves to the actual SplitIO.TreatmentsWithConfig object. | ||
* @typedef {Promise<TreatmentsWithConfig>} AsyncTreatmentsWithConfig | ||
@@ -414,3 +413,3 @@ */ | ||
/** | ||
* Split attributes should be on object with values of type string or number (dates should be sent as millis since epoch). | ||
* Attributes should be on object with values of type string or number (dates should be sent as millis since epoch). | ||
* @typedef {Object.<AttributeType>} Attributes | ||
@@ -428,3 +427,3 @@ * @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#attribute-syntax} | ||
/** | ||
* Split properties should be an object with values of type string, number, boolean or null. Size limit of ~31kb. | ||
* Properties should be an object with values of type string, number, boolean or null. Size limit of ~31kb. | ||
* @typedef {Object.<number, string, boolean, null>} Attributes | ||
@@ -480,3 +479,3 @@ * @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#track | ||
/** | ||
* Data corresponding to one Split view. | ||
* Data corresponding to one feature flag view. | ||
* @typedef {Object} SplitView | ||
@@ -486,3 +485,3 @@ */ | ||
/** | ||
* The name of the split. | ||
* The name of the feature flag. | ||
* @property {string} name | ||
@@ -492,3 +491,3 @@ */ | ||
/** | ||
* The traffic type of the split. | ||
* The traffic type of the feature flag. | ||
* @property {string} trafficType | ||
@@ -498,3 +497,3 @@ */ | ||
/** | ||
* Whether the split is killed or not. | ||
* Whether the feature flag is killed or not. | ||
* @property {boolean} killed | ||
@@ -504,3 +503,3 @@ */ | ||
/** | ||
* The list of treatments available for the split. | ||
* The list of treatments available for the feature flag. | ||
* @property {Array<string>} treatments | ||
@@ -510,3 +509,3 @@ */ | ||
/** | ||
* Current change number of the split. | ||
* Current change number of the feature flag. | ||
* @property {number} changeNumber | ||
@@ -517,3 +516,3 @@ */ | ||
* Map of configurations per treatment. | ||
* Each existing configuration is a stringified version of the JSON you defined on the Split web console. | ||
* Each existing configuration is a stringified version of the JSON you defined on the Split user interface. | ||
* @property {Object.<string>} configs | ||
@@ -526,3 +525,3 @@ */ | ||
/** | ||
* A promise that will be resolved with that SplitView. | ||
* A promise that resolves to a feature flag view. | ||
* @typedef {Promise<SplitView>} SplitView | ||
@@ -536,3 +535,3 @@ */ | ||
/** | ||
* A promise that will be resolved with an SplitIO.SplitViews array. | ||
* A promise that resolves to an SplitIO.SplitViews array. | ||
* @typedef {Promise<SplitViews>} SplitViewsAsync | ||
@@ -542,3 +541,3 @@ */ | ||
/** | ||
* An array of split names. | ||
* An array of feature flag names. | ||
* @typedef {Array<string>} SplitNames | ||
@@ -548,3 +547,3 @@ */ | ||
/** | ||
* A promise that will be resolved with an array of split names. | ||
* A promise that resolves to an array of feature flag names. | ||
* @typedef {Promise<SplitNames>} SplitNamesAsync | ||
@@ -789,3 +788,3 @@ */ | ||
/** | ||
* String property to override the base URL where the SDK will get feature flagging related data like a Split rollout plan or segments information. | ||
* String property to override the base URL where the SDK will get rollout plan related data, like feature flags and segments definitions. | ||
* @property {string} sdk | ||
@@ -823,2 +822,3 @@ * @default 'https://sdk.split.io/api' | ||
* SplitFilter type. | ||
* | ||
* @typedef {string} SplitFilterType | ||
@@ -828,3 +828,3 @@ */ | ||
/** | ||
* Defines a split filter, described by a type and list of values. | ||
* Defines a feature flag filter, described by a type and list of values. | ||
*/ | ||
@@ -834,2 +834,3 @@ interface SplitFilter { | ||
* Type of the filter. | ||
* | ||
* @property {SplitFilterType} type | ||
@@ -839,3 +840,4 @@ */ | ||
/** | ||
* List of values: split names for 'byName' filter type, and split prefixes for 'byPrefix' type. | ||
* List of values: feature flag names for 'byName' filter type, and feature flag name prefixes for 'byPrefix' type. | ||
* | ||
* @property {string[]} values | ||
@@ -875,3 +877,3 @@ */ | ||
/** | ||
* Your API key. More information: @see {@link https://help.split.io/hc/en-us/articles/360019916211-API-keys} | ||
* Your SDK key. More information: @see {@link https://help.split.io/hc/en-us/articles/360019916211-API-keys} | ||
* @property {string} authorizationKey | ||
@@ -994,3 +996,3 @@ */ | ||
/** | ||
* The SDK polls Split servers for changes to feature roll-out plans. This parameter controls this polling period in seconds. | ||
* The SDK polls Split servers for changes to feature flag definitions. This parameter controls this polling period in seconds. | ||
* @property {number} featuresRefreshRate | ||
@@ -1213,7 +1215,7 @@ * @default 60 | ||
* @param {string} key - The string key representing the consumer. | ||
* @param {string} splitName - The string that represents the split we wan't to get the treatment. | ||
* @param {string} featureFlagName - The string that represents the feature flag we want to get the treatment. | ||
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key. | ||
* @returns {Treatment} The treatment string. | ||
*/ | ||
getTreatment(key: SplitKey, splitName: string, attributes?: Attributes): Treatment, | ||
getTreatment(key: SplitKey, featureFlagName: string, attributes?: Attributes): Treatment, | ||
/** | ||
@@ -1223,3 +1225,3 @@ * Returns a TreatmentWithConfig value, which is an object with both treatment and config string for the given feature. | ||
* @param {string} key - The string key representing the consumer. | ||
* @param {string} splitName - The string that represents the split we wan't to get the treatment. | ||
* @param {string} featureFlagName - The string that represents the feature flag we want to get the treatment. | ||
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key. | ||
@@ -1229,3 +1231,3 @@ * @returns {TreatmentWithConfig} The TreatmentWithConfig, the object containing the treatment string and the | ||
*/ | ||
getTreatmentWithConfig(key: SplitKey, splitName: string, attributes?: Attributes): TreatmentWithConfig, | ||
getTreatmentWithConfig(key: SplitKey, featureFlagName: string, attributes?: Attributes): TreatmentWithConfig, | ||
/** | ||
@@ -1235,7 +1237,7 @@ * Returns a Treatments value, which is an object map with the treatments for the given features. | ||
* @param {string} key - The string key representing the consumer. | ||
* @param {Array<string>} splitNames - An array of the split names we wan't to get the treatments. | ||
* @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments. | ||
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key. | ||
* @returns {Treatments} The treatments object map. | ||
*/ | ||
getTreatments(key: SplitKey, splitNames: string[], attributes?: Attributes): Treatments, | ||
getTreatments(key: SplitKey, featureFlagNames: string[], attributes?: Attributes): Treatments, | ||
/** | ||
@@ -1245,9 +1247,9 @@ * Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the given features. | ||
* @param {string} key - The string key representing the consumer. | ||
* @param {Array<string>} splitNames - An array of the split names we wan't to get the treatments. | ||
* @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments. | ||
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key. | ||
* @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects | ||
*/ | ||
getTreatmentsWithConfig(key: SplitKey, splitNames: string[], attributes?: Attributes): TreatmentsWithConfig, | ||
getTreatmentsWithConfig(key: SplitKey, featureFlagNames: string[], attributes?: Attributes): TreatmentsWithConfig, | ||
/** | ||
* Tracks an event to be fed to the results product on Split Webconsole. | ||
* Tracks an event to be fed to the results product on Split user interface. | ||
* @function track | ||
@@ -1275,7 +1277,7 @@ * @param {SplitKey} key - The key that identifies the entity related to this event. | ||
* @param {string} key - The string key representing the consumer. | ||
* @param {string} splitName - The string that represents the split we wan't to get the treatment. | ||
* @param {string} featureFlagName - The string that represents the feature flag we want to get the treatment. | ||
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key. | ||
* @returns {AsyncTreatment} Treatment promise which will resolve to the treatment string. | ||
* @returns {AsyncTreatment} Treatment promise that resolves to the treatment string. | ||
*/ | ||
getTreatment(key: SplitKey, splitName: string, attributes?: Attributes): AsyncTreatment, | ||
getTreatment(key: SplitKey, featureFlagName: string, attributes?: Attributes): AsyncTreatment, | ||
/** | ||
@@ -1287,7 +1289,7 @@ * Returns a TreatmentWithConfig value, which will be (or eventually be) an object with both treatment and config string for the given feature. | ||
* @param {string} key - The string key representing the consumer. | ||
* @param {string} splitName - The string that represents the split we wan't to get the treatment. | ||
* @param {string} featureFlagName - The string that represents the feature flag we want to get the treatment. | ||
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key. | ||
* @returns {AsyncTreatmentWithConfig} TreatmentWithConfig promise which will resolve to the TreatmentWithConfig object. | ||
* @returns {AsyncTreatmentWithConfig} TreatmentWithConfig promise that resolves to the TreatmentWithConfig object. | ||
*/ | ||
getTreatmentWithConfig(key: SplitKey, splitName: string, attributes?: Attributes): AsyncTreatmentWithConfig, | ||
getTreatmentWithConfig(key: SplitKey, featureFlagName: string, attributes?: Attributes): AsyncTreatmentWithConfig, | ||
/** | ||
@@ -1298,7 +1300,7 @@ * Returns a Treatments value, which will be (or eventually be) an object map with the treatments for the given features. | ||
* @param {string} key - The string key representing the consumer. | ||
* @param {Array<string>} splitNames - An array of the split names we wan't to get the treatments. | ||
* @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments. | ||
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key. | ||
* @returns {AsyncTreatments} Treatments promise which will resolve to the treatments object map. | ||
* @returns {AsyncTreatments} Treatments promise that resolves to the treatments object map. | ||
*/ | ||
getTreatments(key: SplitKey, splitNames: string[], attributes?: Attributes): AsyncTreatments, | ||
getTreatments(key: SplitKey, featureFlagNames: string[], attributes?: Attributes): AsyncTreatments, | ||
/** | ||
@@ -1309,9 +1311,9 @@ * 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. | ||
* @param {string} key - The string key representing the consumer. | ||
* @param {Array<string>} splitNames - An array of the split names we wan't to get the treatments. | ||
* @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments. | ||
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key. | ||
* @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise which will resolve to the map of TreatmentsWithConfig objects. | ||
* @returns {AsyncTreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the map of TreatmentsWithConfig objects. | ||
*/ | ||
getTreatmentsWithConfig(key: SplitKey, splitNames: string[], attributes?: Attributes): AsyncTreatmentsWithConfig, | ||
getTreatmentsWithConfig(key: SplitKey, featureFlagNames: string[], attributes?: Attributes): AsyncTreatmentsWithConfig, | ||
/** | ||
* 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). | ||
* 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). | ||
* @function track | ||
@@ -1336,33 +1338,33 @@ * @param {SplitKey} key - The key that identifies the entity related to this event. | ||
* @function getTreatment | ||
* @param {string} splitName - The string that represents the split we wan't to get the treatment. | ||
* @param {string} featureFlagName - The string that represents the feature flag we want to get the treatment. | ||
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key. | ||
* @returns {Treatment} The treatment string. | ||
*/ | ||
getTreatment(splitName: string, attributes?: Attributes): Treatment, | ||
getTreatment(featureFlagName: string, attributes?: Attributes): Treatment, | ||
/** | ||
* Returns a TreatmentWithConfig value, which is an object with both treatment and config string for the given feature. | ||
* @function getTreatmentWithConfig | ||
* @param {string} splitName - The string that represents the split we wan't to get the treatment. | ||
* @param {string} featureFlagName - The string that represents the feature flag we want to get the treatment. | ||
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key. | ||
* @returns {TreatmentWithConfig} The map containing the treatment and the configuration stringified JSON (or null if there was no config for that treatment). | ||
*/ | ||
getTreatmentWithConfig(splitName: string, attributes?: Attributes): TreatmentWithConfig, | ||
getTreatmentWithConfig(featureFlagName: string, attributes?: Attributes): TreatmentWithConfig, | ||
/** | ||
* Returns a Treatments value, which is an object map with the treatments for the given features. | ||
* @function getTreatments | ||
* @param {Array<string>} splitNames - An array of the split names we wan't to get the treatments. | ||
* @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments. | ||
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key. | ||
* @returns {Treatments} The treatments object map. | ||
*/ | ||
getTreatments(splitNames: string[], attributes?: Attributes): Treatments, | ||
getTreatments(featureFlagNames: string[], attributes?: Attributes): Treatments, | ||
/** | ||
* Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the given features. | ||
* @function getTreatmentsWithConfig | ||
* @param {Array<string>} splitNames - An array of the split names we wan't to get the treatments. | ||
* @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments. | ||
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key. | ||
* @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects | ||
*/ | ||
getTreatmentsWithConfig(splitNames: string[], attributes?: Attributes): TreatmentsWithConfig, | ||
getTreatmentsWithConfig(featureFlagNames: string[], attributes?: Attributes): TreatmentsWithConfig, | ||
/** | ||
* Tracks an event to be fed to the results product on Split Webconsole. | ||
* Tracks an event to be fed to the results product on Split user interface. | ||
* @function track | ||
@@ -1427,33 +1429,33 @@ * @param {string} trafficType - The traffic type of the entity related to this event. | ||
* @function getTreatment | ||
* @param {string} splitName - The string that represents the split we wan't to get the treatment. | ||
* @param {string} featureFlagName - The string that represents the feature flag we want to get the treatment. | ||
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key. | ||
* @returns {AsyncTreatment} Treatment promise which will resolve to the treatment string. | ||
* @returns {AsyncTreatment} Treatment promise that resolves to the treatment string. | ||
*/ | ||
getTreatment(splitName: string, attributes?: Attributes): AsyncTreatment, | ||
getTreatment(featureFlagName: string, attributes?: Attributes): AsyncTreatment, | ||
/** | ||
* Returns a TreatmentWithConfig value, which will be (or eventually be) an object with both treatment and config string for the given feature. | ||
* @function getTreatmentWithConfig | ||
* @param {string} splitName - The string that represents the split we wan't to get the treatment. | ||
* @param {string} featureFlagName - The string that represents the feature flag we want to get the treatment. | ||
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key. | ||
* @returns {AsyncTreatmentWithConfig} TreatmentWithConfig promise which will resolve to the TreatmentWithConfig object. | ||
* @returns {AsyncTreatmentWithConfig} TreatmentWithConfig promise that resolves to the TreatmentWithConfig object. | ||
*/ | ||
getTreatmentWithConfig(splitName: string, attributes?: Attributes): AsyncTreatmentWithConfig, | ||
getTreatmentWithConfig(featureFlagName: string, attributes?: Attributes): AsyncTreatmentWithConfig, | ||
/** | ||
* Returns a Treatments value, which will be (or eventually be) an object map with the treatments for the given features. | ||
* @function getTreatments | ||
* @param {Array<string>} splitNames - An array of the split names we wan't to get the treatments. | ||
* @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments. | ||
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key. | ||
* @returns {AsyncTreatments} Treatments promise which will resolve to the treatments object map. | ||
* @returns {AsyncTreatments} Treatments promise that resolves to the treatments object map. | ||
*/ | ||
getTreatments(splitNames: string[], attributes?: Attributes): AsyncTreatments, | ||
getTreatments(featureFlagNames: string[], attributes?: Attributes): AsyncTreatments, | ||
/** | ||
* 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. | ||
* @function getTreatmentsWithConfig | ||
* @param {Array<string>} splitNames - An array of the split names we wan't to get the treatments. | ||
* @param {Array<string>} featureFlagNames - An array of the feature flag names we want to get the treatments. | ||
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key. | ||
* @returns {TreatmentsWithConfig} TreatmentsWithConfig promise which will resolve to the map of TreatmentsWithConfig objects. | ||
* @returns {TreatmentsWithConfig} TreatmentsWithConfig promise that resolves to the map of TreatmentsWithConfig objects. | ||
*/ | ||
getTreatmentsWithConfig(splitNames: string[], attributes?: Attributes): AsyncTreatmentsWithConfig, | ||
getTreatmentsWithConfig(featureFlagNames: string[], attributes?: Attributes): AsyncTreatmentsWithConfig, | ||
/** | ||
* 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). | ||
* 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). | ||
* @function track | ||
@@ -1516,9 +1518,9 @@ * @param {string} trafficType - The traffic type of the entity related to this event. | ||
/** | ||
* Get the array of Split names. | ||
* Get the array of feature flag names. | ||
* @function names | ||
* @returns {SplitNames} The lists of Split names. | ||
* @returns {SplitNames} The list of feature flag names. | ||
*/ | ||
names(): SplitNames, | ||
/** | ||
* Get the array of splits data in SplitView format. | ||
* Get the array of feature flags data in SplitView format. | ||
* @function splits | ||
@@ -1531,6 +1533,6 @@ * @returns {SplitViews} The list of SplitIO.SplitView. | ||
* @function split | ||
* @param {string} splitName The name of the split we wan't to get info of. | ||
* @param {string} featureFlagName The name of the feature flag we want to get info of. | ||
* @returns {SplitView} The SplitIO.SplitView of the given split. | ||
*/ | ||
split(splitName: string): SplitView, | ||
split(featureFlagName: string): SplitView, | ||
} | ||
@@ -1544,11 +1546,11 @@ /** | ||
/** | ||
* Get the array of Split names. | ||
* Get the array of feature flag names. | ||
* @function names | ||
* @returns {SplitNamesAsync} A promise that will resolve to the array of Splitio.SplitNames. | ||
* @returns {SplitNamesAsync} A promise that resolves to the list of feature flag names. | ||
*/ | ||
names(): SplitNamesAsync, | ||
/** | ||
* Get the array of splits data in SplitView format. | ||
* Get the array of feature flags data in SplitView format. | ||
* @function splits | ||
* @returns {SplitViewsAsync} A promise that will resolve to the SplitIO.SplitView list. | ||
* @returns {SplitViewsAsync} A promise that resolves to the SplitIO.SplitView list. | ||
*/ | ||
@@ -1559,7 +1561,7 @@ splits(): SplitViewsAsync, | ||
* @function split | ||
* @param {string} splitName The name of the split we wan't to get info of. | ||
* @returns {SplitViewAsync} A promise that will resolve to the SplitIO.SplitView value. | ||
* @param {string} featureFlagName The name of the feature flag we want to get info of. | ||
* @returns {SplitViewAsync} A promise that resolves to the SplitIO.SplitView value. | ||
*/ | ||
split(splitName: string): SplitViewAsync, | ||
split(featureFlagName: string): SplitViewAsync, | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
136990
2410
+ Added@splitsoftware/splitio-commons@1.8.2-rc.2(transitive)
- Removed@splitsoftware/splitio-commons@1.8.1(transitive)