auth0 2.36.2 → 2.39.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 +41 -0
- package/README.md +33 -11
- package/package.json +22 -14
- package/src/Auth0RestClient.js +72 -71
- package/src/RetryRestClient.js +78 -81
- package/src/auth/DatabaseAuthenticator.js +242 -259
- package/src/auth/OAUthWithIDTokenValidation.js +99 -103
- package/src/auth/OAuthAuthenticator.js +325 -344
- package/src/auth/PasswordlessAuthenticator.js +238 -252
- package/src/auth/TokensManager.js +231 -246
- package/src/auth/UsersManager.js +149 -160
- package/src/auth/idToken.js +22 -19
- package/src/auth/index.js +510 -581
- package/src/errors.js +23 -23
- package/src/index.js +3 -2
- package/src/management/ActionsManager.js +510 -584
- package/src/management/BlacklistedTokensManager.js +77 -84
- package/src/management/BrandingManager.js +141 -163
- package/src/management/ClientGrantsManager.js +132 -145
- package/src/management/ClientsManager.js +145 -161
- package/src/management/ConnectionsManager.js +215 -204
- package/src/management/CustomDomainsManager.js +140 -157
- package/src/management/DeviceCredentialsManager.js +95 -111
- package/src/management/EmailProviderManager.js +110 -128
- package/src/management/EmailTemplatesManager.js +96 -112
- package/src/management/GrantsManager.js +94 -101
- package/src/management/GuardianManager.js +381 -455
- package/src/management/HooksManager.js +283 -325
- package/src/management/JobsManager.js +310 -343
- package/src/management/LogStreamsManager.js +142 -158
- package/src/management/LogsManager.js +92 -99
- package/src/management/ManagementTokenProvider.js +112 -120
- package/src/management/MigrationsManager.js +81 -90
- package/src/management/OrganizationsManager.js +686 -761
- package/src/management/PromptsManager.js +160 -182
- package/src/management/ResourceServersManager.js +143 -160
- package/src/management/RolesManager.js +323 -369
- package/src/management/RulesConfigsManager.js +94 -110
- package/src/management/RulesManager.js +154 -176
- package/src/management/StatsManager.js +87 -103
- package/src/management/TenantManager.js +81 -97
- package/src/management/TicketsManager.js +107 -115
- package/src/management/UserBlocksManager.js +135 -162
- package/src/management/UsersManager.js +729 -852
- package/src/management/index.js +3094 -3619
- package/src/utils.js +31 -60
|
@@ -1,179 +1,163 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var RetryRestClient = require('../RetryRestClient');
|
|
1
|
+
const { ArgumentError } = require('rest-facade');
|
|
2
|
+
const Auth0RestClient = require('../Auth0RestClient');
|
|
3
|
+
const RetryRestClient = require('../RetryRestClient');
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
|
-
* @class LogStreamsManager
|
|
8
6
|
* The logStreams class provides a simple abstraction for performing CRUD operations
|
|
9
7
|
* on Auth0 Log Streams.
|
|
10
|
-
* @constructor
|
|
11
|
-
* @memberOf module:management
|
|
12
|
-
*
|
|
13
|
-
* @param {Object} options The client options.
|
|
14
|
-
* @param {String} options.baseUrl The URL of the API.
|
|
15
|
-
* @param {Object} [options.headers] Headers to be included in all requests.
|
|
16
|
-
* @param {Object} [options.retry] Retry Policy Config
|
|
17
8
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
class LogStreamsManager {
|
|
10
|
+
/**
|
|
11
|
+
* @param {object} options The client options.
|
|
12
|
+
* @param {string} options.baseUrl The URL of the API.
|
|
13
|
+
* @param {object} [options.headers] Headers to be included in all requests.
|
|
14
|
+
* @param {object} [options.retry] Retry Policy Config
|
|
15
|
+
*/
|
|
16
|
+
constructor(options) {
|
|
17
|
+
if (options === null || typeof options !== 'object') {
|
|
18
|
+
throw new ArgumentError('Must provide client options');
|
|
19
|
+
}
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
if (options.baseUrl === null || options.baseUrl === undefined) {
|
|
22
|
+
throw new ArgumentError('Must provide a base URL for the API');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if ('string' !== typeof options.baseUrl || options.baseUrl.length === 0) {
|
|
26
|
+
throw new ArgumentError('The provided base URL is invalid');
|
|
27
|
+
}
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Options object for the Rest Client instance.
|
|
31
|
+
*
|
|
32
|
+
* @type {object}
|
|
33
|
+
*/
|
|
34
|
+
const clientOptions = {
|
|
35
|
+
headers: options.headers,
|
|
36
|
+
query: { repeatParams: false },
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Provides an abstraction layer for performing CRUD operations on
|
|
41
|
+
* {@link https://auth0.com/docs/api/management/v2#!/Log_Streams Auth0
|
|
42
|
+
* Log Streams}.
|
|
43
|
+
*
|
|
44
|
+
* @type {external:RestClient}
|
|
45
|
+
*/
|
|
46
|
+
const auth0RestClient = new Auth0RestClient(
|
|
47
|
+
`${options.baseUrl}/log-streams/:id `,
|
|
48
|
+
clientOptions,
|
|
49
|
+
options.tokenProvider
|
|
50
|
+
);
|
|
51
|
+
this.resource = new RetryRestClient(auth0RestClient, options.retry);
|
|
29
52
|
}
|
|
30
53
|
|
|
31
54
|
/**
|
|
32
|
-
*
|
|
55
|
+
* Get all Log Streams.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
33
58
|
*
|
|
34
|
-
*
|
|
59
|
+
* management.logStreams.getAll(function (err, logStreams) {
|
|
60
|
+
* console.log(logStreams.length);
|
|
61
|
+
* });
|
|
62
|
+
* @param {Function} [cb] Callback function.
|
|
63
|
+
* @returns {Promise|undefined}
|
|
35
64
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
65
|
+
getAll(...args) {
|
|
66
|
+
return this.resource.getAll(...args);
|
|
67
|
+
}
|
|
40
68
|
|
|
41
69
|
/**
|
|
42
|
-
*
|
|
43
|
-
* {@link https://auth0.com/docs/api/management/v2#!/Log_Streams Auth0
|
|
44
|
-
* Log Streams}.
|
|
70
|
+
* Get an Auth0 Log Streams.
|
|
45
71
|
*
|
|
46
|
-
* @
|
|
72
|
+
* @example
|
|
73
|
+
* management.logStreams.get({ id: LOG_STREAM_ID }, function (err, logStream) {
|
|
74
|
+
* if (err) {
|
|
75
|
+
* // Handle error.
|
|
76
|
+
* }
|
|
77
|
+
*
|
|
78
|
+
* console.log(logStream);
|
|
79
|
+
* });
|
|
80
|
+
* @param {object} params Log Stream parameters.
|
|
81
|
+
* @param {string} params.id Log Stream ID.
|
|
82
|
+
* @param {Function} [cb] Callback function.
|
|
83
|
+
* @returns {Promise|undefined}
|
|
47
84
|
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
options.tokenProvider
|
|
52
|
-
);
|
|
53
|
-
this.resource = new RetryRestClient(auth0RestClient, options.retry);
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Get all Log Streams.
|
|
58
|
-
*
|
|
59
|
-
* @method getAll
|
|
60
|
-
* @memberOf module:management.LogStreamsManager.prototype
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
*
|
|
64
|
-
* management.logStreams.getAll(function (err, logStreams) {
|
|
65
|
-
* console.log(logStreams.length);
|
|
66
|
-
* });
|
|
67
|
-
*
|
|
68
|
-
* @param {Function} [cb] Callback function.
|
|
69
|
-
*
|
|
70
|
-
* @return {Promise|undefined}
|
|
71
|
-
*/
|
|
72
|
-
utils.wrapPropertyMethod(LogStreamsManager, 'getAll', 'resource.getAll');
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Get an Auth0 Log Streams.
|
|
76
|
-
*
|
|
77
|
-
* @method get
|
|
78
|
-
* @memberOf module:management.LogStreamsManager.prototype
|
|
79
|
-
*
|
|
80
|
-
* @example
|
|
81
|
-
* management.logStreams.get({ id: LOG_STREAM_ID }, function (err, logStream) {
|
|
82
|
-
* if (err) {
|
|
83
|
-
* // Handle error.
|
|
84
|
-
* }
|
|
85
|
-
*
|
|
86
|
-
* console.log(logStream);
|
|
87
|
-
* });
|
|
88
|
-
*
|
|
89
|
-
* @param {Object} params Log Stream parameters.
|
|
90
|
-
* @param {String} params.id Log Stream ID.
|
|
91
|
-
* @param {Function} [cb] Callback function.
|
|
92
|
-
*
|
|
93
|
-
* @return {Promise|undefined}
|
|
94
|
-
*/
|
|
95
|
-
utils.wrapPropertyMethod(LogStreamsManager, 'get', 'resource.get');
|
|
85
|
+
get(...args) {
|
|
86
|
+
return this.resource.get(...args);
|
|
87
|
+
}
|
|
96
88
|
|
|
97
|
-
/**
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
* @return {Promise|undefined}
|
|
116
|
-
*/
|
|
117
|
-
utils.wrapPropertyMethod(LogStreamsManager, 'create', 'resource.create');
|
|
89
|
+
/**
|
|
90
|
+
* Create an Auth0 Log Stream.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* management.logStreams.create(data, function (err, log) {
|
|
94
|
+
* if (err) {
|
|
95
|
+
* // Handle error.
|
|
96
|
+
* }
|
|
97
|
+
*
|
|
98
|
+
* console.log(log);
|
|
99
|
+
* });
|
|
100
|
+
* @param {object} data Log Stream data.
|
|
101
|
+
* @param {Function} [cb] Callback function.
|
|
102
|
+
* @returns {Promise|undefined}
|
|
103
|
+
*/
|
|
104
|
+
create(...args) {
|
|
105
|
+
return this.resource.create(...args);
|
|
106
|
+
}
|
|
118
107
|
|
|
119
|
-
/**
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
* @return {Promise|undefined}
|
|
153
|
-
*/
|
|
154
|
-
utils.wrapPropertyMethod(LogStreamsManager, 'update', 'resource.patch');
|
|
108
|
+
/**
|
|
109
|
+
* Update an Auth0 Log Streams.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* var data = { name: 'New name' };
|
|
113
|
+
* var params = { id: LOG_STREAM_ID };
|
|
114
|
+
*
|
|
115
|
+
* // Using auth0 instance.
|
|
116
|
+
* management.updateLogStream(params, data, function (err, logStream) {
|
|
117
|
+
* if (err) {
|
|
118
|
+
* // Handle error.
|
|
119
|
+
* }
|
|
120
|
+
*
|
|
121
|
+
* console.log(logStream.name); // 'New name'
|
|
122
|
+
* });
|
|
123
|
+
*
|
|
124
|
+
* // Using the logStreams manager directly.
|
|
125
|
+
* management.logStreams.update(params, data, function (err, logStream) {
|
|
126
|
+
* if (err) {
|
|
127
|
+
* // Handle error.
|
|
128
|
+
* }
|
|
129
|
+
*
|
|
130
|
+
* console.log(logStream.name);
|
|
131
|
+
* });
|
|
132
|
+
* @param {object} params Log Stream parameters.
|
|
133
|
+
* @param {string} params.id Log Stream ID.
|
|
134
|
+
* @param {object} data Updated Log Stream data.
|
|
135
|
+
* @param {Function} [cb] Callback function.
|
|
136
|
+
* @returns {Promise|undefined}
|
|
137
|
+
*/
|
|
138
|
+
update(...args) {
|
|
139
|
+
return this.resource.patch(...args);
|
|
140
|
+
}
|
|
155
141
|
|
|
156
|
-
/**
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
*/
|
|
177
|
-
utils.wrapPropertyMethod(LogStreamsManager, 'delete', 'resource.delete');
|
|
142
|
+
/**
|
|
143
|
+
* Delete an Auth0 Log Streams.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* management.logStreams.delete({ id: LOG_STREAM_ID }, function (err, log) {
|
|
147
|
+
* if (err) {
|
|
148
|
+
* // Handle error.
|
|
149
|
+
* }
|
|
150
|
+
*
|
|
151
|
+
* console.log(log);
|
|
152
|
+
* });
|
|
153
|
+
* @param {object} params Log Stream parameters.
|
|
154
|
+
* @param {string} params.id Log Stream ID.
|
|
155
|
+
* @param {Function} [cb] Callback function.
|
|
156
|
+
* @returns {Promise|undefined}
|
|
157
|
+
*/
|
|
158
|
+
delete(...args) {
|
|
159
|
+
return this.resource.delete(...args);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
178
162
|
|
|
179
163
|
module.exports = LogStreamsManager;
|
|
@@ -1,116 +1,109 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var RetryRestClient = require('../RetryRestClient');
|
|
1
|
+
const { ArgumentError } = require('rest-facade');
|
|
2
|
+
const Auth0RestClient = require('../Auth0RestClient');
|
|
3
|
+
const RetryRestClient = require('../RetryRestClient');
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
|
-
* @class LogsManager
|
|
8
6
|
* Represents the relationship between Auth0 and an Identity provider.
|
|
9
|
-
* @constructor
|
|
10
|
-
* @memberOf module:management
|
|
11
|
-
*
|
|
12
|
-
* @param {Object} options The client options.
|
|
13
|
-
* @param {String} options.baseUrl The URL of the API.
|
|
14
|
-
* @param {Object} [options.headers] Headers to be included in all requests.
|
|
15
|
-
* @param {Object} [options.retry] Retry Policy Config
|
|
16
7
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
class LogsManager {
|
|
9
|
+
/**
|
|
10
|
+
* @param {object} options The client options.
|
|
11
|
+
* @param {string} options.baseUrl The URL of the API.
|
|
12
|
+
* @param {object} [options.headers] Headers to be included in all requests.
|
|
13
|
+
* @param {object} [options.retry] Retry Policy Config
|
|
14
|
+
*/
|
|
15
|
+
constructor(options) {
|
|
16
|
+
if (options === null || typeof options !== 'object') {
|
|
17
|
+
throw new ArgumentError('Must provide client options');
|
|
18
|
+
}
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
if (options.baseUrl === null || options.baseUrl === undefined) {
|
|
21
|
+
throw new ArgumentError('Must provide a base URL for the API');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if ('string' !== typeof options.baseUrl || options.baseUrl.length === 0) {
|
|
25
|
+
throw new ArgumentError('The provided base URL is invalid');
|
|
26
|
+
}
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Options object for the Rest Client instance.
|
|
30
|
+
*
|
|
31
|
+
* @type {object}
|
|
32
|
+
*/
|
|
33
|
+
const clientOptions = {
|
|
34
|
+
headers: options.headers,
|
|
35
|
+
query: { repeatParams: false },
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Provides an abstraction layer for performing CRUD operations on
|
|
40
|
+
* {@link https://auth0.com/docs/api/v2#!/LogsManagers Auth0
|
|
41
|
+
* Logs}.
|
|
42
|
+
*
|
|
43
|
+
* @type {external:RestClient}
|
|
44
|
+
*/
|
|
45
|
+
const auth0RestClient = new Auth0RestClient(
|
|
46
|
+
`${options.baseUrl}/logs/:id`,
|
|
47
|
+
clientOptions,
|
|
48
|
+
options.tokenProvider
|
|
49
|
+
);
|
|
50
|
+
this.resource = new RetryRestClient(auth0RestClient, options.retry);
|
|
28
51
|
}
|
|
29
52
|
|
|
30
53
|
/**
|
|
31
|
-
*
|
|
54
|
+
* Get all logs.
|
|
55
|
+
*
|
|
56
|
+
* @example <caption>
|
|
57
|
+
* This method takes an optional object as first argument that may be used to
|
|
58
|
+
* specify pagination settings and the search query. If pagination options are
|
|
59
|
+
* not present, the first page of a limited number of results will be returned.
|
|
60
|
+
* </caption>
|
|
32
61
|
*
|
|
33
|
-
*
|
|
62
|
+
* // Pagination settings.
|
|
63
|
+
* var params = {
|
|
64
|
+
* per_page: 10,
|
|
65
|
+
* page: 2
|
|
66
|
+
* };
|
|
67
|
+
*
|
|
68
|
+
* management.logs.getAll(params, function (err, logs) {
|
|
69
|
+
* console.log(logs.length);
|
|
70
|
+
* });
|
|
71
|
+
* @param {object} [params] Logs params.
|
|
72
|
+
* @param {string} [params.q] Search Criteria using Query String Syntax
|
|
73
|
+
* @param {number} [params.page] Page number. Zero based
|
|
74
|
+
* @param {number} [params.per_page] The amount of entries per page
|
|
75
|
+
* @param {string} [params.sort] The field to use for sorting.
|
|
76
|
+
* @param {string} [params.fields] A comma separated list of fields to include or exclude
|
|
77
|
+
* @param {boolean} [params.include_fields] true if the fields specified are to be included in the result, false otherwise.
|
|
78
|
+
* @param {boolean} [params.include_totals] true if a query summary must be included in the result, false otherwise. Default false
|
|
79
|
+
* @param {string} [params.from] For checkpoint pagination, log event Id from which to start selection from.
|
|
80
|
+
* @param {number} [params.take] When using the `from` parameter, the number of entries to retrieve. Default 50, max 100.
|
|
81
|
+
* @param {Function} [cb] Callback function.
|
|
82
|
+
* @returns {Promise|undefined}
|
|
34
83
|
*/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
84
|
+
getAll(...args) {
|
|
85
|
+
return this.resource.getAll(...args);
|
|
86
|
+
}
|
|
39
87
|
|
|
40
88
|
/**
|
|
41
|
-
*
|
|
42
|
-
* {@link https://auth0.com/docs/api/v2#!/LogsManagers Auth0
|
|
43
|
-
* Logs}.
|
|
89
|
+
* Get an Auth0 log.
|
|
44
90
|
*
|
|
45
|
-
* @
|
|
91
|
+
* @example
|
|
92
|
+
* management.logs.get({ id: EVENT_ID }, function (err, log) {
|
|
93
|
+
* if (err) {
|
|
94
|
+
* // Handle error.
|
|
95
|
+
* }
|
|
96
|
+
*
|
|
97
|
+
* console.log(log);
|
|
98
|
+
* });
|
|
99
|
+
* @param {object} params Log parameters.
|
|
100
|
+
* @param {string} params.id Log ID.
|
|
101
|
+
* @param {Function} [cb] Callback function.
|
|
102
|
+
* @returns {Promise|undefined}
|
|
46
103
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
);
|
|
52
|
-
this.resource = new RetryRestClient(auth0RestClient, options.retry);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Get all logs.
|
|
57
|
-
*
|
|
58
|
-
* @method getAll
|
|
59
|
-
* @memberOf module:management.LogsManager.prototype
|
|
60
|
-
*
|
|
61
|
-
* @example <caption>
|
|
62
|
-
* This method takes an optional object as first argument that may be used to
|
|
63
|
-
* specify pagination settings and the search query. If pagination options are
|
|
64
|
-
* not present, the first page of a limited number of results will be returned.
|
|
65
|
-
* </caption>
|
|
66
|
-
*
|
|
67
|
-
* // Pagination settings.
|
|
68
|
-
* var params = {
|
|
69
|
-
* per_page: 10,
|
|
70
|
-
* page: 2
|
|
71
|
-
* };
|
|
72
|
-
*
|
|
73
|
-
* management.logs.getAll(params, function (err, logs) {
|
|
74
|
-
* console.log(logs.length);
|
|
75
|
-
* });
|
|
76
|
-
*
|
|
77
|
-
* @param {Object} [params] Logs params.
|
|
78
|
-
* @param {String} [params.q] Search Criteria using Query String Syntax
|
|
79
|
-
* @param {Number} [params.page] Page number. Zero based
|
|
80
|
-
* @param {Number} [params.per_page] The amount of entries per page
|
|
81
|
-
* @param {String} [params.sort] The field to use for sorting.
|
|
82
|
-
* @param {String} [params.fields] A comma separated list of fields to include or exclude
|
|
83
|
-
* @param {Boolean} [params.include_fields] true if the fields specified are to be included in the result, false otherwise.
|
|
84
|
-
* @param {Boolean} [params.include_totals] true if a query summary must be included in the result, false otherwise. Default false
|
|
85
|
-
* @param {String} [params.from] For checkpoint pagination, log event Id from which to start selection from.
|
|
86
|
-
* @param {Number} [params.take] When using the `from` parameter, the number of entries to retrieve. Default 50, max 100.
|
|
87
|
-
* @param {Function} [cb] Callback function.
|
|
88
|
-
*
|
|
89
|
-
* @return {Promise|undefined}
|
|
90
|
-
*/
|
|
91
|
-
utils.wrapPropertyMethod(LogsManager, 'getAll', 'resource.getAll');
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Get an Auth0 log.
|
|
95
|
-
*
|
|
96
|
-
* @method get
|
|
97
|
-
* @memberOf module:management.LogsManager.prototype
|
|
98
|
-
*
|
|
99
|
-
* @example
|
|
100
|
-
* management.logs.get({ id: EVENT_ID }, function (err, log) {
|
|
101
|
-
* if (err) {
|
|
102
|
-
* // Handle error.
|
|
103
|
-
* }
|
|
104
|
-
*
|
|
105
|
-
* console.log(log);
|
|
106
|
-
* });
|
|
107
|
-
*
|
|
108
|
-
* @param {Object} params Log parameters.
|
|
109
|
-
* @param {String} params.id Log ID.
|
|
110
|
-
* @param {Function} [cb] Callback function.
|
|
111
|
-
*
|
|
112
|
-
* @return {Promise|undefined}
|
|
113
|
-
*/
|
|
114
|
-
utils.wrapPropertyMethod(LogsManager, 'get', 'resource.get');
|
|
104
|
+
get(...args) {
|
|
105
|
+
return this.resource.get(...args);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
115
108
|
|
|
116
109
|
module.exports = LogsManager;
|