@oak-digital/types-4-strapi-2 1.0.4 → 1.0.6
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/lib/attributes/Attributes.js +4 -1
- package/lib/interface/builtinInterfaces.d.ts +65 -0
- package/lib/program/InterfaceManager.d.ts +10 -0
- package/lib/readers/by-file.d.ts +10 -0
- package/lib/readers/load-strapi/index.d.ts +10 -0
- package/lib/readers/types/attributes.d.ts +55 -0
- package/lib/readers/types/attributes.js +1 -0
- package/lib/readers/types/component.d.ts +25 -0
- package/lib/readers/types/content-type.d.ts +25 -0
- package/package.json +1 -1
|
@@ -166,7 +166,7 @@ class Attributes {
|
|
|
166
166
|
break;
|
|
167
167
|
case 'media':
|
|
168
168
|
const mediaMultipleString = attr.multiple
|
|
169
|
-
?
|
|
169
|
+
? `[] ${requiredString}`
|
|
170
170
|
: requiredString;
|
|
171
171
|
str += `{ data: `;
|
|
172
172
|
str += this.RelationNames['builtins::Media'].name;
|
|
@@ -206,6 +206,9 @@ class Attributes {
|
|
|
206
206
|
// console.log(relationsString);
|
|
207
207
|
str += `Array<${relationsString}>`;
|
|
208
208
|
break;
|
|
209
|
+
case 'blocks':
|
|
210
|
+
str += 'any[]' + requiredString;
|
|
211
|
+
break;
|
|
209
212
|
case 'string':
|
|
210
213
|
case 'text':
|
|
211
214
|
case 'richtext':
|
|
@@ -68,6 +68,21 @@ export declare const nestedAttribute: z.ZodObject<{
|
|
|
68
68
|
pluginOptions?: any;
|
|
69
69
|
required?: boolean;
|
|
70
70
|
type?: "richtext";
|
|
71
|
+
}>, z.ZodObject<{
|
|
72
|
+
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
73
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
74
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
type: z.ZodLiteral<"blocks">;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
__t4s_required?: boolean;
|
|
78
|
+
pluginOptions?: any;
|
|
79
|
+
required?: boolean;
|
|
80
|
+
type?: "blocks";
|
|
81
|
+
}, {
|
|
82
|
+
__t4s_required?: boolean;
|
|
83
|
+
pluginOptions?: any;
|
|
84
|
+
required?: boolean;
|
|
85
|
+
type?: "blocks";
|
|
71
86
|
}>, z.ZodObject<{
|
|
72
87
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
73
88
|
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
@@ -513,6 +528,11 @@ export declare const nestedAttribute: z.ZodObject<{
|
|
|
513
528
|
pluginOptions?: any;
|
|
514
529
|
required?: boolean;
|
|
515
530
|
type?: "richtext";
|
|
531
|
+
} | {
|
|
532
|
+
__t4s_required?: boolean;
|
|
533
|
+
pluginOptions?: any;
|
|
534
|
+
required?: boolean;
|
|
535
|
+
type?: "blocks";
|
|
516
536
|
} | {
|
|
517
537
|
__t4s_required?: boolean;
|
|
518
538
|
pluginOptions?: any;
|
|
@@ -678,6 +698,11 @@ export declare const nestedAttribute: z.ZodObject<{
|
|
|
678
698
|
pluginOptions?: any;
|
|
679
699
|
required?: boolean;
|
|
680
700
|
type?: "richtext";
|
|
701
|
+
} | {
|
|
702
|
+
__t4s_required?: boolean;
|
|
703
|
+
pluginOptions?: any;
|
|
704
|
+
required?: boolean;
|
|
705
|
+
type?: "blocks";
|
|
681
706
|
} | {
|
|
682
707
|
__t4s_required?: boolean;
|
|
683
708
|
pluginOptions?: any;
|
|
@@ -883,6 +908,21 @@ export declare const attributeWithNested: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.
|
|
|
883
908
|
pluginOptions?: any;
|
|
884
909
|
required?: boolean;
|
|
885
910
|
type?: "richtext";
|
|
911
|
+
}>, z.ZodObject<{
|
|
912
|
+
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
913
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
914
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
915
|
+
type: z.ZodLiteral<"blocks">;
|
|
916
|
+
}, "strip", z.ZodTypeAny, {
|
|
917
|
+
__t4s_required?: boolean;
|
|
918
|
+
pluginOptions?: any;
|
|
919
|
+
required?: boolean;
|
|
920
|
+
type?: "blocks";
|
|
921
|
+
}, {
|
|
922
|
+
__t4s_required?: boolean;
|
|
923
|
+
pluginOptions?: any;
|
|
924
|
+
required?: boolean;
|
|
925
|
+
type?: "blocks";
|
|
886
926
|
}>, z.ZodObject<{
|
|
887
927
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
888
928
|
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
@@ -1369,6 +1409,21 @@ export declare const attributeWithNested: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.
|
|
|
1369
1409
|
pluginOptions?: any;
|
|
1370
1410
|
required?: boolean;
|
|
1371
1411
|
type?: "richtext";
|
|
1412
|
+
}>, z.ZodObject<{
|
|
1413
|
+
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
1414
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
1415
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
1416
|
+
type: z.ZodLiteral<"blocks">;
|
|
1417
|
+
}, "strip", z.ZodTypeAny, {
|
|
1418
|
+
__t4s_required?: boolean;
|
|
1419
|
+
pluginOptions?: any;
|
|
1420
|
+
required?: boolean;
|
|
1421
|
+
type?: "blocks";
|
|
1422
|
+
}, {
|
|
1423
|
+
__t4s_required?: boolean;
|
|
1424
|
+
pluginOptions?: any;
|
|
1425
|
+
required?: boolean;
|
|
1426
|
+
type?: "blocks";
|
|
1372
1427
|
}>, z.ZodObject<{
|
|
1373
1428
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
1374
1429
|
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
@@ -1814,6 +1869,11 @@ export declare const attributeWithNested: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.
|
|
|
1814
1869
|
pluginOptions?: any;
|
|
1815
1870
|
required?: boolean;
|
|
1816
1871
|
type?: "richtext";
|
|
1872
|
+
} | {
|
|
1873
|
+
__t4s_required?: boolean;
|
|
1874
|
+
pluginOptions?: any;
|
|
1875
|
+
required?: boolean;
|
|
1876
|
+
type?: "blocks";
|
|
1817
1877
|
} | {
|
|
1818
1878
|
__t4s_required?: boolean;
|
|
1819
1879
|
pluginOptions?: any;
|
|
@@ -1979,6 +2039,11 @@ export declare const attributeWithNested: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.
|
|
|
1979
2039
|
pluginOptions?: any;
|
|
1980
2040
|
required?: boolean;
|
|
1981
2041
|
type?: "richtext";
|
|
2042
|
+
} | {
|
|
2043
|
+
__t4s_required?: boolean;
|
|
2044
|
+
pluginOptions?: any;
|
|
2045
|
+
required?: boolean;
|
|
2046
|
+
type?: "blocks";
|
|
1982
2047
|
} | {
|
|
1983
2048
|
__t4s_required?: boolean;
|
|
1984
2049
|
pluginOptions?: any;
|
|
@@ -93,6 +93,11 @@ export default class InterfaceManager {
|
|
|
93
93
|
pluginOptions?: any;
|
|
94
94
|
required?: boolean;
|
|
95
95
|
type?: "richtext";
|
|
96
|
+
} | {
|
|
97
|
+
__t4s_required?: boolean;
|
|
98
|
+
pluginOptions?: any;
|
|
99
|
+
required?: boolean;
|
|
100
|
+
type?: "blocks";
|
|
96
101
|
} | {
|
|
97
102
|
__t4s_required?: boolean;
|
|
98
103
|
pluginOptions?: any;
|
|
@@ -271,6 +276,11 @@ export default class InterfaceManager {
|
|
|
271
276
|
pluginOptions?: any;
|
|
272
277
|
required?: boolean;
|
|
273
278
|
type?: "richtext";
|
|
279
|
+
} | {
|
|
280
|
+
__t4s_required?: boolean;
|
|
281
|
+
pluginOptions?: any;
|
|
282
|
+
required?: boolean;
|
|
283
|
+
type?: "blocks";
|
|
274
284
|
} | {
|
|
275
285
|
__t4s_required?: boolean;
|
|
276
286
|
pluginOptions?: any;
|
package/lib/readers/by-file.d.ts
CHANGED
|
@@ -25,6 +25,11 @@ export declare class ByFileContentTypeReader implements ContentTypeReader {
|
|
|
25
25
|
pluginOptions?: any;
|
|
26
26
|
required?: boolean;
|
|
27
27
|
type?: "richtext";
|
|
28
|
+
} | {
|
|
29
|
+
__t4s_required?: boolean;
|
|
30
|
+
pluginOptions?: any;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
type?: "blocks";
|
|
28
33
|
} | {
|
|
29
34
|
__t4s_required?: boolean;
|
|
30
35
|
pluginOptions?: any;
|
|
@@ -187,6 +192,11 @@ export declare class ByFileContentTypeReader implements ContentTypeReader {
|
|
|
187
192
|
pluginOptions?: any;
|
|
188
193
|
required?: boolean;
|
|
189
194
|
type?: "richtext";
|
|
195
|
+
} | {
|
|
196
|
+
__t4s_required?: boolean;
|
|
197
|
+
pluginOptions?: any;
|
|
198
|
+
required?: boolean;
|
|
199
|
+
type?: "blocks";
|
|
190
200
|
} | {
|
|
191
201
|
__t4s_required?: boolean;
|
|
192
202
|
pluginOptions?: any;
|
|
@@ -28,6 +28,11 @@ export declare class LoadStrapiReader implements ContentTypeReader {
|
|
|
28
28
|
pluginOptions?: any;
|
|
29
29
|
required?: boolean;
|
|
30
30
|
type?: "richtext";
|
|
31
|
+
} | {
|
|
32
|
+
__t4s_required?: boolean;
|
|
33
|
+
pluginOptions?: any;
|
|
34
|
+
required?: boolean;
|
|
35
|
+
type?: "blocks";
|
|
31
36
|
} | {
|
|
32
37
|
__t4s_required?: boolean;
|
|
33
38
|
pluginOptions?: any;
|
|
@@ -206,6 +211,11 @@ export declare class LoadStrapiReader implements ContentTypeReader {
|
|
|
206
211
|
pluginOptions?: any;
|
|
207
212
|
required?: boolean;
|
|
208
213
|
type?: "richtext";
|
|
214
|
+
} | {
|
|
215
|
+
__t4s_required?: boolean;
|
|
216
|
+
pluginOptions?: any;
|
|
217
|
+
required?: boolean;
|
|
218
|
+
type?: "blocks";
|
|
209
219
|
} | {
|
|
210
220
|
__t4s_required?: boolean;
|
|
211
221
|
pluginOptions?: any;
|
|
@@ -903,6 +903,21 @@ export declare const knownAttribute: z.ZodUnion<[z.ZodObject<{
|
|
|
903
903
|
pluginOptions?: any;
|
|
904
904
|
required?: boolean;
|
|
905
905
|
type?: "richtext";
|
|
906
|
+
}>, z.ZodObject<{
|
|
907
|
+
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
908
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
909
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
910
|
+
type: z.ZodLiteral<"blocks">;
|
|
911
|
+
}, "strip", z.ZodTypeAny, {
|
|
912
|
+
__t4s_required?: boolean;
|
|
913
|
+
pluginOptions?: any;
|
|
914
|
+
required?: boolean;
|
|
915
|
+
type?: "blocks";
|
|
916
|
+
}, {
|
|
917
|
+
__t4s_required?: boolean;
|
|
918
|
+
pluginOptions?: any;
|
|
919
|
+
required?: boolean;
|
|
920
|
+
type?: "blocks";
|
|
906
921
|
}>, z.ZodObject<{
|
|
907
922
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
908
923
|
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
@@ -1372,6 +1387,21 @@ export declare const attribute: z.ZodUnion<[z.ZodObject<{
|
|
|
1372
1387
|
pluginOptions?: any;
|
|
1373
1388
|
required?: boolean;
|
|
1374
1389
|
type?: "richtext";
|
|
1390
|
+
}>, z.ZodObject<{
|
|
1391
|
+
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
1392
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
1393
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
1394
|
+
type: z.ZodLiteral<"blocks">;
|
|
1395
|
+
}, "strip", z.ZodTypeAny, {
|
|
1396
|
+
__t4s_required?: boolean;
|
|
1397
|
+
pluginOptions?: any;
|
|
1398
|
+
required?: boolean;
|
|
1399
|
+
type?: "blocks";
|
|
1400
|
+
}, {
|
|
1401
|
+
__t4s_required?: boolean;
|
|
1402
|
+
pluginOptions?: any;
|
|
1403
|
+
required?: boolean;
|
|
1404
|
+
type?: "blocks";
|
|
1375
1405
|
}>, z.ZodObject<{
|
|
1376
1406
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
1377
1407
|
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
@@ -1797,6 +1827,11 @@ export declare const isKnownAttribute: <T extends {
|
|
|
1797
1827
|
pluginOptions?: any;
|
|
1798
1828
|
required?: boolean;
|
|
1799
1829
|
type?: "richtext";
|
|
1830
|
+
} | {
|
|
1831
|
+
__t4s_required?: boolean;
|
|
1832
|
+
pluginOptions?: any;
|
|
1833
|
+
required?: boolean;
|
|
1834
|
+
type?: "blocks";
|
|
1800
1835
|
} | {
|
|
1801
1836
|
__t4s_required?: boolean;
|
|
1802
1837
|
pluginOptions?: any;
|
|
@@ -1952,6 +1987,11 @@ export declare const isKnownAttribute: <T extends {
|
|
|
1952
1987
|
pluginOptions?: any;
|
|
1953
1988
|
required?: boolean;
|
|
1954
1989
|
type?: "richtext";
|
|
1990
|
+
} | {
|
|
1991
|
+
__t4s_required?: boolean;
|
|
1992
|
+
pluginOptions?: any;
|
|
1993
|
+
required?: boolean;
|
|
1994
|
+
type?: "blocks";
|
|
1955
1995
|
} | {
|
|
1956
1996
|
__t4s_required?: boolean;
|
|
1957
1997
|
pluginOptions?: any;
|
|
@@ -2145,6 +2185,21 @@ export declare const contentTypeAttribute: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
|
2145
2185
|
pluginOptions?: any;
|
|
2146
2186
|
required?: boolean;
|
|
2147
2187
|
type?: "richtext";
|
|
2188
|
+
}>, z.ZodObject<{
|
|
2189
|
+
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
2190
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
2191
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
2192
|
+
type: z.ZodLiteral<"blocks">;
|
|
2193
|
+
}, "strip", z.ZodTypeAny, {
|
|
2194
|
+
__t4s_required?: boolean;
|
|
2195
|
+
pluginOptions?: any;
|
|
2196
|
+
required?: boolean;
|
|
2197
|
+
type?: "blocks";
|
|
2198
|
+
}, {
|
|
2199
|
+
__t4s_required?: boolean;
|
|
2200
|
+
pluginOptions?: any;
|
|
2201
|
+
required?: boolean;
|
|
2202
|
+
type?: "blocks";
|
|
2148
2203
|
}>, z.ZodObject<{
|
|
2149
2204
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
2150
2205
|
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
@@ -64,6 +64,21 @@ export declare const strapiComponent: z.ZodObject<{
|
|
|
64
64
|
pluginOptions?: any;
|
|
65
65
|
required?: boolean;
|
|
66
66
|
type?: "richtext";
|
|
67
|
+
}>, z.ZodObject<{
|
|
68
|
+
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
69
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
70
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
+
type: z.ZodLiteral<"blocks">;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
__t4s_required?: boolean;
|
|
74
|
+
pluginOptions?: any;
|
|
75
|
+
required?: boolean;
|
|
76
|
+
type?: "blocks";
|
|
77
|
+
}, {
|
|
78
|
+
__t4s_required?: boolean;
|
|
79
|
+
pluginOptions?: any;
|
|
80
|
+
required?: boolean;
|
|
81
|
+
type?: "blocks";
|
|
67
82
|
}>, z.ZodObject<{
|
|
68
83
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
69
84
|
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
@@ -492,6 +507,11 @@ export declare const strapiComponent: z.ZodObject<{
|
|
|
492
507
|
pluginOptions?: any;
|
|
493
508
|
required?: boolean;
|
|
494
509
|
type?: "richtext";
|
|
510
|
+
} | {
|
|
511
|
+
__t4s_required?: boolean;
|
|
512
|
+
pluginOptions?: any;
|
|
513
|
+
required?: boolean;
|
|
514
|
+
type?: "blocks";
|
|
495
515
|
} | {
|
|
496
516
|
__t4s_required?: boolean;
|
|
497
517
|
pluginOptions?: any;
|
|
@@ -652,6 +672,11 @@ export declare const strapiComponent: z.ZodObject<{
|
|
|
652
672
|
pluginOptions?: any;
|
|
653
673
|
required?: boolean;
|
|
654
674
|
type?: "richtext";
|
|
675
|
+
} | {
|
|
676
|
+
__t4s_required?: boolean;
|
|
677
|
+
pluginOptions?: any;
|
|
678
|
+
required?: boolean;
|
|
679
|
+
type?: "blocks";
|
|
655
680
|
} | {
|
|
656
681
|
__t4s_required?: boolean;
|
|
657
682
|
pluginOptions?: any;
|
|
@@ -63,6 +63,21 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
63
63
|
pluginOptions?: any;
|
|
64
64
|
required?: boolean;
|
|
65
65
|
type?: "richtext";
|
|
66
|
+
}>, z.ZodObject<{
|
|
67
|
+
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
68
|
+
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
69
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
type: z.ZodLiteral<"blocks">;
|
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
__t4s_required?: boolean;
|
|
73
|
+
pluginOptions?: any;
|
|
74
|
+
required?: boolean;
|
|
75
|
+
type?: "blocks";
|
|
76
|
+
}, {
|
|
77
|
+
__t4s_required?: boolean;
|
|
78
|
+
pluginOptions?: any;
|
|
79
|
+
required?: boolean;
|
|
80
|
+
type?: "blocks";
|
|
66
81
|
}>, z.ZodObject<{
|
|
67
82
|
__t4s_required: z.ZodOptional<z.ZodBoolean>;
|
|
68
83
|
pluginOptions: z.ZodOptional<z.ZodAny>;
|
|
@@ -516,6 +531,11 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
516
531
|
pluginOptions?: any;
|
|
517
532
|
required?: boolean;
|
|
518
533
|
type?: "richtext";
|
|
534
|
+
} | {
|
|
535
|
+
__t4s_required?: boolean;
|
|
536
|
+
pluginOptions?: any;
|
|
537
|
+
required?: boolean;
|
|
538
|
+
type?: "blocks";
|
|
519
539
|
} | {
|
|
520
540
|
__t4s_required?: boolean;
|
|
521
541
|
pluginOptions?: any;
|
|
@@ -685,6 +705,11 @@ export declare const strapiContentType: z.ZodObject<{
|
|
|
685
705
|
pluginOptions?: any;
|
|
686
706
|
required?: boolean;
|
|
687
707
|
type?: "richtext";
|
|
708
|
+
} | {
|
|
709
|
+
__t4s_required?: boolean;
|
|
710
|
+
pluginOptions?: any;
|
|
711
|
+
required?: boolean;
|
|
712
|
+
type?: "blocks";
|
|
688
713
|
} | {
|
|
689
714
|
__t4s_required?: boolean;
|
|
690
715
|
pluginOptions?: any;
|