gemcap-be-common 1.4.207 → 1.4.209
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/db/brokers.db.d.ts +6 -6
- package/models/ProductBroker.model.d.ts +25 -12
- package/models/ProductBroker.model.ts +19 -3
- package/models/Yield.model.d.ts +1 -0
- package/models/Yield.model.js +1 -0
- package/models/Yield.model.ts +1 -0
- package/package.json +1 -1
- package/services/brokers.service.d.ts +4 -4
- package/services/brokers.service.js +2 -0
- package/services/brokers.service.ts +2 -0
- package/services/loan-transactions.service.d.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/db/brokers.db.d.ts
CHANGED
|
@@ -28,12 +28,12 @@ import { ILoanProductDoc } from '../models/LoanProducts.model';
|
|
|
28
28
|
import { IProductBrokerDocWithBroker } from '../models/ProductBroker.model';
|
|
29
29
|
export declare const getProductBrokers: (productId: string) => Promise<IProductBrokerDocWithBroker[]>;
|
|
30
30
|
export declare const enrichWithBrokers: (transactions: ILedgerDataRow[], product: ILoanProductDoc) => Promise<ILedgerDataRow[]>;
|
|
31
|
-
export declare const getBorrowerBrokers: (borrowerId: string) => Promise<(mongoose.FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & {
|
|
31
|
+
export declare const getBorrowerBrokers: (borrowerId: string) => Promise<(mongoose.FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & Required<{
|
|
32
32
|
_id: mongoose.Types.ObjectId;
|
|
33
|
-
})[]>;
|
|
34
|
-
export declare const getAllProductBrokers: () => Promise<(mongoose.FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & {
|
|
33
|
+
}>)[]>;
|
|
34
|
+
export declare const getAllProductBrokers: () => Promise<(mongoose.FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & Required<{
|
|
35
35
|
_id: mongoose.Types.ObjectId;
|
|
36
|
-
})[]>;
|
|
36
|
+
}>)[]>;
|
|
37
37
|
export declare const getAllLoanBrokers: () => Promise<{
|
|
38
38
|
emails: mongoose.FlattenMaps<import("../models/LoanBroker.model").ILoanBrokerEmail>[];
|
|
39
39
|
order: number;
|
|
@@ -185,6 +185,6 @@ export declare const getAllLoanBrokers: () => Promise<{
|
|
|
185
185
|
(pathsToValidate?: mongoose.PathsToValidate, options?: mongoose.AnyObject): mongoose.Error.ValidationError;
|
|
186
186
|
};
|
|
187
187
|
}[]>;
|
|
188
|
-
export declare const getBrokerProducts: (loanBrokerId: string) => Promise<(mongoose.FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & {
|
|
188
|
+
export declare const getBrokerProducts: (loanBrokerId: string) => Promise<(mongoose.FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & Required<{
|
|
189
189
|
_id: mongoose.Types.ObjectId;
|
|
190
|
-
})[]>;
|
|
190
|
+
}>)[]>;
|
|
@@ -38,13 +38,26 @@ export interface IProductBroker {
|
|
|
38
38
|
adminShare: number;
|
|
39
39
|
otherShare: number;
|
|
40
40
|
}
|
|
41
|
-
export interface
|
|
41
|
+
export interface IProductBrokerDoc extends IProductBroker, mongoose.Document {
|
|
42
42
|
_id: mongoose.Types.ObjectId;
|
|
43
|
+
createdAt: Date;
|
|
44
|
+
updatedAt: Date;
|
|
43
45
|
}
|
|
44
|
-
export interface
|
|
46
|
+
export interface IProductBrokerLean extends IProductBroker {
|
|
47
|
+
_id: mongoose.Types.ObjectId;
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
updatedAt: Date;
|
|
50
|
+
}
|
|
51
|
+
export interface IProductBrokerPlain extends Omit<IProductBroker, 'borrowerId' | 'loanBrokerId' | 'productId'> {
|
|
52
|
+
_id: string;
|
|
53
|
+
borrowerId: string;
|
|
54
|
+
loanBrokerId: string;
|
|
55
|
+
productId: string;
|
|
56
|
+
}
|
|
57
|
+
export interface IProductBrokerDocWithBroker extends IProductBrokerDoc {
|
|
45
58
|
loanBroker: ILoanBrokerWithId;
|
|
46
59
|
}
|
|
47
|
-
export type IProductBrokerView = Omit<
|
|
60
|
+
export type IProductBrokerView = Omit<IProductBrokerLean, 'borrowerId' | 'order'>;
|
|
48
61
|
export interface IProductBrokerDoc extends IProductBroker, Document {
|
|
49
62
|
}
|
|
50
63
|
export declare const ProductBrokerSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
@@ -54,12 +67,12 @@ export declare const ProductBrokerSchema: mongoose.Schema<any, mongoose.Model<an
|
|
|
54
67
|
updatedAt: NativeDate;
|
|
55
68
|
} & {
|
|
56
69
|
order: number;
|
|
57
|
-
active: boolean;
|
|
58
70
|
borrowerId: mongoose.Types.ObjectId;
|
|
59
|
-
|
|
60
|
-
PLCode: string;
|
|
71
|
+
active: boolean;
|
|
61
72
|
loanBrokerId: mongoose.Types.ObjectId;
|
|
62
73
|
BSCode: string;
|
|
74
|
+
PLCode: string;
|
|
75
|
+
productId: mongoose.Types.ObjectId;
|
|
63
76
|
interestShare: number;
|
|
64
77
|
adminShare: number;
|
|
65
78
|
otherShare: number;
|
|
@@ -69,12 +82,12 @@ export declare const ProductBrokerSchema: mongoose.Schema<any, mongoose.Model<an
|
|
|
69
82
|
updatedAt: NativeDate;
|
|
70
83
|
} & {
|
|
71
84
|
order: number;
|
|
72
|
-
active: boolean;
|
|
73
85
|
borrowerId: mongoose.Types.ObjectId;
|
|
74
|
-
|
|
75
|
-
PLCode: string;
|
|
86
|
+
active: boolean;
|
|
76
87
|
loanBrokerId: mongoose.Types.ObjectId;
|
|
77
88
|
BSCode: string;
|
|
89
|
+
PLCode: string;
|
|
90
|
+
productId: mongoose.Types.ObjectId;
|
|
78
91
|
interestShare: number;
|
|
79
92
|
adminShare: number;
|
|
80
93
|
otherShare: number;
|
|
@@ -84,12 +97,12 @@ export declare const ProductBrokerSchema: mongoose.Schema<any, mongoose.Model<an
|
|
|
84
97
|
updatedAt: NativeDate;
|
|
85
98
|
} & {
|
|
86
99
|
order: number;
|
|
87
|
-
active: boolean;
|
|
88
100
|
borrowerId: mongoose.Types.ObjectId;
|
|
89
|
-
|
|
90
|
-
PLCode: string;
|
|
101
|
+
active: boolean;
|
|
91
102
|
loanBrokerId: mongoose.Types.ObjectId;
|
|
92
103
|
BSCode: string;
|
|
104
|
+
PLCode: string;
|
|
105
|
+
productId: mongoose.Types.ObjectId;
|
|
93
106
|
interestShare: number;
|
|
94
107
|
adminShare: number;
|
|
95
108
|
otherShare: number;
|
|
@@ -3,6 +3,7 @@ import Joi from 'joi';
|
|
|
3
3
|
|
|
4
4
|
import { MODEL_NAMES } from './_models';
|
|
5
5
|
import { ILoanBrokerWithId } from './LoanBroker.model';
|
|
6
|
+
import { ILoanProduct } from './LoanProducts.model';
|
|
6
7
|
|
|
7
8
|
export const ProductBrokerValidationSchema = Joi.object({
|
|
8
9
|
_id: Joi.string().required(),
|
|
@@ -31,15 +32,30 @@ export interface IProductBroker {
|
|
|
31
32
|
otherShare: number;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
export interface
|
|
35
|
+
export interface IProductBrokerDoc extends IProductBroker, mongoose.Document {
|
|
35
36
|
_id: mongoose.Types.ObjectId;
|
|
37
|
+
createdAt: Date;
|
|
38
|
+
updatedAt: Date;
|
|
36
39
|
}
|
|
37
40
|
|
|
38
|
-
export interface
|
|
41
|
+
export interface IProductBrokerLean extends IProductBroker {
|
|
42
|
+
_id: mongoose.Types.ObjectId;
|
|
43
|
+
createdAt: Date;
|
|
44
|
+
updatedAt: Date;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface IProductBrokerPlain extends Omit<IProductBroker, 'borrowerId' | 'loanBrokerId' | 'productId'> {
|
|
48
|
+
_id: string;
|
|
49
|
+
borrowerId: string;
|
|
50
|
+
loanBrokerId: string;
|
|
51
|
+
productId: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface IProductBrokerDocWithBroker extends IProductBrokerDoc {
|
|
39
55
|
loanBroker: ILoanBrokerWithId;
|
|
40
56
|
}
|
|
41
57
|
|
|
42
|
-
export type IProductBrokerView = Omit<
|
|
58
|
+
export type IProductBrokerView = Omit<IProductBrokerLean, 'borrowerId' | 'order'>
|
|
43
59
|
|
|
44
60
|
export interface IProductBrokerDoc extends IProductBroker, Document {
|
|
45
61
|
}
|
package/models/Yield.model.d.ts
CHANGED
package/models/Yield.model.js
CHANGED
|
@@ -26,6 +26,7 @@ var ETotalType;
|
|
|
26
26
|
ETotalType["BROKER"] = "BROKER";
|
|
27
27
|
ETotalType["GROSS"] = "GROSS";
|
|
28
28
|
ETotalType["NET"] = "NET";
|
|
29
|
+
ETotalType["APR"] = "APR";
|
|
29
30
|
ETotalType["APR_GROSS"] = "APR_GROSS";
|
|
30
31
|
ETotalType["APR_LIFE_GROSS"] = "APR_LIFE_GROSS";
|
|
31
32
|
})(ETotalType || (exports.ETotalType = ETotalType = {}));
|
package/models/Yield.model.ts
CHANGED
package/package.json
CHANGED
|
@@ -43,12 +43,12 @@ export declare class BrokersService {
|
|
|
43
43
|
private readonly loanChargesService;
|
|
44
44
|
constructor(loanChargesService: LoanChargesService);
|
|
45
45
|
normalizeObjects(): Promise<void>;
|
|
46
|
-
getAllProductBrokers(): Promise<(import("mongoose").FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & {
|
|
46
|
+
getAllProductBrokers(): Promise<(import("mongoose").FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & Required<{
|
|
47
47
|
_id: import("mongoose").Types.ObjectId;
|
|
48
|
-
})[]>;
|
|
49
|
-
getBorrowerBrokers(borrowerId: string): Promise<(import("mongoose").FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & {
|
|
48
|
+
}>)[]>;
|
|
49
|
+
getBorrowerBrokers(borrowerId: string): Promise<BrokerView[] | (import("mongoose").FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & Required<{
|
|
50
50
|
_id: import("mongoose").Types.ObjectId;
|
|
51
|
-
})[]
|
|
51
|
+
}>)[]>;
|
|
52
52
|
getProductBrokers(productId: string): Promise<import("../models/ProductBroker.model").IProductBrokerDocWithBroker[]>;
|
|
53
53
|
getTotalShares(borrowerId: string, brokers: IProductBrokerView[], replaceNames?: boolean): Promise<ProductTotal>;
|
|
54
54
|
getTotals(borrowerId: string): Promise<BrokerTotalView[]>;
|
|
@@ -155,7 +155,7 @@ export declare class LoanTransactionsService {
|
|
|
155
155
|
getTransactionReport(transactionIds: string[], borrowerId: string, effectiveDate: Date): Promise<{
|
|
156
156
|
transactionIdsToMark: string[];
|
|
157
157
|
transactions: {
|
|
158
|
-
[x: string]: (string | number | string[]
|
|
158
|
+
[x: string]: (string | number | Date | string[])[];
|
|
159
159
|
}[];
|
|
160
160
|
}>;
|
|
161
161
|
getBorrowerIdsForFile(transactionFileId: string): Promise<{
|