@palmares/schemas 0.0.1 → 0.1.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/.turbo/turbo-build$colon$watch.log +12 -410
- package/.turbo/turbo-build.log +13 -4
- package/CHANGELOG.md +26 -0
- package/__tests__/.drizzle/migrations/0000_skinny_harrier.sql +22 -0
- package/__tests__/.drizzle/migrations/meta/0000_snapshot.json +156 -0
- package/__tests__/.drizzle/migrations/meta/_journal.json +13 -0
- package/__tests__/.drizzle/schema.ts +35 -0
- package/__tests__/drizzle.config.ts +11 -0
- package/__tests__/eslint.config.js +10 -0
- package/__tests__/manage.ts +5 -0
- package/__tests__/node_modules/.bin/drizzle-kit +17 -0
- package/__tests__/node_modules/.bin/esbuild +14 -0
- package/__tests__/node_modules/.bin/tsc +17 -0
- package/__tests__/node_modules/.bin/tsserver +17 -0
- package/__tests__/node_modules/.bin/tsx +17 -0
- package/__tests__/package.json +36 -0
- package/__tests__/sqlite.db +0 -0
- package/__tests__/src/core/array.test.ts +130 -0
- package/__tests__/src/core/boolean.test.ts +66 -0
- package/__tests__/src/core/datetime.test.ts +102 -0
- package/__tests__/src/core/index.ts +35 -0
- package/__tests__/src/core/model.test.ts +260 -0
- package/__tests__/src/core/models.ts +50 -0
- package/__tests__/src/core/numbers.test.ts +177 -0
- package/__tests__/src/core/object.test.ts +198 -0
- package/__tests__/src/core/string.test.ts +222 -0
- package/__tests__/src/core/test.test.ts +59 -0
- package/__tests__/src/core/types.test.ts +97 -0
- package/__tests__/src/core/union.test.ts +99 -0
- package/__tests__/src/settings.ts +71 -0
- package/__tests__/tsconfig.json +11 -0
- package/dist/cjs/src/adapter/fields/index.js +2 -2
- package/dist/cjs/src/adapter/fields/object.js +9 -0
- package/dist/cjs/src/adapter/index.js +1 -0
- package/dist/cjs/src/constants.js +1 -7
- package/dist/cjs/src/domain.js +146 -1
- package/dist/cjs/src/index.js +69 -74
- package/dist/cjs/src/model.js +206 -206
- package/dist/cjs/src/schema/array.js +185 -58
- package/dist/cjs/src/schema/boolean.js +105 -44
- package/dist/cjs/src/schema/datetime.js +104 -38
- package/dist/cjs/src/schema/number.js +134 -114
- package/dist/cjs/src/schema/object.js +106 -43
- package/dist/cjs/src/schema/schema.js +123 -75
- package/dist/cjs/src/schema/string.js +152 -58
- package/dist/cjs/src/schema/union.js +412 -290
- package/dist/cjs/src/utils.js +42 -15
- package/dist/cjs/src/validators/array.js +6 -1
- package/dist/cjs/src/validators/boolean.js +2 -0
- package/dist/cjs/src/validators/datetime.js +4 -0
- package/dist/cjs/src/validators/number.js +12 -40
- package/dist/cjs/src/validators/object.js +1 -0
- package/dist/cjs/src/validators/schema.js +5 -1
- package/dist/cjs/src/validators/string.js +30 -2
- package/dist/cjs/src/validators/union.js +5 -4
- package/dist/cjs/src/validators/utils.js +99 -27
- package/dist/cjs/tsconfig.types.tsbuildinfo +1 -1
- package/dist/cjs/types/adapter/fields/array.d.ts +2 -2
- package/dist/cjs/types/adapter/fields/array.d.ts.map +1 -1
- package/dist/cjs/types/adapter/fields/boolean.d.ts.map +1 -1
- package/dist/cjs/types/adapter/fields/datetime.d.ts.map +1 -1
- package/dist/cjs/types/adapter/fields/index.d.ts +2 -2
- package/dist/cjs/types/adapter/fields/index.d.ts.map +1 -1
- package/dist/cjs/types/adapter/fields/number.d.ts.map +1 -1
- package/dist/cjs/types/adapter/fields/object.d.ts +2 -1
- package/dist/cjs/types/adapter/fields/object.d.ts.map +1 -1
- package/dist/cjs/types/adapter/fields/string.d.ts.map +1 -1
- package/dist/cjs/types/adapter/fields/union.d.ts.map +1 -1
- package/dist/cjs/types/adapter/index.d.ts +1 -0
- package/dist/cjs/types/adapter/index.d.ts.map +1 -1
- package/dist/cjs/types/adapter/types.d.ts +28 -18
- package/dist/cjs/types/adapter/types.d.ts.map +1 -1
- package/dist/cjs/types/constants.d.ts +0 -1
- package/dist/cjs/types/constants.d.ts.map +1 -1
- package/dist/cjs/types/domain.d.ts +5 -4
- package/dist/cjs/types/domain.d.ts.map +1 -1
- package/dist/cjs/types/index.d.ts +78 -55
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/model.d.ts +17 -17
- package/dist/cjs/types/model.d.ts.map +1 -1
- package/dist/cjs/types/schema/array.d.ts +168 -47
- package/dist/cjs/types/schema/array.d.ts.map +1 -1
- package/dist/cjs/types/schema/boolean.d.ts +103 -44
- package/dist/cjs/types/schema/boolean.d.ts.map +1 -1
- package/dist/cjs/types/schema/datetime.d.ts +90 -30
- package/dist/cjs/types/schema/datetime.d.ts.map +1 -1
- package/dist/cjs/types/schema/number.d.ts +133 -125
- package/dist/cjs/types/schema/number.d.ts.map +1 -1
- package/dist/cjs/types/schema/object.d.ts +104 -35
- package/dist/cjs/types/schema/object.d.ts.map +1 -1
- package/dist/cjs/types/schema/schema.d.ts +62 -44
- package/dist/cjs/types/schema/schema.d.ts.map +1 -1
- package/dist/cjs/types/schema/string.d.ts +152 -65
- package/dist/cjs/types/schema/string.d.ts.map +1 -1
- package/dist/cjs/types/schema/types.d.ts +11 -2
- package/dist/cjs/types/schema/types.d.ts.map +1 -1
- package/dist/cjs/types/schema/union.d.ts +133 -40
- package/dist/cjs/types/schema/union.d.ts.map +1 -1
- package/dist/cjs/types/types.d.ts +35 -0
- package/dist/cjs/types/types.d.ts.map +1 -1
- package/dist/cjs/types/utils.d.ts +41 -27
- package/dist/cjs/types/utils.d.ts.map +1 -1
- package/dist/cjs/types/validators/array.d.ts.map +1 -1
- package/dist/cjs/types/validators/boolean.d.ts.map +1 -1
- package/dist/cjs/types/validators/datetime.d.ts.map +1 -1
- package/dist/cjs/types/validators/number.d.ts +5 -6
- package/dist/cjs/types/validators/number.d.ts.map +1 -1
- package/dist/cjs/types/validators/object.d.ts.map +1 -1
- package/dist/cjs/types/validators/schema.d.ts +2 -2
- package/dist/cjs/types/validators/schema.d.ts.map +1 -1
- package/dist/cjs/types/validators/string.d.ts +9 -9
- package/dist/cjs/types/validators/string.d.ts.map +1 -1
- package/dist/cjs/types/validators/utils.d.ts +44 -27
- package/dist/cjs/types/validators/utils.d.ts.map +1 -1
- package/dist/esm/src/adapter/fields/index.js +2 -2
- package/dist/esm/src/adapter/fields/object.js +6 -0
- package/dist/esm/src/adapter/index.js +1 -0
- package/dist/esm/src/constants.js +1 -2
- package/dist/esm/src/domain.js +11 -1
- package/dist/esm/src/index.js +38 -73
- package/dist/esm/src/model.js +83 -78
- package/dist/esm/src/schema/array.js +136 -54
- package/dist/esm/src/schema/boolean.js +98 -44
- package/dist/esm/src/schema/datetime.js +91 -38
- package/dist/esm/src/schema/number.js +127 -110
- package/dist/esm/src/schema/object.js +98 -43
- package/dist/esm/src/schema/schema.js +102 -67
- package/dist/esm/src/schema/string.js +147 -59
- package/dist/esm/src/schema/union.js +119 -40
- package/dist/esm/src/types.js +14 -1
- package/dist/esm/src/utils.js +56 -27
- package/dist/esm/src/validators/array.js +6 -1
- package/dist/esm/src/validators/boolean.js +2 -0
- package/dist/esm/src/validators/datetime.js +4 -0
- package/dist/esm/src/validators/number.js +9 -23
- package/dist/esm/src/validators/object.js +1 -0
- package/dist/esm/src/validators/schema.js +5 -1
- package/dist/esm/src/validators/string.js +30 -2
- package/dist/esm/src/validators/union.js +5 -4
- package/dist/esm/src/validators/utils.js +62 -36
- package/package.json +3 -3
- package/src/adapter/fields/array.ts +2 -2
- package/src/adapter/fields/boolean.ts +3 -8
- package/src/adapter/fields/datetime.ts +3 -9
- package/src/adapter/fields/index.ts +11 -11
- package/src/adapter/fields/number.ts +3 -9
- package/src/adapter/fields/object.ts +13 -10
- package/src/adapter/fields/string.ts +3 -9
- package/src/adapter/fields/union.ts +3 -9
- package/src/adapter/index.ts +1 -0
- package/src/adapter/types.ts +60 -45
- package/src/constants.ts +1 -3
- package/src/domain.ts +15 -1
- package/src/index.ts +189 -211
- package/src/model.ts +119 -115
- package/src/schema/array.ts +274 -90
- package/src/schema/boolean.ts +145 -60
- package/src/schema/datetime.ts +133 -49
- package/src/schema/number.ts +210 -173
- package/src/schema/object.ts +167 -74
- package/src/schema/schema.ts +205 -126
- package/src/schema/string.ts +221 -94
- package/src/schema/types.ts +44 -16
- package/src/schema/union.ts +193 -68
- package/src/types.ts +53 -0
- package/src/utils.ts +115 -57
- package/src/validators/array.ts +46 -27
- package/src/validators/boolean.ts +13 -7
- package/src/validators/datetime.ts +24 -16
- package/src/validators/number.ts +53 -63
- package/src/validators/object.ts +6 -5
- package/src/validators/schema.ts +33 -25
- package/src/validators/string.ts +122 -59
- package/src/validators/union.ts +8 -8
- package/src/validators/utils.ts +67 -42
@@ -16,12 +16,18 @@ export default class ObjectSchema<TType extends {
|
|
16
16
|
}, TDefinitions extends DefinitionsOfSchemaType = DefinitionsOfSchemaType, TData extends Record<any, any> = Record<any, any>> extends Schema<TType, TDefinitions> {
|
17
17
|
protected __data: Record<any, Schema>;
|
18
18
|
protected __cachedDataAsEntries: [string, Schema][];
|
19
|
+
protected __type: {
|
20
|
+
message: string;
|
21
|
+
check: (value: TType['input']) => boolean;
|
22
|
+
};
|
19
23
|
constructor(data: TData);
|
20
24
|
protected __retrieveDataAsEntriesAndCache(): [string, Schema][];
|
21
25
|
protected __transformToAdapter(options: Parameters<Schema['__transformToAdapter']>[0]): Promise<ReturnType<FieldAdapter['translate']>>;
|
22
26
|
/**
|
23
|
-
* Transform the data to the representation without validating it. This is useful when you want to return a data
|
24
|
-
* from
|
27
|
+
* Transform the data to the representation without validating it. This is useful when you want to return a data
|
28
|
+
* from a query directly to the user. The core idea of this is that you can join the data from the database "by hand".
|
29
|
+
* In other words, you can do the joins by yourself directly on code. For more complex cases, this can be really
|
30
|
+
* helpful.
|
25
31
|
*
|
26
32
|
* @param value - The value to be transformed.
|
27
33
|
*
|
@@ -29,7 +35,8 @@ export default class ObjectSchema<TType extends {
|
|
29
35
|
*/
|
30
36
|
data(value: TType['output']): Promise<TType['representation']>;
|
31
37
|
/**
|
32
|
-
* This let's you refine the schema with custom validations. This is useful when you want to validate something
|
38
|
+
* This let's you refine the schema with custom validations. This is useful when you want to validate something
|
39
|
+
* that is not supported by default by the schema adapter.
|
33
40
|
*
|
34
41
|
* @example
|
35
42
|
* ```typescript
|
@@ -41,7 +48,8 @@ export default class ObjectSchema<TType extends {
|
|
41
48
|
*
|
42
49
|
* const { errors, parsed } = await numberSchema.parse(-1);
|
43
50
|
*
|
44
|
-
*
|
51
|
+
* // [{ isValid: false, code: 'invalid_number', message: 'The number should be greater than 0', path: [] }]
|
52
|
+
* console.log(errors);
|
45
53
|
* ```
|
46
54
|
*
|
47
55
|
* @param refinementCallback - The callback that will be called to validate the value.
|
@@ -62,9 +70,10 @@ export default class ObjectSchema<TType extends {
|
|
62
70
|
representation: TType["representation"];
|
63
71
|
}, TDefinitions, TData>;
|
64
72
|
/**
|
65
|
-
* Allows the value to be either undefined or null. Different from the `optional` method on other schemas, You can
|
66
|
-
* This will allow you to pass `null` or `undefined` as a value on the
|
67
|
-
* This is useful for
|
73
|
+
* Allows the value to be either undefined or null. Different from the `optional` method on other schemas, You can
|
74
|
+
* pass `outputOnly` as `true` to this method. This will allow you to pass `null` or `undefined` as a value on the
|
75
|
+
* {@link Schema.data} method, but it will not allow the value to be `null` or `undefined`. This is useful for
|
76
|
+
* typing purposes
|
68
77
|
*
|
69
78
|
* @example
|
70
79
|
* ```typescript
|
@@ -92,8 +101,11 @@ export default class ObjectSchema<TType extends {
|
|
92
101
|
* company: companySchema.optional({ outputOnly: true })
|
93
102
|
* });
|
94
103
|
*
|
95
|
-
*
|
96
|
-
* const
|
104
|
+
* // Will not allow the company to be null or undefined on a typing level.
|
105
|
+
* const { errors, parsed } = await userSchema.data({ id: 1, name: 'John Doe' });
|
106
|
+
*
|
107
|
+
* // Will allow the company to be null or undefined on a typing level
|
108
|
+
* const value = await userSchema.data({ id: 1, name: 'John Doe' });
|
97
109
|
* ```
|
98
110
|
*
|
99
111
|
* @returns - The schema we are working with.
|
@@ -116,7 +128,29 @@ export default class ObjectSchema<TType extends {
|
|
116
128
|
representation: TType["representation"] | undefined | null;
|
117
129
|
}, TDefinitions, TData>;
|
118
130
|
/**
|
119
|
-
*
|
131
|
+
* Just adds a message when the value is undefined. It's just a syntax sugar for
|
132
|
+
*
|
133
|
+
* ```typescript
|
134
|
+
* p.datetime().optional({ message: 'This value should be defined', allow: false })
|
135
|
+
* ```
|
136
|
+
*
|
137
|
+
* @param options - The options of nonOptional function
|
138
|
+
* @param options.message - A custom message if the value is undefined.
|
139
|
+
*
|
140
|
+
* @returns - The schema.
|
141
|
+
*/
|
142
|
+
nonOptional(options?: {
|
143
|
+
message: string;
|
144
|
+
}): ObjectSchema<{
|
145
|
+
input: TType["input"];
|
146
|
+
validate: TType["validate"];
|
147
|
+
internal: TType["internal"];
|
148
|
+
output: TType["output"];
|
149
|
+
representation: TType["representation"];
|
150
|
+
}, TDefinitions>;
|
151
|
+
/**
|
152
|
+
* Allows the value to be null and ONLY null. You can also use this function to set a custom message when the value
|
153
|
+
* is NULL by setting
|
120
154
|
* the { message: 'Your custom message', allow: false } on the options.
|
121
155
|
*
|
122
156
|
* @example
|
@@ -151,14 +185,38 @@ export default class ObjectSchema<TType extends {
|
|
151
185
|
representation: TType["representation"] | null;
|
152
186
|
}, TDefinitions, TData>;
|
153
187
|
/**
|
154
|
-
*
|
155
|
-
*
|
188
|
+
* Just adds a message when the value is null. It's just a syntax sugar for
|
189
|
+
*
|
190
|
+
* ```typescript
|
191
|
+
* p.datetime().nullable({ message: 'This value cannot be null', allow: false })
|
192
|
+
* ```
|
193
|
+
*
|
194
|
+
* @param options - The options of nonNullable function
|
195
|
+
* @param options.message - A custom message if the value is null.
|
196
|
+
*
|
197
|
+
* @returns - The schema.
|
198
|
+
*/
|
199
|
+
nonNullable(options?: {
|
200
|
+
message: string;
|
201
|
+
}): ObjectSchema<{
|
202
|
+
input: TType["input"];
|
203
|
+
validate: TType["validate"];
|
204
|
+
internal: TType["internal"];
|
205
|
+
output: TType["output"];
|
206
|
+
representation: TType["representation"];
|
207
|
+
}, TDefinitions>;
|
208
|
+
/**
|
209
|
+
* This method will remove the value from the representation of the schema. If the value is undefined it will keep
|
210
|
+
* that way otherwise it will set the value to undefined after it's validated.
|
156
211
|
* This is used in conjunction with the {@link data} function, the {@link parse} function or {@link validate}
|
157
212
|
* function. This will remove the value from the representation of the schema.
|
158
213
|
*
|
159
|
-
* By default, the value will be removed just from the representation, in other words, when you call the {@link data}
|
160
|
-
*
|
161
|
-
*
|
214
|
+
* By default, the value will be removed just from the representation, in other words, when you call the {@link data}
|
215
|
+
* function.
|
216
|
+
* But if you want to remove the value from the internal representation, you can pass the argument `toInternal`
|
217
|
+
* as true.
|
218
|
+
* Then if you still want to remove the value from the representation, you will need to pass the argument
|
219
|
+
* `toRepresentation` as true as well.
|
162
220
|
*
|
163
221
|
* @example
|
164
222
|
* ```typescript
|
@@ -180,9 +238,12 @@ export default class ObjectSchema<TType extends {
|
|
180
238
|
* ```
|
181
239
|
*
|
182
240
|
*
|
183
|
-
* @param args - By default, the value will be removed just from the representation, in other words, when you call
|
184
|
-
*
|
185
|
-
*
|
241
|
+
* @param args - By default, the value will be removed just from the representation, in other words, when you call
|
242
|
+
* the {@link data} function.
|
243
|
+
* But if you want to remove the value from the internal representation, you can pass the argument `toInternal`
|
244
|
+
* as true.
|
245
|
+
* Then if you still want to remove the value from the representation, you will need to pass the argument
|
246
|
+
* `toRepresentation` as true as well.
|
186
247
|
*
|
187
248
|
* @returns The schema.
|
188
249
|
*/
|
@@ -197,9 +258,9 @@ export default class ObjectSchema<TType extends {
|
|
197
258
|
representation: TToRepresentation extends true ? undefined : TType["representation"];
|
198
259
|
}, TDefinitions, TData>;
|
199
260
|
/**
|
200
|
-
* This function is used in conjunction with the {@link validate} function. It's used to save a value to an external
|
201
|
-
* like a database. You should always return the schema after you save the value, that way we will always have
|
202
|
-
* of the schema after the save operation.
|
261
|
+
* This function is used in conjunction with the {@link validate} function. It's used to save a value to an external
|
262
|
+
* source like a database. You should always return the schema after you save the value, that way we will always have
|
263
|
+
* the correct type of the schema after the save operation.
|
203
264
|
*
|
204
265
|
* You can use the {@link toRepresentation} function to transform and clean the value it returns after the save.
|
205
266
|
*
|
@@ -248,7 +309,8 @@ export default class ObjectSchema<TType extends {
|
|
248
309
|
hasSave: true;
|
249
310
|
}, TData>;
|
250
311
|
/**
|
251
|
-
* This function is used to add a default value to the schema. If the value is either undefined or null, the default
|
312
|
+
* This function is used to add a default value to the schema. If the value is either undefined or null, the default
|
313
|
+
* value will be used.
|
252
314
|
*
|
253
315
|
* @example
|
254
316
|
* ```typescript
|
@@ -269,8 +331,9 @@ export default class ObjectSchema<TType extends {
|
|
269
331
|
representation: TType["representation"];
|
270
332
|
}, TDefinitions, TData>;
|
271
333
|
/**
|
272
|
-
* This function let's you customize the schema your own way. After we translate the schema on the adapter we call
|
273
|
-
* the custom schema your own way. Our API does not support passthrough?
|
334
|
+
* This function let's you customize the schema your own way. After we translate the schema on the adapter we call
|
335
|
+
* this function to let you customize the custom schema your own way. Our API does not support passthrough?
|
336
|
+
* No problem, you can use this function to customize the zod schema.
|
274
337
|
*
|
275
338
|
* @example
|
276
339
|
* ```typescript
|
@@ -282,19 +345,21 @@ export default class ObjectSchema<TType extends {
|
|
282
345
|
*
|
283
346
|
* const { errors, parsed } = await numberSchema.parse(-1);
|
284
347
|
*
|
285
|
-
*
|
348
|
+
* // [{ isValid: false, code: 'nonnegative', message: 'The number should be nonnegative', path: [] }]
|
349
|
+
* console.log(errors);
|
286
350
|
* ```
|
287
351
|
*
|
288
352
|
* @param callback - The callback that will be called to customize the schema.
|
289
|
-
* @param toStringCallback - The callback that will be called to transform the schema to a string when you want to
|
290
|
-
* to a string so you can save it for future runs.
|
353
|
+
* @param toStringCallback - The callback that will be called to transform the schema to a string when you want to
|
354
|
+
* compile the underlying schema to a string so you can save it for future runs.
|
291
355
|
*
|
292
356
|
* @returns The schema.
|
293
357
|
*/
|
294
358
|
extends(callback: (schema: Awaited<ReturnType<NonNullable<TDefinitions['schemaAdapter']['object']>['translate']>>) => Awaited<ReturnType<NonNullable<TDefinitions['schemaAdapter']['field']>['translate']>> | any, toStringCallback?: (schemaAsString: string) => string): this;
|
295
359
|
/**
|
296
|
-
* This function is used to transform the value to the representation of the schema. When using the {@link data}
|
297
|
-
* control to add data cleaning for example, transforming the data and
|
360
|
+
* This function is used to transform the value to the representation of the schema. When using the {@link data}
|
361
|
+
* function. With this function you have full control to add data cleaning for example, transforming the data and
|
362
|
+
* whatever. Another use case is when you want to return deeply nested recursive data.
|
298
363
|
* The schema maps to itself.
|
299
364
|
*
|
300
365
|
* @example
|
@@ -333,8 +398,10 @@ export default class ObjectSchema<TType extends {
|
|
333
398
|
* ```
|
334
399
|
* @param toRepresentationCallback - The callback that will be called to transform the value to the representation.
|
335
400
|
* @param options - Options for the toRepresentation function.
|
336
|
-
* @param options.after - Whether the toRepresentationCallback should be called after the existing
|
337
|
-
*
|
401
|
+
* @param options.after - Whether the toRepresentationCallback should be called after the existing
|
402
|
+
* toRepresentationCallback. Defaults to true.
|
403
|
+
* @param options.before - Whether the toRepresentationCallback should be called before the existing
|
404
|
+
* toRepresentationCallback. Defaults to true.
|
338
405
|
*
|
339
406
|
* @returns The schema with a new return type
|
340
407
|
*/
|
@@ -349,8 +416,9 @@ export default class ObjectSchema<TType extends {
|
|
349
416
|
representation: TRepresentation;
|
350
417
|
}, TDefinitions, TData>;
|
351
418
|
/**
|
352
|
-
* This function is used to transform the value to the internal representation of the schema. This is useful when
|
353
|
-
* to a type that the schema adapter can understand. For example, you might want
|
419
|
+
* This function is used to transform the value to the internal representation of the schema. This is useful when
|
420
|
+
* you want to transform the value to a type that the schema adapter can understand. For example, you might want
|
421
|
+
* to transform a string to a date. This is the function you use.
|
354
422
|
*
|
355
423
|
* @example
|
356
424
|
* ```typescript
|
@@ -388,8 +456,9 @@ export default class ObjectSchema<TType extends {
|
|
388
456
|
representation: TType["representation"];
|
389
457
|
}, TDefinitions, TData>;
|
390
458
|
/**
|
391
|
-
* Called before the validation of the schema. Let's say that you want to validate a date that might receive a string,
|
392
|
-
* here BEFORE the validation. This pretty much transforms the value to a type
|
459
|
+
* Called before the validation of the schema. Let's say that you want to validate a date that might receive a string,
|
460
|
+
* you can convert that string to a date here BEFORE the validation. This pretty much transforms the value to a type
|
461
|
+
* that the schema adapter can understand.
|
393
462
|
*
|
394
463
|
* @example
|
395
464
|
* ```
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../../src/schema/object.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../../src/schema/object.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAS9B,OAAO,KAAK,EAAE,uBAAuB,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC;AACvF,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAElD,MAAM,CAAC,OAAO,OAAO,YAAY,CAC/B,KAAK,SAAS;IACZ,KAAK,EAAE,GAAG,CAAC;IACX,QAAQ,EAAE,GAAG,CAAC;IACd,QAAQ,EAAE,GAAG,CAAC;IACd,cAAc,EAAE,GAAG,CAAC;IACpB,MAAM,EAAE,GAAG,CAAC;CACb,GAAG;IACF,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;CAClC,EACD,YAAY,SAAS,uBAAuB,GAAG,uBAAuB,EACtE,KAAK,SAAS,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC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AC;KACzC,EACD,YAAY,EACZ,KAAK,CACN;IAGH;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,gBAAgB;IAuBhB,MAAM,CAAC,GAAG,CACR,KAAK,SAAS,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC,EACpD,YAAY,SAAS,uBAAuB,GAAG,uBAAuB,EACtE,IAAI,EAAE,KAAK;eAGA,8BAA8B,CAAC,KAAK,EAAE,OAAO,CAAC;kBAC3C,8BAA8B,CAAC,KAAK,EAAE,UAAU,CAAC;kBACjD,8BAA8B,CAAC,KAAK,EAAE,UAAU,CAAC;wBAC3C,8BAA8B,CAAC,KAAK,EAAE,gBAAgB,CAAC;gBAC/D,8BAA8B,CAAC,KAAK,EAAE,QAAQ,CAAC;;CAQ9D;AAED,eAAO,MAAM,MAAM,yBAAmB,CAAC"}
|
@@ -19,10 +19,10 @@ export default class Schema<TType extends {
|
|
19
19
|
protected __beforeValidationCallbacks: Map<string, (adapterToUse: SchemaAdapter, fieldAdapter: FieldAdapter, schema: Schema<any, any> & {
|
20
20
|
__validateByAdapter: Schema<any, any>['__validateByAdapter'];
|
21
21
|
}, translatedSchemas: any[], value: TType['input'], path: ValidationFallbackCallbackReturnType['errors'][number]['path'], options: Parameters<Schema['__transformToAdapter']>[0]) => ReturnType<Schema['__validateByAdapter']>>;
|
22
|
-
protected __cachedGetParent?: (
|
23
|
-
protected set __getParent(value: (
|
22
|
+
protected __cachedGetParent?: () => Schema<any, any>;
|
23
|
+
protected set __getParent(value: () => Schema<any, any>);
|
24
24
|
protected get __getParent(): (() => Schema<any, any>) | undefined;
|
25
|
-
protected __alreadyAppliedModel
|
25
|
+
protected __alreadyAppliedModel?: Promise<any>;
|
26
26
|
protected __runBeforeParseAndData?: (self: any) => Promise<void>;
|
27
27
|
protected __rootFallbacksValidator: Validator;
|
28
28
|
protected __saveCallback?: (value: any) => Promise<any | void> | any | void;
|
@@ -68,8 +68,10 @@ export default class Schema<TType extends {
|
|
68
68
|
message: string;
|
69
69
|
check: (value: TType['input']) => boolean;
|
70
70
|
};
|
71
|
+
protected __getDefaultTransformedSchemas(): void;
|
71
72
|
/**
|
72
|
-
* This will validate the data with the fallbacks, so internally, without relaying on the schema adapter.
|
73
|
+
* This will validate the data with the fallbacks, so internally, without relaying on the schema adapter.
|
74
|
+
* This is nice because we can support things that the schema adapter is not able to support by default.
|
73
75
|
*
|
74
76
|
* @param errorsAsHashedSet - The errors as a hashed set. This is used to prevent duplicate errors.
|
75
77
|
* @param path - The path of the error.
|
@@ -77,9 +79,11 @@ export default class Schema<TType extends {
|
|
77
79
|
*/
|
78
80
|
private __validateByFallbacks;
|
79
81
|
/**
|
80
|
-
* This will validate by the adapter. In other words, we send the data to the schema adapter and then we validate
|
81
|
-
*
|
82
|
-
*
|
82
|
+
* This will validate by the adapter. In other words, we send the data to the schema adapter and then we validate
|
83
|
+
* that data.
|
84
|
+
* So understand that, first we send the data to the adapter, the adapter validates it, then, after we validate
|
85
|
+
* from the adapter we validate with the fallbacks so we can do all of the extra validations not handled by
|
86
|
+
* the adapter.
|
83
87
|
*
|
84
88
|
* @param value - The value to be validated.
|
85
89
|
* @param errorsAsHashedSet - The errors as a hashed set. This is used to prevent duplicate errors on the validator.
|
@@ -99,7 +103,7 @@ export default class Schema<TType extends {
|
|
99
103
|
schemaAdapter?: SchemaAdapter;
|
100
104
|
errorsAsHashedSet?: Set<string>;
|
101
105
|
shouldAddStringVersion?: boolean;
|
102
|
-
appendFallbacksBeforeAdapterValidation?: (uniqueNameOfFallback: string, fallbackValidationBeforeAdapter: (adapterToUse: SchemaAdapter, fieldAdapter: FieldAdapter, schema: Omit<Schema<any, any>, '__validateByAdapter'> & {
|
106
|
+
appendFallbacksBeforeAdapterValidation?: (schema: Schema<any, any>, uniqueNameOfFallback: string, fallbackValidationBeforeAdapter: (adapterToUse: SchemaAdapter, fieldAdapter: FieldAdapter, schema: Omit<Schema<any, any>, '__validateByAdapter'> & {
|
103
107
|
__validateByAdapter: Schema<any, any>['__validateByAdapter'];
|
104
108
|
}, translatedSchemas: any[], value: any, path: ValidationFallbackCallbackReturnType['errors'][number]['path'], options: Parameters<Schema['__transformToAdapter']>[0]) => ReturnType<Schema['__validateByAdapter']>) => void;
|
105
109
|
}): Promise<{
|
@@ -113,7 +117,8 @@ export default class Schema<TType extends {
|
|
113
117
|
parsed: TType['internal'];
|
114
118
|
}>;
|
115
119
|
/**
|
116
|
-
* This let's you refine the schema with custom validations. This is useful when you want to validate something
|
120
|
+
* This let's you refine the schema with custom validations. This is useful when you want to validate something
|
121
|
+
* that is not supported by default by the schema adapter.
|
117
122
|
*
|
118
123
|
* @example
|
119
124
|
* ```typescript
|
@@ -125,7 +130,8 @@ export default class Schema<TType extends {
|
|
125
130
|
*
|
126
131
|
* const { errors, parsed } = await numberSchema.parse(-1);
|
127
132
|
*
|
128
|
-
* console.log(errors);
|
133
|
+
* console.log(errors);
|
134
|
+
* // [{ isValid: false, code: 'invalid_number', message: 'The number should be greater than 0', path: [] }]
|
129
135
|
* ```
|
130
136
|
*
|
131
137
|
* @param refinementCallback - The callback that will be called to validate the value.
|
@@ -180,8 +186,8 @@ export default class Schema<TType extends {
|
|
180
186
|
representation: TType["representation"] | undefined | null;
|
181
187
|
}, TDefinitions>;
|
182
188
|
/**
|
183
|
-
* Allows the value to be null and ONLY null. You can also use this function to set a custom message when
|
184
|
-
* the { message: 'Your custom message', allow: false } on the options.
|
189
|
+
* Allows the value to be null and ONLY null. You can also use this function to set a custom message when
|
190
|
+
* the value is NULL by setting the { message: 'Your custom message', allow: false } on the options.
|
185
191
|
*
|
186
192
|
* @example
|
187
193
|
* ```typescript
|
@@ -217,8 +223,8 @@ export default class Schema<TType extends {
|
|
217
223
|
/**
|
218
224
|
* Appends a custom schema to the schema, this way it will bypass the creation of the schema in runtime.
|
219
225
|
*
|
220
|
-
* By default when validating, on the first validation we create the schema. Just during the first validation.
|
221
|
-
* so you can speed up the validation process.
|
226
|
+
* By default when validating, on the first validation we create the schema. Just during the first validation.
|
227
|
+
* With this function, you bypass that, so you can speed up the validation process.
|
222
228
|
*
|
223
229
|
* @example
|
224
230
|
* ```typescript
|
@@ -246,14 +252,15 @@ export default class Schema<TType extends {
|
|
246
252
|
representation: TType;
|
247
253
|
}, TDefinitions>;
|
248
254
|
/**
|
249
|
-
* This method will remove the value from the representation of the schema. If the value is undefined it will keep
|
250
|
-
* otherwise it will set the value to undefined after it's validated.
|
255
|
+
* This method will remove the value from the representation of the schema. If the value is undefined it will keep
|
256
|
+
* that way otherwise it will set the value to undefined after it's validated.
|
251
257
|
* This is used in conjunction with the {@link data} function, the {@link parse} function or {@link validate}
|
252
258
|
* function. This will remove the value from the representation of the schema.
|
253
259
|
*
|
254
|
-
* By default, the value will be removed just from the representation, in other words, when you call the {@link data}
|
255
|
-
* But if you want to remove the value from the internal representation, you can pass the argument
|
256
|
-
* Then if you still want to remove the value from the representation, you will need to pass
|
260
|
+
* By default, the value will be removed just from the representation, in other words, when you call the {@link data}
|
261
|
+
* function. But if you want to remove the value from the internal representation, you can pass the argument
|
262
|
+
* `toInternal` as true. Then if you still want to remove the value from the representation, you will need to pass
|
263
|
+
* the argument `toRepresentation` as true as well.
|
257
264
|
*
|
258
265
|
* @example
|
259
266
|
* ```typescript
|
@@ -275,9 +282,11 @@ export default class Schema<TType extends {
|
|
275
282
|
* ```
|
276
283
|
*
|
277
284
|
*
|
278
|
-
* @param args - By default, the value will be removed just from the representation, in other words, when you call
|
279
|
-
*
|
280
|
-
*
|
285
|
+
* @param args - By default, the value will be removed just from the representation, in other words, when you call
|
286
|
+
* the {@link data} function.
|
287
|
+
* But if you want to remove the value from the internal representation, you can pass the argument `toInternal`
|
288
|
+
* as true. Then if you still want to remove the value from the representation, you will need to pass the
|
289
|
+
* argument `toRepresentation` as true as well.
|
281
290
|
*
|
282
291
|
* @returns The schema.
|
283
292
|
*/
|
@@ -292,9 +301,9 @@ export default class Schema<TType extends {
|
|
292
301
|
representation: TToRepresentation extends true ? undefined : TType["representation"];
|
293
302
|
}, TDefinitions>;
|
294
303
|
/**
|
295
|
-
* This function is used in conjunction with the {@link validate} function. It's used to save a value to an external
|
296
|
-
* like a database. You should always return the schema after you save the value, that way we will always have
|
297
|
-
* of the schema after the save operation.
|
304
|
+
* This function is used in conjunction with the {@link validate} function. It's used to save a value to an external
|
305
|
+
* source like a database. You should always return the schema after you save the value, that way we will always have
|
306
|
+
* the correct type of the schema after the save operation.
|
298
307
|
*
|
299
308
|
* You can use the {@link toRepresentation} function to transform and clean the value it returns after the save.
|
300
309
|
*
|
@@ -346,10 +355,11 @@ export default class Schema<TType extends {
|
|
346
355
|
* This function is used to validate the schema and save the value to the database. It is used in
|
347
356
|
* conjunction with the {@link onSave} function.
|
348
357
|
*
|
349
|
-
* Different from other validation libraries, palmares schemas is aware that you want to save. On your
|
350
|
-
* we recommend to ALWAYS use this function instead of {@link parse} directly. This is because
|
351
|
-
* will return an object with the property `save` or the `errors`. If the errors are present,
|
352
|
-
* to the user. If the save property is present, you can use to save the value to an
|
358
|
+
* Different from other validation libraries, palmares schemas is aware that you want to save. On your
|
359
|
+
* routes/functions we recommend to ALWAYS use this function instead of {@link parse} directly. This is because
|
360
|
+
* this function by default will return an object with the property `save` or the `errors`. If the errors are present,
|
361
|
+
* you can return the errors to the user. If the save property is present, you can use to save the value to an
|
362
|
+
* external source. e.g. a database.
|
353
363
|
*
|
354
364
|
* @example
|
355
365
|
* ```typescript
|
@@ -464,7 +474,8 @@ export default class Schema<TType extends {
|
|
464
474
|
representation: TType["representation"];
|
465
475
|
}, TDefinitions>;
|
466
476
|
/**
|
467
|
-
* This function is used to add a default value to the schema. If the value is either undefined or null,
|
477
|
+
* This function is used to add a default value to the schema. If the value is either undefined or null,
|
478
|
+
* the default value will be used.
|
468
479
|
*
|
469
480
|
* @example
|
470
481
|
* ```typescript
|
@@ -485,8 +496,9 @@ export default class Schema<TType extends {
|
|
485
496
|
representation: TType["representation"];
|
486
497
|
}, TDefinitions>;
|
487
498
|
/**
|
488
|
-
* This function let's you customize the schema your own way. After we translate the schema on the adapter we call
|
489
|
-
* the custom schema your own way. Our API does not support passthrough?
|
499
|
+
* This function let's you customize the schema your own way. After we translate the schema on the adapter we call
|
500
|
+
* this function to let you customize the custom schema your own way. Our API does not support passthrough?
|
501
|
+
* No problem, you can use this function to customize the zod schema.
|
490
502
|
*
|
491
503
|
* @example
|
492
504
|
* ```typescript
|
@@ -498,19 +510,21 @@ export default class Schema<TType extends {
|
|
498
510
|
*
|
499
511
|
* const { errors, parsed } = await numberSchema.parse(-1);
|
500
512
|
*
|
501
|
-
* console.log(errors);
|
513
|
+
* console.log(errors);
|
514
|
+
* // [{ isValid: false, code: 'nonnegative', message: 'The number should be nonnegative', path: [] }]
|
502
515
|
* ```
|
503
516
|
*
|
504
517
|
* @param callback - The callback that will be called to customize the schema.
|
505
|
-
* @param toStringCallback - The callback that will be called to transform the schema to a string when you want
|
506
|
-
* to a string so you can save it for future runs.
|
518
|
+
* @param toStringCallback - The callback that will be called to transform the schema to a string when you want
|
519
|
+
* to compile the underlying schema to a string so you can save it for future runs.
|
507
520
|
*
|
508
521
|
* @returns The schema.
|
509
522
|
*/
|
510
523
|
extends(callback: (schema: Awaited<ReturnType<NonNullable<TDefinitions['schemaAdapter'][TDefinitions['schemaType']]>['translate']>>) => Awaited<ReturnType<NonNullable<TDefinitions['schemaAdapter'][TDefinitions['schemaType']]>['translate']>>, toStringCallback?: (schemaAsString: string) => string): this;
|
511
524
|
/**
|
512
|
-
* This function is used to transform the value to the representation of the schema. When using the {@link data}
|
513
|
-
* control to add data cleaning for example, transforming the data
|
525
|
+
* This function is used to transform the value to the representation of the schema. When using the {@link data}
|
526
|
+
* function. With this function you have full control to add data cleaning for example, transforming the data
|
527
|
+
* and whatever. Another use case is when you want to return deeply nested recursive data.
|
514
528
|
* The schema maps to itself.
|
515
529
|
*
|
516
530
|
* @example
|
@@ -549,12 +563,14 @@ export default class Schema<TType extends {
|
|
549
563
|
* ```
|
550
564
|
* @param toRepresentationCallback - The callback that will be called to transform the value to the representation.
|
551
565
|
* @param options - Options for the toRepresentation function.
|
552
|
-
* @param options.after - Whether the toRepresentationCallback should be called after the existing
|
553
|
-
*
|
566
|
+
* @param options.after - Whether the toRepresentationCallback should be called after the existing
|
567
|
+
* toRepresentationCallback. Defaults to true.
|
568
|
+
* @param options.before - Whether the toRepresentationCallback should be called before the existing
|
569
|
+
* toRepresentationCallback. Defaults to true.
|
554
570
|
*
|
555
571
|
* @returns The schema with a new return type
|
556
572
|
*/
|
557
|
-
toRepresentation<TRepresentation>(toRepresentationCallback: (value: TType['representation']) => Promise<TRepresentation
|
573
|
+
toRepresentation<TRepresentation>(toRepresentationCallback: (value: TType['representation']) => Promise<TRepresentation> | TRepresentation, options?: {
|
558
574
|
after?: boolean;
|
559
575
|
before?: boolean;
|
560
576
|
}): Schema<{
|
@@ -565,8 +581,9 @@ export default class Schema<TType extends {
|
|
565
581
|
representation: TRepresentation;
|
566
582
|
}, TDefinitions>;
|
567
583
|
/**
|
568
|
-
* This function is used to transform the value to the internal representation of the schema. This is useful
|
569
|
-
* to a type that the schema adapter can understand. For example, you
|
584
|
+
* This function is used to transform the value to the internal representation of the schema. This is useful
|
585
|
+
* when you want to transform the value to a type that the schema adapter can understand. For example, you
|
586
|
+
* might want to transform a string to a date. This is the function you use.
|
570
587
|
*
|
571
588
|
* @example
|
572
589
|
* ```typescript
|
@@ -604,8 +621,9 @@ export default class Schema<TType extends {
|
|
604
621
|
representation: TType["representation"];
|
605
622
|
}, TDefinitions>;
|
606
623
|
/**
|
607
|
-
* Called before the validation of the schema. Let's say that you want to validate a date that might receive a
|
608
|
-
* here BEFORE the validation. This pretty much transforms the value
|
624
|
+
* Called before the validation of the schema. Let's say that you want to validate a date that might receive a
|
625
|
+
* string, you can convert that string to a date here BEFORE the validation. This pretty much transforms the value
|
626
|
+
* to a type that the schema adapter can understand.
|
609
627
|
*
|
610
628
|
* @example
|
611
629
|
* ```
|
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