@blackcode_sa/metaestetics-api 1.6.7 → 1.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -4547,6 +4547,16 @@ interface CreateAppointmentData {
4547
4547
  initialStatus: AppointmentStatus;
4548
4548
  initialPaymentStatus?: PaymentStatus;
4549
4549
  }
4550
+ /**
4551
+ * Data needed to create a new Appointment via CreateAppointmentHttp method
4552
+ */
4553
+ interface CreateAppointmentHttpData {
4554
+ patientId: string;
4555
+ procedureId: string;
4556
+ appointmentStartTime: Timestamp;
4557
+ appointmentEndTime: Timestamp;
4558
+ patientNotes?: string | null;
4559
+ }
4550
4560
  /**
4551
4561
  * Data allowed for updating an Appointment
4552
4562
  */
@@ -7221,7 +7231,7 @@ declare class AppointmentService extends BaseService {
7221
7231
  * @param data - CreateAppointmentData object
7222
7232
  * @returns The created appointment
7223
7233
  */
7224
- createAppointmentHttp(data: CreateAppointmentData): Promise<Appointment>;
7234
+ createAppointmentHttp(data: CreateAppointmentHttpData): Promise<Appointment>;
7225
7235
  /**
7226
7236
  * Gets an appointment by ID.
7227
7237
  *
@@ -7713,7 +7723,7 @@ declare const preRequirementNotificationSchema: z.ZodObject<z.objectUtil.extendS
7713
7723
  isRead: z.ZodBoolean;
7714
7724
  userRole: z.ZodNativeEnum<typeof UserRole>;
7715
7725
  }, {
7716
- notificationType: z.ZodLiteral<NotificationType.REQUIREMENT_INSTRUCTION_DUE>;
7726
+ notificationType: z.ZodLiteral<NotificationType.PRE_REQUIREMENT_INSTRUCTION_DUE>;
7717
7727
  treatmentId: z.ZodString;
7718
7728
  requirements: z.ZodArray<z.ZodString, "many">;
7719
7729
  deadline: z.ZodAny;
@@ -7721,7 +7731,7 @@ declare const preRequirementNotificationSchema: z.ZodObject<z.objectUtil.extendS
7721
7731
  status: NotificationStatus;
7722
7732
  title: string;
7723
7733
  requirements: string[];
7724
- notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
7734
+ notificationType: NotificationType.PRE_REQUIREMENT_INSTRUCTION_DUE;
7725
7735
  treatmentId: string;
7726
7736
  userId: string;
7727
7737
  notificationTokens: string[];
@@ -7737,7 +7747,7 @@ declare const preRequirementNotificationSchema: z.ZodObject<z.objectUtil.extendS
7737
7747
  status: NotificationStatus;
7738
7748
  title: string;
7739
7749
  requirements: string[];
7740
- notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
7750
+ notificationType: NotificationType.PRE_REQUIREMENT_INSTRUCTION_DUE;
7741
7751
  treatmentId: string;
7742
7752
  userId: string;
7743
7753
  notificationTokens: string[];
@@ -7767,7 +7777,7 @@ declare const postRequirementNotificationSchema: z.ZodObject<z.objectUtil.extend
7767
7777
  isRead: z.ZodBoolean;
7768
7778
  userRole: z.ZodNativeEnum<typeof UserRole>;
7769
7779
  }, {
7770
- notificationType: z.ZodLiteral<NotificationType.REQUIREMENT_INSTRUCTION_DUE>;
7780
+ notificationType: z.ZodLiteral<NotificationType.POST_REQUIREMENT_INSTRUCTION_DUE>;
7771
7781
  treatmentId: z.ZodString;
7772
7782
  requirements: z.ZodArray<z.ZodString, "many">;
7773
7783
  deadline: z.ZodAny;
@@ -7775,7 +7785,7 @@ declare const postRequirementNotificationSchema: z.ZodObject<z.objectUtil.extend
7775
7785
  status: NotificationStatus;
7776
7786
  title: string;
7777
7787
  requirements: string[];
7778
- notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
7788
+ notificationType: NotificationType.POST_REQUIREMENT_INSTRUCTION_DUE;
7779
7789
  treatmentId: string;
7780
7790
  userId: string;
7781
7791
  notificationTokens: string[];
@@ -7791,7 +7801,7 @@ declare const postRequirementNotificationSchema: z.ZodObject<z.objectUtil.extend
7791
7801
  status: NotificationStatus;
7792
7802
  title: string;
7793
7803
  requirements: string[];
7794
- notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
7804
+ notificationType: NotificationType.POST_REQUIREMENT_INSTRUCTION_DUE;
7795
7805
  treatmentId: string;
7796
7806
  userId: string;
7797
7807
  notificationTokens: string[];
@@ -7804,6 +7814,64 @@ declare const postRequirementNotificationSchema: z.ZodObject<z.objectUtil.extend
7804
7814
  deadline?: any;
7805
7815
  notificationTime?: any;
7806
7816
  }>;
7817
+ /**
7818
+ * Validaciona šema za requirement instruction notification
7819
+ * Ovo je nova schema koja se odnosi na RequirementInstructionDueNotification
7820
+ */
7821
+ declare const requirementInstructionDueNotificationSchema: z.ZodObject<z.objectUtil.extendShape<{
7822
+ id: z.ZodOptional<z.ZodString>;
7823
+ userId: z.ZodString;
7824
+ notificationTime: z.ZodAny;
7825
+ notificationType: z.ZodNativeEnum<typeof NotificationType>;
7826
+ notificationTokens: z.ZodArray<z.ZodString, "many">;
7827
+ status: z.ZodNativeEnum<typeof NotificationStatus>;
7828
+ createdAt: z.ZodOptional<z.ZodAny>;
7829
+ updatedAt: z.ZodOptional<z.ZodAny>;
7830
+ title: z.ZodString;
7831
+ body: z.ZodString;
7832
+ isRead: z.ZodBoolean;
7833
+ userRole: z.ZodNativeEnum<typeof UserRole>;
7834
+ }, {
7835
+ notificationType: z.ZodLiteral<NotificationType.REQUIREMENT_INSTRUCTION_DUE>;
7836
+ appointmentId: z.ZodString;
7837
+ patientRequirementInstanceId: z.ZodString;
7838
+ instructionId: z.ZodString;
7839
+ originalRequirementId: z.ZodOptional<z.ZodString>;
7840
+ }>, "strip", z.ZodTypeAny, {
7841
+ status: NotificationStatus;
7842
+ title: string;
7843
+ appointmentId: string;
7844
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
7845
+ userId: string;
7846
+ notificationTokens: string[];
7847
+ body: string;
7848
+ isRead: boolean;
7849
+ userRole: UserRole;
7850
+ patientRequirementInstanceId: string;
7851
+ instructionId: string;
7852
+ id?: string | undefined;
7853
+ createdAt?: any;
7854
+ updatedAt?: any;
7855
+ notificationTime?: any;
7856
+ originalRequirementId?: string | undefined;
7857
+ }, {
7858
+ status: NotificationStatus;
7859
+ title: string;
7860
+ appointmentId: string;
7861
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
7862
+ userId: string;
7863
+ notificationTokens: string[];
7864
+ body: string;
7865
+ isRead: boolean;
7866
+ userRole: UserRole;
7867
+ patientRequirementInstanceId: string;
7868
+ instructionId: string;
7869
+ id?: string | undefined;
7870
+ createdAt?: any;
7871
+ updatedAt?: any;
7872
+ notificationTime?: any;
7873
+ originalRequirementId?: string | undefined;
7874
+ }>;
7807
7875
  /**
7808
7876
  * Validaciona šema za appointment reminder notifikaciju
7809
7877
  */
@@ -7935,7 +8003,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7935
8003
  isRead: z.ZodBoolean;
7936
8004
  userRole: z.ZodNativeEnum<typeof UserRole>;
7937
8005
  }, {
7938
- notificationType: z.ZodLiteral<NotificationType.REQUIREMENT_INSTRUCTION_DUE>;
8006
+ notificationType: z.ZodLiteral<NotificationType.PRE_REQUIREMENT_INSTRUCTION_DUE>;
7939
8007
  treatmentId: z.ZodString;
7940
8008
  requirements: z.ZodArray<z.ZodString, "many">;
7941
8009
  deadline: z.ZodAny;
@@ -7943,7 +8011,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7943
8011
  status: NotificationStatus;
7944
8012
  title: string;
7945
8013
  requirements: string[];
7946
- notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
8014
+ notificationType: NotificationType.PRE_REQUIREMENT_INSTRUCTION_DUE;
7947
8015
  treatmentId: string;
7948
8016
  userId: string;
7949
8017
  notificationTokens: string[];
@@ -7959,7 +8027,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7959
8027
  status: NotificationStatus;
7960
8028
  title: string;
7961
8029
  requirements: string[];
7962
- notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
8030
+ notificationType: NotificationType.PRE_REQUIREMENT_INSTRUCTION_DUE;
7963
8031
  treatmentId: string;
7964
8032
  userId: string;
7965
8033
  notificationTokens: string[];
@@ -7985,7 +8053,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7985
8053
  isRead: z.ZodBoolean;
7986
8054
  userRole: z.ZodNativeEnum<typeof UserRole>;
7987
8055
  }, {
7988
- notificationType: z.ZodLiteral<NotificationType.REQUIREMENT_INSTRUCTION_DUE>;
8056
+ notificationType: z.ZodLiteral<NotificationType.POST_REQUIREMENT_INSTRUCTION_DUE>;
7989
8057
  treatmentId: z.ZodString;
7990
8058
  requirements: z.ZodArray<z.ZodString, "many">;
7991
8059
  deadline: z.ZodAny;
@@ -7993,7 +8061,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7993
8061
  status: NotificationStatus;
7994
8062
  title: string;
7995
8063
  requirements: string[];
7996
- notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
8064
+ notificationType: NotificationType.POST_REQUIREMENT_INSTRUCTION_DUE;
7997
8065
  treatmentId: string;
7998
8066
  userId: string;
7999
8067
  notificationTokens: string[];
@@ -8009,7 +8077,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
8009
8077
  status: NotificationStatus;
8010
8078
  title: string;
8011
8079
  requirements: string[];
8012
- notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
8080
+ notificationType: NotificationType.POST_REQUIREMENT_INSTRUCTION_DUE;
8013
8081
  treatmentId: string;
8014
8082
  userId: string;
8015
8083
  notificationTokens: string[];
@@ -8034,6 +8102,59 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
8034
8102
  body: z.ZodString;
8035
8103
  isRead: z.ZodBoolean;
8036
8104
  userRole: z.ZodNativeEnum<typeof UserRole>;
8105
+ }, {
8106
+ notificationType: z.ZodLiteral<NotificationType.REQUIREMENT_INSTRUCTION_DUE>;
8107
+ appointmentId: z.ZodString;
8108
+ patientRequirementInstanceId: z.ZodString;
8109
+ instructionId: z.ZodString;
8110
+ originalRequirementId: z.ZodOptional<z.ZodString>;
8111
+ }>, "strip", z.ZodTypeAny, {
8112
+ status: NotificationStatus;
8113
+ title: string;
8114
+ appointmentId: string;
8115
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
8116
+ userId: string;
8117
+ notificationTokens: string[];
8118
+ body: string;
8119
+ isRead: boolean;
8120
+ userRole: UserRole;
8121
+ patientRequirementInstanceId: string;
8122
+ instructionId: string;
8123
+ id?: string | undefined;
8124
+ createdAt?: any;
8125
+ updatedAt?: any;
8126
+ notificationTime?: any;
8127
+ originalRequirementId?: string | undefined;
8128
+ }, {
8129
+ status: NotificationStatus;
8130
+ title: string;
8131
+ appointmentId: string;
8132
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
8133
+ userId: string;
8134
+ notificationTokens: string[];
8135
+ body: string;
8136
+ isRead: boolean;
8137
+ userRole: UserRole;
8138
+ patientRequirementInstanceId: string;
8139
+ instructionId: string;
8140
+ id?: string | undefined;
8141
+ createdAt?: any;
8142
+ updatedAt?: any;
8143
+ notificationTime?: any;
8144
+ originalRequirementId?: string | undefined;
8145
+ }>, z.ZodObject<z.objectUtil.extendShape<{
8146
+ id: z.ZodOptional<z.ZodString>;
8147
+ userId: z.ZodString;
8148
+ notificationTime: z.ZodAny;
8149
+ notificationType: z.ZodNativeEnum<typeof NotificationType>;
8150
+ notificationTokens: z.ZodArray<z.ZodString, "many">;
8151
+ status: z.ZodNativeEnum<typeof NotificationStatus>;
8152
+ createdAt: z.ZodOptional<z.ZodAny>;
8153
+ updatedAt: z.ZodOptional<z.ZodAny>;
8154
+ title: z.ZodString;
8155
+ body: z.ZodString;
8156
+ isRead: z.ZodBoolean;
8157
+ userRole: z.ZodNativeEnum<typeof UserRole>;
8037
8158
  }, {
8038
8159
  notificationType: z.ZodLiteral<NotificationType.APPOINTMENT_REMINDER>;
8039
8160
  appointmentId: z.ZodString;
@@ -18966,4 +19087,4 @@ declare const createReviewSchema: z.ZodEffects<z.ZodObject<{
18966
19087
  } | undefined;
18967
19088
  }>;
