@rowengine/common 1.1.2 → 1.1.4
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.
- package/build/index.d.ts +3 -0
- package/build/index.js +19 -0
- package/build/interfaces/activity.d.ts +46 -0
- package/build/interfaces/activity.js +18 -0
- package/build/interfaces/bbox.d.ts +6 -0
- package/build/interfaces/bbox.js +2 -0
- package/build/interfaces/center.d.ts +4 -0
- package/build/interfaces/center.js +2 -0
- package/build/interfaces/company.d.ts +12 -0
- package/build/interfaces/company.js +2 -0
- package/build/interfaces/exportable.d.ts +12 -0
- package/build/interfaces/exportable.js +12 -0
- package/build/interfaces/field.d.ts +19 -0
- package/build/interfaces/field.js +2 -0
- package/build/interfaces/geojson.d.ts +12 -0
- package/build/interfaces/geojson.js +2 -0
- package/build/interfaces/grade.d.ts +5 -0
- package/build/interfaces/grade.js +2 -0
- package/build/interfaces/inboundedit.d.ts +23 -0
- package/build/interfaces/inboundedit.js +2 -0
- package/build/interfaces/index.d.ts +17 -0
- package/build/interfaces/index.js +33 -0
- package/build/interfaces/pixviewer-link.d.ts +6 -0
- package/build/interfaces/pixviewer-link.js +2 -0
- package/build/interfaces/project.d.ts +102 -0
- package/build/interfaces/project.js +65 -0
- package/build/interfaces/refund.d.ts +11 -0
- package/build/interfaces/refund.js +2 -0
- package/build/interfaces/reload.d.ts +9 -0
- package/build/interfaces/reload.js +2 -0
- package/build/interfaces/stagetimes.d.ts +31 -0
- package/build/interfaces/stagetimes.js +2 -0
- package/build/interfaces/transaction.d.ts +19 -0
- package/build/interfaces/transaction.js +9 -0
- package/build/interfaces/user.d.ts +18 -0
- package/build/interfaces/user.js +10 -0
- package/build/interfaces/weeds.d.ts +47 -0
- package/build/interfaces/weeds.js +27 -0
- package/build/models/activity.model.d.ts +25 -0
- package/build/models/activity.model.js +83 -0
- package/build/models/company.model.d.ts +15 -0
- package/build/models/company.model.js +44 -0
- package/build/models/index.d.ts +8 -0
- package/build/models/index.js +24 -0
- package/build/models/pixviewer-link.model.d.ts +14 -0
- package/build/models/pixviewer-link.model.js +64 -0
- package/build/models/project.model.d.ts +26 -0
- package/build/models/project.model.js +138 -0
- package/build/models/refund.model.d.ts +18 -0
- package/build/models/refund.model.js +47 -0
- package/build/models/reload.model.d.ts +16 -0
- package/build/models/reload.model.js +49 -0
- package/build/models/transaction.model.d.ts +18 -0
- package/build/models/transaction.model.js +61 -0
- package/build/models/user.model.d.ts +19 -0
- package/build/models/user.model.js +119 -0
- package/build/utils/gc-storage.d.ts +3 -0
- package/build/utils/gc-storage.js +33 -0
- package/build/utils/gc.d.ts +11 -0
- package/build/utils/gc.js +63 -0
- package/build/utils/grades.d.ts +3 -0
- package/build/utils/grades.js +25 -0
- package/build/utils/index.d.ts +3 -0
- package/build/utils/index.js +19 -0
- package/package.json +7 -6
package/build/index.d.ts
ADDED
package/build/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
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);
|
|
18
|
+
__exportStar(require("./utils"), exports);
|
|
19
|
+
__exportStar(require("./models"), exports);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Center } from './center';
|
|
2
|
+
import { Company } from './company';
|
|
3
|
+
import { Field } from './field';
|
|
4
|
+
import { ServiceProvided } from './project';
|
|
5
|
+
import { User } from './user';
|
|
6
|
+
/**
|
|
7
|
+
* If the activity has no status, it means that it was approved.
|
|
8
|
+
* (Older versions of the project did not have this field).
|
|
9
|
+
*/
|
|
10
|
+
export declare enum ActivityFinalStatus {
|
|
11
|
+
/** Project still on process */
|
|
12
|
+
PROCESSING = "PROCESSING",
|
|
13
|
+
/** The provider rejected the entire project */
|
|
14
|
+
REJECTED = "REJECTED",
|
|
15
|
+
/** Project was a success. */
|
|
16
|
+
APPROVED = "APPROVED",
|
|
17
|
+
/** User project owner refused full edit and parcial result. */
|
|
18
|
+
EDIT_REFUSED = "EDIT_REFUSED"
|
|
19
|
+
}
|
|
20
|
+
export interface Activity {
|
|
21
|
+
id: string;
|
|
22
|
+
user: User;
|
|
23
|
+
company: Company;
|
|
24
|
+
project: {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
grade?: number;
|
|
28
|
+
fields?: Field[];
|
|
29
|
+
area?: number;
|
|
30
|
+
center?: Center;
|
|
31
|
+
/**
|
|
32
|
+
* The project final status.
|
|
33
|
+
*/
|
|
34
|
+
finalStatus?: ActivityFinalStatus;
|
|
35
|
+
/**
|
|
36
|
+
* Processing time in seconds.
|
|
37
|
+
*/
|
|
38
|
+
timeElapsed?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Time spent on the queue in seconds.
|
|
41
|
+
*/
|
|
42
|
+
timeOnQueue?: number;
|
|
43
|
+
};
|
|
44
|
+
serviceProvided?: ServiceProvided;
|
|
45
|
+
createdAt: Date;
|
|
46
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActivityFinalStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* If the activity has no status, it means that it was approved.
|
|
6
|
+
* (Older versions of the project did not have this field).
|
|
7
|
+
*/
|
|
8
|
+
var ActivityFinalStatus;
|
|
9
|
+
(function (ActivityFinalStatus) {
|
|
10
|
+
/** Project still on process */
|
|
11
|
+
ActivityFinalStatus["PROCESSING"] = "PROCESSING";
|
|
12
|
+
/** The provider rejected the entire project */
|
|
13
|
+
ActivityFinalStatus["REJECTED"] = "REJECTED";
|
|
14
|
+
/** Project was a success. */
|
|
15
|
+
ActivityFinalStatus["APPROVED"] = "APPROVED";
|
|
16
|
+
/** User project owner refused full edit and parcial result. */
|
|
17
|
+
ActivityFinalStatus["EDIT_REFUSED"] = "EDIT_REFUSED";
|
|
18
|
+
})(ActivityFinalStatus || (exports.ActivityFinalStatus = ActivityFinalStatus = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum ExportableType {
|
|
2
|
+
GAPS_REPORT = "GAPS_REPORT",
|
|
3
|
+
BETWEEN_ROWS = "BETWEEN_ROWS",
|
|
4
|
+
TRAMPLING_REPORT = "TRAMPLING_REPORT",
|
|
5
|
+
ROWS_REPORT = "ROWS_REPORT",
|
|
6
|
+
PARALLELISM_POINTS = "PARALLELISM_POINTS",
|
|
7
|
+
PERFORMANCE_REPORT = "PERFORMANCE_REPORT"
|
|
8
|
+
}
|
|
9
|
+
export interface Exportable {
|
|
10
|
+
type: ExportableType;
|
|
11
|
+
options: any;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExportableType = void 0;
|
|
4
|
+
var ExportableType;
|
|
5
|
+
(function (ExportableType) {
|
|
6
|
+
ExportableType["GAPS_REPORT"] = "GAPS_REPORT";
|
|
7
|
+
ExportableType["BETWEEN_ROWS"] = "BETWEEN_ROWS";
|
|
8
|
+
ExportableType["TRAMPLING_REPORT"] = "TRAMPLING_REPORT";
|
|
9
|
+
ExportableType["ROWS_REPORT"] = "ROWS_REPORT";
|
|
10
|
+
ExportableType["PARALLELISM_POINTS"] = "PARALLELISM_POINTS";
|
|
11
|
+
ExportableType["PERFORMANCE_REPORT"] = "PERFORMANCE_REPORT";
|
|
12
|
+
})(ExportableType || (exports.ExportableType = ExportableType = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Center } from './center';
|
|
2
|
+
import { Grade } from './grade';
|
|
3
|
+
import { Weeds } from './weeds';
|
|
4
|
+
export interface FieldResult {
|
|
5
|
+
success: boolean;
|
|
6
|
+
quantity: number;
|
|
7
|
+
length: number;
|
|
8
|
+
}
|
|
9
|
+
export interface Field {
|
|
10
|
+
id: number;
|
|
11
|
+
name: string;
|
|
12
|
+
area: number;
|
|
13
|
+
center: Center;
|
|
14
|
+
gapsClass: number;
|
|
15
|
+
grade?: Grade;
|
|
16
|
+
rows?: FieldResult;
|
|
17
|
+
gaps?: FieldResult;
|
|
18
|
+
weeds?: Weeds;
|
|
19
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Center } from "./center";
|
|
2
|
+
export interface BoundReport {
|
|
3
|
+
OVERLAPPED_VERTICES: number;
|
|
4
|
+
REMOVED_BY_SIMPLIFICATION: number;
|
|
5
|
+
ORIGINAL_NUM_VERTICES: number;
|
|
6
|
+
FINAL_NUM_VERTICES: number;
|
|
7
|
+
POLYGONS_BELOW_5M2: number;
|
|
8
|
+
NR_FIELD_POLYGONS: number;
|
|
9
|
+
NR_FIELDS_OBSTACLES: number;
|
|
10
|
+
AREA_FIELD_POLYGONS_HA: number;
|
|
11
|
+
OBSTACLE_AREA_HA: number;
|
|
12
|
+
NUM_OBST_ABOVE_50P_POLYGON: number;
|
|
13
|
+
NUM_INTERSECTIONS: number;
|
|
14
|
+
VERTS_OVERLAP: number;
|
|
15
|
+
}
|
|
16
|
+
export interface InBoundEditResult {
|
|
17
|
+
boundReport: BoundReport;
|
|
18
|
+
area: number;
|
|
19
|
+
center: Center;
|
|
20
|
+
geojson: Object;
|
|
21
|
+
isValid: boolean;
|
|
22
|
+
errorsGj: Object | null;
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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';
|
|
12
|
+
export * from './exportable';
|
|
13
|
+
export * from './grade';
|
|
14
|
+
export * from './inboundedit';
|
|
15
|
+
export * from './weeds';
|
|
16
|
+
export * from './refund';
|
|
17
|
+
export * from './transaction';
|
|
@@ -0,0 +1,33 @@
|
|
|
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);
|
|
28
|
+
__exportStar(require("./exportable"), exports);
|
|
29
|
+
__exportStar(require("./grade"), exports);
|
|
30
|
+
__exportStar(require("./inboundedit"), exports);
|
|
31
|
+
__exportStar(require("./weeds"), exports);
|
|
32
|
+
__exportStar(require("./refund"), exports);
|
|
33
|
+
__exportStar(require("./transaction"), exports);
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { BBox } from './bbox';
|
|
2
|
+
import { Center } from './center';
|
|
3
|
+
import { Company } from './company';
|
|
4
|
+
import { Exportable } from './exportable';
|
|
5
|
+
import { Field } from './field';
|
|
6
|
+
import { User } from './user';
|
|
7
|
+
export declare enum ProjectStatus {
|
|
8
|
+
DELETING = "DELETING",
|
|
9
|
+
PENDING_BOUNDARY = "PENDING_BOUNDARY",
|
|
10
|
+
EDITING_BOUNDARY = "EDITING_BOUNDARY",
|
|
11
|
+
PREPARING = "PREPARING",
|
|
12
|
+
PROCESSING = "PROCESSING",
|
|
13
|
+
FAILED = "FAILED",
|
|
14
|
+
NOT_ENOUGH_CREDITS = "NOT_ENOUGH_CREDITS",
|
|
15
|
+
READY = "READY",
|
|
16
|
+
UPDATING_FILES = "UPDATING_FILES",// sent to send-local-files queue.
|
|
17
|
+
REPROCESSING_GAPS = "REPROCESSING_GAPS"
|
|
18
|
+
}
|
|
19
|
+
export declare enum ProviderStatus {
|
|
20
|
+
/** Project got out of exportables queue and now is waiting for analysis. */
|
|
21
|
+
AWAITING_ANALYSIS = "AWAITING_ANALYSIS",
|
|
22
|
+
/** The provider rejected the entire project */
|
|
23
|
+
REJECTED = "REJECTED",
|
|
24
|
+
/** The master/provider is editing the project. */
|
|
25
|
+
EDITING = "EDITING",
|
|
26
|
+
/** Edited or not, but the provider finished the job. */
|
|
27
|
+
DONE = "DONE",
|
|
28
|
+
/** Awaiting user to accept or reject a full edit by provider. */
|
|
29
|
+
AWAITING_CONFIRMATION = "AWAITING_CONFIRMATION",
|
|
30
|
+
/** User sent local files and we're updating the project files */
|
|
31
|
+
UPDATING = "UPDATING",
|
|
32
|
+
/** Owner of the project refused the full edit and partial result, project wont be charged */
|
|
33
|
+
EDIT_REFUSED = "EDIT_REFUSED",
|
|
34
|
+
/** Owner refused the full edit, but accepted the bot result. */
|
|
35
|
+
PARTIAL_RESULT_ACCEPTED = "PARTIAL_RESULT_ACCEPTED"
|
|
36
|
+
}
|
|
37
|
+
export declare enum ProviderEditMode {
|
|
38
|
+
FAST_EDIT = "FAST_EDIT",
|
|
39
|
+
FULL_EDIT = "FULL_EDIT",
|
|
40
|
+
NO_EDIT = "NO_EDIT"
|
|
41
|
+
}
|
|
42
|
+
export declare enum PixViewerStatus {
|
|
43
|
+
SENDING = "SENDING",
|
|
44
|
+
READY = "READY",
|
|
45
|
+
FAILED = "FAILED",
|
|
46
|
+
NOT_ENOUGH_SPACE = "NOT_ENOUGH_SPACE",
|
|
47
|
+
WAITING_REPORTS = "WAITING_REPORTS"
|
|
48
|
+
}
|
|
49
|
+
export declare enum BonusExportableStatus {
|
|
50
|
+
PENDING_ROWS = "PENDING_ROWS",
|
|
51
|
+
AWAITING_CONFIRMATION = "AWAITING_CONFIRMATION",
|
|
52
|
+
PROCESSING = "PROCESSING",
|
|
53
|
+
READY = "READY",
|
|
54
|
+
FAILED = "FAILED"
|
|
55
|
+
}
|
|
56
|
+
export declare enum HighlightType {
|
|
57
|
+
DARK = "dark",
|
|
58
|
+
BRIGHT = "bright",
|
|
59
|
+
NONE = "none"
|
|
60
|
+
}
|
|
61
|
+
export interface ProjectBonusExportables {
|
|
62
|
+
status: BonusExportableStatus;
|
|
63
|
+
exportables: Exportable[];
|
|
64
|
+
}
|
|
65
|
+
export interface ServiceProvided {
|
|
66
|
+
status: ProviderStatus;
|
|
67
|
+
userEmail?: string;
|
|
68
|
+
editMode?: ProviderEditMode;
|
|
69
|
+
comment?: string;
|
|
70
|
+
editStartedAt?: Date;
|
|
71
|
+
editFinishedAt?: Date;
|
|
72
|
+
}
|
|
73
|
+
export interface GapsOptions {
|
|
74
|
+
minSize: number;
|
|
75
|
+
minActSize: number;
|
|
76
|
+
lengthNoGapEdge: number;
|
|
77
|
+
}
|
|
78
|
+
export interface Project {
|
|
79
|
+
id: string;
|
|
80
|
+
user: User;
|
|
81
|
+
company: Company;
|
|
82
|
+
name: string;
|
|
83
|
+
status: ProjectStatus;
|
|
84
|
+
sizeInMbs: number;
|
|
85
|
+
createdAt: Date;
|
|
86
|
+
locale: 'pt-BR' | 'en' | 'es';
|
|
87
|
+
spacement: number;
|
|
88
|
+
gapsOptions: GapsOptions;
|
|
89
|
+
isDoubleRow?: boolean;
|
|
90
|
+
estimatedTimeInSeconds?: number;
|
|
91
|
+
grade?: number;
|
|
92
|
+
timeElapsedInSeconds?: number;
|
|
93
|
+
center?: Center;
|
|
94
|
+
area?: number;
|
|
95
|
+
fields?: Field[];
|
|
96
|
+
tilesBBox?: BBox;
|
|
97
|
+
goodPointsPercentage?: number;
|
|
98
|
+
highlightType?: HighlightType;
|
|
99
|
+
bonusExportables?: ProjectBonusExportables;
|
|
100
|
+
pixViewerStatus?: PixViewerStatus;
|
|
101
|
+
serviceProvided?: ServiceProvided;
|
|
102
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HighlightType = exports.BonusExportableStatus = exports.PixViewerStatus = exports.ProviderEditMode = exports.ProviderStatus = exports.ProjectStatus = void 0;
|
|
4
|
+
/* STATUS TO SHOW TO THE USER */
|
|
5
|
+
var ProjectStatus;
|
|
6
|
+
(function (ProjectStatus) {
|
|
7
|
+
ProjectStatus["DELETING"] = "DELETING";
|
|
8
|
+
ProjectStatus["PENDING_BOUNDARY"] = "PENDING_BOUNDARY";
|
|
9
|
+
ProjectStatus["EDITING_BOUNDARY"] = "EDITING_BOUNDARY";
|
|
10
|
+
ProjectStatus["PREPARING"] = "PREPARING";
|
|
11
|
+
ProjectStatus["PROCESSING"] = "PROCESSING";
|
|
12
|
+
ProjectStatus["FAILED"] = "FAILED";
|
|
13
|
+
ProjectStatus["NOT_ENOUGH_CREDITS"] = "NOT_ENOUGH_CREDITS";
|
|
14
|
+
ProjectStatus["READY"] = "READY";
|
|
15
|
+
ProjectStatus["UPDATING_FILES"] = "UPDATING_FILES";
|
|
16
|
+
ProjectStatus["REPROCESSING_GAPS"] = "REPROCESSING_GAPS";
|
|
17
|
+
})(ProjectStatus || (exports.ProjectStatus = ProjectStatus = {}));
|
|
18
|
+
var ProviderStatus;
|
|
19
|
+
(function (ProviderStatus) {
|
|
20
|
+
/** Project got out of exportables queue and now is waiting for analysis. */
|
|
21
|
+
ProviderStatus["AWAITING_ANALYSIS"] = "AWAITING_ANALYSIS";
|
|
22
|
+
/** The provider rejected the entire project */
|
|
23
|
+
ProviderStatus["REJECTED"] = "REJECTED";
|
|
24
|
+
/** The master/provider is editing the project. */
|
|
25
|
+
ProviderStatus["EDITING"] = "EDITING";
|
|
26
|
+
/** Edited or not, but the provider finished the job. */
|
|
27
|
+
ProviderStatus["DONE"] = "DONE";
|
|
28
|
+
/** Awaiting user to accept or reject a full edit by provider. */
|
|
29
|
+
ProviderStatus["AWAITING_CONFIRMATION"] = "AWAITING_CONFIRMATION";
|
|
30
|
+
/** User sent local files and we're updating the project files */
|
|
31
|
+
ProviderStatus["UPDATING"] = "UPDATING";
|
|
32
|
+
/** Owner of the project refused the full edit and partial result, project wont be charged */
|
|
33
|
+
ProviderStatus["EDIT_REFUSED"] = "EDIT_REFUSED";
|
|
34
|
+
/** Owner refused the full edit, but accepted the bot result. */
|
|
35
|
+
ProviderStatus["PARTIAL_RESULT_ACCEPTED"] = "PARTIAL_RESULT_ACCEPTED";
|
|
36
|
+
})(ProviderStatus || (exports.ProviderStatus = ProviderStatus = {}));
|
|
37
|
+
var ProviderEditMode;
|
|
38
|
+
(function (ProviderEditMode) {
|
|
39
|
+
ProviderEditMode["FAST_EDIT"] = "FAST_EDIT";
|
|
40
|
+
ProviderEditMode["FULL_EDIT"] = "FULL_EDIT";
|
|
41
|
+
ProviderEditMode["NO_EDIT"] = "NO_EDIT";
|
|
42
|
+
})(ProviderEditMode || (exports.ProviderEditMode = ProviderEditMode = {}));
|
|
43
|
+
var PixViewerStatus;
|
|
44
|
+
(function (PixViewerStatus) {
|
|
45
|
+
PixViewerStatus["SENDING"] = "SENDING";
|
|
46
|
+
PixViewerStatus["READY"] = "READY";
|
|
47
|
+
PixViewerStatus["FAILED"] = "FAILED";
|
|
48
|
+
PixViewerStatus["NOT_ENOUGH_SPACE"] = "NOT_ENOUGH_SPACE";
|
|
49
|
+
// Wil not be used anymore.
|
|
50
|
+
PixViewerStatus["WAITING_REPORTS"] = "WAITING_REPORTS";
|
|
51
|
+
})(PixViewerStatus || (exports.PixViewerStatus = PixViewerStatus = {}));
|
|
52
|
+
var BonusExportableStatus;
|
|
53
|
+
(function (BonusExportableStatus) {
|
|
54
|
+
BonusExportableStatus["PENDING_ROWS"] = "PENDING_ROWS";
|
|
55
|
+
BonusExportableStatus["AWAITING_CONFIRMATION"] = "AWAITING_CONFIRMATION";
|
|
56
|
+
BonusExportableStatus["PROCESSING"] = "PROCESSING";
|
|
57
|
+
BonusExportableStatus["READY"] = "READY";
|
|
58
|
+
BonusExportableStatus["FAILED"] = "FAILED";
|
|
59
|
+
})(BonusExportableStatus || (exports.BonusExportableStatus = BonusExportableStatus = {}));
|
|
60
|
+
var HighlightType;
|
|
61
|
+
(function (HighlightType) {
|
|
62
|
+
HighlightType["DARK"] = "dark";
|
|
63
|
+
HighlightType["BRIGHT"] = "bright";
|
|
64
|
+
HighlightType["NONE"] = "none";
|
|
65
|
+
})(HighlightType || (exports.HighlightType = HighlightType = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Activity } from './activity';
|
|
2
|
+
import { Company } from './company';
|
|
3
|
+
import { Reload } from './reload';
|
|
4
|
+
export interface Refund {
|
|
5
|
+
id: string;
|
|
6
|
+
company: Company;
|
|
7
|
+
value: number;
|
|
8
|
+
fromActivity: Activity;
|
|
9
|
+
reloadsInvolved: Reload[];
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
fastClip: number;
|
|
8
|
+
vegid: number;
|
|
9
|
+
mask: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Store the processing time for each executable/stage in seconds.
|
|
13
|
+
*/
|
|
14
|
+
export interface ExportablesTimes {
|
|
15
|
+
irserver: number;
|
|
16
|
+
multrline: number;
|
|
17
|
+
gaps: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Store the processing time for each executable/stage
|
|
21
|
+
* on the queues (in seconds).
|
|
22
|
+
*/
|
|
23
|
+
export interface StageTimes {
|
|
24
|
+
project: Project;
|
|
25
|
+
company: Company;
|
|
26
|
+
date: Date;
|
|
27
|
+
area?: number;
|
|
28
|
+
tiles: number;
|
|
29
|
+
prepare?: PrepareTimes;
|
|
30
|
+
exportables?: ExportablesTimes;
|
|
31
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Company } from './company';
|
|
2
|
+
export declare enum TransactionType {
|
|
3
|
+
CREDITS_BOUGHT = "CREDITS_BOUGHT",
|
|
4
|
+
CREDITS_DEBITED = "CREDITS_DEBITED",
|
|
5
|
+
PROJECT_REFUNDED = "PROJECT_REFUNDED"
|
|
6
|
+
}
|
|
7
|
+
export interface TransactionProject {
|
|
8
|
+
name: string;
|
|
9
|
+
area: number;
|
|
10
|
+
}
|
|
11
|
+
export interface Transaction {
|
|
12
|
+
company: Company;
|
|
13
|
+
userEmail: string;
|
|
14
|
+
currentBalance: number;
|
|
15
|
+
value: number;
|
|
16
|
+
type: TransactionType;
|
|
17
|
+
project?: TransactionProject;
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionType = void 0;
|
|
4
|
+
var TransactionType;
|
|
5
|
+
(function (TransactionType) {
|
|
6
|
+
TransactionType["CREDITS_BOUGHT"] = "CREDITS_BOUGHT";
|
|
7
|
+
TransactionType["CREDITS_DEBITED"] = "CREDITS_DEBITED";
|
|
8
|
+
TransactionType["PROJECT_REFUNDED"] = "PROJECT_REFUNDED";
|
|
9
|
+
})(TransactionType || (exports.TransactionType = TransactionType = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Company } from "./company";
|
|
2
|
+
export declare enum UserLevel {
|
|
3
|
+
Master = "master",
|
|
4
|
+
ServiceProvider = "service_provider",
|
|
5
|
+
Manager = "manager",
|
|
6
|
+
Operator = "operator"
|
|
7
|
+
}
|
|
8
|
+
export interface User {
|
|
9
|
+
id: string;
|
|
10
|
+
email: string;
|
|
11
|
+
company: Company;
|
|
12
|
+
name: string;
|
|
13
|
+
level: UserLevel;
|
|
14
|
+
blocked: boolean;
|
|
15
|
+
password: string;
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
createdBy: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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["ServiceProvider"] = "service_provider";
|
|
8
|
+
UserLevel["Manager"] = "manager";
|
|
9
|
+
UserLevel["Operator"] = "operator";
|
|
10
|
+
})(UserLevel || (exports.UserLevel = UserLevel = {}));
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare enum WeedsDetectionType {
|
|
2
|
+
GEOMETRIC = "Geom",
|
|
3
|
+
ZONES = "Zones",
|
|
4
|
+
GLOBAL = "Global",
|
|
5
|
+
LOCAL = "Local"
|
|
6
|
+
}
|
|
7
|
+
export declare enum WeedsStatus {
|
|
8
|
+
/** Running IndexWeed on every field. */
|
|
9
|
+
DETECTING = "DETECTING",// Running IndexWeed.
|
|
10
|
+
/** IndexWeed finished successfully. */
|
|
11
|
+
DETECTED = "DETECTED",
|
|
12
|
+
/** User running MergeClas to edit filters. */
|
|
13
|
+
PROCESSING = "PROCESSING",
|
|
14
|
+
/** User processed using MergeClas (generated lines and png) */
|
|
15
|
+
MERGECLAS_PROCESSED = "MERGECLAS_PROCESSED",
|
|
16
|
+
/** User generated polygons using MergeClas, and now can edit them. */
|
|
17
|
+
POLYGONS_GENERATED = "POLYGONS_GENERATED",
|
|
18
|
+
/** User edited, confirmed and generated the weed polygons. */
|
|
19
|
+
READY = "READY",
|
|
20
|
+
/** Error on the process. */
|
|
21
|
+
FAILED = "FAILED"
|
|
22
|
+
}
|
|
23
|
+
export interface WeedsDisplay {
|
|
24
|
+
min: number;
|
|
25
|
+
max: number;
|
|
26
|
+
}
|
|
27
|
+
export interface WeedsDetectionOptions {
|
|
28
|
+
display: WeedsDisplay;
|
|
29
|
+
radSample: number;
|
|
30
|
+
subtractVal: number;
|
|
31
|
+
}
|
|
32
|
+
export interface WeedsFilters {
|
|
33
|
+
heights: {
|
|
34
|
+
local: number;
|
|
35
|
+
zones: number;
|
|
36
|
+
global: number;
|
|
37
|
+
geometric: number;
|
|
38
|
+
};
|
|
39
|
+
weightDivisor: number;
|
|
40
|
+
minCut: number;
|
|
41
|
+
polygonsBuffer: number;
|
|
42
|
+
}
|
|
43
|
+
export interface Weeds {
|
|
44
|
+
status: WeedsStatus;
|
|
45
|
+
detection: WeedsDetectionOptions;
|
|
46
|
+
filters: WeedsFilters;
|
|
47
|
+
}
|