rerobe-js-orm 3.5.2 → 3.5.3
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.
|
@@ -15,6 +15,7 @@ export declare const CUSTOMER_CREDIT_REASONS: {
|
|
|
15
15
|
refund: string;
|
|
16
16
|
};
|
|
17
17
|
export declare const ActivityLogActorTypes: Record<ActivityLogActorTypes, string>;
|
|
18
|
+
export declare const SaleType: Record<SaleType, string>;
|
|
18
19
|
export declare const SellerProductLedgerStatus: Record<SellerProductLedgerStatus, string>;
|
|
19
20
|
export declare const SellerProductLedgerActivityLogAction: Record<SellerProductLedgerActivityLogAction, string>;
|
|
20
21
|
export declare const SellerProductLedgerStatusDescriptions: Record<SellerProductLedgerStatus, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SellerProductLedgerActivityLogActionDescriptions = exports.SellerProductLedgerStatusDescriptions = exports.SellerProductLedgerActivityLogAction = exports.SellerProductLedgerStatus = exports.ActivityLogActorTypes = exports.CUSTOMER_CREDIT_REASONS = exports.TRANSACTION_TYPES = void 0;
|
|
3
|
+
exports.SellerProductLedgerActivityLogActionDescriptions = exports.SellerProductLedgerStatusDescriptions = exports.SellerProductLedgerActivityLogAction = exports.SellerProductLedgerStatus = exports.SaleType = exports.ActivityLogActorTypes = exports.CUSTOMER_CREDIT_REASONS = exports.TRANSACTION_TYPES = void 0;
|
|
4
4
|
exports.TRANSACTION_TYPES = {
|
|
5
5
|
merchantCredit: 'MERCHANT_CREDIT',
|
|
6
6
|
merchantDebit: 'MERCHANT_DEBIT',
|
|
@@ -21,6 +21,10 @@ exports.ActivityLogActorTypes = {
|
|
|
21
21
|
SYSTEM: 'SYSTEM',
|
|
22
22
|
MERCHANT: 'MERCHANT',
|
|
23
23
|
};
|
|
24
|
+
exports.SaleType = {
|
|
25
|
+
CONSIGNMENT: 'CONSIGNMENT',
|
|
26
|
+
DIRECT_SALE: 'DIRECT_SALE',
|
|
27
|
+
};
|
|
24
28
|
exports.SellerProductLedgerStatus = {
|
|
25
29
|
PENDING_RETURN_PERIOD_COMPLETION: 'PENDING_RETURN_PERIOD_COMPLETION',
|
|
26
30
|
RETURNED_AND_RELISTED: 'RETURNED_AND_RELISTED',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const Base_1 = require("../Base");
|
|
4
|
+
const ledger_constants_1 = require("../constants/ledger-constants");
|
|
4
5
|
class SellerProductLedger extends Base_1.default {
|
|
5
6
|
constructor(props) {
|
|
6
7
|
super();
|
|
@@ -15,14 +16,14 @@ class SellerProductLedger extends Base_1.default {
|
|
|
15
16
|
this.sellerFirstName = this.utilities.sanitizeString(props === null || props === void 0 ? void 0 : props.sellerFirstName);
|
|
16
17
|
this.sellerLastName = this.utilities.sanitizeString(props === null || props === void 0 ? void 0 : props.sellerLastName);
|
|
17
18
|
this.sellerEmail = this.utilities.sanitizeString(props === null || props === void 0 ? void 0 : props.sellerEmail);
|
|
18
|
-
this.saleType = this.utilities.sanitizeString((props === null || props === void 0 ? void 0 : props.saleType) || SaleType.CONSIGNMENT);
|
|
19
|
+
this.saleType = this.utilities.sanitizeString((props === null || props === void 0 ? void 0 : props.saleType) || ledger_constants_1.SaleType.CONSIGNMENT);
|
|
19
20
|
this.productId = this.utilities.sanitizeString(props === null || props === void 0 ? void 0 : props.productId);
|
|
20
21
|
this.productTitle = this.utilities.sanitizeString(props === null || props === void 0 ? void 0 : props.productTitle);
|
|
21
22
|
this.productImgUrl = this.utilities.sanitizeString(props === null || props === void 0 ? void 0 : props.productImgUrl);
|
|
22
23
|
this.merchantCommission = this.utilities.sanitizeNumber(props === null || props === void 0 ? void 0 : props.merchantCommission);
|
|
23
24
|
this.priceSold = this.utilities.sanitizeNumber(props === null || props === void 0 ? void 0 : props.priceSold);
|
|
24
25
|
this.amountOwedToSeller = this.utilities.sanitizeNumber(props === null || props === void 0 ? void 0 : props.amountOwedToSeller);
|
|
25
|
-
this.status = this.utilities.sanitizeString((props === null || props === void 0 ? void 0 : props.status) || SellerProductLedgerStatus.PENDING_RETURN_PERIOD_COMPLETION);
|
|
26
|
+
this.status = this.utilities.sanitizeString((props === null || props === void 0 ? void 0 : props.status) || ledger_constants_1.SellerProductLedgerStatus.PENDING_RETURN_PERIOD_COMPLETION);
|
|
26
27
|
this.feesForSeller = Array.isArray(props === null || props === void 0 ? void 0 : props.feesForSeller) ? props === null || props === void 0 ? void 0 : props.feesForSeller : [];
|
|
27
28
|
this.tags = this.utilities.sanitzeStringArr(props === null || props === void 0 ? void 0 : props.tags);
|
|
28
29
|
}
|
|
@@ -9,12 +9,12 @@ class SellerProductLedgerActivityLog extends Base_1.default {
|
|
|
9
9
|
this.documentId = this.utilities.sanitizeString(props === null || props === void 0 ? void 0 : props.documentId) || this.utilities.makeRandId(28);
|
|
10
10
|
this.sellerProductLedgerId = this.utilities.sanitizeString(props === null || props === void 0 ? void 0 : props.sellerProductLedgerId);
|
|
11
11
|
this.timestamp = this.utilities.sanitizeMillisTimeStamp(props === null || props === void 0 ? void 0 : props.timestamp);
|
|
12
|
-
this.action = this.utilities.sanitizeString((props === null || props === void 0 ? void 0 : props.action) || SellerProductLedgerActivityLogAction.STATUS_CHANGED_TO_PENDING_RETURN_PERIOD_COMPLETION);
|
|
12
|
+
this.action = this.utilities.sanitizeString((props === null || props === void 0 ? void 0 : props.action) || ledger_constants_1.SellerProductLedgerActivityLogAction.STATUS_CHANGED_TO_PENDING_RETURN_PERIOD_COMPLETION);
|
|
13
13
|
this.details = this.utilities.sanitizeString((props === null || props === void 0 ? void 0 : props.details) ||
|
|
14
14
|
((_a = ledger_constants_1.SellerProductLedgerActivityLogActionDescriptions[(props === null || props === void 0 ? void 0 : props.action) ||
|
|
15
|
-
SellerProductLedgerActivityLogAction.STATUS_CHANGED_TO_PENDING_RETURN_PERIOD_COMPLETION]) === null || _a === void 0 ? void 0 : _a.description));
|
|
15
|
+
ledger_constants_1.SellerProductLedgerActivityLogAction.STATUS_CHANGED_TO_PENDING_RETURN_PERIOD_COMPLETION]) === null || _a === void 0 ? void 0 : _a.description));
|
|
16
16
|
this.actorId = this.utilities.sanitizeString((props === null || props === void 0 ? void 0 : props.actorId) || '');
|
|
17
|
-
this.actorType = this.utilities.sanitizeString((props === null || props === void 0 ? void 0 : props.actorType) || ActivityLogActorTypes.SYSTEM);
|
|
17
|
+
this.actorType = this.utilities.sanitizeString((props === null || props === void 0 ? void 0 : props.actorType) || ledger_constants_1.ActivityLogActorTypes.SYSTEM);
|
|
18
18
|
this.data = (props === null || props === void 0 ? void 0 : props.data) || {};
|
|
19
19
|
}
|
|
20
20
|
toObj() {
|