@commercelayer/demo-store-types 1.0.0 → 1.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.
Files changed (38) hide show
  1. package/README.md +105 -21
  2. package/dist/config/facets.config.d.ts +8 -8
  3. package/dist/config/general.config.d.ts +1 -1
  4. package/dist/config/variants.config.d.ts +5 -5
  5. package/dist/json/catalogs.d.ts +34 -24
  6. package/dist/json/catalogs.js +2 -2
  7. package/dist/json/countries.d.ts +44 -38
  8. package/dist/json/countries.js +2 -2
  9. package/dist/json/languages.d.ts +23 -23
  10. package/dist/json/languages.js +2 -2
  11. package/dist/json/organization.d.ts +45 -33
  12. package/dist/json/organization.js +1 -2
  13. package/dist/json/page-components/carousel.d.ts +19 -0
  14. package/dist/json/page-components/carousel.js +10 -0
  15. package/dist/json/page-components/grid.d.ts +17 -0
  16. package/dist/json/page-components/grid.js +10 -0
  17. package/dist/json/page-components/hero.d.ts +33 -0
  18. package/dist/json/page-components/hero.js +13 -0
  19. package/dist/json/page-components/image.d.ts +12 -0
  20. package/dist/json/page-components/image.js +8 -0
  21. package/dist/json/page-components/item.d.ts +31 -0
  22. package/dist/json/page-components/item.js +12 -0
  23. package/dist/json/page-components/markdown.d.ts +18 -0
  24. package/dist/json/page-components/markdown.js +20 -0
  25. package/dist/json/page-components/product-grid.d.ts +20 -0
  26. package/dist/json/page-components/product-grid.js +10 -0
  27. package/dist/json/pages.d.ts +120 -1195
  28. package/dist/json/pages.js +17 -50
  29. package/dist/json/products.d.ts +194 -126
  30. package/dist/json/products.js +8 -2
  31. package/dist/json/taxonomies.d.ts +38 -29
  32. package/dist/json/taxonomies.js +2 -2
  33. package/dist/json/taxons.d.ts +65 -80
  34. package/dist/json/taxons.js +2 -2
  35. package/dist/utils/locale.d.ts +11 -5
  36. package/dist/utils/locale.js +6 -1
  37. package/dist/utils/sort.d.ts +2 -2
  38. package/package.json +4 -4
@@ -1,1202 +1,127 @@
1
1
  import { z } from 'zod';
