merchi_sdk_js 0.0.25 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/inventory.js +2 -0
- package/src/inventory_group.js +5 -3
package/package.json
CHANGED
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',
|
package/src/inventory_group.js
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
import { generateUUID } from './uuid.js';
|
2
2
|
import { addPropertyTo } from './model.js';
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
3
|
+
import { Company } from './company.js';
|
4
|
+
import { Inventory } from './inventory';
|
5
|
+
import { Product } from './product.js';
|
6
|
+
import { Job } from './job.js';
|
6
7
|
import { VariationField } from './variation_field.js';
|
7
8
|
|
8
9
|
export function InventoryGroup() {
|
@@ -12,6 +13,7 @@ export function InventoryGroup() {
|
|
12
13
|
|
13
14
|
addPropertyTo(this, 'archived');
|
14
15
|
addPropertyTo(this, 'id');
|
16
|
+
addPropertyTo(this, 'company', Company);
|
15
17
|
addPropertyTo(this, 'inventories', Inventory);
|
16
18
|
addPropertyTo(this, 'name');
|
17
19
|
addPropertyTo(this, 'products', Product);
|