@veritree/services 2.47.0 → 2.49.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/package.json
CHANGED
|
@@ -51,6 +51,7 @@ class FieldReportsApi extends Api {
|
|
|
51
51
|
const url = `${this.getUrl()}/${fieldReportId}/attach-initiatives${this.getUrlParams(
|
|
52
52
|
params
|
|
53
53
|
)}`;
|
|
54
|
+
|
|
54
55
|
return this.post(url, formData, null, params);
|
|
55
56
|
}
|
|
56
57
|
|
|
@@ -58,9 +59,24 @@ class FieldReportsApi extends Api {
|
|
|
58
59
|
const url = `${this.getUrl()}/${fieldReportId}/detach-initiatives${this.getUrlParams(
|
|
59
60
|
params
|
|
60
61
|
)}`;
|
|
62
|
+
|
|
61
63
|
return this.post(url, formData, null, params);
|
|
62
64
|
}
|
|
63
65
|
|
|
66
|
+
mapTiles(fieldReportId, params) {
|
|
67
|
+
const url = `${this.getUrl()}/${fieldReportId}/map-tiles${this.getUrlParams(
|
|
68
|
+
params
|
|
69
|
+
)}`;
|
|
70
|
+
|
|
71
|
+
const attach = async (base64String) => {
|
|
72
|
+
return await this.post(url, base64String);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
attach,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
64
80
|
phases() {
|
|
65
81
|
const all = async () => {
|
|
66
82
|
const url = `${this.getUrl()}/phases`;
|
|
@@ -54,6 +54,17 @@ class OrganizationsApi extends Api {
|
|
|
54
54
|
|
|
55
55
|
return { all };
|
|
56
56
|
}
|
|
57
|
+
|
|
58
|
+
metrics(orgId) {
|
|
59
|
+
const all = async (args) => {
|
|
60
|
+
const url = `${this.getUrl()}/${orgId}/metrics${this.getUrlParams(args)}`;
|
|
61
|
+
return await this.get(url);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
return {
|
|
65
|
+
all,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
57
68
|
}
|
|
58
69
|
|
|
59
70
|
export const Organizations = new OrganizationsApi();
|