@veritree/services 2.24.1 → 2.25.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 +3 -1
- package/package.json +1 -1
- package/src/endpoints/geometries.js +5 -0
- package/src/endpoints/planting-sites.js +14 -2
package/index.js
CHANGED
|
@@ -35,6 +35,7 @@ import { ssoToken } from './src/endpoints/sso-token';
|
|
|
35
35
|
import { PlantingSites } from './src/endpoints/planting-sites';
|
|
36
36
|
import { Organizations } from './src/endpoints/organizations';
|
|
37
37
|
import { Tasks } from './src/endpoints/tasks';
|
|
38
|
+
import { Geometries } from './src/endpoints/geometries';
|
|
38
39
|
|
|
39
40
|
export {
|
|
40
41
|
BulkUploads,
|
|
@@ -73,5 +74,6 @@ export {
|
|
|
73
74
|
ssoToken,
|
|
74
75
|
PlantingSites,
|
|
75
76
|
Organizations,
|
|
76
|
-
Tasks
|
|
77
|
+
Tasks,
|
|
78
|
+
Geometries
|
|
77
79
|
};
|
package/package.json
CHANGED
|
@@ -28,8 +28,14 @@ class PlantingSitesApi extends Api {
|
|
|
28
28
|
return await this.post(url, data);
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
+
const remove = async (imageId, params) => {
|
|
32
|
+
url = `${this.getUrl()}/${subsiteId}/media/images/${imageId}${this.getUrlParams(params)}`
|
|
33
|
+
return await this.post(url, null, "delete");
|
|
34
|
+
};
|
|
35
|
+
|
|
31
36
|
return {
|
|
32
|
-
attach
|
|
37
|
+
attach,
|
|
38
|
+
delete: remove,
|
|
33
39
|
}
|
|
34
40
|
}
|
|
35
41
|
|
|
@@ -42,8 +48,14 @@ class PlantingSitesApi extends Api {
|
|
|
42
48
|
return await this.post(url, data);
|
|
43
49
|
};
|
|
44
50
|
|
|
51
|
+
const remove = async (attachmentId, params) => {
|
|
52
|
+
url = `${this.getUrl()}/${subsiteId}/media/attachments/${attachmentId}${this.getUrlParams(params)}`
|
|
53
|
+
return await this.post(url, null, "delete");
|
|
54
|
+
};
|
|
55
|
+
|
|
45
56
|
return {
|
|
46
|
-
attach
|
|
57
|
+
attach,
|
|
58
|
+
delete: remove,
|
|
47
59
|
}
|
|
48
60
|
}
|
|
49
61
|
|