emissions-api-sdk 1.0.4 → 1.0.5

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 (55) hide show
  1. package/dist/Constants.js +9 -1
  2. package/dist/api/EconomicActivity.js +100 -0
  3. package/dist/api/RealEstate.js +101 -0
  4. package/dist/coverage/clover.xml +87 -35
  5. package/dist/coverage/coverage-final.json +5 -3
  6. package/dist/coverage/lcov-report/index.html +15 -15
  7. package/dist/coverage/lcov-report/src/Client.ts.html +23 -23
  8. package/dist/coverage/lcov-report/src/Constants.ts.html +28 -4
  9. package/dist/coverage/lcov-report/src/api/Calculation.ts.html +1 -1
  10. package/dist/coverage/lcov-report/src/api/EconomicActivity.ts.html +427 -0
  11. package/dist/coverage/lcov-report/src/api/Factor.ts.html +1 -1
  12. package/dist/coverage/lcov-report/src/api/FactorSets.ts.html +1 -1
  13. package/dist/coverage/lcov-report/src/api/Fugitive.ts.html +1 -1
  14. package/dist/coverage/lcov-report/src/api/Location.ts.html +1 -1
  15. package/dist/coverage/lcov-report/src/api/Mobile.ts.html +1 -1
  16. package/dist/coverage/lcov-report/src/api/RealEstate.ts.html +430 -0
  17. package/dist/coverage/lcov-report/src/api/Stationary.ts.html +1 -1
  18. package/dist/coverage/lcov-report/src/api/TransportationAndDistribution.ts.html +1 -1
  19. package/dist/coverage/lcov-report/src/api/Usage.ts.html +1 -1
  20. package/dist/coverage/lcov-report/src/api/index.html +34 -4
  21. package/dist/coverage/lcov-report/src/index.html +7 -7
  22. package/dist/coverage/lcov-report/src/request.ts.html +1 -1
  23. package/dist/coverage/lcov-report/src/utils.ts.html +5 -5
  24. package/dist/coverage/lcov-report/test/index.html +1 -1
  25. package/dist/coverage/lcov-report/test/mocks/CommonRequest.ts.html +1 -1
  26. package/dist/coverage/lcov-report/test/mocks/FactorRequest.ts.html +1 -1
  27. package/dist/coverage/lcov-report/test/mocks/GenericCalculationRequest.ts.html +1 -1
  28. package/dist/coverage/lcov-report/test/mocks/LocationRequest.ts.html +1 -1
  29. package/dist/coverage/lcov-report/test/mocks/SearchRequest.ts.html +1 -1
  30. package/dist/coverage/lcov-report/test/mocks/index.html +1 -1
  31. package/dist/coverage/lcov-report/test/testUtils.ts.html +1 -1
  32. package/dist/coverage/lcov.info +137 -57
  33. package/dist/index.js +3 -1
  34. package/dist/types/Constants.d.ts +8 -0
  35. package/dist/types/api/EconomicActivity.d.ts +67 -0
  36. package/dist/types/api/RealEstate.d.ts +68 -0
  37. package/dist/types/index.d.ts +2 -0
  38. package/dist/types/interfaces/response/FactorResponse.d.ts +0 -4
  39. package/docs/_sources/index.rst.txt +8 -6
  40. package/docs/_sources/reference.rst.txt +16 -0
  41. package/docs/genindex.html +29 -1
  42. package/docs/index.html +2 -0
  43. package/docs/objects.inv +0 -0
  44. package/docs/reference.html +194 -0
  45. package/docs/searchindex.js +1 -1
  46. package/package.json +5 -2
  47. package/sphinx-build/.secrets.baseline +150 -0
  48. package/sphinx-build/source/index.rst +8 -6
  49. package/sphinx-build/source/reference.rst +16 -0
  50. package/src/Constants.ts +8 -0
  51. package/src/api/EconomicActivity.ts +115 -0
  52. package/src/api/RealEstate.ts +116 -0
  53. package/src/index.ts +2 -0
  54. package/src/interfaces/response/FactorResponse.ts +0 -7
  55. package/test/apiTest.test.ts +63 -1
