@forklaunch/validator 0.1.3 → 0.1.5

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.
Files changed (37) hide show
  1. package/dist/index.d.ts +23 -23
  2. package/dist/interfaces/schemaValidator.interfaces.d.ts +114 -0
  3. package/dist/interfaces/schemaValidator.interfaces.js +3 -0
  4. package/dist/interfaces/schemaValidator.interfaces.js.map +1 -0
  5. package/dist/tests/typebox/equality.test.js +1 -1
  6. package/dist/tests/typebox/equality.test.js.map +1 -1
  7. package/dist/tests/typebox/largeSchema.test.js +1 -1
  8. package/dist/tests/typebox/largeSchema.test.js.map +1 -1
  9. package/dist/tests/zod/equality.test.js +1 -1
  10. package/dist/tests/zod/equality.test.js.map +1 -1
  11. package/dist/tests/zod/largeSchema.test.js +1 -1
  12. package/dist/tests/zod/largeSchema.test.js.map +1 -1
  13. package/dist/typebox/index.d.ts +2 -0
  14. package/dist/typebox/index.js +19 -0
  15. package/dist/typebox/index.js.map +1 -0
  16. package/dist/typebox/typebox.d.ts +148 -0
  17. package/dist/typebox/typebox.js +194 -0
  18. package/dist/typebox/typebox.js.map +1 -0
  19. package/dist/typebox/types/typebox.schema.types.d.ts +63 -0
  20. package/dist/typebox/types/typebox.schema.types.js +3 -0
  21. package/dist/typebox/types/typebox.schema.types.js.map +1 -0
  22. package/dist/typebox.d.ts +25 -25
  23. package/dist/typebox.js +26 -26
  24. package/dist/typebox.js.map +1 -1
  25. package/dist/zod/index.d.ts +2 -0
  26. package/dist/zod/index.js +19 -0
  27. package/dist/zod/index.js.map +1 -0
  28. package/dist/zod/types/zod.schema.types.d.ts +65 -0
  29. package/dist/zod/types/zod.schema.types.js +3 -0
  30. package/dist/zod/types/zod.schema.types.js.map +1 -0
  31. package/dist/zod/zod.d.ts +145 -0
  32. package/dist/zod/zod.js +192 -0
  33. package/dist/zod/zod.js.map +1 -0
  34. package/dist/zod.d.ts +25 -25
  35. package/dist/zod.js +26 -26
  36. package/dist/zod.js.map +1 -1
  37. package/package.json +1 -1
