@blackcode_sa/metaestetics-api 1.14.63 → 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.
@@ -1978,195 +1978,139 @@ var patientAppointmentConfirmedTemplate = `
1978
1978
  <meta charset="UTF-8">
1979
1979
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
1980
1980
  <title>Appointment Confirmed</title>
1981
- <style>
1982
- body {
1983
- margin: 0;
1984
- padding: 0;
1985
- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
1986
- background: linear-gradient(135deg, #a48a76 0%, #67574A 100%);
1987
- min-height: 100vh;
1988
- }
1989
- .email-container {
1990
- max-width: 600px;
1991
- margin: 0 auto;
1992
- background: #ffffff;
1993
- border-radius: 20px;
1994
- overflow: hidden;
1995
- box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
1996
- margin-top: 40px;
1997
- margin-bottom: 40px;
1998
- }
1999
- .header {
2000
- background: linear-gradient(135deg, #a48a76 0%, #67574A 100%);
2001
- padding: 40px 30px;
2002
- text-align: center;
2003
- color: white;
2004
- }
2005
- .header h1 {
2006
- margin: 0;
2007
- font-size: 28px;
2008
- font-weight: 300;
2009
- letter-spacing: 1px;
2010
- }
2011
- .header .subtitle {
2012
- margin: 10px 0 0 0;
2013
- font-size: 16px;
2014
- opacity: 0.9;
2015
- font-weight: 300;
2016
- }
2017
- .content {
2018
- padding: 40px 30px;
2019
- }
2020
- .greeting {
2021
- font-size: 18px;
2022
- color: #333;
2023
- margin-bottom: 25px;
2024
- font-weight: 400;
2025
- }
2026
- .appointment-card {
2027
- background: linear-gradient(135deg, #f8f6f5 0%, #f5f3f2 100%);
2028
- border-radius: 15px;
2029
- padding: 30px;
2030
- margin: 25px 0;
2031
- border-left: 5px solid #a48a76;
2032
- }
2033
- .appointment-title {
2034
- font-size: 20px;
2035
- color: #a48a76;
2036
- margin-bottom: 20px;
2037
- font-weight: 600;
2038
- }
2039
- .appointment-details {
2040
- display: grid;
2041
- gap: 15px;
2042
- }
2043
- .detail-row {
2044
- display: flex;
2045
- align-items: center;
2046
- padding: 8px 0;
2047
- }
2048
- .detail-label {
2049
- font-weight: 600;
2050
- color: #555;
2051
- min-width: 120px;
2052
- font-size: 14px;
2053
- }
2054
- .detail-value {
2055
- color: #333;
2056
- font-size: 16px;
2057
- font-weight: 500;
2058
- }
2059
- .procedure-name {
2060
- color: #67574A;
2061
- font-weight: 600;
2062
- }
2063
- .clinic-name {
2064
- color: #a48a76;
2065
- font-weight: 600;
2066
- }
2067
- .success-icon {
2068
- text-align: center;
2069
- margin: 20px 0;
2070
- font-size: 48px;
2071
- }
2072
- .footer {
2073
- background: #f8f9fa;
2074
- padding: 25px 30px;
2075
- text-align: center;
2076
- color: #666;
2077
- font-size: 14px;
2078
- border-top: 1px solid #eee;
2079
- }
2080
- .logo {
2081
- font-size: 24px;
2082
- font-weight: 700;
2083
- color: white;
2084
- margin-bottom: 5px;
2085
- }
2086
- .divider {
2087
- height: 2px;
2088
- background: linear-gradient(90deg, #a48a76, #67574A);
2089
- margin: 25px 0;
2090
- border-radius: 1px;
2091
- }
2092
- .thank-you {
2093
- background: linear-gradient(135deg, #f0ede8 0%, #ebe6e0 100%);
2094
- border-radius: 15px;
2095
- padding: 25px;
2096
- margin: 25px 0;
2097
- text-align: center;
2098
- border-left: 5px solid #4CAF50;
2099
- }
2100
- </style>
1981
+ <!--[if mso]>
1982
+ <noscript>
1983
+ <xml>
1984
+ <o:OfficeDocumentSettings>
1985
+ <o:PixelsPerInch>96</o:PixelsPerInch>
1986
+ </o:OfficeDocumentSettings>
1987
+ </xml>
1988
+ </noscript>
1989
+ <![endif]-->
2101
1990
  </head>
2102
- <body>
2103
- <div class="email-container">
2104
- <div class="header">
2105
- <div class="logo">MetaEstetics</div>
2106
- <h1>Appointment Confirmed</h1>
2107
- <div class="subtitle">Your Beauty Journey Awaits</div>
2108
- </div>
2109
-
2110
- <div class="content">
2111
- <div class="success-icon">\u2728</div>
2112
-
2113
- <div class="greeting">
2114
- Dear <strong>{{patientName}}</strong>,
2115
- </div>
2116
-
2117
- <p style="color: #555; font-size: 16px; line-height: 1.6; margin-bottom: 25px;">
2118
- We're delighted to confirm your appointment! Your journey to enhanced beauty and confidence is just around the corner.
2119
- </p>
2120
-
2121
- <div class="appointment-card">
2122
- <div class="appointment-title">\u{1F4C5} Your Appointment Details</div>
2123
- <div class="appointment-details">
2124
- <div class="detail-row">
2125
- <div class="detail-label">Procedure:</div>
2126
- <div class="detail-value procedure-name">{{procedureName}}</div>
2127
- </div>
2128
- <div class="detail-row">
2129
- <div class="detail-label">Date:</div>
2130
- <div class="detail-value">{{appointmentDate}}</div>
2131
- </div>
2132
- <div class="detail-row">
2133
- <div class="detail-label">Time:</div>
2134
- <div class="detail-value">{{appointmentTime}}</div>
2135
- </div>
2136
- <div class="detail-row">
2137
- <div class="detail-label">Practitioner:</div>
2138
- <div class="detail-value">{{practitionerName}}</div>
2139
- </div>
2140
- <div class="detail-row">
2141
- <div class="detail-label">Location:</div>
2142
- <div class="detail-value clinic-name">{{clinicName}}</div>
2143
- </div>
2144
- </div>
2145
- </div>
2146
-
2147
- <div class="divider"></div>
2148
-
2149
- <div class="thank-you">
2150
- <h3 style="margin: 0 0 10px 0; color: #4caf50; font-weight: 600;">Thank You for Choosing MetaEstetics!</h3>
2151
- <p style="margin: 0; color: #555; font-size: 14px;">
2152
- We look forward to providing you with exceptional care and outstanding results.
2153
- </p>
2154
- </div>
2155
-
2156
- <p style="color: #555; font-size: 14px; line-height: 1.6; margin-top: 25px;">
2157
- <strong>Important:</strong> Please arrive 15 minutes early for your appointment. If you need to reschedule or have any questions, please contact us as soon as possible.
2158
- </p>
2159
- </div>
2160
-
2161
- <div class="footer">
2162
- <p style="margin: 0 0 10px 0;">
2163
- <strong>MetaEstetics</strong> - Premium Aesthetic Services
2164
- </p>
2165
- <p style="margin: 0; font-size: 12px; color: #999;">
2166
- This is an automated message. Please do not reply to this email.
2167
- </p>
2168
- </div>
2169
- </div>
1991
+ <body style="margin: 0; padding: 0; background-color: #f8f6f5; font-family: Georgia, 'Times New Roman', serif;">
1992
+ <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="background-color: #f8f6f5;">
1993
+ <tr>
1994
+ <td align="center" style="padding: 40px 20px;">
1995
+ <table role="presentation" width="600" cellspacing="0" cellpadding="0" border="0" style="max-width: 600px; background-color: #ffffff; border-radius: 2px; box-shadow: 0 1px 3px rgba(103, 87, 74, 0.08);">
1996
+
1997
+ <!-- Header -->
1998
+ <tr>
1999
+ <td style="padding: 48px 48px 32px 48px; border-bottom: 1px solid #f0ebe6;">
2000
+ <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0">
2001
+ <tr>
2002
+ <td>
2003
+ <h1 style="margin: 0; font-size: 24px; font-weight: 400; color: #67574A; letter-spacing: 2px; text-transform: uppercase; font-family: Georgia, 'Times New Roman', serif;">MetaEstetics</h1>
2004
+ </td>
2005
+ </tr>
2006
+ </table>
2007
+ </td>
2008
+ </tr>
2009
+
2010
+ <!-- Confirmed Banner -->
2011
+ <tr>
2012
+ <td style="padding: 0;">
2013
+ <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="background-color: #00BB38;">
2014
+ <tr>
2015
+ <td style="padding: 20px 48px;">
2016
+ <p style="margin: 0; font-size: 13px; font-weight: 600; color: #ffffff; letter-spacing: 1.5px; text-transform: uppercase; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">Appointment Confirmed</p>
2017
+ </td>
2018
+ </tr>
2019
+ </table>
2020
+ </td>
2021
+ </tr>
2022
+
2023
+ <!-- Main Content -->
2024
+ <tr>
2025
+ <td style="padding: 40px 48px;">
2026
+
2027
+ <!-- Greeting -->
2028
+ <p style="margin: 0 0 24px 0; font-size: 17px; color: #333333; line-height: 1.6; font-family: Georgia, 'Times New Roman', serif;">
2029
+ Dear {{patientName}},
2030
+ </p>
2031
+
2032
+ <p style="margin: 0 0 32px 0; font-size: 16px; color: #555555; line-height: 1.7; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">
2033
+ Your appointment has been confirmed. We look forward to seeing you.
2034
+ </p>
2035
+
2036
+ <!-- Appointment Details Card -->
2037
+ <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-bottom: 32px; background-color: #faf9f7; border-left: 3px solid #00BB38;">
2038
+ <tr>
2039
+ <td style="padding: 24px;">
2040
+ <p style="margin: 0 0 4px 0; font-size: 11px; font-weight: 600; color: #868686; letter-spacing: 1px; text-transform: uppercase; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">Procedure</p>
2041
+ <p style="margin: 0 0 20px 0; font-size: 18px; color: #67574A; font-weight: 500; font-family: Georgia, 'Times New Roman', serif;">{{procedureName}}</p>
2042
+
2043
+ <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0">
2044
+ <tr>
2045
+ <td style="padding-bottom: 16px;">
2046
+ <p style="margin: 0 0 2px 0; font-size: 11px; color: #868686; text-transform: uppercase; letter-spacing: 0.5px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">Date & Time</p>
2047
+ <p style="margin: 0; font-size: 15px; color: #333333; font-weight: 500; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">{{appointmentDate}}</p>
2048
+ <p style="margin: 4px 0 0 0; font-size: 14px; color: #67574A; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">{{appointmentTime}}</p>
2049
+ </td>
2050
+ </tr>
2051
+ <tr>
2052
+ <td style="padding-bottom: 16px;">
2053
+ <p style="margin: 0 0 2px 0; font-size: 11px; color: #868686; text-transform: uppercase; letter-spacing: 0.5px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">Practitioner</p>
2054
+ <p style="margin: 0; font-size: 15px; color: #333333; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">{{practitionerName}}</p>
2055
+ </td>
2056
+ </tr>
2057
+ <tr>
2058
+ <td>
2059
+ <p style="margin: 0 0 2px 0; font-size: 11px; color: #868686; text-transform: uppercase; letter-spacing: 0.5px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">Location</p>
2060
+ <p style="margin: 0; font-size: 15px; color: #333333; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">{{clinicName}}</p>
2061
+ </td>
2062
+ </tr>
2063
+ </table>
2064
+ </td>
2065
+ </tr>
2066
+ </table>
2067
+
2068
+ <!-- Divider -->
2069
+ <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-bottom: 32px;">
2070
+ <tr>
2071
+ <td style="height: 1px; background-color: #e8e4df;"></td>
2072
+ </tr>
2073
+ </table>
2074
+
2075
+ <!-- Important Notice -->
2076
+ <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-bottom: 24px;">
2077
+ <tr>
2078
+ <td style="padding: 20px 24px; background-color: #faf9f7; border-left: 3px solid #a48a76;">
2079
+ <p style="margin: 0 0 8px 0; font-size: 13px; font-weight: 600; color: #67574A; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">Before Your Visit</p>
2080
+ <p style="margin: 0; font-size: 14px; color: #555555; line-height: 1.6; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">
2081
+ Please arrive 15 minutes early. If you need to reschedule or cancel, contact us through the MetaEstetics app.
2082
+ </p>
2083
+ </td>
2084
+ </tr>
2085
+ </table>
2086
+
2087
+ <!-- Thank You -->
2088
+ <p style="margin: 0; font-size: 14px; color: #868686; line-height: 1.7; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">
2089
+ Thank you for choosing {{clinicName}}. We look forward to providing you with exceptional care.
2090
+ </p>
2091
+
2092
+ </td>
2093
+ </tr>
2094
+
2095
+ <!-- Footer -->
2096
+ <tr>
2097
+ <td style="padding: 32px 48px; background-color: #faf9f7; border-top: 1px solid #f0ebe6;">
2098
+ <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0">
2099
+ <tr>
2100
+ <td>
2101
+ <p style="margin: 0 0 8px 0; font-size: 14px; font-weight: 500; color: #67574A; font-family: Georgia, 'Times New Roman', serif;">{{clinicName}}</p>
2102
+ <p style="margin: 0 0 16px 0; font-size: 13px; color: #868686; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">Premium Aesthetic Services</p>
2103
+ <p style="margin: 0; font-size: 11px; color: #aaaaaa; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">This is an automated message from MetaEstetics. Please do not reply directly to this email.</p>
2104
+ </td>
2105
+ </tr>
2106
+ </table>
2107
+ </td>
2108
+ </tr>
2109
+
2110
+ </table>
2111
+ </td>
2112
+ </tr>
2113
+ </table>
2170
2114
  </body>
2171
2115
  </html>
2172
2116
  `;