package/dist/Constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CLIENT_SOURCE_SDK = exports.CLIENT_SOURCE_EXCEL = exports.CLIENT_SOURCE_HEADER = exports.POST = exports.GET = exports.USAGE_API = exports.TRANSPORTATION_AND_DISTRIBUTION_API_UNITS = exports.FACTOR_API_UNITS = exports.GENERAL_API_UNITS = exports.STATIONARY_API_UNITS = exports.MOBILE_API_UNITS = exports.LOCATION_API_UNITS = exports.FUGITIVE_API_UNITS = exports.FACTOR_API_AREA = exports.SEARCH_API_AREA = exports.TRANSPORTATION_AND_DISTRIBUTION_API_AREA = exports.STATIONARY_API_AREA = exports.MOBILE_API_AREA = exports.LOCATION_API_AREA = exports.GENERAL_API_AREA = exports.FUGITIVE_API_AREA = exports.TRANSPORTATION_AND_DISTRIBUTION_API_TYPES = exports.FACTOR_API_TYPES = exports.STATIONARY_API_TYPES = exports.MOBILE_API_TYPES = exports.FUGITIVE_API_TYPES = exports.LOCATION_TYPES = exports.CALCULATION_TYPES = exports.SEARCH_API_PATH = exports.FACTOR_SET_API_PATH = exports.FACTOR_API_PATH = exports.TRANSPORTATION_AND_DISTRIBUTION_API_PATH = exports.GENERIC_CALCULATION_API_PATH = exports.STATIONARY_API_PATH = exports.FUGITIVE_API_PATH = exports.LOCATION_API_PATH = exports.MOBILE_API_PATH = exports.TOKEN_GENERATION_API = exports.API_DOMAIN = void 0;
3
+ exports.CLIENT_SOURCE_SDK = exports.CLIENT_SOURCE_EXCEL = exports.CLIENT_SOURCE_HEADER = exports.POST = exports.GET = exports.USAGE_API = exports.ECONOMIC_ACTIVITY_API_UNITS = exports.REAL_ESTATE_API_UNITS = exports.TRANSPORTATION_AND_DISTRIBUTION_API_UNITS = exports.FACTOR_API_UNITS = exports.GENERAL_API_UNITS = exports.STATIONARY_API_UNITS = exports.MOBILE_API_UNITS = exports.LOCATION_API_UNITS = exports.FUGITIVE_API_UNITS = exports.ECONOMIC_ACTIVITY_API_AREA = exports.REAL_ESTATE_API_AREA = exports.FACTOR_API_AREA = exports.SEARCH_API_AREA = exports.TRANSPORTATION_AND_DISTRIBUTION_API_AREA = exports.STATIONARY_API_AREA = exports.MOBILE_API_AREA = exports.LOCATION_API_AREA = exports.GENERAL_API_AREA = exports.FUGITIVE_API_AREA = exports.ECONOMIC_ACTIVITY_API_TYPES = exports.REAL_ESTATE_API_TYPES = exports.TRANSPORTATION_AND_DISTRIBUTION_API_TYPES = exports.FACTOR_API_TYPES = exports.STATIONARY_API_TYPES = exports.MOBILE_API_TYPES = exports.FUGITIVE_API_TYPES = exports.LOCATION_TYPES = exports.CALCULATION_TYPES = exports.REAL_ESTATE_API_PATH = exports.ECONOMIC_ACTIVITY_API_PATH = exports.SEARCH_API_PATH = exports.FACTOR_SET_API_PATH = exports.FACTOR_API_PATH = exports.TRANSPORTATION_AND_DISTRIBUTION_API_PATH = exports.GENERIC_CALCULATION_API_PATH = exports.STATIONARY_API_PATH = exports.FUGITIVE_API_PATH = exports.LOCATION_API_PATH = exports.MOBILE_API_PATH = exports.TOKEN_GENERATION_API = exports.API_DOMAIN = void 0;
4
4
  exports.API_DOMAIN = "https://api.ibm.com/ghgemissions/run";
5
5
  exports.TOKEN_GENERATION_API = "https://api.ibm.com/saascore/run/authentication-retrieve/api-key";
6
6
  exports.MOBILE_API_PATH = "/v3/carbon/mobile";
