MCPcopy Create free account
hub / github.com/anomalyco/opencode / adaptClient

Function adaptClient

packages/httpapi-codegen/test/generated/client.ts:9–13  ·  view source on GitHub ↗
(raw: HttpApiClient.ForApi<typeof Api>)

Source from the content-addressed store, hash-verified

7
8const Api = HttpApi.make("generated").add(Group0).add(Group1).add(Group2)
9const adaptClient = (raw: HttpApiClient.ForApi<typeof Api>) => ({
10 session: adaptGroup0(raw["session"]),
11 event: adaptGroup1(raw["event"]),
12 ...adaptGroup2({ status: raw["status"] }),
13})
14
15export const make = (options?: { readonly baseUrl?: URL | string }) =>
16 HttpApiClient.make(Api, options).pipe(Effect.map(adaptClient))

Callers

nothing calls this directly

Calls 3

adaptGroup0Function · 0.90
adaptGroup1Function · 0.90
adaptGroup2Function · 0.90

Tested by

no test coverage detected