/
Alex_Ural
/
opencode
Обзор
Документация
Войти
/
Alex_Ural
/
opencode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
packages/httpapi-codegen/test/generated/system.ts
25 строк
1 KB
Kit Langton
feat(sdk): add HttpApi clients and embedded host (#33445)
25 июн 2026, 06:08
Не верифицирован
25 июн 2026, 06:08
cdd67cf
Код
Авторство
О чём код?
// Generated by @opencode-ai/httpapi-codegen. Do not edit. import { Effect, Schema } from "effect" import { Sse } from "effect/unstable/encoding" import { HttpClientError } from "effect/unstable/http" import { HttpApiClient, HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi" import { ClientError } from "./client-error" const Endpoint0Success = Schema.String export const Group2 = HttpApiGroup.make("system", { topLevel: true }).add( HttpApiEndpoint.make("GET")("status", "/status", { success: Endpoint0Success }), ) type RawGroup = HttpApiClient.Client<typeof Group2> const Endpoint0DeclaredError = Schema.Never const mapEndpoint0Error = (error: unknown) => HttpClientError.isHttpClientError(error) || Schema.isSchemaError(error) || Sse.Retry.is(error) ? new ClientError({ cause: error }) : Schema.is(Endpoint0DeclaredError)(error) ? error : new ClientError({ cause: error }) const Endpoint0 = (raw: RawGroup) => () => raw["status"]({}).pipe(Effect.mapError(mapEndpoint0Error)) export const adaptGroup2 = (raw: RawGroup) => ({ status: Endpoint0(raw) })