import { faker } from '@faker-js/faker'; import { AnyZodObject, z, ZodTypeAny } from 'zod'; import { MockeryMapper } from './zod-mockery-map'; type FakerClass = typeof faker; export interface GenerateMockOptions { keyName?: string; /** * Note: callback functions are not called with any * parameters at this time. */ stringMap?: Record string>; /** * This is a function that can be provided to match a key name with a specific mock * Otherwise it searches the faker library for a matching function name */ mockeryMapper?: MockeryMapper; /** * This is a mapping of field name to mock generator function. * This mapping can be used to provide backup mock * functions for Zod types not yet implemented in {@link WorkerKeys}. * The functions in this map will only be used if this library * is unable to find an appropriate mocking function to use. */ backupMocks?: Record any | undefined>; /** * How many entries to create for records */ recordKeysLength?: number; /** * How many entries to create for Maps */ mapEntriesLength?: number; /** * Set to true to throw an exception instead of returning undefined when encountering an unknown `ZodType` */ throwOnUnknownType?: boolean; /** * Set a seed for random generation */ seed?: number | number[]; /** * Faker class instance for mocking */ faker?: FakerClass; } export declare function generateMock(zodRef: T, options?: GenerateMockOptions): z.infer; export declare class ZodMockError extends Error { typeName: string; constructor(typeName: string); } export {};