@blackcode_sa/metaestetics-api 1.6.3 → 1.6.5

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 (40) hide show
  1. package/dist/admin/index.d.mts +439 -25
  2. package/dist/admin/index.d.ts +439 -25
  3. package/dist/admin/index.js +36107 -2493
  4. package/dist/admin/index.mjs +36093 -2461
  5. package/dist/backoffice/index.d.mts +254 -1
  6. package/dist/backoffice/index.d.ts +254 -1
  7. package/dist/backoffice/index.js +86 -12
  8. package/dist/backoffice/index.mjs +86 -13
  9. package/dist/index.d.mts +1434 -621
  10. package/dist/index.d.ts +1434 -621
  11. package/dist/index.js +1381 -970
  12. package/dist/index.mjs +1433 -1016
  13. package/package.json +1 -1
  14. package/src/admin/aggregation/appointment/appointment.aggregation.service.ts +321 -0
  15. package/src/admin/booking/booking.admin.ts +376 -3
  16. package/src/admin/index.ts +15 -1
  17. package/src/admin/notifications/notifications.admin.ts +1 -1
  18. package/src/admin/requirements/README.md +128 -0
  19. package/src/admin/requirements/patient-requirements.admin.service.ts +482 -0
  20. package/src/backoffice/types/product.types.ts +2 -0
  21. package/src/index.ts +16 -1
  22. package/src/services/appointment/appointment.service.ts +386 -250
  23. package/src/services/clinic/clinic-admin.service.ts +3 -0
  24. package/src/services/clinic/clinic-group.service.ts +8 -0
  25. package/src/services/documentation-templates/documentation-template.service.ts +24 -16
  26. package/src/services/documentation-templates/filled-document.service.ts +253 -136
  27. package/src/services/patient/patientRequirements.service.ts +285 -0
  28. package/src/services/procedure/procedure.service.ts +1 -0
  29. package/src/types/appointment/index.ts +136 -11
  30. package/src/types/documentation-templates/index.ts +34 -2
  31. package/src/types/notifications/README.md +77 -0
  32. package/src/types/notifications/index.ts +154 -27
  33. package/src/types/patient/patient-requirements.ts +81 -0
  34. package/src/types/procedure/index.ts +7 -0
  35. package/src/validations/appointment.schema.ts +298 -62
  36. package/src/validations/documentation-templates/template.schema.ts +55 -0
  37. package/src/validations/documentation-templates.schema.ts +9 -14
  38. package/src/validations/notification.schema.ts +3 -3
  39. package/src/validations/patient/patient-requirements.schema.ts +75 -0
  40. package/src/validations/procedure.schema.ts +3 -0
package/dist/index.d.ts CHANGED
@@ -376,6 +376,7 @@ declare enum DocumentElementType {
376
376
  TEXT_INPUT = "text_input",
377
377
  DATE_PICKER = "date_picker",
378
378
  SIGNATURE = "signature",
379
+ DITIGAL_SIGNATURE = "digital_signature",
379
380
  FILE_UPLOAD = "file_upload"
380
381
  }
381
382
  /**
@@ -405,7 +406,12 @@ declare enum DynamicVariable {
405
406
  CLINIC_NAME = "[CLINIC_NAME]",
406
407
  PATIENT_BIRTHDAY = "[PATIENT_BIRTHDAY]",
407
408
  APPOINTMENT_DATE = "[APPOINTMENT_DATE]",
408
- CURRENT_DATE = "[CURRENT_DATE]"
409
+ CURRENT_DATE = "[CURRENT_DATE]",
410
+ PROCEDURE_NAME = "[PROCEDURE_NAME]",
411
+ PROCEDURE_DESCRIPTION = "[PROCEDURE_DESCRIPTION]",
412
+ PROCEDURE_COST = "[PROCEDURE_COST]",
413
+ PROCEDURE_DURATION = "[PROCEDURE_DURATION]",
414
+ PROCEDURE_RISK = "[PROCEDURE_RISK]"
409
415
  }
410
416
  /**
411
417
  * Base interface for all document elements
@@ -534,6 +540,9 @@ interface DocumentTemplate {
534
540
  createdBy: string;
535
541
  elements: DocumentElement[];
536
542
  tags?: string[];
543
+ isUserForm?: boolean;
544
+ isRequired?: boolean;
545
+ sortingOrder?: number;
537
546
  version: number;
538
547
  isActive: boolean;
539
548
  }
@@ -545,6 +554,9 @@ interface CreateDocumentTemplateData {
545
554
  description?: string;
546
555
  elements: Omit<DocumentElement, "id">[];
547
556
  tags?: string[];
557
+ isUserForm?: boolean;
558
+ isRequired?: boolean;
559
+ sortingOrder?: number;
548
560
  }
549
561
  /**
550
562
  * Interface for updating an existing document template
@@ -555,6 +567,9 @@ interface UpdateDocumentTemplateData {
555
567
  elements?: Omit<DocumentElement, "id">[];
556
568
  tags?: string[];
557
569
  isActive?: boolean;
570
+ isUserForm?: boolean;
571
+ isRequired?: boolean;
572
+ sortingOrder?: number;
558
573
  }
559
574
  /**
560
575
  * Interface for a filled document (completed form)
@@ -563,6 +578,10 @@ interface FilledDocument {
563
578
  id: string;
564
579
  templateId: string;
565
580
  templateVersion: number;
581
+ isUserForm: boolean;
582
+ isRequired: boolean;
583
+ procedureId: string;
584
+ appointmentId: string;
566
585
  patientId: string;
567
586
  practitionerId: string;
568
587
  clinicId: string;
@@ -578,8 +597,11 @@ interface FilledDocument {
578
597
  */
579
598
  declare enum FilledDocumentStatus {
580
599
  DRAFT = "draft",
581
- COMPLETED = "completed",
582
- SIGNED = "signed"
600
+ SKIPPED = "skipped",
601
+ PENDING = "pending",
602
+ COMPLETED = "completed",// When doctor or patient completes the form
603
+ SIGNED = "signed",// Only used for user forms
604
+ REJECTED = "rejected"
583
605
  }
584
606
 
585
607
  /**
@@ -649,7 +671,9 @@ interface Product {
649
671
  id?: string;
650
672
  name: string;
651
673
  brandId: string;
674
+ brandName: string;
652
675
  technologyId: string;
676
+ technologyName: string;
653
677
  createdAt: Date;
654
678
  updatedAt: Date;
655
679
  isActive: boolean;
@@ -728,6 +752,8 @@ interface Procedure {
728
752
  id: string;
729
753
  /** Name of the procedure */
730
754
  name: string;
755
+ /** Photos of the procedure */
756
+ photos?: string[];
731
757
  /** Detailed description of the procedure */
732
758
  description: string;
733
759
  /** Family of procedures this belongs to (aesthetics/surgery) */
