emissions-api-sdk 1.0.5 → 1.0.7

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 (99) hide show
  1. package/.secrets.baseline +314 -0
  2. package/README.md +20 -27
  3. package/dist/Constants.js +5 -29
  4. package/dist/api/Calculation.js +0 -63
  5. package/dist/api/EconomicActivity.js +0 -60
  6. package/dist/api/Factor.js +0 -82
  7. package/dist/api/Fugitive.js +0 -63
  8. package/dist/api/Location.js +0 -61
  9. package/dist/api/Metadata.js +155 -0
  10. package/dist/api/Mobile.js +0 -64
  11. package/dist/api/RealEstate.js +0 -61
  12. package/dist/api/Stationary.js +0 -63
  13. package/dist/api/TransportationAndDistribution.js +0 -63
  14. package/dist/api/TypeRecommender.js +62 -0
  15. package/dist/coverage/clover.xml +142 -238
  16. package/dist/coverage/coverage-final.json +15 -13
  17. package/dist/coverage/lcov-report/index.html +20 -20
  18. package/dist/coverage/lcov-report/src/Client.ts.html +28 -28
  19. package/dist/coverage/lcov-report/src/Constants.ts.html +31 -106
  20. package/dist/coverage/lcov-report/src/api/Calculation.ts.html +7 -217
  21. package/dist/coverage/lcov-report/src/api/EconomicActivity.ts.html +7 -214
  22. package/dist/coverage/lcov-report/src/api/Factor.ts.html +6 -285
  23. package/dist/coverage/lcov-report/src/api/FactorSets.ts.html +1 -1
  24. package/dist/coverage/lcov-report/src/api/Fugitive.ts.html +7 -223
  25. package/dist/coverage/lcov-report/src/api/Location.ts.html +6 -222
  26. package/dist/coverage/lcov-report/src/api/Metadata.ts.html +604 -0
  27. package/dist/coverage/lcov-report/src/api/Mobile.ts.html +6 -231
  28. package/dist/coverage/lcov-report/src/api/RealEstate.ts.html +6 -219
  29. package/dist/coverage/lcov-report/src/api/Stationary.ts.html +6 -225
  30. package/dist/coverage/lcov-report/src/api/TransportationAndDistribution.ts.html +7 -223
  31. package/dist/coverage/lcov-report/src/api/TypeRecommender.ts.html +277 -0
  32. package/dist/coverage/lcov-report/src/api/Usage.ts.html +1 -1
  33. package/dist/coverage/lcov-report/src/api/index.html +63 -33
  34. package/dist/coverage/lcov-report/src/index.html +7 -7
  35. package/dist/coverage/lcov-report/src/request.ts.html +5 -5
  36. package/dist/coverage/lcov-report/src/utils.ts.html +6 -6
  37. package/dist/coverage/lcov-report/test/index.html +1 -1
  38. package/dist/coverage/lcov-report/test/mocks/CommonRequest.ts.html +1 -1
  39. package/dist/coverage/lcov-report/test/mocks/FactorRequest.ts.html +1 -1
  40. package/dist/coverage/lcov-report/test/mocks/GenericCalculationRequest.ts.html +1 -1
  41. package/dist/coverage/lcov-report/test/mocks/LocationRequest.ts.html +1 -1
  42. package/dist/coverage/lcov-report/test/mocks/SearchRequest.ts.html +1 -1
  43. package/dist/coverage/lcov-report/test/mocks/index.html +1 -1
  44. package/dist/coverage/lcov-report/test/testUtils.ts.html +1 -1
  45. package/dist/coverage/lcov.info +239 -353
  46. package/dist/index.js +3 -1
  47. package/dist/interfaces/response/TypeRecommenderResponse.js +2 -0
  48. package/dist/types/Constants.d.ts +4 -28
  49. package/dist/types/api/Calculation.d.ts +0 -41
  50. package/dist/types/api/EconomicActivity.d.ts +0 -38
  51. package/dist/types/api/Factor.d.ts +0 -52
  52. package/dist/types/api/Fugitive.d.ts +0 -41
  53. package/dist/types/api/Location.d.ts +0 -39
  54. package/dist/types/api/Metadata.d.ts +99 -0
  55. package/dist/types/api/Mobile.d.ts +0 -42
  56. package/dist/types/api/RealEstate.d.ts +0 -39
  57. package/dist/types/api/Stationary.d.ts +0 -41
  58. package/dist/types/api/TransportationAndDistribution.d.ts +0 -41
  59. package/dist/types/api/TypeRecommender.d.ts +50 -0
  60. package/dist/types/index.d.ts +3 -0
  61. package/dist/types/interfaces/response/TypeRecommenderResponse.d.ts +14 -0
  62. package/docs/_sources/reference.rst.txt +14 -50
  63. package/docs/_static/basic.css +8 -0
  64. package/docs/_static/pygments.css +146 -164
  65. package/docs/_static/searchtools.js +5 -8
  66. package/docs/_static/styles/furo.css +1 -1
  67. package/docs/_static/styles/furo.css.map +1 -1
  68. package/docs/authentication.html +28 -19
  69. package/docs/client.html +28 -19
  70. package/docs/genindex.html +41 -84
  71. package/docs/getting_started.html +28 -19
  72. package/docs/index.html +29 -20
  73. package/docs/objects.inv +0 -0
  74. package/docs/reference.html +102 -502
  75. package/docs/sdk.html +28 -19
  76. package/docs/search.html +28 -19
  77. package/docs/searchindex.js +1 -1
  78. package/docs/troubleshooting.html +28 -19
  79. package/package.json +10 -7
  80. package/sphinx-build/requirements.txt +1 -0
  81. package/sphinx-build/source/reference.rst +14 -50
  82. package/src/Constants.ts +5 -30
  83. package/src/api/Calculation.ts +1 -72
  84. package/src/api/EconomicActivity.ts +1 -71
  85. package/src/api/Factor.ts +1 -94
  86. package/src/api/Fugitive.ts +1 -74
  87. package/src/api/Location.ts +1 -73
  88. package/src/api/Metadata.ts +174 -0
  89. package/src/api/Mobile.ts +1 -76
  90. package/src/api/RealEstate.ts +1 -72
  91. package/src/api/Stationary.ts +1 -74
  92. package/src/api/TransportationAndDistribution.ts +1 -74
  93. package/src/api/TypeRecommender.ts +65 -0
  94. package/src/index.ts +4 -1
  95. package/src/interfaces/response/TypeRecommenderResponse.ts +18 -0
  96. package/test/apiTest.test.ts +9 -205
  97. package/test/metadata.test.ts +224 -0
  98. package/test/request.test.ts +0 -1
  99. package/sphinx-build/.secrets.baseline +0 -150
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.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.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;
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,3 +47,5 @@ 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.Metadata = __importStar(require("./api/Metadata"));
51
+ exports.TypeRecommender = __importStar(require("./api/TypeRecommender"));
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -11,35 +11,11 @@ export declare const FACTOR_SET_API_PATH = "/v3/carbon/factorset";
11
11
  export declare const SEARCH_API_PATH = "/v3/carbon/factor/search";