2
- declare const carousel_schema: z.ZodObject<{
3
- type: z.ZodLiteral<"carousel">;
4
- id: z.ZodString;
5
- slides: z.ZodArray<z.ZodObject<{
6
- image: z.ZodObject<{
7
- src: z.ZodString;
8
- alt: z.ZodString;
9
- }, "strip", z.ZodTypeAny, {
10
- src: string;
11
- alt: string;
12
- }, {
13
- src: string;
14
- alt: string;
15
- }>;
16
- title: z.ZodString;
17
- description: z.ZodString;
18
- linkLabel: z.ZodString;
19
- linkHref: z.ZodString;
20
- }, "strip", z.ZodTypeAny, {
21
- image: {
22
- src: string;
23
- alt: string;
24
- };
25
- title: string;
26
- description: string;
27
- linkLabel: string;
28
- linkHref: string;
29
- }, {
30
- image: {
31
- src: string;
32
- alt: string;
33
- };
34
- title: string;
35
- description: string;
36
- linkLabel: string;
37
- linkHref: string;
38
- }>, "many">;
39
- }, "strip", z.ZodTypeAny, {
40
- id: string;
41
- type: "carousel";
42
- slides: {
43
- image: {
44
- src: string;
45
- alt: string;
46
- };
47
- title: string;
48
- description: string;
49
- linkLabel: string;
50
- linkHref: string;
51
- }[];
52
- }, {
53
- id: string;
54
- type: "carousel";
55
- slides: {
56
- image: {
57
- src: string;
58
- alt: string;
59
- };
60
- title: string;
61
- description: string;
62
- linkLabel: string;
63
- linkHref: string;
64
- }[];
65
- }>;
66
- declare const hero_schema: z.ZodObject<{
67
- type: z.ZodLiteral<"hero">;
68
- id: z.ZodString;
69
- image: z.ZodObject<{
70
- src: z.ZodString;
71
- alt: z.ZodString;
72
- }, "strip", z.ZodTypeAny, {
73
- src: string;
74
- alt: string;
75
- }, {
76
- src: string;
77
- alt: string;
78
- }>;
79
- title: z.ZodString;
80
- description: z.ZodOptional<z.ZodString>;
81
- href: z.ZodString;
82
- }, "strip", z.ZodTypeAny, {
83
- description?: string | undefined;
84
- id: string;
85
- type: "hero";
86
- image: {
87
- src: string;
88
- alt: string;
89
- };
90
- title: string;
91
- href: string;
92
- }, {
93
- description?: string | undefined;
94
- id: string;
95
- type: "hero";
96
- image: {
97
- src: string;
98
- alt: string;
99
- };
100
- title: string;
101
- href: string;
102
- }>;
103
- declare const productGrid_schema: z.ZodObject<{
104
- type: z.ZodLiteral<"product-grid">;
105
- id: z.ZodString;
106
- title: z.ZodString;
107
- skus: z.ZodArray<z.ZodString, "many">;
108
- }, "strip", z.ZodTypeAny, {
109
- id: string;
110
- type: "product-grid";
111
- title: string;
112
- skus: string[];
113
- }, {
114
- id: string;
115
- type: "product-grid";
116
- title: string;
117
- skus: string[];
118
- }>;
119
- declare const grid_schema: z.ZodObject<{
120
- type: z.ZodLiteral<"grid">;
121
- id: z.ZodString;
122
- items: z.ZodArray<z.ZodObject<{
123
- image: z.ZodObject<{
124
- src: z.ZodString;
125
- alt: z.ZodString;
126
- }, "strip", z.ZodTypeAny, {
127
- src: string;
128
- alt: string;
129
- }, {
130
- src: string;
131
- alt: string;
132
- }>;
133
- title: z.ZodString;
134
- description: z.ZodString;
135
- linkLabel: z.ZodString;
136
- linkHref: z.ZodString;
137
- }, "strip", z.ZodTypeAny, {
138
- image: {
139
- src: string;
140
- alt: string;
141
- };
142
- title: string;
143
- description: string;
144
- linkLabel: string;
145
- linkHref: string;
146
- }, {
147
- image: {
148
- src: string;
149
- alt: string;
150
- };
151
- title: string;
152
- description: string;
153
- linkLabel: string;
154
- linkHref: string;
155
- }>, "many">;
156
- }, "strip", z.ZodTypeAny, {
157
- id: string;
158
- type: "grid";
159
- items: {
160
- image: {
161
- src: string;
162
- alt: string;
163
- };
164
- title: string;
165
- description: string;
166
- linkLabel: string;
167
- linkHref: string;
168
- }[];
169
- }, {
170
- id: string;
171
- type: "grid";
172
- items: {
173
- image: {
174
- src: string;
175
- alt: string;
176
- };
177
- title: string;
178
- description: string;
179
- linkLabel: string;
180
- linkHref: string;
181
- }[];
182
- }>;
183
- declare const markdown_schema: z.ZodObject<{
184
- type: z.ZodLiteral<"markdown">;
185
- id: z.ZodString;
186
- content: z.ZodString;
187
- }, "strip", z.ZodTypeAny, {
188
- id: string;
189
- type: "markdown";
190
- content: string;
191
- }, {
192
- id: string;
193
- type: "markdown";
194
- content: string;
195
- }>;
196
- declare const pages_schema: z.ZodObject<{}, "strip", z.ZodObject<{}, "strip", z.ZodOptional<z.ZodObject<{
2
+ import { LocalizedFieldSchema } from '../utils/locale';
3
+ import { CarouselSchema } from './page-components/carousel';
4
+ import { GridSchema } from './page-components/grid';
5
+ import { HeroSchema } from './page-components/hero';
6
+ import { MarkdownSchema } from './page-components/markdown';
7
+ import { ProductGridSchema } from './page-components/product-grid';
8
+ type RawDataPageSchema = z.ZodObject<{
9
+ /**
10
+ * The page title
11
+ *
12
+ * This title is also used to display the browser title (`<title>Page title</title>`)
13
+ * @example "Page title"
14
+ */
197
15
  title: z.ZodOptional<z.ZodString>;
16
+ /**
17
+ * The page description
18
+ *
19
+ * This description is also used to set the browser description (`<meta name="description" content="This is the page description"/>`)
20
+ * @example "This is the page description"
21
+ */
198
22
  description: z.ZodOptional<z.ZodString>;
199
- components: z.ZodArray<z.ZodDiscriminatedUnion<"type", z.Primitive, z.ZodObject<{
200
- type: z.ZodLiteral<"carousel">;
201
- id: z.ZodString;
202
- slides: z.ZodArray<z.ZodObject<{
203
- image: z.ZodObject<{
204
- src: z.ZodString;
205
- alt: z.ZodString;
206
- }, "strip", z.ZodTypeAny, {
207
- src: string;
208
- alt: string;
209
- }, {
210
- src: string;
211
- alt: string;
212
- }>;
213
- title: z.ZodString;
214
- description: z.ZodString;
215
- linkLabel: z.ZodString;
216
- linkHref: z.ZodString;
217
- }, "strip", z.ZodTypeAny, {
218
- image: {
219
- src: string;
220
- alt: string;
221
- };
222
- title: string;
223
- description: string;
224
- linkLabel: string;
225
- linkHref: string;
226
- }, {
227
- image: {
228
- src: string;
229
- alt: string;
230
- };
231
- title: string;
232
- description: string;
233
- linkLabel: string;
234
- linkHref: string;
235
- }>, "many">;
236
- }, "strip", z.ZodTypeAny, {
237
- id: string;
238
- type: "carousel";
239
- slides: {
240
- image: {
241
- src: string;
242
- alt: string;
243
- };
244
- title: string;
245
- description: string;
246
- linkLabel: string;
247
- linkHref: string;
248
- }[];
249
- }, {
250
- id: string;
251
- type: "carousel";
252
- slides: {
253
- image: {
254
- src: string;
255
- alt: string;
256
- };
257
- title: string;
258
- description: string;
259
- linkLabel: string;
260
- linkHref: string;
261
- }[];
262
- }> | z.ZodObject<{
263
- type: z.ZodLiteral<"hero">;
264
- id: z.ZodString;
265
- image: z.ZodObject<{
266
- src: z.ZodString;
267
- alt: z.ZodString;
268
- }, "strip", z.ZodTypeAny, {
269
- src: string;
270
- alt: string;
271
- }, {
272
- src: string;
273
- alt: string;
274
- }>;
275
- title: z.ZodString;
276
- description: z.ZodOptional<z.ZodString>;
277
- href: z.ZodString;
278
- }, "strip", z.ZodTypeAny, {
279
- description?: string | undefined;
280
- id: string;
281
- type: "hero";
282
- image: {
283
- src: string;
284
- alt: string;
285
- };
286
- title: string;
287
- href: string;
288
- }, {
289
- description?: string | undefined;
290
- id: string;
291
- type: "hero";
292
- image: {
293
- src: string;
294
- alt: string;
295
- };
296
- title: string;
297
- href: string;
298
- }> | z.ZodObject<{
299
- type: z.ZodLiteral<"product-grid">;
300
- id: z.ZodString;
301
- title: z.ZodString;
302
- skus: z.ZodArray<z.ZodString, "many">;
303
- }, "strip", z.ZodTypeAny, {
304
- id: string;
305
- type: "product-grid";
306
- title: string;
307
- skus: string[];
308
- }, {
309
- id: string;
310
- type: "product-grid";
311
- title: string;
312
- skus: string[];
313
- }> | z.ZodObject<{
314
- type: z.ZodLiteral<"grid">;
315
- id: z.ZodString;
316
- items: z.ZodArray<z.ZodObject<{
317
- image: z.ZodObject<{
318
- src: z.ZodString;
319
- alt: z.ZodString;
320
- }, "strip", z.ZodTypeAny, {
321
- src: string;
322
- alt: string;
323
- }, {
324
- src: string;
325
- alt: string;
326
- }>;
327
- title: z.ZodString;
328
- description: z.ZodString;
329
- linkLabel: z.ZodString;
330
- linkHref: z.ZodString;
331
- }, "strip", z.ZodTypeAny, {
332
- image: {
333
- src: string;
334
- alt: string;
335
- };
336
- title: string;
337
- description: string;
338
- linkLabel: string;
339
- linkHref: string;
340
- }, {
341
- image: {
342
- src: string;
343
- alt: string;
344
- };
345
- title: string;
346
- description: string;
347
- linkLabel: string;
348
- linkHref: string;
349
- }>, "many">;
350
- }, "strip", z.ZodTypeAny, {
351
- id: string;
352
- type: "grid";
353
- items: {
354
- image: {
355
- src: string;
356
- alt: string;
357
- };
358
- title: string;
359
- description: string;
360
- linkLabel: string;
361
- linkHref: string;
362
- }[];
363
- }, {
364
- id: string;
365
- type: "grid";
366
- items: {
367
- image: {
368
- src: string;
369
- alt: string;
370
- };
371
- title: string;
372
- description: string;
373
- linkLabel: string;
374
- linkHref: string;
375
- }[];
376
- }> | z.ZodObject<{
377
- type: z.ZodLiteral<"markdown">;
378
- id: z.ZodString;
379
- content: z.ZodString;
380
- }, "strip", z.ZodTypeAny, {
381
- id: string;
382
- type: "markdown";
383
- content: string;
384
- }, {
385
- id: string;
386
- type: "markdown";
387
- content: string;
388
- }>>, "many">;
389
- }, "strip", z.ZodTypeAny, {
390
- title?: string | undefined;
391
- description?: string | undefined;
392
- components: ({
393
- id: string;
394
- type: "carousel";
395
- slides: {
396
- image: {
397
- src: string;
398
- alt: string;
399
- };
400
- title: string;
401
- description: string;
402
- linkLabel: string;
403
- linkHref: string;
404
- }[];
405
- } | {
406
- description?: string | undefined;
407
- id: string;
408
- type: "hero";
409
- image: {
410
- src: string;
411
- alt: string;
412
- };
413
- title: string;
414
- href: string;
415
- } | {
416
- id: string;
417
- type: "product-grid";
418
- title: string;
419
- skus: string[];
420
- } | {
421
- id: string;
422
- type: "grid";
423
- items: {
424
- image: {
425
- src: string;
426
- alt: string;
427
- };
428
- title: string;
429
- description: string;
430
- linkLabel: string;
431
- linkHref: string;
432
- }[];
433
- } | {
434
- id: string;
435
- type: "markdown";
436
- content: string;
437
- })[];
438
- }, {
439
- title?: string | undefined;
440
- description?: string | undefined;
441
- components: ({
442
- id: string;
443
- type: "carousel";
444
- slides: {
445
- image: {
446
- src: string;
447
- alt: string;
448
- };
449
- title: string;
450
- description: string;
451
- linkLabel: string;
452
- linkHref: string;
453
- }[];
454
- } | {
455
- description?: string | undefined;
456
- id: string;
457
- type: "hero";
458
- image: {
459
- src: string;
460
- alt: string;
461
- };
462
- title: string;
463
- href: string;
464
- } | {
465
- id: string;
466
- type: "product-grid";
467
- title: string;
468
- skus: string[];
469
- } | {
470
- id: string;
471
- type: "grid";
472
- items: {
473
- image: {
474
- src: string;
475
- alt: string;
476
- };
477
- title: string;
478
- description: string;
479
- linkLabel: string;
480
- linkHref: string;
481
- }[];
482
- } | {
483
- id: string;
484
- type: "markdown";
485
- content: string;
486
- })[];
487
- }>>, {
488
- [x: string]: {
489
- title?: string | undefined;
490
- description?: string | undefined;
491
- components: ({
492
- id: string;
493
- type: "carousel";
494
- slides: {
495
- image: {
496
- src: string;
497
- alt: string;
498
- };
499
- title: string;
500
- description: string;
501
- linkLabel: string;
502
- linkHref: string;
503
- }[];
504
- } | {
505
- description?: string | undefined;
506
- id: string;
507
- type: "hero";
508
- image: {
509
- src: string;
510
- alt: string;
511
- };
512
- title: string;
513
- href: string;
514
- } | {
515
- id: string;
516
- type: "product-grid";
517
- title: string;
518
- skus: string[];
519
- } | {
520
- id: string;
521
- type: "grid";
522
- items: {
523
- image: {
524
- src: string;
525
- alt: string;
526
- };
527
- title: string;
528
- description: string;
529
- linkLabel: string;
530
- linkHref: string;
531
- }[];
532
- } | {
533
- id: string;
534
- type: "markdown";
535
- content: string;
536
- })[];
537
- } | undefined;
538
- }, {
539
- [x: string]: {
540
- title?: string | undefined;
541
- description?: string | undefined;
542
- components: ({
543
- id: string;
544
- type: "carousel";
545
- slides: {
546
- image: {
547
- src: string;
548
- alt: string;
549
- };
550
- title: string;
551
- description: string;
552
- linkLabel: string;
553
- linkHref: string;
554
- }[];
555
- } | {
556
- description?: string | undefined;
557
- id: string;
558
- type: "hero";
559
- image: {
560
- src: string;
561
- alt: string;
562
- };
563
- title: string;
564
- href: string;
565
- } | {
566
- id: string;
567
- type: "product-grid";
568
- title: string;
569
- skus: string[];
570
- } | {
571
- id: string;
572
- type: "grid";
573
- items: {
574
- image: {
575
- src: string;
576
- alt: string;
577
- };
578
- title: string;
579
- description: string;
580
- linkLabel: string;
581
- linkHref: string;
582
- }[];
583
- } | {
584
- id: string;
585
- type: "markdown";
586
- content: string;
587
- })[];
588
- } | undefined;
589
- }>, {
590
- [x: string]: {
591
- [x: string]: {
592
- title?: string | undefined;
593
- description?: string | undefined;
594
- components: ({
595
- id: string;
596
- type: "carousel";
597
- slides: {
598
- image: {
599
- src: string;
600
- alt: string;
601
- };
602
- title: string;
603
- description: string;
604
- linkLabel: string;
605
- linkHref: string;
606
- }[];
607
- } | {
608
- description?: string | undefined;
609
- id: string;
610
- type: "hero";
611
- image: {
612
- src: string;
613
- alt: string;
614
- };
615
- title: string;
616
- href: string;
617
- } | {
618
- id: string;
619
- type: "product-grid";
620
- title: string;
621
- skus: string[];
622
- } | {
623
- id: string;
624
- type: "grid";
625
- items: {
626
- image: {
627
- src: string;
628
- alt: string;
629
- };
630
- title: string;
631
- description: string;
632
- linkLabel: string;
633
- linkHref: string;
634
- }[];
635
- } | {
636
- id: string;
637
- type: "markdown";
638
- content: string;
639
- })[];
640
- } | undefined;
641
- };
642
- }, {
643
- [x: string]: {
644
- [x: string]: {
645
- title?: string | undefined;
646
- description?: string | undefined;
647
- components: ({
648
- id: string;
649
- type: "carousel";
650
- slides: {
651
- image: {
652
- src: string;
653
- alt: string;
654
- };
655
- title: string;
656
- description: string;
657
- linkLabel: string;
658
- linkHref: string;
659
- }[];
660
- } | {
661
- description?: string | undefined;
662
- id: string;
663
- type: "hero";
664
- image: {
665
- src: string;
666
- alt: string;
667
- };
668
- title: string;
669
- href: string;
670
- } | {
671
- id: string;
672
- type: "product-grid";
673
- title: string;
674
- skus: string[];
675
- } | {
676
- id: string;
677
- type: "grid";
678
- items: {
679
- image: {
680
- src: string;
681
- alt: string;
682
- };
683
- title: string;
684
- description: string;
685
- linkLabel: string;
686
- linkHref: string;
687
- }[];
688
- } | {
689
- id: string;
690
- type: "markdown";
691
- content: string;
692
- })[];
693
- } | undefined;
694
- };
23
+ /** List of page components */
24
+ components: z.ZodArray<z.ZodDiscriminatedUnion<'type', [
25
+ CarouselSchema,
26
+ GridSchema,
27
+ HeroSchema,
28
+ ProductGridSchema,
29
+ MarkdownSchema
30
+ ]>>;
695
31
  }>;
696
- export declare const rawDataPages_schema: z.ZodObject<{}, "strip", z.ZodObject<{}, "strip", z.ZodOptional<z.ZodObject<{
697
- title: z.ZodOptional<z.ZodString>;
698
- description: z.ZodOptional<z.ZodString>;
699
- components: z.ZodArray<z.ZodDiscriminatedUnion<"type", z.Primitive, z.ZodObject<{
700
- type: z.ZodLiteral<"carousel">;
701
- id: z.ZodString;
702
- slides: z.ZodArray<z.ZodObject<{
703
- image: z.ZodObject<{
704
- src: z.ZodString;
705
- alt: z.ZodString;
706
- }, "strip", z.ZodTypeAny, {
707
- src: string;
708
- alt: string;
709
- }, {
710
- src: string;
711
- alt: string;
712
- }>;
713
- title: z.ZodString;
714
- description: z.ZodString;
715
- linkLabel: z.ZodString;
716
- linkHref: z.ZodString;
717
- }, "strip", z.ZodTypeAny, {
718
- image: {
719
- src: string;
720
- alt: string;
721
- };
722
- title: string;
723
- description: string;
724
- linkLabel: string;
725
- linkHref: string;
726
- }, {
727
- image: {
728
- src: string;
729
- alt: string;
730
- };
731
- title: string;
732
- description: string;
733
- linkLabel: string;
734
- linkHref: string;
735
- }>, "many">;
736
- }, "strip", z.ZodTypeAny, {
737
- id: string;
738
- type: "carousel";
739
- slides: {
740
- image: {
741
- src: string;
742
- alt: string;
743
- };
744
- title: string;
745
- description: string;
746
- linkLabel: string;
747
- linkHref: string;
748
- }[];
749
- }, {
750
- id: string;
751
- type: "carousel";
752
- slides: {
753
- image: {
754
- src: string;
755
- alt: string;
756
- };
757
- title: string;
758
- description: string;
759
- linkLabel: string;
760
- linkHref: string;
761
- }[];
762
- }> | z.ZodObject<{
763
- type: z.ZodLiteral<"hero">;
764
- id: z.ZodString;
765
- image: z.ZodObject<{
766
- src: z.ZodString;
767
- alt: z.ZodString;
768
- }, "strip", z.ZodTypeAny, {
769
- src: string;
770
- alt: string;
771
- }, {
772
- src: string;
773
- alt: string;
774
- }>;
775
- title: z.ZodString;
776
- description: z.ZodOptional<z.ZodString>;
777
- href: z.ZodString;
778
- }, "strip", z.ZodTypeAny, {
779
- description?: string | undefined;
780
- id: string;
781
- type: "hero";
782
- image: {
783
- src: string;
784
- alt: string;
785
- };
786
- title: string;
787
- href: string;
788
- }, {
789
- description?: string | undefined;
790
- id: string;
791
- type: "hero";
792
- image: {
793
- src: string;
794
- alt: string;
795
- };
796
- title: string;
797
- href: string;
798
- }> | z.ZodObject<{
799
- type: z.ZodLiteral<"product-grid">;
800
- id: z.ZodString;
801
- title: z.ZodString;
802
- skus: z.ZodArray<z.ZodString, "many">;
803
- }, "strip", z.ZodTypeAny, {
804
- id: string;
805
- type: "product-grid";
806
- title: string;
807
- skus: string[];
808
- }, {
809
- id: string;
810
- type: "product-grid";
811
- title: string;
812
- skus: string[];
813
- }> | z.ZodObject<{
814
- type: z.ZodLiteral<"grid">;
815
- id: z.ZodString;
816
- items: z.ZodArray<z.ZodObject<{
817
- image: z.ZodObject<{
818
- src: z.ZodString;
819
- alt: z.ZodString;
820
- }, "strip", z.ZodTypeAny, {
821
- src: string;
822
- alt: string;
823
- }, {
824
- src: string;
825
- alt: string;
826
- }>;
827
- title: z.ZodString;
828
- description: z.ZodString;
829
- linkLabel: z.ZodString;
830
- linkHref: z.ZodString;
831
- }, "strip", z.ZodTypeAny, {
832
- image: {
833
- src: string;
834
- alt: string;
835
- };
836
- title: string;
837
- description: string;
838
- linkLabel: string;
839
- linkHref: string;
840
- }, {
841
- image: {
842
- src: string;
843
- alt: string;
844
- };
845
- title: string;
846
- description: string;
847
- linkLabel: string;
848
- linkHref: string;
849
- }>, "many">;
850
- }, "strip", z.ZodTypeAny, {
851
- id: string;
852
- type: "grid";
853
- items: {
854
- image: {
855
- src: string;
856
- alt: string;
857
- };
858
- title: string;
859
- description: string;
860
- linkLabel: string;
861
- linkHref: string;
862
- }[];
863
- }, {
864
- id: string;
865
- type: "grid";
866
- items: {
867
- image: {
868
- src: string;
869
- alt: string;
870
- };
871
- title: string;
872
- description: string;
873
- linkLabel: string;
874
- linkHref: string;
875
- }[];
876
- }> | z.ZodObject<{
877
- type: z.ZodLiteral<"markdown">;
878
- id: z.ZodString;
879
- content: z.ZodString;
880
- }, "strip", z.ZodTypeAny, {
881
- id: string;
882
- type: "markdown";
883
- content: string;
884
- }, {
885
- id: string;
886
- type: "markdown";
887
- content: string;
888
- }>>, "many">;
889
- }, "strip", z.ZodTypeAny, {
890
- title?: string | undefined;
891
- description?: string | undefined;
892
- components: ({
893
- id: string;
894
- type: "carousel";
895
- slides: {
896
- image: {
897
- src: string;
898
- alt: string;
899
- };
900
- title: string;
901
- description: string;
902
- linkLabel: string;
903
- linkHref: string;
904
- }[];
905
- } | {
906
- description?: string | undefined;
907
- id: string;
908
- type: "hero";
909
- image: {
910
- src: string;
911
- alt: string;
912
- };
913
- title: string;
914
- href: string;
915
- } | {
916
- id: string;
917
- type: "product-grid";
918
- title: string;
919
- skus: string[];
920
- } | {
921
- id: string;
922
- type: "grid";
923
- items: {
924
- image: {
925
- src: string;
926
- alt: string;
927
- };
928
- title: string;
929
- description: string;
930
- linkLabel: string;
931
- linkHref: string;
932
- }[];
933
- } | {
934
- id: string;
935
- type: "markdown";
936
- content: string;
937
- })[];
938
- }, {
939
- title?: string | undefined;
940
- description?: string | undefined;
941
- components: ({
942
- id: string;
943
- type: "carousel";
944
- slides: {
945
- image: {
946
- src: string;
947
- alt: string;
948
- };
949
- title: string;
950
- description: string;
951
- linkLabel: string;
952
- linkHref: string;
953
- }[];
954
- } | {
955
- description?: string | undefined;
956
- id: string;
957
- type: "hero";
958
- image: {
959
- src: string;
960
- alt: string;
961
- };
962
- title: string;
963
- href: string;
964
- } | {
965
- id: string;
966
- type: "product-grid";
967
- title: string;
968
- skus: string[];
969
- } | {
970
- id: string;
971
- type: "grid";
972
- items: {
973
- image: {
974
- src: string;
975
- alt: string;
976
- };
977
- title: string;
978
- description: string;
979
- linkLabel: string;
980
- linkHref: string;
981
- }[];
982
- } | {
983
- id: string;
984
- type: "markdown";
985
- content: string;
986
- })[];
987
- }>>, {
988
- [x: string]: {
989
- title?: string | undefined;
990
- description?: string | undefined;
991
- components: ({
992
- id: string;
993
- type: "carousel";
994
- slides: {
995
- image: {
996
- src: string;
997
- alt: string;
998
- };
999
- title: string;
1000
- description: string;
1001
- linkLabel: string;
1002
- linkHref: string;
1003
- }[];
1004
- } | {
1005
- description?: string | undefined;
1006
- id: string;
1007
- type: "hero";
1008
- image: {
1009
- src: string;
1010
- alt: string;
1011
- };
1012
- title: string;
1013
- href: string;
1014
- } | {
1015
- id: string;
1016
- type: "product-grid";
1017
- title: string;
1018
- skus: string[];
1019
- } | {
1020
- id: string;
1021
- type: "grid";
1022
- items: {
1023
- image: {
1024
- src: string;
1025
- alt: string;
1026
- };
1027
- title: string;
1028
- description: string;
1029
- linkLabel: string;
1030
- linkHref: string;
1031
- }[];
1032
- } | {
1033
- id: string;
1034
- type: "markdown";
1035
- content: string;
1036
- })[];
1037
- } | undefined;
1038
- }, {
1039
- [x: string]: {
1040
- title?: string | undefined;
1041
- description?: string | undefined;
1042
- components: ({
1043
- id: string;
1044
- type: "carousel";
1045
- slides: {
1046
- image: {
1047
- src: string;
1048
- alt: string;
1049
- };
1050
- title: string;
1051
- description: string;
1052
- linkLabel: string;
1053
- linkHref: string;
1054
- }[];
1055
- } | {
1056
- description?: string | undefined;
1057
- id: string;
1058
- type: "hero";
1059
- image: {
1060
- src: string;
1061
- alt: string;
1062
- };
1063
- title: string;
1064
- href: string;
1065
- } | {
1066
- id: string;
1067
- type: "product-grid";
1068
- title: string;
1069
- skus: string[];
1070
- } | {
1071
- id: string;
1072
- type: "grid";
1073
- items: {
1074
- image: {
1075
- src: string;
1076
- alt: string;
1077
- };
1078
- title: string;
1079
- description: string;
1080
- linkLabel: string;
1081
- linkHref: string;
1082
- }[];
1083
- } | {
1084
- id: string;
1085
- type: "markdown";
1086
- content: string;
1087
- })[];
1088
- } | undefined;
1089
- }>, {
1090
- [x: string]: {
1091
- [x: string]: {
1092
- title?: string | undefined;
1093
- description?: string | undefined;
1094
- components: ({
1095
- id: string;
1096
- type: "carousel";
1097
- slides: {
1098
- image: {
1099
- src: string;
1100
- alt: string;
1101
- };
1102
- title: string;
1103
- description: string;
1104
- linkLabel: string;
1105
- linkHref: string;
1106
- }[];
1107
- } | {
1108
- description?: string | undefined;
1109
- id: string;
1110
- type: "hero";
1111
- image: {
1112
- src: string;
1113
- alt: string;
1114
- };
1115
- title: string;
1116
- href: string;
1117
- } | {
1118
- id: string;
1119
- type: "product-grid";
1120
- title: string;
1121
- skus: string[];
1122
- } | {
1123
- id: string;
1124
- type: "grid";
1125
- items: {
1126
- image: {
1127
- src: string;
1128
- alt: string;
1129
- };
1130
- title: string;
1131
- description: string;
1132
- linkLabel: string;
1133
- linkHref: string;
1134
- }[];
1135
- } | {
1136
- id: string;
1137
- type: "markdown";
1138
- content: string;
1139
- })[];
1140
- } | undefined;
1141
- };
32
+ export declare const rawDataPage_schema: RawDataPageSchema;
33
+ type RawDataLocalizedPageSchema = LocalizedFieldSchema<RawDataPageSchema>;
34
+ type PagesSchema<T extends z.ZodTypeAny> = z.ZodObject<{}, "strip", T, {
35
+ [urlSlug: string]: z.infer<T>;
1142
36
  }, {
1143
- [x: string]: {
1144
- [x: string]: {
1145
- title?: string | undefined;
1146
- description?: string | undefined;
1147
- components: ({
1148
- id: string;
1149
- type: "carousel";
1150
- slides: {
1151
- image: {
1152
- src: string;
1153
- alt: string;
1154
- };
1155
- title: string;
1156
- description: string;
1157
- linkLabel: string;
1158
- linkHref: string;
1159
- }[];
1160
- } | {
1161
- description?: string | undefined;
1162
- id: string;
1163
- type: "hero";
1164
- image: {
1165
- src: string;
1166
- alt: string;
1167
- };
1168
- title: string;
1169
- href: string;
1170
- } | {
1171
- id: string;
1172
- type: "product-grid";
1173
- title: string;
1174
- skus: string[];
1175
- } | {
1176
- id: string;
1177
- type: "grid";
1178
- items: {
1179
- image: {
1180
- src: string;
1181
- alt: string;
1182
- };
1183
- title: string;
1184
- description: string;
1185
- linkLabel: string;
1186
- linkHref: string;
1187
- }[];
1188
- } | {
1189
- id: string;
1190
- type: "markdown";
1191
- content: string;
1192
- })[];
1193
- } | undefined;
1194
- };
37
+ [urlSlug: string]: z.infer<T>;
1195
38
  }>;
1196
- export declare type RawDataPages = z.infer<typeof pages_schema>;
1197
- export declare type RawDataCarousel = z.infer<typeof carousel_schema>;
1198
- export declare type RawDataGrid = z.infer<typeof grid_schema>;
1199
- export declare type RawDataHero = z.infer<typeof hero_schema>;
1200
- export declare type RawDataProductGrid = z.infer<typeof productGrid_schema>;
1201
- export declare type RawDataMarkdown = z.infer<typeof markdown_schema>;
39
+ type RawDataPagesSchema = PagesSchema<RawDataLocalizedPageSchema>;
40
+ export declare const rawDataPages_schema: RawDataPagesSchema;
41
+ /**
42
+ * Demo Store page
43
+ *
44
+ * This represent an editorial page. A page is composed by a `title`, a `description` and a list of `components`.
45
+ */
46
+ export type RawDataPage = z.infer<RawDataPageSchema>;
47
+ /**
48
+ * A page with different locales.
49
+ *
50
+ * On international website, an editorial page may have a different set of components based on the language or country.
51
+ *
52
+ * @example
53
+ * {
54
+ * "en": {
55
+ * "title": "English title",
56
+ * "components": [ ... ]
57
+ * },
58
+ * "it": {
59
+ * "title": "Italian title",
60
+ * "components": [ ... ]
61
+ * }
62
+ * }
63
+ */
64
+ export type RawDataLocalizedPage = z.infer<RawDataLocalizedPageSchema>;
65
+ /**
66
+ * Demo Store editorial pages
67
+ *
68
+ * This represent all the editorial pages of your website.
69
+ *
70
+ * The ___first key___ of the object represent the **URL slug**. It should always start with a forward slash (`/`) (e.g. _The urlSlug `"/"` correspond to the homepage_).
71
+ *
72
+ * The ___second key___ of the object represent the **locale code**.
73
+ *
74
+ * @example
75
+ * {
76
+ * "/": {
77
+ * "en": {
78
+ * "title": "English title",
79
+ * "components": [ ... ]
80
+ * },
81
+ * "it": {
82
+ * "title": "Italian title",
83
+ * "components": [ ... ]
84
+ * }
85
+ * },
86
+ * "/privacy-policy": {
87
+ * "en": {
88
+ * "title": "English title",
89
+ * "components": [ ... ]
90
+ * },
91
+ * "it": {
92
+ * "title": "Italian title",
93
+ * "components": [ ... ]
94
+ * }
95
+ * }
96
+ * }
97
+ */
98
+ export type RawDataPages = z.infer<typeof rawDataPages_schema>;
99
+ /**
100
+ * Carousel component for editorial pages
101
+ *
102
+ * ![Carousel component](https://user-images.githubusercontent.com/1681269/208413738-5223703c-2baf-40ad-ba8f-75b32691f992.png|width=400px)
103
+ */
104
+ export type RawDataCarousel = z.infer<CarouselSchema>;
105
+ /**
106
+ * Grid component for editorial pages
107
+ *
108
+ * ![Grid component](https://user-images.githubusercontent.com/1681269/208413948-b49a33fc-5778-4e9f-8d47-d3c546a3403f.png|width=400px)
109
+ */
110
+ export type RawDataGrid = z.infer<GridSchema>;
111
+ /**
112
+ * Hero component for editorial pages
113
+ *
114
+ * ![Hero component](https://user-images.githubusercontent.com/1681269/208413828-f6e0a5a6-ae9c-40fe-a80a-f1be1e400866.png|width=400px)
115
+ */
116
+ export type RawDataHero = z.infer<HeroSchema>;
117
+ /**
118
+ * Product Grid component for editorial pages
119
+ *
120
+ * ![Product Grid component](https://user-images.githubusercontent.com/1681269/208413888-81d6a60f-3ad2-49ba-91c8-40ff91d1385d.png|width=400px)
121
+ */
122
+ export type RawDataProductGrid = z.infer<ProductGridSchema>;
123
+ /**
124
+ * Markdown component for editorial pages
125
+ */
126
+ export type RawDataMarkdown = z.infer<MarkdownSchema>;
1202
127
  export {};