@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.
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.contentTypeAttribute = exports.attribute = exports.dynamiczoneAttribute = exports.componentAttribute = exports.relationAttribute = 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
  });
11
11
  exports.textAttribute = exports.baseAttribute.extend({
12
- type: zod_1.z.enum(['text', 'string'])
12
+ type: zod_1.z.enum(['text', 'string']),
13
13
  });
14
14
  exports.emailAttribute = exports.baseAttribute.extend({
15
15
  type: zod_1.z.literal('email'),
@@ -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,10 +105,14 @@ 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
  });
112
+ exports.morphOneAttribute = exports.baseAttribute.extend({
113
+ type: zod_1.z.literal('relation'),
114
+ relation: zod_1.z.literal('morphToOne'),
115
+ });
108
116
  exports.relationAttribute = zod_1.z.union([
109
117
  exports.hasOneAttribute,
110
118
  exports.oneToOneAttribute,
@@ -113,6 +121,7 @@ exports.relationAttribute = zod_1.z.union([
113
121
  exports.manyToManyAttribute,
114
122
  exports.hasManyAttribute,
115
123
  exports.morphToManyAttribute,
124
+ exports.morphOneAttribute,
116
125
  ]);
117
126
  exports.componentAttribute = exports.baseAttribute.extend({
118
127
  type: zod_1.z.literal('component'),
@@ -123,22 +132,27 @@ exports.dynamiczoneAttribute = exports.baseAttribute.extend({
123
132
  type: zod_1.z.literal('dynamiczone'),
124
133
  components: zod_1.z.array(zod_1.z.string()),
125
134
  });
126
- exports.attribute = zod_1.z.union([
135
+ exports.knownAttribute = zod_1.z.union([
127
136
  exports.textAttribute,
128
137
  exports.emailAttribute,
129
138
  exports.uidAttribute,
130
139
  exports.richTextAttribute,
131
140
  exports.jsonAttribute,
132
141
  exports.passwordAttribute,
133
- exports.numberAttribute,
142
+ ...exports.numberAttribute.options,
134
143
  exports.enumAttribute,
135
- exports.dateAttribute,
144
+ ...exports.dateAttribute.options,
136
145
  exports.mediaAttribute,
137
146
  exports.booleanAttribute,
138
- exports.relationAttribute,
147
+ ...exports.relationAttribute.options,
139
148
  exports.componentAttribute,
140
149
  ]);
141
- exports.contentTypeAttribute = zod_1.z.union([
142
- exports.attribute,
143
- exports.dynamiczoneAttribute,
144
- ]);
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;
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,17 +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
- }>]>, z.ZodObject<{
415
+ }>, z.ZodObject<{
416
+ __t4s_required: z.ZodOptional<z.ZodBoolean>;
417
+ pluginOptions: z.ZodOptional<z.ZodAny>;
418
+ required: z.ZodOptional<z.ZodBoolean>;
419
+ type: z.ZodLiteral<"relation">;
420
+ relation: z.ZodLiteral<"morphToOne">;
421
+ }, "strip", z.ZodTypeAny, {
422
+ __t4s_required?: boolean;
423
+ pluginOptions?: any;
424
+ required?: boolean;
425
+ type?: "relation";
426
+ relation?: "morphToOne";
427
+ }, {
428
+ __t4s_required?: boolean;
429
+ pluginOptions?: any;
430
+ required?: boolean;
431
+ type?: "relation";
432
+ relation?: "morphToOne";
433
+ }>, z.ZodObject<{
407
434
  __t4s_required: z.ZodOptional<z.ZodBoolean>;
408
- pluginOptions: z.ZodAny;
435
+ pluginOptions: z.ZodOptional<z.ZodAny>;
409
436
  required: z.ZodOptional<z.ZodBoolean>;
410
437
  type: z.ZodLiteral<"component">;
411
438
  repeatable: z.ZodOptional<z.ZodBoolean>;
@@ -424,7 +451,22 @@ export declare const strapiComponent: z.ZodObject<{
424
451
  type?: "component";
425
452
  repeatable?: boolean;
426
453
  component?: string;
427
- }>]>>;
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">>]>>;
428
470
  options: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
429
471
  uid: z.ZodOptional<z.ZodString>;
430
472
  }, "strip", z.ZodTypeAny, {
@@ -433,7 +475,7 @@ export declare const strapiComponent: z.ZodObject<{
433
475
  __t4s_required?: boolean;
434
476
  pluginOptions?: any;
435
477
  required?: boolean;
436
- type?: "text" | "string";
478
+ type?: "string" | "text";
437
479
  } | {
438
480
  __t4s_required?: boolean;
439
481
  pluginOptions?: any;
@@ -561,8 +603,17 @@ export declare const strapiComponent: z.ZodObject<{
561
603
  target?: string;
562
604
  relation?: "oneToMany";
563
605
  } | {
606
+ __t4s_required?: boolean;
607
+ pluginOptions?: any;
608
+ required?: boolean;
564
609
  type?: "relation";
565
610
  relation?: "morphToMany";
611
+ } | {
612
+ __t4s_required?: boolean;
613
+ pluginOptions?: any;
614
+ required?: boolean;
615
+ type?: "relation";
616
+ relation?: "morphToOne";
566
617
  } | {
567
618
  __t4s_required?: boolean;
568
619
  pluginOptions?: any;
@@ -570,7 +621,12 @@ export declare const strapiComponent: z.ZodObject<{
570
621
  type?: "component";
571
622
  repeatable?: boolean;
572
623
  component?: string;
573
- }>;
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">>;
574
630
  options?: {};
575
631
  uid?: string;
576
632
  }, {
@@ -579,7 +635,7 @@ export declare const strapiComponent: z.ZodObject<{
579
635
  __t4s_required?: boolean;
580
636
  pluginOptions?: any;
581
637
  required?: boolean;
582
- type?: "text" | "string";
638
+ type?: "string" | "text";
583
639
  } | {
584
640
  __t4s_required?: boolean;
585
641
  pluginOptions?: any;
@@ -707,8 +763,17 @@ export declare const strapiComponent: z.ZodObject<{
707
763
  target?: string;
708
764
  relation?: "oneToMany";
709
765
  } | {
766
+ __t4s_required?: boolean;
767
+ pluginOptions?: any;
768
+ required?: boolean;
710
769
  type?: "relation";
711
770
  relation?: "morphToMany";
771
+ } | {
772
+ __t4s_required?: boolean;
773
+ pluginOptions?: any;
774
+ required?: boolean;
775
+ type?: "relation";
776
+ relation?: "morphToOne";
712
777
  } | {
713
778
  __t4s_required?: boolean;
714
779
  pluginOptions?: any;
@@ -716,8 +781,13 @@ export declare const strapiComponent: z.ZodObject<{
716
781
  type?: "component";
717
782
  repeatable?: boolean;
718
783
  component?: string;
719
- }>;
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">>;
720
790
  options?: {};
721
791
  uid?: string;
722
792
  }>;
723
- 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;