import { HandlerContext } from "@atomist/automation-client"; import { PreferenceScope, PreferenceStore } from "@atomist/sdm"; export interface Preference { name: string; namespace: string; value: string; ttl: number; } /** * Abstract PreferenceStore implementation to handle ttl and key scoping */ export declare abstract class AbstractPreferenceStore implements PreferenceStore { private readonly ctx; protected constructor(ctx: HandlerContext); get(key: string, options?: { scope?: PreferenceScope | string; defaultValue?: V; }): Promise; put(key: string, value: V, options?: { scope?: PreferenceScope | string; ttl?: number; }): Promise; list(scope: PreferenceScope | string): Promise>; delete(key: string, options?: { scope?: PreferenceScope | string; }): Promise; protected abstract doGet(key: string, namespace: string): Promise; protected abstract doPut(pref: Preference): Promise; protected abstract doList(namespace: string): Promise; protected abstract doDelete(key: string, namespace: string): Promise; protected scopeKey(key: string, scope?: string): string; protected scope(scope: PreferenceScope | string): string; } //# sourceMappingURL=AbstractPreferenceStore.d.ts.map