feat(douanier): make it callable — OpenAPI snapshot + zero-dep TS client (#32)
hexa can now call the audio API with types, not guesswork. - clients/openapi.json — checked-in OpenAPI 3.1 snapshot (servers pinned to the public https://api.nech.pl/audio/v1), covering all 13 routes. A snapshot-drift guard test asserts it stays in sync with the live app (add a route → refresh or CI fails). - clients/douanier.ts — a typed, ZERO-dependency client (global fetch/FormData/Blob; works in Node 18+, Vercel Functions, Edge). One method per engine (emotion, features, samples, grade, onsets, waveform, analyze, loudness, spectrum, naming), typed results, X-Douanier-Cache surfaced as result._cache, DouanierError on non-2xx. Typechecks clean under tsc --strict. - clients/README.md — base URL + bearer, a Vercel Function example, the endpoint/ scope table, curl, and the openapi-generator one-liner for full codegen. 60/60 tests (added the snapshot guard). The API is now self-describing (/audio/v1/docs + openapi.json) and has a drop-in client.
Showing
armada/api/clients/README.md
0 → 100644
armada/api/clients/douanier.ts
0 → 100644
armada/api/clients/openapi.json
0 → 100644
This diff is collapsed.
Click to expand it.
armada/api/tests/test_openapi_snapshot.py
0 → 100644
Please
register
or
sign in
to comment