Skip to content

Commit e8b7531

Browse files
authored
[FEATURE] Shopify Developer App - update to GraphQL API (#15926)
* updates * pnpm-lock.yaml * pnpm-lock.yaml * version * updates * updates * fix metafield actions * updaets * updates * fix summary
1 parent b314164 commit e8b7531

File tree

62 files changed

+1802
-987
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1802
-987
lines changed
Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,22 @@
11
import shopify from "../../shopify_developer_app.app.mjs";
2-
import common from "@pipedream/shopify/actions/add-product-to-custom-collection/common.mjs";
2+
import common from "@pipedream/shopify/actions/add-product-to-custom-collection/add-product-to-custom-collection.mjs";
3+
4+
import { adjustPropDefinitions } from "../../common/utils.mjs";
5+
6+
const {
7+
name, description, type, ...others
8+
} = common;
9+
const props = adjustPropDefinitions(others.props, shopify);
310

411
export default {
5-
...common,
12+
...others,
613
key: "shopify_developer_app-add-product-to-custom-collection",
7-
name: "Add Products to Custom Collections",
8-
description: "Adds a product or products to a custom collection or collections. [See the docs](https://shopify.dev/docs/api/admin-rest/2023-01/resources/collect#post-collects)",
9-
version: "0.0.4",
10-
type: "action",
14+
version: "0.0.5",
15+
name,
16+
description,
17+
type,
1118
props: {
1219
shopify,
13-
productIds: {
14-
propDefinition: [
15-
shopify,
16-
"productId",
17-
],
18-
type: "string[]",
19-
label: "Product IDs",
20-
},
21-
collectionIds: {
22-
propDefinition: [
23-
shopify,
24-
"collectionId",
25-
],
26-
type: "string[]",
27-
label: "Collection IDs",
28-
description: "IDs of the collections that the product will be added to",
29-
optional: false,
30-
},
20+
...props,
3121
},
3222
};
Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
import shopify from "../../shopify_developer_app.app.mjs";
2-
import common from "@pipedream/shopify/actions/add-tags/common.mjs";
2+
import common from "@pipedream/shopify/actions/add-tags/add-tags.mjs";
3+
4+
import { adjustPropDefinitions } from "../../common/utils.mjs";
5+
6+
const {
7+
name, description, type, ...others
8+
} = common;
9+
const props = adjustPropDefinitions(others.props, shopify);
310

411
export default {
5-
...common,
6-
name: "Add Tags",
7-
version: "0.0.4",
12+
...others,
813
key: "shopify_developer_app-add-tags",
9-
description: "Add tags. [See the documentation](https://shopify.dev/api/admin-graphql/2022-07/mutations/tagsadd)",
10-
type: "action",
14+
version: "0.0.5",
15+
name,
16+
description,
17+
type,
1118
props: {
1219
shopify,
13-
...common.props,
20+
...props,
1421
},
1522
};
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
const RESOURCE_TYPES = [
2+
{
3+
label: "Blog",
4+
value: "blog",
5+
},
6+
{
7+
label: "Collection",
8+
value: "collection",
9+
},
10+
{
11+
label: "Customer",
12+
value: "customer",
13+
},
14+
{
15+
label: "Draft Order",
16+
value: "draftOrder",
17+
},
18+
{
19+
label: "Page",
20+
value: "page",
21+
},
22+
{
23+
label: "Product",
24+
value: "product",
25+
},
26+
{
27+
label: "Product Variant",
28+
value: "variants",
29+
},
30+
{
31+
label: "Article",
32+
value: "article",
33+
},
34+
{
35+
label: "Order",
36+
value: "order",
37+
},
38+
];
39+
40+
const METAFIELD_TYPES = {
41+
"boolean": "boolean",
42+
"collection_reference": "string",
43+
"color": "string",
44+
"date": "string",
45+
"date_time": "string",
46+
"dimension": "object",
47+
"file_reference": "string",
48+
"json": "object",
49+
"metaobject_reference": "string",
50+
"mixed_reference": "string",
51+
"money": "object",
52+
"multi_line_text_field": "string",
53+
"number_decimal": "string",
54+
"number_integer": "integer",
55+
"page_reference": "string",
56+
"product_reference": "string",
57+
"rating": "object",
58+
"single_line_text_field": "string",
59+
"url": "string",
60+
"variant_reference": "string",
61+
"volume": "object",
62+
"weight": "object",
63+
"list.collection_reference": "string[]",
64+
"list.color": "string[]",
65+
"list.date": "string[]",
66+
"list.date_time": "string[]",
67+
"list.dimension": "string[]",
68+
"list.file_reference": "string[]",
69+
"list.metaobject_reference": "string[]",
70+
"list.mixed_reference": "string[]",
71+
"list.number_integer": "string[]",
72+
"list.number_decimal": "string[]",
73+
"list.page_reference": "string[]",
74+
"list.product_reference": "string[]",
75+
"list.rating": "string[]",
76+
"list.single_line_text_field": "string[]",
77+
"list.url": "string[]",
78+
"list.variant_reference": "string[]",
79+
"list.volume": "string[]",
80+
"list.weight": "string[]",
81+
};
82+
83+
export default {
84+
RESOURCE_TYPES,
85+
METAFIELD_TYPES,
86+
};

0 commit comments

Comments
 (0)