@carbonbox/domain 0.4.10 → 0.4.12
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.
- package/build/carbonbox/activity-data-collection/activity-data-submissions/domain/value-objects/ActivityDataSubmissionId.js +1 -1
- package/build/carbonbox/activity-data-collection/collection-fields/domain/value-objects/CollectionFieldId.js +1 -1
- package/build/carbonbox/activity-data-collection/conditional-logic/domain/value-objects/ConditionalFieldRuleId.js +1 -1
- package/build/carbonbox/activity-data-collection/contextual-labels/domain/value-objects/ContextualLabelId.js +1 -1
- package/build/carbonbox/activity-data-collection/dynamic-forms/domain/value-objects/DynamicFormId.js +1 -1
- package/build/carbonbox/activity-data-collection/stakeholder-adaptations/domain/value-objects/StakeholderAdaptationId.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationId.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/segments/domain/value-objects/CorporateConfigurationCarbonFootprintSegmentId.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/segments/subsegments/domain/value-objects/CorporateConfigurationCarbonFootprintSubsegmentId.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/corporate-configurations/domain/value-objects/CorporateCarbonFootprintConfigurationId.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/event-configurations/domain/value-objects/EventCarbonFootprintConfigurationId.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/domain/value-objects/EventEditionLifecycleStageConfigurationId.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/event-edition-lifecycle-stages/domain/value-objects/EventEditionLifecycleStageId.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/product-configurations/domain/value-objects/ProductCarbonFootprintConfigurationId.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/domain/value-objects/ProductCarbonFootprintSegmentConfigurationId.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/segments/domain/value-objects/ProductConfigurationCarbonFootprintSegmentId.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/segments/subsegments/domain/value-objects/ProductConfigurationCarbonFootprintSubsegmentId.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/product-configurations/system-boundaries/domain/value-objects/ProductConfigurationSystemBoundaryId.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintConfigurationId.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintConfigurationIntensityIndicatorConfigurations.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintIntensityIndicatorId.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintSegmentId.js +1 -1
- package/build/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintSubsegmentId.js +1 -1
- package/build/carbonbox/company-resources/events/domain/value-objects/EventId.js +1 -1
- package/build/carbonbox/company-resources/events/editions/domain/value-objects/EventEditionId.js +1 -1
- package/build/carbonbox/company-resources/facilities/domain/value-objects/FacilityId.js +1 -1
- package/build/carbonbox/company-resources/products/domain/value-objects/ProductId.js +1 -1
- package/build/carbonbox/emission-calculation-formulas/calculation-variables/domain/value-objects/CalculationVariableActivityDataConditions.js +1 -1
- package/build/carbonbox/emission-calculation-formulas/calculation-variables/domain/value-objects/CalculationVariableId.js +1 -1
- package/build/carbonbox/emission-calculation-formulas/domain/value-objects/EmissionCalculationFormulaId.js +1 -1
- package/build/carbonbox/emission-calculation-formulas/emission-factors/domain/value-objects/EmissionFactorId.js +1 -1
- package/build/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/value-objects/GlobalWarmingPotentialId.js +1 -1
- package/build/carbonbox/emission-calculation-process/calculation-jobs/domain/value-objects/CalculationJobId.js +1 -1
- package/build/carbonbox/emission-calculation-process/calculation-processes/domain/value-objects/CalculationProcessId.js +1 -1
- package/build/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowId.js +1 -1
- package/build/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowParallelJobs.js +1 -1
- package/build/carbonbox/emission-calculation-results/emission-aggregations/domain/value-objects/EmissionAggregationId.js +1 -1
- package/build/carbonbox/emission-calculation-results/emission-calculations/domain/value-objects/EmissionCalculationId.js +1 -1
- package/build/carbonbox/emission-calculation-results/ghg-emission-results/domain/value-objects/GHGEmissionResultId.js +1 -1
- package/build/carbonbox/purchase-management-system/purchase-contracts/domain/value-objects/PurchaseContractCarbonClientId.js +1 -1
- package/build/carbonbox/purchase-management-system/purchase-contracts/domain/value-objects/PurchaseContractContractAmendments.js +1 -1
- package/build/carbonbox/purchase-management-system/purchase-contracts/domain/value-objects/PurchaseContractId.js +1 -1
- package/build/carbonbox/purchase-management-system/purchase-orders/domain/value-objects/PurchaseOrderCarbonClientId.js +1 -1
- package/build/carbonbox/purchase-management-system/purchase-orders/domain/value-objects/PurchaseOrderId.js +1 -1
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogId.js +1 -1
- package/build/carbonbox/purchase-management-system/service-pricing/domain/value-objects/ServicePricingId.js +1 -1
- package/build/carbonbox/shared/domain/authorization/value-objects/SecurityContext.js +1 -1
- package/build/carbonbox/shared/domain/enums/SemanticUuidPrefix.js +65 -0
- package/build/carbonbox/shared/domain/exceptions/InvalidSemanticUuidError.js +19 -0
- package/build/carbonbox/shared/domain/exceptions/InvalidSemanticUuidFormatError.js +19 -0
- package/build/carbonbox/shared/domain/exceptions/InvalidUserIdFormatError.js +19 -0
- package/build/carbonbox/shared/domain/exceptions/InvalidUserPrefixError.js +19 -0
- package/build/carbonbox/shared/domain/exceptions/InvalidUuidFormatError.js +19 -0
- package/build/carbonbox/shared/domain/exceptions/UnknownBoundedContextCodeError.js +19 -0
- package/build/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.js +2 -0
- package/build/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.js +235 -0
- package/build/carbonbox/shared/domain/types/UserEmailProps.js +2 -0
- package/build/carbonbox/shared/domain/types/UserPropsWithHashedPassword.js +2 -0
- package/build/carbonbox/shared/domain/value-objects/ActivityDataSubmissionReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/AggregateId.js +105 -10
- package/build/carbonbox/shared/domain/value-objects/AggregateIdList.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/CalculationProcessReference.js +3 -3
- package/build/carbonbox/shared/domain/value-objects/CalculationVariableReferences.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/CarbonClientReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/CarbonFootprintConfigurationReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/CarbonFootprintIntensityIndicatorReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/CarbonFootprintSegmentReferences.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/CollectionFieldReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationReferences.js +2 -2
- package/build/carbonbox/shared/domain/value-objects/CorporateConfigurationCarbonFootprintSegmentReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/CorporateConfigurationCarbonFootprintSubsegmentReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/EmissionCalculationFormulaReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/EmissionCalculationReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/EmissionFactorReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/EventEditionConfigurationCarbonFootprintSubsegmentReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/EventEditionConfigurationCarbonFootprintSubsegmentReferences.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/EventEditionLifecycleStageConfigurationReferences.js +2 -2
- package/build/carbonbox/shared/domain/value-objects/EventEditionLifecycleStageReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/EventEditionReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/EventEditionReferences.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/EventReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/FacilityReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/GlobalWarmingPotentialReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/NullableCorporateConfigurationCarbonFootprintSubsegmentReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/NullableEventEditionConfigurationCarbonFootprintSubsegmentReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/NullableProductConfigurationCarbonFootprintSubsegmentReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/ProductCarbonFootprintSegmentConfigurationReferences.js +2 -2
- package/build/carbonbox/shared/domain/value-objects/ProductConfigurationCarbonFootprintSegmentReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/ProductConfigurationCarbonFootprintSubsegmentReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/ProductConfigurationSystemBoundaryReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/ProductReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/ServiceCatalogReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/StakeholderReference.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/StakeholderReferences.js +1 -1
- package/build/carbonbox/shared/domain/value-objects/UserId.js +129 -1
- package/build/carbonbox/stakeholders/carbon-clients/domain/entity/CarbonClient.js +50 -2
- package/build/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPropsWithHashedPassword.js +2 -0
- package/build/carbonbox/stakeholders/carbon-clients/domain/value-objects/CarbonClientId.js +1 -1
- package/build/carbonbox/stakeholders/carbon-coordinators/domain/entity/CarbonCoordinator.js +40 -0
- package/build/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPropsWithHashedPassword.js +2 -0
- package/build/carbonbox/stakeholders/carbon-coordinators/domain/value-objects/CarbonCoordinatorId.js +1 -1
- package/build/carbonbox/stakeholders/carbon-host/domain/entity/CarbonHost.js +32 -4
- package/build/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPropsWithHashedPassword.js +2 -0
- package/build/carbonbox/stakeholders/carbon-host/domain/value-objects/CarbonHostId.js +1 -1
- package/build/carbonbox/stakeholders/carbon-managers/domain/entity/CarbonManager.js +32 -2
- package/build/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPropsWithHashedPassword.js +2 -0
- package/build/carbonbox/stakeholders/carbon-managers/domain/value-objects/CarbonManagerId.js +1 -1
- package/build/carbonbox/stakeholders/shared/domain/types/StakeholderPropsWithHashedPassword.js +2 -0
- package/build/carbonbox/stakeholders/shared/domain/value-objects/StakeholderId.js +1 -1
- package/build/main/index.js +22 -6
- package/build/types/carbonbox/shared/domain/enums/SemanticUuidPrefix.d.ts +48 -0
- package/build/types/carbonbox/shared/domain/enums/SemanticUuidPrefix.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/InvalidSemanticUuidError.d.ts +8 -0
- package/build/types/carbonbox/shared/domain/exceptions/InvalidSemanticUuidError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/InvalidSemanticUuidFormatError.d.ts +8 -0
- package/build/types/carbonbox/shared/domain/exceptions/InvalidSemanticUuidFormatError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/InvalidUserIdFormatError.d.ts +8 -0
- package/build/types/carbonbox/shared/domain/exceptions/InvalidUserIdFormatError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/InvalidUserPrefixError.d.ts +8 -0
- package/build/types/carbonbox/shared/domain/exceptions/InvalidUserPrefixError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/InvalidUuidFormatError.d.ts +8 -0
- package/build/types/carbonbox/shared/domain/exceptions/InvalidUuidFormatError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/UnknownBoundedContextCodeError.d.ts +8 -0
- package/build/types/carbonbox/shared/domain/exceptions/UnknownBoundedContextCodeError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.d.ts +85 -0
- package/build/types/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/services/implementations/DateTimeFormattingDomainService.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.d.ts +67 -0
- package/build/types/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/types/UserEmailProps.d.ts +5 -0
- package/build/types/carbonbox/shared/domain/types/UserEmailProps.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/types/UserPropsWithHashedPassword.d.ts +18 -0
- package/build/types/carbonbox/shared/domain/types/UserPropsWithHashedPassword.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/value-objects/AggregateId.d.ts +57 -4
- package/build/types/carbonbox/shared/domain/value-objects/AggregateId.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/UserId.d.ts +29 -0
- package/build/types/carbonbox/shared/domain/value-objects/UserId.d.ts.map +1 -1
- package/build/types/carbonbox/stakeholders/carbon-clients/domain/entity/CarbonClient.d.ts +2 -0
- package/build/types/carbonbox/stakeholders/carbon-clients/domain/entity/CarbonClient.d.ts.map +1 -1
- package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPropsWithHashedPassword.d.ts +20 -0
- package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPropsWithHashedPassword.d.ts.map +1 -0
- package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/entity/CarbonCoordinator.d.ts +2 -0
- package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/entity/CarbonCoordinator.d.ts.map +1 -1
- package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPropsWithHashedPassword.d.ts +15 -0
- package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPropsWithHashedPassword.d.ts.map +1 -0
- package/build/types/carbonbox/stakeholders/carbon-host/domain/entity/CarbonHost.d.ts +2 -0
- package/build/types/carbonbox/stakeholders/carbon-host/domain/entity/CarbonHost.d.ts.map +1 -1
- package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPropsWithHashedPassword.d.ts +3 -0
- package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPropsWithHashedPassword.d.ts.map +1 -0
- package/build/types/carbonbox/stakeholders/carbon-managers/domain/entity/CarbonManager.d.ts +2 -0
- package/build/types/carbonbox/stakeholders/carbon-managers/domain/entity/CarbonManager.d.ts.map +1 -1
- package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPropsWithHashedPassword.d.ts +6 -0
- package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPropsWithHashedPassword.d.ts.map +1 -0
- package/build/types/carbonbox/stakeholders/shared/domain/types/StakeholderPropsWithHashedPassword.d.ts +8 -0
- package/build/types/carbonbox/stakeholders/shared/domain/types/StakeholderPropsWithHashedPassword.d.ts.map +1 -0
- package/build/types/main/index.d.ts +9 -0
- package/build/types/main/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ class ActivityDataSubmissionId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, ActivityDataSubmissionId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, ActivityDataSubmissionId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, ActivityDataSubmissionId.PROPERTY_NAME);
|
|
13
13
|
return new ActivityDataSubmissionId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class CollectionFieldId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, CollectionFieldId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, CollectionFieldId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, CollectionFieldId.PROPERTY_NAME);
|
|
13
13
|
return new CollectionFieldId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class ConditionalFieldRuleId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, ConditionalFieldRuleId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, ConditionalFieldRuleId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, ConditionalFieldRuleId.PROPERTY_NAME);
|
|
13
13
|
return new ConditionalFieldRuleId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class ContextualLabelId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, ContextualLabelId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, ContextualLabelId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, ContextualLabelId.PROPERTY_NAME);
|
|
13
13
|
return new ContextualLabelId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
package/build/carbonbox/activity-data-collection/dynamic-forms/domain/value-objects/DynamicFormId.js
CHANGED
|
@@ -9,7 +9,7 @@ class DynamicFormId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, DynamicFormId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, DynamicFormId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, DynamicFormId.PROPERTY_NAME);
|
|
13
13
|
return new DynamicFormId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class StakeholderAdaptationId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, StakeholderAdaptationId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, StakeholderAdaptationId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, StakeholderAdaptationId.PROPERTY_NAME);
|
|
13
13
|
return new StakeholderAdaptationId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class CorporateCarbonFootprintSegmentConfigurationId extends AggregateId_1.Aggre
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, CorporateCarbonFootprintSegmentConfigurationId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, CorporateCarbonFootprintSegmentConfigurationId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value);
|
|
13
13
|
return new CorporateCarbonFootprintSegmentConfigurationId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -7,7 +7,7 @@ class CorporateConfigurationCarbonFootprintSegmentId extends CarbonFootprintSegm
|
|
|
7
7
|
super(value, skipDomainValidation);
|
|
8
8
|
}
|
|
9
9
|
static create(value) {
|
|
10
|
-
CarbonFootprintSegmentId_1.CarbonFootprintSegmentId.
|
|
10
|
+
CarbonFootprintSegmentId_1.CarbonFootprintSegmentId.guardAgainstInvalidSemanticId(value);
|
|
11
11
|
return new CorporateConfigurationCarbonFootprintSegmentId(value, false);
|
|
12
12
|
}
|
|
13
13
|
static fromPrimitives(primitive) {
|
|
@@ -7,7 +7,7 @@ class CorporateConfigurationCarbonFootprintSubsegmentId extends CarbonFootprintS
|
|
|
7
7
|
super(value, skipDomainValidation);
|
|
8
8
|
}
|
|
9
9
|
static create(value) {
|
|
10
|
-
CarbonFootprintSubsegmentId_1.CarbonFootprintSubsegmentId.
|
|
10
|
+
CarbonFootprintSubsegmentId_1.CarbonFootprintSubsegmentId.guardAgainstInvalidSemanticId(value);
|
|
11
11
|
return new CorporateConfigurationCarbonFootprintSubsegmentId(value, false);
|
|
12
12
|
}
|
|
13
13
|
static fromPrimitives(primitive) {
|
|
@@ -7,7 +7,7 @@ class CorporateCarbonFootprintConfigurationId extends CarbonFootprintConfigurati
|
|
|
7
7
|
super(value, skipDomainValidation);
|
|
8
8
|
}
|
|
9
9
|
static create(value) {
|
|
10
|
-
CarbonFootprintConfigurationId_1.CarbonFootprintConfigurationId.
|
|
10
|
+
CarbonFootprintConfigurationId_1.CarbonFootprintConfigurationId.guardAgainstInvalidSemanticId(value);
|
|
11
11
|
return new CorporateCarbonFootprintConfigurationId(value, false);
|
|
12
12
|
}
|
|
13
13
|
static fromPrimitives(primitive) {
|
|
@@ -7,7 +7,7 @@ class EventCarbonFootprintConfigurationId extends CarbonFootprintConfigurationId
|
|
|
7
7
|
super(value, skipDomainValidation);
|
|
8
8
|
}
|
|
9
9
|
static create(value) {
|
|
10
|
-
CarbonFootprintConfigurationId_1.CarbonFootprintConfigurationId.
|
|
10
|
+
CarbonFootprintConfigurationId_1.CarbonFootprintConfigurationId.guardAgainstInvalidSemanticId(value);
|
|
11
11
|
return new EventCarbonFootprintConfigurationId(value, false);
|
|
12
12
|
}
|
|
13
13
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class EventEditionLifecycleStageConfigurationId extends AggregateId_1.AggregateI
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, EventEditionLifecycleStageConfigurationId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, EventEditionLifecycleStageConfigurationId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value);
|
|
13
13
|
return new EventEditionLifecycleStageConfigurationId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class EventEditionLifecycleStageId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, EventEditionLifecycleStageId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, EventEditionLifecycleStageId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value);
|
|
13
13
|
return new EventEditionLifecycleStageId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -7,7 +7,7 @@ class ProductCarbonFootprintConfigurationId extends CarbonFootprintConfiguration
|
|
|
7
7
|
super(value, skipDomainValidation);
|
|
8
8
|
}
|
|
9
9
|
static create(value) {
|
|
10
|
-
CarbonFootprintConfigurationId_1.CarbonFootprintConfigurationId.
|
|
10
|
+
CarbonFootprintConfigurationId_1.CarbonFootprintConfigurationId.guardAgainstInvalidSemanticId(value);
|
|
11
11
|
return new ProductCarbonFootprintConfigurationId(value, false);
|
|
12
12
|
}
|
|
13
13
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class ProductCarbonFootprintSegmentConfigurationId extends AggregateId_1.Aggrega
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, ProductCarbonFootprintSegmentConfigurationId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, ProductCarbonFootprintSegmentConfigurationId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value);
|
|
13
13
|
return new ProductCarbonFootprintSegmentConfigurationId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -7,7 +7,7 @@ class ProductConfigurationCarbonFootprintSegmentId extends CarbonFootprintSegmen
|
|
|
7
7
|
super(value, skipDomainValidation);
|
|
8
8
|
}
|
|
9
9
|
static create(value) {
|
|
10
|
-
CarbonFootprintSegmentId_1.CarbonFootprintSegmentId.
|
|
10
|
+
CarbonFootprintSegmentId_1.CarbonFootprintSegmentId.guardAgainstInvalidSemanticId(value);
|
|
11
11
|
return new ProductConfigurationCarbonFootprintSegmentId(value, false);
|
|
12
12
|
}
|
|
13
13
|
static fromPrimitives(primitive) {
|
|
@@ -7,7 +7,7 @@ class ProductConfigurationCarbonFootprintSubsegmentId extends CarbonFootprintSub
|
|
|
7
7
|
super(value, skipDomainValidation);
|
|
8
8
|
}
|
|
9
9
|
static create(value) {
|
|
10
|
-
CarbonFootprintSubsegmentId_1.CarbonFootprintSubsegmentId.
|
|
10
|
+
CarbonFootprintSubsegmentId_1.CarbonFootprintSubsegmentId.guardAgainstInvalidSemanticId(value);
|
|
11
11
|
return new ProductConfigurationCarbonFootprintSubsegmentId(value, false);
|
|
12
12
|
}
|
|
13
13
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class ProductConfigurationSystemBoundaryId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, ProductConfigurationSystemBoundaryId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, ProductConfigurationSystemBoundaryId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value);
|
|
13
13
|
return new ProductConfigurationSystemBoundaryId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class CarbonFootprintConfigurationId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, CarbonFootprintConfigurationId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, CarbonFootprintConfigurationId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value);
|
|
13
13
|
return new CarbonFootprintConfigurationId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -274,7 +274,7 @@ _a = CarbonFootprintConfigurationIntensityIndicatorConfigurations, _CarbonFootpr
|
|
|
274
274
|
__classPrivateFieldGet(this, _CarbonFootprintConfigurationIntensityIndicatorConfigurations_instances, "m", _CarbonFootprintConfigurationIntensityIndicatorConfigurations_guardAgainstNullOrUndefinedValue).call(this, indicatorId, propertyName);
|
|
275
275
|
String_1.String.guardAgainstInvalidType(indicatorId, propertyName);
|
|
276
276
|
String_1.String.guardAgainstEmptyValue(indicatorId, propertyName);
|
|
277
|
-
AggregateId_1.AggregateId.
|
|
277
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(indicatorId, propertyName);
|
|
278
278
|
}, _CarbonFootprintConfigurationIntensityIndicatorConfigurations_guardAgainstInvalidIndicatorCode = function _CarbonFootprintConfigurationIntensityIndicatorConfigurations_guardAgainstInvalidIndicatorCode(indicatorCode, propertyName) {
|
|
279
279
|
__classPrivateFieldGet(this, _CarbonFootprintConfigurationIntensityIndicatorConfigurations_instances, "m", _CarbonFootprintConfigurationIntensityIndicatorConfigurations_guardAgainstNullOrUndefinedValue).call(this, indicatorCode, propertyName);
|
|
280
280
|
String_1.String.guardAgainstInvalidType(indicatorCode, propertyName);
|
|
@@ -9,7 +9,7 @@ class CarbonFootprintIntensityIndicatorId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, CarbonFootprintIntensityIndicatorId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, CarbonFootprintIntensityIndicatorId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value);
|
|
13
13
|
return new CarbonFootprintIntensityIndicatorId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class CarbonFootprintSegmentId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, CarbonFootprintSegmentId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, CarbonFootprintSegmentId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value);
|
|
13
13
|
return new CarbonFootprintSegmentId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class CarbonFootprintSubsegmentId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, CarbonFootprintSubsegmentId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, CarbonFootprintSubsegmentId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value);
|
|
13
13
|
return new CarbonFootprintSubsegmentId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class EventId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, EventId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, EventId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, EventId.PROPERTY_NAME);
|
|
13
13
|
return new EventId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
package/build/carbonbox/company-resources/events/editions/domain/value-objects/EventEditionId.js
CHANGED
|
@@ -9,7 +9,7 @@ class EventEditionId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, EventEditionId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, EventEditionId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, EventEditionId.PROPERTY_NAME);
|
|
13
13
|
return new EventEditionId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class FacilityId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, FacilityId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, FacilityId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value);
|
|
13
13
|
return new FacilityId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class ProductId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, ProductId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, ProductId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value);
|
|
13
13
|
return new ProductId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -84,7 +84,7 @@ class CalculationVariableActivityDataConditions extends ValueObject_1.ValueObjec
|
|
|
84
84
|
throw InvalidPropertyValueError_1.InvalidPropertyValueError.create(`${propertyName}.fieldId`, 'string', typeof condition.fieldId);
|
|
85
85
|
}
|
|
86
86
|
String_1.String.guardAgainstEmptyValue(condition.fieldId, `${propertyName}.fieldId`);
|
|
87
|
-
AggregateId_1.AggregateId.
|
|
87
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(condition.fieldId, `${propertyName}.fieldId`);
|
|
88
88
|
// Validar fieldCode
|
|
89
89
|
if (typeof condition.fieldCode !== 'string') {
|
|
90
90
|
throw InvalidPropertyValueError_1.InvalidPropertyValueError.create(`${propertyName}.fieldCode`, 'string', typeof condition.fieldCode);
|
|
@@ -9,7 +9,7 @@ class CalculationVariableId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, CalculationVariableId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, CalculationVariableId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, CalculationVariableId.PROPERTY_NAME);
|
|
13
13
|
return new CalculationVariableId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class EmissionCalculationFormulaId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, EmissionCalculationFormulaId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, EmissionCalculationFormulaId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, EmissionCalculationFormulaId.PROPERTY_NAME);
|
|
13
13
|
return new EmissionCalculationFormulaId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class EmissionFactorId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, EmissionFactorId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, EmissionFactorId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, EmissionFactorId.PROPERTY_NAME);
|
|
13
13
|
return new EmissionFactorId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class GlobalWarmingPotentialId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, GlobalWarmingPotentialId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, GlobalWarmingPotentialId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, GlobalWarmingPotentialId.PROPERTY_NAME);
|
|
13
13
|
return new GlobalWarmingPotentialId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class CalculationJobId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, CalculationJobId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, CalculationJobId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, CalculationJobId.PROPERTY_NAME);
|
|
13
13
|
return new CalculationJobId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class CalculationProcessId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, CalculationProcessId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, CalculationProcessId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, CalculationProcessId.PROPERTY_NAME);
|
|
13
13
|
return new CalculationProcessId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class CalculationWorkflowId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, CalculationWorkflowId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, CalculationWorkflowId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, CalculationWorkflowId.PROPERTY_NAME);
|
|
13
13
|
return new CalculationWorkflowId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -82,7 +82,7 @@ _a = CalculationWorkflowParallelJobs, _CalculationWorkflowParallelJobs_instances
|
|
|
82
82
|
parallelJobs.forEach((jobGroup, groupIndex) => {
|
|
83
83
|
jobGroup.forEach((jobId, jobIndex) => {
|
|
84
84
|
try {
|
|
85
|
-
AggregateId_1.AggregateId.
|
|
85
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(jobId, `${_a.PROPERTY_NAME}[${groupIndex}][${jobIndex}]`);
|
|
86
86
|
}
|
|
87
87
|
catch (error) {
|
|
88
88
|
throw InvalidPropertyValueError_1.InvalidPropertyValueError.create(`${_a.PROPERTY_NAME}[${groupIndex}][${jobIndex}]`, 'valid UUID format', jobId);
|
|
@@ -9,7 +9,7 @@ class EmissionAggregationId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, EmissionAggregationId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, EmissionAggregationId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, EmissionAggregationId.PROPERTY_NAME);
|
|
13
13
|
return new EmissionAggregationId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class EmissionCalculationId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, EmissionCalculationId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, EmissionCalculationId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, EmissionCalculationId.PROPERTY_NAME);
|
|
13
13
|
return new EmissionCalculationId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class GHGEmissionResultId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, GHGEmissionResultId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, GHGEmissionResultId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, GHGEmissionResultId.PROPERTY_NAME);
|
|
13
13
|
return new GHGEmissionResultId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class PurchaseContractCarbonClientId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, PurchaseContractCarbonClientId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, PurchaseContractCarbonClientId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, PurchaseContractCarbonClientId.PROPERTY_NAME);
|
|
13
13
|
return new PurchaseContractCarbonClientId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -252,7 +252,7 @@ _a = PurchaseContractContractAmendments, _PurchaseContractContractAmendments_con
|
|
|
252
252
|
throw InvalidPropertyTypeError_1.InvalidPropertyTypeError.create('amendedByStakeholder', 'StakeholderReference', typeof amendedByStakeholder);
|
|
253
253
|
}
|
|
254
254
|
String_1.String.guardAgainstEmptyValue(amendedByStakeholder.id, 'amendedByStakeholder.id');
|
|
255
|
-
AggregateId_1.AggregateId.
|
|
255
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(amendedByStakeholder.id, 'amendedByStakeholder.id');
|
|
256
256
|
String_1.String.guardAgainstEmptyValue(amendedByStakeholder.displayName, 'amendedByStakeholder.displayName');
|
|
257
257
|
}, _PurchaseContractContractAmendments_isEffectiveOn = function _PurchaseContractContractAmendments_isEffectiveOn(effectiveDate, checkDate) {
|
|
258
258
|
try {
|
|
@@ -9,7 +9,7 @@ class PurchaseContractId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, PurchaseContractId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, PurchaseContractId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, PurchaseContractId.PROPERTY_NAME);
|
|
13
13
|
return new PurchaseContractId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class PurchaseOrderCarbonClientId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, PurchaseOrderCarbonClientId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, PurchaseOrderCarbonClientId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, PurchaseOrderCarbonClientId.PROPERTY_NAME);
|
|
13
13
|
return new PurchaseOrderCarbonClientId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class PurchaseOrderId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, PurchaseOrderId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, PurchaseOrderId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, PurchaseOrderId.PROPERTY_NAME);
|
|
13
13
|
return new PurchaseOrderId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class ServiceCatalogId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, ServiceCatalogId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, ServiceCatalogId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, ServiceCatalogId.PROPERTY_NAME);
|
|
13
13
|
return new ServiceCatalogId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class ServicePricingId extends AggregateId_1.AggregateId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, ServicePricingId.PROPERTY_NAME);
|
|
11
11
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, ServicePricingId.PROPERTY_NAME);
|
|
12
|
-
AggregateId_1.AggregateId.
|
|
12
|
+
AggregateId_1.AggregateId.guardAgainstInvalidSemanticId(value, ServicePricingId.PROPERTY_NAME);
|
|
13
13
|
return new ServicePricingId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -65,7 +65,7 @@ class SecurityContext extends ObjectValueObject_1.ObjectValueObject {
|
|
|
65
65
|
// Use instance methods that handle Either pattern
|
|
66
66
|
const service = DateTimeFormattingDomainService_1.DateTimeFormattingDomainService.create();
|
|
67
67
|
const currentDateTimeResult = service.getCurrentDateTimeString();
|
|
68
|
-
const timestamp = currentDateTimeResult.fold(() => { throw
|
|
68
|
+
const timestamp = currentDateTimeResult.fold((error) => { throw error; }, (dateTimeString) => dateTimeString);
|
|
69
69
|
return SecurityContext.create({
|
|
70
70
|
user,
|
|
71
71
|
resource,
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SemanticUuidPrefix = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Semantic UUID Prefixes for Carbon Footprint Management System
|
|
6
|
+
*
|
|
7
|
+
* Format: {BC} or {BC}-{SUB1}-{SUB2}-...{SUBn} (N-level subdomain support)
|
|
8
|
+
*
|
|
9
|
+
* Supports:
|
|
10
|
+
* - BC-level entities: STC_uuid (for bounded context level entities)
|
|
11
|
+
* - Subdomain entities: USR-STH-CHO_uuid (for subdomain level entities)
|
|
12
|
+
* - N-level expansion: BC-SUB1-SUB2-SUBn_uuid (future growth)
|
|
13
|
+
*
|
|
14
|
+
* Usage in backend:
|
|
15
|
+
* - Import and use these prefixes when generating UUIDs: `${SemanticUuidPrefix.USR_STH_HOST}_${uuid}`
|
|
16
|
+
* - Each domain validates against its specific prefix in its value object
|
|
17
|
+
* - Maintains consistency across the entire system
|
|
18
|
+
* - Easily expandable as new domains/subdomains are added
|
|
19
|
+
*/
|
|
20
|
+
var SemanticUuidPrefix;
|
|
21
|
+
(function (SemanticUuidPrefix) {
|
|
22
|
+
// BC-Level entities (bounded context level)
|
|
23
|
+
SemanticUuidPrefix["STC"] = "STC";
|
|
24
|
+
// Activity Data Collection
|
|
25
|
+
SemanticUuidPrefix["ADC_SUBMISSIONS"] = "ADC-SUB";
|
|
26
|
+
SemanticUuidPrefix["ADC_FIELDS"] = "ADC-FLD";
|
|
27
|
+
SemanticUuidPrefix["ADC_LOGIC"] = "ADC-LOG";
|
|
28
|
+
SemanticUuidPrefix["ADC_LABELS"] = "ADC-LBL";
|
|
29
|
+
SemanticUuidPrefix["ADC_FORMS"] = "ADC-FRM";
|
|
30
|
+
SemanticUuidPrefix["ADC_ADAPTATIONS"] = "ADC-ADP";
|
|
31
|
+
// Carbon Footprint Configurations
|
|
32
|
+
SemanticUuidPrefix["CFC_CORPORATE"] = "CFC-COR";
|
|
33
|
+
SemanticUuidPrefix["CFC_EVENT"] = "CFC-EVT";
|
|
34
|
+
SemanticUuidPrefix["CFC_PRODUCT"] = "CFC-PRD";
|
|
35
|
+
// Company Resources
|
|
36
|
+
SemanticUuidPrefix["CPR_EVENTS"] = "CPR-EVT";
|
|
37
|
+
SemanticUuidPrefix["CPR_FACILITIES"] = "CPR-FAC";
|
|
38
|
+
SemanticUuidPrefix["CPR_PRODUCTS"] = "CPR-PRD";
|
|
39
|
+
// Emission Calculation Formulas
|
|
40
|
+
SemanticUuidPrefix["ECF_VARIABLES"] = "ECF-VAR";
|
|
41
|
+
SemanticUuidPrefix["ECF_FACTORS"] = "ECF-FAC";
|
|
42
|
+
SemanticUuidPrefix["ECF_GWP"] = "ECF-GWP";
|
|
43
|
+
// Emission Calculation Process
|
|
44
|
+
SemanticUuidPrefix["ECP_JOBS"] = "ECP-JOB";
|
|
45
|
+
SemanticUuidPrefix["ECP_PROCESSES"] = "ECP-PRC";
|
|
46
|
+
SemanticUuidPrefix["ECP_WORKFLOWS"] = "ECP-WFL";
|
|
47
|
+
// Emission Calculation Results
|
|
48
|
+
SemanticUuidPrefix["ECR_AGGREGATIONS"] = "ECR-AGG";
|
|
49
|
+
SemanticUuidPrefix["ECR_CALCULATIONS"] = "ECR-CAL";
|
|
50
|
+
SemanticUuidPrefix["ECR_GHG_RESULTS"] = "ECR-GHG";
|
|
51
|
+
// Users
|
|
52
|
+
SemanticUuidPrefix["USR"] = "USR";
|
|
53
|
+
// Users - Stakeholders (USR-STH-Role)
|
|
54
|
+
SemanticUuidPrefix["USR_STH_CLIENT"] = "USR-STH-CLI";
|
|
55
|
+
SemanticUuidPrefix["USR_STH_COORDINATOR"] = "USR-STH-CRD";
|
|
56
|
+
SemanticUuidPrefix["USR_STH_HOST"] = "USR-STH-CHO";
|
|
57
|
+
SemanticUuidPrefix["USR_STH_MANAGER"] = "USR-STH-MGR";
|
|
58
|
+
// Shared Domain
|
|
59
|
+
SemanticUuidPrefix["SHR_DOMAIN"] = "SHR-DOM";
|
|
60
|
+
SemanticUuidPrefix["SHR_EITHER"] = "SHR-ETH";
|
|
61
|
+
// Future expansion examples (when system grows):
|
|
62
|
+
// ADC_SUB_FIELDS = 'ADC-SUB-FLD', // Activity Data Collection -> Submissions -> Fields
|
|
63
|
+
// USR_STH_CHO_MGT = 'USR-STH-CHO-MGT', // Users -> Stakeholders -> Carbon Host -> Management
|
|
64
|
+
// CFC_COR_SEG = 'CFC-COR-SEG', // Carbon Footprint -> Corporate -> Segments
|
|
65
|
+
})(SemanticUuidPrefix || (exports.SemanticUuidPrefix = SemanticUuidPrefix = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InvalidSemanticUuidError = void 0;
|
|
4
|
+
const RootError_1 = require("./RootError");
|
|
5
|
+
class InvalidSemanticUuidError extends RootError_1.RootError {
|
|
6
|
+
constructor(semanticUuid, propertyName) {
|
|
7
|
+
const message = `The semantic UUID "${semanticUuid}" violates the domain policy - ${InvalidSemanticUuidError.INVALID_SEMANTIC_UUID_ERROR_MESSAGE}. Property: ${propertyName}`;
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = 'InvalidSemanticUuidError';
|
|
10
|
+
}
|
|
11
|
+
static create(semanticUuid, propertyName) {
|
|
12
|
+
return new InvalidSemanticUuidError(semanticUuid, propertyName);
|
|
13
|
+
}
|
|
14
|
+
logError() {
|
|
15
|
+
return `${this.name}: ${this.message}`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.InvalidSemanticUuidError = InvalidSemanticUuidError;
|
|
19
|
+
InvalidSemanticUuidError.INVALID_SEMANTIC_UUID_ERROR_MESSAGE = 'Invalid semantic UUID format. Expected: PREFIX_EntityType_UUID (e.g., ADC-SUB_ActivityDataSubmission_550e8400-e29b-41d4-a716-446655440000)';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InvalidSemanticUuidFormatError = void 0;
|
|
4
|
+
const RootError_1 = require("./RootError");
|
|
5
|
+
class InvalidSemanticUuidFormatError extends RootError_1.RootError {
|
|
6
|
+
constructor(semanticUuid, reason) {
|
|
7
|
+
const message = `The semantic UUID "${semanticUuid}" has invalid format structure: ${reason}. ${InvalidSemanticUuidFormatError.INVALID_SEMANTIC_UUID_FORMAT_ERROR_MESSAGE}`;
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = 'InvalidSemanticUuidFormatError';
|
|
10
|
+
}
|
|
11
|
+
static create(semanticUuid, reason) {
|
|
12
|
+
return new InvalidSemanticUuidFormatError(semanticUuid, reason);
|
|
13
|
+
}
|
|
14
|
+
logError() {
|
|
15
|
+
return `${this.name}: ${this.message}`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.InvalidSemanticUuidFormatError = InvalidSemanticUuidFormatError;
|
|
19
|
+
InvalidSemanticUuidFormatError.INVALID_SEMANTIC_UUID_FORMAT_ERROR_MESSAGE = 'Invalid semantic UUID format structure';
|