@@ -84,6 +84,14 @@ const attributes: SplitIO.Attributes = {
8484 attr6 : [ 1 , 2 ] ,
8585 attr7 : true
8686} ;
87+ const evaluationOptions : SplitIO . EvaluationOptions = {
88+ properties : {
89+ prop1 : 1 ,
90+ prop2 : '2' ,
91+ prop3 : true ,
92+ prop4 : null
93+ }
94+ } ;
8795const splitKeyObj : SplitIO . SplitKeyObject = {
8896 matchingKey : 'matchingKey' ,
8997 bucketingKey : 'bucketingKey'
@@ -254,58 +262,74 @@ promise = SDK.destroy();
254262// We can call getTreatment with or without a key.
255263treatment = client . getTreatment ( splitKey , 'mySplit' ) ;
256264treatment = browserClient . getTreatment ( 'mySplit' ) ;
257- // Attributes parameter is optional on both signatures.
265+ // Attributes and EvaluationOptions parameters are optional
258266treatment = client . getTreatment ( splitKey , 'mySplit' , attributes ) ;
267+ treatment = client . getTreatment ( splitKey , 'mySplit' , undefined , evaluationOptions ) ;
259268treatment = browserClient . getTreatment ( 'mySplit' , attributes ) ;
269+ treatment = browserClient . getTreatment ( 'mySplit' , undefined , evaluationOptions ) ;
260270
261271// We can call getTreatments with or without a key.
262272treatments = client . getTreatments ( splitKey , [ 'mySplit' ] ) ;
263273treatments = browserClient . getTreatments ( [ 'mySplit' ] ) ;
264- // Attributes parameter is optional on both signatures.
274+ // Attributes and EvaluationOptions parameters are optional
265275treatments = client . getTreatments ( splitKey , [ 'mySplit' ] , attributes ) ;
276+ treatments = client . getTreatments ( splitKey , [ 'mySplit' ] , undefined , evaluationOptions ) ;
266277treatments = browserClient . getTreatments ( [ 'mySplit' ] , attributes ) ;
278+ treatments = browserClient . getTreatments ( [ 'mySplit' ] , undefined , evaluationOptions ) ;
267279
268280// We can call getTreatmentWithConfig with or without a key.
269281treatmentWithConfig = client . getTreatmentWithConfig ( splitKey , 'mySplit' ) ;
270282treatmentWithConfig = browserClient . getTreatmentWithConfig ( 'mySplit' ) ;
271- // Attributes parameter is optional on both signatures.
283+ // Attributes and EvaluationOptions parameters are optional
272284treatmentWithConfig = client . getTreatmentWithConfig ( splitKey , 'mySplit' , attributes ) ;
285+ treatmentWithConfig = client . getTreatmentWithConfig ( splitKey , 'mySplit' , undefined , evaluationOptions ) ;
273286treatmentWithConfig = browserClient . getTreatmentWithConfig ( 'mySplit' , attributes ) ;
287+ treatmentWithConfig = browserClient . getTreatmentWithConfig ( 'mySplit' , undefined , evaluationOptions ) ;
274288
275289// We can call getTreatmentsWithConfig with or without a key.
276290treatmentsWithConfig = client . getTreatmentsWithConfig ( splitKey , [ 'mySplit' ] ) ;
277291treatmentsWithConfig = browserClient . getTreatmentsWithConfig ( [ 'mySplit' ] ) ;
278- // Attributes parameter is optional on both signatures.
292+ // Attributes and EvaluationOptions parameters are optional
279293treatmentsWithConfig = client . getTreatmentsWithConfig ( splitKey , [ 'mySplit' ] , attributes ) ;
294+ treatmentsWithConfig = client . getTreatmentsWithConfig ( splitKey , [ 'mySplit' ] , undefined , evaluationOptions ) ;
280295treatmentsWithConfig = browserClient . getTreatmentsWithConfig ( [ 'mySplit' ] , attributes ) ;
296+ treatmentsWithConfig = browserClient . getTreatmentsWithConfig ( [ 'mySplit' ] , undefined , evaluationOptions ) ;
281297
282298// We can call getTreatmentsByFlagSet with or without a key.
283299treatments = client . getTreatmentsByFlagSet ( splitKey , 'set_a' ) ;
284300treatments = browserClient . getTreatmentsByFlagSet ( 'set_a' ) ;
285- // Attributes parameter is optional.
301+ // Attributes and EvaluationOptions parameters are optional
286302treatments = client . getTreatmentsByFlagSet ( splitKey , 'set_a' , attributes ) ;
303+ treatments = client . getTreatmentsByFlagSet ( splitKey , 'set_a' , undefined , evaluationOptions ) ;
287304treatments = browserClient . getTreatmentsByFlagSet ( 'set_a' , attributes ) ;
305+ treatments = browserClient . getTreatmentsByFlagSet ( 'set_a' , undefined , evaluationOptions ) ;
288306
289307// We can call getTreatmentsByFlagSets with or without a key.
290308treatments = client . getTreatmentsByFlagSets ( splitKey , [ 'set_a' ] ) ;
291309treatments = browserClient . getTreatmentsByFlagSets ( [ 'set_a' ] ) ;
292- // Attributes parameter is optional.
310+ // Attributes and EvaluationOptions parameters are optional
293311treatments = client . getTreatmentsByFlagSets ( splitKey , [ 'set_a' ] , attributes ) ;
312+ treatments = client . getTreatmentsByFlagSets ( splitKey , [ 'set_a' ] , undefined , evaluationOptions ) ;
294313treatments = browserClient . getTreatmentsByFlagSets ( [ 'set_a' ] , attributes ) ;
314+ treatments = browserClient . getTreatmentsByFlagSets ( [ 'set_a' ] , undefined , evaluationOptions ) ;
295315
296316// We can call getTreatmentsWithConfigByFlagSet with or without a key.
297317treatmentsWithConfig = client . getTreatmentsWithConfigByFlagSet ( splitKey , 'set_a' ) ;
298318treatmentsWithConfig = browserClient . getTreatmentsWithConfigByFlagSet ( 'set_a' ) ;
299- // Attributes parameter is optional.
319+ // Attributes and EvaluationOptions parameters are optional
300320treatmentsWithConfig = client . getTreatmentsWithConfigByFlagSet ( splitKey , 'set_a' , attributes ) ;
321+ treatmentsWithConfig = client . getTreatmentsWithConfigByFlagSet ( splitKey , 'set_a' , undefined , evaluationOptions ) ;
301322treatmentsWithConfig = browserClient . getTreatmentsWithConfigByFlagSet ( 'set_a' , attributes ) ;
323+ treatmentsWithConfig = browserClient . getTreatmentsWithConfigByFlagSet ( 'set_a' , undefined , evaluationOptions ) ;
302324
303325// We can call getTreatmentsWithConfigByFlagSets with or without a key.
304326treatmentsWithConfig = client . getTreatmentsWithConfigByFlagSets ( splitKey , [ 'set_a' ] ) ;
305327treatmentsWithConfig = browserClient . getTreatmentsWithConfigByFlagSets ( [ 'set_a' ] ) ;
306- // Attributes parameter is optional.
328+ // Attributes and EvaluationOptions parameters are optional
307329treatmentsWithConfig = client . getTreatmentsWithConfigByFlagSets ( splitKey , [ 'set_a' ] , attributes ) ;
330+ treatmentsWithConfig = client . getTreatmentsWithConfigByFlagSets ( splitKey , [ 'set_a' ] , undefined , evaluationOptions ) ;
308331treatmentsWithConfig = browserClient . getTreatmentsWithConfigByFlagSets ( [ 'set_a' ] , attributes ) ;
332+ treatmentsWithConfig = browserClient . getTreatmentsWithConfigByFlagSets ( [ 'set_a' ] , undefined , evaluationOptions ) ;
309333
310334// We can call track with or without a key.
311335tracked = client . track ( splitKey , 'myTrafficType' , 'myEventType' ) ; // all params
@@ -343,43 +367,51 @@ promise = AsyncSDK.destroy();
343367
344368// We can call getTreatment but always with a key.
345369asyncTreatment = asyncClient . getTreatment ( splitKey , 'mySplit' ) ;
346- // Attributes parameter is optional
370+ // Attributes and EvaluationOptions parameters are optional
347371asyncTreatment = asyncClient . getTreatment ( splitKey , 'mySplit' , attributes ) ;
372+ asyncTreatment = asyncClient . getTreatment ( splitKey , 'mySplit' , undefined , evaluationOptions ) ;
348373
349374// We can call getTreatments but always with a key.
350375asyncTreatments = asyncClient . getTreatments ( splitKey , [ 'mySplit' ] ) ;
351- // Attributes parameter is optional
376+ // Attributes and EvaluationOptions parameters are optional
352377asyncTreatments = asyncClient . getTreatments ( splitKey , [ 'mySplit' ] , attributes ) ;
378+ asyncTreatments = asyncClient . getTreatments ( splitKey , [ 'mySplit' ] , undefined , evaluationOptions ) ;
353379
354380// We can call getTreatmentWithConfig but always with a key.
355381asyncTreatmentWithConfig = asyncClient . getTreatmentWithConfig ( splitKey , 'mySplit' ) ;
356- // Attributes parameter is optional
382+ // Attributes and EvaluationOptions parameters are optional
357383asyncTreatmentWithConfig = asyncClient . getTreatmentWithConfig ( splitKey , 'mySplit' , attributes ) ;
384+ asyncTreatmentWithConfig = asyncClient . getTreatmentWithConfig ( splitKey , 'mySplit' , undefined , evaluationOptions ) ;
358385
359386// We can call getTreatments but always with a key.
360387asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfig ( splitKey , [ 'mySplit' ] ) ;
361- // Attributes parameter is optional
388+ // Attributes and EvaluationOptions parameters are optional
362389asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfig ( splitKey , [ 'mySplit' ] , attributes ) ;
390+ asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfig ( splitKey , [ 'mySplit' ] , undefined , evaluationOptions ) ;
363391
364392// We can call getTreatmentsByFlagSet
365393asyncTreatments = asyncClient . getTreatmentsByFlagSet ( splitKey , 'set_a' ) ;
366- // Attributes parameter is optional
394+ // Attributes and EvaluationOptions parameters are optional
367395asyncTreatments = asyncClient . getTreatmentsByFlagSet ( splitKey , 'set_a' , attributes ) ;
396+ asyncTreatments = asyncClient . getTreatmentsByFlagSet ( splitKey , 'set_a' , undefined , evaluationOptions ) ;
368397
369398// We can call getTreatmentsByFlagSets
370399asyncTreatments = asyncClient . getTreatmentsByFlagSets ( splitKey , [ 'set_a' ] ) ;
371- // Attributes parameter is optional
400+ // Attributes and EvaluationOptions parameters are optional
372401asyncTreatments = asyncClient . getTreatmentsByFlagSets ( splitKey , [ 'set_a' ] , attributes ) ;
402+ asyncTreatments = asyncClient . getTreatmentsByFlagSets ( splitKey , [ 'set_a' ] , undefined , evaluationOptions ) ;
373403
374404// We can call getTreatmentsWithConfigByFlagSet
375405asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfigByFlagSet ( splitKey , 'set_a' ) ;
376- // Attributes parameter is optional
406+ // Attributes and EvaluationOptions parameters are optional
377407asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfigByFlagSet ( splitKey , 'set_a' , attributes ) ;
408+ asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfigByFlagSet ( splitKey , 'set_a' , undefined , evaluationOptions ) ;
378409
379410// We can call getTreatmentsByFlagSets but always with a key.
380411asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfigByFlagSets ( splitKey , [ 'set_a' ] ) ;
381- // Attributes parameter is optional
412+ // Attributes and EvaluationOptions parameters are optional
382413asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfigByFlagSets ( splitKey , [ 'set_a' ] , attributes ) ;
414+ asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfigByFlagSets ( splitKey , [ 'set_a' ] , undefined , evaluationOptions ) ;
383415
384416// We can call track only with a key.
385417trackPromise = asyncClient . track ( splitKey , 'myTrafficType' , 'myEventType' ) ; // all required params
0 commit comments