emissions-api-sdk 1.0.11 → 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 (101) hide show
  1. package/README.md +157 -0
  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 +72 -1
  6. package/dist/api/PhysicalActivity.js +87 -0
  7. package/dist/api/RealEstate.js +23 -0
  8. package/dist/api/TypeRecommender.js +67 -2
  9. package/dist/coverage/clover.xml +154 -89
  10. package/dist/coverage/coverage-final.json +15 -9
  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 +216 -3
  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 +199 -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 +148 -4
  43. package/dist/coverage/lcov-report/test/mocks/index.html +64 -4
  44. package/dist/coverage/lcov-report/test/testUtils.ts.html +1 -1
  45. package/dist/coverage/lcov.info +254 -124
  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 +72 -1
  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 +67 -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 +48 -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/base-stemmer.js +476 -0
  66. package/docs/_static/english-stemmer.js +1066 -0
  67. package/docs/authentication.html +31 -5
  68. package/docs/client.html +3 -1
  69. package/docs/genindex.html +22 -2
  70. package/docs/getting_started.html +715 -82
  71. package/docs/index.html +35 -0
  72. package/docs/reference.html +412 -3
  73. package/docs/sdk.html +2 -0
  74. package/docs/search.html +2 -0
  75. package/docs/searchindex.js +1 -1
  76. package/docs/troubleshooting.html +75 -17
  77. package/package.json +7 -3
  78. package/sphinx-build/source/authentication.rst +26 -4
  79. package/sphinx-build/source/getting_started.rst +538 -74
  80. package/sphinx-build/source/index.rst +11 -0
  81. package/sphinx-build/source/reference.rst +26 -0
  82. package/sphinx-build/source/troubleshooting.rst +77 -12
  83. package/src/Constants.ts +3 -0
  84. package/src/api/AuditLog.ts +102 -0
  85. package/src/api/EconomicActivity.ts +24 -0
  86. package/src/api/Factor.ts +72 -1
  87. package/src/api/PhysicalActivity.ts +92 -0
  88. package/src/api/RealEstate.ts +23 -0
  89. package/src/api/TypeRecommender.ts +67 -2
  90. package/src/index.ts +7 -1
  91. package/src/interfaces/Api.ts +22 -6
  92. package/src/interfaces/common.ts +58 -0
  93. package/src/interfaces/response/AuditLogResponse.ts +47 -0
  94. package/src/interfaces/response/TypeRecommenderResponse.ts +2 -0
  95. package/test/apiTest.test.ts +59 -3
  96. package/test/auditLog.test.ts +216 -0
  97. package/test/mocks/AttributionRequest.ts +23 -0
  98. package/test/mocks/EconomicActivityAttributionRequest.ts +22 -0
  99. package/test/mocks/PhysicalActivityEVICRequest.ts +22 -0
  100. package/test/mocks/PhysicalActivityRequest.ts +23 -0
  101. package/test/mocks/SearchRequest.ts +48 -0
@@ -9,8 +9,9 @@ Before using the SDK, ensure you have:
9
9
 
10
10
  - **Node.js** installed
11
11
  - Active internet connection
12
- - Sign up for the preview waitlist `IBMid sign up <https://www.ibm.com/account/reg/us-en/signup?formid=urx-53659>`_ page.
13
- - API credentials (``apiKey``, ``tenantId``, ``orgId``), are available on the Emissions API `Overview Page <https://www-dev.supply-chain.ibm.com/envizi/emissions-api-home/overview?cuiURL=%2Femissions-api-home%2Foverview>`_ after sign up
12
+ - An IBMid account. Sign up at the `IBMid sign up <https://www.ibm.com/account/reg/us-en/signup?formid=urx-54311>`_ page.
13
+ - Access to the Emissions API service and the required credentials
14
+ - Read the `Introduction <https://developer.ibm.com/apis/catalog/ghgemissions--ibm-envizi-emissions-api/Introduction>`_ page for an overview of the Emissions API
14
15
 
15
16
 
16
17
  Installation
@@ -49,101 +50,78 @@ After installation, you can import the SDK in your project:
49
50
  Authentication
