UNPKG

nuxt-schema-org

Version:

The quickest and easiest way to build Schema.org graphs for Nuxt.

20 lines (17 loc) 1.04 kB
import * as zod from 'zod'; import { TypeOf, ZodRawShape } from 'zod'; import { Collection } from '@nuxt/content'; declare const schemaOrgSchema: zod.ZodOptional<zod.ZodUnion<[zod.ZodRecord<zod.ZodString, zod.ZodAny>, zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodAny>, "many">>]>>; declare const schema: zod.ZodObject<{ schemaOrg: zod.ZodOptional<zod.ZodUnion<[zod.ZodRecord<zod.ZodString, zod.ZodAny>, zod.ZodOptional<zod.ZodArray<zod.ZodRecord<zod.ZodString, zod.ZodAny>, "many">>]>>; }, "strip", zod.ZodTypeAny, { schemaOrg?: Record<string, any> | Record<string, any>[] | undefined; }, { schemaOrg?: Record<string, any> | Record<string, any>[] | undefined; }>; type SchemaOrgSchema = TypeOf<typeof schema>; type ExtendedSchema<T extends ZodRawShape> = T & { schemaOrg: typeof schemaOrgSchema; }; declare function asSchemaOrgCollection<T extends ZodRawShape>(collection: Collection<T>): Collection<ExtendedSchema<T>>; export { type SchemaOrgSchema, asSchemaOrgCollection, schema, schemaOrgSchema };