@blackcode_sa/metaestetics-api 1.12.4 → 1.12.6

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
@@ -3897,6 +3897,7 @@ declare enum SubscriptionModel {
3897
3897
  * Enum for subscription status
3898
3898
  */
3899
3899
  declare enum SubscriptionStatus {
3900
+ PENDING = "pending",
3900
3901
  ACTIVE = "active",
3901
3902
  PENDING_CANCELLATION = "pending_cancellation",
3902
3903
  CANCELED = "canceled",
@@ -3920,6 +3921,7 @@ interface BillingInfo {
3920
3921
  * Enum for billing transaction types
3921
3922
  */
3922
3923
  declare enum BillingTransactionType {
3924
+ SUBSCRIPTION_CREATED = "subscription_created",
3923
3925
  SUBSCRIPTION_ACTIVATED = "subscription_activated",
3924
3926
  SUBSCRIPTION_RENEWED = "subscription_renewed",
3925
3927
  SUBSCRIPTION_UPDATED = "subscription_updated",
package/dist/index.d.ts CHANGED
@@ -3897,6 +3897,7 @@ declare enum SubscriptionModel {
3897
3897
  * Enum for subscription status
3898
3898
  */
3899
3899
  declare enum SubscriptionStatus {
3900
+ PENDING = "pending",
3900
3901
  ACTIVE = "active",
3901
3902
  PENDING_CANCELLATION = "pending_cancellation",
3902
3903
  CANCELED = "canceled",
@@ -3920,6 +3921,7 @@ interface BillingInfo {
3920
3921
  * Enum for billing transaction types
3921
3922
  */
3922
3923
  declare enum BillingTransactionType {
3924
+ SUBSCRIPTION_CREATED = "subscription_created",
3923
3925
  SUBSCRIPTION_ACTIVATED = "subscription_activated",
3924
3926
  SUBSCRIPTION_RENEWED = "subscription_renewed",
3925
3927
  SUBSCRIPTION_UPDATED = "subscription_updated",
package/dist/index.js CHANGED
@@ -891,6 +891,7 @@ var SubscriptionModel = /* @__PURE__ */ ((SubscriptionModel2) => {
891
891
  return SubscriptionModel2;
892
892
  })(SubscriptionModel || {});
893
893
  var SubscriptionStatus = /* @__PURE__ */ ((SubscriptionStatus2) => {
894
+ SubscriptionStatus2["PENDING"] = "pending";
894
895
  SubscriptionStatus2["ACTIVE"] = "active";
895
896
  SubscriptionStatus2["PENDING_CANCELLATION"] = "pending_cancellation";
896
897
  SubscriptionStatus2["CANCELED"] = "canceled";
@@ -899,6 +900,7 @@ var SubscriptionStatus = /* @__PURE__ */ ((SubscriptionStatus2) => {
899
900
  return SubscriptionStatus2;
900
901
  })(SubscriptionStatus || {});
901
902
  var BillingTransactionType = /* @__PURE__ */ ((BillingTransactionType2) => {
903
+ BillingTransactionType2["SUBSCRIPTION_CREATED"] = "subscription_created";
902
904
  BillingTransactionType2["SUBSCRIPTION_ACTIVATED"] = "subscription_activated";
903
905
  BillingTransactionType2["SUBSCRIPTION_RENEWED"] = "subscription_renewed";
904
906
  BillingTransactionType2["SUBSCRIPTION_UPDATED"] = "subscription_updated";
package/dist/index.mjs CHANGED
@@ -773,6 +773,7 @@ var SubscriptionModel = /* @__PURE__ */ ((SubscriptionModel2) => {
773
773
  return SubscriptionModel2;
774
774
  })(SubscriptionModel || {});
775
775
  var SubscriptionStatus = /* @__PURE__ */ ((SubscriptionStatus2) => {
776
+ SubscriptionStatus2["PENDING"] = "pending";
776
777
  SubscriptionStatus2["ACTIVE"] = "active";
777
778
  SubscriptionStatus2["PENDING_CANCELLATION"] = "pending_cancellation";
778
779
  SubscriptionStatus2["CANCELED"] = "canceled";
@@ -781,6 +782,7 @@ var SubscriptionStatus = /* @__PURE__ */ ((SubscriptionStatus2) => {
781
782
  return SubscriptionStatus2;
782
783
  })(SubscriptionStatus || {});
783
784
  var BillingTransactionType = /* @__PURE__ */ ((BillingTransactionType2) => {
785
+ BillingTransactionType2["SUBSCRIPTION_CREATED"] = "subscription_created";
784
786
  BillingTransactionType2["SUBSCRIPTION_ACTIVATED"] = "subscription_activated";
785
787
  BillingTransactionType2["SUBSCRIPTION_RENEWED"] = "subscription_renewed";
786
788
  BillingTransactionType2["SUBSCRIPTION_UPDATED"] = "subscription_updated";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@blackcode_sa/metaestetics-api",
3
3
  "private": false,
4
- "version": "1.12.4",
4
+ "version": "1.12.6",
5
5
  "description": "Firebase authentication service with anonymous upgrade support",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.mjs",
@@ -95,6 +95,7 @@
95
95
  "typescript": "^5.7.3"
96
96
  },
97
97
  "dependencies": {
98
+ "@blackcode_sa/metaestetics-api": "^1.12.5",
98
99
  "axios": "^1.8.3",
99
100
  "expo-server-sdk": "^3.13.0",
100
101
  "firebase-admin": "^13.0.2",
@@ -1,4 +1,4 @@
1
- import { TimestampUtils } from "../utils/";
1
+ import { TimestampUtils } from '../utils/';
2
2
 
3
3
  // Re-export types needed by Cloud Functions consuming this module
4
4
  export type {
@@ -7,62 +7,69 @@ export type {
7
7
  PreRequirementNotification,
8
8
  PostRequirementNotification,
9
9
  AppointmentReminderNotification,
10
- } from "../types/notifications";
11
- export type { PatientProfile, PatientSensitiveInfo } from "../types/patient";
12
- export {
13
- PATIENTS_COLLECTION,
14
- PATIENT_SENSITIVE_INFO_COLLECTION,
15
- } from "../types/patient";
16
- export type { Clinic, ClinicLocation } from "../types/clinic";
17
- export type { ClinicInfo } from "../types/profile";
18
- export type { Practitioner, PractitionerToken } from "../types/practitioner";
19
- export type { PractitionerInvite } from "../types/clinic/practitioner-invite.types";
20
- export type { DoctorInfo } from "../types/clinic";
21
- export type { Procedure, ProcedureSummaryInfo } from "../types/procedure";
22
- export type { PatientProfile as Patient } from "../types/patient";
23
- export type { Appointment } from "../types/appointment";
24
- export type { FilledDocument } from "../types/documentation-templates";
25
- export type { Review } from "../types/reviews";
10
+ } from '../types/notifications';
11
+ export type { PatientProfile, PatientSensitiveInfo } from '../types/patient';
12
+ export { PATIENTS_COLLECTION, PATIENT_SENSITIVE_INFO_COLLECTION } from '../types/patient';
13
+ export type { Clinic, ClinicLocation } from '../types/clinic';
14
+ export type { ClinicInfo } from '../types/profile';
15
+ export type { Practitioner, PractitionerToken } from '../types/practitioner';
16
+ export type { PractitionerInvite } from '../types/clinic/practitioner-invite.types';
17
+ export type { DoctorInfo } from '../types/clinic';
18
+ export type { Procedure, ProcedureSummaryInfo } from '../types/procedure';
19
+ export type { PatientProfile as Patient } from '../types/patient';
20
+ export type { Appointment } from '../types/appointment';
21
+ export type { FilledDocument } from '../types/documentation-templates';
22
+ export type { Review } from '../types/reviews';
23
+
24
+ // Re-export billing types for Stripe integration
25
+ export type {
26
+ BillingInfo,
27
+ BillingTransaction,
28
+ CreateBillingTransactionData,
29
+ StripeTransactionData,
30
+ PlanDetails,
31
+ } from '../types/clinic';
32
+ export { BillingTransactionType, SubscriptionStatus } from '../types/clinic';
26
33
 
27
34
  // Re-export enums/consts
28
35
  export {
29
36
  NotificationType,
30
37
  NotificationStatus,
31
38
  NOTIFICATIONS_COLLECTION,
32
- } from "../types/notifications";
33
- export { UserRole } from "../types/user";
34
- export { PractitionerTokenStatus } from "../types/practitioner";
35
- export { PractitionerInviteStatus } from "../types/clinic/practitioner-invite.types";
36
- export { AppointmentStatus } from "../types/appointment";
39
+ } from '../types/notifications';
40
+ export { UserRole } from '../types/user';
41
+ export { PractitionerTokenStatus } from '../types/practitioner';
42
+ export { PractitionerInviteStatus } from '../types/clinic/practitioner-invite.types';
43
+ export { AppointmentStatus } from '../types/appointment';
37
44
 
38
45
  // Export mailing service interfaces
39
46
  export type {
40
47
  ExistingPractitionerInviteEmailData,
41
48
  ClinicAdminNotificationData,
42
- } from "./mailing/practitionerInvite/";
49
+ } from './mailing/practitionerInvite/';
43
50
 
44
51
  // Re-export types needed by admin services
45
- export type * from "../types/patient/patient-requirements";
46
- export * from "../types/patient/patient-requirements";
52
+ export type * from '../types/patient/patient-requirements';
53
+ export * from '../types/patient/patient-requirements';
47
54
 
48
55
  /**
49
56
  * Main entry point for the Admin module.
50
57
  * This module contains services and utilities intended for administrative tasks,
51
58
  * background processing, and direct use by Cloud Functions.
52
59
  */
53
- console.log("[Admin Module] Initialized and services exported.");
60
+ console.log('[Admin Module] Initialized and services exported.');
54
61
 
55
62
  // Initialize TimestampUtils for server-side use
56
63
  TimestampUtils.enableServerMode();
57
64
 
58
65
  // Export all services and utilities from the admin sub-modules.
59
- export * from "./aggregation";
60
- export * from "./booking";
61
- export * from "./calendar";
62
- export * from "./documentation-templates";
63
- export * from "./free-consultation";
64
- export * from "./logger";
65
- export * from "./mailing";
66
- export * from "./notifications";
67
- export * from "./requirements";
68
- export * from "./users";
66
+ export * from './aggregation';
67
+ export * from './booking';
68
+ export * from './calendar';
69
+ export * from './documentation-templates';
70
+ export * from './free-consultation';
71
+ export * from './logger';
72
+ export * from './mailing';
73
+ export * from './notifications';
74
+ export * from './requirements';
75
+ export * from './users';
@@ -1,22 +1,17 @@
1
- import { Timestamp, FieldValue } from "firebase/firestore";
1
+ import { Timestamp, FieldValue } from 'firebase/firestore';
2
2
 
3
- import type { ClinicInfo } from "../profile";
4
- import { ClinicReviewInfo } from "../reviews";
5
- import { ProcedureSummaryInfo } from "../procedure";
3
+ import type { ClinicInfo } from '../profile';
4
+ import { ClinicReviewInfo } from '../reviews';
5
+ import { ProcedureSummaryInfo } from '../procedure';
6
6
 
7
- export const CLINIC_GROUPS_COLLECTION = "clinic_groups";
8
- export const CLINIC_ADMINS_COLLECTION = "clinic_admins";
9
- export const CLINICS_COLLECTION = "clinics";
7
+ export const CLINIC_GROUPS_COLLECTION = 'clinic_groups';
8
+ export const CLINIC_ADMINS_COLLECTION = 'clinic_admins';
9
+ export const CLINICS_COLLECTION = 'clinics';
10
10
 
11
- import {
12
- PracticeType,
13
- Language,
14
- ClinicTag,
15
- ClinicPhotoTag,
16
- } from "./preferences.types";
17
- import type { MediaResource } from "../../services/media/media.service";
11
+ import { PracticeType, Language, ClinicTag, ClinicPhotoTag } from './preferences.types';
12
+ import type { MediaResource } from '../../services/media/media.service';
18
13
 
19
- export * from "./preferences.types";
14
+ export * from './preferences.types';
20
15
 
21
16
  /**
22
17
  * Interface for clinic contact information
@@ -137,9 +132,9 @@ export interface UpdateClinicAdminData extends Partial<CreateClinicAdminData> {
137
132
  * Enum for admin token status
138
133
  */
139
134
  export enum AdminTokenStatus {
140
- ACTIVE = "active",
141
- USED = "used",
142
- EXPIRED = "expired",
135
+ ACTIVE = 'active',
136
+ USED = 'used',
137
+ EXPIRED = 'expired',
143
138
  }
144
139
 
145
140
  /**
@@ -168,21 +163,22 @@ export interface AdminInfo {
168
163
  * Enum for subscription models
169
164
  */
170
165
  export enum SubscriptionModel {
171
- NO_SUBSCRIPTION = "no_subscription",
172
- BASIC = "basic",
173
- PREMIUM = "premium",
174
- ENTERPRISE = "enterprise",
166
+ NO_SUBSCRIPTION = 'no_subscription',
167
+ BASIC = 'basic',
168
+ PREMIUM = 'premium',
169
+ ENTERPRISE = 'enterprise',
175
170
  }
176
171
 
177
172
  /**
178
173
  * Enum for subscription status
179
174
  */
180
175
  export enum SubscriptionStatus {
181
- ACTIVE = "active",
182
- PENDING_CANCELLATION = "pending_cancellation",
183
- CANCELED = "canceled",
184
- PAST_DUE = "past_due",
185
- TRIALING = "trialing",
176
+ PENDING = 'pending',
177
+ ACTIVE = 'active',
178
+ PENDING_CANCELLATION = 'pending_cancellation',
179
+ CANCELED = 'canceled',
180
+ PAST_DUE = 'past_due',
181
+ TRIALING = 'trialing',
186
182
  }
187
183
 
188
184
  /**
@@ -203,12 +199,13 @@ export interface BillingInfo {
203
199
  * Enum for billing transaction types
204
200
  */
205
201
  export enum BillingTransactionType {
206
- SUBSCRIPTION_ACTIVATED = "subscription_activated",
207
- SUBSCRIPTION_RENEWED = "subscription_renewed",
208
- SUBSCRIPTION_UPDATED = "subscription_updated",
209
- SUBSCRIPTION_CANCELED = "subscription_canceled",
210
- SUBSCRIPTION_REACTIVATED = "subscription_reactivated",
211
- SUBSCRIPTION_DELETED = "subscription_deleted",
202
+ SUBSCRIPTION_CREATED = 'subscription_created',
203
+ SUBSCRIPTION_ACTIVATED = 'subscription_activated',
204
+ SUBSCRIPTION_RENEWED = 'subscription_renewed',
205
+ SUBSCRIPTION_UPDATED = 'subscription_updated',
206
+ SUBSCRIPTION_CANCELED = 'subscription_canceled',
207
+ SUBSCRIPTION_REACTIVATED = 'subscription_reactivated',
208
+ SUBSCRIPTION_DELETED = 'subscription_deleted',
212
209
  }
213
210
 
214
211
  /**
@@ -489,4 +486,4 @@ export interface ClinicTags {
489
486
  }
490
487
 
491
488
  // Export practitioner invite types
492
- export * from "./practitioner-invite.types";
489
+ export * from './practitioner-invite.types';
@@ -1,5 +1,5 @@
1
- import { z } from "zod";
2
- import { Timestamp } from "firebase/firestore";
1
+ import { z } from 'zod';
2
+ import { Timestamp } from 'firebase/firestore';
3
3
  import {
4
4
  ClinicTag,
5
5
  AdminTokenStatus,
@@ -8,15 +8,11 @@ import {
8
8
  BillingTransactionType,
9
9
  PracticeType,
10
10
  Language,
11
- } from "../types/clinic";
11
+ } from '../types/clinic';
12
12
 
13
- import { clinicReviewInfoSchema } from "./reviews.schema";
14
- import {
15
- procedureSummaryInfoSchema,
16
- clinicInfoSchema,
17
- doctorInfoSchema,
18
- } from "./shared.schema";
19
- import { mediaResourceSchema } from "./media.schema";
13
+ import { clinicReviewInfoSchema } from './reviews.schema';
14
+ import { procedureSummaryInfoSchema, clinicInfoSchema, doctorInfoSchema } from './shared.schema';
15
+ import { mediaResourceSchema } from './media.schema';
20
16
 
21
17
  /**
22
18
  * Validaciona šema za kontakt informacije
@@ -53,7 +49,7 @@ const workingHoursTimeSchema = z.object({
53
49
  z.object({
54
50
  start: z.string(),
55
51
  end: z.string(),
56
- })
52
+ }),
57
53
  )
58
54
  .optional(),
59
55
  });
@@ -273,7 +269,7 @@ export const clinicSchema = z.object({
273
269
  z.object({
274
270
  url: mediaResourceSchema,
275
271
  tag: z.string(),
276
- })
272
+ }),
277
273
  )
278
274
  .optional(),
279
275
  doctors: z.array(z.string()), // List of practitioner IDs
@@ -352,7 +348,7 @@ export const createClinicSchema = z.object({
352
348
  z.object({
353
349
  url: mediaResourceSchema,
354
350
  tag: z.string(),
355
- })
351
+ }),
356
352
  )
357
353
  .optional(),
358
354
  doctors: z.array(z.string()).optional().default([]),
@@ -452,7 +448,7 @@ export const clinicBranchSetupSchema = z.object({
452
448
  z.object({
453
449
  url: mediaResourceSchema,
454
450
  tag: z.string(),
455
- })
451
+ }),
456
452
  )
457
453
  .optional(),
458
454
  featuredPhotos: z.array(mediaResourceSchema).optional(),
@@ -484,7 +480,7 @@ export const updateClinicSchema = z.object({
484
480
  z.object({
485
481
  url: mediaResourceSchema,
486
482
  tag: z.string(),
487
- })
483
+ }),
488
484
  )
489
485
  .optional(),
490
486
  doctors: z.array(z.string()).optional(),