@blackcode_sa/metaestetics-api 1.15.8 → 1.15.9

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.
@@ -173,9 +173,15 @@ export interface AdminInfo {
173
173
  */
174
174
  export enum SubscriptionModel {
175
175
  NO_SUBSCRIPTION = 'no_subscription',
176
+ /** @deprecated Use FREE, CONNECT, or PRO instead */
176
177
  BASIC = 'basic',
178
+ /** @deprecated Use FREE, CONNECT, or PRO instead */
177
179
  PREMIUM = 'premium',
180
+ /** @deprecated Use FREE, CONNECT, or PRO instead */
178
181
  ENTERPRISE = 'enterprise',
182
+ FREE = 'free',
183
+ CONNECT = 'connect',
184
+ PRO = 'pro',
179
185
  }
180
186
 
181
187
  /**
@@ -496,3 +502,6 @@ export interface ClinicTags {
496
502
 
497
503
  // Export practitioner invite types
498
504
  export * from './practitioner-invite.types';
505
+
506
+ // Export RBAC types
507
+ export * from './rbac.types';
@@ -0,0 +1,62 @@
1
+ /**
2
+ * RBAC (Role-Based Access Control) types for clinic staff management
3
+ */
4
+
5
+ /**
6
+ * Roles that can be assigned to clinic staff members
7
+ */
8
+ export enum ClinicRole {
9
+ OWNER = 'owner',
10
+ ADMIN = 'admin',
11
+ DOCTOR = 'doctor',
12
+ RECEPTIONIST = 'receptionist',
13
+ ASSISTANT = 'assistant',
14
+ }
15
+
16
+ /**
17
+ * Represents a staff member within a clinic group
18
+ */
19
+ export interface ClinicStaffMember {
20
+ id?: string;
21
+ userId: string;
22
+ clinicGroupId: string;
23
+ clinicId?: string;
24
+ role: ClinicRole;
25
+ permissions: Record<string, boolean>;
26
+ isActive: boolean;
27
+ createdAt?: any;
28
+ updatedAt?: any;
29
+ }
30
+
31
+ /**
32
+ * Configuration for default permissions assigned to a role
33
+ */
34
+ export interface RolePermissionConfig {
35
+ clinicGroupId?: string;
36
+ role: ClinicRole;
37
+ permissions: Record<string, boolean>;
38
+ }
39
+
40
+ /**
41
+ * Usage limits for a given subscription tier.
42
+ * All features are available on every tier — only usage is capped.
43
+ * -1 means unlimited.
44
+ */
45
+ export interface TierLimits {
46
+ maxProviders: number;
47
+ maxProcedures: number;
48
+ maxAppointmentsPerMonth: number;
49
+ maxMessagesPerMonth: number;
50
+ maxStaff: number;
51
+ maxBranches: number;
52
+ }
53
+
54
+ /**
55
+ * Configuration for a subscription tier.
56
+ * Every tier has access to all features — tiers differ only in usage limits.
57
+ */
58
+ export interface TierConfig {
59
+ tier: string;
60
+ name: string;
61
+ limits: TierLimits;
62
+ }