/** * @since 1.0.0 */ import type { Channel } from "effect/Channel"; import type { Chunk } from "effect/Chunk"; import type * as Context from "effect/Context"; import * as Effect from "effect/Effect"; import * as Either from "effect/Either"; import * as Option from "effect/Option"; import type * as ParseResult from "effect/ParseResult"; import type { ReadonlyRecord } from "effect/Record"; import * as Runtime from "effect/Runtime"; import type * as Schema from "effect/Schema"; import type { ParseOptions } from "effect/SchemaAST"; import type * as Scope from "effect/Scope"; import * as Stream from "effect/Stream"; import type * as FileSystem from "./FileSystem.js"; import type * as Headers from "./Headers.js"; import type * as IncomingMessage from "./HttpIncomingMessage.js"; import { type HttpMethod } from "./HttpMethod.js"; import * as Error from "./HttpServerError.js"; import type * as Multipart from "./Multipart.js"; import type * as Path from "./Path.js"; import type * as Socket from "./Socket.js"; export { /** * @since 1.0.0 * @category fiber refs */ MaxBodySize, /** * @since 1.0.0 * @category fiber refs */ withMaxBodySize } from "./HttpIncomingMessage.js"; /** * @since 1.0.0 * @category type ids */ export declare const TypeId: unique symbol; /** * @since 1.0.0 * @category type ids */ export type TypeId = typeof TypeId; /** * @since 1.0.0 * @category models */ export interface HttpServerRequest extends IncomingMessage.HttpIncomingMessage { readonly [TypeId]: TypeId; readonly source: unknown; readonly url: string; readonly originalUrl: string; readonly method: HttpMethod; readonly cookies: ReadonlyRecord; readonly multipart: Effect.Effect; readonly multipartStream: Stream.Stream; readonly upgrade: Effect.Effect; readonly modify: (options: { readonly url?: string; readonly headers?: Headers.Headers; readonly remoteAddress?: string; }) => HttpServerRequest; } /** * @since 1.0.0 * @category context */ export declare const HttpServerRequest: Context.Tag; /** * @since 1.0.0 * @category search params */ export interface ParsedSearchParams { readonly _: unique symbol; } /** * @since 1.0.0 * @category search params */ export declare const ParsedSearchParams: Context.Tag>>; /** * @since 1.0.0 * @category search params */ export declare const searchParamsFromURL: (url: URL) => ReadonlyRecord>; /** * @since 1.0.0 * @category accessors */ export declare const persistedMultipart: Effect.Effect; /** * @since 1.0.0 * @category accessors */ export declare const upgrade: Effect.Effect; /** * @since 1.0.0 * @category accessors */ export declare const upgradeChannel: () => Channel, Chunk, Error.RequestError | IE | Socket.SocketError, IE, void, unknown, HttpServerRequest>; /** * @since 1.0.0 * @category schema */ export declare const schemaCookies: >, R>(schema: Schema.Schema, options?: ParseOptions | undefined) => Effect.Effect; /** * @since 1.0.0 * @category schema */ export declare const schemaHeaders: >, R>(schema: Schema.Schema, options?: ParseOptions | undefined) => Effect.Effect; /** * @since 1.0.0 * @category schema */ export declare const schemaSearchParams: | undefined>>, R>(schema: Schema.Schema, options?: ParseOptions | undefined) => Effect.Effect; /** * @since 1.0.0 * @category schema */ export declare const schemaBodyJson: (schema: Schema.Schema, options?: ParseOptions | undefined) => Effect.Effect; /** * @since 1.0.0 * @category schema */ export declare const schemaBodyForm: , R>(schema: Schema.Schema, options?: ParseOptions | undefined) => Effect.Effect; /** * @since 1.0.0 * @category schema */ export declare const schemaBodyUrlParams: | undefined>>, R>(schema: Schema.Schema, options?: ParseOptions | undefined) => Effect.Effect; /** * @since 1.0.0 * @category schema */ export declare const schemaBodyMultipart: , R>(schema: Schema.Schema, options?: ParseOptions | undefined) => Effect.Effect; /** * @since 1.0.0 * @category schema */ export declare const schemaBodyFormJson: (schema: Schema.Schema, options?: ParseOptions | undefined) => (field: string) => Effect.Effect; /** * @since 1.0.0 * @category conversions */ export declare const fromWeb: (request: Request) => HttpServerRequest; /** * @since 1.0.0 * @category conversions */ export declare const toWebEither: (self: HttpServerRequest, options?: { readonly signal?: AbortSignal | undefined; readonly runtime?: Runtime.Runtime | undefined; }) => Either.Either; /** * @since 1.0.0 * @category conversions */ export declare const toWeb: (self: HttpServerRequest, options?: { readonly signal?: AbortSignal | undefined; }) => Effect.Effect; /** * @since 1.0.0 * @category conversions */ export declare const toURL: (self: HttpServerRequest) => Option.Option; //# sourceMappingURL=HttpServerRequest.d.ts.map