@carbonbox/domain 0.6.2 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/build/carbonbox/shared/domain/exceptions/InvalidAggregateIdFormatError.js +1 -1
  2. package/build/carbonbox/shared/domain/value-objects/AggregateId.js +12 -7
  3. package/build/types/carbonbox/shared/domain/exceptions/InvalidAggregateIdFormatError.d.ts.map +1 -1
  4. package/build/types/carbonbox/shared/domain/value-objects/AggregateId.d.ts +9 -5
  5. package/build/types/carbonbox/shared/domain/value-objects/AggregateId.d.ts.map +1 -1
  6. package/package.json +1 -1
  7. package/build/carbonbox/purchase-management-system/service-catalog/domain/entity/IService.js +0 -2
  8. package/build/carbonbox/purchase-management-system/service-catalog/domain/entity/Service.js +0 -263
  9. package/build/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCategory.js +0 -20
  10. package/build/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceStatus.js +0 -9
  11. package/build/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceType.js +0 -10
  12. package/build/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCategoryError.js +0 -19
  13. package/build/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceStatusError.js +0 -19
  14. package/build/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceTypeError.js +0 -19
  15. package/build/carbonbox/purchase-management-system/service-catalog/domain/repository/IServiceRepository.js +0 -2
  16. package/build/carbonbox/purchase-management-system/service-catalog/domain/types/ServicePrimitives.js +0 -2
  17. package/build/carbonbox/purchase-management-system/service-catalog/domain/types/ServiceProps.js +0 -2
  18. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAdditionalUserRoles.js +0 -131
  19. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsDocumentReading.js +0 -22
  20. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsSectoralComparison.js +0 -22
  21. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceBasePricePercentage.js +0 -140
  22. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCategory.js +0 -243
  23. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCode.js +0 -24
  24. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCreatedByStakeholder.js +0 -26
  25. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDependsOnServiceCode.js +0 -21
  26. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDescription.js +0 -23
  27. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceExpertDedicationLevel.js +0 -212
  28. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceFixedPriceAmount.js +0 -193
  29. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasBasePrice.js +0 -22
  30. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasFixedPrice.js +0 -22
  31. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceId.js +0 -24
  32. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesCarbonBoxAcademy.js +0 -22
  33. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesESGIndicators.js +0 -22
  34. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForCorporate.js +0 -22
  35. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForEvent.js +0 -22
  36. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForProduct.js +0 -22
  37. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsRequiredService.js +0 -22
  38. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceMaxUsers.js +0 -246
  39. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceName.js +0 -23
  40. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceReportTypes.js +0 -246
  41. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceStatus.js +0 -221
  42. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceType.js +0 -235
  43. package/build/carbonbox/shared/domain/exceptions/InvalidSemanticUuidError.js +0 -19
  44. package/build/carbonbox/shared/domain/services/DateTimeFormattingDomainService.js +0 -172
  45. package/build/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.js +0 -2
  46. package/build/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.js +0 -235
  47. package/build/carbonbox/shared/domain/types/AllPermissions.js +0 -2
  48. package/build/carbonbox/shared/domain/types/AllPermissionsPrimitives.js +0 -2
  49. package/build/carbonbox/shared/domain/types/ServiceReference.js +0 -2
  50. package/build/carbonbox/shared/domain/types/ServiceReferencePrimitives.js +0 -2
  51. package/build/carbonbox/shared/domain/types/UserEmailProps.js +0 -2
  52. package/build/carbonbox/shared/domain/value-objects/ServiceReference.js +0 -301
  53. package/build/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissions.js +0 -2
  54. package/build/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsPrimitives.js +0 -2
  55. package/build/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsValue.js +0 -2
  56. package/build/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissions.js +0 -2
  57. package/build/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsPrimitives.js +0 -2
  58. package/build/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsValue.js +0 -2
  59. package/build/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissions.js +0 -2
  60. package/build/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsPrimitives.js +0 -2
  61. package/build/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsValue.js +0 -2
  62. package/build/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissions.js +0 -2
  63. package/build/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsPrimitives.js +0 -2
  64. package/build/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsValue.js +0 -2
  65. package/build/carbonbox/stakeholders/shared/domain/enums/StakeholderBusinessStatus.js +0 -10
  66. package/build/carbonbox/stakeholders/shared/domain/exceptions/InvalidStakeholderBusinessStatusError.js +0 -18
  67. package/build/carbonbox/stakeholders/shared/domain/types/StakeholderPermissions.js +0 -2
  68. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/entity/IService.d.ts +0 -52
  69. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/entity/IService.d.ts.map +0 -1
  70. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/entity/Service.d.ts +0 -60
  71. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/entity/Service.d.ts.map +0 -1
  72. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCategory.d.ts +0 -17
  73. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCategory.d.ts.map +0 -1
  74. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceStatus.d.ts +0 -6
  75. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceStatus.d.ts.map +0 -1
  76. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceType.d.ts +0 -7
  77. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceType.d.ts.map +0 -1
  78. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCategoryError.d.ts +0 -8
  79. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCategoryError.d.ts.map +0 -1
  80. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceStatusError.d.ts +0 -8
  81. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceStatusError.d.ts.map +0 -1
  82. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceTypeError.d.ts +0 -8
  83. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceTypeError.d.ts.map +0 -1
  84. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/repository/IServiceRepository.d.ts +0 -22
  85. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/repository/IServiceRepository.d.ts.map +0 -1
  86. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/types/ServicePrimitives.d.ts +0 -35
  87. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/types/ServicePrimitives.d.ts.map +0 -1
  88. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/types/ServiceProps.d.ts +0 -35
  89. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/types/ServiceProps.d.ts.map +0 -1
  90. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAdditionalUserRoles.d.ts +0 -71
  91. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAdditionalUserRoles.d.ts.map +0 -1
  92. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsDocumentReading.d.ts +0 -9
  93. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsDocumentReading.d.ts.map +0 -1
  94. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsSectoralComparison.d.ts +0 -9
  95. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsSectoralComparison.d.ts.map +0 -1
  96. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceBasePricePercentage.d.ts +0 -54
  97. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceBasePricePercentage.d.ts.map +0 -1
  98. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCategory.d.ts +0 -123
  99. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCategory.d.ts.map +0 -1
  100. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCode.d.ts +0 -9
  101. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCode.d.ts.map +0 -1
  102. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCreatedByStakeholder.d.ts +0 -11
  103. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCreatedByStakeholder.d.ts.map +0 -1
  104. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDependsOnServiceCode.d.ts +0 -9
  105. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDependsOnServiceCode.d.ts.map +0 -1
  106. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDescription.d.ts +0 -9
  107. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDescription.d.ts.map +0 -1
  108. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceExpertDedicationLevel.d.ts +0 -92
  109. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceExpertDedicationLevel.d.ts.map +0 -1
  110. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceFixedPriceAmount.d.ts +0 -83
  111. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceFixedPriceAmount.d.ts.map +0 -1
  112. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasBasePrice.d.ts +0 -9
  113. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasBasePrice.d.ts.map +0 -1
  114. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasFixedPrice.d.ts +0 -9
  115. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasFixedPrice.d.ts.map +0 -1
  116. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceId.d.ts +0 -9
  117. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceId.d.ts.map +0 -1
  118. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesCarbonBoxAcademy.d.ts +0 -9
  119. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesCarbonBoxAcademy.d.ts.map +0 -1
  120. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesESGIndicators.d.ts +0 -9
  121. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesESGIndicators.d.ts.map +0 -1
  122. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForCorporate.d.ts +0 -9
  123. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForCorporate.d.ts.map +0 -1
  124. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForEvent.d.ts +0 -9
  125. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForEvent.d.ts.map +0 -1
  126. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForProduct.d.ts +0 -9
  127. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForProduct.d.ts.map +0 -1
  128. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsRequiredService.d.ts +0 -9
  129. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsRequiredService.d.ts.map +0 -1
  130. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceMaxUsers.d.ts +0 -99
  131. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceMaxUsers.d.ts.map +0 -1
  132. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceName.d.ts +0 -9
  133. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceName.d.ts.map +0 -1
  134. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceReportTypes.d.ts +0 -119
  135. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceReportTypes.d.ts.map +0 -1
  136. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceStatus.d.ts +0 -110
  137. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceStatus.d.ts.map +0 -1
  138. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceType.d.ts +0 -111
  139. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceType.d.ts.map +0 -1
  140. package/build/types/carbonbox/shared/domain/exceptions/InvalidSemanticUuidError.d.ts +0 -8
  141. package/build/types/carbonbox/shared/domain/exceptions/InvalidSemanticUuidError.d.ts.map +0 -1
  142. package/build/types/carbonbox/shared/domain/services/DateTimeFormattingDomainService.d.ts +0 -95
  143. package/build/types/carbonbox/shared/domain/services/DateTimeFormattingDomainService.d.ts.map +0 -1
  144. package/build/types/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.d.ts +0 -85
  145. package/build/types/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.d.ts.map +0 -1
  146. package/build/types/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.d.ts +0 -67
  147. package/build/types/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.d.ts.map +0 -1
  148. package/build/types/carbonbox/shared/domain/types/AllPermissions.d.ts +0 -12
  149. package/build/types/carbonbox/shared/domain/types/AllPermissions.d.ts.map +0 -1
  150. package/build/types/carbonbox/shared/domain/types/AllPermissionsPrimitives.d.ts +0 -12
  151. package/build/types/carbonbox/shared/domain/types/AllPermissionsPrimitives.d.ts.map +0 -1
  152. package/build/types/carbonbox/shared/domain/types/ServiceReference.d.ts +0 -8
  153. package/build/types/carbonbox/shared/domain/types/ServiceReference.d.ts.map +0 -1
  154. package/build/types/carbonbox/shared/domain/types/ServiceReferencePrimitives.d.ts +0 -8
  155. package/build/types/carbonbox/shared/domain/types/ServiceReferencePrimitives.d.ts.map +0 -1
  156. package/build/types/carbonbox/shared/domain/types/UserEmailProps.d.ts +0 -5
  157. package/build/types/carbonbox/shared/domain/types/UserEmailProps.d.ts.map +0 -1
  158. package/build/types/carbonbox/shared/domain/value-objects/ServiceReference.d.ts +0 -134
  159. package/build/types/carbonbox/shared/domain/value-objects/ServiceReference.d.ts.map +0 -1
  160. package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissions.d.ts +0 -3
  161. package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissions.d.ts.map +0 -1
  162. package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsPrimitives.d.ts +0 -3
  163. package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsPrimitives.d.ts.map +0 -1
  164. package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsValue.d.ts +0 -3
  165. package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsValue.d.ts.map +0 -1
  166. package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissions.d.ts +0 -3
  167. package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissions.d.ts.map +0 -1
  168. package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsPrimitives.d.ts +0 -3
  169. package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsPrimitives.d.ts.map +0 -1
  170. package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsValue.d.ts +0 -3
  171. package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsValue.d.ts.map +0 -1
  172. package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissions.d.ts +0 -3
  173. package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissions.d.ts.map +0 -1
  174. package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsPrimitives.d.ts +0 -3
  175. package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsPrimitives.d.ts.map +0 -1
  176. package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsValue.d.ts +0 -3
  177. package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsValue.d.ts.map +0 -1
  178. package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissions.d.ts +0 -3
  179. package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissions.d.ts.map +0 -1
  180. package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsPrimitives.d.ts +0 -3
  181. package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsPrimitives.d.ts.map +0 -1
  182. package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsValue.d.ts +0 -3
  183. package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsValue.d.ts.map +0 -1
  184. package/build/types/carbonbox/stakeholders/shared/domain/enums/StakeholderBusinessStatus.d.ts +0 -7
  185. package/build/types/carbonbox/stakeholders/shared/domain/enums/StakeholderBusinessStatus.d.ts.map +0 -1
  186. package/build/types/carbonbox/stakeholders/shared/domain/exceptions/InvalidStakeholderBusinessStatusError.d.ts +0 -7
  187. package/build/types/carbonbox/stakeholders/shared/domain/exceptions/InvalidStakeholderBusinessStatusError.d.ts.map +0 -1
  188. package/build/types/carbonbox/stakeholders/shared/domain/types/StakeholderPermissions.d.ts +0 -10
  189. package/build/types/carbonbox/stakeholders/shared/domain/types/StakeholderPermissions.d.ts.map +0 -1
