@plainbrew/microcms-api-schema-schema 0.0.0 → 0.0.1-alpha.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.
package/schema.json ADDED
@@ -0,0 +1,800 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "apiFields": {
6
+ "type": "array",
7
+ "items": {
8
+ "oneOf": [
9
+ {
10
+ "type": "object",
11
+ "properties": {
12
+ "fieldId": {
13
+ "type": "string"
14
+ },
15
+ "name": {
16
+ "type": "string"
17
+ },
18
+ "description": {
19
+ "type": "string"
20
+ },
21
+ "required": {
22
+ "type": "boolean"
23
+ },
24
+ "kind": {
25
+ "type": "string",
26
+ "const": "text"
27
+ },
28
+ "isUnique": {
29
+ "type": "boolean"
30
+ },
31
+ "textSizeLimitValidation": {
32
+ "type": "object",
33
+ "properties": {
34
+ "textSize": {
35
+ "type": "object",
36
+ "properties": {
37
+ "min": {
38
+ "type": "number"
39
+ },
40
+ "max": {
41
+ "type": "number"
42
+ }
43
+ },
44
+ "additionalProperties": false
45
+ }
46
+ },
47
+ "required": [
48
+ "textSize"
49
+ ],
50
+ "additionalProperties": false
51
+ },
52
+ "patternMatchValidation": {
53
+ "type": "object",
54
+ "properties": {
55
+ "regexp": {
56
+ "type": "object",
57
+ "properties": {
58
+ "pattern": {
59
+ "type": "string"
60
+ },
61
+ "flags": {
62
+ "type": "string"
63
+ }
64
+ },
65
+ "required": [
66
+ "pattern"
67
+ ],
68
+ "additionalProperties": false
69
+ }
70
+ },
71
+ "required": [
72
+ "regexp"
73
+ ],
74
+ "additionalProperties": false
75
+ },
76
+ "selectItems": {
77
+ "type": "array",
78
+ "items": {
79
+ "type": "object",
80
+ "properties": {
81
+ "id": {
82
+ "type": "string"
83
+ },
84
+ "value": {
85
+ "type": "string"
86
+ }
87
+ },
88
+ "required": [
89
+ "id",
90
+ "value"
91
+ ],
92
+ "additionalProperties": false
93
+ }
94
+ },
95
+ "selectInitialValue": {
96
+ "type": "array",
97
+ "items": {
98
+ "type": "string"
99
+ }
100
+ },
101
+ "multipleSelect": {
102
+ "type": "boolean"
103
+ }
104
+ },
105
+ "required": [
106
+ "fieldId",
107
+ "name",
108
+ "required",
109
+ "kind"
110
+ ],
111
+ "additionalProperties": false
112
+ },
113
+ {
114
+ "type": "object",
115
+ "properties": {
116
+ "fieldId": {
117
+ "type": "string"
118
+ },
119
+ "name": {
120
+ "type": "string"
121
+ },
122
+ "description": {
123
+ "type": "string"
124
+ },
125
+ "required": {
126
+ "type": "boolean"
127
+ },
128
+ "kind": {
129
+ "type": "string",
130
+ "const": "textArea"
131
+ },
132
+ "textSizeLimitValidation": {
133
+ "type": "object",
134
+ "properties": {
135
+ "textSize": {
136
+ "type": "object",
137
+ "properties": {
138
+ "min": {
139
+ "type": "number"
140
+ },
141
+ "max": {
142
+ "type": "number"
143
+ }
144
+ },
145
+ "additionalProperties": false
146
+ }
147
+ },
148
+ "required": [
149
+ "textSize"
150
+ ],
151
+ "additionalProperties": false
152
+ },
153
+ "patternMatchValidation": {
154
+ "type": "object",
155
+ "properties": {
156
+ "regexp": {
157
+ "type": "object",
158
+ "properties": {
159
+ "pattern": {
160
+ "type": "string"
161
+ },
162
+ "flags": {
163
+ "type": "string"
164
+ }
165
+ },
166
+ "required": [
167
+ "pattern"
168
+ ],
169
+ "additionalProperties": false
170
+ }
171
+ },
172
+ "required": [
173
+ "regexp"
174
+ ],
175
+ "additionalProperties": false
176
+ }
177
+ },
178
+ "required": [
179
+ "fieldId",
180
+ "name",
181
+ "required",
182
+ "kind"
183
+ ],
184
+ "additionalProperties": false
185
+ },
186
+ {
187
+ "type": "object",
188
+ "properties": {
189
+ "fieldId": {
190
+ "type": "string"
191
+ },
192
+ "name": {
193
+ "type": "string"
194
+ },
195
+ "description": {
196
+ "type": "string"
197
+ },
198
+ "required": {
199
+ "type": "boolean"
200
+ },
201
+ "kind": {
202
+ "type": "string",
203
+ "const": "richEditor"
204
+ },
205
+ "richEditorImageSize": {
206
+ "type": "boolean"
207
+ },
208
+ "richEditorOptions": {
209
+ "type": "array",
210
+ "items": {
211
+ "type": "string",
212
+ "enum": [
213
+ "headerOne",
214
+ "headerTwo",
215
+ "headerThree",
216
+ "headerFour",
217
+ "headerFive",
218
+ "paragraph",
219
+ "sizeSmall",
220
+ "sizeNormal",
221
+ "sizeLarge",
222
+ "sizeHuge",
223
+ "bold",
224
+ "italic",
225
+ "underline",
226
+ "strike",
227
+ "code",
228
+ "background",
229
+ "color",
230
+ "align",
231
+ "blockquote",
232
+ "codeBlock",
233
+ "listOrdered",
234
+ "listBullet",
235
+ "indentRemove",
236
+ "indentAdd",
237
+ "scriptSub",
238
+ "scriptSuper",
239
+ "link",
240
+ "image",
241
+ "oembedly",
242
+ "clean"
243
+ ]
244
+ }
245
+ }
246
+ },
247
+ "required": [
248
+ "fieldId",
249
+ "name",
250
+ "required",
251
+ "kind"
252
+ ],
253
+ "additionalProperties": false
254
+ },
255
+ {
256
+ "type": "object",
257
+ "properties": {
258
+ "fieldId": {
259
+ "type": "string"
260
+ },
261
+ "name": {
262
+ "type": "string"
263
+ },
264
+ "description": {
265
+ "type": "string"
266
+ },
267
+ "required": {
268
+ "type": "boolean"
269
+ },
270
+ "kind": {
271
+ "type": "string",
272
+ "const": "richEditorV2"
273
+ },
274
+ "richEditorV2Options": {
275
+ "type": "array",
276
+ "items": {
277
+ "type": "string",
278
+ "enum": [
279
+ "undo",
280
+ "redo",
281
+ "bold",
282
+ "italic",
283
+ "underline",
284
+ "strike",
285
+ "code",
286
+ "listBullet",
287
+ "listOrdered",
288
+ "link",
289
+ "file",
290
+ "image",
291
+ "table",
292
+ "horizontalRule",
293
+ "textAlign",
294
+ "oembedly",
295
+ "clean",
296
+ "color",
297
+ "size",
298
+ "customClass",
299
+ "headerOne",
300
+ "headerTwo",
301
+ "headerThree",
302
+ "headerFour",
303
+ "headerFive",
304
+ "paragraph",
305
+ "blockquote",
306
+ "codeBlock"
307
+ ]
308
+ }
309
+ },
310
+ "richEditorV2ColorList": {
311
+ "type": "array",
312
+ "items": {
313
+ "type": "object",
314
+ "properties": {
315
+ "id": {
316
+ "type": "string"
317
+ },
318
+ "value": {
319
+ "type": "string"
320
+ }
321
+ },
322
+ "required": [
323
+ "id",
324
+ "value"
325
+ ],
326
+ "additionalProperties": false
327
+ }
328
+ },
329
+ "richEditorV2HideColorPicker": {
330
+ "type": "boolean"
331
+ },
332
+ "richEditorV2FontSizeList": {
333
+ "type": "array",
334
+ "items": {
335
+ "type": "object",
336
+ "properties": {
337
+ "id": {
338
+ "type": "string"
339
+ },
340
+ "name": {
341
+ "type": "string"
342
+ },
343
+ "value": {
344
+ "type": "string"
345
+ }
346
+ },
347
+ "required": [
348
+ "id",
349
+ "name",
350
+ "value"
351
+ ],
352
+ "additionalProperties": false
353
+ }
354
+ },
355
+ "customClassList": {
356
+ "type": "array",
357
+ "items": {
358
+ "type": "object",
359
+ "properties": {
360
+ "id": {
361
+ "type": "string"
362
+ },
363
+ "name": {
364
+ "type": "string"
365
+ },
366
+ "value": {
367
+ "type": "string"
368
+ }
369
+ },
370
+ "required": [
371
+ "id",
372
+ "name",
373
+ "value"
374
+ ],
375
+ "additionalProperties": false
376
+ }
377
+ }
378
+ },
379
+ "required": [
380
+ "fieldId",
381
+ "name",
382
+ "required",
383
+ "kind"
384
+ ],
385
+ "additionalProperties": false
386
+ },
387
+ {
388
+ "type": "object",
389
+ "properties": {
390
+ "fieldId": {
391
+ "type": "string"
392
+ },
393
+ "name": {
394
+ "type": "string"
395
+ },
396
+ "description": {
397
+ "type": "string"
398
+ },
399
+ "required": {
400
+ "type": "boolean"
401
+ },
402
+ "kind": {
403
+ "type": "string",
404
+ "const": "media"
405
+ },
406
+ "imageSizeValidation": {
407
+ "type": "object",
408
+ "properties": {
409
+ "imageSize": {
410
+ "type": "object",
411
+ "properties": {
412
+ "width": {
413
+ "type": "number"
414
+ },
415
+ "height": {
416
+ "type": "number"
417
+ }
418
+ },
419
+ "required": [
420
+ "width",
421
+ "height"
422
+ ],
423
+ "additionalProperties": false
424
+ }
425
+ },
426
+ "required": [
427
+ "imageSize"
428
+ ],
429
+ "additionalProperties": false
430
+ }
431
+ },
432
+ "required": [
433
+ "fieldId",
434
+ "name",
435
+ "required",
436
+ "kind"
437
+ ],
438
+ "additionalProperties": false
439
+ },
440
+ {
441
+ "type": "object",
442
+ "properties": {
443
+ "fieldId": {
444
+ "type": "string"
445
+ },
446
+ "name": {
447
+ "type": "string"
448
+ },
449
+ "description": {
450
+ "type": "string"
451
+ },
452
+ "required": {
453
+ "type": "boolean"
454
+ },
455
+ "kind": {
456
+ "type": "string",
457
+ "const": "mediaList"
458
+ },
459
+ "imageSizeValidation": {
460
+ "type": "object",
461
+ "properties": {
462
+ "imageSize": {
463
+ "type": "object",
464
+ "properties": {
465
+ "width": {
466
+ "type": "number"
467
+ },
468
+ "height": {
469
+ "type": "number"
470
+ }
471
+ },
472
+ "required": [
473
+ "width",
474
+ "height"
475
+ ],
476
+ "additionalProperties": false
477
+ }
478
+ },
479
+ "required": [
480
+ "imageSize"
481
+ ],
482
+ "additionalProperties": false
483
+ },
484
+ "mediaListLayout": {
485
+ "type": "string",
486
+ "enum": [
487
+ "HORIZONTAL_SCROLL",
488
+ "GRID_2",
489
+ "GRID_3",
490
+ "GRID_4"
491
+ ]
492
+ }
493
+ },
494
+ "required": [
495
+ "fieldId",
496
+ "name",
497
+ "required",
498
+ "kind"
499
+ ],
500
+ "additionalProperties": false
501
+ },
502
+ {
503
+ "type": "object",
504
+ "properties": {
505
+ "fieldId": {
506
+ "type": "string"
507
+ },
508
+ "name": {
509
+ "type": "string"
510
+ },
511
+ "description": {
512
+ "type": "string"
513
+ },
514
+ "required": {
515
+ "type": "boolean"
516
+ },
517
+ "kind": {
518
+ "type": "string",
519
+ "const": "date"
520
+ },
521
+ "dateFormat": {
522
+ "type": "boolean"
523
+ }
524
+ },
525
+ "required": [
526
+ "fieldId",
527
+ "name",
528
+ "required",
529
+ "kind"
530
+ ],
531
+ "additionalProperties": false
532
+ },
533
+ {
534
+ "type": "object",
535
+ "properties": {
536
+ "fieldId": {
537
+ "type": "string"
538
+ },
539
+ "name": {
540
+ "type": "string"
541
+ },
542
+ "description": {
543
+ "type": "string"
544
+ },
545
+ "required": {
546
+ "type": "boolean"
547
+ },
548
+ "kind": {
549
+ "type": "string",
550
+ "const": "boolean"
551
+ },
552
+ "booleanInitialValue": {
553
+ "type": "boolean"
554
+ }
555
+ },
556
+ "required": [
557
+ "fieldId",
558
+ "name",
559
+ "required",
560
+ "kind"
561
+ ],
562
+ "additionalProperties": false
563
+ },
564
+ {
565
+ "type": "object",
566
+ "properties": {
567
+ "fieldId": {
568
+ "type": "string"
569
+ },
570
+ "name": {
571
+ "type": "string"
572
+ },
573
+ "description": {
574
+ "type": "string"
575
+ },
576
+ "required": {
577
+ "type": "boolean"
578
+ },
579
+ "kind": {
580
+ "type": "string",
581
+ "const": "select"
582
+ },
583
+ "selectItems": {
584
+ "type": "array",
585
+ "items": {
586
+ "type": "object",
587
+ "properties": {
588
+ "id": {
589
+ "type": "string"
590
+ },
591
+ "value": {
592
+ "type": "string"
593
+ }
594
+ },
595
+ "required": [
596
+ "id",
597
+ "value"
598
+ ],
599
+ "additionalProperties": false
600
+ }
601
+ },
602
+ "selectInitialValue": {
603
+ "type": "array",
604
+ "items": {
605
+ "type": "string"
606
+ }
607
+ },
608
+ "multipleSelect": {
609
+ "type": "boolean"
610
+ }
611
+ },
612
+ "required": [
613
+ "fieldId",
614
+ "name",
615
+ "required",
616
+ "kind",
617
+ "selectItems",
618
+ "selectInitialValue",
619
+ "multipleSelect"
620
+ ],
621
+ "additionalProperties": false
622
+ },
623
+ {
624
+ "type": "object",
625
+ "properties": {
626
+ "fieldId": {
627
+ "type": "string"
628
+ },
629
+ "name": {
630
+ "type": "string"
631
+ },
632
+ "description": {
633
+ "type": "string"
634
+ },
635
+ "required": {
636
+ "type": "boolean"
637
+ },
638
+ "kind": {
639
+ "type": "string",
640
+ "const": "relation"
641
+ },
642
+ "referenceDisplayItem": {
643
+ "type": "string"
644
+ }
645
+ },
646
+ "required": [
647
+ "fieldId",
648
+ "name",
649
+ "required",
650
+ "kind"
651
+ ],
652
+ "additionalProperties": false
653
+ },
654
+ {
655
+ "type": "object",
656
+ "properties": {
657
+ "fieldId": {
658
+ "type": "string"
659
+ },
660
+ "name": {
661
+ "type": "string"
662
+ },
663
+ "description": {
664
+ "type": "string"
665
+ },
666
+ "required": {
667
+ "type": "boolean"
668
+ },
669
+ "kind": {
670
+ "type": "string",
671
+ "const": "relationList"
672
+ },
673
+ "referenceDisplayItem": {
674
+ "type": "string"
675
+ },
676
+ "relationListCountLimitValidation": {
677
+ "type": "object",
678
+ "properties": {
679
+ "relationListCount": {
680
+ "type": "object",
681
+ "properties": {
682
+ "min": {
683
+ "type": "number"
684
+ },
685
+ "max": {
686
+ "type": "number"
687
+ }
688
+ },
689
+ "additionalProperties": false
690
+ }
691
+ },
692
+ "required": [
693
+ "relationListCount"
694
+ ],
695
+ "additionalProperties": false
696
+ }
697
+ },
698
+ "required": [
699
+ "fieldId",
700
+ "name",
701
+ "required",
702
+ "kind"
703
+ ],
704
+ "additionalProperties": false
705
+ },
706
+ {
707
+ "type": "object",
708
+ "properties": {
709
+ "fieldId": {
710
+ "type": "string"
711
+ },
712
+ "name": {
713
+ "type": "string"
714
+ },
715
+ "description": {
716
+ "type": "string"
717
+ },
718
+ "required": {
719
+ "type": "boolean"
720
+ },
721
+ "kind": {
722
+ "type": "string",
723
+ "const": "number"
724
+ },
725
+ "numberSizeLimitValidation": {
726
+ "type": "object",
727
+ "properties": {
728
+ "numberSize": {
729
+ "type": "object",
730
+ "properties": {
731
+ "min": {
732
+ "type": "number"
733
+ },
734
+ "max": {
735
+ "type": "number"
736
+ }
737
+ },
738
+ "additionalProperties": false
739
+ }
740
+ },
741
+ "required": [
742
+ "numberSize"
743
+ ],
744
+ "additionalProperties": false
745
+ }
746
+ },
747
+ "required": [
748
+ "fieldId",
749
+ "name",
750
+ "required",
751
+ "kind"
752
+ ],
753
+ "additionalProperties": false
754
+ },
755
+ {
756
+ "type": "object",
757
+ "properties": {
758
+ "fieldId": {
759
+ "type": "string"
760
+ },
761
+ "name": {
762
+ "type": "string"
763
+ },
764
+ "description": {
765
+ "type": "string"
766
+ },
767
+ "required": {
768
+ "type": "boolean"
769
+ },
770
+ "kind": {
771
+ "type": "string",
772
+ "const": "iframe"
773
+ },
774
+ "iframeUrl": {
775
+ "type": "string"
776
+ }
777
+ },
778
+ "required": [
779
+ "fieldId",
780
+ "name",
781
+ "required",
782
+ "kind",
783
+ "iframeUrl"
784
+ ],
785
+ "additionalProperties": false
786
+ }
787
+ ]
788
+ }
789
+ },
790
+ "customFields": {
791
+ "type": "array",
792
+ "items": {}
793
+ }
794
+ },
795
+ "required": [
796
+ "apiFields",
797
+ "customFields"
798
+ ],
799
+ "additionalProperties": false
800
+ }