UNPKG

@rytass/secret-adapter-vault

Version:

Rytass Secret Vault adapter

33 lines (32 loc) 1.16 kB
import { SecretManager } from '@rytass/secret'; import { VaultSecretOptions } from './typings'; import { VaultSecretState, VaultGetType, VaultSetType, VaultDeleteType } from './typings'; export declare class VaultSecret<Options extends VaultSecretOptions> extends SecretManager { private readonly _host; private readonly _auth; private readonly _tokenTTL; private readonly _sessionInterval?; private _state; private emitter; private _tokenExpiredOn?; private _token?; private _online; private _cacheData; private _cacheVersion; constructor(path: string, options: Options); private checkRenew; private retrieveToken; private retrieveTokenByUserPass; private renewToken; private getSecretVersionOnline; private getSecretValue; private fullReplaceSecretValue; private setSecretValueOnline; private removeSecretKeyOnline; terminate(): void; get state(): VaultSecretState; get<T>(key: string): VaultGetType<Options, T>; set<T>(key: string, value: T): VaultSetType<Options>; delete(key: string): VaultDeleteType<Options>; sync(force?: boolean): Promise<void>; }