@allmaps/iiif-parser
Version:
Allmaps IIIF parser
1,151 lines (1,150 loc) • 269 kB
TypeScript
import { z } from 'zod';
import { NavDateSchema, NavPlaceSchema } from '../schemas/shared.js';
export declare const SingleValue3Schema: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, string, string | number | boolean>;
export declare const LanguageValue3Schema: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, string, string | number | boolean>, "many">>;
export declare const Summary3Schema: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, string, string | number | boolean>, "many">>;
export declare const HomepageItem3Schema: z.ZodObject<{
id: z.ZodString;
type: z.ZodOptional<z.ZodString>;
label: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, string, string | number | boolean>, "many">>;
format: z.ZodOptional<z.ZodString>;
language: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
}, "strip", z.ZodTypeAny, {
id: string;
label: Record<string, string[]>;
type?: string | undefined;
format?: string | undefined;
language?: string | string[] | undefined;
}, {
id: string;
label: Record<string, (string | number | boolean)[]>;
type?: string | undefined;
format?: string | undefined;
language?: string | string[] | undefined;
}>;
export declare const Rendering3ItemSchema: z.ZodObject<{
id: z.ZodString;
type: z.ZodOptional<z.ZodString>;
label: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, string, string | number | boolean>, "many">>;
format: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id: string;
label: Record<string, string[]>;
type?: string | undefined;
format?: string | undefined;
}, {
id: string;
label: Record<string, (string | number | boolean)[]>;
type?: string | undefined;
format?: string | undefined;
}>;
export declare const Rendering3Schema: z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodObject<{
id: z.ZodString;
type: z.ZodOptional<z.ZodString>;
label: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, string, string | number | boolean>, "many">>;
format: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id: string;
label: Record<string, string[]>;
type?: string | undefined;
format?: string | undefined;
}, {
id: string;
label: Record<string, (string | number | boolean)[]>;
type?: string | undefined;
format?: string | undefined;
}>, "many">, z.ZodObject<{
id: z.ZodString;
type: z.ZodOptional<z.ZodString>;
label: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, string, string | number | boolean>, "many">>;
format: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id: string;
label: Record<string, string[]>;
type?: string | undefined;
format?: string | undefined;
}, {
id: string;
label: Record<string, (string | number | boolean)[]>;
type?: string | undefined;
format?: string | undefined;
}>]>, {
id: string;
label: Record<string, string[]>;
type?: string | undefined;
format?: string | undefined;
}[] | undefined, {
id: string;
label: Record<string, (string | number | boolean)[]>;
type?: string | undefined;
format?: string | undefined;
} | {
id: string;
label: Record<string, (string | number | boolean)[]>;
type?: string | undefined;
format?: string | undefined;
}[]>;
export declare const Homepage3Schema: z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodObject<{
id: z.ZodString;
type: z.ZodOptional<z.ZodString>;
label: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, string, string | number | boolean>, "many">>;
format: z.ZodOptional<z.ZodString>;
language: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
}, "strip", z.ZodTypeAny, {
id: string;
label: Record<string, string[]>;
type?: string | undefined;
format?: string | undefined;
language?: string | string[] | undefined;
}, {
id: string;
label: Record<string, (string | number | boolean)[]>;
type?: string | undefined;
format?: string | undefined;
language?: string | string[] | undefined;
}>, "many">, z.ZodObject<{
id: z.ZodString;
type: z.ZodOptional<z.ZodString>;
label: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, string, string | number | boolean>, "many">>;
format: z.ZodOptional<z.ZodString>;
language: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
}, "strip", z.ZodTypeAny, {
id: string;
label: Record<string, string[]>;
type?: string | undefined;
format?: string | undefined;
language?: string | string[] | undefined;
}, {
id: string;
label: Record<string, (string | number | boolean)[]>;
type?: string | undefined;
format?: string | undefined;
language?: string | string[] | undefined;
}>]>, {
id: string;
label: Record<string, string[]>;
type?: string | undefined;
format?: string | undefined;
language?: string | string[] | undefined;
}[] | undefined, {
id: string;
label: Record<string, (string | number | boolean)[]>;
type?: string | undefined;
format?: string | undefined;
language?: string | string[] | undefined;
} | {
id: string;
label: Record<string, (string | number | boolean)[]>;
type?: string | undefined;
format?: string | undefined;
language?: string | string[] | undefined;
}[]>;
export declare const ThumbnailItem3Schema: z.ZodObject<{
id: z.ZodString;
type: z.ZodOptional<z.ZodString>;
format: z.ZodOptional<z.ZodString>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
id: string;
type?: string | undefined;
width?: number | undefined;
height?: number | undefined;
format?: string | undefined;
}, {
id: string;
type?: string | undefined;
width?: number | undefined;
height?: number | undefined;
format?: string | undefined;
}>;
export declare const Thumbnail3Schema: z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodObject<{
id: z.ZodString;
type: z.ZodOptional<z.ZodString>;
format: z.ZodOptional<z.ZodString>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
id: string;
type?: string | undefined;
width?: number | undefined;
height?: number | undefined;
format?: string | undefined;
}, {
id: string;
type?: string | undefined;
width?: number | undefined;
height?: number | undefined;
format?: string | undefined;
}>, "many">, z.ZodObject<{
id: z.ZodString;
type: z.ZodOptional<z.ZodString>;
format: z.ZodOptional<z.ZodString>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
id: string;
type?: string | undefined;
width?: number | undefined;
height?: number | undefined;
format?: string | undefined;
}, {
id: string;
type?: string | undefined;
width?: number | undefined;
height?: number | undefined;
format?: string | undefined;
}>]>, {
id: string;
type?: string | undefined;
width?: number | undefined;
height?: number | undefined;
format?: string | undefined;
}[] | undefined, {
id: string;
type?: string | undefined;
width?: number | undefined;
height?: number | undefined;
format?: string | undefined;
} | {
id: string;
type?: string | undefined;
width?: number | undefined;
height?: number | undefined;
format?: string | undefined;
}[]>;
export declare const SeeAlsoItem3Schema: z.ZodObject<{
id: z.ZodString;
type: z.ZodOptional<z.ZodString>;
format: z.ZodOptional<z.ZodString>;
profile: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id: string;
type?: string | undefined;
profile?: string | undefined;
format?: string | undefined;
}, {
id: string;
type?: string | undefined;
profile?: string | undefined;
format?: string | undefined;
}>;
export declare const SeeAlso3Schema: z.ZodEffects<z.ZodUnion<[z.ZodArray<z.ZodObject<{
id: z.ZodString;
type: z.ZodOptional<z.ZodString>;
format: z.ZodOptional<z.ZodString>;
profile: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id: string;
type?: string | undefined;
profile?: string | undefined;
format?: string | undefined;
}, {
id: string;
type?: string | undefined;
profile?: string | undefined;
format?: string | undefined;
}>, "many">, z.ZodObject<{
id: z.ZodString;
type: z.ZodOptional<z.ZodString>;
format: z.ZodOptional<z.ZodString>;
profile: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id: string;
type?: string | undefined;
profile?: string | undefined;
format?: string | undefined;
}, {
id: string;
type?: string | undefined;
profile?: string | undefined;
format?: string | undefined;
}>]>, {
id: string;
type?: string | undefined;
profile?: string | undefined;
format?: string | undefined;
}[] | undefined, {
id: string;
type?: string | undefined;
profile?: string | undefined;
format?: string | undefined;
} | {
id: string;
type?: string | undefined;
profile?: string | undefined;
format?: string | undefined;
}[]>;
export declare const NonPaintingAnnotations3: z.ZodArray<z.ZodObject<{
id: z.ZodString;
type: z.ZodLiteral<"AnnotationPage">;
items: z.ZodOptional<z.ZodArray<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>, "many">>;
}, "strip", z.ZodTypeAny, {
type: "AnnotationPage";
id: string;
items?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough">[] | undefined;
}, {
type: "AnnotationPage";
id: string;
items?: z.objectInputType<{}, z.ZodTypeAny, "passthrough">[] | undefined;
}>, "many">;
export declare const MetadataItem3Schema: z.ZodEffects<z.ZodUnion<[z.ZodObject<{
label: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, string, string | number | boolean>, "many">>;
value: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, string, string | number | boolean>, "many">>;
}, "strip", z.ZodTypeAny, {
value: Record<string, string[]>;
label: Record<string, string[]>;
}, {
value: Record<string, (string | number | boolean)[]>;
label: Record<string, (string | number | boolean)[]>;
}>, z.ZodAny]>, {
value: Record<string, string[]>;
label: Record<string, string[]>;
} | undefined, any>;
export declare const Metadata3Schema: z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
label: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, string, string | number | boolean>, "many">>;
value: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, string, string | number | boolean>, "many">>;
}, "strip", z.ZodTypeAny, {
value: Record<string, string[]>;
label: Record<string, string[]>;
}, {
value: Record<string, (string | number | boolean)[]>;
label: Record<string, (string | number | boolean)[]>;
}>, z.ZodAny]>, {
value: Record<string, string[]>;
label: Record<string, string[]>;
} | undefined, any>, "many">;
export declare const RequiredStatement3Schema: z.ZodEffects<z.ZodUnion<[z.ZodObject<{
label: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, string, string | number | boolean>, "many">>;
value: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, string, string | number | boolean>, "many">>;
}, "strip", z.ZodTypeAny, {
value: Record<string, string[]>;
label: Record<string, string[]>;
}, {
value: Record<string, (string | number | boolean)[]>;
label: Record<string, (string | number | boolean)[]>;
}>, z.ZodAny]>, {
value: Record<string, string[]>;
label: Record<string, string[]>;
} | undefined, any>;
export declare const AnnotationImageBody3Schema: z.ZodObject<{
type: z.ZodLiteral<"Image">;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
service: z.ZodArray<z.ZodUnion<[z.ZodObject<{
'@id': z.ZodString;
'@type': z.ZodOptional<z.ZodEnum<["ImageService1", "ImageService2", "ImageService3"]>>;
profile: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
formats: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
maxArea: z.ZodOptional<z.ZodNumber>;
maxHeight: z.ZodOptional<z.ZodNumber>;
maxWidth: z.ZodOptional<z.ZodNumber>;
qualities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
supports: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}>]>, z.ZodUnknown]>, string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
} | undefined, unknown>, "many">]>, string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]], string | unknown[]>, z.ZodEnum<["level0", "level1", "level2"]>]>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
'@context': z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"http://library.stanford.edu/iiif/image-api/1.1/context.json">, z.ZodLiteral<"http://iiif.io/api/image/1/context.json">, z.ZodUnion<[z.ZodLiteral<"http://iiif.io/api/image/2/context.json">, z.ZodLiteral<"https://iiif.io/api/image/2/context.json">, z.ZodString]>]>>;
}, "strip", z.ZodTypeAny, {
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
'@id': string;
'@type'?: "ImageService2" | "ImageService1" | "ImageService3" | undefined;
width?: number | undefined;
height?: number | undefined;
'@context'?: string | undefined;
}, {
profile: string | unknown[];
'@id': string;
'@type'?: "ImageService2" | "ImageService1" | "ImageService3" | undefined;
width?: number | undefined;
height?: number | undefined;
'@context'?: string | undefined;
}>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
id: z.ZodString;
type: z.ZodLiteral<"ImageService2">;
profile: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
formats: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
maxArea: z.ZodOptional<z.ZodNumber>;
maxHeight: z.ZodOptional<z.ZodNumber>;
maxWidth: z.ZodOptional<z.ZodNumber>;
qualities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
supports: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}>]>, z.ZodUnknown]>, string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
} | undefined, unknown>, "many">]>, string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]], string | unknown[]>;
}, "strip", z.ZodTypeAny, {
type: "ImageService2";
id: string;
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
}, {
type: "ImageService2";
id: string;
profile: string | unknown[];
}>, z.ZodObject<{
'@id': z.ZodString;
'@type': z.ZodLiteral<"ImageService2">;
profile: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
formats: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
maxArea: z.ZodOptional<z.ZodNumber>;
maxHeight: z.ZodOptional<z.ZodNumber>;
maxWidth: z.ZodOptional<z.ZodNumber>;
qualities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
supports: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}>]>, z.ZodUnknown]>, string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
} | undefined, unknown>, "many">]>, string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]], string | unknown[]>;
}, "strip", z.ZodTypeAny, {
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
'@id': string;
'@type': "ImageService2";
}, {
profile: string | unknown[];
'@id': string;
'@type': "ImageService2";
}>]>, z.ZodObject<{
id: z.ZodString;
type: z.ZodEnum<["ImageService1", "ImageService2", "ImageService3"]>;
profile: z.ZodCatch<z.ZodEnum<["level0", "level1", "level2"]>>;
}, "strip", z.ZodTypeAny, {
type: "ImageService2" | "ImageService1" | "ImageService3";
id: string;
profile: "level0" | "level1" | "level2";
}, {
type: "ImageService2" | "ImageService1" | "ImageService3";
id: string;
profile?: unknown;
}>]>]>, "many">;
}, "strip", z.ZodTypeAny, {
type: "Image";
service: ({
type: "ImageService2";
id: string;
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
} | {
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
'@id': string;
'@type': "ImageService2";
} | {
type: "ImageService2" | "ImageService1" | "ImageService3";
id: string;
profile: "level0" | "level1" | "level2";
} | {
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
'@id': string;
'@type'?: "ImageService2" | "ImageService1" | "ImageService3" | undefined;
width?: number | undefined;
height?: number | undefined;
'@context'?: string | undefined;
})[];
width?: number | undefined;
height?: number | undefined;
}, {
type: "Image";
service: ({
type: "ImageService2";
id: string;
profile: string | unknown[];
} | {
profile: string | unknown[];
'@id': string;
'@type': "ImageService2";
} | {
type: "ImageService2" | "ImageService1" | "ImageService3";
id: string;
profile?: unknown;
} | {
profile: string | unknown[];
'@id': string;
'@type'?: "ImageService2" | "ImageService1" | "ImageService3" | undefined;
width?: number | undefined;
height?: number | undefined;
'@context'?: string | undefined;
})[];
width?: number | undefined;
height?: number | undefined;
}>;
export declare const AnnotationVideoBody3Schema: z.ZodObject<{
type: z.ZodLiteral<"Video">;
}, "strip", z.ZodTypeAny, {
type: "Video";
}, {
type: "Video";
}>;
export declare const AnnotationSoundBody3Schema: z.ZodObject<{
type: z.ZodLiteral<"Sound">;
}, "strip", z.ZodTypeAny, {
type: "Sound";
}, {
type: "Sound";
}>;
export declare const AnnotationBody3Schema: z.ZodUnion<[z.ZodObject<{
type: z.ZodLiteral<"Image">;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
service: z.ZodArray<z.ZodUnion<[z.ZodObject<{
'@id': z.ZodString;
'@type': z.ZodOptional<z.ZodEnum<["ImageService1", "ImageService2", "ImageService3"]>>;
profile: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
formats: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
maxArea: z.ZodOptional<z.ZodNumber>;
maxHeight: z.ZodOptional<z.ZodNumber>;
maxWidth: z.ZodOptional<z.ZodNumber>;
qualities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
supports: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}>]>, z.ZodUnknown]>, string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
} | undefined, unknown>, "many">]>, string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]], string | unknown[]>, z.ZodEnum<["level0", "level1", "level2"]>]>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
'@context': z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"http://library.stanford.edu/iiif/image-api/1.1/context.json">, z.ZodLiteral<"http://iiif.io/api/image/1/context.json">, z.ZodUnion<[z.ZodLiteral<"http://iiif.io/api/image/2/context.json">, z.ZodLiteral<"https://iiif.io/api/image/2/context.json">, z.ZodString]>]>>;
}, "strip", z.ZodTypeAny, {
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
'@id': string;
'@type'?: "ImageService2" | "ImageService1" | "ImageService3" | undefined;
width?: number | undefined;
height?: number | undefined;
'@context'?: string | undefined;
}, {
profile: string | unknown[];
'@id': string;
'@type'?: "ImageService2" | "ImageService1" | "ImageService3" | undefined;
width?: number | undefined;
height?: number | undefined;
'@context'?: string | undefined;
}>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
id: z.ZodString;
type: z.ZodLiteral<"ImageService2">;
profile: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
formats: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
maxArea: z.ZodOptional<z.ZodNumber>;
maxHeight: z.ZodOptional<z.ZodNumber>;
maxWidth: z.ZodOptional<z.ZodNumber>;
qualities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
supports: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}>]>, z.ZodUnknown]>, string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
} | undefined, unknown>, "many">]>, string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]], string | unknown[]>;
}, "strip", z.ZodTypeAny, {
type: "ImageService2";
id: string;
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
}, {
type: "ImageService2";
id: string;
profile: string | unknown[];
}>, z.ZodObject<{
'@id': z.ZodString;
'@type': z.ZodLiteral<"ImageService2">;
profile: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
formats: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
maxArea: z.ZodOptional<z.ZodNumber>;
maxHeight: z.ZodOptional<z.ZodNumber>;
maxWidth: z.ZodOptional<z.ZodNumber>;
qualities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
supports: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}>]>, z.ZodUnknown]>, string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
} | undefined, unknown>, "many">]>, string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]], string | unknown[]>;
}, "strip", z.ZodTypeAny, {
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
'@id': string;
'@type': "ImageService2";
}, {
profile: string | unknown[];
'@id': string;
'@type': "ImageService2";
}>]>, z.ZodObject<{
id: z.ZodString;
type: z.ZodEnum<["ImageService1", "ImageService2", "ImageService3"]>;
profile: z.ZodCatch<z.ZodEnum<["level0", "level1", "level2"]>>;
}, "strip", z.ZodTypeAny, {
type: "ImageService2" | "ImageService1" | "ImageService3";
id: string;
profile: "level0" | "level1" | "level2";
}, {
type: "ImageService2" | "ImageService1" | "ImageService3";
id: string;
profile?: unknown;
}>]>]>, "many">;
}, "strip", z.ZodTypeAny, {
type: "Image";
service: ({
type: "ImageService2";
id: string;
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
} | {
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
'@id': string;
'@type': "ImageService2";
} | {
type: "ImageService2" | "ImageService1" | "ImageService3";
id: string;
profile: "level0" | "level1" | "level2";
} | {
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
'@id': string;
'@type'?: "ImageService2" | "ImageService1" | "ImageService3" | undefined;
width?: number | undefined;
height?: number | undefined;
'@context'?: string | undefined;
})[];
width?: number | undefined;
height?: number | undefined;
}, {
type: "Image";
service: ({
type: "ImageService2";
id: string;
profile: string | unknown[];
} | {
profile: string | unknown[];
'@id': string;
'@type': "ImageService2";
} | {
type: "ImageService2" | "ImageService1" | "ImageService3";
id: string;
profile?: unknown;
} | {
profile: string | unknown[];
'@id': string;
'@type'?: "ImageService2" | "ImageService1" | "ImageService3" | undefined;
width?: number | undefined;
height?: number | undefined;
'@context'?: string | undefined;
})[];
width?: number | undefined;
height?: number | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"Video">;
}, "strip", z.ZodTypeAny, {
type: "Video";
}, {
type: "Video";
}>, z.ZodObject<{
type: z.ZodLiteral<"Sound">;
}, "strip", z.ZodTypeAny, {
type: "Sound";
}, {
type: "Sound";
}>]>;
export declare const Canvas3Schema: z.ZodObject<{
id: z.ZodString;
type: z.ZodLiteral<"Canvas">;
width: z.ZodNumber;
height: z.ZodNumber;
items: z.ZodArray<z.ZodObject<{
type: z.ZodLiteral<"AnnotationPage">;
items: z.ZodArray<z.ZodObject<{
type: z.ZodLiteral<"Annotation">;
body: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
type: z.ZodLiteral<"Image">;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
service: z.ZodArray<z.ZodUnion<[z.ZodObject<{
'@id': z.ZodString;
'@type': z.ZodOptional<z.ZodEnum<["ImageService1", "ImageService2", "ImageService3"]>>;
profile: z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
formats: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
maxArea: z.ZodOptional<z.ZodNumber>;
maxHeight: z.ZodOptional<z.ZodNumber>;
maxWidth: z.ZodOptional<z.ZodNumber>;
qualities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
supports: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}>]>, z.ZodUnknown]>, string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
} | undefined, unknown>, "many">]>, string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]], string | unknown[]>, z.ZodEnum<["level0", "level1", "level2"]>]>;
width: z.ZodOptional<z.ZodNumber>;
height: z.ZodOptional<z.ZodNumber>;
'@context': z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"http://library.stanford.edu/iiif/image-api/1.1/context.json">, z.ZodLiteral<"http://iiif.io/api/image/1/context.json">, z.ZodUnion<[z.ZodLiteral<"http://iiif.io/api/image/2/context.json">, z.ZodLiteral<"https://iiif.io/api/image/2/context.json">, z.ZodString]>]>>;
}, "strip", z.ZodTypeAny, {
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
'@id': string;
'@type'?: "ImageService2" | "ImageService1" | "ImageService3" | undefined;
width?: number | undefined;
height?: number | undefined;
'@context'?: string | undefined;
}, {
profile: string | unknown[];
'@id': string;
'@type'?: "ImageService2" | "ImageService1" | "ImageService3" | undefined;
width?: number | undefined;
height?: number | undefined;
'@context'?: string | undefined;
}>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
id: z.ZodString;
type: z.ZodLiteral<"ImageService2">;
profile: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
formats: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
maxArea: z.ZodOptional<z.ZodNumber>;
maxHeight: z.ZodOptional<z.ZodNumber>;
maxWidth: z.ZodOptional<z.ZodNumber>;
qualities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
supports: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}>]>, z.ZodUnknown]>, string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
} | undefined, unknown>, "many">]>, string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]], string | unknown[]>;
}, "strip", z.ZodTypeAny, {
type: "ImageService2";
id: string;
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
}, {
type: "ImageService2";
id: string;
profile: string | unknown[];
}>, z.ZodObject<{
'@id': z.ZodString;
'@type': z.ZodLiteral<"ImageService2">;
profile: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
formats: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
maxArea: z.ZodOptional<z.ZodNumber>;
maxHeight: z.ZodOptional<z.ZodNumber>;
maxWidth: z.ZodOptional<z.ZodNumber>;
qualities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
supports: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}, {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
}>]>, z.ZodUnknown]>, string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
} | undefined, unknown>, "many">]>, string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]], string | unknown[]>;
}, "strip", z.ZodTypeAny, {
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
'@id': string;
'@type': "ImageService2";
}, {
profile: string | unknown[];
'@id': string;
'@type': "ImageService2";
}>]>, z.ZodObject<{
id: z.ZodString;
type: z.ZodEnum<["ImageService1", "ImageService2", "ImageService3"]>;
profile: z.ZodCatch<z.ZodEnum<["level0", "level1", "level2"]>>;
}, "strip", z.ZodTypeAny, {
type: "ImageService2" | "ImageService1" | "ImageService3";
id: string;
profile: "level0" | "level1" | "level2";
}, {
type: "ImageService2" | "ImageService1" | "ImageService3";
id: string;
profile?: unknown;
}>]>]>, "many">;
}, "strip", z.ZodTypeAny, {
type: "Image";
service: ({
type: "ImageService2";
id: string;
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
} | {
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
'@id': string;
'@type': "ImageService2";
} | {
type: "ImageService2" | "ImageService1" | "ImageService3";
id: string;
profile: "level0" | "level1" | "level2";
} | {
profile: string | [string, ...(string | {
formats?: string[] | undefined;
maxArea?: number | undefined;
maxHeight?: number | undefined;
maxWidth?: number | undefined;
qualities?: string[] | undefined;
supports?: string[] | undefined;
})[]];
'@id': string;
'@type'?: "ImageService2" | "ImageService1" | "ImageService3" | undefined;
width?: number | undefined;
height?: number | undefined;
'@context'?: string | undefined;
})[];
width?: number | undefined;
height?: number | undefined;
}, {
type: "Image";
service: ({
type: "ImageService2";
id: string;
profile: string | unknown[];
} | {
profile: string | unknown[];
'@id': string;
'@type': "ImageService2";
} | {
type: "ImageService2" | "ImageService1" | "ImageService3";
id: string;
profile?: unknown;
} | {
profile: string | unknown[];
'@id': string;
'@type'?: "ImageService2" | "ImageService1" | "ImageService3" | undefined;
width?: number | undefined;
height?: number | undefined;
'@context'?: string | undefined;
})[];
width?: number | undefined;
height?: number | undefined;
}>, z.ZodObject<{
type: z.ZodLiteral<"Video">;
}, "strip", z.ZodTypeAny, {
type: "Video";
}, {
type: "Video";
}>, z.ZodObject<{
type: z.ZodLiteral<"Sound">;
}, "strip", z.ZodTypeAny, {
type: "Sound";
}, {
type: "Sound";
}>]>, z.ZodArray<z.ZodUnion<[z.ZodObject<{