Skip to content

Commit

Permalink
[SDKS-7567] Add type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Zamora committed Oct 9, 2023
1 parent c510e36 commit b9fab93
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 @@ -1370,7 +1370,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 @@ -1417,6 +1417,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 flagSet.
* @function getTreatmentsByFlagSet
* @param {string} key - The string key representing the consumer.
* @param {string} flagSet - The flagSet 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(key: SplitKey, 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 flagSets.
* @function getTreatmentsWithConfigByFlagSet
* @param {string} key - The string key representing the consumer.
* @param {string} flagSet - The flagSet 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 flagSets.
* @function getTreatmentsByFlagSets
* @param {string} key - The string key representing the consumer.
* @param {Array<string>} flagSets - An array of the flagSet 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 flagSets.
* @function getTreatmentsWithConfigByFlagSets
* @param {string} key - The string key representing the consumer.
* @param {Array<string>} flagSets - An array of the flagSet 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 b9fab93

Please sign in to comment.