auth0 2.43.0 → 2.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ## [v2.44.0](https://github.com/auth0/node-auth0/tree/v2.44.0) (2022-10-11)
4
+
5
+ [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.43.0...v2.44.0)
6
+
7
+ **Added**
8
+
9
+ - [SDK-3653] Add proxy support to Management Client [\#747](https://github.com/auth0/node-auth0/pull/747) ([adamjmcgrath](https://github.com/adamjmcgrath))
10
+
3
11
  ## [v2.43.0](https://github.com/auth0/node-auth0/tree/v2.43.0) (2022-10-10)
4
12
 
5
13
  [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.42.0...v2.43.0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auth0",
3
- "version": "2.43.0",
3
+ "version": "2.44.0",
4
4
  "description": "SDK for Auth0 API v2",
5
5
  "main": "src/index.js",
6
6
  "sideEffects": false,
@@ -65,6 +65,7 @@
65
65
  "proxyquire": "^2.1.3",
66
66
  "sinon": "^14.0.0",
67
67
  "string-replace-webpack-plugin": "0.1.3",
68
+ "superagent-proxy": "^3.0.0",
68
69
  "webpack": "^4.36.1"
69
70
  }
70
71
  }
@@ -24,6 +24,7 @@ class BaseManager {
24
24
  const clientOptions = {
25
25
  errorFormatter: { message: 'message', name: 'error' },
26
26
  headers: options.headers,
27
+ proxy: options.proxy,
27
28
  query: { repeatParams: false },
28
29
  includeResponseHeaders: options.includeResponseHeaders,
29
30
  };
@@ -97,6 +97,8 @@ class ClientsManager extends BaseManager {
97
97
  * });
98
98
  * @param {object} params Client parameters.
99
99
  * @param {string} params.client_id Application client ID.
100
+ * @param {string} params.fields Comma-separated list of fields to include or exclude (based on value provided for include_fields).
101
+ * @param {string} params.include_fields Whether specified fields are to be included (true) or excluded (false).
100
102
  * @param {Function} [cb] Callback function.
101
103
  * @returns {Promise|undefined}
102
104
  */
@@ -90,7 +90,8 @@ class ManagementClient {
90
90
  * @param {boolean} [options.retry.enabled=true] Enabled or Disable Retry Policy functionality.
91
91
  * @param {number} [options.retry.maxRetries=10] Retry failed requests X times.
92
92
  * @param {object} [options.headers] Additional headers that will be added to the outgoing requests.
93
- * @param {object} [options.includeResponseHeaders] Include the response headers in the payload in the format `{ data, headers }`.
93
+ * @param {string} [options.proxy] Add the `superagent-proxy` dependency and specify a proxy url eg 'https://myproxy.com:1234'
94
+ * @param {boolean} [options.includeResponseHeaders] Include the response headers in the payload in the format `{ data, headers }`.
94
95
  */
95
96
  constructor(options) {
96
97
  if (!options || typeof options !== 'object') {
@@ -149,6 +150,7 @@ class ManagementClient {
149
150
 
150
151
  managerOptions.retry = options.retry;
151
152
  managerOptions.includeResponseHeaders = options.includeResponseHeaders;
153
+ managerOptions.proxy = options.proxy;
152
154
 
153
155
  /**
154
156
  * Simple abstraction for performing CRUD operations on the
@@ -525,6 +527,8 @@ class ManagementClient {
525
527
  * });
526
528
  * @param {object} params Client parameters.
527
529
  * @param {string} params.client_id Application client ID.
530
+ * @param {string} params.fields Comma-separated list of fields to include or exclude (based on value provided for include_fields).
531
+ * @param {string} params.include_fields Whether specified fields are to be included (true) or excluded (false).
528
532
  * @param {Function} [cb] Callback function.
529
533
  * @returns {Promise|undefined}
530
534
  */