@rowengine/common 1.0.47 → 1.0.48

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 @@
1
+ export * from "./interfaces";
package/build/index.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./interfaces"), exports);
@@ -0,0 +1,27 @@
1
+ import { Center } from "./center";
2
+ import { Company } from "./company";
3
+ import { User } from "./user";
4
+ export interface Activity {
5
+ id: string;
6
+ user: User;
7
+ company: Company;
8
+ project: {
9
+ id: string;
10
+ name: string;
11
+ area: number;
12
+ center: Center;
13
+ /**
14
+ * The percentage of good points on the points cloud.
15
+ */
16
+ goodPointsPercentage?: number;
17
+ /**
18
+ * Processing time in seconds.
19
+ */
20
+ timeElapsed?: number;
21
+ /**
22
+ * Time spent on the queue in seconds.
23
+ */
24
+ timeOnQueue?: number;
25
+ };
26
+ createdAt: Date;
27
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export interface BBox {
2
+ maxx: number;
3
+ maxy: number;
4
+ minx: number;
5
+ miny: number;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface Center {
2
+ lat: number;
3
+ lng: number;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export interface Company {
2
+ id: string;
3
+ name: string;
4
+ blocked: boolean;
5
+ createdAt: Date;
6
+ createdBy: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { Center } from "./center";
2
+ export interface Field {
3
+ id: number;
4
+ name: string;
5
+ area: number;
6
+ center: Center;
7
+ rows?: number;
8
+ rowsLength?: number;
9
+ gaps?: number;
10
+ gapsLength?: number;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ export interface Feature {
2
+ type: string;
3
+ properties: any;
4
+ geometry: {
5
+ type: string;
6
+ coordinates: number[] | number[][];
7
+ };
8
+ }
9
+ export interface Geojson {
10
+ type: string;
11
+ features: Feature[];
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ export * from "./company";
2
+ export * from "./user";
3
+ export * from "./center";
4
+ export * from "./project";
5
+ export * from "./geojson";
6
+ export * from "./field";
7
+ export * from "./stagetimes";
8
+ export * from "./bbox";
9
+ export * from "./reload";
10
+ export * from "./activity";
11
+ export * from "./pixviewer-link";
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./company"), exports);
18
+ __exportStar(require("./user"), exports);
19
+ __exportStar(require("./center"), exports);
20
+ __exportStar(require("./project"), exports);
21
+ __exportStar(require("./geojson"), exports);
22
+ __exportStar(require("./field"), exports);
23
+ __exportStar(require("./stagetimes"), exports);
24
+ __exportStar(require("./bbox"), exports);
25
+ __exportStar(require("./reload"), exports);
26
+ __exportStar(require("./activity"), exports);
27
+ __exportStar(require("./pixviewer-link"), exports);
@@ -0,0 +1,6 @@
1
+ import { User } from "./user";
2
+ export interface PixViewerLink {
3
+ user: User;
4
+ token: string;
5
+ createdAt: Date;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,37 @@
1
+ import { BBox } from "./bbox";
2
+ import { Center } from "./center";
3
+ import { Company } from "./company";
4
+ import { Field } from "./field";
5
+ import { User } from "./user";
6
+ export declare enum ProjectStatus {
7
+ PENDING_BOUNDARY = "PENDING_BOUNDARY",
8
+ PREPARING = "PREPARING",
9
+ PROCESSING = "PROCESSING",
10
+ FAILED = "FAILED",
11
+ NOT_ENOUGH_CREDITS = "NOT_ENOUGH_CREDITS",
12
+ READY = "READY",
13
+ DELETING = "DELETING"
14
+ }
15
+ export declare enum PixViewerStatus {
16
+ SENDING = "SENDING",
17
+ READY = "READY",
18
+ FAILED = "FAILED",
19
+ NOT_ENOUGH_SPACE = "NOT_ENOUGH_SPACE"
20
+ }
21
+ export interface Project {
22
+ id: string;
23
+ user: User;
24
+ company: Company;
25
+ name: string;
26
+ status: ProjectStatus;
27
+ sizeInMbs: number;
28
+ createdAt: Date;
29
+ spacement: number;
30
+ gapsClass: number;
31
+ timeElapsedInSeconds?: number;
32
+ center?: Center;
33
+ area?: number;
34
+ fields?: Field[];
35
+ tilesBBox?: BBox;
36
+ pixViewerStatus?: PixViewerStatus;
37
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PixViewerStatus = exports.ProjectStatus = void 0;
4
+ var ProjectStatus;
5
+ (function (ProjectStatus) {
6
+ ProjectStatus["PENDING_BOUNDARY"] = "PENDING_BOUNDARY";
7
+ ProjectStatus["PREPARING"] = "PREPARING";
8
+ ProjectStatus["PROCESSING"] = "PROCESSING";
9
+ ProjectStatus["FAILED"] = "FAILED";
10
+ ProjectStatus["NOT_ENOUGH_CREDITS"] = "NOT_ENOUGH_CREDITS";
11
+ ProjectStatus["READY"] = "READY";
12
+ ProjectStatus["DELETING"] = "DELETING";
13
+ })(ProjectStatus || (exports.ProjectStatus = ProjectStatus = {}));
14
+ var PixViewerStatus;
15
+ (function (PixViewerStatus) {
16
+ PixViewerStatus["SENDING"] = "SENDING";
17
+ PixViewerStatus["READY"] = "READY";
18
+ PixViewerStatus["FAILED"] = "FAILED";
19
+ PixViewerStatus["NOT_ENOUGH_SPACE"] = "NOT_ENOUGH_SPACE";
20
+ })(PixViewerStatus || (exports.PixViewerStatus = PixViewerStatus = {}));
@@ -0,0 +1,9 @@
1
+ import { Company } from "./company";
2
+ export interface Reload {
3
+ id: string;
4
+ company: Company;
5
+ value: number;
6
+ availableValue: number;
7
+ createdAt: Date;
8
+ validUntil: Date;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,32 @@
1
+ import { Company } from "./company";
2
+ import { Project } from "./project";
3
+ /**
4
+ * Store the processing time for each executable/stage in seconds.
5
+ */
6
+ export interface PrepareTimes {
7
+ gdalwarp: number;
8
+ redimg: number;
9
+ vegid: number;
10
+ mask: number;
11
+ }
12
+ /**
13
+ * Store the processing time for each executable/stage in seconds.
14
+ */
15
+ export interface ExportablesTimes {
16
+ irserver: number;
17
+ multrline: number;
18
+ gaps: number;
19
+ }
20
+ /**
21
+ * Store the processing time for each executable/stage
22
+ * on the queues (in seconds).
23
+ */
24
+ export interface StageTimes {
25
+ project: Project;
26
+ company: Company;
27
+ date: Date;
28
+ area?: number;
29
+ tiles: number;
30
+ prepare?: PrepareTimes;
31
+ exportables?: ExportablesTimes;
32
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ import { Company } from "./company";
2
+ export declare enum UserLevel {
3
+ Master = "master",
4
+ Manager = "manager",
5
+ Operator = "operator"
6
+ }
7
+ export interface User {
8
+ id: string;
9
+ email: string;
10
+ company: Company;
11
+ name: string;
12
+ level: UserLevel;
13
+ blocked: boolean;
14
+ password: string;
15
+ createdAt: Date;
16
+ createdBy: string;
17
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserLevel = void 0;
4
+ var UserLevel;
5
+ (function (UserLevel) {
6
+ UserLevel["Master"] = "master";
7
+ UserLevel["Manager"] = "manager";
8
+ UserLevel["Operator"] = "operator";
9
+ })(UserLevel || (exports.UserLevel = UserLevel = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rowengine/common",
3
- "version": "1.0.47",
3
+ "version": "1.0.48",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "exports": {