@blackcode_sa/metaestetics-api 1.5.28 → 1.5.29

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.
Files changed (34) hide show
  1. package/dist/admin/index.d.mts +1199 -1
  2. package/dist/admin/index.d.ts +1199 -1
  3. package/dist/admin/index.js +1337 -2
  4. package/dist/admin/index.mjs +1333 -2
  5. package/dist/backoffice/index.d.mts +99 -7
  6. package/dist/backoffice/index.d.ts +99 -7
  7. package/dist/index.d.mts +4035 -2364
  8. package/dist/index.d.ts +4035 -2364
  9. package/dist/index.js +2616 -1929
  10. package/dist/index.mjs +2646 -1952
  11. package/package.json +1 -1
  12. package/src/admin/aggregation/clinic/clinic.aggregation.service.ts +642 -0
  13. package/src/admin/aggregation/patient/patient.aggregation.service.ts +141 -0
  14. package/src/admin/aggregation/practitioner/practitioner.aggregation.service.ts +433 -0
  15. package/src/admin/aggregation/procedure/procedure.aggregation.service.ts +508 -0
  16. package/src/admin/index.ts +53 -4
  17. package/src/index.ts +28 -4
  18. package/src/services/clinic/clinic.service.ts +320 -107
  19. package/src/services/clinic/utils/clinic.utils.ts +66 -117
  20. package/src/services/clinic/utils/filter.utils.d.ts +23 -0
  21. package/src/services/clinic/utils/filter.utils.ts +264 -0
  22. package/src/services/practitioner/practitioner.service.ts +616 -5
  23. package/src/services/procedure/procedure.service.ts +599 -352
  24. package/src/services/reviews/reviews.service.ts +842 -0
  25. package/src/types/clinic/index.ts +24 -56
  26. package/src/types/practitioner/index.ts +34 -33
  27. package/src/types/procedure/index.ts +32 -0
  28. package/src/types/profile/index.ts +1 -1
  29. package/src/types/reviews/index.ts +126 -0
  30. package/src/validations/clinic.schema.ts +37 -64
  31. package/src/validations/practitioner.schema.ts +42 -32
  32. package/src/validations/procedure.schema.ts +11 -3
  33. package/src/validations/reviews.schema.ts +189 -0
  34. package/src/services/clinic/utils/review.utils.ts +0 -93
@@ -4571,6 +4571,94 @@ declare class SubcategoryService extends BaseService {
4571
4571
  getById(categoryId: string, subcategoryId: string): Promise<Subcategory | null>;
4572
4572
  }
4573
4573
 
4574
+ /**
4575
+ * Condensed practitioner review information
4576
+ * @description Used for aggregated data attached to practitioner documents
4577
+ */
4578
+ interface PractitionerReviewInfo {
4579
+ totalReviews: number;
4580
+ averageRating: number;
4581
+ knowledgeAndExpertise: number;
4582
+ communicationSkills: number;
4583
+ bedSideManner: number;
4584
+ thoroughness: number;
4585
+ trustworthiness: number;
4586
+ recommendationPercentage: number;
4587
+ }
4588
+
4589
+ declare enum PricingMeasure {
4590
+ PER_ML = "per_ml",
4591
+ PER_ZONE = "per_zone",
4592
+ PER_AREA = "per_area",
4593
+ PER_SESSION = "per_session",
4594
+ PER_TREATMENT = "per_treatment",
4595
+ PER_PACKAGE = "per_package"
4596
+ }
4597
+ declare enum Currency {
4598
+ EUR = "EUR",
4599
+ USD = "USD",
4600
+ GBP = "GBP",
4601
+ CHF = "CHF",
4602
+ AUD = "AUD"
4603
+ }
4604
+
4605
+ /**
4606
+ * Aggregated summary information for a procedure.
4607
+ * Used in arrays within Clinic and Practitioner documents for quick display.
4608
+ */
4609
+ interface ProcedureSummaryInfo {
4610
+ id: string;
4611
+ name: string;
4612
+ description?: string;
4613
+ photo?: string;
4614
+ family: ProcedureFamily;
4615
+ categoryName: string;
4616
+ subcategoryName: string;
4617
+ technologyName: string;
4618
+ price: number;
4619
+ pricingMeasure: PricingMeasure;
4620
+ currency: Currency;
4621
+ duration: number;
4622
+ clinicId: string;
4623
+ clinicName: string;
4624
+ practitionerId: string;
4625
+ practitionerName: string;
4626
+ }
4627
+
4628
+ /**
4629
+ * Interface for clinic contact information
4630
+ */
4631
+ interface ClinicContactInfo {
4632
+ email: string;
4633
+ phoneNumber: string;
4634
+ alternativePhoneNumber?: string | null;
4635
+ website?: string | null;
4636
+ }
4637
+ /**
4638
+ * Interface for clinic location
4639
+ */
4640
+ interface ClinicLocation {
4641
+ address: string;
4642
+ city: string;
4643
+ country: string;
4644
+ postalCode: string;
4645
+ latitude: number;
4646
+ longitude: number;
4647
+ geohash?: string | null;
4648
+ }
4649
+
4650
+ /**
4651
+ * Interface for clinic profile information
4652
+ */
4653
+ interface ClinicInfo {
4654
+ id: string;
4655
+ featuredPhoto: string;
4656
+ name: string;
4657
+ description?: string | null;
4658
+ location: ClinicLocation;
4659
+ contactInfo: ClinicContactInfo;
4660
+ }
4661
+
4574
4662
  /**
4575
4663
  * Osnovne informacije o zdravstvenom radniku
4576
4664
  */
