docta-package 1.2.64 → 1.2.66

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.
@@ -4,11 +4,12 @@ import { LanguageInputDto } from "./language";
4
4
  import { FaqInputDto } from "./faq";
5
5
  import { LocationInputDto } from "./location";
6
6
  export declare class CreateDoctorDto {
7
- name: string;
8
- email: string;
7
+ title: string;
8
+ professionalEmail: string;
9
9
  specialtyId: string;
10
10
  biography?: string;
11
11
  consultationFeePerHour?: number;
12
+ dontBookMeBeforeInMins?: number;
12
13
  timezone: string;
13
14
  }
14
15
  export declare class ActivateDoctorAccountDto {
@@ -16,7 +17,9 @@ export declare class ActivateDoctorAccountDto {
16
17
  password: string;
17
18
  }
18
19
  export declare class UpdateDoctorDto {
19
- name: string;
20
+ title: string;
21
+ professionalEmail?: string;
22
+ dontBookMeBeforeInMins?: number;
20
23
  biography?: string;
21
24
  consultationFeePerHour?: number;
22
25
  isVisible?: boolean;
@@ -25,11 +25,11 @@ __decorate([
25
25
  (0, class_validator_1.MinLength)(3),
26
26
  (0, class_validator_1.MaxLength)(50),
27
27
  __metadata("design:type", String)
28
- ], CreateDoctorDto.prototype, "name", void 0);
28
+ ], CreateDoctorDto.prototype, "title", void 0);
29
29
  __decorate([
30
30
  (0, class_validator_1.IsEmail)(),
31
31
  __metadata("design:type", String)
32
- ], CreateDoctorDto.prototype, "email", void 0);
32
+ ], CreateDoctorDto.prototype, "professionalEmail", void 0);
33
33
  __decorate([
34
34
  (0, class_validator_1.IsMongoId)(),
35
35
  __metadata("design:type", String)
@@ -46,6 +46,12 @@ __decorate([
46
46
  (0, class_validator_1.Min)(0),
47
47
  __metadata("design:type", Number)
48
48
  ], CreateDoctorDto.prototype, "consultationFeePerHour", void 0);
49
+ __decorate([
50
+ (0, class_validator_1.IsOptional)(),
51
+ (0, class_validator_1.IsNumber)(),
52
+ (0, class_validator_1.Min)(0),
53
+ __metadata("design:type", Number)
54
+ ], CreateDoctorDto.prototype, "dontBookMeBeforeInMins", void 0);
49
55
  __decorate([
50
56
  (0, class_validator_1.IsString)(),
51
57
  (0, class_validator_1.IsNotEmpty)(),
@@ -75,7 +81,18 @@ __decorate([
75
81
  (0, class_validator_1.MinLength)(3),
76
82
  (0, class_validator_1.MaxLength)(50),
77
83
  __metadata("design:type", String)
78
- ], UpdateDoctorDto.prototype, "name", void 0);
84
+ ], UpdateDoctorDto.prototype, "title", void 0);
85
+ __decorate([
86
+ (0, class_validator_1.IsOptional)(),
87
+ (0, class_validator_1.IsEmail)(),
88
+ __metadata("design:type", String)
89
+ ], UpdateDoctorDto.prototype, "professionalEmail", void 0);
90
+ __decorate([
91
+ (0, class_validator_1.IsOptional)(),
92
+ (0, class_validator_1.IsNumber)(),
93
+ (0, class_validator_1.Min)(0),
94
+ __metadata("design:type", Number)
95
+ ], UpdateDoctorDto.prototype, "dontBookMeBeforeInMins", void 0);
79
96
  __decorate([
80
97
  (0, class_validator_1.IsOptional)(),
81
98
  (0, class_validator_1.IsString)(),
@@ -1,16 +1,18 @@
1
1
  import { IDoctorDocument } from "../../models";
2
2
  import { SpecialtyOutputDto } from "./specialty";
3
3
  import { ExpertiseOutputDto } from "./expertise";
4
- import { UserOutputDto, UserPublicOutputDto } from "./user";
4
+ import { UserOutputDto } from "./user";
5
5
  import { EducationOutputDto } from "./education";
6
6
  import { PositionOutputDto } from "./position";
7
7
  import { LanguageOutputDto } from "./language";
8
8
  import { FaqOutputDto } from "./faq";
9
9
  import { LocationOutputDto } from "./location";
10
- declare class OutputDto {
10
+ export declare class DoctorPublicOutputDto {
11
11
  id: string;
12
12
  specialty: SpecialtyOutputDto;
13
- name: string;
13
+ title: string;
14
+ professionalEmail: string;
15
+ dontBookMeBeforeInMins: number;
14
16
  biography: string | null;
15
17
  slug: string;
16
18
  isActive: boolean;
@@ -26,11 +28,7 @@ declare class OutputDto {
26
28
  location: LocationOutputDto | null;
27
29
  constructor(doctor: IDoctorDocument);
28
30
  }
29
- export declare class DoctorPublicOutputDto extends OutputDto {
30
- user: UserPublicOutputDto;
31
- constructor(doctor: IDoctorDocument);
32
- }
33
- export declare class DoctorOutputDto extends OutputDto {
31
+ export declare class DoctorOutputDto extends DoctorPublicOutputDto {
34
32
  user: UserOutputDto;
35
33
  isDeleted: boolean;
36
34
  createdAt: number;
@@ -44,4 +42,3 @@ export declare class DoctorAdminOutputDto extends DoctorOutputDto {
44
42
  deletedBy: UserOutputDto | null;
45
43
  constructor(doctor: IDoctorDocument);
46
44
  }
47
- export {};
@@ -9,11 +9,13 @@ const position_1 = require("./position");
9
9
  const language_1 = require("./language");
10
10
  const faq_1 = require("./faq");
11
11
  const location_1 = require("./location");
12
- class OutputDto {
12
+ class DoctorPublicOutputDto {
13
13
  constructor(doctor) {
14
14
  var _a, _b, _c;
15
15
  this.id = (_b = ((_a = doctor.id) !== null && _a !== void 0 ? _a : doctor._id)) === null || _b === void 0 ? void 0 : _b.toString();
16
- this.name = doctor.name;
16
+ this.title = doctor.title;
17
+ this.professionalEmail = doctor.professionalEmail;
18
+ this.dontBookMeBeforeInMins = doctor.dontBookMeBeforeInMins;
17
19
  this.specialty = new specialty_1.SpecialtyOutputDto(doctor.specialty);
18
20
  this.slug = doctor.slug;
19
21
  this.biography = doctor.biography || null;
@@ -36,14 +38,8 @@ class OutputDto {
36
38
  : null;
37
39
  }
38
40
  }
39
- class DoctorPublicOutputDto extends OutputDto {
40
- constructor(doctor) {
41
- super(doctor);
42
- this.user = new user_1.UserPublicOutputDto(doctor.user);
43
- }
44
- }
45
41
  exports.DoctorPublicOutputDto = DoctorPublicOutputDto;
46
- class DoctorOutputDto extends OutputDto {
42
+ class DoctorOutputDto extends DoctorPublicOutputDto {
47
43
  constructor(doctor) {
48
44
  super(doctor);
49
45
  this.user = new user_1.UserOutputDto(doctor.user);
@@ -9,7 +9,9 @@ import { ILanguage } from "./language";
9
9
  import { IFaq } from "./faq";
10
10
  import { ILocation } from "./location";
11
11
  export interface IDoctor extends IBaseModel {
12
- name: string;
12
+ title: string;
13
+ professionalEmail: string;
14
+ dontBookMeBeforeInMins: number;
13
15
  slug: string;
14
16
  isActive: boolean;
15
17
  user: IUserDocument;
@@ -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 }, 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: {
32
+ }, title: { type: String, required: true, trim: true }, professionalEmail: { type: String, required: true, trim: true }, dontBookMeBeforeInMins: { type: Number, required: true, default: 30 }, 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: [],
@@ -44,7 +44,7 @@ DoctorSchema.pre("validate", function (next) {
44
44
  // Only set slug if it hasn't been set before
45
45
  if (this.slug)
46
46
  return next();
47
- const baseSlug = createSlug(this.name);
47
+ const baseSlug = createSlug(this.title);
48
48
  let slug = baseSlug;
49
49
  let counter = 0;
50
50
  const Doctor = this.constructor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docta-package",
3
- "version": "1.2.64",
3
+ "version": "1.2.66",
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",