@blackcode_sa/metaestetics-api 1.4.17 → 1.5.0
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 +9633 -7023
- package/dist/index.d.ts +9633 -7023
- package/dist/index.js +2773 -150
- package/dist/index.mjs +2809 -150
- package/package.json +4 -3
- package/src/index.ts +48 -1
- package/src/services/calendar/calendar-refactored.service.ts +1531 -0
- package/src/services/calendar/calendar.service.ts +1077 -0
- package/src/services/calendar/synced-calendars.service.ts +743 -0
- package/src/services/calendar/utils/appointment.utils.ts +314 -0
- package/src/services/calendar/utils/calendar-event.utils.ts +510 -0
- package/src/services/calendar/utils/clinic.utils.ts +237 -0
- package/src/services/calendar/utils/docs.utils.ts +157 -0
- package/src/services/calendar/utils/google-calendar.utils.ts +697 -0
- package/src/services/calendar/utils/index.ts +8 -0
- package/src/services/calendar/utils/patient.utils.ts +198 -0
- package/src/services/calendar/utils/practitioner.utils.ts +221 -0
- package/src/services/calendar/utils/synced-calendar.utils.ts +472 -0
- package/src/services/clinic/clinic.service.ts +2 -2
- package/src/services/clinic/utils/clinic.utils.ts +49 -47
- package/src/services/practitioner/practitioner.service.ts +1 -0
- package/src/types/calendar/index.ts +187 -0
- package/src/types/calendar/synced-calendar.types.ts +66 -0
- package/src/types/clinic/index.ts +4 -15
- package/src/types/index.ts +4 -0
- package/src/types/practitioner/index.ts +21 -0
- package/src/types/profile/index.ts +39 -0
- package/src/validations/calendar.schema.ts +223 -0
- package/src/validations/clinic.schema.ts +3 -3
- package/src/validations/practitioner.schema.ts +21 -0
- package/src/validations/profile-info.schema.ts +41 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { Timestamp } from "firebase/firestore";
|
|
3
|
+
import { clinicLocationSchema, clinicContactInfoSchema } from "./clinic.schema";
|
|
4
|
+
import { practitionerCertificationSchema } from "./practitioner.schema";
|
|
5
|
+
import { Gender } from "../types/patient";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Validation schema for clinic info
|
|
9
|
+
*/
|
|
10
|
+
export const clinicInfoSchema = z.object({
|
|
11
|
+
id: z.string(),
|
|
12
|
+
featuredPhoto: z.string(),
|
|
13
|
+
name: z.string(),
|
|
14
|
+
description: z.string(),
|
|
15
|
+
location: clinicLocationSchema,
|
|
16
|
+
contactInfo: clinicContactInfoSchema,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Validation schema for practitioner profile info
|
|
21
|
+
*/
|
|
22
|
+
export const practitionerProfileInfoSchema = z.object({
|
|
23
|
+
id: z.string(),
|
|
24
|
+
practitionerPhoto: z.string().nullable(),
|
|
25
|
+
name: z.string(),
|
|
26
|
+
email: z.string().email(),
|
|
27
|
+
phone: z.string().nullable(),
|
|
28
|
+
certification: practitionerCertificationSchema,
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Validation schema for patient profile info
|
|
33
|
+
*/
|
|
34
|
+
export const patientProfileInfoSchema = z.object({
|
|
35
|
+
id: z.string(),
|
|
36
|
+
fullName: z.string(),
|
|
37
|
+
email: z.string().email(),
|
|
38
|
+
phone: z.string().nullable(),
|
|
39
|
+
dateOfBirth: z.instanceof(Timestamp),
|
|
40
|
+
gender: z.nativeEnum(Gender),
|
|
41
|
+
});
|