@hestia-earth/data-api 0.0.2-4 → 0.0.2-6
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITermJSONLD, Product } from '@hestia-earth/schema';
|
|
2
2
|
export interface IFilter {
|
|
3
3
|
regions?: string[];
|
|
4
4
|
periods?: string[];
|
|
@@ -18,8 +18,45 @@ export interface IFilters {
|
|
|
18
18
|
regions: string[];
|
|
19
19
|
defaultMethodClassifications: string[];
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
type pivotedValue = {
|
|
22
|
+
[termId: string]: {
|
|
23
|
+
value: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export interface ICyclePivoted {
|
|
27
|
+
'@id': string;
|
|
28
|
+
name: string;
|
|
29
|
+
site?: {
|
|
30
|
+
'@id': string;
|
|
31
|
+
};
|
|
32
|
+
startDate: string | number;
|
|
33
|
+
endDate: string | number;
|
|
34
|
+
aggregated: boolean;
|
|
35
|
+
inputs?: pivotedValue;
|
|
36
|
+
products?: pivotedValue;
|
|
37
|
+
emissions?: pivotedValue;
|
|
25
38
|
}
|
|
39
|
+
export interface IImpactAssessmentPivoted {
|
|
40
|
+
'@id': string;
|
|
41
|
+
name: string;
|
|
42
|
+
site?: {
|
|
43
|
+
'@id': string;
|
|
44
|
+
};
|
|
45
|
+
cycle?: {
|
|
46
|
+
'@id': string;
|
|
47
|
+
};
|
|
48
|
+
country: Pick<ITermJSONLD, '@id' | 'name'>;
|
|
49
|
+
startDate: string | number;
|
|
50
|
+
endDate: string | number;
|
|
51
|
+
aggregated: boolean;
|
|
52
|
+
product: Product;
|
|
53
|
+
emissionsResourceUse?: pivotedValue;
|
|
54
|
+
impacts?: pivotedValue;
|
|
55
|
+
endpoints?: pivotedValue;
|
|
56
|
+
}
|
|
57
|
+
export interface IAggregatedNodeRow {
|
|
58
|
+
cycle: ICyclePivoted;
|
|
59
|
+
region: Pick<ITermJSONLD, '@id' | 'name'>;
|
|
60
|
+
impactAssessments: IImpactAssessmentPivoted[];
|
|
61
|
+
}
|
|
62
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hestia-earth/data-api",
|
|
3
|
-
"version": "0.0.2-
|
|
3
|
+
"version": "0.0.2-6",
|
|
4
4
|
"description": "Hestia Data API definitions",
|
|
5
5
|
"main": "dist/models.js",
|
|
6
6
|
"typings": "dist/models.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "rm -rf build && tsc -p tsconfig.build.json",
|
|
9
9
|
"build:module": "rm -rf dist && tsc -p tsconfig.dist.json",
|
|
10
|
-
"build:lambdas": "rm -rf build
|
|
10
|
+
"build:lambdas": "rm -rf build && tsc -p tsconfig.lambdas.json",
|
|
11
11
|
"start": "node index.js",
|
|
12
12
|
"dev": "ts-node-dev --respawn --rs dev.ts --files --ignore-watch node_modules",
|
|
13
13
|
"lint": "tsc --noEmit && eslint .",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"swagger-ui-express": "^4.6.3",
|
|
96
96
|
"ts-node": "^10.9.1",
|
|
97
97
|
"ts-node-dev": "^2.0.0",
|
|
98
|
-
"typescript": "^5.
|
|
98
|
+
"typescript": "^5.1.6",
|
|
99
99
|
"winston": "^3.8.2"
|
|
100
100
|
},
|
|
101
101
|
"husky": {
|