12
12
  export declare const ECONOMIC_ACTIVITY_API_PATH = "/v3/carbon/economic-activity";
13
13
  export declare const REAL_ESTATE_API_PATH = "/v3/carbon/real-estate";
14
- export declare const CALCULATION_TYPES = "/v3/carbon/calculation/types";
15
- export declare const LOCATION_TYPES = "/v3/carbon/location/types";
16
- export declare const FUGITIVE_API_TYPES = "/v3/carbon/fugitive/types";
17
- export declare const MOBILE_API_TYPES = "/v3/carbon/mobile/types";
18
- export declare const STATIONARY_API_TYPES = "/v3/carbon/stationary/types";
19
- export declare const FACTOR_API_TYPES = "/v3/carbon/factor/types";
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";
23
- export declare const FUGITIVE_API_AREA = "/v3/carbon/fugitive/area";
24
- export declare const GENERAL_API_AREA = "/v3/carbon/calculation/area";
25
- export declare const LOCATION_API_AREA = "/v3/carbon/location/area";
26
- export declare const MOBILE_API_AREA = "/v3/carbon/mobile/area";
27
- export declare const STATIONARY_API_AREA = "/v3/carbon/stationary/area";
28
- export declare const TRANSPORTATION_AND_DISTRIBUTION_API_AREA = "/v3/carbon/transportation-and-distribution/area";
29
- export declare const SEARCH_API_AREA = "/v3/carbon/factor/search/area";
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";
33
- export declare const FUGITIVE_API_UNITS = "/v3/carbon/fugitive/units";
34
- export declare const LOCATION_API_UNITS = "/v3/carbon/location/units";
35
- export declare const MOBILE_API_UNITS = "/v3/carbon/mobile/units";
36
- export declare const STATIONARY_API_UNITS = "/v3/carbon/stationary/units";
37
- export declare const GENERAL_API_UNITS = "/v3/carbon/calculation/units";
38
- export declare const FACTOR_API_UNITS = "/v3/carbon/factor/units";
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";
14
+ export declare const TYPE_RECOMMENDER_API_PATH = "/v3/carbon/recommender/type/search";
42
15
  export declare const USAGE_API = "/v3/carbon/usage";
