@arki/contracts

next

for @arki/[email protected] · Tier 1: the stack · MIT

Shared Zod schemas and Drizzle contract helpers — branded ID-aware select / insert / update schemas with auto-applied column refinements.

Version 0.3.0 next

Install

The latest version on npm is 0.1.0 archive, not supported

bun add @arki/contracts
Other package managers
npm install @arki/contracts
pnpm add @arki/contracts
yarn add @arki/contracts

Release health for @arki/[email protected]

Doc examples

16 compiled11 run2 skipped2 failing

All 2 failures are in docs/upgrades/0.2.0-to-0.3.0.md.

Why 2 examples were skipped
  • docs/upgrades/0.1.0-to-0.2.0.md:51
    before-state sketch of the 0.1.0 code
  • docs/upgrades/0.1.0-to-0.2.0.md:62
    fragment: keyset and input come from your own contract

Open gaps

3 release checks fail

  • checkfile-agents-md
  • checkreadme-h2-order
  • checkpkg-engines

Used by demos

No demo uses this package yet.

Runtimes

No engines field, so no runtime requirement is declared.

Benchmarks

No benchmarks are published for this version.

README

Shared Zod schemas and Drizzle contract helpers — branded ID-aware select / insert / update schemas with auto-applied column refinements.

Install

npm install @arki/contracts
# or
bun add @arki/contracts
# or
pnpm add @arki/contracts

Dependencies: zod (v4) and zod-form-data.

The @arki/contracts/drizzle entry needs drizzle-orm (an optional peer dependency). The main entry never loads it.

Quick start

Declare an id kind and a list order once. Parse with them.

import { defineId, keyset, pageInput } from '@arki/contracts';
import { isFailure } from '@arki/failure';
 
const storyId = defineId('sty_');
const order = keyset({ createdAt: 'desc', id: 'desc' });
 
const id = storyId.create();
if (isFailure(id)) throw new Error(id.message); // This example's outer application boundary.
if (!storyId.is(id)) throw new Error('create() made an id that is() rejects');
 
console.log(storyId.schema.safeParse('pod_123').success);
console.log(pageInput(order).parse({}).limit);
false
20

'pod_123' fails because its prefix is not sty_. An empty page input gets the default limit of 20.

When not to use this

  • You want a full schema library. This package re-exports Zod and adds ids, pagination and contract helpers. It does not replace Zod.
  • You need offset pagination (?page=3). keyset only does "after this row".
  • You need secret or signed cursors. A cursor is base64url JSON. It is opaque, not secret.
  • You need ids that cannot be guessed to protect a resource. defineId makes random ids, but an id is a name, not a permission. Check access on the server.
  • You do not use oRPC. Then skip @arki/contracts/orpc. The other entries still work on their own.

Runtime support

The main entry and @arki/contracts/orpc run on Node, Bun, Deno, browsers and React Native (Hermes). @arki/contracts/drizzle needs drizzle-orm; @arki/contracts/orpc needs @orpc/contract. Cursors use btoa, atob and URI coding, not TextDecoder, which Hermes lacks. Default ID generation needs crypto.getRandomValues; UUID generation prefers crypto.randomUUID and otherwise uses secure random bytes. Plain Hermes has neither. Applications on runtimes without Web Crypto must initialize a provider backed by secure platform entropy that fails closed in every supported mode, including debugging. Contracts cannot certify entropy quality from returned bytes. zod-form-data loads on every runtime; plain Hermes has no FormData class (React Native adds one). bun run test:runtimes runs a smoke test of the built package on each runtime; the Hermes leg needs HERMES_BIN.

Why

Drizzle's $type<T>() changes TypeScript types without validating values. Table validators therefore infer only what their runtime schemas check. jsonColumn(name, schema) declares JSONB storage from one stable schema and applies it at runtime. Explicit refinements reuse that schema to preserve precise validator types, because Drizzle does not retain schema types on built columns. Existing ID column metadata still checks prefixes at runtime.

Usage

Re-exported Zod surface

import { z } from '@arki/contracts';
 
const Email = z.email();

The package re-exports everything from zod, so you do not need a direct zod import alongside it.

