@carbonbox/domain 0.28.2 → 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/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/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,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Report status enumeration
|
|
3
|
+
* Defines the lifecycle states of a report instance
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ReportStatus {
|
|
6
|
+
/**
|
|
7
|
+
* Draft - Initial state, content being prepared
|
|
8
|
+
*/
|
|
9
|
+
DRAFT = "DRAFT",
|
|
10
|
+
/**
|
|
11
|
+
* Generating - AI is generating content
|
|
12
|
+
*/
|
|
13
|
+
GENERATING = "GENERATING",
|
|
14
|
+
/**
|
|
15
|
+
* Pending internal approval - Awaiting internal review
|
|
16
|
+
*/
|
|
17
|
+
PENDING_INTERNAL = "PENDING_INTERNAL",
|
|
18
|
+
/**
|
|
19
|
+
* Pending client approval - Awaiting client review
|
|
20
|
+
*/
|
|
21
|
+
PENDING_CLIENT = "PENDING_CLIENT",
|
|
22
|
+
/**
|
|
23
|
+
* Approved - All approvals received
|
|
24
|
+
*/
|
|
25
|
+
APPROVED = "APPROVED",
|
|
26
|
+
/**
|
|
27
|
+
* Published - Report is finalized and available
|
|
28
|
+
*/
|
|
29
|
+
PUBLISHED = "PUBLISHED",
|
|
30
|
+
/**
|
|
31
|
+
* Rejected - Report was rejected and needs revision
|
|
32
|
+
*/
|
|
33
|
+
REJECTED = "REJECTED",
|
|
34
|
+
/**
|
|
35
|
+
* Archived - Report is archived (soft delete)
|
|
36
|
+
*/
|
|
37
|
+
ARCHIVED = "ARCHIVED"
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=ReportStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportStatus.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/enums/ReportStatus.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,YAAY;IACtB;;OAEG;IACH,KAAK,UAAU;IAEf;;OAEG;IACH,UAAU,eAAe;IAEzB;;OAEG;IACH,gBAAgB,qBAAqB;IAErC;;OAEG;IACH,cAAc,mBAAmB;IAEjC;;OAEG;IACH,QAAQ,aAAa;IAErB;;OAEG;IACH,SAAS,cAAc;IAEvB;;OAEG;IACH,QAAQ,aAAa;IAErB;;OAEG;IACH,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Report type enumeration
|
|
3
|
+
* Defines the different types of reports that can be generated
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ReportType {
|
|
6
|
+
/**
|
|
7
|
+
* Auditable report - Formal report for external audits
|
|
8
|
+
* Requires strict compliance and double approval
|
|
9
|
+
*/
|
|
10
|
+
AUDITABLE = "AUDITABLE",
|
|
11
|
+
/**
|
|
12
|
+
* Technical report - Detailed technical analysis
|
|
13
|
+
* Includes methodologies and calculation details
|
|
14
|
+
*/
|
|
15
|
+
TECHNICAL = "TECHNICAL",
|
|
16
|
+
/**
|
|
17
|
+
* Executive report - High-level summary for management
|
|
18
|
+
* Focus on key insights and recommendations
|
|
19
|
+
*/
|
|
20
|
+
EXECUTIVE = "EXECUTIVE",
|
|
21
|
+
/**
|
|
22
|
+
* Custom report - User-defined structure
|
|
23
|
+
* Flexible format based on client needs
|
|
24
|
+
*/
|
|
25
|
+
CUSTOM = "CUSTOM"
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=ReportType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportType.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/enums/ReportType.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,UAAU;IACpB;;;OAGG;IACH,SAAS,cAAc;IAEvB;;;OAGG;IACH,SAAS,cAAc;IAEvB;;;OAGG;IACH,SAAS,cAAc;IAEvB;;;OAGG;IACH,MAAM,WAAW;CAClB"}
|
package/build/types/carbonbox/reporting/shared/domain/exceptions/EmptyReportSectionBlocksError.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RootError } from '../../../../shared/domain/exceptions/RootError';
|
|
2
|
+
export declare class EmptyReportSectionBlocksError extends RootError {
|
|
3
|
+
private constructor();
|
|
4
|
+
static create(sectionId: string): EmptyReportSectionBlocksError;
|
|
5
|
+
logError(): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=EmptyReportSectionBlocksError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyReportSectionBlocksError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/exceptions/EmptyReportSectionBlocksError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAE3E,qBAAa,6BAA8B,SAAQ,SAAS;IAC1D,OAAO;WAMgB,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,6BAA6B;IAI/D,QAAQ,IAAI,MAAM;CAGnC"}
|
package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportInstanceIdError.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RootError } from '../../../../shared/domain/exceptions/RootError';
|
|
2
|
+
export declare class InvalidReportInstanceIdError extends RootError {
|
|
3
|
+
private constructor();
|
|
4
|
+
static create(receivedValue: string): InvalidReportInstanceIdError;
|
|
5
|
+
logError(): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=InvalidReportInstanceIdError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvalidReportInstanceIdError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/exceptions/InvalidReportInstanceIdError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAE3E,qBAAa,4BAA6B,SAAQ,SAAS;IACzD,OAAO;WAMgB,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,4BAA4B;IAIlE,QAAQ,IAAI,MAAM;CAGnC"}
|
package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionIdError.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RootError } from '../../../../shared/domain/exceptions/RootError';
|
|
2
|
+
export declare class InvalidReportSectionIdError extends RootError {
|
|
3
|
+
private constructor();
|
|
4
|
+
static create(receivedValue: string): InvalidReportSectionIdError;
|
|
5
|
+
logError(): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=InvalidReportSectionIdError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvalidReportSectionIdError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionIdError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAE3E,qBAAa,2BAA4B,SAAQ,SAAS;IACxD,OAAO;WAMgB,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,2BAA2B;IAIjE,QAAQ,IAAI,MAAM;CAGnC"}
|
package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionOrderError.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RootError } from '../../../../shared/domain/exceptions/RootError';
|
|
2
|
+
export declare class InvalidReportSectionOrderError extends RootError {
|
|
3
|
+
private constructor();
|
|
4
|
+
static create(receivedValue: number): InvalidReportSectionOrderError;
|
|
5
|
+
logError(): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=InvalidReportSectionOrderError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvalidReportSectionOrderError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionOrderError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAE3E,qBAAa,8BAA+B,SAAQ,SAAS;IAC3D,OAAO;WAMgB,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,8BAA8B;IAIpE,QAAQ,IAAI,MAAM;CAGnC"}
|
package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionTitleError.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RootError } from '../../../../shared/domain/exceptions/RootError';
|
|
2
|
+
export declare class InvalidReportSectionTitleError extends RootError {
|
|
3
|
+
private constructor();
|
|
4
|
+
static create(receivedValue: string): InvalidReportSectionTitleError;
|
|
5
|
+
logError(): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=InvalidReportSectionTitleError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvalidReportSectionTitleError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionTitleError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAE3E,qBAAa,8BAA+B,SAAQ,SAAS;IAC3D,OAAO;WAMgB,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,8BAA8B;IAIpE,QAAQ,IAAI,MAAM;CAGnC"}
|
package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportTemplateIdError.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RootError } from '../../../../shared/domain/exceptions/RootError';
|
|
2
|
+
export declare class InvalidReportTemplateIdError extends RootError {
|
|
3
|
+
private constructor();
|
|
4
|
+
static create(receivedValue: string): InvalidReportTemplateIdError;
|
|
5
|
+
logError(): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=InvalidReportTemplateIdError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvalidReportTemplateIdError.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/exceptions/InvalidReportTemplateIdError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAE3E,qBAAa,4BAA6B,SAAQ,SAAS;IACzD,OAAO;WAMgB,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,4BAA4B;IAIlE,QAAQ,IAAI,MAAM;CAGnC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BlockNature } from '../enums/BlockNature';
|
|
2
|
+
import { DataBindingSource } from '../enums/DataBindingSource';
|
|
3
|
+
export interface ReportBlockPrimitives {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly nature: BlockNature;
|
|
6
|
+
readonly content?: string;
|
|
7
|
+
readonly maxLength?: number;
|
|
8
|
+
readonly minLength?: number;
|
|
9
|
+
readonly dataBinding?: {
|
|
10
|
+
source: DataBindingSource;
|
|
11
|
+
format?: string;
|
|
12
|
+
};
|
|
13
|
+
readonly aiAssist: boolean;
|
|
14
|
+
readonly order: number;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=ReportBlockPrimitives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportBlockPrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/types/ReportBlockPrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE;QACrB,MAAM,EAAE,iBAAiB,CAAC;QAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReportBlockPrimitives } from './ReportBlockPrimitives';
|
|
2
|
+
export interface ReportSectionPrimitives {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly title: string;
|
|
5
|
+
readonly order: number;
|
|
6
|
+
readonly blocks: ReportBlockPrimitives[];
|
|
7
|
+
readonly isRequired: boolean;
|
|
8
|
+
readonly isVisible: boolean;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ReportSectionPrimitives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportSectionPrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/types/ReportSectionPrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,qBAAqB,EAAE,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ValueObject } from '../../../../shared/domain/value-objects/ValueObject';
|
|
2
|
+
import { ReportSectionPrimitives } from '../types/ReportSectionPrimitives';
|
|
3
|
+
export declare class ReportSection extends ValueObject<ReportSectionPrimitives> {
|
|
4
|
+
private static readonly PROPERTY_NAME;
|
|
5
|
+
private static readonly EXPECTED_TYPE;
|
|
6
|
+
private constructor();
|
|
7
|
+
static create(value: ReportSectionPrimitives): ReportSection;
|
|
8
|
+
static fromPrimitives(primitives: ReportSectionPrimitives): ReportSection;
|
|
9
|
+
private validateReportSection;
|
|
10
|
+
getId(): string;
|
|
11
|
+
getTitle(): string;
|
|
12
|
+
getOrder(): number;
|
|
13
|
+
getBlocks(): readonly ReportSectionPrimitives['blocks'][number][];
|
|
14
|
+
isRequired(): boolean;
|
|
15
|
+
isVisible(): boolean;
|
|
16
|
+
toPrimitives(): ReportSectionPrimitives;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=ReportSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportSection.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/value-objects/ReportSection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAM3E,qBAAa,aAAc,SAAQ,WAAW,CAAC,uBAAuB,CAAC;IACrE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAmB;IAExD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAA6B;IAElE,OAAO;WAaO,MAAM,CAAC,KAAK,EAAE,uBAAuB,GAAG,aAAa;WAIrD,cAAc,CAAC,UAAU,EAAE,uBAAuB,GAAG,aAAa;IAIhF,OAAO,CAAC,qBAAqB;IAkBtB,KAAK,IAAI,MAAM;IAIf,QAAQ,IAAI,MAAM;IAIlB,QAAQ,IAAI,MAAM;IAIlB,SAAS,IAAI,SAAS,uBAAuB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE;IAIjE,UAAU,IAAI,OAAO;IAIrB,SAAS,IAAI,OAAO;IAIpB,YAAY,IAAI,uBAAuB;CAU/C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AggregateId } from '../../../../shared/domain/value-objects/AggregateId';
|
|
2
|
+
export declare class TextBankId extends AggregateId {
|
|
3
|
+
private static readonly PROPERTY_NAME;
|
|
4
|
+
private static readonly VALID_PREFIXES;
|
|
5
|
+
private constructor();
|
|
6
|
+
static create(value: string): TextBankId;
|
|
7
|
+
/**
|
|
8
|
+
* Validates that the UUID has a valid TextBank prefix
|
|
9
|
+
*/
|
|
10
|
+
private static guardAgainstInvalidPrefix;
|
|
11
|
+
static fromPrimitives(primitive: string): TextBankId;
|
|
12
|
+
toPrimitives(): string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=TextBankId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextBankId.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/text-banks/domain/value-objects/TextBankId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAIlF,qBAAa,UAAW,SAAQ,WAAW;IACzC,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,UAAU;IAWxD;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,yBAAyB;WA+BjB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU;IAMpD,YAAY,IAAI,MAAM;CAGvC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized error codes enum for the CarbonBox domain
|
|
3
|
+
* Format: CBX-[CONTEXT]-[NUMBER]
|
|
4
|
+
*
|
|
5
|
+
* Context Abbreviations:
|
|
6
|
+
* - AUTH: Authentication
|
|
7
|
+
* - PMS: Purchase Management System
|
|
8
|
+
* - STK: Stakeholders
|
|
9
|
+
* - CFC: Carbon Footprint Configurations
|
|
10
|
+
* - ADC: Activity Data Collection
|
|
11
|
+
* - EMC: Emission Calculations
|
|
12
|
+
* - SHR: Shared/Common
|
|
13
|
+
*
|
|
14
|
+
* @since 1.0.0
|
|
15
|
+
*/
|
|
16
|
+
export declare enum ErrorCode {
|
|
17
|
+
INVALID_CREDENTIALS = "CBX-AUTH-001",
|
|
18
|
+
TOKEN_EXPIRED = "CBX-AUTH-002",
|
|
19
|
+
TOKEN_INVALID = "CBX-AUTH-003",
|
|
20
|
+
MISSING_CREDENTIALS = "CBX-AUTH-004",
|
|
21
|
+
ACCOUNT_LOCKED = "CBX-AUTH-005",
|
|
22
|
+
EMAIL_NOT_VERIFIED = "CBX-AUTH-006",
|
|
23
|
+
PASSWORD_RESET_EXPIRED = "CBX-AUTH-007",
|
|
24
|
+
CONTRACT_NOT_FOUND = "CBX-PMS-001",
|
|
25
|
+
INVALID_CONTRACT_STATUS = "CBX-PMS-002",
|
|
26
|
+
INVALID_PAYMENT_TERMS = "CBX-PMS-003",
|
|
27
|
+
ORDER_EXCEEDS_BUDGET = "CBX-PMS-004",
|
|
28
|
+
DUPLICATE_ORDER = "CBX-PMS-005",
|
|
29
|
+
INVALID_CURRENCY = "CBX-PMS-006",
|
|
30
|
+
SERVICE_CATALOG_NOT_FOUND = "CBX-PMS-007",
|
|
31
|
+
STAKEHOLDER_EXISTS = "CBX-STK-001",
|
|
32
|
+
INVALID_ROLE = "CBX-STK-002",
|
|
33
|
+
STAKEHOLDER_NOT_FOUND = "CBX-STK-003",
|
|
34
|
+
INSUFFICIENT_PERMISSIONS = "CBX-STK-004",
|
|
35
|
+
INVALID_BUSINESS_STATUS = "CBX-STK-005",
|
|
36
|
+
MANAGER_REQUIRED = "CBX-STK-006",
|
|
37
|
+
CONFIGURATION_NOT_FOUND = "CBX-CFC-001",
|
|
38
|
+
INVALID_REPORTING_STANDARD = "CBX-CFC-002",
|
|
39
|
+
INVALID_COLLECTION_PERIOD = "CBX-CFC-003",
|
|
40
|
+
CONFIGURATION_LOCKED = "CBX-CFC-004",
|
|
41
|
+
DUPLICATE_CONFIGURATION = "CBX-CFC-005",
|
|
42
|
+
FORM_NOT_FOUND = "CBX-ADC-001",
|
|
43
|
+
INVALID_SUBMISSION = "CBX-ADC-002",
|
|
44
|
+
SUBMISSION_LOCKED = "CBX-ADC-003",
|
|
45
|
+
MISSING_REQUIRED_FIELDS = "CBX-ADC-004",
|
|
46
|
+
INVALID_FIELD_TYPE = "CBX-ADC-005",
|
|
47
|
+
CALCULATION_FAILED = "CBX-EMC-001",
|
|
48
|
+
MISSING_EMISSION_FACTOR = "CBX-EMC-002",
|
|
49
|
+
INVALID_FORMULA = "CBX-EMC-003",
|
|
50
|
+
JOB_NOT_FOUND = "CBX-EMC-004",
|
|
51
|
+
JOB_ALREADY_RUNNING = "CBX-EMC-005",
|
|
52
|
+
INVALID_EMAIL = "CBX-SHR-001",
|
|
53
|
+
INVALID_DATE_FORMAT = "CBX-SHR-002",
|
|
54
|
+
INVALID_COORDINATES = "CBX-SHR-003",
|
|
55
|
+
INVALID_CURRENCY_CODE = "CBX-SHR-004",
|
|
56
|
+
DATABASE_CONNECTION = "CBX-SHR-005",
|
|
57
|
+
EXTERNAL_SERVICE = "CBX-SHR-006",
|
|
58
|
+
INVALID_GENDER = "CBX-SHR-007",
|
|
59
|
+
INVALID_PHONE_NUMBER = "CBX-SHR-008",
|
|
60
|
+
INVALID_TAX_ID = "CBX-SHR-009",
|
|
61
|
+
NULL_VALUE = "CBX-SHR-010",
|
|
62
|
+
UNDEFINED_VALUE = "CBX-SHR-011",
|
|
63
|
+
EMPTY_VALUE = "CBX-SHR-012",
|
|
64
|
+
INVALID_PROPERTY_TYPE = "CBX-SHR-013",
|
|
65
|
+
INVALID_PROPERTY_VALUE = "CBX-SHR-014",
|
|
66
|
+
MINIMUM_VALUE_VIOLATION = "CBX-SHR-015",
|
|
67
|
+
MAXIMUM_VALUE_VIOLATION = "CBX-SHR-016",
|
|
68
|
+
INVALID_DATE_RANGE = "CBX-SHR-017",
|
|
69
|
+
PASSWORD_POLICY_VIOLATION = "CBX-SHR-018"
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=ErrorCode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorCode.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/enums/ErrorCode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,oBAAY,SAAS;IAEnB,mBAAmB,iBAAiB;IACpC,aAAa,iBAAiB;IAC9B,aAAa,iBAAiB;IAC9B,mBAAmB,iBAAiB;IACpC,cAAc,iBAAiB;IAC/B,kBAAkB,iBAAiB;IACnC,sBAAsB,iBAAiB;IAGvC,kBAAkB,gBAAgB;IAClC,uBAAuB,gBAAgB;IACvC,qBAAqB,gBAAgB;IACrC,oBAAoB,gBAAgB;IACpC,eAAe,gBAAgB;IAC/B,gBAAgB,gBAAgB;IAChC,yBAAyB,gBAAgB;IAGzC,kBAAkB,gBAAgB;IAClC,YAAY,gBAAgB;IAC5B,qBAAqB,gBAAgB;IACrC,wBAAwB,gBAAgB;IACxC,uBAAuB,gBAAgB;IACvC,gBAAgB,gBAAgB;IAGhC,uBAAuB,gBAAgB;IACvC,0BAA0B,gBAAgB;IAC1C,yBAAyB,gBAAgB;IACzC,oBAAoB,gBAAgB;IACpC,uBAAuB,gBAAgB;IAGvC,cAAc,gBAAgB;IAC9B,kBAAkB,gBAAgB;IAClC,iBAAiB,gBAAgB;IACjC,uBAAuB,gBAAgB;IACvC,kBAAkB,gBAAgB;IAGlC,kBAAkB,gBAAgB;IAClC,uBAAuB,gBAAgB;IACvC,eAAe,gBAAgB;IAC/B,aAAa,gBAAgB;IAC7B,mBAAmB,gBAAgB;IAGnC,aAAa,gBAAgB;IAC7B,mBAAmB,gBAAgB;IACnC,mBAAmB,gBAAgB;IACnC,qBAAqB,gBAAgB;IACrC,mBAAmB,gBAAgB;IACnC,gBAAgB,gBAAgB;IAChC,cAAc,gBAAgB;IAC9B,oBAAoB,gBAAgB;IACpC,cAAc,gBAAgB;IAC9B,UAAU,gBAAgB;IAC1B,eAAe,gBAAgB;IAC/B,WAAW,gBAAgB;IAC3B,qBAAqB,gBAAgB;IACrC,sBAAsB,gBAAgB;IACtC,uBAAuB,gBAAgB;IACvC,uBAAuB,gBAAgB;IACvC,kBAAkB,gBAAgB;IAClC,yBAAyB,gBAAgB;CAC1C"}
|
|
@@ -61,6 +61,11 @@ export declare enum SemanticUuidPrefix {
|
|
|
61
61
|
PMS_PURCHASE_ORDER = "PMS-PO",
|
|
62
62
|
PMS_SERVICE_ENTITLEMENT = "PMS-SE",
|
|
63
63
|
SHR_DOMAIN = "SHR-DOM",
|
|
64
|
-
SHR_EITHER = "SHR-ETH"
|
|
64
|
+
SHR_EITHER = "SHR-ETH",
|
|
65
|
+
RPT_TEMPLATE = "RPT-TPL",
|
|
66
|
+
RPT_INSTANCE = "RPT-INS",
|
|
67
|
+
RPT_TEXT_BANK = "RPT-TXB",
|
|
68
|
+
RPT_SECTION = "RPT-SEC",
|
|
69
|
+
RPT_BLOCK = "RPT-BLK"
|
|
65
70
|
}
|
|
66
71
|
//# sourceMappingURL=SemanticUuidPrefix.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SemanticUuidPrefix.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/enums/SemanticUuidPrefix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,oBAAY,kBAAkB;IAE5B,GAAG,QAAQ,CAAE,0CAA0C;IAGvD,eAAe,YAAY;IAC3B,UAAU,YAAY;IACtB,SAAS,YAAY;IACrB,UAAU,YAAY;IACtB,SAAS,YAAY;IACrB,eAAe,YAAY;IAC3B,oBAAoB,YAAY;IAGhC,aAAa,YAAY;IACzB,qBAAqB,gBAAgB;IACrC,wBAAwB,gBAAgB;IACxC,SAAS,YAAY;IACrB,mBAAmB,gBAAgB;IACnC,oBAAoB,gBAAgB;IACpC,WAAW,YAAY;IACvB,mBAAmB,gBAAgB;IACnC,sBAAsB,gBAAgB;IACtC,oBAAoB,gBAAgB;IACpC,aAAa,YAAY;IACzB,WAAW,YAAY;IACvB,cAAc,YAAY;IAG1B,UAAU,YAAY;IACtB,iBAAiB,gBAAgB;IACjC,cAAc,YAAY;IAC1B,YAAY,YAAY;IAGxB,WAAW,gBAAgB;IAC3B,aAAa,YAAY;IACzB,WAAW,YAAY;IACvB,OAAO,YAAY;IAGnB,QAAQ,YAAY;IACpB,aAAa,YAAY;IACzB,aAAa,YAAY;IAGzB,gBAAgB,YAAY;IAC5B,gBAAgB,YAAY;IAC5B,eAAe,YAAY;IAG3B,GAAG,QAAQ,CAAE,0BAA0B;IAGvC,cAAc,gBAAgB;IAC9B,mBAAmB,gBAAgB;IACnC,YAAY,gBAAgB;IAC5B,eAAe,gBAAgB;IAG/B,mBAAmB,WAAW;IAC9B,mBAAmB,WAAW;IAC9B,qBAAqB,WAAW;IAChC,kBAAkB,WAAW;IAC7B,uBAAuB,WAAW;IAGlC,UAAU,YAAY;IACtB,UAAU,YAAY;
|
|
1
|
+
{"version":3,"file":"SemanticUuidPrefix.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/enums/SemanticUuidPrefix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,oBAAY,kBAAkB;IAE5B,GAAG,QAAQ,CAAE,0CAA0C;IAGvD,eAAe,YAAY;IAC3B,UAAU,YAAY;IACtB,SAAS,YAAY;IACrB,UAAU,YAAY;IACtB,SAAS,YAAY;IACrB,eAAe,YAAY;IAC3B,oBAAoB,YAAY;IAGhC,aAAa,YAAY;IACzB,qBAAqB,gBAAgB;IACrC,wBAAwB,gBAAgB;IACxC,SAAS,YAAY;IACrB,mBAAmB,gBAAgB;IACnC,oBAAoB,gBAAgB;IACpC,WAAW,YAAY;IACvB,mBAAmB,gBAAgB;IACnC,sBAAsB,gBAAgB;IACtC,oBAAoB,gBAAgB;IACpC,aAAa,YAAY;IACzB,WAAW,YAAY;IACvB,cAAc,YAAY;IAG1B,UAAU,YAAY;IACtB,iBAAiB,gBAAgB;IACjC,cAAc,YAAY;IAC1B,YAAY,YAAY;IAGxB,WAAW,gBAAgB;IAC3B,aAAa,YAAY;IACzB,WAAW,YAAY;IACvB,OAAO,YAAY;IAGnB,QAAQ,YAAY;IACpB,aAAa,YAAY;IACzB,aAAa,YAAY;IAGzB,gBAAgB,YAAY;IAC5B,gBAAgB,YAAY;IAC5B,eAAe,YAAY;IAG3B,GAAG,QAAQ,CAAE,0BAA0B;IAGvC,cAAc,gBAAgB;IAC9B,mBAAmB,gBAAgB;IACnC,YAAY,gBAAgB;IAC5B,eAAe,gBAAgB;IAG/B,mBAAmB,WAAW;IAC9B,mBAAmB,WAAW;IAC9B,qBAAqB,WAAW;IAChC,kBAAkB,WAAW;IAC7B,uBAAuB,WAAW;IAGlC,UAAU,YAAY;IACtB,UAAU,YAAY;IAGtB,YAAY,YAAY;IACxB,YAAY,YAAY;IACxB,aAAa,YAAY;IACzB,WAAW,YAAY;IACvB,SAAS,YAAY;CAMtB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { RootError } from './RootError';
|
|
2
|
+
import { ICodedError } from '../interfaces/ICodedError';
|
|
3
|
+
/**
|
|
4
|
+
* Enhanced base class for all domain errors with error code support
|
|
5
|
+
* This extends the existing RootError to add error code functionality
|
|
6
|
+
* while maintaining backward compatibility
|
|
7
|
+
*
|
|
8
|
+
* @since 1.0.0
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class CodedRootError extends RootError implements ICodedError {
|
|
11
|
+
readonly errorCode: string;
|
|
12
|
+
readonly technicalMessage: string;
|
|
13
|
+
readonly context?: Record<string, any>;
|
|
14
|
+
readonly suggestions?: string[];
|
|
15
|
+
/**
|
|
16
|
+
* Creates a new CodedRootError instance
|
|
17
|
+
*
|
|
18
|
+
* @param errorCode - Unique error code (CBX-XXX-NNN)
|
|
19
|
+
* @param technicalMessage - Detailed technical message for debugging
|
|
20
|
+
* @param context - Optional context data safe to expose
|
|
21
|
+
* @param suggestions - Optional user action suggestions
|
|
22
|
+
*/
|
|
23
|
+
protected constructor(errorCode: string, technicalMessage: string, context?: Record<string, any>, suggestions?: string[]);
|
|
24
|
+
/**
|
|
25
|
+
* Returns a log-friendly representation of the error
|
|
26
|
+
* Includes error code, name, technical message and context
|
|
27
|
+
*/
|
|
28
|
+
logError(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Returns a safe representation of the error for external clients
|
|
31
|
+
* This excludes the technical message but includes code, context and suggestions
|
|
32
|
+
*/
|
|
33
|
+
toPublicError(): {
|
|
34
|
+
code: string;
|
|
35
|
+
name: string;
|
|
36
|
+
context?: Record<string, any>;
|
|
37
|
+
suggestions?: string[];
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Checks if an error implements the ICodedError interface
|
|
41
|
+
*/
|
|
42
|
+
static isCodedError(error: unknown): error is ICodedError;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=CodedRootError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodedRootError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/CodedRootError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD;;;;;;GAMG;AACH,8BAAsB,cAAe,SAAQ,SAAU,YAAW,WAAW;IAC3E,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,gBAAgB,EAAE,MAAM,CAAC;IACzC,SAAgB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9C,SAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IAEvC;;;;;;;OAOG;IACH,SAAS,aACP,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,EACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,WAAW,CAAC,EAAE,MAAM,EAAE;IAcxB;;;OAGG;IACa,QAAQ,IAAI,MAAM;IAKlC;;;OAGG;IACI,aAAa,IAAI;QACtB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC9B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB;IASD;;OAEG;WACW,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW;CAUjE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class InvalidDateFormatError extends
|
|
1
|
+
import { CodedRootError } from './CodedRootError';
|
|
2
|
+
export declare class InvalidDateFormatError extends CodedRootError {
|
|
3
3
|
private constructor();
|
|
4
4
|
static create(value: string, expectedFormat: string): InvalidDateFormatError;
|
|
5
|
-
|
|
5
|
+
private static getFormatExample;
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=InvalidDateFormatError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvalidDateFormatError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidDateFormatError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"InvalidDateFormatError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidDateFormatError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,qBAAa,sBAAuB,SAAQ,cAAc;IACxD,OAAO;WAqBgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,sBAAsB;IAI5F,OAAO,CAAC,MAAM,CAAC,gBAAgB;CAUhC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class InvalidEmailPolicyError extends
|
|
1
|
+
import { CodedRootError } from './CodedRootError';
|
|
2
|
+
export declare class InvalidEmailPolicyError extends CodedRootError {
|
|
3
3
|
private constructor();
|
|
4
4
|
static create(email: string): InvalidEmailPolicyError;
|
|
5
|
-
logError(): string;
|
|
6
5
|
}
|
|
7
6
|
//# sourceMappingURL=InvalidEmailPolicyError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvalidEmailPolicyError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidEmailPolicyError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"InvalidEmailPolicyError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/InvalidEmailPolicyError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,qBAAa,uBAAwB,SAAQ,cAAc;IACzD,OAAO;WAmBgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,uBAAuB;CAGtE"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class NullValueError extends
|
|
1
|
+
import { CodedRootError } from './CodedRootError';
|
|
2
|
+
export declare class NullValueError extends CodedRootError {
|
|
3
3
|
private constructor();
|
|
4
4
|
static create(propertyName: string, expectedType: string): NullValueError;
|
|
5
|
-
logError(): string;
|
|
6
5
|
}
|
|
7
6
|
//# sourceMappingURL=NullValueError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NullValueError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/NullValueError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"NullValueError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/exceptions/NullValueError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,qBAAa,cAAe,SAAQ,cAAc;IAChD,OAAO;WAoBgB,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,cAAc;CAG1F"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface for domain errors with unique error codes
|
|
3
|
+
* This interface defines the contract for all errors that support
|
|
4
|
+
* the enhanced error handling system with unique codes
|
|
5
|
+
*
|
|
6
|
+
* @since 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
export interface ICodedError {
|
|
9
|
+
/**
|
|
10
|
+
* Unique error code following the pattern: CBX-[CONTEXT]-[NUMBER]
|
|
11
|
+
* This code is used by frontend to display localized messages
|
|
12
|
+
*
|
|
13
|
+
* @example "CBX-AUTH-001"
|
|
14
|
+
*/
|
|
15
|
+
readonly errorCode: string;
|
|
16
|
+
/**
|
|
17
|
+
* Technical message for debugging and logging purposes
|
|
18
|
+
* This message should contain detailed information about the error
|
|
19
|
+
* and should NOT be displayed to end users
|
|
20
|
+
*/
|
|
21
|
+
readonly technicalMessage: string;
|
|
22
|
+
/**
|
|
23
|
+
* Optional context data that is safe to expose to the client
|
|
24
|
+
* This can include relevant data that helps understand the error
|
|
25
|
+
* without exposing sensitive information
|
|
26
|
+
*
|
|
27
|
+
* @example { email: "user@example.com", attemptNumber: 3 }
|
|
28
|
+
*/
|
|
29
|
+
readonly context?: Record<string, any>;
|
|
30
|
+
/**
|
|
31
|
+
* Optional suggestions for resolving the error
|
|
32
|
+
* These are actionable steps the user can take
|
|
33
|
+
*
|
|
34
|
+
* @example ["Check your email format", "Ensure password meets requirements"]
|
|
35
|
+
*/
|
|
36
|
+
readonly suggestions?: string[];
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=ICodedError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICodedError.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/interfaces/ICodedError.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAElC;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEvC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACjC"}
|
|
@@ -777,6 +777,9 @@ export { ValueObject } from '../carbonbox/shared/domain/value-objects/ValueObjec
|
|
|
777
777
|
export { PrimitiveValueObject } from '../carbonbox/shared/domain/value-objects/PrimitiveValueObject';
|
|
778
778
|
export { ObjectValueObject } from '../carbonbox/shared/domain/value-objects/ObjectValueObject';
|
|
779
779
|
export { RootError } from '../carbonbox/shared/domain/exceptions/RootError';
|
|
780
|
+
export { CodedRootError } from '../carbonbox/shared/domain/exceptions/CodedRootError';
|
|
781
|
+
export { ErrorCode } from '../carbonbox/shared/domain/enums/ErrorCode';
|
|
782
|
+
export type { ICodedError } from '../carbonbox/shared/domain/interfaces/ICodedError';
|
|
780
783
|
export type { IAggregateRoot } from '../carbonbox/shared/domain/entities/IAggregateRoot';
|
|
781
784
|
export type { IUser } from '../carbonbox/shared/domain/entities/IUser';
|
|
782
785
|
export { UserType as UserTypeEnum } from '../carbonbox/shared/domain/enums/UserType';
|