feed-common 1.77.5 → 1.77.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/constants/profile.constants.d.ts +5 -0
  3. package/dist/constants/profile.constants.d.ts.map +1 -1
  4. package/dist/constants/profile.constants.js +35 -0
  5. package/dist/constants/profile.constants.js.map +1 -1
  6. package/dist/index.d.ts +5 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +5 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/sources/ebay-measurement-units.source.d.ts +5 -0
  11. package/dist/sources/ebay-measurement-units.source.d.ts.map +1 -0
  12. package/dist/sources/ebay-measurement-units.source.js +5 -0
  13. package/dist/sources/ebay-measurement-units.source.js.map +1 -0
  14. package/dist/sources/ebay-paid-by-cost.source.d.ts +5 -0
  15. package/dist/sources/ebay-paid-by-cost.source.d.ts.map +1 -0
  16. package/dist/sources/ebay-paid-by-cost.source.js +5 -0
  17. package/dist/sources/ebay-paid-by-cost.source.js.map +1 -0
  18. package/dist/sources/ebay-refund-options.source.d.ts +5 -0
  19. package/dist/sources/ebay-refund-options.source.d.ts.map +1 -0
  20. package/dist/sources/ebay-refund-options.source.js +5 -0
  21. package/dist/sources/ebay-refund-options.source.js.map +1 -0
  22. package/dist/sources/ebay-returns-accepted.source.d.ts +5 -0
  23. package/dist/sources/ebay-returns-accepted.source.d.ts.map +1 -0
  24. package/dist/sources/ebay-returns-accepted.source.js +5 -0
  25. package/dist/sources/ebay-returns-accepted.source.js.map +1 -0
  26. package/dist/sources/ebay-site.source.d.ts +5 -0
  27. package/dist/sources/ebay-site.source.d.ts.map +1 -0
  28. package/dist/sources/ebay-site.source.js +24 -0
  29. package/dist/sources/ebay-site.source.js.map +1 -0
  30. package/dist/utils/feed-templates/ebay.template.d.ts.map +1 -1
  31. package/dist/utils/feed-templates/ebay.template.js +597 -92
  32. package/dist/utils/feed-templates/ebay.template.js.map +1 -1
  33. package/dist/utils/profile.d.ts.map +1 -1
  34. package/dist/utils/profile.js +16 -1
  35. package/dist/utils/profile.js.map +1 -1
  36. package/package.json +1 -1
  37. package/src/constants/profile.constants.ts +35 -0
  38. package/src/index.ts +5 -0
  39. package/src/sources/ebay-measurement-units.source.ts +4 -0
  40. package/src/sources/ebay-paid-by-cost.source.ts +4 -0
  41. package/src/sources/ebay-refund-options.source.ts +4 -0
  42. package/src/sources/ebay-returns-accepted.source.ts +4 -0
  43. package/src/sources/ebay-site.source.ts +23 -0
  44. package/src/utils/feed-templates/ebay.template.ts +616 -97
  45. package/src/utils/profile.ts +20 -0
@@ -4,15 +4,25 @@ import { validateIfNoMacro } from './common-schemas.js';
4
4
  import {
5
5
  ACTION_ARRAY_FIRST_ITEMS,
6
6
  SOURCE_EBAY_GALLERY_TYPE,
7
+ SOURCE_EBAY_INTERNATIONAL_REFUND_OPTIONS,
8
+ SOURCE_EBAY_INTERNATIONAL_RETURNS_ACCEPTED,
7
9
  SOURCE_EBAY_INVENTORY_TRACKING,
8
- SOURCE_EBAY_LISTING_TYPE,
10
+ SOURCE_EBAY_MEASUREMENT_UNITS,
11
+ SOURCE_EBAY_PAID_BY_COST,
12
+ SOURCE_EBAY_SITE,
9
13
  SOURCE_EBAY_YES_NO,
14
+ SOURCE_SHOPIFY_COMPARE_AT_PRICE,
10
15
  SOURCE_SHOPIFY_DESCRIPTION_HTML,
16
+ SOURCE_SHOPIFY_ID,
11
17
  SOURCE_SHOPIFY_IMAGE,
12
18
  SOURCE_SHOPIFY_IMAGES,
19
+ SOURCE_SHOPIFY_INVENTORY_QUANTITY,
20
+ SOURCE_SHOPIFY_PRICE,
13
21
  SOURCE_SHOPIFY_SHOP_COUNTRY,
14
22
  SOURCE_SHOPIFY_SHOP_CURRENCY,
15
23
  SOURCE_SHOPIFY_SHOP_POSTAL_CODE,
24
+ SOURCE_SHOPIFY_VARIANT_ID,
25
+ SOURCE_SHOPIFY_VARIANT_TITLE,
16
26
  SOURCE_SHOPIFY_VENDOR,
17
27
  } from '../../constants/profile.constants.js';
18
28
  import { SelectItem, XmlFeedTemplateType } from '../../types/profile.types.js';