@@ -12,6 +12,8 @@ exports.TRANSPORTATION_AND_DISTRIBUTION_API_PATH = "/v3/carbon/transportation-an
12
12
  exports.FACTOR_API_PATH = "/v3/carbon/factor";
13
13
  exports.FACTOR_SET_API_PATH = "/v3/carbon/factorset";
14
14
  exports.SEARCH_API_PATH = "/v3/carbon/factor/search";
15
+ exports.ECONOMIC_ACTIVITY_API_PATH = "/v3/carbon/economic-activity";
16
+ exports.REAL_ESTATE_API_PATH = "/v3/carbon/real-estate";
15
17
  exports.CALCULATION_TYPES = "/v3/carbon/calculation/types";
16
18
  exports.LOCATION_TYPES = "/v3/carbon/location/types";
17
19
  exports.FUGITIVE_API_TYPES = "/v3/carbon/fugitive/types";
@@ -19,6 +21,8 @@ exports.MOBILE_API_TYPES = "/v3/carbon/mobile/types";
19
21
  exports.STATIONARY_API_TYPES = "/v3/carbon/stationary/types";
20
22
  exports.FACTOR_API_TYPES = "/v3/carbon/factor/types";
21
23
  exports.TRANSPORTATION_AND_DISTRIBUTION_API_TYPES = "/v3/carbon/transportation-and-distribution/types";
24
+ exports.REAL_ESTATE_API_TYPES = "/v3/carbon/real-estate/types";
25
+ exports.ECONOMIC_ACTIVITY_API_TYPES = "/v3/carbon/economic-activity/types";
22
26
  exports.FUGITIVE_API_AREA = "/v3/carbon/fugitive/area";
23
27
  exports.GENERAL_API_AREA = "/v3/carbon/calculation/area";
24
28
  exports.LOCATION_API_AREA = "/v3/carbon/location/area";
@@ -27,6 +31,8 @@ exports.STATIONARY_API_AREA = "/v3/carbon/stationary/area";
27
31
  exports.TRANSPORTATION_AND_DISTRIBUTION_API_AREA = "/v3/carbon/transportation-and-distribution/area";
28
32
  exports.SEARCH_API_AREA = "/v3/carbon/factor/search/area";
29
33
  exports.FACTOR_API_AREA = "/v3/carbon/factor/area";
34
+ exports.REAL_ESTATE_API_AREA = "/v3/carbon/real-estate/area";
35
+ exports.ECONOMIC_ACTIVITY_API_AREA = "/v3/carbon/economic-activity/area";
30
36
  exports.FUGITIVE_API_UNITS = "/v3/carbon/fugitive/units";
31
37
  exports.LOCATION_API_UNITS = "/v3/carbon/location/units";
32
38
  exports.MOBILE_API_UNITS = "/v3/carbon/mobile/units";
@@ -34,6 +40,8 @@ exports.STATIONARY_API_UNITS = "/v3/carbon/stationary/units";
34
40
  exports.GENERAL_API_UNITS = "/v3/carbon/calculation/units";
35
41
  exports.FACTOR_API_UNITS = "/v3/carbon/factor/units";
36
42
  exports.TRANSPORTATION_AND_DISTRIBUTION_API_UNITS = "/v3/carbon/transportation-and-distribution/units";
43
+ exports.REAL_ESTATE_API_UNITS = "/v3/carbon/real-estate/units";
44
+ exports.ECONOMIC_ACTIVITY_API_UNITS = "/v3/carbon/economic-activity/units";
37
45
  exports.USAGE_API = "/v3/carbon/usage";
38
46
  exports.GET = "GET";
