@blackcode_sa/metaestetics-api 1.12.5 → 1.12.7

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.
@@ -1028,6 +1028,88 @@ interface WorkingHours {
1028
1028
  }[];
1029
1029
  } | null;
1030
1030
  }
1031
+ /**
1032
+ * Enum for subscription status
1033
+ */
1034
+ declare enum SubscriptionStatus {
1035
+ PENDING = "pending",
1036
+ ACTIVE = "active",
1037
+ PENDING_CANCELLATION = "pending_cancellation",
1038
+ CANCELED = "canceled",
1039
+ PAST_DUE = "past_due",
1040
+ TRIALING = "trialing"
1041
+ }
1042
+ /**
1043
+ * Interface for billing information
1044
+ */
1045
+ interface BillingInfo {
1046
+ stripeCustomerId: string;
1047
+ subscriptionStatus: SubscriptionStatus;
1048
+ planType: string;
1049
+ stripeSubscriptionId: string | null;
1050
+ stripePriceId: string | null;
1051
+ currentPeriodStart: Timestamp | null;
1052
+ currentPeriodEnd: Timestamp | null;
1053
+ updatedAt: Timestamp;
1054
+ }
1055
+ /**
1056
+ * Enum for billing transaction types
1057
+ */
1058
+ declare enum BillingTransactionType {
1059
+ SUBSCRIPTION_CREATED = "subscription_created",
1060
+ SUBSCRIPTION_ACTIVATED = "subscription_activated",
1061
+ SUBSCRIPTION_RENEWED = "subscription_renewed",
1062
+ SUBSCRIPTION_UPDATED = "subscription_updated",
1063
+ SUBSCRIPTION_CANCELED = "subscription_canceled",
1064
+ SUBSCRIPTION_REACTIVATED = "subscription_reactivated",
1065
+ SUBSCRIPTION_DELETED = "subscription_deleted"
1066
+ }
1067
+ /**
1068
+ * Interface for Stripe data in billing transactions
1069
+ */
1070
+ interface StripeTransactionData {
1071
+ sessionId?: string;
1072
+ subscriptionId?: string;
1073
+ invoiceId?: string;
1074
+ priceId: string;
1075
+ customerId: string;
1076
+ }
1077
+ /**
1078
+ * Interface for plan details in billing transactions
1079
+ */
1080
+ interface PlanDetails {
1081
+ planName: string;
1082
+ planPeriod: string;
1083
+ planDisplayName: string;
1084
+ }
1085
+ /**
1086
+ * Interface for billing transactions
1087
+ */
1088
+ interface BillingTransaction {
1089
+ id: string;
1090
+ clinicGroupId: string;
1091
+ type: BillingTransactionType;
1092
+ description: string;
1093
+ amount: number;
1094
+ currency: string;
1095
+ stripeData: StripeTransactionData;
1096
+ planDetails: PlanDetails;
1097
+ metadata?: Record<string, any>;
1098
+ timestamp: Timestamp;
1099
+ createdAt: Timestamp;
1100
+ }
1101
+ /**
1102
+ * Interface for creating a billing transaction
1103
+ */
1104
+ interface CreateBillingTransactionData {
1105
+ type: BillingTransactionType;
1106
+ description: string;
1107
+ amount: number;
1108
+ currency: string;
1109
+ stripeData: StripeTransactionData;
1110
+ planDetails: PlanDetails;
1111
+ metadata?: Record<string, any>;
1112
+ }
1031
1113
  /**
1032
1114
  * Interface for doctor information
1033
1115
  */
@@ -3529,4 +3611,4 @@ declare class UserProfileAdminService {
3529
3611
  initializePractitionerRole(userId: string): Promise<User>;
3530
3612
  }
3531
3613
 
