gemcap-be-common 1.5.61 → 1.5.62

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.
@@ -24,21 +24,23 @@
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  import mongoose from 'mongoose';
26
26
  export interface IParticipation {
27
- loanProductId: mongoose.Types.ObjectId;
27
+ loanProductId: string;
28
28
  settlementFrequency: string;
29
29
  settlementDate: string;
30
30
  }
31
- export type TParticipationDoc = mongoose.HydratedDocument<IParticipation>;
32
- export interface IParticipationLean extends IParticipation {
31
+ export interface IParticipationMongo extends Omit<IParticipation, 'loanProductId'> {
32
+ loanProductId: mongoose.Types.ObjectId;
33
+ }
34
+ export type TParticipationDoc = mongoose.HydratedDocument<IParticipationMongo>;
35
+ export interface IParticipationLean extends IParticipationMongo {
33
36
  _id: mongoose.Types.ObjectId;
34
37
  createdAt: Date;
35
38
  updatedAt: Date;
36
39
  }
37
- export interface IParticipationPlain extends Omit<IParticipation, 'loanProductId'> {
40
+ export interface IParticipationPlain extends IParticipation {
38
41
  _id: string;
39
- loanProductId: string;
40
42
  }
41
- export type TParticipationModel = mongoose.Model<IParticipation>;
43
+ export type TParticipationModel = mongoose.Model<IParticipationMongo>;
42
44
  export declare const ParticipationSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
43
45
  timestamps: true;
44
46
  }, {
@@ -68,12 +70,6 @@ export declare const ParticipationSchema: mongoose.Schema<any, mongoose.Model<an
68
70
  }> & {
69
71
  _id: mongoose.Types.ObjectId;
70
72
  }>;
71
- export declare const Participation: mongoose.Model<mongoose.Document<unknown, {}, IParticipation> & IParticipation & {
72
- _id: mongoose.Types.ObjectId;
73
- }, {}, {}, {}, mongoose.Document<unknown, {}, mongoose.Document<unknown, {}, IParticipation> & IParticipation & {
74
- _id: mongoose.Types.ObjectId;
75
- }> & mongoose.Document<unknown, {}, IParticipation> & IParticipation & {
76
- _id: mongoose.Types.ObjectId;
77
- } & Required<{
73
+ export declare const Participation: mongoose.Model<IParticipationMongo, {}, {}, {}, mongoose.Document<unknown, {}, IParticipationMongo> & IParticipationMongo & {
78
74
  _id: mongoose.Types.ObjectId;
79
- }>, any>;
75
+ }, any>;
@@ -3,25 +3,28 @@ import mongoose from 'mongoose';
3
3
  import { MODEL_NAMES } from './_models';
4
4
 
5
5
  export interface IParticipation {
6
- loanProductId: mongoose.Types.ObjectId;
7
- settlementFrequency : string;
6
+ loanProductId: string;
7
+ settlementFrequency: string;
8
8
  settlementDate: string;
9
9
  }
10
10
 
11
- export type TParticipationDoc = mongoose.HydratedDocument<IParticipation>;
11
+ export interface IParticipationMongo extends Omit<IParticipation, 'loanProductId'> {
12
+ loanProductId: mongoose.Types.ObjectId;
13
+ }
14
+
15
+ export type TParticipationDoc = mongoose.HydratedDocument<IParticipationMongo>;
12
16
 
13
- export interface IParticipationLean extends IParticipation {
17
+ export interface IParticipationLean extends IParticipationMongo {
14
18
  _id: mongoose.Types.ObjectId;
15
19
  createdAt: Date;
16
20
  updatedAt: Date;
17
21
  }
18
22
 
19
- export interface IParticipationPlain extends Omit<IParticipation, 'loanProductId'> {
23
+ export interface IParticipationPlain extends IParticipation {
20
24
  _id: string;
21
- loanProductId: string;
22
25
  }
23
26
 
24
- export type TParticipationModel = mongoose.Model<IParticipation>;
27
+ export type TParticipationModel = mongoose.Model<IParticipationMongo>;
25
28
 
26
29
  export const ParticipationSchema = new mongoose.Schema(
27
30
  {
@@ -43,4 +46,4 @@ export const ParticipationSchema = new mongoose.Schema(
43
46
  { timestamps: true },
44
47
  );
45
48
 
46
- export const Participation = mongoose.model<TParticipationDoc>(MODEL_NAMES.participations, ParticipationSchema);
49
+ export const Participation = mongoose.model<IParticipationMongo>(MODEL_NAMES.participations, ParticipationSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.5.61",
3
+ "version": "1.5.62",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {