@blackcode_sa/metaestetics-api 1.12.7 → 1.12.10
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 +51 -33
- package/dist/admin/index.d.ts +51 -33
- package/dist/admin/index.js +30 -9
- package/dist/admin/index.mjs +30 -9
- package/dist/index.d.mts +79 -65
- package/dist/index.d.ts +79 -65
- package/dist/index.js +301 -616
- package/dist/index.mjs +315 -631
- package/package.json +1 -1
- package/src/admin/aggregation/forms/README.md +13 -0
- package/src/admin/aggregation/forms/filled-forms.aggregation.service.ts +71 -51
- package/src/services/appointment/README.md +17 -0
- package/src/services/appointment/appointment.service.ts +233 -386
- package/src/services/auth/auth.service.ts +243 -466
- package/src/services/clinic/billing-transactions.service.ts +4 -1
- package/src/services/clinic/index.ts +5 -5
- package/src/types/clinic/preferences.types.ts +115 -97
package/dist/index.d.ts
CHANGED
|
@@ -2785,49 +2785,67 @@ declare enum Language {
|
|
|
2785
2785
|
declare enum ClinicTag {
|
|
2786
2786
|
PARKING = "parking",
|
|
2787
2787
|
WIFI = "wifi",
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2788
|
+
LUXURY_WAITING = "luxury_waiting",
|
|
2789
|
+
REFRESHMENTS = "refreshments",
|
|
2790
|
+
PRIVATE_ROOMS = "private_rooms",
|
|
2791
|
+
RECOVERY_AREA = "recovery_area",
|
|
2792
2792
|
CARD_PAYMENT = "card_payment",
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2793
|
+
FINANCING = "financing",
|
|
2794
|
+
FREE_CONSULTATION = "free_consultation",
|
|
2795
|
+
VIRTUAL_CONSULTATION = "virtual_consultation",
|
|
2796
|
+
BEFORE_AFTER_PHOTOS = "before_after_photos",
|
|
2797
|
+
AFTERCARE_SUPPORT = "aftercare_support",
|
|
2798
|
+
BOTOX = "botox",
|
|
2799
|
+
DERMAL_FILLERS = "dermal_fillers",
|
|
2800
|
+
LASER_HAIR_REMOVAL = "laser_hair_removal",
|
|
2801
|
+
LASER_SKIN_RESURFACING = "laser_skin_resurfacing",
|
|
2802
|
+
CHEMICAL_PEELS = "chemical_peels",
|
|
2803
|
+
MICRONEEDLING = "microneedling",
|
|
2804
|
+
COOLSCULPTING = "coolsculpting",
|
|
2805
|
+
THREAD_LIFT = "thread_lift",
|
|
2806
|
+
LIP_ENHANCEMENT = "lip_enhancement",
|
|
2807
|
+
RHINOPLASTY = "rhinoplasty",
|
|
2808
|
+
SKIN_TIGHTENING = "skin_tightening",
|
|
2809
|
+
FAT_DISSOLVING = "fat_dissolving",
|
|
2810
|
+
PRP_TREATMENT = "prp_treatment",
|
|
2811
|
+
HYDRAFACIAL = "hydrafacial",
|
|
2812
|
+
IPL_PHOTOFACIAL = "ipl_photofacial",
|
|
2813
|
+
BODY_CONTOURING = "body_contouring",
|
|
2814
|
+
FACELIFT = "facelift",
|
|
2815
|
+
RHINOPLASTY_SURGICAL = "rhinoplasty_surgical",
|
|
2816
|
+
BREAST_AUGMENTATION = "breast_augmentation",
|
|
2817
|
+
BREAST_REDUCTION = "breast_reduction",
|
|
2818
|
+
BREAST_LIFT = "breast_lift",
|
|
2819
|
+
TUMMY_TUCK = "tummy_tuck",
|
|
2820
|
+
LIPOSUCTION = "liposuction",
|
|
2821
|
+
BBL = "bbl",
|
|
2822
|
+
MOMMY_MAKEOVER = "mommy_makeover",
|
|
2823
|
+
ARM_LIFT = "arm_lift",
|
|
2824
|
+
THIGH_LIFT = "thigh_lift",
|
|
2825
|
+
EYELID_SURGERY = "eyelid_surgery",
|
|
2826
|
+
BROW_LIFT = "brow_lift",
|
|
2827
|
+
NECK_LIFT = "neck_lift",
|
|
2828
|
+
OTOPLASTY = "otoplasty",
|
|
2829
|
+
LABIAPLASTY = "labiaplasty",
|
|
2817
2830
|
ONLINE_BOOKING = "online_booking",
|
|
2818
2831
|
MOBILE_APP = "mobile_app",
|
|
2819
2832
|
SMS_NOTIFICATIONS = "sms_notifications",
|
|
2820
2833
|
EMAIL_NOTIFICATIONS = "email_notifications",
|
|
2834
|
+
VIRTUAL_TRY_ON = "virtual_try_on",
|
|
2835
|
+
SKIN_ANALYSIS = "skin_analysis",
|
|
2836
|
+
TREATMENT_TRACKING = "treatment_tracking",
|
|
2837
|
+
LOYALTY_PROGRAM = "loyalty_program",
|
|
2821
2838
|
ENGLISH = "english",
|
|
2822
|
-
SERBIAN = "serbian",
|
|
2823
2839
|
GERMAN = "german",
|
|
2824
|
-
RUSSIAN = "russian",
|
|
2825
|
-
CHINESE = "chinese",
|
|
2826
|
-
SPANISH = "spanish",
|
|
2827
2840
|
FRENCH = "french",
|
|
2841
|
+
SPANISH = "spanish",
|
|
2842
|
+
ITALIAN = "italian",
|
|
2843
|
+
DUTCH = "dutch",
|
|
2844
|
+
RUSSIAN = "russian",
|
|
2845
|
+
PORTUGUESE = "portuguese",
|
|
2828
2846
|
OPEN_24_7 = "open_24_7",
|
|
2829
2847
|
WEEKEND_HOURS = "weekend_hours",
|
|
2830
|
-
|
|
2848
|
+
EXTENDED_HOURS = "extended_hours",
|
|
2831
2849
|
HOLIDAY_HOURS = "holiday_hours"
|
|
2832
2850
|
}
|
|
2833
2851
|
/**
|
|
@@ -5867,7 +5885,7 @@ declare class AppointmentService extends BaseService {
|
|
|
5867
5885
|
*/
|
|
5868
5886
|
updateAppointmentStatus(appointmentId: string, newStatus: AppointmentStatus, details?: {
|
|
5869
5887
|
cancellationReason?: string;
|
|
5870
|
-
canceledBy?:
|
|
5888
|
+
canceledBy?: 'patient' | 'clinic' | 'practitioner' | 'system';
|
|
5871
5889
|
}): Promise<Appointment>;
|
|
5872
5890
|
/**
|
|
5873
5891
|
* Confirms a PENDING appointment by an Admin/Clinic.
|
|
@@ -5926,7 +5944,7 @@ declare class AppointmentService extends BaseService {
|
|
|
5926
5944
|
/**
|
|
5927
5945
|
* Adds a media item to an appointment.
|
|
5928
5946
|
*/
|
|
5929
|
-
addMediaToAppointment(appointmentId: string, mediaItemData: Omit<AppointmentMediaItem,
|
|
5947
|
+
addMediaToAppointment(appointmentId: string, mediaItemData: Omit<AppointmentMediaItem, 'id' | 'uploadedAt'>): Promise<Appointment>;
|
|
5930
5948
|
/**
|
|
5931
5949
|
* Removes a media item from an appointment.
|
|
5932
5950
|
*/
|
|
@@ -5934,7 +5952,7 @@ declare class AppointmentService extends BaseService {
|
|
|
5934
5952
|
/**
|
|
5935
5953
|
* Adds or updates review information for an appointment.
|
|
5936
5954
|
*/
|
|
5937
|
-
addReviewToAppointment(appointmentId: string, reviewData: Omit<PatientReviewInfo,
|
|
5955
|
+
addReviewToAppointment(appointmentId: string, reviewData: Omit<PatientReviewInfo, 'reviewedAt' | 'reviewId'>): Promise<Appointment>;
|
|
5938
5956
|
/**
|
|
5939
5957
|
* Updates the payment status of an appointment.
|
|
5940
5958
|
*/
|
|
@@ -5984,6 +6002,15 @@ declare class AppointmentService extends BaseService {
|
|
|
5984
6002
|
appointments: Appointment[];
|
|
5985
6003
|
lastDoc: DocumentSnapshot | null;
|
|
5986
6004
|
}>;
|
|
6005
|
+
/**
|
|
6006
|
+
* Counts completed appointments for a patient with optional clinic filtering.
|
|
6007
|
+
*
|
|
6008
|
+
* @param patientId ID of the patient.
|
|
6009
|
+
* @param clinicBranchId Optional ID of the clinic branch to either include or exclude.
|
|
6010
|
+
* @param excludeClinic Optional boolean. If true (default), excludes the specified clinic. If false, includes only that clinic.
|
|
6011
|
+
* @returns The count of completed appointments.
|
|
6012
|
+
*/
|
|
6013
|
+
countCompletedAppointments(patientId: string, clinicBranchId?: string, excludeClinic?: boolean): Promise<number>;
|
|
5987
6014
|
}
|
|
5988
6015
|
|
|
5989
6016
|
declare class UserService extends BaseService {
|
|
@@ -6048,8 +6075,6 @@ declare class UserService extends BaseService {
|
|
|
6048
6075
|
|
|
6049
6076
|
declare class AuthService extends BaseService {
|
|
6050
6077
|
private googleProvider;
|
|
6051
|
-
private facebookProvider;
|
|
6052
|
-
private appleProvider;
|
|
6053
6078
|
private userService;
|
|
6054
6079
|
constructor(db: Firestore, auth: Auth, app: FirebaseApp, userService: UserService);
|
|
6055
6080
|
/**
|
|
@@ -6087,20 +6112,6 @@ declare class AuthService extends BaseService {
|
|
|
6087
6112
|
clinicAdmin: ClinicAdmin;
|
|
6088
6113
|
clinicGroup: ClinicGroup;
|
|
6089
6114
|
}>;
|
|
6090
|
-
/**
|
|
6091
|
-
* Prijavljuje korisnika sa Facebook-om
|
|
6092
|
-
*/
|
|
6093
|
-
signInWithFacebook(): Promise<User>;
|
|
6094
|
-
/**
|
|
6095
|
-
* Prijavljuje korisnika sa Google nalogom
|
|
6096
|
-
*/
|
|
6097
|
-
signInWithGoogle(initialRole?: UserRole, options?: {
|
|
6098
|
-
patientInviteToken?: string;
|
|
6099
|
-
}): Promise<User>;
|
|
6100
|
-
/**
|
|
6101
|
-
* Prijavljuje korisnika sa Apple-om
|
|
6102
|
-
*/
|
|
6103
|
-
signInWithApple(): Promise<User>;
|
|
6104
6115
|
/**
|
|
6105
6116
|
* Prijavljuje korisnika anonimno
|
|
6106
6117
|
*/
|
|
@@ -6118,19 +6129,6 @@ declare class AuthService extends BaseService {
|
|
|
6118
6129
|
*/
|
|
6119
6130
|
onAuthStateChange(callback: (user: User$1 | null) => void): () => void;
|
|
6120
6131
|
upgradeAnonymousUser(email: string, password: string): Promise<User>;
|
|
6121
|
-
/**
|
|
6122
|
-
* Upgrades an anonymous user to a regular user by signing in with a Google account.
|
|
6123
|
-
*
|
|
6124
|
-
* @throws {AuthError} If the user is not anonymous.
|
|
6125
|
-
* @throws {AuthError} If the user is not authenticated.
|
|
6126
|
-
* @throws {AuthError} If the popup window is closed by the user.
|
|
6127
|
-
* @throws {FirebaseError} If any other Firebase error occurs.
|
|
6128
|
-
*
|
|
6129
|
-
* @returns {Promise<User>} The upgraded user.
|
|
6130
|
-
*/
|
|
6131
|
-
upgradeAnonymousUserWithGoogle(): Promise<User>;
|
|
6132
|
-
upgradeAnonymousUserWithFacebook(): Promise<User>;
|
|
6133
|
-
upgradeAnonymousUserWithApple(): Promise<User>;
|
|
6134
6132
|
/**
|
|
6135
6133
|
* Šalje email za resetovanje lozinke korisniku
|
|
6136
6134
|
* @param email Email adresa korisnika
|
|
@@ -6185,6 +6183,22 @@ declare class AuthService extends BaseService {
|
|
|
6185
6183
|
user: User;
|
|
6186
6184
|
practitioner: Practitioner;
|
|
6187
6185
|
}>;
|
|
6186
|
+
/**
|
|
6187
|
+
* Signs in a user with a Google ID token from a mobile client.
|
|
6188
|
+
* If the user does not exist, a new user is created.
|
|
6189
|
+
* @param idToken - The Google ID token obtained from the mobile app.
|
|
6190
|
+
* @param initialRole - The role to assign to the user if they are being created.
|
|
6191
|
+
* @returns The signed-in or newly created user.
|
|
6192
|
+
*/
|
|
6193
|
+
signInWithGoogleIdToken(idToken: string, initialRole?: UserRole): Promise<User>;
|
|
6194
|
+
/**
|
|
6195
|
+
* Links a Google account to the currently signed-in user using an ID token.
|
|
6196
|
+
* This is used to upgrade an anonymous user or to allow an existing user
|
|
6197
|
+
* to sign in with Google in the future.
|
|
6198
|
+
* @param idToken - The Google ID token obtained from the mobile app.
|
|
6199
|
+
* @returns The updated user profile.
|
|
6200
|
+
*/
|
|
6201
|
+
linkGoogleAccount(idToken: string): Promise<User>;
|
|
6188
6202
|
}
|
|
6189
6203
|
|
|
6190
6204
|
/**
|