emissions-api-sdk 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/Constants.js +9 -1
  2. package/dist/api/EconomicActivity.js +100 -0
  3. package/dist/api/RealEstate.js +101 -0
  4. package/dist/coverage/clover.xml +87 -35
  5. package/dist/coverage/coverage-final.json +5 -3
  6. package/dist/coverage/lcov-report/index.html +15 -15
  7. package/dist/coverage/lcov-report/src/Client.ts.html +23 -23
  8. package/dist/coverage/lcov-report/src/Constants.ts.html +28 -4
  9. package/dist/coverage/lcov-report/src/api/Calculation.ts.html +1 -1
  10. package/dist/coverage/lcov-report/src/api/EconomicActivity.ts.html +427 -0
  11. package/dist/coverage/lcov-report/src/api/Factor.ts.html +1 -1
  12. package/dist/coverage/lcov-report/src/api/FactorSets.ts.html +1 -1
  13. package/dist/coverage/lcov-report/src/api/Fugitive.ts.html +1 -1
  14. package/dist/coverage/lcov-report/src/api/Location.ts.html +1 -1
  15. package/dist/coverage/lcov-report/src/api/Mobile.ts.html +1 -1
  16. package/dist/coverage/lcov-report/src/api/RealEstate.ts.html +430 -0
  17. package/dist/coverage/lcov-report/src/api/Stationary.ts.html +1 -1
  18. package/dist/coverage/lcov-report/src/api/TransportationAndDistribution.ts.html +1 -1
  19. package/dist/coverage/lcov-report/src/api/Usage.ts.html +1 -1
  20. package/dist/coverage/lcov-report/src/api/index.html +34 -4
  21. package/dist/coverage/lcov-report/src/index.html +7 -7
  22. package/dist/coverage/lcov-report/src/request.ts.html +1 -1
  23. package/dist/coverage/lcov-report/src/utils.ts.html +5 -5
  24. package/dist/coverage/lcov-report/test/index.html +1 -1
  25. package/dist/coverage/lcov-report/test/mocks/CommonRequest.ts.html +1 -1
  26. package/dist/coverage/lcov-report/test/mocks/FactorRequest.ts.html +1 -1
  27. package/dist/coverage/lcov-report/test/mocks/GenericCalculationRequest.ts.html +1 -1
  28. package/dist/coverage/lcov-report/test/mocks/LocationRequest.ts.html +1 -1
  29. package/dist/coverage/lcov-report/test/mocks/SearchRequest.ts.html +1 -1
  30. package/dist/coverage/lcov-report/test/mocks/index.html +1 -1
  31. package/dist/coverage/lcov-report/test/testUtils.ts.html +1 -1
  32. package/dist/coverage/lcov.info +137 -57
  33. package/dist/index.js +3 -1
  34. package/dist/types/Constants.d.ts +8 -0
  35. package/dist/types/api/EconomicActivity.d.ts +67 -0
  36. package/dist/types/api/RealEstate.d.ts +68 -0
  37. package/dist/types/index.d.ts +2 -0
  38. package/dist/types/interfaces/response/FactorResponse.d.ts +0 -4
  39. package/docs/_sources/index.rst.txt +8 -6
  40. package/docs/_sources/reference.rst.txt +16 -0
  41. package/docs/genindex.html +29 -1
  42. package/docs/index.html +2 -0
  43. package/docs/objects.inv +0 -0
  44. package/docs/reference.html +194 -0
  45. package/docs/searchindex.js +1 -1
  46. package/package.json +5 -2
  47. package/sphinx-build/.secrets.baseline +150 -0
  48. package/sphinx-build/source/index.rst +8 -6
  49. package/sphinx-build/source/reference.rst +16 -0
  50. package/src/Constants.ts +8 -0
  51. package/src/api/EconomicActivity.ts +115 -0
  52. package/src/api/RealEstate.ts +116 -0
  53. package/src/index.ts +2 -0
  54. package/src/interfaces/response/FactorResponse.ts +0 -7
  55. package/test/apiTest.test.ts +63 -1