@@ -2499,27 +2443,20 @@ var appointmentCancelledTemplate = `
2499
2443
  </table>
2500
2444
 
2501
2445
  <!-- Rebook Section -->
2502
- <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-bottom: 32px; background-color: #f0faf4; border-left: 3px solid #00BB38;">
2446
+ <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-bottom: 24px; background-color: #f0faf4; border-left: 3px solid #00BB38;">
2503
2447
  <tr>
2504
- <td style="padding: 28px;">
2505
- <p style="margin: 0 0 12px 0; font-size: 15px; font-weight: 600; color: #00BB38; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">Book a New Appointment</p>
2506
- <p style="margin: 0 0 20px 0; font-size: 14px; color: #555555; line-height: 1.7; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">
2507
- We'd love to see you. Open the MetaEstetics app to browse available times and book a new appointment.
2448
+ <td style="padding: 24px;">
2449
+ <p style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600; color: #00BB38; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">Book a New Appointment</p>
2450
+ <p style="margin: 0; font-size: 14px; color: #555555; line-height: 1.6; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">
2451
+ We'd love to see you again. Open the MetaEstetics app to browse available times and book a new appointment.
2508
2452
  </p>
2509
- <table role="presentation" cellspacing="0" cellpadding="0" border="0">
2510
- <tr>
2511
- <td style="background-color: #67574A; border-radius: 2px;">
2512
- <a href="#" style="display: inline-block; padding: 14px 32px; font-size: 13px; font-weight: 600; color: #ffffff; text-decoration: none; letter-spacing: 0.5px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">Book New Appointment</a>
2513
- </td>
2514
- </tr>
2515
- </table>
2516
2453
  </td>
2517
2454
  </tr>
2518
2455
  </table>
2519
2456
 
2520
2457
  <!-- Support Info -->
2521
2458
  <p style="margin: 0; font-size: 13px; color: #868686; line-height: 1.7; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">
2522
- If you have any questions about this cancellation, please contact {{clinicName}} directly through the app.
2459
+ If you have any questions about this cancellation, please contact {{clinicName}} through the MetaEstetics app.
2523
2460
  </p>
2524
2461
 
2525
2462
  </td>
@@ -2659,31 +2596,18 @@ var appointmentRescheduledProposalTemplate = `
2659
2596
  <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-bottom: 32px; background-color: #faf9f7;">
