emissions-api-sdk 1.0.12 → 1.0.13

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 (106) hide show
  1. package/README.md +42 -2
  2. package/dist/Constants.js +4 -1
  3. package/dist/api/AuditLog.js +99 -0
  4. package/dist/api/EconomicActivity.js +24 -0
  5. package/dist/api/Factor.js +19 -0
  6. package/dist/api/PhysicalActivity.js +87 -0
  7. package/dist/api/RealEstate.js +23 -0
  8. package/dist/api/TypeRecommender.js +19 -2
  9. package/dist/coverage/clover.xml +149 -87
  10. package/dist/coverage/coverage-final.json +14 -8
  11. package/dist/coverage/lcov-report/index.html +21 -21
  12. package/dist/coverage/lcov-report/src/Client.ts.html +32 -32
  13. package/dist/coverage/lcov-report/src/Constants.ts.html +36 -27
  14. package/dist/coverage/lcov-report/src/api/AuditLog.ts.html +388 -0
  15. package/dist/coverage/lcov-report/src/api/Calculation.ts.html +1 -1
  16. package/dist/coverage/lcov-report/src/api/EconomicActivity.ts.html +77 -5
  17. package/dist/coverage/lcov-report/src/api/Factor.ts.html +59 -2
  18. package/dist/coverage/lcov-report/src/api/FactorSets.ts.html +1 -1
  19. package/dist/coverage/lcov-report/src/api/Fugitive.ts.html +1 -1
  20. package/dist/coverage/lcov-report/src/api/Location.ts.html +1 -1
  21. package/dist/coverage/lcov-report/src/api/Metadata.ts.html +1 -1
  22. package/dist/coverage/lcov-report/src/api/Mobile.ts.html +1 -1
  23. package/dist/coverage/lcov-report/src/api/PhysicalActivity.ts.html +361 -0
  24. package/dist/coverage/lcov-report/src/api/RealEstate.ts.html +74 -5
  25. package/dist/coverage/lcov-report/src/api/Stationary.ts.html +1 -1
  26. package/dist/coverage/lcov-report/src/api/TransportationAndDistribution.ts.html +1 -1
  27. package/dist/coverage/lcov-report/src/api/TypeRecommender.ts.html +55 -4
  28. package/dist/coverage/lcov-report/src/api/Usage.ts.html +1 -1
  29. package/dist/coverage/lcov-report/src/api/index.html +36 -6
  30. package/dist/coverage/lcov-report/src/index.html +7 -7
  31. package/dist/coverage/lcov-report/src/request.ts.html +5 -5
  32. package/dist/coverage/lcov-report/src/utils.ts.html +6 -6
  33. package/dist/coverage/lcov-report/test/index.html +1 -1
  34. package/dist/coverage/lcov-report/test/mocks/AttributionRequest.ts.html +151 -0
  35. package/dist/coverage/lcov-report/test/mocks/CommonRequest.ts.html +1 -1
  36. package/dist/coverage/lcov-report/test/mocks/EconomicActivityAttributionRequest.ts.html +148 -0
  37. package/dist/coverage/lcov-report/test/mocks/FactorRequest.ts.html +1 -1
  38. package/dist/coverage/lcov-report/test/mocks/GenericCalculationRequest.ts.html +1 -1
  39. package/dist/coverage/lcov-report/test/mocks/LocationRequest.ts.html +1 -1
  40. package/dist/coverage/lcov-report/test/mocks/PhysicalActivityEVICRequest.ts.html +148 -0
  41. package/dist/coverage/lcov-report/test/mocks/PhysicalActivityRequest.ts.html +151 -0
  42. package/dist/coverage/lcov-report/test/mocks/SearchRequest.ts.html +1 -1
  43. package/dist/coverage/lcov-report/test/mocks/index.html +63 -3
  44. package/dist/coverage/lcov-report/test/testUtils.ts.html +1 -1
  45. package/dist/coverage/lcov.info +249 -122
  46. package/dist/index.js +3 -1
  47. package/dist/interfaces/response/AuditLogResponse.js +2 -0
  48. package/dist/types/Constants.d.ts +3 -0
  49. package/dist/types/api/AuditLog.d.ts +37 -0
  50. package/dist/types/api/EconomicActivity.d.ts +24 -0
  51. package/dist/types/api/Factor.d.ts +19 -0
  52. package/dist/types/api/PhysicalActivity.d.ts +76 -0
  53. package/dist/types/api/RealEstate.d.ts +23 -0
  54. package/dist/types/api/TypeRecommender.d.ts +19 -2
  55. package/dist/types/index.d.ts +4 -0
  56. package/dist/types/interfaces/Api.d.ts +17 -1
  57. package/dist/types/interfaces/common.d.ts +40 -0
  58. package/dist/types/interfaces/response/AuditLogResponse.d.ts +40 -0
  59. package/dist/types/interfaces/response/TypeRecommenderResponse.d.ts +1 -0
  60. package/docs/_sources/authentication.rst.txt +26 -4
  61. package/docs/_sources/getting_started.rst.txt +538 -74
  62. package/docs/_sources/index.rst.txt +11 -0
  63. package/docs/_sources/reference.rst.txt +26 -0
  64. package/docs/_sources/troubleshooting.rst.txt +77 -12
  65. package/docs/_static/basic.css +8 -0
  66. package/docs/_static/doctools.js +5 -6
  67. package/docs/_static/language_data.js +186 -7
  68. package/docs/_static/pygments.css +146 -164
  69. package/docs/_static/searchtools.js +60 -121
  70. package/docs/_static/sphinx_highlight.js +31 -36
  71. package/docs/_static/styles/furo.css +1 -1
  72. package/docs/_static/styles/furo.css.map +1 -1
  73. package/docs/authentication.html +61 -26
  74. package/docs/client.html +33 -22
  75. package/docs/genindex.html +52 -23
  76. package/docs/getting_started.html +745 -103
  77. package/docs/index.html +65 -21
  78. package/docs/reference.html +484 -66
  79. package/docs/sdk.html +32 -21
  80. package/docs/search.html +32 -21
  81. package/docs/searchindex.js +1 -1
  82. package/docs/troubleshooting.html +105 -38
  83. package/package.json +7 -3
  84. package/sphinx-build/source/authentication.rst +26 -4
  85. package/sphinx-build/source/getting_started.rst +538 -74
  86. package/sphinx-build/source/index.rst +11 -0
  87. package/sphinx-build/source/reference.rst +26 -0
  88. package/sphinx-build/source/troubleshooting.rst +77 -12
  89. package/src/Constants.ts +3 -0
  90. package/src/api/AuditLog.ts +102 -0
  91. package/src/api/EconomicActivity.ts +24 -0
  92. package/src/api/Factor.ts +19 -0
  93. package/src/api/PhysicalActivity.ts +92 -0
  94. package/src/api/RealEstate.ts +23 -0
  95. package/src/api/TypeRecommender.ts +19 -2
  96. package/src/index.ts +7 -1
  97. package/src/interfaces/Api.ts +22 -6
  98. package/src/interfaces/common.ts +46 -0
  99. package/src/interfaces/response/AuditLogResponse.ts +47 -0
  100. package/src/interfaces/response/TypeRecommenderResponse.ts +2 -0
  101. package/test/apiTest.test.ts +59 -3
  102. package/test/auditLog.test.ts +216 -0
  103. package/test/mocks/AttributionRequest.ts +23 -0
  104. package/test/mocks/EconomicActivityAttributionRequest.ts +22 -0
  105. package/test/mocks/PhysicalActivityEVICRequest.ts +22 -0
  106. package/test/mocks/PhysicalActivityRequest.ts +23 -0
