rerobe-js-orm 2.7.35 → 2.7.37
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TRANSACTION_TYPES = void 0;
|
|
3
|
+
exports.CUSTOMER_CREDIT_REASONS = exports.TRANSACTION_TYPES = void 0;
|
|
4
4
|
exports.TRANSACTION_TYPES = {
|
|
5
5
|
merchantCredit: 'MERCHANT_CREDIT',
|
|
6
6
|
merchantDebit: 'MERCHANT_DEBIT',
|
|
@@ -9,3 +9,8 @@ exports.TRANSACTION_TYPES = {
|
|
|
9
9
|
customerCredit: 'CUSTOMER_CREDIT',
|
|
10
10
|
customerDebit: 'CUSTOMER_DEBIT',
|
|
11
11
|
};
|
|
12
|
+
exports.CUSTOMER_CREDIT_REASONS = {
|
|
13
|
+
giftCard: 'GIFT_CARD',
|
|
14
|
+
marketingPromotion: 'MARKETING_PROMOTION',
|
|
15
|
+
partnership: 'PARTNERSHIP',
|
|
16
|
+
};
|
|
@@ -14,6 +14,7 @@ export default class CustomerLedgerTransaction extends Base {
|
|
|
14
14
|
merchantCurrency: string;
|
|
15
15
|
orderId: string;
|
|
16
16
|
description: string;
|
|
17
|
+
reason: string;
|
|
17
18
|
constructor(props?: any);
|
|
18
19
|
toObj(): CustomerLedgerTransactionType;
|
|
19
20
|
generateSchemaForTypesense(name?: string): {
|
|
@@ -18,6 +18,7 @@ class CustomerLedgerTransaction extends Base_1.default {
|
|
|
18
18
|
this.merchantCurrency = (props === null || props === void 0 ? void 0 : props.merchantCurrency) || '';
|
|
19
19
|
this.orderId = (props === null || props === void 0 ? void 0 : props.orderId) || '';
|
|
20
20
|
this.description = (props === null || props === void 0 ? void 0 : props.description) || '';
|
|
21
|
+
this.reason = (props === null || props === void 0 ? void 0 : props.reason) || '';
|
|
21
22
|
}
|
|
22
23
|
toObj() {
|
|
23
24
|
const transactionObj = {
|
|
@@ -35,6 +36,7 @@ class CustomerLedgerTransaction extends Base_1.default {
|
|
|
35
36
|
merchantCurrency: this.merchantCurrency,
|
|
36
37
|
orderId: this.orderId,
|
|
37
38
|
description: this.description,
|
|
39
|
+
reason: this.reason,
|
|
38
40
|
};
|
|
39
41
|
return transactionObj;
|
|
40
42
|
}
|
|
@@ -113,12 +115,17 @@ class CustomerLedgerTransaction extends Base_1.default {
|
|
|
113
115
|
type: 'string',
|
|
114
116
|
},
|
|
115
117
|
{
|
|
116
|
-
facet:
|
|
118
|
+
facet: false,
|
|
117
119
|
name: 'description',
|
|
118
120
|
type: 'string',
|
|
119
121
|
},
|
|
122
|
+
{
|
|
123
|
+
facet: true,
|
|
124
|
+
name: 'reason',
|
|
125
|
+
type: 'string',
|
|
126
|
+
},
|
|
120
127
|
],
|
|
121
|
-
name: '
|
|
128
|
+
name: 'dev_customerLedgerTransactions_20230103',
|
|
122
129
|
};
|
|
123
130
|
}
|
|
124
131
|
toObjForTypesense() {
|
|
@@ -138,6 +145,7 @@ class CustomerLedgerTransaction extends Base_1.default {
|
|
|
138
145
|
merchantCurrency: this.utilities.sanitizeString(this.merchantCurrency),
|
|
139
146
|
orderId: this.utilities.sanitizeString(this.orderId),
|
|
140
147
|
description: this.utilities.sanitizeString(this.description),
|
|
148
|
+
reason: this.utilities.sanitizeString(this.reason),
|
|
141
149
|
};
|
|
142
150
|
return stagedObj;
|
|
143
151
|
}
|
|
@@ -41,6 +41,7 @@ declare type CustomerLedgerTransactionType = {
|
|
|
41
41
|
merchantCurrency: string;
|
|
42
42
|
orderId?: string;
|
|
43
43
|
description: string;
|
|
44
|
+
reason: string;
|
|
44
45
|
};
|
|
45
46
|
declare type TypesenseSellerLedgerTransactionObj = {
|
|
46
47
|
id: string;
|
|
@@ -82,4 +83,5 @@ declare type TypesenseCustomerLedgerTransactionObj = {
|
|
|
82
83
|
merchantCurrency: string;
|
|
83
84
|
orderId: string;
|
|
84
85
|
description: string;
|
|
86
|
+
reason: string;
|
|
85
87
|
};
|