@carbonbox/domain 0.26.0 → 0.28.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/activity-data-collection/activity-data-submissions/domain/entity/ActivityDataSubmission.js +11 -2
- package/build/carbonbox/activity-data-collection/activity-data-submissions/domain/exceptions/InvalidActivityDataSubmissionCountryError.js +20 -0
- package/build/carbonbox/activity-data-collection/activity-data-submissions/domain/value-objects/ActivityDataSubmissionCountry.js +41 -0
- package/build/carbonbox/emission-calculation-formulas/domain/entity/EmissionCalculationFormula.js +1 -1
- package/build/carbonbox/emission-calculation-formulas/domain/value-objects/EmissionCalculationFormulaApplicableGreenhouseGases.js +30 -215
- package/build/carbonbox/emission-calculation-formulas/emission-factors/domain/value-objects/EmissionFactorGreenhouseGasValues.js +16 -11
- package/build/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/value-objects/GlobalWarmingPotentialGreenhouseGasPotentials.js +18 -13
- package/build/carbonbox/emission-calculation-results/emission-aggregations/domain/value-objects/EmissionAggregationGhgBreakdown.js +52 -109
- package/build/carbonbox/emission-calculation-results/ghg-emission-results/domain/entity/GHGEmissionResult.js +9 -4
- package/build/carbonbox/emission-calculation-results/ghg-emission-results/domain/value-objects/GHGEmissionResultGreenhouseGas.js +44 -160
- package/build/carbonbox/shared/domain/enums/GreenhouseGasCategory.js +15 -0
- package/build/carbonbox/shared/domain/value-objects/GreenhouseGasSpecies.js +50 -0
- package/build/main/index.js +24 -20
- package/build/types/carbonbox/activity-data-collection/activity-data-submissions/domain/entity/ActivityDataSubmission.d.ts +2 -0
- package/build/types/carbonbox/activity-data-collection/activity-data-submissions/domain/entity/ActivityDataSubmission.d.ts.map +1 -1
- package/build/types/carbonbox/activity-data-collection/activity-data-submissions/domain/entity/IActivityDataSubmission.d.ts +2 -0
- package/build/types/carbonbox/activity-data-collection/activity-data-submissions/domain/entity/IActivityDataSubmission.d.ts.map +1 -1
- package/build/types/carbonbox/activity-data-collection/activity-data-submissions/domain/exceptions/InvalidActivityDataSubmissionCountryError.d.ts +7 -0
- package/build/types/carbonbox/activity-data-collection/activity-data-submissions/domain/exceptions/InvalidActivityDataSubmissionCountryError.d.ts.map +1 -0
- package/build/types/carbonbox/activity-data-collection/activity-data-submissions/domain/types/ActivityDataSubmissionPrimitives.d.ts +2 -0
- package/build/types/carbonbox/activity-data-collection/activity-data-submissions/domain/types/ActivityDataSubmissionPrimitives.d.ts.map +1 -1
- package/build/types/carbonbox/activity-data-collection/activity-data-submissions/domain/types/ActivityDataSubmissionProps.d.ts +2 -0
- package/build/types/carbonbox/activity-data-collection/activity-data-submissions/domain/types/ActivityDataSubmissionProps.d.ts.map +1 -1
- package/build/types/carbonbox/activity-data-collection/activity-data-submissions/domain/value-objects/ActivityDataSubmissionCountry.d.ts +18 -0
- package/build/types/carbonbox/activity-data-collection/activity-data-submissions/domain/value-objects/ActivityDataSubmissionCountry.d.ts.map +1 -0
- package/build/types/carbonbox/emission-calculation-formulas/domain/types/EmissionCalculationFormulaPrimitives.d.ts +1 -2
- package/build/types/carbonbox/emission-calculation-formulas/domain/types/EmissionCalculationFormulaPrimitives.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-formulas/domain/types/EmissionCalculationFormulaProps.d.ts +1 -2
- package/build/types/carbonbox/emission-calculation-formulas/domain/types/EmissionCalculationFormulaProps.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-formulas/domain/value-objects/EmissionCalculationFormulaApplicableGreenhouseGases.d.ts +11 -105
- package/build/types/carbonbox/emission-calculation-formulas/domain/value-objects/EmissionCalculationFormulaApplicableGreenhouseGases.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-formulas/emission-factors/domain/types/GHGFactorValue.d.ts +3 -2
- package/build/types/carbonbox/emission-calculation-formulas/emission-factors/domain/types/GHGFactorValue.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-formulas/emission-factors/domain/types/GHGFactorValuePrimitives.d.ts +3 -2
- package/build/types/carbonbox/emission-calculation-formulas/emission-factors/domain/types/GHGFactorValuePrimitives.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-formulas/emission-factors/domain/value-objects/EmissionFactorGreenhouseGasValues.d.ts +1 -1
- package/build/types/carbonbox/emission-calculation-formulas/emission-factors/domain/value-objects/EmissionFactorGreenhouseGasValues.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/types/GHGPotentialValue.d.ts +3 -2
- package/build/types/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/types/GHGPotentialValue.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/types/GHGPotentialValuePrimitives.d.ts +3 -2
- package/build/types/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/types/GHGPotentialValuePrimitives.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/value-objects/GlobalWarmingPotentialGreenhouseGasPotentials.d.ts +2 -2
- package/build/types/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/value-objects/GlobalWarmingPotentialGreenhouseGasPotentials.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-results/emission-aggregations/domain/types/GHGBreakdown.d.ts +3 -2
- package/build/types/carbonbox/emission-calculation-results/emission-aggregations/domain/types/GHGBreakdown.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-results/emission-aggregations/domain/types/GHGBreakdownPrimitives.d.ts +3 -2
- package/build/types/carbonbox/emission-calculation-results/emission-aggregations/domain/types/GHGBreakdownPrimitives.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-results/emission-aggregations/domain/value-objects/EmissionAggregationGhgBreakdown.d.ts +9 -80
- package/build/types/carbonbox/emission-calculation-results/emission-aggregations/domain/value-objects/EmissionAggregationGhgBreakdown.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-results/ghg-emission-results/domain/entity/GHGEmissionResult.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-results/ghg-emission-results/domain/types/GHGEmissionResultPrimitives.d.ts +3 -2
- package/build/types/carbonbox/emission-calculation-results/ghg-emission-results/domain/types/GHGEmissionResultPrimitives.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-results/ghg-emission-results/domain/types/GHGEmissionResultProps.d.ts +3 -2
- package/build/types/carbonbox/emission-calculation-results/ghg-emission-results/domain/types/GHGEmissionResultProps.d.ts.map +1 -1
- package/build/types/carbonbox/emission-calculation-results/ghg-emission-results/domain/value-objects/GHGEmissionResultGreenhouseGas.d.ts +22 -89
- package/build/types/carbonbox/emission-calculation-results/ghg-emission-results/domain/value-objects/GHGEmissionResultGreenhouseGas.d.ts.map +1 -1
- package/build/types/carbonbox/shared/domain/enums/GreenhouseGasCategory.d.ts +12 -0
- package/build/types/carbonbox/shared/domain/enums/GreenhouseGasCategory.d.ts.map +1 -0
- package/build/types/carbonbox/shared/domain/value-objects/GreenhouseGasSpecies.d.ts +24 -0
- package/build/types/carbonbox/shared/domain/value-objects/GreenhouseGasSpecies.d.ts.map +1 -0
- package/build/types/main/index.d.ts +4 -1
- package/build/types/main/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/build/carbonbox/shared/domain/enums/GreenhouseGas.js +0 -14
- package/build/types/carbonbox/shared/domain/enums/GreenhouseGas.d.ts +0 -11
- package/build/types/carbonbox/shared/domain/enums/GreenhouseGas.d.ts.map +0 -1
|
@@ -1,117 +1,23 @@
|
|
|
1
1
|
import { StringList } from '../../../shared/domain/value-objects/StringList';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Especies de gas a las que aplica una fórmula (códigos normalizados: `CO2`, `CH4-FOSSIL`, `R-410A`…).
|
|
4
|
+
* La categoría de cada especie NO se guarda aquí: se resuelve desde el dato de referencia
|
|
5
|
+
* (EmissionFactor / GlobalWarmingPotential), que es la fuente de verdad de la taxonomía.
|
|
6
|
+
* Vacío = la fórmula aplica a toda submission del emissionSource (semántica CAL-007 preservada).
|
|
7
|
+
*/
|
|
3
8
|
export declare class EmissionCalculationFormulaApplicableGreenhouseGases extends StringList {
|
|
4
|
-
#private;
|
|
5
9
|
private static readonly PROPERTY_NAME;
|
|
6
10
|
private constructor();
|
|
7
|
-
/**
|
|
8
|
-
* Factory method para crear una instancia.
|
|
9
|
-
*/
|
|
10
11
|
static create(value: string[]): EmissionCalculationFormulaApplicableGreenhouseGases;
|
|
11
12
|
static fromPrimitives(primitives: string[]): EmissionCalculationFormulaApplicableGreenhouseGases;
|
|
12
|
-
|
|
13
|
-
* Validaciones específicas para greenhouse gas types.
|
|
14
|
-
*/
|
|
15
|
-
private static guardAgainstInvalidGreenhouseGases;
|
|
16
|
-
/**
|
|
17
|
-
* Convierte a representación primitiva.
|
|
18
|
-
*/
|
|
13
|
+
private static guardAgainstDuplicateSpecies;
|
|
19
14
|
toPrimitives(): string[];
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
toEnums(): GreenhouseGas[];
|
|
24
|
-
/**
|
|
25
|
-
* Obtiene los greenhouse gas types como array de strings.
|
|
26
|
-
*/
|
|
27
|
-
toGreenhouseGasTypeStrings(): string[];
|
|
28
|
-
/**
|
|
29
|
-
* Verifica si contiene un greenhouse gas type específico.
|
|
30
|
-
*/
|
|
31
|
-
contains(gasType: GreenhouseGas): boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Obtiene los greenhouse gases como array inmutable.
|
|
34
|
-
*/
|
|
35
|
-
get greenhouseGases(): readonly GreenhouseGas[];
|
|
36
|
-
/**
|
|
37
|
-
* Número de greenhouse gases.
|
|
38
|
-
*/
|
|
15
|
+
get speciesCodes(): readonly string[];
|
|
16
|
+
contains(species: string): boolean;
|
|
39
17
|
get length(): number;
|
|
40
|
-
/**
|
|
41
|
-
* Verifica si la colección está vacía.
|
|
42
|
-
*/
|
|
43
18
|
isEmpty(): boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Verifica si la colección tiene valores.
|
|
46
|
-
*/
|
|
47
19
|
hasValues(): boolean;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
*/
|
|
51
|
-
includesAllOf(gasTypes: GreenhouseGas[]): boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Verifica si incluye alguno de los greenhouse gas types especificados.
|
|
54
|
-
*/
|
|
55
|
-
includesAnyOf(gasTypes: GreenhouseGas[]): boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Obtiene los greenhouse gas types comunes con otra colección.
|
|
58
|
-
*/
|
|
59
|
-
getCommonGases(other: EmissionCalculationFormulaApplicableGreenhouseGases): GreenhouseGas[];
|
|
60
|
-
/**
|
|
61
|
-
* Obtiene los greenhouse gas types únicos de esta colección comparado con otra.
|
|
62
|
-
*/
|
|
63
|
-
getUniqueGases(other: EmissionCalculationFormulaApplicableGreenhouseGases): GreenhouseGas[];
|
|
64
|
-
/**
|
|
65
|
-
* Verifica si contiene CO2.
|
|
66
|
-
*/
|
|
67
|
-
hasCO2(): boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Verifica si contiene CH4 (metano).
|
|
70
|
-
*/
|
|
71
|
-
hasMethane(): boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Verifica si contiene N2O (óxido nitroso).
|
|
74
|
-
*/
|
|
75
|
-
hasNitrousOxide(): boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Verifica si contiene gases fluorados (HFCs, PFCs, SF6, NF3).
|
|
78
|
-
*/
|
|
79
|
-
hasFluorinatedGases(): boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Verifica si contiene solo los tres gases principales del Protocolo de Kyoto.
|
|
82
|
-
*/
|
|
83
|
-
hasOnlyKyotoMainGases(): boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Verifica si incluye todos los gases del Protocolo de Kyoto.
|
|
86
|
-
*/
|
|
87
|
-
includesAllKyotoGases(): boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Obtiene los gases por categoría de potencial de calentamiento.
|
|
90
|
-
*/
|
|
91
|
-
getGasesByWarmingPotentialCategory(): {
|
|
92
|
-
lowPotential: GreenhouseGas[];
|
|
93
|
-
mediumPotential: GreenhouseGas[];
|
|
94
|
-
highPotential: GreenhouseGas[];
|
|
95
|
-
};
|
|
96
|
-
/**
|
|
97
|
-
* Obtiene la complejidad de la colección basada en el número y tipo de gases.
|
|
98
|
-
*/
|
|
99
|
-
getComplexity(): 'simple' | 'medium' | 'complex';
|
|
100
|
-
/**
|
|
101
|
-
* Obtiene estadísticas de la colección.
|
|
102
|
-
*/
|
|
103
|
-
getStatistics(): {
|
|
104
|
-
totalGases: number;
|
|
105
|
-
hasCO2: boolean;
|
|
106
|
-
hasMethane: boolean;
|
|
107
|
-
hasNitrousOxide: boolean;
|
|
108
|
-
hasFluorinatedGases: boolean;
|
|
109
|
-
includesAllKyotoGases: boolean;
|
|
110
|
-
complexity: 'simple' | 'medium' | 'complex';
|
|
111
|
-
};
|
|
112
|
-
/**
|
|
113
|
-
* Representación como string de los greenhouse gas types.
|
|
114
|
-
*/
|
|
115
|
-
toString(): string;
|
|
20
|
+
includesAllOf(species: string[]): boolean;
|
|
21
|
+
includesAnyOf(species: string[]): boolean;
|
|
116
22
|
}
|
|
117
23
|
//# sourceMappingURL=EmissionCalculationFormulaApplicableGreenhouseGases.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmissionCalculationFormulaApplicableGreenhouseGases.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/emission-calculation-formulas/domain/value-objects/EmissionCalculationFormulaApplicableGreenhouseGases.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"EmissionCalculationFormulaApplicableGreenhouseGases.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/emission-calculation-formulas/domain/value-objects/EmissionCalculationFormulaApplicableGreenhouseGases.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAI7E;;;;;GAKG;AACH,qBAAa,mDAAoD,SAAQ,UAAU;IACjF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAA+B;IAEpE,OAAO;WAagB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,mDAAmD;WAS5E,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,mDAAmD;IAIhH,OAAO,CAAC,MAAM,CAAC,4BAA4B;IAc3B,YAAY,IAAI,MAAM,EAAE;IAIxC,IAAW,YAAY,IAAI,SAAS,MAAM,EAAE,CAE3C;IAEM,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAIzC,IAAW,MAAM,IAAI,MAAM,CAE1B;IAEM,OAAO,IAAI,OAAO;IAIlB,SAAS,IAAI,OAAO;IAIpB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO;IAIzC,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO;CAGjD"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GreenhouseGasCategory } from '../../../../shared/domain/enums/GreenhouseGasCategory';
|
|
2
2
|
import { CountryFactorValue } from './CountryFactorValue';
|
|
3
3
|
export type GHGFactorValue = {
|
|
4
|
-
|
|
4
|
+
greenhouseGasCategory: GreenhouseGasCategory;
|
|
5
|
+
greenhouseGasSpecies: string;
|
|
5
6
|
countryValues: CountryFactorValue[];
|
|
6
7
|
unit: string;
|
|
7
8
|
dataSource: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GHGFactorValue.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-formulas/emission-factors/domain/types/GHGFactorValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"GHGFactorValue.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-formulas/emission-factors/domain/types/GHGFactorValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,MAAM,cAAc,GAAG;IAC3B,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,kBAAkB,EAAE,CAAC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GreenhouseGasCategory } from '../../../../shared/domain/enums/GreenhouseGasCategory';
|
|
2
2
|
import { CountryFactorValuePrimitives } from './CountryFactorValuePrimitives';
|
|
3
3
|
export type GHGFactorValuePrimitives = {
|
|
4
|
-
|
|
4
|
+
greenhouseGasCategory: GreenhouseGasCategory;
|
|
5
|
+
greenhouseGasSpecies: string;
|
|
5
6
|
countryValues: CountryFactorValuePrimitives[];
|
|
6
7
|
unit: string;
|
|
7
8
|
dataSource: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GHGFactorValuePrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-formulas/emission-factors/domain/types/GHGFactorValuePrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"GHGFactorValuePrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-formulas/emission-factors/domain/types/GHGFactorValuePrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,MAAM,MAAM,wBAAwB,GAAG;IACrC,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,4BAA4B,EAAE,CAAC;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -9,7 +9,7 @@ export declare class EmissionFactorGreenhouseGasValues extends ValueObject<GHGFa
|
|
|
9
9
|
toPrimitives(): GHGFactorValuePrimitives[];
|
|
10
10
|
private static guardAgainstInvalidArray;
|
|
11
11
|
private static guardAgainstInvalidGHGFactorValue;
|
|
12
|
-
private static
|
|
12
|
+
private static guardAgainstInvalidCategory;
|
|
13
13
|
private static guardAgainstInvalidCountryValues;
|
|
14
14
|
private static guardAgainstInvalidCountryFactorValue;
|
|
15
15
|
private static guardAgainstInvalidValidityPeriod;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmissionFactorGreenhouseGasValues.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-formulas/emission-factors/domain/value-objects/EmissionFactorGreenhouseGasValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"EmissionFactorGreenhouseGasValues.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-formulas/emission-factors/domain/value-objects/EmissionFactorGreenhouseGasValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAS7E,qBAAa,iCACX,SAAQ,WAAW,CAAC,wBAAwB,EAAE,CAAC;IAC/C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAyB;IAE9D,OAAO;WAiBgB,MAAM,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,iCAAiC;WAIlE,cAAc,CAAC,UAAU,EAAE,wBAAwB,EAAE,GAAG,iCAAiC;IAYhG,YAAY,IAAI,wBAAwB,EAAE;IAI1D,OAAO,CAAC,MAAM,CAAC,wBAAwB;IAiCvC,OAAO,CAAC,MAAM,CAAC,iCAAiC;IAoChD,OAAO,CAAC,MAAM,CAAC,2BAA2B;IAa1C,OAAO,CAAC,MAAM,CAAC,gCAAgC;IAiC/C,OAAO,CAAC,MAAM,CAAC,qCAAqC;IA+EpD,OAAO,CAAC,MAAM,CAAC,iCAAiC;IA0ChD,OAAO,CAAC,MAAM,CAAC,uBAAuB;IActC,OAAO,CAAC,MAAM,CAAC,6BAA6B;IAc5C,OAAO,CAAC,MAAM,CAAC,oCAAoC;IAgBnD,OAAO,CAAC,MAAM,CAAC,8BAA8B;IAgB7C,OAAO,CAAC,MAAM,CAAC,iBAAiB;CAqBjC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GreenhouseGasCategory } from '../../../../shared/domain/enums/GreenhouseGasCategory';
|
|
2
2
|
export type GHGPotentialValue = {
|
|
3
|
-
|
|
3
|
+
greenhouseGasCategory: GreenhouseGasCategory;
|
|
4
|
+
greenhouseGasSpecies: string;
|
|
4
5
|
potentialValue: number;
|
|
5
6
|
};
|
|
6
7
|
//# sourceMappingURL=GHGPotentialValue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GHGPotentialValue.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/types/GHGPotentialValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"GHGPotentialValue.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/types/GHGPotentialValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAE9F,MAAM,MAAM,iBAAiB,GAAG;IAC9B,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GreenhouseGasCategory } from '../../../../shared/domain/enums/GreenhouseGasCategory';
|
|
2
2
|
export type GHGPotentialValuePrimitives = {
|
|
3
|
-
|
|
3
|
+
greenhouseGasCategory: GreenhouseGasCategory;
|
|
4
|
+
greenhouseGasSpecies: string;
|
|
4
5
|
potentialValue: number;
|
|
5
6
|
};
|
|
6
7
|
//# sourceMappingURL=GHGPotentialValuePrimitives.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GHGPotentialValuePrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/types/GHGPotentialValuePrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"GHGPotentialValuePrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/types/GHGPotentialValuePrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAE9F,MAAM,MAAM,2BAA2B,GAAG;IACxC,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
|
@@ -9,9 +9,9 @@ export declare class GlobalWarmingPotentialGreenhouseGasPotentials extends Value
|
|
|
9
9
|
toPrimitives(): GHGPotentialValuePrimitives[];
|
|
10
10
|
private static guardAgainstInvalidArray;
|
|
11
11
|
private static guardAgainstInvalidGHGPotentialValue;
|
|
12
|
-
private static
|
|
12
|
+
private static guardAgainstInvalidCategory;
|
|
13
13
|
private static guardAgainstInvalidPotentialValue;
|
|
14
|
-
private static
|
|
14
|
+
private static guardAgainstDuplicateSpecies;
|
|
15
15
|
private static toPrimitivesArray;
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=GlobalWarmingPotentialGreenhouseGasPotentials.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalWarmingPotentialGreenhouseGasPotentials.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/value-objects/GlobalWarmingPotentialGreenhouseGasPotentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"GlobalWarmingPotentialGreenhouseGasPotentials.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-formulas/global-warming-potentials/domain/value-objects/GlobalWarmingPotentialGreenhouseGasPotentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAMnF,qBAAa,6CACX,SAAQ,WAAW,CAAC,2BAA2B,EAAE,CAAC;IAClD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAA6B;IAElE,OAAO;WAiBgB,MAAM,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,6CAA6C;WAIjF,cAAc,CAAC,UAAU,EAAE,2BAA2B,EAAE,GAAG,6CAA6C;IAU/G,YAAY,IAAI,2BAA2B,EAAE;IAI7D,OAAO,CAAC,MAAM,CAAC,wBAAwB;IAsBvC,OAAO,CAAC,MAAM,CAAC,oCAAoC;IAsBnD,OAAO,CAAC,MAAM,CAAC,2BAA2B;IAa1C,OAAO,CAAC,MAAM,CAAC,iCAAiC;IAehD,OAAO,CAAC,MAAM,CAAC,4BAA4B;IAgB3C,OAAO,CAAC,MAAM,CAAC,iBAAiB;CASjC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GreenhouseGasCategory } from '../../../../shared/domain/enums/GreenhouseGasCategory';
|
|
2
2
|
export type GHGBreakdown = {
|
|
3
|
-
|
|
3
|
+
greenhouseGasCategory: GreenhouseGasCategory;
|
|
4
|
+
greenhouseGasSpecies: string;
|
|
4
5
|
co2Equivalent: number;
|
|
5
6
|
percentage: number;
|
|
6
7
|
unit: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GHGBreakdown.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/emission-aggregations/domain/types/GHGBreakdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"GHGBreakdown.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/emission-aggregations/domain/types/GHGBreakdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAE9F,MAAM,MAAM,YAAY,GAAG;IACzB,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GreenhouseGasCategory } from '../../../../shared/domain/enums/GreenhouseGasCategory';
|
|
2
2
|
export type GHGBreakdownPrimitives = {
|
|
3
|
-
|
|
3
|
+
greenhouseGasCategory: GreenhouseGasCategory;
|
|
4
|
+
greenhouseGasSpecies: string;
|
|
4
5
|
co2Equivalent: number;
|
|
5
6
|
percentage: number;
|
|
6
7
|
unit: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GHGBreakdownPrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/emission-aggregations/domain/types/GHGBreakdownPrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"GHGBreakdownPrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/emission-aggregations/domain/types/GHGBreakdownPrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAE9F,MAAM,MAAM,sBAAsB,GAAG;IACnC,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GreenhouseGasCategory } from '../../../../shared/domain/enums/GreenhouseGasCategory';
|
|
2
2
|
import { GHGBreakdownPrimitives } from '../types/GHGBreakdownPrimitives';
|
|
3
3
|
import { GHGBreakdown } from '../types/GHGBreakdown';
|
|
4
4
|
import { EmissionAggregationGhgBreakdownOptions } from '../types/EmissionAggregationGhgBreakdownOptions';
|
|
@@ -7,108 +7,37 @@ export declare class EmissionAggregationGhgBreakdown extends ValueObject<GHGBrea
|
|
|
7
7
|
#private;
|
|
8
8
|
private static readonly PROPERTY_NAME;
|
|
9
9
|
private static readonly OPTIONS;
|
|
10
|
-
|
|
11
|
-
* Constructor privado para controlar la creación de instancias.
|
|
12
|
-
* Aplica todas las validaciones de dominio al momento de construcción.
|
|
13
|
-
*/
|
|
10
|
+
private static readonly MAIN_GAS_CATEGORIES;
|
|
14
11
|
private constructor();
|
|
15
|
-
/**
|
|
16
|
-
* Factory method para crear una nueva instancia de EmissionAggregationGhgBreakdown.
|
|
17
|
-
*/
|
|
18
12
|
static create(value: GHGBreakdown[]): EmissionAggregationGhgBreakdown;
|
|
19
|
-
/**
|
|
20
|
-
* Factory method para crear desde primitivos.
|
|
21
|
-
*/
|
|
22
13
|
static fromPrimitives(primitives: GHGBreakdownPrimitives[]): EmissionAggregationGhgBreakdown;
|
|
23
|
-
/**
|
|
24
|
-
* Validación estática para reutilización en factory methods y constructores.
|
|
25
|
-
*/
|
|
26
14
|
protected static validateGhgBreakdowns(value: GHGBreakdown[], options: EmissionAggregationGhgBreakdownOptions, propertyName: string): void;
|
|
27
|
-
/**
|
|
28
|
-
* Breakdowns de GHG (inmutable).
|
|
29
|
-
*/
|
|
30
15
|
get ghgBreakdowns(): readonly GHGBreakdown[];
|
|
31
|
-
/**
|
|
32
|
-
* Número de breakdowns en la colección.
|
|
33
|
-
*/
|
|
34
16
|
get length(): number;
|
|
35
|
-
/**
|
|
36
|
-
* Verifica si la colección está vacía.
|
|
37
|
-
*/
|
|
38
17
|
isEmpty(): boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Verifica si la colección tiene breakdowns.
|
|
41
|
-
*/
|
|
42
18
|
hasBreakdowns(): boolean;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
*/
|
|
46
|
-
getBreakdownByGas(greenhouseGas: GreenhouseGas): GHGBreakdown | null;
|
|
47
|
-
/**
|
|
48
|
-
* Verifica si existe un breakdown para el gas especificado.
|
|
49
|
-
*/
|
|
50
|
-
hasBreakdownForGas(greenhouseGas: GreenhouseGas): boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Obtiene un breakdown por su índice.
|
|
53
|
-
*/
|
|
19
|
+
getBreakdownBySpecies(species: string): GHGBreakdown | null;
|
|
20
|
+
hasBreakdownForSpecies(species: string): boolean;
|
|
54
21
|
getBreakdownAt(index: number): GHGBreakdown | null;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
*/
|
|
58
|
-
getAllGreenhouseGases(): GreenhouseGas[];
|
|
59
|
-
/**
|
|
60
|
-
* Obtiene el total de CO2 equivalente.
|
|
61
|
-
*/
|
|
22
|
+
getAllSpecies(): string[];
|
|
23
|
+
getAllCategories(): GreenhouseGasCategory[];
|
|
62
24
|
getTotalCo2Equivalent(): number;
|
|
63
|
-
/**
|
|
64
|
-
* Obtiene el breakdown con mayor CO2 equivalente.
|
|
65
|
-
*/
|
|
66
25
|
getHighestCo2EquivalentBreakdown(): GHGBreakdown | null;
|
|
67
|
-
/**
|
|
68
|
-
* Obtiene el breakdown con menor CO2 equivalente.
|
|
69
|
-
*/
|
|
70
26
|
getLowestCo2EquivalentBreakdown(): GHGBreakdown | null;
|
|
71
|
-
/**
|
|
72
|
-
* Filtra breakdowns por umbral mínimo de porcentaje.
|
|
73
|
-
*/
|
|
74
27
|
getBreakdownsAbovePercentage(threshold: number): GHGBreakdown[];
|
|
75
|
-
/**
|
|
76
|
-
* Obtiene los N breakdowns con mayor CO2 equivalente.
|
|
77
|
-
*/
|
|
78
28
|
getTopNBreakdowns(count: number): GHGBreakdown[];
|
|
79
|
-
/**
|
|
80
|
-
* Verifica si contiene todos los gases principales (CO2, CH4, N2O).
|
|
81
|
-
*/
|
|
82
29
|
hasMainGreenhouseGases(): boolean;
|
|
83
|
-
|
|
84
|
-
* Obtiene gases faltantes de una lista específica.
|
|
85
|
-
*/
|
|
86
|
-
getMissingGases(requiredGases: GreenhouseGas[]): GreenhouseGas[];
|
|
87
|
-
/**
|
|
88
|
-
* Obtiene estadísticas de los breakdowns.
|
|
89
|
-
*/
|
|
30
|
+
getMissingSpecies(requiredSpecies: string[]): string[];
|
|
90
31
|
getStatistics(): {
|
|
91
32
|
totalCo2Equivalent: number;
|
|
92
33
|
averagePercentage: number;
|
|
93
34
|
gasCount: number;
|
|
94
|
-
|
|
95
|
-
|
|
35
|
+
highestSpecies: string | null;
|
|
36
|
+
lowestSpecies: string | null;
|
|
96
37
|
};
|
|
97
|
-
/**
|
|
98
|
-
* Convierte a representación primitiva para persistencia.
|
|
99
|
-
*/
|
|
100
38
|
toPrimitives(): GHGBreakdownPrimitives[];
|
|
101
|
-
/**
|
|
102
|
-
* Representación JSON para serialización.
|
|
103
|
-
*/
|
|
104
39
|
toJSON(): GHGBreakdownPrimitives[];
|
|
105
|
-
/**
|
|
106
|
-
* Convierte a tipos de dominio.
|
|
107
|
-
*/
|
|
108
40
|
toEnums(): GHGBreakdown[];
|
|
109
|
-
/**
|
|
110
|
-
* Método estático para validar si un array es válido.
|
|
111
|
-
*/
|
|
112
41
|
static isValidGhgBreakdowns(value: GHGBreakdown[], options?: EmissionAggregationGhgBreakdownOptions): boolean;
|
|
113
42
|
}
|
|
114
43
|
//# sourceMappingURL=EmissionAggregationGhgBreakdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmissionAggregationGhgBreakdown.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/emission-aggregations/domain/value-objects/EmissionAggregationGhgBreakdown.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"EmissionAggregationGhgBreakdown.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/emission-aggregations/domain/value-objects/EmissionAggregationGhgBreakdown.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAE9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,sCAAsC,EAAE,MAAM,iDAAiD,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAElF,qBAAa,+BACX,SAAQ,WAAW,CAAC,sBAAsB,EAAE,CAAC;;IAC7C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAkB;IAEvD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAE7B;IAEF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAIzC;IAIF,OAAO;WAsBgB,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,+BAA+B;WAI9D,cAAc,CAAC,UAAU,EAAE,sBAAsB,EAAE,GAAG,+BAA+B;IAY5G,SAAS,CAAC,MAAM,CAAC,qBAAqB,CACpC,KAAK,EAAE,YAAY,EAAE,EACrB,OAAO,EAAE,sCAAsC,EAC/C,YAAY,EAAE,MAAM,GACnB,IAAI;IA+HP,IAAW,aAAa,IAAI,SAAS,YAAY,EAAE,CAElD;IAED,IAAW,MAAM,IAAI,MAAM,CAE1B;IAEM,OAAO,IAAI,OAAO;IAIlB,aAAa,IAAI,OAAO;IAIxB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;IAM3D,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAIhD,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;IAOlD,aAAa,IAAI,MAAM,EAAE;IAIzB,gBAAgB,IAAI,qBAAqB,EAAE;IAI3C,qBAAqB,IAAI,MAAM;IAI/B,gCAAgC,IAAI,YAAY,GAAG,IAAI;IAQvD,+BAA+B,IAAI,YAAY,GAAG,IAAI;IAQtD,4BAA4B,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,EAAE;IAI/D,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,EAAE;IAUhD,sBAAsB,IAAI,OAAO;IAKjC,iBAAiB,CAAC,eAAe,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAItD,aAAa,IAAI;QACtB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,QAAQ,EAAE,MAAM,CAAC;QACjB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;KAC9B;IAuBe,YAAY,IAAI,sBAAsB,EAAE;IAUjD,MAAM,IAAI,sBAAsB,EAAE;IAIlC,OAAO,IAAI,YAAY,EAAE;WAIlB,oBAAoB,CAChC,KAAK,EAAE,YAAY,EAAE,EACrB,OAAO,GAAE,sCAAgF,GACxF,OAAO;CASX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GHGEmissionResult.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/ghg-emission-results/domain/entity/GHGEmissionResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,oCAAoC,EAAE,MAAM,uDAAuD,CAAC;AAC7G,OAAO,EAAE,+BAA+B,EAAE,MAAM,kDAAkD,CAAC;AACnG,OAAO,EAAE,uCAAuC,EAAE,MAAM,0DAA0D,CAAC;AACnH,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AAEjG,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,iBACX,SAAQ,aAAa,CAAC,2BAA2B,CACjD,YAAW,kBAAkB;;IAiB7B,OAAO;
|
|
1
|
+
{"version":3,"file":"GHGEmissionResult.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/ghg-emission-results/domain/entity/GHGEmissionResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,oCAAoC,EAAE,MAAM,uDAAuD,CAAC;AAC7G,OAAO,EAAE,+BAA+B,EAAE,MAAM,kDAAkD,CAAC;AACnG,OAAO,EAAE,uCAAuC,EAAE,MAAM,0DAA0D,CAAC;AACnH,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AAEjG,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,iBACX,SAAQ,aAAa,CAAC,2BAA2B,CACjD,YAAW,kBAAkB;;IAiB7B,OAAO;WAoCgB,MAAM,CAAC,KAAK,EAAE,sBAAsB,GAAG,iBAAiB;WAIxD,cAAc,CAAC,UAAU,EAAE,2BAA2B,GAAG,iBAAiB;IAiBjG,IAAoB,YAAY,IAAI,2BAA2B,CAa9D;IAED,IAAW,mBAAmB,IAAI,oCAAoC,CAErE;IAED,IAAW,aAAa,IAAI,8BAA8B,CAEzD;IAED,IAAW,aAAa,IAAI,8BAA8B,CAEzD;IAED,IAAW,cAAc,IAAI,+BAA+B,CAE3D;IAED,IAAW,sBAAsB,IAAI,uCAAuC,CAE3E;IAED,IAAW,WAAW,IAAI,4BAA4B,CAErD;IAED,IAAW,aAAa,IAAI,8BAA8B,CAEzD;IAED,IAAW,IAAI,IAAI,qBAAqB,CAEvC;CACF"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GreenhouseGasCategory } from '../../../../shared/domain/enums/GreenhouseGasCategory';
|
|
2
2
|
import { AggregateRootPrimitives } from '../../../../shared/domain/types/AggregateRootPrimitives';
|
|
3
3
|
import { EmissionCalculationReferencePrimitives } from '../../../../shared/domain/types/EmissionCalculationReferencePrimitives';
|
|
4
4
|
export type GHGEmissionResultPrimitives = AggregateRootPrimitives & {
|
|
5
5
|
emissionCalculation: EmissionCalculationReferencePrimitives;
|
|
6
|
-
|
|
6
|
+
greenhouseGasCategory: GreenhouseGasCategory;
|
|
7
|
+
greenhouseGasSpecies: string;
|
|
7
8
|
activityValue: number;
|
|
8
9
|
emissionFactor: number;
|
|
9
10
|
globalWarmingPotential: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GHGEmissionResultPrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/ghg-emission-results/domain/types/GHGEmissionResultPrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"GHGEmissionResultPrimitives.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/ghg-emission-results/domain/types/GHGEmissionResultPrimitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,EAAE,sCAAsC,EAAE,MAAM,wEAAwE,CAAC;AAEhI,MAAM,MAAM,2BAA2B,GAAG,uBAAuB,GAAG;IAClE,mBAAmB,EAAE,sCAAsC,CAAC;IAC5D,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GreenhouseGasCategory } from '../../../../shared/domain/enums/GreenhouseGasCategory';
|
|
2
2
|
import { AggregateRootProps } from '../../../../shared/domain/types/AggregateRootProps';
|
|
3
3
|
import { EmissionCalculationReference } from '../../../../shared/domain/types/EmissionCalculationReference';
|
|
4
4
|
export type GHGEmissionResultProps = AggregateRootProps & {
|
|
5
5
|
emissionCalculation: EmissionCalculationReference;
|
|
6
|
-
|
|
6
|
+
greenhouseGasCategory: GreenhouseGasCategory;
|
|
7
|
+
greenhouseGasSpecies: string;
|
|
7
8
|
activityValue: number;
|
|
8
9
|
emissionFactor: number;
|
|
9
10
|
globalWarmingPotential: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GHGEmissionResultProps.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/ghg-emission-results/domain/types/GHGEmissionResultProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"GHGEmissionResultProps.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/ghg-emission-results/domain/types/GHGEmissionResultProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,8DAA8D,CAAC;AAE5G,MAAM,MAAM,sBAAsB,GAAG,kBAAkB,GAAG;IACxD,mBAAmB,EAAE,4BAA4B,CAAC;IAClD,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -1,94 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
1
|
+
import { ValueObject } from '../../../../shared/domain/value-objects/ValueObject';
|
|
2
|
+
import { GreenhouseGasCategory } from '../../../../shared/domain/enums/GreenhouseGasCategory';
|
|
3
|
+
export type GHGEmissionResultGreenhouseGasPrimitives = {
|
|
4
|
+
greenhouseGasCategory: GreenhouseGasCategory;
|
|
5
|
+
greenhouseGasSpecies: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Identidad del gas en un resultado de emisión: categoría (canasta de Kyoto) + especie concreta.
|
|
9
|
+
* El cálculo produce un resultado por especie; la categoría viaja al lado para agregación/reporte.
|
|
10
|
+
* La lógica de categorización (fluorinated/main-gases) opera sobre categoría, no sobre la especie.
|
|
11
|
+
*/
|
|
12
|
+
export declare class GHGEmissionResultGreenhouseGas extends ValueObject<GHGEmissionResultGreenhouseGasPrimitives> {
|
|
4
13
|
private static readonly PROPERTY_NAME;
|
|
5
|
-
private static readonly
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
static
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Verifica si es CO2 (Dióxido de Carbono).
|
|
15
|
-
*/
|
|
14
|
+
private static readonly MAIN_GAS_CATEGORIES;
|
|
15
|
+
private static readonly FLUORINATED_CATEGORIES;
|
|
16
|
+
private constructor();
|
|
17
|
+
static create(category: GreenhouseGasCategory, species: string): GHGEmissionResultGreenhouseGas;
|
|
18
|
+
static fromPrimitives(primitives: GHGEmissionResultGreenhouseGasPrimitives): GHGEmissionResultGreenhouseGas;
|
|
19
|
+
private static guardAgainstInvalidCategory;
|
|
20
|
+
get category(): GreenhouseGasCategory;
|
|
21
|
+
get species(): string;
|
|
16
22
|
isCO2(): boolean;
|
|
17
|
-
|
|
18
|
-
* Verifica si es CH4 (Metano).
|
|
19
|
-
*/
|
|
20
|
-
isCH4(): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Verifica si es N2O (Óxido Nitroso).
|
|
23
|
-
*/
|
|
24
|
-
isN2O(): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Verifica si es HFC (Hidrofluorocarbonos).
|
|
27
|
-
*/
|
|
28
|
-
isHFC(): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Verifica si es PFC (Perfluorocarbonos).
|
|
31
|
-
*/
|
|
32
|
-
isPFC(): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Verifica si es SF6 (Hexafluoruro de Azufre).
|
|
35
|
-
*/
|
|
36
|
-
isSF6(): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Verifica si es NF3 (Trifluoruro de Nitrógeno).
|
|
39
|
-
*/
|
|
40
|
-
isNF3(): boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Verifica si es HFC134a (Hidrofluorocarbono específico).
|
|
43
|
-
*/
|
|
44
|
-
isHFC134a(): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Obtiene los gases de efecto invernadero válidos.
|
|
47
|
-
*/
|
|
48
|
-
static getValidGreenhouseGases(): readonly GreenhouseGas[];
|
|
49
|
-
/**
|
|
50
|
-
* Verifica si un valor es un gas de efecto invernadero válido.
|
|
51
|
-
*/
|
|
52
|
-
static isValidGreenhouseGas(value: string): boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Verifica si es un gas de Kyoto Protocol (CO2, CH4, N2O, HFC, PFC, SF6).
|
|
55
|
-
*/
|
|
56
|
-
isKyotoProtocolGas(): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Verifica si es un gas fluorado (HFC, PFC, SF6, NF3, HFC134a).
|
|
59
|
-
*/
|
|
23
|
+
isMainGas(): boolean;
|
|
60
24
|
isFluorinatedGas(): boolean;
|
|
61
|
-
|
|
62
|
-
* Verifica si es un gas con alto potencial de calentamiento global (todos excepto CO2).
|
|
63
|
-
*/
|
|
64
|
-
isHighGWPGas(): boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Obtiene el tipo de gas según su categoría.
|
|
67
|
-
*/
|
|
68
|
-
getGasCategory(): 'natural' | 'fluorinated' | 'specific_hfc';
|
|
69
|
-
/**
|
|
70
|
-
* Verifica si requiere medición específica de GWP.
|
|
71
|
-
*/
|
|
72
|
-
requiresSpecificGWP(): boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Obtiene la descripción del gas de efecto invernadero.
|
|
75
|
-
*/
|
|
76
|
-
getDescription(): string;
|
|
77
|
-
/**
|
|
78
|
-
* Obtiene las características principales del gas.
|
|
79
|
-
*/
|
|
80
|
-
getCharacteristics(): {
|
|
81
|
-
isKyotoProtocolGas: boolean;
|
|
82
|
-
isFluorinatedGas: boolean;
|
|
83
|
-
isHighGWPGas: boolean;
|
|
84
|
-
requiresSpecificGWP: boolean;
|
|
85
|
-
category: 'natural' | 'fluorinated' | 'specific_hfc';
|
|
86
|
-
};
|
|
87
|
-
toPrimitives(): string;
|
|
88
|
-
toEnum(): GreenhouseGas;
|
|
89
|
-
/**
|
|
90
|
-
* Representación como string descriptiva.
|
|
91
|
-
*/
|
|
92
|
-
toString(): string;
|
|
25
|
+
toPrimitives(): GHGEmissionResultGreenhouseGasPrimitives;
|
|
93
26
|
}
|
|
94
27
|
//# sourceMappingURL=GHGEmissionResultGreenhouseGas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GHGEmissionResultGreenhouseGas.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/ghg-emission-results/domain/value-objects/GHGEmissionResultGreenhouseGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"GHGEmissionResultGreenhouseGas.d.ts","sourceRoot":"","sources":["../../../../../../../src/carbonbox/emission-calculation-results/ghg-emission-results/domain/value-objects/GHGEmissionResultGreenhouseGas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAI9F,MAAM,MAAM,wCAAwC,GAAG;IACrD,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;GAIG;AACH,qBAAa,8BACX,SAAQ,WAAW,CAAC,wCAAwC,CAAC;IAC7D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAmB;IAExD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAIzC;IAEF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAM5C;IAEF,OAAO;WAcO,MAAM,CAAC,QAAQ,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,GAAG,8BAA8B;WAU/E,cAAc,CACnC,UAAU,EAAE,wCAAwC,GACnD,8BAA8B;IAIjC,OAAO,CAAC,MAAM,CAAC,2BAA2B;IAU1C,IAAW,QAAQ,IAAI,qBAAqB,CAE3C;IAED,IAAW,OAAO,IAAI,MAAM,CAE3B;IAEM,KAAK,IAAI,OAAO;IAIhB,SAAS,IAAI,OAAO;IAIpB,gBAAgB,IAAI,OAAO;IAIlB,YAAY,IAAI,wCAAwC;CAMzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GreenhouseGasCategory.d.ts","sourceRoot":"","sources":["../../../../../../src/carbonbox/shared/domain/enums/GreenhouseGasCategory.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB;IAC/B,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,KAAK,UAAU;CAChB"}
|