gemcap-be-common 1.5.171 → 1.5.173

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.
@@ -58,6 +58,23 @@ export interface ILoanPayment {
58
58
  settlementCode?: string;
59
59
  paymentOrder?: string[];
60
60
  }
61
+ export interface ILoanPaymentLean extends ILoanPayment {
62
+ _id: mongoose.Types.ObjectId;
63
+ }
64
+ export interface ILoanPaymentPlain extends Omit<ILoanPayment, 'productId' | 'paid' | 'loanTransactions'> {
65
+ _id: string;
66
+ productId: string;
67
+ paid: {
68
+ _id?: string;
69
+ statementId: string;
70
+ amount: number;
71
+ }[];
72
+ loanTransactions: {
73
+ _id?: string;
74
+ transactionId: string;
75
+ amount: number;
76
+ }[];
77
+ }
61
78
  export interface ILoanPaymentWithId extends ILoanPayment {
62
79
  _id: mongoose.Types.ObjectId;
63
80
  }
@@ -69,56 +86,56 @@ export declare const LoanPaymentSchema: mongoose.Schema<any, mongoose.Model<any,
69
86
  createdAt: NativeDate;
70
87
  updatedAt: NativeDate;
71
88
  } & {
72
- loanTransactions: mongoose.Types.DocumentArray<{
73
- amount?: number;
74
- transactionId?: mongoose.Types.ObjectId;
75
- }>;
76
89
  date: Date;
77
90
  productId: mongoose.Types.ObjectId;
78
91
  amount: number;
79
- paymentOrder: string[];
80
92
  paid: mongoose.Types.DocumentArray<{
81
93
  amount?: number;
82
94
  statementId?: mongoose.Types.ObjectId;
83
95
  }>;
84
- __v?: number;
96
+ paymentOrder: string[];
97
+ loanTransactions: mongoose.Types.DocumentArray<{
98
+ amount?: number;
99
+ transactionId?: mongoose.Types.ObjectId;
100
+ }>;
85
101
  settlementCode?: string;
102
+ __v?: number;
86
103
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
87
104
  createdAt: NativeDate;
88
105
  updatedAt: NativeDate;
89
106
  } & {
90
- loanTransactions: mongoose.Types.DocumentArray<{
91
- amount?: number;
92
- transactionId?: mongoose.Types.ObjectId;
93
- }>;
94
107
  date: Date;
95
108
  productId: mongoose.Types.ObjectId;
96
109
  amount: number;
97
- paymentOrder: string[];
98
110
  paid: mongoose.Types.DocumentArray<{
99
111
  amount?: number;
100
112
  statementId?: mongoose.Types.ObjectId;
101
113
  }>;
102
- __v?: number;
114
+ paymentOrder: string[];
115
+ loanTransactions: mongoose.Types.DocumentArray<{
116
+ amount?: number;
117
+ transactionId?: mongoose.Types.ObjectId;
118
+ }>;
103
119
  settlementCode?: string;
120
+ __v?: number;
104
121
  }>> & mongoose.FlatRecord<{
105
122
  createdAt: NativeDate;
106
123
  updatedAt: NativeDate;
107
124
  } & {
108
- loanTransactions: mongoose.Types.DocumentArray<{
109
- amount?: number;
110
- transactionId?: mongoose.Types.ObjectId;
111
- }>;
112
125
  date: Date;
113
126
  productId: mongoose.Types.ObjectId;
114
127
  amount: number;
115
- paymentOrder: string[];
116
128
  paid: mongoose.Types.DocumentArray<{
117
129
  amount?: number;
118
130
  statementId?: mongoose.Types.ObjectId;
119
131
  }>;
120
- __v?: number;
132
+ paymentOrder: string[];
133
+ loanTransactions: mongoose.Types.DocumentArray<{
134
+ amount?: number;
135
+ transactionId?: mongoose.Types.ObjectId;
136
+ }>;
121
137
  settlementCode?: string;
138
+ __v?: number;
122
139
  }> & {
123
140
  _id: mongoose.Types.ObjectId;
124
141
  }>;
