@honestdigital/vehicle-service-types
v1.0.14
Published
Dedicated microservice for vehicle inventory management
Downloads
381
Readme
@honestdigital/vehicle-service-types
TypeScript type definitions for the HonestCMS Vehicle Service API.
Overview
This package provides type-safe TypeScript definitions for building clients that interact with the HonestCMS Vehicle Service. The service manages vehicle inventory operations for multi-tenant automotive dealerships.
Installation
npm install @honestdigital/vehicle-service-types
# or
bun add @honestdigital/vehicle-service-typesUsage
Type-Safe tRPC Client
import type { AppRouter } from '@honestdigital/vehicle-service-types/types'
import { createTRPCClient, httpBatchLink } from '@trpc/client'
const client = createTRPCClient<AppRouter>({
links: [
httpBatchLink({
url: 'https://your-api.com/trpc',
headers: {
'x-tenant-id': '1',
},
}),
],
})
// Fully type-safe calls with autocomplete
const vehicles = await client.inventory.getInventory.query({
filters: {},
limit: 20,
})Type Imports
import type {
Vehicle,
FilterState,
SyncResult,
} from '@honestdigital/vehicle-service-types/types'What's Included
This package contains only TypeScript type definitions (.d.ts files) for:
- AppRouter - tRPC router type for client inference
- Vehicle Types - Vehicle data structures and pricing information
- Filter Types - Inventory filtering and sorting options
- Sync Types - Data synchronization operations
Requirements
- TypeScript 5.0+
- tRPC 11.0+ (if using tRPC client)
Features
- ✅ Full type safety for API calls
- ✅ IntelliSense autocomplete support
- ✅ Zero runtime dependencies
- ✅ Compatible with any tRPC client setup
Support
For API documentation and integration guides, contact HonestDigital support.
