@veritree/services 1.5.0-1 → 1.5.0-4

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 CHANGED
@@ -19,6 +19,7 @@ import { SubsiteTypes } from './src/endpoints/subsite-types';
19
19
  import { Tags } from './src/endpoints/tags';
20
20
  import { TreeOrders } from './src/endpoints/trees-orders';
21
21
  import { User } from './src/endpoints/user';
22
+ import { Users } from './src/endpoints/users';
22
23
 
23
24
  export {
24
25
  BulkUploads,
@@ -41,5 +42,6 @@ export {
41
42
  SubsiteTypes,
42
43
  Tags,
43
44
  TreeOrders,
44
- User
45
+ User,
46
+ Users
45
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veritree/services",
3
- "version": "1.5.0-1",
3
+ "version": "1.5.0-4",
4
4
  "description": "A collection of javascript functions/services to talk to veritree API",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -6,6 +6,12 @@ class ImagesApi extends Api {
6
6
  this.resource = "images";
7
7
  }
8
8
 
9
+ rotate(id, data) {
10
+ const url = `${id}/rotate${this.getUrlParams()}`;
11
+
12
+ return this.update(url, data, 'patch');
13
+ }
14
+
9
15
  relation(prefix, id) {
10
16
  return Relations(this, prefix, id);
11
17
  }
@@ -6,6 +6,11 @@ class OrgsApi extends Api {
6
6
  this.resource = "orgs";
7
7
  }
8
8
 
9
+ async roles(orgId, params) {
10
+ const url = `${this.getUrl()}/${orgId}/roles${this.getUrlParams(params)}`;
11
+ return await this.get(url);
12
+ }
13
+
9
14
  async stats() {
10
15
  const url = `${this._geStatstUrl()}`;
11
16
  return await this.get(url);
@@ -0,0 +1,5 @@
1
+ import Api from '../helpers/api';
2
+
3
+ const resource = 'users';
4
+
5
+ export const Users = new Api(resource);