starta.apiclient 1.37.7347 → 1.37.7409

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.
@@ -4,7 +4,7 @@ export default class Customers {
4
4
  private _requestRunner;
5
5
  constructor(requestRunner: StartaRequestRunner);
6
6
  get comments(): Comments;
7
- index(organizationLogin: string, { searchQuery, filters, }?: {
7
+ index(organizationLogin: string, { searchQuery, filters, sortColumn, sortDirection, skip, limit, }?: {
8
8
  searchQuery?: string;
9
9
  filters?: {
10
10
  lastOrderDate?: {
@@ -28,6 +28,10 @@ export default class Customers {
28
28
  to?: string;
29
29
  };
30
30
  };
31
+ sortColumn?: 'incrementId' | 'name' | 'lastOrder' | 'totalOrders' | 'paid' | 'discount' | 'createdAt';
32
+ sortDirection?: 'asc' | 'desc';
33
+ skip?: number;
34
+ limit?: number;
31
35
  }): Promise<import("../../../types").StartaResponse>;
32
36
  get(organizationLogin: string, customerId: string): Promise<import("../../../types").StartaResponse>;
33
37
  orders(organizationLogin: string, customerId: string): Promise<import("../../../types").StartaResponse>;
@@ -9,11 +9,15 @@ class Customers {
9
9
  get comments() {
10
10
  return new customerComments_1.default(this._requestRunner);
11
11
  }
12
- index(organizationLogin, { searchQuery, filters, } = {}) {
12
+ index(organizationLogin, { searchQuery, filters, sortColumn, sortDirection, skip, limit, } = {}) {
13
13
  return this._requestRunner.performRequest({
14
14
  url: `accounts/${organizationLogin}/customers${(0, _helpers_1.buildQuery)({
15
15
  searchQuery,
16
16
  filters,
17
+ sortColumn,
18
+ sortDirection,
19
+ skip,
20
+ limit,
17
21
  })}`,
18
22
  method: 'GET',
19
23
  });
@@ -16,7 +16,7 @@ export default class Orders {
16
16
  };
17
17
  statusOperator?: '$eq' | '$ne' | '$in' | '$nin';
18
18
  sortDirection?: 'asc' | 'desc';
19
- sortColumn?: 'starttime';
19
+ sortColumn?: 'incrementId' | 'starttime' | 'price';
20
20
  needsToBeConfirmedByOrganization?: boolean;
21
21
  needsToBeApprovedByCustomer?: boolean;
22
22
  isShownInNotificationCenter?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starta.apiclient",
3
- "version": "1.37.7347",
3
+ "version": "1.37.7409",
4
4
  "main": "./lib/index.js",
5
5
  "description": "Wrapper for starta.one api",
6
6
  "author": "Collaboracia OÜ",