docta-package 1.2.47 → 1.2.49

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.
@@ -8,7 +8,7 @@ export declare class CreateDoctorDto {
8
8
  email: string;
9
9
  specialtyId: string;
10
10
  biography?: string;
11
- consultationFee?: number;
11
+ consultationFeePerHour?: number;
12
12
  timezone: string;
13
13
  }
14
14
  export declare class ActivateDoctorAccountDto {
@@ -45,7 +45,7 @@ __decorate([
45
45
  (0, class_validator_1.IsNumber)(),
46
46
  (0, class_validator_1.Min)(0),
47
47
  __metadata("design:type", Number)
48
- ], CreateDoctorDto.prototype, "consultationFee", void 0);
48
+ ], CreateDoctorDto.prototype, "consultationFeePerHour", void 0);
49
49
  __decorate([
50
50
  (0, class_validator_1.IsString)(),
51
51
  (0, class_validator_1.IsNotEmpty)(),
@@ -15,7 +15,7 @@ export declare class DoctorOutputDto {
15
15
  biography: string | null;
16
16
  slug: string;
17
17
  isActive: boolean;
18
- consultationFee: number | null;
18
+ consultationFeePerHour: number | null;
19
19
  isVerified: boolean;
20
20
  isVisible: boolean;
21
21
  photo: string | null;
@@ -20,7 +20,7 @@ class DoctorOutputDto {
20
20
  this.slug = doctor.slug;
21
21
  this.biography = doctor.biography || null;
22
22
  this.isActive = doctor.isActive;
23
- this.consultationFee = (_a = doctor.consultationFee) !== null && _a !== void 0 ? _a : null;
23
+ this.consultationFeePerHour = (_a = doctor.consultationFeePerHour) !== null && _a !== void 0 ? _a : null;
24
24
  this.isVerified = doctor.isVerified;
25
25
  this.isVisible = doctor.isVisible;
26
26
  this.photo = doctor.photo || null;
@@ -3,8 +3,10 @@ import { PeriodOutputDto } from "./period";
3
3
  import { PatientOutputDto } from "./patient";
4
4
  import { UserOutputDto } from "./user";
5
5
  interface ISessionConfigOutput {
6
+ originalDoctorConsultationFeePerHour: number;
7
+ platformPercentage: number;
6
8
  collectionPercentage: number;
7
- distributionPercentage: number;
9
+ disbursementPercentage: number;
8
10
  }
9
11
  export declare class SessionOutputDto {
10
12
  id: string;
@@ -44,8 +44,10 @@ class SessionAdminOutputDto extends SessionOutputDto {
44
44
  this.hasDoctorCollected = session.hasDoctorCollected;
45
45
  this.hasPlatformCollected = session.hasPlatformCollected;
46
46
  this.config = {
47
+ originalDoctorConsultationFeePerHour: session.config.originalDoctorConsultationFeePerHour,
48
+ platformPercentage: session.config.platformPercentage,
47
49
  collectionPercentage: session.config.collectionPercentage,
48
- distributionPercentage: session.config.distributionPercentage,
50
+ disbursementPercentage: session.config.disbursementPercentage,
49
51
  };
50
52
  this.createdBy = session.createdBy
51
53
  ? new user_1.UserOutputDto(session.createdBy)
@@ -28,5 +28,9 @@ export declare enum EnumStatusCode {
28
28
  OVERLAP_EXISTS = "OVERLAP_EXISTS",
29
29
  BOLD_TIME_ERROR = "BOLD_TIME_ERROR",
30
30
  LOGGED_IN_SUCCESSFULLY = "LOGGED_IN_SUCCESSFULLY",
31
- NOT_SAME_DAY = "NOT_SAME_DAY"
31
+ NOT_SAME_DAY = "NOT_SAME_DAY",
32
+ PERIOD_OCCUPIED = "PERIOD_OCCUPIED",
33
+ PATIENT_NOT_FOUND = "PATIENT_NOT_FOUND",
34
+ PERIOD_NOT_FOUND = "PERIOD_NOT_FOUND",
35
+ PERIOD_PASSED = "PERIOD_PASSED"
32
36
  }
@@ -33,4 +33,8 @@ var EnumStatusCode;
33
33
  EnumStatusCode["BOLD_TIME_ERROR"] = "BOLD_TIME_ERROR";
34
34
  EnumStatusCode["LOGGED_IN_SUCCESSFULLY"] = "LOGGED_IN_SUCCESSFULLY";
35
35
  EnumStatusCode["NOT_SAME_DAY"] = "NOT_SAME_DAY";
36
+ EnumStatusCode["PERIOD_OCCUPIED"] = "PERIOD_OCCUPIED";
37
+ EnumStatusCode["PATIENT_NOT_FOUND"] = "PATIENT_NOT_FOUND";
38
+ EnumStatusCode["PERIOD_NOT_FOUND"] = "PERIOD_NOT_FOUND";
39
+ EnumStatusCode["PERIOD_PASSED"] = "PERIOD_PASSED";
36
40
  })(EnumStatusCode || (exports.EnumStatusCode = EnumStatusCode = {}));
@@ -15,7 +15,7 @@ export interface IDoctor extends IBaseModel {
15
15
  user: IUserDocument;
16
16
  specialty: ISpecialtyDocument;
17
17
  biography: string;
18
- consultationFee: number;
18
+ consultationFeePerHour: number;
19
19
  isVerified: boolean;
20
20
  isVisible: boolean;
21
21
  isDeactivatedByAdmin: boolean;
@@ -29,7 +29,7 @@ const DoctorSchema = new mongoose_1.Schema(Object.assign(Object.assign({}, base_
29
29
  type: mongoose_1.Schema.Types.ObjectId,
30
30
  ref: specialty_1.SpecialtyModel,
31
31
  required: true,
32
- }, name: { type: String, required: true, trim: true }, biography: { type: String, required: false }, slug: { type: String, required: true, unique: true, trim: true }, isActive: { type: Boolean, default: false }, consultationFee: { type: Number, required: false }, isVerified: { type: Boolean, default: false }, isVisible: { type: Boolean, default: true }, isDeactivatedByAdmin: { type: Boolean, default: false }, photo: { type: String, required: false }, educations: { type: [education_1.EducationSchema], required: true, default: [] }, positions: { type: [position_1.PositionSchema], required: true, default: [] }, languages: { type: [language_1.LanguageSchema], required: true, default: [] }, faqs: { type: [faq_1.FaqSchema], required: true, default: [] }, expertises: {
32
+ }, name: { type: String, required: true, trim: true }, biography: { type: String, required: false }, slug: { type: String, required: true, unique: true, trim: true }, isActive: { type: Boolean, default: false }, consultationFeePerHour: { type: Number, required: false }, isVerified: { type: Boolean, default: false }, isVisible: { type: Boolean, default: true }, isDeactivatedByAdmin: { type: Boolean, default: false }, photo: { type: String, required: false }, educations: { type: [education_1.EducationSchema], required: true, default: [] }, positions: { type: [position_1.PositionSchema], required: true, default: [] }, languages: { type: [language_1.LanguageSchema], required: true, default: [] }, faqs: { type: [faq_1.FaqSchema], required: true, default: [] }, expertises: {
33
33
  type: [{ type: mongoose_1.Schema.Types.ObjectId, ref: expertise_1.ExpertiseModel }],
34
34
  required: true,
35
35
  default: [],
@@ -7,8 +7,10 @@ import { SessionStatus } from "../enums/session.status";
7
7
  * Interface for session configuration percentages
8
8
  */
9
9
  export interface ISessionConfig {
10
+ originalDoctorConsultationFeePerHour: number;
11
+ platformPercentage: number;
10
12
  collectionPercentage: number;
11
- distributionPercentage: number;
13
+ disbursementPercentage: number;
12
14
  }
13
15
  /**
14
16
  * Session interface
@@ -22,9 +22,11 @@ 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 }, hasDoctorCollected: { type: Boolean, required: true, default: false }, hasPlatformCollected: { type: Boolean, required: true, default: false }, config: {
25
+ }, totalPrice: { type: Number, required: true }, doctorPrice: { type: Number, required: true }, platformPrice: { type: Number, required: true }, paymentApiPrice: { type: Number, required: true }, config: {
26
+ originalDoctorConsultationFeePerHour: { type: Number, required: true },
27
+ platformPercentage: { type: Number, required: true },
26
28
  collectionPercentage: { type: Number, required: true },
27
- distributionPercentage: { type: Number, required: true },
28
- } }));
29
+ disbursementPercentage: { type: Number, required: true },
30
+ }, hasDoctorCollected: { type: Boolean, required: true, default: false }, hasPlatformCollected: { type: Boolean, required: true, default: false } }));
29
31
  SessionSchema.plugin(base_1.BaseSchemaPlugin);
30
32
  exports.SessionModel = (0, mongoose_1.model)("Session", SessionSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docta-package",
3
- "version": "1.2.47",
3
+ "version": "1.2.49",
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",