UNPKG

@mintlify/validation

Version:

Validates mint.json files

130 lines (129 loc) 6.18 kB
import { z } from 'zod'; import { ProductNavigation } from './divisionNav.js'; export declare const baseProductSchema: z.ZodObject<{ product: z.ZodString; name: z.ZodOptional<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; }>]>>; color: z.ZodOptional<z.ZodObject<{ light: z.ZodOptional<z.ZodString>; dark: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { light?: string | undefined; dark?: string | undefined; }, { light?: string | undefined; dark?: string | undefined; }>>; description: z.ZodOptional<z.ZodString>; hidden: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { product: string; name?: string | 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; color?: { light?: string | undefined; dark?: string | undefined; } | undefined; description?: string | undefined; hidden?: boolean | undefined; }, { product: string; name?: string | 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; color?: { light?: string | undefined; dark?: string | undefined; } | undefined; description?: string | undefined; hidden?: boolean | undefined; }>; export declare const productSchema: z.ZodType<ProductNavigation<'default'>>; export declare const decoratedProductSchema: z.ZodType<ProductNavigation<'decorated'>>; export declare const productsSchema: z.ZodArray<z.ZodType<ProductNavigation<"default">, z.ZodTypeDef, ProductNavigation<"default">>, "many">; export declare const decoratedProductsSchema: z.ZodArray<z.ZodType<ProductNavigation<"decorated">, z.ZodTypeDef, ProductNavigation<"decorated">>, "many">; export type BaseProductSchema = z.infer<typeof baseProductSchema>; export declare const nonRecursiveProductSchema: z.ZodObject<z.objectUtil.extendShape<{ product: z.ZodString; name: z.ZodOptional<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; }>]>>; color: z.ZodOptional<z.ZodObject<{ light: z.ZodOptional<z.ZodString>; dark: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { light?: string | undefined; dark?: string | undefined; }, { light?: string | undefined; dark?: string | undefined; }>>; description: z.ZodOptional<z.ZodString>; hidden: z.ZodOptional<z.ZodBoolean>; }, { href: z.ZodEffects<z.ZodString, string, string>; }>, "strip", z.ZodTypeAny, { href: string; product: string; name?: string | 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; color?: { light?: string | undefined; dark?: string | undefined; } | undefined; description?: string | undefined; hidden?: boolean | undefined; }, { href: string; product: string; name?: string | 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; color?: { light?: string | undefined; dark?: string | undefined; } | undefined; description?: string | undefined; hidden?: boolean | undefined; }>; export type ProductConfig = z.infer<typeof productSchema>; export type ProductsConfig = z.infer<typeof productsSchema>; export type DecoratedProductConfig = z.infer<typeof decoratedProductSchema>; export type DecoratedProductsConfig = z.infer<typeof decoratedProductsSchema>;