@@ -32,7 +42,287 @@ export const eBayFeedTemplate: XmlFeedTemplateType = {
32
42
  documentation: 'https://developer.ebay.com/devzone/xml/docs/reference/ebay/AddFixedPriceItem.html',
33
43
  mapping: [
34
44
  {
35
- attribute: 'AutoPay',
45
+ attribute: 'Item.Site',
46
+ label: 'Site',
47
+ description: 'The name of the eBay listing site',
48
+ required: true,
49
+ type: 'macro-input',
50
+ defaultValue: makeMacroString(SOURCE_EBAY_SITE),
51
+ rules: { sections: [] },
52
+ baseMode: true,
53
+ fixedValue: true,
54
+ singleChoice: true,
55
+ validator: v => validateIfNoMacro(v, z.string()),
56
+ },
57
+ {
58
+ attribute: 'Item.Country',
59
+ label: 'Country',
60
+ description: 'The country where the item is located',
61
+ required: true,
62
+ type: 'macro-input',
63
+ defaultValue: makeMacroString(SOURCE_SHOPIFY_SHOP_COUNTRY),
64
+ rules: { sections: [] },
65
+ validator: v => validateIfNoMacro(v, countrySchema),
66
+ baseMode: true,
67
+ singleChoice: true,
68
+ },
69
+ {
70
+ attribute: 'Item.Currency',
71
+ label: 'Currency',
72
+ description: 'The currency of the item price',
73
+ required: true,
74
+ type: 'macro-input',
75
+ defaultValue: makeMacroString(SOURCE_SHOPIFY_SHOP_CURRENCY),
76
+ rules: { sections: [] },
77
+ validator: v => validateIfNoMacro(v, currencySchema),
78
+ baseMode: true,
79
+ singleChoice: true,
80
+ },
81
+ // TODO: set inventory tracking method to SKU
82
+ // {
83
+ // attribute: 'Item.InventoryTrackingMethod',
84
+ // label: 'Inventory Tracking Method',
85
+ // description: 'The method used to track the inventory level of the item',
86
+ // required: false,
87
+ // type: 'macro-input',
88
+ // defaultValue: makeMacroString(SOURCE_EBAY_INVENTORY_TRACKING),
89
+ // rules: { sections: [] },
90
+ // baseMode: false,
91
+ // singleChoice: true,
92
+ // fixedValue: true,
93
+ // },
94
+ {
95
+ attribute: 'Item.Variations.Variation.SKU',
96
+ label: 'SKU',
97
+ description: 'The SKU of the variant',
98
+ required: true,
99
+ type: 'macro-input',
100
+ defaultValue: makeMacroString(SOURCE_SHOPIFY_ID) + '-' + makeMacroString(SOURCE_SHOPIFY_VARIANT_ID),
101
+ rules: { sections: [] },
102
+ baseMode: true,
103
+ fixedValue: false,
104
+ singleChoice: true,
105
+ },
106
+ {
107
+ attribute: 'Item.Variations.Variation.VariationProductListingDetails.EAN',
108
+ label: 'EAN',
109
+ description: 'The European Article Number',
110
+ required: false,
111
+ type: 'macro-input',
112
+ defaultValue: '',
113
+ rules: { sections: [] },
114
+ baseMode: false,
115
+ fixedValue: false,
116
+ singleChoice: true,
117
+ },
118
+ {
119
+ attribute: 'Item.Variations.Variation.VariationProductListingDetails.ISBN',
120
+ label: 'ISBN',
121
+ description: 'The International Standard Book Number',
122
+ required: false,
123
+ type: 'macro-input',
124
+ defaultValue: '',
125
+ rules: { sections: [] },
126
+ baseMode: false,
127
+ fixedValue: false,
128
+ singleChoice: true,
129
+ },
130
+ {
131
+ attribute: 'Item.Variations.Variation.VariationProductListingDetails.UPC',
132
+ label: 'UPC',
133
+ description: 'The Universal Product Code',
134
+ required: false,
135
+ type: 'macro-input',
136
+ defaultValue: '',
137
+ rules: { sections: [] },
138
+ baseMode: false,
139
+ fixedValue: false,
140
+ singleChoice: true,
141
+ },
142
+ {
143
+ attribute: 'Item.Title',
144
+ label: 'Title',
145
+ description: 'The title of the item',
146
+ required: false,
147
+ type: 'macro-input',
148
+ defaultValue: '',
149
+ rules: { sections: [] },
150
+ baseMode: true,
151
+ fixedValue: false,
152
+ singleChoice: true,
153
+ },
154
+ {
155
+ attribute: 'Item.Description', // TODO: CDATA it
156
+ label: 'Description',
157
+ description: 'The description of the item',
158
+ required: true,
159
+ type: 'macro-input',
160
+ defaultValue: makeMacroString(SOURCE_SHOPIFY_DESCRIPTION_HTML),
161
+ rules: { sections: [] },
162
+ baseMode: true,
163
+ validator: v => validateIfNoMacro(v, z.string().max(500000)),
164
+ singleChoice: true,
165
+ },
166
+ {
167
+ attribute: 'Item.PrimaryCategory.CategoryID',
168
+ label: 'Primary Category',
169
+ description: 'The primary category of the item',
170
+ required: true,
171
+ type: 'macro-input',
172
+ defaultValue: '', // TODO: add source
173
+ rules: { sections: [] },
174
+ baseMode: true,
175
+ fixedValue: false,
176
+ singleChoice: true,
177
+ },
178
+ {
179
+ attribute: 'Item.SecondaryCategory.CategoryID',
180
+ label: 'Secondary Category',
181
+ description: 'The secondary category of the item',
182
+ required: false,
183
+ type: 'macro-input',
184
+ defaultValue: '', // TODO: add source
185
+ rules: { sections: [] },
186
+ baseMode: true,
187
+ fixedValue: false,
188
+ singleChoice: true,
189
+ },
190
+ {
191
+ attribute: 'Item.Variations.Pictures.VariationSpecificPictureSet.PictureURL', // TODO: split by comma and set in separate fields
192
+ label: 'Variation Specific Picture Set',
193
+ description: 'The URL of the pictures of variant. Can consist of up to 12 pictures',
194
+ required: false,
195
+ type: 'macro-input',
196
+ defaultValue:
197
+ makeMacroString(SOURCE_SHOPIFY_IMAGE) +
198
+ ',' +
199
+ makeMacroString(SOURCE_SHOPIFY_IMAGES) +
200
+ makeMacroString(ACTION_ARRAY_FIRST_ITEMS, ['12']),
201
+ rules: { sections: [] },
202
+ baseMode: true,
203
+ fixedValue: false,
204
+ singleChoice: true,
205
+ },
206
+ {
207
+ attribute: 'GalleryType',
208
+ label: 'Gallery Type',
209
+ description: 'The type of gallery image to use for the listing. Waring: Plus type implies additional fee',
210
+ required: false,
211
+ type: 'macro-input',
212
+ defaultValue: makeMacroString(SOURCE_EBAY_GALLERY_TYPE, ['Gallery']),
213
+ rules: { sections: [] },
214
+ baseMode: false,
215
+ fixedValue: true,
216
+ singleChoice: true,
217
+ },
218
+ {
219
+ attribute: 'Item.Variations.Variation.Quantity',
220
+ label: 'Quantity',
221
+ description: 'The number of items available for purchase',
222
+ required: false,
223
+ type: 'macro-input',
224
+ defaultValue: makeMacroString(SOURCE_SHOPIFY_INVENTORY_QUANTITY),
225
+ rules: { sections: [] },
226
+ baseMode: true,
227
+ fixedValue: false,
228
+ singleChoice: true,
229
+ },
230
+ {
231
+ attribute: 'Item.Variations.Variation.StartPrice',
232
+ label: 'Price',
233
+ description: 'The price of the variant',
234
+ required: true,
235
+ type: 'macro-input',
236
+ defaultValue: makeMacroString(SOURCE_SHOPIFY_PRICE),
237
+ rules: { sections: [] },
238
+ baseMode: true,
239
+ fixedValue: false,
240
+ singleChoice: true,
241
+ },
242
+ {
243
+ attribute: 'Item.Variations.Variation.DiscountPriceInfo.MinimumAdvertisedPrice',
244
+ label: 'Discount Price',
245
+ description: 'The discount price of the item',
246
+ required: false,
247
+ type: 'macro-input',
248
+ defaultValue: makeMacroString(SOURCE_SHOPIFY_COMPARE_AT_PRICE),
249
+ rules: { sections: [] },
250
+ baseMode: false,
251
+ fixedValue: false,
252
+ singleChoice: true,
253
+ },
254
+ // {
255
+ // attribute: 'Item.PictureDetails.PictureURL',
256
+ // label: 'Picture URL',
257
+ // description:
258
+ // 'Contains comma separated list of product picture URLs. You can pass in up to 24 picture URLs for each listing. The Gallery image will be the first PictureURL in the list',
259
+ // required: false,
260
+ // type: 'macro-input',
261
+ // defaultValue:
262
+ // makeMacroString(SOURCE_SHOPIFY_IMAGE) +
263
+ // ',' +
264
+ // makeMacroString(SOURCE_SHOPIFY_IMAGES) +
265
+ // makeMacroString(ACTION_ARRAY_FIRST_ITEMS, ['24']),
266
+ // rules: { sections: [] },
267
+ // baseMode: false,
268
+ // fixedValue: true,
269
+ // singleChoice: true,
270
+ // },
271
+ // TODO: if Item.InventoryTrackingMethod is set to SKU, this field is required
272
+ // if SKU is set on variation level, it should not be set on item level
273
+ // {
274
+ // attribute: 'Item.SKU',
275
+ // label: 'Product SKU',
276
+ // description: 'The SKU of the product',
277
+ // required: false,
278
+ // type: 'macro-input',
279
+ // defaultValue: '',
280
+ // rules: { sections: [] },
281
+ // baseMode: false,
282
+ // fixedValue: false,
283
+ // singleChoice: true,
284
+ // },
285
+ // {
286
+ // attribute: 'Item.StartPrice',
287
+ // label: 'Price',
288
+ // description: 'The price of the item',
289
+ // required: true,
290
+ // type: 'macro-input',
291
+ // defaultValue: makeMacroString(SOURCE_SHOPIFY_PRICE),
292
+ // rules: { sections: [] },
293
+ // baseMode: true,
294
+ // fixedValue: false,
295
+ // singleChoice: true,
296
+ // },
297
+ {
298
+ attribute: 'Item.Variations.Pictures.VariationSpecificName',
299
+ label: 'Variation Specific Name',
300
+ description:
301
+ 'One aspect of the variations that will be illustrated in the pictures for all variations. For example, if each variation is visually distinguished by color and the pictures show the different colors available, then specify "Color" as the name',
302
+ required: false,
303
+ type: 'macro-input',
304
+ defaultValue: '',
305
+ rules: { sections: [] },
306
+ baseMode: false,
307
+ fixedValue: false,
308
+ singleChoice: true,
309
+ },
310
+ {
311
+ attribute: 'Item.Variations.Pictures.VariationSpecificPictureSet.VariationSpecificValue',
312
+ label: 'Variation Specific Value',
313
+ description:
314
+ 'A value that is associated with Variation Specific Name. For example, suppose if Variation Specific Name is Color , then Variation Specific Value would be Blue. ',
315
+ required: false,
316
+ type: 'macro-input',
317
+ defaultValue: '',
318
+ rules: { sections: [] },
319
+ baseMode: false,
320
+ fixedValue: false,
321
+ singleChoice: true,
322
+ },
323
+ ///////////////////////////////////////// secondary fields /////////////////////////////////////////
324
+ {
325
+ attribute: ' Item.AutoPay',
36
326
  label: 'AutoPay',
37
327
  description: 'Indicates whether the seller requires immediate payment for the item',
38
328
  required: false,
@@ -45,7 +335,7 @@ export const eBayFeedTemplate: XmlFeedTemplateType = {
45
335
  singleChoice: true,
46
336
  },
47
337
  {
48
- attribute: 'BestOfferEnabled',
338
+ attribute: 'Item.BestOfferEnabled',
49
339
  label: 'Best Offer Enabled',
50
340
  description: 'Indicates whether the seller is accepting Best Offers for the item',
51
341
  required: false,
@@ -58,7 +348,7 @@ export const eBayFeedTemplate: XmlFeedTemplateType = {
58
348
  singleChoice: true,
59
349
  },
60
350
  {
61
- attribute: 'CategoryMappingAllowed',
351
+ attribute: 'Item.CategoryMappingAllowed',
62
352
  label: 'Category Mapping Allowed',
63
353
  description:
64
354
  'This boolean field controls whether or not eBay automatically maps outdated Category ID(s) specified in a PrimaryCategory and/or SecondaryCategory container(s) to the updated Category ID(s) no longer exists in the current category structure',
@@ -72,7 +362,7 @@ export const eBayFeedTemplate: XmlFeedTemplateType = {
72
362
  singleChoice: true,
73
363
  },
74
364
  {
75
- attribute: 'ConditionID',
365
+ attribute: 'Item.ConditionID',
76
366
  label: 'Condition',
77
367
  description: 'The condition of the item. For example, New, Used, or Refurbished',
78
368
  required: false,
@@ -82,90 +372,172 @@ export const eBayFeedTemplate: XmlFeedTemplateType = {
82
372
  baseMode: false,
83
373
  singleChoice: true,
84
374
  },
375
+ // {
376
+ // attribute: 'Item.DiscountPriceInfo.MinimumAdvertisedPrice', // TODO: check if this is correct
377
+ // label: 'Discount Price',
378
+ // description: 'The discount price of the item',
379
+ // required: false,
380
+ // type: 'macro-input',
381
+ // defaultValue: makeMacroString(SOURCE_SHOPIFY_DESCRIPTION_HTML),
382
+ // rules: { sections: [] },
383
+ // baseMode: false,
384
+ // validator: v => validateIfNoMacro(v, z.coerce.number().positive()),
385
+ // singleChoice: true,
386
+ // },
85
387
  {
86
- attribute: 'Country',
87
- label: 'Country',
88
- description: 'The country where the item is located',
89
- required: true,
388
+ attribute: 'Item.DispatchTimeMax',
389
+ label: 'Dispatch Time Max',
390
+ description:
391
+ 'The maximum number of business days the seller commits to for shipping an item to a buyer after receiving a cleared payment',
392
+ required: false,
90
393
  type: 'macro-input',
91
- defaultValue: makeMacroString(SOURCE_SHOPIFY_SHOP_COUNTRY),
394
+ defaultValue: '',
92
395
  rules: { sections: [] },
93
- validator: v => validateIfNoMacro(v, countrySchema),
94
- baseMode: true,
396
+ baseMode: false,
397
+ validator: v => validateIfNoMacro(v, z.coerce.number().gte(0)),
95
398
  singleChoice: true,
96
399
  },
400
+ // TODO: add compatibility list items
401
+ // TODO: add item specifics
97
402
  {
98
- attribute: 'Currency',
99
- label: 'Currency',
100
- description: 'The currency of the item price',
101
- required: true,
403
+ attribute: 'Item.ListingDuration',
404
+ label: 'Listing Duration',
405
+ description: 'The length of time the listing will be active',
406
+ required: false,
102
407
  type: 'macro-input',
103
- defaultValue: makeMacroString(SOURCE_SHOPIFY_SHOP_CURRENCY),
408
+ defaultValue: '', // TODO: add source
104
409
  rules: { sections: [] },
105
- validator: v => validateIfNoMacro(v, currencySchema),
106
- baseMode: true,
410
+ baseMode: false,
411
+ fixedValue: true,
107
412
  singleChoice: true,
108
413
  },
414
+ // {
415
+ // attribute: 'Item.ListingType',
416
+ // label: 'Listing Type',
417
+ // description: 'The type of listing',
418
+ // required: true,
419
+ // type: 'macro-input',
420
+ // defaultValue: makeMacroString(SOURCE_EBAY_LISTING_TYPE, ['FixedPriceItem']),
421
+ // rules: { sections: [] },
422
+ // baseMode: true,
423
+ // fixedValue: true,
424
+ // singleChoice: true,
425
+ // },
426
+ // TODO: set PictureSource to Vendor
109
427
  {
110
- attribute: 'Description',
111
- label: 'Description',
112
- description: 'The description of the item',
113
- required: true,
428
+ attribute: 'Item.PostalCode',
429
+ label: 'Postal Code',
430
+ description: 'The postal code where the item is located',
431
+ required: false,
114
432
  type: 'macro-input',
115
- defaultValue: makeMacroString(SOURCE_SHOPIFY_DESCRIPTION_HTML),
433
+ defaultValue: makeMacroString(SOURCE_SHOPIFY_SHOP_POSTAL_CODE),
116
434
  rules: { sections: [] },
117
- baseMode: true,
118
- validator: v => validateIfNoMacro(v, z.string().max(500000)),
435
+ baseMode: false,
119
436
  singleChoice: true,
120
437
  },
121
438
  {
122
- attribute: 'DiscountPrice',
123
- label: 'Discount Price',
124
- description: 'The discount price of the item',
439
+ attribute: 'Item.ProductListingDetails.BrandMPN.Brand',
440
+ label: 'Brand',
441
+ description: 'The brand of the item',
125
442
  required: false,
126
443
  type: 'macro-input',
127
- defaultValue: makeMacroString(SOURCE_SHOPIFY_DESCRIPTION_HTML),
444
+ defaultValue: makeMacroString(SOURCE_SHOPIFY_VENDOR),
128
445
  rules: { sections: [] },
446
+ validator: v => validateIfNoMacro(v, z.string().max(65).optional()),
129
447
  baseMode: false,
130
- validator: v => validateIfNoMacro(v, z.coerce.number().positive()),
448
+ fixedValue: false,
131
449
  singleChoice: true,
132
450
  },
451
+ // {
452
+ // attribute: 'Item.ProductListingDetails.BrandMPN.MPN',
453
+ // label: 'MPN',
454
+ // description: 'The Manufacturer Part Number of the item',
455
+ // required: false,
456
+ // type: 'macro-input',
457
+ // defaultValue: '',
458
+ // rules: { sections: [] },
459
+ // validator: v => validateIfNoMacro(v, z.string().max(65).optional()),
460
+ // baseMode: false,
461
+ // fixedValue: false,
462
+ // singleChoice: true,
463
+ // },
464
+ // {
465
+ // attribute: 'Item.ProductListingDetails.EAN',
466
+ // label: 'EAN',
467
+ // description: 'The European Article Number of the item',
468
+ // required: false,
469
+ // type: 'macro-input',
470
+ // defaultValue: '',
471
+ // rules: { sections: [] },
472
+ // baseMode: false,
473
+ // fixedValue: false,
474
+ // singleChoice: true,
475
+ // },
476
+ // {
477
+ // attribute: 'Item.ProductListingDetails.UPC',
478
+ // label: 'UPC',
479
+ // description: 'The Universal Product Code of the item',
480
+ // required: false,
481
+ // type: 'macro-input',
482
+ // defaultValue: '',
483
+ // rules: { sections: [] },
484
+ // baseMode: false,
485
+ // fixedValue: false,
486
+ // singleChoice: true,
487
+ // },
488
+ // {
489
+ // attribute: 'Item.Quantity',
490
+ // label: 'Quantity',
491
+ // description: 'The number of items available for purchase',
492
+ // required: false,
493
+ // type: 'macro-input',
494
+ // defaultValue: '',
495
+ // rules: { sections: [] },
496
+ // baseMode: true,
497
+ // fixedValue: false,
498
+ // singleChoice: true,
499
+ // },
133
500
  {
134
- attribute: 'DispatchTimeMax',
135
- label: 'Dispatch Time Max',
136
- description:
137
- 'The maximum number of business days the seller commits to for shipping an item to a buyer after receiving a cleared payment',
501
+ attribute: 'Item.QuantityRestrictionPerBuyer.MaximumQuantity',
502
+ label: 'Maximum Quantity Per Buyer',
503
+ description: 'The maximum number of items that a buyer can purchase',
138
504
  required: false,
139
505
  type: 'macro-input',
140
506
  defaultValue: '',
141
507
  rules: { sections: [] },
142
508
  baseMode: false,
143
- validator: v => validateIfNoMacro(v, z.coerce.number().gte(0)),
509
+ fixedValue: false,
144
510
  singleChoice: true,
511
+ validator: v => validateIfNoMacro(v, z.coerce.number().gte(0).optional()),
145
512
  },
146
513
  {
147
- attribute: 'InventoryTrackingMethod',
148
- label: 'Inventory Tracking Method',
149
- description: 'The method used to track the inventory level of the item',
514
+ attribute: 'Item.SellerProfiles.SellerPaymentProfile.PaymentProfileID',
515
+ label: 'Business Policy Payment Profile',
516
+ description: 'The payment profile to use for the listing',
150
517
  required: false,
151
518
  type: 'macro-input',
152
- defaultValue: makeMacroString(SOURCE_EBAY_INVENTORY_TRACKING),
519
+ defaultValue: '', // TODO: add source
153
520
  rules: { sections: [] },
154
521
  baseMode: false,
155
- validator: v =>
156
- validateIfNoMacro(
157
- v,
158
- oneOfOptionalSchema(resolveSourceValue(SOURCE_EBAY_INVENTORY_TRACKING) as SelectItem[])
159
- ),
522
+ fixedValue: true,
160
523
  singleChoice: true,
524
+ },
525
+ {
526
+ attribute: 'Item.SellerProfiles.SellerReturnProfile.ReturnProfileID',
527
+ label: 'Business Policy Return Profile',
528
+ description: 'The return profile to use for the listing',
529
+ required: false,
530
+ type: 'macro-input',
531
+ defaultValue: '', // TODO: add source
532
+ rules: { sections: [] },
533
+ baseMode: false,
161
534
  fixedValue: true,
535
+ singleChoice: true,
162
536
  },
163
- // TODO: add compatibility list items
164
- // TODO: add item specifics
165
537
  {
166
- attribute: 'ListingDuration',
167
- label: 'Listing Duration',
168
- description: 'The length of time the listing will be active',
538
+ attribute: 'Item.SellerProfiles.SellerShippingProfile.ShippingProfileID',
539
+ label: 'Business Policy Shipping Profile',
540
+ description: 'The shipping profile to use for the listing',
169
541
  required: false,
170
542
  type: 'macro-input',
171
543
  defaultValue: '', // TODO: add source
@@ -175,100 +547,159 @@ export const eBayFeedTemplate: XmlFeedTemplateType = {
175
547
  singleChoice: true,
176
548
  },
177
549
  {
178
- attribute: 'ListingType',
179
- label: 'Listing Type',
180
- description: 'The type of listing',
181
- required: true,
550
+ attribute: 'Item.ReturnPolicy.InternationalRefundOption',
551
+ label: 'International Refund Option',
552
+ description: 'This field indicates how the seller compensates international buyers for returns',
553
+ required: false,
182
554
  type: 'macro-input',
183
- defaultValue: makeMacroString(SOURCE_EBAY_LISTING_TYPE, ['FixedPriceItem']),
555
+ defaultValue: makeMacroString(SOURCE_EBAY_INTERNATIONAL_REFUND_OPTIONS, ['MoneyBack']),
184
556
  rules: { sections: [] },
185
- baseMode: true,
557
+ baseMode: false,
186
558
  fixedValue: true,
187
559
  singleChoice: true,
188
560
  },
189
561
  {
190
- attribute: 'GalleryType',
191
- label: 'Gallery Type',
192
- description: 'The type of gallery image to use for the listing. Waring: Plus type implies additional fee',
562
+ attribute: 'Item.ReturnPolicy.InternationalReturnsAcceptedOption',
563
+ label: 'International Returns Accepted Option',
564
+ description:
565
+ 'The value in this field indicates whether or not the seller accepts returns from international buyers',
193
566
  required: false,
194
567
  type: 'macro-input',
195
- defaultValue: makeMacroString(SOURCE_EBAY_GALLERY_TYPE, ['Gallery']),
568
+ defaultValue: makeMacroString(SOURCE_EBAY_INTERNATIONAL_RETURNS_ACCEPTED),
196
569
  rules: { sections: [] },
197
570
  baseMode: false,
198
571
  fixedValue: true,
199
572
  singleChoice: true,
200
573
  },
201
- // TODO: set PictureSource to Vendor
202
574
  {
203
- attribute: 'PictureURL',
204
- label: 'Picture URL',
575
+ attribute: 'Item.ReturnPolicy.InternationalReturnsWithinOption',
576
+ label: 'International Returns Within Option',
205
577
  description:
206
- 'Contains comma separated list of product picture URLs. You can pass in up to 24 picture URLs for each listing. The Gallery image will be the first PictureURL in the list',
578
+ 'The value in this field indicates the number of days that an international buyer has to return an item',
207
579
  required: false,
208
580
  type: 'macro-input',
209
- defaultValue:
210
- makeMacroString(SOURCE_SHOPIFY_IMAGE) +
211
- ',' +
212
- makeMacroString(SOURCE_SHOPIFY_IMAGES) +
213
- makeMacroString(ACTION_ARRAY_FIRST_ITEMS, ['24']),
581
+ defaultValue: '', // TODO: add source
214
582
  rules: { sections: [] },
215
583
  baseMode: false,
216
584
  fixedValue: true,
217
585
  singleChoice: true,
218
586
  },
219
587
  {
220
- attribute: 'PostalCode',
221
- label: 'Postal Code',
222
- description: 'The postal code where the item is located',
588
+ attribute: 'Item.ReturnPolicy.InternationalShippingCostPaidByOption',
589
+ label: 'International Shipping Cost Paid By Option',
590
+ description:
591
+ 'The value in this field indicates whether the buyer or seller is responsible for return shipping costs for international returns',
223
592
  required: false,
224
593
  type: 'macro-input',
225
- defaultValue: makeMacroString(SOURCE_SHOPIFY_SHOP_POSTAL_CODE),
594
+ defaultValue: makeMacroString(SOURCE_EBAY_PAID_BY_COST),
226
595
  rules: { sections: [] },
227
596
  baseMode: false,
597
+ fixedValue: true,
228
598
  singleChoice: true,
229
599
  },
230
600
  {
231
- attribute: 'PrimaryCategoryID',
232
- label: 'Primary Category',
233
- description: 'The primary category of the item',
234
- required: true,
601
+ attribute: 'Item.ReturnPolicy.RefundOption',
602
+ label: 'Refund Option',
603
+ description: 'This field indicates how the seller compensates buyers for returns',
604
+ required: false,
605
+ type: 'macro-input',
606
+ defaultValue: makeMacroString(SOURCE_EBAY_INTERNATIONAL_REFUND_OPTIONS, ['MoneyBack']),
607
+ rules: { sections: [] },
608
+ baseMode: false,
609
+ fixedValue: true,
610
+ singleChoice: true,
611
+ },
612
+ {
613
+ attribute: 'Item.ReturnPolicy.ReturnsAcceptedOption',
614
+ label: 'Returns Accepted Option',
615
+ description: 'This field indicates whether or not the seller accepts returns',
616
+ required: false,
617
+ type: 'macro-input',
618
+ defaultValue: makeMacroString(SOURCE_EBAY_INTERNATIONAL_RETURNS_ACCEPTED),
619
+ rules: { sections: [] },
620
+ baseMode: false,
621
+ fixedValue: true,
622
+ singleChoice: true,
623
+ },
624
+ {
625
+ attribute: 'Item.ReturnPolicy.ReturnsWithinOption',
626
+ label: 'Returns Within Option',
627
+ description: 'Specifies the amount of time the buyer has to return an item',
628
+ required: false,
235
629
  type: 'macro-input',
236
630
  defaultValue: '', // TODO: add source
237
631
  rules: { sections: [] },
238
- baseMode: true,
632
+ baseMode: false,
633
+ fixedValue: true,
634
+ singleChoice: true,
635
+ },
636
+ {
637
+ attribute: 'Item.ReturnPolicy.ShippingCostPaidByOption',
638
+ label: 'Shipping Cost Paid By Option',
639
+ description: 'This option specifies whether the buyer or the seller pays for return shipping charges',
640
+ required: false,
641
+ type: 'macro-input',
642
+ defaultValue: makeMacroString(SOURCE_EBAY_PAID_BY_COST),
643
+ rules: { sections: [] },
644
+ baseMode: false,
645
+ fixedValue: true,
646
+ singleChoice: true,
647
+ },
648
+ {
649
+ attribute: 'Item.SellerProvidedTitle',
650
+ label: 'Seller Provided Title',
651
+ description:
652
+ "A descriptive free-text title for a US or CA eBay Motors vehicle listing. This title appears below eBay's pre-filled listing title on the View Item page",
653
+ required: false,
654
+ type: 'macro-input',
655
+ defaultValue: '',
656
+ rules: { sections: [] },
657
+ baseMode: false,
239
658
  fixedValue: false,
659
+ singleChoice: false,
660
+ validator: v => validateIfNoMacro(v, z.string().max(80).optional()),
661
+ },
662
+ {
663
+ attribute: 'Item.ShippingPackageDetails.MeasurementUnit',
664
+ label: 'Measurement Unit',
665
+ description:
666
+ "The unit of measurement used to specify the dimensions of a shipping package. This field is required if the seller is specifying the dimensions of a shipping package in the 'ShippingPackageDetails' container",
667
+ required: false,
668
+ type: 'macro-input',
669
+ defaultValue: makeMacroString(SOURCE_EBAY_MEASUREMENT_UNITS),
670
+ rules: { sections: [] },
671
+ baseMode: false,
672
+ fixedValue: true,
240
673
  singleChoice: true,
241
674
  },
242
675
  {
243
- attribute: 'Brand',
244
- label: 'Brand',
245
- description: 'The brand of the item',
676
+ attribute: 'Item.ShippingPackageDetails.PackageDepth',
677
+ label: 'Package Depth',
678
+ description: 'Depth of the package, in whole number of inches, needed to ship the item',
246
679
  required: false,
247
680
  type: 'macro-input',
248
- defaultValue: makeMacroString(SOURCE_SHOPIFY_VENDOR),
681
+ defaultValue: '',
249
682
  rules: { sections: [] },
250
- validator: v => validateIfNoMacro(v, z.string().max(65).optional()),
251
683
  baseMode: false,
252
684
  fixedValue: false,
253
685
  singleChoice: true,
254
686
  },
255
687
  {
256
- attribute: 'MPN',
257
- label: 'MPN',
258
- description: 'The Manufacturer Part Number of the item',
688
+ attribute: 'Item.ShippingPackageDetails.PackageLength',
689
+ label: 'Package Length',
690
+ description: 'Length of the package, in whole number of inches, needed to ship the item',
259
691
  required: false,
260
692
  type: 'macro-input',
261
693
  defaultValue: '',
262
694
  rules: { sections: [] },
263
- validator: v => validateIfNoMacro(v, z.string().max(65).optional()),
264
695
  baseMode: false,
265
696
  fixedValue: false,
266
697
  singleChoice: true,
267
698
  },
268
699
  {
269
- attribute: 'EAN',
270
- label: 'EAN',
271
- description: 'The European Article Number of the item',
700
+ attribute: 'Item.ShippingPackageDetail.PackageWidth',
701
+ label: 'Package Width',
702
+ description: 'Width of the package, in whole number of inches, needed to ship the item',
272
703
  required: false,
273
704
  type: 'macro-input',
274
705
  defaultValue: '',
@@ -278,9 +709,49 @@ export const eBayFeedTemplate: XmlFeedTemplateType = {
278
709
  singleChoice: true,
279
710
  },
280
711
  {
281
- attribute: 'UPC',
282
- label: 'UPC',
283
- description: 'The Universal Product Code of the item',
712
+ attribute: 'Item.ShippingPackageDetails.ShippingIrregular',
713
+ label: 'Shipping Irregular',
714
+ description:
715
+ 'Whether a package is irregular and therefore cannot go through the stamping machine at the shipping service office and thus requires special or fragile handling. For calculated shipping only',
716
+ required: false,
717
+ type: 'macro-input',
718
+ defaultValue: makeMacroString(SOURCE_EBAY_YES_NO),
719
+ rules: { sections: [] },
720
+ baseMode: false,
721
+ fixedValue: true,
722
+ singleChoice: true,
723
+ },
724
+ // {
725
+ // attribute: 'Item.ShippingPackageDetails.WeightMajor',
726
+ // label: 'Weight Major',
727
+ // description:
728
+ // 'WeightMajor is used to specify the weight of the package in pounds (in US) or kilograms (all countries that use metric system). The value needs to by rounded up to the nearest whole number',
729
+ // required: false,
730
+ // type: 'macro-input',
731
+ // defaultValue: '',
732
+ // rules: { sections: [] },
733
+ // baseMode: false,
734
+ // fixedValue: false,
735
+ // singleChoice: true,
736
+ // },
737
+ // {
738
+ // attribute: 'Item.ShippingPackageDetails.WeightMinor',
739
+ // label: 'Weight Minor',
740
+ // description:
741
+ // 'WeightMinor is used to specify the weight of the package in ounces (in US) or grams (all countries that use metric system). The value needs to by rounded up to the nearest whole number',
742
+ // required: false,
743
+ // type: 'macro-input',
744
+ // defaultValue: '',
745
+ // rules: { sections: [] },
746
+ // baseMode: false,
747
+ // fixedValue: false,
748
+ // singleChoice: true,
749
+ // },
750
+ {
751
+ attribute: 'ShippingWeight',
752
+ label: 'Shipping Weight',
753
+ description:
754
+ 'Specifies the weight of the package in ounces and pounds (in US) or grams and kilograms (all countries that use metric system). The value will by rounded up to the nearest whole number. Example: 2lbs 13oz or 1kg 500g or 1kg',
284
755
  required: false,
285
756
  type: 'macro-input',
286
757
  defaultValue: '',
@@ -290,16 +761,64 @@ export const eBayFeedTemplate: XmlFeedTemplateType = {
290
761
  singleChoice: true,
291
762
  },
292
763
  {
293
- attribute: 'Quantity',
294
- label: 'Quantity',
295
- description: 'The number of items available for purchase',
764
+ attribute: 'Item.Storefront.StoreCategoryID',
765
+ label: 'Store Category ID',
766
+ description: 'The ID of the store category',
296
767
  required: false,
297
768
  type: 'macro-input',
298
769
  defaultValue: '',
299
770
  rules: { sections: [] },
300
- baseMode: true,
771
+ baseMode: false,
772
+ fixedValue: false,
773
+ singleChoice: true,
774
+ },
775
+ {
776
+ attribute: 'Item.Storefront.StoreCategoryName',
777
+ label: 'Store Category Name',
778
+ description: 'The name of the store category',
779
+ required: false,
780
+ type: 'macro-input',
781
+ defaultValue: '',
782
+ rules: { sections: [] },
783
+ baseMode: false,
784
+ fixedValue: false,
785
+ singleChoice: true,
786
+ },
787
+ {
788
+ attribute: 'Item.Storefront.StoreCategory2ID',
789
+ label: 'Store Secondary Category ID',
790
+ description: 'The ID of the store secondary category',
791
+ required: false,
792
+ type: 'macro-input',
793
+ defaultValue: '',
794
+ rules: { sections: [] },
795
+ baseMode: false,
796
+ fixedValue: false,
797
+ singleChoice: true,
798
+ },
799
+ {
800
+ attribute: 'Item.Storefront.StoreCategory2Name',
801
+ label: 'Store Secondary Category Name',
802
+ description: 'The name of the store secondary category',
803
+ required: false,
804
+ type: 'macro-input',
805
+ defaultValue: '',
806
+ rules: { sections: [] },
807
+ baseMode: false,
301
808
  fixedValue: false,
302
809
  singleChoice: true,
303
810
  },
811
+ // {
812
+ // attribute: 'Item.VideoDetails.VideoID',
813
+ // label: 'Video',
814
+ // description: 'The title of the item',
815
+ // required: false,
816
+ // type: 'macro-input',
817
+ // defaultValue: '',
818
+ // rules: { sections: [] },
819
+ // baseMode: false,
820
+ // fixedValue: false,
821
+ // singleChoice: true,
822
+ // },
304
823
  ],
305
824
  };