@@ -118,7 +118,7 @@ export default FactorPayload;
118
118
  <div class='footer quiet pad2 space-top1 center small'>
119
119
  Code coverage generated by
120
120
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
121
- at 2026-01-23T09:26:49.327Z
121
+ at 2026-02-17T12:36:50.828Z
122
122
  </div>
123
123
  <script src="../../prettify.js"></script>
124
124
  <script>
@@ -127,7 +127,7 @@ export default GenericCalculationPayload;
127
127
  <div class='footer quiet pad2 space-top1 center small'>
128
128
  Code coverage generated by
129
129
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
130
- at 2026-01-23T09:26:49.327Z
130
+ at 2026-02-17T12:36:50.828Z
131
131
  </div>
132
132
  <script src="../../prettify.js"></script>
133
133
  <script>
@@ -124,7 +124,7 @@ export default locationPayload;</pre></td></tr></table></pre>
124
124
  <div class='footer quiet pad2 space-top1 center small'>
125
125
  Code coverage generated by
126
126
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
127
- at 2026-01-23T09:26:49.327Z
127
+ at 2026-02-17T12:36:50.828Z
128
128
  </div>
129
129
  <script src="../../prettify.js"></script>
130
130
  <script>
@@ -127,7 +127,7 @@ export default SearchPayload;
127
127
  <div class='footer quiet pad2 space-top1 center small'>
128
128
  Code coverage generated by
129
129
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
130
- at 2026-01-23T09:26:49.327Z
130
+ at 2026-02-17T12:36:50.828Z
131
131
  </div>
132
132
  <script src="../../prettify.js"></script>
133
133
  <script>
@@ -161,7 +161,7 @@
161
161
  <div class='footer quiet pad2 space-top1 center small'>
162
162
  Code coverage generated by
163
163
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
164
- at 2026-01-23T09:26:49.327Z
164
+ at 2026-02-17T12:36:50.828Z
165
165
  </div>
166
166
  <script src="../../prettify.js"></script>
167
167
  <script>
@@ -82,7 +82,7 @@
82
82
  <div class='footer quiet pad2 space-top1 center small'>
83
83
  Code coverage generated by
84
84
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
85
- at 2026-01-23T09:26:49.327Z
85
+ at 2026-02-17T12:36:50.828Z
86
86
  </div>
87
87
  <script src="../prettify.js"></script>
88
88
  <script>
@@ -11,10 +11,10 @@ FN:214,(anonymous_8)
11
11
  FN:236,(anonymous_9)
12
12
  FNF:9
13
13
  FNH:7
14
- FNDA:38,(anonymous_1)
15
- FNDA:41,(anonymous_2)
16
- FNDA:68,(anonymous_3)
17
- FNDA:73,(anonymous_4)
14
+ FNDA:46,(anonymous_1)
15
+ FNDA:49,(anonymous_2)
16
+ FNDA:84,(anonymous_3)
17
+ FNDA:89,(anonymous_4)
18
18
  FNDA:3,(anonymous_5)
19
19
  FNDA:2,(anonymous_6)
20
20
  FNDA:0,(anonymous_7)
@@ -25,36 +25,36 @@ DA:3,4
25
25
  DA:4,4
26
26
  DA:6,4
27
27
  DA:7,4
28
- DA:24,38
29
- DA:25,38
30
- DA:26,38
31
- DA:27,38
28
+ DA:24,46
29
+ DA:25,46
30
+ DA:26,46
31
+ DA:27,46
32
32
  DA:28,1
33
33
  DA:29,1
