@carbonbox/domain 0.4.9 → 0.4.11

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 (125) hide show
  1. package/build/carbonbox/activity-data-collection/activity-data-submissions/domain/value-objects/ActivityDataSubmissionId.js +1 -1
  2. package/build/carbonbox/activity-data-collection/collection-fields/domain/value-objects/CollectionFieldId.js +1 -1
  3. package/build/carbonbox/activity-data-collection/conditional-logic/domain/value-objects/ConditionalFieldRuleId.js +1 -1
  4. package/build/carbonbox/activity-data-collection/contextual-labels/domain/value-objects/ContextualLabelId.js +1 -1
  5. package/build/carbonbox/activity-data-collection/dynamic-forms/domain/value-objects/DynamicFormId.js +1 -1
  6. package/build/carbonbox/activity-data-collection/stakeholder-adaptations/domain/value-objects/StakeholderAdaptationId.js +1 -1
  7. package/build/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationId.js +1 -1
  8. package/build/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/segments/domain/value-objects/CorporateConfigurationCarbonFootprintSegmentId.js +1 -1
  9. package/build/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/segments/subsegments/domain/value-objects/CorporateConfigurationCarbonFootprintSubsegmentId.js +1 -1
  10. package/build/carbonbox/carbon-footprint-configurations/corporate-configurations/domain/value-objects/CorporateCarbonFootprintConfigurationId.js +1 -1
  11. package/build/carbonbox/carbon-footprint-configurations/event-configurations/domain/value-objects/EventCarbonFootprintConfigurationId.js +1 -1
  12. package/build/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/domain/value-objects/EventEditionLifecycleStageConfigurationId.js +1 -1
  13. package/build/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/event-edition-lifecycle-stages/domain/value-objects/EventEditionLifecycleStageId.js +1 -1
  14. package/build/carbonbox/carbon-footprint-configurations/product-configurations/domain/value-objects/ProductCarbonFootprintConfigurationId.js +1 -1
  15. package/build/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/domain/value-objects/ProductCarbonFootprintSegmentConfigurationId.js +1 -1
  16. package/build/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/segments/domain/value-objects/ProductConfigurationCarbonFootprintSegmentId.js +1 -1
  17. package/build/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/segments/subsegments/domain/value-objects/ProductConfigurationCarbonFootprintSubsegmentId.js +1 -1
  18. package/build/carbonbox/carbon-footprint-configurations/product-configurations/system-boundaries/domain/value-objects/ProductConfigurationSystemBoundaryId.js +1 -1
  19. package/build/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintConfigurationId.js +1 -1
  20. package/build/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintConfigurationIntensityIndicatorConfigurations.js +1 -1
  21. package/build/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintIntensityIndicatorId.js +1 -1
  22. package/build/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintSegmentId.js +1 -1
  23. package/build/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintSubsegmentId.js +1 -1
  24. package/build/carbonbox/company-resources/events/domain/value-objects/EventId.js +1 -1
  25. package/build/carbonbox/company-resources/events/editions/domain/value-objects/EventEditionId.js +1 -1
  26. package/build/carbonbox/company-resources/facilities/domain/value-objects/FacilityId.js +1 -1
  27. package/build/carbonbox/company-resources/products/domain/value-objects/ProductId.js +1 -1
  28. package/build/carbonbox/emission-calculation-formulas/calculation-variables/domain/value-objects/CalculationVariableActivityDataConditions.js +1 -1
  29. package/build/carbonbox/emission-calculation-formulas/calculation-variables/domain/value-objects/CalculationVariableId.js +1 -1
  30. package/build/carbonbox/emission-calculation-formulas/domain/value-objects/EmissionCalculationFormulaId.js +1 -1
  31. package/build/carbonbox/emission-calculation-formulas/emission-factors/domain/value-objects/EmissionFactorId.js +1 -1
  32. package/build/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/value-objects/GlobalWarmingPotentialId.js +1 -1
  33. package/build/carbonbox/emission-calculation-process/calculation-jobs/domain/value-objects/CalculationJobId.js +1 -1
  34. package/build/carbonbox/emission-calculation-process/calculation-processes/domain/value-objects/CalculationProcessId.js +1 -1
  35. package/build/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowId.js +1 -1
  36. package/build/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowParallelJobs.js +1 -1
  37. package/build/carbonbox/emission-calculation-results/emission-aggregations/domain/value-objects/EmissionAggregationId.js +1 -1
  38. package/build/carbonbox/emission-calculation-results/emission-calculations/domain/value-objects/EmissionCalculationId.js +1 -1
  39. package/build/carbonbox/emission-calculation-results/ghg-emission-results/domain/value-objects/GHGEmissionResultId.js +1 -1
  40. package/build/carbonbox/purchase-management-system/purchase-contracts/domain/value-objects/PurchaseContractCarbonClientId.js +1 -1
  41. package/build/carbonbox/purchase-management-system/purchase-contracts/domain/value-objects/PurchaseContractContractAmendments.js +1 -1
  42. package/build/carbonbox/purchase-management-system/purchase-contracts/domain/value-objects/PurchaseContractId.js +1 -1
  43. package/build/carbonbox/purchase-management-system/purchase-orders/domain/value-objects/PurchaseOrderCarbonClientId.js +1 -1
  44. package/build/carbonbox/purchase-management-system/purchase-orders/domain/value-objects/PurchaseOrderId.js +1 -1
  45. package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogId.js +1 -1
  46. package/build/carbonbox/purchase-management-system/service-pricing/domain/value-objects/ServicePricingId.js +1 -1
  47. package/build/carbonbox/shared/domain/authorization/value-objects/SecurityContext.js +1 -1
  48. package/build/carbonbox/shared/domain/enums/SemanticUuidPrefix.js +65 -0
  49. package/build/carbonbox/shared/domain/exceptions/InvalidSemanticUuidError.js +19 -0
  50. package/build/carbonbox/shared/domain/exceptions/InvalidSemanticUuidFormatError.js +19 -0
  51. package/build/carbonbox/shared/domain/exceptions/InvalidUserIdFormatError.js +19 -0
  52. package/build/carbonbox/shared/domain/exceptions/InvalidUserPrefixError.js +19 -0
  53. package/build/carbonbox/shared/domain/exceptions/InvalidUuidFormatError.js +19 -0
  54. package/build/carbonbox/shared/domain/exceptions/UnknownBoundedContextCodeError.js +19 -0
  55. package/build/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.js +2 -0
  56. package/build/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.js +235 -0
  57. package/build/carbonbox/shared/domain/value-objects/ActivityDataSubmissionReference.js +1 -1
  58. package/build/carbonbox/shared/domain/value-objects/AggregateId.js +105 -10
  59. package/build/carbonbox/shared/domain/value-objects/AggregateIdList.js +1 -1
  60. package/build/carbonbox/shared/domain/value-objects/CalculationProcessReference.js +3 -3
  61. package/build/carbonbox/shared/domain/value-objects/CalculationVariableReferences.js +1 -1
  62. package/build/carbonbox/shared/domain/value-objects/CarbonClientReference.js +1 -1
  63. package/build/carbonbox/shared/domain/value-objects/CarbonFootprintConfigurationReference.js +1 -1
  64. package/build/carbonbox/shared/domain/value-objects/CarbonFootprintIntensityIndicatorReference.js +1 -1
  65. package/build/carbonbox/shared/domain/value-objects/CarbonFootprintSegmentReferences.js +1 -1
  66. package/build/carbonbox/shared/domain/value-objects/CollectionFieldReference.js +1 -1
  67. package/build/carbonbox/shared/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationReferences.js +2 -2
  68. package/build/carbonbox/shared/domain/value-objects/CorporateConfigurationCarbonFootprintSegmentReference.js +1 -1
  69. package/build/carbonbox/shared/domain/value-objects/CorporateConfigurationCarbonFootprintSubsegmentReference.js +1 -1
  70. package/build/carbonbox/shared/domain/value-objects/EmissionCalculationFormulaReference.js +1 -1
  71. package/build/carbonbox/shared/domain/value-objects/EmissionCalculationReference.js +1 -1
  72. package/build/carbonbox/shared/domain/value-objects/EmissionFactorReference.js +1 -1
  73. package/build/carbonbox/shared/domain/value-objects/EventEditionConfigurationCarbonFootprintSubsegmentReference.js +1 -1
  74. package/build/carbonbox/shared/domain/value-objects/EventEditionConfigurationCarbonFootprintSubsegmentReferences.js +1 -1
  75. package/build/carbonbox/shared/domain/value-objects/EventEditionLifecycleStageConfigurationReferences.js +2 -2
  76. package/build/carbonbox/shared/domain/value-objects/EventEditionLifecycleStageReference.js +1 -1
  77. package/build/carbonbox/shared/domain/value-objects/EventEditionReference.js +1 -1
  78. package/build/carbonbox/shared/domain/value-objects/EventEditionReferences.js +1 -1
  79. package/build/carbonbox/shared/domain/value-objects/EventReference.js +1 -1
  80. package/build/carbonbox/shared/domain/value-objects/FacilityReference.js +1 -1
  81. package/build/carbonbox/shared/domain/value-objects/GlobalWarmingPotentialReference.js +1 -1
  82. package/build/carbonbox/shared/domain/value-objects/NullableCorporateConfigurationCarbonFootprintSubsegmentReference.js +1 -1
  83. package/build/carbonbox/shared/domain/value-objects/NullableEventEditionConfigurationCarbonFootprintSubsegmentReference.js +1 -1
  84. package/build/carbonbox/shared/domain/value-objects/NullableProductConfigurationCarbonFootprintSubsegmentReference.js +1 -1
  85. package/build/carbonbox/shared/domain/value-objects/ProductCarbonFootprintSegmentConfigurationReferences.js +2 -2
  86. package/build/carbonbox/shared/domain/value-objects/ProductConfigurationCarbonFootprintSegmentReference.js +1 -1
  87. package/build/carbonbox/shared/domain/value-objects/ProductConfigurationCarbonFootprintSubsegmentReference.js +1 -1
  88. package/build/carbonbox/shared/domain/value-objects/ProductConfigurationSystemBoundaryReference.js +1 -1
  89. package/build/carbonbox/shared/domain/value-objects/ProductReference.js +1 -1
  90. package/build/carbonbox/shared/domain/value-objects/ServiceCatalogReference.js +1 -1
  91. package/build/carbonbox/shared/domain/value-objects/StakeholderReference.js +1 -1
  92. package/build/carbonbox/shared/domain/value-objects/StakeholderReferences.js +1 -1
  93. package/build/carbonbox/shared/domain/value-objects/UserId.js +129 -1
  94. package/build/carbonbox/stakeholders/carbon-clients/domain/value-objects/CarbonClientId.js +1 -1
  95. package/build/carbonbox/stakeholders/carbon-coordinators/domain/value-objects/CarbonCoordinatorId.js +1 -1
  96. package/build/carbonbox/stakeholders/carbon-host/domain/value-objects/CarbonHostId.js +1 -1
  97. package/build/carbonbox/stakeholders/carbon-managers/domain/value-objects/CarbonManagerId.js +1 -1
  98. package/build/carbonbox/stakeholders/shared/domain/value-objects/StakeholderId.js +1 -1
  99. package/build/main/index.js +26 -6
  100. package/build/types/carbonbox/shared/domain/enums/SemanticUuidPrefix.d.ts +48 -0
  101. package/build/types/carbonbox/shared/domain/enums/SemanticUuidPrefix.d.ts.map +1 -0
  102. package/build/types/carbonbox/shared/domain/exceptions/InvalidSemanticUuidError.d.ts +8 -0
  103. package/build/types/carbonbox/shared/domain/exceptions/InvalidSemanticUuidError.d.ts.map +1 -0
  104. package/build/types/carbonbox/shared/domain/exceptions/InvalidSemanticUuidFormatError.d.ts +8 -0
  105. package/build/types/carbonbox/shared/domain/exceptions/InvalidSemanticUuidFormatError.d.ts.map +1 -0
  106. package/build/types/carbonbox/shared/domain/exceptions/InvalidUserIdFormatError.d.ts +8 -0
  107. package/build/types/carbonbox/shared/domain/exceptions/InvalidUserIdFormatError.d.ts.map +1 -0
  108. package/build/types/carbonbox/shared/domain/exceptions/InvalidUserPrefixError.d.ts +8 -0
  109. package/build/types/carbonbox/shared/domain/exceptions/InvalidUserPrefixError.d.ts.map +1 -0
  110. package/build/types/carbonbox/shared/domain/exceptions/InvalidUuidFormatError.d.ts +8 -0
  111. package/build/types/carbonbox/shared/domain/exceptions/InvalidUuidFormatError.d.ts.map +1 -0
  112. package/build/types/carbonbox/shared/domain/exceptions/UnknownBoundedContextCodeError.d.ts +8 -0
  113. package/build/types/carbonbox/shared/domain/exceptions/UnknownBoundedContextCodeError.d.ts.map +1 -0
  114. package/build/types/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.d.ts +85 -0
  115. package/build/types/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.d.ts.map +1 -0
  116. package/build/types/carbonbox/shared/domain/services/implementations/DateTimeFormattingDomainService.d.ts.map +1 -1
  117. package/build/types/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.d.ts +67 -0
  118. package/build/types/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.d.ts.map +1 -0
  119. package/build/types/carbonbox/shared/domain/value-objects/AggregateId.d.ts +57 -4
  120. package/build/types/carbonbox/shared/domain/value-objects/AggregateId.d.ts.map +1 -1
  121. package/build/types/carbonbox/shared/domain/value-objects/UserId.d.ts +29 -0
  122. package/build/types/carbonbox/shared/domain/value-objects/UserId.d.ts.map +1 -1
  123. package/build/types/main/index.d.ts +11 -0
  124. package/build/types/main/index.d.ts.map +1 -1
  125. package/package.json +1 -1
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvalidUserIdFormatError = void 0;
4
+ const RootError_1 = require("./RootError");
5
+ class InvalidUserIdFormatError extends RootError_1.RootError {
6
+ constructor(userId, reason) {
7
+ const message = `The UserId "${userId}" has invalid format or prefix: ${reason}. ${InvalidUserIdFormatError.INVALID_USER_ID_FORMAT_ERROR_MESSAGE}`;
8
+ super(message);
9
+ this.name = 'InvalidUserIdFormatError';
10
+ }
11
+ static create(userId, reason) {
12
+ return new InvalidUserIdFormatError(userId, reason);
13
+ }
14
+ logError() {
15
+ return `${this.name}: ${this.message}`;
16
+ }
17
+ }
18
+ exports.InvalidUserIdFormatError = InvalidUserIdFormatError;
19
+ InvalidUserIdFormatError.INVALID_USER_ID_FORMAT_ERROR_MESSAGE = 'Invalid UserId format or prefix structure';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvalidUserPrefixError = void 0;
4
+ const RootError_1 = require("./RootError");
5
+ class InvalidUserPrefixError extends RootError_1.RootError {
6
+ constructor(userId, prefix, validPrefixes) {
7
+ const message = `The UserId "${userId}" has invalid prefix "${prefix}". Expected one of: [${validPrefixes.join(', ')}]. ${InvalidUserPrefixError.INVALID_USER_PREFIX_ERROR_MESSAGE}`;
8
+ super(message);
9
+ this.name = 'InvalidUserPrefixError';
10
+ }
11
+ static create(userId, prefix, validPrefixes) {
12
+ return new InvalidUserPrefixError(userId, prefix, validPrefixes);
13
+ }
14
+ logError() {
15
+ return `${this.name}: ${this.message}`;
16
+ }
17
+ }
18
+ exports.InvalidUserPrefixError = InvalidUserPrefixError;
19
+ InvalidUserPrefixError.INVALID_USER_PREFIX_ERROR_MESSAGE = 'Invalid user prefix for UserId';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvalidUuidFormatError = void 0;
4
+ const RootError_1 = require("./RootError");
5
+ class InvalidUuidFormatError extends RootError_1.RootError {
6
+ constructor(uuid, semanticUuid) {
7
+ const message = `The UUID "${uuid}" extracted from semantic UUID "${semanticUuid}" does not conform to UUID v4 format. ${InvalidUuidFormatError.INVALID_UUID_FORMAT_ERROR_MESSAGE}`;
8
+ super(message);
9
+ this.name = 'InvalidUuidFormatError';
10
+ }
11
+ static create(uuid, semanticUuid) {
12
+ return new InvalidUuidFormatError(uuid, semanticUuid);
13
+ }
14
+ logError() {
15
+ return `${this.name}: ${this.message}`;
16
+ }
17
+ }
18
+ exports.InvalidUuidFormatError = InvalidUuidFormatError;
19
+ InvalidUuidFormatError.INVALID_UUID_FORMAT_ERROR_MESSAGE = 'Invalid UUID v4 format';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UnknownBoundedContextCodeError = void 0;
4
+ const RootError_1 = require("./RootError");
5
+ class UnknownBoundedContextCodeError extends RootError_1.RootError {
6
+ constructor(contextCode, semanticUuid) {
7
+ const message = `The bounded context code "${contextCode}" is not recognized in semantic UUID "${semanticUuid}". ${UnknownBoundedContextCodeError.UNKNOWN_BOUNDED_CONTEXT_CODE_ERROR_MESSAGE}`;
8
+ super(message);
9
+ this.name = 'UnknownBoundedContextCodeError';
10
+ }
11
+ static create(contextCode, semanticUuid) {
12
+ return new UnknownBoundedContextCodeError(contextCode, semanticUuid);
13
+ }
14
+ logError() {
15
+ return `${this.name}: ${this.message}`;
16
+ }
17
+ }
18
+ exports.UnknownBoundedContextCodeError = UnknownBoundedContextCodeError;
19
+ UnknownBoundedContextCodeError.UNKNOWN_BOUNDED_CONTEXT_CODE_ERROR_MESSAGE = 'Unknown bounded context code in semantic UUID';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,235 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SemanticUuidDomainService = void 0;
4
+ const either_1 = require("../../../either");
5
+ const SemanticUuidPrefix_1 = require("../../enums/SemanticUuidPrefix");
6
+ const InvalidSemanticUuidError_1 = require("../../exceptions/InvalidSemanticUuidError");
7
+ const UnknownBoundedContextCodeError_1 = require("../../exceptions/UnknownBoundedContextCodeError");
8
+ const InvalidSemanticUuidFormatError_1 = require("../../exceptions/InvalidSemanticUuidFormatError");
9
+ const InvalidUuidFormatError_1 = require("../../exceptions/InvalidUuidFormatError");
10
+ /**
11
+ * Domain Service for semantic UUID parsing, validation and business logic operations.
12
+ * Provides centralized business logic for semantic UUID handling across the domain.
13
+ * Refactored to support dependency injection and Either pattern for error handling.
14
+ *
15
+ * This service maintains Value Object purity by being used in factories,
16
+ * application services, and other appropriate contexts.
17
+ */
18
+ class SemanticUuidDomainService {
19
+ constructor() {
20
+ // Semantic UUID format: BC_UUID or BC-SUB1-SUB2-...SUBn_UUID
21
+ this.SEMANTIC_UUID_REGEX = /^[A-Z]{3}(-[A-Z]{3})*_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
22
+ // Standard UUID v4 regex
23
+ this.UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
24
+ // Private constructor to enforce factory pattern
25
+ }
26
+ static create() {
27
+ return new SemanticUuidDomainService();
28
+ }
29
+ /**
30
+ * Validates if a string is a valid semantic UUID prefix
31
+ */
32
+ isValidPrefix(prefix) {
33
+ return either_1.EitherFactory.fromTryCatch(() => {
34
+ if (typeof prefix !== 'string') {
35
+ return false;
36
+ }
37
+ return Object.values(SemanticUuidPrefix_1.SemanticUuidPrefix).includes(prefix);
38
+ }, (error) => {
39
+ if (error instanceof InvalidSemanticUuidError_1.InvalidSemanticUuidError) {
40
+ return error;
41
+ }
42
+ return InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(prefix, 'Failed to validate prefix');
43
+ });
44
+ }
45
+ /**
46
+ * Gets the bounded context name from a semantic UUID prefix
47
+ */
48
+ getBoundedContext(prefix) {
49
+ return either_1.EitherFactory.fromTryCatch(() => {
50
+ const contextCode = prefix.split('-')[0];
51
+ const contextMap = {
52
+ ADC: 'ActivityDataCollection',
53
+ CFC: 'CarbonFootprintConfigurations',
54
+ CPR: 'CompanyResources',
55
+ ECF: 'EmissionCalculationFormulas',
56
+ ECP: 'EmissionCalculationProcess',
57
+ ECR: 'EmissionCalculationResults',
58
+ USR: 'Users',
59
+ SHR: 'Shared',
60
+ STC: 'SystemTechnicalConfiguration',
61
+ };
62
+ const result = contextMap[contextCode];
63
+ if (!result) {
64
+ throw UnknownBoundedContextCodeError_1.UnknownBoundedContextCodeError.create(contextCode, prefix);
65
+ }
66
+ return result;
67
+ }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(prefix, `Failed to get bounded context: ${error}`));
68
+ }
69
+ /**
70
+ * Gets the subdomain from a semantic UUID prefix
71
+ */
72
+ getSubdomain(prefix) {
73
+ return either_1.EitherFactory.fromTryCatch(() => {
74
+ const parts = prefix.split('-');
75
+ if (parts.length === 1) {
76
+ return ''; // BC-level entity has no subdomain
77
+ }
78
+ return parts.slice(1).join('-'); // Join all subdomain parts
79
+ }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(prefix, `Failed to get subdomain: ${error}`));
80
+ }
81
+ /**
82
+ * Gets all available prefixes as an array
83
+ */
84
+ getAllPrefixes() {
85
+ return either_1.EitherFactory.fromTryCatch(() => Object.values(SemanticUuidPrefix_1.SemanticUuidPrefix).sort(), (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create('', `Failed to get all prefixes: ${error}`));
86
+ }
87
+ /**
88
+ * Gets prefixes by bounded context
89
+ */
90
+ getPrefixesByBoundedContext(boundedContext) {
91
+ return either_1.EitherFactory.fromTryCatch(() => {
92
+ const contextMap = {
93
+ ActivityDataCollection: [
94
+ SemanticUuidPrefix_1.SemanticUuidPrefix.ADC_SUBMISSIONS,
95
+ SemanticUuidPrefix_1.SemanticUuidPrefix.ADC_FIELDS,
96
+ SemanticUuidPrefix_1.SemanticUuidPrefix.ADC_LOGIC,
97
+ SemanticUuidPrefix_1.SemanticUuidPrefix.ADC_LABELS,
98
+ SemanticUuidPrefix_1.SemanticUuidPrefix.ADC_FORMS,
99
+ SemanticUuidPrefix_1.SemanticUuidPrefix.ADC_ADAPTATIONS,
100
+ ],
101
+ CarbonFootprintConfigurations: [
102
+ SemanticUuidPrefix_1.SemanticUuidPrefix.CFC_CORPORATE,
103
+ SemanticUuidPrefix_1.SemanticUuidPrefix.CFC_EVENT,
104
+ SemanticUuidPrefix_1.SemanticUuidPrefix.CFC_PRODUCT,
105
+ ],
106
+ CompanyResources: [
107
+ SemanticUuidPrefix_1.SemanticUuidPrefix.CPR_EVENTS,
108
+ SemanticUuidPrefix_1.SemanticUuidPrefix.CPR_FACILITIES,
109
+ SemanticUuidPrefix_1.SemanticUuidPrefix.CPR_PRODUCTS,
110
+ ],
111
+ EmissionCalculationFormulas: [
112
+ SemanticUuidPrefix_1.SemanticUuidPrefix.ECF_VARIABLES,
113
+ SemanticUuidPrefix_1.SemanticUuidPrefix.ECF_FACTORS,
114
+ SemanticUuidPrefix_1.SemanticUuidPrefix.ECF_GWP,
115
+ ],
116
+ EmissionCalculationProcess: [
117
+ SemanticUuidPrefix_1.SemanticUuidPrefix.ECP_JOBS,
118
+ SemanticUuidPrefix_1.SemanticUuidPrefix.ECP_PROCESSES,
119
+ SemanticUuidPrefix_1.SemanticUuidPrefix.ECP_WORKFLOWS,
120
+ ],
121
+ EmissionCalculationResults: [
122
+ SemanticUuidPrefix_1.SemanticUuidPrefix.ECR_AGGREGATIONS,
123
+ SemanticUuidPrefix_1.SemanticUuidPrefix.ECR_CALCULATIONS,
124
+ SemanticUuidPrefix_1.SemanticUuidPrefix.ECR_GHG_RESULTS,
125
+ ],
126
+ Users: [
127
+ SemanticUuidPrefix_1.SemanticUuidPrefix.USR,
128
+ SemanticUuidPrefix_1.SemanticUuidPrefix.USR_STH_CLIENT,
129
+ SemanticUuidPrefix_1.SemanticUuidPrefix.USR_STH_COORDINATOR,
130
+ SemanticUuidPrefix_1.SemanticUuidPrefix.USR_STH_HOST,
131
+ SemanticUuidPrefix_1.SemanticUuidPrefix.USR_STH_MANAGER,
132
+ ],
133
+ Shared: [
134
+ SemanticUuidPrefix_1.SemanticUuidPrefix.SHR_DOMAIN,
135
+ SemanticUuidPrefix_1.SemanticUuidPrefix.SHR_EITHER,
136
+ ],
137
+ SystemTechnicalConfiguration: [
138
+ SemanticUuidPrefix_1.SemanticUuidPrefix.STC,
139
+ ],
140
+ };
141
+ return contextMap[boundedContext] || [];
142
+ }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(boundedContext, `Failed to get prefixes for bounded context: ${error}`));
143
+ }
144
+ /**
145
+ * Validates a complete semantic UUID format
146
+ */
147
+ validateSemanticUuidFormat(semanticUuid) {
148
+ return either_1.EitherFactory.fromTryCatch(() => {
149
+ if (typeof semanticUuid !== 'string') {
150
+ return false;
151
+ }
152
+ return this.SEMANTIC_UUID_REGEX.test(semanticUuid);
153
+ }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(semanticUuid, `Failed to validate semantic UUID format: ${error}`));
154
+ }
155
+ /**
156
+ * Extracts and validates the prefix from a semantic UUID
157
+ */
158
+ extractPrefix(semanticUuid) {
159
+ return either_1.EitherFactory.fromTryCatch(() => {
160
+ const parts = semanticUuid.split('_');
161
+ if (parts.length !== 2) {
162
+ throw InvalidSemanticUuidFormatError_1.InvalidSemanticUuidFormatError.create(semanticUuid, 'must contain exactly one underscore');
163
+ }
164
+ return parts[0];
165
+ }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(semanticUuid, `Failed to extract prefix: ${error}`));
166
+ }
167
+ /**
168
+ * Extracts and validates the UUID from a semantic UUID
169
+ */
170
+ extractUuid(semanticUuid) {
171
+ return either_1.EitherFactory.fromTryCatch(() => {
172
+ const parts = semanticUuid.split('_');
173
+ if (parts.length !== 2) {
174
+ throw InvalidSemanticUuidFormatError_1.InvalidSemanticUuidFormatError.create(semanticUuid, 'must contain exactly one underscore');
175
+ }
176
+ const uuid = parts[1];
177
+ if (!this.UUID_REGEX.test(uuid)) {
178
+ throw InvalidUuidFormatError_1.InvalidUuidFormatError.create(uuid, semanticUuid);
179
+ }
180
+ return uuid;
181
+ }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(semanticUuid, `Failed to extract UUID: ${error}`));
182
+ }
183
+ /**
184
+ * Extracts the bounded context code (first 3 letters) from a semantic UUID
185
+ */
186
+ extractBoundedContextCode(semanticUuid) {
187
+ return either_1.EitherFactory.fromTryCatch(() => {
188
+ const prefixResult = this.extractPrefix(semanticUuid);
189
+ const prefix = prefixResult.fold((error) => { throw error; }, (p) => p);
190
+ return prefix.substring(0, 3);
191
+ }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(semanticUuid, `Failed to extract bounded context code: ${error}`));
192
+ }
193
+ /**
194
+ * Extracts all subdomain parts from a semantic UUID
195
+ */
196
+ extractSubdomains(semanticUuid) {
197
+ return either_1.EitherFactory.fromTryCatch(() => {
198
+ const prefixResult = this.extractPrefix(semanticUuid);
199
+ const prefix = prefixResult.fold((error) => { throw error; }, (p) => p);
200
+ const parts = prefix.split('-');
201
+ // Remove the first part (BC) and return the rest (SUB1, SUB2, ...)
202
+ return parts.slice(1);
203
+ }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(semanticUuid, `Failed to extract subdomains: ${error}`));
204
+ }
205
+ /**
206
+ * Checks if a semantic UUID has subdomains or is BC-level only
207
+ */
208
+ hasSubdomains(semanticUuid) {
209
+ return either_1.EitherFactory.fromTryCatch(() => {
210
+ const subdomainsResult = this.extractSubdomains(semanticUuid);
211
+ const subdomains = subdomainsResult.fold((error) => { throw error; }, (subs) => subs);
212
+ return subdomains.length > 0;
213
+ }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(semanticUuid, `Failed to check subdomains: ${error}`));
214
+ }
215
+ /**
216
+ * Creates a human-readable log representation of a semantic UUID
217
+ */
218
+ toLogString(semanticUuid) {
219
+ return either_1.EitherFactory.fromTryCatch(() => {
220
+ const uuidResult = this.extractUuid(semanticUuid);
221
+ const uuid = uuidResult.fold((error) => { throw error; }, (u) => u);
222
+ const boundedContextResult = this.extractBoundedContextCode(semanticUuid);
223
+ const boundedContextCode = boundedContextResult.fold((error) => { throw error; }, (bc) => bc);
224
+ const subdomainsResult = this.extractSubdomains(semanticUuid);
225
+ const subdomains = subdomainsResult.fold((error) => { throw error; }, (subs) => subs);
226
+ if (subdomains.length === 0) {
227
+ // BC-level entity (e.g., STC_uuid)
228
+ return `[${boundedContextCode}] (${uuid.substring(0, 8)}...)`;
229
+ }
230
+ // Subdomain entity (e.g., USR-STH-CHO_uuid)
231
+ return `[${boundedContextCode}:${subdomains.join(':')}] (${uuid.substring(0, 8)}...)`;
232
+ }, (error) => InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(semanticUuid, `Failed to create log string: ${error}`));
233
+ }
234
+ }
235
+ exports.SemanticUuidDomainService = SemanticUuidDomainService;
@@ -88,7 +88,7 @@ class ActivityDataSubmissionReference extends ObjectValueObject_1.ObjectValueObj
88
88
  */
89
89
  static guardAgainstInvalidId(id) {
90
90
  String_1.String.guardAgainstEmptyValue(id, 'id');
91
- AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
91
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(id, 'id');
92
92
  }
93
93
  /**
94
94
  * Valida el código del formulario dinámico.
@@ -3,11 +3,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AggregateId = void 0;
4
4
  const String_1 = require("./String");
5
5
  const InvalidAggregateIdError_1 = require("../exceptions/InvalidAggregateIdError");
6
+ const InvalidSemanticUuidError_1 = require("../exceptions/InvalidSemanticUuidError");
7
+ /**
8
+ * Pure AggregateId Value Object with semantic UUID format
9
+ *
10
+ * Format: {BC}_{UUID} or {BC}-{SUB1}-{SUB2}-...{SUBn}_{UUID}
11
+ * Examples:
12
+ * - STC_550e8400-e29b-41d4-a716-446655440000 (BC-level entity)
13
+ * - USR-STH-CHO_550e8400-e29b-41d4-a716-446655440000 (subdomain entity)
14
+ * - ADC-SUB-FLD_123e4567-e89b-12d3-a456-426614174000 (future N-level expansion)
15
+ *
16
+ * This is a PURE Value Object - no external dependencies or business logic.
17
+ * For semantic parsing and business logic, use SemanticUuidDomainService.
18
+ *
19
+ * Benefits:
20
+ * - Immutable and pure value object design
21
+ * - Basic validation and extraction methods
22
+ * - Flexible N-level subdomain support
23
+ * - Clean separation of concerns
24
+ */
6
25
  class AggregateId extends String_1.String {
7
26
  constructor(value, skipDomainValidation, propertyName = AggregateId.DEFAULT_PROPERTY_NAME) {
8
27
  super(value, skipDomainValidation, propertyName);
9
28
  if (skipDomainValidation === false) {
10
- AggregateId.guardAgainstInvalidId(value, propertyName);
29
+ AggregateId.guardAgainstInvalidSemanticId(value, propertyName);
11
30
  }
12
31
  }
13
32
  static create(id) {
@@ -16,19 +35,91 @@ class AggregateId extends String_1.String {
16
35
  static fromPrimitives(id) {
17
36
  return new AggregateId(id, true);
18
37
  }
19
- static guardAgainstInvalidId(id, propertyName = AggregateId.DEFAULT_PROPERTY_NAME) {
20
- if (this.isInvalid(id)) {
21
- throw InvalidAggregateIdError_1.InvalidAggregateIdError.create(id, propertyName);
38
+ /**
39
+ * Extracts the raw UUID from the semantic UUID
40
+ */
41
+ extractUuid() {
42
+ const parts = this.value.split('_');
43
+ if (parts.length !== 2) {
44
+ throw InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(this.value, 'Invalid semantic UUID format');
22
45
  }
46
+ return parts[1];
23
47
  }
24
- static isInvalid(id) {
25
- return !this.isValid(id);
48
+ /**
49
+ * Extracts the full prefix from the semantic UUID (BC-SUB1-SUB2-...SUBn)
50
+ */
51
+ extractPrefix() {
52
+ const parts = this.value.split('_');
53
+ if (parts.length !== 2) {
54
+ throw InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(this.value, 'Invalid semantic UUID format');
55
+ }
56
+ return parts[0];
57
+ }
58
+ /**
59
+ * Extracts the bounded context (first 3 letters) from the prefix
60
+ */
61
+ extractBoundedContext() {
62
+ const prefix = this.extractPrefix();
63
+ return prefix.substring(0, 3);
64
+ }
65
+ /**
66
+ * Extracts all subdomain parts from the prefix
67
+ * Returns empty array if BC has no subdomains (e.g., STC_uuid)
68
+ */
69
+ extractSubdomains() {
70
+ const prefix = this.extractPrefix();
71
+ const parts = prefix.split('-');
72
+ // Remove the first part (BC) and return the rest (SUB1, SUB2, ...)
73
+ // Returns empty array if no subdomains exist
74
+ return parts.slice(1);
75
+ }
76
+ /**
77
+ * Extracts the primary subdomain (first subdomain after BC)
78
+ * Returns empty string if BC has no subdomains
79
+ */
80
+ extractPrimarySubdomain() {
81
+ const subdomains = this.extractSubdomains();
82
+ return subdomains.length > 0 ? subdomains[0] : '';
83
+ }
84
+ /**
85
+ * Checks if this UUID has subdomains or is BC-level only
86
+ */
87
+ hasSubdomains() {
88
+ return this.extractSubdomains().length > 0;
89
+ }
90
+ /**
91
+ * Validation methods
92
+ */
93
+ static guardAgainstInvalidSemanticId(semanticId, propertyName = AggregateId.DEFAULT_PROPERTY_NAME) {
94
+ if (this.isInvalidSemanticId(semanticId)) {
95
+ throw InvalidSemanticUuidError_1.InvalidSemanticUuidError.create(semanticId, propertyName);
96
+ }
26
97
  }
27
- static isValid(id) {
28
- return AggregateId.UUID_REGEX.test(id);
98
+ static guardAgainstInvalidUuid(uuid, propertyName = 'uuid') {
99
+ if (this.isInvalidUuid(uuid)) {
100
+ throw InvalidAggregateIdError_1.InvalidAggregateIdError.create(uuid, `Invalid UUID format for ${propertyName}`);
101
+ }
102
+ }
103
+ static isInvalidSemanticId(semanticId) {
104
+ return this.isValidSemanticId(semanticId) === false;
105
+ }
106
+ static isInvalidUuid(uuid) {
107
+ return this.isValidUuid(uuid) === false;
108
+ }
109
+ static isValidSemanticId(semanticId) {
110
+ return AggregateId.SEMANTIC_UUID_REGEX.test(semanticId);
111
+ }
112
+ static isValidUuid(uuid) {
113
+ return AggregateId.UUID_REGEX.test(uuid);
29
114
  }
30
115
  static isValidId(id) {
31
- return this.isValid(id);
116
+ return this.isValidSemanticId(id);
117
+ }
118
+ static isValidSemanticIdValue(semanticId) {
119
+ return this.isValidSemanticId(semanticId);
120
+ }
121
+ static isValidUuidValue(uuid) {
122
+ return this.isValidUuid(uuid);
32
123
  }
33
124
  toPrimitives() {
34
125
  return this.value;
@@ -36,4 +127,8 @@ class AggregateId extends String_1.String {
36
127
  }
37
128
  exports.AggregateId = AggregateId;
38
129
  AggregateId.DEFAULT_PROPERTY_NAME = 'id';
39
- AggregateId.UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
130
+ // Standard UUID v4 regex
131
+ AggregateId.UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
132
+ // Semantic UUID format: BC_UUID or BC-SUB1-SUB2-...SUBn_UUID (flexible N-level subdomain support)
133
+ // Pattern: [A-Z]{3}(-[A-Z]{3})*_[UUID] - BC alone OR BC with unlimited SUBn levels
134
+ AggregateId.SEMANTIC_UUID_REGEX = /^[A-Z]{3}(-[A-Z]{3})*_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
@@ -31,7 +31,7 @@ class AggregateIdList extends StringList_1.StringList {
31
31
  return this.value.includes(id);
32
32
  }
33
33
  addId(id) {
34
- AggregateId_1.AggregateId.guardAgainstInvalidId(id);
34
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(id);
35
35
  if (this.hasId(id)) {
36
36
  return this.value;
37
37
  }
@@ -59,15 +59,15 @@ class CalculationProcessReference extends ObjectValueObject_1.ObjectValueObject
59
59
  }
60
60
  static guardAgainstInvalidId(id) {
61
61
  String_1.String.guardAgainstEmptyValue(id, 'id');
62
- AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
62
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(id, 'id');
63
63
  }
64
64
  static guardAgainstInvalidCarbonClient(carbonClient) {
65
65
  String_1.String.guardAgainstEmptyValue(carbonClient, 'carbonClient');
66
- AggregateId_1.AggregateId.guardAgainstInvalidId(carbonClient, 'carbonClient');
66
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(carbonClient, 'carbonClient');
67
67
  }
68
68
  static guardAgainstInvalidFootprintConfiguration(footprintConfiguration) {
69
69
  String_1.String.guardAgainstEmptyValue(footprintConfiguration, 'footprintConfiguration');
70
- AggregateId_1.AggregateId.guardAgainstInvalidId(footprintConfiguration, 'footprintConfiguration');
70
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(footprintConfiguration, 'footprintConfiguration');
71
71
  }
72
72
  get id() {
73
73
  return __classPrivateFieldGet(this, _CalculationProcessReference_id, "f");
@@ -108,7 +108,7 @@ class CalculationVariableReferences extends ValueObject_1.ValueObject {
108
108
  }
109
109
  // Validar usando las reglas de dominio
110
110
  String_1.String.guardAgainstEmptyValue(reference.id, `${propertyName}.id`);
111
- AggregateId_1.AggregateId.guardAgainstInvalidId(reference.id, `${propertyName}.id`);
111
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(reference.id, `${propertyName}.id`);
112
112
  String_1.String.guardAgainstEmptyValue(reference.code, `${propertyName}.code`);
113
113
  Code_1.Code.guardAgainstInvalidCode(reference.code);
114
114
  String_1.String.guardAgainstEmptyValue(reference.symbol, `${propertyName}.symbol`);
@@ -94,7 +94,7 @@ class CarbonClientReference extends ObjectValueObject_1.ObjectValueObject {
94
94
  */
95
95
  static guardAgainstInvalidId(id) {
96
96
  String_1.String.guardAgainstEmptyValue(id, 'id');
97
- AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
97
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(id, 'id');
98
98
  }
99
99
  /**
100
100
  * Valida el nombre para mostrar.
@@ -57,7 +57,7 @@ class CarbonFootprintConfigurationReference extends ObjectValueObject_1.ObjectVa
57
57
  }
58
58
  static guardAgainstInvalidId(id) {
59
59
  String_1.String.guardAgainstEmptyValue(id, 'id');
60
- AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
60
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(id, 'id');
61
61
  }
62
62
  /**
63
63
  * Valida el tipo de huella de carbono.
@@ -83,7 +83,7 @@ class CarbonFootprintIntensityIndicatorReference extends ObjectValueObject_1.Obj
83
83
  }
84
84
  static guardAgainstInvalidId(id) {
85
85
  String_1.String.guardAgainstEmptyValue(id, 'id');
86
- AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
86
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(id, 'id');
87
87
  }
88
88
  /**
89
89
  * Valida el código del indicador de intensidad usando las validaciones de DomainCode.
@@ -104,7 +104,7 @@ class CarbonFootprintSegmentReferences extends ValueObject_1.ValueObject {
104
104
  */
105
105
  static guardAgainstInvalidSegmentId(id, propertyName) {
106
106
  String_1.String.guardAgainstEmptyValue(id, propertyName);
107
- AggregateId_1.AggregateId.guardAgainstInvalidId(id, propertyName);
107
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(id, propertyName);
108
108
  }
109
109
  /**
110
110
  * Valida el código de segmento usando las validaciones de Code.
@@ -77,7 +77,7 @@ class CollectionFieldReference extends ObjectValueObject_1.ObjectValueObject {
77
77
  }
78
78
  static guardAgainstInvalidId(id) {
79
79
  String_1.String.guardAgainstEmptyValue(id, 'id');
80
- AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
80
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(id, 'id');
81
81
  }
82
82
  /**
83
83
  * Valida el código del campo de recolección usando las validaciones de Code.
@@ -109,7 +109,7 @@ class CorporateCarbonFootprintSegmentConfigurationReferences extends ValueObject
109
109
  */
110
110
  static guardAgainstInvalidConfigurationId(id, propertyName) {
111
111
  String_1.String.guardAgainstEmptyValue(id, propertyName);
112
- AggregateId_1.AggregateId.guardAgainstInvalidId(id, propertyName);
112
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(id, propertyName);
113
113
  }
114
114
  /**
115
115
  * Valida la referencia de segmento corporativo.
@@ -161,7 +161,7 @@ class CorporateCarbonFootprintSegmentConfigurationReferences extends ValueObject
161
161
  throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create(`${propertyName}.name`, 'string', typeof reference.name);
162
162
  }
163
163
  String_1.String.guardAgainstEmptyValue(reference.id, `${propertyName}.id`);
164
- AggregateId_1.AggregateId.guardAgainstInvalidId(reference.id, `${propertyName}.id`);
164
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(reference.id, `${propertyName}.id`);
165
165
  String_1.String.guardAgainstEmptyValue(reference.code, `${propertyName}.code`);
166
166
  Code_1.Code.guardAgainstInvalidCode(reference.code);
167
167
  String_1.String.guardAgainstEmptyValue(reference.name, `${propertyName}.name`);
@@ -73,7 +73,7 @@ class CorporateConfigurationCarbonFootprintSegmentReference extends ObjectValueO
73
73
  */
74
74
  static guardAgainstInvalidId(id) {
75
75
  String_1.String.guardAgainstEmptyValue(id, 'id');
76
- AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
76
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(id, 'id');
77
77
  }
78
78
  /**
79
79
  * Valida el código del segmento corporativo.
@@ -73,7 +73,7 @@ class CorporateConfigurationCarbonFootprintSubsegmentReference extends ObjectVal
73
73
  */
74
74
  static guardAgainstInvalidId(id) {
75
75
  String_1.String.guardAgainstEmptyValue(id, 'id');
76
- AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
76
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(id, 'id');
77
77
  }
78
78
  /**
79
79
  * Valida el código del subsegmento corporativo.
@@ -64,7 +64,7 @@ class EmissionCalculationFormulaReference extends ObjectValueObject_1.ObjectValu
64
64
  }
65
65
  static guardAgainstInvalidId(id) {
66
66
  String_1.String.guardAgainstEmptyValue(id, 'id');
67
- AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
67
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(id, 'id');
68
68
  }
69
69
  /**
70
70
  * Valida el código de la fórmula de cálculo de emisiones usando las validaciones de Code.
@@ -82,7 +82,7 @@ class EmissionCalculationReference extends ObjectValueObject_1.ObjectValueObject
82
82
  }
83
83
  static guardAgainstInvalidId(id) {
84
84
  String_1.String.guardAgainstEmptyValue(id, 'id');
85
- AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
85
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(id, 'id');
86
86
  }
87
87
  /**
88
88
  * Valida la referencia de activity data submission.
@@ -67,7 +67,7 @@ class EmissionFactorReference extends ObjectValueObject_1.ObjectValueObject {
67
67
  */
68
68
  static guardAgainstInvalidId(id) {
69
69
  String_1.String.guardAgainstEmptyValue(id, 'id');
70
- AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
70
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(id, 'id');
71
71
  }
72
72
  /**
73
73
  * Valida el código del factor de emisión.
@@ -67,7 +67,7 @@ class EventEditionConfigurationCarbonFootprintSubsegmentReference extends Object
67
67
  */
68
68
  static guardAgainstInvalidId(id) {
69
69
  String_1.String.guardAgainstEmptyValue(id, 'id');
70
- AggregateId_1.AggregateId.guardAgainstInvalidId(id, 'id');
70
+ AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(id, 'id');
71
71
  }
72
72
  /**
73
73
  * Valida el código de subsegmento usando las validaciones de Code.