@@ -34,12 +34,39 @@ export interface ILoanPayment {
34
34
  date: Date;
35
35
  productId: mongoose.Types.ObjectId;
36
36
  amount: number;
37
- paid: { _id?: mongoose.Types.ObjectId, statementId: mongoose.Types.ObjectId, amount: number }[];
38
- loanTransactions: { _id?: mongoose.Types.ObjectId, transactionId: mongoose.Types.ObjectId, amount: number }[];
37
+ paid: {
38
+ _id?: mongoose.Types.ObjectId;
39
+ statementId: mongoose.Types.ObjectId;
40
+ amount: number;
41
+ }[];
42
+ loanTransactions: {
43
+ _id?: mongoose.Types.ObjectId;
44
+ transactionId: mongoose.Types.ObjectId;
45
+ amount: number;
46
+ }[];
39
47
  settlementCode?: string;
40
48
  paymentOrder?: string[];
41
49
  }
42
50
 
51
+ export interface ILoanPaymentLean extends ILoanPayment {
52
+ _id: mongoose.Types.ObjectId;
53
+ }
54
+
55
+ export interface ILoanPaymentPlain extends Omit<ILoanPayment, 'productId' | 'paid' | 'loanTransactions'> {
56
+ _id: string;
57
+ productId: string;
58
+ paid: {
59
+ _id?: string;
60
+ statementId: string;
61
+ amount: number;
62
+ }[];
63
+ loanTransactions: {
64
+ _id?: string;
65
+ transactionId: string;
66
+ amount: number;
67
+ }[];
68
+ }
69
+
43
70
  export interface ILoanPaymentWithId extends ILoanPayment {
44
71
  _id: mongoose.Types.ObjectId;
45
72
  }
@@ -59,6 +59,9 @@ export interface IProductBrokerPlain extends Omit<IProductBroker, 'borrowerId' |
59
59
  export interface IProductBrokerDocWithLoanBroker extends TProductBrokerDoc {
60
60
  loanBroker?: ILoanBrokerLean;
61
61
  }
62
+ export interface IProductBrokerLeanWithLoanBroker extends IProductBrokerLean {
63
+ loanBroker?: ILoanBrokerLean;
64
+ }
62
65
  export interface IProductBrokerWithLoanBrokerPlain extends IProductBrokerPlain {
63
66
  loanBroker?: ILoanBrokerPlain;
64
67
  }
@@ -72,8 +75,8 @@ export declare const ProductBrokerSchema: mongoose.Schema<any, mongoose.Model<an
72
75
  } & {
73
76
  uiId: string;
74
77
  order: number;
75
- active: boolean;
76
78
  borrowerId: mongoose.Types.ObjectId;
79
+ active: boolean;
77
80
  loanBrokerId: mongoose.Types.ObjectId;
78
81
  BSCodeId: mongoose.Types.ObjectId;
79
82
  PLCodeId: mongoose.Types.ObjectId;
@@ -82,17 +85,17 @@ export declare const ProductBrokerSchema: mongoose.Schema<any, mongoose.Model<an
82
85
  interestShare: number;
83
86
  adminShare: number;
84
87
  otherShare: number;
85
- __v?: number;
86
88
  BSCode?: string;
87
89
  PLCode?: string;
90
+ __v?: number;
88
91
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
89
92
  createdAt: NativeDate;
90
93
  updatedAt: NativeDate;
91
94
  } & {
92
95
  uiId: string;
93
96
  order: number;
94
- active: boolean;
95
97
  borrowerId: mongoose.Types.ObjectId;
98
+ active: boolean;
96
99
  loanBrokerId: mongoose.Types.ObjectId;
97
100
  BSCodeId: mongoose.Types.ObjectId;
98
101
  PLCodeId: mongoose.Types.ObjectId;
@@ -101,17 +104,17 @@ export declare const ProductBrokerSchema: mongoose.Schema<any, mongoose.Model<an
101
104
  interestShare: number;
102
105
  adminShare: number;
103
106
  otherShare: number;
104
- __v?: number;
105
107
  BSCode?: string;
106
108
  PLCode?: string;
109
+ __v?: number;
107
110
  }>> & mongoose.FlatRecord<{
108
111
  createdAt: NativeDate;
109
112
  updatedAt: NativeDate;
110
113
  } & {
111
114
  uiId: string;
112
115
  order: number;
113
- active: boolean;
114
116
  borrowerId: mongoose.Types.ObjectId;
117
+ active: boolean;
115
118
  loanBrokerId: mongoose.Types.ObjectId;
116
119
  BSCodeId: mongoose.Types.ObjectId;
117
120
  PLCodeId: mongoose.Types.ObjectId;
@@ -120,9 +123,9 @@ export declare const ProductBrokerSchema: mongoose.Schema<any, mongoose.Model<an
120
123
  interestShare: number;
121
124
  adminShare: number;
122
125
  otherShare: number;
123
- __v?: number;
124
126
  BSCode?: string;
125
127
  PLCode?: string;
128
+ __v?: number;
126
129
  }> & {
127
130
  _id: mongoose.Types.ObjectId;
128
131
  }>;
