@hestia-earth/api 0.15.0 → 0.15.2

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.
@@ -0,0 +1,4 @@
1
+ import { Analysis } from './model';
2
+ import { IMongooseDocument } from '../../db/mongoose.model';
3
+ export interface IAnalysisDocument extends Analysis, IMongooseDocument {
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ import { BaseModel } from '../../db/model.base';
2
+ interface IAnalysisDetail {
3
+ key: string;
4
+ termId: string;
5
+ url: string;
6
+ }
7
+ export declare class Analysis extends BaseModel {
8
+ cycleId: string;
9
+ name: string;
10
+ details?: IAnalysisDetail[];
11
+ error?: {
12
+ message: string;
13
+ subMessages: string[];
14
+ };
15
+ }
16
+ export {};
@@ -0,0 +1,25 @@
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 (b.hasOwnProperty(p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ extendStatics(d, b);
11
+ function __() { this.constructor = d; }
12
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
+ };
14
+ })();
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.Analysis = void 0;
17
+ var model_base_1 = require("../../db/model.base");
18
+ var Analysis = (function (_super) {
19
+ __extends(Analysis, _super);
20
+ function Analysis() {
21
+ return _super !== null && _super.apply(this, arguments) || this;
22
+ }
23
+ return Analysis;
24
+ }(model_base_1.BaseModel));
25
+ exports.Analysis = Analysis;
@@ -0,0 +1,5 @@
1
+ import { Document } from 'mongoose';
2
+ export interface IMongooseDocument extends Document {
3
+ createdAt: Date;
4
+ updatedAt?: Date;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -134,6 +134,7 @@ export declare const replaceInvalidChars: (value: string) => string;
134
134
  export declare const folderFromPath: (path: string) => string;
135
135
  export declare const rootFolderFromPath: (path: string) => string;
136
136
  export declare const filenameFromPath: (path: string) => string;
137
+ export declare const analysesFolder = "analyses";
137
138
  export declare const glossaryFolder = "glossary";
138
139
  export declare const isGlossary: (path: string) => boolean;
139
140
  export declare const aggregationFolder = "aggregation";
@@ -20,7 +20,7 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {
20
20
  return r;
21
21
  };
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.isDraft = exports.canFeedback = exports.canSubmit = exports.isValidated = exports.canValidate = exports.canRemove = exports.isAuthorized = exports.isOwner = exports.isFolderUpload = exports.isAggregation = exports.aggregationFolder = exports.isGlossary = exports.glossaryFolder = exports.filenameFromPath = exports.rootFolderFromPath = exports.folderFromPath = exports.replaceInvalidChars = exports.validPathChars = exports.fileToExt = exports.filepathSearch = exports.filenameSearch = exports.File = exports.FilePipelineError = exports.FilePipelineProgress = exports.FilePipelineStatus = exports.FileError = exports.FileStatus = exports.FileProgress = exports.HestiaExtensions = exports.finalFormatExtensions = exports.SupportedExtensions = exports.sizeInMb = exports.MAX_SIZE_MB = exports.MAX_SIZE = exports.mb = void 0;
23
+ exports.isDraft = exports.canFeedback = exports.canSubmit = exports.isValidated = exports.canValidate = exports.canRemove = exports.isAuthorized = exports.isOwner = exports.isFolderUpload = exports.isAggregation = exports.aggregationFolder = exports.isGlossary = exports.glossaryFolder = exports.analysesFolder = exports.filenameFromPath = exports.rootFolderFromPath = exports.folderFromPath = exports.replaceInvalidChars = exports.validPathChars = exports.fileToExt = exports.filepathSearch = exports.filenameSearch = exports.File = exports.FilePipelineError = exports.FilePipelineProgress = exports.FilePipelineStatus = exports.FileError = exports.FileStatus = exports.FileProgress = exports.HestiaExtensions = exports.finalFormatExtensions = exports.SupportedExtensions = exports.sizeInMb = exports.MAX_SIZE_MB = exports.MAX_SIZE = exports.mb = void 0;
24
24
  var model_base_1 = require("../../db/model.base");
25
25
  exports.mb = 1048576;
26
26
  exports.MAX_SIZE = 2;
@@ -155,6 +155,7 @@ exports.folderFromPath = function (path) {
155
155
  };
156
156
  exports.rootFolderFromPath = function (path) { return path.split('/')[0]; };
157
157
  exports.filenameFromPath = function (path) { return path.split('/').pop(); };
158
+ exports.analysesFolder = 'analyses';
158
159
  exports.glossaryFolder = 'glossary';
159
160
  exports.isGlossary = function (path) { return exports.rootFolderFromPath(path) === exports.glossaryFolder; };
160
161
  exports.aggregationFolder = 'aggregation';
package/dist/models.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './api-calls/model/model';
2
+ export * from './analyses/model/model';
2
3
  export * from './earth-engine/model/model';
3
4
  export * from './files/model/model';
4
5
  export * from './migrations/model/model';
package/dist/models.js CHANGED
@@ -11,6 +11,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./api-calls/model/model"), exports);
14
+ __exportStar(require("./analyses/model/model"), exports);
14
15
  __exportStar(require("./earth-engine/model/model"), exports);
15
16
  __exportStar(require("./files/model/model"), exports);
16
17
  __exportStar(require("./migrations/model/model"), exports);
@@ -0,0 +1,4 @@
1
+ import { Reconciliation } from './model';
2
+ import { IMongooseDocument } from '../../db/mongoose.model';
3
+ export interface IReconciliationDocument extends Reconciliation, IMongooseDocument {
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { User } from './model';
2
+ import { IMongooseDocument } from '../../db/mongoose.model';
3
+ export interface IUserDocument extends User, IMongooseDocument {
4
+ verifyPassword: (password: string) => Promise<boolean>;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hestia-earth/api",
3
- "version": "0.15.0",
3
+ "version": "0.15.2",
4
4
  "description": "Hestia API definitions",
5
5
  "main": "dist/models.js",
6
6
  "typings": "dist/models.d.ts",