@pipedream/shopify_developer_app 0.6.4 → 0.7.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.
Files changed (61) hide show
  1. package/actions/add-product-to-custom-collection/add-product-to-custom-collection.mjs +14 -24
  2. package/actions/add-tags/add-tags.mjs +14 -7
  3. package/actions/common/constants.mjs +86 -0
  4. package/actions/common/metafield-actions.mjs +264 -3
  5. package/actions/create-article/create-article.mjs +16 -28
  6. package/actions/create-blog/create-blog.mjs +16 -15
  7. package/actions/create-custom-collection/create-custom-collection.mjs +14 -28
  8. package/actions/create-customer/create-customer.mjs +24 -5
  9. package/actions/create-metafield/create-metafield.mjs +50 -8
  10. package/actions/create-metaobject/create-metaobject.mjs +14 -19
  11. package/actions/create-order/create-order.mjs +144 -10
  12. package/actions/create-page/create-page.mjs +16 -21
  13. package/actions/create-product/create-product.mjs +14 -61
  14. package/actions/create-product-variant/create-product-variant.mjs +14 -48
  15. package/actions/create-smart-collection/create-smart-collection.mjs +14 -19
  16. package/actions/delete-article/delete-article.mjs +16 -23
  17. package/actions/delete-blog/delete-blog.mjs +16 -14
  18. package/actions/delete-metafield/delete-metafield.mjs +41 -8
  19. package/actions/delete-page/delete-page.mjs +16 -14
  20. package/actions/get-articles/get-articles.mjs +16 -14
  21. package/actions/get-metafields/get-metafields.mjs +40 -8
  22. package/actions/get-metaobjects/get-metaobjects.mjs +14 -18
  23. package/actions/get-order/get-order.mjs +9 -7
  24. package/actions/get-pages/get-pages.mjs +16 -8
  25. package/actions/search-custom-collection-by-name/search-custom-collection-by-name.mjs +14 -14
  26. package/actions/search-customers/search-customers.mjs +23 -13
  27. package/actions/search-product-variant/search-product-variant.mjs +14 -30
  28. package/actions/search-products/search-products.mjs +14 -40
  29. package/actions/update-article/update-article.mjs +16 -37
  30. package/actions/update-customer/update-customer.mjs +29 -5
  31. package/actions/update-inventory-level/update-inventory-level.mjs +14 -28
  32. package/actions/update-metafield/update-metafield.mjs +18 -15
  33. package/actions/update-metaobject/update-metaobject.mjs +14 -24
  34. package/actions/update-page/update-page.mjs +16 -27
  35. package/actions/update-product/update-product.mjs +96 -37
  36. package/actions/update-product-variant/update-product-variant.mjs +14 -71
  37. package/common/mutations.mjs +124 -0
  38. package/common/queries.mjs +181 -0
  39. package/common/utils.mjs +40 -0
  40. package/package.json +2 -2
  41. package/shopify_developer_app.app.mjs +130 -1
  42. package/sources/common/webhook.mjs +17 -9
  43. package/sources/new-abandoned-cart/new-abandoned-cart.mjs +14 -8
  44. package/sources/new-article/new-article.mjs +15 -9
  45. package/sources/new-cancelled-order/new-cancelled-order.mjs +4 -5
  46. package/sources/new-customer-created/new-customer-created.mjs +4 -5
  47. package/sources/new-draft-order/new-draft-order.mjs +4 -5
  48. package/sources/new-event-emitted/new-event-emitted.mjs +10 -4
  49. package/sources/new-fulfillment-event/new-fulfillment-event.mjs +4 -5
  50. package/sources/new-order-created/new-order-created.mjs +8 -6
  51. package/sources/new-order-fulfilled/new-order-fulfilled.mjs +4 -5
  52. package/sources/new-page/new-page.mjs +15 -9
  53. package/sources/new-paid-order/new-paid-order.mjs +4 -5
  54. package/sources/new-product-created/new-product-created.mjs +4 -5
  55. package/sources/new-product-updated/new-product-updated.mjs +4 -5
  56. package/sources/new-refund-created/new-refund-created.mjs +3 -4
  57. package/sources/new-updated-customer/new-updated-customer.mjs +4 -5
  58. package/sources/new-updated-order/new-updated-order.mjs +4 -5
  59. package/sources/product-added-to-custom-collection/product-added-to-custom-collection.mjs +14 -8
  60. package/actions/common/metaobjects.mjs +0 -21
  61. package/common/rest-admin.mjs +0 -97