@@ -12,59 +12,59 @@ FN:269,(anonymous_9)
12
12
  FN:303,(anonymous_10)
13
13
  FNF:10
14
14
  FNH:8
15
- FNDA:43,(anonymous_1)
16
- FNDA:48,(anonymous_2)
17
- FNDA:66,(anonymous_3)
18
- FNDA:77,(anonymous_4)
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,5
26
- DA:3,5
27
- DA:4,5
28
- DA:6,5
29
- DA:7,5
30
- DA:25,43
31
- DA:26,43
32
- DA:27,43
33
- DA:28,43
25
+ DA:1,6
26
+ DA:3,6
27
+ DA:4,6
28
+ DA:6,6
29
+ DA:7,6
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,42
38
- DA:34,42
39
- DA:35,42
40
- DA:38,43
41
- DA:39,43
42
- DA:40,43
43
- DA:41,43
44
- DA:42,43
45
- DA:43,43
46
- DA:88,48
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,47
48
+ DA:93,54
49
49
  DA:94,1
50
- DA:98,46
50
+ DA:98,53
51
51
  DA:99,1
52
- DA:103,45
52
+ DA:103,52
53
53
  DA:104,1
54
- DA:108,44
54
+ DA:108,51
55
55
  DA:109,1
56
- DA:114,43
57
- DA:116,43
56
+ DA:114,50
57
+ DA:116,50
58
58
  DA:117,1
