import { ScaffoldGenerator } from "./mock.js"; import { Handler, NextFn } from "@warp-drive/core/request"; import { RequestContext, StructuredDataDocument } from "@warp-drive/core/types/request"; import { Store } from "@warp-drive/legacy/store"; //#region src/index.d.ts /** * @public */ declare function setConfig({ host }: { host: string; }): void; /** * @public */ declare function setTestId(context: object, str: string | null): void; /** * @public */ declare function setIsRecording(value: boolean): void; /** * @public */ declare function getIsRecording(): boolean; /** * A request handler that intercepts requests and routes them through * the Holodeck mock server. * * This handler modifies the request URL to include test identifiers * and manages request counts for accurate mocking. * * Requires that the test context be configured with a testId using `setTestId`. * * @param owner - the test context object used to retrieve the test ID. */ declare class MockServerHandler implements Handler { owner: object; constructor(owner: object); request(context: RequestContext, next: NextFn): Promise>; } /** * Creates an adapterFor function that wraps the provided adapterFor function * to override the adapter's _fetchRequest method to route requests through * the Holodeck mock server. * * @param owner - The test context object used to retrieve the test ID. */ declare function installAdapterFor(owner: object, store: Store): void; /** * Mock a request by sending the scaffold to the mock server. * * @public */ declare function mock(owner: object, generate: ScaffoldGenerator, isRecording?: boolean): Promise; //#endregion export { MockServerHandler, getIsRecording, installAdapterFor, mock, setConfig, setIsRecording, setTestId }; //# sourceMappingURL=index.d.ts.map