/**
 * A persistence store that can be used to store data for a given session id and key
 * The store is namespaced by the stateKey and the sessionId allows for multiple instances
 * of data to be created with the same store using the session id as the discriminator.
 * The store is backed by a {@link KeyValue} model.
 * @public
 * @interface
 */
export interface PersistenceStoreAware {
    /** The key value data store */
    store: KosPersistenceStore;
    /** The sessionId to be used when multiple instances of a persistence store are required for a given namespace */
    sessionId: string;
    /** The stateKey used to namespace the store */
    stateKey: string;
}
export interface KosPersistenceStore {
    /**
     * Update the state of the store for a given key.  The session id of the store instance
     * will be used to segregate the data.  For example, if the session id is "my-session" and the
     * key is "my-key", the data will be stored as "my-session-my-key". However the session id is not
     * externally visible and is managed by the store.
     *
     * @param key - the key to update
     * @param value - the value to update
     *
     */
    updateState(key: string, value: string | number | boolean | undefined): Promise<void>;
    /**
     * Clean all the data from the store for the given session id
     */
    clean(): void;
    /**
     * Retrieve the state of the store for a given key.  The session id of the store instance
     * will be used to retrieve the data.
     * @param key - the key to retrieve
     * @returns the value of the key or undefined if the key does not exist
     */
    getState(key: string): string | number | boolean | undefined;
    /**
     * Unsubscribe from the store.  This will remove the store from the persistence layer
     */
    unsubscribe(): void;
}
/**
 * Subscribe to a KOS Persistence Store or create a new one
 * The store will be namespaced by the stateKey and the sessionId allows
 * for multiple instances of data to be created with the same store using eh session id
 * as the discriminator.
 *
 * If the sessionId is not provided, the store will be global
 *
 * @param stateKey - the namespace of the given persistence store
 * @param sessionId - the data partition with the namespace that the store will operate within
 * @returns a {@link KosPersistenceStore} instance
 */
export declare const subscribeStore: (stateKey: string, sessionId?: string) => Promise<KosPersistenceStore>;
//# sourceMappingURL=persistence-store.d.ts.map