import { MockAgent, Interceptable } from 'undici'; import { ApiClient } from '../lib/api-client'; export declare const TEST_TOKEN = "test-token"; export declare const MONDAY_API_SUFFIX = "/v2"; export declare const MONDAY_API_ORIGIN: string; export declare const JSON_HEADERS: { 'content-type': string; }; export interface CapturedRequest { body: any; headers: Record; } export interface MockAgentContext { mockAgent: MockAgent; capturedRequest: CapturedRequest | null; setCapturedRequest: (req: CapturedRequest | null) => void; } /** * Creates a MockAgent context for integration tests. * Use with setupMockAgent in beforeEach and teardownMockAgent in afterEach. */ export declare function createMockAgentContext(): MockAgentContext; /** * Sets up the MockAgent for a test. * Call this in beforeEach. */ export declare function setupMockAgent(ctx: MockAgentContext): void; /** * Tears down the MockAgent after a test. * Call this in afterEach. */ export declare function teardownMockAgent(ctx: MockAgentContext): Promise; /** * Creates an ApiClient with mocked fetch for integration testing. * * @param mockAgent - The MockAgent instance to use for intercepting requests * @param options - Optional configuration * @param options.captureRequest - Callback to capture request body and headers for assertions */ export declare function createMockedApiClient(mockAgent: MockAgent, options?: { captureRequest?: (req: CapturedRequest) => void; }): ApiClient; export interface MockGraphQLResponseOptions { delay?: number; status?: number; } /** * Sets up a mock GraphQL response for the Monday API endpoint. * * @param mockAgent - The MockAgent instance * @param data - The data to return in the response (will be wrapped in { data: ... }) * @param options - Optional configuration for delay and status code * @returns The mock pool for additional configuration if needed */ export declare function mockGraphQLResponse(mockAgent: MockAgent, data: Record, options?: MockGraphQLResponseOptions): Interceptable;