import type { ObjectWithKeysFromStringArray } from '../../helper/types/ObjectWithKeysFromStringArray.js'; import type { EmptyObject } from '../types/EmptyObject.js'; import type { Logger } from '../types/Logger.js'; import type { Prettify } from '../types/Prettify.js'; import type { StoreBaseConfig } from '../types/StoreBaseConfig.js'; import type { SecretStoreCacheMap } from './types/SecretStoreCacheMap.js'; /** * Base class for secret store adapters. * * The base class enforces operation toggles and optional cache behavior before * delegating to adapter implementations. Adapter logs, traces, metrics, and * errors must never include secret values. * * The actual store implementation must overwrite the protected methods: * * - `getSecretImpl` * - `setSecretImpl` * - `removeSecretImpl` * * __DO NOT OVERWRITE__: the regular methods getSecret, setSecret or removeSecret * * @group Store */ export declare abstract class SecretStoreBaseClass = EmptyObject> { /** Child logger scoped to the store name. */ logger: Logger; /** Store configuration including operation toggles and cache settings. */ config: Prettify>; /** Store name used in logs and diagnostics. */ name: string; /** Optional in-memory cache of secret values. */ cache: SecretStoreCacheMap; constructor(name: string, config: StoreBaseConfig); /** * Adapter-specific secret lookup implementation. * * Implementations must not log returned secret values. */ protected abstract getSecretImpl(...secretNames: SecretNames): Promise>; /** * Get one or more secrets by name. * * Returned values are sensitive. Keep them out of logs, metrics, traces, * events, queue headers, and error payloads. */ getSecret(...secretNames: SecretNames): Promise>; /** Adapter-specific secret removal implementation. */ protected abstract removeSecretImpl(_secretName: string): Promise; /** Remove one secret by name. */ removeSecret(secretName: string): Promise; /** * Adapter-specific secret write implementation. * * Implementations must not log `secretValue`. */ protected abstract setSecretImpl(_secretName: string, _secretValue: string): Promise; /** Store or replace one secret value. */ setSecret(secretName: string, secretValue: string): Promise; /** Shutdown hook for store adapters. */ destroy(): Promise; } //# sourceMappingURL=SecretStoreBaseClass.impl.d.ts.map