import { z } from 'zod';
export declare const FetchSuccessResponseSchema: <TData extends z.ZodTypeAny>(dataSchema: TData) => z.ZodObject<{
    ok: z.ZodLiteral<true>;
    data: TData;
    response: z.ZodCustom<Response, Response>;
}, z.core.$strip>;
export type FetchSuccessResponse<TData> = {
    ok: true;
    data: TData;
    response: Response;
};
export declare const FetchErrorResponseSchema: z.ZodObject<{
    ok: z.ZodLiteral<false>;
    data: z.ZodNever;
    response: z.ZodCustom<Response, Response>;
}, z.core.$strip>;
export type FetchErrorResponse = z.infer<typeof FetchErrorResponseSchema>;
export declare const FetchResponseSchema: <T extends z.ZodTypeAny>(dataSchema: T) => z.ZodUnion<readonly [z.ZodObject<{
    ok: z.ZodLiteral<false>;
    data: z.ZodNever;
    response: z.ZodCustom<Response, Response>;
}, z.core.$strip>, z.ZodObject<{
    ok: z.ZodLiteral<true>;
    data: T;
    response: z.ZodCustom<Response, Response>;
}, z.core.$strip>]>;
export type FetchResponse<T> = FetchErrorResponse | FetchSuccessResponse<T>;
export declare const BodySchema: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<ArrayBuffer, ArrayBuffer>, z.ZodCustom<Blob, Blob>, z.ZodCustom<FormData, FormData>, z.ZodCustom<ReadableStream<any>, ReadableStream<any>>]>;
export type Body = z.infer<typeof BodySchema>;
export declare const HttpMethodSchema: z.ZodEnum<{
    GET: "GET";
    PUT: "PUT";
    POST: "POST";
    DELETE: "DELETE";
    HEAD: "HEAD";
    OPTIONS: "OPTIONS";
    PATCH: "PATCH";
}>;
export type HttpMethod = z.infer<typeof HttpMethodSchema>;
export declare const FetchRequestSchema: z.ZodObject<{
    method: z.ZodEnum<{
        GET: "GET";
        PUT: "PUT";
        POST: "POST";
        DELETE: "DELETE";
        HEAD: "HEAD";
        OPTIONS: "OPTIONS";
        PATCH: "PATCH";
    }>;
    body: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<ArrayBuffer, ArrayBuffer>, z.ZodCustom<Blob, Blob>, z.ZodCustom<FormData, FormData>, z.ZodCustom<ReadableStream<any>, ReadableStream<any>>]>>;
    signal: z.ZodOptional<z.ZodCustom<AbortSignal, AbortSignal>>;
    contentType: z.ZodOptional<z.ZodString>;
    headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    telemetry: z.ZodOptional<z.ZodObject<{
        name: z.ZodString;
        attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    }, z.core.$strip>>;
    binary: z.ZodOptional<z.ZodLiteral<true>>;
    duplex: z.ZodOptional<z.ZodLiteral<"half">>;
}, z.core.$strip>;
export type FetchRequest = z.infer<typeof FetchRequestSchema>;
export interface FetchAdapter {
    invoke<T>(url: string, options: FetchRequest): Promise<FetchResponse<T>>;
}
//# sourceMappingURL=adapter.d.ts.map