@blackcode_sa/metaestetics-api 1.8.1 → 1.8.3
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.d.mts +7 -7
- package/dist/backoffice/index.d.ts +7 -7
- package/dist/backoffice/index.js +24 -24
- package/dist/backoffice/index.mjs +18 -18
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2968 -526
- package/dist/index.mjs +3064 -567
- package/package.json +1 -1
- package/src/backoffice/services/documentation-template.service.ts +1 -1
- package/src/backoffice/validations/schemas.ts +12 -11
- package/src/index.backup.ts +1 -1
- package/src/services/appointment/appointment.service.ts +1 -1
- package/src/services/calendar/index.ts +1 -1
- package/src/services/index.ts +1 -0
- package/src/validations/patient/patient-requirements.schema.ts +2 -2
- /package/src/services/calendar/{calendar-refactored.service.ts → calendar.v2.service.ts} +0 -0
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@ import { QueryDocumentSnapshot } from "firebase/firestore";
|
|
|
12
12
|
/**
|
|
13
13
|
* Service for managing documentation templates in the backoffice
|
|
14
14
|
*/
|
|
15
|
-
export class
|
|
15
|
+
export class DocumentationTemplateServiceBackoffice {
|
|
16
16
|
private apiService: ApiDocumentationTemplateService;
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -18,11 +18,12 @@ import { documentTemplateSchema } from "../../validations/documentation-template
|
|
|
18
18
|
/**
|
|
19
19
|
* Base validation schemas for enums
|
|
20
20
|
*/
|
|
21
|
-
export const
|
|
22
|
-
|
|
23
|
-
export const
|
|
24
|
-
export const
|
|
25
|
-
export const
|
|
21
|
+
export const blockingConditionSchemaBackoffice =
|
|
22
|
+
z.nativeEnum(BlockingCondition);
|
|
23
|
+
export const contraindicationSchemaBackoffice = z.nativeEnum(Contraindication);
|
|
24
|
+
export const treatmentBenefitSchemaBackoffice = z.nativeEnum(TreatmentBenefit);
|
|
25
|
+
export const procedureFamilySchemaBackoffice = z.nativeEnum(ProcedureFamily);
|
|
26
|
+
export const timeUnitSchemaBackoffice = z.nativeEnum(TimeUnit);
|
|
26
27
|
export const requirementTypeSchema = z.nativeEnum(RequirementType);
|
|
27
28
|
export const certificationLevelSchema = z.nativeEnum(CertificationLevel);
|
|
28
29
|
export const certificationSpecialtySchema = z.nativeEnum(
|
|
@@ -45,7 +46,7 @@ export const certificationRequirementSchema = z.object({
|
|
|
45
46
|
*/
|
|
46
47
|
export const timeframeSchema = z.object({
|
|
47
48
|
duration: z.number().min(1, "Duration must be positive"),
|
|
48
|
-
unit:
|
|
49
|
+
unit: timeUnitSchemaBackoffice,
|
|
49
50
|
notifyAt: z
|
|
50
51
|
.array(z.number())
|
|
51
52
|
.min(1, "At least one notification point is required"),
|
|
@@ -81,17 +82,17 @@ export const technologySchema = z.object({
|
|
|
81
82
|
.string()
|
|
82
83
|
.max(2000, "Technical details are too long")
|
|
83
84
|
.optional(),
|
|
84
|
-
family:
|
|
85
|
+
family: procedureFamilySchemaBackoffice,
|
|
85
86
|
categoryId: z.string().min(1, "Category ID is required"),
|
|
86
87
|
subcategoryId: z.string().min(1, "Subcategory ID is required"),
|
|
87
88
|
requirements: technologyRequirementsSchema.default({
|
|
88
89
|
pre: [],
|
|
89
90
|
post: [],
|
|
90
91
|
}),
|
|
91
|
-
blockingConditions: z.array(
|
|
92
|
-
contraindications: z.array(
|
|
92
|
+
blockingConditions: z.array(blockingConditionSchemaBackoffice),
|
|
93
|
+
contraindications: z.array(contraindicationSchemaBackoffice),
|
|
93
94
|
documentationTemplates: z.array(documentTemplateSchema),
|
|
94
|
-
benefits: z.array(
|
|
95
|
+
benefits: z.array(treatmentBenefitSchemaBackoffice),
|
|
95
96
|
certificationRequirement: certificationRequirementSchema,
|
|
96
97
|
isActive: z.boolean().default(true),
|
|
97
98
|
});
|
|
@@ -102,7 +103,7 @@ export const technologySchema = z.object({
|
|
|
102
103
|
export const categorySchema = z.object({
|
|
103
104
|
name: z.string().min(1, "Name is required").max(100, "Name is too long"),
|
|
104
105
|
description: z.string().optional(),
|
|
105
|
-
family:
|
|
106
|
+
family: procedureFamilySchemaBackoffice,
|
|
106
107
|
isActive: z.boolean().default(true),
|
|
107
108
|
});
|
|
108
109
|
|
package/src/index.backup.ts
CHANGED
|
@@ -30,7 +30,7 @@ export {
|
|
|
30
30
|
DocumentationTemplateService,
|
|
31
31
|
FilledDocumentService,
|
|
32
32
|
} from "./services/documentation-templates";
|
|
33
|
-
export { CalendarServiceV2 } from "./services/calendar/calendar
|
|
33
|
+
export { CalendarServiceV2 } from "./services/calendar/calendar.v2.service";
|
|
34
34
|
export { CalendarServiceV3 } from "./services/calendar/calendar.v3.service";
|
|
35
35
|
export { SyncedCalendarsService } from "./services/calendar/synced-calendars.service";
|
|
36
36
|
export { ReviewService } from "./services/reviews/reviews.service";
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from "../../validations/appointment.schema";
|
|
40
40
|
|
|
41
41
|
// Import other services needed (dependency injection pattern)
|
|
42
|
-
import { CalendarServiceV2 } from "../calendar/calendar
|
|
42
|
+
import { CalendarServiceV2 } from "../calendar/calendar.v2.service";
|
|
43
43
|
import { PatientService } from "../patient/patient.service";
|
|
44
44
|
import { PractitionerService } from "../practitioner/practitioner.service";
|
|
45
45
|
import { ClinicService } from "../clinic/clinic.service";
|
package/src/services/index.ts
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "../../types/patient/patient-requirements";
|
|
6
6
|
import {
|
|
7
7
|
requirementTypeSchema,
|
|
8
|
-
|
|
8
|
+
timeUnitSchemaBackoffice, // Corrected import name to lowercase 'u'
|
|
9
9
|
} from "../../backoffice/validations/schemas";
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -25,7 +25,7 @@ export const patientRequirementInstructionSchema = z.object({
|
|
|
25
25
|
actionableWindow: z.number().default(1),
|
|
26
26
|
status: patientInstructionStatusSchema,
|
|
27
27
|
originalNotifyAtValue: z.number(),
|
|
28
|
-
originalTimeframeUnit:
|
|
28
|
+
originalTimeframeUnit: timeUnitSchemaBackoffice, // Use the correctly imported timeUnitSchema
|
|
29
29
|
notificationId: z.string().optional(),
|
|
30
30
|
actionTakenAt: z.any().optional().nullable(), // Firestore Timestamp or null
|
|
31
31
|
updatedAt: z.any(), // Firestore Timestamp
|
|
File without changes
|