-
feat(douanier): make it callable — OpenAPI snapshot + zero-dep TS client (#32) · 11c8f9d6
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.
PLN (Algolia) authored11c8f9d6
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| README.md | Loading commit data... | |
| douanier.ts | Loading commit data... | |
| openapi.json | Loading commit data... |