@carbonbox/domain 0.6.2 → 0.6.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.
Files changed (186) hide show
  1. package/build/carbonbox/shared/domain/exceptions/InvalidAggregateIdFormatError.js +1 -1
  2. package/build/types/carbonbox/shared/domain/exceptions/InvalidAggregateIdFormatError.d.ts.map +1 -1
  3. package/package.json +1 -1
  4. package/build/carbonbox/purchase-management-system/service-catalog/domain/entity/IService.js +0 -2
  5. package/build/carbonbox/purchase-management-system/service-catalog/domain/entity/Service.js +0 -263
  6. package/build/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCategory.js +0 -20
  7. package/build/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceStatus.js +0 -9
  8. package/build/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceType.js +0 -10
  9. package/build/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCategoryError.js +0 -19
  10. package/build/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceStatusError.js +0 -19
  11. package/build/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceTypeError.js +0 -19
  12. package/build/carbonbox/purchase-management-system/service-catalog/domain/repository/IServiceRepository.js +0 -2
  13. package/build/carbonbox/purchase-management-system/service-catalog/domain/types/ServicePrimitives.js +0 -2
  14. package/build/carbonbox/purchase-management-system/service-catalog/domain/types/ServiceProps.js +0 -2
  15. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAdditionalUserRoles.js +0 -131
  16. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsDocumentReading.js +0 -22
  17. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsSectoralComparison.js +0 -22
  18. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceBasePricePercentage.js +0 -140
  19. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCategory.js +0 -243
  20. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCode.js +0 -24
  21. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCreatedByStakeholder.js +0 -26
  22. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDependsOnServiceCode.js +0 -21
  23. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDescription.js +0 -23
  24. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceExpertDedicationLevel.js +0 -212
  25. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceFixedPriceAmount.js +0 -193
  26. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasBasePrice.js +0 -22
  27. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasFixedPrice.js +0 -22
  28. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceId.js +0 -24
  29. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesCarbonBoxAcademy.js +0 -22
  30. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesESGIndicators.js +0 -22
  31. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForCorporate.js +0 -22
  32. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForEvent.js +0 -22
  33. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForProduct.js +0 -22
  34. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsRequiredService.js +0 -22
  35. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceMaxUsers.js +0 -246
  36. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceName.js +0 -23
  37. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceReportTypes.js +0 -246
  38. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceStatus.js +0 -221
  39. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceType.js +0 -235
  40. package/build/carbonbox/shared/domain/exceptions/InvalidSemanticUuidError.js +0 -19
  41. package/build/carbonbox/shared/domain/services/DateTimeFormattingDomainService.js +0 -172
  42. package/build/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.js +0 -2
  43. package/build/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.js +0 -235
  44. package/build/carbonbox/shared/domain/types/AllPermissions.js +0 -2
  45. package/build/carbonbox/shared/domain/types/AllPermissionsPrimitives.js +0 -2
  46. package/build/carbonbox/shared/domain/types/ServiceReference.js +0 -2
  47. package/build/carbonbox/shared/domain/types/ServiceReferencePrimitives.js +0 -2
  48. package/build/carbonbox/shared/domain/types/UserEmailProps.js +0 -2
  49. package/build/carbonbox/shared/domain/value-objects/ServiceReference.js +0 -301
  50. package/build/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissions.js +0 -2
  51. package/build/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsPrimitives.js +0 -2
  52. package/build/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsValue.js +0 -2
  53. package/build/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissions.js +0 -2
  54. package/build/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsPrimitives.js +0 -2
  55. package/build/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsValue.js +0 -2
  56. package/build/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissions.js +0 -2
  57. package/build/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsPrimitives.js +0 -2
  58. package/build/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsValue.js +0 -2
  59. package/build/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissions.js +0 -2
  60. package/build/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsPrimitives.js +0 -2
  61. package/build/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsValue.js +0 -2
  62. package/build/carbonbox/stakeholders/shared/domain/enums/StakeholderBusinessStatus.js +0 -10
  63. package/build/carbonbox/stakeholders/shared/domain/exceptions/InvalidStakeholderBusinessStatusError.js +0 -18
  64. package/build/carbonbox/stakeholders/shared/domain/types/StakeholderPermissions.js +0 -2
  65. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/entity/IService.d.ts +0 -52
  66. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/entity/IService.d.ts.map +0 -1
  67. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/entity/Service.d.ts +0 -60
  68. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/entity/Service.d.ts.map +0 -1
  69. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCategory.d.ts +0 -17
  70. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCategory.d.ts.map +0 -1
  71. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceStatus.d.ts +0 -6
  72. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceStatus.d.ts.map +0 -1
  73. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceType.d.ts +0 -7
  74. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceType.d.ts.map +0 -1
  75. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCategoryError.d.ts +0 -8
  76. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCategoryError.d.ts.map +0 -1
  77. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceStatusError.d.ts +0 -8
  78. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceStatusError.d.ts.map +0 -1
  79. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceTypeError.d.ts +0 -8
  80. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceTypeError.d.ts.map +0 -1
  81. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/repository/IServiceRepository.d.ts +0 -22
  82. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/repository/IServiceRepository.d.ts.map +0 -1
  83. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/types/ServicePrimitives.d.ts +0 -35
  84. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/types/ServicePrimitives.d.ts.map +0 -1
  85. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/types/ServiceProps.d.ts +0 -35
  86. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/types/ServiceProps.d.ts.map +0 -1
  87. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAdditionalUserRoles.d.ts +0 -71
  88. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAdditionalUserRoles.d.ts.map +0 -1
  89. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsDocumentReading.d.ts +0 -9
  90. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsDocumentReading.d.ts.map +0 -1
  91. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsSectoralComparison.d.ts +0 -9
  92. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsSectoralComparison.d.ts.map +0 -1
  93. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceBasePricePercentage.d.ts +0 -54
  94. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceBasePricePercentage.d.ts.map +0 -1
  95. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCategory.d.ts +0 -123
  96. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCategory.d.ts.map +0 -1
  97. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCode.d.ts +0 -9
  98. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCode.d.ts.map +0 -1
  99. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCreatedByStakeholder.d.ts +0 -11
  100. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCreatedByStakeholder.d.ts.map +0 -1
  101. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDependsOnServiceCode.d.ts +0 -9
  102. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDependsOnServiceCode.d.ts.map +0 -1
  103. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDescription.d.ts +0 -9
  104. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDescription.d.ts.map +0 -1
  105. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceExpertDedicationLevel.d.ts +0 -92
  106. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceExpertDedicationLevel.d.ts.map +0 -1
  107. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceFixedPriceAmount.d.ts +0 -83
  108. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceFixedPriceAmount.d.ts.map +0 -1
  109. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasBasePrice.d.ts +0 -9
  110. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasBasePrice.d.ts.map +0 -1
  111. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasFixedPrice.d.ts +0 -9
  112. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasFixedPrice.d.ts.map +0 -1
  113. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceId.d.ts +0 -9
  114. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceId.d.ts.map +0 -1
  115. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesCarbonBoxAcademy.d.ts +0 -9
  116. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesCarbonBoxAcademy.d.ts.map +0 -1
  117. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesESGIndicators.d.ts +0 -9
  118. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesESGIndicators.d.ts.map +0 -1
  119. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForCorporate.d.ts +0 -9
  120. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForCorporate.d.ts.map +0 -1
  121. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForEvent.d.ts +0 -9
  122. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForEvent.d.ts.map +0 -1
  123. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForProduct.d.ts +0 -9
  124. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForProduct.d.ts.map +0 -1
  125. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsRequiredService.d.ts +0 -9
  126. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsRequiredService.d.ts.map +0 -1
  127. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceMaxUsers.d.ts +0 -99
  128. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceMaxUsers.d.ts.map +0 -1
  129. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceName.d.ts +0 -9
  130. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceName.d.ts.map +0 -1
  131. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceReportTypes.d.ts +0 -119
  132. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceReportTypes.d.ts.map +0 -1
  133. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceStatus.d.ts +0 -110
  134. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceStatus.d.ts.map +0 -1
  135. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceType.d.ts +0 -111
  136. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceType.d.ts.map +0 -1
  137. package/build/types/carbonbox/shared/domain/exceptions/InvalidSemanticUuidError.d.ts +0 -8
  138. package/build/types/carbonbox/shared/domain/exceptions/InvalidSemanticUuidError.d.ts.map +0 -1
  139. package/build/types/carbonbox/shared/domain/services/DateTimeFormattingDomainService.d.ts +0 -95
  140. package/build/types/carbonbox/shared/domain/services/DateTimeFormattingDomainService.d.ts.map +0 -1
  141. package/build/types/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.d.ts +0 -85
  142. package/build/types/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.d.ts.map +0 -1
  143. package/build/types/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.d.ts +0 -67
  144. package/build/types/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.d.ts.map +0 -1
  145. package/build/types/carbonbox/shared/domain/types/AllPermissions.d.ts +0 -12
  146. package/build/types/carbonbox/shared/domain/types/AllPermissions.d.ts.map +0 -1
  147. package/build/types/carbonbox/shared/domain/types/AllPermissionsPrimitives.d.ts +0 -12
  148. package/build/types/carbonbox/shared/domain/types/AllPermissionsPrimitives.d.ts.map +0 -1
  149. package/build/types/carbonbox/shared/domain/types/ServiceReference.d.ts +0 -8
  150. package/build/types/carbonbox/shared/domain/types/ServiceReference.d.ts.map +0 -1
  151. package/build/types/carbonbox/shared/domain/types/ServiceReferencePrimitives.d.ts +0 -8
  152. package/build/types/carbonbox/shared/domain/types/ServiceReferencePrimitives.d.ts.map +0 -1
  153. package/build/types/carbonbox/shared/domain/types/UserEmailProps.d.ts +0 -5
  154. package/build/types/carbonbox/shared/domain/types/UserEmailProps.d.ts.map +0 -1
  155. package/build/types/carbonbox/shared/domain/value-objects/ServiceReference.d.ts +0 -134
  156. package/build/types/carbonbox/shared/domain/value-objects/ServiceReference.d.ts.map +0 -1
  157. package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissions.d.ts +0 -3
  158. package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissions.d.ts.map +0 -1
  159. package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsPrimitives.d.ts +0 -3
  160. package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsPrimitives.d.ts.map +0 -1
  161. package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsValue.d.ts +0 -3
  162. package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsValue.d.ts.map +0 -1
  163. package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissions.d.ts +0 -3
  164. package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissions.d.ts.map +0 -1
  165. package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsPrimitives.d.ts +0 -3
  166. package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsPrimitives.d.ts.map +0 -1
  167. package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsValue.d.ts +0 -3
  168. package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsValue.d.ts.map +0 -1
  169. package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissions.d.ts +0 -3
  170. package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissions.d.ts.map +0 -1
  171. package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsPrimitives.d.ts +0 -3
  172. package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsPrimitives.d.ts.map +0 -1
  173. package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsValue.d.ts +0 -3
  174. package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsValue.d.ts.map +0 -1
  175. package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissions.d.ts +0 -3
  176. package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissions.d.ts.map +0 -1
  177. package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsPrimitives.d.ts +0 -3
  178. package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsPrimitives.d.ts.map +0 -1
  179. package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsValue.d.ts +0 -3
  180. package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsValue.d.ts.map +0 -1
  181. package/build/types/carbonbox/stakeholders/shared/domain/enums/StakeholderBusinessStatus.d.ts +0 -7
  182. package/build/types/carbonbox/stakeholders/shared/domain/enums/StakeholderBusinessStatus.d.ts.map +0 -1
  183. package/build/types/carbonbox/stakeholders/shared/domain/exceptions/InvalidStakeholderBusinessStatusError.d.ts +0 -7
  184. package/build/types/carbonbox/stakeholders/shared/domain/exceptions/InvalidStakeholderBusinessStatusError.d.ts.map +0 -1
  185. package/build/types/carbonbox/stakeholders/shared/domain/types/StakeholderPermissions.d.ts +0 -10
  186. package/build/types/carbonbox/stakeholders/shared/domain/types/StakeholderPermissions.d.ts.map +0 -1
