@veritree/services 2.46.0 → 2.48.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`;
|
package/src/endpoints/regions.js
CHANGED
|
@@ -52,6 +52,21 @@ class RegionsApi extends Api {
|
|
|
52
52
|
all,
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
+
|
|
56
|
+
milestone(){
|
|
57
|
+
const update = async (regionId, milestoneId) => {
|
|
58
|
+
const url = `${this.getUrl()}/${regionId}/milestones/${milestoneId}`;
|
|
59
|
+
return await this.post(url, null, null);
|
|
60
|
+
};
|
|
61
|
+
const all = async (args) => {
|
|
62
|
+
const url = `${this.getUrl()}/milestones${this.getUrlParams(args)}`;
|
|
63
|
+
return await this.get(url)
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
update,
|
|
67
|
+
all,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
55
70
|
}
|
|
56
71
|
|
|
57
72
|
|