@blackcode_sa/metaestetics-api 1.15.2 → 1.15.3
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.d.mts +8 -0
- package/dist/admin/index.d.ts +8 -0
- package/dist/index.d.mts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +4993 -4899
- package/dist/index.mjs +5158 -5064
- package/package.json +1 -1
- package/src/services/appointment/appointment.service.ts +78 -1
- package/src/services/appointment/utils/appointment.utils.ts +22 -13
- package/src/services/appointment/utils/zone-management.utils.ts +62 -9
- package/src/services/patient/utils/clinic.utils.ts +5 -5
- package/src/types/appointment/index.ts +8 -0
package/dist/admin/index.d.mts
CHANGED
|
@@ -1853,6 +1853,14 @@ interface BillingPerZone {
|
|
|
1853
1853
|
interface FinalBilling {
|
|
1854
1854
|
/** Total of all subtotals from all zones */
|
|
1855
1855
|
subtotalAll: number;
|
|
1856
|
+
/** Overall discount applied to the subtotal */
|
|
1857
|
+
discount?: {
|
|
1858
|
+
type: 'percentage' | 'fixed';
|
|
1859
|
+
value: number;
|
|
1860
|
+
amount: number;
|
|
1861
|
+
};
|
|
1862
|
+
/** Subtotal after discount (subtotalAll - discount.amount) */
|
|
1863
|
+
discountedSubtotal?: number;
|
|
1856
1864
|
/** Tax rate as percentage (e.g., 0.20 for 20%) */
|
|
1857
1865
|
taxRate: number;
|
|
1858
1866
|
/** Calculated tax amount */
|
package/dist/admin/index.d.ts
CHANGED
|
@@ -1853,6 +1853,14 @@ interface BillingPerZone {
|
|
|
1853
1853
|
interface FinalBilling {
|
|
1854
1854
|
/** Total of all subtotals from all zones */
|
|
1855
1855
|
subtotalAll: number;
|
|
1856
|
+
/** Overall discount applied to the subtotal */
|
|
1857
|
+
discount?: {
|
|
1858
|
+
type: 'percentage' | 'fixed';
|
|
1859
|
+
value: number;
|
|
1860
|
+
amount: number;
|
|
1861
|
+
};
|
|
1862
|
+
/** Subtotal after discount (subtotalAll - discount.amount) */
|
|
1863
|
+
discountedSubtotal?: number;
|
|
1856
1864
|
/** Tax rate as percentage (e.g., 0.20 for 20%) */
|
|
1857
1865
|
taxRate: number;
|
|
1858
1866
|
/** Calculated tax amount */
|
package/dist/index.d.mts
CHANGED
|
@@ -5976,6 +5976,14 @@ interface BillingPerZone {
|
|
|
5976
5976
|
interface FinalBilling {
|
|
5977
5977
|
/** Total of all subtotals from all zones */
|
|
5978
5978
|
subtotalAll: number;
|
|
5979
|
+
/** Overall discount applied to the subtotal */
|
|
5980
|
+
discount?: {
|
|
5981
|
+
type: 'percentage' | 'fixed';
|
|
5982
|
+
value: number;
|
|
5983
|
+
amount: number;
|
|
5984
|
+
};
|
|
5985
|
+
/** Subtotal after discount (subtotalAll - discount.amount) */
|
|
5986
|
+
discountedSubtotal?: number;
|
|
5979
5987
|
/** Tax rate as percentage (e.g., 0.20 for 20%) */
|
|
5980
5988
|
taxRate: number;
|
|
5981
5989
|
/** Calculated tax amount */
|
|
@@ -7970,6 +7978,17 @@ declare class AppointmentService extends BaseService {
|
|
|
7970
7978
|
* @returns The updated appointment with recalculated billing
|
|
7971
7979
|
*/
|
|
7972
7980
|
recalculateFinalBilling(appointmentId: string, taxRate?: number): Promise<Appointment>;
|
|
7981
|
+
/**
|
|
7982
|
+
* Applies or removes an overall discount on the appointment total
|
|
7983
|
+
* @param appointmentId ID of the appointment
|
|
7984
|
+
* @param discount Discount to apply (null to remove)
|
|
7985
|
+
* @param taxRate Optional tax rate override
|
|
7986
|
+
* @returns The updated appointment
|
|
7987
|
+
*/
|
|
7988
|
+
applyOverallDiscount(appointmentId: string, discount: {
|
|
7989
|
+
type: 'percentage' | 'fixed';
|
|
7990
|
+
value: number;
|
|
7991
|
+
} | null, taxRate?: number): Promise<Appointment>;
|
|
7973
7992
|
/**
|
|
7974
7993
|
* Adds a recommended procedure to an appointment
|
|
7975
7994
|
* Multiple recommendations of the same procedure are allowed (e.g., touch-up in 2 weeks, full treatment in 3 months)
|
package/dist/index.d.ts
CHANGED
|
@@ -5976,6 +5976,14 @@ interface BillingPerZone {
|
|
|
5976
5976
|
interface FinalBilling {
|
|
5977
5977
|
/** Total of all subtotals from all zones */
|
|
5978
5978
|
subtotalAll: number;
|
|
5979
|
+
/** Overall discount applied to the subtotal */
|
|
5980
|
+
discount?: {
|
|
5981
|
+
type: 'percentage' | 'fixed';
|
|
5982
|
+
value: number;
|
|
5983
|
+
amount: number;
|
|
5984
|
+
};
|
|
5985
|
+
/** Subtotal after discount (subtotalAll - discount.amount) */
|
|
5986
|
+
discountedSubtotal?: number;
|
|
5979
5987
|
/** Tax rate as percentage (e.g., 0.20 for 20%) */
|
|
5980
5988
|
taxRate: number;
|
|
5981
5989
|
/** Calculated tax amount */
|
|
@@ -7970,6 +7978,17 @@ declare class AppointmentService extends BaseService {
|
|
|
7970
7978
|
* @returns The updated appointment with recalculated billing
|
|
7971
7979
|
*/
|
|
7972
7980
|
recalculateFinalBilling(appointmentId: string, taxRate?: number): Promise<Appointment>;
|
|
7981
|
+
/**
|
|
7982
|
+
* Applies or removes an overall discount on the appointment total
|
|
7983
|
+
* @param appointmentId ID of the appointment
|
|
7984
|
+
* @param discount Discount to apply (null to remove)
|
|
7985
|
+
* @param taxRate Optional tax rate override
|
|
7986
|
+
* @returns The updated appointment
|
|
7987
|
+
*/
|
|
7988
|
+
applyOverallDiscount(appointmentId: string, discount: {
|
|
7989
|
+
type: 'percentage' | 'fixed';
|
|
7990
|
+
value: number;
|
|
7991
|
+
} | null, taxRate?: number): Promise<Appointment>;
|
|
7973
7992
|
/**
|
|
7974
7993
|
* Adds a recommended procedure to an appointment
|
|
7975
7994
|
* Multiple recommendations of the same procedure are allowed (e.g., touch-up in 2 weeks, full treatment in 3 months)
|