Options.d.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132
  1. import { ZodSchema, ZodTypeDef } from 'zod';
  2. import { Refs, Seen } from "./Refs.js";
  3. import { JsonSchema7Type } from "./parseDef.js";
  4. export type Targets = 'jsonSchema7' | 'jsonSchema2019-09' | 'openApi3';
  5. export type DateStrategy = 'format:date-time' | 'format:date' | 'string' | 'integer';
  6. export declare const ignoreOverride: unique symbol;
  7. export type Options<Target extends Targets = 'jsonSchema7'> = {
  8. name: string | undefined;
  9. $refStrategy: 'root' | 'relative' | 'none' | 'seen' | 'extract-to-root';
  10. basePath: string[];
  11. effectStrategy: 'input' | 'any';
  12. pipeStrategy: 'input' | 'output' | 'all';
  13. dateStrategy: DateStrategy | DateStrategy[];
  14. mapStrategy: 'entries' | 'record';
  15. removeAdditionalStrategy: 'passthrough' | 'strict';
  16. nullableStrategy: 'from-target' | 'property';
  17. target: Target;
  18. strictUnions: boolean;
  19. definitionPath: string;
  20. definitions: Record<string, ZodSchema | ZodTypeDef>;
  21. errorMessages: boolean;
  22. markdownDescription: boolean;
  23. patternStrategy: 'escape' | 'preserve';
  24. applyRegexFlags: boolean;
  25. emailStrategy: 'format:email' | 'format:idn-email' | 'pattern:zod';
  26. base64Strategy: 'format:binary' | 'contentEncoding:base64' | 'pattern:zod';
  27. nameStrategy: 'ref' | 'duplicate-ref' | 'title';
  28. override?: (def: ZodTypeDef, refs: Refs, seen: Seen | undefined, forceResolution?: boolean) => JsonSchema7Type | undefined | typeof ignoreOverride;
  29. openaiStrictMode?: boolean;
  30. };
  31. export declare const getDefaultOptions: <Target extends Targets>(options: string | Partial<Options<Target>> | undefined) => Options<Target>;
  32. //# sourceMappingURL=Options.d.ts.map