import { Target } from "./types"; import { PayloadRepository } from "@octokit/webhooks"; export interface LockStore { lock(key: string, handler: () => {}): Promise; lockEnv(repoId: number, env: string): Promise; unlockEnv(repoId: number, env: string): Promise; isLockedEnv(repoId: number, env: string): Promise; } export interface Watch { repository: PayloadRepository; id: string; target: string; targetVal: Target; sha: string; ref: string; } export interface WatchStore { addWatch(repoId: number, watch: Watch): Promise; delWatch(repoId: number, watch: Watch): Promise; listWatchBySha(repoId: number, sha: string): Promise; } export declare class InMemStore implements LockStore, WatchStore { private locks; private watches; clear(): void; addWatch(repoId: number, watch: Watch): Promise; delWatch(repoId: number, watch: Watch): Promise; listWatchBySha(repoId: number, sha: string): Promise; lockEnv(repoId: number, env: string): Promise; unlockEnv(repoId: number, env: string): Promise; isLockedEnv(repoId: number, env: string): Promise; lock(key: string, handler: () => Promise): Promise; }