rerobe-js-orm 3.0.17 → 3.0.19
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.
|
@@ -9,8 +9,8 @@ exports.PRODUCT_STATES = {
|
|
|
9
9
|
hold: 'HOLD',
|
|
10
10
|
draft: 'DRAFT',
|
|
11
11
|
accepted: 'ACCEPTED',
|
|
12
|
-
sellerToDropOff: '
|
|
13
|
-
sellerToShip: '
|
|
12
|
+
sellerToDropOff: 'SELLER_TO_DROP_OFF',
|
|
13
|
+
sellerToShip: 'SELLER_TO_SHIP',
|
|
14
14
|
sellerToGetPickUp: 'AT_HOME_PICK_UP',
|
|
15
15
|
qualityControl: 'QUALITY_CONTROL',
|
|
16
16
|
pendingPublication: 'PENDING_PUBLICATION',
|
|
@@ -24,5 +24,6 @@ export default class ReRobeProductHelpers {
|
|
|
24
24
|
static getSubtitle(title: string): string;
|
|
25
25
|
static sizeFinder(sizeLabel: string, sizeToMatch: string): boolean;
|
|
26
26
|
static convertReRobeSizeToStandardSize(productObj: CompleteProduct): string;
|
|
27
|
+
static mapToOldSizesToStandardSize(productObj: CompleteProduct): string;
|
|
27
28
|
static buildLineItem(productObj: CompleteProduct, quantity?: number): ProductLineItem;
|
|
28
29
|
}
|
|
@@ -453,6 +453,15 @@ class ReRobeProductHelpers {
|
|
|
453
453
|
}
|
|
454
454
|
return size;
|
|
455
455
|
}
|
|
456
|
+
static mapToOldSizesToStandardSize(productObj) {
|
|
457
|
+
const { clothingSize = [], jeanSize = '', shoeSize = '' } = productObj;
|
|
458
|
+
const validSizes = clothingSize.filter((size) => typeof size === 'string' && size);
|
|
459
|
+
if (jeanSize)
|
|
460
|
+
validSizes.push(jeanSize);
|
|
461
|
+
if (shoeSize)
|
|
462
|
+
validSizes.push(shoeSize);
|
|
463
|
+
return validSizes.join(' ').trim() || '';
|
|
464
|
+
}
|
|
456
465
|
// RibbnProductHelper candidate
|
|
457
466
|
static buildLineItem(productObj, quantity = 1) {
|
|
458
467
|
const { documentId, title, price, coverPhotoUrl, imageUrls, brand } = productObj;
|