Skip to main content

Schema Types

Juno provides a type system built on top of Zod, extended with a few additional types you'll need when working with serverless functions.

All types are available through j.

import { j } from "@junobuild/schema";

Juno Types

The following are specific types provided by Juno:

j.principal()

Validates and represents an Internet Computer Principal.

j.principal();

j.uint8array()

Validates and represents a Uint8Array.

j.uint8array();

Zod Types

All Zod types are available through j. Refer to the Zod documentation for the full API reference.

note

union is not supported. Use discriminatedUnion instead.