16
+ export declare const METADATA_TYPES_ENDPOINT = "/v3/carbon/metadata/types";
17
+ export declare const METADATA_AREA_ENDPOINT = "/v3/carbon/metadata/area";
18
+ export declare const METADATA_UNITS_ENDPOINT = "/v3/carbon/metadata/units";
43
19
  export declare const GET = "GET";
44
20
  export declare const POST = "POST";
45
21
  export declare const CLIENT_SOURCE_HEADER = "X-Client-Source";
@@ -1,9 +1,6 @@
1
1
  import { CalculationRequest } from "../interfaces/Api";
2
- import { AreaResponse } from "../interfaces/response/AreaResponse";
3
2
  import { EmissionResponse } from "../interfaces/response/EmissionResponse";
4
3
  import { EmissionResponseWithDetails } from "../interfaces/response/EmissionResponseWithDetails";
5
- import { TypeResponse } from "../interfaces/response/TypeResponse";
6
- import { UnitResponse } from "../interfaces/response/UnitResponse";
7
4
  /**
8
5
  * Performs emission calculations by making a POST request to the generic calculation API endpoint.
9
6
  *
@@ -31,41 +28,3 @@ import { UnitResponse } from "../interfaces/response/UnitResponse";
31
28
  * const result = await calculate(calculationRequest);
32
29
  */
33
30
  export declare function calculate(payload: CalculationRequest): Promise<EmissionResponse | EmissionResponseWithDetails>;
34
- /**
35
- * Retrieves available calculation types by making a GET request to the calculation types API endpoint.
36
- *
37
- * @export
38
- * @return {Promise<TypeResponse>} A promise that resolves to a TypeResponse containing the available calculation types
39
- * @throws {Error} May throw an error if the API request fails
40
- *
41
- * @example
42
- * const types = await getTypes();
43
- */
44
- export declare function getTypes(): Promise<TypeResponse>;
45
- /**
46
- * Retrieves information about geographical areas supported by the calculation API.
47
- *
48
- * @export
49
- * @return {Promise<AreaResponse>} A promise that resolves to an AreaResponse containing the supported geographical areas
50
- * @throws {Error} May throw an error if the API request fails
51
- *
52
- * @example
53
- * const areas = await getArea();
54
- */
55
- export declare function getArea(): Promise<AreaResponse>;
56
- /**
57
- * Retrieves available units for a specific calculation type.
58
- *
59
- * @export
60
- * @param {string} type - The calculation type to get units for
61
- * @return {Promise<UnitResponse>} A promise that resolves to a UnitResponse containing the available units
62
- * @throws {Error} May throw an error if the API request fails
63
- *
64
- * @example
65
- * // Get units for the "Natural Gas - Scope 3:AAA" emission calculation type with subtype
66
- * const units = await getUnits("Natural Gas - Scope 3:AAA");
67
-
68
- * // Get units for the "HFC-263fb" emission calculation type without subtype
69
- * const units = await getUnits("HFC-263fb");
70
- */
71
- export declare function getUnits(type: string): Promise<UnitResponse>;
@@ -1,9 +1,6 @@
1
1
  import { CommonRequest } from "../interfaces/Api";
