@blackcode_sa/metaestetics-api 1.8.2 → 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.
@@ -400,7 +400,7 @@ interface UpdateDocumentTemplateData {
400
400
  /**
401
401
  * Service for managing documentation templates in the backoffice
402
402
  */
403
- declare class DocumentationTemplateService {
403
+ declare class DocumentationTemplateServiceBackoffice {
404
404
  private apiService;
405
405
  /**
406
406
  * Constructor for DocumentationTemplateService
@@ -3243,11 +3243,11 @@ declare const documentTemplateSchema: z.ZodObject<{
3243
3243
  /**
3244
3244
  * Base validation schemas for enums
3245
3245
  */
3246
- declare const blockingConditionSchema: z.ZodNativeEnum<typeof BlockingCondition>;
3247
- declare const contraindicationSchema: z.ZodNativeEnum<typeof Contraindication>;
3248
- declare const treatmentBenefitSchema: z.ZodNativeEnum<typeof TreatmentBenefit>;
3249
- declare const procedureFamilySchema: z.ZodNativeEnum<typeof ProcedureFamily>;
3250
- declare const timeUnitSchema: z.ZodNativeEnum<typeof TimeUnit>;
3246
+ declare const blockingConditionSchemaBackoffice: z.ZodNativeEnum<typeof BlockingCondition>;
3247
+ declare const contraindicationSchemaBackoffice: z.ZodNativeEnum<typeof Contraindication>;
3248
+ declare const treatmentBenefitSchemaBackoffice: z.ZodNativeEnum<typeof TreatmentBenefit>;
3249
+ declare const procedureFamilySchemaBackoffice: z.ZodNativeEnum<typeof ProcedureFamily>;
3250
+ declare const timeUnitSchemaBackoffice: z.ZodNativeEnum<typeof TimeUnit>;
3251
3251
  declare const requirementTypeSchema: z.ZodNativeEnum<typeof RequirementType>;
3252
3252
  declare const certificationLevelSchema: z.ZodNativeEnum<typeof CertificationLevel>;
3253
3253
  declare const certificationSpecialtySchema: z.ZodNativeEnum<typeof CertificationSpecialty>;
@@ -5503,4 +5503,4 @@ declare class InvalidTreatmentBenefitError extends TreatmentBenefitError {
5503
5503
  constructor(benefit: string);
5504
5504
  }
5505
5505
 
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, DocumentationTemplateService, DynamicVariable, HeadingLevel, InvalidBlockingConditionError, InvalidCategoryDataError, InvalidContraindicationError, InvalidHierarchyError, InvalidRequirementDataError, InvalidSubcategoryDataError, InvalidTechnologyDataError, InvalidTimeframeError, InvalidTreatmentBenefitError, ListType, ProcedureFamily, type Product, ProductService, RelationshipError, type Requirement, RequirementError, type RequirementImportance, RequirementNotFoundError, RequirementService, RequirementType, type Subcategory, SubcategoryError, SubcategoryNotFoundError, SubcategoryService, type Technology, TechnologyError, TechnologyNotFoundError, type TechnologyRequirements, TechnologyService, type TimeFrame, TimeUnit, TreatmentBenefit, TreatmentBenefitError, type UpdateDocumentTemplateData, blockingConditionSchema, categorySchema, categoryUpdateSchema, certificationLevelSchema, certificationRequirementSchema, certificationSpecialtySchema, contraindicationSchema, createDocumentTemplateSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, procedureFamilySchema, requirementSchema, requirementTypeSchema, requirementUpdateSchema, subcategorySchema, subcategoryUpdateSchema, technologyRequirementsSchema, technologySchema, technologyUpdateSchema, timeUnitSchema, timeframeSchema, treatmentBenefitSchema, updateDocumentTemplateSchema };
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, DocumentationTemplateServiceBackoffice, DynamicVariable, HeadingLevel, InvalidBlockingConditionError, InvalidCategoryDataError, InvalidContraindicationError, InvalidHierarchyError, InvalidRequirementDataError, InvalidSubcategoryDataError, InvalidTechnologyDataError, InvalidTimeframeError, InvalidTreatmentBenefitError, ListType, ProcedureFamily, type Product, ProductService, RelationshipError, type Requirement, RequirementError, type RequirementImportance, RequirementNotFoundError, RequirementService, RequirementType, type Subcategory, SubcategoryError, SubcategoryNotFoundError, SubcategoryService, type Technology, 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 };
@@ -400,7 +400,7 @@ interface UpdateDocumentTemplateData {
400
400
  /**
401
401
  * Service for managing documentation templates in the backoffice
402
402
  */
403
- declare class DocumentationTemplateService {
403
+ declare class DocumentationTemplateServiceBackoffice {
404
404
  private apiService;
405
405
  /**
406
406
  * Constructor for DocumentationTemplateService
@@ -3243,11 +3243,11 @@ declare const documentTemplateSchema: z.ZodObject<{
3243
3243
  /**
3244
3244
  * Base validation schemas for enums
3245
3245
  */
3246
- declare const blockingConditionSchema: z.ZodNativeEnum<typeof BlockingCondition>;
3247
- declare const contraindicationSchema: z.ZodNativeEnum<typeof Contraindication>;
3248
- declare const treatmentBenefitSchema: z.ZodNativeEnum<typeof TreatmentBenefit>;
3249
- declare const procedureFamilySchema: z.ZodNativeEnum<typeof ProcedureFamily>;
3250
- declare const timeUnitSchema: z.ZodNativeEnum<typeof TimeUnit>;
3246
+ declare const blockingConditionSchemaBackoffice: z.ZodNativeEnum<typeof BlockingCondition>;
3247
+ declare const contraindicationSchemaBackoffice: z.ZodNativeEnum<typeof Contraindication>;
3248
+ declare const treatmentBenefitSchemaBackoffice: z.ZodNativeEnum<typeof TreatmentBenefit>;
3249
+ declare const procedureFamilySchemaBackoffice: z.ZodNativeEnum<typeof ProcedureFamily>;
3250
+ declare const timeUnitSchemaBackoffice: z.ZodNativeEnum<typeof TimeUnit>;
3251
3251
  declare const requirementTypeSchema: z.ZodNativeEnum<typeof RequirementType>;
3252
3252
  declare const certificationLevelSchema: z.ZodNativeEnum<typeof CertificationLevel>;
3253
3253
  declare const certificationSpecialtySchema: z.ZodNativeEnum<typeof CertificationSpecialty>;
@@ -5503,4 +5503,4 @@ declare class InvalidTreatmentBenefitError extends TreatmentBenefitError {
5503
5503
  constructor(benefit: string);
5504
5504
  }
5505
5505
 
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, DocumentationTemplateService, DynamicVariable, HeadingLevel, InvalidBlockingConditionError, InvalidCategoryDataError, InvalidContraindicationError, InvalidHierarchyError, InvalidRequirementDataError, InvalidSubcategoryDataError, InvalidTechnologyDataError, InvalidTimeframeError, InvalidTreatmentBenefitError, ListType, ProcedureFamily, type Product, ProductService, RelationshipError, type Requirement, RequirementError, type RequirementImportance, RequirementNotFoundError, RequirementService, RequirementType, type Subcategory, SubcategoryError, SubcategoryNotFoundError, SubcategoryService, type Technology, TechnologyError, TechnologyNotFoundError, type TechnologyRequirements, TechnologyService, type TimeFrame, TimeUnit, TreatmentBenefit, TreatmentBenefitError, type UpdateDocumentTemplateData, blockingConditionSchema, categorySchema, categoryUpdateSchema, certificationLevelSchema, certificationRequirementSchema, certificationSpecialtySchema, contraindicationSchema, createDocumentTemplateSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, procedureFamilySchema, requirementSchema, requirementTypeSchema, requirementUpdateSchema, subcategorySchema, subcategoryUpdateSchema, technologyRequirementsSchema, technologySchema, technologyUpdateSchema, timeUnitSchema, timeframeSchema, treatmentBenefitSchema, updateDocumentTemplateSchema };
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, DocumentationTemplateServiceBackoffice, DynamicVariable, HeadingLevel, InvalidBlockingConditionError, InvalidCategoryDataError, InvalidContraindicationError, InvalidHierarchyError, InvalidRequirementDataError, InvalidSubcategoryDataError, InvalidTechnologyDataError, InvalidTimeframeError, InvalidTreatmentBenefitError, ListType, ProcedureFamily, type Product, ProductService, RelationshipError, type Requirement, RequirementError, type RequirementImportance, RequirementNotFoundError, RequirementService, RequirementType, type Subcategory, SubcategoryError, SubcategoryNotFoundError, SubcategoryService, type Technology, 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 };
@@ -34,7 +34,7 @@ __export(index_exports, {
34
34
  ContraindicationError: () => ContraindicationError,
35
35
  DEFAULT_CERTIFICATION_REQUIREMENT: () => DEFAULT_CERTIFICATION_REQUIREMENT2,
36
36
  DocumentElementType: () => DocumentElementType,
37
- DocumentationTemplateService: () => DocumentationTemplateService2,
37
+ DocumentationTemplateServiceBackoffice: () => DocumentationTemplateServiceBackoffice,
38
38
  DynamicVariable: () => DynamicVariable,
39
39
  HeadingLevel: () => HeadingLevel,
40
40
  InvalidBlockingConditionError: () => InvalidBlockingConditionError,
@@ -63,18 +63,18 @@ __export(index_exports, {
63
63
  TimeUnit: () => TimeUnit,
64
64
  TreatmentBenefit: () => TreatmentBenefit,
65
65
  TreatmentBenefitError: () => TreatmentBenefitError,
66
- blockingConditionSchema: () => blockingConditionSchema,
66
+ blockingConditionSchemaBackoffice: () => blockingConditionSchemaBackoffice,
67
67
  categorySchema: () => categorySchema,
68
68
  categoryUpdateSchema: () => categoryUpdateSchema,
69
69
  certificationLevelSchema: () => certificationLevelSchema,
70
70
  certificationRequirementSchema: () => certificationRequirementSchema,
71
71
  certificationSpecialtySchema: () => certificationSpecialtySchema,
72
- contraindicationSchema: () => contraindicationSchema,
72
+ contraindicationSchemaBackoffice: () => contraindicationSchemaBackoffice,
73
73
  createDocumentTemplateSchema: () => createDocumentTemplateSchema,
74
74
  documentElementSchema: () => documentElementSchema,
75
75
  documentElementWithoutIdSchema: () => documentElementWithoutIdSchema,
76
76
  documentTemplateSchema: () => documentTemplateSchema,
77
- procedureFamilySchema: () => procedureFamilySchema,
77
+ procedureFamilySchemaBackoffice: () => procedureFamilySchemaBackoffice,
78
78
  requirementSchema: () => requirementSchema,
79
79
  requirementTypeSchema: () => requirementTypeSchema,
80
80
  requirementUpdateSchema: () => requirementUpdateSchema,
@@ -83,9 +83,9 @@ __export(index_exports, {
83
83
  technologyRequirementsSchema: () => technologyRequirementsSchema,
84
84
  technologySchema: () => technologySchema,
85
85
  technologyUpdateSchema: () => technologyUpdateSchema,
86
- timeUnitSchema: () => timeUnitSchema,
86
+ timeUnitSchemaBackoffice: () => timeUnitSchemaBackoffice,
87
87
  timeframeSchema: () => timeframeSchema,
88
- treatmentBenefitSchema: () => treatmentBenefitSchema,
88
+ treatmentBenefitSchemaBackoffice: () => treatmentBenefitSchemaBackoffice,
89
89
  updateDocumentTemplateSchema: () => updateDocumentTemplateSchema
90
90
  });
91
91
  module.exports = __toCommonJS(index_exports);
@@ -814,7 +814,7 @@ var import_storage2 = require("firebase/storage");
814
814
  var import_firestore5 = require("firebase/firestore");
815
815
 
816
816
  // src/backoffice/services/documentation-template.service.ts
817
- var DocumentationTemplateService2 = class {
817
+ var DocumentationTemplateServiceBackoffice = class {
818
818
  /**
819
819
  * Constructor for DocumentationTemplateService
820
820
  * @param db - Firestore instance
@@ -1746,11 +1746,11 @@ var TreatmentBenefit = /* @__PURE__ */ ((TreatmentBenefit2) => {
1746
1746
 
1747
1747
  // src/backoffice/validations/schemas.ts
1748
1748
  var import_zod2 = require("zod");
1749
- var blockingConditionSchema = import_zod2.z.nativeEnum(BlockingCondition);
1750
- var contraindicationSchema = import_zod2.z.nativeEnum(Contraindication);
1751
- var treatmentBenefitSchema = import_zod2.z.nativeEnum(TreatmentBenefit);
1752
- var procedureFamilySchema = import_zod2.z.nativeEnum(ProcedureFamily);
1753
- var timeUnitSchema = import_zod2.z.nativeEnum(TimeUnit);
1749
+ var blockingConditionSchemaBackoffice = import_zod2.z.nativeEnum(BlockingCondition);
1750
+ var contraindicationSchemaBackoffice = import_zod2.z.nativeEnum(Contraindication);
1751
+ var treatmentBenefitSchemaBackoffice = import_zod2.z.nativeEnum(TreatmentBenefit);
1752
+ var procedureFamilySchemaBackoffice = import_zod2.z.nativeEnum(ProcedureFamily);
1753
+ var timeUnitSchemaBackoffice = import_zod2.z.nativeEnum(TimeUnit);
1754
1754
  var requirementTypeSchema = import_zod2.z.nativeEnum(RequirementType);
1755
1755
  var certificationLevelSchema = import_zod2.z.nativeEnum(CertificationLevel);
1756
1756
  var certificationSpecialtySchema = import_zod2.z.nativeEnum(
@@ -1762,7 +1762,7 @@ var certificationRequirementSchema = import_zod2.z.object({
1762
1762
  });
1763
1763
  var timeframeSchema = import_zod2.z.object({
1764
1764
  duration: import_zod2.z.number().min(1, "Duration must be positive"),
1765
- unit: timeUnitSchema,
1765
+ unit: timeUnitSchemaBackoffice,
1766
1766
  notifyAt: import_zod2.z.array(import_zod2.z.number()).min(1, "At least one notification point is required")
1767
1767
  });
1768
1768
  var requirementSchema = import_zod2.z.object({
@@ -1781,24 +1781,24 @@ var technologySchema = import_zod2.z.object({
1781
1781
  name: import_zod2.z.string().min(1, "Name is required").max(100, "Name is too long"),
1782
1782
  description: import_zod2.z.string().max(1e3, "Description is too long").optional(),
1783
1783
  technicalDetails: import_zod2.z.string().max(2e3, "Technical details are too long").optional(),
1784
- family: procedureFamilySchema,
1784
+ family: procedureFamilySchemaBackoffice,
1785
1785
  categoryId: import_zod2.z.string().min(1, "Category ID is required"),
1786
1786
  subcategoryId: import_zod2.z.string().min(1, "Subcategory ID is required"),
1787
1787
  requirements: technologyRequirementsSchema.default({
1788
1788
  pre: [],
1789
1789
  post: []
1790
1790
  }),
1791
- blockingConditions: import_zod2.z.array(blockingConditionSchema),
1792
- contraindications: import_zod2.z.array(contraindicationSchema),
1791
+ blockingConditions: import_zod2.z.array(blockingConditionSchemaBackoffice),
1792
+ contraindications: import_zod2.z.array(contraindicationSchemaBackoffice),
1793
1793
  documentationTemplates: import_zod2.z.array(documentTemplateSchema),
1794
- benefits: import_zod2.z.array(treatmentBenefitSchema),
1794
+ benefits: import_zod2.z.array(treatmentBenefitSchemaBackoffice),
1795
1795
  certificationRequirement: certificationRequirementSchema,
1796
1796
  isActive: import_zod2.z.boolean().default(true)
1797
1797
  });
1798
1798
  var categorySchema = import_zod2.z.object({
1799
1799
  name: import_zod2.z.string().min(1, "Name is required").max(100, "Name is too long"),
1800
1800
  description: import_zod2.z.string().optional(),
1801
- family: procedureFamilySchema,
1801
+ family: procedureFamilySchemaBackoffice,
1802
1802
  isActive: import_zod2.z.boolean().default(true)
1803
1803
  });
1804
1804
  var subcategorySchema = import_zod2.z.object({
@@ -1973,7 +1973,7 @@ var InvalidTreatmentBenefitError = class extends TreatmentBenefitError {
1973
1973
  ContraindicationError,
1974
1974
  DEFAULT_CERTIFICATION_REQUIREMENT,
1975
1975
  DocumentElementType,
1976
- DocumentationTemplateService,
1976
+ DocumentationTemplateServiceBackoffice,
1977
1977
  DynamicVariable,
1978
1978
  HeadingLevel,
1979
1979
  InvalidBlockingConditionError,
@@ -2002,18 +2002,18 @@ var InvalidTreatmentBenefitError = class extends TreatmentBenefitError {
2002
2002
  TimeUnit,
2003
2003
  TreatmentBenefit,
2004
2004
  TreatmentBenefitError,
2005
- blockingConditionSchema,
2005
+ blockingConditionSchemaBackoffice,
2006
2006
  categorySchema,
2007
2007
  categoryUpdateSchema,
2008
2008
  certificationLevelSchema,
2009
2009
  certificationRequirementSchema,
2010
2010
  certificationSpecialtySchema,
2011
- contraindicationSchema,
2011
+ contraindicationSchemaBackoffice,
2012
2012
  createDocumentTemplateSchema,
2013
2013
  documentElementSchema,
2014
2014
  documentElementWithoutIdSchema,
2015
2015
  documentTemplateSchema,
2016
- procedureFamilySchema,
2016
+ procedureFamilySchemaBackoffice,
2017
2017
  requirementSchema,
2018
2018
  requirementTypeSchema,
2019
2019
  requirementUpdateSchema,
@@ -2022,8 +2022,8 @@ var InvalidTreatmentBenefitError = class extends TreatmentBenefitError {
2022
2022
  technologyRequirementsSchema,
2023
2023
  technologySchema,
2024
2024
  technologyUpdateSchema,
2025
- timeUnitSchema,
2025
+ timeUnitSchemaBackoffice,
2026
2026
  timeframeSchema,
2027
- treatmentBenefitSchema,
2027
+ treatmentBenefitSchemaBackoffice,
2028
2028
  updateDocumentTemplateSchema
2029
2029
  });
@@ -782,7 +782,7 @@ import {
782
782
  } from "firebase/firestore";
783
783
 
784
784
  // src/backoffice/services/documentation-template.service.ts
785
- var DocumentationTemplateService2 = class {
785
+ var DocumentationTemplateServiceBackoffice = class {
786
786
  /**
787
787
  * Constructor for DocumentationTemplateService
788
788
  * @param db - Firestore instance
@@ -1752,11 +1752,11 @@ var TreatmentBenefit = /* @__PURE__ */ ((TreatmentBenefit2) => {
1752
1752
 
1753
1753
  // src/backoffice/validations/schemas.ts
1754
1754
  import { z as z2 } from "zod";
1755
- var blockingConditionSchema = z2.nativeEnum(BlockingCondition);
1756
- var contraindicationSchema = z2.nativeEnum(Contraindication);
1757
- var treatmentBenefitSchema = z2.nativeEnum(TreatmentBenefit);
1758
- var procedureFamilySchema = z2.nativeEnum(ProcedureFamily);
1759
- var timeUnitSchema = z2.nativeEnum(TimeUnit);
1755
+ var blockingConditionSchemaBackoffice = z2.nativeEnum(BlockingCondition);
1756
+ var contraindicationSchemaBackoffice = z2.nativeEnum(Contraindication);
1757
+ var treatmentBenefitSchemaBackoffice = z2.nativeEnum(TreatmentBenefit);
1758
+ var procedureFamilySchemaBackoffice = z2.nativeEnum(ProcedureFamily);
1759
+ var timeUnitSchemaBackoffice = z2.nativeEnum(TimeUnit);
1760
1760
  var requirementTypeSchema = z2.nativeEnum(RequirementType);
1761
1761
  var certificationLevelSchema = z2.nativeEnum(CertificationLevel);
1762
1762
  var certificationSpecialtySchema = z2.nativeEnum(
@@ -1768,7 +1768,7 @@ var certificationRequirementSchema = z2.object({
1768
1768
  });
1769
1769
  var timeframeSchema = z2.object({
1770
1770
  duration: z2.number().min(1, "Duration must be positive"),
1771
- unit: timeUnitSchema,
1771
+ unit: timeUnitSchemaBackoffice,
1772
1772
  notifyAt: z2.array(z2.number()).min(1, "At least one notification point is required")
1773
1773
  });
1774
1774
  var requirementSchema = z2.object({
@@ -1787,24 +1787,24 @@ var technologySchema = z2.object({
1787
1787
  name: z2.string().min(1, "Name is required").max(100, "Name is too long"),
1788
1788
  description: z2.string().max(1e3, "Description is too long").optional(),
1789
1789
  technicalDetails: z2.string().max(2e3, "Technical details are too long").optional(),
1790
- family: procedureFamilySchema,
1790
+ family: procedureFamilySchemaBackoffice,
1791
1791
  categoryId: z2.string().min(1, "Category ID is required"),
1792
1792
  subcategoryId: z2.string().min(1, "Subcategory ID is required"),
1793
1793
  requirements: technologyRequirementsSchema.default({
1794
1794
  pre: [],
1795
1795
  post: []
1796
1796
  }),
1797
- blockingConditions: z2.array(blockingConditionSchema),
1798
- contraindications: z2.array(contraindicationSchema),
1797
+ blockingConditions: z2.array(blockingConditionSchemaBackoffice),
1798
+ contraindications: z2.array(contraindicationSchemaBackoffice),
1799
1799
  documentationTemplates: z2.array(documentTemplateSchema),
1800
- benefits: z2.array(treatmentBenefitSchema),
1800
+ benefits: z2.array(treatmentBenefitSchemaBackoffice),
1801
1801
  certificationRequirement: certificationRequirementSchema,
1802
1802
  isActive: z2.boolean().default(true)
1803
1803
  });
1804
1804
  var categorySchema = z2.object({
1805
1805
  name: z2.string().min(1, "Name is required").max(100, "Name is too long"),
1806
1806
  description: z2.string().optional(),
1807
- family: procedureFamilySchema,
1807
+ family: procedureFamilySchemaBackoffice,
1808
1808
  isActive: z2.boolean().default(true)
1809
1809
  });
1810
1810
  var subcategorySchema = z2.object({
@@ -1978,7 +1978,7 @@ export {
1978
1978
  ContraindicationError,
1979
1979
  DEFAULT_CERTIFICATION_REQUIREMENT2 as DEFAULT_CERTIFICATION_REQUIREMENT,
1980
1980
  DocumentElementType,
1981
- DocumentationTemplateService2 as DocumentationTemplateService,
1981
+ DocumentationTemplateServiceBackoffice,
1982
1982
  DynamicVariable,
1983
1983
  HeadingLevel,
1984
1984
  InvalidBlockingConditionError,
@@ -2007,18 +2007,18 @@ export {
2007
2007
  TimeUnit,
2008
2008
  TreatmentBenefit,
2009
2009
  TreatmentBenefitError,
2010
- blockingConditionSchema,
2010
+ blockingConditionSchemaBackoffice,
2011
2011
  categorySchema,
2012
2012
  categoryUpdateSchema,
2013
2013
  certificationLevelSchema,
2014
2014
  certificationRequirementSchema,
2015
2015
  certificationSpecialtySchema,
2016
- contraindicationSchema,
2016
+ contraindicationSchemaBackoffice,
2017
2017
  createDocumentTemplateSchema,
2018
2018
  documentElementSchema,
2019
2019
  documentElementWithoutIdSchema,
2020
2020
  documentTemplateSchema,
2021
- procedureFamilySchema,
2021
+ procedureFamilySchemaBackoffice,
2022
2022
  requirementSchema,
2023
2023
  requirementTypeSchema,
2024
2024
  requirementUpdateSchema,
@@ -2027,8 +2027,8 @@ export {
2027
2027
  technologyRequirementsSchema,
2028
2028
  technologySchema,
2029
2029
  technologyUpdateSchema,
2030
- timeUnitSchema,
2030
+ timeUnitSchemaBackoffice,
2031
2031
  timeframeSchema,
2032
- treatmentBenefitSchema,
2032
+ treatmentBenefitSchemaBackoffice,
2033
2033
  updateDocumentTemplateSchema
2034
2034
  };
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 blockingConditionSchema2 = import_zod29.z.nativeEnum(BlockingCondition);
15958
- var contraindicationSchema2 = import_zod29.z.nativeEnum(Contraindication);
15959
- var treatmentBenefitSchema = import_zod29.z.nativeEnum(TreatmentBenefit);
15960
- var procedureFamilySchema = import_zod29.z.nativeEnum(ProcedureFamily);
15961
- var timeUnitSchema = import_zod29.z.nativeEnum(TimeUnit);
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: timeUnitSchema,
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: procedureFamilySchema,
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(blockingConditionSchema2),
16000
- contraindications: import_zod29.z.array(contraindicationSchema2),
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(treatmentBenefitSchema),
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: procedureFamilySchema,
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: timeUnitSchema,
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 blockingConditionSchema2 = z29.nativeEnum(BlockingCondition);
16079
- var contraindicationSchema2 = z29.nativeEnum(Contraindication);
16080
- var treatmentBenefitSchema = z29.nativeEnum(TreatmentBenefit);
16081
- var procedureFamilySchema = z29.nativeEnum(ProcedureFamily);
16082
- var timeUnitSchema = z29.nativeEnum(TimeUnit);
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: timeUnitSchema,
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: procedureFamilySchema,
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(blockingConditionSchema2),
16121
- contraindications: z29.array(contraindicationSchema2),
16120
+ blockingConditions: z29.array(blockingConditionSchemaBackoffice),
16121
+ contraindications: z29.array(contraindicationSchemaBackoffice),
16122
16122
  documentationTemplates: z29.array(documentTemplateSchema),
16123
- benefits: z29.array(treatmentBenefitSchema),
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: procedureFamilySchema,
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: timeUnitSchema,
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@blackcode_sa/metaestetics-api",
3
3
  "private": false,
4
- "version": "1.8.2",
4
+ "version": "1.8.3",
5
5
  "description": "Firebase authentication service with anonymous upgrade support",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.mjs",
@@ -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 DocumentationTemplateService {
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 blockingConditionSchema = z.nativeEnum(BlockingCondition);
22
- export const contraindicationSchema = z.nativeEnum(Contraindication);
23
- export const treatmentBenefitSchema = z.nativeEnum(TreatmentBenefit);
24
- export const procedureFamilySchema = z.nativeEnum(ProcedureFamily);
25
- export const timeUnitSchema = z.nativeEnum(TimeUnit);
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: timeUnitSchema,
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: procedureFamilySchema,
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(blockingConditionSchema),
92
- contraindications: z.array(contraindicationSchema),
92
+ blockingConditions: z.array(blockingConditionSchemaBackoffice),
93
+ contraindications: z.array(contraindicationSchemaBackoffice),
93
94
  documentationTemplates: z.array(documentTemplateSchema),
94
- benefits: z.array(treatmentBenefitSchema),
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: procedureFamilySchema,
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
- timeUnitSchema, // Corrected import name to lowercase 'u'
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: timeUnitSchema, // Use the correctly imported timeUnitSchema
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