feed-common 1.60.0 → 1.61.1
Sign up to get free protection for your applications and to get access to all the features.
- package/.vscode/settings.json +1 -1
- package/CHANGELOG.md +14 -0
- package/dist/constants/profile.constants.d.ts +9 -0
- package/dist/constants/profile.constants.d.ts.map +1 -1
- package/dist/constants/profile.constants.js +70 -1
- package/dist/constants/profile.constants.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/sources/ee.source.d.ts +5 -0
- package/dist/sources/ee.source.d.ts.map +1 -0
- package/dist/sources/ee.source.js +13 -0
- package/dist/sources/ee.source.js.map +1 -0
- package/dist/sources/google-age-group.source.d.ts +5 -0
- package/dist/sources/google-age-group.source.d.ts.map +1 -0
- package/dist/sources/google-age-group.source.js +8 -0
- package/dist/sources/google-age-group.source.js.map +1 -0
- package/dist/sources/google-category.source.d.ts +5 -0
- package/dist/sources/google-category.source.d.ts.map +1 -0
- package/dist/sources/google-category.source.js +5598 -0
- package/dist/sources/google-category.source.js.map +1 -0
- package/dist/sources/google-condition.source.d.ts +5 -0
- package/dist/sources/google-condition.source.d.ts.map +1 -0
- package/dist/sources/google-condition.source.js +6 -0
- package/dist/sources/google-condition.source.js.map +1 -0
- package/dist/sources/google-gender.source.d.ts +5 -0
- package/dist/sources/google-gender.source.d.ts.map +1 -0
- package/dist/sources/google-gender.source.js +6 -0
- package/dist/sources/google-gender.source.js.map +1 -0
- package/dist/sources/google-gmc-destinations.source.d.ts +5 -0
- package/dist/sources/google-gmc-destinations.source.d.ts.map +1 -0
- package/dist/sources/google-gmc-destinations.source.js +10 -0
- package/dist/sources/google-gmc-destinations.source.js.map +1 -0
- package/dist/sources/google-size-system.source.d.ts +5 -0
- package/dist/sources/google-size-system.source.d.ts.map +1 -0
- package/dist/sources/google-size-system.source.js +14 -0
- package/dist/sources/google-size-system.source.js.map +1 -0
- package/dist/sources/google-size-type.source.d.ts +5 -0
- package/dist/sources/google-size-type.source.d.ts.map +1 -0
- package/dist/sources/google-size-type.source.js +9 -0
- package/dist/sources/google-size-type.source.js.map +1 -0
- package/dist/sources/yes-no.source.d.ts +5 -0
- package/dist/sources/yes-no.source.d.ts.map +1 -0
- package/dist/sources/yes-no.source.js +2 -0
- package/dist/sources/yes-no.source.js.map +1 -0
- package/dist/utils/feed-templates/google-api.template.d.ts.map +1 -1
- package/dist/utils/feed-templates/google-api.template.js +40 -18
- package/dist/utils/feed-templates/google-api.template.js.map +1 -1
- package/package.json +1 -1
- package/src/constants/profile.constants.ts +70 -1
- package/src/index.ts +9 -0
- package/src/sources/ee.source.ts +12 -0
- package/src/sources/google-age-group.source.ts +7 -0
- package/src/sources/google-category.source.ts +5597 -0
- package/src/sources/google-condition.source.ts +5 -0
- package/src/sources/google-gender.source.ts +5 -0
- package/src/sources/google-gmc-destinations.source.ts +9 -0
- package/src/sources/google-size-system.source.ts +13 -0
- package/src/sources/google-size-type.source.ts +8 -0
- package/src/sources/yes-no.source.ts +1 -0
- package/src/utils/feed-templates/google-api.template.ts +39 -17
@@ -0,0 +1,9 @@
|
|
1
|
+
export const GoogleGmcDestinations = [
|
2
|
+
{ label: 'Shopping Ads', value: 'Shopping_ads' },
|
3
|
+
{ label: 'Buy on Google Listings', value: 'Buy_on_Google_listings' },
|
4
|
+
{ label: 'Display Ads', value: 'Display_ads' },
|
5
|
+
{ label: 'Local Inventory Ads', value: 'Local_inventory_ads' },
|
6
|
+
{ label: 'Free Listings', value: 'Free_listings' },
|
7
|
+
{ label: 'Free Local Listings', value: 'Free_local_listings' },
|
8
|
+
{ label: 'YouTube Shopping', value: 'YouTube_Shopping' }
|
9
|
+
];
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export const GoogleSizeSystemSource = [
|
2
|
+
{ label: 'Australia', value: 'AU' },
|
3
|
+
{ label: 'Brazil', value: 'BR' },
|
4
|
+
{ label: 'China', value: 'CN' },
|
5
|
+
{ label: 'European Union', value: 'EU' },
|
6
|
+
{ label: 'France', value: 'FR' },
|
7
|
+
{ label: 'Germany', value: 'DE' },
|
8
|
+
{ label: 'Italy', value: 'IT' },
|
9
|
+
{ label: 'Japan', value: 'JP' },
|
10
|
+
{ label: 'Mexico', value: 'MEX' },
|
11
|
+
{ label: 'United Kingdom', value: 'UK' },
|
12
|
+
{ label: 'United States', value: 'US' }
|
13
|
+
];
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export const GoogleSizeTypeSource = [
|
2
|
+
{ label: 'Regular', value: 'regular' },
|
3
|
+
{ label: 'Petite', value: 'petite' },
|
4
|
+
{ label: 'Maternity', value: 'maternity' },
|
5
|
+
{ label: 'Plus', value: 'plus' },
|
6
|
+
{ label: 'Big', value: 'big' },
|
7
|
+
{ label: 'Tall', value: 'tall' },
|
8
|
+
];
|
@@ -0,0 +1 @@
|
|
1
|
+
export const YesNoSource = [{ label: 'Yes', value: 'yes' }, { label: 'No', value: 'no' }];
|
@@ -398,7 +398,7 @@ export const googleApiTemplate: XmlFeedTemplateType = {
|
|
398
398
|
'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',
|
399
399
|
required: false,
|
400
400
|
type: 'macro-input',
|
401
|
-
defaultValue: '',
|
401
|
+
defaultValue: '{{source.google_instalment:}}',
|
402
402
|
validator: (v: string | number) =>
|
403
403
|
validateIfNoMacro(
|
404
404
|
v,
|
@@ -467,7 +467,7 @@ export const googleApiTemplate: XmlFeedTemplateType = {
|
|
467
467
|
}
|
468
468
|
})
|
469
469
|
),
|
470
|
-
defaultValue: '',
|
470
|
+
defaultValue: '{{source.google_subscription:}}',
|
471
471
|
rules: { sections: [] },
|
472
472
|
},
|
473
473
|
{
|
@@ -477,8 +477,10 @@ export const googleApiTemplate: XmlFeedTemplateType = {
|
|
477
477
|
'Google-defined product category for your product. Example: Apparel & Accessories > Clothing > Outerwear > Coats & Jackets or 371',
|
478
478
|
required: false,
|
479
479
|
type: 'macro-input',
|
480
|
-
defaultValue: '',
|
480
|
+
defaultValue: '{{source.google_category:}}',
|
481
481
|
rules: { sections: [] },
|
482
|
+
fixedValue: true,
|
483
|
+
singleChoice: true,
|
482
484
|
},
|
483
485
|
{
|
484
486
|
attribute: 'productTypes',
|
@@ -532,8 +534,10 @@ export const googleApiTemplate: XmlFeedTemplateType = {
|
|
532
534
|
required: false,
|
533
535
|
type: 'macro-input',
|
534
536
|
validator: (v: string | number) => validateIfNoMacro(v, z.enum(['yes', 'no', ''])),
|
535
|
-
defaultValue: 'yes',
|
537
|
+
defaultValue: '{{source.yes_no:[{"label": "Yes", "value": "yes"}]}}',
|
536
538
|
rules: { sections: [] },
|
539
|
+
fixedValue: true,
|
540
|
+
singleChoice: true,
|
537
541
|
},
|
538
542
|
{
|
539
543
|
attribute: 'condition',
|
@@ -543,8 +547,10 @@ export const googleApiTemplate: XmlFeedTemplateType = {
|
|
543
547
|
required: false,
|
544
548
|
type: 'macro-input',
|
545
549
|
validator: (v: string | number) => validateIfNoMacro(v, z.enum(['new', 'refurbished', 'used', ''])),
|
546
|
-
defaultValue: '',
|
550
|
+
defaultValue: '{{source.google_condition:}}',
|
547
551
|
rules: { sections: [] },
|
552
|
+
singleChoice: true,
|
553
|
+
fixedValue: true,
|
548
554
|
},
|
549
555
|
{
|
550
556
|
attribute: 'adult',
|
@@ -554,8 +560,10 @@ export const googleApiTemplate: XmlFeedTemplateType = {
|
|
554
560
|
required: false,
|
555
561
|
type: 'macro-input',
|
556
562
|
validator: (v: string | number) => validateIfNoMacro(v, z.enum(['yes', 'no', ''])),
|
557
|
-
defaultValue: '',
|
563
|
+
defaultValue: '{{source.yes_no:}]}}',
|
558
564
|
rules: { sections: [] },
|
565
|
+
singleChoice: true,
|
566
|
+
fixedValue: true,
|
559
567
|
},
|
560
568
|
{
|
561
569
|
attribute: 'multipack',
|
@@ -576,8 +584,10 @@ export const googleApiTemplate: XmlFeedTemplateType = {
|
|
576
584
|
required: false,
|
577
585
|
type: 'macro-input',
|
578
586
|
validator: (v: string | number) => validateIfNoMacro(v, z.enum(['yes', 'no', ''])),
|
579
|
-
defaultValue: '',
|
587
|
+
defaultValue: '{{source.yes_no:}}',
|
580
588
|
rules: { sections: [] },
|
589
|
+
singleChoice: true,
|
590
|
+
fixedValue: true,
|
581
591
|
},
|
582
592
|
// {
|
583
593
|
// attribute: 'certification',
|
@@ -598,8 +608,10 @@ export const googleApiTemplate: XmlFeedTemplateType = {
|
|
598
608
|
type: 'macro-input',
|
599
609
|
validator: (v: string | number) =>
|
600
610
|
validateIfNoMacro(v, z.enum(['A', 'A+', 'A++', 'A+++', 'B', 'C', 'D', 'E', 'F', 'G', ''])),
|
601
|
-
defaultValue: '',
|
611
|
+
defaultValue: '{{source.energy_efficiency:}}',
|
602
612
|
rules: { sections: [] },
|
613
|
+
singleChoice: true,
|
614
|
+
fixedValue: true,
|
603
615
|
},
|
604
616
|
{
|
605
617
|
attribute: 'ageGroup',
|
@@ -611,8 +623,10 @@ export const googleApiTemplate: XmlFeedTemplateType = {
|
|
611
623
|
// TODO: add to check if product is apparel
|
612
624
|
validator: (v: string | number) =>
|
613
625
|
validateIfNoMacro(v, z.enum(['newborn', 'infant', 'toddler', 'kids', 'adult', ''])),
|
614
|
-
defaultValue: '',
|
626
|
+
defaultValue: '{{source.google_age_group:}}',
|
615
627
|
rules: { sections: [] },
|
628
|
+
singleChoice: true,
|
629
|
+
fixedValue: true,
|
616
630
|
},
|
617
631
|
{
|
618
632
|
attribute: 'color',
|
@@ -636,7 +650,9 @@ export const googleApiTemplate: XmlFeedTemplateType = {
|
|
636
650
|
// TODO: add to check if product is apparel
|
637
651
|
validator: (v: string | number) => validateIfNoMacro(v, z.enum(['male', 'female', 'unisex', ''])),
|
638
652
|
rules: { sections: [] },
|
639
|
-
defaultValue: '',
|
653
|
+
defaultValue: '{{source.google_gender:}}',
|
654
|
+
singleChoice: true,
|
655
|
+
fixedValue: true,
|
640
656
|
},
|
641
657
|
{
|
642
658
|
attribute: 'material',
|
@@ -682,7 +698,9 @@ export const googleApiTemplate: XmlFeedTemplateType = {
|
|
682
698
|
validator: (v: string | number) =>
|
683
699
|
validateIfNoMacro(v, z.enum(['regular', 'petite', 'maternity', 'big', 'tall', 'plus', ''])),
|
684
700
|
rules: { sections: [] },
|
685
|
-
defaultValue: '',
|
701
|
+
defaultValue: '{{source.google_size_type:}}',
|
702
|
+
singleChoice: true,
|
703
|
+
fixedValue: true,
|
686
704
|
},
|
687
705
|
{
|
688
706
|
attribute: 'sizeSystem',
|
@@ -694,7 +712,9 @@ export const googleApiTemplate: XmlFeedTemplateType = {
|
|
694
712
|
validator: (v: string | number) =>
|
695
713
|
validateIfNoMacro(v, z.enum(['US', 'EU', 'UK', 'DE', 'FR', 'JP', 'CN', 'IT', 'BR', 'MEX', 'AU', ''])),
|
696
714
|
rules: { sections: [] },
|
697
|
-
defaultValue: '',
|
715
|
+
defaultValue: '{{source.google_size_system:}}',
|
716
|
+
singleChoice: true,
|
717
|
+
fixedValue: true,
|
698
718
|
},
|
699
719
|
{
|
700
720
|
attribute: 'itemGroupId',
|
@@ -875,7 +895,8 @@ export const googleApiTemplate: XmlFeedTemplateType = {
|
|
875
895
|
{ message: 'Invalid value' }
|
876
896
|
)
|
877
897
|
),
|
878
|
-
defaultValue: '',
|
898
|
+
defaultValue: '{{source.google_gmc_destinations:}}',
|
899
|
+
fixedValue: true,
|
879
900
|
rules: { sections: [] },
|
880
901
|
},
|
881
902
|
{
|
@@ -909,7 +930,8 @@ export const googleApiTemplate: XmlFeedTemplateType = {
|
|
909
930
|
{ message: 'Invalid value' }
|
910
931
|
)
|
911
932
|
),
|
912
|
-
defaultValue: '',
|
933
|
+
defaultValue: '{{source.google_gmc_destinations:}}',
|
934
|
+
fixedValue: true,
|
913
935
|
rules: { sections: [] },
|
914
936
|
},
|
915
937
|
{
|
@@ -918,9 +940,9 @@ export const googleApiTemplate: XmlFeedTemplateType = {
|
|
918
940
|
description:
|
919
941
|
'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',
|
920
942
|
required: false,
|
921
|
-
type: '
|
922
|
-
|
923
|
-
|
943
|
+
type: 'macro-input',
|
944
|
+
defaultValue: '{{source.country:}}',
|
945
|
+
fixedValue: true,
|
924
946
|
rules: { sections: [] },
|
925
947
|
},
|
926
948
|
{
|