@@ -1,27 +1,22 @@
1
1
  import shopify from "../../shopify_developer_app.app.mjs";
2
- import metaobjects from "../common/metaobjects.mjs";
3
- import common from "@pipedream/shopify/actions/create-metaobject/common.mjs";
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
- ...metaobjects,
7
- ...common,
12
+ ...others,
8
13
  key: "shopify_developer_app-create-metaobject",
9
- name: "Create Metaobject",
10
- description: "Creates a metaobject. [See the documentation](https://shopify.dev/docs/api/admin-graphql/2023-04/mutations/metaobjectCreate)",
11
- version: "0.0.6",
12
- type: "action",
14
+ version: "0.0.7",
15
+ name,
16
+ description,
17
+ type,
13
18
  props: {
14
19
  shopify,
15
- type: {
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,160 @@
1
1
  import shopify from "../../shopify_developer_app.app.mjs";
2
- import common from "@pipedream/shopify/actions/create-order/common.mjs";
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: toSingleLineString(`Creates a new order.
10
- For full order object details [see the docs](https://shopify.dev/api/admin-rest/2022-01/resources/order#[post]/admin/api/2022-01/orders.json)
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.5",
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
- ...common.props,
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
+ $.export("$summary", `Created new order with ID \`${response.orderCreate.order.id}\``);
158
+ return response;
25
159
  },
26
160
  };
@@ -1,27 +1,22 @@
1
- import app from "../../common/rest-admin.mjs";
2
- import common from "@pipedream/shopify/actions/create-page/common.mjs";
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
- ...common,
12
+ ...others,
6
13
  key: "shopify_developer_app-create-page",
