Releases: BaryoDev/barako-client
Releases · BaryoDev/barako-client
Release list
v0.3.0 — menu as content type
public.menu(slug) now reads a menu content type through the public delivery API (GET /api/public/menu/{slug}) instead of the removed bespoke menu endpoint. Same signature and PublicMenu return shape; item keys are normalized and nesting is capped at one level.
Pairs with barakoCMS 3.7.0, which converts navigation menus to a content type. Published via npm trusted publishing (OIDC, with provenance).
v0.2.0 — public delivery
Adds cms.public for website frontends: anonymous, published-only reads.
public.list(type, {page, pageSize})— paged published entriespublic.bySlug(type, slug)— one entry, or null on 404public.menu(slug)— a nav menu, or nullpublic.fileUrl(id)— a public file URL for<img src>
No auth needed, just a base URL (and tenant for multi-tenant).
v0.1.0
First release of the barakoCMS TypeScript client.
- Framework-agnostic and isomorphic (Node, browser, edge) on global fetch, zero runtime deps. Ships ESM, CJS, and type declarations.
- Two auth modes: an API key for machine callers, or username/password login with automatic single-flight token refresh. Pluggable token store (memory or browser localStorage).
- Tenant-aware: sends the right X-Tenant, derived from the token.
- Resources: auth, me (tenants, switch), content types (list, create), content (list, get, create, update, set status, history).
- Failures throw a typed BarakoError carrying the status and the server's message.
Install: npm i @baryodev/barako-client