@carbonbox/domain 0.31.0 → 0.32.1
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/reporting/report-instances/domain/entity/IReportInstance.js +2 -0
- package/build/carbonbox/reporting/report-instances/domain/entity/ReportInstance.js +371 -0
- package/build/carbonbox/reporting/report-instances/domain/enums/ReportInstanceStatus.js +38 -0
- package/build/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeApprovedByClientError.js +32 -0
- package/build/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeApprovedInternallyError.js +32 -0
- package/build/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeGeneratedError.js +32 -0
- package/build/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBePublishedError.js +32 -0
- package/build/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeRejectedError.js +32 -0
- package/build/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceInvalidStatusTransitionError.js +32 -0
- package/build/carbonbox/reporting/report-instances/domain/repository/IReportInstanceRepository.js +2 -0
- package/build/carbonbox/reporting/report-instances/domain/types/ReportInstancePrimitives.js +2 -0
- package/build/carbonbox/reporting/report-instances/domain/types/ReportInstanceProps.js +2 -0
- package/build/carbonbox/reporting/report-templates/domain/entity/IReportTemplate.js +2 -0
- package/build/carbonbox/reporting/report-templates/domain/entity/ReportTemplate.js +275 -0
- package/build/carbonbox/reporting/report-templates/domain/exceptions/ReportTemplateCannotBeActivatedError.js +32 -0
- package/build/carbonbox/reporting/report-templates/domain/exceptions/ReportTemplateCannotBeDeprecatedError.js +32 -0
- package/build/carbonbox/reporting/report-templates/domain/exceptions/ReportTemplateCannotBeVersionedError.js +32 -0
- package/build/carbonbox/reporting/report-templates/domain/repository/IReportTemplateRepository.js +2 -0
- package/build/carbonbox/reporting/shared/domain/types/AIExecutionRecordPrimitives.js +2 -0
- package/build/carbonbox/reporting/shared/domain/types/ApprovalRecordPrimitives.js +2 -0
- package/build/carbonbox/reporting/shared/domain/types/QuestionnaireAnswerPrimitives.js +2 -0
- package/build/carbonbox/reporting/shared/domain/types/ReportPeriodPrimitives.js +2 -0
- package/build/carbonbox/reporting/text-banks/domain/entity/ITextBank.js +2 -0
- package/build/carbonbox/reporting/text-banks/domain/entity/TextBank.js +173 -0
- package/build/carbonbox/reporting/text-banks/domain/repository/ITextBankRepository.js +2 -0
- package/build/carbonbox/reporting/text-banks/domain/types/TextBankEntryPrimitives.js +2 -0
- package/build/carbonbox/reporting/text-banks/domain/types/TextBankEntryProps.js +2 -0
- package/build/carbonbox/reporting/text-banks/domain/types/TextBankPrimitives.js +2 -0
- package/build/carbonbox/reporting/text-banks/domain/types/TextBankProps.js +2 -0
- package/build/carbonbox/shared/domain/enums/ErrorCode.js +11 -0
- package/build/main/index.js +75 -8
- package/build/types/carbonbox/reporting/report-instances/domain/entity/IReportInstance.d.ts +36 -0
- package/build/types/carbonbox/reporting/report-instances/domain/entity/IReportInstance.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-instances/domain/entity/ReportInstance.d.ts +59 -0
- package/build/types/carbonbox/reporting/report-instances/domain/entity/ReportInstance.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-instances/domain/enums/ReportInstanceStatus.d.ts +35 -0
- package/build/types/carbonbox/reporting/report-instances/domain/enums/ReportInstanceStatus.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeApprovedByClientError.d.ts +7 -0
- package/build/types/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeApprovedByClientError.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeApprovedInternallyError.d.ts +7 -0
- package/build/types/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeApprovedInternallyError.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeGeneratedError.d.ts +7 -0
- package/build/types/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeGeneratedError.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBePublishedError.d.ts +7 -0
- package/build/types/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBePublishedError.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeRejectedError.d.ts +7 -0
- package/build/types/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeRejectedError.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceInvalidStatusTransitionError.d.ts +7 -0
- package/build/types/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceInvalidStatusTransitionError.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-instances/domain/repository/IReportInstanceRepository.d.ts +84 -0
- package/build/types/carbonbox/reporting/report-instances/domain/repository/IReportInstanceRepository.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-instances/domain/types/ReportInstancePrimitives.d.ts +28 -0
- package/build/types/carbonbox/reporting/report-instances/domain/types/ReportInstancePrimitives.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-instances/domain/types/ReportInstanceProps.d.ts +28 -0
- package/build/types/carbonbox/reporting/report-instances/domain/types/ReportInstanceProps.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-templates/domain/entity/IReportTemplate.d.ts +24 -0
- package/build/types/carbonbox/reporting/report-templates/domain/entity/IReportTemplate.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-templates/domain/entity/ReportTemplate.d.ts +43 -0
- package/build/types/carbonbox/reporting/report-templates/domain/entity/ReportTemplate.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-templates/domain/exceptions/ReportTemplateCannotBeActivatedError.d.ts +7 -0
- package/build/types/carbonbox/reporting/report-templates/domain/exceptions/ReportTemplateCannotBeActivatedError.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-templates/domain/exceptions/ReportTemplateCannotBeDeprecatedError.d.ts +7 -0
- package/build/types/carbonbox/reporting/report-templates/domain/exceptions/ReportTemplateCannotBeDeprecatedError.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-templates/domain/exceptions/ReportTemplateCannotBeVersionedError.d.ts +7 -0
- package/build/types/carbonbox/reporting/report-templates/domain/exceptions/ReportTemplateCannotBeVersionedError.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-templates/domain/repository/IReportTemplateRepository.d.ts +97 -0
- package/build/types/carbonbox/reporting/report-templates/domain/repository/IReportTemplateRepository.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-templates/domain/types/ReportTemplatePrimitives.d.ts +15 -15
- package/build/types/carbonbox/reporting/report-templates/domain/types/ReportTemplatePrimitives.d.ts.map +1 -1
- package/build/types/carbonbox/reporting/report-templates/domain/types/ReportTemplateProps.d.ts +20 -16
- package/build/types/carbonbox/reporting/report-templates/domain/types/ReportTemplateProps.d.ts.map +1 -1
- package/build/types/carbonbox/reporting/shared/domain/types/AIExecutionRecordPrimitives.d.ts +14 -0
- package/build/types/carbonbox/reporting/shared/domain/types/AIExecutionRecordPrimitives.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/types/ApprovalRecordPrimitives.d.ts +12 -0
- package/build/types/carbonbox/reporting/shared/domain/types/ApprovalRecordPrimitives.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/types/QuestionnaireAnswerPrimitives.d.ts +11 -0
- package/build/types/carbonbox/reporting/shared/domain/types/QuestionnaireAnswerPrimitives.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/types/ReportPeriodPrimitives.d.ts +9 -0
- package/build/types/carbonbox/reporting/shared/domain/types/ReportPeriodPrimitives.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/text-banks/domain/entity/ITextBank.d.ts +16 -0
- package/build/types/carbonbox/reporting/text-banks/domain/entity/ITextBank.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/text-banks/domain/entity/TextBank.d.ts +36 -0
- package/build/types/carbonbox/reporting/text-banks/domain/entity/TextBank.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/text-banks/domain/repository/ITextBankRepository.d.ts +52 -0
- package/build/types/carbonbox/reporting/text-banks/domain/repository/ITextBankRepository.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/text-banks/domain/types/TextBankEntryPrimitives.d.ts +45 -0
- package/build/types/carbonbox/reporting/text-banks/domain/types/TextBankEntryPrimitives.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/text-banks/domain/types/TextBankEntryProps.d.ts +46 -0
- package/build/types/carbonbox/reporting/text-banks/domain/types/TextBankEntryProps.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/text-banks/domain/types/TextBankPrimitives.d.ts +33 -0
- package/build/types/carbonbox/reporting/text-banks/domain/types/TextBankPrimitives.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/text-banks/domain/types/TextBankProps.d.ts +37 -0
- package/build/types/carbonbox/reporting/text-banks/domain/types/TextBankProps.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/enums/ErrorCode.d.ts +11 -0
- package/build/types/carbonbox/shared/domain/enums/ErrorCode.d.ts.map +1 -1
- package/build/types/main/index.d.ts +48 -0
- package/build/types/main/index.d.ts.map +1 -1
- package/package.json +1 -1
package/build/main/index.js
CHANGED
|
@@ -14,14 +14,14 @@ exports.PurchaseContractTitle = exports.PurchaseContractCode = exports.PurchaseC
|
|
|
14
14
|
exports.PurchaseOrderItems = exports.PurchaseOrderCarbonClientContactPhone = exports.PurchaseOrderCarbonClientContactEmail = exports.PurchaseOrderCarbonClientContactName = exports.PurchaseOrderCarbonClientLegalName = exports.PurchaseOrderCarbonClientCompanyName = exports.PurchaseOrderCreatedByStakeholder = exports.PurchaseOrderTotalAmount = exports.PurchaseOrderSubtotalAmount = exports.PurchaseOrderPaymentStatus = exports.PurchaseOrderPaymentMethod = exports.PurchaseOrderDate = exports.PurchaseOrderCarbonClientId = exports.PurchaseOrderStatus = exports.PurchaseOrderCode = exports.PurchaseOrderId = exports.PurchaseContractCarbonClientSignedBy = exports.PurchaseContractCarbonClientSignedAt = exports.PurchaseContractCarbonBoxSignedBy = exports.PurchaseContractCarbonBoxSignedAt = exports.PurchaseContractInternalNotes = exports.PurchaseContractAttachments = exports.PurchaseContractSpecialTerms = exports.PurchaseContractTerminationClause = exports.PurchaseContractDataProtectionClause = exports.PurchaseContractConfidentialityClause = exports.PurchaseContractJurisdiction = exports.PurchaseContractGoverningLaw = exports.PurchaseContractPaymentSchedule = exports.PurchaseContractCustomPaymentTerms = exports.PurchaseContractPaymentTerms = exports.PurchaseContractCurrency = exports.PurchaseContractContractServices = exports.PurchaseContractRenewalTerms = exports.PurchaseContractIsRenewable = exports.PurchaseContractDuration = exports.PurchaseContractCarbonClientContactPhone = exports.PurchaseContractCarbonClientContactEmail = exports.PurchaseContractCarbonClientContactName = exports.PurchaseContractCarbonClientAddress = exports.PurchaseContractCarbonClientTaxIdentification = exports.PurchaseContractCarbonClientLegalName = exports.PurchaseContractCarbonClientCompanyName = exports.PurchaseContractCreatedByStakeholder = exports.PurchaseContractTotalContractValue = exports.PurchaseContractEndDate = exports.PurchaseContractStartDate = exports.PurchaseContractCarbonClientId = exports.PurchaseContractType = exports.PurchaseContractStatus = void 0;
|
|
15
15
|
exports.ServicePricingMinimumUnits = exports.ServicePricingUsageUnit = exports.ServicePricingPercentageMarkup = exports.ServicePricingRequiresEmployeeTierPricing = exports.ServicePricingEmployeeTierConfigurations = exports.ServicePricingRequiresSectorPricing = exports.ServicePricingSectorPricingConfigurations = exports.ServicePricingMaximumPrice = 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 = void 0;
|
|
16
16
|
exports.InvalidUserRoleError = exports.InvalidServiceCatalogTypeError = exports.InvalidServiceCatalogStatusError = exports.InvalidServiceCatalogCategoryError = 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.ServicePricingInternalNotes = exports.ServicePricingPricingNotes = exports.ServicePricingValidToDate = exports.ServicePricingValidFromDate = exports.ServicePricingPromotionalDiscountPercentage = exports.ServicePricingPromotionalEndDate = exports.ServicePricingPromotionalStartDate = exports.ServicePricingPromotionalPricing = exports.ServicePricingMaxDiscountPercentage = exports.ServicePricingAllowsDiscounts = exports.ServicePricingMaximumUnits = void 0;
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
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 = void 0;
|
|
17
|
+
exports.CurrencyEnum = exports.CountryCodeEnum = exports.BusinessScaleEnum = exports.LocaleEnum = exports.UserBusinessStatusEnum = exports.UserTypeEnum = exports.ErrorCode = exports.CodedRootError = exports.RootError = exports.ObjectValueObject = exports.PrimitiveValueObject = exports.ValueObject = exports.User = exports.DomainError = exports.AggregateRoot = exports.InvalidReportTemplateIdError = exports.InvalidReportSectionTitleError = exports.InvalidReportSectionOrderError = exports.InvalidReportSectionIdError = exports.InvalidReportInstanceIdError = exports.EmptyReportSectionBlocksError = exports.ReportTemplateCannotBeVersionedError = exports.ReportTemplateCannotBeDeprecatedError = exports.ReportTemplateCannotBeActivatedError = exports.ReportInstanceInvalidStatusTransitionError = exports.ReportInstanceCannotBeRejectedError = exports.ReportInstanceCannotBePublishedError = exports.ReportInstanceCannotBeApprovedByClientError = exports.ReportInstanceCannotBeApprovedInternallyError = exports.ReportInstanceCannotBeGeneratedError = exports.ReportType = exports.ReportStatus = exports.DataBindingSource = exports.BlockNature = exports.ReportTemplateStatus = exports.ReportInstanceStatus = exports.ReportSection = exports.TextBankId = exports.ReportTemplateId = exports.ReportInstanceId = exports.TextBank = exports.ReportTemplate = exports.ReportInstance = exports.InvalidUnitsError = exports.InvalidTaxPercentageError = exports.InvalidPricingStatusError = exports.InvalidPricingModelError = exports.InvalidPricePerUnitError = exports.InvalidMarkupPercentageError = exports.InvalidDiscountPercentageError = void 0;
|
|
18
|
+
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 = 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 = exports.GenderEnum = exports.GHGSubScopeEnum = exports.GHGScopeEnum = exports.EmissionSourceEnum = exports.EmissionCategoryEnum = exports.DayOfWeekEnum = void 0;
|
|
19
|
+
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 = exports.UserBusinessStatus = exports.UserPassword = exports.UserDisplayName = exports.UserId = exports.UserEmail = void 0;
|
|
20
|
+
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 = exports.InvalidValueObjectConfigurationError = exports.UndefinedValueError = exports.NullValueError = exports.MethodNotImplementedError = exports.CreateMethodNotImplementedError = void 0;
|
|
21
|
+
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 = exports.InvalidDateFormatError = exports.ExternalServiceError = exports.DatabaseConnectionError = exports.JobAlreadyRunningError = exports.JobNotFoundError = void 0;
|
|
22
|
+
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 = exports.EitherUtils = exports.ResultFactory = exports.EitherFactory = exports.RightEither = exports.LeftEither = void 0;
|
|
23
|
+
exports.DomainEvent = exports.StakeholderPermissions = exports.UserPermissions = exports.UnsupportedUserTypeError = exports.UnsupportedStakeholderRoleError = exports.SecurityContextReconstructionError = exports.SecurityContext = exports.PermissionSet = exports.PermissionEnum = exports.AuthorizationDecisionEnum = 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 = exports.CarbonCoordinatorBusinessStatus = exports.CarbonCoordinatorRoleType = exports.CarbonCoordinatorManagedCarbonClients = exports.CarbonCoordinatorWeeklyWorkingSchedule = exports.CarbonCoordinatorGender = void 0;
|
|
24
|
+
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 = exports.WorkflowActivatedDomainEvent = exports.CalculationWorkflowReferenceVO = exports.InvalidDomainEventNameError = exports.DomainEventName = void 0;
|
|
25
25
|
// ─── Entity Classes (For Application Layer) ─────────────────────────────────
|
|
26
26
|
var ActivityDataSubmission_1 = require("../carbonbox/activity-data-collection/activity-data-submissions/domain/entity/ActivityDataSubmission");
|
|
27
27
|
Object.defineProperty(exports, "ActivityDataSubmission", { enumerable: true, get: function () { return ActivityDataSubmission_1.ActivityDataSubmission; } });
|
|
@@ -1239,6 +1239,73 @@ var InvalidTaxPercentageError_1 = require("../carbonbox/purchase-management-syst
|
|
|
1239
1239
|
Object.defineProperty(exports, "InvalidTaxPercentageError", { enumerable: true, get: function () { return InvalidTaxPercentageError_1.InvalidTaxPercentageError; } });
|
|
1240
1240
|
var InvalidUnitsError_1 = require("../carbonbox/purchase-management-system/service-pricing/domain/exceptions/InvalidUnitsError");
|
|
1241
1241
|
Object.defineProperty(exports, "InvalidUnitsError", { enumerable: true, get: function () { return InvalidUnitsError_1.InvalidUnitsError; } });
|
|
1242
|
+
// ─── Entity Classes (For Application Layer) ─────────────────────────────────
|
|
1243
|
+
var ReportInstance_1 = require("../carbonbox/reporting/report-instances/domain/entity/ReportInstance");
|
|
1244
|
+
Object.defineProperty(exports, "ReportInstance", { enumerable: true, get: function () { return ReportInstance_1.ReportInstance; } });
|
|
1245
|
+
var ReportTemplate_1 = require("../carbonbox/reporting/report-templates/domain/entity/ReportTemplate");
|
|
1246
|
+
Object.defineProperty(exports, "ReportTemplate", { enumerable: true, get: function () { return ReportTemplate_1.ReportTemplate; } });
|
|
1247
|
+
var TextBank_1 = require("../carbonbox/reporting/text-banks/domain/entity/TextBank");
|
|
1248
|
+
Object.defineProperty(exports, "TextBank", { enumerable: true, get: function () { return TextBank_1.TextBank; } });
|
|
1249
|
+
// ─── Essential Value Objects ─────────────────────────────────────────────────
|
|
1250
|
+
// Report Instances
|
|
1251
|
+
var ReportInstanceId_1 = require("../carbonbox/reporting/report-instances/domain/value-objects/ReportInstanceId");
|
|
1252
|
+
Object.defineProperty(exports, "ReportInstanceId", { enumerable: true, get: function () { return ReportInstanceId_1.ReportInstanceId; } });
|
|
1253
|
+
// Report Templates
|
|
1254
|
+
var ReportTemplateId_1 = require("../carbonbox/reporting/report-templates/domain/value-objects/ReportTemplateId");
|
|
1255
|
+
Object.defineProperty(exports, "ReportTemplateId", { enumerable: true, get: function () { return ReportTemplateId_1.ReportTemplateId; } });
|
|
1256
|
+
// Text Banks
|
|
1257
|
+
var TextBankId_1 = require("../carbonbox/reporting/text-banks/domain/value-objects/TextBankId");
|
|
1258
|
+
Object.defineProperty(exports, "TextBankId", { enumerable: true, get: function () { return TextBankId_1.TextBankId; } });
|
|
1259
|
+
// Shared Reporting
|
|
1260
|
+
var ReportSection_1 = require("../carbonbox/reporting/shared/domain/value-objects/ReportSection");
|
|
1261
|
+
Object.defineProperty(exports, "ReportSection", { enumerable: true, get: function () { return ReportSection_1.ReportSection; } });
|
|
1262
|
+
// ─── Enums (Business Rules) ──────────────────────────────────────────────────
|
|
1263
|
+
var ReportInstanceStatus_1 = require("../carbonbox/reporting/report-instances/domain/enums/ReportInstanceStatus");
|
|
1264
|
+
Object.defineProperty(exports, "ReportInstanceStatus", { enumerable: true, get: function () { return ReportInstanceStatus_1.ReportInstanceStatus; } });
|
|
1265
|
+
var ReportTemplateStatus_1 = require("../carbonbox/reporting/report-templates/domain/enums/ReportTemplateStatus");
|
|
1266
|
+
Object.defineProperty(exports, "ReportTemplateStatus", { enumerable: true, get: function () { return ReportTemplateStatus_1.ReportTemplateStatus; } });
|
|
1267
|
+
var BlockNature_1 = require("../carbonbox/reporting/shared/domain/enums/BlockNature");
|
|
1268
|
+
Object.defineProperty(exports, "BlockNature", { enumerable: true, get: function () { return BlockNature_1.BlockNature; } });
|
|
1269
|
+
var DataBindingSource_1 = require("../carbonbox/reporting/shared/domain/enums/DataBindingSource");
|
|
1270
|
+
Object.defineProperty(exports, "DataBindingSource", { enumerable: true, get: function () { return DataBindingSource_1.DataBindingSource; } });
|
|
1271
|
+
var ReportStatus_1 = require("../carbonbox/reporting/shared/domain/enums/ReportStatus");
|
|
1272
|
+
Object.defineProperty(exports, "ReportStatus", { enumerable: true, get: function () { return ReportStatus_1.ReportStatus; } });
|
|
1273
|
+
var ReportType_2 = require("../carbonbox/reporting/shared/domain/enums/ReportType");
|
|
1274
|
+
Object.defineProperty(exports, "ReportType", { enumerable: true, get: function () { return ReportType_2.ReportType; } });
|
|
1275
|
+
// ─── Domain Exceptions ───────────────────────────────────────────────────────
|
|
1276
|
+
// Report Instance Exceptions
|
|
1277
|
+
var ReportInstanceCannotBeGeneratedError_1 = require("../carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeGeneratedError");
|
|
1278
|
+
Object.defineProperty(exports, "ReportInstanceCannotBeGeneratedError", { enumerable: true, get: function () { return ReportInstanceCannotBeGeneratedError_1.ReportInstanceCannotBeGeneratedError; } });
|
|
1279
|
+
var ReportInstanceCannotBeApprovedInternallyError_1 = require("../carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeApprovedInternallyError");
|
|
1280
|
+
Object.defineProperty(exports, "ReportInstanceCannotBeApprovedInternallyError", { enumerable: true, get: function () { return ReportInstanceCannotBeApprovedInternallyError_1.ReportInstanceCannotBeApprovedInternallyError; } });
|
|
1281
|
+
var ReportInstanceCannotBeApprovedByClientError_1 = require("../carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeApprovedByClientError");
|
|
1282
|
+
Object.defineProperty(exports, "ReportInstanceCannotBeApprovedByClientError", { enumerable: true, get: function () { return ReportInstanceCannotBeApprovedByClientError_1.ReportInstanceCannotBeApprovedByClientError; } });
|
|
1283
|
+
var ReportInstanceCannotBePublishedError_1 = require("../carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBePublishedError");
|
|
1284
|
+
Object.defineProperty(exports, "ReportInstanceCannotBePublishedError", { enumerable: true, get: function () { return ReportInstanceCannotBePublishedError_1.ReportInstanceCannotBePublishedError; } });
|
|
1285
|
+
var ReportInstanceCannotBeRejectedError_1 = require("../carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeRejectedError");
|
|
1286
|
+
Object.defineProperty(exports, "ReportInstanceCannotBeRejectedError", { enumerable: true, get: function () { return ReportInstanceCannotBeRejectedError_1.ReportInstanceCannotBeRejectedError; } });
|
|
1287
|
+
var ReportInstanceInvalidStatusTransitionError_1 = require("../carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceInvalidStatusTransitionError");
|
|
1288
|
+
Object.defineProperty(exports, "ReportInstanceInvalidStatusTransitionError", { enumerable: true, get: function () { return ReportInstanceInvalidStatusTransitionError_1.ReportInstanceInvalidStatusTransitionError; } });
|
|
1289
|
+
// Report Template Exceptions
|
|
1290
|
+
var ReportTemplateCannotBeActivatedError_1 = require("../carbonbox/reporting/report-templates/domain/exceptions/ReportTemplateCannotBeActivatedError");
|
|
1291
|
+
Object.defineProperty(exports, "ReportTemplateCannotBeActivatedError", { enumerable: true, get: function () { return ReportTemplateCannotBeActivatedError_1.ReportTemplateCannotBeActivatedError; } });
|
|
1292
|
+
var ReportTemplateCannotBeDeprecatedError_1 = require("../carbonbox/reporting/report-templates/domain/exceptions/ReportTemplateCannotBeDeprecatedError");
|
|
1293
|
+
Object.defineProperty(exports, "ReportTemplateCannotBeDeprecatedError", { enumerable: true, get: function () { return ReportTemplateCannotBeDeprecatedError_1.ReportTemplateCannotBeDeprecatedError; } });
|
|
1294
|
+
var ReportTemplateCannotBeVersionedError_1 = require("../carbonbox/reporting/report-templates/domain/exceptions/ReportTemplateCannotBeVersionedError");
|
|
1295
|
+
Object.defineProperty(exports, "ReportTemplateCannotBeVersionedError", { enumerable: true, get: function () { return ReportTemplateCannotBeVersionedError_1.ReportTemplateCannotBeVersionedError; } });
|
|
1296
|
+
// Shared Reporting Exceptions
|
|
1297
|
+
var EmptyReportSectionBlocksError_1 = require("../carbonbox/reporting/shared/domain/exceptions/EmptyReportSectionBlocksError");
|
|
1298
|
+
Object.defineProperty(exports, "EmptyReportSectionBlocksError", { enumerable: true, get: function () { return EmptyReportSectionBlocksError_1.EmptyReportSectionBlocksError; } });
|
|
1299
|
+
var InvalidReportInstanceIdError_1 = require("../carbonbox/reporting/shared/domain/exceptions/InvalidReportInstanceIdError");
|
|
1300
|
+
Object.defineProperty(exports, "InvalidReportInstanceIdError", { enumerable: true, get: function () { return InvalidReportInstanceIdError_1.InvalidReportInstanceIdError; } });
|
|
1301
|
+
var InvalidReportSectionIdError_1 = require("../carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionIdError");
|
|
1302
|
+
Object.defineProperty(exports, "InvalidReportSectionIdError", { enumerable: true, get: function () { return InvalidReportSectionIdError_1.InvalidReportSectionIdError; } });
|
|
1303
|
+
var InvalidReportSectionOrderError_1 = require("../carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionOrderError");
|
|
1304
|
+
Object.defineProperty(exports, "InvalidReportSectionOrderError", { enumerable: true, get: function () { return InvalidReportSectionOrderError_1.InvalidReportSectionOrderError; } });
|
|
1305
|
+
var InvalidReportSectionTitleError_1 = require("../carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionTitleError");
|
|
1306
|
+
Object.defineProperty(exports, "InvalidReportSectionTitleError", { enumerable: true, get: function () { return InvalidReportSectionTitleError_1.InvalidReportSectionTitleError; } });
|
|
1307
|
+
var InvalidReportTemplateIdError_1 = require("../carbonbox/reporting/shared/domain/exceptions/InvalidReportTemplateIdError");
|
|
1308
|
+
Object.defineProperty(exports, "InvalidReportTemplateIdError", { enumerable: true, get: function () { return InvalidReportTemplateIdError_1.InvalidReportTemplateIdError; } });
|
|
1242
1309
|
// =============================================================================
|
|
1243
1310
|
// SHARED DOMAIN MODULE EXPORTS (FOUNDATION LAYER)
|
|
1244
1311
|
// =============================================================================
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IAggregateRoot } from '../../../../shared/domain/entities/IAggregateRoot';
|
|
2
|
+
import { ReportInstanceProps } from '../types/ReportInstanceProps';
|
|
3
|
+
import { ApprovalRecordPrimitives } from '../../../shared/domain/types/ApprovalRecordPrimitives';
|
|
4
|
+
export interface IReportInstance extends IAggregateRoot {
|
|
5
|
+
getId(): string;
|
|
6
|
+
getTemplateId(): string;
|
|
7
|
+
getTemplateVersion(): number;
|
|
8
|
+
getCarbonClientId(): string;
|
|
9
|
+
getPeriod(): ReportInstanceProps['period'];
|
|
10
|
+
getFilters(): ReportInstanceProps['filters'];
|
|
11
|
+
getQuestionnaireAnswers(): ReportInstanceProps['questionnaireAnswers'];
|
|
12
|
+
getDataSnapshot(): Record<string, unknown>;
|
|
13
|
+
getGeneratedContent(): Record<string, unknown> | null;
|
|
14
|
+
getPdfUrl(): string | null;
|
|
15
|
+
getStatus(): string;
|
|
16
|
+
getApprovals(): ApprovalRecordPrimitives[];
|
|
17
|
+
getAiExecutions(): ReportInstanceProps['aiExecutions'];
|
|
18
|
+
getCreatedAt(): string;
|
|
19
|
+
getUpdatedAt(): string;
|
|
20
|
+
isDraft(): boolean;
|
|
21
|
+
isGenerating(): boolean;
|
|
22
|
+
isPendingInternal(): boolean;
|
|
23
|
+
isPendingClient(): boolean;
|
|
24
|
+
isApproved(): boolean;
|
|
25
|
+
isPublished(): boolean;
|
|
26
|
+
isRejected(): boolean;
|
|
27
|
+
canBeGenerated(): boolean;
|
|
28
|
+
canBeApprovedInternally(): boolean;
|
|
29
|
+
canBeApprovedByClient(): boolean;
|
|
30
|
+
canBePublished(): boolean;
|
|
31
|
+
canBeRejected(): boolean;
|
|
32
|
+
hasGeneratedContent(): boolean;
|
|
33
|
+
hasPdf(): boolean;
|
|
34
|
+
requiresClientApproval(): boolean;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=IReportInstance.d.ts.map
|
package/build/types/carbonbox/reporting/report-instances/domain/entity/IReportInstance.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IReportInstance.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-instances/domain/entity/IReportInstance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uDAAuD,CAAC;AAEjG,MAAM,WAAW,eAAgB,SAAQ,cAAc;IAErD,KAAK,IAAI,MAAM,CAAC;IAChB,aAAa,IAAI,MAAM,CAAC;IACxB,kBAAkB,IAAI,MAAM,CAAC;IAC7B,iBAAiB,IAAI,MAAM,CAAC;IAC5B,SAAS,IAAI,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAC3C,UAAU,IAAI,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAC7C,uBAAuB,IAAI,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;IACvE,eAAe,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACtD,SAAS,IAAI,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,IAAI,MAAM,CAAC;IACpB,YAAY,IAAI,wBAAwB,EAAE,CAAC;IAC3C,eAAe,IAAI,mBAAmB,CAAC,cAAc,CAAC,CAAC;IACvD,YAAY,IAAI,MAAM,CAAC;IACvB,YAAY,IAAI,MAAM,CAAC;IAGvB,OAAO,IAAI,OAAO,CAAC;IACnB,YAAY,IAAI,OAAO,CAAC;IACxB,iBAAiB,IAAI,OAAO,CAAC;IAC7B,eAAe,IAAI,OAAO,CAAC;IAC3B,UAAU,IAAI,OAAO,CAAC;IACtB,WAAW,IAAI,OAAO,CAAC;IACvB,UAAU,IAAI,OAAO,CAAC;IAGtB,cAAc,IAAI,OAAO,CAAC;IAC1B,uBAAuB,IAAI,OAAO,CAAC;IACnC,qBAAqB,IAAI,OAAO,CAAC;IACjC,cAAc,IAAI,OAAO,CAAC;IAC1B,aAAa,IAAI,OAAO,CAAC;IAGzB,mBAAmB,IAAI,OAAO,CAAC;IAC/B,MAAM,IAAI,OAAO,CAAC;IAClB,sBAAsB,IAAI,OAAO,CAAC;CACnC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { AggregateRoot } from '../../../../shared/domain/entities/AggregateRoot';
|
|
2
|
+
import { ReportInstanceProps } from '../types/ReportInstanceProps';
|
|
3
|
+
import { ReportInstancePrimitives } from '../types/ReportInstancePrimitives';
|
|
4
|
+
import { IReportInstance } from './IReportInstance';
|
|
5
|
+
import { ApprovalRecordPrimitives } from '../../../shared/domain/types/ApprovalRecordPrimitives';
|
|
6
|
+
import { ReportPeriodPrimitives } from '../../../shared/domain/types/ReportPeriodPrimitives';
|
|
7
|
+
import { QuestionnaireAnswerPrimitives } from '../../../shared/domain/types/QuestionnaireAnswerPrimitives';
|
|
8
|
+
import { AIExecutionRecordPrimitives } from '../../../shared/domain/types/AIExecutionRecordPrimitives';
|
|
9
|
+
export declare class ReportInstance extends AggregateRoot<ReportInstancePrimitives> implements IReportInstance {
|
|
10
|
+
#private;
|
|
11
|
+
private constructor();
|
|
12
|
+
static create(props: Omit<ReportInstanceProps, 'id' | 'createdAt' | 'updatedAt' | 'generatedContent' | 'pdfUrl' | 'status' | 'approvals' | 'aiExecutions'>): ReportInstance;
|
|
13
|
+
static fromPrimitives(primitives: ReportInstancePrimitives): ReportInstance;
|
|
14
|
+
get toPrimitives(): ReportInstancePrimitives;
|
|
15
|
+
toProps(): ReportInstanceProps;
|
|
16
|
+
getId(): string;
|
|
17
|
+
getTemplateId(): string;
|
|
18
|
+
getTemplateVersion(): number;
|
|
19
|
+
getCarbonClientId(): string;
|
|
20
|
+
getPeriod(): ReportPeriodPrimitives;
|
|
21
|
+
getFilters(): ReportInstanceProps['filters'];
|
|
22
|
+
getQuestionnaireAnswers(): QuestionnaireAnswerPrimitives[];
|
|
23
|
+
getDataSnapshot(): Record<string, unknown>;
|
|
24
|
+
getGeneratedContent(): Record<string, unknown> | null;
|
|
25
|
+
getPdfUrl(): string | null;
|
|
26
|
+
getStatus(): string;
|
|
27
|
+
getApprovals(): ApprovalRecordPrimitives[];
|
|
28
|
+
getAiExecutions(): AIExecutionRecordPrimitives[];
|
|
29
|
+
getCreatedAt(): string;
|
|
30
|
+
getUpdatedAt(): string;
|
|
31
|
+
isDraft(): boolean;
|
|
32
|
+
isGenerating(): boolean;
|
|
33
|
+
isPendingInternal(): boolean;
|
|
34
|
+
isPendingClient(): boolean;
|
|
35
|
+
isApproved(): boolean;
|
|
36
|
+
isPublished(): boolean;
|
|
37
|
+
isRejected(): boolean;
|
|
38
|
+
canBeGenerated(): boolean;
|
|
39
|
+
canBeApprovedInternally(): boolean;
|
|
40
|
+
canBeApprovedByClient(): boolean;
|
|
41
|
+
canBePublished(): boolean;
|
|
42
|
+
canBeRejected(): boolean;
|
|
43
|
+
startGeneration(): void;
|
|
44
|
+
completeGeneration(generatedContent: Record<string, unknown>): void;
|
|
45
|
+
approveInternally(approverUserId: string, comments?: string): void;
|
|
46
|
+
approveByClient(approverUserId: string, comments?: string): void;
|
|
47
|
+
reject(rejectorUserId: string, reason: string): void;
|
|
48
|
+
publish(pdfUrl: string): void;
|
|
49
|
+
addAiExecution(execution: AIExecutionRecordPrimitives): void;
|
|
50
|
+
hasGeneratedContent(): boolean;
|
|
51
|
+
hasPdf(): boolean;
|
|
52
|
+
requiresClientApproval(): boolean;
|
|
53
|
+
getApprovalCount(): number;
|
|
54
|
+
hasInternalApproval(): boolean;
|
|
55
|
+
hasClientApproval(): boolean;
|
|
56
|
+
getDataSnapshotHash(): string | null;
|
|
57
|
+
getTotalAiExecutions(): number;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=ReportInstance.d.ts.map
|
package/build/types/carbonbox/reporting/report-instances/domain/entity/ReportInstance.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportInstance.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-instances/domain/entity/ReportInstance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AAEjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uDAAuD,CAAC;AACjG,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAE,6BAA6B,EAAE,MAAM,4DAA4D,CAAC;AAC3G,OAAO,EAAE,2BAA2B,EAAE,MAAM,0DAA0D,CAAC;AAQvG,qBAAa,cAAe,SAAQ,aAAa,CAAC,wBAAwB,CAAE,YAAW,eAAe;;IAkCpG,OAAO;WAuBgB,MAAM,CAC3B,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,IAAI,GAAG,WAAW,GAAG,WAAW,GAAG,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,cAAc,CAAC,GAC3I,cAAc;WAmBM,cAAc,CAAC,UAAU,EAAE,wBAAwB,GAAG,cAAc;IAsB3F,IAAoB,YAAY,IAAI,wBAAwB,CAkB3D;IAEM,OAAO,IAAI,mBAAmB;IAqB9B,KAAK,IAAI,MAAM;IAIf,aAAa,IAAI,MAAM;IAIvB,kBAAkB,IAAI,MAAM;IAI5B,iBAAiB,IAAI,MAAM;IAI3B,SAAS,IAAI,sBAAsB;IAInC,UAAU,IAAI,mBAAmB,CAAC,SAAS,CAAC;IAI5C,uBAAuB,IAAI,6BAA6B,EAAE;IAI1D,eAAe,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAI1C,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAIrD,SAAS,IAAI,MAAM,GAAG,IAAI;IAI1B,SAAS,IAAI,MAAM;IAInB,YAAY,IAAI,wBAAwB,EAAE;IAI1C,eAAe,IAAI,2BAA2B,EAAE;IAIhD,YAAY,IAAI,MAAM;IAItB,YAAY,IAAI,MAAM;IAKtB,OAAO,IAAI,OAAO;IAIlB,YAAY,IAAI,OAAO;IAIvB,iBAAiB,IAAI,OAAO;IAI5B,eAAe,IAAI,OAAO;IAI1B,UAAU,IAAI,OAAO;IAIrB,WAAW,IAAI,OAAO;IAItB,UAAU,IAAI,OAAO;IAKrB,cAAc,IAAI,OAAO;IAiBzB,uBAAuB,IAAI,OAAO;IAclC,qBAAqB,IAAI,OAAO;IAchC,cAAc,IAAI,OAAO;IAczB,aAAa,IAAI,OAAO;IAMxB,eAAe,IAAI,IAAI;IAiBvB,kBAAkB,CAAC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAcnE,iBAAiB,CAAC,cAAc,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;IA+BlE,eAAe,CAAC,cAAc,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;IA0BhE,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAsBpD,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAkB7B,cAAc,CAAC,SAAS,EAAE,2BAA2B,GAAG,IAAI;IAM5D,mBAAmB,IAAI,OAAO;IAI9B,MAAM,IAAI,OAAO;IAIjB,sBAAsB,IAAI,OAAO;IAMjC,gBAAgB,IAAI,MAAM;IAI1B,mBAAmB,IAAI,OAAO;IAI9B,iBAAiB,IAAI,OAAO;IAI5B,mBAAmB,IAAI,MAAM,GAAG,IAAI;IAKpC,oBAAoB,IAAI,MAAM;CAGtC"}
|
package/build/types/carbonbox/reporting/report-instances/domain/enums/ReportInstanceStatus.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Report Instance Status enumeration
|
|
3
|
+
* Defines the lifecycle status of a report instance
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ReportInstanceStatus {
|
|
6
|
+
/**
|
|
7
|
+
* Draft - Report instance created but not yet generated
|
|
8
|
+
*/
|
|
9
|
+
DRAFT = "DRAFT",
|
|
10
|
+
/**
|
|
11
|
+
* Generating - AI is currently generating report content
|
|
12
|
+
*/
|
|
13
|
+
GENERATING = "GENERATING",
|
|
14
|
+
/**
|
|
15
|
+
* Pending Internal - Waiting for internal approval
|
|
16
|
+
*/
|
|
17
|
+
PENDING_INTERNAL = "PENDING_INTERNAL",
|
|
18
|
+
/**
|
|
19
|
+
* Pending Client - Waiting for client approval
|
|
20
|
+
*/
|
|
21
|
+
PENDING_CLIENT = "PENDING_CLIENT",
|
|
22
|
+
/**
|
|
23
|
+
* Approved - Report approved and ready for publication
|
|
24
|
+
*/
|
|
25
|
+
APPROVED = "APPROVED",
|
|
26
|
+
/**
|
|
27
|
+
* Published - Report published and PDF generated
|
|
28
|
+
*/
|
|
29
|
+
PUBLISHED = "PUBLISHED",
|
|
30
|
+
/**
|
|
31
|
+
* Rejected - Report rejected, needs revision
|
|
32
|
+
*/
|
|
33
|
+
REJECTED = "REJECTED"
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=ReportInstanceStatus.d.ts.map
|
package/build/types/carbonbox/reporting/report-instances/domain/enums/ReportInstanceStatus.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportInstanceStatus.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-instances/domain/enums/ReportInstanceStatus.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,oBAAoB;IAC9B;;OAEG;IACH,KAAK,UAAU;IAEf;;OAEG;IACH,UAAU,eAAe;IAEzB;;OAEG;IACH,gBAAgB,qBAAqB;IAErC;;OAEG;IACH,cAAc,mBAAmB;IAEjC;;OAEG;IACH,QAAQ,aAAa;IAErB;;OAEG;IACH,SAAS,cAAc;IAEvB;;OAEG;IACH,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CodedRootError } from '../../../../shared/domain/exceptions/CodedRootError';
|
|
2
|
+
export declare class ReportInstanceCannotBeApprovedByClientError extends CodedRootError {
|
|
3
|
+
private constructor();
|
|
4
|
+
static create(instanceId: string, currentStatus: string, reason: string): ReportInstanceCannotBeApprovedByClientError;
|
|
5
|
+
logError(): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ReportInstanceCannotBeApprovedByClientError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportInstanceCannotBeApprovedByClientError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeApprovedByClientError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AAGrF,qBAAa,2CAA4C,SAAQ,cAAc;IAC7E,OAAO;WAsBgB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,2CAA2C;IAIrH,QAAQ,IAAI,MAAM;CAGnC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CodedRootError } from '../../../../shared/domain/exceptions/CodedRootError';
|
|
2
|
+
export declare class ReportInstanceCannotBeApprovedInternallyError extends CodedRootError {
|
|
3
|
+
private constructor();
|
|
4
|
+
static create(instanceId: string, currentStatus: string, reason: string): ReportInstanceCannotBeApprovedInternallyError;
|
|
5
|
+
logError(): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ReportInstanceCannotBeApprovedInternallyError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportInstanceCannotBeApprovedInternallyError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeApprovedInternallyError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AAGrF,qBAAa,6CAA8C,SAAQ,cAAc;IAC/E,OAAO;WAsBgB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,6CAA6C;IAIvH,QAAQ,IAAI,MAAM;CAGnC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CodedRootError } from '../../../../shared/domain/exceptions/CodedRootError';
|
|
2
|
+
export declare class ReportInstanceCannotBeGeneratedError extends CodedRootError {
|
|
3
|
+
private constructor();
|
|
4
|
+
static create(instanceId: string, currentStatus: string, reason: string): ReportInstanceCannotBeGeneratedError;
|
|
5
|
+
logError(): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ReportInstanceCannotBeGeneratedError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportInstanceCannotBeGeneratedError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeGeneratedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AAGrF,qBAAa,oCAAqC,SAAQ,cAAc;IACtE,OAAO;WAsBgB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,oCAAoC;IAI9G,QAAQ,IAAI,MAAM;CAGnC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CodedRootError } from '../../../../shared/domain/exceptions/CodedRootError';
|
|
2
|
+
export declare class ReportInstanceCannotBePublishedError extends CodedRootError {
|
|
3
|
+
private constructor();
|
|
4
|
+
static create(instanceId: string, currentStatus: string, reason: string): ReportInstanceCannotBePublishedError;
|
|
5
|
+
logError(): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ReportInstanceCannotBePublishedError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportInstanceCannotBePublishedError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBePublishedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AAGrF,qBAAa,oCAAqC,SAAQ,cAAc;IACtE,OAAO;WAsBgB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,oCAAoC;IAI9G,QAAQ,IAAI,MAAM;CAGnC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CodedRootError } from '../../../../shared/domain/exceptions/CodedRootError';
|
|
2
|
+
export declare class ReportInstanceCannotBeRejectedError extends CodedRootError {
|
|
3
|
+
private constructor();
|
|
4
|
+
static create(instanceId: string, currentStatus: string, reason: string): ReportInstanceCannotBeRejectedError;
|
|
5
|
+
logError(): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ReportInstanceCannotBeRejectedError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportInstanceCannotBeRejectedError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceCannotBeRejectedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AAGrF,qBAAa,mCAAoC,SAAQ,cAAc;IACrE,OAAO;WAsBgB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,mCAAmC;IAI7G,QAAQ,IAAI,MAAM;CAGnC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CodedRootError } from '../../../../shared/domain/exceptions/CodedRootError';
|
|
2
|
+
export declare class ReportInstanceInvalidStatusTransitionError extends CodedRootError {
|
|
3
|
+
private constructor();
|
|
4
|
+
static create(instanceId: string, currentStatus: string, targetStatus: string): ReportInstanceInvalidStatusTransitionError;
|
|
5
|
+
logError(): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ReportInstanceInvalidStatusTransitionError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportInstanceInvalidStatusTransitionError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-instances/domain/exceptions/ReportInstanceInvalidStatusTransitionError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AAGrF,qBAAa,0CAA2C,SAAQ,cAAc;IAC5E,OAAO;WAsBgB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,0CAA0C;IAI1H,QAAQ,IAAI,MAAM;CAGnC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Nullable } from '../../../../shared/domain/types/Nullable';
|
|
2
|
+
import { ReportInstance } from '../entity/ReportInstance';
|
|
3
|
+
import { ReportInstanceId } from '../value-objects/ReportInstanceId';
|
|
4
|
+
import { ReportInstanceStatus } from '../enums/ReportInstanceStatus';
|
|
5
|
+
/**
|
|
6
|
+
* Repository interface for ReportInstance aggregate following DDD principles.
|
|
7
|
+
* Manages persistence operations for report instances generated by clients.
|
|
8
|
+
*/
|
|
9
|
+
export interface IReportInstanceRepository {
|
|
10
|
+
/**
|
|
11
|
+
* Persists a report instance (create or update)
|
|
12
|
+
* @param instance - The report instance aggregate to save
|
|
13
|
+
* @returns Promise that resolves when the operation completes
|
|
14
|
+
*/
|
|
15
|
+
save(instance: ReportInstance): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Finds a report instance by its ID
|
|
18
|
+
* @param id - The report instance ID
|
|
19
|
+
* @returns Promise resolving to the instance or null if not found
|
|
20
|
+
*/
|
|
21
|
+
findById(id: ReportInstanceId): Promise<Nullable<ReportInstance>>;
|
|
22
|
+
/**
|
|
23
|
+
* Finds all instances for a specific template
|
|
24
|
+
* @param templateId - The template ID to filter by
|
|
25
|
+
* @returns Promise resolving to an array of matching instances
|
|
26
|
+
*/
|
|
27
|
+
findAllByTemplateId(templateId: string): Promise<ReportInstance[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Finds all instances for a specific template version
|
|
30
|
+
* @param templateId - The template ID
|
|
31
|
+
* @param templateVersion - The template version
|
|
32
|
+
* @returns Promise resolving to an array of matching instances
|
|
33
|
+
*/
|
|
34
|
+
findAllByTemplateIdAndVersion(templateId: string, templateVersion: number): Promise<ReportInstance[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Finds all instances for a specific carbon client
|
|
37
|
+
* @param carbonClientId - The carbon client ID to filter by
|
|
38
|
+
* @returns Promise resolving to an array of matching instances
|
|
39
|
+
*/
|
|
40
|
+
findAllByCarbonClientId(carbonClientId: string): Promise<ReportInstance[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Finds all instances with a specific status
|
|
43
|
+
* @param status - The report instance status to filter by
|
|
44
|
+
* @returns Promise resolving to an array of matching instances
|
|
45
|
+
*/
|
|
46
|
+
findAllByStatus(status: ReportInstanceStatus): Promise<ReportInstance[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Finds all instances for a specific carbon client with a specific status
|
|
49
|
+
* @param carbonClientId - The carbon client ID
|
|
50
|
+
* @param status - The report instance status
|
|
51
|
+
* @returns Promise resolving to an array of matching instances
|
|
52
|
+
*/
|
|
53
|
+
findAllByCarbonClientIdAndStatus(carbonClientId: string, status: ReportInstanceStatus): Promise<ReportInstance[]>;
|
|
54
|
+
/**
|
|
55
|
+
* Finds all published instances for a specific carbon client
|
|
56
|
+
* @param carbonClientId - The carbon client ID
|
|
57
|
+
* @returns Promise resolving to an array of published instances
|
|
58
|
+
*/
|
|
59
|
+
findAllPublishedByCarbonClientId(carbonClientId: string): Promise<ReportInstance[]>;
|
|
60
|
+
/**
|
|
61
|
+
* Finds all instances pending approval (internal or client)
|
|
62
|
+
* @returns Promise resolving to an array of instances pending approval
|
|
63
|
+
*/
|
|
64
|
+
findAllPendingApproval(): Promise<ReportInstance[]>;
|
|
65
|
+
/**
|
|
66
|
+
* Finds all instances created within a date range
|
|
67
|
+
* @param startDate - The start date (ISO 8601 string)
|
|
68
|
+
* @param endDate - The end date (ISO 8601 string)
|
|
69
|
+
* @returns Promise resolving to an array of instances created in the range
|
|
70
|
+
*/
|
|
71
|
+
findAllByCreatedAtRange(startDate: string, endDate: string): Promise<ReportInstance[]>;
|
|
72
|
+
/**
|
|
73
|
+
* Finds all report instances in the system
|
|
74
|
+
* @returns Promise resolving to an array of all instances
|
|
75
|
+
*/
|
|
76
|
+
findAll(): Promise<ReportInstance[]>;
|
|
77
|
+
/**
|
|
78
|
+
* Deletes a report instance by its ID
|
|
79
|
+
* @param id - The instance ID to delete
|
|
80
|
+
* @returns Promise that resolves when the operation completes
|
|
81
|
+
*/
|
|
82
|
+
deleteById(id: ReportInstanceId): Promise<void>;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=IReportInstanceRepository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IReportInstanceRepository.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-instances/domain/repository/IReportInstanceRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,IAAI,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,EAAE,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;IAElE;;;;OAIG;IACH,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAEnE;;;;;OAKG;IACH,6BAA6B,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAEtG;;;;OAIG;IACH,uBAAuB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAE3E;;;;OAIG;IACH,eAAe,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAEzE;;;;;OAKG;IACH,gCAAgC,CAC9B,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAE7B;;;;OAIG;IACH,gCAAgC,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAEpF;;;OAGG;IACH,sBAAsB,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAEpD;;;;;OAKG;IACH,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAEvF;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAErC;;;;OAIG;IACH,UAAU,CAAC,EAAE,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD"}
|
package/build/types/carbonbox/reporting/report-instances/domain/types/ReportInstancePrimitives.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AggregateRootPrimitives } from '../../../../shared/domain/types/AggregateRootPrimitives';
|
|
2
|
+
import { ReportInstanceStatus } from '../enums/ReportInstanceStatus';
|
|
3
|
+
import { ReportPeriodPrimitives } from '../../../shared/domain/types/ReportPeriodPrimitives';
|
|
4
|
+
import { QuestionnaireAnswerPrimitives } from '../../../shared/domain/types/QuestionnaireAnswerPrimitives';
|
|
5
|
+
import { ApprovalRecordPrimitives } from '../../../shared/domain/types/ApprovalRecordPrimitives';
|
|
6
|
+
import { AIExecutionRecordPrimitives } from '../../../shared/domain/types/AIExecutionRecordPrimitives';
|
|
7
|
+
export type ReportInstancePrimitives = AggregateRootPrimitives & {
|
|
8
|
+
templateId: string;
|
|
9
|
+
templateVersion: number;
|
|
10
|
+
carbonClientId: string;
|
|
11
|
+
period: ReportPeriodPrimitives;
|
|
12
|
+
filters: {
|
|
13
|
+
facilities?: string[];
|
|
14
|
+
scopes?: string[];
|
|
15
|
+
categories?: string[];
|
|
16
|
+
segments?: string[];
|
|
17
|
+
};
|
|
18
|
+
questionnaireAnswers: QuestionnaireAnswerPrimitives[];
|
|
19
|
+
dataSnapshot: Record<string, unknown>;
|
|
20
|
+
generatedContent: Record<string, unknown> | null;
|
|
21
|
+
pdfUrl: string | null;
|
|
22
|
+
status: ReportInstanceStatus;
|
|
23
|
+
approvals: ApprovalRecordPrimitives[];
|
|
24
|
+
aiExecutions: AIExecutionRecordPrimitives[];
|
|
25
|
+
createdAt: string;
|
|
26
|
+
updatedAt: string;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=ReportInstancePrimitives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportInstancePrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-instances/domain/types/ReportInstancePrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAE,6BAA6B,EAAE,MAAM,4DAA4D,CAAC;AAC3G,OAAO,EAAE,wBAAwB,EAAE,MAAM,uDAAuD,CAAC;AACjG,OAAO,EAAE,2BAA2B,EAAE,MAAM,0DAA0D,CAAC;AAEvG,MAAM,MAAM,wBAAwB,GAAG,uBAAuB,GAAG;IAC/D,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,OAAO,EAAE;QACP,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;QACtB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;IACF,oBAAoB,EAAE,6BAA6B,EAAE,CAAC;IACtD,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACjD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,oBAAoB,CAAC;IAC7B,SAAS,EAAE,wBAAwB,EAAE,CAAC;IACtC,YAAY,EAAE,2BAA2B,EAAE,CAAC;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
package/build/types/carbonbox/reporting/report-instances/domain/types/ReportInstanceProps.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AggregateRootProps } from '../../../../shared/domain/types/AggregateRootProps';
|
|
2
|
+
import { ReportInstanceStatus } from '../enums/ReportInstanceStatus';
|
|
3
|
+
import { ReportPeriodPrimitives } from '../../../shared/domain/types/ReportPeriodPrimitives';
|
|
4
|
+
import { QuestionnaireAnswerPrimitives } from '../../../shared/domain/types/QuestionnaireAnswerPrimitives';
|
|
5
|
+
import { ApprovalRecordPrimitives } from '../../../shared/domain/types/ApprovalRecordPrimitives';
|
|
6
|
+
import { AIExecutionRecordPrimitives } from '../../../shared/domain/types/AIExecutionRecordPrimitives';
|
|
7
|
+
export type ReportInstanceProps = AggregateRootProps & {
|
|
8
|
+
templateId: string;
|
|
9
|
+
templateVersion: number;
|
|
10
|
+
carbonClientId: string;
|
|
11
|
+
period: ReportPeriodPrimitives;
|
|
12
|
+
filters: {
|
|
13
|
+
facilities?: string[];
|
|
14
|
+
scopes?: string[];
|
|
15
|
+
categories?: string[];
|
|
16
|
+
segments?: string[];
|
|
17
|
+
};
|
|
18
|
+
questionnaireAnswers: QuestionnaireAnswerPrimitives[];
|
|
19
|
+
dataSnapshot: Record<string, unknown>;
|
|
20
|
+
generatedContent: Record<string, unknown> | null;
|
|
21
|
+
pdfUrl: string | null;
|
|
22
|
+
status: ReportInstanceStatus;
|
|
23
|
+
approvals: ApprovalRecordPrimitives[];
|
|
24
|
+
aiExecutions: AIExecutionRecordPrimitives[];
|
|
25
|
+
createdAt: string;
|
|
26
|
+
updatedAt: string;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=ReportInstanceProps.d.ts.map
|
package/build/types/carbonbox/reporting/report-instances/domain/types/ReportInstanceProps.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportInstanceProps.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-instances/domain/types/ReportInstanceProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAE,6BAA6B,EAAE,MAAM,4DAA4D,CAAC;AAC3G,OAAO,EAAE,wBAAwB,EAAE,MAAM,uDAAuD,CAAC;AACjG,OAAO,EAAE,2BAA2B,EAAE,MAAM,0DAA0D,CAAC;AAEvG,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,GAAG;IACrD,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,OAAO,EAAE;QACP,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;QACtB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;IACF,oBAAoB,EAAE,6BAA6B,EAAE,CAAC;IACtD,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACjD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,oBAAoB,CAAC;IAC7B,SAAS,EAAE,wBAAwB,EAAE,CAAC;IACtC,YAAY,EAAE,2BAA2B,EAAE,CAAC;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IAggregateRoot } from '../../../../shared/domain/entities/IAggregateRoot';
|
|
2
|
+
import { ReportSectionPrimitives } from '../../../shared/domain/types/ReportSectionPrimitives';
|
|
3
|
+
export interface IReportTemplate extends IAggregateRoot {
|
|
4
|
+
getId(): string;
|
|
5
|
+
getVersion(): number;
|
|
6
|
+
getPreviousVersionId(): string | null;
|
|
7
|
+
getType(): string;
|
|
8
|
+
getFootprintType(): string;
|
|
9
|
+
getReportingStandard(): string;
|
|
10
|
+
requiresClientApproval(): boolean;
|
|
11
|
+
getStatus(): string;
|
|
12
|
+
getSections(): readonly ReportSectionPrimitives[];
|
|
13
|
+
getTextBankId(): string;
|
|
14
|
+
getCreatedBy(): string;
|
|
15
|
+
getCreatedAt(): string;
|
|
16
|
+
getUpdatedAt(): string;
|
|
17
|
+
isActive(): boolean;
|
|
18
|
+
isDraft(): boolean;
|
|
19
|
+
isDeprecated(): boolean;
|
|
20
|
+
canBeActivated(): boolean;
|
|
21
|
+
canBeModified(): boolean;
|
|
22
|
+
canBeDeprecated(): boolean;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=IReportTemplate.d.ts.map
|
package/build/types/carbonbox/reporting/report-templates/domain/entity/IReportTemplate.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IReportTemplate.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-templates/domain/entity/IReportTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sDAAsD,CAAC;AAE/F,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACrD,KAAK,IAAI,MAAM,CAAC;IAChB,UAAU,IAAI,MAAM,CAAC;IACrB,oBAAoB,IAAI,MAAM,GAAG,IAAI,CAAC;IACtC,OAAO,IAAI,MAAM,CAAC;IAClB,gBAAgB,IAAI,MAAM,CAAC;IAC3B,oBAAoB,IAAI,MAAM,CAAC;IAC/B,sBAAsB,IAAI,OAAO,CAAC;IAClC,SAAS,IAAI,MAAM,CAAC;IACpB,WAAW,IAAI,SAAS,uBAAuB,EAAE,CAAC;IAClD,aAAa,IAAI,MAAM,CAAC;IACxB,YAAY,IAAI,MAAM,CAAC;IACvB,YAAY,IAAI,MAAM,CAAC;IACvB,YAAY,IAAI,MAAM,CAAC;IAGvB,QAAQ,IAAI,OAAO,CAAC;IACpB,OAAO,IAAI,OAAO,CAAC;IACnB,YAAY,IAAI,OAAO,CAAC;IACxB,cAAc,IAAI,OAAO,CAAC;IAC1B,aAAa,IAAI,OAAO,CAAC;IACzB,eAAe,IAAI,OAAO,CAAC;CAC5B"}
|