@hestia-earth/api 0.18.17 → 0.18.19

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,9 +1,10 @@
1
1
  import { ITermJSONLD } from '@hestia-earth/schema';
2
2
  import { BaseModel } from '../../db/model.base';
3
+ export type analysisChangeType = 'increase' | 'decrease';
3
4
  export interface IAnalysisDetail {
4
5
  key: 'inputs' | 'products' | 'practices';
5
6
  grouping: string;
6
- type: 'increase' | 'decrease';
7
+ type: analysisChangeType;
7
8
  originalUrl?: string;
8
9
  recalculatedUrl?: string;
9
10
  }
package/dist/models.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  export * from './api-calls/model/model';
2
2
  export * from './analyses/model/model';
3
+ export * from './cycles/model/model';
3
4
  export * from './earth-engine/model/model';
4
5
  export * from './files/model/model';
5
6
  export * from './migrations/model/model';
6
7
  export * from './nodes/model/model';
7
8
  export * from './reconciliations/model/model';
9
+ export * from './settings/model/model';
8
10
  export * from './users/model/model';
9
- export * from './cycles/model/model';
package/dist/models.js CHANGED
@@ -16,10 +16,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./api-calls/model/model"), exports);
18
18
  __exportStar(require("./analyses/model/model"), exports);
19
+ __exportStar(require("./cycles/model/model"), exports);
19
20
  __exportStar(require("./earth-engine/model/model"), exports);
20
21
  __exportStar(require("./files/model/model"), exports);
21
22
  __exportStar(require("./migrations/model/model"), exports);
22
23
  __exportStar(require("./nodes/model/model"), exports);
23
24
  __exportStar(require("./reconciliations/model/model"), exports);
25
+ __exportStar(require("./settings/model/model"), exports);
24
26
  __exportStar(require("./users/model/model"), exports);
25
- __exportStar(require("./cycles/model/model"), exports);
@@ -0,0 +1,16 @@
1
+ import { BaseModel } from '../../db/model.base';
2
+ export declare const cacheKey = "settings";
3
+ export declare enum SettingKey {
4
+ maintenanceEnabled = "maintenanceEnabled",
5
+ readonlyEnabled = "readonlyEnabled",
6
+ aggregationEngine = "aggregationEngine",
7
+ calculationEngine = "calculationEngine",
8
+ users = "users"
9
+ }
10
+ export declare class Setting extends BaseModel {
11
+ key: SettingKey;
12
+ value: any;
13
+ metadata?: {
14
+ slackThreadTs?: string;
15
+ };
16
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.Setting = exports.SettingKey = exports.cacheKey = void 0;
19
+ var model_base_1 = require("../../db/model.base");
20
+ exports.cacheKey = 'settings';
21
+ var SettingKey;
22
+ (function (SettingKey) {
23
+ SettingKey["maintenanceEnabled"] = "maintenanceEnabled";
24
+ SettingKey["readonlyEnabled"] = "readonlyEnabled";
25
+ SettingKey["aggregationEngine"] = "aggregationEngine";
26
+ SettingKey["calculationEngine"] = "calculationEngine";
27
+ SettingKey["users"] = "users";
28
+ })(SettingKey = exports.SettingKey || (exports.SettingKey = {}));
29
+ var Setting = (function (_super) {
30
+ __extends(Setting, _super);
31
+ function Setting() {
32
+ return _super !== null && _super.apply(this, arguments) || this;
33
+ }
34
+ return Setting;
35
+ }(model_base_1.BaseModel));
36
+ exports.Setting = Setting;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hestia-earth/api",
3
- "version": "0.18.17",
3
+ "version": "0.18.19",
4
4
  "description": "Hestia API definitions",
5
5
  "main": "dist/models.js",
6
6
  "typings": "dist/models.d.ts",