docta-package 1.2.2 → 1.2.9

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,8 @@
1
- import { EducationInputDto } from ".";
2
- import { PositionInputDto } from ".";
3
- import { LanguageInputDto } from ".";
4
- import { FaqInputDto } from ".";
5
- import { LocationInputDto } from ".";
1
+ import { EducationInputDto } from "./education";
2
+ import { PositionInputDto } from "./position";
3
+ import { LanguageInputDto } from "./language";
4
+ import { FaqInputDto } from "./faq";
5
+ import { LocationInputDto } from "./location";
6
6
  export declare class CreateDoctorDto {
7
7
  name: string;
8
8
  email: string;
@@ -12,11 +12,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UpdateDoctorDto = exports.ActivateDoctorAccountDto = exports.CreateDoctorDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  const class_transformer_1 = require("class-transformer");
15
- const _1 = require(".");
16
- const _2 = require(".");
17
- const _3 = require(".");
18
- const _4 = require(".");
19
- const _5 = require(".");
15
+ const education_1 = require("./education");
16
+ const position_1 = require("./position");
17
+ const language_1 = require("./language");
18
+ const faq_1 = require("./faq");
19
+ const location_1 = require("./location");
20
20
  class CreateDoctorDto {
21
21
  }
22
22
  exports.CreateDoctorDto = CreateDoctorDto;
@@ -92,28 +92,28 @@ __decorate([
92
92
  (0, class_validator_1.IsOptional)(),
93
93
  (0, class_validator_1.IsArray)(),
94
94
  (0, class_validator_1.ValidateNested)({ each: true }),
95
- (0, class_transformer_1.Type)(() => _1.EducationInputDto),
95
+ (0, class_transformer_1.Type)(() => education_1.EducationInputDto),
96
96
  __metadata("design:type", Array)
97
97
  ], UpdateDoctorDto.prototype, "educations", void 0);
98
98
  __decorate([
99
99
  (0, class_validator_1.IsOptional)(),
100
100
  (0, class_validator_1.IsArray)(),
101
101
  (0, class_validator_1.ValidateNested)({ each: true }),
102
- (0, class_transformer_1.Type)(() => _2.PositionInputDto),
102
+ (0, class_transformer_1.Type)(() => position_1.PositionInputDto),
103
103
  __metadata("design:type", Array)
104
104
  ], UpdateDoctorDto.prototype, "positions", void 0);
105
105
  __decorate([
106
106
  (0, class_validator_1.IsOptional)(),
107
107
  (0, class_validator_1.IsArray)(),
108
108
  (0, class_validator_1.ValidateNested)({ each: true }),
109
- (0, class_transformer_1.Type)(() => _3.LanguageInputDto),
109
+ (0, class_transformer_1.Type)(() => language_1.LanguageInputDto),
110
110
  __metadata("design:type", Array)
111
111
  ], UpdateDoctorDto.prototype, "languages", void 0);
112
112
  __decorate([
113
113
  (0, class_validator_1.IsOptional)(),
114
114
  (0, class_validator_1.IsArray)(),
115
115
  (0, class_validator_1.ValidateNested)({ each: true }),
116
- (0, class_transformer_1.Type)(() => _4.FaqInputDto),
116
+ (0, class_transformer_1.Type)(() => faq_1.FaqInputDto),
117
117
  __metadata("design:type", Array)
118
118
  ], UpdateDoctorDto.prototype, "faqs", void 0);
119
119
  __decorate([
@@ -126,6 +126,6 @@ __decorate([
126
126
  __decorate([
127
127
  (0, class_validator_1.IsOptional)(),
128
128
  (0, class_validator_1.ValidateNested)(),
129
- (0, class_transformer_1.Type)(() => _5.LocationInputDto),
130
- __metadata("design:type", _5.LocationInputDto)
129
+ (0, class_transformer_1.Type)(() => location_1.LocationInputDto),
130
+ __metadata("design:type", location_1.LocationInputDto)
131
131
  ], UpdateDoctorDto.prototype, "location", void 0);
@@ -1,11 +1,11 @@
1
1
  import { IDoctorDocument } from "../../models";
2
- import { SpecialtyOutputDto } from ".";
3
- import { UserOutputDto } from ".";
4
- import { EducationOutputDto } from ".";
5
- import { PositionOutputDto } from ".";
6
- import { LanguageOutputDto } from ".";
7
- import { FaqOutputDto } from ".";
8
- import { LocationOutputDto } from ".";
2
+ import { SpecialtyOutputDto } from "./specialty";
3
+ import { UserOutputDto } from "./user";
4
+ import { EducationOutputDto } from "./education";
5
+ import { PositionOutputDto } from "./position";
6
+ import { LanguageOutputDto } from "./language";
7
+ import { FaqOutputDto } from "./faq";
8
+ import { LocationOutputDto } from "./location";
9
9
  export declare class DoctorOutputDto {
10
10
  id: string;
11
11
  user: UserOutputDto;
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DoctorAdminOutputDto = exports.DoctorOutputDto = void 0;
4
- const _1 = require(".");
5
- const _2 = require(".");
6
- const _3 = require(".");
7
- const _4 = require(".");
8
- const _5 = require(".");
9
- const _6 = require(".");
10
- const _7 = require(".");
4
+ const specialty_1 = require("./specialty");
5
+ const user_1 = require("./user");
6
+ const education_1 = require("./education");
7
+ const position_1 = require("./position");
8
+ const language_1 = require("./language");
9
+ const faq_1 = require("./faq");
10
+ const location_1 = require("./location");
11
11
  // Base DTO for everyone
12
12
  class DoctorOutputDto {
13
13
  constructor(doctor) {
14
14
  var _a;
15
15
  this.id = doctor.id.toString();
16
- this.user = new _2.UserOutputDto(doctor.user);
16
+ this.user = new user_1.UserOutputDto(doctor.user);
17
17
  this.name = doctor.name;
18
- this.specialty = new _1.SpecialtyOutputDto(doctor.specialty);
18
+ this.specialty = new specialty_1.SpecialtyOutputDto(doctor.specialty);
19
19
  this.slug = doctor.slug;
20
20
  this.biography = doctor.biography || null;
21
21
  this.isActive = doctor.isActive;
@@ -24,16 +24,16 @@ class DoctorOutputDto {
24
24
  this.isVisible = doctor.isVisible;
25
25
  this.photo = doctor.photo || null;
26
26
  this.educations = (doctor.educations || [])
27
- .map((e) => new _3.EducationOutputDto(e))
27
+ .map((e) => new education_1.EducationOutputDto(e))
28
28
  .sort((a, b) => b.year - a.year);
29
29
  this.positions = (doctor.positions || [])
30
- .map((p) => new _4.PositionOutputDto(p))
30
+ .map((p) => new position_1.PositionOutputDto(p))
31
31
  .sort((a, b) => b.startDate - a.startDate);
32
- this.languages = (doctor.languages || []).map((l) => new _5.LanguageOutputDto(l));
33
- this.faqs = (doctor.faqs || []).map((f) => new _6.FaqOutputDto(f));
32
+ this.languages = (doctor.languages || []).map((l) => new language_1.LanguageOutputDto(l));
33
+ this.faqs = (doctor.faqs || []).map((f) => new faq_1.FaqOutputDto(f));
34
34
  this.expertises = doctor.expertises || [];
35
35
  this.location = doctor.location
36
- ? new _7.LocationOutputDto(doctor.location)
36
+ ? new location_1.LocationOutputDto(doctor.location)
37
37
  : null;
38
38
  this.isDeleted = doctor.isDeleted;
39
39
  this.createdAt = doctor.createdAt;
@@ -48,13 +48,13 @@ class DoctorAdminOutputDto extends DoctorOutputDto {
48
48
  super(doctor); // call base constructor
49
49
  this.isDeactivatedByAdmin = (_a = doctor.isDeactivatedByAdmin) !== null && _a !== void 0 ? _a : null;
50
50
  this.createdBy = doctor.createdBy
51
- ? new _2.UserOutputDto(doctor.createdBy)
51
+ ? new user_1.UserOutputDto(doctor.createdBy)
52
52
  : null;
53
53
  this.updatedBy = doctor.updatedBy
54
- ? new _2.UserOutputDto(doctor.updatedBy)
54
+ ? new user_1.UserOutputDto(doctor.updatedBy)
55
55
  : null;
56
56
  this.deletedBy = doctor.deletedBy
57
- ? new _2.UserOutputDto(doctor.deletedBy)
57
+ ? new user_1.UserOutputDto(doctor.deletedBy)
58
58
  : null;
59
59
  }
60
60
  }
@@ -1,6 +1,6 @@
1
1
  import { Gender } from "../../enums";
2
2
  import { IPatientDocument } from "../../models";
3
- import { UserOutputDto } from ".";
3
+ import { UserOutputDto } from "./user";
4
4
  export declare class PatientOutputDto {
5
5
  id: string;
6
6
  user: UserOutputDto;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PatientAdminOutputDto = exports.PatientOutputDto = void 0;
4
- const _1 = require(".");
4
+ const user_1 = require("./user");
5
5
  // Base DTO for everyone
6
6
  class PatientOutputDto {
7
7
  constructor(patient) {
8
8
  this.id = patient.id.toString();
9
- this.user = new _1.UserOutputDto(patient.user);
9
+ this.user = new user_1.UserOutputDto(patient.user);
10
10
  this.dob = patient.dob || null;
11
11
  this.phoneNumber = patient.phoneNumber || null;
12
12
  this.gender = patient.gender || null;
@@ -21,13 +21,13 @@ class PatientAdminOutputDto extends PatientOutputDto {
21
21
  constructor(patient) {
22
22
  super(patient); // call base constructor
23
23
  this.createdBy = patient.createdBy
24
- ? new _1.UserOutputDto(patient.createdBy)
24
+ ? new user_1.UserOutputDto(patient.createdBy)
25
25
  : null;
26
26
  this.updatedBy = patient.updatedBy
27
- ? new _1.UserOutputDto(patient.updatedBy)
27
+ ? new user_1.UserOutputDto(patient.updatedBy)
28
28
  : null;
29
29
  this.deletedBy = patient.deletedBy
30
- ? new _1.UserOutputDto(patient.deletedBy)
30
+ ? new user_1.UserOutputDto(patient.deletedBy)
31
31
  : null;
32
32
  }
33
33
  }
@@ -1,5 +1,5 @@
1
1
  import { ISpecialtyDocument } from "../../models";
2
- import { UserOutputDto } from ".";
2
+ import { UserOutputDto } from "./user";
3
3
  export declare class SpecialtyOutputDto {
4
4
  id: string;
5
5
  en: {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SpecialtyAdminOutputDto = exports.SpecialtyOutputDto = void 0;
4
- const _1 = require(".");
4
+ const user_1 = require("./user");
5
5
  // Base DTO for everyone
6
6
  class SpecialtyOutputDto {
7
7
  constructor(specialty) {
@@ -27,13 +27,13 @@ class SpecialtyAdminOutputDto extends SpecialtyOutputDto {
27
27
  constructor(specialty) {
28
28
  super(specialty); // call base constructor
29
29
  this.createdBy = specialty.createdBy
30
- ? new _1.UserOutputDto(specialty.createdBy)
30
+ ? new user_1.UserOutputDto(specialty.createdBy)
31
31
  : null;
32
32
  this.updatedBy = specialty.updatedBy
33
- ? new _1.UserOutputDto(specialty.updatedBy)
33
+ ? new user_1.UserOutputDto(specialty.updatedBy)
34
34
  : null;
35
35
  this.deletedBy = specialty.deletedBy
36
- ? new _1.UserOutputDto(specialty.deletedBy)
36
+ ? new user_1.UserOutputDto(specialty.deletedBy)
37
37
  : null;
38
38
  }
39
39
  }
@@ -1,4 +1,4 @@
1
- import { CustomError } from ".";
1
+ import { CustomError } from "./CustomError";
2
2
  import { EnumStatusCode } from "../enums";
3
3
  import { ErrorResult } from "../utils";
4
4
  export declare class BadRequestError extends CustomError {
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BadRequestError = void 0;
4
- const _1 = require(".");
4
+ const CustomError_1 = require("./CustomError");
5
5
  const enums_1 = require("../enums");
6
- class BadRequestError extends _1.CustomError {
6
+ class BadRequestError extends CustomError_1.CustomError {
7
7
  constructor(code = enums_1.EnumStatusCode.BAD_REQUEST, message = "Bad Request") {
8
8
  super(message, code, 400);
9
9
  this.statusCode = 400;
@@ -1,4 +1,4 @@
1
- import { CustomError } from ".";
1
+ import { CustomError } from "./CustomError";
2
2
  import { EnumStatusCode } from "../enums";
3
3
  import { ErrorResult } from "../utils";
4
4
  export declare class NotFoundError extends CustomError {
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NotFoundError = void 0;
4
- const _1 = require(".");
4
+ const CustomError_1 = require("./CustomError");
5
5
  const enums_1 = require("../enums");
6
- class NotFoundError extends _1.CustomError {
6
+ class NotFoundError extends CustomError_1.CustomError {
7
7
  constructor(code = enums_1.EnumStatusCode.NOT_FOUND, message = "Not Found") {
8
8
  super(message, code, 404);
9
9
  this.statusCode = 404;
@@ -1,4 +1,4 @@
1
- import { CustomError } from ".";
1
+ import { CustomError } from "./CustomError";
2
2
  import { EnumStatusCode } from "../enums";
3
3
  import { ErrorResult } from "../utils";
4
4
  export declare class UnAuthorizedError extends CustomError {
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UnAuthorizedError = void 0;
4
- const _1 = require(".");
4
+ const CustomError_1 = require("./CustomError");
5
5
  const enums_1 = require("../enums");
6
- class UnAuthorizedError extends _1.CustomError {
6
+ class UnAuthorizedError extends CustomError_1.CustomError {
7
7
  constructor(code = enums_1.EnumStatusCode.UNAUTHORIZED, message = "Unauthorized") {
8
8
  super(message, code, 401);
9
9
  this.statusCode = 401;
@@ -1,5 +1,5 @@
1
1
  import { Schema, SchemaDefinition } from "mongoose";
2
- import { IUserDocument } from ".";
2
+ import { IUserDocument } from "./user";
3
3
  export interface IBaseModel {
4
4
  isDeleted: boolean;
5
5
  createdAt: number;
@@ -1,12 +1,12 @@
1
1
  import { Document, Model } from "mongoose";
2
- import { ISpecialtyDocument } from ".";
3
- import { IUserDocument } from ".";
4
- import { IBaseModel } from ".";
5
- import { IEducation } from ".";
6
- import { IPosition } from ".";
7
- import { ILanguage } from ".";
8
- import { IFaq } from ".";
9
- import { ILocation } from ".";
2
+ import { ISpecialtyDocument } from "./specialty";
3
+ import { IUserDocument } from "./user";
4
+ import { IBaseModel } from "./base";
5
+ import { IEducation } from "./education";
6
+ import { IPosition } from "./position";
7
+ import { ILanguage } from "./language";
8
+ import { IFaq } from "./faq";
9
+ import { ILocation } from "./location";
10
10
  export interface IDoctor extends IBaseModel {
11
11
  name: string;
12
12
  slug: string;
@@ -11,24 +11,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.DoctorModel = void 0;
13
13
  const mongoose_1 = require("mongoose");
14
- const _1 = require(".");
15
- const _2 = require(".");
16
- const _3 = require(".");
17
- const _4 = require(".");
18
- const _5 = require(".");
19
- const _6 = require(".");
20
- const _7 = require(".");
21
- const _8 = require(".");
22
- const DoctorSchema = new mongoose_1.Schema(Object.assign(Object.assign({}, _3.BaseSchemaFields), { user: {
14
+ const specialty_1 = require("./specialty");
15
+ const user_1 = require("./user");
16
+ const base_1 = require("./base");
17
+ const education_1 = require("./education");
18
+ const position_1 = require("./position");
19
+ const language_1 = require("./language");
20
+ const faq_1 = require("./faq");
21
+ const location_1 = require("./location");
22
+ const DoctorSchema = new mongoose_1.Schema(Object.assign(Object.assign({}, base_1.BaseSchemaFields), { user: {
23
23
  type: mongoose_1.Schema.Types.ObjectId,
24
- ref: _2.UserModel,
24
+ ref: user_1.UserModel,
25
25
  required: true,
26
26
  onDelete: "cascade",
27
27
  }, specialty: {
28
28
  type: mongoose_1.Schema.Types.ObjectId,
29
- ref: _1.SpecialtyModel,
29
+ ref: specialty_1.SpecialtyModel,
30
30
  required: true,
31
- }, 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: [_4.EducationSchema], required: true, default: [] }, positions: { type: [_5.PositionSchema], required: true, default: [] }, languages: { type: [_6.LanguageSchema], required: true, default: [] }, faqs: { type: [_7.FaqSchema], required: true, default: [] }, expertises: { type: [String], required: true, default: [] }, location: { type: _8.LocationSchema, required: false } }));
31
+ }, 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: { type: [String], required: true, default: [] }, location: { type: location_1.LocationSchema, required: false } }));
32
32
  const createSlug = (text) => text
33
33
  .toLowerCase()
34
34
  .trim()
@@ -51,5 +51,5 @@ DoctorSchema.pre("validate", function (next) {
51
51
  next();
52
52
  });
53
53
  });
54
- DoctorSchema.plugin(_3.BaseSchemaPlugin);
54
+ DoctorSchema.plugin(base_1.BaseSchemaPlugin);
55
55
  exports.DoctorModel = (0, mongoose_1.model)("Doctor", DoctorSchema);
@@ -1,6 +1,6 @@
1
1
  import { Document, Model } from "mongoose";
2
- import { IUserDocument } from ".";
3
- import { IBaseModel } from ".";
2
+ import { IUserDocument } from "./user";
3
+ import { IBaseModel } from "./base";
4
4
  import { Gender } from "../enums";
5
5
  export interface IPatient extends IBaseModel {
6
6
  user: IUserDocument;
@@ -2,14 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PatientModel = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
- const _1 = require(".");
6
- const _2 = require(".");
5
+ const user_1 = require("./user");
6
+ const base_1 = require("./base");
7
7
  const enums_1 = require("../enums");
8
- const PatientSchema = new mongoose_1.Schema(Object.assign(Object.assign({}, _2.BaseSchemaFields), { user: {
8
+ const PatientSchema = new mongoose_1.Schema(Object.assign(Object.assign({}, base_1.BaseSchemaFields), { user: {
9
9
  type: mongoose_1.Schema.Types.ObjectId,
10
- ref: _1.UserModel.modelName,
10
+ ref: user_1.UserModel.modelName,
11
11
  required: true,
12
12
  onDelete: "cascade",
13
13
  }, dob: { type: Number, required: false }, phoneNumber: { type: String, required: false }, gender: { type: String, enum: Object.values(enums_1.Gender), required: false } }));
14
- PatientSchema.plugin(_2.BaseSchemaPlugin);
14
+ PatientSchema.plugin(base_1.BaseSchemaPlugin);
15
15
  exports.PatientModel = (0, mongoose_1.model)("Patient", PatientSchema);
@@ -1,5 +1,5 @@
1
1
  import { Document, Model } from "mongoose";
2
- import { IBaseModel } from ".";
2
+ import { IBaseModel } from "./base";
3
3
  export interface ILocalizedSpecialtyFields {
4
4
  name: string;
5
5
  description?: string | null;
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SpecialtyModel = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
- const _1 = require(".");
5
+ const base_1 = require("./base");
6
6
  const LocalizedFieldsSchema = new mongoose_1.Schema({
7
7
  name: { type: String, required: true },
8
8
  description: { type: String, default: null },
9
9
  }, { _id: false });
10
- const SpecialtySchema = new mongoose_1.Schema(Object.assign(Object.assign({}, _1.BaseSchemaFields), { en: { type: LocalizedFieldsSchema, required: true }, fr: { type: LocalizedFieldsSchema, required: false, default: null } }));
11
- SpecialtySchema.plugin(_1.BaseSchemaPlugin);
10
+ const SpecialtySchema = new mongoose_1.Schema(Object.assign(Object.assign({}, base_1.BaseSchemaFields), { en: { type: LocalizedFieldsSchema, required: true }, fr: { type: LocalizedFieldsSchema, required: false, default: null } }));
11
+ SpecialtySchema.plugin(base_1.BaseSchemaPlugin);
12
12
  exports.SpecialtyModel = (0, mongoose_1.model)("Specialty", SpecialtySchema);
@@ -1,6 +1,6 @@
1
1
  import { Document, Model } from "mongoose";
2
2
  import { EnumUserRole } from "../enums";
3
- import { IBaseModel } from ".";
3
+ import { IBaseModel } from "./base";
4
4
  export interface IUser extends IBaseModel {
5
5
  role: EnumUserRole;
6
6
  name: string;
@@ -13,13 +13,13 @@ exports.UserModel = void 0;
13
13
  const mongoose_1 = require("mongoose");
14
14
  const enums_1 = require("../enums");
15
15
  const bcrypt = require("bcryptjs");
16
- const _1 = require(".");
17
- const UserSchema = new mongoose_1.Schema(Object.assign(Object.assign({}, _1.BaseSchemaFields), { name: { type: String, required: true }, email: { type: String, required: true, unique: true, trim: true }, password: { type: String, required: false, default: null }, activationToken: { type: String, default: null }, forgotPasswordToken: { type: String, default: null }, token: { type: String, default: null }, isActive: { type: Boolean, default: false }, role: {
16
+ const base_1 = require("./base");
17
+ const UserSchema = new mongoose_1.Schema(Object.assign(Object.assign({}, base_1.BaseSchemaFields), { name: { type: String, required: true }, email: { type: String, required: true, unique: true, trim: true }, password: { type: String, required: false, default: null }, activationToken: { type: String, default: null }, forgotPasswordToken: { type: String, default: null }, token: { type: String, default: null }, isActive: { type: Boolean, default: false }, role: {
18
18
  type: String,
19
19
  enum: Object.values(enums_1.EnumUserRole),
20
20
  default: enums_1.EnumUserRole.PATIENT,
21
21
  } }));
22
- UserSchema.plugin(_1.BaseSchemaPlugin);
22
+ UserSchema.plugin(base_1.BaseSchemaPlugin);
23
23
  UserSchema.pre("save", function (next) {
24
24
  return __awaiter(this, void 0, void 0, function* () {
25
25
  if (!this.isModified("password")) {
@@ -23,6 +23,8 @@ class TokenUtils {
23
23
  }
24
24
  }
25
25
  static createAccessToken(payload) {
26
+ console.log("General config");
27
+ console.log(config_1.generalConfig.accessTokenExpiry);
26
28
  return jsonwebtoken_1.default.sign(payload, config_1.generalConfig.accessTokenSecret, {
27
29
  expiresIn: config_1.generalConfig.accessTokenExpiry,
28
30
  });
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "docta-package",
3
- "version": "1.2.2",
3
+ "version": "1.2.9",
4
4
  "description": "This package will contail all the required files to run the docta micro-service app",
5
- "main": "index.js",
5
+ "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
7
7
  "files": [
8
8
  "build"