@c-time/frelio-types 0.1.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.
@@ -0,0 +1,960 @@
1
+ import { z } from 'zod';
2
+ import { FieldDefinition, UiFieldDefinition, ContentType, ContentTypeUi, ContentTypeViews } from '../index.js';
3
+ import { FrelioBuildDataRecipe } from '@c-time/frelio-data-json-recipe';
4
+ import '@c-time/frelio-dependency-map';
5
+
6
+ /**
7
+ * JSON直接編集用のZodスキーマ定義
8
+ * ContentType, ContentTypeUi, FrelioBuildDataRecipe の検証用
9
+ */
10
+
11
+ declare const fieldTypeSchema: z.ZodEnum<["text", "html", "markdown", "number", "boolean", "date", "image", "file", "select", "relation", "array", "label"]>;
12
+ declare const fieldDefinitionSchema: z.ZodType<FieldDefinition>;
13
+ declare const contentTypeSchema: z.ZodObject<{
14
+ id: z.ZodString;
15
+ fields: z.ZodArray<z.ZodType<FieldDefinition, z.ZodTypeDef, FieldDefinition>, "many">;
16
+ }, "strip", z.ZodTypeAny, {
17
+ id: string;
18
+ fields: FieldDefinition[];
19
+ }, {
20
+ id: string;
21
+ fields: FieldDefinition[];
22
+ }>;
23
+ declare const aspectRatioSchema: z.ZodOptional<z.ZodNullable<z.ZodEnum<["16:9", "4:3", "3:2", "1:1", "free"]>>>;
24
+ declare const autoFormatSchema: z.ZodOptional<z.ZodNullable<z.ZodEnum<["trim", "lowercase", "uppercase", "slug", "phone", "postalCode"]>>>;
25
+ declare const uiFieldDefinitionSchema: z.ZodType<UiFieldDefinition>;
26
+ declare const fieldGroupDefinitionSchema: z.ZodObject<{
27
+ id: z.ZodString;
28
+ label: z.ZodString;
29
+ fieldKeys: z.ZodArray<z.ZodString, "many">;
30
+ }, "strip", z.ZodTypeAny, {
31
+ label: string;
32
+ id: string;
33
+ fieldKeys: string[];
34
+ }, {
35
+ label: string;
36
+ id: string;
37
+ fieldKeys: string[];
38
+ }>;
39
+ declare const contentTypeUiSchema: z.ZodObject<{
40
+ id: z.ZodString;
41
+ label: z.ZodString;
42
+ fields: z.ZodArray<z.ZodType<UiFieldDefinition, z.ZodTypeDef, UiFieldDefinition>, "many">;
43
+ groups: z.ZodArray<z.ZodObject<{
44
+ id: z.ZodString;
45
+ label: z.ZodString;
46
+ fieldKeys: z.ZodArray<z.ZodString, "many">;
47
+ }, "strip", z.ZodTypeAny, {
48
+ label: string;
49
+ id: string;
50
+ fieldKeys: string[];
51
+ }, {
52
+ label: string;
53
+ id: string;
54
+ fieldKeys: string[];
55
+ }>, "many">;
56
+ }, "strip", z.ZodTypeAny, {
57
+ label: string;
58
+ id: string;
59
+ fields: UiFieldDefinition[];
60
+ groups: {
61
+ label: string;
62
+ id: string;
63
+ fieldKeys: string[];
64
+ }[];
65
+ }, {
66
+ label: string;
67
+ id: string;
68
+ fields: UiFieldDefinition[];
69
+ groups: {
70
+ label: string;
71
+ id: string;
72
+ fieldKeys: string[];
73
+ }[];
74
+ }>;
75
+ declare const contentTypeViewsSchema: z.ZodObject<{
76
+ defaultViewId: z.ZodString;
77
+ views: z.ZodArray<z.ZodObject<{
78
+ id: z.ZodString;
79
+ label: z.ZodString;
80
+ columns: z.ZodArray<z.ZodObject<{
81
+ field: z.ZodString;
82
+ label: z.ZodString;
83
+ width: z.ZodOptional<z.ZodString>;
84
+ sortable: z.ZodOptional<z.ZodBoolean>;
85
+ }, "strip", z.ZodTypeAny, {
86
+ label: string;
87
+ field: string;
88
+ width?: string | undefined;
89
+ sortable?: boolean | undefined;
90
+ }, {
91
+ label: string;
92
+ field: string;
93
+ width?: string | undefined;
94
+ sortable?: boolean | undefined;
95
+ }>, "many">;
96
+ defaultSort: z.ZodOptional<z.ZodObject<{
97
+ field: z.ZodString;
98
+ direction: z.ZodEnum<["asc", "desc"]>;
99
+ }, "strip", z.ZodTypeAny, {
100
+ field: string;
101
+ direction: "asc" | "desc";
102
+ }, {
103
+ field: string;
104
+ direction: "asc" | "desc";
105
+ }>>;
106
+ filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
107
+ field: z.ZodString;
108
+ operator: z.ZodEnum<["eq", "neq", "in", "nin", "contains", "startsWith", "endsWith"]>;
109
+ value: z.ZodUnknown;
110
+ }, "strip", z.ZodTypeAny, {
111
+ field: string;
112
+ operator: "eq" | "neq" | "in" | "nin" | "contains" | "startsWith" | "endsWith";
113
+ value?: unknown;
114
+ }, {
115
+ field: string;
116
+ operator: "eq" | "neq" | "in" | "nin" | "contains" | "startsWith" | "endsWith";
117
+ value?: unknown;
118
+ }>, "many">>;
119
+ }, "strip", z.ZodTypeAny, {
120
+ label: string;
121
+ id: string;
122
+ columns: {
123
+ label: string;
124
+ field: string;
125
+ width?: string | undefined;
126
+ sortable?: boolean | undefined;
127
+ }[];
128
+ defaultSort?: {
129
+ field: string;
130
+ direction: "asc" | "desc";
131
+ } | undefined;
132
+ filters?: {
133
+ field: string;
134
+ operator: "eq" | "neq" | "in" | "nin" | "contains" | "startsWith" | "endsWith";
135
+ value?: unknown;
136
+ }[] | undefined;
137
+ }, {
138
+ label: string;
139
+ id: string;
140
+ columns: {
141
+ label: string;
142
+ field: string;
143
+ width?: string | undefined;
144
+ sortable?: boolean | undefined;
145
+ }[];
146
+ defaultSort?: {
147
+ field: string;
148
+ direction: "asc" | "desc";
149
+ } | undefined;
150
+ filters?: {
151
+ field: string;
152
+ operator: "eq" | "neq" | "in" | "nin" | "contains" | "startsWith" | "endsWith";
153
+ value?: unknown;
154
+ }[] | undefined;
155
+ }>, "many">;
156
+ }, "strip", z.ZodTypeAny, {
157
+ defaultViewId: string;
158
+ views: {
159
+ label: string;
160
+ id: string;
161
+ columns: {
162
+ label: string;
163
+ field: string;
164
+ width?: string | undefined;
165
+ sortable?: boolean | undefined;
166
+ }[];
167
+ defaultSort?: {
168
+ field: string;
169
+ direction: "asc" | "desc";
170
+ } | undefined;
171
+ filters?: {
172
+ field: string;
173
+ operator: "eq" | "neq" | "in" | "nin" | "contains" | "startsWith" | "endsWith";
174
+ value?: unknown;
175
+ }[] | undefined;
176
+ }[];
177
+ }, {
178
+ defaultViewId: string;
179
+ views: {
180
+ label: string;
181
+ id: string;
182
+ columns: {
183
+ label: string;
184
+ field: string;
185
+ width?: string | undefined;
186
+ sortable?: boolean | undefined;
187
+ }[];
188
+ defaultSort?: {
189
+ field: string;
190
+ direction: "asc" | "desc";
191
+ } | undefined;
192
+ filters?: {
193
+ field: string;
194
+ operator: "eq" | "neq" | "in" | "nin" | "contains" | "startsWith" | "endsWith";
195
+ value?: unknown;
196
+ }[] | undefined;
197
+ }[];
198
+ }>;
199
+ declare const siteRecipeSchema: z.ZodObject<{
200
+ version: z.ZodLiteral<"1.0">;
201
+ contentTypes: z.ZodRecord<z.ZodString, z.ZodObject<{
202
+ details: z.ZodOptional<z.ZodArray<z.ZodObject<{
203
+ type: z.ZodLiteral<"detail">;
204
+ outputPath: z.ZodString;
205
+ templatePath: z.ZodString;
206
+ expand: z.ZodOptional<z.ZodArray<z.ZodType<{
207
+ field: string;
208
+ fields?: string[];
209
+ customFields?: unknown[];
210
+ sort?: unknown;
211
+ limit?: number;
212
+ offset?: number;
213
+ filters?: unknown[];
214
+ expand?: unknown[];
215
+ }, z.ZodTypeDef, {
216
+ field: string;
217
+ fields?: string[];
218
+ customFields?: unknown[];
219
+ sort?: unknown;
220
+ limit?: number;
221
+ offset?: number;
222
+ filters?: unknown[];
223
+ expand?: unknown[];
224
+ }>, "many">>;
225
+ repeat: z.ZodOptional<z.ZodObject<{
226
+ as: z.ZodString;
227
+ field: z.ZodString;
228
+ outputPath: z.ZodString;
229
+ }, "strip", z.ZodTypeAny, {
230
+ field: string;
231
+ outputPath: string;
232
+ as: string;
233
+ }, {
234
+ field: string;
235
+ outputPath: string;
236
+ as: string;
237
+ }>>;
238
+ customFields: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
239
+ include: z.ZodOptional<z.ZodObject<{
240
+ site: z.ZodOptional<z.ZodBoolean>;
241
+ }, "strip", z.ZodTypeAny, {
242
+ site?: boolean | undefined;
243
+ }, {
244
+ site?: boolean | undefined;
245
+ }>>;
246
+ }, "strip", z.ZodTypeAny, {
247
+ type: "detail";
248
+ outputPath: string;
249
+ templatePath: string;
250
+ customFields?: unknown[] | undefined;
251
+ expand?: {
252
+ field: string;
253
+ fields?: string[];
254
+ customFields?: unknown[];
255
+ sort?: unknown;
256
+ limit?: number;
257
+ offset?: number;
258
+ filters?: unknown[];
259
+ expand?: unknown[];
260
+ }[] | undefined;
261
+ repeat?: {
262
+ field: string;
263
+ outputPath: string;
264
+ as: string;
265
+ } | undefined;
266
+ include?: {
267
+ site?: boolean | undefined;
268
+ } | undefined;
269
+ }, {
270
+ type: "detail";
271
+ outputPath: string;
272
+ templatePath: string;
273
+ customFields?: unknown[] | undefined;
274
+ expand?: {
275
+ field: string;
276
+ fields?: string[];
277
+ customFields?: unknown[];
278
+ sort?: unknown;
279
+ limit?: number;
280
+ offset?: number;
281
+ filters?: unknown[];
282
+ expand?: unknown[];
283
+ }[] | undefined;
284
+ repeat?: {
285
+ field: string;
286
+ outputPath: string;
287
+ as: string;
288
+ } | undefined;
289
+ include?: {
290
+ site?: boolean | undefined;
291
+ } | undefined;
292
+ }>, "many">>;
293
+ lists: z.ZodOptional<z.ZodArray<z.ZodObject<{
294
+ type: z.ZodLiteral<"list">;
295
+ outputPath: z.ZodString;
296
+ templatePath: z.ZodString;
297
+ offset: z.ZodOptional<z.ZodNumber>;
298
+ limit: z.ZodOptional<z.ZodNumber>;
299
+ sort: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
300
+ field: z.ZodString;
301
+ direction: z.ZodEnum<["asc", "desc"]>;
302
+ }, "strip", z.ZodTypeAny, {
303
+ field: string;
304
+ direction: "asc" | "desc";
305
+ }, {
306
+ field: string;
307
+ direction: "asc" | "desc";
308
+ }>, z.ZodArray<z.ZodObject<{
309
+ field: z.ZodString;
310
+ direction: z.ZodEnum<["asc", "desc"]>;
311
+ }, "strip", z.ZodTypeAny, {
312
+ field: string;
313
+ direction: "asc" | "desc";
314
+ }, {
315
+ field: string;
316
+ direction: "asc" | "desc";
317
+ }>, "many">]>>;
318
+ filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
319
+ field: z.ZodString;
320
+ operator: z.ZodEnum<["eq", "neq", "gt", "gte", "lt", "lte", "in", "nin", "regex", "isNull", "isNotNull"]>;
321
+ value: z.ZodOptional<z.ZodUnknown>;
322
+ }, "strip", z.ZodTypeAny, {
323
+ field: string;
324
+ operator: "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "regex" | "isNull" | "isNotNull";
325
+ value?: unknown;
326
+ }, {
327
+ field: string;
328
+ operator: "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "regex" | "isNull" | "isNotNull";
329
+ value?: unknown;
330
+ }>, "many">>;
331
+ customFields: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
332
+ listFields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
333
+ expand: z.ZodOptional<z.ZodArray<z.ZodType<{
334
+ field: string;
335
+ fields?: string[];
336
+ customFields?: unknown[];
337
+ sort?: unknown;
338
+ limit?: number;
339
+ offset?: number;
340
+ filters?: unknown[];
341
+ expand?: unknown[];
342
+ }, z.ZodTypeDef, {
343
+ field: string;
344
+ fields?: string[];
345
+ customFields?: unknown[];
346
+ sort?: unknown;
347
+ limit?: number;
348
+ offset?: number;
349
+ filters?: unknown[];
350
+ expand?: unknown[];
351
+ }>, "many">>;
352
+ pagination: z.ZodOptional<z.ZodObject<{
353
+ perPage: z.ZodNumber;
354
+ numberFormatCount: z.ZodOptional<z.ZodNumber>;
355
+ startPath: z.ZodOptional<z.ZodString>;
356
+ }, "strip", z.ZodTypeAny, {
357
+ perPage: number;
358
+ numberFormatCount?: number | undefined;
359
+ startPath?: string | undefined;
360
+ }, {
361
+ perPage: number;
362
+ numberFormatCount?: number | undefined;
363
+ startPath?: string | undefined;
364
+ }>>;
365
+ items: z.ZodOptional<z.ZodObject<{
366
+ fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
367
+ expand: z.ZodOptional<z.ZodArray<z.ZodType<{
368
+ field: string;
369
+ fields?: string[];
370
+ customFields?: unknown[];
371
+ sort?: unknown;
372
+ limit?: number;
373
+ offset?: number;
374
+ filters?: unknown[];
375
+ expand?: unknown[];
376
+ }, z.ZodTypeDef, {
377
+ field: string;
378
+ fields?: string[];
379
+ customFields?: unknown[];
380
+ sort?: unknown;
381
+ limit?: number;
382
+ offset?: number;
383
+ filters?: unknown[];
384
+ expand?: unknown[];
385
+ }>, "many">>;
386
+ }, "strip", z.ZodTypeAny, {
387
+ fields?: string[] | null | undefined;
388
+ expand?: {
389
+ field: string;
390
+ fields?: string[];
391
+ customFields?: unknown[];
392
+ sort?: unknown;
393
+ limit?: number;
394
+ offset?: number;
395
+ filters?: unknown[];
396
+ expand?: unknown[];
397
+ }[] | undefined;
398
+ }, {
399
+ fields?: string[] | null | undefined;
400
+ expand?: {
401
+ field: string;
402
+ fields?: string[];
403
+ customFields?: unknown[];
404
+ sort?: unknown;
405
+ limit?: number;
406
+ offset?: number;
407
+ filters?: unknown[];
408
+ expand?: unknown[];
409
+ }[] | undefined;
410
+ }>>;
411
+ }, "strip", z.ZodTypeAny, {
412
+ type: "list";
413
+ outputPath: string;
414
+ templatePath: string;
415
+ sort?: {
416
+ field: string;
417
+ direction: "asc" | "desc";
418
+ } | {
419
+ field: string;
420
+ direction: "asc" | "desc";
421
+ }[] | undefined;
422
+ filters?: {
423
+ field: string;
424
+ operator: "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "regex" | "isNull" | "isNotNull";
425
+ value?: unknown;
426
+ }[] | undefined;
427
+ customFields?: unknown[] | undefined;
428
+ limit?: number | undefined;
429
+ offset?: number | undefined;
430
+ expand?: {
431
+ field: string;
432
+ fields?: string[];
433
+ customFields?: unknown[];
434
+ sort?: unknown;
435
+ limit?: number;
436
+ offset?: number;
437
+ filters?: unknown[];
438
+ expand?: unknown[];
439
+ }[] | undefined;
440
+ listFields?: string[] | null | undefined;
441
+ pagination?: {
442
+ perPage: number;
443
+ numberFormatCount?: number | undefined;
444
+ startPath?: string | undefined;
445
+ } | undefined;
446
+ items?: {
447
+ fields?: string[] | null | undefined;
448
+ expand?: {
449
+ field: string;
450
+ fields?: string[];
451
+ customFields?: unknown[];
452
+ sort?: unknown;
453
+ limit?: number;
454
+ offset?: number;
455
+ filters?: unknown[];
456
+ expand?: unknown[];
457
+ }[] | undefined;
458
+ } | undefined;
459
+ }, {
460
+ type: "list";
461
+ outputPath: string;
462
+ templatePath: string;
463
+ sort?: {
464
+ field: string;
465
+ direction: "asc" | "desc";
466
+ } | {
467
+ field: string;
468
+ direction: "asc" | "desc";
469
+ }[] | undefined;
470
+ filters?: {
471
+ field: string;
472
+ operator: "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "regex" | "isNull" | "isNotNull";
473
+ value?: unknown;
474
+ }[] | undefined;
475
+ customFields?: unknown[] | undefined;
476
+ limit?: number | undefined;
477
+ offset?: number | undefined;
478
+ expand?: {
479
+ field: string;
480
+ fields?: string[];
481
+ customFields?: unknown[];
482
+ sort?: unknown;
483
+ limit?: number;
484
+ offset?: number;
485
+ filters?: unknown[];
486
+ expand?: unknown[];
487
+ }[] | undefined;
488
+ listFields?: string[] | null | undefined;
489
+ pagination?: {
490
+ perPage: number;
491
+ numberFormatCount?: number | undefined;
492
+ startPath?: string | undefined;
493
+ } | undefined;
494
+ items?: {
495
+ fields?: string[] | null | undefined;
496
+ expand?: {
497
+ field: string;
498
+ fields?: string[];
499
+ customFields?: unknown[];
500
+ sort?: unknown;
501
+ limit?: number;
502
+ offset?: number;
503
+ filters?: unknown[];
504
+ expand?: unknown[];
505
+ }[] | undefined;
506
+ } | undefined;
507
+ }>, "many">>;
508
+ }, "strip", z.ZodTypeAny, {
509
+ details?: {
510
+ type: "detail";
511
+ outputPath: string;
512
+ templatePath: string;
513
+ customFields?: unknown[] | undefined;
514
+ expand?: {
515
+ field: string;
516
+ fields?: string[];
517
+ customFields?: unknown[];
518
+ sort?: unknown;
519
+ limit?: number;
520
+ offset?: number;
521
+ filters?: unknown[];
522
+ expand?: unknown[];
523
+ }[] | undefined;
524
+ repeat?: {
525
+ field: string;
526
+ outputPath: string;
527
+ as: string;
528
+ } | undefined;
529
+ include?: {
530
+ site?: boolean | undefined;
531
+ } | undefined;
532
+ }[] | undefined;
533
+ lists?: {
534
+ type: "list";
535
+ outputPath: string;
536
+ templatePath: string;
537
+ sort?: {
538
+ field: string;
539
+ direction: "asc" | "desc";
540
+ } | {
541
+ field: string;
542
+ direction: "asc" | "desc";
543
+ }[] | undefined;
544
+ filters?: {
545
+ field: string;
546
+ operator: "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "regex" | "isNull" | "isNotNull";
547
+ value?: unknown;
548
+ }[] | undefined;
549
+ customFields?: unknown[] | undefined;
550
+ limit?: number | undefined;
551
+ offset?: number | undefined;
552
+ expand?: {
553
+ field: string;
554
+ fields?: string[];
555
+ customFields?: unknown[];
556
+ sort?: unknown;
557
+ limit?: number;
558
+ offset?: number;
559
+ filters?: unknown[];
560
+ expand?: unknown[];
561
+ }[] | undefined;
562
+ listFields?: string[] | null | undefined;
563
+ pagination?: {
564
+ perPage: number;
565
+ numberFormatCount?: number | undefined;
566
+ startPath?: string | undefined;
567
+ } | undefined;
568
+ items?: {
569
+ fields?: string[] | null | undefined;
570
+ expand?: {
571
+ field: string;
572
+ fields?: string[];
573
+ customFields?: unknown[];
574
+ sort?: unknown;
575
+ limit?: number;
576
+ offset?: number;
577
+ filters?: unknown[];
578
+ expand?: unknown[];
579
+ }[] | undefined;
580
+ } | undefined;
581
+ }[] | undefined;
582
+ }, {
583
+ details?: {
584
+ type: "detail";
585
+ outputPath: string;
586
+ templatePath: string;
587
+ customFields?: unknown[] | undefined;
588
+ expand?: {
589
+ field: string;
590
+ fields?: string[];
591
+ customFields?: unknown[];
592
+ sort?: unknown;
593
+ limit?: number;
594
+ offset?: number;
595
+ filters?: unknown[];
596
+ expand?: unknown[];
597
+ }[] | undefined;
598
+ repeat?: {
599
+ field: string;
600
+ outputPath: string;
601
+ as: string;
602
+ } | undefined;
603
+ include?: {
604
+ site?: boolean | undefined;
605
+ } | undefined;
606
+ }[] | undefined;
607
+ lists?: {
608
+ type: "list";
609
+ outputPath: string;
610
+ templatePath: string;
611
+ sort?: {
612
+ field: string;
613
+ direction: "asc" | "desc";
614
+ } | {
615
+ field: string;
616
+ direction: "asc" | "desc";
617
+ }[] | undefined;
618
+ filters?: {
619
+ field: string;
620
+ operator: "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "regex" | "isNull" | "isNotNull";
621
+ value?: unknown;
622
+ }[] | undefined;
623
+ customFields?: unknown[] | undefined;
624
+ limit?: number | undefined;
625
+ offset?: number | undefined;
626
+ expand?: {
627
+ field: string;
628
+ fields?: string[];
629
+ customFields?: unknown[];
630
+ sort?: unknown;
631
+ limit?: number;
632
+ offset?: number;
633
+ filters?: unknown[];
634
+ expand?: unknown[];
635
+ }[] | undefined;
636
+ listFields?: string[] | null | undefined;
637
+ pagination?: {
638
+ perPage: number;
639
+ numberFormatCount?: number | undefined;
640
+ startPath?: string | undefined;
641
+ } | undefined;
642
+ items?: {
643
+ fields?: string[] | null | undefined;
644
+ expand?: {
645
+ field: string;
646
+ fields?: string[];
647
+ customFields?: unknown[];
648
+ sort?: unknown;
649
+ limit?: number;
650
+ offset?: number;
651
+ filters?: unknown[];
652
+ expand?: unknown[];
653
+ }[] | undefined;
654
+ } | undefined;
655
+ }[] | undefined;
656
+ }>>;
657
+ staticPages: z.ZodOptional<z.ZodArray<z.ZodObject<{
658
+ type: z.ZodLiteral<"static">;
659
+ outputPath: z.ZodString;
660
+ templatePath: z.ZodString;
661
+ customFields: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
662
+ }, "strip", z.ZodTypeAny, {
663
+ type: "static";
664
+ outputPath: string;
665
+ templatePath: string;
666
+ customFields?: unknown[] | undefined;
667
+ }, {
668
+ type: "static";
669
+ outputPath: string;
670
+ templatePath: string;
671
+ customFields?: unknown[] | undefined;
672
+ }>, "many">>;
673
+ templateIncludes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
674
+ lastUpdatedAt: z.ZodString;
675
+ lastUpdatedBy: z.ZodString;
676
+ }, "strip", z.ZodTypeAny, {
677
+ version: "1.0";
678
+ contentTypes: Record<string, {
679
+ details?: {
680
+ type: "detail";
681
+ outputPath: string;
682
+ templatePath: string;
683
+ customFields?: unknown[] | undefined;
684
+ expand?: {
685
+ field: string;
686
+ fields?: string[];
687
+ customFields?: unknown[];
688
+ sort?: unknown;
689
+ limit?: number;
690
+ offset?: number;
691
+ filters?: unknown[];
692
+ expand?: unknown[];
693
+ }[] | undefined;
694
+ repeat?: {
695
+ field: string;
696
+ outputPath: string;
697
+ as: string;
698
+ } | undefined;
699
+ include?: {
700
+ site?: boolean | undefined;
701
+ } | undefined;
702
+ }[] | undefined;
703
+ lists?: {
704
+ type: "list";
705
+ outputPath: string;
706
+ templatePath: string;
707
+ sort?: {
708
+ field: string;
709
+ direction: "asc" | "desc";
710
+ } | {
711
+ field: string;
712
+ direction: "asc" | "desc";
713
+ }[] | undefined;
714
+ filters?: {
715
+ field: string;
716
+ operator: "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "regex" | "isNull" | "isNotNull";
717
+ value?: unknown;
718
+ }[] | undefined;
719
+ customFields?: unknown[] | undefined;
720
+ limit?: number | undefined;
721
+ offset?: number | undefined;
722
+ expand?: {
723
+ field: string;
724
+ fields?: string[];
725
+ customFields?: unknown[];
726
+ sort?: unknown;
727
+ limit?: number;
728
+ offset?: number;
729
+ filters?: unknown[];
730
+ expand?: unknown[];
731
+ }[] | undefined;
732
+ listFields?: string[] | null | undefined;
733
+ pagination?: {
734
+ perPage: number;
735
+ numberFormatCount?: number | undefined;
736
+ startPath?: string | undefined;
737
+ } | undefined;
738
+ items?: {
739
+ fields?: string[] | null | undefined;
740
+ expand?: {
741
+ field: string;
742
+ fields?: string[];
743
+ customFields?: unknown[];
744
+ sort?: unknown;
745
+ limit?: number;
746
+ offset?: number;
747
+ filters?: unknown[];
748
+ expand?: unknown[];
749
+ }[] | undefined;
750
+ } | undefined;
751
+ }[] | undefined;
752
+ }>;
753
+ lastUpdatedAt: string;
754
+ lastUpdatedBy: string;
755
+ staticPages?: {
756
+ type: "static";
757
+ outputPath: string;
758
+ templatePath: string;
759
+ customFields?: unknown[] | undefined;
760
+ }[] | undefined;
761
+ templateIncludes?: Record<string, string[]> | undefined;
762
+ }, {
763
+ version: "1.0";
764
+ contentTypes: Record<string, {
765
+ details?: {
766
+ type: "detail";
767
+ outputPath: string;
768
+ templatePath: string;
769
+ customFields?: unknown[] | undefined;
770
+ expand?: {
771
+ field: string;
772
+ fields?: string[];
773
+ customFields?: unknown[];
774
+ sort?: unknown;
775
+ limit?: number;
776
+ offset?: number;
777
+ filters?: unknown[];
778
+ expand?: unknown[];
779
+ }[] | undefined;
780
+ repeat?: {
781
+ field: string;
782
+ outputPath: string;
783
+ as: string;
784
+ } | undefined;
785
+ include?: {
786
+ site?: boolean | undefined;
787
+ } | undefined;
788
+ }[] | undefined;
789
+ lists?: {
790
+ type: "list";
791
+ outputPath: string;
792
+ templatePath: string;
793
+ sort?: {
794
+ field: string;
795
+ direction: "asc" | "desc";
796
+ } | {
797
+ field: string;
798
+ direction: "asc" | "desc";
799
+ }[] | undefined;
800
+ filters?: {
801
+ field: string;
802
+ operator: "eq" | "neq" | "in" | "nin" | "gt" | "gte" | "lt" | "lte" | "regex" | "isNull" | "isNotNull";
803
+ value?: unknown;
804
+ }[] | undefined;
805
+ customFields?: unknown[] | undefined;
806
+ limit?: number | undefined;
807
+ offset?: number | undefined;
808
+ expand?: {
809
+ field: string;
810
+ fields?: string[];
811
+ customFields?: unknown[];
812
+ sort?: unknown;
813
+ limit?: number;
814
+ offset?: number;
815
+ filters?: unknown[];
816
+ expand?: unknown[];
817
+ }[] | undefined;
818
+ listFields?: string[] | null | undefined;
819
+ pagination?: {
820
+ perPage: number;
821
+ numberFormatCount?: number | undefined;
822
+ startPath?: string | undefined;
823
+ } | undefined;
824
+ items?: {
825
+ fields?: string[] | null | undefined;
826
+ expand?: {
827
+ field: string;
828
+ fields?: string[];
829
+ customFields?: unknown[];
830
+ sort?: unknown;
831
+ limit?: number;
832
+ offset?: number;
833
+ filters?: unknown[];
834
+ expand?: unknown[];
835
+ }[] | undefined;
836
+ } | undefined;
837
+ }[] | undefined;
838
+ }>;
839
+ lastUpdatedAt: string;
840
+ lastUpdatedBy: string;
841
+ staticPages?: {
842
+ type: "static";
843
+ outputPath: string;
844
+ templatePath: string;
845
+ customFields?: unknown[] | undefined;
846
+ }[] | undefined;
847
+ templateIncludes?: Record<string, string[]> | undefined;
848
+ }>;
849
+ declare const contentTypeJsonSchema: z.ZodObject<{
850
+ contentType: z.ZodObject<{
851
+ id: z.ZodString;
852
+ fields: z.ZodArray<z.ZodType<FieldDefinition, z.ZodTypeDef, FieldDefinition>, "many">;
853
+ }, "strip", z.ZodTypeAny, {
854
+ id: string;
855
+ fields: FieldDefinition[];
856
+ }, {
857
+ id: string;
858
+ fields: FieldDefinition[];
859
+ }>;
860
+ contentTypeUi: z.ZodObject<{
861
+ id: z.ZodString;
862
+ label: z.ZodString;
863
+ fields: z.ZodArray<z.ZodType<UiFieldDefinition, z.ZodTypeDef, UiFieldDefinition>, "many">;
864
+ groups: z.ZodArray<z.ZodObject<{
865
+ id: z.ZodString;
866
+ label: z.ZodString;
867
+ fieldKeys: z.ZodArray<z.ZodString, "many">;
868
+ }, "strip", z.ZodTypeAny, {
869
+ label: string;
870
+ id: string;
871
+ fieldKeys: string[];
872
+ }, {
873
+ label: string;
874
+ id: string;
875
+ fieldKeys: string[];
876
+ }>, "many">;
877
+ }, "strip", z.ZodTypeAny, {
878
+ label: string;
879
+ id: string;
880
+ fields: UiFieldDefinition[];
881
+ groups: {
882
+ label: string;
883
+ id: string;
884
+ fieldKeys: string[];
885
+ }[];
886
+ }, {
887
+ label: string;
888
+ id: string;
889
+ fields: UiFieldDefinition[];
890
+ groups: {
891
+ label: string;
892
+ id: string;
893
+ fieldKeys: string[];
894
+ }[];
895
+ }>;
896
+ }, "strip", z.ZodTypeAny, {
897
+ contentType: {
898
+ id: string;
899
+ fields: FieldDefinition[];
900
+ };
901
+ contentTypeUi: {
902
+ label: string;
903
+ id: string;
904
+ fields: UiFieldDefinition[];
905
+ groups: {
906
+ label: string;
907
+ id: string;
908
+ fieldKeys: string[];
909
+ }[];
910
+ };
911
+ }, {
912
+ contentType: {
913
+ id: string;
914
+ fields: FieldDefinition[];
915
+ };
916
+ contentTypeUi: {
917
+ label: string;
918
+ id: string;
919
+ fields: UiFieldDefinition[];
920
+ groups: {
921
+ label: string;
922
+ id: string;
923
+ fieldKeys: string[];
924
+ }[];
925
+ };
926
+ }>;
927
+ type ContentTypeJson = z.infer<typeof contentTypeJsonSchema>;
928
+ type ValidationResult<T> = {
929
+ success: true;
930
+ data: T;
931
+ } | {
932
+ success: false;
933
+ errors: z.ZodError;
934
+ };
935
+ /**
936
+ * ContentType を検証
937
+ */
938
+ declare function validateContentType(json: unknown): ValidationResult<ContentType>;
939
+ /**
940
+ * ContentTypeUi を検証
941
+ */
942
+ declare function validateContentTypeUi(json: unknown): ValidationResult<ContentTypeUi>;
943
+ /**
944
+ * ContentType + ContentTypeUi の統合JSONを検証
945
+ */
946
+ declare function validateContentTypeJson(json: unknown): ValidationResult<ContentTypeJson>;
947
+ /**
948
+ * FrelioBuildDataRecipe を検証
949
+ */
950
+ declare function validateSiteRecipe(json: unknown): ValidationResult<FrelioBuildDataRecipe>;
951
+ /**
952
+ * ContentTypeViews を検証
953
+ */
954
+ declare function validateContentTypeViews(json: unknown): ValidationResult<ContentTypeViews>;
955
+ /**
956
+ * Zodエラーをユーザー向けのメッセージに変換
957
+ */
958
+ declare function formatZodErrors(errors: z.ZodError): string;
959
+
960
+ export { type ContentTypeJson, type ValidationResult, aspectRatioSchema, autoFormatSchema, contentTypeJsonSchema, contentTypeSchema, contentTypeUiSchema, contentTypeViewsSchema, fieldDefinitionSchema, fieldGroupDefinitionSchema, fieldTypeSchema, formatZodErrors, siteRecipeSchema, uiFieldDefinitionSchema, validateContentType, validateContentTypeJson, validateContentTypeUi, validateContentTypeViews, validateSiteRecipe };