@oak-digital/types-4-strapi-2 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.contentTypeAttribute = exports.attribute = exports.dynamiczoneAttribute = exports.componentAttribute = exports.relationAttribute = exports.morphOneAttribute = exports.morphToManyAttribute = exports.hasManyAttribute = exports.manyToManyAttribute = exports.manyToOneAttribute = exports.belongsToManyAttribute = exports.oneToOneAttribute = exports.hasOneAttribute = exports.baseRelationAttribute = exports.booleanAttribute = exports.mediaAttribute = exports.dateAttribute = exports.timeAttribute = exports.dateTimeAttribute = exports.dateOnlyAttribute = exports.enumAttribute = exports.numberAttribute = exports.decimalAttribute = exports.bigIntAttribute = exports.floatAttribute = exports.integerAttribute = exports.passwordAttribute = exports.jsonAttribute = exports.richTextAttribute = exports.uidAttribute = exports.emailAttribute = exports.textAttribute = exports.baseAttribute = void 0;
3
+ exports.contentTypeAttribute = exports.isKnownAttribute = exports.attribute = exports.anyAttribute = exports.knownAttribute = exports.dynamiczoneAttribute = exports.componentAttribute = exports.relationAttribute = exports.morphOneAttribute = exports.morphToManyAttribute = exports.hasManyAttribute = exports.manyToManyAttribute = exports.manyToOneAttribute = exports.belongsToManyAttribute = exports.oneToOneAttribute = exports.hasOneAttribute = exports.baseRelationAttribute = exports.booleanAttribute = exports.mediaAttribute = exports.dateAttribute = exports.timeAttribute = exports.dateTimeAttribute = exports.dateOnlyAttribute = exports.enumAttribute = exports.numberAttribute = exports.decimalAttribute = exports.bigIntAttribute = exports.floatAttribute = exports.integerAttribute = exports.passwordAttribute = exports.jsonAttribute = exports.blocksAttribute = exports.richTextAttribute = exports.uidAttribute = exports.emailAttribute = exports.textAttribute = exports.baseAttribute = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const constants_1 = require("../../constants");
6
6
  exports.baseAttribute = zod_1.z.object({
7
- pluginOptions: zod_1.z.any(),
7
+ pluginOptions: zod_1.z.any().optional(),
8
8
  required: zod_1.z.boolean().optional(),
9
9
  [constants_1.CERTAINLY_REQUIRED_KEY]: zod_1.z.boolean().optional(),
10
10
  });
