@blackcode_sa/metaestetics-api 1.12.20 → 1.12.22
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.
- package/dist/admin/index.d.mts +14 -0
- package/dist/admin/index.d.ts +14 -0
- package/dist/admin/index.js +194 -180
- package/dist/admin/index.mjs +194 -180
- package/dist/index.d.mts +57 -9
- package/dist/index.d.ts +57 -9
- package/dist/index.js +2340 -1862
- package/dist/index.mjs +2412 -1934
- package/package.json +1 -1
- package/src/admin/aggregation/appointment/appointment.aggregation.service.ts +459 -457
- package/src/services/appointment/appointment.service.ts +297 -0
- package/src/services/reviews/README.md +129 -0
- package/src/services/reviews/reviews.service.ts +331 -12
- package/src/types/appointment/index.ts +11 -0
- package/src/types/reviews/index.ts +2 -1
- package/src/validations/appointment.schema.ts +38 -18
package/dist/index.d.mts
CHANGED
|
@@ -132,6 +132,7 @@ interface Review {
|
|
|
132
132
|
id: string;
|
|
133
133
|
appointmentId: string;
|
|
134
134
|
patientId: string;
|
|
135
|
+
patientName?: string;
|
|
135
136
|
createdAt: Date;
|
|
136
137
|
updatedAt: Date;
|
|
137
138
|
clinicReview?: ClinicReview;
|
|
@@ -4357,6 +4358,16 @@ interface BeforeAfterPerZone {
|
|
|
4357
4358
|
afterNote?: string | null;
|
|
4358
4359
|
beforeNote?: string | null;
|
|
4359
4360
|
}
|
|
4361
|
+
/**
|
|
4362
|
+
* Interface for zone photo upload data
|
|
4363
|
+
*/
|
|
4364
|
+
interface ZonePhotoUploadData {
|
|
4365
|
+
appointmentId: string;
|
|
4366
|
+
zoneId: string;
|
|
4367
|
+
photoType: 'before' | 'after';
|
|
4368
|
+
file: File | Blob;
|
|
4369
|
+
notes?: string;
|
|
4370
|
+
}
|
|
4360
4371
|
/**
|
|
4361
4372
|
* Interface for billing information per zone
|
|
4362
4373
|
*/
|
|
@@ -5769,6 +5780,7 @@ declare class AppointmentService extends BaseService {
|
|
|
5769
5780
|
private practitionerService;
|
|
5770
5781
|
private clinicService;
|
|
5771
5782
|
private filledDocumentService;
|
|
5783
|
+
private mediaService;
|
|
5772
5784
|
private functions;
|
|
5773
5785
|
/**
|
|
5774
5786
|
* Creates a new AppointmentService instance.
|
|
@@ -5780,6 +5792,7 @@ declare class AppointmentService extends BaseService {
|
|
|
5780
5792
|
* @param patientService Patient service instance
|
|
5781
5793
|
* @param practitionerService Practitioner service instance
|
|
5782
5794
|
* @param clinicService Clinic service instance
|
|
5795
|
+
* @param filledDocumentService Filled document service instance
|
|
5783
5796
|
*/
|
|
5784
5797
|
constructor(db: Firestore, auth: Auth, app: FirebaseApp, calendarService: CalendarServiceV2, patientService: PatientService, practitionerService: PractitionerService, clinicService: ClinicService, filledDocumentService: FilledDocumentService);
|
|
5785
5798
|
/**
|
|
@@ -6014,6 +6027,41 @@ declare class AppointmentService extends BaseService {
|
|
|
6014
6027
|
* @returns The count of completed appointments.
|
|
6015
6028
|
*/
|
|
6016
6029
|
countCompletedAppointments(patientId: string, clinicBranchId?: string, excludeClinic?: boolean): Promise<number>;
|
|
6030
|
+
/**
|
|
6031
|
+
* Uploads a zone photo and updates appointment metadata
|
|
6032
|
+
*
|
|
6033
|
+
* @param uploadData Zone photo upload data containing appointment ID, zone ID, photo type, file, and optional notes
|
|
6034
|
+
* @returns The uploaded media metadata
|
|
6035
|
+
*/
|
|
6036
|
+
uploadZonePhoto(uploadData: ZonePhotoUploadData): Promise<MediaMetadata>;
|
|
6037
|
+
/**
|
|
6038
|
+
* Updates appointment metadata with zone photo information
|
|
6039
|
+
*
|
|
6040
|
+
* @param appointmentId ID of the appointment
|
|
6041
|
+
* @param zoneId ID of the zone
|
|
6042
|
+
* @param photoType Type of photo ('before' or 'after')
|
|
6043
|
+
* @param mediaMetadata Uploaded media metadata
|
|
6044
|
+
* @param notes Optional notes for the photo
|
|
6045
|
+
* @returns The updated appointment
|
|
6046
|
+
*/
|
|
6047
|
+
private updateAppointmentZonePhoto;
|
|
6048
|
+
/**
|
|
6049
|
+
* Gets zone photos for a specific appointment and zone
|
|
6050
|
+
*
|
|
6051
|
+
* @param appointmentId ID of the appointment
|
|
6052
|
+
* @param zoneId ID of the zone (optional - if not provided, returns all zones)
|
|
6053
|
+
* @returns Zone photos data
|
|
6054
|
+
*/
|
|
6055
|
+
getZonePhotos(appointmentId: string, zoneId?: string): Promise<Record<string, BeforeAfterPerZone> | BeforeAfterPerZone | null>;
|
|
6056
|
+
/**
|
|
6057
|
+
* Deletes a zone photo and updates appointment metadata
|
|
6058
|
+
*
|
|
6059
|
+
* @param appointmentId ID of the appointment
|
|
6060
|
+
* @param zoneId ID of the zone
|
|
6061
|
+
* @param photoType Type of photo to delete ('before' or 'after')
|
|
6062
|
+
* @returns The updated appointment
|
|
6063
|
+
*/
|
|
6064
|
+
deleteZonePhoto(appointmentId: string, zoneId: string, photoType: 'before' | 'after'): Promise<Appointment>;
|
|
6017
6065
|
}
|
|
6018
6066
|
|
|
6019
6067
|
declare class UserService extends BaseService {
|
|
@@ -6848,9 +6896,9 @@ declare class ReviewService extends BaseService {
|
|
|
6848
6896
|
*/
|
|
6849
6897
|
createReview(data: Omit<Review, 'id' | 'createdAt' | 'updatedAt' | 'appointmentId' | 'overallRating'>, appointmentId: string): Promise<Review>;
|
|
6850
6898
|
/**
|
|
6851
|
-
* Gets a review by ID
|
|
6899
|
+
* Gets a review by ID with enhanced entity names
|
|
6852
6900
|
* @param reviewId The ID of the review to get
|
|
6853
|
-
* @returns The review if found, null otherwise
|
|
6901
|
+
* @returns The review with entity names if found, null otherwise
|
|
6854
6902
|
*/
|
|
6855
6903
|
getReview(reviewId: string): Promise<Review | null>;
|
|
6856
6904
|
/**
|
|
@@ -6860,21 +6908,21 @@ declare class ReviewService extends BaseService {
|
|
|
6860
6908
|
*/
|
|
6861
6909
|
getReviewsByPatient(patientId: string): Promise<Review[]>;
|
|
6862
6910
|
/**
|
|
6863
|
-
* Gets all reviews for a specific clinic
|
|
6911
|
+
* Gets all reviews for a specific clinic with enhanced entity names
|
|
6864
6912
|
* @param clinicId The ID of the clinic
|
|
6865
|
-
* @returns Array of reviews containing clinic reviews
|
|
6913
|
+
* @returns Array of reviews containing clinic reviews with clinic, practitioner, and procedure names
|
|
6866
6914
|
*/
|
|
6867
6915
|
getReviewsByClinic(clinicId: string): Promise<Review[]>;
|
|
6868
6916
|
/**
|
|
6869
|
-
* Gets all reviews for a specific practitioner
|
|
6917
|
+
* Gets all reviews for a specific practitioner with enhanced entity names
|
|
6870
6918
|
* @param practitionerId The ID of the practitioner
|
|
6871
|
-
* @returns Array of reviews containing practitioner reviews
|
|
6919
|
+
* @returns Array of reviews containing practitioner reviews with clinic, practitioner, and procedure names
|
|
6872
6920
|
*/
|
|
6873
6921
|
getReviewsByPractitioner(practitionerId: string): Promise<Review[]>;
|
|
6874
6922
|
/**
|
|
6875
|
-
* Gets all reviews for a specific procedure
|
|
6923
|
+
* Gets all reviews for a specific procedure with enhanced entity names
|
|
6876
6924
|
* @param procedureId The ID of the procedure
|
|
6877
|
-
* @returns Array of reviews containing procedure reviews
|
|
6925
|
+
* @returns Array of reviews containing procedure reviews with clinic, practitioner, and procedure names
|
|
6878
6926
|
*/
|
|
6879
6927
|
getReviewsByProcedure(procedureId: string): Promise<Review[]>;
|
|
6880
6928
|
/**
|
|
@@ -6920,4 +6968,4 @@ declare const getFirebaseApp: () => Promise<FirebaseApp>;
|
|
|
6920
6968
|
declare const getFirebaseStorage: () => Promise<FirebaseStorage>;
|
|
6921
6969
|
declare const getFirebaseFunctions: () => Promise<Functions>;
|
|
6922
6970
|
|
|
6923
|
-
export { APPOINTMENTS_COLLECTION, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, type Appointment, type AppointmentCancelledNotification, type AppointmentMediaItem, type AppointmentMetadata, type AppointmentReminderNotification, type AppointmentRescheduledProposalNotification, AppointmentService, AppointmentStatus, type AppointmentStatusChangeNotification, AuthService, type BaseDocumentElement, type BaseNotification, BaseService, type BeforeAfterPerZone, type BillingInfo, type BillingPerZone, type BillingTransaction, BillingTransactionType, BillingTransactionsService, type BinaryChoiceElement, BlockingCondition, type Brand, BrandService, CALENDAR_COLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, CalendarServiceV3, CalendarSyncStatus, type Category, CategoryService, CertificationLevel, CertificationSpecialty, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicBranchSetupData, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, ClinicPhotoTag, type ClinicReview, type ClinicReviewInfo, ClinicService, ClinicTag, type ClinicTags, ConstantsService, type ContactPerson, Contraindication, type ContraindicationDynamic, CosmeticAllergySubtype, type CreateAdminTokenData, type CreateAppointmentData, type CreateAppointmentHttpData, type CreateAppointmentParams, type CreateBillingTransactionData, type CreateBlockingEventParams, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreateManualPatientData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePatientTokenData, type CreatePractitionerData, type CreatePractitionerInviteData, type CreatePractitionerTokenData, type CreateProcedureData, type CreateSyncedCalendarData, type CreateUserData, Currency, DEFAULT_MEDICAL_INFO, DOCTOR_FORMS_SUBCOLLECTION, DOCUMENTATION_TEMPLATES_COLLECTION, type DatePickerElement, type DateRange, type DigitalSignatureElement, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, type DynamicTextElement, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, ExternalCalendarService, FILLED_DOCUMENTS_COLLECTION, type FileUploadElement, type FilledDocument, type FilledDocumentFileValue, FilledDocumentService, FilledDocumentStatus, type FinalBilling, type FirebaseUser, FoodAllergySubtype, type FormReminderNotification, type FormSubmissionConfirmationNotification, type GamificationInfo, Gender, type GeneralMessageNotification, type HeadingElement, HeadingLevel, INVITE_TOKENS_COLLECTION, Language, type LinkedFormInfo, type ListElement, ListType, type LocationData, MEDIA_METADATA_COLLECTION, MediaAccessLevel, type MediaMetadata, type MediaResource, MediaService, MediaType, MedicationAllergySubtype, type MultipleChoiceElement, NOTIFICATIONS_COLLECTION, type Notification, NotificationService, NotificationStatus, NotificationType, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, PATIENT_SENSITIVE_INFO_COLLECTION, PRACTITIONERS_COLLECTION, PRACTITIONER_INVITES_COLLECTION, PROCEDURES_COLLECTION, type ParagraphElement, type PatientClinic, type PatientDoctor, PatientInstructionStatus, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileForDoctor, type PatientProfileInfo, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, type PatientRequirementsFilters, PatientRequirementsService, type PatientReviewInfo, type PatientSensitiveInfo, PatientService, type PatientToken, PatientTokenStatus, type PaymentConfirmationNotification, PaymentStatus, type PlanDetails, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerClinicWorkingHours, type PractitionerInvite, type PractitionerInviteFilters, PractitionerInviteService, PractitionerInviteStatus, type PractitionerProfileInfo, type PractitionerReview, type PractitionerReviewInfo, PractitionerService, PractitionerStatus, type PractitionerToken, PractitionerTokenStatus, type PractitionerWorkingHours, type PreRequirementNotification, PricingMeasure, type Procedure, type ProcedureCategorization, type ProcedureExtendedInfo, ProcedureFamily, type ProcedureInfo, type ProcedureProduct, type ProcedureReview, type ProcedureReviewInfo, ProcedureService, type ProcedureSummaryInfo, type Product, ProductService, type ProposedWorkingHours, REGISTER_TOKENS_COLLECTION, REVIEWS_COLLECTION, type RatingScaleElement, type RequesterInfo, type Requirement, type RequirementInstructionDueNotification, RequirementType, type Review, type ReviewRequestNotification, ReviewService, SYNCED_CALENDARS_COLLECTION, type SearchAppointmentsParams, type SearchCalendarEventsParams, SearchLocationEnum, type SearchPatientsParams, type SignatureElement, type SingleChoiceElement, type StripeTransactionData, type Subcategory, SubcategoryService, SubscriptionModel, SubscriptionStatus, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, type Technology, type TechnologyDocumentationTemplate, TechnologyService, type TextInputElement, type TimeSlot, TimeUnit, TreatmentBenefit, type TreatmentBenefitDynamic, USERS_COLLECTION, USER_FORMS_SUBCOLLECTION, type UpdateAllergyData, type UpdateAppointmentData, type UpdateAppointmentParams, type UpdateBlockingConditionData, type UpdateBlockingEventParams, type UpdateCalendarEventData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdatePractitionerInviteData, type UpdateProcedureData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type VitalStats, type WorkingHours, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseFunctions, getFirebaseInstance, getFirebaseStorage, initializeFirebase };
|
|
6971
|
+
export { APPOINTMENTS_COLLECTION, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, type Appointment, type AppointmentCancelledNotification, type AppointmentMediaItem, type AppointmentMetadata, type AppointmentReminderNotification, type AppointmentRescheduledProposalNotification, AppointmentService, AppointmentStatus, type AppointmentStatusChangeNotification, AuthService, type BaseDocumentElement, type BaseNotification, BaseService, type BeforeAfterPerZone, type BillingInfo, type BillingPerZone, type BillingTransaction, BillingTransactionType, BillingTransactionsService, type BinaryChoiceElement, BlockingCondition, type Brand, BrandService, CALENDAR_COLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, CalendarServiceV3, CalendarSyncStatus, type Category, CategoryService, CertificationLevel, CertificationSpecialty, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicBranchSetupData, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, ClinicPhotoTag, type ClinicReview, type ClinicReviewInfo, ClinicService, ClinicTag, type ClinicTags, ConstantsService, type ContactPerson, Contraindication, type ContraindicationDynamic, CosmeticAllergySubtype, type CreateAdminTokenData, type CreateAppointmentData, type CreateAppointmentHttpData, type CreateAppointmentParams, type CreateBillingTransactionData, type CreateBlockingEventParams, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreateManualPatientData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePatientTokenData, type CreatePractitionerData, type CreatePractitionerInviteData, type CreatePractitionerTokenData, type CreateProcedureData, type CreateSyncedCalendarData, type CreateUserData, Currency, DEFAULT_MEDICAL_INFO, DOCTOR_FORMS_SUBCOLLECTION, DOCUMENTATION_TEMPLATES_COLLECTION, type DatePickerElement, type DateRange, type DigitalSignatureElement, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, type DynamicTextElement, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, ExternalCalendarService, FILLED_DOCUMENTS_COLLECTION, type FileUploadElement, type FilledDocument, type FilledDocumentFileValue, FilledDocumentService, FilledDocumentStatus, type FinalBilling, type FirebaseUser, FoodAllergySubtype, type FormReminderNotification, type FormSubmissionConfirmationNotification, type GamificationInfo, Gender, type GeneralMessageNotification, type HeadingElement, HeadingLevel, INVITE_TOKENS_COLLECTION, Language, type LinkedFormInfo, type ListElement, ListType, type LocationData, MEDIA_METADATA_COLLECTION, MediaAccessLevel, type MediaMetadata, type MediaResource, MediaService, MediaType, MedicationAllergySubtype, type MultipleChoiceElement, NOTIFICATIONS_COLLECTION, type Notification, NotificationService, NotificationStatus, NotificationType, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, PATIENT_SENSITIVE_INFO_COLLECTION, PRACTITIONERS_COLLECTION, PRACTITIONER_INVITES_COLLECTION, PROCEDURES_COLLECTION, type ParagraphElement, type PatientClinic, type PatientDoctor, PatientInstructionStatus, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileForDoctor, type PatientProfileInfo, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, type PatientRequirementsFilters, PatientRequirementsService, type PatientReviewInfo, type PatientSensitiveInfo, PatientService, type PatientToken, PatientTokenStatus, type PaymentConfirmationNotification, PaymentStatus, type PlanDetails, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerClinicWorkingHours, type PractitionerInvite, type PractitionerInviteFilters, PractitionerInviteService, PractitionerInviteStatus, type PractitionerProfileInfo, type PractitionerReview, type PractitionerReviewInfo, PractitionerService, PractitionerStatus, type PractitionerToken, PractitionerTokenStatus, type PractitionerWorkingHours, type PreRequirementNotification, PricingMeasure, type Procedure, type ProcedureCategorization, type ProcedureExtendedInfo, ProcedureFamily, type ProcedureInfo, type ProcedureProduct, type ProcedureReview, type ProcedureReviewInfo, ProcedureService, type ProcedureSummaryInfo, type Product, ProductService, type ProposedWorkingHours, REGISTER_TOKENS_COLLECTION, REVIEWS_COLLECTION, type RatingScaleElement, type RequesterInfo, type Requirement, type RequirementInstructionDueNotification, RequirementType, type Review, type ReviewRequestNotification, ReviewService, SYNCED_CALENDARS_COLLECTION, type SearchAppointmentsParams, type SearchCalendarEventsParams, SearchLocationEnum, type SearchPatientsParams, type SignatureElement, type SingleChoiceElement, type StripeTransactionData, type Subcategory, SubcategoryService, SubscriptionModel, SubscriptionStatus, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, type Technology, type TechnologyDocumentationTemplate, TechnologyService, type TextInputElement, type TimeSlot, TimeUnit, TreatmentBenefit, type TreatmentBenefitDynamic, USERS_COLLECTION, USER_FORMS_SUBCOLLECTION, type UpdateAllergyData, type UpdateAppointmentData, type UpdateAppointmentParams, type UpdateBlockingConditionData, type UpdateBlockingEventParams, type UpdateCalendarEventData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdatePractitionerInviteData, type UpdateProcedureData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type VitalStats, type WorkingHours, type ZonePhotoUploadData, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseFunctions, getFirebaseInstance, getFirebaseStorage, initializeFirebase };
|
package/dist/index.d.ts
CHANGED
|
@@ -132,6 +132,7 @@ interface Review {
|
|
|
132
132
|
id: string;
|
|
133
133
|
appointmentId: string;
|
|
134
134
|
patientId: string;
|
|
135
|
+
patientName?: string;
|
|
135
136
|
createdAt: Date;
|
|
136
137
|
updatedAt: Date;
|
|
137
138
|
clinicReview?: ClinicReview;
|
|
@@ -4357,6 +4358,16 @@ interface BeforeAfterPerZone {
|
|
|
4357
4358
|
afterNote?: string | null;
|
|
4358
4359
|
beforeNote?: string | null;
|
|
4359
4360
|
}
|
|
4361
|
+
/**
|
|
4362
|
+
* Interface for zone photo upload data
|
|
4363
|
+
*/
|
|
4364
|
+
interface ZonePhotoUploadData {
|
|
4365
|
+
appointmentId: string;
|
|
4366
|
+
zoneId: string;
|
|
4367
|
+
photoType: 'before' | 'after';
|
|
4368
|
+
file: File | Blob;
|
|
4369
|
+
notes?: string;
|
|
4370
|
+
}
|
|
4360
4371
|
/**
|
|
4361
4372
|
* Interface for billing information per zone
|
|
4362
4373
|
*/
|
|
@@ -5769,6 +5780,7 @@ declare class AppointmentService extends BaseService {
|
|
|
5769
5780
|
private practitionerService;
|
|
5770
5781
|
private clinicService;
|
|
5771
5782
|
private filledDocumentService;
|
|
5783
|
+
private mediaService;
|
|
5772
5784
|
private functions;
|
|
5773
5785
|
/**
|
|
5774
5786
|
* Creates a new AppointmentService instance.
|
|
@@ -5780,6 +5792,7 @@ declare class AppointmentService extends BaseService {
|
|
|
5780
5792
|
* @param patientService Patient service instance
|
|
5781
5793
|
* @param practitionerService Practitioner service instance
|
|
5782
5794
|
* @param clinicService Clinic service instance
|
|
5795
|
+
* @param filledDocumentService Filled document service instance
|
|
5783
5796
|
*/
|
|
5784
5797
|
constructor(db: Firestore, auth: Auth, app: FirebaseApp, calendarService: CalendarServiceV2, patientService: PatientService, practitionerService: PractitionerService, clinicService: ClinicService, filledDocumentService: FilledDocumentService);
|
|
5785
5798
|
/**
|
|
@@ -6014,6 +6027,41 @@ declare class AppointmentService extends BaseService {
|
|
|
6014
6027
|
* @returns The count of completed appointments.
|
|
6015
6028
|
*/
|
|
6016
6029
|
countCompletedAppointments(patientId: string, clinicBranchId?: string, excludeClinic?: boolean): Promise<number>;
|
|
6030
|
+
/**
|
|
6031
|
+
* Uploads a zone photo and updates appointment metadata
|
|
6032
|
+
*
|
|
6033
|
+
* @param uploadData Zone photo upload data containing appointment ID, zone ID, photo type, file, and optional notes
|
|
6034
|
+
* @returns The uploaded media metadata
|
|
6035
|
+
*/
|
|
6036
|
+
uploadZonePhoto(uploadData: ZonePhotoUploadData): Promise<MediaMetadata>;
|
|
6037
|
+
/**
|
|
6038
|
+
* Updates appointment metadata with zone photo information
|
|
6039
|
+
*
|
|
6040
|
+
* @param appointmentId ID of the appointment
|
|
6041
|
+
* @param zoneId ID of the zone
|
|
6042
|
+
* @param photoType Type of photo ('before' or 'after')
|
|
6043
|
+
* @param mediaMetadata Uploaded media metadata
|
|
6044
|
+
* @param notes Optional notes for the photo
|
|
6045
|
+
* @returns The updated appointment
|
|
6046
|
+
*/
|
|
6047
|
+
private updateAppointmentZonePhoto;
|
|
6048
|
+
/**
|
|
6049
|
+
* Gets zone photos for a specific appointment and zone
|
|
6050
|
+
*
|
|
6051
|
+
* @param appointmentId ID of the appointment
|
|
6052
|
+
* @param zoneId ID of the zone (optional - if not provided, returns all zones)
|
|
6053
|
+
* @returns Zone photos data
|
|
6054
|
+
*/
|
|
6055
|
+
getZonePhotos(appointmentId: string, zoneId?: string): Promise<Record<string, BeforeAfterPerZone> | BeforeAfterPerZone | null>;
|
|
6056
|
+
/**
|
|
6057
|
+
* Deletes a zone photo and updates appointment metadata
|
|
6058
|
+
*
|
|
6059
|
+
* @param appointmentId ID of the appointment
|
|
6060
|
+
* @param zoneId ID of the zone
|
|
6061
|
+
* @param photoType Type of photo to delete ('before' or 'after')
|
|
6062
|
+
* @returns The updated appointment
|
|
6063
|
+
*/
|
|
6064
|
+
deleteZonePhoto(appointmentId: string, zoneId: string, photoType: 'before' | 'after'): Promise<Appointment>;
|
|
6017
6065
|
}
|
|
6018
6066
|
|
|
6019
6067
|
declare class UserService extends BaseService {
|
|
@@ -6848,9 +6896,9 @@ declare class ReviewService extends BaseService {
|
|
|
6848
6896
|
*/
|
|
6849
6897
|
createReview(data: Omit<Review, 'id' | 'createdAt' | 'updatedAt' | 'appointmentId' | 'overallRating'>, appointmentId: string): Promise<Review>;
|
|
6850
6898
|
/**
|
|
6851
|
-
* Gets a review by ID
|
|
6899
|
+
* Gets a review by ID with enhanced entity names
|
|
6852
6900
|
* @param reviewId The ID of the review to get
|
|
6853
|
-
* @returns The review if found, null otherwise
|
|
6901
|
+
* @returns The review with entity names if found, null otherwise
|
|
6854
6902
|
*/
|
|
6855
6903
|
getReview(reviewId: string): Promise<Review | null>;
|
|
6856
6904
|
/**
|
|
@@ -6860,21 +6908,21 @@ declare class ReviewService extends BaseService {
|
|
|
6860
6908
|
*/
|
|
6861
6909
|
getReviewsByPatient(patientId: string): Promise<Review[]>;
|
|
6862
6910
|
/**
|
|
6863
|
-
* Gets all reviews for a specific clinic
|
|
6911
|
+
* Gets all reviews for a specific clinic with enhanced entity names
|
|
6864
6912
|
* @param clinicId The ID of the clinic
|
|
6865
|
-
* @returns Array of reviews containing clinic reviews
|
|
6913
|
+
* @returns Array of reviews containing clinic reviews with clinic, practitioner, and procedure names
|
|
6866
6914
|
*/
|
|
6867
6915
|
getReviewsByClinic(clinicId: string): Promise<Review[]>;
|
|
6868
6916
|
/**
|
|
6869
|
-
* Gets all reviews for a specific practitioner
|
|
6917
|
+
* Gets all reviews for a specific practitioner with enhanced entity names
|
|
6870
6918
|
* @param practitionerId The ID of the practitioner
|
|
6871
|
-
* @returns Array of reviews containing practitioner reviews
|
|
6919
|
+
* @returns Array of reviews containing practitioner reviews with clinic, practitioner, and procedure names
|
|
6872
6920
|
*/
|
|
6873
6921
|
getReviewsByPractitioner(practitionerId: string): Promise<Review[]>;
|
|
6874
6922
|
/**
|
|
6875
|
-
* Gets all reviews for a specific procedure
|
|
6923
|
+
* Gets all reviews for a specific procedure with enhanced entity names
|
|
6876
6924
|
* @param procedureId The ID of the procedure
|
|
6877
|
-
* @returns Array of reviews containing procedure reviews
|
|
6925
|
+
* @returns Array of reviews containing procedure reviews with clinic, practitioner, and procedure names
|
|
6878
6926
|
*/
|
|
6879
6927
|
getReviewsByProcedure(procedureId: string): Promise<Review[]>;
|
|
6880
6928
|
/**
|
|
@@ -6920,4 +6968,4 @@ declare const getFirebaseApp: () => Promise<FirebaseApp>;
|
|
|
6920
6968
|
declare const getFirebaseStorage: () => Promise<FirebaseStorage>;
|
|
6921
6969
|
declare const getFirebaseFunctions: () => Promise<Functions>;
|
|
6922
6970
|
|
|
6923
|
-
export { APPOINTMENTS_COLLECTION, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, type Appointment, type AppointmentCancelledNotification, type AppointmentMediaItem, type AppointmentMetadata, type AppointmentReminderNotification, type AppointmentRescheduledProposalNotification, AppointmentService, AppointmentStatus, type AppointmentStatusChangeNotification, AuthService, type BaseDocumentElement, type BaseNotification, BaseService, type BeforeAfterPerZone, type BillingInfo, type BillingPerZone, type BillingTransaction, BillingTransactionType, BillingTransactionsService, type BinaryChoiceElement, BlockingCondition, type Brand, BrandService, CALENDAR_COLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, CalendarServiceV3, CalendarSyncStatus, type Category, CategoryService, CertificationLevel, CertificationSpecialty, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicBranchSetupData, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, ClinicPhotoTag, type ClinicReview, type ClinicReviewInfo, ClinicService, ClinicTag, type ClinicTags, ConstantsService, type ContactPerson, Contraindication, type ContraindicationDynamic, CosmeticAllergySubtype, type CreateAdminTokenData, type CreateAppointmentData, type CreateAppointmentHttpData, type CreateAppointmentParams, type CreateBillingTransactionData, type CreateBlockingEventParams, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreateManualPatientData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePatientTokenData, type CreatePractitionerData, type CreatePractitionerInviteData, type CreatePractitionerTokenData, type CreateProcedureData, type CreateSyncedCalendarData, type CreateUserData, Currency, DEFAULT_MEDICAL_INFO, DOCTOR_FORMS_SUBCOLLECTION, DOCUMENTATION_TEMPLATES_COLLECTION, type DatePickerElement, type DateRange, type DigitalSignatureElement, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, type DynamicTextElement, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, ExternalCalendarService, FILLED_DOCUMENTS_COLLECTION, type FileUploadElement, type FilledDocument, type FilledDocumentFileValue, FilledDocumentService, FilledDocumentStatus, type FinalBilling, type FirebaseUser, FoodAllergySubtype, type FormReminderNotification, type FormSubmissionConfirmationNotification, type GamificationInfo, Gender, type GeneralMessageNotification, type HeadingElement, HeadingLevel, INVITE_TOKENS_COLLECTION, Language, type LinkedFormInfo, type ListElement, ListType, type LocationData, MEDIA_METADATA_COLLECTION, MediaAccessLevel, type MediaMetadata, type MediaResource, MediaService, MediaType, MedicationAllergySubtype, type MultipleChoiceElement, NOTIFICATIONS_COLLECTION, type Notification, NotificationService, NotificationStatus, NotificationType, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, PATIENT_SENSITIVE_INFO_COLLECTION, PRACTITIONERS_COLLECTION, PRACTITIONER_INVITES_COLLECTION, PROCEDURES_COLLECTION, type ParagraphElement, type PatientClinic, type PatientDoctor, PatientInstructionStatus, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileForDoctor, type PatientProfileInfo, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, type PatientRequirementsFilters, PatientRequirementsService, type PatientReviewInfo, type PatientSensitiveInfo, PatientService, type PatientToken, PatientTokenStatus, type PaymentConfirmationNotification, PaymentStatus, type PlanDetails, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerClinicWorkingHours, type PractitionerInvite, type PractitionerInviteFilters, PractitionerInviteService, PractitionerInviteStatus, type PractitionerProfileInfo, type PractitionerReview, type PractitionerReviewInfo, PractitionerService, PractitionerStatus, type PractitionerToken, PractitionerTokenStatus, type PractitionerWorkingHours, type PreRequirementNotification, PricingMeasure, type Procedure, type ProcedureCategorization, type ProcedureExtendedInfo, ProcedureFamily, type ProcedureInfo, type ProcedureProduct, type ProcedureReview, type ProcedureReviewInfo, ProcedureService, type ProcedureSummaryInfo, type Product, ProductService, type ProposedWorkingHours, REGISTER_TOKENS_COLLECTION, REVIEWS_COLLECTION, type RatingScaleElement, type RequesterInfo, type Requirement, type RequirementInstructionDueNotification, RequirementType, type Review, type ReviewRequestNotification, ReviewService, SYNCED_CALENDARS_COLLECTION, type SearchAppointmentsParams, type SearchCalendarEventsParams, SearchLocationEnum, type SearchPatientsParams, type SignatureElement, type SingleChoiceElement, type StripeTransactionData, type Subcategory, SubcategoryService, SubscriptionModel, SubscriptionStatus, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, type Technology, type TechnologyDocumentationTemplate, TechnologyService, type TextInputElement, type TimeSlot, TimeUnit, TreatmentBenefit, type TreatmentBenefitDynamic, USERS_COLLECTION, USER_FORMS_SUBCOLLECTION, type UpdateAllergyData, type UpdateAppointmentData, type UpdateAppointmentParams, type UpdateBlockingConditionData, type UpdateBlockingEventParams, type UpdateCalendarEventData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdatePractitionerInviteData, type UpdateProcedureData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type VitalStats, type WorkingHours, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseFunctions, getFirebaseInstance, getFirebaseStorage, initializeFirebase };
|
|
6971
|
+
export { APPOINTMENTS_COLLECTION, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, type Appointment, type AppointmentCancelledNotification, type AppointmentMediaItem, type AppointmentMetadata, type AppointmentReminderNotification, type AppointmentRescheduledProposalNotification, AppointmentService, AppointmentStatus, type AppointmentStatusChangeNotification, AuthService, type BaseDocumentElement, type BaseNotification, BaseService, type BeforeAfterPerZone, type BillingInfo, type BillingPerZone, type BillingTransaction, BillingTransactionType, BillingTransactionsService, type BinaryChoiceElement, BlockingCondition, type Brand, BrandService, CALENDAR_COLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, CalendarServiceV3, CalendarSyncStatus, type Category, CategoryService, CertificationLevel, CertificationSpecialty, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicBranchSetupData, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, ClinicPhotoTag, type ClinicReview, type ClinicReviewInfo, ClinicService, ClinicTag, type ClinicTags, ConstantsService, type ContactPerson, Contraindication, type ContraindicationDynamic, CosmeticAllergySubtype, type CreateAdminTokenData, type CreateAppointmentData, type CreateAppointmentHttpData, type CreateAppointmentParams, type CreateBillingTransactionData, type CreateBlockingEventParams, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreateManualPatientData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePatientTokenData, type CreatePractitionerData, type CreatePractitionerInviteData, type CreatePractitionerTokenData, type CreateProcedureData, type CreateSyncedCalendarData, type CreateUserData, Currency, DEFAULT_MEDICAL_INFO, DOCTOR_FORMS_SUBCOLLECTION, DOCUMENTATION_TEMPLATES_COLLECTION, type DatePickerElement, type DateRange, type DigitalSignatureElement, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, type DynamicTextElement, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, ExternalCalendarService, FILLED_DOCUMENTS_COLLECTION, type FileUploadElement, type FilledDocument, type FilledDocumentFileValue, FilledDocumentService, FilledDocumentStatus, type FinalBilling, type FirebaseUser, FoodAllergySubtype, type FormReminderNotification, type FormSubmissionConfirmationNotification, type GamificationInfo, Gender, type GeneralMessageNotification, type HeadingElement, HeadingLevel, INVITE_TOKENS_COLLECTION, Language, type LinkedFormInfo, type ListElement, ListType, type LocationData, MEDIA_METADATA_COLLECTION, MediaAccessLevel, type MediaMetadata, type MediaResource, MediaService, MediaType, MedicationAllergySubtype, type MultipleChoiceElement, NOTIFICATIONS_COLLECTION, type Notification, NotificationService, NotificationStatus, NotificationType, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, PATIENT_SENSITIVE_INFO_COLLECTION, PRACTITIONERS_COLLECTION, PRACTITIONER_INVITES_COLLECTION, PROCEDURES_COLLECTION, type ParagraphElement, type PatientClinic, type PatientDoctor, PatientInstructionStatus, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileForDoctor, type PatientProfileInfo, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, type PatientRequirementsFilters, PatientRequirementsService, type PatientReviewInfo, type PatientSensitiveInfo, PatientService, type PatientToken, PatientTokenStatus, type PaymentConfirmationNotification, PaymentStatus, type PlanDetails, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerClinicWorkingHours, type PractitionerInvite, type PractitionerInviteFilters, PractitionerInviteService, PractitionerInviteStatus, type PractitionerProfileInfo, type PractitionerReview, type PractitionerReviewInfo, PractitionerService, PractitionerStatus, type PractitionerToken, PractitionerTokenStatus, type PractitionerWorkingHours, type PreRequirementNotification, PricingMeasure, type Procedure, type ProcedureCategorization, type ProcedureExtendedInfo, ProcedureFamily, type ProcedureInfo, type ProcedureProduct, type ProcedureReview, type ProcedureReviewInfo, ProcedureService, type ProcedureSummaryInfo, type Product, ProductService, type ProposedWorkingHours, REGISTER_TOKENS_COLLECTION, REVIEWS_COLLECTION, type RatingScaleElement, type RequesterInfo, type Requirement, type RequirementInstructionDueNotification, RequirementType, type Review, type ReviewRequestNotification, ReviewService, SYNCED_CALENDARS_COLLECTION, type SearchAppointmentsParams, type SearchCalendarEventsParams, SearchLocationEnum, type SearchPatientsParams, type SignatureElement, type SingleChoiceElement, type StripeTransactionData, type Subcategory, SubcategoryService, SubscriptionModel, SubscriptionStatus, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, type Technology, type TechnologyDocumentationTemplate, TechnologyService, type TextInputElement, type TimeSlot, TimeUnit, TreatmentBenefit, type TreatmentBenefitDynamic, USERS_COLLECTION, USER_FORMS_SUBCOLLECTION, type UpdateAllergyData, type UpdateAppointmentData, type UpdateAppointmentParams, type UpdateBlockingConditionData, type UpdateBlockingEventParams, type UpdateCalendarEventData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdatePractitionerInviteData, type UpdateProcedureData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type VitalStats, type WorkingHours, type ZonePhotoUploadData, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseFunctions, getFirebaseInstance, getFirebaseStorage, initializeFirebase };
|