@drax/crud-back 1.4.0 → 2.0.0
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import z from 'zod';
|
|
1
|
+
import { z, type ZodTypeAny } from 'zod';
|
|
2
2
|
export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCreate extends z.ZodObject<z.ZodRawShape>, TUpdate extends z.ZodObject<z.ZodRawShape>> {
|
|
3
3
|
private entitySchema;
|
|
4
4
|
private entityCreateSchema;
|
|
@@ -7,6 +7,9 @@ export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCr
|
|
|
7
7
|
private tags;
|
|
8
8
|
private target;
|
|
9
9
|
constructor(entitySchema: T, entityCreateSchema: TCreate, entityUpdateSchema: TUpdate, entityName: string, target?: string, tags?: string[]);
|
|
10
|
+
private getTypeName;
|
|
11
|
+
fieldAdapter(field: unknown): ZodTypeAny;
|
|
12
|
+
schemaAdapter<TObj extends z.ZodObject<z.ZodRawShape>>(entitySchema: TObj): TObj;
|
|
10
13
|
get getTags(): any[] | {
|
|
11
14
|
tags: string[];
|
|
12
15
|
};
|
|
@@ -210,9 +213,7 @@ export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCr
|
|
|
210
213
|
flat?: boolean;
|
|
211
214
|
[Symbol.iterator]?: boolean;
|
|
212
215
|
readonly [Symbol.unscopables]?: boolean;
|
|
213
|
-
at?: boolean;
|
|
214
216
|
};
|
|
215
|
-
at(index: number): any;
|
|
216
217
|
} | {
|
|
217
218
|
query: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
218
219
|
orderBy: z.ZodOptional<z.ZodString>;
|
|
@@ -370,9 +371,7 @@ export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCr
|
|
|
370
371
|
flat?: boolean;
|
|
371
372
|
[Symbol.iterator]?: boolean;
|
|
372
373
|
readonly [Symbol.unscopables]?: boolean;
|
|
373
|
-
at?: boolean;
|
|
374
374
|
};
|
|
375
|
-
at(index: number): any;
|
|
376
375
|
} | {
|
|
377
376
|
params: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
378
377
|
id: z.ZodString;
|
|
@@ -519,9 +518,7 @@ export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCr
|
|
|
519
518
|
flat?: boolean;
|
|
520
519
|
[Symbol.iterator]?: boolean;
|
|
521
520
|
readonly [Symbol.unscopables]?: boolean;
|
|
522
|
-
at?: boolean;
|
|
523
521
|
};
|
|
524
|
-
at(index: number): any;
|
|
525
522
|
} | {
|
|
526
523
|
params: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
527
524
|
ids: z.ZodString;
|
|
@@ -668,9 +665,7 @@ export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCr
|
|
|
668
665
|
flat?: boolean;
|
|
669
666
|
[Symbol.iterator]?: boolean;
|
|
670
667
|
readonly [Symbol.unscopables]?: boolean;
|
|
671
|
-
at?: boolean;
|
|
672
668
|
};
|
|
673
|
-
at(index: number): any;
|
|
674
669
|
} | {
|
|
675
670
|
query: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
676
671
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -820,9 +815,7 @@ export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCr
|
|
|
820
815
|
flat?: boolean;
|
|
821
816
|
[Symbol.iterator]?: boolean;
|
|
822
817
|
readonly [Symbol.unscopables]?: boolean;
|
|
823
|
-
at?: boolean;
|
|
824
818
|
};
|
|
825
|
-
at(index: number): any;
|
|
826
819
|
} | {
|
|
827
820
|
query: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
828
821
|
fields: z.ZodArray<z.ZodString>;
|
|
@@ -978,9 +971,7 @@ export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCr
|
|
|
978
971
|
flat?: boolean;
|
|
979
972
|
[Symbol.iterator]?: boolean;
|
|
980
973
|
readonly [Symbol.unscopables]?: boolean;
|
|
981
|
-
at?: boolean;
|
|
982
974
|
};
|
|
983
|
-
at(index: number): any;
|
|
984
975
|
} | {
|
|
985
976
|
query: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
986
977
|
orderBy: z.ZodOptional<z.ZodString>;
|
|
@@ -1139,9 +1130,7 @@ export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCr
|
|
|
1139
1130
|
flat?: boolean;
|
|
1140
1131
|
[Symbol.iterator]?: boolean;
|
|
1141
1132
|
readonly [Symbol.unscopables]?: boolean;
|
|
1142
|
-
at?: boolean;
|
|
1143
1133
|
};
|
|
1144
|
-
at(index: number): any;
|
|
1145
1134
|
} | {
|
|
1146
1135
|
params: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
1147
1136
|
orderBy: z.ZodOptional<z.ZodString>;
|
|
@@ -1289,9 +1278,7 @@ export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCr
|
|
|
1289
1278
|
flat?: boolean;
|
|
1290
1279
|
[Symbol.iterator]?: boolean;
|
|
1291
1280
|
readonly [Symbol.unscopables]?: boolean;
|
|
1292
|
-
at?: boolean;
|
|
1293
1281
|
};
|
|
1294
|
-
at(index: number): any;
|
|
1295
1282
|
} | {
|
|
1296
1283
|
params: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
1297
1284
|
value: z.ZodString;
|
|
@@ -1428,9 +1415,7 @@ export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCr
|
|
|
1428
1415
|
flat?: boolean;
|
|
1429
1416
|
[Symbol.iterator]?: boolean;
|
|
1430
1417
|
readonly [Symbol.unscopables]?: boolean;
|
|
1431
|
-
at?: boolean;
|
|
1432
1418
|
};
|
|
1433
|
-
at(index: number): any;
|
|
1434
1419
|
} | {
|
|
1435
1420
|
params: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
1436
1421
|
value: z.ZodString;
|
|
@@ -1585,9 +1570,7 @@ export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCr
|
|
|
1585
1570
|
flat?: boolean;
|
|
1586
1571
|
[Symbol.iterator]?: boolean;
|
|
1587
1572
|
readonly [Symbol.unscopables]?: boolean;
|
|
1588
|
-
at?: boolean;
|
|
1589
1573
|
};
|
|
1590
|
-
at(index: number): any;
|
|
1591
1574
|
} | {
|
|
1592
1575
|
query: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
1593
1576
|
page: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1738,9 +1721,7 @@ export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCr
|
|
|
1738
1721
|
flat?: boolean;
|
|
1739
1722
|
[Symbol.iterator]?: boolean;
|
|
1740
1723
|
readonly [Symbol.unscopables]?: boolean;
|
|
1741
|
-
at?: boolean;
|
|
1742
1724
|
};
|
|
1743
|
-
at(index: number): any;
|
|
1744
1725
|
} | {
|
|
1745
1726
|
response: {
|
|
1746
1727
|
200: z.core.ZodStandardJSONSchemaPayload<z.ZodArray<T>>;
|
|
@@ -1881,9 +1862,7 @@ export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCr
|
|
|
1881
1862
|
flat?: boolean;
|
|
1882
1863
|
[Symbol.iterator]?: boolean;
|
|
1883
1864
|
readonly [Symbol.unscopables]?: boolean;
|
|
1884
|
-
at?: boolean;
|
|
1885
1865
|
};
|
|
1886
|
-
at(index: number): any;
|
|
1887
1866
|
} | {
|
|
1888
1867
|
body: z.core.ZodStandardJSONSchemaPayload<TCreate>;
|
|
1889
1868
|
response: {
|
|
@@ -2039,9 +2018,7 @@ export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCr
|
|
|
2039
2018
|
flat?: boolean;
|
|
2040
2019
|
[Symbol.iterator]?: boolean;
|
|
2041
2020
|
readonly [Symbol.unscopables]?: boolean;
|
|
2042
|
-
at?: boolean;
|
|
2043
2021
|
};
|
|
2044
|
-
at(index: number): any;
|
|
2045
2022
|
} | {
|
|
2046
2023
|
params: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
2047
2024
|
id: z.ZodString;
|
|
@@ -2202,9 +2179,7 @@ export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCr
|
|
|
2202
2179
|
flat?: boolean;
|
|
2203
2180
|
[Symbol.iterator]?: boolean;
|
|
2204
2181
|
readonly [Symbol.unscopables]?: boolean;
|
|
2205
|
-
at?: boolean;
|
|
2206
2182
|
};
|
|
2207
|
-
at(index: number): any;
|
|
2208
2183
|
} | {
|
|
2209
2184
|
params: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
2210
2185
|
id: z.ZodString;
|
|
@@ -2364,9 +2339,7 @@ export declare class CrudSchemaBuilder<T extends z.ZodObject<z.ZodRawShape>, TCr
|
|
|
2364
2339
|
flat?: boolean;
|
|
2365
2340
|
[Symbol.iterator]?: boolean;
|
|
2366
2341
|
readonly [Symbol.unscopables]?: boolean;
|
|
2367
|
-
at?: boolean;
|
|
2368
2342
|
};
|
|
2369
|
-
at(index: number): any;
|
|
2370
2343
|
} | {
|
|
2371
2344
|
params: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
2372
2345
|
id: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudSchemaBuilder.d.ts","sourceRoot":"","sources":["../../src/builders/CrudSchemaBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"CrudSchemaBuilder.d.ts","sourceRoot":"","sources":["../../src/builders/CrudSchemaBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,UAAU,EAAE,MAAM,KAA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