Skip to content

Commit

Permalink
Merge pull request #764 from splitio/sdks-7567
Browse files Browse the repository at this point in the history
[SDKS-7567] Add type definitions
  • Loading branch information
emmaz90 authored Oct 20, 2023
2 parents 66ddb34 + 936dc8b commit a3045ec
Showing 1 changed file with 69 additions and 1 deletion.
70 changes: 69 additions & 1 deletion types/splitio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ declare namespace SplitIO {
/**
* Returns a TreatmentWithConfig value, which an object with both treatment and config string for the given feature.
* For usage on the Browser as we defined the key on the settings.
* @function getTreatment
* @function getTreatmentWithConfig
* @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 TreatmentWithConfig, the object containing the treatment string and the
Expand Down Expand Up @@ -1422,6 +1422,74 @@ declare namespace SplitIO {
* @returns {TreatmentsWithConfig} The map with all the TreatmentWithConfig objects
*/
getTreatmentsWithConfig(featureFlagNames: string[], attributes?: Attributes): TreatmentsWithConfig,
/**
* Returns a Treatments value, which is an object map with the treatments for the feature flags related to the given flag set.
* @function getTreatmentsByFlagSet
* @param {string} key - The string key representing the consumer.
* @param {string} flagSet - The flag set name we want to get the treatments.
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
* @returns {Treatments} The map with all the TreatmentWithConfig objects
*/
getTreatmentsByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): Treatments,
/**
* Returns a Treatments value, which is an object map with the treatments for the feature flags related to the given flag set.
* @function getTreatmentsByFlagSet
* @param {string} flagSet - The flag set name we want to get the treatments.
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
* @returns {Treatments} The map with all the TreatmentWithConfig objects
*/
getTreatmentsByFlagSet(flagSet: 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 feature flags related to the given flag sets.
* @function getTreatmentsWithConfigByFlagSet
* @param {string} key - The string key representing the consumer.
* @param {string} flagSet - The flag set name we want to get the treatments.
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
* @returns {Treatments} The map with all the TreatmentWithConfig objects
*/
getTreatmentsWithConfigByFlagSet(key: SplitKey, flagSet: string, attributes?: Attributes): TreatmentsWithConfig,
/**
* Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag set.
* @function getTreatmentsWithConfigByFlagSet
* @param {string} flagSet - The flag set name we want to get the treatments.
* @param {Attributes=} attributes - An object of type Attributes defining the attributes for the given key.
* @returns {Treatments} The map with all the TreatmentWithConfig objects
*/
getTreatmentsWithConfigByFlagSet(flagSet: string, attributes?: Attributes): TreatmentsWithConfig,
/**
* Returns a Returns a Treatments value, which is an object with both treatment and config string for to the feature flags related to the given flag sets.
* @function getTreatmentsByFlagSets
* @param {string} key - The string key representing the consumer.
* @param {Array<string>} flagSets - An array of the flag set 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 map with all the TreatmentWithConfig objects
*/
getTreatmentsByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): Treatments,
/**
* Returns a Returns a Treatments value, which is an object with both treatment and config string for to the feature flags related to the given flag sets.
* @function getTreatmentsByFlagSets
* @param {Array<string>} flagSets - An array of the flag set 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 map with all the TreatmentWithConfig objects
*/
getTreatmentsByFlagSets(flagSets: 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 feature flags related to the given flag sets.
* @function getTreatmentsWithConfigByFlagSets
* @param {string} key - The string key representing the consumer.
* @param {Array<string>} flagSets - An array of the flag set 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 map with all the TreatmentWithConfig objects
*/
getTreatmentsWithConfigByFlagSets(key: SplitKey, flagSets: string[], attributes?: Attributes): TreatmentsWithConfig,
/**
* Returns a TreatmentsWithConfig value, which is an object map with the TreatmentWithConfig (an object with both treatment and config string) for the feature flags related to the given flag sets.
* @function getTreatmentsWithConfigByFlagSets
* @param {Array<string>} flagSets - An array of the flag set 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 map with all the TreatmentWithConfig objects
*/
getTreatmentsWithConfigByFlagSets(flagSets: string[], attributes?: Attributes): TreatmentsWithConfig,
/**
* Tracks an event to be fed to the results product on Split user interface.
* For usage on NodeJS as we don't have only one key.
Expand Down

0 comments on commit a3045ec

Please sign in to comment.