@naisys/erp-shared
v3.0.3
Published
[internal] NAISYS ERP shared types and validation schemas
Readme
@naisys/erp-shared
← Back to ERP | ← Back to main README
Shared types and Zod validation schemas used by both the ERP server and client. Internal to the monorepo (not published to npm).
Keeping the request/response shapes here lets the React client and Fastify server compile-check against the same contracts — when a route's input or output changes, both sides break together rather than drifting apart.
What's inside
api-types.ts— common request/response envelope typesadmin-types.ts— admin UI types (system info, attachment list, etc.)audit-types.ts—field-updated-by/ataudit metadataerror-types.ts— standard error envelopehateoas-types.ts— link/action shapes used by ERP route responsesmutation-types.ts— slim response shapes for POST/PUT/DELETEpagination-types.ts— forward + backward pagination link shapesrevision-diff-types.ts— order-revision diff payloadsitems/— items, item instances, inventoryoperations/— operations, operation runs, dependencies, commentsorders/— orders, order revisions, order runsproduction/— fields, field refs, work centerssteps/— steps, step runs, labor ticketsusers/— auth + user types
Usage
import { type OrderResponse, orderCreateSchema } from "@naisys/erp-shared";See doc 006 — ERP Orders for the domain model and doc 012 — HATEOAS for the API-design conventions these types follow.
License
MIT
