@quo-finance/synapsenode
Advanced tools
Comparing version 1.2.16 to 1.2.17
@@ -22,2 +22,3 @@ const axios = require("axios"); | ||
reinitiateMicroDeposits, | ||
reauthACHNode, | ||
updateNode, | ||
@@ -219,2 +220,9 @@ deleteNode, | ||
module.exports[reauthACHNode] = ({ node_id, userInfo }) => { | ||
const { host, headers, id } = userInfo; | ||
const url = `${host}/users/${id}/nodes/${node_id}?reauth=yes`; | ||
return axios.patch(url, {}, { headers }); | ||
}; | ||
module.exports[updateNode] = ({ node_id, bodyParams, userInfo }) => { | ||
@@ -221,0 +229,0 @@ const { host, headers, id } = userInfo; |
@@ -30,2 +30,3 @@ module.exports = { | ||
verifyMicroDeposits: "verifyMicroDeposits", | ||
reauthACHNode: "reauthACHNode", | ||
reinitiateMicroDeposits: "reinitiateMicroDeposits", | ||
@@ -32,0 +33,0 @@ updateNode: "updateNode", |
@@ -64,3 +64,3 @@ const { | ||
proxy: { | ||
host: this.isProduction ? "" : "tnta3dxgcev.sandbox.verygoodproxy.com", | ||
host: this.isProduction ? "tnt3gasl6ww.live.verygoodproxy.com" : "tnta3dxgcev.sandbox.verygoodproxy.com", | ||
port: 8080, | ||
@@ -75,3 +75,2 @@ proxyAuth: vgsUsername + ":" + vgsPassword | ||
}); | ||
console.log("PROXYING TO VGS"); | ||
} | ||
@@ -78,0 +77,0 @@ } |
@@ -20,2 +20,3 @@ const { | ||
reinitiateMicroDeposits, | ||
reauthACHNode, | ||
updateNode, | ||
@@ -40,13 +41,9 @@ deleteNode, | ||
updateIpAddress | ||
} = require('../constants/apiReqNames'); | ||
} = require("../constants/apiReqNames"); | ||
const apiRequests = require('../apiReqs/apiRequests'); | ||
const buildHeaders = require('../helpers/buildHeaders'); | ||
const apiRequests = require("../apiReqs/apiRequests"); | ||
const buildHeaders = require("../helpers/buildHeaders"); | ||
class User { | ||
constructor({ | ||
data, | ||
headerObj, | ||
client | ||
}) { | ||
constructor({ data, headerObj, client }) { | ||
this.id = data._id; | ||
@@ -57,3 +54,3 @@ this.body = data; | ||
this.ip_address = headerObj.ip_address; | ||
this.oauth_key = ''; | ||
this.oauth_key = ""; | ||
this.client = client; | ||
@@ -97,3 +94,3 @@ this.headers = buildHeaders({ | ||
user_id: this.id, | ||
full_dehydrate: 'no', | ||
full_dehydrate: "no", | ||
headers: this.headers, | ||
@@ -204,3 +201,9 @@ clientInfo: this.client | ||
triggerDummyTransactions(node_id, queryParams = {}) { | ||
const { amount, foreign_transaction, is_credit, subnet_id, type } = queryParams; | ||
const { | ||
amount, | ||
foreign_transaction, | ||
is_credit, | ||
subnet_id, | ||
type | ||
} = queryParams; | ||
@@ -283,2 +286,10 @@ return apiRequests.user[triggerDummyTransactions]({ | ||
// PATCH REAUTHENTICATE ACH NODE | ||
reauthACHNode(node_id) { | ||
return apiRequests.user[reauthACHNode]({ | ||
node_id, | ||
userInfo: this | ||
}); | ||
} | ||
// PATCH UPDATE NODE | ||
@@ -285,0 +296,0 @@ updateNode(node_id, bodyParams) { |
{ | ||
"name": "@quo-finance/synapsenode", | ||
"version": "1.2.16", | ||
"version": "1.2.17", | ||
"description": "Node.js Library for SynapseFI API v3.1 Rest", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
44515
1462