@blackcode_sa/metaestetics-api 1.7.38 → 1.7.40
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 +67 -3
- package/dist/admin/index.d.ts +67 -3
- package/dist/index.d.mts +354 -14
- package/dist/index.d.ts +354 -14
- package/dist/index.js +180 -150
- package/dist/index.mjs +177 -147
- package/package.json +1 -1
- package/src/index.ts +4 -0
- package/src/types/appointment/index.ts +75 -3
- package/src/validations/appointment.schema.ts +52 -1
package/dist/admin/index.d.mts
CHANGED
|
@@ -1613,6 +1613,70 @@ interface PatientReviewInfo {
|
|
|
1613
1613
|
comment?: string;
|
|
1614
1614
|
reviewedAt: Timestamp;
|
|
1615
1615
|
}
|
|
1616
|
+
/**
|
|
1617
|
+
* Interface for before/after photos and notes per zone
|
|
1618
|
+
*/
|
|
1619
|
+
interface BeforeAfterPerZone {
|
|
1620
|
+
/** URL for before photo or null if not available */
|
|
1621
|
+
before: MediaResource | null;
|
|
1622
|
+
/** URL for after photo or null if not available */
|
|
1623
|
+
after: MediaResource | null;
|
|
1624
|
+
/** Optional note for the zone */
|
|
1625
|
+
note: string | null;
|
|
1626
|
+
}
|
|
1627
|
+
/**
|
|
1628
|
+
* Interface for billing information per zone
|
|
1629
|
+
*/
|
|
1630
|
+
interface BillingPerZone {
|
|
1631
|
+
/** Product name/description */
|
|
1632
|
+
Product: string;
|
|
1633
|
+
/** Product ID */
|
|
1634
|
+
ProductId: string | null;
|
|
1635
|
+
/** Quantity used (can be decimal) */
|
|
1636
|
+
Quantity: number;
|
|
1637
|
+
/** Unit of measurement */
|
|
1638
|
+
UnitOfMeasurement: PricingMeasure;
|
|
1639
|
+
/** Unit price for the product */
|
|
1640
|
+
UnitPrice: number;
|
|
1641
|
+
/** Currency for the unit price */
|
|
1642
|
+
UnitCurency: Currency;
|
|
1643
|
+
/** Calculated subtotal */
|
|
1644
|
+
Subtotal: number;
|
|
1645
|
+
/** Optional billing note */
|
|
1646
|
+
Note: string | null;
|
|
1647
|
+
}
|
|
1648
|
+
/**
|
|
1649
|
+
* Interface for final billing calculations of the appointment
|
|
1650
|
+
*/
|
|
1651
|
+
interface FinalBilling {
|
|
1652
|
+
/** Total of all subtotals from all zones */
|
|
1653
|
+
subtotalAll: number;
|
|
1654
|
+
/** Tax rate as percentage (e.g., 0.20 for 20%) */
|
|
1655
|
+
taxRate: number;
|
|
1656
|
+
/** Calculated tax amount */
|
|
1657
|
+
taxPrice: number;
|
|
1658
|
+
/** Final price including tax */
|
|
1659
|
+
finalPrice: number;
|
|
1660
|
+
/** Total final quantity across all zones */
|
|
1661
|
+
finalQuantity: number;
|
|
1662
|
+
/** Currency for the final billing */
|
|
1663
|
+
currency: Currency;
|
|
1664
|
+
/** Unit of measurement for the final billing */
|
|
1665
|
+
unitOfMeasurement: PricingMeasure;
|
|
1666
|
+
}
|
|
1667
|
+
/**
|
|
1668
|
+
* Interface for appointment metadata containing zone-specific information
|
|
1669
|
+
*/
|
|
1670
|
+
interface AppointmentMetadata {
|
|
1671
|
+
/** Array of selected zones for the appointment */
|
|
1672
|
+
selectedZones: string[] | null;
|
|
1673
|
+
/** Map of zone photos with before/after images and notes */
|
|
1674
|
+
zonePhotos: Record<string, BeforeAfterPerZone> | null;
|
|
1675
|
+
/** Map of billing information per zone */
|
|
1676
|
+
zoneBilling: Record<string, BillingPerZone> | null;
|
|
1677
|
+
/** Final billing calculations for the appointment */
|
|
1678
|
+
finalbilling: FinalBilling | null;
|
|
1679
|
+
}
|
|
1616
1680
|
/**
|
|
1617
1681
|
* Represents a booked appointment, aggregating key information and relevant procedure rules.
|
|
1618
1682
|
*/
|
|
@@ -1692,7 +1756,7 @@ interface Appointment {
|
|
|
1692
1756
|
/** NEW: Flag for soft deletion or archiving */
|
|
1693
1757
|
isArchived?: boolean;
|
|
1694
1758
|
/** NEW: Metadata for the appointment - used for area selection and photos */
|
|
1695
|
-
metadata?:
|
|
1759
|
+
metadata?: AppointmentMetadata;
|
|
1696
1760
|
}
|
|
1697
1761
|
/**
|
|
1698
1762
|
* Data needed to create a new Appointment
|
|
@@ -1761,7 +1825,7 @@ interface UpdateAppointmentData {
|
|
|
1761
1825
|
isArchived?: boolean;
|
|
1762
1826
|
updatedAt?: FieldValue;
|
|
1763
1827
|
/** NEW: For updating metadata */
|
|
1764
|
-
metadata?:
|
|
1828
|
+
metadata?: AppointmentMetadata;
|
|
1765
1829
|
}
|
|
1766
1830
|
/**
|
|
1767
1831
|
* Parameters for searching appointments
|
|
@@ -3255,4 +3319,4 @@ declare class AppointmentMailingService extends BaseMailingService {
|
|
|
3255
3319
|
*/
|
|
3256
3320
|
declare function freeConsultationInfrastructure(db?: admin.firestore.Firestore): Promise<boolean>;
|
|
3257
3321
|
|
|
3258
|
-
export { APPOINTMENTS_COLLECTION, type Appointment, AppointmentAggregationService, type AppointmentCancellationEmailData, type AppointmentConfirmationEmailData, type AppointmentEmailDataBase, AppointmentMailingService, type AppointmentMediaItem, type AppointmentReminderNotification, type AppointmentRequestedEmailData, type AppointmentRescheduledProposalEmailData, AppointmentStatus, type AvailableSlot, BaseMailingService, type BaseNotification, BookingAdmin, BookingAvailabilityCalculator, type BookingAvailabilityRequest, type BookingAvailabilityResponse, CalendarAdminService, type Clinic, type ClinicAdminNotificationData, ClinicAggregationService, type ClinicInfo, type ClinicLocation, type CreateAppointmentData, type CreateAppointmentHttpData, type DoctorInfo, DocumentManagerAdminService, type ExistingPractitionerInviteEmailData, ExistingPractitionerInviteMailingService, type FilledDocument, FilledFormsAggregationService, type InitializeAppointmentFormsResult, type LinkedFormInfo, Logger, MediaType, NOTIFICATIONS_COLLECTION, type Notification, NotificationStatus, NotificationType, NotificationsAdmin, type OrchestrateAppointmentCreationData, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, type PatientProfile as Patient, PatientAggregationService, PatientInstructionStatus, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, PatientRequirementsAdminService, type PatientReviewInfo, PaymentStatus, type PostRequirementNotification, type Practitioner, PractitionerAggregationService, type PractitionerInvite, PractitionerInviteAggregationService, PractitionerInviteMailingService, PractitionerInviteStatus, type PractitionerToken, PractitionerTokenStatus, type PreRequirementNotification, type Procedure, ProcedureAggregationService, type ProcedureExtendedInfo, type ProcedureSummaryInfo, type Review, type ReviewAddedEmailData, type ReviewRequestEmailData, ReviewsAggregationService, type SearchAppointmentsParams, type TimeInterval, type UpdateAppointmentData, UserRole, freeConsultationInfrastructure };
|
|
3322
|
+
export { APPOINTMENTS_COLLECTION, type Appointment, AppointmentAggregationService, type AppointmentCancellationEmailData, type AppointmentConfirmationEmailData, type AppointmentEmailDataBase, AppointmentMailingService, type AppointmentMediaItem, type AppointmentMetadata, type AppointmentReminderNotification, type AppointmentRequestedEmailData, type AppointmentRescheduledProposalEmailData, AppointmentStatus, type AvailableSlot, BaseMailingService, type BaseNotification, type BeforeAfterPerZone, type BillingPerZone, BookingAdmin, BookingAvailabilityCalculator, type BookingAvailabilityRequest, type BookingAvailabilityResponse, CalendarAdminService, type Clinic, type ClinicAdminNotificationData, ClinicAggregationService, type ClinicInfo, type ClinicLocation, type CreateAppointmentData, type CreateAppointmentHttpData, type DoctorInfo, DocumentManagerAdminService, type ExistingPractitionerInviteEmailData, ExistingPractitionerInviteMailingService, type FilledDocument, FilledFormsAggregationService, type FinalBilling, type InitializeAppointmentFormsResult, type LinkedFormInfo, Logger, MediaType, NOTIFICATIONS_COLLECTION, type Notification, NotificationStatus, NotificationType, NotificationsAdmin, type OrchestrateAppointmentCreationData, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, type PatientProfile as Patient, PatientAggregationService, PatientInstructionStatus, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, PatientRequirementsAdminService, type PatientReviewInfo, PaymentStatus, type PostRequirementNotification, type Practitioner, PractitionerAggregationService, type PractitionerInvite, PractitionerInviteAggregationService, PractitionerInviteMailingService, PractitionerInviteStatus, type PractitionerToken, PractitionerTokenStatus, type PreRequirementNotification, type Procedure, ProcedureAggregationService, type ProcedureExtendedInfo, type ProcedureSummaryInfo, type Review, type ReviewAddedEmailData, type ReviewRequestEmailData, ReviewsAggregationService, type SearchAppointmentsParams, type TimeInterval, type UpdateAppointmentData, UserRole, freeConsultationInfrastructure };
|
package/dist/admin/index.d.ts
CHANGED
|
@@ -1613,6 +1613,70 @@ interface PatientReviewInfo {
|
|
|
1613
1613
|
comment?: string;
|
|
1614
1614
|
reviewedAt: Timestamp;
|
|
1615
1615
|
}
|
|
1616
|
+
/**
|
|
1617
|
+
* Interface for before/after photos and notes per zone
|
|
1618
|
+
*/
|
|
1619
|
+
interface BeforeAfterPerZone {
|
|
1620
|
+
/** URL for before photo or null if not available */
|
|
1621
|
+
before: MediaResource | null;
|
|
1622
|
+
/** URL for after photo or null if not available */
|
|
1623
|
+
after: MediaResource | null;
|
|
1624
|
+
/** Optional note for the zone */
|
|
1625
|
+
note: string | null;
|
|
1626
|
+
}
|
|
1627
|
+
/**
|
|
1628
|
+
* Interface for billing information per zone
|
|
1629
|
+
*/
|
|
1630
|
+
interface BillingPerZone {
|
|
1631
|
+
/** Product name/description */
|
|
1632
|
+
Product: string;
|
|
1633
|
+
/** Product ID */
|
|
1634
|
+
ProductId: string | null;
|
|
1635
|
+
/** Quantity used (can be decimal) */
|
|
1636
|
+
Quantity: number;
|
|
1637
|
+
/** Unit of measurement */
|
|
1638
|
+
UnitOfMeasurement: PricingMeasure;
|
|
1639
|
+
/** Unit price for the product */
|
|
1640
|
+
UnitPrice: number;
|
|
1641
|
+
/** Currency for the unit price */
|
|
1642
|
+
UnitCurency: Currency;
|
|
1643
|
+
/** Calculated subtotal */
|
|
1644
|
+
Subtotal: number;
|
|
1645
|
+
/** Optional billing note */
|
|
1646
|
+
Note: string | null;
|
|
1647
|
+
}
|
|
1648
|
+
/**
|
|
1649
|
+
* Interface for final billing calculations of the appointment
|
|
1650
|
+
*/
|
|
1651
|
+
interface FinalBilling {
|
|
1652
|
+
/** Total of all subtotals from all zones */
|
|
1653
|
+
subtotalAll: number;
|
|
1654
|
+
/** Tax rate as percentage (e.g., 0.20 for 20%) */
|
|
1655
|
+
taxRate: number;
|
|
1656
|
+
/** Calculated tax amount */
|
|
1657
|
+
taxPrice: number;
|
|
1658
|
+
/** Final price including tax */
|
|
1659
|
+
finalPrice: number;
|
|
1660
|
+
/** Total final quantity across all zones */
|
|
1661
|
+
finalQuantity: number;
|
|
1662
|
+
/** Currency for the final billing */
|
|
1663
|
+
currency: Currency;
|
|
1664
|
+
/** Unit of measurement for the final billing */
|
|
1665
|
+
unitOfMeasurement: PricingMeasure;
|
|
1666
|
+
}
|
|
1667
|
+
/**
|
|
1668
|
+
* Interface for appointment metadata containing zone-specific information
|
|
1669
|
+
*/
|
|
1670
|
+
interface AppointmentMetadata {
|
|
1671
|
+
/** Array of selected zones for the appointment */
|
|
1672
|
+
selectedZones: string[] | null;
|
|
1673
|
+
/** Map of zone photos with before/after images and notes */
|
|
1674
|
+
zonePhotos: Record<string, BeforeAfterPerZone> | null;
|
|
1675
|
+
/** Map of billing information per zone */
|
|
1676
|
+
zoneBilling: Record<string, BillingPerZone> | null;
|
|
1677
|
+
/** Final billing calculations for the appointment */
|
|
1678
|
+
finalbilling: FinalBilling | null;
|
|
1679
|
+
}
|
|
1616
1680
|
/**
|
|
1617
1681
|
* Represents a booked appointment, aggregating key information and relevant procedure rules.
|
|
1618
1682
|
*/
|
|
@@ -1692,7 +1756,7 @@ interface Appointment {
|
|
|
1692
1756
|
/** NEW: Flag for soft deletion or archiving */
|
|
1693
1757
|
isArchived?: boolean;
|
|
1694
1758
|
/** NEW: Metadata for the appointment - used for area selection and photos */
|
|
1695
|
-
metadata?:
|
|
1759
|
+
metadata?: AppointmentMetadata;
|
|
1696
1760
|
}
|
|
1697
1761
|
/**
|
|
1698
1762
|
* Data needed to create a new Appointment
|
|
@@ -1761,7 +1825,7 @@ interface UpdateAppointmentData {
|
|
|
1761
1825
|
isArchived?: boolean;
|
|
1762
1826
|
updatedAt?: FieldValue;
|
|
1763
1827
|
/** NEW: For updating metadata */
|
|
1764
|
-
metadata?:
|
|
1828
|
+
metadata?: AppointmentMetadata;
|
|
1765
1829
|
}
|
|
1766
1830
|
/**
|
|
1767
1831
|
* Parameters for searching appointments
|
|
@@ -3255,4 +3319,4 @@ declare class AppointmentMailingService extends BaseMailingService {
|
|
|
3255
3319
|
*/
|
|
3256
3320
|
declare function freeConsultationInfrastructure(db?: admin.firestore.Firestore): Promise<boolean>;
|
|
3257
3321
|
|
|
3258
|
-
export { APPOINTMENTS_COLLECTION, type Appointment, AppointmentAggregationService, type AppointmentCancellationEmailData, type AppointmentConfirmationEmailData, type AppointmentEmailDataBase, AppointmentMailingService, type AppointmentMediaItem, type AppointmentReminderNotification, type AppointmentRequestedEmailData, type AppointmentRescheduledProposalEmailData, AppointmentStatus, type AvailableSlot, BaseMailingService, type BaseNotification, BookingAdmin, BookingAvailabilityCalculator, type BookingAvailabilityRequest, type BookingAvailabilityResponse, CalendarAdminService, type Clinic, type ClinicAdminNotificationData, ClinicAggregationService, type ClinicInfo, type ClinicLocation, type CreateAppointmentData, type CreateAppointmentHttpData, type DoctorInfo, DocumentManagerAdminService, type ExistingPractitionerInviteEmailData, ExistingPractitionerInviteMailingService, type FilledDocument, FilledFormsAggregationService, type InitializeAppointmentFormsResult, type LinkedFormInfo, Logger, MediaType, NOTIFICATIONS_COLLECTION, type Notification, NotificationStatus, NotificationType, NotificationsAdmin, type OrchestrateAppointmentCreationData, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, type PatientProfile as Patient, PatientAggregationService, PatientInstructionStatus, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, PatientRequirementsAdminService, type PatientReviewInfo, PaymentStatus, type PostRequirementNotification, type Practitioner, PractitionerAggregationService, type PractitionerInvite, PractitionerInviteAggregationService, PractitionerInviteMailingService, PractitionerInviteStatus, type PractitionerToken, PractitionerTokenStatus, type PreRequirementNotification, type Procedure, ProcedureAggregationService, type ProcedureExtendedInfo, type ProcedureSummaryInfo, type Review, type ReviewAddedEmailData, type ReviewRequestEmailData, ReviewsAggregationService, type SearchAppointmentsParams, type TimeInterval, type UpdateAppointmentData, UserRole, freeConsultationInfrastructure };
|
|
3322
|
+
export { APPOINTMENTS_COLLECTION, type Appointment, AppointmentAggregationService, type AppointmentCancellationEmailData, type AppointmentConfirmationEmailData, type AppointmentEmailDataBase, AppointmentMailingService, type AppointmentMediaItem, type AppointmentMetadata, type AppointmentReminderNotification, type AppointmentRequestedEmailData, type AppointmentRescheduledProposalEmailData, AppointmentStatus, type AvailableSlot, BaseMailingService, type BaseNotification, type BeforeAfterPerZone, type BillingPerZone, BookingAdmin, BookingAvailabilityCalculator, type BookingAvailabilityRequest, type BookingAvailabilityResponse, CalendarAdminService, type Clinic, type ClinicAdminNotificationData, ClinicAggregationService, type ClinicInfo, type ClinicLocation, type CreateAppointmentData, type CreateAppointmentHttpData, type DoctorInfo, DocumentManagerAdminService, type ExistingPractitionerInviteEmailData, ExistingPractitionerInviteMailingService, type FilledDocument, FilledFormsAggregationService, type FinalBilling, type InitializeAppointmentFormsResult, type LinkedFormInfo, Logger, MediaType, NOTIFICATIONS_COLLECTION, type Notification, NotificationStatus, NotificationType, NotificationsAdmin, type OrchestrateAppointmentCreationData, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, type PatientProfile as Patient, PatientAggregationService, PatientInstructionStatus, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, PatientRequirementsAdminService, type PatientReviewInfo, PaymentStatus, type PostRequirementNotification, type Practitioner, PractitionerAggregationService, type PractitionerInvite, PractitionerInviteAggregationService, PractitionerInviteMailingService, PractitionerInviteStatus, type PractitionerToken, PractitionerTokenStatus, type PreRequirementNotification, type Procedure, ProcedureAggregationService, type ProcedureExtendedInfo, type ProcedureSummaryInfo, type Review, type ReviewAddedEmailData, type ReviewRequestEmailData, ReviewsAggregationService, type SearchAppointmentsParams, type TimeInterval, type UpdateAppointmentData, UserRole, freeConsultationInfrastructure };
|