@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,301 @@
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';
@@ -10,158 +10,158 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
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
11
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
12
  };
13
- var _a, _ServiceReference_id, _ServiceReference_code, _ServiceReference_name, _ServiceReference_type, _ServiceReference_guardAgainstInvalidType, _ServiceReference_guardAgainstInvalidId, _ServiceReference_guardAgainstInvalidServiceCode, _ServiceReference_guardAgainstInvalidServiceName, _ServiceReference_guardAgainstInvalidServiceType;
13
+ var _a, _ServiceCatalogReference_id, _ServiceCatalogReference_code, _ServiceCatalogReference_name, _ServiceCatalogReference_type, _ServiceCatalogReference_guardAgainstInvalidType, _ServiceCatalogReference_guardAgainstInvalidId, _ServiceCatalogReference_guardAgainstInvalidServiceCatalogCode, _ServiceCatalogReference_guardAgainstInvalidServiceCatalogName, _ServiceCatalogReference_guardAgainstInvalidServiceCatalogType;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.ServiceReference = void 0;
15
+ exports.ServiceCatalogReference = void 0;
16
16
  const InvalidPropertyTypeError_1 = require("../exceptions/InvalidPropertyTypeError");
17
17
  const ObjectValueObject_1 = require("./ObjectValueObject");
18
18
  const Code_1 = require("./Code");
19
19
  const String_1 = require("./String");
20
20
  const AggregateId_1 = require("./AggregateId");
