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