@@ -1,235 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SemanticUuidDomainService = void 0;
4
- const either_1 = require("../../../either");
5
- const SemanticUuidPrefix_1 = require("../../enums/SemanticUuidPrefix");
6
- const InvalidSemanticUuidError_1 = require("../../exceptions/InvalidSemanticUuidError");
7
- const UnknownBoundedContextCodeError_1 = require("../../exceptions/UnknownBoundedContextCodeError");
8
- const InvalidSemanticUuidFormatError_1 = require("../../exceptions/InvalidSemanticUuidFormatError");
9
- const InvalidUuidFormatError_1 = require("../../exceptions/InvalidUuidFormatError");
10
- /**
11
- * Domain Service for semantic UUID parsing, validation and business logic operations.
12
- * Provides centralized business logic for semantic UUID handling across the domain.
13
- * Refactored to support dependency injection and Either pattern for error handling.
14
- *
15
- * This service maintains Value Object purity by being used in factories,
16
- * application services, and other appropriate contexts.
17
- */
18
- class SemanticUuidDomainService {
19
- constructor() {
20
- // Semantic UUID format: BC_UUID or BC-SUB1-SUB2-...SUBn_UUID
21
- this.SEMANTIC_UUID_REGEX = /^[A-Z]{3}(-[A-Z]{3})*_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
22
- // Standard UUID v4 regex
23
- this.UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
24
- // Private constructor to enforce factory pattern
25
- }
26
- static create() {
27
- return new SemanticUuidDomainService();
28
- }
29
- /**
30
- * Validates if a string is a valid semantic UUID prefix
31
- */
32
- isValidPrefix(prefix) {
33
- return either_1.EitherFactory.fromTryCatch(() => {
34
- if (typeof prefix !== 'string') {
35
- return false;
36
- }
37
- return Object.values(SemanticUuidPrefix_1.SemanticUuidPrefix).includes(prefix);
38
- }, (error) => {
39
- if (error instanceof InvalidSemanticUuidError_1.InvalidSemanticUuidError) {
40
- return error;
41
- }
42
- return InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(prefix, 'Failed to validate prefix');
43
- });
44
- }
45
- /**
46
- * Gets the bounded context name from a semantic UUID prefix
47
- */
48
- getBoundedContext(prefix) {
49
- return either_1.EitherFactory.fromTryCatch(() => {
50
- const contextCode = prefix.split('-')[0];
51
- const contextMap = {
52
- ADC: 'ActivityDataCollection',
53
- CFC: 'CarbonFootprintConfigurations',
54
- CPR: 'CompanyResources',
55
- ECF: 'EmissionCalculationFormulas',
56
- ECP: 'EmissionCalculationProcess',
57
- ECR: 'EmissionCalculationResults',
58
- USR: 'Users',
59
- SHR: 'Shared',
60
- STC: 'SystemTechnicalConfiguration',
61
- };
62
- const result = contextMap[contextCode];
63
- if (!result) {
64
- throw UnknownBoundedContextCodeError_1.UnknownBoundedContextCodeError.create(contextCode, prefix);
65
- }
66
- return result;
67
- }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(prefix, `Failed to get bounded context: ${error}`));
68
- }
69
- /**
70
- * Gets the subdomain from a semantic UUID prefix
71
- */
72
- getSubdomain(prefix) {
73
- return either_1.EitherFactory.fromTryCatch(() => {
74
- const parts = prefix.split('-');
75
- if (parts.length === 1) {
76
- return ''; // BC-level entity has no subdomain
77
- }
78
- return parts.slice(1).join('-'); // Join all subdomain parts
79
- }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(prefix, `Failed to get subdomain: ${error}`));
80
- }
81
- /**
82
- * Gets all available prefixes as an array
83
- */
84
- getAllPrefixes() {
85
- return either_1.EitherFactory.fromTryCatch(() => Object.values(SemanticUuidPrefix_1.SemanticUuidPrefix).sort(), (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create('', `Failed to get all prefixes: ${error}`));
86
- }
87
- /**
88
- * Gets prefixes by bounded context
89
- */
90
- getPrefixesByBoundedContext(boundedContext) {
91
- return either_1.EitherFactory.fromTryCatch(() => {
92
- const contextMap = {
93
- ActivityDataCollection: [
94
- SemanticUuidPrefix_1.SemanticUuidPrefix.ADC_SUBMISSIONS,
95
- SemanticUuidPrefix_1.SemanticUuidPrefix.ADC_FIELDS,
96
- SemanticUuidPrefix_1.SemanticUuidPrefix.ADC_LOGIC,
97
- SemanticUuidPrefix_1.SemanticUuidPrefix.ADC_LABELS,
98
- SemanticUuidPrefix_1.SemanticUuidPrefix.ADC_FORMS,
99
- SemanticUuidPrefix_1.SemanticUuidPrefix.ADC_ADAPTATIONS,
100
- ],
101
- CarbonFootprintConfigurations: [
102
- SemanticUuidPrefix_1.SemanticUuidPrefix.CFC_CORPORATE,
103
- SemanticUuidPrefix_1.SemanticUuidPrefix.CFC_EVENT,
104
- SemanticUuidPrefix_1.SemanticUuidPrefix.CFC_PRODUCT,
105
- ],
106
- CompanyResources: [
107
- SemanticUuidPrefix_1.SemanticUuidPrefix.CPR_EVENTS,
108
- SemanticUuidPrefix_1.SemanticUuidPrefix.CPR_FACILITIES,
109
- SemanticUuidPrefix_1.SemanticUuidPrefix.CPR_PRODUCTS,
110
- ],
111
- EmissionCalculationFormulas: [
112
- SemanticUuidPrefix_1.SemanticUuidPrefix.ECF_VARIABLES,
113
- SemanticUuidPrefix_1.SemanticUuidPrefix.ECF_FACTORS,
114
- SemanticUuidPrefix_1.SemanticUuidPrefix.ECF_GWP,
115
- ],
116
- EmissionCalculationProcess: [
117
- SemanticUuidPrefix_1.SemanticUuidPrefix.ECP_JOBS,
118
- SemanticUuidPrefix_1.SemanticUuidPrefix.ECP_PROCESSES,
119
- SemanticUuidPrefix_1.SemanticUuidPrefix.ECP_WORKFLOWS,
120
- ],
121
- EmissionCalculationResults: [
122
- SemanticUuidPrefix_1.SemanticUuidPrefix.ECR_AGGREGATIONS,
123
- SemanticUuidPrefix_1.SemanticUuidPrefix.ECR_CALCULATIONS,
124
- SemanticUuidPrefix_1.SemanticUuidPrefix.ECR_GHG_RESULTS,
125
- ],
126
- Users: [
127
- SemanticUuidPrefix_1.SemanticUuidPrefix.USR,
128
- SemanticUuidPrefix_1.SemanticUuidPrefix.USR_STH_CLIENT,
129
- SemanticUuidPrefix_1.SemanticUuidPrefix.USR_STH_COORDINATOR,
130
- SemanticUuidPrefix_1.SemanticUuidPrefix.USR_STH_HOST,
131
- SemanticUuidPrefix_1.SemanticUuidPrefix.USR_STH_MANAGER,
132
- ],
133
- Shared: [
134
- SemanticUuidPrefix_1.SemanticUuidPrefix.SHR_DOMAIN,
135
- SemanticUuidPrefix_1.SemanticUuidPrefix.SHR_EITHER,
136
- ],
137
- SystemTechnicalConfiguration: [
138
- SemanticUuidPrefix_1.SemanticUuidPrefix.STC,
139
- ],
140
- };
141
- return contextMap[boundedContext] || [];
142
- }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(boundedContext, `Failed to get prefixes for bounded context: ${error}`));
143
- }
144
- /**
145
- * Validates a complete semantic UUID format
146
- */
147
- validateSemanticUuidFormat(semanticUuid) {
148
- return either_1.EitherFactory.fromTryCatch(() => {
149
- if (typeof semanticUuid !== 'string') {
150
- return false;
151
- }
152
- return this.SEMANTIC_UUID_REGEX.test(semanticUuid);
153
- }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(semanticUuid, `Failed to validate semantic UUID format: ${error}`));
154
- }
155
- /**
156
- * Extracts and validates the prefix from a semantic UUID
157
- */
158
- extractPrefix(semanticUuid) {
159
- return either_1.EitherFactory.fromTryCatch(() => {
160
- const parts = semanticUuid.split('_');
161
- if (parts.length !== 2) {
162
- throw InvalidSemanticUuidFormatError_1.InvalidSemanticUuidFormatError.create(semanticUuid, 'must contain exactly one underscore');
163
- }
164
- return parts[0];
165
- }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(semanticUuid, `Failed to extract prefix: ${error}`));
166
- }
167
- /**
168
- * Extracts and validates the UUID from a semantic UUID
169
- */
170
- extractUuid(semanticUuid) {
171
- return either_1.EitherFactory.fromTryCatch(() => {
172
- const parts = semanticUuid.split('_');
173
- if (parts.length !== 2) {
174
- throw InvalidSemanticUuidFormatError_1.InvalidSemanticUuidFormatError.create(semanticUuid, 'must contain exactly one underscore');
175
- }
176
- const uuid = parts[1];
177
- if (!this.UUID_REGEX.test(uuid)) {
178
- throw InvalidUuidFormatError_1.InvalidUuidFormatError.create(uuid, semanticUuid);
179
- }
180
- return uuid;
181
- }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(semanticUuid, `Failed to extract UUID: ${error}`));
182
- }
183
- /**
184
- * Extracts the bounded context code (first 3 letters) from a semantic UUID
185
- */
186
- extractBoundedContextCode(semanticUuid) {
187
- return either_1.EitherFactory.fromTryCatch(() => {
188
- const prefixResult = this.extractPrefix(semanticUuid);
189
- const prefix = prefixResult.fold((error) => { throw error; }, (p) => p);
190
- return prefix.substring(0, 3);
191
- }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(semanticUuid, `Failed to extract bounded context code: ${error}`));
192
- }
193
- /**
194
- * Extracts all subdomain parts from a semantic UUID
195
- */
196
- extractSubdomains(semanticUuid) {
197
- return either_1.EitherFactory.fromTryCatch(() => {
198
- const prefixResult = this.extractPrefix(semanticUuid);
199
- const prefix = prefixResult.fold((error) => { throw error; }, (p) => p);
200
- const parts = prefix.split('-');
201
- // Remove the first part (BC) and return the rest (SUB1, SUB2, ...)
202
- return parts.slice(1);
203
- }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(semanticUuid, `Failed to extract subdomains: ${error}`));
204
- }
205
- /**
206
- * Checks if a semantic UUID has subdomains or is BC-level only
207
- */
208
- hasSubdomains(semanticUuid) {
209
- return either_1.EitherFactory.fromTryCatch(() => {
210
- const subdomainsResult = this.extractSubdomains(semanticUuid);
211
- const subdomains = subdomainsResult.fold((error) => { throw error; }, (subs) => subs);
212
- return subdomains.length > 0;
213
- }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(semanticUuid, `Failed to check subdomains: ${error}`));
214
- }
215
- /**
216
- * Creates a human-readable log representation of a semantic UUID
217
- */
218
- toLogString(semanticUuid) {
219
- return either_1.EitherFactory.fromTryCatch(() => {
220
- const uuidResult = this.extractUuid(semanticUuid);
221
- const uuid = uuidResult.fold((error) => { throw error; }, (u) => u);
222
- const boundedContextResult = this.extractBoundedContextCode(semanticUuid);
223
- const boundedContextCode = boundedContextResult.fold((error) => { throw error; }, (bc) => bc);
224
- const subdomainsResult = this.extractSubdomains(semanticUuid);
225
- const subdomains = subdomainsResult.fold((error) => { throw error; }, (subs) => subs);
226
- if (subdomains.length === 0) {
227
- // BC-level entity (e.g., STC_uuid)
228
- return `[${boundedContextCode}] (${uuid.substring(0, 8)}...)`;
229
- }
230
- // Subdomain entity (e.g., USR-STH-CHO_uuid)
231
- return `[${boundedContextCode}:${subdomains.join(':')}] (${uuid.substring(0, 8)}...)`;
232
- }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(semanticUuid, `Failed to create log string: ${error}`));
233
- }
234
- }
235
- exports.SemanticUuidDomainService = SemanticUuidDomainService;
@@ -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,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,301 +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 _a, _ServiceCatalogReference_id, _ServiceCatalogReference_code, _ServiceCatalogReference_name, _ServiceCatalogReference_type, _ServiceCatalogReference_guardAgainstInvalidType, _ServiceCatalogReference_guardAgainstInvalidId, _ServiceCatalogReference_guardAgainstInvalidServiceCatalogCode, _ServiceCatalogReference_guardAgainstInvalidServiceCatalogName, _ServiceCatalogReference_guardAgainstInvalidServiceCatalogType;
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.ServiceCatalogReference = void 0;
16
- const InvalidPropertyTypeError_1 = require("../exceptions/InvalidPropertyTypeError");
17
- const ObjectValueObject_1 = require("./ObjectValueObject");
18
- const Code_1 = require("./Code");
19
- const String_1 = require("./String");
20
- const AggregateId_1 = require("./AggregateId");
21
- const ServiceCatalogType_1 = require("../../../purchase-management-system/service-catalog/domain/enums/ServiceCatalogType");
22
- class ServiceCatalogReference extends ObjectValueObject_1.ObjectValueObject {
23
- /**
24
- * Constructor protegido para que solo clases hijas puedan instanciar.
25
- * Aplica todas las validaciones de dominio al momento de construcción.
26
- */
27
- constructor(value, skipDomainValidation, propertyName = _a.DEFAULT_PROPERTY_NAME) {
28
- super(value, skipDomainValidation, propertyName, 'The provided value must be of type ServiceCatalogReference from the domain layer', { allowNull: false, allowUndefined: false });
29
- _ServiceCatalogReference_id.set(this, void 0);
30
- _ServiceCatalogReference_code.set(this, void 0);
31
- _ServiceCatalogReference_name.set(this, void 0);
32
- _ServiceCatalogReference_type.set(this, void 0);
33
- if (skipDomainValidation === false) {
34
- _a.validateServiceCatalogReference(value, propertyName);
35
- }
36
- __classPrivateFieldSet(this, _ServiceCatalogReference_id, value.id.trim(), "f");
37
- __classPrivateFieldSet(this, _ServiceCatalogReference_code, value.code.trim().toUpperCase(), "f");
38
- __classPrivateFieldSet(this, _ServiceCatalogReference_name, value.name.trim(), "f");
39
- __classPrivateFieldSet(this, _ServiceCatalogReference_type, value.type, "f");
40
- }
41
- /**
42
- * Validación estática para reutilización en factory methods y constructores.
43
- */
44
- static validateServiceCatalogReference(value, propertyName) {
45
- __classPrivateFieldGet(this, _a, "m", _ServiceCatalogReference_guardAgainstInvalidType).call(this, value, propertyName);
46
- __classPrivateFieldGet(this, _a, "m", _ServiceCatalogReference_guardAgainstInvalidId).call(this, value.id);
47
- __classPrivateFieldGet(this, _a, "m", _ServiceCatalogReference_guardAgainstInvalidServiceCatalogCode).call(this, value.code);
48
- __classPrivateFieldGet(this, _a, "m", _ServiceCatalogReference_guardAgainstInvalidServiceCatalogName).call(this, value.name);
49
- __classPrivateFieldGet(this, _a, "m", _ServiceCatalogReference_guardAgainstInvalidServiceCatalogType).call(this, value.type);
50
- }
51
- get id() {
52
- return __classPrivateFieldGet(this, _ServiceCatalogReference_id, "f");
53
- }
54
- /**
55
- * Código único del servicio (UUID).
56
- */
57
- get code() {
58
- return __classPrivateFieldGet(this, _ServiceCatalogReference_code, "f");
59
- }
60
- /**
61
- * Nombre descriptivo del servicio.
62
- */
63
- get name() {
64
- return __classPrivateFieldGet(this, _ServiceCatalogReference_name, "f");
65
- }
66
- /**
67
- * Tipo de servicio.
68
- */
69
- get type() {
70
- return __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f");
71
- }
72
- hasId(id) {
73
- return __classPrivateFieldGet(this, _ServiceCatalogReference_id, "f") === id.trim();
74
- }
75
- /**
76
- * Verifica si el servicio corresponde a un código específico.
77
- */
78
- hasCode(code) {
79
- return __classPrivateFieldGet(this, _ServiceCatalogReference_code, "f") === code.trim().toUpperCase();
80
- }
81
- /**
82
- * Verifica si el servicio tiene un nombre específico.
83
- */
84
- hasName(name) {
85
- return __classPrivateFieldGet(this, _ServiceCatalogReference_name, "f") === name.trim();
86
- }
87
- /**
88
- * Verifica si el servicio es de un tipo específico.
89
- */
90
- hasType(type) {
91
- return __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f") === type;
92
- }
93
- /**
94
- * Verifica si es un servicio base.
95
- */
96
- isBaseServiceCatalog() {
97
- return __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f") === ServiceCatalogType_1.ServiceCatalogType.BASE_SERVICE;
98
- }
99
- /**
100
- * Verifica si es un servicio adicional.
101
- */
102
- isAdditionalServiceCatalog() {
103
- return __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f") === ServiceCatalogType_1.ServiceCatalogType.ADDITIONAL_SERVICE;
104
- }
105
- /**
106
- * Verifica si es una característica de plataforma.
107
- */
108
- isPlatformFeature() {
109
- return __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f") === ServiceCatalogType_1.ServiceCatalogType.PLATFORM_FEATURE;
110
- }
111
- /**
112
- * Verifica si es un servicio dependiente.
113
- */
114
- isDependentServiceCatalog() {
115
- return __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f") === ServiceCatalogType_1.ServiceCatalogType.DEPENDENT_SERVICE;
116
- }
117
- /**
118
- * Verifica si es un servicio principal (base o adicional).
119
- */
120
- isPrincipalServiceCatalog() {
121
- return this.isBaseServiceCatalog() || this.isAdditionalServiceCatalog();
122
- }
123
- /**
124
- * Verifica si requiere dependencias.
125
- */
126
- requiresDependencies() {
127
- return this.isDependentServiceCatalog();
128
- }
129
- /**
130
- * Obtiene una representación legible del servicio.
131
- */
132
- getDisplayName() {
133
- return __classPrivateFieldGet(this, _ServiceCatalogReference_name, "f");
134
- }
135
- /**
136
- * Obtiene una representación completa con código y nombre.
137
- */
138
- getFullDisplayName() {
139
- return `${__classPrivateFieldGet(this, _ServiceCatalogReference_name, "f")} (${__classPrivateFieldGet(this, _ServiceCatalogReference_code, "f")})`;
140
- }
141
- /**
142
- * Obtiene una representación completa con código, nombre y tipo.
143
- */
144
- getFullDisplayNameWithType() {
145
- return `${__classPrivateFieldGet(this, _ServiceCatalogReference_name, "f")} (${__classPrivateFieldGet(this, _ServiceCatalogReference_code, "f")}) - ${__classPrivateFieldGet(this, _ServiceCatalogReference_type, "f")}`;
146
- }
147
- /**
148
- * Obtiene el nombre del tipo de servicio en formato legible.
149
- */
150
- getTypeDisplayName() {
151
- const typeNames = {
152
- [ServiceCatalogType_1.ServiceCatalogType.BASE_SERVICE]: 'Servicio Base',
153
- [ServiceCatalogType_1.ServiceCatalogType.ADDITIONAL_SERVICE]: 'Servicio Adicional',
154
- [ServiceCatalogType_1.ServiceCatalogType.PLATFORM_FEATURE]: 'Característica de Plataforma',
155
- [ServiceCatalogType_1.ServiceCatalogType.DEPENDENT_SERVICE]: 'Servicio Dependiente',
156
- };
157
- return typeNames[__classPrivateFieldGet(this, _ServiceCatalogReference_type, "f")] || __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f");
158
- }
159
- /**
160
- * Verifica si el nombre del servicio contiene un texto específico.
161
- * Útil para búsquedas parciales.
162
- */
163
- nameContains(searchText) {
164
- return __classPrivateFieldGet(this, _ServiceCatalogReference_name, "f").toLowerCase().includes(searchText.toLowerCase().trim());
165
- }
166
- /**
167
- * Verifica si el servicio coincide con un patrón de búsqueda en código, nombre o tipo.
168
- * Útil para filtros generales.
169
- */
170
- matches(searchText) {
171
- const trimmedSearch = searchText.toLowerCase().trim();
172
- return (__classPrivateFieldGet(this, _ServiceCatalogReference_code, "f").toLowerCase().includes(trimmedSearch)
173
- || __classPrivateFieldGet(this, _ServiceCatalogReference_name, "f").toLowerCase().includes(trimmedSearch)
174
- || __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f").toLowerCase().includes(trimmedSearch));
175
- }
176
- /**
177
- * Verifica si el servicio coincide con criterios específicos.
178
- */
179
- matchesCriteria(criteria) {
180
- if (criteria.code && !this.hasCode(criteria.code)) {
181
- return false;
182
- }
183
- if (criteria.name && !this.hasName(criteria.name)) {
184
- return false;
185
- }
186
- if (criteria.type && !this.hasType(criteria.type)) {
187
- return false;
188
- }
189
- if (criteria.searchText && !this.matches(criteria.searchText)) {
190
- return false;
191
- }
192
- return true;
193
- }
194
- /**
195
- * Compara la igualdad semántica con otra referencia de servicio.
196
- * Dos referencias son iguales si tienen el mismo código, nombre y tipo.
197
- */
198
- equals(other) {
199
- if (!(other instanceof _a)) {
200
- return false;
201
- }
202
- return (__classPrivateFieldGet(this, _ServiceCatalogReference_id, "f") === __classPrivateFieldGet(other, _ServiceCatalogReference_id, "f")
203
- && __classPrivateFieldGet(this, _ServiceCatalogReference_code, "f") === __classPrivateFieldGet(other, _ServiceCatalogReference_code, "f")
204
- && __classPrivateFieldGet(this, _ServiceCatalogReference_name, "f") === __classPrivateFieldGet(other, _ServiceCatalogReference_name, "f")
205
- && __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f") === __classPrivateFieldGet(other, _ServiceCatalogReference_type, "f"));
206
- }
207
- /**
208
- * Compara si dos referencias apuntan al mismo servicio
209
- * basándose únicamente en el código (identificador único).
210
- */
211
- hasSameServiceCatalog(other) {
212
- if (!(other instanceof _a)) {
213
- return false;
214
- }
215
- return __classPrivateFieldGet(this, _ServiceCatalogReference_code, "f") === __classPrivateFieldGet(other, _ServiceCatalogReference_code, "f");
216
- }
217
- /**
218
- * Verifica si es compatible con otro servicio para bundling.
219
- */
220
- isCompatibleForBundling(other) {
221
- if (!(other instanceof _a)) {
222
- return false;
223
- }
224
- // Un servicio no puede ser bundled consigo mismo
225
- if (this.hasSameServiceCatalog(other)) {
226
- return false;
227
- }
228
- // Lógica específica de compatibilidad basada en tipos
229
- if (this.isDependentServiceCatalog() && other.isBaseServiceCatalog()) {
230
- return true; // Servicios dependientes pueden ser bundled con servicios base
231
- }
232
- if (this.isBaseServiceCatalog() && other.isAdditionalServiceCatalog()) {
233
- return true; // Servicios base pueden ser bundled con servicios adicionales
234
- }
235
- if (this.isPlatformFeature()) {
236
- return true; // Las características de plataforma pueden ser bundled con cualquier servicio
237
- }
238
- return false;
239
- }
240
- /**
241
- * Genera un hash code para usar en colecciones.
242
- * Basado en el código de servicio, nombre y tipo.
243
- */
244
- hashCode() {
245
- return `${__classPrivateFieldGet(this, _ServiceCatalogReference_code, "f")}_${__classPrivateFieldGet(this, _ServiceCatalogReference_name, "f")}_${__classPrivateFieldGet(this, _ServiceCatalogReference_type, "f")}`;
246
- }
247
- /**
248
- * Convierte a representación primitiva para persistencia.
249
- */
250
- toPrimitives() {
251
- return {
252
- id: __classPrivateFieldGet(this, _ServiceCatalogReference_id, "f"),
253
- code: __classPrivateFieldGet(this, _ServiceCatalogReference_code, "f"),
254
- name: __classPrivateFieldGet(this, _ServiceCatalogReference_name, "f"),
255
- type: __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f"),
256
- };
257
- }
258
- /**
259
- * Representación como string (nombre del servicio).
260
- */
261
- toString() {
262
- return __classPrivateFieldGet(this, _ServiceCatalogReference_name, "f");
263
- }
264
- /**
265
- * Representación JSON para serialización.
266
- */
267
- toJSON() {
268
- return this.toPrimitives();
269
- }
270
- }
271
- exports.ServiceCatalogReference = ServiceCatalogReference;
272
- _a = ServiceCatalogReference, _ServiceCatalogReference_id = new WeakMap(), _ServiceCatalogReference_code = new WeakMap(), _ServiceCatalogReference_name = new WeakMap(), _ServiceCatalogReference_type = new WeakMap(), _ServiceCatalogReference_guardAgainstInvalidType = function _ServiceCatalogReference_guardAgainstInvalidType(value, propertyName) {
273
- if (!value || typeof value !== 'object') {
274
- throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'ServiceCatalogReference object', typeof value);
275
- }
276
- if (typeof value.id !== 'string') {
277
- throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('id', 'string', typeof value.id);
278
- }
279
- if (typeof value.code !== 'string') {
280
- throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('code', 'string', typeof value.code);
281
- }
282
- if (typeof value.name !== 'string') {
283
- throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('name', 'string', typeof value.name);
284
- }
285
- if (typeof value.type !== 'string') {
286
- throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('type', 'string', typeof value.type);
287
- }
288
- }, _ServiceCatalogReference_guardAgainstInvalidId = function _ServiceCatalogReference_guardAgainstInvalidId(id) {
289
- String_1.String.guardAgainstEmptyValue(id, 'id');
290
- AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
291
- }, _ServiceCatalogReference_guardAgainstInvalidServiceCatalogCode = function _ServiceCatalogReference_guardAgainstInvalidServiceCatalogCode(code) {
292
- String_1.String.guardAgainstEmptyValue(code, 'code');
293
- Code_1.Code.guardAgainstInvalidCode(code);
294
- }, _ServiceCatalogReference_guardAgainstInvalidServiceCatalogName = function _ServiceCatalogReference_guardAgainstInvalidServiceCatalogName(name) {
295
- String_1.String.guardAgainstEmptyValue(name, 'name');
296
- }, _ServiceCatalogReference_guardAgainstInvalidServiceCatalogType = function _ServiceCatalogReference_guardAgainstInvalidServiceCatalogType(type) {
297
- if (!Object.values(ServiceCatalogType_1.ServiceCatalogType).includes(type)) {
298
- throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('type', 'valid ServiceCatalogType', type);
299
- }
300
- };
301
- ServiceCatalogReference.DEFAULT_PROPERTY_NAME = 'serviceCatalogReference';
@@ -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,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,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,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,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StakeholderBusinessStatus = void 0;
4
- var StakeholderBusinessStatus;
5
- (function (StakeholderBusinessStatus) {
6
- StakeholderBusinessStatus["ACTIVE_IN_SYSTEM"] = "ACTIVE_IN_SYSTEM";
7
- StakeholderBusinessStatus["ONBOARDING_PENDING"] = "ONBOARDING_PENDING";
8
- StakeholderBusinessStatus["TEMPORARILY_SUSPENDED"] = "TEMPORARILY_SUSPENDED";
9
- StakeholderBusinessStatus["AWAITING_VERIFICATION"] = "AWAITING_VERIFICATION";
10
- })(StakeholderBusinessStatus || (exports.StakeholderBusinessStatus = StakeholderBusinessStatus = {}));
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InvalidStakeholderBusinessStatusError = void 0;
4
- const RootError_1 = require("../../../../shared/domain/exceptions/RootError");
5
- class InvalidStakeholderBusinessStatusError extends RootError_1.RootError {
6
- constructor(value, validStatuses) {
7
- const message = `Invalid stakeholder business status: '${value}'. Valid statuses are: ${validStatuses.join(', ')}.`;
8
- super(message);
9
- this.name = 'InvalidStakeholderBusinessStatusError';
10
- }
11
- static create(value, validStatuses) {
12
- return new InvalidStakeholderBusinessStatusError(value, validStatuses);
13
- }
14
- logError() {
15
- return `${this.name}: ${this.message}`;
16
- }
17
- }
18
- exports.InvalidStakeholderBusinessStatusError = InvalidStakeholderBusinessStatusError;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });