@orval/zod 7.11.2 → 7.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +18 -16
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +603 -911
- package/dist/index.js.map +1 -1
- package/package.json +21 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SchemaObject } from
|
|
3
|
-
import { SchemaObject as SchemaObject$1 } from
|
|
1
|
+
import { ClientBuilder, ClientGeneratorsBuilder, ContextSpecs, GeneratorDependency, GeneratorMutator, ZodCoerceType } from "@orval/core";
|
|
2
|
+
import { SchemaObject } from "openapi3-ts/oas30";
|
|
3
|
+
import { SchemaObject as SchemaObject$1 } from "openapi3-ts/oas31";
|
|
4
4
|
|
|
5
|
+
//#region src/index.d.ts
|
|
5
6
|
declare const getZodDependencies: () => GeneratorDependency[];
|
|
6
7
|
type ZodValidationSchemaDefinition = {
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
functions: [string, any][];
|
|
9
|
+
consts: string[];
|
|
9
10
|
};
|
|
10
11
|
type DateTimeOptions = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
offset?: boolean;
|
|
13
|
+
local?: boolean;
|
|
14
|
+
precision?: number;
|
|
14
15
|
};
|
|
15
16
|
type TimeOptions = {
|
|
16
|
-
|
|
17
|
+
precision?: -1 | 0 | 1 | 2 | 3;
|
|
17
18
|
};
|
|
18
19
|
declare const generateZodValidationSchemaDefinition: (schema: SchemaObject | SchemaObject$1 | undefined, context: ContextSpecs, name: string, strict: boolean, isZodV4: boolean, rules?: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
required?: boolean;
|
|
21
|
+
dateTimeOptions?: DateTimeOptions;
|
|
22
|
+
timeOptions?: TimeOptions;
|
|
22
23
|
}) => ZodValidationSchemaDefinition;
|
|
23
24
|
declare const parseZodValidationSchemaDefinition: (input: ZodValidationSchemaDefinition, context: ContextSpecs, coerceTypes: boolean | ZodCoerceType[] | undefined, strict: boolean, isZodV4: boolean, preprocess?: GeneratorMutator) => {
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
zod: string;
|
|
26
|
+
consts: string;
|
|
26
27
|
};
|
|
27
28
|
declare const generateZod: ClientBuilder;
|
|
28
29
|
declare const builder: () => () => ClientGeneratorsBuilder;
|
|
29
|
-
|
|
30
|
-
export {
|
|
30
|
+
//#endregion
|
|
31
|
+
export { ZodValidationSchemaDefinition, builder, builder as default, generateZod, generateZodValidationSchemaDefinition, getZodDependencies, parseZodValidationSchemaDefinition };
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;cAuDa,0BAAkB;KAgDnB,6BAAA;EAhDC,SAAA,EAAA,CAAA,MAAA,EAAA,GAA2C,CAAA,EAAA;EAgD5C,MAAA,EAAA,MAAA,EAAA;AAGV,CAAA;AA0BkB,KAAf,eAAA,GAMW;EAIH,MAAA,CAAA,EAAA,OAAA;EA4YZ,KAAA,CAAA,EAAA,OAAA;WA3YS,CAAA,EAAA,MAAA;;KALL,WAAA,GAMM;WAMW,CAAA,EAAA,CAAA,CAAA,GAAA,CAAA,GAAA,CAAA,GAAA,CAAA,GAAA,CAAA;;AAGnB,cAXU,qCAWV,EAAA,CAAA,MAAA,EAVO,YAUP,GAVsB,cAUtB,GAAA,SAAA,EAAA,OAAA,EATQ,YASR,EAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,OAAA,EAAA,OAAA,EAAA,MAAA,EAAA;EAiYF,QAAA,CAAA,EAAA,OAAA;EAEY,eAAA,CAAA,EAtYS,eAsYT;EAoJZ,WAAA,CAAA,EAzhBiB,WAyhBjB;MAvhBE,6BAoYM;AACE,cAFE,kCAEF,EAAA,CAAA,KAAA,EADF,6BACE,EAAA,OAAA,EAAA,YAAA,EAAA,WAAA,EAAA,OAAA,GACc,aADd,EAAA,GAAA,SAAA,EAAA,MAAA,EAAA,OAAA,EAAA,OAAA,EAAA,OAAA,EAAA,UAAA,CAAA,EAII,gBAJJ,EAAA,GAAA;KACc,EAAA,MAAA;QAGV,EAAA,MAAA;CAAgB;AAurBlB,cAAA,WAAa,EAAA,aAWzB;AAOY,cAAA,OAAO,EAAA,GAAA,GAAA,GAAA,GAAA,uBAA+B"}
|