Comparing version 2.41.0 to 2.42.0
# Change Log | ||
## [v2.42.0](https://github.com/auth0/node-auth0/tree/v2.42.0) (2022-05-23) | ||
[Full Changelog](https://github.com/auth0/node-auth0/compare/v2.41.0...v2.42.0) | ||
**Added** | ||
- chore: add branding theme routes [\#725](https://github.com/auth0/node-auth0/pull/725) ([alejofernandez](https://github.com/alejofernandez)) | ||
## [v2.41.0](https://github.com/auth0/node-auth0/tree/v2.41.0) (2022-05-20) | ||
@@ -4,0 +12,0 @@ |
{ | ||
"name": "auth0", | ||
"version": "2.41.0", | ||
"version": "2.42.0", | ||
"description": "SDK for Auth0 API v2", | ||
@@ -49,8 +49,8 @@ "main": "src/index.js", | ||
"cross-env": "^5.2.0", | ||
"eslint": "^8.1.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint": "^8.16.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-jsdoc": "^37.0.3", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-promise": "^5.1.1", | ||
"eslint-plugin-promise": "^6.0.0", | ||
"husky": "^3.0.1", | ||
@@ -57,0 +57,0 @@ "jsdoc": "^3.6.7", |
@@ -59,2 +59,15 @@ const { ArgumentError } = require('rest-facade'); | ||
this.brandingTemplates = new RetryRestClient(brandingTemplateAuth0RestClient, options.retry); | ||
/** | ||
* Provides an abstraction layer for consuming the | ||
* {@link https://auth0.com/docs/api/management/v2#!/Branding/get_branding_theme Branding theme endpoint}. | ||
* | ||
* @type {external:RestClient} | ||
*/ | ||
const brandingThemesAuth0RestClient = new Auth0RestClient( | ||
`${options.baseUrl}/branding/themes/:id`, | ||
clientOptions, | ||
options.tokenProvider | ||
); | ||
this.brandingThemes = new RetryRestClient(brandingThemesAuth0RestClient, options.retry); | ||
} | ||
@@ -160,4 +173,113 @@ | ||
} | ||
/** | ||
* Get the new universal login theme by id. | ||
* | ||
* @example | ||
* var params = { id: THEME_ID }; | ||
* | ||
* management.branding.getTheme(params, function (err, theme) { | ||
* if (err) { | ||
* // Handle error. | ||
* } | ||
* | ||
* // Theme | ||
* console.log(theme); | ||
* }); | ||
* @param {object} params Theme params | ||
* @param {object} params.id Theme identifier. | ||
* @param {Function} [cb] Callback function. | ||
* @returns {Promise|undefined} | ||
*/ | ||
getTheme(...args) { | ||
return this.brandingThemes.get(...args); | ||
} | ||
/** | ||
* Get the default new universal login theme. | ||
* | ||
* @example | ||
* management.branding.getDefaultTheme(function (err, theme) { | ||
* if (err) { | ||
* // Handle error. | ||
* } | ||
* | ||
* // Theme | ||
* console.log(theme); | ||
* }); | ||
* @param {Function} [cb] Callback function. | ||
* @returns {Promise|undefined} | ||
*/ | ||
getDefaultTheme(...args) { | ||
return this.brandingThemes.get(...[{ id: 'default' }].concat(args)); | ||
} | ||
/** | ||
* Create a new theme. | ||
* | ||
* @example | ||
* management.branding.createTheme(data, function (err, theme) { | ||
* if (err) { | ||
* // Handle error. | ||
* } | ||
* | ||
* // Theme created. | ||
* console.log(theme); | ||
* }); | ||
* @param {object} data theme data object. | ||
* @param {Function} [cb] Callback function. | ||
* @returns {Promise|undefined} | ||
*/ | ||
createTheme(...args) { | ||
return this.brandingThemes.create(...args); | ||
} | ||
/** | ||
* Update a theme. | ||
* | ||
* @example | ||
* var data = THEME_OBJ; | ||
* var params = { id: THEME_ID }; | ||
* | ||
* management.branding.updateTheme(params, data, function (err, theme) { | ||
* if (err) { | ||
* // Handle error. | ||
* } | ||
* | ||
* // Theme updated. | ||
* console.log(theme); | ||
* }); | ||
* @param {object} params Theme parameters. | ||
* @param {object} params.id Theme identifier. | ||
* @param {object} data Updated theme data. | ||
* @param {Function} [cb] Callback function. | ||
* @returns {Promise|undefined} | ||
*/ | ||
updateTheme(...args) { | ||
return this.brandingThemes.patch(...args); | ||
} | ||
/** | ||
* Delete a theme. | ||
* | ||
* @example | ||
* var params = { id: THEME_ID }; | ||
* | ||
* management.branding.deleteTheme(params, function (err) { | ||
* if (err) { | ||
* // Handle error. | ||
* } | ||
* | ||
* // Theme deleted. | ||
* }); | ||
* @param {object} params Theme parameters. | ||
* @param {object} params.id Theme identifier. | ||
* @param {Function} [cb] Callback function. | ||
* @returns {Promise|undefined} | ||
*/ | ||
deleteTheme(...args) { | ||
return this.brandingThemes.delete(...args); | ||
} | ||
} | ||
module.exports = BrandingManager; |
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
441427
11958
1