@onabl/contracts
v0.2.0
Published
Zod request/response validation schemas for onabl's public API — the SDK's typed contract with the API.
Readme
@onabl/contracts
Zod schemas for onabl's public API — the request/response contract used by
@onabl/js. You won't normally install this directly; it comes in as a
dependency of @onabl/js, @onabl/react, or @onabl/next.
Install it directly only if you're validating onabl API payloads outside
the SDK (e.g. in your own backend, without going through @onabl/js):
npm install @onabl/contractsimport {PublicFormSchema, QuoteSchema} from "@onabl/contracts/public-api";
const form = PublicFormSchema.parse(rawResponseBody);Schemas are grouped by resource under @onabl/contracts/public-api (forms,
submissions, quotes, invoices, discount codes).
