@pintahub/shopify-api 2.1.1 → 2.1.2

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.
@@ -11,13 +11,14 @@ export declare class AdminAPI {
11
11
  private readonly options;
12
12
  private readonly client?;
13
13
  readonly product?: AdminProductAPIInterface;
14
- readonly metaobject?: AdminMetaObjectAPIInterface;
15
14
  readonly order?: AdminOrderAPIInterface;
16
15
  readonly files?: AdminFileAPIInterface;
17
16
  readonly menus: AdminMenuAPIInterface;
18
17
  readonly products: AdminProductsAPIInterface;
19
18
  readonly customers: AdminCustomersAPIInterface;
20
19
  readonly collections: AdminCollectionAPIInterface;
20
+ readonly metaobject: AdminMetaObjectAPIInterface;
21
+ readonly orders: AdminOrderAPIInterface;
21
22
  constructor(options: APIOptions);
22
23
  private _createClient;
23
24
  }
@@ -18,7 +18,7 @@ class AdminAPI {
18
18
  this.options = Object.assign({}, defaultOptions, options);
19
19
  const { legacy } = this.options;
20
20
  if (legacy) {
21
- this.client = this._createClient();
21
+ this.client = this._createClient('2023-10');
22
22
  this.product = new products_1.AdminProductAPI(this.client);
23
23
  this.order = new orders_1.AdminOrderAPI(this.client);
24
24
  }
@@ -28,6 +28,7 @@ class AdminAPI {
28
28
  this.collections = new collections_1.AdminCollectionAPI(this._createClient('2024-10'));
29
29
  this.files = new files_1.AdminFileAPI(this._createClient('2024-10'));
30
30
  this.metaobject = new metaobjects_1.AdminMetaObjectAPI(this._createClient('2024-10'));
31
+ this.orders = new orders_1.AdminOrderAPI(this._createClient('2024-10'));
31
32
  }
32
33
  _createClient(apiVersion = '2023-10') {
33
34
  const { shop, accessToken } = this.options;
@@ -26,6 +26,7 @@ class SearchOrders extends ActionBuilder_1.ActionBuilder {
26
26
  ) {
27
27
  nodes {
28
28
  id
29
+ name
29
30
  }
30
31
  pageInfo {
31
32
  hasNextPage
@@ -34,7 +35,7 @@ class SearchOrders extends ActionBuilder_1.ActionBuilder {
34
35
  }
35
36
  }
36
37
  `;
37
- const { data, errors, extensions } = yield this.client.request(query);
38
+ const { data, errors } = yield this.client.request(query);
38
39
  yield (0, handleErrors_1.handleErrors)(errors);
39
40
  const { orders } = Object.assign({}, data);
40
41
  const { nodes, pageInfo } = Object.assign({}, orders);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pintahub/shopify-api",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",