///
import { AsyncMap } from '@eppo/js-client-sdk-common';
import { Attributes } from '@eppo/js-client-sdk-common';
import { AttributeType } from '@eppo/js-client-sdk-common';
import { BanditActions } from '@eppo/js-client-sdk-common';
import { BanditSubjectAttributes } from '@eppo/js-client-sdk-common';
import { ContextAttributes } from '@eppo/js-client-sdk-common';
import { EppoAssignmentLogger } from '@eppo/js-client-sdk-common';
import { EppoClient } from '@eppo/js-client-sdk-common';
import { EppoPrecomputedClient } from '@eppo/js-client-sdk-common';
import { EventDispatcher } from '@eppo/js-client-sdk-common';
import { Flag } from '@eppo/js-client-sdk-common';
import { FlagKey } from '@eppo/js-client-sdk-common';
import { IAssignmentDetails } from '@eppo/js-client-sdk-common';
import { IAssignmentEvent } from '@eppo/js-client-sdk-common';
import { IAssignmentLogger } from '@eppo/js-client-sdk-common';
import { IAsyncStore } from '@eppo/js-client-sdk-common';
import { IBanditEvent } from '@eppo/js-client-sdk-common';
import { IBanditLogger } from '@eppo/js-client-sdk-common';
import { IContainerExperiment } from '@eppo/js-client-sdk-common';
import { ObfuscatedFlag } from '@eppo/js-client-sdk-common';
export { Attributes }
export { AttributeType }
export { BanditActions }
export { BanditSubjectAttributes }
/**
* Builds a storage key suffix from an API key.
* @param apiKey - The API key to build the suffix from
* @returns A string suffix for storage keys
* @public
*/
export declare function buildStorageKeySuffix(apiKey: string): string;
/** Chrome storage-backed {@link AsyncMap}. */
declare class ChromeStorageAsyncMap implements AsyncMap {
private readonly storage;
constructor(storage: chrome.storage.StorageArea);
has(key: string): Promise;
get(key: string): Promise;
entries(): Promise<{
[p: string]: T;
}>;
set(key: string, value: T): Promise;
}
/**
* Chrome storage implementation of a string-valued store for storing a configuration and its metadata.
*
* This serializes the entire configuration object into a string and then stores it to a single key
* within the object for another single top-level key.
* Same with metadata about the store (e.g., when it was last updated).
*
* Note: this behaves a bit differently than local storage as the chrome storage API gets and sets
* subsets of key-value pairs, so we have to dereference or re-specify the key.
* @public
*/
export declare class ChromeStorageEngine implements IStringStorageEngine {
private storageMap;
private readonly contentsKey;
private readonly metaKey;
constructor(storageMap: ChromeStorageAsyncMap, storageKeySuffix: string);
getContentsJsonString: () => Promise;
getMetaJsonString: () => Promise;
setContentsJsonString: (configurationJsonString: string) => Promise;
setMetaJsonString: (metaJsonString: string) => Promise;
}
export { ContextAttributes }
export { EppoAssignmentLogger }
/**
* Client for assigning experiment variations.
* @public
*/
export declare class EppoJSClient extends EppoClient {
/**
* @deprecated Use `getInstance()` instead.
*/
static instance: EppoJSClient;
static initialized: boolean;
private initialized;
getStringAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record, defaultValue: string): string;
getStringAssignmentDetails(flagKey: string, subjectKey: string, subjectAttributes: Record, defaultValue: string): IAssignmentDetails;
/**
* @deprecated Use getBooleanAssignment instead
*/
getBoolAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record, defaultValue: boolean): boolean;
getBooleanAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record, defaultValue: boolean): boolean;
getBooleanAssignmentDetails(flagKey: string, subjectKey: string, subjectAttributes: Record, defaultValue: boolean): IAssignmentDetails;
getIntegerAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record, defaultValue: number): number;
getIntegerAssignmentDetails(flagKey: string, subjectKey: string, subjectAttributes: Record, defaultValue: number): IAssignmentDetails;
getNumericAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record, defaultValue: number): number;
getNumericAssignmentDetails(flagKey: string, subjectKey: string, subjectAttributes: Record, defaultValue: number): IAssignmentDetails;
getJSONAssignment(flagKey: string, subjectKey: string, subjectAttributes: Record, defaultValue: object): object;
getJSONAssignmentDetails(flagKey: string, subjectKey: string, subjectAttributes: Record, defaultValue: object): IAssignmentDetails