59
59
  DA:118,1
60
- DA:119,42
60
+ DA:119,49
61
61
  DA:120,6
62
- DA:122,36
63
- DA:124,43
64
- DA:138,66
65
- DA:160,77
62
+ DA:122,43
63
+ DA:124,50
64
+ DA:138,80
65
+ DA:160,91
66
66
  DA:161,1
67
- DA:165,76
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,37
92
+ BRDA:25,2,0,44
93
93
  BRDA:25,3,0,7
94
- BRDA:25,4,0,43
94
+ BRDA:25,4,0,50
95
95
  BRDA:28,5,0,1
96
- BRDA:28,5,1,42
96
+ BRDA:28,5,1,49
97
97
  BRDA:40,6,0,0
98
- BRDA:40,6,1,43
99
- BRDA:40,7,0,43
100
- BRDA:40,7,1,43
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,41
103
- BRDA:41,9,0,43
104
- BRDA:41,9,1,43
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,37
106
+ BRDA:41,10,1,44
107
107
  BRDA:43,11,0,0
108
- BRDA:43,11,1,43
108
+ BRDA:43,11,1,50
109
109
  BRDA:88,12,0,1
110
- BRDA:88,12,1,47
111
- BRDA:88,13,0,48
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,46
115
- BRDA:93,15,0,47
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,45
119
- BRDA:98,17,0,46
120
- BRDA:98,17,1,37
121
- BRDA:98,17,2,36
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,44
124
- BRDA:103,19,0,45
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,43
128
- BRDA:108,21,0,44
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,42
132
- BRDA:116,23,0,43
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,36
136
- BRDA:119,25,0,42
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,76
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,35 @@ TN:
162
162
  SF:src/Constants.ts
163
163
  FNF:0
164
164
  FNH:0
165
- DA:1,5
166
- DA:2,5
167
- DA:3,5
168
- DA:4,5
169
- DA:5,5
170
- DA:6,5
171
- DA:7,5
172
- DA:8,5
173
- DA:9,5
174
- DA:10,5
175
- DA:11,5
176
- DA:12,5
177
- DA:13,5
178
- DA:14,5
179
- DA:16,5
180
- DA:18,5
181
- DA:20,5
182
- DA:21,5
183
- DA:22,5
184
- DA:24,5
185
- DA:25,5
186
- DA:26,5
187
- DA:27,5
188
- DA:28,5
189
- LF:24
190
- LH:24
165
+ DA:1,8
166
+ DA:2,8
167
+ DA:3,8
168
+ DA:4,8
169
+ DA:5,8
170
+ DA:6,8
171
+ DA:7,8
172
+ DA:8,8
173
+ DA:9,8
174
+ DA:10,8
175
+ DA:11,8
176
+ DA:12,8
177
+ DA:13,8
178
+ DA:14,8
179
+ DA:15,8
180
+ DA:16,8
181
+ DA:18,8
182
+ DA:20,8
183
+ DA:22,8
184
+ DA:23,8
185
+ DA:24,8
186
+ DA:26,8
187
+ DA:27,8
188
+ DA:28,8
189
+ DA:29,8
190
+ DA:30,8
191
+ DA:31,8
192
+ LF:27
193
+ LH:27
191
194
  BRF:0
192
195
  BRH:0
193
196
  end_of_record
@@ -197,10 +200,10 @@ FN:30,makeApiRequest
197
200
  FNF:1
198
201
  FNH:1
199
202
  FNDA:3,makeApiRequest
200
- DA:1,3
201
- DA:3,3
202
- DA:4,3
203
- DA:30,3
203
+ DA:1,4
204
+ DA:3,4
205
+ DA:4,4
206
+ DA:30,4
204
207
  DA:31,3
