@veritree/services 2.63.0 → 2.64.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.63.0",
3
+ "version": "2.64.0",
4
4
  "description": "A collection of javascript functions/services to talk to veritree API",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,19 +1,18 @@
1
- import Api from "../helpers/api";
1
+ import Api from '../helpers/api';
2
2
 
3
3
  class InventoryApi extends Api {
4
4
  constructor(resource) {
5
5
  super(resource);
6
- this.resource = "inventory";
6
+ this.resource = 'inventory';
7
7
  }
8
8
 
9
9
  // org type can be organizations, resellers, sponsors
10
- async all(orgType, orgId) {
11
- const url = `${this.baseUrl}/${orgType}/${orgId}/${
12
- this.resource
13
- }`
10
+ async all(orgType, orgId, args) {
11
+ const params = this.getUrlParams({ ...args, orgless: true });
12
+ const url = `${this.baseUrl}/${orgType}/${orgId}/${this.resource}${params}`;
14
13
 
15
- return await this.get(url);
14
+ return await this.get(url, args);
16
15
  }
17
16
  }
18
17
 
19
- export const Inventory = new InventoryApi();
18
+ export const Inventory = new InventoryApi();