@blackcode_sa/metaestetics-api 1.4.3 → 1.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1210,6 +1210,21 @@ interface CreateClinicData {
1210
1210
  interface UpdateClinicData extends Partial<CreateClinicData> {
1211
1211
  updatedAt?: FieldValue;
1212
1212
  }
1213
+ /**
1214
+ * Interface for creating a default clinic group
1215
+ */
1216
+ interface CreateDefaultClinicGroupData {
1217
+ name: string;
1218
+ ownerId: string;
1219
+ contactPerson: ContactPerson;
1220
+ contactInfo: ClinicContactInfo;
1221
+ hqLocation: ClinicLocation;
1222
+ isActive: boolean;
1223
+ logo?: string;
1224
+ practiceType?: PracticeType;
1225
+ languages?: Language[];
1226
+ subscriptionModel?: SubscriptionModel;
1227
+ }
1213
1228
  /**
1214
1229
  * Interface for clinic admin signup data
1215
1230
  */
@@ -1696,6 +1711,7 @@ declare class UserService extends BaseService {
1696
1711
  groupToken?: string;
1697
1712
  groupId?: string;
1698
1713
  };
1714
+ skipProfileCreation?: boolean;
1699
1715
  }): Promise<User>;
1700
1716
  /**
1701
1717
  * Dohvata ili kreira korisnika na osnovu Firebase korisnika
@@ -11869,4 +11885,4 @@ interface Technology {
11869
11885
  updatedAt: Date;
11870
11886
  }
11871
11887
 
11872
- export { AUTH_ERRORS, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, type AppointmentNotification, type AppointmentReminderNotification, AuthError, AuthService, type BaseNotification, BlockingCondition, type Brand, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type Category, CertificationLevel, CertificationSpecialty, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicLocation, type ClinicReview, ClinicService, type ClinicTags, Contraindication, CosmeticAllergySubtype, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDocumentTemplateData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePractitionerData, type CreateUserData, Currency, DOCUMENTATION_TEMPLATES_COLLECTION, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, FILLED_DOCUMENTS_COLLECTION, type FilledDocument, FilledDocumentService, FilledDocumentStatus, FirebaseErrorCode, type FirebaseUser, FoodAllergySubtype, type GamificationInfo, Gender, HeadingLevel, ListType, type LocationData, MedicationAllergySubtype, type Notification, NotificationService, NotificationStatus, NotificationType, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_SENSITIVE_INFO_COLLECTION, PRACTITIONERS_COLLECTION, type PatientClinic, type PatientDoctor, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientSensitiveInfo, PatientService, type PostRequirementNotification, type Practitioner, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerReview, PractitionerService, type PractitionerWorkingHours, type PreRequirementNotification, PricingMeasure, ProcedureFamily, type Product, type Requirement, type Subcategory, type Technology, TreatmentBenefit, USER_ERRORS, type UpdateAllergyData, type UpdateBlockingConditionData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdateVitalStatsData, type User, UserRole, UserService, type ValidationSchema, type VitalStats, type WorkingHours, addAllergySchema, addBlockingConditionSchema, addContraindicationSchema, addMedicationSchema, addressDataSchema, adminInfoSchema, adminTokenSchema, allergySchema, allergySubtypeSchema, appointmentNotificationSchema, appointmentReminderNotificationSchema, baseNotificationSchema, blockingConditionSchema, clinicAdminOptionsSchema, clinicAdminSchema, clinicAdminSignupSchema, clinicBranchSetupSchema, clinicContactInfoSchema, clinicGroupSchema, clinicGroupSetupSchema, clinicInfoSchema, clinicLocationSchema, clinicReviewSchema, clinicSchema, clinicTagsSchema, contactPersonSchema, contraindicationSchema, createAdminTokenSchema, createClinicAdminSchema, createClinicGroupSchema, createClinicSchema, createDefaultClinicGroupSchema, createDocumentTemplateSchema, createPatientLocationInfoSchema, createPatientMedicalInfoSchema, createPatientProfileSchema, createPatientSensitiveInfoSchema, createPractitionerSchema, createUserOptionsSchema, doctorInfoSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, emailSchema, emergencyContactSchema, gamificationSchema, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseInstance, initializeFirebase, locationDataSchema, medicationSchema, notificationSchema, passwordSchema, patientClinicSchema, patientDoctorSchema, patientLocationInfoSchema, patientMedicalInfoSchema, patientProfileSchema, patientSensitiveInfoSchema, postRequirementNotificationSchema, practitionerBasicInfoSchema, practitionerCertificationSchema, practitionerClinicProceduresSchema, practitionerReviewSchema, practitionerSchema, practitionerWorkingHoursSchema, preRequirementNotificationSchema, reviewInfoSchema, serviceInfoSchema, timestampSchema, updateAllergySchema, updateBlockingConditionSchema, updateClinicAdminSchema, updateClinicGroupSchema, updateClinicSchema, updateContraindicationSchema, updateDocumentTemplateSchema, updateMedicationSchema, updatePatientMedicalInfoSchema, updateVitalStatsSchema, userRoleSchema, userRolesSchema, userSchema, vitalStatsSchema, workingHoursSchema };
11888
+ export { AUTH_ERRORS, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, type AppointmentNotification, type AppointmentReminderNotification, AuthError, AuthService, type BaseNotification, BlockingCondition, type Brand, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type Category, CertificationLevel, CertificationSpecialty, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicBranchSetupData, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, type ClinicReview, ClinicService, ClinicTag, type ClinicTags, type ContactPerson, Contraindication, CosmeticAllergySubtype, type CreateAdminTokenData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePractitionerData, type CreateUserData, Currency, DOCUMENTATION_TEMPLATES_COLLECTION, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, FILLED_DOCUMENTS_COLLECTION, type FilledDocument, FilledDocumentService, FilledDocumentStatus, FirebaseErrorCode, type FirebaseUser, FoodAllergySubtype, type GamificationInfo, Gender, HeadingLevel, Language, ListType, type LocationData, MedicationAllergySubtype, type Notification, NotificationService, NotificationStatus, NotificationType, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_SENSITIVE_INFO_COLLECTION, PRACTITIONERS_COLLECTION, type PatientClinic, type PatientDoctor, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientSensitiveInfo, PatientService, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerReview, PractitionerService, type PractitionerWorkingHours, type PreRequirementNotification, PricingMeasure, ProcedureFamily, type Product, type Requirement, type ReviewInfo, type ServiceInfo, type Subcategory, SubscriptionModel, type Technology, TreatmentBenefit, USER_ERRORS, type UpdateAllergyData, type UpdateBlockingConditionData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdateVitalStatsData, type User, UserRole, UserService, type ValidationSchema, type VitalStats, type WorkingHours, addAllergySchema, addBlockingConditionSchema, addContraindicationSchema, addMedicationSchema, addressDataSchema, adminInfoSchema, adminTokenSchema, allergySchema, allergySubtypeSchema, appointmentNotificationSchema, appointmentReminderNotificationSchema, baseNotificationSchema, blockingConditionSchema, clinicAdminOptionsSchema, clinicAdminSchema, clinicAdminSignupSchema, clinicBranchSetupSchema, clinicContactInfoSchema, clinicGroupSchema, clinicGroupSetupSchema, clinicInfoSchema, clinicLocationSchema, clinicReviewSchema, clinicSchema, clinicTagsSchema, contactPersonSchema, contraindicationSchema, createAdminTokenSchema, createClinicAdminSchema, createClinicGroupSchema, createClinicSchema, createDefaultClinicGroupSchema, createDocumentTemplateSchema, createPatientLocationInfoSchema, createPatientMedicalInfoSchema, createPatientProfileSchema, createPatientSensitiveInfoSchema, createPractitionerSchema, createUserOptionsSchema, doctorInfoSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, emailSchema, emergencyContactSchema, gamificationSchema, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseInstance, initializeFirebase, locationDataSchema, medicationSchema, notificationSchema, passwordSchema, patientClinicSchema, patientDoctorSchema, patientLocationInfoSchema, patientMedicalInfoSchema, patientProfileSchema, patientSensitiveInfoSchema, postRequirementNotificationSchema, practitionerBasicInfoSchema, practitionerCertificationSchema, practitionerClinicProceduresSchema, practitionerReviewSchema, practitionerSchema, practitionerWorkingHoursSchema, preRequirementNotificationSchema, reviewInfoSchema, serviceInfoSchema, timestampSchema, updateAllergySchema, updateBlockingConditionSchema, updateClinicAdminSchema, updateClinicGroupSchema, updateClinicSchema, updateContraindicationSchema, updateDocumentTemplateSchema, updateMedicationSchema, updatePatientMedicalInfoSchema, updateVitalStatsSchema, userRoleSchema, userRolesSchema, userSchema, vitalStatsSchema, workingHoursSchema };
package/dist/index.d.ts CHANGED
@@ -1210,6 +1210,21 @@ interface CreateClinicData {
1210
1210
  interface UpdateClinicData extends Partial<CreateClinicData> {
1211
1211
  updatedAt?: FieldValue;
1212
1212
  }
1213
+ /**
1214
+ * Interface for creating a default clinic group
1215
+ */
1216
+ interface CreateDefaultClinicGroupData {
1217
+ name: string;
1218
+ ownerId: string;
1219
+ contactPerson: ContactPerson;
1220
+ contactInfo: ClinicContactInfo;
1221
+ hqLocation: ClinicLocation;
1222
+ isActive: boolean;
1223
+ logo?: string;
1224
+ practiceType?: PracticeType;
1225
+ languages?: Language[];
1226
+ subscriptionModel?: SubscriptionModel;
1227
+ }
1213
1228
  /**
1214
1229
  * Interface for clinic admin signup data
1215
1230
  */