2
- import { AreaResponse } from "../interfaces/response/AreaResponse";
3
2
  import { EmissionResponse } from "../interfaces/response/EmissionResponse";
4
3
  import { EmissionResponseWithDetails } from "../interfaces/response/EmissionResponseWithDetails";
5
- import { TypeResponse } from "../interfaces/response/TypeResponse";
6
- import { UnitResponse } from "../interfaces/response/UnitResponse";
7
4
  /**
8
5
  * Performs scope 3 Spend based emission calculations by making a POST request to the economic activity API endpoint.
9
6
  *
@@ -30,38 +27,3 @@ import { UnitResponse } from "../interfaces/response/UnitResponse";
30
27
  * const result = await calculate(request);
31
28
  */
32
29
  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>;
@@ -1,9 +1,6 @@
1
1
  import { FactorRequest, SearchRequest } from "../interfaces/Api";
2
- import { AreaResponse } from "../interfaces/response/AreaResponse";
3
2
  import { FactorResponse } from "../interfaces/response/FactorResponse";
4
3
  import { SearchResponse } from "../interfaces/response/SearchResponse";
5
- import { TypeResponse } from "../interfaces/response/TypeResponse";
6
- import { UnitResponse } from "../interfaces/response/UnitResponse";
7
4
  /**
8
5
  * Retrieves a factor details by making a POST request to the factor API endpoint.
9
6
  *
@@ -59,52 +56,3 @@ export declare function retrieveFactor(payload: FactorRequest): Promise<FactorRe
59
56
  * const results = await search(searchRequest);
60
57
  */
61
58
  export declare function search(payload: SearchRequest): Promise<SearchResponse>;
62
- /**
63
- * Retrieves available emission factor types by making a GET request to the API endpoint.
64
- *
65
- * @export
66
- * @return {Promise<TypeResponse>} A promise that resolves to a TypeResponse containing the available emission factor types
67
- * @throws {Error} May throw an error if the API request fails
68
- *
69
- * @example
70
- * const types = await getTypes();
71
- */
72
- export declare function getTypes(): Promise<TypeResponse>;
73
- /**
74
- * Retrieves information about geographical areas supported by the factor search API.
75
- *
76
- * @export
77
- * @return {Promise<AreaResponse>} A promise that resolves to an AreaResponse containing the supported geographical areas
78
- * @throws {Error} May throw an error if the API request fails
79
- *
80
- * @example
81
- * const areas = await getSearchArea();
82
- */
83
- export declare function getSearchArea(): Promise<AreaResponse>;
84
- /**
85
- * Retrieves information about geographical areas supported by the factor API.
86
- *
87
- * @export
88
- * @return {Promise<AreaResponse>} A promise that resolves to an AreaResponse containing the supported geographical areas
89
- * @throws {Error} May throw an error if the API request fails
90
- *
91
- * @example
92
- * const areas = await getArea();
93
- */
94
- export declare function getArea(): Promise<AreaResponse>;
95
- /**
96
- * Retrieves available units for a specific emission factor type.
97
- *
98
- * @export
99
- * @param {string} type - The emission factor type to get units for (e.g., "Natural Gas - Scope 3:AAA")
100
- * @return {Promise<UnitResponse>} A promise that resolves to a UnitResponse containing the available units
101
- * @throws {Error} May throw an error if the API request fails
102
- *
103
- * @example
104
- * // Get units for the "Natural Gas - Scope 3:AAA" emission factor type with subtype
105
- * const units = await getUnits("Natural Gas - Scope 3:AAA");
106
-
107
- * // Get units for the "HFC-263fb" emission factor type without subtype
108
- * const units = await getUnits("HFC-263fb");
109
- */
110
- export declare function getUnits(type: string): Promise<UnitResponse>;
@@ -1,9 +1,6 @@
1
1
  import { CommonRequest } from "../interfaces/Api";
