rerobe-js-orm 2.6.7 → 2.6.92
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.
- package/lib/factories/Product/ProductFromFormState.js +2 -0
- package/lib/form-states/Product/ProductFormState.js +2 -0
- package/lib/form-states/Product/options.d.ts +8 -0
- package/lib/form-states/Product/options.js +19 -7
- package/lib/models/ChatRoom.js +1 -0
- package/lib/models/Product.js +2 -0
- package/lib/models/ProductCollection.js +1 -0
- package/lib/types/product-collection-types.d.ts +1 -0
- package/lib/types/rerobe-chatroom-types.d.ts +1 -0
- package/lib/types/rerobe-product-types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -77,6 +77,8 @@ class ProductFromFormState extends ProductFactory_1.default {
|
|
|
77
77
|
selectedForClearance: ((_r = props.props) === null || _r === void 0 ? void 0 : _r.selectedForClearance) || '',
|
|
78
78
|
locationIds: props.fields.locationIds.selectedValues || [],
|
|
79
79
|
inventoryLocations: props.fields.inventoryLocations.selectedValues || [],
|
|
80
|
+
majorDefects: props.fields.majorDefects.selectedValues || [],
|
|
81
|
+
minorDefects: props.fields.minorDefects.selectedValues || [],
|
|
80
82
|
};
|
|
81
83
|
const timestampAttributes = {
|
|
82
84
|
createdAtTimestamp: (_s = props.props) === null || _s === void 0 ? void 0 : _s.createdAtTimestamp,
|
|
@@ -30,6 +30,8 @@ class ProductFormState extends FormState_1.default {
|
|
|
30
30
|
this.fields.clothingSize = this.fieldFactory('multiSelect', 'clothingSize', options_1.clothingSizeOptions);
|
|
31
31
|
this.fields.color = this.fieldFactory('singleSelect', 'color', options_1.colors);
|
|
32
32
|
this.fields.condition = this.fieldFactory('singleSelect', 'condition', options_1.conditions);
|
|
33
|
+
this.fields.majorDefects = this.fieldFactory('multiSelect', 'majorDefects', options_1.majorDefectOptions);
|
|
34
|
+
this.fields.minorDefects = this.fieldFactory('multiSelect', 'minorDefects', options_1.minorDefectOptions);
|
|
33
35
|
this.fields.gender = this.fieldFactory('singleSelect', 'gender', options_1.gender);
|
|
34
36
|
this.fields.jeanSize = this.fieldFactory('singleSelect', 'jeanSize', options_1.jeanSizes);
|
|
35
37
|
this.fields.materialComposition = this.fieldFactory('singleSelect', 'materialComposition', options_1.clothingMaterials);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.productOptions = exports.productIsOnSaleOptions = exports.discountTypeOptions = exports.salesChannelOptions = exports.unisexJewelry = exports.mensJewelry = exports.jewelry = exports.unisexAccessories = exports.mensAccessories = exports.accessories = exports.unisexBags = exports.mensBags = exports.bags = exports.unisexShoes = exports.mensShoes = exports.shoes = exports.unisexClothing = exports.mensClothing = exports.clothing = exports.productCategories = exports.clothingMaterials = exports.shoeSizes = exports.jeanSizes = exports.gender = exports.conditions = exports.colors = exports.brands = exports.sizeCommentOptions = exports.clothingSizeOptions = exports.statusOptions = exports.publishTypeOptions = exports.availableForSaleOptions = void 0;
|
|
3
|
+
exports.minorDefectOptions = exports.majorDefectOptions = exports.productOptions = exports.productIsOnSaleOptions = exports.discountTypeOptions = exports.salesChannelOptions = exports.unisexJewelry = exports.mensJewelry = exports.jewelry = exports.unisexAccessories = exports.mensAccessories = exports.accessories = exports.unisexBags = exports.mensBags = exports.bags = exports.unisexShoes = exports.mensShoes = exports.shoes = exports.unisexClothing = exports.mensClothing = exports.clothing = exports.productCategories = exports.clothingMaterials = exports.shoeSizes = exports.jeanSizes = exports.gender = exports.conditions = exports.colors = exports.brands = exports.sizeCommentOptions = exports.clothingSizeOptions = exports.statusOptions = exports.publishTypeOptions = exports.availableForSaleOptions = void 0;
|
|
4
4
|
const product_constants_1 = require("../../constants/product-constants");
|
|
5
5
|
const lodash_1 = require("lodash");
|
|
6
6
|
const availableForSaleOptions = [
|
|
@@ -1594,12 +1594,6 @@ const conditions = [
|
|
|
1594
1594
|
value: 'Hardly ever worn',
|
|
1595
1595
|
description: 'This item has been worn 1-2 times, it’s in a very good condition. No visible defects, no smell, no spots, no sweat marks.',
|
|
1596
1596
|
},
|
|
1597
|
-
{
|
|
1598
|
-
label: 'Good condition',
|
|
1599
|
-
value: 'Good condition',
|
|
1600
|
-
description: 'This item has been worn over time, but is still well-preserved. Signs of wear is ok, but no defects like smaller stains or holes.',
|
|
1601
|
-
key: 'goodCondition',
|
|
1602
|
-
},
|
|
1603
1597
|
{
|
|
1604
1598
|
label: 'Worn',
|
|
1605
1599
|
value: 'worn',
|
|
@@ -1622,6 +1616,24 @@ const conditions = [
|
|
|
1622
1616
|
// },
|
|
1623
1617
|
];
|
|
1624
1618
|
exports.conditions = conditions;
|
|
1619
|
+
const majorDefectOptions = [
|
|
1620
|
+
{ label: 'Zipper', value: 'Zipper' },
|
|
1621
|
+
{ label: 'Missing buttons', value: 'Missing buttons' },
|
|
1622
|
+
{ label: 'Major stain', value: 'Major stain' },
|
|
1623
|
+
{ label: 'Broken buttons', value: 'Broken buttons' },
|
|
1624
|
+
{ label: 'Big tears or holes', value: 'Big tears or holes' },
|
|
1625
|
+
{ label: 'Other major Issue', value: 'Other major issue' },
|
|
1626
|
+
];
|
|
1627
|
+
exports.majorDefectOptions = majorDefectOptions;
|
|
1628
|
+
const minorDefectOptions = [
|
|
1629
|
+
{ label: 'Minor stains', value: 'Minor stains' },
|
|
1630
|
+
{ label: 'Small tears or holes', value: 'Small tears or holes' },
|
|
1631
|
+
{ label: 'Pilling', value: 'Pilling' },
|
|
1632
|
+
{ label: 'Fading', value: 'Fading' },
|
|
1633
|
+
{ label: 'Stretching', value: 'Stretching' },
|
|
1634
|
+
{ label: 'Other minor Issue', value: 'Other minor issue' },
|
|
1635
|
+
];
|
|
1636
|
+
exports.minorDefectOptions = minorDefectOptions;
|
|
1625
1637
|
const gender = [
|
|
1626
1638
|
{
|
|
1627
1639
|
label: 'Woman',
|
package/lib/models/ChatRoom.js
CHANGED
|
@@ -111,6 +111,7 @@ class ChatRoom extends Base_1.default {
|
|
|
111
111
|
return result;
|
|
112
112
|
}, []);
|
|
113
113
|
const stagedObj = {
|
|
114
|
+
id: this.utilities.sanitizeString(this.documentId),
|
|
114
115
|
documentId: this.utilities.sanitizeString(this.documentId),
|
|
115
116
|
createdAtTimestamp: this.utilities.sanitizeMillisTimeStamp(this.createdAtTimestamp),
|
|
116
117
|
type: this.utilities.sanitizeString(this.type),
|
package/lib/models/Product.js
CHANGED
|
@@ -81,6 +81,8 @@ class Product extends Base_1.default {
|
|
|
81
81
|
selectedForClearance: (props === null || props === void 0 ? void 0 : props.selectedForClearance) || '',
|
|
82
82
|
locationIds: (props === null || props === void 0 ? void 0 : props.locationIds) || [],
|
|
83
83
|
inventoryLocations: (props === null || props === void 0 ? void 0 : props.inventoryLocations) || [],
|
|
84
|
+
majorDefects: (props === null || props === void 0 ? void 0 : props.majorDefects) || [],
|
|
85
|
+
minorDefects: (props === null || props === void 0 ? void 0 : props.minorDefects) || [],
|
|
84
86
|
};
|
|
85
87
|
this.timestampAttributes = {
|
|
86
88
|
createdAtTimestamp: (props === null || props === void 0 ? void 0 : props.createdAtTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.createdAtTimestamp) : null,
|
|
@@ -183,6 +183,7 @@ class ProductCollection extends Base_1.default {
|
|
|
183
183
|
}
|
|
184
184
|
toObjForTypesense() {
|
|
185
185
|
const stagedObj = {
|
|
186
|
+
id: this.utilities.sanitizeString(this.documentId),
|
|
186
187
|
documentId: this.utilities.sanitizeString(this.documentId),
|
|
187
188
|
merchantId: this.utilities.sanitizeString(this.merchantId),
|
|
188
189
|
createdAtTimestamp: this.utilities.sanitizeMillisTimeStamp(this.createdAtTimestamp),
|
|
@@ -70,6 +70,8 @@ declare type ProductConsignmentAttributes = {
|
|
|
70
70
|
selectedForClearance: string;
|
|
71
71
|
locationIds?: string[];
|
|
72
72
|
inventoryLocations: InventoryLocation[];
|
|
73
|
+
majorDefects: string[];
|
|
74
|
+
minorDefects: string[];
|
|
73
75
|
};
|
|
74
76
|
declare type ProductTimestampAttributes = {
|
|
75
77
|
createdAtTimestamp: number | null;
|
|
@@ -194,6 +196,8 @@ declare type ProductConsignmentAttributesFormFields = {
|
|
|
194
196
|
discountValue: TextInputFormField<string>;
|
|
195
197
|
locationIds: MultiSelectFormField<string>;
|
|
196
198
|
inventoryLocations: MultiSelectFormField<InventoryLocation>;
|
|
199
|
+
majorDefects: MultiSelectFormField<string>;
|
|
200
|
+
minorDefects: MultiSelectFormField<string>;
|
|
197
201
|
};
|
|
198
202
|
declare type ProductFormFields = ProductAttributesFormFields & ProductFilterAttributesFormFields & ProductConsignmentAttributesFormFields;
|
|
199
203
|
interface ParamsForBuildProductInputObjForShopify {
|