docta-package 1.2.60 → 1.2.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.
@@ -1,8 +1,6 @@
1
1
  import { ISessionDocument } from "../../models";
2
2
  import { PeriodOutputDto } from "./period";
3
- import { PatientOutputDto } from "./patient";
4
3
  import { UserOutputDto } from "./user";
5
- import { DoctorOutputDto } from "./doctor";
6
4
  interface ISessionConfigOutput {
7
5
  originalDoctorConsultationFeePerHour: number;
8
6
  platformPercentage: number;
@@ -13,13 +11,14 @@ export declare class SessionOutputDto {
13
11
  id: string;
14
12
  period: PeriodOutputDto;
15
13
  status: string;
14
+ doctorId: string | null;
15
+ patientId: string | null;
16
16
  isDeleted: boolean;
17
17
  createdAt: number;
18
18
  updatedAt: number;
19
19
  constructor(session: ISessionDocument);
20
20
  }
21
21
  export declare class SessionPatientOutputDto extends SessionOutputDto {
22
- doctor: DoctorOutputDto;
23
22
  pricing: {
24
23
  totalPrice: number;
25
24
  paymentApiPrice: number;
@@ -27,12 +26,12 @@ export declare class SessionPatientOutputDto extends SessionOutputDto {
27
26
  constructor(session: ISessionDocument);
28
27
  }
29
28
  export declare class SessionDoctorOutputDto extends SessionOutputDto {
30
- patient: PatientOutputDto;
31
- price: number;
29
+ pricing: {
30
+ doctorPrice: number;
31
+ };
32
32
  constructor(session: ISessionDocument);
33
33
  }
34
34
  export declare class SessionAdminOutputDto extends SessionOutputDto {
35
- patient: PatientOutputDto;
36
35
  pricing: {
37
36
  totalPrice: number;
38
37
  doctorPrice: number;
@@ -2,16 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SessionAdminOutputDto = exports.SessionDoctorOutputDto = exports.SessionPatientOutputDto = exports.SessionOutputDto = void 0;
4
4
  const period_1 = require("./period");
5
- const patient_1 = require("./patient");
6
5
  const user_1 = require("./user");
7
- const doctor_1 = require("./doctor");
8
6
  // Base DTO for everyone
9
7
  class SessionOutputDto {
10
8
  constructor(session) {
11
- var _a, _b;
9
+ var _a, _b, _c, _d, _e, _f;
12
10
  this.id = (_b = ((_a = session.id) !== null && _a !== void 0 ? _a : session._id)) === null || _b === void 0 ? void 0 : _b.toString();
13
11
  this.period = new period_1.PeriodOutputDto(session.period);
14
12
  this.status = session.status;
13
+ this.doctorId =
14
+ ((_d = ((_c = session.doctor._id) !== null && _c !== void 0 ? _c : session.doctor._id)) === null || _d === void 0 ? void 0 : _d.toString()) || null;
15
+ this.patientId =
16
+ ((_f = ((_e = session.patient._id) !== null && _e !== void 0 ? _e : session.patient._id)) === null || _f === void 0 ? void 0 : _f.toString()) || null;
15
17
  this.isDeleted = session.isDeleted;
16
18
  this.createdAt = session.createdAt;
17
19
  this.updatedAt = session.updatedAt;
@@ -22,7 +24,6 @@ exports.SessionOutputDto = SessionOutputDto;
22
24
  class SessionPatientOutputDto extends SessionOutputDto {
23
25
  constructor(session) {
24
26
  super(session); // call base constructor
25
- this.doctor = new doctor_1.DoctorOutputDto(session.doctor);
26
27
  this.pricing = {
27
28
  totalPrice: session.pricing.totalPrice,
28
29
  paymentApiPrice: session.pricing.paymentApiPrice,
@@ -34,8 +35,9 @@ exports.SessionPatientOutputDto = SessionPatientOutputDto;
34
35
  class SessionDoctorOutputDto extends SessionOutputDto {
35
36
  constructor(session) {
36
37
  super(session); // call base constructor
37
- this.patient = new patient_1.PatientOutputDto(session.patient);
38
- this.price = session.pricing.doctorPrice;
38
+ this.pricing = {
39
+ doctorPrice: session.pricing.doctorPrice,
40
+ };
39
41
  }
40
42
  }
41
43
  exports.SessionDoctorOutputDto = SessionDoctorOutputDto;
@@ -43,7 +45,6 @@ exports.SessionDoctorOutputDto = SessionDoctorOutputDto;
43
45
  class SessionAdminOutputDto extends SessionOutputDto {
44
46
  constructor(session) {
45
47
  super(session); // call base constructor
46
- this.patient = new patient_1.PatientOutputDto(session.patient);
47
48
  this.pricing = {
48
49
  totalPrice: session.pricing.totalPrice,
49
50
  doctorPrice: session.pricing.doctorPrice,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docta-package",
3
- "version": "1.2.60",
3
+ "version": "1.2.62",
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",