@blackcode_sa/metaestetics-api 1.15.17-staging.2 → 1.15.17-staging.4
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/index.d.mts +69 -3
- package/dist/index.d.ts +69 -3
- package/dist/index.js +10 -28
- package/dist/index.mjs +9 -28
- package/package.json +1 -1
- package/src/config/tiers.config.ts +3 -27
- package/src/services/resource/resource.service.ts +1 -1
- package/src/types/clinic/index.ts +5 -0
- package/src/types/clinic/rbac.types.ts +0 -1
- package/src/types/concern/index.ts +66 -0
- package/src/types/index.ts +3 -0
- package/src/validations/clinic.schema.ts +5 -0
package/dist/index.d.mts
CHANGED
|
@@ -4507,6 +4507,67 @@ interface UpdateResourceBlockingEventParams {
|
|
|
4507
4507
|
description?: string;
|
|
4508
4508
|
}
|
|
4509
4509
|
|
|
4510
|
+
/**
|
|
4511
|
+
* Concern Explorer types — patient-facing "Explore by Concern" feature.
|
|
4512
|
+
*
|
|
4513
|
+
* Concerns are editorial content stored in Firestore `concerns` collection,
|
|
4514
|
+
* managed from the Backoffice admin dashboard.
|
|
4515
|
+
*/
|
|
4516
|
+
/** Supported languages for multilingual content */
|
|
4517
|
+
type SupportedLanguage = 'en' | 'fr' | 'de' | 'it';
|
|
4518
|
+
/** Multilingual string — one value per supported language */
|
|
4519
|
+
type LocalizedString = Record<SupportedLanguage, string>;
|
|
4520
|
+
/** Relevance level of a treatment for a specific concern */
|
|
4521
|
+
type TreatmentRelevance = 'reference' | 'very_suitable' | 'suitable';
|
|
4522
|
+
/** A treatment recommended for a concern */
|
|
4523
|
+
interface ConcernTreatment {
|
|
4524
|
+
/** Optional link to existing technology document */
|
|
4525
|
+
technologyId?: string;
|
|
4526
|
+
/** Display name */
|
|
4527
|
+
name: LocalizedString;
|
|
4528
|
+
/** Short description of how it helps */
|
|
4529
|
+
description: LocalizedString;
|
|
4530
|
+
/** How relevant this treatment is for the concern */
|
|
4531
|
+
relevance: TreatmentRelevance;
|
|
4532
|
+
/** Treatment category label (e.g. "Technologie", "Injectable", "Procédure") */
|
|
4533
|
+
type: LocalizedString;
|
|
4534
|
+
/** Info chips (duration, recovery, etc.) */
|
|
4535
|
+
tags: LocalizedString[];
|
|
4536
|
+
/** Display order within the concern */
|
|
4537
|
+
sortOrder: number;
|
|
4538
|
+
}
|
|
4539
|
+
/** A patient-facing aesthetic concern */
|
|
4540
|
+
interface Concern {
|
|
4541
|
+
id: string;
|
|
4542
|
+
/** URL-friendly identifier */
|
|
4543
|
+
slug: string;
|
|
4544
|
+
/** Display name */
|
|
4545
|
+
name: LocalizedString;
|
|
4546
|
+
/** One-liner shown on the card in the list view */
|
|
4547
|
+
shortDescription: LocalizedString;
|
|
4548
|
+
/** Full description shown at top of detail page */
|
|
4549
|
+
longDescription: LocalizedString;
|
|
4550
|
+
/** Educational "Comprendre" section content */
|
|
4551
|
+
explanation: LocalizedString;
|
|
4552
|
+
/** Icon identifier or image URL */
|
|
4553
|
+
icon: string;
|
|
4554
|
+
/** Optional hero image URL */
|
|
4555
|
+
image?: string;
|
|
4556
|
+
/** Recommended treatments, ordered by relevance */
|
|
4557
|
+
treatments: ConcernTreatment[];
|
|
4558
|
+
/** Denormalized count for list view */
|
|
4559
|
+
treatmentCount: number;
|
|
4560
|
+
/** Display order in the list */
|
|
4561
|
+
sortOrder: number;
|
|
4562
|
+
/** Whether this concern is visible to patients */
|
|
4563
|
+
isActive: boolean;
|
|
4564
|
+
/** Firestore timestamps */
|
|
4565
|
+
createdAt?: any;
|
|
4566
|
+
updatedAt?: any;
|
|
4567
|
+
}
|
|
4568
|
+
/** Firestore collection path */
|
|
4569
|
+
declare const CONCERNS_COLLECTION = "concerns";
|
|
4570
|
+
|
|
4510
4571
|
/**
|
|
4511
4572
|
* Dynamic Plan Configuration — stored in Firestore at `system/planConfig`.
|
|
4512
4573
|
* Editable from the admin dashboard. Hardcoded defaults in tiers.config.ts
|
|
@@ -5581,7 +5642,6 @@ interface ProcedureSummaryInfo {
|
|
|
5581
5642
|
declare enum ClinicRole {
|
|
5582
5643
|
OWNER = "owner",
|
|
5583
5644
|
ADMIN = "admin",
|
|
5584
|
-
DOCTOR = "doctor",
|
|
5585
5645
|
RECEPTIONIST = "receptionist",
|
|
5586
5646
|
ASSISTANT = "assistant"
|
|
5587
5647
|
}
|
|
@@ -5760,6 +5820,8 @@ interface ClinicAdmin {
|
|
|
5760
5820
|
clinicsManagedInfo: ClinicInfo[];
|
|
5761
5821
|
contactInfo: ContactPerson;
|
|
5762
5822
|
roleTitle: string;
|
|
5823
|
+
role?: ClinicRole;
|
|
5824
|
+
permissions?: Record<string, boolean>;
|
|
5763
5825
|
createdAt: Timestamp;
|
|
5764
5826
|
updatedAt: Timestamp;
|
|
5765
5827
|
isActive: boolean;
|
|
@@ -5775,6 +5837,8 @@ interface CreateClinicAdminData {
|
|
|
5775
5837
|
clinicsManagedInfo?: ClinicInfo[];
|
|
5776
5838
|
contactInfo: ContactPerson;
|
|
5777
5839
|
roleTitle: string;
|
|
5840
|
+
role?: ClinicRole;
|
|
5841
|
+
permissions?: Record<string, boolean>;
|
|
5778
5842
|
isActive: boolean;
|
|
5779
5843
|
}
|
|
5780
5844
|
/**
|
|
@@ -10196,7 +10260,9 @@ declare const getFirebaseFunctions: () => Promise<Functions>;
|
|
|
10196
10260
|
/**
|
|
10197
10261
|
* Permission keys used for role-based access control.
|
|
10198
10262
|
* Every feature is available on every tier — these only control
|
|
10199
|
-
* what a given role (owner/admin/
|
|
10263
|
+
* what a given role (owner/admin/receptionist/assistant) can do.
|
|
10264
|
+
* New roles can be added by extending the ClinicRole enum and adding
|
|
10265
|
+
* a corresponding entry here.
|
|
10200
10266
|
*/
|
|
10201
10267
|
declare const PERMISSION_KEYS: {
|
|
10202
10268
|
readonly 'clinic.view': true;
|
|
@@ -10269,4 +10335,4 @@ declare const PERMISSION_CATEGORIES: readonly ["Clinic", "Calendar", "Appointmen
|
|
|
10269
10335
|
*/
|
|
10270
10336
|
declare function resolveEffectiveTier(subscriptionModel: string): string;
|
|
10271
10337
|
|
|
10272
|
-
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 BranchAddonDefinition, type BranchAddonTierPrice, 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 ClinicStaffInvite, 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 CreateResourceBlockingEventParams, type CreateResourceData, type CreateSkinQualityAssessmentData, type CreateSyncedCalendarData, type CreateUserData, Currency, DASHBOARD_ANALYTICS_SUBCOLLECTION, DEFAULT_MEDICAL_INFO, DEFAULT_PLAN_CONFIG, 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_CATEGORIES, PERMISSION_KEYS, PERMISSION_LABELS, PLAN_CONFIG_HISTORY_PATH, PLAN_CONFIG_PATH, 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 PlanConfigDocument, type PlanDefinition, 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 ProcedureAddonDefinition, 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, RESOURCES_COLLECTION, RESOURCE_CALENDAR_SUBCOLLECTION, RESOURCE_INSTANCES_SUBCOLLECTION, REVENUE_ANALYTICS_SUBCOLLECTION, REVIEWS_COLLECTION, type RatingScaleElement, type ReadStoredAnalyticsOptions, type RecommendedProcedure, type RequesterInfo, type Requirement, type RequirementInstructionDueNotification, type RequirementSourceProcedure, RequirementType, type Resource, type ResourceBookingInfo, type ResourceCalendarEvent, ResourceCategory, type ResourceInstance, type ResourceRequirement, ResourceService, ResourceStatus, 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 SeatAddonDefinition, 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 StaffDisplayInfo, StaffInviteStatus, 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, type TierDefinition, 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 UpdateResourceBlockingEventParams, type UpdateResourceData, type UpdateSkinQualityAssessmentData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type VitalStats, type WorkingHours, type ZoneItemData, type ZonePhotoUploadData, enforceBranchLimit, enforceProcedureLimit, enforceProviderLimit, getEffectiveTier, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseFunctions, getFirebaseInstance, getFirebaseStorage, initializeFirebase, resolveEffectiveTier };
|
|
10338
|
+
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 BranchAddonDefinition, type BranchAddonTierPrice, type Brand, BrandService, type Break, CALENDAR_COLLECTION, CANCELLATION_ANALYTICS_SUBCOLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_ANALYTICS_SUBCOLLECTION, CLINIC_GROUPS_COLLECTION, CONCERNS_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 ClinicStaffInvite, type ClinicStaffMember, ClinicTag, type ClinicTags, type ClinicalFindingDetail, type ClinicalFindings, type Concern, type ConcernTreatment, 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 CreateResourceBlockingEventParams, type CreateResourceData, type CreateSkinQualityAssessmentData, type CreateSyncedCalendarData, type CreateUserData, Currency, DASHBOARD_ANALYTICS_SUBCOLLECTION, DEFAULT_MEDICAL_INFO, DEFAULT_PLAN_CONFIG, 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 LocalizedString, 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_CATEGORIES, PERMISSION_KEYS, PERMISSION_LABELS, PLAN_CONFIG_HISTORY_PATH, PLAN_CONFIG_PATH, 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 PlanConfigDocument, type PlanDefinition, 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 ProcedureAddonDefinition, 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, RESOURCES_COLLECTION, RESOURCE_CALENDAR_SUBCOLLECTION, RESOURCE_INSTANCES_SUBCOLLECTION, REVENUE_ANALYTICS_SUBCOLLECTION, REVIEWS_COLLECTION, type RatingScaleElement, type ReadStoredAnalyticsOptions, type RecommendedProcedure, type RequesterInfo, type Requirement, type RequirementInstructionDueNotification, type RequirementSourceProcedure, RequirementType, type Resource, type ResourceBookingInfo, type ResourceCalendarEvent, ResourceCategory, type ResourceInstance, type ResourceRequirement, ResourceService, ResourceStatus, 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 SeatAddonDefinition, 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 StaffDisplayInfo, StaffInviteStatus, type StoredCancellationMetrics, type StoredClinicAnalytics, type StoredDashboardAnalytics, type StoredNoShowMetrics, type StoredPractitionerAnalytics, type StoredProcedureAnalytics, type StoredRevenueMetrics, type StoredTimeEfficiencyMetrics, type StripeTransactionData, type Subcategory, SubcategoryService, SubscriptionModel, SubscriptionStatus, type SupportedLanguage, type SurgicalSiteAssessment, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, TIER_CONFIG, TIME_EFFICIENCY_ANALYTICS_SUBCOLLECTION, type Technology, type TechnologyDocumentationTemplate, TechnologyService, type TextInputElement, type TierConfig, type TierDefinition, TierLimitError, type TierLimits, type TimeEfficiencyMetrics, type TimeSlot, TimeUnit, type TissueQualityLevel, TreatmentBenefit, type TreatmentBenefitDynamic, type TreatmentRelevance, 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 UpdateResourceBlockingEventParams, type UpdateResourceData, type UpdateSkinQualityAssessmentData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type VitalStats, type WorkingHours, type ZoneItemData, type ZonePhotoUploadData, enforceBranchLimit, enforceProcedureLimit, enforceProviderLimit, getEffectiveTier, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseFunctions, getFirebaseInstance, getFirebaseStorage, initializeFirebase, resolveEffectiveTier };
|
package/dist/index.d.ts
CHANGED
|
@@ -4507,6 +4507,67 @@ interface UpdateResourceBlockingEventParams {
|
|
|
4507
4507
|
description?: string;
|
|
4508
4508
|
}
|
|
4509
4509
|
|
|
4510
|
+
/**
|
|
4511
|
+
* Concern Explorer types — patient-facing "Explore by Concern" feature.
|
|
4512
|
+
*
|
|
4513
|
+
* Concerns are editorial content stored in Firestore `concerns` collection,
|
|
4514
|
+
* managed from the Backoffice admin dashboard.
|
|
4515
|
+
*/
|
|
4516
|
+
/** Supported languages for multilingual content */
|
|
4517
|
+
type SupportedLanguage = 'en' | 'fr' | 'de' | 'it';
|
|
4518
|
+
/** Multilingual string — one value per supported language */
|
|
4519
|
+
type LocalizedString = Record<SupportedLanguage, string>;
|
|
4520
|
+
/** Relevance level of a treatment for a specific concern */
|
|
4521
|
+
type TreatmentRelevance = 'reference' | 'very_suitable' | 'suitable';
|
|
4522
|
+
/** A treatment recommended for a concern */
|
|
4523
|
+
interface ConcernTreatment {
|
|
4524
|
+
/** Optional link to existing technology document */
|
|
4525
|
+
technologyId?: string;
|
|
4526
|
+
/** Display name */
|
|
4527
|
+
name: LocalizedString;
|
|
4528
|
+
/** Short description of how it helps */
|
|
4529
|
+
description: LocalizedString;
|
|
4530
|
+
/** How relevant this treatment is for the concern */
|
|
4531
|
+
relevance: TreatmentRelevance;
|
|
4532
|
+
/** Treatment category label (e.g. "Technologie", "Injectable", "Procédure") */
|
|
4533
|
+
type: LocalizedString;
|
|
4534
|
+
/** Info chips (duration, recovery, etc.) */
|
|
4535
|
+
tags: LocalizedString[];
|
|
4536
|
+
/** Display order within the concern */
|
|
4537
|
+
sortOrder: number;
|
|
4538
|
+
}
|
|
4539
|
+
/** A patient-facing aesthetic concern */
|
|
4540
|
+
interface Concern {
|
|
4541
|
+
id: string;
|
|
4542
|
+
/** URL-friendly identifier */
|
|
4543
|
+
slug: string;
|
|
4544
|
+
/** Display name */
|
|
4545
|
+
name: LocalizedString;
|
|
4546
|
+
/** One-liner shown on the card in the list view */
|
|
4547
|
+
shortDescription: LocalizedString;
|
|
4548
|
+
/** Full description shown at top of detail page */
|
|
4549
|
+
longDescription: LocalizedString;
|
|
4550
|
+
/** Educational "Comprendre" section content */
|
|
4551
|
+
explanation: LocalizedString;
|
|
4552
|
+
/** Icon identifier or image URL */
|
|
4553
|
+
icon: string;
|
|
4554
|
+
/** Optional hero image URL */
|
|
4555
|
+
image?: string;
|
|
4556
|
+
/** Recommended treatments, ordered by relevance */
|
|
4557
|
+
treatments: ConcernTreatment[];
|
|
4558
|
+
/** Denormalized count for list view */
|
|
4559
|
+
treatmentCount: number;
|
|
4560
|
+
/** Display order in the list */
|
|
4561
|
+
sortOrder: number;
|
|
4562
|
+
/** Whether this concern is visible to patients */
|
|
4563
|
+
isActive: boolean;
|
|
4564
|
+
/** Firestore timestamps */
|
|
4565
|
+
createdAt?: any;
|
|
4566
|
+
updatedAt?: any;
|
|
4567
|
+
}
|
|
4568
|
+
/** Firestore collection path */
|
|
4569
|
+
declare const CONCERNS_COLLECTION = "concerns";
|
|
4570
|
+
|
|
4510
4571
|
/**
|
|
4511
4572
|
* Dynamic Plan Configuration — stored in Firestore at `system/planConfig`.
|
|
4512
4573
|
* Editable from the admin dashboard. Hardcoded defaults in tiers.config.ts
|
|
@@ -5581,7 +5642,6 @@ interface ProcedureSummaryInfo {
|
|
|
5581
5642
|
declare enum ClinicRole {
|
|
5582
5643
|
OWNER = "owner",
|
|
5583
5644
|
ADMIN = "admin",
|
|
5584
|
-
DOCTOR = "doctor",
|
|
5585
5645
|
RECEPTIONIST = "receptionist",
|
|
5586
5646
|
ASSISTANT = "assistant"
|
|
5587
5647
|
}
|
|
@@ -5760,6 +5820,8 @@ interface ClinicAdmin {
|
|
|
5760
5820
|
clinicsManagedInfo: ClinicInfo[];
|
|
5761
5821
|
contactInfo: ContactPerson;
|
|
5762
5822
|
roleTitle: string;
|
|
5823
|
+
role?: ClinicRole;
|
|
5824
|
+
permissions?: Record<string, boolean>;
|
|
5763
5825
|
createdAt: Timestamp;
|
|
5764
5826
|
updatedAt: Timestamp;
|
|
5765
5827
|
isActive: boolean;
|
|
@@ -5775,6 +5837,8 @@ interface CreateClinicAdminData {
|
|
|
5775
5837
|
clinicsManagedInfo?: ClinicInfo[];
|
|
5776
5838
|
contactInfo: ContactPerson;
|
|
5777
5839
|
roleTitle: string;
|
|
5840
|
+
role?: ClinicRole;
|
|
5841
|
+
permissions?: Record<string, boolean>;
|
|
5778
5842
|
isActive: boolean;
|
|
5779
5843
|
}
|
|
5780
5844
|
/**
|
|
@@ -10196,7 +10260,9 @@ declare const getFirebaseFunctions: () => Promise<Functions>;
|
|
|
10196
10260
|
/**
|
|
10197
10261
|
* Permission keys used for role-based access control.
|
|
10198
10262
|
* Every feature is available on every tier — these only control
|
|
10199
|
-
* what a given role (owner/admin/
|
|
10263
|
+
* what a given role (owner/admin/receptionist/assistant) can do.
|
|
10264
|
+
* New roles can be added by extending the ClinicRole enum and adding
|
|
10265
|
+
* a corresponding entry here.
|
|
10200
10266
|
*/
|
|
10201
10267
|
declare const PERMISSION_KEYS: {
|
|
10202
10268
|
readonly 'clinic.view': true;
|
|
@@ -10269,4 +10335,4 @@ declare const PERMISSION_CATEGORIES: readonly ["Clinic", "Calendar", "Appointmen
|
|
|
10269
10335
|
*/
|
|
10270
10336
|
declare function resolveEffectiveTier(subscriptionModel: string): string;
|
|
10271
10337
|
|
|
10272
|
-
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 BranchAddonDefinition, type BranchAddonTierPrice, 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 ClinicStaffInvite, 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 CreateResourceBlockingEventParams, type CreateResourceData, type CreateSkinQualityAssessmentData, type CreateSyncedCalendarData, type CreateUserData, Currency, DASHBOARD_ANALYTICS_SUBCOLLECTION, DEFAULT_MEDICAL_INFO, DEFAULT_PLAN_CONFIG, 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_CATEGORIES, PERMISSION_KEYS, PERMISSION_LABELS, PLAN_CONFIG_HISTORY_PATH, PLAN_CONFIG_PATH, 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 PlanConfigDocument, type PlanDefinition, 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 ProcedureAddonDefinition, 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, RESOURCES_COLLECTION, RESOURCE_CALENDAR_SUBCOLLECTION, RESOURCE_INSTANCES_SUBCOLLECTION, REVENUE_ANALYTICS_SUBCOLLECTION, REVIEWS_COLLECTION, type RatingScaleElement, type ReadStoredAnalyticsOptions, type RecommendedProcedure, type RequesterInfo, type Requirement, type RequirementInstructionDueNotification, type RequirementSourceProcedure, RequirementType, type Resource, type ResourceBookingInfo, type ResourceCalendarEvent, ResourceCategory, type ResourceInstance, type ResourceRequirement, ResourceService, ResourceStatus, 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 SeatAddonDefinition, 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 StaffDisplayInfo, StaffInviteStatus, 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, type TierDefinition, 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 UpdateResourceBlockingEventParams, type UpdateResourceData, type UpdateSkinQualityAssessmentData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type VitalStats, type WorkingHours, type ZoneItemData, type ZonePhotoUploadData, enforceBranchLimit, enforceProcedureLimit, enforceProviderLimit, getEffectiveTier, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseFunctions, getFirebaseInstance, getFirebaseStorage, initializeFirebase, resolveEffectiveTier };
|
|
10338
|
+
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 BranchAddonDefinition, type BranchAddonTierPrice, type Brand, BrandService, type Break, CALENDAR_COLLECTION, CANCELLATION_ANALYTICS_SUBCOLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_ANALYTICS_SUBCOLLECTION, CLINIC_GROUPS_COLLECTION, CONCERNS_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 ClinicStaffInvite, type ClinicStaffMember, ClinicTag, type ClinicTags, type ClinicalFindingDetail, type ClinicalFindings, type Concern, type ConcernTreatment, 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 CreateResourceBlockingEventParams, type CreateResourceData, type CreateSkinQualityAssessmentData, type CreateSyncedCalendarData, type CreateUserData, Currency, DASHBOARD_ANALYTICS_SUBCOLLECTION, DEFAULT_MEDICAL_INFO, DEFAULT_PLAN_CONFIG, 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 LocalizedString, 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_CATEGORIES, PERMISSION_KEYS, PERMISSION_LABELS, PLAN_CONFIG_HISTORY_PATH, PLAN_CONFIG_PATH, 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 PlanConfigDocument, type PlanDefinition, 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 ProcedureAddonDefinition, 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, RESOURCES_COLLECTION, RESOURCE_CALENDAR_SUBCOLLECTION, RESOURCE_INSTANCES_SUBCOLLECTION, REVENUE_ANALYTICS_SUBCOLLECTION, REVIEWS_COLLECTION, type RatingScaleElement, type ReadStoredAnalyticsOptions, type RecommendedProcedure, type RequesterInfo, type Requirement, type RequirementInstructionDueNotification, type RequirementSourceProcedure, RequirementType, type Resource, type ResourceBookingInfo, type ResourceCalendarEvent, ResourceCategory, type ResourceInstance, type ResourceRequirement, ResourceService, ResourceStatus, 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 SeatAddonDefinition, 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 StaffDisplayInfo, StaffInviteStatus, type StoredCancellationMetrics, type StoredClinicAnalytics, type StoredDashboardAnalytics, type StoredNoShowMetrics, type StoredPractitionerAnalytics, type StoredProcedureAnalytics, type StoredRevenueMetrics, type StoredTimeEfficiencyMetrics, type StripeTransactionData, type Subcategory, SubcategoryService, SubscriptionModel, SubscriptionStatus, type SupportedLanguage, type SurgicalSiteAssessment, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, TIER_CONFIG, TIME_EFFICIENCY_ANALYTICS_SUBCOLLECTION, type Technology, type TechnologyDocumentationTemplate, TechnologyService, type TextInputElement, type TierConfig, type TierDefinition, TierLimitError, type TierLimits, type TimeEfficiencyMetrics, type TimeSlot, TimeUnit, type TissueQualityLevel, TreatmentBenefit, type TreatmentBenefitDynamic, type TreatmentRelevance, 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 UpdateResourceBlockingEventParams, type UpdateResourceData, type UpdateSkinQualityAssessmentData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type VitalStats, type WorkingHours, type ZoneItemData, type ZonePhotoUploadData, enforceBranchLimit, enforceProcedureLimit, enforceProviderLimit, getEffectiveTier, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseFunctions, getFirebaseInstance, getFirebaseStorage, initializeFirebase, resolveEffectiveTier };
|
package/dist/index.js
CHANGED
|
@@ -53,6 +53,7 @@ __export(index_exports, {
|
|
|
53
53
|
CLINIC_ADMINS_COLLECTION: () => CLINIC_ADMINS_COLLECTION,
|
|
54
54
|
CLINIC_ANALYTICS_SUBCOLLECTION: () => CLINIC_ANALYTICS_SUBCOLLECTION,
|
|
55
55
|
CLINIC_GROUPS_COLLECTION: () => CLINIC_GROUPS_COLLECTION,
|
|
56
|
+
CONCERNS_COLLECTION: () => CONCERNS_COLLECTION,
|
|
56
57
|
CalendarEventStatus: () => CalendarEventStatus,
|
|
57
58
|
CalendarEventType: () => CalendarEventType,
|
|
58
59
|
CalendarServiceV2: () => CalendarServiceV2,
|
|
@@ -650,7 +651,6 @@ var PractitionerInviteStatus = /* @__PURE__ */ ((PractitionerInviteStatus2) => {
|
|
|
650
651
|
var ClinicRole = /* @__PURE__ */ ((ClinicRole2) => {
|
|
651
652
|
ClinicRole2["OWNER"] = "owner";
|
|
652
653
|
ClinicRole2["ADMIN"] = "admin";
|
|
653
|
-
ClinicRole2["DOCTOR"] = "doctor";
|
|
654
654
|
ClinicRole2["RECEPTIONIST"] = "receptionist";
|
|
655
655
|
ClinicRole2["ASSISTANT"] = "assistant";
|
|
656
656
|
return ClinicRole2;
|
|
@@ -4797,6 +4797,9 @@ var ResourceStatus = /* @__PURE__ */ ((ResourceStatus2) => {
|
|
|
4797
4797
|
return ResourceStatus2;
|
|
4798
4798
|
})(ResourceStatus || {});
|
|
4799
4799
|
|
|
4800
|
+
// src/types/concern/index.ts
|
|
4801
|
+
var CONCERNS_COLLECTION = "concerns";
|
|
4802
|
+
|
|
4800
4803
|
// src/types/system/planConfig.types.ts
|
|
4801
4804
|
var PLAN_CONFIG_PATH = "system/planConfig";
|
|
4802
4805
|
var PLAN_CONFIG_HISTORY_PATH = "system/planConfig/history";
|
|
@@ -5712,6 +5715,8 @@ var clinicAdminSchema = import_zod9.z.object({
|
|
|
5712
5715
|
clinicsManagedInfo: import_zod9.z.array(clinicInfoSchema),
|
|
5713
5716
|
contactInfo: contactPersonSchema,
|
|
5714
5717
|
roleTitle: import_zod9.z.string(),
|
|
5718
|
+
role: import_zod9.z.nativeEnum(ClinicRole).optional(),
|
|
5719
|
+
permissions: import_zod9.z.record(import_zod9.z.string(), import_zod9.z.boolean()).optional(),
|
|
5715
5720
|
createdAt: import_zod9.z.instanceof(Date).or(import_zod9.z.instanceof(import_firestore9.Timestamp)),
|
|
5716
5721
|
updatedAt: import_zod9.z.instanceof(Date).or(import_zod9.z.instanceof(import_firestore9.Timestamp)),
|
|
5717
5722
|
isActive: import_zod9.z.boolean()
|
|
@@ -5848,6 +5853,8 @@ var createClinicAdminSchema = import_zod9.z.object({
|
|
|
5848
5853
|
clinicsManaged: import_zod9.z.array(import_zod9.z.string()),
|
|
5849
5854
|
contactInfo: contactPersonSchema,
|
|
5850
5855
|
roleTitle: import_zod9.z.string(),
|
|
5856
|
+
role: import_zod9.z.nativeEnum(ClinicRole).optional(),
|
|
5857
|
+
permissions: import_zod9.z.record(import_zod9.z.string(), import_zod9.z.boolean()).optional(),
|
|
5851
5858
|
isActive: import_zod9.z.boolean()
|
|
5852
5859
|
// clinicsManagedInfo is aggregated, not provided on creation
|
|
5853
5860
|
});
|
|
@@ -12862,32 +12869,6 @@ var DEFAULT_ROLE_PERMISSIONS = {
|
|
|
12862
12869
|
"settings.manage": true,
|
|
12863
12870
|
"billing.manage": false
|
|
12864
12871
|
},
|
|
12865
|
-
["doctor" /* DOCTOR */]: {
|
|
12866
|
-
"clinic.view": true,
|
|
12867
|
-
"clinic.edit": false,
|
|
12868
|
-
"reviews.view": true,
|
|
12869
|
-
"calendar.view": true,
|
|
12870
|
-
"appointments.view": true,
|
|
12871
|
-
"appointments.confirm": true,
|
|
12872
|
-
"appointments.cancel": true,
|
|
12873
|
-
"messaging": true,
|
|
12874
|
-
"procedures.view": true,
|
|
12875
|
-
"procedures.create": false,
|
|
12876
|
-
"procedures.edit": false,
|
|
12877
|
-
"procedures.delete": false,
|
|
12878
|
-
"resources.view": true,
|
|
12879
|
-
"resources.create": false,
|
|
12880
|
-
"resources.edit": false,
|
|
12881
|
-
"resources.delete": false,
|
|
12882
|
-
"patients.view": true,
|
|
12883
|
-
"patients.edit": true,
|
|
12884
|
-
"providers.view": true,
|
|
12885
|
-
"providers.manage": false,
|
|
12886
|
-
"analytics.view": true,
|
|
12887
|
-
"staff.manage": false,
|
|
12888
|
-
"settings.manage": false,
|
|
12889
|
-
"billing.manage": false
|
|
12890
|
-
},
|
|
12891
12872
|
["receptionist" /* RECEPTIONIST */]: {
|
|
12892
12873
|
"clinic.view": true,
|
|
12893
12874
|
"clinic.edit": false,
|
|
@@ -25101,7 +25082,7 @@ var ResourceService = class extends BaseService {
|
|
|
25101
25082
|
name: data.name,
|
|
25102
25083
|
nameLower: data.name.toLowerCase(),
|
|
25103
25084
|
category: data.category,
|
|
25104
|
-
description: data.description ||
|
|
25085
|
+
description: data.description || "",
|
|
25105
25086
|
quantity: data.quantity,
|
|
25106
25087
|
status: "active" /* ACTIVE */,
|
|
25107
25088
|
linkedProcedureIds: [],
|
|
@@ -28593,6 +28574,7 @@ var RequirementType = /* @__PURE__ */ ((RequirementType2) => {
|
|
|
28593
28574
|
CLINIC_ADMINS_COLLECTION,
|
|
28594
28575
|
CLINIC_ANALYTICS_SUBCOLLECTION,
|
|
28595
28576
|
CLINIC_GROUPS_COLLECTION,
|
|
28577
|
+
CONCERNS_COLLECTION,
|
|
28596
28578
|
CalendarEventStatus,
|
|
28597
28579
|
CalendarEventType,
|
|
28598
28580
|
CalendarServiceV2,
|
package/dist/index.mjs
CHANGED
|
@@ -466,7 +466,6 @@ var PractitionerInviteStatus = /* @__PURE__ */ ((PractitionerInviteStatus2) => {
|
|
|
466
466
|
var ClinicRole = /* @__PURE__ */ ((ClinicRole2) => {
|
|
467
467
|
ClinicRole2["OWNER"] = "owner";
|
|
468
468
|
ClinicRole2["ADMIN"] = "admin";
|
|
469
|
-
ClinicRole2["DOCTOR"] = "doctor";
|
|
470
469
|
ClinicRole2["RECEPTIONIST"] = "receptionist";
|
|
471
470
|
ClinicRole2["ASSISTANT"] = "assistant";
|
|
472
471
|
return ClinicRole2;
|
|
@@ -4666,6 +4665,9 @@ var ResourceStatus = /* @__PURE__ */ ((ResourceStatus2) => {
|
|
|
4666
4665
|
return ResourceStatus2;
|
|
4667
4666
|
})(ResourceStatus || {});
|
|
4668
4667
|
|
|
4668
|
+
// src/types/concern/index.ts
|
|
4669
|
+
var CONCERNS_COLLECTION = "concerns";
|
|
4670
|
+
|
|
4669
4671
|
// src/types/system/planConfig.types.ts
|
|
4670
4672
|
var PLAN_CONFIG_PATH = "system/planConfig";
|
|
4671
4673
|
var PLAN_CONFIG_HISTORY_PATH = "system/planConfig/history";
|
|
@@ -5602,6 +5604,8 @@ var clinicAdminSchema = z9.object({
|
|
|
5602
5604
|
clinicsManagedInfo: z9.array(clinicInfoSchema),
|
|
5603
5605
|
contactInfo: contactPersonSchema,
|
|
5604
5606
|
roleTitle: z9.string(),
|
|
5607
|
+
role: z9.nativeEnum(ClinicRole).optional(),
|
|
5608
|
+
permissions: z9.record(z9.string(), z9.boolean()).optional(),
|
|
5605
5609
|
createdAt: z9.instanceof(Date).or(z9.instanceof(Timestamp7)),
|
|
5606
5610
|
updatedAt: z9.instanceof(Date).or(z9.instanceof(Timestamp7)),
|
|
5607
5611
|
isActive: z9.boolean()
|
|
@@ -5738,6 +5742,8 @@ var createClinicAdminSchema = z9.object({
|
|
|
5738
5742
|
clinicsManaged: z9.array(z9.string()),
|
|
5739
5743
|
contactInfo: contactPersonSchema,
|
|
5740
5744
|
roleTitle: z9.string(),
|
|
5745
|
+
role: z9.nativeEnum(ClinicRole).optional(),
|
|
5746
|
+
permissions: z9.record(z9.string(), z9.boolean()).optional(),
|
|
5741
5747
|
isActive: z9.boolean()
|
|
5742
5748
|
// clinicsManagedInfo is aggregated, not provided on creation
|
|
5743
5749
|
});
|
|
@@ -12868,32 +12874,6 @@ var DEFAULT_ROLE_PERMISSIONS = {
|
|
|
12868
12874
|
"settings.manage": true,
|
|
12869
12875
|
"billing.manage": false
|
|
12870
12876
|
},
|
|
12871
|
-
["doctor" /* DOCTOR */]: {
|
|
12872
|
-
"clinic.view": true,
|
|
12873
|
-
"clinic.edit": false,
|
|
12874
|
-
"reviews.view": true,
|
|
12875
|
-
"calendar.view": true,
|
|
12876
|
-
"appointments.view": true,
|
|
12877
|
-
"appointments.confirm": true,
|
|
12878
|
-
"appointments.cancel": true,
|
|
12879
|
-
"messaging": true,
|
|
12880
|
-
"procedures.view": true,
|
|
12881
|
-
"procedures.create": false,
|
|
12882
|
-
"procedures.edit": false,
|
|
12883
|
-
"procedures.delete": false,
|
|
12884
|
-
"resources.view": true,
|
|
12885
|
-
"resources.create": false,
|
|
12886
|
-
"resources.edit": false,
|
|
12887
|
-
"resources.delete": false,
|
|
12888
|
-
"patients.view": true,
|
|
12889
|
-
"patients.edit": true,
|
|
12890
|
-
"providers.view": true,
|
|
12891
|
-
"providers.manage": false,
|
|
12892
|
-
"analytics.view": true,
|
|
12893
|
-
"staff.manage": false,
|
|
12894
|
-
"settings.manage": false,
|
|
12895
|
-
"billing.manage": false
|
|
12896
|
-
},
|
|
12897
12877
|
["receptionist" /* RECEPTIONIST */]: {
|
|
12898
12878
|
"clinic.view": true,
|
|
12899
12879
|
"clinic.edit": false,
|
|
@@ -25335,7 +25315,7 @@ var ResourceService = class extends BaseService {
|
|
|
25335
25315
|
name: data.name,
|
|
25336
25316
|
nameLower: data.name.toLowerCase(),
|
|
25337
25317
|
category: data.category,
|
|
25338
|
-
description: data.description ||
|
|
25318
|
+
description: data.description || "",
|
|
25339
25319
|
quantity: data.quantity,
|
|
25340
25320
|
status: "active" /* ACTIVE */,
|
|
25341
25321
|
linkedProcedureIds: [],
|
|
@@ -28914,6 +28894,7 @@ export {
|
|
|
28914
28894
|
CLINIC_ADMINS_COLLECTION,
|
|
28915
28895
|
CLINIC_ANALYTICS_SUBCOLLECTION,
|
|
28916
28896
|
CLINIC_GROUPS_COLLECTION,
|
|
28897
|
+
CONCERNS_COLLECTION,
|
|
28917
28898
|
CalendarEventStatus,
|
|
28918
28899
|
CalendarEventType,
|
|
28919
28900
|
CalendarServiceV2,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blackcode_sa/metaestetics-api",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.15.17-staging.
|
|
4
|
+
"version": "1.15.17-staging.4",
|
|
5
5
|
"description": "Firebase authentication service with anonymous upgrade support",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.mjs",
|
|
@@ -5,7 +5,9 @@ import type { PlanConfigDocument } from '../types/system/planConfig.types';
|
|
|
5
5
|
/**
|
|
6
6
|
* Permission keys used for role-based access control.
|
|
7
7
|
* Every feature is available on every tier — these only control
|
|
8
|
-
* what a given role (owner/admin/
|
|
8
|
+
* what a given role (owner/admin/receptionist/assistant) can do.
|
|
9
|
+
* New roles can be added by extending the ClinicRole enum and adding
|
|
10
|
+
* a corresponding entry here.
|
|
9
11
|
*/
|
|
10
12
|
export const PERMISSION_KEYS = {
|
|
11
13
|
// Listing & profile
|
|
@@ -157,32 +159,6 @@ export const DEFAULT_ROLE_PERMISSIONS: Record<ClinicRole, Record<string, boolean
|
|
|
157
159
|
'settings.manage': true,
|
|
158
160
|
'billing.manage': false,
|
|
159
161
|
},
|
|
160
|
-
[ClinicRole.DOCTOR]: {
|
|
161
|
-
'clinic.view': true,
|
|
162
|
-
'clinic.edit': false,
|
|
163
|
-
'reviews.view': true,
|
|
164
|
-
'calendar.view': true,
|
|
165
|
-
'appointments.view': true,
|
|
166
|
-
'appointments.confirm': true,
|
|
167
|
-
'appointments.cancel': true,
|
|
168
|
-
'messaging': true,
|
|
169
|
-
'procedures.view': true,
|
|
170
|
-
'procedures.create': false,
|
|
171
|
-
'procedures.edit': false,
|
|
172
|
-
'procedures.delete': false,
|
|
173
|
-
'resources.view': true,
|
|
174
|
-
'resources.create': false,
|
|
175
|
-
'resources.edit': false,
|
|
176
|
-
'resources.delete': false,
|
|
177
|
-
'patients.view': true,
|
|
178
|
-
'patients.edit': true,
|
|
179
|
-
'providers.view': true,
|
|
180
|
-
'providers.manage': false,
|
|
181
|
-
'analytics.view': true,
|
|
182
|
-
'staff.manage': false,
|
|
183
|
-
'settings.manage': false,
|
|
184
|
-
'billing.manage': false,
|
|
185
|
-
},
|
|
186
162
|
[ClinicRole.RECEPTIONIST]: {
|
|
187
163
|
'clinic.view': true,
|
|
188
164
|
'clinic.edit': false,
|
|
@@ -116,7 +116,7 @@ export class ResourceService extends BaseService {
|
|
|
116
116
|
name: data.name,
|
|
117
117
|
nameLower: data.name.toLowerCase(),
|
|
118
118
|
category: data.category,
|
|
119
|
-
description: data.description ||
|
|
119
|
+
description: data.description || "",
|
|
120
120
|
quantity: data.quantity,
|
|
121
121
|
status: ResourceStatus.ACTIVE,
|
|
122
122
|
linkedProcedureIds: [],
|
|
@@ -3,6 +3,7 @@ import { Timestamp, FieldValue } from 'firebase/firestore';
|
|
|
3
3
|
import type { ClinicInfo } from '../profile';
|
|
4
4
|
import { ClinicReviewInfo } from '../reviews';
|
|
5
5
|
import { ProcedureSummaryInfo } from '../procedure';
|
|
6
|
+
import { ClinicRole } from './rbac.types';
|
|
6
7
|
|
|
7
8
|
export const CLINIC_GROUPS_COLLECTION = 'clinic_groups';
|
|
8
9
|
export const CLINIC_ADMINS_COLLECTION = 'clinic_admins';
|
|
@@ -110,6 +111,8 @@ export interface ClinicAdmin {
|
|
|
110
111
|
clinicsManagedInfo: ClinicInfo[];
|
|
111
112
|
contactInfo: ContactPerson;
|
|
112
113
|
roleTitle: string;
|
|
114
|
+
role?: ClinicRole;
|
|
115
|
+
permissions?: Record<string, boolean>;
|
|
113
116
|
createdAt: Timestamp;
|
|
114
117
|
updatedAt: Timestamp;
|
|
115
118
|
isActive: boolean;
|
|
@@ -126,6 +129,8 @@ export interface CreateClinicAdminData {
|
|
|
126
129
|
clinicsManagedInfo?: ClinicInfo[];
|
|
127
130
|
contactInfo: ContactPerson;
|
|
128
131
|
roleTitle: string;
|
|
132
|
+
role?: ClinicRole;
|
|
133
|
+
permissions?: Record<string, boolean>;
|
|
129
134
|
isActive: boolean;
|
|
130
135
|
}
|
|
131
136
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Concern Explorer types — patient-facing "Explore by Concern" feature.
|
|
3
|
+
*
|
|
4
|
+
* Concerns are editorial content stored in Firestore `concerns` collection,
|
|
5
|
+
* managed from the Backoffice admin dashboard.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** Supported languages for multilingual content */
|
|
9
|
+
export type SupportedLanguage = 'en' | 'fr' | 'de' | 'it';
|
|
10
|
+
|
|
11
|
+
/** Multilingual string — one value per supported language */
|
|
12
|
+
export type LocalizedString = Record<SupportedLanguage, string>;
|
|
13
|
+
|
|
14
|
+
/** Relevance level of a treatment for a specific concern */
|
|
15
|
+
export type TreatmentRelevance = 'reference' | 'very_suitable' | 'suitable';
|
|
16
|
+
|
|
17
|
+
/** A treatment recommended for a concern */
|
|
18
|
+
export interface ConcernTreatment {
|
|
19
|
+
/** Optional link to existing technology document */
|
|
20
|
+
technologyId?: string;
|
|
21
|
+
/** Display name */
|
|
22
|
+
name: LocalizedString;
|
|
23
|
+
/** Short description of how it helps */
|
|
24
|
+
description: LocalizedString;
|
|
25
|
+
/** How relevant this treatment is for the concern */
|
|
26
|
+
relevance: TreatmentRelevance;
|
|
27
|
+
/** Treatment category label (e.g. "Technologie", "Injectable", "Procédure") */
|
|
28
|
+
type: LocalizedString;
|
|
29
|
+
/** Info chips (duration, recovery, etc.) */
|
|
30
|
+
tags: LocalizedString[];
|
|
31
|
+
/** Display order within the concern */
|
|
32
|
+
sortOrder: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** A patient-facing aesthetic concern */
|
|
36
|
+
export interface Concern {
|
|
37
|
+
id: string;
|
|
38
|
+
/** URL-friendly identifier */
|
|
39
|
+
slug: string;
|
|
40
|
+
/** Display name */
|
|
41
|
+
name: LocalizedString;
|
|
42
|
+
/** One-liner shown on the card in the list view */
|
|
43
|
+
shortDescription: LocalizedString;
|
|
44
|
+
/** Full description shown at top of detail page */
|
|
45
|
+
longDescription: LocalizedString;
|
|
46
|
+
/** Educational "Comprendre" section content */
|
|
47
|
+
explanation: LocalizedString;
|
|
48
|
+
/** Icon identifier or image URL */
|
|
49
|
+
icon: string;
|
|
50
|
+
/** Optional hero image URL */
|
|
51
|
+
image?: string;
|
|
52
|
+
/** Recommended treatments, ordered by relevance */
|
|
53
|
+
treatments: ConcernTreatment[];
|
|
54
|
+
/** Denormalized count for list view */
|
|
55
|
+
treatmentCount: number;
|
|
56
|
+
/** Display order in the list */
|
|
57
|
+
sortOrder: number;
|
|
58
|
+
/** Whether this concern is visible to patients */
|
|
59
|
+
isActive: boolean;
|
|
60
|
+
/** Firestore timestamps */
|
|
61
|
+
createdAt?: any;
|
|
62
|
+
updatedAt?: any;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Firestore collection path */
|
|
66
|
+
export const CONCERNS_COLLECTION = 'concerns';
|
package/src/types/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
BillingTransactionType,
|
|
9
9
|
PracticeType,
|
|
10
10
|
Language,
|
|
11
|
+
ClinicRole,
|
|
11
12
|
} from '../types/clinic';
|
|
12
13
|
|
|
13
14
|
import { clinicReviewInfoSchema } from './reviews.schema';
|
|
@@ -126,6 +127,8 @@ export const clinicAdminSchema = z.object({
|
|
|
126
127
|
clinicsManagedInfo: z.array(clinicInfoSchema),
|
|
127
128
|
contactInfo: contactPersonSchema,
|
|
128
129
|
roleTitle: z.string(),
|
|
130
|
+
role: z.nativeEnum(ClinicRole).optional(),
|
|
131
|
+
permissions: z.record(z.string(), z.boolean()).optional(),
|
|
129
132
|
createdAt: z.instanceof(Date).or(z.instanceof(Timestamp)),
|
|
130
133
|
updatedAt: z.instanceof(Date).or(z.instanceof(Timestamp)),
|
|
131
134
|
isActive: z.boolean(),
|
|
@@ -296,6 +299,8 @@ export const createClinicAdminSchema = z.object({
|
|
|
296
299
|
clinicsManaged: z.array(z.string()),
|
|
297
300
|
contactInfo: contactPersonSchema,
|
|
298
301
|
roleTitle: z.string(),
|
|
302
|
+
role: z.nativeEnum(ClinicRole).optional(),
|
|
303
|
+
permissions: z.record(z.string(), z.boolean()).optional(),
|
|
299
304
|
isActive: z.boolean(),
|
|
300
305
|
// clinicsManagedInfo is aggregated, not provided on creation
|
|
301
306
|
});
|