@pintahub/shopify-api 1.1.0 → 1.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.
@@ -62,10 +62,35 @@ class GetProduct extends ActionBuilder_1.ActionBuilder {
62
62
  type
63
63
  }
64
64
  }
65
+ images(first: 20) {
66
+ nodes {
67
+ id
68
+ url(transform: {maxWidth: 1000, crop: CENTER, preferredContentType: WEBP})
69
+ height
70
+ altText
71
+ width
72
+ }
73
+ }
74
+ variants(first: 250) {
75
+ nodes {
76
+ id
77
+ availableForSale
78
+ selectedOptions {
79
+ name
80
+ value
81
+ }
82
+ price
83
+ compareAtPrice
84
+ image {
85
+ id
86
+ }
87
+ }
88
+ }
65
89
  }
66
90
  }
67
91
  `;
68
92
  const { data } = yield this.client.request(query);
93
+ console.log('data', data);
69
94
  const { product } = Object.assign({}, data);
70
95
  return Object.assign({}, product);
71
96
  });
@@ -1,6 +1,7 @@
1
1
  import { AdminApiClient } from "@shopify/admin-api-client/dist/ts/types";
2
2
  import { ActionBuilder } from "../../ActionBuilder";
3
3
  export interface SearchProductsInput extends Record<string, any> {
4
+ after?: string;
4
5
  }
5
6
  export interface SearchProductsOutput extends Record<string, any> {
6
7
  items: any[];
@@ -14,12 +14,14 @@ const ActionBuilder_1 = require("../../ActionBuilder");
14
14
  class SearchProducts extends ActionBuilder_1.ActionBuilder {
15
15
  run(args) {
16
16
  return __awaiter(this, void 0, void 0, function* () {
17
+ const { after } = Object.assign({}, args);
17
18
  const query = `
18
19
  {
19
20
  products(
20
- first: 100
21
+ first: 10
21
22
  sortKey: UPDATED_AT
22
23
  reverse: true
24
+ ${after ? `after: "${after}"` : ''}
23
25
  ) {
24
26
  nodes {
25
27
  id
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pintahub/shopify-api",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",