50
51
  --------------
51
52
 
52
- Initialize the client with your API credentials:
53
+ The SDK supports three authentication methods:
53
54
 
54
- The SDK provides two authentication methods:
55
+ - **Personal Access Token (PAT)**, recommended for most users
56
+ - **API key**, where the SDK retrieves and refreshes a bearer token
57
+ - **Pre-generated JWT token**, managed outside the SDK
55
58
 
56
- - Using an **API key** with following required Headers:
57
- - ``X-Api-Key``: Your API key
58
- - ``X-IBM-Client-Id``: saascore-{your-client-id}
59
- - ``accept``: application/json
59
+ Using Personal Access Token (PAT)
60
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60
61
 
61
- - Using a **Pre-generated token**
62
- - Token Generation Endpoint: https://api.ibm.com/saascore/run/authentication-retrieve/api-key
62
+ .. code-block:: javascript
63
63
 
64
- Using API Key (Recommended)
65
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
64
+ import { Client } from 'emissions-api-sdk';
65
+
66
+ await Client.getClient({
67
+ patToken: process.env.ENVIZI_PAT_TOKEN,
68
+ clientId: process.env.ENVIZI_CLIENT_ID
69
+ });
70
+
71
+ .. note::
72
+
73
+ When using a PAT token, do not provide ``orgId``.
74
+
75
+ Using API Key
76
+ ~~~~~~~~~~~~~
66
77
 
67
78
  .. code-block:: javascript
68
79
 
69
80
  import { Client } from 'emissions-api-sdk';
70
-
71
- async function initialize() {
72
- try {
73
- await Client.getClient({
74
- apiKey: "your-api-key",
75
- clientId: "your-client-id",
76
- orgId: "your-org-id"
77
- });
78
- console.log("Client initialized successfully");
79
- } catch (error) {
80
- console.error("Failed to initialize client:", error);
81
- }
82
- }
83
-
84
- initialize();
85
81
 
86
- Using Pre-generated Token
87
- ~~~~~~~~~~~~~~~~~~~~~~~~~
82
+ await Client.getClient({
83
+ apiKey: process.env.ENVIZI_API_KEY,
84
+ clientId: process.env.ENVIZI_CLIENT_ID,
85
+ orgId: process.env.ENVIZI_ORG_ID
86
+ });
88
87
 
89
- If you already have a token, you can use it directly:
88
+ Using Pre-generated JWT Token
89
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
90
90
 
91
91
  .. code-block:: javascript
92
92
 
93
93
  import { Client } from 'emissions-api-sdk';
94
94
 
95
- async function initialize() {
96
- try {
97
- await Client.getClient({
98
- token: "your-pre-generated-token",
99
- clientId: "your-client-id"
100
- });
101
- console.log("Client initialized successfully");
102
- } catch (error) {
103
- console.error("Failed to initialize client:", error);
104
- }
105
- }
106
-
107
- initialize();
95
+ await Client.getClient({
96
+ token: process.env.JWT_TOKEN,
97
+ clientId: process.env.ENVIZI_CLIENT_ID
98
+ });
108
99
 
109
100
  First API Call
110
101
  --------------
111
102
 
112
- After initializing the client, you can make your first API call. Here's an example of calculating location-based emissions:
103
+ After initializing the client, you can make your first API call. Here's a quick start example of calculating location-based emissions:
113
104
 
114
105
  .. code-block:: javascript
115
106
 
