Comparing version
@@ -10,2 +10,4 @@ "use strict"; | ||
var _utils = require("./utils"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -81,3 +83,3 @@ | ||
* @param {object} options - Optional parameters | ||
* (token, encriptionKey, usernameType, password2, accessMode). | ||
* (token, encriptionKey, usernameType, password2, accessMode, certificate, privateKey). | ||
* @returns {object} Newly created link. | ||
@@ -94,2 +96,4 @@ * @throws {RequestError} | ||
accessMode, | ||
certificate, | ||
privateKey, | ||
result, | ||
@@ -103,3 +107,6 @@ _args = arguments; | ||
token = options.token, encryptionKey = options.encryptionKey, usernameType = options.usernameType, password2 = options.password2, accessMode = options.accessMode; | ||
_context.next = 4; | ||
certificate = options.certificate, privateKey = options.privateKey; | ||
certificate = certificate ? (0, _utils.encodeFileB64)(certificate) : certificate; | ||
privateKey = privateKey ? (0, _utils.encodeFileB64)(privateKey) : privateKey; | ||
_context.next = 7; | ||
return this.session.post(_classPrivateFieldLooseBase(this, _endpoint)[_endpoint], { | ||
@@ -113,10 +120,12 @@ institution: institution, | ||
access_mode: accessMode !== null && accessMode !== void 0 ? accessMode : Link.SINGLE, | ||
username_type: usernameType | ||
username_type: usernameType, | ||
certificate: certificate, | ||
private_key: privateKey | ||
}); | ||
case 4: | ||
case 7: | ||
result = _context.sent; | ||
return _context.abrupt("return", result); | ||
case 6: | ||
case 9: | ||
case "end": | ||
@@ -142,3 +151,4 @@ return _context.stop(); | ||
* @param {string} password - New password. | ||
* @param {object} options - Optional parameters (token, encryptionKey, password2). | ||
* @param {object} options - Optional parameters | ||
* (token, encryptionKey, password2, usernameType, certificate, privateKey). | ||
* @returns {object} Response | ||
@@ -151,7 +161,11 @@ * @throws {RequestError} | ||
value: function () { | ||
var _update = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(id, password) { | ||
var _update = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(id) { | ||
var options, | ||
token, | ||
encryptionKey, | ||
password, | ||
password2, | ||
usernameType, | ||
certificate, | ||
privateKey, | ||
result, | ||
@@ -163,5 +177,8 @@ _args2 = arguments; | ||
case 0: | ||
options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {}; | ||
token = options.token, encryptionKey = options.encryptionKey, password2 = options.password2; | ||
_context2.next = 4; | ||
options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {}; | ||
token = options.token, encryptionKey = options.encryptionKey, password = options.password, password2 = options.password2, usernameType = options.usernameType; | ||
certificate = options.certificate, privateKey = options.privateKey; | ||
certificate = certificate ? (0, _utils.encodeFileB64)(certificate) : certificate; | ||
privateKey = privateKey ? (0, _utils.encodeFileB64)(privateKey) : privateKey; | ||
_context2.next = 7; | ||
return this.session.put(_classPrivateFieldLooseBase(this, _endpoint)[_endpoint], id, { | ||
@@ -171,10 +188,13 @@ password: password, | ||
token: token, | ||
encryption_key: encryptionKey | ||
encryption_key: encryptionKey, | ||
username_type: usernameType, | ||
certificate: certificate, | ||
private_key: privateKey | ||
}); | ||
case 4: | ||
case 7: | ||
result = _context2.sent; | ||
return _context2.abrupt("return", result); | ||
case 6: | ||
case 9: | ||
case "end": | ||
@@ -187,3 +207,3 @@ return _context2.stop(); | ||
function update(_x4, _x5) { | ||
function update(_x4) { | ||
return _update.apply(this, arguments); | ||
@@ -190,0 +210,0 @@ } |
{ | ||
"name": "belvo", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "The node.js module for the Belvo API", | ||
@@ -5,0 +5,0 @@ "main": "lib/belvo.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
19
11.76%1854
8.8%110972
-3.58%1
Infinity%1
Infinity%