@blackcode_sa/metaestetics-api 1.8.2 → 1.8.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.
- package/dist/backoffice/index.d.mts +39 -7
- package/dist/backoffice/index.d.ts +39 -7
- package/dist/backoffice/index.js +64 -24
- package/dist/backoffice/index.mjs +48 -18
- package/dist/index.js +12 -12
- package/dist/index.mjs +12 -12
- package/package.json +1 -1
- package/src/backoffice/services/documentation-template.service.ts +1 -1
- package/src/backoffice/types/README.md +12 -0
- package/src/backoffice/types/index.ts +8 -33
- package/src/backoffice/types/static/README.md +18 -0
- package/src/backoffice/types/static/index.ts +6 -0
- package/src/backoffice/validations/schemas.ts +12 -11
- package/src/validations/patient/patient-requirements.schema.ts +2 -2
|
@@ -27,6 +27,10 @@ interface Brand {
|
|
|
27
27
|
website?: string;
|
|
28
28
|
description?: string;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Kolekcija u Firestore bazi gde se čuvaju brendovi
|
|
32
|
+
*/
|
|
33
|
+
declare const BRANDS_COLLECTION = "brands";
|
|
30
34
|
|
|
31
35
|
declare class BaseService {
|
|
32
36
|
protected db: Firestore;
|
|
@@ -122,6 +126,10 @@ interface Category {
|
|
|
122
126
|
/** Flag koji označava da li je kategorija aktivna */
|
|
123
127
|
isActive: boolean;
|
|
124
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Kolekcija u Firestore bazi gde se čuvaju kategorije
|
|
131
|
+
*/
|
|
132
|
+
declare const CATEGORIES_COLLECTION = "backoffice_categories";
|
|
125
133
|
|
|
126
134
|
/**
|
|
127
135
|
* Servis za upravljanje kategorijama procedura.
|
|
@@ -186,6 +194,14 @@ declare class CategoryService extends BaseService {
|
|
|
186
194
|
getById(id: string): Promise<Category | null>;
|
|
187
195
|
}
|
|
188
196
|
|
|
197
|
+
/**
|
|
198
|
+
* Types for the Medical Documentation Templating System
|
|
199
|
+
*/
|
|
200
|
+
/**
|
|
201
|
+
* Kolekcija u Firestore bazi gde se čuvaju dokumentacijske šablone
|
|
202
|
+
*/
|
|
203
|
+
declare const DOCUMENTATION_TEMPLATES_COLLECTION = "documentation-templates";
|
|
204
|
+
declare const FILLED_DOCUMENTS_COLLECTION = "filled-documents";
|
|
189
205
|
/**
|
|
190
206
|
* Enum for element types in documentation templates
|
|
191
207
|
*/
|
|
@@ -400,7 +416,7 @@ interface UpdateDocumentTemplateData {
|
|
|
400
416
|
/**
|
|
401
417
|
* Service for managing documentation templates in the backoffice
|
|
402
418
|
*/
|
|
403
|
-
declare class
|
|
419
|
+
declare class DocumentationTemplateServiceBackoffice {
|
|
404
420
|
private apiService;
|
|
405
421
|
/**
|
|
406
422
|
* Constructor for DocumentationTemplateService
|
|
@@ -519,6 +535,10 @@ interface Product {
|
|
|
519
535
|
indications?: string[];
|
|
520
536
|
contraindications?: string[];
|
|
521
537
|
}
|
|
538
|
+
/**
|
|
539
|
+
* Collection in Firestore database where products are stored
|
|
540
|
+
*/
|
|
541
|
+
declare const PRODUCTS_COLLECTION = "products";
|
|
522
542
|
/**
|
|
523
543
|
* Interface for the ProductService class
|
|
524
544
|
*/
|
|
@@ -648,6 +668,10 @@ interface Requirement {
|
|
|
648
668
|
createdAt: Date;
|
|
649
669
|
updatedAt: Date;
|
|
650
670
|
}
|
|
671
|
+
/**
|
|
672
|
+
* Kolekcija u Firestore bazi gde se čuvaju globalni zahtevi
|
|
673
|
+
*/
|
|
674
|
+
declare const REQUIREMENTS_COLLECTION = "backoffice_requirements";
|
|
651
675
|
|
|
652
676
|
/**
|
|
653
677
|
* Servis za upravljanje globalnim zahtevima.
|
|
@@ -751,6 +775,10 @@ interface Subcategory {
|
|
|
751
775
|
/** Datum poslednjeg ažuriranja podkategorije */
|
|
752
776
|
updatedAt: Date;
|
|
753
777
|
}
|
|
778
|
+
/**
|
|
779
|
+
* Kolekcija u Firestore bazi gde se čuvaju podkategorije
|
|
780
|
+
*/
|
|
781
|
+
declare const SUBCATEGORIES_COLLECTION = "subcategories";
|
|
754
782
|
|
|
755
783
|
/**
|
|
756
784
|
* Servis za upravljanje podkategorijama procedura.
|
|
@@ -979,6 +1007,10 @@ interface Technology {
|
|
|
979
1007
|
createdAt: Date;
|
|
980
1008
|
updatedAt: Date;
|
|
981
1009
|
}
|
|
1010
|
+
/**
|
|
1011
|
+
* Collection in Firestore database where technologies are stored
|
|
1012
|
+
*/
|
|
1013
|
+
declare const TECHNOLOGIES_COLLECTION = "technologies";
|
|
982
1014
|
|
|
983
1015
|
/**
|
|
984
1016
|
* Condensed practitioner review information
|
|
@@ -3243,11 +3275,11 @@ declare const documentTemplateSchema: z.ZodObject<{
|
|
|
3243
3275
|
/**
|
|
3244
3276
|
* Base validation schemas for enums
|
|
3245
3277
|
*/
|
|
3246
|
-
declare const
|
|
3247
|
-
declare const
|
|
3248
|
-
declare const
|
|
3249
|
-
declare const
|
|
3250
|
-
declare const
|
|
3278
|
+
declare const blockingConditionSchemaBackoffice: z.ZodNativeEnum<typeof BlockingCondition>;
|
|
3279
|
+
declare const contraindicationSchemaBackoffice: z.ZodNativeEnum<typeof Contraindication>;
|
|
3280
|
+
declare const treatmentBenefitSchemaBackoffice: z.ZodNativeEnum<typeof TreatmentBenefit>;
|
|
3281
|
+
declare const procedureFamilySchemaBackoffice: z.ZodNativeEnum<typeof ProcedureFamily>;
|
|
3282
|
+
declare const timeUnitSchemaBackoffice: z.ZodNativeEnum<typeof TimeUnit>;
|
|
3251
3283
|
declare const requirementTypeSchema: z.ZodNativeEnum<typeof RequirementType>;
|
|
3252
3284
|
declare const certificationLevelSchema: z.ZodNativeEnum<typeof CertificationLevel>;
|
|
3253
3285
|
declare const certificationSpecialtySchema: z.ZodNativeEnum<typeof CertificationSpecialty>;
|
|
@@ -5503,4 +5535,4 @@ declare class InvalidTreatmentBenefitError extends TreatmentBenefitError {
|
|
|
5503
5535
|
constructor(benefit: string);
|
|
5504
5536
|
}
|
|
5505
5537
|
|
|
5506
|
-
export { BackofficeError, BlockingCondition, BlockingConditionError, type Brand, BrandService, type Category, CategoryError, CategoryNotFoundError, CategoryService, CertificationLevel, type CertificationRequirement, CertificationSpecialty, CircularReferenceError, Contraindication, ContraindicationError, type CreateDocumentTemplateData, DEFAULT_CERTIFICATION_REQUIREMENT, type DocumentElement, DocumentElementType, type DocumentTemplate,
|
|
5538
|
+
export { BRANDS_COLLECTION, BackofficeError, BlockingCondition, BlockingConditionError, type Brand, BrandService, CATEGORIES_COLLECTION, type Category, CategoryError, CategoryNotFoundError, CategoryService, CertificationLevel, type CertificationRequirement, CertificationSpecialty, CircularReferenceError, Contraindication, ContraindicationError, type CreateDocumentTemplateData, Currency, DEFAULT_CERTIFICATION_REQUIREMENT, DOCUMENTATION_TEMPLATES_COLLECTION, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateServiceBackoffice, DynamicVariable, FILLED_DOCUMENTS_COLLECTION, HeadingLevel, type IProductService, InvalidBlockingConditionError, InvalidCategoryDataError, InvalidContraindicationError, InvalidHierarchyError, InvalidRequirementDataError, InvalidSubcategoryDataError, InvalidTechnologyDataError, InvalidTimeframeError, InvalidTreatmentBenefitError, ListType, PRODUCTS_COLLECTION, PricingMeasure, ProcedureFamily, type Product, ProductService, REQUIREMENTS_COLLECTION, RelationshipError, type Requirement, RequirementError, type RequirementImportance, RequirementNotFoundError, RequirementService, RequirementType, SUBCATEGORIES_COLLECTION, type Subcategory, SubcategoryError, SubcategoryNotFoundError, SubcategoryService, TECHNOLOGIES_COLLECTION, type Technology, type TechnologyDocumentationTemplate, TechnologyError, TechnologyNotFoundError, type TechnologyRequirements, TechnologyService, type TimeFrame, TimeUnit, TreatmentBenefit, TreatmentBenefitError, type UpdateDocumentTemplateData, blockingConditionSchemaBackoffice, categorySchema, categoryUpdateSchema, certificationLevelSchema, certificationRequirementSchema, certificationSpecialtySchema, contraindicationSchemaBackoffice, createDocumentTemplateSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, procedureFamilySchemaBackoffice, requirementSchema, requirementTypeSchema, requirementUpdateSchema, subcategorySchema, subcategoryUpdateSchema, technologyRequirementsSchema, technologySchema, technologyUpdateSchema, timeUnitSchemaBackoffice, timeframeSchema, treatmentBenefitSchemaBackoffice, updateDocumentTemplateSchema };
|
|
@@ -27,6 +27,10 @@ interface Brand {
|
|
|
27
27
|
website?: string;
|
|
28
28
|
description?: string;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Kolekcija u Firestore bazi gde se čuvaju brendovi
|
|
32
|
+
*/
|
|
33
|
+
declare const BRANDS_COLLECTION = "brands";
|
|
30
34
|
|
|
31
35
|
declare class BaseService {
|
|
32
36
|
protected db: Firestore;
|
|
@@ -122,6 +126,10 @@ interface Category {
|
|
|
122
126
|
/** Flag koji označava da li je kategorija aktivna */
|
|
123
127
|
isActive: boolean;
|
|
124
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Kolekcija u Firestore bazi gde se čuvaju kategorije
|
|
131
|
+
*/
|
|
132
|
+
declare const CATEGORIES_COLLECTION = "backoffice_categories";
|
|
125
133
|
|
|
126
134
|
/**
|
|
127
135
|
* Servis za upravljanje kategorijama procedura.
|
|
@@ -186,6 +194,14 @@ declare class CategoryService extends BaseService {
|
|
|
186
194
|
getById(id: string): Promise<Category | null>;
|
|
187
195
|
}
|
|
188
196
|
|
|
197
|
+
/**
|
|
198
|
+
* Types for the Medical Documentation Templating System
|
|
199
|
+
*/
|
|
200
|
+
/**
|
|
201
|
+
* Kolekcija u Firestore bazi gde se čuvaju dokumentacijske šablone
|
|
202
|
+
*/
|
|
203
|
+
declare const DOCUMENTATION_TEMPLATES_COLLECTION = "documentation-templates";
|
|
204
|
+
declare const FILLED_DOCUMENTS_COLLECTION = "filled-documents";
|
|
189
205
|
/**
|
|
190
206
|
* Enum for element types in documentation templates
|
|
191
207
|
*/
|
|
@@ -400,7 +416,7 @@ interface UpdateDocumentTemplateData {
|
|
|
400
416
|
/**
|
|
401
417
|
* Service for managing documentation templates in the backoffice
|
|
402
418
|
*/
|
|
403
|
-
declare class
|
|
419
|
+
declare class DocumentationTemplateServiceBackoffice {
|
|
404
420
|
private apiService;
|
|
405
421
|
/**
|
|
406
422
|
* Constructor for DocumentationTemplateService
|
|
@@ -519,6 +535,10 @@ interface Product {
|
|
|
519
535
|
indications?: string[];
|
|
520
536
|
contraindications?: string[];
|
|
521
537
|
}
|
|
538
|
+
/**
|
|
539
|
+
* Collection in Firestore database where products are stored
|
|
540
|
+
*/
|
|
541
|
+
declare const PRODUCTS_COLLECTION = "products";
|
|
522
542
|
/**
|
|
523
543
|
* Interface for the ProductService class
|
|
524
544
|
*/
|
|
@@ -648,6 +668,10 @@ interface Requirement {
|
|
|
648
668
|
createdAt: Date;
|
|
649
669
|
updatedAt: Date;
|
|
650
670
|
}
|
|
671
|
+
/**
|
|
672
|
+
* Kolekcija u Firestore bazi gde se čuvaju globalni zahtevi
|
|
673
|
+
*/
|
|
674
|
+
declare const REQUIREMENTS_COLLECTION = "backoffice_requirements";
|
|
651
675
|
|
|
652
676
|
/**
|
|
653
677
|
* Servis za upravljanje globalnim zahtevima.
|
|
@@ -751,6 +775,10 @@ interface Subcategory {
|
|
|
751
775
|
/** Datum poslednjeg ažuriranja podkategorije */
|
|
752
776
|
updatedAt: Date;
|
|
753
777
|
}
|
|
778
|
+
/**
|
|
779
|
+
* Kolekcija u Firestore bazi gde se čuvaju podkategorije
|
|
780
|
+
*/
|
|
781
|
+
declare const SUBCATEGORIES_COLLECTION = "subcategories";
|
|
754
782
|
|
|
755
783
|
/**
|
|
756
784
|
* Servis za upravljanje podkategorijama procedura.
|
|
@@ -979,6 +1007,10 @@ interface Technology {
|
|
|
979
1007
|
createdAt: Date;
|
|
980
1008
|
updatedAt: Date;
|
|
981
1009
|
}
|
|
1010
|
+
/**
|
|
1011
|
+
* Collection in Firestore database where technologies are stored
|
|
1012
|
+
*/
|
|
1013
|
+
declare const TECHNOLOGIES_COLLECTION = "technologies";
|
|
982
1014
|
|
|
983
1015
|
/**
|
|
984
1016
|
* Condensed practitioner review information
|
|
@@ -3243,11 +3275,11 @@ declare const documentTemplateSchema: z.ZodObject<{
|
|
|
3243
3275
|
/**
|
|
3244
3276
|
* Base validation schemas for enums
|
|
3245
3277
|
*/
|
|
3246
|
-
declare const
|
|
3247
|
-
declare const
|
|
3248
|
-
declare const
|
|
3249
|
-
declare const
|
|
3250
|
-
declare const
|
|
3278
|
+
declare const blockingConditionSchemaBackoffice: z.ZodNativeEnum<typeof BlockingCondition>;
|
|
3279
|
+
declare const contraindicationSchemaBackoffice: z.ZodNativeEnum<typeof Contraindication>;
|
|
3280
|
+
declare const treatmentBenefitSchemaBackoffice: z.ZodNativeEnum<typeof TreatmentBenefit>;
|
|
3281
|
+
declare const procedureFamilySchemaBackoffice: z.ZodNativeEnum<typeof ProcedureFamily>;
|
|
3282
|
+
declare const timeUnitSchemaBackoffice: z.ZodNativeEnum<typeof TimeUnit>;
|
|
3251
3283
|
declare const requirementTypeSchema: z.ZodNativeEnum<typeof RequirementType>;
|
|
3252
3284
|
declare const certificationLevelSchema: z.ZodNativeEnum<typeof CertificationLevel>;
|
|
3253
3285
|
declare const certificationSpecialtySchema: z.ZodNativeEnum<typeof CertificationSpecialty>;
|
|
@@ -5503,4 +5535,4 @@ declare class InvalidTreatmentBenefitError extends TreatmentBenefitError {
|
|
|
5503
5535
|
constructor(benefit: string);
|
|
5504
5536
|
}
|
|
5505
5537
|
|
|
5506
|
-
export { BackofficeError, BlockingCondition, BlockingConditionError, type Brand, BrandService, type Category, CategoryError, CategoryNotFoundError, CategoryService, CertificationLevel, type CertificationRequirement, CertificationSpecialty, CircularReferenceError, Contraindication, ContraindicationError, type CreateDocumentTemplateData, DEFAULT_CERTIFICATION_REQUIREMENT, type DocumentElement, DocumentElementType, type DocumentTemplate,
|
|
5538
|
+
export { BRANDS_COLLECTION, BackofficeError, BlockingCondition, BlockingConditionError, type Brand, BrandService, CATEGORIES_COLLECTION, type Category, CategoryError, CategoryNotFoundError, CategoryService, CertificationLevel, type CertificationRequirement, CertificationSpecialty, CircularReferenceError, Contraindication, ContraindicationError, type CreateDocumentTemplateData, Currency, DEFAULT_CERTIFICATION_REQUIREMENT, DOCUMENTATION_TEMPLATES_COLLECTION, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateServiceBackoffice, DynamicVariable, FILLED_DOCUMENTS_COLLECTION, HeadingLevel, type IProductService, InvalidBlockingConditionError, InvalidCategoryDataError, InvalidContraindicationError, InvalidHierarchyError, InvalidRequirementDataError, InvalidSubcategoryDataError, InvalidTechnologyDataError, InvalidTimeframeError, InvalidTreatmentBenefitError, ListType, PRODUCTS_COLLECTION, PricingMeasure, ProcedureFamily, type Product, ProductService, REQUIREMENTS_COLLECTION, RelationshipError, type Requirement, RequirementError, type RequirementImportance, RequirementNotFoundError, RequirementService, RequirementType, SUBCATEGORIES_COLLECTION, type Subcategory, SubcategoryError, SubcategoryNotFoundError, SubcategoryService, TECHNOLOGIES_COLLECTION, type Technology, type TechnologyDocumentationTemplate, TechnologyError, TechnologyNotFoundError, type TechnologyRequirements, TechnologyService, type TimeFrame, TimeUnit, TreatmentBenefit, TreatmentBenefitError, type UpdateDocumentTemplateData, blockingConditionSchemaBackoffice, categorySchema, categoryUpdateSchema, certificationLevelSchema, certificationRequirementSchema, certificationSpecialtySchema, contraindicationSchemaBackoffice, createDocumentTemplateSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, procedureFamilySchemaBackoffice, requirementSchema, requirementTypeSchema, requirementUpdateSchema, subcategorySchema, subcategoryUpdateSchema, technologyRequirementsSchema, technologySchema, technologyUpdateSchema, timeUnitSchemaBackoffice, timeframeSchema, treatmentBenefitSchemaBackoffice, updateDocumentTemplateSchema };
|
package/dist/backoffice/index.js
CHANGED
|
@@ -20,10 +20,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/backoffice/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
BRANDS_COLLECTION: () => BRANDS_COLLECTION,
|
|
23
24
|
BackofficeError: () => BackofficeError,
|
|
24
25
|
BlockingCondition: () => BlockingCondition,
|
|
25
26
|
BlockingConditionError: () => BlockingConditionError,
|
|
26
27
|
BrandService: () => BrandService,
|
|
28
|
+
CATEGORIES_COLLECTION: () => CATEGORIES_COLLECTION,
|
|
27
29
|
CategoryError: () => CategoryError,
|
|
28
30
|
CategoryNotFoundError: () => CategoryNotFoundError,
|
|
29
31
|
CategoryService: () => CategoryService,
|
|
@@ -32,10 +34,13 @@ __export(index_exports, {
|
|
|
32
34
|
CircularReferenceError: () => CircularReferenceError,
|
|
33
35
|
Contraindication: () => Contraindication,
|
|
34
36
|
ContraindicationError: () => ContraindicationError,
|
|
37
|
+
Currency: () => Currency,
|
|
35
38
|
DEFAULT_CERTIFICATION_REQUIREMENT: () => DEFAULT_CERTIFICATION_REQUIREMENT2,
|
|
39
|
+
DOCUMENTATION_TEMPLATES_COLLECTION: () => DOCUMENTATION_TEMPLATES_COLLECTION,
|
|
36
40
|
DocumentElementType: () => DocumentElementType,
|
|
37
|
-
|
|
41
|
+
DocumentationTemplateServiceBackoffice: () => DocumentationTemplateServiceBackoffice,
|
|
38
42
|
DynamicVariable: () => DynamicVariable,
|
|
43
|
+
FILLED_DOCUMENTS_COLLECTION: () => FILLED_DOCUMENTS_COLLECTION,
|
|
39
44
|
HeadingLevel: () => HeadingLevel,
|
|
40
45
|
InvalidBlockingConditionError: () => InvalidBlockingConditionError,
|
|
41
46
|
InvalidCategoryDataError: () => InvalidCategoryDataError,
|
|
@@ -47,34 +52,39 @@ __export(index_exports, {
|
|
|
47
52
|
InvalidTimeframeError: () => InvalidTimeframeError,
|
|
48
53
|
InvalidTreatmentBenefitError: () => InvalidTreatmentBenefitError,
|
|
49
54
|
ListType: () => ListType,
|
|
55
|
+
PRODUCTS_COLLECTION: () => PRODUCTS_COLLECTION,
|
|
56
|
+
PricingMeasure: () => PricingMeasure,
|
|
50
57
|
ProcedureFamily: () => ProcedureFamily,
|
|
51
58
|
ProductService: () => ProductService,
|
|
59
|
+
REQUIREMENTS_COLLECTION: () => REQUIREMENTS_COLLECTION,
|
|
52
60
|
RelationshipError: () => RelationshipError,
|
|
53
61
|
RequirementError: () => RequirementError,
|
|
54
62
|
RequirementNotFoundError: () => RequirementNotFoundError,
|
|
55
63
|
RequirementService: () => RequirementService,
|
|
56
64
|
RequirementType: () => RequirementType,
|
|
65
|
+
SUBCATEGORIES_COLLECTION: () => SUBCATEGORIES_COLLECTION,
|
|
57
66
|
SubcategoryError: () => SubcategoryError,
|
|
58
67
|
SubcategoryNotFoundError: () => SubcategoryNotFoundError,
|
|
59
68
|
SubcategoryService: () => SubcategoryService,
|
|
69
|
+
TECHNOLOGIES_COLLECTION: () => TECHNOLOGIES_COLLECTION,
|
|
60
70
|
TechnologyError: () => TechnologyError,
|
|
61
71
|
TechnologyNotFoundError: () => TechnologyNotFoundError,
|
|
62
72
|
TechnologyService: () => TechnologyService,
|
|
63
73
|
TimeUnit: () => TimeUnit,
|
|
64
74
|
TreatmentBenefit: () => TreatmentBenefit,
|
|
65
75
|
TreatmentBenefitError: () => TreatmentBenefitError,
|
|
66
|
-
|
|
76
|
+
blockingConditionSchemaBackoffice: () => blockingConditionSchemaBackoffice,
|
|
67
77
|
categorySchema: () => categorySchema,
|
|
68
78
|
categoryUpdateSchema: () => categoryUpdateSchema,
|
|
69
79
|
certificationLevelSchema: () => certificationLevelSchema,
|
|
70
80
|
certificationRequirementSchema: () => certificationRequirementSchema,
|
|
71
81
|
certificationSpecialtySchema: () => certificationSpecialtySchema,
|
|
72
|
-
|
|
82
|
+
contraindicationSchemaBackoffice: () => contraindicationSchemaBackoffice,
|
|
73
83
|
createDocumentTemplateSchema: () => createDocumentTemplateSchema,
|
|
74
84
|
documentElementSchema: () => documentElementSchema,
|
|
75
85
|
documentElementWithoutIdSchema: () => documentElementWithoutIdSchema,
|
|
76
86
|
documentTemplateSchema: () => documentTemplateSchema,
|
|
77
|
-
|
|
87
|
+
procedureFamilySchemaBackoffice: () => procedureFamilySchemaBackoffice,
|
|
78
88
|
requirementSchema: () => requirementSchema,
|
|
79
89
|
requirementTypeSchema: () => requirementTypeSchema,
|
|
80
90
|
requirementUpdateSchema: () => requirementUpdateSchema,
|
|
@@ -83,9 +93,9 @@ __export(index_exports, {
|
|
|
83
93
|
technologyRequirementsSchema: () => technologyRequirementsSchema,
|
|
84
94
|
technologySchema: () => technologySchema,
|
|
85
95
|
technologyUpdateSchema: () => technologyUpdateSchema,
|
|
86
|
-
|
|
96
|
+
timeUnitSchemaBackoffice: () => timeUnitSchemaBackoffice,
|
|
87
97
|
timeframeSchema: () => timeframeSchema,
|
|
88
|
-
|
|
98
|
+
treatmentBenefitSchemaBackoffice: () => treatmentBenefitSchemaBackoffice,
|
|
89
99
|
updateDocumentTemplateSchema: () => updateDocumentTemplateSchema
|
|
90
100
|
});
|
|
91
101
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -296,6 +306,7 @@ var import_firestore3 = require("firebase/firestore");
|
|
|
296
306
|
|
|
297
307
|
// src/types/documentation-templates/index.ts
|
|
298
308
|
var DOCUMENTATION_TEMPLATES_COLLECTION = "documentation-templates";
|
|
309
|
+
var FILLED_DOCUMENTS_COLLECTION = "filled-documents";
|
|
299
310
|
var DocumentElementType = /* @__PURE__ */ ((DocumentElementType2) => {
|
|
300
311
|
DocumentElementType2["HEADING"] = "heading";
|
|
301
312
|
DocumentElementType2["PARAGRAPH"] = "paragraph";
|
|
@@ -814,7 +825,7 @@ var import_storage2 = require("firebase/storage");
|
|
|
814
825
|
var import_firestore5 = require("firebase/firestore");
|
|
815
826
|
|
|
816
827
|
// src/backoffice/services/documentation-template.service.ts
|
|
817
|
-
var
|
|
828
|
+
var DocumentationTemplateServiceBackoffice = class {
|
|
818
829
|
/**
|
|
819
830
|
* Constructor for DocumentationTemplateService
|
|
820
831
|
* @param db - Firestore instance
|
|
@@ -1717,6 +1728,25 @@ var Contraindication = /* @__PURE__ */ ((Contraindication2) => {
|
|
|
1717
1728
|
return Contraindication2;
|
|
1718
1729
|
})(Contraindication || {});
|
|
1719
1730
|
|
|
1731
|
+
// src/backoffice/types/static/pricing.types.ts
|
|
1732
|
+
var PricingMeasure = /* @__PURE__ */ ((PricingMeasure2) => {
|
|
1733
|
+
PricingMeasure2["PER_ML"] = "per_ml";
|
|
1734
|
+
PricingMeasure2["PER_ZONE"] = "per_zone";
|
|
1735
|
+
PricingMeasure2["PER_AREA"] = "per_area";
|
|
1736
|
+
PricingMeasure2["PER_SESSION"] = "per_session";
|
|
1737
|
+
PricingMeasure2["PER_TREATMENT"] = "per_treatment";
|
|
1738
|
+
PricingMeasure2["PER_PACKAGE"] = "per_package";
|
|
1739
|
+
return PricingMeasure2;
|
|
1740
|
+
})(PricingMeasure || {});
|
|
1741
|
+
var Currency = /* @__PURE__ */ ((Currency2) => {
|
|
1742
|
+
Currency2["EUR"] = "EUR";
|
|
1743
|
+
Currency2["USD"] = "USD";
|
|
1744
|
+
Currency2["GBP"] = "GBP";
|
|
1745
|
+
Currency2["CHF"] = "CHF";
|
|
1746
|
+
Currency2["AUD"] = "AUD";
|
|
1747
|
+
return Currency2;
|
|
1748
|
+
})(Currency || {});
|
|
1749
|
+
|
|
1720
1750
|
// src/backoffice/types/static/procedure-family.types.ts
|
|
1721
1751
|
var ProcedureFamily = /* @__PURE__ */ ((ProcedureFamily2) => {
|
|
1722
1752
|
ProcedureFamily2["AESTHETICS"] = "aesthetics";
|
|
@@ -1746,11 +1776,11 @@ var TreatmentBenefit = /* @__PURE__ */ ((TreatmentBenefit2) => {
|
|
|
1746
1776
|
|
|
1747
1777
|
// src/backoffice/validations/schemas.ts
|
|
1748
1778
|
var import_zod2 = require("zod");
|
|
1749
|
-
var
|
|
1750
|
-
var
|
|
1751
|
-
var
|
|
1752
|
-
var
|
|
1753
|
-
var
|
|
1779
|
+
var blockingConditionSchemaBackoffice = import_zod2.z.nativeEnum(BlockingCondition);
|
|
1780
|
+
var contraindicationSchemaBackoffice = import_zod2.z.nativeEnum(Contraindication);
|
|
1781
|
+
var treatmentBenefitSchemaBackoffice = import_zod2.z.nativeEnum(TreatmentBenefit);
|
|
1782
|
+
var procedureFamilySchemaBackoffice = import_zod2.z.nativeEnum(ProcedureFamily);
|
|
1783
|
+
var timeUnitSchemaBackoffice = import_zod2.z.nativeEnum(TimeUnit);
|
|
1754
1784
|
var requirementTypeSchema = import_zod2.z.nativeEnum(RequirementType);
|
|
1755
1785
|
var certificationLevelSchema = import_zod2.z.nativeEnum(CertificationLevel);
|
|
1756
1786
|
var certificationSpecialtySchema = import_zod2.z.nativeEnum(
|
|
@@ -1762,7 +1792,7 @@ var certificationRequirementSchema = import_zod2.z.object({
|
|
|
1762
1792
|
});
|
|
1763
1793
|
var timeframeSchema = import_zod2.z.object({
|
|
1764
1794
|
duration: import_zod2.z.number().min(1, "Duration must be positive"),
|
|
1765
|
-
unit:
|
|
1795
|
+
unit: timeUnitSchemaBackoffice,
|
|
1766
1796
|
notifyAt: import_zod2.z.array(import_zod2.z.number()).min(1, "At least one notification point is required")
|
|
1767
1797
|
});
|
|
1768
1798
|
var requirementSchema = import_zod2.z.object({
|
|
@@ -1781,24 +1811,24 @@ var technologySchema = import_zod2.z.object({
|
|
|
1781
1811
|
name: import_zod2.z.string().min(1, "Name is required").max(100, "Name is too long"),
|
|
1782
1812
|
description: import_zod2.z.string().max(1e3, "Description is too long").optional(),
|
|
1783
1813
|
technicalDetails: import_zod2.z.string().max(2e3, "Technical details are too long").optional(),
|
|
1784
|
-
family:
|
|
1814
|
+
family: procedureFamilySchemaBackoffice,
|
|
1785
1815
|
categoryId: import_zod2.z.string().min(1, "Category ID is required"),
|
|
1786
1816
|
subcategoryId: import_zod2.z.string().min(1, "Subcategory ID is required"),
|
|
1787
1817
|
requirements: technologyRequirementsSchema.default({
|
|
1788
1818
|
pre: [],
|
|
1789
1819
|
post: []
|
|
1790
1820
|
}),
|
|
1791
|
-
blockingConditions: import_zod2.z.array(
|
|
1792
|
-
contraindications: import_zod2.z.array(
|
|
1821
|
+
blockingConditions: import_zod2.z.array(blockingConditionSchemaBackoffice),
|
|
1822
|
+
contraindications: import_zod2.z.array(contraindicationSchemaBackoffice),
|
|
1793
1823
|
documentationTemplates: import_zod2.z.array(documentTemplateSchema),
|
|
1794
|
-
benefits: import_zod2.z.array(
|
|
1824
|
+
benefits: import_zod2.z.array(treatmentBenefitSchemaBackoffice),
|
|
1795
1825
|
certificationRequirement: certificationRequirementSchema,
|
|
1796
1826
|
isActive: import_zod2.z.boolean().default(true)
|
|
1797
1827
|
});
|
|
1798
1828
|
var categorySchema = import_zod2.z.object({
|
|
1799
1829
|
name: import_zod2.z.string().min(1, "Name is required").max(100, "Name is too long"),
|
|
1800
1830
|
description: import_zod2.z.string().optional(),
|
|
1801
|
-
family:
|
|
1831
|
+
family: procedureFamilySchemaBackoffice,
|
|
1802
1832
|
isActive: import_zod2.z.boolean().default(true)
|
|
1803
1833
|
});
|
|
1804
1834
|
var subcategorySchema = import_zod2.z.object({
|
|
@@ -1959,10 +1989,12 @@ var InvalidTreatmentBenefitError = class extends TreatmentBenefitError {
|
|
|
1959
1989
|
};
|
|
1960
1990
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1961
1991
|
0 && (module.exports = {
|
|
1992
|
+
BRANDS_COLLECTION,
|
|
1962
1993
|
BackofficeError,
|
|
1963
1994
|
BlockingCondition,
|
|
1964
1995
|
BlockingConditionError,
|
|
1965
1996
|
BrandService,
|
|
1997
|
+
CATEGORIES_COLLECTION,
|
|
1966
1998
|
CategoryError,
|
|
1967
1999
|
CategoryNotFoundError,
|
|
1968
2000
|
CategoryService,
|
|
@@ -1971,10 +2003,13 @@ var InvalidTreatmentBenefitError = class extends TreatmentBenefitError {
|
|
|
1971
2003
|
CircularReferenceError,
|
|
1972
2004
|
Contraindication,
|
|
1973
2005
|
ContraindicationError,
|
|
2006
|
+
Currency,
|
|
1974
2007
|
DEFAULT_CERTIFICATION_REQUIREMENT,
|
|
2008
|
+
DOCUMENTATION_TEMPLATES_COLLECTION,
|
|
1975
2009
|
DocumentElementType,
|
|
1976
|
-
|
|
2010
|
+
DocumentationTemplateServiceBackoffice,
|
|
1977
2011
|
DynamicVariable,
|
|
2012
|
+
FILLED_DOCUMENTS_COLLECTION,
|
|
1978
2013
|
HeadingLevel,
|
|
1979
2014
|
InvalidBlockingConditionError,
|
|
1980
2015
|
InvalidCategoryDataError,
|
|
@@ -1986,34 +2021,39 @@ var InvalidTreatmentBenefitError = class extends TreatmentBenefitError {
|
|
|
1986
2021
|
InvalidTimeframeError,
|
|
1987
2022
|
InvalidTreatmentBenefitError,
|
|
1988
2023
|
ListType,
|
|
2024
|
+
PRODUCTS_COLLECTION,
|
|
2025
|
+
PricingMeasure,
|
|
1989
2026
|
ProcedureFamily,
|
|
1990
2027
|
ProductService,
|
|
2028
|
+
REQUIREMENTS_COLLECTION,
|
|
1991
2029
|
RelationshipError,
|
|
1992
2030
|
RequirementError,
|
|
1993
2031
|
RequirementNotFoundError,
|
|
1994
2032
|
RequirementService,
|
|
1995
2033
|
RequirementType,
|
|
2034
|
+
SUBCATEGORIES_COLLECTION,
|
|
1996
2035
|
SubcategoryError,
|
|
1997
2036
|
SubcategoryNotFoundError,
|
|
1998
2037
|
SubcategoryService,
|
|
2038
|
+
TECHNOLOGIES_COLLECTION,
|
|
1999
2039
|
TechnologyError,
|
|
2000
2040
|
TechnologyNotFoundError,
|
|
2001
2041
|
TechnologyService,
|
|
2002
2042
|
TimeUnit,
|
|
2003
2043
|
TreatmentBenefit,
|
|
2004
2044
|
TreatmentBenefitError,
|
|
2005
|
-
|
|
2045
|
+
blockingConditionSchemaBackoffice,
|
|
2006
2046
|
categorySchema,
|
|
2007
2047
|
categoryUpdateSchema,
|
|
2008
2048
|
certificationLevelSchema,
|
|
2009
2049
|
certificationRequirementSchema,
|
|
2010
2050
|
certificationSpecialtySchema,
|
|
2011
|
-
|
|
2051
|
+
contraindicationSchemaBackoffice,
|
|
2012
2052
|
createDocumentTemplateSchema,
|
|
2013
2053
|
documentElementSchema,
|
|
2014
2054
|
documentElementWithoutIdSchema,
|
|
2015
2055
|
documentTemplateSchema,
|
|
2016
|
-
|
|
2056
|
+
procedureFamilySchemaBackoffice,
|
|
2017
2057
|
requirementSchema,
|
|
2018
2058
|
requirementTypeSchema,
|
|
2019
2059
|
requirementUpdateSchema,
|
|
@@ -2022,8 +2062,8 @@ var InvalidTreatmentBenefitError = class extends TreatmentBenefitError {
|
|
|
2022
2062
|
technologyRequirementsSchema,
|
|
2023
2063
|
technologySchema,
|
|
2024
2064
|
technologyUpdateSchema,
|
|
2025
|
-
|
|
2065
|
+
timeUnitSchemaBackoffice,
|
|
2026
2066
|
timeframeSchema,
|
|
2027
|
-
|
|
2067
|
+
treatmentBenefitSchemaBackoffice,
|
|
2028
2068
|
updateDocumentTemplateSchema
|
|
2029
2069
|
});
|
|
@@ -235,6 +235,7 @@ import {
|
|
|
235
235
|
|
|
236
236
|
// src/types/documentation-templates/index.ts
|
|
237
237
|
var DOCUMENTATION_TEMPLATES_COLLECTION = "documentation-templates";
|
|
238
|
+
var FILLED_DOCUMENTS_COLLECTION = "filled-documents";
|
|
238
239
|
var DocumentElementType = /* @__PURE__ */ ((DocumentElementType2) => {
|
|
239
240
|
DocumentElementType2["HEADING"] = "heading";
|
|
240
241
|
DocumentElementType2["PARAGRAPH"] = "paragraph";
|
|
@@ -782,7 +783,7 @@ import {
|
|
|
782
783
|
} from "firebase/firestore";
|
|
783
784
|
|
|
784
785
|
// src/backoffice/services/documentation-template.service.ts
|
|
785
|
-
var
|
|
786
|
+
var DocumentationTemplateServiceBackoffice = class {
|
|
786
787
|
/**
|
|
787
788
|
* Constructor for DocumentationTemplateService
|
|
788
789
|
* @param db - Firestore instance
|
|
@@ -1723,6 +1724,25 @@ var Contraindication = /* @__PURE__ */ ((Contraindication2) => {
|
|
|
1723
1724
|
return Contraindication2;
|
|
1724
1725
|
})(Contraindication || {});
|
|
1725
1726
|
|
|
1727
|
+
// src/backoffice/types/static/pricing.types.ts
|
|
1728
|
+
var PricingMeasure = /* @__PURE__ */ ((PricingMeasure2) => {
|
|
1729
|
+
PricingMeasure2["PER_ML"] = "per_ml";
|
|
1730
|
+
PricingMeasure2["PER_ZONE"] = "per_zone";
|
|
1731
|
+
PricingMeasure2["PER_AREA"] = "per_area";
|
|
1732
|
+
PricingMeasure2["PER_SESSION"] = "per_session";
|
|
1733
|
+
PricingMeasure2["PER_TREATMENT"] = "per_treatment";
|
|
1734
|
+
PricingMeasure2["PER_PACKAGE"] = "per_package";
|
|
1735
|
+
return PricingMeasure2;
|
|
1736
|
+
})(PricingMeasure || {});
|
|
1737
|
+
var Currency = /* @__PURE__ */ ((Currency2) => {
|
|
1738
|
+
Currency2["EUR"] = "EUR";
|
|
1739
|
+
Currency2["USD"] = "USD";
|
|
1740
|
+
Currency2["GBP"] = "GBP";
|
|
1741
|
+
Currency2["CHF"] = "CHF";
|
|
1742
|
+
Currency2["AUD"] = "AUD";
|
|
1743
|
+
return Currency2;
|
|
1744
|
+
})(Currency || {});
|
|
1745
|
+
|
|
1726
1746
|
// src/backoffice/types/static/procedure-family.types.ts
|
|
1727
1747
|
var ProcedureFamily = /* @__PURE__ */ ((ProcedureFamily2) => {
|
|
1728
1748
|
ProcedureFamily2["AESTHETICS"] = "aesthetics";
|
|
@@ -1752,11 +1772,11 @@ var TreatmentBenefit = /* @__PURE__ */ ((TreatmentBenefit2) => {
|
|
|
1752
1772
|
|
|
1753
1773
|
// src/backoffice/validations/schemas.ts
|
|
1754
1774
|
import { z as z2 } from "zod";
|
|
1755
|
-
var
|
|
1756
|
-
var
|
|
1757
|
-
var
|
|
1758
|
-
var
|
|
1759
|
-
var
|
|
1775
|
+
var blockingConditionSchemaBackoffice = z2.nativeEnum(BlockingCondition);
|
|
1776
|
+
var contraindicationSchemaBackoffice = z2.nativeEnum(Contraindication);
|
|
1777
|
+
var treatmentBenefitSchemaBackoffice = z2.nativeEnum(TreatmentBenefit);
|
|
1778
|
+
var procedureFamilySchemaBackoffice = z2.nativeEnum(ProcedureFamily);
|
|
1779
|
+
var timeUnitSchemaBackoffice = z2.nativeEnum(TimeUnit);
|
|
1760
1780
|
var requirementTypeSchema = z2.nativeEnum(RequirementType);
|
|
1761
1781
|
var certificationLevelSchema = z2.nativeEnum(CertificationLevel);
|
|
1762
1782
|
var certificationSpecialtySchema = z2.nativeEnum(
|
|
@@ -1768,7 +1788,7 @@ var certificationRequirementSchema = z2.object({
|
|
|
1768
1788
|
});
|
|
1769
1789
|
var timeframeSchema = z2.object({
|
|
1770
1790
|
duration: z2.number().min(1, "Duration must be positive"),
|
|
1771
|
-
unit:
|
|
1791
|
+
unit: timeUnitSchemaBackoffice,
|
|
1772
1792
|
notifyAt: z2.array(z2.number()).min(1, "At least one notification point is required")
|
|
1773
1793
|
});
|
|
1774
1794
|
var requirementSchema = z2.object({
|
|
@@ -1787,24 +1807,24 @@ var technologySchema = z2.object({
|
|
|
1787
1807
|
name: z2.string().min(1, "Name is required").max(100, "Name is too long"),
|
|
1788
1808
|
description: z2.string().max(1e3, "Description is too long").optional(),
|
|
1789
1809
|
technicalDetails: z2.string().max(2e3, "Technical details are too long").optional(),
|
|
1790
|
-
family:
|
|
1810
|
+
family: procedureFamilySchemaBackoffice,
|
|
1791
1811
|
categoryId: z2.string().min(1, "Category ID is required"),
|
|
1792
1812
|
subcategoryId: z2.string().min(1, "Subcategory ID is required"),
|
|
1793
1813
|
requirements: technologyRequirementsSchema.default({
|
|
1794
1814
|
pre: [],
|
|
1795
1815
|
post: []
|
|
1796
1816
|
}),
|
|
1797
|
-
blockingConditions: z2.array(
|
|
1798
|
-
contraindications: z2.array(
|
|
1817
|
+
blockingConditions: z2.array(blockingConditionSchemaBackoffice),
|
|
1818
|
+
contraindications: z2.array(contraindicationSchemaBackoffice),
|
|
1799
1819
|
documentationTemplates: z2.array(documentTemplateSchema),
|
|
1800
|
-
benefits: z2.array(
|
|
1820
|
+
benefits: z2.array(treatmentBenefitSchemaBackoffice),
|
|
1801
1821
|
certificationRequirement: certificationRequirementSchema,
|
|
1802
1822
|
isActive: z2.boolean().default(true)
|
|
1803
1823
|
});
|
|
1804
1824
|
var categorySchema = z2.object({
|
|
1805
1825
|
name: z2.string().min(1, "Name is required").max(100, "Name is too long"),
|
|
1806
1826
|
description: z2.string().optional(),
|
|
1807
|
-
family:
|
|
1827
|
+
family: procedureFamilySchemaBackoffice,
|
|
1808
1828
|
isActive: z2.boolean().default(true)
|
|
1809
1829
|
});
|
|
1810
1830
|
var subcategorySchema = z2.object({
|
|
@@ -1964,10 +1984,12 @@ var InvalidTreatmentBenefitError = class extends TreatmentBenefitError {
|
|
|
1964
1984
|
}
|
|
1965
1985
|
};
|
|
1966
1986
|
export {
|
|
1987
|
+
BRANDS_COLLECTION,
|
|
1967
1988
|
BackofficeError,
|
|
1968
1989
|
BlockingCondition,
|
|
1969
1990
|
BlockingConditionError,
|
|
1970
1991
|
BrandService,
|
|
1992
|
+
CATEGORIES_COLLECTION,
|
|
1971
1993
|
CategoryError,
|
|
1972
1994
|
CategoryNotFoundError,
|
|
1973
1995
|
CategoryService,
|
|
@@ -1976,10 +1998,13 @@ export {
|
|
|
1976
1998
|
CircularReferenceError,
|
|
1977
1999
|
Contraindication,
|
|
1978
2000
|
ContraindicationError,
|
|
2001
|
+
Currency,
|
|
1979
2002
|
DEFAULT_CERTIFICATION_REQUIREMENT2 as DEFAULT_CERTIFICATION_REQUIREMENT,
|
|
2003
|
+
DOCUMENTATION_TEMPLATES_COLLECTION,
|
|
1980
2004
|
DocumentElementType,
|
|
1981
|
-
|
|
2005
|
+
DocumentationTemplateServiceBackoffice,
|
|
1982
2006
|
DynamicVariable,
|
|
2007
|
+
FILLED_DOCUMENTS_COLLECTION,
|
|
1983
2008
|
HeadingLevel,
|
|
1984
2009
|
InvalidBlockingConditionError,
|
|
1985
2010
|
InvalidCategoryDataError,
|
|
@@ -1991,34 +2016,39 @@ export {
|
|
|
1991
2016
|
InvalidTimeframeError,
|
|
1992
2017
|
InvalidTreatmentBenefitError,
|
|
1993
2018
|
ListType,
|
|
2019
|
+
PRODUCTS_COLLECTION,
|
|
2020
|
+
PricingMeasure,
|
|
1994
2021
|
ProcedureFamily,
|
|
1995
2022
|
ProductService,
|
|
2023
|
+
REQUIREMENTS_COLLECTION,
|
|
1996
2024
|
RelationshipError,
|
|
1997
2025
|
RequirementError,
|
|
1998
2026
|
RequirementNotFoundError,
|
|
1999
2027
|
RequirementService,
|
|
2000
2028
|
RequirementType,
|
|
2029
|
+
SUBCATEGORIES_COLLECTION,
|
|
2001
2030
|
SubcategoryError,
|
|
2002
2031
|
SubcategoryNotFoundError,
|
|
2003
2032
|
SubcategoryService,
|
|
2033
|
+
TECHNOLOGIES_COLLECTION,
|
|
2004
2034
|
TechnologyError,
|
|
2005
2035
|
TechnologyNotFoundError,
|
|
2006
2036
|
TechnologyService,
|
|
2007
2037
|
TimeUnit,
|
|
2008
2038
|
TreatmentBenefit,
|
|
2009
2039
|
TreatmentBenefitError,
|
|
2010
|
-
|
|
2040
|
+
blockingConditionSchemaBackoffice,
|
|
2011
2041
|
categorySchema,
|
|
2012
2042
|
categoryUpdateSchema,
|
|
2013
2043
|
certificationLevelSchema,
|
|
2014
2044
|
certificationRequirementSchema,
|
|
2015
2045
|
certificationSpecialtySchema,
|
|
2016
|
-
|
|
2046
|
+
contraindicationSchemaBackoffice,
|
|
2017
2047
|
createDocumentTemplateSchema,
|
|
2018
2048
|
documentElementSchema,
|
|
2019
2049
|
documentElementWithoutIdSchema,
|
|
2020
2050
|
documentTemplateSchema,
|
|
2021
|
-
|
|
2051
|
+
procedureFamilySchemaBackoffice,
|
|
2022
2052
|
requirementSchema,
|
|
2023
2053
|
requirementTypeSchema,
|
|
2024
2054
|
requirementUpdateSchema,
|
|
@@ -2027,8 +2057,8 @@ export {
|
|
|
2027
2057
|
technologyRequirementsSchema,
|
|
2028
2058
|
technologySchema,
|
|
2029
2059
|
technologyUpdateSchema,
|
|
2030
|
-
|
|
2060
|
+
timeUnitSchemaBackoffice,
|
|
2031
2061
|
timeframeSchema,
|
|
2032
|
-
|
|
2062
|
+
treatmentBenefitSchemaBackoffice,
|
|
2033
2063
|
updateDocumentTemplateSchema
|
|
2034
2064
|
};
|
package/dist/index.js
CHANGED
|
@@ -15954,11 +15954,11 @@ var RequirementType = /* @__PURE__ */ ((RequirementType2) => {
|
|
|
15954
15954
|
})(RequirementType || {});
|
|
15955
15955
|
|
|
15956
15956
|
// src/backoffice/validations/schemas.ts
|
|
15957
|
-
var
|
|
15958
|
-
var
|
|
15959
|
-
var
|
|
15960
|
-
var
|
|
15961
|
-
var
|
|
15957
|
+
var blockingConditionSchemaBackoffice = import_zod29.z.nativeEnum(BlockingCondition);
|
|
15958
|
+
var contraindicationSchemaBackoffice = import_zod29.z.nativeEnum(Contraindication);
|
|
15959
|
+
var treatmentBenefitSchemaBackoffice = import_zod29.z.nativeEnum(TreatmentBenefit);
|
|
15960
|
+
var procedureFamilySchemaBackoffice = import_zod29.z.nativeEnum(ProcedureFamily);
|
|
15961
|
+
var timeUnitSchemaBackoffice = import_zod29.z.nativeEnum(TimeUnit);
|
|
15962
15962
|
var requirementTypeSchema = import_zod29.z.nativeEnum(RequirementType);
|
|
15963
15963
|
var certificationLevelSchema = import_zod29.z.nativeEnum(CertificationLevel);
|
|
15964
15964
|
var certificationSpecialtySchema = import_zod29.z.nativeEnum(
|
|
@@ -15970,7 +15970,7 @@ var certificationRequirementSchema = import_zod29.z.object({
|
|
|
15970
15970
|
});
|
|
15971
15971
|
var timeframeSchema = import_zod29.z.object({
|
|
15972
15972
|
duration: import_zod29.z.number().min(1, "Duration must be positive"),
|
|
15973
|
-
unit:
|
|
15973
|
+
unit: timeUnitSchemaBackoffice,
|
|
15974
15974
|
notifyAt: import_zod29.z.array(import_zod29.z.number()).min(1, "At least one notification point is required")
|
|
15975
15975
|
});
|
|
15976
15976
|
var requirementSchema = import_zod29.z.object({
|
|
@@ -15989,24 +15989,24 @@ var technologySchema = import_zod29.z.object({
|
|
|
15989
15989
|
name: import_zod29.z.string().min(1, "Name is required").max(100, "Name is too long"),
|
|
15990
15990
|
description: import_zod29.z.string().max(1e3, "Description is too long").optional(),
|
|
15991
15991
|
technicalDetails: import_zod29.z.string().max(2e3, "Technical details are too long").optional(),
|
|
15992
|
-
family:
|
|
15992
|
+
family: procedureFamilySchemaBackoffice,
|
|
15993
15993
|
categoryId: import_zod29.z.string().min(1, "Category ID is required"),
|
|
15994
15994
|
subcategoryId: import_zod29.z.string().min(1, "Subcategory ID is required"),
|
|
15995
15995
|
requirements: technologyRequirementsSchema.default({
|
|
15996
15996
|
pre: [],
|
|
15997
15997
|
post: []
|
|
15998
15998
|
}),
|
|
15999
|
-
blockingConditions: import_zod29.z.array(
|
|
16000
|
-
contraindications: import_zod29.z.array(
|
|
15999
|
+
blockingConditions: import_zod29.z.array(blockingConditionSchemaBackoffice),
|
|
16000
|
+
contraindications: import_zod29.z.array(contraindicationSchemaBackoffice),
|
|
16001
16001
|
documentationTemplates: import_zod29.z.array(documentTemplateSchema),
|
|
16002
|
-
benefits: import_zod29.z.array(
|
|
16002
|
+
benefits: import_zod29.z.array(treatmentBenefitSchemaBackoffice),
|
|
16003
16003
|
certificationRequirement: certificationRequirementSchema,
|
|
16004
16004
|
isActive: import_zod29.z.boolean().default(true)
|
|
16005
16005
|
});
|
|
16006
16006
|
var categorySchema = import_zod29.z.object({
|
|
16007
16007
|
name: import_zod29.z.string().min(1, "Name is required").max(100, "Name is too long"),
|
|
16008
16008
|
description: import_zod29.z.string().optional(),
|
|
16009
|
-
family:
|
|
16009
|
+
family: procedureFamilySchemaBackoffice,
|
|
16010
16010
|
isActive: import_zod29.z.boolean().default(true)
|
|
16011
16011
|
});
|
|
16012
16012
|
var subcategorySchema = import_zod29.z.object({
|
|
@@ -16032,7 +16032,7 @@ var patientRequirementInstructionSchema = import_zod30.z.object({
|
|
|
16032
16032
|
actionableWindow: import_zod30.z.number().default(1),
|
|
16033
16033
|
status: patientInstructionStatusSchema,
|
|
16034
16034
|
originalNotifyAtValue: import_zod30.z.number(),
|
|
16035
|
-
originalTimeframeUnit:
|
|
16035
|
+
originalTimeframeUnit: timeUnitSchemaBackoffice,
|
|
16036
16036
|
// Use the correctly imported timeUnitSchema
|
|
16037
16037
|
notificationId: import_zod30.z.string().optional(),
|
|
16038
16038
|
actionTakenAt: import_zod30.z.any().optional().nullable(),
|
package/dist/index.mjs
CHANGED
|
@@ -16075,11 +16075,11 @@ var RequirementType = /* @__PURE__ */ ((RequirementType2) => {
|
|
|
16075
16075
|
})(RequirementType || {});
|
|
16076
16076
|
|
|
16077
16077
|
// src/backoffice/validations/schemas.ts
|
|
16078
|
-
var
|
|
16079
|
-
var
|
|
16080
|
-
var
|
|
16081
|
-
var
|
|
16082
|
-
var
|
|
16078
|
+
var blockingConditionSchemaBackoffice = z29.nativeEnum(BlockingCondition);
|
|
16079
|
+
var contraindicationSchemaBackoffice = z29.nativeEnum(Contraindication);
|
|
16080
|
+
var treatmentBenefitSchemaBackoffice = z29.nativeEnum(TreatmentBenefit);
|
|
16081
|
+
var procedureFamilySchemaBackoffice = z29.nativeEnum(ProcedureFamily);
|
|
16082
|
+
var timeUnitSchemaBackoffice = z29.nativeEnum(TimeUnit);
|
|
16083
16083
|
var requirementTypeSchema = z29.nativeEnum(RequirementType);
|
|
16084
16084
|
var certificationLevelSchema = z29.nativeEnum(CertificationLevel);
|
|
16085
16085
|
var certificationSpecialtySchema = z29.nativeEnum(
|
|
@@ -16091,7 +16091,7 @@ var certificationRequirementSchema = z29.object({
|
|
|
16091
16091
|
});
|
|
16092
16092
|
var timeframeSchema = z29.object({
|
|
16093
16093
|
duration: z29.number().min(1, "Duration must be positive"),
|
|
16094
|
-
unit:
|
|
16094
|
+
unit: timeUnitSchemaBackoffice,
|
|
16095
16095
|
notifyAt: z29.array(z29.number()).min(1, "At least one notification point is required")
|
|
16096
16096
|
});
|
|
16097
16097
|
var requirementSchema = z29.object({
|
|
@@ -16110,24 +16110,24 @@ var technologySchema = z29.object({
|
|
|
16110
16110
|
name: z29.string().min(1, "Name is required").max(100, "Name is too long"),
|
|
16111
16111
|
description: z29.string().max(1e3, "Description is too long").optional(),
|
|
16112
16112
|
technicalDetails: z29.string().max(2e3, "Technical details are too long").optional(),
|
|
16113
|
-
family:
|
|
16113
|
+
family: procedureFamilySchemaBackoffice,
|
|
16114
16114
|
categoryId: z29.string().min(1, "Category ID is required"),
|
|
16115
16115
|
subcategoryId: z29.string().min(1, "Subcategory ID is required"),
|
|
16116
16116
|
requirements: technologyRequirementsSchema.default({
|
|
16117
16117
|
pre: [],
|
|
16118
16118
|
post: []
|
|
16119
16119
|
}),
|
|
16120
|
-
blockingConditions: z29.array(
|
|
16121
|
-
contraindications: z29.array(
|
|
16120
|
+
blockingConditions: z29.array(blockingConditionSchemaBackoffice),
|
|
16121
|
+
contraindications: z29.array(contraindicationSchemaBackoffice),
|
|
16122
16122
|
documentationTemplates: z29.array(documentTemplateSchema),
|
|
16123
|
-
benefits: z29.array(
|
|
16123
|
+
benefits: z29.array(treatmentBenefitSchemaBackoffice),
|
|
16124
16124
|
certificationRequirement: certificationRequirementSchema,
|
|
16125
16125
|
isActive: z29.boolean().default(true)
|
|
16126
16126
|
});
|
|
16127
16127
|
var categorySchema = z29.object({
|
|
16128
16128
|
name: z29.string().min(1, "Name is required").max(100, "Name is too long"),
|
|
16129
16129
|
description: z29.string().optional(),
|
|
16130
|
-
family:
|
|
16130
|
+
family: procedureFamilySchemaBackoffice,
|
|
16131
16131
|
isActive: z29.boolean().default(true)
|
|
16132
16132
|
});
|
|
16133
16133
|
var subcategorySchema = z29.object({
|
|
@@ -16153,7 +16153,7 @@ var patientRequirementInstructionSchema = z30.object({
|
|
|
16153
16153
|
actionableWindow: z30.number().default(1),
|
|
16154
16154
|
status: patientInstructionStatusSchema,
|
|
16155
16155
|
originalNotifyAtValue: z30.number(),
|
|
16156
|
-
originalTimeframeUnit:
|
|
16156
|
+
originalTimeframeUnit: timeUnitSchemaBackoffice,
|
|
16157
16157
|
// Use the correctly imported timeUnitSchema
|
|
16158
16158
|
notificationId: z30.string().optional(),
|
|
16159
16159
|
actionTakenAt: z30.any().optional().nullable(),
|
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
|
/**
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Backoffice Types
|
|
2
|
+
|
|
3
|
+
This directory contains all the type definitions for the backoffice application.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
The types are organized into two main categories:
|
|
8
|
+
|
|
9
|
+
- **Root-level types**: These are the primary types used across the application, such as `Brand`, `Category`, `Product`, etc.
|
|
10
|
+
- **`static/`**: This subdirectory contains static types that are not expected to change often. See the `README.md` in that directory for more details.
|
|
11
|
+
|
|
12
|
+
All types are exported from the `index.ts` file in this directory for easy importing.
|
|
@@ -1,33 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
TimeFrame,
|
|
10
|
-
} from "./requirement.types";
|
|
11
|
-
export { Subcategory } from "./subcategory.types";
|
|
12
|
-
export { Technology, TechnologyRequirements } from "./technology.types";
|
|
13
|
-
export { BlockingCondition } from "./static/blocking-condition.types";
|
|
14
|
-
export {
|
|
15
|
-
CertificationRequirement,
|
|
16
|
-
CertificationLevel,
|
|
17
|
-
CertificationSpecialty,
|
|
18
|
-
} from "./static/certification.types";
|
|
19
|
-
export { Contraindication } from "./static/contraindication.types";
|
|
20
|
-
export { ProcedureFamily } from "./static/procedure-family.types";
|
|
21
|
-
export { TreatmentBenefit } from "./static/treatment-benefit.types";
|
|
22
|
-
|
|
23
|
-
// Documentation Templates
|
|
24
|
-
export {
|
|
25
|
-
DocumentTemplate,
|
|
26
|
-
CreateDocumentTemplateData,
|
|
27
|
-
UpdateDocumentTemplateData,
|
|
28
|
-
DocumentElement,
|
|
29
|
-
DocumentElementType,
|
|
30
|
-
HeadingLevel,
|
|
31
|
-
ListType,
|
|
32
|
-
DynamicVariable,
|
|
33
|
-
} from "./documentation-templates.types";
|
|
1
|
+
export * from "./brand.types";
|
|
2
|
+
export * from "./category.types";
|
|
3
|
+
export * from "./documentation-templates.types";
|
|
4
|
+
export * from "./product.types";
|
|
5
|
+
export * from "./requirement.types";
|
|
6
|
+
export * from "./subcategory.types";
|
|
7
|
+
export * from "./technology.types";
|
|
8
|
+
export * from "./static";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Static Types
|
|
2
|
+
|
|
3
|
+
This directory contains all static type definitions used throughout the backoffice application. These types are considered "static" because they represent data that is generally fixed and does not change frequently.
|
|
4
|
+
|
|
5
|
+
## Available Types
|
|
6
|
+
|
|
7
|
+
The following static types are available for import:
|
|
8
|
+
|
|
9
|
+
- `BlockingCondition`: Defines conditions that may prevent a procedure.
|
|
10
|
+
- `Certification`: Represents professional certifications.
|
|
11
|
+
- `Contraindication`: Specifies conditions or factors that serve as a reason to withhold a certain medical treatment.
|
|
12
|
+
- `Pricing`: Defines the structure for pricing information.
|
|
13
|
+
- `ProcedureFamily`: Groups related medical procedures.
|
|
14
|
+
- `TreatmentBenefit`: Describes the benefits of a treatment.
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
All types in this directory are exported from the main `index.ts` file. You can import them directly from this module.
|
|
@@ -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
|
|
|
@@ -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
|