gemcap-be-common 1.4.210 → 1.4.211
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/models/LoanStatementTransaction.model.d.ts +31 -18
- package/models/LoanStatementTransaction.model.ts +19 -3
- package/models/_index.d.ts +3 -3
- package/package.json +1 -1
- package/services/borrowers.service.d.ts +2 -2
- package/services/brokers.service.d.ts +2 -2
- package/services/loan-statement.service.d.ts +5 -3
- package/services/loan-transactions.service.d.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
import mongoose
|
|
25
|
+
import mongoose from 'mongoose';
|
|
26
26
|
import dayjs from 'dayjs';
|
|
27
27
|
import { ILoanChargeDoc } from './LoanCharges.model';
|
|
28
28
|
export interface IStatementPeriod {
|
|
@@ -43,6 +43,20 @@ export interface ILoanStatementTransaction {
|
|
|
43
43
|
userId?: string;
|
|
44
44
|
isEditable?: boolean;
|
|
45
45
|
}
|
|
46
|
+
export interface ILoanStatementTransactionDoc extends ILoanStatementTransaction, mongoose.Document {
|
|
47
|
+
_id: mongoose.Types.ObjectId;
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
updatedAt: Date;
|
|
50
|
+
}
|
|
51
|
+
export interface ILoanStatementTransactionLean extends ILoanStatementTransaction {
|
|
52
|
+
_id: mongoose.Types.ObjectId;
|
|
53
|
+
createdAt: Date;
|
|
54
|
+
updatedAt: Date;
|
|
55
|
+
}
|
|
56
|
+
export interface ILoanStatementTransactionPlain extends Omit<ILoanStatementTransaction, 'chargeId'> {
|
|
57
|
+
_id: string;
|
|
58
|
+
chargeId: string;
|
|
59
|
+
}
|
|
46
60
|
export interface ILoanStatementTransactionWithId extends ILoanStatementTransaction {
|
|
47
61
|
_id: mongoose.Types.ObjectId;
|
|
48
62
|
}
|
|
@@ -50,55 +64,54 @@ export interface ILoanStatementTransactionDocWithCharge extends ILoanStatementTr
|
|
|
50
64
|
charge: ILoanChargeDoc;
|
|
51
65
|
}
|
|
52
66
|
export type ILoanStatementTransactionView = Omit<ILoanStatementTransactionWithId, 'order'>;
|
|
53
|
-
export
|
|
54
|
-
}
|
|
67
|
+
export type TLoanStatementTransactionModel = mongoose.Model<ILoanStatementTransaction>;
|
|
55
68
|
export declare const LoanStatementSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
56
69
|
timestamps: true;
|
|
57
70
|
}, {
|
|
58
71
|
createdAt: NativeDate;
|
|
59
72
|
updatedAt: NativeDate;
|
|
60
73
|
} & {
|
|
61
|
-
order: number;
|
|
62
74
|
date: Date;
|
|
63
|
-
amount: number;
|
|
64
75
|
chargeId: mongoose.Types.ObjectId;
|
|
76
|
+
amount: number;
|
|
65
77
|
isSystem: boolean;
|
|
66
|
-
|
|
67
|
-
__v?: number;
|
|
68
|
-
memo?: string;
|
|
78
|
+
order: number;
|
|
69
79
|
amountPaid?: number;
|
|
70
80
|
balance?: number;
|
|
81
|
+
memo?: string;
|
|
71
82
|
userId?: string;
|
|
83
|
+
settlementCode?: string;
|
|
84
|
+
__v?: number;
|
|
72
85
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
73
86
|
createdAt: NativeDate;
|
|
74
87
|
updatedAt: NativeDate;
|
|
75
88
|
} & {
|
|
76
|
-
order: number;
|
|
77
89
|
date: Date;
|
|
78
|
-
amount: number;
|
|
79
90
|
chargeId: mongoose.Types.ObjectId;
|
|
91
|
+
amount: number;
|
|
80
92
|
isSystem: boolean;
|
|
81
|
-
|
|
82
|
-
__v?: number;
|
|
83
|
-
memo?: string;
|
|
93
|
+
order: number;
|
|
84
94
|
amountPaid?: number;
|
|
85
95
|
balance?: number;
|
|
96
|
+
memo?: string;
|
|
86
97
|
userId?: string;
|
|
98
|
+
settlementCode?: string;
|
|
99
|
+
__v?: number;
|
|
87
100
|
}>> & mongoose.FlatRecord<{
|
|
88
101
|
createdAt: NativeDate;
|
|
89
102
|
updatedAt: NativeDate;
|
|
90
103
|
} & {
|
|
91
|
-
order: number;
|
|
92
104
|
date: Date;
|
|
93
|
-
amount: number;
|
|
94
105
|
chargeId: mongoose.Types.ObjectId;
|
|
106
|
+
amount: number;
|
|
95
107
|
isSystem: boolean;
|
|
96
|
-
|
|
97
|
-
__v?: number;
|
|
98
|
-
memo?: string;
|
|
108
|
+
order: number;
|
|
99
109
|
amountPaid?: number;
|
|
100
110
|
balance?: number;
|
|
111
|
+
memo?: string;
|
|
101
112
|
userId?: string;
|
|
113
|
+
settlementCode?: string;
|
|
114
|
+
__v?: number;
|
|
102
115
|
}> & {
|
|
103
116
|
_id: mongoose.Types.ObjectId;
|
|
104
117
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import mongoose
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
2
|
import dayjs from 'dayjs';
|
|
3
3
|
|
|
4
4
|
import { MODEL_NAMES } from './_models';
|
|
@@ -35,6 +35,23 @@ export interface ILoanStatementTransaction {
|
|
|
35
35
|
isEditable?: boolean;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
export interface ILoanStatementTransactionDoc extends ILoanStatementTransaction, mongoose.Document {
|
|
39
|
+
_id: mongoose.Types.ObjectId;
|
|
40
|
+
createdAt: Date;
|
|
41
|
+
updatedAt: Date;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ILoanStatementTransactionLean extends ILoanStatementTransaction {
|
|
45
|
+
_id: mongoose.Types.ObjectId;
|
|
46
|
+
createdAt: Date;
|
|
47
|
+
updatedAt: Date;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface ILoanStatementTransactionPlain extends Omit<ILoanStatementTransaction, 'chargeId'> {
|
|
51
|
+
_id: string;
|
|
52
|
+
chargeId: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
38
55
|
export interface ILoanStatementTransactionWithId extends ILoanStatementTransaction {
|
|
39
56
|
_id: mongoose.Types.ObjectId;
|
|
40
57
|
}
|
|
@@ -45,8 +62,7 @@ export interface ILoanStatementTransactionDocWithCharge extends ILoanStatementTr
|
|
|
45
62
|
|
|
46
63
|
export type ILoanStatementTransactionView = Omit<ILoanStatementTransactionWithId, 'order'>
|
|
47
64
|
|
|
48
|
-
export
|
|
49
|
-
}
|
|
65
|
+
export type TLoanStatementTransactionModel = mongoose.Model<ILoanStatementTransaction>;
|
|
50
66
|
|
|
51
67
|
export const LoanStatementSchema = new mongoose.Schema(
|
|
52
68
|
{
|
package/models/_index.d.ts
CHANGED
|
@@ -31,10 +31,10 @@ export declare const allSchemas: {
|
|
|
31
31
|
createdAt: NativeDate;
|
|
32
32
|
updatedAt: NativeDate;
|
|
33
33
|
} & {
|
|
34
|
+
amount: number;
|
|
34
35
|
order: number;
|
|
35
36
|
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
36
37
|
apDate: Date;
|
|
37
|
-
amount: number;
|
|
38
38
|
__v?: number;
|
|
39
39
|
poNumber?: string;
|
|
40
40
|
customerName?: string;
|
|
@@ -45,10 +45,10 @@ export declare const allSchemas: {
|
|
|
45
45
|
createdAt: NativeDate;
|
|
46
46
|
updatedAt: NativeDate;
|
|
47
47
|
} & {
|
|
48
|
+
amount: number;
|
|
48
49
|
order: number;
|
|
49
50
|
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
50
51
|
apDate: Date;
|
|
51
|
-
amount: number;
|
|
52
52
|
__v?: number;
|
|
53
53
|
poNumber?: string;
|
|
54
54
|
customerName?: string;
|
|
@@ -59,10 +59,10 @@ export declare const allSchemas: {
|
|
|
59
59
|
createdAt: NativeDate;
|
|
60
60
|
updatedAt: NativeDate;
|
|
61
61
|
} & {
|
|
62
|
+
amount: number;
|
|
62
63
|
order: number;
|
|
63
64
|
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
64
65
|
apDate: Date;
|
|
65
|
-
amount: number;
|
|
66
66
|
__v?: number;
|
|
67
67
|
poNumber?: string;
|
|
68
68
|
customerName?: string;
|
package/package.json
CHANGED
|
@@ -84,10 +84,10 @@ export declare class BorrowerService {
|
|
|
84
84
|
getBorrowerCodesMap(): Promise<Map<string, string>>;
|
|
85
85
|
getBorrowerStatementDetails(borrowers: IBorrowerDoc[]): Promise<{
|
|
86
86
|
[x: string]: {
|
|
87
|
+
LAST_MONTH?: boolean;
|
|
88
|
+
CURRENT_MONTH?: boolean;
|
|
87
89
|
ENTIRE_LOAN?: boolean;
|
|
88
90
|
SELECTED_PERIOD?: boolean;
|
|
89
|
-
CURRENT_MONTH?: boolean;
|
|
90
|
-
LAST_MONTH?: boolean;
|
|
91
91
|
TERM_LOAN?: boolean;
|
|
92
92
|
};
|
|
93
93
|
}>;
|
|
@@ -46,9 +46,9 @@ export declare class BrokersService {
|
|
|
46
46
|
getAllProductBrokers(): Promise<(import("mongoose").FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & Required<{
|
|
47
47
|
_id: import("mongoose").Types.ObjectId;
|
|
48
48
|
}>)[]>;
|
|
49
|
-
getBorrowerBrokers(borrowerId: string): Promise<
|
|
49
|
+
getBorrowerBrokers(borrowerId: string): Promise<(import("mongoose").FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & Required<{
|
|
50
50
|
_id: import("mongoose").Types.ObjectId;
|
|
51
|
-
}>)[]>;
|
|
51
|
+
}>)[] | BrokerView[]>;
|
|
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[]>;
|
|
@@ -52,9 +52,9 @@ export declare class LoanStatementService {
|
|
|
52
52
|
private readonly getLoanStatementEffectsService;
|
|
53
53
|
constructor(financialIndexesService: FinancialIndexesService, loanChargesService: LoanChargesService, loanPaymentsService: LoanPaymentsService, loanStatementBalanceService: LoanStatementBalanceService, loanStatementStatusService: LoanStatementStatusService, loanTransactionsService: LoanTransactionsService, termLoanService: TermLoanService, uploadsService: UploadsService, getLoanStatementEffectsService: () => LoanStatementEffectsService);
|
|
54
54
|
private getGroupedData;
|
|
55
|
-
getTransactionById(transactionId: string): Promise<import("mongoose").FlattenMaps<ILoanStatementTransactionDoc> & {
|
|
55
|
+
getTransactionById(transactionId: string): Promise<import("mongoose").FlattenMaps<ILoanStatementTransactionDoc> & Required<{
|
|
56
56
|
_id: import("mongoose").Types.ObjectId;
|
|
57
|
-
}
|
|
57
|
+
}>>;
|
|
58
58
|
getFirstStatementTransaction(productId: string): Promise<ILoanStatementTransactionDoc>;
|
|
59
59
|
getBorrowerWithPeriods(borrowerId: string, period: {
|
|
60
60
|
selectedPeriod: string;
|
|
@@ -103,6 +103,9 @@ export declare class LoanStatementService {
|
|
|
103
103
|
deleteStatementTransaction(transactionId: string): Promise<void>;
|
|
104
104
|
addBalancesToStatements(transactionDocs: ILoanStatementTransactionDoc[]): Promise<{
|
|
105
105
|
floatedBalance: number;
|
|
106
|
+
_id: import("mongoose").Types.ObjectId;
|
|
107
|
+
createdAt: Date;
|
|
108
|
+
updatedAt: Date;
|
|
106
109
|
order: number;
|
|
107
110
|
date: Date;
|
|
108
111
|
chargeId: import("mongoose").Types.ObjectId;
|
|
@@ -114,7 +117,6 @@ export declare class LoanStatementService {
|
|
|
114
117
|
settlementCode?: string;
|
|
115
118
|
userId?: string;
|
|
116
119
|
isEditable?: boolean;
|
|
117
|
-
_id?: any;
|
|
118
120
|
__v?: any;
|
|
119
121
|
$locals: Record<string, unknown>;
|
|
120
122
|
$op: "save" | "validate" | "remove";
|
|
@@ -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 |
|
|
158
|
+
[x: string]: (string | number | string[] | Date)[];
|
|
159
159
|
}[];
|
|
160
160
|
}>;
|
|
161
161
|
getBorrowerIdsForFile(transactionFileId: string): Promise<{
|