@veritree/services 2.41.1 → 2.42.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.41.1",
3
+ "version": "2.42.0",
4
4
  "description": "A collection of javascript functions/services to talk to veritree API",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -110,6 +110,25 @@ class StandardsApi extends Api {
110
110
  };
111
111
  }
112
112
 
113
+ goalsThemes(goalId) {
114
+ let url = `${this.getUrl()}/goals-themes/${goalId}`;
115
+
116
+ const single = async () => {
117
+ return await this.get(url);
118
+ };
119
+
120
+ const detach = async (themeId) => {
121
+ const args = { id: themeId };
122
+ url = `${url}${this.getUrlParams(args)}`;
123
+ return await this.post(url, null, 'delete');
124
+ };
125
+
126
+ return {
127
+ single,
128
+ delete: detach,
129
+ };
130
+ }
131
+
113
132
  indicators(indicatorId) {
114
133
  const single = async () => {
115
134
  const url = `${this.getUrl()}/indicators/${indicatorId}`;
@@ -132,6 +151,7 @@ class StandardsApi extends Api {
132
151
  delete: remove,
133
152
  };
134
153
  }
154
+
135
155
  UNSDGs(themeId) {
136
156
  const attach = async (data) => {
137
157
  const url = `${this.getUrl()}/themes/${themeId}/attach-sdg`;