@karlroigus/api-contracts
Shared TypeScript types for the Enchanté webstore API. Used by both the Express backend and the React frontend.
Install
npm install @karlroigus/api-contracts
Usage
import type { Product, Order, CreatePaymentSessionRequest } from '@karlroigus/api-contracts';
Development
After changing types in src/index.ts:
npm version patch
npm publish --access public
Then update consumers:
cd api && npm install @karlroigus/api-contracts@latest
cd frontend && npm install @karlroigus/api-contracts@latest