@carbonbox/domain 0.6.1 → 0.6.3
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 +28 -0
- package/build/carbonbox/activity-data-collection/collection-fields/domain/value-objects/CollectionFieldId.js +28 -0
- package/build/carbonbox/activity-data-collection/conditional-logic/domain/value-objects/ConditionalFieldRuleId.js +24 -0
- package/build/carbonbox/activity-data-collection/contextual-labels/domain/value-objects/ContextualLabelId.js +24 -0
- package/build/carbonbox/activity-data-collection/dynamic-forms/domain/value-objects/DynamicFormId.js +24 -0
- package/build/carbonbox/activity-data-collection/stakeholder-adaptations/domain/value-objects/StakeholderAdaptationId.js +24 -0
- package/build/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationId.js +30 -2
- package/build/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/segments/domain/value-objects/CorporateConfigurationCarbonFootprintSegmentId.js +32 -1
- package/build/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/segments/subsegments/domain/value-objects/CorporateConfigurationCarbonFootprintSubsegmentId.js +32 -1
- package/build/carbonbox/carbon-footprint-configurations/corporate-configurations/domain/value-objects/CorporateCarbonFootprintConfigurationId.js +24 -0
- package/build/carbonbox/carbon-footprint-configurations/event-configurations/domain/value-objects/EventCarbonFootprintConfigurationId.js +24 -0
- package/build/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/domain/value-objects/EventEditionLifecycleStageConfigurationId.js +30 -2
- package/build/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/event-edition-lifecycle-stages/domain/value-objects/EventEditionLifecycleStageId.js +30 -2
- package/build/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/event-edition-lifecycle-stages/subsegments/domain/value-objects/EventEditionConfigurationCarbonFootprintSubsegmentId.js +34 -3
- package/build/carbonbox/carbon-footprint-configurations/product-configurations/domain/value-objects/ProductCarbonFootprintConfigurationId.js +24 -0
- package/build/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/domain/value-objects/ProductCarbonFootprintSegmentConfigurationId.js +29 -1
- package/build/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/segments/domain/value-objects/ProductConfigurationCarbonFootprintSegmentId.js +32 -1
- package/build/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/segments/subsegments/domain/value-objects/ProductConfigurationCarbonFootprintSubsegmentId.js +32 -1
- package/build/carbonbox/carbon-footprint-configurations/product-configurations/system-boundaries/domain/value-objects/ProductConfigurationSystemBoundaryId.js +29 -1
- package/build/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintIntensityIndicatorId.js +29 -1
- package/build/carbonbox/company-resources/events/domain/value-objects/EventId.js +28 -0
- package/build/carbonbox/company-resources/events/editions/domain/value-objects/EventEditionId.js +28 -0
- package/build/carbonbox/company-resources/facilities/domain/value-objects/FacilityId.js +29 -1
- package/build/carbonbox/company-resources/products/domain/value-objects/ProductId.js +29 -1
- package/build/carbonbox/emission-calculation-formulas/calculation-variables/domain/value-objects/CalculationVariableId.js +28 -0
- package/build/carbonbox/emission-calculation-formulas/emission-factors/domain/value-objects/EmissionFactorId.js +28 -0
- package/build/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/value-objects/GlobalWarmingPotentialId.js +28 -0
- package/build/carbonbox/emission-calculation-process/calculation-jobs/domain/value-objects/CalculationJobId.js +28 -0
- package/build/carbonbox/emission-calculation-process/calculation-processes/domain/value-objects/CalculationProcessId.js +28 -0
- package/build/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowId.js +28 -0
- package/build/carbonbox/emission-calculation-results/emission-aggregations/domain/value-objects/EmissionAggregationId.js +28 -0
- package/build/carbonbox/emission-calculation-results/emission-calculations/domain/value-objects/EmissionCalculationId.js +28 -0
- package/build/carbonbox/emission-calculation-results/ghg-emission-results/domain/value-objects/GHGEmissionResultId.js +28 -0
- package/build/carbonbox/purchase-management-system/purchase-contracts/domain/value-objects/PurchaseContractId.js +28 -0
- package/build/carbonbox/purchase-management-system/purchase-orders/domain/value-objects/PurchaseOrderId.js +28 -0
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogId.js +28 -0
- package/build/carbonbox/purchase-management-system/service-pricing/domain/value-objects/ServicePricingId.js +28 -0
- package/build/carbonbox/shared/domain/enums/SemanticUuidPrefix.js +16 -0
- package/build/carbonbox/shared/domain/exceptions/InvalidAggregateIdFormatError.js +1 -1
- package/build/carbonbox/shared/domain/exceptions/InvalidAggregatePrefixError.js +31 -0
- package/build/carbonbox/shared/domain/value-objects/UserId.js +0 -5
- package/build/carbonbox/stakeholders/carbon-clients/domain/value-objects/CarbonClientId.js +28 -0
- package/build/carbonbox/stakeholders/carbon-coordinators/domain/value-objects/CarbonCoordinatorId.js +28 -0
- package/build/carbonbox/stakeholders/carbon-host/domain/value-objects/CarbonHostId.js +28 -0
- package/build/carbonbox/stakeholders/carbon-managers/domain/value-objects/CarbonManagerId.js +28 -0
- package/build/types/carbonbox/activity-data-collection/activity-data-submissions/domain/value-objects/ActivityDataSubmissionId.d.ts +5 -0
- package/build/types/carbonbox/activity-data-collection/activity-data-submissions/domain/value-objects/ActivityDataSubmissionId.d.ts.map +1 -1
- package/build/types/carbonbox/activity-data-collection/collection-fields/domain/value-objects/CollectionFieldId.d.ts +5 -0
- package/build/types/carbonbox/activity-data-collection/collection-fields/domain/value-objects/CollectionFieldId.d.ts.map +1 -1
- package/build/types/carbonbox/activity-data-collection/conditional-logic/domain/value-objects/ConditionalFieldRuleId.d.ts +2 -0
- package/build/types/carbonbox/activity-data-collection/conditional-logic/domain/value-objects/ConditionalFieldRuleId.d.ts.map +1 -1
- package/build/types/carbonbox/activity-data-collection/contextual-labels/domain/value-objects/ContextualLabelId.d.ts +2 -0
- package/build/types/carbonbox/activity-data-collection/contextual-labels/domain/value-objects/ContextualLabelId.d.ts.map +1 -1
- package/build/types/carbonbox/activity-data-collection/dynamic-forms/domain/value-objects/DynamicFormId.d.ts +2 -0
- package/build/types/carbonbox/activity-data-collection/dynamic-forms/domain/value-objects/DynamicFormId.d.ts.map +1 -1
- package/build/types/carbonbox/activity-data-collection/stakeholder-adaptations/domain/value-objects/StakeholderAdaptationId.d.ts +2 -0
- package/build/types/carbonbox/activity-data-collection/stakeholder-adaptations/domain/value-objects/StakeholderAdaptationId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationId.d.ts +5 -0
- package/build/types/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/segments/domain/value-objects/CorporateConfigurationCarbonFootprintSegmentId.d.ts +5 -0
- package/build/types/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/segments/domain/value-objects/CorporateConfigurationCarbonFootprintSegmentId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/segments/subsegments/domain/value-objects/CorporateConfigurationCarbonFootprintSubsegmentId.d.ts +5 -0
- package/build/types/carbonbox/carbon-footprint-configurations/corporate-configurations/corporate-segment-configurations/segments/subsegments/domain/value-objects/CorporateConfigurationCarbonFootprintSubsegmentId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/corporate-configurations/domain/value-objects/CorporateCarbonFootprintConfigurationId.d.ts +2 -0
- package/build/types/carbonbox/carbon-footprint-configurations/corporate-configurations/domain/value-objects/CorporateCarbonFootprintConfigurationId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/event-configurations/domain/value-objects/EventCarbonFootprintConfigurationId.d.ts +2 -0
- package/build/types/carbonbox/carbon-footprint-configurations/event-configurations/domain/value-objects/EventCarbonFootprintConfigurationId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/domain/value-objects/EventEditionLifecycleStageConfigurationId.d.ts +5 -0
- package/build/types/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/domain/value-objects/EventEditionLifecycleStageConfigurationId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/event-edition-lifecycle-stages/domain/value-objects/EventEditionLifecycleStageId.d.ts +5 -0
- package/build/types/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/event-edition-lifecycle-stages/domain/value-objects/EventEditionLifecycleStageId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/event-edition-lifecycle-stages/subsegments/domain/value-objects/EventEditionConfigurationCarbonFootprintSubsegmentId.d.ts +7 -2
- package/build/types/carbonbox/carbon-footprint-configurations/event-configurations/event-edition-lifecycle-stage-configurations/event-edition-lifecycle-stages/subsegments/domain/value-objects/EventEditionConfigurationCarbonFootprintSubsegmentId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/product-configurations/domain/value-objects/ProductCarbonFootprintConfigurationId.d.ts +2 -0
- package/build/types/carbonbox/carbon-footprint-configurations/product-configurations/domain/value-objects/ProductCarbonFootprintConfigurationId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/domain/value-objects/ProductCarbonFootprintSegmentConfigurationId.d.ts +5 -0
- package/build/types/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/domain/value-objects/ProductCarbonFootprintSegmentConfigurationId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/segments/domain/value-objects/ProductConfigurationCarbonFootprintSegmentId.d.ts +5 -0
- package/build/types/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/segments/domain/value-objects/ProductConfigurationCarbonFootprintSegmentId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/segments/subsegments/domain/value-objects/ProductConfigurationCarbonFootprintSubsegmentId.d.ts +5 -0
- package/build/types/carbonbox/carbon-footprint-configurations/product-configurations/product-segment-configurations/segments/subsegments/domain/value-objects/ProductConfigurationCarbonFootprintSubsegmentId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/product-configurations/system-boundaries/domain/value-objects/ProductConfigurationSystemBoundaryId.d.ts +5 -0
- package/build/types/carbonbox/carbon-footprint-configurations/product-configurations/system-boundaries/domain/value-objects/ProductConfigurationSystemBoundaryId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintConfigurationId.d.ts +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintConfigurationId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintIntensityIndicatorId.d.ts +5 -0
- package/build/types/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintIntensityIndicatorId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintSegmentId.d.ts +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintSegmentId.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintSubsegmentCode.d.ts +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintSubsegmentCode.d.ts.map +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintSubsegmentId.d.ts +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/shared/domain/value-objects/CarbonFootprintSubsegmentId.d.ts.map +1 -1
- package/build/types/carbonbox/company-resources/events/domain/value-objects/EventId.d.ts +5 -0
- package/build/types/carbonbox/company-resources/events/domain/value-objects/EventId.d.ts.map +1 -1
- package/build/types/carbonbox/company-resources/events/editions/domain/value-objects/EventEditionId.d.ts +5 -0
- package/build/types/carbonbox/company-resources/events/editions/domain/value-objects/EventEditionId.d.ts.map +1 -1
- package/build/types/carbonbox/company-resources/facilities/domain/value-objects/FacilityId.d.ts +5 -0
- package/build/types/carbonbox/company-resources/facilities/domain/value-objects/FacilityId.d.ts.map +1 -1
- package/build/types/carbonbox/company-resources/products/domain/value-objects/ProductId.d.ts +5 -0
- package/build/types/carbonbox/company-resources/products/domain/value-objects/ProductId.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-formulas/calculation-variables/domain/value-objects/CalculationVariableId.d.ts +5 -0
- package/build/types/carbonbox/emission-calculation-formulas/calculation-variables/domain/value-objects/CalculationVariableId.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-formulas/emission-factors/domain/value-objects/EmissionFactorId.d.ts +5 -0
- package/build/types/carbonbox/emission-calculation-formulas/emission-factors/domain/value-objects/EmissionFactorId.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/value-objects/GlobalWarmingPotentialId.d.ts +5 -0
- package/build/types/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/value-objects/GlobalWarmingPotentialId.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-process/calculation-jobs/domain/value-objects/CalculationJobId.d.ts +5 -0
- package/build/types/carbonbox/emission-calculation-process/calculation-jobs/domain/value-objects/CalculationJobId.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-process/calculation-processes/domain/value-objects/CalculationProcessId.d.ts +5 -0
- package/build/types/carbonbox/emission-calculation-process/calculation-processes/domain/value-objects/CalculationProcessId.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowId.d.ts +5 -0
- package/build/types/carbonbox/emission-calculation-process/calculation-workflows/domain/value-objects/CalculationWorkflowId.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-results/emission-aggregations/domain/value-objects/EmissionAggregationId.d.ts +5 -0
- package/build/types/carbonbox/emission-calculation-results/emission-aggregations/domain/value-objects/EmissionAggregationId.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-results/emission-calculations/domain/value-objects/EmissionCalculationId.d.ts +5 -0
- package/build/types/carbonbox/emission-calculation-results/emission-calculations/domain/value-objects/EmissionCalculationId.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-results/ghg-emission-results/domain/value-objects/GHGEmissionResultId.d.ts +5 -0
- package/build/types/carbonbox/emission-calculation-results/ghg-emission-results/domain/value-objects/GHGEmissionResultId.d.ts.map +1 -1
- package/build/types/carbonbox/purchase-management-system/purchase-contracts/domain/value-objects/PurchaseContractId.d.ts +5 -0
- package/build/types/carbonbox/purchase-management-system/purchase-contracts/domain/value-objects/PurchaseContractId.d.ts.map +1 -1
- package/build/types/carbonbox/purchase-management-system/purchase-orders/domain/value-objects/PurchaseOrderId.d.ts +5 -0
- package/build/types/carbonbox/purchase-management-system/purchase-orders/domain/value-objects/PurchaseOrderId.d.ts.map +1 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogId.d.ts +5 -0
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCatalogId.d.ts.map +1 -1
- package/build/types/carbonbox/purchase-management-system/service-pricing/domain/value-objects/ServicePricingId.d.ts +5 -0
- package/build/types/carbonbox/purchase-management-system/service-pricing/domain/value-objects/ServicePricingId.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/enums/SemanticUuidPrefix.d.ts +15 -0
- package/build/types/carbonbox/shared/domain/enums/SemanticUuidPrefix.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/exceptions/InvalidAggregateIdFormatError.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/exceptions/InvalidAggregatePrefixError.d.ts +20 -0
- package/build/types/carbonbox/shared/domain/exceptions/InvalidAggregatePrefixError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/value-objects/UserId.d.ts +0 -4
- package/build/types/carbonbox/shared/domain/value-objects/UserId.d.ts.map +1 -1
- package/build/types/carbonbox/stakeholders/carbon-clients/domain/value-objects/CarbonClientId.d.ts +5 -0
- package/build/types/carbonbox/stakeholders/carbon-clients/domain/value-objects/CarbonClientId.d.ts.map +1 -1
- package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/value-objects/CarbonCoordinatorId.d.ts +5 -0
- package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/value-objects/CarbonCoordinatorId.d.ts.map +1 -1
- package/build/types/carbonbox/stakeholders/carbon-host/domain/value-objects/CarbonHostId.d.ts +5 -0
- package/build/types/carbonbox/stakeholders/carbon-host/domain/value-objects/CarbonHostId.d.ts.map +1 -1
- package/build/types/carbonbox/stakeholders/carbon-managers/domain/value-objects/CarbonManagerId.d.ts +5 -0
- package/build/types/carbonbox/stakeholders/carbon-managers/domain/value-objects/CarbonManagerId.d.ts.map +1 -1
- package/package.json +1 -1
- package/build/carbonbox/purchase-management-system/service-catalog/domain/entity/IService.js +0 -2
- package/build/carbonbox/purchase-management-system/service-catalog/domain/entity/Service.js +0 -263
- package/build/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCategory.js +0 -20
- package/build/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceStatus.js +0 -9
- package/build/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceType.js +0 -10
- package/build/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCategoryError.js +0 -19
- package/build/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceStatusError.js +0 -19
- package/build/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceTypeError.js +0 -19
- package/build/carbonbox/purchase-management-system/service-catalog/domain/repository/IServiceRepository.js +0 -2
- package/build/carbonbox/purchase-management-system/service-catalog/domain/types/ServicePrimitives.js +0 -2
- package/build/carbonbox/purchase-management-system/service-catalog/domain/types/ServiceProps.js +0 -2
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAdditionalUserRoles.js +0 -131
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsDocumentReading.js +0 -22
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsSectoralComparison.js +0 -22
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceBasePricePercentage.js +0 -140
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCategory.js +0 -243
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCode.js +0 -24
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCreatedByStakeholder.js +0 -26
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDependsOnServiceCode.js +0 -21
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDescription.js +0 -23
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceExpertDedicationLevel.js +0 -212
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceFixedPriceAmount.js +0 -193
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasBasePrice.js +0 -22
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasFixedPrice.js +0 -22
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceId.js +0 -24
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesCarbonBoxAcademy.js +0 -22
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesESGIndicators.js +0 -22
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForCorporate.js +0 -22
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForEvent.js +0 -22
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForProduct.js +0 -22
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsRequiredService.js +0 -22
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceMaxUsers.js +0 -246
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceName.js +0 -23
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceReportTypes.js +0 -246
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceStatus.js +0 -221
- package/build/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceType.js +0 -235
- package/build/carbonbox/shared/domain/exceptions/InvalidSemanticUuidError.js +0 -19
- package/build/carbonbox/shared/domain/services/DateTimeFormattingDomainService.js +0 -172
- package/build/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.js +0 -2
- package/build/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.js +0 -235
- package/build/carbonbox/shared/domain/types/AllPermissions.js +0 -2
- package/build/carbonbox/shared/domain/types/AllPermissionsPrimitives.js +0 -2
- package/build/carbonbox/shared/domain/types/ServiceReference.js +0 -2
- package/build/carbonbox/shared/domain/types/ServiceReferencePrimitives.js +0 -2
- package/build/carbonbox/shared/domain/types/UserEmailProps.js +0 -2
- package/build/carbonbox/shared/domain/value-objects/ServiceReference.js +0 -301
- package/build/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissions.js +0 -2
- package/build/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsPrimitives.js +0 -2
- package/build/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsValue.js +0 -2
- package/build/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissions.js +0 -2
- package/build/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsPrimitives.js +0 -2
- package/build/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsValue.js +0 -2
- package/build/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissions.js +0 -2
- package/build/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsPrimitives.js +0 -2
- package/build/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsValue.js +0 -2
- package/build/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissions.js +0 -2
- package/build/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsPrimitives.js +0 -2
- package/build/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsValue.js +0 -2
- package/build/carbonbox/stakeholders/shared/domain/enums/StakeholderBusinessStatus.js +0 -10
- package/build/carbonbox/stakeholders/shared/domain/exceptions/InvalidStakeholderBusinessStatusError.js +0 -18
- package/build/carbonbox/stakeholders/shared/domain/types/StakeholderPermissions.js +0 -2
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/entity/IService.d.ts +0 -52
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/entity/IService.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/entity/Service.d.ts +0 -60
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/entity/Service.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCategory.d.ts +0 -17
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceCategory.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceStatus.d.ts +0 -6
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceStatus.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceType.d.ts +0 -7
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/enums/ServiceType.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCategoryError.d.ts +0 -8
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceCategoryError.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceStatusError.d.ts +0 -8
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceStatusError.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceTypeError.d.ts +0 -8
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/exceptions/InvalidServiceTypeError.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/repository/IServiceRepository.d.ts +0 -22
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/repository/IServiceRepository.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/types/ServicePrimitives.d.ts +0 -35
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/types/ServicePrimitives.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/types/ServiceProps.d.ts +0 -35
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/types/ServiceProps.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAdditionalUserRoles.d.ts +0 -71
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAdditionalUserRoles.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsDocumentReading.d.ts +0 -9
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsDocumentReading.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsSectoralComparison.d.ts +0 -9
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceAllowsSectoralComparison.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceBasePricePercentage.d.ts +0 -54
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceBasePricePercentage.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCategory.d.ts +0 -123
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCategory.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCode.d.ts +0 -9
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCode.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCreatedByStakeholder.d.ts +0 -11
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceCreatedByStakeholder.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDependsOnServiceCode.d.ts +0 -9
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDependsOnServiceCode.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDescription.d.ts +0 -9
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceDescription.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceExpertDedicationLevel.d.ts +0 -92
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceExpertDedicationLevel.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceFixedPriceAmount.d.ts +0 -83
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceFixedPriceAmount.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasBasePrice.d.ts +0 -9
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasBasePrice.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasFixedPrice.d.ts +0 -9
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceHasFixedPrice.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceId.d.ts +0 -9
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceId.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesCarbonBoxAcademy.d.ts +0 -9
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesCarbonBoxAcademy.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesESGIndicators.d.ts +0 -9
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIncludesESGIndicators.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForCorporate.d.ts +0 -9
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForCorporate.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForEvent.d.ts +0 -9
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForEvent.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForProduct.d.ts +0 -9
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsAvailableForProduct.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsRequiredService.d.ts +0 -9
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceIsRequiredService.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceMaxUsers.d.ts +0 -99
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceMaxUsers.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceName.d.ts +0 -9
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceName.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceReportTypes.d.ts +0 -119
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceReportTypes.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceStatus.d.ts +0 -110
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceStatus.d.ts.map +0 -1
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceType.d.ts +0 -111
- package/build/types/carbonbox/purchase-management-system/service-catalog/domain/value-objects/ServiceType.d.ts.map +0 -1
- package/build/types/carbonbox/shared/domain/exceptions/InvalidSemanticUuidError.d.ts +0 -8
- package/build/types/carbonbox/shared/domain/exceptions/InvalidSemanticUuidError.d.ts.map +0 -1
- package/build/types/carbonbox/shared/domain/services/DateTimeFormattingDomainService.d.ts +0 -95
- package/build/types/carbonbox/shared/domain/services/DateTimeFormattingDomainService.d.ts.map +0 -1
- package/build/types/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.d.ts +0 -85
- package/build/types/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.d.ts.map +0 -1
- package/build/types/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.d.ts +0 -67
- package/build/types/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.d.ts.map +0 -1
- package/build/types/carbonbox/shared/domain/types/AllPermissions.d.ts +0 -12
- package/build/types/carbonbox/shared/domain/types/AllPermissions.d.ts.map +0 -1
- package/build/types/carbonbox/shared/domain/types/AllPermissionsPrimitives.d.ts +0 -12
- package/build/types/carbonbox/shared/domain/types/AllPermissionsPrimitives.d.ts.map +0 -1
- package/build/types/carbonbox/shared/domain/types/ServiceReference.d.ts +0 -8
- package/build/types/carbonbox/shared/domain/types/ServiceReference.d.ts.map +0 -1
- package/build/types/carbonbox/shared/domain/types/ServiceReferencePrimitives.d.ts +0 -8
- package/build/types/carbonbox/shared/domain/types/ServiceReferencePrimitives.d.ts.map +0 -1
- package/build/types/carbonbox/shared/domain/types/UserEmailProps.d.ts +0 -5
- package/build/types/carbonbox/shared/domain/types/UserEmailProps.d.ts.map +0 -1
- package/build/types/carbonbox/shared/domain/value-objects/ServiceReference.d.ts +0 -134
- package/build/types/carbonbox/shared/domain/value-objects/ServiceReference.d.ts.map +0 -1
- package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissions.d.ts +0 -3
- package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissions.d.ts.map +0 -1
- package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsPrimitives.d.ts +0 -3
- package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsPrimitives.d.ts.map +0 -1
- package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsValue.d.ts +0 -3
- package/build/types/carbonbox/stakeholders/carbon-clients/domain/types/CarbonClientPermissionsValue.d.ts.map +0 -1
- package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissions.d.ts +0 -3
- package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissions.d.ts.map +0 -1
- package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsPrimitives.d.ts +0 -3
- package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsPrimitives.d.ts.map +0 -1
- package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsValue.d.ts +0 -3
- package/build/types/carbonbox/stakeholders/carbon-coordinators/domain/types/CarbonCoordinatorPermissionsValue.d.ts.map +0 -1
- package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissions.d.ts +0 -3
- package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissions.d.ts.map +0 -1
- package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsPrimitives.d.ts +0 -3
- package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsPrimitives.d.ts.map +0 -1
- package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsValue.d.ts +0 -3
- package/build/types/carbonbox/stakeholders/carbon-host/domain/types/CarbonHostPermissionsValue.d.ts.map +0 -1
- package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissions.d.ts +0 -3
- package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissions.d.ts.map +0 -1
- package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsPrimitives.d.ts +0 -3
- package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsPrimitives.d.ts.map +0 -1
- package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsValue.d.ts +0 -3
- package/build/types/carbonbox/stakeholders/carbon-managers/domain/types/CarbonManagerPermissionsValue.d.ts.map +0 -1
- package/build/types/carbonbox/stakeholders/shared/domain/enums/StakeholderBusinessStatus.d.ts +0 -7
- package/build/types/carbonbox/stakeholders/shared/domain/enums/StakeholderBusinessStatus.d.ts.map +0 -1
- package/build/types/carbonbox/stakeholders/shared/domain/exceptions/InvalidStakeholderBusinessStatusError.d.ts +0 -7
- package/build/types/carbonbox/stakeholders/shared/domain/exceptions/InvalidStakeholderBusinessStatusError.d.ts.map +0 -1
- package/build/types/carbonbox/stakeholders/shared/domain/types/StakeholderPermissions.d.ts +0 -10
- package/build/types/carbonbox/stakeholders/shared/domain/types/StakeholderPermissions.d.ts.map +0 -1
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GlobalWarmingPotentialId = void 0;
|
|
4
4
|
const AggregateId_1 = require("../../../../shared/domain/value-objects/AggregateId");
|
|
5
|
+
const SemanticUuidPrefix_1 = require("../../../../shared/domain/enums/SemanticUuidPrefix");
|
|
6
|
+
const InvalidAggregatePrefixError_1 = require("../../../../shared/domain/exceptions/InvalidAggregatePrefixError");
|
|
5
7
|
class GlobalWarmingPotentialId extends AggregateId_1.AggregateId {
|
|
6
8
|
constructor(value, skipDomainValidation) {
|
|
7
9
|
super(value, skipDomainValidation, GlobalWarmingPotentialId.PROPERTY_NAME);
|
|
@@ -10,8 +12,31 @@ class GlobalWarmingPotentialId extends AggregateId_1.AggregateId {
|
|
|
10
12
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, GlobalWarmingPotentialId.PROPERTY_NAME);
|
|
11
13
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, GlobalWarmingPotentialId.PROPERTY_NAME);
|
|
12
14
|
AggregateId_1.AggregateId.guardAgainstInvalidId(value, GlobalWarmingPotentialId.PROPERTY_NAME);
|
|
15
|
+
// Validate that the prefix is valid for GlobalWarmingPotential
|
|
16
|
+
GlobalWarmingPotentialId.guardAgainstInvalidPrefix(value);
|
|
13
17
|
return new GlobalWarmingPotentialId(value, false);
|
|
14
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Validates that the UUID has a valid GlobalWarmingPotential prefix
|
|
21
|
+
*/
|
|
22
|
+
static guardAgainstInvalidPrefix(value) {
|
|
23
|
+
try {
|
|
24
|
+
const tempInstance = new GlobalWarmingPotentialId(value, true);
|
|
25
|
+
const prefix = tempInstance.extractPrefix();
|
|
26
|
+
if (GlobalWarmingPotentialId.VALID_PREFIXES.includes(prefix) === false) {
|
|
27
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'GlobalWarmingPotential', prefix, GlobalWarmingPotentialId.VALID_PREFIXES, GlobalWarmingPotentialId.PROPERTY_NAME);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (error instanceof InvalidAggregatePrefixError_1.InvalidAggregatePrefixError) {
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
if (error instanceof Error) {
|
|
35
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'GlobalWarmingPotential', 'UNKNOWN', GlobalWarmingPotentialId.VALID_PREFIXES, GlobalWarmingPotentialId.PROPERTY_NAME);
|
|
36
|
+
}
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
15
40
|
static fromPrimitives(primitive) {
|
|
16
41
|
const value = primitive;
|
|
17
42
|
return new GlobalWarmingPotentialId(value, true);
|
|
@@ -22,3 +47,6 @@ class GlobalWarmingPotentialId extends AggregateId_1.AggregateId {
|
|
|
22
47
|
}
|
|
23
48
|
exports.GlobalWarmingPotentialId = GlobalWarmingPotentialId;
|
|
24
49
|
GlobalWarmingPotentialId.PROPERTY_NAME = 'id';
|
|
50
|
+
GlobalWarmingPotentialId.VALID_PREFIXES = [
|
|
51
|
+
SemanticUuidPrefix_1.SemanticUuidPrefix.ECF_GWP,
|
|
52
|
+
];
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CalculationJobId = void 0;
|
|
4
4
|
const AggregateId_1 = require("../../../../shared/domain/value-objects/AggregateId");
|
|
5
|
+
const SemanticUuidPrefix_1 = require("../../../../shared/domain/enums/SemanticUuidPrefix");
|
|
6
|
+
const InvalidAggregatePrefixError_1 = require("../../../../shared/domain/exceptions/InvalidAggregatePrefixError");
|
|
5
7
|
class CalculationJobId extends AggregateId_1.AggregateId {
|
|
6
8
|
constructor(value, skipDomainValidation) {
|
|
7
9
|
super(value, skipDomainValidation, CalculationJobId.PROPERTY_NAME);
|
|
@@ -10,8 +12,31 @@ class CalculationJobId extends AggregateId_1.AggregateId {
|
|
|
10
12
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, CalculationJobId.PROPERTY_NAME);
|
|
11
13
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, CalculationJobId.PROPERTY_NAME);
|
|
12
14
|
AggregateId_1.AggregateId.guardAgainstInvalidId(value, CalculationJobId.PROPERTY_NAME);
|
|
15
|
+
// Validate that the prefix is valid for CalculationJob
|
|
16
|
+
CalculationJobId.guardAgainstInvalidPrefix(value);
|
|
13
17
|
return new CalculationJobId(value, false);
|
|
14
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Validates that the UUID has a valid CalculationJob prefix
|
|
21
|
+
*/
|
|
22
|
+
static guardAgainstInvalidPrefix(value) {
|
|
23
|
+
try {
|
|
24
|
+
const tempInstance = new CalculationJobId(value, true);
|
|
25
|
+
const prefix = tempInstance.extractPrefix();
|
|
26
|
+
if (CalculationJobId.VALID_PREFIXES.includes(prefix) === false) {
|
|
27
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'CalculationJob', prefix, CalculationJobId.VALID_PREFIXES, CalculationJobId.PROPERTY_NAME);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (error instanceof InvalidAggregatePrefixError_1.InvalidAggregatePrefixError) {
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
if (error instanceof Error) {
|
|
35
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'CalculationJob', 'UNKNOWN', CalculationJobId.VALID_PREFIXES, CalculationJobId.PROPERTY_NAME);
|
|
36
|
+
}
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
15
40
|
static fromPrimitives(primitive) {
|
|
16
41
|
const value = primitive;
|
|
17
42
|
return new CalculationJobId(value, true);
|
|
@@ -22,3 +47,6 @@ class CalculationJobId extends AggregateId_1.AggregateId {
|
|
|
22
47
|
}
|
|
23
48
|
exports.CalculationJobId = CalculationJobId;
|
|
24
49
|
CalculationJobId.PROPERTY_NAME = 'calculationJobId';
|
|
50
|
+
CalculationJobId.VALID_PREFIXES = [
|
|
51
|
+
SemanticUuidPrefix_1.SemanticUuidPrefix.ECP_JOBS,
|
|
52
|
+
];
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CalculationProcessId = void 0;
|
|
4
4
|
const AggregateId_1 = require("../../../../shared/domain/value-objects/AggregateId");
|
|
5
|
+
const SemanticUuidPrefix_1 = require("../../../../shared/domain/enums/SemanticUuidPrefix");
|
|
6
|
+
const InvalidAggregatePrefixError_1 = require("../../../../shared/domain/exceptions/InvalidAggregatePrefixError");
|
|
5
7
|
class CalculationProcessId extends AggregateId_1.AggregateId {
|
|
6
8
|
constructor(value, skipDomainValidation) {
|
|
7
9
|
super(value, skipDomainValidation, CalculationProcessId.PROPERTY_NAME);
|
|
@@ -10,8 +12,31 @@ class CalculationProcessId extends AggregateId_1.AggregateId {
|
|
|
10
12
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, CalculationProcessId.PROPERTY_NAME);
|
|
11
13
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, CalculationProcessId.PROPERTY_NAME);
|
|
12
14
|
AggregateId_1.AggregateId.guardAgainstInvalidId(value, CalculationProcessId.PROPERTY_NAME);
|
|
15
|
+
// Validate that the prefix is valid for CalculationProcess
|
|
16
|
+
CalculationProcessId.guardAgainstInvalidPrefix(value);
|
|
13
17
|
return new CalculationProcessId(value, false);
|
|
14
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Validates that the UUID has a valid CalculationProcess prefix
|
|
21
|
+
*/
|
|
22
|
+
static guardAgainstInvalidPrefix(value) {
|
|
23
|
+
try {
|
|
24
|
+
const tempInstance = new CalculationProcessId(value, true);
|
|
25
|
+
const prefix = tempInstance.extractPrefix();
|
|
26
|
+
if (CalculationProcessId.VALID_PREFIXES.includes(prefix) === false) {
|
|
27
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'CalculationProcess', prefix, CalculationProcessId.VALID_PREFIXES, CalculationProcessId.PROPERTY_NAME);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (error instanceof InvalidAggregatePrefixError_1.InvalidAggregatePrefixError) {
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
if (error instanceof Error) {
|
|
35
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'CalculationProcess', 'UNKNOWN', CalculationProcessId.VALID_PREFIXES, CalculationProcessId.PROPERTY_NAME);
|
|
36
|
+
}
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
15
40
|
static fromPrimitives(primitive) {
|
|
16
41
|
const value = primitive;
|
|
17
42
|
return new CalculationProcessId(value, true);
|
|
@@ -22,3 +47,6 @@ class CalculationProcessId extends AggregateId_1.AggregateId {
|
|
|
22
47
|
}
|
|
23
48
|
exports.CalculationProcessId = CalculationProcessId;
|
|
24
49
|
CalculationProcessId.PROPERTY_NAME = 'id';
|
|
50
|
+
CalculationProcessId.VALID_PREFIXES = [
|
|
51
|
+
SemanticUuidPrefix_1.SemanticUuidPrefix.ECP_PROCESSES,
|
|
52
|
+
];
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CalculationWorkflowId = void 0;
|
|
4
4
|
const AggregateId_1 = require("../../../../shared/domain/value-objects/AggregateId");
|
|
5
|
+
const SemanticUuidPrefix_1 = require("../../../../shared/domain/enums/SemanticUuidPrefix");
|
|
6
|
+
const InvalidAggregatePrefixError_1 = require("../../../../shared/domain/exceptions/InvalidAggregatePrefixError");
|
|
5
7
|
class CalculationWorkflowId extends AggregateId_1.AggregateId {
|
|
6
8
|
constructor(value, skipDomainValidation) {
|
|
7
9
|
super(value, skipDomainValidation, CalculationWorkflowId.PROPERTY_NAME);
|
|
@@ -10,8 +12,31 @@ class CalculationWorkflowId extends AggregateId_1.AggregateId {
|
|
|
10
12
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, CalculationWorkflowId.PROPERTY_NAME);
|
|
11
13
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, CalculationWorkflowId.PROPERTY_NAME);
|
|
12
14
|
AggregateId_1.AggregateId.guardAgainstInvalidId(value, CalculationWorkflowId.PROPERTY_NAME);
|
|
15
|
+
// Validate that the prefix is valid for CalculationWorkflow
|
|
16
|
+
CalculationWorkflowId.guardAgainstInvalidPrefix(value);
|
|
13
17
|
return new CalculationWorkflowId(value, false);
|
|
14
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Validates that the UUID has a valid CalculationWorkflow prefix
|
|
21
|
+
*/
|
|
22
|
+
static guardAgainstInvalidPrefix(value) {
|
|
23
|
+
try {
|
|
24
|
+
const tempInstance = new CalculationWorkflowId(value, true);
|
|
25
|
+
const prefix = tempInstance.extractPrefix();
|
|
26
|
+
if (CalculationWorkflowId.VALID_PREFIXES.includes(prefix) === false) {
|
|
27
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'CalculationWorkflow', prefix, CalculationWorkflowId.VALID_PREFIXES, CalculationWorkflowId.PROPERTY_NAME);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (error instanceof InvalidAggregatePrefixError_1.InvalidAggregatePrefixError) {
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
if (error instanceof Error) {
|
|
35
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'CalculationWorkflow', 'UNKNOWN', CalculationWorkflowId.VALID_PREFIXES, CalculationWorkflowId.PROPERTY_NAME);
|
|
36
|
+
}
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
15
40
|
static fromPrimitives(primitive) {
|
|
16
41
|
const value = primitive;
|
|
17
42
|
return new CalculationWorkflowId(value, true);
|
|
@@ -22,3 +47,6 @@ class CalculationWorkflowId extends AggregateId_1.AggregateId {
|
|
|
22
47
|
}
|
|
23
48
|
exports.CalculationWorkflowId = CalculationWorkflowId;
|
|
24
49
|
CalculationWorkflowId.PROPERTY_NAME = 'id';
|
|
50
|
+
CalculationWorkflowId.VALID_PREFIXES = [
|
|
51
|
+
SemanticUuidPrefix_1.SemanticUuidPrefix.ECP_WORKFLOWS,
|
|
52
|
+
];
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EmissionAggregationId = void 0;
|
|
4
4
|
const AggregateId_1 = require("../../../../shared/domain/value-objects/AggregateId");
|
|
5
|
+
const SemanticUuidPrefix_1 = require("../../../../shared/domain/enums/SemanticUuidPrefix");
|
|
6
|
+
const InvalidAggregatePrefixError_1 = require("../../../../shared/domain/exceptions/InvalidAggregatePrefixError");
|
|
5
7
|
class EmissionAggregationId extends AggregateId_1.AggregateId {
|
|
6
8
|
constructor(value, skipDomainValidation) {
|
|
7
9
|
super(value, skipDomainValidation, EmissionAggregationId.PROPERTY_NAME);
|
|
@@ -10,8 +12,31 @@ class EmissionAggregationId extends AggregateId_1.AggregateId {
|
|
|
10
12
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, EmissionAggregationId.PROPERTY_NAME);
|
|
11
13
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, EmissionAggregationId.PROPERTY_NAME);
|
|
12
14
|
AggregateId_1.AggregateId.guardAgainstInvalidId(value, EmissionAggregationId.PROPERTY_NAME);
|
|
15
|
+
// Validate that the prefix is valid for EmissionAggregation
|
|
16
|
+
EmissionAggregationId.guardAgainstInvalidPrefix(value);
|
|
13
17
|
return new EmissionAggregationId(value, false);
|
|
14
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Validates that the UUID has a valid EmissionAggregation prefix
|
|
21
|
+
*/
|
|
22
|
+
static guardAgainstInvalidPrefix(value) {
|
|
23
|
+
try {
|
|
24
|
+
const tempInstance = new EmissionAggregationId(value, true);
|
|
25
|
+
const prefix = tempInstance.extractPrefix();
|
|
26
|
+
if (EmissionAggregationId.VALID_PREFIXES.includes(prefix) === false) {
|
|
27
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'EmissionAggregation', prefix, EmissionAggregationId.VALID_PREFIXES, EmissionAggregationId.PROPERTY_NAME);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (error instanceof InvalidAggregatePrefixError_1.InvalidAggregatePrefixError) {
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
if (error instanceof Error) {
|
|
35
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'EmissionAggregation', 'UNKNOWN', EmissionAggregationId.VALID_PREFIXES, EmissionAggregationId.PROPERTY_NAME);
|
|
36
|
+
}
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
15
40
|
static fromPrimitives(primitive) {
|
|
16
41
|
const value = primitive;
|
|
17
42
|
return new EmissionAggregationId(value, true);
|
|
@@ -22,3 +47,6 @@ class EmissionAggregationId extends AggregateId_1.AggregateId {
|
|
|
22
47
|
}
|
|
23
48
|
exports.EmissionAggregationId = EmissionAggregationId;
|
|
24
49
|
EmissionAggregationId.PROPERTY_NAME = 'id';
|
|
50
|
+
EmissionAggregationId.VALID_PREFIXES = [
|
|
51
|
+
SemanticUuidPrefix_1.SemanticUuidPrefix.ECR_AGGREGATIONS,
|
|
52
|
+
];
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EmissionCalculationId = void 0;
|
|
4
4
|
const AggregateId_1 = require("../../../../shared/domain/value-objects/AggregateId");
|
|
5
|
+
const SemanticUuidPrefix_1 = require("../../../../shared/domain/enums/SemanticUuidPrefix");
|
|
6
|
+
const InvalidAggregatePrefixError_1 = require("../../../../shared/domain/exceptions/InvalidAggregatePrefixError");
|
|
5
7
|
class EmissionCalculationId extends AggregateId_1.AggregateId {
|
|
6
8
|
constructor(value, skipDomainValidation) {
|
|
7
9
|
super(value, skipDomainValidation, EmissionCalculationId.PROPERTY_NAME);
|
|
@@ -10,8 +12,31 @@ class EmissionCalculationId extends AggregateId_1.AggregateId {
|
|
|
10
12
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, EmissionCalculationId.PROPERTY_NAME);
|
|
11
13
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, EmissionCalculationId.PROPERTY_NAME);
|
|
12
14
|
AggregateId_1.AggregateId.guardAgainstInvalidId(value, EmissionCalculationId.PROPERTY_NAME);
|
|
15
|
+
// Validate that the prefix is valid for EmissionCalculation
|
|
16
|
+
EmissionCalculationId.guardAgainstInvalidPrefix(value);
|
|
13
17
|
return new EmissionCalculationId(value, false);
|
|
14
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Validates that the UUID has a valid EmissionCalculation prefix
|
|
21
|
+
*/
|
|
22
|
+
static guardAgainstInvalidPrefix(value) {
|
|
23
|
+
try {
|
|
24
|
+
const tempInstance = new EmissionCalculationId(value, true);
|
|
25
|
+
const prefix = tempInstance.extractPrefix();
|
|
26
|
+
if (EmissionCalculationId.VALID_PREFIXES.includes(prefix) === false) {
|
|
27
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'EmissionCalculation', prefix, EmissionCalculationId.VALID_PREFIXES, EmissionCalculationId.PROPERTY_NAME);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (error instanceof InvalidAggregatePrefixError_1.InvalidAggregatePrefixError) {
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
if (error instanceof Error) {
|
|
35
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'EmissionCalculation', 'UNKNOWN', EmissionCalculationId.VALID_PREFIXES, EmissionCalculationId.PROPERTY_NAME);
|
|
36
|
+
}
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
15
40
|
static fromPrimitives(primitive) {
|
|
16
41
|
const value = primitive;
|
|
17
42
|
return new EmissionCalculationId(value, true);
|
|
@@ -22,3 +47,6 @@ class EmissionCalculationId extends AggregateId_1.AggregateId {
|
|
|
22
47
|
}
|
|
23
48
|
exports.EmissionCalculationId = EmissionCalculationId;
|
|
24
49
|
EmissionCalculationId.PROPERTY_NAME = 'id';
|
|
50
|
+
EmissionCalculationId.VALID_PREFIXES = [
|
|
51
|
+
SemanticUuidPrefix_1.SemanticUuidPrefix.ECR_CALCULATIONS,
|
|
52
|
+
];
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GHGEmissionResultId = void 0;
|
|
4
4
|
const AggregateId_1 = require("../../../../shared/domain/value-objects/AggregateId");
|
|
5
|
+
const SemanticUuidPrefix_1 = require("../../../../shared/domain/enums/SemanticUuidPrefix");
|
|
6
|
+
const InvalidAggregatePrefixError_1 = require("../../../../shared/domain/exceptions/InvalidAggregatePrefixError");
|
|
5
7
|
class GHGEmissionResultId extends AggregateId_1.AggregateId {
|
|
6
8
|
constructor(value, skipDomainValidation) {
|
|
7
9
|
super(value, skipDomainValidation, GHGEmissionResultId.PROPERTY_NAME);
|
|
@@ -10,8 +12,31 @@ class GHGEmissionResultId extends AggregateId_1.AggregateId {
|
|
|
10
12
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, GHGEmissionResultId.PROPERTY_NAME);
|
|
11
13
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, GHGEmissionResultId.PROPERTY_NAME);
|
|
12
14
|
AggregateId_1.AggregateId.guardAgainstInvalidId(value, GHGEmissionResultId.PROPERTY_NAME);
|
|
15
|
+
// Validate that the prefix is valid for GHGEmissionResult
|
|
16
|
+
GHGEmissionResultId.guardAgainstInvalidPrefix(value);
|
|
13
17
|
return new GHGEmissionResultId(value, false);
|
|
14
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Validates that the UUID has a valid GHGEmissionResult prefix
|
|
21
|
+
*/
|
|
22
|
+
static guardAgainstInvalidPrefix(value) {
|
|
23
|
+
try {
|
|
24
|
+
const tempInstance = new GHGEmissionResultId(value, true);
|
|
25
|
+
const prefix = tempInstance.extractPrefix();
|
|
26
|
+
if (GHGEmissionResultId.VALID_PREFIXES.includes(prefix) === false) {
|
|
27
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'GHGEmissionResult', prefix, GHGEmissionResultId.VALID_PREFIXES, GHGEmissionResultId.PROPERTY_NAME);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (error instanceof InvalidAggregatePrefixError_1.InvalidAggregatePrefixError) {
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
if (error instanceof Error) {
|
|
35
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'GHGEmissionResult', 'UNKNOWN', GHGEmissionResultId.VALID_PREFIXES, GHGEmissionResultId.PROPERTY_NAME);
|
|
36
|
+
}
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
15
40
|
static fromPrimitives(primitive) {
|
|
16
41
|
const value = primitive;
|
|
17
42
|
return new GHGEmissionResultId(value, true);
|
|
@@ -22,3 +47,6 @@ class GHGEmissionResultId extends AggregateId_1.AggregateId {
|
|
|
22
47
|
}
|
|
23
48
|
exports.GHGEmissionResultId = GHGEmissionResultId;
|
|
24
49
|
GHGEmissionResultId.PROPERTY_NAME = 'id';
|
|
50
|
+
GHGEmissionResultId.VALID_PREFIXES = [
|
|
51
|
+
SemanticUuidPrefix_1.SemanticUuidPrefix.ECR_GHG_RESULTS,
|
|
52
|
+
];
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PurchaseContractId = void 0;
|
|
4
4
|
const AggregateId_1 = require("../../../../shared/domain/value-objects/AggregateId");
|
|
5
|
+
const SemanticUuidPrefix_1 = require("../../../../shared/domain/enums/SemanticUuidPrefix");
|
|
6
|
+
const InvalidAggregatePrefixError_1 = require("../../../../shared/domain/exceptions/InvalidAggregatePrefixError");
|
|
5
7
|
class PurchaseContractId extends AggregateId_1.AggregateId {
|
|
6
8
|
constructor(value, skipDomainValidation) {
|
|
7
9
|
super(value, skipDomainValidation, PurchaseContractId.PROPERTY_NAME);
|
|
@@ -10,8 +12,31 @@ class PurchaseContractId extends AggregateId_1.AggregateId {
|
|
|
10
12
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, PurchaseContractId.PROPERTY_NAME);
|
|
11
13
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, PurchaseContractId.PROPERTY_NAME);
|
|
12
14
|
AggregateId_1.AggregateId.guardAgainstInvalidId(value, PurchaseContractId.PROPERTY_NAME);
|
|
15
|
+
// Validate that the prefix is valid for PurchaseContract
|
|
16
|
+
PurchaseContractId.guardAgainstInvalidPrefix(value);
|
|
13
17
|
return new PurchaseContractId(value, false);
|
|
14
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Validates that the UUID has a valid PurchaseContract prefix
|
|
21
|
+
*/
|
|
22
|
+
static guardAgainstInvalidPrefix(value) {
|
|
23
|
+
try {
|
|
24
|
+
const tempInstance = new PurchaseContractId(value, true);
|
|
25
|
+
const prefix = tempInstance.extractPrefix();
|
|
26
|
+
if (PurchaseContractId.VALID_PREFIXES.includes(prefix) === false) {
|
|
27
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'PurchaseContract', prefix, PurchaseContractId.VALID_PREFIXES, PurchaseContractId.PROPERTY_NAME);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (error instanceof InvalidAggregatePrefixError_1.InvalidAggregatePrefixError) {
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
if (error instanceof Error) {
|
|
35
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'PurchaseContract', 'UNKNOWN', PurchaseContractId.VALID_PREFIXES, PurchaseContractId.PROPERTY_NAME);
|
|
36
|
+
}
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
15
40
|
static fromPrimitives(primitive) {
|
|
16
41
|
const value = primitive;
|
|
17
42
|
return new PurchaseContractId(value, true);
|
|
@@ -22,3 +47,6 @@ class PurchaseContractId extends AggregateId_1.AggregateId {
|
|
|
22
47
|
}
|
|
23
48
|
exports.PurchaseContractId = PurchaseContractId;
|
|
24
49
|
PurchaseContractId.PROPERTY_NAME = 'id';
|
|
50
|
+
PurchaseContractId.VALID_PREFIXES = [
|
|
51
|
+
SemanticUuidPrefix_1.SemanticUuidPrefix.PMS_PURCHASE_CONTRACT,
|
|
52
|
+
];
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PurchaseOrderId = void 0;
|
|
4
4
|
const AggregateId_1 = require("../../../../shared/domain/value-objects/AggregateId");
|
|
5
|
+
const SemanticUuidPrefix_1 = require("../../../../shared/domain/enums/SemanticUuidPrefix");
|
|
6
|
+
const InvalidAggregatePrefixError_1 = require("../../../../shared/domain/exceptions/InvalidAggregatePrefixError");
|
|
5
7
|
class PurchaseOrderId extends AggregateId_1.AggregateId {
|
|
6
8
|
constructor(value, skipDomainValidation) {
|
|
7
9
|
super(value, skipDomainValidation, PurchaseOrderId.PROPERTY_NAME);
|
|
@@ -10,8 +12,31 @@ class PurchaseOrderId extends AggregateId_1.AggregateId {
|
|
|
10
12
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, PurchaseOrderId.PROPERTY_NAME);
|
|
11
13
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, PurchaseOrderId.PROPERTY_NAME);
|
|
12
14
|
AggregateId_1.AggregateId.guardAgainstInvalidId(value, PurchaseOrderId.PROPERTY_NAME);
|
|
15
|
+
// Validate that the prefix is valid for PurchaseOrder
|
|
16
|
+
PurchaseOrderId.guardAgainstInvalidPrefix(value);
|
|
13
17
|
return new PurchaseOrderId(value, false);
|
|
14
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Validates that the UUID has a valid PurchaseOrder prefix
|
|
21
|
+
*/
|
|
22
|
+
static guardAgainstInvalidPrefix(value) {
|
|
23
|
+
try {
|
|
24
|
+
const tempInstance = new PurchaseOrderId(value, true);
|
|
25
|
+
const prefix = tempInstance.extractPrefix();
|
|
26
|
+
if (PurchaseOrderId.VALID_PREFIXES.includes(prefix) === false) {
|
|
27
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'PurchaseOrder', prefix, PurchaseOrderId.VALID_PREFIXES, PurchaseOrderId.PROPERTY_NAME);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (error instanceof InvalidAggregatePrefixError_1.InvalidAggregatePrefixError) {
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
if (error instanceof Error) {
|
|
35
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'PurchaseOrder', 'UNKNOWN', PurchaseOrderId.VALID_PREFIXES, PurchaseOrderId.PROPERTY_NAME);
|
|
36
|
+
}
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
15
40
|
static fromPrimitives(primitive) {
|
|
16
41
|
const value = primitive;
|
|
17
42
|
return new PurchaseOrderId(value, true);
|
|
@@ -22,3 +47,6 @@ class PurchaseOrderId extends AggregateId_1.AggregateId {
|
|
|
22
47
|
}
|
|
23
48
|
exports.PurchaseOrderId = PurchaseOrderId;
|
|
24
49
|
PurchaseOrderId.PROPERTY_NAME = 'id';
|
|
50
|
+
PurchaseOrderId.VALID_PREFIXES = [
|
|
51
|
+
SemanticUuidPrefix_1.SemanticUuidPrefix.PMS_PURCHASE_ORDER,
|
|
52
|
+
];
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ServiceCatalogId = void 0;
|
|
4
4
|
const AggregateId_1 = require("../../../../shared/domain/value-objects/AggregateId");
|
|
5
|
+
const SemanticUuidPrefix_1 = require("../../../../shared/domain/enums/SemanticUuidPrefix");
|
|
6
|
+
const InvalidAggregatePrefixError_1 = require("../../../../shared/domain/exceptions/InvalidAggregatePrefixError");
|
|
5
7
|
class ServiceCatalogId extends AggregateId_1.AggregateId {
|
|
6
8
|
constructor(value, skipDomainValidation) {
|
|
7
9
|
super(value, skipDomainValidation, ServiceCatalogId.PROPERTY_NAME);
|
|
@@ -10,8 +12,31 @@ class ServiceCatalogId extends AggregateId_1.AggregateId {
|
|
|
10
12
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, ServiceCatalogId.PROPERTY_NAME);
|
|
11
13
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, ServiceCatalogId.PROPERTY_NAME);
|
|
12
14
|
AggregateId_1.AggregateId.guardAgainstInvalidId(value, ServiceCatalogId.PROPERTY_NAME);
|
|
15
|
+
// Validate that the prefix is valid for ServiceCatalog
|
|
16
|
+
ServiceCatalogId.guardAgainstInvalidPrefix(value);
|
|
13
17
|
return new ServiceCatalogId(value, false);
|
|
14
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Validates that the UUID has a valid ServiceCatalog prefix
|
|
21
|
+
*/
|
|
22
|
+
static guardAgainstInvalidPrefix(value) {
|
|
23
|
+
try {
|
|
24
|
+
const tempInstance = new ServiceCatalogId(value, true); // Skip validation for extraction
|
|
25
|
+
const prefix = tempInstance.extractPrefix();
|
|
26
|
+
if (ServiceCatalogId.VALID_PREFIXES.includes(prefix) === false) {
|
|
27
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'ServiceCatalog', prefix, ServiceCatalogId.VALID_PREFIXES, ServiceCatalogId.PROPERTY_NAME);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (error instanceof InvalidAggregatePrefixError_1.InvalidAggregatePrefixError) {
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
if (error instanceof Error) {
|
|
35
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'ServiceCatalog', 'UNKNOWN', ServiceCatalogId.VALID_PREFIXES, ServiceCatalogId.PROPERTY_NAME);
|
|
36
|
+
}
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
15
40
|
static fromPrimitives(primitive) {
|
|
16
41
|
const value = primitive;
|
|
17
42
|
return new ServiceCatalogId(value, true);
|
|
@@ -22,3 +47,6 @@ class ServiceCatalogId extends AggregateId_1.AggregateId {
|
|
|
22
47
|
}
|
|
23
48
|
exports.ServiceCatalogId = ServiceCatalogId;
|
|
24
49
|
ServiceCatalogId.PROPERTY_NAME = 'id';
|
|
50
|
+
ServiceCatalogId.VALID_PREFIXES = [
|
|
51
|
+
SemanticUuidPrefix_1.SemanticUuidPrefix.PMS_SERVICE_CATALOG,
|
|
52
|
+
];
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ServicePricingId = void 0;
|
|
4
4
|
const AggregateId_1 = require("../../../../shared/domain/value-objects/AggregateId");
|
|
5
|
+
const SemanticUuidPrefix_1 = require("../../../../shared/domain/enums/SemanticUuidPrefix");
|
|
6
|
+
const InvalidAggregatePrefixError_1 = require("../../../../shared/domain/exceptions/InvalidAggregatePrefixError");
|
|
5
7
|
class ServicePricingId extends AggregateId_1.AggregateId {
|
|
6
8
|
constructor(value, skipDomainValidation) {
|
|
7
9
|
super(value, skipDomainValidation, ServicePricingId.PROPERTY_NAME);
|
|
@@ -10,8 +12,31 @@ class ServicePricingId extends AggregateId_1.AggregateId {
|
|
|
10
12
|
AggregateId_1.AggregateId.guardAgainstEmptyValue(value, ServicePricingId.PROPERTY_NAME);
|
|
11
13
|
AggregateId_1.AggregateId.guardAgainstInvalidType(value, ServicePricingId.PROPERTY_NAME);
|
|
12
14
|
AggregateId_1.AggregateId.guardAgainstInvalidId(value, ServicePricingId.PROPERTY_NAME);
|
|
15
|
+
// Validate that the prefix is valid for ServicePricing
|
|
16
|
+
ServicePricingId.guardAgainstInvalidPrefix(value);
|
|
13
17
|
return new ServicePricingId(value, false);
|
|
14
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Validates that the UUID has a valid ServicePricing prefix
|
|
21
|
+
*/
|
|
22
|
+
static guardAgainstInvalidPrefix(value) {
|
|
23
|
+
try {
|
|
24
|
+
const tempInstance = new ServicePricingId(value, true);
|
|
25
|
+
const prefix = tempInstance.extractPrefix();
|
|
26
|
+
if (ServicePricingId.VALID_PREFIXES.includes(prefix) === false) {
|
|
27
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'ServicePricing', prefix, ServicePricingId.VALID_PREFIXES, ServicePricingId.PROPERTY_NAME);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (error instanceof InvalidAggregatePrefixError_1.InvalidAggregatePrefixError) {
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
if (error instanceof Error) {
|
|
35
|
+
throw InvalidAggregatePrefixError_1.InvalidAggregatePrefixError.create(value, 'ServicePricing', 'UNKNOWN', ServicePricingId.VALID_PREFIXES, ServicePricingId.PROPERTY_NAME);
|
|
36
|
+
}
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
15
40
|
static fromPrimitives(primitive) {
|
|
16
41
|
const value = primitive;
|
|
17
42
|
return new ServicePricingId(value, true);
|
|
@@ -22,3 +47,6 @@ class ServicePricingId extends AggregateId_1.AggregateId {
|
|
|
22
47
|
}
|
|
23
48
|
exports.ServicePricingId = ServicePricingId;
|
|
24
49
|
ServicePricingId.PROPERTY_NAME = 'id';
|
|
50
|
+
ServicePricingId.VALID_PREFIXES = [
|
|
51
|
+
SemanticUuidPrefix_1.SemanticUuidPrefix.PMS_SERVICE_PRICING,
|
|
52
|
+
];
|
|
@@ -30,10 +30,21 @@ var SemanticUuidPrefix;
|
|
|
30
30
|
SemanticUuidPrefix["ADC_ADAPTATIONS"] = "ADC-ADP";
|
|
31
31
|
// Carbon Footprint Configurations
|
|
32
32
|
SemanticUuidPrefix["CFC_CORPORATE"] = "CFC-COR";
|
|
33
|
+
SemanticUuidPrefix["CFC_CORPORATE_SEGMENT"] = "CFC-COR-SEG";
|
|
34
|
+
SemanticUuidPrefix["CFC_CORPORATE_SUBSEGMENT"] = "CFC-COR-SUB";
|
|
33
35
|
SemanticUuidPrefix["CFC_EVENT"] = "CFC-EVT";
|
|
36
|
+
SemanticUuidPrefix["CFC_EVENT_LIFECYCLE"] = "CFC-EVT-LCS";
|
|
37
|
+
SemanticUuidPrefix["CFC_EVENT_SUBSEGMENT"] = "CFC-EVT-SUB";
|
|
34
38
|
SemanticUuidPrefix["CFC_PRODUCT"] = "CFC-PRD";
|
|
39
|
+
SemanticUuidPrefix["CFC_PRODUCT_SEGMENT"] = "CFC-PRD-SEG";
|
|
40
|
+
SemanticUuidPrefix["CFC_PRODUCT_SUBSEGMENT"] = "CFC-PRD-SUB";
|
|
41
|
+
SemanticUuidPrefix["CFC_PRODUCT_BOUNDARY"] = "CFC-PRD-BND";
|
|
42
|
+
SemanticUuidPrefix["CFC_INTENSITY"] = "CFC-INT";
|
|
43
|
+
SemanticUuidPrefix["CFC_SEGMENT"] = "CFC-SEG";
|
|
44
|
+
SemanticUuidPrefix["CFC_SUBSEGMENT"] = "CFC-SUB";
|
|
35
45
|
// Company Resources
|
|
36
46
|
SemanticUuidPrefix["CPR_EVENTS"] = "CPR-EVT";
|
|
47
|
+
SemanticUuidPrefix["CPR_EVENT_EDITION"] = "CPR-EVT-EDT";
|
|
37
48
|
SemanticUuidPrefix["CPR_FACILITIES"] = "CPR-FAC";
|
|
38
49
|
SemanticUuidPrefix["CPR_PRODUCTS"] = "CPR-PRD";
|
|
39
50
|
// Emission Calculation Formulas
|
|
@@ -55,6 +66,11 @@ var SemanticUuidPrefix;
|
|
|
55
66
|
SemanticUuidPrefix["USR_STH_COORDINATOR"] = "USR-STH-CRD";
|
|
56
67
|
SemanticUuidPrefix["USR_STH_HOST"] = "USR-STH-CHO";
|
|
57
68
|
SemanticUuidPrefix["USR_STH_MANAGER"] = "USR-STH-MGR";
|
|
69
|
+
// Purchase Management System
|
|
70
|
+
SemanticUuidPrefix["PMS_SERVICE_CATALOG"] = "PMS-SC";
|
|
71
|
+
SemanticUuidPrefix["PMS_SERVICE_PRICING"] = "PMS-SP";
|
|
72
|
+
SemanticUuidPrefix["PMS_PURCHASE_CONTRACT"] = "PMS-PC";
|
|
73
|
+
SemanticUuidPrefix["PMS_PURCHASE_ORDER"] = "PMS-PO";
|
|
58
74
|
// Shared Domain
|
|
59
75
|
SemanticUuidPrefix["SHR_DOMAIN"] = "SHR-DOM";
|
|
60
76
|
SemanticUuidPrefix["SHR_EITHER"] = "SHR-ETH";
|
|
@@ -16,4 +16,4 @@ class InvalidAggregateIdFormatError extends RootError_1.RootError {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
exports.InvalidAggregateIdFormatError = InvalidAggregateIdFormatError;
|
|
19
|
-
InvalidAggregateIdFormatError.INVALID_AGGREGATE_ID_ERROR_MESSAGE = 'Invalid aggregate ID format. Expected:
|
|
19
|
+
InvalidAggregateIdFormatError.INVALID_AGGREGATE_ID_ERROR_MESSAGE = 'Invalid aggregate ID format. Expected: PREFIX_UUID (e.g., PMS-SC_550e8400-e29b-41d4-a716-446655440000 or USR-STH-CHO_550e8400-e29b-41d4-a716-446655440000)';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InvalidAggregatePrefixError = void 0;
|
|
4
|
+
const RootError_1 = require("./RootError");
|
|
5
|
+
/**
|
|
6
|
+
* Generic error for invalid aggregate ID prefix validation
|
|
7
|
+
* Use this for any aggregate ID that needs prefix validation
|
|
8
|
+
*/
|
|
9
|
+
class InvalidAggregatePrefixError extends RootError_1.RootError {
|
|
10
|
+
constructor(aggregateId, entityType, currentPrefix, validPrefixes, propertyName) {
|
|
11
|
+
const message = `The ${entityType} ID "${aggregateId}" has invalid prefix "${currentPrefix}". Expected one of: [${validPrefixes.join(', ')}]. ${InvalidAggregatePrefixError.INVALID_PREFIX_ERROR_MESSAGE}. Property: ${propertyName}`;
|
|
12
|
+
super(message);
|
|
13
|
+
this.name = 'InvalidAggregatePrefixError';
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Creates an InvalidAggregatePrefixError
|
|
17
|
+
* @param aggregateId - The full aggregate ID that failed validation
|
|
18
|
+
* @param entityType - The type of entity (e.g., "ServiceCatalog", "Product", "Event")
|
|
19
|
+
* @param currentPrefix - The actual prefix found in the ID
|
|
20
|
+
* @param validPrefixes - Array of valid prefixes for this entity type
|
|
21
|
+
* @param propertyName - The property name being validated (default: "id")
|
|
22
|
+
*/
|
|
23
|
+
static create(aggregateId, entityType, currentPrefix, validPrefixes, propertyName = 'id') {
|
|
24
|
+
return new InvalidAggregatePrefixError(aggregateId, entityType, currentPrefix, validPrefixes, propertyName);
|
|
25
|
+
}
|
|
26
|
+
logError() {
|
|
27
|
+
return `${this.name}: ${this.message}`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.InvalidAggregatePrefixError = InvalidAggregatePrefixError;
|
|
31
|
+
InvalidAggregatePrefixError.INVALID_PREFIX_ERROR_MESSAGE = 'Invalid prefix for aggregate ID';
|
|
@@ -7,10 +7,6 @@ const StakeholderRole_1 = require("../enums/StakeholderRole");
|
|
|
7
7
|
const InvalidUserPrefixError_1 = require("../exceptions/InvalidUserPrefixError");
|
|
8
8
|
const InvalidUserIdFormatError_1 = require("../exceptions/InvalidUserIdFormatError");
|
|
9
9
|
class UserId extends AggregateId_1.AggregateId {
|
|
10
|
-
/**
|
|
11
|
-
* Constructor protegido para que solo clases hijas puedan instanciar.
|
|
12
|
-
* Aplica todas las validaciones de dominio al momento de construcción.
|
|
13
|
-
*/
|
|
14
10
|
constructor(value, skipDomainValidation) {
|
|
15
11
|
super(value, skipDomainValidation, UserId.PROPERTY_NAME);
|
|
16
12
|
}
|
|
@@ -146,7 +142,6 @@ class UserId extends AggregateId_1.AggregateId {
|
|
|
146
142
|
}
|
|
147
143
|
exports.UserId = UserId;
|
|
148
144
|
UserId.PROPERTY_NAME = 'id';
|
|
149
|
-
// Valid prefixes for User IDs (general users and stakeholders)
|
|
150
145
|
UserId.VALID_USER_PREFIXES = [
|
|
151
146
|
SemanticUuidPrefix_1.SemanticUuidPrefix.USR, // General user (BC-level)
|
|
152
147
|
SemanticUuidPrefix_1.SemanticUuidPrefix.USR_STH_CLIENT,
|