Skip to content

Commit 28ac953

Browse files
authored
update: Export Decide API Interfaces (#639)
Summary: Newly added Decide APIs have added new interfaces which were not exported, this PR exports them. Test plan: - Manually tested by using decide apis in react sdk. - Unit Tests pass - Full stack compat suite tests pass.
1 parent 599b694 commit 28ac953

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ declare module '@optimizely/optimizely-sdk' {
6161

6262
export type ListenerPayload = import('./shared_types').ListenerPayload;
6363

64+
export type OptimizelyUserContext = import('./optimizely_user_context').default;
65+
66+
export type OptimizelyDecision = import('./optimizely_decision').OptimizelyDecision;
67+
68+
export type OptimizelyDecideOptions = import('./shared_types').OptimizelyDecideOptions;
69+
6470
export type NotificationListener<T extends ListenerPayload> = import('./shared_types').NotificationListener<T>;
6571

6672
// The options object given to Optimizely.createInstance.
@@ -90,6 +96,10 @@ declare module '@optimizely/optimizely-sdk' {
9096

9197
export interface Client {
9298
notificationCenter: NotificationCenter;
99+
createUserContext(
100+
userId: string,
101+
attributes?: UserAttributes
102+
): OptimizelyUserContext | null;
93103
activate(
94104
experimentKey: string,
95105
userId: string,

0 commit comments

Comments
 (0)