UNPKG

@mintlify/validation

Version:

Validates mint.json files

434 lines (433 loc) 21.8 kB
import { z } from 'zod'; export declare const baseGroupSchema: z.ZodObject<{ group: z.ZodString; icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{ style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>; name: z.ZodEffects<z.ZodString, string, string>; library: z.ZodOptional<z.ZodEnum<["fontawesome", "lucide"]>>; }, "strip", z.ZodTypeAny, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }>]>>; hidden: z.ZodOptional<z.ZodBoolean>; root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; }, "strip", z.ZodTypeAny, { group: string; icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }, { group: string; icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }>; export declare const groupSchema: z.ZodUnion<[z.ZodObject<{ icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{ style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>; name: z.ZodEffects<z.ZodString, string, string>; library: z.ZodOptional<z.ZodEnum<["fontawesome", "lucide"]>>; }, "strip", z.ZodTypeAny, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }>]>>; group: z.ZodString; hidden: z.ZodOptional<z.ZodBoolean>; root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; openapi: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, z.ZodObject<{ source: z.ZodEffects<z.ZodString, string, string>; directory: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { source: string; directory?: string | undefined; }, { source: string; directory?: string | undefined; }>]>; }, "strip", z.ZodTypeAny, { openapi: (string | string[] | { source: string; directory?: string | undefined; }) & (string | string[] | { source: string; directory?: string | undefined; } | undefined); group: string; icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }, { openapi: (string | string[] | { source: string; directory?: string | undefined; }) & (string | string[] | { source: string; directory?: string | undefined; } | undefined); group: string; icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }>, z.ZodObject<{ icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{ style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>; name: z.ZodEffects<z.ZodString, string, string>; library: z.ZodOptional<z.ZodEnum<["fontawesome", "lucide"]>>; }, "strip", z.ZodTypeAny, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }>]>>; group: z.ZodString; hidden: z.ZodOptional<z.ZodBoolean>; root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; asyncapi: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, z.ZodObject<{ source: z.ZodEffects<z.ZodString, string, string>; directory: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { source: string; directory?: string | undefined; }, { source: string; directory?: string | undefined; }>]>; }, "strip", z.ZodTypeAny, { group: string; asyncapi: (string | string[] | { source: string; directory?: string | undefined; }) & (string | string[] | { source: string; directory?: string | undefined; } | undefined); icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }, { group: string; asyncapi: (string | string[] | { source: string; directory?: string | undefined; }) & (string | string[] | { source: string; directory?: string | undefined; } | undefined); icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }>, z.ZodObject<{ icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{ style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>; name: z.ZodEffects<z.ZodString, string, string>; library: z.ZodOptional<z.ZodEnum<["fontawesome", "lucide"]>>; }, "strip", z.ZodTypeAny, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }>]>>; group: z.ZodString; hidden: z.ZodOptional<z.ZodBoolean>; root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; pages: z.ZodLazy<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>; }, "strip", z.ZodTypeAny, { group: string; pages: any[]; icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }, { group: string; pages: any[]; icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }>]>; export declare const decoratedGroupSchema: z.ZodObject<{ group: z.ZodString; icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{ style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>; name: z.ZodEffects<z.ZodString, string, string>; library: z.ZodOptional<z.ZodEnum<["fontawesome", "lucide"]>>; }, "strip", z.ZodTypeAny, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }>]>>; hidden: z.ZodOptional<z.ZodBoolean>; root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; pages: z.ZodLazy<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>; }, "strip", z.ZodTypeAny, { group: string; pages: any[]; icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }, { group: string; pages: any[]; icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }>; export declare const groupsSchema: z.ZodArray<z.ZodUnion<[z.ZodObject<{ icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{ style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>; name: z.ZodEffects<z.ZodString, string, string>; library: z.ZodOptional<z.ZodEnum<["fontawesome", "lucide"]>>; }, "strip", z.ZodTypeAny, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }>]>>; group: z.ZodString; hidden: z.ZodOptional<z.ZodBoolean>; root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; openapi: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, z.ZodObject<{ source: z.ZodEffects<z.ZodString, string, string>; directory: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { source: string; directory?: string | undefined; }, { source: string; directory?: string | undefined; }>]>; }, "strip", z.ZodTypeAny, { openapi: (string | string[] | { source: string; directory?: string | undefined; }) & (string | string[] | { source: string; directory?: string | undefined; } | undefined); group: string; icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }, { openapi: (string | string[] | { source: string; directory?: string | undefined; }) & (string | string[] | { source: string; directory?: string | undefined; } | undefined); group: string; icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }>, z.ZodObject<{ icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{ style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>; name: z.ZodEffects<z.ZodString, string, string>; library: z.ZodOptional<z.ZodEnum<["fontawesome", "lucide"]>>; }, "strip", z.ZodTypeAny, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }>]>>; group: z.ZodString; hidden: z.ZodOptional<z.ZodBoolean>; root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; asyncapi: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, z.ZodObject<{ source: z.ZodEffects<z.ZodString, string, string>; directory: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { source: string; directory?: string | undefined; }, { source: string; directory?: string | undefined; }>]>; }, "strip", z.ZodTypeAny, { group: string; asyncapi: (string | string[] | { source: string; directory?: string | undefined; }) & (string | string[] | { source: string; directory?: string | undefined; } | undefined); icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }, { group: string; asyncapi: (string | string[] | { source: string; directory?: string | undefined; }) & (string | string[] | { source: string; directory?: string | undefined; } | undefined); icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }>, z.ZodObject<{ icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{ style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>; name: z.ZodEffects<z.ZodString, string, string>; library: z.ZodOptional<z.ZodEnum<["fontawesome", "lucide"]>>; }, "strip", z.ZodTypeAny, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }>]>>; group: z.ZodString; hidden: z.ZodOptional<z.ZodBoolean>; root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; pages: z.ZodLazy<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>; }, "strip", z.ZodTypeAny, { group: string; pages: any[]; icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }, { group: string; pages: any[]; icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }>]>, "many">; export declare const decoratedGroupsSchema: z.ZodArray<z.ZodObject<{ group: z.ZodString; icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{ style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>; name: z.ZodEffects<z.ZodString, string, string>; library: z.ZodOptional<z.ZodEnum<["fontawesome", "lucide"]>>; }, "strip", z.ZodTypeAny, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }, { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; }>]>>; hidden: z.ZodOptional<z.ZodBoolean>; root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; pages: z.ZodLazy<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>; }, "strip", z.ZodTypeAny, { group: string; pages: any[]; icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }, { group: string; pages: any[]; icon?: string | { name: string; style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined; library?: "fontawesome" | "lucide" | undefined; } | undefined; hidden?: boolean | undefined; root?: string | undefined; }>, "many">; export type GroupConfig = z.infer<typeof groupSchema>; export type GroupsConfig = z.infer<typeof groupsSchema>; export type DecoratedGroupConfig = z.infer<typeof decoratedGroupSchema>; export type DecoratedGroupsConfig = z.infer<typeof decoratedGroupsSchema>;