39
47
  exports.POST = "POST";
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculate = calculate;
4
+ exports.getTypes = getTypes;
5
+ exports.getArea = getArea;
6
+ exports.getUnits = getUnits;
7
+ const Client_1 = require("../Client");
8
+ const Constants_1 = require("../Constants");
9
+ const request_1 = require("../request");
10
+ /**
11
+ * Performs scope 3 Spend based emission calculations by making a POST request to the economic activity API endpoint.
12
+ *
13
+ * @export
14
+ * @param {CommonRequest} payload - The request data to be sent to the API
15
+ * @return {Promise<EmissionResponse | EmissionResponseWithDetails>} A promise that resolves to the emission calculation result. Returns EmissionResponseWithDetails if includeDetails is true, otherwise EmissionResponse
16
+ * @throws {Error} May throw an error if the API request fails
17
+ *
18
+ * @example
19
+ * const request = {
20
+ "time": {
21
+ "date": "2025-01-04"
22
+ },
23
+ "location": {
24
+ "country": "usa"
25
+ },
26
+ "activity": {
27
+ "type": "accomodation",
28
+ "value": 1500.12,
29
+ "unit": "usd"
30
+ },
31
+ "includeDetails": false
32
+ };
33
+ * const result = await calculate(request);
34
+ */
35
+ async function calculate(payload) {
36
+ const client = Client_1.Client.getInstance();
37
+ const url = client.getDomain() + Constants_1.ECONOMIC_ACTIVITY_API_PATH;
38
+ return (0, request_1.makeApiRequest)({
39
+ method: Constants_1.POST,
40
+ url,
41
+ data: payload,
42
+ });
43
+ }
44
+ /**
45
+ * Retrieves available economic activity emission calculation types by making a GET request to the API endpoint.
46
+ *
47
+ * @export
48
+ * @return {Promise<TypeResponse>} A promise that resolves to a TypeResponse containing the available economic activity emission types
49
+ * @throws {Error} May throw an error if the API request fails
50
+ *
51
+ * @example
52
+ * const types = await getTypes();
53
+ */
54
+ async function getTypes() {
55
+ const client = Client_1.Client.getInstance();
56
+ const url = client.getDomain() + Constants_1.ECONOMIC_ACTIVITY_API_TYPES;
57
+ return (0, request_1.makeApiRequest)({
58
+ method: Constants_1.GET,
59
+ url
60
+ });
61
+ }
62
+ /**
63
+ * Retrieves information about geographical areas supported by the economic activity emissions API.
64
+ *
65
+ * @export
66
+ * @return {Promise<AreaResponse>} A promise that resolves to an AreaResponse containing the supported geographical areas
67
+ * @throws {Error} May throw an error if the API request fails
68
+ *
69
+ * @example
70
+ * const areas = await getArea();
71
+ */
72
+ async function getArea() {
73
+ const client = Client_1.Client.getInstance();
74
+ const url = client.getDomain() + Constants_1.ECONOMIC_ACTIVITY_API_AREA;
75
+ return (0, request_1.makeApiRequest)({
76
+ method: Constants_1.GET,
77
+ url
78
+ });
79
+ }
80
+ /**
81
+ * Retrieves available units for a specific economic activity emission type.
82
+ *
83
+ * @export
84
+ * @param {string} type - The economic activity emission type to get units for (e.g., "accomodation")
85
+ * @return {Promise<UnitResponse>} A promise that resolves to a UnitResponse containing the available units
86
+ * @throws {Error} May throw an error if the API request fails
87
+ *
88
+ * @example
89
+ * // Get units for the "accomodation" emission economic activity type without subtype
90
+ * const units = await getUnits("accomodation");
91
+ */
92
+ async function getUnits(type) {
93
+ const client = Client_1.Client.getInstance();
94
+ const url = client.getDomain() + Constants_1.ECONOMIC_ACTIVITY_API_UNITS;
95
+ return (0, request_1.makeApiRequest)({
96
+ method: Constants_1.GET,
97
+ url,
98
+ params: { type }
99
+ });
100
+ }
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculate = calculate;
4
+ exports.getTypes = getTypes;
5
+ exports.getArea = getArea;
6
+ exports.getUnits = getUnits;
7
+ const Client_1 = require("../Client");
8
+ const Constants_1 = require("../Constants");
9
+ const request_1 = require("../request");
10
+ /**
11
+ * Performs scope 3 Real estate emission calculations by making a POST request to the real estate API endpoint.
12
+ *
13
+ * @export
14
+ * @param {CommonRequest} payload - The request data to be sent to the API
15
+ * @return {Promise<EmissionResponse | EmissionResponseWithDetails>} A promise that resolves to the emission calculation result. Returns EmissionResponseWithDetails if includeDetails is true, otherwise EmissionResponse
16
+ * @throws {Error} May throw an error if the API request fails
17
+ *
18
+ * @example
19
+ * const request = {
20
+ "time": {
21
+ "date": "2025-01-04"
22
+ },
23
+ "location": {
24
+ "country": "usa"
25
+ },
26
+ "activity": {
27
+ "type": "Commercial Real Estate:Industrial distribution warehouse",
28
+ "value": 17000.123,
29
+ "unit": "m2"
30
+ },
31
+ "includeDetails": false
32
+ };
33
+ * const result = await calculate(request);
34
+ */
35
+ async function calculate(payload) {
36
+ const client = Client_1.Client.getInstance();
37
+ const url = client.getDomain() + Constants_1.REAL_ESTATE_API_PATH;
38
+ return (0, request_1.makeApiRequest)({
39
+ method: Constants_1.POST,
40
+ url,
41
+ data: payload,
42
+ });
43
+ }
44
+ /**
45
+ * Retrieves available Real estate emission calculation types by making a GET request to the API endpoint.
46
+ *
47
+ * @export
48
+ * @return {Promise<TypeResponse>} A promise that resolves to a TypeResponse containing the available Real estate emission types
49
+ * @throws {Error} May throw an error if the API request fails
50
+ *
51
+ * @example
52
+ * const types = await getTypes();
53
+ */
54
+ async function getTypes() {
55
+ const client = Client_1.Client.getInstance();
56
+ const url = client.getDomain() + Constants_1.REAL_ESTATE_API_TYPES;
57
+ return (0, request_1.makeApiRequest)({
58
+ method: Constants_1.GET,
59
+ url
60
+ });
61
+ }
62
+ /**
63
+ * Retrieves information about geographical areas supported by the real estate emissions API.
64
+ *
65
+ * @export
66
+ * @return {Promise<AreaResponse>} A promise that resolves to an AreaResponse containing the supported geographical areas
67
+ * @throws {Error} May throw an error if the API request fails
68
+ *
69
+ * @example
70
+ * const areas = await getArea();
71
+ */
72
+ async function getArea() {
73
+ const client = Client_1.Client.getInstance();
74
+ const url = client.getDomain() + Constants_1.REAL_ESTATE_API_AREA;
75
+ return (0, request_1.makeApiRequest)({
76
+ method: Constants_1.GET,
77
+ url
78
+ });
79
+ }
80
+ /**
81
+ * Retrieves available units for a specific Real estate emission type.
82
+ *
83
+ * @export
84
+ * @param {string} type - The Real estate emission type to get units for (e.g., "R134A")
85
+ * @return {Promise<UnitResponse>} A promise that resolves to a UnitResponse containing the available units
86
+ * @throws {Error} May throw an error if the API request fails
87
+ *
88
+ * @example
89
+ * // Get units for the "Commercial Real Estate:Industrial distribution warehouse" emission real estate type with subtype
90
+ * const units = await getUnits("Commercial Real Estate:Industrial distribution warehouse");
91
+
92
+ */
93
+ async function getUnits(type) {
94
+ const client = Client_1.Client.getInstance();
95
+ const url = client.getDomain() + Constants_1.REAL_ESTATE_API_UNITS;
96
+ return (0, request_1.makeApiRequest)({
97
+ method: Constants_1.GET,
98
+ url,
99
+ params: { type }
100
+ });
101
+ }
@@ -1,9 +1,9 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1769160409349" clover="3.2.0">
3
- <project timestamp="1769160409349" name="All files">
4
- <metrics statements="271" coveredstatements="269" conditionals="48" coveredconditionals="41" methods="44" coveredmethods="42" elements="363" coveredelements="352" complexity="0" loc="271" ncloc="271" packages="4" files="19" classes="19"/>
2
+ <coverage generated="1771331810850" clover="3.2.0">
3
+ <project timestamp="1771331810850" name="All files">
4
+ <metrics statements="317" coveredstatements="315" conditionals="48" coveredconditionals="41" methods="52" coveredmethods="50" elements="417" coveredelements="406" complexity="0" loc="317" ncloc="317" packages="4" files="21" classes="21"/>
5
5
  <package name="src">