Form data helpers

import { formData } from '@arki/contracts';
 
const schema = formData.zfd.formData({
  name: formData.zfd.text(),
  age: formData.zfd.numeric(),
});

Branded select / insert / update schemas

import { pgTable, varchar } from 'drizzle-orm/pg-core';
 
import { defineId, z } from '@arki/contracts';
import { createSelectSchema, jsonColumn } from '@arki/contracts/drizzle';
 
const userId = defineId('usr_');
const profileSchema = z.object({ displayName: z.string() });
const users = pgTable('users', {
  id: varchar('id').$type<z.output<typeof userId.schema>>().primaryKey(),
  email: varchar('email').notNull(),
  profile: jsonColumn('profile', profileSchema),
});
const userSelect = createSelectSchema(users, {
  id: () => userId.schema,
  profile: () => profileSchema,
});
type User = z.output<typeof userSelect>;
const user: User = { id: 'usr_1', email: '[email protected]', profile: null };
if (userSelect.parse(user).email !== '[email protected]') throw new Error('select schema changed the row');
if (userSelect.safeParse({ ...user, profile: { displayName: 42 } }).success) throw new Error('invalid JSON accepted');
if (userSelect.safeParse({ ...user, id: 'org_42' }).success) throw new Error('wrong prefix accepted');

Callback refinements retain column nullability and insert defaults; bare schema replacements control their own optionality and nullability. Explicit refinements override COLUMN_ZOD_SCHEMA metadata. Unannotated JSONB, including a bare $type<Shape>(), retains Drizzle's generic JSON validator and type.

jsonColumn takes a stable storage schema: its output must be recursively JSON-compatible and assignable to its input, and parsing stored output must preserve the value. Validation narrowing and branded JSON values are supported; Date, bigint, Map, Set, functions and required undefined values are not. Its runtime output is checked as JSON, including finite numbers. It does not change Drizzle's JSONB driver codec. Apply a wire transform or codec in an explicit insert refinement, insert its parsed application output, then validate fetched rows against the stable storage schema. Do not tag a column with a wire transform that would run again on an already transformed value.

Breaking migration: replace jsonb(name).$type<Shape>() with jsonColumn(name, storageSchema) and reuse that schema in precise table refinements. Reuse each ID declaration's schema in refinements for branded output types. A $type annotation alone no longer makes the validator claim that type.

Prefixed ids: defineId

Write the prefix once; the type, the schema and the generator come from it. For new domain IDs, name the kind too. Different kinds remain distinct even when their stored prefixes are identical.

import type { IdOf } from '@arki/contracts';
import { defineId } from '@arki/contracts';
import { isFailure } from '@arki/failure';
 
export const storyId = defineId('sty_', { kind: 'story' });
export type StoryId = IdOf<typeof storyId>; // branded `sty_${string}`
 
const id = storyId.create(); // StoryId | IdGenerationFailure
if (isFailure(id)) throw new Error(id.message); // Handle or return this failure in application code.
const input = { id };
const parsed: StoryId = storyId.schema.parse(input.id); // StoryId, or a ZodError for 'pod_…'
if (!storyId.is(parsed)) throw new Error('is() rejected a parsed id'); // type guard
if (parsed.length !== 'sty_'.length + 24) throw new Error('create() makes the prefix plus 24 characters');
  • Browser-safe. No Drizzle. A contract, a form and a client can import it. On the server, idColumns(storyId) from @arki/db/id turns the same declaration into columns.
  • Domain types are inferred from the schema. kind is one non-empty literal name, such as billing.refund. IdOf, schema, is and create preserve its brand. A raw string or another kind cannot stand in for it. The one-argument form retains its existing prefix-only type for migrations.
  • Stored prefixes stay as they are. The prefix is used exactly as given (letters, digits and _), so defineId('hlgt_') matches the rows already stored.
  • Generation returns exact failures. Check isFailure before using the ID. Missing or malformed providers return RandomSourceUnavailable; thrown provider faults, invalid output and exhausted rejection sampling return UnexpectedDefect with a private cause. ID_GENERATION_FAILURES declares these for adapters. This small synchronous entropy operation needs no separate OTel span; its calling operation observes and reports the returned failure.
  • Stored generator formats are explicit. Use format: { alphabet, length } for existing nanoid-style bodies. The alphabet has 2–256 distinct, non-surrogate UTF-16 characters; length is an integer from 1 to 256. Every position samples the same alphabet uniformly, including the first. Definition copies and freezes the format, so later caller mutations cannot change generation. Schemas still validate only the stored prefix.
  • The generator uses Web Crypto. Default and custom bodies use crypto.getRandomValues; UUID-v4 declarations prefer crypto.randomUUID, falling back to 16 secure random bytes only when that method is not callable. Applications own any platform-backed provider initialization and must ensure it fails closed in every supported mode. There is no Math.random fallback.

