gemcap-be-common 1.4.14 → 1.4.15
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/UserLog.model.d.ts +5 -4
- package/models/UserLog.model.ts +4 -2
- package/package.json +1 -1
- package/services/brokers.service.d.ts +2 -2
- package/services/compliance-borrowers.service.d.ts +1 -1
- package/services/loan-transactions.service.d.ts +1 -1
- package/services/user-logs.service.d.ts +2 -2
- package/services/user-logs.service.ts +4 -4
- package/services/users.service.d.ts +2 -2
- 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, { Model } from 'mongoose';
|
|
25
|
+
import mongoose, { Document, Model } from 'mongoose';
|
|
26
26
|
export declare enum ELogType {
|
|
27
27
|
TRANSACTIONS_UPLOAD = "TRANSACTIONS_UPLOAD",
|
|
28
28
|
COLLATERAL_UPLOAD = "COLLATERAL_UPLOAD",
|
|
@@ -44,7 +44,6 @@ export declare enum ELogActionType {
|
|
|
44
44
|
DELETE = "DELETE"
|
|
45
45
|
}
|
|
46
46
|
export interface IUserLog {
|
|
47
|
-
_id?: mongoose.Types.ObjectId;
|
|
48
47
|
logType: ELogType;
|
|
49
48
|
userId: string;
|
|
50
49
|
timestamp: Date;
|
|
@@ -53,12 +52,14 @@ export interface IUserLog {
|
|
|
53
52
|
recordCollection: string;
|
|
54
53
|
details: any;
|
|
55
54
|
}
|
|
55
|
+
export interface IUserLogDoc extends IUserLog, Document {
|
|
56
|
+
}
|
|
56
57
|
export interface IUserLogWithLookup extends IUserLog {
|
|
57
58
|
record?: any;
|
|
58
59
|
}
|
|
59
60
|
type UserLogModel = Model<IUserLog, {}, {}>;
|
|
60
|
-
export declare const UserLogSchema: mongoose.Schema<IUserLog, UserLogModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IUserLog, mongoose.Document<unknown, {}, mongoose.FlatRecord<IUserLog>> & mongoose.FlatRecord<IUserLog> &
|
|
61
|
+
export declare const UserLogSchema: mongoose.Schema<IUserLog, UserLogModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IUserLog, mongoose.Document<unknown, {}, mongoose.FlatRecord<IUserLog>> & mongoose.FlatRecord<IUserLog> & {
|
|
61
62
|
_id: mongoose.Types.ObjectId;
|
|
62
|
-
}
|
|
63
|
+
}>;
|
|
63
64
|
export declare const UserLog: UserLogModel;
|
|
64
65
|
export {};
|
package/models/UserLog.model.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import mongoose, { Model } from 'mongoose';
|
|
1
|
+
import mongoose, { Document, Model } from 'mongoose';
|
|
2
2
|
|
|
3
3
|
import { MODEL_NAMES } from './_models';
|
|
4
4
|
|
|
@@ -25,7 +25,6 @@ export enum ELogActionType {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export interface IUserLog {
|
|
28
|
-
_id?: mongoose.Types.ObjectId;
|
|
29
28
|
logType: ELogType;
|
|
30
29
|
userId: string;
|
|
31
30
|
timestamp: Date;
|
|
@@ -35,6 +34,9 @@ export interface IUserLog {
|
|
|
35
34
|
details: any;
|
|
36
35
|
}
|
|
37
36
|
|
|
37
|
+
export interface IUserLogDoc extends IUserLog, Document {
|
|
38
|
+
}
|
|
39
|
+
|
|
38
40
|
export interface IUserLogWithLookup extends IUserLog {
|
|
39
41
|
record?: any;
|
|
40
42
|
}
|
package/package.json
CHANGED
|
@@ -46,9 +46,9 @@ export declare class BrokersService {
|
|
|
46
46
|
getAllProductBrokers(): Promise<(import("mongoose").FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & {
|
|
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> & {
|
|
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[]>;
|
|
@@ -45,7 +45,7 @@ export declare class ComplianceBorrowersService {
|
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
getFullComplianceBorrowerById(complianceBorrowerId: string): Promise<any>;
|
|
48
|
-
getAllBorrowersShortened(userAccess: any): Promise<(Pick<IComplianceBorrowerDocument, "borrower" | "
|
|
48
|
+
getAllBorrowersShortened(userAccess: any): Promise<(Pick<IComplianceBorrowerDocument, "borrower" | "items" | "fundingStatus"> | {
|
|
49
49
|
items: {
|
|
50
50
|
instances: any[];
|
|
51
51
|
item: import("../models/ComplianceItem.model").IComplianceItemDocument;
|
|
@@ -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 | string[]
|
|
158
|
+
[x: string]: (string | number | Date | string[])[];
|
|
159
159
|
}[];
|
|
160
160
|
}>;
|
|
161
161
|
getBorrowerIdsForFile(transactionFileId: string): Promise<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ICreateLogParams } from '../db/user-logs.db';
|
|
2
|
-
import {
|
|
2
|
+
import { IUserLogDoc, IUserLogWithLookup } from '../models/UserLog.model';
|
|
3
3
|
import { BanksService } from './banks.service';
|
|
4
4
|
import { BorrowersDB } from './borrowers.db';
|
|
5
5
|
import { LoanChargesService } from './loan-charges.service';
|
|
@@ -17,7 +17,7 @@ export declare class UserLogsService {
|
|
|
17
17
|
createUserLog(params: ICreateLogParams): Promise<void>;
|
|
18
18
|
filterByBorrower(logs: IUserLogWithLookup[], borrowerId: string): Promise<IUserLogWithLookup[]>;
|
|
19
19
|
replaceBorrowers(logs: IUserLogWithLookup[]): Promise<void[]>;
|
|
20
|
-
performDynamicLookup(record:
|
|
20
|
+
performDynamicLookup(record: IUserLogDoc): Promise<IUserLogWithLookup>;
|
|
21
21
|
getLogs(filter: IUserLogFilter): Promise<IUserLogWithLookup[]>;
|
|
22
22
|
getDocumentLogs(documentId: string): Promise<IUserLogWithLookup[]>;
|
|
23
23
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import mongoose from 'mongoose';
|
|
2
2
|
|
|
3
3
|
import { createLog, ICreateLogParams } from '../db/user-logs.db';
|
|
4
|
-
import { ELogType,
|
|
4
|
+
import { ELogType, IUserLogDoc, IUserLogWithLookup, UserLog } from '../models/UserLog.model';
|
|
5
5
|
import { DeletedRecord } from '../models/DeletedRecords.model';
|
|
6
6
|
|
|
7
7
|
import { BanksService } from './banks.service';
|
|
@@ -82,7 +82,7 @@ export class UserLogsService {
|
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
async performDynamicLookup(record:
|
|
85
|
+
async performDynamicLookup(record: IUserLogDoc): Promise<IUserLogWithLookup> {
|
|
86
86
|
try {
|
|
87
87
|
const { _id, recordCollection } = record;
|
|
88
88
|
if (!recordCollection) {
|
|
@@ -132,7 +132,7 @@ export class UserLogsService {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
async getLogs(filter: IUserLogFilter) {
|
|
135
|
-
const logs = await UserLog.aggregate<
|
|
135
|
+
const logs = await UserLog.aggregate<IUserLogDoc>([
|
|
136
136
|
{
|
|
137
137
|
$match: {
|
|
138
138
|
$and: [
|
|
@@ -157,7 +157,7 @@ export class UserLogsService {
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
async getDocumentLogs(documentId: string) {
|
|
160
|
-
const logs = await UserLog.aggregate<
|
|
160
|
+
const logs = await UserLog.aggregate<IUserLogDoc>([
|
|
161
161
|
{
|
|
162
162
|
$match: {
|
|
163
163
|
$and: [
|
|
@@ -43,8 +43,8 @@ export declare class UsersService {
|
|
|
43
43
|
[key: string]: string | number | boolean;
|
|
44
44
|
}): Promise<void>;
|
|
45
45
|
getUserAccess(userId: string): Promise<IUserAccess>;
|
|
46
|
-
getUserLogByDate(userId: string, date: Date): Promise<import("mongoose").FlattenMaps<import("../models/UserLog.model").IUserLog> &
|
|
46
|
+
getUserLogByDate(userId: string, date: Date): Promise<import("mongoose").FlattenMaps<import("../models/UserLog.model").IUserLog> & {
|
|
47
47
|
_id: import("mongoose").Types.ObjectId;
|
|
48
|
-
}
|
|
48
|
+
}>;
|
|
49
49
|
}
|
|
50
50
|
export {};
|