From 2df24a4d9bfe4d8bddc1fd0e65978997e24f221c Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 25 Jun 2024 00:08:20 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.315.2 --- .speakeasy/gen.lock | 10 +-- .speakeasy/gen.yaml | 6 +- .speakeasy/workflow.lock | 12 ++- README.md | 74 ++++++------------- RELEASES.md | 12 ++- USAGE.md | 23 ++---- build.gradle | 4 +- docs/sdks/actors/README.md | 2 + docs/sdks/allowlist/README.md | 3 + docs/sdks/blocklist/README.md | 3 + docs/sdks/clients/README.md | 24 ++---- docs/sdks/domains/README.md | 4 + docs/sdks/emailaddresses/README.md | 4 + docs/sdks/instance/README.md | 6 ++ docs/sdks/invitations/README.md | 24 ++---- docs/sdks/jwks/README.md | 1 + docs/sdks/jwttemplates/README.md | 5 ++ docs/sdks/miscellaneous/README.md | 1 + docs/sdks/oauthapplications/README.md | 27 +++---- docs/sdks/organizationinvitations/README.md | 48 ++++-------- docs/sdks/organizationmemberships/README.md | 26 +++---- docs/sdks/organizations/README.md | 8 ++ docs/sdks/phonenumbers/README.md | 4 + docs/sdks/proxy/README.md | 1 + docs/sdks/redirecturls/README.md | 4 + docs/sdks/samlconnections/README.md | 26 +++---- docs/sdks/sessions/README.md | 5 ++ docs/sdks/signintokens/README.md | 2 + docs/sdks/signups/README.md | 1 + docs/sdks/templates/README.md | 6 ++ docs/sdks/testingtokens/README.md | 1 + docs/sdks/users/README.md | 39 ++++++---- docs/sdks/webhooks/README.md | 3 + .../clerk/backend_api/SDKConfiguration.java | 6 +- .../clerk/backend_api/utils/HTTPClient.java | 16 ++++ .../com/clerk/backend_api/utils/Hook.java | 6 ++ .../com/clerk/backend_api/utils/Hooks.java | 2 +- 37 files changed, 239 insertions(+), 210 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 13ece41..14e65cd 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,17 +3,17 @@ id: 1d22a5a4-8bac-42e3-b164-121fcacf66c9 management: docChecksum: 93fd7098475aa331fae95503f8934b72 docVersion: v1 - speakeasyVersion: 1.308.1 - generationVersion: 2.342.6 - releaseVersion: 0.0.7 - configChecksum: 9b28dbcdf23f69543c2d231d6602b4ad + speakeasyVersion: 1.315.2 + generationVersion: 2.352.0 + releaseVersion: 0.1.0 + configChecksum: 6e451ccabf6cefd51ca27e6cb6d7a3f0 repoURL: https://github.com/clerk/clerk-sdk-java.git published: true features: java: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.1 - core: 3.23.2 + core: 3.25.1 deprecations: 2.81.1 examples: 2.81.3 flattening: 2.81.1 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 5069cca..e8b1da7 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true java: - version: 0.0.7 + version: 0.1.0 additionalDependencies: [] additionalPlugins: [] artifactID: backend-api @@ -32,6 +32,10 @@ java: shared: models/components webhooks: models/webhooks inputModelSuffix: input + license: + name: The MIT License (MIT) + shortName: MIT + url: https://mit-license.org/ maxMethodParams: 4 outputModelSuffix: output projectName: api diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index edf2d3a..c479c81 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,13 +1,19 @@ -speakeasyVersion: 1.308.1 +speakeasyVersion: 1.315.2 sources: clerk-java-sdk: sourceNamespace: clerk-java-sdk - sourceRevisionDigest: sha256:5e10a06ed81708645c450c8bbac2ac9a99d115ea4929af0d91ecb2f6419d1500 + sourceRevisionDigest: sha256:66ee544a860154e51609265d4d41c3d23487fdc849c6dc7b8b8b2d670680c37c sourceBlobDigest: sha256:be6a2adf86086a55368c73204dfb84b5ca2f9d8514f771aff33857624a212e56 tags: - latest - main targets: + clerk-java: + source: clerk-java-sdk + sourceNamespace: clerk-java-sdk + sourceRevisionDigest: sha256:66ee544a860154e51609265d4d41c3d23487fdc849c6dc7b8b8b2d670680c37c + sourceBlobDigest: sha256:be6a2adf86086a55368c73204dfb84b5ca2f9d8514f771aff33857624a212e56 + outLocation: /github/workspace/repo my-first-target: source: clerk-java-sdk sourceNamespace: clerk-java-sdk @@ -24,7 +30,7 @@ workflow: registry: location: registry.speakeasyapi.dev/clerk/clerk/clerk-java-sdk targets: - my-first-target: + clerk-java: target: java source: clerk-java-sdk publish: diff --git a/README.md b/README.md index c1e8db6..75753c9 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.clerk:backend-api:0.0.7' +implementation 'com.clerk:backend-api:0.1.0' ``` Maven: @@ -27,7 +27,7 @@ Maven: com.clerk backend-api - 0.0.7 + 0.1.0 ``` @@ -76,32 +76,22 @@ public class Application { .bearerAuth("") .build(); - GetClientListResponse res = sdk.clients().list() + sdk.clients().list() .limit(10L) .offset(0L) - .call(); + .callAsStreamUnwrapped() + .forEach(item -> { + // handle item + }); - while (true) { - if (res.clientList().isPresent()) { - // handle response - Optional nextRes = res.next(); - if (nextRes.isPresent()) { - res = nextRes.get(); - } else { - break; - } - } - } } catch (com.clerk.backend_api.models.errors.ClerkErrors e) { // handle exception throw e; - } catch (com.clerk.backend_api.models.errors.SDKError e) { - // handle exception - throw e; } catch (Exception e) { // handle exception throw e; } + } } ``` @@ -158,6 +148,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -388,32 +379,22 @@ public class Application { .bearerAuth("") .build(); - GetClientListResponse res = sdk.clients().list() + sdk.clients().list() .limit(10L) .offset(0L) - .call(); + .callAsStreamUnwrapped() + .forEach(item -> { + // handle item + }); - while (true) { - if (res.clientList().isPresent()) { - // handle response - Optional nextRes = res.next(); - if (nextRes.isPresent()) { - res = nextRes.get(); - } else { - break; - } - } - } } catch (com.clerk.backend_api.models.errors.ClerkErrors e) { // handle exception throw e; - } catch (com.clerk.backend_api.models.errors.SDKError e) { - // handle exception - throw e; } catch (Exception e) { // handle exception throw e; } + } } ``` @@ -456,32 +437,22 @@ public class Application { .bearerAuth("") .build(); - GetClientListResponse res = sdk.clients().list() + sdk.clients().list() .limit(10L) .offset(0L) - .call(); + .callAsStreamUnwrapped() + .forEach(item -> { + // handle item + }); - while (true) { - if (res.clientList().isPresent()) { - // handle response - Optional nextRes = res.next(); - if (nextRes.isPresent()) { - res = nextRes.get(); - } else { - break; - } - } - } } catch (com.clerk.backend_api.models.errors.ClerkErrors e) { // handle exception throw e; - } catch (com.clerk.backend_api.models.errors.SDKError e) { - // handle exception - throw e; } catch (Exception e) { // handle exception throw e; } + } } ``` @@ -537,6 +508,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -582,6 +554,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -636,6 +609,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/RELEASES.md b/RELEASES.md index 693fa5c..78af74b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -58,4 +58,14 @@ Based on: ### Generated - [java v0.0.7] . ### Releases -- [Maven Central v0.0.7] https://central.sonatype.com/artifact/com.clerk/backend-api/0.0.7 - . \ No newline at end of file +- [Maven Central v0.0.7] https://central.sonatype.com/artifact/com.clerk/backend-api/0.0.7 - . + +## 2024-06-25 00:07:26 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.315.2 (2.352.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.1.0] . +### Releases +- [Maven Central v0.1.0] https://central.sonatype.com/artifact/com.clerk/backend-api/0.1.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index f815235..c7eb810 100644 --- a/USAGE.md +++ b/USAGE.md @@ -24,32 +24,22 @@ public class Application { .bearerAuth("") .build(); - GetClientListResponse res = sdk.clients().list() + sdk.clients().list() .limit(10L) .offset(0L) - .call(); + .callAsStreamUnwrapped() + .forEach(item -> { + // handle item + }); - while (true) { - if (res.clientList().isPresent()) { - // handle response - Optional nextRes = res.next(); - if (nextRes.isPresent()) { - res = nextRes.get(); - } else { - break; - } - } - } } catch (com.clerk.backend_api.models.errors.ClerkErrors e) { // handle exception throw e; - } catch (com.clerk.backend_api.models.errors.SDKError e) { - // handle exception - throw e; } catch (Exception e) { // handle exception throw e; } + } } ``` @@ -106,6 +96,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/build.gradle b/build.gradle index 9921330..762559f 100644 --- a/build.gradle +++ b/build.gradle @@ -61,7 +61,7 @@ tasks.withType(Javadoc) { options.addStringOption('Xdoclint:none', '-quiet') } group = "com.clerk" -version = "0.0.7" +version = "0.1.0" sourcesJar { archiveBaseName = "backend-api" @@ -98,7 +98,7 @@ publishing { maven(MavenPublication) { groupId = 'com.clerk' artifactId = 'backend-api' - version = '0.0.7' + version = '0.1.0' from components.java diff --git a/docs/sdks/actors/README.md b/docs/sdks/actors/README.md index d7cd85a..a9ebb63 100644 --- a/docs/sdks/actors/README.md +++ b/docs/sdks/actors/README.md @@ -61,6 +61,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -130,6 +131,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/allowlist/README.md b/docs/sdks/allowlist/README.md index 275aa5b..f1cb1ca 100644 --- a/docs/sdks/allowlist/README.md +++ b/docs/sdks/allowlist/README.md @@ -54,6 +54,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -121,6 +122,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -190,6 +192,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/blocklist/README.md b/docs/sdks/blocklist/README.md index b40728b..55e56cc 100644 --- a/docs/sdks/blocklist/README.md +++ b/docs/sdks/blocklist/README.md @@ -54,6 +54,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -121,6 +122,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -190,6 +192,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/clients/README.md b/docs/sdks/clients/README.md index 162039d..4256c0b 100644 --- a/docs/sdks/clients/README.md +++ b/docs/sdks/clients/README.md @@ -42,32 +42,22 @@ public class Application { .bearerAuth("") .build(); - GetClientListResponse res = sdk.clients().list() + sdk.clients().list() .limit(10L) .offset(0L) - .call(); + .callAsStreamUnwrapped() + .forEach(item -> { + // handle item + }); - while (true) { - if (res.clientList().isPresent()) { - // handle response - Optional nextRes = res.next(); - if (nextRes.isPresent()) { - res = nextRes.get(); - } else { - break; - } - } - } } catch (com.clerk.backend_api.models.errors.ClerkErrors e) { // handle exception throw e; - } catch (com.clerk.backend_api.models.errors.SDKError e) { - // handle exception - throw e; } catch (Exception e) { // handle exception throw e; } + } } ``` @@ -141,6 +131,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -210,6 +201,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/domains/README.md b/docs/sdks/domains/README.md index c5c1c12..ce518da 100644 --- a/docs/sdks/domains/README.md +++ b/docs/sdks/domains/README.md @@ -53,6 +53,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -124,6 +125,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -194,6 +196,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -272,6 +275,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/emailaddresses/README.md b/docs/sdks/emailaddresses/README.md index 7cc9d1a..529c138 100644 --- a/docs/sdks/emailaddresses/README.md +++ b/docs/sdks/emailaddresses/README.md @@ -59,6 +59,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -128,6 +129,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -197,6 +199,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -268,6 +271,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/instance/README.md b/docs/sdks/instance/README.md index 148875c..4277c87 100644 --- a/docs/sdks/instance/README.md +++ b/docs/sdks/instance/README.md @@ -61,6 +61,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -137,6 +138,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -207,6 +209,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -279,6 +282,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -353,6 +357,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -425,6 +430,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/invitations/README.md b/docs/sdks/invitations/README.md index 1d9aefb..3c7e194 100644 --- a/docs/sdks/invitations/README.md +++ b/docs/sdks/invitations/README.md @@ -61,6 +61,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -113,30 +114,20 @@ public class Application { .bearerAuth("") .build(); - ListInvitationsResponse res = sdk.invitations().list() + sdk.invitations().list() .limit(10L) .offset(0L) .status(QueryParamStatus.REVOKED) - .call(); + .callAsStreamUnwrapped() + .forEach(item -> { + // handle item + }); - while (true) { - if (res.invitationList().isPresent()) { - // handle response - Optional nextRes = res.next(); - if (nextRes.isPresent()) { - res = nextRes.get(); - } else { - break; - } - } - } - } catch (com.clerk.backend_api.models.errors.SDKError e) { - // handle exception - throw e; } catch (Exception e) { // handle exception throw e; } + } } ``` @@ -210,6 +201,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/jwks/README.md b/docs/sdks/jwks/README.md index dce90ef..613e56d 100644 --- a/docs/sdks/jwks/README.md +++ b/docs/sdks/jwks/README.md @@ -47,6 +47,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/jwttemplates/README.md b/docs/sdks/jwttemplates/README.md index 88e6ece..4cd56de 100644 --- a/docs/sdks/jwttemplates/README.md +++ b/docs/sdks/jwttemplates/README.md @@ -53,6 +53,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -118,6 +119,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -187,6 +189,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -258,6 +261,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -328,6 +332,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/miscellaneous/README.md b/docs/sdks/miscellaneous/README.md index cc47464..44c50b7 100644 --- a/docs/sdks/miscellaneous/README.md +++ b/docs/sdks/miscellaneous/README.md @@ -48,6 +48,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/oauthapplications/README.md b/docs/sdks/oauthapplications/README.md index a9f2e67..ef1e302 100644 --- a/docs/sdks/oauthapplications/README.md +++ b/docs/sdks/oauthapplications/README.md @@ -44,32 +44,22 @@ public class Application { .bearerAuth("") .build(); - ListOAuthApplicationsResponse res = sdk.oAuthApplications().list() + sdk.oAuthApplications().list() .limit(10L) .offset(0L) - .call(); + .callAsStreamUnwrapped() + .forEach(item -> { + // handle item + }); - while (true) { - if (res.oAuthApplications().isPresent()) { - // handle response - Optional nextRes = res.next(); - if (nextRes.isPresent()) { - res = nextRes.get(); - } else { - break; - } - } - } } catch (com.clerk.backend_api.models.errors.ClerkErrors e) { // handle exception throw e; - } catch (com.clerk.backend_api.models.errors.SDKError e) { - // handle exception - throw e; } catch (Exception e) { // handle exception throw e; } + } } ``` @@ -148,6 +138,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -217,6 +208,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -289,6 +281,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -360,6 +353,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -430,6 +424,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/organizationinvitations/README.md b/docs/sdks/organizationinvitations/README.md index 1f6165f..d85f2bd 100644 --- a/docs/sdks/organizationinvitations/README.md +++ b/docs/sdks/organizationinvitations/README.md @@ -78,6 +78,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -136,34 +137,24 @@ public class Application { .bearerAuth("") .build(); - ListOrganizationInvitationsResponse res = sdk.organizationInvitations().list() + sdk.organizationInvitations().list() .organizationId("") .limit(10L) .offset(0L) .status(ListOrganizationInvitationsQueryParamStatus.REVOKED) - .call(); + .callAsStreamUnwrapped() + .forEach(item -> { + // handle item + }); - while (true) { - if (res.organizationInvitations().isPresent()) { - // handle response - Optional nextRes = res.next(); - if (nextRes.isPresent()) { - res = nextRes.get(); - } else { - break; - } - } - } } catch (com.clerk.backend_api.models.errors.ClerkErrors e) { // handle exception throw e; - } catch (com.clerk.backend_api.models.errors.SDKError e) { - // handle exception - throw e; } catch (Exception e) { // handle exception throw e; } + } } ``` @@ -254,6 +245,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -314,33 +306,23 @@ public class Application { .bearerAuth("") .build(); - ListPendingOrganizationInvitationsResponse res = sdk.organizationInvitations().listPending() + sdk.organizationInvitations().listPending() .organizationId("") .limit(10L) .offset(0L) - .call(); + .callAsStreamUnwrapped() + .forEach(item -> { + // handle item + }); - while (true) { - if (res.organizationInvitations().isPresent()) { - // handle response - Optional nextRes = res.next(); - if (nextRes.isPresent()) { - res = nextRes.get(); - } else { - break; - } - } - } } catch (com.clerk.backend_api.models.errors.ClerkErrors e) { // handle exception throw e; - } catch (com.clerk.backend_api.models.errors.SDKError e) { - // handle exception - throw e; } catch (Exception e) { // handle exception throw e; } + } } ``` @@ -413,6 +395,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -491,6 +474,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/organizationmemberships/README.md b/docs/sdks/organizationmemberships/README.md index 90f1abe..5c93397 100644 --- a/docs/sdks/organizationmemberships/README.md +++ b/docs/sdks/organizationmemberships/README.md @@ -62,6 +62,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -115,34 +116,24 @@ public class Application { .bearerAuth("") .build(); - ListOrganizationMembershipsResponse res = sdk.organizationMemberships().list() + sdk.organizationMemberships().list() .organizationId("") .limit(10L) .offset(0L) .orderBy("") - .call(); + .callAsStreamUnwrapped() + .forEach(item -> { + // handle item + }); - while (true) { - if (res.organizationMemberships().isPresent()) { - // handle response - Optional nextRes = res.next(); - if (nextRes.isPresent()) { - res = nextRes.get(); - } else { - break; - } - } - } } catch (com.clerk.backend_api.models.errors.ClerkErrors e) { // handle exception throw e; - } catch (com.clerk.backend_api.models.errors.SDKError e) { - // handle exception - throw e; } catch (Exception e) { // handle exception throw e; } + } } ``` @@ -219,6 +210,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -291,6 +283,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -366,6 +359,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/organizations/README.md b/docs/sdks/organizations/README.md index 001d682..c30af1b 100644 --- a/docs/sdks/organizations/README.md +++ b/docs/sdks/organizations/README.md @@ -66,6 +66,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -148,6 +149,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -217,6 +219,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -288,6 +291,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -360,6 +364,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -434,6 +439,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -514,6 +520,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -584,6 +591,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/phonenumbers/README.md b/docs/sdks/phonenumbers/README.md index 57ef489..3c2748c 100644 --- a/docs/sdks/phonenumbers/README.md +++ b/docs/sdks/phonenumbers/README.md @@ -59,6 +59,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -128,6 +129,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -197,6 +199,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -268,6 +271,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/proxy/README.md b/docs/sdks/proxy/README.md index 5f44305..631839b 100644 --- a/docs/sdks/proxy/README.md +++ b/docs/sdks/proxy/README.md @@ -63,6 +63,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/redirecturls/README.md b/docs/sdks/redirecturls/README.md index 435aa47..674124d 100644 --- a/docs/sdks/redirecturls/README.md +++ b/docs/sdks/redirecturls/README.md @@ -52,6 +52,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -117,6 +118,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -186,6 +188,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -255,6 +258,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/samlconnections/README.md b/docs/sdks/samlconnections/README.md index d6a8ae8..6e419f2 100644 --- a/docs/sdks/samlconnections/README.md +++ b/docs/sdks/samlconnections/README.md @@ -42,32 +42,22 @@ public class Application { .bearerAuth("") .build(); - ListSAMLConnectionsResponse res = sdk.samlConnections().list() + sdk.samlConnections().list() .limit(10L) .offset(0L) - .call(); + .callAsStreamUnwrapped() + .forEach(item -> { + // handle item + }); - while (true) { - if (res.samlConnections().isPresent()) { - // handle response - Optional nextRes = res.next(); - if (nextRes.isPresent()) { - res = nextRes.get(); - } else { - break; - } - } - } } catch (com.clerk.backend_api.models.errors.ClerkErrors e) { // handle exception throw e; - } catch (com.clerk.backend_api.models.errors.SDKError e) { - // handle exception - throw e; } catch (Exception e) { // handle exception throw e; } + } } ``` @@ -144,6 +134,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -213,6 +204,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -284,6 +276,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -354,6 +347,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index a9e718a..c97a4f4 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -63,6 +63,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -132,6 +133,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -202,6 +204,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -278,6 +281,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -349,6 +353,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/signintokens/README.md b/docs/sdks/signintokens/README.md index baf03e4..b046018 100644 --- a/docs/sdks/signintokens/README.md +++ b/docs/sdks/signintokens/README.md @@ -59,6 +59,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -128,6 +129,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/signups/README.md b/docs/sdks/signups/README.md index a301424..fb54bc7 100644 --- a/docs/sdks/signups/README.md +++ b/docs/sdks/signups/README.md @@ -55,6 +55,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/templates/README.md b/docs/sdks/templates/README.md index 776309d..1b38e81 100644 --- a/docs/sdks/templates/README.md +++ b/docs/sdks/templates/README.md @@ -59,6 +59,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -129,6 +130,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -202,6 +204,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -274,6 +277,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -347,6 +351,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -423,6 +428,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/testingtokens/README.md b/docs/sdks/testingtokens/README.md index 869a958..914d79c 100644 --- a/docs/sdks/testingtokens/README.md +++ b/docs/sdks/testingtokens/README.md @@ -49,6 +49,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md index a8153a6..dc09125 100644 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -75,6 +75,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -153,6 +154,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -225,6 +227,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -294,6 +297,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -376,6 +380,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -446,6 +451,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -515,6 +521,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -584,6 +591,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -654,6 +662,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -723,6 +732,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -794,6 +804,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -864,6 +875,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -942,6 +954,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -1014,6 +1027,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -1067,33 +1081,23 @@ public class Application { .bearerAuth("") .build(); - UsersGetOrganizationMembershipsResponse res = sdk.users().getOrganizationMemberships() + sdk.users().getOrganizationMemberships() .userId("") .limit(10L) .offset(0L) - .call(); + .callAsStreamUnwrapped() + .forEach(item -> { + // handle item + }); - while (true) { - if (res.organizationMemberships().isPresent()) { - // handle response - Optional nextRes = res.next(); - if (nextRes.isPresent()) { - res = nextRes.get(); - } else { - break; - } - } - } } catch (com.clerk.backend_api.models.errors.ClerkErrors e) { // handle exception throw e; - } catch (com.clerk.backend_api.models.errors.SDKError e) { - // handle exception - throw e; } catch (Exception e) { // handle exception throw e; } + } } ``` @@ -1169,6 +1173,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -1245,6 +1250,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -1315,6 +1321,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index 618d259..d250312 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -54,6 +54,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -114,6 +115,7 @@ public class Application { // handle exception throw e; } + } } ``` @@ -176,6 +178,7 @@ public class Application { // handle exception throw e; } + } } ``` diff --git a/src/main/java/com/clerk/backend_api/SDKConfiguration.java b/src/main/java/com/clerk/backend_api/SDKConfiguration.java index 0dc93a2..af899c8 100644 --- a/src/main/java/com/clerk/backend_api/SDKConfiguration.java +++ b/src/main/java/com/clerk/backend_api/SDKConfiguration.java @@ -21,9 +21,9 @@ public Optional securitySource() { public int serverIdx = 0; public String language = "java"; public String openapiDocVersion = "v1"; - public String sdkVersion = "0.0.7"; - public String genVersion = "2.342.6"; - public String userAgent = "speakeasy-sdk/java 0.0.7 2.342.6 v1 com.clerk.backend_api"; + public String sdkVersion = "0.1.0"; + public String genVersion = "2.352.0"; + public String userAgent = "speakeasy-sdk/java 0.1.0 2.352.0 v1 com.clerk.backend_api"; private com.clerk.backend_api.utils.Hooks _hooks = createHooks(); diff --git a/src/main/java/com/clerk/backend_api/utils/HTTPClient.java b/src/main/java/com/clerk/backend_api/utils/HTTPClient.java index 6fe4f23..cd514c0 100644 --- a/src/main/java/com/clerk/backend_api/utils/HTTPClient.java +++ b/src/main/java/com/clerk/backend_api/utils/HTTPClient.java @@ -11,6 +11,22 @@ import java.net.http.HttpRequest; public interface HTTPClient { + + /** + * Sends an HTTP request and returns the response. + * + *

