/** * Secrets Resolver * * Utility for detecting and resolving $Secret{key} patterns at runtime. * This module handles: * - Pattern detection in strings and objects * - Secret fetching and caching * - Validation of scope and environment constraints * - Recursive resolution of nested objects */ import { ISecretCheck, ISecret, IResolveSecretsOptions, ISecretResolutionResult } from './secrets.types'; /** * Check if a string value is a secret reference */ export declare function isSecretReference(value: string): ISecretCheck; /** * Check if a string contains any secret references (partial matches) */ export declare function containsSecretReferences(value: string): boolean; /** * Extract all secret keys from a string */ export declare function extractSecretKeys(value: string): string[]; /** * Validate a secret against scope, environment, expiration, and revocation status */ export declare function validateSecret(secret: ISecret, options?: IResolveSecretsOptions): void; /** * Replace a single secret reference with its value */ export declare function replaceSecretInString(value: string, secretKey: string, secretValue: string): string; /** * Recursively find all secret references in an object */ export declare function findAllSecretReferences(obj: unknown): string[]; /** * Create a secrets resolver instance with caching */ export declare function createSecretsResolver(fetchSecret: (key: string) => Promise, options?: { cacheTtl?: number; }): { getSecret: (key: string) => Promise; resolveString: (value: string, resolveOptions?: IResolveSecretsOptions) => Promise>; resolveObject: (obj: T, resolveOptions?: IResolveSecretsOptions) => Promise>; clearCache: () => void; invalidate: (key: string) => void; findAllSecretReferences: typeof findAllSecretReferences; }; /** * Type guard to check if a value might contain secrets */ export declare function mightContainSecrets(value: unknown): boolean;