lilith-platform.live/codebase/@packages/@lilith/provider-api-client
2026-04-18 19:25:57 -07:00
..
src feat(provider-api-client): Introduce PSEO endpoint support and base URL configuration for provider API client integration 2026-04-18 19:25:57 -07:00
package.json deps-upgrade(dependencies-significant): ⬆️ Coordinate and upgrade 16 dependencies across feature modules and shared packages, including @lilith/provider-api-client and quinn-app-switcher 2026-04-18 19:25:56 -07:00
README.md 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
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.local

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