gemcap-be-common 1.4.213 → 1.4.215

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.
@@ -21,6 +21,7 @@ export declare const EVENT_KEYS: {
21
21
  readonly finance: {
22
22
  readonly REPORT_PER_ACCOUNT_REQUESTED: "finance.report.account.requested";
23
23
  readonly REPORT_CONSOLIDATED_REQUESTED: "finance.report.consolidated.requested";
24
+ readonly YIELD_RECALCULATION_REQUESTED: "finance.yield.recalculation.requested";
24
25
  };
25
26
  /**
26
27
  * ========= PORTFOLIO DOMAIN EVENTS =========
@@ -24,6 +24,7 @@ exports.EVENT_KEYS = {
24
24
  finance: {
25
25
  REPORT_PER_ACCOUNT_REQUESTED: 'finance.report.account.requested',
26
26
  REPORT_CONSOLIDATED_REQUESTED: 'finance.report.consolidated.requested',
27
+ YIELD_RECALCULATION_REQUESTED: 'finance.yield.recalculation.requested',
27
28
  },
28
29
  /**
29
30
  * ========= PORTFOLIO DOMAIN EVENTS =========
@@ -23,6 +23,7 @@ export const EVENT_KEYS = {
23
23
  finance: {
24
24
  REPORT_PER_ACCOUNT_REQUESTED: 'finance.report.account.requested',
25
25
  REPORT_CONSOLIDATED_REQUESTED: 'finance.report.consolidated.requested',
26
+ YIELD_RECALCULATION_REQUESTED: 'finance.yield.recalculation.requested',
26
27
  },
27
28
 
28
29
  /**
@@ -22,6 +22,9 @@ export declare const QUEUES: {
22
22
  readonly perAccount: "finance.report.per-account";
23
23
  readonly consolidated: "finance.report.consolidated";
24
24
  };
25
+ readonly yield: {
26
+ readonly recalculation: "finance.yield.recalculation";
27
+ };
25
28
  };
26
29
  readonly portfolio: {
27
30
  readonly email: {
@@ -25,6 +25,9 @@ exports.QUEUES = {
25
25
  perAccount: 'finance.report.per-account',
26
26
  consolidated: 'finance.report.consolidated',
27
27
  },
28
+ yield: {
29
+ recalculation: 'finance.yield.recalculation',
30
+ }
28
31
  },
29
32
  portfolio: {
30
33
  email: {
@@ -22,6 +22,9 @@ export const QUEUES = {
22
22
  perAccount: 'finance.report.per-account',
23
23
  consolidated: 'finance.report.consolidated',
24
24
  },
25
+ yield: {
26
+ recalculation: 'finance.yield.recalculation',
27
+ }
25
28
  },
26
29
  portfolio: {
27
30
  email: {
@@ -22,38 +22,52 @@
22
22
  /// <reference types="mongoose/types/validation" />
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
- import mongoose, { Document } from 'mongoose';
26
- import { ILoanTransactionDoc } from './LoanTransaction.model';
25
+ import mongoose from 'mongoose';
26
+ import { ILoanTransactionLean } from './LoanTransaction.model';
27
27
  export interface IPostponedTransaction {
28
28
  postponedToDate: string;
29
29
  transactionId: mongoose.Types.ObjectId;
30
30
  productId: mongoose.Types.ObjectId;
31
31
  }
32
- export interface IPostponedTransactionDoc extends Document, IPostponedTransaction {
32
+ export interface IPostponedTransactionDoc extends IPostponedTransaction, mongoose.Document {
33
+ _id: mongoose.Types.ObjectId;
34
+ createdAt: Date;
35
+ updatedAt: Date;
36
+ }
37
+ export interface IPostponedTransactionLean extends IPostponedTransaction {
38
+ _id: mongoose.Types.ObjectId;
39
+ createdAt: Date;
40
+ updatedAt: Date;
33
41
  }
34
- export interface IPostponedTransactionWithTransaction extends IPostponedTransactionDoc {
35
- transaction: ILoanTransactionDoc;
42
+ export interface IPostponedTransactionPlain extends Omit<IPostponedTransaction, 'transactionId' | 'productId'> {
43
+ _id: string;
44
+ transactionId: string;
45
+ productId: string;
36
46
  }
47
+ export interface IPostponedTransactionWithTransaction extends IPostponedTransactionLean {
48
+ transaction: ILoanTransactionLean;
49
+ }
50
+ export type TPostponedTransactionModel = mongoose.Model<IPostponedTransaction>;
37
51
  export declare const PostponedTransactionSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
38
52
  timestamps: false;
39
53
  }, {
40
- productId: mongoose.Types.ObjectId;
41
54
  transactionId: mongoose.Types.ObjectId;
55
+ productId: mongoose.Types.ObjectId;
42
56
  postponedToDate: string;
43
57
  __v?: number;
44
58
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
45
- productId: mongoose.Types.ObjectId;
46
59
  transactionId: mongoose.Types.ObjectId;
60
+ productId: mongoose.Types.ObjectId;
47
61
  postponedToDate: string;
48
62
  __v?: number;
49
63
  }>> & mongoose.FlatRecord<{
50
- productId: mongoose.Types.ObjectId;
51
64
  transactionId: mongoose.Types.ObjectId;
65
+ productId: mongoose.Types.ObjectId;
52
66
  postponedToDate: string;
53
67
  __v?: number;
54
68
  }> & {
55
69
  _id: mongoose.Types.ObjectId;
56
70
  }>;
57
- export declare const PostponedTransaction: mongoose.Model<IPostponedTransactionDoc, {}, {}, {}, mongoose.Document<unknown, {}, IPostponedTransactionDoc> & IPostponedTransactionDoc & {
71
+ export declare const PostponedTransaction: mongoose.Model<IPostponedTransactionDoc, {}, {}, {}, mongoose.Document<unknown, {}, IPostponedTransactionDoc> & IPostponedTransactionDoc & Required<{
58
72
  _id: mongoose.Types.ObjectId;
59
- }, any>;
73
+ }>, any>;
@@ -23,7 +23,7 @@ exports.PostponedTransactionSchema = new mongoose_1.default.Schema({
23
23
  },
24
24
  __v: {
25
25
  type: Number,
26
- select: false
26
+ select: false,
27
27
  },
28
28
  }, { timestamps: false });
29
29
  exports.PostponedTransaction = mongoose_1.default.model(_models_1.MODEL_NAMES.postponedTransactions, exports.PostponedTransactionSchema);
@@ -1,7 +1,7 @@
1
- import mongoose, { Document } from 'mongoose';
1
+ import mongoose from 'mongoose';
2
2
 
3
3
  import { MODEL_NAMES } from './_models';
4
- import { ILoanTransactionDoc } from './LoanTransaction.model';
4
+ import { ILoanTransactionLean } from './LoanTransaction.model';
5
5
 
6
6
  export interface IPostponedTransaction {
7
7
  postponedToDate: string;
@@ -9,13 +9,30 @@ export interface IPostponedTransaction {
9
9
  productId: mongoose.Types.ObjectId;
10
10
  }
11
11
 
12
- export interface IPostponedTransactionDoc extends Document, IPostponedTransaction {
12
+ export interface IPostponedTransactionDoc extends IPostponedTransaction, mongoose.Document {
13
+ _id: mongoose.Types.ObjectId;
14
+ createdAt: Date;
15
+ updatedAt: Date;
13
16
  }
14
17
 
15
- export interface IPostponedTransactionWithTransaction extends IPostponedTransactionDoc {
16
- transaction: ILoanTransactionDoc
18
+ export interface IPostponedTransactionLean extends IPostponedTransaction {
19
+ _id: mongoose.Types.ObjectId;
20
+ createdAt: Date;
21
+ updatedAt: Date;
17
22
  }
18
23
 
24
+ export interface IPostponedTransactionPlain extends Omit<IPostponedTransaction, 'transactionId' | 'productId'> {
25
+ _id: string;
26
+ transactionId: string;
27
+ productId: string;
28
+ }
29
+
30
+ export interface IPostponedTransactionWithTransaction extends IPostponedTransactionLean {
31
+ transaction: ILoanTransactionLean;
32
+ }
33
+
34
+ export type TPostponedTransactionModel = mongoose.Model<IPostponedTransaction>;
35
+
19
36
  export const PostponedTransactionSchema = new mongoose.Schema(
20
37
  {
21
38
  postponedToDate: {
@@ -34,10 +51,10 @@ export const PostponedTransactionSchema = new mongoose.Schema(
34
51
  },
35
52
  __v: {
36
53
  type: Number,
37
- select: false
54
+ select: false,
38
55
  },
39
56
  },
40
- { timestamps: false }
57
+ { timestamps: false },
41
58
  );
42
59
 
43
60
  export const PostponedTransaction = mongoose.model<IPostponedTransactionDoc>(MODEL_NAMES.postponedTransactions, PostponedTransactionSchema);
@@ -31,8 +31,8 @@ export declare const allSchemas: {
31
31
  createdAt: NativeDate;
32
32
  updatedAt: NativeDate;
33
33
  } & {
34
- order: number;
35
34
  bbcSheetId: import("mongoose").Types.ObjectId;
35
+ order: number;
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
- order: number;
49
48
  bbcSheetId: import("mongoose").Types.ObjectId;
49
+ order: number;
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
- order: number;
63
62
  bbcSheetId: import("mongoose").Types.ObjectId;
63
+ order: number;
64
64
  apDate: Date;
65
65
  amount: number;
66
66
  __v?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.4.213",
3
+ "version": "1.4.215",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -155,7 +155,7 @@ export declare class LoanTransactionsService {
155
155
  getTransactionReport(transactionIds: string[], borrowerId: string, effectiveDate: Date): Promise<{
156
156
  transactionIdsToMark: string[];
157
157
  transactions: {
158
- [x: string]: (string | number | string[] | Date)[];
158
+ [x: string]: (string | number | Date | string[])[];
159
159
  }[];
160
160
  }>;
161
161
  getBorrowerIdsForFile(transactionFileId: string): Promise<{