18968
19089
 
18969
- 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 };
19090
+ 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 CreateAppointmentHttpData, 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, requirementInstructionDueNotificationSchema, reviewSchema, searchAppointmentsSchema, searchPatientsSchema, syncedCalendarEventSchema, timeSlotSchema, timestampSchema, updateAllergySchema, updateAppointmentSchema, updateBlockingConditionSchema, updateCalendarEventSchema, updateClinicAdminSchema, updateClinicGroupSchema, updateClinicSchema, updateContraindicationSchema, updateDocumentTemplateSchema, updateFilledDocumentDataSchema, updateMedicationSchema, updatePatientMedicalInfoSchema, updateVitalStatsSchema, userRoleSchema, userRolesSchema, userSchema, vitalStatsSchema, workingHoursSchema };
package/dist/index.d.ts CHANGED
@@ -4547,6 +4547,16 @@ interface CreateAppointmentData {
4547
4547
  initialStatus: AppointmentStatus;
4548
4548
  initialPaymentStatus?: PaymentStatus;
4549
4549
  }
4550
+ /**
4551
+ * Data needed to create a new Appointment via CreateAppointmentHttp method
4552
+ */
4553
+ interface CreateAppointmentHttpData {
4554
+ patientId: string;
4555
+ procedureId: string;
4556
+ appointmentStartTime: Timestamp;
4557
+ appointmentEndTime: Timestamp;
4558
+ patientNotes?: string | null;
4559
+ }
4550
4560
  /**
4551
4561
  * Data allowed for updating an Appointment
4552
4562
  */
