@blackcode_sa/metaestetics-api 1.6.8 → 1.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/index.js +8 -32
- package/dist/admin/index.mjs +8 -32
- package/dist/index.d.mts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/admin/booking/booking.admin.ts +8 -32
- package/src/index.ts +1 -0
- package/src/services/appointment/appointment.service.ts +3 -2
- package/src/types/appointment/index.ts +11 -0
package/dist/admin/index.js
CHANGED
|
@@ -33291,14 +33291,8 @@ var BookingAdmin = class {
|
|
|
33291
33291
|
}
|
|
33292
33292
|
const newAppointmentId = this.db.collection(APPOINTMENTS_COLLECTION).doc().id;
|
|
33293
33293
|
const eventTimeForCalendarEvents = {
|
|
33294
|
-
start:
|
|
33295
|
-
|
|
33296
|
-
data.appointmentStartTime.nanoseconds
|
|
33297
|
-
),
|
|
33298
|
-
end: new Timestamp(
|
|
33299
|
-
data.appointmentEndTime.seconds,
|
|
33300
|
-
data.appointmentEndTime.nanoseconds
|
|
33301
|
-
)
|
|
33294
|
+
start: data.appointmentStartTime,
|
|
33295
|
+
end: data.appointmentEndTime
|
|
33302
33296
|
};
|
|
33303
33297
|
const practitionerCalendarEventId = this.db.collection(PRACTITIONERS_COLLECTION).doc(practitionerData.id).collection(CALENDAR_COLLECTION).doc().id;
|
|
33304
33298
|
const practitionerCalendarEventData = {
|
|
@@ -33412,22 +33406,10 @@ var BookingAdmin = class {
|
|
|
33412
33406
|
),
|
|
33413
33407
|
procedureExtendedInfo: this._generateProcedureExtendedInfo(procedure),
|
|
33414
33408
|
status: initialAppointmentStatus,
|
|
33415
|
-
bookingTime:
|
|
33416
|
-
|
|
33417
|
-
|
|
33418
|
-
|
|
33419
|
-
confirmationTime: initialAppointmentStatus === "confirmed" /* CONFIRMED */ ? new Timestamp(
|
|
33420
|
-
adminTsNow.seconds,
|
|
33421
|
-
adminTsNow.nanoseconds
|
|
33422
|
-
) : null,
|
|
33423
|
-
appointmentStartTime: new Timestamp(
|
|
33424
|
-
data.appointmentStartTime.seconds,
|
|
33425
|
-
data.appointmentStartTime.nanoseconds
|
|
33426
|
-
),
|
|
33427
|
-
appointmentEndTime: new Timestamp(
|
|
33428
|
-
data.appointmentEndTime.seconds,
|
|
33429
|
-
data.appointmentEndTime.nanoseconds
|
|
33430
|
-
),
|
|
33409
|
+
bookingTime: adminTsNow,
|
|
33410
|
+
confirmationTime: initialAppointmentStatus === "confirmed" /* CONFIRMED */ ? adminTsNow : null,
|
|
33411
|
+
appointmentStartTime: data.appointmentStartTime,
|
|
33412
|
+
appointmentEndTime: data.appointmentEndTime,
|
|
33431
33413
|
cost: procedure.price,
|
|
33432
33414
|
currency: procedure.currency,
|
|
33433
33415
|
paymentStatus: procedure.price > 0 ? "unpaid" /* UNPAID */ : "not_applicable" /* NOT_APPLICABLE */,
|
|
@@ -33454,14 +33436,8 @@ var BookingAdmin = class {
|
|
|
33454
33436
|
isRecurring: false,
|
|
33455
33437
|
recurringAppointmentId: null,
|
|
33456
33438
|
isArchived: false,
|
|
33457
|
-
createdAt:
|
|
33458
|
-
|
|
33459
|
-
adminTsNow.nanoseconds
|
|
33460
|
-
),
|
|
33461
|
-
updatedAt: new Timestamp(
|
|
33462
|
-
adminTsNow.seconds,
|
|
33463
|
-
adminTsNow.nanoseconds
|
|
33464
|
-
)
|
|
33439
|
+
createdAt: adminTsNow,
|
|
33440
|
+
updatedAt: adminTsNow
|
|
33465
33441
|
};
|
|
33466
33442
|
batch.set(
|
|
33467
33443
|
this.db.collection(APPOINTMENTS_COLLECTION).doc(newAppointmentId),
|
package/dist/admin/index.mjs
CHANGED
|
@@ -33268,14 +33268,8 @@ var BookingAdmin = class {
|
|
|
33268
33268
|
}
|
|
33269
33269
|
const newAppointmentId = this.db.collection(APPOINTMENTS_COLLECTION).doc().id;
|
|
33270
33270
|
const eventTimeForCalendarEvents = {
|
|
33271
|
-
start:
|
|
33272
|
-
|
|
33273
|
-
data.appointmentStartTime.nanoseconds
|
|
33274
|
-
),
|
|
33275
|
-
end: new Timestamp(
|
|
33276
|
-
data.appointmentEndTime.seconds,
|
|
33277
|
-
data.appointmentEndTime.nanoseconds
|
|
33278
|
-
)
|
|
33271
|
+
start: data.appointmentStartTime,
|
|
33272
|
+
end: data.appointmentEndTime
|
|
33279
33273
|
};
|
|
33280
33274
|
const practitionerCalendarEventId = this.db.collection(PRACTITIONERS_COLLECTION).doc(practitionerData.id).collection(CALENDAR_COLLECTION).doc().id;
|
|
33281
33275
|
const practitionerCalendarEventData = {
|
|
@@ -33389,22 +33383,10 @@ var BookingAdmin = class {
|
|
|
33389
33383
|
),
|
|
33390
33384
|
procedureExtendedInfo: this._generateProcedureExtendedInfo(procedure),
|
|
33391
33385
|
status: initialAppointmentStatus,
|
|
33392
|
-
bookingTime:
|
|
33393
|
-
|
|
33394
|
-
|
|
33395
|
-
|
|
33396
|
-
confirmationTime: initialAppointmentStatus === "confirmed" /* CONFIRMED */ ? new Timestamp(
|
|
33397
|
-
adminTsNow.seconds,
|
|
33398
|
-
adminTsNow.nanoseconds
|
|
33399
|
-
) : null,
|
|
33400
|
-
appointmentStartTime: new Timestamp(
|
|
33401
|
-
data.appointmentStartTime.seconds,
|
|
33402
|
-
data.appointmentStartTime.nanoseconds
|
|
33403
|
-
),
|
|
33404
|
-
appointmentEndTime: new Timestamp(
|
|
33405
|
-
data.appointmentEndTime.seconds,
|
|
33406
|
-
data.appointmentEndTime.nanoseconds
|
|
33407
|
-
),
|
|
33386
|
+
bookingTime: adminTsNow,
|
|
33387
|
+
confirmationTime: initialAppointmentStatus === "confirmed" /* CONFIRMED */ ? adminTsNow : null,
|
|
33388
|
+
appointmentStartTime: data.appointmentStartTime,
|
|
33389
|
+
appointmentEndTime: data.appointmentEndTime,
|
|
33408
33390
|
cost: procedure.price,
|
|
33409
33391
|
currency: procedure.currency,
|
|
33410
33392
|
paymentStatus: procedure.price > 0 ? "unpaid" /* UNPAID */ : "not_applicable" /* NOT_APPLICABLE */,
|
|
@@ -33431,14 +33413,8 @@ var BookingAdmin = class {
|
|
|
33431
33413
|
isRecurring: false,
|
|
33432
33414
|
recurringAppointmentId: null,
|
|
33433
33415
|
isArchived: false,
|
|
33434
|
-
createdAt:
|
|
33435
|
-
|
|
33436
|
-
adminTsNow.nanoseconds
|
|
33437
|
-
),
|
|
33438
|
-
updatedAt: new Timestamp(
|
|
33439
|
-
adminTsNow.seconds,
|
|
33440
|
-
adminTsNow.nanoseconds
|
|
33441
|
-
)
|
|
33416
|
+
createdAt: adminTsNow,
|
|
33417
|
+
updatedAt: adminTsNow
|
|
33442
33418
|
};
|
|
33443
33419
|
batch.set(
|
|
33444
33420
|
this.db.collection(APPOINTMENTS_COLLECTION).doc(newAppointmentId),
|
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:
|
|
7234
|
+
createAppointmentHttp(data: CreateAppointmentHttpData): Promise<Appointment>;
|
|
7225
7235
|
/**
|
|
7226
7236
|
* Gets an appointment by ID.
|
|
7227
7237
|
*
|
|
@@ -19077,4 +19087,4 @@ declare const createReviewSchema: z.ZodEffects<z.ZodObject<{
|
|
|
19077
19087
|
} | undefined;
|
|
19078
19088
|
}>;
|
|
19079
19089
|
|
|
19080
|
-
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, 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 };
|
|
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:
|
|
7234
|
+
createAppointmentHttp(data: CreateAppointmentHttpData): Promise<Appointment>;
|
|
7225
7235
|
/**
|
|
7226
7236
|
* Gets an appointment by ID.
|
|
7227
7237
|
*
|
|
@@ -19077,4 +19087,4 @@ declare const createReviewSchema: z.ZodEffects<z.ZodObject<{
|
|
|
19077
19087
|
} | undefined;
|
|
19078
19088
|
}>;
|
|
19079
19089
|
|
|
19080
|
-
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, 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 };
|
|
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
|
@@ -12501,7 +12501,7 @@ var AppointmentService = class extends BaseService {
|
|
|
12501
12501
|
procedureId: data.procedureId,
|
|
12502
12502
|
appointmentStartTime: data.appointmentStartTime.toMillis ? data.appointmentStartTime.toMillis() : new Date(data.appointmentStartTime).getTime(),
|
|
12503
12503
|
appointmentEndTime: data.appointmentEndTime.toMillis ? data.appointmentEndTime.toMillis() : new Date(data.appointmentEndTime).getTime(),
|
|
12504
|
-
patientNotes: data.patientNotes || null
|
|
12504
|
+
patientNotes: (data == null ? void 0 : data.patientNotes) || null
|
|
12505
12505
|
};
|
|
12506
12506
|
console.log(
|
|
12507
12507
|
`[APPOINTMENT_SERVICE] Making fetch request to ${functionUrl}`
|
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}`
|
package/package.json
CHANGED
|
@@ -556,14 +556,8 @@ export class BookingAdmin {
|
|
|
556
556
|
.doc().id;
|
|
557
557
|
|
|
558
558
|
const eventTimeForCalendarEvents: CalendarEventTime = {
|
|
559
|
-
start:
|
|
560
|
-
|
|
561
|
-
data.appointmentStartTime.nanoseconds
|
|
562
|
-
),
|
|
563
|
-
end: new FirebaseClientTimestamp(
|
|
564
|
-
data.appointmentEndTime.seconds,
|
|
565
|
-
data.appointmentEndTime.nanoseconds
|
|
566
|
-
),
|
|
559
|
+
start: data.appointmentStartTime as any,
|
|
560
|
+
end: data.appointmentEndTime as any,
|
|
567
561
|
};
|
|
568
562
|
|
|
569
563
|
// Practitioner Calendar Event
|
|
@@ -716,25 +710,13 @@ export class BookingAdmin {
|
|
|
716
710
|
),
|
|
717
711
|
procedureExtendedInfo: this._generateProcedureExtendedInfo(procedure),
|
|
718
712
|
status: initialAppointmentStatus,
|
|
719
|
-
bookingTime:
|
|
720
|
-
adminTsNow.seconds,
|
|
721
|
-
adminTsNow.nanoseconds
|
|
722
|
-
),
|
|
713
|
+
bookingTime: adminTsNow as any,
|
|
723
714
|
confirmationTime:
|
|
724
715
|
initialAppointmentStatus === AppointmentStatus.CONFIRMED
|
|
725
|
-
?
|
|
726
|
-
adminTsNow.seconds,
|
|
727
|
-
adminTsNow.nanoseconds
|
|
728
|
-
)
|
|
716
|
+
? (adminTsNow as any)
|
|
729
717
|
: null,
|
|
730
|
-
appointmentStartTime:
|
|
731
|
-
|
|
732
|
-
data.appointmentStartTime.nanoseconds
|
|
733
|
-
),
|
|
734
|
-
appointmentEndTime: new FirebaseClientTimestamp(
|
|
735
|
-
data.appointmentEndTime.seconds,
|
|
736
|
-
data.appointmentEndTime.nanoseconds
|
|
737
|
-
),
|
|
718
|
+
appointmentStartTime: data.appointmentStartTime as any,
|
|
719
|
+
appointmentEndTime: data.appointmentEndTime as any,
|
|
738
720
|
cost: procedure.price,
|
|
739
721
|
currency: procedure.currency,
|
|
740
722
|
paymentStatus:
|
|
@@ -764,14 +746,8 @@ export class BookingAdmin {
|
|
|
764
746
|
isRecurring: false,
|
|
765
747
|
recurringAppointmentId: null,
|
|
766
748
|
isArchived: false,
|
|
767
|
-
createdAt:
|
|
768
|
-
|
|
769
|
-
adminTsNow.nanoseconds
|
|
770
|
-
),
|
|
771
|
-
updatedAt: new FirebaseClientTimestamp(
|
|
772
|
-
adminTsNow.seconds,
|
|
773
|
-
adminTsNow.nanoseconds
|
|
774
|
-
),
|
|
749
|
+
createdAt: adminTsNow as any,
|
|
750
|
+
updatedAt: adminTsNow as any,
|
|
775
751
|
};
|
|
776
752
|
|
|
777
753
|
batch.set(
|
package/src/index.ts
CHANGED
|
@@ -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:
|
|
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
|
|
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
|
*/
|