@blackcode_sa/metaestetics-api 1.4.2 → 1.4.4

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.
@@ -10,8 +10,12 @@ export const CLINIC_GROUPS_COLLECTION = "clinic_groups";
10
10
  export const CLINIC_ADMINS_COLLECTION = "clinic_admins";
11
11
  export const CLINICS_COLLECTION = "clinics";
12
12
 
13
+ import { PracticeType, Language, ClinicTag } from "./preferences.types";
14
+
15
+ export * from "./preferences.types";
16
+
13
17
  /**
14
- * Interfejs za kontakt informacije
18
+ * Interface for clinic contact information
15
19
  */
16
20
  export interface ClinicContactInfo {
17
21
  email: string;
@@ -21,7 +25,7 @@ export interface ClinicContactInfo {
21
25
  }
22
26
 
23
27
  /**
24
- * Interfejs za fizičku lokaciju
28
+ * Interface for clinic location
25
29
  */
26
30
  export interface ClinicLocation {
27
31
  address: string;
@@ -34,20 +38,48 @@ export interface ClinicLocation {
34
38
  }
35
39
 
36
40
  /**
37
- * Interfejs za radno vreme
41
+ * Interface for working hours
38
42
  */
39
43
  export interface WorkingHours {
40
- monday: { open: string; close: string } | null;
41
- tuesday: { open: string; close: string } | null;
42
- wednesday: { open: string; close: string } | null;
43
- thursday: { open: string; close: string } | null;
44
- friday: { open: string; close: string } | null;
45
- saturday: { open: string; close: string } | null;
46
- sunday: { open: string; close: string } | null;
44
+ monday: {
45
+ open: string;
46
+ close: string;
47
+ breaks?: { start: string; end: string }[];
48
+ } | null;
49
+ tuesday: {
50
+ open: string;
51
+ close: string;
52
+ breaks?: { start: string; end: string }[];
53
+ } | null;
54
+ wednesday: {
55
+ open: string;
56
+ close: string;
57
+ breaks?: { start: string; end: string }[];
58
+ } | null;
59
+ thursday: {
60
+ open: string;
61
+ close: string;
62
+ breaks?: { start: string; end: string }[];
63
+ } | null;
64
+ friday: {
65
+ open: string;
66
+ close: string;
67
+ breaks?: { start: string; end: string }[];
68
+ } | null;
69
+ saturday: {
70
+ open: string;
71
+ close: string;
72
+ breaks?: { start: string; end: string }[];
73
+ } | null;
74
+ sunday: {
75
+ open: string;
76
+ close: string;
77
+ breaks?: { start: string; end: string }[];
78
+ } | null;
47
79
  }
48
80
 
49
81
  /**
50
- * Interfejs za kontakt osobu
82
+ * Interface for contact person
51
83
  */
52
84
  export interface ContactPerson {
53
85
  firstName: string;
@@ -57,6 +89,9 @@ export interface ContactPerson {
57
89
  phoneNumber: string;
58
90
  }
59
91
 
92
+ /**
93
+ * Interface for clinic information
94
+ */
60
95
  export interface ClinicInfo {
61
96
  id: string;
62
97
  featuredPhoto: string;
@@ -67,7 +102,7 @@ export interface ClinicInfo {
67
102
  }
68
103
 
69
104
  /**
70
- * Interfejs za administratora klinike
105
+ * Interface for clinic admin
71
106
  */
72
107
  export interface ClinicAdmin {
73
108
  id: string;
@@ -84,7 +119,7 @@ export interface ClinicAdmin {
84
119
  }
85
120
 
86
121
  /**
87
- * Tip za kreiranje novog Clinic Admin profila
122
+ * Interface for creating a clinic admin
88
123
  */
89
124
  export interface CreateClinicAdminData {
90
125
  userRef: string;
@@ -98,19 +133,25 @@ export interface CreateClinicAdminData {
98
133
  }
99
134
 
100
135
  /**
101
- * Tip za ažuriranje Clinic Admin profila
136
+ * Interface for updating a clinic admin
102
137
  */
103
138
  export interface UpdateClinicAdminData extends Partial<CreateClinicAdminData> {
104
139
  updatedAt?: FieldValue;
105
140
  clinicsManagedInfo?: ClinicInfo[];
106
141
  }
107
142
 
143
+ /**
144
+ * Enum for admin token status
145
+ */
108
146
  export enum AdminTokenStatus {
109
147
  ACTIVE = "active",
110
148
  USED = "used",
111
149
  EXPIRED = "expired",
112
150
  }
113
151
 
152
+ /**
153
+ * Interface for admin token
154
+ */
114
155
  export interface AdminToken {
115
156
  id: string;
116
157
  token: string;
@@ -120,6 +161,9 @@ export interface AdminToken {
120
161
  expiresAt: Timestamp;
121
162
  }
122
163
 
164
+ /**
165
+ * Interface for admin information
166
+ */
123
167
  export interface AdminInfo {
124
168
  id: string;
125
169
  name: string;
@@ -127,7 +171,17 @@ export interface AdminInfo {
127
171
  }
128
172
 
129
173
  /**
130
- * Interfejs za grupaciju klinika
174
+ * Enum for subscription models
175
+ */
176
+ export enum SubscriptionModel {
177
+ NO_SUBSCRIPTION = "no_subscription",
178
+ BASIC = "basic",
179
+ PREMIUM = "premium",
180
+ ENTERPRISE = "enterprise",
181
+ }
182
+
183
+ /**
184
+ * Interface for clinic group
131
185
  */
132
186
  export interface ClinicGroup {
133
187
  id: string;
@@ -145,10 +199,16 @@ export interface ClinicGroup {
145
199
  createdAt: Timestamp;
146
200
  updatedAt: Timestamp;
147
201
  isActive: boolean;
202
+ logo?: string;
203
+ practiceType?: PracticeType;
204
+ languages?: Language[];
205
+ subscriptionModel: SubscriptionModel;
206
+ calendarSyncEnabled?: boolean;
207
+ autoConfirmAppointments?: boolean;
148
208
  }
149
209
 
150
210
  /**
151
- * Tip za kreiranje nove Clinic Group
211
+ * Interface for creating a clinic group
152
212
  */
153
213
  export interface CreateClinicGroupData {
154
214
  name: string;
@@ -158,23 +218,31 @@ export interface CreateClinicGroupData {
158
218
  contactPerson: ContactPerson;
159
219
  ownerId: string;
160
220
  isActive: boolean;
221
+ logo?: string;
222
+ practiceType?: PracticeType;
223
+ languages?: Language[];
224
+ subscriptionModel?: SubscriptionModel;
225
+ calendarSyncEnabled?: boolean;
226
+ autoConfirmAppointments?: boolean;
161
227
  }
162
228
 
163
229
  /**
164
- * Tip za ažuriranje Clinic Group
230
+ * Interface for updating a clinic group
165
231
  */
166
232
  export interface UpdateClinicGroupData extends Partial<CreateClinicGroupData> {
167
233
  updatedAt?: FieldValue;
168
234
  }
169
235
 
170
236
  /**
171
- * Tip za kreiranje admin tokena
237
+ * Interface for creating an admin token
172
238
  */
173
239
  export interface CreateAdminTokenData {
174
- expiresInDays?: number; // Koliko dana token važi, default 7
240
+ expiresInDays?: number; // How many days the token is valid, default 7
175
241
  }
176
242
 
177
- // Interfejs za informacije o doktorima
243
+ /**
244
+ * Interface for doctor information
245
+ */
178
246
  export interface DoctorInfo {
179
247
  id: string;
180
248
  name: string;
@@ -185,7 +253,9 @@ export interface DoctorInfo {
185
253
  // TODO: Add aggregated fields, like rating, reviews, services this doctor provides in this clinic and similar
186
254
  }
187
255
 
188
- // Interfejs za informacije o uslugama
256
+ /**
257
+ * Interface for service information
258
+ */
189
259
  export interface ServiceInfo {
190
260
  id: string;
191
261
  name: string;
@@ -204,7 +274,9 @@ export interface ServiceInfo {
204
274
  treatmentBenefits: TreatmentBenefit[];
205
275
  }
206
276
 
207
- // Interfejs za informacije o recenzijama
277
+ /**
278
+ * Interface for review information
279
+ */
208
280
  export interface ReviewInfo {
209
281
  id: string;
210
282
  rating: number;
@@ -217,7 +289,7 @@ export interface ReviewInfo {
217
289
  }
218
290
 
219
291
  /**
220
- * Interfejs za kliniku
292
+ * Interface for clinic
221
293
  */
222
294
  export interface Clinic {
223
295
  id: string;
@@ -230,6 +302,7 @@ export interface Clinic {
230
302
  tags: ClinicTag[];
231
303
  featuredPhotos: string[];
232
304
  photos: string[];
305
+ photosWithTags?: { url: string; tag: string }[];
233
306
  doctors: string[];
234
307
  doctorsInfo: DoctorInfo[];
235
308
  services: string[];
@@ -245,10 +318,11 @@ export interface Clinic {
245
318
  updatedAt: Timestamp;
246
319
  isActive: boolean;
247
320
  isVerified: boolean;
321
+ logo?: string;
248
322
  }
249
323
 
250
324
  /**
251
- * Tip za kreiranje nove klinike
325
+ * Interface for creating a clinic
252
326
  */
253
327
  export interface CreateClinicData {
254
328
  clinicGroupId: string;
@@ -259,94 +333,97 @@ export interface CreateClinicData {
259
333
  workingHours: WorkingHours;
260
334
  tags: ClinicTag[];
261
335
  photos: string[];
336
+ photosWithTags?: { url: string; tag: string }[];
262
337
  doctors: string[];
263
338
  services: string[];
264
339
  admins: string[];
265
340
  isActive: boolean;
266
341
  isVerified: boolean;
342
+ logo?: string;
343
+ featuredPhotos?: string[];
267
344
  }
268
345
 
269
346
  /**
270
- * Tip za ažuriranje klinike
347
+ * Interface for updating a clinic
271
348
  */
272
349
  export interface UpdateClinicData extends Partial<CreateClinicData> {
273
350
  updatedAt?: FieldValue;
274
351
  }
275
352
 
276
353
  /**
277
- * Enum za sve moguće tagove klinike
354
+ * Interface for creating a default clinic group
278
355
  */
279
- export enum ClinicTag {
280
- // Amenities - Osnovne pogodnosti
281
- PARKING = "parking",
282
- WIFI = "wifi",
283
- WHEELCHAIR_ACCESS = "wheelchair_access",
284
- CAFE = "cafe",
285
- PHARMACY = "pharmacy",
286
- WAITING_ROOM = "waiting_room",
287
- CARD_PAYMENT = "card_payment",
288
- INSURANCE = "insurance",
289
-
290
- // Dodatne pogodnosti
291
- CHILDREN_AREA = "children_area",
292
- TV = "tv",
293
- AIR_CONDITIONING = "air_conditioning",
294
- WATER_DISPENSER = "water_dispenser",
295
- VENDING_MACHINE = "vending_machine",
296
-
297
- // Pristupačnost
298
- ELEVATOR = "elevator",
299
- RAMP = "ramp",
300
- HANDICAP_PARKING = "handicap_parking",
301
- BRAILLE = "braille",
302
- SIGN_LANGUAGE = "sign_language",
303
-
304
- // Specijalizovane usluge
305
- EMERGENCY_SERVICE = "emergency_service",
306
- LAB = "lab",
307
- XRAY = "xray",
308
- ULTRASOUND = "ultrasound",
309
- DENTAL = "dental",
310
- PEDIATRIC = "pediatric",
311
- GYNECOLOGY = "gynecology",
312
- CARDIOLOGY = "cardiology",
313
- DERMATOLOGY = "dermatology",
314
- ORTHOPEDIC = "orthopedic",
315
- OPHTHALMOLOGY = "ophthalmology",
316
-
317
- // Dodatne usluge
318
- TELEMEDICINE = "telemedicine",
319
- HOME_VISITS = "home_visits",
320
- ONLINE_BOOKING = "online_booking",
321
- MOBILE_APP = "mobile_app",
322
- SMS_NOTIFICATIONS = "sms_notifications",
323
- EMAIL_NOTIFICATIONS = "email_notifications",
324
-
325
- // Jezici
326
- ENGLISH = "english",
327
- SERBIAN = "serbian",
328
- GERMAN = "german",
329
- RUSSIAN = "russian",
330
- CHINESE = "chinese",
331
- SPANISH = "spanish",
332
- FRENCH = "french",
333
-
334
- // Radno vreme
335
- OPEN_24_7 = "open_24_7",
336
- WEEKEND_HOURS = "weekend_hours",
337
- NIGHT_SHIFT = "night_shift",
338
- HOLIDAY_HOURS = "holiday_hours",
356
+ export interface CreateDefaultClinicGroupData {
357
+ name: string;
358
+ ownerId: string;
359
+ contactPerson: ContactPerson;
360
+ contactInfo: ClinicContactInfo;
361
+ hqLocation: ClinicLocation;
362
+ isActive: boolean;
363
+ logo?: string;
364
+ practiceType?: PracticeType;
365
+ languages?: Language[];
366
+ subscriptionModel?: SubscriptionModel;
339
367
  }
340
368
 
341
369
  /**
342
- * Interfejs za tagove klinike
370
+ * Interface for clinic admin signup data
371
+ */
372
+ export interface ClinicAdminSignupData {
373
+ email: string;
374
+ password: string;
375
+ firstName: string;
376
+ lastName: string;
377
+ title: string;
378
+ phoneNumber: string;
379
+ isCreatingNewGroup: boolean;
380
+ inviteToken?: string;
381
+ clinicGroupData?: {
382
+ name: string;
383
+ hqLocation: ClinicLocation;
384
+ logo?: string;
385
+ contactInfo: ClinicContactInfo;
386
+ subscriptionModel?: SubscriptionModel;
387
+ };
388
+ }
389
+
390
+ /**
391
+ * Interface for clinic group setup data
392
+ */
393
+ export interface ClinicGroupSetupData {
394
+ languages: Language[];
395
+ practiceType: PracticeType;
396
+ description: string;
397
+ logo: string;
398
+ calendarSyncEnabled: boolean;
399
+ autoConfirmAppointments: boolean;
400
+ }
401
+
402
+ /**
403
+ * Interface for clinic branch setup data
404
+ */
405
+ export interface ClinicBranchSetupData {
406
+ name: string;
407
+ location: ClinicLocation;
408
+ description?: string;
409
+ contactInfo: ClinicContactInfo;
410
+ workingHours: WorkingHours;
411
+ tags: ClinicTag[];
412
+ logo?: string;
413
+ photos: string[];
414
+ photosWithTags?: { url: string; tag: string }[];
415
+ featuredPhotos?: string[];
416
+ }
417
+
418
+ /**
419
+ * Interface for clinic tags
343
420
  */
344
421
  export interface ClinicTags {
345
422
  tags: ClinicTag[];
346
423
  }
347
424
 
348
425
  /**
349
- * Interfejs za recenziju klinike
426
+ * Interface for clinic review
350
427
  */
351
428
 
352
429
  // TODO: Add more fields and information about the review (when you start working with review system)
@@ -360,15 +437,3 @@ export interface ClinicReview {
360
437
  updatedAt: Timestamp;
361
438
  isVerified: boolean;
362
439
  }
363
-
364
- /**
365
- * Tip za kreiranje default grupe
366
- */
367
- export interface CreateDefaultClinicGroupData {
368
- name: string;
369
- ownerId: string;
370
- contactPerson: ContactPerson;
371
- contactInfo: ClinicContactInfo;
372
- hqLocation: ClinicLocation;
373
- isActive: boolean;
374
- }
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Enum for practice types
3
+ */
4
+ export enum PracticeType {
5
+ GENERAL_PRACTICE = "general_practice",
6
+ DENTAL = "dental",
7
+ DERMATOLOGY = "dermatology",
8
+ CARDIOLOGY = "cardiology",
9
+ ORTHOPEDICS = "orthopedics",
10
+ GYNECOLOGY = "gynecology",
11
+ PEDIATRICS = "pediatrics",
12
+ OPHTHALMOLOGY = "ophthalmology",
13
+ NEUROLOGY = "neurology",
14
+ PSYCHIATRY = "psychiatry",
15
+ UROLOGY = "urology",
16
+ ONCOLOGY = "oncology",
17
+ ENDOCRINOLOGY = "endocrinology",
18
+ GASTROENTEROLOGY = "gastroenterology",
19
+ PULMONOLOGY = "pulmonology",
20
+ RHEUMATOLOGY = "rheumatology",
21
+ PHYSICAL_THERAPY = "physical_therapy",
22
+ NUTRITION = "nutrition",
23
+ ALTERNATIVE_MEDICINE = "alternative_medicine",
24
+ OTHER = "other",
25
+ }
26
+
27
+ /**
28
+ * Enum for languages
29
+ */
30
+ export enum Language {
31
+ ENGLISH = "english",
32
+ GERMAN = "german",
33
+ ITALIAN = "italian",
34
+ FRENCH = "french",
35
+ SPANISH = "spanish",
36
+ }
37
+
38
+ /**
39
+ * Enum for all possible clinic tags
40
+ */
41
+ export enum ClinicTag {
42
+ // Amenities - Basic facilities
43
+ PARKING = "parking",
44
+ WIFI = "wifi",
45
+ WHEELCHAIR_ACCESS = "wheelchair_access",
46
+ CAFE = "cafe",
47
+ PHARMACY = "pharmacy",
48
+ WAITING_ROOM = "waiting_room",
49
+ CARD_PAYMENT = "card_payment",
50
+ INSURANCE = "insurance",
51
+
52
+ // Additional facilities
53
+ CHILDREN_AREA = "children_area",
54
+ TV = "tv",
55
+ AIR_CONDITIONING = "air_conditioning",
56
+ WATER_DISPENSER = "water_dispenser",
57
+ VENDING_MACHINE = "vending_machine",
58
+
59
+ // Accessibility
60
+ ELEVATOR = "elevator",
61
+ RAMP = "ramp",
62
+ HANDICAP_PARKING = "handicap_parking",
63
+ BRAILLE = "braille",
64
+ SIGN_LANGUAGE = "sign_language",
65
+
66
+ // Specialized services
67
+ EMERGENCY_SERVICE = "emergency_service",
68
+ LAB = "lab",
69
+ XRAY = "xray",
70
+ ULTRASOUND = "ultrasound",
71
+ DENTAL = "dental",
72
+ PEDIATRIC = "pediatric",
73
+ GYNECOLOGY = "gynecology",
74
+ CARDIOLOGY = "cardiology",
75
+ DERMATOLOGY = "dermatology",
76
+ ORTHOPEDIC = "orthopedic",
77
+ OPHTHALMOLOGY = "ophthalmology",
78
+
79
+ // Additional services
80
+ TELEMEDICINE = "telemedicine",
81
+ HOME_VISITS = "home_visits",
82
+ ONLINE_BOOKING = "online_booking",
83
+ MOBILE_APP = "mobile_app",
84
+ SMS_NOTIFICATIONS = "sms_notifications",
85
+ EMAIL_NOTIFICATIONS = "email_notifications",
86
+
87
+ // Languages
88
+ ENGLISH = "english",
89
+ SERBIAN = "serbian",
90
+ GERMAN = "german",
91
+ RUSSIAN = "russian",
92
+ CHINESE = "chinese",
93
+ SPANISH = "spanish",
94
+ FRENCH = "french",
95
+
96
+ // Working hours
97
+ OPEN_24_7 = "open_24_7",
98
+ WEEKEND_HOURS = "weekend_hours",
99
+ NIGHT_SHIFT = "night_shift",
100
+ HOLIDAY_HOURS = "holiday_hours",
101
+ }