@carbonbox/domain 0.29.0 → 0.29.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.
Files changed (46) hide show
  1. package/build/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidContractStatusError.js +24 -7
  2. package/build/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidPaymentTermsError.js +24 -7
  3. package/build/carbonbox/shared/domain/exceptions/AccountLockedError.js +58 -0
  4. package/build/carbonbox/shared/domain/exceptions/ConfigurationNotFoundError.js +62 -0
  5. package/build/carbonbox/shared/domain/exceptions/ContractNotFoundError.js +58 -0
  6. package/build/carbonbox/shared/domain/exceptions/EmailNotVerifiedError.js +61 -0
  7. package/build/carbonbox/shared/domain/exceptions/InvalidBusinessStatusError.js +56 -0
  8. package/build/carbonbox/shared/domain/exceptions/InvalidCredentialsError.js +35 -0
  9. package/build/carbonbox/shared/domain/exceptions/InvalidCurrencyError.js +51 -6
  10. package/build/carbonbox/shared/domain/exceptions/MissingCredentialsError.js +53 -0
  11. package/build/carbonbox/shared/domain/exceptions/OrderExceedsBudgetError.js +98 -0
  12. package/build/carbonbox/shared/domain/exceptions/ServiceCatalogNotFoundError.js +64 -0
  13. package/build/carbonbox/shared/domain/exceptions/StakeholderNotFoundError.js +49 -0
  14. package/build/carbonbox/shared/domain/exceptions/TokenExpiredError.js +48 -0
  15. package/build/main/index.js +31 -5
  16. package/build/types/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidContractStatusError.d.ts +9 -3
  17. package/build/types/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidContractStatusError.d.ts.map +1 -1
  18. package/build/types/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidPaymentTermsError.d.ts +9 -3
  19. package/build/types/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidPaymentTermsError.d.ts.map +1 -1
  20. package/build/types/carbonbox/shared/domain/exceptions/AccountLockedError.d.ts +25 -0
  21. package/build/types/carbonbox/shared/domain/exceptions/AccountLockedError.d.ts.map +1 -0
  22. package/build/types/carbonbox/shared/domain/exceptions/ConfigurationNotFoundError.d.ts +29 -0
  23. package/build/types/carbonbox/shared/domain/exceptions/ConfigurationNotFoundError.d.ts.map +1 -0
  24. package/build/types/carbonbox/shared/domain/exceptions/ContractNotFoundError.d.ts +25 -0
  25. package/build/types/carbonbox/shared/domain/exceptions/ContractNotFoundError.d.ts.map +1 -0
  26. package/build/types/carbonbox/shared/domain/exceptions/EmailNotVerifiedError.d.ts +27 -0
  27. package/build/types/carbonbox/shared/domain/exceptions/EmailNotVerifiedError.d.ts.map +1 -0
  28. package/build/types/carbonbox/shared/domain/exceptions/InvalidBusinessStatusError.d.ts +25 -0
  29. package/build/types/carbonbox/shared/domain/exceptions/InvalidBusinessStatusError.d.ts.map +1 -0
  30. package/build/types/carbonbox/shared/domain/exceptions/InvalidCredentialsError.d.ts +13 -0
  31. package/build/types/carbonbox/shared/domain/exceptions/InvalidCredentialsError.d.ts.map +1 -0
  32. package/build/types/carbonbox/shared/domain/exceptions/InvalidCurrencyError.d.ts +23 -3
  33. package/build/types/carbonbox/shared/domain/exceptions/InvalidCurrencyError.d.ts.map +1 -1
  34. package/build/types/carbonbox/shared/domain/exceptions/MissingCredentialsError.d.ts +25 -0
  35. package/build/types/carbonbox/shared/domain/exceptions/MissingCredentialsError.d.ts.map +1 -0
  36. package/build/types/carbonbox/shared/domain/exceptions/OrderExceedsBudgetError.d.ts +42 -0
  37. package/build/types/carbonbox/shared/domain/exceptions/OrderExceedsBudgetError.d.ts.map +1 -0
  38. package/build/types/carbonbox/shared/domain/exceptions/ServiceCatalogNotFoundError.d.ts +29 -0
  39. package/build/types/carbonbox/shared/domain/exceptions/ServiceCatalogNotFoundError.d.ts.map +1 -0
  40. package/build/types/carbonbox/shared/domain/exceptions/StakeholderNotFoundError.d.ts +21 -0
  41. package/build/types/carbonbox/shared/domain/exceptions/StakeholderNotFoundError.d.ts.map +1 -0
  42. package/build/types/carbonbox/shared/domain/exceptions/TokenExpiredError.d.ts +21 -0
  43. package/build/types/carbonbox/shared/domain/exceptions/TokenExpiredError.d.ts.map +1 -0
  44. package/build/types/main/index.d.ts +11 -0
  45. package/build/types/main/index.d.ts.map +1 -1
  46. package/package.json +1 -1
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServiceCatalogNotFoundError = void 0;
4
+ const CodedRootError_1 = require("./CodedRootError");
5
+ const ErrorCode_1 = require("../enums/ErrorCode");
6
+ /**
7
+ * Exception thrown when a service catalog item is not found in the system
8
+ * This error occurs when searching for services by ID, code, or category
9
+ *
10
+ * Error code: CBX-PMS-007
11
+ * @since 1.0.0
12
+ */
13
+ class ServiceCatalogNotFoundError extends CodedRootError_1.CodedRootError {
14
+ constructor(searchCriteria, searchValue, category, status) {
15
+ const errorCode = ErrorCode_1.ErrorCode.SERVICE_CATALOG_NOT_FOUND;
16
+ const categoryInfo = category ? ` in category '${category}'` : '';
17
+ const statusInfo = status ? ` with status '${status}'` : '';
18
+ const technicalMessage = `Service catalog item not found: ${searchCriteria}='${searchValue}'${categoryInfo}${statusInfo}`;
19
+ const context = {
20
+ searchCriteria,
21
+ searchValue,
22
+ ...(category && { category }),
23
+ ...(status && { status }),
24
+ timestamp: new Date().toISOString(),
25
+ };
26
+ const suggestions = [
27
+ 'Verify the service catalog ID or code is correct',
28
+ 'Check if the service is active and available',
29
+ 'Ensure the service category is correct',
30
+ 'Browse the available services in the catalog',
31
+ 'Contact support to request the service be added',
32
+ ];
33
+ super(errorCode, technicalMessage, context, suggestions);
34
+ this.name = 'ServiceCatalogNotFoundError';
35
+ }
36
+ static create(searchCriteria, searchValue, category, status) {
37
+ return new ServiceCatalogNotFoundError(searchCriteria, searchValue, category, status);
38
+ }
39
+ /**
40
+ * Creates a ServiceCatalogNotFoundError specifically for ID searches
41
+ */
42
+ static byId(id) {
43
+ return new ServiceCatalogNotFoundError('id', id);
44
+ }
45
+ /**
46
+ * Creates a ServiceCatalogNotFoundError specifically for service code searches
47
+ */
48
+ static byCode(code) {
49
+ return new ServiceCatalogNotFoundError('code', code);
50
+ }
51
+ /**
52
+ * Creates a ServiceCatalogNotFoundError for category searches
53
+ */
54
+ static byCategory(category) {
55
+ return new ServiceCatalogNotFoundError('category', category, category);
56
+ }
57
+ /**
58
+ * Creates a ServiceCatalogNotFoundError for active services
59
+ */
60
+ static noActiveService(serviceCode) {
61
+ return new ServiceCatalogNotFoundError('code', serviceCode, undefined, 'ACTIVE');
62
+ }
63
+ }
64
+ exports.ServiceCatalogNotFoundError = ServiceCatalogNotFoundError;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StakeholderNotFoundError = void 0;
4
+ const CodedRootError_1 = require("./CodedRootError");
5
+ const ErrorCode_1 = require("../enums/ErrorCode");
6
+ /**
7
+ * Exception thrown when a stakeholder is not found in the system
8
+ * This error occurs when searching for a stakeholder by ID, email, or other criteria
9
+ *
10
+ * Error code: CBX-STK-003
11
+ * @since 1.0.0
12
+ */
13
+ class StakeholderNotFoundError extends CodedRootError_1.CodedRootError {
14
+ constructor(searchCriteria, searchValue, stakeholderType) {
15
+ const errorCode = ErrorCode_1.ErrorCode.STAKEHOLDER_NOT_FOUND;
16
+ const stakeholderInfo = stakeholderType ? ` (type: ${stakeholderType})` : '';
17
+ const technicalMessage = `Stakeholder not found: ${searchCriteria}='${searchValue}'${stakeholderInfo}`;
18
+ const context = {
19
+ searchCriteria,
20
+ searchValue,
21
+ ...(stakeholderType && { stakeholderType }),
22
+ timestamp: new Date().toISOString(),
23
+ };
24
+ const suggestions = [
25
+ 'Verify the stakeholder ID or email is correct',
26
+ 'Check if the stakeholder has been registered in the system',
27
+ 'Ensure the stakeholder has not been deactivated',
28
+ 'Contact an administrator to verify stakeholder status',
29
+ ];
30
+ super(errorCode, technicalMessage, context, suggestions);
31
+ this.name = 'StakeholderNotFoundError';
32
+ }
33
+ static create(searchCriteria, searchValue, stakeholderType) {
34
+ return new StakeholderNotFoundError(searchCriteria, searchValue, stakeholderType);
35
+ }
36
+ /**
37
+ * Creates a StakeholderNotFoundError specifically for ID searches
38
+ */
39
+ static byId(id, stakeholderType) {
40
+ return new StakeholderNotFoundError('id', id, stakeholderType);
41
+ }
42
+ /**
43
+ * Creates a StakeholderNotFoundError specifically for email searches
44
+ */
45
+ static byEmail(email, stakeholderType) {
46
+ return new StakeholderNotFoundError('email', email, stakeholderType);
47
+ }
48
+ }
49
+ exports.StakeholderNotFoundError = StakeholderNotFoundError;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TokenExpiredError = void 0;
4
+ const CodedRootError_1 = require("./CodedRootError");
5
+ const ErrorCode_1 = require("../enums/ErrorCode");
6
+ /**
7
+ * Exception thrown when a JWT token has expired
8
+ * This error indicates the user needs to authenticate again
9
+ *
10
+ * Error code: CBX-AUTH-002
11
+ * @since 1.0.0
12
+ */
13
+ class TokenExpiredError extends CodedRootError_1.CodedRootError {
14
+ constructor(tokenType = 'access', expiredAt, userId) {
15
+ const errorCode = ErrorCode_1.ErrorCode.TOKEN_EXPIRED;
16
+ const technicalMessage = `${tokenType.charAt(0).toUpperCase() + tokenType.slice(1)} token has expired${expiredAt ? ` at ${expiredAt}` : ''}${userId ? ` for user ${userId}` : ''}`;
17
+ const context = {
18
+ tokenType,
19
+ ...(expiredAt && { expiredAt }),
20
+ ...(userId && { userId }),
21
+ timestamp: new Date().toISOString(),
22
+ };
23
+ const suggestions = [
24
+ 'Your session has expired. Please log in again',
25
+ 'Use the refresh token to obtain a new access token',
26
+ 'If you continue having issues, clear your browser cache and cookies',
27
+ 'Contact support if the problem persists',
28
+ ];
29
+ super(errorCode, technicalMessage, context, suggestions);
30
+ this.name = 'TokenExpiredError';
31
+ }
32
+ static create(tokenType = 'access', expiredAt, userId) {
33
+ return new TokenExpiredError(tokenType, expiredAt, userId);
34
+ }
35
+ /**
36
+ * Creates a TokenExpiredError specifically for access tokens
37
+ */
38
+ static accessToken(expiredAt, userId) {
39
+ return new TokenExpiredError('access', expiredAt, userId);
40
+ }
41
+ /**
42
+ * Creates a TokenExpiredError specifically for refresh tokens
43
+ */
44
+ static refreshToken(expiredAt, userId) {
45
+ return new TokenExpiredError('refresh', expiredAt, userId);
46
+ }
47
+ }
48
+ exports.TokenExpiredError = TokenExpiredError;
@@ -16,11 +16,11 @@ exports.ServicePricingAllowsDiscounts = exports.ServicePricingMaximumUnits = exp
16
16
  exports.InvalidMarkupPercentageError = exports.InvalidDiscountPercentageError = 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 = void 0;
