docta-package 1.2.53 → 1.2.54

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.
@@ -19,7 +19,10 @@ export declare class SessionOutputDto {
19
19
  constructor(session: ISessionDocument);
20
20
  }
21
21
  export declare class SessionPatientOutputDto extends SessionOutputDto {
22
- price: number;
22
+ pricing: {
23
+ totalPrice: number;
24
+ platformPrice: number;
25
+ };
23
26
  constructor(session: ISessionDocument);
24
27
  }
25
28
  export declare class SessionDoctorOutputDto extends SessionOutputDto {
@@ -27,10 +30,12 @@ export declare class SessionDoctorOutputDto extends SessionOutputDto {
27
30
  constructor(session: ISessionDocument);
28
31
  }
29
32
  export declare class SessionAdminOutputDto extends SessionOutputDto {
30
- totalPrice: number;
31
- doctorPrice: number;
32
- paymentApiPrice: number;
33
- platformPrice: number;
33
+ pricing: {
34
+ totalPrice: number;
35
+ doctorPrice: number;
36
+ paymentApiPrice: number;
37
+ platformPrice: number;
38
+ };
34
39
  hasDoctorCollected: boolean;
35
40
  hasPlatformCollected: boolean;
36
41
  config: ISessionConfigOutput;
@@ -21,7 +21,10 @@ exports.SessionOutputDto = SessionOutputDto;
21
21
  class SessionPatientOutputDto extends SessionOutputDto {
22
22
  constructor(session) {
23
23
  super(session); // call base constructor
24
- this.price = session.totalPrice;
24
+ this.pricing = {
25
+ totalPrice: session.pricing.totalPrice,
26
+ platformPrice: session.pricing.platformPrice,
27
+ };
25
28
  }
26
29
  }
27
30
  exports.SessionPatientOutputDto = SessionPatientOutputDto;
@@ -29,7 +32,7 @@ exports.SessionPatientOutputDto = SessionPatientOutputDto;
29
32
  class SessionDoctorOutputDto extends SessionOutputDto {
30
33
  constructor(session) {
31
34
  super(session); // call base constructor
32
- this.price = session.doctorPrice;
35
+ this.price = session.pricing.doctorPrice;
33
36
  }
34
37
  }
35
38
  exports.SessionDoctorOutputDto = SessionDoctorOutputDto;
@@ -37,10 +40,12 @@ exports.SessionDoctorOutputDto = SessionDoctorOutputDto;
37
40
  class SessionAdminOutputDto extends SessionOutputDto {
38
41
  constructor(session) {
39
42
  super(session); // call base constructor
40
- this.totalPrice = session.totalPrice;
41
- this.doctorPrice = session.doctorPrice;
42
- this.paymentApiPrice = session.paymentApiPrice;
43
- this.platformPrice = session.platformPrice;
43
+ this.pricing = {
44
+ totalPrice: session.pricing.totalPrice,
45
+ doctorPrice: session.pricing.doctorPrice,
46
+ paymentApiPrice: session.pricing.paymentApiPrice,
47
+ platformPrice: session.pricing.platformPrice,
48
+ };
44
49
  this.hasDoctorCollected = session.hasDoctorCollected;
45
50
  this.hasPlatformCollected = session.hasPlatformCollected;
46
51
  this.config = {
@@ -19,10 +19,12 @@ export interface ISession extends IBaseModel {
19
19
  period: IPeriodDocument;
20
20
  patient: IPatientDocument;
21
21
  status: SessionStatus;
22
- totalPrice: number;
23
- doctorPrice: number;
24
- paymentApiPrice: number;
25
- platformPrice: number;
22
+ pricing: {
23
+ totalPrice: number;
24
+ doctorPrice: number;
25
+ paymentApiPrice: number;
26
+ platformPrice: number;
27
+ };
26
28
  hasDoctorCollected: boolean;
27
29
  hasPlatformCollected: boolean;
28
30
  meta: ISessionConfig;
@@ -22,7 +22,12 @@ const SessionSchema = new mongoose_1.Schema(Object.assign(Object.assign({}, base
22
22
  enum: Object.values(session_status_1.SessionStatus),
23
23
  default: session_status_1.SessionStatus.Created,
24
24
  required: true,
25
- }, totalPrice: { type: Number, required: true }, doctorPrice: { type: Number, required: true }, platformPrice: { type: Number, required: true }, paymentApiPrice: { type: Number, required: true }, meta: {
25
+ }, pricing: {
26
+ totalPrice: { type: Number, required: true },
27
+ doctorPrice: { type: Number, required: true },
28
+ platformPrice: { type: Number, required: true },
29
+ paymentApiPrice: { type: Number, required: true },
30
+ }, meta: {
26
31
  originalDoctorConsultationFeePerHour: { type: Number, required: true },
27
32
  platformPercentage: { type: Number, required: true },
28
33
  collectionPercentage: { type: Number, required: true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docta-package",
3
- "version": "1.2.53",
3
+ "version": "1.2.54",
4
4
  "description": "This package will contail all the required files to run the docta micro-service app",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",