Files
Kit Langton cf1acfd2fa chore: upgrade Effect to rc.118
Move effect/unstable/* imports to their top-level entry points
(effect/unstable/httpapi becomes effect/http-api), migrate Encoding helpers
to effect/encoding Base64 and Base64Url, rename Schema.isStartsWith to
Schema.isStartingWith, import Arbitrary from effect, and update the HttpApi
codegen templates, regenerated clients, and documentation.
2026-10-02 14:17:30 -07:00

26 lines
1.1 KiB
TypeScript

// Generated by @opencode/httpapi-codegen. Do not edit.
import { Effect, Schema } from "effect"
import { Sse } from "effect/encoding"
import { HttpClientError } from "effect/http"
import { HttpApiClient, HttpApiEndpoint, HttpApiGroup } from "effect/http-api"
import { ClientError } from "./client-error.js"
const EndpointStatusSuccess = Schema.String
export const GroupSystem = HttpApiGroup.make("system", { topLevel: true }).add(
HttpApiEndpoint.make("GET")("status", "/status", { success: EndpointStatusSuccess }),
)
type RawGroup = HttpApiClient.Client<typeof GroupSystem>
const EndpointStatusDeclaredError = Schema.Never
const mapEndpointStatusError = (error: unknown) =>
HttpClientError.isHttpClientError(error) || Schema.isSchemaError(error) || Sse.Retry.is(error)
? new ClientError({ cause: error })
: Schema.is(EndpointStatusDeclaredError)(error)
? error
: new ClientError({ cause: error })
const EndpointStatus = (raw: RawGroup) => () => raw["status"]({}).pipe(Effect.mapError(mapEndpointStatusError))
export const adaptGroupSystem = (raw: RawGroup) => ({ status: EndpointStatus(raw) })