@@ -16,4 +16,4 @@ class InvalidAggregateIdFormatError extends RootError_1.RootError {
16
16
  }
17
17
  }
18
18
  exports.InvalidAggregateIdFormatError = InvalidAggregateIdFormatError;
19
- InvalidAggregateIdFormatError.INVALID_AGGREGATE_ID_ERROR_MESSAGE = 'Invalid aggregate ID format. Expected: PREFIX_EntityType_ID (e.g., ADC-SUB_ActivityDataSubmission_550e8400-e29b-41d4-a716-446655440000)';
19
+ InvalidAggregateIdFormatError.INVALID_AGGREGATE_ID_ERROR_MESSAGE = 'Invalid aggregate ID format. Expected: PREFIX_UUID (e.g., PMS-SC_550e8400-e29b-41d4-a716-446655440000 or USR-STH-CHO_550e8400-e29b-41d4-a716-446655440000)';
@@ -1 +1 @@
1
- {"version":3,"file":"InvalidAggregateIdFormatError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidAggregateIdFormatError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,6BAA8B,SAAQ,SAAS;IAC1D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kCAAkC,CAA6I;IAEvM,OAAO;WASgB,MAAM,CAC3B,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,6BAA6B;IAIhB,QAAQ,IAAI,MAAM;CAGnC"}
1
+ {"version":3,"file":"InvalidAggregateIdFormatError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidAggregateIdFormatError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,6BAA8B,SAAQ,SAAS;IAC1D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kCAAkC,CAAgK;IAE1N,OAAO;WASgB,MAAM,CAC3B,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,6BAA6B;IAIhB,QAAQ,IAAI,MAAM;CAGnC"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "browser": false
4
4
  },
