6
6
7
7
/// <reference types = " chrome" />
8
8
9
+ import { AttributeType } from ' @eppo/js-client-sdk-common' ;
9
10
import { EppoClient } from ' @eppo/js-client-sdk-common' ;
10
11
import { Flag } from ' @eppo/js-client-sdk-common' ;
11
12
import { IAssignmentEvent } from ' @eppo/js-client-sdk-common' ;
12
13
import { IAssignmentLogger } from ' @eppo/js-client-sdk-common' ;
13
14
import { IAsyncStore } from ' @eppo/js-client-sdk-common' ;
14
15
import { IEppoClient } from ' @eppo/js-client-sdk-common' ;
15
16
16
- // @public (undocumented)
17
- export class ChromeStorageAsyncStore <T > implements IAsyncStore <T > {
18
- constructor (storageArea : chrome .storage .StorageArea , cooldownSeconds ? : number | undefined );
17
+ // Warning: (ae-forgotten-export) The symbol "IStringStorageEngine" needs to be exported by the entry point index.d.ts
18
+ //
19
+ // @public
20
+ export class ChromeStorageEngine implements IStringStorageEngine {
21
+ constructor (storageArea : chrome .storage .StorageArea );
19
22
// (undocumented)
20
- getEntries() : Promise <Record < string , T > >;
23
+ getContentsJsonString : () => Promise <string | null >;
21
24
// (undocumented)
22
- isExpired() : Promise <boolean >;
25
+ getMetaJsonString : () => Promise <string | null >;
23
26
// (undocumented)
24
- isInitialized() : boolean ;
27
+ setContentsJsonString : ( configurationJsonString : string ) => Promise < void > ;
25
28
// (undocumented)
26
- setEntries( entries : Record < string , T >) : Promise <void >;
29
+ setMetaJsonString : ( metaJsonString : string ) => Promise <void >;
27
30
}
28
31
29
32
// @public
30
33
export class EppoJSClient extends EppoClient {
31
- // (undocumented)
32
- getBoolAssignment(flagKey : string , subjectKey : string , subjectAttributes : Record <string , any >, defaultValue : boolean ): boolean ;
34
+ // @deprecated (undocumented)
35
+ getBoolAssignment(flagKey : string , subjectKey : string , subjectAttributes : Record <string , AttributeType >, defaultValue : boolean ): boolean ;
33
36
// (undocumented)
34
37
getBooleanAssignment(flagKey : string , subjectKey : string , subjectAttributes : Record <string , any >, defaultValue : boolean ): boolean ;
35
38
// (undocumented)
36
- getIntegerAssignment(flagKey : string , subjectKey : string , subjectAttributes : Record <string , any >, defaultValue : number ): number ;
39
+ getIntegerAssignment(flagKey : string , subjectKey : string , subjectAttributes : Record <string , AttributeType >, defaultValue : number ): number ;
37
40
// (undocumented)
38
- getJSONAssignment(flagKey : string , subjectKey : string , subjectAttributes : Record <string , any >, defaultValue : object ): object ;
41
+ getJSONAssignment(flagKey : string , subjectKey : string , subjectAttributes : Record <string , AttributeType >, defaultValue : object ): object ;
39
42
// (undocumented)
40
- getNumericAssignment(flagKey : string , subjectKey : string , subjectAttributes : Record <string , any >, defaultValue : number ): number ;
43
+ getNumericAssignment(flagKey : string , subjectKey : string , subjectAttributes : Record <string , AttributeType >, defaultValue : number ): number ;
41
44
// (undocumented)
42
- getStringAssignment(flagKey : string , subjectKey : string , subjectAttributes : Record <string , any >, defaultValue : string ): string ;
45
+ getStringAssignment(flagKey : string , subjectKey : string , subjectAttributes : Record <string , AttributeType >, defaultValue : string ): string ;
43
46
// (undocumented)
44
47
static initialized: boolean ;
45
48
// (undocumented)
@@ -60,6 +63,7 @@ export interface IClientConfig {
60
63
apiKey: string ;
61
64
assignmentLogger: IAssignmentLogger ;
62
65
baseUrl? : string ;
66
+ maxCacheAgeSeconds? : number ;
63
67
numInitialRequestRetries? : number ;
64
68
numPollRequestRetries? : number ;
65
69
persistentStore? : IAsyncStore <Flag >;
@@ -68,6 +72,9 @@ export interface IClientConfig {
68
72
requestTimeoutMs? : number ;
69
73
skipInitialRequest? : boolean ;
70
74
throwOnFailedInitialization? : boolean ;
75
+ // Warning: (ae-forgotten-export) The symbol "ServingStoreUpdateStrategy" needs to be exported by the entry point index.d.ts
76
+ updateOnFetch? : ServingStoreUpdateStrategy ;
77
+ useExpiredCache? : boolean ;
71
78
}
72
79
73
80
export { IEppoClient }
0 commit comments