auth0 7.4.0 → 7.5.0-beta.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/dist/cjs/management/api/requests/requests.d.ts +61 -0
- package/dist/cjs/management/api/resources/attackProtection/client/Client.d.ts +3 -0
- package/dist/cjs/management/api/resources/attackProtection/client/Client.js +9 -4
- package/dist/cjs/management/api/resources/attackProtection/resources/captchaPolicies/client/Client.d.ts +105 -0
- package/dist/cjs/management/api/resources/attackProtection/resources/captchaPolicies/client/Client.js +388 -0
- package/dist/cjs/management/api/resources/attackProtection/resources/captchaPolicies/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/attackProtection/resources/captchaPolicies/client/index.js +2 -0
- package/dist/cjs/management/api/resources/attackProtection/resources/captchaPolicies/exports.d.ts +2 -0
- package/dist/cjs/management/api/resources/attackProtection/resources/captchaPolicies/exports.js +21 -0
- package/dist/cjs/management/api/resources/attackProtection/resources/captchaPolicies/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/attackProtection/resources/captchaPolicies/index.js +17 -0
- package/dist/cjs/management/api/resources/attackProtection/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/attackProtection/resources/index.js +2 -1
- package/dist/cjs/management/api/resources/clientGrants/client/Client.d.ts +27 -0
- package/dist/cjs/management/api/resources/clientGrants/client/Client.js +101 -0
- package/dist/cjs/management/api/types/types.d.ts +1063 -467
- package/dist/cjs/management/api/types/types.js +36 -171
- package/dist/cjs/management/version.d.ts +1 -1
- package/dist/cjs/management/version.js +1 -1
- package/dist/esm/management/api/requests/requests.d.mts +61 -0
- package/dist/esm/management/api/resources/attackProtection/client/Client.d.mts +3 -0
- package/dist/esm/management/api/resources/attackProtection/client/Client.mjs +5 -0
- package/dist/esm/management/api/resources/attackProtection/resources/captchaPolicies/client/Client.d.mts +105 -0
- package/dist/esm/management/api/resources/attackProtection/resources/captchaPolicies/client/Client.mjs +351 -0
- package/dist/esm/management/api/resources/attackProtection/resources/captchaPolicies/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/attackProtection/resources/captchaPolicies/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/attackProtection/resources/captchaPolicies/exports.d.mts +2 -0
- package/dist/esm/management/api/resources/attackProtection/resources/captchaPolicies/exports.mjs +3 -0
- package/dist/esm/management/api/resources/attackProtection/resources/captchaPolicies/index.d.mts +1 -0
- package/dist/esm/management/api/resources/attackProtection/resources/captchaPolicies/index.mjs +1 -0
- package/dist/esm/management/api/resources/attackProtection/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/attackProtection/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/clientGrants/client/Client.d.mts +27 -0
- package/dist/esm/management/api/resources/clientGrants/client/Client.mjs +101 -0
- package/dist/esm/management/api/types/types.d.mts +1063 -467
- package/dist/esm/management/api/types/types.mjs +15 -150
- package/dist/esm/management/version.d.mts +1 -1
- package/dist/esm/management/version.mjs +1 -1
- package/package.json +12 -1
- package/reference.md +414 -0
|
@@ -56,6 +56,33 @@ export declare class ClientGrantsClient {
|
|
|
56
56
|
*/
|
|
57
57
|
create(request: Management.CreateClientGrantRequestContent, requestOptions?: ClientGrantsClient.RequestOptions): core.HttpResponsePromise<Management.CreateClientGrantResponseContent>;
|
|
58
58
|
private __create;
|
|
59
|
+
/**
|
|
60
|
+
* Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries.
|
|
61
|
+
* Results may not reflect recent updates immediately.
|
|
62
|
+
*
|
|
63
|
+
* @param {Management.SearchClientGrantsRequestParameters} request
|
|
64
|
+
* @param {ClientGrantsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link Management.BadRequestError}
|
|
67
|
+
* @throws {@link Management.UnauthorizedError}
|
|
68
|
+
* @throws {@link Management.ForbiddenError}
|
|
69
|
+
* @throws {@link Management.NotFoundError}
|
|
70
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
71
|
+
* @throws {@link Management.InternalServerError}
|
|
72
|
+
* @throws {@link Management.GatewayTimeoutError}
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* await client.clientGrants.search({
|
|
76
|
+
* q: "q",
|
|
77
|
+
* parser: "scim",
|
|
78
|
+
* fields: "fields",
|
|
79
|
+
* include_fields: true,
|
|
80
|
+
* take: 1,
|
|
81
|
+
* from: "from",
|
|
82
|
+
* sort: "audience"
|
|
83
|
+
* })
|
|
84
|
+
*/
|
|
85
|
+
search(request?: Management.SearchClientGrantsRequestParameters, requestOptions?: ClientGrantsClient.RequestOptions): Promise<core.Page<Management.ClientGrantResponseContent, Management.SearchClientGrantsResponseContent>>;
|
|
59
86
|
/**
|
|
60
87
|
* Retrieve a single [client grant](https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants), including the
|
|
61
88
|
* scopes associated with the application/API pair.
|
|
@@ -185,6 +185,107 @@ export class ClientGrantsClient {
|
|
|
185
185
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/client-grants");
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
|
+
/**
|
|
189
|
+
* Search client grants using SCIM or Lucene filter syntax with low-latency, eventually consistent results. Use the parser parameter to specify "scim" or "lucene" syntax (default: "lucene"). This endpoint provides an alternative to the standard GET /client-grants endpoint with better performance for complex queries.
|
|
190
|
+
* Results may not reflect recent updates immediately.
|
|
191
|
+
*
|
|
192
|
+
* @param {Management.SearchClientGrantsRequestParameters} request
|
|
193
|
+
* @param {ClientGrantsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
194
|
+
*
|
|
195
|
+
* @throws {@link Management.BadRequestError}
|
|
196
|
+
* @throws {@link Management.UnauthorizedError}
|
|
197
|
+
* @throws {@link Management.ForbiddenError}
|
|
198
|
+
* @throws {@link Management.NotFoundError}
|
|
199
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
200
|
+
* @throws {@link Management.InternalServerError}
|
|
201
|
+
* @throws {@link Management.GatewayTimeoutError}
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* await client.clientGrants.search({
|
|
205
|
+
* q: "q",
|
|
206
|
+
* parser: "scim",
|
|
207
|
+
* fields: "fields",
|
|
208
|
+
* include_fields: true,
|
|
209
|
+
* take: 1,
|
|
210
|
+
* from: "from",
|
|
211
|
+
* sort: "audience"
|
|
212
|
+
* })
|
|
213
|
+
*/
|
|
214
|
+
search() {
|
|
215
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
216
|
+
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
217
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
218
|
+
const { q, parser, fields, include_fields: includeFields, take = 50, from: from_, sort } = request;
|
|
219
|
+
const _queryParams = {
|
|
220
|
+
q,
|
|
221
|
+
parser: parser !== undefined ? parser : undefined,
|
|
222
|
+
fields,
|
|
223
|
+
include_fields: includeFields,
|
|
224
|
+
take,
|
|
225
|
+
from: from_,
|
|
226
|
+
sort: sort !== undefined ? sort : undefined,
|
|
227
|
+
};
|
|
228
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
229
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
230
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
231
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "client-grants/search"),
|
|
232
|
+
method: "GET",
|
|
233
|
+
headers: _headers,
|
|
234
|
+
queryString: core.url
|
|
235
|
+
.queryBuilder()
|
|
236
|
+
.addMany(_queryParams)
|
|
237
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
238
|
+
.build(),
|
|
239
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
240
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
241
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
242
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
243
|
+
logging: this._options.logging,
|
|
244
|
+
});
|
|
245
|
+
if (_response.ok) {
|
|
246
|
+
return {
|
|
247
|
+
data: _response.body,
|
|
248
|
+
rawResponse: _response.rawResponse,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
if (_response.error.reason === "status-code") {
|
|
252
|
+
switch (_response.error.statusCode) {
|
|
253
|
+
case 400:
|
|
254
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
255
|
+
case 401:
|
|
256
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
257
|
+
case 403:
|
|
258
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
259
|
+
case 404:
|
|
260
|
+
throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
|
|
261
|
+
case 429:
|
|
262
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
263
|
+
case 500:
|
|
264
|
+
throw new Management.InternalServerError(_response.error.body, _response.rawResponse);
|
|
265
|
+
case 504:
|
|
266
|
+
throw new Management.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
267
|
+
default:
|
|
268
|
+
throw new errors.ManagementError({
|
|
269
|
+
statusCode: _response.error.statusCode,
|
|
270
|
+
body: _response.error.body,
|
|
271
|
+
rawResponse: _response.rawResponse,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/client-grants/search");
|
|
276
|
+
}));
|
|
277
|
+
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
278
|
+
return new core.Page({
|
|
279
|
+
response: dataWithRawResponse.data,
|
|
280
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
281
|
+
hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.next) != null && !(typeof (response === null || response === void 0 ? void 0 : response.next) === "string" && (response === null || response === void 0 ? void 0 : response.next) === ""),
|
|
282
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.client_grants) !== null && _a !== void 0 ? _a : []; },
|
|
283
|
+
loadPage: (response) => {
|
|
284
|
+
return list(core.setObjectProperty(request, "from", response === null || response === void 0 ? void 0 : response.next));
|
|
285
|
+
},
|
|
286
|
+
});
|
|
287
|
+
});
|
|
288
|
+
}
|
|
188
289
|
/**
|
|
189
290
|
* Retrieve a single [client grant](https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants), including the
|
|
190
291
|
* scopes associated with the application/API pair.
|