6
- <metrics statements="102" coveredstatements="100" conditionals="47" coveredconditionals="41" methods="11" coveredmethods="9"/>
6
+ <metrics statements="110" coveredstatements="108" conditionals="47" coveredconditionals="41" methods="11" coveredmethods="9"/>
7
7
  <file name="Client.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/Client.ts">
8
8
  <metrics statements="49" coveredstatements="47" conditionals="45" coveredconditionals="40" methods="9" coveredmethods="7"/>
9
9
  <line num="1" count="4" type="stmt"/>
@@ -11,36 +11,36 @@
11
11
  <line num="4" count="4" type="stmt"/>
12
12
  <line num="6" count="4" type="stmt"/>
13
13
  <line num="7" count="4" type="stmt"/>
14
- <line num="24" count="38" type="cond" truecount="3" falsecount="0"/>
15
- <line num="25" count="38" type="stmt"/>
16
- <line num="26" count="38" type="stmt"/>
17
- <line num="27" count="38" type="cond" truecount="2" falsecount="0"/>
14
+ <line num="24" count="46" type="cond" truecount="3" falsecount="0"/>
15
+ <line num="25" count="46" type="stmt"/>
16
+ <line num="26" count="46" type="stmt"/>
17
+ <line num="27" count="46" type="cond" truecount="2" falsecount="0"/>
18
18
  <line num="28" count="1" type="stmt"/>