34
- DA:31,37
35
- DA:32,37
36
- DA:35,38
37
- DA:36,38
38
- DA:37,38
39
- DA:38,38
40
- DA:39,38
41
- DA:40,38
42
- DA:78,41
34
+ DA:31,45
35
+ DA:32,45
36
+ DA:35,46
37
+ DA:36,46
38
+ DA:37,46
39
+ DA:38,46
40
+ DA:39,46
41
+ DA:40,46
42
+ DA:78,49
43
43
  DA:79,1
44
- DA:83,40
44
+ DA:83,48
45
45
  DA:84,1
46
- DA:88,39
46
+ DA:88,47
47
47
  DA:89,1
48
- DA:94,38
49
- DA:96,38
48
+ DA:94,46
49
+ DA:96,46
50
50
  DA:97,1
51
51
  DA:98,1
52
- DA:99,37
53
- DA:100,38
54
- DA:114,68
55
- DA:136,73
52
+ DA:99,45
53
+ DA:100,46
54
+ DA:114,84
55
+ DA:136,89
56
56
  DA:137,1
57
- DA:141,72
57
+ DA:141,88
58
58
  DA:157,3
59
59
  DA:158,2
60
60
  DA:159,2
@@ -74,38 +74,38 @@ LH:47
74
74
  BRDA:22,0,0,0
75
75
  BRDA:24,1,0,1
76
76
  BRDA:24,2,0,1
77
- BRDA:24,3,0,38
77
+ BRDA:24,3,0,46
78
78
  BRDA:27,4,0,1
79
- BRDA:27,4,1,37
79
+ BRDA:27,4,1,45
80
80
  BRDA:37,5,0,0
81
- BRDA:37,5,1,38
82
- BRDA:37,6,0,38
83
- BRDA:37,6,1,38
81
+ BRDA:37,5,1,46
82
+ BRDA:37,6,0,46
83
+ BRDA:37,6,1,46
84
84
  BRDA:38,7,0,0
85
- BRDA:38,7,1,38
86
- BRDA:38,8,0,38
87
- BRDA:38,8,1,38
85
+ BRDA:38,7,1,46
86
+ BRDA:38,8,0,46
87
+ BRDA:38,8,1,46
88
88
  BRDA:40,9,0,0
89
- BRDA:40,9,1,38
89
+ BRDA:40,9,1,46
90
90
  BRDA:78,10,0,1
91
- BRDA:78,10,1,40
92
- BRDA:78,11,0,41
91
+ BRDA:78,10,1,48
92
+ BRDA:78,11,0,49
93
93
  BRDA:78,11,1,1
94
94
  BRDA:83,12,0,1
95
- BRDA:83,12,1,39
96
- BRDA:83,13,0,40
95
+ BRDA:83,12,1,47
96
+ BRDA:83,13,0,48
97
97
  BRDA:83,13,1,2
98
98
  BRDA:88,14,0,1
99
- BRDA:88,14,1,38
100
- BRDA:88,15,0,39
101
- BRDA:88,15,1,38
102
- BRDA:88,15,2,37
99
+ BRDA:88,14,1,46
100
+ BRDA:88,15,0,47
101
+ BRDA:88,15,1,46
102
+ BRDA:88,15,2,45
103
103
  BRDA:96,16,0,1
104
- BRDA:96,16,1,37
105
- BRDA:96,17,0,38
104
+ BRDA:96,16,1,45
105
+ BRDA:96,17,0,46
106
106
  BRDA:96,17,1,1
107
107
  BRDA:136,18,0,1
108
- BRDA:136,18,1,72
108
+ BRDA:136,18,1,88
109
109
  BRDA:157,19,0,2
110
110
  BRDA:157,19,1,1
111
111
  BRDA:159,20,0,1
@@ -134,36 +134,44 @@ DA:8,4
134
134
  DA:9,4
135
135
  DA:10,4
136
136
  DA:11,4
137
+ DA:12,4
137
138
  DA:13,4
138
- DA:14,4
139
139
  DA:15,4
140
140
  DA:16,4
