gemcap-be-common 1.4.110 → 1.4.112
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/financial-spreading.db.d.ts +2 -2
- package/microservice/event-map.d.ts +31 -27
- package/microservice/event-map.js +31 -27
- package/microservice/event-map.ts +31 -27
- package/microservice/queue-map.d.ts +1 -0
- package/microservice/queue-map.js +1 -0
- package/microservice/queue-map.ts +1 -0
- package/models/FinancialSpreadingSheet.model.d.ts +20 -6
- package/models/FinancialSpreadingSheet.model.ts +22 -4
- package/models/_index.d.ts +3 -3
- package/package.json +1 -1
- package/services/financial-spreading.service.d.ts +4 -4
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
import mongoose from 'mongoose';
|
|
26
26
|
import { FinancialSpreadingDTO, IFinancialSpreadingParams } from '../models/FinancialSpreading.model';
|
|
27
27
|
import { FinancialSpreadingSheetDTO, IFinancialSpreadingSheet } from '../models/FinancialSpreadingSheet.model';
|
|
28
|
-
export declare const getCreateAllBorrowerSheet: (params: IFinancialSpreadingParams) => Promise<(mongoose.FlattenMaps<IFinancialSpreadingSheet> &
|
|
28
|
+
export declare const getCreateAllBorrowerSheet: (params: IFinancialSpreadingParams) => Promise<(mongoose.FlattenMaps<IFinancialSpreadingSheet> & {
|
|
29
29
|
_id: mongoose.Types.ObjectId;
|
|
30
|
-
}
|
|
30
|
+
})[]>;
|
|
31
31
|
export declare const getFinancialSpreadingData: (params: IFinancialSpreadingParams, monthDeep?: number) => Promise<{
|
|
32
32
|
data: FinancialSpreadingDTO[];
|
|
33
33
|
sheets: FinancialSpreadingSheetDTO[];
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
export declare const EventMap: {
|
|
2
|
+
readonly ai: {
|
|
3
|
+
readonly SUMMARIZE_EMAIL: "ai#SUMMARIZE_EMAIL";
|
|
4
|
+
readonly FIND_MATCHES: "ai#FIND_MATCHES";
|
|
5
|
+
};
|
|
6
|
+
readonly auditors: {
|
|
7
|
+
readonly NOTIFY_ONE_PROSPECT: "auditors#NOTIFY_ONE_PROSPECT";
|
|
8
|
+
readonly NOTIFY_ALL_PROSPECTS: "auditors#NOTIFY_ALL_PROSPECTS";
|
|
9
|
+
};
|
|
10
|
+
readonly auth: {
|
|
11
|
+
readonly PASSWORD_RESET: "auth#PASSWORD_RESET";
|
|
12
|
+
readonly SEND_PASSWORD_RESET_EMAIL: "auth#SEND_PASSWORD_RESET_EMAIL";
|
|
13
|
+
readonly SET_NEW_PASSWORD: "auth#SET_NEW_PASSWORD";
|
|
14
|
+
readonly TWO_FA_RESET: "auth#TWO_FA_RESET";
|
|
15
|
+
};
|
|
2
16
|
readonly bank_uploaded_transactions: {
|
|
3
17
|
readonly CREATE: "bank_uploaded_transactions#CREATE";
|
|
4
18
|
};
|
|
5
|
-
readonly database: {
|
|
6
|
-
readonly BACKUP: "database#BACKUP";
|
|
7
|
-
readonly RESTORE: "database#RESTORE";
|
|
8
|
-
};
|
|
9
19
|
readonly crm: {
|
|
10
20
|
readonly CREATE_SHAREPOINT_FOLDER: "crm#CREATE_SHAREPOINT_FOLDER";
|
|
11
21
|
readonly COPY_SHAREPOINT_FOLDER: "crm#COPY_SHAREPOINT_FOLDER";
|
|
@@ -22,9 +32,6 @@ export declare const EventMap: {
|
|
|
22
32
|
readonly FORM_REMINDER_CONTACT: "crm#FORM_REMINDER_CONTACT";
|
|
23
33
|
readonly FORM_REMINDER_PROSPECT: "crm#FORM_REMINDER_PROSPECT";
|
|
24
34
|
};
|
|
25
|
-
readonly report: {
|
|
26
|
-
readonly DETAILED_PORTFOLIO: "report#DETAILED_PORTFOLIO";
|
|
27
|
-
};
|
|
28
35
|
readonly crm_report: {
|
|
29
36
|
readonly PIPELINE: "crm_report#PIPELINE";
|
|
30
37
|
readonly DECISIONED: "crm_report#DECISIONED";
|
|
@@ -33,17 +40,20 @@ export declare const EventMap: {
|
|
|
33
40
|
readonly FILE_LINKS: "crm_report#FILE_LINKS";
|
|
34
41
|
readonly FILE_LINKS_UNDERWRITERS: "crm_report#FILE_LINKS_UNDERWRITERS";
|
|
35
42
|
};
|
|
43
|
+
readonly database: {
|
|
44
|
+
readonly BACKUP: "database#BACKUP";
|
|
45
|
+
readonly RESTORE: "database#RESTORE";
|
|
46
|
+
};
|
|
47
|
+
readonly finance: {
|
|
48
|
+
readonly GENERATE_BANK_UPLOAD_REPORT: "finance#GENERATE_BANK_UPLOAD_REPORT";
|
|
49
|
+
};
|
|
36
50
|
readonly notification: {
|
|
37
51
|
readonly SEND_EMAIL: "notification#SEND_EMAIL";
|
|
38
52
|
};
|
|
39
|
-
readonly
|
|
40
|
-
readonly
|
|
41
|
-
readonly
|
|
42
|
-
readonly
|
|
43
|
-
};
|
|
44
|
-
readonly auditors: {
|
|
45
|
-
readonly NOTIFY_ONE_PROSPECT: "auditors#NOTIFY_ONE_PROSPECT";
|
|
46
|
-
readonly NOTIFY_ALL_PROSPECTS: "auditors#NOTIFY_ALL_PROSPECTS";
|
|
53
|
+
readonly portfolio: {
|
|
54
|
+
readonly CREATE_NOTE: "portfolio#CREATE_NOTE";
|
|
55
|
+
readonly DELETE_NOTE: "portfolio#DELETE_NOTE";
|
|
56
|
+
readonly UPDATE_NOTE: "portfolio#UPDATE_NOTE";
|
|
47
57
|
};
|
|
48
58
|
readonly prospectFiles: {
|
|
49
59
|
readonly COPY_CONFIDENTIAL: "prospectFiles#COPY_CONFIDENTIAL";
|
|
@@ -51,19 +61,13 @@ export declare const EventMap: {
|
|
|
51
61
|
readonly DELETE_CONFIDENTIAL: "prospectFiles#DELETE_CONFIDENTIAL";
|
|
52
62
|
readonly SEND_REPORT: "prospectFiles#SEND_REPORT";
|
|
53
63
|
};
|
|
54
|
-
readonly
|
|
55
|
-
readonly
|
|
56
|
-
readonly
|
|
57
|
-
readonly
|
|
58
|
-
readonly TWO_FA_RESET: "auth#TWO_FA_RESET";
|
|
59
|
-
};
|
|
60
|
-
readonly finance: {
|
|
61
|
-
readonly GENERATE_BANK_UPLOAD_REPORT: "finance#GENERATE_BANK_UPLOAD_REPORT";
|
|
64
|
+
readonly recalc: {
|
|
65
|
+
readonly UNLOCK_PRODUCT_BALANCE: "recalc#UNLOCK_PRODUCT_BALANCE";
|
|
66
|
+
readonly PRODUCT_BALANCE: "recalc#PRODUCT_BALANCE";
|
|
67
|
+
readonly STATEMENT_STATUS: "recalc#STATEMENT_STATUS";
|
|
62
68
|
};
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
65
|
-
readonly DELETE_NOTE: "portfolio#DELETE_NOTE";
|
|
66
|
-
readonly UPDATE_NOTE: "portfolio#UPDATE_NOTE";
|
|
69
|
+
readonly report: {
|
|
70
|
+
readonly DETAILED_PORTFOLIO: "report#DETAILED_PORTFOLIO";
|
|
67
71
|
};
|
|
68
72
|
readonly search: {
|
|
69
73
|
readonly CREATED: "search#CREATED";
|
|
@@ -2,13 +2,23 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EventMap = void 0;
|
|
4
4
|
exports.EventMap = {
|
|
5
|
+
ai: {
|
|
6
|
+
SUMMARIZE_EMAIL: 'ai#SUMMARIZE_EMAIL',
|
|
7
|
+
FIND_MATCHES: 'ai#FIND_MATCHES',
|
|
8
|
+
},
|
|
9
|
+
auditors: {
|
|
10
|
+
NOTIFY_ONE_PROSPECT: 'auditors#NOTIFY_ONE_PROSPECT',
|
|
11
|
+
NOTIFY_ALL_PROSPECTS: 'auditors#NOTIFY_ALL_PROSPECTS',
|
|
12
|
+
},
|
|
13
|
+
auth: {
|
|
14
|
+
PASSWORD_RESET: 'auth#PASSWORD_RESET',
|
|
15
|
+
SEND_PASSWORD_RESET_EMAIL: 'auth#SEND_PASSWORD_RESET_EMAIL',
|
|
16
|
+
SET_NEW_PASSWORD: 'auth#SET_NEW_PASSWORD',
|
|
17
|
+
TWO_FA_RESET: 'auth#TWO_FA_RESET',
|
|
18
|
+
},
|
|
5
19
|
bank_uploaded_transactions: {
|
|
6
20
|
CREATE: 'bank_uploaded_transactions#CREATE',
|
|
7
21
|
},
|
|
8
|
-
database: {
|
|
9
|
-
BACKUP: 'database#BACKUP',
|
|
10
|
-
RESTORE: 'database#RESTORE',
|
|
11
|
-
},
|
|
12
22
|
crm: {
|
|
13
23
|
CREATE_SHAREPOINT_FOLDER: 'crm#CREATE_SHAREPOINT_FOLDER',
|
|
14
24
|
COPY_SHAREPOINT_FOLDER: 'crm#COPY_SHAREPOINT_FOLDER',
|
|
@@ -25,9 +35,6 @@ exports.EventMap = {
|
|
|
25
35
|
FORM_REMINDER_CONTACT: 'crm#FORM_REMINDER_CONTACT',
|
|
26
36
|
FORM_REMINDER_PROSPECT: 'crm#FORM_REMINDER_PROSPECT',
|
|
27
37
|
},
|
|
28
|
-
report: {
|
|
29
|
-
DETAILED_PORTFOLIO: 'report#DETAILED_PORTFOLIO',
|
|
30
|
-
},
|
|
31
38
|
crm_report: {
|
|
32
39
|
PIPELINE: 'crm_report#PIPELINE',
|
|
33
40
|
DECISIONED: 'crm_report#DECISIONED',
|
|
@@ -36,17 +43,20 @@ exports.EventMap = {
|
|
|
36
43
|
FILE_LINKS: 'crm_report#FILE_LINKS',
|
|
37
44
|
FILE_LINKS_UNDERWRITERS: 'crm_report#FILE_LINKS_UNDERWRITERS',
|
|
38
45
|
},
|
|
46
|
+
database: {
|
|
47
|
+
BACKUP: 'database#BACKUP',
|
|
48
|
+
RESTORE: 'database#RESTORE',
|
|
49
|
+
},
|
|
50
|
+
finance: {
|
|
51
|
+
GENERATE_BANK_UPLOAD_REPORT: 'finance#GENERATE_BANK_UPLOAD_REPORT',
|
|
52
|
+
},
|
|
39
53
|
notification: {
|
|
40
54
|
SEND_EMAIL: 'notification#SEND_EMAIL',
|
|
41
55
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
auditors: {
|
|
48
|
-
NOTIFY_ONE_PROSPECT: 'auditors#NOTIFY_ONE_PROSPECT',
|
|
49
|
-
NOTIFY_ALL_PROSPECTS: 'auditors#NOTIFY_ALL_PROSPECTS',
|
|
56
|
+
portfolio: {
|
|
57
|
+
CREATE_NOTE: 'portfolio#CREATE_NOTE',
|
|
58
|
+
DELETE_NOTE: 'portfolio#DELETE_NOTE',
|
|
59
|
+
UPDATE_NOTE: 'portfolio#UPDATE_NOTE',
|
|
50
60
|
},
|
|
51
61
|
prospectFiles: {
|
|
52
62
|
COPY_CONFIDENTIAL: 'prospectFiles#COPY_CONFIDENTIAL',
|
|
@@ -54,19 +64,13 @@ exports.EventMap = {
|
|
|
54
64
|
DELETE_CONFIDENTIAL: 'prospectFiles#DELETE_CONFIDENTIAL',
|
|
55
65
|
SEND_REPORT: 'prospectFiles#SEND_REPORT',
|
|
56
66
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
TWO_FA_RESET: 'auth#TWO_FA_RESET',
|
|
62
|
-
},
|
|
63
|
-
finance: {
|
|
64
|
-
GENERATE_BANK_UPLOAD_REPORT: 'finance#GENERATE_BANK_UPLOAD_REPORT',
|
|
67
|
+
recalc: {
|
|
68
|
+
UNLOCK_PRODUCT_BALANCE: 'recalc#UNLOCK_PRODUCT_BALANCE',
|
|
69
|
+
PRODUCT_BALANCE: 'recalc#PRODUCT_BALANCE',
|
|
70
|
+
STATEMENT_STATUS: 'recalc#STATEMENT_STATUS',
|
|
65
71
|
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
DELETE_NOTE: 'portfolio#DELETE_NOTE',
|
|
69
|
-
UPDATE_NOTE: 'portfolio#UPDATE_NOTE',
|
|
72
|
+
report: {
|
|
73
|
+
DETAILED_PORTFOLIO: 'report#DETAILED_PORTFOLIO',
|
|
70
74
|
},
|
|
71
75
|
search: {
|
|
72
76
|
CREATED: 'search#CREATED',
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
export const EventMap = {
|
|
2
|
+
ai: {
|
|
3
|
+
SUMMARIZE_EMAIL: 'ai#SUMMARIZE_EMAIL',
|
|
4
|
+
FIND_MATCHES: 'ai#FIND_MATCHES',
|
|
5
|
+
},
|
|
6
|
+
auditors: {
|
|
7
|
+
NOTIFY_ONE_PROSPECT: 'auditors#NOTIFY_ONE_PROSPECT',
|
|
8
|
+
NOTIFY_ALL_PROSPECTS: 'auditors#NOTIFY_ALL_PROSPECTS',
|
|
9
|
+
},
|
|
10
|
+
auth: {
|
|
11
|
+
PASSWORD_RESET: 'auth#PASSWORD_RESET',
|
|
12
|
+
SEND_PASSWORD_RESET_EMAIL: 'auth#SEND_PASSWORD_RESET_EMAIL',
|
|
13
|
+
SET_NEW_PASSWORD: 'auth#SET_NEW_PASSWORD',
|
|
14
|
+
TWO_FA_RESET: 'auth#TWO_FA_RESET',
|
|
15
|
+
},
|
|
2
16
|
bank_uploaded_transactions: {
|
|
3
17
|
CREATE: 'bank_uploaded_transactions#CREATE',
|
|
4
18
|
},
|
|
5
|
-
database: {
|
|
6
|
-
BACKUP: 'database#BACKUP',
|
|
7
|
-
RESTORE: 'database#RESTORE',
|
|
8
|
-
},
|
|
9
19
|
crm: {
|
|
10
20
|
CREATE_SHAREPOINT_FOLDER: 'crm#CREATE_SHAREPOINT_FOLDER',
|
|
11
21
|
COPY_SHAREPOINT_FOLDER: 'crm#COPY_SHAREPOINT_FOLDER',
|
|
@@ -22,9 +32,6 @@ export const EventMap = {
|
|
|
22
32
|
FORM_REMINDER_CONTACT: 'crm#FORM_REMINDER_CONTACT',
|
|
23
33
|
FORM_REMINDER_PROSPECT: 'crm#FORM_REMINDER_PROSPECT',
|
|
24
34
|
},
|
|
25
|
-
report: {
|
|
26
|
-
DETAILED_PORTFOLIO: 'report#DETAILED_PORTFOLIO',
|
|
27
|
-
},
|
|
28
35
|
crm_report: {
|
|
29
36
|
PIPELINE: 'crm_report#PIPELINE',
|
|
30
37
|
DECISIONED: 'crm_report#DECISIONED',
|
|
@@ -33,17 +40,20 @@ export const EventMap = {
|
|
|
33
40
|
FILE_LINKS: 'crm_report#FILE_LINKS',
|
|
34
41
|
FILE_LINKS_UNDERWRITERS: 'crm_report#FILE_LINKS_UNDERWRITERS',
|
|
35
42
|
},
|
|
43
|
+
database: {
|
|
44
|
+
BACKUP: 'database#BACKUP',
|
|
45
|
+
RESTORE: 'database#RESTORE',
|
|
46
|
+
},
|
|
47
|
+
finance: {
|
|
48
|
+
GENERATE_BANK_UPLOAD_REPORT: 'finance#GENERATE_BANK_UPLOAD_REPORT',
|
|
49
|
+
},
|
|
36
50
|
notification: {
|
|
37
51
|
SEND_EMAIL: 'notification#SEND_EMAIL',
|
|
38
52
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
auditors: {
|
|
45
|
-
NOTIFY_ONE_PROSPECT: 'auditors#NOTIFY_ONE_PROSPECT',
|
|
46
|
-
NOTIFY_ALL_PROSPECTS: 'auditors#NOTIFY_ALL_PROSPECTS',
|
|
53
|
+
portfolio: {
|
|
54
|
+
CREATE_NOTE: 'portfolio#CREATE_NOTE',
|
|
55
|
+
DELETE_NOTE: 'portfolio#DELETE_NOTE',
|
|
56
|
+
UPDATE_NOTE: 'portfolio#UPDATE_NOTE',
|
|
47
57
|
},
|
|
48
58
|
prospectFiles: {
|
|
49
59
|
COPY_CONFIDENTIAL: 'prospectFiles#COPY_CONFIDENTIAL',
|
|
@@ -51,19 +61,13 @@ export const EventMap = {
|
|
|
51
61
|
DELETE_CONFIDENTIAL: 'prospectFiles#DELETE_CONFIDENTIAL',
|
|
52
62
|
SEND_REPORT: 'prospectFiles#SEND_REPORT',
|
|
53
63
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
TWO_FA_RESET: 'auth#TWO_FA_RESET',
|
|
59
|
-
},
|
|
60
|
-
finance: {
|
|
61
|
-
GENERATE_BANK_UPLOAD_REPORT: 'finance#GENERATE_BANK_UPLOAD_REPORT',
|
|
64
|
+
recalc: {
|
|
65
|
+
UNLOCK_PRODUCT_BALANCE: 'recalc#UNLOCK_PRODUCT_BALANCE',
|
|
66
|
+
PRODUCT_BALANCE: 'recalc#PRODUCT_BALANCE',
|
|
67
|
+
STATEMENT_STATUS: 'recalc#STATEMENT_STATUS',
|
|
62
68
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
DELETE_NOTE: 'portfolio#DELETE_NOTE',
|
|
66
|
-
UPDATE_NOTE: 'portfolio#UPDATE_NOTE',
|
|
69
|
+
report: {
|
|
70
|
+
DETAILED_PORTFOLIO: 'report#DETAILED_PORTFOLIO',
|
|
67
71
|
},
|
|
68
72
|
search: {
|
|
69
73
|
CREATED: 'search#CREATED',
|
|
@@ -6,6 +6,7 @@ export declare const QueueMap: {
|
|
|
6
6
|
readonly finance: "goat_ms_finance";
|
|
7
7
|
readonly portfolio: "goat_ms_portfolio";
|
|
8
8
|
readonly search: "goat_ms_search";
|
|
9
|
+
readonly ai: "goat_ms_ai";
|
|
9
10
|
};
|
|
10
11
|
export type QueueMapType = typeof QueueMap;
|
|
11
12
|
export type QueueName = QueueMapType[keyof QueueMapType];
|
|
@@ -6,6 +6,7 @@ export const QueueMap = {
|
|
|
6
6
|
finance: 'goat_ms_finance', // goat_ms_finance
|
|
7
7
|
portfolio: 'goat_ms_portfolio', // goat_ms_portfolio
|
|
8
8
|
search: 'goat_ms_search', // goat_ms_search
|
|
9
|
+
ai: 'goat_ms_ai', // goat_ms_ai
|
|
9
10
|
} as const;
|
|
10
11
|
|
|
11
12
|
export type QueueMapType = typeof QueueMap;
|
|
@@ -137,7 +137,6 @@ export declare class FinancialSpreadingSheetDTO extends BasicDTO {
|
|
|
137
137
|
}
|
|
138
138
|
export declare const financialSpreadingSheetViewValidationSchema: Joi.ObjectSchema<IFinancialSpreadingSheetView>;
|
|
139
139
|
export interface IFinancialSpreadingSheet {
|
|
140
|
-
_id?: mongoose.Types.ObjectId;
|
|
141
140
|
borrowerId: mongoose.Types.ObjectId;
|
|
142
141
|
financialSpreadingType: EFinancialSpreadingType;
|
|
143
142
|
rowType: EFinanceSpreadingPLTotal | EFinanceSpreadingBSTotal;
|
|
@@ -147,9 +146,24 @@ export interface IFinancialSpreadingSheet {
|
|
|
147
146
|
isTotal: boolean;
|
|
148
147
|
isCalculated: boolean;
|
|
149
148
|
}
|
|
150
|
-
|
|
151
|
-
export declare const FinancialSpreadingSheetSchema: mongoose.Schema<IFinancialSpreadingSheet, IFinancialSpreadingSheetModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IFinancialSpreadingSheet, mongoose.Document<unknown, {}, mongoose.FlatRecord<IFinancialSpreadingSheet>> & mongoose.FlatRecord<IFinancialSpreadingSheet> & Required<{
|
|
149
|
+
export interface IFinancialSpreadingSheetDoc extends IFinancialSpreadingSheet, Document {
|
|
152
150
|
_id: mongoose.Types.ObjectId;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
151
|
+
createdAt: Date;
|
|
152
|
+
updatedAt: Date;
|
|
153
|
+
}
|
|
154
|
+
export interface IFinancialSpreadingSheetLean extends IFinancialSpreadingSheet {
|
|
155
|
+
_id: mongoose.Types.ObjectId;
|
|
156
|
+
createdAt: Date;
|
|
157
|
+
updatedAt: Date;
|
|
158
|
+
}
|
|
159
|
+
export interface IFinancialSpreadingSheetPlain extends Omit<IFinancialSpreadingSheet, 'borrowerId'> {
|
|
160
|
+
_id: string;
|
|
161
|
+
borrowerId: string;
|
|
162
|
+
createdAt: Date;
|
|
163
|
+
updatedAt: Date;
|
|
164
|
+
}
|
|
165
|
+
export type TFinancialSpreadingSheetModel = Model<IFinancialSpreadingSheet, {}, {}>;
|
|
166
|
+
export declare const FinancialSpreadingSheetSchema: mongoose.Schema<IFinancialSpreadingSheet, TFinancialSpreadingSheetModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IFinancialSpreadingSheet, mongoose.Document<unknown, {}, mongoose.FlatRecord<IFinancialSpreadingSheet>> & mongoose.FlatRecord<IFinancialSpreadingSheet> & {
|
|
167
|
+
_id: mongoose.Types.ObjectId;
|
|
168
|
+
}>;
|
|
169
|
+
export declare const FinancialSpreadingSheet: TFinancialSpreadingSheetModel;
|
|
@@ -167,7 +167,6 @@ export const financialSpreadingSheetViewValidationSchema = Joi.object<IFinancial
|
|
|
167
167
|
});
|
|
168
168
|
|
|
169
169
|
export interface IFinancialSpreadingSheet {
|
|
170
|
-
_id?: mongoose.Types.ObjectId;
|
|
171
170
|
borrowerId: mongoose.Types.ObjectId;
|
|
172
171
|
financialSpreadingType: EFinancialSpreadingType;
|
|
173
172
|
rowType: EFinanceSpreadingPLTotal | EFinanceSpreadingBSTotal;
|
|
@@ -178,9 +177,28 @@ export interface IFinancialSpreadingSheet {
|
|
|
178
177
|
isCalculated: boolean;
|
|
179
178
|
}
|
|
180
179
|
|
|
181
|
-
|
|
180
|
+
export interface IFinancialSpreadingSheetDoc extends IFinancialSpreadingSheet, Document {
|
|
181
|
+
_id: mongoose.Types.ObjectId;
|
|
182
|
+
createdAt: Date;
|
|
183
|
+
updatedAt: Date;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface IFinancialSpreadingSheetLean extends IFinancialSpreadingSheet {
|
|
187
|
+
_id: mongoose.Types.ObjectId;
|
|
188
|
+
createdAt: Date;
|
|
189
|
+
updatedAt: Date;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export interface IFinancialSpreadingSheetPlain extends Omit<IFinancialSpreadingSheet, 'borrowerId'> {
|
|
193
|
+
_id: string;
|
|
194
|
+
borrowerId: string;
|
|
195
|
+
createdAt: Date;
|
|
196
|
+
updatedAt: Date;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export type TFinancialSpreadingSheetModel = Model<IFinancialSpreadingSheet, {}, {}>;
|
|
182
200
|
|
|
183
|
-
export const FinancialSpreadingSheetSchema = new mongoose.Schema<IFinancialSpreadingSheet,
|
|
201
|
+
export const FinancialSpreadingSheetSchema = new mongoose.Schema<IFinancialSpreadingSheet, TFinancialSpreadingSheetModel>(
|
|
184
202
|
{
|
|
185
203
|
borrowerId: {
|
|
186
204
|
type: mongoose.Schema.Types.ObjectId,
|
|
@@ -237,4 +255,4 @@ export const FinancialSpreadingSheetSchema = new mongoose.Schema<IFinancialSprea
|
|
|
237
255
|
},
|
|
238
256
|
);
|
|
239
257
|
|
|
240
|
-
export const FinancialSpreadingSheet = mongoose.model<IFinancialSpreadingSheet,
|
|
258
|
+
export const FinancialSpreadingSheet = mongoose.model<IFinancialSpreadingSheet, TFinancialSpreadingSheetModel>(MODEL_NAMES.financialSpreadingSheets, FinancialSpreadingSheetSchema);
|
package/models/_index.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ export declare const allSchemas: {
|
|
|
31
31
|
createdAt: NativeDate;
|
|
32
32
|
updatedAt: NativeDate;
|
|
33
33
|
} & {
|
|
34
|
-
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
35
34
|
order: number;
|
|
35
|
+
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
36
36
|
apDate: Date;
|
|
37
37
|
amount: number;
|
|
38
38
|
__v?: number;
|
|
@@ -45,8 +45,8 @@ export declare const allSchemas: {
|
|
|
45
45
|
createdAt: NativeDate;
|
|
46
46
|
updatedAt: NativeDate;
|
|
47
47
|
} & {
|
|
48
|
-
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
49
48
|
order: number;
|
|
49
|
+
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
50
50
|
apDate: Date;
|
|
51
51
|
amount: number;
|
|
52
52
|
__v?: number;
|
|
@@ -59,8 +59,8 @@ export declare const allSchemas: {
|
|
|
59
59
|
createdAt: NativeDate;
|
|
60
60
|
updatedAt: NativeDate;
|
|
61
61
|
} & {
|
|
62
|
-
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
63
62
|
order: number;
|
|
63
|
+
bbcSheetId: import("mongoose").Types.ObjectId;
|
|
64
64
|
apDate: Date;
|
|
65
65
|
amount: number;
|
|
66
66
|
__v?: number;
|
package/package.json
CHANGED
|
@@ -61,14 +61,14 @@ export declare class FinancialSpreadingService {
|
|
|
61
61
|
calculateTotals(params: IFinancialSpreadingParams): Promise<void>;
|
|
62
62
|
private calculatePL;
|
|
63
63
|
private calculateBS;
|
|
64
|
-
createNewSheet(sheet: IFinancialSpreadingSheetView): Promise<mongoose.Document<unknown, {}, IFinancialSpreadingSheet> & IFinancialSpreadingSheet &
|
|
64
|
+
createNewSheet(sheet: IFinancialSpreadingSheetView): Promise<mongoose.Document<unknown, {}, IFinancialSpreadingSheet> & IFinancialSpreadingSheet & {
|
|
65
65
|
_id: mongoose.Types.ObjectId;
|
|
66
|
-
}
|
|
66
|
+
}>;
|
|
67
67
|
deleteRedundantSheets(sheetIds: string[]): Promise<void>;
|
|
68
68
|
private getAllBorrowerSheets;
|
|
69
|
-
getCreateAllBorrowerSheet(params: IFinancialSpreadingParams): Promise<(mongoose.FlattenMaps<IFinancialSpreadingSheet> &
|
|
69
|
+
getCreateAllBorrowerSheet(params: IFinancialSpreadingParams): Promise<(mongoose.FlattenMaps<IFinancialSpreadingSheet> & {
|
|
70
70
|
_id: mongoose.Types.ObjectId;
|
|
71
|
-
}
|
|
71
|
+
})[]>;
|
|
72
72
|
getExcelFile(params: IFinancialSpreadingParams): Promise<any>;
|
|
73
73
|
uploadData(data: IFinancialSpreadingUpload[], params: IFinancialSpreadingParams): Promise<void>;
|
|
74
74
|
}
|