2
- import { AreaResponse } from "../interfaces/response/AreaResponse";
3
2
  import { EmissionResponse } from "../interfaces/response/EmissionResponse";
4
3
  import { EmissionResponseWithDetails } from "../interfaces/response/EmissionResponseWithDetails";
5
- import { TypeResponse } from "../interfaces/response/TypeResponse";
6
- import { UnitResponse } from "../interfaces/response/UnitResponse";
7
4
  /**
8
5
  * Performs scope 1 fugitve emission calculations by making a POST request to the fugitive API endpoint.
9
6
  *
@@ -30,41 +27,3 @@ import { UnitResponse } from "../interfaces/response/UnitResponse";
30
27
  * const result = await calculate(request);
31
28
  */
32
29
  export declare function calculate(payload: CommonRequest): Promise<EmissionResponse | EmissionResponseWithDetails>;
33
- /**
34
- * Retrieves available fugitive 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 fugitive 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 fugitive 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 fugitive emission type.
57
- *
58
- * @export
59
- * @param {string} type - The fugitive 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 "Natural Gas - Scope 3:AAA" emission fugitive type with subtype
65
- * const units = await getUnits("Natural Gas - Scope 3:AAA");
66
-
67
- * // Get units for the "R-426A" emission fugitive type without subtype
68
- * const units = await getUnits("R-426A");
69
- */
70
- export declare function getUnits(type: string): Promise<UnitResponse>;
@@ -1,9 +1,6 @@
1
1
  import { LocationRequest } from "../interfaces/Api";
2
- import { AreaResponse } from "../interfaces/response/AreaResponse";
3
2
  import { EmissionResponse } from "../interfaces/response/EmissionResponse";
4
3
  import { EmissionResponseWithDetails } from "../interfaces/response/EmissionResponseWithDetails";
5
- import { TypeResponse } from "../interfaces/response/TypeResponse";
6
- import { UnitResponse } from "../interfaces/response/UnitResponse";
7
4
  /**
8
5
  * Performs scope 2 purchased energy Emission calculations by making a POST request to the location API endpoint.
9
6
  *
@@ -31,39 +28,3 @@ import { UnitResponse } from "../interfaces/response/UnitResponse";
31
28
  * const result = await calculate(calculationRequest);
32
29
  */
33
30
  export declare function calculate(payload: LocationRequest): Promise<EmissionResponse | EmissionResponseWithDetails>;
