import { Either } from "fp-ts/Either"; import { StatusCode, StatusNotOK, StatusOK } from "./types.js"; export declare class StatusError { readonly response: Response; readonly _tag = "StatusError"; constructor(response: Response); } export interface StatusErrorT extends StatusError { response: Omit & { status: S; }; } export interface ResponseT extends Response { status: S; } export declare const json: (arg: Response) => Promise>; export declare const blob: (arg: Response) => Promise>; export declare const text: (arg: Response) => Promise>; export declare const formData: (arg: Response) => Promise>; export declare const arrayBuffer: (arg: Response) => Promise>; export declare const filterStatusOk: (response: R) => import("fp-ts/lib/Either.js").Right | import("fp-ts/lib/Either.js").Left; export declare const filterStatusOkT: (response: Response) => Either, ResponseT>; export declare const filterStatus: (response: Response, fn: (status: number) => boolean) => import("fp-ts/lib/Either.js").Right | import("fp-ts/lib/Either.js").Left; export declare class HttpResponse { readonly response: Response; constructor(response: Response); get headers(): Headers; get ok(): boolean; get redirected(): boolean; get status(): number; get statusText(): string; get type(): ResponseType; get url(): string; get body(): ReadableStream | null; get bodyUsed(): boolean; clone(): Either; arrayBuffer(): Promise>; blob(): Promise>; formData(): Promise>; json(): Promise>; text(): Promise>; } export declare class HttpResponseEither { readonly response: Either; constructor(response: Either); private map; private chain; ok(fn: (self: HttpResponse) => Promise>): Promise>; get headers(): Either; get redirected(): Either; get status(): Either; get statusText(): Either; get type(): Either; get url(): Either; get body(): Either> | null>; get bodyUsed(): Either; clone(): Either; arrayBuffer(): Either | Promise>; blob(): Either | Promise>; formData(): Either | Promise>; json(): Either | Promise>; text(): Either | Promise>; }