Download packages/httpapi-codegen/test/generated/system.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/SaylorTwift/opencode/resolve/eb1202c08d0fcc3e89b18b16bcc802e692e97016/packages/httpapi-codegen/test/generated/system.ts
- Command line
-
hf download hf://SaylorTwift/opencode@eb1202c08d0fcc3e89b18b16bcc802e692e97016/packages/httpapi-codegen/test/generated/system.ts
-
curl -L -o system.ts https://huggingface.co/SaylorTwift/opencode/resolve/eb1202c08d0fcc3e89b18b16bcc802e692e97016/packages/httpapi-codegen/test/generated/system.ts
1.1 kB
| // 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) }) | |