@veritree/services 0.7.0 → 0.8.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": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "A collection of javascript functions/services to talk to veritree API",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -18,6 +18,18 @@ export const createFieldUpdatesApiService = (orgId, orgType) => {
18
18
  },
19
19
  };
20
20
 
21
+ /**
22
+ *
23
+ * @param {string} fieldUpdateId
24
+ * @param {object} data
25
+ * @returns
26
+ */
27
+ const update = (fieldUpdateId, data) => {
28
+ const url = `${_getUrl()}/${fieldUpdateId}?${_getParams()}`;
29
+
30
+ return Api.update(url, data);
31
+ }
32
+
21
33
  const _getUrl = () => {
22
34
  return `${Api.baseUrl}/${resource}`;
23
35
  };
@@ -35,5 +47,6 @@ export const createFieldUpdatesApiService = (orgId, orgType) => {
35
47
 
36
48
  return {
37
49
  get,
50
+ update
38
51
  };
39
52
  };