import * as Effect from "effect/Effect"; import * as ParseResult from "effect/ParseResult"; import type { Simplify } from "effect/Types"; import * as HttpApi from "./HttpApi.js"; import type { HttpApiEndpoint } from "./HttpApiEndpoint.js"; import type { HttpApiGroup } from "./HttpApiGroup.js"; import type * as HttpApiMiddleware from "./HttpApiMiddleware.js"; import * as HttpClient from "./HttpClient.js"; import * as HttpClientError from "./HttpClientError.js"; import * as HttpClientResponse from "./HttpClientResponse.js"; /** * @since 1.0.0 * @category models */ export type Client = Simplify<{ readonly [Group in Extract as HttpApiGroup.Name]: Client.Group; } & { readonly [Method in Client.TopLevelMethods as Method[0]]: Method[1]; }>; /** * @since 1.0.0 * @category models */ export declare namespace Client { /** * @since 1.0.0 * @category models */ type Group = [ HttpApiGroup.WithName ] extends [ HttpApiGroup ] ? { readonly [Endpoint in _Endpoints as HttpApiEndpoint.Name]: Method; } : never; /** * @since 1.0.0 * @category models */ type Method = [Endpoint] extends [ HttpApiEndpoint ] ? (request: Simplify>) => Effect.Effect : never; /** * @since 1.0.0 * @category models */ type TopLevelMethods = Extract extends HttpApiGroup ? _Endpoints extends infer Endpoint ? [HttpApiEndpoint.Name, Method] : never : never; } /** * @since 1.0.0 * @category constructors */ export declare const make: (api: HttpApi.HttpApi, options?: { readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined; readonly transformResponse?: ((effect: Effect.Effect) => Effect.Effect) | undefined; readonly baseUrl?: URL | string | undefined; }) => Effect.Effect>, never, HttpApiMiddleware.HttpApiMiddleware.Without> | HttpClient.HttpClient>; /** * @since 1.0.0 * @category constructors */ export declare const makeWith: (api: HttpApi.HttpApi, options: { readonly httpClient: HttpClient.HttpClient.With; readonly transformResponse?: ((effect: Effect.Effect) => Effect.Effect) | undefined; readonly baseUrl?: URL | string | undefined; }) => Effect.Effect>, never, HttpApiMiddleware.HttpApiMiddleware.Without>>; /** * @since 1.0.0 * @category constructors */ export declare const group: , E, R>(api: HttpApi.HttpApi, options: { readonly group: GroupName; readonly httpClient: HttpClient.HttpClient.With; readonly transformResponse?: ((effect: Effect.Effect) => Effect.Effect) | undefined; readonly baseUrl?: URL | string | undefined; }) => Effect.Effect, never, HttpApiMiddleware.HttpApiMiddleware.Without>>>; /** * @since 1.0.0 * @category constructors */ export declare const endpoint: , const EndpointName extends HttpApiEndpoint.Name>, E, R>(api: HttpApi.HttpApi, options: { readonly group: GroupName; readonly endpoint: EndpointName; readonly httpClient: HttpClient.HttpClient.With; readonly transformClient?: ((client: HttpClient.HttpClient) => HttpClient.HttpClient) | undefined; readonly transformResponse?: ((effect: Effect.Effect) => Effect.Effect) | undefined; readonly baseUrl?: URL | string | undefined; }) => Effect.Effect>, EndpointName>, HttpApiGroup.Error>, ApiError | E, R>, never, HttpApiMiddleware.HttpApiMiddleware.Without> | HttpApiEndpoint.ContextWithName, EndpointName> | HttpApiEndpoint.ErrorContextWithName, EndpointName>>>; //# sourceMappingURL=HttpApiClient.d.ts.map