UNPKG

@sap-ux/store

Version:

NPM module for storing persistent data

41 lines 1.2 kB
import { type Logger } from '@sap-ux/logger'; import type { SecureStore } from './types.js'; import type { keyring } from '@zowe/secrets-for-zowe-sdk'; type Entities<T> = { [key: string]: T; }; export declare class KeyStoreManager implements SecureStore { private readonly log; private readonly keyring; constructor(log: Logger, zoweSecretSdk: typeof keyring); /** * Helper function for serializing objects */ private serialize; /** * Helper function for deserializing objects */ private deserialize; /** * Validate input parameters for service and key */ private validateInput; /** * Save credentials to the keyring */ save<T>(service: string, key: string, value: T): Promise<boolean>; /** * Retrieve credentials from the keyring */ retrieve<T>(service: string, key: string): Promise<T | undefined>; /** * Delete credentials from the keyring */ delete(service: string, key: string): Promise<boolean>; /** * Retrieve all credentials for a given service */ getAll<T>(service: string): Promise<Entities<T>>; } export {}; //# sourceMappingURL=key-store.d.ts.map