feed-common 1.64.0 → 1.64.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,17 +17,8 @@ const availabilityMapping = {
17
17
  validator: (v: string | number) => validateIfNoMacro(v, z.enum(['in stock', 'out of stock'])),
18
18
  baseMode: true,
19
19
  defaultValue: '',
20
- };
21
-
22
- const conditionMapping = {
23
- attribute: 'condition',
24
- label: 'Condition',
25
- description: 'The condition of the item. Supported values: new, refurbished, used. Example: new',
26
- required: true,
27
- type: 'macro-input' as any,
28
- validator: (v: string | number) => validateIfNoMacro(v, z.enum(['new', 'refurbished', 'used'])),
29
- baseMode: true,
30
- defaultValue: '',
20
+ singleChoice: true,
21
+ fixedValue: true,
31
22
  };
32
23
 
33
24
  const videoMapping = {
@@ -146,11 +137,17 @@ export const facebookFeedTemplate: XmlFeedTemplateType = {
146
137
  },
147
138
  },
148
139
  {
149
- ...conditionMapping,
150
- defaultValue: 'new',
151
- rules: {
152
- sections: [],
153
- },
140
+ attribute: 'condition',
141
+ label: 'Condition',
142
+ description: 'The condition of the item. Supported values: new, refurbished, used. Example: new',
143
+ required: true,
144
+ type: 'macro-input' as any,
145
+ validator: (v: string | number) => validateIfNoMacro(v, z.enum(['new', 'refurbished', 'used'])),
146
+ baseMode: true,
147
+ defaultValue: '{{source.google_condition:}}',
148
+ rules: { sections: [] },
149
+ singleChoice: true,
150
+ fixedValue: true,
154
151
  },
155
152
  {
156
153
  attribute: 'price',
@@ -238,9 +235,10 @@ export const facebookFeedTemplate: XmlFeedTemplateType = {
238
235
  "The date, time and time zone when your sale starts and ends. If you don't add this field, any items with a sale_price remain on sale until you remove their sale price. Use this format: YYYY-MM-DDT23:59+00:00/YYYY-MM-DDT23:59+00:00. Example (using PST time zone -08:00): 2020-04-30T09:30-08:00/2020-05-30T23:59-08:00",
239
236
  required: false,
240
237
  type: 'macro-input',
241
- defaultValue: '',
238
+ defaultValue: '{{source.date_range:}}',
242
239
  validator: (v: string | number) => validateIfNoMacro(v, dateRangeSchema),
243
240
  rules: { sections: [] },
241
+ fixedValue: true,
244
242
  },
245
243
  {
246
244
  attribute: 'item_group_id',
@@ -301,8 +299,10 @@ export const facebookFeedTemplate: XmlFeedTemplateType = {
301
299
  'The category of the item according to the Google product taxonomy. Example: Apparel & Accessories > Clothing > Shirts & Tops or 212',
302
300
  required: false,
303
301
  type: 'macro-input',
304
- defaultValue: '',
302
+ defaultValue: '{{source.google_category:}}',
305
303
  rules: { sections: [] },
304
+ fixedValue: true,
305
+ singleChoice: true,
306
306
  },
307
307
  {
308
308
  attribute: 'fb_product_category',
@@ -311,7 +311,9 @@ export const facebookFeedTemplate: XmlFeedTemplateType = {
311
311
  "The category of the item according to Facebook's product taxonomy. Example: Clothing & Accessories > Clothing > Women's Clothing > Tops & T-Shirts or 430",
312
312
  required: false,
313
313
  type: 'macro-input',
314
- defaultValue: '',
314
+ defaultValue: '{{source.fb_category:}}',
315
+ fixedValue: true,
316
+ singleChoice: true,
315
317
  rules: { sections: [] },
316
318
  },
317
319
  {
@@ -332,7 +334,9 @@ export const facebookFeedTemplate: XmlFeedTemplateType = {
332
334
  'The gender your item is targeted towards. Supported values: female, male, unisex. Example: female',
333
335
  required: false,
334
336
  type: 'macro-input',
335
- defaultValue: '',
337
+ defaultValue: '{{source.google_gender:}}',
338
+ singleChoice: true,
339
+ fixedValue: true,
336
340
  rules: { sections: [] },
337
341
  validator: v => validate(v, z.enum(['female', 'male', 'unisex', '']).optional()),
338
342
  },
@@ -343,7 +347,9 @@ export const facebookFeedTemplate: XmlFeedTemplateType = {
343
347
  'The age group that the item is targeted towards. Supported values: adult, all ages, teen, kids, toddler, infant, newborn. Example: adult',
344
348
  required: false,
345
349
  type: 'macro-input',
346
- defaultValue: '',
350
+ defaultValue: '{{source.fb_age_group:}}',
351
+ singleChoice: true,
352
+ fixedValue: true,
347
353
  rules: { sections: [] },
348
354
  validator: v =>
349
355
  validate(
@@ -405,8 +411,9 @@ export const facebookFeedTemplate: XmlFeedTemplateType = {
405
411
  'This field enables you to add the "free shipping" overlay in Advantage+ catalog ads. Enter shipping details for the item formatted as Country:Region:Service:Price Example: US:NY:Ground:9.99 USD, PH::Air:300 PHP',
406
412
  required: false,
407
413
  type: 'macro-input',
408
- defaultValue: '',
414
+ defaultValue: '{{source.fb_shipping:}}',
409
415
  rules: { sections: [] },
416
+ fixedValue: true,
410
417
  },
411
418
  {
412
419
  attribute: 'shipping_weight',