19
19
  <line num="29" count="1" type="stmt"/>
20
- <line num="31" count="37" type="stmt"/>
21
- <line num="32" count="37" type="stmt"/>
22
- <line num="35" count="38" type="stmt"/>
23
- <line num="36" count="38" type="stmt"/>
24
- <line num="37" count="38" type="cond" truecount="3" falsecount="1"/>
25
- <line num="38" count="38" type="cond" truecount="3" falsecount="1"/>
26
- <line num="39" count="38" type="stmt"/>
27
- <line num="40" count="38" type="cond" truecount="1" falsecount="1"/>
28
- <line num="78" count="41" type="cond" truecount="4" falsecount="0"/>
20
+ <line num="31" count="45" type="stmt"/>
21
+ <line num="32" count="45" type="stmt"/>
22
+ <line num="35" count="46" type="stmt"/>
23
+ <line num="36" count="46" type="stmt"/>
24
+ <line num="37" count="46" type="cond" truecount="3" falsecount="1"/>
25
+ <line num="38" count="46" type="cond" truecount="3" falsecount="1"/>
26
+ <line num="39" count="46" type="stmt"/>
27
+ <line num="40" count="46" type="cond" truecount="1" falsecount="1"/>
28
+ <line num="78" count="49" type="cond" truecount="4" falsecount="0"/>
29
29
  <line num="79" count="1" type="stmt"/>
30
- <line num="83" count="40" type="cond" truecount="4" falsecount="0"/>
30
+ <line num="83" count="48" type="cond" truecount="4" falsecount="0"/>
31
31
  <line num="84" count="1" type="stmt"/>
32
- <line num="88" count="39" type="cond" truecount="5" falsecount="0"/>
32
+ <line num="88" count="47" type="cond" truecount="5" falsecount="0"/>
33
33
  <line num="89" count="1" type="stmt"/>
34
- <line num="94" count="38" type="stmt"/>
35
- <line num="96" count="38" type="cond" truecount="4" falsecount="0"/>
34
+ <line num="94" count="46" type="stmt"/>
35
+ <line num="96" count="46" type="cond" truecount="4" falsecount="0"/>
36
36
  <line num="97" count="1" type="stmt"/>
37
37
  <line num="98" count="1" type="stmt"/>
38
- <line num="99" count="37" type="stmt"/>
39
- <line num="100" count="38" type="stmt"/>
40
- <line num="114" count="68" type="stmt"/>
41
- <line num="136" count="73" type="cond" truecount="2" falsecount="0"/>
38
+ <line num="99" count="45" type="stmt"/>
39
+ <line num="100" count="46" type="stmt"/>
40
+ <line num="114" count="84" type="stmt"/>
41
+ <line num="136" count="89" type="cond" truecount="2" falsecount="0"/>
42
42
  <line num="137" count="1" type="stmt"/>
43
- <line num="141" count="72" type="stmt"/>
43
+ <line num="141" count="88" type="stmt"/>
44
44
  <line num="157" count="3" type="cond" truecount="2" falsecount="0"/>
