@veritree/services 2.36.2 → 2.37.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veritree/services",
3
- "version": "2.36.2",
3
+ "version": "2.37.0",
4
4
  "description": "A collection of javascript functions/services to talk to veritree API",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -12,8 +12,5 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "np": "^7.6.2"
15
- },
16
- "engines": {
17
- "node": ">16.0.0 <=18.16.0"
18
15
  }
19
16
  }
@@ -1,20 +1,26 @@
1
1
  const Sequestrations = (api, forestTypeId, args) => {
2
- let url = `${api.baseUrl}/${api.resource}/${forestTypeId}/sequestrations`;
2
+ let url = `${api.baseUrl}/${api.resource}/${forestTypeId}`;
3
3
 
4
4
  const all = async () => {
5
- url = `${url}${api.getUrlParams(args)}`;
5
+ url = `${url}/sequestrations${api.getUrlParams(args)}`;
6
6
  return await api.get(url);
7
- }
7
+ };
8
8
 
9
- const create = async(data) => {
10
- url = `${url}${api.getUrlParams(args)}`;
9
+ const create = async (data) => {
10
+ url = `${url}/sequestrations${api.getUrlParams(args)}`;
11
11
  return await api.post(url, data);
12
- }
12
+ };
13
+
14
+ const deleteAll = async () => {
15
+ url = `${url}/remove-all-sequestrations${api.getUrlParams(args)}`;
16
+ return await api.post(url);
17
+ };
13
18
 
14
19
  return {
15
20
  all,
16
- create
17
- }
18
- }
21
+ create,
22
+ deleteAll,
23
+ };
24
+ };
19
25
 
20
- export default Sequestrations;
26
+ export default Sequestrations;