diff --git a/components/_21risk/_21risk.app.mjs b/components/_21risk/_21risk.app.mjs index 764c66751c5c5..1c4c536723e74 100644 --- a/components/_21risk/_21risk.app.mjs +++ b/components/_21risk/_21risk.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/_2chat/_2chat.app.mjs b/components/_2chat/_2chat.app.mjs index c0ca6a85b9b77..bc506e3afa7c5 100644 --- a/components/_2chat/_2chat.app.mjs +++ b/components/_2chat/_2chat.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/adobe_photoshop/adobe_photoshop.app.mjs b/components/adobe_photoshop/adobe_photoshop.app.mjs index 22281017a886a..fd645123c3a6e 100644 --- a/components/adobe_photoshop/adobe_photoshop.app.mjs +++ b/components/adobe_photoshop/adobe_photoshop.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/airship/airship.app.mjs b/components/airship/airship.app.mjs index d4ab7d7d170c1..4b1c2540ac19d 100644 --- a/components/airship/airship.app.mjs +++ b/components/airship/airship.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/ayrshare/ayrshare.app.mjs b/components/ayrshare/ayrshare.app.mjs index 102bf1043851f..b6b40607573be 100644 --- a/components/ayrshare/ayrshare.app.mjs +++ b/components/ayrshare/ayrshare.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/d2l_brightspace/d2l_brightspace.app.mjs b/components/d2l_brightspace/d2l_brightspace.app.mjs index ebb932df91a32..0d2718091ed74 100644 --- a/components/d2l_brightspace/d2l_brightspace.app.mjs +++ b/components/d2l_brightspace/d2l_brightspace.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/database/database.app.mjs b/components/database/database.app.mjs index 83ff813fb935c..c0da581e40e91 100644 --- a/components/database/database.app.mjs +++ b/components/database/database.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/dropboard/dropboard.app.mjs b/components/dropboard/dropboard.app.mjs index c7e3a8a41dab3..7d9622c62ed97 100644 --- a/components/dropboard/dropboard.app.mjs +++ b/components/dropboard/dropboard.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/eyepop_ai/eyepop_ai.app.mjs b/components/eyepop_ai/eyepop_ai.app.mjs index 7336a217c0a6d..ba30db6e8bda3 100644 --- a/components/eyepop_ai/eyepop_ai.app.mjs +++ b/components/eyepop_ai/eyepop_ai.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/fatture_in_cloud/fatture_in_cloud.app.mjs b/components/fatture_in_cloud/fatture_in_cloud.app.mjs index 41ac433a62adb..c63a29d2422fa 100644 --- a/components/fatture_in_cloud/fatture_in_cloud.app.mjs +++ b/components/fatture_in_cloud/fatture_in_cloud.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/fillout/fillout.app.mjs b/components/fillout/fillout.app.mjs index aa653f45a0b7c..999b6c44a925a 100644 --- a/components/fillout/fillout.app.mjs +++ b/components/fillout/fillout.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/gloria_ai/gloria_ai.app.mjs b/components/gloria_ai/gloria_ai.app.mjs index 7aaa20bedb100..a3e1944472a89 100644 --- a/components/gloria_ai/gloria_ai.app.mjs +++ b/components/gloria_ai/gloria_ai.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/google_address_validation/google_address_validation.app.mjs b/components/google_address_validation/google_address_validation.app.mjs index d4bc27357a144..921fe058a59b3 100644 --- a/components/google_address_validation/google_address_validation.app.mjs +++ b/components/google_address_validation/google_address_validation.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/google_play/google_play.app.mjs b/components/google_play/google_play.app.mjs index 61d134c4efd71..65aa81a58f907 100644 --- a/components/google_play/google_play.app.mjs +++ b/components/google_play/google_play.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/heyzine/heyzine.app.mjs b/components/heyzine/heyzine.app.mjs index 5801157125b8a..1b00e17f84f0b 100644 --- a/components/heyzine/heyzine.app.mjs +++ b/components/heyzine/heyzine.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/invision_community/invision_community.app.mjs b/components/invision_community/invision_community.app.mjs index 0b22b122aa70f..55f28fe244c59 100644 --- a/components/invision_community/invision_community.app.mjs +++ b/components/invision_community/invision_community.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/kommo/kommo.app.mjs b/components/kommo/kommo.app.mjs index e6b1e5df228d7..c8c72a408dce3 100644 --- a/components/kommo/kommo.app.mjs +++ b/components/kommo/kommo.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/meteomatics_weather_api/meteomatics_weather_api.app.mjs b/components/meteomatics_weather_api/meteomatics_weather_api.app.mjs index 8357bd93af466..0a2855b0f54ca 100644 --- a/components/meteomatics_weather_api/meteomatics_weather_api.app.mjs +++ b/components/meteomatics_weather_api/meteomatics_weather_api.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/minio/minio.app.mjs b/components/minio/minio.app.mjs index af6494179d7ed..8c53102b20120 100644 --- a/components/minio/minio.app.mjs +++ b/components/minio/minio.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/modelry/modelry.app.mjs b/components/modelry/modelry.app.mjs index b80c5800feb65..4ffe3be2c6abc 100644 --- a/components/modelry/modelry.app.mjs +++ b/components/modelry/modelry.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/noor/noor.app.mjs b/components/noor/noor.app.mjs index ccabd715c74ac..4f935c64224a2 100644 --- a/components/noor/noor.app.mjs +++ b/components/noor/noor.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/otter_waiver/otter_waiver.app.mjs b/components/otter_waiver/otter_waiver.app.mjs index 517b353d6fbaa..6cb4698e09258 100644 --- a/components/otter_waiver/otter_waiver.app.mjs +++ b/components/otter_waiver/otter_waiver.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/power_automate/power_automate.app.mjs b/components/power_automate/power_automate.app.mjs index 1be389ba2098f..fdb0db26fa7ed 100644 --- a/components/power_automate/power_automate.app.mjs +++ b/components/power_automate/power_automate.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/railsr/railsr.app.mjs b/components/railsr/railsr.app.mjs index 68ab992573559..cdd025fe4bb96 100644 --- a/components/railsr/railsr.app.mjs +++ b/components/railsr/railsr.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/shopify_developer_app/package.json b/components/shopify_developer_app/package.json index 5c346786007fa..4bccbe8e6509a 100644 --- a/components/shopify_developer_app/package.json +++ b/components/shopify_developer_app/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/shopify_developer_app", - "version": "0.2.5", + "version": "0.3.0", "description": "Pipedream Shopify (Developer App) Components", "main": "shopify_developer_app.app.mjs", "keywords": [ diff --git a/components/shopify_developer_app/sources/common/webhook.mjs b/components/shopify_developer_app/sources/common/webhook.mjs index 31ded4fc14e16..7ba57793b7ab0 100644 --- a/components/shopify_developer_app/sources/common/webhook.mjs +++ b/components/shopify_developer_app/sources/common/webhook.mjs @@ -12,13 +12,13 @@ export default { metafieldNamespaces: { type: "string[]", label: "Metafield Namespaces", - description: "Array of namespaces for any metafields that should be included with each webhook", + description: "Array of namespaces for any metafields that should be included with each webhook. Metafield definitions can be found in your store's Settings -> Custom Data. Select a metafield to view its namespace under \"Namespace and key\". For example, if the value is `custom.test_metafield`, the namespace is `custom`.", optional: true, }, privateMetafieldNamespaces: { type: "string[]", label: "Private Metafield Namespaces", - description: "Array of namespaces for any private metafields that should be included with each webhook", + description: "Array of namespaces for any private metafields that should be included with each webhook. Metafield definitions can be found in your store's Settings -> Custom Data. Select a metafield to view its namespace under \"Namespace and key\". For example, if the value is `custom.test_metafield`, the namespace is `custom`.", optional: true, }, }, diff --git a/components/shopify_developer_app/sources/new-cancelled-order/new-cancelled-order.mjs b/components/shopify_developer_app/sources/new-cancelled-order/new-cancelled-order.mjs index d08e341af7fec..a1319dc71c2ed 100644 --- a/components/shopify_developer_app/sources/new-cancelled-order/new-cancelled-order.mjs +++ b/components/shopify_developer_app/sources/new-cancelled-order/new-cancelled-order.mjs @@ -7,7 +7,7 @@ export default { name: "New Cancelled Order (Instant)", type: "source", description: "Emit new event each time a new order is cancelled.", - version: "0.0.2", + version: "0.0.3", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-customer-created/new-customer-created.mjs b/components/shopify_developer_app/sources/new-customer-created/new-customer-created.mjs index 05c3e3d8d12eb..2d3dab13075a2 100644 --- a/components/shopify_developer_app/sources/new-customer-created/new-customer-created.mjs +++ b/components/shopify_developer_app/sources/new-customer-created/new-customer-created.mjs @@ -7,7 +7,7 @@ export default { name: "New Customer Created (Instant)", type: "source", description: "Emit new event for each new customer added to a store.", - version: "0.0.2", + version: "0.0.3", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-draft-order/new-draft-order.mjs b/components/shopify_developer_app/sources/new-draft-order/new-draft-order.mjs index 5beab5df34efa..1357565220a0e 100644 --- a/components/shopify_developer_app/sources/new-draft-order/new-draft-order.mjs +++ b/components/shopify_developer_app/sources/new-draft-order/new-draft-order.mjs @@ -7,7 +7,7 @@ export default { name: "New Draft Order (Instant)", type: "source", description: "Emit new event for each new draft order submitted to a store.", - version: "0.0.2", + version: "0.0.3", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-event-emitted/new-event-emitted.mjs b/components/shopify_developer_app/sources/new-event-emitted/new-event-emitted.mjs index 3fc638dd5f5f2..db5d2b7df5d96 100644 --- a/components/shopify_developer_app/sources/new-event-emitted/new-event-emitted.mjs +++ b/components/shopify_developer_app/sources/new-event-emitted/new-event-emitted.mjs @@ -7,7 +7,7 @@ export default { name: "New Event Emitted (Instant)", type: "source", description: "Emit new event for each new Shopify event.", - version: "0.0.2", + version: "0.0.3", dedupe: "unique", props: { ...common.props, diff --git a/components/shopify_developer_app/sources/new-order-created/new-order-created.mjs b/components/shopify_developer_app/sources/new-order-created/new-order-created.mjs index 2f58fd6df5f74..e6c88ab63f62c 100644 --- a/components/shopify_developer_app/sources/new-order-created/new-order-created.mjs +++ b/components/shopify_developer_app/sources/new-order-created/new-order-created.mjs @@ -7,7 +7,7 @@ export default { name: "New Order Created (Instant)", type: "source", description: "Emit new event for each new order submitted to a store.", - version: "0.0.2", + version: "0.0.3", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-paid-order/new-paid-order.mjs b/components/shopify_developer_app/sources/new-paid-order/new-paid-order.mjs index 0c2e34496549a..b69b3ebaa3b12 100644 --- a/components/shopify_developer_app/sources/new-paid-order/new-paid-order.mjs +++ b/components/shopify_developer_app/sources/new-paid-order/new-paid-order.mjs @@ -7,7 +7,7 @@ export default { name: "New Paid Order (Instant)", type: "source", description: "Emit new event each time a new order is paid.", - version: "0.0.2", + version: "0.0.3", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-product-created/new-product-created.mjs b/components/shopify_developer_app/sources/new-product-created/new-product-created.mjs index b02ae484ae544..bcdbea7d6f364 100644 --- a/components/shopify_developer_app/sources/new-product-created/new-product-created.mjs +++ b/components/shopify_developer_app/sources/new-product-created/new-product-created.mjs @@ -7,7 +7,7 @@ export default { name: "New Product Created (Instant)", type: "source", description: "Emit new event for each product added to a store.", - version: "0.0.2", + version: "0.0.3", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-product-updated/new-product-updated.mjs b/components/shopify_developer_app/sources/new-product-updated/new-product-updated.mjs new file mode 100644 index 0000000000000..4c753d825a17b --- /dev/null +++ b/components/shopify_developer_app/sources/new-product-updated/new-product-updated.mjs @@ -0,0 +1,55 @@ +import common from "../common/webhook.mjs"; +import constants from "../common/constants.mjs"; + +export default { + ...common, + key: "shopify_developer_app-new-product-updated", + name: "New Product Updated (Instant)", + description: "Emit new event for each product updated in a store.", + version: "0.0.1", + type: "source", + dedupe: "unique", + props: { + ...common.props, + productType: { + type: "string", + label: "Product Type", + description: "Filter results by product type", + optional: true, + }, + tags: { + type: "string[]", + label: "Tags", + description: "Filter results by product tag(s)", + optional: true, + }, + }, + methods: { + ...common.methods, + getTopic() { + return constants.EVENT_TOPIC.PRODUCTS_UPDATE; + }, + isRelevant(resource) { + let relevant = true; + if (this.productType && resource.product_type !== this.productType) { + relevant = false; + } + if (this.tags?.length) { + this.tags.forEach((tag) => { + if (!resource.tags?.includes(tag)) { + relevant = false; + } + }); + } + return relevant; + }, + generateMeta(resource) { + const ts = Date.parse(resource.updated_at); + return { + id: `${resource.id}-${ts}`, + summary: `Product Updated ${resource.id}`, + ts, + }; + }, + }, +}; diff --git a/components/shopify_developer_app/sources/new-product-updated/test-event.mjs b/components/shopify_developer_app/sources/new-product-updated/test-event.mjs new file mode 100644 index 0000000000000..465572db40b94 --- /dev/null +++ b/components/shopify_developer_app/sources/new-product-updated/test-event.mjs @@ -0,0 +1,64 @@ +export default { + "admin_graphql_api_id": "gid://shopify/Product/8416570474776", + "body_html": null, + "created_at": "2023-06-30T13:38:03-04:00", + "handle": "best-product-ever", + "id": 8416570474776, + "product_type": "", + "published_at": "2023-06-30T13:38:03-04:00", + "template_suffix": null, + "title": "product", + "updated_at": "2024-06-18T14:37:58-04:00", + "vendor": "Testing", + "status": "active", + "published_scope": "web", + "tags": "abc, def", + "variants": [ + { + "admin_graphql_api_id": "gid://shopify/ProductVariant/45612961333528", + "barcode": null, + "compare_at_price": null, + "created_at": "2023-06-30T13:38:03-04:00", + "fulfillment_service": "manual", + "id": 45612961333528, + "inventory_management": null, + "inventory_policy": "deny", + "position": 1, + "price": "0.00", + "product_id": 8416570474776, + "sku": "", + "taxable": true, + "title": "Default Title", + "updated_at": "2023-10-27T10:08:17-04:00", + "option1": "Default Title", + "option2": null, + "option3": null, + "grams": 0, + "image_id": null, + "weight": 0, + "weight_unit": "lb", + "inventory_item_id": 47661178487064, + "inventory_quantity": 0, + "old_inventory_quantity": 0, + "requires_shipping": true + }, + ], + "options": [ + { + "name": "Title", + "id": 10664239726872, + "product_id": 8416570474776, + "position": 1, + "values": [ + "Default Title", + ] + } + ], + "images": [], + "image": null, + "variant_ids": [ + { + "id": 45612961333528 + } + ] +} \ No newline at end of file diff --git a/components/shopify_developer_app/sources/new-shipment/new-shipment.mjs b/components/shopify_developer_app/sources/new-shipment/new-shipment.mjs index 8dfe3790dd350..4981507384187 100644 --- a/components/shopify_developer_app/sources/new-shipment/new-shipment.mjs +++ b/components/shopify_developer_app/sources/new-shipment/new-shipment.mjs @@ -7,7 +7,7 @@ export default { name: "New Shipment (Instant)", type: "source", description: "Emit new event for each new fulfillment event for a store.", - version: "0.0.2", + version: "0.0.3", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-updated-customer/new-updated-customer.mjs b/components/shopify_developer_app/sources/new-updated-customer/new-updated-customer.mjs index b5058612f8bef..76c23e8bfd284 100644 --- a/components/shopify_developer_app/sources/new-updated-customer/new-updated-customer.mjs +++ b/components/shopify_developer_app/sources/new-updated-customer/new-updated-customer.mjs @@ -7,7 +7,7 @@ export default { name: "New Updated Customer (Instant)", type: "source", description: "Emit new event each time a customer's information is updated.", - version: "0.0.2", + version: "0.0.3", dedupe: "unique", methods: { ...common.methods, diff --git a/components/shopify_developer_app/sources/new-updated-order/new-updated-order.mjs b/components/shopify_developer_app/sources/new-updated-order/new-updated-order.mjs index 8e0544d3d1ff9..af105ba7de7b0 100644 --- a/components/shopify_developer_app/sources/new-updated-order/new-updated-order.mjs +++ b/components/shopify_developer_app/sources/new-updated-order/new-updated-order.mjs @@ -7,7 +7,7 @@ export default { name: "New Updated Order (Instant)", type: "source", description: "Emit new event each time an order is updated.", - version: "0.0.2", + version: "0.0.3", dedupe: "unique", methods: { ...common.methods, diff --git a/components/signerx/signerx.app.mjs b/components/signerx/signerx.app.mjs index 51e3a008444a3..83bc733c4ee8a 100644 --- a/components/signerx/signerx.app.mjs +++ b/components/signerx/signerx.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/simplybook_me/simplybook_me.app.mjs b/components/simplybook_me/simplybook_me.app.mjs index 3e09a479e0230..372148e76a2c6 100644 --- a/components/simplybook_me/simplybook_me.app.mjs +++ b/components/simplybook_me/simplybook_me.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/spiritme/spiritme.app.mjs b/components/spiritme/spiritme.app.mjs index 03804a3e5a1d5..5e9f507cbfe8e 100644 --- a/components/spiritme/spiritme.app.mjs +++ b/components/spiritme/spiritme.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/taskade/taskade.app.mjs b/components/taskade/taskade.app.mjs index c482540a9598a..44d2adaa8699f 100644 --- a/components/taskade/taskade.app.mjs +++ b/components/taskade/taskade.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/txt_werk/txt_werk.app.mjs b/components/txt_werk/txt_werk.app.mjs index c750672f11d74..60ec21601469a 100644 --- a/components/txt_werk/txt_werk.app.mjs +++ b/components/txt_werk/txt_werk.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +};