@pintahub/shopify-api 2.1.8 → 2.2.0

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,6 +4,7 @@ export interface GetProductOptionsInput extends Record<string, any> {
4
4
  id: string;
5
5
  }
6
6
  export interface GetProductOptionsOutput extends Record<string, any> {
7
+ options: Record<string, any>[];
7
8
  }
8
9
  export declare class GetProductOptions extends ActionBuilder<AdminApiClient, GetProductOptionsInput, GetProductOptionsOutput> {
9
10
  run(args: GetProductOptionsInput): Promise<GetProductOptionsOutput>;
@@ -44,8 +44,9 @@ class GetProductOptions extends ActionBuilder_1.ActionBuilder {
44
44
  yield (0, handleErrors_1.handleErrors)(errors);
45
45
  const { product } = Object.assign({}, data);
46
46
  const { options } = Object.assign({}, product);
47
+ const arr = Array.isArray(options) ? options : [];
47
48
  return {
48
- options
49
+ options: arr
49
50
  };
50
51
  });
51
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pintahub/shopify-api",
3
- "version": "2.1.8",
3
+ "version": "2.2.0",
4
4
  "description": "",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",