starta.apiclient 1.112.10639 → 1.112.10697

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.
@@ -18,7 +18,8 @@ export default class ProductOperations {
18
18
  skip?: number;
19
19
  limit?: number;
20
20
  }): Promise<import("../../types").StartaResponse>;
21
- add(organizationLogin: string, { date, type, supplier, warehouseId, products, comment }: ProductOperation): Promise<import("../../types").StartaResponse>;
21
+ add(organizationLogin: string, { date, type, supplier, warehouseId, products, comment, status, }: ProductOperation): Promise<import("../../types").StartaResponse>;
22
+ update(organizationLogin: string, operationId: string, { date, type, supplier, warehouseId, products, comment, status, }: ProductOperation): Promise<import("../../types").StartaResponse>;
22
23
  prepare(organizationLogin: string, { productId, quantityForSale, steps, warehouseId, executor, date, }: {
23
24
  productId: string;
24
25
  quantityForSale: number;
@@ -18,7 +18,7 @@ class ProductOperations {
18
18
  method: 'GET',
19
19
  });
20
20
  }
21
- add(organizationLogin, { date, type, supplier, warehouseId, products, comment }) {
21
+ add(organizationLogin, { date, type, supplier, warehouseId, products, comment, status, }) {
22
22
  return this._requestRunner.performRequest({
23
23
  url: `accounts/${organizationLogin}/productOperations`,
24
24
  method: 'POST',
@@ -29,6 +29,22 @@ class ProductOperations {
29
29
  warehouseId,
30
30
  products,
31
31
  comment,
32
+ status,
33
+ },
34
+ });
35
+ }
36
+ update(organizationLogin, operationId, { date, type, supplier, warehouseId, products, comment, status, }) {
37
+ return this._requestRunner.performRequest({
38
+ url: `accounts/${organizationLogin}/productOperations/${operationId}`,
39
+ method: 'PUT',
40
+ body: {
41
+ date,
42
+ type,
43
+ supplier,
44
+ warehouseId,
45
+ products,
46
+ comment,
47
+ status,
32
48
  },
33
49
  });
34
50
  }
package/lib/types.d.ts CHANGED
@@ -124,6 +124,7 @@ export declare type ProductOperation = {
124
124
  organizationLogin: string;
125
125
  date: string;
126
126
  type: 'receiving' | 'writeOff' | 'reconciliation';
127
+ status?: 'planned' | 'finished' | 'cancelled';
127
128
  supplier?: string;
128
129
  warehouseId: string;
129
130
  products: Array<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starta.apiclient",
3
- "version": "1.112.10639",
3
+ "version": "1.112.10697",
4
4
  "main": "./lib/index.js",
5
5
  "description": "Wrapper for starta.one api",
6
6
  "author": "Collaboracia OÜ",