gemcap-be-common 1.4.99 → 1.4.101
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/BorrowerNote.model.d.ts +0 -1
- package/models/BorrowerNote.model.js +0 -1
- package/models/BorrowerNote.model.ts +0 -2
- package/package.json +1 -1
- package/services/calendar.service.d.ts +8 -1
- package/services/calendar.service.js +10 -3
- package/services/calendar.service.ts +10 -3
- package/services/loan-transactions.service.d.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -18,7 +18,6 @@ export interface IBorrowerNote {
|
|
|
18
18
|
subjectId: mongoose.Types.ObjectId;
|
|
19
19
|
text: string;
|
|
20
20
|
attachments: IBorrowerNoteAttachment[];
|
|
21
|
-
inline: IBorrowerNoteAttachment[];
|
|
22
21
|
createdBy: string;
|
|
23
22
|
updatedBy?: string;
|
|
24
23
|
source?: {
|
|
@@ -123,7 +122,6 @@ export const BorrowerNoteSchema = new mongoose.Schema<IBorrowerNoteDoc>({
|
|
|
123
122
|
type: String,
|
|
124
123
|
},
|
|
125
124
|
attachments: [BorrowerNoteAttachmentSchema],
|
|
126
|
-
inline: [BorrowerNoteAttachmentSchema],
|
|
127
125
|
source: {
|
|
128
126
|
type: {
|
|
129
127
|
type: String,
|
package/package.json
CHANGED
|
@@ -43,7 +43,14 @@ interface IWorkingDaysApi {
|
|
|
43
43
|
export declare class CalendarService {
|
|
44
44
|
private readonly calendarRepository;
|
|
45
45
|
constructor(calendarRepository: CalendarRepository);
|
|
46
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Download a calendar from working days API and save it to DB.
|
|
48
|
+
* It will download all days between startDate and endDate inclusive,
|
|
49
|
+
* for example,
|
|
50
|
+
* startDate as 2025-01-01
|
|
51
|
+
* endDate as 2026-01-01
|
|
52
|
+
*/
|
|
53
|
+
fulfillCalendar(startDate: string, endDate: string): Promise<void>;
|
|
47
54
|
createDate(date: string, dateProp: IWorkingDaysApi): Promise<void>;
|
|
48
55
|
isWorkingDay(date: string): Promise<boolean>;
|
|
49
56
|
isLastWorkingDay(date: string): Promise<boolean>;
|
|
@@ -12,11 +12,18 @@ class CalendarService {
|
|
|
12
12
|
constructor(calendarRepository) {
|
|
13
13
|
this.calendarRepository = calendarRepository;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Download a calendar from working days API and save it to DB.
|
|
17
|
+
* It will download all days between startDate and endDate inclusive,
|
|
18
|
+
* for example,
|
|
19
|
+
* startDate as 2025-01-01
|
|
20
|
+
* endDate as 2026-01-01
|
|
21
|
+
*/
|
|
22
|
+
async fulfillCalendar(startDate, endDate) {
|
|
16
23
|
const getDays = () => {
|
|
17
24
|
const days = [];
|
|
18
|
-
const start = (0, dayjs_1.default)(
|
|
19
|
-
const end = (0, dayjs_1.default)(
|
|
25
|
+
const start = (0, dayjs_1.default)(startDate);
|
|
26
|
+
const end = (0, dayjs_1.default)(endDate);
|
|
20
27
|
for (let day = (0, dayjs_1.default)(start); day.isBefore(end); day = day.add(1, 'day')) {
|
|
21
28
|
days.push(day.format('YYYY-MM-DD'));
|
|
22
29
|
}
|
|
@@ -28,12 +28,19 @@ export class CalendarService {
|
|
|
28
28
|
) {
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Download a calendar from working days API and save it to DB.
|
|
33
|
+
* It will download all days between startDate and endDate inclusive,
|
|
34
|
+
* for example,
|
|
35
|
+
* startDate as 2025-01-01
|
|
36
|
+
* endDate as 2026-01-01
|
|
37
|
+
*/
|
|
38
|
+
async fulfillCalendar(startDate: string, endDate: string) {
|
|
32
39
|
|
|
33
40
|
const getDays = () => {
|
|
34
41
|
const days: string[] = [];
|
|
35
|
-
const start = dayjs(
|
|
36
|
-
const end = dayjs(
|
|
42
|
+
const start = dayjs(startDate);
|
|
43
|
+
const end = dayjs(endDate);
|
|
37
44
|
for (let day = dayjs(start); day.isBefore(end); day = day.add(1, 'day')) {
|
|
38
45
|
days.push(day.format('YYYY-MM-DD'));
|
|
39
46
|
}
|
|
@@ -155,7 +155,7 @@ export declare class LoanTransactionsService {
|
|
|
155
155
|
getTransactionReport(transactionIds: string[], borrowerId: string, effectiveDate: Date): Promise<{
|
|
156
156
|
transactionIdsToMark: any[];
|
|
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<{
|