gemcap-be-common 1.4.79 → 1.4.81
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/helpers/main.helper.ts
CHANGED
|
@@ -36,7 +36,7 @@ export const removeFields = <T>(document: mongoose.Document, fieldsToUnset: stri
|
|
|
36
36
|
return document.toObject({
|
|
37
37
|
transform: (_doc, ret) => {
|
|
38
38
|
fieldsToUnset.forEach((field) => delete ret[field]);
|
|
39
|
-
return deepCloneAndConvertMaps(ret) as Omit<T, keyof T>;
|
|
39
|
+
return deepCloneAndConvertMaps(ret) as unknown as Omit<T, keyof T>;
|
|
40
40
|
},
|
|
41
41
|
});
|
|
42
42
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gemcap-be-common",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.81",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"@types/lodash": "^4.17.10",
|
|
39
39
|
"@types/nodemailer": "^6.4.17",
|
|
40
40
|
"@types/uuid": "^10.0.0",
|
|
41
|
+
"i": "^0.3.7",
|
|
41
42
|
"typescript": "^5.3.3"
|
|
42
43
|
}
|
|
43
44
|
}
|
|
@@ -4,15 +4,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.BrokersService = void 0;
|
|
7
|
-
const uuid_1 = require("uuid");
|
|
8
7
|
const decimal_js_1 = __importDefault(require("decimal.js"));
|
|
9
8
|
const ProductBroker_model_1 = require("../models/ProductBroker.model");
|
|
10
9
|
const LoanBroker_model_1 = require("../models/LoanBroker.model");
|
|
11
10
|
const brokers_db_1 = require("../db/brokers.db");
|
|
12
11
|
const brokers_db_2 = require("../db/brokers.db");
|
|
12
|
+
const main_helper_1 = require("../helpers/main.helper");
|
|
13
13
|
const defaultBrokerList = [
|
|
14
14
|
{
|
|
15
|
-
_id: `new_${(0,
|
|
15
|
+
_id: `new_${(0, main_helper_1.getUUID)()}`,
|
|
16
16
|
active: true,
|
|
17
17
|
BSCode: '',
|
|
18
18
|
PLCode: '',
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { v4 as uuidV4 } from 'uuid';
|
|
2
1
|
import Decimal from 'decimal.js';
|
|
3
2
|
|
|
4
3
|
import {
|
|
@@ -10,13 +9,14 @@ import { getProductBrokers } from '../db/brokers.db';
|
|
|
10
9
|
|
|
11
10
|
import { getAllLoanBrokers, getAllProductBrokers, getBorrowerBrokers } from '../db/brokers.db';
|
|
12
11
|
import { LoanChargesService } from './loan-charges.service';
|
|
12
|
+
import { getUUID } from '../helpers/main.helper';
|
|
13
13
|
|
|
14
14
|
type BrokerView = Omit<IProductBrokerView, '_id'> & { _id: string };
|
|
15
15
|
type BrokerTotalView = Omit<IProductBrokerView, 'productId'> & { productId: string };
|
|
16
16
|
|
|
17
17
|
const defaultBrokerList: BrokerView[] = [
|
|
18
18
|
{
|
|
19
|
-
_id: `new_${
|
|
19
|
+
_id: `new_${getUUID()}`,
|
|
20
20
|
active: true,
|
|
21
21
|
BSCode: '',
|
|
22
22
|
PLCode: '',
|