rerobe-js-orm 2.4.77 → 2.4.78
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.
|
@@ -4,7 +4,7 @@ const ProductFactory_1 = require("./ProductFactory");
|
|
|
4
4
|
const Product_1 = require("../../models/Product");
|
|
5
5
|
class ProductFromFormState extends ProductFactory_1.default {
|
|
6
6
|
createProduct(props) {
|
|
7
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
|
|
8
8
|
const productAttributes = {
|
|
9
9
|
availableForSale: props.fields.availableForSale.selectedValue,
|
|
10
10
|
description: props.fields.description.inputValue,
|
|
@@ -77,7 +77,29 @@ 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
|
};
|
|
80
|
-
|
|
80
|
+
const timestampAttributes = {
|
|
81
|
+
sellRequestReviewTimestamp: (_s = props.props) === null || _s === void 0 ? void 0 : _s.sellRequestReviewTimestamp,
|
|
82
|
+
sellRequestReviewDraftTimestamp: (_t = props.props) === null || _t === void 0 ? void 0 : _t.sellRequestReviewDraftTimestamp,
|
|
83
|
+
rejectedTimestamp: (_u = props.props) === null || _u === void 0 ? void 0 : _u.rejectedTimestamp,
|
|
84
|
+
holdTimestamp: (_v = props.props) === null || _v === void 0 ? void 0 : _v.holdTimestamp,
|
|
85
|
+
acceptedTimestamp: (_w = props.props) === null || _w === void 0 ? void 0 : _w.acceptedTimestamp,
|
|
86
|
+
sellerToDropOffTimestamp: (_x = props.props) === null || _x === void 0 ? void 0 : _x.sellerToDropOffTimestamp,
|
|
87
|
+
sellerToShipTimestamp: (_y = props.props) === null || _y === void 0 ? void 0 : _y.sellerToShipTimestamp,
|
|
88
|
+
sellerToGetPickUpTimestamp: (_z = props.props) === null || _z === void 0 ? void 0 : _z.sellerToGetPickUpTimestamp,
|
|
89
|
+
qualityControlTimestamp: (_0 = props.props) === null || _0 === void 0 ? void 0 : _0.qualityControlTimestamp,
|
|
90
|
+
pendingPublicationTimestamp: (_1 = props.props) === null || _1 === void 0 ? void 0 : _1.pendingPublicationTimestamp,
|
|
91
|
+
listedTimestamp: (_2 = props.props) === null || _2 === void 0 ? void 0 : _2.listedTimestamp,
|
|
92
|
+
clearanceTimestamp: (_3 = props.props) === null || _3 === void 0 ? void 0 : _3.clearanceTimestamp,
|
|
93
|
+
reservedTimestamp: (_4 = props.props) === null || _4 === void 0 ? void 0 : _4.reservedTimestamp,
|
|
94
|
+
soldTimestamp: (_5 = props.props) === null || _5 === void 0 ? void 0 : _5.soldTimestamp,
|
|
95
|
+
returnedTimestamp: (_6 = props.props) === null || _6 === void 0 ? void 0 : _6.returnedTimestamp,
|
|
96
|
+
soldSellerToBePaidTimestamp: (_7 = props.props) === null || _7 === void 0 ? void 0 : _7.soldSellerToBePaidTimestamp,
|
|
97
|
+
soldSellerPaidTimestamp: (_8 = props.props) === null || _8 === void 0 ? void 0 : _8.soldSellerPaidTimestamp,
|
|
98
|
+
sellerSelfRejectTimestamp: (_9 = props.props) === null || _9 === void 0 ? void 0 : _9.sellerSelfRejectTimestamp,
|
|
99
|
+
liquidationRequestedTimestamp: (_10 = props.props) === null || _10 === void 0 ? void 0 : _10.liquidationRequestedTimestamp,
|
|
100
|
+
sellerLiquidatedTimestamp: (_11 = props.props) === null || _11 === void 0 ? void 0 : _11.sellerLiquidatedTimestamp,
|
|
101
|
+
};
|
|
102
|
+
return new Product_1.default(Object.assign(Object.assign(Object.assign(Object.assign({}, productAttributes), productFilterAttributes), consignmentAttributes), timestampAttributes));
|
|
81
103
|
}
|
|
82
104
|
}
|
|
83
105
|
exports.default = ProductFromFormState;
|
package/lib/models/Product.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export default class Product extends Base {
|
|
|
3
3
|
attributes: ProductAttributes;
|
|
4
4
|
filterAttributes: ProductFilterAttributes;
|
|
5
5
|
consignmentAttributes: ProductConsignmentAttributes;
|
|
6
|
+
timestampAttributes: ProductTimestampAttributes;
|
|
6
7
|
FIELD_NOT_TRANSLATABLE_KEY: string;
|
|
7
8
|
constructor(props?: any);
|
|
8
9
|
toPartialObj(): ShopifyProduct;
|
package/lib/models/Product.js
CHANGED
|
@@ -81,12 +81,42 @@ 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
|
};
|
|
84
|
+
this.timestampAttributes = {
|
|
85
|
+
sellRequestReviewDraftTimestamp: (props === null || props === void 0 ? void 0 : props.sellRequestReviewDraftTimestamp)
|
|
86
|
+
? Number(props === null || props === void 0 ? void 0 : props.sellRequestReviewDraftTimestamp)
|
|
87
|
+
: null,
|
|
88
|
+
sellRequestReviewTimestamp: (props === null || props === void 0 ? void 0 : props.sellRequestReviewTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.sellRequestReviewTimestamp) : null,
|
|
89
|
+
rejectedTimestamp: (props === null || props === void 0 ? void 0 : props.rejectedTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.rejectedTimestamp) : null,
|
|
90
|
+
holdTimestamp: (props === null || props === void 0 ? void 0 : props.holdTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.holdTimestamp) : null,
|
|
91
|
+
acceptedTimestamp: (props === null || props === void 0 ? void 0 : props.acceptedTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.acceptedTimestamp) : null,
|
|
92
|
+
sellerToDropOffTimestamp: (props === null || props === void 0 ? void 0 : props.sellerToDropOffTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.sellerToDropOffTimestamp) : null,
|
|
93
|
+
sellerToShipTimestamp: (props === null || props === void 0 ? void 0 : props.sellerToShipTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.sellerToShipTimestamp) : null,
|
|
94
|
+
sellerToGetPickUpTimestamp: (props === null || props === void 0 ? void 0 : props.sellerToGetPickUpTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.sellerToGetPickUpTimestamp) : null,
|
|
95
|
+
qualityControlTimestamp: (props === null || props === void 0 ? void 0 : props.qualityControlTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.qualityControlTimestamp) : null,
|
|
96
|
+
pendingPublicationTimestamp: (props === null || props === void 0 ? void 0 : props.pendingPublicationTimestamp)
|
|
97
|
+
? Number(props === null || props === void 0 ? void 0 : props.pendingPublicationTimestamp)
|
|
98
|
+
: null,
|
|
99
|
+
listedTimestamp: (props === null || props === void 0 ? void 0 : props.listedTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.listedTimestamp) : null,
|
|
100
|
+
clearanceTimestamp: (props === null || props === void 0 ? void 0 : props.clearanceTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.clearanceTimestamp) : null,
|
|
101
|
+
reservedTimestamp: (props === null || props === void 0 ? void 0 : props.reservedTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.reservedTimestamp) : null,
|
|
102
|
+
soldTimestamp: (props === null || props === void 0 ? void 0 : props.soldTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.soldTimestamp) : null,
|
|
103
|
+
returnedTimestamp: (props === null || props === void 0 ? void 0 : props.returnedTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.returnedTimestamp) : null,
|
|
104
|
+
soldSellerToBePaidTimestamp: (props === null || props === void 0 ? void 0 : props.soldSellerToBePaidTimestamp)
|
|
105
|
+
? Number(props === null || props === void 0 ? void 0 : props.soldSellerToBePaidTimestamp)
|
|
106
|
+
: null,
|
|
107
|
+
soldSellerPaidTimestamp: (props === null || props === void 0 ? void 0 : props.soldSellerPaidTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.soldSellerPaidTimestamp) : null,
|
|
108
|
+
sellerSelfRejectTimestamp: (props === null || props === void 0 ? void 0 : props.sellerSelfRejectTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.sellerSelfRejectTimestamp) : null,
|
|
109
|
+
liquidationRequestedTimestamp: (props === null || props === void 0 ? void 0 : props.liquidationRequestedTimestamp)
|
|
110
|
+
? Number(props === null || props === void 0 ? void 0 : props.liquidationRequestedTimestamp)
|
|
111
|
+
: null,
|
|
112
|
+
sellerLiquidatedTimestamp: (props === null || props === void 0 ? void 0 : props.sellerLiquidatedTimestamp) ? Number(props === null || props === void 0 ? void 0 : props.sellerLiquidatedTimestamp) : null,
|
|
113
|
+
};
|
|
84
114
|
}
|
|
85
115
|
toPartialObj() {
|
|
86
116
|
return Object.assign(Object.assign({}, this.attributes), this.filterAttributes);
|
|
87
117
|
}
|
|
88
118
|
toObj() {
|
|
89
|
-
return Object.assign(Object.assign(Object.assign({}, this.attributes), this.filterAttributes), this.consignmentAttributes);
|
|
119
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({}, this.attributes), this.filterAttributes), this.consignmentAttributes), this.timestampAttributes);
|
|
90
120
|
}
|
|
91
121
|
toProductInputObjForShopify(location) {
|
|
92
122
|
const productInputObj = {
|
|
@@ -70,6 +70,28 @@ declare type ProductConsignmentAttributes = {
|
|
|
70
70
|
selectedForClearance: string;
|
|
71
71
|
locationIds?: string[];
|
|
72
72
|
};
|
|
73
|
+
declare type ProductTimestampAttributes = {
|
|
74
|
+
sellRequestReviewTimestamp: number | null;
|
|
75
|
+
sellRequestReviewDraftTimestamp: number | null;
|
|
76
|
+
rejectedTimestamp: number | null;
|
|
77
|
+
holdTimestamp: number | null;
|
|
78
|
+
acceptedTimestamp: number | null;
|
|
79
|
+
sellerToDropOffTimestamp: number | null;
|
|
80
|
+
sellerToShipTimestamp: number | null;
|
|
81
|
+
sellerToGetPickUpTimestamp: number | null;
|
|
82
|
+
qualityControlTimestamp: number | null;
|
|
83
|
+
pendingPublicationTimestamp: number | null;
|
|
84
|
+
listedTimestamp: number | null;
|
|
85
|
+
clearanceTimestamp: number | null;
|
|
86
|
+
reservedTimestamp: number | null;
|
|
87
|
+
soldTimestamp: number | null;
|
|
88
|
+
returnedTimestamp: number | null;
|
|
89
|
+
soldSellerToBePaidTimestamp: number | null;
|
|
90
|
+
soldSellerPaidTimestamp: number | null;
|
|
91
|
+
sellerSelfRejectTimestamp: number | null;
|
|
92
|
+
liquidationRequestedTimestamp: number | null;
|
|
93
|
+
sellerLiquidatedTimestamp: number | null;
|
|
94
|
+
};
|
|
73
95
|
declare type TranslatableAttributes = {
|
|
74
96
|
description: string;
|
|
75
97
|
color: string;
|