assertUniqueIdPrefixes(...ids) checks one app's ids. The same prefix twice is a compile error (with literal prefixes) and throws; a prefix that starts another ('sub' and 'sub_') throws too, because sub_abc passes both schemas. Call it once in a test with every declaration of the app. It checks wire-format ambiguity, including branded declarations; brands cannot distinguish identical bytes at runtime. See domain ID migration for canonical parsing and external/numeric IDs.

Keyset pagination: keyset, pageInput, page

Declare how a list is ordered — once, in model/ — and use it in the contract and (through @arki/db/pagination) in the repository:

import { oc } from '@orpc/contract';
 
import { keyset, page, pageInput, z } from '@arki/contracts';
 
const storyStatus = z.enum(['draft', 'published']);
const storySchema = z.object({ id: z.string(), status: storyStatus });
 
export const storyOrder = keyset({ createdAt: 'desc', id: 'desc' });
 
export const listStories = oc
  .input(pageInput(storyOrder).extend({ status: storyStatus.optional() })) // { cursor?, limit = 20 (max 100) }
  .output(page(storySchema)); // { items, nextCursor: string | null }
  • Why keyset, not offset: with OFFSET, a row added while someone reads shifts every later page, so rows repeat or vanish. A cursor says "after this row", which stays true.
  • End the order on a unique key. Rows with the same createdAt have no order of their own; id breaks the tie.
  • The cursor is the last row's key values, base64url JSON — URL-safe, opaque to clients, not secret. A Date comes back a Date. A cursor another keyset made, or a hand-edited one, returns InvalidCursor; the pageInput schema reports invalid input. Unexpected codec defects reach the schema owner.
  • Codec results. Check order.encode(row) and order.decode(cursor) with isFailure before using their values. InvalidCursorValue rejects missing keys, non-finite numbers, invalid Dates, Dates outside the decoder’s ISO format and cursors over 1024 characters. CURSOR_FAILURES contains the original definitions for adapter error maps.
  • "No more pages" is nextCursor: null, decided by fetching one extra row — never guessed from a short page.

Operations: @arki/contracts/orpc

An oRPC contract already knows each procedure's path, input, output, errors and meta. operations(contract) turns that into plain data — one operation per procedure — so the client can carry a procedure's identity next to its query utils, and a policy written once on the contract (say, offlineSafe: true) can be checked by the compiler where it is used.

import { oc } from '@orpc/contract';
 
import { z } from '@arki/contracts';
import { operations } from '@arki/contracts/orpc';
 
const post = z.object({ id: z.string(), title: z.string() });
const createPost = post.omit({ id: true });
 
const contract = { posts: { create: oc.input(createPost).output(post) } };
const ops = operations(contract);
 
ops.posts.create.name; // 'posts.create' — the string the server stores as procedure_path
ops.posts.create.path; // ['posts', 'create']
ops.posts.create.meta; // the contract meta, value and type
if (ops.posts.create.name !== 'posts.create') throw new Error('operation name changed');
  • Why on the contract. Types are written once, on the contract; the operation is inferred from it (OperationOf<typeof contract.posts.create>). Nothing is restated on the client.
  • Plain, frozen data. No Proxy, no schemas: safe to log, compare by name and persist (path and name).
  • Fails loud at build time. A key with . (the name would be ambiguous) or a reserved key (~op, key, call, queryKey, queryOptions, infiniteKey, infiniteOptions, mutationKey, mutationOptions — a query-utils group would shadow it) throws a TypeError naming the path.
  • Bundles. The walk reads only path and meta, so a minifyContractRouter output works the same: an app can later ship a minified contract to the browser without its Zod schemas.
  • Carrying it. createOrpcUtils (in @arki/tanstack-start/orpc/client) puts each leaf's operation under '~op'; operationOf(leaf) reads it back, and throws for a value without one (a raw client, a forged object).

