From a3d2d59b75ea0c150eb46201c4f56c1dadea24dd Mon Sep 17 00:00:00 2001 From: Andrew Chuang Date: Fri, 21 Feb 2025 16:52:55 -0300 Subject: [PATCH 1/2] add webhook events --- .../shopify/sources/common/constants.mjs | 49 ++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/components/shopify/sources/common/constants.mjs b/components/shopify/sources/common/constants.mjs index 3450fc5ebf15e..f9ccbeb9f6915 100644 --- a/components/shopify/sources/common/constants.mjs +++ b/components/shopify/sources/common/constants.mjs @@ -7,6 +7,7 @@ const HEADER = { }; const EVENT_TOPIC = { + APP_SCOPES_UPDATE: "app/scopes_update", APP_UNINSTALLED: "app/uninstalled", BULK_OPERATIONS_FINISH: "bulk_operations/finish", COLLECTION_LISTINGS_ADD: "collection_listings/add", @@ -15,9 +16,34 @@ const EVENT_TOPIC = { COLLECTIONS_CREATE: "collections/create", COLLECTIONS_DELETE: "collections/delete", COLLECTIONS_UPDATE: "collections/update", + DISCOUNTS_CREATE: "discounts/create", + DISCOUNTS_DELETE: "discounts/delete", + DISCOUNTS_UPDATE: "discounts/update", + DISCOUNTS_REDEEMCODE_ADDED: "discounts/redeemcode_added", + DISCOUNTS_REDEEMCODE_REMOVED: "discounts/redeemcode_removed", DOMAINS_CREATE: "domains/create", DOMAINS_DESTROY: "domains/destroy", DOMAINS_UPDATE: "domains/update", + FULFILLMENT_HOLDS_ADDED: "fulfillment_holds/added", + FULFILLMENT_HOLDS_RELEASED: "fulfillment_holds/released", + FULFILLMENT_ORDERS_CANCELLATION_REQUEST_ACCEPTED: "fulfillment_orders/cancellation_request_accepted", + FULFILLMENT_ORDERS_CANCELLATION_REQUEST_REJECTED: "fulfillment_orders/cancellation_request_rejected", + FULFILLMENT_ORDERS_CANCELLATION_REQUEST_SUBMITTED: "fulfillment_orders/cancellation_request_submitted", + FULFILLMENT_ORDERS_CANCELLED: "fulfillment_orders/cancelled", + FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_ACCEPTED: "fulfillment_orders/fulfillment_request_accepted", + FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_REJECTED: "fulfillment_orders/fulfillment_request_rejected", + FULFILLMENT_ORDERS_FULFILLMENT_REQUEST_SUBMITTED: "fulfillment_orders/fulfillment_request_submitted", + FULFILLMENT_ORDERS_FULFILLMENT_SERVICE_FAILED_TO_COMPLETE: "fulfillment_orders/fulfillment_service_failed_to_complete", + FULFILLMENT_ORDERS_HOLD_RELEASED: "fulfillment_orders/hold_released", + FULFILLMENT_ORDERS_LINE_ITEMS_PREPARED_FOR_LOCAL_DELIVERY: "fulfillment_orders/line_items_prepared_for_local_delivery", + FULFILLMENT_ORDERS_LINE_ITEMS_PREPARED_FOR_PICKUP: "fulfillment_orders/line_items_prepared_for_pickup", + FULFILLMENT_ORDERS_MERGED: "fulfillment_orders/merged", + FULFILLMENT_ORDERS_MOVED: "fulfillment_orders/moved", + FULFILLMENT_ORDERS_ORDER_ROUTING_COMPLETE: "fulfillment_orders/order_routing_complete", + FULFILLMENT_ORDERS_PLACED_ON_HOLD: "fulfillment_orders/placed_on_hold", + FULFILLMENT_ORDERS_RESCHEDULED: "fulfillment_orders/rescheduled", + FULFILLMENT_ORDERS_SCHEDULED_FULFILLMENT_ORDER_READY: "fulfillment_orders/scheduled_fulfillment_order_ready", + FULFILLMENT_ORDERS_SPLIT: "fulfillment_orders/split", INVENTORY_ITEMS_CREATE: "inventory_items/create", INVENTORY_ITEMS_DELETE: "inventory_items/delete", INVENTORY_ITEMS_UPDATE: "inventory_items/update", @@ -29,9 +55,12 @@ const EVENT_TOPIC = { LOCATIONS_CREATE: "locations/create", LOCATIONS_DELETE: "locations/delete", LOCATIONS_UPDATE: "locations/update", + LOCATIONS_ACTIVATE: "locations/activate", + LOCATIONS_DEACTIVATE: "locations/deactivate", MARKETS_CREATE: "markets/create", MARKETS_DELETE: "markets/delete", MARKETS_UPDATE: "markets/update", + PAYMENT_SCHEDULE_DUE: "payment_schedules/due", PRODUCT_LISTINGS_ADD: "product_listings/add", PRODUCT_LISTINGS_REMOVE: "product_listings/remove", PRODUCT_LISTINGS_UPDATE: "product_listings/update", @@ -39,20 +68,38 @@ const EVENT_TOPIC = { PRODUCTS_DELETE: "products/delete", PRODUCTS_UPDATE: "products/update", REFUNDS_CREATE: "refunds/create", + RETURNS_APPROVE: "returns/approve", + RETURNS_CANCEL: "returns/cancel", + RETURNS_CLOSE: "returns/close", + RETURNS_DECLINE: "returns/decline", + RETURNS_PROCESS: "returns/process", + RETURNS_REOPEN: "returns/reopen", + RETURNS_REQUEST: "returns/request", + RETURNS_UPDATE: "returns/update", SCHEDULED_PRODUCT_LISTINGS_ADD: "scheduled_product_listings/add", SCHEDULED_PRODUCT_LISTINGS_REMOVE: "scheduled_product_listings/remove", SCHEDULED_PRODUCT_LISTINGS_UPDATE: "scheduled_product_listings/update", + SEGMENTS_CREATE: "segments/create", + SEGMENTS_DELETE: "segments/delete", + SEGMENTS_UPDATE: "segments/update", SELLING_PLAN_GROUPS_CREATE: "selling_plan_groups/create", SELLING_PLAN_GROUPS_DELETE: "selling_plan_groups/delete", SELLING_PLAN_GROUPS_UPDATE: "selling_plan_groups/update", SHOP_UPDATE: "shop/update", + SUBSCRIPTION_CONTRACTS_ACTIVATE: "subscription_contracts/activate", + SUBSCRIPTION_CONTRACTS_CANCEL: "subscription_contracts/cancel", + SUBSCRIPTION_CONTRACTS_EXPIRE: "subscription_contracts/expire", + SUBSCRIPTION_CONTRACTS_FAIL: "subscription_contracts/fail", + SUBSCRIPTION_CONTRACTS_PAUSE: "subscription_contracts/pause", SUBSCRIPTION_CONTRACTS_CREATE: "subscription_contracts/create", SUBSCRIPTION_CONTRACTS_UPDATE: "subscription_contracts/update", THEMES_CREATE: "themes/create", THEMES_DELETE: "themes/delete", THEMES_PUBLISH: "themes/publish", - EVENT_TOPICS_THEMES_UPDATE: "event-topics-themes-update", THEMES_UPDATE: "themes/update", + VARIANTS_IN_STOCK: "variants/in_stock", + VARIANTS_OUT_OF_STOCK: "variants/out_of_stock", + EVENT_TOPICS_THEMES_UPDATE: "event-topics-themes-update", }; const EVENT_TOPICS = Object.values(EVENT_TOPIC); From c12f76f86aa20d760d170b769464f95d15487cfa Mon Sep 17 00:00:00 2001 From: Andrew Chuang Date: Fri, 21 Feb 2025 16:58:11 -0300 Subject: [PATCH 2/2] bump versions --- components/shopify/package.json | 2 +- .../shopify/sources/new-event-emitted/new-event-emitted.mjs | 2 +- .../shopify/sources/new-product-created/new-product-created.mjs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/shopify/package.json b/components/shopify/package.json index 1252bef7bb1ac..13f1439452a21 100644 --- a/components/shopify/package.json +++ b/components/shopify/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/shopify", - "version": "0.6.5", + "version": "0.6.6", "description": "Pipedream Shopify Components", "main": "shopify.app.mjs", "keywords": [ diff --git a/components/shopify/sources/new-event-emitted/new-event-emitted.mjs b/components/shopify/sources/new-event-emitted/new-event-emitted.mjs index 156ba5c31c183..cdc56045377bf 100644 --- a/components/shopify/sources/new-event-emitted/new-event-emitted.mjs +++ b/components/shopify/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.11", + version: "0.0.12", dedupe: "unique", props: { ...common.props, diff --git a/components/shopify/sources/new-product-created/new-product-created.mjs b/components/shopify/sources/new-product-created/new-product-created.mjs index 78fa91512e6af..975429cdb0112 100644 --- a/components/shopify/sources/new-product-created/new-product-created.mjs +++ b/components/shopify/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.11", + version: "0.0.12", dedupe: "unique", methods: { ...common.methods,