gemcap-be-common 1.4.111 → 1.4.113

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.
@@ -0,0 +1,11 @@
1
+ export declare const AiExchange: "ai.exchange";
2
+ export declare const AiRoutingKeys: {
3
+ readonly compliance: {
4
+ readonly findMatch: "AI.COMPLIANCE.FIND_MATCH";
5
+ };
6
+ };
7
+ export declare const AiQueues: {
8
+ readonly compliance: {
9
+ readonly main: "ai.compliance.queue";
10
+ };
11
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AiQueues = exports.AiRoutingKeys = exports.AiExchange = void 0;
4
+ exports.AiExchange = 'ai.exchange';
5
+ exports.AiRoutingKeys = {
6
+ compliance: {
7
+ findMatch: 'AI.COMPLIANCE.FIND_MATCH',
8
+ },
9
+ };
10
+ exports.AiQueues = {
11
+ compliance: {
12
+ main: 'ai.compliance.queue',
13
+ },
14
+ };
@@ -0,0 +1,13 @@
1
+ export const AiExchange = 'ai.exchange' as const;
2
+
3
+ export const AiRoutingKeys = {
4
+ compliance: {
5
+ findMatch: 'AI.COMPLIANCE.FIND_MATCH',
6
+ },
7
+ } as const;
8
+
9
+ export const AiQueues = {
10
+ compliance: {
11
+ main: 'ai.compliance.queue',
12
+ },
13
+ } as const;
@@ -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 recalc: {
40
- readonly UNLOCK_PRODUCT_BALANCE: "recalc#UNLOCK_PRODUCT_BALANCE";
41
- readonly PRODUCT_BALANCE: "recalc#PRODUCT_BALANCE";
42
- readonly STATEMENT_STATUS: "recalc#STATEMENT_STATUS";
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 auth: {
55
- readonly PASSWORD_RESET: "auth#PASSWORD_RESET";
56
- readonly SEND_PASSWORD_RESET_EMAIL: "auth#SEND_PASSWORD_RESET_EMAIL";
57
- readonly SET_NEW_PASSWORD: "auth#SET_NEW_PASSWORD";
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 portfolio: {
64
- readonly CREATE_NOTE: "portfolio#CREATE_NOTE";
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
- recalc: {
43
- UNLOCK_PRODUCT_BALANCE: 'recalc#UNLOCK_PRODUCT_BALANCE',
44
- PRODUCT_BALANCE: 'recalc#PRODUCT_BALANCE',
45
- STATEMENT_STATUS: 'recalc#STATEMENT_STATUS',
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
- auth: {
58
- PASSWORD_RESET: 'auth#PASSWORD_RESET',
59
- SEND_PASSWORD_RESET_EMAIL: 'auth#SEND_PASSWORD_RESET_EMAIL',
60
- SET_NEW_PASSWORD: 'auth#SET_NEW_PASSWORD',
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
- portfolio: {
67
- CREATE_NOTE: 'portfolio#CREATE_NOTE',
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
- recalc: {
40
- UNLOCK_PRODUCT_BALANCE: 'recalc#UNLOCK_PRODUCT_BALANCE',
41
- PRODUCT_BALANCE: 'recalc#PRODUCT_BALANCE',
42
- STATEMENT_STATUS: 'recalc#STATEMENT_STATUS',
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
- auth: {
55
- PASSWORD_RESET: 'auth#PASSWORD_RESET',
56
- SEND_PASSWORD_RESET_EMAIL: 'auth#SEND_PASSWORD_RESET_EMAIL',
57
- SET_NEW_PASSWORD: 'auth#SET_NEW_PASSWORD',
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
- portfolio: {
64
- CREATE_NOTE: 'portfolio#CREATE_NOTE',
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];
@@ -9,4 +9,5 @@ exports.QueueMap = {
9
9
  finance: 'goat_ms_finance', // goat_ms_finance
10
10
  portfolio: 'goat_ms_portfolio', // goat_ms_portfolio
11
11
  search: 'goat_ms_search', // goat_ms_search
12
+ ai: 'goat_ms_ai', // goat_ms_ai
12
13
  };
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.4.111",
3
+ "version": "1.4.113",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -16,7 +16,7 @@ const CashAllocationReference_model_1 = require("../models/CashAllocationReferen
16
16
  const CashAllocationProduct_model_1 = require("../models/CashAllocationProduct.model");
17
17
  const AllocatedBankTransaction_model_1 = require("../models/AllocatedBankTransaction.model");
18
18
  const AllocatedData_model_1 = require("../models/AllocatedData.model");
19
- const date_formats_contsants_1 = require("../constants/date-formats.contsants");
19
+ const date_formats_constants_1 = require("../constants/date-formats.constants");
20
20
  const useExternalUploader = false; // TODO keep only external upload
21
21
  const createCashAllocationReferencesOnUpload = false;
22
22
  class BankUploadedTransactionsService {
@@ -273,7 +273,7 @@ class BankUploadedTransactionsService {
273
273
  }
274
274
  async createAllocatedBankTransactions(date) {
275
275
  const cashAllocations = await this.getAllocatedTransactions(date);
276
- const allocatedData = await AllocatedData_model_1.AllocatedData.findOne({ date: (0, dayjs_1.default)(date).format(date_formats_contsants_1.MAIN_DATE_FORMAT) });
276
+ const allocatedData = await AllocatedData_model_1.AllocatedData.findOne({ date: (0, dayjs_1.default)(date).format(date_formats_constants_1.MAIN_DATE_FORMAT) });
277
277
  if (cashAllocations.length > 0 && (allocatedData && allocatedData.isLocked)) {
278
278
  return;
279
279
  }
@@ -456,7 +456,7 @@ class BankUploadedTransactionsService {
456
456
  }
457
457
  async updateLockStatus(date, isLocked) {
458
458
  const normalizedDate = (0, dayjs_1.default)(date).utcOffset(0).startOf('day');
459
- await AllocatedData_model_1.AllocatedData.updateOne({ date: normalizedDate.format(date_formats_contsants_1.MAIN_DATE_FORMAT) }, { isLocked }, { upsert: true });
459
+ await AllocatedData_model_1.AllocatedData.updateOne({ date: normalizedDate.format(date_formats_constants_1.MAIN_DATE_FORMAT) }, { isLocked }, { upsert: true });
460
460
  }
461
461
  }
462
462
  exports.BankUploadedTransactionsService = BankUploadedTransactionsService;
@@ -27,7 +27,7 @@ import {
27
27
  PreSplitUploadedBankTransactionWithInfo,
28
28
  } from '../models/AllocatedBankTransaction.model';
29
29
  import { AllocatedData } from '../models/AllocatedData.model';
30
- import { MAIN_DATE_FORMAT } from '../constants/date-formats.contsants';
30
+ import { MAIN_DATE_FORMAT } from '../constants/date-formats.constants';
31
31
  import { LoanTransactionsService } from './loan-transactions.service';
32
32
  import { CashAllocationService } from './cash-allocation.service';
33
33
  import { LoanStatementStatusService } from './loan-statement-status.service';