File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 28
28
},
29
29
"dependencies" : {
30
30
"@optimizely/js-sdk-logging" : " ^0.1.0" ,
31
- "@optimizely/optimizely-sdk" : " 3.3.2 " ,
31
+ "@optimizely/optimizely-sdk" : " 3.4.1 " ,
32
32
"hoist-non-react-statics" : " ^3.3.0" ,
33
33
"prop-types" : " ^15.6.2" ,
34
34
"utility-types" : " ^2.1.0"
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ describe('ReactSDKClient', () => {
40
40
getFeatureVariableDouble : jest . fn ( ( ) => null ) ,
41
41
getFeatureVariableInteger : jest . fn ( ( ) => null ) ,
42
42
getFeatureVariableString : jest . fn ( ( ) => null ) ,
43
+ getOptimizelyConfig : jest . fn ( ( ) => null ) ,
43
44
onReady : jest . fn ( ( ) => Promise . resolve ( { success : false } ) ) ,
44
45
close : jest . fn ( ) ,
45
46
notificationCenter : {
Original file line number Diff line number Diff line change 1
1
/**
2
- * Copyright 2019, Optimizely
2
+ * Copyright 2019-2020 , Optimizely
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -99,6 +99,8 @@ export interface ReactSDKClient extends optimizely.Client {
99
99
overrideAttributes ?: optimizely . UserAttributes ,
100
100
) : Array < string >
101
101
102
+ getOptimizelyConfig ( ) : optimizely . OptimizelyConfig | null ;
103
+
102
104
track (
103
105
eventKey : string ,
104
106
overrideUserId ?: string | optimizely . EventTags ,
@@ -578,6 +580,14 @@ class OptimizelyReactSDKClient implements ReactSDKClient {
578
580
return this . _client . setForcedVariation ( experiment , finalUserId , finalVariationKey )
579
581
}
580
582
583
+ /**
584
+ * Returns OptimizelyConfig object containing experiments and features data
585
+ * @returns {optimizely.OptimizelyConfig | null } optimizely config
586
+ */
587
+ public getOptimizelyConfig ( ) : optimizely . OptimizelyConfig | null {
588
+ return this . _client . getOptimizelyConfig ( )
589
+ }
590
+
581
591
/**
582
592
* Cleanup method for killing an running timers and flushing eventQueue
583
593
*/
You can’t perform that action at this time.
0 commit comments