@@ -1696,6 +1711,7 @@ declare class UserService extends BaseService {
1696
1711
  groupToken?: string;
1697
1712
  groupId?: string;
1698
1713
  };
1714
+ skipProfileCreation?: boolean;
1699
1715
  }): Promise<User>;
1700
1716
  /**
1701
1717
  * Dohvata ili kreira korisnika na osnovu Firebase korisnika
@@ -11869,4 +11885,4 @@ interface Technology {
11869
11885
  updatedAt: Date;
11870
11886
  }
11871
11887
 
11872
- export { AUTH_ERRORS, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, type AppointmentNotification, type AppointmentReminderNotification, AuthError, AuthService, type BaseNotification, BlockingCondition, type Brand, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type Category, CertificationLevel, CertificationSpecialty, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicLocation, type ClinicReview, ClinicService, type ClinicTags, Contraindication, CosmeticAllergySubtype, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDocumentTemplateData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePractitionerData, type CreateUserData, Currency, DOCUMENTATION_TEMPLATES_COLLECTION, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, FILLED_DOCUMENTS_COLLECTION, type FilledDocument, FilledDocumentService, FilledDocumentStatus, FirebaseErrorCode, type FirebaseUser, FoodAllergySubtype, type GamificationInfo, Gender, HeadingLevel, ListType, type LocationData, MedicationAllergySubtype, type Notification, NotificationService, NotificationStatus, NotificationType, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_SENSITIVE_INFO_COLLECTION, PRACTITIONERS_COLLECTION, type PatientClinic, type PatientDoctor, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientSensitiveInfo, PatientService, type PostRequirementNotification, type Practitioner, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerReview, PractitionerService, type PractitionerWorkingHours, type PreRequirementNotification, PricingMeasure, ProcedureFamily, type Product, type Requirement, type Subcategory, type Technology, TreatmentBenefit, USER_ERRORS, type UpdateAllergyData, type UpdateBlockingConditionData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdateVitalStatsData, type User, UserRole, UserService, type ValidationSchema, type VitalStats, type WorkingHours, addAllergySchema, addBlockingConditionSchema, addContraindicationSchema, addMedicationSchema, addressDataSchema, adminInfoSchema, adminTokenSchema, allergySchema, allergySubtypeSchema, appointmentNotificationSchema, appointmentReminderNotificationSchema, baseNotificationSchema, blockingConditionSchema, clinicAdminOptionsSchema, clinicAdminSchema, clinicAdminSignupSchema, clinicBranchSetupSchema, clinicContactInfoSchema, clinicGroupSchema, clinicGroupSetupSchema, clinicInfoSchema, clinicLocationSchema, clinicReviewSchema, clinicSchema, clinicTagsSchema, contactPersonSchema, contraindicationSchema, createAdminTokenSchema, createClinicAdminSchema, createClinicGroupSchema, createClinicSchema, createDefaultClinicGroupSchema, createDocumentTemplateSchema, createPatientLocationInfoSchema, createPatientMedicalInfoSchema, createPatientProfileSchema, createPatientSensitiveInfoSchema, createPractitionerSchema, createUserOptionsSchema, doctorInfoSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, emailSchema, emergencyContactSchema, gamificationSchema, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseInstance, initializeFirebase, locationDataSchema, medicationSchema, notificationSchema, passwordSchema, patientClinicSchema, patientDoctorSchema, patientLocationInfoSchema, patientMedicalInfoSchema, patientProfileSchema, patientSensitiveInfoSchema, postRequirementNotificationSchema, practitionerBasicInfoSchema, practitionerCertificationSchema, practitionerClinicProceduresSchema, practitionerReviewSchema, practitionerSchema, practitionerWorkingHoursSchema, preRequirementNotificationSchema, reviewInfoSchema, serviceInfoSchema, timestampSchema, updateAllergySchema, updateBlockingConditionSchema, updateClinicAdminSchema, updateClinicGroupSchema, updateClinicSchema, updateContraindicationSchema, updateDocumentTemplateSchema, updateMedicationSchema, updatePatientMedicalInfoSchema, updateVitalStatsSchema, userRoleSchema, userRolesSchema, userSchema, vitalStatsSchema, workingHoursSchema };
11888
+ export { AUTH_ERRORS, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, type AppointmentNotification, type AppointmentReminderNotification, AuthError, AuthService, type BaseNotification, BlockingCondition, type Brand, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type Category, CertificationLevel, CertificationSpecialty, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicBranchSetupData, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, type ClinicReview, ClinicService, ClinicTag, type ClinicTags, type ContactPerson, Contraindication, CosmeticAllergySubtype, type CreateAdminTokenData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePractitionerData, type CreateUserData, Currency, DOCUMENTATION_TEMPLATES_COLLECTION, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, FILLED_DOCUMENTS_COLLECTION, type FilledDocument, FilledDocumentService, FilledDocumentStatus, FirebaseErrorCode, type FirebaseUser, FoodAllergySubtype, type GamificationInfo, Gender, HeadingLevel, Language, ListType, type LocationData, MedicationAllergySubtype, type Notification, NotificationService, NotificationStatus, NotificationType, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_SENSITIVE_INFO_COLLECTION, PRACTITIONERS_COLLECTION, type PatientClinic, type PatientDoctor, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientSensitiveInfo, PatientService, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerReview, PractitionerService, type PractitionerWorkingHours, type PreRequirementNotification, PricingMeasure, ProcedureFamily, type Product, type Requirement, type ReviewInfo, type ServiceInfo, type Subcategory, SubscriptionModel, type Technology, TreatmentBenefit, USER_ERRORS, type UpdateAllergyData, type UpdateBlockingConditionData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdateVitalStatsData, type User, UserRole, UserService, type ValidationSchema, type VitalStats, type WorkingHours, addAllergySchema, addBlockingConditionSchema, addContraindicationSchema, addMedicationSchema, addressDataSchema, adminInfoSchema, adminTokenSchema, allergySchema, allergySubtypeSchema, appointmentNotificationSchema, appointmentReminderNotificationSchema, baseNotificationSchema, blockingConditionSchema, clinicAdminOptionsSchema, clinicAdminSchema, clinicAdminSignupSchema, clinicBranchSetupSchema, clinicContactInfoSchema, clinicGroupSchema, clinicGroupSetupSchema, clinicInfoSchema, clinicLocationSchema, clinicReviewSchema, clinicSchema, clinicTagsSchema, contactPersonSchema, contraindicationSchema, createAdminTokenSchema, createClinicAdminSchema, createClinicGroupSchema, createClinicSchema, createDefaultClinicGroupSchema, createDocumentTemplateSchema, createPatientLocationInfoSchema, createPatientMedicalInfoSchema, createPatientProfileSchema, createPatientSensitiveInfoSchema, createPractitionerSchema, createUserOptionsSchema, doctorInfoSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, emailSchema, emergencyContactSchema, gamificationSchema, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseInstance, initializeFirebase, locationDataSchema, medicationSchema, notificationSchema, passwordSchema, patientClinicSchema, patientDoctorSchema, patientLocationInfoSchema, patientMedicalInfoSchema, patientProfileSchema, patientSensitiveInfoSchema, postRequirementNotificationSchema, practitionerBasicInfoSchema, practitionerCertificationSchema, practitionerClinicProceduresSchema, practitionerReviewSchema, practitionerSchema, practitionerWorkingHoursSchema, preRequirementNotificationSchema, reviewInfoSchema, serviceInfoSchema, timestampSchema, updateAllergySchema, updateBlockingConditionSchema, updateClinicAdminSchema, updateClinicGroupSchema, updateClinicSchema, updateContraindicationSchema, updateDocumentTemplateSchema, updateMedicationSchema, updatePatientMedicalInfoSchema, updateVitalStatsSchema, userRoleSchema, userRolesSchema, userSchema, vitalStatsSchema, workingHoursSchema };
package/dist/index.js CHANGED
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
23
  AUTH_ERRORS: () => AUTH_ERRORS,
24
+ AdminTokenStatus: () => AdminTokenStatus,
24
25
  AllergyType: () => AllergyType,
25
26
  AuthService: () => AuthService,
26
27
  BlockingCondition: () => BlockingCondition,
@@ -32,6 +33,7 @@ __export(index_exports, {
32
33
  ClinicAdminService: () => ClinicAdminService,
33
34
  ClinicGroupService: () => ClinicGroupService,
34
35
  ClinicService: () => ClinicService,
36
+ ClinicTag: () => ClinicTag,
35
37
  Contraindication: () => Contraindication,
36
38
  CosmeticAllergySubtype: () => CosmeticAllergySubtype,
37
39
  Currency: () => Currency,
@@ -47,6 +49,7 @@ __export(index_exports, {
47
49
  FoodAllergySubtype: () => FoodAllergySubtype,
48
50
  Gender: () => Gender,
49
51
  HeadingLevel: () => HeadingLevel,
52
+ Language: () => Language,
50
53
  ListType: () => ListType,
51
54
  MedicationAllergySubtype: () => MedicationAllergySubtype,
52
55
  NotificationService: () => NotificationService,
@@ -60,9 +63,11 @@ __export(index_exports, {
60
63
  PATIENT_SENSITIVE_INFO_COLLECTION: () => PATIENT_SENSITIVE_INFO_COLLECTION,
61
64
  PRACTITIONERS_COLLECTION: () => PRACTITIONERS_COLLECTION,
62
65
  PatientService: () => PatientService,
66
+ PracticeType: () => PracticeType,
63
67
  PractitionerService: () => PractitionerService,
64
68
  PricingMeasure: () => PricingMeasure,
65
69
  ProcedureFamily: () => ProcedureFamily,
70
+ SubscriptionModel: () => SubscriptionModel,
66
71
  TreatmentBenefit: () => TreatmentBenefit,
67
72
  USER_ERRORS: () => USER_ERRORS,
68
73
  UserService: () => UserService,
@@ -3389,6 +3394,9 @@ var UserService = class extends BaseService {
3389
3394
  profiles.patientProfile = patientProfile.id;
3390
3395
  break;
3391
3396
  case "clinic_admin" /* CLINIC_ADMIN */:
