var extend = require('util')._extend;
-var getRequestPromise = require('../utils').getRequestPromise;
+var axios = require('axios');
var ArgumentError = require('rest-facade').ArgumentError;
@@ -107,7 +107,7 @@ auth/TokensManager.js
}
// Perform the request.
- var promise = getRequestPromise({
+ var promise = axios({
method: 'POST',
url: this.baseUrl + '/tokeninfo',
data: { id_token: idToken },
@@ -197,7 +197,7 @@ auth/TokensManager.js
}
// Perform the request.
- var promise = getRequestPromise({
+ var promise = axios({
method: 'POST',
url: this.baseUrl + '/delegation',
data: body,
@@ -226,7 +226,7 @@ auth/TokensManager.js
diff --git a/docs/auth_UsersManager.js.html b/docs/auth_UsersManager.js.html
index a8e716c1c..2f680156b 100644
--- a/docs/auth_UsersManager.js.html
+++ b/docs/auth_UsersManager.js.html
@@ -24,7 +24,7 @@
@@ -40,7 +40,7 @@ auth/UsersManager.js
var extend = require('util')._extend;
-var getRequestPromise = require('../utils').getRequestPromise;
+var axios = require('axios');
var ArgumentError = require('rest-facade').ArgumentError;
@@ -110,11 +110,10 @@ auth/UsersManager.js
headers['Authorization'] = 'Bearer ' + accessToken;
// Perform the request.
- var promise = getRequestPromise({
+ var promise = axios({
method: 'GET',
url: url,
- headers: headers,
- data: {}
+ headers: headers
});
// Use callback if given.
@@ -195,7 +194,7 @@ auth/UsersManager.js
var data = extend({ client_id: settings.clientId || this.clientId }, settings);
var headers = extend({ Authorization: `Bearer ${settings.token}` }, this.headers);
// Perform the request.
- var promise = getRequestPromise({
+ var promise = axios({
method: 'POST',
headers: headers,
data: data,
@@ -224,7 +223,7 @@ auth/UsersManager.js
diff --git a/docs/auth_idToken.js.html b/docs/auth_idToken.js.html
index ed2196519..94bca7102 100644
--- a/docs/auth_idToken.js.html
+++ b/docs/auth_idToken.js.html
@@ -24,7 +24,7 @@
@@ -202,7 +202,7 @@ auth/idToken.js
diff --git a/docs/auth_index.js.html b/docs/auth_index.js.html
index 43ef35423..6dea49202 100644
--- a/docs/auth_index.js.html
+++ b/docs/auth_index.js.html
@@ -24,7 +24,7 @@
@@ -607,7 +607,7 @@ auth/index.js
diff --git a/docs/errors.js.html b/docs/errors.js.html
index 55f9e004d..b0d8c7226 100644
--- a/docs/errors.js.html
+++ b/docs/errors.js.html
@@ -24,7 +24,7 @@
@@ -98,7 +98,7 @@ errors.js
diff --git a/docs/external-RestClient.html b/docs/external-RestClient.html
index 70ca4d5f9..7dd5103aa 100644
--- a/docs/external-RestClient.html
+++ b/docs/external-RestClient.html
@@ -24,7 +24,7 @@
@@ -787,7 +787,7 @@
Source:
@@ -1639,7 +1639,7 @@
diff --git a/docs/global.html b/docs/global.html
index e57b6457d..d2e45119a 100644
--- a/docs/global.html
+++ b/docs/global.html
@@ -24,7 +24,7 @@
@@ -423,7 +423,7 @@ Returns:
diff --git a/docs/index.html b/docs/index.html
index fb84ab6e2..c0429d3e5 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -24,7 +24,7 @@
@@ -174,7 +174,7 @@ License
diff --git a/docs/index.js.html b/docs/index.js.html
index 5ace7a90c..60cba90a0 100644
--- a/docs/index.js.html
+++ b/docs/index.js.html
@@ -24,7 +24,7 @@
@@ -61,7 +61,7 @@ index.js
diff --git a/docs/management_BlacklistedTokensManager.js.html b/docs/management_BlacklistedTokensManager.js.html
index 04685c04d..1355da19f 100644
--- a/docs/management_BlacklistedTokensManager.js.html
+++ b/docs/management_BlacklistedTokensManager.js.html
@@ -24,7 +24,7 @@
@@ -153,7 +153,7 @@ management/BlacklistedTokensManager.js
diff --git a/docs/management_BrandingManager.js.html b/docs/management_BrandingManager.js.html
index 5e27d9119..50bdb2dab 100644
--- a/docs/management_BrandingManager.js.html
+++ b/docs/management_BrandingManager.js.html
@@ -24,7 +24,7 @@
@@ -155,7 +155,7 @@ management/BrandingManager.js
diff --git a/docs/management_ClientGrantsManager.js.html b/docs/management_ClientGrantsManager.js.html
index ed997ff26..75ba6cee6 100644
--- a/docs/management_ClientGrantsManager.js.html
+++ b/docs/management_ClientGrantsManager.js.html
@@ -24,7 +24,7 @@
@@ -216,7 +216,7 @@ management/ClientGrantsManager.js
diff --git a/docs/management_ClientsManager.js.html b/docs/management_ClientsManager.js.html
index 9a0698f0a..5aa18581f 100644
--- a/docs/management_ClientsManager.js.html
+++ b/docs/management_ClientsManager.js.html
@@ -24,7 +24,7 @@
@@ -238,7 +238,7 @@ management/ClientsManager.js
diff --git a/docs/management_ConnectionsManager.js.html b/docs/management_ConnectionsManager.js.html
index a4702f12e..2bb000525 100644
--- a/docs/management_ConnectionsManager.js.html
+++ b/docs/management_ConnectionsManager.js.html
@@ -24,7 +24,7 @@
@@ -232,7 +232,7 @@ management/ConnectionsManager.js
diff --git a/docs/management_CustomDomainsManager.js.html b/docs/management_CustomDomainsManager.js.html
index 719740a88..25dfe437f 100644
--- a/docs/management_CustomDomainsManager.js.html
+++ b/docs/management_CustomDomainsManager.js.html
@@ -24,7 +24,7 @@
@@ -241,7 +241,7 @@ management/CustomDomainsManager.js
diff --git a/docs/management_DeviceCredentialsManager.js.html b/docs/management_DeviceCredentialsManager.js.html
index de34c2ff5..c5034d164 100644
--- a/docs/management_DeviceCredentialsManager.js.html
+++ b/docs/management_DeviceCredentialsManager.js.html
@@ -24,7 +24,7 @@
@@ -177,7 +177,7 @@ management/DeviceCredentialsManager.js
diff --git a/docs/management_EmailProviderManager.js.html b/docs/management_EmailProviderManager.js.html
index 29727fd79..ca370b675 100644
--- a/docs/management_EmailProviderManager.js.html
+++ b/docs/management_EmailProviderManager.js.html
@@ -24,7 +24,7 @@
@@ -198,7 +198,7 @@ management/EmailProviderManager.js
diff --git a/docs/management_EmailTemplatesManager.js.html b/docs/management_EmailTemplatesManager.js.html
index ed0a8578b..61182a0d1 100644
--- a/docs/management_EmailTemplatesManager.js.html
+++ b/docs/management_EmailTemplatesManager.js.html
@@ -24,7 +24,7 @@
@@ -180,7 +180,7 @@ management/EmailTemplatesManager.js
diff --git a/docs/management_GrantsManager.js.html b/docs/management_GrantsManager.js.html
index d2e7d8861..4fa9f3353 100644
--- a/docs/management_GrantsManager.js.html
+++ b/docs/management_GrantsManager.js.html
@@ -24,7 +24,7 @@
@@ -170,7 +170,7 @@ management/GrantsManager.js
diff --git a/docs/management_GuardianManager.js.html b/docs/management_GuardianManager.js.html
index c53c6195d..6efe44b76 100644
--- a/docs/management_GuardianManager.js.html
+++ b/docs/management_GuardianManager.js.html
@@ -24,7 +24,7 @@
@@ -328,7 +328,7 @@ management/GuardianManager.js
diff --git a/docs/management_HooksManager.js.html b/docs/management_HooksManager.js.html
index 036b22182..510bea2df 100644
--- a/docs/management_HooksManager.js.html
+++ b/docs/management_HooksManager.js.html
@@ -24,7 +24,7 @@
@@ -419,7 +419,7 @@ management/HooksManager.js
diff --git a/docs/management_JobsManager.js.html b/docs/management_JobsManager.js.html
index 4322f287a..c4ad6342a 100644
--- a/docs/management_JobsManager.js.html
+++ b/docs/management_JobsManager.js.html
@@ -24,7 +24,7 @@
@@ -39,9 +39,10 @@ management/JobsManager.js
- var request = require('request');
+ var axios = require('axios');
var extend = require('util')._extend;
var Promise = require('bluebird');
+var FormData = require('form-data');
var fs = require('fs');
var ArgumentError = require('rest-facade').ArgumentError;
@@ -197,63 +198,36 @@ management/JobsManager.js
*/
JobsManager.prototype.importUsers = function(data, cb) {
var options = this.options;
- var headers = extend({}, options.headers);
+ var url = options.baseUrl + '/jobs/users-imports';
+ var userData = data.users_json ? Buffer.from(data.users_json) : fs.createReadStream(data.users);
+ var userFilename = data.users_json ? 'users.json' : data.users;
- headers['Content-Type'] = 'multipart/form-data';
+ var form = new FormData();
+ form.append('users', userData, userFilename);
+ form.append('connection_id', data.connection_id);
+ form.append('upsert', data.upsert === true ? 'true' : 'false');
+ form.append('send_completion_email', data.send_completion_email === false ? 'false' : 'true');
- var url = options.baseUrl + '/jobs/users-imports';
- var method = 'POST';
- var upsert = data.upsert === true ? 'true' : 'false';
- var send_completion_email = data.send_completion_email === false ? 'false' : 'true';
+ var headers = { ...options.headers, ...form.getHeaders() };
+ headers['Content-Type'] = 'multipart/form-data';
var promise = options.tokenProvider.getAccessToken().then(function(access_token) {
- return new Promise(function(resolve, reject) {
- request(
- {
- url: url,
- method: method,
- headers: extend({ Authorization: `Bearer ${access_token}` }, headers),
- formData: {
- users: {
- value: data.users_json
- ? Buffer.from(data.users_json)
- : fs.createReadStream(data.users),
- options: {
- filename: data.users_json ? 'users.json' : data.users
- }
- },
- connection_id: data.connection_id,
- upsert: upsert,
- send_completion_email: send_completion_email
- }
- },
- function(err, res) {
- if (err) {
- reject(err);
- return;
- }
- // `superagent` uses the error parameter in callback on http errors.
- // the following code is intended to keep that behaviour (https://github.com/visionmedia/superagent/blob/master/lib/node/response.js#L170)
- var type = (res.statusCode / 100) | 0;
- var isErrorResponse = 4 === type || 5 === type;
- if (isErrorResponse) {
- var error = new Error('cannot ' + method + ' ' + url + ' (' + res.statusCode + ')');
- error.status = res.statusCode;
- error.method = method;
- error.text = res.text;
- try {
- if (!error.text && res.body) {
- error.text = JSON.parse(res.body).message;
- }
- } catch (ex) {
- // Ignore the error.
- }
- reject(error);
- }
- resolve(res);
+ return axios
+ .post(url, form, { headers: { ...headers, Authorization: `Bearer ${access_token}` } })
+ .catch(function(err) {
+ if (!err.response) {
+ return Promise.reject(err);
}
- );
- });
+
+ var res = err.response;
+ // `superagent` uses the error parameter in callback on http errors.
+ // the following code is intended to keep that behaviour (https://github.com/visionmedia/superagent/blob/master/lib/node/response.js#L170)
+ var error = new Error('cannot POST' + ' ' + url + ' (' + res.status + ')');
+ error.status = res.status;
+ error.method = 'POST';
+ error.text = res.data.message || res.statusText || error.message;
+ return Promise.reject(error);
+ });
});
// Don't return a promise if a callback was given.
@@ -411,7 +385,7 @@ management/JobsManager.js
diff --git a/docs/management_LogsManager.js.html b/docs/management_LogsManager.js.html
index 0571b2ab5..33f2af9cf 100644
--- a/docs/management_LogsManager.js.html
+++ b/docs/management_LogsManager.js.html
@@ -24,7 +24,7 @@
@@ -165,7 +165,7 @@ management/LogsManager.js
diff --git a/docs/management_ManagementTokenProvider.js.html b/docs/management_ManagementTokenProvider.js.html
index 9c9ec4ca2..8b6110d79 100644
--- a/docs/management_ManagementTokenProvider.js.html
+++ b/docs/management_ManagementTokenProvider.js.html
@@ -24,7 +24,7 @@
@@ -192,7 +192,7 @@ management/ManagementTokenProvider.js
diff --git a/docs/management_PromptsManager.js.html b/docs/management_PromptsManager.js.html
index 09d130536..1b146074c 100644
--- a/docs/management_PromptsManager.js.html
+++ b/docs/management_PromptsManager.js.html
@@ -24,7 +24,7 @@
@@ -155,7 +155,7 @@ management/PromptsManager.js
diff --git a/docs/management_ResourceServersManager.js.html b/docs/management_ResourceServersManager.js.html
index 85cb3b408..2d2035be2 100644
--- a/docs/management_ResourceServersManager.js.html
+++ b/docs/management_ResourceServersManager.js.html
@@ -24,7 +24,7 @@
@@ -238,7 +238,7 @@ management/ResourceServersManager.js
diff --git a/docs/management_RolesManager.js.html b/docs/management_RolesManager.js.html
index db16e1374..0a1fda711 100644
--- a/docs/management_RolesManager.js.html
+++ b/docs/management_RolesManager.js.html
@@ -24,7 +24,7 @@
@@ -460,7 +460,7 @@ management/RolesManager.js
diff --git a/docs/management_RulesConfigsManager.js.html b/docs/management_RulesConfigsManager.js.html
index dc126ac83..e8ce408e2 100644
--- a/docs/management_RulesConfigsManager.js.html
+++ b/docs/management_RulesConfigsManager.js.html
@@ -24,7 +24,7 @@
@@ -180,7 +180,7 @@ management/RulesConfigsManager.js
diff --git a/docs/management_RulesManager.js.html b/docs/management_RulesManager.js.html
index 34bb6a0c6..2fe1a28be 100644
--- a/docs/management_RulesManager.js.html
+++ b/docs/management_RulesManager.js.html
@@ -24,7 +24,7 @@
@@ -248,7 +248,7 @@ management/RulesManager.js
diff --git a/docs/management_StatsManager.js.html b/docs/management_StatsManager.js.html
index d946a3e6e..a0899507e 100644
--- a/docs/management_StatsManager.js.html
+++ b/docs/management_StatsManager.js.html
@@ -24,7 +24,7 @@
@@ -174,7 +174,7 @@ management/StatsManager.js
diff --git a/docs/management_TenantManager.js.html b/docs/management_TenantManager.js.html
index b16dab789..27651acf3 100644
--- a/docs/management_TenantManager.js.html
+++ b/docs/management_TenantManager.js.html
@@ -24,7 +24,7 @@
@@ -166,7 +166,7 @@ management/TenantManager.js
diff --git a/docs/management_TicketsManager.js.html b/docs/management_TicketsManager.js.html
index 7372e6799..4b91603f0 100644
--- a/docs/management_TicketsManager.js.html
+++ b/docs/management_TicketsManager.js.html
@@ -24,7 +24,7 @@
@@ -166,7 +166,7 @@ management/TicketsManager.js
diff --git a/docs/management_UserBlocksManager.js.html b/docs/management_UserBlocksManager.js.html
index b1f7e4dca..07dabdbcf 100644
--- a/docs/management_UserBlocksManager.js.html
+++ b/docs/management_UserBlocksManager.js.html
@@ -24,7 +24,7 @@
@@ -229,7 +229,7 @@ management/UserBlocksManager.js
diff --git a/docs/management_UsersManager.js.html b/docs/management_UsersManager.js.html
index c55cc4311..3df944984 100644
--- a/docs/management_UsersManager.js.html
+++ b/docs/management_UsersManager.js.html
@@ -24,7 +24,7 @@
@@ -927,7 +927,7 @@ management/UsersManager.js
diff --git a/docs/management_index.js.html b/docs/management_index.js.html
index cde4d9100..67b8e6a3c 100644
--- a/docs/management_index.js.html
+++ b/docs/management_index.js.html
@@ -24,7 +24,7 @@
@@ -2435,6 +2435,7 @@ management/index.js
*
* @method getRulesConfigs
* @memberOf module:management.ManagementClient.prototype
+ * @param {Function} [cb] Callback function.
*
* @example
*
@@ -3259,7 +3260,7 @@ management/index.js
diff --git a/docs/module-auth.AuthenticationClient.html b/docs/module-auth.AuthenticationClient.html
index 16eaa6449..66f153c8a 100644
--- a/docs/module-auth.AuthenticationClient.html
+++ b/docs/module-auth.AuthenticationClient.html
@@ -24,7 +24,7 @@
@@ -3858,7 +3858,7 @@ Examples
diff --git a/docs/module-auth.DatabaseAuthenticator.html b/docs/module-auth.DatabaseAuthenticator.html
index 1eca6c6f9..3527d05ae 100644
--- a/docs/module-auth.DatabaseAuthenticator.html
+++ b/docs/module-auth.DatabaseAuthenticator.html
@@ -24,7 +24,7 @@
@@ -1738,7 +1738,7 @@ Example
diff --git a/docs/module-auth.OAUthWithIDTokenValidation.html b/docs/module-auth.OAUthWithIDTokenValidation.html
index e90a737ee..fc595f516 100644
--- a/docs/module-auth.OAUthWithIDTokenValidation.html
+++ b/docs/module-auth.OAUthWithIDTokenValidation.html
@@ -24,7 +24,7 @@
@@ -450,7 +450,7 @@ Parameters:
diff --git a/docs/module-auth.OAuthAuthenticator.html b/docs/module-auth.OAuthAuthenticator.html
index 4b891929d..635c70f0a 100644
--- a/docs/module-auth.OAuthAuthenticator.html
+++ b/docs/module-auth.OAuthAuthenticator.html
@@ -24,7 +24,7 @@
@@ -2050,7 +2050,7 @@ Returns:
diff --git a/docs/module-auth.PasswordlessAuthenticator.html b/docs/module-auth.PasswordlessAuthenticator.html
index 5fb9d9f7d..2da30aec7 100644
--- a/docs/module-auth.PasswordlessAuthenticator.html
+++ b/docs/module-auth.PasswordlessAuthenticator.html
@@ -24,7 +24,7 @@
@@ -1442,7 +1442,7 @@ Examples
diff --git a/docs/module-auth.TokensManager.html b/docs/module-auth.TokensManager.html
index 5aa1a3629..ccdff063f 100644
--- a/docs/module-auth.TokensManager.html
+++ b/docs/module-auth.TokensManager.html
@@ -24,7 +24,7 @@
@@ -352,7 +352,7 @@ Parameters:
diff --git a/docs/module-auth.UsersManager.html b/docs/module-auth.UsersManager.html
index b5d98709a..2fd3b5379 100644
--- a/docs/module-auth.UsersManager.html
+++ b/docs/module-auth.UsersManager.html
@@ -24,7 +24,7 @@
@@ -611,7 +611,7 @@ impersonat
Source:
@@ -1009,7 +1009,7 @@ Example
diff --git a/docs/module-auth.html b/docs/module-auth.html
index 911862694..bc3b06278 100644
--- a/docs/module-auth.html
+++ b/docs/module-auth.html
@@ -24,7 +24,7 @@
@@ -108,7 +108,7 @@ Classes
diff --git a/docs/module-errors.html b/docs/module-errors.html
index 38ddbd019..46d179cd0 100644
--- a/docs/module-errors.html
+++ b/docs/module-errors.html
@@ -24,7 +24,7 @@
@@ -254,7 +254,7 @@ (st
diff --git a/docs/module-management.BlacklistedTokensManager.html b/docs/module-management.BlacklistedTokensManager.html
index 57bd5578c..9ddc255d3 100644
--- a/docs/module-management.BlacklistedTokensManager.html
+++ b/docs/module-management.BlacklistedTokensManager.html
@@ -24,7 +24,7 @@
@@ -991,7 +991,7 @@ Example
diff --git a/docs/module-management.BrandingManager.html b/docs/module-management.BrandingManager.html
index e4c91e283..f5499b7d4 100644
--- a/docs/module-management.BrandingManager.html
+++ b/docs/module-management.BrandingManager.html
@@ -24,7 +24,7 @@
@@ -942,7 +942,7 @@ Example
diff --git a/docs/module-management.ClientGrantsManager.html b/docs/module-management.ClientGrantsManager.html
index 0fd08a77e..f48d015a1 100644
--- a/docs/module-management.ClientGrantsManager.html
+++ b/docs/module-management.ClientGrantsManager.html
@@ -24,7 +24,7 @@
@@ -1636,7 +1636,7 @@ Example
diff --git a/docs/module-management.ClientsManager.html b/docs/module-management.ClientsManager.html
index fdc30808a..df8e2c6ed 100644
--- a/docs/module-management.ClientsManager.html
+++ b/docs/module-management.ClientsManager.html
@@ -24,7 +24,7 @@
@@ -1904,7 +1904,7 @@ Example
diff --git a/docs/module-management.ConnectionsManager.html b/docs/module-management.ConnectionsManager.html
index c8f03d119..c49a07637 100644
--- a/docs/module-management.ConnectionsManager.html
+++ b/docs/module-management.ConnectionsManager.html
@@ -24,7 +24,7 @@
@@ -1899,7 +1899,7 @@ Example
diff --git a/docs/module-management.CustomDomainsManager.html b/docs/module-management.CustomDomainsManager.html
index 406399ea6..4abb9e0d8 100644
--- a/docs/module-management.CustomDomainsManager.html
+++ b/docs/module-management.CustomDomainsManager.html
@@ -24,7 +24,7 @@
@@ -1731,7 +1731,7 @@ Example
diff --git a/docs/module-management.DeviceCredentialsManager.html b/docs/module-management.DeviceCredentialsManager.html
index 2bac7c7ed..5f6800746 100644
--- a/docs/module-management.DeviceCredentialsManager.html
+++ b/docs/module-management.DeviceCredentialsManager.html
@@ -24,7 +24,7 @@
@@ -1179,7 +1179,7 @@ Example
diff --git a/docs/module-management.EmailProviderManager.html b/docs/module-management.EmailProviderManager.html
index fa0966df0..3a82ccc30 100644
--- a/docs/module-management.EmailProviderManager.html
+++ b/docs/module-management.EmailProviderManager.html
@@ -24,7 +24,7 @@
@@ -1480,7 +1480,7 @@ Example
diff --git a/docs/module-management.EmailTemplatesManager.html b/docs/module-management.EmailTemplatesManager.html
index 8661130a4..c8d0a6438 100644
--- a/docs/module-management.EmailTemplatesManager.html
+++ b/docs/module-management.EmailTemplatesManager.html
@@ -24,7 +24,7 @@
@@ -1304,7 +1304,7 @@ Example
diff --git a/docs/module-management.GrantsManager.html b/docs/module-management.GrantsManager.html
index 0a3d9e857..b81466da3 100644
--- a/docs/module-management.GrantsManager.html
+++ b/docs/module-management.GrantsManager.html
@@ -24,7 +24,7 @@
@@ -1515,7 +1515,7 @@ Example
diff --git a/docs/module-management.GuardianManager.html b/docs/module-management.GuardianManager.html
index 079feeb35..87b5825a1 100644
--- a/docs/module-management.GuardianManager.html
+++ b/docs/module-management.GuardianManager.html
@@ -24,7 +24,7 @@
@@ -1440,7 +1440,7 @@ Example
diff --git a/docs/module-management.HooksManager.html b/docs/module-management.HooksManager.html
index 5596fa9c6..9af7d98fb 100644
--- a/docs/module-management.HooksManager.html
+++ b/docs/module-management.HooksManager.html
@@ -24,7 +24,7 @@
@@ -3099,7 +3099,7 @@ Example
diff --git a/docs/module-management.JobsManager.html b/docs/module-management.JobsManager.html
index b57b0981b..a13195b4b 100644
--- a/docs/module-management.JobsManager.html
+++ b/docs/module-management.JobsManager.html
@@ -24,7 +24,7 @@
@@ -101,7 +101,7 @@ new JobsMa
Source:
@@ -382,7 +382,7 @@ (inner) Source:
@@ -457,7 +457,7 @@ (inner)
Source:
@@ -532,7 +532,7 @@ (inne
Source:
@@ -616,7 +616,7 @@ errorsSource:
@@ -890,7 +890,7 @@ exportUser
Source:
@@ -1304,7 +1304,7 @@ getSource:
@@ -1580,7 +1580,7 @@ importUser
Source:
@@ -2006,7 +2006,7 @@ verifyEmai
Source:
@@ -2246,7 +2246,7 @@ Example
diff --git a/docs/module-management.LogsManager.html b/docs/module-management.LogsManager.html
index 8658c926c..b9fd5b39b 100644
--- a/docs/module-management.LogsManager.html
+++ b/docs/module-management.LogsManager.html
@@ -24,7 +24,7 @@
@@ -1286,7 +1286,7 @@ Example
diff --git a/docs/module-management.ManagementClient.html b/docs/module-management.ManagementClient.html
index 2e9f39711..2619c8774 100644
--- a/docs/module-management.ManagementClient.html
+++ b/docs/module-management.ManagementClient.html
@@ -24,7 +24,7 @@
@@ -2491,7 +2491,7 @@ addHookS
Source:
@@ -2796,7 +2796,7 @@ a
Source:
@@ -5061,7 +5061,7 @@ cre
Source:
@@ -5897,7 +5897,7 @@ Source:
@@ -6077,7 +6077,7 @@ createHook<
Source:
@@ -6705,7 +6705,7 @@ createRole<
Source:
@@ -8353,7 +8353,7 @@ del
Source:
@@ -9346,7 +9346,7 @@ deleteHook<
Source:
@@ -9884,7 +9884,7 @@ deleteRole<
Source:
@@ -10422,7 +10422,7 @@ dele
Source:
@@ -11972,7 +11972,7 @@ getAcce
Source:
@@ -12444,7 +12444,7 @@ ge
Source:
@@ -14216,7 +14216,7 @@ getCus
Source:
@@ -14485,7 +14485,7 @@ getCu
Source:
@@ -16599,7 +16599,7 @@ getHookSource:
@@ -16868,7 +16868,7 @@ getHooksSource:
@@ -17195,7 +17195,7 @@ getHook
Source:
@@ -18515,7 +18515,7 @@ g
Source:
@@ -19335,7 +19335,7 @@ getRoleSource:
@@ -19604,7 +19604,7 @@ getRolesSource:
@@ -20484,7 +20484,7 @@ Example
- getRulesConfigs() → {Promise|undefined}
+ getRulesConfigs(cbopt) → {Promise|undefined}
@@ -20546,6 +20546,70 @@ getRul
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
@@ -23381,7 +23445,7 @@ getUser
Source:
@@ -24707,7 +24771,7 @@ remo
Source:
@@ -25012,7 +25076,7 @@ Source:
@@ -27903,7 +27967,7 @@ Source:
@@ -29637,7 +29701,7 @@ updateHook<
Source:
@@ -29942,7 +30006,7 @@ upda
Source:
@@ -30553,7 +30617,7 @@ updateRole<
Source:
@@ -31994,7 +32058,7 @@ ver
Source:
@@ -32232,7 +32296,7 @@ Example
diff --git a/docs/module-management.ManagementTokenProvider.html b/docs/module-management.ManagementTokenProvider.html
index 094b6367a..be22bbdf1 100644
--- a/docs/module-management.ManagementTokenProvider.html
+++ b/docs/module-management.ManagementTokenProvider.html
@@ -24,7 +24,7 @@
@@ -633,7 +633,7 @@ Returns:
diff --git a/docs/module-management.PromptsManager.html b/docs/module-management.PromptsManager.html
index 85722ebb3..59fdb9302 100644
--- a/docs/module-management.PromptsManager.html
+++ b/docs/module-management.PromptsManager.html
@@ -24,7 +24,7 @@
@@ -942,7 +942,7 @@ Example
diff --git a/docs/module-management.ResourceServersManager.html b/docs/module-management.ResourceServersManager.html
index f61722c40..7d111aed9 100644
--- a/docs/module-management.ResourceServersManager.html
+++ b/docs/module-management.ResourceServersManager.html
@@ -24,7 +24,7 @@
@@ -1904,7 +1904,7 @@ Example
diff --git a/docs/module-management.RetryRestClient.html b/docs/module-management.RetryRestClient.html
index 51bd719e3..e6a893cab 100644
--- a/docs/module-management.RetryRestClient.html
+++ b/docs/module-management.RetryRestClient.html
@@ -24,7 +24,7 @@
@@ -377,7 +377,7 @@ Parameters:
diff --git a/docs/module-management.RolesManager.html b/docs/module-management.RolesManager.html
index e4a81c5df..636152426 100644
--- a/docs/module-management.RolesManager.html
+++ b/docs/module-management.RolesManager.html
@@ -24,7 +24,7 @@
@@ -4293,7 +4293,7 @@ Example
diff --git a/docs/module-management.RulesConfigsManager.html b/docs/module-management.RulesConfigsManager.html
index c14ae7b68..c33706408 100644
--- a/docs/module-management.RulesConfigsManager.html
+++ b/docs/module-management.RulesConfigsManager.html
@@ -24,7 +24,7 @@
@@ -1317,7 +1317,7 @@ Example
diff --git a/docs/module-management.RulesManager.html b/docs/module-management.RulesManager.html
index 7790c07ef..8af0df5bc 100644
--- a/docs/module-management.RulesManager.html
+++ b/docs/module-management.RulesManager.html
@@ -24,7 +24,7 @@
@@ -1910,7 +1910,7 @@ Example
diff --git a/docs/module-management.StatsManager.html b/docs/module-management.StatsManager.html
index 2494655df..0a7bbbb92 100644
--- a/docs/module-management.StatsManager.html
+++ b/docs/module-management.StatsManager.html
@@ -24,7 +24,7 @@
@@ -919,7 +919,7 @@ Example
diff --git a/docs/module-management.TenantManager.html b/docs/module-management.TenantManager.html
index 688b10dee..bce863fcd 100644
--- a/docs/module-management.TenantManager.html
+++ b/docs/module-management.TenantManager.html
@@ -24,7 +24,7 @@
@@ -871,7 +871,7 @@ Example
diff --git a/docs/module-management.TicketsManager.html b/docs/module-management.TicketsManager.html
index a35339679..bc7ff5a6d 100644
--- a/docs/module-management.TicketsManager.html
+++ b/docs/module-management.TicketsManager.html
@@ -24,7 +24,7 @@
@@ -805,7 +805,7 @@ Example
diff --git a/docs/module-management.UserBlocksManager.html b/docs/module-management.UserBlocksManager.html
index b4a13effe..d5e507f7d 100644
--- a/docs/module-management.UserBlocksManager.html
+++ b/docs/module-management.UserBlocksManager.html
@@ -24,7 +24,7 @@
@@ -1432,7 +1432,7 @@ Example
diff --git a/docs/module-management.UsersManager.html b/docs/module-management.UsersManager.html
index 1bb1b0360..3526e9b62 100644
--- a/docs/module-management.UsersManager.html
+++ b/docs/module-management.UsersManager.html
@@ -24,7 +24,7 @@
@@ -5753,7 +5753,7 @@ Example
diff --git a/docs/module-management.html b/docs/module-management.html
index ce1529c57..6e0670a90 100644
--- a/docs/module-management.html
+++ b/docs/module-management.html
@@ -24,7 +24,7 @@
@@ -168,7 +168,7 @@ Classes
diff --git a/docs/module-utils.html b/docs/module-utils.html
index d65ac4efc..8dee71290 100644
--- a/docs/module-utils.html
+++ b/docs/module-utils.html
@@ -24,7 +24,7 @@
-
-
-
-
-
-
-
-
-
-
- (static) getRequestPromise()
-
-
-
-
-
-
- Perform a request with the given settings and return a promise that resolves
-when the request is successful and rejects when there's an error.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -310,7 +226,7 @@ (static) Source:
@@ -395,7 +311,7 @@ (static)
Source:
@@ -447,7 +363,7 @@ (static)
diff --git a/docs/utils.js.html b/docs/utils.js.html
index 83ead48f5..e66d68ffa 100644
--- a/docs/utils.js.html
+++ b/docs/utils.js.html
@@ -24,7 +24,7 @@
@@ -40,7 +40,6 @@ utils.js
var Promise = require('bluebird');
-var request = require('request');
var pkg = require('../package.json');
/**
@@ -103,35 +102,6 @@ utils.js
});
};
-/**
- * Perform a request with the given settings and return a promise that resolves
- * when the request is successful and rejects when there's an error.
- *
- * @method getRequestPromise
- * @memberOf module:utils
- */
-utils.getRequestPromise = function(settings) {
- return new Promise(function(resolve, reject) {
- request(
- {
- url: settings.url,
- method: settings.method,
- body: settings.data,
- json: typeof settings.data === 'object',
- headers: settings.headers
- },
- function(err, res, body) {
- if (err) {
- reject(err);
- return;
- }
-
- resolve(res.body);
- }
- );
- });
-};
-
utils.containsUnsafeChars = s => {
const safeChars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$-_.+!*'(),%";
return !!s.split('').find(c => !safeChars.includes(c));
@@ -168,7 +138,7 @@ utils.js
diff --git a/package.json b/package.json
index 0030e7ca4..c9e1f61ba 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "auth0",
- "version": "2.24.0",
+ "version": "2.25.0",
"description": "SDK for Auth0 API v2",
"main": "src/index.js",
"files": [
@@ -49,7 +49,7 @@
"json-loader": "^0.5.7",
"jws": "^3.2.2",
"minami": "^1.2.3",
- "mocha": "^6.2.3",
+ "mocha": "^6.2.0",
"mocha-junit-reporter": "^1.23.1",
"moment": "^2.24.0",
"nock": "^10.0.6",
@@ -60,6 +60,6 @@
"proxyquire": "^2.1.1",
"sinon": "^7.3.2",
"string-replace-webpack-plugin": "0.1.3",
- "webpack": "^4.43.0"
+ "webpack": "^4.36.1"
}
}
diff --git a/yarn.lock b/yarn.lock
index 47ed505e1..5e628ded4 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3114,7 +3114,7 @@ mocha-junit-reporter@^1.23.1:
strip-ansi "^4.0.0"
xml "^1.0.0"
-mocha@^6.2.3:
+mocha@^6.2.0:
version "6.2.3"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-6.2.3.tgz#e648432181d8b99393410212664450a4c1e31912"
integrity sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg==
@@ -5008,7 +5008,7 @@ webpack-sources@^1.4.0, webpack-sources@^1.4.1:
source-list-map "^2.0.0"
source-map "~0.6.1"
-webpack@^4.43.0:
+webpack@^4.36.1:
version "4.43.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.43.0.tgz#c48547b11d563224c561dad1172c8aa0b8a678e6"
integrity sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g==
RetryRestClient.js
diff --git a/docs/auth_DatabaseAuthenticator.js.html b/docs/auth_DatabaseAuthenticator.js.html index 656f3dfe3..2876af00d 100644 --- a/docs/auth_DatabaseAuthenticator.js.html +++ b/docs/auth_DatabaseAuthenticator.js.html @@ -24,7 +24,7 @@
auth/DatabaseAuthenticator.js
diff --git a/docs/auth_OAUthWithIDTokenValidation.js.html b/docs/auth_OAUthWithIDTokenValidation.js.html index 5fdc437b5..ec566f107 100644 --- a/docs/auth_OAUthWithIDTokenValidation.js.html +++ b/docs/auth_OAUthWithIDTokenValidation.js.html @@ -24,7 +24,7 @@
auth/OAUthWithIDTokenValidation.js
diff --git a/docs/auth_OAuthAuthenticator.js.html b/docs/auth_OAuthAuthenticator.js.html index 6175470a5..03b776c11 100644 --- a/docs/auth_OAuthAuthenticator.js.html +++ b/docs/auth_OAuthAuthenticator.js.html @@ -24,7 +24,7 @@
auth/OAuthAuthenticator.js
diff --git a/docs/auth_PasswordlessAuthenticator.js.html b/docs/auth_PasswordlessAuthenticator.js.html index eb08ead32..13eab3ec9 100644 --- a/docs/auth_PasswordlessAuthenticator.js.html +++ b/docs/auth_PasswordlessAuthenticator.js.html @@ -24,7 +24,7 @@
auth/PasswordlessAuthenticator.js
diff --git a/docs/auth_TokensManager.js.html b/docs/auth_TokensManager.js.html index 62f15ecfa..f9ab590fb 100644 --- a/docs/auth_TokensManager.js.html +++ b/docs/auth_TokensManager.js.html @@ -24,7 +24,7 @@