/** * MSW handler factory functions */ import { type RequestHandler } from 'msw'; import type { MockHandlerOptions, MockRequest, MockResponseFactory } from '../types'; /** * Create a single MSW handler */ export declare function createHandler(method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', path: string, options: MockHandlerOptions): RequestHandler; /** * Create multiple handlers from configuration */ export declare function createHandlers(handlerConfigs: Array<{ method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; path: string; options: MockHandlerOptions; }>): RequestHandler[]; /** * Create a GET handler */ export declare function createGetHandler(path: string, response: MockResponseFactory, options?: Omit, 'response'>): RequestHandler; /** * Create a POST handler */ export declare function createPostHandler(path: string, response: MockResponseFactory, options?: Omit, 'response'>): RequestHandler; /** * Create a PUT handler */ export declare function createPutHandler(path: string, response: MockResponseFactory, options?: Omit, 'response'>): RequestHandler; /** * Create a PATCH handler */ export declare function createPatchHandler(path: string, response: MockResponseFactory, options?: Omit, 'response'>): RequestHandler; /** * Create a DELETE handler */ export declare function createDeleteHandler(path: string, response: MockResponseFactory, options?: Omit, 'response'>): RequestHandler; /** * Create a simple success response handler */ export declare function createSuccessHandler(method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', path: string, data: T | ((request: MockRequest) => T | Promise), options?: Omit, 'response'>): RequestHandler; /** * Create an error response handler */ export declare function createErrorHandler(method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', path: string, error: { status: number; code: string; message: string; details?: any; }, options?: Omit): RequestHandler; /** * Create a handler that returns different responses based on conditions */ export declare function createConditionalHandler(method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', path: string, conditions: Array<{ condition: (request: MockRequest) => boolean | Promise; response: MockResponseFactory; }>, fallbackResponse: MockResponseFactory, options?: Omit, 'response'>): RequestHandler; //# sourceMappingURL=factory.d.ts.map