import { IClient } from '../models/Client'; export interface AuthResult { isValid: boolean; clientId?: string; client?: IClient; error?: string; } /** * Hash an API key using SHA-256 * @param apiKey - The API key to hash * @returns Hashed API key */ export declare function hashApiKey(apiKey: string): string; /** * Verify an API key against a hash * @param apiKey - The API key to verify * @param hash - The stored hash to compare against * @returns True if API key matches hash */ export declare function verifyApiKey(apiKey: string, hash: string): boolean; /** * Validate API key format * @param apiKey - API key to validate * @returns True if format is valid */ export declare function validateApiKeyFormat(apiKey: string): boolean; /** * Extract client ID from API key (if embedded) or validate format * @param apiKey - API key * @returns Environment type (live/test) */ export declare function getApiKeyEnvironment(apiKey: string): 'live' | 'test' | null; /** * Service for authentication and authorization */ export declare class AuthService { /** * Validates an API key and returns client information * @param apiKey - The API key to validate * @returns AuthResult with validation status and client info */ static validateApiKey(apiKey: string): Promise; /** * Validates API key and clientId match * @param apiKey - The API key * @param clientId - The client ID to verify * @returns AuthResult with validation status */ static validateApiKeyAndClientId(apiKey: string, clientId: string): Promise; /** * Get client information by clientId * @param clientId - The client ID * @returns Client document or null */ static getClientById(clientId: string): Promise; }