205
208
  DA:32,3
206
209
  DA:34,3
@@ -216,20 +219,82 @@ SF:src/utils.ts
216
219
  FN:14,findExpiryTime
217
220
  FNF:1
218
221
  FNH:1
219
- FNDA:38,findExpiryTime
220
- DA:14,5
221
- DA:15,38
222
- DA:16,38
223
- DA:17,38
224
- DA:18,38
222
+ FNDA:45,findExpiryTime
223
+ DA:14,6
224
+ DA:15,45
225
+ DA:16,45
226
+ DA:17,45
227
+ DA:18,45
225
228
  LF:5
226
229
  LH:5
227
230
  BRDA:17,0,0,0
228
- BRDA:17,0,1,38
231
+ BRDA:17,0,1,45
229
232
  BRF:2
230
233
  BRH:1
231
234
  end_of_record
232
235
  TN:
236
+ SF:src/api/AuditLog.ts
237
+ FN:14,handleAuditLogError
238
+ FN:53,getAuditConfig
239
+ FN:87,updateAuditConfig
240
+ FNF:3
241
+ FNH:3
242
+ FNDA:8,handleAuditLogError
243
+ FNDA:5,getAuditConfig
244
+ FNDA:7,updateAuditConfig
245
+ DA:1,2
246
+ DA:2,2
247
+ DA:3,2
248
+ DA:5,2
249
+ DA:15,8
250
+ DA:16,6
251
+ DA:17,6
252
+ DA:20,6
253
+ DA:21,1
254
+ DA:25,5
255
+ DA:26,1
256
+ DA:30,4
257
+ DA:31,2
258
+ DA:36,4
259
+ DA:53,2
260
+ DA:54,5
261
+ DA:55,5
262
+ DA:57,5
263
+ DA:58,5
264
+ DA:63,3
265
+ DA:87,2
266
+ DA:90,7
267
+ DA:91,7
268
+ DA:93,7
269
+ DA:94,7
270
+ DA:100,5
271
+ LF:26
272
+ LH:26
273
+ BRDA:14,0,0,3
274
+ BRDA:15,1,0,6
275
+ BRDA:15,1,1,2
276
+ BRDA:15,2,0,8
277
+ BRDA:15,2,1,6
278
+ BRDA:20,3,0,1
279
+ BRDA:20,3,1,5
280
+ BRDA:20,4,0,6
281
+ BRDA:20,4,1,1
282
+ BRDA:25,5,0,1
283
+ BRDA:25,5,1,4
284
+ BRDA:26,6,0,0
285
+ BRDA:26,6,1,1
286
+ BRDA:26,7,0,1
287
+ BRDA:26,7,1,1
288
+ BRDA:30,8,0,2
289
+ BRDA:30,8,1,2
290
+ BRDA:31,9,0,0
291
+ BRDA:31,9,1,2
292
+ BRDA:31,10,0,2
293
+ BRDA:31,10,1,2
294
+ BRF:21
295
+ BRH:19
296
+ end_of_record
297
+ TN:
233
298
  SF:src/api/Calculation.ts
234
299
  FN:35,calculate
235
300
  FNF:1
@@ -249,17 +314,17 @@ BRH:0
249
314
  end_of_record
250
315
  TN:
251
316
  SF:src/api/EconomicActivity.ts
252
- FN:34,calculate
317
+ FN:58,calculate
253
318
  FNF:1
254
319
  FNH:1
255
- FNDA:1,calculate
320
+ FNDA:2,calculate
256
321
  DA:1,1
257
322
  DA:2,1
258
323
  DA:6,1
259
- DA:34,1
260
- DA:37,1
261
- DA:38,1
262
- DA:40,1
324
+ DA:58,1
325
+ DA:61,2
326
+ DA:62,2
327
+ DA:64,2
263
328
  LF:7
264
329
  LH:7
265
330
  BRF:0
@@ -268,7 +333,7 @@ end_of_record
268
333
  TN:
269
334
  SF:src/api/Factor.ts
270
335
  FN:41,retrieveFactor
271
- FN:128,search
336
+ FN:147,search
272
337
  FNF:2
273
338
  FNH:2
274
339
  FNDA:1,retrieveFactor
@@ -280,10 +345,10 @@ DA:41,1
280
345
  DA:44,1
