merchi_sdk_js 0.0.24 → 0.0.26

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "merchi_sdk_js",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "type": "module",
5
5
  "main": "src/merchi.js",
6
6
  "module": "src/merchi.js",
package/src/inventory.js CHANGED
@@ -4,6 +4,7 @@ import { addPropertyTo, serialise, fromJson, create, getOne, deleteOne,
4
4
  import { Address } from './address.js';
5
5
  import { InventoryUnitVariation } from './inventory_unit_variation.js';
6
6
  import { Product } from './product.js';
7
+ import { InventoryGroup } from './inventory_group.js';
7
8
 
8
9
  export function Inventory() {
9
10
  this.resource = '/inventories';
@@ -14,6 +15,7 @@ export function Inventory() {
14
15
  addPropertyTo(this, 'name');
15
16
  addPropertyTo(this, 'notes');
16
17
  addPropertyTo(this, 'quantity');
18
+ addPropertyTo(this, 'inventoryGroups', InventoryGroup)
17
19
  addPropertyTo(this, 'product', Product);
18
20
  addPropertyTo(this, 'address', Address);
19
21
  addPropertyTo(this, 'inventoryUnitVariations',
@@ -0,0 +1,22 @@
1
+ import { generateUUID } from './uuid.js';
2
+ import { addPropertyTo } from './model.js';
3
+ import { Company } from './company.js';
4
+ import { Inventory } from './inventories.js';
5
+ import { Product } from './products.js';
6
+ import { Job } from './jobs.js';
7
+ import { VariationField } from './variation_field.js';
8
+
9
+ export function InventoryGroup() {
10
+ this.resource = '/inventory_groups';
11
+ this.json = 'inventoryGroup';
12
+ this.temporaryId = generateUUID();
13
+
14
+ addPropertyTo(this, 'archived');
15
+ addPropertyTo(this, 'id');
16
+ addPropertyTo(this, 'company', Company);
17
+ addPropertyTo(this, 'inventories', Inventory);
18
+ addPropertyTo(this, 'name');
19
+ addPropertyTo(this, 'products', Product);
20
+ addPropertyTo(this, 'jobs', Job);
21
+ addPropertyTo(this, 'variationFields', VariationField);
22
+ }