@carbonbox/domain 0.43.0 → 0.45.0
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/emission-calculation-results/ghg-emission-results/domain/entity/GHGEmissionResult.js +7 -0
- package/build/carbonbox/emission-calculation-results/ghg-emission-results/domain/value-objects/GHGEmissionResultGreenhouseGas.js +12 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/entity/IReportContentGenerationJob.js +2 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/entity/ReportContentGenerationJob.js +158 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/enums/ReportContentGenerationStatus.js +14 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/exceptions/ReportContentGenerationJobInvalidStatusTransitionError.js +31 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/repository/IReportContentGenerationJobRepository.js +2 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/types/ReportContentGenerationJobPrimitives.js +2 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/types/ReportContentGenerationJobProps.js +2 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobAttemptCount.js +30 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobCarbonClientId.js +23 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobCompletedAt.js +20 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobCreatedAt.js +20 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobFailureReason.js +20 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobId.js +44 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobReportInstanceId.js +23 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobRequestedByStakeholderId.js +23 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobStartedAt.js +20 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobStatus.js +60 -0
- package/build/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobUpdatedAt.js +20 -0
- package/build/carbonbox/reporting/shared/domain/enums/DataBindingSource.js +3 -2
- package/build/carbonbox/shared/domain/enums/ErrorCode.js +1 -0
- package/build/carbonbox/shared/domain/enums/SemanticUuidPrefix.js +1 -0
- package/build/carbonbox/shared/domain/value-objects/GreenhouseGasSpecies.js +17 -0
- package/build/main/index.js +37 -8
- package/build/types/carbonbox/emission-calculation-results/ghg-emission-results/domain/entity/GHGEmissionResult.d.ts +5 -0
- package/build/types/carbonbox/emission-calculation-results/ghg-emission-results/domain/entity/GHGEmissionResult.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-results/ghg-emission-results/domain/value-objects/GHGEmissionResultGreenhouseGas.d.ts +8 -0
- package/build/types/carbonbox/emission-calculation-results/ghg-emission-results/domain/value-objects/GHGEmissionResultGreenhouseGas.d.ts.map +1 -1
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/entity/IReportContentGenerationJob.d.ts +24 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/entity/IReportContentGenerationJob.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/entity/ReportContentGenerationJob.d.ts +56 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/entity/ReportContentGenerationJob.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/enums/ReportContentGenerationStatus.d.ts +11 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/enums/ReportContentGenerationStatus.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/exceptions/ReportContentGenerationJobInvalidStatusTransitionError.d.ts +7 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/exceptions/ReportContentGenerationJobInvalidStatusTransitionError.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/repository/IReportContentGenerationJobRepository.d.ts +20 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/repository/IReportContentGenerationJobRepository.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/types/ReportContentGenerationJobPrimitives.d.ts +19 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/types/ReportContentGenerationJobPrimitives.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/types/ReportContentGenerationJobProps.d.ts +15 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/types/ReportContentGenerationJobProps.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobAttemptCount.d.ts +10 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobAttemptCount.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobCarbonClientId.d.ts +9 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobCarbonClientId.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobCompletedAt.d.ts +9 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobCompletedAt.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobCreatedAt.d.ts +9 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobCreatedAt.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobFailureReason.d.ts +9 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobFailureReason.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobId.d.ts +11 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobId.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobReportInstanceId.d.ts +9 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobReportInstanceId.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobRequestedByStakeholderId.d.ts +9 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobRequestedByStakeholderId.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobStartedAt.d.ts +9 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobStartedAt.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobStatus.d.ts +21 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobStatus.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobUpdatedAt.d.ts +9 -0
- package/build/types/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobUpdatedAt.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/enums/DataBindingSource.d.ts +1 -1
- package/build/types/carbonbox/reporting/shared/domain/enums/DataBindingSource.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/enums/ErrorCode.d.ts +1 -0
- package/build/types/carbonbox/shared/domain/enums/ErrorCode.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/enums/SemanticUuidPrefix.d.ts +2 -1
- package/build/types/carbonbox/shared/domain/enums/SemanticUuidPrefix.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/value-objects/GreenhouseGasSpecies.d.ts +13 -0
- package/build/types/carbonbox/shared/domain/value-objects/GreenhouseGasSpecies.d.ts.map +1 -1
- package/build/types/main/index.d.ts +18 -0
- package/build/types/main/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -10,6 +10,12 @@ const InvalidPropertyValueError_1 = require("../exceptions/InvalidPropertyValueE
|
|
|
10
10
|
* para que un mismo refrigerante escrito con espacios/casing distintos matchee siempre igual.
|
|
11
11
|
* La categoría (GreenhouseGasCategory) viaja al lado; aquí no se valida coherencia química
|
|
12
12
|
* especie↔categoría (decisión de diseño: validación permisiva, match por especie).
|
|
13
|
+
*
|
|
14
|
+
* CO₂ biogénico: el CO₂ liberado al quemar biomasa o biocombustibles se reporta por separado,
|
|
15
|
+
* fuera de los alcances y del total del inventario (GHG Protocol Corporate Standard cap. 9;
|
|
16
|
+
* ISO 14064-1:2018 §9.3.1). Se modela como la especie `CO2-BIOGENIC` de la categoría CO2
|
|
17
|
+
* (paralela a `CH4-BIOGENIC`, que SÍ cuenta en el total con su PCG). Este VO es el único lugar
|
|
18
|
+
* que conoce esa convención: toda suma de inventario pregunta `isBiogenicCarbonDioxide`.
|
|
13
19
|
*/
|
|
14
20
|
class GreenhouseGasSpecies extends String_1.String {
|
|
15
21
|
constructor(value, skipDomainValidation) {
|
|
@@ -33,6 +39,16 @@ class GreenhouseGasSpecies extends String_1.String {
|
|
|
33
39
|
String_1.String.guardAgainstInvalidType(value, GreenhouseGasSpecies.PROPERTY_NAME);
|
|
34
40
|
return value.trim().replace(/\s+/g, ' ').toUpperCase();
|
|
35
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* True para la especie `CO2-BIOGENIC` (en cualquier casing/espaciado): CO₂ que NO cuenta en
|
|
44
|
+
* el total del inventario y se reporta como partida informativa.
|
|
45
|
+
*/
|
|
46
|
+
static isBiogenicCarbonDioxide(value) {
|
|
47
|
+
return GreenhouseGasSpecies.normalize(value) === GreenhouseGasSpecies.BIOGENIC_CARBON_DIOXIDE;
|
|
48
|
+
}
|
|
49
|
+
isBiogenicCarbonDioxide() {
|
|
50
|
+
return GreenhouseGasSpecies.isBiogenicCarbonDioxide(this.value);
|
|
51
|
+
}
|
|
36
52
|
static guardAgainstInvalidSpecies(value) {
|
|
37
53
|
String_1.String.guardAgainstEmptyValue(value, GreenhouseGasSpecies.PROPERTY_NAME);
|
|
38
54
|
if (!GreenhouseGasSpecies.SPECIES_REGEX.test(value)) {
|
|
@@ -45,6 +61,7 @@ class GreenhouseGasSpecies extends String_1.String {
|
|
|
45
61
|
}
|
|
46
62
|
exports.GreenhouseGasSpecies = GreenhouseGasSpecies;
|
|
47
63
|
GreenhouseGasSpecies.PROPERTY_NAME = 'greenhouseGasSpecies';
|
|
64
|
+
GreenhouseGasSpecies.BIOGENIC_CARBON_DIOXIDE = 'CO2-BIOGENIC';
|
|
48
65
|
// Letras, dígitos, espacio, guion y barra: cubre ASHRAE (R-410A) y químicos/mezclas
|
|
49
66
|
// (HFC-134A, MEZCLA HFC 365MFC/HFC 227EA, POLYCOLD 1102HC).
|
|
50
67
|
GreenhouseGasSpecies.SPECIES_REGEX = /^[A-Z0-9][A-Z0-9 /-]*$/;
|
package/build/main/index.js
CHANGED
|
@@ -15,14 +15,14 @@ exports.PurchaseOrderSubtotalAmount = exports.PurchaseOrderPaymentStatus = expor
|
|
|
15
15
|
exports.ServicePricingMinimumPrice = exports.ServicePricingCreatedByStakeholder = exports.ServicePricingBaseServiceReferenceCode = exports.ServicePricingCurrency = exports.ServicePricingPricePerUnit = exports.ServicePricingBasePrice = exports.ServicePricingPricingStatus = exports.ServicePricingPricingModel = exports.ServicePricingService = exports.ServicePricingId = exports.ServiceCatalogIncludesESGIndicators = exports.ServiceCatalogAdditionalUserRoles = exports.ServiceCatalogReportTypes = exports.ServiceCatalogExpertDedicationLevel = exports.ServiceCatalogFixedPriceAmount = exports.ServiceCatalogAllowsSectoralComparison = exports.ServiceCatalogIsAvailableForEvent = exports.ServiceCatalogIsAvailableForCorporate = exports.ServiceCatalogIsAvailableForProduct = exports.ServiceCatalogAllowsDocumentReading = exports.ServiceCatalogIncludesCarbonBoxAcademy = exports.ServiceCatalogMaxUsers = exports.ServiceCatalogHasFixedPrice = exports.ServiceCatalogBasePricePercentage = exports.ServiceCatalogHasBasePrice = exports.ServiceCatalogIsRequiredService = exports.ServiceCatalogCreatedByStakeholder = exports.ServiceCatalogDependsOnServiceCode = exports.ServiceCatalogStatus = exports.ServiceCatalogType = exports.ServiceCatalogCategory = exports.ServiceCatalogDescription = exports.ServiceCatalogName = exports.ServiceCatalogCode = exports.ServiceCatalogId = exports.PurchaseOrderActualDeliveryDate = exports.PurchaseOrderRejectionReason = exports.PurchaseOrderApprovedByStakeholder = exports.PurchaseOrderClientNotes = exports.PurchaseOrderInternalNotes = exports.PurchaseOrderExpectedDeliveryDate = exports.PurchaseOrderCurrency = exports.PurchaseOrderItems = exports.PurchaseOrderCarbonClientContactPhone = exports.PurchaseOrderCarbonClientContactEmail = exports.PurchaseOrderCarbonClientContactName = exports.PurchaseOrderCarbonClientLegalName = exports.PurchaseOrderCarbonClientCompanyName = exports.PurchaseOrderCreatedByStakeholder = exports.PurchaseOrderTotalAmount = void 0;
|
|
16
16
|
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.ServiceCatalogReportTypeEnum = 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.ServicePricingInternalNotes = exports.ServicePricingPricingNotes = exports.ServicePricingValidToDate = exports.ServicePricingValidFromDate = exports.ServicePricingPromotionalDiscountPercentage = exports.ServicePricingPromotionalEndDate = exports.ServicePricingPromotionalStartDate = exports.ServicePricingPromotionalPricing = exports.ServicePricingMaxDiscountPercentage = exports.ServicePricingAllowsDiscounts = exports.ServicePricingMaximumUnits = exports.ServicePricingMinimumUnits = exports.ServicePricingUsageUnit = exports.ServicePricingPercentageMarkup = exports.ServicePricingRequiresEmployeeTierPricing = exports.ServicePricingEmployeeTierConfigurations = exports.ServicePricingRequiresSectorPricing = exports.ServicePricingSectorPricingConfigurations = exports.ServicePricingMaximumPrice = void 0;
|
|
17
17
|
exports.InvalidPreparationAnswerError = exports.PreparationQuestionNotFoundError = exports.ReportTemplateCannotBeVersionedError = exports.ReportTemplateCannotBeDeprecatedError = exports.ReportTemplateCannotBeActivatedError = exports.ReportInstanceInvalidStatusTransitionError = exports.ReportInstanceCannotBeRejectedError = exports.ReportInstanceCannotBePublishedError = exports.ReportInstanceCannotBeApprovedByClientError = exports.ReportInstanceCannotBeApprovedInternallyError = exports.ReportInstanceCannotBeGeneratedError = exports.VerificationTypeEnum = exports.AssuranceLevelEnum = exports.ReportTypeEnum = exports.ReportStatusEnum = exports.QuestionnaireQuestionOriginEnum = exports.ClientInputFieldTypeEnum = exports.DataBindingSourceEnum = exports.BlockNatureEnum = exports.ReportPreparationQuestionnaireStatusEnum = exports.ReportTemplateStatusEnum = exports.ReportInstanceStatusEnum = exports.ReportAssurance = exports.ReportSection = exports.ReportPreparationQuestionnaireCompletion = exports.PreparationAnswer = exports.PreparationQuestion = exports.ReportPreparationQuestionnaireId = exports.TextBankId = exports.ReportTemplateId = exports.ReportInstanceId = exports.ReportPreparationQuestionnaire = exports.TextBank = exports.ReportTemplate = exports.ReportInstance = exports.InvalidUnitsError = exports.InvalidTaxPercentageError = exports.InvalidPricingStatusError = exports.InvalidPricingModelError = exports.InvalidPricePerUnitError = exports.InvalidMarkupPercentageError = exports.InvalidDiscountPercentageError = exports.InvalidUserRoleError = exports.InvalidServiceCatalogTypeError = exports.InvalidServiceCatalogStatusError = exports.InvalidServiceCatalogCategoryError = exports.InvalidReportTypeError = exports.InvalidExpertDedicationLevelError = exports.InvalidTotalAmountFactorError = exports.InvalidTaxAmountFactorError = void 0;
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.InvalidIdentityDocumentTypeError = exports.CarbonClientIdentityDocument = exports.CarbonCoordinatorIdentityDocument = exports.CarbonManagerIdentityDocument = exports.StakeholderIdentityDocument = exports.IdentityDocument = exports.IdentityDocumentTypeEnum = exports.CompanyServiceEntitlementValidTo = exports.CompanyServiceEntitlementValidFrom = exports.CompanyServiceEntitlementAdditionalUserRoles = exports.CompanyServiceEntitlementMaxUsers = exports.CompanyServiceEntitlementIsAvailableForEvent = exports.CompanyServiceEntitlementIsAvailableForProduct = exports.CompanyServiceEntitlementIsAvailableForCorporate = exports.CompanyServiceEntitlementIncludesEsgIndicators = exports.CompanyServiceEntitlementIncludesCarbonBoxAcademy = exports.CompanyServiceEntitlementAllowsSectoralComparison = exports.CompanyServiceEntitlementAllowsDocumentReading = exports.CompanyServiceEntitlementSourceContractIds = exports.CompanyServiceEntitlementActiveServiceCodes = exports.CompanyServiceEntitlementCarbonClientId = exports.CompanyServiceEntitlementId = exports.ServiceCapabilityPolicy = void 0;
|
|
18
|
+
exports.GenderEnum = exports.GHGSubScopeEnum = exports.GHGScopeEnum = exports.EmissionSourceEnum = exports.EmissionCategoryEnum = exports.DayOfWeekEnum = exports.CurrencyEnum = exports.CountryCodeEnum = exports.BusinessScaleEnum = exports.LocaleEnum = exports.UserBusinessStatusEnum = exports.UserTypeEnum = exports.ErrorCodeEnum = exports.CodedRootError = exports.RootError = exports.ObjectValueObject = exports.PrimitiveValueObject = exports.ValueObject = exports.User = exports.DomainError = exports.AggregateRoot = exports.ReportContentGenerationJobInvalidStatusTransitionError = exports.ReportContentGenerationJobCompletedAt = exports.ReportContentGenerationJobStartedAt = exports.ReportContentGenerationJobUpdatedAt = exports.ReportContentGenerationJobCreatedAt = exports.ReportContentGenerationJobFailureReason = exports.ReportContentGenerationJobAttemptCount = exports.ReportContentGenerationJobStatus = exports.ReportContentGenerationJobRequestedByStakeholderId = exports.ReportContentGenerationJobCarbonClientId = exports.ReportContentGenerationJobReportInstanceId = exports.ReportContentGenerationJobId = exports.ReportContentGenerationStatusEnum = exports.ReportContentGenerationJob = exports.InvalidReportTemplateIdError = exports.InvalidReportSectionTitleError = exports.InvalidReportSectionOrderError = exports.InvalidReportSectionIdError = exports.InvalidReportInstanceIdError = exports.InvalidReportAssuranceError = exports.InvalidReportBlockDataBindingError = exports.InvalidReportBlockClientInputError = exports.EmptyReportSectionBlocksError = exports.ReportPreparationQuestionnaireCannotBeReopenedError = exports.ReportPreparationQuestionnaireCannotBeCompletedError = exports.ReportPreparationQuestionnaireCannotBeModifiedError = exports.TemplateQuestionCannotBeRemovedError = exports.DuplicatePreparationQuestionError = exports.InvalidPreparationQuestionError = void 0;
|
|
19
|
+
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.BaseYear = exports.ExecutionPeriod = 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.GreenhouseGasCategoryEnum = void 0;
|
|
20
|
+
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 = 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.ActivityDataSubmissionRejectionReason = exports.ActivityDataSubmissionRejectedAt = exports.ActivityDataSubmissionApprovedAt = exports.ActivityDataSubmissionSubmittedAt = exports.ActivityDataSubmissionDataQualityNotes = exports.ActivityDataSubmissionUncertaintySource = exports.ActivityDataSubmissionOverallUncertaintyPercentage = exports.ActivityDataSubmissionReference = exports.EmissionSource = exports.EmissionSources = exports.CarbonClientReferences = exports.CarbonClientReference = exports.StakeholderReferences = exports.StakeholderReference = exports.UserPreferredLocale = exports.UserType = exports.UserLastAccessAt = exports.UserAvatar = void 0;
|
|
21
|
+
exports.InvalidDateFormatError = exports.ExternalServiceError = exports.DatabaseConnectionError = exports.JobAlreadyRunningError = exports.JobNotFoundError = exports.InvalidFormulaError = exports.MissingEmissionFactorError = exports.CalculationFailedError = exports.InvalidFieldTypeError = exports.MissingRequiredFieldsError = exports.SubmissionLockedError = exports.InvalidSubmissionError = exports.FormNotFoundError = exports.DuplicateOrderError = exports.OrderExceedsBudgetError = exports.ServiceCatalogNotFoundError = exports.ContractNotFoundError = exports.DuplicateConfigurationError = exports.ConfigurationLockedError = exports.ConfigurationNotFoundError = exports.ManagerRequiredError = exports.InsufficientPermissionsError = exports.InvalidRoleError = exports.InvalidBusinessStatusError = exports.StakeholderExistsError = exports.StakeholderNotFoundError = exports.EmailNotVerifiedError = exports.AccountLockedError = exports.MissingCredentialsError = exports.TokenInvalidError = exports.TokenExpiredError = exports.InvalidCredentialsError = 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.InvalidAggregatePrefixError = exports.InvalidAggregateIdFormatError = exports.InvalidPropertyValueError = exports.InvalidPropertyTypeError = void 0;
|
|
22
|
+
exports.EitherUtils = exports.ResultFactory = exports.EitherFactory = exports.RightEither = exports.LeftEither = exports.Either = exports.EventEditionLifecycleStageConfigurationEmissionSourceConfigurations = exports.ProductCarbonFootprintSegmentConfigurationEmissionSourceConfigurations = exports.EmissionSourceConfiguration = exports.CarbonFootprintSegmentConfigurationReference = 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.InvalidUserPreferredLocaleError = exports.InvalidUserBusinessStatusError = exports.InvalidUserTypeError = exports.DivisionByZeroError = exports.MoneyOverflowError = exports.NotIntegerError = exports.NegativeAmountError = exports.MaximumValueViolationError = exports.MinimumValueViolationError = exports.InvalidUrlListError = exports.InvalidCodeListError = exports.InvalidStringListError = exports.EmptyArrayNotAllowedError = exports.PasswordPolicyViolationError = exports.EmptyValueError = exports.InvalidTaxIdError = exports.InvalidPhoneNumberError = exports.InvalidNationalNumberError = exports.InvalidFullInternationalNumberError = exports.InvalidEmailPolicyError = exports.InvalidCoordinatesError = exports.InvalidTimeFormatError = exports.InvalidDateRangeError = void 0;
|
|
23
|
+
exports.CarbonCoordinatorBusinessStatus = exports.CarbonCoordinatorRoleType = exports.CarbonCoordinatorManagedCarbonClients = exports.CarbonCoordinatorWeeklyWorkingSchedule = exports.CarbonCoordinatorGender = exports.CarbonCoordinatorUserType = exports.CarbonCoordinatorAvailabilityStatus = exports.CarbonCoordinatorDisplayName = exports.CarbonCoordinatorEmail = exports.CarbonCoordinatorId = exports.CarbonClientPermissions = exports.CarbonClientPassword = 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 = 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.SwapOperationNotImplementedError = exports.FilterOperationNotImplementedError = exports.CannotAccessRightOnLeftValueError = exports.CannotAccessLeftOnRightValueError = exports.ResultExtensions = void 0;
|
|
24
|
+
exports.WorkflowActivatedDomainEvent = exports.CalculationWorkflowReferenceVO = exports.InvalidDomainEventNameError = exports.DomainEventName = exports.DomainEvent = exports.StakeholderPermissions = exports.UserPermissions = exports.UnsupportedUserTypeError = exports.UnsupportedStakeholderRoleError = exports.SecurityContextReconstructionError = exports.SecurityContext = exports.PermissionSet = exports.PermissionEnum = exports.AuthorizationDecisionEnum = exports.UncertaintyPropagationDomainService = exports.UserCreationDomainService = exports.AggregateIdDomainService = exports.DateTimeFormattingDomainService = exports.InvalidCarbonCoordinatorAvailabilityStatusError = exports.InvalidCarbonClientAccountTypeError = exports.CarbonCoordinatorAvailabilityStatusEnum = exports.CarbonClientAccountEnum = exports.CarbonManagerPermissions = exports.CarbonManagerPassword = 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.CarbonCoordinatorPermissions = exports.CarbonCoordinatorPassword = exports.CarbonCoordinatorReportsToStakeholder = exports.CarbonCoordinatorAssignedByStakeholder = exports.CarbonCoordinatorLastAccessAt = exports.CarbonCoordinatorTaxIdentification = void 0;
|
|
25
|
+
exports.InvalidIdentityDocumentTypeError = exports.CarbonClientIdentityDocument = exports.CarbonCoordinatorIdentityDocument = exports.CarbonManagerIdentityDocument = exports.StakeholderIdentityDocument = exports.IdentityDocument = exports.IdentityDocumentTypeEnum = exports.CompanyServiceEntitlementValidTo = exports.CompanyServiceEntitlementValidFrom = exports.CompanyServiceEntitlementAdditionalUserRoles = exports.CompanyServiceEntitlementMaxUsers = exports.CompanyServiceEntitlementIsAvailableForEvent = exports.CompanyServiceEntitlementIsAvailableForProduct = exports.CompanyServiceEntitlementIsAvailableForCorporate = exports.CompanyServiceEntitlementIncludesEsgIndicators = exports.CompanyServiceEntitlementIncludesCarbonBoxAcademy = exports.CompanyServiceEntitlementAllowsSectoralComparison = exports.CompanyServiceEntitlementAllowsDocumentReading = exports.CompanyServiceEntitlementSourceContractIds = exports.CompanyServiceEntitlementActiveServiceCodes = exports.CompanyServiceEntitlementCarbonClientId = exports.CompanyServiceEntitlementId = exports.ServiceCapabilityPolicy = exports.CompanyServiceEntitlement = exports.PurchaseContractServiceRemovedDomainEvent = exports.PurchaseContractServiceAddedDomainEvent = exports.PurchaseContractRenewedDomainEvent = exports.PurchaseContractExpiredDomainEvent = exports.PurchaseContractCancelledDomainEvent = exports.PurchaseContractSuspendedDomainEvent = exports.PurchaseContractActivatedDomainEvent = exports.CalculationProcessFailedDomainEvent = exports.CalculationProcessCompletedDomainEvent = exports.CalculationJobFailedDomainEvent = exports.CalculationJobCompletedDomainEvent = exports.CalculationJobStartedDomainEvent = exports.WorkflowPausedDomainEvent = void 0;
|
|
26
26
|
// ─── Entity Classes (For Application Layer) ─────────────────────────────────
|
|
27
27
|
var ActivityDataSubmission_1 = require("../carbonbox/activity-data-collection/activity-data-submissions/domain/entity/ActivityDataSubmission");
|
|
28
28
|
Object.defineProperty(exports, "ActivityDataSubmission", { enumerable: true, get: function () { return ActivityDataSubmission_1.ActivityDataSubmission; } });
|
|
@@ -1370,6 +1370,35 @@ var InvalidReportSectionTitleError_1 = require("../carbonbox/reporting/shared/do
|
|
|
1370
1370
|
Object.defineProperty(exports, "InvalidReportSectionTitleError", { enumerable: true, get: function () { return InvalidReportSectionTitleError_1.InvalidReportSectionTitleError; } });
|
|
1371
1371
|
var InvalidReportTemplateIdError_1 = require("../carbonbox/reporting/shared/domain/exceptions/InvalidReportTemplateIdError");
|
|
1372
1372
|
Object.defineProperty(exports, "InvalidReportTemplateIdError", { enumerable: true, get: function () { return InvalidReportTemplateIdError_1.InvalidReportTemplateIdError; } });
|
|
1373
|
+
// Report Content Generation Jobs (DT-83: asynchronous content generation)
|
|
1374
|
+
var ReportContentGenerationJob_1 = require("../carbonbox/reporting/report-content-generation-jobs/domain/entity/ReportContentGenerationJob");
|
|
1375
|
+
Object.defineProperty(exports, "ReportContentGenerationJob", { enumerable: true, get: function () { return ReportContentGenerationJob_1.ReportContentGenerationJob; } });
|
|
1376
|
+
var ReportContentGenerationStatus_1 = require("../carbonbox/reporting/report-content-generation-jobs/domain/enums/ReportContentGenerationStatus");
|
|
1377
|
+
Object.defineProperty(exports, "ReportContentGenerationStatusEnum", { enumerable: true, get: function () { return ReportContentGenerationStatus_1.ReportContentGenerationStatus; } });
|
|
1378
|
+
var ReportContentGenerationJobId_1 = require("../carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobId");
|
|
1379
|
+
Object.defineProperty(exports, "ReportContentGenerationJobId", { enumerable: true, get: function () { return ReportContentGenerationJobId_1.ReportContentGenerationJobId; } });
|
|
1380
|
+
var ReportContentGenerationJobReportInstanceId_1 = require("../carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobReportInstanceId");
|
|
1381
|
+
Object.defineProperty(exports, "ReportContentGenerationJobReportInstanceId", { enumerable: true, get: function () { return ReportContentGenerationJobReportInstanceId_1.ReportContentGenerationJobReportInstanceId; } });
|
|
1382
|
+
var ReportContentGenerationJobCarbonClientId_1 = require("../carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobCarbonClientId");
|
|
1383
|
+
Object.defineProperty(exports, "ReportContentGenerationJobCarbonClientId", { enumerable: true, get: function () { return ReportContentGenerationJobCarbonClientId_1.ReportContentGenerationJobCarbonClientId; } });
|
|
1384
|
+
var ReportContentGenerationJobRequestedByStakeholderId_1 = require("../carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobRequestedByStakeholderId");
|
|
1385
|
+
Object.defineProperty(exports, "ReportContentGenerationJobRequestedByStakeholderId", { enumerable: true, get: function () { return ReportContentGenerationJobRequestedByStakeholderId_1.ReportContentGenerationJobRequestedByStakeholderId; } });
|
|
1386
|
+
var ReportContentGenerationJobStatus_1 = require("../carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobStatus");
|
|
1387
|
+
Object.defineProperty(exports, "ReportContentGenerationJobStatus", { enumerable: true, get: function () { return ReportContentGenerationJobStatus_1.ReportContentGenerationJobStatus; } });
|
|
1388
|
+
var ReportContentGenerationJobAttemptCount_1 = require("../carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobAttemptCount");
|
|
1389
|
+
Object.defineProperty(exports, "ReportContentGenerationJobAttemptCount", { enumerable: true, get: function () { return ReportContentGenerationJobAttemptCount_1.ReportContentGenerationJobAttemptCount; } });
|
|
1390
|
+
var ReportContentGenerationJobFailureReason_1 = require("../carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobFailureReason");
|
|
1391
|
+
Object.defineProperty(exports, "ReportContentGenerationJobFailureReason", { enumerable: true, get: function () { return ReportContentGenerationJobFailureReason_1.ReportContentGenerationJobFailureReason; } });
|
|
1392
|
+
var ReportContentGenerationJobCreatedAt_1 = require("../carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobCreatedAt");
|
|
1393
|
+
Object.defineProperty(exports, "ReportContentGenerationJobCreatedAt", { enumerable: true, get: function () { return ReportContentGenerationJobCreatedAt_1.ReportContentGenerationJobCreatedAt; } });
|
|
1394
|
+
var ReportContentGenerationJobUpdatedAt_1 = require("../carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobUpdatedAt");
|
|
1395
|
+
Object.defineProperty(exports, "ReportContentGenerationJobUpdatedAt", { enumerable: true, get: function () { return ReportContentGenerationJobUpdatedAt_1.ReportContentGenerationJobUpdatedAt; } });
|
|
1396
|
+
var ReportContentGenerationJobStartedAt_1 = require("../carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobStartedAt");
|
|
1397
|
+
Object.defineProperty(exports, "ReportContentGenerationJobStartedAt", { enumerable: true, get: function () { return ReportContentGenerationJobStartedAt_1.ReportContentGenerationJobStartedAt; } });
|
|
1398
|
+
var ReportContentGenerationJobCompletedAt_1 = require("../carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobCompletedAt");
|
|
1399
|
+
Object.defineProperty(exports, "ReportContentGenerationJobCompletedAt", { enumerable: true, get: function () { return ReportContentGenerationJobCompletedAt_1.ReportContentGenerationJobCompletedAt; } });
|
|
1400
|
+
var ReportContentGenerationJobInvalidStatusTransitionError_1 = require("../carbonbox/reporting/report-content-generation-jobs/domain/exceptions/ReportContentGenerationJobInvalidStatusTransitionError");
|
|
1401
|
+
Object.defineProperty(exports, "ReportContentGenerationJobInvalidStatusTransitionError", { enumerable: true, get: function () { return ReportContentGenerationJobInvalidStatusTransitionError_1.ReportContentGenerationJobInvalidStatusTransitionError; } });
|
|
1373
1402
|
// =============================================================================
|
|
1374
1403
|
// SHARED DOMAIN MODULE EXPORTS (FOUNDATION LAYER)
|
|
1375
1404
|
// =============================================================================
|
|
@@ -24,5 +24,10 @@ export declare class GHGEmissionResult extends AggregateRoot<GHGEmissionResultPr
|
|
|
24
24
|
get rawEmission(): GHGEmissionResultRawEmission;
|
|
25
25
|
get co2Equivalent(): GHGEmissionResultCo2Equivalent;
|
|
26
26
|
get unit(): GHGEmissionResultUnit;
|
|
27
|
+
/**
|
|
28
|
+
* Si este resultado se suma al total del inventario. Falso solo para el CO₂ biogénico
|
|
29
|
+
* (`CO2-BIOGENIC`), que se reporta como partida informativa fuera de los alcances.
|
|
30
|
+
*/
|
|
31
|
+
countsTowardsInventoryTotal(): boolean;
|
|
27
32
|
}
|
|
28
33
|
//# sourceMappingURL=GHGEmissionResult.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GHGEmissionResult.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/ghg-emission-results/domain/entity/GHGEmissionResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,oCAAoC,EAAE,MAAM,uDAAuD,CAAC;AAC7G,OAAO,EAAE,+BAA+B,EAAE,MAAM,kDAAkD,CAAC;AACnG,OAAO,EAAE,uCAAuC,EAAE,MAAM,0DAA0D,CAAC;AACnH,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AAEjG,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,iBACX,SAAQ,aAAa,CAAC,2BAA2B,CACjD,YAAW,kBAAkB;;IAiB7B,OAAO;WAoCgB,MAAM,CAAC,KAAK,EAAE,sBAAsB,GAAG,iBAAiB;WAIxD,cAAc,CAAC,UAAU,EAAE,2BAA2B,GAAG,iBAAiB;IAiBjG,IAAoB,YAAY,IAAI,2BAA2B,CAa9D;IAED,IAAW,mBAAmB,IAAI,oCAAoC,CAErE;IAED,IAAW,aAAa,IAAI,8BAA8B,CAEzD;IAED,IAAW,aAAa,IAAI,8BAA8B,CAEzD;IAED,IAAW,cAAc,IAAI,+BAA+B,CAE3D;IAED,IAAW,sBAAsB,IAAI,uCAAuC,CAE3E;IAED,IAAW,WAAW,IAAI,4BAA4B,CAErD;IAED,IAAW,aAAa,IAAI,8BAA8B,CAEzD;IAED,IAAW,IAAI,IAAI,qBAAqB,CAEvC;
|
|
1
|
+
{"version":3,"file":"GHGEmissionResult.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/ghg-emission-results/domain/entity/GHGEmissionResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,oCAAoC,EAAE,MAAM,uDAAuD,CAAC;AAC7G,OAAO,EAAE,+BAA+B,EAAE,MAAM,kDAAkD,CAAC;AACnG,OAAO,EAAE,uCAAuC,EAAE,MAAM,0DAA0D,CAAC;AACnH,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AAEjG,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,iBACX,SAAQ,aAAa,CAAC,2BAA2B,CACjD,YAAW,kBAAkB;;IAiB7B,OAAO;WAoCgB,MAAM,CAAC,KAAK,EAAE,sBAAsB,GAAG,iBAAiB;WAIxD,cAAc,CAAC,UAAU,EAAE,2BAA2B,GAAG,iBAAiB;IAiBjG,IAAoB,YAAY,IAAI,2BAA2B,CAa9D;IAED,IAAW,mBAAmB,IAAI,oCAAoC,CAErE;IAED,IAAW,aAAa,IAAI,8BAA8B,CAEzD;IAED,IAAW,aAAa,IAAI,8BAA8B,CAEzD;IAED,IAAW,cAAc,IAAI,+BAA+B,CAE3D;IAED,IAAW,sBAAsB,IAAI,uCAAuC,CAE3E;IAED,IAAW,WAAW,IAAI,4BAA4B,CAErD;IAED,IAAW,aAAa,IAAI,8BAA8B,CAEzD;IAED,IAAW,IAAI,IAAI,qBAAqB,CAEvC;IAED;;;OAGG;IACI,2BAA2B,IAAI,OAAO;CAG9C"}
|
|
@@ -22,6 +22,14 @@ export declare class GHGEmissionResultGreenhouseGas extends ValueObject<GHGEmiss
|
|
|
22
22
|
isCO2(): boolean;
|
|
23
23
|
isMainGas(): boolean;
|
|
24
24
|
isFluorinatedGas(): boolean;
|
|
25
|
+
/** CO₂ de biomasa / biocombustibles (`CO2-BIOGENIC`): partida informativa fuera del total. */
|
|
26
|
+
isBiogenicCarbonDioxide(): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Si el resultado de este gas se suma al total del inventario y a sus alcances. Solo el CO₂
|
|
29
|
+
* biogénico queda fuera (GHG Protocol cap. 9 / ISO 14064-1 §9.3.1); el CH₄ y el N₂O de la
|
|
30
|
+
* misma combustión cuentan con su PCG.
|
|
31
|
+
*/
|
|
32
|
+
countsTowardsInventoryTotal(): boolean;
|
|
25
33
|
toPrimitives(): GHGEmissionResultGreenhouseGasPrimitives;
|
|
26
34
|
}
|
|
27
35
|
//# sourceMappingURL=GHGEmissionResultGreenhouseGas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GHGEmissionResultGreenhouseGas.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/ghg-emission-results/domain/value-objects/GHGEmissionResultGreenhouseGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAI9F,MAAM,MAAM,wCAAwC,GAAG;IACrD,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;GAIG;AACH,qBAAa,8BACX,SAAQ,WAAW,CAAC,wCAAwC,CAAC;IAC7D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAmB;IAExD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAIzC;IAEF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAM5C;IAEF,OAAO;WAcO,MAAM,CAAC,QAAQ,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,GAAG,8BAA8B;WAU/E,cAAc,CACnC,UAAU,EAAE,wCAAwC,GACnD,8BAA8B;IAIjC,OAAO,CAAC,MAAM,CAAC,2BAA2B;IAU1C,IAAW,QAAQ,IAAI,qBAAqB,CAE3C;IAED,IAAW,OAAO,IAAI,MAAM,CAE3B;IAEM,KAAK,IAAI,OAAO;IAIhB,SAAS,IAAI,OAAO;IAIpB,gBAAgB,IAAI,OAAO;
|
|
1
|
+
{"version":3,"file":"GHGEmissionResultGreenhouseGas.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/ghg-emission-results/domain/value-objects/GHGEmissionResultGreenhouseGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAI9F,MAAM,MAAM,wCAAwC,GAAG;IACrD,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;GAIG;AACH,qBAAa,8BACX,SAAQ,WAAW,CAAC,wCAAwC,CAAC;IAC7D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAmB;IAExD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAIzC;IAEF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAM5C;IAEF,OAAO;WAcO,MAAM,CAAC,QAAQ,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,GAAG,8BAA8B;WAU/E,cAAc,CACnC,UAAU,EAAE,wCAAwC,GACnD,8BAA8B;IAIjC,OAAO,CAAC,MAAM,CAAC,2BAA2B;IAU1C,IAAW,QAAQ,IAAI,qBAAqB,CAE3C;IAED,IAAW,OAAO,IAAI,MAAM,CAE3B;IAEM,KAAK,IAAI,OAAO;IAIhB,SAAS,IAAI,OAAO;IAIpB,gBAAgB,IAAI,OAAO;IAIlC,8FAA8F;IACvF,uBAAuB,IAAI,OAAO;IAIzC;;;;OAIG;IACI,2BAA2B,IAAI,OAAO;IAI7B,YAAY,IAAI,wCAAwC;CAMzE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IAggregateRoot } from '../../../../shared/domain/entities/IAggregateRoot';
|
|
2
|
+
import { ReportContentGenerationJobAttemptCount } from '../value-objects/ReportContentGenerationJobAttemptCount';
|
|
3
|
+
import { ReportContentGenerationJobCarbonClientId } from '../value-objects/ReportContentGenerationJobCarbonClientId';
|
|
4
|
+
import { ReportContentGenerationJobCompletedAt } from '../value-objects/ReportContentGenerationJobCompletedAt';
|
|
5
|
+
import { ReportContentGenerationJobCreatedAt } from '../value-objects/ReportContentGenerationJobCreatedAt';
|
|
6
|
+
import { ReportContentGenerationJobFailureReason } from '../value-objects/ReportContentGenerationJobFailureReason';
|
|
7
|
+
import { ReportContentGenerationJobReportInstanceId } from '../value-objects/ReportContentGenerationJobReportInstanceId';
|
|
8
|
+
import { ReportContentGenerationJobRequestedByStakeholderId } from '../value-objects/ReportContentGenerationJobRequestedByStakeholderId';
|
|
9
|
+
import { ReportContentGenerationJobStartedAt } from '../value-objects/ReportContentGenerationJobStartedAt';
|
|
10
|
+
import { ReportContentGenerationJobStatus } from '../value-objects/ReportContentGenerationJobStatus';
|
|
11
|
+
import { ReportContentGenerationJobUpdatedAt } from '../value-objects/ReportContentGenerationJobUpdatedAt';
|
|
12
|
+
export interface IReportContentGenerationJob extends IAggregateRoot {
|
|
13
|
+
reportInstanceId: ReportContentGenerationJobReportInstanceId;
|
|
14
|
+
carbonClientId: ReportContentGenerationJobCarbonClientId;
|
|
15
|
+
requestedByStakeholderId: ReportContentGenerationJobRequestedByStakeholderId;
|
|
16
|
+
status: ReportContentGenerationJobStatus;
|
|
17
|
+
attemptCount: ReportContentGenerationJobAttemptCount;
|
|
18
|
+
failureReason: ReportContentGenerationJobFailureReason;
|
|
19
|
+
createdAt: ReportContentGenerationJobCreatedAt;
|
|
20
|
+
updatedAt: ReportContentGenerationJobUpdatedAt;
|
|
21
|
+
startedAt: ReportContentGenerationJobStartedAt;
|
|
22
|
+
completedAt: ReportContentGenerationJobCompletedAt;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=IReportContentGenerationJob.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IReportContentGenerationJob.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-content-generation-jobs/domain/entity/IReportContentGenerationJob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AACnF,OAAO,EAAE,sCAAsC,EAAE,MAAM,yDAAyD,CAAC;AACjH,OAAO,EAAE,wCAAwC,EAAE,MAAM,2DAA2D,CAAC;AACrH,OAAO,EAAE,qCAAqC,EAAE,MAAM,wDAAwD,CAAC;AAC/G,OAAO,EAAE,mCAAmC,EAAE,MAAM,sDAAsD,CAAC;AAC3G,OAAO,EAAE,uCAAuC,EAAE,MAAM,0DAA0D,CAAC;AACnH,OAAO,EAAE,0CAA0C,EAAE,MAAM,6DAA6D,CAAC;AACzH,OAAO,EAAE,kDAAkD,EAAE,MAAM,qEAAqE,CAAC;AACzI,OAAO,EAAE,mCAAmC,EAAE,MAAM,sDAAsD,CAAC;AAC3G,OAAO,EAAE,gCAAgC,EAAE,MAAM,mDAAmD,CAAC;AACrG,OAAO,EAAE,mCAAmC,EAAE,MAAM,sDAAsD,CAAC;AAE3G,MAAM,WAAW,2BAA4B,SAAQ,cAAc;IACjE,gBAAgB,EAAE,0CAA0C,CAAC;IAC7D,cAAc,EAAE,wCAAwC,CAAC;IACzD,wBAAwB,EAAE,kDAAkD,CAAC;IAC7E,MAAM,EAAE,gCAAgC,CAAC;IACzC,YAAY,EAAE,sCAAsC,CAAC;IACrD,aAAa,EAAE,uCAAuC,CAAC;IACvD,SAAS,EAAE,mCAAmC,CAAC;IAC/C,SAAS,EAAE,mCAAmC,CAAC;IAC/C,SAAS,EAAE,mCAAmC,CAAC;IAC/C,WAAW,EAAE,qCAAqC,CAAC;CACpD"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { AggregateRoot } from '../../../../shared/domain/entities/AggregateRoot';
|
|
2
|
+
import { ReportContentGenerationJobPrimitives } from '../types/ReportContentGenerationJobPrimitives';
|
|
3
|
+
import { ReportContentGenerationJobProps } from '../types/ReportContentGenerationJobProps';
|
|
4
|
+
import { ReportContentGenerationJobAttemptCount } from '../value-objects/ReportContentGenerationJobAttemptCount';
|
|
5
|
+
import { ReportContentGenerationJobCarbonClientId } from '../value-objects/ReportContentGenerationJobCarbonClientId';
|
|
6
|
+
import { ReportContentGenerationJobCompletedAt } from '../value-objects/ReportContentGenerationJobCompletedAt';
|
|
7
|
+
import { ReportContentGenerationJobCreatedAt } from '../value-objects/ReportContentGenerationJobCreatedAt';
|
|
8
|
+
import { ReportContentGenerationJobFailureReason } from '../value-objects/ReportContentGenerationJobFailureReason';
|
|
9
|
+
import { ReportContentGenerationJobReportInstanceId } from '../value-objects/ReportContentGenerationJobReportInstanceId';
|
|
10
|
+
import { ReportContentGenerationJobRequestedByStakeholderId } from '../value-objects/ReportContentGenerationJobRequestedByStakeholderId';
|
|
11
|
+
import { ReportContentGenerationJobStartedAt } from '../value-objects/ReportContentGenerationJobStartedAt';
|
|
12
|
+
import { ReportContentGenerationJobStatus } from '../value-objects/ReportContentGenerationJobStatus';
|
|
13
|
+
import { ReportContentGenerationJobUpdatedAt } from '../value-objects/ReportContentGenerationJobUpdatedAt';
|
|
14
|
+
import { IReportContentGenerationJob } from './IReportContentGenerationJob';
|
|
15
|
+
/**
|
|
16
|
+
* Asynchronous report content generation job (DT-83).
|
|
17
|
+
*
|
|
18
|
+
* One job per generation request of a `ReportInstance`. The API enqueues it (QUEUED), the
|
|
19
|
+
* worker Lambda drives it (PROCESSING → COMPLETED | FAILED) and the web polls it. The
|
|
20
|
+
* `ReportInstance` keeps its own lifecycle (GENERATING → PENDING_INTERNAL, or back to DRAFT
|
|
21
|
+
* when the job fails); the job only records the attempt, its outcome and who asked for it.
|
|
22
|
+
*/
|
|
23
|
+
export declare class ReportContentGenerationJob extends AggregateRoot<ReportContentGenerationJobPrimitives> implements IReportContentGenerationJob {
|
|
24
|
+
#private;
|
|
25
|
+
private constructor();
|
|
26
|
+
static create(props: ReportContentGenerationJobProps): ReportContentGenerationJob;
|
|
27
|
+
static fromPrimitives(primitives: ReportContentGenerationJobPrimitives): ReportContentGenerationJob;
|
|
28
|
+
/**
|
|
29
|
+
* Transitions the job to PROCESSING and counts the attempt. Allowed from QUEUED (first
|
|
30
|
+
* delivery) and from PROCESSING (redelivery after a crash or timeout of the worker), so
|
|
31
|
+
* the worker can decide from `attemptCount` whether to resume or give up. Records
|
|
32
|
+
* `startedAt` on the first attempt only. Invalid from COMPLETED/FAILED.
|
|
33
|
+
*/
|
|
34
|
+
markProcessing(nowDateTime: string): void;
|
|
35
|
+
/** Transitions the job to COMPLETED. Allowed only from PROCESSING. Sets `completedAt`. */
|
|
36
|
+
markCompleted(nowDateTime: string): void;
|
|
37
|
+
/**
|
|
38
|
+
* Transitions the job to FAILED with the reason shown to the requester. Allowed from
|
|
39
|
+
* QUEUED (the queue rejected the message) or PROCESSING. Sets `completedAt`.
|
|
40
|
+
*/
|
|
41
|
+
markFailed(failureReason: string, nowDateTime: string): void;
|
|
42
|
+
isActive(): boolean;
|
|
43
|
+
hasReachedAttemptLimit(maxAttempts: number): boolean;
|
|
44
|
+
get toPrimitives(): ReportContentGenerationJobPrimitives;
|
|
45
|
+
get reportInstanceId(): ReportContentGenerationJobReportInstanceId;
|
|
46
|
+
get carbonClientId(): ReportContentGenerationJobCarbonClientId;
|
|
47
|
+
get requestedByStakeholderId(): ReportContentGenerationJobRequestedByStakeholderId;
|
|
48
|
+
get status(): ReportContentGenerationJobStatus;
|
|
49
|
+
get attemptCount(): ReportContentGenerationJobAttemptCount;
|
|
50
|
+
get failureReason(): ReportContentGenerationJobFailureReason;
|
|
51
|
+
get createdAt(): ReportContentGenerationJobCreatedAt;
|
|
52
|
+
get updatedAt(): ReportContentGenerationJobUpdatedAt;
|
|
53
|
+
get startedAt(): ReportContentGenerationJobStartedAt;
|
|
54
|
+
get completedAt(): ReportContentGenerationJobCompletedAt;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=ReportContentGenerationJob.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportContentGenerationJob.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-content-generation-jobs/domain/entity/ReportContentGenerationJob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AAGjF,OAAO,EAAE,oCAAoC,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAC;AAC3F,OAAO,EAAE,sCAAsC,EAAE,MAAM,yDAAyD,CAAC;AACjH,OAAO,EAAE,wCAAwC,EAAE,MAAM,2DAA2D,CAAC;AACrH,OAAO,EAAE,qCAAqC,EAAE,MAAM,wDAAwD,CAAC;AAC/G,OAAO,EAAE,mCAAmC,EAAE,MAAM,sDAAsD,CAAC;AAC3G,OAAO,EAAE,uCAAuC,EAAE,MAAM,0DAA0D,CAAC;AAEnH,OAAO,EAAE,0CAA0C,EAAE,MAAM,6DAA6D,CAAC;AACzH,OAAO,EAAE,kDAAkD,EAAE,MAAM,qEAAqE,CAAC;AACzI,OAAO,EAAE,mCAAmC,EAAE,MAAM,sDAAsD,CAAC;AAC3G,OAAO,EAAE,gCAAgC,EAAE,MAAM,mDAAmD,CAAC;AACrG,OAAO,EAAE,mCAAmC,EAAE,MAAM,sDAAsD,CAAC;AAC3G,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E;;;;;;;GAOG;AACH,qBAAa,0BACX,SAAQ,aAAa,CAAC,oCAAoC,CAC1D,YAAW,2BAA2B;;IAqBtC,OAAO;WAgCgB,MAAM,CAAC,KAAK,EAAE,+BAA+B,GAAG,0BAA0B;WAI1E,cAAc,CAAC,UAAU,EAAE,oCAAoC,GAAG,0BAA0B;IAInH;;;;;OAKG;IACI,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAiBhD,0FAA0F;IACnF,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAe/C;;;OAGG;IACI,UAAU,CAAC,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI;IAe5D,QAAQ,IAAI,OAAO;IAInB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IAI3D,IAAoB,YAAY,IAAI,oCAAoC,CAcvE;IAED,IAAW,gBAAgB,IAAI,0CAA0C,CAAmC;IAE5G,IAAW,cAAc,IAAI,wCAAwC,CAAiC;IAEtG,IAAW,wBAAwB,IAAI,kDAAkD,CAA2C;IAEpI,IAAW,MAAM,IAAI,gCAAgC,CAAyB;IAE9E,IAAW,YAAY,IAAI,sCAAsC,CAA+B;IAEhG,IAAW,aAAa,IAAI,uCAAuC,CAAgC;IAEnG,IAAW,SAAS,IAAI,mCAAmC,CAA4B;IAEvF,IAAW,SAAS,IAAI,mCAAmC,CAA4B;IAEvF,IAAW,SAAS,IAAI,mCAAmC,CAA4B;IAEvF,IAAW,WAAW,IAAI,qCAAqC,CAA8B;CAC9F"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lifecycle of an asynchronous report content generation job (DT-83).
|
|
3
|
+
* Mirrors `BulkImportStatus`: QUEUED → PROCESSING → COMPLETED | FAILED.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ReportContentGenerationStatus {
|
|
6
|
+
QUEUED = "QUEUED",
|
|
7
|
+
PROCESSING = "PROCESSING",
|
|
8
|
+
COMPLETED = "COMPLETED",
|
|
9
|
+
FAILED = "FAILED"
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=ReportContentGenerationStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportContentGenerationStatus.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-content-generation-jobs/domain/enums/ReportContentGenerationStatus.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,6BAA6B;IACvC,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CodedRootError } from '../../../../shared/domain/exceptions/CodedRootError';
|
|
2
|
+
export declare class ReportContentGenerationJobInvalidStatusTransitionError extends CodedRootError {
|
|
3
|
+
private constructor();
|
|
4
|
+
static create(jobId: string, currentStatus: string, targetStatus: string): ReportContentGenerationJobInvalidStatusTransitionError;
|
|
5
|
+
logError(): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ReportContentGenerationJobInvalidStatusTransitionError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportContentGenerationJobInvalidStatusTransitionError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-content-generation-jobs/domain/exceptions/ReportContentGenerationJobInvalidStatusTransitionError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AAGrF,qBAAa,sDAAuD,SAAQ,cAAc;IACxF,OAAO;WAqBgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,sDAAsD;IAIjI,QAAQ,IAAI,MAAM;CAGnC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Nullable } from '../../../../shared/domain/types/Nullable';
|
|
2
|
+
import { ReportContentGenerationJob } from '../entity/ReportContentGenerationJob';
|
|
3
|
+
import { ReportContentGenerationJobId } from '../value-objects/ReportContentGenerationJobId';
|
|
4
|
+
import { ReportContentGenerationJobReportInstanceId } from '../value-objects/ReportContentGenerationJobReportInstanceId';
|
|
5
|
+
/**
|
|
6
|
+
* Repository contract for the ReportContentGenerationJob aggregate (DT-83).
|
|
7
|
+
*/
|
|
8
|
+
export interface IReportContentGenerationJobRepository {
|
|
9
|
+
/** Persists a job (create or update). */
|
|
10
|
+
save(job: ReportContentGenerationJob): Promise<void>;
|
|
11
|
+
/** Finds a job by its id, or null. */
|
|
12
|
+
findById(id: ReportContentGenerationJobId): Promise<Nullable<ReportContentGenerationJob>>;
|
|
13
|
+
/** Every job requested for a report instance, newest first. */
|
|
14
|
+
findAllByReportInstanceId(reportInstanceId: ReportContentGenerationJobReportInstanceId): Promise<ReportContentGenerationJob[]>;
|
|
15
|
+
/** The job still QUEUED or PROCESSING for a report instance, or null when none is running. */
|
|
16
|
+
findActiveByReportInstanceId(reportInstanceId: ReportContentGenerationJobReportInstanceId): Promise<Nullable<ReportContentGenerationJob>>;
|
|
17
|
+
/** The most recently created job for a report instance, whatever its status, or null. */
|
|
18
|
+
findLatestByReportInstanceId(reportInstanceId: ReportContentGenerationJobReportInstanceId): Promise<Nullable<ReportContentGenerationJob>>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=IReportContentGenerationJobRepository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IReportContentGenerationJobRepository.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-content-generation-jobs/domain/repository/IReportContentGenerationJobRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,0CAA0C,EAAE,MAAM,6DAA6D,CAAC;AAEzH;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACpD,yCAAyC;IACzC,IAAI,CAAC,GAAG,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErD,sCAAsC;IACtC,QAAQ,CAAC,EAAE,EAAE,4BAA4B,GAAG,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAC,CAAC,CAAC;IAE1F,+DAA+D;IAC/D,yBAAyB,CAAC,gBAAgB,EAAE,0CAA0C,GAAG,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC;IAE/H,8FAA8F;IAC9F,4BAA4B,CAAC,gBAAgB,EAAE,0CAA0C,GAAG,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAC,CAAC,CAAC;IAE1I,yFAAyF;IACzF,4BAA4B,CAAC,gBAAgB,EAAE,0CAA0C,GAAG,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAC,CAAC,CAAC;CAC3I"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AggregateRootPrimitives } from '../../../../shared/domain/types/AggregateRootPrimitives';
|
|
2
|
+
import { ReportContentGenerationStatus } from '../enums/ReportContentGenerationStatus';
|
|
3
|
+
/**
|
|
4
|
+
* Persisted shape of an asynchronous report content generation job (DT-83).
|
|
5
|
+
* Timestamps use the domain datetime format (`DD/MM/YYYY HH:mm:ss`).
|
|
6
|
+
*/
|
|
7
|
+
export type ReportContentGenerationJobPrimitives = AggregateRootPrimitives & {
|
|
8
|
+
reportInstanceId: string;
|
|
9
|
+
carbonClientId: string;
|
|
10
|
+
requestedByStakeholderId: string;
|
|
11
|
+
status: ReportContentGenerationStatus;
|
|
12
|
+
attemptCount: number;
|
|
13
|
+
failureReason: string | null;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
startedAt: string | null;
|
|
17
|
+
completedAt: string | null;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=ReportContentGenerationJobPrimitives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportContentGenerationJobPrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-content-generation-jobs/domain/types/ReportContentGenerationJobPrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAEvF;;;GAGG;AACH,MAAM,MAAM,oCAAoC,GAAG,uBAAuB,GAAG;IAC3E,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,wBAAwB,EAAE,MAAM,CAAC;IACjC,MAAM,EAAE,6BAA6B,CAAC;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AggregateRootProps } from '../../../../shared/domain/types/AggregateRootProps';
|
|
2
|
+
import { ReportContentGenerationStatus } from '../enums/ReportContentGenerationStatus';
|
|
3
|
+
export type ReportContentGenerationJobProps = AggregateRootProps & {
|
|
4
|
+
reportInstanceId: string;
|
|
5
|
+
carbonClientId: string;
|
|
6
|
+
requestedByStakeholderId: string;
|
|
7
|
+
status: ReportContentGenerationStatus;
|
|
8
|
+
attemptCount: number;
|
|
9
|
+
failureReason: string | null;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
updatedAt: string;
|
|
12
|
+
startedAt: string | null;
|
|
13
|
+
completedAt: string | null;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=ReportContentGenerationJobProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportContentGenerationJobProps.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-content-generation-jobs/domain/types/ReportContentGenerationJobProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAEvF,MAAM,MAAM,+BAA+B,GAAG,kBAAkB,GAAG;IACjE,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,wBAAwB,EAAE,MAAM,CAAC;IACjC,MAAM,EAAE,6BAA6B,CAAC;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Numeric } from '../../../../shared/domain/value-objects/Numeric';
|
|
2
|
+
export declare class ReportContentGenerationJobAttemptCount extends Numeric {
|
|
3
|
+
private static readonly PROPERTY_NAME;
|
|
4
|
+
private constructor();
|
|
5
|
+
static create(value: number): ReportContentGenerationJobAttemptCount;
|
|
6
|
+
static fromPrimitives(primitive: number): ReportContentGenerationJobAttemptCount;
|
|
7
|
+
increment(): ReportContentGenerationJobAttemptCount;
|
|
8
|
+
toPrimitives(): number;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ReportContentGenerationJobAttemptCount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportContentGenerationJobAttemptCount.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobAttemptCount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iDAAiD,CAAC;AAE1E,qBAAa,sCAAuC,SAAQ,OAAO;IACjE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAkB;IAEvD,OAAO;WAgBgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,sCAAsC;WAI7D,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,sCAAsC;IAIzF,SAAS,IAAI,sCAAsC;IAI1C,YAAY,IAAI,MAAM;CAGvC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AggregateId } from '../../../../shared/domain/value-objects/AggregateId';
|
|
2
|
+
export declare class ReportContentGenerationJobCarbonClientId extends AggregateId {
|
|
3
|
+
private static readonly PROPERTY_NAME;
|
|
4
|
+
private constructor();
|
|
5
|
+
static create(value: string): ReportContentGenerationJobCarbonClientId;
|
|
6
|
+
static fromPrimitives(primitive: string): ReportContentGenerationJobCarbonClientId;
|
|
7
|
+
toPrimitives(): string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ReportContentGenerationJobCarbonClientId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportContentGenerationJobCarbonClientId.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobCarbonClientId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAElF,qBAAa,wCAAyC,SAAQ,WAAW;IACvE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAoB;IAEzD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,wCAAwC;WAQ/D,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,wCAAwC;IAIlF,YAAY,IAAI,MAAM;CAGvC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NullableDateTimeString } from '../../../../shared/domain/value-objects/NullableDateTimeString';
|
|
2
|
+
export declare class ReportContentGenerationJobCompletedAt extends NullableDateTimeString {
|
|
3
|
+
private static readonly PROPERTY_NAME;
|
|
4
|
+
private constructor();
|
|
5
|
+
static create(value: string | null): ReportContentGenerationJobCompletedAt;
|
|
6
|
+
static fromPrimitives(primitive: string | null): ReportContentGenerationJobCompletedAt;
|
|
7
|
+
toPrimitives(): string | null;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ReportContentGenerationJobCompletedAt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportContentGenerationJobCompletedAt.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobCompletedAt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gEAAgE,CAAC;AAExG,qBAAa,qCAAsC,SAAQ,sBAAsB;IAC/E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAiB;IAEtD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,qCAAqC;WAInE,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,qCAAqC;IAItF,YAAY,IAAI,MAAM,GAAG,IAAI;CAG9C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DateTimeString } from '../../../../shared/domain/value-objects/DateTimeString';
|
|
2
|
+
export declare class ReportContentGenerationJobCreatedAt extends DateTimeString {
|
|
3
|
+
private static readonly PROPERTY_NAME;
|
|
4
|
+
private constructor();
|
|
5
|
+
static create(value: string): ReportContentGenerationJobCreatedAt;
|
|
6
|
+
static fromPrimitives(primitive: string): ReportContentGenerationJobCreatedAt;
|
|
7
|
+
toPrimitives(): string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ReportContentGenerationJobCreatedAt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportContentGenerationJobCreatedAt.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobCreatedAt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AAExF,qBAAa,mCAAoC,SAAQ,cAAc;IACrE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAe;IAEpD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,mCAAmC;WAI1D,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,mCAAmC;IAI7E,YAAY,IAAI,MAAM;CAGvC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NullableString } from '../../../../shared/domain/value-objects/NullableString';
|
|
2
|
+
export declare class ReportContentGenerationJobFailureReason extends NullableString {
|
|
3
|
+
private static readonly PROPERTY_NAME;
|
|
4
|
+
private constructor();
|
|
5
|
+
static create(value: string | null): ReportContentGenerationJobFailureReason;
|
|
6
|
+
static fromPrimitives(primitive: string | null): ReportContentGenerationJobFailureReason;
|
|
7
|
+
toPrimitives(): string | null;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ReportContentGenerationJobFailureReason.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportContentGenerationJobFailureReason.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobFailureReason.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AAExF,qBAAa,uCAAwC,SAAQ,cAAc;IACzE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAmB;IAExD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,uCAAuC;WAIrE,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,uCAAuC;IAIxF,YAAY,IAAI,MAAM,GAAG,IAAI;CAG9C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AggregateId } from '../../../../shared/domain/value-objects/AggregateId';
|
|
2
|
+
export declare class ReportContentGenerationJobId extends AggregateId {
|
|
3
|
+
private static readonly PROPERTY_NAME;
|
|
4
|
+
private static readonly VALID_PREFIXES;
|
|
5
|
+
private constructor();
|
|
6
|
+
static create(value: string): ReportContentGenerationJobId;
|
|
7
|
+
private static guardAgainstInvalidPrefix;
|
|
8
|
+
static fromPrimitives(primitive: string): ReportContentGenerationJobId;
|
|
9
|
+
toPrimitives(): string;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=ReportContentGenerationJobId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportContentGenerationJobId.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAIlF,qBAAa,4BAA6B,SAAQ,WAAW;IAC3D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAQ;IAE7C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAEpC;IAEF,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,4BAA4B;IAU1E,OAAO,CAAC,MAAM,CAAC,yBAAyB;WA4BjB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,4BAA4B;IAItE,YAAY,IAAI,MAAM;CAGvC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AggregateId } from '../../../../shared/domain/value-objects/AggregateId';
|
|
2
|
+
export declare class ReportContentGenerationJobReportInstanceId extends AggregateId {
|
|
3
|
+
private static readonly PROPERTY_NAME;
|
|
4
|
+
private constructor();
|
|
5
|
+
static create(value: string): ReportContentGenerationJobReportInstanceId;
|
|
6
|
+
static fromPrimitives(primitive: string): ReportContentGenerationJobReportInstanceId;
|
|
7
|
+
toPrimitives(): string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ReportContentGenerationJobReportInstanceId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportContentGenerationJobReportInstanceId.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobReportInstanceId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAElF,qBAAa,0CAA2C,SAAQ,WAAW;IACzE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAsB;IAE3D,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,0CAA0C;WAQjE,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,0CAA0C;IAIpF,YAAY,IAAI,MAAM;CAGvC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AggregateId } from '../../../../shared/domain/value-objects/AggregateId';
|
|
2
|
+
export declare class ReportContentGenerationJobRequestedByStakeholderId extends AggregateId {
|
|
3
|
+
private static readonly PROPERTY_NAME;
|
|
4
|
+
private constructor();
|
|
5
|
+
static create(value: string): ReportContentGenerationJobRequestedByStakeholderId;
|
|
6
|
+
static fromPrimitives(primitive: string): ReportContentGenerationJobRequestedByStakeholderId;
|
|
7
|
+
toPrimitives(): string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ReportContentGenerationJobRequestedByStakeholderId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportContentGenerationJobRequestedByStakeholderId.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobRequestedByStakeholderId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAElF,qBAAa,kDAAmD,SAAQ,WAAW;IACjF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAA8B;IAEnE,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,kDAAkD;WAQzE,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,kDAAkD;IAI5F,YAAY,IAAI,MAAM;CAGvC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NullableDateTimeString } from '../../../../shared/domain/value-objects/NullableDateTimeString';
|
|
2
|
+
export declare class ReportContentGenerationJobStartedAt extends NullableDateTimeString {
|
|
3
|
+
private static readonly PROPERTY_NAME;
|
|
4
|
+
private constructor();
|
|
5
|
+
static create(value: string | null): ReportContentGenerationJobStartedAt;
|
|
6
|
+
static fromPrimitives(primitive: string | null): ReportContentGenerationJobStartedAt;
|
|
7
|
+
toPrimitives(): string | null;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ReportContentGenerationJobStartedAt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportContentGenerationJobStartedAt.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-content-generation-jobs/domain/value-objects/ReportContentGenerationJobStartedAt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gEAAgE,CAAC;AAExG,qBAAa,mCAAoC,SAAQ,sBAAsB;IAC7E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAe;IAEpD,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,mCAAmC;WAIjE,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,mCAAmC;IAIpF,YAAY,IAAI,MAAM,GAAG,IAAI;CAG9C"}
|