//#region src/utils/apiKeys.d.ts type ApiKeyGenerationResult = { id: string; publicId: string; key: string; keyHash: string; keyPrefix: string; }; /** * Generate a new API key with secure random bytes */ declare function generateApiKey(): Promise; declare const getMetadataFromApiKey: (key: string) => { tenantId: string; projectId: string; } | null; /** * Hash an API key using scrypt */ declare function hashApiKey(key: string): Promise; /** * Validate an API key against its hash */ declare function validateApiKey(key: string, storedHash: string): Promise; /** * Check if an API key has expired */ declare function isApiKeyExpired(expiresAt?: string | null): boolean; /** * Extract the publicId from an API key */ declare function extractPublicId(key: string): string | null; /** * Mask an API key for display (show only prefix and last 4 chars) */ declare function maskApiKey(keyPrefix: string): string; type AppCredentialResult = { id: string; }; declare function generateAppCredential(): AppCredentialResult; declare function sanitizeAppConfig(app: T): T; //#endregion export { ApiKeyGenerationResult, AppCredentialResult, extractPublicId, generateApiKey, generateAppCredential, getMetadataFromApiKey, hashApiKey, isApiKeyExpired, maskApiKey, sanitizeAppConfig, validateApiKey };