open-index/open-npm huggingface dataset:
npm package: @livemercial/api-types
Description: Shared TypeScript types for Livemercial API
Latest version: 1.0.0

# @livemercial/api-types

Shared TypeScript types for the Livemercial API, enabling type-safe client usage.

## Installation

```bash
npm install @livemercial/api-types
# or
bun install @livemercial/api-types
```

## Usage

### With Hono RPC Client

```typescript
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 usage
- `HTTPMethod` - Supported HTTP methods
- `APIResponse<T>` - Generic API response wrapper
- `APIError` - Common API error structure

## Development

### Building

```bash
bun run build
```

### Publishing

```bash
# Update version in package.json, then:
bun run build
npm publish
```

## Keeping 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:

1. CI/CD integration to auto-publish on API changes
2. Type extraction scripts to pull types directly from the main API
3. Version pinning to match API releases

## License

MIT