fabro/lib/packages/fabro-api-client
Bryan Helmkamp 9b0b8d94fc
fix(api): generate typescript EventEnvelope with typed seq
The typescript-axios generator was collapsing EventEnvelope's
allOf([inline_object, $ref: RunEvent]) to a bare `type
EventEnvelope = RunEvent` alias, losing the `seq` field at the
type level. TypeScript consumers could write `envelope.seq` and
get `any` (via RunEvent's additionalProperties index signature),
but had no type-level guarantee that seq was present.

Extract `EventSeq` as a named component schema and switch
EventEnvelope's allOf to two $refs. typescript-axios now
generates `export type EventEnvelope = EventSeq & RunEvent`,
which makes `envelope.seq: number` a typed property.

The Rust progenitor client is unchanged: it still flattens the
allOf into a single EventEnvelope struct with `seq: i64` inline,
exactly as before. Wire JSON is byte-identical on both sides.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 16:00:05 -04:00
..
src fix(api): generate typescript EventEnvelope with typed seq 2026-04-09 16:00:05 -04:00
openapitools.json Rename Arc to Fabro in TypeScript/JavaScript 2026-03-12 11:13:18 -04:00
package.json Fix relative path in fabro-api-client generate script 2026-03-13 20:42:45 -04:00
tsconfig.json Rename Arc to Fabro in TypeScript/JavaScript 2026-03-12 11:13:18 -04:00