import { AIConfig } from "./config.js"; import { AmplitudeAI } from "./client.js"; //#region src/testing.d.ts interface MockEvent { event_type?: string; user_id?: string; device_id?: string; event_properties?: Record; user_properties?: Record; groups?: Record; } declare class MockAmplitudeAI extends AmplitudeAI { events: MockEvent[]; private _simulatedError; private _simulatedLatencyMs; constructor(config?: AIConfig); getEvents(eventType?: string): MockEvent[]; assertEventTracked(eventType: string, options?: { userId?: string; deviceId?: string; [key: string]: unknown; }): MockEvent; /** * Configure the mock to throw an error on the next tracking call. * Useful for testing error-handling paths in your application. * * @param type - Error type (e.g., 'rate_limit', 'network', 'auth') * @param message - Optional custom error message */ simulateError(type: string, message?: string): void; /** * Configure a simulated latency (in ms) added to each tracking call. * The delay is non-blocking (uses `setTimeout`), so the event loop * remains responsive during tests. * * Because tracking becomes asynchronous, use `await` or * `vi.advanceTimersByTime()` in tests to let events resolve. */ simulateLatency(ms: number): void; /** * Clear any simulated error or latency, restoring normal capture behavior. */ clearSimulations(): void; reset(): void; eventsForSession(sessionId: string): MockEvent[]; eventsForAgent(agentId: string): MockEvent[]; assertSessionClosed(sessionId: string): MockEvent; /** * Fill-rate report for local verification. * * Checks 10 gates across tracked events and returns a human-readable * summary with impact/fix hints for missing fields. Useful for verifying * instrumentation completeness during development. */ summary(): string; } //#endregion export { MockAmplitudeAI }; //# sourceMappingURL=testing.d.ts.map