export type JestMockLike = { (...args: any[]): any; mockClear?: () => void; mockResolvedValue?: (value: any) => any; mockReturnValue?: (value: any) => any; }; export interface MockWhoisResponse { [key: string]: string; } export interface MockOpenAIResponse { choices: Array<{ message: { content: string; }; }>; } export interface MockNodemailerTransport { sendMail: JestMockLike; } export interface MockNodemailerResult { mockCreateTransport: JestMockLike; mockTransport: MockNodemailerTransport; nodemailer: { createTransport: JestMockLike; }; } export interface MockWhoisResult { mockWhois: JestMockLike; whois: JestMockLike; } export interface MockOpenAIResult { mockCreate: JestMockLike; openai: { default: new () => { chat: { completions: { create: JestMockLike; }; }; }; }; } /** * Create a mock for whois-json module * @returns Object containing the mock function and module structure */ export declare const createMockWhois: () => MockWhoisResult; /** * Create a mock for OpenAI SDK * @returns Object containing the mock create function and SDK structure */ export declare const createMockOpenAI: () => MockOpenAIResult; /** * Create a mock for nodemailer module * @returns Object containing mock transport and createTransport function */ export declare const createMockNodemailer: () => MockNodemailerResult; /** * Default mock data for consistent testing across test suites * Use these defaults for predictable test behavior */ export declare const DEFAULT_MOCK_DATA: { whois: { success: MockWhoisResponse; empty: MockWhoisResponse; }; openai: { success: MockOpenAIResponse; }; nodemailer: { success: { messageId: string; accepted: string[]; rejected: never[]; }; }; }; export interface SetupManualMocksResult { mockWhois: JestMockLike; mockCreate: JestMockLike; mockCreateTransport: JestMockLike; } /** * Setup all manual mocks at once using jest.unstable_mockModule for ESM compatibility * ESM-safe: in Jest ESM mode, static imports are evaluated before jest.mock() * so we must use jest.unstable_mockModule and import targets after this is called. * @returns Object containing all created mock functions */ export declare const setupManualMocks: () => Promise; /** * Clear all mocks efficiently - calls jest.clearAllMocks plus any passed mocks * More generic than resetMocks, works with any jest.Mock instances * @param mocks - Variable number of mock functions to clear */ export declare const clearAllMocks: (...mocks: JestMockLike[]) => void; //# sourceMappingURL=serviceMocks.d.ts.map