@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
package/build/carbonbox/stakeholders/carbon-managers/domain/value-objects/CarbonManagerId.js
CHANGED
|
@@ -9,7 +9,7 @@ class CarbonManagerId extends StakeholderId_1.StakeholderId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
StakeholderId_1.StakeholderId.guardAgainstEmptyValue(value, CarbonManagerId.PROPERTY_NAME);
|
|
11
11
|
StakeholderId_1.StakeholderId.guardAgainstInvalidType(value, CarbonManagerId.PROPERTY_NAME);
|
|
12
|
-
StakeholderId_1.StakeholderId.
|
|
12
|
+
StakeholderId_1.StakeholderId.guardAgainstInvalidSemanticId(value);
|
|
13
13
|
return new CarbonManagerId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
|
@@ -9,7 +9,7 @@ class StakeholderId extends UserId_1.UserId {
|
|
|
9
9
|
static create(value) {
|
|
10
10
|
UserId_1.UserId.guardAgainstEmptyValue(value, StakeholderId.PROPERTY_NAME);
|
|
11
11
|
UserId_1.UserId.guardAgainstInvalidType(value, StakeholderId.PROPERTY_NAME);
|
|
12
|
-
UserId_1.UserId.
|
|
12
|
+
UserId_1.UserId.guardAgainstInvalidSemanticId(value, StakeholderId.PROPERTY_NAME);
|
|
13
13
|
return new StakeholderId(value, false);
|
|
14
14
|
}
|
|
15
15
|
static fromPrimitives(primitive) {
|
package/build/main/index.js
CHANGED
|
@@ -9,12 +9,12 @@ exports.EmissionFactorGreenhouseGasValues = exports.EmissionFactorDescription =
|
|
|
9
9
|
exports.EmissionCalculationStatus = exports.EmissionCalculationId = exports.GHGEmissionResult = exports.EmissionAggregation = exports.EmissionCalculation = exports.WorkflowTriggerEnum = exports.WorkflowStatusEnum = exports.ProcessStatusEnum = exports.ProcessPriorityEnum = exports.JobTypeEnum = exports.JobStatusEnum = exports.CalculationWorkflowCarbonClient = exports.CalculationWorkflowFootprintType = exports.CalculationWorkflowIsAutomatic = exports.CalculationWorkflowTriggerType = exports.CalculationWorkflowStatus = exports.CalculationWorkflowDescription = exports.CalculationWorkflowName = exports.CalculationWorkflowCode = exports.CalculationWorkflowId = exports.CalculationProcessCarbonClient = exports.CalculationProcessFootprintConfiguration = exports.CalculationProcessCompletedAt = exports.CalculationProcessStartedAt = exports.CalculationProcessProgressPercentage = exports.CalculationProcessPriority = exports.CalculationProcessStatus = exports.CalculationProcessId = exports.CalculationJobSequenceOrder = exports.CalculationJobParentProcess = exports.CalculationJobCompletedAt = exports.CalculationJobStartedAt = exports.CalculationJobProgressPercentage = exports.CalculationJobStatus = exports.CalculationJobType = exports.CalculationJobId = exports.CalculationWorkflow = exports.CalculationProcess = exports.CalculationJob = exports.UnauthorizedFormulaCreationRoleError = exports.InvalidGreenhouseGasTypeError = exports.DuplicateGreenhouseGasError = exports.ResultUnitEnum = exports.FormulaStatusEnum = exports.GlobalWarmingPotentialGreenhouseGasPotentials = exports.GlobalWarmingPotentialValidityPeriod = exports.GlobalWarmingPotentialTimeHorizonYears = exports.GlobalWarmingPotentialProtocolVersion = exports.GlobalWarmingPotentialReferenceName = exports.GlobalWarmingPotentialId = void 0;
|
|
10
10
|
exports.ServiceCatalogName = exports.ServiceCatalogCode = exports.ServiceCatalogId = exports.PurchaseOrderApprovedByStakeholder = exports.PurchaseOrderCreatedByStakeholder = exports.PurchaseOrderTotalAmount = exports.PurchaseOrderSubtotalAmount = exports.PurchaseOrderPaymentStatus = exports.PurchaseOrderPaymentMethod = exports.PurchaseOrderDate = exports.PurchaseOrderCarbonClientId = exports.PurchaseOrderStatus = exports.PurchaseOrderCode = exports.PurchaseOrderId = exports.PurchaseContractCreatedByStakeholder = exports.PurchaseContractTotalContractValue = exports.PurchaseContractEndDate = exports.PurchaseContractStartDate = exports.PurchaseContractCarbonClientId = exports.PurchaseContractType = exports.PurchaseContractStatus = exports.PurchaseContractTitle = exports.PurchaseContractCode = exports.PurchaseContractId = exports.ServicePricing = exports.ServiceCatalog = exports.PurchaseOrder = exports.PurchaseContract = exports.UnknownGreenhouseGasCategoryError = exports.CalculationStatusEnum = exports.GHGEmissionResultUnit = exports.GHGEmissionResultCo2Equivalent = exports.GHGEmissionResultRawEmission = exports.GHGEmissionResultGlobalWarmingPotential = exports.GHGEmissionResultEmissionFactor = exports.GHGEmissionResultActivityValue = exports.GHGEmissionResultGreenhouseGas = exports.GHGEmissionResultEmissionCalculation = exports.GHGEmissionResultId = exports.EmissionAggregationGhgBreakdown = exports.EmissionAggregationUncertaintyPercentage = exports.EmissionAggregationTotalCO2Equivalent = exports.EmissionAggregationEmissionSource = exports.EmissionAggregationEmissionCalculation = exports.EmissionAggregationId = exports.EmissionCalculationCalculatedByStakeholder = exports.EmissionCalculationCalculatedAt = exports.EmissionCalculationCarbonClient = exports.EmissionCalculationEmissionCalculationFormula = exports.EmissionCalculationActivityDataSubmission = void 0;
|
|
11
11
|
exports.InvalidReportTypeError = exports.InvalidExpertDedicationLevelError = exports.InvalidTotalAmountFactorError = exports.InvalidTaxAmountFactorError = exports.InvalidSubtotalAmountFactorError = exports.InvalidSubtotalAmountError = exports.InvalidPurchaseOrderStatusError = exports.InvalidPercentageRangeError = exports.InvalidPaymentStatusError = exports.InvalidPaymentMethodError = exports.InvalidMaximumSubtotalError = exports.InvalidFixedDiscountAmountError = exports.InvalidDiscountAmountFactorError = exports.InvalidTaxRateError = exports.InvalidPaymentTermsError = exports.InvalidPaymentScheduleError = exports.InvalidContractValueFactorError = exports.InvalidContractTypeError = exports.InvalidContractStatusError = exports.PricingStatusEnum = exports.PricingModelEnum = exports.UserRoleEnum = exports.ReportTypeEnum = exports.ExpertDedicationLevelEnum = exports.ServiceCatalogStatusEnum = exports.ServiceCatalogTypeEnum = exports.ServiceCatalogCategoryEnum = exports.PaymentStatusEnum = exports.PaymentMethodEnum = exports.OrderStatusEnum = exports.PaymentTermsEnum = exports.PaymentScheduleEnum = exports.ContractDurationUnitEnum = exports.ContractTypeEnum = exports.ContractStatusEnum = exports.ServicePricingCreatedByStakeholder = exports.ServicePricingBaseServiceReferenceCode = exports.ServicePricingCurrency = exports.ServicePricingPricePerUnit = exports.ServicePricingBasePrice = exports.ServicePricingPricingStatus = exports.ServicePricingPricingModel = exports.ServicePricingService = exports.ServicePricingId = exports.ServiceCatalogCreatedByStakeholder = exports.ServiceCatalogDependsOnServiceCode = exports.ServiceCatalogStatus = exports.ServiceCatalogType = exports.ServiceCatalogCategory = exports.ServiceCatalogDescription = void 0;
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.StakeholderPermissions = exports.UserPermissions = exports.SecurityContextReconstructionError = exports.SecurityContext = void 0;
|
|
12
|
+
exports.AggregateId = exports.Code = exports.Url = exports.Image = exports.Address = exports.Phone = exports.Email = exports.DateTimeString = exports.DateString = exports.Boolean = exports.Numeric = exports.PositiveInteger = exports.Integer = exports.String = exports.SemanticUuidPrefixEnum = exports.TaxIdentificationEnum = exports.SystemBoundaryEnum = exports.StakeholderRoleEnum = exports.ReportingStandardEnum = exports.ISOCategoryEnum = exports.GreenhouseGasEnum = exports.GenderEnum = exports.GHGSubScopeEnum = exports.GHGScopeEnum = exports.EmissionSourceEnum = exports.EmissionCategoryEnum = exports.DayOfWeekEnum = exports.CurrencyEnum = exports.CountryCodeEnum = exports.BusinessScaleEnum = exports.UserBusinessStatusEnum = exports.UserTypeEnum = exports.RootError = exports.ObjectValueObject = exports.PrimitiveValueObject = exports.ValueObject = exports.User = exports.DomainError = exports.AggregateRoot = exports.InvalidUnitsError = exports.InvalidTaxPercentageError = exports.InvalidPricingStatusError = exports.InvalidPricingModelError = exports.InvalidPricePerUnitError = exports.InvalidMarkupPercentageError = exports.InvalidDiscountPercentageError = exports.InvalidUserRoleError = exports.InvalidServiceCatalogTypeError = exports.InvalidServiceCatalogStatusError = exports.InvalidServiceCatalogCategoryError = void 0;
|
|
13
|
+
exports.CorporateConfigurationCarbonFootprintSegmentReference = exports.CorporateCarbonFootprintSegmentConfigurationReferences = exports.CollectionFieldReference = exports.CarbonFootprintSegmentReferences = exports.CarbonFootprintIntensityIndicatorReference = exports.CarbonFootprintConfigurationReference = exports.GlobalWarmingPotentialReference = exports.EmissionFactorReference = exports.EmissionCalculationFormulaReference = exports.EmissionCalculationReference = exports.CalculationVariableReferences = exports.CalculationProcessReference = exports.ActivityDataSubmissionReference = exports.EmissionSource = exports.EmissionSources = exports.CarbonClientReferences = exports.CarbonClientReference = exports.StakeholderReferences = exports.StakeholderReference = exports.UserType = exports.UserLastAccessAt = exports.UserAvatar = exports.UserBusinessStatus = exports.UserPassword = exports.UserDisplayName = exports.UserId = exports.UserEmail = exports.NullableProductConfigurationCarbonFootprintSubsegmentReference = exports.NullableEventEditionConfigurationCarbonFootprintSubsegmentReference = exports.NullableCorporateConfigurationCarbonFootprintSubsegmentReference = exports.NullableStakeholderReference = exports.NullableColombianNIT = exports.NullableTaxIdentificationNumber = exports.NullablePositiveInteger = exports.NullableNumeric = exports.NullableDateTimeString = exports.NullableDate = exports.NullableCode = exports.NullableString = exports.TaxIdentificationNumberList = exports.UrlList = exports.StringList = exports.CodeList = exports.AggregateIdList = exports.TaxIdentification = exports.Gender = exports.Currency = exports.ColombiaNIT = exports.TaxIdentificationNumber = exports.ExecutionPeriod = void 0;
|
|
14
|
+
exports.MinimumValueViolationError = exports.InvalidUrlListError = exports.InvalidCodeListError = exports.InvalidStringListError = exports.EmptyArrayNotAllowedError = exports.PasswordPolicyViolationError = exports.InvalidNationalNumberError = exports.InvalidFullInternationalNumberError = exports.InvalidEmailPolicyError = exports.InvalidCoordinatesError = exports.InvalidTimeFormatError = exports.InvalidDateRangeError = exports.InvalidDateFormatError = exports.InvalidColombianNITNumberError = exports.InvalidColombianNITCheckDigitError = exports.InvalidColombianNITFormatError = exports.InvalidTaxIdentificationTypeError = exports.InvalidStakeholderRoleTypeError = exports.InvalidGenderError = exports.InvalidCurrencyError = exports.InvalidCountryCodeError = exports.InvalidBusinessScaleError = exports.UnknownBoundedContextCodeError = exports.InvalidUuidFormatError = exports.InvalidUserPrefixError = exports.InvalidUserIdFormatError = exports.InvalidSemanticUuidFormatError = exports.InvalidSemanticUuidError = exports.InvalidPropertyValueError = exports.InvalidPropertyTypeError = exports.InvalidValueObjectConfigurationError = exports.UndefinedValueError = exports.NullValueError = exports.MethodNotImplementedError = exports.CreateMethodNotImplementedError = exports.ServiceCatalogReference = exports.ProductReference = exports.ProductConfigurationSystemBoundaryReference = exports.ProductConfigurationCarbonFootprintSubsegmentReference = exports.ProductConfigurationCarbonFootprintSegmentReference = exports.ProductCarbonFootprintSegmentConfigurationReferences = exports.FacilityReference = exports.EventReference = exports.EventEditionReferences = exports.EventEditionReference = exports.EventEditionLifecycleStageReference = exports.EventEditionLifecycleStageConfigurationReferences = exports.EventEditionConfigurationCarbonFootprintSubsegmentReferences = exports.EventEditionConfigurationCarbonFootprintSubsegmentReference = exports.CorporateConfigurationCarbonFootprintSubsegmentReference = void 0;
|
|
15
|
+
exports.CarbonClientDisplayName = exports.CarbonClientEmail = exports.CarbonClientId = exports.StakeholderUserType = exports.StakeholderLastAccessAt = exports.StakeholderAvatar = exports.StakeholderTaxIdentification = exports.StakeholderRoleType = exports.StakeholderBusinessStatus = exports.StakeholderPassword = exports.StakeholderDisplayName = exports.StakeholderEmail = exports.StakeholderId = exports.CarbonManager = exports.CarbonHost = exports.CarbonCoordinator = exports.CarbonClient = exports.Stakeholder = exports.CannotAccessRightOnLeftValueError = exports.CannotAccessLeftOnRightValueError = exports.ResultExtensions = exports.EitherUtils = exports.ResultFactory = exports.EitherFactory = exports.RightEither = exports.LeftEither = exports.Either = exports.TaxIdentificationNumberWithControlCharactersError = exports.InvalidTaxIdentificationNumberLengthError = exports.InvalidTaxIdentificationNumberFormatError = exports.InvalidSupervisorRoleError = exports.InvalidMinutesDurationError = exports.InvalidMeasurementUnitOperationError = exports.InvalidManagedStakeholderRoleError = exports.InvalidDomainCodeError = exports.InvalidCountrySpecificTaxIdentificationNumberError = exports.InvalidCodeError = exports.InvalidAssignerRoleError = exports.InvalidAggregateIdError = exports.EmptyTaxIdentificationNumberError = exports.EmptySegmentNameError = exports.EmptySegmentCodeError = exports.EmptyDisplayNameError = exports.DateGreaterThanError = exports.InvalidUserBusinessStatusError = exports.InvalidUserTypeError = exports.DivisionByZeroError = exports.MoneyOverflowError = exports.NotIntegerError = exports.NegativeAmountError = void 0;
|
|
16
|
+
exports.CarbonClientAccountEnum = exports.CarbonManagerLastAccessAt = exports.CarbonManagerTaxIdentification = exports.CarbonManagerBusinessStatus = exports.CarbonManagerRoleType = exports.CarbonManagerUserType = exports.CarbonManagerManagedStakeholders = exports.CarbonManagerDisplayName = exports.CarbonManagerEmail = exports.CarbonManagerId = exports.CarbonHostPermissions = exports.CarbonHostAvatar = exports.CarbonHostLastAccessAt = exports.CarbonHostUserType = exports.CarbonHostBusinessStatus = exports.CarbonHostDisplayName = exports.CarbonHostTaxIdentification = exports.CarbonHostRoleType = exports.CarbonHostPassword = exports.CarbonHostEmail = exports.CarbonHostId = exports.CarbonCoordinatorReportsToStakeholder = exports.CarbonCoordinatorAssignedByStakeholder = exports.CarbonCoordinatorLastAccessAt = exports.CarbonCoordinatorTaxIdentification = exports.CarbonCoordinatorBusinessStatus = exports.CarbonCoordinatorRoleType = exports.CarbonCoordinatorManagedCarbonClients = exports.CarbonCoordinatorWeeklyWorkingSchedule = exports.CarbonCoordinatorGender = exports.CarbonCoordinatorUserType = exports.CarbonCoordinatorAvailabilityStatus = exports.CarbonCoordinatorDisplayName = exports.CarbonCoordinatorEmail = exports.CarbonCoordinatorId = exports.CarbonClientBusinessStatus = exports.CarbonClientLastAccessAt = exports.CarbonClientSupervisedByStakeholder = exports.CarbonClientRoleType = exports.CarbonClientTaxIdentification = exports.CarbonClientPrimaryContactPhone = exports.CarbonClientPrimaryContactEmail = exports.CarbonClientLogo = exports.CarbonClientWebsiteUrl = exports.CarbonClientPhysicalAddress = exports.CarbonClientOrganizationSize = exports.CarbonClientIndustryType = exports.CarbonClientUserType = exports.CarbonClientLegalBusinessName = exports.CarbonClientAccountType = void 0;
|
|
17
|
+
exports.StakeholderPermissions = exports.UserPermissions = exports.SecurityContextReconstructionError = exports.SecurityContext = exports.PermissionSet = exports.PermissionEnum = exports.AuthorizationDecisionEnum = exports.SemanticUuidDomainService = exports.DateTimeFormattingDomainService = exports.InvalidCarbonCoordinatorAvailabilityStatusError = exports.InvalidCarbonClientAccountTypeError = exports.CarbonCoordinatorAvailabilityStatusEnum = void 0;
|
|
18
18
|
// ─── Entity Classes (For Application Layer) ─────────────────────────────────
|
|
19
19
|
var ActivityDataSubmission_1 = require("../carbonbox/activity-data-collection/activity-data-submissions/domain/entity/ActivityDataSubmission");
|
|
20
20
|
Object.defineProperty(exports, "ActivityDataSubmission", { enumerable: true, get: function () { return ActivityDataSubmission_1.ActivityDataSubmission; } });
|
|
@@ -785,6 +785,8 @@ var SystemBoundary_1 = require("../carbonbox/shared/domain/enums/SystemBoundary"
|
|
|
785
785
|
Object.defineProperty(exports, "SystemBoundaryEnum", { enumerable: true, get: function () { return SystemBoundary_1.SystemBoundary; } });
|
|
786
786
|
var TaxIdentification_1 = require("../carbonbox/shared/domain/enums/TaxIdentification");
|
|
787
787
|
Object.defineProperty(exports, "TaxIdentificationEnum", { enumerable: true, get: function () { return TaxIdentification_1.TaxIdentification; } });
|
|
788
|
+
var SemanticUuidPrefix_1 = require("../carbonbox/shared/domain/enums/SemanticUuidPrefix");
|
|
789
|
+
Object.defineProperty(exports, "SemanticUuidPrefixEnum", { enumerable: true, get: function () { return SemanticUuidPrefix_1.SemanticUuidPrefix; } });
|
|
788
790
|
// ─── Fundamental Value Objects ───────────────────────────────────────────────
|
|
789
791
|
// Core Primitives
|
|
790
792
|
var String_1 = require("../carbonbox/shared/domain/value-objects/String");
|
|
@@ -967,6 +969,18 @@ var InvalidPropertyTypeError_1 = require("../carbonbox/shared/domain/exceptions/
|
|
|
967
969
|
Object.defineProperty(exports, "InvalidPropertyTypeError", { enumerable: true, get: function () { return InvalidPropertyTypeError_1.InvalidPropertyTypeError; } });
|
|
968
970
|
var InvalidPropertyValueError_1 = require("../carbonbox/shared/domain/exceptions/InvalidPropertyValueError");
|
|
969
971
|
Object.defineProperty(exports, "InvalidPropertyValueError", { enumerable: true, get: function () { return InvalidPropertyValueError_1.InvalidPropertyValueError; } });
|
|
972
|
+
var InvalidSemanticUuidError_1 = require("../carbonbox/shared/domain/exceptions/InvalidSemanticUuidError");
|
|
973
|
+
Object.defineProperty(exports, "InvalidSemanticUuidError", { enumerable: true, get: function () { return InvalidSemanticUuidError_1.InvalidSemanticUuidError; } });
|
|
974
|
+
var InvalidSemanticUuidFormatError_1 = require("../carbonbox/shared/domain/exceptions/InvalidSemanticUuidFormatError");
|
|
975
|
+
Object.defineProperty(exports, "InvalidSemanticUuidFormatError", { enumerable: true, get: function () { return InvalidSemanticUuidFormatError_1.InvalidSemanticUuidFormatError; } });
|
|
976
|
+
var InvalidUserIdFormatError_1 = require("../carbonbox/shared/domain/exceptions/InvalidUserIdFormatError");
|
|
977
|
+
Object.defineProperty(exports, "InvalidUserIdFormatError", { enumerable: true, get: function () { return InvalidUserIdFormatError_1.InvalidUserIdFormatError; } });
|
|
978
|
+
var InvalidUserPrefixError_1 = require("../carbonbox/shared/domain/exceptions/InvalidUserPrefixError");
|
|
979
|
+
Object.defineProperty(exports, "InvalidUserPrefixError", { enumerable: true, get: function () { return InvalidUserPrefixError_1.InvalidUserPrefixError; } });
|
|
980
|
+
var InvalidUuidFormatError_1 = require("../carbonbox/shared/domain/exceptions/InvalidUuidFormatError");
|
|
981
|
+
Object.defineProperty(exports, "InvalidUuidFormatError", { enumerable: true, get: function () { return InvalidUuidFormatError_1.InvalidUuidFormatError; } });
|
|
982
|
+
var UnknownBoundedContextCodeError_1 = require("../carbonbox/shared/domain/exceptions/UnknownBoundedContextCodeError");
|
|
983
|
+
Object.defineProperty(exports, "UnknownBoundedContextCodeError", { enumerable: true, get: function () { return UnknownBoundedContextCodeError_1.UnknownBoundedContextCodeError; } });
|
|
970
984
|
// Business Rule Violations
|
|
971
985
|
var InvalidBusinessScaleError_1 = require("../carbonbox/shared/domain/exceptions/InvalidBusinessScaleError");
|
|
972
986
|
Object.defineProperty(exports, "InvalidBusinessScaleError", { enumerable: true, get: function () { return InvalidBusinessScaleError_1.InvalidBusinessScaleError; } });
|
|
@@ -1232,6 +1246,8 @@ Object.defineProperty(exports, "InvalidCarbonCoordinatorAvailabilityStatusError"
|
|
|
1232
1246
|
// ─── Date and Time Services ──────────────────────────────────────────────────
|
|
1233
1247
|
var DateTimeFormattingDomainService_1 = require("../carbonbox/shared/domain/services/implementations/DateTimeFormattingDomainService");
|
|
1234
1248
|
Object.defineProperty(exports, "DateTimeFormattingDomainService", { enumerable: true, get: function () { return DateTimeFormattingDomainService_1.DateTimeFormattingDomainService; } });
|
|
1249
|
+
var SemanticUuidDomainService_1 = require("../carbonbox/shared/domain/services/implementations/SemanticUuidDomainService");
|
|
1250
|
+
Object.defineProperty(exports, "SemanticUuidDomainService", { enumerable: true, get: function () { return SemanticUuidDomainService_1.SemanticUuidDomainService; } });
|
|
1235
1251
|
// ─── Enums ──────────────────────────────────────────────────────────────────
|
|
1236
1252
|
var AuthorizationDecision_1 = require("../carbonbox/shared/domain/authorization/enums/AuthorizationDecision");
|
|
1237
1253
|
Object.defineProperty(exports, "AuthorizationDecisionEnum", { enumerable: true, get: function () { return AuthorizationDecision_1.AuthorizationDecision; } });
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic UUID Prefixes for Carbon Footprint Management System
|
|
3
|
+
*
|
|
4
|
+
* Format: {BC} or {BC}-{SUB1}-{SUB2}-...{SUBn} (N-level subdomain support)
|
|
5
|
+
*
|
|
6
|
+
* Supports:
|
|
7
|
+
* - BC-level entities: STC_uuid (for bounded context level entities)
|
|
8
|
+
* - Subdomain entities: USR-STH-CHO_uuid (for subdomain level entities)
|
|
9
|
+
* - N-level expansion: BC-SUB1-SUB2-SUBn_uuid (future growth)
|
|
10
|
+
*
|
|
11
|
+
* Usage in backend:
|
|
12
|
+
* - Import and use these prefixes when generating UUIDs: `${SemanticUuidPrefix.USR_STH_HOST}_${uuid}`
|
|
13
|
+
* - Each domain validates against its specific prefix in its value object
|
|
14
|
+
* - Maintains consistency across the entire system
|
|
15
|
+
* - Easily expandable as new domains/subdomains are added
|
|
16
|
+
*/
|
|
17
|
+
export declare enum SemanticUuidPrefix {
|
|
18
|
+
STC = "STC",// Example: System Technical Configuration
|
|
19
|
+
ADC_SUBMISSIONS = "ADC-SUB",
|
|
20
|
+
ADC_FIELDS = "ADC-FLD",
|
|
21
|
+
ADC_LOGIC = "ADC-LOG",
|
|
22
|
+
ADC_LABELS = "ADC-LBL",
|
|
23
|
+
ADC_FORMS = "ADC-FRM",
|
|
24
|
+
ADC_ADAPTATIONS = "ADC-ADP",
|
|
25
|
+
CFC_CORPORATE = "CFC-COR",
|
|
26
|
+
CFC_EVENT = "CFC-EVT",
|
|
27
|
+
CFC_PRODUCT = "CFC-PRD",
|
|
28
|
+
CPR_EVENTS = "CPR-EVT",
|
|
29
|
+
CPR_FACILITIES = "CPR-FAC",
|
|
30
|
+
CPR_PRODUCTS = "CPR-PRD",
|
|
31
|
+
ECF_VARIABLES = "ECF-VAR",
|
|
32
|
+
ECF_FACTORS = "ECF-FAC",
|
|
33
|
+
ECF_GWP = "ECF-GWP",
|
|
34
|
+
ECP_JOBS = "ECP-JOB",
|
|
35
|
+
ECP_PROCESSES = "ECP-PRC",
|
|
36
|
+
ECP_WORKFLOWS = "ECP-WFL",
|
|
37
|
+
ECR_AGGREGATIONS = "ECR-AGG",
|
|
38
|
+
ECR_CALCULATIONS = "ECR-CAL",
|
|
39
|
+
ECR_GHG_RESULTS = "ECR-GHG",
|
|
40
|
+
USR = "USR",// General user (BC-level)
|
|
41
|
+
USR_STH_CLIENT = "USR-STH-CLI",
|
|
42
|
+
USR_STH_COORDINATOR = "USR-STH-CRD",
|
|
43
|
+
USR_STH_HOST = "USR-STH-CHO",
|
|
44
|
+
USR_STH_MANAGER = "USR-STH-MGR",
|
|
45
|
+
SHR_DOMAIN = "SHR-DOM",
|
|
46
|
+
SHR_EITHER = "SHR-ETH"
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=SemanticUuidPrefix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SemanticUuidPrefix.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/enums/SemanticUuidPrefix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,oBAAY,kBAAkB;IAE5B,GAAG,QAAQ,CAAE,0CAA0C;IAGvD,eAAe,YAAY;IAC3B,UAAU,YAAY;IACtB,SAAS,YAAY;IACrB,UAAU,YAAY;IACtB,SAAS,YAAY;IACrB,eAAe,YAAY;IAG3B,aAAa,YAAY;IACzB,SAAS,YAAY;IACrB,WAAW,YAAY;IAGvB,UAAU,YAAY;IACtB,cAAc,YAAY;IAC1B,YAAY,YAAY;IAGxB,aAAa,YAAY;IACzB,WAAW,YAAY;IACvB,OAAO,YAAY;IAGnB,QAAQ,YAAY;IACpB,aAAa,YAAY;IACzB,aAAa,YAAY;IAGzB,gBAAgB,YAAY;IAC5B,gBAAgB,YAAY;IAC5B,eAAe,YAAY;IAG3B,GAAG,QAAQ,CAAE,0BAA0B;IAGvC,cAAc,gBAAgB;IAC9B,mBAAmB,gBAAgB;IACnC,YAAY,gBAAgB;IAC5B,eAAe,gBAAgB;IAG/B,UAAU,YAAY;IACtB,UAAU,YAAY;CAMvB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RootError } from './RootError';
|
|
2
|
+
export declare class InvalidSemanticUuidError extends RootError {
|
|
3
|
+
private static readonly INVALID_SEMANTIC_UUID_ERROR_MESSAGE;
|
|
4
|
+
private constructor();
|
|
5
|
+
static create(semanticUuid: string, propertyName: string): InvalidSemanticUuidError;
|
|
6
|
+
logError(): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=InvalidSemanticUuidError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvalidSemanticUuidError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidSemanticUuidError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,wBAAyB,SAAQ,SAAS;IACrD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mCAAmC,CAAgJ;IAE3M,OAAO;WASgB,MAAM,CAC3B,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GACnB,wBAAwB;IAIX,QAAQ,IAAI,MAAM;CAGnC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RootError } from './RootError';
|
|
2
|
+
export declare class InvalidSemanticUuidFormatError extends RootError {
|
|
3
|
+
private static readonly INVALID_SEMANTIC_UUID_FORMAT_ERROR_MESSAGE;
|
|
4
|
+
private constructor();
|
|
5
|
+
static create(semanticUuid: string, reason: string): InvalidSemanticUuidFormatError;
|
|
6
|
+
logError(): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=InvalidSemanticUuidFormatError.d.ts.map
|
package/build/types/carbonbox/shared/domain/exceptions/InvalidSemanticUuidFormatError.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvalidSemanticUuidFormatError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidSemanticUuidFormatError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,8BAA+B,SAAQ,SAAS;IAC3D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,0CAA0C,CAA4C;IAE9G,OAAO;WASgB,MAAM,CAC3B,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,GACb,8BAA8B;IAIjB,QAAQ,IAAI,MAAM;CAGnC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RootError } from './RootError';
|
|
2
|
+
export declare class InvalidUserIdFormatError extends RootError {
|
|
3
|
+
private static readonly INVALID_USER_ID_FORMAT_ERROR_MESSAGE;
|
|
4
|
+
private constructor();
|
|
5
|
+
static create(userId: string, reason: string): InvalidUserIdFormatError;
|
|
6
|
+
logError(): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=InvalidUserIdFormatError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvalidUserIdFormatError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidUserIdFormatError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,wBAAyB,SAAQ,SAAS;IACrD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,oCAAoC,CAA+C;IAE3G,OAAO;WASgB,MAAM,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,wBAAwB;IAIX,QAAQ,IAAI,MAAM;CAGnC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RootError } from './RootError';
|
|
2
|
+
export declare class InvalidUserPrefixError extends RootError {
|
|
3
|
+
private static readonly INVALID_USER_PREFIX_ERROR_MESSAGE;
|
|
4
|
+
private constructor();
|
|
5
|
+
static create(userId: string, prefix: string, validPrefixes: string[]): InvalidUserPrefixError;
|
|
6
|
+
logError(): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=InvalidUserPrefixError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvalidUserPrefixError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidUserPrefixError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,sBAAuB,SAAQ,SAAS;IACnD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iCAAiC,CAAoC;IAE7F,OAAO;WAUgB,MAAM,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,EAAE,GACtB,sBAAsB;IAIT,QAAQ,IAAI,MAAM;CAGnC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RootError } from './RootError';
|
|
2
|
+
export declare class InvalidUuidFormatError extends RootError {
|
|
3
|
+
private static readonly INVALID_UUID_FORMAT_ERROR_MESSAGE;
|
|
4
|
+
private constructor();
|
|
5
|
+
static create(uuid: string, semanticUuid: string): InvalidUuidFormatError;
|
|
6
|
+
logError(): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=InvalidUuidFormatError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvalidUuidFormatError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidUuidFormatError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,sBAAuB,SAAQ,SAAS;IACnD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iCAAiC,CAA4B;IAErF,OAAO;WASgB,MAAM,CAC3B,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,GACnB,sBAAsB;IAIT,QAAQ,IAAI,MAAM;CAGnC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RootError } from './RootError';
|
|
2
|
+
export declare class UnknownBoundedContextCodeError extends RootError {
|
|
3
|
+
private static readonly UNKNOWN_BOUNDED_CONTEXT_CODE_ERROR_MESSAGE;
|
|
4
|
+
private constructor();
|
|
5
|
+
static create(contextCode: string, semanticUuid: string): UnknownBoundedContextCodeError;
|
|
6
|
+
logError(): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=UnknownBoundedContextCodeError.d.ts.map
|
package/build/types/carbonbox/shared/domain/exceptions/UnknownBoundedContextCodeError.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnknownBoundedContextCodeError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/UnknownBoundedContextCodeError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,8BAA+B,SAAQ,SAAS;IAC3D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,0CAA0C,CAAmD;IAErH,OAAO;WASgB,MAAM,CAC3B,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,8BAA8B;IAIjB,QAAQ,IAAI,MAAM;CAGnC"}
|
package/build/types/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.d.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { IEither } from '../../../either';
|
|
2
|
+
import { SemanticUuidPrefix } from '../../enums/SemanticUuidPrefix';
|
|
3
|
+
import { InvalidSemanticUuidError } from '../../exceptions/InvalidSemanticUuidError';
|
|
4
|
+
/**
|
|
5
|
+
* Interface for Semantic UUID parsing and validation domain service.
|
|
6
|
+
* Provides centralized business logic for semantic UUID handling across the domain.
|
|
7
|
+
* Uses Either pattern for functional error handling.
|
|
8
|
+
*
|
|
9
|
+
* This service is designed to be used in factories, application services, and other
|
|
10
|
+
* non-value-object contexts to maintain Value Object purity.
|
|
11
|
+
*/
|
|
12
|
+
export interface ISemanticUuidDomainService {
|
|
13
|
+
/**
|
|
14
|
+
* Validates if a string is a valid semantic UUID prefix
|
|
15
|
+
* @param prefix The prefix string to validate
|
|
16
|
+
* @returns Either with validation result or error
|
|
17
|
+
*/
|
|
18
|
+
isValidPrefix(prefix: string): IEither<InvalidSemanticUuidError, boolean>;
|
|
19
|
+
/**
|
|
20
|
+
* Gets the bounded context name from a semantic UUID prefix
|
|
21
|
+
* @param prefix The semantic UUID prefix
|
|
22
|
+
* @returns Either with bounded context name or error
|
|
23
|
+
*/
|
|
24
|
+
getBoundedContext(prefix: SemanticUuidPrefix): IEither<InvalidSemanticUuidError, string>;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the subdomain from a semantic UUID prefix
|
|
27
|
+
* @param prefix The semantic UUID prefix
|
|
28
|
+
* @returns Either with subdomain name or error
|
|
29
|
+
*/
|
|
30
|
+
getSubdomain(prefix: SemanticUuidPrefix): IEither<InvalidSemanticUuidError, string>;
|
|
31
|
+
/**
|
|
32
|
+
* Gets all available prefixes as an array
|
|
33
|
+
* @returns Either with array of all prefixes or error
|
|
34
|
+
*/
|
|
35
|
+
getAllPrefixes(): IEither<InvalidSemanticUuidError, string[]>;
|
|
36
|
+
/**
|
|
37
|
+
* Gets prefixes by bounded context
|
|
38
|
+
* @param boundedContext The bounded context name
|
|
39
|
+
* @returns Either with array of prefixes for the context or error
|
|
40
|
+
*/
|
|
41
|
+
getPrefixesByBoundedContext(boundedContext: string): IEither<InvalidSemanticUuidError, SemanticUuidPrefix[]>;
|
|
42
|
+
/**
|
|
43
|
+
* Validates a complete semantic UUID format
|
|
44
|
+
* @param semanticUuid The complete semantic UUID to validate
|
|
45
|
+
* @returns Either with validation result or error
|
|
46
|
+
*/
|
|
47
|
+
validateSemanticUuidFormat(semanticUuid: string): IEither<InvalidSemanticUuidError, boolean>;
|
|
48
|
+
/**
|
|
49
|
+
* Extracts and validates the prefix from a semantic UUID
|
|
50
|
+
* @param semanticUuid The complete semantic UUID
|
|
51
|
+
* @returns Either with extracted prefix or error
|
|
52
|
+
*/
|
|
53
|
+
extractPrefix(semanticUuid: string): IEither<InvalidSemanticUuidError, string>;
|
|
54
|
+
/**
|
|
55
|
+
* Extracts and validates the UUID from a semantic UUID
|
|
56
|
+
* @param semanticUuid The complete semantic UUID
|
|
57
|
+
* @returns Either with extracted UUID or error
|
|
58
|
+
*/
|
|
59
|
+
extractUuid(semanticUuid: string): IEither<InvalidSemanticUuidError, string>;
|
|
60
|
+
/**
|
|
61
|
+
* Extracts the bounded context code (first 3 letters) from a semantic UUID
|
|
62
|
+
* @param semanticUuid The complete semantic UUID
|
|
63
|
+
* @returns Either with bounded context code or error
|
|
64
|
+
*/
|
|
65
|
+
extractBoundedContextCode(semanticUuid: string): IEither<InvalidSemanticUuidError, string>;
|
|
66
|
+
/**
|
|
67
|
+
* Extracts all subdomain parts from a semantic UUID
|
|
68
|
+
* @param semanticUuid The complete semantic UUID
|
|
69
|
+
* @returns Either with array of subdomain parts or error
|
|
70
|
+
*/
|
|
71
|
+
extractSubdomains(semanticUuid: string): IEither<InvalidSemanticUuidError, string[]>;
|
|
72
|
+
/**
|
|
73
|
+
* Checks if a semantic UUID has subdomains or is BC-level only
|
|
74
|
+
* @param semanticUuid The complete semantic UUID
|
|
75
|
+
* @returns Either with boolean indicating if it has subdomains or error
|
|
76
|
+
*/
|
|
77
|
+
hasSubdomains(semanticUuid: string): IEither<InvalidSemanticUuidError, boolean>;
|
|
78
|
+
/**
|
|
79
|
+
* Creates a human-readable log representation of a semantic UUID
|
|
80
|
+
* @param semanticUuid The complete semantic UUID
|
|
81
|
+
* @returns Either with log string or error
|
|
82
|
+
*/
|
|
83
|
+
toLogString(semanticUuid: string): IEither<InvalidSemanticUuidError, string>;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=ISemanticUuidDomainService.d.ts.map
|
package/build/types/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISemanticUuidDomainService.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/shared/domain/services/contracts/ISemanticUuidDomainService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAErF;;;;;;;GAOG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IAE1E;;;;OAIG;IACH,iBAAiB,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;IAEzF;;;;OAIG;IACH,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;IAEpF;;;OAGG;IACH,cAAc,IAAI,OAAO,CAAC,wBAAwB,EAAE,MAAM,EAAE,CAAC,CAAC;IAE9D;;;;OAIG;IACH,2BAA2B,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAE7G;;;;OAIG;IACH,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IAE7F;;;;OAIG;IACH,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;IAE/E;;;;OAIG;IACH,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;IAE7E;;;;OAIG;IACH,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;IAE3F;;;;OAIG;IACH,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,MAAM,EAAE,CAAC,CAAC;IAErF;;;;OAIG;IACH,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IAEhF;;;;OAIG;IACH,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;CAC9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeFormattingDomainService.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/shared/domain/services/implementations/DateTimeFormattingDomainService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAGjF,OAAO,EAAE,gCAAgC,EAAE,MAAM,+CAA+C,CAAC;AAEjG;;;;GAIG;AACH,qBAAa,+BAAgC,YAAW,gCAAgC;IACtF,OAAO;WAIO,MAAM,IAAI,+BAA+B;IAIvD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA2D;IAEtF,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAyG;IAExI;;;;OAIG;IACI,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DateTimeFormattingDomainService.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/shared/domain/services/implementations/DateTimeFormattingDomainService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAGjF,OAAO,EAAE,gCAAgC,EAAE,MAAM,+CAA+C,CAAC;AAEjG;;;;GAIG;AACH,qBAAa,+BAAgC,YAAW,gCAAgC;IACtF,OAAO;WAIO,MAAM,IAAI,+BAA+B;IAIvD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA2D;IAEtF,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAyG;IAExI;;;;OAIG;IACI,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,OAAO,CAAC;IAmBrF;;;;OAIG;IACI,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,OAAO,CAAC;IAiB7F;;;;OAIG;IACI,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC;IAsB9E;;;;OAIG;IACI,sBAAsB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC;IAyBlF;;;OAGG;IACI,oBAAoB,IAAI,OAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC;IAItE;;;OAGG;IACI,wBAAwB,IAAI,OAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC;IAI1E;;;;OAIG;IACI,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,IAAI,CAAC;IAyBjF;;;;OAIG;IACI,mBAAmB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,IAAI,CAAC;IA4BzF;;;;OAIG;IACI,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,OAAO,CAAC;IAoChF;;;;OAIG;IACI,eAAe,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,OAAO,CAAC;IAoCxF;;;;;OAKG;IACI,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC;IA0BtG;;;;;OAKG;IACI,gBAAgB,CAAC,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC;IA0BlH;;;OAGG;IACI,aAAa,IAAI,MAAM;IAI9B;;;OAGG;IACI,iBAAiB,IAAI,MAAM;IAOlC;;OAEG;WACW,oBAAoB,IAAI,MAAM;IAQ5C;;OAEG;WACW,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;CAOrD"}
|
package/build/types/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { IEither } from '../../../either';
|
|
2
|
+
import { SemanticUuidPrefix } from '../../enums/SemanticUuidPrefix';
|
|
3
|
+
import { InvalidSemanticUuidError } from '../../exceptions/InvalidSemanticUuidError';
|
|
4
|
+
import { ISemanticUuidDomainService } from '../contracts/ISemanticUuidDomainService';
|
|
5
|
+
/**
|
|
6
|
+
* Domain Service for semantic UUID parsing, validation and business logic operations.
|
|
7
|
+
* Provides centralized business logic for semantic UUID handling across the domain.
|
|
8
|
+
* Refactored to support dependency injection and Either pattern for error handling.
|
|
9
|
+
*
|
|
10
|
+
* This service maintains Value Object purity by being used in factories,
|
|
11
|
+
* application services, and other appropriate contexts.
|
|
12
|
+
*/
|
|
13
|
+
export declare class SemanticUuidDomainService implements ISemanticUuidDomainService {
|
|
14
|
+
private constructor();
|
|
15
|
+
static create(): SemanticUuidDomainService;
|
|
16
|
+
private readonly SEMANTIC_UUID_REGEX;
|
|
17
|
+
private readonly UUID_REGEX;
|
|
18
|
+
/**
|
|
19
|
+
* Validates if a string is a valid semantic UUID prefix
|
|
20
|
+
*/
|
|
21
|
+
isValidPrefix(prefix: string): IEither<InvalidSemanticUuidError, boolean>;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the bounded context name from a semantic UUID prefix
|
|
24
|
+
*/
|
|
25
|
+
getBoundedContext(prefix: SemanticUuidPrefix): IEither<InvalidSemanticUuidError, string>;
|
|
26
|
+
/**
|
|
27
|
+
* Gets the subdomain from a semantic UUID prefix
|
|
28
|
+
*/
|
|
29
|
+
getSubdomain(prefix: SemanticUuidPrefix): IEither<InvalidSemanticUuidError, string>;
|
|
30
|
+
/**
|
|
31
|
+
* Gets all available prefixes as an array
|
|
32
|
+
*/
|
|
33
|
+
getAllPrefixes(): IEither<InvalidSemanticUuidError, string[]>;
|
|
34
|
+
/**
|
|
35
|
+
* Gets prefixes by bounded context
|
|
36
|
+
*/
|
|
37
|
+
getPrefixesByBoundedContext(boundedContext: string): IEither<InvalidSemanticUuidError, SemanticUuidPrefix[]>;
|
|
38
|
+
/**
|
|
39
|
+
* Validates a complete semantic UUID format
|
|
40
|
+
*/
|
|
41
|
+
validateSemanticUuidFormat(semanticUuid: string): IEither<InvalidSemanticUuidError, boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* Extracts and validates the prefix from a semantic UUID
|
|
44
|
+
*/
|
|
45
|
+
extractPrefix(semanticUuid: string): IEither<InvalidSemanticUuidError, string>;
|
|
46
|
+
/**
|
|
47
|
+
* Extracts and validates the UUID from a semantic UUID
|
|
48
|
+
*/
|
|
49
|
+
extractUuid(semanticUuid: string): IEither<InvalidSemanticUuidError, string>;
|
|
50
|
+
/**
|
|
51
|
+
* Extracts the bounded context code (first 3 letters) from a semantic UUID
|
|
52
|
+
*/
|
|
53
|
+
extractBoundedContextCode(semanticUuid: string): IEither<InvalidSemanticUuidError, string>;
|
|
54
|
+
/**
|
|
55
|
+
* Extracts all subdomain parts from a semantic UUID
|
|
56
|
+
*/
|
|
57
|
+
extractSubdomains(semanticUuid: string): IEither<InvalidSemanticUuidError, string[]>;
|
|
58
|
+
/**
|
|
59
|
+
* Checks if a semantic UUID has subdomains or is BC-level only
|
|
60
|
+
*/
|
|
61
|
+
hasSubdomains(semanticUuid: string): IEither<InvalidSemanticUuidError, boolean>;
|
|
62
|
+
/**
|
|
63
|
+
* Creates a human-readable log representation of a semantic UUID
|
|
64
|
+
*/
|
|
65
|
+
toLogString(semanticUuid: string): IEither<InvalidSemanticUuidError, string>;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=SemanticUuidDomainService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SemanticUuidDomainService.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/shared/domain/services/implementations/SemanticUuidDomainService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAIrF,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAErF;;;;;;;GAOG;AACH,qBAAa,yBAA0B,YAAW,0BAA0B;IAC1E,OAAO;WAIO,MAAM,IAAI,yBAAyB;IAKjD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAiG;IAGrI,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA4E;IAEvG;;OAEG;IACI,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,OAAO,CAAC;IAmBhF;;OAEG;IACI,iBAAiB,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC;IA4B/F;;OAEG;IACI,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAc1F;;OAEG;IACI,cAAc,IAAI,OAAO,CAAC,wBAAwB,EAAE,MAAM,EAAE,CAAC;IAOpE;;OAEG;IACI,2BAA2B,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,kBAAkB,EAAE,CAAC;IA2DnH;;OAEG;IACI,0BAA0B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,OAAO,CAAC;IAYnG;;OAEG;IACI,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAarF;;OAEG;IACI,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAmBnF;;OAEG;IACI,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAejG;;OAEG;IACI,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,MAAM,EAAE,CAAC;IAiB3F;;OAEG;IACI,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,OAAO,CAAC;IAetF;;OAEG;IACI,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAC;CA+BpF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserEmailProps.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/types/UserEmailProps.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Permission } from '../authorization/enums/Permission';
|
|
2
|
+
import { UserBusinessStatus } from '../enums/UserBusinessStatus';
|
|
3
|
+
import { UserType } from '../enums/UserType';
|
|
4
|
+
import { AggregateRootProps } from './AggregateRootProps';
|
|
5
|
+
import { Image } from './Image';
|
|
6
|
+
import { UserEmail } from './UserEmail';
|
|
7
|
+
export type UserPropsWithHashedPassword = AggregateRootProps & {
|
|
8
|
+
displayName: string;
|
|
9
|
+
avatar: Image;
|
|
10
|
+
email: UserEmail;
|
|
11
|
+
password: string;
|
|
12
|
+
hashedPassword: string;
|
|
13
|
+
businessStatus: UserBusinessStatus;
|
|
14
|
+
userType: UserType;
|
|
15
|
+
lastAccessAt: string | null;
|
|
16
|
+
permissions: Permission[];
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=UserPropsWithHashedPassword.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserPropsWithHashedPassword.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/types/UserPropsWithHashedPassword.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,MAAM,2BAA2B,GAAG,kBAAkB,GAAG;IAC7D,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,KAAK,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,kBAAkB,CAAC;IACnC,QAAQ,EAAE,QAAQ,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B,CAAC"}
|
|
@@ -1,14 +1,67 @@
|
|
|
1
1
|
import { String } from './String';
|
|
2
|
+
/**
|
|
3
|
+
* Pure AggregateId Value Object with semantic UUID format
|
|
4
|
+
*
|
|
5
|
+
* Format: {BC}_{UUID} or {BC}-{SUB1}-{SUB2}-...{SUBn}_{UUID}
|
|
6
|
+
* Examples:
|
|
7
|
+
* - STC_550e8400-e29b-41d4-a716-446655440000 (BC-level entity)
|
|
8
|
+
* - USR-STH-CHO_550e8400-e29b-41d4-a716-446655440000 (subdomain entity)
|
|
9
|
+
* - ADC-SUB-FLD_123e4567-e89b-12d3-a456-426614174000 (future N-level expansion)
|
|
10
|
+
*
|
|
11
|
+
* This is a PURE Value Object - no external dependencies or business logic.
|
|
12
|
+
* For semantic parsing and business logic, use SemanticUuidDomainService.
|
|
13
|
+
*
|
|
14
|
+
* Benefits:
|
|
15
|
+
* - Immutable and pure value object design
|
|
16
|
+
* - Basic validation and extraction methods
|
|
17
|
+
* - Flexible N-level subdomain support
|
|
18
|
+
* - Clean separation of concerns
|
|
19
|
+
*/
|
|
2
20
|
export declare class AggregateId extends String {
|
|
3
21
|
protected static readonly DEFAULT_PROPERTY_NAME = "id";
|
|
4
|
-
|
|
22
|
+
private static readonly UUID_REGEX;
|
|
23
|
+
private static readonly SEMANTIC_UUID_REGEX;
|
|
5
24
|
protected constructor(value: string, skipDomainValidation: boolean, propertyName?: string);
|
|
6
25
|
static create(id: string): AggregateId;
|
|
7
26
|
static fromPrimitives(id: string): AggregateId;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Extracts the raw UUID from the semantic UUID
|
|
29
|
+
*/
|
|
30
|
+
extractUuid(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Extracts the full prefix from the semantic UUID (BC-SUB1-SUB2-...SUBn)
|
|
33
|
+
*/
|
|
34
|
+
extractPrefix(): string;
|
|
35
|
+
/**
|
|
36
|
+
* Extracts the bounded context (first 3 letters) from the prefix
|
|
37
|
+
*/
|
|
38
|
+
extractBoundedContext(): string;
|
|
39
|
+
/**
|
|
40
|
+
* Extracts all subdomain parts from the prefix
|
|
41
|
+
* Returns empty array if BC has no subdomains (e.g., STC_uuid)
|
|
42
|
+
*/
|
|
43
|
+
extractSubdomains(): string[];
|
|
44
|
+
/**
|
|
45
|
+
* Extracts the primary subdomain (first subdomain after BC)
|
|
46
|
+
* Returns empty string if BC has no subdomains
|
|
47
|
+
*/
|
|
48
|
+
extractPrimarySubdomain(): string;
|
|
49
|
+
/**
|
|
50
|
+
* Checks if this UUID has subdomains or is BC-level only
|
|
51
|
+
*/
|
|
52
|
+
hasSubdomains(): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Validation methods
|
|
55
|
+
*/
|
|
56
|
+
static guardAgainstInvalidSemanticId(semanticId: string, propertyName?: string): void;
|
|
57
|
+
protected static guardAgainstInvalidUuid(uuid: string, propertyName?: string): void;
|
|
58
|
+
protected static isInvalidSemanticId(semanticId: string): boolean;
|
|
59
|
+
protected static isInvalidUuid(uuid: string): boolean;
|
|
60
|
+
protected static isValidSemanticId(semanticId: string): boolean;
|
|
61
|
+
protected static isValidUuid(uuid: string): boolean;
|
|
11
62
|
static isValidId(id: string): boolean;
|
|
63
|
+
static isValidSemanticIdValue(semanticId: string): boolean;
|
|
64
|
+
static isValidUuidValue(uuid: string): boolean;
|
|
12
65
|
toPrimitives(): string;
|
|
13
66
|
}
|
|
14
67
|
//# sourceMappingURL=AggregateId.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AggregateId.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/value-objects/AggregateId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"AggregateId.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/value-objects/AggregateId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,WAAY,SAAQ,MAAM;IACrC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,QAAQ;IAGvD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAA4E;IAI9G,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAiG;IAE5I,SAAS,aACP,KAAK,EAAE,MAAM,EACb,oBAAoB,EAAE,OAAO,EAC7B,YAAY,GAAE,MAA0C;WAanC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW;WAI/B,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW;IAI9D;;OAEG;IACI,WAAW,IAAI,MAAM;IAQ5B;;OAEG;IACI,aAAa,IAAI,MAAM;IAQ9B;;OAEG;IACI,qBAAqB,IAAI,MAAM;IAKtC;;;OAGG;IACI,iBAAiB,IAAI,MAAM,EAAE;IAQpC;;;OAGG;IACI,uBAAuB,IAAI,MAAM;IAKxC;;OAEG;IACI,aAAa,IAAI,OAAO;IAI/B;;OAEG;WACW,6BAA6B,CACzC,UAAU,EAAE,MAAM,EAClB,YAAY,GAAE,MAA0C,GACvD,IAAI;IAMP,SAAS,CAAC,MAAM,CAAC,uBAAuB,CACtC,IAAI,EAAE,MAAM,EACZ,YAAY,GAAE,MAAe,GAC5B,IAAI;IAMP,SAAS,CAAC,MAAM,CAAC,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAIjE,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIrD,SAAS,CAAC,MAAM,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAI/D,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;WAIrC,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;WAI9B,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;WAInD,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIrC,YAAY,IAAI,MAAM;CAGvC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { AggregateId } from './AggregateId';
|
|
2
|
+
import { StakeholderRole } from '../enums/StakeholderRole';
|
|
2
3
|
export declare class UserId extends AggregateId {
|
|
3
4
|
protected static readonly PROPERTY_NAME = "id";
|
|
5
|
+
private static readonly VALID_USER_PREFIXES;
|
|
4
6
|
/**
|
|
5
7
|
* Constructor protegido para que solo clases hijas puedan instanciar.
|
|
6
8
|
* Aplica todas las validaciones de dominio al momento de construcción.
|
|
@@ -8,6 +10,33 @@ export declare class UserId extends AggregateId {
|
|
|
8
10
|
protected constructor(value: string, skipDomainValidation: boolean);
|
|
9
11
|
static create(value: string): UserId;
|
|
10
12
|
static fromPrimitives(primitive: string): UserId;
|
|
13
|
+
/**
|
|
14
|
+
* Validates that the UUID has a valid user prefix
|
|
15
|
+
*/
|
|
16
|
+
private static guardAgainstInvalidUserPrefix;
|
|
17
|
+
/**
|
|
18
|
+
* Checks if the current UserId has a valid user prefix
|
|
19
|
+
*/
|
|
20
|
+
hasValidUserPrefix(): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Checks if this is a general user (not a stakeholder)
|
|
23
|
+
*/
|
|
24
|
+
isGeneralUser(): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Checks if this is a stakeholder user
|
|
27
|
+
*/
|
|
28
|
+
isStakeholder(): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Stakeholder identification methods - checks if user is a specific stakeholder type
|
|
31
|
+
*/
|
|
32
|
+
isStakeholderCarbonClient(): boolean;
|
|
33
|
+
isStakeholderCarbonCoordinator(): boolean;
|
|
34
|
+
isStakeholderCarbonManager(): boolean;
|
|
35
|
+
isStakeholderCarbonHost(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Gets the stakeholder role type from the semantic UUID prefix
|
|
38
|
+
*/
|
|
39
|
+
getStakeholderRole(): StakeholderRole | 'UNKNOWN';
|
|
11
40
|
toPrimitives(): string;
|
|
12
41
|
}
|
|
13
42
|
//# sourceMappingURL=UserId.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserId.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/value-objects/UserId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,MAAO,SAAQ,WAAW;IACrC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,QAAQ;
|
|
1
|
+
{"version":3,"file":"UserId.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/value-objects/UserId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAI3D,qBAAa,MAAO,SAAQ,WAAW;IACrC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,QAAQ;IAG/C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAMzC;IAEF;;;OAGG;IACH,SAAS,aAAa,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,OAAO;WAI3C,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;WAW7B,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAMhE;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,6BAA6B;IAuB5C;;OAEG;IACI,kBAAkB,IAAI,OAAO;IASpC;;OAEG;IACI,aAAa,IAAI,OAAO;IAQ/B;;OAEG;IACI,aAAa,IAAI,OAAO;IAc/B;;OAEG;IACI,yBAAyB,IAAI,OAAO;IAQpC,8BAA8B,IAAI,OAAO;IAQzC,0BAA0B,IAAI,OAAO;IAQrC,uBAAuB,IAAI,OAAO;IAQzC;;OAEG;IACI,kBAAkB,IAAI,eAAe,GAAG,SAAS;IAgBxC,YAAY,IAAI,MAAM;CAGvC"}
|