@livemercial/api-types
v1.0.0
Published
Shared TypeScript types for Livemercial API
Readme
@livemercial/api-types
Shared TypeScript types for the Livemercial API, enabling type-safe client usage.
Installation
npm install @livemercial/api-types
# or
bun install @livemercial/api-typesUsage
With Hono RPC Client
import { hc } from 'hono/client'
import type { AppType } from '@livemercial/api-types'
const client = hc<AppType>('https://api.livemercial.com')
// Now you have full type inference for your API calls
const response = await client.v1.index.$get()Available Types
AppType- Main application type for RPC client usageHTTPMethod- Supported HTTP methodsAPIResponse<T>- Generic API response wrapperAPIError- Common API error structure
Development
Building
bun run buildPublishing
# Update version in package.json, then:
bun run build
npm publishKeeping Types in Sync
This package should be updated whenever the main API structure changes. The types are currently maintained manually but could be automated with:
- CI/CD integration to auto-publish on API changes
- Type extraction scripts to pull types directly from the main API
- Version pinning to match API releases
License
MIT