@@ -0,0 +1,145 @@
1
+ /**
2
+ * This module provides a Zod-based schema definition.
3
+ * It includes various types, schema creation, validation, and OpenAPI integration.
4
+ *
5
+ * @module ZodSchemaValidator
6
+ */
7
+ import { ZodArray, ZodOptional, ZodUnion, z, ZodLiteral } from "zod";
8
+ import { LiteralSchema } from "../types/schema.types";
9
+ import { SchemaValidator } from "../interfaces/schemaValidator.interfaces";
10
+ import { SchemaObject } from 'openapi3-ts/oas31';
11
+ import { ZodUnionContainer, ZodIdiomaticSchema, ZodCatchall, ZodResolve, UnionZodResolve } from "./types/zod.schema.types";
12
+ /**
13
+ * Class representing a Zod schema definition.
14
+ * @implements {SchemaValidator}
15
+ */
16
+ export declare class ZodSchemaValidator implements SchemaValidator<ZodUnionContainer, ZodIdiomaticSchema, ZodCatchall> {
17
+ string: z.ZodString;
18
+ number: z.ZodNumber;
19
+ bigint: z.ZodBigInt;
20
+ boolean: z.ZodBoolean;
21
+ date: z.ZodDate;
22
+ symbol: z.ZodSymbol;
23
+ empty: ZodUnion<[z.ZodVoid, z.ZodNull, z.ZodUndefined]>;
24
+ any: z.ZodAny;
25
+ unknown: z.ZodUnknown;
26
+ never: z.ZodNever;
27
+ /**
28
+ * Convert a schema to a Zod schema.
29
+ * @param {ZodIdiomaticSchema} schema - The schema to convert.
30
+ * @returns {ZodResolve<T>} The resolved schema.
31
+ */
32
+ schemify<T extends ZodIdiomaticSchema>(schema: T): ZodResolve<T>;
33
+ /**
34
+ * Make a schema optional.
35
+ * @param {ZodIdiomaticSchema} schema - The schema to make optional.
36
+ * @returns {ZodOptional<ZodResolve<T>>} The optional schema.
37
+ */
38
+ optional<T extends ZodIdiomaticSchema>(schema: T): ZodOptional<ZodResolve<T>>;
39
+ /**
40
+ * Create an array schema.
41
+ * @param {ZodIdiomaticSchema} schema - The schema to use for array items.
42
+ * @returns {ZodArray<ZodResolve<T>>} The array schema.
43
+ */
44
+ array<T extends ZodIdiomaticSchema>(schema: T): ZodArray<ZodResolve<T>>;
45
+ /**
46
+ * Create a union schema.
47
+ * @param {ZodUnionContainer} schemas - The schemas to union.
48
+ * @returns {ZodUnion<UnionZodResolve<T>>} The union schema.
49
+ */
50
+ union<T extends ZodUnionContainer>(schemas: T): ZodUnion<UnionZodResolve<T>>;
51
+ /**
52
+ * Create a literal schema.
53
+ * @param {LiteralSchema} value - The literal value.
54
+ * @returns {ZodLiteral<ZodResolve<T>>} The literal schema.
55
+ */
56
+ literal<T extends LiteralSchema>(value: T): ZodLiteral<ZodResolve<T>>;
57
+ /**
58
+ * Validate a value against a schema.
59
+ * @param {ZodCatchall} schema - The schema to validate against.
60
+ * @param {unknown} value - The value to validate.
61
+ * @returns {boolean} True if valid, otherwise false.
62
+ */
63
+ validate<T extends ZodCatchall>(schema: T, value: unknown): boolean;
64
+ /**
65
+ * Convert a schema to an OpenAPI schema object.
66
+ * @param {ZodIdiomaticSchema} schema - The schema to convert.
67
+ * @returns {SchemaObject} The OpenAPI schema object.
68
+ */
69
+ openapi<T extends ZodIdiomaticSchema>(schema: T): SchemaObject;
70
+ }
71
+ /**
72
+ * Factory function for creating a ZodSchemaValidator instance.
73
+ * @returns {ZodSchemaValidator} The ZodSchemaValidator instance.
74
+ */
75
+ export declare const ZodSchema: () => ZodSchemaValidator;
76
+ declare const SchemaValidator: ZodSchemaValidator;
77
+ /**
78
+ * Zod schema definition for string type.
79
+ */
80
+ export declare const string: typeof SchemaValidator.string;
81
+ /**
82
+ * Zod schema definition for number type.
83
+ */
84
+ export declare const number: typeof SchemaValidator.number;
85
+ /**
86
+ * Zod schema definition for bigint type.
87
+ */
88
+ export declare const bigint: typeof SchemaValidator.bigint;
89
+ /**
90
+ * Zod schema definition for boolean type.
91
+ */
92
+ export declare const boolean: typeof SchemaValidator.boolean;
93
+ /**
94
+ * Zod schema definition for date type.
95
+ */
96
+ export declare const date: typeof SchemaValidator.date;
97
+ /**
98
+ * Zod schema definition for symbol type.
99
+ */
100
+ export declare const symbol: typeof SchemaValidator.symbol;
101
+ /**
102
+ * Zod schema definition for undefined, null, void types.
103
+ */
104
+ export declare const empty: typeof SchemaValidator.empty;
105
+ /**
106
+ * Zod schema definition for any type.
107
+ */
108
+ export declare const any: typeof SchemaValidator.any;
109
+ /**
110
+ * Zod schema definition for unknown type.
111
+ */
112
+ export declare const unknown: typeof SchemaValidator.unknown;
113
+ /**
114
+ * Zod schema definition for never type.
115
+ */
116
+ export declare const never: typeof SchemaValidator.never;
117
+ /**
118
+ * Transforms valid schema into Zod schema.
119
+ */
120
+ export declare const schemify: typeof SchemaValidator.schemify;
121
+ /**
122
+ * Makes a valid schema optional.
123
+ */
124
+ export declare const optional: typeof SchemaValidator.optional;
125
+ /**
126
+ * Defines an array for a valid schema.
127
+ */
128
+ export declare const array: typeof SchemaValidator.array;
129
+ /**
130
+ * Defines a union for a valid schema.
131
+ */
132
+ export declare const union: typeof SchemaValidator.union;
133
+ /**
134
+ * Defines a literal for a valid schema.
135
+ */
136
+ export declare const literal: typeof SchemaValidator.literal;
137
+ /**
138
+ * Validates a value against a valid schema.
139
+ */
140
+ export declare const validate: typeof SchemaValidator.validate;
141
+ /**
142
+ * Generates an OpenAPI schema object from a valid schema.
143
+ */
144
+ export declare const openapi: typeof SchemaValidator.openapi;
145
+ export {};
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+ /**
3
+ * This module provides a Zod-based schema definition.
4
+ * It includes various types, schema creation, validation, and OpenAPI integration.
5
+ *
6
+ * @module ZodSchemaValidator
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.openapi = exports.validate = exports.literal = exports.union = exports.array = exports.optional = exports.schemify = exports.never = exports.unknown = exports.any = exports.empty = exports.symbol = exports.date = exports.boolean = exports.bigint = exports.number = exports.string = exports.ZodSchema = exports.ZodSchemaValidator = void 0;
10
+ const zod_1 = require("zod");
11
+ const zod_openapi_1 = require("@anatine/zod-openapi");
12
+ /**
13
+ * Class representing a Zod schema definition.
14
+ * @implements {SchemaValidator}
15
+ */
16
+ class ZodSchemaValidator {
17
+ string = zod_1.z.string();
18
+ number = zod_1.z.number();
19
+ bigint = zod_1.z.bigint();
20
+ boolean = zod_1.z.boolean();
21
+ date = zod_1.z.date();
22
+ symbol = zod_1.z.symbol();
23
+ empty = zod_1.z.union([zod_1.z.void(), zod_1.z.null(), zod_1.z.undefined()]);
24
+ any = zod_1.z.any();
25
+ unknown = zod_1.z.unknown();
26
+ never = zod_1.z.never();
27
+ /**
28
+ * Convert a schema to a Zod schema.
29
+ * @param {ZodIdiomaticSchema} schema - The schema to convert.
30
+ * @returns {ZodResolve<T>} The resolved schema.
31
+ */
32
+ schemify(schema) {
33
+ if (typeof schema === 'string' || typeof schema === 'number' || typeof schema === 'boolean') {
34
+ return zod_1.z.literal(schema);
35
+ }
36
+ if (schema instanceof zod_1.ZodType) {
37
+ return schema;
38
+ }
39
+ const newSchema = {};
40
+ Object.getOwnPropertyNames(schema).forEach((key) => {
41
+ if (schema[key] instanceof zod_1.ZodType) {
42
+ newSchema[key] = schema[key];
43
+ }
44
+ else {
45
+ newSchema[key] = this.schemify(schema[key]);
46
+ }
47
+ });
48
+ return zod_1.z.object(newSchema);
49
+ }
50
+ /**
51
+ * Make a schema optional.
52
+ * @param {ZodIdiomaticSchema} schema - The schema to make optional.
53
+ * @returns {ZodOptional<ZodResolve<T>>} The optional schema.
54
+ */
55
+ optional(schema) {
56
+ if (schema instanceof zod_1.ZodType) {
57
+ return schema.optional();
58
+ }
59
+ return this.schemify(schema).optional();
60
+ }
61
+ /**
62
+ * Create an array schema.
63
+ * @param {ZodIdiomaticSchema} schema - The schema to use for array items.
64
+ * @returns {ZodArray<ZodResolve<T>>} The array schema.
65
+ */
66
+ array(schema) {
67
+ if (schema instanceof zod_1.ZodType) {
68
+ return schema.array();
69
+ }
70
+ return this.schemify(schema).array();
71
+ }
72
+ /**
73
+ * Create a union schema.
74
+ * @param {ZodUnionContainer} schemas - The schemas to union.
75
+ * @returns {ZodUnion<UnionZodResolve<T>>} The union schema.
76
+ */
77
+ union(schemas) {
78
+ if (schemas.length < 2) {
79
+ throw new Error('Union must have at least two schemas');
80
+ }
81
+ const unionTypes = schemas.map((schema) => {
82
+ if (schema instanceof zod_1.ZodType) {
83
+ return schema;
84
+ }
85
+ return this.schemify(schema);
86
+ });
87
+ return zod_1.z.union(unionTypes);
88
+ }
89
+ /**
90
+ * Create a literal schema.
91
+ * @param {LiteralSchema} value - The literal value.
92
+ * @returns {ZodLiteral<ZodResolve<T>>} The literal schema.
93
+ */
94
+ literal(value) {
95
+ return zod_1.z.literal(value);
96
+ }
97
+ /**
98
+ * Validate a value against a schema.
99
+ * @param {ZodCatchall} schema - The schema to validate against.
100
+ * @param {unknown} value - The value to validate.
101
+ * @returns {boolean} True if valid, otherwise false.
102
+ */
103
+ validate(schema, value) {
104
+ schema.parse(value);
105
+ return true;
106
+ }
107
+ /**
108
+ * Convert a schema to an OpenAPI schema object.
109
+ * @param {ZodIdiomaticSchema} schema - The schema to convert.
110
+ * @returns {SchemaObject} The OpenAPI schema object.
111
+ */
112
+ openapi(schema) {
113
+ return (0, zod_openapi_1.generateSchema)(this.schemify(schema));
114
+ }
115
+ }
116
+ exports.ZodSchemaValidator = ZodSchemaValidator;
117
+ /**
118
+ * Factory function for creating a ZodSchemaValidator instance.
119
+ * @returns {ZodSchemaValidator} The ZodSchemaValidator instance.
120
+ */
121
+ const ZodSchema = () => new ZodSchemaValidator();
122
+ exports.ZodSchema = ZodSchema;
123
+ const SchemaValidator = (0, exports.ZodSchema)();
124
+ /**
125
+ * Zod schema definition for string type.
126
+ */
127
+ exports.string = SchemaValidator.string;
128
+ /**
129
+ * Zod schema definition for number type.
130
+ */
131
+ exports.number = SchemaValidator.number;
132
+ /**
133
+ * Zod schema definition for bigint type.
134
+ */
135
+ exports.bigint = SchemaValidator.bigint;
136
+ /**
137
+ * Zod schema definition for boolean type.
138
+ */
139
+ exports.boolean = SchemaValidator.boolean;
140
+ /**
141
+ * Zod schema definition for date type.
142
+ */
143
+ exports.date = SchemaValidator.date;
144
+ /**
145
+ * Zod schema definition for symbol type.
146
+ */
147
+ exports.symbol = SchemaValidator.symbol;
148
+ /**
149
+ * Zod schema definition for undefined, null, void types.
150
+ */
151
+ exports.empty = SchemaValidator.empty;
152
+ /**
153
+ * Zod schema definition for any type.
154
+ */
155
+ exports.any = SchemaValidator.any;
156
+ /**
157
+ * Zod schema definition for unknown type.
158
+ */
159
+ exports.unknown = SchemaValidator.unknown;
160
+ /**
161
+ * Zod schema definition for never type.
162
+ */
163
+ exports.never = SchemaValidator.never;
164
+ /**
165
+ * Transforms valid schema into Zod schema.
166
+ */
167
+ exports.schemify = SchemaValidator.schemify.bind(SchemaValidator);
168
+ /**
169
+ * Makes a valid schema optional.
170
+ */
171
+ exports.optional = SchemaValidator.optional.bind(SchemaValidator);
172
+ /**
173
+ * Defines an array for a valid schema.
174
+ */
175
+ exports.array = SchemaValidator.array.bind(SchemaValidator);
176
+ /**
177
+ * Defines a union for a valid schema.
178
+ */
179
+ exports.union = SchemaValidator.union.bind(SchemaValidator);
180
+ /**
181
+ * Defines a literal for a valid schema.
182
+ */
183
+ exports.literal = SchemaValidator.literal.bind(SchemaValidator);
184
+ /**
185
+ * Validates a value against a valid schema.
186
+ */
187
+ exports.validate = SchemaValidator.validate.bind(SchemaValidator);
188
+ /**
189
+ * Generates an OpenAPI schema object from a valid schema.
190
+ */
191
+ exports.openapi = SchemaValidator.openapi.bind(SchemaValidator);
192
+ //# sourceMappingURL=zod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zod.js","sourceRoot":"","sources":["../../zod/zod.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAA2F;AAG3F,sDAAsD;AAItD;;;GAGG;AACH,MAAa,kBAAkB;IAK3B,MAAM,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC;IACpB,MAAM,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC;IACpB,MAAM,GAAG,OAAC,C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C;AAErG;;GAEG;AACU,QAAA,QAAQ,GAAoC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAExG;;GAEG;AACU,QAAA,OAAO,GAAmC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC"}
package/dist/zod.d.ts CHANGED
@@ -2,18 +2,18 @@
2
2
  * This module provides a Zod-based schema definition.
