Download packages/httpapi-codegen/test/generated/client.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 699 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/eb1202c08d0fcc3e89b18b16bcc802e692e97016/packages/httpapi-codegen/test/generated/client.ts
- Command line
-
hf download hf://SaylorTwift/opencode@eb1202c08d0fcc3e89b18b16bcc802e692e97016/packages/httpapi-codegen/test/generated/client.ts
-
curl -L -o client.ts https://huggingface.co/SaylorTwift/opencode/resolve/eb1202c08d0fcc3e89b18b16bcc802e692e97016/packages/httpapi-codegen/test/generated/client.ts
699 Bytes
| // Generated by @opencode-ai/httpapi-codegen. Do not edit. | |
| import { Effect } from "effect" | |
| import { HttpApi, HttpApiClient } from "effect/unstable/httpapi" | |
| import { adaptGroup0, Group0 } from "./session" | |
| import { adaptGroup1, Group1 } from "./event" | |
| import { adaptGroup2, Group2 } from "./system" | |
| const Api = HttpApi.make("generated").add(Group0).add(Group1).add(Group2) | |
| const adaptClient = (raw: HttpApiClient.ForApi<typeof Api>) => ({ | |
| session: adaptGroup0(raw["session"]), | |
| event: adaptGroup1(raw["event"]), | |
| ...adaptGroup2({ status: raw["status"] }), | |
| }) | |
| export const make = (options?: { readonly baseUrl?: URL | string }) => | |
| HttpApiClient.make(Api, options).pipe(Effect.map(adaptClient)) | |