UNPKG

@mintlify/validation

Version:

Validates mint.json files

88 lines (87 loc) 4.88 kB
import { z } from 'zod'; import { MenuItemNavigation } from './divisionNav.js'; export declare const baseMenuItemSchema: z.ZodObject<{ item: 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; }>]>>; description: z.ZodOptional<z.ZodString>; hidden: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { item: 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; description?: string | undefined; hidden?: boolean | undefined; }, { item: 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; description?: string | undefined; hidden?: boolean | undefined; }>; export type BaseMenuItemSchema = z.infer<typeof baseMenuItemSchema>; export declare const nonRecursiveMenuItemSchema: z.ZodObject<z.objectUtil.extendShape<{ item: 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; }>]>>; description: z.ZodOptional<z.ZodString>; hidden: z.ZodOptional<z.ZodBoolean>; }, { href: z.ZodString; }>, "strip", z.ZodTypeAny, { href: string; item: 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; description?: string | undefined; hidden?: boolean | undefined; }, { href: string; item: 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; description?: string | undefined; hidden?: boolean | undefined; }>; export declare const menuItemSchema: z.ZodType<MenuItemNavigation<'default'>>; export declare const decoratedMenuItemSchema: z.ZodType<MenuItemNavigation<'decorated'>>; export declare const menuSchema: z.ZodArray<z.ZodType<MenuItemNavigation<"default">, z.ZodTypeDef, MenuItemNavigation<"default">>, "many">; export declare const decoratedMenuSchema: z.ZodArray<z.ZodType<MenuItemNavigation<"decorated">, z.ZodTypeDef, MenuItemNavigation<"decorated">>, "many">; export type MenuItemConfig = z.infer<typeof menuItemSchema>; export type MenuConfig = z.infer<typeof menuSchema>; export type DecoratedMenuItemConfig = z.infer<typeof decoratedMenuItemSchema>; export type DecoratedMenuConfig = z.infer<typeof decoratedMenuSchema>;