@@ -60,6 +60,10 @@ export interface IProductBrokerDocWithLoanBroker extends TProductBrokerDoc {
60
60
  loanBroker?: ILoanBrokerLean;
61
61
  }
62
62
 
63
+ export interface IProductBrokerLeanWithLoanBroker extends IProductBrokerLean {
64
+ loanBroker?: ILoanBrokerLean;
65
+ }
66
+
63
67
  export interface IProductBrokerWithLoanBrokerPlain extends IProductBrokerPlain {
64
68
  loanBroker?: ILoanBrokerPlain;
65
69
  }
@@ -31,8 +31,8 @@ export declare const allSchemas: {
31
31
  createdAt: NativeDate;
32
32
  updatedAt: NativeDate;
33
33
  } & {
34
- order: number;
35
34
  amount: number;
35
+ order: number;
36
36
  bbcSheetId: import("mongoose").Types.ObjectId;
37
37
  apDate: Date;
38
38
  __v?: number;
@@ -45,8 +45,8 @@ export declare const allSchemas: {
45
45
  createdAt: NativeDate;
46
46
  updatedAt: NativeDate;
47
47
  } & {
48
- order: number;
49
48
  amount: number;
49
+ order: number;
50
50
  bbcSheetId: import("mongoose").Types.ObjectId;
51
51
  apDate: Date;
52
52
  __v?: number;
@@ -59,8 +59,8 @@ export declare const allSchemas: {
59
59
  createdAt: NativeDate;
60
60
  updatedAt: NativeDate;
61
61
  } & {
62
- order: number;
63
62
  amount: number;
63
+ order: number;
64
64
  bbcSheetId: import("mongoose").Types.ObjectId;
65
65
  apDate: Date;
66
66
  __v?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.5.171",
3
+ "version": "1.5.173",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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
- ENTIRE_LOAN?: boolean;
88
87
  SELECTED_PERIOD?: boolean;
89
- CURRENT_MONTH?: boolean;
88
+ ENTIRE_LOAN?: boolean;
90
89
  LAST_MONTH?: boolean;
90
+ CURRENT_MONTH?: boolean;
91
91
  TERM_LOAN?: boolean;
92
92
  };
93
93
  }>;
@@ -164,7 +164,7 @@ export declare class LoanTransactionsService {
164
164
  getTransactionReport(transactionIds: string[], borrowerId: string, effectiveDate: Date): Promise<{
165
165
  transactionIdsToMark: string[];
166
166
  transactions: {
167
- [x: string]: (string | number | Date | string[])[];
167
+ [x: string]: (string | number | string[] | Date)[];
168
168
  }[];
169
169
  }>;
170
170
  getBorrowerIdsForFile(transactionFileId: string): Promise<{