@forklaunch/validator 0.3.13 → 0.4.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.
Files changed (74) hide show
  1. package/lib/index.d.mts +17 -0
  2. package/lib/index.d.ts +17 -2
  3. package/lib/index.js +44 -1
  4. package/lib/index.mjs +17 -0
  5. package/lib/schema.types-Do9dhcdB.d.mts +476 -0
  6. package/lib/schema.types-Do9dhcdB.d.ts +476 -0
  7. package/lib/src/typebox/index.d.mts +213 -0
  8. package/lib/src/typebox/index.d.ts +213 -3
  9. package/lib/src/typebox/index.js +435 -1
  10. package/lib/src/typebox/index.mjs +393 -0
  11. package/lib/src/zod/index.d.mts +106 -0
  12. package/lib/src/zod/index.d.ts +106 -3
  13. package/lib/src/zod/index.js +289 -1
  14. package/lib/src/zod/index.mjs +242 -0
  15. package/lib/tests/utils/mockSchemaValidator.d.mts +69 -0
  16. package/lib/tests/utils/mockSchemaValidator.d.ts +29 -25
  17. package/lib/tests/utils/mockSchemaValidator.js +143 -79
  18. package/lib/tests/utils/mockSchemaValidator.mjs +99 -0
  19. package/package.json +48 -35
  20. package/lib/index.d.ts.map +0 -1
  21. package/lib/src/shared/types/schema.types.d.ts +0 -255
  22. package/lib/src/shared/types/schema.types.d.ts.map +0 -1
  23. package/lib/src/shared/types/schema.types.js +0 -1
  24. package/lib/src/typebox/index.d.ts.map +0 -1
  25. package/lib/src/typebox/staticSchemaValidator.d.ts +0 -99
  26. package/lib/src/typebox/staticSchemaValidator.d.ts.map +0 -1
  27. package/lib/src/typebox/staticSchemaValidator.js +0 -99
  28. package/lib/src/typebox/typeboxSchemaValidator.d.ts +0 -122
  29. package/lib/src/typebox/typeboxSchemaValidator.d.ts.map +0 -1
  30. package/lib/src/typebox/typeboxSchemaValidator.js +0 -362
  31. package/lib/src/typebox/types/schema.types.d.ts +0 -59
  32. package/lib/src/typebox/types/schema.types.d.ts.map +0 -1
  33. package/lib/src/typebox/types/schema.types.js +0 -1
  34. package/lib/src/zod/index.d.ts.map +0 -1
  35. package/lib/src/zod/staticSchemaValidator.d.ts +0 -99
  36. package/lib/src/zod/staticSchemaValidator.d.ts.map +0 -1
  37. package/lib/src/zod/staticSchemaValidator.js +0 -99
  38. package/lib/src/zod/types/schema.types.d.ts +0 -71
  39. package/lib/src/zod/types/schema.types.d.ts.map +0 -1
  40. package/lib/src/zod/types/schema.types.js +0 -1
  41. package/lib/src/zod/zodSchemaValidator.d.ts +0 -110
  42. package/lib/src/zod/zodSchemaValidator.d.ts.map +0 -1
  43. package/lib/src/zod/zodSchemaValidator.js +0 -192
  44. package/lib/tests/typebox/advancedParse.test.d.ts +0 -2
  45. package/lib/tests/typebox/advancedParse.test.d.ts.map +0 -1
  46. package/lib/tests/typebox/advancedParse.test.js +0 -514
  47. package/lib/tests/typebox/largeSchema.test.d.ts +0 -2
  48. package/lib/tests/typebox/largeSchema.test.d.ts.map +0 -1
  49. package/lib/tests/typebox/largeSchema.test.js +0 -150
  50. package/lib/tests/typebox/schemaValidator.test.d.ts +0 -2
  51. package/lib/tests/typebox/schemaValidator.test.d.ts.map +0 -1
  52. package/lib/tests/typebox/schemaValidator.test.js +0 -253
  53. package/lib/tests/typebox/typeEquality.test.d.ts +0 -2
  54. package/lib/tests/typebox/typeEquality.test.d.ts.map +0 -1
  55. package/lib/tests/typebox/typeEquality.test.js +0 -100
  56. package/lib/tests/utils/compare.d.ts +0 -2
  57. package/lib/tests/utils/compare.d.ts.map +0 -1
  58. package/lib/tests/utils/compare.js +0 -8
  59. package/lib/tests/utils/mockSchemaValidator.d.ts.map +0 -1
  60. package/lib/tests/zod/advancedParse.test.d.ts +0 -2
  61. package/lib/tests/zod/advancedParse.test.d.ts.map +0 -1
  62. package/lib/tests/zod/advancedParse.test.js +0 -514
  63. package/lib/tests/zod/largeSchema.test.d.ts +0 -2
  64. package/lib/tests/zod/largeSchema.test.d.ts.map +0 -1
  65. package/lib/tests/zod/largeSchema.test.js +0 -150
  66. package/lib/tests/zod/schemaValidator.test.d.ts +0 -2
  67. package/lib/tests/zod/schemaValidator.test.d.ts.map +0 -1
  68. package/lib/tests/zod/schemaValidator.test.js +0 -205
  69. package/lib/tests/zod/typeEquality.test.d.ts +0 -2
  70. package/lib/tests/zod/typeEquality.test.d.ts.map +0 -1
  71. package/lib/tests/zod/typeEquality.test.js +0 -100
  72. package/lib/vitest.config.d.ts +0 -3
  73. package/lib/vitest.config.d.ts.map +0 -1
  74. package/lib/vitest.config.js +0 -7
