@blackcode_sa/metaestetics-api 1.15.16 → 1.15.17
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 +377 -222
- package/dist/admin/index.d.ts +377 -222
- package/dist/admin/index.js +625 -206
- package/dist/admin/index.mjs +624 -206
- package/dist/backoffice/index.d.mts +24 -0
- package/dist/backoffice/index.d.ts +24 -0
- package/dist/index.d.mts +371 -4
- package/dist/index.d.ts +371 -4
- package/dist/index.js +2227 -1580
- package/dist/index.mjs +1543 -891
- package/package.json +1 -1
- package/src/admin/aggregation/appointment/README.md +24 -2
- package/src/admin/aggregation/appointment/appointment.aggregation.service.ts +46 -0
- package/src/admin/booking/README.md +61 -2
- package/src/admin/booking/booking.admin.ts +257 -0
- package/src/admin/booking/booking.calculator.ts +139 -1
- package/src/admin/booking/booking.types.ts +17 -0
- package/src/admin/calendar/README.md +56 -1
- package/src/admin/calendar/index.ts +1 -0
- package/src/admin/calendar/resource-calendar.admin.ts +198 -0
- package/src/config/index.ts +1 -0
- package/src/config/tiers.config.ts +116 -0
- package/src/services/index.ts +1 -0
- package/src/services/plan-config.service.ts +55 -0
- package/src/services/resource/README.md +119 -0
- package/src/services/resource/index.ts +1 -0
- package/src/services/resource/resource.service.ts +555 -0
- package/src/services/tier-enforcement.ts +15 -10
- package/src/types/appointment/index.ts +7 -0
- package/src/types/calendar/index.ts +1 -0
- package/src/types/clinic/index.ts +1 -0
- package/src/types/clinic/rbac.types.ts +3 -2
- package/src/types/index.ts +6 -0
- package/src/types/procedure/index.ts +6 -0
- package/src/types/resource/README.md +153 -0
- package/src/types/resource/index.ts +199 -0
- package/src/types/system/index.ts +1 -0
- package/src/types/system/planConfig.types.ts +86 -0
- package/src/validations/README.md +94 -0
- package/src/validations/index.ts +1 -0
- package/src/validations/procedure.schema.ts +12 -0
- package/src/validations/resource.schema.ts +57 -0
|
@@ -1281,6 +1281,29 @@ declare class MediaService extends BaseService {
|
|
|
1281
1281
|
getMediaDownloadUrl(mediaId: string): Promise<string | null>;
|
|
1282
1282
|
}
|
|
1283
1283
|
|
|
1284
|
+
/**
|
|
1285
|
+
* Category of a clinic resource
|
|
1286
|
+
*/
|
|
1287
|
+
declare enum ResourceCategory {
|
|
1288
|
+
MEDICAL_DEVICE = "medical_device",
|
|
1289
|
+
ROOM = "room",
|
|
1290
|
+
SURGERY_SUITE = "surgery_suite",
|
|
1291
|
+
EQUIPMENT = "equipment",
|
|
1292
|
+
OTHER = "other"
|
|
1293
|
+
}
|
|
1294
|
+
/**
|
|
1295
|
+
* Lightweight reference stored on procedures to indicate which resources are required.
|
|
1296
|
+
* Denormalized snapshot of resource info at the time of linking.
|
|
1297
|
+
*/
|
|
1298
|
+
interface ResourceRequirement {
|
|
1299
|
+
/** ID of the required resource */
|
|
1300
|
+
resourceId: string;
|
|
1301
|
+
/** Name of the resource (snapshot) */
|
|
1302
|
+
resourceName: string;
|
|
1303
|
+
/** Category of the resource (snapshot) */
|
|
1304
|
+
resourceCategory: ResourceCategory;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1284
1307
|
/**
|
|
1285
1308
|
* Aggregated summary information for a procedure.
|
|
1286
1309
|
* Used in arrays within Clinic and Practitioner documents for quick display.
|
|
@@ -1306,6 +1329,7 @@ interface ProcedureSummaryInfo {
|
|
|
1306
1329
|
clinicName: string;
|
|
1307
1330
|
practitionerId: string;
|
|
1308
1331
|
practitionerName: string;
|
|
1332
|
+
resourceRequirements?: ResourceRequirement[];
|
|
1309
1333
|
}
|
|
1310
1334
|
|
|
1311
1335
|
/**
|
|
@@ -1281,6 +1281,29 @@ declare class MediaService extends BaseService {
|
|
|
1281
1281
|
getMediaDownloadUrl(mediaId: string): Promise<string | null>;
|
|
1282
1282
|
}
|
|
1283
1283
|
|
|
1284
|
+
/**
|
|
1285
|
+
* Category of a clinic resource
|
|
1286
|
+
*/
|
|
1287
|
+
declare enum ResourceCategory {
|
|
1288
|
+
MEDICAL_DEVICE = "medical_device",
|
|
1289
|
+
ROOM = "room",
|
|
1290
|
+
SURGERY_SUITE = "surgery_suite",
|
|
1291
|
+
EQUIPMENT = "equipment",
|
|
1292
|
+
OTHER = "other"
|
|
1293
|
+
}
|
|
1294
|
+
/**
|
|
1295
|
+
* Lightweight reference stored on procedures to indicate which resources are required.
|
|
1296
|
+
* Denormalized snapshot of resource info at the time of linking.
|
|
1297
|
+
*/
|
|
1298
|
+
interface ResourceRequirement {
|
|
1299
|
+
/** ID of the required resource */
|
|
1300
|
+
resourceId: string;
|
|
1301
|
+
/** Name of the resource (snapshot) */
|
|
1302
|
+
resourceName: string;
|
|
1303
|
+
/** Category of the resource (snapshot) */
|
|
1304
|
+
resourceCategory: ResourceCategory;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1284
1307
|
/**
|
|
1285
1308
|
* Aggregated summary information for a procedure.
|
|
1286
1309
|
* Used in arrays within Clinic and Practitioner documents for quick display.
|
|
@@ -1306,6 +1329,7 @@ interface ProcedureSummaryInfo {
|
|
|
1306
1329
|
clinicName: string;
|
|
1307
1330
|
practitionerId: string;
|
|
1308
1331
|
practitionerName: string;
|
|
1332
|
+
resourceRequirements?: ResourceRequirement[];
|
|
1309
1333
|
}
|
|
1310
1334
|
|
|
1311
1335
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -2802,6 +2802,7 @@ declare enum CalendarEventType {
|
|
|
2802
2802
|
BLOCKING = "blocking",
|
|
2803
2803
|
BREAK = "break",
|
|
2804
2804
|
FREE_DAY = "free_day",
|
|
2805
|
+
RESOURCE_BOOKING = "resource_booking",
|
|
2805
2806
|
OTHER = "other"
|
|
2806
2807
|
}
|
|
2807
2808
|
/**
|
|
@@ -4321,6 +4322,263 @@ interface CreatePatientTokenData {
|
|
|
4321
4322
|
expiresAt?: Date;
|
|
4322
4323
|
}
|
|
4323
4324
|
|
|
4325
|
+
/**
|
|
4326
|
+
* Firestore collection/subcollection names for the resource system
|
|
4327
|
+
*/
|
|
4328
|
+
declare const RESOURCES_COLLECTION = "resources";
|
|
4329
|
+
declare const RESOURCE_INSTANCES_SUBCOLLECTION = "instances";
|
|
4330
|
+
declare const RESOURCE_CALENDAR_SUBCOLLECTION = "calendar";
|
|
4331
|
+
/**
|
|
4332
|
+
* Category of a clinic resource
|
|
4333
|
+
*/
|
|
4334
|
+
declare enum ResourceCategory {
|
|
4335
|
+
MEDICAL_DEVICE = "medical_device",
|
|
4336
|
+
ROOM = "room",
|
|
4337
|
+
SURGERY_SUITE = "surgery_suite",
|
|
4338
|
+
EQUIPMENT = "equipment",
|
|
4339
|
+
OTHER = "other"
|
|
4340
|
+
}
|
|
4341
|
+
/**
|
|
4342
|
+
* Status of a resource or resource instance
|
|
4343
|
+
*/
|
|
4344
|
+
declare enum ResourceStatus {
|
|
4345
|
+
ACTIVE = "active",
|
|
4346
|
+
INACTIVE = "inactive",
|
|
4347
|
+
MAINTENANCE = "maintenance"
|
|
4348
|
+
}
|
|
4349
|
+
/**
|
|
4350
|
+
* A resource definition owned by a clinic branch.
|
|
4351
|
+
* Stored at: clinics/{clinicId}/resources/{resourceId}
|
|
4352
|
+
*/
|
|
4353
|
+
interface Resource {
|
|
4354
|
+
/** Unique identifier */
|
|
4355
|
+
id: string;
|
|
4356
|
+
/** Clinic branch this resource belongs to */
|
|
4357
|
+
clinicBranchId: string;
|
|
4358
|
+
/** Display name of the resource */
|
|
4359
|
+
name: string;
|
|
4360
|
+
/** Lowercase name for case-insensitive search */
|
|
4361
|
+
nameLower: string;
|
|
4362
|
+
/** Category of the resource */
|
|
4363
|
+
category: ResourceCategory;
|
|
4364
|
+
/** Optional description */
|
|
4365
|
+
description?: string;
|
|
4366
|
+
/** Number of physical instances (e.g., 3 surgery rooms) */
|
|
4367
|
+
quantity: number;
|
|
4368
|
+
/** Current status */
|
|
4369
|
+
status: ResourceStatus;
|
|
4370
|
+
/** IDs of procedures that require this resource (denormalized for quick lookup) */
|
|
4371
|
+
linkedProcedureIds: string[];
|
|
4372
|
+
createdAt: Timestamp;
|
|
4373
|
+
updatedAt: Timestamp;
|
|
4374
|
+
}
|
|
4375
|
+
/**
|
|
4376
|
+
* A single physical instance of a resource (e.g., "Surgery Room #2").
|
|
4377
|
+
* Each instance has its own calendar for tracking bookings.
|
|
4378
|
+
* Stored at: clinics/{clinicId}/resources/{resourceId}/instances/{instanceId}
|
|
4379
|
+
*/
|
|
4380
|
+
interface ResourceInstance {
|
|
4381
|
+
/** Unique identifier */
|
|
4382
|
+
id: string;
|
|
4383
|
+
/** Parent resource ID */
|
|
4384
|
+
resourceId: string;
|
|
4385
|
+
/** Clinic branch this instance belongs to */
|
|
4386
|
+
clinicBranchId: string;
|
|
4387
|
+
/** Display label, auto-generated: "{Resource.name} #{index}" */
|
|
4388
|
+
label: string;
|
|
4389
|
+
/** 1-based index among instances of the same resource */
|
|
4390
|
+
index: number;
|
|
4391
|
+
/** Current status */
|
|
4392
|
+
status: ResourceStatus;
|
|
4393
|
+
createdAt: Timestamp;
|
|
4394
|
+
updatedAt: Timestamp;
|
|
4395
|
+
}
|
|
4396
|
+
/**
|
|
4397
|
+
* Calendar event on a resource instance.
|
|
4398
|
+
* Can be either a booking event (created during appointment creation) or a blocking event (created manually by admin).
|
|
4399
|
+
* Stored at: clinics/{clinicId}/resources/{resourceId}/instances/{instanceId}/calendar/{eventId}
|
|
4400
|
+
*/
|
|
4401
|
+
interface ResourceCalendarEvent {
|
|
4402
|
+
/** Unique identifier */
|
|
4403
|
+
id: string;
|
|
4404
|
+
/** Parent resource ID */
|
|
4405
|
+
resourceId: string;
|
|
4406
|
+
/** Instance this event is on */
|
|
4407
|
+
resourceInstanceId: string;
|
|
4408
|
+
/** Clinic branch */
|
|
4409
|
+
clinicBranchId: string;
|
|
4410
|
+
/** Type of event — RESOURCE_BOOKING for appointment bookings, BLOCKING for manual blocks */
|
|
4411
|
+
eventType: CalendarEventType;
|
|
4412
|
+
/** Appointment that booked this resource (only for RESOURCE_BOOKING events) */
|
|
4413
|
+
appointmentId?: string;
|
|
4414
|
+
/** Procedure requiring this resource (only for RESOURCE_BOOKING events) */
|
|
4415
|
+
procedureId?: string;
|
|
4416
|
+
/** Practitioner performing the procedure (only for RESOURCE_BOOKING events) */
|
|
4417
|
+
practitionerId?: string;
|
|
4418
|
+
/** Patient for the appointment (only for RESOURCE_BOOKING events) */
|
|
4419
|
+
patientId?: string;
|
|
4420
|
+
/** Time range of the event */
|
|
4421
|
+
eventTime: CalendarEventTime;
|
|
4422
|
+
/** Event status — CONFIRMED for blocking events, mirrors appointment status for bookings */
|
|
4423
|
+
status: CalendarEventStatus;
|
|
4424
|
+
/** Display name for the event */
|
|
4425
|
+
eventName: string;
|
|
4426
|
+
/** Optional description (primarily for blocking events, e.g., reason for maintenance) */
|
|
4427
|
+
description?: string;
|
|
4428
|
+
createdAt: Timestamp;
|
|
4429
|
+
updatedAt: Timestamp;
|
|
4430
|
+
}
|
|
4431
|
+
/**
|
|
4432
|
+
* Lightweight reference stored on procedures to indicate which resources are required.
|
|
4433
|
+
* Denormalized snapshot of resource info at the time of linking.
|
|
4434
|
+
*/
|
|
4435
|
+
interface ResourceRequirement {
|
|
4436
|
+
/** ID of the required resource */
|
|
4437
|
+
resourceId: string;
|
|
4438
|
+
/** Name of the resource (snapshot) */
|
|
4439
|
+
resourceName: string;
|
|
4440
|
+
/** Category of the resource (snapshot) */
|
|
4441
|
+
resourceCategory: ResourceCategory;
|
|
4442
|
+
}
|
|
4443
|
+
/**
|
|
4444
|
+
* Info about a specific resource instance booking, stored on the appointment
|
|
4445
|
+
* after a resource has been allocated during appointment creation.
|
|
4446
|
+
*/
|
|
4447
|
+
interface ResourceBookingInfo {
|
|
4448
|
+
/** ID of the booked resource */
|
|
4449
|
+
resourceId: string;
|
|
4450
|
+
/** Name of the resource (snapshot) */
|
|
4451
|
+
resourceName: string;
|
|
4452
|
+
/** ID of the specific instance that was allocated */
|
|
4453
|
+
resourceInstanceId: string;
|
|
4454
|
+
/** Label of the instance (e.g., "Surgery Room #2") */
|
|
4455
|
+
resourceInstanceLabel: string;
|
|
4456
|
+
/** ID of the calendar event created on the instance */
|
|
4457
|
+
calendarEventId: string;
|
|
4458
|
+
}
|
|
4459
|
+
/**
|
|
4460
|
+
* Data required to create a new resource
|
|
4461
|
+
*/
|
|
4462
|
+
interface CreateResourceData {
|
|
4463
|
+
clinicBranchId: string;
|
|
4464
|
+
name: string;
|
|
4465
|
+
category: ResourceCategory;
|
|
4466
|
+
description?: string;
|
|
4467
|
+
quantity: number;
|
|
4468
|
+
}
|
|
4469
|
+
/**
|
|
4470
|
+
* Data allowed for updating an existing resource
|
|
4471
|
+
*/
|
|
4472
|
+
interface UpdateResourceData {
|
|
4473
|
+
name?: string;
|
|
4474
|
+
category?: ResourceCategory;
|
|
4475
|
+
description?: string;
|
|
4476
|
+
/** Changing quantity: increase creates new instances, decrease is blocked if instances have future bookings */
|
|
4477
|
+
quantity?: number;
|
|
4478
|
+
status?: ResourceStatus;
|
|
4479
|
+
}
|
|
4480
|
+
/**
|
|
4481
|
+
* Parameters for creating a blocking event on a resource instance.
|
|
4482
|
+
* Used to mark an instance as unavailable for a time period (maintenance, out of order, etc.).
|
|
4483
|
+
*/
|
|
4484
|
+
interface CreateResourceBlockingEventParams {
|
|
4485
|
+
clinicBranchId: string;
|
|
4486
|
+
resourceId: string;
|
|
4487
|
+
resourceInstanceId: string;
|
|
4488
|
+
/** Display name for the blocking event (e.g., "Maintenance", "Out of Order") */
|
|
4489
|
+
eventName: string;
|
|
4490
|
+
/** Time range during which the instance is blocked */
|
|
4491
|
+
eventTime: CalendarEventTime;
|
|
4492
|
+
/** Optional reason/description for the block */
|
|
4493
|
+
description?: string;
|
|
4494
|
+
}
|
|
4495
|
+
/**
|
|
4496
|
+
* Parameters for updating an existing blocking event on a resource instance.
|
|
4497
|
+
* Only provided fields are updated.
|
|
4498
|
+
*/
|
|
4499
|
+
interface UpdateResourceBlockingEventParams {
|
|
4500
|
+
clinicBranchId: string;
|
|
4501
|
+
resourceId: string;
|
|
4502
|
+
resourceInstanceId: string;
|
|
4503
|
+
/** ID of the blocking event to update */
|
|
4504
|
+
eventId: string;
|
|
4505
|
+
eventName?: string;
|
|
4506
|
+
eventTime?: CalendarEventTime;
|
|
4507
|
+
description?: string;
|
|
4508
|
+
}
|
|
4509
|
+
|
|
4510
|
+
/**
|
|
4511
|
+
* Dynamic Plan Configuration — stored in Firestore at `system/planConfig`.
|
|
4512
|
+
* Editable from the admin dashboard. Hardcoded defaults in tiers.config.ts
|
|
4513
|
+
* serve as fallback when the Firestore document doesn't exist.
|
|
4514
|
+
*/
|
|
4515
|
+
interface TierDefinition {
|
|
4516
|
+
name: string;
|
|
4517
|
+
limits: {
|
|
4518
|
+
maxProvidersPerBranch: number;
|
|
4519
|
+
maxProceduresPerProvider: number;
|
|
4520
|
+
maxBranches: number;
|
|
4521
|
+
};
|
|
4522
|
+
}
|
|
4523
|
+
interface PlanDefinition {
|
|
4524
|
+
/** Stripe price ID. null for the free plan. */
|
|
4525
|
+
priceId: string | null;
|
|
4526
|
+
/** Monthly price in the plan currency (e.g. 199 for CHF 199). */
|
|
4527
|
+
priceMonthly: number;
|
|
4528
|
+
currency: string;
|
|
4529
|
+
description: string;
|
|
4530
|
+
/** Stripe product ID — needed when auto-creating new prices. */
|
|
4531
|
+
stripeProductId?: string | null;
|
|
4532
|
+
}
|
|
4533
|
+
interface SeatAddonDefinition {
|
|
4534
|
+
priceId: string;
|
|
4535
|
+
pricePerUnit: number;
|
|
4536
|
+
currency: string;
|
|
4537
|
+
allowedTiers: string[];
|
|
4538
|
+
}
|
|
4539
|
+
interface BranchAddonTierPrice {
|
|
4540
|
+
priceId: string;
|
|
4541
|
+
pricePerUnit: number;
|
|
4542
|
+
currency: string;
|
|
4543
|
+
}
|
|
4544
|
+
interface BranchAddonDefinition {
|
|
4545
|
+
connect: BranchAddonTierPrice;
|
|
4546
|
+
pro: BranchAddonTierPrice;
|
|
4547
|
+
allowedTiers: string[];
|
|
4548
|
+
}
|
|
4549
|
+
interface ProcedureAddonDefinition {
|
|
4550
|
+
priceId: string;
|
|
4551
|
+
pricePerBlock: number;
|
|
4552
|
+
proceduresPerBlock: number;
|
|
4553
|
+
currency: string;
|
|
4554
|
+
allowedTiers: string[];
|
|
4555
|
+
}
|
|
4556
|
+
interface PlanConfigDocument {
|
|
4557
|
+
version: number;
|
|
4558
|
+
updatedAt: any;
|
|
4559
|
+
updatedBy: string;
|
|
4560
|
+
/** Tier definitions with usage limits. Keys: 'free', 'connect', 'pro'. */
|
|
4561
|
+
tiers: Record<string, TierDefinition>;
|
|
4562
|
+
/** Plan pricing and Stripe config. Keys: 'FREE', 'CONNECT', 'PRO'. */
|
|
4563
|
+
plans: Record<string, PlanDefinition>;
|
|
4564
|
+
/** Add-on pricing and Stripe config. */
|
|
4565
|
+
addons: {
|
|
4566
|
+
seat: SeatAddonDefinition;
|
|
4567
|
+
branch: BranchAddonDefinition;
|
|
4568
|
+
procedure: ProcedureAddonDefinition;
|
|
4569
|
+
};
|
|
4570
|
+
/** Auto-computed: maps Stripe priceId → Firestore subscriptionModel ('connect'/'pro'). */
|
|
4571
|
+
priceToModel: Record<string, string>;
|
|
4572
|
+
/** Auto-computed: maps Stripe priceId → plan type label ('CONNECT'/'PRO'). */
|
|
4573
|
+
priceToType: Record<string, string>;
|
|
4574
|
+
/** Auto-computed: all add-on price IDs for webhook filtering. */
|
|
4575
|
+
addonPriceIds: string[];
|
|
4576
|
+
}
|
|
4577
|
+
/** Firestore path for the plan config document. */
|
|
4578
|
+
declare const PLAN_CONFIG_PATH = "system/planConfig";
|
|
4579
|
+
/** Firestore subcollection path for version history. */
|
|
4580
|
+
declare const PLAN_CONFIG_HISTORY_PATH = "system/planConfig/history";
|
|
4581
|
+
|
|
4324
4582
|
/**
|
|
4325
4583
|
* Base metrics interface with common properties
|
|
4326
4584
|
*/
|
|
@@ -5214,6 +5472,8 @@ interface Procedure {
|
|
|
5214
5472
|
doctorInfo: DoctorInfo;
|
|
5215
5473
|
/** Aggregated review information for this procedure */
|
|
5216
5474
|
reviewInfo: ProcedureReviewInfo;
|
|
5475
|
+
/** Optional resources required for this procedure (e.g., surgery room, device) */
|
|
5476
|
+
resourceRequirements?: ResourceRequirement[];
|
|
5217
5477
|
/** Whether this procedure is active */
|
|
5218
5478
|
isActive: boolean;
|
|
5219
5479
|
/** When this procedure was created */
|
|
@@ -5248,6 +5508,7 @@ interface CreateProcedureData {
|
|
|
5248
5508
|
practitionerId: string;
|
|
5249
5509
|
clinicBranchId: string;
|
|
5250
5510
|
photos?: MediaResource[];
|
|
5511
|
+
resourceRequirements?: ResourceRequirement[];
|
|
5251
5512
|
}
|
|
5252
5513
|
/**
|
|
5253
5514
|
* Data that can be updated for an existing procedure
|
|
@@ -5276,6 +5537,7 @@ interface UpdateProcedureData {
|
|
|
5276
5537
|
productId?: string;
|
|
5277
5538
|
clinicBranchId?: string;
|
|
5278
5539
|
photos?: MediaResource[];
|
|
5540
|
+
resourceRequirements?: ResourceRequirement[];
|
|
5279
5541
|
}
|
|
5280
5542
|
/**
|
|
5281
5543
|
* Collection name for procedures in Firestore
|
|
@@ -5306,11 +5568,13 @@ interface ProcedureSummaryInfo {
|
|
|
5306
5568
|
clinicName: string;
|
|
5307
5569
|
practitionerId: string;
|
|
5308
5570
|
practitionerName: string;
|
|
5571
|
+
resourceRequirements?: ResourceRequirement[];
|
|
5309
5572
|
}
|
|
5310
5573
|
|
|
5311
5574
|
/**
|
|
5312
5575
|
* RBAC (Role-Based Access Control) types for clinic staff management
|
|
5313
5576
|
*/
|
|
5577
|
+
|
|
5314
5578
|
/**
|
|
5315
5579
|
* Roles that can be assigned to clinic staff members
|
|
5316
5580
|
*/
|
|
@@ -5332,8 +5596,8 @@ interface ClinicStaffMember {
|
|
|
5332
5596
|
role: ClinicRole;
|
|
5333
5597
|
permissions: Record<string, boolean>;
|
|
5334
5598
|
isActive: boolean;
|
|
5335
|
-
createdAt?:
|
|
5336
|
-
updatedAt?:
|
|
5599
|
+
createdAt?: Timestamp;
|
|
5600
|
+
updatedAt?: Timestamp;
|
|
5337
5601
|
}
|
|
5338
5602
|
/**
|
|
5339
5603
|
* Configuration for default permissions assigned to a role
|
|
@@ -5579,7 +5843,8 @@ declare enum BillingTransactionType {
|
|
|
5579
5843
|
SUBSCRIPTION_UPDATED = "subscription_updated",
|
|
5580
5844
|
SUBSCRIPTION_CANCELED = "subscription_canceled",
|
|
5581
5845
|
SUBSCRIPTION_REACTIVATED = "subscription_reactivated",
|
|
5582
|
-
SUBSCRIPTION_DELETED = "subscription_deleted"
|
|
5846
|
+
SUBSCRIPTION_DELETED = "subscription_deleted",
|
|
5847
|
+
ADDON_PURCHASED = "addon_purchased"
|
|
5583
5848
|
}
|
|
5584
5849
|
/**
|
|
5585
5850
|
* Interface for Stripe data in billing transactions
|
|
@@ -6236,6 +6501,8 @@ interface Appointment {
|
|
|
6236
6501
|
isArchived?: boolean;
|
|
6237
6502
|
/** NEW: Metadata for the appointment - used for area selection and photos */
|
|
6238
6503
|
metadata?: AppointmentMetadata;
|
|
6504
|
+
/** Resources booked for this appointment (e.g., surgery room instance, device instance) */
|
|
6505
|
+
resourceBookings?: ResourceBookingInfo[];
|
|
6239
6506
|
}
|
|
6240
6507
|
/**
|
|
6241
6508
|
* Data needed to create a new Appointment
|
|
@@ -6310,6 +6577,8 @@ interface UpdateAppointmentData {
|
|
|
6310
6577
|
updatedAt?: FieldValue;
|
|
6311
6578
|
/** NEW: For updating metadata */
|
|
6312
6579
|
metadata?: AppointmentMetadata;
|
|
6580
|
+
/** For updating resource bookings */
|
|
6581
|
+
resourceBookings?: ResourceBookingInfo[] | FieldValue;
|
|
6313
6582
|
}
|
|
6314
6583
|
/**
|
|
6315
6584
|
* Parameters for searching appointments
|
|
@@ -9682,6 +9951,93 @@ declare class PatientRequirementsService extends BaseService {
|
|
|
9682
9951
|
completeInstruction(patientId: string, instanceId: string, instructionId: string): Promise<PatientRequirementInstance>;
|
|
9683
9952
|
}
|
|
9684
9953
|
|
|
9954
|
+
/**
|
|
9955
|
+
* Service for managing clinic resources and their instances.
|
|
9956
|
+
* Resources are stored as subcollections under clinics:
|
|
9957
|
+
* clinics/{clinicId}/resources/{resourceId}
|
|
9958
|
+
* clinics/{clinicId}/resources/{resourceId}/instances/{instanceId}
|
|
9959
|
+
* clinics/{clinicId}/resources/{resourceId}/instances/{instanceId}/calendar/{eventId}
|
|
9960
|
+
*/
|
|
9961
|
+
declare class ResourceService extends BaseService {
|
|
9962
|
+
/**
|
|
9963
|
+
* Gets reference to a clinic's resources collection
|
|
9964
|
+
*/
|
|
9965
|
+
private getResourcesRef;
|
|
9966
|
+
/**
|
|
9967
|
+
* Gets reference to a specific resource document
|
|
9968
|
+
*/
|
|
9969
|
+
private getResourceDocRef;
|
|
9970
|
+
/**
|
|
9971
|
+
* Gets reference to a resource's instances subcollection
|
|
9972
|
+
*/
|
|
9973
|
+
private getInstancesRef;
|
|
9974
|
+
/**
|
|
9975
|
+
* Gets reference to an instance's calendar subcollection
|
|
9976
|
+
*/
|
|
9977
|
+
private getInstanceCalendarRef;
|
|
9978
|
+
/**
|
|
9979
|
+
* Creates a new resource with its instances.
|
|
9980
|
+
* Creates the resource document and N instance subdocuments in a single batch.
|
|
9981
|
+
*/
|
|
9982
|
+
createResource(data: CreateResourceData): Promise<Resource>;
|
|
9983
|
+
/**
|
|
9984
|
+
* Gets a single resource by ID
|
|
9985
|
+
*/
|
|
9986
|
+
getResource(clinicBranchId: string, resourceId: string): Promise<Resource | null>;
|
|
9987
|
+
/**
|
|
9988
|
+
* Gets all resources for a clinic branch
|
|
9989
|
+
*/
|
|
9990
|
+
getResourcesByClinic(clinicBranchId: string): Promise<Resource[]>;
|
|
9991
|
+
/**
|
|
9992
|
+
* Gets all active resources for a clinic branch
|
|
9993
|
+
*/
|
|
9994
|
+
getActiveResourcesByClinic(clinicBranchId: string): Promise<Resource[]>;
|
|
9995
|
+
/**
|
|
9996
|
+
* Updates a resource. Handles quantity changes:
|
|
9997
|
+
* - Increasing quantity: creates new instances
|
|
9998
|
+
* - Decreasing quantity: blocked if affected instances have future bookings
|
|
9999
|
+
*/
|
|
10000
|
+
updateResource(clinicBranchId: string, resourceId: string, data: UpdateResourceData): Promise<Resource>;
|
|
10001
|
+
/**
|
|
10002
|
+
* Soft deletes a resource by setting status to INACTIVE
|
|
10003
|
+
*/
|
|
10004
|
+
deleteResource(clinicBranchId: string, resourceId: string): Promise<void>;
|
|
10005
|
+
/**
|
|
10006
|
+
* Gets all instances for a resource
|
|
10007
|
+
*/
|
|
10008
|
+
getResourceInstances(clinicBranchId: string, resourceId: string): Promise<ResourceInstance[]>;
|
|
10009
|
+
/**
|
|
10010
|
+
* Gets active instances for a resource
|
|
10011
|
+
*/
|
|
10012
|
+
getActiveResourceInstances(clinicBranchId: string, resourceId: string): Promise<ResourceInstance[]>;
|
|
10013
|
+
/**
|
|
10014
|
+
* Gets calendar events for a specific resource instance within a time range
|
|
10015
|
+
*/
|
|
10016
|
+
getResourceCalendarEvents(clinicBranchId: string, resourceId: string, instanceId: string, start: Timestamp, end: Timestamp): Promise<ResourceCalendarEvent[]>;
|
|
10017
|
+
/**
|
|
10018
|
+
* Checks if a resource instance has any future active bookings
|
|
10019
|
+
*/
|
|
10020
|
+
private instanceHasFutureBookings;
|
|
10021
|
+
/**
|
|
10022
|
+
* Creates a blocking event on a resource instance's calendar.
|
|
10023
|
+
* Blocking events prevent the instance from being booked during the specified time.
|
|
10024
|
+
*/
|
|
10025
|
+
createResourceBlockingEvent(params: CreateResourceBlockingEventParams): Promise<ResourceCalendarEvent>;
|
|
10026
|
+
/**
|
|
10027
|
+
* Updates an existing blocking event on a resource instance's calendar.
|
|
10028
|
+
* Only provided fields are updated.
|
|
10029
|
+
*/
|
|
10030
|
+
updateResourceBlockingEvent(params: UpdateResourceBlockingEventParams): Promise<ResourceCalendarEvent>;
|
|
10031
|
+
/**
|
|
10032
|
+
* Deletes a blocking event from a resource instance's calendar (hard delete).
|
|
10033
|
+
*/
|
|
10034
|
+
deleteResourceBlockingEvent(clinicBranchId: string, resourceId: string, instanceId: string, eventId: string): Promise<void>;
|
|
10035
|
+
/**
|
|
10036
|
+
* Gets all blocking events for a resource instance, ordered by start time.
|
|
10037
|
+
*/
|
|
10038
|
+
getResourceInstanceBlockingEvents(clinicBranchId: string, resourceId: string, instanceId: string): Promise<ResourceCalendarEvent[]>;
|
|
10039
|
+
}
|
|
10040
|
+
|
|
9685
10041
|
declare class ReviewService extends BaseService {
|
|
9686
10042
|
constructor(db: Firestore, auth: Auth, app: FirebaseApp);
|
|
9687
10043
|
/**
|
|
@@ -9822,6 +10178,10 @@ declare const PERMISSION_KEYS: {
|
|
|
9822
10178
|
readonly 'procedures.create': true;
|
|
9823
10179
|
readonly 'procedures.edit': true;
|
|
9824
10180
|
readonly 'procedures.delete': true;
|
|
10181
|
+
readonly 'resources.view': true;
|
|
10182
|
+
readonly 'resources.create': true;
|
|
10183
|
+
readonly 'resources.edit': true;
|
|
10184
|
+
readonly 'resources.delete': true;
|
|
9825
10185
|
readonly 'patients.view': true;
|
|
9826
10186
|
readonly 'patients.edit': true;
|
|
9827
10187
|
readonly 'providers.view': true;
|
|
@@ -9853,9 +10213,16 @@ declare const TIER_CONFIG: Record<string, TierConfig>;
|
|
|
9853
10213
|
* These are the baseline permissions for each role; owners can override per-user.
|
|
9854
10214
|
*/
|
|
9855
10215
|
declare const DEFAULT_ROLE_PERMISSIONS: Record<ClinicRole, Record<string, boolean>>;
|
|
10216
|
+
/**
|
|
10217
|
+
* Default PlanConfigDocument — used as fallback when Firestore `system/planConfig`
|
|
10218
|
+
* doesn't exist or is unavailable. Also used as the seed value.
|
|
10219
|
+
*
|
|
10220
|
+
* Stripe price IDs reference the SKS Innovation SA sandbox account.
|
|
10221
|
+
*/
|
|
10222
|
+
declare const DEFAULT_PLAN_CONFIG: PlanConfigDocument;
|
|
9856
10223
|
/**
|
|
9857
10224
|
* Resolves the effective tier for a subscription model string.
|
|
9858
10225
|
*/
|
|
9859
10226
|
declare function resolveEffectiveTier(subscriptionModel: string): string;
|
|
9860
10227
|
|
|
9861
|
-
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, enforceBranchLimit, enforceProcedureLimit, enforceProviderLimit, getEffectiveTier, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseFunctions, getFirebaseInstance, getFirebaseStorage, initializeFirebase, resolveEffectiveTier };
|
|
10228
|
+
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 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_KEYS, 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 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 };
|