@orpc/contract is an optional peer: only this entry imports it.

Public imports

ImportNeedsWhat it holds
@arki/contracts@arki/failure, zod, zod-form-dataz, formData, defineId, keyset, pageInput, page, ContractsError, InvalidCursor, InvalidCursorValue, CURSOR_FAILURES, RandomSourceUnavailable, ID_GENERATION_FAILURES
@arki/contracts/drizzlepeer drizzle-ormcreateSelectSchema, createInsertSchema, createUpdateSchema
@arki/contracts/orpcpeer @orpc/contractoperations, operationAt, operationOf

Main entry, @arki/contracts (no Drizzle):

  • formData — re-exported zod-form-data namespace.
  • z, ZodError, every Zod export — re-exported from zod.
  • UserId, userIdSchema — shared id types.
  • defineId(prefix), IdOf<typeof id>, IdDeclaration, assertUniqueIdPrefixes(...ids) — prefixed ids declared once.
  • keyset(order), pageInput(keyset, options?), page(itemSchema), Page<T>, Keyset, CursorValue — keyset pagination.

oRPC entry, @arki/contracts/orpc (peer: @orpc/contract):

  • operations(contract), Operations<C> — the operation tree of a contract.
  • operationAt(contract, path) — the operation at a path, or undefined.
  • Operation<I, O, E, M>, AnyOperation, OperationOf<C>, InputOf<Op>, OutputOf<Op>, ErrorOf<Op>, MetaOf<Op> — the identity and its types.
  • OPERATION ('~op'), Identified<Op>, operationOf(carrier) — a value that carries an operation.

Drizzle entry, @arki/contracts/drizzle:

  • createSelectSchema(table, refine?) — branded select schema.
  • createInsertSchema(table, refine?) — branded insert schema.
  • createUpdateSchema(table, refine?) — every field optional, otherwise like insert.
  • jsonColumn(name, storageSchema) — JSONB column with a runtime storage schema and inferred application type.
  • COLUMN_ZOD_SCHEMA — Symbol.for('@arki/contracts/columnZodSchema') side-channel for ID factories.
  • bufferSchema, jsonSchema, literalSchema, createSchemaFactory — re-exported from drizzle-orm/zod.

Failure behaviour

Static definition misuse throws ContractsError, a TypeError. ID generation and cursor codecs return canonical failures; check them with their definitions or isFailure. Match on code, never on message.

import { CONTRACTS_ERROR_CODES, ContractsError, defineId } from '@arki/contracts';
 
try {
  Reflect.apply(defineId, undefined, [42]);
} catch (error) {
  if (!(error instanceof ContractsError)) throw error;
  console.log(error.code === CONTRACTS_ERROR_CODES.invalidIdPrefix);
  console.log(error.remediation);
}
true
Supply the stored prefix as a string; use an empty string for unprefixed IDs.

Schema parse calls throw a ZodError as Zod does. Use safeParse for input from outside.

CodeRaised byMeaning
ARKI_CONTRACTS_E001defineIdThe prefix is not a string.
ARKI_CONTRACTS_E009defineIdThe domain kind is missing, empty or not a string.
ARKI_CONTRACTS_E010defineIdInvalid generation format; use uuid, omit format, or provide a valid alphabet/length object.
ARKI_CONTRACTS_E002assertUniqueIdPrefixesTwo prefixes are equal or one starts the other.
ARKI_CONTRACTS_E003legacy reserved exception codeID generation now returns RandomSourceUnavailable.
ARKI_CONTRACTS_E004keysetNo keys in the static declaration.
ARKI_CONTRACTS_E005legacy reserved exception codeCursor input now returns InvalidCursor.
ARKI_CONTRACTS_E006operations, createOrpcUtilsA contract key contains "." or uses a reserved name.
ARKI_CONTRACTS_E007operationOfThe value carries no operation.

