UNPKG

@cabloy/zod-openapi

Version:
17 lines (16 loc) 1.38 kB
import type { ZodTypes } from '@cabloy/zod-to-openapi/dist/lib/zod-is-type.js'; import type { ZodOpenAPIInternalMetadata } from '@cabloy/zod-to-openapi/dist/zod-extensions.js'; import type z from 'zod'; export declare class ZodMetadata { static unwrapUntil(schema: any, typeName?: any): any; static unwrapChained<T extends z.ZodType | undefined>(schema?: T): T extends undefined ? undefined : z.ZodType; static getDefaultValue<T>(zodSchema: z.ZodType): T | undefined; static getInternalMetadata<T>(zodSchema: z.ZodType<T>): ZodOpenAPIInternalMetadata | undefined; static getLazySchema<T>(zodSchema: z.ZodType<T>): () => z.z.core.$ZodType<unknown, unknown, z.z.core.$ZodTypeInternals<unknown, unknown>>; static resolveLazySchema<T>(zodSchema: z.ZodType<T>): z.ZodType<T, unknown, z.z.core.$ZodTypeInternals<T, unknown>>; static getRefId<T>(zodSchema: z.ZodType<T>): string | undefined; static getFieldSchema(zodSchema: z.ZodType | undefined, key: string): z.ZodType | undefined; static getOpenapiMetadata<T>(zodSchema: z.ZodType<T>): import("@cabloy/zod-to-openapi").ZodOpenAPIMetadata<T> | undefined; static isZodType<TypeName extends keyof ZodTypes>(schema: object, typeNames: TypeName[]): schema is ZodTypes[TypeName]; static isZodType<TypeName extends keyof ZodTypes>(schema: object, typeName: TypeName): schema is ZodTypes[TypeName]; }