gemcap-be-common 1.4.43 → 1.4.45

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,13 +317,19 @@ export type IProspectExternalAuditors = Pick<IProspectWithId, 'info' | 'isLocked
317
317
  auditorFiles: IProspectFile[];
318
318
  auditorSharedFiles: IProspectFile[];
319
319
  };
320
- export interface IProspectDoc extends IProspect, Document {
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 {
324
+ _id: mongoose.Types.ObjectId;
325
+ }
326
+ export interface IProspectLean extends TProspectWithId<string> {
321
327
  }
322
328
  export declare const baseFields: string[];
323
329
  export declare const ProspectInfoExternalValidationSchema: Joi.ObjectSchema<any>;
324
330
  export declare const ProspectInfoValidationSchema: Joi.ObjectSchema<any>;
325
331
  export declare const ProspectValidationSchema: Joi.ObjectSchema<any>;
326
- export type ProspectModel = Model<IProspect, object, object>;
332
+ export type ProspectModel = Model<IProspectDoc, Record<string, never>, Record<string, never>, IProspectLean>;
327
333
  export declare const ProspectSchema: mongoose.Schema<IProspect, ProspectModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IProspect, mongoose.Document<unknown, {}, mongoose.FlatRecord<IProspect>> & mongoose.FlatRecord<IProspect> & {
328
334
  _id: mongoose.Types.ObjectId;
329
335
  }>;
@@ -426,7 +426,7 @@ export const externalProspectInitialInfo = (): IProspectExternalNew => ({
426
426
  ],
427
427
  [ExternalProspectStageTwoTables.accountsReceivables]: [
428
428
  {
429
- _id:getUUID(),
429
+ _id: getUUID(),
430
430
  _sharepointFolder: 'accountsPayables',
431
431
  title: 'Excel Format: Current and past 12 months A/P aging report by invoice date',
432
432
  },
@@ -576,9 +576,14 @@ export type IProspectExternalAuditors = Pick<IProspectWithId, 'info' | 'isLocked
576
576
  auditorSharedFiles: IProspectFile[];
577
577
  }
578
578
 
579
- export interface IProspectDoc extends IProspect, Document {
579
+ type TProspectWithId<T = mongoose.Types.ObjectId | string> = Omit<IProspect, '_id'> & { _id: T };
580
+
581
+ export interface IProspectDoc extends TProspectWithId<mongoose.Types.ObjectId>, Document {
582
+ _id: mongoose.Types.ObjectId;
580
583
  }
581
584
 
585
+ export interface IProspectLean extends TProspectWithId<string> {}
586
+
582
587
  export const baseFields = ['_id', 'industry', 'status', 'revolverAmount', 'termAmount', 'keyDates'];
583
588
 
584
589
  const ProspectInfoRowValidationSchema = Joi.object({
@@ -661,7 +666,7 @@ export const ProspectValidationSchema = Joi.object({
661
666
  acceptedFiles: Joi.array().items(Joi.string()).allow(null),
662
667
  }).concat(ProspectInfoValidationSchema);
663
668
 
664
- export type ProspectModel = Model<IProspect, object, object>;
669
+ export type ProspectModel = Model<IProspectDoc, Record<string, never>, Record<string, never>, IProspectLean>;
665
670
 
666
671
  const contactSchema = new mongoose.Schema({
667
672
  name: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.4.43",
3
+ "version": "1.4.45",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {