@blackcode_sa/metaestetics-api 1.6.9 → 1.6.11
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 +16 -36
- package/dist/admin/index.mjs +16 -36
- package/package.json +1 -1
- package/src/admin/booking/booking.admin.ts +16 -36
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 = {
|
|
@@ -33315,7 +33309,7 @@ var BookingAdmin = class {
|
|
|
33315
33309
|
eventName: `Appointment: ${procedure.name} with ${patientInfo.fullName}`,
|
|
33316
33310
|
eventLocation: clinicData.location,
|
|
33317
33311
|
eventTime: eventTimeForCalendarEvents,
|
|
33318
|
-
description: procedure.description ||
|
|
33312
|
+
description: procedure.description || "",
|
|
33319
33313
|
status: initialCalendarEventStatus,
|
|
33320
33314
|
syncStatus: "internal" /* INTERNAL */,
|
|
33321
33315
|
eventType: "appointment" /* APPOINTMENT */,
|
|
@@ -33339,7 +33333,7 @@ var BookingAdmin = class {
|
|
|
33339
33333
|
eventName: `Appointment: ${procedure.name} at ${clinicData.name}`,
|
|
33340
33334
|
eventLocation: clinicData.location,
|
|
33341
33335
|
eventTime: eventTimeForCalendarEvents,
|
|
33342
|
-
description: data.patientNotes ||
|
|
33336
|
+
description: data.patientNotes || "",
|
|
33343
33337
|
status: initialCalendarEventStatus,
|
|
33344
33338
|
syncStatus: "internal" /* INTERNAL */,
|
|
33345
33339
|
eventType: "appointment" /* APPOINTMENT */,
|
|
@@ -33365,7 +33359,7 @@ var BookingAdmin = class {
|
|
|
33365
33359
|
eventName: `Appointment: ${procedure.name} for ${patientInfo.fullName} with ${practitionerInfo.name}`,
|
|
33366
33360
|
eventLocation: clinicData.location,
|
|
33367
33361
|
eventTime: eventTimeForCalendarEvents,
|
|
33368
|
-
description: data.patientNotes ||
|
|
33362
|
+
description: data.patientNotes || "",
|
|
33369
33363
|
status: initialCalendarEventStatus,
|
|
33370
33364
|
syncStatus: "internal" /* INTERNAL */,
|
|
33371
33365
|
eventType: "appointment" /* APPOINTMENT */,
|
|
@@ -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 */,
|
|
@@ -33443,7 +33425,11 @@ var BookingAdmin = class {
|
|
|
33443
33425
|
linkedForms: initializedFormsInfo,
|
|
33444
33426
|
media: [],
|
|
33445
33427
|
reviewInfo: null,
|
|
33446
|
-
finalizedDetails:
|
|
33428
|
+
finalizedDetails: {
|
|
33429
|
+
by: "",
|
|
33430
|
+
at: adminTsNow,
|
|
33431
|
+
notes: ""
|
|
33432
|
+
},
|
|
33447
33433
|
internalNotes: null,
|
|
33448
33434
|
cancellationReason: null,
|
|
33449
33435
|
cancellationTime: null,
|
|
@@ -33454,14 +33440,8 @@ var BookingAdmin = class {
|
|
|
33454
33440
|
isRecurring: false,
|
|
33455
33441
|
recurringAppointmentId: null,
|
|
33456
33442
|
isArchived: false,
|
|
33457
|
-
createdAt:
|
|
33458
|
-
|
|
33459
|
-
adminTsNow.nanoseconds
|
|
33460
|
-
),
|
|
33461
|
-
updatedAt: new Timestamp(
|
|
33462
|
-
adminTsNow.seconds,
|
|
33463
|
-
adminTsNow.nanoseconds
|
|
33464
|
-
)
|
|
33443
|
+
createdAt: adminTsNow,
|
|
33444
|
+
updatedAt: adminTsNow
|
|
33465
33445
|
};
|
|
33466
33446
|
batch.set(
|
|
33467
33447
|
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 = {
|
|
@@ -33292,7 +33286,7 @@ var BookingAdmin = class {
|
|
|
33292
33286
|
eventName: `Appointment: ${procedure.name} with ${patientInfo.fullName}`,
|
|
33293
33287
|
eventLocation: clinicData.location,
|
|
33294
33288
|
eventTime: eventTimeForCalendarEvents,
|
|
33295
|
-
description: procedure.description ||
|
|
33289
|
+
description: procedure.description || "",
|
|
33296
33290
|
status: initialCalendarEventStatus,
|
|
33297
33291
|
syncStatus: "internal" /* INTERNAL */,
|
|
33298
33292
|
eventType: "appointment" /* APPOINTMENT */,
|
|
@@ -33316,7 +33310,7 @@ var BookingAdmin = class {
|
|
|
33316
33310
|
eventName: `Appointment: ${procedure.name} at ${clinicData.name}`,
|
|
33317
33311
|
eventLocation: clinicData.location,
|
|
33318
33312
|
eventTime: eventTimeForCalendarEvents,
|
|
33319
|
-
description: data.patientNotes ||
|
|
33313
|
+
description: data.patientNotes || "",
|
|
33320
33314
|
status: initialCalendarEventStatus,
|
|
33321
33315
|
syncStatus: "internal" /* INTERNAL */,
|
|
33322
33316
|
eventType: "appointment" /* APPOINTMENT */,
|
|
@@ -33342,7 +33336,7 @@ var BookingAdmin = class {
|
|
|
33342
33336
|
eventName: `Appointment: ${procedure.name} for ${patientInfo.fullName} with ${practitionerInfo.name}`,
|
|
33343
33337
|
eventLocation: clinicData.location,
|
|
33344
33338
|
eventTime: eventTimeForCalendarEvents,
|
|
33345
|
-
description: data.patientNotes ||
|
|
33339
|
+
description: data.patientNotes || "",
|
|
33346
33340
|
status: initialCalendarEventStatus,
|
|
33347
33341
|
syncStatus: "internal" /* INTERNAL */,
|
|
33348
33342
|
eventType: "appointment" /* APPOINTMENT */,
|
|
@@ -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 */,
|
|
@@ -33420,7 +33402,11 @@ var BookingAdmin = class {
|
|
|
33420
33402
|
linkedForms: initializedFormsInfo,
|
|
33421
33403
|
media: [],
|
|
33422
33404
|
reviewInfo: null,
|
|
33423
|
-
finalizedDetails:
|
|
33405
|
+
finalizedDetails: {
|
|
33406
|
+
by: "",
|
|
33407
|
+
at: adminTsNow,
|
|
33408
|
+
notes: ""
|
|
33409
|
+
},
|
|
33424
33410
|
internalNotes: null,
|
|
33425
33411
|
cancellationReason: null,
|
|
33426
33412
|
cancellationTime: null,
|
|
@@ -33431,14 +33417,8 @@ var BookingAdmin = class {
|
|
|
33431
33417
|
isRecurring: false,
|
|
33432
33418
|
recurringAppointmentId: null,
|
|
33433
33419
|
isArchived: false,
|
|
33434
|
-
createdAt:
|
|
33435
|
-
|
|
33436
|
-
adminTsNow.nanoseconds
|
|
33437
|
-
),
|
|
33438
|
-
updatedAt: new Timestamp(
|
|
33439
|
-
adminTsNow.seconds,
|
|
33440
|
-
adminTsNow.nanoseconds
|
|
33441
|
-
)
|
|
33420
|
+
createdAt: adminTsNow,
|
|
33421
|
+
updatedAt: adminTsNow
|
|
33442
33422
|
};
|
|
33443
33423
|
batch.set(
|
|
33444
33424
|
this.db.collection(APPOINTMENTS_COLLECTION).doc(newAppointmentId),
|
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
|
|
@@ -586,7 +580,7 @@ export class BookingAdmin {
|
|
|
586
580
|
eventName: `Appointment: ${procedure.name} with ${patientInfo.fullName}`,
|
|
587
581
|
eventLocation: clinicData.location,
|
|
588
582
|
eventTime: eventTimeForCalendarEvents,
|
|
589
|
-
description: procedure.description ||
|
|
583
|
+
description: procedure.description || "",
|
|
590
584
|
status: initialCalendarEventStatus,
|
|
591
585
|
syncStatus: CalendarSyncStatus.INTERNAL,
|
|
592
586
|
eventType: CalendarEventType.APPOINTMENT,
|
|
@@ -620,7 +614,7 @@ export class BookingAdmin {
|
|
|
620
614
|
eventName: `Appointment: ${procedure.name} at ${clinicData.name}`,
|
|
621
615
|
eventLocation: clinicData.location,
|
|
622
616
|
eventTime: eventTimeForCalendarEvents,
|
|
623
|
-
description: data.patientNotes ||
|
|
617
|
+
description: data.patientNotes || "",
|
|
624
618
|
status: initialCalendarEventStatus,
|
|
625
619
|
syncStatus: CalendarSyncStatus.INTERNAL,
|
|
626
620
|
eventType: CalendarEventType.APPOINTMENT,
|
|
@@ -656,7 +650,7 @@ export class BookingAdmin {
|
|
|
656
650
|
eventName: `Appointment: ${procedure.name} for ${patientInfo.fullName} with ${practitionerInfo.name}`,
|
|
657
651
|
eventLocation: clinicData.location,
|
|
658
652
|
eventTime: eventTimeForCalendarEvents,
|
|
659
|
-
description: data.patientNotes ||
|
|
653
|
+
description: data.patientNotes || "",
|
|
660
654
|
status: initialCalendarEventStatus,
|
|
661
655
|
syncStatus: CalendarSyncStatus.INTERNAL,
|
|
662
656
|
eventType: CalendarEventType.APPOINTMENT,
|
|
@@ -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:
|
|
@@ -753,7 +735,11 @@ export class BookingAdmin {
|
|
|
753
735
|
linkedForms: initializedFormsInfo,
|
|
754
736
|
media: [],
|
|
755
737
|
reviewInfo: null,
|
|
756
|
-
finalizedDetails:
|
|
738
|
+
finalizedDetails: {
|
|
739
|
+
by: "",
|
|
740
|
+
at: adminTsNow as any,
|
|
741
|
+
notes: "",
|
|
742
|
+
},
|
|
757
743
|
internalNotes: null,
|
|
758
744
|
cancellationReason: null,
|
|
759
745
|
cancellationTime: null,
|
|
@@ -764,14 +750,8 @@ export class BookingAdmin {
|
|
|
764
750
|
isRecurring: false,
|
|
765
751
|
recurringAppointmentId: null,
|
|
766
752
|
isArchived: false,
|
|
767
|
-
createdAt:
|
|
768
|
-
|
|
769
|
-
adminTsNow.nanoseconds
|
|
770
|
-
),
|
|
771
|
-
updatedAt: new FirebaseClientTimestamp(
|
|
772
|
-
adminTsNow.seconds,
|
|
773
|
-
adminTsNow.nanoseconds
|
|
774
|
-
),
|
|
753
|
+
createdAt: adminTsNow as any,
|
|
754
|
+
updatedAt: adminTsNow as any,
|
|
775
755
|
};
|
|
776
756
|
|
|
777
757
|
batch.set(
|