21
- const ServiceType_1 = require("../../../purchase-management-system/service-catalog/domain/enums/ServiceType");
22
- class ServiceReference extends ObjectValueObject_1.ObjectValueObject {
21
+ const ServiceCatalogType_1 = require("../../../purchase-management-system/service-catalog/domain/enums/ServiceCatalogType");
22
+ class ServiceCatalogReference extends ObjectValueObject_1.ObjectValueObject {
23
23
  /**
24
24
  * Constructor protegido para que solo clases hijas puedan instanciar.
25
25
  * Aplica todas las validaciones de dominio al momento de construcción.
26
26
  */
27
27
  constructor(value, skipDomainValidation, propertyName = _a.DEFAULT_PROPERTY_NAME) {
28
- super(value, skipDomainValidation, propertyName, 'The provided value must be of type ServiceReference from the domain layer', { allowNull: false, allowUndefined: false });
29
- _ServiceReference_id.set(this, void 0);
30
- _ServiceReference_code.set(this, void 0);
31
- _ServiceReference_name.set(this, void 0);
32
- _ServiceReference_type.set(this, void 0);
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
33
  if (skipDomainValidation === false) {
34
- _a.validateServiceReference(value, propertyName);
34
+ _a.validateServiceCatalogReference(value, propertyName);
35
35
  }
36
- __classPrivateFieldSet(this, _ServiceReference_id, value.id.trim(), "f");
37
- __classPrivateFieldSet(this, _ServiceReference_code, value.code.trim().toUpperCase(), "f");
38
- __classPrivateFieldSet(this, _ServiceReference_name, value.name.trim(), "f");
39
- __classPrivateFieldSet(this, _ServiceReference_type, value.type, "f");
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
40
  }
41
41
  /**
42
42
  * Validación estática para reutilización en factory methods y constructores.
43
43
  */
44
- static validateServiceReference(value, propertyName) {
45
- __classPrivateFieldGet(this, _a, "m", _ServiceReference_guardAgainstInvalidType).call(this, value, propertyName);
46
- __classPrivateFieldGet(this, _a, "m", _ServiceReference_guardAgainstInvalidId).call(this, value.id);
47
- __classPrivateFieldGet(this, _a, "m", _ServiceReference_guardAgainstInvalidServiceCode).call(this, value.code);
48
- __classPrivateFieldGet(this, _a, "m", _ServiceReference_guardAgainstInvalidServiceName).call(this, value.name);
49
- __classPrivateFieldGet(this, _a, "m", _ServiceReference_guardAgainstInvalidServiceType).call(this, value.type);
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
50
  }
51
51
  get id() {
52
- return __classPrivateFieldGet(this, _ServiceReference_id, "f");
52
+ return __classPrivateFieldGet(this, _ServiceCatalogReference_id, "f");
53
53
  }
54
54
  /**
55
55
  * Código único del servicio (UUID).
56
56
  */
57
57
  get code() {
58
- return __classPrivateFieldGet(this, _ServiceReference_code, "f");
58
+ return __classPrivateFieldGet(this, _ServiceCatalogReference_code, "f");
59
59
  }
60
60
  /**
61
61
  * Nombre descriptivo del servicio.
62
62
  */
63
63
  get name() {
64
- return __classPrivateFieldGet(this, _ServiceReference_name, "f");
64
+ return __classPrivateFieldGet(this, _ServiceCatalogReference_name, "f");
65
65
  }
66
66
  /**
67
67
  * Tipo de servicio.
68
68
  */
69
69
  get type() {
70
- return __classPrivateFieldGet(this, _ServiceReference_type, "f");
70
+ return __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f");
71
71
  }
72
72
  hasId(id) {
73
- return __classPrivateFieldGet(this, _ServiceReference_id, "f") === id.trim();
73
+ return __classPrivateFieldGet(this, _ServiceCatalogReference_id, "f") === id.trim();
74
74
  }
75
75
  /**
76
76
  * Verifica si el servicio corresponde a un código específico.
77
77
  */
78
78
  hasCode(code) {
79
- return __classPrivateFieldGet(this, _ServiceReference_code, "f") === code.trim().toUpperCase();
79
+ return __classPrivateFieldGet(this, _ServiceCatalogReference_code, "f") === code.trim().toUpperCase();
80
80
  }
81
81
  /**
82
82
  * Verifica si el servicio tiene un nombre específico.
83
83
  */
84
84
  hasName(name) {
85
- return __classPrivateFieldGet(this, _ServiceReference_name, "f") === name.trim();
85
+ return __classPrivateFieldGet(this, _ServiceCatalogReference_name, "f") === name.trim();
86
86
  }
87
87
  /**
88
88
  * Verifica si el servicio es de un tipo específico.
89
89
  */
90
90
  hasType(type) {
91
- return __classPrivateFieldGet(this, _ServiceReference_type, "f") === type;
91
+ return __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f") === type;
92
92
  }
93
93
  /**
94
94
  * Verifica si es un servicio base.
95
95
  */
96
- isBaseService() {
97
- return __classPrivateFieldGet(this, _ServiceReference_type, "f") === ServiceType_1.ServiceType.BASE_SERVICE;
96
+ isBaseServiceCatalog() {
97
+ return __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f") === ServiceCatalogType_1.ServiceCatalogType.BASE_SERVICE;
98
98
  }
99
99
  /**
100
100
  * Verifica si es un servicio adicional.
101
101
  */
102
- isAdditionalService() {
103
- return __classPrivateFieldGet(this, _ServiceReference_type, "f") === ServiceType_1.ServiceType.ADDITIONAL_SERVICE;
102
+ isAdditionalServiceCatalog() {
103
+ return __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f") === ServiceCatalogType_1.ServiceCatalogType.ADDITIONAL_SERVICE;
104
104
  }
105
105
  /**
106
106
  * Verifica si es una característica de plataforma.
107
107
  */
108
108
  isPlatformFeature() {
109
- return __classPrivateFieldGet(this, _ServiceReference_type, "f") === ServiceType_1.ServiceType.PLATFORM_FEATURE;
109
+ return __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f") === ServiceCatalogType_1.ServiceCatalogType.PLATFORM_FEATURE;
110
110
  }
111
111
  /**
112
112
  * Verifica si es un servicio dependiente.
113
113
  */
114
- isDependentService() {
115
- return __classPrivateFieldGet(this, _ServiceReference_type, "f") === ServiceType_1.ServiceType.DEPENDENT_SERVICE;
114
+ isDependentServiceCatalog() {
115
+ return __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f") === ServiceCatalogType_1.ServiceCatalogType.DEPENDENT_SERVICE;
116
116
  }
117
117
  /**
118
118
  * Verifica si es un servicio principal (base o adicional).
119
119
  */
120
- isPrincipalService() {
121
- return this.isBaseService() || this.isAdditionalService();
120
+ isPrincipalServiceCatalog() {
121
+ return this.isBaseServiceCatalog() || this.isAdditionalServiceCatalog();
122
122
  }
123
123
  /**
124
124
  * Verifica si requiere dependencias.
125
125
  */
126
126
  requiresDependencies() {
127
- return this.isDependentService();
127
+ return this.isDependentServiceCatalog();
128
128
  }
129
129
  /**
130
130
  * Obtiene una representación legible del servicio.
131
131
  */
132
132
  getDisplayName() {
133
- return __classPrivateFieldGet(this, _ServiceReference_name, "f");
133
+ return __classPrivateFieldGet(this, _ServiceCatalogReference_name, "f");
134
134
  }
135
135
  /**
136
136
  * Obtiene una representación completa con código y nombre.
137
137
  */
138
138
  getFullDisplayName() {
139
- return `${__classPrivateFieldGet(this, _ServiceReference_name, "f")} (${__classPrivateFieldGet(this, _ServiceReference_code, "f")})`;
139
+ return `${__classPrivateFieldGet(this, _ServiceCatalogReference_name, "f")} (${__classPrivateFieldGet(this, _ServiceCatalogReference_code, "f")})`;
140
140
  }
141
141
  /**
142
142
  * Obtiene una representación completa con código, nombre y tipo.
143
143
  */
144
144
  getFullDisplayNameWithType() {
145
- return `${__classPrivateFieldGet(this, _ServiceReference_name, "f")} (${__classPrivateFieldGet(this, _ServiceReference_code, "f")}) - ${__classPrivateFieldGet(this, _ServiceReference_type, "f")}`;
145
+ return `${__classPrivateFieldGet(this, _ServiceCatalogReference_name, "f")} (${__classPrivateFieldGet(this, _ServiceCatalogReference_code, "f")}) - ${__classPrivateFieldGet(this, _ServiceCatalogReference_type, "f")}`;
146
146
  }
147
147
  /**
148
148
  * Obtiene el nombre del tipo de servicio en formato legible.
149
149
  */
150
150
  getTypeDisplayName() {
151
151
  const typeNames = {
152
- [ServiceType_1.ServiceType.BASE_SERVICE]: 'Servicio Base',
153
- [ServiceType_1.ServiceType.ADDITIONAL_SERVICE]: 'Servicio Adicional',
154
- [ServiceType_1.ServiceType.PLATFORM_FEATURE]: 'Característica de Plataforma',
155
- [ServiceType_1.ServiceType.DEPENDENT_SERVICE]: 'Servicio Dependiente',
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
156
  };
157
- return typeNames[__classPrivateFieldGet(this, _ServiceReference_type, "f")] || __classPrivateFieldGet(this, _ServiceReference_type, "f");
157
+ return typeNames[__classPrivateFieldGet(this, _ServiceCatalogReference_type, "f")] || __classPrivateFieldGet(this, _ServiceCatalogReference_type, "f");
158
158
  }
159
159
  /**
160
160
  * Verifica si el nombre del servicio contiene un texto específico.
161
161
  * Útil para búsquedas parciales.
162
162
  */
163
163
  nameContains(searchText) {
164
- return __classPrivateFieldGet(this, _ServiceReference_name, "f").toLowerCase().includes(searchText.toLowerCase().trim());
164
+ return __classPrivateFieldGet(this, _ServiceCatalogReference_name, "f").toLowerCase().includes(searchText.toLowerCase().trim());
165
165
  }
166
166
  /**
167
167
  * Verifica si el servicio coincide con un patrón de búsqueda en código, nombre o tipo.
@@ -169,9 +169,9 @@ class ServiceReference extends ObjectValueObject_1.ObjectValueObject {
169
169
  */
170
170
  matches(searchText) {
171
171
  const trimmedSearch = searchText.toLowerCase().trim();
172
- return (__classPrivateFieldGet(this, _ServiceReference_code, "f").toLowerCase().includes(trimmedSearch)
173
- || __classPrivateFieldGet(this, _ServiceReference_name, "f").toLowerCase().includes(trimmedSearch)
174
- || __classPrivateFieldGet(this, _ServiceReference_type, "f").toLowerCase().includes(trimmedSearch));
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
175
  }
176
176
  /**
177
177
  * Verifica si el servicio coincide con criterios específicos.
@@ -199,20 +199,20 @@ class ServiceReference extends ObjectValueObject_1.ObjectValueObject {
199
199
  if (!(other instanceof _a)) {
200
200
  return false;
201
201
  }
202
- return (__classPrivateFieldGet(this, _ServiceReference_id, "f") === __classPrivateFieldGet(other, _ServiceReference_id, "f")
203
- && __classPrivateFieldGet(this, _ServiceReference_code, "f") === __classPrivateFieldGet(other, _ServiceReference_code, "f")
204
- && __classPrivateFieldGet(this, _ServiceReference_name, "f") === __classPrivateFieldGet(other, _ServiceReference_name, "f")
205
- && __classPrivateFieldGet(this, _ServiceReference_type, "f") === __classPrivateFieldGet(other, _ServiceReference_type, "f"));
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
206
  }
207
207
  /**
208
208
  * Compara si dos referencias apuntan al mismo servicio
209
209
  * basándose únicamente en el código (identificador único).
210
210
  */
211
- hasSameService(other) {
211
+ hasSameServiceCatalog(other) {
212
212
  if (!(other instanceof _a)) {
213
213
  return false;
214
214
  }
215
- return __classPrivateFieldGet(this, _ServiceReference_code, "f") === __classPrivateFieldGet(other, _ServiceReference_code, "f");
215
+ return __classPrivateFieldGet(this, _ServiceCatalogReference_code, "f") === __classPrivateFieldGet(other, _ServiceCatalogReference_code, "f");
216
216
  }
217
217
  /**
218
218
  * Verifica si es compatible con otro servicio para bundling.
@@ -222,14 +222,14 @@ class ServiceReference extends ObjectValueObject_1.ObjectValueObject {
222
222
  return false;
223
223
  }
224
224
  // Un servicio no puede ser bundled consigo mismo
225
- if (this.hasSameService(other)) {
225
+ if (this.hasSameServiceCatalog(other)) {
226
226
  return false;
227
227
  }
228
228
  // Lógica específica de compatibilidad basada en tipos
229
- if (this.isDependentService() && other.isBaseService()) {
229
+ if (this.isDependentServiceCatalog() && other.isBaseServiceCatalog()) {
230
230
  return true; // Servicios dependientes pueden ser bundled con servicios base
231
231
  }
232
- if (this.isBaseService() && other.isAdditionalService()) {
232
+ if (this.isBaseServiceCatalog() && other.isAdditionalServiceCatalog()) {
233
233
  return true; // Servicios base pueden ser bundled con servicios adicionales
234
234
  }
235
235
  if (this.isPlatformFeature()) {
@@ -242,24 +242,24 @@ class ServiceReference extends ObjectValueObject_1.ObjectValueObject {
242
242
  * Basado en el código de servicio, nombre y tipo.
243
243
  */
244
244
  hashCode() {
245
- return `${__classPrivateFieldGet(this, _ServiceReference_code, "f")}_${__classPrivateFieldGet(this, _ServiceReference_name, "f")}_${__classPrivateFieldGet(this, _ServiceReference_type, "f")}`;
245
+ return `${__classPrivateFieldGet(this, _ServiceCatalogReference_code, "f")}_${__classPrivateFieldGet(this, _ServiceCatalogReference_name, "f")}_${__classPrivateFieldGet(this, _ServiceCatalogReference_type, "f")}`;
246
246
  }
247
247
  /**
248
248
  * Convierte a representación primitiva para persistencia.
249
249
  */
250
250
  toPrimitives() {
251
251
  return {
252
- id: __classPrivateFieldGet(this, _ServiceReference_id, "f"),
253
- code: __classPrivateFieldGet(this, _ServiceReference_code, "f"),
254
- name: __classPrivateFieldGet(this, _ServiceReference_name, "f"),
255
- type: __classPrivateFieldGet(this, _ServiceReference_type, "f"),
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
256
  };
257
257
  }
258
258
  /**
259
259
  * Representación como string (nombre del servicio).
260
260
  */
261
261
  toString() {
262
- return __classPrivateFieldGet(this, _ServiceReference_name, "f");
262
+ return __classPrivateFieldGet(this, _ServiceCatalogReference_name, "f");
263
263
  }
264
264
  /**
265
265
  * Representación JSON para serialización.
@@ -268,10 +268,10 @@ class ServiceReference extends ObjectValueObject_1.ObjectValueObject {
268
268
  return this.toPrimitives();
269
269
  }
270
270
  }
271
- exports.ServiceReference = ServiceReference;
272
- _a = ServiceReference, _ServiceReference_id = new WeakMap(), _ServiceReference_code = new WeakMap(), _ServiceReference_name = new WeakMap(), _ServiceReference_type = new WeakMap(), _ServiceReference_guardAgainstInvalidType = function _ServiceReference_guardAgainstInvalidType(value, propertyName) {
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
273
  if (!value || typeof value !== 'object') {
274
- throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'ServiceReference object', typeof value);
274
+ throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(propertyName, 'ServiceCatalogReference object', typeof value);
275
275
  }
276
276
  if (typeof value.id !== 'string') {
277
277
  throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('id', 'string', typeof value.id);
@@ -285,17 +285,17 @@ _a = ServiceReference, _ServiceReference_id = new WeakMap(), _ServiceReference_c
285
285
  if (typeof value.type !== 'string') {
286
286
  throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('type', 'string', typeof value.type);
287
287
  }
288
- }, _ServiceReference_guardAgainstInvalidId = function _ServiceReference_guardAgainstInvalidId(id) {
288
+ }, _ServiceCatalogReference_guardAgainstInvalidId = function _ServiceCatalogReference_guardAgainstInvalidId(id) {
289
289
  String_1.String.guardAgainstEmptyValue(id, 'id');
290
290
  AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
291
- }, _ServiceReference_guardAgainstInvalidServiceCode = function _ServiceReference_guardAgainstInvalidServiceCode(code) {
291
+ }, _ServiceCatalogReference_guardAgainstInvalidServiceCatalogCode = function _ServiceCatalogReference_guardAgainstInvalidServiceCatalogCode(code) {
292
292
  String_1.String.guardAgainstEmptyValue(code, 'code');
293
293
  Code_1.Code.guardAgainstInvalidCode(code);
294
- }, _ServiceReference_guardAgainstInvalidServiceName = function _ServiceReference_guardAgainstInvalidServiceName(name) {
294
+ }, _ServiceCatalogReference_guardAgainstInvalidServiceCatalogName = function _ServiceCatalogReference_guardAgainstInvalidServiceCatalogName(name) {
295
295
  String_1.String.guardAgainstEmptyValue(name, 'name');
296
- }, _ServiceReference_guardAgainstInvalidServiceType = function _ServiceReference_guardAgainstInvalidServiceType(type) {
297
- if (!Object.values(ServiceType_1.ServiceType).includes(type)) {
298
- throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('type', 'valid ServiceType', type);
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
299
  }
300
300
  };
301
- ServiceReference.DEFAULT_PROPERTY_NAME = 'serviceReference';
301
+ ServiceCatalogReference.DEFAULT_PROPERTY_NAME = 'serviceCatalogReference';