emissions-api-sdk 1.0.12 → 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 +65 -2
- package/dist/Constants.js +7 -1
- package/dist/api/AuditExport.js +73 -0
- package/dist/api/AuditLog.js +99 -0
- package/dist/api/EconomicActivity.js +69 -0
- package/dist/api/Factor.js +16 -0
- package/dist/api/PhysicalActivity.js +87 -0
- package/dist/api/RealEstate.js +25 -1
- package/dist/api/TypeRecommender.js +19 -2
- package/dist/coverage/clover.xml +172 -89
- package/dist/coverage/coverage-final.json +15 -8
- package/dist/coverage/lcov-report/index.html +21 -21
- package/dist/coverage/lcov-report/src/Client.ts.html +32 -32
- package/dist/coverage/lcov-report/src/Constants.ts.html +45 -27
- package/dist/coverage/lcov-report/src/api/AuditExport.ts.html +355 -0
- package/dist/coverage/lcov-report/src/api/AuditLog.ts.html +388 -0
- package/dist/coverage/lcov-report/src/api/Calculation.ts.html +1 -1
- package/dist/coverage/lcov-report/src/api/EconomicActivity.ts.html +212 -5
- package/dist/coverage/lcov-report/src/api/Factor.ts.html +54 -3
- 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 +361 -0
- package/dist/coverage/lcov-report/src/api/RealEstate.ts.html +78 -6
- 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 +55 -4
- package/dist/coverage/lcov-report/src/api/Usage.ts.html +1 -1
- package/dist/coverage/lcov-report/src/api/index.html +51 -6
- 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 +6 -6
- package/dist/coverage/lcov-report/test/index.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/AttributionRequest.ts.html +151 -0
- package/dist/coverage/lcov-report/test/mocks/CommonRequest.ts.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/EconomicActivityAttributionRequest.ts.html +148 -0
- 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 +148 -0
- package/dist/coverage/lcov-report/test/mocks/PhysicalActivityRequest.ts.html +151 -0
- package/dist/coverage/lcov-report/test/mocks/SearchRequest.ts.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/index.html +63 -3
- package/dist/coverage/lcov-report/test/testUtils.ts.html +1 -1
- package/dist/coverage/lcov.info +284 -124
- package/dist/index.js +4 -1
- package/dist/interfaces/response/AuditExportResponse.js +2 -0
- package/dist/interfaces/response/AuditLogResponse.js +2 -0
- package/dist/request.js +1 -0
- package/dist/types/Constants.d.ts +6 -0
- package/dist/types/api/AuditExport.d.ts +42 -0
- package/dist/types/api/AuditLog.d.ts +37 -0
- package/dist/types/api/EconomicActivity.d.ts +69 -0
- package/dist/types/api/Factor.d.ts +16 -0
- package/dist/types/api/PhysicalActivity.d.ts +76 -0
- package/dist/types/api/RealEstate.d.ts +25 -1
- package/dist/types/api/TypeRecommender.d.ts +19 -2
- package/dist/types/index.d.ts +6 -0
- package/dist/types/interfaces/Api.d.ts +17 -1
- package/dist/types/interfaces/Config.d.ts +5 -1
- package/dist/types/interfaces/common.d.ts +40 -0
- package/dist/types/interfaces/response/AuditExportResponse.d.ts +66 -0
- package/dist/types/interfaces/response/AuditLogResponse.d.ts +40 -0
- package/dist/types/interfaces/response/TypeRecommenderResponse.d.ts +2 -0
- package/docs/_sources/authentication.rst.txt +26 -4
- package/docs/_sources/getting_started.rst.txt +762 -74
- package/docs/_sources/index.rst.txt +13 -0
- package/docs/_sources/reference.rst.txt +48 -0
- package/docs/_sources/troubleshooting.rst.txt +77 -12
- package/docs/_static/basic.css +8 -0
- package/docs/_static/doctools.js +5 -6
- package/docs/_static/language_data.js +186 -7
- package/docs/_static/pygments.css +146 -164
- package/docs/_static/searchtools.js +60 -121
- package/docs/_static/sphinx_highlight.js +31 -36
- package/docs/_static/styles/furo.css +1 -1
- package/docs/_static/styles/furo.css.map +1 -1
- package/docs/authentication.html +61 -26
- package/docs/client.html +33 -22
- package/docs/genindex.html +77 -24
- package/docs/getting_started.html +969 -103
- package/docs/index.html +69 -21
- package/docs/reference.html +747 -66
- package/docs/sdk.html +32 -21
- package/docs/search.html +32 -21
- package/docs/searchindex.js +1 -1
- package/docs/troubleshooting.html +105 -38
- package/package.json +8 -3
- package/sphinx-build/source/authentication.rst +26 -4
- package/sphinx-build/source/getting_started.rst +762 -74
- package/sphinx-build/source/index.rst +13 -0
- package/sphinx-build/source/reference.rst +48 -0
- package/sphinx-build/source/troubleshooting.rst +77 -12
- package/src/Constants.ts +6 -0
- package/src/api/AuditExport.ts +90 -0
- package/src/api/AuditLog.ts +102 -0
- package/src/api/EconomicActivity.ts +69 -0
- package/src/api/Factor.ts +17 -1
- package/src/api/PhysicalActivity.ts +92 -0
- package/src/api/RealEstate.ts +25 -1
- package/src/api/TypeRecommender.ts +19 -2
- package/src/index.ts +15 -1
- package/src/interfaces/Api.ts +22 -6
- package/src/interfaces/Config.ts +6 -1
- package/src/interfaces/common.ts +46 -0
- package/src/interfaces/response/AuditExportResponse.ts +88 -0
- package/src/interfaces/response/AuditLogResponse.ts +47 -0
- package/src/interfaces/response/TypeRecommenderResponse.ts +3 -0
- package/src/request.ts +1 -0
- package/test/apiTest.test.ts +59 -3
- package/test/auditExport.test.ts +68 -0
- package/test/auditLog.test.ts +216 -0
- package/test/mocks/AttributionRequest.ts +23 -0
- package/test/mocks/EconomicActivityAttributionRequest.ts +22 -0
- package/test/mocks/PhysicalActivityEVICRequest.ts +22 -0
- package/test/mocks/PhysicalActivityRequest.ts +23 -0
- package/docs/_static/base-stemmer.js +0 -476
- package/docs/_static/english-stemmer.js +0 -1066
package/dist/coverage/lcov.info
CHANGED
|
@@ -12,59 +12,59 @@ FN:269,(anonymous_9)
|
|
|
12
12
|
FN:303,(anonymous_10)
|
|
13
13
|
FNF:10
|
|
14
14
|
FNH:8
|
|
15
|
-
FNDA:
|
|
16
|
-
FNDA:
|
|
17
|
-
FNDA:
|
|
18
|
-
FNDA:
|
|
15
|
+
FNDA:50,(anonymous_1)
|
|
16
|
+
FNDA:55,(anonymous_2)
|
|
17
|
+
FNDA:80,(anonymous_3)
|
|
18
|
+
FNDA:91,(anonymous_4)
|
|
19
19
|
FNDA:6,(anonymous_5)
|
|
20
20
|
FNDA:4,(anonymous_6)
|
|
21
21
|
FNDA:0,(anonymous_7)
|
|
22
22
|
FNDA:0,(anonymous_8)
|
|
23
23
|
FNDA:4,(anonymous_9)
|
|
24
24
|
FNDA:8,(anonymous_10)
|
|
25
|
-
DA:1,
|
|
26
|
-
DA:3,
|
|
27
|
-
DA:4,
|
|
28
|
-
DA:6,
|
|
29
|
-
DA:7,
|
|
30
|
-
DA:25,
|
|
31
|
-
DA:26,
|
|
32
|
-
DA:27,
|
|
33
|
-
DA:28,
|
|
25
|
+
DA:1,7
|
|
26
|
+
DA:3,7
|
|
27
|
+
DA:4,7
|
|
28
|
+
DA:6,7
|
|
29
|
+
DA:7,7
|
|
30
|
+
DA:25,50
|
|
31
|
+
DA:26,50
|
|
32
|
+
DA:27,50
|
|
33
|
+
DA:28,50
|
|
34
34
|
DA:29,1
|
|
35
35
|
DA:30,1
|
|
36
36
|
DA:31,1
|
|
37
|
-
DA:33,
|
|
38
|
-
DA:34,
|
|
39
|
-
DA:35,
|
|
40
|
-
DA:38,
|
|
41
|
-
DA:39,
|
|
42
|
-
DA:40,
|
|
43
|
-
DA:41,
|
|
44
|
-
DA:42,
|
|
45
|
-
DA:43,
|
|
46
|
-
DA:88,
|
|
37
|
+
DA:33,49
|
|
38
|
+
DA:34,49
|
|
39
|
+
DA:35,49
|
|
40
|
+
DA:38,50
|
|
41
|
+
DA:39,50
|
|
42
|
+
DA:40,50
|
|
43
|
+
DA:41,50
|
|
44
|
+
DA:42,50
|
|
45
|
+
DA:43,50
|
|
46
|
+
DA:88,55
|
|
47
47
|
DA:89,1
|
|
48
|
-
DA:93,
|
|
48
|
+
DA:93,54
|
|
49
49
|
DA:94,1
|
|
50
|
-
DA:98,
|
|
50
|
+
DA:98,53
|
|
51
51
|
DA:99,1
|
|
52
|
-
DA:103,
|
|
52
|
+
DA:103,52
|
|
53
53
|
DA:104,1
|
|
54
|
-
DA:108,
|
|
54
|
+
DA:108,51
|
|
55
55
|
DA:109,1
|
|
56
|
-
DA:114,
|
|
57
|
-
DA:116,
|
|
56
|
+
DA:114,50
|
|
57
|
+
DA:116,50
|
|
58
58
|
DA:117,1
|
|
59
59
|
DA:118,1
|
|
60
|
-
DA:119,
|
|
60
|
+
DA:119,49
|
|
61
61
|
DA:120,6
|
|
62
|
-
DA:122,
|
|
63
|
-
DA:124,
|
|
64
|
-
DA:138,
|
|
65
|
-
DA:160,
|
|
62
|
+
DA:122,43
|
|
63
|
+
DA:124,50
|
|
64
|
+
DA:138,80
|
|
65
|
+
DA:160,91
|
|
66
66
|
DA:161,1
|
|
67
|
-
DA:165,
|
|
67
|
+
DA:165,90
|
|
68
68
|
DA:181,6
|
|
69
69
|
DA:182,5
|
|
70
70
|
DA:183,5
|
|
@@ -89,54 +89,54 @@ LF:63
|
|
|
89
89
|
LH:61
|
|
90
90
|
BRDA:23,0,0,0
|
|
91
91
|
BRDA:25,1,0,7
|
|
92
|
-
BRDA:25,2,0,
|
|
92
|
+
BRDA:25,2,0,44
|
|
93
93
|
BRDA:25,3,0,7
|
|
94
|
-
BRDA:25,4,0,
|
|
94
|
+
BRDA:25,4,0,50
|
|
95
95
|
BRDA:28,5,0,1
|
|
96
|
-
BRDA:28,5,1,
|
|
96
|
+
BRDA:28,5,1,49
|
|
97
97
|
BRDA:40,6,0,0
|
|
98
|
-
BRDA:40,6,1,
|
|
99
|
-
BRDA:40,7,0,
|
|
100
|
-
BRDA:40,7,1,
|
|
98
|
+
BRDA:40,6,1,50
|
|
99
|
+
BRDA:40,7,0,50
|
|
100
|
+
BRDA:40,7,1,50
|
|
101
101
|
BRDA:41,8,0,2
|
|
102
|
-
BRDA:41,8,1,
|
|
103
|
-
BRDA:41,9,0,
|
|
104
|
-
BRDA:41,9,1,
|
|
102
|
+
BRDA:41,8,1,48
|
|
103
|
+
BRDA:41,9,0,50
|
|
104
|
+
BRDA:41,9,1,50
|
|
105
105
|
BRDA:41,10,0,4
|
|
106
|
-
BRDA:41,10,1,
|
|
106
|
+
BRDA:41,10,1,44
|
|
107
107
|
BRDA:43,11,0,0
|
|
108
|
-
BRDA:43,11,1,
|
|
108
|
+
BRDA:43,11,1,50
|
|
109
109
|
BRDA:88,12,0,1
|
|
110
|
-
BRDA:88,12,1,
|
|
111
|
-
BRDA:88,13,0,
|
|
110
|
+
BRDA:88,12,1,54
|
|
111
|
+
BRDA:88,13,0,55
|
|
112
112
|
BRDA:88,13,1,1
|
|
113
113
|
BRDA:93,14,0,1
|
|
114
|
-
BRDA:93,14,1,
|
|
115
|
-
BRDA:93,15,0,
|
|
114
|
+
BRDA:93,14,1,53
|
|
115
|
+
BRDA:93,15,0,54
|
|
116
116
|
BRDA:93,15,1,2
|
|
117
117
|
BRDA:98,16,0,1
|
|
118
|
-
BRDA:98,16,1,
|
|
119
|
-
BRDA:98,17,0,
|
|
120
|
-
BRDA:98,17,1,
|
|
121
|
-
BRDA:98,17,2,
|
|
118
|
+
BRDA:98,16,1,52
|
|
119
|
+
BRDA:98,17,0,53
|
|
120
|
+
BRDA:98,17,1,44
|
|
121
|
+
BRDA:98,17,2,43
|
|
122
122
|
BRDA:103,18,0,1
|
|
123
|
-
BRDA:103,18,1,
|
|
124
|
-
BRDA:103,19,0,
|
|
123
|
+
BRDA:103,18,1,51
|
|
124
|
+
BRDA:103,19,0,52
|
|
125
125
|
BRDA:103,19,1,8
|
|
126
126
|
BRDA:108,20,0,1
|
|
127
|
-
BRDA:108,20,1,
|
|
128
|
-
BRDA:108,21,0,
|
|
127
|
+
BRDA:108,20,1,50
|
|
128
|
+
BRDA:108,21,0,51
|
|
129
129
|
BRDA:108,21,1,7
|
|
130
130
|
BRDA:116,22,0,1
|
|
131
|
-
BRDA:116,22,1,
|
|
132
|
-
BRDA:116,23,0,
|
|
131
|
+
BRDA:116,22,1,49
|
|
132
|
+
BRDA:116,23,0,50
|
|
133
133
|
BRDA:116,23,1,1
|
|
134
134
|
BRDA:119,24,0,6
|
|
135
|
-
BRDA:119,24,1,
|
|
136
|
-
BRDA:119,25,0,
|
|
135
|
+
BRDA:119,24,1,43
|
|
136
|
+
BRDA:119,25,0,49
|
|
137
137
|
BRDA:119,25,1,6
|
|
138
138
|
BRDA:160,26,0,1
|
|
139
|
-
BRDA:160,26,1,
|
|
139
|
+
BRDA:160,26,1,90
|
|
140
140
|
BRDA:181,27,0,5
|
|
141
141
|
BRDA:181,27,1,1
|
|
142
142
|
BRDA:183,28,0,3
|
|
@@ -162,32 +162,38 @@ TN:
|
|
|
162
162
|
SF:src/Constants.ts
|
|
163
163
|
FNF:0
|
|
164
164
|
FNH:0
|
|
165
|
-
DA:1,
|
|
166
|
-
DA:2,
|
|
167
|
-
DA:3,
|
|
168
|
-
DA:4,
|
|
169
|
-
DA:5,
|
|
170
|
-
DA:6,
|
|
171
|
-
DA:7,
|
|
172
|
-
DA:8,
|
|
173
|
-
DA:9,
|
|
174
|
-
DA:10,
|
|
175
|
-
DA:11,
|
|
176
|
-
DA:12,
|
|
177
|
-
DA:13,
|
|
178
|
-
DA:14,
|
|
179
|
-
DA:
|
|
180
|
-
DA:
|
|
181
|
-
DA:
|
|
182
|
-
DA:
|
|
183
|
-
DA:
|
|
184
|
-
DA:
|
|
185
|
-
DA:
|
|
186
|
-
DA:
|
|
187
|
-
DA:
|
|
188
|
-
DA:
|
|
189
|
-
|
|
190
|
-
|
|
165
|
+
DA:1,11
|
|
166
|
+
DA:2,11
|
|
167
|
+
DA:3,11
|
|
168
|
+
DA:4,11
|
|
169
|
+
DA:5,11
|
|
170
|
+
DA:6,11
|
|
171
|
+
DA:7,11
|
|
172
|
+
DA:8,11
|
|
173
|
+
DA:9,11
|
|
174
|
+
DA:10,11
|
|
175
|
+
DA:11,11
|
|
176
|
+
DA:12,11
|
|
177
|
+
DA:13,11
|
|
178
|
+
DA:14,11
|
|
179
|
+
DA:15,11
|
|
180
|
+
DA:16,11
|
|
181
|
+
DA:17,11
|
|
182
|
+
DA:18,11
|
|
183
|
+
DA:19,11
|
|
184
|
+
DA:21,11
|
|
185
|
+
DA:23,11
|
|
186
|
+
DA:25,11
|
|
187
|
+
DA:26,11
|
|
188
|
+
DA:27,11
|
|
189
|
+
DA:29,11
|
|
190
|
+
DA:30,11
|
|
191
|
+
DA:31,11
|
|
192
|
+
DA:32,11
|
|
193
|
+
DA:33,11
|
|
194
|
+
DA:34,11
|
|
195
|
+
LF:30
|
|
196
|
+
LH:30
|
|
191
197
|
BRF:0
|
|
192
198
|
BRH:0
|
|
193
199
|
end_of_record
|
|
@@ -197,15 +203,15 @@ FN:30,makeApiRequest
|
|
|
197
203
|
FNF:1
|
|
198
204
|
FNH:1
|
|
199
205
|
FNDA:3,makeApiRequest
|
|
200
|
-
DA:1,
|
|
201
|
-
DA:3,
|
|
202
|
-
DA:4,
|
|
203
|
-
DA:30,
|
|
206
|
+
DA:1,5
|
|
207
|
+
DA:3,5
|
|
208
|
+
DA:4,5
|
|
209
|
+
DA:30,5
|
|
204
210
|
DA:31,3
|
|
205
211
|
DA:32,3
|
|
206
212
|
DA:34,3
|
|
207
|
-
DA:
|
|
208
|
-
DA:
|
|
213
|
+
DA:49,3
|
|
214
|
+
DA:50,2
|
|
209
215
|
LF:9
|
|
210
216
|
LH:9
|
|
211
217
|
BRF:0
|
|
@@ -216,20 +222,112 @@ SF:src/utils.ts
|
|
|
216
222
|
FN:14,findExpiryTime
|
|
217
223
|
FNF:1
|
|
218
224
|
FNH:1
|
|
219
|
-
FNDA:
|
|
220
|
-
DA:14,
|
|
221
|
-
DA:15,
|
|
222
|
-
DA:16,
|
|
223
|
-
DA:17,
|
|
224
|
-
DA:18,
|
|
225
|
+
FNDA:45,findExpiryTime
|
|
226
|
+
DA:14,7
|
|
227
|
+
DA:15,45
|
|
228
|
+
DA:16,45
|
|
229
|
+
DA:17,45
|
|
230
|
+
DA:18,45
|
|
225
231
|
LF:5
|
|
226
232
|
LH:5
|
|
227
233
|
BRDA:17,0,0,0
|
|
228
|
-
BRDA:17,0,1,
|
|
234
|
+
BRDA:17,0,1,45
|
|
229
235
|
BRF:2
|
|
230
236
|
BRH:1
|
|
231
237
|
end_of_record
|
|
232
238
|
TN:
|
|
239
|
+
SF:src/api/AuditExport.ts
|
|
240
|
+
FN:32,trigger
|
|
241
|
+
FN:56,getStatus
|
|
242
|
+
FN:80,download
|
|
243
|
+
FNF:3
|
|
244
|
+
FNH:3
|
|
245
|
+
FNDA:1,trigger
|
|
246
|
+
FNDA:1,getStatus
|
|
247
|
+
FNDA:1,download
|
|
248
|
+
DA:2,1
|
|
249
|
+
DA:3,1
|
|
250
|
+
DA:15,1
|
|
251
|
+
DA:32,1
|
|
252
|
+
DA:35,1
|
|
253
|
+
DA:36,1
|
|
254
|
+
DA:38,1
|
|
255
|
+
DA:56,1
|
|
256
|
+
DA:59,1
|
|
257
|
+
DA:60,1
|
|
258
|
+
DA:62,1
|
|
259
|
+
DA:80,1
|
|
260
|
+
DA:81,1
|
|
261
|
+
DA:82,1
|
|
262
|
+
DA:84,1
|
|
263
|
+
LF:15
|
|
264
|
+
LH:15
|
|
265
|
+
BRF:0
|
|
266
|
+
BRH:0
|
|
267
|
+
end_of_record
|
|
268
|
+
TN:
|
|
269
|
+
SF:src/api/AuditLog.ts
|
|
270
|
+
FN:14,handleAuditLogError
|
|
271
|
+
FN:53,getAuditConfig
|
|
272
|
+
FN:87,updateAuditConfig
|
|
273
|
+
FNF:3
|
|
274
|
+
FNH:3
|
|
275
|
+
FNDA:8,handleAuditLogError
|
|
276
|
+
FNDA:5,getAuditConfig
|
|
277
|
+
FNDA:7,updateAuditConfig
|
|
278
|
+
DA:1,2
|
|
279
|
+
DA:2,2
|
|
280
|
+
DA:3,2
|
|
281
|
+
DA:5,2
|
|
282
|
+
DA:15,8
|
|
283
|
+
DA:16,6
|
|
284
|
+
DA:17,6
|
|
285
|
+
DA:20,6
|
|
286
|
+
DA:21,1
|
|
287
|
+
DA:25,5
|
|
288
|
+
DA:26,1
|
|
289
|
+
DA:30,4
|
|
290
|
+
DA:31,2
|
|
291
|
+
DA:36,4
|
|
292
|
+
DA:53,2
|
|
293
|
+
DA:54,5
|
|
294
|
+
DA:55,5
|
|
295
|
+
DA:57,5
|
|
296
|
+
DA:58,5
|
|
297
|
+
DA:63,3
|
|
298
|
+
DA:87,2
|
|
299
|
+
DA:90,7
|
|
300
|
+
DA:91,7
|
|
301
|
+
DA:93,7
|
|
302
|
+
DA:94,7
|
|
303
|
+
DA:100,5
|
|
304
|
+
LF:26
|
|
305
|
+
LH:26
|
|
306
|
+
BRDA:14,0,0,3
|
|
307
|
+
BRDA:15,1,0,6
|
|
308
|
+
BRDA:15,1,1,2
|
|
309
|
+
BRDA:15,2,0,8
|
|
310
|
+
BRDA:15,2,1,6
|
|
311
|
+
BRDA:20,3,0,1
|
|
312
|
+
BRDA:20,3,1,5
|
|
313
|
+
BRDA:20,4,0,6
|
|
314
|
+
BRDA:20,4,1,1
|
|
315
|
+
BRDA:25,5,0,1
|
|
316
|
+
BRDA:25,5,1,4
|
|
317
|
+
BRDA:26,6,0,0
|
|
318
|
+
BRDA:26,6,1,1
|
|
319
|
+
BRDA:26,7,0,1
|
|
320
|
+
BRDA:26,7,1,1
|
|
321
|
+
BRDA:30,8,0,2
|
|
322
|
+
BRDA:30,8,1,2
|
|
323
|
+
BRDA:31,9,0,0
|
|
324
|
+
BRDA:31,9,1,2
|
|
325
|
+
BRDA:31,10,0,2
|
|
326
|
+
BRDA:31,10,1,2
|
|
327
|
+
BRF:21
|
|
328
|
+
BRH:19
|
|
329
|
+
end_of_record
|
|
330
|
+
TN:
|
|
233
331
|
SF:src/api/Calculation.ts
|
|
234
332
|
FN:35,calculate
|
|
235
333
|
FNF:1
|
|
@@ -249,17 +347,17 @@ BRH:0
|
|
|
249
347
|
end_of_record
|
|
250
348
|
TN:
|
|
251
349
|
SF:src/api/EconomicActivity.ts
|
|
252
|
-
FN:
|
|
350
|
+
FN:103,calculate
|
|
253
351
|
FNF:1
|
|
254
352
|
FNH:1
|
|
255
|
-
FNDA:
|
|
353
|
+
FNDA:2,calculate
|
|
256
354
|
DA:1,1
|
|
257
355
|
DA:2,1
|
|
258
356
|
DA:6,1
|
|
259
|
-
DA:
|
|
260
|
-
DA:
|
|
261
|
-
DA:
|
|
262
|
-
DA:
|
|
357
|
+
DA:103,1
|
|
358
|
+
DA:106,2
|
|
359
|
+
DA:107,2
|
|
360
|
+
DA:109,2
|
|
263
361
|
LF:7
|
|
264
362
|
LH:7
|
|
265
363
|
BRF:0
|
|
@@ -268,7 +366,7 @@ end_of_record
|
|
|
268
366
|
TN:
|
|
269
367
|
SF:src/api/Factor.ts
|
|
270
368
|
FN:41,retrieveFactor
|
|
271
|
-
FN:
|
|
369
|
+
FN:144,search
|
|
272
370
|
FNF:2
|
|
273
371
|
FNH:2
|
|
274
372
|
FNDA:1,retrieveFactor
|
|
@@ -280,10 +378,10 @@ DA:41,1
|
|
|
280
378
|
DA:44,1
|
|
281
379
|
DA:45,1
|
|
282
380
|
DA:47,1
|
|
283
|
-
DA:
|
|
284
|
-
DA:
|
|
285
|
-
DA:
|
|
286
|
-
DA:
|
|
381
|
+
DA:144,1
|
|
382
|
+
DA:147,1
|
|
383
|
+
DA:148,1
|
|
384
|
+
DA:150,1
|
|
287
385
|
LF:11
|
|
288
386
|
LH:11
|
|
289
387
|
BRF:0
|
|
@@ -422,18 +520,36 @@ BRF:0
|
|
|
422
520
|
BRH:0
|
|
423
521
|
end_of_record
|
|
424
522
|
TN:
|
|
523
|
+
SF:src/api/PhysicalActivity.ts
|
|
524
|
+
FN:81,calculate
|
|
525
|
+
FNF:1
|
|
526
|
+
FNH:1
|
|
527
|
+
FNDA:3,calculate
|
|
528
|
+
DA:1,1
|
|
529
|
+
DA:2,1
|
|
530
|
+
DA:6,1
|
|
531
|
+
DA:81,1
|
|
532
|
+
DA:84,3
|
|
533
|
+
DA:85,3
|
|
534
|
+
DA:87,3
|
|
535
|
+
LF:7
|
|
536
|
+
LH:7
|
|
537
|
+
BRF:0
|
|
538
|
+
BRH:0
|
|
539
|
+
end_of_record
|
|
540
|
+
TN:
|
|
425
541
|
SF:src/api/RealEstate.ts
|
|
426
|
-
FN:
|
|
542
|
+
FN:58,calculate
|
|
427
543
|
FNF:1
|
|
428
544
|
FNH:1
|
|
429
|
-
FNDA:
|
|
545
|
+
FNDA:2,calculate
|
|
430
546
|
DA:1,1
|
|
431
547
|
DA:2,1
|
|
432
548
|
DA:6,1
|
|
433
|
-
DA:
|
|
434
|
-
DA:
|
|
435
|
-
DA:
|
|
436
|
-
DA:
|
|
549
|
+
DA:58,1
|
|
550
|
+
DA:61,2
|
|
551
|
+
DA:62,2
|
|
552
|
+
DA:64,2
|
|
437
553
|
LF:7
|
|
438
554
|
LH:7
|
|
439
555
|
BRF:0
|
|
@@ -477,17 +593,17 @@ BRH:0
|
|
|
477
593
|
end_of_record
|
|
478
594
|
TN:
|
|
479
595
|
SF:src/api/TypeRecommender.ts
|
|
480
|
-
FN:
|
|
596
|
+
FN:119,search
|
|
481
597
|
FNF:1
|
|
482
598
|
FNH:1
|
|
483
599
|
FNDA:1,search
|
|
484
600
|
DA:1,1
|
|
485
601
|
DA:2,1
|
|
486
602
|
DA:5,1
|
|
487
|
-
DA:
|
|
488
|
-
DA:
|
|
489
|
-
DA:
|
|
490
|
-
DA:
|
|
603
|
+
DA:119,1
|
|
604
|
+
DA:122,1
|
|
605
|
+
DA:123,1
|
|
606
|
+
DA:125,1
|
|
491
607
|
LF:7
|
|
492
608
|
LH:7
|
|
493
609
|
BRF:0
|
|
@@ -528,6 +644,17 @@ BRF:0
|
|
|
528
644
|
BRH:0
|
|
529
645
|
end_of_record
|
|
530
646
|
TN:
|
|
647
|
+
SF:test/mocks/AttributionRequest.ts
|
|
648
|
+
FNF:0
|
|
649
|
+
FNH:0
|
|
650
|
+
DA:3,1
|
|
651
|
+
DA:23,1
|
|
652
|
+
LF:2
|
|
653
|
+
LH:2
|
|
654
|
+
BRF:0
|
|
655
|
+
BRH:0
|
|
656
|
+
end_of_record
|
|
657
|
+
TN:
|
|
531
658
|
SF:test/mocks/CommonRequest.ts
|
|
532
659
|
FNF:0
|
|
533
660
|
FNH:0
|
|
@@ -539,6 +666,17 @@ BRF:0
|
|
|
539
666
|
BRH:0
|
|
540
667
|
end_of_record
|
|
541
668
|
TN:
|
|
669
|
+
SF:test/mocks/EconomicActivityAttributionRequest.ts
|
|
670
|
+
FNF:0
|
|
671
|
+
FNH:0
|
|
672
|
+
DA:3,1
|
|
673
|
+
DA:22,1
|
|
674
|
+
LF:2
|
|
675
|
+
LH:2
|
|
676
|
+
BRF:0
|
|
677
|
+
BRH:0
|
|
678
|
+
end_of_record
|
|
679
|
+
TN:
|
|
542
680
|
SF:test/mocks/FactorRequest.ts
|
|
543
681
|
FNF:0
|
|
544
682
|
FNH:0
|
|
@@ -572,6 +710,28 @@ BRF:0
|
|
|
572
710
|
BRH:0
|
|
573
711
|
end_of_record
|
|
574
712
|
TN:
|
|
713
|
+
SF:test/mocks/PhysicalActivityEVICRequest.ts
|
|
714
|
+
FNF:0
|
|
715
|
+
FNH:0
|
|
716
|
+
DA:3,1
|
|
717
|
+
DA:22,1
|
|
718
|
+
LF:2
|
|
719
|
+
LH:2
|
|
720
|
+
BRF:0
|
|
721
|
+
BRH:0
|
|
722
|
+
end_of_record
|
|
723
|
+
TN:
|
|
724
|
+
SF:test/mocks/PhysicalActivityRequest.ts
|
|
725
|
+
FNF:0
|
|
726
|
+
FNH:0
|
|
727
|
+
DA:3,1
|
|
728
|
+
DA:23,1
|
|
729
|
+
LF:2
|
|
730
|
+
LH:2
|
|
731
|
+
BRF:0
|
|
732
|
+
BRH:0
|
|
733
|
+
end_of_record
|
|
734
|
+
TN:
|
|
575
735
|
SF:test/mocks/SearchRequest.ts
|
|
576
736
|
FNF:0
|
|
577
737
|
FNH:0
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.TypeRecommender = exports.Metadata = exports.RealEstate = exports.EconomicActivity = exports.FactorSets = exports.Factor = exports.Usage = exports.TransportationAndDistribution = exports.Calculation = exports.Stationary = exports.Mobile = exports.Fugitive = exports.Location = exports.Client = void 0;
|
|
36
|
+
exports.AuditExport = exports.AuditLog = exports.TypeRecommender = exports.Metadata = exports.PhysicalActivity = exports.RealEstate = exports.EconomicActivity = exports.FactorSets = exports.Factor = exports.Usage = exports.TransportationAndDistribution = exports.Calculation = exports.Stationary = exports.Mobile = exports.Fugitive = exports.Location = exports.Client = void 0;
|
|
37
37
|
var Client_1 = require("./Client");
|
|
38
38
|
Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return Client_1.Client; } });
|
|
39
39
|
exports.Location = __importStar(require("./api/Location"));
|
|
@@ -47,5 +47,8 @@ exports.Factor = __importStar(require("./api/Factor"));
|
|
|
47
47
|
exports.FactorSets = __importStar(require("./api/FactorSets"));
|
|
48
48
|
exports.EconomicActivity = __importStar(require("./api/EconomicActivity"));
|
|
49
49
|
exports.RealEstate = __importStar(require("./api/RealEstate"));
|
|
50
|
+
exports.PhysicalActivity = __importStar(require("./api/PhysicalActivity"));
|
|
50
51
|
exports.Metadata = __importStar(require("./api/Metadata"));
|
|
51
52
|
exports.TypeRecommender = __importStar(require("./api/TypeRecommender"));
|
|
53
|
+
exports.AuditLog = __importStar(require("./api/AuditLog"));
|
|
54
|
+
exports.AuditExport = __importStar(require("./api/AuditExport"));
|
package/dist/request.js
CHANGED
|
@@ -12,6 +12,11 @@ export declare const FACTOR_SET_API_PATH = "/v3/carbon/factorset";
|
|
|
12
12
|
export declare const SEARCH_API_PATH = "/v3/carbon/factor/search";
|
|
13
13
|
export declare const ECONOMIC_ACTIVITY_API_PATH = "/v3/carbon/economic-activity";
|
|
14
14
|
export declare const REAL_ESTATE_API_PATH = "/v3/carbon/real-estate";
|
|
15
|
+
export declare const PHYSICAL_ACTIVITY_API_PATH = "/v3/carbon/physical-activity";
|
|
16
|
+
export declare const AUDIT_LOG_API_PATH = "/v3/carbon/admin/audit-log";
|
|
17
|
+
export declare const AUDIT_EXPORT_API_PATH = "/v3/carbon/audit";
|
|
18
|
+
export declare const AUDIT_EXPORT_STATUS_API_PATH = "/v3/carbon/audit/status";
|
|
19
|
+
export declare const AUDIT_EXPORT_DOWNLOAD_API_PATH = "/v3/carbon/audit/download";
|
|
15
20
|
export declare const TYPE_RECOMMENDER_API_PATH = "/v3/carbon/recommender/type/search";
|
|
16
21
|
export declare const USAGE_API = "/v3/carbon/usage";
|
|
17
22
|
export declare const METADATA_TYPES_ENDPOINT = "/v3/carbon/metadata/types";
|
|
@@ -19,6 +24,7 @@ export declare const METADATA_AREA_ENDPOINT = "/v3/carbon/metadata/area";
|
|
|
19
24
|
export declare const METADATA_UNITS_ENDPOINT = "/v3/carbon/metadata/units";
|
|
20
25
|
export declare const GET = "GET";
|
|
21
26
|
export declare const POST = "POST";
|
|
27
|
+
export declare const PUT = "PUT";
|
|
22
28
|
export declare const CLIENT_SOURCE_HEADER = "X-Client-Source";
|
|
23
29
|
export declare const CLIENT_SOURCE_EXCEL = "excel";
|
|
24
30
|
export declare const CLIENT_SOURCE_SDK = "node-sdk";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
2
|
+
import { AuditExportRequest, AuditExportResponse, AuditExportStatusResponse } from "../interfaces/response/AuditExportResponse";
|
|
3
|
+
/**
|
|
4
|
+
* Triggers an asynchronous audit data export.
|
|
5
|
+
*
|
|
6
|
+
* @export
|
|
7
|
+
* @param {AuditExportRequest} payload - Date range and optional API-name filter for the export
|
|
8
|
+
* @return {Promise<AuditExportResponse>} The accepted export request, including its request ID
|
|
9
|
+
* @throws {Error} Throws if the request is invalid, the caller is not an admin, or a matching export already exists
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const auditExport = await trigger({
|
|
13
|
+
* fromDate: "2025-01-01",
|
|
14
|
+
* toDate: "2025-03-31",
|
|
15
|
+
* apiName: "location"
|
|
16
|
+
* });
|
|
17
|
+
*/
|
|
18
|
+
export declare function trigger(payload: AuditExportRequest): Promise<AuditExportResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves the processing status of an audit export.
|
|
21
|
+
*
|
|
22
|
+
* @export
|
|
23
|
+
* @param {string} requestId - Request ID returned by trigger
|
|
24
|
+
* @return {Promise<AuditExportStatusResponse>} Current export status and, when complete, download details
|
|
25
|
+
* @throws {Error} Throws if the request ID is invalid or the caller is not an admin
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* const status = await getStatus(auditExport.requestId);
|
|
29
|
+
*/
|
|
30
|
+
export declare function getStatus(requestId: string): Promise<AuditExportStatusResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Downloads a completed audit export as a ZIP archive.
|
|
33
|
+
*
|
|
34
|
+
* @export
|
|
35
|
+
* @param {string} requestId - Request ID returned by trigger
|
|
36
|
+
* @return {Promise<Buffer>} ZIP archive containing audit-export.csv
|
|
37
|
+
* @throws {Error} Throws while processing, when the export failed or expired, or if the caller is not an admin
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* const auditExportZip = await download(auditExport.requestId);
|
|
41
|
+
*/
|
|
42
|
+
export declare function download(requestId: string): Promise<Buffer>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AuditLogRequest, AuditLogResponse } from "../interfaces/response/AuditLogResponse";
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves the audit log configuration for the organization.
|
|
4
|
+
*
|
|
5
|
+
* Controls whether the organization's API requests and responses are stored for auditing.
|
|
6
|
+
* Organizations can disable this if they don't need their API calls to be audited.
|
|
7
|
+
*
|
|
8
|
+
* @export
|
|
9
|
+
* @return {Promise<AuditLogResponse>} Current audit log configuration
|
|
10
|
+
* @throws {Error} Throws error for 403 (Forbidden) or other failures
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* const config = await getConfig();
|
|
14
|
+
* // Output: { logRequest: true, logResponse: false }
|
|
15
|
+
*/
|
|
16
|
+
export declare function getAuditConfig(): Promise<AuditLogResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Updates the audit log configuration for the organization.
|
|
19
|
+
*
|
|
20
|
+
* Controls whether the organization's API requests and responses are stored for auditing.
|
|
21
|
+
* Organizations can disable this if they don't need their API calls to be audited.
|
|
22
|
+
*
|
|
23
|
+
* Note: If the configuration is already set to the requested values, the API will return
|
|
24
|
+
* a 409 Conflict status with a message indicating no change was made. This is handled
|
|
25
|
+
* gracefully and the current configuration is returned.
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
* @param {AuditLogRequest} payload - Audit log configuration
|
|
29
|
+
* @return {Promise<AuditLogResponse>} Updated configuration or current configuration if no change
|
|
30
|
+
* @throws {Error} Throws error for 400 (Bad Request), 403 (Forbidden), or other failures
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* const result = await update({ logRequest: false, logResponse: false });
|
|
34
|
+
* // If already set to these values:
|
|
35
|
+
* // { logRequest: false, logResponse: false, message: "No change in audit log configuration" }
|
|
36
|
+
*/
|
|
37
|
+
export declare function updateAuditConfig(payload: AuditLogRequest): Promise<AuditLogResponse>;
|