116
- import { Client, LocationEmission } from 'emissions-api-sdk';
117
-
118
- async function calculateEmissions() {
119
- try {
120
- // Initialize client
121
- await Client.getClient({
122
- apiKey: "your-api-key",
123
- clientId: "your-client-id",
124
- orgId: "your-org-id"
125
- });
126
-
127
- // Make API call
128
- const result = await LocationEmission.calculate({
129
- "location": {
130
- "country": "USA",
131
- "stateProvince": "california"
132
- },
133
- "activity": {
134
- "type": "electricity",
135
- "value": 1,
136
- "unit": "kWh"
137
- }
138
- });
139
-
140
- console.log("Emission calculation result:", result);
141
- } catch (error) {
142
- console.error("Error calculating emissions:", error);
107
+ import { Client, Location } from 'emissions-api-sdk';
108
+
109
+ await Client.getClient({
110
+ patToken: process.env.ENVIZI_PAT_TOKEN,
111
+ clientId: process.env.ENVIZI_CLIENT_ID
112
+ });
113
+
114
+ const result = await Location.calculate({
115
+ "location": {
116
+ "country": "USA",
117
+ "stateProvince": "california"
118
+ },
119
+ "activity": {
120
+ "type": "electricity",
121
+ "value": 1,
122
+ "unit": "kWh"
143
123
  }
144
- }
145
-
146
- calculateEmissions();
124
+ });
147
125
 
148
126
  Example Response
149
127
  ----------------
@@ -162,3 +140,489 @@ The API returns emission calculation results in JSON format. Here's an example r
162
140
  "unit": "kgCO2e",
163
141
  "description": "The electricity emissions factor used to calculate this result was obtained from the year 2022 Managed - eGRID & US Climate Leaders factor set for the area United States and the region California."
164
142
  }
