Skip to content

Commit d721ac8

Browse files
committed
Update comments
1 parent b4e11a8 commit d721ac8

File tree

3 files changed

+32
-29
lines changed

3 files changed

+32
-29
lines changed

packages/optimizely-sdk/lib/core/event_builder/event_helpers.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ var logger = getLogger('EVENT_BUILDER');
2525

2626
/**
2727
* Creates an ImpressionEvent object from decision data
28-
* @param {Object} config
29-
* @param {Object} config.decisionObj
30-
* @param {String} config.userId
31-
* @param {String} config.flagKey
32-
* @param {boolean} config.enabled
33-
* @param {Object} config.userAttributes
34-
* @param {String} config.clientEngine
35-
* @param {String} config.clientVersion
36-
* @return {Object} an ImpressionEvent object
28+
* @param {Object} config
29+
* @param {Object} config.decisionObj
30+
* @param {String} config.userId
31+
* @param {String} config.flagKey
32+
* @param {boolean} config.enabled
33+
* @param {Object} config.userAttributes
34+
* @param {String} config.clientEngine
35+
* @param {String} config.clientVersion
36+
* @return {Object} an ImpressionEvent object
3737
*/
3838
export var buildImpressionEvent = function(config) {
3939
var configObj = config.configObj;

packages/optimizely-sdk/lib/core/event_builder/index.js

+21-20
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,14 @@ function getCommonEventParams(options) {
9090

9191
/**
9292
* Creates object of params specific to impression events
93-
* @param {Object} configObj Object representing project configuration
94-
* @param {string} experimentId ID of experiment for which impression needs to be recorded
95-
* @param {string} variationId ID for variation which would be presented to user
96-
* @param {string} ruleKey Key of experiment for which impression needs to be recorded
97-
* @param {string} ruleType Type for the decision source
98-
* @param {string} flagKey Key for a feature flag
99-
* @return {Object} Impression event params
93+
* @param {Object} configObj Object representing project configuration
94+
* @param {string} experimentId ID of experiment for which impression needs to be recorded
95+
* @param {string} variationId ID for variation which would be presented to user
96+
* @param {string} ruleKey Key of experiment for which impression needs to be recorded
97+
* @param {string} ruleType Type for the decision source
98+
* @param {string} flagKey Key for a feature flag
99+
* @param {boolean} enabled Boolean representing if feature is enabled
100+
* @return {Object} Impression event params
100101
*/
101102
function getImpressionEventParams(configObj, experimentId, variationId, ruleKey, ruleType, flagKey, enabled) {
102103
let campaignId = null;
@@ -177,19 +178,19 @@ function getVisitorSnapshot(configObj, eventKey, eventTags, logger) {
177178

178179
/**
179180
* Create impression event params to be sent to the logging endpoint
180-
* @param {Object} options Object containing values needed to build impression event
181-
* @param {Object} options.attributes Object representing user attributes and values which need to be recorded
182-
* @param {string} options.clientEngine The client we are using: node or javascript
183-
* @param {string} options.clientVersion The version of the client
184-
* @param {Object} options.configObj Object representing project configuration, including datafile information and mappings for quick lookup
185-
* @param {string} options.experimentId Experiment for which impression needs to be recorded
186-
* @param {string} options.userId ID for user
187-
* @param {string} options.variationId ID for variation which would be presented to user
188-
* @param {string} options.ruleKey Key of an experiment for which impression needs to be recorded
189-
* @param {string} options.ruleType Type for the decision source
190-
* @param {string} options.flagKey Key for a feature flag
191-
* @param {string} options.enabled Boolean enabled for a feature
192-
* @return {Object} Params to be used in impression event logging endpoint call
181+
* @param {Object} options Object containing values needed to build impression event
182+
* @param {Object} options.attributes Object representing user attributes and values which need to be recorded
183+
* @param {string} options.clientEngine The client we are using: node or javascript
184+
* @param {string} options.clientVersion The version of the client
185+
* @param {Object} options.configObj Object representing project configuration, including datafile information and mappings for quick lookup
186+
* @param {string} options.experimentId Experiment for which impression needs to be recorded
187+
* @param {string} options.userId ID for user
188+
* @param {string} options.variationId ID for variation which would be presented to user
189+
* @param {string} options.ruleKey Key of an experiment for which impression needs to be recorded
190+
* @param {string} options.ruleType Type for the decision source
191+
* @param {string} options.flagKey Key for a feature flag
192+
* @param {boolean} options.enabled Boolean representing if feature is enabled
193+
* @return {Object} Params to be used in impression event logging endpoint call
193194
*/
194195
export var getImpressionEvent = function(options) {
195196
var impressionEvent = {

packages/optimizely-sdk/lib/optimizely/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ export default class Optimizely {
280280
* @param {string} flagKey Key for a feature flag
281281
* @param {string} userId ID of user to whom the variation was shown
282282
* @param {UserAttributes} attributes Optional user attributes
283+
* @param {boolean} enabled Boolean representing if feature is enabled
283284
*/
284285
private sendImpressionEvent(
285286
decisionObj: DecisionObj,
@@ -313,6 +314,7 @@ export default class Optimizely {
313314
* @param {DecisionObj} decisionObj Decision object
314315
* @param {string} flagKey Key for a feature flag
315316
* @param {string} userId ID of user to whom the variation was shown
317+
* @param {boolean} enabled Boolean representing if feature is enabled
316318
* @param {UserAttributes} attributes Optional user attributes
317319
*/
318320
private emitNotificationCenterActivate(

0 commit comments

Comments
 (0)