@pintahub/shopify-api 1.3.6 → 1.3.8

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,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CreateProduct = void 0;
13
13
  const ActionBuilder_1 = require("../../ActionBuilder");
14
+ const handleErrors_1 = require("../../../utils/handleErrors");
14
15
  class CreateProduct extends ActionBuilder_1.ActionBuilder {
15
16
  run(args) {
16
17
  return __awaiter(this, void 0, void 0, function* () {
@@ -19,6 +20,11 @@ class CreateProduct extends ActionBuilder_1.ActionBuilder {
19
20
  productCreate(input: $input) {
20
21
  product {
21
22
  id
23
+ title
24
+ handle
25
+ status
26
+ productType
27
+ vendor
22
28
  }
23
29
  userErrors {
24
30
  field
@@ -32,8 +38,11 @@ class CreateProduct extends ActionBuilder_1.ActionBuilder {
32
38
  input: args
33
39
  }
34
40
  });
35
- console.log('result', JSON.stringify(result, null, 2));
36
- return {};
41
+ const { data, errors } = Object.assign({}, result);
42
+ yield (0, handleErrors_1.handleErrors)(errors);
43
+ const { productCreate } = data;
44
+ const { product } = Object.assign({}, productCreate);
45
+ return Object.assign({}, product);
37
46
  });
38
47
  }
39
48
  }
@@ -3,6 +3,7 @@ import { ActionBuilder } from "../../ActionBuilder";
3
3
  export interface UpdateProductInput extends Record<string, any> {
4
4
  id: string;
5
5
  status?: string;
6
+ vendor?: string;
6
7
  }
7
8
  export interface UpdateProductOutput extends Record<string, any> {
8
9
  }
@@ -34,6 +34,8 @@ class UpdateProduct extends ActionBuilder_1.ActionBuilder {
34
34
  status
35
35
  title
36
36
  handle
37
+ vendor
38
+ productType
37
39
  }
38
40
  userErrors {
39
41
  field
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pintahub/shopify-api",
3
- "version": "1.3.6",
3
+ "version": "1.3.8",
4
4
  "description": "",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",