281
346
  DA:45,1
282
347
  DA:47,1
283
- DA:128,1
284
- DA:131,1
285
- DA:132,1
286
- DA:134,1
348
+ DA:147,1
349
+ DA:150,1
350
+ DA:151,1
351
+ DA:153,1
287
352
  LF:11
288
353
  LH:11
289
354
  BRF:0
@@ -422,18 +487,36 @@ BRF:0
422
487
  BRH:0
423
488
  end_of_record
424
489
  TN:
490
+ SF:src/api/PhysicalActivity.ts
491
+ FN:81,calculate
492
+ FNF:1
493
+ FNH:1
494
+ FNDA:3,calculate
495
+ DA:1,1
496
+ DA:2,1
497
+ DA:6,1
498
+ DA:81,1
499
+ DA:84,3
500
+ DA:85,3
501
+ DA:87,3
502
+ LF:7
503
+ LH:7
504
+ BRF:0
505
+ BRH:0
506
+ end_of_record
507
+ TN:
425
508
  SF:src/api/RealEstate.ts
426
- FN:34,calculate
509
+ FN:57,calculate
427
510
  FNF:1
428
511
  FNH:1
429
- FNDA:1,calculate
512
+ FNDA:2,calculate
430
513
  DA:1,1
431
514
  DA:2,1
432
515
  DA:6,1
433
- DA:34,1
434
- DA:37,1
435
- DA:38,1
436
- DA:40,1
516
+ DA:57,1
517
+ DA:60,2
518
+ DA:61,2
519
+ DA:63,2
437
520
  LF:7
438
521
  LH:7
439
522
  BRF:0
@@ -477,17 +560,17 @@ BRH:0
477
560
  end_of_record
478
561
  TN:
479
562
  SF:src/api/TypeRecommender.ts
480
- FN:102,search
563
+ FN:119,search
481
564
  FNF:1
482
565
  FNH:1
483
566
  FNDA:1,search
484
567
  DA:1,1
485
568
  DA:2,1
486
569
  DA:5,1
487
- DA:102,1
488
- DA:105,1
489
- DA:106,1
490
- DA:108,1
570
+ DA:119,1
571
+ DA:122,1
572
+ DA:123,1
573
+ DA:125,1
491
574
  LF:7
492
575
  LH:7
493
576
  BRF:0
@@ -528,6 +611,17 @@ BRF:0
528
611
  BRH:0
529
612
  end_of_record
530
613
  TN:
614
+ SF:test/mocks/AttributionRequest.ts
615
+ FNF:0
616
+ FNH:0
617
+ DA:3,1
618
+ DA:23,1
619
+ LF:2
620
+ LH:2
621
+ BRF:0
622
+ BRH:0
623
+ end_of_record
624
+ TN:
531
625
  SF:test/mocks/CommonRequest.ts
532
626
  FNF:0
533
627
  FNH:0
@@ -539,6 +633,17 @@ BRF:0
539
633
  BRH:0
540
634
  end_of_record
541
635
  TN:
636
+ SF:test/mocks/EconomicActivityAttributionRequest.ts
637
+ FNF:0
638
+ FNH:0
639
+ DA:3,1
640
+ DA:22,1
641
+ LF:2
642
+ LH:2
643
+ BRF:0
644
+ BRH:0
645
+ end_of_record
646
+ TN:
542
647
  SF:test/mocks/FactorRequest.ts
543
648
  FNF:0
544
649
  FNH:0
@@ -572,6 +677,28 @@ BRF:0
572
677
  BRH:0
573
678
  end_of_record
574
679
  TN:
680
+ SF:test/mocks/PhysicalActivityEVICRequest.ts
681
+ FNF:0
682
+ FNH:0
683
+ DA:3,1
684
+ DA:22,1
685
+ LF:2
686
+ LH:2
687
+ BRF:0
688
+ BRH:0
689
+ end_of_record
690
+ TN:
691
+ SF:test/mocks/PhysicalActivityRequest.ts
692
+ FNF:0
693
+ FNH:0
694
+ DA:3,1
695
+ DA:23,1
696
+ LF:2
697
+ LH:2
698
+ BRF:0
699
+ BRH:0
700
+ end_of_record
701
+ TN:
575
702
  SF:test/mocks/SearchRequest.ts
576
703
  FNF:0
