@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.
Files changed (95) hide show
  1. package/build/carbonbox/company-resources/facilities/domain/entity/Facility.js +11 -2
  2. package/build/carbonbox/reporting/report-instances/domain/value-objects/ReportInstanceId.js +52 -0
  3. package/build/carbonbox/reporting/report-templates/domain/enums/ReportTemplateStatus.js +26 -0
  4. package/build/carbonbox/reporting/report-templates/domain/types/ReportTemplatePrimitives.js +2 -0
  5. package/build/carbonbox/reporting/report-templates/domain/types/ReportTemplateProps.js +2 -0
  6. package/build/carbonbox/reporting/report-templates/domain/value-objects/ReportTemplateId.js +52 -0
  7. package/build/carbonbox/reporting/shared/domain/enums/BlockNature.js +30 -0
  8. package/build/carbonbox/reporting/shared/domain/enums/DataBindingSource.js +91 -0
  9. package/build/carbonbox/reporting/shared/domain/enums/ReportStatus.js +42 -0
  10. package/build/carbonbox/reporting/shared/domain/enums/ReportType.js +30 -0
  11. package/build/carbonbox/reporting/shared/domain/exceptions/EmptyReportSectionBlocksError.js +18 -0
  12. package/build/carbonbox/reporting/shared/domain/exceptions/InvalidReportInstanceIdError.js +18 -0
  13. package/build/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionIdError.js +18 -0
  14. package/build/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionOrderError.js +18 -0
  15. package/build/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionTitleError.js +18 -0
  16. package/build/carbonbox/reporting/shared/domain/exceptions/InvalidReportTemplateIdError.js +18 -0
  17. package/build/carbonbox/reporting/shared/domain/types/ReportBlockPrimitives.js +2 -0
  18. package/build/carbonbox/reporting/shared/domain/types/ReportSectionPrimitives.js +2 -0
  19. package/build/carbonbox/reporting/shared/domain/value-objects/ReportSection.js +67 -0
  20. package/build/carbonbox/reporting/text-banks/domain/value-objects/TextBankId.js +52 -0
  21. package/build/carbonbox/shared/domain/enums/ErrorCode.js +81 -0
  22. package/build/carbonbox/shared/domain/enums/SemanticUuidPrefix.js +6 -0
  23. package/build/carbonbox/shared/domain/exceptions/CodedRootError.js +63 -0
  24. package/build/carbonbox/shared/domain/exceptions/InvalidDateFormatError.js +26 -6
  25. package/build/carbonbox/shared/domain/exceptions/InvalidEmailPolicyError.js +15 -7
  26. package/build/carbonbox/shared/domain/exceptions/NullValueError.js +16 -7
  27. package/build/carbonbox/shared/domain/interfaces/ICodedError.js +2 -0
  28. package/build/main/index.js +11 -7
  29. package/build/types/carbonbox/carbon-footprint-configurations/corporate-configurations/domain/repository/ICorporateCarbonFootprintConfigurationRepository.d.ts +1 -1
  30. package/build/types/carbonbox/carbon-footprint-configurations/corporate-configurations/domain/repository/ICorporateCarbonFootprintConfigurationRepository.d.ts.map +1 -1
  31. package/build/types/carbonbox/company-resources/facilities/domain/entity/Facility.d.ts +2 -0
  32. package/build/types/carbonbox/company-resources/facilities/domain/entity/Facility.d.ts.map +1 -1
  33. package/build/types/carbonbox/company-resources/facilities/domain/entity/IFacility.d.ts +2 -0
  34. package/build/types/carbonbox/company-resources/facilities/domain/entity/IFacility.d.ts.map +1 -1
  35. package/build/types/carbonbox/company-resources/facilities/domain/repository/IFacilityRepository.d.ts +1 -0
  36. package/build/types/carbonbox/company-resources/facilities/domain/repository/IFacilityRepository.d.ts.map +1 -1
  37. package/build/types/carbonbox/company-resources/facilities/domain/types/FacilityPrimitives.d.ts +1 -0
  38. package/build/types/carbonbox/company-resources/facilities/domain/types/FacilityPrimitives.d.ts.map +1 -1
  39. package/build/types/carbonbox/company-resources/facilities/domain/types/FacilityProps.d.ts +1 -0
  40. package/build/types/carbonbox/company-resources/facilities/domain/types/FacilityProps.d.ts.map +1 -1
  41. package/build/types/carbonbox/reporting/report-instances/domain/value-objects/ReportInstanceId.d.ts +14 -0
  42. package/build/types/carbonbox/reporting/report-instances/domain/value-objects/ReportInstanceId.d.ts.map +1 -0
  43. package/build/types/carbonbox/reporting/report-templates/domain/enums/ReportTemplateStatus.d.ts +23 -0
  44. package/build/types/carbonbox/reporting/report-templates/domain/enums/ReportTemplateStatus.d.ts.map +1 -0
  45. package/build/types/carbonbox/reporting/report-templates/domain/types/ReportTemplatePrimitives.d.ts +21 -0
  46. package/build/types/carbonbox/reporting/report-templates/domain/types/ReportTemplatePrimitives.d.ts.map +1 -0
  47. package/build/types/carbonbox/reporting/report-templates/domain/types/ReportTemplateProps.d.ts +17 -0
  48. package/build/types/carbonbox/reporting/report-templates/domain/types/ReportTemplateProps.d.ts.map +1 -0
  49. package/build/types/carbonbox/reporting/report-templates/domain/value-objects/ReportTemplateId.d.ts +14 -0
  50. package/build/types/carbonbox/reporting/report-templates/domain/value-objects/ReportTemplateId.d.ts.map +1 -0
  51. package/build/types/carbonbox/reporting/shared/domain/enums/BlockNature.d.ts +27 -0
  52. package/build/types/carbonbox/reporting/shared/domain/enums/BlockNature.d.ts.map +1 -0
  53. package/build/types/carbonbox/reporting/shared/domain/enums/DataBindingSource.d.ts +72 -0
  54. package/build/types/carbonbox/reporting/shared/domain/enums/DataBindingSource.d.ts.map +1 -0
  55. package/build/types/carbonbox/reporting/shared/domain/enums/ReportStatus.d.ts +39 -0
  56. package/build/types/carbonbox/reporting/shared/domain/enums/ReportStatus.d.ts.map +1 -0
  57. package/build/types/carbonbox/reporting/shared/domain/enums/ReportType.d.ts +27 -0
  58. package/build/types/carbonbox/reporting/shared/domain/enums/ReportType.d.ts.map +1 -0
  59. package/build/types/carbonbox/reporting/shared/domain/exceptions/EmptyReportSectionBlocksError.d.ts +7 -0
  60. package/build/types/carbonbox/reporting/shared/domain/exceptions/EmptyReportSectionBlocksError.d.ts.map +1 -0
  61. package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportInstanceIdError.d.ts +7 -0
  62. package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportInstanceIdError.d.ts.map +1 -0
  63. package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionIdError.d.ts +7 -0
  64. package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionIdError.d.ts.map +1 -0
  65. package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionOrderError.d.ts +7 -0
  66. package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionOrderError.d.ts.map +1 -0
  67. package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionTitleError.d.ts +7 -0
  68. package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportSectionTitleError.d.ts.map +1 -0
  69. package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportTemplateIdError.d.ts +7 -0
  70. package/build/types/carbonbox/reporting/shared/domain/exceptions/InvalidReportTemplateIdError.d.ts.map +1 -0
  71. package/build/types/carbonbox/reporting/shared/domain/types/ReportBlockPrimitives.d.ts +16 -0
  72. package/build/types/carbonbox/reporting/shared/domain/types/ReportBlockPrimitives.d.ts.map +1 -0
  73. package/build/types/carbonbox/reporting/shared/domain/types/ReportSectionPrimitives.d.ts +10 -0
  74. package/build/types/carbonbox/reporting/shared/domain/types/ReportSectionPrimitives.d.ts.map +1 -0
  75. package/build/types/carbonbox/reporting/shared/domain/value-objects/ReportSection.d.ts +18 -0
  76. package/build/types/carbonbox/reporting/shared/domain/value-objects/ReportSection.d.ts.map +1 -0
  77. package/build/types/carbonbox/reporting/text-banks/domain/value-objects/TextBankId.d.ts +14 -0
  78. package/build/types/carbonbox/reporting/text-banks/domain/value-objects/TextBankId.d.ts.map +1 -0
  79. package/build/types/carbonbox/shared/domain/enums/ErrorCode.d.ts +71 -0
  80. package/build/types/carbonbox/shared/domain/enums/ErrorCode.d.ts.map +1 -0
  81. package/build/types/carbonbox/shared/domain/enums/SemanticUuidPrefix.d.ts +6 -1
  82. package/build/types/carbonbox/shared/domain/enums/SemanticUuidPrefix.d.ts.map +1 -1
  83. package/build/types/carbonbox/shared/domain/exceptions/CodedRootError.d.ts +44 -0
  84. package/build/types/carbonbox/shared/domain/exceptions/CodedRootError.d.ts.map +1 -0
  85. package/build/types/carbonbox/shared/domain/exceptions/InvalidDateFormatError.d.ts +3 -3
  86. package/build/types/carbonbox/shared/domain/exceptions/InvalidDateFormatError.d.ts.map +1 -1
  87. package/build/types/carbonbox/shared/domain/exceptions/InvalidEmailPolicyError.d.ts +2 -3
  88. package/build/types/carbonbox/shared/domain/exceptions/InvalidEmailPolicyError.d.ts.map +1 -1
  89. package/build/types/carbonbox/shared/domain/exceptions/NullValueError.d.ts +2 -3
  90. package/build/types/carbonbox/shared/domain/exceptions/NullValueError.d.ts.map +1 -1
  91. package/build/types/carbonbox/shared/domain/interfaces/ICodedError.d.ts +38 -0
  92. package/build/types/carbonbox/shared/domain/interfaces/ICodedError.d.ts.map +1 -0
  93. package/build/types/main/index.d.ts +3 -0
  94. package/build/types/main/index.d.ts.map +1 -1
  95. package/package.json +1 -1
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Block nature enumeration
3
+ * Defines how each block in a report template should be filled
4
+ */
5
+ export declare enum BlockNature {
6
+ /**
7
+ * Fixed content - Static text defined at template level
8
+ * Can be parametrized by country or standard
9
+ */
10
+ FIXED = "FIXED",
11
+ /**
12
+ * Curated bank - Content selected from pre-approved options
13
+ * Host provides options, client selects or adapts
14
+ */
15
+ CURATED_BANK = "CURATED_BANK",
16
+ /**
17
+ * Client input - Direct input from the client
18
+ * Collected via questionnaire with validation limits
19
+ */
20
+ CLIENT_INPUT = "CLIENT_INPUT",
21
+ /**
22
+ * Data bound - Automatic binding to snapshot data
23
+ * References specific data points (aggregations, factors, etc.)
24
+ */
25
+ DATA_BOUND = "DATA_BOUND"
26
+ }
27
+ //# sourceMappingURL=BlockNature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockNature.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/enums/BlockNature.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,WAAW;IACrB;;;OAGG;IACH,KAAK,UAAU;IAEf;;;OAGG;IACH,YAAY,iBAAiB;IAE7B;;;OAGG;IACH,YAAY,iBAAiB;IAE7B;;;OAGG;IACH,UAAU,eAAe;CAC1B"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Data binding source enumeration
3
+ * Defines all possible data sources for DATA_BOUND blocks
4
+ * This is a closed catalog to ensure determinism
5
+ */
6
+ export declare enum DataBindingSource {
7
+ CLIENT_PROFILE_NAME = "client.profile.name",
8
+ CLIENT_PROFILE_LEGAL_NAME = "client.profile.legalBusinessName",
9
+ CLIENT_PROFILE_TAX_ID = "client.profile.taxId",
10
+ CLIENT_PROFILE_COUNTRY = "client.profile.country",
11
+ CLIENT_PROFILE_ADDRESS = "client.profile.address",
12
+ CLIENT_PROFILE_CITY = "client.profile.city",
13
+ CLIENT_PROFILE_POSTAL_CODE = "client.profile.postalCode",
14
+ CLIENT_PROFILE_WEBSITE = "client.profile.website",
15
+ CLIENT_PROFILE_INDUSTRY = "client.profile.industry",
16
+ PERIOD_START_DATE = "period.startDate",
17
+ PERIOD_END_DATE = "period.endDate",
18
+ PERIOD_DURATION_MONTHS = "period.durationMonths",
19
+ PERIOD_YEAR = "period.year",
20
+ AGGREGATION_TOTAL = "aggregation.total",
21
+ AGGREGATION_TOTAL_TCO2E = "aggregation.totalTCO2e",
22
+ AGGREGATION_SCOPE_1 = "aggregation.scope1",
23
+ AGGREGATION_SCOPE_2 = "aggregation.scope2",
24
+ AGGREGATION_SCOPE_3 = "aggregation.scope3",
25
+ AGGREGATION_BY_SCOPE = "aggregation.byScope",
26
+ AGGREGATION_BY_CATEGORY = "aggregation.byCategory",
27
+ AGGREGATION_CATEGORY_ENERGY = "aggregation.category.energy",
28
+ AGGREGATION_CATEGORY_TRANSPORT = "aggregation.category.transport",
29
+ AGGREGATION_CATEGORY_WASTE = "aggregation.category.waste",
30
+ AGGREGATION_BY_GAS = "aggregation.byGas",
31
+ AGGREGATION_GAS_CO2 = "aggregation.gas.co2",
32
+ AGGREGATION_GAS_CH4 = "aggregation.gas.ch4",
33
+ AGGREGATION_GAS_N2O = "aggregation.gas.n2o",
34
+ AGGREGATION_BY_SEGMENT = "aggregation.bySegment",
35
+ AGGREGATION_BIOGENIC = "aggregation.biogenic",
36
+ AGGREGATION_BIOGENIC_CO2 = "aggregation.biogenicCO2",
37
+ EMISSION_FACTOR_VALUE = "emissionFactor.value",
38
+ EMISSION_FACTOR_UNIT = "emissionFactor.unit",
39
+ EMISSION_FACTOR_INFORMATION_SOURCE = "emissionFactor.informationSource",
40
+ EMISSION_FACTOR_CODE = "emissionFactor.code",
41
+ EMISSION_FACTOR_NAME = "emissionFactor.name",
42
+ EMISSION_FACTOR_IPCC_CODE = "emissionFactor.ipccCode",
43
+ EMISSION_FACTOR_IPCC_SUBCATEGORY = "emissionFactor.ipccSubcategory",
44
+ EMISSION_FACTOR_METHODOLOGICAL_TIER = "emissionFactor.methodologicalTier",
45
+ GWP_PROTOCOL_VERSION = "gwp.protocolVersion",
46
+ GWP_POTENTIAL = "gwp.potential",
47
+ GWP_INFORMATION_SOURCE = "gwp.informationSource",
48
+ GWP_AR_VERSION = "gwp.arVersion",
49
+ FORMULA_EXPRESSION = "formula.expression",
50
+ FORMULA_INFORMATION_SOURCE = "formula.informationSource",
51
+ FORMULA_METHODOLOGICAL_TIER = "formula.methodologicalTier",
52
+ FORMULA_EMISSION_SOURCE = "formula.emissionSource",
53
+ FORMULA_APPLICABLE_GASES = "formula.applicableGases",
54
+ CHART_BY_SCOPE = "chart.byScope",
55
+ CHART_BY_SUBCATEGORY = "chart.bySubcategory",
56
+ CHART_BY_SEGMENT = "chart.bySegment",
57
+ CHART_BY_GAS = "chart.byGas",
58
+ CHART_TREND_ANALYSIS = "chart.trendAnalysis",
59
+ FACILITIES_COUNT = "facilities.count",
60
+ FACILITIES_LIST = "facilities.list",
61
+ FACILITIES_BY_COUNTRY = "facilities.byCountry",
62
+ ORGANIZATIONAL_APPROACH = "organizational.approach",
63
+ ORGANIZATIONAL_EQUITY_SHARE = "organizational.equityShare",
64
+ ORGANIZATIONAL_CONTROL_TYPE = "organizational.controlType",
65
+ REPORTING_STANDARD = "standard.name",
66
+ STANDARD_VERSION = "standard.version",
67
+ STANDARD_REQUIREMENTS = "standard.requirements",
68
+ REPORT_GENERATION_DATE = "metadata.generationDate",
69
+ REPORT_VERSION = "metadata.version",
70
+ REPORT_TEMPLATE_VERSION = "metadata.templateVersion"
71
+ }
72
+ //# sourceMappingURL=DataBindingSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataBindingSource.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/reporting/shared/domain/enums/DataBindingSource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,oBAAY,iBAAiB;IAE3B,mBAAmB,wBAAwB;IAC3C,yBAAyB,qCAAqC;IAC9D,qBAAqB,yBAAyB;IAC9C,sBAAsB,2BAA2B;IACjD,sBAAsB,2BAA2B;IACjD,mBAAmB,wBAAwB;IAC3C,0BAA0B,8BAA8B;IACxD,sBAAsB,2BAA2B;IACjD,uBAAuB,4BAA4B;IAGnD,iBAAiB,qBAAqB;IACtC,eAAe,mBAAmB;IAClC,sBAAsB,0BAA0B;IAChD,WAAW,gBAAgB;IAG3B,iBAAiB,sBAAsB;IACvC,uBAAuB,2BAA2B;IAGlD,mBAAmB,uBAAuB;IAC1C,mBAAmB,uBAAuB;IAC1C,mBAAmB,uBAAuB;IAC1C,oBAAoB,wBAAwB;IAG5C,uBAAuB,2BAA2B;IAClD,2BAA2B,gCAAgC;IAC3D,8BAA8B,mCAAmC;IACjE,0BAA0B,+BAA+B;IAGzD,kBAAkB,sBAAsB;IACxC,mBAAmB,wBAAwB;IAC3C,mBAAmB,wBAAwB;IAC3C,mBAAmB,wBAAwB;IAG3C,sBAAsB,0BAA0B;IAGhD,oBAAoB,yBAAyB;IAC7C,wBAAwB,4BAA4B;IAGpD,qBAAqB,yBAAyB;IAC9C,oBAAoB,wBAAwB;IAC5C,kCAAkC,qCAAqC;IACvE,oBAAoB,wBAAwB;IAC5C,oBAAoB,wBAAwB;IAC5C,yBAAyB,4BAA4B;IACrD,gCAAgC,mCAAmC;IACnE,mCAAmC,sCAAsC;IAGzE,oBAAoB,wBAAwB;IAC5C,aAAa,kBAAkB;IAC/B,sBAAsB,0BAA0B;IAChD,cAAc,kBAAkB;IAGhC,kBAAkB,uBAAuB;IACzC,0BAA0B,8BAA8B;IACxD,2BAA2B,+BAA+B;IAC1D,uBAAuB,2BAA2B;IAClD,wBAAwB,4BAA4B;IAGpD,cAAc,kBAAkB;IAChC,oBAAoB,wBAAwB;IAC5C,gBAAgB,oBAAoB;IACpC,YAAY,gBAAgB;IAC5B,oBAAoB,wBAAwB;IAG5C,gBAAgB,qBAAqB;IACrC,eAAe,oBAAoB;IACnC,qBAAqB,yBAAyB;IAG9C,uBAAuB,4BAA4B;IACnD,2BAA2B,+BAA+B;IAC1D,2BAA2B,+BAA+B;IAG1D,kBAAkB,kBAAkB;IACpC,gBAAgB,qBAAqB;IACrC,qBAAqB,0BAA0B;IAG/C,sBAAsB,4BAA4B;IAClD,cAAc,qBAAqB;IACnC,uBAAuB,6BAA6B;CACrD"}
@@ -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"}
@@ -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"}
@@ -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"}
@@ -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"}
@@ -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"}
@@ -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"}
@@ -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;CAMvB"}
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 { RootError } from './RootError';
2
- export declare class InvalidDateFormatError extends RootError {
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
- logError(): string;
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,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,sBAAuB,SAAQ,SAAS;IACnD,OAAO;WAOgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,sBAAsB;IAI5E,QAAQ,IAAI,MAAM;CAGnC"}
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 { RootError } from './RootError';
2
- export declare class InvalidEmailPolicyError extends RootError {
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,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,uBAAwB,SAAQ,SAAS;IACpD,OAAO;WAMgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,uBAAuB;IAI9D,QAAQ,IAAI,MAAM;CAG1B"}
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 { RootError } from './RootError';
2
- export declare class NullValueError extends RootError {
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,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,cAAe,SAAQ,SAAS;IAC3C,OAAO;WAMgB,MAAM,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,cAAc;IAIzE,QAAQ,IAAI,MAAM;CAGnC"}
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';