Comparing version 2.10.0 to 2.11.0
# Change Log | ||
## [v2.11.0](https://github.com/auth0/node-auth0/tree/v2.11.0) (2018-07-25) | ||
[Full Changelog](https://github.com/auth0/node-auth0/compare/v2.10.0...v2.11.0) | ||
**Added** | ||
* Added Pagination Docs for a Client Grants, Resouce Servers and Rules [\#282](https://github.com/auth0/node-auth0/pull/282) ([cocojoe](https://github.com/cocojoe)) | ||
* Added rules config methods [\#227](https://github.com/auth0/node-auth0/pull/227) ([dctoon](https://github.com/dctoon)) | ||
**Fixed** | ||
* Get access token before importing users [\#267](https://github.com/auth0/node-auth0/pull/267) ([Floppy](https://github.com/Floppy)) | ||
## [v2.10.0](https://github.com/auth0/node-auth0/tree/v2.10.0) (2018-05-29) | ||
@@ -4,0 +17,0 @@ |
{ | ||
"name": "auth0", | ||
"version": "2.10.0", | ||
"version": "2.11.0", | ||
"description": "SDK for Auth0 API v2", | ||
"main": "src/index.js", | ||
"files": [ | ||
"src" | ||
], | ||
"files": ["src"], | ||
"scripts": { | ||
@@ -46,3 +44,3 @@ "test": "mocha -R spec $(find ./test -name *.tests.js)", | ||
"istanbul": "^0.4.0", | ||
"jsdoc": "^3.4.0", | ||
"jsdoc": "^3.5.5", | ||
"json-loader": "^0.5.4", | ||
@@ -49,0 +47,0 @@ "minami": "^1.2.3", |
@@ -85,8 +85,23 @@ var ArgumentError = require('rest-facade').ArgumentError; | ||
* | ||
* @example | ||
* management.clientGrants.getAll(function (err, grants) { | ||
* @example <caption> | ||
* This method takes an optional object as first argument that may be used to | ||
* specify pagination settings. If pagination options are not present, | ||
* the first page of a limited number of results will be returned. | ||
* </caption> | ||
* | ||
* // Pagination settings. | ||
* var params = { | ||
* per_page: 10, | ||
* page: 0 | ||
* }; | ||
* | ||
* | ||
* management.clientGrants.getAll(params, function (err, grants) { | ||
* console.log(grants.length); | ||
* }); | ||
* | ||
* @param {Function} [cb] Callback function. | ||
* @param {Object} [params] Client Grants parameters. | ||
* @param {Number} [params.per_page] Number of results per page. | ||
* @param {Number} [params.page] Page number, zero indexed. | ||
* @param {Function} [cb] Callback function. | ||
* | ||
@@ -93,0 +108,0 @@ * @return {Promise|undefined} |
@@ -98,12 +98,12 @@ var ArgumentError = require('rest-facade').ArgumentError; | ||
* per_page: 10, | ||
* page: 2 | ||
* page: 0 | ||
* }; | ||
* | ||
* management.clients.getAll(function (err, clients) { | ||
* management.clients.getAll(params, function (err, clients) { | ||
* console.log(clients.length); | ||
* }); | ||
* | ||
* @param {Object} [params] Clients params. | ||
* @param {Number} [params.per_page] Number of clients per page. | ||
* @param {Number} [params.page] Page number. | ||
* @param {Object} [params] Clients parameters. | ||
* @param {Number} [params.per_page] Number of results per page. | ||
* @param {Number} [params.page] Page number, zero indexed. | ||
* @param {Function} [cb] Callback function. | ||
@@ -110,0 +110,0 @@ * |
@@ -92,6 +92,6 @@ var ArgumentError = require('rest-facade').ArgumentError; | ||
* per_page: 10, | ||
* page: 2 | ||
* page: 0 | ||
* }; | ||
* | ||
* management.connections.getAll(function (err, connections) { | ||
* management.connections.getAll(params, function (err, connections) { | ||
* console.log(connections.length); | ||
@@ -101,4 +101,4 @@ * }); | ||
* @param {Object} [params] Connections params. | ||
* @param {Number} [params.per_page] Number of connections per page. | ||
* @param {Number} [params.page] Page number. | ||
* @param {Number} [params.per_page] Number of results per page. | ||
* @param {Number} [params.page] Page number, zero indexed. | ||
* @param {Function} [cb] Callback function. | ||
@@ -105,0 +105,0 @@ * |
@@ -27,2 +27,3 @@ /** @module management */ | ||
var ManagementTokenProvider = require('./ManagementTokenProvider'); | ||
var RulesConfigsManager = require('./RulesConfigsManager'); | ||
var EmailTemplatesManager = require('./EmailTemplatesManager'); | ||
@@ -248,2 +249,9 @@ | ||
this.emailTemplates = new EmailTemplatesManager(managerOptions); | ||
/** | ||
* RulesConfigs manager. | ||
* | ||
* @type {RulesConfigsManager} | ||
*/ | ||
this.rulesConfigs = new RulesConfigsManager(managerOptions); | ||
}; | ||
@@ -288,9 +296,22 @@ | ||
* | ||
* @example | ||
* management.getConnections(function (err, connections) { | ||
* @example <caption> | ||
* This method takes an optional object as first argument that may be used to | ||
* specify pagination settings. If pagination options are not present, | ||
* the first page of a limited number of results will be returned. | ||
* </caption> | ||
* | ||
* // Pagination settings. | ||
* var params = { | ||
* per_page: 10, | ||
* page: 0 | ||
* }; | ||
* | ||
* management.getConnections(params, function (err, connections) { | ||
* console.log(connections.length); | ||
* }); | ||
* | ||
* @param {Object} data Connection data object. | ||
* @param {Function} [cb] Callback function. | ||
* @param {Object} [params] Connections params. | ||
* @param {Number} [params.per_page] Number of results per page. | ||
* @param {Number} [params.page] Page number, zero indexed. | ||
* @param {Function} [cb] Callback function. | ||
* | ||
@@ -387,3 +408,3 @@ * @return {Promise|undefined} | ||
* | ||
* @param {Object} params Conneciton parameters. | ||
* @param {Object} params Connection parameters. | ||
* @param {String} params.id Connection ID. | ||
@@ -403,8 +424,22 @@ * @param {Object} data Updated connection data. | ||
* | ||
* @example | ||
* management.getClients(function (err, clients) { | ||
* @example <caption> | ||
* This method takes an optional object as first argument that may be used to | ||
* specify pagination settings. If pagination options are not present, | ||
* the first page of a limited number of results will be returned. | ||
* </caption> | ||
* | ||
* // Pagination settings. | ||
* var params = { | ||
* per_page: 10, | ||
* page: 0 | ||
* }; | ||
* | ||
* management.getClients(params, function (err, clients) { | ||
* console.log(clients.length); | ||
* }); | ||
* | ||
* @param {Function} [cb] Callback function. | ||
* @param {Object} [params] Clients parameters. | ||
* @param {Number} [params.per_page] Number of results per page. | ||
* @param {Number} [params.page] Page number, zero indexed. | ||
* @param {Function} [cb] Callback function. | ||
* | ||
@@ -516,8 +551,22 @@ * @return {Promise|undefined} | ||
* | ||
* @example | ||
* management.clientGrants.getAll(function (err, grants) { | ||
* @example <caption> | ||
* This method takes an optional object as first argument that may be used to | ||
* specify pagination settings. If pagination options are not present, | ||
* the first page of a limited number of results will be returned. | ||
* </caption> | ||
* | ||
* // Pagination settings. | ||
* var params = { | ||
* per_page: 10, | ||
* page: 0 | ||
* }; | ||
* | ||
* management.getClientGrants(params, function (err, grants) { | ||
* console.log(grants.length); | ||
* }); | ||
* | ||
* @param {Function} [cb] Callback function. | ||
* @param {Object} [params] Client Grants parameters. | ||
* @param {Number} [params.per_page] Number of results per page. | ||
* @param {Number} [params.page] Page number, zero indexed. | ||
* @param {Function} [cb] Callback function. | ||
* | ||
@@ -678,8 +727,22 @@ * @return {Promise|undefined} | ||
* | ||
* @example | ||
* management.getRules(function (err, rules) { | ||
* @example <caption> | ||
* This method takes an optional object as first argument that may be used to | ||
* specify pagination settings. If pagination options are not present, | ||
* the first page of a limited number of results will be returned. | ||
* </caption> | ||
* | ||
* // Pagination settings. | ||
* var params = { | ||
* per_page: 10, | ||
* page: 0 | ||
* }; | ||
* | ||
* management.getRules(params, function (err, rules) { | ||
* console.log(rules.length); | ||
* }); | ||
* | ||
* @param {Function} [cb] Callback function. | ||
* @param {Object} [params] Rules parameters. | ||
* @param {Number} [params.per_page] Number of results per page. | ||
* @param {Number} [params.page] Page number, zero indexed. | ||
* @param {Function} [cb] Callback function. | ||
* | ||
@@ -792,3 +855,4 @@ * @return {Promise|undefined} | ||
* This method takes an optional object as first argument that may be used to | ||
* specify pagination settings and the search query. | ||
* specify pagination settings. If pagination options are not present, | ||
* the first page of a limited number of results will be returned. | ||
* </caption> | ||
@@ -799,3 +863,3 @@ * | ||
* per_page: 10, | ||
* page: 2 | ||
* page: 0 | ||
* }; | ||
@@ -808,4 +872,4 @@ * | ||
* @param {Object} [params] Users params. | ||
* @param {Number} [params.per_page] Number of users per page. | ||
* @param {Number} [params.page] Page number. | ||
* @param {Number} [params.per_page] Number of results per page. | ||
* @param {Number} [params.page] Page number, zero indexed. | ||
* @param {Function} [cb] Callback function. | ||
@@ -1152,4 +1216,4 @@ * | ||
* @param {String} params.id User id. | ||
* @param {Number} params.per_page Number of logs per page. | ||
* @param {Number} params.page Page number. | ||
* @param {Number} params.per_page Number of results per page. | ||
* @param {Number} params.page Page number, zero indexed. | ||
* @param {String} params.sort The field to use for sorting. Use field:order where order is 1 for ascending and -1 for descending. For example date:-1. | ||
@@ -1565,9 +1629,27 @@ * @param {Boolean} params.include_totals true if a query summary must be included in the result, false otherwise. Default false; | ||
* | ||
* @example | ||
* management.getLogs(function (err, logs) { | ||
* @example <caption> | ||
* This method takes an optional object as first argument that may be used to | ||
* specify pagination settings and the search query. If pagination options are | ||
* not present, the first page of a limited number of results will be returned. | ||
* </caption> | ||
* | ||
* // Pagination settings. | ||
* var params = { | ||
* per_page: 10, | ||
* page: 2 | ||
* }; | ||
* | ||
* management.getLogs(params, function (err, logs) { | ||
* console.log(logs.length); | ||
* }); | ||
* | ||
* @param {Object} data Log data object. | ||
* @param {Function} [cb] Callback function. | ||
* @param {Object} [params] Logs params. | ||
* @param {String} [params.q] Search Criteria using Query String Syntax | ||
* @param {Number} [params.page] Page number. Zero based | ||
* @param {Number} [params.per_page] The amount of entries per page | ||
* @param {String} [params.sort] The field to use for sorting. | ||
* @param {String} [params.fields] A comma separated list of fields to include or exclude | ||
* @param {Boolean} [params.include_fields] true if the fields specified are to be included in the result, false otherwise. | ||
* @param {Boolean} [params.include_totals] true if a query summary must be included in the result, false otherwise. Default false | ||
* @param {Function} [cb] Callback function. | ||
* | ||
@@ -1606,9 +1688,22 @@ * @return {Promise|undefined} | ||
* | ||
* @example | ||
* management.getResourceServers(function (err, resourceServers) { | ||
* @example <caption> | ||
* This method takes an optional object as first argument that may be used to | ||
* specify pagination settings. If pagination options are not present, | ||
* the first page of a limited number of results will be returned. | ||
* </caption> | ||
* | ||
* // Pagination settings. | ||
* var params = { | ||
* per_page: 10, | ||
* page: 0 | ||
* }; | ||
* | ||
* management.getResourceServers(params, function (err, resourceServers) { | ||
* console.log(resourceServers.length); | ||
* }); | ||
* | ||
* @param {Object} data Connection data object. | ||
* @param {Function} [cb] Callback function. | ||
* @param {Object} [params] Resource Servers parameters. | ||
* @param {Number} [params.per_page] Number of results per page. | ||
* @param {Number} [params.page] Page number, zero indexed. | ||
* @param {Function} [cb] Callback function. | ||
* | ||
@@ -1691,2 +1786,76 @@ * @return {Promise|undefined} | ||
utils.wrapPropertyMethod(ManagementClient, 'updateResourceServer', 'resourceServers.update'); | ||
/** | ||
* Set a new rules config. | ||
* | ||
* @method setRulesConfig | ||
* @memberOf module:management.ManagementClient.prototype | ||
* | ||
* @example | ||
* var params = { key: RULE_CONFIG_KEY }; | ||
* var data = { value: RULES_CONFIG_VALUE }; | ||
* | ||
* management.setRulesConfig(params, data, function (err, rulesConfig) { | ||
* if (err) { | ||
* // Handle error. | ||
* } | ||
* | ||
* // Rules Config set. | ||
* }); | ||
* | ||
* @param {Object} params Rule Config parameters. | ||
* @param {String} params.key Rule Config key. | ||
* @param {Object} data Rule Config Data parameters. | ||
* @param {String} data.value Rule Config Data value. | ||
* @param {Function} [cb] Callback function. | ||
* | ||
* @return {Promise|undefined} | ||
*/ | ||
utils.wrapPropertyMethod(ManagementClient, 'setRulesConfig', 'rulesConfigs.set'); | ||
/** | ||
* Get rules config. | ||
* | ||
* @method getRulesConfigs | ||
* @memberOf module:management.ManagementClient.prototype | ||
* | ||
* @example | ||
* | ||
* management.getRulesConfigs(function (err, rulesConfigs) { | ||
* if (err) { | ||
* // Handle error. | ||
* } | ||
* | ||
* // Get Rules Configs. | ||
* }); | ||
* | ||
* @return {Promise|undefined} | ||
*/ | ||
utils.wrapPropertyMethod(ManagementClient, 'getRulesConfigs', 'rulesConfigs.getAll'); | ||
/** | ||
* Delete rules config. | ||
* | ||
* @method deleteRulesConfig | ||
* @memberOf module:management.ManagementClient.prototype | ||
* | ||
* @example | ||
* | ||
* management.deleteRulesConfig({ key: RULE_CONFIG_KEY }, function (err) { | ||
* if (err) { | ||
* // Handle error. | ||
* } | ||
* | ||
* // Rules Config deleted. | ||
* }); | ||
* | ||
* @param {Object} params Rule Configs parameters. | ||
* @param {String} params.key Rule Configs key. | ||
* @param {Function} [cb] Callback function. | ||
* | ||
* @return {Promise|undefined} | ||
*/ | ||
utils.wrapPropertyMethod(ManagementClient, 'deleteRulesConfig', 'rulesConfigs.delete'); | ||
module.exports = ManagementClient; |
@@ -61,8 +61,27 @@ var ArgumentError = require('rest-facade').ArgumentError; | ||
* | ||
* @example | ||
* management.logs.getAll(function (err, logs) { | ||
* @example <caption> | ||
* This method takes an optional object as first argument that may be used to | ||
* specify pagination settings and the search query. If pagination options are | ||
* not present, the first page of a limited number of results will be returned. | ||
* </caption> | ||
* | ||
* // Pagination settings. | ||
* var params = { | ||
* per_page: 10, | ||
* page: 2 | ||
* }; | ||
* | ||
* management.logs.getAll(params, function (err, logs) { | ||
* console.log(logs.length); | ||
* }); | ||
* | ||
* @param {Function} [cb] Callback function. | ||
* @param {Object} [params] Logs params. | ||
* @param {String} [params.q] Search Criteria using Query String Syntax | ||
* @param {Number} [params.page] Page number. Zero based | ||
* @param {Number} [params.per_page] The amount of entries per page | ||
* @param {String} [params.sort] The field to use for sorting. | ||
* @param {String} [params.fields] A comma separated list of fields to include or exclude | ||
* @param {Boolean} [params.include_fields] true if the fields specified are to be included in the result, false otherwise. | ||
* @param {Boolean} [params.include_totals] true if a query summary must be included in the result, false otherwise. Default false | ||
* @param {Function} [cb] Callback function. | ||
* | ||
@@ -69,0 +88,0 @@ * @return {Promise|undefined} |
@@ -89,8 +89,22 @@ var ArgumentError = require('rest-facade').ArgumentError; | ||
* | ||
* @example | ||
* management.resourceServers.getAll(function (err, resourceServers) { | ||
* @example <caption> | ||
* This method takes an optional object as first argument that may be used to | ||
* specify pagination settings. If pagination options are not present, | ||
* the first page of a limited number of results will be returned. | ||
* </caption> | ||
* | ||
* // Pagination settings. | ||
* var params = { | ||
* per_page: 10, | ||
* page: 0 | ||
* }; | ||
* | ||
* management.resourceServers.getAll(params, function (err, resourceServers) { | ||
* console.log(resourceServers.length); | ||
* }); | ||
* | ||
* @param {Function} [cb] Callback function. | ||
* @param {Object} [params] Resource Servers parameters. | ||
* @param {Number} [params.per_page] Number of results per page. | ||
* @param {Number} [params.page] Page number, zero indexed. | ||
* @param {Function} [cb] Callback function. | ||
* | ||
@@ -97,0 +111,0 @@ * @return {Promise|undefined} |
@@ -89,8 +89,22 @@ var ArgumentError = require('rest-facade').ArgumentError; | ||
* | ||
* @example | ||
* management.rules.getAll(function (err, rules) { | ||
* @example <caption> | ||
* This method takes an optional object as first argument that may be used to | ||
* specify pagination settings. If pagination options are not present, | ||
* the first page of a limited number of results will be returned. | ||
* </caption> | ||
* | ||
* // Pagination settings. | ||
* var params = { | ||
* per_page: 10, | ||
* page: 0 | ||
* }; | ||
* | ||
* management.rules.getAll(params, function (err, rules) { | ||
* console.log(rules.length); | ||
* }); | ||
* | ||
* @param {Function} [cb] Callback function. | ||
* @param {Object} [params] Rules parameters. | ||
* @param {Number} [params.per_page] Number of results per page. | ||
* @param {Number} [params.page] Page number, zero indexed. | ||
* @param {Function} [cb] Callback function. | ||
* | ||
@@ -97,0 +111,0 @@ * @return {Promise|undefined} |
@@ -154,6 +154,6 @@ var ArgumentError = require('rest-facade').ArgumentError; | ||
* per_page: 10, | ||
* page: 2 | ||
* page: 0 | ||
* }; | ||
* | ||
* management.users.getAll(function (err, users) { | ||
* management.users.getAll(params, function (err, users) { | ||
* console.log(users.length); | ||
@@ -163,4 +163,4 @@ * }); | ||
* @param {Object} [params] Users params. | ||
* @param {Number} [params.per_page] Number of users per page. | ||
* @param {Number} [params.page] Page number. | ||
* @param {Number} [params.per_page] Number of results per page. | ||
* @param {Number} [params.page] Page number, zero indexed. | ||
* @param {Function} [cb] Callback function. | ||
@@ -543,4 +543,4 @@ * | ||
* @param {String} params.id User id. | ||
* @param {Number} params.per_page Number of logs per page. | ||
* @param {Number} params.page Page number. | ||
* @param {Number} params.per_page Number of results per page. | ||
* @param {Number} params.page Page number, zero indexed. | ||
* @param {String} params.sort The field to use for sorting. Use field:order where order is 1 for ascending and -1 for descending. For example date:-1. | ||
@@ -547,0 +547,0 @@ * @param {Boolean} params.include_totals true if a query summary must be included in the result, false otherwise. Default false; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
205568
32
6228
0