@blackcode_sa/metaestetics-api 1.5.4 → 1.5.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.
- package/dist/backoffice/index.js +2 -6
- package/dist/backoffice/index.mjs +2 -6
- package/dist/index.d.mts +156 -8
- package/dist/index.d.ts +156 -8
- package/dist/index.js +651 -416
- package/dist/index.mjs +697 -453
- package/package.json +1 -1
- package/src/index.ts +59 -70
- package/src/services/clinic/clinic.service.ts +6 -0
- package/src/types/index.ts +0 -3
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { UserRole } from
|
|
1
|
+
import { UserRole } from './types';
|
|
2
|
+
import { Category } from './backoffice/types/category.types';
|
|
2
3
|
|
|
3
4
|
// Firebase
|
|
4
5
|
export {
|
|
@@ -7,42 +8,43 @@ export {
|
|
|
7
8
|
getFirebaseAuth,
|
|
8
9
|
getFirebaseDB,
|
|
9
10
|
getFirebaseApp,
|
|
10
|
-
} from
|
|
11
|
+
} from './config/firebase';
|
|
11
12
|
|
|
12
13
|
// Services
|
|
13
|
-
export { AuthService } from
|
|
14
|
-
export { UserService } from
|
|
15
|
-
export { NotificationService } from
|
|
16
|
-
export { PatientService } from
|
|
17
|
-
export { PractitionerService } from
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
14
|
+
export { AuthService } from './services/auth.service';
|
|
15
|
+
export { UserService } from './services/user.service';
|
|
16
|
+
export { NotificationService } from './services/notifications/notification.service';
|
|
17
|
+
export { PatientService } from './services/patient/patient.service';
|
|
18
|
+
export { PractitionerService } from './services/practitioner/practitioner.service';
|
|
19
|
+
export { ProcedureService } from './services/procedure/procedure.service';
|
|
20
|
+
export { ClinicService } from './services/clinic/clinic.service';
|
|
21
|
+
export { ClinicAdminService } from './services/clinic/clinic-admin.service';
|
|
22
|
+
export { ClinicGroupService } from './services/clinic/clinic-group.service';
|
|
21
23
|
export {
|
|
22
24
|
DocumentationTemplateService,
|
|
23
25
|
FilledDocumentService,
|
|
24
|
-
} from
|
|
25
|
-
export { CalendarServiceV2 } from
|
|
26
|
-
export { SyncedCalendarsService } from
|
|
26
|
+
} from './services/documentation-templates';
|
|
27
|
+
export { CalendarServiceV2 } from './services/calendar/calendar-refactored.service';
|
|
28
|
+
export { SyncedCalendarsService } from './services/calendar/synced-calendars.service';
|
|
27
29
|
|
|
28
30
|
// Types
|
|
29
|
-
export type { User, UserRole, CreateUserData, FirebaseUser } from
|
|
30
|
-
export { AUTH_ERRORS } from
|
|
31
|
-
export { USER_ERRORS } from
|
|
32
|
-
export type { AuthError } from
|
|
33
|
-
export * from
|
|
34
|
-
export * from
|
|
35
|
-
export * from
|
|
36
|
-
export * from
|
|
37
|
-
export * from
|
|
38
|
-
export * from
|
|
39
|
-
export * from
|
|
40
|
-
export * from
|
|
31
|
+
export type { User, UserRole, CreateUserData, FirebaseUser } from './types';
|
|
32
|
+
export { AUTH_ERRORS } from './errors/auth.errors';
|
|
33
|
+
export { USER_ERRORS } from './errors/user.errors';
|
|
34
|
+
export type { AuthError } from './errors/auth.errors';
|
|
35
|
+
export * from './validations/schemas';
|
|
36
|
+
export * from './validations/notification.schema';
|
|
37
|
+
export * from './validations/patient.schema';
|
|
38
|
+
export * from './validations/practitioner.schema';
|
|
39
|
+
export * from './validations/clinic.schema';
|
|
40
|
+
export * from './validations/patient/medical-info.schema';
|
|
41
|
+
export * from './validations/documentation-templates.schema';
|
|
42
|
+
export * from './validations/calendar.schema';
|
|
41
43
|
export {
|
|
42
44
|
practitionerProfileInfoSchema,
|
|
43
45
|
patientProfileInfoSchema,
|
|
44
|
-
} from
|
|
45
|
-
export { FirebaseErrorCode } from
|
|
46
|
+
} from './validations/profile-info.schema';
|
|
47
|
+
export { FirebaseErrorCode } from './errors/firebase.errors';
|
|
46
48
|
|
|
47
49
|
// Notification types
|
|
48
50
|
export type {
|
|
@@ -52,8 +54,8 @@ export type {
|
|
|
52
54
|
PostRequirementNotification,
|
|
53
55
|
AppointmentReminderNotification,
|
|
54
56
|
AppointmentNotification,
|
|
55
|
-
} from
|
|
56
|
-
export { NotificationType, NotificationStatus } from
|
|
57
|
+
} from './types/notifications';
|
|
58
|
+
export { NotificationType, NotificationStatus } from './types/notifications';
|
|
57
59
|
|
|
58
60
|
// Patient types
|
|
59
61
|
export type {
|
|
@@ -87,7 +89,7 @@ export type {
|
|
|
87
89
|
UpdateMedicationData,
|
|
88
90
|
Allergy,
|
|
89
91
|
PatientProfileComplete,
|
|
90
|
-
} from
|
|
92
|
+
} from './types/patient';
|
|
91
93
|
export {
|
|
92
94
|
Gender,
|
|
93
95
|
PATIENTS_COLLECTION,
|
|
@@ -96,13 +98,10 @@ export {
|
|
|
96
98
|
PATIENT_LOCATION_INFO_COLLECTION,
|
|
97
99
|
PATIENT_MEDICAL_HISTORY_COLLECTION,
|
|
98
100
|
PATIENT_APPOINTMENTS_COLLECTION,
|
|
99
|
-
} from
|
|
101
|
+
} from './types/patient';
|
|
100
102
|
|
|
101
103
|
// Allergy tipovi
|
|
102
|
-
export type {
|
|
103
|
-
AllergyTypeWithSubtype,
|
|
104
|
-
AllergySubtype,
|
|
105
|
-
} from "./types/patient/allergies";
|
|
104
|
+
export type { AllergyTypeWithSubtype, AllergySubtype } from './types/patient/allergies';
|
|
106
105
|
|
|
107
106
|
export {
|
|
108
107
|
AllergyType,
|
|
@@ -110,7 +109,7 @@ export {
|
|
|
110
109
|
FoodAllergySubtype,
|
|
111
110
|
EnvironmentalAllergySubtype,
|
|
112
111
|
CosmeticAllergySubtype,
|
|
113
|
-
} from
|
|
112
|
+
} from './types/patient/allergies';
|
|
114
113
|
|
|
115
114
|
// Practitioner types
|
|
116
115
|
export type {
|
|
@@ -126,13 +125,13 @@ export type {
|
|
|
126
125
|
CreateDraftPractitionerData,
|
|
127
126
|
PractitionerToken,
|
|
128
127
|
CreatePractitionerTokenData,
|
|
129
|
-
} from
|
|
128
|
+
} from './types/practitioner';
|
|
130
129
|
export {
|
|
131
130
|
PRACTITIONERS_COLLECTION,
|
|
132
131
|
REGISTER_TOKENS_COLLECTION,
|
|
133
132
|
PractitionerStatus,
|
|
134
133
|
PractitionerTokenStatus,
|
|
135
|
-
} from
|
|
134
|
+
} from './types/practitioner';
|
|
136
135
|
|
|
137
136
|
// Clinic types
|
|
138
137
|
export type {
|
|
@@ -161,7 +160,7 @@ export type {
|
|
|
161
160
|
CreateDefaultClinicGroupData,
|
|
162
161
|
ClinicGroupSetupData,
|
|
163
162
|
ClinicBranchSetupData,
|
|
164
|
-
} from
|
|
163
|
+
} from './types/clinic';
|
|
165
164
|
export {
|
|
166
165
|
CLINICS_COLLECTION,
|
|
167
166
|
CLINIC_GROUPS_COLLECTION,
|
|
@@ -172,14 +171,10 @@ export {
|
|
|
172
171
|
ClinicPhotoTag,
|
|
173
172
|
AdminTokenStatus,
|
|
174
173
|
SubscriptionModel,
|
|
175
|
-
} from
|
|
174
|
+
} from './types/clinic';
|
|
176
175
|
|
|
177
176
|
// Profile info types
|
|
178
|
-
export type {
|
|
179
|
-
ClinicInfo,
|
|
180
|
-
PractitionerProfileInfo,
|
|
181
|
-
PatientProfileInfo,
|
|
182
|
-
} from "./types/profile";
|
|
177
|
+
export type { ClinicInfo, PractitionerProfileInfo, PatientProfileInfo } from './types/profile';
|
|
183
178
|
|
|
184
179
|
// Calendar types
|
|
185
180
|
export type {
|
|
@@ -193,62 +188,59 @@ export type {
|
|
|
193
188
|
SyncedCalendarEvent,
|
|
194
189
|
CreateAppointmentParams,
|
|
195
190
|
UpdateAppointmentParams,
|
|
196
|
-
} from
|
|
191
|
+
} from './types/calendar';
|
|
197
192
|
|
|
198
193
|
export {
|
|
199
194
|
CalendarEventStatus,
|
|
200
195
|
CalendarEventType,
|
|
201
196
|
CalendarSyncStatus,
|
|
202
197
|
CALENDAR_COLLECTION,
|
|
203
|
-
} from
|
|
198
|
+
} from './types/calendar';
|
|
204
199
|
|
|
205
200
|
// Synced calendar types
|
|
206
201
|
export type {
|
|
207
202
|
SyncedCalendar,
|
|
208
203
|
CreateSyncedCalendarData,
|
|
209
204
|
UpdateSyncedCalendarData,
|
|
210
|
-
} from
|
|
205
|
+
} from './types/calendar/synced-calendar.types';
|
|
211
206
|
|
|
212
207
|
export {
|
|
213
208
|
SyncedCalendarProvider,
|
|
214
209
|
SYNCED_CALENDARS_COLLECTION,
|
|
215
|
-
} from
|
|
210
|
+
} from './types/calendar/synced-calendar.types';
|
|
216
211
|
|
|
217
212
|
// Certification types
|
|
218
213
|
|
|
219
214
|
// Brand types
|
|
220
|
-
export type { Brand } from
|
|
215
|
+
export type { Brand } from './backoffice/types/brand.types';
|
|
221
216
|
|
|
222
217
|
// Category types
|
|
223
|
-
export type { Category } from
|
|
218
|
+
export type { Category } from './backoffice/types/category.types';
|
|
224
219
|
|
|
225
220
|
// Product types
|
|
226
|
-
export type { Product } from
|
|
221
|
+
export type { Product } from './backoffice/types/product.types';
|
|
227
222
|
|
|
228
223
|
// Requirement types
|
|
229
|
-
export type { Requirement } from
|
|
224
|
+
export type { Requirement } from './backoffice/types/requirement.types';
|
|
230
225
|
|
|
231
226
|
// Subcategory types
|
|
232
|
-
export type { Subcategory } from
|
|
227
|
+
export type { Subcategory } from './backoffice/types/subcategory.types';
|
|
233
228
|
|
|
234
229
|
// Technology types
|
|
235
|
-
export type { Technology } from
|
|
230
|
+
export type { Technology } from './backoffice/types/technology.types';
|
|
236
231
|
|
|
237
232
|
// Pricing enums
|
|
238
|
-
export {
|
|
239
|
-
PricingMeasure,
|
|
240
|
-
Currency,
|
|
241
|
-
} from "./backoffice/types/static/pricing.types";
|
|
233
|
+
export { PricingMeasure, Currency } from './backoffice/types/static/pricing.types';
|
|
242
234
|
|
|
243
235
|
// Static types
|
|
244
|
-
export { BlockingCondition } from
|
|
236
|
+
export { BlockingCondition } from './backoffice/types/static/blocking-condition.types';
|
|
245
237
|
export {
|
|
246
238
|
CertificationSpecialty,
|
|
247
239
|
CertificationLevel,
|
|
248
|
-
} from
|
|
249
|
-
export { Contraindication } from
|
|
250
|
-
export { ProcedureFamily } from
|
|
251
|
-
export { TreatmentBenefit } from
|
|
240
|
+
} from './backoffice/types/static/certification.types';
|
|
241
|
+
export { Contraindication } from './backoffice/types/static/contraindication.types';
|
|
242
|
+
export { ProcedureFamily } from './backoffice/types/static/procedure-family.types';
|
|
243
|
+
export { TreatmentBenefit } from './backoffice/types/static/treatment-benefit.types';
|
|
252
244
|
|
|
253
245
|
// Documentation Templates types
|
|
254
246
|
export type {
|
|
@@ -257,15 +249,12 @@ export type {
|
|
|
257
249
|
UpdateDocumentTemplateData,
|
|
258
250
|
DocumentElement,
|
|
259
251
|
FilledDocument,
|
|
260
|
-
} from
|
|
252
|
+
} from './types/documentation-templates';
|
|
261
253
|
export {
|
|
262
254
|
DocumentElementType,
|
|
263
255
|
HeadingLevel,
|
|
264
256
|
ListType,
|
|
265
257
|
DynamicVariable,
|
|
266
258
|
FilledDocumentStatus,
|
|
267
|
-
} from
|
|
268
|
-
export {
|
|
269
|
-
DOCUMENTATION_TEMPLATES_COLLECTION,
|
|
270
|
-
FILLED_DOCUMENTS_COLLECTION,
|
|
271
|
-
} from "./types";
|
|
259
|
+
} from './types/documentation-templates';
|
|
260
|
+
export { DOCUMENTATION_TEMPLATES_COLLECTION, FILLED_DOCUMENTS_COLLECTION } from './types';
|
|
@@ -258,6 +258,12 @@ export class ClinicService extends BaseService {
|
|
|
258
258
|
}
|
|
259
259
|
console.log("[CLINIC_SERVICE] Clinic group verified");
|
|
260
260
|
|
|
261
|
+
// TODO: Handle logo, coverPhoto, featuredPhotos, photosWithTags and upload them to storage
|
|
262
|
+
// Use storage service to upload files, and get the download URL
|
|
263
|
+
// Use path 'clinics/{clinicId}/{photoType}/{filename}' for storing the files
|
|
264
|
+
// Photo types: logo, coverPhoto, featuredPhotos, photosWithTags
|
|
265
|
+
// Storage can be accessed by using the storage service like app.getStorage()
|
|
266
|
+
|
|
261
267
|
// Create the clinic data
|
|
262
268
|
const createClinicData: CreateClinicData = {
|
|
263
269
|
clinicGroupId,
|
package/src/types/index.ts
CHANGED
|
@@ -39,9 +39,6 @@ export type FirebaseUser = FirebaseAuthUser;
|
|
|
39
39
|
|
|
40
40
|
// Documentation Templates
|
|
41
41
|
export * from "./documentation-templates";
|
|
42
|
-
export const DOCUMENTATION_TEMPLATES_COLLECTION = "documentation-templates";
|
|
43
|
-
export const FILLED_DOCUMENTS_COLLECTION = "filled-documents";
|
|
44
42
|
|
|
45
43
|
// Calendar
|
|
46
44
|
export * from "./calendar";
|
|
47
|
-
export const CALENDAR_COLLECTION = "calendar";
|