@x12i/xentra-types
v0.2.0
Published
Shared TypeScript contracts and Zod schemas for Xentra
Readme
@x12i/xentra-types
Shared TypeScript entity types, Zod schemas, and JSON Schema exports for the Xentra platform.
Install
npm install @x12i/xentra-typesUsage
import {
AccountSchema,
PermissionCheckRequestSchema,
type Account,
type ActorRef,
jsonSchemas,
} from "@x12i/xentra-types";
const account = AccountSchema.parse({ id: "acc_1", name: "Acme", slug: "acme", status: "active", createdAt: "...", updatedAt: "..." });
// JSON Schema for OpenAPI / codegen
const accountJsonSchema = jsonSchemas.Account;Subpath export for schemas only:
import { UserSchema } from "@x12i/xentra-types/schemas";Exports
- Entities —
Account,User,Team,Membership,Role,AgentIdentity,Delegation,ApprovalPolicy,ApprovalRequest,XentraTokenGrant,AuditEvent, and related types - Schemas — Zod validators for API input/output and permission checks
- jsonSchemas — Zod-derived JSON Schema objects for OpenAPI components
Related packages
@x12i/xentra-core— uses these types for domain helpers@x12i/xentra-openapi— embedsjsonSchemasin the API spec
Development
From the monorepo root:
npm run build -w @x12i/xentra-types
npm test -w @x12i/xentra-typesLicense
MIT
