@oak-digital/types-4-strapi-2 1.0.2 → 1.0.4
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/.github/workflows/publish.yml +2 -0
- package/README.md +1 -3
- package/lib/attributes/Attributes.js +4 -2
- package/lib/events/index.d.ts +2 -2
- package/lib/events/index.js +1 -1
- package/lib/file/File.d.ts +1 -1
- package/lib/interface/builtinInterfaces.d.ts +290 -108
- package/lib/interface/builtinInterfaces.js +1 -1
- package/lib/plugins/PluginManager.d.ts +3 -3
- package/lib/plugins/types.d.ts +2 -2
- package/lib/program/InterfaceManager.d.ts +33 -5
- package/lib/readers/by-file.d.ts +32 -4
- package/lib/readers/load-strapi/index.d.ts +33 -4
- package/lib/readers/types/attributes.d.ts +1055 -125
- package/lib/readers/types/attributes.js +28 -14
- package/lib/readers/types/component.d.ts +107 -37
- package/lib/readers/types/content-type-reader.d.ts +1 -1
- package/lib/readers/types/content-type.d.ts +108 -38
- package/lib/utils/casing/index.d.ts +1 -1
- package/lib/writers/basic-writer.d.ts +1 -1
- package/package.json +5 -3
|
@@ -2,22 +2,22 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const strapiContentType: z.ZodObject<{
|
|
3
3
|
attributes: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
4
4
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
-
pluginOptions: z.ZodAny
|
|
5
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
6
6
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
7
7
|
type: z.ZodEnum<["text", "string"]>;
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
9
9
|
__t4s_required?: boolean;
|
|
10
10
|
pluginOptions?: any;
|
|
11
11
|
required?: boolean;
|
|
12
|
-
type?: "
|
|
12
|
+
type?: "string" | "text";
|
|
13
13
|
}, {
|
|
14
14
|
__t4s_required?: boolean;
|
|
15
15
|
pluginOptions?: any;
|
|
16
16
|
required?: boolean;
|
|
17
|
-
type?: "
|
|
17
|
+
type?: "string" | "text";
|
|
18
18
|
}>, z.ZodObject<{
|
|
19
19
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
-
pluginOptions: z.ZodAny
|
|
20
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
21
21
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
22
22
|
type: z.ZodLiteral<"email">;
|
|
23
23
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -32,7 +32,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
32
32
|
type?: "email";
|
|
33
33
|
}>, z.ZodObject<{
|
|
34
34
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
-
pluginOptions: z.ZodAny
|
|
35
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
36
36
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
37
37
|
type: z.ZodLiteral<"uid">;
|
|
38
38
|
targetField: z.ZodOptional<z.ZodString>;
|
|
@@ -50,7 +50,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
50
50
|
targetField?: string;
|
|
51
51
|
}>, z.ZodObject<{
|
|
52
52
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
-
pluginOptions: z.ZodAny
|
|
53
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
54
54
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
55
55
|
type: z.ZodLiteral<"richtext">;
|
|
56
56
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -65,7 +65,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
65
65
|
type?: "richtext";
|
|
66
66
|
}>, z.ZodObject<{
|
|
67
67
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
68
|
-
pluginOptions: z.ZodAny
|
|
68
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
69
69
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
70
70
|
type: z.ZodLiteral<"json">;
|
|
71
71
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -80,7 +80,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
80
80
|
type?: "json";
|
|
81
81
|
}>, z.ZodObject<{
|
|
82
82
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
-
pluginOptions: z.ZodAny
|
|
83
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
84
84
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
85
85
|
type: z.ZodLiteral<"password">;
|
|
86
86
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -93,9 +93,9 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
93
93
|
pluginOptions?: any;
|
|
94
94
|
required?: boolean;
|
|
95
95
|
type?: "password";
|
|
96
|
-
}>, z.
|
|
96
|
+
}>, z.ZodObject<{
|
|
97
97
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
-
pluginOptions: z.ZodAny
|
|
98
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
99
99
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
100
100
|
type: z.ZodLiteral<"integer">;
|
|
101
101
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -110,7 +110,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
110
110
|
type?: "integer";
|
|
111
111
|
}>, z.ZodObject<{
|
|
112
112
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
-
pluginOptions: z.ZodAny
|
|
113
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
114
114
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
115
115
|
type: z.ZodLiteral<"float">;
|
|
116
116
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -125,7 +125,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
125
125
|
type?: "float";
|
|
126
126
|
}>, z.ZodObject<{
|
|
127
127
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
128
|
-
pluginOptions: z.ZodAny
|
|
128
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
129
129
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
130
130
|
type: z.ZodLiteral<"biginteger">;
|
|
131
131
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -140,7 +140,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
140
140
|
type?: "biginteger";
|
|
141
141
|
}>, z.ZodObject<{
|
|
142
142
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
143
|
-
pluginOptions: z.ZodAny
|
|
143
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
144
144
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
145
145
|
type: z.ZodLiteral<"decimal">;
|
|
146
146
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -153,9 +153,9 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
153
153
|
pluginOptions?: any;
|
|
154
154
|
required?: boolean;
|
|
155
155
|
type?: "decimal";
|
|
156
|
-
}
|
|
156
|
+
}>, z.ZodObject<{
|
|
157
157
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
158
|
-
pluginOptions: z.ZodAny
|
|
158
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
159
159
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
160
160
|
type: z.ZodLiteral<"enumeration">;
|
|
161
161
|
enum: z.ZodArray<z.ZodString, "many">;
|
|
@@ -171,9 +171,9 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
171
171
|
required?: boolean;
|
|
172
172
|
type?: "enumeration";
|
|
173
173
|
enum?: string[];
|
|
174
|
-
}>, z.
|
|
174
|
+
}>, z.ZodObject<{
|
|
175
175
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
176
|
-
pluginOptions: z.ZodAny
|
|
176
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
177
177
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
178
178
|
type: z.ZodLiteral<"date">;
|
|
179
179
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -188,7 +188,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
188
188
|
type?: "date";
|
|
189
189
|
}>, z.ZodObject<{
|
|
190
190
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
191
|
-
pluginOptions: z.ZodAny
|
|
191
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
192
192
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
193
193
|
type: z.ZodLiteral<"datetime">;
|
|
194
194
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -203,7 +203,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
203
203
|
type?: "datetime";
|
|
204
204
|
}>, z.ZodObject<{
|
|
205
205
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
206
|
-
pluginOptions: z.ZodAny
|
|
206
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
207
207
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
208
208
|
type: z.ZodLiteral<"time">;
|
|
209
209
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -216,9 +216,9 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
216
216
|
pluginOptions?: any;
|
|
217
217
|
required?: boolean;
|
|
218
218
|
type?: "time";
|
|
219
|
-
}
|
|
219
|
+
}>, z.ZodObject<{
|
|
220
220
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
221
|
-
pluginOptions: z.ZodAny
|
|
221
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
222
222
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
223
223
|
type: z.ZodLiteral<"media">;
|
|
224
224
|
multiple: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -239,7 +239,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
239
239
|
allowedTypes?: ("images" | "videos" | "audios" | "files")[];
|
|
240
240
|
}>, z.ZodObject<{
|
|
241
241
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
242
|
-
pluginOptions: z.ZodAny
|
|
242
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
243
243
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
244
244
|
type: z.ZodLiteral<"boolean">;
|
|
245
245
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -252,9 +252,9 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
252
252
|
pluginOptions?: any;
|
|
253
253
|
required?: boolean;
|
|
254
254
|
type?: "boolean";
|
|
255
|
-
}>, z.
|
|
255
|
+
}>, z.ZodObject<{
|
|
256
256
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
257
|
-
pluginOptions: z.ZodAny
|
|
257
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
258
258
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
259
259
|
type: z.ZodLiteral<"relation">;
|
|
260
260
|
target: z.ZodString;
|
|
@@ -275,7 +275,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
275
275
|
relation?: "oneToOne";
|
|
276
276
|
}>, z.ZodObject<{
|
|
277
277
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
278
|
-
pluginOptions: z.ZodAny
|
|
278
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
279
279
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
280
280
|
type: z.ZodLiteral<"relation">;
|
|
281
281
|
target: z.ZodString;
|
|
@@ -299,7 +299,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
299
299
|
inversedBy?: string;
|
|
300
300
|
}>, z.ZodObject<{
|
|
301
301
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
302
|
-
pluginOptions: z.ZodAny
|
|
302
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
303
303
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
304
304
|
type: z.ZodLiteral<"relation">;
|
|
305
305
|
target: z.ZodString;
|
|
@@ -323,7 +323,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
323
323
|
relation?: "oneToMany";
|
|
324
324
|
}>, z.ZodObject<{
|
|
325
325
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
326
|
-
pluginOptions: z.ZodAny
|
|
326
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
327
327
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
328
328
|
type: z.ZodLiteral<"relation">;
|
|
329
329
|
target: z.ZodString;
|
|
@@ -347,7 +347,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
347
347
|
inversedBy?: string;
|
|
348
348
|
}>, z.ZodObject<{
|
|
349
349
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
350
|
-
pluginOptions: z.ZodAny
|
|
350
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
351
351
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
352
352
|
type: z.ZodLiteral<"relation">;
|
|
353
353
|
target: z.ZodString;
|
|
@@ -374,7 +374,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
374
374
|
mappedBy?: string;
|
|
375
375
|
}>, z.ZodObject<{
|
|
376
376
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
377
|
-
pluginOptions: z.ZodAny
|
|
377
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
378
378
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
379
379
|
type: z.ZodLiteral<"relation">;
|
|
380
380
|
target: z.ZodString;
|
|
@@ -394,17 +394,44 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
394
394
|
target?: string;
|
|
395
395
|
relation?: "oneToMany";
|
|
396
396
|
}>, z.ZodObject<{
|
|
397
|
+
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
398
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
399
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
397
400
|
type: z.ZodLiteral<"relation">;
|
|
398
401
|
relation: z.ZodLiteral<"morphToMany">;
|
|
399
402
|
}, "strip", z.ZodTypeAny, {
|
|
403
|
+
__t4s_required?: boolean;
|
|
404
|
+
pluginOptions?: any;
|
|
405
|
+
required?: boolean;
|
|
400
406
|
type?: "relation";
|
|
401
407
|
relation?: "morphToMany";
|
|
402
408
|
}, {
|
|
409
|
+
__t4s_required?: boolean;
|
|
410
|
+
pluginOptions?: any;
|
|
411
|
+
required?: boolean;
|
|
403
412
|
type?: "relation";
|
|
404
413
|
relation?: "morphToMany";
|
|
405
|
-
}
|
|
414
|
+
}>, z.ZodObject<{
|
|
415
|
+
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
416
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
417
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
418
|
+
type: z.ZodLiteral<"relation">;
|
|
419
|
+
relation: z.ZodLiteral<"morphToOne">;
|
|
420
|
+
}, "strip", z.ZodTypeAny, {
|
|
421
|
+
__t4s_required?: boolean;
|
|
422
|
+
pluginOptions?: any;
|
|
423
|
+
required?: boolean;
|
|
424
|
+
type?: "relation";
|
|
425
|
+
relation?: "morphToOne";
|
|
426
|
+
}, {
|
|
427
|
+
__t4s_required?: boolean;
|
|
428
|
+
pluginOptions?: any;
|
|
429
|
+
required?: boolean;
|
|
430
|
+
type?: "relation";
|
|
431
|
+
relation?: "morphToOne";
|
|
432
|
+
}>, z.ZodObject<{
|
|
406
433
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
407
|
-
pluginOptions: z.ZodAny
|
|
434
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
408
435
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
409
436
|
type: z.ZodLiteral<"component">;
|
|
410
437
|
repeatable: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -423,9 +450,24 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
423
450
|
type?: "component";
|
|
424
451
|
repeatable?: boolean;
|
|
425
452
|
component?: string;
|
|
426
|
-
}
|
|
453
|
+
}>, z.ZodObject<{
|
|
454
|
+
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
455
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
456
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
457
|
+
type: z.ZodEffects<z.ZodType<"any", z.ZodTypeDef, "any">, "any", "any">;
|
|
458
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
459
|
+
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
460
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
461
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
462
|
+
type: z.ZodEffects<z.ZodType<"any", z.ZodTypeDef, "any">, "any", "any">;
|
|
463
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
464
|
+
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
465
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
466
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
467
|
+
type: z.ZodEffects<z.ZodType<"any", z.ZodTypeDef, "any">, "any", "any">;
|
|
468
|
+
}, z.ZodTypeAny, "passthrough">>]>, z.ZodObject<{
|
|
427
469
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
428
|
-
pluginOptions: z.ZodAny
|
|
470
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
429
471
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
430
472
|
type: z.ZodLiteral<"dynamiczone">;
|
|
431
473
|
components: z.ZodArray<z.ZodString, "many">;
|
|
@@ -457,7 +499,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
457
499
|
__t4s_required?: boolean;
|
|
458
500
|
pluginOptions?: any;
|
|
459
501
|
required?: boolean;
|
|
460
|
-
type?: "
|
|
502
|
+
type?: "string" | "text";
|
|
461
503
|
} | {
|
|
462
504
|
__t4s_required?: boolean;
|
|
463
505
|
pluginOptions?: any;
|
|
@@ -585,8 +627,17 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
585
627
|
target?: string;
|
|
586
628
|
relation?: "oneToMany";
|
|
587
629
|
} | {
|
|
630
|
+
__t4s_required?: boolean;
|
|
631
|
+
pluginOptions?: any;
|
|
632
|
+
required?: boolean;
|
|
588
633
|
type?: "relation";
|
|
589
634
|
relation?: "morphToMany";
|
|
635
|
+
} | {
|
|
636
|
+
__t4s_required?: boolean;
|
|
637
|
+
pluginOptions?: any;
|
|
638
|
+
required?: boolean;
|
|
639
|
+
type?: "relation";
|
|
640
|
+
relation?: "morphToOne";
|
|
590
641
|
} | {
|
|
591
642
|
__t4s_required?: boolean;
|
|
592
643
|
pluginOptions?: any;
|
|
@@ -600,7 +651,12 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
600
651
|
required?: boolean;
|
|
601
652
|
type?: "dynamiczone";
|
|
602
653
|
components?: string[];
|
|
603
|
-
}
|
|
654
|
+
} | z.objectOutputType<{
|
|
655
|
+
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
656
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
657
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
658
|
+
type: z.ZodEffects<z.ZodType<"any", z.ZodTypeDef, "any">, "any", "any">;
|
|
659
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
604
660
|
collectionName?: string;
|
|
605
661
|
options?: {
|
|
606
662
|
draftAndPublish?: boolean;
|
|
@@ -612,7 +668,7 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
612
668
|
__t4s_required?: boolean;
|
|
613
669
|
pluginOptions?: any;
|
|
614
670
|
required?: boolean;
|
|
615
|
-
type?: "
|
|
671
|
+
type?: "string" | "text";
|
|
616
672
|
} | {
|
|
617
673
|
__t4s_required?: boolean;
|
|
618
674
|
pluginOptions?: any;
|
|
@@ -740,8 +796,17 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
740
796
|
target?: string;
|
|
741
797
|
relation?: "oneToMany";
|
|
742
798
|
} | {
|
|
799
|
+
__t4s_required?: boolean;
|
|
800
|
+
pluginOptions?: any;
|
|
801
|
+
required?: boolean;
|
|
743
802
|
type?: "relation";
|
|
744
803
|
relation?: "morphToMany";
|
|
804
|
+
} | {
|
|
805
|
+
__t4s_required?: boolean;
|
|
806
|
+
pluginOptions?: any;
|
|
807
|
+
required?: boolean;
|
|
808
|
+
type?: "relation";
|
|
809
|
+
relation?: "morphToOne";
|
|
745
810
|
} | {
|
|
746
811
|
__t4s_required?: boolean;
|
|
747
812
|
pluginOptions?: any;
|
|
@@ -755,7 +820,12 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
755
820
|
required?: boolean;
|
|
756
821
|
type?: "dynamiczone";
|
|
757
822
|
components?: string[];
|
|
758
|
-
}
|
|
823
|
+
} | z.objectInputType<{
|
|
824
|
+
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
825
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
826
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
827
|
+
type: z.ZodEffects<z.ZodType<"any", z.ZodTypeDef, "any">, "any", "any">;
|
|
828
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
759
829
|
collectionName?: string;
|
|
760
830
|
options?: {
|
|
761
831
|
draftAndPublish?: boolean;
|
|
@@ -763,4 +833,4 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
763
833
|
pluginOptions?: Record<string, any>;
|
|
764
834
|
uid?: string;
|
|
765
835
|
}>;
|
|
766
|
-
export
|
|
836
|
+
export type StrapiContentType = z.infer<typeof strapiContentType>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const caseTypesArray: readonly ["camel", "capital", "dot", "snake", "pascal", "constant", "kebab"];
|
|
2
|
-
export
|
|
2
|
+
export type caseType = typeof caseTypesArray[number];
|
|
3
3
|
export declare function checkCaseType(caseName: caseType): caseName is caseType;
|
|
4
4
|
export declare function changeCase(text: string, caseName: caseType): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { File } from '../file/File';
|
|
2
2
|
import { InterfaceWriter } from './types/writer';
|
|
3
3
|
import prettier from 'prettier';
|
|
4
|
-
|
|
4
|
+
type BasicWriterOptions = {
|
|
5
5
|
/**
|
|
6
6
|
* Warning: this will delete all files in the output directory!
|
|
7
7
|
* @default false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oak-digital/types-4-strapi-2",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Typescript interface generator for Strapi 4 models",
|
|
5
5
|
"bin": {
|
|
6
6
|
"t4s": "./bin/index.js"
|
|
@@ -26,10 +26,11 @@
|
|
|
26
26
|
"@types/prettier": "^2.7.0",
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^5.33.1",
|
|
28
28
|
"@typescript-eslint/parser": "^5.33.1",
|
|
29
|
+
"bumpp": "^9.3.0",
|
|
29
30
|
"eslint": "^8.22.0",
|
|
30
31
|
"rimraf": "^4.4.1",
|
|
31
32
|
"ts-node": "^10.9.1",
|
|
32
|
-
"typescript": "^4.
|
|
33
|
+
"typescript": "^5.4.5"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
36
|
"change-case": "^4.1.2",
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
"lint": "eslint src/",
|
|
44
45
|
"prettier": "prettier --write \"src/**/*.ts\"",
|
|
45
46
|
"t4s": "node ./bin/index.js",
|
|
46
|
-
"testdev": "ts-node ./src/index.ts"
|
|
47
|
+
"testdev": "ts-node ./src/index.ts",
|
|
48
|
+
"release": "bumpp"
|
|
47
49
|
}
|
|
48
50
|
}
|