3
3
  * It includes various types, schema creation, validation, and OpenAPI integration.
4
4
  *
5
- * @module ZodSchemaProvider
5
+ * @module ZodSchemaValidator
6
6
  */
7
7
  import { ZodArray, ZodOptional, ZodUnion, z, ZodLiteral } from "zod";
8
8
  import { LiteralSchema } from "./types/schema.types";
9
- import { SchemaProvider } from "./interfaces/schemaProvider.interfaces";
9
+ import { SchemaValidator } from "./interfaces/schemaValidator.interfaces";
10
10
  import { SchemaObject } from 'openapi3-ts/oas31';
11
11
  import { ZodUnionContainer, ZodIdiomaticSchema, ZodCatchall, ZodResolve, UnionZodResolve } from "./types/zod.schema.types";
12
12
  /**
13
13
  * Class representing a Zod schema definition.
14
- * @implements {SchemaProvider}
14
+ * @implements {SchemaValidator}
15
15
  */
16
- export declare class ZodSchemaProvider implements SchemaProvider<ZodUnionContainer, ZodIdiomaticSchema, ZodCatchall> {
16
+ export declare class ZodSchemaValidator implements SchemaValidator<ZodUnionContainer, ZodIdiomaticSchema, ZodCatchall> {
17
17
  string: z.ZodString;
18
18
  number: z.ZodNumber;
19
19
  bigint: z.ZodBigInt;
@@ -69,77 +69,77 @@ export declare class ZodSchemaProvider implements SchemaProvider<ZodUnionContain
69
69
  openapi<T extends ZodIdiomaticSchema>(schema: T): SchemaObject;
70
70
  }
71
71
  /**
72
- * Factory function for creating a ZodSchemaProvider instance.
73
- * @returns {ZodSchemaProvider} The ZodSchemaProvider instance.
72
+ * Factory function for creating a ZodSchemaValidator instance.
73
+ * @returns {ZodSchemaValidator} The ZodSchemaValidator instance.
74
74
  */
75
- export declare const ZodSchema: () => ZodSchemaProvider;
76
- declare const SchemaProvider: ZodSchemaProvider;
75
+ export declare const ZodSchema: () => ZodSchemaValidator;
76
+ declare const SchemaValidator: ZodSchemaValidator;
77
77
  /**
78
78
  * Zod schema definition for string type.
79
79
  */
80
- export declare const string: typeof SchemaProvider.string;
80
+ export declare const string: typeof SchemaValidator.string;
81
81
  /**
82
82
  * Zod schema definition for number type.
83
83
  */
84
- export declare const number: typeof SchemaProvider.number;
84
+ export declare const number: typeof SchemaValidator.number;
85
85
  /**
86
86
  * Zod schema definition for bigint type.
87
87
  */
88
- export declare const bigint: typeof SchemaProvider.bigint;
88
+ export declare const bigint: typeof SchemaValidator.bigint;
89
89
  /**
90
90
  * Zod schema definition for boolean type.
91
91
  */
92
- export declare const boolean: typeof SchemaProvider.boolean;
92
+ export declare const boolean: typeof SchemaValidator.boolean;
93
93
  /**
94
94
  * Zod schema definition for date type.
95
95
  */
96
- export declare const date: typeof SchemaProvider.date;
96
+ export declare const date: typeof SchemaValidator.date;
97
97
  /**
98
98
  * Zod schema definition for symbol type.
99
99
  */
100
- export declare const symbol: typeof SchemaProvider.symbol;
100
+ export declare const symbol: typeof SchemaValidator.symbol;
101
101
  /**
102
102
  * Zod schema definition for undefined, null, void types.
103
103
  */
104
- export declare const empty: typeof SchemaProvider.empty;
104
+ export declare const empty: typeof SchemaValidator.empty;
105
105
  /**
106
106
  * Zod schema definition for any type.
107
107
  */
108
- export declare const any: typeof SchemaProvider.any;
108
+ export declare const any: typeof SchemaValidator.any;
109
109
  /**
110
110
  * Zod schema definition for unknown type.
111
111
  */
112
- export declare const unknown: typeof SchemaProvider.unknown;
112
+ export declare const unknown: typeof SchemaValidator.unknown;
113
113
  /**
114
114
  * Zod schema definition for never type.
115
115
  */
116
- export declare const never: typeof SchemaProvider.never;
116
+ export declare const never: typeof SchemaValidator.never;
117
117
  /**
118
118
  * Transforms valid schema into Zod schema.
119
119
  */
120
- export declare const schemify: typeof SchemaProvider.schemify;
120
+ export declare const schemify: typeof SchemaValidator.schemify;
121
121
  /**
122
122
  * Makes a valid schema optional.
123
123
  */
124
- export declare const optional: typeof SchemaProvider.optional;
124
+ export declare const optional: typeof SchemaValidator.optional;
125
125
  /**
126
126
  * Defines an array for a valid schema.
127
127
  */
128
- export declare const array: typeof SchemaProvider.array;
128
+ export declare const array: typeof SchemaValidator.array;
129
129
  /**
130
130
  * Defines a union for a valid schema.
131
131
  */
132
- export declare const union: typeof SchemaProvider.union;
132
+ export declare const union: typeof SchemaValidator.union;
133
133
  /**
134
134
  * Defines a literal for a valid schema.
135
135
  */
136
- export declare const literal: typeof SchemaProvider.literal;
136
+ export declare const literal: typeof SchemaValidator.literal;
137
137
  /**
138
138
  * Validates a value against a valid schema.
139
139
  */
140
- export declare const validate: typeof SchemaProvider.validate;
140
+ export declare const validate: typeof SchemaValidator.validate;
141
141
  /**
142
142
  * Generates an OpenAPI schema object from a valid schema.
143
143
  */
144
- export declare const openapi: typeof SchemaProvider.openapi;
144
+ export declare const openapi: typeof SchemaValidator.openapi;
145
145
  export {};
package/dist/zod.js CHANGED
@@ -3,17 +3,17 @@
3
3
  * This module provides a Zod-based schema definition.
4
4
  * It includes various types, schema creation, validation, and OpenAPI integration.
5
5
  *
6
- * @module ZodSchemaProvider
6
+ * @module ZodSchemaValidator
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.openapi = exports.validate = exports.literal = exports.union = exports.array = exports.optional = exports.schemify = exports.never = exports.unknown = exports.any = exports.empty = exports.symbol = exports.date = exports.boolean = exports.bigint = exports.number = exports.string = exports.ZodSchema = exports.ZodSchemaProvider = void 0;
9
+ exports.openapi = exports.validate = exports.literal = exports.union = exports.array = exports.optional = exports.schemify = exports.never = exports.unknown = exports.any = exports.empty = exports.symbol = exports.date = exports.boolean = exports.bigint = exports.number = exports.string = exports.ZodSchema = exports.ZodSchemaValidator = void 0;
10
10
  const zod_1 = require("zod");
11
11
  const zod_openapi_1 = require("@anatine/zod-openapi");
12
12
  /**
13
13
  * Class representing a Zod schema definition.
14
- * @implements {SchemaProvider}
14
+ * @implements {SchemaValidator}
15
15
  */
16
- class ZodSchemaProvider {
16
+ class ZodSchemaValidator {
17
17
  string = zod_1.z.string();
18
18
  number = zod_1.z.number();
19
19
  bigint = zod_1.z.bigint();
@@ -113,80 +113,80 @@ class ZodSchemaProvider {
113
113
  return (0, zod_openapi_1.generateSchema)(this.schemify(schema));
114
114
  }
115
115
  }
116
- exports.ZodSchemaProvider = ZodSchemaProvider;
116
+ exports.ZodSchemaValidator = ZodSchemaValidator;
117
117
  /**
118
- * Factory function for creating a ZodSchemaProvider instance.
119
- * @returns {ZodSchemaProvider} The ZodSchemaProvider instance.
118
+ * Factory function for creating a ZodSchemaValidator instance.
119
+ * @returns {ZodSchemaValidator} The ZodSchemaValidator instance.
120
120
  */
121
- const ZodSchema = () => new ZodSchemaProvider();
121
+ const ZodSchema = () => new ZodSchemaValidator();
122
122
  exports.ZodSchema = ZodSchema;
123
- const SchemaProvider = (0, exports.ZodSchema)();
123
+ const SchemaValidator = (0, exports.ZodSchema)();
124
124
  /**
125
125
  * Zod schema definition for string type.
126
126
  */
127
- exports.string = SchemaProvider.string;
127
+ exports.string = SchemaValidator.string;
128
128
  /**
129
129
  * Zod schema definition for number type.
130
130
  */
131
- exports.number = SchemaProvider.number;
131
+ exports.number = SchemaValidator.number;
132
132
  /**
133
133
  * Zod schema definition for bigint type.
134
134
  */
135
- exports.bigint = SchemaProvider.bigint;
135
+ exports.bigint = SchemaValidator.bigint;
136
136
  /**
137
137
  * Zod schema definition for boolean type.
138
138
  */
139
- exports.boolean = SchemaProvider.boolean;
139
+ exports.boolean = SchemaValidator.boolean;
140
140
  /**
141
141
  * Zod schema definition for date type.
142
142
  */
143
- exports.date = SchemaProvider.date;
143
+ exports.date = SchemaValidator.date;
144
144
  /**
145
145
  * Zod schema definition for symbol type.
146
146
  */
147
- exports.symbol = SchemaProvider.symbol;
147
+ exports.symbol = SchemaValidator.symbol;
148
148
  /**
149
149
  * Zod schema definition for undefined, null, void types.
150
150
  */
151
- exports.empty = SchemaProvider.empty;
151
+ exports.empty = SchemaValidator.empty;
152
152
  /**
153
153
  * Zod schema definition for any type.
154
154
  */
155
- exports.any = SchemaProvider.any;
155
+ exports.any = SchemaValidator.any;
156
156
  /**
157
157
  * Zod schema definition for unknown type.
158
158
  */
159
- exports.unknown = SchemaProvider.unknown;
159
+ exports.unknown = SchemaValidator.unknown;
160
160
  /**
161
161
  * Zod schema definition for never type.
162
162
  */
163
- exports.never = SchemaProvider.never;
163
+ exports.never = SchemaValidator.never;
164
164
  /**
165
165
  * Transforms valid schema into Zod schema.
166
166
  */
167
- exports.schemify = SchemaProvider.schemify.bind(SchemaProvider);
167
+ exports.schemify = SchemaValidator.schemify.bind(SchemaValidator);
168
168
  /**
169
169
  * Makes a valid schema optional.
170
170
  */
171
- exports.optional = SchemaProvider.optional.bind(SchemaProvider);
171
+ exports.optional = SchemaValidator.optional.bind(SchemaValidator);
172
172
  /**
173
173
  * Defines an array for a valid schema.
174
174
  */
175
- exports.array = SchemaProvider.array.bind(SchemaProvider);
175
+ exports.array = SchemaValidator.array.bind(SchemaValidator);
176
176
  /**
177
177
  * Defines a union for a valid schema.
178
178
  */
179
- exports.union = SchemaProvider.union.bind(SchemaProvider);
179
+ exports.union = SchemaValidator.union.bind(SchemaValidator);
180
180
  /**
181
181
  * Defines a literal for a valid schema.
182
182
  */
183
- exports.literal = SchemaProvider.literal.bind(SchemaProvider);
183
+ exports.literal = SchemaValidator.literal.bind(SchemaValidator);
184
184
  /**
185
185
  * Validates a value against a valid schema.
186
186
  */
187
- exports.validate = SchemaProvider.validate.bind(SchemaProvider);
187
+ exports.validate = SchemaValidator.validate.bind(SchemaValidator);
188
188
  /**
189
189
  * Generates an OpenAPI schema object from a valid schema.
190
190
  */
191
- exports.openapi = SchemaProvider.openapi.bind(SchemaProvider);
191
+ exports.openapi = SchemaValidator.openapi.bind(SchemaValidator);
192
192
  //# sourceMappingURL=zod.js.map
package/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QAAA,MAAM,GAAkC,eAAe,CAAC,MAAM,CAAC;AAE5E;;GAEG;AACU,QAAA,KAAK,GAAiC,eAAe,CAAC,KAAK,CAAC;AAEzE;;GAEG;AACU,QAAA,GAAG,GAA+B,eAAe,CAAC,GAAG,CAAC;AAEnE;;GAEG;AACU,QAAA,OAAO,GAAmC,eAAe,CAAC,OAAO,CAAC;AAE/E;;GAEG;AACU,QAAA,KAAK,GAAiC,eAAe,CAAC,KAAK,CAAC;AAEzE;;GAEG;AACU,QAAA,QAAQ,GAAoC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAExG;;GAEG;AACU,QAAA,QAAQ,GAAoC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAExG;;GAEG;AACU,QAAA,KAAK,GAAiC,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAE/F;;GAEG;AACU,QAAA,KAAK,GAAiC,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAE/F;;GAEG;AACU,QAAA,OAAO,GAAmC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAErG;;GAEG;AACU,QAAA,QAAQ,GAAoC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAExG;;GAEG;AACU,QAAA,OAAO,GAAmC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forklaunch/validator",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Schema validator for ForkLaunch components.",
5
5
  "files": ["dist/**"],
6
6
  "types": "dist/index.d.ts",