starta.apiclient 1.112.12591 → 1.112.12603

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.
@@ -9,8 +9,8 @@ export default class Products {
9
9
  warehouseIds?: string[];
10
10
  availability?: ProductAvailability[];
11
11
  }): Promise<import("../../types").StartaResponse>;
12
- add(organizationLogin: string, { name, sku, category, categoryId, forSale, equals, forDisposal, netWeight, grossWeight, sellPrice, costPrice, criticalStock, desiredStock, allowSell, allowPublicBooking, publicName, image, description, barcode, }: Product): Promise<import("../../types").StartaResponse>;
13
- update(organizationLogin: string, productId: string, { name, sku, category, categoryId, forSale, equals, forDisposal, netWeight, grossWeight, sellPrice, costPrice, criticalStock, desiredStock, allowSell, allowPublicBooking, publicName, image, description, barcode, }: Product): Promise<import("../../types").StartaResponse>;
12
+ add(organizationLogin: string, { name, sku, category, categoryId, forSale, conversions, netWeight, grossWeight, sellPrice, costPrice, criticalStock, desiredStock, allowSell, allowPublicBooking, publicName, image, description, barcode, }: Product): Promise<import("../../types").StartaResponse>;
13
+ update(organizationLogin: string, productId: string, { name, sku, category, categoryId, forSale, conversions, netWeight, grossWeight, sellPrice, costPrice, criticalStock, desiredStock, allowSell, allowPublicBooking, publicName, image, description, barcode, }: Product): Promise<import("../../types").StartaResponse>;
14
14
  delete(organizationLogin: string, productId: string): Promise<import("../../types").StartaResponse>;
15
15
  get(organizationLogin: string, productId: string): Promise<import("../../types").StartaResponse>;
16
16
  }
@@ -11,7 +11,7 @@ class Products {
11
11
  method: 'GET',
12
12
  });
13
13
  }
14
- add(organizationLogin, { name, sku, category, categoryId, forSale, equals, forDisposal, netWeight, grossWeight, sellPrice, costPrice, criticalStock, desiredStock, allowSell, allowPublicBooking, publicName, image, description, barcode, }) {
14
+ add(organizationLogin, { name, sku, category, categoryId, forSale, conversions, netWeight, grossWeight, sellPrice, costPrice, criticalStock, desiredStock, allowSell, allowPublicBooking, publicName, image, description, barcode, }) {
15
15
  return this._requestRunner.performRequest({
16
16
  url: `accounts/${organizationLogin}/products`,
17
17
  method: 'POST',
@@ -21,8 +21,7 @@ class Products {
21
21
  category,
22
22
  categoryId,
23
23
  forSale,
24
- equals,
25
- forDisposal,
24
+ conversions,
26
25
  netWeight,
27
26
  grossWeight,
28
27
  sellPrice,
@@ -38,7 +37,7 @@ class Products {
38
37
  },
39
38
  });
40
39
  }
41
- update(organizationLogin, productId, { name, sku, category, categoryId, forSale, equals, forDisposal, netWeight, grossWeight, sellPrice, costPrice, criticalStock, desiredStock, allowSell, allowPublicBooking, publicName, image, description, barcode, }) {
40
+ update(organizationLogin, productId, { name, sku, category, categoryId, forSale, conversions, netWeight, grossWeight, sellPrice, costPrice, criticalStock, desiredStock, allowSell, allowPublicBooking, publicName, image, description, barcode, }) {
42
41
  return this._requestRunner.performRequest({
43
42
  url: `accounts/${organizationLogin}/products/${productId}`,
44
43
  method: 'PUT',
@@ -48,8 +47,7 @@ class Products {
48
47
  category,
49
48
  categoryId,
50
49
  forSale,
51
- equals,
52
- forDisposal,
50
+ conversions,
53
51
  netWeight,
54
52
  grossWeight,
55
53
  sellPrice,
package/lib/types.d.ts CHANGED
@@ -126,8 +126,10 @@ export type Product = {
126
126
  };
127
127
  categoryId?: string;
128
128
  forSale: MeasurementUnit;
129
- equals: number;
130
- forDisposal: MeasurementUnit;
129
+ conversions?: Array<{
130
+ equals: number;
131
+ forDisposal: MeasurementUnit;
132
+ }>;
131
133
  netWeight?: number;
132
134
  grossWeight?: number;
133
135
  sellPrice: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starta.apiclient",
3
- "version": "1.112.12591",
3
+ "version": "1.112.12603",
4
4
  "main": "./lib/index.js",
5
5
  "description": "Wrapper for starta.one api",
6
6
  "author": "Collaboracia OÜ",