/** * AssertionRegistry * * Manages assertion handler registration and lookup. * Provides a central registry for all assertion types. */ import { HttpResponse, HttpRequest } from '../types'; import { IAssertionHandler, AssertionResult } from './IAssertionHandler'; /** * Registration options */ export interface RegistrationOptions { /** Force replace existing handler of same type */ force?: boolean; } /** * Assertion input for bulk assertions */ export interface AssertionInput { key: string; value: string; } export declare class AssertionRegistry { private handlers; /** * Register a handler * @param handler The handler to register * @param options Registration options * @throws Error if handler type already registered (unless force=true) */ register(handler: IAssertionHandler, options?: RegistrationOptions): void; /** * Check if a handler type is registered */ hasHandler(type: string): boolean; /** * Get the number of registered handlers */ getHandlerCount(): number; /** * Find a handler that can process the given assertion key * @param key The assertion key * @returns The handler or null if not found */ findHandler(key: string): IAssertionHandler | null; /** * Perform a single assertion * @param key The assertion key * @param value The expected value * @param response The HTTP response * @param request Optional HTTP request * @returns The assertion result * @throws Error if no handler found */ assert(key: string, value: string, response: HttpResponse, request?: HttpRequest): AssertionResult; /** * Perform multiple assertions * @param assertions Array of assertion inputs * @param response The HTTP response * @param request Optional HTTP request * @returns Array of assertion results */ assertAll(assertions: AssertionInput[], response: HttpResponse, request?: HttpRequest): AssertionResult[]; /** * Create a registry with all default handlers */ static createDefault(): AssertionRegistry; }