@blackcode_sa/metaestetics-api 1.14.61 → 1.14.65
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 +418 -781
- package/dist/admin/index.mjs +418 -781
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +6 -2
- package/dist/index.mjs +6 -2
- package/package.json +1 -1
- package/src/admin/mailing/appointment/appointment.mailing.service.ts +430 -793
- package/src/services/appointment/appointment.service.ts +14 -2
package/dist/index.d.mts
CHANGED
|
@@ -7429,8 +7429,10 @@ declare class AppointmentService extends BaseService {
|
|
|
7429
7429
|
cancelAppointmentUser(appointmentId: string, reason: string): Promise<Appointment>;
|
|
7430
7430
|
/**
|
|
7431
7431
|
* Cancels an appointment by an Admin/Clinic.
|
|
7432
|
+
* @param appointmentId - The appointment ID to cancel
|
|
7433
|
+
* @param reasonOrClinicId - Either a cancellation reason string, or clinicId (legacy parameter - will be ignored)
|
|
7432
7434
|
*/
|
|
7433
|
-
cancelAppointmentAdmin(appointmentId: string,
|
|
7435
|
+
cancelAppointmentAdmin(appointmentId: string, reasonOrClinicId?: string): Promise<Appointment>;
|
|
7434
7436
|
/**
|
|
7435
7437
|
* Admin proposes to reschedule an appointment.
|
|
7436
7438
|
* Sets status to RESCHEDULED_BY_CLINIC and updates times.
|
package/dist/index.d.ts
CHANGED
|
@@ -7429,8 +7429,10 @@ declare class AppointmentService extends BaseService {
|
|
|
7429
7429
|
cancelAppointmentUser(appointmentId: string, reason: string): Promise<Appointment>;
|
|
7430
7430
|
/**
|
|
7431
7431
|
* Cancels an appointment by an Admin/Clinic.
|
|
7432
|
+
* @param appointmentId - The appointment ID to cancel
|
|
7433
|
+
* @param reasonOrClinicId - Either a cancellation reason string, or clinicId (legacy parameter - will be ignored)
|
|
7432
7434
|
*/
|
|
7433
|
-
cancelAppointmentAdmin(appointmentId: string,
|
|
7435
|
+
cancelAppointmentAdmin(appointmentId: string, reasonOrClinicId?: string): Promise<Appointment>;
|
|
7434
7436
|
/**
|
|
7435
7437
|
* Admin proposes to reschedule an appointment.
|
|
7436
7438
|
* Sets status to RESCHEDULED_BY_CLINIC and updates times.
|
package/dist/index.js
CHANGED
|
@@ -6109,11 +6109,15 @@ var AppointmentService = class extends BaseService {
|
|
|
6109
6109
|
}
|
|
6110
6110
|
/**
|
|
6111
6111
|
* Cancels an appointment by an Admin/Clinic.
|
|
6112
|
+
* @param appointmentId - The appointment ID to cancel
|
|
6113
|
+
* @param reasonOrClinicId - Either a cancellation reason string, or clinicId (legacy parameter - will be ignored)
|
|
6112
6114
|
*/
|
|
6113
|
-
async cancelAppointmentAdmin(appointmentId,
|
|
6115
|
+
async cancelAppointmentAdmin(appointmentId, reasonOrClinicId) {
|
|
6114
6116
|
console.log(`[APPOINTMENT_SERVICE] Admin canceling appointment: ${appointmentId}`);
|
|
6117
|
+
const isLikelyId = reasonOrClinicId && !reasonOrClinicId.includes(" ") && /^[a-zA-Z0-9_-]+$/.test(reasonOrClinicId) && reasonOrClinicId.length > 15;
|
|
6118
|
+
const cancellationReason = isLikelyId ? void 0 : reasonOrClinicId || void 0;
|
|
6115
6119
|
return this.updateAppointmentStatus(appointmentId, "canceled_clinic" /* CANCELED_CLINIC */, {
|
|
6116
|
-
cancellationReason
|
|
6120
|
+
cancellationReason,
|
|
6117
6121
|
canceledBy: "clinic"
|
|
6118
6122
|
});
|
|
6119
6123
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -5997,11 +5997,15 @@ var AppointmentService = class extends BaseService {
|
|
|
5997
5997
|
}
|
|
5998
5998
|
/**
|
|
5999
5999
|
* Cancels an appointment by an Admin/Clinic.
|
|
6000
|
+
* @param appointmentId - The appointment ID to cancel
|
|
6001
|
+
* @param reasonOrClinicId - Either a cancellation reason string, or clinicId (legacy parameter - will be ignored)
|
|
6000
6002
|
*/
|
|
6001
|
-
async cancelAppointmentAdmin(appointmentId,
|
|
6003
|
+
async cancelAppointmentAdmin(appointmentId, reasonOrClinicId) {
|
|
6002
6004
|
console.log(`[APPOINTMENT_SERVICE] Admin canceling appointment: ${appointmentId}`);
|
|
6005
|
+
const isLikelyId = reasonOrClinicId && !reasonOrClinicId.includes(" ") && /^[a-zA-Z0-9_-]+$/.test(reasonOrClinicId) && reasonOrClinicId.length > 15;
|
|
6006
|
+
const cancellationReason = isLikelyId ? void 0 : reasonOrClinicId || void 0;
|
|
6003
6007
|
return this.updateAppointmentStatus(appointmentId, "canceled_clinic" /* CANCELED_CLINIC */, {
|
|
6004
|
-
cancellationReason
|
|
6008
|
+
cancellationReason,
|
|
6005
6009
|
canceledBy: "clinic"
|
|
6006
6010
|
});
|
|
6007
6011
|
}
|
package/package.json
CHANGED