45
45
  <line num="158" count="2" type="stmt"/>
46
46
  <line num="159" count="2" type="cond" truecount="2" falsecount="0"/>
@@ -57,7 +57,7 @@
57
57
  <line num="250" count="4" type="stmt"/>
58
58
  </file>
59
59
  <file name="Constants.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/Constants.ts">
60
- <metrics statements="39" coveredstatements="39" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
60
+ <metrics statements="47" coveredstatements="47" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
61
61
  <line num="1" count="4" type="stmt"/>
62
62
  <line num="2" count="4" type="stmt"/>
63
63
  <line num="3" count="4" type="stmt"/>
@@ -69,34 +69,42 @@
69
69
  <line num="9" count="4" type="stmt"/>
70
70
  <line num="10" count="4" type="stmt"/>
71
71
  <line num="11" count="4" type="stmt"/>
72
+ <line num="12" count="4" type="stmt"/>
72
73
  <line num="13" count="4" type="stmt"/>
73
- <line num="14" count="4" type="stmt"/>
74
74
  <line num="15" count="4" type="stmt"/>
75
75
  <line num="16" count="4" type="stmt"/>
76
76
  <line num="17" count="4" type="stmt"/>
77
77
  <line num="18" count="4" type="stmt"/>
78
78
  <line num="19" count="4" type="stmt"/>
79
+ <line num="20" count="4" type="stmt"/>
79
80
  <line num="21" count="4" type="stmt"/>
80
81
  <line num="22" count="4" type="stmt"/>
81
82
  <line num="23" count="4" type="stmt"/>
82
- <line num="24" count="4" type="stmt"/>
83
83
  <line num="25" count="4" type="stmt"/>
84
84
  <line num="26" count="4" type="stmt"/>
85
85
  <line num="27" count="4" type="stmt"/>
86
86
  <line num="28" count="4" type="stmt"/>
87
+ <line num="29" count="4" type="stmt"/>
87
88
  <line num="30" count="4" type="stmt"/>
88
89
  <line num="31" count="4" type="stmt"/>
89
90
  <line num="32" count="4" type="stmt"/>
90
91
  <line num="33" count="4" type="stmt"/>
91
92
  <line num="34" count="4" type="stmt"/>
92
- <line num="35" count="4" type="stmt"/>
93
93
  <line num="36" count="4" type="stmt"/>
94
+ <line num="37" count="4" type="stmt"/>
94
95
  <line num="38" count="4" type="stmt"/>
96
+ <line num="39" count="4" type="stmt"/>
95
97
  <line num="40" count="4" type="stmt"/>
96
98
  <line num="41" count="4" type="stmt"/>
97
99
  <line num="42" count="4" type="stmt"/>
98
100
  <line num="43" count="4" type="stmt"/>
99
101
  <line num="44" count="4" type="stmt"/>
102
+ <line num="46" count="4" type="stmt"/>
103
+ <line num="48" count="4" type="stmt"/>
104
+ <line num="49" count="4" type="stmt"/>
105
+ <line num="50" count="4" type="stmt"/>
106
+ <line num="51" count="4" type="stmt"/>
107
+ <line num="52" count="4" type="stmt"/>
100
108
  </file>
101
109
  <file name="request.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/request.ts">
102
110
  <metrics statements="9" coveredstatements="9" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
@@ -113,14 +121,14 @@
113
121
  <file name="utils.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/utils.ts">
114
122
  <metrics statements="5" coveredstatements="5" conditionals="2" coveredconditionals="1" methods="1" coveredmethods="1"/>
115
123
  <line num="14" count="4" type="stmt"/>
116
- <line num="15" count="36" type="stmt"/>
117
- <line num="16" count="36" type="stmt"/>
118
- <line num="17" count="36" type="cond" truecount="1" falsecount="1"/>
119
- <line num="18" count="36" type="stmt"/>
124
+ <line num="15" count="44" type="stmt"/>
125
+ <line num="16" count="44" type="stmt"/>
126
+ <line num="17" count="44" type="cond" truecount="1" falsecount="1"/>
127
+ <line num="18" count="44" type="stmt"/>
120
128
  </file>
