@ns8/ns8-shopify-switches
Advanced tools
Comparing version 1.0.191 to 1.0.192
@@ -6,3 +6,3 @@ "use strict"; | ||
const sendCustomerVerificationTrigger = async (switchContext, status) => { | ||
const { data: { platformId: orderNumber, }, merchant: { domain, serviceIntegrations, }, } = switchContext; | ||
const { data: { platformId: orderNumber }, merchant: { domain, serviceIntegrations, }, } = switchContext; | ||
const { token: accessToken } = serviceIntegrations | ||
@@ -9,0 +9,0 @@ .find((item) => item.type === 'SHOPIFY'); |
@@ -6,3 +6,3 @@ "use strict"; | ||
const sendEQ8ScoreTrigger = async (switchContext, score) => { | ||
const { data: { platformId: orderNumber, }, merchant: { domain, serviceIntegrations, }, } = switchContext; | ||
const { data: { platformId: orderNumber }, merchant: { domain, serviceIntegrations, }, } = switchContext; | ||
const { token: accessToken } = serviceIntegrations | ||
@@ -9,0 +9,0 @@ .find((item) => item.type === 'SHOPIFY'); |
@@ -6,3 +6,3 @@ "use strict"; | ||
const sendOrderRiskTrigger = async (switchContext, risk) => { | ||
const { data: { platformId: orderNumber, }, merchant: { domain, serviceIntegrations, }, } = switchContext; | ||
const { data: { platformId: orderNumber }, merchant: { domain, serviceIntegrations, }, } = switchContext; | ||
const { token: accessToken } = serviceIntegrations | ||
@@ -9,0 +9,0 @@ .find((item) => item.type === 'SHOPIFY'); |
@@ -6,3 +6,3 @@ "use strict"; | ||
const sendOrderStatusTrigger = async (switchContext, status) => { | ||
const { data: { platformId: orderNumber, }, merchant: { domain, serviceIntegrations, }, } = switchContext; | ||
const { data: { platformId: orderNumber }, merchant: { domain, serviceIntegrations, }, } = switchContext; | ||
const { token: accessToken } = serviceIntegrations | ||
@@ -9,0 +9,0 @@ .find((item) => item.type === 'SHOPIFY'); |
@@ -6,3 +6,3 @@ "use strict"; | ||
async update(switchContext) { | ||
const { data: { cancelled_at, cancel_reason, financial_status, fulfillment_status, name, }, merchant: { profile: { interceptPaymentCapture, }, }, } = switchContext; | ||
const { data: { cancelled_at, cancel_reason, financial_status, fulfillment_status, name, }, merchant: { profile: { interceptPaymentCapture } }, } = switchContext; | ||
let namedOrderUpdate; | ||
@@ -9,0 +9,0 @@ if (interceptPaymentCapture === ns8_protect_models_1.InterceptOption.BEFORE && financial_status === 'paid') { |
@@ -12,3 +12,3 @@ "use strict"; | ||
async handle(switchContext) { | ||
const { merchant: { profile, }, data: { platformId, status, name, }, } = switchContext; | ||
const { merchant: { profile }, data: { platformId, status, name, }, } = switchContext; | ||
const orderId = parseInt(platformId, 10); | ||
@@ -15,0 +15,0 @@ const client = getShopifyClient_1.default(switchContext); |
{ | ||
"name": "@ns8/ns8-shopify-switches", | ||
"version": "1.0.191", | ||
"version": "1.0.192", | ||
"description": "Custom switches for the shopify integration", | ||
@@ -15,3 +15,3 @@ "main": "dist/index.js", | ||
"build": "rm -rf dist && tsc && rm -rf node_modules && yarn install --production=true", | ||
"lint": "eslint src/** --ext ts", | ||
"lint": "eslint src/** test/** --ext ts", | ||
"test": "nyc mocha --colors", | ||
@@ -30,2 +30,3 @@ "test:only": "mocha --colors" | ||
"eslint-config-airbnb-base": "14.0.0", | ||
"eslint-plugin-chai-friendly": "^0.5.0", | ||
"eslint-plugin-import": "^2.19.1", | ||
@@ -32,0 +33,0 @@ "mocha": "^6.2.2", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
98459
16