gemcap-be-common 1.5.53 → 1.5.55

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.
@@ -72,8 +72,8 @@ export declare const BorrowerSchema: mongoose.Schema<any, mongoose.Model<any, an
72
72
  __v?: number;
73
73
  organizationId?: mongoose.Types.ObjectId;
74
74
  schemas?: mongoose.Types.DocumentArray<{
75
- type: string;
76
75
  name: string;
76
+ type: string;
77
77
  data: mongoose.Types.DocumentArray<{
78
78
  column: string;
79
79
  databaseTitle: string;
@@ -91,8 +91,8 @@ export declare const BorrowerSchema: mongoose.Schema<any, mongoose.Model<any, an
91
91
  __v?: number;
92
92
  organizationId?: mongoose.Types.ObjectId;
93
93
  schemas?: mongoose.Types.DocumentArray<{
94
- type: string;
95
94
  name: string;
95
+ type: string;
96
96
  data: mongoose.Types.DocumentArray<{
97
97
  column: string;
98
98
  databaseTitle: string;
@@ -110,8 +110,8 @@ export declare const BorrowerSchema: mongoose.Schema<any, mongoose.Model<any, an
110
110
  __v?: number;
111
111
  organizationId?: mongoose.Types.ObjectId;
112
112
  schemas?: mongoose.Types.DocumentArray<{
113
- type: string;
114
113
  name: string;
114
+ type: string;
115
115
  data: mongoose.Types.DocumentArray<{
116
116
  column: string;
117
117
  databaseTitle: string;
@@ -91,13 +91,13 @@ export declare const BorrowerComplianceSchema: mongoose.Schema<any, mongoose.Mod
91
91
  user?: string;
92
92
  }>;
93
93
  mainEmails: mongoose.Types.DocumentArray<{
94
- email?: string;
95
94
  title?: string;
95
+ email?: string;
96
96
  isActive?: boolean;
97
97
  }>;
98
98
  financialEmails: mongoose.Types.DocumentArray<{
99
- email?: string;
100
99
  title?: string;
100
+ email?: string;
101
101
  isActive?: boolean;
102
102
  }>;
103
103
  items: mongoose.Types.DocumentArray<{
@@ -105,8 +105,8 @@ export declare const BorrowerComplianceSchema: mongoose.Schema<any, mongoose.Mod
105
105
  updatedAt: NativeDate;
106
106
  } & {
107
107
  emailAddresses: mongoose.Types.DocumentArray<{
108
- email?: string;
109
108
  title?: string;
109
+ email?: string;
110
110
  isActive?: boolean;
111
111
  }>;
112
112
  instances: mongoose.Types.DocumentArray<{
@@ -124,8 +124,8 @@ export declare const BorrowerComplianceSchema: mongoose.Schema<any, mongoose.Mod
124
124
  submittedDate?: Date;
125
125
  status?: string;
126
126
  }>;
127
- startDate?: Date;
128
127
  item?: mongoose.Types.ObjectId;
128
+ startDate?: Date;
129
129
  frequency?: string;
130
130
  }>;
131
131
  __v?: number;
@@ -152,13 +152,13 @@ export declare const BorrowerComplianceSchema: mongoose.Schema<any, mongoose.Mod
152
152
  user?: string;
153
153
  }>;
154
154
  mainEmails: mongoose.Types.DocumentArray<{
155
- email?: string;
156
155
  title?: string;
156
+ email?: string;
157
157
  isActive?: boolean;
158
158
  }>;
159
159
  financialEmails: mongoose.Types.DocumentArray<{
160
- email?: string;
161
160
  title?: string;
161
+ email?: string;
162
162
  isActive?: boolean;
163
163
  }>;
164
164
  items: mongoose.Types.DocumentArray<{
@@ -166,8 +166,8 @@ export declare const BorrowerComplianceSchema: mongoose.Schema<any, mongoose.Mod
166
166
  updatedAt: NativeDate;
167
167
  } & {
168
168
  emailAddresses: mongoose.Types.DocumentArray<{
169
- email?: string;
170
169
  title?: string;
170
+ email?: string;
171
171
  isActive?: boolean;
172
172
  }>;
173
173
  instances: mongoose.Types.DocumentArray<{
@@ -185,8 +185,8 @@ export declare const BorrowerComplianceSchema: mongoose.Schema<any, mongoose.Mod
185
185
  submittedDate?: Date;
186
186
  status?: string;
187
187
  }>;
188
- startDate?: Date;
189
188
  item?: mongoose.Types.ObjectId;
189
+ startDate?: Date;
190
190
  frequency?: string;
191
191
  }>;
192
192
  __v?: number;
@@ -213,13 +213,13 @@ export declare const BorrowerComplianceSchema: mongoose.Schema<any, mongoose.Mod
213
213
  user?: string;
214
214
  }>;
215
215
  mainEmails: mongoose.Types.DocumentArray<{
216
- email?: string;
217
216
  title?: string;
217
+ email?: string;
218
218
  isActive?: boolean;
219
219
  }>;
220
220
  financialEmails: mongoose.Types.DocumentArray<{
221
- email?: string;
222
221
  title?: string;
222
+ email?: string;
223
223
  isActive?: boolean;
224
224
  }>;
225
225
  items: mongoose.Types.DocumentArray<{
@@ -227,8 +227,8 @@ export declare const BorrowerComplianceSchema: mongoose.Schema<any, mongoose.Mod
227
227
  updatedAt: NativeDate;
228
228
  } & {
229
229
  emailAddresses: mongoose.Types.DocumentArray<{
230
- email?: string;
231
230
  title?: string;
231
+ email?: string;
232
232
  isActive?: boolean;
233
233
  }>;
234
234
  instances: mongoose.Types.DocumentArray<{
@@ -246,8 +246,8 @@ export declare const BorrowerComplianceSchema: mongoose.Schema<any, mongoose.Mod
246
246
  submittedDate?: Date;
247
247
  status?: string;
248
248
  }>;
249
- startDate?: Date;
250
249
  item?: mongoose.Types.ObjectId;
250
+ startDate?: Date;
251
251
  frequency?: string;
252
252
  }>;
253
253
  __v?: number;
@@ -53,11 +53,11 @@ export interface IFinancialComplianceBorrowerDocumentWithMails extends IFinancia
53
53
  financialEmails: IEmailRecipient[];
54
54
  }
55
55
  export declare const FinancialComplianceBorrowerSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
56
- borrower: mongoose.Types.ObjectId;
57
56
  isDeleted: boolean;
57
+ borrower: mongoose.Types.ObjectId;
58
58
  __v?: number;
59
- dueDate?: Date;
60
59
  invoiceSentDate?: Date;
60
+ dueDate?: Date;
61
61
  stopFundingDate?: Date;
62
62
  lastReminderSentAt?: Date;
63
63
  accountClearedDate?: Date;
@@ -69,11 +69,11 @@ export declare const FinancialComplianceBorrowerSchema: mongoose.Schema<any, mon
69
69
  balanceOutstanding?: number;
70
70
  reminderCounter?: number;
71
71
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
72
- borrower: mongoose.Types.ObjectId;
73
72
  isDeleted: boolean;
73
+ borrower: mongoose.Types.ObjectId;
74
74
  __v?: number;
75
- dueDate?: Date;
76
75
  invoiceSentDate?: Date;
76
+ dueDate?: Date;
77
77
  stopFundingDate?: Date;
78
78
  lastReminderSentAt?: Date;
79
79
  accountClearedDate?: Date;
@@ -85,11 +85,11 @@ export declare const FinancialComplianceBorrowerSchema: mongoose.Schema<any, mon
85
85
  balanceOutstanding?: number;
86
86
  reminderCounter?: number;
87
87
  }>> & mongoose.FlatRecord<{
88
- borrower: mongoose.Types.ObjectId;
89
88
  isDeleted: boolean;
89
+ borrower: mongoose.Types.ObjectId;
90
90
  __v?: number;
91
- dueDate?: Date;
92
91
  invoiceSentDate?: Date;
92
+ dueDate?: Date;
93
93
  stopFundingDate?: Date;
94
94
  lastReminderSentAt?: Date;
95
95
  accountClearedDate?: Date;
@@ -81,11 +81,11 @@ export declare const LoanProductSchema: mongoose.Schema<any, mongoose.Model<any,
81
81
  createdAt: NativeDate;
82
82
  updatedAt: NativeDate;
83
83
  } & {
84
- borrowerId: mongoose.Types.ObjectId;
85
- type: string;
86
84
  name: string;
85
+ type: string;
87
86
  order: number;
88
87
  active: boolean;
88
+ borrowerId: mongoose.Types.ObjectId;
89
89
  code: string;
90
90
  startDate: Date;
91
91
  maturityDate: Date;
@@ -95,23 +95,23 @@ export declare const LoanProductSchema: mongoose.Schema<any, mongoose.Model<any,
95
95
  isParticipant: boolean;
96
96
  isDefaultPaymentOrder: boolean;
97
97
  __v?: number;
98
+ settlementCode?: string;
98
99
  masterCode?: string;
99
100
  payoffDate?: Date;
100
101
  minPercent?: number;
101
102
  maxPercent?: number;
102
103
  prepaymentDate?: Date;
103
104
  prepaymentTerms?: string;
104
- settlementCode?: string;
105
105
  deactivationDate?: Date;
106
106
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
107
107
  createdAt: NativeDate;
108
108
  updatedAt: NativeDate;
109
109
  } & {
110
- borrowerId: mongoose.Types.ObjectId;
111
- type: string;
112
110
  name: string;
111
+ type: string;
113
112
  order: number;
114
113
  active: boolean;
114
+ borrowerId: mongoose.Types.ObjectId;
115
115
  code: string;
116
116
  startDate: Date;
117
117
  maturityDate: Date;
@@ -121,23 +121,23 @@ export declare const LoanProductSchema: mongoose.Schema<any, mongoose.Model<any,
121
121
  isParticipant: boolean;
122
122
  isDefaultPaymentOrder: boolean;
123
123
  __v?: number;
124
+ settlementCode?: string;
124
125
  masterCode?: string;
125
126
  payoffDate?: Date;
126
127
  minPercent?: number;
127
128
  maxPercent?: number;
128
129
  prepaymentDate?: Date;
129
130
  prepaymentTerms?: string;
130
- settlementCode?: string;
131
131
  deactivationDate?: Date;
132
132
  }>> & mongoose.FlatRecord<{
133
133
  createdAt: NativeDate;
134
134
  updatedAt: NativeDate;
135
135
  } & {
136
- borrowerId: mongoose.Types.ObjectId;
137
- type: string;
138
136
  name: string;
137
+ type: string;
139
138
  order: number;
140
139
  active: boolean;
140
+ borrowerId: mongoose.Types.ObjectId;
141
141
  code: string;
142
142
  startDate: Date;
143
143
  maturityDate: Date;
@@ -147,13 +147,13 @@ export declare const LoanProductSchema: mongoose.Schema<any, mongoose.Model<any,
147
147
  isParticipant: boolean;
148
148
  isDefaultPaymentOrder: boolean;
149
149
  __v?: number;
150
+ settlementCode?: string;
150
151
  masterCode?: string;
151
152
  payoffDate?: Date;
152
153
  minPercent?: number;
153
154
  maxPercent?: number;
154
155
  prepaymentDate?: Date;
155
156
  prepaymentTerms?: string;
156
- settlementCode?: string;
157
157
  deactivationDate?: Date;
158
158
  }> & {
159
159
  _id: mongoose.Types.ObjectId;
@@ -24,7 +24,6 @@
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  import mongoose, { Model } from 'mongoose';
26
26
  export interface IOrganization {
27
- _id?: mongoose.Types.ObjectId;
28
27
  name: string;
29
28
  subfolder: string;
30
29
  isDefault?: boolean;
@@ -32,9 +31,19 @@ export interface IOrganization {
32
31
  export type IOrganizationStringified = {
33
32
  [K in keyof IOrganization]: K extends '_id' | 'productId' ? string : IOrganization[K];
34
33
  };
35
- type OrganizationModel = Model<IOrganization>;
36
- export declare const OrganizationSchema: mongoose.Schema<IOrganization, OrganizationModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IOrganization, mongoose.Document<unknown, {}, mongoose.FlatRecord<IOrganization>> & mongoose.FlatRecord<IOrganization> & Required<{
34
+ export type TOrganizationModel = Model<IOrganization>;
35
+ export type TOrganizationDoc = mongoose.HydratedDocument<IOrganization>;
36
+ export interface IOrganizationLean extends IOrganization {
37
37
  _id: mongoose.Types.ObjectId;
38
- }>>;
39
- export declare const Organization: OrganizationModel;
40
- export {};
38
+ createdAt: Date;
39
+ updatedAt: Date;
40
+ }
41
+ export interface IOrganizationPlain extends IOrganization {
42
+ _id: string;
43
+ createdAt: Date;
44
+ updatedAt: Date;
45
+ }
46
+ export declare const OrganizationSchema: mongoose.Schema<IOrganization, TOrganizationModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IOrganization, mongoose.Document<unknown, {}, mongoose.FlatRecord<IOrganization>> & mongoose.FlatRecord<IOrganization> & {
47
+ _id: mongoose.Types.ObjectId;
48
+ }>;
49
+ export declare const Organization: TOrganizationModel;
@@ -19,7 +19,7 @@ exports.OrganizationSchema = new mongoose_1.default.Schema({
19
19
  },
20
20
  isDefault: {
21
21
  type: Boolean,
22
- }
22
+ },
23
23
  }, {
24
24
  timestamps: { createdAt: true, updatedAt: false },
25
25
  });
@@ -3,7 +3,6 @@ import mongoose, { Model } from 'mongoose';
3
3
  import { MODEL_NAMES } from './_models';
4
4
 
5
5
  export interface IOrganization {
6
- _id?: mongoose.Types.ObjectId;
7
6
  name: string;
8
7
  subfolder: string;
9
8
  isDefault?: boolean;
@@ -13,9 +12,23 @@ export type IOrganizationStringified = {
13
12
  [K in keyof IOrganization]: K extends '_id' | 'productId' ? string : IOrganization[K];
14
13
  };
15
14
 
16
- type OrganizationModel = Model<IOrganization>;
15
+ export type TOrganizationModel = Model<IOrganization>;
17
16
 
18
- export const OrganizationSchema = new mongoose.Schema<IOrganization, OrganizationModel>(
17
+ export type TOrganizationDoc = mongoose.HydratedDocument<IOrganization>
18
+
19
+ export interface IOrganizationLean extends IOrganization {
20
+ _id: mongoose.Types.ObjectId;
21
+ createdAt: Date;
22
+ updatedAt: Date;
23
+ }
24
+
25
+ export interface IOrganizationPlain extends IOrganization {
26
+ _id: string;
27
+ createdAt: Date;
28
+ updatedAt: Date;
29
+ }
30
+
31
+ export const OrganizationSchema = new mongoose.Schema<IOrganization, TOrganizationModel>(
19
32
  {
20
33
  name: {
21
34
  type: String,
@@ -29,11 +42,11 @@ export const OrganizationSchema = new mongoose.Schema<IOrganization, Organizatio
29
42
  },
30
43
  isDefault: {
31
44
  type: Boolean,
32
- }
45
+ },
33
46
  },
34
47
  {
35
48
  timestamps: { createdAt: true, updatedAt: false },
36
49
  },
37
50
  );
38
51
 
39
- export const Organization = mongoose.model<IOrganization, OrganizationModel>(MODEL_NAMES.organizations, OrganizationSchema);
52
+ export const Organization = mongoose.model<IOrganization, TOrganizationModel>(MODEL_NAMES.organizations, OrganizationSchema);
@@ -52,18 +52,18 @@ export declare const PostponedTransactionSchema: mongoose.Schema<any, mongoose.M
52
52
  timestamps: false;
53
53
  }, {
54
54
  productId: mongoose.Types.ObjectId;
55
- postponedToDate: string;
56
55
  transactionId: mongoose.Types.ObjectId;
56
+ postponedToDate: string;
57
57
  __v?: number;
58
58
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
59
59
  productId: mongoose.Types.ObjectId;
60
- postponedToDate: string;
61
60
  transactionId: mongoose.Types.ObjectId;
61
+ postponedToDate: string;
62
62
  __v?: number;
63
63
  }>> & mongoose.FlatRecord<{
64
64
  productId: mongoose.Types.ObjectId;
65
- postponedToDate: string;
66
65
  transactionId: mongoose.Types.ObjectId;
66
+ postponedToDate: string;
67
67
  __v?: number;
68
68
  }> & {
69
69
  _id: mongoose.Types.ObjectId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.5.53",
3
+ "version": "1.5.55",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -46,9 +46,9 @@ export declare class BrokersService {
46
46
  getAllProductBrokers(): Promise<(import("mongoose").FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & Required<{
47
47
  _id: import("mongoose").Types.ObjectId;
48
48
  }>)[]>;
49
- getBorrowerBrokers(borrowerId: string): Promise<BrokerView[] | (import("mongoose").FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & Required<{
49
+ getBorrowerBrokers(borrowerId: string): Promise<(import("mongoose").FlattenMaps<import("../models/ProductBroker.model").IProductBrokerDoc> & Required<{
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[]>;
@@ -27,8 +27,8 @@ import { IOrganization } from '../models/Organization.model';
27
27
  export declare class OrganizationsService {
28
28
  getOrganizations(): Promise<IOrganization[]>;
29
29
  createInitialOrganizations(): Promise<void>;
30
- getDefaultOrganization(): Promise<import("mongoose").FlattenMaps<IOrganization> & Required<{
30
+ getDefaultOrganization(): Promise<import("mongoose").FlattenMaps<IOrganization> & {
31
31
  _id: import("mongoose").Types.ObjectId;
32
- }>>;
32
+ }>;
33
33
  getOrganizationForBorrower(borrowerId: string): Promise<IOrganization>;
34
34
  }