7
- name: "Create Page",
8
- description: "Create a new page. [See The Documentation](https://shopify.dev/docs/api/admin-rest/2023-04/resources/page#post-pages)",
9
- version: "0.0.6",
10
- type: "action",
14
+ version: "0.0.7",
15
+ name,
16
+ description,
17
+ type,
11
18
  props: {
12
- app,
13
- title: {
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/common.mjs";
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
- ...common,
12
+ ...others,
6
13
  key: "shopify_developer_app-create-product",
7
- name: "Create Product",
8
- description: "Create a new product. [See the documentation](https://shopify.dev/api/admin-rest/2022-01/resources/product#[post]/admin/api/2022-01/products.json)",
9
- version: "0.0.4",
10
- type: "action",
14
+ version: "0.0.5",
15
+ name,
16
+ description,
17
+ type,
11
18
  props: {
12
19
  shopify,
13
- title: {
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/common.mjs";
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
- ...common,
12
+ ...others,
6
13
  key: "shopify_developer_app-create-product-variant",
7
- name: "Create Product Variant",
8
- description: "Create a new product variant. [See the documentation](https://shopify.dev/api/admin-rest/2022-01/resources/product-variant#[post]/admin/api/2022-01/products/{product_id}/variants.json)",
9
- version: "0.0.5",
10
- type: "action",
14
+ version: "0.0.6",
15
+ name,
16
+ description,
17
+ type,
11
18
  props: {
12
19
  shopify,
13
- productId: {
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 { toSingleLineString } from "@pipedream/shopify/actions/common/common.mjs";
3
- import common from "@pipedream/shopify/actions/create-smart-collection/common.mjs";
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
- ...common,
12
+ ...others,
7
13
  key: "shopify_developer_app-create-smart-collection",
8
- name: "Create Smart Collection",
9
- description: toSingleLineString(`
10
- Creates a smart collection.
11
- You can fill in any number of rules by selecting more than one option in each prop.
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.5",
15
+ name,
16
+ description,
17
+ type,
16
18
  props: {
17
19
  shopify,
18
- title: {
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 app from "../../common/rest-admin.mjs";
2
- import common from "@pipedream/shopify/actions/delete-article/common.mjs";
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
- ...common,
12
+ ...others,
6
13
  key: "shopify_developer_app-delete-article",
7
- name: "Delete Article",
8
- description: "Delete an existing blog article. [See The Documentation](https://shopify.dev/docs/api/admin-rest/2023-04/resources/article#delete-blogs-blog-id-articles-article-id)",
9
- version: "0.0.6",
10
- type: "action",
14
+ version: "0.0.7",
15
+ name,
16
+ description,
17
+ type,
11
18
  props: {
12
- app,
13
- blogId: {
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 app from "../../common/rest-admin.mjs";
2
- import common from "@pipedream/shopify/actions/delete-blog/common.mjs";
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
- ...common,
12
+ ...others,
6
13
  key: "shopify_developer_app-delete-blog",
7
- name: "Delete Blog",
8
- description: "Delete an existing blog. [See The Documentation](https://shopify.dev/docs/api/admin-rest/2023-04/resources/blog#delete-blogs-blog-id)",
9
- version: "0.0.6",
10
- type: "action",
14
+ version: "0.0.7",
15
+ name,
16
+ description,
17
+ type,
11
18
  props: {
12
- app,
13
- blogId: {
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/common.mjs";
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
- ...common,
10
+ ...others,
6
11
  key: "shopify_developer_app-delete-metafield",
7
- name: "Delete Metafield",
8
- description: "Deletes a metafield belonging to a resource. [See the documentation](https://shopify.dev/docs/api/admin-rest/2023-01/resources/metafield#delete-blogs-blog-id-metafields-metafield-id)",
9
- version: "0.0.5",
10
- type: "action",
12
+ version: "0.0.6",
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
- ...common.methods,
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 app from "../../common/rest-admin.mjs";
2
- import common from "@pipedream/shopify/actions/delete-page/common.mjs";
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
- ...common,
12
+ ...others,
6
13
  key: "shopify_developer_app-delete-page",
7
- name: "Delete Page",
8
- description: "Delete an existing page. [See The Documentation](https://shopify.dev/docs/api/admin-rest/2023-04/resources/page#delete-pages-page-id)",
9
- version: "0.0.6",
10
- type: "action",
14
+ version: "0.0.7",
15
+ name,
16
+ description,
17
+ type,
11
18
  props: {
12
- app,
13
- pageId: {
14
- propDefinition: [
15
- app,
16
- "pageId",
17
- ],
18
- },
19
+ shopify,
20
+ ...props,
19
21
  },
20
22
  };
@@ -1,20 +1,22 @@
1
- import app from "../../common/rest-admin.mjs";
2
- import common from "@pipedream/shopify/actions/get-articles/common.mjs";
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
- ...common,
12
+ ...others,
6
13
  key: "shopify_developer_app-get-articles",
7
- name: "Get Articles",
8
- description: "Retrieve a list of all articles from a blog. [See The Documentation](https://shopify.dev/docs/api/admin-rest/2023-04/resources/article#get-blogs-blog-id-articles)",
9
- version: "0.0.6",
10
- type: "action",
14
+ version: "0.0.7",
15
+ name,
16
+ description,
17
+ type,
11
18
  props: {
12
- app,
13
- blogId: {
14
- propDefinition: [
15
- app,
16
- "blogId",
17
- ],
18
- },
19
+ shopify,
20
+ ...props,
19
21
  },
20
22
  };