3397
+ if (options == null ? void 0 : options.skipProfileCreation) {
3398
+ break;
3399
+ }
3392
3400
  if (((_a = options == null ? void 0 : options.clinicAdminData) == null ? void 0 : _a.groupToken) && ((_b = options == null ? void 0 : options.clinicAdminData) == null ? void 0 : _b.groupId)) {
3393
3401
  const isValid = await this.getClinicAdminService().getClinicGroupService().verifyAndUseAdminToken(
3394
3402
  options.clinicAdminData.groupId,
@@ -4474,9 +4482,13 @@ var AuthService = class extends BaseService {
4474
4482
  data.email,
4475
4483
  data.password
4476
4484
  );
4477
- const user = await this.userService.createUser(firebaseUser, [
4478
- "clinic_admin" /* CLINIC_ADMIN */
4479
- ]);
4485
+ const user = await this.userService.createUser(
4486
+ firebaseUser,
4487
+ ["clinic_admin" /* CLINIC_ADMIN */],
4488
+ {
4489
+ skipProfileCreation: true
4490
+ }
4491
+ );
4480
4492
  const contactPerson = {
4481
4493
  firstName: data.firstName,
4482
4494
  lastName: data.lastName,
@@ -5494,6 +5506,7 @@ var notificationSchema = import_zod16.z.discriminatedUnion("notificationType", [
5494
5506
  // Annotate the CommonJS export names for ESM import in node:
5495
5507
  0 && (module.exports = {
5496
5508
  AUTH_ERRORS,
5509
+ AdminTokenStatus,
5497
5510
  AllergyType,
5498
5511
  AuthService,
5499
5512
  BlockingCondition,
@@ -5505,6 +5518,7 @@ var notificationSchema = import_zod16.z.discriminatedUnion("notificationType", [
5505
5518
  ClinicAdminService,
5506
5519
  ClinicGroupService,
5507
5520
  ClinicService,
5521
+ ClinicTag,
5508
5522
  Contraindication,
5509
5523
  CosmeticAllergySubtype,
5510
5524
  Currency,
@@ -5520,6 +5534,7 @@ var notificationSchema = import_zod16.z.discriminatedUnion("notificationType", [
5520
5534
  FoodAllergySubtype,
5521
5535
  Gender,
5522
5536
  HeadingLevel,
5537
+ Language,
5523
5538
  ListType,
5524
5539
  MedicationAllergySubtype,
5525
5540
  NotificationService,
@@ -5533,9 +5548,11 @@ var notificationSchema = import_zod16.z.discriminatedUnion("notificationType", [
5533
5548
  PATIENT_SENSITIVE_INFO_COLLECTION,
5534
5549
  PRACTITIONERS_COLLECTION,
5535
5550
  PatientService,
5551
+ PracticeType,
5536
5552
  PractitionerService,
5537
5553
  PricingMeasure,
5538
5554
  ProcedureFamily,
5555
+ SubscriptionModel,
5539
5556
  TreatmentBenefit,
5540
5557
  USER_ERRORS,
5541
5558
  UserService,
package/dist/index.mjs CHANGED
@@ -3334,6 +3334,9 @@ var UserService = class extends BaseService {
3334
3334
  profiles.patientProfile = patientProfile.id;
3335
3335
  break;
3336
3336
  case "clinic_admin" /* CLINIC_ADMIN */:
3337
+ if (options == null ? void 0 : options.skipProfileCreation) {
3338
+ break;
3339
+ }
3337
3340
  if (((_a = options == null ? void 0 : options.clinicAdminData) == null ? void 0 : _a.groupToken) && ((_b = options == null ? void 0 : options.clinicAdminData) == null ? void 0 : _b.groupId)) {
3338
3341
  const isValid = await this.getClinicAdminService().getClinicGroupService().verifyAndUseAdminToken(
3339
3342
  options.clinicAdminData.groupId,
@@ -4449,9 +4452,13 @@ var AuthService = class extends BaseService {
4449
4452
  data.email,
4450
4453
  data.password
4451
4454
  );
4452
- const user = await this.userService.createUser(firebaseUser, [
4453
- "clinic_admin" /* CLINIC_ADMIN */
4454
- ]);
4455
+ const user = await this.userService.createUser(
4456
+ firebaseUser,
4457
+ ["clinic_admin" /* CLINIC_ADMIN */],
4458
+ {
4459
+ skipProfileCreation: true
4460
+ }
4461
+ );
4455
4462
  const contactPerson = {
4456
4463
  firstName: data.firstName,
4457
4464
  lastName: data.lastName,
@@ -5506,6 +5513,7 @@ var notificationSchema = z16.discriminatedUnion("notificationType", [
5506
5513
  ]);
5507
5514
  export {
5508
5515
  AUTH_ERRORS,
5516
+ AdminTokenStatus,
5509
5517
  AllergyType,
5510
5518
  AuthService,
5511
5519
  BlockingCondition,
@@ -5517,6 +5525,7 @@ export {
5517
5525
  ClinicAdminService,
5518
5526
  ClinicGroupService,
5519
5527
  ClinicService,
5528
+ ClinicTag,
5520
5529
  Contraindication,
5521
5530
  CosmeticAllergySubtype,
5522
5531
  Currency,
@@ -5532,6 +5541,7 @@ export {
5532
5541
  FoodAllergySubtype,
5533
5542
  Gender,
5534
5543
  HeadingLevel,
5544
+ Language,
5535
5545
  ListType,
5536
5546
  MedicationAllergySubtype,
5537
5547
  NotificationService,
@@ -5545,9 +5555,11 @@ export {
5545
5555
  PATIENT_SENSITIVE_INFO_COLLECTION,
5546
5556
  PRACTITIONERS_COLLECTION,
5547
5557
  PatientService,
5558
+ PracticeType,
5548
5559
  PractitionerService,
5549
5560
  PricingMeasure,
5550
5561
  ProcedureFamily,
5562
+ SubscriptionModel,
5551
5563
  TreatmentBenefit,
5552
5564
  USER_ERRORS,
5553
5565
  UserService,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@blackcode_sa/metaestetics-api",
3
3
  "private": false,
4
- "version": "1.4.3",
4
+ "version": "1.4.5",
5
5
  "description": "Firebase authentication service with anonymous upgrade support",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
package/src/index.ts CHANGED
@@ -134,11 +134,28 @@ export type {
134
134
  WorkingHours,
135
135
  ClinicTags,
136
136
  ClinicReview,
137
+ ClinicAdminSignupData,
138
+ ContactPerson,
139
+ ClinicInfo,
140
+ AdminToken,
141
+ AdminInfo,
142
+ CreateAdminTokenData,
143
+ DoctorInfo,
144
+ ServiceInfo,
145
+ ReviewInfo,
146
+ CreateDefaultClinicGroupData,
147
+ ClinicGroupSetupData,
148
+ ClinicBranchSetupData,
137
149
  } from "./types/clinic";
138
150
  export {
139
151
  CLINICS_COLLECTION,
140
152
  CLINIC_GROUPS_COLLECTION,
141
153
  CLINIC_ADMINS_COLLECTION,
154
+ PracticeType,
155
+ Language,
156
+ ClinicTag,
157
+ AdminTokenStatus,
158
+ SubscriptionModel,
142
159
  } from "./types/clinic";
143
160
 
144
161
  // Certification types
@@ -119,9 +119,13 @@ export class AuthService extends BaseService {
119
119
  );
120
120
 
121
121
  // Create user with CLINIC_ADMIN role
122
- const user = await this.userService.createUser(firebaseUser, [
123
- UserRole.CLINIC_ADMIN,
124
- ]);
122
+ const user = await this.userService.createUser(
123
+ firebaseUser,
124
+ [UserRole.CLINIC_ADMIN],
125
+ {
126
+ skipProfileCreation: true,
127
+ }
128
+ );
125
129
 
126
130
  // Create contact person object
127
131
  const contactPerson: ContactPerson = {
@@ -86,6 +86,7 @@ export class UserService extends BaseService {
86
86
  groupToken?: string;
87
87
  groupId?: string;
88
88
  };
89
+ skipProfileCreation?: boolean;
89
90
  }
90
91
  ): Promise<User> {
91
92
  const userData: CreateUserData = {
@@ -142,6 +143,7 @@ export class UserService extends BaseService {
142
143
  groupToken?: string;
143
144
  groupId?: string;
144
145
  };
146
+ skipProfileCreation?: boolean;
145
147
  }
146
148
  ): Promise<{
147
149
  patientProfile?: string;
@@ -172,6 +174,12 @@ export class UserService extends BaseService {
172
174
  profiles.patientProfile = patientProfile.id;
173
175
  break;
174
176
  case UserRole.CLINIC_ADMIN:
177
+ // Skip profile creation if explicitly requested
178
+ // This is used when we know the profile will be created elsewhere (e.g. in signUpClinicAdmin)
179
+ if (options?.skipProfileCreation) {
180
+ break;
181
+ }
182
+
175
183
  // Ako imamo token, verifikujemo ga i dodajemo admina u postojeću grupu
176
184
  if (
177
185
  options?.clinicAdminData?.groupToken &&