gemcap-be-common 1.4.46 → 1.4.47

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.
@@ -317,19 +317,26 @@ export type IProspectExternalAuditors = Pick<IProspectWithId, 'info' | 'isLocked
317
317
  auditorFiles: IProspectFile[];
318
318
  auditorSharedFiles: IProspectFile[];
319
319
  };
320
- type TProspectWithId<T = mongoose.Types.ObjectId | string> = Omit<IProspect, '_id'> & {
321
- _id: T;
322
- };
323
- export interface IProspectDoc extends TProspectWithId<mongoose.Types.ObjectId>, Document {
320
+ export interface IProspectDoc extends IProspect, Document {
321
+ _id: mongoose.Types.ObjectId;
322
+ createdAt: Date;
323
+ updatedAt: Date;
324
+ }
325
+ export interface IProspectLean extends IProspect {
324
326
  _id: mongoose.Types.ObjectId;
327
+ createdAt: Date;
328
+ updatedAt: Date;
325
329
  }
326
- export interface IProspectLean extends TProspectWithId<string | mongoose.Types.ObjectId> {
330
+ export interface IProspectPlain extends IProspect {
331
+ _id: string;
332
+ createdAt: Date;
333
+ updatedAt: Date;
327
334
  }
328
335
  export declare const baseFields: string[];
329
336
  export declare const ProspectInfoExternalValidationSchema: Joi.ObjectSchema<any>;
330
337
  export declare const ProspectInfoValidationSchema: Joi.ObjectSchema<any>;
331
338
  export declare const ProspectValidationSchema: Joi.ObjectSchema<any>;
332
- export type ProspectModel = Model<IProspectDoc, Record<string, never>, Record<string, never>, IProspectLean>;
339
+ export type ProspectModel = Model<IProspectDoc>;
333
340
  export declare const ProspectSchema: mongoose.Schema<IProspect, ProspectModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IProspect, mongoose.Document<unknown, {}, mongoose.FlatRecord<IProspect>> & mongoose.FlatRecord<IProspect> & {
334
341
  _id: mongoose.Types.ObjectId;
335
342
  }>;
@@ -576,13 +576,23 @@ export type IProspectExternalAuditors = Pick<IProspectWithId, 'info' | 'isLocked
576
576
  auditorSharedFiles: IProspectFile[];
577
577
  }
578
578
 
579
- type TProspectWithId<T = mongoose.Types.ObjectId | string> = Omit<IProspect, '_id'> & { _id: T };
579
+ export interface IProspectDoc extends IProspect, Document {
580
+ _id: mongoose.Types.ObjectId;
581
+ createdAt: Date;
582
+ updatedAt: Date;
583
+ }
580
584
 
581
- export interface IProspectDoc extends TProspectWithId<mongoose.Types.ObjectId>, Document {
585
+ export interface IProspectLean extends IProspect {
582
586
  _id: mongoose.Types.ObjectId;
587
+ createdAt: Date;
588
+ updatedAt: Date;
583
589
  }
584
590
 
585
- export interface IProspectLean extends TProspectWithId<string | mongoose.Types.ObjectId> {}
591
+ export interface IProspectPlain extends IProspect {
592
+ _id: string;
593
+ createdAt: Date;
594
+ updatedAt: Date;
595
+ }
586
596
 
587
597
  export const baseFields = ['_id', 'industry', 'status', 'revolverAmount', 'termAmount', 'keyDates'];
588
598
 
@@ -666,7 +676,7 @@ export const ProspectValidationSchema = Joi.object({
666
676
  acceptedFiles: Joi.array().items(Joi.string()).allow(null),
667
677
  }).concat(ProspectInfoValidationSchema);
668
678
 
669
- export type ProspectModel = Model<IProspectDoc, Record<string, never>, Record<string, never>, IProspectLean>;
679
+ export type ProspectModel = Model<IProspectDoc>;
670
680
 
671
681
  const contactSchema = new mongoose.Schema({
672
682
  name: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.4.46",
3
+ "version": "1.4.47",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {