| import * as Effect from "../../Effect.ts"; | |
| import * as ErrorReporter from "../../ErrorReporter.ts"; | |
| import * as Schema from "../../Schema.ts"; | |
| import * as HttpServerRespondable from "../http/HttpServerRespondable.ts"; | |
| import * as HttpServerResponse from "../http/HttpServerResponse.ts"; | |
| import * as HttpApiSchema from "./HttpApiSchema.ts"; | |
| declare const BadRequest_base: Schema.Class<BadRequest, Schema.Struct<{ | |
| readonly _tag: Schema.tag<"BadRequest">; | |
| }>, import("../../Cause.ts").YieldableError>; | |
| /** | |
| * Built-in HTTP API error for a `400 Bad Request` response. When used directly as | |
| * a server response, it renders as an empty response with status 400. | |
| * | |
| * @category errors | |
| * @since 4.0.0 | |
| */ | |
| export declare class BadRequest extends BadRequest_base { | |
| readonly [ErrorReporter.ignore] = true; | |
| [HttpServerRespondable.symbol](): Effect.Effect<HttpServerResponse.HttpServerResponse, never, never>; | |
| static readonly singleton: BadRequest; | |
| } | |
| /** | |
| * No-content schema variant for `BadRequest`, decoding an empty 400 response into | |
| * a `BadRequest` error value. | |
| * | |
| * @category NoContent errors | |
| * @since 4.0.0 | |
| */ | |
| export declare const BadRequestNoContent: HttpApiSchema.asNoContent<typeof BadRequest>; | |
| declare const Unauthorized_base: Schema.Class<Unauthorized, Schema.Struct<{ | |
| readonly _tag: Schema.tag<"Unauthorized">; | |
| }>, import("../../Cause.ts").YieldableError>; | |
| /** | |
| * Built-in HTTP API error for a `401 Unauthorized` response. When used directly as | |
| * a server response, it renders as an empty response with status 401. | |
| * | |
| * @category errors | |
| * @since 4.0.0 | |
| */ | |
| export declare class Unauthorized extends Unauthorized_base { | |
| readonly [ErrorReporter.ignore] = true; | |
| [HttpServerRespondable.symbol](): Effect.Effect<HttpServerResponse.HttpServerResponse, never, never>; | |
| } | |
| /** | |
| * No-content schema variant for `Unauthorized`, decoding an empty 401 response | |
| * into an `Unauthorized` error value. | |
| * | |
| * @category NoContent errors | |
| * @since 4.0.0 | |
| */ | |
| export declare const UnauthorizedNoContent: HttpApiSchema.asNoContent<typeof Unauthorized>; | |
| declare const Forbidden_base: Schema.Class<Forbidden, Schema.Struct<{ | |
| readonly _tag: Schema.tag<"Forbidden">; | |
| }>, import("../../Cause.ts").YieldableError>; | |
| /** | |
| * Built-in HTTP API error for a `403 Forbidden` response. When used directly as a | |
| * server response, it renders as an empty response with status 403. | |
| * | |
| * @category errors | |
| * @since 4.0.0 | |
| */ | |
| export declare class Forbidden extends Forbidden_base { | |
| readonly [ErrorReporter.ignore] = true; | |
| [HttpServerRespondable.symbol](): Effect.Effect<HttpServerResponse.HttpServerResponse, never, never>; | |
| } | |
| /** | |
| * No-content schema variant for `Forbidden`, decoding an empty 403 response into a | |
| * `Forbidden` error value. | |
| * | |
| * @category NoContent errors | |
| * @since 4.0.0 | |
| */ | |
| export declare const ForbiddenNoContent: HttpApiSchema.asNoContent<typeof Forbidden>; | |
| declare const NotFound_base: Schema.Class<NotFound, Schema.Struct<{ | |
| readonly _tag: Schema.tag<"NotFound">; | |
| }>, import("../../Cause.ts").YieldableError>; | |
| /** | |
| * Built-in HTTP API error for a `404 Not Found` response. When used directly as a | |
| * server response, it renders as an empty response with status 404. | |
| * | |
| * @category errors | |
| * @since 4.0.0 | |
| */ | |
| export declare class NotFound extends NotFound_base { | |
| readonly [ErrorReporter.ignore] = true; | |
| [HttpServerRespondable.symbol](): Effect.Effect<HttpServerResponse.HttpServerResponse, never, never>; | |
| } | |
| /** | |
| * No-content schema variant for `NotFound`, decoding an empty 404 response into a | |
| * `NotFound` error value. | |
| * | |
| * @category NoContent errors | |
| * @since 4.0.0 | |
| */ | |
| export declare const NotFoundNoContent: HttpApiSchema.asNoContent<typeof NotFound>; | |
| declare const MethodNotAllowed_base: Schema.Class<MethodNotAllowed, Schema.Struct<{ | |
| readonly _tag: Schema.tag<"MethodNotAllowed">; | |
| }>, import("../../Cause.ts").YieldableError>; | |
| /** | |
| * Built-in HTTP API error for a `405 Method Not Allowed` response. When used | |
| * directly as a server response, it renders as an empty response with status 405. | |
| * | |
| * @category errors | |
| * @since 4.0.0 | |
| */ | |
| export declare class MethodNotAllowed extends MethodNotAllowed_base { | |
| readonly [ErrorReporter.ignore] = true; | |
| [HttpServerRespondable.symbol](): Effect.Effect<HttpServerResponse.HttpServerResponse, never, never>; | |
| } | |
| /** | |
| * No-content schema variant for `MethodNotAllowed`, decoding an empty 405 response | |
| * into a `MethodNotAllowed` error value. | |
| * | |
| * @category NoContent errors | |
| * @since 4.0.0 | |
| */ | |
| export declare const MethodNotAllowedNoContent: HttpApiSchema.asNoContent<typeof MethodNotAllowed>; | |
| declare const NotAcceptable_base: Schema.Class<NotAcceptable, Schema.Struct<{ | |
| readonly _tag: Schema.tag<"NotAcceptable">; | |
| }>, import("../../Cause.ts").YieldableError>; | |
| /** | |
| * Built-in HTTP API error for a `406 Not Acceptable` response. When used directly | |
| * as a server response, it renders as an empty response with status 406. | |
| * | |
| * @category errors | |
| * @since 4.0.0 | |
| */ | |
| export declare class NotAcceptable extends NotAcceptable_base { | |
| readonly [ErrorReporter.ignore] = true; | |
| [HttpServerRespondable.symbol](): Effect.Effect<HttpServerResponse.HttpServerResponse, never, never>; | |
| } | |
| /** | |
| * No-content schema variant for `NotAcceptable`, decoding an empty 406 response | |
| * into a `NotAcceptable` error value. | |
| * | |
| * @category NoContent errors | |
| * @since 4.0.0 | |
| */ | |
| export declare const NotAcceptableNoContent: HttpApiSchema.asNoContent<typeof NotAcceptable>; | |
| declare const RequestTimeout_base: Schema.Class<RequestTimeout, Schema.Struct<{ | |
| readonly _tag: Schema.tag<"RequestTimeout">; | |
| }>, import("../../Cause.ts").YieldableError>; | |
| /** | |
| * Built-in HTTP API error for a `408 Request Timeout` response. When used directly | |
| * as a server response, it renders as an empty response with status 408. | |
| * | |
| * @category errors | |
| * @since 4.0.0 | |
| */ | |
| export declare class RequestTimeout extends RequestTimeout_base { | |
| readonly [ErrorReporter.ignore] = true; | |
| [HttpServerRespondable.symbol](): Effect.Effect<HttpServerResponse.HttpServerResponse, never, never>; | |
| } | |
| /** | |
| * No-content schema variant for `RequestTimeout`, decoding an empty 408 response | |
| * into a `RequestTimeout` error value. | |
| * | |
| * @category NoContent errors | |
| * @since 4.0.0 | |
| */ | |
| export declare const RequestTimeoutNoContent: HttpApiSchema.asNoContent<typeof RequestTimeout>; | |
| declare const Conflict_base: Schema.Class<Conflict, Schema.Struct<{ | |
| readonly _tag: Schema.tag<"Conflict">; | |
| }>, import("../../Cause.ts").YieldableError>; | |
| /** | |
| * Built-in HTTP API error for a `409 Conflict` response. When used directly as a | |
| * server response, it renders as an empty response with status 409. | |
| * | |
| * @category errors | |
| * @since 4.0.0 | |
| */ | |
| export declare class Conflict extends Conflict_base { | |
| readonly [ErrorReporter.ignore] = true; | |
| [HttpServerRespondable.symbol](): Effect.Effect<HttpServerResponse.HttpServerResponse, never, never>; | |
| } | |
| /** | |
| * No-content schema variant for `Conflict`, decoding an empty 409 response into a | |
| * `Conflict` error value. | |
| * | |
| * @category NoContent errors | |
| * @since 4.0.0 | |
| */ | |
| export declare const ConflictNoContent: HttpApiSchema.asNoContent<typeof Conflict>; | |
| declare const Gone_base: Schema.Class<Gone, Schema.Struct<{ | |
| readonly _tag: Schema.tag<"Gone">; | |
| }>, import("../../Cause.ts").YieldableError>; | |
| /** | |
| * Built-in HTTP API error for a `410 Gone` response. When used directly as a | |
| * server response, it renders as an empty response with status 410. | |
| * | |
| * @category errors | |
| * @since 4.0.0 | |
| */ | |
| export declare class Gone extends Gone_base { | |
| readonly [ErrorReporter.ignore] = true; | |
| [HttpServerRespondable.symbol](): Effect.Effect<HttpServerResponse.HttpServerResponse, never, never>; | |
| } | |
| /** | |
| * No-content schema variant for `Gone`, decoding an empty 410 response into a | |
| * `Gone` error value. | |
| * | |
| * @category NoContent errors | |
| * @since 4.0.0 | |
| */ | |
| export declare const GoneNoContent: HttpApiSchema.asNoContent<typeof Gone>; | |
| declare const InternalServerError_base: Schema.Class<InternalServerError, Schema.Struct<{ | |
| readonly _tag: Schema.tag<"InternalServerError">; | |
| }>, import("../../Cause.ts").YieldableError>; | |
| /** | |
| * Built-in HTTP API error for a `500 Internal Server Error` response. When used | |
| * directly as a server response, it renders as an empty response with status 500. | |
| * | |
| * @category errors | |
| * @since 4.0.0 | |
| */ | |
| export declare class InternalServerError extends InternalServerError_base { | |
| [HttpServerRespondable.symbol](): Effect.Effect<HttpServerResponse.HttpServerResponse, never, never>; | |
| } | |
| /** | |
| * No-content schema variant for `InternalServerError`, decoding an empty 500 | |
| * response into an `InternalServerError` error value. | |
| * | |
| * @category NoContent errors | |
| * @since 4.0.0 | |
| */ | |
| export declare const InternalServerErrorNoContent: HttpApiSchema.asNoContent<typeof InternalServerError>; | |
| declare const NotImplemented_base: Schema.Class<NotImplemented, Schema.Struct<{ | |
| readonly _tag: Schema.tag<"NotImplemented">; | |
| }>, import("../../Cause.ts").YieldableError>; | |
| /** | |
| * Built-in HTTP API error for a `501 Not Implemented` response. When used directly | |
| * as a server response, it renders as an empty response with status 501. | |
| * | |
| * @category errors | |
| * @since 4.0.0 | |
| */ | |
| export declare class NotImplemented extends NotImplemented_base { | |
| [HttpServerRespondable.symbol](): Effect.Effect<HttpServerResponse.HttpServerResponse, never, never>; | |
| } | |
| /** | |
| * No-content schema variant for `NotImplemented`, decoding an empty 501 response | |
| * into a `NotImplemented` error value. | |
| * | |
| * @category NoContent errors | |
| * @since 4.0.0 | |
| */ | |
| export declare const NotImplementedNoContent: HttpApiSchema.asNoContent<typeof NotImplemented>; | |
| declare const ServiceUnavailable_base: Schema.Class<ServiceUnavailable, Schema.Struct<{ | |
| readonly _tag: Schema.tag<"ServiceUnavailable">; | |
| }>, import("../../Cause.ts").YieldableError>; | |
| /** | |
| * Built-in HTTP API error for a `503 Service Unavailable` response. When used | |
| * directly as a server response, it renders as an empty response with status 503. | |
| * | |
| * @category errors | |
| * @since 4.0.0 | |
| */ | |
| export declare class ServiceUnavailable extends ServiceUnavailable_base { | |
| [HttpServerRespondable.symbol](): Effect.Effect<HttpServerResponse.HttpServerResponse, never, never>; | |
| } | |
| /** | |
| * No-content schema variant for `ServiceUnavailable`, decoding an empty 503 | |
| * response into a `ServiceUnavailable` error value. | |
| * | |
| * @category NoContent errors | |
| * @since 4.0.0 | |
| */ | |
| export declare const ServiceUnavailableNoContent: HttpApiSchema.asNoContent<typeof ServiceUnavailable>; | |
| /** | |
| * Type-level identifier used to mark `HttpApiSchemaError` values. | |
| * | |
| * @category type IDs | |
| * @since 4.0.0 | |
| */ | |
| export type HttpApiSchemaErrorTypeId = "~effect/httpapi/HttpApiError/HttpApiSchemaError"; | |
| /** | |
| * Runtime identifier used to mark and detect `HttpApiSchemaError` values. | |
| * | |
| * @category type IDs | |
| * @since 4.0.0 | |
| */ | |
| export declare const HttpApiSchemaErrorTypeId: HttpApiSchemaErrorTypeId; | |
| declare const HttpApiSchemaError_base: new <A extends Record<string, any> = {}>(args: import("../../Types.ts").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Readonly<A> & { | |
| readonly _tag: "HttpApiSchemaError"; | |
| } & import("../../Pipeable.ts").Pipeable; | |
| /** | |
| * Error raised when an HTTP API request component fails schema decoding. It records | |
| * which component failed and responds as an empty `400 Bad Request` when rendered | |
| * as a server response. | |
| * | |
| * @category errors | |
| * @since 4.0.0 | |
| */ | |
| export declare class HttpApiSchemaError extends HttpApiSchemaError_base<{ | |
| readonly kind: "Params" | "Headers" | "Query" | "Body" | "Payload"; | |
| readonly cause: Schema.SchemaError; | |
| }> { | |
| readonly [HttpApiSchemaErrorTypeId]: HttpApiSchemaErrorTypeId; | |
| static is(u: unknown): u is HttpApiSchemaError; | |
| static wrap<A, R>(kind: HttpApiSchemaError["kind"], effect: Effect.Effect<A, Schema.SchemaError, R>): Effect.Effect<A, HttpApiSchemaError, R>; | |
| readonly name = "HttpApiSchemaError"; | |
| readonly message: "Headers" | "Params" | "Query" | "Body" | "Payload"; | |
| [HttpServerRespondable.symbol](): Effect.Effect<HttpServerResponse.HttpServerResponse, never, never>; | |
| } | |
| export {}; | |
| //# sourceMappingURL=HttpApiError.d.ts.map |
Xet Storage Details
- Size:
- 12.2 kB
- Xet hash:
- 81966baad6768cd5b6da1c8ee1c8c9617e0f0a06ba17e044867a6517cccc405a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.