Skip to content

Run 5 API Proxy — Byproducts

The smallest run in the project. Pure type and method updates in the @arda-cards/api-proxy TypeScript package, mirroring the operations API changes. The most useful side effect was confirming that the type hierarchy established by the api-proxy project (see type-hierarchy.md) handled the new shape without restructuring — CompositeRenderResult and GroupRenderResult slotted into the existing reference/shared/types.ts location used by the previous RenderResult.

  • The reference/shared/types.ts placement held up. The original RenderResult lived there because reference is the lowest domain in the proxy’s dependency graph that needed it. The new composite types stayed in the same file with no reorganisation required.
  • PrintOptions as an options bag survived a brief debate over individual positional booleans; the bag form is materially cheaper to extend (Run 3’s diagnostic flags expanded the parameter set, and the next print-related ticket is likely to add another).
  • unmarkPrinted is the first proxy method on KanbanProxy that does not return an entity. It returns a state-change record. The pattern matches operations but introduced a new return-type shape to the proxy’s vocabulary; documented in the proxy’s CHANGELOG so consumers know what to expect.
  • Keep RenderResult as a deprecated alias for CompositeRenderResult so the frontend could migrate at its own pace — rejected. The package version was still in 0.1.x and the only consumer (arda-frontend-app) was being updated in the same project. Carrying a deprecated alias would have added long-term maintenance for short-term convenience.
  • Three positional boolean parameters for diagnostic flags — rejected in favour of PrintOptions. The call site printLabels(ids, { debug: true }) reads better than printLabels(ids, true, false, undefined) and tolerates new flags without breaking signatures.
  • Generate the proxy from the OpenAPI spec — out of scope. The api-proxy package uses hand-written types per its own type-consolidation conventions; generation would have been a separate project.
  • OpenAPI parity check in CI. A periodic job that fetches the operations OpenAPI spec and asserts the proxy’s types still match would have caught this drift earlier (the proxy was out-of-date from Phase 1’s first commit until Run 5). Not in scope.
  • Typed error variants for printLabels-style methods. Today errors come back as a single ArdaApiError; per-group errors inside a CompositeRenderResult are typed as { error: string }, which is permissive. A discriminated union could surface error codes at the type level. Not in scope.

Nothing in scope was skipped. All four planned tasks (T-5.1 through T-5.4) shipped.

No deviations from phase-5-api-proxy/specification.md. All six requirements (REQ-P5-001 through REQ-P5-006) ship as specified.


Copyright: (c) Arda Systems 2025-2026, All rights reserved