Note that {@link HttpRequest} is immutable. To modify the request you can use + * {@link HttpRequest#newBuilder(HttpRequest, BiPredicate)} with + * JDK 16 and later (which will copy the request for modification in a builder). + * If that method is not available then use {@link Helpers#copy} (which also returns + * a builder). + * + * @param request HTTP request + * @return HTTP response + * @throws IOException + * @throws InterruptedException + * @throws URISyntaxException + */ HttpResponse send(HttpRequest request) throws IOException, InterruptedException, URISyntaxException; } diff --git a/src/main/java/com/clerk/backend_api/utils/Hook.java b/src/main/java/com/clerk/backend_api/utils/Hook.java index 17d5ffd..b434b70 100644 --- a/src/main/java/com/clerk/backend_api/utils/Hook.java +++ b/src/main/java/com/clerk/backend_api/utils/Hook.java @@ -144,6 +144,12 @@ public interface BeforeRequest { /** * Transforms the given {@link HttpRequest} before sending. * + *

Note that {@link HttpRequest} is immutable. To modify the request you can use + * {@link HttpRequest#newBuilder(HttpRequest, BiPredicate)} with + * JDK 16 and later (which will copy the request for modification in a builder). + * If that method is not available then use {@link Helpers#copy} (which also returns + * a builder). + * * @param context context for the hook call * @param request request to be transformed * @return transformed request diff --git a/src/main/java/com/clerk/backend_api/utils/Hooks.java b/src/main/java/com/clerk/backend_api/utils/Hooks.java index 73f41f5..3908ffc 100644 --- a/src/main/java/com/clerk/backend_api/utils/Hooks.java +++ b/src/main/java/com/clerk/backend_api/utils/Hooks.java @@ -99,7 +99,7 @@ public Hooks registerAfterError(AfterError afterError) { } /** - * Registers a {@SdkInit} hook to be applied in order of registration + * Registers a {@link SdkInit} hook to be applied in order of registration * (multiple can be registered). * * @param SdkInit hook to be registered