lilith-platform.live/codebase/@packages/@lilith/provider-api-client
2026-05-16 04:42:58 -07:00
..
src chore(api): 🔧 Update API contract, backend logic, frontend UX, infrastructure, and localization across system-wide components 2026-05-16 04:42:58 -07:00
package.json deps-upgrade(provider-api-client): ⬆️ Update dependencies to latest stable versions in provider-api-client and related packages 2026-05-15 22:08:05 -07:00
README.md infra(infrastructure-scope): 🧱 Update deployment pipelines, nginx configurations, and database unification docs across domains 2026-05-15 22:08:06 -07:00
tsconfig.json chore(api-client): 🔧 Update TypeScript config for stricter type checking and module resolution 2026-04-18 19:25:56 -07:00
tsconfig.test.json feat(provider-api-client): Add TypeScript types and test coverage for analytics, blog, contact, roster, tour, and touring endpoints 2026-04-18 19:25:56 -07:00
tsup.config.ts chore(build-system): 🔧 Update bundling configs in @lilith/provider-api-client and quinn-app-switcher to enable ESM support and adjust output formats 2026-04-18 19:25:56 -07:00

@lilith/provider-api-client

Type-safe HTTP client for the provider API public surface.

Base URL resolution

  1. import.meta.env.VITE_QUINN_API_BASE_URL (Vite env override)
  2. localhost / 127.0.0.1http://localhost:3040
  3. Otherwise → https://api.quinn.apricot.lan

Exports

Types

BlogPostSummary, BlogPost, ContactChannel, ContactPayload, ContactResult, TouringPayload, TouringResult, TrackAvailability, RosterApplicationPayload, RosterApplicationResult, AnalyticsEventPayload

Error classes

ApiError, NotFoundError, RateLimitError, ValidationError, NetworkError

Endpoints

Function Method Path
fetchBlogPosts() GET /www/blog
fetchBlogPost(slug) GET /www/blog/:slug
submitContact(payload) POST /public/contact
subscribeToTouring(payload) POST /public/touring/subscribe
fetchAvailability() GET /public/roster/availability
fetchAvailabilityBySlug(slug) GET /public/roster/availability/:slug
submitRosterApplication(payload) POST /public/roster/apply
trackEvent(path, payload) POST /public/analytics/track/* (fire-and-forget)

Low-level

apiFetch<T>(url, init?) — typed fetch with automatic error mapping
resolveBaseUrl() — base URL resolution