import { z } from "zod/v4-mini"; import type { FsDuplex } from "../fs-duplex/common.js"; import type { NodeFsDuplex } from "../fs-duplex/node.js"; import type { TaskRunner } from "../node/utils.js"; declare const zFetchInitialCommand: z.ZodMiniObject<{ type: z.ZodMiniLiteral<"fetch">; taskId: z.ZodMiniString; status: z.ZodMiniLiteral<"initial">; url: z.ZodMiniString; init: z.ZodMiniOptional; done: z.ZodMiniLiteral; }, z.core.$strip>; export declare const zFetchTask: z.ZodMiniUnion; taskId: z.ZodMiniString; status: z.ZodMiniLiteral<"initial">; url: z.ZodMiniString; init: z.ZodMiniOptional; done: z.ZodMiniLiteral; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"fetch">; taskId: z.ZodMiniString; sub_command: z.ZodMiniLiteral<"getFullBody">; format: z.ZodMiniEnum<{ json: "json"; text: "text"; }>; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"fetch">; taskId: z.ZodMiniString; sub_command: z.ZodMiniLiteral<"requestChunk">; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"fetch">; taskId: z.ZodMiniString; status: z.ZodMiniLiteral<"responded">; response: z.ZodMiniObject<{ headers: z.ZodMiniRecord, z.core.SomeType>; ok: z.ZodMiniBoolean; status: z.ZodMiniNumber; statusText: z.ZodMiniString; }, z.core.$strip>; done: z.ZodMiniLiteral; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"fetch">; taskId: z.ZodMiniString; status: z.ZodMiniLiteral<"fulfilled">; result: z.ZodMiniAny; done: z.ZodMiniLiteral; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"fetch">; taskId: z.ZodMiniString; status: z.ZodMiniLiteral<"chunk">; payload: z.ZodMiniCustom, Uint8Array>; done: z.ZodMiniLiteral; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"fetch">; taskId: z.ZodMiniString; status: z.ZodMiniLiteral<"chunk_end">; done: z.ZodMiniLiteral; }, z.core.$strip>, z.ZodMiniObject<{ type: z.ZodMiniLiteral<"fetch">; taskId: z.ZodMiniString; status: z.ZodMiniUnion, z.ZodMiniLiteral<"chunk_error">]>; error: z.ZodMiniAny; done: z.ZodMiniLiteral; }, z.core.$strip>]>; export type FetchTask = z.output; type FetchInitialCommand = z.output; export declare function doFetch(duplex: FsDuplex, initialTask: FetchInitialCommand): Promise; declare class BrowserResponse { #private; readonly headers: Headers; readonly ok: boolean; readonly status: number; readonly statusText: string; constructor(duplex: NodeFsDuplex, initialResponse: Extract); get body(): ReadableStream | null; json(): Promise; text(): Promise; arrayBuffer(): Promise; } export declare const createRunFetchInBrowser: (runner: TaskRunner) => (dir: string, url: string, init?: RequestInit) => Promise; export {}; //# sourceMappingURL=fetch.d.ts.map