@@ -4580,8 +4668,8 @@ interface PractitionerBasicInfo {
4580
4668
  title: string;
4581
4669
  email: string;
4582
4670
  phoneNumber: string;
4583
- dateOfBirth: Timestamp;
4584
- gender: 'male' | 'female' | 'other';
4671
+ dateOfBirth: Timestamp | Date;
4672
+ gender: "male" | "female" | "other";
4585
4673
  profileImageUrl?: string;
4586
4674
  bio?: string;
4587
4675
  languages: string[];
@@ -4594,9 +4682,9 @@ interface PractitionerCertification {
4594
4682
  specialties: CertificationSpecialty[];
4595
4683
  licenseNumber: string;
4596
4684
  issuingAuthority: string;
4597
- issueDate: Timestamp;
4598
- expiryDate?: Timestamp;
4599
- verificationStatus: 'pending' | 'verified' | 'rejected';
4685
+ issueDate: Timestamp | Date;
4686
+ expiryDate?: Timestamp | Date;
4687
+ verificationStatus: "pending" | "verified" | "rejected";
4600
4688
  }
4601
4689
  /**
4602
4690
  * Interfejs za radno vreme zdravstvenog radnika u klinici
@@ -4634,8 +4722,8 @@ interface PractitionerClinicWorkingHours {
4634
4722
  } | null;
4635
4723
  };
4636
4724
  isActive: boolean;
4637
- createdAt: Timestamp;
4638
- updatedAt: Timestamp;
4725
+ createdAt: Timestamp | Date;
4726
+ updatedAt: Timestamp | Date;
4639
4727
  }
4640
4728
  /**
4641
4729
  * Status of practitioner profile
@@ -4654,6 +4742,10 @@ interface Practitioner {
4654
4742
  certification: PractitionerCertification;
4655
4743
  clinics: string[];
4656
4744
  clinicWorkingHours: PractitionerClinicWorkingHours[];
4745
+ clinicsInfo: ClinicInfo[];
4746
+ procedures: string[];
4747
+ proceduresInfo: ProcedureSummaryInfo[];
4748
+ reviewInfo: PractitionerReviewInfo;
4657
4749
  isActive: boolean;
4658
4750
  isVerified: boolean;
4659
4751
  status: PractitionerStatus;
@@ -4571,6 +4571,94 @@ declare class SubcategoryService extends BaseService {
4571
4571
  getById(categoryId: string, subcategoryId: string): Promise<Subcategory | null>;
4572
4572
  }
4573
4573
 
4574
+ /**
4575
+ * Condensed practitioner review information
4576
+ * @description Used for aggregated data attached to practitioner documents
4577
+ */
4578
+ interface PractitionerReviewInfo {
4579
+ totalReviews: number;
4580
+ averageRating: number;
4581
+ knowledgeAndExpertise: number;
4582
+ communicationSkills: number;
4583
+ bedSideManner: number;
4584
+ thoroughness: number;
4585
+ trustworthiness: number;
4586
+ recommendationPercentage: number;
4587
+ }
4588
+
4589
+ declare enum PricingMeasure {
4590
+ PER_ML = "per_ml",
4591
+ PER_ZONE = "per_zone",
4592
+ PER_AREA = "per_area",
4593
+ PER_SESSION = "per_session",
4594
+ PER_TREATMENT = "per_treatment",
4595
+ PER_PACKAGE = "per_package"
4596
+ }
4597
+ declare enum Currency {
4598
+ EUR = "EUR",
4599
+ USD = "USD",
4600
+ GBP = "GBP",
4601
+ CHF = "CHF",
4602
+ AUD = "AUD"
4603
+ }
4604
+
4605
+ /**
4606
+ * Aggregated summary information for a procedure.
4607
+ * Used in arrays within Clinic and Practitioner documents for quick display.
4608
+ */
4609
+ interface ProcedureSummaryInfo {
4610
+ id: string;
4611
+ name: string;
4612
+ description?: string;
4613
+ photo?: string;
4614
+ family: ProcedureFamily;
4615
+ categoryName: string;
4616
+ subcategoryName: string;
4617
+ technologyName: string;
4618
+ price: number;
4619
+ pricingMeasure: PricingMeasure;
4620
+ currency: Currency;
4621
+ duration: number;
4622
+ clinicId: string;
4623
+ clinicName: string;
4624
+ practitionerId: string;
4625
+ practitionerName: string;
4626
+ }
4627
+
4628
+ /**
4629
+ * Interface for clinic contact information
4630
+ */
4631
+ interface ClinicContactInfo {
4632
+ email: string;
4633
+ phoneNumber: string;
4634
+ alternativePhoneNumber?: string | null;
4635
+ website?: string | null;
4636
+ }
4637
+ /**
4638
+ * Interface for clinic location
4639
+ */
4640
+ interface ClinicLocation {
4641
+ address: string;
4642
+ city: string;
4643
+ country: string;
4644
+ postalCode: string;
4645
+ latitude: number;
4646
+ longitude: number;
4647
+ geohash?: string | null;
4648
+ }
4649
+
4650
+ /**
4651
+ * Interface for clinic profile information
4652
+ */
4653
+ interface ClinicInfo {
4654
+ id: string;
4655
+ featuredPhoto: string;
4656
+ name: string;
4657
+ description?: string | null;
4658
+ location: ClinicLocation;
4659
+ contactInfo: ClinicContactInfo;
4660
+ }
4661
+
4574
4662
  /**
4575
4663
  * Osnovne informacije o zdravstvenom radniku
4576
4664
  */
@@ -4580,8 +4668,8 @@ interface PractitionerBasicInfo {
4580
4668
  title: string;
4581
4669
  email: string;
4582
4670
  phoneNumber: string;
4583
- dateOfBirth: Timestamp;
4584
- gender: 'male' | 'female' | 'other';
4671
+ dateOfBirth: Timestamp | Date;
4672
+ gender: "male" | "female" | "other";
4585
4673
  profileImageUrl?: string;
4586
4674
  bio?: string;
4587
4675
  languages: string[];
@@ -4594,9 +4682,9 @@ interface PractitionerCertification {
4594
4682
  specialties: CertificationSpecialty[];
4595
4683
  licenseNumber: string;
4596
4684
  issuingAuthority: string;
4597
- issueDate: Timestamp;
4598
- expiryDate?: Timestamp;
4599
- verificationStatus: 'pending' | 'verified' | 'rejected';
4685
+ issueDate: Timestamp | Date;
4686
+ expiryDate?: Timestamp | Date;
4687
+ verificationStatus: "pending" | "verified" | "rejected";
4600
4688
  }
4601
4689
  /**
4602
4690
  * Interfejs za radno vreme zdravstvenog radnika u klinici
@@ -4634,8 +4722,8 @@ interface PractitionerClinicWorkingHours {
4634
4722
  } | null;
4635
4723
  };
4636
4724
  isActive: boolean;
4637
- createdAt: Timestamp;
4638
- updatedAt: Timestamp;
4725
+ createdAt: Timestamp | Date;
4726
+ updatedAt: Timestamp | Date;
4639
4727
  }
4640
4728
  /**
4641
4729
  * Status of practitioner profile
@@ -4654,6 +4742,10 @@ interface Practitioner {
4654
4742
  certification: PractitionerCertification;
4655
4743
  clinics: string[];
4656
4744
  clinicWorkingHours: PractitionerClinicWorkingHours[];
4745
+ clinicsInfo: ClinicInfo[];
4746
+ procedures: string[];
4747
+ proceduresInfo: ProcedureSummaryInfo[];
4748
+ reviewInfo: PractitionerReviewInfo;
4657
4749
  isActive: boolean;
4658
4750
  isVerified: boolean;
4659
4751
  status: PractitionerStatus;