@veritree/services 2.34.0 → 2.35.0
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/index.js +83 -83
- package/package.json +16 -16
- package/src/endpoints/bulk-uploads.js +4 -4
- package/src/endpoints/countries.js +5 -5
- package/src/endpoints/crumbs.js +20 -20
- package/src/endpoints/evidence.js +47 -47
- package/src/endpoints/external-reports.js +9 -9
- package/src/endpoints/field-reports.js +37 -37
- package/src/endpoints/field-udpate-verifications.js +5 -5
- package/src/endpoints/field-updates.js +16 -16
- package/src/endpoints/forest-type-species.js +4 -4
- package/src/endpoints/forest-types-profiles.js +4 -4
- package/src/endpoints/forest-types.js +14 -14
- package/src/endpoints/form-submissions.js +4 -4
- package/src/endpoints/geometries.js +4 -4
- package/src/endpoints/images-aggregated.js +4 -4
- package/src/endpoints/images.js +21 -21
- package/src/endpoints/methodologies.js +36 -36
- package/src/endpoints/notes.js +14 -14
- package/src/endpoints/organizations.js +59 -59
- package/src/endpoints/orgs.js +65 -65
- package/src/endpoints/password.js +58 -58
- package/src/endpoints/planting-sites.js +121 -110
- package/src/endpoints/regions.js +41 -41
- package/src/endpoints/resellers.js +37 -37
- package/src/endpoints/roles.js +4 -4
- package/src/endpoints/sdgs.js +4 -4
- package/src/endpoints/sponsors.js +86 -86
- package/src/endpoints/sso-token.js +5 -5
- package/src/endpoints/standards.js +140 -140
- package/src/endpoints/stats.js +17 -17
- package/src/endpoints/subdomains.js +4 -4
- package/src/endpoints/subsite-types.js +5 -5
- package/src/endpoints/subsites.js +88 -88
- package/src/endpoints/tags.js +14 -14
- package/src/endpoints/tasks.js +47 -47
- package/src/endpoints/tree-order-statuses.js +4 -4
- package/src/endpoints/trees-orders.js +23 -23
- package/src/endpoints/user.js +27 -27
- package/src/endpoints/users.js +14 -14
- package/src/endpoints/utilities.js +35 -35
- package/src/endpoints/verifications.js +21 -21
- package/src/helpers/api.js +293 -293
- package/src/helpers/cookies.js +36 -36
- package/src/helpers/relations.js +32 -32
- package/src/helpers/sequestrations.js +19 -19
- package/src/helpers/session.js +3 -3
- package/src/helpers/team.js +45 -45
- package/src/utils/args.js +46 -46
package/index.js
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
import { BulkUploads } from './src/endpoints/bulk-uploads';
|
|
2
|
-
import { Countries } from './src/endpoints/countries';
|
|
3
|
-
import { FieldUpdates } from './src/endpoints/field-updates';
|
|
4
|
-
import { FieldUpdateVerifications } from './src/endpoints/field-udpate-verifications';
|
|
5
|
-
import { FormSubmissions } from './src/endpoints/form-submissions';
|
|
6
|
-
import { ForestTypeSpecies } from './src/endpoints/forest-type-species';
|
|
7
|
-
import { ForestTypes } from './src/endpoints/forest-types';
|
|
8
|
-
import { ForestTypeProfiles } from './src/endpoints/forest-types-profiles';
|
|
9
|
-
import { Images } from './src/endpoints/images';
|
|
10
|
-
import { Methodologies } from './src/endpoints/methodologies';
|
|
11
|
-
import { Notes } from './src/endpoints/notes';
|
|
12
|
-
import { Orgs } from './src/endpoints/orgs';
|
|
13
|
-
import { Regions } from './src/endpoints/regions';
|
|
14
|
-
import { Resellers } from './src/endpoints/resellers';
|
|
15
|
-
import { SDGs } from './src/endpoints/sdgs';
|
|
16
|
-
import { Sponsors } from './src/endpoints/sponsors';
|
|
17
|
-
import { Standards } from './src/endpoints/standards';
|
|
18
|
-
import { Stats } from './src/endpoints/stats';
|
|
19
|
-
import { Subdomains } from './src/endpoints/subdomains';
|
|
20
|
-
import { Subsites } from './src/endpoints/subsites';
|
|
21
|
-
import { SubsiteTypes } from './src/endpoints/subsite-types';
|
|
22
|
-
import { Tags } from './src/endpoints/tags';
|
|
23
|
-
import { TreeOrders } from './src/endpoints/trees-orders';
|
|
24
|
-
import { TreeOrderStatuses } from './src/endpoints/tree-order-statuses';
|
|
25
|
-
import { User } from './src/endpoints/user';
|
|
26
|
-
import { Users } from './src/endpoints/users';
|
|
27
|
-
import { Utilities } from './src/endpoints/utilities';
|
|
28
|
-
import { Roles } from './src/endpoints/roles';
|
|
29
|
-
import { FieldReports } from './src/endpoints/field-reports';
|
|
30
|
-
import { ExternalReports } from './src/endpoints/external-reports';
|
|
31
|
-
import { Evidence } from './src/endpoints/evidence';
|
|
32
|
-
import { Crumbs } from './src/endpoints/crumbs';
|
|
33
|
-
import { Verifications } from './src/endpoints/verifications';
|
|
34
|
-
import { ImagesAggregated } from './src/endpoints/images-aggregated';
|
|
35
|
-
import { ssoToken } from './src/endpoints/sso-token';
|
|
36
|
-
import { PlantingSites } from './src/endpoints/planting-sites';
|
|
37
|
-
import { Organizations } from './src/endpoints/organizations';
|
|
38
|
-
import { Tasks } from './src/endpoints/tasks';
|
|
39
|
-
import { Geometries } from './src/endpoints/geometries';
|
|
40
|
-
import { Password } from './src/endpoints/password';
|
|
41
|
-
|
|
42
|
-
export {
|
|
43
|
-
BulkUploads,
|
|
44
|
-
Countries,
|
|
45
|
-
FieldUpdates,
|
|
46
|
-
FieldUpdateVerifications,
|
|
47
|
-
ForestTypeSpecies,
|
|
48
|
-
ForestTypes,
|
|
49
|
-
ForestTypeProfiles,
|
|
50
|
-
FormSubmissions,
|
|
51
|
-
Methodologies,
|
|
52
|
-
Images,
|
|
53
|
-
Notes,
|
|
54
|
-
Orgs,
|
|
55
|
-
Regions,
|
|
56
|
-
Resellers,
|
|
57
|
-
SDGs,
|
|
58
|
-
Sponsors,
|
|
59
|
-
Standards,
|
|
60
|
-
Stats,
|
|
61
|
-
Subdomains,
|
|
62
|
-
Subsites,
|
|
63
|
-
SubsiteTypes,
|
|
64
|
-
Tags,
|
|
65
|
-
TreeOrders,
|
|
66
|
-
TreeOrderStatuses,
|
|
67
|
-
User,
|
|
68
|
-
Users,
|
|
69
|
-
Utilities,
|
|
70
|
-
Roles,
|
|
71
|
-
FieldReports,
|
|
72
|
-
ExternalReports,
|
|
73
|
-
Evidence,
|
|
74
|
-
Crumbs,
|
|
75
|
-
Verifications,
|
|
76
|
-
ImagesAggregated,
|
|
77
|
-
ssoToken,
|
|
78
|
-
PlantingSites,
|
|
79
|
-
Organizations,
|
|
80
|
-
Tasks,
|
|
81
|
-
Geometries,
|
|
82
|
-
Password
|
|
83
|
-
};
|
|
1
|
+
import { BulkUploads } from './src/endpoints/bulk-uploads';
|
|
2
|
+
import { Countries } from './src/endpoints/countries';
|
|
3
|
+
import { FieldUpdates } from './src/endpoints/field-updates';
|
|
4
|
+
import { FieldUpdateVerifications } from './src/endpoints/field-udpate-verifications';
|
|
5
|
+
import { FormSubmissions } from './src/endpoints/form-submissions';
|
|
6
|
+
import { ForestTypeSpecies } from './src/endpoints/forest-type-species';
|
|
7
|
+
import { ForestTypes } from './src/endpoints/forest-types';
|
|
8
|
+
import { ForestTypeProfiles } from './src/endpoints/forest-types-profiles';
|
|
9
|
+
import { Images } from './src/endpoints/images';
|
|
10
|
+
import { Methodologies } from './src/endpoints/methodologies';
|
|
11
|
+
import { Notes } from './src/endpoints/notes';
|
|
12
|
+
import { Orgs } from './src/endpoints/orgs';
|
|
13
|
+
import { Regions } from './src/endpoints/regions';
|
|
14
|
+
import { Resellers } from './src/endpoints/resellers';
|
|
15
|
+
import { SDGs } from './src/endpoints/sdgs';
|
|
16
|
+
import { Sponsors } from './src/endpoints/sponsors';
|
|
17
|
+
import { Standards } from './src/endpoints/standards';
|
|
18
|
+
import { Stats } from './src/endpoints/stats';
|
|
19
|
+
import { Subdomains } from './src/endpoints/subdomains';
|
|
20
|
+
import { Subsites } from './src/endpoints/subsites';
|
|
21
|
+
import { SubsiteTypes } from './src/endpoints/subsite-types';
|
|
22
|
+
import { Tags } from './src/endpoints/tags';
|
|
23
|
+
import { TreeOrders } from './src/endpoints/trees-orders';
|
|
24
|
+
import { TreeOrderStatuses } from './src/endpoints/tree-order-statuses';
|
|
25
|
+
import { User } from './src/endpoints/user';
|
|
26
|
+
import { Users } from './src/endpoints/users';
|
|
27
|
+
import { Utilities } from './src/endpoints/utilities';
|
|
28
|
+
import { Roles } from './src/endpoints/roles';
|
|
29
|
+
import { FieldReports } from './src/endpoints/field-reports';
|
|
30
|
+
import { ExternalReports } from './src/endpoints/external-reports';
|
|
31
|
+
import { Evidence } from './src/endpoints/evidence';
|
|
32
|
+
import { Crumbs } from './src/endpoints/crumbs';
|
|
33
|
+
import { Verifications } from './src/endpoints/verifications';
|
|
34
|
+
import { ImagesAggregated } from './src/endpoints/images-aggregated';
|
|
35
|
+
import { ssoToken } from './src/endpoints/sso-token';
|
|
36
|
+
import { PlantingSites } from './src/endpoints/planting-sites';
|
|
37
|
+
import { Organizations } from './src/endpoints/organizations';
|
|
38
|
+
import { Tasks } from './src/endpoints/tasks';
|
|
39
|
+
import { Geometries } from './src/endpoints/geometries';
|
|
40
|
+
import { Password } from './src/endpoints/password';
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
BulkUploads,
|
|
44
|
+
Countries,
|
|
45
|
+
FieldUpdates,
|
|
46
|
+
FieldUpdateVerifications,
|
|
47
|
+
ForestTypeSpecies,
|
|
48
|
+
ForestTypes,
|
|
49
|
+
ForestTypeProfiles,
|
|
50
|
+
FormSubmissions,
|
|
51
|
+
Methodologies,
|
|
52
|
+
Images,
|
|
53
|
+
Notes,
|
|
54
|
+
Orgs,
|
|
55
|
+
Regions,
|
|
56
|
+
Resellers,
|
|
57
|
+
SDGs,
|
|
58
|
+
Sponsors,
|
|
59
|
+
Standards,
|
|
60
|
+
Stats,
|
|
61
|
+
Subdomains,
|
|
62
|
+
Subsites,
|
|
63
|
+
SubsiteTypes,
|
|
64
|
+
Tags,
|
|
65
|
+
TreeOrders,
|
|
66
|
+
TreeOrderStatuses,
|
|
67
|
+
User,
|
|
68
|
+
Users,
|
|
69
|
+
Utilities,
|
|
70
|
+
Roles,
|
|
71
|
+
FieldReports,
|
|
72
|
+
ExternalReports,
|
|
73
|
+
Evidence,
|
|
74
|
+
Crumbs,
|
|
75
|
+
Verifications,
|
|
76
|
+
ImagesAggregated,
|
|
77
|
+
ssoToken,
|
|
78
|
+
PlantingSites,
|
|
79
|
+
Organizations,
|
|
80
|
+
Tasks,
|
|
81
|
+
Geometries,
|
|
82
|
+
Password
|
|
83
|
+
};
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@veritree/services",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "A collection of javascript functions/services to talk to veritree API",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "index.js",
|
|
7
|
-
"repository": "https://github.com/tentree-org/veritree-services.git",
|
|
8
|
-
"author": "cyroveritree <cyro@veritree.com>",
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"publishConfig": {
|
|
11
|
-
"access": "public"
|
|
12
|
-
},
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"np": "^7.6.2"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@veritree/services",
|
|
3
|
+
"version": "2.35.0",
|
|
4
|
+
"description": "A collection of javascript functions/services to talk to veritree API",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"repository": "https://github.com/tentree-org/veritree-services.git",
|
|
8
|
+
"author": "cyroveritree <cyro@veritree.com>",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"np": "^7.6.2"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Api from "../helpers/api";
|
|
2
|
-
|
|
3
|
-
const resource = "bulk-uploads";
|
|
4
|
-
|
|
1
|
+
import Api from "../helpers/api";
|
|
2
|
+
|
|
3
|
+
const resource = "bulk-uploads";
|
|
4
|
+
|
|
5
5
|
export const BulkUploads = new Api(resource);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Api from "../helpers/api";
|
|
2
|
-
|
|
3
|
-
const resource = "countries";
|
|
4
|
-
|
|
5
|
-
export const Countries = new Api(resource);
|
|
1
|
+
import Api from "../helpers/api";
|
|
2
|
+
|
|
3
|
+
const resource = "countries";
|
|
4
|
+
|
|
5
|
+
export const Countries = new Api(resource);
|
package/src/endpoints/crumbs.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import Api from "../helpers/api";
|
|
2
|
-
|
|
3
|
-
class CrumbsApi extends Api {
|
|
4
|
-
constructor(resource) {
|
|
5
|
-
super(resource);
|
|
6
|
-
this.resource = "crumbs";
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
mapData(crumbId) {
|
|
10
|
-
const all = async () => {
|
|
11
|
-
const url = `${this.getUrl()}/${crumbId}/map-data`;
|
|
12
|
-
return await this.get(url);
|
|
13
|
-
};
|
|
14
|
-
return {
|
|
15
|
-
all,
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const Crumbs = new CrumbsApi();
|
|
1
|
+
import Api from "../helpers/api";
|
|
2
|
+
|
|
3
|
+
class CrumbsApi extends Api {
|
|
4
|
+
constructor(resource) {
|
|
5
|
+
super(resource);
|
|
6
|
+
this.resource = "crumbs";
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
mapData(crumbId) {
|
|
10
|
+
const all = async () => {
|
|
11
|
+
const url = `${this.getUrl()}/${crumbId}/map-data`;
|
|
12
|
+
return await this.get(url);
|
|
13
|
+
};
|
|
14
|
+
return {
|
|
15
|
+
all,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const Crumbs = new CrumbsApi();
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import Api from "../helpers/api";
|
|
2
|
-
|
|
3
|
-
class EvidenceApi extends Api {
|
|
4
|
-
constructor(resource) {
|
|
5
|
-
super(resource);
|
|
6
|
-
this.resource = "evidence";
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
image(imageId, params) {
|
|
10
|
-
|
|
11
|
-
let url = `${this.getUrl()}/image/${imageId}${this.getUrlParams(params)}`
|
|
12
|
-
|
|
13
|
-
const single = async () => {
|
|
14
|
-
return await this.get(url);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const remove = async () => {
|
|
18
|
-
return await this.post(url, null, 'delete');
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return {
|
|
23
|
-
single,
|
|
24
|
-
delete: remove,
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
attachment(attachmentId, params) {
|
|
29
|
-
let url = `${this.getUrl()}/attachment/${attachmentId}${this.getUrlParams(params)}`
|
|
30
|
-
|
|
31
|
-
const single = async () => {
|
|
32
|
-
return await this.get(url);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const remove = async () => {
|
|
36
|
-
return await this.post(url, null, 'delete');
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return {
|
|
41
|
-
single,
|
|
42
|
-
delete: remove,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export const Evidence = new EvidenceApi();
|
|
1
|
+
import Api from "../helpers/api";
|
|
2
|
+
|
|
3
|
+
class EvidenceApi extends Api {
|
|
4
|
+
constructor(resource) {
|
|
5
|
+
super(resource);
|
|
6
|
+
this.resource = "evidence";
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
image(imageId, params) {
|
|
10
|
+
|
|
11
|
+
let url = `${this.getUrl()}/image/${imageId}${this.getUrlParams(params)}`
|
|
12
|
+
|
|
13
|
+
const single = async () => {
|
|
14
|
+
return await this.get(url);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const remove = async () => {
|
|
18
|
+
return await this.post(url, null, 'delete');
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
single,
|
|
24
|
+
delete: remove,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
attachment(attachmentId, params) {
|
|
29
|
+
let url = `${this.getUrl()}/attachment/${attachmentId}${this.getUrlParams(params)}`
|
|
30
|
+
|
|
31
|
+
const single = async () => {
|
|
32
|
+
return await this.get(url);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const remove = async () => {
|
|
36
|
+
return await this.post(url, null, 'delete');
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
single,
|
|
42
|
+
delete: remove,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const Evidence = new EvidenceApi();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import Api from "../helpers/api";
|
|
2
|
-
|
|
3
|
-
class ExternalReportsApi extends Api {
|
|
4
|
-
constructor(resource) {
|
|
5
|
-
super(resource);
|
|
6
|
-
this.resource = "external-reports";
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
1
|
+
import Api from "../helpers/api";
|
|
2
|
+
|
|
3
|
+
class ExternalReportsApi extends Api {
|
|
4
|
+
constructor(resource) {
|
|
5
|
+
super(resource);
|
|
6
|
+
this.resource = "external-reports";
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
10
|
export const ExternalReports = new ExternalReportsApi();
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import Api from "../helpers/api";
|
|
2
|
-
|
|
3
|
-
class FieldReportsApi extends Api {
|
|
4
|
-
constructor(resource) {
|
|
5
|
-
super(resource);
|
|
6
|
-
this.resource = "field-reports";
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
evidence(fieldReportId, params) {
|
|
10
|
-
const url = `${this.getUrl()}/${fieldReportId}/evidence${this.getUrlParams(params)}`;
|
|
11
|
-
|
|
12
|
-
const all = async () => {
|
|
13
|
-
return await this.get(url);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const attach = async (formData) => {
|
|
17
|
-
return await this.post(url, formData);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const detach = async (evidenceId, fileType = 'images') => {
|
|
21
|
-
const url = `${this.getUrl()}/${fieldReportId}/evidence/${fileType}/${evidenceId}${this.getUrlParams()}`;
|
|
22
|
-
return await this.post(url, null, "delete");
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
all,
|
|
27
|
-
attach,
|
|
28
|
-
detach
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
blockchain(fieldReportId, params) {
|
|
33
|
-
const url = `${this.getUrl()}/${fieldReportId}${this.getUrlParams(params)}`;
|
|
34
|
-
return this.get(url)
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
1
|
+
import Api from "../helpers/api";
|
|
2
|
+
|
|
3
|
+
class FieldReportsApi extends Api {
|
|
4
|
+
constructor(resource) {
|
|
5
|
+
super(resource);
|
|
6
|
+
this.resource = "field-reports";
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
evidence(fieldReportId, params) {
|
|
10
|
+
const url = `${this.getUrl()}/${fieldReportId}/evidence${this.getUrlParams(params)}`;
|
|
11
|
+
|
|
12
|
+
const all = async () => {
|
|
13
|
+
return await this.get(url);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const attach = async (formData) => {
|
|
17
|
+
return await this.post(url, formData);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const detach = async (evidenceId, fileType = 'images') => {
|
|
21
|
+
const url = `${this.getUrl()}/${fieldReportId}/evidence/${fileType}/${evidenceId}${this.getUrlParams()}`;
|
|
22
|
+
return await this.post(url, null, "delete");
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
all,
|
|
27
|
+
attach,
|
|
28
|
+
detach
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
blockchain(fieldReportId, params) {
|
|
33
|
+
const url = `${this.getUrl()}/${fieldReportId}${this.getUrlParams(params)}`;
|
|
34
|
+
return this.get(url)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
38
|
export const FieldReports = new FieldReportsApi();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Api from "../helpers/api";
|
|
2
|
-
|
|
3
|
-
const resource = "field-update-verifications";
|
|
4
|
-
|
|
5
|
-
export const FieldUpdateVerifications = new Api(resource);
|
|
1
|
+
import Api from "../helpers/api";
|
|
2
|
+
|
|
3
|
+
const resource = "field-update-verifications";
|
|
4
|
+
|
|
5
|
+
export const FieldUpdateVerifications = new Api(resource);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import Api from "../helpers/api";
|
|
2
|
-
|
|
3
|
-
class FieldUpdatesApi extends Api {
|
|
4
|
-
constructor(resource) {
|
|
5
|
-
super(resource);
|
|
6
|
-
this.resource = "field-updates";
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
async images(fieldUpdateId, args) {
|
|
10
|
-
const url = `${this.getUrl()}/${fieldUpdateId}/images${this.getUrlParams(args)}`;
|
|
11
|
-
|
|
12
|
-
return await this.get(url);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const FieldUpdates = new FieldUpdatesApi();
|
|
1
|
+
import Api from "../helpers/api";
|
|
2
|
+
|
|
3
|
+
class FieldUpdatesApi extends Api {
|
|
4
|
+
constructor(resource) {
|
|
5
|
+
super(resource);
|
|
6
|
+
this.resource = "field-updates";
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
async images(fieldUpdateId, args) {
|
|
10
|
+
const url = `${this.getUrl()}/${fieldUpdateId}/images${this.getUrlParams(args)}`;
|
|
11
|
+
|
|
12
|
+
return await this.get(url);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const FieldUpdates = new FieldUpdatesApi();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Api from "../helpers/api";
|
|
2
|
-
|
|
3
|
-
const resource = "forest-type-species";
|
|
4
|
-
|
|
1
|
+
import Api from "../helpers/api";
|
|
2
|
+
|
|
3
|
+
const resource = "forest-type-species";
|
|
4
|
+
|
|
5
5
|
export const ForestTypeSpecies = new Api(resource);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Api from '../helpers/api';
|
|
2
|
-
|
|
3
|
-
const resource = 'forest-type-profiles';
|
|
4
|
-
|
|
1
|
+
import Api from '../helpers/api';
|
|
2
|
+
|
|
3
|
+
const resource = 'forest-type-profiles';
|
|
4
|
+
|
|
5
5
|
export const ForestTypeProfiles = new Api(resource);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import Api from "../helpers/api";
|
|
2
|
-
import Sequestrations from '../helpers/sequestrations';
|
|
3
|
-
|
|
4
|
-
class ForestTypesApi extends Api {
|
|
5
|
-
constructor(resource) {
|
|
6
|
-
super(resource);
|
|
7
|
-
this.resource = "forest-types";
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
sequestrations(id, args) {
|
|
11
|
-
return Sequestrations(this, id, args);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
1
|
+
import Api from "../helpers/api";
|
|
2
|
+
import Sequestrations from '../helpers/sequestrations';
|
|
3
|
+
|
|
4
|
+
class ForestTypesApi extends Api {
|
|
5
|
+
constructor(resource) {
|
|
6
|
+
super(resource);
|
|
7
|
+
this.resource = "forest-types";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
sequestrations(id, args) {
|
|
11
|
+
return Sequestrations(this, id, args);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
15
|
export const ForestTypes = new ForestTypesApi();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Api from "../helpers/api";
|
|
2
|
-
|
|
3
|
-
const resource = "form-submissions";
|
|
4
|
-
|
|
1
|
+
import Api from "../helpers/api";
|
|
2
|
+
|
|
3
|
+
const resource = "form-submissions";
|
|
4
|
+
|
|
5
5
|
export const FormSubmissions = new Api(resource);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Api from "../helpers/api";
|
|
2
|
-
|
|
3
|
-
const resource = "geometries";
|
|
4
|
-
|
|
1
|
+
import Api from "../helpers/api";
|
|
2
|
+
|
|
3
|
+
const resource = "geometries";
|
|
4
|
+
|
|
5
5
|
export const Geometries = new Api(resource);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Api from "../helpers/api";
|
|
2
|
-
|
|
3
|
-
const resource = "images-aggregated";
|
|
4
|
-
|
|
1
|
+
import Api from "../helpers/api";
|
|
2
|
+
|
|
3
|
+
const resource = "images-aggregated";
|
|
4
|
+
|
|
5
5
|
export const ImagesAggregated = new Api(resource);
|
package/src/endpoints/images.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import Api from "../helpers/api";
|
|
2
|
-
import Relations from "../helpers/relations";
|
|
3
|
-
|
|
4
|
-
class ImagesApi extends Api {
|
|
5
|
-
constructor(resource) {
|
|
6
|
-
super(resource);
|
|
7
|
-
this.resource = "images";
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
rotate(id, data) {
|
|
11
|
-
const url = `${id}/rotate${this.getUrlParams()}`;
|
|
12
|
-
|
|
13
|
-
return this.update(url, data, 'patch');
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
relation(relationPrefix, relationId) {
|
|
17
|
-
return Relations(this, relationPrefix, relationId);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const Images = new ImagesApi();
|
|
1
|
+
import Api from "../helpers/api";
|
|
2
|
+
import Relations from "../helpers/relations";
|
|
3
|
+
|
|
4
|
+
class ImagesApi extends Api {
|
|
5
|
+
constructor(resource) {
|
|
6
|
+
super(resource);
|
|
7
|
+
this.resource = "images";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
rotate(id, data) {
|
|
11
|
+
const url = `${id}/rotate${this.getUrlParams()}`;
|
|
12
|
+
|
|
13
|
+
return this.update(url, data, 'patch');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
relation(relationPrefix, relationId) {
|
|
17
|
+
return Relations(this, relationPrefix, relationId);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const Images = new ImagesApi();
|