@blackcode_sa/metaestetics-api 1.7.47 → 1.8.1
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/admin/index.d.mts +1815 -1667
- package/dist/admin/index.d.ts +1815 -1667
- package/dist/admin/index.js +6993 -6535
- package/dist/admin/index.mjs +6991 -6532
- package/dist/backoffice/index.d.mts +1418 -1418
- package/dist/backoffice/index.d.ts +1418 -1418
- package/dist/backoffice/index.js +1464 -1454
- package/dist/backoffice/index.mjs +1509 -1499
- package/dist/index.d.mts +16217 -14582
- package/dist/index.d.ts +16217 -14582
- package/dist/index.js +11419 -13806
- package/dist/index.mjs +12081 -14593
- package/package.json +5 -5
- package/src/admin/aggregation/appointment/index.ts +1 -0
- package/src/admin/aggregation/clinic/index.ts +1 -0
- package/src/admin/aggregation/forms/index.ts +1 -0
- package/src/admin/aggregation/index.ts +8 -0
- package/src/admin/aggregation/patient/index.ts +1 -0
- package/src/admin/aggregation/practitioner/index.ts +1 -0
- package/src/admin/aggregation/practitioner-invite/index.ts +1 -0
- package/src/admin/aggregation/procedure/index.ts +1 -0
- package/src/admin/aggregation/reviews/index.ts +1 -0
- package/src/admin/booking/index.ts +1 -1
- package/src/admin/calendar/index.ts +1 -0
- package/src/admin/documentation-templates/index.ts +1 -0
- package/src/admin/free-consultation/index.ts +1 -0
- package/src/admin/index.ts +23 -118
- package/src/admin/mailing/appointment/index.ts +1 -0
- package/src/admin/mailing/index.ts +1 -2
- package/src/admin/mailing/practitionerInvite/index.ts +1 -0
- package/src/admin/notifications/index.ts +1 -0
- package/src/admin/requirements/index.ts +1 -0
- package/src/admin/users/index.ts +1 -0
- package/src/admin/users/user-profile.admin.ts +1 -0
- package/src/backoffice/constants/index.ts +1 -0
- package/src/backoffice/errors/index.ts +1 -0
- package/src/backoffice/index.ts +5 -14
- package/src/backoffice/services/index.ts +7 -0
- package/src/backoffice/validations/index.ts +1 -0
- package/src/index.backup.ts +407 -0
- package/src/index.ts +5 -406
- package/src/services/PATIENTAUTH.MD +197 -0
- package/src/services/__tests__/auth/auth.setup.ts +2 -2
- package/src/services/__tests__/auth.service.test.ts +1 -1
- package/src/services/__tests__/user.service.test.ts +1 -1
- package/src/services/appointment/index.ts +1 -2
- package/src/services/{auth.service.ts → auth/auth.service.ts} +36 -22
- package/src/services/{auth.v2.service.ts → auth/auth.v2.service.ts} +17 -17
- package/src/services/auth/index.ts +2 -16
- package/src/services/calendar/calendar-refactored.service.ts +1 -1
- package/src/services/calendar/index.ts +5 -0
- package/src/services/clinic/index.ts +4 -0
- package/src/services/index.ts +12 -0
- package/src/services/media/index.ts +1 -0
- package/src/services/notifications/index.ts +1 -0
- package/src/services/patient/README.md +48 -0
- package/src/services/patient/To-Do.md +43 -0
- package/src/services/patient/index.ts +2 -0
- package/src/services/patient/patient.service.ts +289 -34
- package/src/services/patient/utils/index.ts +9 -0
- package/src/services/patient/utils/medical.utils.ts +114 -157
- package/src/services/patient/utils/profile.utils.ts +9 -0
- package/src/services/patient/utils/sensitive.utils.ts +79 -14
- package/src/services/patient/utils/token.utils.ts +211 -0
- package/src/services/practitioner/index.ts +1 -0
- package/src/services/procedure/index.ts +1 -0
- package/src/services/reviews/index.ts +1 -0
- package/src/services/user/index.ts +1 -0
- package/src/services/{user.service.ts → user/user.service.ts} +61 -12
- package/src/services/{user.v2.service.ts → user/user.v2.service.ts} +12 -12
- package/src/types/index.ts +42 -42
- package/src/types/patient/index.ts +33 -6
- package/src/types/patient/token.types.ts +61 -0
- package/src/types/user/index.ts +38 -0
- package/src/utils/index.ts +1 -0
- package/src/validations/calendar.schema.ts +6 -45
- package/src/validations/documentation-templates/index.ts +1 -0
- package/src/validations/documentation-templates.schema.ts +1 -1
- package/src/validations/index.ts +20 -0
- package/src/validations/patient/token.schema.ts +29 -0
- package/src/validations/patient.schema.ts +23 -6
- package/src/validations/profile-info.schema.ts +1 -1
- package/src/validations/schemas.ts +24 -24
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blackcode_sa/metaestetics-api",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.8.1",
|
|
5
5
|
"description": "Firebase authentication service with anonymous upgrade support",
|
|
6
|
-
"main": "
|
|
7
|
-
"module": "
|
|
8
|
-
"types": "
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.mjs",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
9
|
"typesVersions": {
|
|
10
10
|
"*": {
|
|
11
11
|
"*": [
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"build:admin": "tsup src/admin/index.ts --format cjs,esm --dts --out-dir dist/admin --external react-native",
|
|
62
62
|
"build:backoffice": "tsup src/backoffice/index.ts --format cjs,esm --dts --out-dir dist/backoffice",
|
|
63
63
|
"build": "npm run clean && npm run build:main && npm run build:admin && npm run build:backoffice",
|
|
64
|
-
"dev": "
|
|
64
|
+
"dev": "tsup src/index.ts --format cjs,esm --dts --watch --external react-native",
|
|
65
65
|
"prepublishOnly": "npm run build",
|
|
66
66
|
"publish:patch": "bash ./publish.sh patch",
|
|
67
67
|
"publish:minor": "bash ./publish.sh minor",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./appointment.aggregation.service";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./clinic.aggregation.service";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./filled-forms.aggregation.service";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./patient.aggregation.service";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./practitioner.aggregation.service";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./practitioner-invite.aggregation.service";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./procedure.aggregation.service";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./reviews.aggregation.service";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./calendar.admin.service";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./document-manager.admin";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./free-consultation-utils.admin";
|
package/src/admin/index.ts
CHANGED
|
@@ -1,47 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as admin from "firebase-admin";
|
|
3
|
-
import { TimestampUtils } from "../utils/TimestampUtils";
|
|
1
|
+
import { TimestampUtils } from "../utils/";
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
// Import types needed by admin consumers (like Cloud Functions)
|
|
7
|
-
import { Clinic, ClinicLocation } from "../types/clinic";
|
|
8
|
-
import { ClinicInfo } from "../types/profile";
|
|
9
|
-
import {
|
|
10
|
-
Practitioner,
|
|
11
|
-
PractitionerToken,
|
|
12
|
-
PractitionerTokenStatus,
|
|
13
|
-
} from "../types/practitioner";
|
|
14
|
-
import {
|
|
15
|
-
PractitionerInvite,
|
|
16
|
-
PractitionerInviteStatus,
|
|
17
|
-
} from "../types/clinic/practitioner-invite.types";
|
|
18
|
-
import { DoctorInfo } from "../types/clinic";
|
|
19
|
-
import { Procedure, ProcedureSummaryInfo } from "../types/procedure";
|
|
20
|
-
import { PatientProfile } from "../types/patient";
|
|
21
|
-
import { Appointment, AppointmentStatus } from "../types/appointment";
|
|
22
|
-
|
|
23
|
-
// Explicitly import the services to re-export them by name
|
|
24
|
-
import { ClinicAggregationService } from "./aggregation/clinic/clinic.aggregation.service";
|
|
25
|
-
import { PractitionerAggregationService } from "./aggregation/practitioner/practitioner.aggregation.service";
|
|
26
|
-
import { PractitionerInviteAggregationService } from "./aggregation/practitioner-invite/practitioner-invite.aggregation.service";
|
|
27
|
-
import { ProcedureAggregationService } from "./aggregation/procedure/procedure.aggregation.service";
|
|
28
|
-
import { PatientAggregationService } from "./aggregation/patient/patient.aggregation.service";
|
|
29
|
-
import { AppointmentAggregationService } from "./aggregation/appointment/appointment.aggregation.service";
|
|
30
|
-
import { FilledFormsAggregationService } from "./aggregation/forms/filled-forms.aggregation.service";
|
|
31
|
-
import { ReviewsAggregationService } from "./aggregation/reviews/reviews.aggregation.service";
|
|
32
|
-
|
|
33
|
-
// Import mailing services
|
|
34
|
-
import { BaseMailingService } from "./mailing/base.mailing.service";
|
|
35
|
-
import { PractitionerInviteMailingService } from "./mailing/practitionerInvite/practitionerInvite.mailing";
|
|
36
|
-
import { ExistingPractitionerInviteMailingService } from "./mailing/practitionerInvite/existing-practitioner-invite.mailing";
|
|
37
|
-
|
|
38
|
-
// Import booking services
|
|
39
|
-
import { BookingAdmin } from "./booking/booking.admin";
|
|
40
|
-
|
|
41
|
-
// Import patient requirements services
|
|
42
|
-
import { PatientRequirementsAdminService } from "./requirements/patient-requirements.admin.service";
|
|
43
|
-
|
|
44
|
-
// Re-export types
|
|
3
|
+
// Re-export types needed by Cloud Functions consuming this module
|
|
45
4
|
export type {
|
|
46
5
|
Notification,
|
|
47
6
|
BaseNotification,
|
|
@@ -49,8 +8,11 @@ export type {
|
|
|
49
8
|
PostRequirementNotification,
|
|
50
9
|
AppointmentReminderNotification,
|
|
51
10
|
} from "../types/notifications";
|
|
52
|
-
|
|
53
|
-
|
|
11
|
+
export type { PatientProfile, PatientSensitiveInfo } from "../types/patient";
|
|
12
|
+
export {
|
|
13
|
+
PATIENTS_COLLECTION,
|
|
14
|
+
PATIENT_SENSITIVE_INFO_COLLECTION,
|
|
15
|
+
} from "../types/patient";
|
|
54
16
|
export type { Clinic, ClinicLocation } from "../types/clinic";
|
|
55
17
|
export type { ClinicInfo } from "../types/profile";
|
|
56
18
|
export type { Practitioner, PractitionerToken } from "../types/practitioner";
|
|
@@ -68,96 +30,39 @@ export {
|
|
|
68
30
|
NotificationStatus,
|
|
69
31
|
NOTIFICATIONS_COLLECTION,
|
|
70
32
|
} from "../types/notifications";
|
|
71
|
-
export { UserRole } from "../types";
|
|
33
|
+
export { UserRole } from "../types/user";
|
|
72
34
|
export { PractitionerTokenStatus } from "../types/practitioner";
|
|
73
35
|
export { PractitionerInviteStatus } from "../types/clinic/practitioner-invite.types";
|
|
74
36
|
export { AppointmentStatus } from "../types/appointment";
|
|
75
37
|
|
|
76
|
-
// Export admin classes/services explicitly by name
|
|
77
|
-
export {
|
|
78
|
-
NotificationsAdmin,
|
|
79
|
-
ClinicAggregationService,
|
|
80
|
-
PractitionerAggregationService,
|
|
81
|
-
PractitionerInviteAggregationService,
|
|
82
|
-
ProcedureAggregationService,
|
|
83
|
-
PatientAggregationService,
|
|
84
|
-
AppointmentAggregationService,
|
|
85
|
-
PatientRequirementsAdminService,
|
|
86
|
-
FilledFormsAggregationService,
|
|
87
|
-
ReviewsAggregationService,
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
// Export mailing services
|
|
91
|
-
export {
|
|
92
|
-
BaseMailingService,
|
|
93
|
-
PractitionerInviteMailingService,
|
|
94
|
-
ExistingPractitionerInviteMailingService,
|
|
95
|
-
};
|
|
96
|
-
|
|
97
38
|
// Export mailing service interfaces
|
|
98
39
|
export type {
|
|
99
40
|
ExistingPractitionerInviteEmailData,
|
|
100
41
|
ClinicAdminNotificationData,
|
|
101
|
-
} from "./mailing/practitionerInvite/
|
|
102
|
-
|
|
103
|
-
// Export booking services
|
|
104
|
-
export { BookingAdmin };
|
|
105
|
-
|
|
106
|
-
// Also export booking types
|
|
107
|
-
export * from "./booking/booking.types";
|
|
42
|
+
} from "./mailing/practitionerInvite/";
|
|
108
43
|
|
|
109
|
-
// Re-export types needed by admin services
|
|
110
|
-
export type
|
|
111
|
-
|
|
112
|
-
PatientRequirementInstruction,
|
|
113
|
-
} from "../types/patient/patient-requirements";
|
|
114
|
-
export {
|
|
115
|
-
PatientInstructionStatus,
|
|
116
|
-
PatientRequirementOverallStatus,
|
|
117
|
-
PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME,
|
|
118
|
-
} from "../types/patient/patient-requirements";
|
|
44
|
+
// Re-export types needed by admin services
|
|
45
|
+
export type * from "../types/patient/patient-requirements";
|
|
46
|
+
export * from "../types/patient/patient-requirements";
|
|
119
47
|
|
|
120
48
|
/**
|
|
121
49
|
* Main entry point for the Admin module.
|
|
122
50
|
* This module contains services and utilities intended for administrative tasks,
|
|
123
|
-
* background processing, and
|
|
51
|
+
* background processing, and direct use by Cloud Functions.
|
|
124
52
|
*/
|
|
125
|
-
|
|
126
|
-
// --- Aggregation Services --- //
|
|
127
|
-
// Placeholder: export * from "./aggregation/practitioner/practitioner.aggregation.service";
|
|
128
|
-
// Placeholder: export * from "./aggregation/procedure/procedure.aggregation.service";
|
|
129
|
-
// Placeholder: export * from "./aggregation/patient/patient.aggregation.service";
|
|
130
|
-
|
|
131
|
-
// --- Other Admin Services/Utilities (Add as needed) --- //
|
|
132
|
-
// Example: export * from './user-management/user-management.service';
|
|
133
|
-
// Example: export * from './reporting/reporting.service';
|
|
134
|
-
|
|
135
53
|
console.log("[Admin Module] Initialized and services exported.");
|
|
136
54
|
|
|
137
|
-
// Note: Ensure that services exported here are properly initialized
|
|
138
|
-
// if they have dependencies (like Firestore db) that need to be injected.
|
|
139
|
-
// The initialization pattern might differ depending on how this module is consumed
|
|
140
|
-
// (e.g., within a larger NestJS app vs. standalone Cloud Functions).
|
|
141
|
-
|
|
142
55
|
// Initialize TimestampUtils for server-side use
|
|
143
56
|
TimestampUtils.enableServerMode();
|
|
144
57
|
|
|
145
|
-
// Export all
|
|
146
|
-
export * from "./
|
|
147
|
-
export * from "./booking
|
|
148
|
-
export * from "./
|
|
149
|
-
export * from "./
|
|
150
|
-
export * from "./
|
|
58
|
+
// 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";
|
|
151
64
|
export * from "./logger";
|
|
152
|
-
export * from "./mailing
|
|
153
|
-
export * from "./notifications
|
|
154
|
-
export * from "./requirements
|
|
155
|
-
export * from "./
|
|
156
|
-
export * from "./aggregation/forms/filled-forms.aggregation.service";
|
|
157
|
-
export * from "./aggregation/reviews/reviews.aggregation.service";
|
|
158
|
-
// Re-export types that Cloud Functions might need direct access to
|
|
159
|
-
export * from "../types/appointment";
|
|
160
|
-
// Add other types as needed
|
|
161
|
-
|
|
162
|
-
// Export free consultation utilities
|
|
163
|
-
export * from "./free-consultation/free-consultation-utils.admin";
|
|
65
|
+
export * from "./mailing";
|
|
66
|
+
export * from "./notifications";
|
|
67
|
+
export * from "./requirements";
|
|
68
|
+
export * from "./users";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./appointment.mailing.service";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./notifications.admin";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./patient-requirements.admin.service";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./user-profile.admin";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./certification.constants";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./backoffice.errors";
|
package/src/backoffice/index.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export * from "./types";
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
|
|
7
|
-
// Export services
|
|
8
|
-
export { CategoryService } from "./services/category.service";
|
|
9
|
-
export { SubcategoryService } from "./services/subcategory.service";
|
|
10
|
-
export { TechnologyService } from "./services/technology.service";
|
|
11
|
-
export { RequirementService } from "./services/requirement.service";
|
|
12
|
-
export { BrandService } from "./services/brand.service";
|
|
13
|
-
export { ProductService } from "./services/product.service";
|
|
14
|
-
export { DocumentationTemplateService } from "./services/documentation-template.service";
|
|
1
|
+
export * from "./services/";
|
|
2
|
+
export * from "./types/";
|
|
3
|
+
export * from "./validations/";
|
|
4
|
+
export * from "./constants/";
|
|
5
|
+
export * from "./errors/";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./brand.service";
|
|
2
|
+
export * from "./category.service";
|
|
3
|
+
export * from "./documentation-template.service";
|
|
4
|
+
export * from "./product.service";
|
|
5
|
+
export * from "./requirement.service";
|
|
6
|
+
export * from "./subcategory.service";
|
|
7
|
+
export * from "./technology.service";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./schemas";
|