Skip to content

Commit 786def8

Browse files
SDK regeneration
1 parent 6f8c26a commit 786def8

File tree

886 files changed

+73863
-11342
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

886 files changed

+73863
-11342
lines changed

reference.md

Lines changed: 969 additions & 226 deletions
Large diffs are not rendered by default.

src/main/java/com/auth0/client/mgmt/ActionsClient.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package com.auth0.client.mgmt;
55

66
import com.auth0.client.mgmt.actions.ExecutionsClient;
7+
import com.auth0.client.mgmt.actions.ModulesClient;
78
import com.auth0.client.mgmt.actions.TriggersClient;
89
import com.auth0.client.mgmt.actions.VersionsClient;
910
import com.auth0.client.mgmt.core.ClientOptions;
@@ -32,13 +33,16 @@ public class ActionsClient {
3233

3334
protected final Supplier<ExecutionsClient> executionsClient;
3435

36+
protected final Supplier<ModulesClient> modulesClient;
37+
3538
protected final Supplier<TriggersClient> triggersClient;
3639

3740
public ActionsClient(ClientOptions clientOptions) {
3841
this.clientOptions = clientOptions;
3942
this.rawClient = new RawActionsClient(clientOptions);
4043
this.versionsClient = Suppliers.memoize(() -> new VersionsClient(clientOptions));
4144
this.executionsClient = Suppliers.memoize(() -> new ExecutionsClient(clientOptions));
45+
this.modulesClient = Suppliers.memoize(() -> new ModulesClient(clientOptions));
4246
this.triggersClient = Suppliers.memoize(() -> new TriggersClient(clientOptions));
4347
}
4448

@@ -177,6 +181,10 @@ public ExecutionsClient executions() {
177181
return this.executionsClient.get();
178182
}
179183

184+
public ModulesClient modules() {
185+
return this.modulesClient.get();
186+
}
187+
180188
public TriggersClient triggers() {
181189
return this.triggersClient.get();
182190
}

src/main/java/com/auth0/client/mgmt/AsyncActionsClient.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package com.auth0.client.mgmt;
55

66
import com.auth0.client.mgmt.actions.AsyncExecutionsClient;
7+
import com.auth0.client.mgmt.actions.AsyncModulesClient;
78
import com.auth0.client.mgmt.actions.AsyncTriggersClient;
89
import com.auth0.client.mgmt.actions.AsyncVersionsClient;
910
import com.auth0.client.mgmt.core.ClientOptions;
@@ -33,13 +34,16 @@ public class AsyncActionsClient {
3334

3435
protected final Supplier<AsyncExecutionsClient> executionsClient;
3536

37+
protected final Supplier<AsyncModulesClient> modulesClient;
38+
3639
protected final Supplier<AsyncTriggersClient> triggersClient;
3740

3841
public AsyncActionsClient(ClientOptions clientOptions) {
3942
this.clientOptions = clientOptions;
4043
this.rawClient = new AsyncRawActionsClient(clientOptions);
4144
this.versionsClient = Suppliers.memoize(() -> new AsyncVersionsClient(clientOptions));
4245
this.executionsClient = Suppliers.memoize(() -> new AsyncExecutionsClient(clientOptions));
46+
this.modulesClient = Suppliers.memoize(() -> new AsyncModulesClient(clientOptions));
4347
this.triggersClient = Suppliers.memoize(() -> new AsyncTriggersClient(clientOptions));
4448
}
4549

@@ -182,6 +186,10 @@ public AsyncExecutionsClient executions() {
182186
return this.executionsClient.get();
183187
}
184188

189+
public AsyncModulesClient modules() {
190+
return this.modulesClient.get();
191+
}
192+
185193
public AsyncTriggersClient triggers() {
186194
return this.triggersClient.get();
187195
}

src/main/java/com/auth0/client/mgmt/AsyncClientGrantsClient.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.auth0.client.mgmt.types.ClientGrantResponseContent;
1212
import com.auth0.client.mgmt.types.CreateClientGrantRequestContent;
1313
import com.auth0.client.mgmt.types.CreateClientGrantResponseContent;
14+
import com.auth0.client.mgmt.types.GetClientGrantResponseContent;
1415
import com.auth0.client.mgmt.types.ListClientGrantsRequestParameters;
1516
import com.auth0.client.mgmt.types.UpdateClientGrantRequestContent;
1617
import com.auth0.client.mgmt.types.UpdateClientGrantResponseContent;
@@ -75,6 +76,22 @@ public CompletableFuture<CreateClientGrantResponseContent> create(
7576
return this.rawClient.create(request, requestOptions).thenApply(response -> response.body());
7677
}
7778

79+
/**
80+
* Retrieve a single &lt;a href=&quot;https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants&quot;&gt;client grant&lt;/a&gt;, including the
81+
* scopes associated with the application/API pair.
82+
*/
83+
public CompletableFuture<GetClientGrantResponseContent> get(String id) {
84+
return this.rawClient.get(id).thenApply(response -> response.body());
85+
}
86+
87+
/**
88+
* Retrieve a single &lt;a href=&quot;https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants&quot;&gt;client grant&lt;/a&gt;, including the
89+
* scopes associated with the application/API pair.
90+
*/
91+
public CompletableFuture<GetClientGrantResponseContent> get(String id, RequestOptions requestOptions) {
92+
return this.rawClient.get(id, requestOptions).thenApply(response -> response.body());
93+
}
94+
7895
/**
7996
* Delete the &lt;a href=&quot;https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow&quot;&gt;Client Credential Flow&lt;/a&gt; from your machine-to-machine application.
8097
*/

src/main/java/com/auth0/client/mgmt/AsyncConnectionsClient.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ public class AsyncConnectionsClient {
2828

2929
private final AsyncRawConnectionsClient rawClient;
3030

31-
protected final Supplier<AsyncClientsClient> clientsClient;
32-
3331
protected final Supplier<AsyncDirectoryProvisioningClient> directoryProvisioningClient;
3432

33+
protected final Supplier<AsyncClientsClient> clientsClient;
34+
3535
protected final Supplier<AsyncKeysClient> keysClient;
3636

3737
protected final Supplier<AsyncScimConfigurationClient> scimConfigurationClient;
@@ -41,8 +41,8 @@ public class AsyncConnectionsClient {
4141
public AsyncConnectionsClient(ClientOptions clientOptions) {
4242
this.clientOptions = clientOptions;
4343
this.rawClient = new AsyncRawConnectionsClient(clientOptions);
44-
this.clientsClient = Suppliers.memoize(() -> new AsyncClientsClient(clientOptions));
4544
this.directoryProvisioningClient = Suppliers.memoize(() -> new AsyncDirectoryProvisioningClient(clientOptions));
45+
this.clientsClient = Suppliers.memoize(() -> new AsyncClientsClient(clientOptions));
4646
this.keysClient = Suppliers.memoize(() -> new AsyncKeysClient(clientOptions));
4747
this.scimConfigurationClient = Suppliers.memoize(() -> new AsyncScimConfigurationClient(clientOptions));
4848
this.usersClient = Suppliers.memoize(() -> new AsyncUsersClient(clientOptions));
@@ -117,14 +117,16 @@ public CompletableFuture<SyncPagingIterable<ConnectionForList>> list(
117117
}
118118

119119
/**
120-
* Creates a new connection according to the JSON object received in &lt;code&gt;body&lt;/code&gt;.&lt;br/&gt;
120+
* Creates a new connection according to the JSON object received in &lt;code&gt;body&lt;/code&gt;.
121+
* <p>&lt;b&gt;Note:&lt;/b&gt; If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.</p>
121122
*/
122123
public CompletableFuture<CreateConnectionResponseContent> create(CreateConnectionRequestContent request) {
123124
return this.rawClient.create(request).thenApply(response -> response.body());
124125
}
125126

126127
/**
127-
* Creates a new connection according to the JSON object received in &lt;code&gt;body&lt;/code&gt;.&lt;br/&gt;
128+
* Creates a new connection according to the JSON object received in &lt;code&gt;body&lt;/code&gt;.
129+
* <p>&lt;b&gt;Note:&lt;/b&gt; If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.</p>
128130
*/
129131
public CompletableFuture<CreateConnectionResponseContent> create(
130132
CreateConnectionRequestContent request, RequestOptions requestOptions) {
@@ -155,13 +157,15 @@ public CompletableFuture<GetConnectionResponseContent> get(
155157

156158
/**
157159
* Removes a specific &lt;a href=&quot;https://auth0.com/docs/authenticate/identity-providers&quot;&gt;connection&lt;/a&gt; from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate.
160+
* <p>&lt;b&gt;Note:&lt;/b&gt; If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent &lt;a href=&quot;https://auth0.com/docs/api/management/v2/connections/post-connections&quot;&gt;create connection&lt;/a&gt; requests, if they use an identical connection name.</p>
158161
*/
159162
public CompletableFuture<Void> delete(String id) {
160163
return this.rawClient.delete(id).thenApply(response -> response.body());
161164
}
162165

163166
/**
164167
* Removes a specific &lt;a href=&quot;https://auth0.com/docs/authenticate/identity-providers&quot;&gt;connection&lt;/a&gt; from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate.
168+
* <p>&lt;b&gt;Note:&lt;/b&gt; If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent &lt;a href=&quot;https://auth0.com/docs/api/management/v2/connections/post-connections&quot;&gt;create connection&lt;/a&gt; requests, if they use an identical connection name.</p>
165169
*/
166170
public CompletableFuture<Void> delete(String id, RequestOptions requestOptions) {
167171
return this.rawClient.delete(id, requestOptions).thenApply(response -> response.body());
@@ -207,14 +211,14 @@ public CompletableFuture<Void> checkStatus(String id, RequestOptions requestOpti
207211
return this.rawClient.checkStatus(id, requestOptions).thenApply(response -> response.body());
208212
}
209213

210-
public AsyncClientsClient clients() {
211-
return this.clientsClient.get();
212-
}
213-
214214
public AsyncDirectoryProvisioningClient directoryProvisioning() {
215215
return this.directoryProvisioningClient.get();
216216
}
217217

218+
public AsyncClientsClient clients() {
219+
return this.clientsClient.get();
220+
}
221+
218222
public AsyncKeysClient keys() {
219223
return this.keysClient.get();
220224
}

src/main/java/com/auth0/client/mgmt/AsyncRawClientGrantsClient.java

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.auth0.client.mgmt.types.ClientGrantResponseContent;
2222
import com.auth0.client.mgmt.types.CreateClientGrantRequestContent;
2323
import com.auth0.client.mgmt.types.CreateClientGrantResponseContent;
24+
import com.auth0.client.mgmt.types.GetClientGrantResponseContent;
2425
import com.auth0.client.mgmt.types.ListClientGrantPaginatedResponseContent;
2526
import com.auth0.client.mgmt.types.ListClientGrantsRequestParameters;
2627
import com.auth0.client.mgmt.types.UpdateClientGrantRequestContent;
@@ -278,6 +279,91 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
278279
return future;
279280
}
280281

282+
/**
283+
* Retrieve a single &lt;a href=&quot;https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants&quot;&gt;client grant&lt;/a&gt;, including the
284+
* scopes associated with the application/API pair.
285+
*/
286+
public CompletableFuture<ManagementApiHttpResponse<GetClientGrantResponseContent>> get(String id) {
287+
return get(id, null);
288+
}
289+
290+
/**
291+
* Retrieve a single &lt;a href=&quot;https://auth0.com/docs/get-started/applications/application-access-to-apis-client-grants&quot;&gt;client grant&lt;/a&gt;, including the
292+
* scopes associated with the application/API pair.
293+
*/
294+
public CompletableFuture<ManagementApiHttpResponse<GetClientGrantResponseContent>> get(
295+
String id, RequestOptions requestOptions) {
296+
HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
297+
.newBuilder()
298+
.addPathSegments("client-grants")
299+
.addPathSegment(id)
300+
.build();
301+
Request okhttpRequest = new Request.Builder()
302+
.url(httpUrl)
303+
.method("GET", null)
304+
.headers(Headers.of(clientOptions.headers(requestOptions)))
305+
.addHeader("Accept", "application/json")
306+
.build();
307+
OkHttpClient client = clientOptions.httpClient();
308+
if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
309+
client = clientOptions.httpClientWithTimeout(requestOptions);
310+
}
311+
CompletableFuture<ManagementApiHttpResponse<GetClientGrantResponseContent>> future = new CompletableFuture<>();
312+
client.newCall(okhttpRequest).enqueue(new Callback() {
313+
@Override
314+
public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
315+
try (ResponseBody responseBody = response.body()) {
316+
String responseBodyString = responseBody != null ? responseBody.string() : "{}";
317+
if (response.isSuccessful()) {
318+
future.complete(new ManagementApiHttpResponse<>(
319+
ObjectMappers.JSON_MAPPER.readValue(
320+
responseBodyString, GetClientGrantResponseContent.class),
321+
response));
322+
return;
323+
}
324+
try {
325+
switch (response.code()) {
326+
case 401:
327+
future.completeExceptionally(new UnauthorizedError(
328+
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
329+
response));
330+
return;
331+
case 403:
332+
future.completeExceptionally(new ForbiddenError(
333+
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
334+
response));
335+
return;
336+
case 404:
337+
future.completeExceptionally(new NotFoundError(
338+
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
339+
response));
340+
return;
341+
case 429:
342+
future.completeExceptionally(new TooManyRequestsError(
343+
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
344+
response));
345+
return;
346+
}
347+
} catch (JsonProcessingException ignored) {
348+
// unable to map error response, throwing generic error
349+
}
350+
Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
351+
future.completeExceptionally(new ManagementApiException(
352+
"Error with status code " + response.code(), response.code(), errorBody, response));
353+
return;
354+
} catch (IOException e) {
355+
future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
356+
}
357+
}
358+
359+
@Override
360+
public void onFailure(@NotNull Call call, @NotNull IOException e) {
361+
future.completeExceptionally(new ManagementException("Network error executing HTTP request", e));
362+
}
363+
});
364+
return future;
365+
}
366+
281367
/**
282368
* Delete the &lt;a href=&quot;https://www.auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow&quot;&gt;Client Credential Flow&lt;/a&gt; from your machine-to-machine application.
283369
*/

src/main/java/com/auth0/client/mgmt/AsyncRawConnectionsClient.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,17 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
221221
}
222222

223223
/**
224-
* Creates a new connection according to the JSON object received in &lt;code&gt;body&lt;/code&gt;.&lt;br/&gt;
224+
* Creates a new connection according to the JSON object received in &lt;code&gt;body&lt;/code&gt;.
225+
* <p>&lt;b&gt;Note:&lt;/b&gt; If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.</p>
225226
*/
226227
public CompletableFuture<ManagementApiHttpResponse<CreateConnectionResponseContent>> create(
227228
CreateConnectionRequestContent request) {
228229
return create(request, null);
229230
}
230231

231232
/**
232-
* Creates a new connection according to the JSON object received in &lt;code&gt;body&lt;/code&gt;.&lt;br/&gt;
233+
* Creates a new connection according to the JSON object received in &lt;code&gt;body&lt;/code&gt;.
234+
* <p>&lt;b&gt;Note:&lt;/b&gt; If a connection with the same name was recently deleted and had a large number of associated users, the deletion may still be processing. Creating a new connection with that name before the deletion completes may fail or produce unexpected results.</p>
233235
*/
234236
public CompletableFuture<ManagementApiHttpResponse<CreateConnectionResponseContent>> create(
235237
CreateConnectionRequestContent request, RequestOptions requestOptions) {
@@ -422,13 +424,15 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
422424

423425
/**
424426
* Removes a specific &lt;a href=&quot;https://auth0.com/docs/authenticate/identity-providers&quot;&gt;connection&lt;/a&gt; from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate.
427+
* <p>&lt;b&gt;Note:&lt;/b&gt; If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent &lt;a href=&quot;https://auth0.com/docs/api/management/v2/connections/post-connections&quot;&gt;create connection&lt;/a&gt; requests, if they use an identical connection name.</p>
425428
*/
426429
public CompletableFuture<ManagementApiHttpResponse<Void>> delete(String id) {
427430
return delete(id, null);
428431
}
429432

430433
/**
431434
* Removes a specific &lt;a href=&quot;https://auth0.com/docs/authenticate/identity-providers&quot;&gt;connection&lt;/a&gt; from your tenant. This action cannot be undone. Once removed, users can no longer use this connection to authenticate.
435+
* <p>&lt;b&gt;Note:&lt;/b&gt; If your connection has a large amount of users associated with it, please be aware that this operation can be long running after the response is returned and may impact concurrent &lt;a href=&quot;https://auth0.com/docs/api/management/v2/connections/post-connections&quot;&gt;create connection&lt;/a&gt; requests, if they use an identical connection name.</p>
432436
*/
433437
public CompletableFuture<ManagementApiHttpResponse<Void>> delete(String id, RequestOptions requestOptions) {
434438
HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())

src/main/java/com/auth0/client/mgmt/AsyncRawRolesClient.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import com.auth0.client.mgmt.core.RequestOptions;
1414
import com.auth0.client.mgmt.core.SyncPagingIterable;
1515
import com.auth0.client.mgmt.errors.BadRequestError;
16+
import com.auth0.client.mgmt.errors.ConflictError;
1617
import com.auth0.client.mgmt.errors.ForbiddenError;
1718
import com.auth0.client.mgmt.errors.NotFoundError;
1819
import com.auth0.client.mgmt.errors.TooManyRequestsError;
@@ -234,6 +235,11 @@ public void onResponse(@NotNull Call call, @NotNull Response response) throws IO
234235
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
235236
response));
236237
return;
238+
case 409:
239+
future.completeExceptionally(new ConflictError(
240+
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),
241+
response));
242+
return;
237243
case 429:
238244
future.completeExceptionally(new TooManyRequestsError(
239245
ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Object.class),

0 commit comments

Comments
 (0)