|
1 | | -const DOMAIN_SUFFIX = ".myshopify.com"; |
2 | | -const WEBHOOK_ID = "webhookId"; |
| 1 | +import constants from "@pipedream/shopify/sources/common/constants.mjs"; |
3 | 2 |
|
4 | | -const HEADER = { |
5 | | - SHOP_DOMAIN: "x-shopify-shop-domain", |
6 | | - TOPIC: "x-shopify-topic", |
7 | | -}; |
8 | | - |
9 | | -const EVENT_TOPIC = { |
10 | | - APP_UNINSTALLED: "app/uninstalled", |
11 | | - BULK_OPERATIONS_FINISH: "bulk_operations/finish", |
12 | | - CARTS_CREATE: "carts/create", |
13 | | - CARTS_UPDATE: "carts/update", |
14 | | - CHECKOUTS_CREATE: "checkouts/create", |
15 | | - CHECKOUTS_DELETE: "checkouts/delete", |
16 | | - CHECKOUTS_UPDATE: "checkouts/update", |
17 | | - COLLECTION_LISTINGS_ADD: "collection_listings/add", |
18 | | - COLLECTION_LISTINGS_REMOVE: "collection_listings/remove", |
19 | | - COLLECTION_LISTINGS_UPDATE: "collection_listings/update", |
20 | | - COLLECTIONS_CREATE: "collections/create", |
21 | | - COLLECTIONS_DELETE: "collections/delete", |
22 | | - COLLECTIONS_UPDATE: "collections/update", |
23 | | - CUSTOMER_GROUPS_CREATE: "customer_groups/create", |
24 | | - CUSTOMER_GROUPS_DELETE: "customer_groups/delete", |
25 | | - CUSTOMER_GROUPS_UPDATE: "customer_groups/update", |
26 | | - CUSTOMER_PAYMENT_METHODS_CREATE: "customer_payment_methods/create", |
27 | | - CUSTOMER_PAYMENT_METHODS_REVOKE: "customer_payment_methods/revoke", |
28 | | - CUSTOMER_PAYMENT_METHODS_UPDATE: "customer_payment_methods/update", |
29 | | - CUSTOMERS_MARKETING_CONSENT_UPDATE: "customers_marketing_consent/update", |
30 | | - CUSTOMERS_CREATE: "customers/create", |
31 | | - CUSTOMERS_DELETE: "customers/delete", |
32 | | - CUSTOMERS_DISABLE: "customers/disable", |
33 | | - CUSTOMERS_ENABLE: "customers/enable", |
34 | | - CUSTOMERS_UPDATE: "customers/update", |
35 | | - DISPUTES_CREATE: "disputes/create", |
36 | | - DISPUTES_UPDATE: "disputes/update", |
37 | | - DOMAINS_CREATE: "domains/create", |
38 | | - DOMAINS_DESTROY: "domains/destroy", |
39 | | - DOMAINS_UPDATE: "domains/update", |
40 | | - DRAFT_ORDERS_CREATE: "draft_orders/create", |
41 | | - DRAFT_ORDERS_DELETE: "draft_orders/delete", |
42 | | - DRAFT_ORDERS_UPDATE: "draft_orders/update", |
43 | | - FULFILLMENT_EVENTS_CREATE: "fulfillment_events/create", |
44 | | - FULFILLMENT_EVENTS_DELETE: "fulfillment_events/delete", |
45 | | - FULFILLMENTS_CREATE: "fulfillments/create", |
46 | | - FULFILLMENTS_UPDATE: "fulfillments/update", |
47 | | - INVENTORY_ITEMS_CREATE: "inventory_items/create", |
48 | | - INVENTORY_ITEMS_DELETE: "inventory_items/delete", |
49 | | - INVENTORY_ITEMS_UPDATE: "inventory_items/update", |
50 | | - INVENTORY_LEVELS_CONNECT: "inventory_levels/connect", |
51 | | - INVENTORY_LEVELS_DISCONNECT: "inventory_levels/disconnect", |
52 | | - INVENTORY_LEVELS_UPDATE: "inventory_levels/update", |
53 | | - LOCALES_CREATE: "locales/create", |
54 | | - LOCALES_UPDATE: "locales/update", |
55 | | - LOCATIONS_CREATE: "locations/create", |
56 | | - LOCATIONS_DELETE: "locations/delete", |
57 | | - LOCATIONS_UPDATE: "locations/update", |
58 | | - MARKETS_CREATE: "markets/create", |
59 | | - MARKETS_DELETE: "markets/delete", |
60 | | - MARKETS_UPDATE: "markets/update", |
61 | | - ORDER_TRANSACTIONS_CREATE: "order_transactions/create", |
62 | | - ORDERS_CANCELLED: "orders/cancelled", |
63 | | - ORDERS_CREATE: "orders/create", |
64 | | - ORDERS_DELETE: "orders/delete", |
65 | | - ORDERS_EDITED: "orders/edited", |
66 | | - ORDERS_FULFILLED: "orders/fulfilled", |
67 | | - ORDERS_PAID: "orders/paid", |
68 | | - ORDERS_PARTIALLY_FULFILLED: "orders/partially_fulfilled", |
69 | | - ORDERS_UPDATED: "orders/updated", |
70 | | - PRODUCT_LISTINGS_ADD: "product_listings/add", |
71 | | - PRODUCT_LISTINGS_REMOVE: "product_listings/remove", |
72 | | - PRODUCT_LISTINGS_UPDATE: "product_listings/update", |
73 | | - PRODUCTS_CREATE: "products/create", |
74 | | - PRODUCTS_DELETE: "products/delete", |
75 | | - PRODUCTS_UPDATE: "products/update", |
76 | | - PROFILES_CREATE: "profiles/create", |
77 | | - PROFILES_DELETE: "profiles/delete", |
78 | | - PROFILES_UPDATE: "profiles/update", |
79 | | - REFUNDS_CREATE: "refunds/create", |
80 | | - SCHEDULED_PRODUCT_LISTINGS_ADD: "scheduled_product_listings/add", |
81 | | - SCHEDULED_PRODUCT_LISTINGS_REMOVE: "scheduled_product_listings/remove", |
82 | | - SCHEDULED_PRODUCT_LISTINGS_UPDATE: "scheduled_product_listings/update", |
83 | | - SELLING_PLAN_GROUPS_CREATE: "selling_plan_groups/create", |
84 | | - SELLING_PLAN_GROUPS_DELETE: "selling_plan_groups/delete", |
85 | | - SELLING_PLAN_GROUPS_UPDATE: "selling_plan_groups/update", |
86 | | - SHOP_UPDATE: "shop/update", |
87 | | - SUBSCRIPTION_BILLING_ATTEMPTS_CHALLENGED: "subscription_billing_attempts/challenged", |
88 | | - SUBSCRIPTION_BILLING_ATTEMPTS_FAILURE: "subscription_billing_attempts/failure", |
89 | | - SUBSCRIPTION_BILLING_ATTEMPTS_SUCCESS: "subscription_billing_attempts/success", |
90 | | - SUBSCRIPTION_CONTRACTS_CREATE: "subscription_contracts/create", |
91 | | - SUBSCRIPTION_CONTRACTS_UPDATE: "subscription_contracts/update", |
92 | | - TENDER_TRANSACTIONS_CREATE: "tender_transactions/create", |
93 | | - THEMES_CREATE: "themes/create", |
94 | | - THEMES_DELETE: "themes/delete", |
95 | | - THEMES_PUBLISH: "themes/publish", |
96 | | - EVENT_TOPICS_THEMES_UPDATE: "event-topics-themes-update", |
97 | | - THEMES_UPDATE: "themes/update", |
98 | | -}; |
99 | | - |
100 | | -const EVENT_TOPICS = Object.values(EVENT_TOPIC); |
101 | | - |
102 | | -export default { |
103 | | - DOMAIN_SUFFIX, |
104 | | - WEBHOOK_ID, |
105 | | - HEADER, |
106 | | - EVENT_TOPIC, |
107 | | - EVENT_TOPICS, |
108 | | -}; |
| 3 | +export default constants; |
0 commit comments