import { type IDataVaultService, type ISecretsService, type Manifest, type PermissionEntry, type Result, type SecretScopeOptions } from "@tinycloud/sdk-core";
import type { VaultError } from "@tinycloud/sdk-core";
type RequestPermissions = (additional: PermissionEntry[]) => Promise<{
    approved: boolean;
    delegations?: readonly unknown[];
}>;
export interface WebSecretsServiceConfig {
    getService: () => ISecretsService;
    space?: string;
    getManifest: () => Manifest | Manifest[] | undefined;
    requestPermissions: RequestPermissions;
    resolveSpace?: (space: string) => string;
    getUnlockSigner?: () => unknown;
}
export declare class WebSecretsService implements ISecretsService {
    private readonly config;
    private unlockSigner?;
    private shouldRestoreUnlock;
    constructor(config: WebSecretsServiceConfig);
    private get space();
    get vault(): IDataVaultService;
    get isUnlocked(): boolean;
    unlock(signer?: unknown): Promise<Result<void, VaultError>>;
    lock(): void;
    get(name: string, options?: SecretScopeOptions): ReturnType<ISecretsService["get"]>;
    put(name: string, value: string, options?: SecretScopeOptions): ReturnType<ISecretsService["put"]>;
    delete(name: string, options?: SecretScopeOptions): ReturnType<ISecretsService["delete"]>;
    list(options?: SecretScopeOptions): ReturnType<ISecretsService["list"]>;
    private get service();
    private ensureMutationPermission;
    private restoreUnlockAfterEscalation;
    private hasMutationPermission;
}
export {};
//# sourceMappingURL=WebSecretsService.d.ts.map