RulesConfigsManager

management. RulesConfigsManager

RulesConfigsManager The rules configs manager class provides a simple abstraction for performing CRUD operations on Auth0 RulesConfigsManager.

Constructor

new RulesConfigsManager(options)

Source:
Parameters:
Name Type Description
options Object

The client options.

Name Type Attributes Description
baseUrl String

The URL of the API.

headers Object <optional>

Headers to be included in all requests.

retry Object <optional>

Retry Policy Config

Members

(inner) auth0RestClient :external:RestClient

Provides an abstraction layer for performing CRUD operations on Auth0 RulesConfigsManager.

Source:
Type:

(inner) clientOptions :Object

Options object for the Rest Client instance.

Source:
Type:
  • Object

Methods

delete(params, cbopt) → {Promise|undefined}

Delete an existing rules config.

Source:
Parameters:
Name Type Attributes Description
params Object

Rule Configs parameters.

Name Type Description
key String

Rule Configs key.

cb function <optional>

Callback function.

Returns:
Type:
Promise | undefined
Example
management.rulesConfigs.delete({ key: RULE_CONFIG_KEY }, function (err) {
  if (err) {
    // Handle error.
  }

  // Rules Config deleted.
});

getAll(cbopt) → {Promise|undefined}

Get all rules configs.

Source:
Parameters:
Name Type Attributes Description
cb function <optional>

Callback function.

Returns:
Type:
Promise | undefined
Example
management.rulesConfigs.getAll(function (err, rulesConfig) {
  console.log(rulesConfig.length);
});

set(params, data, cbopt) → {Promise|undefined}

Set a new rules config.

Source:
Parameters:
Name Type Attributes Description
params Object

Rule Config parameters.

Name Type Description
key String

Rule Config key.

data Object

Rule Config Data parameters.

Name Type Description
value String

Rule Config Data value.

cb function <optional>

Callback function.

Returns:
Type:
Promise | undefined
Example
var params = { key: RULE_CONFIG_KEY };
var data =   { value: RULES_CONFIG_VALUE };

management.rulesConfigs.set(params, data, function (err, rulesConfig) {
  if (err) {
    // Handle error.
  }

  // Rules Config set.
});