3532
- export { type Appointment, AppointmentAggregationService, type AppointmentCancellationEmailData, type AppointmentConfirmationEmailData, type AppointmentEmailDataBase, AppointmentMailingService, type AppointmentReminderNotification, type AppointmentRequestedEmailData, type AppointmentRescheduledProposalEmailData, AppointmentStatus, type AvailableSlot, BaseMailingService, type BaseNotification, BookingAdmin, BookingAvailabilityCalculator, type BookingAvailabilityRequest, type BookingAvailabilityResponse, CalendarAdminService, type Clinic, type ClinicAdminNotificationData, ClinicAggregationService, type ClinicInfo, type ClinicLocation, type DoctorInfo, DocumentManagerAdminService, type ExistingPractitionerInviteEmailData, ExistingPractitionerInviteMailingService, type FilledDocument, FilledFormsAggregationService, type InitializeAppointmentFormsResult, Logger, NOTIFICATIONS_COLLECTION, type NewMailgunClient$2 as NewMailgunClient, type Notification, NotificationStatus, NotificationType, NotificationsAdmin, type OrchestrateAppointmentCreationData, PATIENTS_COLLECTION, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, PATIENT_SENSITIVE_INFO_COLLECTION, type PatientProfile as Patient, PatientAggregationService, PatientInstructionStatus, type PatientProfile, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, PatientRequirementsAdminService, type PatientSensitiveInfo, type PostRequirementNotification, type Practitioner, PractitionerAggregationService, type PractitionerInvite, PractitionerInviteAggregationService, type PractitionerInviteEmailData, PractitionerInviteMailingService, PractitionerInviteStatus, type PractitionerToken, PractitionerTokenStatus, type PreRequirementNotification, type Procedure, ProcedureAggregationService, type ProcedureSummaryInfo, type Review, type ReviewAddedEmailData, type ReviewRequestEmailData, ReviewsAggregationService, type TimeInterval, UserProfileAdminService, UserRole, freeConsultationInfrastructure };
3614
+ export { type Appointment, AppointmentAggregationService, type AppointmentCancellationEmailData, type AppointmentConfirmationEmailData, type AppointmentEmailDataBase, AppointmentMailingService, type AppointmentReminderNotification, type AppointmentRequestedEmailData, type AppointmentRescheduledProposalEmailData, AppointmentStatus, type AvailableSlot, BaseMailingService, type BaseNotification, type BillingInfo, type BillingTransaction, BillingTransactionType, BookingAdmin, BookingAvailabilityCalculator, type BookingAvailabilityRequest, type BookingAvailabilityResponse, CalendarAdminService, type Clinic, type ClinicAdminNotificationData, ClinicAggregationService, type ClinicInfo, type ClinicLocation, type CreateBillingTransactionData, type DoctorInfo, DocumentManagerAdminService, type ExistingPractitionerInviteEmailData, ExistingPractitionerInviteMailingService, type FilledDocument, FilledFormsAggregationService, type InitializeAppointmentFormsResult, Logger, NOTIFICATIONS_COLLECTION, type NewMailgunClient$2 as NewMailgunClient, type Notification, NotificationStatus, NotificationType, NotificationsAdmin, type OrchestrateAppointmentCreationData, PATIENTS_COLLECTION, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, PATIENT_SENSITIVE_INFO_COLLECTION, type PatientProfile as Patient, PatientAggregationService, PatientInstructionStatus, type PatientProfile, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, PatientRequirementsAdminService, type PatientSensitiveInfo, type PlanDetails, type PostRequirementNotification, type Practitioner, PractitionerAggregationService, type PractitionerInvite, PractitionerInviteAggregationService, type PractitionerInviteEmailData, PractitionerInviteMailingService, PractitionerInviteStatus, type PractitionerToken, PractitionerTokenStatus, type PreRequirementNotification, type Procedure, ProcedureAggregationService, type ProcedureSummaryInfo, type Review, type ReviewAddedEmailData, type ReviewRequestEmailData, ReviewsAggregationService, type StripeTransactionData, SubscriptionStatus, type TimeInterval, UserProfileAdminService, UserRole, freeConsultationInfrastructure };
@@ -1028,6 +1028,88 @@ interface WorkingHours {
1028
1028
  }[];
1029
1029
  } | null;
1030
1030
  }
1031
+ /**
1032
+ * Enum for subscription status
1033
+ */
1034
+ declare enum SubscriptionStatus {
1035
+ PENDING = "pending",
1036
+ ACTIVE = "active",
1037
+ PENDING_CANCELLATION = "pending_cancellation",
1038
+ CANCELED = "canceled",
1039
+ PAST_DUE = "past_due",
1040
+ TRIALING = "trialing"
1041
+ }
1042
+ /**
1043
+ * Interface for billing information
1044
+ */
1045
+ interface BillingInfo {
1046
+ stripeCustomerId: string;
1047
+ subscriptionStatus: SubscriptionStatus;
1048
+ planType: string;
1049
+ stripeSubscriptionId: string | null;
1050
+ stripePriceId: string | null;
1051
+ currentPeriodStart: Timestamp | null;
1052
+ currentPeriodEnd: Timestamp | null;
1053
+ updatedAt: Timestamp;
1054
+ }
1055
+ /**
1056
+ * Enum for billing transaction types
1057
+ */
1058
+ declare enum BillingTransactionType {
1059
+ SUBSCRIPTION_CREATED = "subscription_created",
1060
+ SUBSCRIPTION_ACTIVATED = "subscription_activated",
1061
+ SUBSCRIPTION_RENEWED = "subscription_renewed",
1062
+ SUBSCRIPTION_UPDATED = "subscription_updated",
1063
+ SUBSCRIPTION_CANCELED = "subscription_canceled",
1064
+ SUBSCRIPTION_REACTIVATED = "subscription_reactivated",
1065
+ SUBSCRIPTION_DELETED = "subscription_deleted"
1066
+ }
1067
+ /**
1068
+ * Interface for Stripe data in billing transactions
1069
+ */
1070
+ interface StripeTransactionData {
1071
+ sessionId?: string;
1072
+ subscriptionId?: string;
1073
+ invoiceId?: string;
1074
+ priceId: string;
1075
+ customerId: string;
1076
+ }
1077
+ /**
1078
+ * Interface for plan details in billing transactions
1079
+ */
1080
+ interface PlanDetails {
1081
+ planName: string;
1082
+ planPeriod: string;
1083
+ planDisplayName: string;
1084
+ }
1085
+ /**
1086
+ * Interface for billing transactions
1087
+ */
1088
+ interface BillingTransaction {
1089
+ id: string;
1090
+ clinicGroupId: string;
1091
+ type: BillingTransactionType;
1092
+ description: string;
1093
+ amount: number;
1094
+ currency: string;
1095
+ stripeData: StripeTransactionData;
1096
+ planDetails: PlanDetails;
1097
+ metadata?: Record<string, any>;
1098
+ timestamp: Timestamp;
1099
+ createdAt: Timestamp;
1100
+ }
1101
+ /**
1102
+ * Interface for creating a billing transaction
1103
+ */
1104
+ interface CreateBillingTransactionData {
1105
+ type: BillingTransactionType;
1106
+ description: string;
1107
+ amount: number;
1108
+ currency: string;
1109
+ stripeData: StripeTransactionData;
1110
+ planDetails: PlanDetails;
1111
+ metadata?: Record<string, any>;
1112
+ }
1031
1113
  /**
1032
1114
  * Interface for doctor information
1033
1115
  */
