@blackcode_sa/metaestetics-api 1.15.9 → 1.15.10
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 +9 -0
- package/dist/admin/index.d.ts +9 -0
- package/dist/index.d.mts +15 -12
- package/dist/index.d.ts +15 -12
- package/dist/index.js +17 -11
- package/dist/index.mjs +17 -10
- package/package.json +1 -1
- package/src/config/index.ts +0 -1
- package/src/config/tiers.config.ts +13 -17
- package/src/services/appointment/appointment.service.ts +14 -0
- package/src/types/clinic/index.ts +9 -0
package/dist/admin/index.d.mts
CHANGED
|
@@ -1171,6 +1171,8 @@ interface BillingInfo {
|
|
|
1171
1171
|
currentPeriodStart: Timestamp | null;
|
|
1172
1172
|
currentPeriodEnd: Timestamp | null;
|
|
1173
1173
|
updatedAt: Timestamp;
|
|
1174
|
+
seatCount?: number;
|
|
1175
|
+
seatPriceId?: string;
|
|
1174
1176
|
}
|
|
1175
1177
|
/**
|
|
1176
1178
|
* Enum for billing transaction types
|
|
@@ -1261,6 +1263,12 @@ interface ClinicGroup {
|
|
|
1261
1263
|
completed?: boolean;
|
|
1262
1264
|
step?: number;
|
|
1263
1265
|
};
|
|
1266
|
+
featureTrials?: {
|
|
1267
|
+
analytics?: {
|
|
1268
|
+
startedAt: Timestamp;
|
|
1269
|
+
durationDays: number;
|
|
1270
|
+
};
|
|
1271
|
+
};
|
|
1264
1272
|
}
|
|
1265
1273
|
/**
|
|
1266
1274
|
* Interface for doctor information
|
|
@@ -1303,6 +1311,7 @@ interface Clinic {
|
|
|
1303
1311
|
isActive: boolean;
|
|
1304
1312
|
isVerified: boolean;
|
|
1305
1313
|
logo?: MediaResource | null;
|
|
1314
|
+
acceptingBookings?: boolean;
|
|
1306
1315
|
}
|
|
1307
1316
|
|
|
1308
1317
|
/**
|
package/dist/admin/index.d.ts
CHANGED
|
@@ -1171,6 +1171,8 @@ interface BillingInfo {
|
|
|
1171
1171
|
currentPeriodStart: Timestamp | null;
|
|
1172
1172
|
currentPeriodEnd: Timestamp | null;
|
|
1173
1173
|
updatedAt: Timestamp;
|
|
1174
|
+
seatCount?: number;
|
|
1175
|
+
seatPriceId?: string;
|
|
1174
1176
|
}
|
|
1175
1177
|
/**
|
|
1176
1178
|
* Enum for billing transaction types
|
|
@@ -1261,6 +1263,12 @@ interface ClinicGroup {
|
|
|
1261
1263
|
completed?: boolean;
|
|
1262
1264
|
step?: number;
|
|
1263
1265
|
};
|
|
1266
|
+
featureTrials?: {
|
|
1267
|
+
analytics?: {
|
|
1268
|
+
startedAt: Timestamp;
|
|
1269
|
+
durationDays: number;
|
|
1270
|
+
};
|
|
1271
|
+
};
|
|
1264
1272
|
}
|
|
1265
1273
|
/**
|
|
1266
1274
|
* Interface for doctor information
|
|
@@ -1303,6 +1311,7 @@ interface Clinic {
|
|
|
1303
1311
|
isActive: boolean;
|
|
1304
1312
|
isVerified: boolean;
|
|
1305
1313
|
logo?: MediaResource | null;
|
|
1314
|
+
acceptingBookings?: boolean;
|
|
1306
1315
|
}
|
|
1307
1316
|
|
|
1308
1317
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -5552,6 +5552,8 @@ interface BillingInfo {
|
|
|
5552
5552
|
currentPeriodStart: Timestamp | null;
|
|
5553
5553
|
currentPeriodEnd: Timestamp | null;
|
|
5554
5554
|
updatedAt: Timestamp;
|
|
5555
|
+
seatCount?: number;
|
|
5556
|
+
seatPriceId?: string;
|
|
5555
5557
|
}
|
|
5556
5558
|
/**
|
|
5557
5559
|
* Enum for billing transaction types
|
|
@@ -5642,6 +5644,12 @@ interface ClinicGroup {
|
|
|
5642
5644
|
completed?: boolean;
|
|
5643
5645
|
step?: number;
|
|
5644
5646
|
};
|
|
5647
|
+
featureTrials?: {
|
|
5648
|
+
analytics?: {
|
|
5649
|
+
startedAt: Timestamp;
|
|
5650
|
+
durationDays: number;
|
|
5651
|
+
};
|
|
5652
|
+
};
|
|
5645
5653
|
}
|
|
5646
5654
|
/**
|
|
5647
5655
|
* Interface for creating a clinic group
|
|
@@ -5722,6 +5730,7 @@ interface Clinic {
|
|
|
5722
5730
|
isActive: boolean;
|
|
5723
5731
|
isVerified: boolean;
|
|
5724
5732
|
logo?: MediaResource | null;
|
|
5733
|
+
acceptingBookings?: boolean;
|
|
5725
5734
|
}
|
|
5726
5735
|
/**
|
|
5727
5736
|
* Interface for creating a clinic
|
|
@@ -9828,10 +9837,10 @@ type PermissionKey = keyof typeof PERMISSION_KEYS;
|
|
|
9828
9837
|
* All features are available on every tier — tiers differ only in usage caps.
|
|
9829
9838
|
* -1 means unlimited.
|
|
9830
9839
|
*
|
|
9831
|
-
* Confirmed by client on 2026-03-
|
|
9832
|
-
* - Free: 1 provider, 3 procedures, 3 appts/mo, 10 msgs/mo, 1 staff, 1
|
|
9833
|
-
* - Connect:
|
|
9834
|
-
* - Pro: unlimited everything
|
|
9840
|
+
* Confirmed by client on 2026-03-10:
|
|
9841
|
+
* - Free: 1 provider, 3 procedures, 3 appts/mo, 10 msgs/mo, 1 staff, 1 location
|
|
9842
|
+
* - Connect (CHF 59/mo): unlimited providers, 15 procedures, 100 appts/mo, unlimited msgs, 5 staff, 1 location
|
|
9843
|
+
* - Pro (CHF 149/mo): unlimited everything
|
|
9835
9844
|
*/
|
|
9836
9845
|
declare const TIER_CONFIG: Record<string, TierConfig>;
|
|
9837
9846
|
/**
|
|
@@ -9840,14 +9849,8 @@ declare const TIER_CONFIG: Record<string, TierConfig>;
|
|
|
9840
9849
|
*/
|
|
9841
9850
|
declare const DEFAULT_ROLE_PERMISSIONS: Record<ClinicRole, Record<string, boolean>>;
|
|
9842
9851
|
/**
|
|
9843
|
-
*
|
|
9844
|
-
* All paid legacy tiers map to PRO.
|
|
9845
|
-
*/
|
|
9846
|
-
declare const LEGACY_TIER_MAP: Record<string, string>;
|
|
9847
|
-
/**
|
|
9848
|
-
* Resolves the effective tier for a subscription model string,
|
|
9849
|
-
* handling legacy values.
|
|
9852
|
+
* Resolves the effective tier for a subscription model string.
|
|
9850
9853
|
*/
|
|
9851
9854
|
declare function resolveEffectiveTier(subscriptionModel: string): string;
|
|
9852
9855
|
|
|
9853
|
-
export { AESTHETIC_ANALYSIS_COLLECTION, ANALYTICS_COLLECTION, APPOINTMENTS_COLLECTION, type ASAClassification, AcquisitionSource, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type AestheticAnalysis, type AestheticAnalysisStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, AnalyticsCloudService, type AnalyticsDateRange, type AnalyticsFilters, type AnalyticsMetadata, type AnalyticsPeriod, AnalyticsService, type AnesthesiaHistory, type Appointment, type AppointmentCancelledNotification, type AppointmentMediaItem, type AppointmentMetadata, type AppointmentProductMetadata, type AppointmentReminderNotification, type AppointmentRescheduledProposalNotification, type AppointmentRescheduledReminderNotification, AppointmentService, AppointmentStatus, type AppointmentStatusChangeNotification, type AppointmentTrend, type AssessmentScales, AuthService, BODY_ASSESSMENT_COLLECTION, type BaseDocumentElement, type BaseMetrics, type BaseNotification, BaseService, type BeforeAfterPerZone, type BillingInfo, type BillingPerZone, type BillingTransaction, BillingTransactionType, BillingTransactionsService, type BinaryChoiceElement, type BleedingRisk, type BleedingRiskLevel, BlockingCondition, type BodyAssessment, type BodyAssessmentStatus, type BodyCompositionData, type BodyMeasurementsData, type BodySymmetryData, type BodyZone, type BodyZoneAssessment, type Brand, BrandService, type Break, CALENDAR_COLLECTION, CANCELLATION_ANALYTICS_SUBCOLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_ANALYTICS_SUBCOLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, CalendarServiceV3, CalendarSyncStatus, type CancellationMetrics, type CancellationRateTrend, type CancellationReasonStats, type Category, CategoryService, CertificationLevel, CertificationSpecialty, type ClearanceStatus, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicAnalytics, type ClinicBranchSetupData, type ClinicComparisonMetrics, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, ClinicPhotoTag, type ClinicReview, type ClinicReviewInfo, ClinicRole, ClinicService, type ClinicStaffMember, ClinicTag, type ClinicTags, type ClinicalFindingDetail, type ClinicalFindings, ConstantsService, type ContactPerson, Contraindication, type ContraindicationDynamic, CosmeticAllergySubtype, type CostPerPatientMetrics, type CreateAdminTokenData, type CreateAestheticAnalysisData, type CreateAppointmentData, type CreateAppointmentHttpData, type CreateAppointmentParams, type CreateBillingTransactionData, type CreateBlockingEventParams, type CreateBodyAssessmentData, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreateHairScalpAssessmentData, type CreateManualPatientData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePatientTokenData, type CreatePractitionerData, type CreatePractitionerInviteData, type CreatePractitionerTokenData, type CreatePreSurgicalAssessmentData, type CreateProcedureData, type CreateSkinQualityAssessmentData, type CreateSyncedCalendarData, type CreateUserData, Currency, DASHBOARD_ANALYTICS_SUBCOLLECTION, DEFAULT_MEDICAL_INFO, DEFAULT_ROLE_PERMISSIONS, DOCTOR_FORMS_SUBCOLLECTION, DOCUMENTATION_TEMPLATES_COLLECTION, type DashboardAnalytics, type DatePickerElement, type DateRange, type DigitalSignatureElement, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, type DurationTrend, type DynamicTextElement, DynamicVariable, type ElastosisGrade, type EmergencyContact, type EntityType, EnvironmentalAllergySubtype, type ExtendedProcedureInfo, ExternalCalendarService, FILLED_DOCUMENTS_COLLECTION, type FileUploadElement, type FilledDocument, type FilledDocumentFileValue, FilledDocumentService, FilledDocumentStatus, type FinalBilling, type FirebaseUser, type FitzpatrickType, FoodAllergySubtype, type FormReminderNotification, type FormSubmissionConfirmationNotification, type GamificationInfo, Gender, type GeneralMessageNotification, type GlogauClassification, type GroupedAnalyticsBase, type GroupedPatientBehaviorMetrics, type GroupedPatientRetentionMetrics, type GroupedPractitionerPerformanceMetrics, type GroupedProcedurePerformanceMetrics, type GroupedProductUsageMetrics, type GroupedRevenueMetrics, type GroupedTimeEfficiencyMetrics, type GroupingPeriod, HAIR_SCALP_ASSESSMENT_COLLECTION, type HairCharacteristics, type HairColor, type HairDensity, type HairLossPattern, type HairLossType, type HairLossZone, type HairLossZoneAssessment, type HairScalpAssessment, type HairScalpAssessmentStatus, type HairTextureGrade, type HairType, type HeadingElement, HeadingLevel, INVITE_TOKENS_COLLECTION, LEGACY_TIER_MAP, type LabResult, Language, type LinkedFormInfo, type ListElement, ListType, type LocationData, type LudwigStage, MEDIA_METADATA_COLLECTION, MediaAccessLevel, type MediaMetadata, type MediaResource, MediaService, MediaType, MedicationAllergySubtype, type MultipleChoiceElement, type MuscleDefinitionLevel, NOTIFICATIONS_COLLECTION, NO_SHOW_ANALYTICS_SUBCOLLECTION, type NextStepsRecommendation, type NoShowMetrics, type NorwoodStage, type Notification, NotificationService, NotificationStatus, NotificationType, type OverallReviewAverages, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, PATIENT_SENSITIVE_INFO_COLLECTION, PERMISSION_KEYS, PRACTITIONERS_COLLECTION, PRACTITIONER_ANALYTICS_SUBCOLLECTION, PRACTITIONER_INVITES_COLLECTION, PRE_SURGICAL_ASSESSMENT_COLLECTION, PROCEDURES_COLLECTION, PROCEDURE_ANALYTICS_SUBCOLLECTION, type ParagraphElement, type PatientAnalytics, type PatientClinic, type PatientDoctor, type PatientGoals, PatientInstructionStatus, type PatientLifetimeValueMetrics, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileForDoctor, type PatientProfileInfo, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, type PatientRequirementsFilters, PatientRequirementsService, type PatientRetentionMetrics, type PatientReviewInfo, type PatientSensitiveInfo, PatientService, type PatientToken, PatientTokenStatus, type PaymentConfirmationNotification, PaymentStatus, type PaymentStatusBreakdown, type PermissionKey, type PlanDetails, type PoreSizeLevel, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerAnalytics, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerClinicWorkingHours, type PractitionerInvite, type PractitionerInviteFilters, PractitionerInviteService, PractitionerInviteStatus, type PractitionerProfileInfo, type PractitionerReview, type PractitionerReviewInfo, PractitionerService, PractitionerStatus, type PractitionerToken, PractitionerTokenStatus, type PractitionerWorkingHours, type PreRequirementNotification, type PreSurgicalAssessment, type PreSurgicalAssessmentStatus, PricingMeasure, type Procedure, type ProcedureAnalytics, type ProcedureCategorization, type ProcedureExtendedInfo, ProcedureFamily, type ProcedureInfo, type ProcedurePopularity, type ProcedureProduct, type ProcedureProfitability, type ProcedureRecommendationNotification, type ProcedureReview, type ProcedureReviewInfo, ProcedureService, type ProcedureSummaryInfo, type Product, type ProductRevenueMetrics, ProductService, type ProductUsageByProcedure, type ProductUsageMetrics, type ProposedWorkingHours, REGISTER_TOKENS_COLLECTION, REVENUE_ANALYTICS_SUBCOLLECTION, REVIEWS_COLLECTION, type RatingScaleElement, type ReadStoredAnalyticsOptions, type RecommendedProcedure, type RequesterInfo, type Requirement, type RequirementInstructionDueNotification, type RequirementSourceProcedure, RequirementType, type RevenueMetrics, type RevenueTrend, type Review, type ReviewAnalyticsMetrics, ReviewAnalyticsService, type ReviewDetail, type ReviewMetrics, type ReviewRequestNotification, ReviewService, type ReviewTrend, type RolePermissionConfig, SKIN_QUALITY_ASSESSMENT_COLLECTION, SYNCED_CALENDARS_COLLECTION, type ScalpCondition, type ScalpRednessLevel, type ScalpScalinessLevel, type ScalpSebumLevel, type SearchAppointmentsParams, type SearchCalendarEventsParams, SearchLocationEnum, type SearchPatientsParams, type SeverityLevel, type SignatureElement, type SingleChoiceElement, type SkinCharacteristics, type SkinConditionEntry, type SkinConditionType, type SkinElasticityLevel, type SkinHydrationLevel, type SkinQualityAssessment, type SkinQualityAssessmentStatus, type SkinQualityScales, type SkinSensitivityLevel, type SkinTextureLevel, type SkinZone, type SkinZoneAssessment, type SmokingStatus, type StoredCancellationMetrics, type StoredClinicAnalytics, type StoredDashboardAnalytics, type StoredNoShowMetrics, type StoredPractitionerAnalytics, type StoredProcedureAnalytics, type StoredRevenueMetrics, type StoredTimeEfficiencyMetrics, type StripeTransactionData, type Subcategory, SubcategoryService, SubscriptionModel, SubscriptionStatus, type SurgicalSiteAssessment, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, TIER_CONFIG, TIME_EFFICIENCY_ANALYTICS_SUBCOLLECTION, type Technology, type TechnologyDocumentationTemplate, TechnologyService, type TextInputElement, type TierConfig, TierLimitError, type TierLimits, type TimeEfficiencyMetrics, type TimeSlot, TimeUnit, type TissueQualityLevel, TreatmentBenefit, type TreatmentBenefitDynamic, type TrendPeriod, USERS_COLLECTION, USER_FORMS_SUBCOLLECTION, type UpdateAestheticAnalysisData, type UpdateAllergyData, type UpdateAppointmentData, type UpdateAppointmentParams, type UpdateBlockingConditionData, type UpdateBlockingEventParams, type UpdateBodyAssessmentData, type UpdateCalendarEventData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateHairScalpAssessmentData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdatePractitionerInviteData, type UpdatePreSurgicalAssessmentData, type UpdateProcedureData, type UpdateSkinQualityAssessmentData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type VitalStats, type WorkingHours, type ZoneItemData, type ZonePhotoUploadData, enforceAppointmentLimit, enforceBranchLimit, enforceMessageLimit, enforceProcedureLimit, enforceProviderLimit, enforceStaffLimit, getEffectiveTier, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseFunctions, getFirebaseInstance, getFirebaseStorage, initializeFirebase, resolveEffectiveTier };
|
|
9856
|
+
export { AESTHETIC_ANALYSIS_COLLECTION, ANALYTICS_COLLECTION, APPOINTMENTS_COLLECTION, type ASAClassification, AcquisitionSource, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type AestheticAnalysis, type AestheticAnalysisStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, AnalyticsCloudService, type AnalyticsDateRange, type AnalyticsFilters, type AnalyticsMetadata, type AnalyticsPeriod, AnalyticsService, type AnesthesiaHistory, type Appointment, type AppointmentCancelledNotification, type AppointmentMediaItem, type AppointmentMetadata, type AppointmentProductMetadata, type AppointmentReminderNotification, type AppointmentRescheduledProposalNotification, type AppointmentRescheduledReminderNotification, AppointmentService, AppointmentStatus, type AppointmentStatusChangeNotification, type AppointmentTrend, type AssessmentScales, AuthService, BODY_ASSESSMENT_COLLECTION, type BaseDocumentElement, type BaseMetrics, type BaseNotification, BaseService, type BeforeAfterPerZone, type BillingInfo, type BillingPerZone, type BillingTransaction, BillingTransactionType, BillingTransactionsService, type BinaryChoiceElement, type BleedingRisk, type BleedingRiskLevel, BlockingCondition, type BodyAssessment, type BodyAssessmentStatus, type BodyCompositionData, type BodyMeasurementsData, type BodySymmetryData, type BodyZone, type BodyZoneAssessment, type Brand, BrandService, type Break, CALENDAR_COLLECTION, CANCELLATION_ANALYTICS_SUBCOLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_ANALYTICS_SUBCOLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, CalendarServiceV3, CalendarSyncStatus, type CancellationMetrics, type CancellationRateTrend, type CancellationReasonStats, type Category, CategoryService, CertificationLevel, CertificationSpecialty, type ClearanceStatus, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicAnalytics, type ClinicBranchSetupData, type ClinicComparisonMetrics, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, ClinicPhotoTag, type ClinicReview, type ClinicReviewInfo, ClinicRole, ClinicService, type ClinicStaffMember, ClinicTag, type ClinicTags, type ClinicalFindingDetail, type ClinicalFindings, ConstantsService, type ContactPerson, Contraindication, type ContraindicationDynamic, CosmeticAllergySubtype, type CostPerPatientMetrics, type CreateAdminTokenData, type CreateAestheticAnalysisData, type CreateAppointmentData, type CreateAppointmentHttpData, type CreateAppointmentParams, type CreateBillingTransactionData, type CreateBlockingEventParams, type CreateBodyAssessmentData, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreateHairScalpAssessmentData, type CreateManualPatientData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePatientTokenData, type CreatePractitionerData, type CreatePractitionerInviteData, type CreatePractitionerTokenData, type CreatePreSurgicalAssessmentData, type CreateProcedureData, type CreateSkinQualityAssessmentData, type CreateSyncedCalendarData, type CreateUserData, Currency, DASHBOARD_ANALYTICS_SUBCOLLECTION, DEFAULT_MEDICAL_INFO, DEFAULT_ROLE_PERMISSIONS, DOCTOR_FORMS_SUBCOLLECTION, DOCUMENTATION_TEMPLATES_COLLECTION, type DashboardAnalytics, type DatePickerElement, type DateRange, type DigitalSignatureElement, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, type DurationTrend, type DynamicTextElement, DynamicVariable, type ElastosisGrade, type EmergencyContact, type EntityType, EnvironmentalAllergySubtype, type ExtendedProcedureInfo, ExternalCalendarService, FILLED_DOCUMENTS_COLLECTION, type FileUploadElement, type FilledDocument, type FilledDocumentFileValue, FilledDocumentService, FilledDocumentStatus, type FinalBilling, type FirebaseUser, type FitzpatrickType, FoodAllergySubtype, type FormReminderNotification, type FormSubmissionConfirmationNotification, type GamificationInfo, Gender, type GeneralMessageNotification, type GlogauClassification, type GroupedAnalyticsBase, type GroupedPatientBehaviorMetrics, type GroupedPatientRetentionMetrics, type GroupedPractitionerPerformanceMetrics, type GroupedProcedurePerformanceMetrics, type GroupedProductUsageMetrics, type GroupedRevenueMetrics, type GroupedTimeEfficiencyMetrics, type GroupingPeriod, HAIR_SCALP_ASSESSMENT_COLLECTION, type HairCharacteristics, type HairColor, type HairDensity, type HairLossPattern, type HairLossType, type HairLossZone, type HairLossZoneAssessment, type HairScalpAssessment, type HairScalpAssessmentStatus, type HairTextureGrade, type HairType, type HeadingElement, HeadingLevel, INVITE_TOKENS_COLLECTION, type LabResult, Language, type LinkedFormInfo, type ListElement, ListType, type LocationData, type LudwigStage, MEDIA_METADATA_COLLECTION, MediaAccessLevel, type MediaMetadata, type MediaResource, MediaService, MediaType, MedicationAllergySubtype, type MultipleChoiceElement, type MuscleDefinitionLevel, NOTIFICATIONS_COLLECTION, NO_SHOW_ANALYTICS_SUBCOLLECTION, type NextStepsRecommendation, type NoShowMetrics, type NorwoodStage, type Notification, NotificationService, NotificationStatus, NotificationType, type OverallReviewAverages, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, PATIENT_SENSITIVE_INFO_COLLECTION, PERMISSION_KEYS, PRACTITIONERS_COLLECTION, PRACTITIONER_ANALYTICS_SUBCOLLECTION, PRACTITIONER_INVITES_COLLECTION, PRE_SURGICAL_ASSESSMENT_COLLECTION, PROCEDURES_COLLECTION, PROCEDURE_ANALYTICS_SUBCOLLECTION, type ParagraphElement, type PatientAnalytics, type PatientClinic, type PatientDoctor, type PatientGoals, PatientInstructionStatus, type PatientLifetimeValueMetrics, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileForDoctor, type PatientProfileInfo, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, type PatientRequirementsFilters, PatientRequirementsService, type PatientRetentionMetrics, type PatientReviewInfo, type PatientSensitiveInfo, PatientService, type PatientToken, PatientTokenStatus, type PaymentConfirmationNotification, PaymentStatus, type PaymentStatusBreakdown, type PermissionKey, type PlanDetails, type PoreSizeLevel, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerAnalytics, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerClinicWorkingHours, type PractitionerInvite, type PractitionerInviteFilters, PractitionerInviteService, PractitionerInviteStatus, type PractitionerProfileInfo, type PractitionerReview, type PractitionerReviewInfo, PractitionerService, PractitionerStatus, type PractitionerToken, PractitionerTokenStatus, type PractitionerWorkingHours, type PreRequirementNotification, type PreSurgicalAssessment, type PreSurgicalAssessmentStatus, PricingMeasure, type Procedure, type ProcedureAnalytics, type ProcedureCategorization, type ProcedureExtendedInfo, ProcedureFamily, type ProcedureInfo, type ProcedurePopularity, type ProcedureProduct, type ProcedureProfitability, type ProcedureRecommendationNotification, type ProcedureReview, type ProcedureReviewInfo, ProcedureService, type ProcedureSummaryInfo, type Product, type ProductRevenueMetrics, ProductService, type ProductUsageByProcedure, type ProductUsageMetrics, type ProposedWorkingHours, REGISTER_TOKENS_COLLECTION, REVENUE_ANALYTICS_SUBCOLLECTION, REVIEWS_COLLECTION, type RatingScaleElement, type ReadStoredAnalyticsOptions, type RecommendedProcedure, type RequesterInfo, type Requirement, type RequirementInstructionDueNotification, type RequirementSourceProcedure, RequirementType, type RevenueMetrics, type RevenueTrend, type Review, type ReviewAnalyticsMetrics, ReviewAnalyticsService, type ReviewDetail, type ReviewMetrics, type ReviewRequestNotification, ReviewService, type ReviewTrend, type RolePermissionConfig, SKIN_QUALITY_ASSESSMENT_COLLECTION, SYNCED_CALENDARS_COLLECTION, type ScalpCondition, type ScalpRednessLevel, type ScalpScalinessLevel, type ScalpSebumLevel, type SearchAppointmentsParams, type SearchCalendarEventsParams, SearchLocationEnum, type SearchPatientsParams, type SeverityLevel, type SignatureElement, type SingleChoiceElement, type SkinCharacteristics, type SkinConditionEntry, type SkinConditionType, type SkinElasticityLevel, type SkinHydrationLevel, type SkinQualityAssessment, type SkinQualityAssessmentStatus, type SkinQualityScales, type SkinSensitivityLevel, type SkinTextureLevel, type SkinZone, type SkinZoneAssessment, type SmokingStatus, type StoredCancellationMetrics, type StoredClinicAnalytics, type StoredDashboardAnalytics, type StoredNoShowMetrics, type StoredPractitionerAnalytics, type StoredProcedureAnalytics, type StoredRevenueMetrics, type StoredTimeEfficiencyMetrics, type StripeTransactionData, type Subcategory, SubcategoryService, SubscriptionModel, SubscriptionStatus, type SurgicalSiteAssessment, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, TIER_CONFIG, TIME_EFFICIENCY_ANALYTICS_SUBCOLLECTION, type Technology, type TechnologyDocumentationTemplate, TechnologyService, type TextInputElement, type TierConfig, TierLimitError, type TierLimits, type TimeEfficiencyMetrics, type TimeSlot, TimeUnit, type TissueQualityLevel, TreatmentBenefit, type TreatmentBenefitDynamic, type TrendPeriod, USERS_COLLECTION, USER_FORMS_SUBCOLLECTION, type UpdateAestheticAnalysisData, type UpdateAllergyData, type UpdateAppointmentData, type UpdateAppointmentParams, type UpdateBlockingConditionData, type UpdateBlockingEventParams, type UpdateBodyAssessmentData, type UpdateCalendarEventData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateHairScalpAssessmentData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdatePractitionerInviteData, type UpdatePreSurgicalAssessmentData, type UpdateProcedureData, type UpdateSkinQualityAssessmentData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type VitalStats, type WorkingHours, type ZoneItemData, type ZonePhotoUploadData, enforceAppointmentLimit, enforceBranchLimit, enforceMessageLimit, enforceProcedureLimit, enforceProviderLimit, enforceStaffLimit, getEffectiveTier, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseFunctions, getFirebaseInstance, getFirebaseStorage, initializeFirebase, resolveEffectiveTier };
|
package/dist/index.d.ts
CHANGED
|
@@ -5552,6 +5552,8 @@ interface BillingInfo {
|
|
|
5552
5552
|
currentPeriodStart: Timestamp | null;
|
|
5553
5553
|
currentPeriodEnd: Timestamp | null;
|
|
5554
5554
|
updatedAt: Timestamp;
|
|
5555
|
+
seatCount?: number;
|
|
5556
|
+
seatPriceId?: string;
|
|
5555
5557
|
}
|
|
5556
5558
|
/**
|
|
5557
5559
|
* Enum for billing transaction types
|
|
@@ -5642,6 +5644,12 @@ interface ClinicGroup {
|
|
|
5642
5644
|
completed?: boolean;
|
|
5643
5645
|
step?: number;
|
|
5644
5646
|
};
|
|
5647
|
+
featureTrials?: {
|
|
5648
|
+
analytics?: {
|
|
5649
|
+
startedAt: Timestamp;
|
|
5650
|
+
durationDays: number;
|
|
5651
|
+
};
|
|
5652
|
+
};
|
|
5645
5653
|
}
|
|
5646
5654
|
/**
|
|
5647
5655
|
* Interface for creating a clinic group
|
|
@@ -5722,6 +5730,7 @@ interface Clinic {
|
|
|
5722
5730
|
isActive: boolean;
|
|
5723
5731
|
isVerified: boolean;
|
|
5724
5732
|
logo?: MediaResource | null;
|
|
5733
|
+
acceptingBookings?: boolean;
|
|
5725
5734
|
}
|
|
5726
5735
|
/**
|
|
5727
5736
|
* Interface for creating a clinic
|
|
@@ -9828,10 +9837,10 @@ type PermissionKey = keyof typeof PERMISSION_KEYS;
|
|
|
9828
9837
|
* All features are available on every tier — tiers differ only in usage caps.
|
|
9829
9838
|
* -1 means unlimited.
|
|
9830
9839
|
*
|
|
9831
|
-
* Confirmed by client on 2026-03-
|
|
9832
|
-
* - Free: 1 provider, 3 procedures, 3 appts/mo, 10 msgs/mo, 1 staff, 1
|
|
9833
|
-
* - Connect:
|
|
9834
|
-
* - Pro: unlimited everything
|
|
9840
|
+
* Confirmed by client on 2026-03-10:
|
|
9841
|
+
* - Free: 1 provider, 3 procedures, 3 appts/mo, 10 msgs/mo, 1 staff, 1 location
|
|
9842
|
+
* - Connect (CHF 59/mo): unlimited providers, 15 procedures, 100 appts/mo, unlimited msgs, 5 staff, 1 location
|
|
9843
|
+
* - Pro (CHF 149/mo): unlimited everything
|
|
9835
9844
|
*/
|
|
9836
9845
|
declare const TIER_CONFIG: Record<string, TierConfig>;
|
|
9837
9846
|
/**
|
|
@@ -9840,14 +9849,8 @@ declare const TIER_CONFIG: Record<string, TierConfig>;
|
|
|
9840
9849
|
*/
|
|
9841
9850
|
declare const DEFAULT_ROLE_PERMISSIONS: Record<ClinicRole, Record<string, boolean>>;
|
|
9842
9851
|
/**
|
|
9843
|
-
*
|
|
9844
|
-
* All paid legacy tiers map to PRO.
|
|
9845
|
-
*/
|
|
9846
|
-
declare const LEGACY_TIER_MAP: Record<string, string>;
|
|
9847
|
-
/**
|
|
9848
|
-
* Resolves the effective tier for a subscription model string,
|
|
9849
|
-
* handling legacy values.
|
|
9852
|
+
* Resolves the effective tier for a subscription model string.
|
|
9850
9853
|
*/
|
|
9851
9854
|
declare function resolveEffectiveTier(subscriptionModel: string): string;
|
|
9852
9855
|
|
|
9853
|
-
export { AESTHETIC_ANALYSIS_COLLECTION, ANALYTICS_COLLECTION, APPOINTMENTS_COLLECTION, type ASAClassification, AcquisitionSource, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type AestheticAnalysis, type AestheticAnalysisStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, AnalyticsCloudService, type AnalyticsDateRange, type AnalyticsFilters, type AnalyticsMetadata, type AnalyticsPeriod, AnalyticsService, type AnesthesiaHistory, type Appointment, type AppointmentCancelledNotification, type AppointmentMediaItem, type AppointmentMetadata, type AppointmentProductMetadata, type AppointmentReminderNotification, type AppointmentRescheduledProposalNotification, type AppointmentRescheduledReminderNotification, AppointmentService, AppointmentStatus, type AppointmentStatusChangeNotification, type AppointmentTrend, type AssessmentScales, AuthService, BODY_ASSESSMENT_COLLECTION, type BaseDocumentElement, type BaseMetrics, type BaseNotification, BaseService, type BeforeAfterPerZone, type BillingInfo, type BillingPerZone, type BillingTransaction, BillingTransactionType, BillingTransactionsService, type BinaryChoiceElement, type BleedingRisk, type BleedingRiskLevel, BlockingCondition, type BodyAssessment, type BodyAssessmentStatus, type BodyCompositionData, type BodyMeasurementsData, type BodySymmetryData, type BodyZone, type BodyZoneAssessment, type Brand, BrandService, type Break, CALENDAR_COLLECTION, CANCELLATION_ANALYTICS_SUBCOLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_ANALYTICS_SUBCOLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, CalendarServiceV3, CalendarSyncStatus, type CancellationMetrics, type CancellationRateTrend, type CancellationReasonStats, type Category, CategoryService, CertificationLevel, CertificationSpecialty, type ClearanceStatus, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicAnalytics, type ClinicBranchSetupData, type ClinicComparisonMetrics, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, ClinicPhotoTag, type ClinicReview, type ClinicReviewInfo, ClinicRole, ClinicService, type ClinicStaffMember, ClinicTag, type ClinicTags, type ClinicalFindingDetail, type ClinicalFindings, ConstantsService, type ContactPerson, Contraindication, type ContraindicationDynamic, CosmeticAllergySubtype, type CostPerPatientMetrics, type CreateAdminTokenData, type CreateAestheticAnalysisData, type CreateAppointmentData, type CreateAppointmentHttpData, type CreateAppointmentParams, type CreateBillingTransactionData, type CreateBlockingEventParams, type CreateBodyAssessmentData, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreateHairScalpAssessmentData, type CreateManualPatientData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePatientTokenData, type CreatePractitionerData, type CreatePractitionerInviteData, type CreatePractitionerTokenData, type CreatePreSurgicalAssessmentData, type CreateProcedureData, type CreateSkinQualityAssessmentData, type CreateSyncedCalendarData, type CreateUserData, Currency, DASHBOARD_ANALYTICS_SUBCOLLECTION, DEFAULT_MEDICAL_INFO, DEFAULT_ROLE_PERMISSIONS, DOCTOR_FORMS_SUBCOLLECTION, DOCUMENTATION_TEMPLATES_COLLECTION, type DashboardAnalytics, type DatePickerElement, type DateRange, type DigitalSignatureElement, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, type DurationTrend, type DynamicTextElement, DynamicVariable, type ElastosisGrade, type EmergencyContact, type EntityType, EnvironmentalAllergySubtype, type ExtendedProcedureInfo, ExternalCalendarService, FILLED_DOCUMENTS_COLLECTION, type FileUploadElement, type FilledDocument, type FilledDocumentFileValue, FilledDocumentService, FilledDocumentStatus, type FinalBilling, type FirebaseUser, type FitzpatrickType, FoodAllergySubtype, type FormReminderNotification, type FormSubmissionConfirmationNotification, type GamificationInfo, Gender, type GeneralMessageNotification, type GlogauClassification, type GroupedAnalyticsBase, type GroupedPatientBehaviorMetrics, type GroupedPatientRetentionMetrics, type GroupedPractitionerPerformanceMetrics, type GroupedProcedurePerformanceMetrics, type GroupedProductUsageMetrics, type GroupedRevenueMetrics, type GroupedTimeEfficiencyMetrics, type GroupingPeriod, HAIR_SCALP_ASSESSMENT_COLLECTION, type HairCharacteristics, type HairColor, type HairDensity, type HairLossPattern, type HairLossType, type HairLossZone, type HairLossZoneAssessment, type HairScalpAssessment, type HairScalpAssessmentStatus, type HairTextureGrade, type HairType, type HeadingElement, HeadingLevel, INVITE_TOKENS_COLLECTION, LEGACY_TIER_MAP, type LabResult, Language, type LinkedFormInfo, type ListElement, ListType, type LocationData, type LudwigStage, MEDIA_METADATA_COLLECTION, MediaAccessLevel, type MediaMetadata, type MediaResource, MediaService, MediaType, MedicationAllergySubtype, type MultipleChoiceElement, type MuscleDefinitionLevel, NOTIFICATIONS_COLLECTION, NO_SHOW_ANALYTICS_SUBCOLLECTION, type NextStepsRecommendation, type NoShowMetrics, type NorwoodStage, type Notification, NotificationService, NotificationStatus, NotificationType, type OverallReviewAverages, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, PATIENT_SENSITIVE_INFO_COLLECTION, PERMISSION_KEYS, PRACTITIONERS_COLLECTION, PRACTITIONER_ANALYTICS_SUBCOLLECTION, PRACTITIONER_INVITES_COLLECTION, PRE_SURGICAL_ASSESSMENT_COLLECTION, PROCEDURES_COLLECTION, PROCEDURE_ANALYTICS_SUBCOLLECTION, type ParagraphElement, type PatientAnalytics, type PatientClinic, type PatientDoctor, type PatientGoals, PatientInstructionStatus, type PatientLifetimeValueMetrics, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileForDoctor, type PatientProfileInfo, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, type PatientRequirementsFilters, PatientRequirementsService, type PatientRetentionMetrics, type PatientReviewInfo, type PatientSensitiveInfo, PatientService, type PatientToken, PatientTokenStatus, type PaymentConfirmationNotification, PaymentStatus, type PaymentStatusBreakdown, type PermissionKey, type PlanDetails, type PoreSizeLevel, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerAnalytics, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerClinicWorkingHours, type PractitionerInvite, type PractitionerInviteFilters, PractitionerInviteService, PractitionerInviteStatus, type PractitionerProfileInfo, type PractitionerReview, type PractitionerReviewInfo, PractitionerService, PractitionerStatus, type PractitionerToken, PractitionerTokenStatus, type PractitionerWorkingHours, type PreRequirementNotification, type PreSurgicalAssessment, type PreSurgicalAssessmentStatus, PricingMeasure, type Procedure, type ProcedureAnalytics, type ProcedureCategorization, type ProcedureExtendedInfo, ProcedureFamily, type ProcedureInfo, type ProcedurePopularity, type ProcedureProduct, type ProcedureProfitability, type ProcedureRecommendationNotification, type ProcedureReview, type ProcedureReviewInfo, ProcedureService, type ProcedureSummaryInfo, type Product, type ProductRevenueMetrics, ProductService, type ProductUsageByProcedure, type ProductUsageMetrics, type ProposedWorkingHours, REGISTER_TOKENS_COLLECTION, REVENUE_ANALYTICS_SUBCOLLECTION, REVIEWS_COLLECTION, type RatingScaleElement, type ReadStoredAnalyticsOptions, type RecommendedProcedure, type RequesterInfo, type Requirement, type RequirementInstructionDueNotification, type RequirementSourceProcedure, RequirementType, type RevenueMetrics, type RevenueTrend, type Review, type ReviewAnalyticsMetrics, ReviewAnalyticsService, type ReviewDetail, type ReviewMetrics, type ReviewRequestNotification, ReviewService, type ReviewTrend, type RolePermissionConfig, SKIN_QUALITY_ASSESSMENT_COLLECTION, SYNCED_CALENDARS_COLLECTION, type ScalpCondition, type ScalpRednessLevel, type ScalpScalinessLevel, type ScalpSebumLevel, type SearchAppointmentsParams, type SearchCalendarEventsParams, SearchLocationEnum, type SearchPatientsParams, type SeverityLevel, type SignatureElement, type SingleChoiceElement, type SkinCharacteristics, type SkinConditionEntry, type SkinConditionType, type SkinElasticityLevel, type SkinHydrationLevel, type SkinQualityAssessment, type SkinQualityAssessmentStatus, type SkinQualityScales, type SkinSensitivityLevel, type SkinTextureLevel, type SkinZone, type SkinZoneAssessment, type SmokingStatus, type StoredCancellationMetrics, type StoredClinicAnalytics, type StoredDashboardAnalytics, type StoredNoShowMetrics, type StoredPractitionerAnalytics, type StoredProcedureAnalytics, type StoredRevenueMetrics, type StoredTimeEfficiencyMetrics, type StripeTransactionData, type Subcategory, SubcategoryService, SubscriptionModel, SubscriptionStatus, type SurgicalSiteAssessment, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, TIER_CONFIG, TIME_EFFICIENCY_ANALYTICS_SUBCOLLECTION, type Technology, type TechnologyDocumentationTemplate, TechnologyService, type TextInputElement, type TierConfig, TierLimitError, type TierLimits, type TimeEfficiencyMetrics, type TimeSlot, TimeUnit, type TissueQualityLevel, TreatmentBenefit, type TreatmentBenefitDynamic, type TrendPeriod, USERS_COLLECTION, USER_FORMS_SUBCOLLECTION, type UpdateAestheticAnalysisData, type UpdateAllergyData, type UpdateAppointmentData, type UpdateAppointmentParams, type UpdateBlockingConditionData, type UpdateBlockingEventParams, type UpdateBodyAssessmentData, type UpdateCalendarEventData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateHairScalpAssessmentData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdatePractitionerInviteData, type UpdatePreSurgicalAssessmentData, type UpdateProcedureData, type UpdateSkinQualityAssessmentData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type VitalStats, type WorkingHours, type ZoneItemData, type ZonePhotoUploadData, enforceAppointmentLimit, enforceBranchLimit, enforceMessageLimit, enforceProcedureLimit, enforceProviderLimit, enforceStaffLimit, getEffectiveTier, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseFunctions, getFirebaseInstance, getFirebaseStorage, initializeFirebase, resolveEffectiveTier };
|
|
9856
|
+
export { AESTHETIC_ANALYSIS_COLLECTION, ANALYTICS_COLLECTION, APPOINTMENTS_COLLECTION, type ASAClassification, AcquisitionSource, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type AestheticAnalysis, type AestheticAnalysisStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, AnalyticsCloudService, type AnalyticsDateRange, type AnalyticsFilters, type AnalyticsMetadata, type AnalyticsPeriod, AnalyticsService, type AnesthesiaHistory, type Appointment, type AppointmentCancelledNotification, type AppointmentMediaItem, type AppointmentMetadata, type AppointmentProductMetadata, type AppointmentReminderNotification, type AppointmentRescheduledProposalNotification, type AppointmentRescheduledReminderNotification, AppointmentService, AppointmentStatus, type AppointmentStatusChangeNotification, type AppointmentTrend, type AssessmentScales, AuthService, BODY_ASSESSMENT_COLLECTION, type BaseDocumentElement, type BaseMetrics, type BaseNotification, BaseService, type BeforeAfterPerZone, type BillingInfo, type BillingPerZone, type BillingTransaction, BillingTransactionType, BillingTransactionsService, type BinaryChoiceElement, type BleedingRisk, type BleedingRiskLevel, BlockingCondition, type BodyAssessment, type BodyAssessmentStatus, type BodyCompositionData, type BodyMeasurementsData, type BodySymmetryData, type BodyZone, type BodyZoneAssessment, type Brand, BrandService, type Break, CALENDAR_COLLECTION, CANCELLATION_ANALYTICS_SUBCOLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_ANALYTICS_SUBCOLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, CalendarServiceV3, CalendarSyncStatus, type CancellationMetrics, type CancellationRateTrend, type CancellationReasonStats, type Category, CategoryService, CertificationLevel, CertificationSpecialty, type ClearanceStatus, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicAnalytics, type ClinicBranchSetupData, type ClinicComparisonMetrics, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, ClinicPhotoTag, type ClinicReview, type ClinicReviewInfo, ClinicRole, ClinicService, type ClinicStaffMember, ClinicTag, type ClinicTags, type ClinicalFindingDetail, type ClinicalFindings, ConstantsService, type ContactPerson, Contraindication, type ContraindicationDynamic, CosmeticAllergySubtype, type CostPerPatientMetrics, type CreateAdminTokenData, type CreateAestheticAnalysisData, type CreateAppointmentData, type CreateAppointmentHttpData, type CreateAppointmentParams, type CreateBillingTransactionData, type CreateBlockingEventParams, type CreateBodyAssessmentData, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreateHairScalpAssessmentData, type CreateManualPatientData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePatientTokenData, type CreatePractitionerData, type CreatePractitionerInviteData, type CreatePractitionerTokenData, type CreatePreSurgicalAssessmentData, type CreateProcedureData, type CreateSkinQualityAssessmentData, type CreateSyncedCalendarData, type CreateUserData, Currency, DASHBOARD_ANALYTICS_SUBCOLLECTION, DEFAULT_MEDICAL_INFO, DEFAULT_ROLE_PERMISSIONS, DOCTOR_FORMS_SUBCOLLECTION, DOCUMENTATION_TEMPLATES_COLLECTION, type DashboardAnalytics, type DatePickerElement, type DateRange, type DigitalSignatureElement, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, type DurationTrend, type DynamicTextElement, DynamicVariable, type ElastosisGrade, type EmergencyContact, type EntityType, EnvironmentalAllergySubtype, type ExtendedProcedureInfo, ExternalCalendarService, FILLED_DOCUMENTS_COLLECTION, type FileUploadElement, type FilledDocument, type FilledDocumentFileValue, FilledDocumentService, FilledDocumentStatus, type FinalBilling, type FirebaseUser, type FitzpatrickType, FoodAllergySubtype, type FormReminderNotification, type FormSubmissionConfirmationNotification, type GamificationInfo, Gender, type GeneralMessageNotification, type GlogauClassification, type GroupedAnalyticsBase, type GroupedPatientBehaviorMetrics, type GroupedPatientRetentionMetrics, type GroupedPractitionerPerformanceMetrics, type GroupedProcedurePerformanceMetrics, type GroupedProductUsageMetrics, type GroupedRevenueMetrics, type GroupedTimeEfficiencyMetrics, type GroupingPeriod, HAIR_SCALP_ASSESSMENT_COLLECTION, type HairCharacteristics, type HairColor, type HairDensity, type HairLossPattern, type HairLossType, type HairLossZone, type HairLossZoneAssessment, type HairScalpAssessment, type HairScalpAssessmentStatus, type HairTextureGrade, type HairType, type HeadingElement, HeadingLevel, INVITE_TOKENS_COLLECTION, type LabResult, Language, type LinkedFormInfo, type ListElement, ListType, type LocationData, type LudwigStage, MEDIA_METADATA_COLLECTION, MediaAccessLevel, type MediaMetadata, type MediaResource, MediaService, MediaType, MedicationAllergySubtype, type MultipleChoiceElement, type MuscleDefinitionLevel, NOTIFICATIONS_COLLECTION, NO_SHOW_ANALYTICS_SUBCOLLECTION, type NextStepsRecommendation, type NoShowMetrics, type NorwoodStage, type Notification, NotificationService, NotificationStatus, NotificationType, type OverallReviewAverages, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, PATIENT_SENSITIVE_INFO_COLLECTION, PERMISSION_KEYS, PRACTITIONERS_COLLECTION, PRACTITIONER_ANALYTICS_SUBCOLLECTION, PRACTITIONER_INVITES_COLLECTION, PRE_SURGICAL_ASSESSMENT_COLLECTION, PROCEDURES_COLLECTION, PROCEDURE_ANALYTICS_SUBCOLLECTION, type ParagraphElement, type PatientAnalytics, type PatientClinic, type PatientDoctor, type PatientGoals, PatientInstructionStatus, type PatientLifetimeValueMetrics, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileForDoctor, type PatientProfileInfo, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, type PatientRequirementsFilters, PatientRequirementsService, type PatientRetentionMetrics, type PatientReviewInfo, type PatientSensitiveInfo, PatientService, type PatientToken, PatientTokenStatus, type PaymentConfirmationNotification, PaymentStatus, type PaymentStatusBreakdown, type PermissionKey, type PlanDetails, type PoreSizeLevel, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerAnalytics, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerClinicWorkingHours, type PractitionerInvite, type PractitionerInviteFilters, PractitionerInviteService, PractitionerInviteStatus, type PractitionerProfileInfo, type PractitionerReview, type PractitionerReviewInfo, PractitionerService, PractitionerStatus, type PractitionerToken, PractitionerTokenStatus, type PractitionerWorkingHours, type PreRequirementNotification, type PreSurgicalAssessment, type PreSurgicalAssessmentStatus, PricingMeasure, type Procedure, type ProcedureAnalytics, type ProcedureCategorization, type ProcedureExtendedInfo, ProcedureFamily, type ProcedureInfo, type ProcedurePopularity, type ProcedureProduct, type ProcedureProfitability, type ProcedureRecommendationNotification, type ProcedureReview, type ProcedureReviewInfo, ProcedureService, type ProcedureSummaryInfo, type Product, type ProductRevenueMetrics, ProductService, type ProductUsageByProcedure, type ProductUsageMetrics, type ProposedWorkingHours, REGISTER_TOKENS_COLLECTION, REVENUE_ANALYTICS_SUBCOLLECTION, REVIEWS_COLLECTION, type RatingScaleElement, type ReadStoredAnalyticsOptions, type RecommendedProcedure, type RequesterInfo, type Requirement, type RequirementInstructionDueNotification, type RequirementSourceProcedure, RequirementType, type RevenueMetrics, type RevenueTrend, type Review, type ReviewAnalyticsMetrics, ReviewAnalyticsService, type ReviewDetail, type ReviewMetrics, type ReviewRequestNotification, ReviewService, type ReviewTrend, type RolePermissionConfig, SKIN_QUALITY_ASSESSMENT_COLLECTION, SYNCED_CALENDARS_COLLECTION, type ScalpCondition, type ScalpRednessLevel, type ScalpScalinessLevel, type ScalpSebumLevel, type SearchAppointmentsParams, type SearchCalendarEventsParams, SearchLocationEnum, type SearchPatientsParams, type SeverityLevel, type SignatureElement, type SingleChoiceElement, type SkinCharacteristics, type SkinConditionEntry, type SkinConditionType, type SkinElasticityLevel, type SkinHydrationLevel, type SkinQualityAssessment, type SkinQualityAssessmentStatus, type SkinQualityScales, type SkinSensitivityLevel, type SkinTextureLevel, type SkinZone, type SkinZoneAssessment, type SmokingStatus, type StoredCancellationMetrics, type StoredClinicAnalytics, type StoredDashboardAnalytics, type StoredNoShowMetrics, type StoredPractitionerAnalytics, type StoredProcedureAnalytics, type StoredRevenueMetrics, type StoredTimeEfficiencyMetrics, type StripeTransactionData, type Subcategory, SubcategoryService, SubscriptionModel, SubscriptionStatus, type SurgicalSiteAssessment, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, TIER_CONFIG, TIME_EFFICIENCY_ANALYTICS_SUBCOLLECTION, type Technology, type TechnologyDocumentationTemplate, TechnologyService, type TextInputElement, type TierConfig, TierLimitError, type TierLimits, type TimeEfficiencyMetrics, type TimeSlot, TimeUnit, type TissueQualityLevel, TreatmentBenefit, type TreatmentBenefitDynamic, type TrendPeriod, USERS_COLLECTION, USER_FORMS_SUBCOLLECTION, type UpdateAestheticAnalysisData, type UpdateAllergyData, type UpdateAppointmentData, type UpdateAppointmentParams, type UpdateBlockingConditionData, type UpdateBlockingEventParams, type UpdateBodyAssessmentData, type UpdateCalendarEventData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateHairScalpAssessmentData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdatePractitionerInviteData, type UpdatePreSurgicalAssessmentData, type UpdateProcedureData, type UpdateSkinQualityAssessmentData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type VitalStats, type WorkingHours, type ZoneItemData, type ZonePhotoUploadData, enforceAppointmentLimit, enforceBranchLimit, enforceMessageLimit, enforceProcedureLimit, enforceProviderLimit, enforceStaffLimit, getEffectiveTier, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseFunctions, getFirebaseInstance, getFirebaseStorage, initializeFirebase, resolveEffectiveTier };
|
package/dist/index.js
CHANGED
|
@@ -89,7 +89,6 @@ __export(index_exports, {
|
|
|
89
89
|
HAIR_SCALP_ASSESSMENT_COLLECTION: () => HAIR_SCALP_ASSESSMENT_COLLECTION,
|
|
90
90
|
HeadingLevel: () => HeadingLevel,
|
|
91
91
|
INVITE_TOKENS_COLLECTION: () => INVITE_TOKENS_COLLECTION,
|
|
92
|
-
LEGACY_TIER_MAP: () => LEGACY_TIER_MAP,
|
|
93
92
|
Language: () => Language,
|
|
94
93
|
ListType: () => ListType,
|
|
95
94
|
MEDIA_METADATA_COLLECTION: () => MEDIA_METADATA_COLLECTION,
|
|
@@ -7851,6 +7850,16 @@ var AppointmentService = class extends BaseService {
|
|
|
7851
7850
|
if (!response.ok) {
|
|
7852
7851
|
const errorText = await response.text();
|
|
7853
7852
|
console.error(`[APPOINTMENT_SERVICE] Error response details: ${errorText}`);
|
|
7853
|
+
try {
|
|
7854
|
+
const errorJson = JSON.parse(errorText);
|
|
7855
|
+
if (errorJson.code === "TIER_LIMIT_EXCEEDED") {
|
|
7856
|
+
throw new Error(`TIER_LIMIT_EXCEEDED:${errorJson.message || "You have reached your plan limit. Please upgrade to continue."}`);
|
|
7857
|
+
}
|
|
7858
|
+
} catch (parseError) {
|
|
7859
|
+
if (parseError instanceof Error && parseError.message.startsWith("TIER_LIMIT_EXCEEDED:")) {
|
|
7860
|
+
throw parseError;
|
|
7861
|
+
}
|
|
7862
|
+
}
|
|
7854
7863
|
throw new Error(
|
|
7855
7864
|
`Failed to create appointment: ${response.status} ${response.statusText} - ${errorText}`
|
|
7856
7865
|
);
|
|
@@ -12740,7 +12749,7 @@ var TIER_CONFIG = {
|
|
|
12740
12749
|
tier: "connect",
|
|
12741
12750
|
name: "Connect",
|
|
12742
12751
|
limits: {
|
|
12743
|
-
maxProviders:
|
|
12752
|
+
maxProviders: -1,
|
|
12744
12753
|
maxProcedures: 15,
|
|
12745
12754
|
maxAppointmentsPerMonth: 100,
|
|
12746
12755
|
maxMessagesPerMonth: -1,
|
|
@@ -12873,17 +12882,15 @@ var DEFAULT_ROLE_PERMISSIONS = {
|
|
|
12873
12882
|
"billing.manage": false
|
|
12874
12883
|
}
|
|
12875
12884
|
};
|
|
12876
|
-
var
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
|
|
12885
|
+
var TIER_MAP = {
|
|
12886
|
+
no_subscription: "free",
|
|
12887
|
+
free: "free",
|
|
12888
|
+
connect: "connect",
|
|
12889
|
+
pro: "pro"
|
|
12880
12890
|
};
|
|
12881
12891
|
function resolveEffectiveTier(subscriptionModel) {
|
|
12882
12892
|
const lower = subscriptionModel.toLowerCase();
|
|
12883
|
-
|
|
12884
|
-
return LEGACY_TIER_MAP[lower];
|
|
12885
|
-
}
|
|
12886
|
-
return lower;
|
|
12893
|
+
return TIER_MAP[lower] || "free";
|
|
12887
12894
|
}
|
|
12888
12895
|
|
|
12889
12896
|
// src/services/tier-enforcement.ts
|
|
@@ -27994,7 +28001,6 @@ var RequirementType = /* @__PURE__ */ ((RequirementType2) => {
|
|
|
27994
28001
|
HAIR_SCALP_ASSESSMENT_COLLECTION,
|
|
27995
28002
|
HeadingLevel,
|
|
27996
28003
|
INVITE_TOKENS_COLLECTION,
|
|
27997
|
-
LEGACY_TIER_MAP,
|
|
27998
28004
|
Language,
|
|
27999
28005
|
ListType,
|
|
28000
28006
|
MEDIA_METADATA_COLLECTION,
|
package/dist/index.mjs
CHANGED
|
@@ -7749,6 +7749,16 @@ var AppointmentService = class extends BaseService {
|
|
|
7749
7749
|
if (!response.ok) {
|
|
7750
7750
|
const errorText = await response.text();
|
|
7751
7751
|
console.error(`[APPOINTMENT_SERVICE] Error response details: ${errorText}`);
|
|
7752
|
+
try {
|
|
7753
|
+
const errorJson = JSON.parse(errorText);
|
|
7754
|
+
if (errorJson.code === "TIER_LIMIT_EXCEEDED") {
|
|
7755
|
+
throw new Error(`TIER_LIMIT_EXCEEDED:${errorJson.message || "You have reached your plan limit. Please upgrade to continue."}`);
|
|
7756
|
+
}
|
|
7757
|
+
} catch (parseError) {
|
|
7758
|
+
if (parseError instanceof Error && parseError.message.startsWith("TIER_LIMIT_EXCEEDED:")) {
|
|
7759
|
+
throw parseError;
|
|
7760
|
+
}
|
|
7761
|
+
}
|
|
7752
7762
|
throw new Error(
|
|
7753
7763
|
`Failed to create appointment: ${response.status} ${response.statusText} - ${errorText}`
|
|
7754
7764
|
);
|
|
@@ -12754,7 +12764,7 @@ var TIER_CONFIG = {
|
|
|
12754
12764
|
tier: "connect",
|
|
12755
12765
|
name: "Connect",
|
|
12756
12766
|
limits: {
|
|
12757
|
-
maxProviders:
|
|
12767
|
+
maxProviders: -1,
|
|
12758
12768
|
maxProcedures: 15,
|
|
12759
12769
|
maxAppointmentsPerMonth: 100,
|
|
12760
12770
|
maxMessagesPerMonth: -1,
|
|
@@ -12887,17 +12897,15 @@ var DEFAULT_ROLE_PERMISSIONS = {
|
|
|
12887
12897
|
"billing.manage": false
|
|
12888
12898
|
}
|
|
12889
12899
|
};
|
|
12890
|
-
var
|
|
12891
|
-
|
|
12892
|
-
|
|
12893
|
-
|
|
12900
|
+
var TIER_MAP = {
|
|
12901
|
+
no_subscription: "free",
|
|
12902
|
+
free: "free",
|
|
12903
|
+
connect: "connect",
|
|
12904
|
+
pro: "pro"
|
|
12894
12905
|
};
|
|
12895
12906
|
function resolveEffectiveTier(subscriptionModel) {
|
|
12896
12907
|
const lower = subscriptionModel.toLowerCase();
|
|
12897
|
-
|
|
12898
|
-
return LEGACY_TIER_MAP[lower];
|
|
12899
|
-
}
|
|
12900
|
-
return lower;
|
|
12908
|
+
return TIER_MAP[lower] || "free";
|
|
12901
12909
|
}
|
|
12902
12910
|
|
|
12903
12911
|
// src/services/tier-enforcement.ts
|
|
@@ -28309,7 +28317,6 @@ export {
|
|
|
28309
28317
|
HAIR_SCALP_ASSESSMENT_COLLECTION,
|
|
28310
28318
|
HeadingLevel,
|
|
28311
28319
|
INVITE_TOKENS_COLLECTION,
|
|
28312
|
-
LEGACY_TIER_MAP,
|
|
28313
28320
|
Language,
|
|
28314
28321
|
ListType,
|
|
28315
28322
|
MEDIA_METADATA_COLLECTION,
|
package/package.json
CHANGED
package/src/config/index.ts
CHANGED
|
@@ -53,10 +53,10 @@ export type PermissionKey = keyof typeof PERMISSION_KEYS;
|
|
|
53
53
|
* All features are available on every tier — tiers differ only in usage caps.
|
|
54
54
|
* -1 means unlimited.
|
|
55
55
|
*
|
|
56
|
-
* Confirmed by client on 2026-03-
|
|
57
|
-
* - Free: 1 provider, 3 procedures, 3 appts/mo, 10 msgs/mo, 1 staff, 1
|
|
58
|
-
* - Connect:
|
|
59
|
-
* - Pro: unlimited everything
|
|
56
|
+
* Confirmed by client on 2026-03-10:
|
|
57
|
+
* - Free: 1 provider, 3 procedures, 3 appts/mo, 10 msgs/mo, 1 staff, 1 location
|
|
58
|
+
* - Connect (CHF 59/mo): unlimited providers, 15 procedures, 100 appts/mo, unlimited msgs, 5 staff, 1 location
|
|
59
|
+
* - Pro (CHF 149/mo): unlimited everything
|
|
60
60
|
*/
|
|
61
61
|
export const TIER_CONFIG: Record<string, TierConfig> = {
|
|
62
62
|
free: {
|
|
@@ -75,7 +75,7 @@ export const TIER_CONFIG: Record<string, TierConfig> = {
|
|
|
75
75
|
tier: 'connect',
|
|
76
76
|
name: 'Connect',
|
|
77
77
|
limits: {
|
|
78
|
-
maxProviders:
|
|
78
|
+
maxProviders: -1,
|
|
79
79
|
maxProcedures: 15,
|
|
80
80
|
maxAppointmentsPerMonth: 100,
|
|
81
81
|
maxMessagesPerMonth: -1,
|
|
@@ -215,23 +215,19 @@ export const DEFAULT_ROLE_PERMISSIONS: Record<ClinicRole, Record<string, boolean
|
|
|
215
215
|
};
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
|
-
* Maps
|
|
219
|
-
* All paid legacy tiers map to PRO.
|
|
218
|
+
* Maps subscription model strings to tier keys.
|
|
220
219
|
*/
|
|
221
|
-
export const
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
220
|
+
export const TIER_MAP: Record<string, string> = {
|
|
221
|
+
no_subscription: 'free',
|
|
222
|
+
free: 'free',
|
|
223
|
+
connect: 'connect',
|
|
224
|
+
pro: 'pro',
|
|
225
225
|
};
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
|
-
* Resolves the effective tier for a subscription model string
|
|
229
|
-
* handling legacy values.
|
|
228
|
+
* Resolves the effective tier for a subscription model string.
|
|
230
229
|
*/
|
|
231
230
|
export function resolveEffectiveTier(subscriptionModel: string): string {
|
|
232
231
|
const lower = subscriptionModel.toLowerCase();
|
|
233
|
-
|
|
234
|
-
return LEGACY_TIER_MAP[lower];
|
|
235
|
-
}
|
|
236
|
-
return lower;
|
|
232
|
+
return TIER_MAP[lower] || 'free';
|
|
237
233
|
}
|
|
@@ -324,6 +324,20 @@ export class AppointmentService extends BaseService {
|
|
|
324
324
|
if (!response.ok) {
|
|
325
325
|
const errorText = await response.text();
|
|
326
326
|
console.error(`[APPOINTMENT_SERVICE] Error response details: ${errorText}`);
|
|
327
|
+
|
|
328
|
+
// Preserve tier limit error code so the frontend can detect it
|
|
329
|
+
try {
|
|
330
|
+
const errorJson = JSON.parse(errorText);
|
|
331
|
+
if (errorJson.code === 'TIER_LIMIT_EXCEEDED') {
|
|
332
|
+
throw new Error(`TIER_LIMIT_EXCEEDED:${errorJson.message || 'You have reached your plan limit. Please upgrade to continue.'}`);
|
|
333
|
+
}
|
|
334
|
+
} catch (parseError) {
|
|
335
|
+
// Not JSON or not a tier error — fall through to generic handling
|
|
336
|
+
if (parseError instanceof Error && parseError.message.startsWith('TIER_LIMIT_EXCEEDED:')) {
|
|
337
|
+
throw parseError;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
327
341
|
throw new Error(
|
|
328
342
|
`Failed to create appointment: ${response.status} ${response.statusText} - ${errorText}`,
|
|
329
343
|
);
|
|
@@ -208,6 +208,8 @@ export interface BillingInfo {
|
|
|
208
208
|
currentPeriodStart: Timestamp | null;
|
|
209
209
|
currentPeriodEnd: Timestamp | null;
|
|
210
210
|
updatedAt: Timestamp;
|
|
211
|
+
seatCount?: number;
|
|
212
|
+
seatPriceId?: string;
|
|
211
213
|
}
|
|
212
214
|
|
|
213
215
|
/**
|
|
@@ -304,6 +306,12 @@ export interface ClinicGroup {
|
|
|
304
306
|
completed?: boolean;
|
|
305
307
|
step?: number;
|
|
306
308
|
};
|
|
309
|
+
featureTrials?: {
|
|
310
|
+
analytics?: {
|
|
311
|
+
startedAt: Timestamp;
|
|
312
|
+
durationDays: number;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
307
315
|
}
|
|
308
316
|
|
|
309
317
|
/**
|
|
@@ -387,6 +395,7 @@ export interface Clinic {
|
|
|
387
395
|
isActive: boolean;
|
|
388
396
|
isVerified: boolean;
|
|
389
397
|
logo?: MediaResource | null;
|
|
398
|
+
acceptingBookings?: boolean;
|
|
390
399
|
}
|
|
391
400
|
|
|
392
401
|
/**
|