143
+
144
+ Example Response with Details
145
+ ------------------------------
146
+
147
+ When you need more detailed information about the emission factors used in calculations, you can request the response to include the ``details`` object. This provides comprehensive information about the factor set and specific factor used:
148
+
149
+ .. code-block:: json
150
+
151
+ {
152
+ "transactionId": "29df5ecd-fc3b-4797-b6fd-da03bc007f30",
153
+ "totalCO2e": 5912000,
154
+ "CO2": 5840000,
155
+ "CH4": 2000.0000000000002,
156
+ "N2O": 70000,
157
+ "indirectCO2e": 1340000,
158
+ "unit": "kgCO2e",
159
+ "description": "The Freight - Cargo Ship - Bulk Carrier - 0-9999 dwt emissions factor used to calculate this result was obtained from the DEFRA factor set for the Global region year 2025.",
160
+ "details": {
161
+ "factorSet": {
162
+ "name": "DEFRA",
163
+ "description": "The UK Government and DEFRA publish GHG emission factors covering Scope 1, Scope 2, and selected Scope 3 sources. While primarily intended for UK-based reporting, many organizations apply these factors across European sites—especially for air travel-related emissions.",
164
+ "provider": "His Majesty's Government (United Kingdom of Great Britain and Northern Ireland): Department for Energy Security and Net Zero",
165
+ "sourceUrl": "https://www.gov.uk/government/publications/greenhouse-gas-reporting-conversion-factors-2024"
166
+ },
167
+ "factor": {
168
+ "name": "Bulk carrier - 0–9999 dwt - 2025",
169
+ "description": "Cargo ship - tonne.km",
170
+ "totalCO2e": 0.02956,
171
+ "CO2": 0.0292,
172
+ "CH4": 0.00001,
173
+ "N2O": 0.00035,
174
+ "indirectCO2e": 0.0067,
175
+ "inputUnit": "t-km",
176
+ "unit": "tonne.km",
177
+ "conversionRatio": "1:1",
178
+ "activityType": "Freight - Cargo Ship - Bulk Carrier - 0-9999 dwt",
179
+ "activitySubtype": "Default Factor",
180
+ "factorId": 190405,
181
+ "methodology": "activity-based",
182
+ "scopes": [
183
+ "3.4",
184
+ "3.9"
185
+ ],
186
+ "areaName": "Earth",
187
+ "areaType": "Planet",
188
+ "publishedFrom": "2025-01-01",
189
+ "source": "2025 Greenhouse Gas Reporting: Conversion Factors 2025 (DEFRA) provided by gov.uk, license - https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
190
+ }
191
+ }
192
+ }
193
+
194
+ Response Structure Details
195
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
196
+
197
+ The response includes the following key components:
198
+
199
+ **Top-level Fields:**
200
+
201
+ - ``transactionId``: Unique identifier for the calculation
202
+ - ``totalCO2e``: Total CO2 equivalent emissions
203
+ - ``CO2``: Carbon dioxide emissions
204
+ - ``CH4``: Methane emissions
205
+ - ``N2O``: Nitrous oxide emissions
206
+ - ``indirectCO2e``: Indirect CO2 equivalent emissions
207
+ - ``unit``: Unit of measurement (typically kgCO2e)
208
+ - ``description``: Human-readable description of the calculation
209
+
210
+ **Details Object (when requested):**
211
+
212
+ The ``details`` object provides comprehensive information about the emission factors:
213
+
214
+ *Factor Set Information:*
215
+
216
+ - ``name``: Name of the factor set (e.g., DEFRA, EPA)
217
+ - ``description``: Detailed description of the factor set
218
+ - ``provider``: Organization that provides the factor set
219
+ - ``sourceUrl``: URL to the source documentation
220
+
221
+ *Factor Information:*
222
+
223
+ - ``name``: Specific name of the emission factor
224
+ - ``description``: Description of the factor
225
+ - ``totalCO2e``, ``CO2``, ``CH4``, ``N2O``, ``indirectCO2e``: Emission values per unit
226
+ - ``inputUnit``: Unit for input values
227
+ - ``unit``: Unit of the factor
228
+ - ``conversionRatio``: Conversion ratio applied
229
+ - ``activityType``: Type of activity (e.g., transportation, energy)
230
+ - ``activitySubtype``: Subtype classification
231
+ - ``factorId``: Unique identifier for the factor
232
+ - ``methodology``: Calculation methodology used
233
+ - ``scopes``: Applicable GHG Protocol scopes
234
+ - ``areaName``: Geographic area name
235
+ - ``areaType``: Type of geographic area
236
+ - ``publishedFrom``: Date from which the factor is valid
237
+
238
+ Currency Conversion Support
239
+ ---------------------------
240
+
241
+ Overview
242
+ ~~~~~~~~
243
+
244
+ The SDK supports automatic currency conversion for API methods that accept monetary values. This feature allows you to input values in your preferred currency, and the system will automatically convert them to the appropriate base currency for emissions calculations.
245
+
246
+ **Supported Methods**
247
+
248
+ Currency conversion is available for the following calculation methods:
249
+
250
+ - ``EconomicActivity.calculate()``
251
+ - ``RealEstate.calculate()``
252
+ - ``PhysicalActivity.calculate()``
253
+
254
+ Supported Currencies
255
+ ~~~~~~~~~~~~~~~~~~~~
256
+
257
+ The SDK supports conversion for 170 currencies:
258
+
259
+ .. list-table::
260
+ :header-rows: 1
261
+ :widths: 60 40
262
+
263
+ * - Currency Name
264
+ - Symbol
265
+ * - ADB Unit of Account
266
+ - XUA
267
+ * - Afghani
268
+ - AFN
269
+ * - Algerian Dinar
270
+ - DZD
271
+ * - Arab Accounting Dinar
272
+ - XAD
273
+ * - Argentine Peso
274
+ - ARS
275
+ * - Armenian Dram
276
+ - AMD
277
+ * - Aruban Florin
278
+ - AWG
279
+ * - Australian Dollar
280
+ - AUD
281
+ * - Azerbaijan Manat
282
+ - AZN
283
+ * - Bahamian Dollar
284
+ - BSD
285
+ * - Bahraini Dinar
286
+ - BHD
287
+ * - Baht
288
+ - THB
289
+ * - Balboa
290
+ - PAB
291
+ * - Barbados Dollar
292
+ - BBD
293
+ * - Belarusian Ruble
294
+ - BYN
295
+ * - Belize Dollar
296
+ - BZD
297
+ * - Bermudian Dollar
298
+ - BMD
299
+ * - Boliviano
300
+ - BOB
301
+ * - Bolívar Soberano
302
+ - VED
303
+ * - Bolívar Soberano
304
+ - VES
305
+ * - Brazilian Real
306
+ - BRL
307
+ * - Brunei Dollar
308
+ - BND
309
+ * - Bulgarian Lev
310
+ - BGN
311
+ * - Burundi Franc
312
+ - BIF
313
+ * - Cabo Verde Escudo
314
+ - CVE
315
+ * - Canadian Dollar
316
+ - CAD
317
+ * - Caribbean Guilder
318
+ - XCG
319
+ * - Cayman Islands Dollar
320
+ - KYD
321
+ * - CFA Franc BCEAO
322
+ - XOF
323
+ * - CFA Franc BEAC
324
+ - XAF
325
+ * - CFP Franc
326
+ - XPF
327
+ * - Chilean Peso
328
+ - CLP
329
+ * - Colombian Peso
330
+ - COP
331
+ * - Comorian Franc
332
+ - KMF
333
+ * - Congolese Franc
334
+ - CDF
335
+ * - Convertible Mark
336
+ - BAM
337
+ * - Cordoba Oro
338
+ - NIO
339
+ * - Costa Rican Colon
340
+ - CRC
341
+ * - Cuban Peso
342
+ - CUP
343
+ * - Czech Koruna
344
+ - CZK
345
+ * - Dalasi
346
+ - GMD
347
+ * - Danish Krone
348
+ - DKK
349
+ * - Denar
350
+ - MKD
351
+ * - Djibouti Franc
352
+ - DJF
353
+ * - Dobra
354
+ - STN
355
+ * - Dominican Peso
356
+ - DOP
357
+ * - Dong
358
+ - VND
359
+ * - East Caribbean Dollar
360
+ - XCD
361
+ * - Egyptian Pound
362
+ - EGP
363
+ * - El Salvador Colon
364
+ - SVC
365
+ * - Ethiopian Birr
366
+ - ETB
367
+ * - Euro
368
+ - EUR
369
+ * - Falkland Islands Pound
370
+ - FKP
371
+ * - Fiji Dollar
372
+ - FJD
373
+ * - Forint
374
+ - HUF
375
+ * - Ghana Cedi
376
+ - GHS
377
+ * - Gibraltar Pound
378
+ - GIP
379
+ * - Gourde
380
+ - HTG
381
+ * - Guarani
382
+ - PYG
383
+ * - Guinean Franc
384
+ - GNF
385
+ * - Guyana Dollar
386
+ - GYD
387
+ * - Hong Kong Dollar
388
+ - HKD
389
+ * - Hryvnia
390
+ - UAH
391
+ * - Iceland Krona
392
+ - ISK
393
+ * - Indian Rupee
394
+ - INR
395
+ * - Iranian Rial
396
+ - IRR
397
+ * - Iraqi Dinar
398
+ - IQD
399
+ * - Jamaican Dollar
400
+ - JMD
401
+ * - Jordanian Dinar
402
+ - JOD
403
+ * - Kenyan Shilling
404
+ - KES
405
+ * - Kina
406
+ - PGK
407
+ * - Kuwaiti Dinar
408
+ - KWD
409
+ * - Kwanza
410
+ - AOA
411
+ * - Kyat
412
+ - MMK
413
+ * - Lao Kip
414
+ - LAK
415
+ * - Lari
416
+ - GEL
417
+ * - Lebanese Pound
418
+ - LBP
419
+ * - Lek
420
+ - ALL
421
+ * - Lempira
422
+ - HNL
423
+ * - Leone
424
+ - SLE
425
+ * - Liberian Dollar
426
+ - LRD
427
+ * - Libyan Dinar
428
+ - LYD
429
+ * - Lilangeni
430
+ - SZL
431
+ * - Loti
432
+ - LSL
433
+ * - Malagasy Ariary
434
+ - MGA
435
+ * - Malawi Kwacha
436
+ - MWK
437
+ * - Malaysian Ringgit
438
+ - MYR
439
+ * - Mauritius Rupee
440
+ - MUR
441
+ * - Mexican Peso
442
+ - MXN
443
+ * - Mexican Unidad de Inversion (UDI)
444
+ - MXV
445
+ * - Moldovan Leu
446
+ - MDL
447
+ * - Moroccan Dirham
448
+ - MAD
449
+ * - Mozambique Metical
450
+ - MZN
451
+ * - Mvdol
452
+ - BOV
453
+ * - Naira
454
+ - NGN
455
+ * - Nakfa
456
+ - ERN
457
+ * - Namibia Dollar
458
+ - NAD
459
+ * - Nepalese Rupee
460
+ - NPR
461
+ * - Netherlands Antillean Guilder
462
+ - ANG
463
+ * - New Israeli Sheqel
464
+ - ILS
465
+ * - New Taiwan Dollar
466
+ - TWD
467
+ * - New Zealand Dollar
468
+ - NZD
469
+ * - Ngultrum
470
+ - BTN
471
+ * - North Korean Won
472
+ - KPW
473
+ * - Norwegian Krone
474
+ - NOK
475
+ * - Ouguiya
476
+ - MRU
477
+ * - Pa'anga
478
+ - TOP
479
+ * - Pakistan Rupee
480
+ - PKR
481
+ * - Pataca
482
+ - MOP
483
+ * - Peso Uruguayo
484
+ - UYU
485
+ * - Philippine Peso
486
+ - PHP
487
+ * - Pound Sterling
488
+ - GBP
489
+ * - Pula
490
+ - BWP
491
+ * - Qatari Rial
492
+ - QAR
493
+ * - Quetzal
494
+ - GTQ
495
+ * - Rand
496
+ - ZAR
497
+ * - Rial Omani
498
+ - OMR
499
+ * - Riel
500
+ - KHR
501
+ * - Romanian Leu
502
+ - RON
503
+ * - Rufiyaa
504
+ - MVR
505
+ * - Rupiah
506
+ - IDR
507
+ * - Russian Ruble
508
+ - RUB
509
+ * - Rwanda Franc
510
+ - RWF
511
+ * - Saint Helena Pound
512
+ - SHP
513
+ * - Saudi Riyal
514
+ - SAR
515
+ * - SDR (Special Drawing Right)
516
+ - XDR
517
+ * - Serbian Dinar
518
+ - RSD
519
+ * - Seychelles Rupee
520
+ - SCR
521
+ * - Singapore Dollar
522
+ - SGD
523
+ * - Sol
524
+ - PEN
525
+ * - Solomon Islands Dollar
526
+ - SBD
527
+ * - Som
528
+ - KGS
529
+ * - Somali Shilling
530
+ - SOS
531
+ * - Somoni
532
+ - TJS
533
+ * - South Sudanese Pound
534
+ - SSP
535
+ * - Sri Lanka Rupee
536
+ - LKR
537
+ * - Sucre
538
+ - XSU
539
+ * - Sudanese Pound
540
+ - SDG
541
+ * - Surinam Dollar
542
+ - SRD
543
+ * - Swedish Krona
544
+ - SEK
545
+ * - Swiss Franc
546
+ - CHF
547
+ * - Syrian Pound
548
+ - SYP
549
+ * - Taka
550
+ - BDT
551
+ * - Tala
552
+ - WST
553
+ * - Tanzanian Shilling
554
+ - TZS
555
+ * - Tenge
556
+ - KZT
557
+ * - Trinidad and Tobago Dollar
558
+ - TTD
559
+ * - Tugrik
560
+ - MNT
561
+ * - Tunisian Dinar
562
+ - TND
563
+ * - Turkish Lira
564
+ - TRY
565
+ * - Turkmenistan New Manat
566
+ - TMT
567
+ * - UAE Dirham
568
+ - AED
569
+ * - Uganda Shilling
570
+ - UGX
571
+ * - Unidad de Fomento
572
+ - CLF
573
+ * - Unidad de Valor Real
574
+ - COU
575
+ * - Unidad Previsional
576
+ - UYW
577
+ * - United States dollar
578
+ - USD
579
+ * - Uruguay Peso en Unidades Indexadas (UI)
580
+ - UYI
581
+ * - US Dollar (Next day)
582
+ - USN
583
+ * - Uzbekistan Sum
584
+ - UZS
585
+ * - Vatu
586
+ - VUV
587
+ * - WIR Euro
588
+ - CHE
589
+ * - WIR Franc
590
+ - CHW
591
+ * - Won
592
+ - KRW
593
+ * - Yemeni Rial
594
+ - YER
595
+ * - Yen
596
+ - JPY
597
+ * - Yuan Renminbi
598
+ - CNY
599
+ * - Zambian Kwacha
600
+ - ZMW
601
+ * - Zimbabwe Gold
602
+ - ZWG
603
+ * - Zloty
604
+ - PLN
605
+
606
+ Exchange Rate Data
607
+ ~~~~~~~~~~~~~~~~~~
608
+
609
+ **Data Source**
610
+
611
+ Exchange rates are sourced from the U.S. Department of the Treasury's Fiscal Data API, which provides official exchange rates used by the U.S. government for accounting and reporting purposes.
612
+
613
+ - **API Source**: https://api.fiscaldata.treasury.gov/services/api/fiscal_service
614
+ - **Data Provider**: U.S. Department of the Treasury, Bureau of the Fiscal Service
615
+
616
+ **Historical Coverage**
617
+
618
+ Exchange rate data is available from **March 31, 2001** onwards. If you specify a date earlier than this, the system will use the earliest available rate.
619
+
620
+ **Data Updates**
621
+
622
+ The exchange rate database is automatically synchronized with the Treasury API to ensure you always have access to the most current rates. Updates are captured as soon as they become available from the Treasury.
623
+
624
+ - **Update Frequency**: The U.S. Treasury typically publishes exchange rates on a **quarterly basis**
625
+ - **Amendment Policy**: If current rates deviate from the published rates by 10% or more, Treasury will issue amendments to the quarterly report
626
+
627
+
628
+ - ``source``: Source citation and license information
@@ -7,6 +7,8 @@ IBM Envizi - Emissions API Node.js SDK
7
7
 
