@ns8/ns8-shopify-switches
Advanced tools
Comparing version 1.0.41 to 1.0.42
@@ -7,3 +7,3 @@ "use strict"; | ||
this.onInstall = async (data) => { | ||
const { trackingScriptUrl: src, platformData: { shopName, accessToken, }, webhooks: { createOrder: createOrderEndpoint, updateShop: updateShopEndpoint, updateOrderStatus: orderStatusUpdateEndpoint, uninstall: uninstallEndpoint, }, } = data; | ||
const { trackingScriptUrl: src, platformData: { shopName, accessToken, }, webhooks: { createOrder: createOrderEndpoint, updateMerchant: updateMerchantEndpoint, updateOrderStatus: orderStatusUpdateEndpoint, uninstall: uninstallEndpoint, }, } = data; | ||
const client = new Shopify({ shopName, accessToken }); | ||
@@ -31,5 +31,5 @@ const webhookList = await client.webhook.list(); | ||
}); | ||
const shopUpdate = await client.webhook.create({ | ||
const merchantUpdate = await client.webhook.create({ | ||
topic: 'shop/update', | ||
address: updateShopEndpoint, | ||
address: updateMerchantEndpoint, | ||
}); | ||
@@ -55,3 +55,3 @@ const orderStatusUpdate = await client.webhook.create({ | ||
orderTransaction, | ||
shopUpdate, | ||
merchantUpdate, | ||
orderStatusUpdate, | ||
@@ -58,0 +58,0 @@ uninstall, |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const ns8_switchboard_interfaces_1 = require("ns8-switchboard-interfaces"); | ||
class ShopifyUninstallSwitch { | ||
async uninstall(switchContext) { | ||
console.log('ShopifyUninstallSwitch', JSON.stringify(ns8_switchboard_interfaces_1.SwitchContext)); | ||
return {}; | ||
} | ||
async uninstall(switchContext) { } | ||
} | ||
exports.ShopifyUninstallSwitch = ShopifyUninstallSwitch; | ||
//# sourceMappingURL=ShopifyUninstallSwitch.js.map |
{ | ||
"name": "@ns8/ns8-shopify-switches", | ||
"version": "1.0.41", | ||
"version": "1.0.42", | ||
"description": "Custom switches for the shopify integration", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
16033
201