gemcap-be-common 1.4.74 → 1.4.76

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.
@@ -59,6 +59,11 @@ export declare const EventMap: {
59
59
  readonly finance: {
60
60
  readonly GENERATE_BANK_UPLOAD_REPORT: "finance#GENERATE_BANK_UPLOAD_REPORT";
61
61
  };
62
+ readonly portfolio: {
63
+ readonly CREATE_NOTE: "portfolio#CREATE_NOTE";
64
+ readonly DELETE_NOTE: "portfolio#DELETE_NOTE";
65
+ readonly UPDATE_NOTE: "portfolio#UPDATE_NOTE";
66
+ };
62
67
  };
63
68
  export type EventMapType = typeof EventMap;
64
69
  export type EventName = {
@@ -62,4 +62,9 @@ exports.EventMap = {
62
62
  finance: {
63
63
  GENERATE_BANK_UPLOAD_REPORT: 'finance#GENERATE_BANK_UPLOAD_REPORT',
64
64
  },
65
+ portfolio: {
66
+ CREATE_NOTE: 'portfolio#CREATE_NOTE',
67
+ DELETE_NOTE: 'portfolio#DELETE_NOTE',
68
+ UPDATE_NOTE: 'portfolio#UPDATE_NOTE',
69
+ },
65
70
  };
@@ -59,6 +59,11 @@ export const EventMap = {
59
59
  finance: {
60
60
  GENERATE_BANK_UPLOAD_REPORT: 'finance#GENERATE_BANK_UPLOAD_REPORT',
61
61
  },
62
+ portfolio: {
63
+ CREATE_NOTE: 'portfolio#CREATE_NOTE',
64
+ DELETE_NOTE: 'portfolio#DELETE_NOTE',
65
+ UPDATE_NOTE: 'portfolio#UPDATE_NOTE',
66
+ },
62
67
  } as const;
63
68
 
64
69
  export type EventMapType = typeof EventMap;
@@ -4,6 +4,7 @@ export declare const QueueMap: {
4
4
  readonly legacy: "goat_ms_legacy_queue";
5
5
  readonly auth: "goat_ms_auth";
6
6
  readonly finance: "goat_ms_finance";
7
+ readonly portfolio: "goat_ms_portfolio";
7
8
  };
8
9
  export type QueueMapType = typeof QueueMap;
9
10
  export type QueueName = QueueMapType[keyof QueueMapType];
@@ -7,4 +7,5 @@ exports.QueueMap = {
7
7
  legacy: 'goat_ms_legacy_queue', // goat_legacy_queue
8
8
  auth: 'goat_ms_auth', // goat_ms_auth
9
9
  finance: 'goat_ms_finance', // goat_ms_finance
10
+ portfolio: 'goat_ms_portfolio', // goat_ms_portfolio
10
11
  };
@@ -4,6 +4,7 @@ export const QueueMap = {
4
4
  legacy: 'goat_ms_legacy_queue', // goat_legacy_queue
5
5
  auth: 'goat_ms_auth', // goat_ms_auth
6
6
  finance: 'goat_ms_finance', // goat_ms_finance
7
+ portfolio: 'goat_ms_portfolio', // goat_ms_portfolio
7
8
  } as const;
8
9
 
9
10
  export type QueueMapType = typeof QueueMap;
@@ -64,10 +64,10 @@ export declare const BorrowerSchema: mongoose.Schema<any, mongoose.Model<any, an
64
64
  createdAt: NativeDate;
65
65
  updatedAt: NativeDate;
66
66
  } & {
67
- code: string;
68
67
  name: string;
69
- title: string;
70
68
  active: boolean;
69
+ code: string;
70
+ title: string;
71
71
  accrualStatus: boolean;
72
72
  __v?: number;
73
73
  organizationId?: mongoose.Types.ObjectId;
@@ -83,10 +83,10 @@ export declare const BorrowerSchema: mongoose.Schema<any, mongoose.Model<any, an
83
83
  createdAt: NativeDate;
84
84
  updatedAt: NativeDate;
85
85
  } & {
86
- code: string;
87
86
  name: string;
88
- title: string;
89
87
  active: boolean;
88
+ code: string;
89
+ title: string;
90
90
  accrualStatus: boolean;
91
91
  __v?: number;
92
92
  organizationId?: mongoose.Types.ObjectId;
@@ -102,10 +102,10 @@ export declare const BorrowerSchema: mongoose.Schema<any, mongoose.Model<any, an
102
102
  createdAt: NativeDate;
103
103
  updatedAt: NativeDate;
104
104
  } & {
105
- code: string;
106
105
  name: string;
107
- title: string;
108
106
  active: boolean;
107
+ code: string;
108
+ title: string;
109
109
  accrualStatus: boolean;
110
110
  __v?: number;
111
111
  organizationId?: mongoose.Types.ObjectId;
@@ -0,0 +1,61 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
25
+ import mongoose, { Model } from 'mongoose';
26
+ export interface IBorrowerNoteAttachment {
27
+ fileId: string;
28
+ fileName: string;
29
+ mimeType: string;
30
+ size: number;
31
+ }
32
+ export interface IBorrowerNote {
33
+ borrowerId: mongoose.Types.ObjectId;
34
+ text: string;
35
+ attachments: IBorrowerNoteAttachment[];
36
+ createdBy: string;
37
+ }
38
+ export interface IBorrowerNoteDoc extends IBorrowerNote, Document {
39
+ _id: mongoose.Types.ObjectId;
40
+ createdAt: Date;
41
+ updatedAt: Date;
42
+ }
43
+ export interface IBorrowerNoteLean extends IBorrowerNote {
44
+ _id: mongoose.Types.ObjectId;
45
+ createdAt: Date;
46
+ updatedAt: Date;
47
+ }
48
+ export interface IBorrowerNotePlain extends IBorrowerNote {
49
+ _id: string;
50
+ createdAt: Date;
51
+ updatedAt: Date;
52
+ }
53
+ export type BorrowerNoteModel = Model<IBorrowerNoteDoc>;
54
+ export declare const BorrowerNoteSchema: mongoose.Schema<IBorrowerNoteDoc, mongoose.Model<IBorrowerNoteDoc, any, any, any, mongoose.Document<unknown, any, IBorrowerNoteDoc> & IBorrowerNoteDoc & Required<{
55
+ _id: mongoose.Types.ObjectId;
56
+ }>, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IBorrowerNoteDoc, mongoose.Document<unknown, {}, mongoose.FlatRecord<IBorrowerNoteDoc>> & mongoose.FlatRecord<IBorrowerNoteDoc> & Required<{
57
+ _id: mongoose.Types.ObjectId;
58
+ }>>;
59
+ export declare const BorrowerNote: mongoose.Model<IBorrowerNoteDoc, {}, {}, {}, mongoose.Document<unknown, {}, IBorrowerNoteDoc> & IBorrowerNoteDoc & Required<{
60
+ _id: mongoose.Types.ObjectId;
61
+ }>, any>;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BorrowerNote = exports.BorrowerNoteSchema = void 0;
7
+ const mongoose_1 = __importDefault(require("mongoose"));
8
+ const _models_1 = require("./_models");
9
+ const BorrowerNoteAttachmentSchema = new mongoose_1.default.Schema({
10
+ fileId: {
11
+ type: String,
12
+ required: true,
13
+ },
14
+ fileName: {
15
+ type: String,
16
+ required: true,
17
+ },
18
+ mimeType: {
19
+ type: String,
20
+ required: false,
21
+ },
22
+ size: {
23
+ type: Number,
24
+ required: false,
25
+ },
26
+ });
27
+ exports.BorrowerNoteSchema = new mongoose_1.default.Schema({
28
+ borrowerId: {
29
+ type: mongoose_1.default.Schema.Types.ObjectId,
30
+ ref: _models_1.MODEL_NAMES.borrowers,
31
+ required: true,
32
+ index: true,
33
+ },
34
+ text: {
35
+ type: String,
36
+ required: true,
37
+ },
38
+ createdBy: {
39
+ type: String,
40
+ required: true,
41
+ },
42
+ attachments: [BorrowerNoteAttachmentSchema],
43
+ }, {
44
+ timestamps: true,
45
+ versionKey: false,
46
+ });
47
+ exports.BorrowerNote = mongoose_1.default.model(_models_1.MODEL_NAMES.borrowerNote, exports.BorrowerNoteSchema);
@@ -0,0 +1,79 @@
1
+ import mongoose, { Model } from 'mongoose';
2
+
3
+ import { MODEL_NAMES } from './_models';
4
+
5
+ export interface IBorrowerNoteAttachment {
6
+ fileId: string,
7
+ fileName: string,
8
+ mimeType: string,
9
+ size: number,
10
+ }
11
+
12
+ export interface IBorrowerNote {
13
+ borrowerId: mongoose.Types.ObjectId,
14
+ text: string,
15
+ attachments: IBorrowerNoteAttachment[],
16
+ createdBy: string,
17
+ }
18
+
19
+ export interface IBorrowerNoteDoc extends IBorrowerNote, Document {
20
+ _id: mongoose.Types.ObjectId;
21
+ createdAt: Date;
22
+ updatedAt: Date;
23
+ }
24
+
25
+ export interface IBorrowerNoteLean extends IBorrowerNote {
26
+ _id: mongoose.Types.ObjectId;
27
+ createdAt: Date;
28
+ updatedAt: Date;
29
+ }
30
+
31
+ export interface IBorrowerNotePlain extends IBorrowerNote {
32
+ _id: string;
33
+ createdAt: Date;
34
+ updatedAt: Date;
35
+ }
36
+
37
+ export type BorrowerNoteModel = Model<IBorrowerNoteDoc>;
38
+
39
+ const BorrowerNoteAttachmentSchema = new mongoose.Schema<IBorrowerNoteAttachment>({
40
+ fileId: {
41
+ type: String,
42
+ required: true,
43
+ },
44
+ fileName: {
45
+ type: String,
46
+ required: true,
47
+ },
48
+ mimeType: {
49
+ type: String,
50
+ required: false,
51
+ },
52
+ size: {
53
+ type: Number,
54
+ required: false,
55
+ },
56
+ });
57
+
58
+ export const BorrowerNoteSchema = new mongoose.Schema<IBorrowerNoteDoc>({
59
+ borrowerId: {
60
+ type: mongoose.Schema.Types.ObjectId,
61
+ ref: MODEL_NAMES.borrowers,
62
+ required: true,
63
+ index: true,
64
+ },
65
+ text: {
66
+ type: String,
67
+ required: true,
68
+ },
69
+ createdBy: {
70
+ type: String,
71
+ required: true,
72
+ },
73
+ attachments: [BorrowerNoteAttachmentSchema],
74
+ }, {
75
+ timestamps: true,
76
+ versionKey: false,
77
+ });
78
+
79
+ export const BorrowerNote = mongoose.model<IBorrowerNoteDoc>(MODEL_NAMES.borrowerNote, BorrowerNoteSchema);
@@ -33,6 +33,7 @@ export declare const MODEL_NAMES: {
33
33
  borrowerDataTerms: string;
34
34
  borrowerSettings: string;
35
35
  borrowerSummaries: string;
36
+ borrowerNote: string;
36
37
  calendarDays: string;
37
38
  cashAllocations: string;
38
39
  cashAllocationProducts: string;
package/models/_models.js CHANGED
@@ -36,6 +36,7 @@ exports.MODEL_NAMES = {
36
36
  borrowerDataTerms: 'borrower_data_terms',
37
37
  borrowerSettings: 'borrowerSettings',
38
38
  borrowerSummaries: 'borrower_summaries',
39
+ borrowerNote: 'borrower_notes',
39
40
  calendarDays: 'calendar_days',
40
41
  cashAllocations: 'cash_allocations',
41
42
  cashAllocationProducts: 'cash_allocation_products',
package/models/_models.ts CHANGED
@@ -1,6 +1,3 @@
1
- import { AppraiserModel } from './Appraiser.model';
2
- import { IAppraiserContact } from './AppraiserContact.model';
3
-
4
1
  export const MODEL_NAMES = {
5
2
  accountPayableItem: 'AccountPayableItem',
6
3
  allocatedBankTransactions: 'allocated_bank_transactions',
@@ -36,6 +33,7 @@ export const MODEL_NAMES = {
36
33
  borrowerDataTerms: 'borrower_data_terms',
37
34
  borrowerSettings: 'borrowerSettings',
38
35
  borrowerSummaries: 'borrower_summaries',
36
+ borrowerNote: 'borrower_notes',
39
37
  calendarDays: 'calendar_days',
40
38
  cashAllocations: 'cash_allocations',
41
39
  cashAllocationProducts: 'cash_allocation_products',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.4.74",
3
+ "version": "1.4.76",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {