@veritree/services 2.2.0 → 2.4.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/orgs.js +2 -2
- package/src/endpoints/roles.js +5 -0
- package/src/helpers/api.js +0 -2
package/index.js
CHANGED
|
@@ -20,6 +20,7 @@ import { Tags } from './src/endpoints/tags';
|
|
|
20
20
|
import { TreeOrders } from './src/endpoints/trees-orders';
|
|
21
21
|
import { User } from './src/endpoints/user';
|
|
22
22
|
import { Users } from './src/endpoints/users';
|
|
23
|
+
import { Roles } from './src/endpoints/roles';
|
|
23
24
|
|
|
24
25
|
export {
|
|
25
26
|
BulkUploads,
|
|
@@ -43,5 +44,6 @@ export {
|
|
|
43
44
|
Tags,
|
|
44
45
|
TreeOrders,
|
|
45
46
|
User,
|
|
46
|
-
Users
|
|
47
|
+
Users,
|
|
48
|
+
Roles
|
|
47
49
|
}
|
package/package.json
CHANGED
package/src/endpoints/orgs.js
CHANGED
|
@@ -18,9 +18,9 @@ class OrgsApi extends Api {
|
|
|
18
18
|
return await this.get(url);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
async emails(orgId, params) {
|
|
21
|
+
async emails(orgId, data, params) {
|
|
22
22
|
const url = `${this.getUrl()}/${orgId}/emails${this.getUrlParams(params)}`;
|
|
23
|
-
return await this.
|
|
23
|
+
return await this.post(url, data);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
async stats() {
|
package/src/helpers/api.js
CHANGED
|
@@ -134,9 +134,7 @@ export default class Api {
|
|
|
134
134
|
* @returns {promise}
|
|
135
135
|
*/
|
|
136
136
|
async post(url, data, as, args) {
|
|
137
|
-
// console.log(args);
|
|
138
137
|
if (!url) url = `${this.getUrl()}${this.getUrlParams(args)}`;
|
|
139
|
-
console.log(url);
|
|
140
138
|
return await this.unWrap(url, "post", data, as);
|
|
141
139
|
}
|
|
142
140
|
|