gemcap-be-common 1.5.132 → 1.5.133
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/package.json
CHANGED
|
@@ -27,9 +27,7 @@
|
|
|
27
27
|
import { IProductBrokerView } from '../models/ProductBroker.model';
|
|
28
28
|
import { ILoanBrokerPlain, ILoanBrokerEmailPlain } from '../models/LoanBroker.model';
|
|
29
29
|
import { LoanChargesService } from './loan-charges.service';
|
|
30
|
-
type BrokerView = Omit<IProductBrokerView, '_id'
|
|
31
|
-
_id: string;
|
|
32
|
-
};
|
|
30
|
+
type BrokerView = Omit<IProductBrokerView, '_id' | 'createdAt' | 'updatedAt'>;
|
|
33
31
|
type BrokerTotalView = Omit<IProductBrokerView, 'productId'> & {
|
|
34
32
|
productId: string;
|
|
35
33
|
};
|
|
@@ -45,7 +43,7 @@ export declare class BrokersService {
|
|
|
45
43
|
constructor(loanChargesService: LoanChargesService);
|
|
46
44
|
normalizeObjects(): Promise<void>;
|
|
47
45
|
getAllProductBrokers(): Promise<import("../models/ProductBroker.model").IProductBrokerLean[]>;
|
|
48
|
-
getBorrowerBrokers(borrowerId: string): Promise<
|
|
46
|
+
getBorrowerBrokers(borrowerId: string): Promise<BrokerView[]>;
|
|
49
47
|
getProductBrokers(productId: string): Promise<import("../models/ProductBroker.model").IProductBrokerDocWithLoanBroker[]>;
|
|
50
48
|
getTotalShares(borrowerId: string, brokers: IProductBrokerView[], replaceNames?: boolean): Promise<ProductTotal>;
|
|
51
49
|
getTotals(borrowerId: string): Promise<BrokerTotalView[]>;
|
|
@@ -12,7 +12,6 @@ const brokers_db_2 = require("../db/brokers.db");
|
|
|
12
12
|
const main_helper_1 = require("../helpers/main.helper");
|
|
13
13
|
const defaultBrokerList = [
|
|
14
14
|
{
|
|
15
|
-
_id: (0, main_helper_1.getUUID)(),
|
|
16
15
|
uiId: (0, main_helper_1.getUUID)(),
|
|
17
16
|
active: true,
|
|
18
17
|
BSCode: '',
|
|
@@ -22,8 +21,6 @@ const defaultBrokerList = [
|
|
|
22
21
|
adminShare: 0,
|
|
23
22
|
interestShare: 0,
|
|
24
23
|
otherShare: 0,
|
|
25
|
-
createdAt: null,
|
|
26
|
-
updatedAt: null,
|
|
27
24
|
},
|
|
28
25
|
];
|
|
29
26
|
class BrokersService {
|
|
@@ -15,12 +15,11 @@ import { getAllLoanBrokers, getAllProductBrokers, getBorrowerBrokers } from '../
|
|
|
15
15
|
import { LoanChargesService } from './loan-charges.service';
|
|
16
16
|
import { getUUID } from '../helpers/main.helper';
|
|
17
17
|
|
|
18
|
-
type BrokerView = Omit<IProductBrokerView, '_id'
|
|
18
|
+
type BrokerView = Omit<IProductBrokerView, '_id' | 'createdAt' | 'updatedAt'>;
|
|
19
19
|
type BrokerTotalView = Omit<IProductBrokerView, 'productId'> & { productId: string };
|
|
20
20
|
|
|
21
21
|
const defaultBrokerList: BrokerView[] = [
|
|
22
22
|
{
|
|
23
|
-
_id: getUUID(),
|
|
24
23
|
uiId: getUUID(),
|
|
25
24
|
active: true,
|
|
26
25
|
BSCode: '',
|
|
@@ -30,8 +29,6 @@ const defaultBrokerList: BrokerView[] = [
|
|
|
30
29
|
adminShare: 0,
|
|
31
30
|
interestShare: 0,
|
|
32
31
|
otherShare: 0,
|
|
33
|
-
createdAt: null,
|
|
34
|
-
updatedAt: null,
|
|
35
32
|
},
|
|
36
33
|
];
|
|
37
34
|
|