2660
2597
  <tr>
2661
2598
  <td style="padding: 28px;">
2662
- <p style="margin: 0 0 16px 0; font-size: 15px; font-weight: 600; color: #67574A; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">How to Respond</p>
2663
- <p style="margin: 0 0 16px 0; font-size: 14px; color: #555555; line-height: 1.7; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">
2599
+ <p style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600; color: #67574A; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">How to Respond</p>
2600
+ <p style="margin: 0; font-size: 14px; color: #555555; line-height: 1.6; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">
2664
2601
  Open the MetaEstetics app to accept or decline this reschedule request. Your appointment will remain pending until you respond.
2665
2602
  </p>
2666
- <table role="presentation" cellspacing="0" cellpadding="0" border="0">
2667
- <tr>
2668
- <td style="background-color: #67574A; border-radius: 2px;">
2669
- <a href="#" style="display: inline-block; padding: 14px 32px; font-size: 13px; font-weight: 600; color: #ffffff; text-decoration: none; letter-spacing: 0.5px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">Open App</a>
2670
- </td>
2671
- </tr>
2672
- </table>
2673
2603
  </td>
2674
2604
  </tr>
2675
2605
  </table>
2676
2606
 
2677
- <!-- Pending Notice -->
2678
- <table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0">
2679
- <tr>
2680
- <td style="padding: 16px 20px; background-color: #fff8f0; border: 1px solid #f0e6d9; border-radius: 2px;">
2681
- <p style="margin: 0; font-size: 13px; color: #a48a76; line-height: 1.6; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">
2682
- <strong>Status:</strong> Pending your response. Please respond as soon as possible so we can confirm your appointment.
2683
- </p>
2684
- </td>
2685
- </tr>
2686
- </table>
2607
+ <!-- Response Notice -->
2608
+ <p style="margin: 0; font-size: 13px; color: #868686; line-height: 1.6; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;">
2609
+ Please respond at your earliest convenience so we can finalize your appointment. If you have questions, contact {{clinicName}} through the app.
2610
+ </p>
2687
2611
 
2688
2612
  </td>
2689
2613
  </tr>
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, reason: string): Promise<Appointment>;
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, reason: string): Promise<Appointment>;
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, reason) {
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: reason,
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, reason) {
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: reason,
6008
+ cancellationReason,
6005
6009
  canceledBy: "clinic"
6006
6010
  });
6007
6011
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@blackcode_sa/metaestetics-api",
3
3
  "private": false,
4
- "version": "1.14.63",
4
+ "version": "1.14.65",
5
5
  "description": "Firebase authentication service with anonymous upgrade support",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.mjs",