Generated typed API client + TanStack Query hooks (packages/api-client) #182
Labels
No labels
area:auth
area:ci
area:db
area:infra
area:native
area:pwa
area:service
epic
feature
foundation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
james/carol#182
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Generate a TypeScript client and TanStack Query hooks from the OpenAPI spec, packaged as
packages/api-client, consumed exclusively by the Expo app.The client never imports from
apps/api. The only seam between frontend and backend is the spec and what's generated from it.Scope
openapi-typescriptfor type generation +openapi-fetchfor the runtime (ororvalif hooks generation is preferred — record the choice in ADR-0027 or this ticket).packages/api-client/scripts/generate.tsreadsapps/api/openapi.jsonand emitspackages/api-client/src/generated/.useSkills,useSkill,useCreateSkill, …). Keep them thin — the heavy lifting is the generated client.onlineManager+focusManagerwiring for RN (NetInfo + AppState) — gated behind a platform check so the web build doesn't drag in RN deps.@tanstack/query-async-storage-persisterfor offline cache.Acceptance criteria
packages/api-clientexports a typed client + a hook per existing list/detail/create/update/delete operation.Out of scope
Composes with
OpenAPI spec generation, API contract hardening, Token-based auth, Expo client scaffolding.
Part of
#176