@@ -3529,4 +3611,4 @@ declare class UserProfileAdminService {
3529
3611
  initializePractitionerRole(userId: string): Promise<User>;
3530
3612
  }
3531
3613
 
3532
- export { type Appointment, AppointmentAggregationService, type AppointmentCancellationEmailData, type AppointmentConfirmationEmailData, type AppointmentEmailDataBase, AppointmentMailingService, type AppointmentReminderNotification, type AppointmentRequestedEmailData, type AppointmentRescheduledProposalEmailData, AppointmentStatus, type AvailableSlot, BaseMailingService, type BaseNotification, BookingAdmin, BookingAvailabilityCalculator, type BookingAvailabilityRequest, type BookingAvailabilityResponse, CalendarAdminService, type Clinic, type ClinicAdminNotificationData, ClinicAggregationService, type ClinicInfo, type ClinicLocation, type DoctorInfo, DocumentManagerAdminService, type ExistingPractitionerInviteEmailData, ExistingPractitionerInviteMailingService, type FilledDocument, FilledFormsAggregationService, type InitializeAppointmentFormsResult, Logger, NOTIFICATIONS_COLLECTION, type NewMailgunClient$2 as NewMailgunClient, type Notification, NotificationStatus, NotificationType, NotificationsAdmin, type OrchestrateAppointmentCreationData, PATIENTS_COLLECTION, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, PATIENT_SENSITIVE_INFO_COLLECTION, type PatientProfile as Patient, PatientAggregationService, PatientInstructionStatus, type PatientProfile, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, PatientRequirementsAdminService, type PatientSensitiveInfo, type PostRequirementNotification, type Practitioner, PractitionerAggregationService, type PractitionerInvite, PractitionerInviteAggregationService, type PractitionerInviteEmailData, PractitionerInviteMailingService, PractitionerInviteStatus, type PractitionerToken, PractitionerTokenStatus, type PreRequirementNotification, type Procedure, ProcedureAggregationService, type ProcedureSummaryInfo, type Review, type ReviewAddedEmailData, type ReviewRequestEmailData, ReviewsAggregationService, type TimeInterval, UserProfileAdminService, UserRole, freeConsultationInfrastructure };
3614
+ export { type Appointment, AppointmentAggregationService, type AppointmentCancellationEmailData, type AppointmentConfirmationEmailData, type AppointmentEmailDataBase, AppointmentMailingService, type AppointmentReminderNotification, type AppointmentRequestedEmailData, type AppointmentRescheduledProposalEmailData, AppointmentStatus, type AvailableSlot, BaseMailingService, type BaseNotification, type BillingInfo, type BillingTransaction, BillingTransactionType, BookingAdmin, BookingAvailabilityCalculator, type BookingAvailabilityRequest, type BookingAvailabilityResponse, CalendarAdminService, type Clinic, type ClinicAdminNotificationData, ClinicAggregationService, type ClinicInfo, type ClinicLocation, type CreateBillingTransactionData, type DoctorInfo, DocumentManagerAdminService, type ExistingPractitionerInviteEmailData, ExistingPractitionerInviteMailingService, type FilledDocument, FilledFormsAggregationService, type InitializeAppointmentFormsResult, Logger, NOTIFICATIONS_COLLECTION, type NewMailgunClient$2 as NewMailgunClient, type Notification, NotificationStatus, NotificationType, NotificationsAdmin, type OrchestrateAppointmentCreationData, PATIENTS_COLLECTION, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, PATIENT_SENSITIVE_INFO_COLLECTION, type PatientProfile as Patient, PatientAggregationService, PatientInstructionStatus, type PatientProfile, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, PatientRequirementsAdminService, type PatientSensitiveInfo, type PlanDetails, type PostRequirementNotification, type Practitioner, PractitionerAggregationService, type PractitionerInvite, PractitionerInviteAggregationService, type PractitionerInviteEmailData, PractitionerInviteMailingService, PractitionerInviteStatus, type PractitionerToken, PractitionerTokenStatus, type PreRequirementNotification, type Procedure, ProcedureAggregationService, type ProcedureSummaryInfo, type Review, type ReviewAddedEmailData, type ReviewRequestEmailData, ReviewsAggregationService, type StripeTransactionData, SubscriptionStatus, type TimeInterval, UserProfileAdminService, UserRole, freeConsultationInfrastructure };
@@ -222,6 +222,7 @@ __export(index_exports, {
222
222
  AppointmentMailingService: () => AppointmentMailingService,
223
223
  AppointmentStatus: () => AppointmentStatus,
224
224
  BaseMailingService: () => BaseMailingService,
225
+ BillingTransactionType: () => BillingTransactionType,
225
226
  BookingAdmin: () => BookingAdmin,
226
227
  BookingAvailabilityCalculator: () => BookingAvailabilityCalculator,
227
228
  CalendarAdminService: () => CalendarAdminService,
@@ -248,6 +249,7 @@ __export(index_exports, {
248
249
  PractitionerTokenStatus: () => PractitionerTokenStatus,
249
250
  ProcedureAggregationService: () => ProcedureAggregationService,
250
251
  ReviewsAggregationService: () => ReviewsAggregationService,
252
+ SubscriptionStatus: () => SubscriptionStatus,
251
253
  UserProfileAdminService: () => UserProfileAdminService,
252
254
  UserRole: () => UserRole,
253
255
  freeConsultationInfrastructure: () => freeConsultationInfrastructure
@@ -442,6 +444,39 @@ var PATIENT_MEDICAL_INFO_COLLECTION = "medical_info";
442
444
  var PATIENTS_COLLECTION = "patients";
443
445
  var PATIENT_SENSITIVE_INFO_COLLECTION = "sensitive-info";
444
446
 
447
+ // src/types/clinic/practitioner-invite.types.ts
448
+ var PractitionerInviteStatus = /* @__PURE__ */ ((PractitionerInviteStatus2) => {
449
+ PractitionerInviteStatus2["PENDING"] = "pending";
450
+ PractitionerInviteStatus2["ACCEPTED"] = "accepted";
451
+ PractitionerInviteStatus2["REJECTED"] = "rejected";
452
+ PractitionerInviteStatus2["CANCELLED"] = "cancelled";
453
+ return PractitionerInviteStatus2;
454
+ })(PractitionerInviteStatus || {});
455
+
456
+ // src/types/clinic/index.ts
457
+ var CLINIC_GROUPS_COLLECTION = "clinic_groups";
458
+ var CLINIC_ADMINS_COLLECTION = "clinic_admins";
459
+ var CLINICS_COLLECTION = "clinics";
460
+ var SubscriptionStatus = /* @__PURE__ */ ((SubscriptionStatus2) => {
461
+ SubscriptionStatus2["PENDING"] = "pending";
462
+ SubscriptionStatus2["ACTIVE"] = "active";
463
+ SubscriptionStatus2["PENDING_CANCELLATION"] = "pending_cancellation";
464
+ SubscriptionStatus2["CANCELED"] = "canceled";
465
+ SubscriptionStatus2["PAST_DUE"] = "past_due";
466
+ SubscriptionStatus2["TRIALING"] = "trialing";
467
+ return SubscriptionStatus2;
468
+ })(SubscriptionStatus || {});
469
+ var BillingTransactionType = /* @__PURE__ */ ((BillingTransactionType2) => {
470
+ BillingTransactionType2["SUBSCRIPTION_CREATED"] = "subscription_created";
471
+ BillingTransactionType2["SUBSCRIPTION_ACTIVATED"] = "subscription_activated";
472
+ BillingTransactionType2["SUBSCRIPTION_RENEWED"] = "subscription_renewed";
473
+ BillingTransactionType2["SUBSCRIPTION_UPDATED"] = "subscription_updated";
474
+ BillingTransactionType2["SUBSCRIPTION_CANCELED"] = "subscription_canceled";
475
+ BillingTransactionType2["SUBSCRIPTION_REACTIVATED"] = "subscription_reactivated";
476
+ BillingTransactionType2["SUBSCRIPTION_DELETED"] = "subscription_deleted";
477
+ return BillingTransactionType2;
478
+ })(BillingTransactionType || {});
479
+
445
480
  // src/types/notifications/index.ts
446
481
  var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
447
482
  NotificationType2["APPOINTMENT_REMINDER"] = "appointmentReminder";
@@ -493,15 +528,6 @@ var PractitionerTokenStatus = /* @__PURE__ */ ((PractitionerTokenStatus2) => {
493
528
  return PractitionerTokenStatus2;
494
529
  })(PractitionerTokenStatus || {});
495
530
 
496
- // src/types/clinic/practitioner-invite.types.ts
497
- var PractitionerInviteStatus = /* @__PURE__ */ ((PractitionerInviteStatus2) => {
498
- PractitionerInviteStatus2["PENDING"] = "pending";
499
- PractitionerInviteStatus2["ACCEPTED"] = "accepted";
500
- PractitionerInviteStatus2["REJECTED"] = "rejected";
501
- PractitionerInviteStatus2["CANCELLED"] = "cancelled";
502
- return PractitionerInviteStatus2;
503
- })(PractitionerInviteStatus || {});
504
-
505
531
  // src/types/appointment/index.ts
506
532
  var AppointmentStatus = /* @__PURE__ */ ((AppointmentStatus2) => {
507
533
  AppointmentStatus2["PENDING"] = "pending";
@@ -543,11 +569,6 @@ var PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME = "patientRequirements";
543
569
  // src/admin/aggregation/appointment/appointment.aggregation.service.ts
544
570
  var admin6 = __toESM(require("firebase-admin"));
545
571
 
546
- // src/types/clinic/index.ts
547
- var CLINIC_GROUPS_COLLECTION = "clinic_groups";
548
- var CLINIC_ADMINS_COLLECTION = "clinic_admins";
549
- var CLINICS_COLLECTION = "clinics";
550
-
551
572
  // src/admin/requirements/patient-requirements.admin.service.ts
552
573
  var admin3 = __toESM(require("firebase-admin"));
553
574
 
@@ -9075,6 +9096,7 @@ TimestampUtils.enableServerMode();
9075
9096
  AppointmentMailingService,
9076
9097
  AppointmentStatus,
9077
9098
  BaseMailingService,
9099
+ BillingTransactionType,
9078
9100
  BookingAdmin,
9079
9101
  BookingAvailabilityCalculator,
9080
9102
  CalendarAdminService,
@@ -9101,6 +9123,7 @@ TimestampUtils.enableServerMode();
9101
9123
  PractitionerTokenStatus,
9102
9124
  ProcedureAggregationService,
9103
9125
  ReviewsAggregationService,
9126
+ SubscriptionStatus,
9104
9127
  UserProfileAdminService,
9105
9128
  UserRole,
9106
9129
  freeConsultationInfrastructure
@@ -382,6 +382,39 @@ var PATIENT_MEDICAL_INFO_COLLECTION = "medical_info";
382
382
  var PATIENTS_COLLECTION = "patients";
383
383
  var PATIENT_SENSITIVE_INFO_COLLECTION = "sensitive-info";
384
384
 
385
+ // src/types/clinic/practitioner-invite.types.ts
386
+ var PractitionerInviteStatus = /* @__PURE__ */ ((PractitionerInviteStatus2) => {
387
+ PractitionerInviteStatus2["PENDING"] = "pending";
388
+ PractitionerInviteStatus2["ACCEPTED"] = "accepted";
389
+ PractitionerInviteStatus2["REJECTED"] = "rejected";
390
+ PractitionerInviteStatus2["CANCELLED"] = "cancelled";
391
+ return PractitionerInviteStatus2;
392
+ })(PractitionerInviteStatus || {});
393
+
394
+ // src/types/clinic/index.ts
395
+ var CLINIC_GROUPS_COLLECTION = "clinic_groups";
396
+ var CLINIC_ADMINS_COLLECTION = "clinic_admins";
397
+ var CLINICS_COLLECTION = "clinics";
398
+ var SubscriptionStatus = /* @__PURE__ */ ((SubscriptionStatus2) => {
399
+ SubscriptionStatus2["PENDING"] = "pending";
400
+ SubscriptionStatus2["ACTIVE"] = "active";
401
+ SubscriptionStatus2["PENDING_CANCELLATION"] = "pending_cancellation";
402
+ SubscriptionStatus2["CANCELED"] = "canceled";
403
+ SubscriptionStatus2["PAST_DUE"] = "past_due";
404
+ SubscriptionStatus2["TRIALING"] = "trialing";
405
+ return SubscriptionStatus2;
406
+ })(SubscriptionStatus || {});
407
+ var BillingTransactionType = /* @__PURE__ */ ((BillingTransactionType2) => {
408
+ BillingTransactionType2["SUBSCRIPTION_CREATED"] = "subscription_created";
409
+ BillingTransactionType2["SUBSCRIPTION_ACTIVATED"] = "subscription_activated";
410
+ BillingTransactionType2["SUBSCRIPTION_RENEWED"] = "subscription_renewed";
411
+ BillingTransactionType2["SUBSCRIPTION_UPDATED"] = "subscription_updated";
412
+ BillingTransactionType2["SUBSCRIPTION_CANCELED"] = "subscription_canceled";
413
+ BillingTransactionType2["SUBSCRIPTION_REACTIVATED"] = "subscription_reactivated";
414
+ BillingTransactionType2["SUBSCRIPTION_DELETED"] = "subscription_deleted";
415
+ return BillingTransactionType2;
416
+ })(BillingTransactionType || {});
417
+
385
418
  // src/types/notifications/index.ts
386
419
  var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
387
420
  NotificationType2["APPOINTMENT_REMINDER"] = "appointmentReminder";
@@ -433,15 +466,6 @@ var PractitionerTokenStatus = /* @__PURE__ */ ((PractitionerTokenStatus2) => {
433
466
  return PractitionerTokenStatus2;
434
467
  })(PractitionerTokenStatus || {});
435
468
 
436
- // src/types/clinic/practitioner-invite.types.ts
437
- var PractitionerInviteStatus = /* @__PURE__ */ ((PractitionerInviteStatus2) => {
438
- PractitionerInviteStatus2["PENDING"] = "pending";
439
- PractitionerInviteStatus2["ACCEPTED"] = "accepted";
440
- PractitionerInviteStatus2["REJECTED"] = "rejected";
441
- PractitionerInviteStatus2["CANCELLED"] = "cancelled";
442
- return PractitionerInviteStatus2;
443
- })(PractitionerInviteStatus || {});
444
-
445
469
  // src/types/appointment/index.ts
446
470
  var AppointmentStatus = /* @__PURE__ */ ((AppointmentStatus2) => {
447
471
  AppointmentStatus2["PENDING"] = "pending";
@@ -483,11 +507,6 @@ var PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME = "patientRequirements";
483
507
  // src/admin/aggregation/appointment/appointment.aggregation.service.ts
484
508
  import * as admin6 from "firebase-admin";
485
509
 
486
- // src/types/clinic/index.ts
487
- var CLINIC_GROUPS_COLLECTION = "clinic_groups";
488
- var CLINIC_ADMINS_COLLECTION = "clinic_admins";
489
- var CLINICS_COLLECTION = "clinics";
490
-
491
510
  // src/admin/requirements/patient-requirements.admin.service.ts
492
511
  import * as admin3 from "firebase-admin";
493
512
 
@@ -9014,6 +9033,7 @@ export {
9014
9033
  AppointmentMailingService,
9015
9034
  AppointmentStatus,
9016
9035
  BaseMailingService,
9036
+ BillingTransactionType,
9017
9037
  BookingAdmin,
9018
9038
  BookingAvailabilityCalculator,
9019
9039
  CalendarAdminService,
@@ -9040,6 +9060,7 @@ export {
9040
9060
  PractitionerTokenStatus,
9041
9061
  ProcedureAggregationService,
9042
9062
  ReviewsAggregationService,
9063
+ SubscriptionStatus,
9043
9064
  UserProfileAdminService,
9044
9065
  UserRole,
9045
9066
  freeConsultationInfrastructure
package/dist/index.d.mts CHANGED
@@ -5077,6 +5077,7 @@ declare class ClinicAdminService extends BaseService {
5077
5077
 
5078
5078
  declare class ClinicGroupService extends BaseService {
5079
5079
  private clinicAdminService;
5080
+ private billingTransactionsService;
5080
5081
  constructor(db: Firestore, auth: Auth, app: FirebaseApp, clinicAdminService: ClinicAdminService);
5081
5082
  /**
5082
5083
  * Kreira novu grupaciju klinika
@@ -5156,6 +5157,44 @@ declare class ClinicGroupService extends BaseService {
5156
5157
  * @returns The updated clinic group
5157
5158
  */
5158
5159
  completeOnboarding(groupId: string): Promise<ClinicGroup>;
5160
+ /**
5161
+ * Get billing transactions for a clinic group
5162
+ *
5163
+ * @param groupId - The clinic group ID
5164
+ * @param options - Query options for pagination and filtering
5165
+ * @returns Promise with billing transactions and pagination info
5166
+ */
5167
+ getBillingTransactions(groupId: string, options?: {
5168
+ limit?: number;
5169
+ startAfter?: any;
5170
+ transactionType?: BillingTransactionType;
5171
+ }): Promise<{
5172
+ transactions: BillingTransaction[];
5173
+ lastDoc: any;
5174
+ hasMore: boolean;
5175
+ }>;
5176
+ /**
5177
+ * Get recent billing transactions for a clinic group (last 10)
5178
+ *
5179
+ * @param groupId - The clinic group ID
5180
+ * @returns Promise with recent billing transactions
5181
+ */
5182
+ getRecentBillingTransactions(groupId: string): Promise<BillingTransaction[]>;
5183
+ /**
5184
+ * Get subscription-related billing transactions for a clinic group
5185
+ *
5186
+ * @param groupId - The clinic group ID
5187
+ * @param options - Query options for pagination
5188
+ * @returns Promise with subscription transactions and pagination info
5189
+ */
5190
+ getSubscriptionTransactions(groupId: string, options?: {
5191
+ limit?: number;
5192
+ startAfter?: any;
5193
+ }): Promise<{
5194
+ transactions: BillingTransaction[];
5195
+ lastDoc: any;
5196
+ hasMore: boolean;
5197
+ }>;
5159
5198
  }
5160
5199
 
5161
5200
  declare class ClinicService extends BaseService {
@@ -6633,6 +6672,64 @@ declare class PractitionerInviteService extends BaseService {
6633
6672
  private findExistingInvite;
6634
6673
  }
6635
6674
 
6675
+ /**
6676
+ * Service for managing billing transactions
6677
+ * Provides read-only access to billing transaction history
6678
+ */
6679
+ declare class BillingTransactionsService extends BaseService {
6680
+ private readonly BILLING_TRANSACTIONS_COLLECTION;
6681
+ /**
6682
+ * Get billing transactions for a clinic group with pagination
6683
+ * @param clinicGroupId - The clinic group ID
6684
+ * @param options - Query options
6685
+ * @returns Promise with transactions and pagination info
6686
+ */
6687
+ getBillingTransactions(clinicGroupId: string, options?: {
6688
+ limit?: number;
6689
+ startAfter?: DocumentSnapshot;
6690
+ transactionType?: BillingTransactionType;
6691
+ }): Promise<{
6692
+ transactions: BillingTransaction[];
6693
+ lastDoc: DocumentSnapshot | null;
6694
+ hasMore: boolean;
6695
+ }>;
6696
+ /**
6697
+ * Get recent billing transactions (last 10)
6698
+ * @param clinicGroupId - The clinic group ID
6699
+ * @returns Promise with recent transactions
6700
+ */
6701
+ getRecentBillingTransactions(clinicGroupId: string): Promise<BillingTransaction[]>;
6702
+ /**
6703
+ * Get billing transactions by type
6704
+ * @param clinicGroupId - The clinic group ID
6705
+ * @param transactionType - The transaction type to filter by
6706
+ * @param options - Additional query options
6707
+ * @returns Promise with filtered transactions
6708
+ */
6709
+ getBillingTransactionsByType(clinicGroupId: string, transactionType: BillingTransactionType, options?: {
6710
+ limit?: number;
6711
+ startAfter?: DocumentSnapshot;
6712
+ }): Promise<{
6713
+ transactions: BillingTransaction[];
6714
+ lastDoc: DocumentSnapshot | null;
6715
+ hasMore: boolean;
6716
+ }>;
6717
+ /**
6718
+ * Get subscription-related transactions only
6719
+ * @param clinicGroupId - The clinic group ID
6720
+ * @param options - Query options
6721
+ * @returns Promise with subscription transactions
6722
+ */
6723
+ getSubscriptionTransactions(clinicGroupId: string, options?: {
6724
+ limit?: number;
6725
+ startAfter?: DocumentSnapshot;
6726
+ }): Promise<{
6727
+ transactions: BillingTransaction[];
6728
+ lastDoc: DocumentSnapshot | null;
6729
+ hasMore: boolean;
6730
+ }>;
6731
+ }
6732
+
6636
6733
  declare class NotificationService extends BaseService {
6637
6734
  /**
6638
6735
  * Kreira novu notifikaciju
@@ -6806,4 +6903,4 @@ declare const getFirebaseApp: () => Promise<FirebaseApp>;
6806
6903
  declare const getFirebaseStorage: () => Promise<FirebaseStorage>;
6807
6904
  declare const getFirebaseFunctions: () => Promise<Functions>;
6808
6905
 
6809
- export { APPOINTMENTS_COLLECTION, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, type Appointment, type AppointmentCancelledNotification, type AppointmentMediaItem, type AppointmentMetadata, type AppointmentReminderNotification, type AppointmentRescheduledProposalNotification, AppointmentService, AppointmentStatus, type AppointmentStatusChangeNotification, AuthService, type BaseDocumentElement, type BaseNotification, BaseService, type BeforeAfterPerZone, type BillingInfo, type BillingPerZone, type BillingTransaction, BillingTransactionType, type BinaryChoiceElement, BlockingCondition, type Brand, BrandService, CALENDAR_COLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, CalendarServiceV3, CalendarSyncStatus, type Category, CategoryService, CertificationLevel, CertificationSpecialty, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicBranchSetupData, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, ClinicPhotoTag, type ClinicReview, type ClinicReviewInfo, ClinicService, ClinicTag, type ClinicTags, ConstantsService, type ContactPerson, Contraindication, type ContraindicationDynamic, CosmeticAllergySubtype, type CreateAdminTokenData, type CreateAppointmentData, type CreateAppointmentHttpData, type CreateAppointmentParams, type CreateBillingTransactionData, type CreateBlockingEventParams, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreateManualPatientData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePatientTokenData, type CreatePractitionerData, type CreatePractitionerInviteData, type CreatePractitionerTokenData, type CreateProcedureData, type CreateSyncedCalendarData, type CreateUserData, Currency, DEFAULT_MEDICAL_INFO, DOCTOR_FORMS_SUBCOLLECTION, DOCUMENTATION_TEMPLATES_COLLECTION, type DatePickerElement, type DateRange, type DigitalSignatureElement, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, type DynamicTextElement, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, ExternalCalendarService, FILLED_DOCUMENTS_COLLECTION, type FileUploadElement, type FilledDocument, type FilledDocumentFileValue, FilledDocumentService, FilledDocumentStatus, type FinalBilling, type FirebaseUser, FoodAllergySubtype, type FormReminderNotification, type FormSubmissionConfirmationNotification, type GamificationInfo, Gender, type GeneralMessageNotification, type HeadingElement, HeadingLevel, INVITE_TOKENS_COLLECTION, Language, type LinkedFormInfo, type ListElement, ListType, type LocationData, MEDIA_METADATA_COLLECTION, MediaAccessLevel, type MediaMetadata, type MediaResource, MediaService, MediaType, MedicationAllergySubtype, type MultipleChoiceElement, NOTIFICATIONS_COLLECTION, type Notification, NotificationService, NotificationStatus, NotificationType, 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, PRACTITIONERS_COLLECTION, PRACTITIONER_INVITES_COLLECTION, PROCEDURES_COLLECTION, type ParagraphElement, type PatientClinic, type PatientDoctor, PatientInstructionStatus, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileForDoctor, type PatientProfileInfo, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, type PatientRequirementsFilters, PatientRequirementsService, type PatientReviewInfo, type PatientSensitiveInfo, PatientService, type PatientToken, PatientTokenStatus, type PaymentConfirmationNotification, PaymentStatus, type PlanDetails, type PostRequirementNotification, PracticeType, type Practitioner, 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, PricingMeasure, type Procedure, type ProcedureCategorization, type ProcedureExtendedInfo, ProcedureFamily, type ProcedureInfo, type ProcedureProduct, type ProcedureReview, type ProcedureReviewInfo, ProcedureService, type ProcedureSummaryInfo, type Product, ProductService, type ProposedWorkingHours, REGISTER_TOKENS_COLLECTION, REVIEWS_COLLECTION, type RatingScaleElement, type RequesterInfo, type Requirement, type RequirementInstructionDueNotification, RequirementType, type Review, type ReviewRequestNotification, ReviewService, SYNCED_CALENDARS_COLLECTION, type SearchAppointmentsParams, type SearchCalendarEventsParams, SearchLocationEnum, type SearchPatientsParams, type SignatureElement, type SingleChoiceElement, type StripeTransactionData, type Subcategory, SubcategoryService, SubscriptionModel, SubscriptionStatus, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, type Technology, type TechnologyDocumentationTemplate, TechnologyService, type TextInputElement, type TimeSlot, TimeUnit, TreatmentBenefit, type TreatmentBenefitDynamic, USERS_COLLECTION, USER_FORMS_SUBCOLLECTION, type UpdateAllergyData, type UpdateAppointmentData, type UpdateAppointmentParams, type UpdateBlockingConditionData, type UpdateBlockingEventParams, type UpdateCalendarEventData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdatePractitionerInviteData, type UpdateProcedureData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type VitalStats, type WorkingHours, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseFunctions, getFirebaseInstance, getFirebaseStorage, initializeFirebase };
6906
+ export { APPOINTMENTS_COLLECTION, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, type Appointment, type AppointmentCancelledNotification, type AppointmentMediaItem, type AppointmentMetadata, type AppointmentReminderNotification, type AppointmentRescheduledProposalNotification, AppointmentService, AppointmentStatus, type AppointmentStatusChangeNotification, AuthService, type BaseDocumentElement, type BaseNotification, BaseService, type BeforeAfterPerZone, type BillingInfo, type BillingPerZone, type BillingTransaction, BillingTransactionType, BillingTransactionsService, type BinaryChoiceElement, BlockingCondition, type Brand, BrandService, CALENDAR_COLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, CalendarServiceV3, CalendarSyncStatus, type Category, CategoryService, CertificationLevel, CertificationSpecialty, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicBranchSetupData, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, ClinicPhotoTag, type ClinicReview, type ClinicReviewInfo, ClinicService, ClinicTag, type ClinicTags, ConstantsService, type ContactPerson, Contraindication, type ContraindicationDynamic, CosmeticAllergySubtype, type CreateAdminTokenData, type CreateAppointmentData, type CreateAppointmentHttpData, type CreateAppointmentParams, type CreateBillingTransactionData, type CreateBlockingEventParams, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreateManualPatientData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePatientTokenData, type CreatePractitionerData, type CreatePractitionerInviteData, type CreatePractitionerTokenData, type CreateProcedureData, type CreateSyncedCalendarData, type CreateUserData, Currency, DEFAULT_MEDICAL_INFO, DOCTOR_FORMS_SUBCOLLECTION, DOCUMENTATION_TEMPLATES_COLLECTION, type DatePickerElement, type DateRange, type DigitalSignatureElement, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, type DynamicTextElement, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, ExternalCalendarService, FILLED_DOCUMENTS_COLLECTION, type FileUploadElement, type FilledDocument, type FilledDocumentFileValue, FilledDocumentService, FilledDocumentStatus, type FinalBilling, type FirebaseUser, FoodAllergySubtype, type FormReminderNotification, type FormSubmissionConfirmationNotification, type GamificationInfo, Gender, type GeneralMessageNotification, type HeadingElement, HeadingLevel, INVITE_TOKENS_COLLECTION, Language, type LinkedFormInfo, type ListElement, ListType, type LocationData, MEDIA_METADATA_COLLECTION, MediaAccessLevel, type MediaMetadata, type MediaResource, MediaService, MediaType, MedicationAllergySubtype, type MultipleChoiceElement, NOTIFICATIONS_COLLECTION, type Notification, NotificationService, NotificationStatus, NotificationType, 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, PRACTITIONERS_COLLECTION, PRACTITIONER_INVITES_COLLECTION, PROCEDURES_COLLECTION, type ParagraphElement, type PatientClinic, type PatientDoctor, PatientInstructionStatus, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileForDoctor, type PatientProfileInfo, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, type PatientRequirementsFilters, PatientRequirementsService, type PatientReviewInfo, type PatientSensitiveInfo, PatientService, type PatientToken, PatientTokenStatus, type PaymentConfirmationNotification, PaymentStatus, type PlanDetails, type PostRequirementNotification, PracticeType, type Practitioner, 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, PricingMeasure, type Procedure, type ProcedureCategorization, type ProcedureExtendedInfo, ProcedureFamily, type ProcedureInfo, type ProcedureProduct, type ProcedureReview, type ProcedureReviewInfo, ProcedureService, type ProcedureSummaryInfo, type Product, ProductService, type ProposedWorkingHours, REGISTER_TOKENS_COLLECTION, REVIEWS_COLLECTION, type RatingScaleElement, type RequesterInfo, type Requirement, type RequirementInstructionDueNotification, RequirementType, type Review, type ReviewRequestNotification, ReviewService, SYNCED_CALENDARS_COLLECTION, type SearchAppointmentsParams, type SearchCalendarEventsParams, SearchLocationEnum, type SearchPatientsParams, type SignatureElement, type SingleChoiceElement, type StripeTransactionData, type Subcategory, SubcategoryService, SubscriptionModel, SubscriptionStatus, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, type Technology, type TechnologyDocumentationTemplate, TechnologyService, type TextInputElement, type TimeSlot, TimeUnit, TreatmentBenefit, type TreatmentBenefitDynamic, USERS_COLLECTION, USER_FORMS_SUBCOLLECTION, type UpdateAllergyData, type UpdateAppointmentData, type UpdateAppointmentParams, type UpdateBlockingConditionData, type UpdateBlockingEventParams, type UpdateCalendarEventData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdatePractitionerInviteData, type UpdateProcedureData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type VitalStats, type WorkingHours, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseFunctions, getFirebaseInstance, getFirebaseStorage, initializeFirebase };