diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 805bbf4..442f9e1 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 1d22a5a4-8bac-42e3-b164-121fcacf66c9 management: - docChecksum: f252eab002a20aa369d77a296d7c0a20 + docChecksum: 10e470dbac1740bbb345d904d53ef04a docVersion: v1 - speakeasyVersion: 1.448.0 - generationVersion: 2.466.0 - releaseVersion: 1.4.0 - configChecksum: d53c47a510eb971ffc5be704cbfee77e + speakeasyVersion: 1.456.1 + generationVersion: 2.481.0 + releaseVersion: 1.5.0 + configChecksum: 5fe64054d82adba341d847ebd655945d repoURL: https://github.com/clerk/clerk-sdk-java.git published: true features: @@ -14,7 +14,7 @@ features: additionalDependencies: 0.1.0 additionalProperties: 0.0.1 constsAndDefaults: 0.1.1 - core: 3.32.2 + core: 3.33.3 deprecations: 2.81.1 examples: 2.81.3 flattening: 2.81.1 @@ -1244,6 +1244,7 @@ generatedFiles: - src/main/java/com/clerk/backend_api/utils/Security.java - src/main/java/com/clerk/backend_api/utils/SecurityMetadata.java - src/main/java/com/clerk/backend_api/utils/SerializedBody.java + - src/main/java/com/clerk/backend_api/utils/SessionManager.java - src/main/java/com/clerk/backend_api/utils/SpeakeasyHTTPClient.java - src/main/java/com/clerk/backend_api/utils/SpeakeasyMetadata.java - src/main/java/com/clerk/backend_api/utils/TypedObject.java @@ -1252,7 +1253,11 @@ generatedFiles: - src/main/java/com/clerk/backend_api/utils/Utils.java examples: GetPublicInterstitial: {} - GetJWKS: {} + GetJWKS: + speakeasy-default-get-JWKS: + responses: + "200": + application/json: {} GetClientList: speakeasy-default-get-client-list: responses: @@ -1397,7 +1402,8 @@ examples: responses: "401": application/json: {"errors": []} - "200": {} + "200": + application/json: {} GetTemplateList: speakeasy-default-get-template-list: parameters: @@ -1406,7 +1412,8 @@ examples: responses: "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: [{}, {}, {}] RevertTemplate: speakeasy-default-revert-template: parameters: @@ -1416,7 +1423,8 @@ examples: responses: "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} GetTemplate: speakeasy-default-get-template: parameters: @@ -1426,7 +1434,8 @@ examples: responses: "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} ToggleTemplateDelivery: speakeasy-default-toggle-template-delivery: parameters: @@ -1436,7 +1445,8 @@ examples: responses: "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} UpsertTemplate: speakeasy-default-upsert-template: parameters: @@ -1446,7 +1456,8 @@ examples: responses: "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} PreviewTemplate: speakeasy-default-preview-template: parameters: @@ -1456,7 +1467,8 @@ examples: responses: "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} GetUserList: "": parameters: @@ -1590,7 +1602,8 @@ examples: responses: "400": application/json: {"errors": []} - "200": {} + "200": + application/json: [{}] UsersGetOrganizationMemberships: speakeasy-default-users-get-organization-memberships: parameters: @@ -1623,7 +1636,8 @@ examples: responses: "500": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} VerifyTOTP: speakeasy-default-verify-TOTP: parameters: @@ -1634,7 +1648,8 @@ examples: responses: "500": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} DisableMFA: speakeasy-default-disable-MFA: parameters: @@ -1643,7 +1658,8 @@ examples: responses: "404": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} DeleteBackupCode: speakeasy-default-delete-backup-code: parameters: @@ -1652,7 +1668,8 @@ examples: responses: "404": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} UserPasskeyDelete: speakeasy-default-user-passkey-delete: parameters: @@ -1693,7 +1710,8 @@ examples: responses: "404": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} DeleteExternalAccount: speakeasy-default-delete-external-account: parameters: @@ -1746,7 +1764,8 @@ examples: responses: "400": application/json: {"errors": []} - "200": {} + "200": + application/json: {} ListOrganizationInvitations: speakeasy-default-list-organization-invitations: parameters: @@ -1790,7 +1809,8 @@ examples: responses: "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} RevokeOrganizationInvitation: speakeasy-default-revoke-organization-invitation: parameters: @@ -1800,13 +1820,15 @@ examples: responses: "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} ListAllowlistIdentifiers: speakeasy-default-list-allowlist-identifiers: responses: "401": application/json: {"errors": []} - "200": {} + "200": + application/json: [{}, {}, {}] CreateAllowlistIdentifier: speakeasy-default-create-allowlist-identifier: requestBody: @@ -1814,7 +1836,8 @@ examples: responses: "400": application/json: {"errors": []} - "200": {} + "200": + application/json: {} CreateBlocklistIdentifier: speakeasy-default-create-blocklist-identifier: requestBody: @@ -1822,7 +1845,8 @@ examples: responses: "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} DeleteBlocklistIdentifier: speakeasy-default-delete-blocklist-identifier: parameters: @@ -1855,7 +1879,8 @@ examples: responses: "402": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} UpdateProductionInstanceDomain: speakeasy-default-update-production-instance-domain: responses: @@ -1929,7 +1954,8 @@ examples: responses: "402": application/json: {"errors": []} - "200": {} + "200": + application/json: {} UpdateInstanceOrganizationSettings: speakeasy-default-update-instance-organization-settings: responses: @@ -2087,7 +2113,8 @@ examples: responses: "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} ListOrganizationMemberships: speakeasy-default-list-organization-memberships: parameters: @@ -2110,7 +2137,8 @@ examples: responses: "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} DeleteOrganizationMembership: speakeasy-default-delete-organization-membership: parameters: @@ -2120,7 +2148,8 @@ examples: responses: "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} UpdateOrganizationMembershipMetadata: speakeasy-default-update-organization-membership-metadata: parameters: @@ -2130,7 +2159,8 @@ examples: responses: "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} InstanceGetOrganizationMemberships: speakeasy-default-instance-get-organization-memberships: responses: @@ -2146,7 +2176,8 @@ examples: responses: "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} ListOrganizationDomains: speakeasy-default-list-organization-domains: parameters: @@ -2178,7 +2209,8 @@ examples: responses: "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} - "200": {} + "200": + application/json: {} VerifyDomainProxy: speakeasy-default-verify-domain-proxy: responses: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index b2a8946..adea7cb 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false java: - version: 1.4.0 + version: 1.5.0 additionalDependencies: [] additionalPlugins: [] artifactID: backend-api diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index de5b2e2..81ba298 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.448.0 +speakeasyVersion: 1.456.1 sources: clerk-java-sdk: sourceNamespace: clerk-java-sdk - sourceRevisionDigest: sha256:3f7ff6d209ea29dda2dbcc2d6f8dd3c754cc7d2782521497a50d67e13d2e0800 - sourceBlobDigest: sha256:1efc95e7472ef7c4e15659f395e0b717ef56cdd21c71e285cb116057f5900b2e + sourceRevisionDigest: sha256:bfefe98b41e740defff0a03f01252a3b6267134984b14ede64221006fa1ac063 + sourceBlobDigest: sha256:ff770ca4e1220e72028c4285967fd63f63c68a1d27da9815d826384905cadcfa tags: - latest - - speakeasy-sdk-regen-1732579755 + - speakeasy-sdk-regen-1733789375 - v1 targets: clerk-java: source: clerk-java-sdk sourceNamespace: clerk-java-sdk - sourceRevisionDigest: sha256:3f7ff6d209ea29dda2dbcc2d6f8dd3c754cc7d2782521497a50d67e13d2e0800 - sourceBlobDigest: sha256:1efc95e7472ef7c4e15659f395e0b717ef56cdd21c71e285cb116057f5900b2e + sourceRevisionDigest: sha256:bfefe98b41e740defff0a03f01252a3b6267134984b14ede64221006fa1ac063 + sourceBlobDigest: sha256:ff770ca4e1220e72028c4285967fd63f63c68a1d27da9815d826384905cadcfa codeSamplesNamespace: clerk-java-sdk-code-samples - codeSamplesRevisionDigest: sha256:b6e9e9a65dc0933a71833892ddbd81fc4c966a105ba18feffb05d7e7c8c11b85 + codeSamplesRevisionDigest: sha256:bf210dc764b909e1d20c7c06ab5e5d040243afc06d7fe23c731f289006918af8 my-first-target: source: clerk-java-sdk sourceNamespace: clerk-java-sdk diff --git a/README.md b/README.md index c3c4dac..960c21e 100644 --- a/README.md +++ b/README.md @@ -27,14 +27,18 @@ More information about the API can be found at https://clerk.com/docs ## Table of Contents + + * [SDK Installation](#sdk-installation) + * [SDK Example Usage](#sdk-example-usage) + * [Authentication](#authentication) + * [Request Authentication](#request-authentication) + * [Available Resources and Operations](#available-resources-and-operations) + * [Error Handling](#error-handling) + * [Server Selection](#server-selection) +* [Development](#development) + * [Maturity](#maturity) + * [Contributions](#contributions) -* [SDK Installation](#sdk-installation) -* [SDK Example Usage](#sdk-example-usage) -* [Authentication](#authentication) -* [Request Authentication](#request-authentication) -* [Available Resources and Operations](#available-resources-and-operations) -* [Error Handling](#error-handling) -* [Server Selection](#server-selection) @@ -48,7 +52,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.clerk:backend-api:1.4.0' +implementation 'com.clerk:backend-api:1.5.0' ``` Maven: @@ -56,7 +60,7 @@ Maven: com.clerk backend-api - 1.4.0 + 1.5.0 ``` diff --git a/RELEASES.md b/RELEASES.md index 568f3a8..2dc93d6 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -178,4 +178,14 @@ Based on: ### Generated - [java v1.4.0] . ### Releases -- [Maven Central v1.4.0] https://central.sonatype.com/artifact/com.clerk/backend-api/1.4.0 - . \ No newline at end of file +- [Maven Central v1.4.0] https://central.sonatype.com/artifact/com.clerk/backend-api/1.4.0 - . + +## 2024-12-20 00:08:42 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.456.1 (2.481.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v1.5.0] . +### Releases +- [Maven Central v1.5.0] https://central.sonatype.com/artifact/com.clerk/backend-api/1.5.0 - . \ No newline at end of file diff --git a/build.gradle b/build.gradle index 916d4dc..fafd336 100644 --- a/build.gradle +++ b/build.gradle @@ -63,7 +63,7 @@ tasks.withType(Javadoc) { } group = "com.clerk" -version = "1.4.0" +version = "1.5.0" sourcesJar { archiveBaseName = "backend-api" @@ -101,7 +101,7 @@ publishing { maven(MavenPublication) { groupId = 'com.clerk' artifactId = 'backend-api' - version = '1.4.0' + version = '1.5.0' from components.java diff --git a/src/main/java/com/clerk/backend_api/ActorTokens.java b/src/main/java/com/clerk/backend_api/ActorTokens.java index bf37b83..e3f0533 100644 --- a/src/main/java/com/clerk/backend_api/ActorTokens.java +++ b/src/main/java/com/clerk/backend_api/ActorTokens.java @@ -85,10 +85,10 @@ public CreateActorTokenResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -96,7 +96,7 @@ public CreateActorTokenResponse create( new BeforeRequestContextImpl( "CreateActorToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -107,7 +107,7 @@ public CreateActorTokenResponse create( new AfterErrorContextImpl( "CreateActorToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -116,7 +116,7 @@ public CreateActorTokenResponse create( new AfterSuccessContextImpl( "CreateActorToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -125,7 +125,7 @@ public CreateActorTokenResponse create( new AfterErrorContextImpl( "CreateActorToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -223,10 +223,10 @@ public RevokeActorTokenResponse revoke( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -234,7 +234,7 @@ public RevokeActorTokenResponse revoke( new BeforeRequestContextImpl( "RevokeActorToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -245,7 +245,7 @@ public RevokeActorTokenResponse revoke( new AfterErrorContextImpl( "RevokeActorToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -254,7 +254,7 @@ public RevokeActorTokenResponse revoke( new AfterSuccessContextImpl( "RevokeActorToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -263,7 +263,7 @@ public RevokeActorTokenResponse revoke( new AfterErrorContextImpl( "RevokeActorToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/AllowlistBlocklist.java b/src/main/java/com/clerk/backend_api/AllowlistBlocklist.java index a71ce19..7a65655 100644 --- a/src/main/java/com/clerk/backend_api/AllowlistBlocklist.java +++ b/src/main/java/com/clerk/backend_api/AllowlistBlocklist.java @@ -77,10 +77,10 @@ public ListAllowlistIdentifiersResponse listAllowlistIdentifiersDirect() throws _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -88,7 +88,7 @@ public ListAllowlistIdentifiersResponse listAllowlistIdentifiersDirect() throws new BeforeRequestContextImpl( "ListAllowlistIdentifiers", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -99,7 +99,7 @@ public ListAllowlistIdentifiersResponse listAllowlistIdentifiersDirect() throws new AfterErrorContextImpl( "ListAllowlistIdentifiers", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -108,7 +108,7 @@ public ListAllowlistIdentifiersResponse listAllowlistIdentifiersDirect() throws new AfterSuccessContextImpl( "ListAllowlistIdentifiers", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -117,7 +117,7 @@ public ListAllowlistIdentifiersResponse listAllowlistIdentifiersDirect() throws new AfterErrorContextImpl( "ListAllowlistIdentifiers", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -220,10 +220,10 @@ public CreateAllowlistIdentifierResponse createAllowlistIdentifier( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -231,7 +231,7 @@ public CreateAllowlistIdentifierResponse createAllowlistIdentifier( new BeforeRequestContextImpl( "CreateAllowlistIdentifier", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -242,7 +242,7 @@ public CreateAllowlistIdentifierResponse createAllowlistIdentifier( new AfterErrorContextImpl( "CreateAllowlistIdentifier", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -251,7 +251,7 @@ public CreateAllowlistIdentifierResponse createAllowlistIdentifier( new AfterSuccessContextImpl( "CreateAllowlistIdentifier", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -260,7 +260,7 @@ public CreateAllowlistIdentifierResponse createAllowlistIdentifier( new AfterErrorContextImpl( "CreateAllowlistIdentifier", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -363,10 +363,10 @@ public CreateBlocklistIdentifierResponse createBlocklistIdentifier( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -374,7 +374,7 @@ public CreateBlocklistIdentifierResponse createBlocklistIdentifier( new BeforeRequestContextImpl( "CreateBlocklistIdentifier", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -385,7 +385,7 @@ public CreateBlocklistIdentifierResponse createBlocklistIdentifier( new AfterErrorContextImpl( "CreateBlocklistIdentifier", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -394,7 +394,7 @@ public CreateBlocklistIdentifierResponse createBlocklistIdentifier( new AfterSuccessContextImpl( "CreateBlocklistIdentifier", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -403,7 +403,7 @@ public CreateBlocklistIdentifierResponse createBlocklistIdentifier( new AfterErrorContextImpl( "CreateBlocklistIdentifier", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -501,10 +501,10 @@ public DeleteBlocklistIdentifierResponse deleteBlocklistIdentifier( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -512,7 +512,7 @@ public DeleteBlocklistIdentifierResponse deleteBlocklistIdentifier( new BeforeRequestContextImpl( "DeleteBlocklistIdentifier", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -523,7 +523,7 @@ public DeleteBlocklistIdentifierResponse deleteBlocklistIdentifier( new AfterErrorContextImpl( "DeleteBlocklistIdentifier", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -532,7 +532,7 @@ public DeleteBlocklistIdentifierResponse deleteBlocklistIdentifier( new AfterSuccessContextImpl( "DeleteBlocklistIdentifier", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -541,7 +541,7 @@ public DeleteBlocklistIdentifierResponse deleteBlocklistIdentifier( new AfterErrorContextImpl( "DeleteBlocklistIdentifier", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/AllowlistIdentifiers.java b/src/main/java/com/clerk/backend_api/AllowlistIdentifiers.java index 79a388c..6ded791 100644 --- a/src/main/java/com/clerk/backend_api/AllowlistIdentifiers.java +++ b/src/main/java/com/clerk/backend_api/AllowlistIdentifiers.java @@ -71,10 +71,10 @@ public DeleteAllowlistIdentifierResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -82,7 +82,7 @@ public DeleteAllowlistIdentifierResponse delete( new BeforeRequestContextImpl( "DeleteAllowlistIdentifier", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -93,7 +93,7 @@ public DeleteAllowlistIdentifierResponse delete( new AfterErrorContextImpl( "DeleteAllowlistIdentifier", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -102,7 +102,7 @@ public DeleteAllowlistIdentifierResponse delete( new AfterSuccessContextImpl( "DeleteAllowlistIdentifier", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -111,7 +111,7 @@ public DeleteAllowlistIdentifierResponse delete( new AfterErrorContextImpl( "DeleteAllowlistIdentifier", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/BetaFeatures.java b/src/main/java/com/clerk/backend_api/BetaFeatures.java index 117b92f..49b19aa 100644 --- a/src/main/java/com/clerk/backend_api/BetaFeatures.java +++ b/src/main/java/com/clerk/backend_api/BetaFeatures.java @@ -88,10 +88,10 @@ public UpdateInstanceAuthConfigResponse updateInstanceSettings( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -99,7 +99,7 @@ public UpdateInstanceAuthConfigResponse updateInstanceSettings( new BeforeRequestContextImpl( "UpdateInstanceAuthConfig", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -110,7 +110,7 @@ public UpdateInstanceAuthConfigResponse updateInstanceSettings( new AfterErrorContextImpl( "UpdateInstanceAuthConfig", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -119,7 +119,7 @@ public UpdateInstanceAuthConfigResponse updateInstanceSettings( new AfterSuccessContextImpl( "UpdateInstanceAuthConfig", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -128,7 +128,7 @@ public UpdateInstanceAuthConfigResponse updateInstanceSettings( new AfterErrorContextImpl( "UpdateInstanceAuthConfig", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -256,10 +256,10 @@ public UpdateProductionInstanceDomainResponse updateDomain( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -267,7 +267,7 @@ public UpdateProductionInstanceDomainResponse updateDomain( new BeforeRequestContextImpl( "UpdateProductionInstanceDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -278,7 +278,7 @@ public UpdateProductionInstanceDomainResponse updateDomain( new AfterErrorContextImpl( "UpdateProductionInstanceDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -287,7 +287,7 @@ public UpdateProductionInstanceDomainResponse updateDomain( new AfterSuccessContextImpl( "UpdateProductionInstanceDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -296,7 +296,7 @@ public UpdateProductionInstanceDomainResponse updateDomain( new AfterErrorContextImpl( "UpdateProductionInstanceDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -396,10 +396,10 @@ public ChangeProductionInstanceDomainResponse changeProductionInstanceDomain( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -407,7 +407,7 @@ public ChangeProductionInstanceDomainResponse changeProductionInstanceDomain( new BeforeRequestContextImpl( "ChangeProductionInstanceDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -418,7 +418,7 @@ public ChangeProductionInstanceDomainResponse changeProductionInstanceDomain( new AfterErrorContextImpl( "ChangeProductionInstanceDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -427,7 +427,7 @@ public ChangeProductionInstanceDomainResponse changeProductionInstanceDomain( new AfterSuccessContextImpl( "ChangeProductionInstanceDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -436,7 +436,7 @@ public ChangeProductionInstanceDomainResponse changeProductionInstanceDomain( new AfterErrorContextImpl( "ChangeProductionInstanceDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/BlocklistIdentifiers.java b/src/main/java/com/clerk/backend_api/BlocklistIdentifiers.java index 0b86d14..c1a1ccd 100644 --- a/src/main/java/com/clerk/backend_api/BlocklistIdentifiers.java +++ b/src/main/java/com/clerk/backend_api/BlocklistIdentifiers.java @@ -59,10 +59,10 @@ public ListBlocklistIdentifiersResponse listDirect() throws Exception { _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -70,7 +70,7 @@ public ListBlocklistIdentifiersResponse listDirect() throws Exception { new BeforeRequestContextImpl( "ListBlocklistIdentifiers", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -81,7 +81,7 @@ public ListBlocklistIdentifiersResponse listDirect() throws Exception { new AfterErrorContextImpl( "ListBlocklistIdentifiers", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -90,7 +90,7 @@ public ListBlocklistIdentifiersResponse listDirect() throws Exception { new AfterSuccessContextImpl( "ListBlocklistIdentifiers", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -99,7 +99,7 @@ public ListBlocklistIdentifiersResponse listDirect() throws Exception { new AfterErrorContextImpl( "ListBlocklistIdentifiers", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/Clerk.java b/src/main/java/com/clerk/backend_api/Clerk.java index e8ae311..a80aa07 100644 --- a/src/main/java/com/clerk/backend_api/Clerk.java +++ b/src/main/java/com/clerk/backend_api/Clerk.java @@ -4,7 +4,6 @@ package com.clerk.backend_api; -import com.clerk.backend_api.models.operations.SDKMethodInterfaces.*; import com.clerk.backend_api.utils.HTTPClient; import com.clerk.backend_api.utils.RetryConfig; import com.clerk.backend_api.utils.SpeakeasyHTTPClient; @@ -12,6 +11,7 @@ import java.lang.String; import java.util.Map; import java.util.Optional; +import java.util.function.Consumer; /** * Clerk Backend API: The Clerk REST Backend API, meant to be accessed by backend @@ -388,9 +388,16 @@ public Builder retryConfig(RetryConfig retryConfig) { this.sdkConfiguration.retryConfig = Optional.of(retryConfig); return this; } - // Visible for testing, will be accessed via reflection - void _hooks(com.clerk.backend_api.utils.Hooks hooks) { - sdkConfiguration.setHooks(hooks); + // Visible for testing, may be accessed via reflection in tests + Builder _hooks(com.clerk.backend_api.utils.Hooks hooks) { + sdkConfiguration.setHooks(hooks); + return this; + } + + // Visible for testing, may be accessed via reflection in tests + Builder _hooks(Consumer consumer) { + consumer.accept(sdkConfiguration.hooks()); + return this; } /** diff --git a/src/main/java/com/clerk/backend_api/ClerkRedirectUrls.java b/src/main/java/com/clerk/backend_api/ClerkRedirectUrls.java index bd89444..5f9608e 100644 --- a/src/main/java/com/clerk/backend_api/ClerkRedirectUrls.java +++ b/src/main/java/com/clerk/backend_api/ClerkRedirectUrls.java @@ -88,10 +88,10 @@ public CreateRedirectURLResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -99,7 +99,7 @@ public CreateRedirectURLResponse create( new BeforeRequestContextImpl( "CreateRedirectURL", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -110,7 +110,7 @@ public CreateRedirectURLResponse create( new AfterErrorContextImpl( "CreateRedirectURL", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -119,7 +119,7 @@ public CreateRedirectURLResponse create( new AfterSuccessContextImpl( "CreateRedirectURL", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -128,7 +128,7 @@ public CreateRedirectURLResponse create( new AfterErrorContextImpl( "CreateRedirectURL", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -226,10 +226,10 @@ public GetRedirectURLResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -237,7 +237,7 @@ public GetRedirectURLResponse get( new BeforeRequestContextImpl( "GetRedirectURL", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -248,7 +248,7 @@ public GetRedirectURLResponse get( new AfterErrorContextImpl( "GetRedirectURL", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -257,7 +257,7 @@ public GetRedirectURLResponse get( new AfterSuccessContextImpl( "GetRedirectURL", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -266,7 +266,7 @@ public GetRedirectURLResponse get( new AfterErrorContextImpl( "GetRedirectURL", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -364,10 +364,10 @@ public DeleteRedirectURLResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -375,7 +375,7 @@ public DeleteRedirectURLResponse delete( new BeforeRequestContextImpl( "DeleteRedirectURL", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -386,7 +386,7 @@ public DeleteRedirectURLResponse delete( new AfterErrorContextImpl( "DeleteRedirectURL", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -395,7 +395,7 @@ public DeleteRedirectURLResponse delete( new AfterSuccessContextImpl( "DeleteRedirectURL", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -404,7 +404,7 @@ public DeleteRedirectURLResponse delete( new AfterErrorContextImpl( "DeleteRedirectURL", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/Clients.java b/src/main/java/com/clerk/backend_api/Clients.java index 2db44ae..74d598e 100644 --- a/src/main/java/com/clerk/backend_api/Clients.java +++ b/src/main/java/com/clerk/backend_api/Clients.java @@ -119,10 +119,10 @@ public GetClientListResponse list( GetClientListRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -130,7 +130,7 @@ public GetClientListResponse list( new BeforeRequestContextImpl( "GetClientList", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -141,7 +141,7 @@ public GetClientListResponse list( new AfterErrorContextImpl( "GetClientList", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -150,7 +150,7 @@ public GetClientListResponse list( new AfterSuccessContextImpl( "GetClientList", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -159,7 +159,7 @@ public GetClientListResponse list( new AfterErrorContextImpl( "GetClientList", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -262,10 +262,10 @@ public VerifyClientResponse verify( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -273,7 +273,7 @@ public VerifyClientResponse verify( new BeforeRequestContextImpl( "VerifyClient", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -284,7 +284,7 @@ public VerifyClientResponse verify( new AfterErrorContextImpl( "VerifyClient", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -293,7 +293,7 @@ public VerifyClientResponse verify( new AfterSuccessContextImpl( "VerifyClient", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -302,7 +302,7 @@ public VerifyClientResponse verify( new AfterErrorContextImpl( "VerifyClient", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -400,10 +400,10 @@ public GetClientResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -411,7 +411,7 @@ public GetClientResponse get( new BeforeRequestContextImpl( "GetClient", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -422,7 +422,7 @@ public GetClientResponse get( new AfterErrorContextImpl( "GetClient", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -431,7 +431,7 @@ public GetClientResponse get( new AfterSuccessContextImpl( "GetClient", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -440,7 +440,7 @@ public GetClientResponse get( new AfterErrorContextImpl( "GetClient", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/Domains.java b/src/main/java/com/clerk/backend_api/Domains.java index ca02e43..49dcd10 100644 --- a/src/main/java/com/clerk/backend_api/Domains.java +++ b/src/main/java/com/clerk/backend_api/Domains.java @@ -82,10 +82,10 @@ public ListDomainsResponse listDirect() throws Exception { _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -93,7 +93,7 @@ public ListDomainsResponse listDirect() throws Exception { new BeforeRequestContextImpl( "ListDomains", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -104,7 +104,7 @@ public ListDomainsResponse listDirect() throws Exception { new AfterErrorContextImpl( "ListDomains", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -113,7 +113,7 @@ public ListDomainsResponse listDirect() throws Exception { new AfterSuccessContextImpl( "ListDomains", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -122,7 +122,7 @@ public ListDomainsResponse listDirect() throws Exception { new AfterErrorContextImpl( "ListDomains", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -219,10 +219,10 @@ public AddDomainResponse add( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -230,7 +230,7 @@ public AddDomainResponse add( new BeforeRequestContextImpl( "AddDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -241,7 +241,7 @@ public AddDomainResponse add( new AfterErrorContextImpl( "AddDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -250,7 +250,7 @@ public AddDomainResponse add( new AfterSuccessContextImpl( "AddDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -259,7 +259,7 @@ public AddDomainResponse add( new AfterErrorContextImpl( "AddDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -359,10 +359,10 @@ public DeleteDomainResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -370,7 +370,7 @@ public DeleteDomainResponse delete( new BeforeRequestContextImpl( "DeleteDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -381,7 +381,7 @@ public DeleteDomainResponse delete( new AfterErrorContextImpl( "DeleteDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -390,7 +390,7 @@ public DeleteDomainResponse delete( new AfterSuccessContextImpl( "DeleteDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -399,7 +399,7 @@ public DeleteDomainResponse delete( new AfterErrorContextImpl( "DeleteDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -527,10 +527,10 @@ public UpdateDomainResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -538,7 +538,7 @@ public UpdateDomainResponse update( new BeforeRequestContextImpl( "UpdateDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -549,7 +549,7 @@ public UpdateDomainResponse update( new AfterErrorContextImpl( "UpdateDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -558,7 +558,7 @@ public UpdateDomainResponse update( new AfterSuccessContextImpl( "UpdateDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -567,7 +567,7 @@ public UpdateDomainResponse update( new AfterErrorContextImpl( "UpdateDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/EmailAddresses.java b/src/main/java/com/clerk/backend_api/EmailAddresses.java index 8528798..e2372c6 100644 --- a/src/main/java/com/clerk/backend_api/EmailAddresses.java +++ b/src/main/java/com/clerk/backend_api/EmailAddresses.java @@ -93,10 +93,10 @@ public CreateEmailAddressResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -104,7 +104,7 @@ public CreateEmailAddressResponse create( new BeforeRequestContextImpl( "CreateEmailAddress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -115,7 +115,7 @@ public CreateEmailAddressResponse create( new AfterErrorContextImpl( "CreateEmailAddress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -124,7 +124,7 @@ public CreateEmailAddressResponse create( new AfterSuccessContextImpl( "CreateEmailAddress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -133,7 +133,7 @@ public CreateEmailAddressResponse create( new AfterErrorContextImpl( "CreateEmailAddress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -231,10 +231,10 @@ public GetEmailAddressResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -242,7 +242,7 @@ public GetEmailAddressResponse get( new BeforeRequestContextImpl( "GetEmailAddress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -253,7 +253,7 @@ public GetEmailAddressResponse get( new AfterErrorContextImpl( "GetEmailAddress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -262,7 +262,7 @@ public GetEmailAddressResponse get( new AfterSuccessContextImpl( "GetEmailAddress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -271,7 +271,7 @@ public GetEmailAddressResponse get( new AfterErrorContextImpl( "GetEmailAddress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -369,10 +369,10 @@ public DeleteEmailAddressResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -380,7 +380,7 @@ public DeleteEmailAddressResponse delete( new BeforeRequestContextImpl( "DeleteEmailAddress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -391,7 +391,7 @@ public DeleteEmailAddressResponse delete( new AfterErrorContextImpl( "DeleteEmailAddress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -400,7 +400,7 @@ public DeleteEmailAddressResponse delete( new AfterSuccessContextImpl( "DeleteEmailAddress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -409,7 +409,7 @@ public DeleteEmailAddressResponse delete( new AfterErrorContextImpl( "DeleteEmailAddress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -523,10 +523,10 @@ public UpdateEmailAddressResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -534,7 +534,7 @@ public UpdateEmailAddressResponse update( new BeforeRequestContextImpl( "UpdateEmailAddress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -545,7 +545,7 @@ public UpdateEmailAddressResponse update( new AfterErrorContextImpl( "UpdateEmailAddress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -554,7 +554,7 @@ public UpdateEmailAddressResponse update( new AfterSuccessContextImpl( "UpdateEmailAddress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -563,7 +563,7 @@ public UpdateEmailAddressResponse update( new AfterErrorContextImpl( "UpdateEmailAddress", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/EmailAndSmsTemplates.java b/src/main/java/com/clerk/backend_api/EmailAndSmsTemplates.java index 3bc52ef..57c87db 100644 --- a/src/main/java/com/clerk/backend_api/EmailAndSmsTemplates.java +++ b/src/main/java/com/clerk/backend_api/EmailAndSmsTemplates.java @@ -113,10 +113,10 @@ public UpsertTemplateResponse upsert( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -124,7 +124,7 @@ public UpsertTemplateResponse upsert( new BeforeRequestContextImpl( "UpsertTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -135,7 +135,7 @@ public UpsertTemplateResponse upsert( new AfterErrorContextImpl( "UpsertTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -144,7 +144,7 @@ public UpsertTemplateResponse upsert( new AfterSuccessContextImpl( "UpsertTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -153,7 +153,7 @@ public UpsertTemplateResponse upsert( new AfterErrorContextImpl( "UpsertTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/EmailSMSTemplates.java b/src/main/java/com/clerk/backend_api/EmailSMSTemplates.java index 91822be..3fd6900 100644 --- a/src/main/java/com/clerk/backend_api/EmailSMSTemplates.java +++ b/src/main/java/com/clerk/backend_api/EmailSMSTemplates.java @@ -98,10 +98,10 @@ public GetTemplateListResponse list( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -109,7 +109,7 @@ public GetTemplateListResponse list( new BeforeRequestContextImpl( "GetTemplateList", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -120,7 +120,7 @@ public GetTemplateListResponse list( new AfterErrorContextImpl( "GetTemplateList", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -129,7 +129,7 @@ public GetTemplateListResponse list( new AfterSuccessContextImpl( "GetTemplateList", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -138,7 +138,7 @@ public GetTemplateListResponse list( new AfterErrorContextImpl( "GetTemplateList", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -243,10 +243,10 @@ public RevertTemplateResponse revert( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -254,7 +254,7 @@ public RevertTemplateResponse revert( new BeforeRequestContextImpl( "RevertTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -265,7 +265,7 @@ public RevertTemplateResponse revert( new AfterErrorContextImpl( "RevertTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -274,7 +274,7 @@ public RevertTemplateResponse revert( new AfterSuccessContextImpl( "RevertTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -283,7 +283,7 @@ public RevertTemplateResponse revert( new AfterErrorContextImpl( "RevertTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -388,10 +388,10 @@ public GetTemplateResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -399,7 +399,7 @@ public GetTemplateResponse get( new BeforeRequestContextImpl( "GetTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -410,7 +410,7 @@ public GetTemplateResponse get( new AfterErrorContextImpl( "GetTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -419,7 +419,7 @@ public GetTemplateResponse get( new AfterSuccessContextImpl( "GetTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -428,7 +428,7 @@ public GetTemplateResponse get( new AfterErrorContextImpl( "GetTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -568,10 +568,10 @@ public ToggleTemplateDeliveryResponse toggleTemplateDelivery( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -579,7 +579,7 @@ public ToggleTemplateDeliveryResponse toggleTemplateDelivery( new BeforeRequestContextImpl( "ToggleTemplateDelivery", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -590,7 +590,7 @@ public ToggleTemplateDeliveryResponse toggleTemplateDelivery( new AfterErrorContextImpl( "ToggleTemplateDelivery", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -599,7 +599,7 @@ public ToggleTemplateDeliveryResponse toggleTemplateDelivery( new AfterSuccessContextImpl( "ToggleTemplateDelivery", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -608,7 +608,7 @@ public ToggleTemplateDeliveryResponse toggleTemplateDelivery( new AfterErrorContextImpl( "ToggleTemplateDelivery", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/InstanceSettings.java b/src/main/java/com/clerk/backend_api/InstanceSettings.java index 41a3943..2663179 100644 --- a/src/main/java/com/clerk/backend_api/InstanceSettings.java +++ b/src/main/java/com/clerk/backend_api/InstanceSettings.java @@ -88,10 +88,10 @@ public UpdateInstanceResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -99,7 +99,7 @@ public UpdateInstanceResponse update( new BeforeRequestContextImpl( "UpdateInstance", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -110,7 +110,7 @@ public UpdateInstanceResponse update( new AfterErrorContextImpl( "UpdateInstance", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -119,7 +119,7 @@ public UpdateInstanceResponse update( new AfterSuccessContextImpl( "UpdateInstance", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -128,7 +128,7 @@ public UpdateInstanceResponse update( new AfterErrorContextImpl( "UpdateInstance", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -220,10 +220,10 @@ public UpdateInstanceRestrictionsResponse updateRestrictions( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -231,7 +231,7 @@ public UpdateInstanceRestrictionsResponse updateRestrictions( new BeforeRequestContextImpl( "UpdateInstanceRestrictions", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -242,7 +242,7 @@ public UpdateInstanceRestrictionsResponse updateRestrictions( new AfterErrorContextImpl( "UpdateInstanceRestrictions", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -251,7 +251,7 @@ public UpdateInstanceRestrictionsResponse updateRestrictions( new AfterSuccessContextImpl( "UpdateInstanceRestrictions", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -260,7 +260,7 @@ public UpdateInstanceRestrictionsResponse updateRestrictions( new AfterErrorContextImpl( "UpdateInstanceRestrictions", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -363,10 +363,10 @@ public UpdateInstanceOrganizationSettingsResponse updateOrganizationSettings( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -374,7 +374,7 @@ public UpdateInstanceOrganizationSettingsResponse updateOrganizationSettings( new BeforeRequestContextImpl( "UpdateInstanceOrganizationSettings", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -385,7 +385,7 @@ public UpdateInstanceOrganizationSettingsResponse updateOrganizationSettings( new AfterErrorContextImpl( "UpdateInstanceOrganizationSettings", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -394,7 +394,7 @@ public UpdateInstanceOrganizationSettingsResponse updateOrganizationSettings( new AfterSuccessContextImpl( "UpdateInstanceOrganizationSettings", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -403,7 +403,7 @@ public UpdateInstanceOrganizationSettingsResponse updateOrganizationSettings( new AfterErrorContextImpl( "UpdateInstanceOrganizationSettings", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/Invitations.java b/src/main/java/com/clerk/backend_api/Invitations.java index 0209a04..0019985 100644 --- a/src/main/java/com/clerk/backend_api/Invitations.java +++ b/src/main/java/com/clerk/backend_api/Invitations.java @@ -98,10 +98,10 @@ public CreateInvitationResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -109,7 +109,7 @@ public CreateInvitationResponse create( new BeforeRequestContextImpl( "CreateInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -120,7 +120,7 @@ public CreateInvitationResponse create( new AfterErrorContextImpl( "CreateInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -129,7 +129,7 @@ public CreateInvitationResponse create( new AfterSuccessContextImpl( "CreateInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -138,7 +138,7 @@ public CreateInvitationResponse create( new AfterErrorContextImpl( "CreateInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -258,10 +258,10 @@ public ListInvitationsResponse list( ListInvitationsRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -269,7 +269,7 @@ public ListInvitationsResponse list( new BeforeRequestContextImpl( "ListInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -280,7 +280,7 @@ public ListInvitationsResponse list( new AfterErrorContextImpl( "ListInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -289,7 +289,7 @@ public ListInvitationsResponse list( new AfterSuccessContextImpl( "ListInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -298,7 +298,7 @@ public ListInvitationsResponse list( new AfterErrorContextImpl( "ListInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -388,10 +388,10 @@ public RevokeInvitationResponse revoke( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -399,7 +399,7 @@ public RevokeInvitationResponse revoke( new BeforeRequestContextImpl( "RevokeInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -410,7 +410,7 @@ public RevokeInvitationResponse revoke( new AfterErrorContextImpl( "RevokeInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -419,7 +419,7 @@ public RevokeInvitationResponse revoke( new AfterSuccessContextImpl( "RevokeInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -428,7 +428,7 @@ public RevokeInvitationResponse revoke( new AfterErrorContextImpl( "RevokeInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/Jwks.java b/src/main/java/com/clerk/backend_api/Jwks.java index 184f9f0..5184b3b 100644 --- a/src/main/java/com/clerk/backend_api/Jwks.java +++ b/src/main/java/com/clerk/backend_api/Jwks.java @@ -59,10 +59,10 @@ public GetJWKSResponse getDirect() throws Exception { _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -70,7 +70,7 @@ public GetJWKSResponse getDirect() throws Exception { new BeforeRequestContextImpl( "GetJWKS", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -81,7 +81,7 @@ public GetJWKSResponse getDirect() throws Exception { new AfterErrorContextImpl( "GetJWKS", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -90,7 +90,7 @@ public GetJWKSResponse getDirect() throws Exception { new AfterSuccessContextImpl( "GetJWKS", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -99,7 +99,7 @@ public GetJWKSResponse getDirect() throws Exception { new AfterErrorContextImpl( "GetJWKS", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/JwtTemplates.java b/src/main/java/com/clerk/backend_api/JwtTemplates.java index 7e5f4d0..aebb1f8 100644 --- a/src/main/java/com/clerk/backend_api/JwtTemplates.java +++ b/src/main/java/com/clerk/backend_api/JwtTemplates.java @@ -79,10 +79,10 @@ public ListJWTTemplatesResponse listDirect() throws Exception { _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -90,7 +90,7 @@ public ListJWTTemplatesResponse listDirect() throws Exception { new BeforeRequestContextImpl( "ListJWTTemplates", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -101,7 +101,7 @@ public ListJWTTemplatesResponse listDirect() throws Exception { new AfterErrorContextImpl( "ListJWTTemplates", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -110,7 +110,7 @@ public ListJWTTemplatesResponse listDirect() throws Exception { new AfterSuccessContextImpl( "ListJWTTemplates", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -119,7 +119,7 @@ public ListJWTTemplatesResponse listDirect() throws Exception { new AfterErrorContextImpl( "ListJWTTemplates", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -208,10 +208,10 @@ public CreateJWTTemplateResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -219,7 +219,7 @@ public CreateJWTTemplateResponse create( new BeforeRequestContextImpl( "CreateJWTTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -230,7 +230,7 @@ public CreateJWTTemplateResponse create( new AfterErrorContextImpl( "CreateJWTTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -239,7 +239,7 @@ public CreateJWTTemplateResponse create( new AfterSuccessContextImpl( "CreateJWTTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -248,7 +248,7 @@ public CreateJWTTemplateResponse create( new AfterErrorContextImpl( "CreateJWTTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -346,10 +346,10 @@ public GetJWTTemplateResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -357,7 +357,7 @@ public GetJWTTemplateResponse get( new BeforeRequestContextImpl( "GetJWTTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -368,7 +368,7 @@ public GetJWTTemplateResponse get( new AfterErrorContextImpl( "GetJWTTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -377,7 +377,7 @@ public GetJWTTemplateResponse get( new AfterSuccessContextImpl( "GetJWTTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -386,7 +386,7 @@ public GetJWTTemplateResponse get( new AfterErrorContextImpl( "GetJWTTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -500,10 +500,10 @@ public UpdateJWTTemplateResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -511,7 +511,7 @@ public UpdateJWTTemplateResponse update( new BeforeRequestContextImpl( "UpdateJWTTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -522,7 +522,7 @@ public UpdateJWTTemplateResponse update( new AfterErrorContextImpl( "UpdateJWTTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -531,7 +531,7 @@ public UpdateJWTTemplateResponse update( new AfterSuccessContextImpl( "UpdateJWTTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -540,7 +540,7 @@ public UpdateJWTTemplateResponse update( new AfterErrorContextImpl( "UpdateJWTTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -636,10 +636,10 @@ public DeleteJWTTemplateResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -647,7 +647,7 @@ public DeleteJWTTemplateResponse delete( new BeforeRequestContextImpl( "DeleteJWTTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -658,7 +658,7 @@ public DeleteJWTTemplateResponse delete( new AfterErrorContextImpl( "DeleteJWTTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -667,7 +667,7 @@ public DeleteJWTTemplateResponse delete( new AfterSuccessContextImpl( "DeleteJWTTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -676,7 +676,7 @@ public DeleteJWTTemplateResponse delete( new AfterErrorContextImpl( "DeleteJWTTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/Miscellaneous.java b/src/main/java/com/clerk/backend_api/Miscellaneous.java index 72210c2..da00f55 100644 --- a/src/main/java/com/clerk/backend_api/Miscellaneous.java +++ b/src/main/java/com/clerk/backend_api/Miscellaneous.java @@ -90,7 +90,7 @@ public GetPublicInterstitialResponse getInterstitial( GetPublicInterstitialRequest.class, request, null)); - + Optional _hookSecuritySource = Optional.empty(); HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -98,7 +98,7 @@ public GetPublicInterstitialResponse getInterstitial( new BeforeRequestContextImpl( "GetPublicInterstitial", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -109,7 +109,7 @@ public GetPublicInterstitialResponse getInterstitial( new AfterErrorContextImpl( "GetPublicInterstitial", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -118,7 +118,7 @@ public GetPublicInterstitialResponse getInterstitial( new AfterSuccessContextImpl( "GetPublicInterstitial", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -127,7 +127,7 @@ public GetPublicInterstitialResponse getInterstitial( new AfterErrorContextImpl( "GetPublicInterstitial", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/OauthApplications.java b/src/main/java/com/clerk/backend_api/OauthApplications.java index a6875a0..0b49154 100644 --- a/src/main/java/com/clerk/backend_api/OauthApplications.java +++ b/src/main/java/com/clerk/backend_api/OauthApplications.java @@ -127,10 +127,10 @@ public ListOAuthApplicationsResponse list( ListOAuthApplicationsRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -138,7 +138,7 @@ public ListOAuthApplicationsResponse list( new BeforeRequestContextImpl( "ListOAuthApplications", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -149,7 +149,7 @@ public ListOAuthApplicationsResponse list( new AfterErrorContextImpl( "ListOAuthApplications", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -158,7 +158,7 @@ public ListOAuthApplicationsResponse list( new AfterSuccessContextImpl( "ListOAuthApplications", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -167,7 +167,7 @@ public ListOAuthApplicationsResponse list( new AfterErrorContextImpl( "ListOAuthApplications", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -274,10 +274,10 @@ public CreateOAuthApplicationResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -285,7 +285,7 @@ public CreateOAuthApplicationResponse create( new BeforeRequestContextImpl( "CreateOAuthApplication", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -296,7 +296,7 @@ public CreateOAuthApplicationResponse create( new AfterErrorContextImpl( "CreateOAuthApplication", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -305,7 +305,7 @@ public CreateOAuthApplicationResponse create( new AfterSuccessContextImpl( "CreateOAuthApplication", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -314,7 +314,7 @@ public CreateOAuthApplicationResponse create( new AfterErrorContextImpl( "CreateOAuthApplication", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -412,10 +412,10 @@ public GetOAuthApplicationResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -423,7 +423,7 @@ public GetOAuthApplicationResponse get( new BeforeRequestContextImpl( "GetOAuthApplication", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -434,7 +434,7 @@ public GetOAuthApplicationResponse get( new AfterErrorContextImpl( "GetOAuthApplication", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -443,7 +443,7 @@ public GetOAuthApplicationResponse get( new AfterSuccessContextImpl( "GetOAuthApplication", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -452,7 +452,7 @@ public GetOAuthApplicationResponse get( new AfterErrorContextImpl( "GetOAuthApplication", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -566,10 +566,10 @@ public UpdateOAuthApplicationResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -577,7 +577,7 @@ public UpdateOAuthApplicationResponse update( new BeforeRequestContextImpl( "UpdateOAuthApplication", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -588,7 +588,7 @@ public UpdateOAuthApplicationResponse update( new AfterErrorContextImpl( "UpdateOAuthApplication", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -597,7 +597,7 @@ public UpdateOAuthApplicationResponse update( new AfterSuccessContextImpl( "UpdateOAuthApplication", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -606,7 +606,7 @@ public UpdateOAuthApplicationResponse update( new AfterErrorContextImpl( "UpdateOAuthApplication", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -706,10 +706,10 @@ public DeleteOAuthApplicationResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -717,7 +717,7 @@ public DeleteOAuthApplicationResponse delete( new BeforeRequestContextImpl( "DeleteOAuthApplication", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -728,7 +728,7 @@ public DeleteOAuthApplicationResponse delete( new AfterErrorContextImpl( "DeleteOAuthApplication", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -737,7 +737,7 @@ public DeleteOAuthApplicationResponse delete( new AfterSuccessContextImpl( "DeleteOAuthApplication", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -746,7 +746,7 @@ public DeleteOAuthApplicationResponse delete( new AfterErrorContextImpl( "DeleteOAuthApplication", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -846,10 +846,10 @@ public RotateOAuthApplicationSecretResponse rotateSecret( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -857,7 +857,7 @@ public RotateOAuthApplicationSecretResponse rotateSecret( new BeforeRequestContextImpl( "RotateOAuthApplicationSecret", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -868,7 +868,7 @@ public RotateOAuthApplicationSecretResponse rotateSecret( new AfterErrorContextImpl( "RotateOAuthApplicationSecret", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -877,7 +877,7 @@ public RotateOAuthApplicationSecretResponse rotateSecret( new AfterSuccessContextImpl( "RotateOAuthApplicationSecret", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -886,7 +886,7 @@ public RotateOAuthApplicationSecretResponse rotateSecret( new AfterErrorContextImpl( "RotateOAuthApplicationSecret", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/OrganizationDomain.java b/src/main/java/com/clerk/backend_api/OrganizationDomain.java index 6db7f89..2078774 100644 --- a/src/main/java/com/clerk/backend_api/OrganizationDomain.java +++ b/src/main/java/com/clerk/backend_api/OrganizationDomain.java @@ -93,10 +93,10 @@ public UpdateOrganizationDomainResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -104,7 +104,7 @@ public UpdateOrganizationDomainResponse update( new BeforeRequestContextImpl( "UpdateOrganizationDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -115,7 +115,7 @@ public UpdateOrganizationDomainResponse update( new AfterErrorContextImpl( "UpdateOrganizationDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -124,7 +124,7 @@ public UpdateOrganizationDomainResponse update( new AfterSuccessContextImpl( "UpdateOrganizationDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -133,7 +133,7 @@ public UpdateOrganizationDomainResponse update( new AfterErrorContextImpl( "UpdateOrganizationDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/OrganizationDomains.java b/src/main/java/com/clerk/backend_api/OrganizationDomains.java index 910002c..10ba9b7 100644 --- a/src/main/java/com/clerk/backend_api/OrganizationDomains.java +++ b/src/main/java/com/clerk/backend_api/OrganizationDomains.java @@ -100,10 +100,10 @@ public CreateOrganizationDomainResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -111,7 +111,7 @@ public CreateOrganizationDomainResponse create( new BeforeRequestContextImpl( "CreateOrganizationDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -122,7 +122,7 @@ public CreateOrganizationDomainResponse create( new AfterErrorContextImpl( "CreateOrganizationDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -131,7 +131,7 @@ public CreateOrganizationDomainResponse create( new AfterSuccessContextImpl( "CreateOrganizationDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -140,7 +140,7 @@ public CreateOrganizationDomainResponse create( new AfterErrorContextImpl( "CreateOrganizationDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -237,10 +237,10 @@ public ListOrganizationDomainsResponse list( ListOrganizationDomainsRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -248,7 +248,7 @@ public ListOrganizationDomainsResponse list( new BeforeRequestContextImpl( "ListOrganizationDomains", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -259,7 +259,7 @@ public ListOrganizationDomainsResponse list( new AfterErrorContextImpl( "ListOrganizationDomains", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -268,7 +268,7 @@ public ListOrganizationDomainsResponse list( new AfterSuccessContextImpl( "ListOrganizationDomains", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -277,7 +277,7 @@ public ListOrganizationDomainsResponse list( new AfterErrorContextImpl( "ListOrganizationDomains", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -378,10 +378,10 @@ public DeleteOrganizationDomainResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -389,7 +389,7 @@ public DeleteOrganizationDomainResponse delete( new BeforeRequestContextImpl( "DeleteOrganizationDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -400,7 +400,7 @@ public DeleteOrganizationDomainResponse delete( new AfterErrorContextImpl( "DeleteOrganizationDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -409,7 +409,7 @@ public DeleteOrganizationDomainResponse delete( new AfterSuccessContextImpl( "DeleteOrganizationDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -418,7 +418,7 @@ public DeleteOrganizationDomainResponse delete( new AfterErrorContextImpl( "DeleteOrganizationDomain", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/OrganizationInvitations.java b/src/main/java/com/clerk/backend_api/OrganizationInvitations.java index b1ff2c3..6bbbbf1 100644 --- a/src/main/java/com/clerk/backend_api/OrganizationInvitations.java +++ b/src/main/java/com/clerk/backend_api/OrganizationInvitations.java @@ -112,10 +112,10 @@ public ListInstanceOrganizationInvitationsResponse getAll( ListInstanceOrganizationInvitationsRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -123,7 +123,7 @@ public ListInstanceOrganizationInvitationsResponse getAll( new BeforeRequestContextImpl( "ListInstanceOrganizationInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -134,7 +134,7 @@ public ListInstanceOrganizationInvitationsResponse getAll( new AfterErrorContextImpl( "ListInstanceOrganizationInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -143,7 +143,7 @@ public ListInstanceOrganizationInvitationsResponse getAll( new AfterSuccessContextImpl( "ListInstanceOrganizationInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -152,7 +152,7 @@ public ListInstanceOrganizationInvitationsResponse getAll( new AfterErrorContextImpl( "ListInstanceOrganizationInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -296,10 +296,10 @@ public CreateOrganizationInvitationResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -307,7 +307,7 @@ public CreateOrganizationInvitationResponse create( new BeforeRequestContextImpl( "CreateOrganizationInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -318,7 +318,7 @@ public CreateOrganizationInvitationResponse create( new AfterErrorContextImpl( "CreateOrganizationInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -327,7 +327,7 @@ public CreateOrganizationInvitationResponse create( new AfterSuccessContextImpl( "CreateOrganizationInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -336,7 +336,7 @@ public CreateOrganizationInvitationResponse create( new AfterErrorContextImpl( "CreateOrganizationInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -478,10 +478,10 @@ public ListOrganizationInvitationsResponse list( ListOrganizationInvitationsRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -489,7 +489,7 @@ public ListOrganizationInvitationsResponse list( new BeforeRequestContextImpl( "ListOrganizationInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -500,7 +500,7 @@ public ListOrganizationInvitationsResponse list( new AfterErrorContextImpl( "ListOrganizationInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -509,7 +509,7 @@ public ListOrganizationInvitationsResponse list( new AfterSuccessContextImpl( "ListOrganizationInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -518,7 +518,7 @@ public ListOrganizationInvitationsResponse list( new AfterErrorContextImpl( "ListOrganizationInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -656,10 +656,10 @@ public CreateOrganizationInvitationBulkResponse bulkCreate( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -667,7 +667,7 @@ public CreateOrganizationInvitationBulkResponse bulkCreate( new BeforeRequestContextImpl( "CreateOrganizationInvitationBulk", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -678,7 +678,7 @@ public CreateOrganizationInvitationBulkResponse bulkCreate( new AfterErrorContextImpl( "CreateOrganizationInvitationBulk", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -687,7 +687,7 @@ public CreateOrganizationInvitationBulkResponse bulkCreate( new AfterSuccessContextImpl( "CreateOrganizationInvitationBulk", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -696,7 +696,7 @@ public CreateOrganizationInvitationBulkResponse bulkCreate( new AfterErrorContextImpl( "CreateOrganizationInvitationBulk", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -841,10 +841,10 @@ public ListPendingOrganizationInvitationsResponse listPending( ListPendingOrganizationInvitationsRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -852,7 +852,7 @@ public ListPendingOrganizationInvitationsResponse listPending( new BeforeRequestContextImpl( "ListPendingOrganizationInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -863,7 +863,7 @@ public ListPendingOrganizationInvitationsResponse listPending( new AfterErrorContextImpl( "ListPendingOrganizationInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -872,7 +872,7 @@ public ListPendingOrganizationInvitationsResponse listPending( new AfterSuccessContextImpl( "ListPendingOrganizationInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -881,7 +881,7 @@ public ListPendingOrganizationInvitationsResponse listPending( new AfterErrorContextImpl( "ListPendingOrganizationInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -982,10 +982,10 @@ public GetOrganizationInvitationResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -993,7 +993,7 @@ public GetOrganizationInvitationResponse get( new BeforeRequestContextImpl( "GetOrganizationInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -1004,7 +1004,7 @@ public GetOrganizationInvitationResponse get( new AfterErrorContextImpl( "GetOrganizationInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -1013,7 +1013,7 @@ public GetOrganizationInvitationResponse get( new AfterSuccessContextImpl( "GetOrganizationInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -1022,7 +1022,7 @@ public GetOrganizationInvitationResponse get( new AfterErrorContextImpl( "GetOrganizationInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1162,10 +1162,10 @@ public RevokeOrganizationInvitationResponse revoke( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -1173,7 +1173,7 @@ public RevokeOrganizationInvitationResponse revoke( new BeforeRequestContextImpl( "RevokeOrganizationInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -1184,7 +1184,7 @@ public RevokeOrganizationInvitationResponse revoke( new AfterErrorContextImpl( "RevokeOrganizationInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -1193,7 +1193,7 @@ public RevokeOrganizationInvitationResponse revoke( new AfterSuccessContextImpl( "RevokeOrganizationInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -1202,7 +1202,7 @@ public RevokeOrganizationInvitationResponse revoke( new AfterErrorContextImpl( "RevokeOrganizationInvitation", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/OrganizationMemberships.java b/src/main/java/com/clerk/backend_api/OrganizationMemberships.java index 3a4fee1..0ff27be 100644 --- a/src/main/java/com/clerk/backend_api/OrganizationMemberships.java +++ b/src/main/java/com/clerk/backend_api/OrganizationMemberships.java @@ -124,10 +124,10 @@ public CreateOrganizationMembershipResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -135,7 +135,7 @@ public CreateOrganizationMembershipResponse create( new BeforeRequestContextImpl( "CreateOrganizationMembership", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -146,7 +146,7 @@ public CreateOrganizationMembershipResponse create( new AfterErrorContextImpl( "CreateOrganizationMembership", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -155,7 +155,7 @@ public CreateOrganizationMembershipResponse create( new AfterSuccessContextImpl( "CreateOrganizationMembership", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -164,7 +164,7 @@ public CreateOrganizationMembershipResponse create( new AfterErrorContextImpl( "CreateOrganizationMembership", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -293,10 +293,10 @@ public ListOrganizationMembershipsResponse list( ListOrganizationMembershipsRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -304,7 +304,7 @@ public ListOrganizationMembershipsResponse list( new BeforeRequestContextImpl( "ListOrganizationMemberships", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -315,7 +315,7 @@ public ListOrganizationMembershipsResponse list( new AfterErrorContextImpl( "ListOrganizationMemberships", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -324,7 +324,7 @@ public ListOrganizationMembershipsResponse list( new AfterSuccessContextImpl( "ListOrganizationMemberships", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -333,7 +333,7 @@ public ListOrganizationMembershipsResponse list( new AfterErrorContextImpl( "ListOrganizationMemberships", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -450,10 +450,10 @@ public UpdateOrganizationMembershipResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -461,7 +461,7 @@ public UpdateOrganizationMembershipResponse update( new BeforeRequestContextImpl( "UpdateOrganizationMembership", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -472,7 +472,7 @@ public UpdateOrganizationMembershipResponse update( new AfterErrorContextImpl( "UpdateOrganizationMembership", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -481,7 +481,7 @@ public UpdateOrganizationMembershipResponse update( new AfterSuccessContextImpl( "UpdateOrganizationMembership", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -490,7 +490,7 @@ public UpdateOrganizationMembershipResponse update( new AfterErrorContextImpl( "UpdateOrganizationMembership", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -591,10 +591,10 @@ public DeleteOrganizationMembershipResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -602,7 +602,7 @@ public DeleteOrganizationMembershipResponse delete( new BeforeRequestContextImpl( "DeleteOrganizationMembership", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -613,7 +613,7 @@ public DeleteOrganizationMembershipResponse delete( new AfterErrorContextImpl( "DeleteOrganizationMembership", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -622,7 +622,7 @@ public DeleteOrganizationMembershipResponse delete( new AfterSuccessContextImpl( "DeleteOrganizationMembership", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -631,7 +631,7 @@ public DeleteOrganizationMembershipResponse delete( new AfterErrorContextImpl( "DeleteOrganizationMembership", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -752,10 +752,10 @@ public UpdateOrganizationMembershipMetadataResponse updateMetadata( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -763,7 +763,7 @@ public UpdateOrganizationMembershipMetadataResponse updateMetadata( new BeforeRequestContextImpl( "UpdateOrganizationMembershipMetadata", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -774,7 +774,7 @@ public UpdateOrganizationMembershipMetadataResponse updateMetadata( new AfterErrorContextImpl( "UpdateOrganizationMembershipMetadata", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -783,7 +783,7 @@ public UpdateOrganizationMembershipMetadataResponse updateMetadata( new AfterSuccessContextImpl( "UpdateOrganizationMembershipMetadata", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -792,7 +792,7 @@ public UpdateOrganizationMembershipMetadataResponse updateMetadata( new AfterErrorContextImpl( "UpdateOrganizationMembershipMetadata", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -914,10 +914,10 @@ public InstanceGetOrganizationMembershipsResponse getAll( InstanceGetOrganizationMembershipsRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -925,7 +925,7 @@ public InstanceGetOrganizationMembershipsResponse getAll( new BeforeRequestContextImpl( "InstanceGetOrganizationMemberships", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -936,7 +936,7 @@ public InstanceGetOrganizationMembershipsResponse getAll( new AfterErrorContextImpl( "InstanceGetOrganizationMemberships", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -945,7 +945,7 @@ public InstanceGetOrganizationMembershipsResponse getAll( new AfterSuccessContextImpl( "InstanceGetOrganizationMemberships", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -954,7 +954,7 @@ public InstanceGetOrganizationMembershipsResponse getAll( new AfterErrorContextImpl( "InstanceGetOrganizationMemberships", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/Organizations.java b/src/main/java/com/clerk/backend_api/Organizations.java index 446f895..e086e9f 100644 --- a/src/main/java/com/clerk/backend_api/Organizations.java +++ b/src/main/java/com/clerk/backend_api/Organizations.java @@ -115,10 +115,10 @@ public ListOrganizationsResponse list( ListOrganizationsRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -126,7 +126,7 @@ public ListOrganizationsResponse list( new BeforeRequestContextImpl( "ListOrganizations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -137,7 +137,7 @@ public ListOrganizationsResponse list( new AfterErrorContextImpl( "ListOrganizations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -146,7 +146,7 @@ public ListOrganizationsResponse list( new AfterSuccessContextImpl( "ListOrganizations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -155,7 +155,7 @@ public ListOrganizationsResponse list( new AfterErrorContextImpl( "ListOrganizations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -278,10 +278,10 @@ public CreateOrganizationResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -289,7 +289,7 @@ public CreateOrganizationResponse create( new BeforeRequestContextImpl( "CreateOrganization", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -300,7 +300,7 @@ public CreateOrganizationResponse create( new AfterErrorContextImpl( "CreateOrganization", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -309,7 +309,7 @@ public CreateOrganizationResponse create( new AfterSuccessContextImpl( "CreateOrganization", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -318,7 +318,7 @@ public CreateOrganizationResponse create( new AfterErrorContextImpl( "CreateOrganization", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -436,10 +436,10 @@ public GetOrganizationResponse get( GetOrganizationRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -447,7 +447,7 @@ public GetOrganizationResponse get( new BeforeRequestContextImpl( "GetOrganization", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -458,7 +458,7 @@ public GetOrganizationResponse get( new AfterErrorContextImpl( "GetOrganization", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -467,7 +467,7 @@ public GetOrganizationResponse get( new AfterSuccessContextImpl( "GetOrganization", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -476,7 +476,7 @@ public GetOrganizationResponse get( new AfterErrorContextImpl( "GetOrganization", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -590,10 +590,10 @@ public UpdateOrganizationResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -601,7 +601,7 @@ public UpdateOrganizationResponse update( new BeforeRequestContextImpl( "UpdateOrganization", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -612,7 +612,7 @@ public UpdateOrganizationResponse update( new AfterErrorContextImpl( "UpdateOrganization", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -621,7 +621,7 @@ public UpdateOrganizationResponse update( new AfterSuccessContextImpl( "UpdateOrganization", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -630,7 +630,7 @@ public UpdateOrganizationResponse update( new AfterErrorContextImpl( "UpdateOrganization", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -732,10 +732,10 @@ public DeleteOrganizationResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -743,7 +743,7 @@ public DeleteOrganizationResponse delete( new BeforeRequestContextImpl( "DeleteOrganization", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -754,7 +754,7 @@ public DeleteOrganizationResponse delete( new AfterErrorContextImpl( "DeleteOrganization", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -763,7 +763,7 @@ public DeleteOrganizationResponse delete( new AfterSuccessContextImpl( "DeleteOrganization", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -772,7 +772,7 @@ public DeleteOrganizationResponse delete( new AfterErrorContextImpl( "DeleteOrganization", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -892,10 +892,10 @@ public MergeOrganizationMetadataResponse mergeMetadata( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -903,7 +903,7 @@ public MergeOrganizationMetadataResponse mergeMetadata( new BeforeRequestContextImpl( "MergeOrganizationMetadata", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -914,7 +914,7 @@ public MergeOrganizationMetadataResponse mergeMetadata( new AfterErrorContextImpl( "MergeOrganizationMetadata", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -923,7 +923,7 @@ public MergeOrganizationMetadataResponse mergeMetadata( new AfterSuccessContextImpl( "MergeOrganizationMetadata", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -932,7 +932,7 @@ public MergeOrganizationMetadataResponse mergeMetadata( new AfterErrorContextImpl( "MergeOrganizationMetadata", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1052,10 +1052,10 @@ public UploadOrganizationLogoResponse uploadLogo( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -1063,7 +1063,7 @@ public UploadOrganizationLogoResponse uploadLogo( new BeforeRequestContextImpl( "UploadOrganizationLogo", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -1074,7 +1074,7 @@ public UploadOrganizationLogoResponse uploadLogo( new AfterErrorContextImpl( "UploadOrganizationLogo", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -1083,7 +1083,7 @@ public UploadOrganizationLogoResponse uploadLogo( new AfterSuccessContextImpl( "UploadOrganizationLogo", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -1092,7 +1092,7 @@ public UploadOrganizationLogoResponse uploadLogo( new AfterErrorContextImpl( "UploadOrganizationLogo", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1188,10 +1188,10 @@ public DeleteOrganizationLogoResponse deleteLogo( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -1199,7 +1199,7 @@ public DeleteOrganizationLogoResponse deleteLogo( new BeforeRequestContextImpl( "DeleteOrganizationLogo", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -1210,7 +1210,7 @@ public DeleteOrganizationLogoResponse deleteLogo( new AfterErrorContextImpl( "DeleteOrganizationLogo", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -1219,7 +1219,7 @@ public DeleteOrganizationLogoResponse deleteLogo( new AfterSuccessContextImpl( "DeleteOrganizationLogo", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -1228,7 +1228,7 @@ public DeleteOrganizationLogoResponse deleteLogo( new AfterErrorContextImpl( "DeleteOrganizationLogo", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/PhoneNumbers.java b/src/main/java/com/clerk/backend_api/PhoneNumbers.java index 0c8130b..77d0543 100644 --- a/src/main/java/com/clerk/backend_api/PhoneNumbers.java +++ b/src/main/java/com/clerk/backend_api/PhoneNumbers.java @@ -93,10 +93,10 @@ public CreatePhoneNumberResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -104,7 +104,7 @@ public CreatePhoneNumberResponse create( new BeforeRequestContextImpl( "CreatePhoneNumber", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -115,7 +115,7 @@ public CreatePhoneNumberResponse create( new AfterErrorContextImpl( "CreatePhoneNumber", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -124,7 +124,7 @@ public CreatePhoneNumberResponse create( new AfterSuccessContextImpl( "CreatePhoneNumber", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -133,7 +133,7 @@ public CreatePhoneNumberResponse create( new AfterErrorContextImpl( "CreatePhoneNumber", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -231,10 +231,10 @@ public GetPhoneNumberResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -242,7 +242,7 @@ public GetPhoneNumberResponse get( new BeforeRequestContextImpl( "GetPhoneNumber", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -253,7 +253,7 @@ public GetPhoneNumberResponse get( new AfterErrorContextImpl( "GetPhoneNumber", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -262,7 +262,7 @@ public GetPhoneNumberResponse get( new AfterSuccessContextImpl( "GetPhoneNumber", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -271,7 +271,7 @@ public GetPhoneNumberResponse get( new AfterErrorContextImpl( "GetPhoneNumber", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -369,10 +369,10 @@ public DeletePhoneNumberResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -380,7 +380,7 @@ public DeletePhoneNumberResponse delete( new BeforeRequestContextImpl( "DeletePhoneNumber", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -391,7 +391,7 @@ public DeletePhoneNumberResponse delete( new AfterErrorContextImpl( "DeletePhoneNumber", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -400,7 +400,7 @@ public DeletePhoneNumberResponse delete( new AfterSuccessContextImpl( "DeletePhoneNumber", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -409,7 +409,7 @@ public DeletePhoneNumberResponse delete( new AfterErrorContextImpl( "DeletePhoneNumber", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -523,10 +523,10 @@ public UpdatePhoneNumberResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -534,7 +534,7 @@ public UpdatePhoneNumberResponse update( new BeforeRequestContextImpl( "UpdatePhoneNumber", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -545,7 +545,7 @@ public UpdatePhoneNumberResponse update( new AfterErrorContextImpl( "UpdatePhoneNumber", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -554,7 +554,7 @@ public UpdatePhoneNumberResponse update( new AfterSuccessContextImpl( "UpdatePhoneNumber", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -563,7 +563,7 @@ public UpdatePhoneNumberResponse update( new AfterErrorContextImpl( "UpdatePhoneNumber", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/ProxyChecks.java b/src/main/java/com/clerk/backend_api/ProxyChecks.java index a799247..4ff8998 100644 --- a/src/main/java/com/clerk/backend_api/ProxyChecks.java +++ b/src/main/java/com/clerk/backend_api/ProxyChecks.java @@ -93,10 +93,10 @@ public VerifyDomainProxyResponse verify( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -104,7 +104,7 @@ public VerifyDomainProxyResponse verify( new BeforeRequestContextImpl( "VerifyDomainProxy", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -115,7 +115,7 @@ public VerifyDomainProxyResponse verify( new AfterErrorContextImpl( "VerifyDomainProxy", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -124,7 +124,7 @@ public VerifyDomainProxyResponse verify( new AfterSuccessContextImpl( "VerifyDomainProxy", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -133,7 +133,7 @@ public VerifyDomainProxyResponse verify( new AfterErrorContextImpl( "VerifyDomainProxy", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/RedirectURLs.java b/src/main/java/com/clerk/backend_api/RedirectURLs.java index f72e71e..082ce99 100644 --- a/src/main/java/com/clerk/backend_api/RedirectURLs.java +++ b/src/main/java/com/clerk/backend_api/RedirectURLs.java @@ -59,10 +59,10 @@ public ListRedirectURLsResponse listDirect() throws Exception { _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -70,7 +70,7 @@ public ListRedirectURLsResponse listDirect() throws Exception { new BeforeRequestContextImpl( "ListRedirectURLs", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -81,7 +81,7 @@ public ListRedirectURLsResponse listDirect() throws Exception { new AfterErrorContextImpl( "ListRedirectURLs", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -90,7 +90,7 @@ public ListRedirectURLsResponse listDirect() throws Exception { new AfterSuccessContextImpl( "ListRedirectURLs", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -99,7 +99,7 @@ public ListRedirectURLsResponse listDirect() throws Exception { new AfterErrorContextImpl( "ListRedirectURLs", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/SDKConfiguration.java b/src/main/java/com/clerk/backend_api/SDKConfiguration.java index bf45fa5..2be1c92 100644 --- a/src/main/java/com/clerk/backend_api/SDKConfiguration.java +++ b/src/main/java/com/clerk/backend_api/SDKConfiguration.java @@ -18,13 +18,19 @@ class SDKConfiguration { public Optional securitySource() { return Optional.ofNullable(securitySource); } + public HTTPClient defaultClient; + public String serverUrl; + + public String resolvedServerUrl() { + return serverUrl; + } public int serverIdx = 0; private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "v1"; - public static final String SDK_VERSION = "1.4.0"; - public static final String GEN_VERSION = "2.466.0"; + public static final String SDK_VERSION = "1.5.0"; + public static final String GEN_VERSION = "2.481.0"; private static final String BASE_PACKAGE = "com.clerk.backend_api"; public static final String USER_AGENT = String.format("speakeasy-sdk/%s %s %s %s %s", @@ -51,7 +57,7 @@ public void setHooks(Hooks hooks) { public void initialize() { SDKHooks.initialize(_hooks); // apply the sdk init hook immediately - SdkInitData data = _hooks.sdkInit(new SdkInitData(serverUrl, defaultClient)); + SdkInitData data = _hooks.sdkInit(new SdkInitData(resolvedServerUrl(), defaultClient)); this.serverUrl = data.baseUrl(); this.defaultClient = data.client(); } diff --git a/src/main/java/com/clerk/backend_api/SamlConnections.java b/src/main/java/com/clerk/backend_api/SamlConnections.java index 3ed3221..ee7f2e9 100644 --- a/src/main/java/com/clerk/backend_api/SamlConnections.java +++ b/src/main/java/com/clerk/backend_api/SamlConnections.java @@ -119,10 +119,10 @@ public ListSAMLConnectionsResponse list( ListSAMLConnectionsRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -130,7 +130,7 @@ public ListSAMLConnectionsResponse list( new BeforeRequestContextImpl( "ListSAMLConnections", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -141,7 +141,7 @@ public ListSAMLConnectionsResponse list( new AfterErrorContextImpl( "ListSAMLConnections", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -150,7 +150,7 @@ public ListSAMLConnectionsResponse list( new AfterSuccessContextImpl( "ListSAMLConnections", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -159,7 +159,7 @@ public ListSAMLConnectionsResponse list( new AfterErrorContextImpl( "ListSAMLConnections", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -262,10 +262,10 @@ public CreateSAMLConnectionResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -273,7 +273,7 @@ public CreateSAMLConnectionResponse create( new BeforeRequestContextImpl( "CreateSAMLConnection", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -284,7 +284,7 @@ public CreateSAMLConnectionResponse create( new AfterErrorContextImpl( "CreateSAMLConnection", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -293,7 +293,7 @@ public CreateSAMLConnectionResponse create( new AfterSuccessContextImpl( "CreateSAMLConnection", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -302,7 +302,7 @@ public CreateSAMLConnectionResponse create( new AfterErrorContextImpl( "CreateSAMLConnection", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -400,10 +400,10 @@ public GetSAMLConnectionResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -411,7 +411,7 @@ public GetSAMLConnectionResponse get( new BeforeRequestContextImpl( "GetSAMLConnection", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -422,7 +422,7 @@ public GetSAMLConnectionResponse get( new AfterErrorContextImpl( "GetSAMLConnection", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -431,7 +431,7 @@ public GetSAMLConnectionResponse get( new AfterSuccessContextImpl( "GetSAMLConnection", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -440,7 +440,7 @@ public GetSAMLConnectionResponse get( new AfterErrorContextImpl( "GetSAMLConnection", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -554,10 +554,10 @@ public UpdateSAMLConnectionResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -565,7 +565,7 @@ public UpdateSAMLConnectionResponse update( new BeforeRequestContextImpl( "UpdateSAMLConnection", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -576,7 +576,7 @@ public UpdateSAMLConnectionResponse update( new AfterErrorContextImpl( "UpdateSAMLConnection", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -585,7 +585,7 @@ public UpdateSAMLConnectionResponse update( new AfterSuccessContextImpl( "UpdateSAMLConnection", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -594,7 +594,7 @@ public UpdateSAMLConnectionResponse update( new AfterErrorContextImpl( "UpdateSAMLConnection", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -692,10 +692,10 @@ public DeleteSAMLConnectionResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -703,7 +703,7 @@ public DeleteSAMLConnectionResponse delete( new BeforeRequestContextImpl( "DeleteSAMLConnection", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -714,7 +714,7 @@ public DeleteSAMLConnectionResponse delete( new AfterErrorContextImpl( "DeleteSAMLConnection", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -723,7 +723,7 @@ public DeleteSAMLConnectionResponse delete( new AfterSuccessContextImpl( "DeleteSAMLConnection", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -732,7 +732,7 @@ public DeleteSAMLConnectionResponse delete( new AfterErrorContextImpl( "DeleteSAMLConnection", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/Sessions.java b/src/main/java/com/clerk/backend_api/Sessions.java index 88423e6..506cc00 100644 --- a/src/main/java/com/clerk/backend_api/Sessions.java +++ b/src/main/java/com/clerk/backend_api/Sessions.java @@ -102,10 +102,10 @@ public GetSessionListResponse list( GetSessionListRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -113,7 +113,7 @@ public GetSessionListResponse list( new BeforeRequestContextImpl( "GetSessionList", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -124,7 +124,7 @@ public GetSessionListResponse list( new AfterErrorContextImpl( "GetSessionList", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -133,7 +133,7 @@ public GetSessionListResponse list( new AfterSuccessContextImpl( "GetSessionList", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -142,7 +142,7 @@ public GetSessionListResponse list( new AfterErrorContextImpl( "GetSessionList", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -240,10 +240,10 @@ public GetSessionResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -251,7 +251,7 @@ public GetSessionResponse get( new BeforeRequestContextImpl( "GetSession", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -262,7 +262,7 @@ public GetSessionResponse get( new AfterErrorContextImpl( "GetSession", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -271,7 +271,7 @@ public GetSessionResponse get( new AfterSuccessContextImpl( "GetSession", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -280,7 +280,7 @@ public GetSessionResponse get( new AfterErrorContextImpl( "GetSession", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -380,10 +380,10 @@ public RevokeSessionResponse revoke( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -391,7 +391,7 @@ public RevokeSessionResponse revoke( new BeforeRequestContextImpl( "RevokeSession", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -402,7 +402,7 @@ public RevokeSessionResponse revoke( new AfterErrorContextImpl( "RevokeSession", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -411,7 +411,7 @@ public RevokeSessionResponse revoke( new AfterSuccessContextImpl( "RevokeSession", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -420,7 +420,7 @@ public RevokeSessionResponse revoke( new AfterErrorContextImpl( "RevokeSession", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -558,10 +558,10 @@ public VerifySessionResponse verify( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -569,7 +569,7 @@ public VerifySessionResponse verify( new BeforeRequestContextImpl( "VerifySession", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -580,7 +580,7 @@ public VerifySessionResponse verify( new AfterErrorContextImpl( "VerifySession", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -589,7 +589,7 @@ public VerifySessionResponse verify( new AfterSuccessContextImpl( "VerifySession", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -598,7 +598,7 @@ public VerifySessionResponse verify( new AfterErrorContextImpl( "VerifySession", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -699,10 +699,10 @@ public CreateSessionTokenFromTemplateResponse createTokenFromTemplate( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -710,7 +710,7 @@ public CreateSessionTokenFromTemplateResponse createTokenFromTemplate( new BeforeRequestContextImpl( "CreateSessionTokenFromTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -721,7 +721,7 @@ public CreateSessionTokenFromTemplateResponse createTokenFromTemplate( new AfterErrorContextImpl( "CreateSessionTokenFromTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -730,7 +730,7 @@ public CreateSessionTokenFromTemplateResponse createTokenFromTemplate( new AfterSuccessContextImpl( "CreateSessionTokenFromTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -739,7 +739,7 @@ public CreateSessionTokenFromTemplateResponse createTokenFromTemplate( new AfterErrorContextImpl( "CreateSessionTokenFromTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/SignInTokens.java b/src/main/java/com/clerk/backend_api/SignInTokens.java index 680606f..954c676 100644 --- a/src/main/java/com/clerk/backend_api/SignInTokens.java +++ b/src/main/java/com/clerk/backend_api/SignInTokens.java @@ -87,10 +87,10 @@ public CreateSignInTokenResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -98,7 +98,7 @@ public CreateSignInTokenResponse create( new BeforeRequestContextImpl( "CreateSignInToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -109,7 +109,7 @@ public CreateSignInTokenResponse create( new AfterErrorContextImpl( "CreateSignInToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -118,7 +118,7 @@ public CreateSignInTokenResponse create( new AfterSuccessContextImpl( "CreateSignInToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -127,7 +127,7 @@ public CreateSignInTokenResponse create( new AfterErrorContextImpl( "CreateSignInToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -225,10 +225,10 @@ public RevokeSignInTokenResponse revoke( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -236,7 +236,7 @@ public RevokeSignInTokenResponse revoke( new BeforeRequestContextImpl( "RevokeSignInToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -247,7 +247,7 @@ public RevokeSignInTokenResponse revoke( new AfterErrorContextImpl( "RevokeSignInToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -256,7 +256,7 @@ public RevokeSignInTokenResponse revoke( new AfterSuccessContextImpl( "RevokeSignInToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -265,7 +265,7 @@ public RevokeSignInTokenResponse revoke( new AfterErrorContextImpl( "RevokeSignInToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/SignUps.java b/src/main/java/com/clerk/backend_api/SignUps.java index 97d92a3..00a1aa5 100644 --- a/src/main/java/com/clerk/backend_api/SignUps.java +++ b/src/main/java/com/clerk/backend_api/SignUps.java @@ -91,10 +91,10 @@ public UpdateSignUpResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -102,7 +102,7 @@ public UpdateSignUpResponse update( new BeforeRequestContextImpl( "UpdateSignUp", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -113,7 +113,7 @@ public UpdateSignUpResponse update( new AfterErrorContextImpl( "UpdateSignUp", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -122,7 +122,7 @@ public UpdateSignUpResponse update( new AfterSuccessContextImpl( "UpdateSignUp", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -131,7 +131,7 @@ public UpdateSignUpResponse update( new AfterErrorContextImpl( "UpdateSignUp", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/Templates.java b/src/main/java/com/clerk/backend_api/Templates.java index aef1501..59d8620 100644 --- a/src/main/java/com/clerk/backend_api/Templates.java +++ b/src/main/java/com/clerk/backend_api/Templates.java @@ -112,10 +112,10 @@ public PreviewTemplateResponse preview( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -123,7 +123,7 @@ public PreviewTemplateResponse preview( new BeforeRequestContextImpl( "PreviewTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -134,7 +134,7 @@ public PreviewTemplateResponse preview( new AfterErrorContextImpl( "PreviewTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -143,7 +143,7 @@ public PreviewTemplateResponse preview( new AfterSuccessContextImpl( "PreviewTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -152,7 +152,7 @@ public PreviewTemplateResponse preview( new AfterErrorContextImpl( "PreviewTemplate", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/TestingTokens.java b/src/main/java/com/clerk/backend_api/TestingTokens.java index 759db73..837170f 100644 --- a/src/main/java/com/clerk/backend_api/TestingTokens.java +++ b/src/main/java/com/clerk/backend_api/TestingTokens.java @@ -59,10 +59,10 @@ public CreateTestingTokenResponse createDirect() throws Exception { _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -70,7 +70,7 @@ public CreateTestingTokenResponse createDirect() throws Exception { new BeforeRequestContextImpl( "CreateTestingToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -81,7 +81,7 @@ public CreateTestingTokenResponse createDirect() throws Exception { new AfterErrorContextImpl( "CreateTestingToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -90,7 +90,7 @@ public CreateTestingTokenResponse createDirect() throws Exception { new AfterSuccessContextImpl( "CreateTestingToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -99,7 +99,7 @@ public CreateTestingTokenResponse createDirect() throws Exception { new AfterErrorContextImpl( "CreateTestingToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/Users.java b/src/main/java/com/clerk/backend_api/Users.java index 23db468..aeaeb65 100644 --- a/src/main/java/com/clerk/backend_api/Users.java +++ b/src/main/java/com/clerk/backend_api/Users.java @@ -191,10 +191,10 @@ public GetUserListResponse list( GetUserListRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -202,7 +202,7 @@ public GetUserListResponse list( new BeforeRequestContextImpl( "GetUserList", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -213,7 +213,7 @@ public GetUserListResponse list( new AfterErrorContextImpl( "GetUserList", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -222,7 +222,7 @@ public GetUserListResponse list( new AfterSuccessContextImpl( "GetUserList", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -231,7 +231,7 @@ public GetUserListResponse list( new AfterErrorContextImpl( "GetUserList", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -346,10 +346,10 @@ public CreateUserResponse create( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -357,7 +357,7 @@ public CreateUserResponse create( new BeforeRequestContextImpl( "CreateUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -368,7 +368,7 @@ public CreateUserResponse create( new AfterErrorContextImpl( "CreateUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -377,7 +377,7 @@ public CreateUserResponse create( new AfterSuccessContextImpl( "CreateUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -386,7 +386,7 @@ public CreateUserResponse create( new AfterErrorContextImpl( "CreateUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -481,10 +481,10 @@ public GetUsersCountResponse count( GetUsersCountRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -492,7 +492,7 @@ public GetUsersCountResponse count( new BeforeRequestContextImpl( "GetUsersCount", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -503,7 +503,7 @@ public GetUsersCountResponse count( new AfterErrorContextImpl( "GetUsersCount", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -512,7 +512,7 @@ public GetUsersCountResponse count( new AfterSuccessContextImpl( "GetUsersCount", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -521,7 +521,7 @@ public GetUsersCountResponse count( new AfterErrorContextImpl( "GetUsersCount", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -619,10 +619,10 @@ public GetUserResponse get( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -630,7 +630,7 @@ public GetUserResponse get( new BeforeRequestContextImpl( "GetUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -641,7 +641,7 @@ public GetUserResponse get( new AfterErrorContextImpl( "GetUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -650,7 +650,7 @@ public GetUserResponse get( new AfterSuccessContextImpl( "GetUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -659,7 +659,7 @@ public GetUserResponse get( new AfterErrorContextImpl( "GetUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -795,10 +795,10 @@ public UpdateUserResponse update( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -806,7 +806,7 @@ public UpdateUserResponse update( new BeforeRequestContextImpl( "UpdateUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -817,7 +817,7 @@ public UpdateUserResponse update( new AfterErrorContextImpl( "UpdateUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -826,7 +826,7 @@ public UpdateUserResponse update( new AfterSuccessContextImpl( "UpdateUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -835,7 +835,7 @@ public UpdateUserResponse update( new AfterErrorContextImpl( "UpdateUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -933,10 +933,10 @@ public DeleteUserResponse delete( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -944,7 +944,7 @@ public DeleteUserResponse delete( new BeforeRequestContextImpl( "DeleteUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -955,7 +955,7 @@ public DeleteUserResponse delete( new AfterErrorContextImpl( "DeleteUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -964,7 +964,7 @@ public DeleteUserResponse delete( new AfterSuccessContextImpl( "DeleteUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -973,7 +973,7 @@ public DeleteUserResponse delete( new AfterErrorContextImpl( "DeleteUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1071,10 +1071,10 @@ public BanUserResponse ban( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -1082,7 +1082,7 @@ public BanUserResponse ban( new BeforeRequestContextImpl( "BanUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -1093,7 +1093,7 @@ public BanUserResponse ban( new AfterErrorContextImpl( "BanUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -1102,7 +1102,7 @@ public BanUserResponse ban( new AfterSuccessContextImpl( "BanUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -1111,7 +1111,7 @@ public BanUserResponse ban( new AfterErrorContextImpl( "BanUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1209,10 +1209,10 @@ public UnbanUserResponse unban( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -1220,7 +1220,7 @@ public UnbanUserResponse unban( new BeforeRequestContextImpl( "UnbanUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -1231,7 +1231,7 @@ public UnbanUserResponse unban( new AfterErrorContextImpl( "UnbanUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -1240,7 +1240,7 @@ public UnbanUserResponse unban( new AfterSuccessContextImpl( "UnbanUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -1249,7 +1249,7 @@ public UnbanUserResponse unban( new AfterErrorContextImpl( "UnbanUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1349,10 +1349,10 @@ public LockUserResponse lock( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -1360,7 +1360,7 @@ public LockUserResponse lock( new BeforeRequestContextImpl( "LockUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -1371,7 +1371,7 @@ public LockUserResponse lock( new AfterErrorContextImpl( "LockUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -1380,7 +1380,7 @@ public LockUserResponse lock( new AfterSuccessContextImpl( "LockUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -1389,7 +1389,7 @@ public LockUserResponse lock( new AfterErrorContextImpl( "LockUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1487,10 +1487,10 @@ public UnlockUserResponse unlock( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -1498,7 +1498,7 @@ public UnlockUserResponse unlock( new BeforeRequestContextImpl( "UnlockUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -1509,7 +1509,7 @@ public UnlockUserResponse unlock( new AfterErrorContextImpl( "UnlockUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -1518,7 +1518,7 @@ public UnlockUserResponse unlock( new AfterSuccessContextImpl( "UnlockUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -1527,7 +1527,7 @@ public UnlockUserResponse unlock( new AfterErrorContextImpl( "UnlockUser", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1641,10 +1641,10 @@ public SetUserProfileImageResponse setProfileImage( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -1652,7 +1652,7 @@ public SetUserProfileImageResponse setProfileImage( new BeforeRequestContextImpl( "SetUserProfileImage", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -1663,7 +1663,7 @@ public SetUserProfileImageResponse setProfileImage( new AfterErrorContextImpl( "SetUserProfileImage", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -1672,7 +1672,7 @@ public SetUserProfileImageResponse setProfileImage( new AfterSuccessContextImpl( "SetUserProfileImage", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -1681,7 +1681,7 @@ public SetUserProfileImageResponse setProfileImage( new AfterErrorContextImpl( "SetUserProfileImage", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1779,10 +1779,10 @@ public DeleteUserProfileImageResponse deleteProfileImage( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -1790,7 +1790,7 @@ public DeleteUserProfileImageResponse deleteProfileImage( new BeforeRequestContextImpl( "DeleteUserProfileImage", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -1801,7 +1801,7 @@ public DeleteUserProfileImageResponse deleteProfileImage( new AfterErrorContextImpl( "DeleteUserProfileImage", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -1810,7 +1810,7 @@ public DeleteUserProfileImageResponse deleteProfileImage( new AfterSuccessContextImpl( "DeleteUserProfileImage", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -1819,7 +1819,7 @@ public DeleteUserProfileImageResponse deleteProfileImage( new AfterErrorContextImpl( "DeleteUserProfileImage", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -1947,10 +1947,10 @@ public UpdateUserMetadataResponse updateMetadata( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -1958,7 +1958,7 @@ public UpdateUserMetadataResponse updateMetadata( new BeforeRequestContextImpl( "UpdateUserMetadata", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -1969,7 +1969,7 @@ public UpdateUserMetadataResponse updateMetadata( new AfterErrorContextImpl( "UpdateUserMetadata", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -1978,7 +1978,7 @@ public UpdateUserMetadataResponse updateMetadata( new AfterSuccessContextImpl( "UpdateUserMetadata", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -1987,7 +1987,7 @@ public UpdateUserMetadataResponse updateMetadata( new AfterErrorContextImpl( "UpdateUserMetadata", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -2090,10 +2090,10 @@ public GetOAuthAccessTokenResponse getOAuthAccessToken( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -2101,7 +2101,7 @@ public GetOAuthAccessTokenResponse getOAuthAccessToken( new BeforeRequestContextImpl( "GetOAuthAccessToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -2112,7 +2112,7 @@ public GetOAuthAccessTokenResponse getOAuthAccessToken( new AfterErrorContextImpl( "GetOAuthAccessToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -2121,7 +2121,7 @@ public GetOAuthAccessTokenResponse getOAuthAccessToken( new AfterSuccessContextImpl( "GetOAuthAccessToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -2130,7 +2130,7 @@ public GetOAuthAccessTokenResponse getOAuthAccessToken( new AfterErrorContextImpl( "GetOAuthAccessToken", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -2254,10 +2254,10 @@ public UsersGetOrganizationMembershipsResponse getOrganizationMemberships( UsersGetOrganizationMembershipsRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -2265,7 +2265,7 @@ public UsersGetOrganizationMembershipsResponse getOrganizationMemberships( new BeforeRequestContextImpl( "UsersGetOrganizationMemberships", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -2276,7 +2276,7 @@ public UsersGetOrganizationMembershipsResponse getOrganizationMemberships( new AfterErrorContextImpl( "UsersGetOrganizationMemberships", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -2285,7 +2285,7 @@ public UsersGetOrganizationMembershipsResponse getOrganizationMemberships( new AfterSuccessContextImpl( "UsersGetOrganizationMemberships", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -2294,7 +2294,7 @@ public UsersGetOrganizationMembershipsResponse getOrganizationMemberships( new AfterErrorContextImpl( "UsersGetOrganizationMemberships", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -2421,10 +2421,10 @@ public UsersGetOrganizationInvitationsResponse getOrganizationInvitations( UsersGetOrganizationInvitationsRequest.class, request, null)); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -2432,7 +2432,7 @@ public UsersGetOrganizationInvitationsResponse getOrganizationInvitations( new BeforeRequestContextImpl( "UsersGetOrganizationInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -2443,7 +2443,7 @@ public UsersGetOrganizationInvitationsResponse getOrganizationInvitations( new AfterErrorContextImpl( "UsersGetOrganizationInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -2452,7 +2452,7 @@ public UsersGetOrganizationInvitationsResponse getOrganizationInvitations( new AfterSuccessContextImpl( "UsersGetOrganizationInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -2461,7 +2461,7 @@ public UsersGetOrganizationInvitationsResponse getOrganizationInvitations( new AfterErrorContextImpl( "UsersGetOrganizationInvitations", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -2577,10 +2577,10 @@ public VerifyPasswordResponse verifyPassword( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -2588,7 +2588,7 @@ public VerifyPasswordResponse verifyPassword( new BeforeRequestContextImpl( "VerifyPassword", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -2599,7 +2599,7 @@ public VerifyPasswordResponse verifyPassword( new AfterErrorContextImpl( "VerifyPassword", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -2608,7 +2608,7 @@ public VerifyPasswordResponse verifyPassword( new AfterSuccessContextImpl( "VerifyPassword", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -2617,7 +2617,7 @@ public VerifyPasswordResponse verifyPassword( new AfterErrorContextImpl( "VerifyPassword", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -2737,10 +2737,10 @@ public VerifyTOTPResponse verifyTOTP( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -2748,7 +2748,7 @@ public VerifyTOTPResponse verifyTOTP( new BeforeRequestContextImpl( "VerifyTOTP", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -2759,7 +2759,7 @@ public VerifyTOTPResponse verifyTOTP( new AfterErrorContextImpl( "VerifyTOTP", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -2768,7 +2768,7 @@ public VerifyTOTPResponse verifyTOTP( new AfterSuccessContextImpl( "VerifyTOTP", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -2777,7 +2777,7 @@ public VerifyTOTPResponse verifyTOTP( new AfterErrorContextImpl( "VerifyTOTP", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -2875,10 +2875,10 @@ public DisableMFAResponse disableMFA( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -2886,7 +2886,7 @@ public DisableMFAResponse disableMFA( new BeforeRequestContextImpl( "DisableMFA", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -2897,7 +2897,7 @@ public DisableMFAResponse disableMFA( new AfterErrorContextImpl( "DisableMFA", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -2906,7 +2906,7 @@ public DisableMFAResponse disableMFA( new AfterSuccessContextImpl( "DisableMFA", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -2915,7 +2915,7 @@ public DisableMFAResponse disableMFA( new AfterErrorContextImpl( "DisableMFA", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -3013,10 +3013,10 @@ public DeleteBackupCodeResponse deleteBackupCodes( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -3024,7 +3024,7 @@ public DeleteBackupCodeResponse deleteBackupCodes( new BeforeRequestContextImpl( "DeleteBackupCode", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -3035,7 +3035,7 @@ public DeleteBackupCodeResponse deleteBackupCodes( new AfterErrorContextImpl( "DeleteBackupCode", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -3044,7 +3044,7 @@ public DeleteBackupCodeResponse deleteBackupCodes( new AfterSuccessContextImpl( "DeleteBackupCode", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -3053,7 +3053,7 @@ public DeleteBackupCodeResponse deleteBackupCodes( new AfterErrorContextImpl( "DeleteBackupCode", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -3154,10 +3154,10 @@ public UserPasskeyDeleteResponse deletePasskey( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -3165,7 +3165,7 @@ public UserPasskeyDeleteResponse deletePasskey( new BeforeRequestContextImpl( "UserPasskeyDelete", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -3176,7 +3176,7 @@ public UserPasskeyDeleteResponse deletePasskey( new AfterErrorContextImpl( "UserPasskeyDelete", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -3185,7 +3185,7 @@ public UserPasskeyDeleteResponse deletePasskey( new AfterSuccessContextImpl( "UserPasskeyDelete", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -3194,7 +3194,7 @@ public UserPasskeyDeleteResponse deletePasskey( new AfterErrorContextImpl( "UserPasskeyDelete", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -3295,10 +3295,10 @@ public UserWeb3WalletDeleteResponse deleteWeb3Wallet( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -3306,7 +3306,7 @@ public UserWeb3WalletDeleteResponse deleteWeb3Wallet( new BeforeRequestContextImpl( "UserWeb3WalletDelete", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -3317,7 +3317,7 @@ public UserWeb3WalletDeleteResponse deleteWeb3Wallet( new AfterErrorContextImpl( "UserWeb3WalletDelete", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -3326,7 +3326,7 @@ public UserWeb3WalletDeleteResponse deleteWeb3Wallet( new AfterSuccessContextImpl( "UserWeb3WalletDelete", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -3335,7 +3335,7 @@ public UserWeb3WalletDeleteResponse deleteWeb3Wallet( new AfterErrorContextImpl( "UserWeb3WalletDelete", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -3435,10 +3435,10 @@ public CreateUserTOTPResponse createTOTP( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -3446,7 +3446,7 @@ public CreateUserTOTPResponse createTOTP( new BeforeRequestContextImpl( "CreateUserTOTP", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -3457,7 +3457,7 @@ public CreateUserTOTPResponse createTOTP( new AfterErrorContextImpl( "CreateUserTOTP", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -3466,7 +3466,7 @@ public CreateUserTOTPResponse createTOTP( new AfterSuccessContextImpl( "CreateUserTOTP", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -3475,7 +3475,7 @@ public CreateUserTOTPResponse createTOTP( new AfterErrorContextImpl( "CreateUserTOTP", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -3573,10 +3573,10 @@ public DeleteTOTPResponse deleteTotp( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -3584,7 +3584,7 @@ public DeleteTOTPResponse deleteTotp( new BeforeRequestContextImpl( "DeleteTOTP", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -3595,7 +3595,7 @@ public DeleteTOTPResponse deleteTotp( new AfterErrorContextImpl( "DeleteTOTP", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -3604,7 +3604,7 @@ public DeleteTOTPResponse deleteTotp( new AfterSuccessContextImpl( "DeleteTOTP", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -3613,7 +3613,7 @@ public DeleteTOTPResponse deleteTotp( new AfterErrorContextImpl( "DeleteTOTP", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -3714,10 +3714,10 @@ public DeleteExternalAccountResponse deleteExternalAccount( _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -3725,7 +3725,7 @@ public DeleteExternalAccountResponse deleteExternalAccount( new BeforeRequestContextImpl( "DeleteExternalAccount", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -3736,7 +3736,7 @@ public DeleteExternalAccountResponse deleteExternalAccount( new AfterErrorContextImpl( "DeleteExternalAccount", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -3745,7 +3745,7 @@ public DeleteExternalAccountResponse deleteExternalAccount( new AfterSuccessContextImpl( "DeleteExternalAccount", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -3754,7 +3754,7 @@ public DeleteExternalAccountResponse deleteExternalAccount( new AfterErrorContextImpl( "DeleteExternalAccount", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/Webhooks.java b/src/main/java/com/clerk/backend_api/Webhooks.java index 470c4be..a908af0 100644 --- a/src/main/java/com/clerk/backend_api/Webhooks.java +++ b/src/main/java/com/clerk/backend_api/Webhooks.java @@ -70,10 +70,10 @@ public CreateSvixAppResponse createSvixAppDirect() throws Exception { _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -81,7 +81,7 @@ public CreateSvixAppResponse createSvixAppDirect() throws Exception { new BeforeRequestContextImpl( "CreateSvixApp", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -92,7 +92,7 @@ public CreateSvixAppResponse createSvixAppDirect() throws Exception { new AfterErrorContextImpl( "CreateSvixApp", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -101,7 +101,7 @@ public CreateSvixAppResponse createSvixAppDirect() throws Exception { new AfterSuccessContextImpl( "CreateSvixApp", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -110,7 +110,7 @@ public CreateSvixAppResponse createSvixAppDirect() throws Exception { new AfterErrorContextImpl( "CreateSvixApp", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -198,10 +198,10 @@ public DeleteSvixAppResponse deleteSvixAppDirect() throws Exception { _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -209,7 +209,7 @@ public DeleteSvixAppResponse deleteSvixAppDirect() throws Exception { new BeforeRequestContextImpl( "DeleteSvixApp", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -220,7 +220,7 @@ public DeleteSvixAppResponse deleteSvixAppDirect() throws Exception { new AfterErrorContextImpl( "DeleteSvixApp", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -229,7 +229,7 @@ public DeleteSvixAppResponse deleteSvixAppDirect() throws Exception { new AfterSuccessContextImpl( "DeleteSvixApp", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -238,7 +238,7 @@ public DeleteSvixAppResponse deleteSvixAppDirect() throws Exception { new AfterErrorContextImpl( "DeleteSvixApp", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } @@ -315,10 +315,10 @@ public GenerateSvixAuthURLResponse generateSvixAuthURLDirect() throws Exception _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); - + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() @@ -326,7 +326,7 @@ public GenerateSvixAuthURLResponse generateSvixAuthURLDirect() throws Exception new BeforeRequestContextImpl( "GenerateSvixAuthURL", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _req.build()); HttpResponse _httpRes; try { @@ -337,7 +337,7 @@ public GenerateSvixAuthURLResponse generateSvixAuthURLDirect() throws Exception new AfterErrorContextImpl( "GenerateSvixAuthURL", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.of(_httpRes), Optional.empty()); } else { @@ -346,7 +346,7 @@ public GenerateSvixAuthURLResponse generateSvixAuthURLDirect() throws Exception new AfterSuccessContextImpl( "GenerateSvixAuthURL", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), _httpRes); } } catch (Exception _e) { @@ -355,7 +355,7 @@ public GenerateSvixAuthURLResponse generateSvixAuthURLDirect() throws Exception new AfterErrorContextImpl( "GenerateSvixAuthURL", Optional.of(List.of()), - sdkConfiguration.securitySource()), + _hookSecuritySource), Optional.empty(), Optional.of(_e)); } diff --git a/src/main/java/com/clerk/backend_api/models/components/ActorTokenObject.java b/src/main/java/com/clerk/backend_api/models/components/ActorTokenObject.java index 95c47fe..3972f7c 100644 --- a/src/main/java/com/clerk/backend_api/models/components/ActorTokenObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/ActorTokenObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum ActorTokenObject { ACTOR_TOKEN("actor_token"); @@ -20,4 +22,13 @@ private ActorTokenObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (ActorTokenObject o: ActorTokenObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/ActorTokenStatus.java b/src/main/java/com/clerk/backend_api/models/components/ActorTokenStatus.java index e85d551..44963c2 100644 --- a/src/main/java/com/clerk/backend_api/models/components/ActorTokenStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/ActorTokenStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum ActorTokenStatus { PENDING("pending"), @@ -22,4 +24,13 @@ private ActorTokenStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (ActorTokenStatus o: ActorTokenStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/AdminVerificationPhoneNumberStatus.java b/src/main/java/com/clerk/backend_api/models/components/AdminVerificationPhoneNumberStatus.java index 3dc1a27..881315a 100644 --- a/src/main/java/com/clerk/backend_api/models/components/AdminVerificationPhoneNumberStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/AdminVerificationPhoneNumberStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum AdminVerificationPhoneNumberStatus { VERIFIED("verified"); @@ -20,4 +22,13 @@ private AdminVerificationPhoneNumberStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (AdminVerificationPhoneNumberStatus o: AdminVerificationPhoneNumberStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/AdminVerificationStatus.java b/src/main/java/com/clerk/backend_api/models/components/AdminVerificationStatus.java index 420337d..6357eb3 100644 --- a/src/main/java/com/clerk/backend_api/models/components/AdminVerificationStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/AdminVerificationStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum AdminVerificationStatus { VERIFIED("verified"); @@ -20,4 +22,13 @@ private AdminVerificationStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (AdminVerificationStatus o: AdminVerificationStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/AdminVerificationStrategy.java b/src/main/java/com/clerk/backend_api/models/components/AdminVerificationStrategy.java index bb14595..c0a3324 100644 --- a/src/main/java/com/clerk/backend_api/models/components/AdminVerificationStrategy.java +++ b/src/main/java/com/clerk/backend_api/models/components/AdminVerificationStrategy.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum AdminVerificationStrategy { ADMIN("admin"); @@ -20,4 +22,13 @@ private AdminVerificationStrategy(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (AdminVerificationStrategy o: AdminVerificationStrategy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/AdminVerificationWeb3WalletStatus.java b/src/main/java/com/clerk/backend_api/models/components/AdminVerificationWeb3WalletStatus.java index 927513d..63baf5b 100644 --- a/src/main/java/com/clerk/backend_api/models/components/AdminVerificationWeb3WalletStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/AdminVerificationWeb3WalletStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum AdminVerificationWeb3WalletStatus { VERIFIED("verified"); @@ -20,4 +22,13 @@ private AdminVerificationWeb3WalletStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (AdminVerificationWeb3WalletStatus o: AdminVerificationWeb3WalletStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/AdminVerificationWeb3WalletStrategy.java b/src/main/java/com/clerk/backend_api/models/components/AdminVerificationWeb3WalletStrategy.java index 6ed9a6c..2f6d76f 100644 --- a/src/main/java/com/clerk/backend_api/models/components/AdminVerificationWeb3WalletStrategy.java +++ b/src/main/java/com/clerk/backend_api/models/components/AdminVerificationWeb3WalletStrategy.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum AdminVerificationWeb3WalletStrategy { ADMIN("admin"); @@ -20,4 +22,13 @@ private AdminVerificationWeb3WalletStrategy(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (AdminVerificationWeb3WalletStrategy o: AdminVerificationWeb3WalletStrategy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/AllowlistIdentifierObject.java b/src/main/java/com/clerk/backend_api/models/components/AllowlistIdentifierObject.java index dd7d5a2..5e0ac62 100644 --- a/src/main/java/com/clerk/backend_api/models/components/AllowlistIdentifierObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/AllowlistIdentifierObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * AllowlistIdentifierObject - String representing the object's type. Objects of the same type share the same value. @@ -24,4 +26,13 @@ private AllowlistIdentifierObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (AllowlistIdentifierObject o: AllowlistIdentifierObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/BlocklistIdentifierIdentifierType.java b/src/main/java/com/clerk/backend_api/models/components/BlocklistIdentifierIdentifierType.java index 73fb941..1d1ccad 100644 --- a/src/main/java/com/clerk/backend_api/models/components/BlocklistIdentifierIdentifierType.java +++ b/src/main/java/com/clerk/backend_api/models/components/BlocklistIdentifierIdentifierType.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum BlocklistIdentifierIdentifierType { EMAIL_ADDRESS("email_address"), @@ -22,4 +24,13 @@ private BlocklistIdentifierIdentifierType(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (BlocklistIdentifierIdentifierType o: BlocklistIdentifierIdentifierType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/BlocklistIdentifierObject.java b/src/main/java/com/clerk/backend_api/models/components/BlocklistIdentifierObject.java index 3eb459e..498a4ea 100644 --- a/src/main/java/com/clerk/backend_api/models/components/BlocklistIdentifierObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/BlocklistIdentifierObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * BlocklistIdentifierObject - String representing the object's type. Objects of the same type share the same value. @@ -24,4 +26,13 @@ private BlocklistIdentifierObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (BlocklistIdentifierObject o: BlocklistIdentifierObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/DomainObject.java b/src/main/java/com/clerk/backend_api/models/components/DomainObject.java index 26df2af..629b656 100644 --- a/src/main/java/com/clerk/backend_api/models/components/DomainObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/DomainObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum DomainObject { DOMAIN("domain"); @@ -20,4 +22,13 @@ private DomainObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (DomainObject o: DomainObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/DomainsEnrollmentModes.java b/src/main/java/com/clerk/backend_api/models/components/DomainsEnrollmentModes.java index 623f9da..2ebaa35 100644 --- a/src/main/java/com/clerk/backend_api/models/components/DomainsEnrollmentModes.java +++ b/src/main/java/com/clerk/backend_api/models/components/DomainsEnrollmentModes.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum DomainsEnrollmentModes { MANUAL_INVITATION("manual_invitation"), @@ -22,4 +24,13 @@ private DomainsEnrollmentModes(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (DomainsEnrollmentModes o: DomainsEnrollmentModes.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/EmailAddressObject.java b/src/main/java/com/clerk/backend_api/models/components/EmailAddressObject.java index 25ec160..b2f90c6 100644 --- a/src/main/java/com/clerk/backend_api/models/components/EmailAddressObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/EmailAddressObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * EmailAddressObject - String representing the object's type. Objects of the same type share the same value. @@ -24,4 +26,13 @@ private EmailAddressObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (EmailAddressObject o: EmailAddressObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/EnrollmentMode.java b/src/main/java/com/clerk/backend_api/models/components/EnrollmentMode.java index 8b4e402..0414cad 100644 --- a/src/main/java/com/clerk/backend_api/models/components/EnrollmentMode.java +++ b/src/main/java/com/clerk/backend_api/models/components/EnrollmentMode.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * EnrollmentMode - Mode of enrollment for the domain @@ -25,4 +27,13 @@ private EnrollmentMode(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (EnrollmentMode o: EnrollmentMode.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/IdentifierType.java b/src/main/java/com/clerk/backend_api/models/components/IdentifierType.java index daecc04..1ba4fb5 100644 --- a/src/main/java/com/clerk/backend_api/models/components/IdentifierType.java +++ b/src/main/java/com/clerk/backend_api/models/components/IdentifierType.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum IdentifierType { EMAIL_ADDRESS("email_address"), @@ -22,4 +24,13 @@ private IdentifierType(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (IdentifierType o: IdentifierType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/InstanceRestrictionsObject.java b/src/main/java/com/clerk/backend_api/models/components/InstanceRestrictionsObject.java index 8476c14..6c30fc8 100644 --- a/src/main/java/com/clerk/backend_api/models/components/InstanceRestrictionsObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/InstanceRestrictionsObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * InstanceRestrictionsObject - String representing the object's type. Objects of the same type share the same value. @@ -23,4 +25,13 @@ private InstanceRestrictionsObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (InstanceRestrictionsObject o: InstanceRestrictionsObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/InstanceSettingsObject.java b/src/main/java/com/clerk/backend_api/models/components/InstanceSettingsObject.java index e074688..e64d36d 100644 --- a/src/main/java/com/clerk/backend_api/models/components/InstanceSettingsObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/InstanceSettingsObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * InstanceSettingsObject - String representing the object's type. Objects of the same type share the same value. @@ -23,4 +25,13 @@ private InstanceSettingsObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (InstanceSettingsObject o: InstanceSettingsObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/InvitationObject.java b/src/main/java/com/clerk/backend_api/models/components/InvitationObject.java index d9a4e03..734628e 100644 --- a/src/main/java/com/clerk/backend_api/models/components/InvitationObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/InvitationObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum InvitationObject { INVITATION("invitation"); @@ -20,4 +22,13 @@ private InvitationObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (InvitationObject o: InvitationObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/InvitationRevokedObject.java b/src/main/java/com/clerk/backend_api/models/components/InvitationRevokedObject.java index 8ab7528..1b3a32b 100644 --- a/src/main/java/com/clerk/backend_api/models/components/InvitationRevokedObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/InvitationRevokedObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum InvitationRevokedObject { INVITATION("invitation"); @@ -20,4 +22,13 @@ private InvitationRevokedObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (InvitationRevokedObject o: InvitationRevokedObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/InvitationRevokedStatus.java b/src/main/java/com/clerk/backend_api/models/components/InvitationRevokedStatus.java index 4de07a0..a821c00 100644 --- a/src/main/java/com/clerk/backend_api/models/components/InvitationRevokedStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/InvitationRevokedStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum InvitationRevokedStatus { REVOKED("revoked"); @@ -20,4 +22,13 @@ private InvitationRevokedStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (InvitationRevokedStatus o: InvitationRevokedStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/InvitationStatus.java b/src/main/java/com/clerk/backend_api/models/components/InvitationStatus.java index 6fbde96..31c67e6 100644 --- a/src/main/java/com/clerk/backend_api/models/components/InvitationStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/InvitationStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum InvitationStatus { PENDING("pending"), @@ -23,4 +25,13 @@ private InvitationStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (InvitationStatus o: InvitationStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/JWTTemplateObject.java b/src/main/java/com/clerk/backend_api/models/components/JWTTemplateObject.java index 968a03a..5f1cc50 100644 --- a/src/main/java/com/clerk/backend_api/models/components/JWTTemplateObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/JWTTemplateObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum JWTTemplateObject { JWT_TEMPLATE("jwt_template"); @@ -20,4 +22,13 @@ private JWTTemplateObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (JWTTemplateObject o: JWTTemplateObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/Nonce.java b/src/main/java/com/clerk/backend_api/models/components/Nonce.java index e6911c7..2c57768 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Nonce.java +++ b/src/main/java/com/clerk/backend_api/models/components/Nonce.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum Nonce { NONCE("nonce"); @@ -20,4 +22,13 @@ private Nonce(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (Nonce o: Nonce.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OAuthApplicationObject.java b/src/main/java/com/clerk/backend_api/models/components/OAuthApplicationObject.java index 2b46468..a864313 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OAuthApplicationObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/OAuthApplicationObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum OAuthApplicationObject { OAUTH_APPLICATION("oauth_application"); @@ -20,4 +22,13 @@ private OAuthApplicationObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (OAuthApplicationObject o: OAuthApplicationObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OAuthApplicationWithSecretObject.java b/src/main/java/com/clerk/backend_api/models/components/OAuthApplicationWithSecretObject.java index 780b585..0d1a1c6 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OAuthApplicationWithSecretObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/OAuthApplicationWithSecretObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum OAuthApplicationWithSecretObject { OAUTH_APPLICATION("oauth_application"); @@ -20,4 +22,13 @@ private OAuthApplicationWithSecretObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (OAuthApplicationWithSecretObject o: OAuthApplicationWithSecretObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OTPVerificationStatus.java b/src/main/java/com/clerk/backend_api/models/components/OTPVerificationStatus.java index 0b1e6b1..173707d 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OTPVerificationStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/OTPVerificationStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum OTPVerificationStatus { UNVERIFIED("unverified"), @@ -23,4 +25,13 @@ private OTPVerificationStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (OTPVerificationStatus o: OTPVerificationStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OTPVerificationStrategy.java b/src/main/java/com/clerk/backend_api/models/components/OTPVerificationStrategy.java index 4cdba65..13a8e22 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OTPVerificationStrategy.java +++ b/src/main/java/com/clerk/backend_api/models/components/OTPVerificationStrategy.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum OTPVerificationStrategy { PHONE_CODE("phone_code"), @@ -25,4 +27,13 @@ private OTPVerificationStrategy(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (OTPVerificationStrategy o: OTPVerificationStrategy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OauthVerificationStatus.java b/src/main/java/com/clerk/backend_api/models/components/OauthVerificationStatus.java index d22df5c..e8137dd 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OauthVerificationStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/OauthVerificationStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum OauthVerificationStatus { UNVERIFIED("unverified"), @@ -24,4 +26,13 @@ private OauthVerificationStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (OauthVerificationStatus o: OauthVerificationStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OauthVerificationStrategy.java b/src/main/java/com/clerk/backend_api/models/components/OauthVerificationStrategy.java index acb3845..02130de 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OauthVerificationStrategy.java +++ b/src/main/java/com/clerk/backend_api/models/components/OauthVerificationStrategy.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum OauthVerificationStrategy { OAUTH_GOOGLE("oauth_google"), @@ -24,4 +26,13 @@ private OauthVerificationStrategy(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (OauthVerificationStrategy o: OauthVerificationStrategy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/Object.java b/src/main/java/com/clerk/backend_api/models/components/Object.java index a17fc22..d779bce 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Object.java +++ b/src/main/java/com/clerk/backend_api/models/components/Object.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * Object - String representing the object's type. Objects of the same type share the same value. @@ -24,4 +26,13 @@ private Object(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (Object o: Object.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationDomainObject.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationDomainObject.java index b4ea04b..11b3966 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationDomainObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/OrganizationDomainObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * OrganizationDomainObject - String representing the object's type. Objects of the same type share the same value. Always `organization_domain` @@ -24,4 +26,13 @@ private OrganizationDomainObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (OrganizationDomainObject o: OrganizationDomainObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationDomainStatus.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationDomainStatus.java index c133627..0030947 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationDomainStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/OrganizationDomainStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * OrganizationDomainStatus - Status of the verification. It can be `unverified` or `verified` @@ -24,4 +26,13 @@ private OrganizationDomainStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (OrganizationDomainStatus o: OrganizationDomainStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationObject.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationObject.java index 9eb15a1..c7b2f62 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * OrganizationInvitationObject - String representing the object's type. Objects of the same type share the same value. @@ -24,4 +26,13 @@ private OrganizationInvitationObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (OrganizationInvitationObject o: OrganizationInvitationObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationDataObject.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationDataObject.java index 13181e8..f5caa6b 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationDataObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationDataObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * OrganizationInvitationWithPublicOrganizationDataObject - String representing the object's type. Objects of the same type share the same value. @@ -24,4 +26,13 @@ private OrganizationInvitationWithPublicOrganizationDataObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (OrganizationInvitationWithPublicOrganizationDataObject o: OrganizationInvitationWithPublicOrganizationDataObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipObject.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipObject.java index 96e6120..8ed0bdc 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * OrganizationMembershipObject - String representing the object's type. Objects of the same type share the same value. @@ -24,4 +26,13 @@ private OrganizationMembershipObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (OrganizationMembershipObject o: OrganizationMembershipObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganizationObject.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganizationObject.java index f5ff308..61d0324 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganizationObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganizationObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum OrganizationMembershipOrganizationObject { ORGANIZATION("organization"); @@ -20,4 +22,13 @@ private OrganizationMembershipOrganizationObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (OrganizationMembershipOrganizationObject o: OrganizationMembershipOrganizationObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationObject.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationObject.java index 6175c92..9c7a272 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/OrganizationObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum OrganizationObject { ORGANIZATION("organization"); @@ -20,4 +22,13 @@ private OrganizationObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (OrganizationObject o: OrganizationObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationSettingsObject.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationSettingsObject.java index c2cb78f..2d62711 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationSettingsObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/OrganizationSettingsObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * OrganizationSettingsObject - String representing the object's type. Objects of the same type share the same value. @@ -23,4 +25,13 @@ private OrganizationSettingsObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (OrganizationSettingsObject o: OrganizationSettingsObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogoObject.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogoObject.java index 6f5fd97..7434ebb 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogoObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogoObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum OrganizationWithLogoObject { ORGANIZATION("organization"); @@ -20,4 +22,13 @@ private OrganizationWithLogoObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (OrganizationWithLogoObject o: OrganizationWithLogoObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/PasskeyVerificationStatus.java b/src/main/java/com/clerk/backend_api/models/components/PasskeyVerificationStatus.java index dd9717d..54be714 100644 --- a/src/main/java/com/clerk/backend_api/models/components/PasskeyVerificationStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/PasskeyVerificationStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum PasskeyVerificationStatus { VERIFIED("verified"); @@ -20,4 +22,13 @@ private PasskeyVerificationStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (PasskeyVerificationStatus o: PasskeyVerificationStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/PasskeyVerificationStrategy.java b/src/main/java/com/clerk/backend_api/models/components/PasskeyVerificationStrategy.java index 3fc1d04..dcaacda 100644 --- a/src/main/java/com/clerk/backend_api/models/components/PasskeyVerificationStrategy.java +++ b/src/main/java/com/clerk/backend_api/models/components/PasskeyVerificationStrategy.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum PasskeyVerificationStrategy { PASSKEY("passkey"); @@ -20,4 +22,13 @@ private PasskeyVerificationStrategy(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (PasskeyVerificationStrategy o: PasskeyVerificationStrategy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/PhoneNumberObject.java b/src/main/java/com/clerk/backend_api/models/components/PhoneNumberObject.java index a26feab..7d3f84f 100644 --- a/src/main/java/com/clerk/backend_api/models/components/PhoneNumberObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/PhoneNumberObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * PhoneNumberObject - String representing the object's type. Objects of the same type share the same value. @@ -24,4 +26,13 @@ private PhoneNumberObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (PhoneNumberObject o: PhoneNumberObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/ProxyCheckObject.java b/src/main/java/com/clerk/backend_api/models/components/ProxyCheckObject.java index 86fce17..62d19a1 100644 --- a/src/main/java/com/clerk/backend_api/models/components/ProxyCheckObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/ProxyCheckObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum ProxyCheckObject { PROXY_CHECK("proxy_check"); @@ -20,4 +22,13 @@ private ProxyCheckObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (ProxyCheckObject o: ProxyCheckObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/RedirectURLObject.java b/src/main/java/com/clerk/backend_api/models/components/RedirectURLObject.java index e3d5644..813ec19 100644 --- a/src/main/java/com/clerk/backend_api/models/components/RedirectURLObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/RedirectURLObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum RedirectURLObject { REDIRECT_URL("redirect_url"); @@ -20,4 +22,13 @@ private RedirectURLObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (RedirectURLObject o: RedirectURLObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/SAMLAccountObject.java b/src/main/java/com/clerk/backend_api/models/components/SAMLAccountObject.java index bcfb6ae..91e01b3 100644 --- a/src/main/java/com/clerk/backend_api/models/components/SAMLAccountObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/SAMLAccountObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * SAMLAccountObject - String representing the object's type. Objects of the same type share the same value. @@ -24,4 +26,13 @@ private SAMLAccountObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (SAMLAccountObject o: SAMLAccountObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/SAMLVerificationStatus.java b/src/main/java/com/clerk/backend_api/models/components/SAMLVerificationStatus.java index 8bd682f..5e19872 100644 --- a/src/main/java/com/clerk/backend_api/models/components/SAMLVerificationStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/SAMLVerificationStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum SAMLVerificationStatus { UNVERIFIED("unverified"), @@ -24,4 +26,13 @@ private SAMLVerificationStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (SAMLVerificationStatus o: SAMLVerificationStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/SAMLVerificationStrategy.java b/src/main/java/com/clerk/backend_api/models/components/SAMLVerificationStrategy.java index c95c579..fcaf08f 100644 --- a/src/main/java/com/clerk/backend_api/models/components/SAMLVerificationStrategy.java +++ b/src/main/java/com/clerk/backend_api/models/components/SAMLVerificationStrategy.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum SAMLVerificationStrategy { SAML("saml"); @@ -20,4 +22,13 @@ private SAMLVerificationStrategy(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (SAMLVerificationStrategy o: SAMLVerificationStrategy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasPasskeyObject.java b/src/main/java/com/clerk/backend_api/models/components/SchemasPasskeyObject.java index b7d198b..b9495f4 100644 --- a/src/main/java/com/clerk/backend_api/models/components/SchemasPasskeyObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasPasskeyObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * SchemasPasskeyObject - String representing the object's type. Objects of the same type share the same value. @@ -24,4 +26,13 @@ private SchemasPasskeyObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (SchemasPasskeyObject o: SchemasPasskeyObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasSAMLConnectionObject.java b/src/main/java/com/clerk/backend_api/models/components/SchemasSAMLConnectionObject.java index c7ed23d..b5174bc 100644 --- a/src/main/java/com/clerk/backend_api/models/components/SchemasSAMLConnectionObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasSAMLConnectionObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum SchemasSAMLConnectionObject { SAML_CONNECTION("saml_connection"); @@ -20,4 +22,13 @@ private SchemasSAMLConnectionObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (SchemasSAMLConnectionObject o: SchemasSAMLConnectionObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/SessionObject.java b/src/main/java/com/clerk/backend_api/models/components/SessionObject.java index 94f3908..f085961 100644 --- a/src/main/java/com/clerk/backend_api/models/components/SessionObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/SessionObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * SessionObject - String representing the object's type. Objects of the same type share the same value. @@ -24,4 +26,13 @@ private SessionObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (SessionObject o: SessionObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/SignInTokenObject.java b/src/main/java/com/clerk/backend_api/models/components/SignInTokenObject.java index f7808f7..a27810f 100644 --- a/src/main/java/com/clerk/backend_api/models/components/SignInTokenObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/SignInTokenObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum SignInTokenObject { SIGN_IN_TOKEN("sign_in_token"); @@ -20,4 +22,13 @@ private SignInTokenObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (SignInTokenObject o: SignInTokenObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/SignInTokenStatus.java b/src/main/java/com/clerk/backend_api/models/components/SignInTokenStatus.java index 87fefdc..0b1afbf 100644 --- a/src/main/java/com/clerk/backend_api/models/components/SignInTokenStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/SignInTokenStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum SignInTokenStatus { PENDING("pending"), @@ -22,4 +24,13 @@ private SignInTokenStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (SignInTokenStatus o: SignInTokenStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/SignUpObject.java b/src/main/java/com/clerk/backend_api/models/components/SignUpObject.java index 5e5cb85..1ea0b31 100644 --- a/src/main/java/com/clerk/backend_api/models/components/SignUpObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/SignUpObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum SignUpObject { SIGN_UP_ATTEMPT("sign_up_attempt"); @@ -20,4 +22,13 @@ private SignUpObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (SignUpObject o: SignUpObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/SignUpStatus.java b/src/main/java/com/clerk/backend_api/models/components/SignUpStatus.java index 612eace..9a38c0d 100644 --- a/src/main/java/com/clerk/backend_api/models/components/SignUpStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/SignUpStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum SignUpStatus { MISSING_REQUIREMENTS("missing_requirements"), @@ -22,4 +24,13 @@ private SignUpStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (SignUpStatus o: SignUpStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/Status.java b/src/main/java/com/clerk/backend_api/models/components/Status.java index 4057976..27401b4 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Status.java +++ b/src/main/java/com/clerk/backend_api/models/components/Status.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum Status { ACTIVE("active"), @@ -26,4 +28,13 @@ private Status(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (Status o: Status.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/Strategy.java b/src/main/java/com/clerk/backend_api/models/components/Strategy.java index 2bdafe8..b5891e2 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Strategy.java +++ b/src/main/java/com/clerk/backend_api/models/components/Strategy.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum Strategy { PHONE_CODE("phone_code"), @@ -25,4 +27,13 @@ private Strategy(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (Strategy o: Strategy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/TemplateObject.java b/src/main/java/com/clerk/backend_api/models/components/TemplateObject.java index bb8c800..036361b 100644 --- a/src/main/java/com/clerk/backend_api/models/components/TemplateObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/TemplateObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * TemplateObject - String representing the object's type. Objects of the same type share the same value. @@ -24,4 +26,13 @@ private TemplateObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (TemplateObject o: TemplateObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/TestingTokenObject.java b/src/main/java/com/clerk/backend_api/models/components/TestingTokenObject.java index c8def95..73f4c30 100644 --- a/src/main/java/com/clerk/backend_api/models/components/TestingTokenObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/TestingTokenObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum TestingTokenObject { TESTING_TOKEN("testing_token"); @@ -20,4 +22,13 @@ private TestingTokenObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (TestingTokenObject o: TestingTokenObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/TicketVerificationStatus.java b/src/main/java/com/clerk/backend_api/models/components/TicketVerificationStatus.java index a6a6948..7354580 100644 --- a/src/main/java/com/clerk/backend_api/models/components/TicketVerificationStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/TicketVerificationStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum TicketVerificationStatus { UNVERIFIED("unverified"), @@ -22,4 +24,13 @@ private TicketVerificationStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (TicketVerificationStatus o: TicketVerificationStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/TicketVerificationStrategy.java b/src/main/java/com/clerk/backend_api/models/components/TicketVerificationStrategy.java index 0c3be9e..14edace 100644 --- a/src/main/java/com/clerk/backend_api/models/components/TicketVerificationStrategy.java +++ b/src/main/java/com/clerk/backend_api/models/components/TicketVerificationStrategy.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum TicketVerificationStrategy { TICKET("ticket"), @@ -21,4 +23,13 @@ private TicketVerificationStrategy(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (TicketVerificationStrategy o: TicketVerificationStrategy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/TotalCountObject.java b/src/main/java/com/clerk/backend_api/models/components/TotalCountObject.java index ee066d8..40dc542 100644 --- a/src/main/java/com/clerk/backend_api/models/components/TotalCountObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/TotalCountObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * TotalCountObject - String representing the object's type. Objects of the same type share the same value. @@ -24,4 +26,13 @@ private TotalCountObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (TotalCountObject o: TotalCountObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/Type.java b/src/main/java/com/clerk/backend_api/models/components/Type.java index c4056de..a4fca95 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Type.java +++ b/src/main/java/com/clerk/backend_api/models/components/Type.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum Type { OAUTH_GOOGLE("oauth_google"), @@ -26,4 +28,13 @@ private Type(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (Type o: Type.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/UserObject.java b/src/main/java/com/clerk/backend_api/models/components/UserObject.java index 5263c5f..c518f1a 100644 --- a/src/main/java/com/clerk/backend_api/models/components/UserObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/UserObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * UserObject - String representing the object's type. Objects of the same type share the same value. @@ -24,4 +26,13 @@ private UserObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (UserObject o: UserObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/VerificationStatus.java b/src/main/java/com/clerk/backend_api/models/components/VerificationStatus.java index a83458b..1c373a6 100644 --- a/src/main/java/com/clerk/backend_api/models/components/VerificationStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/VerificationStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum VerificationStatus { UNVERIFIED("unverified"), @@ -23,4 +25,13 @@ private VerificationStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (VerificationStatus o: VerificationStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/VerificationStrategy.java b/src/main/java/com/clerk/backend_api/models/components/VerificationStrategy.java index 6459d4b..5665068 100644 --- a/src/main/java/com/clerk/backend_api/models/components/VerificationStrategy.java +++ b/src/main/java/com/clerk/backend_api/models/components/VerificationStrategy.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum VerificationStrategy { ADMIN("admin"); @@ -20,4 +22,13 @@ private VerificationStrategy(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (VerificationStrategy o: VerificationStrategy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/Web3SignatureVerificationStatus.java b/src/main/java/com/clerk/backend_api/models/components/Web3SignatureVerificationStatus.java index b1c8e94..4a36311 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Web3SignatureVerificationStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/Web3SignatureVerificationStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum Web3SignatureVerificationStatus { UNVERIFIED("unverified"), @@ -23,4 +25,13 @@ private Web3SignatureVerificationStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (Web3SignatureVerificationStatus o: Web3SignatureVerificationStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/Web3SignatureVerificationStrategy.java b/src/main/java/com/clerk/backend_api/models/components/Web3SignatureVerificationStrategy.java index e1f88b1..5e43980 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Web3SignatureVerificationStrategy.java +++ b/src/main/java/com/clerk/backend_api/models/components/Web3SignatureVerificationStrategy.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum Web3SignatureVerificationStrategy { WEB3_METAMASK_SIGNATURE("web3_metamask_signature"), @@ -21,4 +23,13 @@ private Web3SignatureVerificationStrategy(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (Web3SignatureVerificationStrategy o: Web3SignatureVerificationStrategy.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/components/Web3WalletObject.java b/src/main/java/com/clerk/backend_api/models/components/Web3WalletObject.java index f0334f9..35324c0 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Web3WalletObject.java +++ b/src/main/java/com/clerk/backend_api/models/components/Web3WalletObject.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * Web3WalletObject - String representing the object's type. Objects of the same type share the same value. @@ -24,4 +26,13 @@ private Web3WalletObject(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (Web3WalletObject o: Web3WalletObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/CodeType.java b/src/main/java/com/clerk/backend_api/models/operations/CodeType.java index 03e2e67..bfd465b 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CodeType.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CodeType.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum CodeType { TOTP("totp"), @@ -21,4 +23,13 @@ private CodeType(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (CodeType o: CodeType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/File.java b/src/main/java/com/clerk/backend_api/models/operations/File.java index 5fe2edb..7386d60 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/File.java +++ b/src/main/java/com/clerk/backend_api/models/operations/File.java @@ -16,7 +16,7 @@ public class File { - @SpeakeasyMetadata("multipartForm:name=file") + @SpeakeasyMetadata("multipartForm:name=fileName") private String fileName; @SpeakeasyMetadata("multipartForm:content") diff --git a/src/main/java/com/clerk/backend_api/models/operations/ListInstanceOrganizationInvitationsQueryParamStatus.java b/src/main/java/com/clerk/backend_api/models/operations/ListInstanceOrganizationInvitationsQueryParamStatus.java index becf744..8ebe621 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/ListInstanceOrganizationInvitationsQueryParamStatus.java +++ b/src/main/java/com/clerk/backend_api/models/operations/ListInstanceOrganizationInvitationsQueryParamStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * ListInstanceOrganizationInvitationsQueryParamStatus - Filter organization invitations based on their status @@ -25,4 +27,13 @@ private ListInstanceOrganizationInvitationsQueryParamStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (ListInstanceOrganizationInvitationsQueryParamStatus o: ListInstanceOrganizationInvitationsQueryParamStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/ListInvitationsQueryParamStatus.java b/src/main/java/com/clerk/backend_api/models/operations/ListInvitationsQueryParamStatus.java index 93ca2bd..7e02969 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/ListInvitationsQueryParamStatus.java +++ b/src/main/java/com/clerk/backend_api/models/operations/ListInvitationsQueryParamStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * ListInvitationsQueryParamStatus - Filter invitations based on their status @@ -26,4 +28,13 @@ private ListInvitationsQueryParamStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (ListInvitationsQueryParamStatus o: ListInvitationsQueryParamStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/ListOrganizationInvitationsQueryParamStatus.java b/src/main/java/com/clerk/backend_api/models/operations/ListOrganizationInvitationsQueryParamStatus.java index d6196b9..de0ae40 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/ListOrganizationInvitationsQueryParamStatus.java +++ b/src/main/java/com/clerk/backend_api/models/operations/ListOrganizationInvitationsQueryParamStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * ListOrganizationInvitationsQueryParamStatus - Filter organization invitations based on their status @@ -25,4 +27,13 @@ private ListOrganizationInvitationsQueryParamStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (ListOrganizationInvitationsQueryParamStatus o: ListOrganizationInvitationsQueryParamStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/Object.java b/src/main/java/com/clerk/backend_api/models/operations/Object.java index 8577f14..49c7a81 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/Object.java +++ b/src/main/java/com/clerk/backend_api/models/operations/Object.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; public enum Object { TOKEN("token"); @@ -20,4 +22,13 @@ private Object(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (Object o: Object.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/PathParamTemplateType.java b/src/main/java/com/clerk/backend_api/models/operations/PathParamTemplateType.java index 2f4ac54..72450b4 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/PathParamTemplateType.java +++ b/src/main/java/com/clerk/backend_api/models/operations/PathParamTemplateType.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * PathParamTemplateType - The type of templates to retrieve (email or SMS) @@ -24,4 +26,13 @@ private PathParamTemplateType(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (PathParamTemplateType o: PathParamTemplateType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/Provider.java b/src/main/java/com/clerk/backend_api/models/operations/Provider.java index 4d766fc..0b77d04 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/Provider.java +++ b/src/main/java/com/clerk/backend_api/models/operations/Provider.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * Provider - The IdP provider of the connection. @@ -26,4 +28,13 @@ private Provider(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (Provider o: Provider.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/QueryParamStatus.java b/src/main/java/com/clerk/backend_api/models/operations/QueryParamStatus.java index 5c8b275..5d5fd0d 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/QueryParamStatus.java +++ b/src/main/java/com/clerk/backend_api/models/operations/QueryParamStatus.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * QueryParamStatus - Filter organization invitations based on their status @@ -25,4 +27,13 @@ private QueryParamStatus(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (QueryParamStatus o: QueryParamStatus.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/RevertTemplatePathParamTemplateType.java b/src/main/java/com/clerk/backend_api/models/operations/RevertTemplatePathParamTemplateType.java index 318cdd9..96786d4 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/RevertTemplatePathParamTemplateType.java +++ b/src/main/java/com/clerk/backend_api/models/operations/RevertTemplatePathParamTemplateType.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * RevertTemplatePathParamTemplateType - The type of template to revert @@ -24,4 +26,13 @@ private RevertTemplatePathParamTemplateType(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (RevertTemplatePathParamTemplateType o: RevertTemplatePathParamTemplateType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/SetUserProfileImageRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/SetUserProfileImageRequestBody.java index 9b84c0e..ccb4ac3 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/SetUserProfileImageRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/SetUserProfileImageRequestBody.java @@ -18,7 +18,7 @@ public class SetUserProfileImageRequestBody { - @SpeakeasyMetadata("multipartForm:file") + @SpeakeasyMetadata("multipartForm:file,name=file") private Optional file; @JsonCreator diff --git a/src/main/java/com/clerk/backend_api/models/operations/Status.java b/src/main/java/com/clerk/backend_api/models/operations/Status.java index 1aa494c..a8f680f 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/Status.java +++ b/src/main/java/com/clerk/backend_api/models/operations/Status.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * Status - Filter sessions by the provided status @@ -29,4 +31,13 @@ private Status(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (Status o: Status.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/TemplateType.java b/src/main/java/com/clerk/backend_api/models/operations/TemplateType.java index 82b49c1..7057c1d 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/TemplateType.java +++ b/src/main/java/com/clerk/backend_api/models/operations/TemplateType.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * TemplateType - The type of templates to list (email or SMS) @@ -24,4 +26,13 @@ private TemplateType(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (TemplateType o: TemplateType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/ToggleTemplateDeliveryPathParamTemplateType.java b/src/main/java/com/clerk/backend_api/models/operations/ToggleTemplateDeliveryPathParamTemplateType.java index 2a586b9..818cfc0 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/ToggleTemplateDeliveryPathParamTemplateType.java +++ b/src/main/java/com/clerk/backend_api/models/operations/ToggleTemplateDeliveryPathParamTemplateType.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * ToggleTemplateDeliveryPathParamTemplateType - The type of template to toggle delivery for @@ -24,4 +26,13 @@ private ToggleTemplateDeliveryPathParamTemplateType(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (ToggleTemplateDeliveryPathParamTemplateType o: ToggleTemplateDeliveryPathParamTemplateType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoFile.java b/src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoFile.java index 356dde9..49753eb 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoFile.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoFile.java @@ -16,7 +16,7 @@ public class UploadOrganizationLogoFile { - @SpeakeasyMetadata("multipartForm:name=file") + @SpeakeasyMetadata("multipartForm:name=fileName") private String fileName; @SpeakeasyMetadata("multipartForm:content") diff --git a/src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoRequestBody.java index 1f506f2..d3fdf23 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoRequestBody.java @@ -23,7 +23,7 @@ public class UploadOrganizationLogoRequestBody { @SpeakeasyMetadata("multipartForm:name=uploader_user_id") private Optional uploaderUserId; - @SpeakeasyMetadata("multipartForm:file") + @SpeakeasyMetadata("multipartForm:file,name=file") private UploadOrganizationLogoFile file; @JsonCreator diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpsertTemplatePathParamTemplateType.java b/src/main/java/com/clerk/backend_api/models/operations/UpsertTemplatePathParamTemplateType.java index 60d0997..b31a68e 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpsertTemplatePathParamTemplateType.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpsertTemplatePathParamTemplateType.java @@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.lang.String; +import java.util.Objects; +import java.util.Optional; /** * UpsertTemplatePathParamTemplateType - The type of template to update @@ -24,4 +26,13 @@ private UpsertTemplatePathParamTemplateType(String value) { public String value() { return value; } + + public static Optional fromValue(String value) { + for (UpsertTemplatePathParamTemplateType o: UpsertTemplatePathParamTemplateType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } } diff --git a/src/main/java/com/clerk/backend_api/utils/BigDecimalString.java b/src/main/java/com/clerk/backend_api/utils/BigDecimalString.java index d175d4f..7416161 100644 --- a/src/main/java/com/clerk/backend_api/utils/BigDecimalString.java +++ b/src/main/java/com/clerk/backend_api/utils/BigDecimalString.java @@ -24,8 +24,8 @@ // Note that Jackson 2.16.1 does not support @JsonValue and @JsonFormat combined so we must use // a custom serializer/deserializer -@JsonSerialize(using = BigDecimalString.BigDecimalStringSerializer.class) -@JsonDeserialize(using = BigDecimalString.BigDecimalStringDeserializer.class) +@JsonSerialize(using = BigDecimalString.Serializer.class) +@JsonDeserialize(using = BigDecimalString.Deserializer.class) public class BigDecimalString { private final BigDecimal value; @@ -64,16 +64,11 @@ public boolean equals(Object obj) { return Objects.equals(value, other.value); } - public static final class BigDecimalStringSerializer extends StdSerializer { + @SuppressWarnings("serial") + public static final class Serializer extends StdSerializer { - private static final long serialVersionUID = -3828937716095008071L; - - public BigDecimalStringSerializer() { - this(null); - } - - public BigDecimalStringSerializer(Class t) { - super(t); + protected Serializer() { + super(BigDecimalString.class); } @Override @@ -83,16 +78,11 @@ public void serialize(BigDecimalString value, JsonGenerator g, SerializerProvide } } - public static final class BigDecimalStringDeserializer extends StdDeserializer { - - private static final long serialVersionUID = -2474225842945673085L; - - public BigDecimalStringDeserializer() { - this(null); - } + @SuppressWarnings("serial") + public static final class Deserializer extends StdDeserializer { - public BigDecimalStringDeserializer(Class t) { - super(t); + protected Deserializer() { + super(BigDecimalString.class); } @Override diff --git a/src/main/java/com/clerk/backend_api/utils/BigIntegerString.java b/src/main/java/com/clerk/backend_api/utils/BigIntegerString.java index 60926ab..1628f89 100644 --- a/src/main/java/com/clerk/backend_api/utils/BigIntegerString.java +++ b/src/main/java/com/clerk/backend_api/utils/BigIntegerString.java @@ -24,8 +24,8 @@ // Note that Jackson 2.16.1 does not support @JsonValue and @JsonFormat combined so we must use // a custom serializer/deserializer -@JsonSerialize(using = BigIntegerString.BigIntegerStringSerializer.class) -@JsonDeserialize(using = BigIntegerString.BigIntegerStringDeserializer.class) +@JsonSerialize(using = BigIntegerString.Serializer.class) +@JsonDeserialize(using = BigIntegerString.Deserializer.class) public class BigIntegerString { private final BigInteger value; @@ -64,16 +64,11 @@ public boolean equals(Object obj) { return Objects.equals(value, other.value); } - public static final class BigIntegerStringSerializer extends StdSerializer { + @SuppressWarnings("serial") + public static final class Serializer extends StdSerializer { - private static final long serialVersionUID = -2474225842945673085L; - - public BigIntegerStringSerializer() { - this(null); - } - - public BigIntegerStringSerializer(Class t) { - super(t); + protected Serializer() { + super(BigIntegerString.class); } @Override @@ -83,16 +78,11 @@ public void serialize(BigIntegerString value, JsonGenerator g, SerializerProvide } } - public static final class BigIntegerStringDeserializer extends StdDeserializer { - - private static final long serialVersionUID = -2474225842945673085L; - - public BigIntegerStringDeserializer() { - this(null); - } + @SuppressWarnings("serial") + public static final class Deserializer extends StdDeserializer { - public BigIntegerStringDeserializer(Class t) { - super(t); + protected Deserializer() { + super(BigIntegerString.class); } @Override diff --git a/src/main/java/com/clerk/backend_api/utils/RequestBody.java b/src/main/java/com/clerk/backend_api/utils/RequestBody.java index 1dd5e88..6edc06e 100644 --- a/src/main/java/com/clerk/backend_api/utils/RequestBody.java +++ b/src/main/java/com/clerk/backend_api/utils/RequestBody.java @@ -143,7 +143,7 @@ private static SerializedBody serializeMultipart(Object value) } if (metadata.file) { - serializeMultipartFile(builder, val); + serializeMultipartFile(metadata.name, builder, val); } else if (metadata.json) { ObjectMapper mapper = JSON.getMapper(); String json = mapper.writeValueAsString(val); @@ -171,13 +171,12 @@ private static SerializedBody serializeMultipart(Object value) })); } - private static void serializeMultipartFile(MultipartEntityBuilder builder, Object file) + private static void serializeMultipartFile(String fieldName, MultipartEntityBuilder builder, Object file) throws IllegalArgumentException, IllegalAccessException { if (Types.getType(file.getClass()) != Types.OBJECT) { throw new RuntimeException("Invalid type for multipart file"); } - String fieldName = ""; String fileName = ""; byte[] content = null; @@ -199,12 +198,11 @@ private static void serializeMultipartFile(MultipartEntityBuilder builder, Objec if (metadata.content) { content = (byte[]) val; } else { - fieldName = metadata.name; fileName = Utils.valToString(val); } } - if (fieldName.isBlank() || fileName.isBlank() || content == null) { + if (fileName.isBlank() || content == null) { throw new RuntimeException("Invalid multipart file"); } diff --git a/src/main/java/com/clerk/backend_api/utils/Security.java b/src/main/java/com/clerk/backend_api/utils/Security.java index 3c8b0cb..e48261b 100644 --- a/src/main/java/com/clerk/backend_api/utils/Security.java +++ b/src/main/java/com/clerk/backend_api/utils/Security.java @@ -6,7 +6,11 @@ import java.lang.reflect.Field; import java.nio.charset.StandardCharsets; +import java.util.Arrays; import java.util.Base64; +import java.util.Optional; +import java.util.regex.Pattern; +import java.util.stream.Stream; public final class Security { @@ -125,7 +129,7 @@ private static void parseSecuritySchemeValue(HTTPRequest request, SecurityMetada case "oauth2": if (!"client_credentials".equals(schemeMetadata.subtype)) { request.addHeader(securityMetadata.name, Utils.prefixBearer(Utils.valToString(value))); - } + } break; case "http": switch (schemeMetadata.subtype) { @@ -179,4 +183,60 @@ private static void parseBasicAuthScheme(HTTPRequest requestBuilder, Object sche .encodeToString(String.format("%s:%s", username, password) .getBytes(StandardCharsets.UTF_8))); } + + public static Stream findFieldsWhereMetadataContainsRegexes(Object o, String... regexes) { + Field[] fields = o.getClass().getDeclaredFields(); + return Arrays.stream(fields) // + .filter(f -> { + SpeakeasyMetadata[] anns = f.getDeclaredAnnotationsByType(SpeakeasyMetadata.class); + if (anns == null) { + return false; + } + return Arrays // + .stream(regexes) // + .allMatch(regex -> matches(anns, regex)); + }); + } + + public static Optional findStringValueWhereMetadataContainsRegexes(Object o, String... regexes) { + return findValueWhereMetadataContainsRegexes(o, regexes).map(x -> (String) x); + } + + public static Optional findStringValueWhereMetadataNameIs(Object o, String name) { + return Security.findStringValueWhereMetadataContainsRegexes(o, "\\bname=" + name + "\\b"); + } + + public static Optional findValueWhereMetadataContainsRegexes(Object o, String... regexes) { + return findFieldsWhereMetadataContainsRegexes(o, regexes) + .flatMap(f -> { + f.setAccessible(true); + Object result; + try { + result = f.get(o); + } catch (IllegalArgumentException | IllegalAccessException e) { + throw new RuntimeException(e); + } + if (result instanceof Optional) { + @SuppressWarnings("unchecked") + Optional r = (Optional) result; + if (r.isEmpty()) { + return Stream.empty(); + } else { + return Stream.of(r.get()); + } + } else { + return Stream.of(result); + } + }).findAny(); + } + + private static boolean matches(SpeakeasyMetadata[] anns, String regex) { + Pattern pattern = Pattern.compile(regex); + for (SpeakeasyMetadata ann : anns) { + if (pattern.matcher(ann.value()).find()) { + return true; + } + } + return false; + } } \ No newline at end of file diff --git a/src/main/java/com/clerk/backend_api/utils/SessionManager.java b/src/main/java/com/clerk/backend_api/utils/SessionManager.java new file mode 100644 index 0000000..2235bc4 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/utils/SessionManager.java @@ -0,0 +1,178 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.utils; + +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.OffsetDateTime; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.function.Function; +import java.util.stream.Collectors; + +import com.clerk.backend_api.models.errors.AuthException; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public final class SessionManager { + + // VisibleForTesting + public static final int REFRESH_BEFORE_EXPIRY_SECONDS = 60; + + private final Map> sessions = new HashMap<>(); + + public interface HasSessionKey { + String sessionKey(); + } + + public final static class Session { + private final T credentials; + private final Optional token; + private final List scopes; + private final Optional expiresAt; + + public Session(T credentials, Optional token, List scopes, Optional expiresAt) { + this.credentials = credentials; + this.token = token; + this.scopes = scopes; + this.expiresAt = expiresAt; + } + + public T credentials() { + return credentials; + } + + public Optional token() { + return token; + } + + public List scopes() { + return scopes; + } + + public Optional expiresAt() { + return expiresAt; + } + + } + + public Session getSession(T credentials, Optional> scopes, Function, Session> tokenProvider ) { + final String sessionKey = credentials.sessionKey(); + + Optional> currentSession = Optional.ofNullable(sessions.get(sessionKey)); + final Session session; + if (shouldCreateNewSession(currentSession, scopes)) { + // note that we accumulate scopes. For example if a session existed + // for scope 'read' and this request requires scope 'write' then we + // request a new token for `read, write`. + + // TODO it may be better to rather make `sessions` a Map> + // where the none of the Session scope lists fully contains another in the same + // map value. + // This would ensure that an operation is always called with a token with the + // minimum + // permissions required and also would ensure that a token request is not + // rejected + // because of disallowed scope combinations (yet to see that in the wild). + // For the example above with `read` and `write` scoped requests we would get a + // token + // for `read` scope, and then get a token for `write` scope and store both + // tokens in separate + // Session objects in the map value list for the credential pair. + + List accumulatedScopes = accumulateScopes(scopes, currentSession); + session = tokenProvider.apply(accumulatedScopes); + sessions.put(sessionKey, session); + } else { + session = currentSession.get(); + } + return session; + } + + // VisibleForTesting + public static boolean shouldCreateNewSession(Optional> currentSession, Optional> oauthScopes) { + return !currentSession.isPresent() // + || !hasRequiredScopes(currentSession.get().scopes, oauthScopes) // + || hasTokenExpired(currentSession.get().expiresAt, OffsetDateTime.now()); + } + + + private static < T extends HasSessionKey> List accumulateScopes(Optional> requiredScopes, Optional> session) { + if (session.isPresent()) { + List scopes = new ArrayList<>(requiredScopes.orElse(Collections.emptyList())); + scopes.addAll(session.get().scopes); + return scopes.stream() // + .distinct() // + .collect(Collectors.toList()); + } else { + return requiredScopes.orElse(Collections.emptyList()); + } + } + + // VisibleForTesting + public static boolean hasTokenExpired(Optional expiresAt, OffsetDateTime now) { + return expiresAt.isEmpty() // + || now.plusSeconds(REFRESH_BEFORE_EXPIRY_SECONDS).isAfter(expiresAt.get()); + } + + // VisibleForTesting + public static boolean hasRequiredScopes(List sessionScopes, Optional> requiredScopes) { + return sessionScopes.containsAll(requiredScopes.orElse(Collections.emptyList())); + } + + public void remove(String sessionKey) { + sessions.remove(sessionKey); + } + + public static Session requestOAuth2Token(HTTPClient client, T credentials, List scopes, + Map payload, URI tokenUri) { + try { + HttpRequest request = HttpRequest // + .newBuilder(tokenUri) // + .header("Content-Type", "application/x-www-form-urlencoded") // + .POST(RequestBody.serializeFormData(payload).body()) // + .build(); + HttpResponse response = client.send(request); + if (response.statusCode() != HttpURLConnection.HTTP_OK) { + String responseBody = Utils.toUtf8AndClose(response.body()); + throw new AuthException(response.statusCode(), + "Unexpected status code " + response.statusCode() + ": " + responseBody); + } + TokenResponse t = Utils.mapper().readValue(response.body(), TokenResponse.class); + if (!t.tokenType.orElse("").equals("Bearer")) { + throw new AuthException("Expected 'Bearer' token type but was '" + t.tokenType.orElse("") + "'"); + } + final Optional expiresAt = t.expiresInMs + .map(x -> OffsetDateTime.now().plus(x, ChronoUnit.MILLIS)); + return new Session(credentials, t.accessToken, scopes, expiresAt); + } catch (IOException | IllegalArgumentException | IllegalAccessException | InterruptedException | URISyntaxException e) { + throw new RuntimeException(e); + } + } + + final static class TokenResponse { + + @JsonProperty("access_token") + Optional accessToken; + + @JsonProperty("token_type") + Optional tokenType; + + @JsonProperty("expires_in") + Optional expiresInMs; + + } + +} diff --git a/src/main/java/com/clerk/backend_api/utils/Utils.java b/src/main/java/com/clerk/backend_api/utils/Utils.java index 612cabc..20745ac 100644 --- a/src/main/java/com/clerk/backend_api/utils/Utils.java +++ b/src/main/java/com/clerk/backend_api/utils/Utils.java @@ -15,7 +15,6 @@ import java.math.BigDecimal; import java.math.BigInteger; import java.net.URI; -import java.net.URLEncoder; import java.net.http.HttpClient.Version; import java.net.http.HttpHeaders; import java.net.http.HttpRequest; @@ -24,6 +23,8 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -38,7 +39,6 @@ import java.util.Map.Entry; import java.util.NoSuchElementException; import java.util.Optional; -import java.util.UUID; import java.util.concurrent.Callable; import java.util.function.BiPredicate; import java.util.regex.Matcher; @@ -50,7 +50,6 @@ import javax.net.ssl.SSLSession; import org.apache.commons.io.IOUtils; -import org.apache.http.NameValuePair; import org.openapitools.jackson.nullable.JsonNullable; import com.fasterxml.jackson.core.JsonProcessingException; @@ -1192,4 +1191,15 @@ public static void setSseSentinel(Object o, String value) { } } + public static String sessionKey(String... items) { + try { + MessageDigest md = MessageDigest.getInstance("MD5"); + String input = Arrays.stream(items).collect(Collectors.joining(":")); + byte[] bytes = md.digest(input.getBytes(StandardCharsets.UTF_8)); + return Utils.bytesToLowerCaseHex(bytes); + } catch (NoSuchAlgorithmException e) { + // not expected, MD5 always available + throw new RuntimeException(e); + } + } }