@@ -84,6 +84,14 @@ const attributes: SplitIO.Attributes = {
84
84
attr6 : [ 1 , 2 ] ,
85
85
attr7 : true
86
86
} ;
87
+ const evaluationOptions : SplitIO . EvaluationOptions = {
88
+ properties : {
89
+ prop1 : 1 ,
90
+ prop2 : '2' ,
91
+ prop3 : true ,
92
+ prop4 : null
93
+ }
94
+ } ;
87
95
const splitKeyObj : SplitIO . SplitKeyObject = {
88
96
matchingKey : 'matchingKey' ,
89
97
bucketingKey : 'bucketingKey'
@@ -254,58 +262,74 @@ promise = SDK.destroy();
254
262
// We can call getTreatment with or without a key.
255
263
treatment = client . getTreatment ( splitKey , 'mySplit' ) ;
256
264
treatment = browserClient . getTreatment ( 'mySplit' ) ;
257
- // Attributes parameter is optional on both signatures.
265
+ // Attributes and EvaluationOptions parameters are optional
258
266
treatment = client . getTreatment ( splitKey , 'mySplit' , attributes ) ;
267
+ treatment = client . getTreatment ( splitKey , 'mySplit' , undefined , evaluationOptions ) ;
259
268
treatment = browserClient . getTreatment ( 'mySplit' , attributes ) ;
269
+ treatment = browserClient . getTreatment ( 'mySplit' , undefined , evaluationOptions ) ;
260
270
261
271
// We can call getTreatments with or without a key.
262
272
treatments = client . getTreatments ( splitKey , [ 'mySplit' ] ) ;
263
273
treatments = browserClient . getTreatments ( [ 'mySplit' ] ) ;
264
- // Attributes parameter is optional on both signatures.
274
+ // Attributes and EvaluationOptions parameters are optional
265
275
treatments = client . getTreatments ( splitKey , [ 'mySplit' ] , attributes ) ;
276
+ treatments = client . getTreatments ( splitKey , [ 'mySplit' ] , undefined , evaluationOptions ) ;
266
277
treatments = browserClient . getTreatments ( [ 'mySplit' ] , attributes ) ;
278
+ treatments = browserClient . getTreatments ( [ 'mySplit' ] , undefined , evaluationOptions ) ;
267
279
268
280
// We can call getTreatmentWithConfig with or without a key.
269
281
treatmentWithConfig = client . getTreatmentWithConfig ( splitKey , 'mySplit' ) ;
270
282
treatmentWithConfig = browserClient . getTreatmentWithConfig ( 'mySplit' ) ;
271
- // Attributes parameter is optional on both signatures.
283
+ // Attributes and EvaluationOptions parameters are optional
272
284
treatmentWithConfig = client . getTreatmentWithConfig ( splitKey , 'mySplit' , attributes ) ;
285
+ treatmentWithConfig = client . getTreatmentWithConfig ( splitKey , 'mySplit' , undefined , evaluationOptions ) ;
273
286
treatmentWithConfig = browserClient . getTreatmentWithConfig ( 'mySplit' , attributes ) ;
287
+ treatmentWithConfig = browserClient . getTreatmentWithConfig ( 'mySplit' , undefined , evaluationOptions ) ;
274
288
275
289
// We can call getTreatmentsWithConfig with or without a key.
276
290
treatmentsWithConfig = client . getTreatmentsWithConfig ( splitKey , [ 'mySplit' ] ) ;
277
291
treatmentsWithConfig = browserClient . getTreatmentsWithConfig ( [ 'mySplit' ] ) ;
278
- // Attributes parameter is optional on both signatures.
292
+ // Attributes and EvaluationOptions parameters are optional
279
293
treatmentsWithConfig = client . getTreatmentsWithConfig ( splitKey , [ 'mySplit' ] , attributes ) ;
294
+ treatmentsWithConfig = client . getTreatmentsWithConfig ( splitKey , [ 'mySplit' ] , undefined , evaluationOptions ) ;
280
295
treatmentsWithConfig = browserClient . getTreatmentsWithConfig ( [ 'mySplit' ] , attributes ) ;
296
+ treatmentsWithConfig = browserClient . getTreatmentsWithConfig ( [ 'mySplit' ] , undefined , evaluationOptions ) ;
281
297
282
298
// We can call getTreatmentsByFlagSet with or without a key.
283
299
treatments = client . getTreatmentsByFlagSet ( splitKey , 'set_a' ) ;
284
300
treatments = browserClient . getTreatmentsByFlagSet ( 'set_a' ) ;
285
- // Attributes parameter is optional.
301
+ // Attributes and EvaluationOptions parameters are optional
286
302
treatments = client . getTreatmentsByFlagSet ( splitKey , 'set_a' , attributes ) ;
303
+ treatments = client . getTreatmentsByFlagSet ( splitKey , 'set_a' , undefined , evaluationOptions ) ;
287
304
treatments = browserClient . getTreatmentsByFlagSet ( 'set_a' , attributes ) ;
305
+ treatments = browserClient . getTreatmentsByFlagSet ( 'set_a' , undefined , evaluationOptions ) ;
288
306
289
307
// We can call getTreatmentsByFlagSets with or without a key.
290
308
treatments = client . getTreatmentsByFlagSets ( splitKey , [ 'set_a' ] ) ;
291
309
treatments = browserClient . getTreatmentsByFlagSets ( [ 'set_a' ] ) ;
292
- // Attributes parameter is optional.
310
+ // Attributes and EvaluationOptions parameters are optional
293
311
treatments = client . getTreatmentsByFlagSets ( splitKey , [ 'set_a' ] , attributes ) ;
312
+ treatments = client . getTreatmentsByFlagSets ( splitKey , [ 'set_a' ] , undefined , evaluationOptions ) ;
294
313
treatments = browserClient . getTreatmentsByFlagSets ( [ 'set_a' ] , attributes ) ;
314
+ treatments = browserClient . getTreatmentsByFlagSets ( [ 'set_a' ] , undefined , evaluationOptions ) ;
295
315
296
316
// We can call getTreatmentsWithConfigByFlagSet with or without a key.
297
317
treatmentsWithConfig = client . getTreatmentsWithConfigByFlagSet ( splitKey , 'set_a' ) ;
298
318
treatmentsWithConfig = browserClient . getTreatmentsWithConfigByFlagSet ( 'set_a' ) ;
299
- // Attributes parameter is optional.
319
+ // Attributes and EvaluationOptions parameters are optional
300
320
treatmentsWithConfig = client . getTreatmentsWithConfigByFlagSet ( splitKey , 'set_a' , attributes ) ;
321
+ treatmentsWithConfig = client . getTreatmentsWithConfigByFlagSet ( splitKey , 'set_a' , undefined , evaluationOptions ) ;
301
322
treatmentsWithConfig = browserClient . getTreatmentsWithConfigByFlagSet ( 'set_a' , attributes ) ;
323
+ treatmentsWithConfig = browserClient . getTreatmentsWithConfigByFlagSet ( 'set_a' , undefined , evaluationOptions ) ;
302
324
303
325
// We can call getTreatmentsWithConfigByFlagSets with or without a key.
304
326
treatmentsWithConfig = client . getTreatmentsWithConfigByFlagSets ( splitKey , [ 'set_a' ] ) ;
305
327
treatmentsWithConfig = browserClient . getTreatmentsWithConfigByFlagSets ( [ 'set_a' ] ) ;
306
- // Attributes parameter is optional.
328
+ // Attributes and EvaluationOptions parameters are optional
307
329
treatmentsWithConfig = client . getTreatmentsWithConfigByFlagSets ( splitKey , [ 'set_a' ] , attributes ) ;
330
+ treatmentsWithConfig = client . getTreatmentsWithConfigByFlagSets ( splitKey , [ 'set_a' ] , undefined , evaluationOptions ) ;
308
331
treatmentsWithConfig = browserClient . getTreatmentsWithConfigByFlagSets ( [ 'set_a' ] , attributes ) ;
332
+ treatmentsWithConfig = browserClient . getTreatmentsWithConfigByFlagSets ( [ 'set_a' ] , undefined , evaluationOptions ) ;
309
333
310
334
// We can call track with or without a key.
311
335
tracked = client . track ( splitKey , 'myTrafficType' , 'myEventType' ) ; // all params
@@ -343,43 +367,51 @@ promise = AsyncSDK.destroy();
343
367
344
368
// We can call getTreatment but always with a key.
345
369
asyncTreatment = asyncClient . getTreatment ( splitKey , 'mySplit' ) ;
346
- // Attributes parameter is optional
370
+ // Attributes and EvaluationOptions parameters are optional
347
371
asyncTreatment = asyncClient . getTreatment ( splitKey , 'mySplit' , attributes ) ;
372
+ asyncTreatment = asyncClient . getTreatment ( splitKey , 'mySplit' , undefined , evaluationOptions ) ;
348
373
349
374
// We can call getTreatments but always with a key.
350
375
asyncTreatments = asyncClient . getTreatments ( splitKey , [ 'mySplit' ] ) ;
351
- // Attributes parameter is optional
376
+ // Attributes and EvaluationOptions parameters are optional
352
377
asyncTreatments = asyncClient . getTreatments ( splitKey , [ 'mySplit' ] , attributes ) ;
378
+ asyncTreatments = asyncClient . getTreatments ( splitKey , [ 'mySplit' ] , undefined , evaluationOptions ) ;
353
379
354
380
// We can call getTreatmentWithConfig but always with a key.
355
381
asyncTreatmentWithConfig = asyncClient . getTreatmentWithConfig ( splitKey , 'mySplit' ) ;
356
- // Attributes parameter is optional
382
+ // Attributes and EvaluationOptions parameters are optional
357
383
asyncTreatmentWithConfig = asyncClient . getTreatmentWithConfig ( splitKey , 'mySplit' , attributes ) ;
384
+ asyncTreatmentWithConfig = asyncClient . getTreatmentWithConfig ( splitKey , 'mySplit' , undefined , evaluationOptions ) ;
358
385
359
386
// We can call getTreatments but always with a key.
360
387
asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfig ( splitKey , [ 'mySplit' ] ) ;
361
- // Attributes parameter is optional
388
+ // Attributes and EvaluationOptions parameters are optional
362
389
asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfig ( splitKey , [ 'mySplit' ] , attributes ) ;
390
+ asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfig ( splitKey , [ 'mySplit' ] , undefined , evaluationOptions ) ;
363
391
364
392
// We can call getTreatmentsByFlagSet
365
393
asyncTreatments = asyncClient . getTreatmentsByFlagSet ( splitKey , 'set_a' ) ;
366
- // Attributes parameter is optional
394
+ // Attributes and EvaluationOptions parameters are optional
367
395
asyncTreatments = asyncClient . getTreatmentsByFlagSet ( splitKey , 'set_a' , attributes ) ;
396
+ asyncTreatments = asyncClient . getTreatmentsByFlagSet ( splitKey , 'set_a' , undefined , evaluationOptions ) ;
368
397
369
398
// We can call getTreatmentsByFlagSets
370
399
asyncTreatments = asyncClient . getTreatmentsByFlagSets ( splitKey , [ 'set_a' ] ) ;
371
- // Attributes parameter is optional
400
+ // Attributes and EvaluationOptions parameters are optional
372
401
asyncTreatments = asyncClient . getTreatmentsByFlagSets ( splitKey , [ 'set_a' ] , attributes ) ;
402
+ asyncTreatments = asyncClient . getTreatmentsByFlagSets ( splitKey , [ 'set_a' ] , undefined , evaluationOptions ) ;
373
403
374
404
// We can call getTreatmentsWithConfigByFlagSet
375
405
asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfigByFlagSet ( splitKey , 'set_a' ) ;
376
- // Attributes parameter is optional
406
+ // Attributes and EvaluationOptions parameters are optional
377
407
asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfigByFlagSet ( splitKey , 'set_a' , attributes ) ;
408
+ asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfigByFlagSet ( splitKey , 'set_a' , undefined , evaluationOptions ) ;
378
409
379
410
// We can call getTreatmentsByFlagSets but always with a key.
380
411
asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfigByFlagSets ( splitKey , [ 'set_a' ] ) ;
381
- // Attributes parameter is optional
412
+ // Attributes and EvaluationOptions parameters are optional
382
413
asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfigByFlagSets ( splitKey , [ 'set_a' ] , attributes ) ;
414
+ asyncTreatmentsWithConfig = asyncClient . getTreatmentsWithConfigByFlagSets ( splitKey , [ 'set_a' ] , undefined , evaluationOptions ) ;
383
415
384
416
// We can call track only with a key.
385
417
trackPromise = asyncClient . track ( splitKey , 'myTrafficType' , 'myEventType' ) ; // all required params
0 commit comments