@@ -7221,7 +7231,7 @@ declare class AppointmentService extends BaseService {
7221
7231
  * @param data - CreateAppointmentData object
7222
7232
  * @returns The created appointment
7223
7233
  */
7224
- createAppointmentHttp(data: CreateAppointmentData): Promise<Appointment>;
7234
+ createAppointmentHttp(data: CreateAppointmentHttpData): Promise<Appointment>;
7225
7235
  /**
7226
7236
  * Gets an appointment by ID.
7227
7237
  *
@@ -7713,7 +7723,7 @@ declare const preRequirementNotificationSchema: z.ZodObject<z.objectUtil.extendS
7713
7723
  isRead: z.ZodBoolean;
7714
7724
  userRole: z.ZodNativeEnum<typeof UserRole>;
7715
7725
  }, {
7716
- notificationType: z.ZodLiteral<NotificationType.REQUIREMENT_INSTRUCTION_DUE>;
7726
+ notificationType: z.ZodLiteral<NotificationType.PRE_REQUIREMENT_INSTRUCTION_DUE>;
7717
7727
  treatmentId: z.ZodString;
7718
7728
  requirements: z.ZodArray<z.ZodString, "many">;
7719
7729
  deadline: z.ZodAny;
@@ -7721,7 +7731,7 @@ declare const preRequirementNotificationSchema: z.ZodObject<z.objectUtil.extendS
7721
7731
  status: NotificationStatus;
7722
7732
  title: string;
7723
7733
  requirements: string[];
7724
- notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
7734
+ notificationType: NotificationType.PRE_REQUIREMENT_INSTRUCTION_DUE;
7725
7735
  treatmentId: string;
7726
7736
  userId: string;
7727
7737
  notificationTokens: string[];
@@ -7737,7 +7747,7 @@ declare const preRequirementNotificationSchema: z.ZodObject<z.objectUtil.extendS
7737
7747
  status: NotificationStatus;
7738
7748
  title: string;
7739
7749
  requirements: string[];
7740
- notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
7750
+ notificationType: NotificationType.PRE_REQUIREMENT_INSTRUCTION_DUE;
7741
7751
  treatmentId: string;
7742
7752
  userId: string;
7743
7753
  notificationTokens: string[];
@@ -7767,7 +7777,7 @@ declare const postRequirementNotificationSchema: z.ZodObject<z.objectUtil.extend
7767
7777
  isRead: z.ZodBoolean;
7768
7778
  userRole: z.ZodNativeEnum<typeof UserRole>;
7769
7779
  }, {
7770
- notificationType: z.ZodLiteral<NotificationType.REQUIREMENT_INSTRUCTION_DUE>;
7780
+ notificationType: z.ZodLiteral<NotificationType.POST_REQUIREMENT_INSTRUCTION_DUE>;
7771
7781
  treatmentId: z.ZodString;
7772
7782
  requirements: z.ZodArray<z.ZodString, "many">;
7773
7783
  deadline: z.ZodAny;
@@ -7775,7 +7785,7 @@ declare const postRequirementNotificationSchema: z.ZodObject<z.objectUtil.extend
7775
7785
  status: NotificationStatus;
7776
7786
  title: string;
7777
7787
  requirements: string[];
7778
- notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
7788
+ notificationType: NotificationType.POST_REQUIREMENT_INSTRUCTION_DUE;
7779
7789
  treatmentId: string;
7780
7790
  userId: string;
7781
7791
  notificationTokens: string[];
@@ -7791,7 +7801,7 @@ declare const postRequirementNotificationSchema: z.ZodObject<z.objectUtil.extend
7791
7801
  status: NotificationStatus;
7792
7802
  title: string;
7793
7803
  requirements: string[];
7794
- notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
7804
+ notificationType: NotificationType.POST_REQUIREMENT_INSTRUCTION_DUE;
7795
7805
  treatmentId: string;
7796
7806
  userId: string;
7797
7807
  notificationTokens: string[];
@@ -7804,6 +7814,64 @@ declare const postRequirementNotificationSchema: z.ZodObject<z.objectUtil.extend
7804
7814
  deadline?: any;
7805
7815
  notificationTime?: any;
7806
7816
  }>;
7817
+ /**
7818
+ * Validaciona šema za requirement instruction notification
7819
+ * Ovo je nova schema koja se odnosi na RequirementInstructionDueNotification
7820
+ */
7821
+ declare const requirementInstructionDueNotificationSchema: z.ZodObject<z.objectUtil.extendShape<{
7822
+ id: z.ZodOptional<z.ZodString>;
7823
+ userId: z.ZodString;
7824
+ notificationTime: z.ZodAny;
7825
+ notificationType: z.ZodNativeEnum<typeof NotificationType>;
7826
+ notificationTokens: z.ZodArray<z.ZodString, "many">;
7827
+ status: z.ZodNativeEnum<typeof NotificationStatus>;
7828
+ createdAt: z.ZodOptional<z.ZodAny>;
7829
+ updatedAt: z.ZodOptional<z.ZodAny>;
7830
+ title: z.ZodString;
7831
+ body: z.ZodString;
7832
+ isRead: z.ZodBoolean;
7833
+ userRole: z.ZodNativeEnum<typeof UserRole>;
7834
+ }, {
7835
+ notificationType: z.ZodLiteral<NotificationType.REQUIREMENT_INSTRUCTION_DUE>;
7836
+ appointmentId: z.ZodString;
7837
+ patientRequirementInstanceId: z.ZodString;
7838
+ instructionId: z.ZodString;
7839
+ originalRequirementId: z.ZodOptional<z.ZodString>;
7840
+ }>, "strip", z.ZodTypeAny, {
7841
+ status: NotificationStatus;
7842
+ title: string;
7843
+ appointmentId: string;
7844
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
7845
+ userId: string;
7846
+ notificationTokens: string[];
7847
+ body: string;
7848
+ isRead: boolean;
7849
+ userRole: UserRole;
7850
+ patientRequirementInstanceId: string;
7851
+ instructionId: string;
7852
+ id?: string | undefined;
7853
+ createdAt?: any;
7854
+ updatedAt?: any;
7855
+ notificationTime?: any;
7856
+ originalRequirementId?: string | undefined;
7857
+ }, {
7858
+ status: NotificationStatus;
7859
+ title: string;
7860
+ appointmentId: string;
7861
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
7862
+ userId: string;
7863
+ notificationTokens: string[];
7864
+ body: string;
7865
+ isRead: boolean;
7866
+ userRole: UserRole;
7867
+ patientRequirementInstanceId: string;
7868
+ instructionId: string;
7869
+ id?: string | undefined;
7870
+ createdAt?: any;
7871
+ updatedAt?: any;
7872
+ notificationTime?: any;
7873
+ originalRequirementId?: string | undefined;
7874
+ }>;
7807
7875
  /**
7808
7876
  * Validaciona šema za appointment reminder notifikaciju
7809
7877
  */
@@ -7935,7 +8003,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7935
8003
  isRead: z.ZodBoolean;
7936
8004
  userRole: z.ZodNativeEnum<typeof UserRole>;
7937
8005
  }, {
7938
- notificationType: z.ZodLiteral<NotificationType.REQUIREMENT_INSTRUCTION_DUE>;
8006
+ notificationType: z.ZodLiteral<NotificationType.PRE_REQUIREMENT_INSTRUCTION_DUE>;
7939
8007
  treatmentId: z.ZodString;
7940
8008
  requirements: z.ZodArray<z.ZodString, "many">;
7941
8009
  deadline: z.ZodAny;
@@ -7943,7 +8011,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7943
8011
  status: NotificationStatus;
7944
8012
  title: string;
7945
8013
  requirements: string[];
7946
- notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
8014
+ notificationType: NotificationType.PRE_REQUIREMENT_INSTRUCTION_DUE;
7947
8015
  treatmentId: string;
7948
8016
  userId: string;
7949
8017
  notificationTokens: string[];
@@ -7959,7 +8027,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7959
8027
  status: NotificationStatus;
7960
8028
  title: string;
7961
8029
  requirements: string[];
7962
- notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
8030
+ notificationType: NotificationType.PRE_REQUIREMENT_INSTRUCTION_DUE;
7963
8031
  treatmentId: string;
7964
8032
  userId: string;
7965
8033
  notificationTokens: string[];
@@ -7985,7 +8053,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7985
8053
  isRead: z.ZodBoolean;
7986
8054
  userRole: z.ZodNativeEnum<typeof UserRole>;
7987
8055
  }, {
7988
- notificationType: z.ZodLiteral<NotificationType.REQUIREMENT_INSTRUCTION_DUE>;
8056
+ notificationType: z.ZodLiteral<NotificationType.POST_REQUIREMENT_INSTRUCTION_DUE>;
7989
8057
  treatmentId: z.ZodString;
7990
8058
  requirements: z.ZodArray<z.ZodString, "many">;
7991
8059
  deadline: z.ZodAny;
@@ -7993,7 +8061,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
7993
8061
  status: NotificationStatus;
7994
8062
  title: string;
7995
8063
  requirements: string[];
7996
- notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
8064
+ notificationType: NotificationType.POST_REQUIREMENT_INSTRUCTION_DUE;
7997
8065
  treatmentId: string;
7998
8066
  userId: string;
7999
8067
  notificationTokens: string[];
@@ -8009,7 +8077,7 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
8009
8077
  status: NotificationStatus;
8010
8078
  title: string;
8011
8079
  requirements: string[];
8012
- notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
8080
+ notificationType: NotificationType.POST_REQUIREMENT_INSTRUCTION_DUE;
8013
8081
  treatmentId: string;
8014
8082
  userId: string;
8015
8083
  notificationTokens: string[];
@@ -8034,6 +8102,59 @@ declare const notificationSchema: z.ZodDiscriminatedUnion<"notificationType", [z
8034
8102
  body: z.ZodString;
8035
8103
  isRead: z.ZodBoolean;
8036
8104
  userRole: z.ZodNativeEnum<typeof UserRole>;
8105
+ }, {
8106
+ notificationType: z.ZodLiteral<NotificationType.REQUIREMENT_INSTRUCTION_DUE>;
8107
+ appointmentId: z.ZodString;
8108
+ patientRequirementInstanceId: z.ZodString;
8109
+ instructionId: z.ZodString;
8110
+ originalRequirementId: z.ZodOptional<z.ZodString>;
8111
+ }>, "strip", z.ZodTypeAny, {
8112
+ status: NotificationStatus;
8113
+ title: string;
8114
+ appointmentId: string;
8115
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
8116
+ userId: string;
8117
+ notificationTokens: string[];
8118
+ body: string;
8119
+ isRead: boolean;
8120
+ userRole: UserRole;
8121
+ patientRequirementInstanceId: string;
8122
+ instructionId: string;
8123
+ id?: string | undefined;
8124
+ createdAt?: any;
8125
+ updatedAt?: any;
8126
+ notificationTime?: any;
8127
+ originalRequirementId?: string | undefined;
8128
+ }, {
8129
+ status: NotificationStatus;
8130
+ title: string;
8131
+ appointmentId: string;
8132
+ notificationType: NotificationType.REQUIREMENT_INSTRUCTION_DUE;
8133
+ userId: string;
8134
+ notificationTokens: string[];
8135
+ body: string;
8136
+ isRead: boolean;
8137
+ userRole: UserRole;
8138
+ patientRequirementInstanceId: string;
8139
+ instructionId: string;
8140
+ id?: string | undefined;
8141
+ createdAt?: any;
8142
+ updatedAt?: any;
8143
+ notificationTime?: any;
8144
+ originalRequirementId?: string | undefined;
8145
+ }>, z.ZodObject<z.objectUtil.extendShape<{
8146
+ id: z.ZodOptional<z.ZodString>;
8147
+ userId: z.ZodString;
8148
+ notificationTime: z.ZodAny;
8149
+ notificationType: z.ZodNativeEnum<typeof NotificationType>;
8150
+ notificationTokens: z.ZodArray<z.ZodString, "many">;
8151
+ status: z.ZodNativeEnum<typeof NotificationStatus>;
8152
+ createdAt: z.ZodOptional<z.ZodAny>;
8153
+ updatedAt: z.ZodOptional<z.ZodAny>;
8154
+ title: z.ZodString;
8155
+ body: z.ZodString;
8156
+ isRead: z.ZodBoolean;
8157
+ userRole: z.ZodNativeEnum<typeof UserRole>;
8037
8158
  }, {
8038
8159
  notificationType: z.ZodLiteral<NotificationType.APPOINTMENT_REMINDER>;
8039
8160
  appointmentId: z.ZodString;
@@ -18966,4 +19087,4 @@ declare const createReviewSchema: z.ZodEffects<z.ZodObject<{
18966
19087
  } | undefined;
18967
19088
  }>;
18968
19089
 
18969
- 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 };
19090
+ 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 CreateAppointmentHttpData, 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, requirementInstructionDueNotificationSchema, reviewSchema, searchAppointmentsSchema, searchPatientsSchema, syncedCalendarEventSchema, timeSlotSchema, timestampSchema, updateAllergySchema, updateAppointmentSchema, updateBlockingConditionSchema, updateCalendarEventSchema, updateClinicAdminSchema, updateClinicGroupSchema, updateClinicSchema, updateContraindicationSchema, updateDocumentTemplateSchema, updateFilledDocumentDataSchema, updateMedicationSchema, updatePatientMedicalInfoSchema, updateVitalStatsSchema, userRoleSchema, userRolesSchema, userSchema, vitalStatsSchema, workingHoursSchema };
package/dist/index.js CHANGED
@@ -204,6 +204,7 @@ __export(index_exports, {
204
204
  procedureReviewInfoSchema: () => procedureReviewInfoSchema,
205
205
  procedureReviewSchema: () => procedureReviewSchema,
206
206
  requesterInfoSchema: () => requesterInfoSchema,
207
+ requirementInstructionDueNotificationSchema: () => requirementInstructionDueNotificationSchema,
207
208
  reviewSchema: () => reviewSchema,
208
209
  searchAppointmentsSchema: () => searchAppointmentsSchema,
209
210
  searchPatientsSchema: () => searchPatientsSchema,
@@ -12500,7 +12501,7 @@ var AppointmentService = class extends BaseService {
12500
12501
  procedureId: data.procedureId,
12501
12502
  appointmentStartTime: data.appointmentStartTime.toMillis ? data.appointmentStartTime.toMillis() : new Date(data.appointmentStartTime).getTime(),
12502
12503
  appointmentEndTime: data.appointmentEndTime.toMillis ? data.appointmentEndTime.toMillis() : new Date(data.appointmentEndTime).getTime(),
12503
- patientNotes: data.patientNotes || null
12504
+ patientNotes: (data == null ? void 0 : data.patientNotes) || null
12504
12505
  };
12505
12506
  console.log(
12506
12507
  `[APPOINTMENT_SERVICE] Making fetch request to ${functionUrl}`
@@ -14085,19 +14086,28 @@ var baseNotificationSchema = import_zod24.z.object({
14085
14086
  userRole: import_zod24.z.nativeEnum(UserRole)
14086
14087
  });
14087
14088
  var preRequirementNotificationSchema = baseNotificationSchema.extend({
14088
- notificationType: import_zod24.z.literal("requirementInstructionDue" /* REQUIREMENT_INSTRUCTION_DUE */),
14089
+ notificationType: import_zod24.z.literal("preRequirementInstructionDue" /* PRE_REQUIREMENT_INSTRUCTION_DUE */),
14089
14090
  treatmentId: import_zod24.z.string(),
14090
14091
  requirements: import_zod24.z.array(import_zod24.z.string()),
14091
14092
  deadline: import_zod24.z.any()
14092
14093
  // Timestamp
14093
14094
  });
14094
14095
  var postRequirementNotificationSchema = baseNotificationSchema.extend({
14095
- notificationType: import_zod24.z.literal("requirementInstructionDue" /* REQUIREMENT_INSTRUCTION_DUE */),
14096
+ notificationType: import_zod24.z.literal(
14097
+ "postRequirementInstructionDue" /* POST_REQUIREMENT_INSTRUCTION_DUE */
14098
+ ),
14096
14099
  treatmentId: import_zod24.z.string(),
14097
14100
  requirements: import_zod24.z.array(import_zod24.z.string()),
14098
14101
  deadline: import_zod24.z.any()
14099
14102
  // Timestamp
14100
14103
  });
14104
+ var requirementInstructionDueNotificationSchema = baseNotificationSchema.extend({
14105
+ notificationType: import_zod24.z.literal("requirementInstructionDue" /* REQUIREMENT_INSTRUCTION_DUE */),
14106
+ appointmentId: import_zod24.z.string(),
14107
+ patientRequirementInstanceId: import_zod24.z.string(),
14108
+ instructionId: import_zod24.z.string(),
14109
+ originalRequirementId: import_zod24.z.string().optional()
14110
+ });
14101
14111
  var appointmentReminderNotificationSchema = baseNotificationSchema.extend({
14102
14112
  notificationType: import_zod24.z.literal("appointmentReminder" /* APPOINTMENT_REMINDER */),
14103
14113
  appointmentId: import_zod24.z.string(),
@@ -14116,6 +14126,7 @@ var appointmentNotificationSchema = baseNotificationSchema.extend({
14116
14126
  var notificationSchema = import_zod24.z.discriminatedUnion("notificationType", [
14117
14127
  preRequirementNotificationSchema,
14118
14128
  postRequirementNotificationSchema,
14129
+ requirementInstructionDueNotificationSchema,
14119
14130
  appointmentReminderNotificationSchema,
14120
14131
  appointmentNotificationSchema
14121
14132
  ]);
@@ -14327,6 +14338,7 @@ var RequirementType = /* @__PURE__ */ ((RequirementType2) => {
14327
14338
  procedureReviewInfoSchema,
14328
14339
  procedureReviewSchema,
14329
14340
  requesterInfoSchema,
14341
+ requirementInstructionDueNotificationSchema,
14330
14342
  reviewSchema,
14331
14343
  searchAppointmentsSchema,
14332
14344
  searchPatientsSchema,
package/dist/index.mjs CHANGED
@@ -12603,7 +12603,7 @@ var AppointmentService = class extends BaseService {
12603
12603
  procedureId: data.procedureId,
12604
12604
  appointmentStartTime: data.appointmentStartTime.toMillis ? data.appointmentStartTime.toMillis() : new Date(data.appointmentStartTime).getTime(),
12605
12605
  appointmentEndTime: data.appointmentEndTime.toMillis ? data.appointmentEndTime.toMillis() : new Date(data.appointmentEndTime).getTime(),
12606
- patientNotes: data.patientNotes || null
12606
+ patientNotes: (data == null ? void 0 : data.patientNotes) || null
12607
12607
  };
12608
12608
  console.log(
12609
12609
  `[APPOINTMENT_SERVICE] Making fetch request to ${functionUrl}`
@@ -14247,19 +14247,28 @@ var baseNotificationSchema = z24.object({
14247
14247
  userRole: z24.nativeEnum(UserRole)
14248
14248
  });
14249
14249
  var preRequirementNotificationSchema = baseNotificationSchema.extend({
14250
- notificationType: z24.literal("requirementInstructionDue" /* REQUIREMENT_INSTRUCTION_DUE */),
14250
+ notificationType: z24.literal("preRequirementInstructionDue" /* PRE_REQUIREMENT_INSTRUCTION_DUE */),
14251
14251
  treatmentId: z24.string(),
14252
14252
  requirements: z24.array(z24.string()),
14253
14253
  deadline: z24.any()
14254
14254
  // Timestamp
14255
14255
  });
14256
14256
  var postRequirementNotificationSchema = baseNotificationSchema.extend({
14257
- notificationType: z24.literal("requirementInstructionDue" /* REQUIREMENT_INSTRUCTION_DUE */),
14257
+ notificationType: z24.literal(
14258
+ "postRequirementInstructionDue" /* POST_REQUIREMENT_INSTRUCTION_DUE */
14259
+ ),
14258
14260
  treatmentId: z24.string(),
14259
14261
  requirements: z24.array(z24.string()),
14260
14262
  deadline: z24.any()
14261
14263
  // Timestamp
14262
14264
  });
14265
+ var requirementInstructionDueNotificationSchema = baseNotificationSchema.extend({
14266
+ notificationType: z24.literal("requirementInstructionDue" /* REQUIREMENT_INSTRUCTION_DUE */),
14267
+ appointmentId: z24.string(),
14268
+ patientRequirementInstanceId: z24.string(),
14269
+ instructionId: z24.string(),
14270
+ originalRequirementId: z24.string().optional()
14271
+ });
14263
14272
  var appointmentReminderNotificationSchema = baseNotificationSchema.extend({
14264
14273
  notificationType: z24.literal("appointmentReminder" /* APPOINTMENT_REMINDER */),
14265
14274
  appointmentId: z24.string(),
@@ -14278,6 +14287,7 @@ var appointmentNotificationSchema = baseNotificationSchema.extend({
14278
14287
  var notificationSchema = z24.discriminatedUnion("notificationType", [
14279
14288
  preRequirementNotificationSchema,
14280
14289
  postRequirementNotificationSchema,
14290
+ requirementInstructionDueNotificationSchema,
14281
14291
  appointmentReminderNotificationSchema,
14282
14292
  appointmentNotificationSchema
14283
14293
  ]);
@@ -14488,6 +14498,7 @@ export {
14488
14498
  procedureReviewInfoSchema,
14489
14499
  procedureReviewSchema,
14490
14500
  requesterInfoSchema,
14501
+ requirementInstructionDueNotificationSchema,
14491
14502
  reviewSchema,
14492
14503
  searchAppointmentsSchema,
14493
14504
  searchPatientsSchema,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@blackcode_sa/metaestetics-api",
3
3
  "private": false,
4
- "version": "1.6.7",
4
+ "version": "1.6.9",
5
5
  "description": "Firebase authentication service with anonymous upgrade support",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
package/src/index.ts CHANGED
@@ -127,6 +127,7 @@ export {
127
127
  export type {
128
128
  Appointment,
129
129
  CreateAppointmentData,
130
+ CreateAppointmentHttpData,
130
131
  UpdateAppointmentData,
131
132
  SearchAppointmentsParams,
132
133
  } from "./types/appointment";
@@ -20,6 +20,7 @@ import {
20
20
  AppointmentMediaItem,
21
21
  PatientReviewInfo,
22
22
  LinkedFormInfo,
23
+ type CreateAppointmentHttpData,
23
24
  } from "../../types/appointment";
24
25
  import {
25
26
  createAppointmentSchema,
@@ -240,7 +241,7 @@ export class AppointmentService extends BaseService {
240
241
  * @returns The created appointment
241
242
  */
242
243
  async createAppointmentHttp(
243
- data: CreateAppointmentData
244
+ data: CreateAppointmentHttpData
244
245
  ): Promise<Appointment> {
245
246
  try {
246
247
  console.log(
@@ -268,7 +269,7 @@ export class AppointmentService extends BaseService {
268
269
  appointmentEndTime: data.appointmentEndTime.toMillis
269
270
  ? data.appointmentEndTime.toMillis()
270
271
  : new Date(data.appointmentEndTime as any).getTime(),
271
- patientNotes: data.patientNotes || null,
272
+ patientNotes: data?.patientNotes || null,
272
273
  };
273
274
 
274
275
  console.log(
@@ -225,6 +225,17 @@ export interface CreateAppointmentData {
225
225
  initialPaymentStatus?: PaymentStatus; // Defaults to UNPAID if not provided
226
226
  }
227
227
 
228
+ /**
229
+ * Data needed to create a new Appointment via CreateAppointmentHttp method
230
+ */
231
+ export interface CreateAppointmentHttpData {
232
+ patientId: string;
233
+ procedureId: string;
234
+ appointmentStartTime: Timestamp;
235
+ appointmentEndTime: Timestamp;
236
+ patientNotes?: string | null;
237
+ }
238
+
228
239
  /**
229
240
  * Data allowed for updating an Appointment
230
241
  */
@@ -24,7 +24,7 @@ export const baseNotificationSchema = z.object({
24
24
  * Validaciona šema za pre-requirement notifikaciju
25
25
  */
26
26
  export const preRequirementNotificationSchema = baseNotificationSchema.extend({
27
- notificationType: z.literal(NotificationType.REQUIREMENT_INSTRUCTION_DUE),
27
+ notificationType: z.literal(NotificationType.PRE_REQUIREMENT_INSTRUCTION_DUE),
28
28
  treatmentId: z.string(),
29
29
  requirements: z.array(z.string()),
30
30
  deadline: z.any(), // Timestamp
@@ -34,12 +34,27 @@ export const preRequirementNotificationSchema = baseNotificationSchema.extend({
34
34
  * Validaciona šema za post-requirement notifikaciju
35
35
  */
36
36
  export const postRequirementNotificationSchema = baseNotificationSchema.extend({
37
- notificationType: z.literal(NotificationType.REQUIREMENT_INSTRUCTION_DUE),
37
+ notificationType: z.literal(
38
+ NotificationType.POST_REQUIREMENT_INSTRUCTION_DUE
39
+ ),
38
40
  treatmentId: z.string(),
39
41
  requirements: z.array(z.string()),
40
42
  deadline: z.any(), // Timestamp
41
43
  });
42
44
 
45
+ /**
46
+ * Validaciona šema za requirement instruction notification
47
+ * Ovo je nova schema koja se odnosi na RequirementInstructionDueNotification
48
+ */
49
+ export const requirementInstructionDueNotificationSchema =
50
+ baseNotificationSchema.extend({
51
+ notificationType: z.literal(NotificationType.REQUIREMENT_INSTRUCTION_DUE),
52
+ appointmentId: z.string(),
53
+ patientRequirementInstanceId: z.string(),
54
+ instructionId: z.string(),
55
+ originalRequirementId: z.string().optional(),
56
+ });
57
+
43
58
  /**
44
59
  * Validaciona šema za appointment reminder notifikaciju
45
60
  */
@@ -69,6 +84,7 @@ export const appointmentNotificationSchema = baseNotificationSchema.extend({
69
84
  export const notificationSchema = z.discriminatedUnion("notificationType", [
70
85
  preRequirementNotificationSchema,
71
86
  postRequirementNotificationSchema,
87
+ requirementInstructionDueNotificationSchema,
72
88
  appointmentReminderNotificationSchema,
73
89
  appointmentNotificationSchema,
74
90
  ]);