8
8
  getting_started
9
9
  sdk
10
+ authentication
11
+ client
10
12
  reference
11
13
  troubleshooting
12
14
 
@@ -30,3 +32,12 @@ Supported Emission Types
30
32
  * **Generic** – custom emission calculations
31
33
 
32
34
  The SDK is designed for embedding emission calculations in applications, building sustainability dashboards, automating large-scale datasets, and tracking carbon footprints.
35
+
36
+ Additional capabilities
37
+ -----------------------
38
+
39
+ * **Metadata API** – query supported types, areas, and units across endpoints
40
+ * **Type Recommender API** – semantic search to identify likely activity types, with optional reranker control and scope in results
41
+ * **Factor Search API** – search for emission factors with unit and scope filtering, with optional reranker control
42
+ * **Usage API** – retrieve organization billing-period or historical usage
43
+ * **Audit Log API** – manage whether API requests and responses are stored for auditing
@@ -15,6 +15,8 @@ API
15
15
 
16
16
  .. js:autofunction:: Factor.retrieveFactor
17
17
 
18
+ .. js:autofunction:: Factor.search
19
+
18
20
  .. js:autofunction:: Fugitive.calculate
19
21
 
20
22
  .. js:autofunction:: Calculation.calculate
@@ -31,6 +33,22 @@ API
31
33
 
32
34
  .. js:autofunction:: EconomicActivity.calculate
33
35
 
36
+ Type Recommender API
37
+ ====================
38
+
39
+ .. js:autofunction:: TypeRecommender.search
40
+
41
+
42
+ Audit Log API
43
+ =============
44
+
45
+ Controls whether the organization's API requests and responses are stored for auditing.
46
+ Organizations can disable storage if they don't need their API calls to be audited.
47
+
48
+ .. js:autofunction:: AuditLog.getAuditConfig
49
+
50
+ .. js:autofunction:: AuditLog.updateAuditConfig
51
+
34
52
 
35
53
  Global Metadata API
36
54
  ====================
@@ -113,3 +131,11 @@ Interfaces
113
131
  .. js:autoclass:: Config.RequestConfig
114
132
 
115
133
  .. js:autoclass:: Config.ClientConfig
134
+
135
+ .. js:autoclass:: AuditLogResponse.AuditLogResponse
136
+
137
+ .. js:autoclass:: AuditLogResponse.AuditLogRequest
138
+
139
+ .. js:autoclass:: TypeRecommenderResponse.TypeRecommenderResponse
140
+
141
+ .. js:autoclass:: TypeRecommenderResponse.ActivityRequest