17
17
  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 = 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.InvalidUnitsError = exports.InvalidTaxPercentageError = exports.InvalidPricingStatusError = exports.InvalidPricingModelError = exports.InvalidPricePerUnitError = void 0;
18
18
  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 = 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 = void 0;
19
- exports.PasswordPolicyViolationError = exports.InvalidNationalNumberError = exports.InvalidFullInternationalNumberError = exports.InvalidEmailPolicyError = exports.InvalidCoordinatesError = exports.InvalidTimeFormatError = exports.InvalidDateRangeError = exports.InvalidDateFormatError = exports.InvalidColombianNITNumberError = exports.InvalidColombianNITCheckDigitError = exports.InvalidColombianNITFormatError = exports.InvalidTaxIdentificationTypeError = exports.InvalidStakeholderRoleTypeError = exports.InvalidGenderError = exports.InvalidCurrencyError = exports.InvalidCountryCodeError = exports.InvalidBusinessScaleError = exports.UnknownBoundedContextCodeError = exports.InvalidUuidFormatError = exports.InvalidUserPrefixError = exports.InvalidUserIdFormatError = exports.InvalidSemanticUuidFormatError = exports.InvalidAggregateIdFormatError = exports.InvalidPropertyValueError = exports.InvalidPropertyTypeError = exports.InvalidValueObjectConfigurationError = exports.UndefinedValueError = exports.NullValueError = exports.MethodNotImplementedError = exports.CreateMethodNotImplementedError = exports.ServiceCatalogReference = exports.ProductReference = exports.ProductConfigurationSystemBoundaryReference = exports.ProductConfigurationCarbonFootprintSubsegmentReference = exports.ProductConfigurationCarbonFootprintSegmentReference = exports.ProductCarbonFootprintSegmentConfigurationReferences = exports.FacilityReference = exports.EventReference = exports.EventEditionReferences = exports.EventEditionReference = exports.EventEditionLifecycleStageReference = exports.EventEditionLifecycleStageConfigurationReferences = exports.EventEditionConfigurationCarbonFootprintSubsegmentReferences = exports.EventEditionConfigurationCarbonFootprintSubsegmentReference = exports.CorporateConfigurationCarbonFootprintSubsegmentReference = exports.CorporateConfigurationCarbonFootprintSegmentReference = exports.CorporateCarbonFootprintSegmentConfigurationReferences = exports.CollectionFieldReference = exports.CarbonFootprintSegmentReferences = exports.CarbonFootprintIntensityIndicatorReference = void 0;
20
- exports.StakeholderPassword = exports.StakeholderDisplayName = exports.StakeholderEmail = exports.StakeholderId = exports.CarbonManager = exports.CarbonHost = exports.CarbonCoordinator = exports.CarbonClient = exports.Stakeholder = exports.CannotAccessRightOnLeftValueError = exports.CannotAccessLeftOnRightValueError = exports.ResultExtensions = exports.EitherUtils = exports.ResultFactory = exports.EitherFactory = exports.RightEither = exports.LeftEither = exports.Either = exports.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.InvalidUserBusinessStatusError = exports.InvalidUserTypeError = exports.DivisionByZeroError = exports.MoneyOverflowError = exports.NotIntegerError = exports.NegativeAmountError = exports.MinimumValueViolationError = exports.InvalidUrlListError = exports.InvalidCodeListError = exports.InvalidStringListError = exports.EmptyArrayNotAllowedError = void 0;
21
- 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 = 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 = void 0;
22
- 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 = 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 = void 0;
23
- 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 = void 0;
19
+ exports.ConfigurationNotFoundError = exports.InvalidBusinessStatusError = exports.StakeholderNotFoundError = exports.EmailNotVerifiedError = exports.AccountLockedError = exports.MissingCredentialsError = 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.InvalidAggregateIdFormatError = exports.InvalidPropertyValueError = exports.InvalidPropertyTypeError = exports.InvalidValueObjectConfigurationError = exports.UndefinedValueError = exports.NullValueError = exports.MethodNotImplementedError = exports.CreateMethodNotImplementedError = exports.ServiceCatalogReference = exports.ProductReference = exports.ProductConfigurationSystemBoundaryReference = exports.ProductConfigurationCarbonFootprintSubsegmentReference = exports.ProductConfigurationCarbonFootprintSegmentReference = exports.ProductCarbonFootprintSegmentConfigurationReferences = exports.FacilityReference = exports.EventReference = exports.EventEditionReferences = exports.EventEditionReference = exports.EventEditionLifecycleStageReference = exports.EventEditionLifecycleStageConfigurationReferences = exports.EventEditionConfigurationCarbonFootprintSubsegmentReferences = exports.EventEditionConfigurationCarbonFootprintSubsegmentReference = exports.CorporateConfigurationCarbonFootprintSubsegmentReference = exports.CorporateConfigurationCarbonFootprintSegmentReference = exports.CorporateCarbonFootprintSegmentConfigurationReferences = exports.CollectionFieldReference = exports.CarbonFootprintSegmentReferences = exports.CarbonFootprintIntensityIndicatorReference = void 0;
20
+ exports.ResultExtensions = 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.InvalidUserBusinessStatusError = exports.InvalidUserTypeError = exports.DivisionByZeroError = exports.MoneyOverflowError = exports.NotIntegerError = exports.NegativeAmountError = exports.MinimumValueViolationError = exports.InvalidUrlListError = exports.InvalidCodeListError = exports.InvalidStringListError = exports.EmptyArrayNotAllowedError = exports.PasswordPolicyViolationError = exports.InvalidNationalNumberError = exports.InvalidFullInternationalNumberError = exports.InvalidEmailPolicyError = exports.InvalidCoordinatesError = exports.InvalidTimeFormatError = exports.InvalidDateRangeError = exports.InvalidDateFormatError = exports.OrderExceedsBudgetError = exports.ServiceCatalogNotFoundError = exports.ContractNotFoundError = void 0;
21
+ exports.CarbonCoordinatorAssignedByStakeholder = exports.CarbonCoordinatorLastAccessAt = exports.CarbonCoordinatorTaxIdentification = exports.CarbonCoordinatorBusinessStatus = exports.CarbonCoordinatorRoleType = exports.CarbonCoordinatorManagedCarbonClients = exports.CarbonCoordinatorWeeklyWorkingSchedule = exports.CarbonCoordinatorGender = exports.CarbonCoordinatorUserType = exports.CarbonCoordinatorAvailabilityStatus = exports.CarbonCoordinatorDisplayName = exports.CarbonCoordinatorEmail = exports.CarbonCoordinatorId = exports.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.CannotAccessRightOnLeftValueError = exports.CannotAccessLeftOnRightValueError = void 0;
22
+ exports.CalculationJobFailedDomainEvent = exports.CalculationJobCompletedDomainEvent = exports.CalculationJobStartedDomainEvent = exports.WorkflowPausedDomainEvent = 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.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 = void 0;
23
+ 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 = void 0;
24
24
  // ─── Entity Classes (For Application Layer) ─────────────────────────────────