Cursor codecs return contracts.invalid_cursor or contracts.invalid_cursor_value, plus canonical schema.validator_defect / failure.unexpected_defect for unexpected faults. Causes stay private. These pure codecs need no separate OTel span; the calling query or transport owns the operation span.

Limits

  • Limit per page. pageInput accepts 1 to 100 rows. The default is 20. Change both with defaultLimit and maxLimit.

    import { keyset, pageInput } from '@arki/contracts';
     
    const input = pageInput(keyset({ id: 'asc' }));
    console.log(input.safeParse({ limit: 100 }).success);
    console.log(input.safeParse({ limit: 101 }).success);
    true
    false
  • Key values. A keyset key may not be NULL in a row. Order by NOT NULL columns, and end on a unique one.

  • Cursors. A cursor works only with the keyset that made it. Changing the order invalidates cursors already handed out.

  • Prefixes. Letters, digits and _. No two prefixes in one app may be equal or start one another (sub and sub_).

  • Ids need secure randomness. Default create() uses crypto.getRandomValues; UUID generation prefers crypto.randomUUID, with secure random bytes as its fallback. Rejection sampling stops after 32 batches of twice the body length (48 bytes for default bodies); a provider that never supplies accepted bytes returns UnexpectedDefect. Missing providers return RandomSourceUnavailable; thrown faults and malformed output return UnexpectedDefect. There is no Math.random fallback.

  • Operations. A contract key may not contain . or use a name the query utils reserve.

Documentation

@arki/contracts is framework-agnostic and works on its own. When you compose it with the @arki/dot application framework, see packages/dot/docs/ for plugin authoring, lifecycle, and diagnostics.

Support

Questions and bugs: https://github.com/arki-labs/arki/issues. Include the package version, your runtime and the error code.

Benchmarks

Building and using Zod schemas from a 15-column Drizzle table, compared with drizzle-orm/zod (which @arki/contracts wraps) and a hand-written Zod object.

Node v22.13.1 on Apple M2 Max, 2026-10-13. Median time per operation, lower is better.

Build select schema (15 columns)

Usually done once at startup.

LibraryTime / opvs fastest
@arki/contracts createSelectSchema193.66 µs1.26×
drizzle-orm/zod createSelectSchema153.73 µsfastest

Build insert schema (15 columns)

LibraryTime / opvs fastest
@arki/contracts createInsertSchema148.37 µs1.60×
drizzle-orm/zod createInsertSchema92.97 µsfastest

Parse one valid row

@arki/contracts and the hand-written schema check the id prefix "usr_"; plain drizzle-orm/zod only checks that id is a string.

LibraryTime / opvs fastest
@arki/contracts select schema2.71 µs3.43×
drizzle-orm/zod select schema2.82 µs3.57×
hand-written z.object790.4 nsfastest

Read the rows with the contracts in mind:

  • @arki/contracts calls drizzle-orm/zod and then adds branded types and the per-column runtime schemas stashed by ID factories; that extra work is the cost shown in the build rows.
  • The hand-written schema does not read the table at all, so it only shows the floor for parsing.

Reproduce with bun run bench in the package directory; regenerate this section with bun run bench --write-readme.

License

MIT. See LICENSE.

Docs 5 pages in 0.3.0

Public imports 3 paths · 354 exports

