feed-common 1.60.0 → 1.61.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. package/.vscode/settings.json +1 -1
  2. package/CHANGELOG.md +7 -0
  3. package/dist/constants/profile.constants.d.ts +9 -0
  4. package/dist/constants/profile.constants.d.ts.map +1 -1
  5. package/dist/constants/profile.constants.js +70 -1
  6. package/dist/constants/profile.constants.js.map +1 -1
  7. package/dist/index.d.ts +9 -0
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +9 -0
  10. package/dist/index.js.map +1 -1
  11. package/dist/sources/ee.source.d.ts +5 -0
  12. package/dist/sources/ee.source.d.ts.map +1 -0
  13. package/dist/sources/ee.source.js +13 -0
  14. package/dist/sources/ee.source.js.map +1 -0
  15. package/dist/sources/google-age-group.source.d.ts +5 -0
  16. package/dist/sources/google-age-group.source.d.ts.map +1 -0
  17. package/dist/sources/google-age-group.source.js +8 -0
  18. package/dist/sources/google-age-group.source.js.map +1 -0
  19. package/dist/sources/google-category.source.d.ts +5 -0
  20. package/dist/sources/google-category.source.d.ts.map +1 -0
  21. package/dist/sources/google-category.source.js +5598 -0
  22. package/dist/sources/google-category.source.js.map +1 -0
  23. package/dist/sources/google-condition.source.d.ts +5 -0
  24. package/dist/sources/google-condition.source.d.ts.map +1 -0
  25. package/dist/sources/google-condition.source.js +6 -0
  26. package/dist/sources/google-condition.source.js.map +1 -0
  27. package/dist/sources/google-gender.source.d.ts +5 -0
  28. package/dist/sources/google-gender.source.d.ts.map +1 -0
  29. package/dist/sources/google-gender.source.js +6 -0
  30. package/dist/sources/google-gender.source.js.map +1 -0
  31. package/dist/sources/google-gmc-destinations.source.d.ts +5 -0
  32. package/dist/sources/google-gmc-destinations.source.d.ts.map +1 -0
  33. package/dist/sources/google-gmc-destinations.source.js +10 -0
  34. package/dist/sources/google-gmc-destinations.source.js.map +1 -0
  35. package/dist/sources/google-size-system.source.d.ts +5 -0
  36. package/dist/sources/google-size-system.source.d.ts.map +1 -0
  37. package/dist/sources/google-size-system.source.js +14 -0
  38. package/dist/sources/google-size-system.source.js.map +1 -0
  39. package/dist/sources/google-size-type.source.d.ts +5 -0
  40. package/dist/sources/google-size-type.source.d.ts.map +1 -0
  41. package/dist/sources/google-size-type.source.js +9 -0
  42. package/dist/sources/google-size-type.source.js.map +1 -0
  43. package/dist/sources/yes-no.source.d.ts +5 -0
  44. package/dist/sources/yes-no.source.d.ts.map +1 -0
  45. package/dist/sources/yes-no.source.js +2 -0
  46. package/dist/sources/yes-no.source.js.map +1 -0
  47. package/dist/utils/feed-templates/google-api.template.d.ts.map +1 -1
  48. package/dist/utils/feed-templates/google-api.template.js +40 -18
  49. package/dist/utils/feed-templates/google-api.template.js.map +1 -1
  50. package/package.json +1 -1
  51. package/src/constants/profile.constants.ts +70 -1
  52. package/src/index.ts +9 -0
  53. package/src/sources/ee.source.ts +12 -0
  54. package/src/sources/google-age-group.source.ts +7 -0
  55. package/src/sources/google-category.source.ts +5597 -0
  56. package/src/sources/google-condition.source.ts +5 -0
  57. package/src/sources/google-gender.source.ts +5 -0
  58. package/src/sources/google-gmc-destinations.source.ts +9 -0
  59. package/src/sources/google-size-system.source.ts +13 -0
  60. package/src/sources/google-size-type.source.ts +8 -0
  61. package/src/sources/yes-no.source.ts +1 -0
  62. package/src/utils/feed-templates/google-api.template.ts +39 -17
@@ -0,0 +1,5 @@
1
+ export const GoogleProductConditionSource = [
2
+ { label: 'New', value: 'new' },
3
+ { label: 'Refurbished', value: 'refurbished' },
4
+ { label: 'Used', value: 'used' }
5
+ ];
@@ -0,0 +1,5 @@
1
+ export const GoogleGenderSource = [
2
+ { label: 'Male', value: 'male' },
3
+ { label: 'Female', value: 'female' },
4
+ { label: 'Unisex', value: 'unisex' },
5
+ ];
@@ -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_installment:}}',
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: '{{shopify.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: 'multi-select',
922
- choices: [SOURCE_LANGUAGE],
923
- defaultValue: '',
943
+ type: 'macro-input',
944
+ defaultValue: '{{source.country:}}',
945
+ fixedValue: true,
924
946
  rules: { sections: [] },
925
947
  },
926
948
  {