25
25
  var ActivityDataSubmission_1 = require("../carbonbox/activity-data-collection/activity-data-submissions/domain/entity/ActivityDataSubmission");
26
26
  Object.defineProperty(exports, "ActivityDataSubmission", { enumerable: true, get: function () { return ActivityDataSubmission_1.ActivityDataSubmission; } });
@@ -1523,6 +1523,32 @@ var InvalidColombianNITCheckDigitError_1 = require("../carbonbox/shared/domain/e
1523
1523
  Object.defineProperty(exports, "InvalidColombianNITCheckDigitError", { enumerable: true, get: function () { return InvalidColombianNITCheckDigitError_1.InvalidColombianNITCheckDigitError; } });
1524
1524
  var InvalidColombianNITNumberError_1 = require("../carbonbox/shared/domain/exceptions/InvalidColombianNITNumberError");
1525
1525
  Object.defineProperty(exports, "InvalidColombianNITNumberError", { enumerable: true, get: function () { return InvalidColombianNITNumberError_1.InvalidColombianNITNumberError; } });
1526
+ // Authentication Exceptions
1527
+ var InvalidCredentialsError_1 = require("../carbonbox/shared/domain/exceptions/InvalidCredentialsError");
1528
+ Object.defineProperty(exports, "InvalidCredentialsError", { enumerable: true, get: function () { return InvalidCredentialsError_1.InvalidCredentialsError; } });
1529
+ var TokenExpiredError_1 = require("../carbonbox/shared/domain/exceptions/TokenExpiredError");
1530
+ Object.defineProperty(exports, "TokenExpiredError", { enumerable: true, get: function () { return TokenExpiredError_1.TokenExpiredError; } });
1531
+ var MissingCredentialsError_1 = require("../carbonbox/shared/domain/exceptions/MissingCredentialsError");
1532
+ Object.defineProperty(exports, "MissingCredentialsError", { enumerable: true, get: function () { return MissingCredentialsError_1.MissingCredentialsError; } });
1533
+ var AccountLockedError_1 = require("../carbonbox/shared/domain/exceptions/AccountLockedError");
1534
+ Object.defineProperty(exports, "AccountLockedError", { enumerable: true, get: function () { return AccountLockedError_1.AccountLockedError; } });
1535
+ var EmailNotVerifiedError_1 = require("../carbonbox/shared/domain/exceptions/EmailNotVerifiedError");
1536
+ Object.defineProperty(exports, "EmailNotVerifiedError", { enumerable: true, get: function () { return EmailNotVerifiedError_1.EmailNotVerifiedError; } });
1537
+ // Stakeholder Exceptions
1538
+ var StakeholderNotFoundError_1 = require("../carbonbox/shared/domain/exceptions/StakeholderNotFoundError");
1539
+ Object.defineProperty(exports, "StakeholderNotFoundError", { enumerable: true, get: function () { return StakeholderNotFoundError_1.StakeholderNotFoundError; } });
1540
+ var InvalidBusinessStatusError_1 = require("../carbonbox/shared/domain/exceptions/InvalidBusinessStatusError");
1541
+ Object.defineProperty(exports, "InvalidBusinessStatusError", { enumerable: true, get: function () { return InvalidBusinessStatusError_1.InvalidBusinessStatusError; } });
1542
+ // Configuration Exceptions
1543
+ var ConfigurationNotFoundError_1 = require("../carbonbox/shared/domain/exceptions/ConfigurationNotFoundError");
1544
+ Object.defineProperty(exports, "ConfigurationNotFoundError", { enumerable: true, get: function () { return ConfigurationNotFoundError_1.ConfigurationNotFoundError; } });
1545
+ // Purchase Management System Exceptions
1546
+ var ContractNotFoundError_1 = require("../carbonbox/shared/domain/exceptions/ContractNotFoundError");
1547
+ Object.defineProperty(exports, "ContractNotFoundError", { enumerable: true, get: function () { return ContractNotFoundError_1.ContractNotFoundError; } });
1548
+ var ServiceCatalogNotFoundError_1 = require("../carbonbox/shared/domain/exceptions/ServiceCatalogNotFoundError");
1549
+ Object.defineProperty(exports, "ServiceCatalogNotFoundError", { enumerable: true, get: function () { return ServiceCatalogNotFoundError_1.ServiceCatalogNotFoundError; } });
1550
+ var OrderExceedsBudgetError_1 = require("../carbonbox/shared/domain/exceptions/OrderExceedsBudgetError");
1551
+ Object.defineProperty(exports, "OrderExceedsBudgetError", { enumerable: true, get: function () { return OrderExceedsBudgetError_1.OrderExceedsBudgetError; } });
1526
1552
  // Data Validation Exceptions
1527
1553
  var InvalidDateFormatError_1 = require("../carbonbox/shared/domain/exceptions/InvalidDateFormatError");
1528
1554
  Object.defineProperty(exports, "InvalidDateFormatError", { enumerable: true, get: function () { return InvalidDateFormatError_1.InvalidDateFormatError; } });
@@ -1,7 +1,13 @@
1
- import { RootError } from '../../../../shared/domain/exceptions/RootError';
2
- export declare class InvalidContractStatusError extends RootError {
1
+ import { CodedRootError } from '../../../../shared/domain/exceptions/CodedRootError';
2
+ /**
3
+ * Exception thrown when an invalid contract status is provided
4
+ * This error occurs when the contract status doesn't match allowed values
5
+ *
6
+ * Error code: CBX-PMS-002
7
+ * @since 1.0.0
8
+ */
9
+ export declare class InvalidContractStatusError extends CodedRootError {
3
10
  private constructor();
4
11
  static create(contractStatus: string, validStatuses: string[]): InvalidContractStatusError;
5
- logError(): string;
6
12
  }
7
13
  //# sourceMappingURL=InvalidContractStatusError.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InvalidContractStatusError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidContractStatusError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAE3E,qBAAa,0BAA2B,SAAQ,SAAS;IACvD,OAAO;WAOgB,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,0BAA0B;IAI1F,QAAQ,IAAI,MAAM;CAGnC"}
1
+ {"version":3,"file":"InvalidContractStatusError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidContractStatusError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AAGrF;;;;;;GAMG;AACH,qBAAa,0BAA2B,SAAQ,cAAc;IAC5D,OAAO;WAsBgB,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,0BAA0B;CAG3G"}
@@ -1,7 +1,13 @@
1
- import { RootError } from '../../../../shared/domain/exceptions/RootError';
2
- export declare class InvalidPaymentTermsError extends RootError {
1
+ import { CodedRootError } from '../../../../shared/domain/exceptions/CodedRootError';
2
+ /**
3
+ * Exception thrown when invalid payment terms are provided for a contract
4
+ * This error occurs when the payment terms don't match allowed values
5
+ *
6
+ * Error code: CBX-PMS-003
7
+ * @since 1.0.0
8
+ */
9
+ export declare class InvalidPaymentTermsError extends CodedRootError {
3
10
  private constructor();
4
11
  static create(paymentTerms: string, validTerms: string[]): InvalidPaymentTermsError;
5
- logError(): string;
6
12
  }
7
13
  //# sourceMappingURL=InvalidPaymentTermsError.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InvalidPaymentTermsError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidPaymentTermsError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAE3E,qBAAa,wBAAyB,SAAQ,SAAS;IACrD,OAAO;WAOgB,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,wBAAwB;IAInF,QAAQ,IAAI,MAAM;CAGnC"}
1
+ {"version":3,"file":"InvalidPaymentTermsError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidPaymentTermsError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AAGrF;;;;;;GAMG;AACH,qBAAa,wBAAyB,SAAQ,cAAc;IAC1D,OAAO;WAsBgB,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,wBAAwB;CAGpG"}
@@ -0,0 +1,25 @@
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Exception thrown when a user account is locked
4
+ * This error occurs when too many failed login attempts or security violations
5
+ *
6
+ * Error code: CBX-AUTH-005
7
+ * @since 1.0.0
8
+ */
9
+ export declare class AccountLockedError extends CodedRootError {
10
+ private constructor();
11
+ static create(email: string, reason: string, lockedUntil?: Date, attemptCount?: number): AccountLockedError;
12
+ /**
13
+ * Creates an AccountLockedError for too many failed attempts
14
+ */
15
+ static tooManyAttempts(email: string, attemptCount: number, lockedUntil: Date): AccountLockedError;
16
+ /**
17
+ * Creates an AccountLockedError for security violation
18
+ */
19
+ static securityViolation(email: string, lockedUntil?: Date): AccountLockedError;
20
+ /**
21
+ * Creates an AccountLockedError for administrative lock
22
+ */
23
+ static administrativeLock(email: string, reason: string): AccountLockedError;
24
+ }
25
+ //# sourceMappingURL=AccountLockedError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountLockedError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/AccountLockedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;;GAMG;AACH,qBAAa,kBAAmB,SAAQ,cAAc;IACpD,OAAO;WA+BgB,MAAM,CAC3B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,IAAI,EAClB,YAAY,CAAC,EAAE,MAAM,GACpB,kBAAkB;IAIrB;;OAEG;WACW,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,GAAG,kBAAkB;IAIzG;;OAEG;WACW,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,IAAI,GAAG,kBAAkB;IAItF;;OAEG;WACW,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,kBAAkB;CAGpF"}
@@ -0,0 +1,29 @@
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Exception thrown when a carbon footprint configuration is not found
4
+ * This error occurs when searching for configurations by ID, type, or other criteria
5
+ *
6
+ * Error code: CBX-CFC-001
7
+ * @since 1.0.0
8
+ */
9
+ export declare class ConfigurationNotFoundError extends CodedRootError {
10
+ private constructor();
11
+ static create(configurationType: string, searchCriteria: string, searchValue: string, clientId?: string): ConfigurationNotFoundError;
12
+ /**
13
+ * Creates an error for missing corporate configuration
14
+ */
15
+ static corporate(id: string, clientId?: string): ConfigurationNotFoundError;
16
+ /**
17
+ * Creates an error for missing product configuration
18
+ */
19
+ static product(id: string, clientId?: string): ConfigurationNotFoundError;
20
+ /**
21
+ * Creates an error for missing event configuration
22
+ */
23
+ static event(id: string, clientId?: string): ConfigurationNotFoundError;
24
+ /**
25
+ * Creates an error for missing configuration by period
26
+ */
27
+ static byPeriod(configurationType: string, period: string, clientId?: string): ConfigurationNotFoundError;
28
+ }
29
+ //# sourceMappingURL=ConfigurationNotFoundError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfigurationNotFoundError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/ConfigurationNotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;;GAMG;AACH,qBAAa,0BAA2B,SAAQ,cAAc;IAC5D,OAAO;WA6BgB,MAAM,CAC3B,iBAAiB,EAAE,MAAM,EACzB,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,MAAM,GAChB,0BAA0B;IAI7B;;OAEG;WACW,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,0BAA0B;IAIlF;;OAEG;WACW,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,0BAA0B;IAIhF;;OAEG;WACW,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,0BAA0B;IAI9E;;OAEG;WACW,QAAQ,CAAC,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,0BAA0B;CAGjH"}
@@ -0,0 +1,25 @@
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Exception thrown when a purchase contract is not found in the system
4
+ * This error occurs when searching for contracts by ID, client, or other criteria
5
+ *
6
+ * Error code: CBX-PMS-001
7
+ * @since 1.0.0
8
+ */
9
+ export declare class ContractNotFoundError extends CodedRootError {
10
+ private constructor();
11
+ static create(searchCriteria: string, searchValue: string, clientId?: string, contractType?: string): ContractNotFoundError;
12
+ /**
13
+ * Creates a ContractNotFoundError specifically for ID searches
14
+ */
15
+ static byId(id: string, clientId?: string): ContractNotFoundError;
16
+ /**
17
+ * Creates a ContractNotFoundError specifically for contract number searches
18
+ */
19
+ static byContractNumber(contractNumber: string, clientId?: string): ContractNotFoundError;
20
+ /**
21
+ * Creates a ContractNotFoundError for active contracts
22
+ */
23
+ static noActiveContract(clientId: string): ContractNotFoundError;
24
+ }
25
+ //# sourceMappingURL=ContractNotFoundError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContractNotFoundError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/ContractNotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;;GAMG;AACH,qBAAa,qBAAsB,SAAQ,cAAc;IACvD,OAAO;WA+BgB,MAAM,CAC3B,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,MAAM,GACpB,qBAAqB;IAIxB;;OAEG;WACW,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,qBAAqB;IAIxE;;OAEG;WACW,gBAAgB,CAAC,cAAc,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,qBAAqB;IAIhG;;OAEG;WACW,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,qBAAqB;CAGxE"}
@@ -0,0 +1,27 @@
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Error thrown when a user tries to perform an action that requires
4
+ * a verified email address, but their email has not been verified yet.
5
+ *
6
+ * @since 1.0.0
7
+ */
8
+ export declare class EmailNotVerifiedError extends CodedRootError {
9
+ private constructor();
10
+ /**
11
+ * Factory method to create a new EmailNotVerifiedError instance
12
+ *
13
+ * @param email - The unverified email address
14
+ * @param actionAttempted - Optional description of the action the user attempted
15
+ * @returns A new EmailNotVerifiedError instance
16
+ */
17
+ static create(email: string, actionAttempted?: string): EmailNotVerifiedError;
18
+ /**
19
+ * Returns whether the error is related to accessing restricted features
20
+ */
21
+ isAccessRestriction(): boolean;
22
+ /**
23
+ * Returns a user-friendly message based on the locale
24
+ */
25
+ getUserMessage(locale?: string): string;
26
+ }
27
+ //# sourceMappingURL=EmailNotVerifiedError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmailNotVerifiedError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/EmailNotVerifiedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,cAAc;IACvD,OAAO;IA+BP;;;;;;OAMG;WACoB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,qBAAqB;IAI7F;;OAEG;IACI,mBAAmB,IAAI,OAAO;IAIrC;;OAEG;IACI,cAAc,CAAC,MAAM,GAAE,MAAa,GAAG,MAAM;CASrD"}
@@ -0,0 +1,25 @@
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Exception thrown when a business status transition is invalid
4
+ * This error occurs when attempting to change a stakeholder or entity status to an invalid state
5
+ *
6
+ * Error code: CBX-STK-005
7
+ * @since 1.0.0
8
+ */
9
+ export declare class InvalidBusinessStatusError extends CodedRootError {
10
+ private constructor();
11
+ static create(currentStatus: string, attemptedStatus: string, entityType: string, entityId?: string): InvalidBusinessStatusError;
12
+ /**
13
+ * Creates an error for invalid activation attempts
14
+ */
15
+ static cannotActivate(currentStatus: string, entityType: string, entityId?: string): InvalidBusinessStatusError;
16
+ /**
17
+ * Creates an error for invalid deactivation attempts
18
+ */
19
+ static cannotDeactivate(currentStatus: string, entityType: string, entityId?: string): InvalidBusinessStatusError;
20
+ /**
21
+ * Creates an error for invalid deletion attempts
22
+ */
23
+ static cannotDelete(currentStatus: string, entityType: string, entityId?: string): InvalidBusinessStatusError;
24
+ }
25
+ //# sourceMappingURL=InvalidBusinessStatusError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvalidBusinessStatusError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidBusinessStatusError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;;GAMG;AACH,qBAAa,0BAA2B,SAAQ,cAAc;IAC5D,OAAO;WA6BgB,MAAM,CAC3B,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,MAAM,GAChB,0BAA0B;IAI7B;;OAEG;WACW,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,0BAA0B;IAItH;;OAEG;WACW,gBAAgB,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,0BAA0B;IAIxH;;OAEG;WACW,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,0BAA0B;CAGrH"}
@@ -0,0 +1,13 @@
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Exception thrown when authentication credentials are invalid
4
+ * This error is used when the email/password combination is incorrect
5
+ *
6
+ * Error code: CBX-AUTH-001
7
+ * @since 1.0.0
8
+ */
9
+ export declare class InvalidCredentialsError extends CodedRootError {
10
+ private constructor();
11
+ static create(email: string, attemptNumber?: number): InvalidCredentialsError;
12
+ }
13
+ //# sourceMappingURL=InvalidCredentialsError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvalidCredentialsError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidCredentialsError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;;GAMG;AACH,qBAAa,uBAAwB,SAAQ,cAAc;IACzD,OAAO;WAqBgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,uBAAuB;CAG9F"}
@@ -1,7 +1,27 @@
1
- import { RootError } from './RootError';
2
- export declare class InvalidCurrencyError extends RootError {
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Error thrown when an invalid currency code is provided
4
+ * that does not match the accepted currency standards.
5
+ *
6
+ * @since 1.0.0
7
+ */
8
+ export declare class InvalidCurrencyError extends CodedRootError {
3
9
  private constructor();
10
+ /**
11
+ * Factory method to create a new InvalidCurrencyError instance
12
+ *
13
+ * @param currency - The invalid currency code provided
14
+ * @param validCurrencies - List of valid currency codes
15
+ * @returns A new InvalidCurrencyError instance
16
+ */
4
17
  static create(currency: string, validCurrencies: string[]): InvalidCurrencyError;
5
- logError(): string;
18
+ /**
19
+ * Checks if the provided currency might be a common typo
20
+ */
21
+ isPossibleTypo(): boolean;
22
+ /**
23
+ * Returns a user-friendly message based on the locale
24
+ */
25
+ getUserMessage(locale?: string): string;
6
26
  }
7
27
  //# sourceMappingURL=InvalidCurrencyError.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InvalidCurrencyError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidCurrencyError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,oBAAqB,SAAQ,SAAS;IACjD,OAAO;WAOgB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,oBAAoB;IAIhF,QAAQ,IAAI,MAAM;CAGnC"}
1
+ {"version":3,"file":"InvalidCurrencyError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidCurrencyError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;GAKG;AACH,qBAAa,oBAAqB,SAAQ,cAAc;IACtD,OAAO;IA4BP;;;;;;OAMG;WACoB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,oBAAoB;IAIhG;;OAEG;IACI,cAAc,IAAI,OAAO;IAYhC;;OAEG;IACI,cAAc,CAAC,MAAM,GAAE,MAAa,GAAG,MAAM;CASrD"}
@@ -0,0 +1,25 @@
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Exception thrown when required authentication credentials are missing
4
+ * This error occurs when email, password, or both are not provided
5
+ *
6
+ * Error code: CBX-AUTH-004
7
+ * @since 1.0.0
8
+ */
9
+ export declare class MissingCredentialsError extends CodedRootError {
10
+ private constructor();
11
+ static create(missingFields: string[]): MissingCredentialsError;
12
+ /**
13
+ * Creates a MissingCredentialsError for missing email
14
+ */
15
+ static missingEmail(): MissingCredentialsError;
16
+ /**
17
+ * Creates a MissingCredentialsError for missing password
18
+ */
19
+ static missingPassword(): MissingCredentialsError;
20
+ /**
21
+ * Creates a MissingCredentialsError for both missing email and password
22
+ */
23
+ static missingBoth(): MissingCredentialsError;
24
+ }
25
+ //# sourceMappingURL=MissingCredentialsError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MissingCredentialsError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/MissingCredentialsError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;;GAMG;AACH,qBAAa,uBAAwB,SAAQ,cAAc;IACzD,OAAO;WAqBgB,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,uBAAuB;IAI/E;;OAEG;WACW,YAAY,IAAI,uBAAuB;IAIrD;;OAEG;WACW,eAAe,IAAI,uBAAuB;IAIxD;;OAEG;WACW,WAAW,IAAI,uBAAuB;CAGrD"}
@@ -0,0 +1,42 @@
1
+ import { CodedRootError } from './CodedRootError';
2
+ /**
3
+ * Error thrown when a purchase order exceeds the allocated budget limit.
4
+ * This error helps prevent overspending and maintains financial controls.
5
+ *
6
+ * @since 1.0.0
7
+ */
8
+ export declare class OrderExceedsBudgetError extends CodedRootError {
9
+ private constructor();
10
+ /**
11
+ * Factory method to create a new OrderExceedsBudgetError instance
12
+ *
13
+ * @param orderAmount - The total amount of the order
14
+ * @param budgetLimit - The maximum budget allowed
15
+ * @param currency - The currency code (e.g., USD, EUR)
16
+ * @param orderId - Optional order identifier
17
+ * @param projectName - Optional project or department name
18
+ * @returns A new OrderExceedsBudgetError instance
19
+ */
20
+ static create(orderAmount: number, budgetLimit: number, currency?: string, orderId?: string, projectName?: string): OrderExceedsBudgetError;
21
+ /**
22
+ * Returns the amount by which the order exceeds the budget
23
+ */
24
+ getExceedAmount(): number;
25
+ /**
26
+ * Returns the percentage by which the order exceeds the budget
27
+ */
28
+ getExceedPercentage(): number;
29
+ /**
30
+ * Checks if the order is slightly over budget (less than 10%)
31
+ */
32
+ isSlightlyOverBudget(): boolean;
33
+ /**
34
+ * Returns a user-friendly message based on the locale
35
+ */
36
+ getUserMessage(locale?: string): string;
37
+ /**
38
+ * Returns a detailed user message with amounts
39
+ */
40
+ getDetailedUserMessage(locale?: string): string;
41
+ }
42
+ //# sourceMappingURL=OrderExceedsBudgetError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderExceedsBudgetError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/OrderExceedsBudgetError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;;;GAKG;AACH,qBAAa,uBAAwB,SAAQ,cAAc;IACzD,OAAO;IA+CP;;;;;;;;;OASG;WACoB,MAAM,CAC3B,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,QAAQ,GAAE,MAAc,EACxB,OAAO,CAAC,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,GACnB,uBAAuB;IAU1B;;OAEG;IACI,eAAe,IAAI,MAAM;IAIhC;;OAEG;IACI,mBAAmB,IAAI,MAAM;IAIpC;;OAEG;IACI,oBAAoB,IAAI,OAAO;IAItC;;OAEG;IACI,cAAc,CAAC,MAAM,GAAE,MAAa,GAAG,MAAM;IAUpD;;OAEG;IACI,sBAAsB,CAAC,MAAM,GAAE,MAAa,GAAG,MAAM;CAa7D"}