@@ -21,6 +21,10 @@ exports.uidAttribute = exports.baseAttribute.extend({
21
21
  exports.richTextAttribute = exports.baseAttribute.extend({
22
22
  type: zod_1.z.literal('richtext'),
23
23
  });
24
+ exports.blocksAttribute = exports.baseAttribute.extend({
25
+ type: zod_1.z.literal('blocks'),
26
+ // TODO: fill out the rest of the fields
27
+ });
24
28
  exports.jsonAttribute = exports.baseAttribute.extend({
25
29
  type: zod_1.z.literal('json'),
26
30
  });
@@ -39,7 +43,7 @@ exports.bigIntAttribute = exports.baseAttribute.extend({
39
43
  exports.decimalAttribute = exports.baseAttribute.extend({
40
44
  type: zod_1.z.literal('decimal'),
41
45
  });
42
- exports.numberAttribute = zod_1.z.union([
46
+ exports.numberAttribute = zod_1.z.discriminatedUnion('type', [
43
47
  exports.integerAttribute,
44
48
  exports.floatAttribute,
45
49
  exports.bigIntAttribute,
@@ -58,7 +62,7 @@ exports.dateTimeAttribute = exports.baseAttribute.extend({
58
62
  exports.timeAttribute = exports.baseAttribute.extend({
59
63
  type: zod_1.z.literal('time'),
60
64
  });
61
- exports.dateAttribute = zod_1.z.union([
65
+ exports.dateAttribute = zod_1.z.discriminatedUnion('type', [
62
66
  exports.dateOnlyAttribute,
63
67
  exports.dateTimeAttribute,
64
68
  exports.timeAttribute,
@@ -101,11 +105,11 @@ exports.manyToManyAttribute = exports.baseRelationAttribute.extend({
101
105
  exports.hasManyAttribute = exports.baseRelationAttribute.extend({
102
106
  relation: zod_1.z.literal('oneToMany'),
103
107
  });
104
- exports.morphToManyAttribute = zod_1.z.object({
108
+ exports.morphToManyAttribute = exports.baseAttribute.extend({
105
109
  type: zod_1.z.literal('relation'),
106
110
  relation: zod_1.z.literal('morphToMany'),
107
111
  });
108
- exports.morphOneAttribute = zod_1.z.object({
112
+ exports.morphOneAttribute = exports.baseAttribute.extend({
109
113
  type: zod_1.z.literal('relation'),
110
114
  relation: zod_1.z.literal('morphToOne'),
111
115
  });
@@ -128,19 +132,27 @@ exports.dynamiczoneAttribute = exports.baseAttribute.extend({
128
132
  type: zod_1.z.literal('dynamiczone'),
129
133
  components: zod_1.z.array(zod_1.z.string()),
130
134
  });
131
- exports.attribute = zod_1.z.union([
135
+ exports.knownAttribute = zod_1.z.union([
132
136
  exports.textAttribute,
133
137
  exports.emailAttribute,
134
138
  exports.uidAttribute,
135
139
  exports.richTextAttribute,
136
140
  exports.jsonAttribute,
137
141
  exports.passwordAttribute,
138
- exports.numberAttribute,
142
+ ...exports.numberAttribute.options,
139
143
  exports.enumAttribute,
140
- exports.dateAttribute,
144
+ ...exports.dateAttribute.options,
141
145
  exports.mediaAttribute,
142
146
  exports.booleanAttribute,
143
- exports.relationAttribute,
147
+ ...exports.relationAttribute.options,
144
148
  exports.componentAttribute,
145
149
  ]);
150
+ exports.anyAttribute = exports.baseAttribute.extend({
151
+ type: zod_1.z.custom(val => !exports.knownAttribute.options.some(schema => schema.shape.type.safeParse(val).success)).transform(() => 'any'),
152
+ }).passthrough();
153
+ exports.attribute = zod_1.z.union([...exports.knownAttribute.options, exports.anyAttribute]);
154
+ const isKnownAttribute = (attributeObject) => {
155
+ return exports.attribute.safeParse(attributeObject).success;
156
+ };
157
+ exports.isKnownAttribute = isKnownAttribute;
146
158
  exports.contentTypeAttribute = zod_1.z.union([exports.attribute, exports.dynamiczoneAttribute]);
@@ -3,22 +3,22 @@ export declare const strapiComponent: z.ZodObject<{
3
3
  collectionName: z.ZodString;
4
4
  attributes: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
5
5
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
6
- pluginOptions: z.ZodAny;
6
+ pluginOptions: z.ZodOptional<z.ZodAny>;
7
7
  required: z.ZodOptional<z.ZodBoolean>;
8
8
  type: z.ZodEnum<["text", "string"]>;
9
9
  }, "strip", z.ZodTypeAny, {
10
10
  __t4s_required?: boolean;
11
11
  pluginOptions?: any;
12
12
  required?: boolean;
13
- type?: "text" | "string";
13
+ type?: "string" | "text";
14
14
  }, {
15
15
  __t4s_required?: boolean;
16
16
  pluginOptions?: any;
17
17
  required?: boolean;
18
- type?: "text" | "string";
18
+ type?: "string" | "text";
19
19
  }>, z.ZodObject<{
20
20
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
21
- pluginOptions: z.ZodAny;
21
+ pluginOptions: z.ZodOptional<z.ZodAny>;
22
22
  required: z.ZodOptional<z.ZodBoolean>;
23
23
  type: z.ZodLiteral<"email">;
24
24
  }, "strip", z.ZodTypeAny, {
@@ -33,7 +33,7 @@ export declare const strapiComponent: z.ZodObject<{
33
33
  type?: "email";
34
34
  }>, z.ZodObject<{
35
35
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
36
- pluginOptions: z.ZodAny;
36
+ pluginOptions: z.ZodOptional<z.ZodAny>;
37
37
  required: z.ZodOptional<z.ZodBoolean>;
38
38
  type: z.ZodLiteral<"uid">;
39
39
  targetField: z.ZodOptional<z.ZodString>;
@@ -51,7 +51,7 @@ export declare const strapiComponent: z.ZodObject<{
51
51
  targetField?: string;
52
52
  }>, z.ZodObject<{
53
53
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
54
- pluginOptions: z.ZodAny;
54
+ pluginOptions: z.ZodOptional<z.ZodAny>;
55
55
  required: z.ZodOptional<z.ZodBoolean>;
56
56
  type: z.ZodLiteral<"richtext">;
57
57
  }, "strip", z.ZodTypeAny, {
@@ -66,7 +66,7 @@ export declare const strapiComponent: z.ZodObject<{
66
66
  type?: "richtext";
67
67
  }>, z.ZodObject<{
68
68
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
69
- pluginOptions: z.ZodAny;
69
+ pluginOptions: z.ZodOptional<z.ZodAny>;
70
70
  required: z.ZodOptional<z.ZodBoolean>;
71
71
  type: z.ZodLiteral<"json">;
72
72
  }, "strip", z.ZodTypeAny, {
@@ -81,7 +81,7 @@ export declare const strapiComponent: z.ZodObject<{
81
81
  type?: "json";
82
82
  }>, z.ZodObject<{
83
83
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
84
- pluginOptions: z.ZodAny;
84
+ pluginOptions: z.ZodOptional<z.ZodAny>;
85
85
  required: z.ZodOptional<z.ZodBoolean>;
86
86
  type: z.ZodLiteral<"password">;
87
87
  }, "strip", z.ZodTypeAny, {
@@ -94,9 +94,9 @@ export declare const strapiComponent: z.ZodObject<{
94
94
  pluginOptions?: any;
95
95
  required?: boolean;
96
96
  type?: "password";
97
- }>, z.ZodUnion<[z.ZodObject<{
97
+ }>, z.ZodObject<{
98
98
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
99
- pluginOptions: z.ZodAny;
99
+ pluginOptions: z.ZodOptional<z.ZodAny>;
100
100
  required: z.ZodOptional<z.ZodBoolean>;
101
101
  type: z.ZodLiteral<"integer">;
102
102
  }, "strip", z.ZodTypeAny, {
@@ -111,7 +111,7 @@ export declare const strapiComponent: z.ZodObject<{
111
111
  type?: "integer";
112
112
  }>, z.ZodObject<{
113
113
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
114
- pluginOptions: z.ZodAny;
114
+ pluginOptions: z.ZodOptional<z.ZodAny>;
115
115
  required: z.ZodOptional<z.ZodBoolean>;
116
116
  type: z.ZodLiteral<"float">;
117
117
  }, "strip", z.ZodTypeAny, {
@@ -126,7 +126,7 @@ export declare const strapiComponent: z.ZodObject<{
126
126
  type?: "float";
127
127
  }>, z.ZodObject<{
128
128
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
129
- pluginOptions: z.ZodAny;
129
+ pluginOptions: z.ZodOptional<z.ZodAny>;
130
130
  required: z.ZodOptional<z.ZodBoolean>;
131
131
  type: z.ZodLiteral<"biginteger">;
132
132
  }, "strip", z.ZodTypeAny, {
@@ -141,7 +141,7 @@ export declare const strapiComponent: z.ZodObject<{
141
141
  type?: "biginteger";
142
142
  }>, z.ZodObject<{
143
143
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
144
- pluginOptions: z.ZodAny;
144
+ pluginOptions: z.ZodOptional<z.ZodAny>;
145
145
  required: z.ZodOptional<z.ZodBoolean>;
146
146
  type: z.ZodLiteral<"decimal">;
147
147
  }, "strip", z.ZodTypeAny, {
@@ -154,9 +154,9 @@ export declare const strapiComponent: z.ZodObject<{
154
154
  pluginOptions?: any;
155
155
  required?: boolean;
156
156
  type?: "decimal";
157
- }>]>, z.ZodObject<{
157
+ }>, z.ZodObject<{
158
158
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
159
- pluginOptions: z.ZodAny;
159
+ pluginOptions: z.ZodOptional<z.ZodAny>;
160
160
  required: z.ZodOptional<z.ZodBoolean>;
161
161
  type: z.ZodLiteral<"enumeration">;
162
162
  enum: z.ZodArray<z.ZodString, "many">;
@@ -172,9 +172,9 @@ export declare const strapiComponent: z.ZodObject<{
172
172
  required?: boolean;
173
173
  type?: "enumeration";
174
174
  enum?: string[];
175
- }>, z.ZodUnion<[z.ZodObject<{
175
+ }>, z.ZodObject<{
176
176
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
177
- pluginOptions: z.ZodAny;
177
+ pluginOptions: z.ZodOptional<z.ZodAny>;
178
178
  required: z.ZodOptional<z.ZodBoolean>;
179
179
  type: z.ZodLiteral<"date">;
180
180
  }, "strip", z.ZodTypeAny, {
@@ -189,7 +189,7 @@ export declare const strapiComponent: z.ZodObject<{
189
189
  type?: "date";
190
190
  }>, z.ZodObject<{
191
191
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
192
- pluginOptions: z.ZodAny;
192
+ pluginOptions: z.ZodOptional<z.ZodAny>;
193
193
  required: z.ZodOptional<z.ZodBoolean>;
194
194
  type: z.ZodLiteral<"datetime">;
195
195
  }, "strip", z.ZodTypeAny, {
@@ -204,7 +204,7 @@ export declare const strapiComponent: z.ZodObject<{
204
204
  type?: "datetime";
205
205
  }>, z.ZodObject<{
206
206
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
207
- pluginOptions: z.ZodAny;
207
+ pluginOptions: z.ZodOptional<z.ZodAny>;
208
208
  required: z.ZodOptional<z.ZodBoolean>;
209
209
  type: z.ZodLiteral<"time">;
210
210
  }, "strip", z.ZodTypeAny, {
@@ -217,9 +217,9 @@ export declare const strapiComponent: z.ZodObject<{
217
217
  pluginOptions?: any;
218
218
  required?: boolean;
219
219
  type?: "time";
220
- }>]>, z.ZodObject<{
220
+ }>, z.ZodObject<{
221
221
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
222
- pluginOptions: z.ZodAny;
222
+ pluginOptions: z.ZodOptional<z.ZodAny>;
223
223
  required: z.ZodOptional<z.ZodBoolean>;
224
224
  type: z.ZodLiteral<"media">;
225
225
  multiple: z.ZodOptional<z.ZodBoolean>;
@@ -240,7 +240,7 @@ export declare const strapiComponent: z.ZodObject<{
240
240
  allowedTypes?: ("images" | "videos" | "audios" | "files")[];
241
241
  }>, z.ZodObject<{
242
242
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
243
- pluginOptions: z.ZodAny;
243
+ pluginOptions: z.ZodOptional<z.ZodAny>;
244
244
  required: z.ZodOptional<z.ZodBoolean>;
245
245
  type: z.ZodLiteral<"boolean">;
246
246
  }, "strip", z.ZodTypeAny, {
@@ -253,9 +253,9 @@ export declare const strapiComponent: z.ZodObject<{
253
253
  pluginOptions?: any;
254
254
  required?: boolean;
255
255
  type?: "boolean";
256
- }>, z.ZodUnion<[z.ZodObject<{
256
+ }>, z.ZodObject<{
257
257
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
258
- pluginOptions: z.ZodAny;
258
+ pluginOptions: z.ZodOptional<z.ZodAny>;
259
259
  required: z.ZodOptional<z.ZodBoolean>;
260
260
  type: z.ZodLiteral<"relation">;
261
261
  target: z.ZodString;
@@ -276,7 +276,7 @@ export declare const strapiComponent: z.ZodObject<{
276
276
  relation?: "oneToOne";
277
277
  }>, z.ZodObject<{
278
278
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
279
- pluginOptions: z.ZodAny;
279
+ pluginOptions: z.ZodOptional<z.ZodAny>;
280
280
  required: z.ZodOptional<z.ZodBoolean>;
281
281
  type: z.ZodLiteral<"relation">;
282
282
  target: z.ZodString;
@@ -300,7 +300,7 @@ export declare const strapiComponent: z.ZodObject<{
300
300
  inversedBy?: string;
301
301
  }>, z.ZodObject<{
302
302
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
303
- pluginOptions: z.ZodAny;
303
+ pluginOptions: z.ZodOptional<z.ZodAny>;
304
304
  required: z.ZodOptional<z.ZodBoolean>;
305
305
  type: z.ZodLiteral<"relation">;
306
306
  target: z.ZodString;
@@ -324,7 +324,7 @@ export declare const strapiComponent: z.ZodObject<{
324
324
  relation?: "oneToMany";
325
325
  }>, z.ZodObject<{
326
326
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
327
- pluginOptions: z.ZodAny;
327
+ pluginOptions: z.ZodOptional<z.ZodAny>;
328
328
  required: z.ZodOptional<z.ZodBoolean>;
329
329
  type: z.ZodLiteral<"relation">;
330
330
  target: z.ZodString;
@@ -348,7 +348,7 @@ export declare const strapiComponent: z.ZodObject<{
348
348
  inversedBy?: string;
349
349
  }>, z.ZodObject<{
350
350
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
351
- pluginOptions: z.ZodAny;
351
+ pluginOptions: z.ZodOptional<z.ZodAny>;
352
352
  required: z.ZodOptional<z.ZodBoolean>;
353
353
  type: z.ZodLiteral<"relation">;
354
354
  target: z.ZodString;
@@ -375,7 +375,7 @@ export declare const strapiComponent: z.ZodObject<{
375
375
  mappedBy?: string;
376
376
  }>, z.ZodObject<{
377
377
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
378
- pluginOptions: z.ZodAny;
378
+ pluginOptions: z.ZodOptional<z.ZodAny>;
379
379
  required: z.ZodOptional<z.ZodBoolean>;
380
380
  type: z.ZodLiteral<"relation">;
381
381
  target: z.ZodString;
@@ -395,26 +395,44 @@ export declare const strapiComponent: z.ZodObject<{
395
395
  target?: string;
396
396
  relation?: "oneToMany";
397
397
  }>, z.ZodObject<{
398
+ __t4s_required: z.ZodOptional<z.ZodBoolean>;
399
+ pluginOptions: z.ZodOptional<z.ZodAny>;
400
+ required: z.ZodOptional<z.ZodBoolean>;
398
401
  type: z.ZodLiteral<"relation">;
399
402
  relation: z.ZodLiteral<"morphToMany">;
400
403
  }, "strip", z.ZodTypeAny, {
404
+ __t4s_required?: boolean;
405
+ pluginOptions?: any;
406
+ required?: boolean;
401
407
  type?: "relation";
402
408
  relation?: "morphToMany";
403
409
  }, {
410
+ __t4s_required?: boolean;
411
+ pluginOptions?: any;
412
+ required?: boolean;
404
413
  type?: "relation";
405
414
  relation?: "morphToMany";
406
415
  }>, z.ZodObject<{
416
+ __t4s_required: z.ZodOptional<z.ZodBoolean>;
417
+ pluginOptions: z.ZodOptional<z.ZodAny>;
418
+ required: z.ZodOptional<z.ZodBoolean>;
407
419
  type: z.ZodLiteral<"relation">;
408
420
  relation: z.ZodLiteral<"morphToOne">;
409
421
  }, "strip", z.ZodTypeAny, {
422
+ __t4s_required?: boolean;
423
+ pluginOptions?: any;
424
+ required?: boolean;
410
425
  type?: "relation";
411
426
  relation?: "morphToOne";
412
427
  }, {
428
+ __t4s_required?: boolean;
429
+ pluginOptions?: any;
430
+ required?: boolean;
413
431
  type?: "relation";
414
432
  relation?: "morphToOne";
415
- }>]>, z.ZodObject<{
433
+ }>, z.ZodObject<{
416
434
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
417
- pluginOptions: z.ZodAny;
435
+ pluginOptions: z.ZodOptional<z.ZodAny>;
418
436
  required: z.ZodOptional<z.ZodBoolean>;
419
437
  type: z.ZodLiteral<"component">;
420
438
  repeatable: z.ZodOptional<z.ZodBoolean>;
@@ -433,7 +451,22 @@ export declare const strapiComponent: z.ZodObject<{
433
451
  type?: "component";
434
452
  repeatable?: boolean;
435
453
  component?: string;
436
- }>]>>;
454
+ }>, z.ZodObject<{
455
+ __t4s_required: z.ZodOptional<z.ZodBoolean>;
456
+ pluginOptions: z.ZodOptional<z.ZodAny>;
457
+ required: z.ZodOptional<z.ZodBoolean>;
458
+ type: z.ZodEffects<z.ZodType<"any", z.ZodTypeDef, "any">, "any", "any">;
459
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
460
+ __t4s_required: z.ZodOptional<z.ZodBoolean>;
461
+ pluginOptions: z.ZodOptional<z.ZodAny>;
462
+ required: z.ZodOptional<z.ZodBoolean>;
463
+ type: z.ZodEffects<z.ZodType<"any", z.ZodTypeDef, "any">, "any", "any">;
464
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
465
+ __t4s_required: z.ZodOptional<z.ZodBoolean>;
466
+ pluginOptions: z.ZodOptional<z.ZodAny>;
467
+ required: z.ZodOptional<z.ZodBoolean>;
468
+ type: z.ZodEffects<z.ZodType<"any", z.ZodTypeDef, "any">, "any", "any">;
469
+ }, z.ZodTypeAny, "passthrough">>]>>;
437
470
  options: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
438
471
  uid: z.ZodOptional<z.ZodString>;
439
472
  }, "strip", z.ZodTypeAny, {
@@ -442,7 +475,7 @@ export declare const strapiComponent: z.ZodObject<{
442
475
  __t4s_required?: boolean;
443
476
  pluginOptions?: any;
444
477
  required?: boolean;
445
- type?: "text" | "string";
478
+ type?: "string" | "text";
446
479
  } | {
447
480
  __t4s_required?: boolean;
448
481
  pluginOptions?: any;
@@ -570,9 +603,15 @@ export declare const strapiComponent: z.ZodObject<{
570
603
  target?: string;
571
604
  relation?: "oneToMany";
572
605
  } | {
606
+ __t4s_required?: boolean;
607
+ pluginOptions?: any;
608
+ required?: boolean;
573
609
  type?: "relation";
574
610
  relation?: "morphToMany";
575
611
  } | {
612
+ __t4s_required?: boolean;
613
+ pluginOptions?: any;
614
+ required?: boolean;
576
615
  type?: "relation";
577
616
  relation?: "morphToOne";
578
617
  } | {
@@ -582,7 +621,12 @@ export declare const strapiComponent: z.ZodObject<{
582
621
  type?: "component";
583
622
  repeatable?: boolean;
584
623
  component?: string;
585
- }>;
624
+ } | z.objectOutputType<{
625
+ __t4s_required: z.ZodOptional<z.ZodBoolean>;
626
+ pluginOptions: z.ZodOptional<z.ZodAny>;
627
+ required: z.ZodOptional<z.ZodBoolean>;
628
+ type: z.ZodEffects<z.ZodType<"any", z.ZodTypeDef, "any">, "any", "any">;
629
+ }, z.ZodTypeAny, "passthrough">>;
586
630
  options?: {};
587
631
  uid?: string;
588
632
  }, {
@@ -591,7 +635,7 @@ export declare const strapiComponent: z.ZodObject<{
591
635
  __t4s_required?: boolean;
592
636
  pluginOptions?: any;
593
637
  required?: boolean;
594
- type?: "text" | "string";
638
+ type?: "string" | "text";
595
639
  } | {
596
640
  __t4s_required?: boolean;
597
641
  pluginOptions?: any;
@@ -719,9 +763,15 @@ export declare const strapiComponent: z.ZodObject<{
719
763
  target?: string;
720
764
  relation?: "oneToMany";
721
765
  } | {
766
+ __t4s_required?: boolean;
767
+ pluginOptions?: any;
768
+ required?: boolean;
722
769
  type?: "relation";
723
770
  relation?: "morphToMany";
724
771
  } | {
772
+ __t4s_required?: boolean;
773
+ pluginOptions?: any;
774
+ required?: boolean;
725
775
  type?: "relation";
726
776
  relation?: "morphToOne";
727
777
  } | {
@@ -731,8 +781,13 @@ export declare const strapiComponent: z.ZodObject<{
731
781
  type?: "component";
732
782
  repeatable?: boolean;
733
783
  component?: string;
734
- }>;
784
+ } | z.objectInputType<{
785
+ __t4s_required: z.ZodOptional<z.ZodBoolean>;
786
+ pluginOptions: z.ZodOptional<z.ZodAny>;
787
+ required: z.ZodOptional<z.ZodBoolean>;
788
+ type: z.ZodEffects<z.ZodType<"any", z.ZodTypeDef, "any">, "any", "any">;
789
+ }, z.ZodTypeAny, "passthrough">>;
735
790
  options?: {};
736
791
  uid?: string;
737
792
  }>;
738
- export declare type StrapiComponent = z.infer<typeof strapiComponent>;
793
+ export type StrapiComponent = z.infer<typeof strapiComponent>;
@@ -1,6 +1,6 @@
1
1
  import { StrapiComponent } from './component';
2
2
  import { StrapiContentType } from './content-type';
3
- export declare type Namespace = 'api' | 'plugin' | 'admin' | 'builtins';
3
+ export type Namespace = 'api' | 'plugin' | 'admin' | 'builtins';
4
4
  export interface ContentTypeReader {
5
5
  readContentTypes(): Promise<Record<`${Namespace}::${string}`, {
6
6
  name: string;