141
141
  DA:17,4
142
142
  DA:18,4
143
143
  DA:19,4
144
+ DA:20,4
144
145
  DA:21,4
145
146
  DA:22,4
146
147
  DA:23,4
147
- DA:24,4
148
148
  DA:25,4
149
149
  DA:26,4
150
150
  DA:27,4
151
151
  DA:28,4
152
+ DA:29,4
152
153
  DA:30,4
153
154
  DA:31,4
154
155
  DA:32,4
155
156
  DA:33,4
156
157
  DA:34,4
157
- DA:35,4
158
158
  DA:36,4
159
+ DA:37,4
159
160
  DA:38,4
161
+ DA:39,4
160
162
  DA:40,4
161
163
  DA:41,4
162
164
  DA:42,4
163
165
  DA:43,4
164
166
  DA:44,4
165
- LF:39
166
- LH:39
167
+ DA:46,4
168
+ DA:48,4
169
+ DA:49,4
170
+ DA:50,4
171
+ DA:51,4
172
+ DA:52,4
173
+ LF:47
174
+ LH:47
167
175
  BRF:0
168
176
  BRH:0
169
177
  end_of_record
@@ -192,16 +200,16 @@ SF:src/utils.ts
192
200
  FN:14,findExpiryTime
193
201
  FNF:1
194
202
  FNH:1
195
- FNDA:36,findExpiryTime
203
+ FNDA:44,findExpiryTime
196
204
  DA:14,4
197
- DA:15,36
198
- DA:16,36
199
- DA:17,36
200
- DA:18,36
205
+ DA:15,44
206
+ DA:16,44
207
+ DA:17,44
208
+ DA:18,44
201
209
  LF:5
202
210
  LH:5
203
211
  BRDA:17,0,0,0
204
- BRDA:17,0,1,36
212
+ BRDA:17,0,1,44
205
213
  BRF:2
206
214
  BRH:1
207
215
  end_of_record
@@ -242,6 +250,42 @@ BRF:0
242
250
  BRH:0
243
251
  end_of_record
244
252
  TN:
253
+ SF:src/api/EconomicActivity.ts
254
+ FN:37,calculate
255
+ FN:60,getTypes
256
+ FN:81,getArea
257
+ FN:104,getUnits
258
+ FNF:4
259
+ FNH:4
260
+ FNDA:1,calculate
261
+ FNDA:1,getTypes
262
+ FNDA:1,getArea
263
+ FNDA:1,getUnits
264
+ DA:1,1
265
+ DA:2,1
266
+ DA:9,1
267
+ DA:37,1
268
+ DA:40,1
269
+ DA:41,1
270
+ DA:43,1
271
+ DA:60,1
272
+ DA:62,1
273
+ DA:63,1
274
+ DA:65,1
275
+ DA:81,1
276
+ DA:83,1
277
+ DA:84,1
278
+ DA:86,1
279
+ DA:104,1
280
+ DA:107,1
281
+ DA:108,1
282
+ DA:110,1
283
+ LF:19
284
+ LH:19
285
+ BRF:0
286
+ BRH:0
287
+ end_of_record
288
+ TN:
245
289
  SF:src/api/Factor.ts
246
290
  FN:44,retrieveFactor
247
291
  FN:79,search
@@ -416,6 +460,42 @@ BRF:0
416
460
  BRH:0
417
461
  end_of_record
418
462
  TN:
