emissions-api-sdk 1.0.13 → 1.0.14
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/README.md +23 -0
- package/dist/Constants.js +4 -1
- package/dist/api/AuditExport.js +73 -0
- package/dist/api/EconomicActivity.js +45 -0
- package/dist/api/Factor.js +1 -4
- package/dist/api/RealEstate.js +2 -1
- package/dist/coverage/clover.xml +75 -54
- package/dist/coverage/coverage-final.json +8 -7
- package/dist/coverage/lcov-report/index.html +15 -15
- package/dist/coverage/lcov-report/src/Client.ts.html +6 -6
- package/dist/coverage/lcov-report/src/Constants.ts.html +39 -30
- package/dist/coverage/lcov-report/src/api/AuditExport.ts.html +355 -0
- package/dist/coverage/lcov-report/src/api/AuditLog.ts.html +1 -1
- package/dist/coverage/lcov-report/src/api/Calculation.ts.html +1 -1
- package/dist/coverage/lcov-report/src/api/EconomicActivity.ts.html +137 -2
- package/dist/coverage/lcov-report/src/api/Factor.ts.html +6 -12
- package/dist/coverage/lcov-report/src/api/FactorSets.ts.html +1 -1
- package/dist/coverage/lcov-report/src/api/Fugitive.ts.html +1 -1
- package/dist/coverage/lcov-report/src/api/Location.ts.html +1 -1
- package/dist/coverage/lcov-report/src/api/Metadata.ts.html +1 -1
- package/dist/coverage/lcov-report/src/api/Mobile.ts.html +1 -1
- package/dist/coverage/lcov-report/src/api/PhysicalActivity.ts.html +1 -1
- package/dist/coverage/lcov-report/src/api/RealEstate.ts.html +6 -3
- package/dist/coverage/lcov-report/src/api/Stationary.ts.html +1 -1
- package/dist/coverage/lcov-report/src/api/TransportationAndDistribution.ts.html +1 -1
- package/dist/coverage/lcov-report/src/api/TypeRecommender.ts.html +1 -1
- package/dist/coverage/lcov-report/src/api/Usage.ts.html +1 -1
- package/dist/coverage/lcov-report/src/api/index.html +19 -4
- package/dist/coverage/lcov-report/src/index.html +7 -7
- package/dist/coverage/lcov-report/src/request.ts.html +8 -5
- package/dist/coverage/lcov-report/src/utils.ts.html +2 -2
- package/dist/coverage/lcov-report/test/index.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/AttributionRequest.ts.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/CommonRequest.ts.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/EconomicActivityAttributionRequest.ts.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/FactorRequest.ts.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/GenericCalculationRequest.ts.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/LocationRequest.ts.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/PhysicalActivityEVICRequest.ts.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/PhysicalActivityRequest.ts.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/SearchRequest.ts.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/index.html +1 -1
- package/dist/coverage/lcov-report/test/testUtils.ts.html +1 -1
- package/dist/coverage/lcov.info +86 -53
- package/dist/index.js +2 -1
- package/dist/interfaces/response/AuditExportResponse.js +2 -0
- package/dist/request.js +1 -0
- package/dist/types/Constants.d.ts +3 -0
- package/dist/types/api/AuditExport.d.ts +42 -0
- package/dist/types/api/EconomicActivity.d.ts +45 -0
- package/dist/types/api/Factor.d.ts +1 -4
- package/dist/types/api/RealEstate.d.ts +2 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/interfaces/Config.d.ts +5 -1
- package/dist/types/interfaces/response/AuditExportResponse.d.ts +66 -0
- package/dist/types/interfaces/response/TypeRecommenderResponse.d.ts +1 -0
- package/docs/_sources/getting_started.rst.txt +226 -2
- package/docs/_sources/index.rst.txt +2 -0
- package/docs/_sources/reference.rst.txt +22 -0
- package/docs/genindex.html +27 -3
- package/docs/getting_started.html +226 -2
- package/docs/index.html +4 -0
- package/docs/reference.html +267 -4
- package/docs/searchindex.js +1 -1
- package/package.json +6 -5
- package/sphinx-build/source/getting_started.rst +226 -2
- package/sphinx-build/source/index.rst +2 -0
- package/sphinx-build/source/reference.rst +22 -0
- package/src/Constants.ts +3 -0
- package/src/api/AuditExport.ts +90 -0
- package/src/api/EconomicActivity.ts +45 -0
- package/src/api/Factor.ts +2 -5
- package/src/api/RealEstate.ts +2 -1
- package/src/index.ts +9 -1
- package/src/interfaces/Config.ts +6 -1
- package/src/interfaces/response/AuditExportResponse.ts +88 -0
- package/src/interfaces/response/TypeRecommenderResponse.ts +1 -0
- package/src/request.ts +1 -0
- package/test/auditExport.test.ts +68 -0
- package/docs/_static/base-stemmer.js +0 -476
- package/docs/_static/english-stemmer.js +0 -1066
package/README.md
CHANGED
|
@@ -235,6 +235,29 @@ await AuditLog.update({ logRequest: false, logResponse: false });
|
|
|
235
235
|
await AuditLog.update({ logRequest: true, logResponse: false });
|
|
236
236
|
```
|
|
237
237
|
|
|
238
|
+
## Audit Export API
|
|
239
|
+
|
|
240
|
+
Admin users can export audit data for a date range. The export is asynchronous: submit the request, poll until it is complete, then download the ZIP archive. All three endpoints require an admin JWT token.
|
|
241
|
+
|
|
242
|
+
```javascript
|
|
243
|
+
import { AuditExport } from 'emissions-api-sdk';
|
|
244
|
+
|
|
245
|
+
const auditExport = await AuditExport.trigger({
|
|
246
|
+
fromDate: '2025-01-01',
|
|
247
|
+
toDate: '2025-03-31',
|
|
248
|
+
apiName: 'location'
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
// Repeat this request until status is COMPLETED.
|
|
252
|
+
const status = await AuditExport.getStatus(auditExport.requestId);
|
|
253
|
+
|
|
254
|
+
if (status.status === 'COMPLETED') {
|
|
255
|
+
const auditExportZip = await AuditExport.download(auditExport.requestId);
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
The request dates use `yyyy-MM-dd`. `fromDate` must be on or after `2025-01-01`, `toDate` must be no later than the previous calendar day, and `apiName` is an optional case-insensitive endpoint filter. A completed export is available for seven days. See the [Audit Export API reference](https://ibm.github.io/ibm-envizi-emissions-api-nodejs-sdk/reference.html#audit-export-api) for the request and response details.
|
|
260
|
+
|
|
238
261
|
## Authentication
|
|
239
262
|
|
|
240
263
|
The SDK supports three authentication methods:
|
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.PUT = exports.POST = exports.GET = exports.METADATA_UNITS_ENDPOINT = exports.METADATA_AREA_ENDPOINT = exports.METADATA_TYPES_ENDPOINT = exports.USAGE_API = exports.TYPE_RECOMMENDER_API_PATH = exports.AUDIT_LOG_API_PATH = exports.PHYSICAL_ACTIVITY_API_PATH = 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.PAT_TOKEN_EXCHANGE_API = exports.TOKEN_GENERATION_API = exports.API_DOMAIN = void 0;
|
|
3
|
+
exports.CLIENT_SOURCE_SDK = exports.CLIENT_SOURCE_EXCEL = exports.CLIENT_SOURCE_HEADER = exports.PUT = exports.POST = exports.GET = exports.METADATA_UNITS_ENDPOINT = exports.METADATA_AREA_ENDPOINT = exports.METADATA_TYPES_ENDPOINT = exports.USAGE_API = exports.TYPE_RECOMMENDER_API_PATH = exports.AUDIT_EXPORT_DOWNLOAD_API_PATH = exports.AUDIT_EXPORT_STATUS_API_PATH = exports.AUDIT_EXPORT_API_PATH = exports.AUDIT_LOG_API_PATH = exports.PHYSICAL_ACTIVITY_API_PATH = 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.PAT_TOKEN_EXCHANGE_API = exports.TOKEN_GENERATION_API = exports.API_DOMAIN = void 0;
|
|
4
4
|
exports.API_DOMAIN = "https://api.envizi.ibm.com/ghgemissions/run";
|
|
5
5
|
exports.TOKEN_GENERATION_API = "https://api.ibm.com/saascore/run/authentication-retrieve/api-key";
|
|
6
6
|
exports.PAT_TOKEN_EXCHANGE_API = "https://api.ibm.com/saascore/run/envizi-auth/exchange";
|
|
@@ -17,6 +17,9 @@ exports.ECONOMIC_ACTIVITY_API_PATH = "/v3/carbon/economic-activity";
|
|
|
17
17
|
exports.REAL_ESTATE_API_PATH = "/v3/carbon/real-estate";
|
|
18
18
|
exports.PHYSICAL_ACTIVITY_API_PATH = "/v3/carbon/physical-activity";
|
|
19
19
|
exports.AUDIT_LOG_API_PATH = "/v3/carbon/admin/audit-log";
|
|
20
|
+
exports.AUDIT_EXPORT_API_PATH = "/v3/carbon/audit";
|
|
21
|
+
exports.AUDIT_EXPORT_STATUS_API_PATH = "/v3/carbon/audit/status";
|
|
22
|
+
exports.AUDIT_EXPORT_DOWNLOAD_API_PATH = "/v3/carbon/audit/download";
|
|
20
23
|
exports.TYPE_RECOMMENDER_API_PATH = "/v3/carbon/recommender/type/search";
|
|
21
24
|
exports.USAGE_API = "/v3/carbon/usage";
|
|
22
25
|
exports.METADATA_TYPES_ENDPOINT = "/v3/carbon/metadata/types";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.trigger = trigger;
|
|
4
|
+
exports.getStatus = getStatus;
|
|
5
|
+
exports.download = download;
|
|
6
|
+
const Client_1 = require("../Client");
|
|
7
|
+
const Constants_1 = require("../Constants");
|
|
8
|
+
const request_1 = require("../request");
|
|
9
|
+
/**
|
|
10
|
+
* Triggers an asynchronous audit data export.
|
|
11
|
+
*
|
|
12
|
+
* @export
|
|
13
|
+
* @param {AuditExportRequest} payload - Date range and optional API-name filter for the export
|
|
14
|
+
* @return {Promise<AuditExportResponse>} The accepted export request, including its request ID
|
|
15
|
+
* @throws {Error} Throws if the request is invalid, the caller is not an admin, or a matching export already exists
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* const auditExport = await trigger({
|
|
19
|
+
* fromDate: "2025-01-01",
|
|
20
|
+
* toDate: "2025-03-31",
|
|
21
|
+
* apiName: "location"
|
|
22
|
+
* });
|
|
23
|
+
*/
|
|
24
|
+
async function trigger(payload) {
|
|
25
|
+
const client = Client_1.Client.getInstance();
|
|
26
|
+
const url = client.getDomain() + Constants_1.AUDIT_EXPORT_API_PATH;
|
|
27
|
+
return (0, request_1.makeApiRequest)({
|
|
28
|
+
method: Constants_1.POST,
|
|
29
|
+
url,
|
|
30
|
+
data: payload,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves the processing status of an audit export.
|
|
35
|
+
*
|
|
36
|
+
* @export
|
|
37
|
+
* @param {string} requestId - Request ID returned by trigger
|
|
38
|
+
* @return {Promise<AuditExportStatusResponse>} Current export status and, when complete, download details
|
|
39
|
+
* @throws {Error} Throws if the request ID is invalid or the caller is not an admin
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* const status = await getStatus(auditExport.requestId);
|
|
43
|
+
*/
|
|
44
|
+
async function getStatus(requestId) {
|
|
45
|
+
const client = Client_1.Client.getInstance();
|
|
46
|
+
const url = client.getDomain() + Constants_1.AUDIT_EXPORT_STATUS_API_PATH;
|
|
47
|
+
return (0, request_1.makeApiRequest)({
|
|
48
|
+
method: Constants_1.GET,
|
|
49
|
+
url,
|
|
50
|
+
params: { requestId },
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Downloads a completed audit export as a ZIP archive.
|
|
55
|
+
*
|
|
56
|
+
* @export
|
|
57
|
+
* @param {string} requestId - Request ID returned by trigger
|
|
58
|
+
* @return {Promise<Buffer>} ZIP archive containing audit-export.csv
|
|
59
|
+
* @throws {Error} Throws while processing, when the export failed or expired, or if the caller is not an admin
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* const auditExportZip = await download(auditExport.requestId);
|
|
63
|
+
*/
|
|
64
|
+
async function download(requestId) {
|
|
65
|
+
const client = Client_1.Client.getInstance();
|
|
66
|
+
const url = client.getDomain() + Constants_1.AUDIT_EXPORT_DOWNLOAD_API_PATH;
|
|
67
|
+
return (0, request_1.makeApiRequest)({
|
|
68
|
+
method: Constants_1.GET,
|
|
69
|
+
url,
|
|
70
|
+
params: { requestId },
|
|
71
|
+
responseType: "arraybuffer",
|
|
72
|
+
});
|
|
73
|
+
}
|
|
@@ -52,6 +52,51 @@ const request_1 = require("../request");
|
|
|
52
52
|
"includeDetails": true
|
|
53
53
|
};
|
|
54
54
|
* const resultWithAttribution = await calculate(requestWithAttribution);
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* // Economic activity request with attribution (equity/debt based for private companies)
|
|
58
|
+
* const requestWithEquityDebt = {
|
|
59
|
+
"time": {
|
|
60
|
+
"date": "2025-01-04"
|
|
61
|
+
},
|
|
62
|
+
"location": {
|
|
63
|
+
"country": "usa"
|
|
64
|
+
},
|
|
65
|
+
"activity": {
|
|
66
|
+
"type": "accomodation",
|
|
67
|
+
"value": 1500.12,
|
|
68
|
+
"unit": "usd"
|
|
69
|
+
},
|
|
70
|
+
"attribution": {
|
|
71
|
+
"outstandingAmount": 500000.0,
|
|
72
|
+
"totalEquity": 3000000.0,
|
|
73
|
+
"totalDebt": 2000000.0
|
|
74
|
+
},
|
|
75
|
+
"includeDetails": true
|
|
76
|
+
};
|
|
77
|
+
* const resultWithEquityDebt = await calculate(requestWithEquityDebt);
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* // Economic activity request with attribution (EVIC based for listed companies)
|
|
81
|
+
* const requestWithEvic = {
|
|
82
|
+
"time": {
|
|
83
|
+
"date": "2025-01-04"
|
|
84
|
+
},
|
|
85
|
+
"location": {
|
|
86
|
+
"country": "usa"
|
|
87
|
+
},
|
|
88
|
+
"activity": {
|
|
89
|
+
"type": "accomodation",
|
|
90
|
+
"value": 1500.12,
|
|
91
|
+
"unit": "usd"
|
|
92
|
+
},
|
|
93
|
+
"attribution": {
|
|
94
|
+
"outstandingAmount": 500000.0,
|
|
95
|
+
"evic": 10000000.0
|
|
96
|
+
},
|
|
97
|
+
"includeDetails": true
|
|
98
|
+
};
|
|
99
|
+
* const resultWithEvic = await calculate(requestWithEvic);
|
|
55
100
|
*/
|
|
56
101
|
async function calculate(payload) {
|
|
57
102
|
const client = Client_1.Client.getInstance();
|
package/dist/api/Factor.js
CHANGED
|
@@ -75,11 +75,8 @@ async function retrieveFactor(payload) {
|
|
|
75
75
|
* @example
|
|
76
76
|
* // Search without cross-encoder reranking
|
|
77
77
|
* const searchWithoutReranker = {
|
|
78
|
-
"time":{
|
|
79
|
-
"date": "2020-06-10"
|
|
80
|
-
},
|
|
81
78
|
"activity": {
|
|
82
|
-
"search"
|
|
79
|
+
"search": "travel"
|
|
83
80
|
},
|
|
84
81
|
"location": {
|
|
85
82
|
"country": "USA"
|
package/dist/api/RealEstate.js
CHANGED
|
@@ -51,7 +51,8 @@ const request_1 = require("../request");
|
|
|
51
51
|
},
|
|
52
52
|
"includeDetails": true
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
* const resultWithAttribution = await calculate(requestWithAttribution);
|
|
55
|
+
*/
|
|
55
56
|
async function calculate(payload) {
|
|
56
57
|
const client = Client_1.Client.getInstance();
|
|
57
58
|
const url = client.getDomain() + Constants_1.REAL_ESTATE_API_PATH;
|
package/dist/coverage/clover.xml
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
4
|
-
<metrics statements="
|
|
2
|
+
<coverage generated="1790081113117" clover="3.2.0">
|
|
3
|
+
<project timestamp="1790081113117" name="All files">
|
|
4
|
+
<metrics statements="295" coveredstatements="293" conditionals="104" coveredconditionals="95" methods="39" coveredmethods="37" elements="438" coveredelements="425" complexity="0" loc="295" ncloc="295" packages="4" files="30" classes="30"/>
|
|
5
5
|
<package name="src">
|
|
6
|
-
<metrics statements="
|
|
6
|
+
<metrics statements="107" coveredstatements="105" conditionals="70" coveredconditionals="64" methods="12" coveredmethods="10"/>
|
|
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="63" coveredstatements="61" conditionals="68" coveredconditionals="63" methods="10" coveredmethods="8"/>
|
|
9
|
-
<line num="1" count="
|
|
10
|
-
<line num="3" count="
|
|
11
|
-
<line num="4" count="
|
|
12
|
-
<line num="6" count="
|
|
13
|
-
<line num="7" count="
|
|
9
|
+
<line num="1" count="7" type="stmt"/>
|
|
10
|
+
<line num="3" count="7" type="stmt"/>
|
|
11
|
+
<line num="4" count="7" type="stmt"/>
|
|
12
|
+
<line num="6" count="7" type="stmt"/>
|
|
13
|
+
<line num="7" count="7" type="stmt"/>
|
|
14
14
|
<line num="25" count="50" type="cond" truecount="4" falsecount="0"/>
|
|
15
15
|
<line num="26" count="50" type="stmt"/>
|
|
16
16
|
<line num="27" count="50" type="stmt"/>
|
|
@@ -71,50 +71,53 @@
|
|
|
71
71
|
<line num="314" count="8" type="stmt"/>
|
|
72
72
|
</file>
|
|
73
73
|
<file name="Constants.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/Constants.ts">
|
|
74
|
-
<metrics statements="
|
|
75
|
-
<line num="1" count="
|
|
76
|
-
<line num="2" count="
|
|
77
|
-
<line num="3" count="
|
|
78
|
-
<line num="4" count="
|
|
79
|
-
<line num="5" count="
|
|
80
|
-
<line num="6" count="
|
|
81
|
-
<line num="7" count="
|
|
82
|
-
<line num="8" count="
|
|
83
|
-
<line num="9" count="
|
|
84
|
-
<line num="10" count="
|
|
85
|
-
<line num="11" count="
|
|
86
|
-
<line num="12" count="
|
|
87
|
-
<line num="13" count="
|
|
88
|
-
<line num="14" count="
|
|
89
|
-
<line num="15" count="
|
|
90
|
-
<line num="16" count="
|
|
91
|
-
<line num="
|
|
92
|
-
<line num="
|
|
93
|
-
<line num="
|
|
94
|
-
<line num="
|
|
95
|
-
<line num="
|
|
96
|
-
<line num="
|
|
97
|
-
<line num="
|
|
98
|
-
<line num="
|
|
99
|
-
<line num="29" count="
|
|
100
|
-
<line num="30" count="
|
|
101
|
-
<line num="31" count="
|
|
74
|
+
<metrics statements="30" coveredstatements="30" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
75
|
+
<line num="1" count="11" type="stmt"/>
|
|
76
|
+
<line num="2" count="11" type="stmt"/>
|
|
77
|
+
<line num="3" count="11" type="stmt"/>
|
|
78
|
+
<line num="4" count="11" type="stmt"/>
|
|
79
|
+
<line num="5" count="11" type="stmt"/>
|
|
80
|
+
<line num="6" count="11" type="stmt"/>
|
|
81
|
+
<line num="7" count="11" type="stmt"/>
|
|
82
|
+
<line num="8" count="11" type="stmt"/>
|
|
83
|
+
<line num="9" count="11" type="stmt"/>
|
|
84
|
+
<line num="10" count="11" type="stmt"/>
|
|
85
|
+
<line num="11" count="11" type="stmt"/>
|
|
86
|
+
<line num="12" count="11" type="stmt"/>
|
|
87
|
+
<line num="13" count="11" type="stmt"/>
|
|
88
|
+
<line num="14" count="11" type="stmt"/>
|
|
89
|
+
<line num="15" count="11" type="stmt"/>
|
|
90
|
+
<line num="16" count="11" type="stmt"/>
|
|
91
|
+
<line num="17" count="11" type="stmt"/>
|
|
92
|
+
<line num="18" count="11" type="stmt"/>
|
|
93
|
+
<line num="19" count="11" type="stmt"/>
|
|
94
|
+
<line num="21" count="11" type="stmt"/>
|
|
95
|
+
<line num="23" count="11" type="stmt"/>
|
|
96
|
+
<line num="25" count="11" type="stmt"/>
|
|
97
|
+
<line num="26" count="11" type="stmt"/>
|
|
98
|
+
<line num="27" count="11" type="stmt"/>
|
|
99
|
+
<line num="29" count="11" type="stmt"/>
|
|
100
|
+
<line num="30" count="11" type="stmt"/>
|
|
101
|
+
<line num="31" count="11" type="stmt"/>
|
|
102
|
+
<line num="32" count="11" type="stmt"/>
|
|
103
|
+
<line num="33" count="11" type="stmt"/>
|
|
104
|
+
<line num="34" count="11" type="stmt"/>
|
|
102
105
|
</file>
|
|
103
106
|
<file name="request.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/request.ts">
|
|
104
107
|
<metrics statements="9" coveredstatements="9" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
|
|
105
|
-
<line num="1" count="
|
|
106
|
-
<line num="3" count="
|
|
107
|
-
<line num="4" count="
|
|
108
|
-
<line num="30" count="
|
|
108
|
+
<line num="1" count="5" type="stmt"/>
|
|
109
|
+
<line num="3" count="5" type="stmt"/>
|
|
110
|
+
<line num="4" count="5" type="stmt"/>
|
|
111
|
+
<line num="30" count="5" type="stmt"/>
|
|
109
112
|
<line num="31" count="3" type="stmt"/>
|
|
110
113
|
<line num="32" count="3" type="stmt"/>
|
|
111
114
|
<line num="34" count="3" type="stmt"/>
|
|
112
|
-
<line num="
|
|
113
|
-
<line num="
|
|
115
|
+
<line num="49" count="3" type="stmt"/>
|
|
116
|
+
<line num="50" count="2" type="stmt"/>
|
|
114
117
|
</file>
|
|
115
118
|
<file name="utils.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/utils.ts">
|
|
116
119
|
<metrics statements="5" coveredstatements="5" conditionals="2" coveredconditionals="1" methods="1" coveredmethods="1"/>
|
|
117
|
-
<line num="14" count="
|
|
120
|
+
<line num="14" count="7" type="stmt"/>
|
|
118
121
|
<line num="15" count="45" type="stmt"/>
|
|
119
122
|
<line num="16" count="45" type="stmt"/>
|
|
120
123
|
<line num="17" count="45" type="cond" truecount="1" falsecount="1"/>
|
|
@@ -122,7 +125,25 @@
|
|
|
122
125
|
</file>
|
|
123
126
|
</package>
|
|
124
127
|
<package name="src.api">
|
|
125
|
-
<metrics statements="
|
|
128
|
+
<metrics statements="163" coveredstatements="163" conditionals="34" coveredconditionals="31" methods="26" coveredmethods="26"/>
|
|
129
|
+
<file name="AuditExport.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/api/AuditExport.ts">
|
|
130
|
+
<metrics statements="15" coveredstatements="15" conditionals="0" coveredconditionals="0" methods="3" coveredmethods="3"/>
|
|
131
|
+
<line num="2" count="1" type="stmt"/>
|
|
132
|
+
<line num="3" count="1" type="stmt"/>
|
|
133
|
+
<line num="15" count="1" type="stmt"/>
|
|
134
|
+
<line num="32" count="1" type="stmt"/>
|
|
135
|
+
<line num="35" count="1" type="stmt"/>
|
|
136
|
+
<line num="36" count="1" type="stmt"/>
|
|
137
|
+
<line num="38" count="1" type="stmt"/>
|
|
138
|
+
<line num="56" count="1" type="stmt"/>
|
|
139
|
+
<line num="59" count="1" type="stmt"/>
|
|
140
|
+
<line num="60" count="1" type="stmt"/>
|
|
141
|
+
<line num="62" count="1" type="stmt"/>
|
|
142
|
+
<line num="80" count="1" type="stmt"/>
|
|
143
|
+
<line num="81" count="1" type="stmt"/>
|
|
144
|
+
<line num="82" count="1" type="stmt"/>
|
|
145
|
+
<line num="84" count="1" type="stmt"/>
|
|
146
|
+
</file>
|
|
126
147
|
<file name="AuditLog.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/api/AuditLog.ts">
|
|
127
148
|
<metrics statements="26" coveredstatements="26" conditionals="21" coveredconditionals="19" methods="3" coveredmethods="3"/>
|
|
128
149
|
<line num="1" count="2" type="stmt"/>
|
|
@@ -167,10 +188,10 @@
|
|
|
167
188
|
<line num="1" count="1" type="stmt"/>
|
|
168
189
|
<line num="2" count="1" type="stmt"/>
|
|
169
190
|
<line num="6" count="1" type="stmt"/>
|
|
170
|
-
<line num="
|
|
171
|
-
<line num="
|
|
172
|
-
<line num="
|
|
173
|
-
<line num="
|
|
191
|
+
<line num="103" count="1" type="stmt"/>
|
|
192
|
+
<line num="106" count="2" type="stmt"/>
|
|
193
|
+
<line num="107" count="2" type="stmt"/>
|
|
194
|
+
<line num="109" count="2" type="stmt"/>
|
|
174
195
|
</file>
|
|
175
196
|
<file name="Factor.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/api/Factor.ts">
|
|
176
197
|
<metrics statements="11" coveredstatements="11" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="2"/>
|
|
@@ -181,10 +202,10 @@
|
|
|
181
202
|
<line num="44" count="1" type="stmt"/>
|
|
182
203
|
<line num="45" count="1" type="stmt"/>
|
|
183
204
|
<line num="47" count="1" type="stmt"/>
|
|
205
|
+
<line num="144" count="1" type="stmt"/>
|
|
184
206
|
<line num="147" count="1" type="stmt"/>
|
|
207
|
+
<line num="148" count="1" type="stmt"/>
|
|
185
208
|
<line num="150" count="1" type="stmt"/>
|
|
186
|
-
<line num="151" count="1" type="stmt"/>
|
|
187
|
-
<line num="153" count="1" type="stmt"/>
|
|
188
209
|
</file>
|
|
189
210
|
<file name="FactorSets.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/api/FactorSets.ts">
|
|
190
211
|
<metrics statements="7" coveredstatements="7" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
|
|
@@ -271,10 +292,10 @@
|
|
|
271
292
|
<line num="1" count="1" type="stmt"/>
|
|
272
293
|
<line num="2" count="1" type="stmt"/>
|
|
273
294
|
<line num="6" count="1" type="stmt"/>
|
|
274
|
-
<line num="
|
|
275
|
-
<line num="60" count="2" type="stmt"/>
|
|
295
|
+
<line num="58" count="1" type="stmt"/>
|
|
276
296
|
<line num="61" count="2" type="stmt"/>
|
|
277
|
-
<line num="
|
|
297
|
+
<line num="62" count="2" type="stmt"/>
|
|
298
|
+
<line num="64" count="2" type="stmt"/>
|
|
278
299
|
</file>
|
|
279
300
|
<file name="Stationary.ts" path="/Users/santhosh/Documents/GIT/open-source/ibm-envizi-emissions-api-nodejs-sdk/src/api/Stationary.ts">
|
|
280
301
|
<metrics statements="7" coveredstatements="7" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
|