5
5
  "name": "@carbonbox/domain",
6
- "version": "0.6.2",
6
+ "version": "0.6.3",
7
7
  "description": "Domain package for CarbonBox Project",
8
8
  "main": "build/main/index.js",
9
9
  "types": "build/types/main/index.d.ts",
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,263 +0,0 @@
1
- "use strict";
2
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
- if (kind === "m") throw new TypeError("Private method is not writable");
4
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
6
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
- };
8
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
- };
13
- var _Service_code, _Service_name, _Service_description, _Service_type, _Service_category, _Service_status, _Service_isRequiredService, _Service_dependsOnServiceCode, _Service_hasBasePrice, _Service_basePricePercentage, _Service_hasFixedPrice, _Service_fixedPriceAmount, _Service_expertDedicationLevel, _Service_reportTypes, _Service_additionalUserRoles, _Service_maxUsers, _Service_allowsDocumentReading, _Service_allowsSectoralComparison, _Service_includesCarbonBoxAcademy, _Service_includesESGIndicators, _Service_isAvailableForCorporate, _Service_isAvailableForProduct, _Service_isAvailableForEvent, _Service_createdByStakeholder;
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.Service = void 0;
16
- const AggregateRoot_1 = require("../../../../shared/domain/entities/AggregateRoot");
17
- const ServiceAdditionalUserRoles_1 = require("../value-objects/ServiceAdditionalUserRoles");
18
- const ServiceAllowsDocumentReading_1 = require("../value-objects/ServiceAllowsDocumentReading");
19
- const ServiceAllowsSectoralComparison_1 = require("../value-objects/ServiceAllowsSectoralComparison");
20
- const ServiceBasePricePercentage_1 = require("../value-objects/ServiceBasePricePercentage");
21
- const ServiceCategory_1 = require("../value-objects/ServiceCategory");
22
- const ServiceCode_1 = require("../value-objects/ServiceCode");
23
- const ServiceCreatedByStakeholder_1 = require("../value-objects/ServiceCreatedByStakeholder");
24
- const ServiceDependsOnServiceCode_1 = require("../value-objects/ServiceDependsOnServiceCode");
25
- const ServiceDescription_1 = require("../value-objects/ServiceDescription");
26
- const ServiceExpertDedicationLevel_1 = require("../value-objects/ServiceExpertDedicationLevel");
27
- const ServiceFixedPriceAmount_1 = require("../value-objects/ServiceFixedPriceAmount");
28
- const ServiceHasBasePrice_1 = require("../value-objects/ServiceHasBasePrice");
29
- const ServiceHasFixedPrice_1 = require("../value-objects/ServiceHasFixedPrice");
30
- const ServiceId_1 = require("../value-objects/ServiceId");
31
- const ServiceIncludesCarbonBoxAcademy_1 = require("../value-objects/ServiceIncludesCarbonBoxAcademy");
32
- const ServiceIncludesESGIndicators_1 = require("../value-objects/ServiceIncludesESGIndicators");
33
- const ServiceIsAvailableForCorporate_1 = require("../value-objects/ServiceIsAvailableForCorporate");
34
- const ServiceIsAvailableForEvent_1 = require("../value-objects/ServiceIsAvailableForEvent");
35
- const ServiceIsAvailableForProduct_1 = require("../value-objects/ServiceIsAvailableForProduct");
36
- const ServiceIsRequiredService_1 = require("../value-objects/ServiceIsRequiredService");
37
- const ServiceMaxUsers_1 = require("../value-objects/ServiceMaxUsers");
38
- const ServiceName_1 = require("../value-objects/ServiceName");
39
- const ServiceReportTypes_1 = require("../value-objects/ServiceReportTypes");
40
- const ServiceStatus_1 = require("../value-objects/ServiceStatus");
41
- const ServiceType_1 = require("../value-objects/ServiceType");
42
- class Service extends AggregateRoot_1.AggregateRoot {
43
- constructor(props, skipDomainValidation) {
44
- const id = skipDomainValidation
45
- ? ServiceId_1.ServiceId.fromPrimitives(props.id).toPrimitives()
46
- : ServiceId_1.ServiceId.create(props.id).toPrimitives();
47
- super({ id }, skipDomainValidation);
48
- _Service_code.set(this, void 0);
49
- _Service_name.set(this, void 0);
50
- _Service_description.set(this, void 0);
51
- _Service_type.set(this, void 0);
52
- _Service_category.set(this, void 0);
53
- _Service_status.set(this, void 0);
54
- _Service_isRequiredService.set(this, void 0);
55
- _Service_dependsOnServiceCode.set(this, void 0);
56
- _Service_hasBasePrice.set(this, void 0);
57
- _Service_basePricePercentage.set(this, void 0);
58
- _Service_hasFixedPrice.set(this, void 0);
59
- _Service_fixedPriceAmount.set(this, void 0);
60
- _Service_expertDedicationLevel.set(this, void 0);
61
- _Service_reportTypes.set(this, void 0);
62
- _Service_additionalUserRoles.set(this, void 0);
63
- _Service_maxUsers.set(this, void 0);
64
- _Service_allowsDocumentReading.set(this, void 0);
65
- _Service_allowsSectoralComparison.set(this, void 0);
66
- _Service_includesCarbonBoxAcademy.set(this, void 0);
67
- _Service_includesESGIndicators.set(this, void 0);
68
- _Service_isAvailableForCorporate.set(this, void 0);
69
- _Service_isAvailableForProduct.set(this, void 0);
70
- _Service_isAvailableForEvent.set(this, void 0);
71
- _Service_createdByStakeholder.set(this, void 0);
72
- if (skipDomainValidation === false) {
73
- // Initialize with domain validation
74
- __classPrivateFieldSet(this, _Service_code, ServiceCode_1.ServiceCode.create(props.code), "f");
75
- __classPrivateFieldSet(this, _Service_name, ServiceName_1.ServiceName.create(props.name), "f");
76
- __classPrivateFieldSet(this, _Service_description, ServiceDescription_1.ServiceDescription.create(props.description), "f");
77
- __classPrivateFieldSet(this, _Service_type, ServiceType_1.ServiceType.create(props.type), "f");
78
- __classPrivateFieldSet(this, _Service_category, ServiceCategory_1.ServiceCategory.create(props.category), "f");
79
- __classPrivateFieldSet(this, _Service_status, ServiceStatus_1.ServiceStatus.create(props.status), "f");
80
- __classPrivateFieldSet(this, _Service_isRequiredService, ServiceIsRequiredService_1.ServiceIsRequiredService.create(props.isRequiredService), "f");
81
- __classPrivateFieldSet(this, _Service_dependsOnServiceCode, ServiceDependsOnServiceCode_1.ServiceDependsOnServiceCode.create(props.dependsOnServiceCode), "f");
82
- __classPrivateFieldSet(this, _Service_hasBasePrice, ServiceHasBasePrice_1.ServiceHasBasePrice.create(props.hasBasePrice), "f");
83
- __classPrivateFieldSet(this, _Service_basePricePercentage, ServiceBasePricePercentage_1.ServiceBasePricePercentage.create(props.basePricePercentage), "f");
84
- __classPrivateFieldSet(this, _Service_hasFixedPrice, ServiceHasFixedPrice_1.ServiceHasFixedPrice.create(props.hasFixedPrice), "f");
85
- __classPrivateFieldSet(this, _Service_fixedPriceAmount, ServiceFixedPriceAmount_1.ServiceFixedPriceAmount.create(props.fixedPriceAmount), "f");
86
- __classPrivateFieldSet(this, _Service_expertDedicationLevel, ServiceExpertDedicationLevel_1.ServiceExpertDedicationLevel.create(props.expertDedicationLevel), "f");
87
- __classPrivateFieldSet(this, _Service_reportTypes, ServiceReportTypes_1.ServiceReportTypes.create(props.reportTypes), "f");
88
- __classPrivateFieldSet(this, _Service_additionalUserRoles, ServiceAdditionalUserRoles_1.ServiceAdditionalUserRoles.create(props.additionalUserRoles), "f");
89
- __classPrivateFieldSet(this, _Service_maxUsers, ServiceMaxUsers_1.ServiceMaxUsers.create(props.maxUsers), "f");
90
- __classPrivateFieldSet(this, _Service_allowsDocumentReading, ServiceAllowsDocumentReading_1.ServiceAllowsDocumentReading.create(props.allowsDocumentReading), "f");
91
- __classPrivateFieldSet(this, _Service_allowsSectoralComparison, ServiceAllowsSectoralComparison_1.ServiceAllowsSectoralComparison.create(props.allowsSectoralComparison), "f");
92
- __classPrivateFieldSet(this, _Service_includesCarbonBoxAcademy, ServiceIncludesCarbonBoxAcademy_1.ServiceIncludesCarbonBoxAcademy.create(props.includesCarbonBoxAcademy), "f");
93
- __classPrivateFieldSet(this, _Service_includesESGIndicators, ServiceIncludesESGIndicators_1.ServiceIncludesESGIndicators.create(props.includesESGIndicators), "f");
94
- __classPrivateFieldSet(this, _Service_isAvailableForCorporate, ServiceIsAvailableForCorporate_1.ServiceIsAvailableForCorporate.create(props.isAvailableForCorporate), "f");
95
- __classPrivateFieldSet(this, _Service_isAvailableForProduct, ServiceIsAvailableForProduct_1.ServiceIsAvailableForProduct.create(props.isAvailableForProduct), "f");
96
- __classPrivateFieldSet(this, _Service_isAvailableForEvent, ServiceIsAvailableForEvent_1.ServiceIsAvailableForEvent.create(props.isAvailableForEvent), "f");
97
- __classPrivateFieldSet(this, _Service_createdByStakeholder, ServiceCreatedByStakeholder_1.ServiceCreatedByStakeholder.create(props.createdByStakeholder), "f");
98
- }
99
- else {
100
- // Initialize from primitives (no domain validation)
101
- __classPrivateFieldSet(this, _Service_code, ServiceCode_1.ServiceCode.fromPrimitives(props.code), "f");
102
- __classPrivateFieldSet(this, _Service_name, ServiceName_1.ServiceName.fromPrimitives(props.name), "f");
103
- __classPrivateFieldSet(this, _Service_description, ServiceDescription_1.ServiceDescription.fromPrimitives(props.description), "f");
104
- __classPrivateFieldSet(this, _Service_type, ServiceType_1.ServiceType.fromPrimitives(props.type), "f");
105
- __classPrivateFieldSet(this, _Service_category, ServiceCategory_1.ServiceCategory.fromPrimitives(props.category), "f");
106
- __classPrivateFieldSet(this, _Service_status, ServiceStatus_1.ServiceStatus.fromPrimitives(props.status), "f");
107
- __classPrivateFieldSet(this, _Service_isRequiredService, ServiceIsRequiredService_1.ServiceIsRequiredService.fromPrimitives(props.isRequiredService), "f");
108
- __classPrivateFieldSet(this, _Service_dependsOnServiceCode, ServiceDependsOnServiceCode_1.ServiceDependsOnServiceCode.fromPrimitives(props.dependsOnServiceCode), "f");
109
- __classPrivateFieldSet(this, _Service_hasBasePrice, ServiceHasBasePrice_1.ServiceHasBasePrice.fromPrimitives(props.hasBasePrice), "f");
110
- __classPrivateFieldSet(this, _Service_basePricePercentage, ServiceBasePricePercentage_1.ServiceBasePricePercentage.fromPrimitives(props.basePricePercentage), "f");
111
- __classPrivateFieldSet(this, _Service_hasFixedPrice, ServiceHasFixedPrice_1.ServiceHasFixedPrice.fromPrimitives(props.hasFixedPrice), "f");
112
- __classPrivateFieldSet(this, _Service_fixedPriceAmount, ServiceFixedPriceAmount_1.ServiceFixedPriceAmount.fromPrimitives(props.fixedPriceAmount), "f");
113
- __classPrivateFieldSet(this, _Service_expertDedicationLevel, ServiceExpertDedicationLevel_1.ServiceExpertDedicationLevel.fromPrimitives(props.expertDedicationLevel), "f");
114
- __classPrivateFieldSet(this, _Service_reportTypes, ServiceReportTypes_1.ServiceReportTypes.fromPrimitives(props.reportTypes), "f");
115
- __classPrivateFieldSet(this, _Service_additionalUserRoles, ServiceAdditionalUserRoles_1.ServiceAdditionalUserRoles.fromPrimitives(props.additionalUserRoles), "f");
116
- __classPrivateFieldSet(this, _Service_maxUsers, ServiceMaxUsers_1.ServiceMaxUsers.fromPrimitives(props.maxUsers), "f");
117
- __classPrivateFieldSet(this, _Service_allowsDocumentReading, ServiceAllowsDocumentReading_1.ServiceAllowsDocumentReading.fromPrimitives(props.allowsDocumentReading), "f");
118
- __classPrivateFieldSet(this, _Service_allowsSectoralComparison, ServiceAllowsSectoralComparison_1.ServiceAllowsSectoralComparison.fromPrimitives(props.allowsSectoralComparison), "f");
119
- __classPrivateFieldSet(this, _Service_includesCarbonBoxAcademy, ServiceIncludesCarbonBoxAcademy_1.ServiceIncludesCarbonBoxAcademy.fromPrimitives(props.includesCarbonBoxAcademy), "f");
120
- __classPrivateFieldSet(this, _Service_includesESGIndicators, ServiceIncludesESGIndicators_1.ServiceIncludesESGIndicators.fromPrimitives(props.includesESGIndicators), "f");
121
- __classPrivateFieldSet(this, _Service_isAvailableForCorporate, ServiceIsAvailableForCorporate_1.ServiceIsAvailableForCorporate.fromPrimitives(props.isAvailableForCorporate), "f");
122
- __classPrivateFieldSet(this, _Service_isAvailableForProduct, ServiceIsAvailableForProduct_1.ServiceIsAvailableForProduct.fromPrimitives(props.isAvailableForProduct), "f");
123
- __classPrivateFieldSet(this, _Service_isAvailableForEvent, ServiceIsAvailableForEvent_1.ServiceIsAvailableForEvent.fromPrimitives(props.isAvailableForEvent), "f");
124
- __classPrivateFieldSet(this, _Service_createdByStakeholder, ServiceCreatedByStakeholder_1.ServiceCreatedByStakeholder.fromPrimitives(props.createdByStakeholder), "f");
125
- }
126
- }
127
- static create(props) {
128
- return new Service(props, false);
129
- }
130
- static fromPrimitives(primitives) {
131
- const props = {
132
- id: primitives.id,
133
- code: primitives.code,
134
- name: primitives.name,
135
- description: primitives.description,
136
- type: primitives.type,
137
- category: primitives.category,
138
- status: primitives.status,
139
- isRequiredService: primitives.isRequiredService,
140
- dependsOnServiceCode: primitives.dependsOnServiceCode,
141
- hasBasePrice: primitives.hasBasePrice,
142
- basePricePercentage: primitives.basePricePercentage,
143
- hasFixedPrice: primitives.hasFixedPrice,
144
- fixedPriceAmount: primitives.fixedPriceAmount,
145
- expertDedicationLevel: primitives.expertDedicationLevel,
146
- reportTypes: primitives.reportTypes,
147
- additionalUserRoles: primitives.additionalUserRoles,
148
- maxUsers: primitives.maxUsers,
149
- allowsDocumentReading: primitives.allowsDocumentReading,
150
- allowsSectoralComparison: primitives.allowsSectoralComparison,
151
- includesCarbonBoxAcademy: primitives.includesCarbonBoxAcademy,
152
- includesESGIndicators: primitives.includesESGIndicators,
153
- isAvailableForCorporate: primitives.isAvailableForCorporate,
154
- isAvailableForProduct: primitives.isAvailableForProduct,
155
- isAvailableForEvent: primitives.isAvailableForEvent,
156
- createdByStakeholder: primitives.createdByStakeholder,
157
- };
158
- return new Service(props, true);
159
- }
160
- get toPrimitives() {
161
- return {
162
- id: this.id.toPrimitives(),
163
- code: __classPrivateFieldGet(this, _Service_code, "f").toPrimitives(),
164
- name: __classPrivateFieldGet(this, _Service_name, "f").toPrimitives(),
165
- description: __classPrivateFieldGet(this, _Service_description, "f").toPrimitives(),
166
- type: __classPrivateFieldGet(this, _Service_type, "f").toEnum(),
167
- category: __classPrivateFieldGet(this, _Service_category, "f").toEnum(),
168
- status: __classPrivateFieldGet(this, _Service_status, "f").toEnum(),
169
- isRequiredService: __classPrivateFieldGet(this, _Service_isRequiredService, "f").toPrimitives(),
170
- dependsOnServiceCode: __classPrivateFieldGet(this, _Service_dependsOnServiceCode, "f").toPrimitives(),
171
- hasBasePrice: __classPrivateFieldGet(this, _Service_hasBasePrice, "f").toPrimitives(),
172
- basePricePercentage: __classPrivateFieldGet(this, _Service_basePricePercentage, "f").toPrimitives(),
173
- hasFixedPrice: __classPrivateFieldGet(this, _Service_hasFixedPrice, "f").toPrimitives(),
174
- fixedPriceAmount: __classPrivateFieldGet(this, _Service_fixedPriceAmount, "f").toPrimitives(),
175
- expertDedicationLevel: __classPrivateFieldGet(this, _Service_expertDedicationLevel, "f").toEnum(),
176
- reportTypes: __classPrivateFieldGet(this, _Service_reportTypes, "f").toEnums(),
177
- additionalUserRoles: __classPrivateFieldGet(this, _Service_additionalUserRoles, "f").toEnums(),
178
- maxUsers: __classPrivateFieldGet(this, _Service_maxUsers, "f").toPrimitives(),
179
- allowsDocumentReading: __classPrivateFieldGet(this, _Service_allowsDocumentReading, "f").toPrimitives(),
180
- allowsSectoralComparison: __classPrivateFieldGet(this, _Service_allowsSectoralComparison, "f").toPrimitives(),
181
- includesCarbonBoxAcademy: __classPrivateFieldGet(this, _Service_includesCarbonBoxAcademy, "f").toPrimitives(),
182
- includesESGIndicators: __classPrivateFieldGet(this, _Service_includesESGIndicators, "f").toPrimitives(),
183
- isAvailableForCorporate: __classPrivateFieldGet(this, _Service_isAvailableForCorporate, "f").toPrimitives(),
184
- isAvailableForProduct: __classPrivateFieldGet(this, _Service_isAvailableForProduct, "f").toPrimitives(),
185
- isAvailableForEvent: __classPrivateFieldGet(this, _Service_isAvailableForEvent, "f").toPrimitives(),
186
- createdByStakeholder: __classPrivateFieldGet(this, _Service_createdByStakeholder, "f").toPrimitives(),
187
- };
188
- }
189
- get code() {
190
- return __classPrivateFieldGet(this, _Service_code, "f");
191
- }
192
- get name() {
193
- return __classPrivateFieldGet(this, _Service_name, "f");
194
- }
195
- get description() {
196
- return __classPrivateFieldGet(this, _Service_description, "f");
197
- }
198
- get type() {
199
- return __classPrivateFieldGet(this, _Service_type, "f");
200
- }
201
- get category() {
202
- return __classPrivateFieldGet(this, _Service_category, "f");
203
- }
204
- get status() {
205
- return __classPrivateFieldGet(this, _Service_status, "f");
206
- }
207
- get isRequiredService() {
208
- return __classPrivateFieldGet(this, _Service_isRequiredService, "f");
209
- }
210
- get dependsOnServiceCode() {
211
- return __classPrivateFieldGet(this, _Service_dependsOnServiceCode, "f");
212
- }
213
- get hasBasePrice() {
214
- return __classPrivateFieldGet(this, _Service_hasBasePrice, "f");
215
- }
216
- get basePricePercentage() {
217
- return __classPrivateFieldGet(this, _Service_basePricePercentage, "f");
218
- }
219
- get hasFixedPrice() {
220
- return __classPrivateFieldGet(this, _Service_hasFixedPrice, "f");
221
- }
222
- get fixedPriceAmount() {
223
- return __classPrivateFieldGet(this, _Service_fixedPriceAmount, "f");
224
- }
225
- get expertDedicationLevel() {
226
- return __classPrivateFieldGet(this, _Service_expertDedicationLevel, "f");
227
- }
228
- get reportTypes() {
229
- return __classPrivateFieldGet(this, _Service_reportTypes, "f");
230
- }
231
- get additionalUserRoles() {
232
- return __classPrivateFieldGet(this, _Service_additionalUserRoles, "f");
233
- }
234
- get maxUsers() {
235
- return __classPrivateFieldGet(this, _Service_maxUsers, "f");
236
- }
237
- get allowsDocumentReading() {
238
- return __classPrivateFieldGet(this, _Service_allowsDocumentReading, "f");
239
- }
240
- get allowsSectoralComparison() {
241
- return __classPrivateFieldGet(this, _Service_allowsSectoralComparison, "f");
242
- }
243
- get includesCarbonBoxAcademy() {
244
- return __classPrivateFieldGet(this, _Service_includesCarbonBoxAcademy, "f");
245
- }
246
- get includesESGIndicators() {
247
- return __classPrivateFieldGet(this, _Service_includesESGIndicators, "f");
248
- }
249
- get isAvailableForCorporate() {
250
- return __classPrivateFieldGet(this, _Service_isAvailableForCorporate, "f");
251
- }
252
- get isAvailableForProduct() {
253
- return __classPrivateFieldGet(this, _Service_isAvailableForProduct, "f");
254
- }
255
- get isAvailableForEvent() {
256
- return __classPrivateFieldGet(this, _Service_isAvailableForEvent, "f");
257
- }
258
- get createdByStakeholder() {
259
- return __classPrivateFieldGet(this, _Service_createdByStakeholder, "f");
260
- }
261
- }
262
- exports.Service = Service;
263
- _Service_code = new WeakMap(), _Service_name = new WeakMap(), _Service_description = new WeakMap(), _Service_type = new WeakMap(), _Service_category = new WeakMap(), _Service_status = new WeakMap(), _Service_isRequiredService = new WeakMap(), _Service_dependsOnServiceCode = new WeakMap(), _Service_hasBasePrice = new WeakMap(), _Service_basePricePercentage = new WeakMap(), _Service_hasFixedPrice = new WeakMap(), _Service_fixedPriceAmount = new WeakMap(), _Service_expertDedicationLevel = new WeakMap(), _Service_reportTypes = new WeakMap(), _Service_additionalUserRoles = new WeakMap(), _Service_maxUsers = new WeakMap(), _Service_allowsDocumentReading = new WeakMap(), _Service_allowsSectoralComparison = new WeakMap(), _Service_includesCarbonBoxAcademy = new WeakMap(), _Service_includesESGIndicators = new WeakMap(), _Service_isAvailableForCorporate = new WeakMap(), _Service_isAvailableForProduct = new WeakMap(), _Service_isAvailableForEvent = new WeakMap(), _Service_createdByStakeholder = new WeakMap();
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServiceCategory = void 0;
4
- var ServiceCategory;
5
- (function (ServiceCategory) {
6
- ServiceCategory["CORPORATE_FOOTPRINT"] = "CORPORATE_FOOTPRINT";
7
- ServiceCategory["PRODUCT_FOOTPRINT"] = "PRODUCT_FOOTPRINT";
8
- ServiceCategory["EVENT_FOOTPRINT"] = "EVENT_FOOTPRINT";
9
- ServiceCategory["EXPERT_SUPPORT"] = "EXPERT_SUPPORT";
10
- ServiceCategory["TRAINING"] = "TRAINING";
11
- ServiceCategory["AUDIT_SUPPORT"] = "AUDIT_SUPPORT";
12
- ServiceCategory["DATA_VALIDATION"] = "DATA_VALIDATION";
13
- ServiceCategory["REPORTING"] = "REPORTING";
14
- ServiceCategory["DOCUMENT_READING"] = "DOCUMENT_READING";
15
- ServiceCategory["SECTORAL_COMPARISON"] = "SECTORAL_COMPARISON";
16
- ServiceCategory["ADDITIONAL_USERS"] = "ADDITIONAL_USERS";
17
- ServiceCategory["CARBONBOX_ACADEMY"] = "CARBONBOX_ACADEMY";
18
- ServiceCategory["ESG_INDICATORS"] = "ESG_INDICATORS";
19
- ServiceCategory["CARBON_OFFSETTING"] = "CARBON_OFFSETTING";
20
- })(ServiceCategory || (exports.ServiceCategory = ServiceCategory = {}));
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServiceStatus = void 0;
4
- var ServiceStatus;
5
- (function (ServiceStatus) {
6
- ServiceStatus["ACTIVE"] = "ACTIVE";
7
- ServiceStatus["INACTIVE"] = "INACTIVE";
8
- ServiceStatus["DISCONTINUED"] = "DISCONTINUED";
9
- })(ServiceStatus || (exports.ServiceStatus = ServiceStatus = {}));
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServiceType = void 0;
4
- var ServiceType;
5
- (function (ServiceType) {
6
- ServiceType["BASE_SERVICE"] = "BASE_SERVICE";
7
- ServiceType["ADDITIONAL_SERVICE"] = "ADDITIONAL_SERVICE";
8
- ServiceType["PLATFORM_FEATURE"] = "PLATFORM_FEATURE";
9
- ServiceType["DEPENDENT_SERVICE"] = "DEPENDENT_SERVICE";
10
- })(ServiceType || (exports.ServiceType = ServiceType = {}));
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InvalidServiceCategoryError = void 0;
4
- const RootError_1 = require("../../../../shared/domain/exceptions/RootError");
5
- class InvalidServiceCategoryError extends RootError_1.RootError {
6
- constructor(receivedValue, validCategories) {
7
- const validCategoriesList = validCategories.join(', ');
8
- const message = `Invalid service category value '${receivedValue}': must be one of ${validCategoriesList}.`;
9
- super(message);
10
- this.name = 'InvalidServiceCategoryError';
11
- }
12
- static create(receivedValue, validCategories) {
13
- return new InvalidServiceCategoryError(receivedValue, validCategories);
14
- }
15
- logError() {
16
- return `${this.name}: ${this.message}`;
17
- }
18
- }
19
- exports.InvalidServiceCategoryError = InvalidServiceCategoryError;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InvalidServiceStatusError = void 0;
4
- const RootError_1 = require("../../../../shared/domain/exceptions/RootError");
5
- class InvalidServiceStatusError extends RootError_1.RootError {
6
- constructor(receivedValue, validStatuses) {
7
- const validStatusesList = validStatuses.join(', ');
8
- const message = `Invalid service status value '${receivedValue}': must be one of ${validStatusesList}.`;
9
- super(message);
10
- this.name = 'InvalidServiceStatusError';
11
- }
12
- static create(receivedValue, validStatuses) {
13
- return new InvalidServiceStatusError(receivedValue, validStatuses);
14
- }
15
- logError() {
16
- return `${this.name}: ${this.message}`;
17
- }
18
- }
19
- exports.InvalidServiceStatusError = InvalidServiceStatusError;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InvalidServiceTypeError = void 0;
4
- const RootError_1 = require("../../../../shared/domain/exceptions/RootError");
5
- class InvalidServiceTypeError extends RootError_1.RootError {
6
- constructor(receivedValue, validTypes) {
7
- const validTypesList = validTypes.join(', ');
8
- const message = `Invalid service type value '${receivedValue}': must be one of ${validTypesList}.`;
9
- super(message);
10
- this.name = 'InvalidServiceTypeError';
11
- }
12
- static create(receivedValue, validTypes) {
13
- return new InvalidServiceTypeError(receivedValue, validTypes);
14
- }
15
- logError() {
16
- return `${this.name}: ${this.message}`;
17
- }
18
- }
19
- exports.InvalidServiceTypeError = InvalidServiceTypeError;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,131 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServiceAdditionalUserRoles = void 0;
4
- const StringList_1 = require("../../../../shared/domain/value-objects/StringList");
5
- const UserRole_1 = require("../enums/UserRole");
6
- const InvalidUserRoleError_1 = require("../exceptions/InvalidUserRoleError");
7
- class ServiceAdditionalUserRoles extends StringList_1.StringList {
8
- constructor(roles, skipDomainValidation) {
9
- super(roles, skipDomainValidation, ServiceAdditionalUserRoles.PROPERTY_NAME, { allowEmpty: true });
10
- if (skipDomainValidation === false) {
11
- this.validateUserRoles(roles);
12
- }
13
- }
14
- static create(roles) {
15
- StringList_1.StringList.guardAgainstInvalidStringList(roles, ServiceAdditionalUserRoles.PROPERTY_NAME);
16
- return new ServiceAdditionalUserRoles(roles, false);
17
- }
18
- static fromPrimitives(primitives) {
19
- const value = primitives.map((primitive) => primitive);
20
- return new ServiceAdditionalUserRoles(value, true);
21
- }
22
- /**
23
- * Valida que todos los roles sean roles de usuario válidos.
24
- */
25
- validateUserRoles(roles) {
26
- for (const role of roles) {
27
- if (!ServiceAdditionalUserRoles.VALID_USER_ROLES.includes(role)) {
28
- throw InvalidUserRoleError_1.InvalidUserRoleError.create(role, ServiceAdditionalUserRoles.VALID_USER_ROLES);
29
- }
30
- }
31
- }
32
- /**
33
- * Verifica si contiene el rol de SUPPLIER.
34
- */
35
- hasSupplierRole() {
36
- return this.value.includes(UserRole_1.UserRole.SUPPLIER);
37
- }
38
- /**
39
- * Verifica si contiene el rol de OBSERVER.
40
- */
41
- hasObserverRole() {
42
- return this.value.includes(UserRole_1.UserRole.OBSERVER);
43
- }
44
- /**
45
- * Verifica si contiene el rol de AUDITOR.
46
- */
47
- hasAuditorRole() {
48
- return this.value.includes(UserRole_1.UserRole.AUDITOR);
49
- }
50
- /**
51
- * Obtiene los roles válidos de usuario.
52
- */
53
- static getValidUserRoles() {
54
- return Object.freeze([...ServiceAdditionalUserRoles.VALID_USER_ROLES]);
55
- }
56
- /**
57
- * Verifica si un valor es un rol de usuario válido.
58
- */
59
- static isValidUserRole(role) {
60
- return ServiceAdditionalUserRoles.VALID_USER_ROLES.includes(role);
61
- }
62
- /**
63
- * Agrega un nuevo rol si no está ya presente.
64
- */
65
- addRole(role) {
66
- if (this.value.includes(role)) {
67
- return this;
68
- }
69
- const newRoles = [...this.value, role];
70
- return new ServiceAdditionalUserRoles(newRoles, false);
71
- }
72
- /**
73
- * Remueve un rol específico.
74
- */
75
- removeRole(role) {
76
- const newRoles = this.value.filter((r) => r !== role);
77
- return new ServiceAdditionalUserRoles(newRoles, false);
78
- }
79
- /**
80
- * Verifica si tiene al menos un rol de auditoría (AUDITOR o OBSERVER).
81
- */
82
- hasAuditRole() {
83
- return this.hasAuditorRole() || this.hasObserverRole();
84
- }
85
- /**
86
- * Verifica si tiene roles operacionales (SUPPLIER).
87
- */
88
- hasOperationalRole() {
89
- return this.hasSupplierRole();
90
- }
91
- /**
92
- * Obtiene el número de roles únicos.
93
- */
94
- getRoleCount() {
95
- return this.value.length;
96
- }
97
- /**
98
- * Verifica si está vacío (sin roles adicionales).
99
- */
100
- isEmpty() {
101
- return this.value.length === 0;
102
- }
103
- /**
104
- * Convierte los roles a enum para uso tipado.
105
- */
106
- toEnums() {
107
- return this.value;
108
- }
109
- /**
110
- * Obtiene una descripción de los roles para debugging.
111
- */
112
- getDescription() {
113
- if (this.isEmpty()) {
114
- return 'No additional user roles assigned';
115
- }
116
- return `Additional roles: ${this.value.join(', ')}`;
117
- }
118
- toPrimitives() {
119
- return this.value;
120
- }
121
- /**
122
- * Representación como string descriptiva.
123
- */
124
- toString() {
125
- return this.value.join(', ') || 'No additional roles';
126
- }
127
- }
128
- exports.ServiceAdditionalUserRoles = ServiceAdditionalUserRoles;
129
- ServiceAdditionalUserRoles.PROPERTY_NAME = 'additionalUserRoles';
130
- // Roles de usuario válidos
131
- ServiceAdditionalUserRoles.VALID_USER_ROLES = Object.values(UserRole_1.UserRole);
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServiceAllowsDocumentReading = void 0;
4
- const Boolean_1 = require("../../../../shared/domain/value-objects/Boolean");
5
- class ServiceAllowsDocumentReading extends Boolean_1.Boolean {
6
- constructor(value, skipDomainValidation) {
7
- super(value, skipDomainValidation, ServiceAllowsDocumentReading.PROPERTY_NAME);
8
- }
9
- static create(value) {
10
- Boolean_1.Boolean.guardAgainstInvalidType(value, ServiceAllowsDocumentReading.PROPERTY_NAME);
11
- return new ServiceAllowsDocumentReading(value, false);
12
- }
13
- static fromPrimitives(primitive) {
14
- const value = primitive;
15
- return new ServiceAllowsDocumentReading(value, true);
16
- }
17
- toPrimitives() {
18
- return this.value;
19
- }
20
- }
21
- exports.ServiceAllowsDocumentReading = ServiceAllowsDocumentReading;
22
- ServiceAllowsDocumentReading.PROPERTY_NAME = 'allowsDocumentReading';
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServiceAllowsSectoralComparison = void 0;
4
- const Boolean_1 = require("../../../../shared/domain/value-objects/Boolean");
5
- class ServiceAllowsSectoralComparison extends Boolean_1.Boolean {
6
- constructor(value, skipDomainValidation) {
7
- super(value, skipDomainValidation, ServiceAllowsSectoralComparison.PROPERTY_NAME);
8
- }
9
- static create(value) {
10
- Boolean_1.Boolean.guardAgainstInvalidType(value, ServiceAllowsSectoralComparison.PROPERTY_NAME);
11
- return new ServiceAllowsSectoralComparison(value, false);
12
- }
13
- static fromPrimitives(primitive) {
14
- const value = primitive;
15
- return new ServiceAllowsSectoralComparison(value, true);
16
- }
17
- toPrimitives() {
18
- return this.value;
19
- }
20
- }
21
- exports.ServiceAllowsSectoralComparison = ServiceAllowsSectoralComparison;
22
- ServiceAllowsSectoralComparison.PROPERTY_NAME = 'allowsSectoralComparison';