463
+ SF:src/api/RealEstate.ts
464
+ FN:37,calculate
465
+ FN:60,getTypes
466
+ FN:81,getArea
467
+ FN:105,getUnits
468
+ FNF:4
469
+ FNH:4
470
+ FNDA:1,calculate
471
+ FNDA:1,getTypes
472
+ FNDA:1,getArea
473
+ FNDA:1,getUnits
474
+ DA:1,1
475
+ DA:2,1
476
+ DA:9,1
477
+ DA:37,1
478
+ DA:40,1
479
+ DA:41,1
480
+ DA:43,1
481
+ DA:60,1
482
+ DA:62,1
483
+ DA:63,1
484
+ DA:65,1
485
+ DA:81,1
486
+ DA:83,1
487
+ DA:84,1
488
+ DA:86,1
489
+ DA:105,1
490
+ DA:108,1
491
+ DA:109,1
492
+ DA:111,1
493
+ LF:19
494
+ LH:19
495
+ BRF:0
496
+ BRH:0
497
+ end_of_record
498
+ TN:
419
499
  SF:src/api/Stationary.ts
420
500
  FN:39,calculate
421
501
  FN:62,getTypes
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.FactorSets = exports.Factor = exports.Usage = exports.TransportationAndDistribution = exports.Calculation = exports.Stationary = exports.Mobile = exports.Fugitive = exports.Location = exports.Client = void 0;
36
+ 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"));
@@ -45,3 +45,5 @@ exports.TransportationAndDistribution = __importStar(require("./api/Transportati
45
45
  exports.Usage = __importStar(require("./api/Usage"));
46
46
  exports.Factor = __importStar(require("./api/Factor"));
47
47
  exports.FactorSets = __importStar(require("./api/FactorSets"));
48
+ exports.EconomicActivity = __importStar(require("./api/EconomicActivity"));
49
+ exports.RealEstate = __importStar(require("./api/RealEstate"));
@@ -9,6 +9,8 @@ export declare const TRANSPORTATION_AND_DISTRIBUTION_API_PATH = "/v3/carbon/tran
9
9
  export declare const FACTOR_API_PATH = "/v3/carbon/factor";
10
10
  export declare const FACTOR_SET_API_PATH = "/v3/carbon/factorset";
11
11
  export declare const SEARCH_API_PATH = "/v3/carbon/factor/search";
12
+ export declare const ECONOMIC_ACTIVITY_API_PATH = "/v3/carbon/economic-activity";
13
+ export declare const REAL_ESTATE_API_PATH = "/v3/carbon/real-estate";
12
14
  export declare const CALCULATION_TYPES = "/v3/carbon/calculation/types";
13
15
  export declare const LOCATION_TYPES = "/v3/carbon/location/types";
14
16
  export declare const FUGITIVE_API_TYPES = "/v3/carbon/fugitive/types";
@@ -16,6 +18,8 @@ export declare const MOBILE_API_TYPES = "/v3/carbon/mobile/types";
16
18
  export declare const STATIONARY_API_TYPES = "/v3/carbon/stationary/types";
17
19
  export declare const FACTOR_API_TYPES = "/v3/carbon/factor/types";
18
20
  export declare const TRANSPORTATION_AND_DISTRIBUTION_API_TYPES = "/v3/carbon/transportation-and-distribution/types";
21
+ export declare const REAL_ESTATE_API_TYPES = "/v3/carbon/real-estate/types";
22
+ export declare const ECONOMIC_ACTIVITY_API_TYPES = "/v3/carbon/economic-activity/types";
19
23
  export declare const FUGITIVE_API_AREA = "/v3/carbon/fugitive/area";
20
24
  export declare const GENERAL_API_AREA = "/v3/carbon/calculation/area";
21
25
  export declare const LOCATION_API_AREA = "/v3/carbon/location/area";
@@ -24,6 +28,8 @@ export declare const STATIONARY_API_AREA = "/v3/carbon/stationary/area";
24
28
  export declare const TRANSPORTATION_AND_DISTRIBUTION_API_AREA = "/v3/carbon/transportation-and-distribution/area";
25
29
  export declare const SEARCH_API_AREA = "/v3/carbon/factor/search/area";
26
30
  export declare const FACTOR_API_AREA = "/v3/carbon/factor/area";
31
+ export declare const REAL_ESTATE_API_AREA = "/v3/carbon/real-estate/area";
32
+ export declare const ECONOMIC_ACTIVITY_API_AREA = "/v3/carbon/economic-activity/area";
27
33
  export declare const FUGITIVE_API_UNITS = "/v3/carbon/fugitive/units";
28
34
  export declare const LOCATION_API_UNITS = "/v3/carbon/location/units";
29
35
  export declare const MOBILE_API_UNITS = "/v3/carbon/mobile/units";
@@ -31,6 +37,8 @@ export declare const STATIONARY_API_UNITS = "/v3/carbon/stationary/units";
31
37
  export declare const GENERAL_API_UNITS = "/v3/carbon/calculation/units";
32
38
  export declare const FACTOR_API_UNITS = "/v3/carbon/factor/units";
33
39
  export declare const TRANSPORTATION_AND_DISTRIBUTION_API_UNITS = "/v3/carbon/transportation-and-distribution/units";
40
+ export declare const REAL_ESTATE_API_UNITS = "/v3/carbon/real-estate/units";
41
+ export declare const ECONOMIC_ACTIVITY_API_UNITS = "/v3/carbon/economic-activity/units";
34
42
  export declare const USAGE_API = "/v3/carbon/usage";
35
43
  export declare const GET = "GET";
36
44
  export declare const POST = "POST";
@@ -0,0 +1,67 @@
1
+ import { CommonRequest } from "../interfaces/Api";
2
+ import { AreaResponse } from "../interfaces/response/AreaResponse";
3
+ import { EmissionResponse } from "../interfaces/response/EmissionResponse";
4
+ import { EmissionResponseWithDetails } from "../interfaces/response/EmissionResponseWithDetails";
5
+ import { TypeResponse } from "../interfaces/response/TypeResponse";
6
+ import { UnitResponse } from "../interfaces/response/UnitResponse";
7
+ /**
8
+ * Performs scope 3 Spend based emission calculations by making a POST request to the economic activity API endpoint.
9
+ *
10
+ * @export
11
+ * @param {CommonRequest} payload - The request data to be sent to the API
12
+ * @return {Promise<EmissionResponse | EmissionResponseWithDetails>} A promise that resolves to the emission calculation result. Returns EmissionResponseWithDetails if includeDetails is true, otherwise EmissionResponse
13
+ * @throws {Error} May throw an error if the API request fails
14
+ *
15
+ * @example
16
+ * const request = {
17
+ "time": {
18
+ "date": "2025-01-04"
19
+ },
20
+ "location": {
21
+ "country": "usa"
22
+ },
23
+ "activity": {
24
+ "type": "accomodation",
25
+ "value": 1500.12,
26
+ "unit": "usd"
27
+ },
28
+ "includeDetails": false
29
+ };
30
+ * const result = await calculate(request);
31
+ */
32
+ export declare function calculate(payload: CommonRequest): Promise<EmissionResponse | EmissionResponseWithDetails>;
33
+ /**
34
+ * Retrieves available economic activity emission calculation types by making a GET request to the API endpoint.
35
+ *
36
+ * @export
37
+ * @return {Promise<TypeResponse>} A promise that resolves to a TypeResponse containing the available economic activity emission types
38
+ * @throws {Error} May throw an error if the API request fails
39
+ *
40
+ * @example
41
+ * const types = await getTypes();
42
+ */
43
+ export declare function getTypes(): Promise<TypeResponse>;
44
+ /**
45
+ * Retrieves information about geographical areas supported by the economic activity emissions API.
46
+ *
47
+ * @export
48
+ * @return {Promise<AreaResponse>} A promise that resolves to an AreaResponse containing the supported geographical areas
49
+ * @throws {Error} May throw an error if the API request fails
50
+ *
51
+ * @example
52
+ * const areas = await getArea();
53
+ */
54
+ export declare function getArea(): Promise<AreaResponse>;
55
+ /**
56
+ * Retrieves available units for a specific economic activity emission type.
57
+ *
58
+ * @export
59
+ * @param {string} type - The economic activity emission type to get units for (e.g., "accomodation")
60
+ * @return {Promise<UnitResponse>} A promise that resolves to a UnitResponse containing the available units
61
+ * @throws {Error} May throw an error if the API request fails
62
+ *
63
+ * @example
64
+ * // Get units for the "accomodation" emission economic activity type without subtype
65
+ * const units = await getUnits("accomodation");
66
+ */
67
+ export declare function getUnits(type: string): Promise<UnitResponse>;
@@ -0,0 +1,68 @@
1
+ import { CommonRequest } from "../interfaces/Api";
2
+ import { AreaResponse } from "../interfaces/response/AreaResponse";
3
+ import { EmissionResponse } from "../interfaces/response/EmissionResponse";
4
+ import { EmissionResponseWithDetails } from "../interfaces/response/EmissionResponseWithDetails";
5
+ import { TypeResponse } from "../interfaces/response/TypeResponse";
6
+ import { UnitResponse } from "../interfaces/response/UnitResponse";
7
+ /**
8
+ * Performs scope 3 Real estate emission calculations by making a POST request to the real estate API endpoint.
9
+ *
10
+ * @export
11
+ * @param {CommonRequest} payload - The request data to be sent to the API
12
+ * @return {Promise<EmissionResponse | EmissionResponseWithDetails>} A promise that resolves to the emission calculation result. Returns EmissionResponseWithDetails if includeDetails is true, otherwise EmissionResponse
13
+ * @throws {Error} May throw an error if the API request fails
14
+ *
15
+ * @example
16
+ * const request = {
17
+ "time": {
18
+ "date": "2025-01-04"
19
+ },
20
+ "location": {
21
+ "country": "usa"
22
+ },
23
+ "activity": {
24
+ "type": "Commercial Real Estate:Industrial distribution warehouse",
25
+ "value": 17000.123,
26
+ "unit": "m2"
27
+ },
28
+ "includeDetails": false
29
+ };
30
+ * const result = await calculate(request);
31
+ */
32
+ export declare function calculate(payload: CommonRequest): Promise<EmissionResponse | EmissionResponseWithDetails>;
33
+ /**
34
+ * Retrieves available Real estate emission calculation types by making a GET request to the API endpoint.
35
+ *
36
+ * @export
37
+ * @return {Promise<TypeResponse>} A promise that resolves to a TypeResponse containing the available Real estate emission types
38
+ * @throws {Error} May throw an error if the API request fails
39
+ *
40
+ * @example
41
+ * const types = await getTypes();
42
+ */
43
+ export declare function getTypes(): Promise<TypeResponse>;
44
+ /**
45
+ * Retrieves information about geographical areas supported by the real estate emissions API.
46
+ *
47
+ * @export
48
+ * @return {Promise<AreaResponse>} A promise that resolves to an AreaResponse containing the supported geographical areas
49
+ * @throws {Error} May throw an error if the API request fails
50
+ *
51
+ * @example
52
+ * const areas = await getArea();
53
+ */
54
+ export declare function getArea(): Promise<AreaResponse>;
55
+ /**
56
+ * Retrieves available units for a specific Real estate emission type.
57
+ *
58
+ * @export
59
+ * @param {string} type - The Real estate emission type to get units for (e.g., "R134A")
60
+ * @return {Promise<UnitResponse>} A promise that resolves to a UnitResponse containing the available units
61
+ * @throws {Error} May throw an error if the API request fails
62
+ *
63
+ * @example
64
+ * // Get units for the "Commercial Real Estate:Industrial distribution warehouse" emission real estate type with subtype
65
+ * const units = await getUnits("Commercial Real Estate:Industrial distribution warehouse");
66
+
67
+ */
68
+ export declare function getUnits(type: string): Promise<UnitResponse>;
@@ -8,6 +8,8 @@ export * as TransportationAndDistribution from './api/TransportationAndDistribut
8
8
  export * as Usage from './api/Usage';
9
9
  export * as Factor from './api/Factor';
10
10
  export * as FactorSets from './api/FactorSets';
11
+ export * as EconomicActivity from './api/EconomicActivity';
12
+ export * as RealEstate from './api/RealEstate';
11
13
  export { ClientConfig } from './interfaces/Config';
12
14
  export { AreaResponse, Location as LocationInfo } from './interfaces/response/AreaResponse';
13
15
  export { EmissionResponse } from './interfaces/response/EmissionResponse';
@@ -42,10 +42,6 @@ export interface FactorResponse {
42
42
  publishedFrom?: string;
43
43
  /** Publication end date in ISO format (optional) */
44
44
  publishedTo?: string;
45
- /** Effective start date in ISO format (optional) */
46
- effectiveFrom?: string;
47
- /** Effective end date in ISO format (optional) */
48
- effectiveTo?: string;
49
45
  /** Geographic region (e.g., "Earth", "India") */
50
46
  region: string;
51
47
  /** Unique factor identifier */
@@ -20,11 +20,13 @@ The **emissions-api-sdk** is a Node.js SDK for using Emissions API in your proje
20
20
  Supported Emission Types
21
21
  ------------------------
22
22
 
23
- * **Location** – emissions from region-specific factors
24
- * **Fugitive** – emissions from leaks or fugitive sources
25
- * **Mobile** – emissions from vehicles and mobile equipment
26
- * **Stationary** – emissions from fixed fuel consumption
27
- * **Transportation & distribution** – logistics and supply chain activities
28
- * **Generic** – custom emission calculations
23
+ * **Location** – emissions from region-specific factors
24
+ * **Fugitive** – emissions from leaks or fugitive sources
25
+ * **Mobile** – emissions from vehicles and mobile equipment
26
+ * **Stationary** – emissions from fixed fuel consumption
27
+ * **Transportation & distribution** – logistics and supply chain activities
28
+ * **Real Estate** – emissions from commercial and residential properties
29
+ * **Economic Activity** – spend-based emissions from business activities
30
+ * **Generic** – custom emission calculations
29
31
 
30
32
  The SDK is designed for embedding emission calculations in applications, building sustainability dashboards, automating large-scale datasets, and tracking carbon footprints.
@@ -27,6 +27,10 @@ API
27
27
 
28
28
  .. js:autofunction:: TransportationAndDistribution.calculate
29
29
 
30
+ .. js:autofunction:: RealEstate.calculate
31
+
32
+ .. js:autofunction:: EconomicActivity.calculate
33
+
30
34
  Metadata APIs
31
35
  ===========
32
36
 
@@ -47,6 +51,10 @@ getTypes
47
51
 
48
52
  .. js:autofunction:: Fugitive.getTypes
49
53
 
54
+ .. js:autofunction:: RealEstate.getTypes
55
+
56
+ .. js:autofunction:: EconomicActivity.getTypes
57
+
50
58
  getArea
51
59
  -------
52
60
 
@@ -66,6 +74,10 @@ getArea
66
74
 
67
75
  .. js:autofunction:: Fugitive.getArea
68
76
 
77
+ .. js:autofunction:: RealEstate.getArea
78
+
79
+ .. js:autofunction:: EconomicActivity.getArea
80
+
69
81
  getUnits
70
82
  --------
71
83
 
@@ -83,6 +95,10 @@ getUnits
83
95
 
84
96
  .. js:autofunction:: Fugitive.getUnits
85
97
 
98
+ .. js:autofunction:: RealEstate.getUnits
99
+
100
+ .. js:autofunction:: EconomicActivity.getUnits
101
+
86
102
 
87
103
  Usage API
88
104
  ===========