121
129
  </package>
122
130
  <package name="src.api">
123
- <metrics statements="155" coveredstatements="155" conditionals="1" coveredconditionals="0" methods="32" coveredmethods="32"/>
131
+ <metrics statements="193" coveredstatements="193" conditionals="1" coveredconditionals="0" methods="40" coveredmethods="40"/>
124
132
  <file name="Calculation.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/api/Calculation.ts">
125
133
  <metrics statements="19" coveredstatements="19" conditionals="0" coveredconditionals="0" methods="4" coveredmethods="4"/>
126
134
  <line num="1" count="1" type="stmt"/>
@@ -143,6 +151,28 @@
143
151
  <line num="111" count="1" type="stmt"/>
144
152
  <line num="113" count="1" type="stmt"/>
145
153
  </file>
154
+ <file name="EconomicActivity.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/api/EconomicActivity.ts">
155
+ <metrics statements="19" coveredstatements="19" conditionals="0" coveredconditionals="0" methods="4" coveredmethods="4"/>
156
+ <line num="1" count="1" type="stmt"/>
157
+ <line num="2" count="1" type="stmt"/>
158
+ <line num="9" count="1" type="stmt"/>
159
+ <line num="37" count="1" type="stmt"/>
160
+ <line num="40" count="1" type="stmt"/>
161
+ <line num="41" count="1" type="stmt"/>
162
+ <line num="43" count="1" type="stmt"/>
163
+ <line num="60" count="1" type="stmt"/>
164
+ <line num="62" count="1" type="stmt"/>
165
+ <line num="63" count="1" type="stmt"/>
166
+ <line num="65" count="1" type="stmt"/>
167
+ <line num="81" count="1" type="stmt"/>
168
+ <line num="83" count="1" type="stmt"/>
169
+ <line num="84" count="1" type="stmt"/>
170
+ <line num="86" count="1" type="stmt"/>
171
+ <line num="104" count="1" type="stmt"/>
172
+ <line num="107" count="1" type="stmt"/>
173
+ <line num="108" count="1" type="stmt"/>
174
+ <line num="110" count="1" type="stmt"/>
175
+ </file>
146
176
  <file name="Factor.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/api/Factor.ts">
147
177
  <metrics statements="27" coveredstatements="27" conditionals="0" coveredconditionals="0" methods="6" coveredmethods="6"/>
148
178
  <line num="1" count="1" type="stmt"/>
@@ -249,6 +279,28 @@
249
279
  <line num="115" count="1" type="stmt"/>
250
280
  <line num="117" count="1" type="stmt"/>
251
281
  </file>
282
+ <file name="RealEstate.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/api/RealEstate.ts">
283
+ <metrics statements="19" coveredstatements="19" conditionals="0" coveredconditionals="0" methods="4" coveredmethods="4"/>
284
+ <line num="1" count="1" type="stmt"/>
285
+ <line num="2" count="1" type="stmt"/>
286
+ <line num="9" count="1" type="stmt"/>
287
+ <line num="37" count="1" type="stmt"/>
288
+ <line num="40" count="1" type="stmt"/>
289
+ <line num="41" count="1" type="stmt"/>
290
+ <line num="43" count="1" type="stmt"/>
291
+ <line num="60" count="1" type="stmt"/>
292
+ <line num="62" count="1" type="stmt"/>
293
+ <line num="63" count="1" type="stmt"/>
294
+ <line num="65" count="1" type="stmt"/>
295
+ <line num="81" count="1" type="stmt"/>
296
+ <line num="83" count="1" type="stmt"/>
297
+ <line num="84" count="1" type="stmt"/>
298
+ <line num="86" count="1" type="stmt"/>
299
+ <line num="105" count="1" type="stmt"/>
300
+ <line num="108" count="1" type="stmt"/>
301
+ <line num="109" count="1" type="stmt"/>
302
+ <line num="111" count="1" type="stmt"/>
303
+ </file>
252
304
  <file name="Stationary.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/api/Stationary.ts">
253
305
  <metrics statements="19" coveredstatements="19" conditionals="0" coveredconditionals="0" methods="4" coveredmethods="4"/>
254
306
  <line num="1" count="1" type="stmt"/>