Import pathExportsFirst names
@arki/contracts332 exports_default, _function, _ZodBigInt, _ZodBoolean, …
All 332 names
  • _default function
  • _function function
  • _ZodBigInt interface
  • _ZodBoolean interface
  • _ZodDate interface
  • _ZodNumber interface
  • _ZodString interface
  • _ZodType interface
  • $brand variable
  • $input variable
  • $output variable
  • any function
  • array function
  • assertUniqueIdPrefixes function
  • base64 function
  • base64url function
  • bigint function
  • boolean function
  • BRAND type
  • catch function
  • check function
  • cidrv4 function
  • cidrv6 function
  • clone function
  • codec function
  • coerce unknown
  • compile function
  • CompileOptions interface
  • config function
  • CONTRACTS_ERROR_CODES variable
  • ContractsError class
  • ContractsErrorCode type
  • core unknown
  • createIdBody function
  • creditCard function
  • cuid function
  • cuid2 function
  • currencyCode function
  • CURSOR_DECODE_FAILURES variable
  • CURSOR_ENCODE_FAILURES variable
  • CURSOR_FAILURES variable
  • CursorValue type
  • CursorValues type
  • custom function
  • date function
  • decode variable
  • decodeAsync variable
  • deepPartial function
  • defineId function
  • describe variable
  • discriminatedUnion function
  • e164 function
  • email function
  • emoji function
  • encode variable
  • encodeAsync variable
  • endsWith function
  • enum function
  • exactOptional function
  • file function
  • flattenError function
  • float32 function
  • float64 function
  • formatError function
  • formData unknown
  • fromJSONSchema function
  • function function
  • getDiscriminatedOption function
  • getErrorMap function
  • GlobalMeta interface
  • globalRegistry variable
  • gt function
  • gte function
  • guid function
  • hash function
  • hex function
  • hostname function
  • httpUrl function
  • iban function
  • ID_GENERATION_FAILURES variable
  • IdDeclaration type
  • IdGenerationFailure type
  • IdOf type
  • includes function
  • infer type
  • Infer type
  • inferFlattenedErrors type
  • inferFormattedError type
  • input function
  • instanceof function
  • int function
  • int32 function
  • int64 function
  • intersection function
  • INVALID variable
  • InvalidCursor variable
  • InvalidCursorValue variable
  • invertCodec function
  • ipv4 function
  • ipv6 function
  • iso unknown
  • IssueData type
  • json function
  • JSONType type
  • jwt function
  • keyof function
  • keyset function
  • Keyset type
  • KeysetOrder type
  • ksuid function
  • lazy function
  • length function
  • literal function
  • locales unknown
  • looseObject function
  • looseRecord function
  • lowercase function
  • lt function
  • lte function
  • mac function
  • map function
  • maxLength function
  • maxSize function
  • memoizer function
  • meta variable
  • mime function
  • minLength function
  • minSize function
  • multipleOf function
  • nan function
  • nanoid function
  • nativeEnum function
  • negative function
  • never function
  • NEVER variable
  • nonnegative function
  • nonoptional function
  • nonpositive function
  • normalize function
  • null function
  • nullable function
  • nullish function
  • number function
  • object function
  • optional function
  • output function
  • overwrite function
  • page function
  • Page type
  • pageInput function
  • PageInputOptions type
  • parse variable
  • parseAsync variable
  • partialRecord function
  • pipe function
  • positive function
  • prefault function
  • preprocess function
  • prettifyError function
  • promise function
  • properties function
  • property function
  • RandomSourceUnavailable variable
  • readonly function
  • record function
  • refine function
  • RefinementCtx interface
  • regex function
  • regexes unknown
  • registry function
  • safeDecode variable
  • safeDecodeAsync variable
  • safeEncode variable
  • safeEncodeAsync variable
  • SafeExtendShape type
  • safeParse variable
  • safeParseAsync variable
  • Schema type
  • set function
  • setErrorMap function
  • size function
  • slugify function
  • SortDirection type
  • startsWith function
  • strictObject function
  • string function
  • stringbool variable
  • stringFormat function
  • success function
  • superRefine function
  • symbol function
  • templateLiteral function
  • TimePrecision variable
  • toJSONSchema function
  • toLowerCase function
  • toUpperCase function
  • toZod function
  • transform function
  • treeifyError function
  • trim function
  • tuple function
  • TypeOf type
  • uint32 function
  • uint64 function
  • ulid function
  • undefined function
  • union function
  • unknown function
  • uppercase function
  • url function
  • UserId type
  • userIdSchema variable
  • util unknown
  • uuid function
  • uuidv4 function
  • uuidv6 function
  • uuidv7 function
  • validate variable
  • validateAsync variable
  • void function
  • withParser function
  • xid function
  • xor function
  • z unknown
  • ZodAny interface
  • ZodArray interface
  • ZodBase64 interface
  • ZodBase64URL interface
  • ZodBigInt interface
  • ZodBigIntFormat interface
  • ZodBoolean interface
  • ZodCatch interface
  • ZodCIDRv4 interface
  • ZodCIDRv6 interface
  • ZodCodec interface
  • ZodCoercedBigInt interface
  • ZodCoercedBoolean interface
  • ZodCoercedDate interface
  • ZodCoercedNumber interface
  • ZodCoercedString interface
  • ZodCompileAsyncError class
  • ZodCompileUnsupportedError class
  • ZodCreditCard interface
  • ZodCUID interface
  • ZodCUID2 interface
  • ZodCustom interface
  • ZodCustomStringFormat interface
  • ZodDate interface
  • ZodDefault interface
  • ZodDiscriminatedUnion interface
  • ZodE164 interface
  • ZodEmail interface
  • ZodEmoji interface
  • ZodEnum interface
  • ZodError interface
  • ZodErrorMap type
  • ZodExactOptional interface
  • ZodFile interface
  • ZodFirstPartySchemaTypes type
  • ZodFirstPartyTypeKind enum
  • ZodFlattenedError type
  • ZodFloat32 interface
  • ZodFloat64 interface
  • ZodFormattedError type
  • ZodFunction interface
  • ZodGUID interface
  • ZodIBAN interface
  • ZodInstanceOf interface
  • ZodInt interface
  • ZodInt32 interface
  • ZodInt64 interface
  • ZodIntersection interface
  • ZodIPv4 interface
  • ZodIPv6 interface
  • ZodISODate interface
  • ZodISODateTime interface
  • ZodISODuration interface
  • ZodISOTime interface
  • ZodIssue type
  • ZodIssueCode variable
  • ZodJSONSchema interface
  • ZodJSONSchemaInternals interface
  • ZodJWT interface
  • ZodKSUID interface
  • ZodLazy interface
  • ZodLiteral interface
  • ZodMAC interface
  • ZodMap interface
  • ZodNaN interface
  • ZodNanoID interface
  • ZodNever interface
  • ZodNonOptional interface
  • ZodNull interface
  • ZodNullable interface
  • ZodNumber interface
  • ZodNumberFormat interface
  • ZodObject interface
  • ZodOptional interface
  • ZodPipe interface
  • ZodPrefault interface
  • ZodPreprocess interface
  • ZodPromise interface
  • ZodRawShape type
  • ZodReadonly interface
  • ZodRealError variable
  • ZodRecord interface
  • ZodSafeParseError type
  • ZodSafeParseResult type
  • ZodSafeParseSuccess type
  • ZodSchema type
  • ZodSet interface
  • ZodStandardSchemaWithJSON type
  • ZodString interface
  • ZodStringFormat interface
  • ZodSuccess interface
  • ZodSymbol interface
  • ZodTemplateLiteral interface
  • ZodTransform interface
  • ZodTuple interface
  • ZodType interface
  • ZodTypeAny type
  • ZodUInt32 interface
  • ZodUInt64 interface
  • ZodULID interface
  • ZodUndefined interface
  • ZodUnion interface
  • ZodUnknown interface
  • ZodURL interface
  • ZodUUID interface
  • ZodVoid interface
  • ZodXID interface
  • ZodXor interface
@arki/contracts/drizzle9 exportsbufferSchema, COLUMN_ZOD_SCHEMA, createInsertSchema, createSchemaFactory, …
All 9 names
  • bufferSchema variable
  • COLUMN_ZOD_SCHEMA variable
  • createInsertSchema function
  • createSchemaFactory function
  • createSelectSchema function
  • createUpdateSchema function
  • jsonColumn function
  • jsonSchema variable
  • literalSchema variable
@arki/contracts/orpc13 exportsAnyOperation, ErrorOf, Identified, InputOf, …
All 13 names
  • AnyOperation type
  • ErrorOf type
  • Identified type
  • InputOf type
  • MetaOf type
  • Operation type
  • OPERATION variable
  • operationAt function
  • operationOf function
  • OperationOf type
  • operations function
  • Operations type
  • OutputOf type

Every export with its signature, as JSON