577
704
  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.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,7 @@ 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"));
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -12,6 +12,8 @@ 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";
15
17
  export declare const TYPE_RECOMMENDER_API_PATH = "/v3/carbon/recommender/type/search";
16
18
  export declare const USAGE_API = "/v3/carbon/usage";
17
19
  export declare const METADATA_TYPES_ENDPOINT = "/v3/carbon/metadata/types";
@@ -19,6 +21,7 @@ export declare const METADATA_AREA_ENDPOINT = "/v3/carbon/metadata/area";
19
21
  export declare const METADATA_UNITS_ENDPOINT = "/v3/carbon/metadata/units";
20
22
  export declare const GET = "GET";
21
23
  export declare const POST = "POST";
24
+ export declare const PUT = "PUT";
22
25
  export declare const CLIENT_SOURCE_HEADER = "X-Client-Source";
23
26
  export declare const CLIENT_SOURCE_EXCEL = "excel";
24
27
  export declare const CLIENT_SOURCE_SDK = "node-sdk";
@@ -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>;
@@ -3,6 +3,7 @@ import { EmissionResponse } from "../interfaces/response/EmissionResponse";
3
3
  import { EmissionResponseWithDetails } from "../interfaces/response/EmissionResponseWithDetails";
4
4
  /**
5
5
  * Performs scope 3 Spend based emission calculations by making a POST request to the economic activity API endpoint.
6
+ * Supports optional attribution with revenue for proportional allocation.
6
7
  *
7
8
  * @export
8
9
  * @param {CommonRequest} payload - The request data to be sent to the API
@@ -10,6 +11,7 @@ import { EmissionResponseWithDetails } from "../interfaces/response/EmissionResp
10
11
  * @throws {Error} May throw an error if the API request fails
11
12
  *
12
13
  * @example
14
+ * // Basic economic activity request
13
15
  * const request = {
14
16
  "time": {
15
17
  "date": "2025-01-04"
@@ -25,5 +27,27 @@ import { EmissionResponseWithDetails } from "../interfaces/response/EmissionResp
25
27
  "includeDetails": false
26
28
  };
27
29
  * const result = await calculate(request);
30
+ *
31
+ * @example
32
+ * // Economic activity request with revenue attribution
33
+ * const requestWithAttribution = {
34
+ "time": {
35
+ "date": "2025-01-04"
36
+ },
37
+ "location": {
38
+ "country": "usa"
39
+ },
40
+ "activity": {
41
+ "type": "accomodation",
42
+ "value": 1500.12,
43
+ "unit": "usd"
44
+ },
45
+ "attribution": {
46
+ "outstandingAmount": 500000.0,
47
+ "revenue": 2000000.0
48
+ },
49
+ "includeDetails": true
50
+ };
51
+ * const resultWithAttribution = await calculate(requestWithAttribution);
28
52
  */
29
53
  export declare function calculate(payload: CommonRequest): Promise<EmissionResponse | EmissionResponseWithDetails>;
@@ -42,6 +42,9 @@ export declare function retrieveFactor(payload: FactorRequest): Promise<FactorRe
42
42
  * @return {Promise<SearchResponse>} A promise that resolves to the search results returned by the API
43
43
  * @throws {Error} May throw an error if the API request fails
44
44
  *
45
+ * The API applies cross-encoder reranking by default. Set `enableReranker` to
46
+ * `false` to keep semantic similarity ordering without reranking.
47
+ *
45
48
  * @example
46
49
  * // Basic search
47
50
  * const searchRequest = {
@@ -58,6 +61,22 @@ export declare function retrieveFactor(payload: FactorRequest): Promise<FactorRe
58
61
  * const results = await search(searchRequest);
59
62
  *
60
63
  * @example
64
+ * // Search without cross-encoder reranking
65
+ * const searchWithoutReranker = {
66
+ "time":{
67
+ "date": "2020-06-10"
68
+ },
69
+ "activity": {
70
+ "search" : "travel"
71
+ },
72
+ "location": {
73
+ "country": "USA"
74
+ },
75
+ "enableReranker": false
76
+ };
77
+ * const results = await search(searchWithoutReranker);
78
+ *
79
+ * @example
61
80
  * // Search with optional unit parameter
62
81
  * const searchWithUnit = {
63
82
  "time":{