34
- /**
35
- * Retrieves available location-based calculation types by making a GET request to the location types API endpoint.
36
- *
37
- * @export
38
- * @return {Promise<TypeResponse>} A promise that resolves to a TypeResponse containing the available location-based calculation types
39
- * @throws {Error} May throw an error if the API request fails
40
- *
41
- * @example
42
- *
43
- * const types = await getTypes();
44
- */
45
- export declare function getTypes(): Promise<TypeResponse>;
46
- /**
47
- * Retrieves information about geographical areas supported by the location-based calculation API.
48
- *
49
- * @export
50
- * @return {Promise<AreaResponse>} A promise that resolves to an AreaResponse containing the supported geographical areas
51
- * @throws {Error} May throw an error if the API request fails
52
- *
53
- * @example
54
- * const areas = await getArea();
55
- */
56
- export declare function getArea(): Promise<AreaResponse>;
57
- /**
58
- * Retrieves available units for a specific location-based calculation type.
59
- *
60
- * @export
61
- * @param {string} type - The location-based calculation type to get units for (e.g., "electricity")
62
- * @return {Promise<UnitResponse>} A promise that resolves to a UnitResponse containing the available units
63
- * @throws {Error} May throw an error if the API request fails
64
- *
65
- * @example
66
- * // Get units for the "electricity" location type
67
- * const units = await getUnits("electricity");
68
- */
69
- export declare function getUnits(type: string): Promise<UnitResponse>;
@@ -0,0 +1,99 @@
1
+ import { AreaResponse } from "../interfaces/response/AreaResponse";
2
+ import { TypeResponse } from "../interfaces/response/TypeResponse";
3
+ import { UnitResponse } from "../interfaces/response/UnitResponse";
4
+ /**
5
+ * Retrieves available emission source types for a specific endpoint using GET request.
6
+ *
7
+ * @export
8
+ * @param {string} [endpoint] - The endpoint name to retrieve types for. Defaults to 'calculation' if not provided.
9
+ * @return {Promise<TypeResponse>} A promise that resolves to a TypeResponse containing the available types
10
+ * @throws {Error} May throw an error if the API request fails
11
+ *
12
+ * @example
13
+ * // Get types for calculation endpoint (default)
14
+ * const types = await getTypes();
15
+ *
16
+ * // Get types for a specific endpoint
17
+ * const locationTypes = await getTypes('location');
18
+ */
19
+ export declare function getTypes(endpoint?: string): Promise<TypeResponse>;
20
+ /**
21
+ * Retrieves available emission source types for a specific endpoint using POST request.
22
+ *
23
+ * @export
24
+ * @param {string} [endpoint] - The endpoint name to retrieve types for. Defaults to 'calculation' if not provided.
25
+ * @return {Promise<TypeResponse>} A promise that resolves to a TypeResponse containing the available types
26
+ * @throws {Error} May throw an error if the API request fails
27
+ *
28
+ * @example
29
+ * // Get types for calculation endpoint (default)
30
+ * const types = await postTypes();
31
+ *
32
+ * // Get types for a specific endpoint
33
+ * const stationaryTypes = await postTypes('stationary');
34
+ */
35
+ export declare function postTypes(endpoint?: string): Promise<TypeResponse>;
36
+ /**
37
+ * Retrieves available geographic locations for a specific endpoint using GET request.
38
+ *
39
+ * @export
40
+ * @param {string} [endpoint] - The endpoint name to retrieve locations for. Defaults to 'calculation' if not provided.
41
+ * @return {Promise<AreaResponse>} A promise that resolves to an AreaResponse containing the available locations
42
+ * @throws {Error} May throw an error if the API request fails
43
+ *
44
+ * @example
45
+ * // Get areas for calculation endpoint (default)
46
+ * const areas = await getArea();
47
+ *
48
+ * // Get areas for a specific endpoint
49
+ * const mobileAreas = await getArea('mobile');
50
+ */
51
+ export declare function getArea(endpoint?: string): Promise<AreaResponse>;
52
+ /**
53
+ * Retrieves available geographic locations for a specific endpoint using POST request.
54
+ *
55
+ * @export
56
+ * @param {string} [endpoint] - The endpoint name to retrieve locations for. Defaults to 'calculation' if not provided.
57
+ * @return {Promise<AreaResponse>} A promise that resolves to an AreaResponse containing the available locations
58
+ * @throws {Error} May throw an error if the API request fails
59
+ *
60
+ * @example
61
+ * // Get areas for calculation endpoint (default)
62
+ * const areas = await postArea();
63
+ *
64
+ * // Get areas for a specific endpoint
65
+ * const fugitiveAreas = await postArea('fugitive');
66
+ */
67
+ export declare function postArea(endpoint?: string): Promise<AreaResponse>;
68
+ /**
69
+ * Retrieves available measurement units for a specific type using GET request.
70
+ *
71
+ * @export
72
+ * @param {string} [type] - The emission source type to retrieve units for. If not provided, returns the full UOM table.
73
+ * @return {Promise<UnitResponse>} A promise that resolves to a UnitResponse containing the available units
74
+ * @throws {Error} May throw an error if the API request fails
75
+ *
76
+ * @example
77
+ * // Get all units
78
+ * const allUnits = await getUnits();
79
+ *
80
+ * // Get units for a specific type
81
+ * const naturalGasUnits = await getUnits('Natural Gas');
82
+ */
83
+ export declare function getUnits(type?: string): Promise<UnitResponse>;
84
+ /**
85
+ * Retrieves available measurement units for a specific type using POST request.
86
+ *
87
+ * @export
88
+ * @param {string} [type] - The emission source type to retrieve units for. If not provided, returns the full UOM table.
89
+ * @return {Promise<UnitResponse>} A promise that resolves to a UnitResponse containing the available units
90
+ * @throws {Error} May throw an error if the API request fails
91
+ *
92
+ * @example
93
+ * // Get all units
94
+ * const allUnits = await postUnits();
95
+ *
96
+ * // Get units for a specific type
97
+ * const jetKeroseneUnits = await postUnits('Jet Kerosene');
98
+ */
99
+ export declare function postUnits(type?: string): Promise<UnitResponse>;
@@ -1,9 +1,6 @@
1
1
  import { CommonRequest } from "../interfaces/Api";
