feed-common 1.48.2 → 1.49.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +7 -0
- package/dist/utils/feed-templates/google-api.template.d.ts +2 -0
- package/dist/utils/feed-templates/google-api.template.d.ts.map +1 -1
- package/dist/utils/feed-templates/google-api.template.js +884 -1003
- package/dist/utils/feed-templates/google-api.template.js.map +1 -1
- package/dist/utils/feed-templates/google-api.to-implement.d.ts +1 -0
- package/dist/utils/feed-templates/google-api.to-implement.d.ts.map +1 -0
- package/dist/utils/feed-templates/google-api.to-implement.js +98 -0
- package/dist/utils/feed-templates/google-api.to-implement.js.map +1 -0
- package/dist/utils/feed-templates/index.d.ts.map +1 -1
- package/dist/utils/feed-templates/index.js +3 -0
- package/dist/utils/feed-templates/index.js.map +1 -1
- package/package.json +1 -1
- package/src/utils/feed-templates/google-api.template.ts +1023 -1002
- package/src/utils/feed-templates/google-api.to-implement.ts +96 -0
- package/src/utils/feed-templates/index.ts +3 -0
@@ -1,1004 +1,885 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
//
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
//
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
//
|
488
|
-
//
|
489
|
-
//
|
490
|
-
//
|
491
|
-
//
|
492
|
-
//
|
493
|
-
//
|
494
|
-
//
|
495
|
-
//
|
496
|
-
//
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
//
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
//
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
//
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
//
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
//
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
//
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
// description:
|
886
|
-
// 'The weight of the product used to calculate the shipping cost. Required for carrier-calculated rates in your account shipping settings. Supported weights: 9-2000 lbs for imperial, 0-1000 kg from metric. Supported units: lb, oz, g, kg. Syntax: Number + unit. Example: 3 kg',
|
887
|
-
// required: false,
|
888
|
-
// type: 'macro-input',
|
889
|
-
// validator: (v: string | number) => validateIfNoMacro(v, measureUnitsSchema(['lb', 'oz', 'g', 'kg'])),
|
890
|
-
// defaultValue: '{{shopify.weight}} {{shopify.weight_unit}}',
|
891
|
-
// rules: { sections: [] },
|
892
|
-
// },
|
893
|
-
// {
|
894
|
-
// attribute: 'shipping_length',
|
895
|
-
// label: 'Shipping length',
|
896
|
-
// description:
|
897
|
-
// 'The length of the product used to calculate the shipping cost by dimensional weight. Supported values: 0-150 for inches, 1-400 for cm. Syntax: Number + unit. Supported units: cm, in. Example: 20 in',
|
898
|
-
// required: false,
|
899
|
-
// type: 'macro-input',
|
900
|
-
// validator: (v: string | number) => validateIfNoMacro(v, measureUnitsSchema(['cm', 'in'])),
|
901
|
-
// defaultValue: '',
|
902
|
-
// rules: { sections: [] },
|
903
|
-
// },
|
904
|
-
// {
|
905
|
-
// attribute: 'shipping_width',
|
906
|
-
// label: 'Shipping width',
|
907
|
-
// description:
|
908
|
-
// 'The width of the product used to calculate the shipping cost by dimensional weight. Required for carrier-calculated rates in your account shipping settings. Supported values: 0-3000. Syntax: Number + unit. Supported units: cm, in. Example: 20 in',
|
909
|
-
// required: false,
|
910
|
-
// type: 'macro-input',
|
911
|
-
// validator: (v: string | number) => validateIfNoMacro(v, measureUnitsSchema(['cm', 'in'])),
|
912
|
-
// defaultValue: '',
|
913
|
-
// rules: { sections: [] },
|
914
|
-
// },
|
915
|
-
// {
|
916
|
-
// attribute: 'shipping_height',
|
917
|
-
// label: 'Shipping height',
|
918
|
-
// description:
|
919
|
-
// 'The height of the product used to calculate the shipping cost by dimensional weight. Required for carrier-calculated rates in your account shipping settings. Supported values: 0-3000. Syntax: Number + unit. Supported units: cm, in. Example: 20 in',
|
920
|
-
// required: false,
|
921
|
-
// type: 'macro-input',
|
922
|
-
// validator: (v: string | number) => validateIfNoMacro(v, measureUnitsSchema(['cm', 'in'])),
|
923
|
-
// defaultValue: '',
|
924
|
-
// rules: { sections: [] },
|
925
|
-
// },
|
926
|
-
// {
|
927
|
-
// attribute: 'ships_from_country',
|
928
|
-
// label: 'Ships from country',
|
929
|
-
// description:
|
930
|
-
// 'A setting that allows you to provide the country from which your product will typically ship. 2 characters. Must be an ISO_3166-1_alpha-2 country code. Example: DE',
|
931
|
-
// required: false,
|
932
|
-
// type: 'select',
|
933
|
-
// choices: [SOURCE_LANGUAGE],
|
934
|
-
// defaultValue: '',
|
935
|
-
// rules: { sections: [] },
|
936
|
-
// },
|
937
|
-
// {
|
938
|
-
// attribute: 'max_handling_time',
|
939
|
-
// label: 'Max handling time',
|
940
|
-
// description:
|
941
|
-
// 'The longest amount of time between when an order is placed for a product and when the product ships. Submit the number of business days. For products ready to be shipped the same day, submit 0. Integer, greater than or equal to 0. Example: 3',
|
942
|
-
// required: false,
|
943
|
-
// type: 'macro-input',
|
944
|
-
// validator: (v: string | number) => validateIfNoMacro(v, z.coerce.number().min(0).int()),
|
945
|
-
// defaultValue: '',
|
946
|
-
// rules: { sections: [] },
|
947
|
-
// },
|
948
|
-
// {
|
949
|
-
// attribute: 'transit_time_label',
|
950
|
-
// label: 'Transit time label',
|
951
|
-
// description:
|
952
|
-
// 'Label that you assign to a product to help assign different transit times in Merchant Center account settings. Max 100 characters. Example: From Seattle',
|
953
|
-
// required: false,
|
954
|
-
// type: 'macro-input',
|
955
|
-
// defaultValue: '',
|
956
|
-
// validator: (v: string | number) => validateIfNoMacro(v, z.string().max(100)),
|
957
|
-
// rules: { sections: [] },
|
958
|
-
// },
|
959
|
-
// {
|
960
|
-
// attribute: 'min_handling_time',
|
961
|
-
// label: 'Min handling time',
|
962
|
-
// description:
|
963
|
-
// 'The shortest amount of time between when an order is placed for a product and when the product ships. Submit the number of business days. For products ready to be shipped the same day, submit 0. Integer, greater than or equal to 0. Example: 1',
|
964
|
-
// required: false,
|
965
|
-
// type: 'macro-input',
|
966
|
-
// validator: (v: string | number) => validateIfNoMacro(v, z.coerce.number().min(0).int()),
|
967
|
-
// defaultValue: '',
|
968
|
-
// rules: { sections: [] },
|
969
|
-
// },
|
970
|
-
// {
|
971
|
-
// attribute: 'free_shipping_threshold',
|
972
|
-
// label: 'Free shipping threshold',
|
973
|
-
// description:
|
974
|
-
// 'Order cost above which shipping is free. This attribute uses the following sub-attributes: Country (Required) ISO 3166 country code. Price threshold (Required) Order cost above which shipping is free. Example: US:16.00 USD',
|
975
|
-
// required: false,
|
976
|
-
// type: 'macro-input',
|
977
|
-
// defaultValue: '',
|
978
|
-
// rules: { sections: [] },
|
979
|
-
// },
|
980
|
-
// {
|
981
|
-
// attribute: 'tax',
|
982
|
-
// label: 'Tax',
|
983
|
-
// description:
|
984
|
-
// 'Your product’s sales tax rate in percent. Required (Available for the US only). This attribute uses 4 sub-attributes: Country (optional) ISO 3166 country code. Region or postal code or location ID (optional). Rate (required) Tax rate as a percentage. Shipping tax (optional) Specify if you charge tax on shipping, supported values: yes, no. Example: US:CA:5.00:y',
|
985
|
-
// required: false,
|
986
|
-
// type: 'macro-input',
|
987
|
-
// defaultValue: '',
|
988
|
-
// // TODO: add validator to check if US
|
989
|
-
// rules: { sections: [] },
|
990
|
-
// },
|
991
|
-
// {
|
992
|
-
// attribute: 'tax_category',
|
993
|
-
// label: 'Tax category',
|
994
|
-
// description:
|
995
|
-
// 'A category that classifies your product by specific tax rules. Recommended for custom tax rates at the account level. Max 100 characters. Example: Apparel',
|
996
|
-
// required: false,
|
997
|
-
// type: 'macro-input',
|
998
|
-
// defaultValue: '',
|
999
|
-
// validator: (v: string | number) => validateIfNoMacro(v, z.string().max(100)),
|
1000
|
-
// rules: { sections: [] },
|
1001
|
-
// },
|
1002
|
-
// ],
|
1003
|
-
// };
|
1
|
+
/* eslint-disable quotes */
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
3
|
+
/* eslint-disable max-len */
|
4
|
+
import { dateRangeSchema, measureUnitsSchema, priceSchema, validateIfNoMacro } from './index.js';
|
5
|
+
import { SOURCE_COUNTRY, SOURCE_LANGUAGE, XmlFeedFormat } from '../../constants/profile.constants.js';
|
6
|
+
import { z } from 'zod';
|
7
|
+
import { ulid } from 'ulid';
|
8
|
+
const availabilityMapping = {
|
9
|
+
attribute: 'availability',
|
10
|
+
label: 'Availability',
|
11
|
+
description: "Your product's availability. Accurately submit the product's availability and match the availability from your landing page and checkout pages",
|
12
|
+
required: true,
|
13
|
+
type: 'macro-input',
|
14
|
+
validator: (v) => validateIfNoMacro(v, z.enum(['in_stock', 'out_of_stock', 'preorder', 'backorder'])),
|
15
|
+
rules: { sections: [] },
|
16
|
+
baseMode: true,
|
17
|
+
};
|
18
|
+
const customLabelMapping = {
|
19
|
+
attribute: '',
|
20
|
+
label: '',
|
21
|
+
description: 'Label that you assign to a product to help organize bidding and reporting in Shopping campaigns. Max 100 characters. Example: Seasonal',
|
22
|
+
required: false,
|
23
|
+
type: 'macro-input',
|
24
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(100)),
|
25
|
+
rules: { sections: [] },
|
26
|
+
};
|
27
|
+
export const googleApiTemplate = {
|
28
|
+
formats: [XmlFeedFormat.XML],
|
29
|
+
documentation: 'https://support.google.com/merchants/answer/7052112',
|
30
|
+
mapping: [
|
31
|
+
{
|
32
|
+
attribute: 'offerId',
|
33
|
+
label: 'ID',
|
34
|
+
description: 'A unique identifier for the item. Leading and trailing whitespaces are stripped and multiple whitespaces are replaced by a single whitespace upon submission. Only valid unicode characters are accepted. Max length: 50 characters. Example: 123456',
|
35
|
+
required: true,
|
36
|
+
type: 'macro-input',
|
37
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(150).min(1)),
|
38
|
+
defaultValue: '{{shopify.id}}_{{shopify.variant_id}}',
|
39
|
+
rules: { sections: [] },
|
40
|
+
baseMode: true,
|
41
|
+
},
|
42
|
+
{
|
43
|
+
attribute: 'contentLanguage',
|
44
|
+
label: 'Content language',
|
45
|
+
description: 'The two-letter ISO 639-1 language code for the item',
|
46
|
+
required: true,
|
47
|
+
type: 'select',
|
48
|
+
choices: [SOURCE_LANGUAGE],
|
49
|
+
rules: { sections: [] },
|
50
|
+
baseMode: true,
|
51
|
+
},
|
52
|
+
{
|
53
|
+
attribute: 'targetCountry',
|
54
|
+
label: 'Target country',
|
55
|
+
description: "The CLDR territory code for the item's country of sale",
|
56
|
+
required: true,
|
57
|
+
type: 'select',
|
58
|
+
choices: [SOURCE_COUNTRY],
|
59
|
+
rules: { sections: [] },
|
60
|
+
baseMode: true,
|
61
|
+
},
|
62
|
+
{
|
63
|
+
attribute: 'title',
|
64
|
+
label: 'Title',
|
65
|
+
description: 'Your product’s name. Plain text.Max 150 characters. Example: Mens Pique Polo Shirt',
|
66
|
+
required: true,
|
67
|
+
type: 'macro-input',
|
68
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(150).min(1)),
|
69
|
+
defaultValue: '{{shopify.title}}',
|
70
|
+
rules: { sections: [] },
|
71
|
+
baseMode: true,
|
72
|
+
},
|
73
|
+
{
|
74
|
+
attribute: 'description',
|
75
|
+
label: 'Description',
|
76
|
+
description: 'Your product’s description. Plain Text. Max 5000 characters. Example: Made from 100% organic cotton, this classic red men’s polo has a slim fit and signature logo embroidered on the left chest. Machine wash cold; imported.',
|
77
|
+
required: true,
|
78
|
+
type: 'macro-input',
|
79
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(5000).min(1)),
|
80
|
+
defaultValue: '{{shopify.description}}',
|
81
|
+
rules: { sections: [] },
|
82
|
+
baseMode: true,
|
83
|
+
},
|
84
|
+
{
|
85
|
+
attribute: 'link',
|
86
|
+
label: 'Link',
|
87
|
+
description: 'Your product’s landing page. Links must begin with http:// or https://. http://www.example.com/asp/sp.asp?cat=12&id=1030',
|
88
|
+
required: true,
|
89
|
+
type: 'macro-input',
|
90
|
+
validator: (v) => validateIfNoMacro(v, z.string().url()),
|
91
|
+
defaultValue: 'https://{{shopify.shop_domain}}/products/{{shopify.handle}}',
|
92
|
+
rules: { sections: [] },
|
93
|
+
baseMode: true,
|
94
|
+
},
|
95
|
+
{
|
96
|
+
attribute: 'imageLink',
|
97
|
+
label: 'Image link',
|
98
|
+
description: 'The URL of your product’s main image. Example: http:// www.example.com/image1.jpg',
|
99
|
+
required: true,
|
100
|
+
type: 'macro-input',
|
101
|
+
validator: (v) => validateIfNoMacro(v, z.string().url()),
|
102
|
+
defaultValue: '{{shopify.image}}',
|
103
|
+
rules: { sections: [] },
|
104
|
+
baseMode: true,
|
105
|
+
},
|
106
|
+
{
|
107
|
+
attribute: 'additionalImageLinks',
|
108
|
+
label: 'Additional image links',
|
109
|
+
description: 'The URL of an additional image for your product. Submit up to 10 additional product images, separate them with comma. Max 2000 characters. Example: http:// www.example.com/image1.jpg, http:// www.example.com/image2.jpg',
|
110
|
+
required: false,
|
111
|
+
type: 'macro-input',
|
112
|
+
validator: (v) => validateIfNoMacro(v, z
|
113
|
+
.string()
|
114
|
+
.max(2000)
|
115
|
+
.refine(v => !v ||
|
116
|
+
v
|
117
|
+
.split(',')
|
118
|
+
.map(i => i.trim())
|
119
|
+
.every(i => z.string().url().safeParse(i).success), {
|
120
|
+
message: 'invalid URL',
|
121
|
+
})),
|
122
|
+
defaultValue: '{{shopify.images}}',
|
123
|
+
rules: { sections: [] },
|
124
|
+
allowDuplicates: true,
|
125
|
+
},
|
126
|
+
{
|
127
|
+
attribute: 'virtualModelLink',
|
128
|
+
label: '3D model link',
|
129
|
+
description: 'Additional link to show a 3D model of your product. Available only in the US. This attribute is only available in the classic experience of Merchant Center. Limitation: valid URL, no more than 2000 characters long. Example: https://www.google.com/products/xyz.glb',
|
130
|
+
required: false,
|
131
|
+
type: 'macro-input',
|
132
|
+
validator: (v) => validateIfNoMacro(v, z
|
133
|
+
.string()
|
134
|
+
.max(2000)
|
135
|
+
.refine(v => !v || z.string().url().safeParse(v).success, { message: 'invalid URL' })),
|
136
|
+
defaultValue: '',
|
137
|
+
rules: { sections: [] },
|
138
|
+
},
|
139
|
+
{
|
140
|
+
attribute: 'mobileLink',
|
141
|
+
label: 'Mobile link',
|
142
|
+
description: 'Your product’s mobile-optimized landing page when you have a different URL for mobile and desktop traffic. Limitation: valid URL, no more than 2000 characters long. Example: http://www.m.example.com/asp/ sp.asp?cat=12 id=1030',
|
143
|
+
required: false,
|
144
|
+
type: 'macro-input',
|
145
|
+
validator: (v) => validateIfNoMacro(v, z
|
146
|
+
.string()
|
147
|
+
.max(2000)
|
148
|
+
.refine(v => !v || z.string().url().safeParse(v).success, { message: 'invalid URL' })),
|
149
|
+
defaultValue: '',
|
150
|
+
rules: { sections: [] },
|
151
|
+
},
|
152
|
+
{
|
153
|
+
...availabilityMapping,
|
154
|
+
defaultValue: 'in_stock',
|
155
|
+
rules: { sections: [] },
|
156
|
+
},
|
157
|
+
{
|
158
|
+
...availabilityMapping,
|
159
|
+
defaultValue: 'out_of_stock',
|
160
|
+
rules: {
|
161
|
+
sections: [
|
162
|
+
{
|
163
|
+
id: ulid(),
|
164
|
+
ruleItems: [
|
165
|
+
{
|
166
|
+
id: ulid(),
|
167
|
+
attribute: 'inventory_quantity',
|
168
|
+
operator: 'equals',
|
169
|
+
value: 0,
|
170
|
+
},
|
171
|
+
],
|
172
|
+
},
|
173
|
+
{
|
174
|
+
id: ulid(),
|
175
|
+
ruleItems: [
|
176
|
+
{
|
177
|
+
id: ulid(),
|
178
|
+
attribute: 'inventory_policy',
|
179
|
+
operator: 'equals',
|
180
|
+
value: 'deny',
|
181
|
+
},
|
182
|
+
],
|
183
|
+
},
|
184
|
+
],
|
185
|
+
},
|
186
|
+
},
|
187
|
+
{
|
188
|
+
attribute: 'availabilityDate',
|
189
|
+
label: 'Availability date',
|
190
|
+
description: 'Required if product availability is set to preorder. The date a preordered product becomes available for delivery. Provide a value up to one year in the future. The availability date should also be added to the product’s landing page and be clear to your customers (for example, “May 6, 2023”). Example: 2016-02-24T11:07+0100',
|
191
|
+
required: false,
|
192
|
+
type: 'macro-input',
|
193
|
+
validator: (v) =>
|
194
|
+
// TODO: make required if availability is preorder
|
195
|
+
validateIfNoMacro(v, z
|
196
|
+
.string()
|
197
|
+
.refine(v => !v || z.string().date().safeParse(v).success, { message: 'invalid date' })
|
198
|
+
.refine(v => !v || new Date(v).getTime() + 1000 * 60 * 60 * 24 * 365 > new Date().getTime(), {
|
199
|
+
message: 'The date should be up to one year in the future',
|
200
|
+
})),
|
201
|
+
defaultValue: '',
|
202
|
+
rules: { sections: [] },
|
203
|
+
},
|
204
|
+
{
|
205
|
+
attribute: 'costOfGoodsSold',
|
206
|
+
label: 'Cost of goods sold',
|
207
|
+
description: 'The costs associated with the sale of a particular product as defined by the accounting convention you set up. These costs may include material, labor, freight, or other overhead expenses. By submitting the COGS for your products, you gain insights about other metrics, such as your gross margin and the amount of revenue generated by your ads and free listings. The currency must be in the ISO 4217 format. For example, USD for US dollars. The decimal point must be a period (.). Example, 10.00 USD',
|
208
|
+
required: false,
|
209
|
+
type: 'macro-input',
|
210
|
+
defaultValue: '',
|
211
|
+
validator: (v) => validateIfNoMacro(v, priceSchema()),
|
212
|
+
rules: { sections: [] },
|
213
|
+
},
|
214
|
+
{
|
215
|
+
attribute: 'expirationDate',
|
216
|
+
label: 'Expiration date',
|
217
|
+
description: 'The date that your product should stop showing. Use a date less than 30 days in the future. Example: 2016-07-11T11:07+0100',
|
218
|
+
required: false,
|
219
|
+
type: 'macro-input',
|
220
|
+
validator: (v) => validateIfNoMacro(v, z
|
221
|
+
.string()
|
222
|
+
.refine(v => !v || z.string().datetime().safeParse(v).success, { message: 'invalid date' })
|
223
|
+
.refine(v => !v || new Date(v).getTime() + 1000 * 60 * 60 * 24 * 30 > new Date().getTime(), {
|
224
|
+
message: 'The date should be less than 30 days in the future',
|
225
|
+
})),
|
226
|
+
defaultValue: '',
|
227
|
+
rules: { sections: [] },
|
228
|
+
},
|
229
|
+
// TODO: add condition, checking if sale price is set
|
230
|
+
{
|
231
|
+
attribute: 'price',
|
232
|
+
label: 'Price',
|
233
|
+
description: "Your products price. Accurately submit the product's price and currency, and match with the price from your landing page and at checkout. Example: 15.00 USD",
|
234
|
+
required: true,
|
235
|
+
type: 'macro-input',
|
236
|
+
validator: (v) => validateIfNoMacro(v, priceSchema()),
|
237
|
+
defaultValue: '{{shopify.price}} {{shopify.shop_currency}}',
|
238
|
+
rules: { sections: [] },
|
239
|
+
baseMode: true,
|
240
|
+
},
|
241
|
+
{
|
242
|
+
attribute: 'salePrice',
|
243
|
+
label: 'Sale price',
|
244
|
+
description: "Your product's sale price. Accurately submit the product's sale price, and match the sale price with your landing page and the checkout pages. Example: 15.00 USD",
|
245
|
+
required: false,
|
246
|
+
type: 'macro-input',
|
247
|
+
validator: (v) => validateIfNoMacro(v, priceSchema()),
|
248
|
+
defaultValue: '',
|
249
|
+
rules: { sections: [] },
|
250
|
+
},
|
251
|
+
{
|
252
|
+
attribute: 'salePriceEffectiveDate',
|
253
|
+
label: 'Sale price effective date',
|
254
|
+
description: "The date range during which the sale price applies. Use a date less than 30 days in the future. Use together with the sale price. If you don't submit this attribute (sale price effective date), the sale price always applies. Separate start date and end date with /. Use a start date before the end date. Example: 2016-07-11T11:07+0100/2016-08-11T11:07+0100",
|
255
|
+
required: false,
|
256
|
+
type: 'macro-input',
|
257
|
+
validator: (v) => validateIfNoMacro(v, dateRangeSchema),
|
258
|
+
defaultValue: '',
|
259
|
+
rules: { sections: [] },
|
260
|
+
},
|
261
|
+
{
|
262
|
+
attribute: 'unitPricingMeasure',
|
263
|
+
label: 'Unit pricing measure',
|
264
|
+
description: 'The measure and dimension of your product as it is sold. Optional (except when required by local laws or regulations). Use the measure or dimension of the product without packaging. Example: 1.5kg',
|
265
|
+
required: false,
|
266
|
+
type: 'macro-input',
|
267
|
+
validator: (v) => validateIfNoMacro(v, measureUnitsSchema([
|
268
|
+
'oz',
|
269
|
+
'lb',
|
270
|
+
'mg',
|
271
|
+
'g',
|
272
|
+
'kg',
|
273
|
+
'floz',
|
274
|
+
'pt',
|
275
|
+
'qt',
|
276
|
+
'gal',
|
277
|
+
'ml',
|
278
|
+
'cl',
|
279
|
+
'l',
|
280
|
+
'cbm',
|
281
|
+
'in',
|
282
|
+
'ft',
|
283
|
+
'yd',
|
284
|
+
'cm',
|
285
|
+
'm',
|
286
|
+
'sqft',
|
287
|
+
'sqm',
|
288
|
+
'ct',
|
289
|
+
])),
|
290
|
+
defaultValue: '',
|
291
|
+
rules: { sections: [] },
|
292
|
+
},
|
293
|
+
{
|
294
|
+
attribute: 'unitPricingBaseMeasure',
|
295
|
+
label: 'Unit pricing base measure',
|
296
|
+
description: 'The product’s base measure for pricing (for example, 100ml means the price is calculated based on a 100ml units). Optional (except when required by local laws or regulations). Example: 100g',
|
297
|
+
required: false,
|
298
|
+
type: 'macro-input',
|
299
|
+
validator: (v) => validateIfNoMacro(v, measureUnitsSchema([
|
300
|
+
'oz',
|
301
|
+
'lb',
|
302
|
+
'mg',
|
303
|
+
'g',
|
304
|
+
'kg',
|
305
|
+
'floz',
|
306
|
+
'pt',
|
307
|
+
'qt',
|
308
|
+
'gal',
|
309
|
+
'ml',
|
310
|
+
'cl',
|
311
|
+
'l',
|
312
|
+
'cbm',
|
313
|
+
'in',
|
314
|
+
'ft',
|
315
|
+
'yd',
|
316
|
+
'cm',
|
317
|
+
'm',
|
318
|
+
'sqft',
|
319
|
+
'sqm',
|
320
|
+
'ct',
|
321
|
+
])),
|
322
|
+
defaultValue: '',
|
323
|
+
rules: { sections: [] },
|
324
|
+
},
|
325
|
+
{
|
326
|
+
attribute: 'installment',
|
327
|
+
label: 'Installment',
|
328
|
+
description: 'Details of an installment payment plan. This attribute uses 2 sub-attributes: Months: the number of installments the buyer has to pay. Amount: ISO 4217, the amount the buyer has to pay per month. Example: 6:30 EUR',
|
329
|
+
required: false,
|
330
|
+
type: 'macro-input',
|
331
|
+
defaultValue: '',
|
332
|
+
validator: (v) => validateIfNoMacro(v, z.string().superRefine((v, ctx) => {
|
333
|
+
if (!v) {
|
334
|
+
return true;
|
335
|
+
}
|
336
|
+
const [months, amount] = v.split(':');
|
337
|
+
if (!z.coerce.number().min(1).int().safeParse(months).success) {
|
338
|
+
ctx.addIssue({
|
339
|
+
code: z.ZodIssueCode.custom,
|
340
|
+
message: 'Months should be a positive whole number',
|
341
|
+
});
|
342
|
+
}
|
343
|
+
const result = priceSchema().safeParse(amount);
|
344
|
+
if (!result.success) {
|
345
|
+
ctx.addIssue({
|
346
|
+
code: z.ZodIssueCode.custom,
|
347
|
+
message: result.error.issues[0].message,
|
348
|
+
});
|
349
|
+
}
|
350
|
+
})),
|
351
|
+
rules: { sections: [] },
|
352
|
+
},
|
353
|
+
{
|
354
|
+
attribute: 'subscriptionCost',
|
355
|
+
label: 'Subscription cost',
|
356
|
+
description: 'Details a monthly or annual payment plan that bundles a communications service contract with a wireless product. Optional (available in certain countries for showing wireless products and services only). Syntax: Period [period] (Required), The duration of a single subscription period. This sub-attribute uses the following supported values: Month [month] Year [year]. Period length [period_length] (Required), Integer, the number of subscription periods (months or years) that the buyer must pay. Amount [amount] (Required), ISO 4217, the amount the buyer has to pay per subscription period. Example: month:12:30.00EUR',
|
357
|
+
required: false,
|
358
|
+
type: 'macro-input',
|
359
|
+
validator: (v) => validateIfNoMacro(v, z.string().superRefine((v, ctx) => {
|
360
|
+
if (!v) {
|
361
|
+
return true;
|
362
|
+
}
|
363
|
+
const [period, periodLength, amount] = v.split(':');
|
364
|
+
if (!['year', 'month'].includes(period)) {
|
365
|
+
ctx.addIssue({
|
366
|
+
code: z.ZodIssueCode.custom,
|
367
|
+
message: 'Period should be either year or month',
|
368
|
+
});
|
369
|
+
}
|
370
|
+
if (!z.coerce.number().min(1).int().safeParse(periodLength).success) {
|
371
|
+
ctx.addIssue({
|
372
|
+
code: z.ZodIssueCode.custom,
|
373
|
+
message: 'Period length should be a positive whole number',
|
374
|
+
});
|
375
|
+
}
|
376
|
+
const result = priceSchema().safeParse(amount);
|
377
|
+
if (!result.success) {
|
378
|
+
ctx.addIssue({
|
379
|
+
code: z.ZodIssueCode.custom,
|
380
|
+
message: result.error.issues[0].message,
|
381
|
+
});
|
382
|
+
}
|
383
|
+
})),
|
384
|
+
defaultValue: '',
|
385
|
+
rules: { sections: [] },
|
386
|
+
},
|
387
|
+
{
|
388
|
+
attribute: 'googleProductCategory',
|
389
|
+
label: 'Google product category',
|
390
|
+
description: 'Google-defined product category for your product. Example: Apparel & Accessories > Clothing > Outerwear > Coats & Jackets or 371',
|
391
|
+
required: false,
|
392
|
+
type: 'macro-input',
|
393
|
+
defaultValue: '',
|
394
|
+
rules: { sections: [] },
|
395
|
+
},
|
396
|
+
{
|
397
|
+
attribute: 'productTypes',
|
398
|
+
label: 'Product types',
|
399
|
+
description: 'Product category that you define for your product. Max 750 alphanumeric character. Comma separated list. Example: Home > Women > Dresses > Maxi Dresses, Home > Men > T-Shirts',
|
400
|
+
required: false,
|
401
|
+
type: 'macro-input',
|
402
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(750)),
|
403
|
+
defaultValue: '{{shopify.category}}',
|
404
|
+
rules: { sections: [] },
|
405
|
+
},
|
406
|
+
{
|
407
|
+
attribute: 'brand',
|
408
|
+
label: 'Brand',
|
409
|
+
description: 'Your product’s brand name. Plain text. Max 70 characters. Example: Google',
|
410
|
+
required: true,
|
411
|
+
type: 'macro-input',
|
412
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(70).min(1)),
|
413
|
+
defaultValue: '{{shopify.vendor}}',
|
414
|
+
rules: { sections: [] },
|
415
|
+
baseMode: true,
|
416
|
+
},
|
417
|
+
{
|
418
|
+
attribute: 'gtin',
|
419
|
+
label: 'GTIN',
|
420
|
+
description: 'Your product’s Global Trade Item Number (GTIN). Required (For all products with a known GTIN to enable full offer performance). Max 50 numeric characters. Example: 3234567890126',
|
421
|
+
required: false,
|
422
|
+
type: 'macro-input',
|
423
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(50)),
|
424
|
+
defaultValue: '{{shopify.barcode}}',
|
425
|
+
rules: { sections: [] },
|
426
|
+
},
|
427
|
+
{
|
428
|
+
attribute: 'mpn',
|
429
|
+
label: 'MPN',
|
430
|
+
description: 'Your product’s Manufacturer Part Number (MPN). Required (Only if your product does not have a manufacturer assigned GTIN). Only submit MPNs assigned by a manufacturer. Max 70 alphanumeric characters. Example: GO12345OOGLE',
|
431
|
+
required: false,
|
432
|
+
type: 'macro-input',
|
433
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(70)),
|
434
|
+
defaultValue: '{{shopify.sku}}',
|
435
|
+
rules: { sections: [] },
|
436
|
+
},
|
437
|
+
{
|
438
|
+
attribute: 'identifierExists',
|
439
|
+
label: 'Identifier exists',
|
440
|
+
description: 'Use to indicate whether or not the unique product identifiers (UPIs) GTIN, MPN, and brand are available for your product. Submit "no" if: Your product is a media item and the GTIN is unavailable (Note: ISBN and SBN codes are accepted as GTINs or Your product is an apparel (clothing) item and the brand is unavailable or In all other categories, your product doesn’t have a GTIN, or a combination of MPN and brand. If a product does have unique product identifiers, don’t submit this attribute with a value of “no” or the product may be disapproved. Example: no',
|
441
|
+
required: false,
|
442
|
+
type: 'macro-input',
|
443
|
+
validator: (v) => validateIfNoMacro(v, z.enum(['yes', 'no', ''])),
|
444
|
+
defaultValue: 'yes',
|
445
|
+
rules: { sections: [] },
|
446
|
+
},
|
447
|
+
{
|
448
|
+
attribute: 'condition',
|
449
|
+
label: 'Condition',
|
450
|
+
description: 'The condition of your product at time of sale. Required if your product is used or refurbished. Supported values: new, refurbished, used. Example: new',
|
451
|
+
required: false,
|
452
|
+
type: 'macro-input',
|
453
|
+
validator: (v) => validateIfNoMacro(v, z.enum(['new', 'refurbished', 'used', ''])),
|
454
|
+
defaultValue: '',
|
455
|
+
rules: { sections: [] },
|
456
|
+
},
|
457
|
+
{
|
458
|
+
attribute: 'adult',
|
459
|
+
label: 'Adult',
|
460
|
+
description: 'Indicate a product includes sexually suggestive content. Required (If a product contains adult content). Supported values: yes, no. Example: yes',
|
461
|
+
required: false,
|
462
|
+
type: 'macro-input',
|
463
|
+
validator: (v) => validateIfNoMacro(v, z.enum(['yes', 'no', ''])),
|
464
|
+
defaultValue: '',
|
465
|
+
rules: { sections: [] },
|
466
|
+
},
|
467
|
+
{
|
468
|
+
attribute: 'multipack',
|
469
|
+
label: 'Multipack',
|
470
|
+
description: "The number of identical products sold within a merchant-defined multipack. Required (For multipack products in Australia, Brazil, Czechia, France, Germany, Italy, Japan, Netherlands, Spain, Switzerland, the UK and the US). Required for free listings on Google if you’ve created a multipack. Submit this attribute if you defined a custom group of identical products and are selling them as a single unit of sale (for example, you're selling 6 bars of soap together). If the product's manufacturer assembled the multipack instead of you, don't submit this attribute. Example: 6",
|
471
|
+
required: false,
|
472
|
+
type: 'macro-input',
|
473
|
+
validator: (v) => validateIfNoMacro(v, z.coerce.number().min(0)),
|
474
|
+
defaultValue: '',
|
475
|
+
rules: { sections: [] },
|
476
|
+
},
|
477
|
+
{
|
478
|
+
attribute: 'isBundle',
|
479
|
+
label: 'Bundle',
|
480
|
+
description: 'Indicates a product is a merchant-defined custom group of different products featuring one main product. Required (For bundles in Australia, Brazil, Czechia, France, Germany, Italy, Japan, Netherlands, Spain, Switzerland, the UK and the US). Required for free listings on Google if you’ve created a bundle containing a main product. Supported values: yes, no. Example: yes',
|
481
|
+
required: false,
|
482
|
+
type: 'macro-input',
|
483
|
+
validator: (v) => validateIfNoMacro(v, z.enum(['yes', 'no', ''])),
|
484
|
+
defaultValue: '',
|
485
|
+
rules: { sections: [] },
|
486
|
+
},
|
487
|
+
// {
|
488
|
+
// attribute: 'certification',
|
489
|
+
// label: 'Certification',
|
490
|
+
// description:
|
491
|
+
// 'Certifications, such as energy efficiency ratings, associated with your product. Available for the EU and EFTA countries and the UK. Required for products that require certain certification information to be shown in your Shopping ads or free listings, for example due to local energy efficiency labeling regulations. Example: EC:EPREL:123456',
|
492
|
+
// required: false,
|
493
|
+
// type: 'macro-input',
|
494
|
+
// defaultValue: '',
|
495
|
+
// rules: { sections: [] },
|
496
|
+
// },
|
497
|
+
{
|
498
|
+
attribute: 'maxEnergyEfficiencyClass',
|
499
|
+
label: 'Energy efficiency class',
|
500
|
+
description: 'Your product’s energy label. Available for the EU and EFTA countries and the UK. Note: This attribute is being deprecated. Please use the certification attribute instead to show the EU energy efficiency class. Supported values: A, A+, A++, A+++, B, C, D, E, F, G. Example: A+',
|
501
|
+
required: false,
|
502
|
+
type: 'macro-input',
|
503
|
+
validator: (v) => validateIfNoMacro(v, z.enum(['A', 'A+', 'A++', 'A+++', 'B', 'C', 'D', 'E', 'F', 'G', ''])),
|
504
|
+
defaultValue: '',
|
505
|
+
rules: { sections: [] },
|
506
|
+
},
|
507
|
+
{
|
508
|
+
attribute: 'ageGroup',
|
509
|
+
label: 'Age group',
|
510
|
+
description: 'The demographic for which your product is intended. Required (For all apparel products that are targeted to people in Brazil, France, Germany, Japan, the UK, and the US as well as all products with assigned age groups). Required for free listings for all Apparel & Accessories (ID: 166) products. Supported values: newborn, infant, toddler, kids, adult. Example: adult',
|
511
|
+
required: false,
|
512
|
+
type: 'macro-input',
|
513
|
+
// TODO: add to check if product is apparel
|
514
|
+
validator: (v) => validateIfNoMacro(v, z.enum(['newborn', 'infant', 'toddler', 'kids', 'adult', ''])),
|
515
|
+
defaultValue: '',
|
516
|
+
rules: { sections: [] },
|
517
|
+
},
|
518
|
+
{
|
519
|
+
attribute: 'color',
|
520
|
+
label: 'Color',
|
521
|
+
description: 'Your product’s color(s). Required (For all apparel products that are targeted to people in Brazil, France, Germany, Japan, the UK, and the US). Required for free listings for all Apparel & Accessories (ID: 166) products. Max 100 alphanumeric characters (max 40 characters per color). Example: Black',
|
522
|
+
required: false,
|
523
|
+
type: 'macro-input',
|
524
|
+
// TODO: add to check if product is apparel
|
525
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(100)),
|
526
|
+
rules: { sections: [] },
|
527
|
+
},
|
528
|
+
{
|
529
|
+
attribute: 'gender',
|
530
|
+
label: 'Gender',
|
531
|
+
description: 'The gender for which your product is intended. Required (Required for all apparel items that are targeted to people in Brazil, France, Germany, Japan, the UK, and the US as well as all gender-specific products). Required for free listings for all Google Apparel & Accessories (ID: 166) products. Supported values: male, female, unisex. Example: unisex',
|
532
|
+
required: false,
|
533
|
+
type: 'macro-input',
|
534
|
+
// TODO: add to check if product is apparel
|
535
|
+
validator: (v) => validateIfNoMacro(v, z.enum(['male', 'female', 'unisex', ''])),
|
536
|
+
rules: { sections: [] },
|
537
|
+
},
|
538
|
+
{
|
539
|
+
attribute: 'material',
|
540
|
+
label: 'Material',
|
541
|
+
description: 'Your product’s fabric or material. Required (if relevant for distinguishing different products in a set of variants). Max 200 characters. Example: leather',
|
542
|
+
required: false,
|
543
|
+
type: 'macro-input',
|
544
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(200)),
|
545
|
+
rules: { sections: [] },
|
546
|
+
},
|
547
|
+
{
|
548
|
+
attribute: 'pattern',
|
549
|
+
label: 'Pattern',
|
550
|
+
description: 'Your product’s pattern or graphic print. Required (if relevant for distinguishing different products in a set of variants). Max 100 characters. Example: polka dot',
|
551
|
+
required: false,
|
552
|
+
type: 'macro-input',
|
553
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(100)),
|
554
|
+
rules: { sections: [] },
|
555
|
+
},
|
556
|
+
{
|
557
|
+
attribute: 'sizes',
|
558
|
+
label: 'Size',
|
559
|
+
description: 'Your product’s size. Required (Required for all apparel products in Apparel & Accessories > Clothing (ID:1604) and Apparel & Accessories > Shoes (ID:187) categories targeted to people in Brazil, France, Germany, Japan, the UK, and the US as well as all products available in different sizes). Required for free listings for all Apparel & Accessories > Clothing (ID:1604) and Apparel & Accessories > Shoes (ID:187) products. Max 100 characters. Example: XL',
|
560
|
+
required: false,
|
561
|
+
type: 'macro-input',
|
562
|
+
// TODO: add to check if product is apparel
|
563
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(100)),
|
564
|
+
rules: { sections: [] },
|
565
|
+
},
|
566
|
+
{
|
567
|
+
attribute: 'sizeType',
|
568
|
+
label: 'Size type',
|
569
|
+
description: 'Your apparel product’s cut. Available for apparel products only. Supported values: regular, petite, maternity, big, tall, plus. Example: maternity',
|
570
|
+
required: false,
|
571
|
+
type: 'macro-input',
|
572
|
+
validator: (v) => validateIfNoMacro(v, z.enum(['regular', 'petite', 'maternity', 'big', 'tall', 'plus', ''])),
|
573
|
+
rules: { sections: [] },
|
574
|
+
},
|
575
|
+
{
|
576
|
+
attribute: 'sizeSystem',
|
577
|
+
label: 'Size system',
|
578
|
+
description: "The country of the size system used by your product. If you don't submit the attribute, the default value is your target country. Supported values: US, EU, UK, DE, FR, JP, CN, IT, BR, MEX, AU. Example: US",
|
579
|
+
required: false,
|
580
|
+
type: 'macro-input',
|
581
|
+
validator: (v) => validateIfNoMacro(v, z.enum(['US', 'EU', 'UK', 'DE', 'FR', 'JP', 'CN', 'IT', 'BR', 'MEX', 'AU', ''])),
|
582
|
+
rules: { sections: [] },
|
583
|
+
},
|
584
|
+
{
|
585
|
+
attribute: 'itemGroupId',
|
586
|
+
label: 'Item group ID',
|
587
|
+
description: 'ID for a group of products that come in different versions (variants). Required (Brazil, France, Germany, Japan, the United Kingdom, and the US if the product is a variant). Required for free listings for all product variants. Max 50 alphanumeric characters. Example: AB12345',
|
588
|
+
required: false,
|
589
|
+
type: 'macro-input',
|
590
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(50)),
|
591
|
+
defaultValue: '{{shopify.id}}',
|
592
|
+
rules: { sections: [] },
|
593
|
+
},
|
594
|
+
{
|
595
|
+
attribute: 'productLength',
|
596
|
+
label: 'Product length',
|
597
|
+
description: "Your product's length. Supported values: 0-3000. Syntax: Number + unit. Supported units: cm, in. Example: 20 in",
|
598
|
+
required: false,
|
599
|
+
type: 'macro-input',
|
600
|
+
validator: (v) => validateIfNoMacro(v, measureUnitsSchema(['cm', 'in'])),
|
601
|
+
defaultValue: '',
|
602
|
+
rules: { sections: [] },
|
603
|
+
},
|
604
|
+
{
|
605
|
+
attribute: 'productWidth',
|
606
|
+
label: 'Product width',
|
607
|
+
description: "Your product's width. Supported values: 0-3000. Syntax: Number + unit. Supported units: cm, in. Example: 20 in",
|
608
|
+
required: false,
|
609
|
+
type: 'macro-input',
|
610
|
+
validator: (v) => validateIfNoMacro(v, measureUnitsSchema(['cm', 'in'])),
|
611
|
+
defaultValue: '',
|
612
|
+
rules: { sections: [] },
|
613
|
+
},
|
614
|
+
{
|
615
|
+
attribute: 'productHeight',
|
616
|
+
label: 'Product height',
|
617
|
+
description: "Your product's height. Supported values: 0-3000. Syntax: Number + unit. Supported units: cm, in. Example: 20 in",
|
618
|
+
required: false,
|
619
|
+
type: 'macro-input',
|
620
|
+
validator: (v) => validateIfNoMacro(v, measureUnitsSchema(['cm', 'in'])),
|
621
|
+
defaultValue: '',
|
622
|
+
rules: { sections: [] },
|
623
|
+
},
|
624
|
+
{
|
625
|
+
attribute: 'productWeight',
|
626
|
+
label: 'Product weight',
|
627
|
+
description: "Your product's weight. Supported values: 0-2000. Syntax: Number + unit. Supported units: lb, oz, g, kb. Example: 3.5 lb",
|
628
|
+
required: false,
|
629
|
+
type: 'macro-input',
|
630
|
+
validator: (v) => validateIfNoMacro(v, measureUnitsSchema(['lb', 'oz', 'g', 'kg'])),
|
631
|
+
defaultValue: '{{shopify.weight}} {{shopify.weight_unit}}',
|
632
|
+
rules: { sections: [] },
|
633
|
+
},
|
634
|
+
{
|
635
|
+
attribute: 'productDetails',
|
636
|
+
label: 'Product detail',
|
637
|
+
description: "Technical specifications or additional details of your product. This attribute uses 3 sub-attributes: Section name: Max 140 characters. Attribute name: Max 140 characters. Attribute value: Max 1000 characters. Don't add information covered in other attributes, all capital letters, gimmicky foreign characters, promotion text, or list keywords or search terms. Example: General:Product Type:Digital player",
|
638
|
+
required: false,
|
639
|
+
type: 'macro-input',
|
640
|
+
validator: (v) => validateIfNoMacro(v, z
|
641
|
+
.string()
|
642
|
+
.max(1280)
|
643
|
+
.refine(v => !v || v.split(':').length === 3, { message: 'Invalid format' })),
|
644
|
+
defaultValue: '',
|
645
|
+
rules: { sections: [] },
|
646
|
+
},
|
647
|
+
{
|
648
|
+
attribute: 'productHighlights',
|
649
|
+
label: 'Product highlight',
|
650
|
+
description: 'The most relevant highlights of your products. Max 150 characters. Example: Supports thousands of apps, including Netflix, YouTube, and HBO Max',
|
651
|
+
required: false,
|
652
|
+
type: 'macro-input',
|
653
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(150)),
|
654
|
+
defaultValue: '',
|
655
|
+
rules: { sections: [] },
|
656
|
+
},
|
657
|
+
{
|
658
|
+
attribute: 'adsRedirect',
|
659
|
+
label: 'Ads redirect',
|
660
|
+
description: 'A URL used to specify additional parameters for your product page. Customers will be sent to this URL rather than the value that you submit for the link or mobile link attributes. Submit the same registered domain as for the link attribute (and the mobile link attribute, if present). Max 2000 characters. Example: http://www.example.com/product.html',
|
661
|
+
required: false,
|
662
|
+
type: 'macro-input',
|
663
|
+
// TODO: check for the same domain with link and mobile link
|
664
|
+
validator: (v) => validateIfNoMacro(v, z
|
665
|
+
.string()
|
666
|
+
.max(2000)
|
667
|
+
.refine(val => !val || z.string().url().safeParse(val).success, { message: 'invalid URL' })),
|
668
|
+
defaultValue: '',
|
669
|
+
rules: { sections: [] },
|
670
|
+
},
|
671
|
+
...[0, 1, 2, 3, 4].map(i => ({
|
672
|
+
...customLabelMapping,
|
673
|
+
attribute: `customLabel${i}`,
|
674
|
+
label: `Custom Label ${i + 1}`,
|
675
|
+
})),
|
676
|
+
{
|
677
|
+
attribute: 'promotionIds',
|
678
|
+
label: 'Promotion ID',
|
679
|
+
description: 'An identifier that allows you to match products to promotions. Required for promotions in Australia, France, Germany, India, the UK and the US. Max 50 characters. Example: ABC123',
|
680
|
+
required: false,
|
681
|
+
type: 'macro-input',
|
682
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(15)),
|
683
|
+
defaultValue: '',
|
684
|
+
rules: { sections: [] },
|
685
|
+
},
|
686
|
+
{
|
687
|
+
attribute: 'lifestyleImageLinks',
|
688
|
+
label: 'Lifestyle image link',
|
689
|
+
description: 'Attribute used to include the URL for a lifestyle image for your product. Only available for browsy surfaces. Max 2000 characters. Example: https://www.example.com/image1.jpg',
|
690
|
+
required: false,
|
691
|
+
type: 'macro-input',
|
692
|
+
validator: (v) => validateIfNoMacro(v, z
|
693
|
+
.string()
|
694
|
+
.max(2000)
|
695
|
+
.refine(val => !val || z.string().url().safeParse(val).success, { message: 'invalid URL' })),
|
696
|
+
defaultValue: '',
|
697
|
+
rules: { sections: [] },
|
698
|
+
},
|
699
|
+
{
|
700
|
+
attribute: 'externalSellerId',
|
701
|
+
label: 'External seller ID',
|
702
|
+
description: 'Note: Marketplaces is currently only available in the classic version of Merchant Center.Required for multi-seller account. Used by a marketplace to externally identify a seller. (For example, on a website). 1 - 50 characters. Example: SellerPublicName1991',
|
703
|
+
required: false,
|
704
|
+
type: 'macro-input',
|
705
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(50)),
|
706
|
+
defaultValue: '',
|
707
|
+
rules: { sections: [] },
|
708
|
+
},
|
709
|
+
{
|
710
|
+
attribute: 'excludedDestinations',
|
711
|
+
label: 'Exclude destination',
|
712
|
+
description: 'A setting that you can use to exclude a product from participating in a specific type of advertising campaign. Supported values: Shopping_ads, Buy_on_Google_listings, Display_ads, Local_inventory_ads, Free_listings, Free_local_listings, YouTube_Shopping. Comma separated list. Example: Shopping_ads',
|
713
|
+
required: false,
|
714
|
+
type: 'macro-input',
|
715
|
+
validator: (v) => validateIfNoMacro(v, z
|
716
|
+
.string()
|
717
|
+
.refine(v => !v ||
|
718
|
+
v
|
719
|
+
.split(',')
|
720
|
+
.every((val) => [
|
721
|
+
'Shopping_ads',
|
722
|
+
'Buy_on_Google_listings',
|
723
|
+
'Display_ads',
|
724
|
+
'Local_inventory_ads',
|
725
|
+
'Free_listings',
|
726
|
+
'Free_local_listings',
|
727
|
+
'YouTube_Shopping',
|
728
|
+
].includes(val.trim())), { message: 'Invalid value' })),
|
729
|
+
defaultValue: '',
|
730
|
+
rules: { sections: [] },
|
731
|
+
},
|
732
|
+
{
|
733
|
+
attribute: 'includedDestinations',
|
734
|
+
label: 'Included destination',
|
735
|
+
description: 'A setting that you can use to include a product in a specific type of advertising campaign. Supported values: Shopping_ads, Buy_on_Google_listings, Display_ads, Local_inventory_ads, Free_listings, Free_local_listings, YouTube_Shopping. Example: Shopping_ads',
|
736
|
+
required: false,
|
737
|
+
type: 'macro-input',
|
738
|
+
validator: (v) => validateIfNoMacro(v, z
|
739
|
+
.string()
|
740
|
+
.refine(v => !v ||
|
741
|
+
v
|
742
|
+
.split(',')
|
743
|
+
.every((val) => [
|
744
|
+
'Shopping_ads',
|
745
|
+
'Buy_on_Google_listings',
|
746
|
+
'Display_ads',
|
747
|
+
'Local_inventory_ads',
|
748
|
+
'Free_listings',
|
749
|
+
'Free_local_listings',
|
750
|
+
'YouTube_Shopping',
|
751
|
+
].includes(val.trim())), { message: 'Invalid value' })),
|
752
|
+
defaultValue: '',
|
753
|
+
rules: { sections: [] },
|
754
|
+
},
|
755
|
+
{
|
756
|
+
attribute: 'shoppingAdsExcludedCountries',
|
757
|
+
label: 'Shopping ads excluded country',
|
758
|
+
description: 'A setting that allows you to exclude countries where your products are advertised on Shopping ads. 2 characters. Must be an ISO_3166-1_alpha-2 country code. Only available for Shopping ads. Example: DE',
|
759
|
+
required: false,
|
760
|
+
type: 'multi-select',
|
761
|
+
choices: [SOURCE_LANGUAGE],
|
762
|
+
defaultValue: '',
|
763
|
+
rules: { sections: [] },
|
764
|
+
},
|
765
|
+
{
|
766
|
+
attribute: 'pause',
|
767
|
+
label: 'Pause',
|
768
|
+
description: 'A setting you can use to pause and quickly reactivate a product for all ads (including Shopping ads, Display ads, and local inventory ads). A product can be paused for up to 14 days. If a product is paused for more than 14 days it will be disapproved. To re-approve, remove the attribute.. Supported values: ads, no. Example: ads',
|
769
|
+
required: false,
|
770
|
+
type: 'macro-input',
|
771
|
+
validator: (v) => validateIfNoMacro(v, z.enum(['ads', ''])),
|
772
|
+
defaultValue: '',
|
773
|
+
rules: { sections: [] },
|
774
|
+
},
|
775
|
+
{
|
776
|
+
attribute: 'shipping',
|
777
|
+
label: 'Shipping',
|
778
|
+
description: "Your product's shipping cost, shipping speeds, and the locations your product ships to. Shipping costs are required for Shopping ads and free listings for the following countries: Australia, Austria, Belgium, Canada, Czechia, France, Germany, India, Ireland, Israel, Italy, New Zealand, Japan, the Netherlands, Poland, Romania, South Korea, Spain, Switzerland, the UK, and the US. This attribute uses the following sub-attributes: Country (Required) ISO 3166 country code. Region (Optional). Postal code (Optional). Location ID (Optional). Location group name (Optional). Service (Optional) Service class or shipping speed. Price (Optional) Fixed shipping cost, including VAT if required. Minimum handling time and maximum handling time (Optional) To specify handling time. Minimum transit time and maximum transit time (Optional) To specify transit time. Supported prices: 0-1000 USD. Example: US:CA:::Overnight:16.00 USD:1:1:2:3",
|
779
|
+
required: false,
|
780
|
+
type: 'macro-input',
|
781
|
+
defaultValue: '',
|
782
|
+
rules: { sections: [] },
|
783
|
+
},
|
784
|
+
{
|
785
|
+
attribute: 'shippingLabel',
|
786
|
+
label: 'Shipping label',
|
787
|
+
description: 'Label that you assign to a product to help assign correct shipping costs in Merchant Center account settings. Max 100 characters. Example: perishable',
|
788
|
+
type: 'macro-input',
|
789
|
+
defaultValue: '',
|
790
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(100)),
|
791
|
+
rules: { sections: [] },
|
792
|
+
},
|
793
|
+
{
|
794
|
+
attribute: 'shippingWeight',
|
795
|
+
label: 'Shipping weight',
|
796
|
+
description: 'The weight of the product used to calculate the shipping cost. Required for carrier-calculated rates in your account shipping settings. Supported weights: 9-2000 lbs for imperial, 0-1000 kg from metric. Supported units: lb, oz, g, kg. Syntax: Number + unit. Example: 3 kg',
|
797
|
+
required: false,
|
798
|
+
type: 'macro-input',
|
799
|
+
validator: (v) => validateIfNoMacro(v, measureUnitsSchema(['lb', 'oz', 'g', 'kg'])),
|
800
|
+
defaultValue: '{{shopify.weight}} {{shopify.weight_unit}}',
|
801
|
+
rules: { sections: [] },
|
802
|
+
},
|
803
|
+
{
|
804
|
+
attribute: 'shippingLength',
|
805
|
+
label: 'Shipping length',
|
806
|
+
description: 'The length of the product used to calculate the shipping cost by dimensional weight. Supported values: 0-150 for inches, 1-400 for cm. Syntax: Number + unit. Supported units: cm, in. Example: 20 in',
|
807
|
+
required: false,
|
808
|
+
type: 'macro-input',
|
809
|
+
validator: (v) => validateIfNoMacro(v, measureUnitsSchema(['cm', 'in'])),
|
810
|
+
defaultValue: '',
|
811
|
+
rules: { sections: [] },
|
812
|
+
},
|
813
|
+
{
|
814
|
+
attribute: 'shippingWidth',
|
815
|
+
label: 'Shipping width',
|
816
|
+
description: 'The width of the product used to calculate the shipping cost by dimensional weight. Required for carrier-calculated rates in your account shipping settings. Supported values: 0-3000. Syntax: Number + unit. Supported units: cm, in. Example: 20 in',
|
817
|
+
required: false,
|
818
|
+
type: 'macro-input',
|
819
|
+
validator: (v) => validateIfNoMacro(v, measureUnitsSchema(['cm', 'in'])),
|
820
|
+
defaultValue: '',
|
821
|
+
rules: { sections: [] },
|
822
|
+
},
|
823
|
+
{
|
824
|
+
attribute: 'shippingHeight',
|
825
|
+
label: 'Shipping height',
|
826
|
+
description: 'The height of the product used to calculate the shipping cost by dimensional weight. Required for carrier-calculated rates in your account shipping settings. Supported values: 0-3000. Syntax: Number + unit. Supported units: cm, in. Example: 20 in',
|
827
|
+
required: false,
|
828
|
+
type: 'macro-input',
|
829
|
+
validator: (v) => validateIfNoMacro(v, measureUnitsSchema(['cm', 'in'])),
|
830
|
+
defaultValue: '',
|
831
|
+
rules: { sections: [] },
|
832
|
+
},
|
833
|
+
{
|
834
|
+
attribute: 'maxHandlingTime',
|
835
|
+
label: 'Max handling time',
|
836
|
+
description: 'The longest amount of time between when an order is placed for a product and when the product ships. Submit the number of business days. For products ready to be shipped the same day, submit 0. Integer, greater than or equal to 0. Example: 3',
|
837
|
+
required: false,
|
838
|
+
type: 'macro-input',
|
839
|
+
validator: (v) => validateIfNoMacro(v, z.coerce.number().min(0).int()),
|
840
|
+
defaultValue: '',
|
841
|
+
rules: { sections: [] },
|
842
|
+
},
|
843
|
+
{
|
844
|
+
attribute: 'transitTimeLabel',
|
845
|
+
label: 'Transit time label',
|
846
|
+
description: 'Label that you assign to a product to help assign different transit times in Merchant Center account settings. Max 100 characters. Example: From Seattle',
|
847
|
+
required: false,
|
848
|
+
type: 'macro-input',
|
849
|
+
defaultValue: '',
|
850
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(100)),
|
851
|
+
rules: { sections: [] },
|
852
|
+
},
|
853
|
+
{
|
854
|
+
attribute: 'minHandlingTime',
|
855
|
+
label: 'Min handling time',
|
856
|
+
description: 'The shortest amount of time between when an order is placed for a product and when the product ships. Submit the number of business days. For products ready to be shipped the same day, submit 0. Integer, greater than or equal to 0. Example: 1',
|
857
|
+
required: false,
|
858
|
+
type: 'macro-input',
|
859
|
+
validator: (v) => validateIfNoMacro(v, z.coerce.number().min(0).int()),
|
860
|
+
defaultValue: '',
|
861
|
+
rules: { sections: [] },
|
862
|
+
},
|
863
|
+
{
|
864
|
+
attribute: 'taxes',
|
865
|
+
label: 'Tax',
|
866
|
+
description: 'Your product’s sales tax rate in percent. Required (Available for the US only). This attribute uses 4 sub-attributes: Country (optional) ISO 3166 country code. Region or postal code or location ID (optional). Rate (required) Tax rate as a percentage. Shipping tax (optional) Specify if you charge tax on shipping, supported values: yes, no. Example: US:CA:5.00:y',
|
867
|
+
required: false,
|
868
|
+
type: 'macro-input',
|
869
|
+
defaultValue: '',
|
870
|
+
// TODO: add validator to check if US
|
871
|
+
rules: { sections: [] },
|
872
|
+
},
|
873
|
+
{
|
874
|
+
attribute: 'taxCategory',
|
875
|
+
label: 'Tax category',
|
876
|
+
description: 'A category that classifies your product by specific tax rules. Recommended for custom tax rates at the account level. Max 100 characters. Example: Apparel',
|
877
|
+
required: false,
|
878
|
+
type: 'macro-input',
|
879
|
+
defaultValue: '',
|
880
|
+
validator: (v) => validateIfNoMacro(v, z.string().max(100)),
|
881
|
+
rules: { sections: [] },
|
882
|
+
},
|
883
|
+
],
|
884
|
+
};
|
1004
885
|
//# sourceMappingURL=google-api.template.js.map
|