@atproto/lexicon
Version:
atproto Lexicon schema language library
1,334 lines • 793 kB
TypeScript
import { z } from 'zod';
export declare const languageSchema: z.ZodEffects<z.ZodString, string, string>;
export declare const lexLang: z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodOptional<z.ZodString>>;
export type LexLang = z.infer<typeof lexLang>;
export declare const lexBoolean: z.ZodObject<{
type: z.ZodLiteral<"boolean">;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodBoolean>;
const: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
}, {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
}>;
export type LexBoolean = z.infer<typeof lexBoolean>;
export declare const lexInteger: z.ZodObject<{
type: z.ZodLiteral<"integer">;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodNumber>;
minimum: z.ZodOptional<z.ZodNumber>;
maximum: z.ZodOptional<z.ZodNumber>;
enum: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
const: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
}, {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
}>;
export type LexInteger = z.infer<typeof lexInteger>;
export declare const lexStringFormat: z.ZodEnum<["datetime", "uri", "at-uri", "did", "handle", "at-identifier", "nsid", "cid", "language", "tid", "record-key"]>;
export type LexStringFormat = z.infer<typeof lexStringFormat>;
export declare const lexString: z.ZodObject<{
type: z.ZodLiteral<"string">;
format: z.ZodOptional<z.ZodEnum<["datetime", "uri", "at-uri", "did", "handle", "at-identifier", "nsid", "cid", "language", "tid", "record-key"]>>;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodString>;
minLength: z.ZodOptional<z.ZodNumber>;
maxLength: z.ZodOptional<z.ZodNumber>;
minGraphemes: z.ZodOptional<z.ZodNumber>;
maxGraphemes: z.ZodOptional<z.ZodNumber>;
enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
const: z.ZodOptional<z.ZodString>;
knownValues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
}, {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
}>;
export type LexString = z.infer<typeof lexString>;
export declare const lexUnknown: z.ZodObject<{
type: z.ZodLiteral<"unknown">;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "unknown";
description?: string | undefined;
}, {
type: "unknown";
description?: string | undefined;
}>;
export type LexUnknown = z.infer<typeof lexUnknown>;
export declare const lexPrimitive: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<"boolean">;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodBoolean>;
const: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
}, {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"integer">;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodNumber>;
minimum: z.ZodOptional<z.ZodNumber>;
maximum: z.ZodOptional<z.ZodNumber>;
enum: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
const: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
}, {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"string">;
format: z.ZodOptional<z.ZodEnum<["datetime", "uri", "at-uri", "did", "handle", "at-identifier", "nsid", "cid", "language", "tid", "record-key"]>>;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodString>;
minLength: z.ZodOptional<z.ZodNumber>;
maxLength: z.ZodOptional<z.ZodNumber>;
minGraphemes: z.ZodOptional<z.ZodNumber>;
maxGraphemes: z.ZodOptional<z.ZodNumber>;
enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
const: z.ZodOptional<z.ZodString>;
knownValues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
}, {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"unknown">;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "unknown";
description?: string | undefined;
}, {
type: "unknown";
description?: string | undefined;
}>]>;
export type LexPrimitive = z.infer<typeof lexPrimitive>;
export declare const lexBytes: z.ZodObject<{
type: z.ZodLiteral<"bytes">;
description: z.ZodOptional<z.ZodString>;
maxLength: z.ZodOptional<z.ZodNumber>;
minLength: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "bytes";
description?: string | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
}, {
type: "bytes";
description?: string | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
}>;
export type LexBytes = z.infer<typeof lexBytes>;
export declare const lexCidLink: z.ZodObject<{
type: z.ZodLiteral<"cid-link">;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "cid-link";
description?: string | undefined;
}, {
type: "cid-link";
description?: string | undefined;
}>;
export type LexCidLink = z.infer<typeof lexCidLink>;
export declare const lexIpldType: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<"bytes">;
description: z.ZodOptional<z.ZodString>;
maxLength: z.ZodOptional<z.ZodNumber>;
minLength: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "bytes";
description?: string | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
}, {
type: "bytes";
description?: string | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"cid-link">;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "cid-link";
description?: string | undefined;
}, {
type: "cid-link";
description?: string | undefined;
}>]>;
export type LexIpldType = z.infer<typeof lexIpldType>;
export declare const lexRef: z.ZodObject<{
type: z.ZodLiteral<"ref">;
description: z.ZodOptional<z.ZodString>;
ref: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "ref";
description?: string | undefined;
ref: string;
}, {
type: "ref";
description?: string | undefined;
ref: string;
}>;
export type LexRef = z.infer<typeof lexRef>;
export declare const lexRefUnion: z.ZodObject<{
type: z.ZodLiteral<"union">;
description: z.ZodOptional<z.ZodString>;
refs: z.ZodArray<z.ZodString, "many">;
closed: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
type: "union";
description?: string | undefined;
refs: string[];
closed?: boolean | undefined;
}, {
type: "union";
description?: string | undefined;
refs: string[];
closed?: boolean | undefined;
}>;
export type LexRefUnion = z.infer<typeof lexRefUnion>;
export declare const lexRefVariant: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<"ref">;
description: z.ZodOptional<z.ZodString>;
ref: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "ref";
description?: string | undefined;
ref: string;
}, {
type: "ref";
description?: string | undefined;
ref: string;
}>, z.ZodObject<{
type: z.ZodLiteral<"union">;
description: z.ZodOptional<z.ZodString>;
refs: z.ZodArray<z.ZodString, "many">;
closed: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
type: "union";
description?: string | undefined;
refs: string[];
closed?: boolean | undefined;
}, {
type: "union";
description?: string | undefined;
refs: string[];
closed?: boolean | undefined;
}>]>;
export type LexRefVariant = z.infer<typeof lexRefVariant>;
export declare const lexBlob: z.ZodObject<{
type: z.ZodLiteral<"blob">;
description: z.ZodOptional<z.ZodString>;
accept: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
maxSize: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "blob";
description?: string | undefined;
accept?: string[] | undefined;
maxSize?: number | undefined;
}, {
type: "blob";
description?: string | undefined;
accept?: string[] | undefined;
maxSize?: number | undefined;
}>;
export type LexBlob = z.infer<typeof lexBlob>;
export declare const lexArray: z.ZodObject<{
type: z.ZodLiteral<"array">;
description: z.ZodOptional<z.ZodString>;
items: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<"boolean">;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodBoolean>;
const: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
}, {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"integer">;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodNumber>;
minimum: z.ZodOptional<z.ZodNumber>;
maximum: z.ZodOptional<z.ZodNumber>;
enum: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
const: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
}, {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"string">;
format: z.ZodOptional<z.ZodEnum<["datetime", "uri", "at-uri", "did", "handle", "at-identifier", "nsid", "cid", "language", "tid", "record-key"]>>;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodString>;
minLength: z.ZodOptional<z.ZodNumber>;
maxLength: z.ZodOptional<z.ZodNumber>;
minGraphemes: z.ZodOptional<z.ZodNumber>;
maxGraphemes: z.ZodOptional<z.ZodNumber>;
enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
const: z.ZodOptional<z.ZodString>;
knownValues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
}, {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"unknown">;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "unknown";
description?: string | undefined;
}, {
type: "unknown";
description?: string | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"bytes">;
description: z.ZodOptional<z.ZodString>;
maxLength: z.ZodOptional<z.ZodNumber>;
minLength: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "bytes";
description?: string | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
}, {
type: "bytes";
description?: string | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"cid-link">;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "cid-link";
description?: string | undefined;
}, {
type: "cid-link";
description?: string | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"ref">;
description: z.ZodOptional<z.ZodString>;
ref: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "ref";
description?: string | undefined;
ref: string;
}, {
type: "ref";
description?: string | undefined;
ref: string;
}>, z.ZodObject<{
type: z.ZodLiteral<"union">;
description: z.ZodOptional<z.ZodString>;
refs: z.ZodArray<z.ZodString, "many">;
closed: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
type: "union";
description?: string | undefined;
refs: string[];
closed?: boolean | undefined;
}, {
type: "union";
description?: string | undefined;
refs: string[];
closed?: boolean | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"blob">;
description: z.ZodOptional<z.ZodString>;
accept: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
maxSize: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "blob";
description?: string | undefined;
accept?: string[] | undefined;
maxSize?: number | undefined;
}, {
type: "blob";
description?: string | undefined;
accept?: string[] | undefined;
maxSize?: number | undefined;
}>]>;
minLength: z.ZodOptional<z.ZodNumber>;
maxLength: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "array";
description?: string | undefined;
items: {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
} | {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
} | {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
} | {
type: "unknown";
description?: string | undefined;
} | {
type: "bytes";
description?: string | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
} | {
type: "cid-link";
description?: string | undefined;
} | {
type: "ref";
description?: string | undefined;
ref: string;
} | {
type: "union";
description?: string | undefined;
refs: string[];
closed?: boolean | undefined;
} | {
type: "blob";
description?: string | undefined;
accept?: string[] | undefined;
maxSize?: number | undefined;
};
minLength?: number | undefined;
maxLength?: number | undefined;
}, {
type: "array";
description?: string | undefined;
items: {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
} | {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
} | {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
} | {
type: "unknown";
description?: string | undefined;
} | {
type: "bytes";
description?: string | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
} | {
type: "cid-link";
description?: string | undefined;
} | {
type: "ref";
description?: string | undefined;
ref: string;
} | {
type: "union";
description?: string | undefined;
refs: string[];
closed?: boolean | undefined;
} | {
type: "blob";
description?: string | undefined;
accept?: string[] | undefined;
maxSize?: number | undefined;
};
minLength?: number | undefined;
maxLength?: number | undefined;
}>;
export type LexArray = z.infer<typeof lexArray>;
export declare const lexPrimitiveArray: z.ZodObject<z.objectUtil.extendShape<{
type: z.ZodLiteral<"array">;
description: z.ZodOptional<z.ZodString>;
items: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<"boolean">;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodBoolean>;
const: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
}, {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"integer">;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodNumber>;
minimum: z.ZodOptional<z.ZodNumber>;
maximum: z.ZodOptional<z.ZodNumber>;
enum: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
const: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
}, {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"string">;
format: z.ZodOptional<z.ZodEnum<["datetime", "uri", "at-uri", "did", "handle", "at-identifier", "nsid", "cid", "language", "tid", "record-key"]>>;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodString>;
minLength: z.ZodOptional<z.ZodNumber>;
maxLength: z.ZodOptional<z.ZodNumber>;
minGraphemes: z.ZodOptional<z.ZodNumber>;
maxGraphemes: z.ZodOptional<z.ZodNumber>;
enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
const: z.ZodOptional<z.ZodString>;
knownValues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
}, {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"unknown">;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "unknown";
description?: string | undefined;
}, {
type: "unknown";
description?: string | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"bytes">;
description: z.ZodOptional<z.ZodString>;
maxLength: z.ZodOptional<z.ZodNumber>;
minLength: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "bytes";
description?: string | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
}, {
type: "bytes";
description?: string | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"cid-link">;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "cid-link";
description?: string | undefined;
}, {
type: "cid-link";
description?: string | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"ref">;
description: z.ZodOptional<z.ZodString>;
ref: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "ref";
description?: string | undefined;
ref: string;
}, {
type: "ref";
description?: string | undefined;
ref: string;
}>, z.ZodObject<{
type: z.ZodLiteral<"union">;
description: z.ZodOptional<z.ZodString>;
refs: z.ZodArray<z.ZodString, "many">;
closed: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
type: "union";
description?: string | undefined;
refs: string[];
closed?: boolean | undefined;
}, {
type: "union";
description?: string | undefined;
refs: string[];
closed?: boolean | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"blob">;
description: z.ZodOptional<z.ZodString>;
accept: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
maxSize: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "blob";
description?: string | undefined;
accept?: string[] | undefined;
maxSize?: number | undefined;
}, {
type: "blob";
description?: string | undefined;
accept?: string[] | undefined;
maxSize?: number | undefined;
}>]>;
minLength: z.ZodOptional<z.ZodNumber>;
maxLength: z.ZodOptional<z.ZodNumber>;
}, {
items: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<"boolean">;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodBoolean>;
const: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
}, {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"integer">;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodNumber>;
minimum: z.ZodOptional<z.ZodNumber>;
maximum: z.ZodOptional<z.ZodNumber>;
enum: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
const: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
}, {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"string">;
format: z.ZodOptional<z.ZodEnum<["datetime", "uri", "at-uri", "did", "handle", "at-identifier", "nsid", "cid", "language", "tid", "record-key"]>>;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodString>;
minLength: z.ZodOptional<z.ZodNumber>;
maxLength: z.ZodOptional<z.ZodNumber>;
minGraphemes: z.ZodOptional<z.ZodNumber>;
maxGraphemes: z.ZodOptional<z.ZodNumber>;
enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
const: z.ZodOptional<z.ZodString>;
knownValues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
}, {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"unknown">;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "unknown";
description?: string | undefined;
}, {
type: "unknown";
description?: string | undefined;
}>]>;
}>, "strip", z.ZodTypeAny, {
type: "array";
description?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
items: {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
} | {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
} | {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
} | {
type: "unknown";
description?: string | undefined;
};
}, {
type: "array";
description?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
items: {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
} | {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
} | {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
} | {
type: "unknown";
description?: string | undefined;
};
}>;
export type LexPrimitiveArray = z.infer<typeof lexPrimitiveArray>;
export declare const lexToken: z.ZodObject<{
type: z.ZodLiteral<"token">;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "token";
description?: string | undefined;
}, {
type: "token";
description?: string | undefined;
}>;
export type LexToken = z.infer<typeof lexToken>;
export declare const lexObject: z.ZodEffects<z.ZodObject<{
type: z.ZodLiteral<"object">;
description: z.ZodOptional<z.ZodString>;
required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
nullable: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
properties: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<"array">;
description: z.ZodOptional<z.ZodString>;
items: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<"boolean">;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodBoolean>;
const: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
}, {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"integer">;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodNumber>;
minimum: z.ZodOptional<z.ZodNumber>;
maximum: z.ZodOptional<z.ZodNumber>;
enum: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
const: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
}, {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"string">;
format: z.ZodOptional<z.ZodEnum<["datetime", "uri", "at-uri", "did", "handle", "at-identifier", "nsid", "cid", "language", "tid", "record-key"]>>;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodString>;
minLength: z.ZodOptional<z.ZodNumber>;
maxLength: z.ZodOptional<z.ZodNumber>;
minGraphemes: z.ZodOptional<z.ZodNumber>;
maxGraphemes: z.ZodOptional<z.ZodNumber>;
enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
const: z.ZodOptional<z.ZodString>;
knownValues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
}, {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"unknown">;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "unknown";
description?: string | undefined;
}, {
type: "unknown";
description?: string | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"bytes">;
description: z.ZodOptional<z.ZodString>;
maxLength: z.ZodOptional<z.ZodNumber>;
minLength: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "bytes";
description?: string | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
}, {
type: "bytes";
description?: string | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"cid-link">;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "cid-link";
description?: string | undefined;
}, {
type: "cid-link";
description?: string | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"ref">;
description: z.ZodOptional<z.ZodString>;
ref: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "ref";
description?: string | undefined;
ref: string;
}, {
type: "ref";
description?: string | undefined;
ref: string;
}>, z.ZodObject<{
type: z.ZodLiteral<"union">;
description: z.ZodOptional<z.ZodString>;
refs: z.ZodArray<z.ZodString, "many">;
closed: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
type: "union";
description?: string | undefined;
refs: string[];
closed?: boolean | undefined;
}, {
type: "union";
description?: string | undefined;
refs: string[];
closed?: boolean | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"blob">;
description: z.ZodOptional<z.ZodString>;
accept: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
maxSize: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "blob";
description?: string | undefined;
accept?: string[] | undefined;
maxSize?: number | undefined;
}, {
type: "blob";
description?: string | undefined;
accept?: string[] | undefined;
maxSize?: number | undefined;
}>]>;
minLength: z.ZodOptional<z.ZodNumber>;
maxLength: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "array";
description?: string | undefined;
items: {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
} | {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
} | {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
} | {
type: "unknown";
description?: string | undefined;
} | {
type: "bytes";
description?: string | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
} | {
type: "cid-link";
description?: string | undefined;
} | {
type: "ref";
description?: string | undefined;
ref: string;
} | {
type: "union";
description?: string | undefined;
refs: string[];
closed?: boolean | undefined;
} | {
type: "blob";
description?: string | undefined;
accept?: string[] | undefined;
maxSize?: number | undefined;
};
minLength?: number | undefined;
maxLength?: number | undefined;
}, {
type: "array";
description?: string | undefined;
items: {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
} | {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
} | {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
} | {
type: "unknown";
description?: string | undefined;
} | {
type: "bytes";
description?: string | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
} | {
type: "cid-link";
description?: string | undefined;
} | {
type: "ref";
description?: string | undefined;
ref: string;
} | {
type: "union";
description?: string | undefined;
refs: string[];
closed?: boolean | undefined;
} | {
type: "blob";
description?: string | undefined;
accept?: string[] | undefined;
maxSize?: number | undefined;
};
minLength?: number | undefined;
maxLength?: number | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"boolean">;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodBoolean>;
const: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
}, {
type: "boolean";
description?: string | undefined;
default?: boolean | undefined;
const?: boolean | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"integer">;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodNumber>;
minimum: z.ZodOptional<z.ZodNumber>;
maximum: z.ZodOptional<z.ZodNumber>;
enum: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
const: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
}, {
type: "integer";
description?: string | undefined;
default?: number | undefined;
minimum?: number | undefined;
maximum?: number | undefined;
enum?: number[] | undefined;
const?: number | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"string">;
format: z.ZodOptional<z.ZodEnum<["datetime", "uri", "at-uri", "did", "handle", "at-identifier", "nsid", "cid", "language", "tid", "record-key"]>>;
description: z.ZodOptional<z.ZodString>;
default: z.ZodOptional<z.ZodString>;
minLength: z.ZodOptional<z.ZodNumber>;
maxLength: z.ZodOptional<z.ZodNumber>;
minGraphemes: z.ZodOptional<z.ZodNumber>;
maxGraphemes: z.ZodOptional<z.ZodNumber>;
enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
const: z.ZodOptional<z.ZodString>;
knownValues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
}, {
type: "string";
format?: "at-identifier" | "at-uri" | "cid" | "datetime" | "did" | "handle" | "language" | "nsid" | "record-key" | "tid" | "uri" | undefined;
description?: string | undefined;
default?: string | undefined;
minLength?: number | undefined;
maxLength?: number | undefined;
minGraphemes?: number | undefined;
maxGraphemes?: number | undefined;
enum?: string[] | undefined;
const?: string | undefined;
knownValues?: string[] | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"unknown">;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "unknown";
description?: string | undefined;
}, {
type: "unknown";
description?: string | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"bytes">;
description: z.ZodOptional<z.ZodString>;
maxLength: z.ZodOptional<z.ZodNumber>;
minLength: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "bytes";
description?: string | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
}, {
type: "bytes";
description?: string | undefined;
maxLength?: number | undefined;
minLength?: number | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"cid-link">;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "cid-link";
description?: string | undefined;
}, {
type: "cid-link";
description?: string | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"ref">;
description: z.ZodOptional<z.ZodString>;
ref: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "ref";
description?: string | undefined;
ref: string;
}, {
type: "ref";
description?: string | undefined;
ref: string;
}>, z.ZodObject<{
type: z.ZodLiteral<"union">;
description: z.ZodOptional<z.ZodString>;
refs: z.ZodArray<z.ZodString, "many">;
closed: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
type: "union";
description?: string | undefined;
refs: string[];
closed?: boolean | undefined;
}, {
type: "union";
description?: string | undefined;
refs: string[];
closed?: boolean | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"blob">;
description: z.ZodOptional<z.ZodString>;
accept: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
maxSize: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
type: "blob";
description?: string | undefined;
accept?: string[] | undefined;
maxSize?: number | undefined;
}, {
type: "blob";
description?: string | undefined;
accept?: string[] | undefined;
maxSize?: number | undefined;
}>]>>;
}, "strip", z.ZodTypeAny, {
type: "obj