@@ -1,255 +0,0 @@
1
- import { Prettify } from '@forklaunch/common';
2
- import { SchemaObject } from 'openapi3-ts/oas31';
3
- import { TResolve, TSchemaTranslate } from '../../typebox/types/schema.types';
4
- import { ZodResolve, ZodSchemaTranslate } from '../../zod/types/schema.types';
5
- /**
6
- * The result associated with an attempted parsing.
7
- *
8
- */
9
- export type ParseResult<T> = {
10
- ok: true;
11
- value: T;
12
- } | {
13
- ok: false;
14
- error?: string;
15
- };
16
- /**
17
- * Interface representing a schema validator.
18
- *
19
- * @template SchematicFunction - The function type for schemifying a schema.
20
- * @template OptionalFunction - The function type for making a schema optional.
21
- * @template ArrayFunction - The function type for converting a schema into an array.
22
- * @template UnionFunction - The function type for unionizing multiple schemas.
23
- * @template LiteralFunction - The function type for creating a literal schema.
24
- * @template ValidationFunction - The function type for validating a value against a schema.
25
- * @template ParseFunction - The function type for parsing a value against a schema.
26
- * @template OpenAPIFunction - The function type for converting a schema into an OpenAPI schema object.
27
- */
28
- export interface SchemaValidator<CompilationFunction = <T>(schema: T) => unknown, SchematicFunction = <T>(schema: T) => unknown, OptionalFunction = <T>(schema: T) => unknown, ArrayFunction = <T>(schema: T) => unknown, UnionFunction = <T>(schemas: T[]) => unknown, LiteralFunction = <T extends LiteralSchema>(schema: T) => unknown, EnumFunction = <T extends LiteralSchema>(schemaEnum: Record<string, T>) => unknown, SchemaGuardFunction = <T>(value: unknown) => value is T, ValidationFunction = <T>(schema: T, value: unknown) => boolean, ParseFunction = <T>(schema: T, value: unknown) => ParseResult<SchemaResolve<T>>, OpenAPIFunction = <T>(schema: T) => SchemaObject> {
29
- /**
30
- * The type of the schema validator. Meant to be used with non-null assertions.
31
- */
32
- _Type: unknown;
33
- /**
34
- * The catch-all type for the schema. Meant to be used with non-null assertions.
35
- */
36
- _SchemaCatchall: unknown;
37
- /**
38
- * The valid schema object type. Meant to be used with non-null assertions.
39
- */
40
- _ValidSchemaObject: unknown;
41
- /**
42
- * Validator for string type.
43
- */
44
- string: unknown;
45
- /**
46
- * Validator for uuid type.
47
- */
48
- uuid: unknown;
49
- /**
50
- * Validator for uri type.
51
- */
52
- uri: unknown;
53
- /**
54
- * Validator for email type.
55
- */
56
- email: unknown;
57
- /**
58
- * Validator for number type.
59
- */
60
- number: unknown;
61
- /**
62
- * Validator for bigint type.
63
- */
64
- bigint: unknown;
65
- /**
66
- * Validator for boolean type.
67
- */
68
- boolean: unknown;
69
- /**
70
- * Validator for date type.
71
- */
72
- date: unknown;
73
- /**
74
- * Validator for symbol type.
75
- */
76
- symbol: unknown;
77
- /**
78
- * Validator for nullish type.
79
- */
80
- nullish: unknown;
81
- /**
82
- * Validator for any type.
83
- */
84
- any: unknown;
85
- /**
86
- * Validator for unknown type.
87
- */
88
- unknown: unknown;
89
- /**
90
- * Validator for never type.
91
- */
92
- never: unknown;
93
- /**
94
- * Compiles schema if this exists, for optimal performance.
95
- *
96
- * @param {T} schema - The schema to compile.
97
- * @returns {unknown} - The compiled schema.
98
- */
99
- compile: CompilationFunction;
100
- /**
101
- * Converts a valid schema input into a schemified form.
102
- *
103
- * @param {T} schema - The schema to schemify.
104
- * @returns {unknown} - The schemified form of the schema.
105
- */
106
- schemify: SchematicFunction;
107
- /**
108
- * Converts a schema into an optional schema.
109
- *
110
- * @param {T} schema - The schema to make optional.
111
- * @returns {unknown} - The optional form of the schema.
112
- */
113
- optional: OptionalFunction;
114
- /**
115
- * Converts a schema into an array schema.
116
- *
117
- * @param {T} schema - The schema to convert into an array.
118
- * @returns {unknown} - The array form of the schema.
119
- */
120
- array: ArrayFunction;
121
- /**
122
- * Converts multiple schemas into a union schema.
123
- *
124
- * @param {T[]} schemas - The schemas to unionize.
125
- * @returns {unknown} - The union form of the schemas.
126
- */
127
- union: UnionFunction;
128
- /**
129
- * Creates a literal schema from a value.
130
- *
131
- * @param {T} value - The literal value.
132
- * @returns {unknown} - The literal schema.
133
- */
134
- literal: LiteralFunction;
135
- /**
136
- * Creates an enum schema from a record of literal values.
137
- *
138
- * @param {Record<string, T>} schemaEnum - The enum schema.
139
- * @returns {unknown} - The enum schema.
140
- */
141
- enum_: EnumFunction;
142
- /**
143
- * Checks if a value is a schema.
144
- *
145
- * @param {unknown} value - The value to check.
146
- * @returns {boolean} - Whether the value is a schema.
147
- */
148
- isSchema: SchemaGuardFunction;
149
- /**
150
- * Validates a value against a schema.
151
- *
152
- * @param {T} schema - The schema to validate against.
153
- * @param {unknown} value - The value to validate.
154
- * @returns {boolean} - Whether the value is valid according to the schema.
155
- */
156
- validate: ValidationFunction;
157
- /**
158
- * Parses a value to a schema validation.
159
- *
160
- * @param {T} schema - The schema to validate against.
161
- * @param {unknown} value - The value to validate.
162
- * @returns {ParseResult} - The discrimintated parsed value if successful, the error if unsuccessful.
163
- */
164
- parse: ParseFunction;
165
- /**
166
- * Converts a schema into an OpenAPI schema object.
167
- *
168
- * @param {T} schema - The schema to convert.
169
- * @returns {SchemaObject} - The OpenAPI schema object.
170
- */
171
- openapi: OpenAPIFunction;
172
- }
173
- /**
174
- * Type representing any schema validator.
175
- */
176
- export type AnySchemaValidator = SchemaValidator<unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown> & {
177
- /**
178
- * The type of the schema resolver.
179
- */
180
- _Type: keyof SchemaResolve<unknown>;
181
- };
182
- /**
183
- * Interface representing schema resolution for different validation libraries.
184
- *
185
- * @template T - The type of the schema to resolve.
186
- */
187
- export interface SchemaResolve<T> {
188
- /**
189
- * Schema resolution for Zod.
190
- */
191
- Zod: ZodResolve<T>;
192
- /**
193
- * Schema resolution for TypeBox.
194
- */
195
- TypeBox: TResolve<T>;
196
- }
197
- /**
198
- * Interface representing schema translation for different validation libraries.
199
- *
200
- * @template T - The type of the schema to translate.
201
- */
202
- export interface SchemaTranslate<T> {
203
- /**
204
- * Schema translation for Zod.
205
- */
206
- Zod: ZodSchemaTranslate<T>;
207
- /**
208
- * Schema translation for TypeBox.
209
- */
210
- TypeBox: TSchemaTranslate<T>;
211
- }
212
- /**
213
- * Type representing the prettified schema translation.
214
- *
215
- * @template T - The type of the schema to translate.
216
- * @template SV - The type of the schema validator.
217
- */
218
- type SchemaPrettify<T, SV extends AnySchemaValidator> = Prettify<SchemaTranslate<T>[SV['_Type']]>;
219
- /**
220
- * Type representing a schema, which can be a valid schema object or an idiomatic schema.
221
- *
222
- * @template T - The type of the schema.
223
- * @template SV - The type of the schema validator.
224
- */
225
- export type Schema<T extends SV['_ValidSchemaObject'] | IdiomaticSchema<SV>, SV extends AnySchemaValidator> = SchemaPrettify<SchemaResolve<T>[SV['_Type']], SV>;
226
- /**
227
- * Represents a schema for an unboxed object where each key can have an idiomatic schema.
228
- *
229
- * @template SV - The type of the schema validator.
230
- */
231
- export type UnboxedObjectSchema<SV extends AnySchemaValidator> = {
232
- [key: KeyTypes]: IdiomaticSchema<SV>;
233
- };
234
- /**
235
- * Represents a schema that can be a literal value.
236
- */
237
- export type LiteralSchema = string | number | boolean;
238
- /**
239
- * Represents an idiomatic schema which can be an unboxed object schema, a literal schema, or a catch-all type.
240
- *
241
- * @template SV - The type of the schema validator.
242
- */
243
- export type IdiomaticSchema<SV extends AnySchemaValidator> = LiteralSchema | SV['_SchemaCatchall'] | UnboxedObjectSchema<SV>;
244
- /**
245
- * Increments a number type by one, with support up to 50.
246
- *
247
- * @template T - The number type to increment.
248
- */
249
- export type Increment<T extends number> = T extends 0 ? 1 : T extends 1 ? 2 : T extends 2 ? 3 : T extends 3 ? 4 : T extends 4 ? 5 : T extends 5 ? 6 : T extends 6 ? 7 : T extends 7 ? 8 : T extends 8 ? 9 : T extends 9 ? 10 : T extends 10 ? 11 : T extends 11 ? 12 : T extends 12 ? 13 : T extends 13 ? 14 : T extends 14 ? 15 : T extends 15 ? 16 : T extends 16 ? 17 : T extends 17 ? 18 : T extends 18 ? 19 : T extends 19 ? 20 : T extends 20 ? 21 : T extends 21 ? 22 : T extends 22 ? 23 : T extends 23 ? 24 : T extends 24 ? 25 : T extends 25 ? 26 : T extends 26 ? 27 : T extends 27 ? 28 : T extends 28 ? 29 : T extends 29 ? 30 : T extends 30 ? 31 : T extends 31 ? 32 : T extends 32 ? 33 : T extends 33 ? 34 : T extends 34 ? 35 : T extends 35 ? 36 : T extends 36 ? 37 : T extends 37 ? 38 : T extends 38 ? 39 : T extends 39 ? 40 : T extends 40 ? 41 : T extends 41 ? 42 : T extends 42 ? 43 : T extends 43 ? 44 : T extends 44 ? 45 : T extends 45 ? 46 : T extends 46 ? 47 : T extends 47 ? 48 : T extends 48 ? 49 : T extends 49 ? 50 : 50;
250
- /**
251
- * Represents key types that can be used in the schema.
252
- */
253
- export type KeyTypes = string | number;
254
- export {};
255
- //# sourceMappingURL=schema.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/schema.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAE9E;;;GAGG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IACrB;IACE,EAAE,EAAE,IAAI,CAAC;IACT,KAAK,EAAE,CAAC,CAAC;CACV,GACD;IACE,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,CAAC,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,GACF,CAAC,SAAS,EAAE,GACV,EAAE,GACF,CAAC,SAAS,EAAE,GACV,EAAE,GACF,CAAC,SAAS,EAAE,GACV,EAAE,GACF,CAAC,SAAS,EAAE,GACV,EAAE,GACF,CAAC,SAAS,EAAE,GACV,EAAE,GACF,CAAC,SAAS,EAAE,GACV,EAAE,GACF,CAAC,SAAS,EAAE,GACV,EAAE,GACF,CAAC,SAAS,EAAE,GACV,EAAE,GACF,CAAC,SAAS,EAAE,GACV,EAAE,GACF,CAAC,SAAS,EAAE,GACV,EAAE,GACF,CAAC,SAAS,EAAE,GACV,EAAE,GACF,CAAC,SAAS,EAAE,GACV,EAAE,GACF,CAAC,SAAS,EAAE,GACV,EAAE,GACF,EAAE,CAAC;AAEzG;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/typebox/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,99 +0,0 @@
1
- import { TypeboxSchemaValidator } from './typeboxSchemaValidator';
2
- /**
3
- * Factory function for creating a TypeboxSchemaValidator instance.
4
- * @returns {TypeboxSchemaValidator} The TypeboxSchemaValidator instance.
5
- */
6
- export declare const SchemaValidator: () => TypeboxSchemaValidator;
7
- /**
8
- * TypeBox schema definition for string type.
9
- */
10
- export declare const string: import("@sinclair/typebox").TString;
11
- /**
12
- * TypeBox schema definition for UUID type.
13
- */
14
- export declare const uuid: import("@sinclair/typebox").TString;
15
- /**
16
- * TypeBox schema definition for URI type.
17
- */
18
- export declare const uri: import("@sinclair/typebox").TString;
19
- /**
20
- * TypeBox schema definition for email type.
21
- */
22
- export declare const email: import("@sinclair/typebox").TString;
23
- /**
24
- * TypeBox schema definition for number type.
25
- */
26
- export declare const number: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TDate, import("@sinclair/typebox").TBigInt]>, number>;
27
- /**
28
- * TypeBox schema definition for bigint type.
29
- */
30
- export declare const bigint: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBigInt, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TDate]>, bigint>;
31
- /**
32
- * TypeBox schema definition for boolean type.
33
- */
34
- export declare const boolean: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TString]>, boolean | undefined>;
35
- /**
36
- * TypeBox schema definition for date type.
37
- */
38
- export declare const date: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>;
39
- /**
40
- * TypeBox schema definition for symbol type.
41
- */
42
- export declare const symbol: import("@sinclair/typebox").TSymbol;
43
- /**
44
- * TypeBox schema definition for undefined, null, void types.
45
- */
46
- export declare const nullish: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TVoid, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TUndefined]>;
47
- /**
48
- * TypeBox schema definition for any type.
49
- */
50
- export declare const any: import("@sinclair/typebox").TAny;
51
- /**
52
- * TypeBox schema definition for unknown type.
53
- */
54
- export declare const unknown: import("@sinclair/typebox").TUnknown;
55
- /**
56
- * TypeBox schema definition for never type.
57
- */
58
- export declare const never: import("@sinclair/typebox").TNever;
59
- /**
60
- * Transforms valid schema into TypeBox schema.
61
- */
62
- export declare const schemify: <T extends import("./types/schema.types").TIdiomaticSchema>(schema: T) => import("./types/schema.types").TResolve<T>;
63
- /**
64
- * Makes a valid schema optional.
65
- */
66
- export declare const optional: <T extends import("./types/schema.types").TIdiomaticSchema>(schema: T) => import("@sinclair/typebox").TOptional<import("./types/schema.types").TResolve<T>>;
67
- /**
68
- * Defines an array for a valid schema.
69
- */
70
- export declare const array: <T extends import("./types/schema.types").TIdiomaticSchema>(schema: T) => import("@sinclair/typebox").TArray<import("./types/schema.types").TResolve<T>>;
71
- /**
72
- * Defines a union for a valid schema.
73
- */
74
- export declare const union: <T extends import("./types/schema.types").TUnionContainer>(schemas: [...T]) => import("@sinclair/typebox").TUnion<import("./types/schema.types").UnionTResolve<T>>;
75
- /**
76
- * Defines a literal for a valid schema.
77
- */
78
- export declare const literal: <T extends import("../..").LiteralSchema>(value: T) => import("@sinclair/typebox").TLiteral<T>;
79
- /**
80
- * Defines an enum for a valid schema.
81
- */
82
- export declare const enum_: <T extends import("../..").LiteralSchema>(schemaEnum: Record<string, T>) => import("@sinclair/typebox").TUnion<import("./types/schema.types").UnionTResolve<T[]>>;
83
- /**
84
- * Checks if a value is a TypeBox schema.
85
- */
86
- export declare const isSchema: (value: unknown) => value is import("@sinclair/typebox").TSchema;
87
- /**
88
- * Validates a value against a valid schema.
89
- */
90
- export declare const validate: <T extends import("./types/schema.types").TIdiomaticSchema | import("@sinclair/typebox").TSchema>(schema: T | import("@sinclair/typebox/compiler").TypeCheck<import("./types/schema.types").TResolve<T>>, value: unknown) => boolean;
91
- /**
92
- * Parses a value against a valid schema.
93
- */
94
- export declare const parse: <T extends import("./types/schema.types").TIdiomaticSchema | import("@sinclair/typebox").TSchema>(schema: T | import("@sinclair/typebox/compiler").TypeCheck<import("./types/schema.types").TResolve<T>>, value: unknown) => import("../..").ParseResult<import("./types/schema.types").TResolve<T>>;
95
- /**
96
- * Generates an OpenAPI schema object from a valid schema.
97
- */
98
- export declare const openapi: <T extends import("./types/schema.types").TIdiomaticSchema | import("@sinclair/typebox").TSchema>(schema: T) => import("openapi3-ts/oas31").SchemaObject;
99
- //# sourceMappingURL=staticSchemaValidator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"staticSchemaValidator.d.ts","sourceRoot":"","sources":["../../../src/typebox/staticSchemaValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,eAAe,8BAAqC,CAAC;AAIlE;;GAEG;AACH,eAAO,MAAM,MAAM,qCAA+B,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,IAAI,qCAA6B,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,GAAG,qCAA4B,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,KAAK,qCAA8B,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,MAAM,iTAA+B,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,MAAM,8QAA+B,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,OAAO,8KAAgC,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,IAAI,0QAA6B,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,MAAM,qCAA+B,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,OAAO,oJAAgC,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,GAAG,kCAA4B,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,OAAO,sCAAgC,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,KAAK,oCAA8B,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,QAAQ,sHAEpB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,6JAEpB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,0JAA0D,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,KAAK,oKAA0D,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,OAAO,gGAEnB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,mKAA0D,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,QAAQ,kEAEpB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,sOAEpB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,sSAA0D,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,OAAO,0JAEnB,CAAC"}
@@ -1,99 +0,0 @@
1
- import { TypeboxSchemaValidator } from './typeboxSchemaValidator';
2
- /**
3
- * Factory function for creating a TypeboxSchemaValidator instance.
4
- * @returns {TypeboxSchemaValidator} The TypeboxSchemaValidator instance.
5
- */
6
- export const SchemaValidator = () => new TypeboxSchemaValidator();
7
- const StaticSchemaValidator = SchemaValidator();
8
- /**
9
- * TypeBox schema definition for string type.
10
- */
11
- export const string = StaticSchemaValidator.string;
12
- /**
13
- * TypeBox schema definition for UUID type.
14
- */
15
- export const uuid = StaticSchemaValidator.uuid;
16
- /**
17
- * TypeBox schema definition for URI type.
18
- */
19
- export const uri = StaticSchemaValidator.uri;
20
- /**
21
- * TypeBox schema definition for email type.
22
- */
23
- export const email = StaticSchemaValidator.email;
24
- /**
25
- * TypeBox schema definition for number type.
26
- */
27
- export const number = StaticSchemaValidator.number;
28
- /**
29
- * TypeBox schema definition for bigint type.
30
- */
31
- export const bigint = StaticSchemaValidator.bigint;
32
- /**
33
- * TypeBox schema definition for boolean type.
34
- */
35
- export const boolean = StaticSchemaValidator.boolean;
36
- /**
37
- * TypeBox schema definition for date type.
38
- */
39
- export const date = StaticSchemaValidator.date;
40
- /**
41
- * TypeBox schema definition for symbol type.
42
- */
43
- export const symbol = StaticSchemaValidator.symbol;
44
- /**
45
- * TypeBox schema definition for undefined, null, void types.
46
- */
47
- export const nullish = StaticSchemaValidator.nullish;
48
- /**
49
- * TypeBox schema definition for any type.
50
- */
51
- export const any = StaticSchemaValidator.any;
52
- /**
53
- * TypeBox schema definition for unknown type.
54
- */
55
- export const unknown = StaticSchemaValidator.unknown;
56
- /**
57
- * TypeBox schema definition for never type.
58
- */
59
- export const never = StaticSchemaValidator.never;
60
- /**
61
- * Transforms valid schema into TypeBox schema.
62
- */
63
- export const schemify = StaticSchemaValidator.schemify.bind(StaticSchemaValidator);
64
- /**
65
- * Makes a valid schema optional.
66
- */
67
- export const optional = StaticSchemaValidator.optional.bind(StaticSchemaValidator);
68
- /**
69
- * Defines an array for a valid schema.
70
- */
71
- export const array = StaticSchemaValidator.array.bind(StaticSchemaValidator);
72
- /**
73
- * Defines a union for a valid schema.
74
- */
75
- export const union = StaticSchemaValidator.union.bind(StaticSchemaValidator);
76
- /**
77
- * Defines a literal for a valid schema.
78
- */
79
- export const literal = StaticSchemaValidator.literal.bind(StaticSchemaValidator);
80
- /**
81
- * Defines an enum for a valid schema.
82
- */
83
- export const enum_ = StaticSchemaValidator.enum_.bind(StaticSchemaValidator);
84
- /**
85
- * Checks if a value is a TypeBox schema.
86
- */
87
- export const isSchema = StaticSchemaValidator.isSchema.bind(StaticSchemaValidator);
88
- /**
89
- * Validates a value against a valid schema.
90
- */
91
- export const validate = StaticSchemaValidator.validate.bind(StaticSchemaValidator);
92
- /**
93
- * Parses a value against a valid schema.
94
- */
95
- export const parse = StaticSchemaValidator.parse.bind(StaticSchemaValidator);
96
- /**
97
- * Generates an OpenAPI schema object from a valid schema.
98
- */
99
- export const openapi = StaticSchemaValidator.openapi.bind(StaticSchemaValidator);
@@ -1,122 +0,0 @@
1
- /**
2
- * This module provides a TypeScript-based schema definition using the TypeBox library.
3
- * It includes various types, schema creation, validation, and OpenAPI integration.
4
- *
5
- * @module TypeboxSchemaValidator
6
- */
7
- import { TArray, TKind, TLiteral, TOptional, TProperties, TSchema, TUnion } from '@sinclair/typebox';
8
- import { TypeCheck } from '@sinclair/typebox/compiler';
9
- import { SchemaObject } from 'openapi3-ts/oas31';
10
- import { LiteralSchema, ParseResult, SchemaValidator as SV } from '../shared/types/schema.types';
11
- import { TIdiomaticSchema, TObject, TResolve, TUnionContainer, UnionTResolve } from './types/schema.types';
12
- /**
13
- * Class representing a TypeBox schema definition.
14
- * @implements {SchemaValidator}
15
- */
16
- export declare class TypeboxSchemaValidator implements SV<(<T extends TObject<TProperties>>(schema: T) => TypeCheck<T>), <T extends TIdiomaticSchema>(schema: T) => TResolve<T>, <T extends TIdiomaticSchema>(schema: T) => TOptional<TResolve<T>>, <T extends TIdiomaticSchema>(schema: T) => TArray<TResolve<T>>, <T extends TUnionContainer>(schemas: [...T]) => TUnion<UnionTResolve<T>>, <T extends LiteralSchema>(value: T) => TLiteral<T>, <T extends LiteralSchema>(schemaEnum: Record<string, T>) => TUnion<UnionTResolve<T[]>>, (value: unknown) => value is TSchema, <T extends TIdiomaticSchema>(schema: T, value: unknown) => boolean, <T extends TIdiomaticSchema>(schema: T, value: unknown) => ParseResult<TResolve<T>>, <T extends TIdiomaticSchema>(schema: T) => SchemaObject> {
17
- _Type: 'TypeBox';
18
- _SchemaCatchall: TKind;
19
- _ValidSchemaObject: TObject<TProperties> | TArray<TObject<TProperties>>;
20
- string: import("@sinclair/typebox").TString;
21
- uuid: import("@sinclair/typebox").TString;
22
- uri: import("@sinclair/typebox").TString;
23
- email: import("@sinclair/typebox").TString;
24
- number: import("@sinclair/typebox").TTransform<TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TDate, import("@sinclair/typebox").TBigInt]>, number>;
25
- bigint: import("@sinclair/typebox").TTransform<TUnion<[import("@sinclair/typebox").TBigInt, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TDate]>, bigint>;
26
- boolean: import("@sinclair/typebox").TTransform<TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TString]>, boolean | undefined>;
27
- date: import("@sinclair/typebox").TTransform<TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>;
28
- symbol: import("@sinclair/typebox").TSymbol;
29
- nullish: TUnion<[import("@sinclair/typebox").TVoid, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TUndefined]>;
30
- any: import("@sinclair/typebox").TAny;
31
- unknown: import("@sinclair/typebox").TUnknown;
32
- never: import("@sinclair/typebox").TNever;
33
- /**
34
- * Extracts the error type of a schema for error messages.
35
- *
36
- * @param {TCatchall} schema - A schema that contains some type information.
37
- * @returns The type of the schema for error messages.
38
- */
39
- private errorType;
40
- /**
41
- * Pretty print TypeBox errors.
42
- *
43
- * @param {ValueError[]} errors
44
- * @returns
45
- */
46
- private prettyPrintTypeBoxErrors;
47
- /**
48
- * Compiles schema if this exists, for optimal performance.
49
- *
50
- * @param {TObject<TProperties>} schema - The schema to compile.
51
- * @returns {TypeCheck<T>} - The compiled schema.
52
- */
53
- compile<T extends TObject<TProperties>>(schema: T): TypeCheck<T>;
54
- /**
55
- * Convert a schema to a TypeBox schema.
56
- * @param {TIdiomaticSchema} schema - The schema to convert.
57
- * @returns {TResolve<T>} The resolved schema.
58
- */
59
- schemify<T extends TIdiomaticSchema>(schema: T): TResolve<T>;
60
- /**
61
- * Make a schema optional.
62
- * @param {TIdiomaticSchema} schema - The schema to make optional.
63
- * @returns {TOptional<TResolve<T>>} The optional schema.
64
- */
65
- optional<T extends TIdiomaticSchema>(schema: T): TOptional<TResolve<T>>;
66
- /**
67
- * Create an array schema.
68
- * @param {TIdiomaticSchema} schema - The schema to use for array items.
69
- * @returns {TArray<TResolve<T>>} The array schema.
70
- */
71
- array<T extends TIdiomaticSchema>(schema: T): TArray<TResolve<T>>;
72
- /**
73
- * Create a union schema.
74
- * @param {TUnionContainer} schemas - The schemas to union.
75
- * @returns {TUnion<UnionTResolve<T>>} The union schema.
76
- *
77
- * WARNING: If "nullish" or TUndefined is included in the union, the key will still be expected.
78
- * This is a limitation of TypeBox. Consider using "optional" instead.
79
- */
80
- union<T extends TUnionContainer>(schemas: [...T]): TUnion<UnionTResolve<T>>;
81
- /**
82
- * Create a literal schema.
83
- * @param {LiteralSchema} value - The literal value.
84
- * @returns {TLiteral<T>} The literal schema.
85
- */
86
- literal<T extends LiteralSchema>(value: T): TLiteral<T>;
87
- /**
88
- * Create an enum schema.
89
- * @param {Record<string, LiteralSchema>} schemaEnum - The enum schema.
90
- * @returns {TUnion<UnionTResolve<T[]>>} The enum schema.
91
- */
92
- enum_<T extends LiteralSchema>(schemaEnum: Record<string, T>): TUnion<UnionTResolve<T[]>>;
93
- /**
94
- * Check if a value is a TypeBox object schema.
95
- * @param {unknown} value - The value to check.
96
- * @returns {boolean} True if the value is a TypeBox object schema.
97
- */
98
- isSchema(value: unknown): value is TSchema;
99
- /**
100
- * Validate a value against a schema.
101
- *
102
- * @param {TSchema} schema - The schema to validate against.
103
- * @param {unknown} value - The value to validate.
104
- * @returns {boolean} True if valid, otherwise false.
105
- */
106
- validate<T extends TIdiomaticSchema | TSchema>(schema: T | TypeCheck<TResolve<T>>, value: unknown): boolean;
107
- /**
108
- * Parse a value against a schema.
109
- *
110
- * @param {TSchema} schema - The schema to validate against.
111
- * @param {unknown} value - The value to validate.
112
- * @returns {ParseResult<TResolve<T>>} The parsing result.
113
- */
114
- parse<T extends TIdiomaticSchema | TSchema>(schema: T | TypeCheck<TResolve<T>>, value: unknown): ParseResult<TResolve<T>>;
115
- /**
116
- * Convert a schema to an OpenAPI schema object.
117
- * @param {TIdiomaticSchema | TSchema} schema - The schema to convert.
118
- * @returns {SchemaObject} The OpenAPI schema object.
119
- */
120
- openapi<T extends TIdiomaticSchema | TSchema>(schema: T): SchemaObject;
121
- }
122
- //# sourceMappingURL=typeboxSchemaValidator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typeboxSchemaValidator.d.ts","sourceRoot":"","sources":["../../../src/typebox/typeboxSchemaValidator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAGL,MAAM,EACN,KAAK,EACL,QAAQ,EACR,SAAS,EAC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