Socket
Socket
Sign inDemoInstall

@ns8/ns8-shopify-switches

Package Overview
Dependencies
71
Maintainers
10
Versions
195
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.30 to 1.0.31

12

dist/ShopifyInstallSwitch.js

@@ -7,3 +7,3 @@ "use strict";

this.onInstall = async (data) => {
const { trackingScriptUrl: src, platformData: { shopName, accessToken, }, webhooks: { createOrder: createOrderEndpoint, updateShop: updateShopEndpoint = 'https://matt-local-api.ngrok.io/protect/executor?action=UPDATE_SHOP', }, } = data;
const { trackingScriptUrl: src, platformData: { shopName, accessToken, }, webhooks: { createOrder: createOrderEndpoint, updateShop: updateShopEndpoint, updateOrderStatus: orderStatusUpdateEndpoint, uninstall: uninstallEndpoint, }, } = data;
const client = new Shopify({ shopName, accessToken });

@@ -35,2 +35,10 @@ const webhookList = await client.webhook.list();

});
const orderStatusUpdate = await client.webhook.create({
topic: 'orders/updated',
address: orderStatusUpdateEndpoint,
});
const uninstall = await client.webhook.create({
topic: 'app/uninstalled',
address: uninstallEndpoint,
});
return {

@@ -48,2 +56,4 @@ scripts: {

shopUpdate,
orderStatusUpdate,
uninstall,
},

@@ -50,0 +60,0 @@ },

3

dist/ShopifyUninstallSwitch.js
"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.uninstall()', switchContext);
console.log('ShopifyUninstallSwitch', JSON.stringify(ns8_switchboard_interfaces_1.SwitchContext));
return {};

@@ -7,0 +8,0 @@ }

{
"name": "@ns8/ns8-shopify-switches",
"version": "1.0.30",
"version": "1.0.31",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc