fulcrum-app
Advanced tools
Comparing version 2.3.1 to 2.3.2
@@ -57,3 +57,3 @@ 'use strict'; | ||
var createAuthorization = exports.createAuthorization = function () { | ||
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(email, password, organizationId, note, timeout) { | ||
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(email, password, organizationId, note, timeout, userId) { | ||
var authorizationObj, options, body; | ||
@@ -67,2 +67,3 @@ return _regenerator2.default.wrap(function _callee2$(_context2) { | ||
organization_id: organizationId, | ||
user_id: userId, | ||
note: note, | ||
@@ -92,3 +93,3 @@ timeout: timeout | ||
return function createAuthorization(_x3, _x4, _x5, _x6, _x7) { | ||
return function createAuthorization(_x3, _x4, _x5, _x6, _x7, _x8) { | ||
return _ref2.apply(this, arguments); | ||
@@ -95,0 +96,0 @@ }; |
@@ -105,2 +105,32 @@ 'use strict'; | ||
}, { | ||
key: 'regenerate', | ||
value: function () { | ||
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(id) { | ||
var body; | ||
return _regenerator2.default.wrap(function _callee2$(_context2) { | ||
while (1) { | ||
switch (_context2.prev = _context2.next) { | ||
case 0: | ||
_context2.next = 2; | ||
return this.client.api.post(this.memberActionPath(id, 'regenerate')); | ||
case 2: | ||
body = _context2.sent; | ||
return _context2.abrupt('return', body[this.resourceName]); | ||
case 4: | ||
case 'end': | ||
return _context2.stop(); | ||
} | ||
} | ||
}, _callee2, this); | ||
})); | ||
function regenerate(_x4) { | ||
return _ref2.apply(this, arguments); | ||
} | ||
return regenerate; | ||
}() | ||
}, { | ||
key: 'resourceName', | ||
@@ -107,0 +137,0 @@ get: function get() { |
{ | ||
"name": "fulcrum-app", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"description": "JavaScript wrapper for the Fulcrum API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -45,6 +45,7 @@ import base64 from 'base-64'; | ||
export async function createAuthorization(email, password, organizationId, note, timeout) { | ||
export async function createAuthorization(email, password, organizationId, note, timeout, userId) { | ||
const authorizationObj = { | ||
authorization: { | ||
organization_id: organizationId, | ||
user_id: userId, | ||
note: note, | ||
@@ -51,0 +52,0 @@ timeout: timeout |
@@ -38,2 +38,8 @@ import base64 from 'base-64'; | ||
} | ||
async regenerate(id) { | ||
const body = await this.client.api.post(this.memberActionPath(id, 'regenerate')); | ||
return body[this.resourceName]; | ||
} | ||
} | ||
@@ -40,0 +46,0 @@ |
@@ -77,2 +77,3 @@ import assert from 'assert'; | ||
assert('delete' in client.authorizations); | ||
assert('regenerate' in client.authorizations); | ||
}); | ||
@@ -79,0 +80,0 @@ }); |
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
202321
3795
441