@@ -752,6 +778,8 @@ interface Procedure {
752
778
  blockingConditions: BlockingCondition[];
753
779
  /** Treatment benefits of this procedure */
754
780
  treatmentBenefits: TreatmentBenefit[];
781
+ /** Contraindications of this procedure */
782
+ contraindications: Contraindication[];
755
783
  /** Pre-procedure requirements */
756
784
  preRequirements: Requirement[];
757
785
  /** Post-procedure requirements */
@@ -794,6 +822,7 @@ interface CreateProcedureData {
794
822
  duration: number;
795
823
  practitionerId: string;
796
824
  clinicBranchId: string;
825
+ photos?: string[];
797
826
  }
798
827
  /**
799
828
  * Data that can be updated for an existing procedure
@@ -812,6 +841,7 @@ interface UpdateProcedureData {
812
841
  technologyId?: string;
813
842
  productId?: string;
814
843
  clinicBranchId?: string;
844
+ photos?: string[];
815
845
  }
816
846
  /**
817
847
  * Collection name for procedures in Firestore
@@ -1947,355 +1977,53 @@ interface PatientProfileInfo {
1947
1977
  }
1948
1978
 
1949
1979
  /**
1950
- * Enum defining the possible statuses of an appointment.
1951
- */
1952
- declare enum AppointmentStatus {
1953
- SCHEDULED = "scheduled",// Initial state after booking, before confirmation (if applicable)
1954
- CONFIRMED = "confirmed",// Confirmed by clinic/practitioner
1955
- CHECKED_IN = "checked_in",// Patient has arrived
1956
- IN_PROGRESS = "in_progress",// Procedure has started
1957
- COMPLETED = "completed",// Procedure finished successfully
1958
- CANCELED_PATIENT = "canceled_patient",// Canceled by the patient
1959
- CANCELED_CLINIC = "canceled_clinic",// Canceled by the clinic/practitioner
1960
- NO_SHOW = "no_show",// Patient did not attend
1961
- RESCHEDULED = "rescheduled"
1962
- }
1963
- /**
1964
- * Enum defining the payment status of an appointment.
1965
- */
1966
- declare enum PaymentStatus {
1967
- UNPAID = "unpaid",
1968
- PAID = "paid",
1969
- PARTIALLY_PAID = "partially_paid",
1970
- REFUNDED = "refunded",
1971
- NOT_APPLICABLE = "not_applicable"
1972
- }
1973
- /**
1974
- * Represents a booked appointment, aggregating key information and relevant procedure rules.
1975
- */
1976
- interface Appointment {
1977
- /** Unique identifier for the appointment */
1978
- id: string;
1979
- /** Reference to the associated CalendarEvent */
1980
- calendarEventId: string;
1981
- /** ID of the clinic branch */
1982
- clinicBranchId: string;
1983
- /** Aggregated clinic information (snapshot) */
1984
- clinicInfo: ClinicInfo;
1985
- /** ID of the practitioner */
1986
- practitionerId: string;
1987
- /** Aggregated practitioner information (snapshot) */
1988
- practitionerInfo: PractitionerProfileInfo;
1989
- /** ID of the patient */
1990
- patientId: string;
1991
- /** Aggregated patient information (snapshot) */
1992
- patientInfo: PatientProfileInfo;
1993
- /** ID of the procedure */
1994
- procedureId: string;
1995
- /** Aggregated procedure information including product/brand (snapshot) */
1996
- procedureInfo: ProcedureSummaryInfo;
1997
- /** Status of the appointment */
1998
- status: AppointmentStatus;
1999
- /** Timestamps */
2000
- bookingTime: Timestamp;
2001
- confirmationTime?: Timestamp | null;
2002
- appointmentStartTime: Timestamp;
2003
- appointmentEndTime: Timestamp;
2004
- actualDurationMinutes?: number;
2005
- /** Cancellation Details */
2006
- cancellationReason?: string | null;
2007
- canceledBy?: "patient" | "clinic" | "practitioner" | "system";
2008
- /** Notes */
2009
- internalNotes?: string | null;
2010
- patientNotes?: string | null;
2011
- /** Payment Details */
2012
- cost: number;
2013
- currency: Currency;
2014
- paymentStatus: PaymentStatus;
2015
- paymentTransactionId?: string | null;
2016
- /** Procedure-related conditions and requirements */
2017
- blockingConditions: BlockingCondition[];
2018
- contraindications: Contraindication[];
2019
- preProcedureRequirements: Requirement[];
2020
- postProcedureRequirements: Requirement[];
2021
- /** Tracking information for requirements completion */
2022
- completedPreRequirements?: string[];
2023
- completedPostRequirements?: string[];
2024
- /** Timestamps */
2025
- createdAt: Timestamp;
2026
- updatedAt: Timestamp;
2027
- /** Recurring appointment information */
2028
- isRecurring?: boolean;
2029
- recurringAppointmentId?: string | null;
2030
- }
2031
- /**
2032
- * Data needed to create a new Appointment
2033
- */
2034
- interface CreateAppointmentData {
2035
- calendarEventId: string;
2036
- clinicBranchId: string;
2037
- practitionerId: string;
2038
- patientId: string;
2039
- procedureId: string;
2040
- appointmentStartTime: Timestamp;
2041
- appointmentEndTime: Timestamp;
2042
- cost: number;
2043
- currency: Currency;
2044
- patientNotes?: string | null;
2045
- initialStatus: AppointmentStatus;
2046
- initialPaymentStatus?: PaymentStatus;
2047
- }
2048
- /**
2049
- * Data allowed for updating an Appointment
2050
- */
2051
- interface UpdateAppointmentData {
2052
- status?: AppointmentStatus;
2053
- confirmationTime?: Timestamp | null;
2054
- actualDurationMinutes?: number;
2055
- cancellationReason?: string | null;
2056
- canceledBy?: "patient" | "clinic" | "practitioner" | "system";
2057
- internalNotes?: string | null;
2058
- paymentStatus?: PaymentStatus;
2059
- paymentTransactionId?: string | null;
2060
- completedPreRequirements?: string[];
2061
- completedPostRequirements?: string[];
2062
- }
2063
- /**
2064
- * Parameters for searching appointments
1980
+ * Brend proizvoda ili opreme
1981
+ * Predstavlja proizvođača ili dobavljača proizvoda i opreme koja se koristi u procedurama
1982
+ *
1983
+ * @property id - Jedinstveni identifikator brenda
1984
+ * @property name - Naziv brenda
1985
+ * @property manufacturer - Naziv proizvođača
1986
+ * @property description - Detaljan opis brenda i njegovih proizvoda
1987
+ * @property website - Web stranica brenda
1988
+ * @property isActive - Da li je brend aktivan u sistemu
1989
+ * @property createdAt - Datum kreiranja
1990
+ * @property updatedAt - Datum poslednjeg ažuriranja
2065
1991
  */
2066
- interface SearchAppointmentsParams {
2067
- patientId?: string;
2068
- practitionerId?: string;
2069
- clinicBranchId?: string;
2070
- startDate?: Date;
2071
- endDate?: Date;
2072
- status?: AppointmentStatus | AppointmentStatus[];
2073
- limit?: number;
2074
- startAfter?: any;
1992
+ interface Brand {
1993
+ id?: string;
1994
+ name: string;
1995
+ manufacturer: string;
1996
+ createdAt: Date;
1997
+ updatedAt: Date;
1998
+ isActive: boolean;
1999
+ website?: string;
2000
+ description?: string;
2075
2001
  }
2076
- /** Firestore collection name */
2077
- declare const APPOINTMENTS_COLLECTION = "appointments";
2078
2002
 
2079
- /**
2080
- * Schema for validating appointment creation data
2081
- */
2082
- declare const createAppointmentSchema: z.ZodObject<{
2083
- calendarEventId: z.ZodString;
2084
- clinicBranchId: z.ZodString;
2085
- practitionerId: z.ZodString;
2086
- patientId: z.ZodString;
2087
- procedureId: z.ZodString;
2088
- appointmentStartTime: z.ZodEffects<z.ZodAny, any, any>;
2089
- appointmentEndTime: z.ZodEffects<z.ZodAny, any, any>;
2090
- cost: z.ZodNumber;
2091
- currency: z.ZodString;
2092
- patientNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2093
- initialStatus: z.ZodNativeEnum<typeof AppointmentStatus>;
2094
- initialPaymentStatus: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof PaymentStatus>>>;
2095
- }, "strip", z.ZodTypeAny, {
2096
- patientId: string;
2097
- practitionerId: string;
2098
- calendarEventId: string;
2099
- clinicBranchId: string;
2100
- procedureId: string;
2101
- cost: number;
2102
- currency: string;
2103
- initialStatus: AppointmentStatus;
2104
- initialPaymentStatus: PaymentStatus;
2105
- appointmentStartTime?: any;
2106
- appointmentEndTime?: any;
2107
- patientNotes?: string | null | undefined;
2003
+ declare const documentElementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
2004
+ id: z.ZodOptional<z.ZodString>;
2005
+ type: z.ZodNativeEnum<typeof DocumentElementType>;
2006
+ required: z.ZodOptional<z.ZodBoolean>;
2108
2007
  }, {
2109
- patientId: string;
2110
- practitionerId: string;
2111
- calendarEventId: string;
2112
- clinicBranchId: string;
2113
- procedureId: string;
2114
- cost: number;
2115
- currency: string;
2116
- initialStatus: AppointmentStatus;
2117
- appointmentStartTime?: any;
2118
- appointmentEndTime?: any;
2119
- patientNotes?: string | null | undefined;
2120
- initialPaymentStatus?: PaymentStatus | undefined;
2121
- }>;
2122
- /**
2123
- * Schema for validating appointment update data
2124
- */
2125
- declare const updateAppointmentSchema: z.ZodEffects<z.ZodObject<{
2126
- status: z.ZodOptional<z.ZodNativeEnum<typeof AppointmentStatus>>;
2127
- confirmationTime: z.ZodOptional<z.ZodEffects<z.ZodAny, any, any>>;
2128
- actualDurationMinutes: z.ZodOptional<z.ZodNumber>;
2129
- cancellationReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2130
- canceledBy: z.ZodOptional<z.ZodEnum<["patient", "clinic", "practitioner", "system"]>>;
2131
- internalNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2132
- paymentStatus: z.ZodOptional<z.ZodNativeEnum<typeof PaymentStatus>>;
2133
- paymentTransactionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2134
- completedPreRequirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2135
- completedPostRequirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2136
- }, "strip", z.ZodTypeAny, {
2137
- status?: AppointmentStatus | undefined;
2138
- confirmationTime?: any;
2139
- actualDurationMinutes?: number | undefined;
2140
- cancellationReason?: string | null | undefined;
2141
- canceledBy?: "practitioner" | "patient" | "clinic" | "system" | undefined;
2142
- internalNotes?: string | null | undefined;
2143
- paymentStatus?: PaymentStatus | undefined;
2144
- paymentTransactionId?: string | null | undefined;
2145
- completedPreRequirements?: string[] | undefined;
2146
- completedPostRequirements?: string[] | undefined;
2008
+ type: z.ZodLiteral<DocumentElementType.HEADING>;
2009
+ text: z.ZodString;
2010
+ level: z.ZodNativeEnum<typeof HeadingLevel>;
2011
+ }>, "strip", z.ZodTypeAny, {
2012
+ type: DocumentElementType.HEADING;
2013
+ text: string;
2014
+ level: HeadingLevel;
2015
+ id?: string | undefined;
2016
+ required?: boolean | undefined;
2147
2017
  }, {
2148
- status?: AppointmentStatus | undefined;
2149
- confirmationTime?: any;
2150
- actualDurationMinutes?: number | undefined;
2151
- cancellationReason?: string | null | undefined;
2152
- canceledBy?: "practitioner" | "patient" | "clinic" | "system" | undefined;
2153
- internalNotes?: string | null | undefined;
2154
- paymentStatus?: PaymentStatus | undefined;
2155
- paymentTransactionId?: string | null | undefined;
2156
- completedPreRequirements?: string[] | undefined;
2157
- completedPostRequirements?: string[] | undefined;
2158
- }>, {
2159
- status?: AppointmentStatus | undefined;
2160
- confirmationTime?: any;
2161
- actualDurationMinutes?: number | undefined;
2162
- cancellationReason?: string | null | undefined;
2163
- canceledBy?: "practitioner" | "patient" | "clinic" | "system" | undefined;
2164
- internalNotes?: string | null | undefined;
2165
- paymentStatus?: PaymentStatus | undefined;
2166
- paymentTransactionId?: string | null | undefined;
2167
- completedPreRequirements?: string[] | undefined;
2168
- completedPostRequirements?: string[] | undefined;
2169
- }, {
2170
- status?: AppointmentStatus | undefined;
2171
- confirmationTime?: any;
2172
- actualDurationMinutes?: number | undefined;
2173
- cancellationReason?: string | null | undefined;
2174
- canceledBy?: "practitioner" | "patient" | "clinic" | "system" | undefined;
2175
- internalNotes?: string | null | undefined;
2176
- paymentStatus?: PaymentStatus | undefined;
2177
- paymentTransactionId?: string | null | undefined;
2178
- completedPreRequirements?: string[] | undefined;
2179
- completedPostRequirements?: string[] | undefined;
2180
- }>;
2181
- /**
2182
- * Schema for validating appointment search parameters
2183
- */
2184
- declare const searchAppointmentsSchema: z.ZodEffects<z.ZodObject<{
2185
- patientId: z.ZodOptional<z.ZodString>;
2186
- practitionerId: z.ZodOptional<z.ZodString>;
2187
- clinicBranchId: z.ZodOptional<z.ZodString>;
2188
- startDate: z.ZodOptional<z.ZodDate>;
2189
- endDate: z.ZodOptional<z.ZodDate>;
2190
- status: z.ZodOptional<z.ZodUnion<[z.ZodNativeEnum<typeof AppointmentStatus>, z.ZodArray<z.ZodNativeEnum<typeof AppointmentStatus>, "many">]>>;
2191
- limit: z.ZodOptional<z.ZodNumber>;
2192
- startAfter: z.ZodOptional<z.ZodAny>;
2193
- }, "strip", z.ZodTypeAny, {
2194
- status?: AppointmentStatus | AppointmentStatus[] | undefined;
2195
- patientId?: string | undefined;
2196
- startDate?: Date | undefined;
2197
- endDate?: Date | undefined;
2198
- limit?: number | undefined;
2199
- startAfter?: any;
2200
- practitionerId?: string | undefined;
2201
- clinicBranchId?: string | undefined;
2202
- }, {
2203
- status?: AppointmentStatus | AppointmentStatus[] | undefined;
2204
- patientId?: string | undefined;
2205
- startDate?: Date | undefined;
2206
- endDate?: Date | undefined;
2207
- limit?: number | undefined;
2208
- startAfter?: any;
2209
- practitionerId?: string | undefined;
2210
- clinicBranchId?: string | undefined;
2211
- }>, {
2212
- status?: AppointmentStatus | AppointmentStatus[] | undefined;
2213
- patientId?: string | undefined;
2214
- startDate?: Date | undefined;
2215
- endDate?: Date | undefined;
2216
- limit?: number | undefined;
2217
- startAfter?: any;
2218
- practitionerId?: string | undefined;
2219
- clinicBranchId?: string | undefined;
2220
- }, {
2221
- status?: AppointmentStatus | AppointmentStatus[] | undefined;
2222
- patientId?: string | undefined;
2223
- startDate?: Date | undefined;
2224
- endDate?: Date | undefined;
2225
- limit?: number | undefined;
2226
- startAfter?: any;
2227
- practitionerId?: string | undefined;
2228
- clinicBranchId?: string | undefined;
2229
- }>;
2230
-
2231
- interface FirebaseInstance {
2232
- app: FirebaseApp;
2233
- db: Firestore;
2234
- auth: Auth;
2235
- analytics: Analytics | null;
2236
- }
2237
- declare const initializeFirebase: (config: {
2238
- apiKey: string;
2239
- authDomain: string;
2240
- projectId: string;
2241
- storageBucket: string;
2242
- messagingSenderId: string;
2243
- appId: string;
2244
- measurementId?: string;
2245
- }) => FirebaseInstance;
2246
- declare const getFirebaseInstance: () => Promise<FirebaseInstance>;
2247
- declare const getFirebaseAuth: () => Promise<Auth>;
2248
- declare const getFirebaseDB: () => Promise<Firestore>;
2249
- declare const getFirebaseApp: () => Promise<FirebaseApp>;
2250
-
2251
- /**
2252
- * Brend proizvoda ili opreme
2253
- * Predstavlja proizvođača ili dobavljača proizvoda i opreme koja se koristi u procedurama
2254
- *
2255
- * @property id - Jedinstveni identifikator brenda
2256
- * @property name - Naziv brenda
2257
- * @property manufacturer - Naziv proizvođača
2258
- * @property description - Detaljan opis brenda i njegovih proizvoda
2259
- * @property website - Web stranica brenda
2260
- * @property isActive - Da li je brend aktivan u sistemu
2261
- * @property createdAt - Datum kreiranja
2262
- * @property updatedAt - Datum poslednjeg ažuriranja
2263
- */
2264
- interface Brand {
2265
- id?: string;
2266
- name: string;
2267
- manufacturer: string;
2268
- createdAt: Date;
2269
- updatedAt: Date;
2270
- isActive: boolean;
2271
- website?: string;
2272
- description?: string;
2273
- }
2274
-
2275
- declare const documentElementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
2276
- id: z.ZodOptional<z.ZodString>;
2277
- type: z.ZodNativeEnum<typeof DocumentElementType>;
2278
- required: z.ZodOptional<z.ZodBoolean>;
2279
- }, {
2280
- type: z.ZodLiteral<DocumentElementType.HEADING>;
2281
- text: z.ZodString;
2282
- level: z.ZodNativeEnum<typeof HeadingLevel>;
2283
- }>, "strip", z.ZodTypeAny, {
2284
- type: DocumentElementType.HEADING;
2285
- text: string;
2286
- level: HeadingLevel;
2287
- id?: string | undefined;
2288
- required?: boolean | undefined;
2289
- }, {
2290
- type: DocumentElementType.HEADING;
2291
- text: string;
2292
- level: HeadingLevel;
2293
- id?: string | undefined;
2294
- required?: boolean | undefined;
2295
- }>, z.ZodObject<z.objectUtil.extendShape<{
2296
- id: z.ZodOptional<z.ZodString>;
2297
- type: z.ZodNativeEnum<typeof DocumentElementType>;
2298
- required: z.ZodOptional<z.ZodBoolean>;
2018
+ type: DocumentElementType.HEADING;
2019
+ text: string;
2020
+ level: HeadingLevel;
2021
+ id?: string | undefined;
2022
+ required?: boolean | undefined;
2023
+ }>, z.ZodObject<z.objectUtil.extendShape<{
2024
+ id: z.ZodOptional<z.ZodString>;
2025
+ type: z.ZodNativeEnum<typeof DocumentElementType>;
2026
+ required: z.ZodOptional<z.ZodBoolean>;
2299
2027
  }, {
2300
2028
  type: z.ZodLiteral<DocumentElementType.PARAGRAPH>;
2301
2029
  text: z.ZodString;
@@ -2508,6 +2236,23 @@ declare const documentElementSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
2508
2236
  id: z.ZodOptional<z.ZodString>;
2509
2237
  type: z.ZodNativeEnum<typeof DocumentElementType>;
2510
2238
  required: z.ZodOptional<z.ZodBoolean>;
2239
+ }, {
2240
+ type: z.ZodLiteral<DocumentElementType.DITIGAL_SIGNATURE>;
2241
+ label: z.ZodString;
2242
+ }>, "strip", z.ZodTypeAny, {
2243
+ type: DocumentElementType.DITIGAL_SIGNATURE;
2244
+ label: string;
2245
+ id?: string | undefined;
2246
+ required?: boolean | undefined;
2247
+ }, {
2248
+ type: DocumentElementType.DITIGAL_SIGNATURE;
2249
+ label: string;
2250
+ id?: string | undefined;
2251
+ required?: boolean | undefined;
2252
+ }>, z.ZodObject<z.objectUtil.extendShape<{
2253
+ id: z.ZodOptional<z.ZodString>;
2254
+ type: z.ZodNativeEnum<typeof DocumentElementType>;
2255
+ required: z.ZodOptional<z.ZodBoolean>;
2511
2256
  }, {
2512
2257
  type: z.ZodLiteral<DocumentElementType.FILE_UPLOAD>;
2513
2258
  label: z.ZodString;
@@ -2742,6 +2487,21 @@ declare const documentElementWithoutIdSchema: z.ZodDiscriminatedUnion<"type", [z
2742
2487
  id: z.ZodOptional<z.ZodString>;
2743
2488
  type: z.ZodNativeEnum<typeof DocumentElementType>;
2744
2489
  required: z.ZodOptional<z.ZodBoolean>;
2490
+ }, {
2491
+ type: z.ZodLiteral<DocumentElementType.DITIGAL_SIGNATURE>;
2492
+ label: z.ZodString;
2493
+ }>, "id">, "strip", z.ZodTypeAny, {
2494
+ type: DocumentElementType.DITIGAL_SIGNATURE;
2495
+ label: string;
2496
+ required?: boolean | undefined;
2497
+ }, {
2498
+ type: DocumentElementType.DITIGAL_SIGNATURE;
2499
+ label: string;
2500
+ required?: boolean | undefined;
2501
+ }>, z.ZodObject<Omit<z.objectUtil.extendShape<{
2502
+ id: z.ZodOptional<z.ZodString>;
2503
+ type: z.ZodNativeEnum<typeof DocumentElementType>;
2504
+ required: z.ZodOptional<z.ZodBoolean>;
2745
2505
  }, {
2746
2506
  type: z.ZodLiteral<DocumentElementType.FILE_UPLOAD>;
2747
2507
  label: z.ZodString;
@@ -2977,6 +2737,21 @@ declare const createDocumentTemplateSchema: z.ZodObject<{
2977
2737
  id: z.ZodOptional<z.ZodString>;
2978
2738
  type: z.ZodNativeEnum<typeof DocumentElementType>;
2979
2739
  required: z.ZodOptional<z.ZodBoolean>;
2740
+ }, {
2741
+ type: z.ZodLiteral<DocumentElementType.DITIGAL_SIGNATURE>;
2742
+ label: z.ZodString;
2743
+ }>, "id">, "strip", z.ZodTypeAny, {
2744
+ type: DocumentElementType.DITIGAL_SIGNATURE;
2745
+ label: string;
2746
+ required?: boolean | undefined;
2747
+ }, {
2748
+ type: DocumentElementType.DITIGAL_SIGNATURE;
2749
+ label: string;
2750
+ required?: boolean | undefined;
2751
+ }>, z.ZodObject<Omit<z.objectUtil.extendShape<{
2752
+ id: z.ZodOptional<z.ZodString>;
2753
+ type: z.ZodNativeEnum<typeof DocumentElementType>;
2754
+ required: z.ZodOptional<z.ZodBoolean>;
2980
2755
  }, {
2981
2756
  type: z.ZodLiteral<DocumentElementType.FILE_UPLOAD>;
2982
2757
  label: z.ZodString;
@@ -2996,6 +2771,9 @@ declare const createDocumentTemplateSchema: z.ZodObject<{
2996
2771
  maxFileSizeMB?: number | undefined;
2997
2772
  }>]>, "many">;
2998
2773
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2774
+ isUserForm: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2775
+ isRequired: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2776
+ sortingOrder: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2999
2777
  }, "strip", z.ZodTypeAny, {
3000
2778
  title: string;
3001
2779
  elements: ({
@@ -3057,6 +2835,10 @@ declare const createDocumentTemplateSchema: z.ZodObject<{
3057
2835
  type: DocumentElementType.SIGNATURE;
3058
2836
  label: string;
3059
2837
  required?: boolean | undefined;
2838
+ } | {
2839
+ type: DocumentElementType.DITIGAL_SIGNATURE;
2840
+ label: string;
2841
+ required?: boolean | undefined;
3060
2842
  } | {
3061
2843
  type: DocumentElementType.FILE_UPLOAD;
3062
2844
  label: string;
@@ -3064,6 +2846,9 @@ declare const createDocumentTemplateSchema: z.ZodObject<{
3064
2846
  allowedFileTypes?: string[] | undefined;
3065
2847
  maxFileSizeMB?: number | undefined;
3066
2848
  })[];
2849
+ isUserForm: boolean;
2850
+ isRequired: boolean;
2851
+ sortingOrder: number;
3067
2852
  description?: string | undefined;
3068
2853
  tags?: string[] | undefined;
3069
2854
  }, {
@@ -3127,6 +2912,10 @@ declare const createDocumentTemplateSchema: z.ZodObject<{
3127
2912
  type: DocumentElementType.SIGNATURE;
3128
2913
  label: string;
3129
2914
  required?: boolean | undefined;
2915
+ } | {
2916
+ type: DocumentElementType.DITIGAL_SIGNATURE;
2917
+ label: string;
2918
+ required?: boolean | undefined;
3130
2919
  } | {
3131
2920
  type: DocumentElementType.FILE_UPLOAD;
3132
2921
  label: string;
@@ -3136,6 +2925,9 @@ declare const createDocumentTemplateSchema: z.ZodObject<{
3136
2925
  })[];
3137
2926
  description?: string | undefined;
3138
2927
  tags?: string[] | undefined;
2928
+ isUserForm?: boolean | undefined;
2929
+ isRequired?: boolean | undefined;
2930
+ sortingOrder?: number | undefined;
3139
2931
  }>;
3140
2932
  declare const updateDocumentTemplateSchema: z.ZodObject<{
3141
2933
  title: z.ZodOptional<z.ZodString>;
@@ -3354,6 +3146,21 @@ declare const updateDocumentTemplateSchema: z.ZodObject<{
3354
3146
  id: z.ZodOptional<z.ZodString>;
3355
3147
  type: z.ZodNativeEnum<typeof DocumentElementType>;
3356
3148
  required: z.ZodOptional<z.ZodBoolean>;
3149
+ }, {
3150
+ type: z.ZodLiteral<DocumentElementType.DITIGAL_SIGNATURE>;
3151
+ label: z.ZodString;
3152
+ }>, "id">, "strip", z.ZodTypeAny, {
3153
+ type: DocumentElementType.DITIGAL_SIGNATURE;
3154
+ label: string;
3155
+ required?: boolean | undefined;
3156
+ }, {
3157
+ type: DocumentElementType.DITIGAL_SIGNATURE;
3158
+ label: string;
3159
+ required?: boolean | undefined;
3160
+ }>, z.ZodObject<Omit<z.objectUtil.extendShape<{
3161
+ id: z.ZodOptional<z.ZodString>;
3162
+ type: z.ZodNativeEnum<typeof DocumentElementType>;
3163
+ required: z.ZodOptional<z.ZodBoolean>;
3357
3164
  }, {
3358
3165
  type: z.ZodLiteral<DocumentElementType.FILE_UPLOAD>;
3359
3166
  label: z.ZodString;
@@ -3374,6 +3181,9 @@ declare const updateDocumentTemplateSchema: z.ZodObject<{
3374
3181
  }>]>, "many">>;
3375
3182
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3376
3183
  isActive: z.ZodOptional<z.ZodBoolean>;
3184
+ isUserForm: z.ZodOptional<z.ZodBoolean>;
3185
+ isRequired: z.ZodOptional<z.ZodBoolean>;
3186
+ sortingOrder: z.ZodOptional<z.ZodNumber>;
3377
3187
  }, "strip", z.ZodTypeAny, {
3378
3188
  isActive?: boolean | undefined;
3379
3189
  description?: string | undefined;
@@ -3438,6 +3248,10 @@ declare const updateDocumentTemplateSchema: z.ZodObject<{
3438
3248
  type: DocumentElementType.SIGNATURE;
3439
3249
  label: string;
3440
3250
  required?: boolean | undefined;
3251
+ } | {
3252
+ type: DocumentElementType.DITIGAL_SIGNATURE;
3253
+ label: string;
3254
+ required?: boolean | undefined;
3441
3255
  } | {
3442
3256
  type: DocumentElementType.FILE_UPLOAD;
3443
3257
  label: string;
@@ -3445,6 +3259,9 @@ declare const updateDocumentTemplateSchema: z.ZodObject<{
3445
3259
  allowedFileTypes?: string[] | undefined;
3446
3260
  maxFileSizeMB?: number | undefined;
3447
3261
  })[] | undefined;
3262
+ isUserForm?: boolean | undefined;
3263
+ isRequired?: boolean | undefined;
3264
+ sortingOrder?: number | undefined;
3448
3265
  }, {
3449
3266
  isActive?: boolean | undefined;
3450
3267
  description?: string | undefined;
@@ -3509,6 +3326,10 @@ declare const updateDocumentTemplateSchema: z.ZodObject<{
3509
3326
  type: DocumentElementType.SIGNATURE;
3510
3327
  label: string;
3511
3328
  required?: boolean | undefined;
3329
+ } | {
3330
+ type: DocumentElementType.DITIGAL_SIGNATURE;
3331
+ label: string;
3332
+ required?: boolean | undefined;
3512
3333
  } | {
3513
3334
  type: DocumentElementType.FILE_UPLOAD;
3514
3335
  label: string;
@@ -3516,6 +3337,9 @@ declare const updateDocumentTemplateSchema: z.ZodObject<{
3516
3337
  allowedFileTypes?: string[] | undefined;
3517
3338
  maxFileSizeMB?: number | undefined;
3518
3339
  })[] | undefined;
3340
+ isUserForm?: boolean | undefined;
3341
+ isRequired?: boolean | undefined;
3342
+ sortingOrder?: number | undefined;
3519
3343
  }>;
3520
3344
  declare const documentTemplateSchema: z.ZodObject<{
3521
3345
  id: z.ZodString;
@@ -3760,6 +3584,23 @@ declare const documentTemplateSchema: z.ZodObject<{
3760
3584
  id: z.ZodOptional<z.ZodString>;
3761
3585
  type: z.ZodNativeEnum<typeof DocumentElementType>;
3762
3586
  required: z.ZodOptional<z.ZodBoolean>;
3587
+ }, {
3588
+ type: z.ZodLiteral<DocumentElementType.DITIGAL_SIGNATURE>;
3589
+ label: z.ZodString;
3590
+ }>, "strip", z.ZodTypeAny, {
3591
+ type: DocumentElementType.DITIGAL_SIGNATURE;
3592
+ label: string;
3593
+ id?: string | undefined;
3594
+ required?: boolean | undefined;
3595
+ }, {
3596
+ type: DocumentElementType.DITIGAL_SIGNATURE;
3597
+ label: string;
3598
+ id?: string | undefined;
3599
+ required?: boolean | undefined;
3600
+ }>, z.ZodObject<z.objectUtil.extendShape<{
3601
+ id: z.ZodOptional<z.ZodString>;
3602
+ type: z.ZodNativeEnum<typeof DocumentElementType>;
3603
+ required: z.ZodOptional<z.ZodBoolean>;
3763
3604
  }, {
3764
3605
  type: z.ZodLiteral<DocumentElementType.FILE_UPLOAD>;
3765
3606
  label: z.ZodString;
@@ -3783,6 +3624,9 @@ declare const documentTemplateSchema: z.ZodObject<{
3783
3624
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3784
3625
  version: z.ZodNumber;
3785
3626
  isActive: z.ZodBoolean;
3627
+ isUserForm: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3628
+ isRequired: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3629
+ sortingOrder: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3786
3630
  }, "strip", z.ZodTypeAny, {
3787
3631
  id: string;
3788
3632
  createdAt: number;
@@ -3859,6 +3703,11 @@ declare const documentTemplateSchema: z.ZodObject<{
3859
3703
  label: string;
3860
3704
  id?: string | undefined;
3861
3705
  required?: boolean | undefined;
3706
+ } | {
3707
+ type: DocumentElementType.DITIGAL_SIGNATURE;
3708
+ label: string;
3709
+ id?: string | undefined;
3710
+ required?: boolean | undefined;
3862
3711
  } | {
3863
3712
  type: DocumentElementType.FILE_UPLOAD;
3864
3713
  label: string;
@@ -3867,6 +3716,9 @@ declare const documentTemplateSchema: z.ZodObject<{
3867
3716
  allowedFileTypes?: string[] | undefined;
3868
3717
  maxFileSizeMB?: number | undefined;
3869
3718
  })[];
3719
+ isUserForm: boolean;
3720
+ isRequired: boolean;
3721
+ sortingOrder: number;
3870
3722
  createdBy: string;
3871
3723
  version: number;
3872
3724
  description?: string | undefined;
@@ -3947,6 +3799,11 @@ declare const documentTemplateSchema: z.ZodObject<{
3947
3799
  label: string;
3948
3800
  id?: string | undefined;
3949
3801
  required?: boolean | undefined;
3802
+ } | {
3803
+ type: DocumentElementType.DITIGAL_SIGNATURE;
3804
+ label: string;
3805
+ id?: string | undefined;
3806
+ required?: boolean | undefined;
3950
3807
  } | {
3951
3808
  type: DocumentElementType.FILE_UPLOAD;
3952
3809
  label: string;
@@ -3959,6 +3816,91 @@ declare const documentTemplateSchema: z.ZodObject<{
3959
3816
  version: number;
3960
3817
  description?: string | undefined;
3961
3818
  tags?: string[] | undefined;
3819
+ isUserForm?: boolean | undefined;
3820
+ isRequired?: boolean | undefined;
3821
+ sortingOrder?: number | undefined;
3822
+ }>;
3823
+ declare const filledDocumentStatusSchema: z.ZodNativeEnum<typeof FilledDocumentStatus>;
3824
+ declare const filledDocumentSchema: z.ZodObject<{
3825
+ id: z.ZodString;
3826
+ templateId: z.ZodString;
3827
+ templateVersion: z.ZodNumber;
3828
+ isUserForm: z.ZodBoolean;
3829
+ procedureId: z.ZodString;
3830
+ appointmentId: z.ZodString;
3831
+ patientId: z.ZodString;
3832
+ practitionerId: z.ZodString;
3833
+ clinicId: z.ZodString;
3834
+ createdAt: z.ZodNumber;
3835
+ updatedAt: z.ZodNumber;
3836
+ values: z.ZodRecord<z.ZodString, z.ZodAny>;
3837
+ status: z.ZodNativeEnum<typeof FilledDocumentStatus>;
3838
+ }, "strip", z.ZodTypeAny, {
3839
+ id: string;
3840
+ createdAt: number;
3841
+ updatedAt: number;
3842
+ status: FilledDocumentStatus;
3843
+ patientId: string;
3844
+ values: Record<string, any>;
3845
+ isUserForm: boolean;
3846
+ templateId: string;
3847
+ templateVersion: number;
3848
+ procedureId: string;
3849
+ appointmentId: string;
3850
+ practitionerId: string;
3851
+ clinicId: string;
3852
+ }, {
3853
+ id: string;
3854
+ createdAt: number;
3855
+ updatedAt: number;
3856
+ status: FilledDocumentStatus;
3857
+ patientId: string;
3858
+ values: Record<string, any>;
3859
+ isUserForm: boolean;
3860
+ templateId: string;
3861
+ templateVersion: number;
3862
+ procedureId: string;
3863
+ appointmentId: string;
3864
+ practitionerId: string;
3865
+ clinicId: string;
3866
+ }>;
3867
+ declare const createFilledDocumentDataSchema: z.ZodObject<{
3868
+ templateId: z.ZodString;
3869
+ procedureId: z.ZodString;
3870
+ appointmentId: z.ZodString;
3871
+ patientId: z.ZodString;
3872
+ practitionerId: z.ZodString;
3873
+ clinicId: z.ZodString;
3874
+ values: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
3875
+ status: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof FilledDocumentStatus>>>;
3876
+ }, "strip", z.ZodTypeAny, {
3877
+ status: FilledDocumentStatus;
3878
+ patientId: string;
3879
+ values: Record<string, any>;
3880
+ templateId: string;
3881
+ procedureId: string;
3882
+ appointmentId: string;
3883
+ practitionerId: string;
3884
+ clinicId: string;
3885
+ }, {
3886
+ patientId: string;
3887
+ templateId: string;
3888
+ procedureId: string;
3889
+ appointmentId: string;
3890
+ practitionerId: string;
3891
+ clinicId: string;
3892
+ status?: FilledDocumentStatus | undefined;
3893
+ values?: Record<string, any> | undefined;
3894
+ }>;
3895
+ declare const updateFilledDocumentDataSchema: z.ZodObject<{
3896
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3897
+ status: z.ZodOptional<z.ZodNativeEnum<typeof FilledDocumentStatus>>;
3898
+ }, "strip", z.ZodTypeAny, {
3899
+ status?: FilledDocumentStatus | undefined;
3900
+ values?: Record<string, any> | undefined;
3901
+ }, {
3902
+ status?: FilledDocumentStatus | undefined;
3903
+ values?: Record<string, any> | undefined;
3962
3904
  }>;
3963
3905
 
3964
3906
  declare class BaseService {
@@ -4420,18 +4362,700 @@ declare class ProductService extends BaseService implements IProductService {
4420
4362
  }
4421
4363
 
4422
4364
  /**
4423
- * Enum for synced calendar provider
4365
+ * Enum defining the possible statuses of an appointment.
4424
4366
  */
4425
- declare enum SyncedCalendarProvider {
4426
- GOOGLE = "google",
4427
- OUTLOOK = "outlook",
4428
- APPLE = "apple"
4367
+ declare enum AppointmentStatus {
4368
+ PENDING = "pending",// Initial state after booking, before confirmation (if applicable)
4369
+ CONFIRMED = "confirmed",// Confirmed by clinic/practitioner
4370
+ CHECKED_IN = "checked_in",// Patient has arrived
4371
+ IN_PROGRESS = "in_progress",// Procedure has started
4372
+ COMPLETED = "completed",// Procedure finished successfully
4373
+ CANCELED_PATIENT = "canceled_patient",// Canceled by the patient
4374
+ CANCELED_PATIENT_RESCHEDULED = "canceled_patient_rescheduled",// Canceled by the patient and rescheduled by the clinic
4375
+ CANCELED_CLINIC = "canceled_clinic",// Canceled by the clinic/practitioner
4376
+ NO_SHOW = "no_show",// Patient did not attend
4377
+ RESCHEDULED_BY_CLINIC = "rescheduled_by_clinic"
4429
4378
  }
4430
4379
  /**
4431
- * Interface for synced calendar
4380
+ * Enum defining the payment status of an appointment.
4432
4381
  */
4433
- interface SyncedCalendar {
4434
- id: string;
4382
+ declare enum PaymentStatus {
4383
+ UNPAID = "unpaid",
4384
+ PAID = "paid",
4385
+ PARTIALLY_PAID = "partially_paid",
4386
+ REFUNDED = "refunded",
4387
+ NOT_APPLICABLE = "not_applicable"
4388
+ }
4389
+ /**
4390
+ * Enum for different types of media that can be attached to an appointment.
4391
+ */
4392
+ declare enum MediaType {
4393
+ BEFORE_PHOTO = "before_photo",
4394
+ AFTER_PHOTO = "after_photo",
4395
+ CONSENT_SCAN = "consent_scan",
4396
+ OTHER_DOCUMENT = "other_document"
4397
+ }
4398
+ /**
4399
+ * Interface to describe a media file linked to an appointment.
4400
+ */
4401
+ interface AppointmentMediaItem {
4402
+ id: string;
4403
+ type: MediaType;
4404
+ url: string;
4405
+ fileName?: string;
4406
+ uploadedAt: Timestamp;
4407
+ uploadedBy: string;
4408
+ description?: string;
4409
+ }
4410
+ /**
4411
+ * Interface for procedure-specific information
4412
+ */
4413
+ interface ProcedureExtendedInfo {
4414
+ id: string;
4415
+ name: string;
4416
+ description: string;
4417
+ cost: number;
4418
+ duration: number;
4419
+ procedureFamily: ProcedureFamily;
4420
+ procedureCategoryId: string;
4421
+ procedureCategoryName: string;
4422
+ procedureSubCategoryId: string;
4423
+ procedureSubCategoryName: string;
4424
+ procedureTechnologyId: string;
4425
+ procedureTechnologyName: string;
4426
+ procedureProductBrandId: string;
4427
+ procedureProductBrandName: string;
4428
+ procedureProductId: string;
4429
+ procedureProductName: string;
4430
+ }
4431
+ /**
4432
+ * Interface to describe a filled form linked to an appointment.
4433
+ */
4434
+ interface LinkedFormInfo {
4435
+ formId: string;
4436
+ templateId: string;
4437
+ templateVersion: number;
4438
+ title: string;
4439
+ isUserForm: boolean;
4440
+ status: FilledDocumentStatus;
4441
+ path: string;
4442
+ submittedAt?: Timestamp;
4443
+ completedAt?: Timestamp;
4444
+ }
4445
+ /**
4446
+ * Interface for summarized patient review information linked to an appointment.
4447
+ */
4448
+ interface PatientReviewInfo {
4449
+ reviewId: string;
4450
+ rating: number;
4451
+ comment?: string;
4452
+ reviewedAt: Timestamp;
4453
+ }
4454
+ /**
4455
+ * Represents a booked appointment, aggregating key information and relevant procedure rules.
4456
+ */
4457
+ interface Appointment {
4458
+ /** Unique identifier for the appointment */
4459
+ id: string;
4460
+ /** Reference to the associated CalendarEvent */
4461
+ calendarEventId: string;
4462
+ /** ID of the clinic branch */
4463
+ clinicBranchId: string;
4464
+ /** Aggregated clinic information (snapshot) */
4465
+ clinicInfo: ClinicInfo;
4466
+ /** ID of the practitioner */
4467
+ practitionerId: string;
4468
+ /** Aggregated practitioner information (snapshot) */
4469
+ practitionerInfo: PractitionerProfileInfo;
4470
+ /** ID of the patient */
4471
+ patientId: string;
4472
+ /** Aggregated patient information (snapshot) */
4473
+ patientInfo: PatientProfileInfo;
4474
+ /** ID of the procedure */
4475
+ procedureId: string;
4476
+ /** Aggregated procedure information including product/brand (snapshot) */
4477
+ procedureInfo: ProcedureSummaryInfo;
4478
+ /** Extended procedure information */
4479
+ procedureExtendedInfo: ProcedureExtendedInfo;
4480
+ /** Status of the appointment */
4481
+ status: AppointmentStatus;
4482
+ /** Timestamps */
4483
+ bookingTime: Timestamp;
4484
+ confirmationTime?: Timestamp | null;
4485
+ cancellationTime?: Timestamp | null;
4486
+ rescheduleTime?: Timestamp | null;
4487
+ appointmentStartTime: Timestamp;
4488
+ appointmentEndTime: Timestamp;
4489
+ procedureActualStartTime?: Timestamp | null;
4490
+ actualDurationMinutes?: number;
4491
+ /** Cancellation Details */
4492
+ cancellationReason?: string | null;
4493
+ canceledBy?: "patient" | "clinic" | "practitioner" | "system";
4494
+ /** Notes */
4495
+ internalNotes?: string | null;
4496
+ patientNotes?: string | null;
4497
+ /** Payment Details */
4498
+ cost: number;
4499
+ currency: Currency;
4500
+ paymentStatus: PaymentStatus;
4501
+ paymentTransactionId?: string | null;
4502
+ /** Procedure-related conditions and requirements */
4503
+ blockingConditions: BlockingCondition[];
4504
+ contraindications: Contraindication[];
4505
+ preProcedureRequirements: Requirement[];
4506
+ postProcedureRequirements: Requirement[];
4507
+ /** Tracking information for requirements completion */
4508
+ completedPreRequirements?: string[];
4509
+ completedPostRequirements?: string[];
4510
+ /** NEW: Linked forms (consent, procedure-specific forms, etc.) */
4511
+ linkedFormIds?: string[];
4512
+ linkedForms?: LinkedFormInfo[];
4513
+ pendingUserFormsIds?: string[];
4514
+ /** NEW: Media items (before/after photos, scanned documents, etc.) */
4515
+ media?: AppointmentMediaItem[];
4516
+ /** NEW: Information about the patient's review for this appointment */
4517
+ reviewInfo?: PatientReviewInfo | null;
4518
+ /** NEW: Details about the finalization of the appointment by the practitioner */
4519
+ finalizedDetails?: {
4520
+ by: string;
4521
+ at: Timestamp;
4522
+ notes?: string;
4523
+ };
4524
+ /** Timestamps for record creation and updates */
4525
+ createdAt: Timestamp;
4526
+ updatedAt: Timestamp;
4527
+ /** Recurring appointment information */
4528
+ isRecurring?: boolean;
4529
+ recurringAppointmentId?: string | null;
4530
+ /** NEW: Flag for soft deletion or archiving */
4531
+ isArchived?: boolean;
4532
+ }
4533
+ /**
4534
+ * Data needed to create a new Appointment
4535
+ */
4536
+ interface CreateAppointmentData {
4537
+ clinicBranchId: string;
4538
+ practitionerId: string;
4539
+ patientId: string;
4540
+ procedureId: string;
4541
+ appointmentStartTime: Timestamp;
4542
+ appointmentEndTime: Timestamp;
4543
+ cost: number;
4544
+ currency: Currency;
4545
+ patientNotes?: string | null;
4546
+ initialStatus: AppointmentStatus;
4547
+ initialPaymentStatus?: PaymentStatus;
4548
+ }
4549
+ /**
4550
+ * Data allowed for updating an Appointment
4551
+ */
4552
+ interface UpdateAppointmentData {
4553
+ status?: AppointmentStatus;
4554
+ confirmationTime?: Timestamp | FieldValue | null;
4555
+ cancellationTime?: Timestamp | FieldValue | null;
4556
+ rescheduleTime?: Timestamp | FieldValue | null;
4557
+ procedureActualStartTime?: Timestamp | FieldValue | null;
4558
+ actualDurationMinutes?: number;
4559
+ cancellationReason?: string | null;
4560
+ canceledBy?: "patient" | "clinic" | "practitioner" | "system";
4561
+ internalNotes?: string | null;
4562
+ patientNotes?: string | FieldValue | null;
4563
+ paymentStatus?: PaymentStatus;
4564
+ paymentTransactionId?: string | FieldValue | null;
4565
+ completedPreRequirements?: string[] | FieldValue;
4566
+ completedPostRequirements?: string[] | FieldValue;
4567
+ appointmentStartTime?: Timestamp;
4568
+ appointmentEndTime?: Timestamp;
4569
+ calendarEventId?: string;
4570
+ cost?: number;
4571
+ clinicBranchId?: string;
4572
+ practitionerId?: string;
4573
+ /** NEW: For updating linked forms - typically managed by dedicated methods */
4574
+ linkedFormIds?: string[] | FieldValue;
4575
+ linkedForms?: LinkedFormInfo[] | FieldValue;
4576
+ /** NEW: For updating media items - typically managed by dedicated methods */
4577
+ media?: AppointmentMediaItem[] | FieldValue;
4578
+ /** NEW: For adding/updating review information */
4579
+ reviewInfo?: PatientReviewInfo | FieldValue | null;
4580
+ /** NEW: For setting practitioner finalization details */
4581
+ finalizedDetails?: {
4582
+ by: string;
4583
+ at: Timestamp;
4584
+ notes?: string;
4585
+ } | FieldValue;
4586
+ /** NEW: For archiving/unarchiving */
4587
+ isArchived?: boolean;
4588
+ updatedAt?: FieldValue;
4589
+ }
4590
+ /**
4591
+ * Parameters for searching appointments
4592
+ */
4593
+ interface SearchAppointmentsParams {
4594
+ patientId?: string;
4595
+ practitionerId?: string;
4596
+ clinicBranchId?: string;
4597
+ startDate?: Date;
4598
+ endDate?: Date;
4599
+ status?: AppointmentStatus | AppointmentStatus[];
4600
+ limit?: number;
4601
+ startAfter?: any;
4602
+ }
4603
+ /** Firestore collection name */
4604
+ declare const APPOINTMENTS_COLLECTION = "appointments";
4605
+
4606
+ /**
4607
+ * Schema for validating appointment creation data
4608
+ */
4609
+ declare const createAppointmentSchema: z.ZodEffects<z.ZodObject<{
4610
+ clinicBranchId: z.ZodString;
4611
+ practitionerId: z.ZodString;
4612
+ patientId: z.ZodString;
4613
+ procedureId: z.ZodString;
4614
+ appointmentStartTime: z.ZodEffects<z.ZodAny, any, any>;
4615
+ appointmentEndTime: z.ZodEffects<z.ZodAny, any, any>;
4616
+ cost: z.ZodNumber;
4617
+ currency: z.ZodString;
4618
+ patientNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4619
+ initialStatus: z.ZodNativeEnum<typeof AppointmentStatus>;
4620
+ initialPaymentStatus: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof PaymentStatus>>>;
4621
+ }, "strip", z.ZodTypeAny, {
4622
+ patientId: string;
4623
+ procedureId: string;
4624
+ practitionerId: string;
4625
+ cost: number;
4626
+ clinicBranchId: string;
4627
+ currency: string;
4628
+ initialStatus: AppointmentStatus;
4629
+ initialPaymentStatus: PaymentStatus;
4630
+ appointmentStartTime?: any;
4631
+ appointmentEndTime?: any;
4632
+ patientNotes?: string | null | undefined;
4633
+ }, {
4634
+ patientId: string;
4635
+ procedureId: string;
4636
+ practitionerId: string;
4637
+ cost: number;
4638
+ clinicBranchId: string;
4639
+ currency: string;
4640
+ initialStatus: AppointmentStatus;
4641
+ appointmentStartTime?: any;
4642
+ appointmentEndTime?: any;
4643
+ patientNotes?: string | null | undefined;
4644
+ initialPaymentStatus?: PaymentStatus | undefined;
4645
+ }>, {
4646
+ patientId: string;
4647
+ procedureId: string;
4648
+ practitionerId: string;
4649
+ cost: number;
4650
+ clinicBranchId: string;
4651
+ currency: string;
4652
+ initialStatus: AppointmentStatus;
4653
+ initialPaymentStatus: PaymentStatus;
4654
+ appointmentStartTime?: any;
4655
+ appointmentEndTime?: any;
4656
+ patientNotes?: string | null | undefined;
4657
+ }, {
4658
+ patientId: string;
4659
+ procedureId: string;
4660
+ practitionerId: string;
4661
+ cost: number;
4662
+ clinicBranchId: string;
4663
+ currency: string;
4664
+ initialStatus: AppointmentStatus;
4665
+ appointmentStartTime?: any;
4666
+ appointmentEndTime?: any;
4667
+ patientNotes?: string | null | undefined;
4668
+ initialPaymentStatus?: PaymentStatus | undefined;
4669
+ }>;
4670
+ /**
4671
+ * Schema for validating appointment update data
4672
+ */
4673
+ declare const updateAppointmentSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
4674
+ status: z.ZodOptional<z.ZodNativeEnum<typeof AppointmentStatus>>;
4675
+ confirmationTime: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
4676
+ cancellationTime: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
4677
+ rescheduleTime: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
4678
+ procedureActualStartTime: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
4679
+ actualDurationMinutes: z.ZodOptional<z.ZodNumber>;
4680
+ cancellationReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4681
+ canceledBy: z.ZodOptional<z.ZodEnum<["patient", "clinic", "practitioner", "system"]>>;
4682
+ internalNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4683
+ patientNotes: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
4684
+ paymentStatus: z.ZodOptional<z.ZodNativeEnum<typeof PaymentStatus>>;
4685
+ paymentTransactionId: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
4686
+ completedPreRequirements: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodAny]>>;
4687
+ completedPostRequirements: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodAny]>>;
4688
+ linkedFormIds: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodAny]>>;
4689
+ pendingUserFormsIds: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodAny]>>;
4690
+ appointmentStartTime: z.ZodOptional<z.ZodEffects<z.ZodAny, any, any>>;
4691
+ appointmentEndTime: z.ZodOptional<z.ZodEffects<z.ZodAny, any, any>>;
4692
+ calendarEventId: z.ZodOptional<z.ZodString>;
4693
+ cost: z.ZodOptional<z.ZodNumber>;
4694
+ clinicBranchId: z.ZodOptional<z.ZodString>;
4695
+ practitionerId: z.ZodOptional<z.ZodString>;
4696
+ linkedForms: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
4697
+ formId: z.ZodString;
4698
+ templateId: z.ZodString;
4699
+ templateVersion: z.ZodNumber;
4700
+ title: z.ZodString;
4701
+ isUserForm: z.ZodBoolean;
4702
+ status: z.ZodNativeEnum<typeof FilledDocumentStatus>;
4703
+ path: z.ZodString;
4704
+ submittedAt: z.ZodOptional<z.ZodEffects<z.ZodAny, any, any>>;
4705
+ completedAt: z.ZodOptional<z.ZodEffects<z.ZodAny, any, any>>;
4706
+ }, "strip", z.ZodTypeAny, {
4707
+ status: FilledDocumentStatus;
4708
+ path: string;
4709
+ title: string;
4710
+ isUserForm: boolean;
4711
+ templateId: string;
4712
+ templateVersion: number;
4713
+ formId: string;
4714
+ submittedAt?: any;
4715
+ completedAt?: any;
4716
+ }, {
4717
+ status: FilledDocumentStatus;
4718
+ path: string;
4719
+ title: string;
4720
+ isUserForm: boolean;
4721
+ templateId: string;
4722
+ templateVersion: number;
4723
+ formId: string;
4724
+ submittedAt?: any;
4725
+ completedAt?: any;
4726
+ }>, "many">, z.ZodAny]>>;
4727
+ media: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
4728
+ id: z.ZodString;
4729
+ type: z.ZodNativeEnum<typeof MediaType>;
4730
+ url: z.ZodString;
4731
+ fileName: z.ZodOptional<z.ZodString>;
4732
+ uploadedAt: z.ZodEffects<z.ZodAny, any, any>;
4733
+ uploadedBy: z.ZodString;
4734
+ description: z.ZodOptional<z.ZodString>;
4735
+ }, "strip", z.ZodTypeAny, {
4736
+ id: string;
4737
+ type: MediaType;
4738
+ url: string;
4739
+ uploadedBy: string;
4740
+ description?: string | undefined;
4741
+ fileName?: string | undefined;
4742
+ uploadedAt?: any;
4743
+ }, {
4744
+ id: string;
4745
+ type: MediaType;
4746
+ url: string;
4747
+ uploadedBy: string;
4748
+ description?: string | undefined;
4749
+ fileName?: string | undefined;
4750
+ uploadedAt?: any;
4751
+ }>, "many">, z.ZodAny]>>;
4752
+ reviewInfo: z.ZodOptional<z.ZodUnion<[z.ZodNullable<z.ZodObject<{
4753
+ reviewId: z.ZodString;
4754
+ rating: z.ZodNumber;
4755
+ comment: z.ZodOptional<z.ZodString>;
4756
+ reviewedAt: z.ZodEffects<z.ZodAny, any, any>;
4757
+ }, "strip", z.ZodTypeAny, {
4758
+ reviewId: string;
4759
+ rating: number;
4760
+ comment?: string | undefined;
4761
+ reviewedAt?: any;
4762
+ }, {
4763
+ reviewId: string;
4764
+ rating: number;
4765
+ comment?: string | undefined;
4766
+ reviewedAt?: any;
4767
+ }>>, z.ZodAny]>>;
4768
+ finalizedDetails: z.ZodOptional<z.ZodUnion<[z.ZodNullable<z.ZodObject<{
4769
+ by: z.ZodString;
4770
+ at: z.ZodEffects<z.ZodAny, any, any>;
4771
+ notes: z.ZodOptional<z.ZodString>;
4772
+ }, "strip", z.ZodTypeAny, {
4773
+ by: string;
4774
+ notes?: string | undefined;
4775
+ at?: any;
4776
+ }, {
4777
+ by: string;
4778
+ notes?: string | undefined;
4779
+ at?: any;
4780
+ }>>, z.ZodAny]>>;
4781
+ isArchived: z.ZodOptional<z.ZodBoolean>;
4782
+ updatedAt: z.ZodOptional<z.ZodAny>;
4783
+ }, "strip", z.ZodTypeAny, {
4784
+ updatedAt?: any;
4785
+ status?: AppointmentStatus | undefined;
4786
+ practitionerId?: string | undefined;
4787
+ cost?: number | undefined;
4788
+ clinicBranchId?: string | undefined;
4789
+ appointmentStartTime?: any;
4790
+ appointmentEndTime?: any;
4791
+ patientNotes?: any;
4792
+ confirmationTime?: any;
4793
+ cancellationTime?: any;
4794
+ rescheduleTime?: any;
4795
+ procedureActualStartTime?: any;
4796
+ actualDurationMinutes?: number | undefined;
4797
+ cancellationReason?: string | null | undefined;
4798
+ canceledBy?: "practitioner" | "patient" | "clinic" | "system" | undefined;
4799
+ internalNotes?: string | null | undefined;
4800
+ paymentStatus?: PaymentStatus | undefined;
4801
+ paymentTransactionId?: any;
4802
+ completedPreRequirements?: any;
4803
+ completedPostRequirements?: any;
4804
+ linkedFormIds?: any;
4805
+ pendingUserFormsIds?: any;
4806
+ calendarEventId?: string | undefined;
4807
+ linkedForms?: any;
4808
+ media?: any;
4809
+ reviewInfo?: any;
4810
+ finalizedDetails?: any;
4811
+ isArchived?: boolean | undefined;
4812
+ }, {
4813
+ updatedAt?: any;
4814
+ status?: AppointmentStatus | undefined;
4815
+ practitionerId?: string | undefined;
4816
+ cost?: number | undefined;
4817
+ clinicBranchId?: string | undefined;
4818
+ appointmentStartTime?: any;
4819
+ appointmentEndTime?: any;
4820
+ patientNotes?: any;
4821
+ confirmationTime?: any;
4822
+ cancellationTime?: any;
4823
+ rescheduleTime?: any;
4824
+ procedureActualStartTime?: any;
4825
+ actualDurationMinutes?: number | undefined;
4826
+ cancellationReason?: string | null | undefined;
4827
+ canceledBy?: "practitioner" | "patient" | "clinic" | "system" | undefined;
4828
+ internalNotes?: string | null | undefined;
4829
+ paymentStatus?: PaymentStatus | undefined;
4830
+ paymentTransactionId?: any;
4831
+ completedPreRequirements?: any;
4832
+ completedPostRequirements?: any;
4833
+ linkedFormIds?: any;
4834
+ pendingUserFormsIds?: any;
4835
+ calendarEventId?: string | undefined;
4836
+ linkedForms?: any;
4837
+ media?: any;
4838
+ reviewInfo?: any;
4839
+ finalizedDetails?: any;
4840
+ isArchived?: boolean | undefined;
4841
+ }>, {
4842
+ updatedAt?: any;
4843
+ status?: AppointmentStatus | undefined;
4844
+ practitionerId?: string | undefined;
4845
+ cost?: number | undefined;
4846
+ clinicBranchId?: string | undefined;
4847
+ appointmentStartTime?: any;
4848
+ appointmentEndTime?: any;
4849
+ patientNotes?: any;
4850
+ confirmationTime?: any;
4851
+ cancellationTime?: any;
4852
+ rescheduleTime?: any;
4853
+ procedureActualStartTime?: any;
4854
+ actualDurationMinutes?: number | undefined;
4855
+ cancellationReason?: string | null | undefined;
4856
+ canceledBy?: "practitioner" | "patient" | "clinic" | "system" | undefined;
4857
+ internalNotes?: string | null | undefined;
4858
+ paymentStatus?: PaymentStatus | undefined;
4859
+ paymentTransactionId?: any;
4860
+ completedPreRequirements?: any;
4861
+ completedPostRequirements?: any;
4862
+ linkedFormIds?: any;
4863
+ pendingUserFormsIds?: any;
4864
+ calendarEventId?: string | undefined;
4865
+ linkedForms?: any;
4866
+ media?: any;
4867
+ reviewInfo?: any;
4868
+ finalizedDetails?: any;
4869
+ isArchived?: boolean | undefined;
4870
+ }, {
4871
+ updatedAt?: any;
4872
+ status?: AppointmentStatus | undefined;
4873
+ practitionerId?: string | undefined;
4874
+ cost?: number | undefined;
4875
+ clinicBranchId?: string | undefined;
4876
+ appointmentStartTime?: any;
4877
+ appointmentEndTime?: any;
4878
+ patientNotes?: any;
4879
+ confirmationTime?: any;
4880
+ cancellationTime?: any;
4881
+ rescheduleTime?: any;
4882
+ procedureActualStartTime?: any;
4883
+ actualDurationMinutes?: number | undefined;
4884
+ cancellationReason?: string | null | undefined;
4885
+ canceledBy?: "practitioner" | "patient" | "clinic" | "system" | undefined;
4886
+ internalNotes?: string | null | undefined;
4887
+ paymentStatus?: PaymentStatus | undefined;
4888
+ paymentTransactionId?: any;
4889
+ completedPreRequirements?: any;
4890
+ completedPostRequirements?: any;
4891
+ linkedFormIds?: any;
4892
+ pendingUserFormsIds?: any;
4893
+ calendarEventId?: string | undefined;
4894
+ linkedForms?: any;
4895
+ media?: any;
4896
+ reviewInfo?: any;
4897
+ finalizedDetails?: any;
4898
+ isArchived?: boolean | undefined;
4899
+ }>, {
4900
+ updatedAt?: any;
4901
+ status?: AppointmentStatus | undefined;
4902
+ practitionerId?: string | undefined;
4903
+ cost?: number | undefined;
4904
+ clinicBranchId?: string | undefined;
4905
+ appointmentStartTime?: any;
4906
+ appointmentEndTime?: any;
4907
+ patientNotes?: any;
4908
+ confirmationTime?: any;
4909
+ cancellationTime?: any;
4910
+ rescheduleTime?: any;
4911
+ procedureActualStartTime?: any;
4912
+ actualDurationMinutes?: number | undefined;
4913
+ cancellationReason?: string | null | undefined;
4914
+ canceledBy?: "practitioner" | "patient" | "clinic" | "system" | undefined;
4915
+ internalNotes?: string | null | undefined;
4916
+ paymentStatus?: PaymentStatus | undefined;
4917
+ paymentTransactionId?: any;
4918
+ completedPreRequirements?: any;
4919
+ completedPostRequirements?: any;
4920
+ linkedFormIds?: any;
4921
+ pendingUserFormsIds?: any;
4922
+ calendarEventId?: string | undefined;
4923
+ linkedForms?: any;
4924
+ media?: any;
4925
+ reviewInfo?: any;
4926
+ finalizedDetails?: any;
4927
+ isArchived?: boolean | undefined;
4928
+ }, {
4929
+ updatedAt?: any;
4930
+ status?: AppointmentStatus | undefined;
4931
+ practitionerId?: string | undefined;
4932
+ cost?: number | undefined;
4933
+ clinicBranchId?: string | undefined;
4934
+ appointmentStartTime?: any;
4935
+ appointmentEndTime?: any;
4936
+ patientNotes?: any;
4937
+ confirmationTime?: any;
4938
+ cancellationTime?: any;
4939
+ rescheduleTime?: any;
4940
+ procedureActualStartTime?: any;
4941
+ actualDurationMinutes?: number | undefined;
4942
+ cancellationReason?: string | null | undefined;
4943
+ canceledBy?: "practitioner" | "patient" | "clinic" | "system" | undefined;
4944
+ internalNotes?: string | null | undefined;
4945
+ paymentStatus?: PaymentStatus | undefined;
4946
+ paymentTransactionId?: any;
4947
+ completedPreRequirements?: any;
4948
+ completedPostRequirements?: any;
4949
+ linkedFormIds?: any;
4950
+ pendingUserFormsIds?: any;
4951
+ calendarEventId?: string | undefined;
4952
+ linkedForms?: any;
4953
+ media?: any;
4954
+ reviewInfo?: any;
4955
+ finalizedDetails?: any;
4956
+ isArchived?: boolean | undefined;
4957
+ }>;
4958
+ /**
4959
+ * Schema for validating appointment search parameters
4960
+ */
4961
+ declare const searchAppointmentsSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
4962
+ patientId: z.ZodOptional<z.ZodString>;
4963
+ practitionerId: z.ZodOptional<z.ZodString>;
4964
+ clinicBranchId: z.ZodOptional<z.ZodString>;
4965
+ startDate: z.ZodOptional<z.ZodEffects<z.ZodAny, any, any>>;
4966
+ endDate: z.ZodOptional<z.ZodEffects<z.ZodAny, any, any>>;
4967
+ status: z.ZodOptional<z.ZodUnion<[z.ZodNativeEnum<typeof AppointmentStatus>, z.ZodArray<z.ZodNativeEnum<typeof AppointmentStatus>, "atleastone">]>>;
4968
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4969
+ startAfter: z.ZodOptional<z.ZodAny>;
4970
+ }, "strip", z.ZodTypeAny, {
4971
+ limit: number;
4972
+ status?: AppointmentStatus | [AppointmentStatus, ...AppointmentStatus[]] | undefined;
4973
+ patientId?: string | undefined;
4974
+ startDate?: any;
4975
+ endDate?: any;
4976
+ practitionerId?: string | undefined;
4977
+ startAfter?: any;
4978
+ clinicBranchId?: string | undefined;
4979
+ }, {
4980
+ status?: AppointmentStatus | [AppointmentStatus, ...AppointmentStatus[]] | undefined;
4981
+ patientId?: string | undefined;
4982
+ startDate?: any;
4983
+ endDate?: any;
4984
+ practitionerId?: string | undefined;
4985
+ limit?: number | undefined;
4986
+ startAfter?: any;
4987
+ clinicBranchId?: string | undefined;
4988
+ }>, {
4989
+ limit: number;
4990
+ status?: AppointmentStatus | [AppointmentStatus, ...AppointmentStatus[]] | undefined;
4991
+ patientId?: string | undefined;
4992
+ startDate?: any;
4993
+ endDate?: any;
4994
+ practitionerId?: string | undefined;
4995
+ startAfter?: any;
4996
+ clinicBranchId?: string | undefined;
4997
+ }, {
4998
+ status?: AppointmentStatus | [AppointmentStatus, ...AppointmentStatus[]] | undefined;
4999
+ patientId?: string | undefined;
5000
+ startDate?: any;
5001
+ endDate?: any;
5002
+ practitionerId?: string | undefined;
5003
+ limit?: number | undefined;
5004
+ startAfter?: any;
5005
+ clinicBranchId?: string | undefined;
5006
+ }>, {
5007
+ limit: number;
5008
+ status?: AppointmentStatus | [AppointmentStatus, ...AppointmentStatus[]] | undefined;
5009
+ patientId?: string | undefined;
5010
+ startDate?: any;
5011
+ endDate?: any;
5012
+ practitionerId?: string | undefined;
5013
+ startAfter?: any;
5014
+ clinicBranchId?: string | undefined;
5015
+ }, {
5016
+ status?: AppointmentStatus | [AppointmentStatus, ...AppointmentStatus[]] | undefined;
5017
+ patientId?: string | undefined;
5018
+ startDate?: any;
5019
+ endDate?: any;
5020
+ practitionerId?: string | undefined;
5021
+ limit?: number | undefined;
5022
+ startAfter?: any;
5023
+ clinicBranchId?: string | undefined;
5024
+ }>;
5025
+
5026
+ interface FirebaseInstance {
5027
+ app: FirebaseApp;
5028
+ db: Firestore;
5029
+ auth: Auth;
5030
+ analytics: Analytics | null;
5031
+ }
5032
+ declare const initializeFirebase: (config: {
5033
+ apiKey: string;
5034
+ authDomain: string;
5035
+ projectId: string;
5036
+ storageBucket: string;
5037
+ messagingSenderId: string;
5038
+ appId: string;
5039
+ measurementId?: string;
5040
+ }) => FirebaseInstance;
5041
+ declare const getFirebaseInstance: () => Promise<FirebaseInstance>;
5042
+ declare const getFirebaseAuth: () => Promise<Auth>;
5043
+ declare const getFirebaseDB: () => Promise<Firestore>;
5044
+ declare const getFirebaseApp: () => Promise<FirebaseApp>;
5045
+
5046
+ /**
5047
+ * Enum for synced calendar provider
5048
+ */
5049
+ declare enum SyncedCalendarProvider {
5050
+ GOOGLE = "google",
5051
+ OUTLOOK = "outlook",
5052
+ APPLE = "apple"
5053
+ }
5054
+ /**
5055
+ * Interface for synced calendar
5056
+ */
5057
+ interface SyncedCalendar {
5058
+ id: string;
4435
5059
  provider: SyncedCalendarProvider;
4436
5060
  name: string;
4437
5061
  description?: string;
@@ -5379,10 +6003,19 @@ declare class AuthService extends BaseService {
5379
6003
  * Enumeracija koja definiše sve moguće tipove notifikacija
5380
6004
  */
5381
6005
  declare enum NotificationType {
5382
- PRE_REQUIREMENT = "preRequirement",
5383
- POST_REQUIREMENT = "postRequirement",
5384
- APPOINTMENT_REMINDER = "appointmentReminder",
5385
- APPOINTMENT_NOTIFICATION = "appointmentNotification"
6006
+ APPOINTMENT_REMINDER = "appointmentReminder",// For upcoming appointments
6007
+ APPOINTMENT_STATUS_CHANGE = "appointmentStatusChange",// Generic for status changes like confirmed, checked-in etc.
6008
+ APPOINTMENT_RESCHEDULED_PROPOSAL = "appointmentRescheduledProposal",// When clinic proposes a new time
6009
+ APPOINTMENT_CANCELLED = "appointmentCancelled",// When an appointment is cancelled
6010
+ REQUIREMENT_INSTRUCTION_DUE = "requirementInstructionDue",// For specific pre/post care instructions
6011
+ FORM_REMINDER = "formReminder",// Reminds user to fill a specific form
6012
+ FORM_SUBMISSION_CONFIRMATION = "formSubmissionConfirmation",// Confirms form was submitted
6013
+ REVIEW_REQUEST = "reviewRequest",// Request for patient review post-appointment
6014
+ PAYMENT_DUE = "paymentDue",
6015
+ PAYMENT_CONFIRMATION = "paymentConfirmation",
6016
+ PAYMENT_FAILED = "paymentFailed",
6017
+ GENERAL_MESSAGE = "generalMessage",// For general announcements or direct messages
6018
+ ACCOUNT_NOTIFICATION = "accountNotification"
5386
6019
  }
5387
6020
  /**
5388
6021
  * Bazni interfejs za sve notifikacije
@@ -5416,14 +6049,22 @@ interface BaseNotification {
5416
6049
  isRead: boolean;
5417
6050
  /** Uloga korisnika kome je namenjena notifikacija */
5418
6051
  userRole: UserRole;
6052
+ appointmentId?: string;
6053
+ patientRequirementInstanceId?: string;
6054
+ instructionId?: string;
6055
+ formId?: string;
6056
+ originalRequirementId?: string;
6057
+ transactionId?: string;
5419
6058
  }
5420
6059
  /**
5421
6060
  * Status notifikacije
5422
6061
  */
5423
6062
  declare enum NotificationStatus {
5424
6063
  PENDING = "pending",
6064
+ PROCESSING = "processing",
5425
6065
  SENT = "sent",
5426
6066
  FAILED = "failed",
6067
+ DELIVERED = "delivered",
5427
6068
  CANCELLED = "cancelled",
5428
6069
  PARTIAL_SUCCESS = "partialSuccess"
5429
6070
  }
@@ -5431,7 +6072,7 @@ declare enum NotificationStatus {
5431
6072
  * Notifikacija za pre-requirement
5432
6073
  */
5433
6074
  interface PreRequirementNotification extends BaseNotification {
5434
- notificationType: NotificationType.PRE_REQUIREMENT;
6075
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
5435
6076
  /** ID tretmana za koji je vezan pre-requirement */
5436
6077
  treatmentId: string;
5437
6078
  /** Lista pre-requirements koji treba da se ispune */
@@ -5443,7 +6084,7 @@ interface PreRequirementNotification extends BaseNotification {
5443
6084
  * Notifikacija za post-requirement
5444
6085
  */
5445
6086
  interface PostRequirementNotification extends BaseNotification {
5446
- notificationType: NotificationType.POST_REQUIREMENT;
6087
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
5447
6088
  /** ID tretmana za koji je vezan post-requirement */
5448
6089
  treatmentId: string;
5449
6090
  /** Lista post-requirements koji treba da se ispune */
@@ -5452,37 +6093,108 @@ interface PostRequirementNotification extends BaseNotification {
5452
6093
  deadline: Timestamp;
5453
6094
  }
5454
6095
  /**
5455
- * Notifikacija za podsetnik o zakazanom terminu
6096
+ * Notification for a specific instruction from a PatientRequirementInstance.
6097
+ * Example: "Do not eat 2 hours before your [Procedure Name] appointment."
6098
+ */
6099
+ interface RequirementInstructionDueNotification extends BaseNotification {
6100
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
6101
+ appointmentId: string;
6102
+ patientRequirementInstanceId: string;
6103
+ instructionId: string;
6104
+ }
6105
+ /**
6106
+ * Notification reminding about an upcoming appointment.
6107
+ * Example: "Reminder: Your appointment for [Procedure Name] is at [Time] today."
5456
6108
  */
5457
6109
  interface AppointmentReminderNotification extends BaseNotification {
5458
6110
  notificationType: NotificationType.APPOINTMENT_REMINDER;
5459
- /** ID zakazanog termina */
5460
6111
  appointmentId: string;
5461
- /** Vreme termina */
5462
6112
  appointmentTime: Timestamp;
5463
- /** Tip tretmana */
5464
- treatmentType: string;
5465
- /** Ime doktora */
5466
- doctorName: string;
6113
+ procedureName?: string;
6114
+ practitionerName?: string;
6115
+ clinicName?: string;
5467
6116
  }
5468
6117
  /**
5469
- * Notifikacija o promeni statusa termina
6118
+ * Notification about a change in appointment status (e.g., confirmed, checked-in).
6119
+ * Excludes cancellations and reschedule proposals, which have their own types.
6120
+ * Example: "Your appointment for [Procedure Name] has been Confirmed."
5470
6121
  */
5471
- interface AppointmentNotification extends BaseNotification {
5472
- notificationType: NotificationType.APPOINTMENT_NOTIFICATION;
5473
- /** ID zakazanog termina */
6122
+ interface AppointmentStatusChangeNotification extends BaseNotification {
6123
+ notificationType: NotificationType.APPOINTMENT_STATUS_CHANGE;
6124
+ appointmentId: string;
6125
+ newStatus: string;
6126
+ previousStatus?: string;
6127
+ procedureName?: string;
6128
+ }
6129
+ /**
6130
+ * Notification informing the patient that the clinic has proposed a new time for their appointment.
6131
+ * Example: "Action Required: [Clinic Name] has proposed a new time for your [Procedure Name] appointment."
6132
+ */
6133
+ interface AppointmentRescheduledProposalNotification extends BaseNotification {
6134
+ notificationType: NotificationType.APPOINTMENT_RESCHEDULED_PROPOSAL;
6135
+ appointmentId: string;
6136
+ newProposedStartTime: Timestamp;
6137
+ newProposedEndTime: Timestamp;
6138
+ procedureName?: string;
6139
+ }
6140
+ /**
6141
+ * Notification informing about a cancelled appointment.
6142
+ * Example: "Your appointment for [Procedure Name] on [Date] has been cancelled."
6143
+ */
6144
+ interface AppointmentCancelledNotification extends BaseNotification {
6145
+ notificationType: NotificationType.APPOINTMENT_CANCELLED;
5474
6146
  appointmentId: string;
5475
- /** Novi status termina */
5476
- appointmentStatus: string;
5477
- /** Prethodni status termina */
5478
- previousStatus: string;
5479
- /** Razlog promene (opciono) */
5480
6147
  reason?: string;
6148
+ cancelledByRole?: UserRole;
6149
+ procedureName?: string;
6150
+ }
6151
+ /**
6152
+ * Notification reminding a user to fill a specific form.
6153
+ * Example: "Reminder: Please complete the '[Form Name]' form for your upcoming appointment."
6154
+ */
6155
+ interface FormReminderNotification extends BaseNotification {
6156
+ notificationType: NotificationType.FORM_REMINDER;
6157
+ appointmentId: string;
6158
+ formId: string;
6159
+ formName: string;
6160
+ formDeadline?: Timestamp;
6161
+ }
6162
+ /**
6163
+ * Notification confirming a form submission.
6164
+ * Example: "Thank you! Your '[Form Name]' form has been submitted successfully."
6165
+ */
6166
+ interface FormSubmissionConfirmationNotification extends BaseNotification {
6167
+ notificationType: NotificationType.FORM_SUBMISSION_CONFIRMATION;
6168
+ appointmentId?: string;
6169
+ formId: string;
6170
+ formName: string;
6171
+ }
6172
+ /**
6173
+ * Notification requesting a patient to leave a review after an appointment.
6174
+ * Example: "Hope you had a great experience! Would you like to share your feedback for your visit on [Date]?"
6175
+ */
6176
+ interface ReviewRequestNotification extends BaseNotification {
6177
+ notificationType: NotificationType.REVIEW_REQUEST;
6178
+ appointmentId: string;
6179
+ practitionerName?: string;
6180
+ procedureName?: string;
6181
+ }
6182
+ /**
6183
+ * Generic notification for direct messages or announcements.
6184
+ */
6185
+ interface GeneralMessageNotification extends BaseNotification {
6186
+ notificationType: NotificationType.GENERAL_MESSAGE;
6187
+ }
6188
+ interface PaymentConfirmationNotification extends BaseNotification {
6189
+ notificationType: NotificationType.PAYMENT_CONFIRMATION;
6190
+ transactionId: string;
6191
+ appointmentId?: string;
6192
+ amount: string;
5481
6193
  }
5482
6194
  /**
5483
6195
  * Unija svih tipova notifikacija
5484
6196
  */
5485
- type Notification = PreRequirementNotification | PostRequirementNotification | AppointmentReminderNotification | AppointmentNotification;
6197
+ type Notification = PreRequirementNotification | PostRequirementNotification | RequirementInstructionDueNotification | AppointmentReminderNotification | AppointmentStatusChangeNotification | AppointmentRescheduledProposalNotification | AppointmentCancelledNotification | FormReminderNotification | FormSubmissionConfirmationNotification | ReviewRequestNotification | GeneralMessageNotification | PaymentConfirmationNotification;
5486
6198
 
5487
6199
  declare class NotificationService extends BaseService {
5488
6200
  /**
@@ -5719,39 +6431,72 @@ declare class DocumentationTemplateService extends BaseService {
5719
6431
  }
5720
6432
 
5721
6433
  /**
5722
- * Service for managing filled documents
6434
+ * Service for managing filled documents within appointment subcollections
5723
6435
  */
5724
6436
  declare class FilledDocumentService extends BaseService {
5725
- private readonly collectionRef;
5726
6437
  private readonly templateService;
5727
6438
  constructor(...args: ConstructorParameters<typeof BaseService>);
6439
+ private getFormSubcollectionPath;
6440
+ /**
6441
+ * Create a new filled document within an appointment's subcollection.
6442
+ * @param templateId - ID of the template to use.
6443
+ * @param appointmentId - ID of the appointment this form belongs to.
6444
+ * @param procedureId - ID of the procedure associated with this form.
6445
+ * @param patientId - ID of the patient.
6446
+ * @param practitionerId - ID of the practitioner (can be system/generic if patient is filling).
6447
+ * @param clinicId - ID of the clinic.
6448
+ * @param initialValues - Optional initial values for the form elements.
6449
+ * @param initialStatus - Optional initial status for the form.
6450
+ * @returns The created filled document.
6451
+ */
6452
+ createFilledDocumentForAppointment(templateId: string, appointmentId: string, procedureId: string, patientId: string, practitionerId: string, // Consider if this is always available or if a placeholder is needed
6453
+ clinicId: string, // Same consideration as practitionerId
6454
+ initialValues?: {
6455
+ [elementId: string]: any;
6456
+ }, initialStatus?: FilledDocumentStatus): Promise<FilledDocument>;
5728
6457
  /**
5729
- * Create a new filled document
5730
- * @param templateId - ID of the template to use
5731
- * @param patientId - ID of the patient
5732
- * @param practitionerId - ID of the practitioner
5733
- * @param clinicId - ID of the clinic
5734
- * @returns The created filled document
5735
- */
5736
- createFilledDocument(templateId: string, patientId: string, practitionerId: string, clinicId: string): Promise<FilledDocument>;
5737
- /**
5738
- * Get a filled document by ID
5739
- * @param documentId - ID of the filled document to retrieve
5740
- * @returns The filled document or null if not found
6458
+ * Get a specific filled document from an appointment's subcollection.
6459
+ * @param appointmentId - ID of the appointment.
6460
+ * @param formId - ID of the filled document.
6461
+ * @param isUserForm - Boolean indicating if it's a user form or doctor form.
6462
+ * @returns The filled document or null if not found.
5741
6463
  */
5742
- getFilledDocumentById(documentId: string): Promise<FilledDocument | null>;
6464
+ getFilledDocumentFromAppointmentById(appointmentId: string, formId: string, isUserForm: boolean): Promise<FilledDocument | null>;
5743
6465
  /**
5744
- * Update values in a filled document
5745
- * @param documentId - ID of the filled document to update
5746
- * @param values - Updated values for elements
5747
- * @param status - Optional new status for the document
5748
- * @returns The updated filled document
6466
+ * Update values or status in a filled document within an appointment's subcollection.
6467
+ * @param appointmentId - ID of the appointment.
6468
+ * @param formId - ID of the filled document to update.
6469
+ * @param isUserForm - Boolean indicating if it's a user form or doctor form.
6470
+ * @param values - Updated values for elements.
6471
+ * @param status - Optional new status for the document.
6472
+ * @returns The updated filled document.
5749
6473
  */
5750
- updateFilledDocument(documentId: string, values: {
6474
+ updateFilledDocumentInAppointment(appointmentId: string, formId: string, isUserForm: boolean, values?: {
5751
6475
  [elementId: string]: any;
5752
6476
  }, status?: FilledDocumentStatus): Promise<FilledDocument>;
5753
6477
  /**
5754
- * Get filled documents for a patient
6478
+ * Get all filled user forms for a specific appointment.
6479
+ * @param appointmentId ID of the appointment.
6480
+ * @param pageSize Number of documents to retrieve.
6481
+ * @param lastDoc Last document from previous page for pagination.
6482
+ */
6483
+ getFilledUserFormsForAppointment(appointmentId: string, pageSize?: number, lastDoc?: QueryDocumentSnapshot<FilledDocument>): Promise<{
6484
+ documents: FilledDocument[];
6485
+ lastDoc: QueryDocumentSnapshot<FilledDocument> | null;
6486
+ }>;
6487
+ /**
6488
+ * Get all filled doctor forms for a specific appointment.
6489
+ * @param appointmentId ID of the appointment.
6490
+ * @param pageSize Number of documents to retrieve.
6491
+ * @param lastDoc Last document from previous page for pagination.
6492
+ */
6493
+ getFilledDoctorFormsForAppointment(appointmentId: string, pageSize?: number, lastDoc?: QueryDocumentSnapshot<FilledDocument>): Promise<{
6494
+ documents: FilledDocument[];
6495
+ lastDoc: QueryDocumentSnapshot<FilledDocument> | null;
6496
+ }>;
6497
+ private executeQuery;
6498
+ /**
6499
+ * Get filled documents for a patient (NEEDS REWORK for subcollections or Collection Group Query)
5755
6500
  * @param patientId - ID of the patient
5756
6501
  * @param pageSize - Number of documents to retrieve
5757
6502
  * @param lastDoc - Last document from previous page for pagination
@@ -5762,7 +6507,7 @@ declare class FilledDocumentService extends BaseService {
5762
6507
  lastDoc: QueryDocumentSnapshot<FilledDocument> | null;
5763
6508
  }>;
5764
6509
  /**
5765
- * Get filled documents for a practitioner
6510
+ * Get filled documents for a practitioner (NEEDS REWORK for subcollections or Collection Group Query)
5766
6511
  * @param practitionerId - ID of the practitioner
5767
6512
  * @param pageSize - Number of documents to retrieve
5768
6513
  * @param lastDoc - Last document from previous page for pagination
@@ -5773,7 +6518,7 @@ declare class FilledDocumentService extends BaseService {
5773
6518
  lastDoc: QueryDocumentSnapshot<FilledDocument> | null;
5774
6519
  }>;
5775
6520
  /**
5776
- * Get filled documents for a clinic
6521
+ * Get filled documents for a clinic (NEEDS REWORK for subcollections or Collection Group Query)
5777
6522
  * @param clinicId - ID of the clinic
5778
6523
  * @param pageSize - Number of documents to retrieve
5779
6524
  * @param lastDoc - Last document from previous page for pagination
@@ -5784,7 +6529,7 @@ declare class FilledDocumentService extends BaseService {
5784
6529
  lastDoc: QueryDocumentSnapshot<FilledDocument> | null;
5785
6530
  }>;
5786
6531
  /**
5787
- * Get filled documents by template
6532
+ * Get filled documents by template (NEEDS REWORK for subcollections or Collection Group Query)
5788
6533
  * @param templateId - ID of the template
5789
6534
  * @param pageSize - Number of documents to retrieve
5790
6535
  * @param lastDoc - Last document from previous page for pagination
@@ -5795,7 +6540,7 @@ declare class FilledDocumentService extends BaseService {
5795
6540
  lastDoc: QueryDocumentSnapshot<FilledDocument> | null;
5796
6541
  }>;
5797
6542
  /**
5798
- * Get filled documents by status
6543
+ * Get filled documents by status (NEEDS REWORK for subcollections or Collection Group Query)
5799
6544
  * @param status - Status to filter by
5800
6545
  * @param pageSize - Number of documents to retrieve
5801
6546
  * @param lastDoc - Last document from previous page for pagination
@@ -6438,6 +7183,7 @@ declare class AppointmentService extends BaseService {
6438
7183
  private patientService;
6439
7184
  private practitionerService;
6440
7185
  private clinicService;
7186
+ private filledDocumentService;
6441
7187
  private functions;
6442
7188
  /**
6443
7189
  * Creates a new AppointmentService instance.
@@ -6450,30 +7196,7 @@ declare class AppointmentService extends BaseService {
6450
7196
  * @param practitionerService Practitioner service instance
6451
7197
  * @param clinicService Clinic service instance
6452
7198
  */
6453
- constructor(db: Firestore, auth: Auth, app: FirebaseApp, calendarService: CalendarServiceV2, patientService: PatientService, practitionerService: PractitionerService, clinicService: ClinicService);
6454
- /**
6455
- * Test method using the callable function version of getAvailableBookingSlots
6456
- * For development and testing purposes only - not for production use
6457
- *
6458
- * @param clinicId ID of the clinic
6459
- * @param practitionerId ID of the practitioner
6460
- * @param procedureId ID of the procedure
6461
- * @param startDate Start date of the time range to check
6462
- * @param endDate End date of the time range to check
6463
- * @returns Test result from the callable function
6464
- */
6465
- testGetAvailableBookingSlots(clinicId: string, practitionerId: string, procedureId: string, startDate: Date, endDate: Date): Promise<any>;
6466
- /**
6467
- * Gets available booking slots for a specific clinic, practitioner, and procedure.
6468
- *
6469
- * @param clinicId ID of the clinic
6470
- * @param practitionerId ID of the practitioner
6471
- * @param procedureId ID of the procedure
6472
- * @param startDate Start date of the time range to check
6473
- * @param endDate End date of the time range to check
6474
- * @returns Array of available booking slots
6475
- */
6476
- getAvailableBookingSlots(clinicId: string, practitionerId: string, procedureId: string, startDate: Date, endDate: Date): Promise<AvailableSlot[]>;
7199
+ constructor(db: Firestore, auth: Auth, app: FirebaseApp, calendarService: CalendarServiceV2, patientService: PatientService, practitionerService: PractitionerService, clinicService: ClinicService, filledDocumentService: FilledDocumentService);
6477
7200
  /**
6478
7201
  * Gets available booking slots for a specific clinic, practitioner, and procedure using HTTP request.
6479
7202
  * This is an alternative implementation using direct HTTP request instead of callable function.
@@ -6487,12 +7210,12 @@ declare class AppointmentService extends BaseService {
6487
7210
  */
6488
7211
  getAvailableBookingSlotsHttp(clinicId: string, practitionerId: string, procedureId: string, startDate: Date, endDate: Date): Promise<AvailableSlot[]>;
6489
7212
  /**
6490
- * Creates a new appointment.
7213
+ * Creates an appointment via the Cloud Function orchestrateAppointmentCreation
6491
7214
  *
6492
- * @param data Data needed to create the appointment
7215
+ * @param data - CreateAppointmentData object
6493
7216
  * @returns The created appointment
6494
7217
  */
6495
- createAppointment(data: CreateAppointmentData): Promise<Appointment>;
7218
+ createAppointmentHttp(data: CreateAppointmentData): Promise<Appointment>;
6496
7219
  /**
6497
7220
  * Gets an appointment by ID.
6498
7221
  *
@@ -6575,88 +7298,73 @@ declare class AppointmentService extends BaseService {
6575
7298
  *
6576
7299
  * @param appointmentId ID of the appointment
6577
7300
  * @param newStatus New status to set
6578
- * @param cancellationReason Required if canceling the appointment
6579
- * @param canceledBy Required if canceling the appointment
7301
+ * @param details Optional details for the status change
6580
7302
  * @returns The updated appointment
6581
7303
  */
6582
- updateAppointmentStatus(appointmentId: string, newStatus: AppointmentStatus, cancellationReason?: string, canceledBy?: "patient" | "clinic" | "practitioner" | "system"): Promise<Appointment>;
7304
+ updateAppointmentStatus(appointmentId: string, newStatus: AppointmentStatus, details?: {
7305
+ cancellationReason?: string;
7306
+ canceledBy?: "patient" | "clinic" | "practitioner" | "system";
7307
+ }): Promise<Appointment>;
6583
7308
  /**
6584
- * Confirms an appointment.
6585
- *
6586
- * @param appointmentId ID of the appointment to confirm
6587
- * @returns The confirmed appointment
7309
+ * Confirms a PENDING appointment by an Admin/Clinic.
6588
7310
  */
6589
- confirmAppointment(appointmentId: string): Promise<Appointment>;
7311
+ confirmAppointmentAdmin(appointmentId: string): Promise<Appointment>;
6590
7312
  /**
6591
- * Cancels an appointment from the clinic side.
6592
- *
6593
- * @param appointmentId ID of the appointment to cancel
6594
- * @param reason Reason for cancellation
6595
- * @returns The canceled appointment
7313
+ * Cancels an appointment by the User (Patient).
6596
7314
  */
6597
- cancelAppointmentByClinic(appointmentId: string, reason: string): Promise<Appointment>;
7315
+ cancelAppointmentUser(appointmentId: string, reason: string): Promise<Appointment>;
6598
7316
  /**
6599
- * Cancels an appointment from the patient side.
6600
- *
6601
- * @param appointmentId ID of the appointment to cancel
6602
- * @param reason Reason for cancellation
6603
- * @returns The canceled appointment
7317
+ * Cancels an appointment by an Admin/Clinic.
6604
7318
  */
6605
- cancelAppointmentByPatient(appointmentId: string, reason: string): Promise<Appointment>;
7319
+ cancelAppointmentAdmin(appointmentId: string, reason: string): Promise<Appointment>;
6606
7320
  /**
6607
- * Marks an appointment as checked in.
6608
- *
6609
- * @param appointmentId ID of the appointment
6610
- * @returns The updated appointment
7321
+ * Admin proposes to reschedule an appointment.
7322
+ * Sets status to RESCHEDULED_BY_CLINIC and updates times.
6611
7323
  */
6612
- checkInAppointment(appointmentId: string): Promise<Appointment>;
7324
+ rescheduleAppointmentAdmin(appointmentId: string, newStartTime: Timestamp, newEndTime: Timestamp): Promise<Appointment>;
6613
7325
  /**
6614
- * Marks an appointment as in progress.
6615
- *
6616
- * @param appointmentId ID of the appointment
6617
- * @returns The updated appointment
7326
+ * User confirms a reschedule proposed by the clinic.
7327
+ * Status changes from RESCHEDULED_BY_CLINIC to CONFIRMED.
6618
7328
  */
6619
- startAppointment(appointmentId: string): Promise<Appointment>;
7329
+ rescheduleAppointmentConfirmUser(appointmentId: string): Promise<Appointment>;
6620
7330
  /**
6621
- * Marks an appointment as completed.
6622
- *
6623
- * @param appointmentId ID of the appointment
6624
- * @param actualDurationMinutes Actual duration of the appointment in minutes
6625
- * @returns The updated appointment
7331
+ * User rejects a reschedule proposed by the clinic.
7332
+ * Status changes from RESCHEDULED_BY_CLINIC to CANCELED_PATIENT_RESCHEDULED.
6626
7333
  */
6627
- completeAppointment(appointmentId: string, actualDurationMinutes?: number): Promise<Appointment>;
7334
+ rescheduleAppointmentRejectUser(appointmentId: string, reason: string): Promise<Appointment>;
6628
7335
  /**
6629
- * Marks an appointment as no-show.
6630
- *
6631
- * @param appointmentId ID of the appointment
6632
- * @returns The updated appointment
7336
+ * Admin checks in a patient for their appointment.
7337
+ * Requires all pending user forms to be completed.
6633
7338
  */
6634
- markNoShow(appointmentId: string): Promise<Appointment>;
7339
+ checkInPatientAdmin(appointmentId: string): Promise<Appointment>;
6635
7340
  /**
6636
- * Updates the payment status of an appointment.
6637
- *
6638
- * @param appointmentId ID of the appointment
6639
- * @param paymentStatus New payment status
6640
- * @param paymentTransactionId Optional transaction ID for the payment
6641
- * @returns The updated appointment
7341
+ * Doctor starts the appointment procedure.
6642
7342
  */
6643
- updatePaymentStatus(appointmentId: string, paymentStatus: PaymentStatus, paymentTransactionId?: string): Promise<Appointment>;
7343
+ startAppointmentDoctor(appointmentId: string): Promise<Appointment>;
6644
7344
  /**
6645
- * Marks pre-procedure requirements as completed.
6646
- *
6647
- * @param appointmentId ID of the appointment
6648
- * @param requirementIds IDs of the requirements to mark as completed
6649
- * @returns The updated appointment
7345
+ * Doctor completes and finalizes the appointment.
6650
7346
  */
6651
- completePreRequirements(appointmentId: string, requirementIds: string[]): Promise<Appointment>;
7347
+ completeAppointmentDoctor(appointmentId: string, finalizationNotes: string, actualDurationMinutesInput?: number): Promise<Appointment>;
6652
7348
  /**
6653
- * Marks post-procedure requirements as completed.
6654
- *
6655
- * @param appointmentId ID of the appointment
6656
- * @param requirementIds IDs of the requirements to mark as completed
6657
- * @returns The updated appointment
7349
+ * Admin marks an appointment as No-Show.
7350
+ */
7351
+ markNoShowAdmin(appointmentId: string): Promise<Appointment>;
7352
+ /**
7353
+ * Adds a media item to an appointment.
6658
7354
  */
6659
- completePostRequirements(appointmentId: string, requirementIds: string[]): Promise<Appointment>;
7355
+ addMediaToAppointment(appointmentId: string, mediaItemData: Omit<AppointmentMediaItem, "id" | "uploadedAt">): Promise<Appointment>;
7356
+ /**
7357
+ * Removes a media item from an appointment.
7358
+ */
7359
+ removeMediaFromAppointment(appointmentId: string, mediaItemId: string): Promise<Appointment>;
7360
+ /**
7361
+ * Adds or updates review information for an appointment.
7362
+ */
7363
+ addReviewToAppointment(appointmentId: string, reviewData: Omit<PatientReviewInfo, "reviewedAt" | "reviewId">): Promise<Appointment>;
7364
+ /**
7365
+ * Updates the payment status of an appointment.
7366
+ */
7367
+ updatePaymentStatus(appointmentId: string, paymentStatus: PaymentStatus, paymentTransactionId?: string): Promise<Appointment>;
6660
7368
  /**
6661
7369
  * Updates the internal notes of an appointment.
6662
7370
  *
@@ -6665,11 +7373,116 @@ declare class AppointmentService extends BaseService {
6665
7373
  * @returns The updated appointment
6666
7374
  */
6667
7375
  updateInternalNotes(appointmentId: string, notes: string | null): Promise<Appointment>;
7376
+ }
7377
+
7378
+ /**
7379
+ * Defines the status of a specific instruction within a PatientRequirementInstance.
7380
+ * This helps track each actionable item for the patient.
7381
+ */
7382
+ declare enum PatientInstructionStatus {
7383
+ PENDING_NOTIFICATION = "pendingNotification",// Notification is scheduled but not yet due/sent
7384
+ ACTION_DUE = "actionDue",// The time for this instruction/notification has arrived
7385
+ ACTION_TAKEN = "actionTaken",// Patient has acknowledged or completed this specific instruction
7386
+ MISSED = "missed",// The due time for this instruction passed without action
7387
+ CANCELLED = "cancelled",// This specific instruction was cancelled (e.g., requirement changed)
7388
+ SKIPPED = "skipped"
7389
+ }
7390
+ /**
7391
+ * Represents a single, timed instruction or notification point derived from a Requirement's timeframe.
7392
+ */
7393
+ interface PatientRequirementInstruction {
7394
+ instructionId: string;
7395
+ instructionText: string;
7396
+ dueTime: Timestamp;
7397
+ actionableWindow: number;
7398
+ status: PatientInstructionStatus;
7399
+ originalNotifyAtValue: number;
7400
+ originalTimeframeUnit: TimeFrame["unit"];
7401
+ notificationId?: string;
7402
+ actionTakenAt?: Timestamp;
7403
+ updatedAt: Timestamp;
7404
+ }
7405
+ /**
7406
+ * Defines the overall status of a PatientRequirementInstance.
7407
+ */
7408
+ declare enum PatientRequirementOverallStatus {
7409
+ ACTIVE = "active",// Requirement instance is active, instructions are pending or due.
7410
+ ALL_INSTRUCTIONS_MET = "allInstructionsMet",// All instructions actioned/completed by the patient.
7411
+ PARTIALLY_COMPLETED = "partiallyCompleted",// Some instructions met, some missed or pending.
7412
+ FAILED = "failed",// The patient failed to complete the requirement on time and above treashold of 60%
7413
+ CANCELLED_APPOINTMENT = "cancelledAppointment",// Entire requirement instance cancelled due to appointment cancellation.
7414
+ SUPERSEDED_RESCHEDULE = "supersededReschedule",// This instance was replaced by a new one due to appointment reschedule.
7415
+ FAILED_TO_PROCESS = "failedToProcess"
7416
+ }
7417
+ /**
7418
+ * Represents an instance of a backoffice Requirement, tailored to a specific patient and appointment.
7419
+ * This document lives in the patient's subcollection: `patients/{patientId}/patientRequirements/{instanceId}`.
7420
+ */
7421
+ interface PatientRequirementInstance {
7422
+ id: string;
7423
+ patientId: string;
7424
+ appointmentId: string;
7425
+ originalRequirementId: string;
7426
+ requirementType: RequirementType;
7427
+ requirementName: string;
7428
+ requirementDescription: string;
7429
+ requirementImportance: RequirementImportance;
7430
+ overallStatus: PatientRequirementOverallStatus;
7431
+ instructions: PatientRequirementInstruction[];
7432
+ createdAt: Timestamp;
7433
+ updatedAt: Timestamp;
7434
+ }
7435
+ /**
7436
+ * Firestore subcollection name for patient requirement instances.
7437
+ */
7438
+ declare const PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME = "patientRequirements";
7439
+
7440
+ /**
7441
+ * Interface for filtering active patient requirements.
7442
+ */
7443
+ interface PatientRequirementsFilters {
7444
+ appointmentId?: string | "all";
7445
+ statuses?: PatientRequirementOverallStatus[];
7446
+ instructionStatuses?: PatientInstructionStatus[];
7447
+ dueBefore?: Timestamp;
7448
+ dueAfter?: Timestamp;
7449
+ }
7450
+ declare class PatientRequirementsService extends BaseService {
7451
+ constructor(db: Firestore, auth: Auth, app: FirebaseApp);
7452
+ private getPatientRequirementsCollectionRef;
7453
+ private getPatientRequirementDocRef;
7454
+ /**
7455
+ * Gets a specific patient requirement instance by its ID.
7456
+ * @param patientId - The ID of the patient.
7457
+ * @param instanceId - The ID of the requirement instance.
7458
+ * @returns The patient requirement instance or null if not found.
7459
+ */
7460
+ getPatientRequirementInstance(patientId: string, instanceId: string): Promise<PatientRequirementInstance | null>;
7461
+ /**
7462
+ * Retrieves patient requirement instances based on specified filters.
7463
+ * This is a flexible query method.
7464
+ *
7465
+ * @param patientId - The ID of the patient.
7466
+ * @param filters - Optional filters for appointmentId, overall statuses, instruction statuses, and due timeframes.
7467
+ * @param pageLimit - Optional limit for pagination.
7468
+ * @param lastVisible - Optional last document snapshot for pagination.
7469
+ * @returns A promise resolving to an array of matching patient requirement instances and the last document snapshot.
7470
+ */
7471
+ getAllPatientRequirementInstances(patientId: string, filters?: PatientRequirementsFilters, pageLimit?: number, lastVisible?: DocumentSnapshot): Promise<{
7472
+ requirements: PatientRequirementInstance[];
7473
+ lastDoc: DocumentSnapshot | null;
7474
+ }>;
6668
7475
  /**
6669
- * Debug helper: Get the current user's ID token for testing purposes
6670
- * Use this token in Postman with Authorization: Bearer TOKEN
7476
+ * Marks a specific instruction within a PatientRequirementInstance as ACTION_TAKEN.
7477
+ * If all instructions are actioned, updates the overallStatus of the instance.
7478
+ *
7479
+ * @param patientId - The ID of the patient.
7480
+ * @param instanceId - The ID of the PatientRequirementInstance.
7481
+ * @param instructionId - The ID of the instruction to complete.
7482
+ * @returns The updated PatientRequirementInstance.
7483
+ * @throws Error if the instance or instruction is not found, or if the instruction is not in a completable state.
6671
7484
  */
6672
- getDebugToken(): Promise<string | null>;
7485
+ completeInstruction(patientId: string, instanceId: string, instructionId: string): Promise<PatientRequirementInstance>;
6673
7486
  }
6674
7487
 
6675
7488
  declare class AuthError extends Error {
@@ -6894,7 +7707,7 @@ declare const preRequirementNotificationSchema: z.ZodObject<z.objectUtil.extendS
6894
7707
  isRead: z.ZodBoolean;
6895
7708
  userRole: z.ZodNativeEnum<typeof UserRole>;
6896
7709
  }, {
6897
- notificationType: z.ZodLiteral<NotificationType.PRE_REQUIREMENT>;
7710
+ notificationType: z.ZodLiteral<NotificationType.REQUIREMENT_INSTRUCTION_DUE>;
6898
7711
  treatmentId: z.ZodString;
6899
7712
  requirements: z.ZodArray<z.ZodString, "many">;
6900
7713
  deadline: z.ZodAny;
@@ -6902,7 +7715,7 @@ declare const preRequirementNotificationSchema: z.ZodObject<z.objectUtil.extendS
6902
7715
  status: NotificationStatus;
6903
7716
  title: string;
6904
7717
  requirements: string[];
6905
- notificationType: NotificationType.PRE_REQUIREMENT;
7718
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
6906
7719
  treatmentId: string;
6907
7720
  userId: string;
6908
7721
  notificationTokens: string[];
@@ -6918,7 +7731,7 @@ declare const preRequirementNotificationSchema: z.ZodObject<z.objectUtil.extendS
6918
7731
  status: NotificationStatus;
6919
7732
  title: string;
6920
7733
  requirements: string[];
6921
- notificationType: NotificationType.PRE_REQUIREMENT;
7734
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
6922
7735
  treatmentId: string;
6923
7736
  userId: string;
6924
7737
  notificationTokens: string[];
@@ -6948,7 +7761,7 @@ declare const postRequirementNotificationSchema: z.ZodObject<z.objectUtil.extend
6948
7761
  isRead: z.ZodBoolean;
6949
7762
  userRole: z.ZodNativeEnum<typeof UserRole>;
6950
7763
  }, {
6951
- notificationType: z.ZodLiteral<NotificationType.POST_REQUIREMENT>;
7764
+ notificationType: z.ZodLiteral<NotificationType.REQUIREMENT_INSTRUCTION_DUE>;
6952
7765
  treatmentId: z.ZodString;
6953
7766
  requirements: z.ZodArray<z.ZodString, "many">;
6954
7767
  deadline: z.ZodAny;
@@ -6956,7 +7769,7 @@ declare const postRequirementNotificationSchema: z.ZodObject<z.objectUtil.extend
6956
7769
  status: NotificationStatus;
6957
7770
  title: string;
6958
7771
  requirements: string[];
6959
- notificationType: NotificationType.POST_REQUIREMENT;
7772
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
6960
7773
  treatmentId: string;
6961
7774
  userId: string;
6962
7775
  notificationTokens: string[];
@@ -6972,7 +7785,7 @@ declare const postRequirementNotificationSchema: z.ZodObject<z.objectUtil.extend
6972
7785
  status: NotificationStatus;
6973
7786
  title: string;
6974
7787
  requirements: string[];
6975
- notificationType: NotificationType.POST_REQUIREMENT;
7788
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
6976
7789
  treatmentId: string;
6977
7790
  userId: string;
6978
7791
  notificationTokens: string[];
@@ -7059,7 +7872,7 @@ declare const appointmentNotificationSchema: z.ZodObject<z.objectUtil.extendShap
7059
7872
  isRead: z.ZodBoolean;
7060
7873
  userRole: z.ZodNativeEnum<typeof UserRole>;
7061
7874
  }, {
7062
- notificationType: z.ZodLiteral<NotificationType.APPOINTMENT_NOTIFICATION>;
7875
+ notificationType: z.ZodLiteral<NotificationType.APPOINTMENT_STATUS_CHANGE>;
7063
7876
  appointmentId: z.ZodString;
7064
7877
  appointmentStatus: z.ZodString;
7065
7878
  previousStatus: z.ZodString;
@@ -7068,14 +7881,14 @@ declare const appointmentNotificationSchema: z.ZodObject<z.objectUtil.extendShap
7068
7881
  status: NotificationStatus;
7069
7882
  title: string;
7070
7883
  appointmentId: string;
7071
- notificationType: NotificationType.APPOINTMENT_NOTIFICATION;
7884
+ notificationType: NotificationType.APPOINTMENT_STATUS_CHANGE;
7072
7885
  userId: string;
7073
7886
  notificationTokens: string[];
7074
7887
  body: string;
7075
7888
  isRead: boolean;
7076
7889
  userRole: UserRole;
7077
- appointmentStatus: string;
7078
7890
  previousStatus: string;
7891
+ appointmentStatus: string;
7079
7892
  id?: string | undefined;
7080
7893
  createdAt?: any;
7081
7894
  updatedAt?: any;
@@ -7085,14 +7898,14 @@ declare const appointmentNotificationSchema: z.ZodObject<z.objectUtil.extendShap
7085
7898
  status: NotificationStatus;
7086
7899
  title: string;
7087
7900
  appointmentId: string;
7088
- notificationType: NotificationType.APPOINTMENT_NOTIFICATION;
7901
+ notificationType: NotificationType.APPOINTMENT_STATUS_CHANGE;
7089
7902
  userId: string;
7090
7903
  notificationTokens: string[];
7091
7904
  body: string;
7092
7905
  isRead: boolean;
7093
7906
  userRole: UserRole;
7094
- appointmentStatus: string;
7095
7907
  previousStatus: string;
7908
+ appointmentStatus: string;
7096
7909
  id?: string | undefined;
7097
7910
  createdAt?: any;
7098
7911
  updatedAt?: any;
@@ -7116,7 +7929,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7116
7929
  isRead: z.ZodBoolean;
7117
7930
  userRole: z.ZodNativeEnum<typeof UserRole>;
7118
7931
  }, {
7119
- notificationType: z.ZodLiteral<NotificationType.PRE_REQUIREMENT>;
7932
+ notificationType: z.ZodLiteral<NotificationType.REQUIREMENT_INSTRUCTION_DUE>;
7120
7933
  treatmentId: z.ZodString;
7121
7934
  requirements: z.ZodArray<z.ZodString, "many">;
7122
7935
  deadline: z.ZodAny;
@@ -7124,7 +7937,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7124
7937
  status: NotificationStatus;
7125
7938
  title: string;
7126
7939
  requirements: string[];
7127
- notificationType: NotificationType.PRE_REQUIREMENT;
7940
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
7128
7941
  treatmentId: string;
7129
7942
  userId: string;
7130
7943
  notificationTokens: string[];
@@ -7140,7 +7953,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7140
7953
  status: NotificationStatus;
7141
7954
  title: string;
7142
7955
  requirements: string[];
7143
- notificationType: NotificationType.PRE_REQUIREMENT;
7956
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
7144
7957
  treatmentId: string;
7145
7958
  userId: string;
7146
7959
  notificationTokens: string[];
@@ -7166,7 +7979,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7166
7979
  isRead: z.ZodBoolean;
7167
7980
  userRole: z.ZodNativeEnum<typeof UserRole>;
7168
7981
  }, {
7169
- notificationType: z.ZodLiteral<NotificationType.POST_REQUIREMENT>;
7982
+ notificationType: z.ZodLiteral<NotificationType.REQUIREMENT_INSTRUCTION_DUE>;
7170
7983
  treatmentId: z.ZodString;
7171
7984
  requirements: z.ZodArray<z.ZodString, "many">;
7172
7985
  deadline: z.ZodAny;
@@ -7174,7 +7987,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7174
7987
  status: NotificationStatus;
7175
7988
  title: string;
7176
7989
  requirements: string[];
7177
- notificationType: NotificationType.POST_REQUIREMENT;
7990
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
7178
7991
  treatmentId: string;
7179
7992
  userId: string;
7180
7993
  notificationTokens: string[];
@@ -7190,7 +8003,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7190
8003
  status: NotificationStatus;
7191
8004
  title: string;
7192
8005
  requirements: string[];
7193
- notificationType: NotificationType.POST_REQUIREMENT;
8006
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
7194
8007
  treatmentId: string;
7195
8008
  userId: string;
7196
8009
  notificationTokens: string[];
@@ -7269,7 +8082,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7269
8082
  isRead: z.ZodBoolean;
7270
8083
  userRole: z.ZodNativeEnum<typeof UserRole>;
7271
8084
  }, {
7272
- notificationType: z.ZodLiteral<NotificationType.APPOINTMENT_NOTIFICATION>;
8085
+ notificationType: z.ZodLiteral<NotificationType.APPOINTMENT_STATUS_CHANGE>;
7273
8086
  appointmentId: z.ZodString;
7274
8087
  appointmentStatus: z.ZodString;
7275
8088
  previousStatus: z.ZodString;
@@ -7278,14 +8091,14 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7278
8091
  status: NotificationStatus;
7279
8092
  title: string;
7280
8093
  appointmentId: string;
7281
- notificationType: NotificationType.APPOINTMENT_NOTIFICATION;
8094
+ notificationType: NotificationType.APPOINTMENT_STATUS_CHANGE;
7282
8095
  userId: string;
7283
8096
  notificationTokens: string[];
7284
8097
  body: string;
7285
8098
  isRead: boolean;
7286
8099
  userRole: UserRole;
7287
- appointmentStatus: string;
7288
8100
  previousStatus: string;
8101
+ appointmentStatus: string;
7289
8102
  id?: string | undefined;
7290
8103
  createdAt?: any;
7291
8104
  updatedAt?: any;
@@ -7295,14 +8108,14 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7295
8108
  status: NotificationStatus;
7296
8109
  title: string;
7297
8110
  appointmentId: string;
7298
- notificationType: NotificationType.APPOINTMENT_NOTIFICATION;
8111
+ notificationType: NotificationType.APPOINTMENT_STATUS_CHANGE;
7299
8112
  userId: string;
7300
8113
  notificationTokens: string[];
7301
8114
  body: string;
7302
8115
  isRead: boolean;
7303
8116
  userRole: UserRole;
7304
- appointmentStatus: string;
7305
8117
  previousStatus: string;
8118
+ appointmentStatus: string;
7306
8119
  id?: string | undefined;
7307
8120
  createdAt?: any;
7308
8121
  updatedAt?: any;
@@ -9715,7 +10528,7 @@ declare const practitionerCertificationSchema: z.ZodObject<{
9715
10528
  licenseNumber: string;
9716
10529
  issuingAuthority: string;
9717
10530
  issueDate: Date | Timestamp;
9718
- verificationStatus: "pending" | "verified" | "rejected";
10531
+ verificationStatus: "pending" | "rejected" | "verified";
9719
10532
  expiryDate?: Date | Timestamp | undefined;
9720
10533
  }, {
9721
10534
  level: CertificationLevel;
@@ -9723,7 +10536,7 @@ declare const practitionerCertificationSchema: z.ZodObject<{
9723
10536
  licenseNumber: string;
9724
10537
  issuingAuthority: string;
9725
10538
  issueDate: Date | Timestamp;
9726
- verificationStatus: "pending" | "verified" | "rejected";
10539
+ verificationStatus: "pending" | "rejected" | "verified";
9727
10540
  expiryDate?: Date | Timestamp | undefined;
9728
10541
  }>;
9729
10542
  declare const practitionerWorkingHoursSchema: z.ZodObject<{
@@ -10134,7 +10947,7 @@ declare const practitionerSchema: z.ZodObject<{
10134
10947
  licenseNumber: string;
10135
10948
  issuingAuthority: string;
10136
10949
  issueDate: Date | Timestamp;
10137
- verificationStatus: "pending" | "verified" | "rejected";
10950
+ verificationStatus: "pending" | "rejected" | "verified";
10138
10951
  expiryDate?: Date | Timestamp | undefined;
10139
10952
  }, {
10140
10953
  level: CertificationLevel;
@@ -10142,7 +10955,7 @@ declare const practitionerSchema: z.ZodObject<{
10142
10955
  licenseNumber: string;
10143
10956
  issuingAuthority: string;
10144
10957
  issueDate: Date | Timestamp;
10145
- verificationStatus: "pending" | "verified" | "rejected";
10958
+ verificationStatus: "pending" | "rejected" | "verified";
10146
10959
  expiryDate?: Date | Timestamp | undefined;
10147
10960
  }>;
10148
10961
  clinics: z.ZodArray<z.ZodString, "many">;
@@ -10460,14 +11273,14 @@ declare const practitionerSchema: z.ZodObject<{
10460
11273
  }, "strip", z.ZodTypeAny, {
10461
11274
  id: string;
10462
11275
  name: string;
11276
+ technologyName: string;
10463
11277
  duration: number;
10464
- family: ProcedureFamily;
10465
11278
  practitionerId: string;
10466
11279
  clinicId: string;
11280
+ family: ProcedureFamily;
10467
11281
  currency: Currency;
10468
11282
  categoryName: string;
10469
11283
  subcategoryName: string;
10470
- technologyName: string;
10471
11284
  price: number;
10472
11285
  pricingMeasure: PricingMeasure;
10473
11286
  clinicName: string;
@@ -10477,14 +11290,14 @@ declare const practitionerSchema: z.ZodObject<{
10477
11290
  }, {
10478
11291
  id: string;
10479
11292
  name: string;
11293
+ technologyName: string;
10480
11294
  duration: number;
10481
- family: ProcedureFamily;
10482
11295
  practitionerId: string;
10483
11296
  clinicId: string;
11297
+ family: ProcedureFamily;
10484
11298
  currency: Currency;
10485
11299
  categoryName: string;
10486
11300
  subcategoryName: string;
10487
- technologyName: string;
10488
11301
  price: number;
10489
11302
  pricingMeasure: PricingMeasure;
10490
11303
  clinicName: string;
@@ -10550,7 +11363,7 @@ declare const practitionerSchema: z.ZodObject<{
10550
11363
  licenseNumber: string;
10551
11364
  issuingAuthority: string;
10552
11365
  issueDate: Date | Timestamp;
10553
- verificationStatus: "pending" | "verified" | "rejected";
11366
+ verificationStatus: "pending" | "rejected" | "verified";
10554
11367
  expiryDate?: Date | Timestamp | undefined;
10555
11368
  };
10556
11369
  clinics: string[];
@@ -10616,14 +11429,14 @@ declare const practitionerSchema: z.ZodObject<{
10616
11429
  proceduresInfo: {
10617
11430
  id: string;
10618
11431
  name: string;
11432
+ technologyName: string;
10619
11433
  duration: number;
10620
- family: ProcedureFamily;
10621
11434
  practitionerId: string;
10622
11435
  clinicId: string;
11436
+ family: ProcedureFamily;
10623
11437
  currency: Currency;
10624
11438
  categoryName: string;
10625
11439
  subcategoryName: string;
10626
- technologyName: string;
10627
11440
  price: number;
10628
11441
  pricingMeasure: PricingMeasure;
10629
11442
  clinicName: string;
@@ -10666,7 +11479,7 @@ declare const practitionerSchema: z.ZodObject<{
10666
11479
  licenseNumber: string;
10667
11480
  issuingAuthority: string;
10668
11481
  issueDate: Date | Timestamp;
10669
- verificationStatus: "pending" | "verified" | "rejected";
11482
+ verificationStatus: "pending" | "rejected" | "verified";
10670
11483
  expiryDate?: Date | Timestamp | undefined;
10671
11484
  };
10672
11485
  clinics: string[];
@@ -10732,14 +11545,14 @@ declare const practitionerSchema: z.ZodObject<{
10732
11545
  proceduresInfo: {
10733
11546
  id: string;
10734
11547
  name: string;
11548
+ technologyName: string;
10735
11549
  duration: number;
10736
- family: ProcedureFamily;
10737
11550
  practitionerId: string;
10738
11551
  clinicId: string;
11552
+ family: ProcedureFamily;
10739
11553
  currency: Currency;
10740
11554
  categoryName: string;
10741
11555
  subcategoryName: string;
10742
- technologyName: string;
10743
11556
  price: number;
10744
11557
  pricingMeasure: PricingMeasure;
10745
11558
  clinicName: string;
@@ -10811,7 +11624,7 @@ declare const createPractitionerSchema: z.ZodObject<{
10811
11624
  licenseNumber: string;
10812
11625
  issuingAuthority: string;
10813
11626
  issueDate: Date | Timestamp;
10814
- verificationStatus: "pending" | "verified" | "rejected";
11627
+ verificationStatus: "pending" | "rejected" | "verified";
10815
11628
  expiryDate?: Date | Timestamp | undefined;
10816
11629
  }, {
10817
11630
  level: CertificationLevel;
@@ -10819,7 +11632,7 @@ declare const createPractitionerSchema: z.ZodObject<{
10819
11632
  licenseNumber: string;
10820
11633
  issuingAuthority: string;
10821
11634
  issueDate: Date | Timestamp;
10822
- verificationStatus: "pending" | "verified" | "rejected";
11635
+ verificationStatus: "pending" | "rejected" | "verified";
10823
11636
  expiryDate?: Date | Timestamp | undefined;
10824
11637
  }>;
10825
11638
  clinics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -11136,14 +11949,14 @@ declare const createPractitionerSchema: z.ZodObject<{
11136
11949
  }, "strip", z.ZodTypeAny, {
11137
11950
  id: string;
11138
11951
  name: string;
11952
+ technologyName: string;
11139
11953
  duration: number;
11140
- family: ProcedureFamily;
11141
11954
  practitionerId: string;
11142
11955
  clinicId: string;
11956
+ family: ProcedureFamily;
11143
11957
  currency: Currency;
11144
11958
  categoryName: string;
11145
11959
  subcategoryName: string;
11146
- technologyName: string;
11147
11960
  price: number;
11148
11961
  pricingMeasure: PricingMeasure;
11149
11962
  clinicName: string;
@@ -11153,14 +11966,14 @@ declare const createPractitionerSchema: z.ZodObject<{
11153
11966
  }, {
11154
11967
  id: string;
11155
11968
  name: string;
11969
+ technologyName: string;
11156
11970
  duration: number;
11157
- family: ProcedureFamily;
11158
11971
  practitionerId: string;
11159
11972
  clinicId: string;
11973
+ family: ProcedureFamily;
11160
11974
  currency: Currency;
11161
11975
  categoryName: string;
11162
11976
  subcategoryName: string;
11163
- technologyName: string;
11164
11977
  price: number;
11165
11978
  pricingMeasure: PricingMeasure;
11166
11979
  clinicName: string;
@@ -11192,7 +12005,7 @@ declare const createPractitionerSchema: z.ZodObject<{
11192
12005
  licenseNumber: string;
11193
12006
  issuingAuthority: string;
11194
12007
  issueDate: Date | Timestamp;
11195
- verificationStatus: "pending" | "verified" | "rejected";
12008
+ verificationStatus: "pending" | "rejected" | "verified";
11196
12009
  expiryDate?: Date | Timestamp | undefined;
11197
12010
  };
11198
12011
  isVerified: boolean;
@@ -11258,14 +12071,14 @@ declare const createPractitionerSchema: z.ZodObject<{
11258
12071
  proceduresInfo?: {
11259
12072
  id: string;
11260
12073
  name: string;
12074
+ technologyName: string;
11261
12075
  duration: number;
11262
- family: ProcedureFamily;
11263
12076
  practitionerId: string;
11264
12077
  clinicId: string;
12078
+ family: ProcedureFamily;
11265
12079
  currency: Currency;
11266
12080
  categoryName: string;
11267
12081
  subcategoryName: string;
11268
- technologyName: string;
11269
12082
  price: number;
11270
12083
  pricingMeasure: PricingMeasure;
11271
12084
  clinicName: string;
@@ -11294,7 +12107,7 @@ declare const createPractitionerSchema: z.ZodObject<{
11294
12107
  licenseNumber: string;
11295
12108
  issuingAuthority: string;
11296
12109
  issueDate: Date | Timestamp;
11297
- verificationStatus: "pending" | "verified" | "rejected";
12110
+ verificationStatus: "pending" | "rejected" | "verified";
11298
12111
  expiryDate?: Date | Timestamp | undefined;
11299
12112
  };
11300
12113
  isVerified: boolean;
@@ -11360,14 +12173,14 @@ declare const createPractitionerSchema: z.ZodObject<{
11360
12173
  proceduresInfo?: {
11361
12174
  id: string;
11362
12175
  name: string;
12176
+ technologyName: string;
11363
12177
  duration: number;
11364
- family: ProcedureFamily;
11365
12178
  practitionerId: string;
11366
12179
  clinicId: string;
12180
+ family: ProcedureFamily;
11367
12181
  currency: Currency;
11368
12182
  categoryName: string;
11369
12183
  subcategoryName: string;
11370
- technologyName: string;
11371
12184
  price: number;
11372
12185
  pricingMeasure: PricingMeasure;
11373
12186
  clinicName: string;
@@ -11428,7 +12241,7 @@ declare const createDraftPractitionerSchema: z.ZodObject<{
11428
12241
  licenseNumber: string;
11429
12242
  issuingAuthority: string;
11430
12243
  issueDate: Date | Timestamp;
11431
- verificationStatus: "pending" | "verified" | "rejected";
12244
+ verificationStatus: "pending" | "rejected" | "verified";
11432
12245
  expiryDate?: Date | Timestamp | undefined;
11433
12246
  }, {
11434
12247
  level: CertificationLevel;
@@ -11436,7 +12249,7 @@ declare const createDraftPractitionerSchema: z.ZodObject<{
11436
12249
  licenseNumber: string;
11437
12250
  issuingAuthority: string;
11438
12251
  issueDate: Date | Timestamp;
11439
- verificationStatus: "pending" | "verified" | "rejected";
12252
+ verificationStatus: "pending" | "rejected" | "verified";
11440
12253
  expiryDate?: Date | Timestamp | undefined;
11441
12254
  }>;
11442
12255
  clinics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -11753,14 +12566,14 @@ declare const createDraftPractitionerSchema: z.ZodObject<{
11753
12566
  }, "strip", z.ZodTypeAny, {
11754
12567
  id: string;
11755
12568
  name: string;
12569
+ technologyName: string;
11756
12570
  duration: number;
11757
- family: ProcedureFamily;
11758
12571
  practitionerId: string;
11759
12572
  clinicId: string;
12573
+ family: ProcedureFamily;
11760
12574
  currency: Currency;
11761
12575
  categoryName: string;
11762
12576
  subcategoryName: string;
11763
- technologyName: string;
11764
12577
  price: number;
11765
12578
  pricingMeasure: PricingMeasure;
11766
12579
  clinicName: string;
@@ -11770,14 +12583,14 @@ declare const createDraftPractitionerSchema: z.ZodObject<{
11770
12583
  }, {
11771
12584
  id: string;
11772
12585
  name: string;
12586
+ technologyName: string;
11773
12587
  duration: number;
11774
- family: ProcedureFamily;
11775
12588
  practitionerId: string;
11776
12589
  clinicId: string;
12590
+ family: ProcedureFamily;
11777
12591
  currency: Currency;
11778
12592
  categoryName: string;
11779
12593
  subcategoryName: string;
11780
- technologyName: string;
11781
12594
  price: number;
11782
12595
  pricingMeasure: PricingMeasure;
11783
12596
  clinicName: string;
@@ -11807,7 +12620,7 @@ declare const createDraftPractitionerSchema: z.ZodObject<{
11807
12620
  licenseNumber: string;
11808
12621
  issuingAuthority: string;
11809
12622
  issueDate: Date | Timestamp;
11810
- verificationStatus: "pending" | "verified" | "rejected";
12623
+ verificationStatus: "pending" | "rejected" | "verified";
11811
12624
  expiryDate?: Date | Timestamp | undefined;
11812
12625
  };
11813
12626
  isVerified: boolean;
@@ -11872,14 +12685,14 @@ declare const createDraftPractitionerSchema: z.ZodObject<{
11872
12685
  proceduresInfo?: {
11873
12686
  id: string;
11874
12687
  name: string;
12688
+ technologyName: string;
11875
12689
  duration: number;
11876
- family: ProcedureFamily;
11877
12690
  practitionerId: string;
11878
12691
  clinicId: string;
12692
+ family: ProcedureFamily;
11879
12693
  currency: Currency;
11880
12694
  categoryName: string;
11881
12695
  subcategoryName: string;
11882
- technologyName: string;
11883
12696
  price: number;
11884
12697
  pricingMeasure: PricingMeasure;
11885
12698
  clinicName: string;
@@ -11906,7 +12719,7 @@ declare const createDraftPractitionerSchema: z.ZodObject<{
11906
12719
  licenseNumber: string;
11907
12720
  issuingAuthority: string;
11908
12721
  issueDate: Date | Timestamp;
11909
- verificationStatus: "pending" | "verified" | "rejected";
12722
+ verificationStatus: "pending" | "rejected" | "verified";
11910
12723
  expiryDate?: Date | Timestamp | undefined;
11911
12724
  };
11912
12725
  isActive?: boolean | undefined;
@@ -11972,14 +12785,14 @@ declare const createDraftPractitionerSchema: z.ZodObject<{
11972
12785
  proceduresInfo?: {
11973
12786
  id: string;
11974
12787
  name: string;
12788
+ technologyName: string;
11975
12789
  duration: number;
11976
- family: ProcedureFamily;
11977
12790
  practitionerId: string;
11978
12791
  clinicId: string;
12792
+ family: ProcedureFamily;
11979
12793
  currency: Currency;
11980
12794
  categoryName: string;
11981
12795
  subcategoryName: string;
11982
- technologyName: string;
11983
12796
  price: number;
11984
12797
  pricingMeasure: PricingMeasure;
11985
12798
  clinicName: string;
@@ -13510,15 +14323,15 @@ declare const clinicSchema: z.ZodObject<{
13510
14323
  }, "strip", z.ZodTypeAny, {
13511
14324
  id: string;
13512
14325
  name: string;
13513
- photo: string;
13514
14326
  rating: number;
14327
+ photo: string;
13515
14328
  services: string[];
13516
14329
  description?: string | null | undefined;
13517
14330
  }, {
13518
14331
  id: string;
13519
14332
  name: string;
13520
- photo: string;
13521
14333
  rating: number;
14334
+ photo: string;
13522
14335
  services: string[];
13523
14336
  description?: string | null | undefined;
13524
14337
  }>, "many">;
@@ -13543,14 +14356,14 @@ declare const clinicSchema: z.ZodObject<{
13543
14356
  }, "strip", z.ZodTypeAny, {
13544
14357
  id: string;
13545
14358
  name: string;
14359
+ technologyName: string;
13546
14360
  duration: number;
13547
- family: ProcedureFamily;
13548
14361
  practitionerId: string;
13549
14362
  clinicId: string;
14363
+ family: ProcedureFamily;
13550
14364
  currency: Currency;
13551
14365
  categoryName: string;
13552
14366
  subcategoryName: string;
13553
- technologyName: string;
13554
14367
  price: number;
13555
14368
  pricingMeasure: PricingMeasure;
13556
14369
  clinicName: string;
@@ -13560,14 +14373,14 @@ declare const clinicSchema: z.ZodObject<{
13560
14373
  }, {
13561
14374
  id: string;
13562
14375
  name: string;
14376
+ technologyName: string;
13563
14377
  duration: number;
13564
- family: ProcedureFamily;
13565
14378
  practitionerId: string;
13566
14379
  clinicId: string;
14380
+ family: ProcedureFamily;
13567
14381
  currency: Currency;
13568
14382
  categoryName: string;
13569
14383
  subcategoryName: string;
13570
- technologyName: string;
13571
14384
  price: number;
13572
14385
  pricingMeasure: PricingMeasure;
13573
14386
  clinicName: string;
@@ -13620,14 +14433,14 @@ declare const clinicSchema: z.ZodObject<{
13620
14433
  proceduresInfo: {
13621
14434
  id: string;
13622
14435
  name: string;
14436
+ technologyName: string;
13623
14437
  duration: number;
13624
- family: ProcedureFamily;
13625
14438
  practitionerId: string;
13626
14439
  clinicId: string;
14440
+ family: ProcedureFamily;
13627
14441
  currency: Currency;
13628
14442
  categoryName: string;
13629
14443
  subcategoryName: string;
13630
- technologyName: string;
13631
14444
  price: number;
13632
14445
  pricingMeasure: PricingMeasure;
13633
14446
  clinicName: string;
@@ -13714,14 +14527,6 @@ declare const clinicSchema: z.ZodObject<{
13714
14527
  coverPhoto: string | null;
13715
14528
  admins: string[];
13716
14529
  featuredPhotos: string[];
13717
- doctorsInfo: {
13718
- id: string;
13719
- name: string;
13720
- photo: string;
13721
- rating: number;
13722
- services: string[];
13723
- description?: string | null | undefined;
13724
- }[];
13725
14530
  reviewInfo: {
13726
14531
  cleanliness: number;
13727
14532
  facilities: number;
@@ -13732,6 +14537,14 @@ declare const clinicSchema: z.ZodObject<{
13732
14537
  averageRating: number;
13733
14538
  recommendationPercentage: number;
13734
14539
  };
14540
+ doctorsInfo: {
14541
+ id: string;
14542
+ name: string;
14543
+ rating: number;
14544
+ photo: string;
14545
+ services: string[];
14546
+ description?: string | null | undefined;
14547
+ }[];
13735
14548
  description?: string | null | undefined;
13736
14549
  logo?: string | undefined;
13737
14550
  photosWithTags?: {
@@ -13749,14 +14562,14 @@ declare const clinicSchema: z.ZodObject<{
13749
14562
  proceduresInfo: {
13750
14563
  id: string;
13751
14564
  name: string;
14565
+ technologyName: string;
13752
14566
  duration: number;
13753
- family: ProcedureFamily;
13754
14567
  practitionerId: string;
13755
14568
  clinicId: string;
14569
+ family: ProcedureFamily;
13756
14570
  currency: Currency;
13757
14571
  categoryName: string;
13758
14572
  subcategoryName: string;
13759
- technologyName: string;
13760
14573
  price: number;
13761
14574
  pricingMeasure: PricingMeasure;
13762
14575
  clinicName: string;
@@ -13843,14 +14656,6 @@ declare const clinicSchema: z.ZodObject<{
13843
14656
  coverPhoto: string | null;
13844
14657
  admins: string[];
13845
14658
  featuredPhotos: string[];
13846
- doctorsInfo: {
13847
- id: string;
13848
- name: string;
13849
- photo: string;
13850
- rating: number;
13851
- services: string[];
13852
- description?: string | null | undefined;
13853
- }[];
13854
14659
  reviewInfo: {
13855
14660
  cleanliness: number;
13856
14661
  facilities: number;
@@ -13861,6 +14666,14 @@ declare const clinicSchema: z.ZodObject<{
13861
14666
  averageRating: number;
13862
14667
  recommendationPercentage: number;
13863
14668
  };
14669
+ doctorsInfo: {
14670
+ id: string;
14671
+ name: string;
14672
+ rating: number;
14673
+ photo: string;
14674
+ services: string[];
14675
+ description?: string | null | undefined;
14676
+ }[];
13864
14677
  description?: string | null | undefined;
13865
14678
  logo?: string | undefined;
13866
14679
  photosWithTags?: {
@@ -16375,7 +17188,7 @@ declare const createCalendarEventSchema: z.ZodObject<{
16375
17188
  licenseNumber: string;
16376
17189
  issuingAuthority: string;
16377
17190
  issueDate: Date | Timestamp;
16378
- verificationStatus: "pending" | "verified" | "rejected";
17191
+ verificationStatus: "pending" | "rejected" | "verified";
16379
17192
  expiryDate?: Date | Timestamp | undefined;
16380
17193
  }, {
16381
17194
  level: CertificationLevel;
@@ -16383,7 +17196,7 @@ declare const createCalendarEventSchema: z.ZodObject<{
16383
17196
  licenseNumber: string;
16384
17197
  issuingAuthority: string;
16385
17198
  issueDate: Date | Timestamp;
16386
- verificationStatus: "pending" | "verified" | "rejected";
17199
+ verificationStatus: "pending" | "rejected" | "verified";
16387
17200
  expiryDate?: Date | Timestamp | undefined;
16388
17201
  }>;
16389
17202
  }, "strip", z.ZodTypeAny, {
@@ -16395,7 +17208,7 @@ declare const createCalendarEventSchema: z.ZodObject<{
16395
17208
  licenseNumber: string;
16396
17209
  issuingAuthority: string;
16397
17210
  issueDate: Date | Timestamp;
16398
- verificationStatus: "pending" | "verified" | "rejected";
17211
+ verificationStatus: "pending" | "rejected" | "verified";
16399
17212
  expiryDate?: Date | Timestamp | undefined;
16400
17213
  };
16401
17214
  email: string;
@@ -16410,7 +17223,7 @@ declare const createCalendarEventSchema: z.ZodObject<{
16410
17223
  licenseNumber: string;
16411
17224
  issuingAuthority: string;
16412
17225
  issueDate: Date | Timestamp;
16413
- verificationStatus: "pending" | "verified" | "rejected";
17226
+ verificationStatus: "pending" | "rejected" | "verified";
16414
17227
  expiryDate?: Date | Timestamp | undefined;
16415
17228
  };
16416
17229
  email: string;
@@ -16522,9 +17335,9 @@ declare const createCalendarEventSchema: z.ZodObject<{
16522
17335
  createdAt?: any;
16523
17336
  updatedAt?: any;
16524
17337
  description?: string | undefined;
16525
- clinicBranchId?: string | null | undefined;
16526
17338
  procedureId?: string | null | undefined;
16527
17339
  appointmentId?: string | null | undefined;
17340
+ clinicBranchId?: string | null | undefined;
16528
17341
  eventLocation?: {
16529
17342
  latitude: number;
16530
17343
  longitude: number;
@@ -16545,7 +17358,7 @@ declare const createCalendarEventSchema: z.ZodObject<{
16545
17358
  licenseNumber: string;
16546
17359
  issuingAuthority: string;
16547
17360
  issueDate: Date | Timestamp;
16548
- verificationStatus: "pending" | "verified" | "rejected";
17361
+ verificationStatus: "pending" | "rejected" | "verified";
16549
17362
  expiryDate?: Date | Timestamp | undefined;
16550
17363
  };
16551
17364
  email: string;
@@ -16579,9 +17392,9 @@ declare const createCalendarEventSchema: z.ZodObject<{
16579
17392
  createdAt?: any;
16580
17393
  updatedAt?: any;
16581
17394
  description?: string | undefined;
16582
- clinicBranchId?: string | null | undefined;
16583
17395
  procedureId?: string | null | undefined;
16584
17396
  appointmentId?: string | null | undefined;
17397
+ clinicBranchId?: string | null | undefined;
16585
17398
  eventLocation?: {
16586
17399
  latitude: number;
16587
17400
  longitude: number;
@@ -16602,7 +17415,7 @@ declare const createCalendarEventSchema: z.ZodObject<{
16602
17415
  licenseNumber: string;
16603
17416
  issuingAuthority: string;
16604
17417
  issueDate: Date | Timestamp;
16605
- verificationStatus: "pending" | "verified" | "rejected";
17418
+ verificationStatus: "pending" | "rejected" | "verified";
16606
17419
  expiryDate?: Date | Timestamp | undefined;
16607
17420
  };
16608
17421
  email: string;
@@ -16733,7 +17546,7 @@ declare const calendarEventSchema: z.ZodObject<{
16733
17546
  licenseNumber: string;
16734
17547
  issuingAuthority: string;
16735
17548
  issueDate: Date | Timestamp;
16736
- verificationStatus: "pending" | "verified" | "rejected";
17549
+ verificationStatus: "pending" | "rejected" | "verified";
16737
17550
  expiryDate?: Date | Timestamp | undefined;
16738
17551
  }, {
16739
17552
  level: CertificationLevel;
@@ -16741,7 +17554,7 @@ declare const calendarEventSchema: z.ZodObject<{
16741
17554
  licenseNumber: string;
16742
17555
  issuingAuthority: string;
16743
17556
  issueDate: Date | Timestamp;
16744
- verificationStatus: "pending" | "verified" | "rejected";
17557
+ verificationStatus: "pending" | "rejected" | "verified";
16745
17558
  expiryDate?: Date | Timestamp | undefined;
16746
17559
  }>;
16747
17560
  }, "strip", z.ZodTypeAny, {
@@ -16753,7 +17566,7 @@ declare const calendarEventSchema: z.ZodObject<{
16753
17566
  licenseNumber: string;
16754
17567
  issuingAuthority: string;
16755
17568
  issueDate: Date | Timestamp;
16756
- verificationStatus: "pending" | "verified" | "rejected";
17569
+ verificationStatus: "pending" | "rejected" | "verified";
16757
17570
  expiryDate?: Date | Timestamp | undefined;
16758
17571
  };
16759
17572
  email: string;
@@ -16768,7 +17581,7 @@ declare const calendarEventSchema: z.ZodObject<{
16768
17581
  licenseNumber: string;
16769
17582
  issuingAuthority: string;
16770
17583
  issueDate: Date | Timestamp;
16771
- verificationStatus: "pending" | "verified" | "rejected";
17584
+ verificationStatus: "pending" | "rejected" | "verified";
16772
17585
  expiryDate?: Date | Timestamp | undefined;
16773
17586
  };
16774
17587
  email: string;
@@ -16918,9 +17731,9 @@ declare const calendarEventSchema: z.ZodObject<{
16918
17731
  syncStatus: CalendarSyncStatus;
16919
17732
  eventType: CalendarEventType;
16920
17733
  description?: string | undefined;
16921
- clinicBranchId?: string | null | undefined;
16922
17734
  procedureId?: string | null | undefined;
16923
17735
  appointmentId?: string | null | undefined;
17736
+ clinicBranchId?: string | null | undefined;
16924
17737
  eventLocation?: {
16925
17738
  latitude: number;
16926
17739
  longitude: number;
@@ -16941,7 +17754,7 @@ declare const calendarEventSchema: z.ZodObject<{
16941
17754
  licenseNumber: string;
16942
17755
  issuingAuthority: string;
16943
17756
  issueDate: Date | Timestamp;
16944
- verificationStatus: "pending" | "verified" | "rejected";
17757
+ verificationStatus: "pending" | "rejected" | "verified";
16945
17758
  expiryDate?: Date | Timestamp | undefined;
16946
17759
  };
16947
17760
  email: string;
@@ -16989,9 +17802,9 @@ declare const calendarEventSchema: z.ZodObject<{
16989
17802
  syncStatus: CalendarSyncStatus;
16990
17803
  eventType: CalendarEventType;
16991
17804
  description?: string | undefined;
16992
- clinicBranchId?: string | null | undefined;
16993
17805
  procedureId?: string | null | undefined;
16994
17806
  appointmentId?: string | null | undefined;
17807
+ clinicBranchId?: string | null | undefined;
16995
17808
  eventLocation?: {
16996
17809
  latitude: number;
16997
17810
  longitude: number;
@@ -17012,7 +17825,7 @@ declare const calendarEventSchema: z.ZodObject<{
17012
17825
  licenseNumber: string;
17013
17826
  issuingAuthority: string;
17014
17827
  issueDate: Date | Timestamp;
17015
- verificationStatus: "pending" | "verified" | "rejected";
17828
+ verificationStatus: "pending" | "rejected" | "verified";
17016
17829
  expiryDate?: Date | Timestamp | undefined;
17017
17830
  };
17018
17831
  email: string;
@@ -17072,7 +17885,7 @@ declare const practitionerProfileInfoSchema: z.ZodObject<{
17072
17885
  licenseNumber: string;
17073
17886
  issuingAuthority: string;
17074
17887
  issueDate: Date | Timestamp;
17075
- verificationStatus: "pending" | "verified" | "rejected";
17888
+ verificationStatus: "pending" | "rejected" | "verified";
17076
17889
  expiryDate?: Date | Timestamp | undefined;
17077
17890
  }, {
17078
17891
  level: CertificationLevel;
@@ -17080,7 +17893,7 @@ declare const practitionerProfileInfoSchema: z.ZodObject<{
17080
17893
  licenseNumber: string;
17081
17894
  issuingAuthority: string;
17082
17895
  issueDate: Date | Timestamp;
17083
- verificationStatus: "pending" | "verified" | "rejected";
17896
+ verificationStatus: "pending" | "rejected" | "verified";
17084
17897
  expiryDate?: Date | Timestamp | undefined;
17085
17898
  }>;
17086
17899
  }, "strip", z.ZodTypeAny, {
@@ -17092,7 +17905,7 @@ declare const practitionerProfileInfoSchema: z.ZodObject<{
17092
17905
  licenseNumber: string;
17093
17906
  issuingAuthority: string;
17094
17907
  issueDate: Date | Timestamp;
17095
- verificationStatus: "pending" | "verified" | "rejected";
17908
+ verificationStatus: "pending" | "rejected" | "verified";
17096
17909
  expiryDate?: Date | Timestamp | undefined;
17097
17910
  };
17098
17911
  email: string;
@@ -17107,7 +17920,7 @@ declare const practitionerProfileInfoSchema: z.ZodObject<{
17107
17920
  licenseNumber: string;
17108
17921
  issuingAuthority: string;
17109
17922
  issueDate: Date | Timestamp;
17110
- verificationStatus: "pending" | "verified" | "rejected";
17923
+ verificationStatus: "pending" | "rejected" | "verified";
17111
17924
  expiryDate?: Date | Timestamp | undefined;
17112
17925
  };
17113
17926
  email: string;
@@ -17206,8 +18019,8 @@ declare const clinicReviewSchema: z.ZodObject<z.objectUtil.extendShape<{
17206
18019
  isVerified: boolean;
17207
18020
  patientId: string;
17208
18021
  clinicId: string;
17209
- fullReviewId: string;
17210
18022
  comment: string;
18023
+ fullReviewId: string;
17211
18024
  isPublished: boolean;
17212
18025
  cleanliness: number;
17213
18026
  facilities: number;
@@ -17223,8 +18036,8 @@ declare const clinicReviewSchema: z.ZodObject<z.objectUtil.extendShape<{
17223
18036
  isVerified: boolean;
17224
18037
  patientId: string;
17225
18038
  clinicId: string;
17226
- fullReviewId: string;
17227
18039
  comment: string;
18040
+ fullReviewId: string;
17228
18041
  isPublished: boolean;
17229
18042
  cleanliness: number;
17230
18043
  facilities: number;
@@ -17303,8 +18116,8 @@ declare const practitionerReviewSchema: z.ZodObject<z.objectUtil.extendShape<{
17303
18116
  isVerified: boolean;
17304
18117
  patientId: string;
17305
18118
  practitionerId: string;
17306
- fullReviewId: string;
17307
18119
  comment: string;
18120
+ fullReviewId: string;
17308
18121
  isPublished: boolean;
17309
18122
  overallRating: number;
17310
18123
  wouldRecommend: boolean;
@@ -17320,8 +18133,8 @@ declare const practitionerReviewSchema: z.ZodObject<z.objectUtil.extendShape<{
17320
18133
  isVerified: boolean;
17321
18134
  patientId: string;
17322
18135
  practitionerId: string;
17323
- fullReviewId: string;
17324
18136
  comment: string;
18137
+ fullReviewId: string;
17325
18138
  isPublished: boolean;
17326
18139
  overallRating: number;
17327
18140
  wouldRecommend: boolean;
@@ -17400,8 +18213,8 @@ declare const procedureReviewSchema: z.ZodObject<z.objectUtil.extendShape<{
17400
18213
  isVerified: boolean;
17401
18214
  patientId: string;
17402
18215
  procedureId: string;
17403
- fullReviewId: string;
17404
18216
  comment: string;
18217
+ fullReviewId: string;
17405
18218
  isPublished: boolean;
17406
18219
  overallRating: number;
17407
18220
  wouldRecommend: boolean;
@@ -17417,8 +18230,8 @@ declare const procedureReviewSchema: z.ZodObject<z.objectUtil.extendShape<{
17417
18230
  isVerified: boolean;
17418
18231
  patientId: string;
17419
18232
  procedureId: string;
17420
- fullReviewId: string;
17421
18233
  comment: string;
18234
+ fullReviewId: string;
17422
18235
  isPublished: boolean;
17423
18236
  overallRating: number;
17424
18237
  wouldRecommend: boolean;
@@ -17596,8 +18409,8 @@ declare const reviewSchema: z.ZodObject<{
17596
18409
  isVerified: boolean;
17597
18410
  patientId: string;
17598
18411
  clinicId: string;
17599
- fullReviewId: string;
17600
18412
  comment: string;
18413
+ fullReviewId: string;
17601
18414
  isPublished: boolean;
17602
18415
  cleanliness: number;
17603
18416
  facilities: number;
@@ -17613,8 +18426,8 @@ declare const reviewSchema: z.ZodObject<{
17613
18426
  isVerified: boolean;
17614
18427
  patientId: string;
17615
18428
  clinicId: string;
17616
- fullReviewId: string;
17617
18429
  comment: string;
18430
+ fullReviewId: string;
17618
18431
  isPublished: boolean;
17619
18432
  cleanliness: number;
17620
18433
  facilities: number;
@@ -17649,8 +18462,8 @@ declare const reviewSchema: z.ZodObject<{
17649
18462
  isVerified: boolean;
17650
18463
  patientId: string;
17651
18464
  practitionerId: string;
17652
- fullReviewId: string;
17653
18465
  comment: string;
18466
+ fullReviewId: string;
17654
18467
  isPublished: boolean;
17655
18468
  overallRating: number;
17656
18469
  wouldRecommend: boolean;
@@ -17666,8 +18479,8 @@ declare const reviewSchema: z.ZodObject<{
17666
18479
  isVerified: boolean;
17667
18480
  patientId: string;
17668
18481
  practitionerId: string;
17669
- fullReviewId: string;
17670
18482
  comment: string;
18483
+ fullReviewId: string;
17671
18484
  isPublished: boolean;
17672
18485
  overallRating: number;
17673
18486
  wouldRecommend: boolean;
@@ -17702,8 +18515,8 @@ declare const reviewSchema: z.ZodObject<{
17702
18515
  isVerified: boolean;
17703
18516
  patientId: string;
17704
18517
  procedureId: string;
17705
- fullReviewId: string;
17706
18518
  comment: string;
18519
+ fullReviewId: string;
17707
18520
  isPublished: boolean;
17708
18521
  overallRating: number;
17709
18522
  wouldRecommend: boolean;
@@ -17719,8 +18532,8 @@ declare const reviewSchema: z.ZodObject<{
17719
18532
  isVerified: boolean;
17720
18533
  patientId: string;
17721
18534
  procedureId: string;
17722
- fullReviewId: string;
17723
18535
  comment: string;
18536
+ fullReviewId: string;
17724
18537
  isPublished: boolean;
17725
18538
  overallRating: number;
17726
18539
  wouldRecommend: boolean;
@@ -17737,8 +18550,8 @@ declare const reviewSchema: z.ZodObject<{
17737
18550
  createdAt: Date;
17738
18551
  updatedAt: Date;
17739
18552
  patientId: string;
17740
- overallRating: number;
17741
18553
  appointmentId: string;
18554
+ overallRating: number;
17742
18555
  overallComment: string;
17743
18556
  clinicReview?: {
17744
18557
  id: string;
@@ -17747,8 +18560,8 @@ declare const reviewSchema: z.ZodObject<{
17747
18560
  isVerified: boolean;
17748
18561
  patientId: string;
17749
18562
  clinicId: string;
17750
- fullReviewId: string;
17751
18563
  comment: string;
18564
+ fullReviewId: string;
17752
18565
  isPublished: boolean;
17753
18566
  cleanliness: number;
17754
18567
  facilities: number;
@@ -17765,8 +18578,8 @@ declare const reviewSchema: z.ZodObject<{
17765
18578
  isVerified: boolean;
17766
18579
  patientId: string;
17767
18580
  practitionerId: string;
17768
- fullReviewId: string;
17769
18581
  comment: string;
18582
+ fullReviewId: string;
17770
18583
  isPublished: boolean;
17771
18584
  overallRating: number;
17772
18585
  wouldRecommend: boolean;
@@ -17783,8 +18596,8 @@ declare const reviewSchema: z.ZodObject<{
17783
18596
  isVerified: boolean;
17784
18597
  patientId: string;
17785
18598
  procedureId: string;
17786
- fullReviewId: string;
17787
18599
  comment: string;
18600
+ fullReviewId: string;
17788
18601
  isPublished: boolean;
17789
18602
  overallRating: number;
17790
18603
  wouldRecommend: boolean;
@@ -17799,8 +18612,8 @@ declare const reviewSchema: z.ZodObject<{
17799
18612
  createdAt: Date;
17800
18613
  updatedAt: Date;
17801
18614
  patientId: string;
17802
- overallRating: number;
17803
18615
  appointmentId: string;
18616
+ overallRating: number;
17804
18617
  overallComment: string;
17805
18618
  clinicReview?: {
17806
18619
  id: string;
@@ -17809,8 +18622,8 @@ declare const reviewSchema: z.ZodObject<{
17809
18622
  isVerified: boolean;
17810
18623
  patientId: string;
17811
18624
  clinicId: string;
17812
- fullReviewId: string;
17813
18625
  comment: string;
18626
+ fullReviewId: string;
17814
18627
  isPublished: boolean;
17815
18628
  cleanliness: number;
17816
18629
  facilities: number;
@@ -17827,8 +18640,8 @@ declare const reviewSchema: z.ZodObject<{
17827
18640
  isVerified: boolean;
17828
18641
  patientId: string;
17829
18642
  practitionerId: string;
17830
- fullReviewId: string;
17831
18643
  comment: string;
18644
+ fullReviewId: string;
17832
18645
  isPublished: boolean;
17833
18646
  overallRating: number;
17834
18647
  wouldRecommend: boolean;
@@ -17845,8 +18658,8 @@ declare const reviewSchema: z.ZodObject<{
17845
18658
  isVerified: boolean;
17846
18659
  patientId: string;
17847
18660
  procedureId: string;
17848
- fullReviewId: string;
17849
18661
  comment: string;
18662
+ fullReviewId: string;
17850
18663
  isPublished: boolean;
17851
18664
  overallRating: number;
17852
18665
  wouldRecommend: boolean;
@@ -18147,4 +18960,4 @@ declare const createReviewSchema: z.ZodEffects<z.ZodObject<{
18147
18960
  } | undefined;
18148
18961
  }>;
18149
18962
 
18150
- export { APPOINTMENTS_COLLECTION, AUTH_ERRORS, 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 AppointmentNotification, type AppointmentReminderNotification, AppointmentService, AppointmentStatus, AuthError, AuthService, type BaseNotification, BlockingCondition, type Brand, BrandService, CALENDAR_COLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, 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, type ContactPerson, Contraindication, CosmeticAllergySubtype, type CreateAdminTokenData, type CreateAppointmentData, type CreateAppointmentParams, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePractitionerData, type CreatePractitionerTokenData, type CreateProcedureData, type CreateSyncedCalendarData, type CreateUserData, Currency, DOCUMENTATION_TEMPLATES_COLLECTION, type DateRange, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, FILLED_DOCUMENTS_COLLECTION, type FilledDocument, FilledDocumentService, FilledDocumentStatus, FirebaseErrorCode, type FirebaseUser, FoodAllergySubtype, type GamificationInfo, Gender, HeadingLevel, Language, ListType, type LocationData, MedicationAllergySubtype, type Notification, NotificationService, NotificationStatus, NotificationType, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_SENSITIVE_INFO_COLLECTION, PRACTITIONERS_COLLECTION, PROCEDURES_COLLECTION, type PatientClinic, type PatientDoctor, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileInfo, type PatientSensitiveInfo, PatientService, PaymentStatus, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerClinicWorkingHours, type PractitionerProfileInfo, type PractitionerReview, type PractitionerReviewInfo, PractitionerService, PractitionerStatus, type PractitionerToken, PractitionerTokenStatus, type PractitionerWorkingHours, type PreRequirementNotification, PricingMeasure, type Procedure, type ProcedureCategorization, ProcedureFamily, type ProcedureInfo, type ProcedureReview, type ProcedureReviewInfo, ProcedureService, type Product, ProductService, REGISTER_TOKENS_COLLECTION, REVIEWS_COLLECTION, type RequesterInfo, type Requirement, RequirementType, type Review, ReviewService, SYNCED_CALENDARS_COLLECTION, type SearchAppointmentsParams, type SearchCalendarEventsParams, SearchLocationEnum, type SearchPatientsParams, type Subcategory, SubcategoryService, SubscriptionModel, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, type Technology, TechnologyService, type TimeSlot, TimeUnit, TreatmentBenefit, USER_ERRORS, type UpdateAllergyData, type UpdateAppointmentData, type UpdateAppointmentParams, type UpdateBlockingConditionData, 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 UpdateProcedureData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type ValidationSchema, type VitalStats, type WorkingHours, addAllergySchema, addBlockingConditionSchema, addContraindicationSchema, addMedicationSchema, addressDataSchema, adminInfoSchema, adminTokenSchema, allergySchema, allergySubtypeSchema, appointmentNotificationSchema, appointmentReminderNotificationSchema, baseNotificationSchema, blockingConditionSchema, calendarEventSchema, calendarEventTimeSchema, clinicAdminOptionsSchema, clinicAdminSchema, clinicAdminSignupSchema, clinicBranchSetupSchema, clinicContactInfoSchema, clinicGroupSchema, clinicGroupSetupSchema, clinicLocationSchema, clinicReviewInfoSchema, clinicReviewSchema, clinicSchema, clinicTagsSchema, contactPersonSchema, contraindicationSchema, createAdminTokenSchema, createAppointmentSchema, createCalendarEventSchema, createClinicAdminSchema, createClinicGroupSchema, createClinicReviewSchema, createClinicSchema, createDefaultClinicGroupSchema, createDocumentTemplateSchema, createDraftPractitionerSchema, createPatientLocationInfoSchema, createPatientMedicalInfoSchema, createPatientProfileSchema, createPatientSensitiveInfoSchema, createPractitionerReviewSchema, createPractitionerSchema, createPractitionerTokenSchema, createProcedureReviewSchema, createReviewSchema, createUserOptionsSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, emailSchema, emergencyContactSchema, gamificationSchema, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseInstance, initializeFirebase, locationDataSchema, medicationSchema, notificationSchema, passwordSchema, patientClinicSchema, patientDoctorSchema, patientLocationInfoSchema, patientMedicalInfoSchema, patientProfileInfoSchema, patientProfileSchema, patientSensitiveInfoSchema, postRequirementNotificationSchema, practitionerBasicInfoSchema, practitionerCertificationSchema, practitionerClinicWorkingHoursSchema, practitionerProfileInfoSchema, practitionerReviewInfoSchema, practitionerReviewSchema, practitionerSchema, practitionerSignupSchema, practitionerTokenSchema, practitionerWorkingHoursSchema, preRequirementNotificationSchema, procedureCategorizationSchema, procedureInfoSchema, procedureReviewInfoSchema, procedureReviewSchema, requesterInfoSchema, reviewSchema, searchAppointmentsSchema, searchPatientsSchema, syncedCalendarEventSchema, timeSlotSchema, timestampSchema, updateAllergySchema, updateAppointmentSchema, updateBlockingConditionSchema, updateCalendarEventSchema, updateClinicAdminSchema, updateClinicGroupSchema, updateClinicSchema, updateContraindicationSchema, updateDocumentTemplateSchema, updateMedicationSchema, updatePatientMedicalInfoSchema, updateVitalStatsSchema, userRoleSchema, userRolesSchema, userSchema, vitalStatsSchema, workingHoursSchema };
18963
+ export { APPOINTMENTS_COLLECTION, AUTH_ERRORS, 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 AppointmentReminderNotification, AppointmentService, AppointmentStatus, AuthError, AuthService, type BaseNotification, BlockingCondition, type Brand, BrandService, CALENDAR_COLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, 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, type ContactPerson, Contraindication, CosmeticAllergySubtype, type CreateAdminTokenData, type CreateAppointmentData, type CreateAppointmentParams, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePractitionerData, type CreatePractitionerTokenData, type CreateProcedureData, type CreateSyncedCalendarData, type CreateUserData, Currency, DOCUMENTATION_TEMPLATES_COLLECTION, type DateRange, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, FILLED_DOCUMENTS_COLLECTION, type FilledDocument, FilledDocumentService, FilledDocumentStatus, FirebaseErrorCode, type FirebaseUser, FoodAllergySubtype, type GamificationInfo, Gender, HeadingLevel, Language, ListType, type LocationData, MedicationAllergySubtype, 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, PROCEDURES_COLLECTION, type PatientClinic, type PatientDoctor, PatientInstructionStatus, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileInfo, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, PatientRequirementsService, type PatientSensitiveInfo, PatientService, PaymentStatus, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerClinicWorkingHours, type PractitionerProfileInfo, type PractitionerReview, type PractitionerReviewInfo, PractitionerService, PractitionerStatus, type PractitionerToken, PractitionerTokenStatus, type PractitionerWorkingHours, type PreRequirementNotification, PricingMeasure, type Procedure, type ProcedureCategorization, ProcedureFamily, type ProcedureInfo, type ProcedureReview, type ProcedureReviewInfo, ProcedureService, type Product, ProductService, REGISTER_TOKENS_COLLECTION, REVIEWS_COLLECTION, type RequesterInfo, type Requirement, RequirementType, type Review, ReviewService, SYNCED_CALENDARS_COLLECTION, type SearchAppointmentsParams, type SearchCalendarEventsParams, SearchLocationEnum, type SearchPatientsParams, type Subcategory, SubcategoryService, SubscriptionModel, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, type Technology, TechnologyService, type TimeSlot, TimeUnit, TreatmentBenefit, USER_ERRORS, type UpdateAllergyData, type UpdateAppointmentData, type UpdateAppointmentParams, type UpdateBlockingConditionData, 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 UpdateProcedureData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type ValidationSchema, type VitalStats, type WorkingHours, addAllergySchema, addBlockingConditionSchema, addContraindicationSchema, addMedicationSchema, addressDataSchema, adminInfoSchema, adminTokenSchema, allergySchema, allergySubtypeSchema, appointmentNotificationSchema, appointmentReminderNotificationSchema, baseNotificationSchema, blockingConditionSchema, calendarEventSchema, calendarEventTimeSchema, clinicAdminOptionsSchema, clinicAdminSchema, clinicAdminSignupSchema, clinicBranchSetupSchema, clinicContactInfoSchema, clinicGroupSchema, clinicGroupSetupSchema, clinicLocationSchema, clinicReviewInfoSchema, clinicReviewSchema, clinicSchema, clinicTagsSchema, contactPersonSchema, contraindicationSchema, createAdminTokenSchema, createAppointmentSchema, createCalendarEventSchema, createClinicAdminSchema, createClinicGroupSchema, createClinicReviewSchema, createClinicSchema, createDefaultClinicGroupSchema, createDocumentTemplateSchema, createDraftPractitionerSchema, createFilledDocumentDataSchema, createPatientLocationInfoSchema, createPatientMedicalInfoSchema, createPatientProfileSchema, createPatientSensitiveInfoSchema, createPractitionerReviewSchema, createPractitionerSchema, createPractitionerTokenSchema, createProcedureReviewSchema, createReviewSchema, createUserOptionsSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, emailSchema, emergencyContactSchema, filledDocumentSchema, filledDocumentStatusSchema, gamificationSchema, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseInstance, initializeFirebase, locationDataSchema, medicationSchema, notificationSchema, passwordSchema, patientClinicSchema, patientDoctorSchema, patientLocationInfoSchema, patientMedicalInfoSchema, patientProfileInfoSchema, patientProfileSchema, patientSensitiveInfoSchema, postRequirementNotificationSchema, practitionerBasicInfoSchema, practitionerCertificationSchema, practitionerClinicWorkingHoursSchema, practitionerProfileInfoSchema, practitionerReviewInfoSchema, practitionerReviewSchema, practitionerSchema, practitionerSignupSchema, practitionerTokenSchema, practitionerWorkingHoursSchema, preRequirementNotificationSchema, procedureCategorizationSchema, procedureInfoSchema, procedureReviewInfoSchema, procedureReviewSchema, requesterInfoSchema, reviewSchema, searchAppointmentsSchema, searchPatientsSchema, syncedCalendarEventSchema, timeSlotSchema, timestampSchema, updateAllergySchema, updateAppointmentSchema, updateBlockingConditionSchema, updateCalendarEventSchema, updateClinicAdminSchema, updateClinicGroupSchema, updateClinicSchema, updateContraindicationSchema, updateDocumentTemplateSchema, updateFilledDocumentDataSchema, updateMedicationSchema, updatePatientMedicalInfoSchema, updateVitalStatsSchema, userRoleSchema, userRolesSchema, userSchema, vitalStatsSchema, workingHoursSchema };