@carbonbox/domain 0.28.2 → 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.
- package/build/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidContractStatusError.js +24 -7
- package/build/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidPaymentTermsError.js +24 -7
- package/build/carbonbox/reporting/report-instances/domain/value-objects/ReportInstanceId.js +52 -0
- package/build/carbonbox/reporting/report-templates/domain/enums/ReportTemplateStatus.js +26 -0
- package/build/carbonbox/reporting/report-templates/domain/types/ReportTemplatePrimitives.js +2 -0
- package/build/carbonbox/reporting/report-templates/domain/types/ReportTemplateProps.js +2 -0
- package/build/carbonbox/reporting/report-templates/domain/value-objects/ReportTemplateId.js +52 -0
- package/build/carbonbox/reporting/shared/domain/enums/BlockNature.js +30 -0
- package/build/carbonbox/reporting/shared/domain/enums/DataBindingSource.js +91 -0
- package/build/carbonbox/reporting/shared/domain/enums/ReportStatus.js +42 -0
- package/build/carbonbox/reporting/shared/domain/enums/ReportType.js +30 -0
- package/build/carbonbox/reporting/shared/domain/exceptions/EmptyReportSectionBlocksError.js +18 -0
- package/build/carbonbox/reporting/shared/domain/exceptions/InvalidReportInstanceIdError.js +18 -0
- package/build/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionIdError.js +18 -0
- package/build/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionOrderError.js +18 -0
- package/build/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionTitleError.js +18 -0
- package/build/carbonbox/reporting/shared/domain/exceptions/InvalidReportTemplateIdError.js +18 -0
- package/build/carbonbox/reporting/shared/domain/types/ReportBlockPrimitives.js +2 -0
- package/build/carbonbox/reporting/shared/domain/types/ReportSectionPrimitives.js +2 -0
- package/build/carbonbox/reporting/shared/domain/value-objects/ReportSection.js +67 -0
- package/build/carbonbox/reporting/text-banks/domain/value-objects/TextBankId.js +52 -0
- package/build/carbonbox/shared/domain/enums/ErrorCode.js +81 -0
- package/build/carbonbox/shared/domain/enums/SemanticUuidPrefix.js +6 -0
- package/build/carbonbox/shared/domain/exceptions/AccountLockedError.js +58 -0
- package/build/carbonbox/shared/domain/exceptions/CodedRootError.js +63 -0
- package/build/carbonbox/shared/domain/exceptions/ConfigurationNotFoundError.js +62 -0
- package/build/carbonbox/shared/domain/exceptions/ContractNotFoundError.js +58 -0
- package/build/carbonbox/shared/domain/exceptions/EmailNotVerifiedError.js +61 -0
- package/build/carbonbox/shared/domain/exceptions/InvalidBusinessStatusError.js +56 -0
- package/build/carbonbox/shared/domain/exceptions/InvalidCredentialsError.js +35 -0
- package/build/carbonbox/shared/domain/exceptions/InvalidCurrencyError.js +51 -6
- package/build/carbonbox/shared/domain/exceptions/InvalidDateFormatError.js +26 -6
- package/build/carbonbox/shared/domain/exceptions/InvalidEmailPolicyError.js +15 -7
- package/build/carbonbox/shared/domain/exceptions/MissingCredentialsError.js +53 -0
- package/build/carbonbox/shared/domain/exceptions/NullValueError.js +16 -7
- package/build/carbonbox/shared/domain/exceptions/OrderExceedsBudgetError.js +98 -0
- package/build/carbonbox/shared/domain/exceptions/ServiceCatalogNotFoundError.js +64 -0
- package/build/carbonbox/shared/domain/exceptions/StakeholderNotFoundError.js +49 -0
- package/build/carbonbox/shared/domain/exceptions/TokenExpiredError.js +48 -0
- package/build/carbonbox/shared/domain/interfaces/ICodedError.js +2 -0
- package/build/main/index.js +37 -7
- package/build/types/carbonbox/carbon-footprint-configurations/corporate-configurations/domain/repository/ICorporateCarbonFootprintConfigurationRepository.d.ts +1 -1
- package/build/types/carbonbox/carbon-footprint-configurations/corporate-configurations/domain/repository/ICorporateCarbonFootprintConfigurationRepository.d.ts.map +1 -1
- package/build/types/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidContractStatusError.d.ts +9 -3
- package/build/types/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidContractStatusError.d.ts.map +1 -1
- package/build/types/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidPaymentTermsError.d.ts +9 -3
- package/build/types/carbonbox/purchase-management-system/purchase-contracts/domain/exceptions/InvalidPaymentTermsError.d.ts.map +1 -1
- package/build/types/carbonbox/reporting/report-instances/domain/value-objects/ReportInstanceId.d.ts +14 -0
- package/build/types/carbonbox/reporting/report-instances/domain/value-objects/ReportInstanceId.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-templates/domain/enums/ReportTemplateStatus.d.ts +23 -0
- package/build/types/carbonbox/reporting/report-templates/domain/enums/ReportTemplateStatus.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-templates/domain/types/ReportTemplatePrimitives.d.ts +21 -0
- package/build/types/carbonbox/reporting/report-templates/domain/types/ReportTemplatePrimitives.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-templates/domain/types/ReportTemplateProps.d.ts +17 -0
- package/build/types/carbonbox/reporting/report-templates/domain/types/ReportTemplateProps.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/report-templates/domain/value-objects/ReportTemplateId.d.ts +14 -0
- package/build/types/carbonbox/reporting/report-templates/domain/value-objects/ReportTemplateId.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/enums/BlockNature.d.ts +27 -0
- package/build/types/carbonbox/reporting/shared/domain/enums/BlockNature.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/enums/DataBindingSource.d.ts +72 -0
- package/build/types/carbonbox/reporting/shared/domain/enums/DataBindingSource.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/enums/ReportStatus.d.ts +39 -0
- package/build/types/carbonbox/reporting/shared/domain/enums/ReportStatus.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/enums/ReportType.d.ts +27 -0
- package/build/types/carbonbox/reporting/shared/domain/enums/ReportType.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/exceptions/EmptyReportSectionBlocksError.d.ts +7 -0
- package/build/types/carbonbox/reporting/shared/domain/exceptions/EmptyReportSectionBlocksError.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportInstanceIdError.d.ts +7 -0
- package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportInstanceIdError.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionIdError.d.ts +7 -0
- package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionIdError.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionOrderError.d.ts +7 -0
- package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionOrderError.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionTitleError.d.ts +7 -0
- package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionTitleError.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportTemplateIdError.d.ts +7 -0
- package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportTemplateIdError.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/types/ReportBlockPrimitives.d.ts +16 -0
- package/build/types/carbonbox/reporting/shared/domain/types/ReportBlockPrimitives.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/types/ReportSectionPrimitives.d.ts +10 -0
- package/build/types/carbonbox/reporting/shared/domain/types/ReportSectionPrimitives.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/shared/domain/value-objects/ReportSection.d.ts +18 -0
- package/build/types/carbonbox/reporting/shared/domain/value-objects/ReportSection.d.ts.map +1 -0
- package/build/types/carbonbox/reporting/text-banks/domain/value-objects/TextBankId.d.ts +14 -0
- package/build/types/carbonbox/reporting/text-banks/domain/value-objects/TextBankId.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/enums/ErrorCode.d.ts +71 -0
- package/build/types/carbonbox/shared/domain/enums/ErrorCode.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/enums/SemanticUuidPrefix.d.ts +6 -1
- package/build/types/carbonbox/shared/domain/enums/SemanticUuidPrefix.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/exceptions/AccountLockedError.d.ts +25 -0
- package/build/types/carbonbox/shared/domain/exceptions/AccountLockedError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/CodedRootError.d.ts +44 -0
- package/build/types/carbonbox/shared/domain/exceptions/CodedRootError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/ConfigurationNotFoundError.d.ts +29 -0
- package/build/types/carbonbox/shared/domain/exceptions/ConfigurationNotFoundError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/ContractNotFoundError.d.ts +25 -0
- package/build/types/carbonbox/shared/domain/exceptions/ContractNotFoundError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/EmailNotVerifiedError.d.ts +27 -0
- package/build/types/carbonbox/shared/domain/exceptions/EmailNotVerifiedError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/InvalidBusinessStatusError.d.ts +25 -0
- package/build/types/carbonbox/shared/domain/exceptions/InvalidBusinessStatusError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/InvalidCredentialsError.d.ts +13 -0
- package/build/types/carbonbox/shared/domain/exceptions/InvalidCredentialsError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/InvalidCurrencyError.d.ts +23 -3
- package/build/types/carbonbox/shared/domain/exceptions/InvalidCurrencyError.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/exceptions/InvalidDateFormatError.d.ts +3 -3
- package/build/types/carbonbox/shared/domain/exceptions/InvalidDateFormatError.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/exceptions/InvalidEmailPolicyError.d.ts +2 -3
- package/build/types/carbonbox/shared/domain/exceptions/InvalidEmailPolicyError.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/exceptions/MissingCredentialsError.d.ts +25 -0
- package/build/types/carbonbox/shared/domain/exceptions/MissingCredentialsError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/NullValueError.d.ts +2 -3
- package/build/types/carbonbox/shared/domain/exceptions/NullValueError.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/exceptions/OrderExceedsBudgetError.d.ts +42 -0
- package/build/types/carbonbox/shared/domain/exceptions/OrderExceedsBudgetError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/ServiceCatalogNotFoundError.d.ts +29 -0
- package/build/types/carbonbox/shared/domain/exceptions/ServiceCatalogNotFoundError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/StakeholderNotFoundError.d.ts +21 -0
- package/build/types/carbonbox/shared/domain/exceptions/StakeholderNotFoundError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/exceptions/TokenExpiredError.d.ts +21 -0
- package/build/types/carbonbox/shared/domain/exceptions/TokenExpiredError.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/interfaces/ICodedError.d.ts +38 -0
- package/build/types/carbonbox/shared/domain/interfaces/ICodedError.d.ts.map +1 -0
- package/build/types/main/index.d.ts +14 -0
- package/build/types/main/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InvalidEmailPolicyError = void 0;
|
|
4
|
-
const
|
|
5
|
-
|
|
4
|
+
const CodedRootError_1 = require("./CodedRootError");
|
|
5
|
+
const ErrorCode_1 = require("../enums/ErrorCode");
|
|
6
|
+
class InvalidEmailPolicyError extends CodedRootError_1.CodedRootError {
|
|
6
7
|
constructor(email) {
|
|
7
|
-
const
|
|
8
|
-
|
|
8
|
+
const errorCode = ErrorCode_1.ErrorCode.INVALID_EMAIL;
|
|
9
|
+
const technicalMessage = `The email "${email}" violates the domain policy`;
|
|
10
|
+
const context = {
|
|
11
|
+
email,
|
|
12
|
+
timestamp: new Date().toISOString(),
|
|
13
|
+
};
|
|
14
|
+
const suggestions = [
|
|
15
|
+
'Ensure the email follows the format: user@domain.com',
|
|
16
|
+
'Check for invalid characters or spaces',
|
|
17
|
+
'Verify the domain is allowed by your organization',
|
|
18
|
+
];
|
|
19
|
+
super(errorCode, technicalMessage, context, suggestions);
|
|
9
20
|
this.name = 'InvalidEmailPolicyError';
|
|
10
21
|
}
|
|
11
22
|
static create(email) {
|
|
12
23
|
return new InvalidEmailPolicyError(email);
|
|
13
24
|
}
|
|
14
|
-
logError() {
|
|
15
|
-
return `${this.name}: ${this.message}`;
|
|
16
|
-
}
|
|
17
25
|
}
|
|
18
26
|
exports.InvalidEmailPolicyError = InvalidEmailPolicyError;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MissingCredentialsError = void 0;
|
|
4
|
+
const CodedRootError_1 = require("./CodedRootError");
|
|
5
|
+
const ErrorCode_1 = require("../enums/ErrorCode");
|
|
6
|
+
/**
|
|
7
|
+
* Exception thrown when required authentication credentials are missing
|
|
8
|
+
* This error occurs when email, password, or both are not provided
|
|
9
|
+
*
|
|
10
|
+
* Error code: CBX-AUTH-004
|
|
11
|
+
* @since 1.0.0
|
|
12
|
+
*/
|
|
13
|
+
class MissingCredentialsError extends CodedRootError_1.CodedRootError {
|
|
14
|
+
constructor(missingFields) {
|
|
15
|
+
const errorCode = ErrorCode_1.ErrorCode.MISSING_CREDENTIALS;
|
|
16
|
+
const fieldsList = missingFields.join(', ');
|
|
17
|
+
const technicalMessage = `Missing required authentication credentials: ${fieldsList}`;
|
|
18
|
+
const context = {
|
|
19
|
+
missingFields,
|
|
20
|
+
timestamp: new Date().toISOString(),
|
|
21
|
+
};
|
|
22
|
+
const suggestions = [
|
|
23
|
+
'Provide all required credentials (email and password)',
|
|
24
|
+
'Ensure no fields are left empty',
|
|
25
|
+
'Check that your request includes all required authentication data',
|
|
26
|
+
'If using an API, verify the request payload structure',
|
|
27
|
+
];
|
|
28
|
+
super(errorCode, technicalMessage, context, suggestions);
|
|
29
|
+
this.name = 'MissingCredentialsError';
|
|
30
|
+
}
|
|
31
|
+
static create(missingFields) {
|
|
32
|
+
return new MissingCredentialsError(missingFields);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Creates a MissingCredentialsError for missing email
|
|
36
|
+
*/
|
|
37
|
+
static missingEmail() {
|
|
38
|
+
return new MissingCredentialsError(['email']);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Creates a MissingCredentialsError for missing password
|
|
42
|
+
*/
|
|
43
|
+
static missingPassword() {
|
|
44
|
+
return new MissingCredentialsError(['password']);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Creates a MissingCredentialsError for both missing email and password
|
|
48
|
+
*/
|
|
49
|
+
static missingBoth() {
|
|
50
|
+
return new MissingCredentialsError(['email', 'password']);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.MissingCredentialsError = MissingCredentialsError;
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NullValueError = void 0;
|
|
4
|
-
const
|
|
5
|
-
|
|
4
|
+
const CodedRootError_1 = require("./CodedRootError");
|
|
5
|
+
const ErrorCode_1 = require("../enums/ErrorCode");
|
|
6
|
+
class NullValueError extends CodedRootError_1.CodedRootError {
|
|
6
7
|
constructor(propertyName, expectedType) {
|
|
7
|
-
const
|
|
8
|
-
|
|
8
|
+
const errorCode = ErrorCode_1.ErrorCode.NULL_VALUE;
|
|
9
|
+
const technicalMessage = `Value constraint violation: '${propertyName}' cannot be null. Expected type: ${expectedType}.`;
|
|
10
|
+
const context = {
|
|
11
|
+
propertyName,
|
|
12
|
+
expectedType,
|
|
13
|
+
timestamp: new Date().toISOString(),
|
|
14
|
+
};
|
|
15
|
+
const suggestions = [
|
|
16
|
+
`Provide a valid value for '${propertyName}'`,
|
|
17
|
+
`Ensure '${propertyName}' is not null or undefined`,
|
|
18
|
+
`Check if the data source provides '${propertyName}'`,
|
|
19
|
+
];
|
|
20
|
+
super(errorCode, technicalMessage, context, suggestions);
|
|
9
21
|
this.name = 'NullValueError';
|
|
10
22
|
}
|
|
11
23
|
static create(propertyName, expectedType) {
|
|
12
24
|
return new NullValueError(propertyName, expectedType);
|
|
13
25
|
}
|
|
14
|
-
logError() {
|
|
15
|
-
return `${this.name}: ${this.message}`;
|
|
16
|
-
}
|
|
17
26
|
}
|
|
18
27
|
exports.NullValueError = NullValueError;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrderExceedsBudgetError = void 0;
|
|
4
|
+
const CodedRootError_1 = require("./CodedRootError");
|
|
5
|
+
const ErrorCode_1 = require("../enums/ErrorCode");
|
|
6
|
+
/**
|
|
7
|
+
* Error thrown when a purchase order exceeds the allocated budget limit.
|
|
8
|
+
* This error helps prevent overspending and maintains financial controls.
|
|
9
|
+
*
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
*/
|
|
12
|
+
class OrderExceedsBudgetError extends CodedRootError_1.CodedRootError {
|
|
13
|
+
constructor(orderAmount, budgetLimit, currency, orderId, projectName) {
|
|
14
|
+
const exceedAmount = orderAmount - budgetLimit;
|
|
15
|
+
const exceedPercentage = ((exceedAmount / budgetLimit) * 100).toFixed(2);
|
|
16
|
+
const technicalMessage = `Order ${orderId ? `#${orderId} ` : ''}exceeds budget limit by ${currency} ${exceedAmount.toFixed(2)} (${exceedPercentage}% over limit). Order amount: ${currency} ${orderAmount.toFixed(2)}, Budget limit: ${currency} ${budgetLimit.toFixed(2)}${projectName ? ` for project '${projectName}'` : ''}`;
|
|
17
|
+
const context = {
|
|
18
|
+
orderAmount,
|
|
19
|
+
budgetLimit,
|
|
20
|
+
exceedAmount,
|
|
21
|
+
exceedPercentage: parseFloat(exceedPercentage),
|
|
22
|
+
currency,
|
|
23
|
+
timestamp: new Date().toISOString(),
|
|
24
|
+
};
|
|
25
|
+
if (orderId) {
|
|
26
|
+
context.orderId = orderId;
|
|
27
|
+
}
|
|
28
|
+
if (projectName) {
|
|
29
|
+
context.projectName = projectName;
|
|
30
|
+
}
|
|
31
|
+
const suggestions = [
|
|
32
|
+
'Review the order items and quantities to reduce the total amount',
|
|
33
|
+
'Request a budget increase approval from the appropriate authority',
|
|
34
|
+
'Split the order into multiple smaller orders if possible',
|
|
35
|
+
'Consider alternative products or services that fit within budget',
|
|
36
|
+
'Check if there are any available discounts or promotions',
|
|
37
|
+
];
|
|
38
|
+
super(ErrorCode_1.ErrorCode.ORDER_EXCEEDS_BUDGET, technicalMessage, context, suggestions);
|
|
39
|
+
this.name = 'OrderExceedsBudgetError';
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Factory method to create a new OrderExceedsBudgetError instance
|
|
43
|
+
*
|
|
44
|
+
* @param orderAmount - The total amount of the order
|
|
45
|
+
* @param budgetLimit - The maximum budget allowed
|
|
46
|
+
* @param currency - The currency code (e.g., USD, EUR)
|
|
47
|
+
* @param orderId - Optional order identifier
|
|
48
|
+
* @param projectName - Optional project or department name
|
|
49
|
+
* @returns A new OrderExceedsBudgetError instance
|
|
50
|
+
*/
|
|
51
|
+
static create(orderAmount, budgetLimit, currency = 'USD', orderId, projectName) {
|
|
52
|
+
return new OrderExceedsBudgetError(orderAmount, budgetLimit, currency, orderId, projectName);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Returns the amount by which the order exceeds the budget
|
|
56
|
+
*/
|
|
57
|
+
getExceedAmount() {
|
|
58
|
+
return this.context?.exceedAmount || 0;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Returns the percentage by which the order exceeds the budget
|
|
62
|
+
*/
|
|
63
|
+
getExceedPercentage() {
|
|
64
|
+
return this.context?.exceedPercentage || 0;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Checks if the order is slightly over budget (less than 10%)
|
|
68
|
+
*/
|
|
69
|
+
isSlightlyOverBudget() {
|
|
70
|
+
return this.getExceedPercentage() < 10;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Returns a user-friendly message based on the locale
|
|
74
|
+
*/
|
|
75
|
+
getUserMessage(locale = 'en') {
|
|
76
|
+
const messages = {
|
|
77
|
+
en: 'The order amount exceeds the available budget',
|
|
78
|
+
es: 'El monto de la orden excede el presupuesto disponible',
|
|
79
|
+
pt: 'O valor do pedido excede o orçamento disponível',
|
|
80
|
+
};
|
|
81
|
+
return messages[locale] || messages.en;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Returns a detailed user message with amounts
|
|
85
|
+
*/
|
|
86
|
+
getDetailedUserMessage(locale = 'en') {
|
|
87
|
+
const currency = this.context?.currency || 'USD';
|
|
88
|
+
const exceedAmount = this.context?.exceedAmount || 0;
|
|
89
|
+
const exceedPercentage = this.context?.exceedPercentage || 0;
|
|
90
|
+
const messages = {
|
|
91
|
+
en: `Order exceeds budget by ${currency} ${exceedAmount.toFixed(2)} (${exceedPercentage}% over limit)`,
|
|
92
|
+
es: `La orden excede el presupuesto por ${currency} ${exceedAmount.toFixed(2)} (${exceedPercentage}% sobre el límite)`,
|
|
93
|
+
pt: `O pedido excede o orçamento em ${currency} ${exceedAmount.toFixed(2)} (${exceedPercentage}% acima do limite)`,
|
|
94
|
+
};
|
|
95
|
+
return messages[locale] || messages.en;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.OrderExceedsBudgetError = OrderExceedsBudgetError;
|
|
@@ -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;
|
package/build/main/index.js
CHANGED
|
@@ -14,13 +14,13 @@ exports.PurchaseContractType = exports.PurchaseContractStatus = exports.Purchase
|
|
|
14
14
|
exports.PurchaseOrderExpectedDeliveryDate = exports.PurchaseOrderCurrency = 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 = void 0;
|
|
15
15
|
exports.ServicePricingAllowsDiscounts = exports.ServicePricingMaximumUnits = 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 = void 0;
|
|
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
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
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 = void 0;
|
|
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
|
+
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.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; } });
|
|
@@ -1251,6 +1251,10 @@ var ObjectValueObject_1 = require("../carbonbox/shared/domain/value-objects/Obje
|
|
|
1251
1251
|
Object.defineProperty(exports, "ObjectValueObject", { enumerable: true, get: function () { return ObjectValueObject_1.ObjectValueObject; } });
|
|
1252
1252
|
var RootError_1 = require("../carbonbox/shared/domain/exceptions/RootError");
|
|
1253
1253
|
Object.defineProperty(exports, "RootError", { enumerable: true, get: function () { return RootError_1.RootError; } });
|
|
1254
|
+
var CodedRootError_1 = require("../carbonbox/shared/domain/exceptions/CodedRootError");
|
|
1255
|
+
Object.defineProperty(exports, "CodedRootError", { enumerable: true, get: function () { return CodedRootError_1.CodedRootError; } });
|
|
1256
|
+
var ErrorCode_1 = require("../carbonbox/shared/domain/enums/ErrorCode");
|
|
1257
|
+
Object.defineProperty(exports, "ErrorCode", { enumerable: true, get: function () { return ErrorCode_1.ErrorCode; } });
|
|
1254
1258
|
// ─── Shared Enums (Business Rules) ───────────────────────────────────────────
|
|
1255
1259
|
var UserType_1 = require("../carbonbox/shared/domain/enums/UserType");
|
|
1256
1260
|
Object.defineProperty(exports, "UserTypeEnum", { enumerable: true, get: function () { return UserType_1.UserType; } });
|
|
@@ -1519,6 +1523,32 @@ var InvalidColombianNITCheckDigitError_1 = require("../carbonbox/shared/domain/e
|
|
|
1519
1523
|
Object.defineProperty(exports, "InvalidColombianNITCheckDigitError", { enumerable: true, get: function () { return InvalidColombianNITCheckDigitError_1.InvalidColombianNITCheckDigitError; } });
|
|
1520
1524
|
var InvalidColombianNITNumberError_1 = require("../carbonbox/shared/domain/exceptions/InvalidColombianNITNumberError");
|
|
1521
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; } });
|
|
1522
1552
|
// Data Validation Exceptions
|
|
1523
1553
|
var InvalidDateFormatError_1 = require("../carbonbox/shared/domain/exceptions/InvalidDateFormatError");
|
|
1524
1554
|
Object.defineProperty(exports, "InvalidDateFormatError", { enumerable: true, get: function () { return InvalidDateFormatError_1.InvalidDateFormatError; } });
|
|
@@ -8,7 +8,7 @@ import { CorporateCarbonFootprintConfigurationName } from '../value-objects/Corp
|
|
|
8
8
|
import { CorporateCarbonFootprintConfigurationOwnedByCarbonClient } from '../value-objects/CorporateCarbonFootprintConfigurationOwnedByCarbonClient';
|
|
9
9
|
import { CorporateCarbonFootprintConfigurationReportingStandard } from '../value-objects/CorporateCarbonFootprintConfigurationReportingStandard';
|
|
10
10
|
import { CorporateCarbonFootprintConfigurationStatus } from '../value-objects/CorporateCarbonFootprintConfigurationStatus';
|
|
11
|
-
import { CorporateCarbonFootprintSegmentConfigurationId } from '
|
|
11
|
+
import { CorporateCarbonFootprintSegmentConfigurationId } from '../../corporate-segment-configurations/domain/value-objects/CorporateCarbonFootprintSegmentConfigurationId';
|
|
12
12
|
export interface ICorporateCarbonFootprintConfigurationRepository {
|
|
13
13
|
save(configuration: CorporateCarbonFootprintConfiguration): Promise<void>;
|
|
14
14
|
findById(id: CorporateCarbonFootprintConfigurationId): Promise<Nullable<CorporateCarbonFootprintConfiguration>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ICorporateCarbonFootprintConfigurationRepository.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/carbon-footprint-configurations/corporate-configurations/domain/repository/ICorporateCarbonFootprintConfigurationRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EAAE,qCAAqC,EAAE,MAAM,iDAAiD,CAAC;AACxG,OAAO,EAAE,yDAAyD,EAAE,MAAM,4EAA4E,CAAC;AACvJ,OAAO,EAAE,6CAA6C,EAAE,MAAM,gEAAgE,CAAC;AAC/H,OAAO,EAAE,kDAAkD,EAAE,MAAM,qEAAqE,CAAC;AACzI,OAAO,EAAE,uCAAuC,EAAE,MAAM,0DAA0D,CAAC;AACnH,OAAO,EAAE,yCAAyC,EAAE,MAAM,4DAA4D,CAAC;AACvH,OAAO,EAAE,wDAAwD,EAAE,MAAM,2EAA2E,CAAC;AACrJ,OAAO,EAAE,sDAAsD,EAAE,MAAM,yEAAyE,CAAC;AACjJ,OAAO,EAAE,2CAA2C,EAAE,MAAM,8DAA8D,CAAC;AAC3H,OAAO,EAAE,8CAA8C,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ICorporateCarbonFootprintConfigurationRepository.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/carbon-footprint-configurations/corporate-configurations/domain/repository/ICorporateCarbonFootprintConfigurationRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EAAE,qCAAqC,EAAE,MAAM,iDAAiD,CAAC;AACxG,OAAO,EAAE,yDAAyD,EAAE,MAAM,4EAA4E,CAAC;AACvJ,OAAO,EAAE,6CAA6C,EAAE,MAAM,gEAAgE,CAAC;AAC/H,OAAO,EAAE,kDAAkD,EAAE,MAAM,qEAAqE,CAAC;AACzI,OAAO,EAAE,uCAAuC,EAAE,MAAM,0DAA0D,CAAC;AACnH,OAAO,EAAE,yCAAyC,EAAE,MAAM,4DAA4D,CAAC;AACvH,OAAO,EAAE,wDAAwD,EAAE,MAAM,2EAA2E,CAAC;AACrJ,OAAO,EAAE,sDAAsD,EAAE,MAAM,yEAAyE,CAAC;AACjJ,OAAO,EAAE,2CAA2C,EAAE,MAAM,8DAA8D,CAAC;AAC3H,OAAO,EAAE,8CAA8C,EAAE,MAAM,4GAA4G,CAAC;AAE5K,MAAM,WAAW,gDAAgD;IAC/D,IAAI,CAAC,aAAa,EAAE,qCAAqC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,QAAQ,CAAC,EAAE,EAAE,uCAAuC,GAAG,OAAO,CAAC,QAAQ,CAAC,qCAAqC,CAAC,CAAC,CAAC;IAChH,UAAU,CAAC,IAAI,EAAE,yCAAyC,GAAG,OAAO,CAAC,QAAQ,CAAC,qCAAqC,CAAC,CAAC,CAAC;IACtH,4BAA4B,CAAC,mBAAmB,EAAE,wDAAwD,GAAG,OAAO,CAAC,qCAAqC,EAAE,CAAC,CAAC;IAC9J,6BAA6B,CAAC,oBAAoB,EAAE,yDAAyD,GAAG,OAAO,CAAC,qCAAqC,EAAE,CAAC,CAAC;IACjK,eAAe,CAAC,MAAM,EAAE,2CAA2C,GAAG,OAAO,CAAC,qCAAqC,EAAE,CAAC,CAAC;IACvH,sBAAsB,CAAC,aAAa,EAAE,kDAAkD,GAAG,OAAO,CAAC,qCAAqC,EAAE,CAAC,CAAC;IAC5I,0BAA0B,CAAC,iBAAiB,EAAE,sDAAsD,GAAG,OAAO,CAAC,qCAAqC,EAAE,CAAC,CAAC;IACxJ,iBAAiB,CAAC,QAAQ,EAAE,6CAA6C,GAAG,OAAO,CAAC,qCAAqC,EAAE,CAAC,CAAC;IAC7H,+BAA+B,CAAC,sBAAsB,EAAE,8CAA8C,GAAG,OAAO,CAAC,qCAAqC,EAAE,CAAC,CAAC;IAC1J,OAAO,IAAI,OAAO,CAAC,qCAAqC,EAAE,CAAC,CAAC;IAC5D,UAAU,CAAC,EAAE,EAAE,uCAAuC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxE"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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,
|
|
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 {
|
|
2
|
-
|
|
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,
|
|
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"}
|
package/build/types/carbonbox/reporting/report-instances/domain/value-objects/ReportInstanceId.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AggregateId } from '../../../../shared/domain/value-objects/AggregateId';
|
|
2
|
+
export declare class ReportInstanceId extends AggregateId {
|
|
3
|
+
private static readonly PROPERTY_NAME;
|
|
4
|
+
private static readonly VALID_PREFIXES;
|
|
5
|
+
private constructor();
|
|
6
|
+
static create(value: string): ReportInstanceId;
|
|
7
|
+
/**
|
|
8
|
+
* Validates that the UUID has a valid ReportInstance prefix
|
|
9
|
+
*/
|
|
10
|
+
private static guardAgainstInvalidPrefix;
|
|
11
|
+
static fromPrimitives(primitive: string): ReportInstanceId;
|
|
12
|
+
toPrimitives(): string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=ReportInstanceId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportInstanceId.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-instances/domain/value-objects/ReportInstanceId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAIlF,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAQ;IAE7C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAEpC;IAEF,OAAO;WAIgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB;IAW9D;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,yBAAyB;WA+BjB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB;IAM1D,YAAY,IAAI,MAAM;CAGvC"}
|