starta.apiclient 1.112.12596 → 1.112.12612

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,10 +9,10 @@ export default class ProductOperations {
9
9
  from?: string;
10
10
  to?: string;
11
11
  };
12
- operationType?: 'writeOff' | 'receiving' | 'sell' | 'reconciliation';
13
- warehouseId?: string;
14
- paymentStatus?: 'paid' | 'unpaid';
15
- status?: 'planned' | 'finished' | 'cancelled';
12
+ operationType?: Array<'writeOff' | 'receiving' | 'sell' | 'reconciliation'>;
13
+ warehouseIds?: Array<string>;
14
+ paymentStatuses?: Array<'paid' | 'partially_paid' | 'unpaid'>;
15
+ statuses?: Array<'planned' | 'finished' | 'cancelled'>;
16
16
  };
17
17
  sortColumn?: 'date' | 'incrementId' | 'employee' | 'contragent' | 'warehouse' | 'product' | 'quantity' | 'price';
18
18
  sortDirection?: 'asc' | 'desc';
@@ -28,7 +28,6 @@ export default class Public {
28
28
  skip: number;
29
29
  limit: number;
30
30
  }): Promise<import("../../types").StartaResponse>;
31
- addPromocode(organizationLogin: string, promocode: string): Promise<import("../../types").StartaResponse>;
32
31
  payForOrder(organizationLogin: string, orderId: string, certificateId: string): Promise<import("../../types").StartaResponse>;
33
32
  createOrder(organizationLogin: any, { products, starttime, scheduleId, customerInfo, customerComment, codes, comment, }: {
34
33
  products: Array<{
@@ -55,5 +54,6 @@ export default class Public {
55
54
  }, referer?: string | null): Promise<import("../../types").StartaResponse>;
56
55
  getOrder(organizationOrUserLogin: string, orderId: string): Promise<import("../../types").StartaResponse>;
57
56
  getOrderPrepaymentDetails(organizationLogin: string, orderId: string): Promise<import("../../types").StartaResponse>;
57
+ findBonus(organizationLogin: string, code: string): Promise<import("../../types").StartaResponse>;
58
58
  }
59
59
  export {};
@@ -48,13 +48,6 @@ class Public {
48
48
  method: 'GET',
49
49
  });
50
50
  }
51
- addPromocode(organizationLogin, promocode) {
52
- return this._requestRunner.performRequest({
53
- url: `accounts/${organizationLogin}/public/promocodes`,
54
- method: 'POST',
55
- body: { promocode },
56
- });
57
- }
58
51
  payForOrder(organizationLogin, orderId, certificateId) {
59
52
  return this._requestRunner.performRequest({
60
53
  url: `accounts/${organizationLogin}/public/orders/${orderId}/pay`,
@@ -94,5 +87,11 @@ class Public {
94
87
  method: 'GET',
95
88
  });
96
89
  }
90
+ findBonus(organizationLogin, code) {
91
+ return this._requestRunner.performRequest({
92
+ url: `accounts/${organizationLogin}/public/bonuses/${code}`,
93
+ method: 'GET',
94
+ });
95
+ }
97
96
  }
98
97
  exports.default = Public;
package/lib/types.d.ts CHANGED
@@ -253,9 +253,11 @@ export type Techcard = {
253
253
  name: string;
254
254
  isEnabled: boolean;
255
255
  type: TechcardType;
256
+ calculationMethod: 'fixedAmount' | 'proportional';
256
257
  products?: Array<{
257
- id: any;
258
- quantityForSale: any;
258
+ id: string;
259
+ quantityForSale: number;
260
+ unit: MeasurementUnit;
259
261
  }>;
260
262
  autoAttach?: boolean;
261
263
  serviceIds?: Array<string>;
@@ -274,6 +276,7 @@ export type TechcardSteps = Array<{
274
276
  warehouseId: string;
275
277
  productId: string;
276
278
  amount: number;
279
+ unit: MeasurementUnit;
277
280
  } | {
278
281
  type: 'comment';
279
282
  comment: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starta.apiclient",
3
- "version": "1.112.12596",
3
+ "version": "1.112.12612",
4
4
  "main": "./lib/index.js",
5
5
  "description": "Wrapper for starta.one api",
6
6
  "author": "Collaboracia OÜ",