2
- import { AreaResponse } from "../interfaces/response/AreaResponse";
3
2
  import { EmissionResponse } from "../interfaces/response/EmissionResponse";
4
3
  import { EmissionResponseWithDetails } from "../interfaces/response/EmissionResponseWithDetails";
5
- import { TypeResponse } from "../interfaces/response/TypeResponse";
6
- import { UnitResponse } from "../interfaces/response/UnitResponse";
7
4
  /**
8
5
  * Performs Scope 1 mobile emissions related calculations by making a POST request to the mobile API endpoint.
9
6
  *
@@ -31,42 +28,3 @@ import { UnitResponse } from "../interfaces/response/UnitResponse";
31
28
  * const result = await calculate(request);
32
29
  */
33
30
  export declare function calculate(payload: CommonRequest): Promise<EmissionResponse | EmissionResponseWithDetails>;
34
- /**
35
- * Retrieves available mobile emission calculation types by making a GET request to the API endpoint.
36
- *
37
- * @export
38
- * @return {Promise<TypeResponse>} A promise that resolves to a TypeResponse containing the available mobile emission types
39
- * @throws {Error} May throw an error if the API request fails
40
- *
41
- * @example
42
- * // Get all available mobile emission types
43
- * const types = await getTypes();
44
- */
45
- export declare function getTypes(): Promise<TypeResponse>;
46
- /**
47
- * Retrieves information about geographical areas supported by the mobile emissions API.
48
- *
49
- * @export
50
- * @return {Promise<AreaResponse>} A promise that resolves to an AreaResponse containing the supported geographical areas
51
- * @throws {Error} May throw an error if the API request fails
52
- *
53
- * @example
54
- * const areas = await getArea();
55
- */
56
- export declare function getArea(): Promise<AreaResponse>;
57
- /**
58
- * Retrieves available units for a specific mobile emission type.
59
- *
60
- * @export
61
- * @param {string} type - The mobile emission type to get units for (e.g., "Diesel Fuel")
62
- * @return {Promise<UnitResponse>} A promise that resolves to a UnitResponse containing the available units
63
- * @throws {Error} May throw an error if the API request fails
64
- *
65
- * @example
66
- * Get units for the "Cars:B20:(NE)" emission mobile type with subtype
67
- * const units = await getUnits("Cars:B20:(NE)");
68
-
69
- * Get units for the "Cars by Size - Large Car - Hybrid" emission mobile type without subtype
70
- * const units = await getUnits("Cars by Size - Large Car - Hybrid");
71
- */
72
- export declare function getUnits(type: string): Promise<UnitResponse>;
@@ -1,9 +1,6 @@
1
1
  import { CommonRequest } from "../interfaces/Api";
2
- import { AreaResponse } from "../interfaces/response/AreaResponse";
3
2
  import { EmissionResponse } from "../interfaces/response/EmissionResponse";
4
3
  import { EmissionResponseWithDetails } from "../interfaces/response/EmissionResponseWithDetails";
5
- import { TypeResponse } from "../interfaces/response/TypeResponse";
6
- import { UnitResponse } from "../interfaces/response/UnitResponse";
7
4
  /**
8
5
  * Performs scope 3 Real estate emission calculations by making a POST request to the real estate API endpoint.
9
6
  *
@@ -30,39 +27,3 @@ import { UnitResponse } from "../interfaces/response/UnitResponse";
30
27
  * const result = await calculate(request);
31
28
  */
32
29
  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>;
@@ -1,9 +1,6 @@
1
1
  import { CommonRequest } from "../interfaces/Api";
2
- import { AreaResponse } from "../interfaces/response/AreaResponse";
3
2
  import { EmissionResponse } from "../interfaces/response/EmissionResponse";
