@carbonbox/domain 0.28.1 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/carbonbox/company-resources/facilities/domain/entity/Facility.js +11 -2
- 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/CodedRootError.js +63 -0
- 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/NullValueError.js +16 -7
- package/build/carbonbox/shared/domain/interfaces/ICodedError.js +2 -0
- package/build/main/index.js +11 -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/company-resources/facilities/domain/entity/Facility.d.ts +2 -0
- package/build/types/carbonbox/company-resources/facilities/domain/entity/Facility.d.ts.map +1 -1
- package/build/types/carbonbox/company-resources/facilities/domain/entity/IFacility.d.ts +2 -0
- package/build/types/carbonbox/company-resources/facilities/domain/entity/IFacility.d.ts.map +1 -1
- package/build/types/carbonbox/company-resources/facilities/domain/repository/IFacilityRepository.d.ts +1 -0
- package/build/types/carbonbox/company-resources/facilities/domain/repository/IFacilityRepository.d.ts.map +1 -1
- package/build/types/carbonbox/company-resources/facilities/domain/types/FacilityPrimitives.d.ts +1 -0
- package/build/types/carbonbox/company-resources/facilities/domain/types/FacilityPrimitives.d.ts.map +1 -1
- package/build/types/carbonbox/company-resources/facilities/domain/types/FacilityProps.d.ts +1 -0
- package/build/types/carbonbox/company-resources/facilities/domain/types/FacilityProps.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/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/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/NullValueError.d.ts +2 -3
- package/build/types/carbonbox/shared/domain/exceptions/NullValueError.d.ts.map +1 -1
- 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 +3 -0
- package/build/types/main/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ErrorCode = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Centralized error codes enum for the CarbonBox domain
|
|
6
|
+
* Format: CBX-[CONTEXT]-[NUMBER]
|
|
7
|
+
*
|
|
8
|
+
* Context Abbreviations:
|
|
9
|
+
* - AUTH: Authentication
|
|
10
|
+
* - PMS: Purchase Management System
|
|
11
|
+
* - STK: Stakeholders
|
|
12
|
+
* - CFC: Carbon Footprint Configurations
|
|
13
|
+
* - ADC: Activity Data Collection
|
|
14
|
+
* - EMC: Emission Calculations
|
|
15
|
+
* - SHR: Shared/Common
|
|
16
|
+
*
|
|
17
|
+
* @since 1.0.0
|
|
18
|
+
*/
|
|
19
|
+
var ErrorCode;
|
|
20
|
+
(function (ErrorCode) {
|
|
21
|
+
// Authentication Errors (CBX-AUTH-XXX)
|
|
22
|
+
ErrorCode["INVALID_CREDENTIALS"] = "CBX-AUTH-001";
|
|
23
|
+
ErrorCode["TOKEN_EXPIRED"] = "CBX-AUTH-002";
|
|
24
|
+
ErrorCode["TOKEN_INVALID"] = "CBX-AUTH-003";
|
|
25
|
+
ErrorCode["MISSING_CREDENTIALS"] = "CBX-AUTH-004";
|
|
26
|
+
ErrorCode["ACCOUNT_LOCKED"] = "CBX-AUTH-005";
|
|
27
|
+
ErrorCode["EMAIL_NOT_VERIFIED"] = "CBX-AUTH-006";
|
|
28
|
+
ErrorCode["PASSWORD_RESET_EXPIRED"] = "CBX-AUTH-007";
|
|
29
|
+
// Purchase Management System Errors (CBX-PMS-XXX)
|
|
30
|
+
ErrorCode["CONTRACT_NOT_FOUND"] = "CBX-PMS-001";
|
|
31
|
+
ErrorCode["INVALID_CONTRACT_STATUS"] = "CBX-PMS-002";
|
|
32
|
+
ErrorCode["INVALID_PAYMENT_TERMS"] = "CBX-PMS-003";
|
|
33
|
+
ErrorCode["ORDER_EXCEEDS_BUDGET"] = "CBX-PMS-004";
|
|
34
|
+
ErrorCode["DUPLICATE_ORDER"] = "CBX-PMS-005";
|
|
35
|
+
ErrorCode["INVALID_CURRENCY"] = "CBX-PMS-006";
|
|
36
|
+
ErrorCode["SERVICE_CATALOG_NOT_FOUND"] = "CBX-PMS-007";
|
|
37
|
+
// Stakeholder Errors (CBX-STK-XXX)
|
|
38
|
+
ErrorCode["STAKEHOLDER_EXISTS"] = "CBX-STK-001";
|
|
39
|
+
ErrorCode["INVALID_ROLE"] = "CBX-STK-002";
|
|
40
|
+
ErrorCode["STAKEHOLDER_NOT_FOUND"] = "CBX-STK-003";
|
|
41
|
+
ErrorCode["INSUFFICIENT_PERMISSIONS"] = "CBX-STK-004";
|
|
42
|
+
ErrorCode["INVALID_BUSINESS_STATUS"] = "CBX-STK-005";
|
|
43
|
+
ErrorCode["MANAGER_REQUIRED"] = "CBX-STK-006";
|
|
44
|
+
// Carbon Footprint Configuration Errors (CBX-CFC-XXX)
|
|
45
|
+
ErrorCode["CONFIGURATION_NOT_FOUND"] = "CBX-CFC-001";
|
|
46
|
+
ErrorCode["INVALID_REPORTING_STANDARD"] = "CBX-CFC-002";
|
|
47
|
+
ErrorCode["INVALID_COLLECTION_PERIOD"] = "CBX-CFC-003";
|
|
48
|
+
ErrorCode["CONFIGURATION_LOCKED"] = "CBX-CFC-004";
|
|
49
|
+
ErrorCode["DUPLICATE_CONFIGURATION"] = "CBX-CFC-005";
|
|
50
|
+
// Activity Data Collection Errors (CBX-ADC-XXX)
|
|
51
|
+
ErrorCode["FORM_NOT_FOUND"] = "CBX-ADC-001";
|
|
52
|
+
ErrorCode["INVALID_SUBMISSION"] = "CBX-ADC-002";
|
|
53
|
+
ErrorCode["SUBMISSION_LOCKED"] = "CBX-ADC-003";
|
|
54
|
+
ErrorCode["MISSING_REQUIRED_FIELDS"] = "CBX-ADC-004";
|
|
55
|
+
ErrorCode["INVALID_FIELD_TYPE"] = "CBX-ADC-005";
|
|
56
|
+
// Emission Calculation Errors (CBX-EMC-XXX)
|
|
57
|
+
ErrorCode["CALCULATION_FAILED"] = "CBX-EMC-001";
|
|
58
|
+
ErrorCode["MISSING_EMISSION_FACTOR"] = "CBX-EMC-002";
|
|
59
|
+
ErrorCode["INVALID_FORMULA"] = "CBX-EMC-003";
|
|
60
|
+
ErrorCode["JOB_NOT_FOUND"] = "CBX-EMC-004";
|
|
61
|
+
ErrorCode["JOB_ALREADY_RUNNING"] = "CBX-EMC-005";
|
|
62
|
+
// Shared/Common Errors (CBX-SHR-XXX)
|
|
63
|
+
ErrorCode["INVALID_EMAIL"] = "CBX-SHR-001";
|
|
64
|
+
ErrorCode["INVALID_DATE_FORMAT"] = "CBX-SHR-002";
|
|
65
|
+
ErrorCode["INVALID_COORDINATES"] = "CBX-SHR-003";
|
|
66
|
+
ErrorCode["INVALID_CURRENCY_CODE"] = "CBX-SHR-004";
|
|
67
|
+
ErrorCode["DATABASE_CONNECTION"] = "CBX-SHR-005";
|
|
68
|
+
ErrorCode["EXTERNAL_SERVICE"] = "CBX-SHR-006";
|
|
69
|
+
ErrorCode["INVALID_GENDER"] = "CBX-SHR-007";
|
|
70
|
+
ErrorCode["INVALID_PHONE_NUMBER"] = "CBX-SHR-008";
|
|
71
|
+
ErrorCode["INVALID_TAX_ID"] = "CBX-SHR-009";
|
|
72
|
+
ErrorCode["NULL_VALUE"] = "CBX-SHR-010";
|
|
73
|
+
ErrorCode["UNDEFINED_VALUE"] = "CBX-SHR-011";
|
|
74
|
+
ErrorCode["EMPTY_VALUE"] = "CBX-SHR-012";
|
|
75
|
+
ErrorCode["INVALID_PROPERTY_TYPE"] = "CBX-SHR-013";
|
|
76
|
+
ErrorCode["INVALID_PROPERTY_VALUE"] = "CBX-SHR-014";
|
|
77
|
+
ErrorCode["MINIMUM_VALUE_VIOLATION"] = "CBX-SHR-015";
|
|
78
|
+
ErrorCode["MAXIMUM_VALUE_VIOLATION"] = "CBX-SHR-016";
|
|
79
|
+
ErrorCode["INVALID_DATE_RANGE"] = "CBX-SHR-017";
|
|
80
|
+
ErrorCode["PASSWORD_POLICY_VIOLATION"] = "CBX-SHR-018";
|
|
81
|
+
})(ErrorCode || (exports.ErrorCode = ErrorCode = {}));
|
|
@@ -77,6 +77,12 @@ var SemanticUuidPrefix;
|
|
|
77
77
|
// Shared Domain
|
|
78
78
|
SemanticUuidPrefix["SHR_DOMAIN"] = "SHR-DOM";
|
|
79
79
|
SemanticUuidPrefix["SHR_EITHER"] = "SHR-ETH";
|
|
80
|
+
// Reporting Module
|
|
81
|
+
SemanticUuidPrefix["RPT_TEMPLATE"] = "RPT-TPL";
|
|
82
|
+
SemanticUuidPrefix["RPT_INSTANCE"] = "RPT-INS";
|
|
83
|
+
SemanticUuidPrefix["RPT_TEXT_BANK"] = "RPT-TXB";
|
|
84
|
+
SemanticUuidPrefix["RPT_SECTION"] = "RPT-SEC";
|
|
85
|
+
SemanticUuidPrefix["RPT_BLOCK"] = "RPT-BLK";
|
|
80
86
|
// Future expansion examples (when system grows):
|
|
81
87
|
// ADC_SUB_FIELDS = 'ADC-SUB-FLD', // Activity Data Collection -> Submissions -> Fields
|
|
82
88
|
// USR_STH_CHO_MGT = 'USR-STH-CHO-MGT', // Users -> Stakeholders -> Carbon Host -> Management
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CodedRootError = void 0;
|
|
4
|
+
const RootError_1 = require("./RootError");
|
|
5
|
+
/**
|
|
6
|
+
* Enhanced base class for all domain errors with error code support
|
|
7
|
+
* This extends the existing RootError to add error code functionality
|
|
8
|
+
* while maintaining backward compatibility
|
|
9
|
+
*
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
*/
|
|
12
|
+
class CodedRootError extends RootError_1.RootError {
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new CodedRootError instance
|
|
15
|
+
*
|
|
16
|
+
* @param errorCode - Unique error code (CBX-XXX-NNN)
|
|
17
|
+
* @param technicalMessage - Detailed technical message for debugging
|
|
18
|
+
* @param context - Optional context data safe to expose
|
|
19
|
+
* @param suggestions - Optional user action suggestions
|
|
20
|
+
*/
|
|
21
|
+
constructor(errorCode, technicalMessage, context, suggestions) {
|
|
22
|
+
// Call parent constructor with technical message
|
|
23
|
+
super(technicalMessage);
|
|
24
|
+
this.errorCode = errorCode;
|
|
25
|
+
this.technicalMessage = technicalMessage;
|
|
26
|
+
this.context = context;
|
|
27
|
+
this.suggestions = suggestions;
|
|
28
|
+
// Set the name to the constructor name for better logging
|
|
29
|
+
this.name = this.constructor.name;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Returns a log-friendly representation of the error
|
|
33
|
+
* Includes error code, name, technical message and context
|
|
34
|
+
*/
|
|
35
|
+
logError() {
|
|
36
|
+
const contextStr = this.context ? ` | Context: ${JSON.stringify(this.context)}` : '';
|
|
37
|
+
return `[${this.errorCode}] ${this.name}: ${this.technicalMessage}${contextStr}`;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Returns a safe representation of the error for external clients
|
|
41
|
+
* This excludes the technical message but includes code, context and suggestions
|
|
42
|
+
*/
|
|
43
|
+
toPublicError() {
|
|
44
|
+
return {
|
|
45
|
+
code: this.errorCode,
|
|
46
|
+
name: this.name,
|
|
47
|
+
...(this.context && { context: this.context }),
|
|
48
|
+
...(this.suggestions && { suggestions: this.suggestions }),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Checks if an error implements the ICodedError interface
|
|
53
|
+
*/
|
|
54
|
+
static isCodedError(error) {
|
|
55
|
+
return (typeof error === 'object' &&
|
|
56
|
+
error !== null &&
|
|
57
|
+
'errorCode' in error &&
|
|
58
|
+
'technicalMessage' in error &&
|
|
59
|
+
typeof error.errorCode === 'string' &&
|
|
60
|
+
typeof error.technicalMessage === 'string');
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.CodedRootError = CodedRootError;
|
|
@@ -1,18 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InvalidDateFormatError = void 0;
|
|
4
|
-
const
|
|
5
|
-
|
|
4
|
+
const CodedRootError_1 = require("./CodedRootError");
|
|
5
|
+
const ErrorCode_1 = require("../enums/ErrorCode");
|
|
6
|
+
class InvalidDateFormatError extends CodedRootError_1.CodedRootError {
|
|
6
7
|
constructor(value, expectedFormat) {
|
|
7
|
-
const
|
|
8
|
-
|
|
8
|
+
const errorCode = ErrorCode_1.ErrorCode.INVALID_DATE_FORMAT;
|
|
9
|
+
const technicalMessage = `Invalid date format: '${value}' does not match the required format '${expectedFormat}'.`;
|
|
10
|
+
const context = {
|
|
11
|
+
value,
|
|
12
|
+
expectedFormat,
|
|
13
|
+
timestamp: new Date().toISOString(),
|
|
14
|
+
};
|
|
15
|
+
const suggestions = [
|
|
16
|
+
`Use the format: ${expectedFormat}`,
|
|
17
|
+
`Example: ${InvalidDateFormatError.getFormatExample(expectedFormat)}`,
|
|
18
|
+
'Check the date separator characters',
|
|
19
|
+
'Verify the date components are in the correct order',
|
|
20
|
+
];
|
|
21
|
+
super(errorCode, technicalMessage, context, suggestions);
|
|
9
22
|
this.name = 'InvalidDateFormatError';
|
|
10
23
|
}
|
|
11
24
|
static create(value, expectedFormat) {
|
|
12
25
|
return new InvalidDateFormatError(value, expectedFormat);
|
|
13
26
|
}
|
|
14
|
-
|
|
15
|
-
|
|
27
|
+
static getFormatExample(format) {
|
|
28
|
+
const examples = {
|
|
29
|
+
'YYYY-MM-DD': '2024-03-15',
|
|
30
|
+
'DD/MM/YYYY': '15/03/2024',
|
|
31
|
+
'MM/DD/YYYY': '03/15/2024',
|
|
32
|
+
'ISO8601': '2024-03-15T10:30:00Z',
|
|
33
|
+
'YYYY-MM-DDTHH:mm:ss': '2024-03-15T10:30:00',
|
|
34
|
+
};
|
|
35
|
+
return examples[format] || '2024-03-15';
|
|
16
36
|
}
|
|
17
37
|
}
|
|
18
38
|
exports.InvalidDateFormatError = InvalidDateFormatError;
|
|
@@ -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;
|
|
@@ -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;
|
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.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;
|
|
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; } });
|
|
@@ -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"}
|
|
@@ -5,6 +5,7 @@ import { FacilityAddress } from '../value-objects/FacilityAddress';
|
|
|
5
5
|
import { FacilityCommercialBranchName } from '../value-objects/FacilityCommercialBranchName';
|
|
6
6
|
import { FacilityIsPrimaryFacility } from '../value-objects/FacilityIsPrimaryFacility';
|
|
7
7
|
import { FacilityOperationalScope } from '../value-objects/FacilityOperationalScope';
|
|
8
|
+
import { CarbonClientId } from '../../../../stakeholders/carbon-clients/domain/value-objects/CarbonClientId';
|
|
8
9
|
import { IFacility } from './IFacility';
|
|
9
10
|
export declare class Facility extends AggregateRoot<FacilityPrimitives> implements IFacility {
|
|
10
11
|
#private;
|
|
@@ -12,6 +13,7 @@ export declare class Facility extends AggregateRoot<FacilityPrimitives> implemen
|
|
|
12
13
|
static create(props: FacilityProps): Facility;
|
|
13
14
|
static fromPrimitives(primitives: FacilityPrimitives): Facility;
|
|
14
15
|
get toPrimitives(): FacilityPrimitives;
|
|
16
|
+
get carbonClientId(): CarbonClientId;
|
|
15
17
|
get commercialBranchName(): FacilityCommercialBranchName;
|
|
16
18
|
get address(): FacilityAddress;
|
|
17
19
|
get isPrimaryFacility(): FacilityIsPrimaryFacility;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Facility.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/company-resources/facilities/domain/entity/Facility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAE7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,QACX,SAAQ,aAAa,CAAC,kBAAkB,CACxC,YAAW,SAAS;;
|
|
1
|
+
{"version":3,"file":"Facility.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/company-resources/facilities/domain/entity/Facility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAE7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,6EAA6E,CAAC;AAC7G,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,QACX,SAAQ,aAAa,CAAC,kBAAkB,CACxC,YAAW,SAAS;;IAWpB,OAAO;WAwBgB,MAAM,CAAC,KAAK,EAAE,aAAa,GAAG,QAAQ;WAItC,cAAc,CAAC,UAAU,EAAE,kBAAkB,GAAG,QAAQ;IAa/E,IAAoB,YAAY,IAAI,kBAAkB,CASrD;IAED,IAAW,cAAc,IAAI,cAAc,CAE1C;IAED,IAAW,oBAAoB,IAAI,4BAA4B,CAE9D;IAED,IAAW,OAAO,IAAI,eAAe,CAEpC;IAED,IAAW,iBAAiB,IAAI,yBAAyB,CAExD;IAED,IAAW,gBAAgB,IAAI,wBAAwB,CAEtD;CACF"}
|
|
@@ -3,7 +3,9 @@ import { FacilityAddress } from '../value-objects/FacilityAddress';
|
|
|
3
3
|
import { FacilityCommercialBranchName } from '../value-objects/FacilityCommercialBranchName';
|
|
4
4
|
import { FacilityIsPrimaryFacility } from '../value-objects/FacilityIsPrimaryFacility';
|
|
5
5
|
import { FacilityOperationalScope } from '../value-objects/FacilityOperationalScope';
|
|
6
|
+
import { CarbonClientId } from '../../../../stakeholders/carbon-clients/domain/value-objects/CarbonClientId';
|
|
6
7
|
export interface IFacility extends IAggregateRoot {
|
|
8
|
+
carbonClientId: CarbonClientId;
|
|
7
9
|
commercialBranchName: FacilityCommercialBranchName;
|
|
8
10
|
address: FacilityAddress;
|
|
9
11
|
isPrimaryFacility: FacilityIsPrimaryFacility;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IFacility.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/company-resources/facilities/domain/entity/IFacility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"IFacility.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/company-resources/facilities/domain/entity/IFacility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,6EAA6E,CAAC;AAE7G,MAAM,WAAW,SAAU,SAAQ,cAAc;IAC/C,cAAc,EAAE,cAAc,CAAC;IAC/B,oBAAoB,EAAE,4BAA4B,CAAC;IACnD,OAAO,EAAE,eAAe,CAAC;IACzB,iBAAiB,EAAE,yBAAyB,CAAC;IAC7C,gBAAgB,EAAE,wBAAwB,CAAC;CAC5C"}
|
|
@@ -11,6 +11,7 @@ export interface IFacilityRepository {
|
|
|
11
11
|
findByCommercialBranchName(commercialBranchName: FacilityCommercialBranchName): Promise<Nullable<Facility>>;
|
|
12
12
|
findAllByAddress(address: FacilityAddress): Promise<Facility[]>;
|
|
13
13
|
findAllByIsPrimaryFacility(isPrimaryFacility: FacilityIsPrimaryFacility): Promise<Facility[]>;
|
|
14
|
+
findAllByIsPrimaryFacilityAndCarbonClientId(isPrimaryFacility: FacilityIsPrimaryFacility, carbonClientId: string): Promise<Facility[]>;
|
|
14
15
|
findAllByOperationalScope(operationalScope: FacilityOperationalScope): Promise<Facility[]>;
|
|
15
16
|
findAll(): Promise<Facility[]>;
|
|
16
17
|
deleteById(id: FacilityId): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IFacilityRepository.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/company-resources/facilities/domain/repository/IFacilityRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAErF,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IACtD,0BAA0B,CAAC,oBAAoB,EAAE,4BAA4B,GAAG,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5G,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAChE,0BAA0B,CAAC,iBAAiB,EAAE,yBAAyB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"IFacilityRepository.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/company-resources/facilities/domain/repository/IFacilityRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAErF,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IACtD,0BAA0B,CAAC,oBAAoB,EAAE,4BAA4B,GAAG,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5G,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAChE,0BAA0B,CAAC,iBAAiB,EAAE,yBAAyB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE9F,2CAA2C,CAAC,iBAAiB,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvI,yBAAyB,CAAC,gBAAgB,EAAE,wBAAwB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3F,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC/B,UAAU,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C"}
|
package/build/types/carbonbox/company-resources/facilities/domain/types/FacilityPrimitives.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { AddressPrimitives } from '../../../../shared/domain/types/AddressPrimit
|
|
|
2
2
|
import { AggregateRootPrimitives } from '../../../../shared/domain/types/AggregateRootPrimitives';
|
|
3
3
|
import { OperationalScopeType } from '../enums/OperationalScopeType';
|
|
4
4
|
export type FacilityPrimitives = AggregateRootPrimitives & {
|
|
5
|
+
carbonClientId: string;
|
|
5
6
|
commercialBranchName: string;
|
|
6
7
|
address: AddressPrimitives;
|
|
7
8
|
isPrimaryFacility: boolean;
|
package/build/types/carbonbox/company-resources/facilities/domain/types/FacilityPrimitives.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FacilityPrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/company-resources/facilities/domain/types/FacilityPrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,GAAG;IACzD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,gBAAgB,EAAE,oBAAoB,CAAC;CACxC,CAAC"}
|
|
1
|
+
{"version":3,"file":"FacilityPrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/company-resources/facilities/domain/types/FacilityPrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,GAAG;IACzD,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,gBAAgB,EAAE,oBAAoB,CAAC;CACxC,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { Address } from '../../../../shared/domain/types/Address';
|
|
|
2
2
|
import { AggregateRootProps } from '../../../../shared/domain/types/AggregateRootProps';
|
|
3
3
|
import { OperationalScopeType } from '../enums/OperationalScopeType';
|
|
4
4
|
export type FacilityProps = AggregateRootProps & {
|
|
5
|
+
carbonClientId: string;
|
|
5
6
|
commercialBranchName: string;
|
|
6
7
|
address: Address;
|
|
7
8
|
isPrimaryFacility: boolean;
|
package/build/types/carbonbox/company-resources/facilities/domain/types/FacilityProps.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FacilityProps.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/company-resources/facilities/domain/types/FacilityProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG;IAC/C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,gBAAgB,EAAE,oBAAoB,CAAC;CACxC,CAAC"}
|
|
1
|
+
{"version":3,"file":"FacilityProps.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/company-resources/facilities/domain/types/FacilityProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG;IAC/C,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,gBAAgB,EAAE,oBAAoB,CAAC;CACxC,CAAC"}
|
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"}
|
package/build/types/carbonbox/reporting/report-templates/domain/enums/ReportTemplateStatus.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Report template status enumeration
|
|
3
|
+
* Defines the lifecycle states of a report template
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ReportTemplateStatus {
|
|
6
|
+
/**
|
|
7
|
+
* Draft - Template is being edited
|
|
8
|
+
*/
|
|
9
|
+
DRAFT = "DRAFT",
|
|
10
|
+
/**
|
|
11
|
+
* Active - Template is available for use
|
|
12
|
+
*/
|
|
13
|
+
ACTIVE = "ACTIVE",
|
|
14
|
+
/**
|
|
15
|
+
* Deprecated - Template is no longer recommended but still accessible
|
|
16
|
+
*/
|
|
17
|
+
DEPRECATED = "DEPRECATED",
|
|
18
|
+
/**
|
|
19
|
+
* Archived - Template is soft deleted
|
|
20
|
+
*/
|
|
21
|
+
ARCHIVED = "ARCHIVED"
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=ReportTemplateStatus.d.ts.map
|
package/build/types/carbonbox/reporting/report-templates/domain/enums/ReportTemplateStatus.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportTemplateStatus.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-templates/domain/enums/ReportTemplateStatus.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,oBAAoB;IAC9B;;OAEG;IACH,KAAK,UAAU;IAEf;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,UAAU,eAAe;IAEzB;;OAEG;IACH,QAAQ,aAAa;CACtB"}
|
package/build/types/carbonbox/reporting/report-templates/domain/types/ReportTemplatePrimitives.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReportSectionPrimitives } from '../../../shared/domain/types/ReportSectionPrimitives';
|
|
2
|
+
import { ReportType } from '../../../shared/domain/enums/ReportType';
|
|
3
|
+
import { CarbonFootprint } from '../../../../carbon-footprint-configurations/shared/domain/enums/CarbonFootprint';
|
|
4
|
+
import { ReportingStandard } from '../../../../shared/domain/enums/ReportingStandard';
|
|
5
|
+
import { ReportTemplateStatus } from '../enums/ReportTemplateStatus';
|
|
6
|
+
export interface ReportTemplatePrimitives {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly version: number;
|
|
9
|
+
readonly previousVersionId: string | null;
|
|
10
|
+
readonly type: ReportType;
|
|
11
|
+
readonly footprintType: CarbonFootprint;
|
|
12
|
+
readonly reportingStandard: ReportingStandard;
|
|
13
|
+
readonly requiresClientApproval: boolean;
|
|
14
|
+
readonly status: ReportTemplateStatus;
|
|
15
|
+
readonly sections: ReportSectionPrimitives[];
|
|
16
|
+
readonly textBankId: string;
|
|
17
|
+
readonly createdBy: string;
|
|
18
|
+
readonly createdAt: string;
|
|
19
|
+
readonly updatedAt: string;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=ReportTemplatePrimitives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportTemplatePrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-templates/domain/types/ReportTemplatePrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sDAAsD,CAAC;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,iFAAiF,CAAC;AAClH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,eAAe,CAAC;IACxC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC;IACzC,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,EAAE,CAAC;IAC7C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B"}
|
package/build/types/carbonbox/reporting/report-templates/domain/types/ReportTemplateProps.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReportSectionPrimitives } from '../../../shared/domain/types/ReportSectionPrimitives';
|
|
2
|
+
export interface ReportTemplateProps {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly version: number;
|
|
5
|
+
readonly previousVersionId: string | null;
|
|
6
|
+
readonly type: string;
|
|
7
|
+
readonly footprintType: string;
|
|
8
|
+
readonly reportingStandard: string;
|
|
9
|
+
readonly requiresClientApproval: boolean;
|
|
10
|
+
readonly status: string;
|
|
11
|
+
readonly sections: ReportSectionPrimitives[];
|
|
12
|
+
readonly textBankId: string;
|
|
13
|
+
readonly createdBy: string;
|
|
14
|
+
readonly createdAt: string;
|
|
15
|
+
readonly updatedAt: string;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=ReportTemplateProps.d.ts.map
|
package/build/types/carbonbox/reporting/report-templates/domain/types/ReportTemplateProps.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportTemplateProps.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-templates/domain/types/ReportTemplateProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sDAAsD,CAAC;AAE/F,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC;IACzC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,EAAE,CAAC;IAC7C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B"}
|
package/build/types/carbonbox/reporting/report-templates/domain/value-objects/ReportTemplateId.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AggregateId } from '../../../../shared/domain/value-objects/AggregateId';
|
|
2
|
+
export declare class ReportTemplateId extends AggregateId {
|
|
3
|
+
private static readonly PROPERTY_NAME;
|
|
4
|
+
private static readonly VALID_PREFIXES;
|
|
5
|
+
private constructor();
|
|
6
|
+
static create(value: string): ReportTemplateId;
|
|
7
|
+
/**
|
|
8
|
+
* Validates that the UUID has a valid ReportTemplate prefix
|
|
9
|
+
*/
|
|
10
|
+
private static guardAgainstInvalidPrefix;
|
|
11
|
+
static fromPrimitives(primitive: string): ReportTemplateId;
|
|
12
|
+
toPrimitives(): string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=ReportTemplateId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportTemplateId.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/report-templates/domain/value-objects/ReportTemplateId.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"}
|