feed-common 1.48.2 → 1.49.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,96 @@
1
+ // /**
2
+ // * Additional cut of the item. Used together with size_type to represent combined size types for apparel items.
3
+ // */
4
+ // additionalSizeType?: string | null;
5
+ // /**
6
+ // * Used to group items in an arbitrary way. Only for CPA%, discouraged otherwise.
7
+ // */
8
+ // adsGrouping?: string | null;
9
+ // /**
10
+ // * Similar to ads_grouping, but only works on CPC.
11
+ // */
12
+ // adsLabels?: string[] | null;
13
+ // /**
14
+ // * URL for the canonical version of your item's landing page.
15
+ // */
16
+ // canonicalLink?: string | null;
17
+ // /**
18
+ // * Product [certification](https://support.google.com/merchants/answer/13528839), introduced for EU energy efficiency labeling compliance using the [EU EPREL](https://eprel.ec.europa.eu/screen/home) database.
19
+ // */
20
+ // certifications?: Schema$ProductCertification[];
21
+ // /**
22
+ // * Extra fields to export to the Cloud Retail program.
23
+ // */
24
+ // cloudExportAdditionalProperties?: Schema$CloudExportAdditionalProperties[];
25
+ // /**
26
+ // * A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the feed specification in its generic form (for example, `{ "name": "size type", "value": "regular" \}`). This is useful for submitting attributes not explicitly exposed by the API, such as additional attributes used for Buy on Google (formerly known as Shopping Actions).
27
+ // */
28
+ // customAttributes?: Schema$CustomAttribute[];
29
+ // /**
30
+ // * The date time when an offer becomes visible in search results across Google’s YouTube surfaces, in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format. See [Disclosure date](https://support.google.com/merchants/answer/13034208) for more information.
31
+ // */
32
+ // disclosureDate?: string | null;
33
+ // /**
34
+ // * An identifier for an item for dynamic remarketing campaigns.
35
+ // */
36
+ // displayAdsId?: string | null;
37
+ // /**
38
+ // * URL directly to your item's landing page for dynamic remarketing campaigns.
39
+ // */
40
+ // displayAdsLink?: string | null;
41
+ // /**
42
+ // * Advertiser-specified recommendations.
43
+ // */
44
+ // displayAdsSimilarIds?: string[] | null;
45
+ // /**
46
+ // * Title of an item for dynamic remarketing campaigns.
47
+ // */
48
+ // displayAdsTitle?: string | null;
49
+ // /**
50
+ // * Offer margin for dynamic remarketing campaigns.
51
+ // */
52
+ // displayAdsValue?: number | null;
53
+ // /**
54
+ // * The energy efficiency class as defined in EU directive 2010/30/EU.
55
+ // */
56
+ // energyEfficiencyClass?: string | null;
57
+ // /**
58
+ // * Feed label for the item. Either `targetCountry` or `feedLabel` is required. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-).
59
+ // */
60
+ // feedLabel?: string | null;
61
+ // /**
62
+ // * Number and amount of installments to pay for an item.
63
+ // */
64
+ // installment?: Schema$Installment;
65
+ // /**
66
+ // * Identifies what kind of resource this is. Value: the fixed string "`content#product`"
67
+ // */
68
+ // kind?: string | null;
69
+ // /**
70
+ // * URL template for merchant hosted local storefront.
71
+ // */
72
+ // linkTemplate?: string | null;
73
+ // /**
74
+ // * The energy efficiency class as defined in EU directive 2010/30/EU.
75
+ // */
76
+ // minEnergyEfficiencyClass?: string | null;
77
+ // /**
78
+ // * URL template for merchant hosted local storefront optimized for mobile devices.
79
+ // */
80
+ // mobileLinkTemplate?: string | null;
81
+ // /**
82
+ // * The pick up option for the item. Acceptable values are: - "`buy`" - "`reserve`" - "`ship to store`" - "`not supported`"
83
+ // */
84
+ // pickupMethod?: string | null;
85
+ // /**
86
+ // * Item store pickup timeline. Acceptable values are: - "`same day`" - "`next day`" - "`2-day`" - "`3-day`" - "`4-day`" - "`5-day`" - "`6-day`" - "`7-day`" - "`multi-week`"
87
+ // */
88
+ // pickupSla?: string | null;
89
+ // /**
90
+ // * The quantity of the product that is available for selling on Google. Supported only for online products.
91
+ // */
92
+ // sellOnGoogleQuantity?: string | null;
93
+ // /**
94
+ // * The source of the offer, that is, how the offer was created. Acceptable values are: - "`api`" - "`crawl`" - "`feed`"
95
+ // */
96
+ // source?: string | null;
@@ -7,6 +7,7 @@ import { XmlFeedTemplateType } from '../../types/profile.types.js';
7
7
  import { googleFeedTemplate } from './google.template.js';
8
8
  import { tiktokFeedTemplate } from './tiktok.template.js';
9
9
  import { microsoftTemplate } from './microsoft.template.js';
10
+ import { googleApiTemplate } from './google-api.template.js';
10
11
 
11
12
  export const hasMacro = (v: string) => /{{[^}]+}}/.test(v);
12
13
  export const removeMacro = (v: string) => v.replaceAll(/{{[^}]+}}/g, '');
@@ -91,6 +92,8 @@ export function getTemplate(type: XMLFeedType): XmlFeedTemplateType {
91
92
  return tiktokFeedTemplate;
92
93
  case XMLFeedType.Microsoft:
93
94
  return microsoftTemplate;
95
+ case XMLFeedType.GMC_API:
96
+ return googleApiTemplate;
94
97
  default:
95
98
  throw new Error(`Invalid feed type: ${type}`);
96
99
  }