@pipedream/shopify_developer_app 0.6.4 → 0.7.1
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.
- package/actions/add-product-to-custom-collection/add-product-to-custom-collection.mjs +14 -24
- package/actions/add-tags/add-tags.mjs +14 -7
- package/actions/common/constants.mjs +86 -0
- package/actions/common/metafield-actions.mjs +264 -3
- package/actions/create-article/create-article.mjs +16 -28
- package/actions/create-blog/create-blog.mjs +16 -15
- package/actions/create-custom-collection/create-custom-collection.mjs +14 -28
- package/actions/create-customer/create-customer.mjs +27 -5
- package/actions/create-metafield/create-metafield.mjs +50 -8
- package/actions/create-metaobject/create-metaobject.mjs +14 -19
- package/actions/create-order/create-order.mjs +147 -10
- package/actions/create-page/create-page.mjs +16 -21
- package/actions/create-product/create-product.mjs +14 -61
- package/actions/create-product-variant/create-product-variant.mjs +14 -48
- package/actions/create-smart-collection/create-smart-collection.mjs +14 -19
- package/actions/delete-article/delete-article.mjs +16 -23
- package/actions/delete-blog/delete-blog.mjs +16 -14
- package/actions/delete-metafield/delete-metafield.mjs +41 -8
- package/actions/delete-page/delete-page.mjs +16 -14
- package/actions/get-articles/get-articles.mjs +16 -14
- package/actions/get-metafields/get-metafields.mjs +40 -8
- package/actions/get-metaobjects/get-metaobjects.mjs +14 -18
- package/actions/get-order/get-order.mjs +9 -7
- package/actions/get-pages/get-pages.mjs +16 -8
- package/actions/search-custom-collection-by-name/search-custom-collection-by-name.mjs +14 -14
- package/actions/search-customers/search-customers.mjs +23 -13
- package/actions/search-product-variant/search-product-variant.mjs +14 -30
- package/actions/search-products/search-products.mjs +14 -40
- package/actions/update-article/update-article.mjs +16 -37
- package/actions/update-customer/update-customer.mjs +32 -5
- package/actions/update-inventory-level/update-inventory-level.mjs +14 -28
- package/actions/update-metafield/update-metafield.mjs +18 -15
- package/actions/update-metaobject/update-metaobject.mjs +14 -24
- package/actions/update-page/update-page.mjs +16 -27
- package/actions/update-product/update-product.mjs +92 -41
- package/actions/update-product-variant/update-product-variant.mjs +14 -71
- package/common/mutations.mjs +124 -0
- package/common/queries.mjs +181 -0
- package/common/utils.mjs +40 -0
- package/package.json +2 -2
- package/shopify_developer_app.app.mjs +130 -1
- package/sources/common/webhook.mjs +17 -9
- package/sources/new-abandoned-cart/new-abandoned-cart.mjs +14 -8
- package/sources/new-article/new-article.mjs +15 -9
- package/sources/new-cancelled-order/new-cancelled-order.mjs +3 -4
- package/sources/new-customer-created/new-customer-created.mjs +3 -4
- package/sources/new-draft-order/new-draft-order.mjs +3 -4
- package/sources/new-event-emitted/new-event-emitted.mjs +10 -4
- package/sources/new-fulfillment-event/new-fulfillment-event.mjs +3 -4
- package/sources/new-order-created/new-order-created.mjs +3 -13
- package/sources/new-order-fulfilled/new-order-fulfilled.mjs +3 -4
- package/sources/new-page/new-page.mjs +15 -9
- package/sources/new-paid-order/new-paid-order.mjs +3 -4
- package/sources/new-product-created/new-product-created.mjs +3 -4
- package/sources/new-product-updated/new-product-updated.mjs +3 -4
- package/sources/new-refund-created/new-refund-created.mjs +2 -3
- package/sources/new-updated-customer/new-updated-customer.mjs +3 -4
- package/sources/new-updated-order/new-updated-order.mjs +3 -4
- package/sources/product-added-to-custom-collection/product-added-to-custom-collection.mjs +15 -9
- package/actions/common/metaobjects.mjs +0 -21
- package/common/rest-admin.mjs +0 -97
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import shopify from "../../shopify_developer_app.app.mjs";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import common from "@pipedream/shopify/actions/create-metaobject/create-metaobject.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);
|
|
4
10
|
|
|
5
11
|
export default {
|
|
6
|
-
...
|
|
7
|
-
...common,
|
|
12
|
+
...others,
|
|
8
13
|
key: "shopify_developer_app-create-metaobject",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
type
|
|
14
|
+
version: "0.0.8",
|
|
15
|
+
name,
|
|
16
|
+
description,
|
|
17
|
+
type,
|
|
13
18
|
props: {
|
|
14
19
|
shopify,
|
|
15
|
-
|
|
16
|
-
type: "string",
|
|
17
|
-
label: "Type",
|
|
18
|
-
description: "The Metaobject Type",
|
|
19
|
-
async options() {
|
|
20
|
-
const { data: { metaobjectDefinitions: { nodes } } }
|
|
21
|
-
= await this.listMetaobjectDefinitions();
|
|
22
|
-
return nodes?.map(({ type }) => type) || [];
|
|
23
|
-
},
|
|
24
|
-
reloadProps: true,
|
|
25
|
-
},
|
|
20
|
+
...props,
|
|
26
21
|
},
|
|
27
22
|
};
|
|
@@ -1,26 +1,163 @@
|
|
|
1
1
|
import shopify from "../../shopify_developer_app.app.mjs";
|
|
2
|
-
import
|
|
3
|
-
import { toSingleLineString } from "@pipedream/shopify/actions/common/common.mjs";
|
|
2
|
+
import utils from "@pipedream/shopify/common/utils.mjs";
|
|
4
3
|
|
|
5
4
|
export default {
|
|
6
|
-
...common,
|
|
7
5
|
key: "shopify_developer_app-create-order",
|
|
8
6
|
name: "Create Order",
|
|
9
|
-
description:
|
|
10
|
-
|
|
11
|
-
or [see examples](https://shopify.dev/api/admin-rest/2022-01/resources/order#[post]/admin/api/#{api_version}/orders.json_examples)
|
|
12
|
-
`),
|
|
13
|
-
version: "0.0.4",
|
|
7
|
+
description: "Creates a new order. For full order object details [See the documentation](https://shopify.dev/docs/api/admin-graphql/latest/mutations/ordercreate)",
|
|
8
|
+
version: "0.0.6",
|
|
14
9
|
type: "action",
|
|
15
10
|
props: {
|
|
16
11
|
shopify,
|
|
12
|
+
lineItems: {
|
|
13
|
+
type: "string[]",
|
|
14
|
+
label: "Line Items",
|
|
15
|
+
description: "A list of line item objects, each containing information about an item in the order. Example: `{ \"variantId\": \"gid://shopify/ProductVariant/44572675571992\", \"quantity\": 1, \"title\": \"Title\" }`. More details in [Shopify Order Object](https://shopify.dev/docs/api/admin-graphql/latest/objects/order)",
|
|
16
|
+
},
|
|
17
|
+
billingAddress: {
|
|
18
|
+
type: "object",
|
|
19
|
+
label: "Billing Address",
|
|
20
|
+
description: "The mailing address associated with the payment method. More details when searching **billing_address** in [Shopify Order Object](https://shopify.dev/docs/api/admin-graphql/latest/objects/order)",
|
|
21
|
+
optional: true,
|
|
22
|
+
},
|
|
23
|
+
shippingAddress: {
|
|
24
|
+
type: "object",
|
|
25
|
+
label: "Shipping Address",
|
|
26
|
+
description: "The mailing address to where the order will be shipped. More details when searching **billing_address** in [Shopify Order Object](https://shopify.dev/docs/api/admin-graphql/latest/objects/order)",
|
|
27
|
+
optional: true,
|
|
28
|
+
},
|
|
29
|
+
financialStatus: {
|
|
30
|
+
type: "string",
|
|
31
|
+
label: "Financial Status",
|
|
32
|
+
description: "The status of payments associated with the order. Can only be set when the order is created",
|
|
33
|
+
options: [
|
|
34
|
+
"PENDING",
|
|
35
|
+
"AUTHORIZED",
|
|
36
|
+
"PARTIALLY_PAID",
|
|
37
|
+
"PAID",
|
|
38
|
+
"PARTIALLY_REFUNDED",
|
|
39
|
+
"REFUNDED",
|
|
40
|
+
"VOIDED",
|
|
41
|
+
],
|
|
42
|
+
optional: true,
|
|
43
|
+
},
|
|
44
|
+
discountCode: {
|
|
45
|
+
type: "object",
|
|
46
|
+
label: "Discount Code",
|
|
47
|
+
description: "A discount applied to the order. Example: `{ \"code\": \"SPRING30\", \"type\": \"fixed_amount\", \"amount\": \"30.00\" }`. More details when searching **discount_codes** in [Shopify Order Object](https://shopify.dev/docs/api/admin-graphql/latest/objects/order)",
|
|
48
|
+
optional: true,
|
|
49
|
+
},
|
|
50
|
+
fulfillment: {
|
|
51
|
+
type: "object",
|
|
52
|
+
label: "Fulfillment",
|
|
53
|
+
description: "Fulfillment associated with the order. For more information, see the [Fulfillment Object](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCreateFulfillmentInput)",
|
|
54
|
+
optional: true,
|
|
55
|
+
},
|
|
56
|
+
fulfillmentStatus: {
|
|
57
|
+
type: "string",
|
|
58
|
+
label: "Fulfillment Status",
|
|
59
|
+
description: "The order's status in terms of fulfilled line items",
|
|
60
|
+
options: [
|
|
61
|
+
"FULFILLED",
|
|
62
|
+
"NULL",
|
|
63
|
+
"PARTIAL",
|
|
64
|
+
"RESTOCKED",
|
|
65
|
+
],
|
|
66
|
+
optional: true,
|
|
67
|
+
},
|
|
68
|
+
sendReceipt: {
|
|
69
|
+
type: "boolean",
|
|
70
|
+
label: "Send Receipt",
|
|
71
|
+
description: "Whether to send an order confirmation to the customer",
|
|
72
|
+
optional: true,
|
|
73
|
+
},
|
|
74
|
+
sendFulfillmentReceipt: {
|
|
75
|
+
type: "boolean",
|
|
76
|
+
label: "Send Fulfillment Receipt",
|
|
77
|
+
description: "Whether to send a shipping confirmation to the customer",
|
|
78
|
+
optional: true,
|
|
79
|
+
},
|
|
80
|
+
taxLines: {
|
|
81
|
+
type: "string[]",
|
|
82
|
+
label: "Tax Lines",
|
|
83
|
+
description: "An array of tax line objects, each of which details a tax applicable to the order. Example: `[ { \"rate\": 0.06, \"price\": 11.94, \"title\": \"State Tax\", \"channel_liable\": true } ]`. More details when searching **tax_lines** in [Shopify Order Object](https://shopify.dev/docs/api/admin-graphql/latest/objects/order)",
|
|
84
|
+
optional: true,
|
|
85
|
+
},
|
|
86
|
+
currency: {
|
|
87
|
+
type: "string",
|
|
88
|
+
label: "Currency",
|
|
89
|
+
description: "The three-letter code ([ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format) for the shop currency",
|
|
90
|
+
optional: true,
|
|
91
|
+
},
|
|
92
|
+
note: {
|
|
93
|
+
type: "string",
|
|
94
|
+
label: "Note",
|
|
95
|
+
description: "An optional note that a shop owner can attach to the order",
|
|
96
|
+
optional: true,
|
|
97
|
+
},
|
|
98
|
+
inventoryBehavior: {
|
|
99
|
+
type: "string",
|
|
100
|
+
label: "Inventory Behavior",
|
|
101
|
+
description: "The behaviour to use when updating inventory",
|
|
102
|
+
options: [
|
|
103
|
+
{
|
|
104
|
+
value: "BYPASS",
|
|
105
|
+
label: "Do not claim inventory",
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
value: "DECREMENT_IGNORING_POLICY",
|
|
109
|
+
label: "Ignore the product's inventory policy and claim inventory",
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
value: "DECREMENT_OBEYING_POLICY",
|
|
113
|
+
label: "Follow the product's inventory policy and claim inventory, if possible",
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
optional: true,
|
|
117
|
+
},
|
|
118
|
+
shippingLines: {
|
|
119
|
+
type: "string[]",
|
|
120
|
+
label: "Shipping Lines",
|
|
121
|
+
description: "An array of objects, each of which details a shipping method used. More details when searching **shipping_lines** in [Shopify Order Object](https://shopify.dev/docs/api/admin-graphql/latest/objects/order)",
|
|
122
|
+
optional: true,
|
|
123
|
+
},
|
|
17
124
|
customerId: {
|
|
18
125
|
propDefinition: [
|
|
19
126
|
shopify,
|
|
20
127
|
"customerId",
|
|
21
128
|
],
|
|
22
|
-
optional: true,
|
|
23
129
|
},
|
|
24
|
-
|
|
130
|
+
},
|
|
131
|
+
async run({ $ }) {
|
|
132
|
+
const response = await this.shopify.createOrder({
|
|
133
|
+
options: {
|
|
134
|
+
sendReceipt: this.sendReceipt,
|
|
135
|
+
sendFulfillmentReceipt: this.sendFulfillmentReceipt,
|
|
136
|
+
inventoryBehaviour: this.inventoryBehavior,
|
|
137
|
+
},
|
|
138
|
+
order: {
|
|
139
|
+
lineItems: utils.parseJson(this.lineItems),
|
|
140
|
+
billingAddress: utils.parseJson(this.billingAddress),
|
|
141
|
+
shippingAddress: utils.parseJson(this.shippingAddress),
|
|
142
|
+
financialStatus: this.financialStatus,
|
|
143
|
+
discountCode: utils.parseJson(this.discountCode),
|
|
144
|
+
fulfillment: utils.parseJson(this.fulfillment),
|
|
145
|
+
fulfillmentStatus: this.fulfillmentStatus,
|
|
146
|
+
taxLines: utils.parseJson(this.taxLines),
|
|
147
|
+
currency: this.currency,
|
|
148
|
+
customer: {
|
|
149
|
+
toAssociate: {
|
|
150
|
+
id: this.customerId,
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
note: this.note,
|
|
154
|
+
shippingLines: utils.parseJson(this.shippingLines),
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
if (response.orderCreate.userErrors.length > 0) {
|
|
158
|
+
throw new Error(response.orderCreate.userErrors[0].message);
|
|
159
|
+
}
|
|
160
|
+
$.export("$summary", `Created new order with ID \`${response.orderCreate.order.id}\``);
|
|
161
|
+
return response;
|
|
25
162
|
},
|
|
26
163
|
};
|
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import common from "@pipedream/shopify/actions/create-page/
|
|
1
|
+
import shopify from "../../shopify_developer_app.app.mjs";
|
|
2
|
+
import common from "@pipedream/shopify/actions/create-page/create-page.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);
|
|
3
10
|
|
|
4
11
|
export default {
|
|
5
|
-
...
|
|
12
|
+
...others,
|
|
6
13
|
key: "shopify_developer_app-create-page",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type
|
|
14
|
+
version: "0.0.8",
|
|
15
|
+
name,
|
|
16
|
+
description,
|
|
17
|
+
type,
|
|
11
18
|
props: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
description: "The title of the page.",
|
|
15
|
-
propDefinition: [
|
|
16
|
-
app,
|
|
17
|
-
"title",
|
|
18
|
-
],
|
|
19
|
-
},
|
|
20
|
-
bodyHtml: {
|
|
21
|
-
propDefinition: [
|
|
22
|
-
app,
|
|
23
|
-
"bodyHtml",
|
|
24
|
-
],
|
|
25
|
-
},
|
|
19
|
+
shopify,
|
|
20
|
+
...props,
|
|
26
21
|
},
|
|
27
22
|
};
|
|
@@ -1,69 +1,22 @@
|
|
|
1
1
|
import shopify from "../../shopify_developer_app.app.mjs";
|
|
2
|
-
import common from "@pipedream/shopify/actions/create-product/
|
|
2
|
+
import common from "@pipedream/shopify/actions/create-product/create-product.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);
|
|
3
10
|
|
|
4
11
|
export default {
|
|
5
|
-
...
|
|
12
|
+
...others,
|
|
6
13
|
key: "shopify_developer_app-create-product",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type
|
|
14
|
+
version: "0.0.6",
|
|
15
|
+
name,
|
|
16
|
+
description,
|
|
17
|
+
type,
|
|
11
18
|
props: {
|
|
12
19
|
shopify,
|
|
13
|
-
|
|
14
|
-
propDefinition: [
|
|
15
|
-
shopify,
|
|
16
|
-
"title",
|
|
17
|
-
],
|
|
18
|
-
},
|
|
19
|
-
productDescription: {
|
|
20
|
-
propDefinition: [
|
|
21
|
-
shopify,
|
|
22
|
-
"productDescription",
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
vendor: {
|
|
26
|
-
propDefinition: [
|
|
27
|
-
shopify,
|
|
28
|
-
"vendor",
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
productType: {
|
|
32
|
-
propDefinition: [
|
|
33
|
-
shopify,
|
|
34
|
-
"productType",
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
status: {
|
|
38
|
-
propDefinition: [
|
|
39
|
-
shopify,
|
|
40
|
-
"status",
|
|
41
|
-
],
|
|
42
|
-
},
|
|
43
|
-
images: {
|
|
44
|
-
propDefinition: [
|
|
45
|
-
shopify,
|
|
46
|
-
"images",
|
|
47
|
-
],
|
|
48
|
-
},
|
|
49
|
-
options: {
|
|
50
|
-
propDefinition: [
|
|
51
|
-
shopify,
|
|
52
|
-
"options",
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
variants: {
|
|
56
|
-
propDefinition: [
|
|
57
|
-
shopify,
|
|
58
|
-
"variants",
|
|
59
|
-
],
|
|
60
|
-
},
|
|
61
|
-
tags: {
|
|
62
|
-
propDefinition: [
|
|
63
|
-
shopify,
|
|
64
|
-
"tags",
|
|
65
|
-
],
|
|
66
|
-
},
|
|
67
|
-
...common.props,
|
|
20
|
+
...props,
|
|
68
21
|
},
|
|
69
22
|
};
|
|
@@ -1,56 +1,22 @@
|
|
|
1
1
|
import shopify from "../../shopify_developer_app.app.mjs";
|
|
2
|
-
import common from "@pipedream/shopify/actions/create-product-variant/
|
|
2
|
+
import common from "@pipedream/shopify/actions/create-product-variant/create-product-variant.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);
|
|
3
10
|
|
|
4
11
|
export default {
|
|
5
|
-
...
|
|
12
|
+
...others,
|
|
6
13
|
key: "shopify_developer_app-create-product-variant",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type
|
|
14
|
+
version: "0.0.7",
|
|
15
|
+
name,
|
|
16
|
+
description,
|
|
17
|
+
type,
|
|
11
18
|
props: {
|
|
12
19
|
shopify,
|
|
13
|
-
|
|
14
|
-
propDefinition: [
|
|
15
|
-
shopify,
|
|
16
|
-
"productId",
|
|
17
|
-
],
|
|
18
|
-
},
|
|
19
|
-
option: {
|
|
20
|
-
propDefinition: [
|
|
21
|
-
shopify,
|
|
22
|
-
"option",
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
price: {
|
|
26
|
-
propDefinition: [
|
|
27
|
-
shopify,
|
|
28
|
-
"price",
|
|
29
|
-
],
|
|
30
|
-
description: "The price of the product variant",
|
|
31
|
-
},
|
|
32
|
-
imageId: {
|
|
33
|
-
propDefinition: [
|
|
34
|
-
shopify,
|
|
35
|
-
"imageId",
|
|
36
|
-
(c) => ({
|
|
37
|
-
productId: c.productId,
|
|
38
|
-
}),
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
sku: {
|
|
42
|
-
propDefinition: [
|
|
43
|
-
shopify,
|
|
44
|
-
"sku",
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
locationId: {
|
|
48
|
-
propDefinition: [
|
|
49
|
-
shopify,
|
|
50
|
-
"locationId",
|
|
51
|
-
],
|
|
52
|
-
optional: true,
|
|
53
|
-
},
|
|
54
|
-
...common.props,
|
|
20
|
+
...props,
|
|
55
21
|
},
|
|
56
22
|
};
|
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import shopify from "../../shopify_developer_app.app.mjs";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import common from "@pipedream/shopify/actions/create-smart-collection/create-smart-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);
|
|
4
10
|
|
|
5
11
|
export default {
|
|
6
|
-
...
|
|
12
|
+
...others,
|
|
7
13
|
key: "shopify_developer_app-create-smart-collection",
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
[See documentation](https://shopify.dev/api/admin-rest/2021-10/resources/smartcollection#post-smart-collections)
|
|
13
|
-
`),
|
|
14
|
-
version: "0.0.4",
|
|
15
|
-
type: "action",
|
|
14
|
+
version: "0.0.6",
|
|
15
|
+
name,
|
|
16
|
+
description,
|
|
17
|
+
type,
|
|
16
18
|
props: {
|
|
17
19
|
shopify,
|
|
18
|
-
|
|
19
|
-
propDefinition: [
|
|
20
|
-
shopify,
|
|
21
|
-
"title",
|
|
22
|
-
],
|
|
23
|
-
description: "Title of the smart collection",
|
|
24
|
-
},
|
|
25
|
-
...common.props,
|
|
20
|
+
...props,
|
|
26
21
|
},
|
|
27
22
|
};
|
|
@@ -1,29 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import common from "@pipedream/shopify/actions/delete-article/
|
|
1
|
+
import shopify from "../../shopify_developer_app.app.mjs";
|
|
2
|
+
import common from "@pipedream/shopify/actions/delete-article/delete-article.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);
|
|
3
10
|
|
|
4
11
|
export default {
|
|
5
|
-
...
|
|
12
|
+
...others,
|
|
6
13
|
key: "shopify_developer_app-delete-article",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type
|
|
14
|
+
version: "0.0.8",
|
|
15
|
+
name,
|
|
16
|
+
description,
|
|
17
|
+
type,
|
|
11
18
|
props: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
propDefinition: [
|
|
15
|
-
app,
|
|
16
|
-
"blogId",
|
|
17
|
-
],
|
|
18
|
-
},
|
|
19
|
-
articleId: {
|
|
20
|
-
propDefinition: [
|
|
21
|
-
app,
|
|
22
|
-
"articleId",
|
|
23
|
-
({ blogId }) => ({
|
|
24
|
-
blogId,
|
|
25
|
-
}),
|
|
26
|
-
],
|
|
27
|
-
},
|
|
19
|
+
shopify,
|
|
20
|
+
...props,
|
|
28
21
|
},
|
|
29
22
|
};
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import common from "@pipedream/shopify/actions/delete-blog/
|
|
1
|
+
import shopify from "../../shopify_developer_app.app.mjs";
|
|
2
|
+
import common from "@pipedream/shopify/actions/delete-blog/delete-blog.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);
|
|
3
10
|
|
|
4
11
|
export default {
|
|
5
|
-
...
|
|
12
|
+
...others,
|
|
6
13
|
key: "shopify_developer_app-delete-blog",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type
|
|
14
|
+
version: "0.0.8",
|
|
15
|
+
name,
|
|
16
|
+
description,
|
|
17
|
+
type,
|
|
11
18
|
props: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
propDefinition: [
|
|
15
|
-
app,
|
|
16
|
-
"blogId",
|
|
17
|
-
],
|
|
18
|
-
},
|
|
19
|
+
shopify,
|
|
20
|
+
...props,
|
|
19
21
|
},
|
|
20
22
|
};
|
|
@@ -1,19 +1,52 @@
|
|
|
1
1
|
import metafieldActions from "../common/metafield-actions.mjs";
|
|
2
|
-
import common from "@pipedream/shopify/actions/delete-metafield/
|
|
2
|
+
import common from "@pipedream/shopify/actions/delete-metafield/delete-metafield.mjs";
|
|
3
|
+
import shopify from "../../shopify_developer_app.app.mjs";
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
name, description, type, ...others
|
|
7
|
+
} = common;
|
|
3
8
|
|
|
4
9
|
export default {
|
|
5
|
-
...
|
|
10
|
+
...others,
|
|
6
11
|
key: "shopify_developer_app-delete-metafield",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type
|
|
12
|
+
version: "0.0.7",
|
|
13
|
+
name,
|
|
14
|
+
description,
|
|
15
|
+
type,
|
|
11
16
|
props: {
|
|
17
|
+
shopify,
|
|
12
18
|
...metafieldActions.props,
|
|
13
|
-
...common.props,
|
|
14
19
|
},
|
|
15
20
|
methods: {
|
|
16
21
|
...metafieldActions.methods,
|
|
17
|
-
|
|
22
|
+
},
|
|
23
|
+
async additionalProps() {
|
|
24
|
+
const props = await this.getOwnerIdProp(this.ownerResource); console.log(props);
|
|
25
|
+
|
|
26
|
+
if (props.ownerId) {
|
|
27
|
+
props.ownerId = {
|
|
28
|
+
...props.ownerId,
|
|
29
|
+
reloadProps: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (this.ownerResource && this.ownerId) {
|
|
34
|
+
props.metafieldId = {
|
|
35
|
+
type: "string",
|
|
36
|
+
label: "Metafield ID",
|
|
37
|
+
description: "The metafield to update",
|
|
38
|
+
options: async () => {
|
|
39
|
+
const metafields = await this.listMetafields(this.ownerResource, this.ownerId);
|
|
40
|
+
return metafields?.map(({
|
|
41
|
+
id: value, key: label,
|
|
42
|
+
}) => ({
|
|
43
|
+
value,
|
|
44
|
+
label,
|
|
45
|
+
})) || [];
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return props;
|
|
18
51
|
},
|
|
19
52
|
};
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import common from "@pipedream/shopify/actions/delete-page/
|
|
1
|
+
import shopify from "../../shopify_developer_app.app.mjs";
|
|
2
|
+
import common from "@pipedream/shopify/actions/delete-page/delete-page.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);
|
|
3
10
|
|
|
4
11
|
export default {
|
|
5
|
-
...
|
|
12
|
+
...others,
|
|
6
13
|
key: "shopify_developer_app-delete-page",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type
|
|
14
|
+
version: "0.0.8",
|
|
15
|
+
name,
|
|
16
|
+
description,
|
|
17
|
+
type,
|
|
11
18
|
props: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
propDefinition: [
|
|
15
|
-
app,
|
|
16
|
-
"pageId",
|
|
17
|
-
],
|
|
18
|
-
},
|
|
19
|
+
shopify,
|
|
20
|
+
...props,
|
|
19
21
|
},
|
|
20
22
|
};
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import common from "@pipedream/shopify/actions/get-articles/
|
|
1
|
+
import shopify from "../../shopify_developer_app.app.mjs";
|
|
2
|
+
import common from "@pipedream/shopify/actions/get-articles/get-articles.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);
|
|
3
10
|
|
|
4
11
|
export default {
|
|
5
|
-
...
|
|
12
|
+
...others,
|
|
6
13
|
key: "shopify_developer_app-get-articles",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type
|
|
14
|
+
version: "0.0.8",
|
|
15
|
+
name,
|
|
16
|
+
description,
|
|
17
|
+
type,
|
|
11
18
|
props: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
propDefinition: [
|
|
15
|
-
app,
|
|
16
|
-
"blogId",
|
|
17
|
-
],
|
|
18
|
-
},
|
|
19
|
+
shopify,
|
|
20
|
+
...props,
|
|
19
21
|
},
|
|
20
22
|
};
|