@carbonbox/domain 0.2.3 → 0.2.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 (151) hide show
  1. package/build/carbonbox/activity-data-collection/collection-fields/domain/value-objects/CollectionFieldCollectionType.js +1 -1
  2. package/build/carbonbox/activity-data-collection/collection-fields/domain/value-objects/CollectionFieldDataType.js +3 -3
  3. package/build/carbonbox/activity-data-collection/collection-fields/domain/value-objects/CollectionFieldDefaultValue.js +2 -2
  4. package/build/carbonbox/activity-data-collection/conditional-logic/domain/value-objects/ConditionalFieldRuleAction.js +20 -16
  5. package/build/carbonbox/activity-data-collection/conditional-logic/domain/value-objects/ConditionalFieldRuleTriggerValue.js +14 -10
  6. package/build/carbonbox/activity-data-collection/contextual-labels/domain/value-objects/ContextualLabelLabelMappings.js +7 -7
  7. package/build/carbonbox/activity-data-collection/contextual-labels/domain/value-objects/ContextualLabelPlaceholderMappings.js +6 -6
  8. package/build/carbonbox/activity-data-collection/stakeholder-adaptations/domain/value-objects/StakeholderAdaptationFootprintType.js +1 -1
  9. package/build/carbonbox/activity-data-collection/stakeholder-adaptations/domain/value-objects/StakeholderAdaptationStakeholderType.js +1 -1
  10. package/build/carbonbox/emission-calculation-process/calculation-processes/domain/entity/CalculationProcess.js +2 -1
  11. package/build/carbonbox/purchase-management-system/service-catalog/domain/entity/IServiceCatalog.js +2 -0
  12. package/build/carbonbox/purchase-management-system/service-catalog/domain/entity/ServiceCatalog.js +263 -0
  13. package/build/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCatalogCategory.js +20 -0
  14. package/build/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCatalogStatus.js +9 -0
  15. package/build/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCatalogType.js +10 -0
  16. package/build/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCatalogCategoryError.js +19 -0
  17. package/build/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCatalogStatusError.js +19 -0
  18. package/build/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCatalogTypeError.js +19 -0
  19. package/build/carbonbox/purchase-management-system/service-catalog/domain/repository/IServiceCatalogRepository.js +2 -0
  20. package/build/carbonbox/purchase-management-system/service-catalog/domain/types/ServiceCatalogPrimitives.js +2 -0
  21. package/build/carbonbox/purchase-management-system/service-catalog/domain/types/ServiceCatalogProps.js +2 -0
  22. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogAdditionalUserRoles.js +131 -0
  23. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogAllowsDocumentReading.js +22 -0
  24. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogAllowsSectoralComparison.js +22 -0
  25. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogBasePricePercentage.js +140 -0
  26. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogCategory.js +247 -0
  27. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogCode.js +24 -0
  28. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogCreatedByStakeholder.js +26 -0
  29. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogDependsOnServiceCode.js +21 -0
  30. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogDescription.js +23 -0
  31. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogExpertDedicationLevel.js +212 -0
  32. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogFixedPriceAmount.js +193 -0
  33. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogHasBasePrice.js +22 -0
  34. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogHasFixedPrice.js +22 -0
  35. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogId.js +24 -0
  36. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIncludesCarbonBoxAcademy.js +22 -0
  37. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIncludesESGIndicators.js +22 -0
  38. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIsAvailableForCorporate.js +22 -0
  39. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIsAvailableForEvent.js +22 -0
  40. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIsAvailableForProduct.js +22 -0
  41. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIsRequiredService.js +22 -0
  42. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogMaxUsers.js +246 -0
  43. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogName.js +23 -0
  44. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogReportTypes.js +246 -0
  45. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogStatus.js +221 -0
  46. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogType.js +235 -0
  47. package/build/carbonbox/purchase-management-system/service-pricing/domain/value-objects/ServicePricingService.js +2 -2
  48. package/build/carbonbox/shared/domain/types/ServiceCatalogReference.js +2 -0
  49. package/build/carbonbox/shared/domain/types/ServiceCatalogReferencePrimitives.js +2 -0
  50. package/build/carbonbox/shared/domain/value-objects/ServiceCatalogReference.js +301 -0
  51. package/build/carbonbox/shared/domain/value-objects/ServiceReference.js +75 -75
  52. package/build/main/index.js +39 -37
  53. package/build/types/carbonbox/activity-data-collection/collection-fields/domain/value-objects/CollectionFieldDataType.d.ts +1 -1
  54. package/build/types/carbonbox/activity-data-collection/collection-fields/domain/value-objects/CollectionFieldDataType.d.ts.map +1 -1
  55. package/build/types/carbonbox/activity-data-collection/collection-fields/domain/value-objects/CollectionFieldDefaultValue.d.ts +1 -1
  56. package/build/types/carbonbox/activity-data-collection/collection-fields/domain/value-objects/CollectionFieldDefaultValue.d.ts.map +1 -1
  57. package/build/types/carbonbox/activity-data-collection/conditional-logic/domain/value-objects/ConditionalFieldRuleAction.d.ts +1 -4
  58. package/build/types/carbonbox/activity-data-collection/conditional-logic/domain/value-objects/ConditionalFieldRuleAction.d.ts.map +1 -1
  59. package/build/types/carbonbox/activity-data-collection/conditional-logic/domain/value-objects/ConditionalFieldRuleTriggerValue.d.ts +2 -5
  60. package/build/types/carbonbox/activity-data-collection/conditional-logic/domain/value-objects/ConditionalFieldRuleTriggerValue.d.ts.map +1 -1
  61. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/entity/IServiceCatalog.d.ts +52 -0
  62. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/entity/IServiceCatalog.d.ts.map +1 -0
  63. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/entity/ServiceCatalog.d.ts +60 -0
  64. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/entity/ServiceCatalog.d.ts.map +1 -0
  65. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCatalogCategory.d.ts +17 -0
  66. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCatalogCategory.d.ts.map +1 -0
  67. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCatalogStatus.d.ts +6 -0
  68. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCatalogStatus.d.ts.map +1 -0
  69. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCatalogType.d.ts +7 -0
  70. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCatalogType.d.ts.map +1 -0
  71. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCatalogCategoryError.d.ts +8 -0
  72. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCatalogCategoryError.d.ts.map +1 -0
  73. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCatalogStatusError.d.ts +8 -0
  74. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCatalogStatusError.d.ts.map +1 -0
  75. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCatalogTypeError.d.ts +8 -0
  76. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCatalogTypeError.d.ts.map +1 -0
  77. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/repository/IServiceCatalogRepository.d.ts +22 -0
  78. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/repository/IServiceCatalogRepository.d.ts.map +1 -0
  79. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/repository/IServiceRepository.d.ts +19 -19
  80. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/repository/IServiceRepository.d.ts.map +1 -1
  81. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/types/ServiceCatalogPrimitives.d.ts +35 -0
  82. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/types/ServiceCatalogPrimitives.d.ts.map +1 -0
  83. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/types/ServiceCatalogProps.d.ts +35 -0
  84. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/types/ServiceCatalogProps.d.ts.map +1 -0
  85. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogAdditionalUserRoles.d.ts +71 -0
  86. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogAdditionalUserRoles.d.ts.map +1 -0
  87. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogAllowsDocumentReading.d.ts +9 -0
  88. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogAllowsDocumentReading.d.ts.map +1 -0
  89. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogAllowsSectoralComparison.d.ts +9 -0
  90. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogAllowsSectoralComparison.d.ts.map +1 -0
  91. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogBasePricePercentage.d.ts +54 -0
  92. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogBasePricePercentage.d.ts.map +1 -0
  93. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogCategory.d.ts +120 -0
  94. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogCategory.d.ts.map +1 -0
  95. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogCode.d.ts +9 -0
  96. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogCode.d.ts.map +1 -0
  97. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogCreatedByStakeholder.d.ts +11 -0
  98. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogCreatedByStakeholder.d.ts.map +1 -0
  99. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogDependsOnServiceCode.d.ts +9 -0
  100. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogDependsOnServiceCode.d.ts.map +1 -0
  101. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogDescription.d.ts +9 -0
  102. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogDescription.d.ts.map +1 -0
  103. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogExpertDedicationLevel.d.ts +92 -0
  104. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogExpertDedicationLevel.d.ts.map +1 -0
  105. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogFixedPriceAmount.d.ts +83 -0
  106. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogFixedPriceAmount.d.ts.map +1 -0
  107. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogHasBasePrice.d.ts +9 -0
  108. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogHasBasePrice.d.ts.map +1 -0
  109. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogHasFixedPrice.d.ts +9 -0
  110. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogHasFixedPrice.d.ts.map +1 -0
  111. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogId.d.ts +9 -0
  112. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogId.d.ts.map +1 -0
  113. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIncludesCarbonBoxAcademy.d.ts +9 -0
  114. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIncludesCarbonBoxAcademy.d.ts.map +1 -0
  115. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIncludesESGIndicators.d.ts +9 -0
  116. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIncludesESGIndicators.d.ts.map +1 -0
  117. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIsAvailableForCorporate.d.ts +9 -0
  118. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIsAvailableForCorporate.d.ts.map +1 -0
  119. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIsAvailableForEvent.d.ts +9 -0
  120. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIsAvailableForEvent.d.ts.map +1 -0
  121. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIsAvailableForProduct.d.ts +9 -0
  122. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIsAvailableForProduct.d.ts.map +1 -0
  123. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIsRequiredService.d.ts +9 -0
  124. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogIsRequiredService.d.ts.map +1 -0
  125. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogMaxUsers.d.ts +99 -0
  126. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogMaxUsers.d.ts.map +1 -0
  127. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogName.d.ts +9 -0
  128. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogName.d.ts.map +1 -0
  129. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogReportTypes.d.ts +119 -0
  130. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogReportTypes.d.ts.map +1 -0
  131. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogStatus.d.ts +110 -0
  132. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogStatus.d.ts.map +1 -0
  133. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogType.d.ts +111 -0
  134. package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogType.d.ts.map +1 -0
  135. package/build/types/carbonbox/purchase-management-system/service-pricing/domain/types/ServicePricingPrimitives.d.ts +2 -2
  136. package/build/types/carbonbox/purchase-management-system/service-pricing/domain/types/ServicePricingPrimitives.d.ts.map +1 -1
  137. package/build/types/carbonbox/purchase-management-system/service-pricing/domain/types/ServicePricingProps.d.ts +2 -2
  138. package/build/types/carbonbox/purchase-management-system/service-pricing/domain/types/ServicePricingProps.d.ts.map +1 -1
  139. package/build/types/carbonbox/purchase-management-system/service-pricing/domain/value-objects/ServicePricingService.d.ts +7 -7
  140. package/build/types/carbonbox/purchase-management-system/service-pricing/domain/value-objects/ServicePricingService.d.ts.map +1 -1
  141. package/build/types/carbonbox/shared/domain/types/ServiceCatalogReference.d.ts +8 -0
  142. package/build/types/carbonbox/shared/domain/types/ServiceCatalogReference.d.ts.map +1 -0
  143. package/build/types/carbonbox/shared/domain/types/ServiceCatalogReferencePrimitives.d.ts +8 -0
  144. package/build/types/carbonbox/shared/domain/types/ServiceCatalogReferencePrimitives.d.ts.map +1 -0
  145. package/build/types/carbonbox/shared/domain/value-objects/ServiceCatalogReference.d.ts +134 -0
  146. package/build/types/carbonbox/shared/domain/value-objects/ServiceCatalogReference.d.ts.map +1 -0
  147. package/build/types/carbonbox/shared/domain/value-objects/ServiceReference.d.ts +18 -18
  148. package/build/types/carbonbox/shared/domain/value-objects/ServiceReference.d.ts.map +1 -1
  149. package/build/types/main/index.d.ts +22 -21
  150. package/build/types/main/index.d.ts.map +1 -1
  151. package/package.json +1 -1
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServiceCatalogIsAvailableForProduct = void 0;
4
+ const Boolean_1 = require("../../../../shared/domain/value-objects/Boolean");
5
+ class ServiceCatalogIsAvailableForProduct extends Boolean_1.Boolean {
6
+ constructor(value, skipDomainValidation) {
7
+ super(value, skipDomainValidation, ServiceCatalogIsAvailableForProduct.PROPERTY_NAME);
8
+ }
9
+ static create(value) {
10
+ Boolean_1.Boolean.guardAgainstInvalidType(value, ServiceCatalogIsAvailableForProduct.PROPERTY_NAME);
11
+ return new ServiceCatalogIsAvailableForProduct(value, false);
12
+ }
13
+ static fromPrimitives(primitive) {
14
+ const value = primitive;
15
+ return new ServiceCatalogIsAvailableForProduct(value, true);
16
+ }
17
+ toPrimitives() {
18
+ return this.value;
19
+ }
20
+ }
21
+ exports.ServiceCatalogIsAvailableForProduct = ServiceCatalogIsAvailableForProduct;
22
+ ServiceCatalogIsAvailableForProduct.PROPERTY_NAME = 'isAvailableForProduct';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServiceCatalogIsRequiredService = void 0;
4
+ const Boolean_1 = require("../../../../shared/domain/value-objects/Boolean");
5
+ class ServiceCatalogIsRequiredService extends Boolean_1.Boolean {
6
+ constructor(value, skipDomainValidation) {
7
+ super(value, skipDomainValidation, ServiceCatalogIsRequiredService.PROPERTY_NAME);
8
+ }
9
+ static create(value) {
10
+ Boolean_1.Boolean.guardAgainstInvalidType(value, ServiceCatalogIsRequiredService.PROPERTY_NAME);
11
+ return new ServiceCatalogIsRequiredService(value, false);
12
+ }
13
+ static fromPrimitives(primitive) {
14
+ const value = primitive;
15
+ return new ServiceCatalogIsRequiredService(value, true);
16
+ }
17
+ toPrimitives() {
18
+ return this.value;
19
+ }
20
+ }
21
+ exports.ServiceCatalogIsRequiredService = ServiceCatalogIsRequiredService;
22
+ ServiceCatalogIsRequiredService.PROPERTY_NAME = 'isRequiredService';
@@ -0,0 +1,246 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServiceCatalogMaxUsers = void 0;
4
+ const NullableNumeric_1 = require("../../../../shared/domain/value-objects/NullableNumeric");
5
+ class ServiceCatalogMaxUsers extends NullableNumeric_1.NullableNumeric {
6
+ constructor(value, skipDomainValidation) {
7
+ super(value, skipDomainValidation, ServiceCatalogMaxUsers.PROPERTY_NAME, ServiceCatalogMaxUsers.MAX_USERS_OPTIONS);
8
+ }
9
+ static create(value) {
10
+ return new ServiceCatalogMaxUsers(value, false);
11
+ }
12
+ static fromPrimitives(primitive) {
13
+ const value = primitive;
14
+ return new ServiceCatalogMaxUsers(value, true);
15
+ }
16
+ /**
17
+ * Verifica si no permite usuarios adicionales.
18
+ */
19
+ allowsNoAdditionalUsers() {
20
+ if (!this.hasValue())
21
+ return null;
22
+ return this.value === 0;
23
+ }
24
+ /**
25
+ * Verifica si es un límite bajo de usuarios (1-10).
26
+ */
27
+ isLowUserLimit() {
28
+ if (!this.hasValue())
29
+ return null;
30
+ return this.value > 0 && this.value <= 10;
31
+ }
32
+ /**
33
+ * Verifica si es un límite medio de usuarios (11-50).
34
+ */
35
+ isMediumUserLimit() {
36
+ if (!this.hasValue())
37
+ return null;
38
+ return this.value > 10 && this.value <= 50;
39
+ }
40
+ /**
41
+ * Verifica si es un límite alto de usuarios (51-200).
42
+ */
43
+ isHighUserLimit() {
44
+ if (!this.hasValue())
45
+ return null;
46
+ return this.value > 50 && this.value <= 200;
47
+ }
48
+ /**
49
+ * Verifica si es un límite enterprise de usuarios (>200).
50
+ */
51
+ isEnterpriseUserLimit() {
52
+ if (!this.hasValue())
53
+ return null;
54
+ return this.value > 200;
55
+ }
56
+ /**
57
+ * Verifica si permite usuarios adicionales.
58
+ */
59
+ allowsAdditionalUsers() {
60
+ if (!this.hasValue())
61
+ return null;
62
+ return this.value > 0;
63
+ }
64
+ /**
65
+ * Verifica si es un servicio de usuario único.
66
+ */
67
+ isSingleUser() {
68
+ if (!this.hasValue())
69
+ return null;
70
+ return this.value === 1;
71
+ }
72
+ /**
73
+ * Verifica si requiere licenciamiento especial (límites altos).
74
+ */
75
+ requiresSpecialLicensing() {
76
+ if (!this.hasValue())
77
+ return null;
78
+ return this.isEnterpriseUserLimit();
79
+ }
80
+ /**
81
+ * Obtiene la categoría de usuarios.
82
+ */
83
+ getUserCategory() {
84
+ if (!this.hasValue())
85
+ return null;
86
+ if (this.allowsNoAdditionalUsers())
87
+ return 'none';
88
+ if (this.isSingleUser())
89
+ return 'single';
90
+ if (this.isLowUserLimit())
91
+ return 'small';
92
+ if (this.isMediumUserLimit())
93
+ return 'medium';
94
+ if (this.isHighUserLimit())
95
+ return 'large';
96
+ if (this.isEnterpriseUserLimit())
97
+ return 'enterprise';
98
+ return null;
99
+ }
100
+ /**
101
+ * Obtiene el tipo de plan según el número de usuarios.
102
+ */
103
+ getPlanType() {
104
+ if (!this.hasValue())
105
+ return null;
106
+ if (this.value <= 10)
107
+ return 'basic';
108
+ if (this.value <= 50)
109
+ return 'standard';
110
+ if (this.value <= 200)
111
+ return 'professional';
112
+ return 'enterprise';
113
+ }
114
+ /**
115
+ * Calcula el costo adicional por usuario (basado en escalas).
116
+ */
117
+ calculateUserCost(costPerUser) {
118
+ if (!this.hasValue())
119
+ return null;
120
+ if (costPerUser < 0)
121
+ return null;
122
+ return this.value * costPerUser;
123
+ }
124
+ /**
125
+ * Calcula descuentos por volumen según el número de usuarios.
126
+ */
127
+ getVolumeDiscountRate() {
128
+ if (!this.hasValue())
129
+ return null;
130
+ // Escalas de descuento por volumen
131
+ if (this.value <= 10)
132
+ return 0; // Sin descuento
133
+ if (this.value <= 50)
134
+ return 0.05; // 5% descuento
135
+ if (this.value <= 200)
136
+ return 0.10; // 10% descuento
137
+ return 0.15; // 15% descuento para enterprise
138
+ }
139
+ /**
140
+ * Verifica si excede un límite específico.
141
+ */
142
+ exceedsLimit(limit) {
143
+ if (!this.hasValue())
144
+ return null;
145
+ return this.value > limit;
146
+ }
147
+ /**
148
+ * Verifica si está dentro de un rango de usuarios.
149
+ */
150
+ isWithinRange(minUsers, maxUsers) {
151
+ if (!this.hasValue())
152
+ return null;
153
+ return this.value >= minUsers && this.value <= maxUsers;
154
+ }
155
+ /**
156
+ * Obtiene la descripción del límite de usuarios.
157
+ */
158
+ getDescription() {
159
+ if (!this.hasValue())
160
+ return null;
161
+ const category = this.getUserCategory();
162
+ const descriptions = {
163
+ none: 'Sin usuarios adicionales permitidos',
164
+ single: 'Un usuario adicional',
165
+ small: 'Grupo pequeño (2-10 usuarios)',
166
+ medium: 'Grupo medio (11-50 usuarios)',
167
+ large: 'Grupo grande (51-200 usuarios)',
168
+ enterprise: 'Nivel empresarial (más de 200 usuarios)',
169
+ };
170
+ return descriptions[category] || `${this.value} usuarios máximo`;
171
+ }
172
+ /**
173
+ * Obtiene recomendaciones de uso.
174
+ */
175
+ getUsageRecommendations() {
176
+ if (!this.hasValue())
177
+ return null;
178
+ const category = this.getUserCategory();
179
+ const recommendations = {
180
+ none: ['Servicio individual', 'Sin colaboración multi-usuario'],
181
+ single: ['Ideal para asistentes', 'Soporte básico adicional'],
182
+ small: ['Equipos pequeños', 'Startups', 'Departamentos específicos'],
183
+ medium: ['Empresas medianas', 'Múltiples departamentos', 'Proyectos colaborativos'],
184
+ large: ['Grandes organizaciones', 'División corporativa', 'Múltiples ubicaciones'],
185
+ enterprise: ['Corporaciones', 'Multinacionales', 'Implementación masiva'],
186
+ };
187
+ return recommendations[category] || [];
188
+ }
189
+ /**
190
+ * Verifica si requiere infraestructura especial.
191
+ */
192
+ requiresSpecialInfrastructure() {
193
+ if (!this.hasValue())
194
+ return null;
195
+ // Más de 100 usuarios requiere infraestructura especial
196
+ return this.value > 100;
197
+ }
198
+ /**
199
+ * Obtiene las características del límite de usuarios.
200
+ */
201
+ getCharacteristics() {
202
+ if (!this.hasValue())
203
+ return null;
204
+ return {
205
+ allowsAdditionalUsers: this.allowsAdditionalUsers(),
206
+ userCategory: this.getUserCategory(),
207
+ planType: this.getPlanType(),
208
+ requiresSpecialLicensing: this.requiresSpecialLicensing(),
209
+ requiresSpecialInfrastructure: this.requiresSpecialInfrastructure(),
210
+ volumeDiscountRate: this.getVolumeDiscountRate(),
211
+ description: this.getDescription(),
212
+ usageRecommendations: this.getUsageRecommendations(),
213
+ };
214
+ }
215
+ /**
216
+ * Compara con otro límite de usuarios.
217
+ */
218
+ compareWith(other) {
219
+ if (!this.hasValue() || !other.hasValue())
220
+ return null;
221
+ return this.value - other.value;
222
+ }
223
+ toPrimitives() {
224
+ return this.value;
225
+ }
226
+ /**
227
+ * Representación como string descriptiva.
228
+ */
229
+ toString() {
230
+ if (!this.hasValue())
231
+ return 'No user limit defined';
232
+ if (this.value === 0)
233
+ return 'No additional users allowed';
234
+ return `Maximum ${this.value} additional users`;
235
+ }
236
+ }
237
+ exports.ServiceCatalogMaxUsers = ServiceCatalogMaxUsers;
238
+ ServiceCatalogMaxUsers.PROPERTY_NAME = 'maxUsers';
239
+ ServiceCatalogMaxUsers.MAX_USERS_OPTIONS = {
240
+ allowNegative: false, // El número de usuarios no puede ser negativo
241
+ allowZero: true, // Permitir 0 usuarios adicionales (servicio sin extensión de usuarios)
242
+ allowDecimals: false, // Los usuarios deben ser números enteros
243
+ maxDecimalPlaces: 0, // Sin decimales para conteo de usuarios
244
+ minValue: 0, // Valor mínimo es cero
245
+ maxValue: 10000, // Valor máximo razonable para usuarios adicionales
246
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServiceCatalogName = void 0;
4
+ const String_1 = require("../../../../shared/domain/value-objects/String");
5
+ class ServiceCatalogName extends String_1.String {
6
+ constructor(value, skipDomainValidation) {
7
+ super(value, skipDomainValidation, ServiceCatalogName.PROPERTY_NAME);
8
+ }
9
+ static create(value) {
10
+ String_1.String.guardAgainstEmptyValue(value, ServiceCatalogName.PROPERTY_NAME);
11
+ String_1.String.guardAgainstInvalidType(value, ServiceCatalogName.PROPERTY_NAME);
12
+ return new ServiceCatalogName(value, false);
13
+ }
14
+ static fromPrimitives(primitive) {
15
+ const value = primitive;
16
+ return new ServiceCatalogName(value, true);
17
+ }
18
+ toPrimitives() {
19
+ return this.value;
20
+ }
21
+ }
22
+ exports.ServiceCatalogName = ServiceCatalogName;
23
+ ServiceCatalogName.PROPERTY_NAME = 'name';
@@ -0,0 +1,246 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServiceCatalogReportTypes = void 0;
4
+ const StringList_1 = require("../../../../shared/domain/value-objects/StringList");
5
+ const ReportType_1 = require("../enums/ReportType");
6
+ const InvalidReportTypeError_1 = require("../exceptions/InvalidReportTypeError");
7
+ class ServiceCatalogReportTypes extends StringList_1.StringList {
8
+ constructor(reportTypes, skipDomainValidation) {
9
+ super(reportTypes, skipDomainValidation, ServiceCatalogReportTypes.PROPERTY_NAME, { allowEmpty: true });
10
+ if (skipDomainValidation === false) {
11
+ this.validateReportTypes(reportTypes);
12
+ }
13
+ }
14
+ static create(reportTypes) {
15
+ StringList_1.StringList.guardAgainstInvalidStringList(reportTypes, ServiceCatalogReportTypes.PROPERTY_NAME);
16
+ return new ServiceCatalogReportTypes(reportTypes, false);
17
+ }
18
+ static fromPrimitives(primitives) {
19
+ const value = primitives.map((primitive) => primitive);
20
+ return new ServiceCatalogReportTypes(value, true);
21
+ }
22
+ /**
23
+ * Valida que todos los tipos de reporte sean válidos.
24
+ */
25
+ validateReportTypes(reportTypes) {
26
+ for (const reportType of reportTypes) {
27
+ if (!ServiceCatalogReportTypes.VALID_REPORT_TYPES.includes(reportType)) {
28
+ throw InvalidReportTypeError_1.InvalidReportTypeError.create(reportType, ServiceCatalogReportTypes.VALID_REPORT_TYPES);
29
+ }
30
+ }
31
+ }
32
+ /**
33
+ * Verifica si incluye reportes auditables.
34
+ */
35
+ includesAuditableReports() {
36
+ return this.value.includes(ReportType_1.ReportType.AUDITABLE);
37
+ }
38
+ /**
39
+ * Verifica si incluye reportes técnicos.
40
+ */
41
+ includesTechnicalReports() {
42
+ return this.value.includes(ReportType_1.ReportType.TECHNICAL);
43
+ }
44
+ /**
45
+ * Verifica si incluye reportes ejecutivos.
46
+ */
47
+ includesExecutiveReports() {
48
+ return this.value.includes(ReportType_1.ReportType.EXECUTIVE);
49
+ }
50
+ /**
51
+ * Verifica si incluye múltiples tipos de reporte.
52
+ */
53
+ hasMultipleReportTypes() {
54
+ return this.value.length > 1;
55
+ }
56
+ /**
57
+ * Verifica si incluye todos los tipos de reporte.
58
+ */
59
+ includesAllReportTypes() {
60
+ return this.value.length === ServiceCatalogReportTypes.VALID_REPORT_TYPES.length
61
+ && ServiceCatalogReportTypes.VALID_REPORT_TYPES.every((type) => this.value.includes(type));
62
+ }
63
+ /**
64
+ * Verifica si solo incluye reportes de cumplimiento (auditables).
65
+ */
66
+ isComplianceOnly() {
67
+ return this.value.length === 1 && this.includesAuditableReports();
68
+ }
69
+ /**
70
+ * Verifica si solo incluye reportes técnicos.
71
+ */
72
+ isTechnicalOnly() {
73
+ return this.value.length === 1 && this.includesTechnicalReports();
74
+ }
75
+ /**
76
+ * Verifica si solo incluye reportes ejecutivos.
77
+ */
78
+ isExecutiveOnly() {
79
+ return this.value.length === 1 && this.includesExecutiveReports();
80
+ }
81
+ /**
82
+ * Verifica si incluye reportes para audiencias técnicas.
83
+ */
84
+ includesTechnicalAudience() {
85
+ return this.includesTechnicalReports() || this.includesAuditableReports();
86
+ }
87
+ /**
88
+ * Verifica si incluye reportes para audiencias ejecutivas.
89
+ */
90
+ includesExecutiveAudience() {
91
+ return this.includesExecutiveReports();
92
+ }
93
+ /**
94
+ * Obtiene los tipos de reporte válidos.
95
+ */
96
+ static getValidReportTypes() {
97
+ return Object.freeze([...ServiceCatalogReportTypes.VALID_REPORT_TYPES]);
98
+ }
99
+ /**
100
+ * Verifica si un valor es un tipo de reporte válido.
101
+ */
102
+ static isValidReportType(reportType) {
103
+ return ServiceCatalogReportTypes.VALID_REPORT_TYPES.includes(reportType);
104
+ }
105
+ /**
106
+ * Agrega un nuevo tipo de reporte si no está ya presente.
107
+ */
108
+ addReportType(reportType) {
109
+ if (this.value.includes(reportType)) {
110
+ return this;
111
+ }
112
+ const newReportTypes = [...this.value, reportType];
113
+ return new ServiceCatalogReportTypes(newReportTypes, false);
114
+ }
115
+ /**
116
+ * Remueve un tipo de reporte específico.
117
+ */
118
+ removeReportType(reportType) {
119
+ const newReportTypes = this.value.filter((type) => type !== reportType);
120
+ return new ServiceCatalogReportTypes(newReportTypes, false);
121
+ }
122
+ /**
123
+ * Obtiene los tipos de reporte faltantes.
124
+ */
125
+ getMissingReportTypes() {
126
+ return ServiceCatalogReportTypes.VALID_REPORT_TYPES.filter((type) => !this.value.includes(type));
127
+ }
128
+ /**
129
+ * Obtiene el nivel de cobertura de reportes.
130
+ */
131
+ getCoverageLevel() {
132
+ if (this.value.length === 0)
133
+ return 'none';
134
+ if (this.value.length === 1)
135
+ return 'basic';
136
+ if (this.value.length === 2)
137
+ return 'standard';
138
+ return 'comprehensive';
139
+ }
140
+ /**
141
+ * Obtiene las audiencias objetivo de los reportes.
142
+ */
143
+ getTargetAudiences() {
144
+ const audiences = [];
145
+ if (this.includesAuditableReports()) {
146
+ audiences.push('Auditores externos', 'Organismos regulatorios');
147
+ }
148
+ if (this.includesTechnicalReports()) {
149
+ audiences.push('Equipos técnicos', 'Especialistas en sostenibilidad');
150
+ }
151
+ if (this.includesExecutiveReports()) {
152
+ audiences.push('Alta dirección', 'Stakeholders externos');
153
+ }
154
+ return audiences;
155
+ }
156
+ /**
157
+ * Obtiene las características de los tipos de reporte.
158
+ */
159
+ getReportCharacteristics() {
160
+ const characteristics = {};
161
+ if (this.includesAuditableReports()) {
162
+ characteristics[ReportType_1.ReportType.AUDITABLE] = {
163
+ purpose: 'Cumplimiento y verificación',
164
+ audience: 'Auditores y reguladores',
165
+ detail: 'Alto nivel de detalle y trazabilidad',
166
+ format: 'Formal y estructurado',
167
+ };
168
+ }
169
+ if (this.includesTechnicalReports()) {
170
+ characteristics[ReportType_1.ReportType.TECHNICAL] = {
171
+ purpose: 'Análisis técnico detallado',
172
+ audience: 'Equipos técnicos y especialistas',
173
+ detail: 'Datos técnicos y metodológicos',
174
+ format: 'Detallado con anexos técnicos',
175
+ };
176
+ }
177
+ if (this.includesExecutiveReports()) {
178
+ characteristics[ReportType_1.ReportType.EXECUTIVE] = {
179
+ purpose: 'Resumen ejecutivo y toma de decisiones',
180
+ audience: 'Alta dirección y stakeholders',
181
+ detail: 'Resumen con insights clave',
182
+ format: 'Visual y fácil de entender',
183
+ };
184
+ }
185
+ return characteristics;
186
+ }
187
+ /**
188
+ * Verifica si requiere recursos especializados.
189
+ */
190
+ requiresSpecializedResources() {
191
+ // Múltiples tipos de reporte requieren recursos especializados
192
+ return this.hasMultipleReportTypes() || this.includesAuditableReports();
193
+ }
194
+ /**
195
+ * Obtiene una descripción de los tipos de reporte incluidos.
196
+ */
197
+ getDescription() {
198
+ if (this.value.length === 0) {
199
+ return 'Sin tipos de reporte definidos';
200
+ }
201
+ const typeDescriptions = {
202
+ [ReportType_1.ReportType.AUDITABLE]: 'Reportes Auditables',
203
+ [ReportType_1.ReportType.TECHNICAL]: 'Reportes Técnicos',
204
+ [ReportType_1.ReportType.EXECUTIVE]: 'Reportes Ejecutivos',
205
+ };
206
+ const descriptions = this.value.map((type) => typeDescriptions[type]);
207
+ return descriptions.join(', ');
208
+ }
209
+ /**
210
+ * Convierte los tipos de reporte a enum para uso tipado.
211
+ */
212
+ toEnumArray() {
213
+ return this.value;
214
+ }
215
+ /**
216
+ * Obtiene el número de tipos de reporte únicos.
217
+ */
218
+ getReportTypeCount() {
219
+ return this.value.length;
220
+ }
221
+ /**
222
+ * Verifica si está vacío (sin tipos de reporte).
223
+ */
224
+ isEmpty() {
225
+ return this.value.length === 0;
226
+ }
227
+ toPrimitives() {
228
+ return this.value;
229
+ }
230
+ /**
231
+ * Representación como string descriptiva.
232
+ */
233
+ toString() {
234
+ if (this.isEmpty()) {
235
+ return 'No report types';
236
+ }
237
+ return this.getDescription();
238
+ }
239
+ toEnums() {
240
+ return this.value;
241
+ }
242
+ }
243
+ exports.ServiceCatalogReportTypes = ServiceCatalogReportTypes;
244
+ ServiceCatalogReportTypes.PROPERTY_NAME = 'reportTypes';
245
+ // Tipos de reporte válidos
246
+ ServiceCatalogReportTypes.VALID_REPORT_TYPES = Object.values(ReportType_1.ReportType);