import * as type_fest_source_internal from 'type-fest/source/internal'; import * as type_fest_source_is_literal from 'type-fest/source/is-literal'; import { CustomValidator } from 'sanity'; import { IsStringLiteral } from 'type-fest'; import { z } from 'zod'; import { decorator } from '@portabletext-typed/types/src/internal'; import { InferSchemaValues, referenced } from '@sanity-typed/types'; import { ConfigBase, DefinitionBase, ArrayMemberDefinition, FieldDefinition, TypeDefinition } from '@sanity-typed/types/src/internal'; type Negate = T extends true ? false : true; type MaybeArray = T | T[]; type SchemaTypeDefinition & { name?: string; }, THotspot extends boolean> = ArrayMemberDefinition | FieldDefinition | TypeDefinition; declare const zodUnion: (types: Zods) => Zods[number] | z.ZodUnion<[Zods[number], Zods[number], ...Zods[number][]]>; declare const constantZods: { boolean: z.ZodBoolean; crossDatasetReference: z.ZodObject<{ _dataset: z.ZodString; _projectId: z.ZodString; _ref: z.ZodString; _type: z.ZodLiteral<"crossDatasetReference">; _weak: z.ZodOptional; }, "strip", z.ZodTypeAny, { _dataset: string; _projectId: string; _ref: string; _type: "crossDatasetReference"; _weak?: boolean | undefined; }, { _dataset: string; _projectId: string; _ref: string; _type: "crossDatasetReference"; _weak?: boolean | undefined; }>; email: z.ZodString; geopoint: z.ZodObject<{ _type: z.ZodLiteral<"geopoint">; alt: z.ZodOptional; lat: z.ZodNumber; lng: z.ZodNumber; }, "strip", z.ZodTypeAny, { _type: "geopoint"; lat: number; lng: number; alt?: number | undefined; }, { _type: "geopoint"; lat: number; lng: number; alt?: number | undefined; }>; slug: z.ZodObject<{ _type: z.ZodLiteral<"slug">; current: z.ZodString; }, "strip", z.ZodTypeAny, { _type: "slug"; current: string; }, { _type: "slug"; current: string; }>; }; declare const dateZod: >(schemaType: TSchemaType) => z.ZodType; declare const datetimeZod: >(schemaType: TSchemaType) => z.ZodType; declare const numberZod: >(schemaType: TSchemaType) => type_fest_source_internal.IsNotFalse ? TNumberValue : never, number> | type_fest_source_is_literal.LiteralCheck ? TNumberValue : never, bigint>> extends infer T ? T extends type_fest_source_internal.IsNotFalse ? TNumberValue : never, number> | type_fest_source_is_literal.LiteralCheck ? TNumberValue : never, bigint>> ? T extends true ? z.ZodLiteral ? TNumberValue : never> | z.ZodUnion<[z.ZodLiteral ? TNumberValue : never>, z.ZodLiteral ? TNumberValue : never>, ...z.ZodLiteral ? TNumberValue : never>[]]> : z.ZodNumber : never : never; declare const referenceZod: >(schemaType: TSchemaType) => z.ZodObject<{ [referenced]: z.ZodType ? TReferenced : never, z.ZodTypeDef, TSchemaType extends SchemaTypeDefinition<"reference", any, any, infer TReferenced extends string, any, any, any, any, any, any> ? TReferenced : never>; _ref: z.ZodString; _type: z.ZodLiteral<"reference">; } & ((true extends (TSchemaType extends SchemaTypeDefinition<"reference", any, any, any, infer TReferenceWeak extends boolean, any, any, any, any, any> ? TReferenceWeak : never) ? true : false) extends infer T ? T extends (true extends (TSchemaType extends SchemaTypeDefinition<"reference", any, any, any, infer TReferenceWeak extends boolean, any, any, any, any, any> ? TReferenceWeak : never) ? true : false) ? T extends true ? { _weak: z.ZodOptional>; _strengthenOnPublish: z.ZodOptional; template: z.ZodOptional>; }, "strip", z.ZodTypeAny, { params: Record; id: string; }, { params: Record; id: string; }>>; }, "strip", z.ZodTypeAny, { type: string; weak?: boolean | undefined; template?: { params: Record; id: string; } | undefined; }, { type: string; weak?: boolean | undefined; template?: { params: Record; id: string; } | undefined; }>>; } : {} : never : never), "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks ? TReferenced : never, z.ZodTypeDef, TSchemaType extends SchemaTypeDefinition<"reference", any, any, infer TReferenced extends string, any, any, any, any, any, any> ? TReferenced : never>; _ref: z.ZodString; _type: z.ZodLiteral<"reference">; } & ((true extends (TSchemaType extends SchemaTypeDefinition<"reference", any, any, any, infer TReferenceWeak extends boolean, any, any, any, any, any> ? TReferenceWeak : never) ? true : false) extends infer T_3 ? T_3 extends (true extends (TSchemaType extends SchemaTypeDefinition<"reference", any, any, any, infer TReferenceWeak extends boolean, any, any, any, any, any> ? TReferenceWeak : never) ? true : false) ? T_3 extends true ? { _weak: z.ZodOptional>; _strengthenOnPublish: z.ZodOptional; template: z.ZodOptional>; }, "strip", z.ZodTypeAny, { params: Record; id: string; }, { params: Record; id: string; }>>; }, "strip", z.ZodTypeAny, { type: string; weak?: boolean | undefined; template?: { params: Record; id: string; } | undefined; }, { type: string; weak?: boolean | undefined; template?: { params: Record; id: string; } | undefined; }>>; } : {} : never : never)>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks ? TReferenced : never, z.ZodTypeDef, TSchemaType extends SchemaTypeDefinition<"reference", any, any, infer TReferenced extends string, any, any, any, any, any, any> ? TReferenced : never>; _ref: z.ZodString; _type: z.ZodLiteral<"reference">; } & ((true extends (TSchemaType extends SchemaTypeDefinition<"reference", any, any, any, infer TReferenceWeak extends boolean, any, any, any, any, any> ? TReferenceWeak : never) ? true : false) extends infer T_2 ? T_2 extends (true extends (TSchemaType extends SchemaTypeDefinition<"reference", any, any, any, infer TReferenceWeak extends boolean, any, any, any, any, any> ? TReferenceWeak : never) ? true : false) ? T_2 extends true ? { _weak: z.ZodOptional>; _strengthenOnPublish: z.ZodOptional; template: z.ZodOptional>; }, "strip", z.ZodTypeAny, { params: Record; id: string; }, { params: Record; id: string; }>>; }, "strip", z.ZodTypeAny, { type: string; weak?: boolean | undefined; template?: { params: Record; id: string; } | undefined; }, { type: string; weak?: boolean | undefined; template?: { params: Record; id: string; } | undefined; }>>; } : {} : never : never)>, any>[k]; } : never, z.baseObjectInputType<{ [referenced]: z.ZodType ? TReferenced : never, z.ZodTypeDef, TSchemaType extends SchemaTypeDefinition<"reference", any, any, infer TReferenced extends string, any, any, any, any, any, any> ? TReferenced : never>; _ref: z.ZodString; _type: z.ZodLiteral<"reference">; } & ((true extends (TSchemaType extends SchemaTypeDefinition<"reference", any, any, any, infer TReferenceWeak extends boolean, any, any, any, any, any> ? TReferenceWeak : never) ? true : false) extends infer T_6 ? T_6 extends (true extends (TSchemaType extends SchemaTypeDefinition<"reference", any, any, any, infer TReferenceWeak extends boolean, any, any, any, any, any> ? TReferenceWeak : never) ? true : false) ? T_6 extends true ? { _weak: z.ZodOptional>; _strengthenOnPublish: z.ZodOptional; template: z.ZodOptional>; }, "strip", z.ZodTypeAny, { params: Record; id: string; }, { params: Record; id: string; }>>; }, "strip", z.ZodTypeAny, { type: string; weak?: boolean | undefined; template?: { params: Record; id: string; } | undefined; }, { type: string; weak?: boolean | undefined; template?: { params: Record; id: string; } | undefined; }>>; } : {} : never : never)> extends infer T_4 ? { [k_1 in keyof T_4]: z.baseObjectInputType<{ [referenced]: z.ZodType ? TReferenced : never, z.ZodTypeDef, TSchemaType extends SchemaTypeDefinition<"reference", any, any, infer TReferenced extends string, any, any, any, any, any, any> ? TReferenced : never>; _ref: z.ZodString; _type: z.ZodLiteral<"reference">; } & ((true extends (TSchemaType extends SchemaTypeDefinition<"reference", any, any, any, infer TReferenceWeak extends boolean, any, any, any, any, any> ? TReferenceWeak : never) ? true : false) extends infer T_5 ? T_5 extends (true extends (TSchemaType extends SchemaTypeDefinition<"reference", any, any, any, infer TReferenceWeak extends boolean, any, any, any, any, any> ? TReferenceWeak : never) ? true : false) ? T_5 extends true ? { _weak: z.ZodOptional>; _strengthenOnPublish: z.ZodOptional; template: z.ZodOptional>; }, "strip", z.ZodTypeAny, { params: Record; id: string; }, { params: Record; id: string; }>>; }, "strip", z.ZodTypeAny, { type: string; weak?: boolean | undefined; template?: { params: Record; id: string; } | undefined; }, { type: string; weak?: boolean | undefined; template?: { params: Record; id: string; } | undefined; }>>; } : {} : never : never)>[k_1]; } : never>; declare const stringZod: >(schemaType: TSchemaType) => type_fest_source_is_literal.LiteralCheck ? TStringValue : never, string> extends infer T ? T extends type_fest_source_is_literal.LiteralCheck ? TStringValue : never, string> ? T extends true ? z.ZodLiteral ? TStringValue : never> | z.ZodUnion<[z.ZodLiteral ? TStringValue : never>, z.ZodLiteral ? TStringValue : never>, ...z.ZodLiteral ? TStringValue : never>[]]> : z.ZodType : never : never; declare const textZod: >(schemaType: TSchemaType) => z.ZodType; declare const urlZod: >(schemaType: TSchemaType) => z.ZodType; declare const zodEnabled: unique symbol; declare const enableZod: (customValidator: CustomValidator) => CustomValidator & { [zodEnabled]: true; }; type ExtendViaIntersection = Zod extends z.ZodObject ? z.ZodObject ? T : Omit), UnknownKeys, CatchAll, z.objectOutputType & (keyof z.output extends Exclude, keyof Shape> ? z.output : Omit, keyof Shape>), z.objectInputType & (keyof z.input extends Exclude, keyof Shape> ? z.input : Omit, keyof Shape>)> : Zod extends z.ZodLazy ? z.ZodLazy> : Zod; declare const addTypeFieldsZods: (type: Type) => { _type: z.ZodLiteral; }; type AddType = IsStringLiteral extends false ? Zod : ExtendViaIntersection>>>; declare const addKeyFieldsZods: { _key: z.ZodString; }; type AddKey = ExtendViaIntersection; type MembersZods[], TAliasedZods extends { [name: string]: z.ZodTypeAny; }> = TMemberDefinitions extends (infer TMemberDefinition extends ArrayMemberDefinition)[] ? (TMemberDefinition extends never ? never : AddKey>>)[] : never; type MaybeZodEffects = T | z.ZodEffects; type ArrayZod, TAliasedZods extends { [name: string]: z.ZodTypeAny; }> = TSchemaType extends { of: infer TMemberDefinitions extends ArrayMemberDefinition[]; } ? MaybeZodEffects>>>> : never; declare const arrayZod: , TAliasedZods extends { [name: string]: z.ZodTypeAny; }>(schemaType: TSchemaType, getZods: () => TAliasedZods) => ArrayZod; declare const spanZod: >(schemaType: TSchemaType) => z.ZodObject<{ [decorator]: z.ZodType ? TBlockMarkDecorator : never, z.ZodTypeDef, TSchemaType extends SchemaTypeDefinition<"block", any, any, any, any, any, any, infer TBlockMarkDecorator extends string, any, any> ? TBlockMarkDecorator : never>; _key: z.ZodString; _type: z.ZodLiteral<"span">; marks: z.ZodArray; text: z.ZodString; }, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks ? TBlockMarkDecorator : never, z.ZodTypeDef, TSchemaType extends SchemaTypeDefinition<"block", any, any, any, any, any, any, infer TBlockMarkDecorator extends string, any, any> ? TBlockMarkDecorator : never>; _key: z.ZodString; _type: z.ZodLiteral<"span">; marks: z.ZodArray; text: z.ZodString; }>, any> extends infer T ? { [k in keyof T]: z.objectUtil.addQuestionMarks ? TBlockMarkDecorator : never, z.ZodTypeDef, TSchemaType extends SchemaTypeDefinition<"block", any, any, any, any, any, any, infer TBlockMarkDecorator extends string, any, any> ? TBlockMarkDecorator : never>; _key: z.ZodString; _type: z.ZodLiteral<"span">; marks: z.ZodArray; text: z.ZodString; }>, any>[k]; } : never, z.baseObjectInputType<{ [decorator]: z.ZodType ? TBlockMarkDecorator : never, z.ZodTypeDef, TSchemaType extends SchemaTypeDefinition<"block", any, any, any, any, any, any, infer TBlockMarkDecorator extends string, any, any> ? TBlockMarkDecorator : never>; _key: z.ZodString; _type: z.ZodLiteral<"span">; marks: z.ZodArray; text: z.ZodString; }> extends infer T_1 ? { [k_1 in keyof T_1]: z.baseObjectInputType<{ [decorator]: z.ZodType ? TBlockMarkDecorator : never, z.ZodTypeDef, TSchemaType extends SchemaTypeDefinition<"block", any, any, any, any, any, any, infer TBlockMarkDecorator extends string, any, any> ? TBlockMarkDecorator : never>; _key: z.ZodString; _type: z.ZodLiteral<"span">; marks: z.ZodArray; text: z.ZodString; }>[k_1]; } : never>; declare const blockFieldsZods: >({ lists, styles, }: TSchemaType) => { _type: z.ZodLiteral<"block">; level: z.ZodOptional; listItem: Negate ? TBlockListItem : never, string>> extends infer T ? T extends Negate ? TBlockListItem : never, string>> ? T extends true ? z.ZodOptional, z.ZodLiteral<"number">]>> : z.ZodOptional ? TBlockListItem : never> | z.ZodUnion<[z.ZodLiteral ? TBlockListItem : never>, z.ZodLiteral ? TBlockListItem : never>, ...z.ZodLiteral ? TBlockListItem : never>[]]>> : never : never; style: Negate ? TBlockStyle : never, string>> extends infer T_1 ? T_1 extends Negate ? TBlockStyle : never, string>> ? T_1 extends true ? z.ZodUnion<[z.ZodLiteral<"blockquote">, z.ZodLiteral<"h1">, z.ZodLiteral<"h2">, z.ZodLiteral<"h3">, z.ZodLiteral<"h4">, z.ZodLiteral<"h5">, z.ZodLiteral<"h6">, z.ZodLiteral<"normal">]> : z.ZodLiteral ? TBlockStyle : never> | z.ZodUnion<[z.ZodLiteral ? TBlockStyle : never>, z.ZodLiteral ? TBlockStyle : never>, ...z.ZodLiteral ? TBlockStyle : never>[]]> : never : never; }; type BlockZod, TAliasedZods extends { [name: string]: z.ZodTypeAny; }> = z.ZodObject> & { children: z.ZodArray> | (TSchemaType extends { of?: infer TMemberDefinitions extends ArrayMemberDefinition[]; } ? MembersZods[number] : never)>; markDefs: z.ZodArray[]; }; } ? MembersZods[number] : never>; }>; declare const blockZod: , TAliasedZods extends { [name: string]: z.ZodTypeAny; }>(schemaType: TSchemaType, getZods: () => TAliasedZods) => BlockZod; type FieldsZods, TAliasedZods extends { [name: string]: z.ZodTypeAny; }> = TSchemaType extends { fields?: (infer TFieldDefinition extends FieldDefinition)[]; } ? { [Name in Extract>["name"]]: z.ZodOptional, TAliasedZods>>; } & { [Name in Extract>["name"]]: SchemaTypeToZod, TAliasedZods>; } : never; type ObjectZod, TAliasedZods extends { [name: string]: z.ZodTypeAny; }> = z.ZodObject>; declare const objectZod: , TAliasedZods extends { [name: string]: z.ZodTypeAny; }>(schema: TSchemaType, getZods: () => TAliasedZods) => ObjectZod; declare const documentFieldsZods: { _createdAt: z.ZodString; _id: z.ZodString; _rev: z.ZodString; _type: z.ZodLiteral<"document">; _updatedAt: z.ZodString; }; type DocumentZod, TAliasedZods extends { [name: string]: z.ZodTypeAny; }> = z.ZodObject & typeof documentFieldsZods>; declare const documentZod: , TAliasedZods extends { [name: string]: z.ZodTypeAny; }>(schema: TSchemaType, getZods: () => TAliasedZods) => DocumentZod; declare const fileFieldsZods: { _type: z.ZodLiteral<"file">; asset: z.ZodObject<{ [referenced]: z.ZodType<"sanity.fileAsset", z.ZodTypeDef, "sanity.fileAsset">; _ref: z.ZodString; _type: z.ZodLiteral<"reference">; } & {}, "strip", z.ZodTypeAny, { _ref: string; _type: "reference"; [referenced]: "sanity.fileAsset"; }, { _ref: string; _type: "reference"; [referenced]: "sanity.fileAsset"; }>; }; type FileZod, TAliasedZods extends { [name: string]: z.ZodTypeAny; }> = z.ZodObject & typeof fileFieldsZods>; declare const fileZod: , TAliasedZods extends { [name: string]: z.ZodTypeAny; }>(schema: TSchemaType, getZods: () => TAliasedZods) => FileZod; declare const imageFieldsZods: { _type: z.ZodLiteral<"image">; asset: z.ZodObject<{ [referenced]: z.ZodType<"sanity.imageAsset", z.ZodTypeDef, "sanity.imageAsset">; _ref: z.ZodString; _type: z.ZodLiteral<"reference">; } & {}, "strip", z.ZodTypeAny, { _ref: string; _type: "reference"; [referenced]: "sanity.imageAsset"; }, { _ref: string; _type: "reference"; [referenced]: "sanity.imageAsset"; }>; }; declare const imageHotspotFieldsZods: { crop: z.ZodObject<{ _type: z.ZodOptional>; bottom: z.ZodNumber; left: z.ZodNumber; right: z.ZodNumber; top: z.ZodNumber; }, "strip", z.ZodTypeAny, { bottom: number; left: number; right: number; top: number; _type?: "sanity.imageCrop" | undefined; }, { bottom: number; left: number; right: number; top: number; _type?: "sanity.imageCrop" | undefined; }>; hotspot: z.ZodObject<{ _type: z.ZodOptional>; height: z.ZodNumber; width: z.ZodNumber; x: z.ZodNumber; y: z.ZodNumber; }, "strip", z.ZodTypeAny, { height: number; width: number; x: number; y: number; _type?: "sanity.imageHotspot" | undefined; }, { height: number; width: number; x: number; y: number; _type?: "sanity.imageHotspot" | undefined; }>; }; type ImageZod, TAliasedZods extends { [name: string]: z.ZodTypeAny; }> = z.ZodObject & typeof imageFieldsZods & (TSchemaType extends SchemaTypeDefinition<"image", any, any, any, any, any, any, any, any, infer THotspot extends boolean> ? THotspot extends true ? typeof imageHotspotFieldsZods : unknown : unknown)>; declare const imageZod: , TAliasedZods extends { [name: string]: z.ZodTypeAny; }>(schema: TSchemaType, getZods: () => TAliasedZods) => ImageZod; type AliasZod, TAliasedZods extends { [name: string]: z.ZodTypeAny; }> = z.ZodLazy; declare const aliasZod: , TAliasedZods extends { [name: string]: z.ZodTypeAny; }>({ type }: TSchemaType, getZods: () => TAliasedZods) => AliasZod; type SchemaTypeToZod, TAliasedZods extends { [name: string]: z.ZodTypeAny; }> = TSchemaType["type"] extends keyof typeof constantZods ? (typeof constantZods)[TSchemaType["type"]] : TSchemaType["type"] extends "date" ? ReturnType>>> : TSchemaType["type"] extends "datetime" ? ReturnType>>> : TSchemaType["type"] extends "number" ? ReturnType>>> : TSchemaType["type"] extends "reference" ? ReturnType>>> : TSchemaType["type"] extends "string" ? ReturnType>>> : TSchemaType["type"] extends "text" ? ReturnType>>> : TSchemaType["type"] extends "url" ? ReturnType>>> : TSchemaType["type"] extends "array" ? ReturnType>, TAliasedZods>> : TSchemaType["type"] extends "block" ? ReturnType>, TAliasedZods>> : TSchemaType["type"] extends "object" ? ReturnType>, TAliasedZods>> : TSchemaType["type"] extends "document" ? ReturnType>, TAliasedZods>> : TSchemaType["type"] extends "file" ? ReturnType>, TAliasedZods>> : TSchemaType["type"] extends "image" ? ReturnType>, TAliasedZods>> : ReturnType>; declare const implicitDocumentZods: { "sanity.fileAsset": z.ZodObject; description: z.ZodOptional; extension: z.ZodString; label: z.ZodOptional; mimeType: z.ZodString; originalFilename: z.ZodOptional; path: z.ZodString; sha1hash: z.ZodString; size: z.ZodNumber; title: z.ZodOptional; url: z.ZodString; source: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; id: string; url?: string | undefined; }, { name: string; id: string; url?: string | undefined; }>>; }, { _type: z.ZodLiteral<"sanity.fileAsset">; metadata: z.ZodRecord; _createdAt: z.ZodString; _id: z.ZodString; _rev: z.ZodString; _updatedAt: z.ZodString; }>, "strip", z.ZodTypeAny, { url: string; _type: "sanity.fileAsset"; path: string; metadata: Record; _createdAt: string; _id: string; _rev: string; _updatedAt: string; assetId: string; extension: string; mimeType: string; sha1hash: string; size: number; title?: string | undefined; description?: string | undefined; source?: { name: string; id: string; url?: string | undefined; } | undefined; creditLine?: string | undefined; label?: string | undefined; originalFilename?: string | undefined; }, { url: string; _type: "sanity.fileAsset"; path: string; metadata: Record; _createdAt: string; _id: string; _rev: string; _updatedAt: string; assetId: string; extension: string; mimeType: string; sha1hash: string; size: number; title?: string | undefined; description?: string | undefined; source?: { name: string; id: string; url?: string | undefined; } | undefined; creditLine?: string | undefined; label?: string | undefined; originalFilename?: string | undefined; }>; "sanity.imageAsset": z.ZodObject; description: z.ZodOptional; extension: z.ZodString; label: z.ZodOptional; mimeType: z.ZodString; originalFilename: z.ZodOptional; path: z.ZodString; sha1hash: z.ZodString; size: z.ZodNumber; title: z.ZodOptional; url: z.ZodString; source: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; id: string; url?: string | undefined; }, { name: string; id: string; url?: string | undefined; }>>; }, { _type: z.ZodLiteral<"sanity.imageAsset">; metadata: z.ZodObject<{ _type: z.ZodLiteral<"sanity.imageMetadata">; blurHash: z.ZodOptional; hasAlpha: z.ZodBoolean; isOpaque: z.ZodBoolean; location: z.ZodOptional; alt: z.ZodOptional; lat: z.ZodNumber; lng: z.ZodNumber; }, "strip", z.ZodTypeAny, { _type: "geopoint"; lat: number; lng: number; alt?: number | undefined; }, { _type: "geopoint"; lat: number; lng: number; alt?: number | undefined; }>>; lqip: z.ZodOptional; dimensions: z.ZodObject<{ _type: z.ZodLiteral<"sanity.imageDimensions">; aspectRatio: z.ZodNumber; height: z.ZodNumber; width: z.ZodNumber; }, "strip", z.ZodTypeAny, { _type: "sanity.imageDimensions"; height: number; width: number; aspectRatio: number; }, { _type: "sanity.imageDimensions"; height: number; width: number; aspectRatio: number; }>; exif: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ _type: z.ZodLiteral<"sanity.imageExifMetadata">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ _type: z.ZodLiteral<"sanity.imageExifMetadata">; }, z.ZodTypeAny, "passthrough">>>; palette: z.ZodOptional; darkMuted: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; darkVibrant: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; dominant: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; lightMuted: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; lightVibrant: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; muted: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; vibrant: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePalette"; darkMuted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; darkVibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; dominant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; lightMuted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; lightVibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; muted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; vibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; }, { _type: "sanity.imagePalette"; darkMuted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; darkVibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; dominant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; lightMuted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; lightVibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; muted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; vibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; }>>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ _type: z.ZodLiteral<"sanity.imageMetadata">; blurHash: z.ZodOptional; hasAlpha: z.ZodBoolean; isOpaque: z.ZodBoolean; location: z.ZodOptional; alt: z.ZodOptional; lat: z.ZodNumber; lng: z.ZodNumber; }, "strip", z.ZodTypeAny, { _type: "geopoint"; lat: number; lng: number; alt?: number | undefined; }, { _type: "geopoint"; lat: number; lng: number; alt?: number | undefined; }>>; lqip: z.ZodOptional; dimensions: z.ZodObject<{ _type: z.ZodLiteral<"sanity.imageDimensions">; aspectRatio: z.ZodNumber; height: z.ZodNumber; width: z.ZodNumber; }, "strip", z.ZodTypeAny, { _type: "sanity.imageDimensions"; height: number; width: number; aspectRatio: number; }, { _type: "sanity.imageDimensions"; height: number; width: number; aspectRatio: number; }>; exif: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ _type: z.ZodLiteral<"sanity.imageExifMetadata">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ _type: z.ZodLiteral<"sanity.imageExifMetadata">; }, z.ZodTypeAny, "passthrough">>>; palette: z.ZodOptional; darkMuted: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; darkVibrant: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; dominant: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; lightMuted: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; lightVibrant: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; muted: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; vibrant: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePalette"; darkMuted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; darkVibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; dominant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; lightMuted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; lightVibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; muted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; vibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; }, { _type: "sanity.imagePalette"; darkMuted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; darkVibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; dominant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; lightMuted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; lightVibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; muted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; vibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; }>>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ _type: z.ZodLiteral<"sanity.imageMetadata">; blurHash: z.ZodOptional; hasAlpha: z.ZodBoolean; isOpaque: z.ZodBoolean; location: z.ZodOptional; alt: z.ZodOptional; lat: z.ZodNumber; lng: z.ZodNumber; }, "strip", z.ZodTypeAny, { _type: "geopoint"; lat: number; lng: number; alt?: number | undefined; }, { _type: "geopoint"; lat: number; lng: number; alt?: number | undefined; }>>; lqip: z.ZodOptional; dimensions: z.ZodObject<{ _type: z.ZodLiteral<"sanity.imageDimensions">; aspectRatio: z.ZodNumber; height: z.ZodNumber; width: z.ZodNumber; }, "strip", z.ZodTypeAny, { _type: "sanity.imageDimensions"; height: number; width: number; aspectRatio: number; }, { _type: "sanity.imageDimensions"; height: number; width: number; aspectRatio: number; }>; exif: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ _type: z.ZodLiteral<"sanity.imageExifMetadata">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ _type: z.ZodLiteral<"sanity.imageExifMetadata">; }, z.ZodTypeAny, "passthrough">>>; palette: z.ZodOptional; darkMuted: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; darkVibrant: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; dominant: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; lightMuted: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; lightVibrant: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; muted: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; vibrant: z.ZodOptional; background: z.ZodString; foreground: z.ZodString; population: z.ZodNumber; title: z.ZodOptional; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }, { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { _type: "sanity.imagePalette"; darkMuted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; darkVibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; dominant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; lightMuted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; lightVibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; muted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; vibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; }, { _type: "sanity.imagePalette"; darkMuted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; darkVibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; dominant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; lightMuted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; lightVibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; muted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; vibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; }>>; }, z.ZodTypeAny, "passthrough">>; _createdAt: z.ZodString; _id: z.ZodString; _rev: z.ZodString; _updatedAt: z.ZodString; }>, "strip", z.ZodTypeAny, { url: string; _type: "sanity.imageAsset"; path: string; metadata: { _type: "sanity.imageMetadata"; hasAlpha: boolean; isOpaque: boolean; dimensions: { _type: "sanity.imageDimensions"; height: number; width: number; aspectRatio: number; }; lqip?: string | undefined; palette?: { _type: "sanity.imagePalette"; darkMuted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; darkVibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; dominant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; lightMuted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; lightVibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; muted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; vibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; } | undefined; exif?: z.objectOutputType<{ _type: z.ZodLiteral<"sanity.imageExifMetadata">; }, z.ZodTypeAny, "passthrough"> | undefined; location?: { _type: "geopoint"; lat: number; lng: number; alt?: number | undefined; } | undefined; blurHash?: string | undefined; } & { [k: string]: unknown; }; _createdAt: string; _id: string; _rev: string; _updatedAt: string; assetId: string; extension: string; mimeType: string; sha1hash: string; size: number; title?: string | undefined; description?: string | undefined; source?: { name: string; id: string; url?: string | undefined; } | undefined; creditLine?: string | undefined; label?: string | undefined; originalFilename?: string | undefined; }, { url: string; _type: "sanity.imageAsset"; path: string; metadata: { _type: "sanity.imageMetadata"; hasAlpha: boolean; isOpaque: boolean; dimensions: { _type: "sanity.imageDimensions"; height: number; width: number; aspectRatio: number; }; lqip?: string | undefined; palette?: { _type: "sanity.imagePalette"; darkMuted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; darkVibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; dominant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; lightMuted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; lightVibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; muted?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; vibrant?: { _type: "sanity.imagePaletteSwatch"; background: string; foreground: string; population: number; title?: string | undefined; } | undefined; } | undefined; exif?: z.objectInputType<{ _type: z.ZodLiteral<"sanity.imageExifMetadata">; }, z.ZodTypeAny, "passthrough"> | undefined; location?: { _type: "geopoint"; lat: number; lng: number; alt?: number | undefined; } | undefined; blurHash?: string | undefined; } & { [k: string]: unknown; }; _createdAt: string; _id: string; _rev: string; _updatedAt: string; assetId: string; extension: string; mimeType: string; sha1hash: string; size: number; title?: string | undefined; description?: string | undefined; source?: { name: string; id: string; url?: string | undefined; } | undefined; creditLine?: string | undefined; label?: string | undefined; originalFilename?: string | undefined; }>; }; type SanityConfigZods>> = TConfig extends MaybeArray> ? typeof implicitDocumentZods & { [Name in TTypeDefinition["name"]]: AddType, SanityConfigZods & SanityConfigZods>>; } : never; declare const sanityConfigToZodsTyped: >({ schema: { types: typesUntyped }, plugins: pluginsUntyped, }: TConfig) => SanityConfigZods; declare const sanityConfigToZods: >(config: TConfig) => { [TType in keyof InferSchemaValues]: z.ZodType[TType]>; }; declare const sanityDocumentsZod: , Zods extends { [type: string]: z.ZodType; }>(config: TConfig, zods: Zods) => Pick[keyof InferSchemaValues], { _createdAt: string; _id: string; _rev: string; _updatedAt: string; _type: string; }>["_type"] & keyof Zods>[Extract[keyof InferSchemaValues], { _createdAt: string; _id: string; _rev: string; _updatedAt: string; _type: string; }>["_type"] & keyof Zods] | z.ZodUnion<[Pick[keyof InferSchemaValues], { _createdAt: string; _id: string; _rev: string; _updatedAt: string; _type: string; }>["_type"] & keyof Zods>[Extract[keyof InferSchemaValues], { _createdAt: string; _id: string; _rev: string; _updatedAt: string; _type: string; }>["_type"] & keyof Zods], Pick[keyof InferSchemaValues], { _createdAt: string; _id: string; _rev: string; _updatedAt: string; _type: string; }>["_type"] & keyof Zods>[Extract[keyof InferSchemaValues], { _createdAt: string; _id: string; _rev: string; _updatedAt: string; _type: string; }>["_type"] & keyof Zods], ...Pick[keyof InferSchemaValues], { _createdAt: string; _id: string; _rev: string; _updatedAt: string; _type: string; }>["_type"] & keyof Zods>[Extract[keyof InferSchemaValues], { _createdAt: string; _id: string; _rev: string; _updatedAt: string; _type: string; }>["_type"] & keyof Zods][]]>; export { enableZod, sanityConfigToZods, sanityConfigToZodsTyped, sanityDocumentsZod };