4
3
  import { EmissionResponseWithDetails } from "../interfaces/response/EmissionResponseWithDetails";
5
- import { TypeResponse } from "../interfaces/response/TypeResponse";
6
- import { UnitResponse } from "../interfaces/response/UnitResponse";
7
4
  /**
8
5
  * Performs Scope 1 stationary calculations by making a POST request to the stationary API endpoint.
9
6
  *
@@ -31,41 +28,3 @@ import { UnitResponse } from "../interfaces/response/UnitResponse";
31
28
  * const result = await calculate(request);
32
29
  */
33
30
  export declare function calculate(payload: CommonRequest): Promise<EmissionResponse | EmissionResponseWithDetails>;
34
- /**
35
- * Retrieves available stationary emission calculation types by making a GET request to the API endpoint.
36
- *
37
- * @export
38
- * @return {Promise<TypeResponse>} A promise that resolves to a TypeResponse containing the available stationary emission types
39
- * @throws {Error} May throw an error if the API request fails
40
- *
41
- * @example
42
- * const types = await getTypes();
43
- */
44
- export declare function getTypes(): Promise<TypeResponse>;
45
- /**
46
- * Retrieves information about geographical areas supported by the stationary emissions API.
47
- *
48
- * @export
49
- * @return {Promise<AreaResponse>} A promise that resolves to an AreaResponse containing the supported geographical areas
50
- * @throws {Error} May throw an error if the API request fails
51
- *
52
- * @example
53
- * const areas = await getArea();
54
- */
55
- export declare function getArea(): Promise<AreaResponse>;
56
- /**
57
- * Retrieves available units for a specific stationary emission type.
58
- *
59
- * @export
60
- * @param {string} type - The stationary emission type to get units for (e.g., "Coal - Lignite")
61
- * @return {Promise<UnitResponse>} A promise that resolves to a UnitResponse containing the available units
62
- * @throws {Error} May throw an error if the API request fails
63
- *
64
- * @example
65
- * Get units for the "Petroleum Based Greases - NC:A" emission stationary type with subtype
66
- * const units = await getUnits("Petroleum Based Greases - NC:A");
67
-
68
- * Get units for the "Jet Kerosene" emission stationary type without subtype
69
- * const units = await getUnits("Jet Kerosene");
70
- */
71
- export declare function getUnits(type: string): Promise<UnitResponse>;
@@ -1,9 +1,6 @@
1
1
  import { CalculationRequest } from "../interfaces/Api";
2
- import { AreaResponse } from "../interfaces/response/AreaResponse";
3
2
  import { EmissionResponse } from "../interfaces/response/EmissionResponse";
4
3
  import { EmissionResponseWithDetails } from "../interfaces/response/EmissionResponseWithDetails";
5
- import { TypeResponse } from "../interfaces/response/TypeResponse";
6
- import { UnitResponse } from "../interfaces/response/UnitResponse";
7
4
  /**
8
5
  * Performs Scope 3 transportation and distribution emission calculations by making a POST request to the transportation and distribution API endpoint.
9
6
  *
@@ -30,41 +27,3 @@ import { UnitResponse } from "../interfaces/response/UnitResponse";
30
27
  * const result = await calculate(request);
31
28
  */
32
29
  export declare function calculate(payload: CalculationRequest): Promise<EmissionResponse | EmissionResponseWithDetails>;
33
- /**
34
- * Retrieves available transportation and distribution 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 transportation and distribution calculation 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 transportation and distribution 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 transportation and distribution calculation type.
57
- *
58
- * @export
59
- * @param {string} type - The transportation and distribution calculation type to get units for (e.g., "Freight - Cargo Ship")
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 "Business Travel - Cars:Diesel - Small" transportation and distribution type without subtype
65
- * const units = await getUnits("Business Travel - Cars:Diesel - Small");
66
- *
67
- * // Get units for the "Business Travel - Cars" transportation and distribution type with subtype
68
- * const units = await getUnits("Business Travel - Cars");
69
- */
70
- export declare function getUnits(type: string): Promise<UnitResponse>;