gemcap-be-common 1.4.15 → 1.4.17

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.
@@ -50,6 +50,7 @@ export declare const EventMap: {
50
50
  readonly PASSWORD_RESET: "auth#PASSWORD_RESET";
51
51
  readonly SEND_PASSWORD_RESET_EMAIL: "auth#SEND_PASSWORD_RESET_EMAIL";
52
52
  readonly SET_NEW_PASSWORD: "auth#SET_NEW_PASSWORD";
53
+ readonly TWO_FA_RESET: "auth#TWO_FA_RESET";
53
54
  };
54
55
  };
55
56
  export type EventMapType = typeof EventMap;
@@ -53,5 +53,6 @@ exports.EventMap = {
53
53
  PASSWORD_RESET: 'auth#PASSWORD_RESET',
54
54
  SEND_PASSWORD_RESET_EMAIL: 'auth#SEND_PASSWORD_RESET_EMAIL',
55
55
  SET_NEW_PASSWORD: 'auth#SET_NEW_PASSWORD',
56
+ TWO_FA_RESET: 'auth#TWO_FA_RESET',
56
57
  },
57
58
  };
@@ -50,6 +50,7 @@ export const EventMap = {
50
50
  PASSWORD_RESET: 'auth#PASSWORD_RESET',
51
51
  SEND_PASSWORD_RESET_EMAIL: 'auth#SEND_PASSWORD_RESET_EMAIL',
52
52
  SET_NEW_PASSWORD: 'auth#SET_NEW_PASSWORD',
53
+ TWO_FA_RESET: 'auth#TWO_FA_RESET',
53
54
  },
54
55
  } as const;
55
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.4.15",
3
+ "version": "1.4.17",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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" | "items" | "fundingStatus"> | {
48
+ getAllBorrowersShortened(userAccess: IUserAccess): Promise<(Pick<IComplianceBorrowerDocument, "borrower" | "fundingStatus" | "items"> | {
49
49
  items: {
50
50
  instances: any[];
51
51
  item: import("../models/ComplianceItem.model").IComplianceItemDocument;
@@ -102,7 +102,7 @@ export declare class ComplianceBorrowersService {
102
102
  getBorrowerWithPlaidToken(): Promise<(mongoose.Document<unknown, {}, IComplianceBorrowerDocument> & IComplianceBorrowerDocument & {
103
103
  _id: mongoose.Types.ObjectId;
104
104
  })[]>;
105
- getBorrowerEmails(userAccess: any): Promise<{
105
+ getBorrowerEmails(userAccess: IUserAccess): Promise<{
106
106
  borrower: {
107
107
  _id: any;
108
108
  name: any;
@@ -119,7 +119,7 @@ class ComplianceBorrowersService {
119
119
  async getAllBorrowersShortened(userAccess) {
120
120
  const allComplianceBorrower = await BorrowerCompliance_model_1.BorrowerCompliance
121
121
  .find(userAccess.allBorrowers ? { isVisible: true } : {
122
- 'borrower': { $in: userAccess.borrowersAccess.map((b) => b.borrower) },
122
+ 'borrower': { $in: userAccess.borrowersAccess },
123
123
  isVisible: true,
124
124
  })
125
125
  .populate('borrower')
@@ -390,7 +390,7 @@ class ComplianceBorrowersService {
390
390
  }
391
391
  async getBorrowerEmails(userAccess) {
392
392
  const allComplianceBorrower = await BorrowerCompliance_model_1.BorrowerCompliance
393
- .find(userAccess.allBorrowers ? {} : { 'borrower': { $in: userAccess.borrowersAccess.map((b) => b.borrower) } })
393
+ .find(userAccess.allBorrowers ? {} : { 'borrower': { $in: userAccess.borrowersAccess } })
394
394
  .populate('borrower items.item')
395
395
  .collation({ locale: 'en' })
396
396
  .sort({ 'borrower.name': 1 });
@@ -129,12 +129,12 @@ export class ComplianceBorrowersService {
129
129
  return Promise.resolve({ ...ourBorrower, items });
130
130
  }
131
131
 
132
- async getAllBorrowersShortened(userAccess) {
132
+ async getAllBorrowersShortened(userAccess: IUserAccess) {
133
133
  type BorrowerComplianceShort = Pick<IComplianceBorrowerDocument, 'borrower' | 'fundingStatus' | 'items'>;
134
134
 
135
135
  const allComplianceBorrower: BorrowerComplianceShort[] = await BorrowerCompliance
136
136
  .find(userAccess.allBorrowers ? { isVisible: true } : {
137
- 'borrower': { $in: userAccess.borrowersAccess.map((b) => b.borrower) },
137
+ 'borrower': { $in: userAccess.borrowersAccess },
138
138
  isVisible: true,
139
139
  })
140
140
  .populate('borrower')
@@ -425,9 +425,9 @@ export class ComplianceBorrowersService {
425
425
  .select('+plaidAccessToken');
426
426
  }
427
427
 
428
- async getBorrowerEmails(userAccess) {
428
+ async getBorrowerEmails(userAccess: IUserAccess) {
429
429
  const allComplianceBorrower: IComplianceBorrowerDocument[] = await BorrowerCompliance
430
- .find(userAccess.allBorrowers ? {} : { 'borrower': { $in: userAccess.borrowersAccess.map((b) => b.borrower) } })
430
+ .find(userAccess.allBorrowers ? {} : { 'borrower': { $in: userAccess.borrowersAccess } })
431
431
  .populate('borrower items.item')
432
432
  .collation({ locale: 'en' })
433
433
  .sort({ 'borrower.name': 1 });
@@ -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 | Date | string[])[];
158
+ [x: string]: (string | number | string[] | Date)[];
159
159
  }[];
160
160
  }>;
161
161
  getBorrowerIdsForFile(transactionFileId: string): Promise<{