gemcap-be-common 1.3.59 → 1.3.60

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.
@@ -58,6 +58,7 @@ export interface ICRMProspectBase {
58
58
  name: string;
59
59
  industryId: mongoose.Types.ObjectId;
60
60
  status: EProspectStatus;
61
+ probability: number;
61
62
  revolver: ICRMProspectProduct;
62
63
  term: ICRMProspectProduct;
63
64
  }
@@ -190,7 +191,7 @@ export interface ICRMProspectBaseWithId extends ICRMProspectBase {
190
191
  export interface ICRMProspectWithId extends ICRMProspect {
191
192
  _id: string;
192
193
  }
193
- export type ICRMProspectExternal = Pick<ICRMProspectWithId, 'info' | 'files' | 'isLocked' | 'status' | '_id'> & {
194
+ export type ICRMProspectExternal = Pick<ICRMProspectWithId, 'info' | 'files' | 'isLocked' | 'status' | 'probability' | '_id'> & {
194
195
  auditorFiles: ICRMProspectFile[];
195
196
  };
196
197
  export type ICRMProspectExternalAuditors = Pick<ICRMProspectWithId, 'info' | 'files' | 'isLocked'> & {
@@ -14,6 +14,7 @@ exports.prospectFieldsDictionary = {
14
14
  name: 'Name',
15
15
  industry: 'Industry',
16
16
  status: 'Status',
17
+ probability: 'Probability',
17
18
  revolverAmount: 'Revolver Amount',
18
19
  termAmount: 'Term Amount',
19
20
  keyDates: {
@@ -275,6 +276,7 @@ exports.CRMProspectValidationSchema = joi_1.default.object({
275
276
  name: joi_1.default.string().required(),
276
277
  industryId: joi_1.default.string().required(),
277
278
  status: joi_1.default.string().valid(...Object.values(EProspectStatus)).required(),
279
+ probability: joi_1.default.number().required(),
278
280
  revolver: joi_1.default.object({
279
281
  commitment: joi_1.default.number(),
280
282
  expected: joi_1.default.number(),
@@ -369,6 +371,9 @@ const CRMProspectSchema = new mongoose_1.default.Schema({
369
371
  type: String,
370
372
  enum: Object.values(EProspectStatus),
371
373
  },
374
+ probability: {
375
+ type: Number,
376
+ },
372
377
  revolver: {
373
378
  commitment: {
374
379
  type: Number,
@@ -11,6 +11,7 @@ export const prospectFieldsDictionary: TDictionary = {
11
11
  name: 'Name',
12
12
  industry: 'Industry',
13
13
  status: 'Status',
14
+ probability: 'Probability',
14
15
  revolverAmount: 'Revolver Amount',
15
16
  termAmount: 'Term Amount',
16
17
  keyDates: {
@@ -68,6 +69,7 @@ export interface ICRMProspectBase {
68
69
  name: string;
69
70
  industryId: mongoose.Types.ObjectId;
70
71
  status: EProspectStatus;
72
+ probability: number;
71
73
  revolver: ICRMProspectProduct;
72
74
  term: ICRMProspectProduct;
73
75
  }
@@ -372,9 +374,9 @@ export interface ICRMProspectWithId extends ICRMProspect {
372
374
  _id: string;
373
375
  }
374
376
 
375
- export type ICRMProspectExternal = Pick<ICRMProspectWithId, 'info' | 'files' | 'isLocked' | 'status' | '_id'> & {
376
- auditorFiles: ICRMProspectFile[];
377
- }
377
+ export type ICRMProspectExternal =
378
+ Pick<ICRMProspectWithId, 'info' | 'files' | 'isLocked' | 'status' | 'probability' | '_id'>
379
+ & { auditorFiles: ICRMProspectFile[] }
378
380
 
379
381
  export type ICRMProspectExternalAuditors = Pick<ICRMProspectWithId, 'info' | 'files' | 'isLocked'> & {
380
382
  auditorFiles: ICRMProspectFile[];
@@ -419,6 +421,7 @@ export const CRMProspectValidationSchema = Joi.object({
419
421
  name: Joi.string().required(),
420
422
  industryId: Joi.string().required(),
421
423
  status: Joi.string().valid(...Object.values(EProspectStatus)).required(),
424
+ probability: Joi.number().required(),
422
425
  revolver: Joi.object({
423
426
  commitment: Joi.number(),
424
427
  expected: Joi.number(),
@@ -522,6 +525,9 @@ const CRMProspectSchema = new mongoose.Schema<ICRMProspect, CRMProspectModel>(
522
525
  type: String,
523
526
  enum: Object.values(EProspectStatus),
524
527
  },
528
+ probability: {
529
+ type: Number,
530
+ },
525
531
  revolver: {
526
532
  commitment: {
527
533
  type: Number,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.3.59",
3
+ "version": "1.3.60",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {