diff --git a/.gitignore b/.gitignore index df0a9853..da2fa016 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.speakeasy/reports # Ignore Gradle project-specific cache directory .gradle # Ignore Gradle build output directory diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 442f9e13..98f5a28c 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,22 +1,21 @@ lockVersion: 2.0.0 id: 1d22a5a4-8bac-42e3-b164-121fcacf66c9 management: - docChecksum: 10e470dbac1740bbb345d904d53ef04a + docChecksum: ae0d5db2552cf9b23fb65d0692e3bd02 docVersion: v1 - speakeasyVersion: 1.456.1 - generationVersion: 2.481.0 - releaseVersion: 1.5.0 - configChecksum: 5fe64054d82adba341d847ebd655945d + speakeasyVersion: 1.484.1 + generationVersion: 2.503.2 + releaseVersion: 1.6.0 + configChecksum: 588860d44b204a819dcb7e25d93c259a repoURL: https://github.com/clerk/clerk-sdk-java.git published: true features: java: additionalDependencies: 0.1.0 - additionalProperties: 0.0.1 constsAndDefaults: 0.1.1 - core: 3.33.3 + core: 3.33.8 deprecations: 2.81.1 - examples: 2.81.3 + examples: 2.81.5 flattening: 2.81.1 globalSecurity: 2.82.7 globalSecurityCallbacks: 0.1.0 @@ -29,7 +28,6 @@ features: unions: 0.0.6 generatedFiles: - .gitattributes - - CONTRIBUTING.md - USAGE.md - build.gradle - docs/models/components/Actor.md @@ -68,22 +66,25 @@ generatedFiles: - docs/models/components/ErrorMeta.md - docs/models/components/ExternalAccount.md - docs/models/components/ExternalAccounts.md + - docs/models/components/FromOAuth.md + - docs/models/components/FromOAuthVerificationStatus.md - docs/models/components/IdentificationLink.md - docs/models/components/IdentifierType.md + - docs/models/components/Instance.md + - docs/models/components/InstanceObject.md - docs/models/components/InstanceRestrictions.md - docs/models/components/InstanceRestrictionsObject.md - docs/models/components/InstanceSettings.md - docs/models/components/InstanceSettingsObject.md - docs/models/components/Invitation.md - docs/models/components/InvitationObject.md - - docs/models/components/InvitationPublicMetadata.md - docs/models/components/InvitationRevoked.md - docs/models/components/InvitationRevokedObject.md - - docs/models/components/InvitationRevokedPublicMetadata.md - docs/models/components/InvitationRevokedStatus.md - docs/models/components/InvitationStatus.md - docs/models/components/JWTTemplate.md - docs/models/components/JWTTemplateObject.md + - docs/models/components/Jwks.md - docs/models/components/Keys.md - docs/models/components/LatestActivity.md - docs/models/components/Meta.md @@ -95,9 +96,6 @@ generatedFiles: - docs/models/components/OAuthApplications.md - docs/models/components/OTPVerificationStatus.md - docs/models/components/OTPVerificationStrategy.md - - docs/models/components/Oauth.md - - docs/models/components/OauthVerificationStatus.md - - docs/models/components/OauthVerificationStrategy.md - docs/models/components/Object.md - docs/models/components/Organization.md - docs/models/components/OrganizationDomain.md @@ -107,32 +105,20 @@ generatedFiles: - docs/models/components/OrganizationDomains.md - docs/models/components/OrganizationInvitation.md - docs/models/components/OrganizationInvitationObject.md - - docs/models/components/OrganizationInvitationPrivateMetadata.md - - docs/models/components/OrganizationInvitationPublicMetadata.md - docs/models/components/OrganizationInvitationWithPublicOrganizationData.md - docs/models/components/OrganizationInvitationWithPublicOrganizationDataObject.md - - docs/models/components/OrganizationInvitationWithPublicOrganizationDataPrivateMetadata.md - - docs/models/components/OrganizationInvitationWithPublicOrganizationDataPublicMetadata.md - docs/models/components/OrganizationInvitations.md - docs/models/components/OrganizationInvitationsWithPublicOrganizationData.md - docs/models/components/OrganizationMembership.md - docs/models/components/OrganizationMembershipObject.md - docs/models/components/OrganizationMembershipOrganization.md - docs/models/components/OrganizationMembershipOrganizationObject.md - - docs/models/components/OrganizationMembershipOrganizationPrivateMetadata.md - - docs/models/components/OrganizationMembershipOrganizationPublicMetadata.md - - docs/models/components/OrganizationMembershipPrivateMetadata.md - - docs/models/components/OrganizationMembershipPublicMetadata.md - docs/models/components/OrganizationMemberships.md - docs/models/components/OrganizationObject.md - - docs/models/components/OrganizationPrivateMetadata.md - - docs/models/components/OrganizationPublicMetadata.md - docs/models/components/OrganizationSettings.md - docs/models/components/OrganizationSettingsObject.md - docs/models/components/OrganizationWithLogo.md - docs/models/components/OrganizationWithLogoObject.md - - docs/models/components/OrganizationWithLogoPrivateMetadata.md - - docs/models/components/OrganizationWithLogoPublicMetadata.md - docs/models/components/Organizations.md - docs/models/components/Otp.md - docs/models/components/Passkey.md @@ -141,17 +127,14 @@ generatedFiles: - docs/models/components/PhoneNumber.md - docs/models/components/PhoneNumberObject.md - docs/models/components/PhoneNumberVerification.md - - docs/models/components/PrivateMetadata.md - docs/models/components/ProxyCheck.md - docs/models/components/ProxyCheckObject.md - - docs/models/components/PublicMetadata.md - docs/models/components/PublicOrganizationData.md - docs/models/components/PublicUserData.md - docs/models/components/RedirectURL.md - docs/models/components/RedirectURLObject.md - docs/models/components/SAMLAccount.md - docs/models/components/SAMLAccountObject.md - - docs/models/components/SAMLAccountPublicMetadata.md - docs/models/components/SAMLAccountVerification.md - docs/models/components/SAMLConnectionSAMLConnection.md - docs/models/components/SAMLConnections.md @@ -173,9 +156,7 @@ generatedFiles: - docs/models/components/SignInTokenStatus.md - docs/models/components/SignUp.md - docs/models/components/SignUpObject.md - - docs/models/components/SignUpPublicMetadata.md - docs/models/components/SignUpStatus.md - - docs/models/components/SignUpUnsafeMetadata.md - docs/models/components/Status.md - docs/models/components/Strategy.md - docs/models/components/SvixURL.md @@ -188,9 +169,6 @@ generatedFiles: - docs/models/components/TicketVerificationStrategy.md - docs/models/components/TotalCount.md - docs/models/components/TotalCountObject.md - - docs/models/components/Totp.md - - docs/models/components/Type.md - - docs/models/components/UnsafeMetadata.md - docs/models/components/User.md - docs/models/components/UserObject.md - docs/models/components/Verification.md @@ -200,6 +178,13 @@ generatedFiles: - docs/models/components/VerificationStatus.md - docs/models/components/VerificationStrategy.md - docs/models/components/Verifications.md + - docs/models/components/WaitlistEntries.md + - docs/models/components/WaitlistEntry.md + - docs/models/components/WaitlistEntryInvitation.md + - docs/models/components/WaitlistEntryInvitationObject.md + - docs/models/components/WaitlistEntryInvitationStatus.md + - docs/models/components/WaitlistEntryObject.md + - docs/models/components/WaitlistEntryStatus.md - docs/models/components/Web3Signature.md - docs/models/components/Web3SignatureVerificationStatus.md - docs/models/components/Web3SignatureVerificationStrategy.md @@ -207,7 +192,6 @@ generatedFiles: - docs/models/components/Web3WalletObject.md - docs/models/components/Web3WalletVerification.md - docs/models/components/Web3WalletVerificationAdmin.md - - docs/models/components/WellKnownJWKS.md - docs/models/errors/ClerkErrors.md - docs/models/errors/Meta.md - docs/models/operations/Actor.md @@ -226,9 +210,9 @@ generatedFiles: - docs/models/operations/CreateAllowlistIdentifierResponse.md - docs/models/operations/CreateBlocklistIdentifierRequestBody.md - docs/models/operations/CreateBlocklistIdentifierResponse.md + - docs/models/operations/CreateBulkInvitationsResponse.md - docs/models/operations/CreateEmailAddressRequestBody.md - docs/models/operations/CreateEmailAddressResponse.md - - docs/models/operations/CreateInvitationPublicMetadata.md - docs/models/operations/CreateInvitationRequestBody.md - docs/models/operations/CreateInvitationResponse.md - docs/models/operations/CreateJWTTemplateRequestBody.md @@ -238,20 +222,15 @@ generatedFiles: - docs/models/operations/CreateOrganizationDomainRequest.md - docs/models/operations/CreateOrganizationDomainRequestBody.md - docs/models/operations/CreateOrganizationDomainResponse.md - - docs/models/operations/CreateOrganizationInvitationBulkPrivateMetadata.md - - docs/models/operations/CreateOrganizationInvitationBulkPublicMetadata.md - docs/models/operations/CreateOrganizationInvitationBulkRequest.md + - docs/models/operations/CreateOrganizationInvitationBulkRequestBody.md - docs/models/operations/CreateOrganizationInvitationBulkResponse.md - - docs/models/operations/CreateOrganizationInvitationPrivateMetadata.md - - docs/models/operations/CreateOrganizationInvitationPublicMetadata.md - docs/models/operations/CreateOrganizationInvitationRequest.md - docs/models/operations/CreateOrganizationInvitationRequestBody.md - docs/models/operations/CreateOrganizationInvitationResponse.md - docs/models/operations/CreateOrganizationMembershipRequest.md - docs/models/operations/CreateOrganizationMembershipRequestBody.md - docs/models/operations/CreateOrganizationMembershipResponse.md - - docs/models/operations/CreateOrganizationPrivateMetadata.md - - docs/models/operations/CreateOrganizationPublicMetadata.md - docs/models/operations/CreateOrganizationRequestBody.md - docs/models/operations/CreateOrganizationResponse.md - docs/models/operations/CreatePhoneNumberRequestBody.md @@ -260,17 +239,25 @@ generatedFiles: - docs/models/operations/CreateRedirectURLResponse.md - docs/models/operations/CreateSAMLConnectionRequestBody.md - docs/models/operations/CreateSAMLConnectionResponse.md + - docs/models/operations/CreateSessionRequestBody.md + - docs/models/operations/CreateSessionResponse.md + - docs/models/operations/CreateSessionTokenFromTemplateObject.md - docs/models/operations/CreateSessionTokenFromTemplateRequest.md + - docs/models/operations/CreateSessionTokenFromTemplateRequestBody.md - docs/models/operations/CreateSessionTokenFromTemplateResponse.md - docs/models/operations/CreateSessionTokenFromTemplateResponseBody.md + - docs/models/operations/CreateSessionTokenRequest.md + - docs/models/operations/CreateSessionTokenRequestBody.md + - docs/models/operations/CreateSessionTokenResponse.md + - docs/models/operations/CreateSessionTokenResponseBody.md - docs/models/operations/CreateSignInTokenRequestBody.md - docs/models/operations/CreateSignInTokenResponse.md - docs/models/operations/CreateSvixAppResponse.md - docs/models/operations/CreateTestingTokenResponse.md - docs/models/operations/CreateUserRequestBody.md - docs/models/operations/CreateUserResponse.md - - docs/models/operations/CreateUserTOTPRequest.md - - docs/models/operations/CreateUserTOTPResponse.md + - docs/models/operations/CreateWaitlistEntryRequestBody.md + - docs/models/operations/CreateWaitlistEntryResponse.md - docs/models/operations/DeleteAllowlistIdentifierRequest.md - docs/models/operations/DeleteAllowlistIdentifierResponse.md - docs/models/operations/DeleteBackupCodeRequest.md @@ -321,10 +308,10 @@ generatedFiles: - docs/models/operations/GetClientResponse.md - docs/models/operations/GetEmailAddressRequest.md - docs/models/operations/GetEmailAddressResponse.md + - docs/models/operations/GetInstanceResponse.md - docs/models/operations/GetJWKSResponse.md - docs/models/operations/GetJWTTemplateRequest.md - docs/models/operations/GetJWTTemplateResponse.md - - docs/models/operations/GetOAuthAccessTokenPublicMetadata.md - docs/models/operations/GetOAuthAccessTokenRequest.md - docs/models/operations/GetOAuthAccessTokenResponse.md - docs/models/operations/GetOAuthApplicationRequest.md @@ -383,10 +370,11 @@ generatedFiles: - docs/models/operations/ListRedirectURLsResponse.md - docs/models/operations/ListSAMLConnectionsRequest.md - docs/models/operations/ListSAMLConnectionsResponse.md + - docs/models/operations/ListWaitlistEntriesQueryParamStatus.md + - docs/models/operations/ListWaitlistEntriesRequest.md + - docs/models/operations/ListWaitlistEntriesResponse.md - docs/models/operations/LockUserRequest.md - docs/models/operations/LockUserResponse.md - - docs/models/operations/MergeOrganizationMetadataPrivateMetadata.md - - docs/models/operations/MergeOrganizationMetadataPublicMetadata.md - docs/models/operations/MergeOrganizationMetadataRequest.md - docs/models/operations/MergeOrganizationMetadataRequestBody.md - docs/models/operations/MergeOrganizationMetadataResponse.md @@ -396,9 +384,7 @@ generatedFiles: - docs/models/operations/PreviewTemplateRequestBody.md - docs/models/operations/PreviewTemplateResponse.md - docs/models/operations/PreviewTemplateResponseBody.md - - docs/models/operations/PrivateMetadata.md - docs/models/operations/Provider.md - - docs/models/operations/PublicMetadata.md - docs/models/operations/QueryParamStatus.md - docs/models/operations/RequestBody.md - docs/models/operations/ResponseBody.md @@ -422,6 +408,7 @@ generatedFiles: - docs/models/operations/SetUserProfileImageRequestBody.md - docs/models/operations/SetUserProfileImageResponse.md - docs/models/operations/Status.md + - docs/models/operations/TemplateSlug.md - docs/models/operations/TemplateType.md - docs/models/operations/ToggleTemplateDeliveryPathParamTemplateType.md - docs/models/operations/ToggleTemplateDeliveryRequest.md @@ -431,7 +418,6 @@ generatedFiles: - docs/models/operations/UnbanUserResponse.md - docs/models/operations/UnlockUserRequest.md - docs/models/operations/UnlockUserResponse.md - - docs/models/operations/UnsafeMetadata.md - docs/models/operations/UpdateDomainRequest.md - docs/models/operations/UpdateDomainRequestBody.md - docs/models/operations/UpdateDomainResponse.md @@ -456,16 +442,12 @@ generatedFiles: - docs/models/operations/UpdateOrganizationDomainRequest.md - docs/models/operations/UpdateOrganizationDomainRequestBody.md - docs/models/operations/UpdateOrganizationDomainResponse.md - - docs/models/operations/UpdateOrganizationMembershipMetadataPrivateMetadata.md - - docs/models/operations/UpdateOrganizationMembershipMetadataPublicMetadata.md - docs/models/operations/UpdateOrganizationMembershipMetadataRequest.md - docs/models/operations/UpdateOrganizationMembershipMetadataRequestBody.md - docs/models/operations/UpdateOrganizationMembershipMetadataResponse.md - docs/models/operations/UpdateOrganizationMembershipRequest.md - docs/models/operations/UpdateOrganizationMembershipRequestBody.md - docs/models/operations/UpdateOrganizationMembershipResponse.md - - docs/models/operations/UpdateOrganizationPrivateMetadata.md - - docs/models/operations/UpdateOrganizationPublicMetadata.md - docs/models/operations/UpdateOrganizationRequest.md - docs/models/operations/UpdateOrganizationRequestBody.md - docs/models/operations/UpdateOrganizationResponse.md @@ -484,12 +466,9 @@ generatedFiles: - docs/models/operations/UpdateUserMetadataRequest.md - docs/models/operations/UpdateUserMetadataRequestBody.md - docs/models/operations/UpdateUserMetadataResponse.md - - docs/models/operations/UpdateUserPrivateMetadata.md - - docs/models/operations/UpdateUserPublicMetadata.md - docs/models/operations/UpdateUserRequest.md - docs/models/operations/UpdateUserRequestBody.md - docs/models/operations/UpdateUserResponse.md - - docs/models/operations/UpdateUserUnsafeMetadata.md - docs/models/operations/UploadOrganizationLogoFile.md - docs/models/operations/UploadOrganizationLogoRequest.md - docs/models/operations/UploadOrganizationLogoRequestBody.md @@ -554,6 +533,7 @@ generatedFiles: - docs/sdks/templates/README.md - docs/sdks/testingtokens/README.md - docs/sdks/users/README.md + - docs/sdks/waitlistentries/README.md - docs/sdks/webhooks/README.md - gradle/wrapper/gradle-wrapper.jar - gradle/wrapper/gradle-wrapper.properties @@ -595,6 +575,7 @@ generatedFiles: - src/main/java/com/clerk/backend_api/Templates.java - src/main/java/com/clerk/backend_api/TestingTokens.java - src/main/java/com/clerk/backend_api/Users.java + - src/main/java/com/clerk/backend_api/WaitlistEntries.java - src/main/java/com/clerk/backend_api/Webhooks.java - src/main/java/com/clerk/backend_api/models/components/Actor.java - src/main/java/com/clerk/backend_api/models/components/ActorToken.java @@ -632,22 +613,25 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/components/ErrorMeta.java - src/main/java/com/clerk/backend_api/models/components/ExternalAccount.java - src/main/java/com/clerk/backend_api/models/components/ExternalAccounts.java + - src/main/java/com/clerk/backend_api/models/components/FromOAuth.java + - src/main/java/com/clerk/backend_api/models/components/FromOAuthVerificationStatus.java - src/main/java/com/clerk/backend_api/models/components/IdentificationLink.java - src/main/java/com/clerk/backend_api/models/components/IdentifierType.java + - src/main/java/com/clerk/backend_api/models/components/Instance.java + - src/main/java/com/clerk/backend_api/models/components/InstanceObject.java - src/main/java/com/clerk/backend_api/models/components/InstanceRestrictions.java - src/main/java/com/clerk/backend_api/models/components/InstanceRestrictionsObject.java - src/main/java/com/clerk/backend_api/models/components/InstanceSettings.java - src/main/java/com/clerk/backend_api/models/components/InstanceSettingsObject.java - src/main/java/com/clerk/backend_api/models/components/Invitation.java - src/main/java/com/clerk/backend_api/models/components/InvitationObject.java - - src/main/java/com/clerk/backend_api/models/components/InvitationPublicMetadata.java - src/main/java/com/clerk/backend_api/models/components/InvitationRevoked.java - src/main/java/com/clerk/backend_api/models/components/InvitationRevokedObject.java - - src/main/java/com/clerk/backend_api/models/components/InvitationRevokedPublicMetadata.java - src/main/java/com/clerk/backend_api/models/components/InvitationRevokedStatus.java - src/main/java/com/clerk/backend_api/models/components/InvitationStatus.java - src/main/java/com/clerk/backend_api/models/components/JWTTemplate.java - src/main/java/com/clerk/backend_api/models/components/JWTTemplateObject.java + - src/main/java/com/clerk/backend_api/models/components/Jwks.java - src/main/java/com/clerk/backend_api/models/components/Keys.java - src/main/java/com/clerk/backend_api/models/components/LatestActivity.java - src/main/java/com/clerk/backend_api/models/components/Meta.java @@ -659,9 +643,6 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/components/OAuthApplications.java - src/main/java/com/clerk/backend_api/models/components/OTPVerificationStatus.java - src/main/java/com/clerk/backend_api/models/components/OTPVerificationStrategy.java - - src/main/java/com/clerk/backend_api/models/components/Oauth.java - - src/main/java/com/clerk/backend_api/models/components/OauthVerificationStatus.java - - src/main/java/com/clerk/backend_api/models/components/OauthVerificationStrategy.java - src/main/java/com/clerk/backend_api/models/components/Object.java - src/main/java/com/clerk/backend_api/models/components/Organization.java - src/main/java/com/clerk/backend_api/models/components/OrganizationDomain.java @@ -671,32 +652,20 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/components/OrganizationDomains.java - src/main/java/com/clerk/backend_api/models/components/OrganizationInvitation.java - src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationObject.java - - src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationPrivateMetadata.java - - src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationPublicMetadata.java - src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationData.java - src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationDataObject.java - - src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationDataPrivateMetadata.java - - src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationDataPublicMetadata.java - src/main/java/com/clerk/backend_api/models/components/OrganizationInvitations.java - src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationsWithPublicOrganizationData.java - src/main/java/com/clerk/backend_api/models/components/OrganizationMembership.java - src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipObject.java - src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganization.java - src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganizationObject.java - - src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganizationPrivateMetadata.java - - src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganizationPublicMetadata.java - - src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipPrivateMetadata.java - - src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipPublicMetadata.java - src/main/java/com/clerk/backend_api/models/components/OrganizationMemberships.java - src/main/java/com/clerk/backend_api/models/components/OrganizationObject.java - - src/main/java/com/clerk/backend_api/models/components/OrganizationPrivateMetadata.java - - src/main/java/com/clerk/backend_api/models/components/OrganizationPublicMetadata.java - src/main/java/com/clerk/backend_api/models/components/OrganizationSettings.java - src/main/java/com/clerk/backend_api/models/components/OrganizationSettingsObject.java - src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogo.java - src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogoObject.java - - src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogoPrivateMetadata.java - - src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogoPublicMetadata.java - src/main/java/com/clerk/backend_api/models/components/Organizations.java - src/main/java/com/clerk/backend_api/models/components/Otp.java - src/main/java/com/clerk/backend_api/models/components/Passkey.java @@ -705,17 +674,14 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/components/PhoneNumber.java - src/main/java/com/clerk/backend_api/models/components/PhoneNumberObject.java - src/main/java/com/clerk/backend_api/models/components/PhoneNumberVerification.java - - src/main/java/com/clerk/backend_api/models/components/PrivateMetadata.java - src/main/java/com/clerk/backend_api/models/components/ProxyCheck.java - src/main/java/com/clerk/backend_api/models/components/ProxyCheckObject.java - - src/main/java/com/clerk/backend_api/models/components/PublicMetadata.java - src/main/java/com/clerk/backend_api/models/components/PublicOrganizationData.java - src/main/java/com/clerk/backend_api/models/components/PublicUserData.java - src/main/java/com/clerk/backend_api/models/components/RedirectURL.java - src/main/java/com/clerk/backend_api/models/components/RedirectURLObject.java - src/main/java/com/clerk/backend_api/models/components/SAMLAccount.java - src/main/java/com/clerk/backend_api/models/components/SAMLAccountObject.java - - src/main/java/com/clerk/backend_api/models/components/SAMLAccountPublicMetadata.java - src/main/java/com/clerk/backend_api/models/components/SAMLAccountVerification.java - src/main/java/com/clerk/backend_api/models/components/SAMLConnectionSAMLConnection.java - src/main/java/com/clerk/backend_api/models/components/SAMLConnections.java @@ -737,9 +703,7 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/components/SignInTokenStatus.java - src/main/java/com/clerk/backend_api/models/components/SignUp.java - src/main/java/com/clerk/backend_api/models/components/SignUpObject.java - - src/main/java/com/clerk/backend_api/models/components/SignUpPublicMetadata.java - src/main/java/com/clerk/backend_api/models/components/SignUpStatus.java - - src/main/java/com/clerk/backend_api/models/components/SignUpUnsafeMetadata.java - src/main/java/com/clerk/backend_api/models/components/Status.java - src/main/java/com/clerk/backend_api/models/components/Strategy.java - src/main/java/com/clerk/backend_api/models/components/SvixURL.java @@ -752,9 +716,6 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/components/TicketVerificationStrategy.java - src/main/java/com/clerk/backend_api/models/components/TotalCount.java - src/main/java/com/clerk/backend_api/models/components/TotalCountObject.java - - src/main/java/com/clerk/backend_api/models/components/Totp.java - - src/main/java/com/clerk/backend_api/models/components/Type.java - - src/main/java/com/clerk/backend_api/models/components/UnsafeMetadata.java - src/main/java/com/clerk/backend_api/models/components/User.java - src/main/java/com/clerk/backend_api/models/components/UserObject.java - src/main/java/com/clerk/backend_api/models/components/Verification.java @@ -764,6 +725,13 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/components/VerificationStatus.java - src/main/java/com/clerk/backend_api/models/components/VerificationStrategy.java - src/main/java/com/clerk/backend_api/models/components/Verifications.java + - src/main/java/com/clerk/backend_api/models/components/WaitlistEntries.java + - src/main/java/com/clerk/backend_api/models/components/WaitlistEntry.java + - src/main/java/com/clerk/backend_api/models/components/WaitlistEntryInvitation.java + - src/main/java/com/clerk/backend_api/models/components/WaitlistEntryInvitationObject.java + - src/main/java/com/clerk/backend_api/models/components/WaitlistEntryInvitationStatus.java + - src/main/java/com/clerk/backend_api/models/components/WaitlistEntryObject.java + - src/main/java/com/clerk/backend_api/models/components/WaitlistEntryStatus.java - src/main/java/com/clerk/backend_api/models/components/Web3Signature.java - src/main/java/com/clerk/backend_api/models/components/Web3SignatureVerificationStatus.java - src/main/java/com/clerk/backend_api/models/components/Web3SignatureVerificationStrategy.java @@ -771,7 +739,6 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/components/Web3WalletObject.java - src/main/java/com/clerk/backend_api/models/components/Web3WalletVerification.java - src/main/java/com/clerk/backend_api/models/components/Web3WalletVerificationAdmin.java - - src/main/java/com/clerk/backend_api/models/components/WellKnownJWKS.java - src/main/java/com/clerk/backend_api/models/errors/AuthException.java - src/main/java/com/clerk/backend_api/models/errors/ClerkErrors.java - src/main/java/com/clerk/backend_api/models/errors/Meta.java @@ -798,10 +765,11 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/operations/CreateBlocklistIdentifierRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/CreateBlocklistIdentifierRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/CreateBlocklistIdentifierResponse.java + - src/main/java/com/clerk/backend_api/models/operations/CreateBulkInvitationsRequestBuilder.java + - src/main/java/com/clerk/backend_api/models/operations/CreateBulkInvitationsResponse.java - src/main/java/com/clerk/backend_api/models/operations/CreateEmailAddressRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/CreateEmailAddressRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/CreateEmailAddressResponse.java - - src/main/java/com/clerk/backend_api/models/operations/CreateInvitationPublicMetadata.java - src/main/java/com/clerk/backend_api/models/operations/CreateInvitationRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/CreateInvitationRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/CreateInvitationResponse.java @@ -815,13 +783,10 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationDomainRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationDomainRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationDomainResponse.java - - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkPrivateMetadata.java - - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkPublicMetadata.java - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkRequest.java + - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkResponse.java - - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationPrivateMetadata.java - - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationPublicMetadata.java - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationRequest.java - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationRequestBuilder.java @@ -830,8 +795,6 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationMembershipRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationMembershipRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationMembershipResponse.java - - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationPrivateMetadata.java - - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationPublicMetadata.java - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationResponse.java @@ -844,10 +807,20 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/operations/CreateSAMLConnectionRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/CreateSAMLConnectionRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/CreateSAMLConnectionResponse.java + - src/main/java/com/clerk/backend_api/models/operations/CreateSessionRequestBody.java + - src/main/java/com/clerk/backend_api/models/operations/CreateSessionRequestBuilder.java + - src/main/java/com/clerk/backend_api/models/operations/CreateSessionResponse.java + - src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateObject.java - src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateRequest.java + - src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateResponse.java - src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateResponseBody.java + - src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenRequest.java + - src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenRequestBody.java + - src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenRequestBuilder.java + - src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenResponse.java + - src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenResponseBody.java - src/main/java/com/clerk/backend_api/models/operations/CreateSignInTokenRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/CreateSignInTokenRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/CreateSignInTokenResponse.java @@ -858,9 +831,9 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/operations/CreateUserRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/CreateUserRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/CreateUserResponse.java - - src/main/java/com/clerk/backend_api/models/operations/CreateUserTOTPRequest.java - - src/main/java/com/clerk/backend_api/models/operations/CreateUserTOTPRequestBuilder.java - - src/main/java/com/clerk/backend_api/models/operations/CreateUserTOTPResponse.java + - src/main/java/com/clerk/backend_api/models/operations/CreateWaitlistEntryRequestBody.java + - src/main/java/com/clerk/backend_api/models/operations/CreateWaitlistEntryRequestBuilder.java + - src/main/java/com/clerk/backend_api/models/operations/CreateWaitlistEntryResponse.java - src/main/java/com/clerk/backend_api/models/operations/DeleteAllowlistIdentifierRequest.java - src/main/java/com/clerk/backend_api/models/operations/DeleteAllowlistIdentifierRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/DeleteAllowlistIdentifierResponse.java @@ -935,12 +908,13 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/operations/GetEmailAddressRequest.java - src/main/java/com/clerk/backend_api/models/operations/GetEmailAddressRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/GetEmailAddressResponse.java + - src/main/java/com/clerk/backend_api/models/operations/GetInstanceRequestBuilder.java + - src/main/java/com/clerk/backend_api/models/operations/GetInstanceResponse.java - src/main/java/com/clerk/backend_api/models/operations/GetJWKSRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/GetJWKSResponse.java - src/main/java/com/clerk/backend_api/models/operations/GetJWTTemplateRequest.java - src/main/java/com/clerk/backend_api/models/operations/GetJWTTemplateRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/GetJWTTemplateResponse.java - - src/main/java/com/clerk/backend_api/models/operations/GetOAuthAccessTokenPublicMetadata.java - src/main/java/com/clerk/backend_api/models/operations/GetOAuthAccessTokenRequest.java - src/main/java/com/clerk/backend_api/models/operations/GetOAuthAccessTokenRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/GetOAuthAccessTokenResponse.java @@ -1029,11 +1003,13 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/operations/ListSAMLConnectionsRequest.java - src/main/java/com/clerk/backend_api/models/operations/ListSAMLConnectionsRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/ListSAMLConnectionsResponse.java + - src/main/java/com/clerk/backend_api/models/operations/ListWaitlistEntriesQueryParamStatus.java + - src/main/java/com/clerk/backend_api/models/operations/ListWaitlistEntriesRequest.java + - src/main/java/com/clerk/backend_api/models/operations/ListWaitlistEntriesRequestBuilder.java + - src/main/java/com/clerk/backend_api/models/operations/ListWaitlistEntriesResponse.java - src/main/java/com/clerk/backend_api/models/operations/LockUserRequest.java - src/main/java/com/clerk/backend_api/models/operations/LockUserRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/LockUserResponse.java - - src/main/java/com/clerk/backend_api/models/operations/MergeOrganizationMetadataPrivateMetadata.java - - src/main/java/com/clerk/backend_api/models/operations/MergeOrganizationMetadataPublicMetadata.java - src/main/java/com/clerk/backend_api/models/operations/MergeOrganizationMetadataRequest.java - src/main/java/com/clerk/backend_api/models/operations/MergeOrganizationMetadataRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/MergeOrganizationMetadataRequestBuilder.java @@ -1045,9 +1021,7 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/operations/PreviewTemplateRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/PreviewTemplateResponse.java - src/main/java/com/clerk/backend_api/models/operations/PreviewTemplateResponseBody.java - - src/main/java/com/clerk/backend_api/models/operations/PrivateMetadata.java - src/main/java/com/clerk/backend_api/models/operations/Provider.java - - src/main/java/com/clerk/backend_api/models/operations/PublicMetadata.java - src/main/java/com/clerk/backend_api/models/operations/QueryParamStatus.java - src/main/java/com/clerk/backend_api/models/operations/RequestBody.java - src/main/java/com/clerk/backend_api/models/operations/ResponseBody.java @@ -1080,6 +1054,7 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/operations/SetUserProfileImageRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/SetUserProfileImageResponse.java - src/main/java/com/clerk/backend_api/models/operations/Status.java + - src/main/java/com/clerk/backend_api/models/operations/TemplateSlug.java - src/main/java/com/clerk/backend_api/models/operations/TemplateType.java - src/main/java/com/clerk/backend_api/models/operations/ToggleTemplateDeliveryPathParamTemplateType.java - src/main/java/com/clerk/backend_api/models/operations/ToggleTemplateDeliveryRequest.java @@ -1092,7 +1067,6 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/operations/UnlockUserRequest.java - src/main/java/com/clerk/backend_api/models/operations/UnlockUserRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/UnlockUserResponse.java - - src/main/java/com/clerk/backend_api/models/operations/UnsafeMetadata.java - src/main/java/com/clerk/backend_api/models/operations/UpdateDomainRequest.java - src/main/java/com/clerk/backend_api/models/operations/UpdateDomainRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/UpdateDomainRequestBuilder.java @@ -1126,8 +1100,6 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationDomainRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationDomainRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationDomainResponse.java - - src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataPrivateMetadata.java - - src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataPublicMetadata.java - src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataRequest.java - src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataRequestBuilder.java @@ -1136,8 +1108,6 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipResponse.java - - src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationPrivateMetadata.java - - src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationPublicMetadata.java - src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationRequest.java - src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationRequestBuilder.java @@ -1162,13 +1132,10 @@ generatedFiles: - src/main/java/com/clerk/backend_api/models/operations/UpdateUserMetadataRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/UpdateUserMetadataRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/UpdateUserMetadataResponse.java - - src/main/java/com/clerk/backend_api/models/operations/UpdateUserPrivateMetadata.java - - src/main/java/com/clerk/backend_api/models/operations/UpdateUserPublicMetadata.java - src/main/java/com/clerk/backend_api/models/operations/UpdateUserRequest.java - src/main/java/com/clerk/backend_api/models/operations/UpdateUserRequestBody.java - src/main/java/com/clerk/backend_api/models/operations/UpdateUserRequestBuilder.java - src/main/java/com/clerk/backend_api/models/operations/UpdateUserResponse.java - - src/main/java/com/clerk/backend_api/models/operations/UpdateUserUnsafeMetadata.java - src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoFile.java - src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoRequest.java - src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoRequestBody.java @@ -1236,6 +1203,7 @@ generatedFiles: - src/main/java/com/clerk/backend_api/utils/QueryParameter.java - src/main/java/com/clerk/backend_api/utils/QueryParameters.java - src/main/java/com/clerk/backend_api/utils/QueryParamsMetadata.java + - src/main/java/com/clerk/backend_api/utils/RecordingClient.java - src/main/java/com/clerk/backend_api/utils/RequestBody.java - src/main/java/com/clerk/backend_api/utils/RequestMetadata.java - src/main/java/com/clerk/backend_api/utils/Response.java @@ -1260,6 +1228,10 @@ examples: application/json: {} GetClientList: speakeasy-default-get-client-list: + parameters: + query: + limit: 10 + offset: 0 responses: "200": application/json: [{"object": "client", "id": "", "session_ids": ["", ""], "sessions": [{"object": "session", "id": "", "user_id": "", "client_id": "", "status": "revoked", "last_active_at": 229716, "expire_at": 152837, "abandon_at": 635532, "updated_at": 639387, "created_at": 17577}, {"object": "session", "id": "", "user_id": "", "client_id": "", "status": "abandoned", "last_active_at": 86140, "expire_at": 68504, "abandon_at": 687960, "updated_at": 509883, "created_at": 633911}], "sign_in_id": "", "sign_up_id": "", "last_active_session_id": "", "updated_at": 7468, "created_at": 54607}, {"object": "client", "id": "", "session_ids": [""], "sessions": [{"object": "session", "id": "", "user_id": "", "client_id": "", "status": "active", "last_active_at": 931165, "expire_at": 567445, "abandon_at": 876407, "updated_at": 490078, "created_at": 51681}], "sign_in_id": "", "sign_up_id": "", "last_active_session_id": "", "updated_at": 322596, "created_at": 860596}, {"object": "client", "id": "", "session_ids": [], "sessions": [{"object": "session", "id": "", "user_id": "", "client_id": "", "status": "ended", "last_active_at": 913465, "expire_at": 173090, "abandon_at": 75058, "updated_at": 897069, "created_at": 135572}, {"object": "session", "id": "", "user_id": "", "client_id": "", "status": "expired", "last_active_at": 425334, "expire_at": 432930, "abandon_at": 480616, "updated_at": 103421, "created_at": 523875}, {"object": "session", "id": "", "user_id": "", "client_id": "", "status": "abandoned", "last_active_at": 410206, "expire_at": 863466, "abandon_at": 307390, "updated_at": 392057, "created_at": 113486}], "sign_in_id": "", "sign_up_id": "", "last_active_session_id": "", "updated_at": 181118, "created_at": 913851}] @@ -1286,9 +1258,9 @@ examples: speakeasy-default-create-email-address: responses: "200": - application/json: {"object": "email_address", "email_address": "Loyal79@yahoo.com", "reserved": true, "verification": {"status": "unverified", "strategy": "from_oauth_google"}, "linked_to": [{"type": "saml", "id": ""}, {"type": "oauth_apple", "id": ""}, {"type": "oauth_discord", "id": ""}], "created_at": 357021, "updated_at": 259629} + application/json: {"object": "email_address", "email_address": "Loyal79@yahoo.com", "reserved": true, "verification": {"status": "unverified", "strategy": "from_oauth_google"}, "linked_to": [{"type": "", "id": ""}, {"type": "", "id": ""}, {"type": "", "id": ""}], "created_at": 586220, "updated_at": 752438} "400": - application/json: {"errors": []} + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} GetEmailAddress: speakeasy-default-get-email-address: parameters: @@ -1296,9 +1268,9 @@ examples: email_address_id: "" responses: "200": - application/json: {"object": "email_address", "email_address": "Keeley_Lebsack@hotmail.com", "reserved": true, "verification": {"status": "expired", "strategy": "reset_password_email_code"}, "linked_to": [{"type": "oauth_google", "id": ""}, {"type": "oauth_mock", "id": ""}, {"type": "oauth_mock", "id": ""}], "created_at": 94589, "updated_at": 552582} + application/json: {"object": "email_address", "email_address": "Keeley_Lebsack@hotmail.com", "reserved": true, "verification": {"status": "expired", "strategy": "reset_password_email_code"}, "linked_to": [{"type": "", "id": ""}, {"type": "", "id": ""}, {"type": "", "id": ""}], "created_at": 78888, "updated_at": 219956} "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} DeleteEmailAddress: speakeasy-default-delete-email-address: parameters: @@ -1316,9 +1288,9 @@ examples: email_address_id: "" responses: "200": - application/json: {"object": "email_address", "email_address": "Lavern48@hotmail.com", "reserved": true, "verification": {"status": "failed", "strategy": "oauth_mock", "expire_at": 249440}, "linked_to": [], "created_at": 789275, "updated_at": 889838} + application/json: {"object": "email_address", "email_address": "Lavern48@hotmail.com", "reserved": true, "verification": {"status": "unverified", "strategy": "", "expire_at": 311507}, "linked_to": [], "created_at": 139579, "updated_at": 789275} "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} CreatePhoneNumber: speakeasy-default-create-phone-number: responses: @@ -1333,9 +1305,9 @@ examples: phone_number_id: "" responses: "200": - application/json: {"object": "phone_number", "phone_number": "655.944.2294 x8023", "reserved": true, "verification": {"status": "verified", "strategy": "admin"}, "linked_to": [{"type": "oauth_mock", "id": ""}, {"type": "oauth_apple", "id": ""}, {"type": "oauth_apple", "id": ""}], "created_at": 550965, "updated_at": 322612} + application/json: {"object": "phone_number", "phone_number": "655.944.2294 x8023", "reserved": true, "verification": {"status": "verified", "strategy": "admin"}, "linked_to": [{"type": "", "id": ""}, {"type": "", "id": ""}, {"type": "", "id": ""}], "created_at": 380699, "updated_at": 746585} "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} DeletePhoneNumber: speakeasy-default-delete-phone-number: parameters: @@ -1353,16 +1325,27 @@ examples: phone_number_id: "" responses: "200": - application/json: {"object": "phone_number", "phone_number": "(639) 749-0843 x21783", "reserved": true, "verification": {"status": "verified", "strategy": "admin"}, "linked_to": [{"type": "saml", "id": ""}, {"type": "oauth_google", "id": ""}], "created_at": 756247, "updated_at": 810877} + application/json: {"object": "phone_number", "phone_number": "(639) 749-0843 x21783", "reserved": true, "verification": {"status": "verified", "strategy": "admin"}, "linked_to": [{"type": "", "id": ""}, {"type": "", "id": ""}], "created_at": 404265, "updated_at": 33980} "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} GetSessionList: speakeasy-default-get-session-list: + parameters: + query: + limit: 10 + offset: 0 responses: "200": application/json: [{"object": "session", "id": "", "user_id": "", "client_id": "", "status": "expired", "last_active_at": 678317, "expire_at": 177706, "abandon_at": 229716, "updated_at": 152837, "created_at": 635532}, {"object": "session", "id": "", "user_id": "", "client_id": "", "status": "removed", "last_active_at": 17577, "expire_at": 718303, "abandon_at": 86140, "updated_at": 68504, "created_at": 687960}, {"object": "session", "id": "", "user_id": "", "client_id": "", "status": "expired", "last_active_at": 633911, "expire_at": 7468, "abandon_at": 54607, "updated_at": 367745, "created_at": 485729}] "400": application/json: {"errors": []} + createSession: + speakeasy-default-create-session: + responses: + "200": + application/json: {"object": "session", "id": "", "user_id": "", "client_id": "", "status": "expired", "last_active_at": 169071, "expire_at": 984566, "abandon_at": 837609, "updated_at": 406738, "created_at": 936832} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} GetSession: speakeasy-default-get-session: parameters: @@ -1393,6 +1376,16 @@ examples: application/json: {"object": "session", "id": "", "user_id": "", "client_id": "", "status": "abandoned", "last_active_at": 189595, "expire_at": 187097, "abandon_at": 227138, "updated_at": 756755, "created_at": 394054} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + CreateSessionToken: + speakeasy-default-create-session-token: + parameters: + path: + session_id: "" + responses: + "200": + application/json: {} + "401": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} CreateSessionTokenFromTemplate: speakeasy-default-create-session-token-from-template: parameters: @@ -1400,20 +1393,20 @@ examples: session_id: "" template_name: "" responses: - "401": - application/json: {"errors": []} "200": application/json: {} + "401": + application/json: {"errors": []} GetTemplateList: speakeasy-default-get-template-list: parameters: path: template_type: "sms" responses: + "200": + application/json: [{}, {}] "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} - "200": - application/json: [{}, {}, {}] RevertTemplate: speakeasy-default-revert-template: parameters: @@ -1421,10 +1414,10 @@ examples: template_type: "email" slug: "" responses: - "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} GetTemplate: speakeasy-default-get-template: parameters: @@ -1432,10 +1425,10 @@ examples: template_type: "sms" slug: "" responses: - "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} ToggleTemplateDelivery: speakeasy-default-toggle-template-delivery: parameters: @@ -1443,10 +1436,10 @@ examples: template_type: "sms" slug: "" responses: - "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} UpsertTemplate: speakeasy-default-upsert-template: parameters: @@ -1454,10 +1447,10 @@ examples: template_type: "sms" slug: "" responses: - "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} PreviewTemplate: speakeasy-default-preview-template: parameters: @@ -1465,15 +1458,22 @@ examples: template_type: "" slug: "" responses: - "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} GetUserList: "": parameters: query: + last_active_at_before: 1700690400000 + last_active_at_after: 1700690400000 last_active_at_since: 1700690400000 + created_at_before: 1730160000000 + created_at_after: 1730160000000 + limit: 10 + offset: 0 + order_by: "-created_at" responses: "200": application/json: [{"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000}, {"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000}, {"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000}] @@ -1481,6 +1481,8 @@ examples: application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} CreateUser: speakeasy-default-create-user: + requestBody: + application/json: {} responses: "200": application/json: {"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} @@ -1508,6 +1510,8 @@ examples: parameters: path: user_id: "" + requestBody: + application/json: {"notify_primary_email_address_changed": false} responses: "200": application/json: {"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} @@ -1568,6 +1572,8 @@ examples: parameters: path: user_id: "" + requestBody: + multipart/form-data: {} responses: "200": application/json: {"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} @@ -1600,19 +1606,21 @@ examples: user_id: "" provider: "" responses: - "400": - application/json: {"errors": []} "200": application/json: [{}] + "400": + application/json: {"errors": []} UsersGetOrganizationMemberships: speakeasy-default-users-get-organization-memberships: parameters: path: user_id: "" - query: {} + query: + limit: 10 + offset: 0 responses: "200": - application/json: {"total_count": 324528} + application/json: {"data": [{}], "total_count": 324528} "403": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} UsersGetOrganizationInvitations: @@ -1620,10 +1628,12 @@ examples: parameters: path: user_id: "" - query: {} + query: + limit: 10 + offset: 0 responses: "200": - application/json: {"total_count": 375907} + application/json: {"data": [{}], "total_count": 375907} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} VerifyPassword: @@ -1631,45 +1641,45 @@ examples: parameters: path: user_id: "" - requestBody: - application/json: {"password": "fSBhIihdxMPlTHN"} responses: - "500": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "500": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} VerifyTOTP: speakeasy-default-verify-TOTP: parameters: path: user_id: "" - requestBody: - application/json: {"code": ""} responses: - "500": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "500": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} DisableMFA: speakeasy-default-disable-MFA: parameters: path: user_id: "" responses: - "404": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "404": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + "500": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} DeleteBackupCode: speakeasy-default-delete-backup-code: parameters: path: user_id: "" responses: - "404": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "404": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + "500": + application/json: {"errors": []} UserPasskeyDelete: speakeasy-default-user-passkey-delete: parameters: @@ -1681,6 +1691,8 @@ examples: application/json: {"object": "", "deleted": true} "403": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + "500": + application/json: {"errors": []} UserWeb3WalletDelete: speakeasy-default-user-web3-wallet-delete: parameters: @@ -1692,15 +1704,7 @@ examples: application/json: {"object": "", "deleted": false} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} - CreateUserTOTP: - speakeasy-default-create-user-TOTP: - parameters: - path: - user_id: "" - responses: - "200": - application/json: {"object": "", "id": "", "secret": "", "uri": "https://creamy-merit.net", "verified": false, "key": "", "key1": ""} - "403": + "500": application/json: {"errors": []} DeleteTOTP: speakeasy-default-delete-TOTP: @@ -1708,10 +1712,12 @@ examples: path: user_id: "" responses: - "404": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "404": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + "500": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} DeleteExternalAccount: speakeasy-default-delete-external-account: parameters: @@ -1723,10 +1729,10 @@ examples: application/json: {"object": "", "deleted": false} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + "500": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} CreateInvitation: speakeasy-default-create-invitation: - requestBody: - application/json: {"email_address": "Loyal79@yahoo.com"} responses: "200": application/json: {"object": "invitation", "id": "", "email_address": "Loyal79@yahoo.com", "revoked": false, "status": "pending", "created_at": 86, "updated_at": 169727} @@ -1734,9 +1740,20 @@ examples: application/json: {"errors": []} ListInvitations: speakeasy-default-list-invitations: + parameters: + query: + limit: 10 + offset: 0 responses: "200": application/json: [{"object": "invitation", "id": "", "email_address": "Marie.Fay@yahoo.com", "revoked": false, "status": "pending", "created_at": 17577, "updated_at": 718303}, {"object": "invitation", "id": "", "email_address": "Annetta_Langosh0@gmail.com", "revoked": false, "status": "pending", "created_at": 367745, "updated_at": 485729}, {"object": "invitation", "id": "", "email_address": "Tommie.Terry5@gmail.com", "revoked": false, "status": "pending", "created_at": 860596, "updated_at": 18278}] + CreateBulkInvitations: + speakeasy-default-create-bulk-invitations: + responses: + "200": + application/json: [{"object": "invitation", "id": "", "email_address": "Jeff_Schiller50@gmail.com", "revoked": false, "status": "pending", "created_at": 250657, "updated_at": 375981}, {"object": "invitation", "id": "", "email_address": "Adriana79@gmail.com", "revoked": false, "status": "pending", "created_at": 335194, "updated_at": 394575}] + "400": + application/json: {"errors": []} RevokeInvitation: speakeasy-default-revoke-invitation: parameters: @@ -1749,32 +1766,39 @@ examples: application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} ListInstanceOrganizationInvitations: speakeasy-default-list-instance-organization-invitations: + parameters: + query: + limit: 10 + offset: 0 + order_by: "-created_at" responses: "200": - application/json: {"total_count": 59215} + application/json: {"data": [{}], "total_count": 59215} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + "500": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} CreateOrganizationInvitation: speakeasy-default-create-organization-invitation: parameters: path: organization_id: "" - requestBody: - application/json: {"email_address": "Loyal79@yahoo.com", "role": ""} responses: - "400": - application/json: {"errors": []} "200": application/json: {} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} ListOrganizationInvitations: speakeasy-default-list-organization-invitations: parameters: path: organization_id: "" - query: {} + query: + limit: 10 + offset: 0 responses: "200": - application/json: {"total_count": 547272} + application/json: {"data": [{}, {}, {}], "total_count": 547272} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} CreateOrganizationInvitationBulk: @@ -1786,7 +1810,7 @@ examples: application/json: [] responses: "200": - application/json: {"data": [], "total_count": 932144} + application/json: {"data": [{}, {}, {}], "total_count": 932144} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} ListPendingOrganizationInvitations: @@ -1794,7 +1818,9 @@ examples: parameters: path: organization_id: "" - query: {} + query: + limit: 10 + offset: 0 responses: "200": application/json: {"data": [], "total_count": 847073} @@ -1807,10 +1833,10 @@ examples: organization_id: "" invitation_id: "" responses: - "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} RevokeOrganizationInvitation: speakeasy-default-revoke-organization-invitation: parameters: @@ -1818,35 +1844,31 @@ examples: organization_id: "" invitation_id: "" responses: - "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} ListAllowlistIdentifiers: speakeasy-default-list-allowlist-identifiers: responses: - "401": - application/json: {"errors": []} "200": application/json: [{}, {}, {}] + "401": + application/json: {"errors": []} CreateAllowlistIdentifier: speakeasy-default-create-allowlist-identifier: - requestBody: - application/json: {"identifier": ""} responses: - "400": - application/json: {"errors": []} "200": application/json: {} + "400": + application/json: {"errors": []} CreateBlocklistIdentifier: speakeasy-default-create-blocklist-identifier: - requestBody: - application/json: {"identifier": ""} responses: - "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} DeleteBlocklistIdentifier: speakeasy-default-delete-blocklist-identifier: parameters: @@ -1871,16 +1893,16 @@ examples: speakeasy-default-list-blocklist-identifiers: responses: "200": - application/json: {"total_count": 547272} + application/json: {"data": [{}, {}, {}], "total_count": 547272} "401": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} UpdateInstanceAuthConfig: speakeasy-default-update-instance-auth-config: responses: - "402": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "402": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} UpdateProductionInstanceDomain: speakeasy-default-update-production-instance-domain: responses: @@ -1894,10 +1916,10 @@ examples: CreateActorToken: speakeasy-default-create-actor-token: requestBody: - application/json: {"user_id": ""} + application/json: {"user_id": "", "actor": {}, "expires_in_seconds": 3600, "session_max_duration_in_seconds": 1800} responses: "200": - application/json: {"object": "actor_token", "id": "", "status": "accepted", "user_id": "", "created_at": 638424, "updated_at": 417458} + application/json: {"object": "actor_token", "id": "", "status": "accepted", "user_id": "", "actor": {}, "created_at": 638424, "updated_at": 417458} "400": application/json: {"errors": []} RevokeActorToken: @@ -1907,7 +1929,7 @@ examples: actor_token_id: "" responses: "200": - application/json: {"object": "actor_token", "id": "", "status": "revoked", "user_id": "", "created_at": 32810, "updated_at": 124611} + application/json: {"object": "actor_token", "id": "", "status": "revoked", "user_id": "", "actor": {}, "created_at": 32810, "updated_at": 124611} "400": application/json: {"errors": []} ListDomains: @@ -1917,8 +1939,6 @@ examples: application/json: {"data": [{"object": "domain", "id": "", "name": "", "is_satellite": false, "frontend_api_url": "https://definite-deer.com", "development_origin": ""}, {"object": "domain", "id": "", "name": "", "is_satellite": false, "frontend_api_url": "https://agile-publicity.com", "development_origin": ""}, {"object": "domain", "id": "", "name": "", "is_satellite": true, "frontend_api_url": "https://memorable-overcoat.com", "development_origin": ""}], "total_count": 54607} AddDomain: speakeasy-default-add-domain: - requestBody: - application/json: {"name": "", "is_satellite": false} responses: "200": application/json: {"object": "domain", "id": "", "name": "", "is_satellite": false, "frontend_api_url": "https://super-validity.name", "development_origin": ""} @@ -1939,11 +1959,18 @@ examples: parameters: path: domain_id: "" + requestBody: + application/json: {} responses: "200": application/json: {"object": "domain", "id": "", "name": "", "is_satellite": false, "frontend_api_url": "https://grown-worth.name", "development_origin": ""} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + GetInstance: + speakeasy-default-get-instance: + responses: + "200": + application/json: {"environment_type": "development", "allowed_origins": ["http://localhost:3000", "https://some-domain"]} UpdateInstance: speakeasy-default-update-instance: responses: @@ -1952,16 +1979,16 @@ examples: UpdateInstanceRestrictions: speakeasy-default-update-instance-restrictions: responses: - "402": - application/json: {"errors": []} "200": application/json: {} + "402": + application/json: {"errors": []} UpdateInstanceOrganizationSettings: speakeasy-default-update-instance-organization-settings: responses: "200": application/json: {"object": "organization_settings", "enabled": false, "max_allowed_memberships": 58305, "creator_role": "", "admin_delete_enabled": true, "domains_enabled": false, "domains_enrollment_modes": [], "domains_default_role": ""} - "402": + "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} CreateSvixApp: speakeasy-default-create-svix-app: @@ -1986,12 +2013,12 @@ examples: speakeasy-default-list-JWT-templates: responses: "200": - application/json: [{"object": "jwt_template", "id": "", "name": "", "lifetime": 547272, "allowed_clock_skew": 678317, "created_at": 177706, "updated_at": 229716}, {"object": "jwt_template", "id": "", "name": "", "lifetime": 152837, "allowed_clock_skew": 635532, "created_at": 639387, "updated_at": 17577}, {"object": "jwt_template", "id": "", "name": "", "lifetime": 718303, "allowed_clock_skew": 86140, "created_at": 68504, "updated_at": 687960}] + application/json: [{"object": "jwt_template", "id": "", "name": "", "claims": {}, "lifetime": 547272, "allowed_clock_skew": 678317, "created_at": 177706, "updated_at": 229716}, {"object": "jwt_template", "id": "", "name": "", "claims": {}, "lifetime": 152837, "allowed_clock_skew": 635532, "created_at": 639387, "updated_at": 17577}, {"object": "jwt_template", "id": "", "name": "", "claims": {}, "lifetime": 718303, "allowed_clock_skew": 86140, "created_at": 68504, "updated_at": 687960}] CreateJWTTemplate: speakeasy-default-create-JWT-template: responses: "200": - application/json: {"object": "jwt_template", "id": "", "name": "", "lifetime": 486589, "allowed_clock_skew": 638424, "created_at": 417458, "updated_at": 134365} + application/json: {"object": "jwt_template", "id": "", "name": "", "claims": {}, "lifetime": 486589, "allowed_clock_skew": 638424, "created_at": 417458, "updated_at": 134365} "400": application/json: {"errors": []} GetJWTTemplate: @@ -2001,7 +2028,7 @@ examples: template_id: "" responses: "200": - application/json: {"object": "jwt_template", "id": "", "name": "", "lifetime": 700347, "allowed_clock_skew": 558834, "created_at": 544221, "updated_at": 521235} + application/json: {"object": "jwt_template", "id": "", "name": "", "claims": {}, "lifetime": 700347, "allowed_clock_skew": 558834, "created_at": 544221, "updated_at": 521235} "404": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} UpdateJWTTemplate: @@ -2011,7 +2038,7 @@ examples: template_id: "" responses: "200": - application/json: {"object": "jwt_template", "id": "", "name": "", "lifetime": 857478, "allowed_clock_skew": 597129, "created_at": 344620, "updated_at": 991464} + application/json: {"object": "jwt_template", "id": "", "name": "", "claims": {}, "lifetime": 857478, "allowed_clock_skew": 597129, "created_at": 344620, "updated_at": 991464} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} DeleteJWTTemplate: @@ -2026,20 +2053,23 @@ examples: application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} ListOrganizations: speakeasy-default-list-organizations: + parameters: + query: + limit: 10 + offset: 0 + order_by: "-created_at" responses: "200": - application/json: {"data": [{"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 547272, "created_at": 678317, "updated_at": 177706}, {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 229716, "created_at": 152837, "updated_at": 635532}, {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 639387, "created_at": 17577, "updated_at": 718303}], "total_count": 86140} + application/json: {"data": [{"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 547272, "public_metadata": {"key": "", "key1": ""}, "private_metadata": {}, "created_at": 229716, "updated_at": 152837}, {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 635532, "public_metadata": {"key": "", "key1": ""}, "private_metadata": {}, "created_at": 718303, "updated_at": 86140}, {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 68504, "public_metadata": {"key": "", "key1": ""}, "private_metadata": {"key": "", "key1": ""}, "created_at": 633911, "updated_at": 7468}], "total_count": 54607} "400": - application/json: {"errors": []} + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} CreateOrganization: speakeasy-default-create-organization: - requestBody: - application/json: {"name": "", "created_by": ""} responses: "200": - application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 486589, "created_at": 638424, "updated_at": 417458} + application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 486589, "public_metadata": {"key": "", "key1": ""}, "private_metadata": {"key": ""}, "created_at": 134365, "updated_at": 69025} "400": - application/json: {"errors": []} + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} GetOrganization: speakeasy-default-get-organization: parameters: @@ -2048,19 +2078,21 @@ examples: query: {} responses: "200": - application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 700347, "created_at": 558834, "updated_at": 544221} + application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 700347, "public_metadata": {"key": "", "key1": ""}, "private_metadata": {"key": "", "key1": ""}, "created_at": 521235, "updated_at": 969961} "403": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} UpdateOrganization: speakeasy-default-update-organization: parameters: path: organization_id: "" + requestBody: + application/json: {} responses: "200": - application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 857478, "created_at": 597129, "updated_at": 344620} + application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 857478, "public_metadata": {"key": "", "key1": ""}, "private_metadata": {"key": ""}, "created_at": 991464, "updated_at": 627690} "402": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} DeleteOrganization: speakeasy-default-delete-organization: parameters: @@ -2076,21 +2108,21 @@ examples: parameters: path: organization_id: "" + requestBody: + application/json: {} responses: "200": - application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 897387, "created_at": 709004, "updated_at": 906329} + application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 897387, "public_metadata": {"key": "", "key1": ""}, "private_metadata": {"key": "", "key1": "", "key2": ""}, "created_at": 48359, "updated_at": 413751} "400": - application/json: {"errors": []} + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} UploadOrganizationLogo: speakeasy-default-upload-organization-logo: parameters: path: organization_id: "" - requestBody: - multipart/form-data: {"file": {"": "0x0DDEE4e6Ea"}} responses: "200": - application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 23224, "created_at": 881128, "updated_at": 868828, "image_url": "https://unused-cricket.net"} + application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 23224, "public_metadata": {"key": "", "key1": "", "key2": ""}, "private_metadata": {"key": "", "key1": "", "key2": ""}, "created_at": 939286, "updated_at": 909136, "image_url": "https://red-epic.org/"} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} DeleteOrganizationLogo: @@ -2100,7 +2132,7 @@ examples: organization_id: "" responses: "200": - application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 882224, "created_at": 869518, "updated_at": 874204} + application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 882224, "public_metadata": {"key": "", "key1": "", "key2": ""}, "private_metadata": {"key": "", "key1": "", "key2": ""}, "created_at": 279959, "updated_at": 569486} "404": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} CreateOrganizationMembership: @@ -2111,19 +2143,21 @@ examples: requestBody: application/json: {"user_id": "", "role": ""} responses: - "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} ListOrganizationMemberships: speakeasy-default-list-organization-memberships: parameters: path: organization_id: "" - query: {} + query: + limit: 10 + offset: 0 responses: "200": - application/json: {"total_count": 547272} + application/json: {"data": [{}, {}, {}], "total_count": 547272} "401": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} UpdateOrganizationMembership: @@ -2135,10 +2169,10 @@ examples: requestBody: application/json: {"role": ""} responses: - "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "404": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} DeleteOrganizationMembership: speakeasy-default-delete-organization-membership: parameters: @@ -2146,10 +2180,10 @@ examples: organization_id: "" user_id: "" responses: - "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "401": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} UpdateOrganizationMembershipMetadata: speakeasy-default-update-organization-membership-metadata: parameters: @@ -2157,36 +2191,46 @@ examples: organization_id: "" user_id: "" responses: - "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} InstanceGetOrganizationMemberships: speakeasy-default-instance-get-organization-memberships: + parameters: + query: + limit: 10 + offset: 0 responses: "200": - application/json: {"total_count": 59215} + application/json: {"data": [{}], "total_count": 59215} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + "500": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} CreateOrganizationDomain: speakeasy-default-create-organization-domain: parameters: path: organization_id: "" + requestBody: + application/json: {} responses: - "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} ListOrganizationDomains: speakeasy-default-list-organization-domains: parameters: path: organization_id: "" - query: {} + query: + limit: 10 + offset: 0 responses: "200": - application/json: {"total_count": 547272} + application/json: {"data": [{}, {}, {}], "total_count": 547272} "401": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} DeleteOrganizationDomain: @@ -2206,11 +2250,13 @@ examples: path: organization_id: "" domain_id: "" + requestBody: + application/json: {} responses: - "400": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} "200": application/json: {} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} VerifyDomainProxy: speakeasy-default-verify-domain-proxy: responses: @@ -2274,25 +2320,29 @@ examples: id: "" responses: "200": - application/json: {"object": "sign_up_attempt", "id": "", "status": "abandoned", "password_enabled": false, "custom_action": true, "abandon_at": 991464} + application/json: {"object": "sign_up_attempt", "id": "", "status": "abandoned", "password_enabled": false, "custom_action": true, "abandon_at": 991464, "legal_accepted_at": 1700690400000} "403": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} ListOAuthApplications: speakeasy-default-list-O-auth-applications: + parameters: + query: + limit: 10 + offset: 0 responses: "200": - application/json: {"data": [{"object": "oauth_application", "id": "", "instance_id": "", "name": "", "client_id": "", "public": false, "scopes": "", "callback_url": "https://definite-deer.com", "authorize_url": "https://productive-affect.net", "token_fetch_url": "https://black-poetry.name/", "user_info_url": "https://acidic-avalanche.info", "created_at": 485729, "updated_at": 73227}, {"object": "oauth_application", "id": "", "instance_id": "", "name": "", "client_id": "", "public": false, "scopes": "", "callback_url": "https://ugly-jungle.com", "authorize_url": "https://torn-affiliate.org/", "token_fetch_url": "https://unwilling-comparison.com/", "user_info_url": "https://concrete-incandescence.info", "created_at": 432930, "updated_at": 480616}, {"object": "oauth_application", "id": "", "instance_id": "", "name": "", "client_id": "", "public": true, "scopes": "", "callback_url": "https://tempting-handle.org", "authorize_url": "https://imaginative-cap.biz/", "token_fetch_url": "https://animated-ostrich.org", "user_info_url": "https://bowed-poppy.name", "created_at": 838930, "updated_at": 816637}], "total_count": 996014} + application/json: {"data": [{"object": "oauth_application", "id": "", "instance_id": "", "name": "", "client_id": "", "public": false, "scopes": "", "redirect_uris": ["", ""], "callback_url": "https://energetic-circumference.name/", "authorize_url": "https://agile-publicity.com", "token_fetch_url": "https://roasted-language.name/", "user_info_url": "https://awful-fund.info/", "discovery_url": "https://victorious-merit.org/", "token_introspection_url": "https://average-fedora.org/", "created_at": 18278, "updated_at": 897196}, {"object": "oauth_application", "id": "", "instance_id": "", "name": "", "client_id": "", "public": true, "scopes": "", "redirect_uris": ["", "", ""], "callback_url": "https://blue-technologist.com/", "authorize_url": "https://instructive-hospitalization.info/", "token_fetch_url": "https://moist-sprinkles.info/", "user_info_url": "https://funny-grandson.com", "discovery_url": "https://unwilling-almighty.name/", "token_introspection_url": "https://urban-blossom.net", "created_at": 567701, "updated_at": 838930}, {"object": "oauth_application", "id": "", "instance_id": "", "name": "", "client_id": "", "public": false, "scopes": "", "redirect_uris": ["", "", ""], "callback_url": "https://dark-bench.org/", "authorize_url": "https://coordinated-phrase.biz", "token_fetch_url": "https://necessary-basket.com", "user_info_url": "https://yellowish-representation.biz/", "discovery_url": "https://bustling-plastic.info/", "token_introspection_url": "https://stunning-vanadyl.net/", "created_at": 505778, "updated_at": 948614}], "total_count": 900109} "400": application/json: {"errors": []} CreateOAuthApplication: speakeasy-default-create-O-auth-application: requestBody: - application/json: {"name": "", "callback_url": "https://probable-heating.com/", "scopes": "profile email public_metadata"} + application/json: {"name": "", "scopes": "profile email public_metadata"} responses: "200": - application/json: {"object": "oauth_application", "id": "", "instance_id": "", "name": "", "client_id": "", "public": true, "scopes": "", "callback_url": "https://well-documented-cd.biz", "authorize_url": "https://stable-skean.name/", "token_fetch_url": "https://well-worn-formation.biz", "user_info_url": "https://enlightened-curl.com/", "created_at": 322997, "updated_at": 185693} + application/json: {"object": "oauth_application", "id": "", "instance_id": "", "name": "", "client_id": "", "public": true, "scopes": "", "redirect_uris": ["", ""], "callback_url": "https://concerned-battle.net/", "authorize_url": "https://abandoned-comestible.com", "token_fetch_url": "https://substantial-morbidity.net", "user_info_url": "https://harmful-disposer.com", "discovery_url": "https://each-barracks.biz/", "token_introspection_url": "https://blind-breastplate.name/", "created_at": 339236, "updated_at": 36521} "400": - application/json: {"errors": []} + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} GetOAuthApplication: speakeasy-default-get-O-auth-application: parameters: @@ -2300,7 +2350,7 @@ examples: oauth_application_id: "" responses: "200": - application/json: {"object": "oauth_application", "id": "", "instance_id": "", "name": "", "client_id": "", "public": false, "scopes": "", "callback_url": "https://necessary-lender.org", "authorize_url": "https://knowledgeable-diversity.biz/", "token_fetch_url": "https://jittery-sermon.com", "user_info_url": "https://genuine-bowler.name/", "created_at": 805876, "updated_at": 380699} + application/json: {"object": "oauth_application", "id": "", "instance_id": "", "name": "", "client_id": "", "public": false, "scopes": "", "redirect_uris": ["", ""], "callback_url": "https://misguided-violin.info", "authorize_url": "https://fatal-custom.org/", "token_fetch_url": "https://stiff-bidet.biz/", "user_info_url": "https://burdensome-marketplace.net/", "discovery_url": "https://similar-nucleotidase.name/", "token_introspection_url": "https://glossy-concentration.biz/", "created_at": 780262, "updated_at": 284041} "403": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} UpdateOAuthApplication: @@ -2312,9 +2362,9 @@ examples: application/json: {"scopes": "profile email public_metadata private_metadata"} responses: "200": - application/json: {"object": "oauth_application", "id": "", "instance_id": "", "name": "", "client_id": "", "public": false, "scopes": "", "callback_url": "https://grown-worth.name", "authorize_url": "https://worthwhile-avalanche.org/", "token_fetch_url": "https://general-digit.com/", "user_info_url": "https://uniform-euphonium.info", "created_at": 771203, "updated_at": 693508} - "403": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + application/json: {"object": "oauth_application", "id": "", "instance_id": "", "name": "", "client_id": "", "public": false, "scopes": "", "redirect_uris": ["", ""], "callback_url": "https://yearly-order.info/", "authorize_url": "https://awful-technician.info", "token_fetch_url": "https://extra-large-chapel.net/", "user_info_url": "https://front-injunction.net", "discovery_url": "https://impressionable-almighty.net", "token_introspection_url": "https://joyful-knight.com", "created_at": 232374, "updated_at": 352933} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} DeleteOAuthApplication: speakeasy-default-delete-O-auth-application: parameters: @@ -2332,11 +2382,15 @@ examples: oauth_application_id: "" responses: "200": - application/json: {"object": "oauth_application", "id": "", "instance_id": "", "name": "", "client_id": "", "public": false, "scopes": "", "callback_url": "https://memorable-tray.biz/", "authorize_url": "https://round-plumber.info", "token_fetch_url": "https://annual-councilman.com", "user_info_url": "https://blank-lifestyle.name", "created_at": 522183, "updated_at": 873135} + application/json: {"object": "oauth_application", "id": "", "instance_id": "", "name": "", "client_id": "", "public": false, "scopes": "", "redirect_uris": [], "callback_url": "https://vibrant-concentration.org", "authorize_url": "https://right-hippodrome.net", "token_fetch_url": "https://dismal-casement.org/", "user_info_url": "https://monthly-mantua.name/", "discovery_url": "https://sunny-passport.com", "token_introspection_url": "https://subtle-cornet.com", "created_at": 740726, "updated_at": 589500} "403": - application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} ListSAMLConnections: speakeasy-default-list-SAML-connections: + parameters: + query: + limit: 10 + offset: 0 responses: "200": application/json: {"data": [{"object": "saml_connection", "id": "", "name": "", "domain": "neglected-plastic.biz", "idp_entity_id": "", "idp_sso_url": "https://crooked-overload.name/", "idp_certificate": "", "acs_url": "https://secret-bob.com/", "sp_entity_id": "", "sp_metadata_url": "https://memorable-overcoat.com", "active": true, "provider": "", "user_count": 367745, "sync_user_attributes": true, "created_at": 73227, "updated_at": 931165}, {"object": "saml_connection", "id": "", "name": "", "domain": "odd-sustenance.info", "idp_entity_id": "", "idp_sso_url": "https://glorious-strategy.com/", "idp_certificate": "", "acs_url": "https://insistent-tinderbox.biz", "sp_entity_id": "", "sp_metadata_url": "https://unpleasant-chairperson.info/", "active": true, "provider": "", "user_count": 432930, "sync_user_attributes": true, "created_at": 103421, "updated_at": 523875}, {"object": "saml_connection", "id": "", "name": "", "domain": "tempting-handle.org", "idp_entity_id": "", "idp_sso_url": "https://imaginative-cap.biz/", "idp_certificate": "", "acs_url": "https://animated-ostrich.org", "sp_entity_id": "", "sp_metadata_url": "https://bowed-poppy.name", "active": false, "provider": "", "user_count": 816637, "sync_user_attributes": false, "created_at": 81309, "updated_at": 164965}], "total_count": 73973} @@ -2344,8 +2398,6 @@ examples: application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} CreateSAMLConnection: speakeasy-default-create-SAML-connection: - requestBody: - application/json: {"name": "", "domain": "low-packaging.info", "provider": "saml_custom"} responses: "200": application/json: {"object": "saml_connection", "id": "", "name": "", "domain": "low-packaging.info", "idp_entity_id": "", "idp_sso_url": "https://black-and-white-secrecy.org/", "idp_certificate": "", "acs_url": "https://deafening-bonnet.net/", "sp_entity_id": "", "sp_metadata_url": "https://outrageous-resolve.org", "active": true, "provider": "", "user_count": 259629, "sync_user_attributes": true, "created_at": 230313, "updated_at": 211337} @@ -2366,6 +2418,8 @@ examples: parameters: path: saml_connection_id: "" + requestBody: + application/json: {} responses: "200": application/json: {"object": "saml_connection", "id": "", "name": "", "domain": "tinted-nectarine.info", "idp_entity_id": "", "idp_sso_url": "https://powerless-juggernaut.org", "idp_certificate": "", "acs_url": "https://unlucky-hydrolyze.biz/", "sp_entity_id": "", "sp_metadata_url": "https://cool-scout.org/", "active": true, "provider": "", "user_count": 464385, "sync_user_attributes": false, "created_at": 693508, "updated_at": 404265} @@ -2386,4 +2440,22 @@ examples: responses: "200": application/json: {"object": "testing_token", "token": "1713877200-c_2J2MvPu9PnXcuhbPZNao0LOXqK9A7YrnBn0HmIWxy", "expires_at": 1713880800} + ListWaitlistEntries: + speakeasy-default-list-waitlist-entries: + parameters: + query: + limit: 10 + offset: 0 + order_by: "-created_at" + responses: + "200": + application/json: {"data": [{"object": "waitlist_entry", "id": "", "email_address": "Jaylen_Daniel-Haag@yahoo.com", "status": "pending", "created_at": 543511, "updated_at": 155167, "invitation": {"object": "invitation", "id": "", "email_address": "Enid.Bernhard5@gmail.com", "revoked": false, "status": "pending", "created_at": 882329, "updated_at": 914872}}, {"object": "waitlist_entry", "id": "", "email_address": "Emelie.Turner-Conn88@hotmail.com", "status": "pending", "created_at": 299308, "updated_at": 990594, "invitation": {"object": "invitation", "id": "", "email_address": "Dangelo68@gmail.com", "revoked": false, "status": "pending", "created_at": 477932, "updated_at": 622898}}], "total_count": 61934} + CreateWaitlistEntry: + speakeasy-default-create-waitlist-entry: + responses: + "200": + application/json: {"object": "waitlist_entry", "id": "", "email_address": "Demond_Willms@hotmail.com", "status": "pending", "created_at": 469096, "updated_at": 843035, "invitation": {"object": "invitation", "id": "", "email_address": "Jamel.OConnell47@yahoo.com", "revoked": false, "status": "pending", "created_at": 343613, "updated_at": 621525}} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} +examplesVersion: 1.0.0 generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index adea7cb5..3cce97a8 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false java: - version: 1.5.0 + version: 1.6.0 additionalDependencies: [] additionalPlugins: [] artifactID: backend-api diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 81ba2986..0e903f2d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.456.1 +speakeasyVersion: 1.484.1 sources: clerk-java-sdk: sourceNamespace: clerk-java-sdk - sourceRevisionDigest: sha256:bfefe98b41e740defff0a03f01252a3b6267134984b14ede64221006fa1ac063 - sourceBlobDigest: sha256:ff770ca4e1220e72028c4285967fd63f63c68a1d27da9815d826384905cadcfa + sourceRevisionDigest: sha256:3815e8e817585b7486da13da33323e2a36eccc00aa885fd093ba6e90c7e46432 + sourceBlobDigest: sha256:e1f23b2e97f6cb972032f14926eda3b920d6fcc5d11174846d19261a8666ce7a tags: - latest - - speakeasy-sdk-regen-1733789375 + - speakeasy-sdk-regen-1737677328 - v1 targets: clerk-java: source: clerk-java-sdk sourceNamespace: clerk-java-sdk - sourceRevisionDigest: sha256:bfefe98b41e740defff0a03f01252a3b6267134984b14ede64221006fa1ac063 - sourceBlobDigest: sha256:ff770ca4e1220e72028c4285967fd63f63c68a1d27da9815d826384905cadcfa + sourceRevisionDigest: sha256:3815e8e817585b7486da13da33323e2a36eccc00aa885fd093ba6e90c7e46432 + sourceBlobDigest: sha256:e1f23b2e97f6cb972032f14926eda3b920d6fcc5d11174846d19261a8666ce7a codeSamplesNamespace: clerk-java-sdk-code-samples - codeSamplesRevisionDigest: sha256:bf210dc764b909e1d20c7c06ab5e5d040243afc06d7fe23c731f289006918af8 + codeSamplesRevisionDigest: sha256:0f08bd16579a9215acbeef42efc0b88c8ff1be1e620093ffffddec83b2a4a06c my-first-target: source: clerk-java-sdk sourceNamespace: clerk-java-sdk diff --git a/README.md b/README.md index 6b704c8f..1efe4a7a 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.clerk:backend-api:1.5.0' +implementation 'com.clerk:backend-api:1.6.0' ``` Maven: @@ -60,7 +60,7 @@ Maven: com.clerk backend-api - 1.5.0 + 1.6.0 ``` @@ -240,6 +240,7 @@ If the request is correctly authenticated, the token's claims are made available ### [instanceSettings()](docs/sdks/instancesettings/README.md) +* [getInstance](docs/sdks/instancesettings/README.md#getinstance) - Fetch the current instance * [update](docs/sdks/instancesettings/README.md#update) - Update instance settings * [updateRestrictions](docs/sdks/instancesettings/README.md#updaterestrictions) - Update instance restrictions * [updateOrganizationSettings](docs/sdks/instancesettings/README.md#updateorganizationsettings) - Update instance organization settings @@ -248,6 +249,7 @@ If the request is correctly authenticated, the token's claims are made available * [create](docs/sdks/invitations/README.md#create) - Create an invitation * [list](docs/sdks/invitations/README.md#list) - List all invitations +* [createBulkInvitations](docs/sdks/invitations/README.md#createbulkinvitations) - Create multiple invitations * [revoke](docs/sdks/invitations/README.md#revoke) - Revokes an invitation ### [jwks()](docs/sdks/jwks/README.md) @@ -347,9 +349,11 @@ If the request is correctly authenticated, the token's claims are made available ### [sessions()](docs/sdks/sessions/README.md) * [list](docs/sdks/sessions/README.md#list) - List all sessions +* [createSession](docs/sdks/sessions/README.md#createsession) - Create a new active session * [get](docs/sdks/sessions/README.md#get) - Retrieve a session * [revoke](docs/sdks/sessions/README.md#revoke) - Revoke a session * [~~verify~~](docs/sdks/sessions/README.md#verify) - Verify a session :warning: **Deprecated** +* [createSessionToken](docs/sdks/sessions/README.md#createsessiontoken) - Create a session token * [createTokenFromTemplate](docs/sdks/sessions/README.md#createtokenfromtemplate) - Create a session token from a jwt template ### [signInTokens()](docs/sdks/signintokens/README.md) @@ -393,10 +397,14 @@ If the request is correctly authenticated, the token's claims are made available * [deleteBackupCodes](docs/sdks/users/README.md#deletebackupcodes) - Disable all user's Backup codes * [deletePasskey](docs/sdks/users/README.md#deletepasskey) - Delete a user passkey * [deleteWeb3Wallet](docs/sdks/users/README.md#deleteweb3wallet) - Delete a user web3 wallet -* [createTOTP](docs/sdks/users/README.md#createtotp) - Create a TOTP for a user * [deleteTotp](docs/sdks/users/README.md#deletetotp) - Delete all the user's TOTPs * [deleteExternalAccount](docs/sdks/users/README.md#deleteexternalaccount) - Delete External Account +### [waitlistEntries()](docs/sdks/waitlistentries/README.md) + +* [listWaitlistEntries](docs/sdks/waitlistentries/README.md#listwaitlistentries) - List all waitlist entries +* [createWaitlistEntry](docs/sdks/waitlistentries/README.md#createwaitlistentry) - Create a waitlist entry + ### [webhooks()](docs/sdks/webhooks/README.md) * [createSvixApp](docs/sdks/webhooks/README.md#createsvixapp) - Create a Svix app diff --git a/RELEASES.md b/RELEASES.md index 2dc93d60..a3e9e087 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -188,4 +188,14 @@ Based on: ### 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 +- [Maven Central v1.5.0] https://central.sonatype.com/artifact/com.clerk/backend-api/1.5.0 - . + +## 2025-02-06 00:08:42 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.484.1 (2.503.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v1.6.0] . +### Releases +- [Maven Central v1.6.0] https://central.sonatype.com/artifact/com.clerk/backend-api/1.6.0 - . \ No newline at end of file diff --git a/build.gradle b/build.gradle index fafd3364..4c73abff 100644 --- a/build.gradle +++ b/build.gradle @@ -63,7 +63,7 @@ tasks.withType(Javadoc) { } group = "com.clerk" -version = "1.5.0" +version = "1.6.0" sourcesJar { archiveBaseName = "backend-api" @@ -101,7 +101,7 @@ publishing { maven(MavenPublication) { groupId = 'com.clerk' artifactId = 'backend-api' - version = '1.5.0' + version = '1.6.0' from components.java @@ -144,17 +144,16 @@ if (!project.hasProperty('skip.signing')) { } } + + dependencies { - api 'com.fasterxml.jackson.core:jackson-annotations:2.17.2' - implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2' - implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2' - implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2' + api 'com.fasterxml.jackson.core:jackson-annotations:2.18.2' + implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.2' + implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2' + implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2' api('org.openapitools:jackson-databind-nullable:0.2.6') {exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'} - implementation 'org.apache.httpcomponents:httpclient:4.5.14' - implementation 'org.apache.httpcomponents:httpmime:4.5.14' - implementation 'commons-io:commons-io:2.15.1' + implementation 'org.apache.httpcomponents.client5:httpclient5:5.4.1' + implementation 'commons-io:commons-io:2.18.0' } - - apply from: 'build-extras.gradle' diff --git a/docs/models/components/EmailAddress.md b/docs/models/components/EmailAddress.md index 3ee4ae04..09d4c169 100644 --- a/docs/models/components/EmailAddress.md +++ b/docs/models/components/EmailAddress.md @@ -13,5 +13,6 @@ Success | `reserved` | *boolean* | :heavy_check_mark: | N/A | | `verification` | [Optional\](../../models/components/Verification.md) | :heavy_check_mark: | N/A | | `linkedTo` | List\<[IdentificationLink](../../models/components/IdentificationLink.md)> | :heavy_check_mark: | N/A | +| `matchesSsoConnection` | *Optional\* | :heavy_minus_sign: | Indicates whether this email address domain matches an active enterprise connection.
| | `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation
| | `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of creation
| \ No newline at end of file diff --git a/docs/models/components/FromOAuth.md b/docs/models/components/FromOAuth.md new file mode 100644 index 00000000..0f821cab --- /dev/null +++ b/docs/models/components/FromOAuth.md @@ -0,0 +1,12 @@ +# FromOAuth + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `status` | [FromOAuthVerificationStatus](../../models/components/FromOAuthVerificationStatus.md) | :heavy_check_mark: | N/A | +| `strategy` | *String* | :heavy_check_mark: | N/A | +| `error` | [JsonNullable\](../../models/components/Error.md) | :heavy_minus_sign: | N/A | +| `expireAt` | *Optional\* | :heavy_check_mark: | N/A | +| `attempts` | *JsonNullable\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/FromOAuthVerificationStatus.md b/docs/models/components/FromOAuthVerificationStatus.md new file mode 100644 index 00000000..9e86d45a --- /dev/null +++ b/docs/models/components/FromOAuthVerificationStatus.md @@ -0,0 +1,9 @@ +# FromOAuthVerificationStatus + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `UNVERIFIED` | unverified | +| `VERIFIED` | verified | \ No newline at end of file diff --git a/docs/models/components/IdentificationLink.md b/docs/models/components/IdentificationLink.md index 5f6b4ef9..a18ead22 100644 --- a/docs/models/components/IdentificationLink.md +++ b/docs/models/components/IdentificationLink.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | -| `type` | [Type](../../models/components/Type.md) | :heavy_check_mark: | N/A | -| `id` | *String* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *String* | :heavy_check_mark: | N/A | +| `id` | *String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/Instance.md b/docs/models/components/Instance.md new file mode 100644 index 00000000..eb884f4c --- /dev/null +++ b/docs/models/components/Instance.md @@ -0,0 +1,13 @@ +# Instance + +Success + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `object` | [Optional\](../../models/components/InstanceObject.md) | :heavy_minus_sign: | String representing the object's type. Objects of the same type share the same value. | | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | | +| `environmentType` | *Optional\* | :heavy_minus_sign: | N/A | development | +| `allowedOrigins` | List\<*String*> | :heavy_minus_sign: | N/A | [
"http://localhost:3000",
"https://some-domain"
] | \ No newline at end of file diff --git a/docs/models/components/InstanceObject.md b/docs/models/components/InstanceObject.md new file mode 100644 index 00000000..808ebf94 --- /dev/null +++ b/docs/models/components/InstanceObject.md @@ -0,0 +1,10 @@ +# InstanceObject + +String representing the object's type. Objects of the same type share the same value. + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `INSTANCE` | instance | \ No newline at end of file diff --git a/docs/models/components/Invitation.md b/docs/models/components/Invitation.md index 7e87fca9..87515eed 100644 --- a/docs/models/components/Invitation.md +++ b/docs/models/components/Invitation.md @@ -5,15 +5,15 @@ Success ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `object` | [InvitationObject](../../models/components/InvitationObject.md) | :heavy_check_mark: | N/A | | -| `id` | *String* | :heavy_check_mark: | N/A | | -| `emailAddress` | *String* | :heavy_check_mark: | N/A | | -| `publicMetadata` | [Optional\](../../models/components/InvitationPublicMetadata.md) | :heavy_minus_sign: | N/A | | -| `revoked` | *Optional\* | :heavy_minus_sign: | N/A | false | -| `status` | [InvitationStatus](../../models/components/InvitationStatus.md) | :heavy_check_mark: | N/A | pending | -| `url` | *JsonNullable\* | :heavy_minus_sign: | N/A | | -| `expiresAt` | *JsonNullable\* | :heavy_minus_sign: | Unix timestamp of expiration.
| | -| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| | -| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `object` | [InvitationObject](../../models/components/InvitationObject.md) | :heavy_check_mark: | N/A | | +| `id` | *String* | :heavy_check_mark: | N/A | | +| `emailAddress` | *String* | :heavy_check_mark: | N/A | | +| `publicMetadata` | Map\ | :heavy_minus_sign: | N/A | | +| `revoked` | *Optional\* | :heavy_minus_sign: | N/A | false | +| `status` | [InvitationStatus](../../models/components/InvitationStatus.md) | :heavy_check_mark: | N/A | pending | +| `url` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `expiresAt` | *JsonNullable\* | :heavy_minus_sign: | Unix timestamp of expiration.
| | +| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| | +| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| | \ No newline at end of file diff --git a/docs/models/components/InvitationPublicMetadata.md b/docs/models/components/InvitationPublicMetadata.md deleted file mode 100644 index 86cefd36..00000000 --- a/docs/models/components/InvitationPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# InvitationPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/InvitationRevoked.md b/docs/models/components/InvitationRevoked.md index c11c9b28..fc9ff8b2 100644 --- a/docs/models/components/InvitationRevoked.md +++ b/docs/models/components/InvitationRevoked.md @@ -5,15 +5,15 @@ Success ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `object` | [InvitationRevokedObject](../../models/components/InvitationRevokedObject.md) | :heavy_check_mark: | N/A | | -| `id` | *String* | :heavy_check_mark: | N/A | | -| `emailAddress` | *String* | :heavy_check_mark: | N/A | | -| `publicMetadata` | [Optional\](../../models/components/InvitationRevokedPublicMetadata.md) | :heavy_minus_sign: | N/A | | -| `revoked` | *Optional\* | :heavy_minus_sign: | N/A | true | -| `status` | [InvitationRevokedStatus](../../models/components/InvitationRevokedStatus.md) | :heavy_check_mark: | N/A | revoked | -| `url` | *JsonNullable\* | :heavy_minus_sign: | N/A | | -| `expiresAt` | *JsonNullable\* | :heavy_minus_sign: | Unix timestamp of expiration.
| | -| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| | -| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `object` | [InvitationRevokedObject](../../models/components/InvitationRevokedObject.md) | :heavy_check_mark: | N/A | | +| `id` | *String* | :heavy_check_mark: | N/A | | +| `emailAddress` | *String* | :heavy_check_mark: | N/A | | +| `publicMetadata` | Map\ | :heavy_minus_sign: | N/A | | +| `revoked` | *Optional\* | :heavy_minus_sign: | N/A | true | +| `status` | [InvitationRevokedStatus](../../models/components/InvitationRevokedStatus.md) | :heavy_check_mark: | N/A | revoked | +| `url` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `expiresAt` | *JsonNullable\* | :heavy_minus_sign: | Unix timestamp of expiration.
| | +| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| | +| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| | \ No newline at end of file diff --git a/docs/models/components/InvitationRevokedPublicMetadata.md b/docs/models/components/InvitationRevokedPublicMetadata.md deleted file mode 100644 index 7a57063c..00000000 --- a/docs/models/components/InvitationRevokedPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# InvitationRevokedPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/WellKnownJWKS.md b/docs/models/components/Jwks.md similarity index 97% rename from docs/models/components/WellKnownJWKS.md rename to docs/models/components/Jwks.md index 869d375b..6d34a69e 100644 --- a/docs/models/components/WellKnownJWKS.md +++ b/docs/models/components/Jwks.md @@ -1,4 +1,4 @@ -# WellKnownJWKS +# Jwks Get the JSON Web Key Set diff --git a/docs/models/components/Keys.md b/docs/models/components/Keys.md index a502b99b..0b3bf6b3 100644 --- a/docs/models/components/Keys.md +++ b/docs/models/components/Keys.md @@ -10,4 +10,6 @@ | `kid` | *Optional\* | :heavy_minus_sign: | N/A | | `alg` | *Optional\* | :heavy_minus_sign: | N/A | | `n` | *Optional\* | :heavy_minus_sign: | N/A | -| `e` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `e` | *Optional\* | :heavy_minus_sign: | N/A | +| `x` | *Optional\* | :heavy_minus_sign: | N/A | +| `crv` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/OAuthApplication.md b/docs/models/components/OAuthApplication.md index 44962e43..c93a1967 100644 --- a/docs/models/components/OAuthApplication.md +++ b/docs/models/components/OAuthApplication.md @@ -3,18 +3,21 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `object` | [OAuthApplicationObject](../../models/components/OAuthApplicationObject.md) | :heavy_check_mark: | N/A | -| `id` | *String* | :heavy_check_mark: | N/A | -| `instanceId` | *String* | :heavy_check_mark: | N/A | -| `name` | *String* | :heavy_check_mark: | N/A | -| `clientId` | *String* | :heavy_check_mark: | N/A | -| `public_` | *boolean* | :heavy_check_mark: | N/A | -| `scopes` | *String* | :heavy_check_mark: | N/A | -| `callbackUrl` | *String* | :heavy_check_mark: | N/A | -| `authorizeUrl` | *String* | :heavy_check_mark: | N/A | -| `tokenFetchUrl` | *String* | :heavy_check_mark: | N/A | -| `userInfoUrl` | *String* | :heavy_check_mark: | N/A | -| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| -| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `object` | [OAuthApplicationObject](../../models/components/OAuthApplicationObject.md) | :heavy_check_mark: | N/A | +| `id` | *String* | :heavy_check_mark: | N/A | +| `instanceId` | *String* | :heavy_check_mark: | N/A | +| `name` | *String* | :heavy_check_mark: | N/A | +| `clientId` | *String* | :heavy_check_mark: | N/A | +| `public_` | *boolean* | :heavy_check_mark: | N/A | +| `scopes` | *String* | :heavy_check_mark: | N/A | +| `redirectUris` | List\<*String*> | :heavy_check_mark: | N/A | +| ~~`callbackUrl`~~ | *String* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `authorizeUrl` | *String* | :heavy_check_mark: | N/A | +| `tokenFetchUrl` | *String* | :heavy_check_mark: | N/A | +| `userInfoUrl` | *String* | :heavy_check_mark: | N/A | +| `discoveryUrl` | *String* | :heavy_check_mark: | N/A | +| `tokenIntrospectionUrl` | *String* | :heavy_check_mark: | N/A | +| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| +| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| \ No newline at end of file diff --git a/docs/models/components/OAuthApplicationWithSecret.md b/docs/models/components/OAuthApplicationWithSecret.md index 68fff0e6..33e0a097 100644 --- a/docs/models/components/OAuthApplicationWithSecret.md +++ b/docs/models/components/OAuthApplicationWithSecret.md @@ -3,19 +3,22 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `object` | [OAuthApplicationWithSecretObject](../../models/components/OAuthApplicationWithSecretObject.md) | :heavy_check_mark: | N/A | -| `id` | *String* | :heavy_check_mark: | N/A | -| `instanceId` | *String* | :heavy_check_mark: | N/A | -| `name` | *String* | :heavy_check_mark: | N/A | -| `clientId` | *String* | :heavy_check_mark: | N/A | -| `public_` | *boolean* | :heavy_check_mark: | N/A | -| `scopes` | *String* | :heavy_check_mark: | N/A | -| `callbackUrl` | *String* | :heavy_check_mark: | N/A | -| `authorizeUrl` | *String* | :heavy_check_mark: | N/A | -| `tokenFetchUrl` | *String* | :heavy_check_mark: | N/A | -| `userInfoUrl` | *String* | :heavy_check_mark: | N/A | -| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| -| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| -| `clientSecret` | *Optional\* | :heavy_minus_sign: | Empty if public client.
| \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `object` | [OAuthApplicationWithSecretObject](../../models/components/OAuthApplicationWithSecretObject.md) | :heavy_check_mark: | N/A | +| `id` | *String* | :heavy_check_mark: | N/A | +| `instanceId` | *String* | :heavy_check_mark: | N/A | +| `name` | *String* | :heavy_check_mark: | N/A | +| `clientId` | *String* | :heavy_check_mark: | N/A | +| `public_` | *boolean* | :heavy_check_mark: | N/A | +| `scopes` | *String* | :heavy_check_mark: | N/A | +| `redirectUris` | List\<*String*> | :heavy_check_mark: | N/A | +| ~~`callbackUrl`~~ | *String* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `authorizeUrl` | *String* | :heavy_check_mark: | N/A | +| `tokenFetchUrl` | *String* | :heavy_check_mark: | N/A | +| `userInfoUrl` | *String* | :heavy_check_mark: | N/A | +| `discoveryUrl` | *String* | :heavy_check_mark: | N/A | +| `tokenIntrospectionUrl` | *String* | :heavy_check_mark: | N/A | +| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| +| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| +| `clientSecret` | *Optional\* | :heavy_minus_sign: | Empty if public client.
| \ No newline at end of file diff --git a/docs/models/components/Oauth.md b/docs/models/components/Oauth.md deleted file mode 100644 index a4ec4ed8..00000000 --- a/docs/models/components/Oauth.md +++ /dev/null @@ -1,13 +0,0 @@ -# Oauth - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `status` | [OauthVerificationStatus](../../models/components/OauthVerificationStatus.md) | :heavy_check_mark: | N/A | -| `strategy` | [OauthVerificationStrategy](../../models/components/OauthVerificationStrategy.md) | :heavy_check_mark: | N/A | -| `externalVerificationRedirectUrl` | *Optional\* | :heavy_minus_sign: | N/A | -| `error` | [JsonNullable\](../../models/components/Error.md) | :heavy_minus_sign: | N/A | -| `expireAt` | *long* | :heavy_check_mark: | N/A | -| `attempts` | *JsonNullable\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/OauthVerificationStatus.md b/docs/models/components/OauthVerificationStatus.md deleted file mode 100644 index 96380350..00000000 --- a/docs/models/components/OauthVerificationStatus.md +++ /dev/null @@ -1,12 +0,0 @@ -# OauthVerificationStatus - - -## Values - -| Name | Value | -| -------------- | -------------- | -| `UNVERIFIED` | unverified | -| `VERIFIED` | verified | -| `FAILED` | failed | -| `EXPIRED` | expired | -| `TRANSFERABLE` | transferable | \ No newline at end of file diff --git a/docs/models/components/OauthVerificationStrategy.md b/docs/models/components/OauthVerificationStrategy.md deleted file mode 100644 index 0b127b7a..00000000 --- a/docs/models/components/OauthVerificationStrategy.md +++ /dev/null @@ -1,12 +0,0 @@ -# OauthVerificationStrategy - - -## Values - -| Name | Value | -| -------------------- | -------------------- | -| `OAUTH_GOOGLE` | oauth_google | -| `OAUTH_MOCK` | oauth_mock | -| `FROM_OAUTH_GOOGLE` | from_oauth_google | -| `FROM_OAUTH_DISCORD` | from_oauth_discord | -| `OAUTH_APPLE` | oauth_apple | \ No newline at end of file diff --git a/docs/models/components/Organization.md b/docs/models/components/Organization.md index ce3968b7..f33c975b 100644 --- a/docs/models/components/Organization.md +++ b/docs/models/components/Organization.md @@ -3,17 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `object` | [OrganizationObject](../../models/components/OrganizationObject.md) | :heavy_check_mark: | N/A | -| `id` | *String* | :heavy_check_mark: | N/A | -| `name` | *String* | :heavy_check_mark: | N/A | -| `slug` | *String* | :heavy_check_mark: | N/A | -| `membersCount` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `maxAllowedMemberships` | *long* | :heavy_check_mark: | N/A | -| `adminDeleteEnabled` | *Optional\* | :heavy_minus_sign: | N/A | -| `publicMetadata` | [OrganizationPublicMetadata](../../models/components/OrganizationPublicMetadata.md) | :heavy_check_mark: | N/A | -| `privateMetadata` | [OrganizationPrivateMetadata](../../models/components/OrganizationPrivateMetadata.md) | :heavy_check_mark: | N/A | -| `createdBy` | *Optional\* | :heavy_minus_sign: | N/A | -| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| -| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `object` | [OrganizationObject](../../models/components/OrganizationObject.md) | :heavy_check_mark: | N/A | +| `id` | *String* | :heavy_check_mark: | N/A | +| `name` | *String* | :heavy_check_mark: | N/A | +| `slug` | *String* | :heavy_check_mark: | N/A | +| `membersCount` | *JsonNullable\* | :heavy_minus_sign: | N/A | +| `maxAllowedMemberships` | *long* | :heavy_check_mark: | N/A | +| `adminDeleteEnabled` | *Optional\* | :heavy_minus_sign: | N/A | +| `publicMetadata` | Map\ | :heavy_check_mark: | N/A | +| `privateMetadata` | Map\ | :heavy_check_mark: | N/A | +| `createdBy` | *JsonNullable\* | :heavy_minus_sign: | N/A | +| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| +| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| \ No newline at end of file diff --git a/docs/models/components/OrganizationInvitation.md b/docs/models/components/OrganizationInvitation.md index 45db1774..4d71b420 100644 --- a/docs/models/components/OrganizationInvitation.md +++ b/docs/models/components/OrganizationInvitation.md @@ -5,16 +5,18 @@ An organization invitation ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | -| `object` | [Optional\](../../models/components/OrganizationInvitationObject.md) | :heavy_minus_sign: | String representing the object's type. Objects of the same type share the same value.
| -| `emailAddress` | *Optional\* | :heavy_minus_sign: | N/A | -| `role` | *Optional\* | :heavy_minus_sign: | N/A | -| `roleName` | *Optional\* | :heavy_minus_sign: | N/A | -| `organizationId` | *Optional\* | :heavy_minus_sign: | N/A | -| `status` | *Optional\* | :heavy_minus_sign: | N/A | -| `publicMetadata` | [Optional\](../../models/components/OrganizationInvitationPublicMetadata.md) | :heavy_minus_sign: | N/A | -| `privateMetadata` | [Optional\](../../models/components/OrganizationInvitationPrivateMetadata.md) | :heavy_minus_sign: | N/A | -| `createdAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp of creation. | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp of last update. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | +| `object` | [Optional\](../../models/components/OrganizationInvitationObject.md) | :heavy_minus_sign: | String representing the object's type. Objects of the same type share the same value.
| +| `emailAddress` | *Optional\* | :heavy_minus_sign: | N/A | +| `role` | *Optional\* | :heavy_minus_sign: | N/A | +| `roleName` | *Optional\* | :heavy_minus_sign: | N/A | +| `organizationId` | *Optional\* | :heavy_minus_sign: | N/A | +| `status` | *Optional\* | :heavy_minus_sign: | N/A | +| `publicMetadata` | Map\ | :heavy_minus_sign: | N/A | +| `privateMetadata` | Map\ | :heavy_minus_sign: | N/A | +| `url` | *JsonNullable\* | :heavy_minus_sign: | N/A | +| `expiresAt` | *JsonNullable\* | :heavy_minus_sign: | Unix timestamp of expiration.
| +| `createdAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp of creation. | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp of last update. | \ No newline at end of file diff --git a/docs/models/components/OrganizationInvitationPrivateMetadata.md b/docs/models/components/OrganizationInvitationPrivateMetadata.md deleted file mode 100644 index 179f38a3..00000000 --- a/docs/models/components/OrganizationInvitationPrivateMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationInvitationPrivateMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/OrganizationInvitationPublicMetadata.md b/docs/models/components/OrganizationInvitationPublicMetadata.md deleted file mode 100644 index f0b62d10..00000000 --- a/docs/models/components/OrganizationInvitationPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationInvitationPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/OrganizationInvitationWithPublicOrganizationData.md b/docs/models/components/OrganizationInvitationWithPublicOrganizationData.md index 99ec34ff..07f2e4a0 100644 --- a/docs/models/components/OrganizationInvitationWithPublicOrganizationData.md +++ b/docs/models/components/OrganizationInvitationWithPublicOrganizationData.md @@ -5,17 +5,18 @@ An organization invitation with public organization data populated ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | -| `object` | [Optional\](../../models/components/OrganizationInvitationWithPublicOrganizationDataObject.md) | :heavy_minus_sign: | String representing the object's type. Objects of the same type share the same value.
| -| `emailAddress` | *Optional\* | :heavy_minus_sign: | N/A | -| `role` | *Optional\* | :heavy_minus_sign: | N/A | -| `roleName` | *Optional\* | :heavy_minus_sign: | N/A | -| `organizationId` | *Optional\* | :heavy_minus_sign: | N/A | -| `status` | *Optional\* | :heavy_minus_sign: | N/A | -| `publicMetadata` | [Optional\](../../models/components/OrganizationInvitationWithPublicOrganizationDataPublicMetadata.md) | :heavy_minus_sign: | N/A | -| `privateMetadata` | [Optional\](../../models/components/OrganizationInvitationWithPublicOrganizationDataPrivateMetadata.md) | :heavy_minus_sign: | N/A | -| `publicOrganizationData` | [Optional\](../../models/components/PublicOrganizationData.md) | :heavy_minus_sign: | N/A | -| `createdAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp of creation. | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp of last update. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | +| `object` | [Optional\](../../models/components/OrganizationInvitationWithPublicOrganizationDataObject.md) | :heavy_minus_sign: | String representing the object's type. Objects of the same type share the same value.
| +| `emailAddress` | *Optional\* | :heavy_minus_sign: | N/A | +| `role` | *Optional\* | :heavy_minus_sign: | N/A | +| `roleName` | *Optional\* | :heavy_minus_sign: | N/A | +| `organizationId` | *Optional\* | :heavy_minus_sign: | N/A | +| `status` | *Optional\* | :heavy_minus_sign: | N/A | +| `publicMetadata` | Map\ | :heavy_minus_sign: | N/A | +| `privateMetadata` | Map\ | :heavy_minus_sign: | N/A | +| `url` | *JsonNullable\* | :heavy_minus_sign: | N/A | +| `publicOrganizationData` | [Optional\](../../models/components/PublicOrganizationData.md) | :heavy_minus_sign: | N/A | +| `createdAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp of creation. | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp of last update. | \ No newline at end of file diff --git a/docs/models/components/OrganizationInvitationWithPublicOrganizationDataPrivateMetadata.md b/docs/models/components/OrganizationInvitationWithPublicOrganizationDataPrivateMetadata.md deleted file mode 100644 index 3b537422..00000000 --- a/docs/models/components/OrganizationInvitationWithPublicOrganizationDataPrivateMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationInvitationWithPublicOrganizationDataPrivateMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/OrganizationInvitationWithPublicOrganizationDataPublicMetadata.md b/docs/models/components/OrganizationInvitationWithPublicOrganizationDataPublicMetadata.md deleted file mode 100644 index f2ca2b22..00000000 --- a/docs/models/components/OrganizationInvitationWithPublicOrganizationDataPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationInvitationWithPublicOrganizationDataPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/OrganizationMembership.md b/docs/models/components/OrganizationMembership.md index e7599557..044748b6 100644 --- a/docs/models/components/OrganizationMembership.md +++ b/docs/models/components/OrganizationMembership.md @@ -5,16 +5,16 @@ Hello world ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | N/A | -| `object` | [Optional\](../../models/components/OrganizationMembershipObject.md) | :heavy_minus_sign: | String representing the object's type. Objects of the same type share the same value.
| -| `role` | *Optional\* | :heavy_minus_sign: | N/A | -| `roleName` | *Optional\* | :heavy_minus_sign: | N/A | -| `permissions` | List\<*String*> | :heavy_minus_sign: | N/A | -| `publicMetadata` | [Optional\](../../models/components/OrganizationMembershipPublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization membership, accessible from both Frontend and Backend APIs | -| `privateMetadata` | [Optional\](../../models/components/OrganizationMembershipPrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization membership, accessible only from the Backend API | -| `organization` | [Optional\](../../models/components/OrganizationMembershipOrganization.md) | :heavy_minus_sign: | N/A | -| `publicUserData` | [Optional\](../../models/components/PublicUserData.md) | :heavy_minus_sign: | N/A | -| `createdAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp of creation. | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp of last update. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional\* | :heavy_minus_sign: | N/A | +| `object` | [Optional\](../../models/components/OrganizationMembershipObject.md) | :heavy_minus_sign: | String representing the object's type. Objects of the same type share the same value.
| +| `role` | *Optional\* | :heavy_minus_sign: | N/A | +| `roleName` | *Optional\* | :heavy_minus_sign: | N/A | +| `permissions` | List\<*String*> | :heavy_minus_sign: | N/A | +| `publicMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the organization membership, accessible from both Frontend and Backend APIs | +| `privateMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the organization membership, accessible only from the Backend API | +| `organization` | [Optional\](../../models/components/OrganizationMembershipOrganization.md) | :heavy_minus_sign: | N/A | +| `publicUserData` | [Optional\](../../models/components/PublicUserData.md) | :heavy_minus_sign: | N/A | +| `createdAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp of creation. | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp of last update. | \ No newline at end of file diff --git a/docs/models/components/OrganizationMembershipOrganization.md b/docs/models/components/OrganizationMembershipOrganization.md index 71292d09..8f9dce63 100644 --- a/docs/models/components/OrganizationMembershipOrganization.md +++ b/docs/models/components/OrganizationMembershipOrganization.md @@ -3,17 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| `object` | [OrganizationMembershipOrganizationObject](../../models/components/OrganizationMembershipOrganizationObject.md) | :heavy_check_mark: | N/A | -| `id` | *String* | :heavy_check_mark: | N/A | -| `name` | *String* | :heavy_check_mark: | N/A | -| `slug` | *String* | :heavy_check_mark: | N/A | -| `membersCount` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `maxAllowedMemberships` | *long* | :heavy_check_mark: | N/A | -| `adminDeleteEnabled` | *Optional\* | :heavy_minus_sign: | N/A | -| `publicMetadata` | [OrganizationMembershipOrganizationPublicMetadata](../../models/components/OrganizationMembershipOrganizationPublicMetadata.md) | :heavy_check_mark: | N/A | -| `privateMetadata` | [OrganizationMembershipOrganizationPrivateMetadata](../../models/components/OrganizationMembershipOrganizationPrivateMetadata.md) | :heavy_check_mark: | N/A | -| `createdBy` | *Optional\* | :heavy_minus_sign: | N/A | -| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| -| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `object` | [OrganizationMembershipOrganizationObject](../../models/components/OrganizationMembershipOrganizationObject.md) | :heavy_check_mark: | N/A | +| `id` | *String* | :heavy_check_mark: | N/A | +| `name` | *String* | :heavy_check_mark: | N/A | +| `slug` | *String* | :heavy_check_mark: | N/A | +| `membersCount` | *JsonNullable\* | :heavy_minus_sign: | N/A | +| `maxAllowedMemberships` | *long* | :heavy_check_mark: | N/A | +| `adminDeleteEnabled` | *Optional\* | :heavy_minus_sign: | N/A | +| `publicMetadata` | Map\ | :heavy_check_mark: | N/A | +| `privateMetadata` | Map\ | :heavy_check_mark: | N/A | +| `createdBy` | *JsonNullable\* | :heavy_minus_sign: | N/A | +| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| +| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| \ No newline at end of file diff --git a/docs/models/components/OrganizationMembershipOrganizationPrivateMetadata.md b/docs/models/components/OrganizationMembershipOrganizationPrivateMetadata.md deleted file mode 100644 index 361b894a..00000000 --- a/docs/models/components/OrganizationMembershipOrganizationPrivateMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationMembershipOrganizationPrivateMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/OrganizationMembershipOrganizationPublicMetadata.md b/docs/models/components/OrganizationMembershipOrganizationPublicMetadata.md deleted file mode 100644 index 7040de0b..00000000 --- a/docs/models/components/OrganizationMembershipOrganizationPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationMembershipOrganizationPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/OrganizationMembershipPrivateMetadata.md b/docs/models/components/OrganizationMembershipPrivateMetadata.md deleted file mode 100644 index 82b7b536..00000000 --- a/docs/models/components/OrganizationMembershipPrivateMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# OrganizationMembershipPrivateMetadata - -Metadata saved on the organization membership, accessible only from the Backend API - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/OrganizationMembershipPublicMetadata.md b/docs/models/components/OrganizationMembershipPublicMetadata.md deleted file mode 100644 index e9197dd3..00000000 --- a/docs/models/components/OrganizationMembershipPublicMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# OrganizationMembershipPublicMetadata - -Metadata saved on the organization membership, accessible from both Frontend and Backend APIs - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/OrganizationPrivateMetadata.md b/docs/models/components/OrganizationPrivateMetadata.md deleted file mode 100644 index a6c24754..00000000 --- a/docs/models/components/OrganizationPrivateMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationPrivateMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/OrganizationPublicMetadata.md b/docs/models/components/OrganizationPublicMetadata.md deleted file mode 100644 index 9beca5ed..00000000 --- a/docs/models/components/OrganizationPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/OrganizationWithLogo.md b/docs/models/components/OrganizationWithLogo.md index cc8c0b5f..4ba82738 100644 --- a/docs/models/components/OrganizationWithLogo.md +++ b/docs/models/components/OrganizationWithLogo.md @@ -12,9 +12,9 @@ | `membersCount` | *JsonNullable\* | :heavy_minus_sign: | N/A | | `maxAllowedMemberships` | *long* | :heavy_check_mark: | N/A | | `adminDeleteEnabled` | *Optional\* | :heavy_minus_sign: | N/A | -| `publicMetadata` | [OrganizationWithLogoPublicMetadata](../../models/components/OrganizationWithLogoPublicMetadata.md) | :heavy_check_mark: | N/A | -| `privateMetadata` | [OrganizationWithLogoPrivateMetadata](../../models/components/OrganizationWithLogoPrivateMetadata.md) | :heavy_check_mark: | N/A | -| `createdBy` | *Optional\* | :heavy_minus_sign: | N/A | +| `publicMetadata` | Map\ | :heavy_check_mark: | N/A | +| `privateMetadata` | Map\ | :heavy_check_mark: | N/A | +| `createdBy` | *JsonNullable\* | :heavy_minus_sign: | N/A | | `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| | `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| | ~~`logoUrl`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | diff --git a/docs/models/components/OrganizationWithLogoPrivateMetadata.md b/docs/models/components/OrganizationWithLogoPrivateMetadata.md deleted file mode 100644 index 3c6b8d79..00000000 --- a/docs/models/components/OrganizationWithLogoPrivateMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationWithLogoPrivateMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/OrganizationWithLogoPublicMetadata.md b/docs/models/components/OrganizationWithLogoPublicMetadata.md deleted file mode 100644 index fb7c5253..00000000 --- a/docs/models/components/OrganizationWithLogoPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationWithLogoPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/PrivateMetadata.md b/docs/models/components/PrivateMetadata.md deleted file mode 100644 index 133ba7db..00000000 --- a/docs/models/components/PrivateMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# PrivateMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/PublicMetadata.md b/docs/models/components/PublicMetadata.md deleted file mode 100644 index b994731e..00000000 --- a/docs/models/components/PublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# PublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/SAMLAccount.md b/docs/models/components/SAMLAccount.md index 029387e0..7580013f 100644 --- a/docs/models/components/SAMLAccount.md +++ b/docs/models/components/SAMLAccount.md @@ -3,16 +3,16 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `id` | *String* | :heavy_check_mark: | N/A | -| `object` | [SAMLAccountObject](../../models/components/SAMLAccountObject.md) | :heavy_check_mark: | String representing the object's type. Objects of the same type share the same value.
| -| `provider` | *String* | :heavy_check_mark: | N/A | -| `active` | *boolean* | :heavy_check_mark: | N/A | -| `emailAddress` | *String* | :heavy_check_mark: | N/A | -| `firstName` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `lastName` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `providerUserId` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `publicMetadata` | [Optional\](../../models/components/SAMLAccountPublicMetadata.md) | :heavy_minus_sign: | N/A | -| `verification` | [Optional\](../../models/components/SAMLAccountVerification.md) | :heavy_check_mark: | N/A | -| `samlConnection` | [JsonNullable\](../../models/components/SamlConnection.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | N/A | +| `object` | [SAMLAccountObject](../../models/components/SAMLAccountObject.md) | :heavy_check_mark: | String representing the object's type. Objects of the same type share the same value.
| +| `provider` | *String* | :heavy_check_mark: | N/A | +| `active` | *boolean* | :heavy_check_mark: | N/A | +| `emailAddress` | *String* | :heavy_check_mark: | N/A | +| `firstName` | *JsonNullable\* | :heavy_minus_sign: | N/A | +| `lastName` | *JsonNullable\* | :heavy_minus_sign: | N/A | +| `providerUserId` | *JsonNullable\* | :heavy_minus_sign: | N/A | +| `publicMetadata` | Map\ | :heavy_minus_sign: | N/A | +| `verification` | [Optional\](../../models/components/SAMLAccountVerification.md) | :heavy_check_mark: | N/A | +| `samlConnection` | [JsonNullable\](../../models/components/SamlConnection.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/SAMLAccountPublicMetadata.md b/docs/models/components/SAMLAccountPublicMetadata.md deleted file mode 100644 index 9ff40407..00000000 --- a/docs/models/components/SAMLAccountPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# SAMLAccountPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/SchemasSAMLConnection.md b/docs/models/components/SchemasSAMLConnection.md index be4ffb8c..a017527f 100644 --- a/docs/models/components/SchemasSAMLConnection.md +++ b/docs/models/components/SchemasSAMLConnection.md @@ -17,6 +17,7 @@ | `acsUrl` | *String* | :heavy_check_mark: | N/A | | `spEntityId` | *String* | :heavy_check_mark: | N/A | | `spMetadataUrl` | *String* | :heavy_check_mark: | N/A | +| `organizationId` | *JsonNullable\* | :heavy_minus_sign: | N/A | | `attributeMapping` | [Optional\](../../models/components/AttributeMapping.md) | :heavy_minus_sign: | N/A | | `active` | *boolean* | :heavy_check_mark: | N/A | | `provider` | *String* | :heavy_check_mark: | N/A | diff --git a/docs/models/components/SignUp.md b/docs/models/components/SignUp.md index fc7cadd8..d234e14a 100644 --- a/docs/models/components/SignUp.md +++ b/docs/models/components/SignUp.md @@ -5,28 +5,29 @@ Success ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `object` | [SignUpObject](../../models/components/SignUpObject.md) | :heavy_check_mark: | N/A | -| `id` | *String* | :heavy_check_mark: | N/A | -| `status` | [SignUpStatus](../../models/components/SignUpStatus.md) | :heavy_check_mark: | N/A | -| `requiredFields` | List\<*String*> | :heavy_minus_sign: | N/A | -| `optionalFields` | List\<*String*> | :heavy_minus_sign: | N/A | -| `missingFields` | List\<*String*> | :heavy_minus_sign: | N/A | -| `unverifiedFields` | List\<*String*> | :heavy_minus_sign: | N/A | -| `verifications` | [Optional\](../../models/components/Verifications.md) | :heavy_minus_sign: | N/A | -| `username` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `emailAddress` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `phoneNumber` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `web3Wallet` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `passwordEnabled` | *boolean* | :heavy_check_mark: | N/A | -| `firstName` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `lastName` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `unsafeMetadata` | [Optional\](../../models/components/SignUpUnsafeMetadata.md) | :heavy_minus_sign: | N/A | -| `publicMetadata` | [Optional\](../../models/components/SignUpPublicMetadata.md) | :heavy_minus_sign: | N/A | -| `customAction` | *boolean* | :heavy_check_mark: | N/A | -| `externalId` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `createdSessionId` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `createdUserId` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `abandonAt` | *long* | :heavy_check_mark: | N/A | -| `externalAccount` | [Optional\](../../models/components/ExternalAccount.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `object` | [SignUpObject](../../models/components/SignUpObject.md) | :heavy_check_mark: | N/A | | +| `id` | *String* | :heavy_check_mark: | N/A | | +| `status` | [SignUpStatus](../../models/components/SignUpStatus.md) | :heavy_check_mark: | N/A | | +| `requiredFields` | List\<*String*> | :heavy_minus_sign: | N/A | | +| `optionalFields` | List\<*String*> | :heavy_minus_sign: | N/A | | +| `missingFields` | List\<*String*> | :heavy_minus_sign: | N/A | | +| `unverifiedFields` | List\<*String*> | :heavy_minus_sign: | N/A | | +| `verifications` | [Optional\](../../models/components/Verifications.md) | :heavy_minus_sign: | N/A | | +| `username` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `emailAddress` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `phoneNumber` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `web3Wallet` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `passwordEnabled` | *boolean* | :heavy_check_mark: | N/A | | +| `firstName` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `lastName` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `unsafeMetadata` | Map\ | :heavy_minus_sign: | N/A | | +| `publicMetadata` | Map\ | :heavy_minus_sign: | N/A | | +| `customAction` | *boolean* | :heavy_check_mark: | N/A | | +| `externalId` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `createdSessionId` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `createdUserId` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `abandonAt` | *long* | :heavy_check_mark: | N/A | | +| `legalAcceptedAt` | *JsonNullable\* | :heavy_minus_sign: | Unix timestamp at which the user accepted the legal requirements.
| 1700690400000 | +| `externalAccount` | [Optional\](../../models/components/ExternalAccount.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/SignUpPublicMetadata.md b/docs/models/components/SignUpPublicMetadata.md deleted file mode 100644 index 7e9e6115..00000000 --- a/docs/models/components/SignUpPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# SignUpPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/SignUpUnsafeMetadata.md b/docs/models/components/SignUpUnsafeMetadata.md deleted file mode 100644 index 8a47b7e1..00000000 --- a/docs/models/components/SignUpUnsafeMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# SignUpUnsafeMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/Totp.md b/docs/models/components/Totp.md deleted file mode 100644 index 8075e26a..00000000 --- a/docs/models/components/Totp.md +++ /dev/null @@ -1,16 +0,0 @@ -# Totp - -A TOTP (Time-based One-Time Password) - - -## Fields - -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `object` | *String* | :heavy_check_mark: | N/A | -| `id` | *String* | :heavy_check_mark: | N/A | -| `secret` | *Optional\* | :heavy_check_mark: | N/A | -| `uri` | *Optional\* | :heavy_check_mark: | N/A | -| `verified` | *boolean* | :heavy_check_mark: | N/A | -| `backupCodes` | List\<*String*> | :heavy_minus_sign: | N/A | -| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/Type.md b/docs/models/components/Type.md deleted file mode 100644 index 0b695ff6..00000000 --- a/docs/models/components/Type.md +++ /dev/null @@ -1,14 +0,0 @@ -# Type - - -## Values - -| Name | Value | -| ----------------- | ----------------- | -| `OAUTH_GOOGLE` | oauth_google | -| `OAUTH_MOCK` | oauth_mock | -| `SAML` | saml | -| `OAUTH_MICROSOFT` | oauth_microsoft | -| `EMAIL_LINK` | email_link | -| `OAUTH_APPLE` | oauth_apple | -| `OAUTH_DISCORD` | oauth_discord | \ No newline at end of file diff --git a/docs/models/components/UnsafeMetadata.md b/docs/models/components/UnsafeMetadata.md deleted file mode 100644 index cf94d107..00000000 --- a/docs/models/components/UnsafeMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# UnsafeMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/User.md b/docs/models/components/User.md index 1c22ec24..5dff0dd7 100644 --- a/docs/models/components/User.md +++ b/docs/models/components/User.md @@ -19,9 +19,9 @@ Success | ~~`profileImageUrl`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `imageUrl` | *Optional\* | :heavy_minus_sign: | N/A | | | `hasImage` | *Optional\* | :heavy_minus_sign: | N/A | | -| `publicMetadata` | [Optional\](../../models/components/PublicMetadata.md) | :heavy_minus_sign: | N/A | | -| `privateMetadata` | [JsonNullable\](../../models/components/PrivateMetadata.md) | :heavy_minus_sign: | N/A | | -| `unsafeMetadata` | [Optional\](../../models/components/UnsafeMetadata.md) | :heavy_minus_sign: | N/A | | +| `publicMetadata` | Map\ | :heavy_minus_sign: | N/A | | +| `privateMetadata` | Map\ | :heavy_minus_sign: | N/A | | +| `unsafeMetadata` | Map\ | :heavy_minus_sign: | N/A | | | `emailAddresses` | List\<[EmailAddress](../../models/components/EmailAddress.md)> | :heavy_minus_sign: | N/A | | | `phoneNumbers` | List\<[PhoneNumber](../../models/components/PhoneNumber.md)> | :heavy_minus_sign: | N/A | | | `web3Wallets` | List\<[Web3Wallet](../../models/components/Web3Wallet.md)> | :heavy_minus_sign: | N/A | | diff --git a/docs/models/components/WaitlistEntries.md b/docs/models/components/WaitlistEntries.md new file mode 100644 index 00000000..940f9b92 --- /dev/null +++ b/docs/models/components/WaitlistEntries.md @@ -0,0 +1,11 @@ +# WaitlistEntries + +List of waitlist entries + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `data` | List\<[WaitlistEntry](../../models/components/WaitlistEntry.md)> | :heavy_check_mark: | N/A | +| `totalCount` | *long* | :heavy_check_mark: | Total number of waitlist entries | \ No newline at end of file diff --git a/docs/models/components/WaitlistEntry.md b/docs/models/components/WaitlistEntry.md new file mode 100644 index 00000000..907c944f --- /dev/null +++ b/docs/models/components/WaitlistEntry.md @@ -0,0 +1,15 @@ +# WaitlistEntry + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `object` | [WaitlistEntryObject](../../models/components/WaitlistEntryObject.md) | :heavy_check_mark: | N/A | | +| `id` | *String* | :heavy_check_mark: | N/A | | +| `emailAddress` | *String* | :heavy_check_mark: | N/A | | +| `status` | [WaitlistEntryStatus](../../models/components/WaitlistEntryStatus.md) | :heavy_check_mark: | N/A | pending | +| `isLocked` | *Optional\* | :heavy_minus_sign: | Indicates if the waitlist entry is locked. Locked entries are being processed in a batch action and are unavailable for other actions.
| | +| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| | +| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| | +| `invitation` | [JsonNullable\](../../models/components/WaitlistEntryInvitation.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/WaitlistEntryInvitation.md b/docs/models/components/WaitlistEntryInvitation.md new file mode 100644 index 00000000..0f0ebfea --- /dev/null +++ b/docs/models/components/WaitlistEntryInvitation.md @@ -0,0 +1,17 @@ +# WaitlistEntryInvitation + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `object` | [WaitlistEntryInvitationObject](../../models/components/WaitlistEntryInvitationObject.md) | :heavy_check_mark: | N/A | | +| `id` | *String* | :heavy_check_mark: | N/A | | +| `emailAddress` | *String* | :heavy_check_mark: | N/A | | +| `publicMetadata` | Map\ | :heavy_minus_sign: | N/A | | +| `revoked` | *Optional\* | :heavy_minus_sign: | N/A | false | +| `status` | [WaitlistEntryInvitationStatus](../../models/components/WaitlistEntryInvitationStatus.md) | :heavy_check_mark: | N/A | pending | +| `url` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `expiresAt` | *JsonNullable\* | :heavy_minus_sign: | Unix timestamp of expiration.
| | +| `createdAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| | +| `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| | \ No newline at end of file diff --git a/docs/models/components/WaitlistEntryInvitationObject.md b/docs/models/components/WaitlistEntryInvitationObject.md new file mode 100644 index 00000000..10427b5f --- /dev/null +++ b/docs/models/components/WaitlistEntryInvitationObject.md @@ -0,0 +1,8 @@ +# WaitlistEntryInvitationObject + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `INVITATION` | invitation | \ No newline at end of file diff --git a/docs/models/components/WaitlistEntryInvitationStatus.md b/docs/models/components/WaitlistEntryInvitationStatus.md new file mode 100644 index 00000000..4e0aa7f6 --- /dev/null +++ b/docs/models/components/WaitlistEntryInvitationStatus.md @@ -0,0 +1,11 @@ +# WaitlistEntryInvitationStatus + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `PENDING` | pending | +| `ACCEPTED` | accepted | +| `REVOKED` | revoked | +| `EXPIRED` | expired | \ No newline at end of file diff --git a/docs/models/components/WaitlistEntryObject.md b/docs/models/components/WaitlistEntryObject.md new file mode 100644 index 00000000..33429077 --- /dev/null +++ b/docs/models/components/WaitlistEntryObject.md @@ -0,0 +1,8 @@ +# WaitlistEntryObject + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `WAITLIST_ENTRY` | waitlist_entry | \ No newline at end of file diff --git a/docs/models/components/WaitlistEntryStatus.md b/docs/models/components/WaitlistEntryStatus.md new file mode 100644 index 00000000..65b1c1db --- /dev/null +++ b/docs/models/components/WaitlistEntryStatus.md @@ -0,0 +1,11 @@ +# WaitlistEntryStatus + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `PENDING` | pending | +| `INVITED` | invited | +| `REJECTED` | rejected | +| `COMPLETED` | completed | \ No newline at end of file diff --git a/docs/models/components/Web3SignatureVerificationStrategy.md b/docs/models/components/Web3SignatureVerificationStrategy.md index 0a96340b..cb668a6e 100644 --- a/docs/models/components/Web3SignatureVerificationStrategy.md +++ b/docs/models/components/Web3SignatureVerificationStrategy.md @@ -6,4 +6,5 @@ | Name | Value | | -------------------------------- | -------------------------------- | | `WEB3_METAMASK_SIGNATURE` | web3_metamask_signature | -| `WEB3_COINBASE_WALLET_SIGNATURE` | web3_coinbase_wallet_signature | \ No newline at end of file +| `WEB3_COINBASE_WALLET_SIGNATURE` | web3_coinbase_wallet_signature | +| `WEB3_OKX_WALLET_SIGNATURE` | web3_okx_wallet_signature | \ No newline at end of file diff --git a/docs/models/operations/CreateBulkInvitationsResponse.md b/docs/models/operations/CreateBulkInvitationsResponse.md new file mode 100644 index 00000000..5f4db00b --- /dev/null +++ b/docs/models/operations/CreateBulkInvitationsResponse.md @@ -0,0 +1,11 @@ +# CreateBulkInvitationsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `invitationList` | List\<[Invitation](../../models/components/Invitation.md)> | :heavy_minus_sign: | List of invitations | \ No newline at end of file diff --git a/docs/models/operations/CreateInvitationPublicMetadata.md b/docs/models/operations/CreateInvitationPublicMetadata.md deleted file mode 100644 index 0ae2ee30..00000000 --- a/docs/models/operations/CreateInvitationPublicMetadata.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateInvitationPublicMetadata - -Metadata that will be attached to the newly created invitation. -The value of this property should be a well-formed JSON object. -Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/CreateInvitationRequestBody.md b/docs/models/operations/CreateInvitationRequestBody.md index a3531ab2..1069af30 100644 --- a/docs/models/operations/CreateInvitationRequestBody.md +++ b/docs/models/operations/CreateInvitationRequestBody.md @@ -8,8 +8,9 @@ Required parameters | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `emailAddress` | *String* | :heavy_check_mark: | The email address the invitation will be sent to | -| `publicMetadata` | [Optional\](../../models/operations/CreateInvitationPublicMetadata.md) | :heavy_minus_sign: | Metadata that will be attached to the newly created invitation.
The value of this property should be a well-formed JSON object.
Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. | +| `publicMetadata` | Map\ | :heavy_minus_sign: | Metadata that will be attached to the newly created invitation.
The value of this property should be a well-formed JSON object.
Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. | | `redirectUrl` | *Optional\* | :heavy_minus_sign: | Optional URL which specifies where to redirect the user once they click the invitation link.
This is only required if you have implemented a [custom flow](https://clerk.com/docs/authentication/invitations#custom-flow) and you're not using Clerk Hosted Pages or Clerk Components. | -| `notify_` | *JsonNullable\* | :heavy_minus_sign: | Optional flag which denotes whether an email invitation should be sent to the given email address.
Defaults to true. | +| `notify_` | *JsonNullable\* | :heavy_minus_sign: | Optional flag which denotes whether an email invitation should be sent to the given email address.
Defaults to `true`. | | `ignoreExisting` | *JsonNullable\* | :heavy_minus_sign: | Whether an invitation should be created if there is already an existing invitation for this email address, or it's claimed by another user. | -| `expiresInDays` | *JsonNullable\* | :heavy_minus_sign: | The number of days the invitation will be valid for. By default, the invitation does not expire. | \ No newline at end of file +| `expiresInDays` | *JsonNullable\* | :heavy_minus_sign: | The number of days the invitation will be valid for. By default, the invitation expires after 30 days. | +| `templateSlug` | [JsonNullable\](../../models/operations/TemplateSlug.md) | :heavy_minus_sign: | The slug of the email template to use for the invitation email.
If not provided, the "invitation" template will be used. | \ No newline at end of file diff --git a/docs/models/operations/CreateOAuthApplicationRequestBody.md b/docs/models/operations/CreateOAuthApplicationRequestBody.md index 0afd9002..186e3e26 100644 --- a/docs/models/operations/CreateOAuthApplicationRequestBody.md +++ b/docs/models/operations/CreateOAuthApplicationRequestBody.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *String* | :heavy_check_mark: | The name of the new OAuth application | | -| `callbackUrl` | *String* | :heavy_check_mark: | The callback URL of the new OAuth application | | -| `scopes` | *Optional\* | :heavy_minus_sign: | Define the allowed scopes for the new OAuth applications that dictate the user payload of the OAuth user info endpoint. Available scopes are `profile`, `email`, `public_metadata`, `private_metadata`. Provide the requested scopes as a string, separated by spaces. | profile email public_metadata | -| `public_` | *Optional\* | :heavy_minus_sign: | If true, this client is public and cannot securely store a client secret.
Only the authorization code flow with proof key for code exchange (PKCE) may be used.
Public clients cannot be updated to be confidential clients, and vice versa. | | \ No newline at end of file +| `redirectUris` | List\<*String*> | :heavy_minus_sign: | An array of redirect URIs of the new OAuth application | | +| ~~`callbackUrl`~~ | *JsonNullable\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The callback URL of the new OAuth application | | +| `scopes` | *JsonNullable\* | :heavy_minus_sign: | Define the allowed scopes for the new OAuth applications that dictate the user payload of the OAuth user info endpoint. Available scopes are `profile`, `email`, `public_metadata`, `private_metadata`. Provide the requested scopes as a string, separated by spaces. | profile email public_metadata | +| `public_` | *JsonNullable\* | :heavy_minus_sign: | If true, this client is public and you can use the Proof Key of Code Exchange (PKCE) flow. | | \ No newline at end of file diff --git a/docs/models/operations/CreateOrganizationInvitationBulkPrivateMetadata.md b/docs/models/operations/CreateOrganizationInvitationBulkPrivateMetadata.md deleted file mode 100644 index 36a117bc..00000000 --- a/docs/models/operations/CreateOrganizationInvitationBulkPrivateMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreateOrganizationInvitationBulkPrivateMetadata - -Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/CreateOrganizationInvitationBulkPublicMetadata.md b/docs/models/operations/CreateOrganizationInvitationBulkPublicMetadata.md deleted file mode 100644 index 6b0de6e3..00000000 --- a/docs/models/operations/CreateOrganizationInvitationBulkPublicMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreateOrganizationInvitationBulkPublicMetadata - -Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/CreateOrganizationInvitationBulkRequest.md b/docs/models/operations/CreateOrganizationInvitationBulkRequest.md index d4875dd6..f8cf6b7b 100644 --- a/docs/models/operations/CreateOrganizationInvitationBulkRequest.md +++ b/docs/models/operations/CreateOrganizationInvitationBulkRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `organizationId` | *String* | :heavy_check_mark: | The organization ID. | -| `requestBody` | List\<[RequestBody](../../models/operations/RequestBody.md)> | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `organizationId` | *String* | :heavy_check_mark: | The organization ID. | +| `requestBody` | List\<[CreateOrganizationInvitationBulkRequestBody](../../models/operations/CreateOrganizationInvitationBulkRequestBody.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateOrganizationInvitationBulkRequestBody.md b/docs/models/operations/CreateOrganizationInvitationBulkRequestBody.md new file mode 100644 index 00000000..88e0a644 --- /dev/null +++ b/docs/models/operations/CreateOrganizationInvitationBulkRequestBody.md @@ -0,0 +1,13 @@ +# CreateOrganizationInvitationBulkRequestBody + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `emailAddress` | *String* | :heavy_check_mark: | The email address of the new member that is going to be invited to the organization | +| `inviterUserId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the user that invites the new member to the organization.
Must be an administrator in the organization. | +| `role` | *String* | :heavy_check_mark: | The role of the new member in the organization. | +| `publicMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API.
When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. | +| `privateMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API.
When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. | +| `redirectUrl` | *Optional\* | :heavy_minus_sign: | Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. | \ No newline at end of file diff --git a/docs/models/operations/CreateOrganizationInvitationPrivateMetadata.md b/docs/models/operations/CreateOrganizationInvitationPrivateMetadata.md deleted file mode 100644 index cb304665..00000000 --- a/docs/models/operations/CreateOrganizationInvitationPrivateMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreateOrganizationInvitationPrivateMetadata - -Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/CreateOrganizationInvitationPublicMetadata.md b/docs/models/operations/CreateOrganizationInvitationPublicMetadata.md deleted file mode 100644 index 59477dd4..00000000 --- a/docs/models/operations/CreateOrganizationInvitationPublicMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreateOrganizationInvitationPublicMetadata - -Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/CreateOrganizationInvitationRequest.md b/docs/models/operations/CreateOrganizationInvitationRequest.md index ad86a2bf..4aa91883 100644 --- a/docs/models/operations/CreateOrganizationInvitationRequest.md +++ b/docs/models/operations/CreateOrganizationInvitationRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `organizationId` | *String* | :heavy_check_mark: | The ID of the organization for which to send the invitation | -| `requestBody` | [CreateOrganizationInvitationRequestBody](../../models/operations/CreateOrganizationInvitationRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `organizationId` | *String* | :heavy_check_mark: | The ID of the organization for which to send the invitation | +| `requestBody` | [Optional\](../../models/operations/CreateOrganizationInvitationRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateOrganizationInvitationRequestBody.md b/docs/models/operations/CreateOrganizationInvitationRequestBody.md index 5c84b664..a8eceac1 100644 --- a/docs/models/operations/CreateOrganizationInvitationRequestBody.md +++ b/docs/models/operations/CreateOrganizationInvitationRequestBody.md @@ -3,11 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `emailAddress` | *String* | :heavy_check_mark: | The email address of the new member that is going to be invited to the organization | -| `inviterUserId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the user that invites the new member to the organization.
Must be an administrator in the organization. | -| `role` | *String* | :heavy_check_mark: | The role of the new member in the organization | -| `publicMetadata` | [Optional\](../../models/operations/CreateOrganizationInvitationPublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. | -| `privateMetadata` | [Optional\](../../models/operations/CreateOrganizationInvitationPrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. | -| `redirectUrl` | *Optional\* | :heavy_minus_sign: | Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `emailAddress` | *String* | :heavy_check_mark: | The email address of the new member that is going to be invited to the organization | +| `inviterUserId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the user that invites the new member to the organization.
Must be an administrator in the organization. | +| `role` | *String* | :heavy_check_mark: | The role of the new member in the organization | +| `publicMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API.
When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. | +| `privateMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API.
When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. | +| `redirectUrl` | *Optional\* | :heavy_minus_sign: | Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. | +| `expiresInDays` | *JsonNullable\* | :heavy_minus_sign: | The number of days the invitation will be valid for. By default, the invitation has a 30 days expire. | \ No newline at end of file diff --git a/docs/models/operations/CreateOrganizationPrivateMetadata.md b/docs/models/operations/CreateOrganizationPrivateMetadata.md deleted file mode 100644 index f2f829a4..00000000 --- a/docs/models/operations/CreateOrganizationPrivateMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreateOrganizationPrivateMetadata - -Metadata saved on the organization, accessible only from the Backend API - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/CreateOrganizationPublicMetadata.md b/docs/models/operations/CreateOrganizationPublicMetadata.md deleted file mode 100644 index b80d04c2..00000000 --- a/docs/models/operations/CreateOrganizationPublicMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreateOrganizationPublicMetadata - -Metadata saved on the organization, read-only from the Frontend API and fully accessible (read/write) from the Backend API - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/CreateOrganizationRequestBody.md b/docs/models/operations/CreateOrganizationRequestBody.md index 4d0d5384..6f13f2d5 100644 --- a/docs/models/operations/CreateOrganizationRequestBody.md +++ b/docs/models/operations/CreateOrganizationRequestBody.md @@ -6,9 +6,9 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *String* | :heavy_check_mark: | The name of the new organization.
May not contain URLs or HTML. | -| `createdBy` | *String* | :heavy_check_mark: | The ID of the User who will become the administrator for the new organization | -| `privateMetadata` | [Optional\](../../models/operations/CreateOrganizationPrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization, accessible only from the Backend API | -| `publicMetadata` | [Optional\](../../models/operations/CreateOrganizationPublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization, read-only from the Frontend API and fully accessible (read/write) from the Backend API | +| `createdBy` | *Optional\* | :heavy_minus_sign: | The ID of the User who will become the administrator for the new organization | +| `privateMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the organization, accessible only from the Backend API | +| `publicMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the organization, read-only from the Frontend API and fully accessible (read/write) from the Backend API | | `slug` | *Optional\* | :heavy_minus_sign: | A slug for the new organization.
Can contain only lowercase alphanumeric characters and the dash "-".
Must be unique for the instance. | | `maxAllowedMemberships` | *Optional\* | :heavy_minus_sign: | The maximum number of memberships allowed for this organization | | `createdAt` | *Optional\* | :heavy_minus_sign: | A custom date/time denoting _when_ the organization was created, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). | \ No newline at end of file diff --git a/docs/models/operations/CreateSAMLConnectionRequestBody.md b/docs/models/operations/CreateSAMLConnectionRequestBody.md index d1a16f78..f5c98176 100644 --- a/docs/models/operations/CreateSAMLConnectionRequestBody.md +++ b/docs/models/operations/CreateSAMLConnectionRequestBody.md @@ -13,4 +13,5 @@ | `idpCertificate` | *JsonNullable\* | :heavy_minus_sign: | The X.509 certificate as provided by the IdP | | `idpMetadataUrl` | *JsonNullable\* | :heavy_minus_sign: | The URL which serves the IdP metadata. If present, it takes priority over the corresponding individual properties | | `idpMetadata` | *JsonNullable\* | :heavy_minus_sign: | The XML content of the IdP metadata file. If present, it takes priority over the corresponding individual properties | +| `organizationId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the organization to which users of this SAML Connection will be added | | `attributeMapping` | [JsonNullable\](../../models/operations/AttributeMapping.md) | :heavy_minus_sign: | Define the attribute name mapping between Identity Provider and Clerk's user properties | \ No newline at end of file diff --git a/docs/models/operations/CreateSessionRequestBody.md b/docs/models/operations/CreateSessionRequestBody.md new file mode 100644 index 00000000..d40bc273 --- /dev/null +++ b/docs/models/operations/CreateSessionRequestBody.md @@ -0,0 +1,8 @@ +# CreateSessionRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `userId` | *Optional\* | :heavy_minus_sign: | The ID representing the user | \ No newline at end of file diff --git a/docs/models/operations/CreateUserTOTPResponse.md b/docs/models/operations/CreateSessionResponse.md similarity index 93% rename from docs/models/operations/CreateUserTOTPResponse.md rename to docs/models/operations/CreateSessionResponse.md index fceb4c64..7378c310 100644 --- a/docs/models/operations/CreateUserTOTPResponse.md +++ b/docs/models/operations/CreateSessionResponse.md @@ -1,4 +1,4 @@ -# CreateUserTOTPResponse +# CreateSessionResponse ## Fields @@ -8,4 +8,4 @@ | `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | | `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `totp` | [Optional\](../../models/components/Totp.md) | :heavy_minus_sign: | A TOTP (Time-based One-Time Password) | \ No newline at end of file +| `session` | [Optional\](../../models/components/Session.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/CreateSessionTokenFromTemplateObject.md b/docs/models/operations/CreateSessionTokenFromTemplateObject.md new file mode 100644 index 00000000..6563205f --- /dev/null +++ b/docs/models/operations/CreateSessionTokenFromTemplateObject.md @@ -0,0 +1,8 @@ +# CreateSessionTokenFromTemplateObject + + +## Values + +| Name | Value | +| ------- | ------- | +| `TOKEN` | token | \ No newline at end of file diff --git a/docs/models/operations/CreateSessionTokenFromTemplateRequest.md b/docs/models/operations/CreateSessionTokenFromTemplateRequest.md index 4a971261..8840ca53 100644 --- a/docs/models/operations/CreateSessionTokenFromTemplateRequest.md +++ b/docs/models/operations/CreateSessionTokenFromTemplateRequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `sessionId` | *String* | :heavy_check_mark: | The ID of the session | -| `templateName` | *String* | :heavy_check_mark: | The name of the JWT Template defined in your instance (e.g. `custom_hasura`). | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `sessionId` | *String* | :heavy_check_mark: | The ID of the session | +| `templateName` | *String* | :heavy_check_mark: | The name of the JWT Template defined in your instance (e.g. `custom_hasura`). | +| `requestBody` | [Optional\](../../models/operations/CreateSessionTokenFromTemplateRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateUserTOTPRequest.md b/docs/models/operations/CreateSessionTokenFromTemplateRequestBody.md similarity index 63% rename from docs/models/operations/CreateUserTOTPRequest.md rename to docs/models/operations/CreateSessionTokenFromTemplateRequestBody.md index 7c2e2d3f..a1b2715b 100644 --- a/docs/models/operations/CreateUserTOTPRequest.md +++ b/docs/models/operations/CreateSessionTokenFromTemplateRequestBody.md @@ -1,8 +1,8 @@ -# CreateUserTOTPRequest +# CreateSessionTokenFromTemplateRequestBody ## Fields | Field | Type | Required | Description | | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `userId` | *String* | :heavy_check_mark: | The ID of the user for whom the TOTP is being created. | \ No newline at end of file +| `expiresInSeconds` | *JsonNullable\* | :heavy_minus_sign: | Use this parameter to override the JWT token lifetime. | \ No newline at end of file diff --git a/docs/models/operations/CreateSessionTokenFromTemplateResponseBody.md b/docs/models/operations/CreateSessionTokenFromTemplateResponseBody.md index 27015abc..cb587b75 100644 --- a/docs/models/operations/CreateSessionTokenFromTemplateResponseBody.md +++ b/docs/models/operations/CreateSessionTokenFromTemplateResponseBody.md @@ -5,7 +5,7 @@ OK ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `object` | [Optional\](../../models/operations/Object.md) | :heavy_minus_sign: | N/A | -| `jwt` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `object` | [Optional\](../../models/operations/CreateSessionTokenFromTemplateObject.md) | :heavy_minus_sign: | N/A | +| `jwt` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateSessionTokenRequest.md b/docs/models/operations/CreateSessionTokenRequest.md new file mode 100644 index 00000000..aefda5d3 --- /dev/null +++ b/docs/models/operations/CreateSessionTokenRequest.md @@ -0,0 +1,9 @@ +# CreateSessionTokenRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `sessionId` | *String* | :heavy_check_mark: | The ID of the session | +| `requestBody` | [Optional\](../../models/operations/CreateSessionTokenRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateSessionTokenRequestBody.md b/docs/models/operations/CreateSessionTokenRequestBody.md new file mode 100644 index 00000000..81f6a0f2 --- /dev/null +++ b/docs/models/operations/CreateSessionTokenRequestBody.md @@ -0,0 +1,8 @@ +# CreateSessionTokenRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `expiresInSeconds` | *JsonNullable\* | :heavy_minus_sign: | Use this parameter to override the default session token lifetime. | \ No newline at end of file diff --git a/docs/models/operations/CreateSessionTokenResponse.md b/docs/models/operations/CreateSessionTokenResponse.md new file mode 100644 index 00000000..d0a51a5c --- /dev/null +++ b/docs/models/operations/CreateSessionTokenResponse.md @@ -0,0 +1,11 @@ +# CreateSessionTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [Optional\](../../models/operations/CreateSessionTokenResponseBody.md) | :heavy_minus_sign: | OK | \ No newline at end of file diff --git a/docs/models/operations/CreateSessionTokenResponseBody.md b/docs/models/operations/CreateSessionTokenResponseBody.md new file mode 100644 index 00000000..4c4467ba --- /dev/null +++ b/docs/models/operations/CreateSessionTokenResponseBody.md @@ -0,0 +1,11 @@ +# CreateSessionTokenResponseBody + +OK + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `object` | [Optional\](../../models/operations/Object.md) | :heavy_minus_sign: | N/A | +| `jwt` | *Optional\* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/CreateUserRequestBody.md b/docs/models/operations/CreateUserRequestBody.md index 4fe771a6..c70a3b8d 100644 --- a/docs/models/operations/CreateUserRequestBody.md +++ b/docs/models/operations/CreateUserRequestBody.md @@ -19,9 +19,9 @@ | `skipPasswordRequirement` | *Optional\* | :heavy_minus_sign: | When set to `true`, `password` is not required anymore when creating the user and can be omitted.
This is useful when you are trying to create a user that doesn't have a password, in an instance that is using passwords.
Please note that you cannot use this flag if password is the only way for a user to sign into your instance. | | `totpSecret` | *Optional\* | :heavy_minus_sign: | In case TOTP is configured on the instance, you can provide the secret to enable it on the newly created user without the need to reset it.
Please note that currently the supported options are:
* Period: 30 seconds
* Code length: 6 digits
* Algorithm: SHA1 | | `backupCodes` | List\<*String*> | :heavy_minus_sign: | If Backup Codes are configured on the instance, you can provide them to enable it on the newly created user without the need to reset them.
You must provide the backup codes in plain format or the corresponding bcrypt digest. | -| `publicMetadata` | [Optional\](../../models/operations/PublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the user, that is visible to both your Frontend and Backend APIs | -| `privateMetadata` | [Optional\](../../models/operations/PrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the user, that is only visible to your Backend API | -| `unsafeMetadata` | [Optional\](../../models/operations/UnsafeMetadata.md) | :heavy_minus_sign: | Metadata saved on the user, that can be updated from both the Frontend and Backend APIs.
Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. | +| `publicMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the user, that is visible to both your Frontend and Backend APIs | +| `privateMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the user, that is only visible to your Backend API | +| `unsafeMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the user, that can be updated from both the Frontend and Backend APIs.
Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. | | `deleteSelfEnabled` | *JsonNullable\* | :heavy_minus_sign: | If enabled, user can delete themselves via FAPI.
| | `legalAcceptedAt` | *JsonNullable\* | :heavy_minus_sign: | A custom timestamp denoting _when_ the user accepted legal requirements, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). | | `skipLegalChecks` | *JsonNullable\* | :heavy_minus_sign: | When set to `true` all legal checks are skipped.
It is not recommended to skip legal checks unless you are migrating a user to Clerk. | diff --git a/docs/models/operations/CreateWaitlistEntryRequestBody.md b/docs/models/operations/CreateWaitlistEntryRequestBody.md new file mode 100644 index 00000000..798caef3 --- /dev/null +++ b/docs/models/operations/CreateWaitlistEntryRequestBody.md @@ -0,0 +1,9 @@ +# CreateWaitlistEntryRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `emailAddress` | *String* | :heavy_check_mark: | The email address to add to the waitlist | +| `notify_` | *Optional\* | :heavy_minus_sign: | Optional flag which denotes whether an email invitation should be sent to the given email address.
Defaults to `true`. | \ No newline at end of file diff --git a/docs/models/operations/CreateWaitlistEntryResponse.md b/docs/models/operations/CreateWaitlistEntryResponse.md new file mode 100644 index 00000000..3fd94d80 --- /dev/null +++ b/docs/models/operations/CreateWaitlistEntryResponse.md @@ -0,0 +1,11 @@ +# CreateWaitlistEntryResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `waitlistEntry` | [Optional\](../../models/components/WaitlistEntry.md) | :heavy_minus_sign: | A Waitlist Entry | \ No newline at end of file diff --git a/docs/models/operations/GetInstanceResponse.md b/docs/models/operations/GetInstanceResponse.md new file mode 100644 index 00000000..b7576f8c --- /dev/null +++ b/docs/models/operations/GetInstanceResponse.md @@ -0,0 +1,11 @@ +# GetInstanceResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `instance` | [Optional\](../../models/components/Instance.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/GetJWKSResponse.md b/docs/models/operations/GetJWKSResponse.md index 28ff63cc..8490ffe3 100644 --- a/docs/models/operations/GetJWKSResponse.md +++ b/docs/models/operations/GetJWKSResponse.md @@ -8,4 +8,4 @@ | `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | | `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `wellKnownJWKS` | [Optional\](../../models/components/WellKnownJWKS.md) | :heavy_minus_sign: | Get the JSON Web Key Set | \ No newline at end of file +| `jwks` | [Optional\](../../models/components/Jwks.md) | :heavy_minus_sign: | Get the JSON Web Key Set | \ No newline at end of file diff --git a/docs/models/operations/GetOAuthAccessTokenPublicMetadata.md b/docs/models/operations/GetOAuthAccessTokenPublicMetadata.md deleted file mode 100644 index a6e935ad..00000000 --- a/docs/models/operations/GetOAuthAccessTokenPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# GetOAuthAccessTokenPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/GetUserListRequest.md b/docs/models/operations/GetUserListRequest.md index c85db54f..ad021b7b 100644 --- a/docs/models/operations/GetUserListRequest.md +++ b/docs/models/operations/GetUserListRequest.md @@ -13,7 +13,16 @@ | `userId` | List\<*String*> | :heavy_minus_sign: | Returns users with the user ids specified.
For each user id, the `+` and `-` can be
prepended to the id, which denote whether the
respective user id should be included or
excluded from the result set.
Accepts up to 100 user ids.
Any user ids not found are ignored. | | | `organizationId` | List\<*String*> | :heavy_minus_sign: | Returns users that have memberships to the
given organizations.
For each organization id, the `+` and `-` can be
prepended to the id, which denote whether the
respective organization should be included or
excluded from the result set.
Accepts up to 100 organization ids. | | | `query` | *Optional\* | :heavy_minus_sign: | Returns users that match the given query.
For possible matches, we check the email addresses, phone numbers, usernames, web3 wallets, user ids, first and last names.
The query value doesn't need to match the exact value you are looking for, it is capable of partial matches as well. | | -| `lastActiveAtSince` | *Optional\* | :heavy_minus_sign: | Returns users that had session activity since the given date, with day precision.
Providing a value with higher precision than day will result in an error.
Example: use 1700690400000 to retrieve users that had session activity from 2023-11-23 until the current day. | 1700690400000 | +| `emailAddressQuery` | *Optional\* | :heavy_minus_sign: | Returns users with emails that match the given query, via case-insensitive partial match.
For example, `email_address_query=ello` will match a user with the email `HELLO@example.com`. | | +| `phoneNumberQuery` | *Optional\* | :heavy_minus_sign: | Returns users with phone numbers that match the given query, via case-insensitive partial match.
For example, `phone_number_query=555` will match a user with the phone number `+1555xxxxxxx`. | | +| `usernameQuery` | *Optional\* | :heavy_minus_sign: | Returns users with usernames that match the given query, via case-insensitive partial match.
For example, `username_query=CoolUser` will match a user with the username `SomeCoolUser`. | | +| `nameQuery` | *Optional\* | :heavy_minus_sign: | Returns users with names that match the given query, via case-insensitive partial match. | | +| `banned` | *Optional\* | :heavy_minus_sign: | Returns users which are either banned (`banned=true`) or not banned (`banned=false`). | | +| `lastActiveAtBefore` | *Optional\* | :heavy_minus_sign: | Returns users whose last session activity was before the given date (with millisecond precision).
Example: use 1700690400000 to retrieve users whose last session activity was before 2023-11-23. | 1700690400000 | +| `lastActiveAtAfter` | *Optional\* | :heavy_minus_sign: | Returns users whose last session activity was after the given date (with millisecond precision).
Example: use 1700690400000 to retrieve users whose last session activity was after 2023-11-23. | 1700690400000 | +| ~~`lastActiveAtSince`~~ | *Optional\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Returns users that had session activity since the given date.
Example: use 1700690400000 to retrieve users that had session activity from 2023-11-23 until the current day.
Deprecated in favor of `last_active_at_after`. | 1700690400000 | +| `createdAtBefore` | *Optional\* | :heavy_minus_sign: | Returns users who have been created before the given date (with millisecond precision).
Example: use 1730160000000 to retrieve users who have been created before 2024-10-29. | 1730160000000 | +| `createdAtAfter` | *Optional\* | :heavy_minus_sign: | Returns users who have been created after the given date (with millisecond precision).
Example: use 1730160000000 to retrieve users who have been created after 2024-10-29. | 1730160000000 | | `limit` | *Optional\* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | | | `offset` | *Optional\* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | | | `orderBy` | *Optional\* | :heavy_minus_sign: | Allows to return users in a particular order.
At the moment, you can order the returned users by their `created_at`,`updated_at`,`email_address`,`web3wallet`,`first_name`,`last_name`,`phone_number`,`username`,`last_active_at`,`last_sign_in_at`.
In order to specify the direction, you can use the `+/-` symbols prepended in the property to order by.
For example, if you want users to be returned in descending order according to their `created_at` property, you can use `-created_at`.
If you don't use `+` or `-`, then `+` is implied. We only support one `order_by` parameter, and if multiple `order_by` parameters are provided, we will only keep the first one. For example,
if you pass `order_by=username&order_by=created_at`, we will consider only the first `order_by` parameter, which is `username`. The `created_at` parameter will be ignored in this case. | | \ No newline at end of file diff --git a/docs/models/operations/GetUsersCountRequest.md b/docs/models/operations/GetUsersCountRequest.md index ca4f4863..1dbd62d0 100644 --- a/docs/models/operations/GetUsersCountRequest.md +++ b/docs/models/operations/GetUsersCountRequest.md @@ -11,4 +11,8 @@ | `username` | List\<*String*> | :heavy_minus_sign: | Counts users with the specified usernames.
Accepts up to 100 usernames.
Any usernames not found are ignored. | | `web3Wallet` | List\<*String*> | :heavy_minus_sign: | Counts users with the specified web3 wallet addresses.
Accepts up to 100 web3 wallet addresses.
Any web3 wallet addressed not found are ignored. | | `userId` | List\<*String*> | :heavy_minus_sign: | Counts users with the user ids specified.
Accepts up to 100 user ids.
Any user ids not found are ignored. | -| `query` | *Optional\* | :heavy_minus_sign: | Counts users that match the given query.
For possible matches, we check the email addresses, phone numbers, usernames, web3 wallets, user ids, first and last names.
The query value doesn't need to match the exact value you are looking for, it is capable of partial matches as well. | \ No newline at end of file +| `query` | *Optional\* | :heavy_minus_sign: | Counts users that match the given query.
For possible matches, we check the email addresses, phone numbers, usernames, web3 wallets, user ids, first and last names.
The query value doesn't need to match the exact value you are looking for, it is capable of partial matches as well. | +| `emailAddressQuery` | *Optional\* | :heavy_minus_sign: | Counts users with emails that match the given query, via case-insensitive partial match.
For example, `email_address_query=ello` will match a user with the email `HELLO@example.com`,
and will be included in the resulting count. | +| `phoneNumberQuery` | *Optional\* | :heavy_minus_sign: | Counts users with phone numbers that match the given query, via case-insensitive partial match.
For example, `phone_number_query=555` will match a user with the phone number `+1555xxxxxxx`,
and will be included in the resulting count. | +| `usernameQuery` | *Optional\* | :heavy_minus_sign: | Counts users with usernames that match the given query, via case-insensitive partial match.
For example, `username_query=CoolUser` will match a user with the username `SomeCoolUser`,
and will be included in the resulting count. | +| `banned` | *Optional\* | :heavy_minus_sign: | Counts users which are either banned (`banned=true`) or not banned (`banned=false`). | \ No newline at end of file diff --git a/docs/models/operations/ListInvitationsRequest.md b/docs/models/operations/ListInvitationsRequest.md index 81eafe8d..df838c42 100644 --- a/docs/models/operations/ListInvitationsRequest.md +++ b/docs/models/operations/ListInvitationsRequest.md @@ -7,4 +7,5 @@ | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | `limit` | *Optional\* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | | `offset` | *Optional\* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | -| `status` | [Optional\](../../models/operations/ListInvitationsQueryParamStatus.md) | :heavy_minus_sign: | Filter invitations based on their status | \ No newline at end of file +| `status` | [Optional\](../../models/operations/ListInvitationsQueryParamStatus.md) | :heavy_minus_sign: | Filter invitations based on their status | +| `query` | *Optional\* | :heavy_minus_sign: | Filter invitations based on their `email_address` or `id` | \ No newline at end of file diff --git a/docs/models/operations/ListSAMLConnectionsRequest.md b/docs/models/operations/ListSAMLConnectionsRequest.md index 6b31a298..9ccc57ec 100644 --- a/docs/models/operations/ListSAMLConnectionsRequest.md +++ b/docs/models/operations/ListSAMLConnectionsRequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `limit` | *Optional\* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *Optional\* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `limit` | *Optional\* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *Optional\* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | +| `organizationId` | List\<*String*> | :heavy_minus_sign: | Returns SAML connections that have an associated organization ID to the
given organizations.
For each organization id, the `+` and `-` can be
prepended to the id, which denote whether the
respective organization should be included or
excluded from the result set.
Accepts up to 100 organization ids. | \ No newline at end of file diff --git a/docs/models/operations/ListWaitlistEntriesQueryParamStatus.md b/docs/models/operations/ListWaitlistEntriesQueryParamStatus.md new file mode 100644 index 00000000..4400e155 --- /dev/null +++ b/docs/models/operations/ListWaitlistEntriesQueryParamStatus.md @@ -0,0 +1,13 @@ +# ListWaitlistEntriesQueryParamStatus + +Filter waitlist entries by their status + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `PENDING` | pending | +| `INVITED` | invited | +| `COMPLETED` | completed | +| `REJECTED` | rejected | \ No newline at end of file diff --git a/docs/models/operations/ListWaitlistEntriesRequest.md b/docs/models/operations/ListWaitlistEntriesRequest.md new file mode 100644 index 00000000..a5043fc1 --- /dev/null +++ b/docs/models/operations/ListWaitlistEntriesRequest.md @@ -0,0 +1,12 @@ +# ListWaitlistEntriesRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `limit` | *Optional\* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *Optional\* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | +| `query` | *Optional\* | :heavy_minus_sign: | Filter waitlist entries by email address | +| `status` | [Optional\](../../models/operations/ListWaitlistEntriesQueryParamStatus.md) | :heavy_minus_sign: | Filter waitlist entries by their status | +| `orderBy` | *Optional\* | :heavy_minus_sign: | Specify the order of results. Supported values are:
- `created_at`
- `email_address`
- `invited_at`

Use `+` for ascending or `-` for descending order. Defaults to `-created_at`. | \ No newline at end of file diff --git a/docs/models/operations/ListWaitlistEntriesResponse.md b/docs/models/operations/ListWaitlistEntriesResponse.md new file mode 100644 index 00000000..9a4d737e --- /dev/null +++ b/docs/models/operations/ListWaitlistEntriesResponse.md @@ -0,0 +1,11 @@ +# ListWaitlistEntriesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `waitlistEntries` | [Optional\](../../models/components/WaitlistEntries.md) | :heavy_minus_sign: | List of waitlist entries | \ No newline at end of file diff --git a/docs/models/operations/MergeOrganizationMetadataPrivateMetadata.md b/docs/models/operations/MergeOrganizationMetadataPrivateMetadata.md deleted file mode 100644 index cc4792e1..00000000 --- a/docs/models/operations/MergeOrganizationMetadataPrivateMetadata.md +++ /dev/null @@ -1,10 +0,0 @@ -# MergeOrganizationMetadataPrivateMetadata - -Metadata saved on the organization that is only visible to your backend. -The new object will be merged with the existing value. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/MergeOrganizationMetadataPublicMetadata.md b/docs/models/operations/MergeOrganizationMetadataPublicMetadata.md deleted file mode 100644 index 7dac9e85..00000000 --- a/docs/models/operations/MergeOrganizationMetadataPublicMetadata.md +++ /dev/null @@ -1,10 +0,0 @@ -# MergeOrganizationMetadataPublicMetadata - -Metadata saved on the organization, that is visible to both your frontend and backend. -The new object will be merged with the existing value. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/MergeOrganizationMetadataRequestBody.md b/docs/models/operations/MergeOrganizationMetadataRequestBody.md index ff0c6235..3a331f84 100644 --- a/docs/models/operations/MergeOrganizationMetadataRequestBody.md +++ b/docs/models/operations/MergeOrganizationMetadataRequestBody.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| `publicMetadata` | [Optional\](../../models/operations/MergeOrganizationMetadataPublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization, that is visible to both your frontend and backend.
The new object will be merged with the existing value. | -| `privateMetadata` | [Optional\](../../models/operations/MergeOrganizationMetadataPrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization that is only visible to your backend.
The new object will be merged with the existing value. | \ No newline at end of file +| `publicMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the organization, that is visible to both your frontend and backend.
The new object will be merged with the existing value. | +| `privateMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the organization that is only visible to your backend.
The new object will be merged with the existing value. | \ No newline at end of file diff --git a/docs/models/operations/PrivateMetadata.md b/docs/models/operations/PrivateMetadata.md deleted file mode 100644 index b3079417..00000000 --- a/docs/models/operations/PrivateMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# PrivateMetadata - -Metadata saved on the user, that is only visible to your Backend API - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/PublicMetadata.md b/docs/models/operations/PublicMetadata.md deleted file mode 100644 index 7332bd06..00000000 --- a/docs/models/operations/PublicMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# PublicMetadata - -Metadata saved on the user, that is visible to both your Frontend and Backend APIs - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/RequestBody.md b/docs/models/operations/RequestBody.md index d7e76503..4d7fd6e6 100644 --- a/docs/models/operations/RequestBody.md +++ b/docs/models/operations/RequestBody.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `emailAddress` | *String* | :heavy_check_mark: | The email address of the new member that is going to be invited to the organization | -| `inviterUserId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the user that invites the new member to the organization.
Must be an administrator in the organization. | -| `role` | *String* | :heavy_check_mark: | The role of the new member in the organization. | -| `publicMetadata` | [Optional\](../../models/operations/CreateOrganizationInvitationBulkPublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. | -| `privateMetadata` | [Optional\](../../models/operations/CreateOrganizationInvitationBulkPrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. | -| `redirectUrl` | *Optional\* | :heavy_minus_sign: | Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `emailAddress` | *String* | :heavy_check_mark: | The email address the invitation will be sent to | +| `publicMetadata` | Map\ | :heavy_minus_sign: | Metadata that will be attached to the newly created invitation.
The value of this property should be a well-formed JSON object.
Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. | +| `redirectUrl` | *Optional\* | :heavy_minus_sign: | The URL where the user is redirected upon visiting the invitation link, where they can accept the invitation. Required if you have implemented a [custom flow for handling application invitations](/docs/custom-flows/invitations). | +| `notify_` | *JsonNullable\* | :heavy_minus_sign: | Optional flag which denotes whether an email invitation should be sent to the given email address.
Defaults to true. | +| `ignoreExisting` | *JsonNullable\* | :heavy_minus_sign: | Whether an invitation should be created if there is already an existing invitation for this email
address, or it's claimed by another user. | +| `expiresInDays` | *JsonNullable\* | :heavy_minus_sign: | The number of days the invitation will be valid for. By default, the invitation expires after 30 days. | \ No newline at end of file diff --git a/docs/models/operations/ResponseBody.md b/docs/models/operations/ResponseBody.md index a838441c..d96e476a 100644 --- a/docs/models/operations/ResponseBody.md +++ b/docs/models/operations/ResponseBody.md @@ -3,14 +3,15 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `object` | *Optional\* | :heavy_minus_sign: | N/A | -| `externalAccountId` | *Optional\* | :heavy_minus_sign: | External account ID | -| `providerUserId` | *Optional\* | :heavy_minus_sign: | The unique ID of the user in the external provider's system | -| `token` | *Optional\* | :heavy_minus_sign: | The access token | -| `provider` | *Optional\* | :heavy_minus_sign: | The ID of the provider | -| `publicMetadata` | [Optional\](../../models/operations/GetOAuthAccessTokenPublicMetadata.md) | :heavy_minus_sign: | N/A | -| `label` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `scopes` | List\<*String*> | :heavy_minus_sign: | The list of scopes that the token is valid for.
Only present for OAuth 2.0 tokens. | -| `tokenSecret` | *Optional\* | :heavy_minus_sign: | The token secret. Only present for OAuth 1.0 tokens. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `object` | *Optional\* | :heavy_minus_sign: | N/A | +| `externalAccountId` | *Optional\* | :heavy_minus_sign: | External account ID | +| `providerUserId` | *Optional\* | :heavy_minus_sign: | The unique ID of the user in the external provider's system | +| `token` | *Optional\* | :heavy_minus_sign: | The access token | +| `provider` | *Optional\* | :heavy_minus_sign: | The ID of the provider | +| `publicMetadata` | Map\ | :heavy_minus_sign: | N/A | +| `label` | *JsonNullable\* | :heavy_minus_sign: | N/A | +| `scopes` | List\<*String*> | :heavy_minus_sign: | The list of scopes that the token is valid for.
Only present for OAuth 2.0 tokens. | +| `tokenSecret` | *Optional\* | :heavy_minus_sign: | The token secret. Only present for OAuth 1.0 tokens. | +| `expiresAt` | *JsonNullable\* | :heavy_minus_sign: | Unix timestamp of the access token expiration. | \ No newline at end of file diff --git a/docs/models/operations/TemplateSlug.md b/docs/models/operations/TemplateSlug.md new file mode 100644 index 00000000..adfc9711 --- /dev/null +++ b/docs/models/operations/TemplateSlug.md @@ -0,0 +1,12 @@ +# TemplateSlug + +The slug of the email template to use for the invitation email. +If not provided, the "invitation" template will be used. + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `INVITATION` | invitation | +| `WAITLIST_INVITATION` | waitlist_invitation | \ No newline at end of file diff --git a/docs/models/operations/UnsafeMetadata.md b/docs/models/operations/UnsafeMetadata.md deleted file mode 100644 index 6415331c..00000000 --- a/docs/models/operations/UnsafeMetadata.md +++ /dev/null @@ -1,10 +0,0 @@ -# UnsafeMetadata - -Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. -Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/UpdateEmailAddressRequest.md b/docs/models/operations/UpdateEmailAddressRequest.md index 9affe4ad..175bc40d 100644 --- a/docs/models/operations/UpdateEmailAddressRequest.md +++ b/docs/models/operations/UpdateEmailAddressRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `emailAddressId` | *String* | :heavy_check_mark: | The ID of the email address to update | -| `requestBody` | [UpdateEmailAddressRequestBody](../../models/operations/UpdateEmailAddressRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `emailAddressId` | *String* | :heavy_check_mark: | The ID of the email address to update | +| `requestBody` | [Optional\](../../models/operations/UpdateEmailAddressRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/UpdateJWTTemplateRequest.md b/docs/models/operations/UpdateJWTTemplateRequest.md index 1ce39964..d03a0f43 100644 --- a/docs/models/operations/UpdateJWTTemplateRequest.md +++ b/docs/models/operations/UpdateJWTTemplateRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `templateId` | *String* | :heavy_check_mark: | The ID of the JWT template to update | -| `requestBody` | [UpdateJWTTemplateRequestBody](../../models/operations/UpdateJWTTemplateRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `templateId` | *String* | :heavy_check_mark: | The ID of the JWT template to update | +| `requestBody` | [Optional\](../../models/operations/UpdateJWTTemplateRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/UpdateOAuthApplicationRequestBody.md b/docs/models/operations/UpdateOAuthApplicationRequestBody.md index 70ec9021..fc044e20 100644 --- a/docs/models/operations/UpdateOAuthApplicationRequestBody.md +++ b/docs/models/operations/UpdateOAuthApplicationRequestBody.md @@ -5,6 +5,8 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *Optional\* | :heavy_minus_sign: | The new name of the OAuth application | | -| `callbackUrl` | *Optional\* | :heavy_minus_sign: | The new callback URL of the OAuth application | | -| `scopes` | *Optional\* | :heavy_minus_sign: | Define the allowed scopes for the new OAuth applications that dictate the user payload of the OAuth user info endpoint. Available scopes are `profile`, `email`, `public_metadata`, `private_metadata`. Provide the requested scopes as a string, separated by spaces. | profile email public_metadata private_metadata | \ No newline at end of file +| `name` | *JsonNullable\* | :heavy_minus_sign: | The new name of the OAuth application | | +| `redirectUris` | List\<*String*> | :heavy_minus_sign: | An array of redirect URIs of the new OAuth application | | +| ~~`callbackUrl`~~ | *JsonNullable\* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The new callback URL of the OAuth application | | +| `scopes` | *JsonNullable\* | :heavy_minus_sign: | Define the allowed scopes for the new OAuth applications that dictate the user payload of the OAuth user info endpoint. Available scopes are `profile`, `email`, `public_metadata`, `private_metadata`. Provide the requested scopes as a string, separated by spaces. | profile email public_metadata private_metadata | +| `public_` | *Optional\* | :heavy_minus_sign: | If true, this client is public and you can use the Proof Key of Code Exchange (PKCE) flow. | | \ No newline at end of file diff --git a/docs/models/operations/UpdateOrganizationMembershipMetadataPrivateMetadata.md b/docs/models/operations/UpdateOrganizationMembershipMetadataPrivateMetadata.md deleted file mode 100644 index 8fae50ed..00000000 --- a/docs/models/operations/UpdateOrganizationMembershipMetadataPrivateMetadata.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdateOrganizationMembershipMetadataPrivateMetadata - -Metadata saved on the organization membership that is only visible to your backend. -The new object will be merged with the existing value. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/UpdateOrganizationMembershipMetadataPublicMetadata.md b/docs/models/operations/UpdateOrganizationMembershipMetadataPublicMetadata.md deleted file mode 100644 index dc1db801..00000000 --- a/docs/models/operations/UpdateOrganizationMembershipMetadataPublicMetadata.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdateOrganizationMembershipMetadataPublicMetadata - -Metadata saved on the organization membership, that is visible to both your frontend and backend. -The new object will be merged with the existing value. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/UpdateOrganizationMembershipMetadataRequest.md b/docs/models/operations/UpdateOrganizationMembershipMetadataRequest.md index 192418cb..93cd7731 100644 --- a/docs/models/operations/UpdateOrganizationMembershipMetadataRequest.md +++ b/docs/models/operations/UpdateOrganizationMembershipMetadataRequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `organizationId` | *String* | :heavy_check_mark: | The ID of the organization the membership belongs to | -| `userId` | *String* | :heavy_check_mark: | The ID of the user that this membership belongs to | -| `requestBody` | [UpdateOrganizationMembershipMetadataRequestBody](../../models/operations/UpdateOrganizationMembershipMetadataRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `organizationId` | *String* | :heavy_check_mark: | The ID of the organization the membership belongs to | +| `userId` | *String* | :heavy_check_mark: | The ID of the user that this membership belongs to | +| `requestBody` | [Optional\](../../models/operations/UpdateOrganizationMembershipMetadataRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/UpdateOrganizationMembershipMetadataRequestBody.md b/docs/models/operations/UpdateOrganizationMembershipMetadataRequestBody.md index f974c55b..3b28490d 100644 --- a/docs/models/operations/UpdateOrganizationMembershipMetadataRequestBody.md +++ b/docs/models/operations/UpdateOrganizationMembershipMetadataRequestBody.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `publicMetadata` | [Optional\](../../models/operations/UpdateOrganizationMembershipMetadataPublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization membership, that is visible to both your frontend and backend.
The new object will be merged with the existing value. | -| `privateMetadata` | [Optional\](../../models/operations/UpdateOrganizationMembershipMetadataPrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization membership that is only visible to your backend.
The new object will be merged with the existing value. | \ No newline at end of file +| `publicMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the organization membership, that is visible to both your frontend and backend.
The new object will be merged with the existing value. | +| `privateMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the organization membership that is only visible to your backend.
The new object will be merged with the existing value. | \ No newline at end of file diff --git a/docs/models/operations/UpdateOrganizationPrivateMetadata.md b/docs/models/operations/UpdateOrganizationPrivateMetadata.md deleted file mode 100644 index b095281e..00000000 --- a/docs/models/operations/UpdateOrganizationPrivateMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# UpdateOrganizationPrivateMetadata - -Metadata saved on the organization that is only visible to your backend. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/UpdateOrganizationPublicMetadata.md b/docs/models/operations/UpdateOrganizationPublicMetadata.md deleted file mode 100644 index a83dfeb8..00000000 --- a/docs/models/operations/UpdateOrganizationPublicMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# UpdateOrganizationPublicMetadata - -Metadata saved on the organization, that is visible to both your frontend and backend. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/UpdateOrganizationRequestBody.md b/docs/models/operations/UpdateOrganizationRequestBody.md index 6db49f00..9d6b2534 100644 --- a/docs/models/operations/UpdateOrganizationRequestBody.md +++ b/docs/models/operations/UpdateOrganizationRequestBody.md @@ -5,8 +5,8 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `publicMetadata` | [Optional\](../../models/operations/UpdateOrganizationPublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization, that is visible to both your frontend and backend. | -| `privateMetadata` | [Optional\](../../models/operations/UpdateOrganizationPrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization that is only visible to your backend. | +| `publicMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the organization, that is visible to both your frontend and backend. | +| `privateMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the organization that is only visible to your backend. | | `name` | *JsonNullable\* | :heavy_minus_sign: | The new name of the organization.
May not contain URLs or HTML. | | `slug` | *JsonNullable\* | :heavy_minus_sign: | The new slug of the organization, which needs to be unique in the instance | | `maxAllowedMemberships` | *JsonNullable\* | :heavy_minus_sign: | The maximum number of memberships allowed for this organization | diff --git a/docs/models/operations/UpdatePhoneNumberRequest.md b/docs/models/operations/UpdatePhoneNumberRequest.md index cbb9e628..d0e96672 100644 --- a/docs/models/operations/UpdatePhoneNumberRequest.md +++ b/docs/models/operations/UpdatePhoneNumberRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `phoneNumberId` | *String* | :heavy_check_mark: | The ID of the phone number to update | -| `requestBody` | [UpdatePhoneNumberRequestBody](../../models/operations/UpdatePhoneNumberRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `phoneNumberId` | *String* | :heavy_check_mark: | The ID of the phone number to update | +| `requestBody` | [Optional\](../../models/operations/UpdatePhoneNumberRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/UpdateSAMLConnectionRequestBody.md b/docs/models/operations/UpdateSAMLConnectionRequestBody.md index 569675a8..4d4cbef3 100644 --- a/docs/models/operations/UpdateSAMLConnectionRequestBody.md +++ b/docs/models/operations/UpdateSAMLConnectionRequestBody.md @@ -12,6 +12,7 @@ | `idpCertificate` | *JsonNullable\* | :heavy_minus_sign: | The x509 certificated as provided by the IdP | | `idpMetadataUrl` | *JsonNullable\* | :heavy_minus_sign: | The URL which serves the IdP metadata. If present, it takes priority over the corresponding individual properties and replaces them | | `idpMetadata` | *JsonNullable\* | :heavy_minus_sign: | The XML content of the IdP metadata file. If present, it takes priority over the corresponding individual properties | +| `organizationId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the organization to which users of this SAML Connection will be added | | `attributeMapping` | [JsonNullable\](../../models/operations/UpdateSAMLConnectionAttributeMapping.md) | :heavy_minus_sign: | Define the atrtibute name mapping between Identity Provider and Clerk's user properties | | `active` | *JsonNullable\* | :heavy_minus_sign: | Activate or de-activate the SAML Connection | | `syncUserAttributes` | *JsonNullable\* | :heavy_minus_sign: | Controls whether to update the user's attributes in each sign-in | diff --git a/docs/models/operations/UpdateSignUpRequest.md b/docs/models/operations/UpdateSignUpRequest.md index 6baaa1ca..8f32c33a 100644 --- a/docs/models/operations/UpdateSignUpRequest.md +++ b/docs/models/operations/UpdateSignUpRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *String* | :heavy_check_mark: | The ID of the sign-up to update | -| `requestBody` | [UpdateSignUpRequestBody](../../models/operations/UpdateSignUpRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | The ID of the sign-up to update | +| `requestBody` | [Optional\](../../models/operations/UpdateSignUpRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/UpdateUserMetadataRequest.md b/docs/models/operations/UpdateUserMetadataRequest.md index cc07a97c..1fb4d030 100644 --- a/docs/models/operations/UpdateUserMetadataRequest.md +++ b/docs/models/operations/UpdateUserMetadataRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `userId` | *String* | :heavy_check_mark: | The ID of the user whose metadata will be updated and merged | -| `requestBody` | [UpdateUserMetadataRequestBody](../../models/operations/UpdateUserMetadataRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `userId` | *String* | :heavy_check_mark: | The ID of the user whose metadata will be updated and merged | +| `requestBody` | [Optional\](../../models/operations/UpdateUserMetadataRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/UpdateUserPrivateMetadata.md b/docs/models/operations/UpdateUserPrivateMetadata.md deleted file mode 100644 index f07e7afb..00000000 --- a/docs/models/operations/UpdateUserPrivateMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# UpdateUserPrivateMetadata - -Metadata saved on the user, that is only visible to your Backend API - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/UpdateUserPublicMetadata.md b/docs/models/operations/UpdateUserPublicMetadata.md deleted file mode 100644 index 402dcf7b..00000000 --- a/docs/models/operations/UpdateUserPublicMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# UpdateUserPublicMetadata - -Metadata saved on the user, that is visible to both your Frontend and Backend APIs - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/UpdateUserRequestBody.md b/docs/models/operations/UpdateUserRequestBody.md index f0eb1519..fc0c7318 100644 --- a/docs/models/operations/UpdateUserRequestBody.md +++ b/docs/models/operations/UpdateUserRequestBody.md @@ -21,9 +21,9 @@ | `signOutOfOtherSessions` | *JsonNullable\* | :heavy_minus_sign: | Set to `true` to sign out the user from all their active sessions once their password is updated. This parameter can only be used when providing a `password`. | | `totpSecret` | *Optional\* | :heavy_minus_sign: | In case TOTP is configured on the instance, you can provide the secret to enable it on the specific user without the need to reset it.
Please note that currently the supported options are:
* Period: 30 seconds
* Code length: 6 digits
* Algorithm: SHA1 | | `backupCodes` | List\<*String*> | :heavy_minus_sign: | If Backup Codes are configured on the instance, you can provide them to enable it on the specific user without the need to reset them.
You must provide the backup codes in plain format or the corresponding bcrypt digest. | -| `publicMetadata` | [Optional\](../../models/operations/UpdateUserPublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the user, that is visible to both your Frontend and Backend APIs | -| `privateMetadata` | [Optional\](../../models/operations/UpdateUserPrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the user, that is only visible to your Backend API | -| `unsafeMetadata` | [Optional\](../../models/operations/UpdateUserUnsafeMetadata.md) | :heavy_minus_sign: | Metadata saved on the user, that can be updated from both the Frontend and Backend APIs.
Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. | +| `publicMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the user, that is visible to both your Frontend and Backend APIs | +| `privateMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the user, that is only visible to your Backend API | +| `unsafeMetadata` | Map\ | :heavy_minus_sign: | Metadata saved on the user, that can be updated from both the Frontend and Backend APIs.
Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. | | `deleteSelfEnabled` | *JsonNullable\* | :heavy_minus_sign: | If true, the user can delete themselves with the Frontend API. | | `createOrganizationEnabled` | *JsonNullable\* | :heavy_minus_sign: | If true, the user can create organizations with the Frontend API. | | `legalAcceptedAt` | *JsonNullable\* | :heavy_minus_sign: | A custom timestamps denoting _when_ the user accepted legal requirements, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). | diff --git a/docs/models/operations/UpdateUserUnsafeMetadata.md b/docs/models/operations/UpdateUserUnsafeMetadata.md deleted file mode 100644 index 1cc911b0..00000000 --- a/docs/models/operations/UpdateUserUnsafeMetadata.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdateUserUnsafeMetadata - -Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. -Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/UploadOrganizationLogoRequest.md b/docs/models/operations/UploadOrganizationLogoRequest.md index 714048f7..cd9d5af5 100644 --- a/docs/models/operations/UploadOrganizationLogoRequest.md +++ b/docs/models/operations/UploadOrganizationLogoRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `organizationId` | *String* | :heavy_check_mark: | The ID of the organization for which to upload a logo | -| `requestBody` | [UploadOrganizationLogoRequestBody](../../models/operations/UploadOrganizationLogoRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `organizationId` | *String* | :heavy_check_mark: | The ID of the organization for which to upload a logo | +| `requestBody` | [Optional\](../../models/operations/UploadOrganizationLogoRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/VerifyClientRequestBody.md b/docs/models/operations/VerifyClientRequestBody.md index 0fad24c6..ea76246f 100644 --- a/docs/models/operations/VerifyClientRequestBody.md +++ b/docs/models/operations/VerifyClientRequestBody.md @@ -1,5 +1,7 @@ # VerifyClientRequestBody +Parameters. + ## Fields diff --git a/docs/models/operations/VerifyPasswordRequest.md b/docs/models/operations/VerifyPasswordRequest.md index 95b77749..94bef832 100644 --- a/docs/models/operations/VerifyPasswordRequest.md +++ b/docs/models/operations/VerifyPasswordRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `userId` | *String* | :heavy_check_mark: | The ID of the user for whom to verify the password | -| `requestBody` | [VerifyPasswordRequestBody](../../models/operations/VerifyPasswordRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `userId` | *String* | :heavy_check_mark: | The ID of the user for whom to verify the password | +| `requestBody` | [Optional\](../../models/operations/VerifyPasswordRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/VerifyTOTPRequest.md b/docs/models/operations/VerifyTOTPRequest.md index 071e121d..85fcb583 100644 --- a/docs/models/operations/VerifyTOTPRequest.md +++ b/docs/models/operations/VerifyTOTPRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `userId` | *String* | :heavy_check_mark: | The ID of the user for whom to verify the TOTP | -| `requestBody` | [VerifyTOTPRequestBody](../../models/operations/VerifyTOTPRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `userId` | *String* | :heavy_check_mark: | The ID of the user for whom to verify the TOTP | +| `requestBody` | [Optional\](../../models/operations/VerifyTOTPRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdks/emailaddresses/README.md b/docs/sdks/emailaddresses/README.md index 54f901c9..4a4bfcca 100644 --- a/docs/sdks/emailaddresses/README.md +++ b/docs/sdks/emailaddresses/README.md @@ -202,10 +202,10 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `emailAddressId` | *String* | :heavy_check_mark: | The ID of the email address to update | -| `requestBody` | [UpdateEmailAddressRequestBody](../../models/operations/UpdateEmailAddressRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `emailAddressId` | *String* | :heavy_check_mark: | The ID of the email address to update | +| `requestBody` | [Optional\](../../models/operations/UpdateEmailAddressRequestBody.md) | :heavy_minus_sign: | N/A | ### Response diff --git a/docs/sdks/instancesettings/README.md b/docs/sdks/instancesettings/README.md index 4ccdd19f..2bd91d29 100644 --- a/docs/sdks/instancesettings/README.md +++ b/docs/sdks/instancesettings/README.md @@ -5,10 +5,52 @@ ### Available Operations +* [getInstance](#getinstance) - Fetch the current instance * [update](#update) - Update instance settings * [updateRestrictions](#updaterestrictions) - Update instance restrictions * [updateOrganizationSettings](#updateorganizationsettings) - Update instance organization settings +## getInstance + +Fetches the current instance + +### Example Usage + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.operations.GetInstanceResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth("") + .build(); + + GetInstanceResponse res = sdk.instanceSettings().getInstance() + .call(); + + if (res.instance().isPresent()) { + // handle response + } + } +} +``` + +### Response + +**[GetInstanceResponse](../../models/operations/GetInstanceResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + ## update Updates the settings of an instance @@ -166,5 +208,5 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 402, 404, 422 | application/json | +| models/errors/ClerkErrors | 400, 402, 404, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/invitations/README.md b/docs/sdks/invitations/README.md index a35685b7..6af0cc35 100644 --- a/docs/sdks/invitations/README.md +++ b/docs/sdks/invitations/README.md @@ -10,6 +10,7 @@ Invitations allow you to invite someone to sign up to your application, via emai * [create](#create) - Create an invitation * [list](#list) - List all invitations +* [createBulkInvitations](#createbulkinvitations) - Create multiple invitations * [revoke](#revoke) - Revokes an invitation ## create @@ -95,6 +96,7 @@ public class Application { .limit(10L) .offset(0L) .status(ListInvitationsQueryParamStatus.EXPIRED) + .query("") .call(); if (res.invitationList().isPresent()) { @@ -111,6 +113,7 @@ public class Application { | `limit` | *Optional\* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | | `offset` | *Optional\* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | | `status` | [Optional\](../../models/operations/ListInvitationsQueryParamStatus.md) | :heavy_minus_sign: | Filter invitations based on their status | +| `query` | *Optional\* | :heavy_minus_sign: | Filter invitations based on their `email_address` or `id` | ### Response @@ -122,6 +125,66 @@ public class Application { | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4XX, 5XX | \*/\* | +## createBulkInvitations + +Use this API operation to create multiple invitations for the provided email addresses. You can choose to send the +invitations as emails by setting the `notify` parameter to `true`. There cannot be an existing invitation for any +of the email addresses you provide unless you set `ignore_existing` to `true` for specific email addresses. Please +note that there must be no existing user for any of the email addresses you provide, and this rule cannot be bypassed. + +### Example Usage + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.CreateBulkInvitationsResponse; +import com.clerk.backend_api.models.operations.RequestBody; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth("") + .build(); + + List req = List.of( + RequestBody.builder() + .emailAddress("Era_Pouros@yahoo.com") + .build()); + + CreateBulkInvitationsResponse res = sdk.invitations().createBulkInvitations() + .request(req) + .call(); + + if (res.invitationList().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `request` | [List](../../models//.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CreateBulkInvitationsResponse](../../models/operations/CreateBulkInvitationsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 400, 422 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + ## revoke Revokes the given invitation. diff --git a/docs/sdks/jwks/README.md b/docs/sdks/jwks/README.md index 9e418b4c..f95fa21d 100644 --- a/docs/sdks/jwks/README.md +++ b/docs/sdks/jwks/README.md @@ -31,7 +31,7 @@ public class Application { GetJWKSResponse res = sdk.jwks().get() .call(); - if (res.wellKnownJWKS().isPresent()) { + if (res.jwks().isPresent()) { // handle response } } diff --git a/docs/sdks/jwttemplates/README.md b/docs/sdks/jwttemplates/README.md index 567a9b6e..9619f238 100644 --- a/docs/sdks/jwttemplates/README.md +++ b/docs/sdks/jwttemplates/README.md @@ -194,10 +194,10 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `templateId` | *String* | :heavy_check_mark: | The ID of the JWT template to update | -| `requestBody` | [UpdateJWTTemplateRequestBody](../../models/operations/UpdateJWTTemplateRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `templateId` | *String* | :heavy_check_mark: | The ID of the JWT template to update | +| `requestBody` | [Optional\](../../models/operations/UpdateJWTTemplateRequestBody.md) | :heavy_minus_sign: | N/A | ### Response diff --git a/docs/sdks/oauthapplications/README.md b/docs/sdks/oauthapplications/README.md index 058d6f2c..46145ea2 100644 --- a/docs/sdks/oauthapplications/README.md +++ b/docs/sdks/oauthapplications/README.md @@ -94,8 +94,6 @@ public class Application { CreateOAuthApplicationRequestBody req = CreateOAuthApplicationRequestBody.builder() .name("") - .callbackUrl("https://probable-heating.com/") - .scopes("profile email public_metadata") .build(); CreateOAuthApplicationResponse res = sdk.oauthApplications().create() @@ -202,7 +200,6 @@ public class Application { UpdateOAuthApplicationResponse res = sdk.oauthApplications().update() .oauthApplicationId("") .requestBody(UpdateOAuthApplicationRequestBody.builder() - .scopes("profile email public_metadata private_metadata") .build()) .call(); @@ -228,7 +225,7 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 403, 404, 422 | application/json | +| models/errors/ClerkErrors | 400, 403, 404, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## delete diff --git a/docs/sdks/organizationinvitations/README.md b/docs/sdks/organizationinvitations/README.md index 1b1a66e9..7242c661 100644 --- a/docs/sdks/organizationinvitations/README.md +++ b/docs/sdks/organizationinvitations/README.md @@ -35,7 +35,7 @@ import java.lang.Exception; public class Application { - public static void main(String[] args) throws ClerkErrors, Exception { + public static void main(String[] args) throws ClerkErrors, ClerkErrors, Exception { Clerk sdk = Clerk.builder() .bearerAuth("") @@ -69,7 +69,8 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 400, 404, 422, 500 | application/json | +| models/errors/ClerkErrors | 400, 404, 422 | application/json | +| models/errors/ClerkErrors | 500 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## create @@ -127,10 +128,10 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `organizationId` | *String* | :heavy_check_mark: | The ID of the organization for which to send the invitation | -| `requestBody` | [CreateOrganizationInvitationRequestBody](../../models/operations/CreateOrganizationInvitationRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `organizationId` | *String* | :heavy_check_mark: | The ID of the organization for which to send the invitation | +| `requestBody` | [Optional\](../../models/operations/CreateOrganizationInvitationRequestBody.md) | :heavy_minus_sign: | N/A | ### Response @@ -229,7 +230,6 @@ package hello.world; import com.clerk.backend_api.Clerk; import com.clerk.backend_api.models.errors.ClerkErrors; import com.clerk.backend_api.models.operations.CreateOrganizationInvitationBulkResponse; -import com.clerk.backend_api.models.operations.RequestBody; import java.lang.Exception; import java.util.List; @@ -244,10 +244,7 @@ public class Application { CreateOrganizationInvitationBulkResponse res = sdk.organizationInvitations().bulkCreate() .organizationId("") .requestBody(List.of( - RequestBody.builder() - .emailAddress("Queen25@gmail.com") - .role("") - .build())) + )) .call(); if (res.organizationInvitations().isPresent()) { @@ -259,10 +256,10 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `organizationId` | *String* | :heavy_check_mark: | The organization ID. | -| `requestBody` | List\<[RequestBody](../../models/operations/RequestBody.md)> | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `organizationId` | *String* | :heavy_check_mark: | The organization ID. | +| `requestBody` | List\<[CreateOrganizationInvitationBulkRequestBody](../../models/operations/CreateOrganizationInvitationBulkRequestBody.md)> | :heavy_check_mark: | N/A | ### Response diff --git a/docs/sdks/organizationmemberships/README.md b/docs/sdks/organizationmemberships/README.md index ea429c73..c160b77a 100644 --- a/docs/sdks/organizationmemberships/README.md +++ b/docs/sdks/organizationmemberships/README.md @@ -183,7 +183,7 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 400, 404, 422 | application/json | +| models/errors/ClerkErrors | 404, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## delete @@ -235,7 +235,7 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 400, 401, 404 | application/json | +| models/errors/ClerkErrors | 401, 404 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## updateMetadata @@ -279,11 +279,11 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `organizationId` | *String* | :heavy_check_mark: | The ID of the organization the membership belongs to | -| `userId` | *String* | :heavy_check_mark: | The ID of the user that this membership belongs to | -| `requestBody` | [UpdateOrganizationMembershipMetadataRequestBody](../../models/operations/UpdateOrganizationMembershipMetadataRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `organizationId` | *String* | :heavy_check_mark: | The ID of the organization the membership belongs to | +| `userId` | *String* | :heavy_check_mark: | The ID of the user that this membership belongs to | +| `requestBody` | [Optional\](../../models/operations/UpdateOrganizationMembershipMetadataRequestBody.md) | :heavy_minus_sign: | N/A | ### Response @@ -312,7 +312,7 @@ import java.lang.Exception; public class Application { - public static void main(String[] args) throws ClerkErrors, Exception { + public static void main(String[] args) throws ClerkErrors, ClerkErrors, Exception { Clerk sdk = Clerk.builder() .bearerAuth("") @@ -347,5 +347,6 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 400, 401, 422, 500 | application/json | +| models/errors/ClerkErrors | 400, 401, 422 | application/json | +| models/errors/ClerkErrors | 500 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/organizations/README.md b/docs/sdks/organizations/README.md index 4312882e..f0548710 100644 --- a/docs/sdks/organizations/README.md +++ b/docs/sdks/organizations/README.md @@ -77,7 +77,6 @@ public class Application { ## create Creates a new organization with the given name for an instance. -In order to successfully create an organization you need to provide the ID of the User who will become the organization administrator. You can specify an optional slug for the new organization. If provided, the organization slug can contain only lowercase alphanumeric characters (letters and digits) and the dash "-". Organization slugs must be unique for the instance. @@ -109,7 +108,6 @@ public class Application { CreateOrganizationRequestBody req = CreateOrganizationRequestBody.builder() .name("") - .createdBy("") .build(); CreateOrganizationResponse res = sdk.organizations().create() @@ -402,10 +400,10 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `organizationId` | *String* | :heavy_check_mark: | The ID of the organization for which to upload a logo | -| `requestBody` | [UploadOrganizationLogoRequestBody](../../models/operations/UploadOrganizationLogoRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `organizationId` | *String* | :heavy_check_mark: | The ID of the organization for which to upload a logo | +| `requestBody` | [Optional\](../../models/operations/UploadOrganizationLogoRequestBody.md) | :heavy_minus_sign: | N/A | ### Response diff --git a/docs/sdks/phonenumbers/README.md b/docs/sdks/phonenumbers/README.md index 8c854033..c5f18498 100644 --- a/docs/sdks/phonenumbers/README.md +++ b/docs/sdks/phonenumbers/README.md @@ -202,10 +202,10 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `phoneNumberId` | *String* | :heavy_check_mark: | The ID of the phone number to update | -| `requestBody` | [UpdatePhoneNumberRequestBody](../../models/operations/UpdatePhoneNumberRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `phoneNumberId` | *String* | :heavy_check_mark: | The ID of the phone number to update | +| `requestBody` | [Optional\](../../models/operations/UpdatePhoneNumberRequestBody.md) | :heavy_minus_sign: | N/A | ### Response diff --git a/docs/sdks/samlconnections/README.md b/docs/sdks/samlconnections/README.md index dcd66c5d..0c7abbe6 100644 --- a/docs/sdks/samlconnections/README.md +++ b/docs/sdks/samlconnections/README.md @@ -26,6 +26,7 @@ import com.clerk.backend_api.Clerk; import com.clerk.backend_api.models.errors.ClerkErrors; import com.clerk.backend_api.models.operations.ListSAMLConnectionsResponse; import java.lang.Exception; +import java.util.List; public class Application { @@ -38,6 +39,8 @@ public class Application { ListSAMLConnectionsResponse res = sdk.samlConnections().list() .limit(10L) .offset(0L) + .organizationId(List.of( + "")) .call(); if (res.samlConnections().isPresent()) { @@ -49,10 +52,11 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `limit` | *Optional\* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *Optional\* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `limit` | *Optional\* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *Optional\* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | +| `organizationId` | List\<*String*> | :heavy_minus_sign: | Returns SAML connections that have an associated organization ID to the
given organizations.
For each organization id, the `+` and `-` can be
prepended to the id, which denote whether the
respective organization should be included or
excluded from the result set.
Accepts up to 100 organization ids. | ### Response @@ -120,7 +124,7 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 402, 403, 422 | application/json | +| models/errors/ClerkErrors | 402, 403, 404, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## get diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index d9f7cec0..84a98943 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -11,9 +11,11 @@ Sessions are created when a user successfully goes through the sign in or sign u ### Available Operations * [list](#list) - List all sessions +* [createSession](#createsession) - Create a new active session * [get](#get) - Retrieve a session * [revoke](#revoke) - Revoke a session * [~~verify~~](#verify) - Verify a session :warning: **Deprecated** +* [createSessionToken](#createsessiontoken) - Create a session token * [createTokenFromTemplate](#createtokenfromtemplate) - Create a session token from a jwt template ## list @@ -73,6 +75,62 @@ public class Application { | models/errors/ClerkErrors | 400, 401, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | +## createSession + +Create a new active session for the provided user ID. + +This operation is only available for Clerk Development instances. + +### Example Usage + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.CreateSessionRequestBody; +import com.clerk.backend_api.models.operations.CreateSessionResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth("") + .build(); + + CreateSessionRequestBody req = CreateSessionRequestBody.builder() + .build(); + + CreateSessionResponse res = sdk.sessions().createSession() + .request(req) + .call(); + + if (res.session().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `request` | [CreateSessionRequestBody](../../models/operations/CreateSessionRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CreateSessionResponse](../../models/operations/CreateSessionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 400, 401, 404, 422 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + ## get Retrieve the details of a session @@ -233,6 +291,60 @@ public class Application { | models/errors/ClerkErrors | 400, 401, 404, 410 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | +## createSessionToken + +Creates a session JSON Web Token (JWT) based on a session. + +### Example Usage + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.CreateSessionTokenRequestBody; +import com.clerk.backend_api.models.operations.CreateSessionTokenResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth("") + .build(); + + CreateSessionTokenResponse res = sdk.sessions().createSessionToken() + .sessionId("") + .requestBody(CreateSessionTokenRequestBody.builder() + .build()) + .call(); + + if (res.object().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `sessionId` | *String* | :heavy_check_mark: | The ID of the session | +| `requestBody` | [Optional\](../../models/operations/CreateSessionTokenRequestBody.md) | :heavy_minus_sign: | N/A | + +### Response + +**[CreateSessionTokenResponse](../../models/operations/CreateSessionTokenResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 401, 404 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + ## createTokenFromTemplate Creates a JSON Web Token(JWT) based on a session and a JWT Template name defined for your instance @@ -244,6 +356,7 @@ package hello.world; import com.clerk.backend_api.Clerk; import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.CreateSessionTokenFromTemplateRequestBody; import com.clerk.backend_api.models.operations.CreateSessionTokenFromTemplateResponse; import java.lang.Exception; @@ -258,6 +371,8 @@ public class Application { CreateSessionTokenFromTemplateResponse res = sdk.sessions().createTokenFromTemplate() .sessionId("") .templateName("") + .requestBody(CreateSessionTokenFromTemplateRequestBody.builder() + .build()) .call(); if (res.object().isPresent()) { @@ -269,10 +384,11 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `sessionId` | *String* | :heavy_check_mark: | The ID of the session | -| `templateName` | *String* | :heavy_check_mark: | The name of the JWT Template defined in your instance (e.g. `custom_hasura`). | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `sessionId` | *String* | :heavy_check_mark: | The ID of the session | +| `templateName` | *String* | :heavy_check_mark: | The name of the JWT Template defined in your instance (e.g. `custom_hasura`). | +| `requestBody` | [Optional\](../../models/operations/CreateSessionTokenFromTemplateRequestBody.md) | :heavy_minus_sign: | N/A | ### Response diff --git a/docs/sdks/signups/README.md b/docs/sdks/signups/README.md index 774d09f2..8a9fe2ff 100644 --- a/docs/sdks/signups/README.md +++ b/docs/sdks/signups/README.md @@ -45,10 +45,10 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `id` | *String* | :heavy_check_mark: | The ID of the sign-up to update | -| `requestBody` | [UpdateSignUpRequestBody](../../models/operations/UpdateSignUpRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | The ID of the sign-up to update | +| `requestBody` | [Optional\](../../models/operations/UpdateSignUpRequestBody.md) | :heavy_minus_sign: | N/A | ### Response diff --git a/docs/sdks/testingtokens/README.md b/docs/sdks/testingtokens/README.md index 84dfdb6a..91d4ab5f 100644 --- a/docs/sdks/testingtokens/README.md +++ b/docs/sdks/testingtokens/README.md @@ -9,7 +9,7 @@ ## create -Retrieve a new testing token. Only available for development instances. +Retrieve a new testing token. ### Example Usage diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md index 0c93854d..0f8ba374 100644 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -30,7 +30,6 @@ The user object represents a user that has successfully signed up to your applic * [deleteBackupCodes](#deletebackupcodes) - Disable all user's Backup codes * [deletePasskey](#deletepasskey) - Delete a user passkey * [deleteWeb3Wallet](#deleteweb3wallet) - Delete a user web3 wallet -* [createTOTP](#createtotp) - Create a TOTP for a user * [deleteTotp](#deletetotp) - Delete all the user's TOTPs * [deleteExternalAccount](#deleteexternalaccount) - Delete External Account @@ -59,7 +58,11 @@ public class Application { .build(); GetUserListRequest req = GetUserListRequest.builder() + .lastActiveAtBefore(1700690400000L) + .lastActiveAtAfter(1700690400000L) .lastActiveAtSince(1700690400000L) + .createdAtBefore(1730160000000L) + .createdAtAfter(1730160000000L) .build(); GetUserListResponse res = sdk.users().list() @@ -719,10 +722,10 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `userId` | *String* | :heavy_check_mark: | The ID of the user whose metadata will be updated and merged | -| `requestBody` | [UpdateUserMetadataRequestBody](../../models/operations/UpdateUserMetadataRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `userId` | *String* | :heavy_check_mark: | The ID of the user whose metadata will be updated and merged | +| `requestBody` | [Optional\](../../models/operations/UpdateUserMetadataRequestBody.md) | :heavy_minus_sign: | N/A | ### Response @@ -785,7 +788,7 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 400, 422 | application/json | +| models/errors/ClerkErrors | 400, 404, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## getOrganizationMemberships @@ -939,10 +942,10 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `userId` | *String* | :heavy_check_mark: | The ID of the user for whom to verify the password | -| `requestBody` | [VerifyPasswordRequestBody](../../models/operations/VerifyPasswordRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `userId` | *String* | :heavy_check_mark: | The ID of the user for whom to verify the password | +| `requestBody` | [Optional\](../../models/operations/VerifyPasswordRequestBody.md) | :heavy_minus_sign: | N/A | ### Response @@ -997,10 +1000,10 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `userId` | *String* | :heavy_check_mark: | The ID of the user for whom to verify the TOTP | -| `requestBody` | [VerifyTOTPRequestBody](../../models/operations/VerifyTOTPRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `userId` | *String* | :heavy_check_mark: | The ID of the user for whom to verify the TOTP | +| `requestBody` | [Optional\](../../models/operations/VerifyTOTPRequestBody.md) | :heavy_minus_sign: | N/A | ### Response @@ -1029,7 +1032,7 @@ import java.lang.Exception; public class Application { - public static void main(String[] args) throws ClerkErrors, Exception { + public static void main(String[] args) throws ClerkErrors, ClerkErrors, Exception { Clerk sdk = Clerk.builder() .bearerAuth("") @@ -1060,7 +1063,8 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 404, 500 | application/json | +| models/errors/ClerkErrors | 404 | application/json | +| models/errors/ClerkErrors | 500 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## deleteBackupCodes @@ -1079,7 +1083,7 @@ import java.lang.Exception; public class Application { - public static void main(String[] args) throws ClerkErrors, Exception { + public static void main(String[] args) throws ClerkErrors, ClerkErrors, Exception { Clerk sdk = Clerk.builder() .bearerAuth("") @@ -1110,7 +1114,8 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 404, 500 | application/json | +| models/errors/ClerkErrors | 404 | application/json | +| models/errors/ClerkErrors | 500 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## deletePasskey @@ -1129,7 +1134,7 @@ import java.lang.Exception; public class Application { - public static void main(String[] args) throws ClerkErrors, Exception { + public static void main(String[] args) throws ClerkErrors, ClerkErrors, Exception { Clerk sdk = Clerk.builder() .bearerAuth("") @@ -1162,7 +1167,8 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 403, 404, 500 | application/json | +| models/errors/ClerkErrors | 403, 404 | application/json | +| models/errors/ClerkErrors | 500 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## deleteWeb3Wallet @@ -1181,7 +1187,7 @@ import java.lang.Exception; public class Application { - public static void main(String[] args) throws ClerkErrors, Exception { + public static void main(String[] args) throws ClerkErrors, ClerkErrors, Exception { Clerk sdk = Clerk.builder() .bearerAuth("") @@ -1214,58 +1220,8 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 400, 403, 404, 500 | application/json | -| models/errors/SDKError | 4XX, 5XX | \*/\* | - -## createTOTP - -Creates a TOTP (Time-based One-Time Password) for a given user, returning both the TOTP secret and the URI. - - -### Example Usage - -```java -package hello.world; - -import com.clerk.backend_api.Clerk; -import com.clerk.backend_api.models.errors.ClerkErrors; -import com.clerk.backend_api.models.operations.CreateUserTOTPResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws ClerkErrors, Exception { - - Clerk sdk = Clerk.builder() - .bearerAuth("") - .build(); - - CreateUserTOTPResponse res = sdk.users().createTOTP() - .userId("") - .call(); - - if (res.totp().isPresent()) { - // handle response - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `userId` | *String* | :heavy_check_mark: | The ID of the user for whom the TOTP is being created. | - -### Response - -**[CreateUserTOTPResponse](../../models/operations/CreateUserTOTPResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 403, 404, 500 | application/json | +| models/errors/ClerkErrors | 400, 403, 404 | application/json | +| models/errors/ClerkErrors | 500 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## deleteTotp @@ -1284,7 +1240,7 @@ import java.lang.Exception; public class Application { - public static void main(String[] args) throws ClerkErrors, Exception { + public static void main(String[] args) throws ClerkErrors, ClerkErrors, Exception { Clerk sdk = Clerk.builder() .bearerAuth("") @@ -1315,7 +1271,8 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 404, 500 | application/json | +| models/errors/ClerkErrors | 404 | application/json | +| models/errors/ClerkErrors | 500 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## deleteExternalAccount @@ -1334,7 +1291,7 @@ import java.lang.Exception; public class Application { - public static void main(String[] args) throws ClerkErrors, Exception { + public static void main(String[] args) throws ClerkErrors, ClerkErrors, Exception { Clerk sdk = Clerk.builder() .bearerAuth("") @@ -1367,5 +1324,6 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 400, 403, 404, 500 | application/json | +| models/errors/ClerkErrors | 400, 403, 404 | application/json | +| models/errors/ClerkErrors | 500 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/waitlistentries/README.md b/docs/sdks/waitlistentries/README.md new file mode 100644 index 00000000..416c3824 --- /dev/null +++ b/docs/sdks/waitlistentries/README.md @@ -0,0 +1,119 @@ +# WaitlistEntries +(*waitlistEntries()*) + +## Overview + +### Available Operations + +* [listWaitlistEntries](#listwaitlistentries) - List all waitlist entries +* [createWaitlistEntry](#createwaitlistentry) - Create a waitlist entry + +## listWaitlistEntries + +Retrieve a list of waitlist entries for the instance. +Entries are ordered by creation date in descending order by default. +Supports filtering by email address or status and pagination with limit and offset parameters. + +### Example Usage + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.operations.ListWaitlistEntriesRequest; +import com.clerk.backend_api.models.operations.ListWaitlistEntriesResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth("") + .build(); + + ListWaitlistEntriesRequest req = ListWaitlistEntriesRequest.builder() + .build(); + + ListWaitlistEntriesResponse res = sdk.waitlistEntries().listWaitlistEntries() + .request(req) + .call(); + + if (res.waitlistEntries().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `request` | [ListWaitlistEntriesRequest](../../models/operations/ListWaitlistEntriesRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[ListWaitlistEntriesResponse](../../models/operations/ListWaitlistEntriesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## createWaitlistEntry + +Creates a new waitlist entry for the given email address. +If the email address is already on the waitlist, no new entry will be created and the existing waitlist entry will be returned. + +### Example Usage + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.CreateWaitlistEntryRequestBody; +import com.clerk.backend_api.models.operations.CreateWaitlistEntryResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth("") + .build(); + + CreateWaitlistEntryRequestBody req = CreateWaitlistEntryRequestBody.builder() + .emailAddress("Demond_Willms@hotmail.com") + .build(); + + CreateWaitlistEntryResponse res = sdk.waitlistEntries().createWaitlistEntry() + .request(req) + .call(); + + if (res.waitlistEntry().isPresent()) { + // handle response + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `request` | [CreateWaitlistEntryRequestBody](../../models/operations/CreateWaitlistEntryRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CreateWaitlistEntryResponse](../../models/operations/CreateWaitlistEntryResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 400, 422 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/src/main/java/com/clerk/backend_api/ActorTokens.java b/src/main/java/com/clerk/backend_api/ActorTokens.java index e3f05334..8de09322 100644 --- a/src/main/java/com/clerk/backend_api/ActorTokens.java +++ b/src/main/java/com/clerk/backend_api/ActorTokens.java @@ -53,6 +53,17 @@ public CreateActorTokenRequestBuilder create() { return new CreateActorTokenRequestBuilder(this); } + /** + * Create actor token + * Create an actor token that can be used to impersonate the given user. + * The `actor` parameter needs to include at least a "sub" key whose value is the ID of the actor (impersonating) user. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateActorTokenResponse createDirect() throws Exception { + return create(Optional.empty()); + } + /** * Create actor token * Create an actor token that can be used to impersonate the given user. @@ -62,7 +73,7 @@ public CreateActorTokenRequestBuilder create() { * @throws Exception if the API call fails */ public CreateActorTokenResponse create( - CreateActorTokenRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -72,15 +83,12 @@ public CreateActorTokenResponse create( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -171,7 +179,15 @@ public CreateActorTokenResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -309,7 +325,15 @@ public RevokeActorTokenResponse revoke( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/AllowlistBlocklist.java b/src/main/java/com/clerk/backend_api/AllowlistBlocklist.java index 7a656553..996efa8f 100644 --- a/src/main/java/com/clerk/backend_api/AllowlistBlocklist.java +++ b/src/main/java/com/clerk/backend_api/AllowlistBlocklist.java @@ -163,7 +163,15 @@ public ListAllowlistIdentifiersResponse listAllowlistIdentifiersDirect() throws Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -189,6 +197,16 @@ public CreateAllowlistIdentifierRequestBuilder createAllowlistIdentifier() { return new CreateAllowlistIdentifierRequestBuilder(this); } + /** + * Add identifier to the allow-list + * Create an identifier allowed to sign up to an instance + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateAllowlistIdentifierResponse createAllowlistIdentifierDirect() throws Exception { + return createAllowlistIdentifier(Optional.empty()); + } + /** * Add identifier to the allow-list * Create an identifier allowed to sign up to an instance @@ -197,7 +215,7 @@ public CreateAllowlistIdentifierRequestBuilder createAllowlistIdentifier() { * @throws Exception if the API call fails */ public CreateAllowlistIdentifierResponse createAllowlistIdentifier( - CreateAllowlistIdentifierRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -207,15 +225,12 @@ public CreateAllowlistIdentifierResponse createAllowlistIdentifier( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -306,7 +321,15 @@ public CreateAllowlistIdentifierResponse createAllowlistIdentifier( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -332,6 +355,16 @@ public CreateBlocklistIdentifierRequestBuilder createBlocklistIdentifier() { return new CreateBlocklistIdentifierRequestBuilder(this); } + /** + * Add identifier to the block-list + * Create an identifier that is blocked from accessing an instance + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateBlocklistIdentifierResponse createBlocklistIdentifierDirect() throws Exception { + return createBlocklistIdentifier(Optional.empty()); + } + /** * Add identifier to the block-list * Create an identifier that is blocked from accessing an instance @@ -340,7 +373,7 @@ public CreateBlocklistIdentifierRequestBuilder createBlocklistIdentifier() { * @throws Exception if the API call fails */ public CreateBlocklistIdentifierResponse createBlocklistIdentifier( - CreateBlocklistIdentifierRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -350,15 +383,12 @@ public CreateBlocklistIdentifierResponse createBlocklistIdentifier( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -449,7 +479,15 @@ public CreateBlocklistIdentifierResponse createBlocklistIdentifier( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -587,7 +625,15 @@ public DeleteBlocklistIdentifierResponse deleteBlocklistIdentifier( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/AllowlistIdentifiers.java b/src/main/java/com/clerk/backend_api/AllowlistIdentifiers.java index 6ded7919..af396b1f 100644 --- a/src/main/java/com/clerk/backend_api/AllowlistIdentifiers.java +++ b/src/main/java/com/clerk/backend_api/AllowlistIdentifiers.java @@ -157,7 +157,15 @@ public DeleteAllowlistIdentifierResponse delete( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/BetaFeatures.java b/src/main/java/com/clerk/backend_api/BetaFeatures.java index 49b19aaf..d02c36d6 100644 --- a/src/main/java/com/clerk/backend_api/BetaFeatures.java +++ b/src/main/java/com/clerk/backend_api/BetaFeatures.java @@ -57,6 +57,16 @@ public UpdateInstanceAuthConfigRequestBuilder updateInstanceSettings() { return new UpdateInstanceAuthConfigRequestBuilder(this); } + /** + * Update instance settings + * Updates the settings of an instance + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpdateInstanceAuthConfigResponse updateInstanceSettingsDirect() throws Exception { + return updateInstanceSettings(Optional.empty()); + } + /** * Update instance settings * Updates the settings of an instance @@ -65,7 +75,7 @@ public UpdateInstanceAuthConfigRequestBuilder updateInstanceSettings() { * @throws Exception if the API call fails */ public UpdateInstanceAuthConfigResponse updateInstanceSettings( - UpdateInstanceAuthConfigRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -75,15 +85,12 @@ public UpdateInstanceAuthConfigResponse updateInstanceSettings( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -174,7 +181,15 @@ public UpdateInstanceAuthConfigResponse updateInstanceSettings( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -331,7 +346,15 @@ public UpdateProductionInstanceDomainResponse updateDomain( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -361,6 +384,20 @@ public ChangeProductionInstanceDomainRequestBuilder changeProductionInstanceDoma return new ChangeProductionInstanceDomainRequestBuilder(this); } + /** + * Update production instance domain + * Change the domain of a production instance. + * + * Changing the domain requires updating the [DNS records](https://clerk.com/docs/deployments/overview#dns-records) accordingly, deploying new [SSL certificates](https://clerk.com/docs/deployments/overview#deploy), updating your Social Connection's redirect URLs and setting the new keys in your code. + * + * WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). Also, while your application is being deployed, a small downtime is expected to occur. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ChangeProductionInstanceDomainResponse changeProductionInstanceDomainDirect() throws Exception { + return changeProductionInstanceDomain(Optional.empty()); + } + /** * Update production instance domain * Change the domain of a production instance. @@ -373,7 +410,7 @@ public ChangeProductionInstanceDomainRequestBuilder changeProductionInstanceDoma * @throws Exception if the API call fails */ public ChangeProductionInstanceDomainResponse changeProductionInstanceDomain( - ChangeProductionInstanceDomainRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -383,15 +420,12 @@ public ChangeProductionInstanceDomainResponse changeProductionInstanceDomain( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -471,7 +505,15 @@ public ChangeProductionInstanceDomainResponse changeProductionInstanceDomain( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/BlocklistIdentifiers.java b/src/main/java/com/clerk/backend_api/BlocklistIdentifiers.java index c1a1ccdc..5f0a0efa 100644 --- a/src/main/java/com/clerk/backend_api/BlocklistIdentifiers.java +++ b/src/main/java/com/clerk/backend_api/BlocklistIdentifiers.java @@ -145,7 +145,15 @@ public ListBlocklistIdentifiersResponse listDirect() throws Exception { Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/Clerk.java b/src/main/java/com/clerk/backend_api/Clerk.java index a80aa077..323633db 100644 --- a/src/main/java/com/clerk/backend_api/Clerk.java +++ b/src/main/java/com/clerk/backend_api/Clerk.java @@ -134,6 +134,8 @@ public class Clerk { private final TestingTokens testingTokens; + private final WaitlistEntries waitlistEntries; + /** * Various endpoints that do not belong in any particular category. */ @@ -298,6 +300,10 @@ public TestingTokens testingTokens() { return testingTokens; } + public WaitlistEntries waitlistEntries() { + return waitlistEntries; + } + private final SDKConfiguration sdkConfiguration; /** @@ -465,5 +471,6 @@ private Clerk(SDKConfiguration sdkConfiguration) { this.oauthApplications = new OauthApplications(sdkConfiguration); this.samlConnections = new SamlConnections(sdkConfiguration); this.testingTokens = new TestingTokens(sdkConfiguration); + this.waitlistEntries = new WaitlistEntries(sdkConfiguration); this.sdkConfiguration.initialize(); }} diff --git a/src/main/java/com/clerk/backend_api/ClerkRedirectUrls.java b/src/main/java/com/clerk/backend_api/ClerkRedirectUrls.java index 5f9608ec..7302a5ed 100644 --- a/src/main/java/com/clerk/backend_api/ClerkRedirectUrls.java +++ b/src/main/java/com/clerk/backend_api/ClerkRedirectUrls.java @@ -57,6 +57,16 @@ public CreateRedirectURLRequestBuilder create() { return new CreateRedirectURLRequestBuilder(this); } + /** + * Create a redirect URL + * Create a redirect URL + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateRedirectURLResponse createDirect() throws Exception { + return create(Optional.empty()); + } + /** * Create a redirect URL * Create a redirect URL @@ -65,7 +75,7 @@ public CreateRedirectURLRequestBuilder create() { * @throws Exception if the API call fails */ public CreateRedirectURLResponse create( - CreateRedirectURLRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -75,15 +85,12 @@ public CreateRedirectURLResponse create( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -174,7 +181,15 @@ public CreateRedirectURLResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -312,7 +327,15 @@ public GetRedirectURLResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -450,7 +473,15 @@ public DeleteRedirectURLResponse delete( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/Clients.java b/src/main/java/com/clerk/backend_api/Clients.java index 74d598e3..d508aa8f 100644 --- a/src/main/java/com/clerk/backend_api/Clients.java +++ b/src/main/java/com/clerk/backend_api/Clients.java @@ -205,7 +205,15 @@ public GetClientListResponse list( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -231,6 +239,16 @@ public VerifyClientRequestBuilder verify() { return new VerifyClientRequestBuilder(this); } + /** + * Verify a client + * Verifies the client in the provided token + * @return The response from the API call + * @throws Exception if the API call fails + */ + public VerifyClientResponse verifyDirect() throws Exception { + return verify(Optional.empty()); + } + /** * Verify a client * Verifies the client in the provided token @@ -239,7 +257,7 @@ public VerifyClientRequestBuilder verify() { * @throws Exception if the API call fails */ public VerifyClientResponse verify( - VerifyClientRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -249,15 +267,12 @@ public VerifyClientResponse verify( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -348,7 +363,15 @@ public VerifyClientResponse verify( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -486,7 +509,15 @@ public GetClientResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/Domains.java b/src/main/java/com/clerk/backend_api/Domains.java index 49dcd10c..96003813 100644 --- a/src/main/java/com/clerk/backend_api/Domains.java +++ b/src/main/java/com/clerk/backend_api/Domains.java @@ -154,7 +154,15 @@ public ListDomainsResponse listDirect() throws Exception { Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -184,6 +192,20 @@ public AddDomainRequestBuilder add() { return new AddDomainRequestBuilder(this); } + /** + * Add a domain + * Add a new domain for your instance. + * Useful in the case of multi-domain instances, allows adding satellite domains to an instance. + * The new domain must have a `name`. The domain name can contain the port for development instances, like `localhost:3000`. + * At the moment, instances can have only one primary domain, so the `is_satellite` parameter must be set to `true`. + * If you're planning to configure the new satellite domain to run behind a proxy, pass the `proxy_url` parameter accordingly. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public AddDomainResponse addDirect() throws Exception { + return add(Optional.empty()); + } + /** * Add a domain * Add a new domain for your instance. @@ -196,7 +218,7 @@ public AddDomainRequestBuilder add() { * @throws Exception if the API call fails */ public AddDomainResponse add( - AddDomainRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -206,15 +228,12 @@ public AddDomainResponse add( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -305,7 +324,15 @@ public AddDomainResponse add( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -445,7 +472,15 @@ public DeleteDomainResponse delete( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -613,7 +648,15 @@ public UpdateDomainResponse update( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/EmailAddresses.java b/src/main/java/com/clerk/backend_api/EmailAddresses.java index e2372c60..e7da5fca 100644 --- a/src/main/java/com/clerk/backend_api/EmailAddresses.java +++ b/src/main/java/com/clerk/backend_api/EmailAddresses.java @@ -62,6 +62,16 @@ public CreateEmailAddressRequestBuilder create() { return new CreateEmailAddressRequestBuilder(this); } + /** + * Create an email address + * Create a new email address + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateEmailAddressResponse createDirect() throws Exception { + return create(Optional.empty()); + } + /** * Create an email address * Create a new email address @@ -70,7 +80,7 @@ public CreateEmailAddressRequestBuilder create() { * @throws Exception if the API call fails */ public CreateEmailAddressResponse create( - CreateEmailAddressRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -80,15 +90,12 @@ public CreateEmailAddressResponse create( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -179,7 +186,15 @@ public CreateEmailAddressResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -317,7 +332,15 @@ public GetEmailAddressResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -455,7 +478,15 @@ public DeleteEmailAddressResponse delete( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -481,6 +512,18 @@ public UpdateEmailAddressRequestBuilder update() { return new UpdateEmailAddressRequestBuilder(this); } + /** + * Update an email address + * Updates an email address. + * @param emailAddressId The ID of the email address to update + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpdateEmailAddressResponse update( + String emailAddressId) throws Exception { + return update(emailAddressId, Optional.empty()); + } + /** * Update an email address * Updates an email address. @@ -491,7 +534,7 @@ public UpdateEmailAddressRequestBuilder update() { */ public UpdateEmailAddressResponse update( String emailAddressId, - UpdateEmailAddressRequestBody requestBody) throws Exception { + Optional requestBody) throws Exception { UpdateEmailAddressRequest request = UpdateEmailAddressRequest .builder() @@ -516,9 +559,6 @@ public UpdateEmailAddressResponse update( "requestBody", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -609,7 +649,15 @@ public UpdateEmailAddressResponse update( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/EmailAndSmsTemplates.java b/src/main/java/com/clerk/backend_api/EmailAndSmsTemplates.java index 57c87db5..9ab47378 100644 --- a/src/main/java/com/clerk/backend_api/EmailAndSmsTemplates.java +++ b/src/main/java/com/clerk/backend_api/EmailAndSmsTemplates.java @@ -199,7 +199,15 @@ public UpsertTemplateResponse upsert( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/EmailSMSTemplates.java b/src/main/java/com/clerk/backend_api/EmailSMSTemplates.java index 3fd6900e..81d05f2f 100644 --- a/src/main/java/com/clerk/backend_api/EmailSMSTemplates.java +++ b/src/main/java/com/clerk/backend_api/EmailSMSTemplates.java @@ -184,7 +184,15 @@ public GetTemplateListResponse list( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -329,7 +337,15 @@ public RevertTemplateResponse revert( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -474,7 +490,15 @@ public GetTemplateResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -654,7 +678,15 @@ public ToggleTemplateDeliveryResponse toggleTemplateDelivery( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/InstanceSettings.java b/src/main/java/com/clerk/backend_api/InstanceSettings.java index 2663179e..22cfa2c9 100644 --- a/src/main/java/com/clerk/backend_api/InstanceSettings.java +++ b/src/main/java/com/clerk/backend_api/InstanceSettings.java @@ -4,10 +4,13 @@ package com.clerk.backend_api; +import com.clerk.backend_api.models.components.Instance; import com.clerk.backend_api.models.components.InstanceRestrictions; import com.clerk.backend_api.models.components.OrganizationSettings; import com.clerk.backend_api.models.errors.ClerkErrors; import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.GetInstanceRequestBuilder; +import com.clerk.backend_api.models.operations.GetInstanceResponse; import com.clerk.backend_api.models.operations.SDKMethodInterfaces.*; import com.clerk.backend_api.models.operations.UpdateInstanceOrganizationSettingsRequestBody; import com.clerk.backend_api.models.operations.UpdateInstanceOrganizationSettingsRequestBuilder; @@ -37,6 +40,7 @@ import java.util.Optional; public class InstanceSettings implements + MethodCallGetInstance, MethodCallUpdateInstance, MethodCallUpdateInstanceRestrictions, MethodCallUpdateInstanceOrganizationSettings { @@ -48,6 +52,128 @@ public class InstanceSettings implements } + /** + * Fetch the current instance + * Fetches the current instance + * @return The call builder + */ + public GetInstanceRequestBuilder getInstance() { + return new GetInstanceRequestBuilder(this); + } + + /** + * Fetch the current instance + * Fetches the current instance + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetInstanceResponse getInstanceDirect() throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/instance"); + + HTTPRequest _req = new HTTPRequest(_url, "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() + .beforeRequest( + new BeforeRequestContextImpl( + "GetInstance", + Optional.of(List.of()), + _hookSecuritySource), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "GetInstance", + Optional.of(List.of()), + _hookSecuritySource), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "GetInstance", + Optional.of(List.of()), + _hookSecuritySource), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "GetInstance", + Optional.of(List.of()), + _hookSecuritySource), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetInstanceResponse.Builder _resBuilder = + GetInstanceResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetInstanceResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Instance _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withInstance(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + /** * Update instance settings * Updates the settings of an instance @@ -57,6 +183,16 @@ public UpdateInstanceRequestBuilder update() { return new UpdateInstanceRequestBuilder(this); } + /** + * Update instance settings + * Updates the settings of an instance + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpdateInstanceResponse updateDirect() throws Exception { + return update(Optional.empty()); + } + /** * Update instance settings * Updates the settings of an instance @@ -65,7 +201,7 @@ public UpdateInstanceRequestBuilder update() { * @throws Exception if the API call fails */ public UpdateInstanceResponse update( - UpdateInstanceRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -75,15 +211,12 @@ public UpdateInstanceResponse update( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -163,7 +296,15 @@ public UpdateInstanceResponse update( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -189,6 +330,16 @@ public UpdateInstanceRestrictionsRequestBuilder updateRestrictions() { return new UpdateInstanceRestrictionsRequestBuilder(this); } + /** + * Update instance restrictions + * Updates the restriction settings of an instance + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpdateInstanceRestrictionsResponse updateRestrictionsDirect() throws Exception { + return updateRestrictions(Optional.empty()); + } + /** * Update instance restrictions * Updates the restriction settings of an instance @@ -197,7 +348,7 @@ public UpdateInstanceRestrictionsRequestBuilder updateRestrictions() { * @throws Exception if the API call fails */ public UpdateInstanceRestrictionsResponse updateRestrictions( - UpdateInstanceRestrictionsRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -207,15 +358,12 @@ public UpdateInstanceRestrictionsResponse updateRestrictions( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -306,7 +454,15 @@ public UpdateInstanceRestrictionsResponse updateRestrictions( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -332,6 +488,16 @@ public UpdateInstanceOrganizationSettingsRequestBuilder updateOrganizationSettin return new UpdateInstanceOrganizationSettingsRequestBuilder(this); } + /** + * Update instance organization settings + * Updates the organization settings of the instance + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpdateInstanceOrganizationSettingsResponse updateOrganizationSettingsDirect() throws Exception { + return updateOrganizationSettings(Optional.empty()); + } + /** * Update instance organization settings * Updates the organization settings of the instance @@ -340,7 +506,7 @@ public UpdateInstanceOrganizationSettingsRequestBuilder updateOrganizationSettin * @throws Exception if the API call fails */ public UpdateInstanceOrganizationSettingsResponse updateOrganizationSettings( - UpdateInstanceOrganizationSettingsRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -350,15 +516,12 @@ public UpdateInstanceOrganizationSettingsResponse updateOrganizationSettings( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -379,7 +542,7 @@ public UpdateInstanceOrganizationSettingsResponse updateOrganizationSettings( HttpResponse _httpRes; try { _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "402", "404", "422", "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "402", "404", "422", "4XX", "5XX")) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( @@ -435,7 +598,7 @@ public UpdateInstanceOrganizationSettingsResponse updateOrganizationSettings( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "402", "404", "422")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "402", "404", "422")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { ClerkErrors _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), @@ -449,7 +612,15 @@ public UpdateInstanceOrganizationSettingsResponse updateOrganizationSettings( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/Invitations.java b/src/main/java/com/clerk/backend_api/Invitations.java index 00199855..d16739b4 100644 --- a/src/main/java/com/clerk/backend_api/Invitations.java +++ b/src/main/java/com/clerk/backend_api/Invitations.java @@ -8,6 +8,8 @@ import com.clerk.backend_api.models.components.InvitationRevoked; import com.clerk.backend_api.models.errors.ClerkErrors; import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.CreateBulkInvitationsRequestBuilder; +import com.clerk.backend_api.models.operations.CreateBulkInvitationsResponse; import com.clerk.backend_api.models.operations.CreateInvitationRequestBody; import com.clerk.backend_api.models.operations.CreateInvitationRequestBuilder; import com.clerk.backend_api.models.operations.CreateInvitationResponse; @@ -15,6 +17,7 @@ import com.clerk.backend_api.models.operations.ListInvitationsRequest; import com.clerk.backend_api.models.operations.ListInvitationsRequestBuilder; import com.clerk.backend_api.models.operations.ListInvitationsResponse; +import com.clerk.backend_api.models.operations.RequestBody; import com.clerk.backend_api.models.operations.RevokeInvitationRequest; import com.clerk.backend_api.models.operations.RevokeInvitationRequestBuilder; import com.clerk.backend_api.models.operations.RevokeInvitationResponse; @@ -45,6 +48,7 @@ public class Invitations implements MethodCallCreateInvitation, MethodCallListInvitations, + MethodCallCreateBulkInvitations, MethodCallRevokeInvitation { private final SDKConfiguration sdkConfiguration; @@ -65,6 +69,18 @@ public CreateInvitationRequestBuilder create() { return new CreateInvitationRequestBuilder(this); } + /** + * Create an invitation + * Creates a new invitation for the given email address and sends the invitation email. + * Keep in mind that you cannot create an invitation if there is already one for the given email address. + * Also, trying to create an invitation for an email address that already exists in your application will result to an error. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateInvitationResponse createDirect() throws Exception { + return create(Optional.empty()); + } + /** * Create an invitation * Creates a new invitation for the given email address and sends the invitation email. @@ -75,7 +91,7 @@ public CreateInvitationRequestBuilder create() { * @throws Exception if the API call fails */ public CreateInvitationResponse create( - CreateInvitationRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -85,15 +101,12 @@ public CreateInvitationResponse create( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -184,7 +197,15 @@ public CreateInvitationResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -217,7 +238,7 @@ public ListInvitationsRequestBuilder list() { * @throws Exception if the API call fails */ public ListInvitationsResponse listDirect() throws Exception { - return list(Optional.empty(), Optional.empty(), Optional.empty()); + return list(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -229,19 +250,22 @@ public ListInvitationsResponse listDirect() throws Exception { Needs to be an integer greater or equal to zero. To be used in conjunction with `limit`. * @param status Filter invitations based on their status + * @param query Filter invitations based on their `email_address` or `id` * @return The response from the API call * @throws Exception if the API call fails */ public ListInvitationsResponse list( Optional limit, Optional offset, - Optional status) throws Exception { + Optional status, + Optional query) throws Exception { ListInvitationsRequest request = ListInvitationsRequest .builder() .limit(limit) .offset(offset) .status(status) + .query(query) .build(); String _baseUrl = this.sdkConfiguration.serverUrl; @@ -330,7 +354,182 @@ public ListInvitationsResponse list( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Create multiple invitations + * Use this API operation to create multiple invitations for the provided email addresses. You can choose to send the + * invitations as emails by setting the `notify` parameter to `true`. There cannot be an existing invitation for any + * of the email addresses you provide unless you set `ignore_existing` to `true` for specific email addresses. Please + * note that there must be no existing user for any of the email addresses you provide, and this rule cannot be bypassed. + * @return The call builder + */ + public CreateBulkInvitationsRequestBuilder createBulkInvitations() { + return new CreateBulkInvitationsRequestBuilder(this); + } + + /** + * Create multiple invitations + * Use this API operation to create multiple invitations for the provided email addresses. You can choose to send the + * invitations as emails by setting the `notify` parameter to `true`. There cannot be an existing invitation for any + * of the email addresses you provide unless you set `ignore_existing` to `true` for specific email addresses. Please + * note that there must be no existing user for any of the email addresses you provide, and this rule cannot be bypassed. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateBulkInvitationsResponse createBulkInvitationsDirect() throws Exception { + return createBulkInvitations(Optional.empty()); + } + + /** + * Create multiple invitations + * Use this API operation to create multiple invitations for the provided email addresses. You can choose to send the + * invitations as emails by setting the `notify` parameter to `true`. There cannot be an existing invitation for any + * of the email addresses you provide unless you set `ignore_existing` to `true` for specific email addresses. Please + * note that there must be no existing user for any of the email addresses you provide, and this rule cannot be bypassed. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateBulkInvitationsResponse createBulkInvitations( + Optional> request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/invitations/bulk"); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference>>() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "request", + "json", + false); + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _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() + .beforeRequest( + new BeforeRequestContextImpl( + "CreateBulkInvitations", + Optional.of(List.of()), + _hookSecuritySource), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "422", "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "CreateBulkInvitations", + Optional.of(List.of()), + _hookSecuritySource), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "CreateBulkInvitations", + Optional.of(List.of()), + _hookSecuritySource), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "CreateBulkInvitations", + Optional.of(List.of()), + _hookSecuritySource), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CreateBulkInvitationsResponse.Builder _resBuilder = + CreateBulkInvitationsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + CreateBulkInvitationsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + List _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference>() {}); + _res.withInvitationList(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "422")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ClerkErrors _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -474,7 +673,15 @@ public RevokeInvitationResponse revoke( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/Jwks.java b/src/main/java/com/clerk/backend_api/Jwks.java index 5184b3b1..9fc45f16 100644 --- a/src/main/java/com/clerk/backend_api/Jwks.java +++ b/src/main/java/com/clerk/backend_api/Jwks.java @@ -4,7 +4,6 @@ package com.clerk.backend_api; -import com.clerk.backend_api.models.components.WellKnownJWKS; import com.clerk.backend_api.models.errors.SDKError; import com.clerk.backend_api.models.operations.GetJWKSRequestBuilder; import com.clerk.backend_api.models.operations.GetJWKSResponse; @@ -118,10 +117,10 @@ public GetJWKSResponse getDirect() throws Exception { if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - WellKnownJWKS _out = Utils.mapper().readValue( + com.clerk.backend_api.models.components.Jwks _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withWellKnownJWKS(Optional.ofNullable(_out)); + new TypeReference() {}); + _res.withJwks(Optional.ofNullable(_out)); return _res; } else { throw new SDKError( @@ -131,7 +130,15 @@ public GetJWKSResponse getDirect() throws Exception { Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/JwtTemplates.java b/src/main/java/com/clerk/backend_api/JwtTemplates.java index aebb1f82..0584b3fa 100644 --- a/src/main/java/com/clerk/backend_api/JwtTemplates.java +++ b/src/main/java/com/clerk/backend_api/JwtTemplates.java @@ -151,7 +151,15 @@ public ListJWTTemplatesResponse listDirect() throws Exception { Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -177,6 +185,16 @@ public CreateJWTTemplateRequestBuilder create() { return new CreateJWTTemplateRequestBuilder(this); } + /** + * Create a JWT template + * Create a new JWT template + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateJWTTemplateResponse createDirect() throws Exception { + return create(Optional.empty()); + } + /** * Create a JWT template * Create a new JWT template @@ -185,7 +203,7 @@ public CreateJWTTemplateRequestBuilder create() { * @throws Exception if the API call fails */ public CreateJWTTemplateResponse create( - CreateJWTTemplateRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -195,15 +213,12 @@ public CreateJWTTemplateResponse create( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -294,7 +309,15 @@ public CreateJWTTemplateResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -432,7 +455,15 @@ public GetJWTTemplateResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -458,6 +489,18 @@ public UpdateJWTTemplateRequestBuilder update() { return new UpdateJWTTemplateRequestBuilder(this); } + /** + * Update a JWT template + * Updates an existing JWT template + * @param templateId The ID of the JWT template to update + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpdateJWTTemplateResponse update( + String templateId) throws Exception { + return update(templateId, Optional.empty()); + } + /** * Update a JWT template * Updates an existing JWT template @@ -468,7 +511,7 @@ public UpdateJWTTemplateRequestBuilder update() { */ public UpdateJWTTemplateResponse update( String templateId, - UpdateJWTTemplateRequestBody requestBody) throws Exception { + Optional requestBody) throws Exception { UpdateJWTTemplateRequest request = UpdateJWTTemplateRequest .builder() @@ -493,9 +536,6 @@ public UpdateJWTTemplateResponse update( "requestBody", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -586,7 +626,15 @@ public UpdateJWTTemplateResponse update( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -722,7 +770,15 @@ public DeleteJWTTemplateResponse delete( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/Miscellaneous.java b/src/main/java/com/clerk/backend_api/Miscellaneous.java index da00f556..164b5905 100644 --- a/src/main/java/com/clerk/backend_api/Miscellaneous.java +++ b/src/main/java/com/clerk/backend_api/Miscellaneous.java @@ -148,7 +148,15 @@ public GetPublicInterstitialResponse getInterstitial( // no content return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "500", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "500", "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/OauthApplications.java b/src/main/java/com/clerk/backend_api/OauthApplications.java index 0b49154c..7fa8dcf1 100644 --- a/src/main/java/com/clerk/backend_api/OauthApplications.java +++ b/src/main/java/com/clerk/backend_api/OauthApplications.java @@ -213,7 +213,15 @@ public ListOAuthApplicationsResponse list( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -241,6 +249,18 @@ public CreateOAuthApplicationRequestBuilder create() { return new CreateOAuthApplicationRequestBuilder(this); } + /** + * Create an OAuth application + * Creates a new OAuth application with the given name and callback URL for an instance. + * The callback URL must be a valid url. + * All URL schemes are allowed such as `http://`, `https://`, `myapp://`, etc... + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateOAuthApplicationResponse createDirect() throws Exception { + return create(Optional.empty()); + } + /** * Create an OAuth application * Creates a new OAuth application with the given name and callback URL for an instance. @@ -251,7 +271,7 @@ public CreateOAuthApplicationRequestBuilder create() { * @throws Exception if the API call fails */ public CreateOAuthApplicationResponse create( - CreateOAuthApplicationRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -261,15 +281,12 @@ public CreateOAuthApplicationResponse create( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -360,7 +377,15 @@ public CreateOAuthApplicationResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -498,7 +523,15 @@ public GetOAuthApplicationResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -582,7 +615,7 @@ public UpdateOAuthApplicationResponse update( HttpResponse _httpRes; try { _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "422", "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "404", "422", "4XX", "5XX")) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( @@ -638,7 +671,7 @@ public UpdateOAuthApplicationResponse update( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "422")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "404", "422")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { ClerkErrors _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), @@ -652,7 +685,15 @@ public UpdateOAuthApplicationResponse update( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -792,7 +833,15 @@ public DeleteOAuthApplicationResponse delete( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -932,7 +981,15 @@ public RotateOAuthApplicationSecretResponse rotateSecret( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/OrganizationDomain.java b/src/main/java/com/clerk/backend_api/OrganizationDomain.java index 20787742..0d879916 100644 --- a/src/main/java/com/clerk/backend_api/OrganizationDomain.java +++ b/src/main/java/com/clerk/backend_api/OrganizationDomain.java @@ -179,7 +179,15 @@ public UpdateOrganizationDomainResponse update( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/OrganizationDomains.java b/src/main/java/com/clerk/backend_api/OrganizationDomains.java index 10ba9b73..f3104a38 100644 --- a/src/main/java/com/clerk/backend_api/OrganizationDomains.java +++ b/src/main/java/com/clerk/backend_api/OrganizationDomains.java @@ -186,7 +186,15 @@ public CreateOrganizationDomainResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -323,7 +331,15 @@ public ListOrganizationDomainsResponse list( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -464,7 +480,15 @@ public DeleteOrganizationDomainResponse delete( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/OrganizationInvitations.java b/src/main/java/com/clerk/backend_api/OrganizationInvitations.java index 6bbbbf1d..5427332d 100644 --- a/src/main/java/com/clerk/backend_api/OrganizationInvitations.java +++ b/src/main/java/com/clerk/backend_api/OrganizationInvitations.java @@ -9,6 +9,7 @@ import com.clerk.backend_api.models.errors.ClerkErrors; import com.clerk.backend_api.models.errors.SDKError; import com.clerk.backend_api.models.operations.CreateOrganizationInvitationBulkRequest; +import com.clerk.backend_api.models.operations.CreateOrganizationInvitationBulkRequestBody; import com.clerk.backend_api.models.operations.CreateOrganizationInvitationBulkRequestBuilder; import com.clerk.backend_api.models.operations.CreateOrganizationInvitationBulkResponse; import com.clerk.backend_api.models.operations.CreateOrganizationInvitationRequest; @@ -28,7 +29,6 @@ import com.clerk.backend_api.models.operations.ListPendingOrganizationInvitationsRequest; import com.clerk.backend_api.models.operations.ListPendingOrganizationInvitationsRequestBuilder; import com.clerk.backend_api.models.operations.ListPendingOrganizationInvitationsResponse; -import com.clerk.backend_api.models.operations.RequestBody; import com.clerk.backend_api.models.operations.RevokeOrganizationInvitationRequest; import com.clerk.backend_api.models.operations.RevokeOrganizationInvitationRequestBody; import com.clerk.backend_api.models.operations.RevokeOrganizationInvitationRequestBuilder; @@ -184,7 +184,7 @@ public ListInstanceOrganizationInvitationsResponse getAll( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "404", "422", "500")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "404", "422")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { ClerkErrors _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), @@ -198,7 +198,29 @@ public ListInstanceOrganizationInvitationsResponse getAll( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "500")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ClerkErrors _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -239,6 +261,33 @@ public CreateOrganizationInvitationRequestBuilder create() { return new CreateOrganizationInvitationRequestBuilder(this); } + /** + * Create and send an organization invitation + * Creates a new organization invitation and sends an email to the provided `email_address` with a link to accept the invitation and join the organization. + * You can specify the `role` for the invited organization member. + * + * New organization invitations get a "pending" status until they are revoked by an organization administrator or accepted by the invitee. + * + * The request body supports passing an optional `redirect_url` parameter. + * When the invited user clicks the link to accept the invitation, they will be redirected to the URL provided. + * Use this parameter to implement a custom invitation acceptance flow. + * + * You can specify the ID of the user that will send the invitation with the `inviter_user_id` parameter. + * That user must be a member with administrator privileges in the organization. + * Only "admin" members can create organization invitations. + * + * You can optionally provide public and private metadata for the organization invitation. + * The public metadata are visible by both the Frontend and the Backend whereas the private ones only by the Backend. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. + * @param organizationId The ID of the organization for which to send the invitation + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateOrganizationInvitationResponse create( + String organizationId) throws Exception { + return create(organizationId, Optional.empty()); + } + /** * Create and send an organization invitation * Creates a new organization invitation and sends an email to the provided `email_address` with a link to accept the invitation and join the organization. @@ -264,7 +313,7 @@ public CreateOrganizationInvitationRequestBuilder create() { */ public CreateOrganizationInvitationResponse create( String organizationId, - CreateOrganizationInvitationRequestBody requestBody) throws Exception { + Optional requestBody) throws Exception { CreateOrganizationInvitationRequest request = CreateOrganizationInvitationRequest .builder() @@ -289,9 +338,6 @@ public CreateOrganizationInvitationResponse create( "requestBody", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -382,7 +428,15 @@ public CreateOrganizationInvitationResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -564,7 +618,15 @@ public ListOrganizationInvitationsResponse list( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -624,7 +686,7 @@ public CreateOrganizationInvitationBulkRequestBuilder bulkCreate() { */ public CreateOrganizationInvitationBulkResponse bulkCreate( String organizationId, - List requestBody) throws Exception { + List requestBody) throws Exception { CreateOrganizationInvitationBulkRequest request = CreateOrganizationInvitationBulkRequest .builder() @@ -742,7 +804,15 @@ public CreateOrganizationInvitationBulkResponse bulkCreate( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -927,7 +997,15 @@ public ListPendingOrganizationInvitationsResponse listPending( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1068,7 +1146,15 @@ public GetOrganizationInvitationResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1248,7 +1334,15 @@ public RevokeOrganizationInvitationResponse revoke( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/OrganizationMemberships.java b/src/main/java/com/clerk/backend_api/OrganizationMemberships.java index 0ff27be8..32e3911a 100644 --- a/src/main/java/com/clerk/backend_api/OrganizationMemberships.java +++ b/src/main/java/com/clerk/backend_api/OrganizationMemberships.java @@ -210,7 +210,15 @@ public CreateOrganizationMembershipResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -379,7 +387,15 @@ public ListOrganizationMembershipsResponse list( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -466,7 +482,7 @@ public UpdateOrganizationMembershipResponse update( HttpResponse _httpRes; try { _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "404", "422", "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "422", "4XX", "5XX")) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( @@ -522,7 +538,7 @@ public UpdateOrganizationMembershipResponse update( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "404", "422")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "422")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { ClerkErrors _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), @@ -536,7 +552,15 @@ public UpdateOrganizationMembershipResponse update( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -607,7 +631,7 @@ public DeleteOrganizationMembershipResponse delete( HttpResponse _httpRes; try { _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "401", "404", "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401", "404", "4XX", "5XX")) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( @@ -663,7 +687,7 @@ public DeleteOrganizationMembershipResponse delete( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "401", "404")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401", "404")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { ClerkErrors _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), @@ -677,7 +701,15 @@ public DeleteOrganizationMembershipResponse delete( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -705,6 +737,22 @@ public UpdateOrganizationMembershipMetadataRequestBuilder updateMetadata() { return new UpdateOrganizationMembershipMetadataRequestBuilder(this); } + /** + * Merge and update organization membership metadata + * Update an organization membership's metadata attributes by merging existing values with the provided parameters. + * Metadata values will be updated via a deep merge. Deep means that any nested JSON objects will be merged as well. + * You can remove metadata keys at any level by setting their value to `null`. + * @param organizationId The ID of the organization the membership belongs to + * @param userId The ID of the user that this membership belongs to + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpdateOrganizationMembershipMetadataResponse updateMetadata( + String organizationId, + String userId) throws Exception { + return updateMetadata(organizationId, userId, Optional.empty()); + } + /** * Merge and update organization membership metadata * Update an organization membership's metadata attributes by merging existing values with the provided parameters. @@ -719,7 +767,7 @@ public UpdateOrganizationMembershipMetadataRequestBuilder updateMetadata() { public UpdateOrganizationMembershipMetadataResponse updateMetadata( String organizationId, String userId, - UpdateOrganizationMembershipMetadataRequestBody requestBody) throws Exception { + Optional requestBody) throws Exception { UpdateOrganizationMembershipMetadataRequest request = UpdateOrganizationMembershipMetadataRequest .builder() @@ -745,9 +793,6 @@ public UpdateOrganizationMembershipMetadataResponse updateMetadata( "requestBody", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -838,7 +883,15 @@ public UpdateOrganizationMembershipMetadataResponse updateMetadata( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -986,7 +1039,7 @@ public InstanceGetOrganizationMembershipsResponse getAll( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "401", "422", "500")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "401", "422")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { ClerkErrors _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), @@ -1000,7 +1053,29 @@ public InstanceGetOrganizationMembershipsResponse getAll( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "500")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ClerkErrors _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/Organizations.java b/src/main/java/com/clerk/backend_api/Organizations.java index e086e9f2..61ae1286 100644 --- a/src/main/java/com/clerk/backend_api/Organizations.java +++ b/src/main/java/com/clerk/backend_api/Organizations.java @@ -201,7 +201,15 @@ public ListOrganizationsResponse list( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -221,7 +229,6 @@ public ListOrganizationsResponse list( /** * Create an organization * Creates a new organization with the given name for an instance. - * In order to successfully create an organization you need to provide the ID of the User who will become the organization administrator. * You can specify an optional slug for the new organization. * If provided, the organization slug can contain only lowercase alphanumeric characters (letters and digits) and the dash "-". * Organization slugs must be unique for the instance. @@ -240,7 +247,25 @@ public CreateOrganizationRequestBuilder create() { /** * Create an organization * Creates a new organization with the given name for an instance. - * In order to successfully create an organization you need to provide the ID of the User who will become the organization administrator. + * You can specify an optional slug for the new organization. + * If provided, the organization slug can contain only lowercase alphanumeric characters (letters and digits) and the dash "-". + * Organization slugs must be unique for the instance. + * You can provide additional metadata for the organization and set any custom attribute you want. + * Organizations support private and public metadata. + * Private metadata can only be accessed from the Backend API. + * Public metadata can be accessed from the Backend API, and are read-only from the Frontend API. + * The `created_by` user will see this as their [active organization] (https://clerk.com/docs/organizations/overview#active-organization) + * the next time they create a session, presuming they don't explicitly set a different organization as active before then. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateOrganizationResponse createDirect() throws Exception { + return create(Optional.empty()); + } + + /** + * Create an organization + * Creates a new organization with the given name for an instance. * You can specify an optional slug for the new organization. * If provided, the organization slug can contain only lowercase alphanumeric characters (letters and digits) and the dash "-". * Organization slugs must be unique for the instance. @@ -255,7 +280,7 @@ public CreateOrganizationRequestBuilder create() { * @throws Exception if the API call fails */ public CreateOrganizationResponse create( - CreateOrganizationRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -265,15 +290,12 @@ public CreateOrganizationResponse create( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -364,7 +386,15 @@ public CreateOrganizationResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -522,7 +552,15 @@ public GetOrganizationResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -676,7 +714,15 @@ public UpdateOrganizationResponse update( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -818,7 +864,15 @@ public DeleteOrganizationResponse delete( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -978,7 +1032,15 @@ public MergeOrganizationMetadataResponse mergeMetadata( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1007,6 +1069,21 @@ public UploadOrganizationLogoRequestBuilder uploadLogo() { return new UploadOrganizationLogoRequestBuilder(this); } + /** + * Upload a logo for the organization + * Set or replace an organization's logo, by uploading an image file. + * This endpoint uses the `multipart/form-data` request content type and accepts a file of image type. + * The file size cannot exceed 10MB. + * Only the following file content types are supported: `image/jpeg`, `image/png`, `image/gif`, `image/webp`, `image/x-icon`, `image/vnd.microsoft.icon`. + * @param organizationId The ID of the organization for which to upload a logo + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UploadOrganizationLogoResponse uploadLogo( + String organizationId) throws Exception { + return uploadLogo(organizationId, Optional.empty()); + } + /** * Upload a logo for the organization * Set or replace an organization's logo, by uploading an image file. @@ -1020,7 +1097,7 @@ public UploadOrganizationLogoRequestBuilder uploadLogo() { */ public UploadOrganizationLogoResponse uploadLogo( String organizationId, - UploadOrganizationLogoRequestBody requestBody) throws Exception { + Optional requestBody) throws Exception { UploadOrganizationLogoRequest request = UploadOrganizationLogoRequest .builder() @@ -1045,9 +1122,6 @@ public UploadOrganizationLogoResponse uploadLogo( "requestBody", "multipart", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -1138,7 +1212,15 @@ public UploadOrganizationLogoResponse uploadLogo( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1274,7 +1356,15 @@ public DeleteOrganizationLogoResponse deleteLogo( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/PhoneNumbers.java b/src/main/java/com/clerk/backend_api/PhoneNumbers.java index 77d05431..32ec4a6d 100644 --- a/src/main/java/com/clerk/backend_api/PhoneNumbers.java +++ b/src/main/java/com/clerk/backend_api/PhoneNumbers.java @@ -62,6 +62,16 @@ public CreatePhoneNumberRequestBuilder create() { return new CreatePhoneNumberRequestBuilder(this); } + /** + * Create a phone number + * Create a new phone number + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreatePhoneNumberResponse createDirect() throws Exception { + return create(Optional.empty()); + } + /** * Create a phone number * Create a new phone number @@ -70,7 +80,7 @@ public CreatePhoneNumberRequestBuilder create() { * @throws Exception if the API call fails */ public CreatePhoneNumberResponse create( - CreatePhoneNumberRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -80,15 +90,12 @@ public CreatePhoneNumberResponse create( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -179,7 +186,15 @@ public CreatePhoneNumberResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -317,7 +332,15 @@ public GetPhoneNumberResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -455,7 +478,15 @@ public DeletePhoneNumberResponse delete( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -481,6 +512,18 @@ public UpdatePhoneNumberRequestBuilder update() { return new UpdatePhoneNumberRequestBuilder(this); } + /** + * Update a phone number + * Updates a phone number + * @param phoneNumberId The ID of the phone number to update + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpdatePhoneNumberResponse update( + String phoneNumberId) throws Exception { + return update(phoneNumberId, Optional.empty()); + } + /** * Update a phone number * Updates a phone number @@ -491,7 +534,7 @@ public UpdatePhoneNumberRequestBuilder update() { */ public UpdatePhoneNumberResponse update( String phoneNumberId, - UpdatePhoneNumberRequestBody requestBody) throws Exception { + Optional requestBody) throws Exception { UpdatePhoneNumberRequest request = UpdatePhoneNumberRequest .builder() @@ -516,9 +559,6 @@ public UpdatePhoneNumberResponse update( "requestBody", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -609,7 +649,15 @@ public UpdatePhoneNumberResponse update( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/ProxyChecks.java b/src/main/java/com/clerk/backend_api/ProxyChecks.java index 4ff8998a..bd8b5a62 100644 --- a/src/main/java/com/clerk/backend_api/ProxyChecks.java +++ b/src/main/java/com/clerk/backend_api/ProxyChecks.java @@ -55,6 +55,23 @@ public VerifyDomainProxyRequestBuilder verify() { return new VerifyDomainProxyRequestBuilder(this); } + /** + * Verify the proxy configuration for your domain + * This endpoint can be used to validate that a proxy-enabled domain is operational. + * It tries to verify that the proxy URL provided in the parameters maps to a functional proxy that can reach the Clerk Frontend API. + * + * You can use this endpoint before you set a proxy URL for a domain. This way you can ensure that switching to proxy-based + * configuration will not lead to downtime for your instance. + * + * The `proxy_url` parameter allows for testing proxy configurations for domains that don't have a proxy URL yet, or operate on + * a different proxy URL than the one provided. It can also be used to re-validate a domain that is already configured to work with a proxy. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public VerifyDomainProxyResponse verifyDirect() throws Exception { + return verify(Optional.empty()); + } + /** * Verify the proxy configuration for your domain * This endpoint can be used to validate that a proxy-enabled domain is operational. @@ -70,7 +87,7 @@ public VerifyDomainProxyRequestBuilder verify() { * @throws Exception if the API call fails */ public VerifyDomainProxyResponse verify( - VerifyDomainProxyRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -80,15 +97,12 @@ public VerifyDomainProxyResponse verify( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -179,7 +193,15 @@ public VerifyDomainProxyResponse verify( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/RedirectURLs.java b/src/main/java/com/clerk/backend_api/RedirectURLs.java index 082ce99e..f80a5e40 100644 --- a/src/main/java/com/clerk/backend_api/RedirectURLs.java +++ b/src/main/java/com/clerk/backend_api/RedirectURLs.java @@ -131,7 +131,15 @@ public ListRedirectURLsResponse listDirect() throws Exception { Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/SDKConfiguration.java b/src/main/java/com/clerk/backend_api/SDKConfiguration.java index 2be1c920..b0c1a479 100644 --- a/src/main/java/com/clerk/backend_api/SDKConfiguration.java +++ b/src/main/java/com/clerk/backend_api/SDKConfiguration.java @@ -29,8 +29,8 @@ public String resolvedServerUrl() { 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.5.0"; - public static final String GEN_VERSION = "2.481.0"; + public static final String SDK_VERSION = "1.6.0"; + public static final String GEN_VERSION = "2.503.2"; 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", diff --git a/src/main/java/com/clerk/backend_api/SamlConnections.java b/src/main/java/com/clerk/backend_api/SamlConnections.java index ee7f2e98..a800c0e5 100644 --- a/src/main/java/com/clerk/backend_api/SamlConnections.java +++ b/src/main/java/com/clerk/backend_api/SamlConnections.java @@ -79,7 +79,7 @@ public ListSAMLConnectionsRequestBuilder list() { * @throws Exception if the API call fails */ public ListSAMLConnectionsResponse listDirect() throws Exception { - return list(Optional.empty(), Optional.empty()); + return list(Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -92,17 +92,26 @@ public ListSAMLConnectionsResponse listDirect() throws Exception { * @param offset Skip the first `offset` results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with `limit`. + * @param organizationId Returns SAML connections that have an associated organization ID to the + given organizations. + For each organization id, the `+` and `-` can be + prepended to the id, which denote whether the + respective organization should be included or + excluded from the result set. + Accepts up to 100 organization ids. * @return The response from the API call * @throws Exception if the API call fails */ public ListSAMLConnectionsResponse list( Optional limit, - Optional offset) throws Exception { + Optional offset, + Optional> organizationId) throws Exception { ListSAMLConnectionsRequest request = ListSAMLConnectionsRequest .builder() .limit(limit) .offset(offset) + .organizationId(organizationId) .build(); String _baseUrl = this.sdkConfiguration.serverUrl; @@ -205,7 +214,15 @@ public ListSAMLConnectionsResponse list( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -231,6 +248,16 @@ public CreateSAMLConnectionRequestBuilder create() { return new CreateSAMLConnectionRequestBuilder(this); } + /** + * Create a SAML Connection + * Create a new SAML Connection. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateSAMLConnectionResponse createDirect() throws Exception { + return create(Optional.empty()); + } + /** * Create a SAML Connection * Create a new SAML Connection. @@ -239,7 +266,7 @@ public CreateSAMLConnectionRequestBuilder create() { * @throws Exception if the API call fails */ public CreateSAMLConnectionResponse create( - CreateSAMLConnectionRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -249,15 +276,12 @@ public CreateSAMLConnectionResponse create( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -278,7 +302,7 @@ public CreateSAMLConnectionResponse create( HttpResponse _httpRes; try { _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "402", "403", "422", "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "402", "403", "404", "422", "4XX", "5XX")) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( @@ -334,7 +358,7 @@ public CreateSAMLConnectionResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "402", "403", "422")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "402", "403", "404", "422")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { ClerkErrors _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), @@ -348,7 +372,15 @@ public CreateSAMLConnectionResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -486,7 +518,15 @@ public GetSAMLConnectionResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -640,7 +680,15 @@ public UpdateSAMLConnectionResponse update( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -778,7 +826,15 @@ public DeleteSAMLConnectionResponse delete( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/Sessions.java b/src/main/java/com/clerk/backend_api/Sessions.java index 506cc004..54046e8c 100644 --- a/src/main/java/com/clerk/backend_api/Sessions.java +++ b/src/main/java/com/clerk/backend_api/Sessions.java @@ -7,10 +7,19 @@ import com.clerk.backend_api.models.components.Session; import com.clerk.backend_api.models.errors.ClerkErrors; import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.CreateSessionRequestBody; +import com.clerk.backend_api.models.operations.CreateSessionRequestBuilder; +import com.clerk.backend_api.models.operations.CreateSessionResponse; import com.clerk.backend_api.models.operations.CreateSessionTokenFromTemplateRequest; +import com.clerk.backend_api.models.operations.CreateSessionTokenFromTemplateRequestBody; import com.clerk.backend_api.models.operations.CreateSessionTokenFromTemplateRequestBuilder; import com.clerk.backend_api.models.operations.CreateSessionTokenFromTemplateResponse; import com.clerk.backend_api.models.operations.CreateSessionTokenFromTemplateResponseBody; +import com.clerk.backend_api.models.operations.CreateSessionTokenRequest; +import com.clerk.backend_api.models.operations.CreateSessionTokenRequestBody; +import com.clerk.backend_api.models.operations.CreateSessionTokenRequestBuilder; +import com.clerk.backend_api.models.operations.CreateSessionTokenResponse; +import com.clerk.backend_api.models.operations.CreateSessionTokenResponseBody; import com.clerk.backend_api.models.operations.GetSessionListRequest; import com.clerk.backend_api.models.operations.GetSessionListRequestBuilder; import com.clerk.backend_api.models.operations.GetSessionListResponse; @@ -52,9 +61,11 @@ */ public class Sessions implements MethodCallGetSessionList, + MethodCallCreateSession, MethodCallGetSession, MethodCallRevokeSession, MethodCallVerifySession, + MethodCallCreateSessionToken, MethodCallCreateSessionTokenFromTemplate { private final SDKConfiguration sdkConfiguration; @@ -188,7 +199,179 @@ public GetSessionListResponse list( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Create a new active session + * Create a new active session for the provided user ID. + * + * This operation is only available for Clerk Development instances. + * @return The call builder + */ + public CreateSessionRequestBuilder createSession() { + return new CreateSessionRequestBuilder(this); + } + + /** + * Create a new active session + * Create a new active session for the provided user ID. + * + * This operation is only available for Clerk Development instances. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateSessionResponse createSessionDirect() throws Exception { + return createSession(Optional.empty()); + } + + /** + * Create a new active session + * Create a new active session for the provided user ID. + * + * This operation is only available for Clerk Development instances. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateSessionResponse createSession( + Optional request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/sessions"); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference>() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "request", + "json", + false); + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _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() + .beforeRequest( + new BeforeRequestContextImpl( + "createSession", + Optional.of(List.of()), + _hookSecuritySource), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "401", "404", "422", "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "createSession", + Optional.of(List.of()), + _hookSecuritySource), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "createSession", + Optional.of(List.of()), + _hookSecuritySource), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "createSession", + Optional.of(List.of()), + _hookSecuritySource), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CreateSessionResponse.Builder _resBuilder = + CreateSessionResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + CreateSessionResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Session _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withSession(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "401", "404", "422")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ClerkErrors _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -326,7 +509,15 @@ public GetSessionResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -466,7 +657,15 @@ public RevokeSessionResponse revoke( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -644,7 +843,186 @@ public VerifySessionResponse verify( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Create a session token + * Creates a session JSON Web Token (JWT) based on a session. + * @return The call builder + */ + public CreateSessionTokenRequestBuilder createSessionToken() { + return new CreateSessionTokenRequestBuilder(this); + } + + /** + * Create a session token + * Creates a session JSON Web Token (JWT) based on a session. + * @param sessionId The ID of the session + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateSessionTokenResponse createSessionToken( + String sessionId) throws Exception { + return createSessionToken(sessionId, Optional.empty()); + } + + /** + * Create a session token + * Creates a session JSON Web Token (JWT) based on a session. + * @param sessionId The ID of the session + * @param requestBody + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateSessionTokenResponse createSessionToken( + String sessionId, + Optional requestBody) throws Exception { + CreateSessionTokenRequest request = + CreateSessionTokenRequest + .builder() + .sessionId(sessionId) + .requestBody(requestBody) + .build(); + + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + CreateSessionTokenRequest.class, + _baseUrl, + "/sessions/{session_id}/tokens", + request, null); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "requestBody", + "json", + false); + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _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() + .beforeRequest( + new BeforeRequestContextImpl( + "CreateSessionToken", + Optional.of(List.of()), + _hookSecuritySource), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401", "404", "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "CreateSessionToken", + Optional.of(List.of()), + _hookSecuritySource), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "CreateSessionToken", + Optional.of(List.of()), + _hookSecuritySource), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "CreateSessionToken", + Optional.of(List.of()), + _hookSecuritySource), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CreateSessionTokenResponse.Builder _resBuilder = + CreateSessionTokenResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + CreateSessionTokenResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + CreateSessionTokenResponseBody _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withObject(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "401", "404")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ClerkErrors _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -681,11 +1059,28 @@ public CreateSessionTokenFromTemplateRequestBuilder createTokenFromTemplate() { public CreateSessionTokenFromTemplateResponse createTokenFromTemplate( String sessionId, String templateName) throws Exception { + return createTokenFromTemplate(sessionId, templateName, Optional.empty()); + } + + /** + * Create a session token from a jwt template + * Creates a JSON Web Token(JWT) based on a session and a JWT Template name defined for your instance + * @param sessionId The ID of the session + * @param templateName The name of the JWT Template defined in your instance (e.g. `custom_hasura`). + * @param requestBody + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateSessionTokenFromTemplateResponse createTokenFromTemplate( + String sessionId, + String templateName, + Optional requestBody) throws Exception { CreateSessionTokenFromTemplateRequest request = CreateSessionTokenFromTemplateRequest .builder() .sessionId(sessionId) .templateName(templateName) + .requestBody(requestBody) .build(); String _baseUrl = this.sdkConfiguration.serverUrl; @@ -696,6 +1091,16 @@ public CreateSessionTokenFromTemplateResponse createTokenFromTemplate( request, null); HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "requestBody", + "json", + false); + _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", SDKConfiguration.USER_AGENT); @@ -785,7 +1190,15 @@ public CreateSessionTokenFromTemplateResponse createTokenFromTemplate( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/SignInTokens.java b/src/main/java/com/clerk/backend_api/SignInTokens.java index 954c6767..9da2917b 100644 --- a/src/main/java/com/clerk/backend_api/SignInTokens.java +++ b/src/main/java/com/clerk/backend_api/SignInTokens.java @@ -54,6 +54,18 @@ public CreateSignInTokenRequestBuilder create() { return new CreateSignInTokenRequestBuilder(this); } + /** + * Create sign-in token + * Creates a new sign-in token and associates it with the given user. + * By default, sign-in tokens expire in 30 days. + * You can optionally supply a different duration in seconds using the `expires_in_seconds` property. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateSignInTokenResponse createDirect() throws Exception { + return create(Optional.empty()); + } + /** * Create sign-in token * Creates a new sign-in token and associates it with the given user. @@ -64,7 +76,7 @@ public CreateSignInTokenRequestBuilder create() { * @throws Exception if the API call fails */ public CreateSignInTokenResponse create( - CreateSignInTokenRequestBody request) throws Exception { + Optional request) throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, @@ -74,15 +86,12 @@ public CreateSignInTokenResponse create( Object _convertedRequest = Utils.convertToShape( request, JsonShape.DEFAULT, - new TypeReference() {}); + new TypeReference>() {}); SerializedBody _serializedRequestBody = Utils.serializeRequestBody( _convertedRequest, "request", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -173,7 +182,15 @@ public CreateSignInTokenResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -311,7 +328,15 @@ public RevokeSignInTokenResponse revoke( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/SignUps.java b/src/main/java/com/clerk/backend_api/SignUps.java index 00a1aa5e..026222d2 100644 --- a/src/main/java/com/clerk/backend_api/SignUps.java +++ b/src/main/java/com/clerk/backend_api/SignUps.java @@ -49,6 +49,18 @@ public UpdateSignUpRequestBuilder update() { return new UpdateSignUpRequestBuilder(this); } + /** + * Update a sign-up + * Update the sign-up with the given ID + * @param id The ID of the sign-up to update + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpdateSignUpResponse update( + String id) throws Exception { + return update(id, Optional.empty()); + } + /** * Update a sign-up * Update the sign-up with the given ID @@ -59,7 +71,7 @@ public UpdateSignUpRequestBuilder update() { */ public UpdateSignUpResponse update( String id, - UpdateSignUpRequestBody requestBody) throws Exception { + Optional requestBody) throws Exception { UpdateSignUpRequest request = UpdateSignUpRequest .builder() @@ -84,9 +96,6 @@ public UpdateSignUpResponse update( "requestBody", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -177,7 +186,15 @@ public UpdateSignUpResponse update( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/Templates.java b/src/main/java/com/clerk/backend_api/Templates.java index 59d8620b..772a7a37 100644 --- a/src/main/java/com/clerk/backend_api/Templates.java +++ b/src/main/java/com/clerk/backend_api/Templates.java @@ -198,7 +198,15 @@ public PreviewTemplateResponse preview( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/TestingTokens.java b/src/main/java/com/clerk/backend_api/TestingTokens.java index 837170f7..ccbc2db5 100644 --- a/src/main/java/com/clerk/backend_api/TestingTokens.java +++ b/src/main/java/com/clerk/backend_api/TestingTokens.java @@ -36,7 +36,7 @@ public class TestingTokens implements /** * Retrieve a new testing token - * Retrieve a new testing token. Only available for development instances. + * Retrieve a new testing token. * @return The call builder */ public CreateTestingTokenRequestBuilder create() { @@ -45,7 +45,7 @@ public CreateTestingTokenRequestBuilder create() { /** * Retrieve a new testing token - * Retrieve a new testing token. Only available for development instances. + * Retrieve a new testing token. * @return The response from the API call * @throws Exception if the API call fails */ @@ -75,7 +75,7 @@ public CreateTestingTokenResponse createDirect() throws Exception { HttpResponse _httpRes; try { _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( @@ -131,7 +131,15 @@ public CreateTestingTokenResponse createDirect() throws Exception { Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/Users.java b/src/main/java/com/clerk/backend_api/Users.java index aeaeb652..e3e21e5b 100644 --- a/src/main/java/com/clerk/backend_api/Users.java +++ b/src/main/java/com/clerk/backend_api/Users.java @@ -8,7 +8,6 @@ import com.clerk.backend_api.models.components.OrganizationInvitationsWithPublicOrganizationData; import com.clerk.backend_api.models.components.OrganizationMemberships; import com.clerk.backend_api.models.components.TotalCount; -import com.clerk.backend_api.models.components.Totp; import com.clerk.backend_api.models.components.User; import com.clerk.backend_api.models.errors.ClerkErrors; import com.clerk.backend_api.models.errors.SDKError; @@ -18,9 +17,6 @@ import com.clerk.backend_api.models.operations.CreateUserRequestBody; import com.clerk.backend_api.models.operations.CreateUserRequestBuilder; import com.clerk.backend_api.models.operations.CreateUserResponse; -import com.clerk.backend_api.models.operations.CreateUserTOTPRequest; -import com.clerk.backend_api.models.operations.CreateUserTOTPRequestBuilder; -import com.clerk.backend_api.models.operations.CreateUserTOTPResponse; import com.clerk.backend_api.models.operations.DeleteBackupCodeRequest; import com.clerk.backend_api.models.operations.DeleteBackupCodeRequestBuilder; import com.clerk.backend_api.models.operations.DeleteBackupCodeResponse; @@ -146,7 +142,6 @@ public class Users implements MethodCallDeleteBackupCode, MethodCallUserPasskeyDelete, MethodCallUserWeb3WalletDelete, - MethodCallCreateUserTOTP, MethodCallDeleteTOTP, MethodCallDeleteExternalAccount { @@ -277,7 +272,15 @@ public GetUserListResponse list( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -432,7 +435,15 @@ public CreateUserResponse create( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -567,7 +578,15 @@ public GetUsersCountResponse count( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -705,7 +724,15 @@ public GetUserResponse get( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -881,7 +908,15 @@ public UpdateUserResponse update( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1019,7 +1054,15 @@ public DeleteUserResponse delete( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1157,7 +1200,15 @@ public BanUserResponse ban( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1295,7 +1346,15 @@ public UnbanUserResponse unban( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1435,7 +1494,15 @@ public LockUserResponse lock( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1573,7 +1640,15 @@ public UnlockUserResponse unlock( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1727,7 +1802,15 @@ public SetUserProfileImageResponse setProfileImage( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1865,7 +1948,15 @@ public DeleteUserProfileImageResponse deleteProfileImage( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -1898,6 +1989,25 @@ public UpdateUserMetadataRequestBuilder updateMetadata() { return new UpdateUserMetadataRequestBuilder(this); } + /** + * Merge and update a user's metadata + * Update a user's metadata attributes by merging existing values with the provided parameters. + * + * This endpoint behaves differently than the *Update a user* endpoint. + * Metadata values will not be replaced entirely. + * Instead, a deep merge will be performed. + * Deep means that any nested JSON objects will be merged as well. + * + * You can remove metadata keys at any level by setting their value to `null`. + * @param userId The ID of the user whose metadata will be updated and merged + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpdateUserMetadataResponse updateMetadata( + String userId) throws Exception { + return updateMetadata(userId, Optional.empty()); + } + /** * Merge and update a user's metadata * Update a user's metadata attributes by merging existing values with the provided parameters. @@ -1915,7 +2025,7 @@ public UpdateUserMetadataRequestBuilder updateMetadata() { */ public UpdateUserMetadataResponse updateMetadata( String userId, - UpdateUserMetadataRequestBody requestBody) throws Exception { + Optional requestBody) throws Exception { UpdateUserMetadataRequest request = UpdateUserMetadataRequest .builder() @@ -1940,9 +2050,6 @@ public UpdateUserMetadataResponse updateMetadata( "requestBody", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -2033,7 +2140,15 @@ public UpdateUserMetadataResponse updateMetadata( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -2106,7 +2221,7 @@ public GetOAuthAccessTokenResponse getOAuthAccessToken( HttpResponse _httpRes; try { _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "422", "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "404", "422", "4XX", "5XX")) { _httpRes = sdkConfiguration.hooks() .afterError( new AfterErrorContextImpl( @@ -2162,7 +2277,7 @@ public GetOAuthAccessTokenResponse getOAuthAccessToken( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "422")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "404", "422")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { ClerkErrors _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), @@ -2176,7 +2291,15 @@ public GetOAuthAccessTokenResponse getOAuthAccessToken( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -2340,7 +2463,15 @@ public UsersGetOrganizationMembershipsResponse getOrganizationMemberships( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -2507,7 +2638,15 @@ public UsersGetOrganizationInvitationsResponse getOrganizationInvitations( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -2534,6 +2673,19 @@ public VerifyPasswordRequestBuilder verifyPassword() { return new VerifyPasswordRequestBuilder(this); } + /** + * Verify the password of a user + * Check that the user's password matches the supplied input. + * Useful for custom auth flows and re-verification. + * @param userId The ID of the user for whom to verify the password + * @return The response from the API call + * @throws Exception if the API call fails + */ + public VerifyPasswordResponse verifyPassword( + String userId) throws Exception { + return verifyPassword(userId, Optional.empty()); + } + /** * Verify the password of a user * Check that the user's password matches the supplied input. @@ -2545,7 +2697,7 @@ public VerifyPasswordRequestBuilder verifyPassword() { */ public VerifyPasswordResponse verifyPassword( String userId, - VerifyPasswordRequestBody requestBody) throws Exception { + Optional requestBody) throws Exception { VerifyPasswordRequest request = VerifyPasswordRequest .builder() @@ -2570,9 +2722,6 @@ public VerifyPasswordResponse verifyPassword( "requestBody", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -2649,14 +2798,6 @@ public VerifyPasswordResponse verifyPassword( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "404", "422", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } if (Utils.statusCodeMatches(_httpRes.statusCode(), "500")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { ClerkErrors _out = Utils.mapper().readValue( @@ -2671,6 +2812,22 @@ public VerifyPasswordResponse verifyPassword( Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "404", "422", "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -2692,6 +2849,21 @@ public VerifyTOTPRequestBuilder verifyTOTP() { return new VerifyTOTPRequestBuilder(this); } + /** + * Verify a TOTP or backup code for a user + * Verify that the provided TOTP or backup code is valid for the user. + * Verifying a backup code will result it in being consumed (i.e. it will + * become invalid). + * Useful for custom auth flows and re-verification. + * @param userId The ID of the user for whom to verify the TOTP + * @return The response from the API call + * @throws Exception if the API call fails + */ + public VerifyTOTPResponse verifyTOTP( + String userId) throws Exception { + return verifyTOTP(userId, Optional.empty()); + } + /** * Verify a TOTP or backup code for a user * Verify that the provided TOTP or backup code is valid for the user. @@ -2705,7 +2877,7 @@ public VerifyTOTPRequestBuilder verifyTOTP() { */ public VerifyTOTPResponse verifyTOTP( String userId, - VerifyTOTPRequestBody requestBody) throws Exception { + Optional requestBody) throws Exception { VerifyTOTPRequest request = VerifyTOTPRequest .builder() @@ -2730,9 +2902,6 @@ public VerifyTOTPResponse verifyTOTP( "requestBody", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", @@ -2809,14 +2978,6 @@ public VerifyTOTPResponse verifyTOTP( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "404", "422", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } if (Utils.statusCodeMatches(_httpRes.statusCode(), "500")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { ClerkErrors _out = Utils.mapper().readValue( @@ -2831,6 +2992,22 @@ public VerifyTOTPResponse verifyTOTP( Utils.extractByteArrayFromBody(_httpRes)); } } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "404", "422", "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } throw new SDKError( _httpRes, _httpRes.statusCode(), @@ -2947,7 +3124,7 @@ public DisableMFAResponse disableMFA( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "500")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "404")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { ClerkErrors _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), @@ -2961,7 +3138,29 @@ public DisableMFAResponse disableMFA( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "500")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ClerkErrors _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -3085,7 +3284,21 @@ public DeleteBackupCodeResponse deleteBackupCodes( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "500")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "404")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ClerkErrors _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "500")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { ClerkErrors _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), @@ -3099,7 +3312,15 @@ public DeleteBackupCodeResponse deleteBackupCodes( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -3226,7 +3447,7 @@ public UserPasskeyDeleteResponse deletePasskey( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "500")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { ClerkErrors _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), @@ -3240,7 +3461,29 @@ public UserPasskeyDeleteResponse deletePasskey( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "500")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ClerkErrors _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -3367,7 +3610,7 @@ public UserWeb3WalletDeleteResponse deleteWeb3Wallet( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "404", "500")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "404")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { ClerkErrors _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), @@ -3381,124 +3624,12 @@ public UserWeb3WalletDeleteResponse deleteWeb3Wallet( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.extractByteArrayFromBody(_httpRes)); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.extractByteArrayFromBody(_httpRes)); - } - - - - /** - * Create a TOTP for a user - * Creates a TOTP (Time-based One-Time Password) for a given user, returning both the TOTP secret and the URI. - * - * @return The call builder - */ - public CreateUserTOTPRequestBuilder createTOTP() { - return new CreateUserTOTPRequestBuilder(this); - } - - /** - * Create a TOTP for a user - * Creates a TOTP (Time-based One-Time Password) for a given user, returning both the TOTP secret and the URI. - * - * @param userId The ID of the user for whom the TOTP is being created. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public CreateUserTOTPResponse createTOTP( - String userId) throws Exception { - CreateUserTOTPRequest request = - CreateUserTOTPRequest - .builder() - .userId(userId) - .build(); - - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - CreateUserTOTPRequest.class, - _baseUrl, - "/users/{user_id}/totp", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "POST"); - _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() - .beforeRequest( - new BeforeRequestContextImpl( - "CreateUserTOTP", - Optional.of(List.of()), - _hookSecuritySource), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "500", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl( - "CreateUserTOTP", - Optional.of(List.of()), - _hookSecuritySource), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl( - "CreateUserTOTP", - Optional.of(List.of()), - _hookSecuritySource), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl( - "CreateUserTOTP", - Optional.of(List.of()), - _hookSecuritySource), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - CreateUserTOTPResponse.Builder _resBuilder = - CreateUserTOTPResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - CreateUserTOTPResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "500")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { - Totp _out = Utils.mapper().readValue( + ClerkErrors _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withTotp(Optional.ofNullable(_out)); - return _res; + new TypeReference() {}); + throw _out; } else { throw new SDKError( _httpRes, @@ -3507,21 +3638,15 @@ public CreateUserTOTPResponse createTOTP( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "500")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ClerkErrors _out = Utils.mapper().readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - throw _out; - } else { - throw new SDKError( + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( _httpRes, _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, + "API error occurred", Utils.extractByteArrayFromBody(_httpRes)); - } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -3645,7 +3770,7 @@ public DeleteTOTPResponse deleteTotp( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "404", "500")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "404")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { ClerkErrors _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), @@ -3659,7 +3784,29 @@ public DeleteTOTPResponse deleteTotp( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "500")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ClerkErrors _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -3786,7 +3933,21 @@ public DeleteExternalAccountResponse deleteExternalAccount( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "404", "500")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "404")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ClerkErrors _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "500")) { if (Utils.contentTypeMatches(_contentType, "application/json")) { ClerkErrors _out = Utils.mapper().readValue( Utils.toUtf8AndClose(_httpRes.body()), @@ -3800,7 +3961,15 @@ public DeleteExternalAccountResponse deleteExternalAccount( Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/WaitlistEntries.java b/src/main/java/com/clerk/backend_api/WaitlistEntries.java new file mode 100644 index 00000000..21265c2a --- /dev/null +++ b/src/main/java/com/clerk/backend_api/WaitlistEntries.java @@ -0,0 +1,338 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api; + +import com.clerk.backend_api.models.components.WaitlistEntry; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.CreateWaitlistEntryRequestBody; +import com.clerk.backend_api.models.operations.CreateWaitlistEntryRequestBuilder; +import com.clerk.backend_api.models.operations.CreateWaitlistEntryResponse; +import com.clerk.backend_api.models.operations.ListWaitlistEntriesRequest; +import com.clerk.backend_api.models.operations.ListWaitlistEntriesRequestBuilder; +import com.clerk.backend_api.models.operations.ListWaitlistEntriesResponse; +import com.clerk.backend_api.models.operations.SDKMethodInterfaces.*; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.SerializedBody; +import com.clerk.backend_api.utils.Utils.JsonShape; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +public class WaitlistEntries implements + MethodCallListWaitlistEntries, + MethodCallCreateWaitlistEntry { + + private final SDKConfiguration sdkConfiguration; + + WaitlistEntries(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + + /** + * List all waitlist entries + * Retrieve a list of waitlist entries for the instance. + * Entries are ordered by creation date in descending order by default. + * Supports filtering by email address or status and pagination with limit and offset parameters. + * @return The call builder + */ + public ListWaitlistEntriesRequestBuilder listWaitlistEntries() { + return new ListWaitlistEntriesRequestBuilder(this); + } + + /** + * List all waitlist entries + * Retrieve a list of waitlist entries for the instance. + * Entries are ordered by creation date in descending order by default. + * Supports filtering by email address or status and pagination with limit and offset parameters. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ListWaitlistEntriesResponse listWaitlistEntries( + ListWaitlistEntriesRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/waitlist_entries"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + SDKConfiguration.USER_AGENT); + + _req.addQueryParams(Utils.getQueryParams( + ListWaitlistEntriesRequest.class, + request, + null)); + + Optional _hookSecuritySource = this.sdkConfiguration.securitySource(); + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "ListWaitlistEntries", + Optional.of(List.of()), + _hookSecuritySource), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "ListWaitlistEntries", + Optional.of(List.of()), + _hookSecuritySource), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "ListWaitlistEntries", + Optional.of(List.of()), + _hookSecuritySource), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "ListWaitlistEntries", + Optional.of(List.of()), + _hookSecuritySource), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ListWaitlistEntriesResponse.Builder _resBuilder = + ListWaitlistEntriesResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + ListWaitlistEntriesResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + com.clerk.backend_api.models.components.WaitlistEntries _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withWaitlistEntries(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Create a waitlist entry + * Creates a new waitlist entry for the given email address. + * If the email address is already on the waitlist, no new entry will be created and the existing waitlist entry will be returned. + * @return The call builder + */ + public CreateWaitlistEntryRequestBuilder createWaitlistEntry() { + return new CreateWaitlistEntryRequestBuilder(this); + } + + /** + * Create a waitlist entry + * Creates a new waitlist entry for the given email address. + * If the email address is already on the waitlist, no new entry will be created and the existing waitlist entry will be returned. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateWaitlistEntryResponse createWaitlistEntryDirect() throws Exception { + return createWaitlistEntry(Optional.empty()); + } + + /** + * Create a waitlist entry + * Creates a new waitlist entry for the given email address. + * If the email address is already on the waitlist, no new entry will be created and the existing waitlist entry will be returned. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateWaitlistEntryResponse createWaitlistEntry( + Optional request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/waitlist_entries"); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference>() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "request", + "json", + false); + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _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() + .beforeRequest( + new BeforeRequestContextImpl( + "CreateWaitlistEntry", + Optional.of(List.of()), + _hookSecuritySource), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "422", "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "CreateWaitlistEntry", + Optional.of(List.of()), + _hookSecuritySource), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "CreateWaitlistEntry", + Optional.of(List.of()), + _hookSecuritySource), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "CreateWaitlistEntry", + Optional.of(List.of()), + _hookSecuritySource), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CreateWaitlistEntryResponse.Builder _resBuilder = + CreateWaitlistEntryResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + CreateWaitlistEntryResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + WaitlistEntry _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withWaitlistEntry(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "422")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ClerkErrors _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + +} diff --git a/src/main/java/com/clerk/backend_api/Webhooks.java b/src/main/java/com/clerk/backend_api/Webhooks.java index a908af01..ab5a9719 100644 --- a/src/main/java/com/clerk/backend_api/Webhooks.java +++ b/src/main/java/com/clerk/backend_api/Webhooks.java @@ -156,7 +156,15 @@ public CreateSvixAppResponse createSvixAppDirect() throws Exception { Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -273,7 +281,15 @@ public DeleteSvixAppResponse deleteSvixAppDirect() throws Exception { Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, @@ -401,7 +417,15 @@ public GenerateSvixAuthURLResponse generateSvixAuthURLDirect() throws Exception Utils.extractByteArrayFromBody(_httpRes)); } } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/clerk/backend_api/models/components/EmailAddress.java b/src/main/java/com/clerk/backend_api/models/components/EmailAddress.java index ed301d79..4e25b3a2 100644 --- a/src/main/java/com/clerk/backend_api/models/components/EmailAddress.java +++ b/src/main/java/com/clerk/backend_api/models/components/EmailAddress.java @@ -50,6 +50,14 @@ public class EmailAddress { @JsonProperty("linked_to") private List linkedTo; + /** + * Indicates whether this email address domain matches an active enterprise connection. + * + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("matches_sso_connection") + private Optional matchesSsoConnection; + /** * Unix timestamp of creation * @@ -72,6 +80,7 @@ public EmailAddress( @JsonProperty("reserved") boolean reserved, @JsonProperty("verification") Optional verification, @JsonProperty("linked_to") List linkedTo, + @JsonProperty("matches_sso_connection") Optional matchesSsoConnection, @JsonProperty("created_at") long createdAt, @JsonProperty("updated_at") long updatedAt) { Utils.checkNotNull(id, "id"); @@ -80,6 +89,7 @@ public EmailAddress( Utils.checkNotNull(reserved, "reserved"); Utils.checkNotNull(verification, "verification"); Utils.checkNotNull(linkedTo, "linkedTo"); + Utils.checkNotNull(matchesSsoConnection, "matchesSsoConnection"); Utils.checkNotNull(createdAt, "createdAt"); Utils.checkNotNull(updatedAt, "updatedAt"); this.id = id; @@ -88,6 +98,7 @@ public EmailAddress( this.reserved = reserved; this.verification = verification; this.linkedTo = linkedTo; + this.matchesSsoConnection = matchesSsoConnection; this.createdAt = createdAt; this.updatedAt = updatedAt; } @@ -99,7 +110,7 @@ public EmailAddress( List linkedTo, long createdAt, long updatedAt) { - this(Optional.empty(), object, emailAddress, reserved, Optional.empty(), linkedTo, createdAt, updatedAt); + this(Optional.empty(), object, emailAddress, reserved, Optional.empty(), linkedTo, Optional.empty(), createdAt, updatedAt); } @JsonIgnore @@ -137,6 +148,15 @@ public List linkedTo() { return linkedTo; } + /** + * Indicates whether this email address domain matches an active enterprise connection. + * + */ + @JsonIgnore + public Optional matchesSsoConnection() { + return matchesSsoConnection; + } + /** * Unix timestamp of creation * @@ -211,6 +231,26 @@ public EmailAddress withLinkedTo(List linkedTo) { return this; } + /** + * Indicates whether this email address domain matches an active enterprise connection. + * + */ + public EmailAddress withMatchesSsoConnection(boolean matchesSsoConnection) { + Utils.checkNotNull(matchesSsoConnection, "matchesSsoConnection"); + this.matchesSsoConnection = Optional.ofNullable(matchesSsoConnection); + return this; + } + + /** + * Indicates whether this email address domain matches an active enterprise connection. + * + */ + public EmailAddress withMatchesSsoConnection(Optional matchesSsoConnection) { + Utils.checkNotNull(matchesSsoConnection, "matchesSsoConnection"); + this.matchesSsoConnection = matchesSsoConnection; + return this; + } + /** * Unix timestamp of creation * @@ -247,6 +287,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.reserved, other.reserved) && Objects.deepEquals(this.verification, other.verification) && Objects.deepEquals(this.linkedTo, other.linkedTo) && + Objects.deepEquals(this.matchesSsoConnection, other.matchesSsoConnection) && Objects.deepEquals(this.createdAt, other.createdAt) && Objects.deepEquals(this.updatedAt, other.updatedAt); } @@ -260,6 +301,7 @@ public int hashCode() { reserved, verification, linkedTo, + matchesSsoConnection, createdAt, updatedAt); } @@ -273,6 +315,7 @@ public String toString() { "reserved", reserved, "verification", verification, "linkedTo", linkedTo, + "matchesSsoConnection", matchesSsoConnection, "createdAt", createdAt, "updatedAt", updatedAt); } @@ -291,6 +334,8 @@ public final static class Builder { private List linkedTo; + private Optional matchesSsoConnection = Optional.empty(); + private Long createdAt; private Long updatedAt; @@ -351,6 +396,26 @@ public Builder linkedTo(List linkedTo) { return this; } + /** + * Indicates whether this email address domain matches an active enterprise connection. + * + */ + public Builder matchesSsoConnection(boolean matchesSsoConnection) { + Utils.checkNotNull(matchesSsoConnection, "matchesSsoConnection"); + this.matchesSsoConnection = Optional.ofNullable(matchesSsoConnection); + return this; + } + + /** + * Indicates whether this email address domain matches an active enterprise connection. + * + */ + public Builder matchesSsoConnection(Optional matchesSsoConnection) { + Utils.checkNotNull(matchesSsoConnection, "matchesSsoConnection"); + this.matchesSsoConnection = matchesSsoConnection; + return this; + } + /** * Unix timestamp of creation * @@ -379,6 +444,7 @@ public EmailAddress build() { reserved, verification, linkedTo, + matchesSsoConnection, createdAt, updatedAt); } diff --git a/src/main/java/com/clerk/backend_api/models/components/Oauth.java b/src/main/java/com/clerk/backend_api/models/components/FromOAuth.java similarity index 59% rename from src/main/java/com/clerk/backend_api/models/components/Oauth.java rename to src/main/java/com/clerk/backend_api/models/components/FromOAuth.java index 4fa67d42..24d62a74 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Oauth.java +++ b/src/main/java/com/clerk/backend_api/models/components/FromOAuth.java @@ -20,73 +20,61 @@ import org.openapitools.jackson.nullable.JsonNullable; -public class Oauth { +public class FromOAuth { @JsonProperty("status") - private OauthVerificationStatus status; + private FromOAuthVerificationStatus status; @JsonProperty("strategy") - private OauthVerificationStrategy strategy; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("external_verification_redirect_url") - private Optional externalVerificationRedirectUrl; + private String strategy; @JsonInclude(Include.NON_ABSENT) @JsonProperty("error") private JsonNullable error; + @JsonInclude(Include.ALWAYS) @JsonProperty("expire_at") - private long expireAt; + private Optional expireAt; @JsonInclude(Include.NON_ABSENT) @JsonProperty("attempts") private JsonNullable attempts; @JsonCreator - public Oauth( - @JsonProperty("status") OauthVerificationStatus status, - @JsonProperty("strategy") OauthVerificationStrategy strategy, - @JsonProperty("external_verification_redirect_url") Optional externalVerificationRedirectUrl, + public FromOAuth( + @JsonProperty("status") FromOAuthVerificationStatus status, + @JsonProperty("strategy") String strategy, @JsonProperty("error") JsonNullable error, - @JsonProperty("expire_at") long expireAt, + @JsonProperty("expire_at") Optional expireAt, @JsonProperty("attempts") JsonNullable attempts) { Utils.checkNotNull(status, "status"); Utils.checkNotNull(strategy, "strategy"); - Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); Utils.checkNotNull(error, "error"); Utils.checkNotNull(expireAt, "expireAt"); Utils.checkNotNull(attempts, "attempts"); this.status = status; this.strategy = strategy; - this.externalVerificationRedirectUrl = externalVerificationRedirectUrl; this.error = error; this.expireAt = expireAt; this.attempts = attempts; } - public Oauth( - OauthVerificationStatus status, - OauthVerificationStrategy strategy, - long expireAt) { - this(status, strategy, Optional.empty(), JsonNullable.undefined(), expireAt, JsonNullable.undefined()); + public FromOAuth( + FromOAuthVerificationStatus status, + String strategy) { + this(status, strategy, JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined()); } @JsonIgnore - public OauthVerificationStatus status() { + public FromOAuthVerificationStatus status() { return status; } @JsonIgnore - public OauthVerificationStrategy strategy() { + public String strategy() { return strategy; } - @JsonIgnore - public Optional externalVerificationRedirectUrl() { - return externalVerificationRedirectUrl; - } - @SuppressWarnings("unchecked") @JsonIgnore public JsonNullable error() { @@ -94,7 +82,7 @@ public JsonNullable error() { } @JsonIgnore - public long expireAt() { + public Optional expireAt() { return expireAt; } @@ -107,55 +95,49 @@ public final static Builder builder() { return new Builder(); } - public Oauth withStatus(OauthVerificationStatus status) { + public FromOAuth withStatus(FromOAuthVerificationStatus status) { Utils.checkNotNull(status, "status"); this.status = status; return this; } - public Oauth withStrategy(OauthVerificationStrategy strategy) { + public FromOAuth withStrategy(String strategy) { Utils.checkNotNull(strategy, "strategy"); this.strategy = strategy; return this; } - public Oauth withExternalVerificationRedirectUrl(String externalVerificationRedirectUrl) { - Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); - this.externalVerificationRedirectUrl = Optional.ofNullable(externalVerificationRedirectUrl); - return this; - } - - public Oauth withExternalVerificationRedirectUrl(Optional externalVerificationRedirectUrl) { - Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); - this.externalVerificationRedirectUrl = externalVerificationRedirectUrl; - return this; - } - - public Oauth withError(Error error) { + public FromOAuth withError(Error error) { Utils.checkNotNull(error, "error"); this.error = JsonNullable.of(error); return this; } - public Oauth withError(JsonNullable error) { + public FromOAuth withError(JsonNullable error) { Utils.checkNotNull(error, "error"); this.error = error; return this; } - public Oauth withExpireAt(long expireAt) { + public FromOAuth withExpireAt(long expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = Optional.ofNullable(expireAt); + return this; + } + + public FromOAuth withExpireAt(Optional expireAt) { Utils.checkNotNull(expireAt, "expireAt"); this.expireAt = expireAt; return this; } - public Oauth withAttempts(long attempts) { + public FromOAuth withAttempts(long attempts) { Utils.checkNotNull(attempts, "attempts"); this.attempts = JsonNullable.of(attempts); return this; } - public Oauth withAttempts(JsonNullable attempts) { + public FromOAuth withAttempts(JsonNullable attempts) { Utils.checkNotNull(attempts, "attempts"); this.attempts = attempts; return this; @@ -169,11 +151,10 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Oauth other = (Oauth) o; + FromOAuth other = (FromOAuth) o; return Objects.deepEquals(this.status, other.status) && Objects.deepEquals(this.strategy, other.strategy) && - Objects.deepEquals(this.externalVerificationRedirectUrl, other.externalVerificationRedirectUrl) && Objects.deepEquals(this.error, other.error) && Objects.deepEquals(this.expireAt, other.expireAt) && Objects.deepEquals(this.attempts, other.attempts); @@ -184,7 +165,6 @@ public int hashCode() { return Objects.hash( status, strategy, - externalVerificationRedirectUrl, error, expireAt, attempts); @@ -192,10 +172,9 @@ public int hashCode() { @Override public String toString() { - return Utils.toString(Oauth.class, + return Utils.toString(FromOAuth.class, "status", status, "strategy", strategy, - "externalVerificationRedirectUrl", externalVerificationRedirectUrl, "error", error, "expireAt", expireAt, "attempts", attempts); @@ -203,15 +182,13 @@ public String toString() { public final static class Builder { - private OauthVerificationStatus status; + private FromOAuthVerificationStatus status; - private OauthVerificationStrategy strategy; - - private Optional externalVerificationRedirectUrl = Optional.empty(); + private String strategy; private JsonNullable error = JsonNullable.undefined(); - private Long expireAt; + private Optional expireAt = Optional.empty(); private JsonNullable attempts = JsonNullable.undefined(); @@ -219,30 +196,18 @@ private Builder() { // force use of static builder() method } - public Builder status(OauthVerificationStatus status) { + public Builder status(FromOAuthVerificationStatus status) { Utils.checkNotNull(status, "status"); this.status = status; return this; } - public Builder strategy(OauthVerificationStrategy strategy) { + public Builder strategy(String strategy) { Utils.checkNotNull(strategy, "strategy"); this.strategy = strategy; return this; } - public Builder externalVerificationRedirectUrl(String externalVerificationRedirectUrl) { - Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); - this.externalVerificationRedirectUrl = Optional.ofNullable(externalVerificationRedirectUrl); - return this; - } - - public Builder externalVerificationRedirectUrl(Optional externalVerificationRedirectUrl) { - Utils.checkNotNull(externalVerificationRedirectUrl, "externalVerificationRedirectUrl"); - this.externalVerificationRedirectUrl = externalVerificationRedirectUrl; - return this; - } - public Builder error(Error error) { Utils.checkNotNull(error, "error"); this.error = JsonNullable.of(error); @@ -256,6 +221,12 @@ public Builder error(JsonNullable error) { } public Builder expireAt(long expireAt) { + Utils.checkNotNull(expireAt, "expireAt"); + this.expireAt = Optional.ofNullable(expireAt); + return this; + } + + public Builder expireAt(Optional expireAt) { Utils.checkNotNull(expireAt, "expireAt"); this.expireAt = expireAt; return this; @@ -273,11 +244,10 @@ public Builder attempts(JsonNullable attempts) { return this; } - public Oauth build() { - return new Oauth( + public FromOAuth build() { + return new FromOAuth( status, strategy, - externalVerificationRedirectUrl, error, expireAt, attempts); diff --git a/src/main/java/com/clerk/backend_api/models/components/OauthVerificationStatus.java b/src/main/java/com/clerk/backend_api/models/components/FromOAuthVerificationStatus.java similarity index 62% rename from src/main/java/com/clerk/backend_api/models/components/OauthVerificationStatus.java rename to src/main/java/com/clerk/backend_api/models/components/FromOAuthVerificationStatus.java index e8137dd6..6ec3d00d 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OauthVerificationStatus.java +++ b/src/main/java/com/clerk/backend_api/models/components/FromOAuthVerificationStatus.java @@ -9,17 +9,14 @@ import java.util.Objects; import java.util.Optional; -public enum OauthVerificationStatus { +public enum FromOAuthVerificationStatus { UNVERIFIED("unverified"), - VERIFIED("verified"), - FAILED("failed"), - EXPIRED("expired"), - TRANSFERABLE("transferable"); + VERIFIED("verified"); @JsonValue private final String value; - private OauthVerificationStatus(String value) { + private FromOAuthVerificationStatus(String value) { this.value = value; } @@ -27,8 +24,8 @@ public String value() { return value; } - public static Optional fromValue(String value) { - for (OauthVerificationStatus o: OauthVerificationStatus.values()) { + public static Optional fromValue(String value) { + for (FromOAuthVerificationStatus o: FromOAuthVerificationStatus.values()) { if (Objects.deepEquals(o.value, value)) { return Optional.of(o); } diff --git a/src/main/java/com/clerk/backend_api/models/components/IdentificationLink.java b/src/main/java/com/clerk/backend_api/models/components/IdentificationLink.java index b0741181..61f9ae62 100644 --- a/src/main/java/com/clerk/backend_api/models/components/IdentificationLink.java +++ b/src/main/java/com/clerk/backend_api/models/components/IdentificationLink.java @@ -17,14 +17,14 @@ public class IdentificationLink { @JsonProperty("type") - private Type type; + private String type; @JsonProperty("id") private String id; @JsonCreator public IdentificationLink( - @JsonProperty("type") Type type, + @JsonProperty("type") String type, @JsonProperty("id") String id) { Utils.checkNotNull(type, "type"); Utils.checkNotNull(id, "id"); @@ -33,7 +33,7 @@ public IdentificationLink( } @JsonIgnore - public Type type() { + public String type() { return type; } @@ -46,7 +46,7 @@ public final static Builder builder() { return new Builder(); } - public IdentificationLink withType(Type type) { + public IdentificationLink withType(String type) { Utils.checkNotNull(type, "type"); this.type = type; return this; @@ -88,7 +88,7 @@ public String toString() { public final static class Builder { - private Type type; + private String type; private String id; @@ -96,7 +96,7 @@ private Builder() { // force use of static builder() method } - public Builder type(Type type) { + public Builder type(String type) { Utils.checkNotNull(type, "type"); this.type = type; return this; diff --git a/src/main/java/com/clerk/backend_api/models/components/Instance.java b/src/main/java/com/clerk/backend_api/models/components/Instance.java new file mode 100644 index 00000000..8b6b8b67 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/Instance.java @@ -0,0 +1,261 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.components; + + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Instance - Success + */ + +public class Instance { + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("object") + private Optional object; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("environment_type") + private Optional environmentType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("allowed_origins") + private JsonNullable> allowedOrigins; + + @JsonCreator + public Instance( + @JsonProperty("object") Optional object, + @JsonProperty("id") Optional id, + @JsonProperty("environment_type") Optional environmentType, + @JsonProperty("allowed_origins") JsonNullable> allowedOrigins) { + Utils.checkNotNull(object, "object"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(environmentType, "environmentType"); + Utils.checkNotNull(allowedOrigins, "allowedOrigins"); + this.object = object; + this.id = id; + this.environmentType = environmentType; + this.allowedOrigins = allowedOrigins; + } + + public Instance() { + this(Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined()); + } + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Optional id() { + return id; + } + + @JsonIgnore + public Optional environmentType() { + return environmentType; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> allowedOrigins() { + return (JsonNullable>) allowedOrigins; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + public Instance withObject(InstanceObject object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + public Instance withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public Instance withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Instance withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Instance withEnvironmentType(String environmentType) { + Utils.checkNotNull(environmentType, "environmentType"); + this.environmentType = Optional.ofNullable(environmentType); + return this; + } + + public Instance withEnvironmentType(Optional environmentType) { + Utils.checkNotNull(environmentType, "environmentType"); + this.environmentType = environmentType; + return this; + } + + public Instance withAllowedOrigins(List allowedOrigins) { + Utils.checkNotNull(allowedOrigins, "allowedOrigins"); + this.allowedOrigins = JsonNullable.of(allowedOrigins); + return this; + } + + public Instance withAllowedOrigins(JsonNullable> allowedOrigins) { + Utils.checkNotNull(allowedOrigins, "allowedOrigins"); + this.allowedOrigins = allowedOrigins; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Instance other = (Instance) o; + return + Objects.deepEquals(this.object, other.object) && + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.environmentType, other.environmentType) && + Objects.deepEquals(this.allowedOrigins, other.allowedOrigins); + } + + @Override + public int hashCode() { + return Objects.hash( + object, + id, + environmentType, + allowedOrigins); + } + + @Override + public String toString() { + return Utils.toString(Instance.class, + "object", object, + "id", id, + "environmentType", environmentType, + "allowedOrigins", allowedOrigins); + } + + public final static class Builder { + + private Optional object = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional environmentType = Optional.empty(); + + private JsonNullable> allowedOrigins = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + public Builder object(InstanceObject object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder environmentType(String environmentType) { + Utils.checkNotNull(environmentType, "environmentType"); + this.environmentType = Optional.ofNullable(environmentType); + return this; + } + + public Builder environmentType(Optional environmentType) { + Utils.checkNotNull(environmentType, "environmentType"); + this.environmentType = environmentType; + return this; + } + + public Builder allowedOrigins(List allowedOrigins) { + Utils.checkNotNull(allowedOrigins, "allowedOrigins"); + this.allowedOrigins = JsonNullable.of(allowedOrigins); + return this; + } + + public Builder allowedOrigins(JsonNullable> allowedOrigins) { + Utils.checkNotNull(allowedOrigins, "allowedOrigins"); + this.allowedOrigins = allowedOrigins; + return this; + } + + public Instance build() { + return new Instance( + object, + id, + environmentType, + allowedOrigins); + } + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/components/Type.java b/src/main/java/com/clerk/backend_api/models/components/InstanceObject.java similarity index 60% rename from src/main/java/com/clerk/backend_api/models/components/Type.java rename to src/main/java/com/clerk/backend_api/models/components/InstanceObject.java index a4fca956..63cf15d5 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Type.java +++ b/src/main/java/com/clerk/backend_api/models/components/InstanceObject.java @@ -9,19 +9,16 @@ import java.util.Objects; import java.util.Optional; -public enum Type { - OAUTH_GOOGLE("oauth_google"), - OAUTH_MOCK("oauth_mock"), - SAML("saml"), - OAUTH_MICROSOFT("oauth_microsoft"), - EMAIL_LINK("email_link"), - OAUTH_APPLE("oauth_apple"), - OAUTH_DISCORD("oauth_discord"); +/** + * InstanceObject - String representing the object's type. Objects of the same type share the same value. + */ +public enum InstanceObject { + INSTANCE("instance"); @JsonValue private final String value; - private Type(String value) { + private InstanceObject(String value) { this.value = value; } @@ -29,8 +26,8 @@ public String value() { return value; } - public static Optional fromValue(String value) { - for (Type o: Type.values()) { + public static Optional fromValue(String value) { + for (InstanceObject o: InstanceObject.values()) { if (Objects.deepEquals(o.value, value)) { return Optional.of(o); } diff --git a/src/main/java/com/clerk/backend_api/models/components/Invitation.java b/src/main/java/com/clerk/backend_api/models/components/Invitation.java index 61110131..34893fc9 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Invitation.java +++ b/src/main/java/com/clerk/backend_api/models/components/Invitation.java @@ -13,9 +13,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.Boolean; import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.util.Map; import java.util.Objects; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -37,7 +39,7 @@ public class Invitation { @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; @JsonInclude(Include.NON_ABSENT) @JsonProperty("revoked") @@ -77,7 +79,7 @@ public Invitation( @JsonProperty("object") InvitationObject object, @JsonProperty("id") String id, @JsonProperty("email_address") String emailAddress, - @JsonProperty("public_metadata") Optional publicMetadata, + @JsonProperty("public_metadata") Optional> publicMetadata, @JsonProperty("revoked") Optional revoked, @JsonProperty("status") InvitationStatus status, @JsonProperty("url") JsonNullable url, @@ -133,8 +135,8 @@ public String emailAddress() { @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } @JsonIgnore @@ -201,13 +203,13 @@ public Invitation withEmailAddress(String emailAddress) { return this; } - public Invitation withPublicMetadata(InvitationPublicMetadata publicMetadata) { + public Invitation withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } - public Invitation withPublicMetadata(Optional publicMetadata) { + public Invitation withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -343,7 +345,7 @@ public final static class Builder { private String emailAddress; - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); private Optional revoked = Optional.empty(); @@ -379,13 +381,13 @@ public Builder emailAddress(String emailAddress) { return this; } - public Builder publicMetadata(InvitationPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; diff --git a/src/main/java/com/clerk/backend_api/models/components/InvitationPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/components/InvitationPublicMetadata.java deleted file mode 100644 index 34571700..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/InvitationPublicMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class InvitationPublicMetadata { - - @JsonCreator - public InvitationPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(InvitationPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public InvitationPublicMetadata build() { - return new InvitationPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/InvitationRevoked.java b/src/main/java/com/clerk/backend_api/models/components/InvitationRevoked.java index 775063df..4f4aeee5 100644 --- a/src/main/java/com/clerk/backend_api/models/components/InvitationRevoked.java +++ b/src/main/java/com/clerk/backend_api/models/components/InvitationRevoked.java @@ -13,9 +13,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.Boolean; import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.util.Map; import java.util.Objects; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -37,7 +39,7 @@ public class InvitationRevoked { @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; @JsonInclude(Include.NON_ABSENT) @JsonProperty("revoked") @@ -77,7 +79,7 @@ public InvitationRevoked( @JsonProperty("object") InvitationRevokedObject object, @JsonProperty("id") String id, @JsonProperty("email_address") String emailAddress, - @JsonProperty("public_metadata") Optional publicMetadata, + @JsonProperty("public_metadata") Optional> publicMetadata, @JsonProperty("revoked") Optional revoked, @JsonProperty("status") InvitationRevokedStatus status, @JsonProperty("url") JsonNullable url, @@ -133,8 +135,8 @@ public String emailAddress() { @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } @JsonIgnore @@ -201,13 +203,13 @@ public InvitationRevoked withEmailAddress(String emailAddress) { return this; } - public InvitationRevoked withPublicMetadata(InvitationRevokedPublicMetadata publicMetadata) { + public InvitationRevoked withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } - public InvitationRevoked withPublicMetadata(Optional publicMetadata) { + public InvitationRevoked withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -343,7 +345,7 @@ public final static class Builder { private String emailAddress; - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); private Optional revoked = Optional.empty(); @@ -379,13 +381,13 @@ public Builder emailAddress(String emailAddress) { return this; } - public Builder publicMetadata(InvitationRevokedPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; diff --git a/src/main/java/com/clerk/backend_api/models/components/InvitationRevokedPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/components/InvitationRevokedPublicMetadata.java deleted file mode 100644 index 3a1f65be..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/InvitationRevokedPublicMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class InvitationRevokedPublicMetadata { - - @JsonCreator - public InvitationRevokedPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(InvitationRevokedPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public InvitationRevokedPublicMetadata build() { - return new InvitationRevokedPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/WellKnownJWKS.java b/src/main/java/com/clerk/backend_api/models/components/Jwks.java similarity index 85% rename from src/main/java/com/clerk/backend_api/models/components/WellKnownJWKS.java rename to src/main/java/com/clerk/backend_api/models/components/Jwks.java index cd5de928..92d6f51d 100644 --- a/src/main/java/com/clerk/backend_api/models/components/WellKnownJWKS.java +++ b/src/main/java/com/clerk/backend_api/models/components/Jwks.java @@ -19,23 +19,23 @@ import java.util.Optional; /** - * WellKnownJWKS - Get the JSON Web Key Set + * Jwks - Get the JSON Web Key Set */ -public class WellKnownJWKS { +public class Jwks { @JsonInclude(Include.NON_ABSENT) @JsonProperty("keys") private Optional> keys; @JsonCreator - public WellKnownJWKS( + public Jwks( @JsonProperty("keys") Optional> keys) { Utils.checkNotNull(keys, "keys"); this.keys = keys; } - public WellKnownJWKS() { + public Jwks() { this(Optional.empty()); } @@ -49,13 +49,13 @@ public final static Builder builder() { return new Builder(); } - public WellKnownJWKS withKeys(List keys) { + public Jwks withKeys(List keys) { Utils.checkNotNull(keys, "keys"); this.keys = Optional.ofNullable(keys); return this; } - public WellKnownJWKS withKeys(Optional> keys) { + public Jwks withKeys(Optional> keys) { Utils.checkNotNull(keys, "keys"); this.keys = keys; return this; @@ -69,7 +69,7 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - WellKnownJWKS other = (WellKnownJWKS) o; + Jwks other = (Jwks) o; return Objects.deepEquals(this.keys, other.keys); } @@ -82,7 +82,7 @@ public int hashCode() { @Override public String toString() { - return Utils.toString(WellKnownJWKS.class, + return Utils.toString(Jwks.class, "keys", keys); } @@ -106,8 +106,8 @@ public Builder keys(Optional> keys) { return this; } - public WellKnownJWKS build() { - return new WellKnownJWKS( + public Jwks build() { + return new Jwks( keys); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/Keys.java b/src/main/java/com/clerk/backend_api/models/components/Keys.java index 96312a9c..c578b135 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Keys.java +++ b/src/main/java/com/clerk/backend_api/models/components/Keys.java @@ -43,6 +43,14 @@ public class Keys { @JsonProperty("e") private Optional e; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("x") + private Optional x; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("crv") + private Optional crv; + @JsonCreator public Keys( @JsonProperty("use") Optional use, @@ -50,23 +58,29 @@ public Keys( @JsonProperty("kid") Optional kid, @JsonProperty("alg") Optional alg, @JsonProperty("n") Optional n, - @JsonProperty("e") Optional e) { + @JsonProperty("e") Optional e, + @JsonProperty("x") Optional x, + @JsonProperty("crv") Optional crv) { Utils.checkNotNull(use, "use"); Utils.checkNotNull(kty, "kty"); Utils.checkNotNull(kid, "kid"); Utils.checkNotNull(alg, "alg"); Utils.checkNotNull(n, "n"); Utils.checkNotNull(e, "e"); + Utils.checkNotNull(x, "x"); + Utils.checkNotNull(crv, "crv"); this.use = use; this.kty = kty; this.kid = kid; this.alg = alg; this.n = n; this.e = e; + this.x = x; + this.crv = crv; } public Keys() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } @JsonIgnore @@ -99,6 +113,16 @@ public Optional e() { return e; } + @JsonIgnore + public Optional x() { + return x; + } + + @JsonIgnore + public Optional crv() { + return crv; + } + public final static Builder builder() { return new Builder(); } @@ -174,6 +198,30 @@ public Keys withE(Optional e) { this.e = e; return this; } + + public Keys withX(String x) { + Utils.checkNotNull(x, "x"); + this.x = Optional.ofNullable(x); + return this; + } + + public Keys withX(Optional x) { + Utils.checkNotNull(x, "x"); + this.x = x; + return this; + } + + public Keys withCrv(String crv) { + Utils.checkNotNull(crv, "crv"); + this.crv = Optional.ofNullable(crv); + return this; + } + + public Keys withCrv(Optional crv) { + Utils.checkNotNull(crv, "crv"); + this.crv = crv; + return this; + } @Override public boolean equals(java.lang.Object o) { @@ -190,7 +238,9 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.kid, other.kid) && Objects.deepEquals(this.alg, other.alg) && Objects.deepEquals(this.n, other.n) && - Objects.deepEquals(this.e, other.e); + Objects.deepEquals(this.e, other.e) && + Objects.deepEquals(this.x, other.x) && + Objects.deepEquals(this.crv, other.crv); } @Override @@ -201,7 +251,9 @@ public int hashCode() { kid, alg, n, - e); + e, + x, + crv); } @Override @@ -212,7 +264,9 @@ public String toString() { "kid", kid, "alg", alg, "n", n, - "e", e); + "e", e, + "x", x, + "crv", crv); } public final static class Builder { @@ -227,7 +281,11 @@ public final static class Builder { private Optional n = Optional.empty(); - private Optional e = Optional.empty(); + private Optional e = Optional.empty(); + + private Optional x = Optional.empty(); + + private Optional crv = Optional.empty(); private Builder() { // force use of static builder() method @@ -304,6 +362,30 @@ public Builder e(Optional e) { this.e = e; return this; } + + public Builder x(String x) { + Utils.checkNotNull(x, "x"); + this.x = Optional.ofNullable(x); + return this; + } + + public Builder x(Optional x) { + Utils.checkNotNull(x, "x"); + this.x = x; + return this; + } + + public Builder crv(String crv) { + Utils.checkNotNull(crv, "crv"); + this.crv = Optional.ofNullable(crv); + return this; + } + + public Builder crv(Optional crv) { + Utils.checkNotNull(crv, "crv"); + this.crv = crv; + return this; + } public Keys build() { return new Keys( @@ -312,7 +394,9 @@ public Keys build() { kid, alg, n, - e); + e, + x, + crv); } } } diff --git a/src/main/java/com/clerk/backend_api/models/components/OAuthApplication.java b/src/main/java/com/clerk/backend_api/models/components/OAuthApplication.java index 033b98ad..0ca3e020 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OAuthApplication.java +++ b/src/main/java/com/clerk/backend_api/models/components/OAuthApplication.java @@ -10,9 +10,11 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.Boolean; +import java.lang.Deprecated; import java.lang.Long; import java.lang.Override; import java.lang.String; +import java.util.List; import java.util.Objects; @@ -39,7 +41,14 @@ public class OAuthApplication { @JsonProperty("scopes") private String scopes; + @JsonProperty("redirect_uris") + private List redirectUris; + + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ @JsonProperty("callback_url") + @Deprecated private String callbackUrl; @JsonProperty("authorize_url") @@ -51,6 +60,12 @@ public class OAuthApplication { @JsonProperty("user_info_url") private String userInfoUrl; + @JsonProperty("discovery_url") + private String discoveryUrl; + + @JsonProperty("token_introspection_url") + private String tokenIntrospectionUrl; + /** * Unix timestamp of creation. * @@ -74,10 +89,13 @@ public OAuthApplication( @JsonProperty("client_id") String clientId, @JsonProperty("public") boolean public_, @JsonProperty("scopes") String scopes, + @JsonProperty("redirect_uris") List redirectUris, @JsonProperty("callback_url") String callbackUrl, @JsonProperty("authorize_url") String authorizeUrl, @JsonProperty("token_fetch_url") String tokenFetchUrl, @JsonProperty("user_info_url") String userInfoUrl, + @JsonProperty("discovery_url") String discoveryUrl, + @JsonProperty("token_introspection_url") String tokenIntrospectionUrl, @JsonProperty("created_at") long createdAt, @JsonProperty("updated_at") long updatedAt) { Utils.checkNotNull(object, "object"); @@ -87,10 +105,13 @@ public OAuthApplication( Utils.checkNotNull(clientId, "clientId"); Utils.checkNotNull(public_, "public_"); Utils.checkNotNull(scopes, "scopes"); + Utils.checkNotNull(redirectUris, "redirectUris"); Utils.checkNotNull(callbackUrl, "callbackUrl"); Utils.checkNotNull(authorizeUrl, "authorizeUrl"); Utils.checkNotNull(tokenFetchUrl, "tokenFetchUrl"); Utils.checkNotNull(userInfoUrl, "userInfoUrl"); + Utils.checkNotNull(discoveryUrl, "discoveryUrl"); + Utils.checkNotNull(tokenIntrospectionUrl, "tokenIntrospectionUrl"); Utils.checkNotNull(createdAt, "createdAt"); Utils.checkNotNull(updatedAt, "updatedAt"); this.object = object; @@ -100,10 +121,13 @@ public OAuthApplication( this.clientId = clientId; this.public_ = public_; this.scopes = scopes; + this.redirectUris = redirectUris; this.callbackUrl = callbackUrl; this.authorizeUrl = authorizeUrl; this.tokenFetchUrl = tokenFetchUrl; this.userInfoUrl = userInfoUrl; + this.discoveryUrl = discoveryUrl; + this.tokenIntrospectionUrl = tokenIntrospectionUrl; this.createdAt = createdAt; this.updatedAt = updatedAt; } @@ -143,6 +167,15 @@ public String scopes() { return scopes; } + @JsonIgnore + public List redirectUris() { + return redirectUris; + } + + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated @JsonIgnore public String callbackUrl() { return callbackUrl; @@ -163,6 +196,16 @@ public String userInfoUrl() { return userInfoUrl; } + @JsonIgnore + public String discoveryUrl() { + return discoveryUrl; + } + + @JsonIgnore + public String tokenIntrospectionUrl() { + return tokenIntrospectionUrl; + } + /** * Unix timestamp of creation. * @@ -227,6 +270,16 @@ public OAuthApplication withScopes(String scopes) { return this; } + public OAuthApplication withRedirectUris(List redirectUris) { + Utils.checkNotNull(redirectUris, "redirectUris"); + this.redirectUris = redirectUris; + return this; + } + + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated public OAuthApplication withCallbackUrl(String callbackUrl) { Utils.checkNotNull(callbackUrl, "callbackUrl"); this.callbackUrl = callbackUrl; @@ -251,6 +304,18 @@ public OAuthApplication withUserInfoUrl(String userInfoUrl) { return this; } + public OAuthApplication withDiscoveryUrl(String discoveryUrl) { + Utils.checkNotNull(discoveryUrl, "discoveryUrl"); + this.discoveryUrl = discoveryUrl; + return this; + } + + public OAuthApplication withTokenIntrospectionUrl(String tokenIntrospectionUrl) { + Utils.checkNotNull(tokenIntrospectionUrl, "tokenIntrospectionUrl"); + this.tokenIntrospectionUrl = tokenIntrospectionUrl; + return this; + } + /** * Unix timestamp of creation. * @@ -288,10 +353,13 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.clientId, other.clientId) && Objects.deepEquals(this.public_, other.public_) && Objects.deepEquals(this.scopes, other.scopes) && + Objects.deepEquals(this.redirectUris, other.redirectUris) && Objects.deepEquals(this.callbackUrl, other.callbackUrl) && Objects.deepEquals(this.authorizeUrl, other.authorizeUrl) && Objects.deepEquals(this.tokenFetchUrl, other.tokenFetchUrl) && Objects.deepEquals(this.userInfoUrl, other.userInfoUrl) && + Objects.deepEquals(this.discoveryUrl, other.discoveryUrl) && + Objects.deepEquals(this.tokenIntrospectionUrl, other.tokenIntrospectionUrl) && Objects.deepEquals(this.createdAt, other.createdAt) && Objects.deepEquals(this.updatedAt, other.updatedAt); } @@ -306,10 +374,13 @@ public int hashCode() { clientId, public_, scopes, + redirectUris, callbackUrl, authorizeUrl, tokenFetchUrl, userInfoUrl, + discoveryUrl, + tokenIntrospectionUrl, createdAt, updatedAt); } @@ -324,10 +395,13 @@ public String toString() { "clientId", clientId, "public_", public_, "scopes", scopes, + "redirectUris", redirectUris, "callbackUrl", callbackUrl, "authorizeUrl", authorizeUrl, "tokenFetchUrl", tokenFetchUrl, "userInfoUrl", userInfoUrl, + "discoveryUrl", discoveryUrl, + "tokenIntrospectionUrl", tokenIntrospectionUrl, "createdAt", createdAt, "updatedAt", updatedAt); } @@ -348,6 +422,9 @@ public final static class Builder { private String scopes; + private List redirectUris; + + @Deprecated private String callbackUrl; private String authorizeUrl; @@ -356,6 +433,10 @@ public final static class Builder { private String userInfoUrl; + private String discoveryUrl; + + private String tokenIntrospectionUrl; + private Long createdAt; private Long updatedAt; @@ -406,6 +487,16 @@ public Builder scopes(String scopes) { return this; } + public Builder redirectUris(List redirectUris) { + Utils.checkNotNull(redirectUris, "redirectUris"); + this.redirectUris = redirectUris; + return this; + } + + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated public Builder callbackUrl(String callbackUrl) { Utils.checkNotNull(callbackUrl, "callbackUrl"); this.callbackUrl = callbackUrl; @@ -430,6 +521,18 @@ public Builder userInfoUrl(String userInfoUrl) { return this; } + public Builder discoveryUrl(String discoveryUrl) { + Utils.checkNotNull(discoveryUrl, "discoveryUrl"); + this.discoveryUrl = discoveryUrl; + return this; + } + + public Builder tokenIntrospectionUrl(String tokenIntrospectionUrl) { + Utils.checkNotNull(tokenIntrospectionUrl, "tokenIntrospectionUrl"); + this.tokenIntrospectionUrl = tokenIntrospectionUrl; + return this; + } + /** * Unix timestamp of creation. * @@ -459,10 +562,13 @@ public OAuthApplication build() { clientId, public_, scopes, + redirectUris, callbackUrl, authorizeUrl, tokenFetchUrl, userInfoUrl, + discoveryUrl, + tokenIntrospectionUrl, createdAt, updatedAt); } diff --git a/src/main/java/com/clerk/backend_api/models/components/OAuthApplicationWithSecret.java b/src/main/java/com/clerk/backend_api/models/components/OAuthApplicationWithSecret.java index 47dce3ec..ecd78870 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OAuthApplicationWithSecret.java +++ b/src/main/java/com/clerk/backend_api/models/components/OAuthApplicationWithSecret.java @@ -12,9 +12,11 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.Boolean; +import java.lang.Deprecated; import java.lang.Long; import java.lang.Override; import java.lang.String; +import java.util.List; import java.util.Objects; import java.util.Optional; @@ -42,7 +44,14 @@ public class OAuthApplicationWithSecret { @JsonProperty("scopes") private String scopes; + @JsonProperty("redirect_uris") + private List redirectUris; + + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ @JsonProperty("callback_url") + @Deprecated private String callbackUrl; @JsonProperty("authorize_url") @@ -54,6 +63,12 @@ public class OAuthApplicationWithSecret { @JsonProperty("user_info_url") private String userInfoUrl; + @JsonProperty("discovery_url") + private String discoveryUrl; + + @JsonProperty("token_introspection_url") + private String tokenIntrospectionUrl; + /** * Unix timestamp of creation. * @@ -85,10 +100,13 @@ public OAuthApplicationWithSecret( @JsonProperty("client_id") String clientId, @JsonProperty("public") boolean public_, @JsonProperty("scopes") String scopes, + @JsonProperty("redirect_uris") List redirectUris, @JsonProperty("callback_url") String callbackUrl, @JsonProperty("authorize_url") String authorizeUrl, @JsonProperty("token_fetch_url") String tokenFetchUrl, @JsonProperty("user_info_url") String userInfoUrl, + @JsonProperty("discovery_url") String discoveryUrl, + @JsonProperty("token_introspection_url") String tokenIntrospectionUrl, @JsonProperty("created_at") long createdAt, @JsonProperty("updated_at") long updatedAt, @JsonProperty("client_secret") Optional clientSecret) { @@ -99,10 +117,13 @@ public OAuthApplicationWithSecret( Utils.checkNotNull(clientId, "clientId"); Utils.checkNotNull(public_, "public_"); Utils.checkNotNull(scopes, "scopes"); + Utils.checkNotNull(redirectUris, "redirectUris"); Utils.checkNotNull(callbackUrl, "callbackUrl"); Utils.checkNotNull(authorizeUrl, "authorizeUrl"); Utils.checkNotNull(tokenFetchUrl, "tokenFetchUrl"); Utils.checkNotNull(userInfoUrl, "userInfoUrl"); + Utils.checkNotNull(discoveryUrl, "discoveryUrl"); + Utils.checkNotNull(tokenIntrospectionUrl, "tokenIntrospectionUrl"); Utils.checkNotNull(createdAt, "createdAt"); Utils.checkNotNull(updatedAt, "updatedAt"); Utils.checkNotNull(clientSecret, "clientSecret"); @@ -113,10 +134,13 @@ public OAuthApplicationWithSecret( this.clientId = clientId; this.public_ = public_; this.scopes = scopes; + this.redirectUris = redirectUris; this.callbackUrl = callbackUrl; this.authorizeUrl = authorizeUrl; this.tokenFetchUrl = tokenFetchUrl; this.userInfoUrl = userInfoUrl; + this.discoveryUrl = discoveryUrl; + this.tokenIntrospectionUrl = tokenIntrospectionUrl; this.createdAt = createdAt; this.updatedAt = updatedAt; this.clientSecret = clientSecret; @@ -130,13 +154,16 @@ public OAuthApplicationWithSecret( String clientId, boolean public_, String scopes, + List redirectUris, String callbackUrl, String authorizeUrl, String tokenFetchUrl, String userInfoUrl, + String discoveryUrl, + String tokenIntrospectionUrl, long createdAt, long updatedAt) { - this(object, id, instanceId, name, clientId, public_, scopes, callbackUrl, authorizeUrl, tokenFetchUrl, userInfoUrl, createdAt, updatedAt, Optional.empty()); + this(object, id, instanceId, name, clientId, public_, scopes, redirectUris, callbackUrl, authorizeUrl, tokenFetchUrl, userInfoUrl, discoveryUrl, tokenIntrospectionUrl, createdAt, updatedAt, Optional.empty()); } @JsonIgnore @@ -174,6 +201,15 @@ public String scopes() { return scopes; } + @JsonIgnore + public List redirectUris() { + return redirectUris; + } + + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated @JsonIgnore public String callbackUrl() { return callbackUrl; @@ -194,6 +230,16 @@ public String userInfoUrl() { return userInfoUrl; } + @JsonIgnore + public String discoveryUrl() { + return discoveryUrl; + } + + @JsonIgnore + public String tokenIntrospectionUrl() { + return tokenIntrospectionUrl; + } + /** * Unix timestamp of creation. * @@ -267,6 +313,16 @@ public OAuthApplicationWithSecret withScopes(String scopes) { return this; } + public OAuthApplicationWithSecret withRedirectUris(List redirectUris) { + Utils.checkNotNull(redirectUris, "redirectUris"); + this.redirectUris = redirectUris; + return this; + } + + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated public OAuthApplicationWithSecret withCallbackUrl(String callbackUrl) { Utils.checkNotNull(callbackUrl, "callbackUrl"); this.callbackUrl = callbackUrl; @@ -291,6 +347,18 @@ public OAuthApplicationWithSecret withUserInfoUrl(String userInfoUrl) { return this; } + public OAuthApplicationWithSecret withDiscoveryUrl(String discoveryUrl) { + Utils.checkNotNull(discoveryUrl, "discoveryUrl"); + this.discoveryUrl = discoveryUrl; + return this; + } + + public OAuthApplicationWithSecret withTokenIntrospectionUrl(String tokenIntrospectionUrl) { + Utils.checkNotNull(tokenIntrospectionUrl, "tokenIntrospectionUrl"); + this.tokenIntrospectionUrl = tokenIntrospectionUrl; + return this; + } + /** * Unix timestamp of creation. * @@ -348,10 +416,13 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.clientId, other.clientId) && Objects.deepEquals(this.public_, other.public_) && Objects.deepEquals(this.scopes, other.scopes) && + Objects.deepEquals(this.redirectUris, other.redirectUris) && Objects.deepEquals(this.callbackUrl, other.callbackUrl) && Objects.deepEquals(this.authorizeUrl, other.authorizeUrl) && Objects.deepEquals(this.tokenFetchUrl, other.tokenFetchUrl) && Objects.deepEquals(this.userInfoUrl, other.userInfoUrl) && + Objects.deepEquals(this.discoveryUrl, other.discoveryUrl) && + Objects.deepEquals(this.tokenIntrospectionUrl, other.tokenIntrospectionUrl) && Objects.deepEquals(this.createdAt, other.createdAt) && Objects.deepEquals(this.updatedAt, other.updatedAt) && Objects.deepEquals(this.clientSecret, other.clientSecret); @@ -367,10 +438,13 @@ public int hashCode() { clientId, public_, scopes, + redirectUris, callbackUrl, authorizeUrl, tokenFetchUrl, userInfoUrl, + discoveryUrl, + tokenIntrospectionUrl, createdAt, updatedAt, clientSecret); @@ -386,10 +460,13 @@ public String toString() { "clientId", clientId, "public_", public_, "scopes", scopes, + "redirectUris", redirectUris, "callbackUrl", callbackUrl, "authorizeUrl", authorizeUrl, "tokenFetchUrl", tokenFetchUrl, "userInfoUrl", userInfoUrl, + "discoveryUrl", discoveryUrl, + "tokenIntrospectionUrl", tokenIntrospectionUrl, "createdAt", createdAt, "updatedAt", updatedAt, "clientSecret", clientSecret); @@ -411,6 +488,9 @@ public final static class Builder { private String scopes; + private List redirectUris; + + @Deprecated private String callbackUrl; private String authorizeUrl; @@ -419,6 +499,10 @@ public final static class Builder { private String userInfoUrl; + private String discoveryUrl; + + private String tokenIntrospectionUrl; + private Long createdAt; private Long updatedAt; @@ -471,6 +555,16 @@ public Builder scopes(String scopes) { return this; } + public Builder redirectUris(List redirectUris) { + Utils.checkNotNull(redirectUris, "redirectUris"); + this.redirectUris = redirectUris; + return this; + } + + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated public Builder callbackUrl(String callbackUrl) { Utils.checkNotNull(callbackUrl, "callbackUrl"); this.callbackUrl = callbackUrl; @@ -495,6 +589,18 @@ public Builder userInfoUrl(String userInfoUrl) { return this; } + public Builder discoveryUrl(String discoveryUrl) { + Utils.checkNotNull(discoveryUrl, "discoveryUrl"); + this.discoveryUrl = discoveryUrl; + return this; + } + + public Builder tokenIntrospectionUrl(String tokenIntrospectionUrl) { + Utils.checkNotNull(tokenIntrospectionUrl, "tokenIntrospectionUrl"); + this.tokenIntrospectionUrl = tokenIntrospectionUrl; + return this; + } + /** * Unix timestamp of creation. * @@ -544,10 +650,13 @@ public OAuthApplicationWithSecret build() { clientId, public_, scopes, + redirectUris, callbackUrl, authorizeUrl, tokenFetchUrl, userInfoUrl, + discoveryUrl, + tokenIntrospectionUrl, createdAt, updatedAt, clientSecret); diff --git a/src/main/java/com/clerk/backend_api/models/components/Organization.java b/src/main/java/com/clerk/backend_api/models/components/Organization.java index 82bdbd0e..195f7dd8 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Organization.java +++ b/src/main/java/com/clerk/backend_api/models/components/Organization.java @@ -13,8 +13,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.Boolean; import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; +import java.util.Map; import java.util.Objects; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -46,14 +48,14 @@ public class Organization { private Optional adminDeleteEnabled; @JsonProperty("public_metadata") - private OrganizationPublicMetadata publicMetadata; + private Map publicMetadata; @JsonProperty("private_metadata") - private OrganizationPrivateMetadata privateMetadata; + private Map privateMetadata; @JsonInclude(Include.NON_ABSENT) @JsonProperty("created_by") - private Optional createdBy; + private JsonNullable createdBy; /** * Unix timestamp of creation. @@ -78,9 +80,9 @@ public Organization( @JsonProperty("members_count") JsonNullable membersCount, @JsonProperty("max_allowed_memberships") long maxAllowedMemberships, @JsonProperty("admin_delete_enabled") Optional adminDeleteEnabled, - @JsonProperty("public_metadata") OrganizationPublicMetadata publicMetadata, - @JsonProperty("private_metadata") OrganizationPrivateMetadata privateMetadata, - @JsonProperty("created_by") Optional createdBy, + @JsonProperty("public_metadata") Map publicMetadata, + @JsonProperty("private_metadata") Map privateMetadata, + @JsonProperty("created_by") JsonNullable createdBy, @JsonProperty("created_at") long createdAt, @JsonProperty("updated_at") long updatedAt) { Utils.checkNotNull(object, "object"); @@ -90,8 +92,8 @@ public Organization( Utils.checkNotNull(membersCount, "membersCount"); Utils.checkNotNull(maxAllowedMemberships, "maxAllowedMemberships"); Utils.checkNotNull(adminDeleteEnabled, "adminDeleteEnabled"); - Utils.checkNotNull(publicMetadata, "publicMetadata"); - Utils.checkNotNull(privateMetadata, "privateMetadata"); + publicMetadata = Utils.emptyMapIfNull(publicMetadata); + privateMetadata = Utils.emptyMapIfNull(privateMetadata); Utils.checkNotNull(createdBy, "createdBy"); Utils.checkNotNull(createdAt, "createdAt"); Utils.checkNotNull(updatedAt, "updatedAt"); @@ -115,11 +117,11 @@ public Organization( String name, String slug, long maxAllowedMemberships, - OrganizationPublicMetadata publicMetadata, - OrganizationPrivateMetadata privateMetadata, + Map publicMetadata, + Map privateMetadata, long createdAt, long updatedAt) { - this(object, id, name, slug, JsonNullable.undefined(), maxAllowedMemberships, Optional.empty(), publicMetadata, privateMetadata, Optional.empty(), createdAt, updatedAt); + this(object, id, name, slug, JsonNullable.undefined(), maxAllowedMemberships, Optional.empty(), publicMetadata, privateMetadata, JsonNullable.undefined(), createdAt, updatedAt); } @JsonIgnore @@ -158,17 +160,17 @@ public Optional adminDeleteEnabled() { } @JsonIgnore - public OrganizationPublicMetadata publicMetadata() { + public Map publicMetadata() { return publicMetadata; } @JsonIgnore - public OrganizationPrivateMetadata privateMetadata() { + public Map privateMetadata() { return privateMetadata; } @JsonIgnore - public Optional createdBy() { + public JsonNullable createdBy() { return createdBy; } @@ -248,13 +250,13 @@ public Organization withAdminDeleteEnabled(Optional adminDeleteEnabled) return this; } - public Organization withPublicMetadata(OrganizationPublicMetadata publicMetadata) { + public Organization withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; } - public Organization withPrivateMetadata(OrganizationPrivateMetadata privateMetadata) { + public Organization withPrivateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -262,11 +264,11 @@ public Organization withPrivateMetadata(OrganizationPrivateMetadata privateMetad public Organization withCreatedBy(String createdBy) { Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = Optional.ofNullable(createdBy); + this.createdBy = JsonNullable.of(createdBy); return this; } - public Organization withCreatedBy(Optional createdBy) { + public Organization withCreatedBy(JsonNullable createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = createdBy; return this; @@ -366,11 +368,11 @@ public final static class Builder { private Optional adminDeleteEnabled = Optional.empty(); - private OrganizationPublicMetadata publicMetadata; + private Map publicMetadata; - private OrganizationPrivateMetadata privateMetadata; + private Map privateMetadata; - private Optional createdBy = Optional.empty(); + private JsonNullable createdBy = JsonNullable.undefined(); private Long createdAt; @@ -434,13 +436,13 @@ public Builder adminDeleteEnabled(Optional adminDeleteEnabled) { return this; } - public Builder publicMetadata(OrganizationPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; } - public Builder privateMetadata(OrganizationPrivateMetadata privateMetadata) { + public Builder privateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -448,11 +450,11 @@ public Builder privateMetadata(OrganizationPrivateMetadata privateMetadata) { public Builder createdBy(String createdBy) { Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = Optional.ofNullable(createdBy); + this.createdBy = JsonNullable.of(createdBy); return this; } - public Builder createdBy(Optional createdBy) { + public Builder createdBy(JsonNullable createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = createdBy; return this; diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitation.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitation.java index e867ea02..b91f2fb9 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitation.java +++ b/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitation.java @@ -12,11 +12,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; /** * OrganizationInvitation - An organization invitation @@ -58,11 +61,23 @@ public class OrganizationInvitation { @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; @JsonInclude(Include.NON_ABSENT) @JsonProperty("private_metadata") - private Optional privateMetadata; + private Optional> privateMetadata; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("url") + private JsonNullable url; + + /** + * Unix timestamp of expiration. + * + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("expires_at") + private JsonNullable expiresAt; /** * Unix timestamp of creation. @@ -87,8 +102,10 @@ public OrganizationInvitation( @JsonProperty("role_name") Optional roleName, @JsonProperty("organization_id") Optional organizationId, @JsonProperty("status") Optional status, - @JsonProperty("public_metadata") Optional publicMetadata, - @JsonProperty("private_metadata") Optional privateMetadata, + @JsonProperty("public_metadata") Optional> publicMetadata, + @JsonProperty("private_metadata") Optional> privateMetadata, + @JsonProperty("url") JsonNullable url, + @JsonProperty("expires_at") JsonNullable expiresAt, @JsonProperty("created_at") Optional createdAt, @JsonProperty("updated_at") Optional updatedAt) { Utils.checkNotNull(id, "id"); @@ -100,6 +117,8 @@ public OrganizationInvitation( Utils.checkNotNull(status, "status"); Utils.checkNotNull(publicMetadata, "publicMetadata"); Utils.checkNotNull(privateMetadata, "privateMetadata"); + Utils.checkNotNull(url, "url"); + Utils.checkNotNull(expiresAt, "expiresAt"); Utils.checkNotNull(createdAt, "createdAt"); Utils.checkNotNull(updatedAt, "updatedAt"); this.id = id; @@ -111,12 +130,14 @@ public OrganizationInvitation( this.status = status; this.publicMetadata = publicMetadata; this.privateMetadata = privateMetadata; + this.url = url; + this.expiresAt = expiresAt; this.createdAt = createdAt; this.updatedAt = updatedAt; } public OrganizationInvitation() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), Optional.empty()); } @JsonIgnore @@ -161,14 +182,28 @@ public Optional status() { @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } @SuppressWarnings("unchecked") @JsonIgnore - public Optional privateMetadata() { - return (Optional) privateMetadata; + public Optional> privateMetadata() { + return (Optional>) privateMetadata; + } + + @JsonIgnore + public JsonNullable url() { + return url; + } + + /** + * Unix timestamp of expiration. + * + */ + @JsonIgnore + public JsonNullable expiresAt() { + return expiresAt; } /** @@ -283,30 +318,62 @@ public OrganizationInvitation withStatus(Optional status) { return this; } - public OrganizationInvitation withPublicMetadata(OrganizationInvitationPublicMetadata publicMetadata) { + public OrganizationInvitation withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } - public OrganizationInvitation withPublicMetadata(Optional publicMetadata) { + public OrganizationInvitation withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; } - public OrganizationInvitation withPrivateMetadata(OrganizationInvitationPrivateMetadata privateMetadata) { + public OrganizationInvitation withPrivateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; } - public OrganizationInvitation withPrivateMetadata(Optional privateMetadata) { + public OrganizationInvitation withPrivateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; } + public OrganizationInvitation withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = JsonNullable.of(url); + return this; + } + + public OrganizationInvitation withUrl(JsonNullable url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + /** + * Unix timestamp of expiration. + * + */ + public OrganizationInvitation withExpiresAt(long expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = JsonNullable.of(expiresAt); + return this; + } + + /** + * Unix timestamp of expiration. + * + */ + public OrganizationInvitation withExpiresAt(JsonNullable expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = expiresAt; + return this; + } + /** * Unix timestamp of creation. */ @@ -362,6 +429,8 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.status, other.status) && Objects.deepEquals(this.publicMetadata, other.publicMetadata) && Objects.deepEquals(this.privateMetadata, other.privateMetadata) && + Objects.deepEquals(this.url, other.url) && + Objects.deepEquals(this.expiresAt, other.expiresAt) && Objects.deepEquals(this.createdAt, other.createdAt) && Objects.deepEquals(this.updatedAt, other.updatedAt); } @@ -378,6 +447,8 @@ public int hashCode() { status, publicMetadata, privateMetadata, + url, + expiresAt, createdAt, updatedAt); } @@ -394,6 +465,8 @@ public String toString() { "status", status, "publicMetadata", publicMetadata, "privateMetadata", privateMetadata, + "url", url, + "expiresAt", expiresAt, "createdAt", createdAt, "updatedAt", updatedAt); } @@ -414,9 +487,13 @@ public final static class Builder { private Optional status = Optional.empty(); - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); - private Optional privateMetadata = Optional.empty(); + private Optional> privateMetadata = Optional.empty(); + + private JsonNullable url = JsonNullable.undefined(); + + private JsonNullable expiresAt = JsonNullable.undefined(); private Optional createdAt = Optional.empty(); @@ -518,30 +595,62 @@ public Builder status(Optional status) { return this; } - public Builder publicMetadata(OrganizationInvitationPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; } - public Builder privateMetadata(OrganizationInvitationPrivateMetadata privateMetadata) { + public Builder privateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; } - public Builder privateMetadata(Optional privateMetadata) { + public Builder privateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; } + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = JsonNullable.of(url); + return this; + } + + public Builder url(JsonNullable url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + /** + * Unix timestamp of expiration. + * + */ + public Builder expiresAt(long expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = JsonNullable.of(expiresAt); + return this; + } + + /** + * Unix timestamp of expiration. + * + */ + public Builder expiresAt(JsonNullable expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = expiresAt; + return this; + } + /** * Unix timestamp of creation. */ @@ -589,6 +698,8 @@ public OrganizationInvitation build() { status, publicMetadata, privateMetadata, + url, + expiresAt, createdAt, updatedAt); } diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationPrivateMetadata.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationPrivateMetadata.java deleted file mode 100644 index a7f44792..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationPrivateMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class OrganizationInvitationPrivateMetadata { - - @JsonCreator - public OrganizationInvitationPrivateMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(OrganizationInvitationPrivateMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public OrganizationInvitationPrivateMetadata build() { - return new OrganizationInvitationPrivateMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationPublicMetadata.java deleted file mode 100644 index 42dfe9aa..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationPublicMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class OrganizationInvitationPublicMetadata { - - @JsonCreator - public OrganizationInvitationPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(OrganizationInvitationPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public OrganizationInvitationPublicMetadata build() { - return new OrganizationInvitationPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationData.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationData.java index fc1b5be3..1883ef90 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationData.java +++ b/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationData.java @@ -12,11 +12,14 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; /** * OrganizationInvitationWithPublicOrganizationData - An organization invitation with public organization data populated @@ -58,11 +61,15 @@ public class OrganizationInvitationWithPublicOrganizationData { @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; @JsonInclude(Include.NON_ABSENT) @JsonProperty("private_metadata") - private Optional privateMetadata; + private Optional> privateMetadata; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("url") + private JsonNullable url; @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_organization_data") @@ -91,8 +98,9 @@ public OrganizationInvitationWithPublicOrganizationData( @JsonProperty("role_name") Optional roleName, @JsonProperty("organization_id") Optional organizationId, @JsonProperty("status") Optional status, - @JsonProperty("public_metadata") Optional publicMetadata, - @JsonProperty("private_metadata") Optional privateMetadata, + @JsonProperty("public_metadata") Optional> publicMetadata, + @JsonProperty("private_metadata") Optional> privateMetadata, + @JsonProperty("url") JsonNullable url, @JsonProperty("public_organization_data") Optional publicOrganizationData, @JsonProperty("created_at") Optional createdAt, @JsonProperty("updated_at") Optional updatedAt) { @@ -105,6 +113,7 @@ public OrganizationInvitationWithPublicOrganizationData( Utils.checkNotNull(status, "status"); Utils.checkNotNull(publicMetadata, "publicMetadata"); Utils.checkNotNull(privateMetadata, "privateMetadata"); + Utils.checkNotNull(url, "url"); Utils.checkNotNull(publicOrganizationData, "publicOrganizationData"); Utils.checkNotNull(createdAt, "createdAt"); Utils.checkNotNull(updatedAt, "updatedAt"); @@ -117,13 +126,14 @@ public OrganizationInvitationWithPublicOrganizationData( this.status = status; this.publicMetadata = publicMetadata; this.privateMetadata = privateMetadata; + this.url = url; this.publicOrganizationData = publicOrganizationData; this.createdAt = createdAt; this.updatedAt = updatedAt; } public OrganizationInvitationWithPublicOrganizationData() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined(), Optional.empty(), Optional.empty(), Optional.empty()); } @JsonIgnore @@ -168,14 +178,19 @@ public Optional status() { @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } @SuppressWarnings("unchecked") @JsonIgnore - public Optional privateMetadata() { - return (Optional) privateMetadata; + public Optional> privateMetadata() { + return (Optional>) privateMetadata; + } + + @JsonIgnore + public JsonNullable url() { + return url; } @SuppressWarnings("unchecked") @@ -296,30 +311,42 @@ public OrganizationInvitationWithPublicOrganizationData withStatus(Optional publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } - public OrganizationInvitationWithPublicOrganizationData withPublicMetadata(Optional publicMetadata) { + public OrganizationInvitationWithPublicOrganizationData withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; } - public OrganizationInvitationWithPublicOrganizationData withPrivateMetadata(OrganizationInvitationWithPublicOrganizationDataPrivateMetadata privateMetadata) { + public OrganizationInvitationWithPublicOrganizationData withPrivateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; } - public OrganizationInvitationWithPublicOrganizationData withPrivateMetadata(Optional privateMetadata) { + public OrganizationInvitationWithPublicOrganizationData withPrivateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; } + public OrganizationInvitationWithPublicOrganizationData withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = JsonNullable.of(url); + return this; + } + + public OrganizationInvitationWithPublicOrganizationData withUrl(JsonNullable url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + public OrganizationInvitationWithPublicOrganizationData withPublicOrganizationData(PublicOrganizationData publicOrganizationData) { Utils.checkNotNull(publicOrganizationData, "publicOrganizationData"); this.publicOrganizationData = Optional.ofNullable(publicOrganizationData); @@ -387,6 +414,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.status, other.status) && Objects.deepEquals(this.publicMetadata, other.publicMetadata) && Objects.deepEquals(this.privateMetadata, other.privateMetadata) && + Objects.deepEquals(this.url, other.url) && Objects.deepEquals(this.publicOrganizationData, other.publicOrganizationData) && Objects.deepEquals(this.createdAt, other.createdAt) && Objects.deepEquals(this.updatedAt, other.updatedAt); @@ -404,6 +432,7 @@ public int hashCode() { status, publicMetadata, privateMetadata, + url, publicOrganizationData, createdAt, updatedAt); @@ -421,6 +450,7 @@ public String toString() { "status", status, "publicMetadata", publicMetadata, "privateMetadata", privateMetadata, + "url", url, "publicOrganizationData", publicOrganizationData, "createdAt", createdAt, "updatedAt", updatedAt); @@ -442,9 +472,11 @@ public final static class Builder { private Optional status = Optional.empty(); - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); + + private Optional> privateMetadata = Optional.empty(); - private Optional privateMetadata = Optional.empty(); + private JsonNullable url = JsonNullable.undefined(); private Optional publicOrganizationData = Optional.empty(); @@ -548,30 +580,42 @@ public Builder status(Optional status) { return this; } - public Builder publicMetadata(OrganizationInvitationWithPublicOrganizationDataPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; } - public Builder privateMetadata(OrganizationInvitationWithPublicOrganizationDataPrivateMetadata privateMetadata) { + public Builder privateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; } - public Builder privateMetadata(Optional privateMetadata) { + public Builder privateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; } + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = JsonNullable.of(url); + return this; + } + + public Builder url(JsonNullable url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + public Builder publicOrganizationData(PublicOrganizationData publicOrganizationData) { Utils.checkNotNull(publicOrganizationData, "publicOrganizationData"); this.publicOrganizationData = Optional.ofNullable(publicOrganizationData); @@ -631,6 +675,7 @@ public OrganizationInvitationWithPublicOrganizationData build() { status, publicMetadata, privateMetadata, + url, publicOrganizationData, createdAt, updatedAt); diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationDataPrivateMetadata.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationDataPrivateMetadata.java deleted file mode 100644 index e609fb64..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationDataPrivateMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class OrganizationInvitationWithPublicOrganizationDataPrivateMetadata { - - @JsonCreator - public OrganizationInvitationWithPublicOrganizationDataPrivateMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(OrganizationInvitationWithPublicOrganizationDataPrivateMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public OrganizationInvitationWithPublicOrganizationDataPrivateMetadata build() { - return new OrganizationInvitationWithPublicOrganizationDataPrivateMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationDataPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationDataPublicMetadata.java deleted file mode 100644 index 54f458dc..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationInvitationWithPublicOrganizationDataPublicMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class OrganizationInvitationWithPublicOrganizationDataPublicMetadata { - - @JsonCreator - public OrganizationInvitationWithPublicOrganizationDataPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(OrganizationInvitationWithPublicOrganizationDataPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public OrganizationInvitationWithPublicOrganizationDataPublicMetadata build() { - return new OrganizationInvitationWithPublicOrganizationDataPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationMembership.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationMembership.java index 63c59d95..8249dd67 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationMembership.java +++ b/src/main/java/com/clerk/backend_api/models/components/OrganizationMembership.java @@ -12,10 +12,12 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.Optional; @@ -54,14 +56,14 @@ public class OrganizationMembership { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; /** * Metadata saved on the organization membership, accessible only from the Backend API */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("private_metadata") - private Optional privateMetadata; + private Optional> privateMetadata; @JsonInclude(Include.NON_ABSENT) @JsonProperty("organization") @@ -92,8 +94,8 @@ public OrganizationMembership( @JsonProperty("role") Optional role, @JsonProperty("role_name") Optional roleName, @JsonProperty("permissions") Optional> permissions, - @JsonProperty("public_metadata") Optional publicMetadata, - @JsonProperty("private_metadata") Optional privateMetadata, + @JsonProperty("public_metadata") Optional> publicMetadata, + @JsonProperty("private_metadata") Optional> privateMetadata, @JsonProperty("organization") Optional organization, @JsonProperty("public_user_data") Optional publicUserData, @JsonProperty("created_at") Optional createdAt, @@ -162,8 +164,8 @@ public Optional> permissions() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } /** @@ -171,8 +173,8 @@ public Optional publicMetadata() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional privateMetadata() { - return (Optional) privateMetadata; + public Optional> privateMetadata() { + return (Optional>) privateMetadata; } @SuppressWarnings("unchecked") @@ -278,7 +280,7 @@ public OrganizationMembership withPermissions(Optional> p /** * Metadata saved on the organization membership, accessible from both Frontend and Backend APIs */ - public OrganizationMembership withPublicMetadata(OrganizationMembershipPublicMetadata publicMetadata) { + public OrganizationMembership withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -287,7 +289,7 @@ public OrganizationMembership withPublicMetadata(OrganizationMembershipPublicMet /** * Metadata saved on the organization membership, accessible from both Frontend and Backend APIs */ - public OrganizationMembership withPublicMetadata(Optional publicMetadata) { + public OrganizationMembership withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -296,7 +298,7 @@ public OrganizationMembership withPublicMetadata(Optional privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; @@ -305,7 +307,7 @@ public OrganizationMembership withPrivateMetadata(OrganizationMembershipPrivateM /** * Metadata saved on the organization membership, accessible only from the Backend API */ - public OrganizationMembership withPrivateMetadata(Optional privateMetadata) { + public OrganizationMembership withPrivateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -438,9 +440,9 @@ public final static class Builder { private Optional> permissions = Optional.empty(); - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); - private Optional privateMetadata = Optional.empty(); + private Optional> privateMetadata = Optional.empty(); private Optional organization = Optional.empty(); @@ -525,7 +527,7 @@ public Builder permissions(Optional> permissions) { /** * Metadata saved on the organization membership, accessible from both Frontend and Backend APIs */ - public Builder publicMetadata(OrganizationMembershipPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -534,7 +536,7 @@ public Builder publicMetadata(OrganizationMembershipPublicMetadata publicMetadat /** * Metadata saved on the organization membership, accessible from both Frontend and Backend APIs */ - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -543,7 +545,7 @@ public Builder publicMetadata(Optional privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; @@ -552,7 +554,7 @@ public Builder privateMetadata(OrganizationMembershipPrivateMetadata privateMeta /** * Metadata saved on the organization membership, accessible only from the Backend API */ - public Builder privateMetadata(Optional privateMetadata) { + public Builder privateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganization.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganization.java index 6d5f3c81..ff1cec5c 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganization.java +++ b/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganization.java @@ -13,8 +13,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.Boolean; import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; +import java.util.Map; import java.util.Objects; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -46,14 +48,14 @@ public class OrganizationMembershipOrganization { private Optional adminDeleteEnabled; @JsonProperty("public_metadata") - private OrganizationMembershipOrganizationPublicMetadata publicMetadata; + private Map publicMetadata; @JsonProperty("private_metadata") - private OrganizationMembershipOrganizationPrivateMetadata privateMetadata; + private Map privateMetadata; @JsonInclude(Include.NON_ABSENT) @JsonProperty("created_by") - private Optional createdBy; + private JsonNullable createdBy; /** * Unix timestamp of creation. @@ -78,9 +80,9 @@ public OrganizationMembershipOrganization( @JsonProperty("members_count") JsonNullable membersCount, @JsonProperty("max_allowed_memberships") long maxAllowedMemberships, @JsonProperty("admin_delete_enabled") Optional adminDeleteEnabled, - @JsonProperty("public_metadata") OrganizationMembershipOrganizationPublicMetadata publicMetadata, - @JsonProperty("private_metadata") OrganizationMembershipOrganizationPrivateMetadata privateMetadata, - @JsonProperty("created_by") Optional createdBy, + @JsonProperty("public_metadata") Map publicMetadata, + @JsonProperty("private_metadata") Map privateMetadata, + @JsonProperty("created_by") JsonNullable createdBy, @JsonProperty("created_at") long createdAt, @JsonProperty("updated_at") long updatedAt) { Utils.checkNotNull(object, "object"); @@ -90,8 +92,8 @@ public OrganizationMembershipOrganization( Utils.checkNotNull(membersCount, "membersCount"); Utils.checkNotNull(maxAllowedMemberships, "maxAllowedMemberships"); Utils.checkNotNull(adminDeleteEnabled, "adminDeleteEnabled"); - Utils.checkNotNull(publicMetadata, "publicMetadata"); - Utils.checkNotNull(privateMetadata, "privateMetadata"); + publicMetadata = Utils.emptyMapIfNull(publicMetadata); + privateMetadata = Utils.emptyMapIfNull(privateMetadata); Utils.checkNotNull(createdBy, "createdBy"); Utils.checkNotNull(createdAt, "createdAt"); Utils.checkNotNull(updatedAt, "updatedAt"); @@ -115,11 +117,11 @@ public OrganizationMembershipOrganization( String name, String slug, long maxAllowedMemberships, - OrganizationMembershipOrganizationPublicMetadata publicMetadata, - OrganizationMembershipOrganizationPrivateMetadata privateMetadata, + Map publicMetadata, + Map privateMetadata, long createdAt, long updatedAt) { - this(object, id, name, slug, JsonNullable.undefined(), maxAllowedMemberships, Optional.empty(), publicMetadata, privateMetadata, Optional.empty(), createdAt, updatedAt); + this(object, id, name, slug, JsonNullable.undefined(), maxAllowedMemberships, Optional.empty(), publicMetadata, privateMetadata, JsonNullable.undefined(), createdAt, updatedAt); } @JsonIgnore @@ -158,17 +160,17 @@ public Optional adminDeleteEnabled() { } @JsonIgnore - public OrganizationMembershipOrganizationPublicMetadata publicMetadata() { + public Map publicMetadata() { return publicMetadata; } @JsonIgnore - public OrganizationMembershipOrganizationPrivateMetadata privateMetadata() { + public Map privateMetadata() { return privateMetadata; } @JsonIgnore - public Optional createdBy() { + public JsonNullable createdBy() { return createdBy; } @@ -248,13 +250,13 @@ public OrganizationMembershipOrganization withAdminDeleteEnabled(Optional publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; } - public OrganizationMembershipOrganization withPrivateMetadata(OrganizationMembershipOrganizationPrivateMetadata privateMetadata) { + public OrganizationMembershipOrganization withPrivateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -262,11 +264,11 @@ public OrganizationMembershipOrganization withPrivateMetadata(OrganizationMember public OrganizationMembershipOrganization withCreatedBy(String createdBy) { Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = Optional.ofNullable(createdBy); + this.createdBy = JsonNullable.of(createdBy); return this; } - public OrganizationMembershipOrganization withCreatedBy(Optional createdBy) { + public OrganizationMembershipOrganization withCreatedBy(JsonNullable createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = createdBy; return this; @@ -366,11 +368,11 @@ public final static class Builder { private Optional adminDeleteEnabled = Optional.empty(); - private OrganizationMembershipOrganizationPublicMetadata publicMetadata; + private Map publicMetadata; - private OrganizationMembershipOrganizationPrivateMetadata privateMetadata; + private Map privateMetadata; - private Optional createdBy = Optional.empty(); + private JsonNullable createdBy = JsonNullable.undefined(); private Long createdAt; @@ -434,13 +436,13 @@ public Builder adminDeleteEnabled(Optional adminDeleteEnabled) { return this; } - public Builder publicMetadata(OrganizationMembershipOrganizationPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; } - public Builder privateMetadata(OrganizationMembershipOrganizationPrivateMetadata privateMetadata) { + public Builder privateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -448,11 +450,11 @@ public Builder privateMetadata(OrganizationMembershipOrganizationPrivateMetadata public Builder createdBy(String createdBy) { Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = Optional.ofNullable(createdBy); + this.createdBy = JsonNullable.of(createdBy); return this; } - public Builder createdBy(Optional createdBy) { + public Builder createdBy(JsonNullable createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = createdBy; return this; diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganizationPrivateMetadata.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganizationPrivateMetadata.java deleted file mode 100644 index cd13d398..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganizationPrivateMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class OrganizationMembershipOrganizationPrivateMetadata { - - @JsonCreator - public OrganizationMembershipOrganizationPrivateMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(OrganizationMembershipOrganizationPrivateMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public OrganizationMembershipOrganizationPrivateMetadata build() { - return new OrganizationMembershipOrganizationPrivateMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganizationPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganizationPublicMetadata.java deleted file mode 100644 index 0aa71bd1..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipOrganizationPublicMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class OrganizationMembershipOrganizationPublicMetadata { - - @JsonCreator - public OrganizationMembershipOrganizationPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(OrganizationMembershipOrganizationPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public OrganizationMembershipOrganizationPublicMetadata build() { - return new OrganizationMembershipOrganizationPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipPrivateMetadata.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipPrivateMetadata.java deleted file mode 100644 index cdd91397..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipPrivateMetadata.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * OrganizationMembershipPrivateMetadata - Metadata saved on the organization membership, accessible only from the Backend API - */ - -public class OrganizationMembershipPrivateMetadata { - - @JsonCreator - public OrganizationMembershipPrivateMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(OrganizationMembershipPrivateMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public OrganizationMembershipPrivateMetadata build() { - return new OrganizationMembershipPrivateMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipPublicMetadata.java deleted file mode 100644 index 00670c43..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationMembershipPublicMetadata.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * OrganizationMembershipPublicMetadata - Metadata saved on the organization membership, accessible from both Frontend and Backend APIs - */ - -public class OrganizationMembershipPublicMetadata { - - @JsonCreator - public OrganizationMembershipPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(OrganizationMembershipPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public OrganizationMembershipPublicMetadata build() { - return new OrganizationMembershipPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationPrivateMetadata.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationPrivateMetadata.java deleted file mode 100644 index 0d7dd3a5..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationPrivateMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class OrganizationPrivateMetadata { - - @JsonCreator - public OrganizationPrivateMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(OrganizationPrivateMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public OrganizationPrivateMetadata build() { - return new OrganizationPrivateMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationPublicMetadata.java deleted file mode 100644 index 55b8fe18..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationPublicMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class OrganizationPublicMetadata { - - @JsonCreator - public OrganizationPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(OrganizationPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public OrganizationPublicMetadata build() { - return new OrganizationPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogo.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogo.java index d91deefd..4b32eed9 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogo.java +++ b/src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogo.java @@ -14,8 +14,10 @@ import java.lang.Boolean; import java.lang.Deprecated; import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; +import java.util.Map; import java.util.Objects; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -47,14 +49,14 @@ public class OrganizationWithLogo { private Optional adminDeleteEnabled; @JsonProperty("public_metadata") - private OrganizationWithLogoPublicMetadata publicMetadata; + private Map publicMetadata; @JsonProperty("private_metadata") - private OrganizationWithLogoPrivateMetadata privateMetadata; + private Map privateMetadata; @JsonInclude(Include.NON_ABSENT) @JsonProperty("created_by") - private Optional createdBy; + private JsonNullable createdBy; /** * Unix timestamp of creation. @@ -94,9 +96,9 @@ public OrganizationWithLogo( @JsonProperty("members_count") JsonNullable membersCount, @JsonProperty("max_allowed_memberships") long maxAllowedMemberships, @JsonProperty("admin_delete_enabled") Optional adminDeleteEnabled, - @JsonProperty("public_metadata") OrganizationWithLogoPublicMetadata publicMetadata, - @JsonProperty("private_metadata") OrganizationWithLogoPrivateMetadata privateMetadata, - @JsonProperty("created_by") Optional createdBy, + @JsonProperty("public_metadata") Map publicMetadata, + @JsonProperty("private_metadata") Map privateMetadata, + @JsonProperty("created_by") JsonNullable createdBy, @JsonProperty("created_at") long createdAt, @JsonProperty("updated_at") long updatedAt, @JsonProperty("logo_url") Optional logoUrl, @@ -109,8 +111,8 @@ public OrganizationWithLogo( Utils.checkNotNull(membersCount, "membersCount"); Utils.checkNotNull(maxAllowedMemberships, "maxAllowedMemberships"); Utils.checkNotNull(adminDeleteEnabled, "adminDeleteEnabled"); - Utils.checkNotNull(publicMetadata, "publicMetadata"); - Utils.checkNotNull(privateMetadata, "privateMetadata"); + publicMetadata = Utils.emptyMapIfNull(publicMetadata); + privateMetadata = Utils.emptyMapIfNull(privateMetadata); Utils.checkNotNull(createdBy, "createdBy"); Utils.checkNotNull(createdAt, "createdAt"); Utils.checkNotNull(updatedAt, "updatedAt"); @@ -140,12 +142,12 @@ public OrganizationWithLogo( String name, String slug, long maxAllowedMemberships, - OrganizationWithLogoPublicMetadata publicMetadata, - OrganizationWithLogoPrivateMetadata privateMetadata, + Map publicMetadata, + Map privateMetadata, long createdAt, long updatedAt, String imageUrl) { - this(object, id, name, slug, JsonNullable.undefined(), maxAllowedMemberships, Optional.empty(), publicMetadata, privateMetadata, Optional.empty(), createdAt, updatedAt, Optional.empty(), imageUrl, Optional.empty()); + this(object, id, name, slug, JsonNullable.undefined(), maxAllowedMemberships, Optional.empty(), publicMetadata, privateMetadata, JsonNullable.undefined(), createdAt, updatedAt, Optional.empty(), imageUrl, Optional.empty()); } @JsonIgnore @@ -184,17 +186,17 @@ public Optional adminDeleteEnabled() { } @JsonIgnore - public OrganizationWithLogoPublicMetadata publicMetadata() { + public Map publicMetadata() { return publicMetadata; } @JsonIgnore - public OrganizationWithLogoPrivateMetadata privateMetadata() { + public Map privateMetadata() { return privateMetadata; } @JsonIgnore - public Optional createdBy() { + public JsonNullable createdBy() { return createdBy; } @@ -293,13 +295,13 @@ public OrganizationWithLogo withAdminDeleteEnabled(Optional adminDelete return this; } - public OrganizationWithLogo withPublicMetadata(OrganizationWithLogoPublicMetadata publicMetadata) { + public OrganizationWithLogo withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; } - public OrganizationWithLogo withPrivateMetadata(OrganizationWithLogoPrivateMetadata privateMetadata) { + public OrganizationWithLogo withPrivateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -307,11 +309,11 @@ public OrganizationWithLogo withPrivateMetadata(OrganizationWithLogoPrivateMetad public OrganizationWithLogo withCreatedBy(String createdBy) { Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = Optional.ofNullable(createdBy); + this.createdBy = JsonNullable.of(createdBy); return this; } - public OrganizationWithLogo withCreatedBy(Optional createdBy) { + public OrganizationWithLogo withCreatedBy(JsonNullable createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = createdBy; return this; @@ -458,11 +460,11 @@ public final static class Builder { private Optional adminDeleteEnabled = Optional.empty(); - private OrganizationWithLogoPublicMetadata publicMetadata; + private Map publicMetadata; - private OrganizationWithLogoPrivateMetadata privateMetadata; + private Map privateMetadata; - private Optional createdBy = Optional.empty(); + private JsonNullable createdBy = JsonNullable.undefined(); private Long createdAt; @@ -533,13 +535,13 @@ public Builder adminDeleteEnabled(Optional adminDeleteEnabled) { return this; } - public Builder publicMetadata(OrganizationWithLogoPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; } - public Builder privateMetadata(OrganizationWithLogoPrivateMetadata privateMetadata) { + public Builder privateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -547,11 +549,11 @@ public Builder privateMetadata(OrganizationWithLogoPrivateMetadata privateMetada public Builder createdBy(String createdBy) { Utils.checkNotNull(createdBy, "createdBy"); - this.createdBy = Optional.ofNullable(createdBy); + this.createdBy = JsonNullable.of(createdBy); return this; } - public Builder createdBy(Optional createdBy) { + public Builder createdBy(JsonNullable createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = createdBy; return this; diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogoPrivateMetadata.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogoPrivateMetadata.java deleted file mode 100644 index ba13397d..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogoPrivateMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class OrganizationWithLogoPrivateMetadata { - - @JsonCreator - public OrganizationWithLogoPrivateMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(OrganizationWithLogoPrivateMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public OrganizationWithLogoPrivateMetadata build() { - return new OrganizationWithLogoPrivateMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogoPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogoPublicMetadata.java deleted file mode 100644 index d2ae0e49..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/OrganizationWithLogoPublicMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class OrganizationWithLogoPublicMetadata { - - @JsonCreator - public OrganizationWithLogoPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(OrganizationWithLogoPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public OrganizationWithLogoPublicMetadata build() { - return new OrganizationWithLogoPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/PrivateMetadata.java b/src/main/java/com/clerk/backend_api/models/components/PrivateMetadata.java deleted file mode 100644 index 92a2e29a..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/PrivateMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class PrivateMetadata { - - @JsonCreator - public PrivateMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(PrivateMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public PrivateMetadata build() { - return new PrivateMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/PublicMetadata.java b/src/main/java/com/clerk/backend_api/models/components/PublicMetadata.java deleted file mode 100644 index 4bc5c234..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/PublicMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class PublicMetadata { - - @JsonCreator - public PublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(PublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public PublicMetadata build() { - return new PublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/SAMLAccount.java b/src/main/java/com/clerk/backend_api/models/components/SAMLAccount.java index 3c6148d5..2b60b030 100644 --- a/src/main/java/com/clerk/backend_api/models/components/SAMLAccount.java +++ b/src/main/java/com/clerk/backend_api/models/components/SAMLAccount.java @@ -12,9 +12,11 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.Boolean; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.util.Map; import java.util.Objects; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -55,7 +57,7 @@ public class SAMLAccount { @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; @JsonInclude(Include.ALWAYS) @JsonProperty("verification") @@ -75,7 +77,7 @@ public SAMLAccount( @JsonProperty("first_name") JsonNullable firstName, @JsonProperty("last_name") JsonNullable lastName, @JsonProperty("provider_user_id") JsonNullable providerUserId, - @JsonProperty("public_metadata") Optional publicMetadata, + @JsonProperty("public_metadata") Optional> publicMetadata, @JsonProperty("verification") Optional verification, @JsonProperty("saml_connection") JsonNullable samlConnection) { Utils.checkNotNull(id, "id"); @@ -157,8 +159,8 @@ public JsonNullable providerUserId() { @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } @SuppressWarnings("unchecked") @@ -247,13 +249,13 @@ public SAMLAccount withProviderUserId(JsonNullable providerUserId) { return this; } - public SAMLAccount withPublicMetadata(SAMLAccountPublicMetadata publicMetadata) { + public SAMLAccount withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } - public SAMLAccount withPublicMetadata(Optional publicMetadata) { + public SAMLAccount withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -356,7 +358,7 @@ public final static class Builder { private JsonNullable providerUserId = JsonNullable.undefined(); - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); private Optional verification = Optional.empty(); @@ -436,13 +438,13 @@ public Builder providerUserId(JsonNullable providerUserId) { return this; } - public Builder publicMetadata(SAMLAccountPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; diff --git a/src/main/java/com/clerk/backend_api/models/components/SAMLAccountPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/components/SAMLAccountPublicMetadata.java deleted file mode 100644 index 144c51fd..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/SAMLAccountPublicMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class SAMLAccountPublicMetadata { - - @JsonCreator - public SAMLAccountPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(SAMLAccountPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public SAMLAccountPublicMetadata build() { - return new SAMLAccountPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/SchemasSAMLConnection.java b/src/main/java/com/clerk/backend_api/models/components/SchemasSAMLConnection.java index 55f16dee..8d5d9c3c 100644 --- a/src/main/java/com/clerk/backend_api/models/components/SchemasSAMLConnection.java +++ b/src/main/java/com/clerk/backend_api/models/components/SchemasSAMLConnection.java @@ -64,6 +64,10 @@ public class SchemasSAMLConnection { @JsonProperty("sp_metadata_url") private String spMetadataUrl; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("organization_id") + private JsonNullable organizationId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("attribute_mapping") private Optional attributeMapping; @@ -120,6 +124,7 @@ public SchemasSAMLConnection( @JsonProperty("acs_url") String acsUrl, @JsonProperty("sp_entity_id") String spEntityId, @JsonProperty("sp_metadata_url") String spMetadataUrl, + @JsonProperty("organization_id") JsonNullable organizationId, @JsonProperty("attribute_mapping") Optional attributeMapping, @JsonProperty("active") boolean active, @JsonProperty("provider") String provider, @@ -142,6 +147,7 @@ public SchemasSAMLConnection( Utils.checkNotNull(acsUrl, "acsUrl"); Utils.checkNotNull(spEntityId, "spEntityId"); Utils.checkNotNull(spMetadataUrl, "spMetadataUrl"); + Utils.checkNotNull(organizationId, "organizationId"); Utils.checkNotNull(attributeMapping, "attributeMapping"); Utils.checkNotNull(active, "active"); Utils.checkNotNull(provider, "provider"); @@ -164,6 +170,7 @@ public SchemasSAMLConnection( this.acsUrl = acsUrl; this.spEntityId = spEntityId; this.spMetadataUrl = spMetadataUrl; + this.organizationId = organizationId; this.attributeMapping = attributeMapping; this.active = active; this.provider = provider; @@ -190,7 +197,7 @@ public SchemasSAMLConnection( boolean syncUserAttributes, long createdAt, long updatedAt) { - this(object, id, name, domain, Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), acsUrl, spEntityId, spMetadataUrl, Optional.empty(), active, provider, userCount, syncUserAttributes, Optional.empty(), Optional.empty(), Optional.empty(), createdAt, updatedAt); + this(object, id, name, domain, Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), acsUrl, spEntityId, spMetadataUrl, JsonNullable.undefined(), Optional.empty(), active, provider, userCount, syncUserAttributes, Optional.empty(), Optional.empty(), Optional.empty(), createdAt, updatedAt); } @JsonIgnore @@ -253,6 +260,11 @@ public String spMetadataUrl() { return spMetadataUrl; } + @JsonIgnore + public JsonNullable organizationId() { + return organizationId; + } + @SuppressWarnings("unchecked") @JsonIgnore public Optional attributeMapping() { @@ -418,6 +430,18 @@ public SchemasSAMLConnection withSpMetadataUrl(String spMetadataUrl) { return this; } + public SchemasSAMLConnection withOrganizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = JsonNullable.of(organizationId); + return this; + } + + public SchemasSAMLConnection withOrganizationId(JsonNullable organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + public SchemasSAMLConnection withAttributeMapping(AttributeMapping attributeMapping) { Utils.checkNotNull(attributeMapping, "attributeMapping"); this.attributeMapping = Optional.ofNullable(attributeMapping); @@ -532,6 +556,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.acsUrl, other.acsUrl) && Objects.deepEquals(this.spEntityId, other.spEntityId) && Objects.deepEquals(this.spMetadataUrl, other.spMetadataUrl) && + Objects.deepEquals(this.organizationId, other.organizationId) && Objects.deepEquals(this.attributeMapping, other.attributeMapping) && Objects.deepEquals(this.active, other.active) && Objects.deepEquals(this.provider, other.provider) && @@ -559,6 +584,7 @@ public int hashCode() { acsUrl, spEntityId, spMetadataUrl, + organizationId, attributeMapping, active, provider, @@ -586,6 +612,7 @@ public String toString() { "acsUrl", acsUrl, "spEntityId", spEntityId, "spMetadataUrl", spMetadataUrl, + "organizationId", organizationId, "attributeMapping", attributeMapping, "active", active, "provider", provider, @@ -624,6 +651,8 @@ public final static class Builder { private String spMetadataUrl; + private JsonNullable organizationId = JsonNullable.undefined(); + private Optional attributeMapping = Optional.empty(); private Boolean active; @@ -750,6 +779,18 @@ public Builder spMetadataUrl(String spMetadataUrl) { return this; } + public Builder organizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = JsonNullable.of(organizationId); + return this; + } + + public Builder organizationId(JsonNullable organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + public Builder attributeMapping(AttributeMapping attributeMapping) { Utils.checkNotNull(attributeMapping, "attributeMapping"); this.attributeMapping = Optional.ofNullable(attributeMapping); @@ -856,6 +897,7 @@ public SchemasSAMLConnection build() { acsUrl, spEntityId, spMetadataUrl, + organizationId, attributeMapping, active, provider, diff --git a/src/main/java/com/clerk/backend_api/models/components/SignUp.java b/src/main/java/com/clerk/backend_api/models/components/SignUp.java index 399a100c..e43826b0 100644 --- a/src/main/java/com/clerk/backend_api/models/components/SignUp.java +++ b/src/main/java/com/clerk/backend_api/models/components/SignUp.java @@ -13,10 +13,12 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.Boolean; import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -85,11 +87,11 @@ public class SignUp { @JsonInclude(Include.NON_ABSENT) @JsonProperty("unsafe_metadata") - private Optional unsafeMetadata; + private Optional> unsafeMetadata; @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; @JsonProperty("custom_action") private boolean customAction; @@ -109,6 +111,14 @@ public class SignUp { @JsonProperty("abandon_at") private long abandonAt; + /** + * Unix timestamp at which the user accepted the legal requirements. + * + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("legal_accepted_at") + private JsonNullable legalAcceptedAt; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("external_account") private Optional externalAccount; @@ -130,13 +140,14 @@ public SignUp( @JsonProperty("password_enabled") boolean passwordEnabled, @JsonProperty("first_name") JsonNullable firstName, @JsonProperty("last_name") JsonNullable lastName, - @JsonProperty("unsafe_metadata") Optional unsafeMetadata, - @JsonProperty("public_metadata") Optional publicMetadata, + @JsonProperty("unsafe_metadata") Optional> unsafeMetadata, + @JsonProperty("public_metadata") Optional> publicMetadata, @JsonProperty("custom_action") boolean customAction, @JsonProperty("external_id") JsonNullable externalId, @JsonProperty("created_session_id") JsonNullable createdSessionId, @JsonProperty("created_user_id") JsonNullable createdUserId, @JsonProperty("abandon_at") long abandonAt, + @JsonProperty("legal_accepted_at") JsonNullable legalAcceptedAt, @JsonProperty("external_account") Optional externalAccount) { Utils.checkNotNull(object, "object"); Utils.checkNotNull(id, "id"); @@ -160,6 +171,7 @@ public SignUp( Utils.checkNotNull(createdSessionId, "createdSessionId"); Utils.checkNotNull(createdUserId, "createdUserId"); Utils.checkNotNull(abandonAt, "abandonAt"); + Utils.checkNotNull(legalAcceptedAt, "legalAcceptedAt"); Utils.checkNotNull(externalAccount, "externalAccount"); this.object = object; this.id = id; @@ -183,6 +195,7 @@ public SignUp( this.createdSessionId = createdSessionId; this.createdUserId = createdUserId; this.abandonAt = abandonAt; + this.legalAcceptedAt = legalAcceptedAt; this.externalAccount = externalAccount; } @@ -193,7 +206,7 @@ public SignUp( boolean passwordEnabled, boolean customAction, long abandonAt) { - this(object, id, status, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), passwordEnabled, JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), Optional.empty(), customAction, JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), abandonAt, Optional.empty()); + this(object, id, status, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), passwordEnabled, JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), Optional.empty(), customAction, JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), abandonAt, JsonNullable.undefined(), Optional.empty()); } @JsonIgnore @@ -278,14 +291,14 @@ public JsonNullable lastName() { @SuppressWarnings("unchecked") @JsonIgnore - public Optional unsafeMetadata() { - return (Optional) unsafeMetadata; + public Optional> unsafeMetadata() { + return (Optional>) unsafeMetadata; } @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } @JsonIgnore @@ -313,6 +326,15 @@ public long abandonAt() { return abandonAt; } + /** + * Unix timestamp at which the user accepted the legal requirements. + * + */ + @JsonIgnore + public JsonNullable legalAcceptedAt() { + return legalAcceptedAt; + } + @SuppressWarnings("unchecked") @JsonIgnore public Optional externalAccount() { @@ -479,25 +501,25 @@ public SignUp withLastName(JsonNullable lastName) { return this; } - public SignUp withUnsafeMetadata(SignUpUnsafeMetadata unsafeMetadata) { + public SignUp withUnsafeMetadata(Map unsafeMetadata) { Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); this.unsafeMetadata = Optional.ofNullable(unsafeMetadata); return this; } - public SignUp withUnsafeMetadata(Optional unsafeMetadata) { + public SignUp withUnsafeMetadata(Optional> unsafeMetadata) { Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); this.unsafeMetadata = unsafeMetadata; return this; } - public SignUp withPublicMetadata(SignUpPublicMetadata publicMetadata) { + public SignUp withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } - public SignUp withPublicMetadata(Optional publicMetadata) { + public SignUp withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -551,6 +573,26 @@ public SignUp withAbandonAt(long abandonAt) { return this; } + /** + * Unix timestamp at which the user accepted the legal requirements. + * + */ + public SignUp withLegalAcceptedAt(long legalAcceptedAt) { + Utils.checkNotNull(legalAcceptedAt, "legalAcceptedAt"); + this.legalAcceptedAt = JsonNullable.of(legalAcceptedAt); + return this; + } + + /** + * Unix timestamp at which the user accepted the legal requirements. + * + */ + public SignUp withLegalAcceptedAt(JsonNullable legalAcceptedAt) { + Utils.checkNotNull(legalAcceptedAt, "legalAcceptedAt"); + this.legalAcceptedAt = legalAcceptedAt; + return this; + } + public SignUp withExternalAccount(ExternalAccount externalAccount) { Utils.checkNotNull(externalAccount, "externalAccount"); this.externalAccount = Optional.ofNullable(externalAccount); @@ -595,6 +637,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.createdSessionId, other.createdSessionId) && Objects.deepEquals(this.createdUserId, other.createdUserId) && Objects.deepEquals(this.abandonAt, other.abandonAt) && + Objects.deepEquals(this.legalAcceptedAt, other.legalAcceptedAt) && Objects.deepEquals(this.externalAccount, other.externalAccount); } @@ -623,6 +666,7 @@ public int hashCode() { createdSessionId, createdUserId, abandonAt, + legalAcceptedAt, externalAccount); } @@ -651,6 +695,7 @@ public String toString() { "createdSessionId", createdSessionId, "createdUserId", createdUserId, "abandonAt", abandonAt, + "legalAcceptedAt", legalAcceptedAt, "externalAccount", externalAccount); } @@ -686,9 +731,9 @@ public final static class Builder { private JsonNullable lastName = JsonNullable.undefined(); - private Optional unsafeMetadata = Optional.empty(); + private Optional> unsafeMetadata = Optional.empty(); - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); private Boolean customAction; @@ -700,6 +745,8 @@ public final static class Builder { private Long abandonAt; + private JsonNullable legalAcceptedAt = JsonNullable.undefined(); + private Optional externalAccount = Optional.empty(); private Builder() { @@ -862,25 +909,25 @@ public Builder lastName(JsonNullable lastName) { return this; } - public Builder unsafeMetadata(SignUpUnsafeMetadata unsafeMetadata) { + public Builder unsafeMetadata(Map unsafeMetadata) { Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); this.unsafeMetadata = Optional.ofNullable(unsafeMetadata); return this; } - public Builder unsafeMetadata(Optional unsafeMetadata) { + public Builder unsafeMetadata(Optional> unsafeMetadata) { Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); this.unsafeMetadata = unsafeMetadata; return this; } - public Builder publicMetadata(SignUpPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -934,6 +981,26 @@ public Builder abandonAt(long abandonAt) { return this; } + /** + * Unix timestamp at which the user accepted the legal requirements. + * + */ + public Builder legalAcceptedAt(long legalAcceptedAt) { + Utils.checkNotNull(legalAcceptedAt, "legalAcceptedAt"); + this.legalAcceptedAt = JsonNullable.of(legalAcceptedAt); + return this; + } + + /** + * Unix timestamp at which the user accepted the legal requirements. + * + */ + public Builder legalAcceptedAt(JsonNullable legalAcceptedAt) { + Utils.checkNotNull(legalAcceptedAt, "legalAcceptedAt"); + this.legalAcceptedAt = legalAcceptedAt; + return this; + } + public Builder externalAccount(ExternalAccount externalAccount) { Utils.checkNotNull(externalAccount, "externalAccount"); this.externalAccount = Optional.ofNullable(externalAccount); @@ -970,6 +1037,7 @@ public SignUp build() { createdSessionId, createdUserId, abandonAt, + legalAcceptedAt, externalAccount); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/SignUpPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/components/SignUpPublicMetadata.java deleted file mode 100644 index bc25ac94..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/SignUpPublicMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class SignUpPublicMetadata { - - @JsonCreator - public SignUpPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(SignUpPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public SignUpPublicMetadata build() { - return new SignUpPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/SignUpUnsafeMetadata.java b/src/main/java/com/clerk/backend_api/models/components/SignUpUnsafeMetadata.java deleted file mode 100644 index 7eb2b92c..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/SignUpUnsafeMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class SignUpUnsafeMetadata { - - @JsonCreator - public SignUpUnsafeMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(SignUpUnsafeMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public SignUpUnsafeMetadata build() { - return new SignUpUnsafeMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/Totp.java b/src/main/java/com/clerk/backend_api/models/components/Totp.java deleted file mode 100644 index b024497f..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/Totp.java +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.lang.Boolean; -import java.lang.Object; -import java.lang.Override; -import java.lang.String; -import java.lang.SuppressWarnings; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - -/** - * Totp - A TOTP (Time-based One-Time Password) - */ - -public class Totp { - - @JsonProperty("object") - private String object; - - @JsonProperty("id") - private String id; - - @JsonInclude(Include.ALWAYS) - @JsonProperty("secret") - private Optional secret; - - @JsonInclude(Include.ALWAYS) - @JsonProperty("uri") - private Optional uri; - - @JsonProperty("verified") - private boolean verified; - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("backup_codes") - private JsonNullable> backupCodes; - - @JsonIgnore - private Map additionalProperties; - - @JsonCreator - public Totp( - @JsonProperty("object") String object, - @JsonProperty("id") String id, - @JsonProperty("secret") Optional secret, - @JsonProperty("uri") Optional uri, - @JsonProperty("verified") boolean verified, - @JsonProperty("backup_codes") JsonNullable> backupCodes) { - Utils.checkNotNull(object, "object"); - Utils.checkNotNull(id, "id"); - Utils.checkNotNull(secret, "secret"); - Utils.checkNotNull(uri, "uri"); - Utils.checkNotNull(verified, "verified"); - Utils.checkNotNull(backupCodes, "backupCodes"); - this.object = object; - this.id = id; - this.secret = secret; - this.uri = uri; - this.verified = verified; - this.backupCodes = backupCodes; - this.additionalProperties = new HashMap<>(); - } - - public Totp( - String object, - String id, - boolean verified) { - this(object, id, Optional.empty(), Optional.empty(), verified, JsonNullable.undefined()); - } - - @JsonIgnore - public String object() { - return object; - } - - @JsonIgnore - public String id() { - return id; - } - - @JsonIgnore - public Optional secret() { - return secret; - } - - @JsonIgnore - public Optional uri() { - return uri; - } - - @JsonIgnore - public boolean verified() { - return verified; - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public JsonNullable> backupCodes() { - return (JsonNullable>) backupCodes; - } - - @JsonAnyGetter - public Map additionalProperties() { - return additionalProperties; - } - - public final static Builder builder() { - return new Builder(); - } - - public Totp withObject(String object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public Totp withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public Totp withSecret(String secret) { - Utils.checkNotNull(secret, "secret"); - this.secret = Optional.ofNullable(secret); - return this; - } - - public Totp withSecret(Optional secret) { - Utils.checkNotNull(secret, "secret"); - this.secret = secret; - return this; - } - - public Totp withUri(String uri) { - Utils.checkNotNull(uri, "uri"); - this.uri = Optional.ofNullable(uri); - return this; - } - - public Totp withUri(Optional uri) { - Utils.checkNotNull(uri, "uri"); - this.uri = uri; - return this; - } - - public Totp withVerified(boolean verified) { - Utils.checkNotNull(verified, "verified"); - this.verified = verified; - return this; - } - - public Totp withBackupCodes(List backupCodes) { - Utils.checkNotNull(backupCodes, "backupCodes"); - this.backupCodes = JsonNullable.of(backupCodes); - return this; - } - - public Totp withBackupCodes(JsonNullable> backupCodes) { - Utils.checkNotNull(backupCodes, "backupCodes"); - this.backupCodes = backupCodes; - return this; - } - - @JsonAnySetter - public Totp withAdditionalProperty(String key, Object value) { - // note that value can be null because of the way JsonAnySetter works - Utils.checkNotNull(key, "key"); - additionalProperties.put(key, value); - return this; - } - - public Totp withAdditionalProperties(Map additionalProperties) { - Utils.checkNotNull(additionalProperties, "additionalProperties"); - this.additionalProperties = additionalProperties; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Totp other = (Totp) o; - return - Objects.deepEquals(this.object, other.object) && - Objects.deepEquals(this.id, other.id) && - Objects.deepEquals(this.secret, other.secret) && - Objects.deepEquals(this.uri, other.uri) && - Objects.deepEquals(this.verified, other.verified) && - Objects.deepEquals(this.backupCodes, other.backupCodes) && - Objects.deepEquals(this.additionalProperties, other.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash( - object, - id, - secret, - uri, - verified, - backupCodes, - additionalProperties); - } - - @Override - public String toString() { - return Utils.toString(Totp.class, - "object", object, - "id", id, - "secret", secret, - "uri", uri, - "verified", verified, - "backupCodes", backupCodes, - "additionalProperties", additionalProperties); - } - - public final static class Builder { - - private String object; - - private String id; - - private Optional secret = Optional.empty(); - - private Optional uri = Optional.empty(); - - private Boolean verified; - - private JsonNullable> backupCodes = JsonNullable.undefined(); - - private Map additionalProperties = new HashMap<>(); - - private Builder() { - // force use of static builder() method - } - - public Builder object(String object) { - Utils.checkNotNull(object, "object"); - this.object = object; - return this; - } - - public Builder id(String id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public Builder secret(String secret) { - Utils.checkNotNull(secret, "secret"); - this.secret = Optional.ofNullable(secret); - return this; - } - - public Builder secret(Optional secret) { - Utils.checkNotNull(secret, "secret"); - this.secret = secret; - return this; - } - - public Builder uri(String uri) { - Utils.checkNotNull(uri, "uri"); - this.uri = Optional.ofNullable(uri); - return this; - } - - public Builder uri(Optional uri) { - Utils.checkNotNull(uri, "uri"); - this.uri = uri; - return this; - } - - public Builder verified(boolean verified) { - Utils.checkNotNull(verified, "verified"); - this.verified = verified; - return this; - } - - public Builder backupCodes(List backupCodes) { - Utils.checkNotNull(backupCodes, "backupCodes"); - this.backupCodes = JsonNullable.of(backupCodes); - return this; - } - - public Builder backupCodes(JsonNullable> backupCodes) { - Utils.checkNotNull(backupCodes, "backupCodes"); - this.backupCodes = backupCodes; - return this; - } - - public Builder additionalProperty(String key, Object value) { - Utils.checkNotNull(key, "key"); - // we could be strict about null values (force the user - // to pass `JsonNullable.of(null)`) but likely to be a bit - // annoying for additional properties building so we'll - // relax preconditions. - this.additionalProperties.put(key, value); - return this; - } - - public Builder additionalProperties(Map additionalProperties) { - Utils.checkNotNull(additionalProperties, "additionalProperties"); - this.additionalProperties = additionalProperties; - return this; - } - - public Totp build() { - return new Totp( - object, - id, - secret, - uri, - verified, - backupCodes) - .withAdditionalProperties(additionalProperties); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/UnsafeMetadata.java b/src/main/java/com/clerk/backend_api/models/components/UnsafeMetadata.java deleted file mode 100644 index 266c0740..00000000 --- a/src/main/java/com/clerk/backend_api/models/components/UnsafeMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.components; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class UnsafeMetadata { - - @JsonCreator - public UnsafeMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(UnsafeMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public UnsafeMetadata build() { - return new UnsafeMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/components/User.java b/src/main/java/com/clerk/backend_api/models/components/User.java index 95c878a9..571e32dc 100644 --- a/src/main/java/com/clerk/backend_api/models/components/User.java +++ b/src/main/java/com/clerk/backend_api/models/components/User.java @@ -14,10 +14,12 @@ import java.lang.Boolean; import java.lang.Deprecated; import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -86,15 +88,15 @@ public class User { @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; @JsonInclude(Include.NON_ABSENT) @JsonProperty("private_metadata") - private JsonNullable privateMetadata; + private JsonNullable> privateMetadata; @JsonInclude(Include.NON_ABSENT) @JsonProperty("unsafe_metadata") - private Optional unsafeMetadata; + private Optional> unsafeMetadata; @JsonInclude(Include.NON_ABSENT) @JsonProperty("email_addresses") @@ -262,9 +264,9 @@ public User( @JsonProperty("profile_image_url") Optional profileImageUrl, @JsonProperty("image_url") Optional imageUrl, @JsonProperty("has_image") Optional hasImage, - @JsonProperty("public_metadata") Optional publicMetadata, - @JsonProperty("private_metadata") JsonNullable privateMetadata, - @JsonProperty("unsafe_metadata") Optional unsafeMetadata, + @JsonProperty("public_metadata") Optional> publicMetadata, + @JsonProperty("private_metadata") JsonNullable> privateMetadata, + @JsonProperty("unsafe_metadata") Optional> unsafeMetadata, @JsonProperty("email_addresses") Optional> emailAddresses, @JsonProperty("phone_numbers") Optional> phoneNumbers, @JsonProperty("web3_wallets") Optional> web3Wallets, @@ -444,20 +446,20 @@ public Optional hasImage() { @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable privateMetadata() { - return (JsonNullable) privateMetadata; + public JsonNullable> privateMetadata() { + return (JsonNullable>) privateMetadata; } @SuppressWarnings("unchecked") @JsonIgnore - public Optional unsafeMetadata() { - return (Optional) unsafeMetadata; + public Optional> unsafeMetadata() { + return (Optional>) unsafeMetadata; } @SuppressWarnings("unchecked") @@ -806,37 +808,37 @@ public User withHasImage(Optional hasImage) { return this; } - public User withPublicMetadata(PublicMetadata publicMetadata) { + public User withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } - public User withPublicMetadata(Optional publicMetadata) { + public User withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; } - public User withPrivateMetadata(PrivateMetadata privateMetadata) { + public User withPrivateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = JsonNullable.of(privateMetadata); return this; } - public User withPrivateMetadata(JsonNullable privateMetadata) { + public User withPrivateMetadata(JsonNullable> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; } - public User withUnsafeMetadata(UnsafeMetadata unsafeMetadata) { + public User withUnsafeMetadata(Map unsafeMetadata) { Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); this.unsafeMetadata = Optional.ofNullable(unsafeMetadata); return this; } - public User withUnsafeMetadata(Optional unsafeMetadata) { + public User withUnsafeMetadata(Optional> unsafeMetadata) { Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); this.unsafeMetadata = unsafeMetadata; return this; @@ -1408,11 +1410,11 @@ public final static class Builder { private Optional hasImage = Optional.empty(); - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); - private JsonNullable privateMetadata = JsonNullable.undefined(); + private JsonNullable> privateMetadata = JsonNullable.undefined(); - private Optional unsafeMetadata = Optional.empty(); + private Optional> unsafeMetadata = Optional.empty(); private Optional> emailAddresses = Optional.empty(); @@ -1626,37 +1628,37 @@ public Builder hasImage(Optional hasImage) { return this; } - public Builder publicMetadata(PublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; } - public Builder privateMetadata(PrivateMetadata privateMetadata) { + public Builder privateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = JsonNullable.of(privateMetadata); return this; } - public Builder privateMetadata(JsonNullable privateMetadata) { + public Builder privateMetadata(JsonNullable> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; } - public Builder unsafeMetadata(UnsafeMetadata unsafeMetadata) { + public Builder unsafeMetadata(Map unsafeMetadata) { Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); this.unsafeMetadata = Optional.ofNullable(unsafeMetadata); return this; } - public Builder unsafeMetadata(Optional unsafeMetadata) { + public Builder unsafeMetadata(Optional> unsafeMetadata) { Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); this.unsafeMetadata = unsafeMetadata; return this; diff --git a/src/main/java/com/clerk/backend_api/models/components/Verification.java b/src/main/java/com/clerk/backend_api/models/components/Verification.java index 2d0a72e7..26bdd3f1 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Verification.java +++ b/src/main/java/com/clerk/backend_api/models/components/Verification.java @@ -39,9 +39,9 @@ public static Verification of(Admin value) { return new Verification(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); } - public static Verification of(Oauth value) { + public static Verification of(FromOAuth value) { Utils.checkNotNull(value, "value"); - return new Verification(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + return new Verification(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); } /** @@ -49,7 +49,7 @@ public static Verification of(Oauth value) { *
    *
  • {@code com.clerk.backend_api.models.components.Otp}
  • *
  • {@code com.clerk.backend_api.models.components.Admin}
  • - *
  • {@code com.clerk.backend_api.models.components.Oauth}
  • + *
  • {@code com.clerk.backend_api.models.components.FromOAuth}
  • *
* *

Use {@code instanceof} to determine what type is returned. For example: @@ -89,7 +89,7 @@ public static final class _Deserializer extends OneOfDeserializer public _Deserializer() { super(Verification.class, false, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } diff --git a/src/main/java/com/clerk/backend_api/models/components/WaitlistEntries.java b/src/main/java/com/clerk/backend_api/models/components/WaitlistEntries.java new file mode 100644 index 00000000..2d5e9bba --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/WaitlistEntries.java @@ -0,0 +1,135 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.components; + + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +/** + * WaitlistEntries - List of waitlist entries + */ + +public class WaitlistEntries { + + @JsonProperty("data") + private List data; + + /** + * Total number of waitlist entries + */ + @JsonProperty("total_count") + private long totalCount; + + @JsonCreator + public WaitlistEntries( + @JsonProperty("data") List data, + @JsonProperty("total_count") long totalCount) { + Utils.checkNotNull(data, "data"); + Utils.checkNotNull(totalCount, "totalCount"); + this.data = data; + this.totalCount = totalCount; + } + + @JsonIgnore + public List data() { + return data; + } + + /** + * Total number of waitlist entries + */ + @JsonIgnore + public long totalCount() { + return totalCount; + } + + public final static Builder builder() { + return new Builder(); + } + + public WaitlistEntries withData(List data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + /** + * Total number of waitlist entries + */ + public WaitlistEntries withTotalCount(long totalCount) { + Utils.checkNotNull(totalCount, "totalCount"); + this.totalCount = totalCount; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WaitlistEntries other = (WaitlistEntries) o; + return + Objects.deepEquals(this.data, other.data) && + Objects.deepEquals(this.totalCount, other.totalCount); + } + + @Override + public int hashCode() { + return Objects.hash( + data, + totalCount); + } + + @Override + public String toString() { + return Utils.toString(WaitlistEntries.class, + "data", data, + "totalCount", totalCount); + } + + public final static class Builder { + + private List data; + + private Long totalCount; + + private Builder() { + // force use of static builder() method + } + + public Builder data(List data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + /** + * Total number of waitlist entries + */ + public Builder totalCount(long totalCount) { + Utils.checkNotNull(totalCount, "totalCount"); + this.totalCount = totalCount; + return this; + } + + public WaitlistEntries build() { + return new WaitlistEntries( + data, + totalCount); + } + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/components/WaitlistEntry.java b/src/main/java/com/clerk/backend_api/models/components/WaitlistEntry.java new file mode 100644 index 00000000..4d5a64ae --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/WaitlistEntry.java @@ -0,0 +1,392 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.components; + + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class WaitlistEntry { + + @JsonProperty("object") + private WaitlistEntryObject object; + + @JsonProperty("id") + private String id; + + @JsonProperty("email_address") + private String emailAddress; + + @JsonProperty("status") + private WaitlistEntryStatus status; + + /** + * Indicates if the waitlist entry is locked. Locked entries are being processed in a batch action and are unavailable for other actions. + * + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("is_locked") + private Optional isLocked; + + /** + * Unix timestamp of creation. + * + */ + @JsonProperty("created_at") + private long createdAt; + + /** + * Unix timestamp of last update. + * + */ + @JsonProperty("updated_at") + private long updatedAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("invitation") + private JsonNullable invitation; + + @JsonCreator + public WaitlistEntry( + @JsonProperty("object") WaitlistEntryObject object, + @JsonProperty("id") String id, + @JsonProperty("email_address") String emailAddress, + @JsonProperty("status") WaitlistEntryStatus status, + @JsonProperty("is_locked") Optional isLocked, + @JsonProperty("created_at") long createdAt, + @JsonProperty("updated_at") long updatedAt, + @JsonProperty("invitation") JsonNullable invitation) { + Utils.checkNotNull(object, "object"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(emailAddress, "emailAddress"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(isLocked, "isLocked"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(invitation, "invitation"); + this.object = object; + this.id = id; + this.emailAddress = emailAddress; + this.status = status; + this.isLocked = isLocked; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.invitation = invitation; + } + + public WaitlistEntry( + WaitlistEntryObject object, + String id, + String emailAddress, + WaitlistEntryStatus status, + long createdAt, + long updatedAt) { + this(object, id, emailAddress, status, Optional.empty(), createdAt, updatedAt, JsonNullable.undefined()); + } + + @JsonIgnore + public WaitlistEntryObject object() { + return object; + } + + @JsonIgnore + public String id() { + return id; + } + + @JsonIgnore + public String emailAddress() { + return emailAddress; + } + + @JsonIgnore + public WaitlistEntryStatus status() { + return status; + } + + /** + * Indicates if the waitlist entry is locked. Locked entries are being processed in a batch action and are unavailable for other actions. + * + */ + @JsonIgnore + public Optional isLocked() { + return isLocked; + } + + /** + * Unix timestamp of creation. + * + */ + @JsonIgnore + public long createdAt() { + return createdAt; + } + + /** + * Unix timestamp of last update. + * + */ + @JsonIgnore + public long updatedAt() { + return updatedAt; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable invitation() { + return (JsonNullable) invitation; + } + + public final static Builder builder() { + return new Builder(); + } + + public WaitlistEntry withObject(WaitlistEntryObject object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public WaitlistEntry withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public WaitlistEntry withEmailAddress(String emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = emailAddress; + return this; + } + + public WaitlistEntry withStatus(WaitlistEntryStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Indicates if the waitlist entry is locked. Locked entries are being processed in a batch action and are unavailable for other actions. + * + */ + public WaitlistEntry withIsLocked(boolean isLocked) { + Utils.checkNotNull(isLocked, "isLocked"); + this.isLocked = Optional.ofNullable(isLocked); + return this; + } + + /** + * Indicates if the waitlist entry is locked. Locked entries are being processed in a batch action and are unavailable for other actions. + * + */ + public WaitlistEntry withIsLocked(Optional isLocked) { + Utils.checkNotNull(isLocked, "isLocked"); + this.isLocked = isLocked; + return this; + } + + /** + * Unix timestamp of creation. + * + */ + public WaitlistEntry withCreatedAt(long createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * Unix timestamp of last update. + * + */ + public WaitlistEntry withUpdatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public WaitlistEntry withInvitation(WaitlistEntryInvitation invitation) { + Utils.checkNotNull(invitation, "invitation"); + this.invitation = JsonNullable.of(invitation); + return this; + } + + public WaitlistEntry withInvitation(JsonNullable invitation) { + Utils.checkNotNull(invitation, "invitation"); + this.invitation = invitation; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WaitlistEntry other = (WaitlistEntry) o; + return + Objects.deepEquals(this.object, other.object) && + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.emailAddress, other.emailAddress) && + Objects.deepEquals(this.status, other.status) && + Objects.deepEquals(this.isLocked, other.isLocked) && + Objects.deepEquals(this.createdAt, other.createdAt) && + Objects.deepEquals(this.updatedAt, other.updatedAt) && + Objects.deepEquals(this.invitation, other.invitation); + } + + @Override + public int hashCode() { + return Objects.hash( + object, + id, + emailAddress, + status, + isLocked, + createdAt, + updatedAt, + invitation); + } + + @Override + public String toString() { + return Utils.toString(WaitlistEntry.class, + "object", object, + "id", id, + "emailAddress", emailAddress, + "status", status, + "isLocked", isLocked, + "createdAt", createdAt, + "updatedAt", updatedAt, + "invitation", invitation); + } + + public final static class Builder { + + private WaitlistEntryObject object; + + private String id; + + private String emailAddress; + + private WaitlistEntryStatus status; + + private Optional isLocked = Optional.empty(); + + private Long createdAt; + + private Long updatedAt; + + private JsonNullable invitation = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + public Builder object(WaitlistEntryObject object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder emailAddress(String emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = emailAddress; + return this; + } + + public Builder status(WaitlistEntryStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Indicates if the waitlist entry is locked. Locked entries are being processed in a batch action and are unavailable for other actions. + * + */ + public Builder isLocked(boolean isLocked) { + Utils.checkNotNull(isLocked, "isLocked"); + this.isLocked = Optional.ofNullable(isLocked); + return this; + } + + /** + * Indicates if the waitlist entry is locked. Locked entries are being processed in a batch action and are unavailable for other actions. + * + */ + public Builder isLocked(Optional isLocked) { + Utils.checkNotNull(isLocked, "isLocked"); + this.isLocked = isLocked; + return this; + } + + /** + * Unix timestamp of creation. + * + */ + public Builder createdAt(long createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * Unix timestamp of last update. + * + */ + public Builder updatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Builder invitation(WaitlistEntryInvitation invitation) { + Utils.checkNotNull(invitation, "invitation"); + this.invitation = JsonNullable.of(invitation); + return this; + } + + public Builder invitation(JsonNullable invitation) { + Utils.checkNotNull(invitation, "invitation"); + this.invitation = invitation; + return this; + } + + public WaitlistEntry build() { + return new WaitlistEntry( + object, + id, + emailAddress, + status, + isLocked, + createdAt, + updatedAt, + invitation); + } + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/components/WaitlistEntryInvitation.java b/src/main/java/com/clerk/backend_api/models/components/WaitlistEntryInvitation.java new file mode 100644 index 00000000..fdddd5cb --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/WaitlistEntryInvitation.java @@ -0,0 +1,478 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.components; + + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class WaitlistEntryInvitation { + + @JsonProperty("object") + private WaitlistEntryInvitationObject object; + + @JsonProperty("id") + private String id; + + @JsonProperty("email_address") + private String emailAddress; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("public_metadata") + private Optional> publicMetadata; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("revoked") + private Optional revoked; + + @JsonProperty("status") + private WaitlistEntryInvitationStatus status; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("url") + private JsonNullable url; + + /** + * Unix timestamp of expiration. + * + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("expires_at") + private JsonNullable expiresAt; + + /** + * Unix timestamp of creation. + * + */ + @JsonProperty("created_at") + private long createdAt; + + /** + * Unix timestamp of last update. + * + */ + @JsonProperty("updated_at") + private long updatedAt; + + @JsonCreator + public WaitlistEntryInvitation( + @JsonProperty("object") WaitlistEntryInvitationObject object, + @JsonProperty("id") String id, + @JsonProperty("email_address") String emailAddress, + @JsonProperty("public_metadata") Optional> publicMetadata, + @JsonProperty("revoked") Optional revoked, + @JsonProperty("status") WaitlistEntryInvitationStatus status, + @JsonProperty("url") JsonNullable url, + @JsonProperty("expires_at") JsonNullable expiresAt, + @JsonProperty("created_at") long createdAt, + @JsonProperty("updated_at") long updatedAt) { + Utils.checkNotNull(object, "object"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(emailAddress, "emailAddress"); + Utils.checkNotNull(publicMetadata, "publicMetadata"); + Utils.checkNotNull(revoked, "revoked"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(url, "url"); + Utils.checkNotNull(expiresAt, "expiresAt"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(updatedAt, "updatedAt"); + this.object = object; + this.id = id; + this.emailAddress = emailAddress; + this.publicMetadata = publicMetadata; + this.revoked = revoked; + this.status = status; + this.url = url; + this.expiresAt = expiresAt; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public WaitlistEntryInvitation( + WaitlistEntryInvitationObject object, + String id, + String emailAddress, + WaitlistEntryInvitationStatus status, + long createdAt, + long updatedAt) { + this(object, id, emailAddress, Optional.empty(), Optional.empty(), status, JsonNullable.undefined(), JsonNullable.undefined(), createdAt, updatedAt); + } + + @JsonIgnore + public WaitlistEntryInvitationObject object() { + return object; + } + + @JsonIgnore + public String id() { + return id; + } + + @JsonIgnore + public String emailAddress() { + return emailAddress; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> publicMetadata() { + return (Optional>) publicMetadata; + } + + @JsonIgnore + public Optional revoked() { + return revoked; + } + + @JsonIgnore + public WaitlistEntryInvitationStatus status() { + return status; + } + + @JsonIgnore + public JsonNullable url() { + return url; + } + + /** + * Unix timestamp of expiration. + * + */ + @JsonIgnore + public JsonNullable expiresAt() { + return expiresAt; + } + + /** + * Unix timestamp of creation. + * + */ + @JsonIgnore + public long createdAt() { + return createdAt; + } + + /** + * Unix timestamp of last update. + * + */ + @JsonIgnore + public long updatedAt() { + return updatedAt; + } + + public final static Builder builder() { + return new Builder(); + } + + public WaitlistEntryInvitation withObject(WaitlistEntryInvitationObject object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public WaitlistEntryInvitation withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public WaitlistEntryInvitation withEmailAddress(String emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = emailAddress; + return this; + } + + public WaitlistEntryInvitation withPublicMetadata(Map publicMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + this.publicMetadata = Optional.ofNullable(publicMetadata); + return this; + } + + public WaitlistEntryInvitation withPublicMetadata(Optional> publicMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + this.publicMetadata = publicMetadata; + return this; + } + + public WaitlistEntryInvitation withRevoked(boolean revoked) { + Utils.checkNotNull(revoked, "revoked"); + this.revoked = Optional.ofNullable(revoked); + return this; + } + + public WaitlistEntryInvitation withRevoked(Optional revoked) { + Utils.checkNotNull(revoked, "revoked"); + this.revoked = revoked; + return this; + } + + public WaitlistEntryInvitation withStatus(WaitlistEntryInvitationStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public WaitlistEntryInvitation withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = JsonNullable.of(url); + return this; + } + + public WaitlistEntryInvitation withUrl(JsonNullable url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + /** + * Unix timestamp of expiration. + * + */ + public WaitlistEntryInvitation withExpiresAt(long expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = JsonNullable.of(expiresAt); + return this; + } + + /** + * Unix timestamp of expiration. + * + */ + public WaitlistEntryInvitation withExpiresAt(JsonNullable expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = expiresAt; + return this; + } + + /** + * Unix timestamp of creation. + * + */ + public WaitlistEntryInvitation withCreatedAt(long createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * Unix timestamp of last update. + * + */ + public WaitlistEntryInvitation withUpdatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WaitlistEntryInvitation other = (WaitlistEntryInvitation) o; + return + Objects.deepEquals(this.object, other.object) && + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.emailAddress, other.emailAddress) && + Objects.deepEquals(this.publicMetadata, other.publicMetadata) && + Objects.deepEquals(this.revoked, other.revoked) && + Objects.deepEquals(this.status, other.status) && + Objects.deepEquals(this.url, other.url) && + Objects.deepEquals(this.expiresAt, other.expiresAt) && + Objects.deepEquals(this.createdAt, other.createdAt) && + Objects.deepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash( + object, + id, + emailAddress, + publicMetadata, + revoked, + status, + url, + expiresAt, + createdAt, + updatedAt); + } + + @Override + public String toString() { + return Utils.toString(WaitlistEntryInvitation.class, + "object", object, + "id", id, + "emailAddress", emailAddress, + "publicMetadata", publicMetadata, + "revoked", revoked, + "status", status, + "url", url, + "expiresAt", expiresAt, + "createdAt", createdAt, + "updatedAt", updatedAt); + } + + public final static class Builder { + + private WaitlistEntryInvitationObject object; + + private String id; + + private String emailAddress; + + private Optional> publicMetadata = Optional.empty(); + + private Optional revoked = Optional.empty(); + + private WaitlistEntryInvitationStatus status; + + private JsonNullable url = JsonNullable.undefined(); + + private JsonNullable expiresAt = JsonNullable.undefined(); + + private Long createdAt; + + private Long updatedAt; + + private Builder() { + // force use of static builder() method + } + + public Builder object(WaitlistEntryInvitationObject object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder emailAddress(String emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = emailAddress; + return this; + } + + public Builder publicMetadata(Map publicMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + this.publicMetadata = Optional.ofNullable(publicMetadata); + return this; + } + + public Builder publicMetadata(Optional> publicMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + this.publicMetadata = publicMetadata; + return this; + } + + public Builder revoked(boolean revoked) { + Utils.checkNotNull(revoked, "revoked"); + this.revoked = Optional.ofNullable(revoked); + return this; + } + + public Builder revoked(Optional revoked) { + Utils.checkNotNull(revoked, "revoked"); + this.revoked = revoked; + return this; + } + + public Builder status(WaitlistEntryInvitationStatus status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = JsonNullable.of(url); + return this; + } + + public Builder url(JsonNullable url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + /** + * Unix timestamp of expiration. + * + */ + public Builder expiresAt(long expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = JsonNullable.of(expiresAt); + return this; + } + + /** + * Unix timestamp of expiration. + * + */ + public Builder expiresAt(JsonNullable expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = expiresAt; + return this; + } + + /** + * Unix timestamp of creation. + * + */ + public Builder createdAt(long createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * Unix timestamp of last update. + * + */ + public Builder updatedAt(long updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public WaitlistEntryInvitation build() { + return new WaitlistEntryInvitation( + object, + id, + emailAddress, + publicMetadata, + revoked, + status, + url, + expiresAt, + createdAt, + updatedAt); + } + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/components/OauthVerificationStrategy.java b/src/main/java/com/clerk/backend_api/models/components/WaitlistEntryInvitationObject.java similarity index 56% rename from src/main/java/com/clerk/backend_api/models/components/OauthVerificationStrategy.java rename to src/main/java/com/clerk/backend_api/models/components/WaitlistEntryInvitationObject.java index 02130de5..c80e69ce 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OauthVerificationStrategy.java +++ b/src/main/java/com/clerk/backend_api/models/components/WaitlistEntryInvitationObject.java @@ -9,17 +9,13 @@ import java.util.Objects; import java.util.Optional; -public enum OauthVerificationStrategy { - OAUTH_GOOGLE("oauth_google"), - OAUTH_MOCK("oauth_mock"), - FROM_OAUTH_GOOGLE("from_oauth_google"), - FROM_OAUTH_DISCORD("from_oauth_discord"), - OAUTH_APPLE("oauth_apple"); +public enum WaitlistEntryInvitationObject { + INVITATION("invitation"); @JsonValue private final String value; - private OauthVerificationStrategy(String value) { + private WaitlistEntryInvitationObject(String value) { this.value = value; } @@ -27,8 +23,8 @@ public String value() { return value; } - public static Optional fromValue(String value) { - for (OauthVerificationStrategy o: OauthVerificationStrategy.values()) { + public static Optional fromValue(String value) { + for (WaitlistEntryInvitationObject o: WaitlistEntryInvitationObject.values()) { if (Objects.deepEquals(o.value, value)) { return Optional.of(o); } diff --git a/src/main/java/com/clerk/backend_api/models/components/WaitlistEntryInvitationStatus.java b/src/main/java/com/clerk/backend_api/models/components/WaitlistEntryInvitationStatus.java new file mode 100644 index 00000000..9c1cd173 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/WaitlistEntryInvitationStatus.java @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum WaitlistEntryInvitationStatus { + PENDING("pending"), + ACCEPTED("accepted"), + REVOKED("revoked"), + EXPIRED("expired"); + + @JsonValue + private final String value; + + private WaitlistEntryInvitationStatus(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (WaitlistEntryInvitationStatus o: WaitlistEntryInvitationStatus.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/WaitlistEntryObject.java b/src/main/java/com/clerk/backend_api/models/components/WaitlistEntryObject.java new file mode 100644 index 00000000..b9b59fa3 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/WaitlistEntryObject.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum WaitlistEntryObject { + WAITLIST_ENTRY("waitlist_entry"); + + @JsonValue + private final String value; + + private WaitlistEntryObject(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (WaitlistEntryObject o: WaitlistEntryObject.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/WaitlistEntryStatus.java b/src/main/java/com/clerk/backend_api/models/components/WaitlistEntryStatus.java new file mode 100644 index 00000000..b8e83904 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/WaitlistEntryStatus.java @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum WaitlistEntryStatus { + PENDING("pending"), + INVITED("invited"), + REJECTED("rejected"), + COMPLETED("completed"); + + @JsonValue + private final String value; + + private WaitlistEntryStatus(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (WaitlistEntryStatus o: WaitlistEntryStatus.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 5e43980d..8079f8fc 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 @@ -11,7 +11,8 @@ public enum Web3SignatureVerificationStrategy { WEB3_METAMASK_SIGNATURE("web3_metamask_signature"), - WEB3_COINBASE_WALLET_SIGNATURE("web3_coinbase_wallet_signature"); + WEB3_COINBASE_WALLET_SIGNATURE("web3_coinbase_wallet_signature"), + WEB3_OKX_WALLET_SIGNATURE("web3_okx_wallet_signature"); @JsonValue private final String value; diff --git a/src/main/java/com/clerk/backend_api/models/operations/AddDomainRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/AddDomainRequestBuilder.java index 83723a83..cd80401b 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/AddDomainRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/AddDomainRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class AddDomainRequestBuilder { - private AddDomainRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallAddDomain sdk; public AddDomainRequestBuilder(SDKMethodInterfaces.MethodCallAddDomain sdk) { this.sdk = sdk; } - + public AddDomainRequestBuilder request(AddDomainRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public AddDomainRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/ChangeProductionInstanceDomainRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/ChangeProductionInstanceDomainRequestBuilder.java index 094b996d..fc807fe7 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/ChangeProductionInstanceDomainRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/ChangeProductionInstanceDomainRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class ChangeProductionInstanceDomainRequestBuilder { - private ChangeProductionInstanceDomainRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallChangeProductionInstanceDomain sdk; public ChangeProductionInstanceDomainRequestBuilder(SDKMethodInterfaces.MethodCallChangeProductionInstanceDomain sdk) { this.sdk = sdk; } - + public ChangeProductionInstanceDomainRequestBuilder request(ChangeProductionInstanceDomainRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public ChangeProductionInstanceDomainRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateActorTokenRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateActorTokenRequestBuilder.java index b207bcb0..340ceb52 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateActorTokenRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateActorTokenRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class CreateActorTokenRequestBuilder { - private CreateActorTokenRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallCreateActorToken sdk; public CreateActorTokenRequestBuilder(SDKMethodInterfaces.MethodCallCreateActorToken sdk) { this.sdk = sdk; } - + public CreateActorTokenRequestBuilder request(CreateActorTokenRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public CreateActorTokenRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateAllowlistIdentifierRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateAllowlistIdentifierRequestBuilder.java index 53e1e9a0..989f3e14 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateAllowlistIdentifierRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateAllowlistIdentifierRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class CreateAllowlistIdentifierRequestBuilder { - private CreateAllowlistIdentifierRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallCreateAllowlistIdentifier sdk; public CreateAllowlistIdentifierRequestBuilder(SDKMethodInterfaces.MethodCallCreateAllowlistIdentifier sdk) { this.sdk = sdk; } - + public CreateAllowlistIdentifierRequestBuilder request(CreateAllowlistIdentifierRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public CreateAllowlistIdentifierRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateBlocklistIdentifierRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateBlocklistIdentifierRequestBuilder.java index 211d077a..a9ee73eb 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateBlocklistIdentifierRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateBlocklistIdentifierRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class CreateBlocklistIdentifierRequestBuilder { - private CreateBlocklistIdentifierRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallCreateBlocklistIdentifier sdk; public CreateBlocklistIdentifierRequestBuilder(SDKMethodInterfaces.MethodCallCreateBlocklistIdentifier sdk) { this.sdk = sdk; } - + public CreateBlocklistIdentifierRequestBuilder request(CreateBlocklistIdentifierRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public CreateBlocklistIdentifierRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateBulkInvitationsRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateBulkInvitationsRequestBuilder.java new file mode 100644 index 00000000..081791b4 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateBulkInvitationsRequestBuilder.java @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.Utils; +import java.util.List; +import java.util.Optional; + +public class CreateBulkInvitationsRequestBuilder { + + private Optional> request = Optional.empty(); + private final SDKMethodInterfaces.MethodCallCreateBulkInvitations sdk; + + public CreateBulkInvitationsRequestBuilder(SDKMethodInterfaces.MethodCallCreateBulkInvitations sdk) { + this.sdk = sdk; + } + + public CreateBulkInvitationsRequestBuilder request(List request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public CreateBulkInvitationsRequestBuilder request(Optional> request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CreateBulkInvitationsResponse call() throws Exception { + + return sdk.createBulkInvitations( + request); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateBulkInvitationsResponse.java b/src/main/java/com/clerk/backend_api/models/operations/CreateBulkInvitationsResponse.java new file mode 100644 index 00000000..6efb0317 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateBulkInvitationsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + + +import com.clerk.backend_api.models.components.Invitation; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class CreateBulkInvitationsResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * List of invitations + */ + private Optional> invitationList; + + @JsonCreator + public CreateBulkInvitationsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional> invitationList) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(invitationList, "invitationList"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.invitationList = invitationList; + } + + public CreateBulkInvitationsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * List of invitations + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> invitationList() { + return (Optional>) invitationList; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public CreateBulkInvitationsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateBulkInvitationsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateBulkInvitationsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * List of invitations + */ + public CreateBulkInvitationsResponse withInvitationList(List invitationList) { + Utils.checkNotNull(invitationList, "invitationList"); + this.invitationList = Optional.ofNullable(invitationList); + return this; + } + + /** + * List of invitations + */ + public CreateBulkInvitationsResponse withInvitationList(Optional> invitationList) { + Utils.checkNotNull(invitationList, "invitationList"); + this.invitationList = invitationList; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateBulkInvitationsResponse other = (CreateBulkInvitationsResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.invitationList, other.invitationList); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + statusCode, + rawResponse, + invitationList); + } + + @Override + public String toString() { + return Utils.toString(CreateBulkInvitationsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "invitationList", invitationList); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional> invitationList = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * List of invitations + */ + public Builder invitationList(List invitationList) { + Utils.checkNotNull(invitationList, "invitationList"); + this.invitationList = Optional.ofNullable(invitationList); + return this; + } + + /** + * List of invitations + */ + public Builder invitationList(Optional> invitationList) { + Utils.checkNotNull(invitationList, "invitationList"); + this.invitationList = invitationList; + return this; + } + + public CreateBulkInvitationsResponse build() { + return new CreateBulkInvitationsResponse( + contentType, + statusCode, + rawResponse, + invitationList); + } + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateEmailAddressRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateEmailAddressRequestBuilder.java index d04c70af..776a54bc 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateEmailAddressRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateEmailAddressRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class CreateEmailAddressRequestBuilder { - private CreateEmailAddressRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallCreateEmailAddress sdk; public CreateEmailAddressRequestBuilder(SDKMethodInterfaces.MethodCallCreateEmailAddress sdk) { this.sdk = sdk; } - + public CreateEmailAddressRequestBuilder request(CreateEmailAddressRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public CreateEmailAddressRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateInvitationPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/CreateInvitationPublicMetadata.java deleted file mode 100644 index 42fffaa1..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateInvitationPublicMetadata.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * CreateInvitationPublicMetadata - Metadata that will be attached to the newly created invitation. - * The value of this property should be a well-formed JSON object. - * Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. - */ - -public class CreateInvitationPublicMetadata { - - @JsonCreator - public CreateInvitationPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(CreateInvitationPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public CreateInvitationPublicMetadata build() { - return new CreateInvitationPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateInvitationRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateInvitationRequestBody.java index c9e98cc5..8a9cf702 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateInvitationRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateInvitationRequestBody.java @@ -15,9 +15,11 @@ import com.fasterxml.jackson.core.type.TypeReference; import java.lang.Boolean; import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.util.Map; import java.util.Objects; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -41,7 +43,7 @@ public class CreateInvitationRequestBody { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; /** * Optional URL which specifies where to redirect the user once they click the invitation link. @@ -53,7 +55,7 @@ public class CreateInvitationRequestBody { /** * Optional flag which denotes whether an email invitation should be sent to the given email address. - * Defaults to true. + * Defaults to `true`. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("notify") @@ -67,37 +69,48 @@ public class CreateInvitationRequestBody { private JsonNullable ignoreExisting; /** - * The number of days the invitation will be valid for. By default, the invitation does not expire. + * The number of days the invitation will be valid for. By default, the invitation expires after 30 days. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("expires_in_days") private JsonNullable expiresInDays; + /** + * The slug of the email template to use for the invitation email. + * If not provided, the "invitation" template will be used. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("template_slug") + private JsonNullable templateSlug; + @JsonCreator public CreateInvitationRequestBody( @JsonProperty("email_address") String emailAddress, - @JsonProperty("public_metadata") Optional publicMetadata, + @JsonProperty("public_metadata") Optional> publicMetadata, @JsonProperty("redirect_url") Optional redirectUrl, @JsonProperty("notify") JsonNullable notify_, @JsonProperty("ignore_existing") JsonNullable ignoreExisting, - @JsonProperty("expires_in_days") JsonNullable expiresInDays) { + @JsonProperty("expires_in_days") JsonNullable expiresInDays, + @JsonProperty("template_slug") JsonNullable templateSlug) { Utils.checkNotNull(emailAddress, "emailAddress"); Utils.checkNotNull(publicMetadata, "publicMetadata"); Utils.checkNotNull(redirectUrl, "redirectUrl"); Utils.checkNotNull(notify_, "notify_"); Utils.checkNotNull(ignoreExisting, "ignoreExisting"); Utils.checkNotNull(expiresInDays, "expiresInDays"); + Utils.checkNotNull(templateSlug, "templateSlug"); this.emailAddress = emailAddress; this.publicMetadata = publicMetadata; this.redirectUrl = redirectUrl; this.notify_ = notify_; this.ignoreExisting = ignoreExisting; this.expiresInDays = expiresInDays; + this.templateSlug = templateSlug; } public CreateInvitationRequestBody( String emailAddress) { - this(emailAddress, Optional.empty(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); + this(emailAddress, Optional.empty(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); } /** @@ -115,8 +128,8 @@ public String emailAddress() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } /** @@ -130,7 +143,7 @@ public Optional redirectUrl() { /** * Optional flag which denotes whether an email invitation should be sent to the given email address. - * Defaults to true. + * Defaults to `true`. */ @JsonIgnore public JsonNullable notify_() { @@ -146,13 +159,23 @@ public JsonNullable ignoreExisting() { } /** - * The number of days the invitation will be valid for. By default, the invitation does not expire. + * The number of days the invitation will be valid for. By default, the invitation expires after 30 days. */ @JsonIgnore public JsonNullable expiresInDays() { return expiresInDays; } + /** + * The slug of the email template to use for the invitation email. + * If not provided, the "invitation" template will be used. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable templateSlug() { + return (JsonNullable) templateSlug; + } + public final static Builder builder() { return new Builder(); } @@ -171,7 +194,7 @@ public CreateInvitationRequestBody withEmailAddress(String emailAddress) { * The value of this property should be a well-formed JSON object. * Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. */ - public CreateInvitationRequestBody withPublicMetadata(CreateInvitationPublicMetadata publicMetadata) { + public CreateInvitationRequestBody withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -182,7 +205,7 @@ public CreateInvitationRequestBody withPublicMetadata(CreateInvitationPublicMeta * The value of this property should be a well-formed JSON object. * Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. */ - public CreateInvitationRequestBody withPublicMetadata(Optional publicMetadata) { + public CreateInvitationRequestBody withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -210,7 +233,7 @@ public CreateInvitationRequestBody withRedirectUrl(Optional redirectUrl) /** * Optional flag which denotes whether an email invitation should be sent to the given email address. - * Defaults to true. + * Defaults to `true`. */ public CreateInvitationRequestBody withNotify(boolean notify_) { Utils.checkNotNull(notify_, "notify_"); @@ -220,7 +243,7 @@ public CreateInvitationRequestBody withNotify(boolean notify_) { /** * Optional flag which denotes whether an email invitation should be sent to the given email address. - * Defaults to true. + * Defaults to `true`. */ public CreateInvitationRequestBody withNotify(JsonNullable notify_) { Utils.checkNotNull(notify_, "notify_"); @@ -247,7 +270,7 @@ public CreateInvitationRequestBody withIgnoreExisting(JsonNullable igno } /** - * The number of days the invitation will be valid for. By default, the invitation does not expire. + * The number of days the invitation will be valid for. By default, the invitation expires after 30 days. */ public CreateInvitationRequestBody withExpiresInDays(long expiresInDays) { Utils.checkNotNull(expiresInDays, "expiresInDays"); @@ -256,13 +279,33 @@ public CreateInvitationRequestBody withExpiresInDays(long expiresInDays) { } /** - * The number of days the invitation will be valid for. By default, the invitation does not expire. + * The number of days the invitation will be valid for. By default, the invitation expires after 30 days. */ public CreateInvitationRequestBody withExpiresInDays(JsonNullable expiresInDays) { Utils.checkNotNull(expiresInDays, "expiresInDays"); this.expiresInDays = expiresInDays; return this; } + + /** + * The slug of the email template to use for the invitation email. + * If not provided, the "invitation" template will be used. + */ + public CreateInvitationRequestBody withTemplateSlug(TemplateSlug templateSlug) { + Utils.checkNotNull(templateSlug, "templateSlug"); + this.templateSlug = JsonNullable.of(templateSlug); + return this; + } + + /** + * The slug of the email template to use for the invitation email. + * If not provided, the "invitation" template will be used. + */ + public CreateInvitationRequestBody withTemplateSlug(JsonNullable templateSlug) { + Utils.checkNotNull(templateSlug, "templateSlug"); + this.templateSlug = templateSlug; + return this; + } @Override public boolean equals(java.lang.Object o) { @@ -279,7 +322,8 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.redirectUrl, other.redirectUrl) && Objects.deepEquals(this.notify_, other.notify_) && Objects.deepEquals(this.ignoreExisting, other.ignoreExisting) && - Objects.deepEquals(this.expiresInDays, other.expiresInDays); + Objects.deepEquals(this.expiresInDays, other.expiresInDays) && + Objects.deepEquals(this.templateSlug, other.templateSlug); } @Override @@ -290,7 +334,8 @@ public int hashCode() { redirectUrl, notify_, ignoreExisting, - expiresInDays); + expiresInDays, + templateSlug); } @Override @@ -301,14 +346,15 @@ public String toString() { "redirectUrl", redirectUrl, "notify_", notify_, "ignoreExisting", ignoreExisting, - "expiresInDays", expiresInDays); + "expiresInDays", expiresInDays, + "templateSlug", templateSlug); } public final static class Builder { private String emailAddress; - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); private Optional redirectUrl = Optional.empty(); @@ -316,7 +362,9 @@ public final static class Builder { private JsonNullable ignoreExisting; - private JsonNullable expiresInDays = JsonNullable.undefined(); + private JsonNullable expiresInDays = JsonNullable.undefined(); + + private JsonNullable templateSlug = JsonNullable.undefined(); private Builder() { // force use of static builder() method @@ -336,7 +384,7 @@ public Builder emailAddress(String emailAddress) { * The value of this property should be a well-formed JSON object. * Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. */ - public Builder publicMetadata(CreateInvitationPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -347,7 +395,7 @@ public Builder publicMetadata(CreateInvitationPublicMetadata publicMetadata) { * The value of this property should be a well-formed JSON object. * Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. */ - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -375,7 +423,7 @@ public Builder redirectUrl(Optional redirectUrl) { /** * Optional flag which denotes whether an email invitation should be sent to the given email address. - * Defaults to true. + * Defaults to `true`. */ public Builder notify_(boolean notify_) { Utils.checkNotNull(notify_, "notify_"); @@ -385,7 +433,7 @@ public Builder notify_(boolean notify_) { /** * Optional flag which denotes whether an email invitation should be sent to the given email address. - * Defaults to true. + * Defaults to `true`. */ public Builder notify_(JsonNullable notify_) { Utils.checkNotNull(notify_, "notify_"); @@ -412,7 +460,7 @@ public Builder ignoreExisting(JsonNullable ignoreExisting) { } /** - * The number of days the invitation will be valid for. By default, the invitation does not expire. + * The number of days the invitation will be valid for. By default, the invitation expires after 30 days. */ public Builder expiresInDays(long expiresInDays) { Utils.checkNotNull(expiresInDays, "expiresInDays"); @@ -421,13 +469,33 @@ public Builder expiresInDays(long expiresInDays) { } /** - * The number of days the invitation will be valid for. By default, the invitation does not expire. + * The number of days the invitation will be valid for. By default, the invitation expires after 30 days. */ public Builder expiresInDays(JsonNullable expiresInDays) { Utils.checkNotNull(expiresInDays, "expiresInDays"); this.expiresInDays = expiresInDays; return this; } + + /** + * The slug of the email template to use for the invitation email. + * If not provided, the "invitation" template will be used. + */ + public Builder templateSlug(TemplateSlug templateSlug) { + Utils.checkNotNull(templateSlug, "templateSlug"); + this.templateSlug = JsonNullable.of(templateSlug); + return this; + } + + /** + * The slug of the email template to use for the invitation email. + * If not provided, the "invitation" template will be used. + */ + public Builder templateSlug(JsonNullable templateSlug) { + Utils.checkNotNull(templateSlug, "templateSlug"); + this.templateSlug = templateSlug; + return this; + } public CreateInvitationRequestBody build() { if (notify_ == null) { @@ -441,7 +509,8 @@ public CreateInvitationRequestBody build() { redirectUrl, notify_, ignoreExisting, - expiresInDays); + expiresInDays, + templateSlug); } private static final LazySingletonValue> _SINGLETON_VALUE_Notify = diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateInvitationRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateInvitationRequestBuilder.java index 54a02381..4a15b12e 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateInvitationRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateInvitationRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class CreateInvitationRequestBuilder { - private CreateInvitationRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallCreateInvitation sdk; public CreateInvitationRequestBuilder(SDKMethodInterfaces.MethodCallCreateInvitation sdk) { this.sdk = sdk; } - + public CreateInvitationRequestBuilder request(CreateInvitationRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public CreateInvitationRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateJWTTemplateRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateJWTTemplateRequestBuilder.java index bc54e134..97d43c09 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateJWTTemplateRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateJWTTemplateRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class CreateJWTTemplateRequestBuilder { - private CreateJWTTemplateRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallCreateJWTTemplate sdk; public CreateJWTTemplateRequestBuilder(SDKMethodInterfaces.MethodCallCreateJWTTemplate sdk) { this.sdk = sdk; } - + public CreateJWTTemplateRequestBuilder request(CreateJWTTemplateRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public CreateJWTTemplateRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateOAuthApplicationRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateOAuthApplicationRequestBody.java index 1dc244b7..cf8c14d7 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateOAuthApplicationRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateOAuthApplicationRequestBody.java @@ -14,10 +14,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.type.TypeReference; import java.lang.Boolean; +import java.lang.Deprecated; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; import java.util.Objects; -import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; public class CreateOAuthApplicationRequestBody { @@ -28,48 +31,58 @@ public class CreateOAuthApplicationRequestBody { @JsonProperty("name") private String name; + /** + * An array of redirect URIs of the new OAuth application + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("redirect_uris") + private JsonNullable> redirectUris; + /** * The callback URL of the new OAuth application + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("callback_url") - private String callbackUrl; + @Deprecated + private JsonNullable callbackUrl; /** * Define the allowed scopes for the new OAuth applications that dictate the user payload of the OAuth user info endpoint. Available scopes are `profile`, `email`, `public_metadata`, `private_metadata`. Provide the requested scopes as a string, separated by spaces. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("scopes") - private Optional scopes; + private JsonNullable scopes; /** - * If true, this client is public and cannot securely store a client secret. - * Only the authorization code flow with proof key for code exchange (PKCE) may be used. - * Public clients cannot be updated to be confidential clients, and vice versa. + * If true, this client is public and you can use the Proof Key of Code Exchange (PKCE) flow. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("public") - private Optional public_; + private JsonNullable public_; @JsonCreator public CreateOAuthApplicationRequestBody( @JsonProperty("name") String name, - @JsonProperty("callback_url") String callbackUrl, - @JsonProperty("scopes") Optional scopes, - @JsonProperty("public") Optional public_) { + @JsonProperty("redirect_uris") JsonNullable> redirectUris, + @JsonProperty("callback_url") JsonNullable callbackUrl, + @JsonProperty("scopes") JsonNullable scopes, + @JsonProperty("public") JsonNullable public_) { Utils.checkNotNull(name, "name"); + Utils.checkNotNull(redirectUris, "redirectUris"); Utils.checkNotNull(callbackUrl, "callbackUrl"); Utils.checkNotNull(scopes, "scopes"); Utils.checkNotNull(public_, "public_"); this.name = name; + this.redirectUris = redirectUris; this.callbackUrl = callbackUrl; this.scopes = scopes; this.public_ = public_; } public CreateOAuthApplicationRequestBody( - String name, - String callbackUrl) { - this(name, callbackUrl, Optional.empty(), Optional.empty()); + String name) { + this(name, JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); } /** @@ -80,11 +93,22 @@ public String name() { return name; } + /** + * An array of redirect URIs of the new OAuth application + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> redirectUris() { + return (JsonNullable>) redirectUris; + } + /** * The callback URL of the new OAuth application + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated @JsonIgnore - public String callbackUrl() { + public JsonNullable callbackUrl() { return callbackUrl; } @@ -92,17 +116,15 @@ public String callbackUrl() { * Define the allowed scopes for the new OAuth applications that dictate the user payload of the OAuth user info endpoint. Available scopes are `profile`, `email`, `public_metadata`, `private_metadata`. Provide the requested scopes as a string, separated by spaces. */ @JsonIgnore - public Optional scopes() { + public JsonNullable scopes() { return scopes; } /** - * If true, this client is public and cannot securely store a client secret. - * Only the authorization code flow with proof key for code exchange (PKCE) may be used. - * Public clients cannot be updated to be confidential clients, and vice versa. + * If true, this client is public and you can use the Proof Key of Code Exchange (PKCE) flow. */ @JsonIgnore - public Optional public_() { + public JsonNullable public_() { return public_; } @@ -119,10 +141,41 @@ public CreateOAuthApplicationRequestBody withName(String name) { return this; } + /** + * An array of redirect URIs of the new OAuth application + */ + public CreateOAuthApplicationRequestBody withRedirectUris(List redirectUris) { + Utils.checkNotNull(redirectUris, "redirectUris"); + this.redirectUris = JsonNullable.of(redirectUris); + return this; + } + + /** + * An array of redirect URIs of the new OAuth application + */ + public CreateOAuthApplicationRequestBody withRedirectUris(JsonNullable> redirectUris) { + Utils.checkNotNull(redirectUris, "redirectUris"); + this.redirectUris = redirectUris; + return this; + } + /** * The callback URL of the new OAuth application + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public CreateOAuthApplicationRequestBody withCallbackUrl(String callbackUrl) { + Utils.checkNotNull(callbackUrl, "callbackUrl"); + this.callbackUrl = JsonNullable.of(callbackUrl); + return this; + } + + /** + * The callback URL of the new OAuth application + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public CreateOAuthApplicationRequestBody withCallbackUrl(JsonNullable callbackUrl) { Utils.checkNotNull(callbackUrl, "callbackUrl"); this.callbackUrl = callbackUrl; return this; @@ -133,36 +186,32 @@ public CreateOAuthApplicationRequestBody withCallbackUrl(String callbackUrl) { */ public CreateOAuthApplicationRequestBody withScopes(String scopes) { Utils.checkNotNull(scopes, "scopes"); - this.scopes = Optional.ofNullable(scopes); + this.scopes = JsonNullable.of(scopes); return this; } /** * Define the allowed scopes for the new OAuth applications that dictate the user payload of the OAuth user info endpoint. Available scopes are `profile`, `email`, `public_metadata`, `private_metadata`. Provide the requested scopes as a string, separated by spaces. */ - public CreateOAuthApplicationRequestBody withScopes(Optional scopes) { + public CreateOAuthApplicationRequestBody withScopes(JsonNullable scopes) { Utils.checkNotNull(scopes, "scopes"); this.scopes = scopes; return this; } /** - * If true, this client is public and cannot securely store a client secret. - * Only the authorization code flow with proof key for code exchange (PKCE) may be used. - * Public clients cannot be updated to be confidential clients, and vice versa. + * If true, this client is public and you can use the Proof Key of Code Exchange (PKCE) flow. */ public CreateOAuthApplicationRequestBody withPublic(boolean public_) { Utils.checkNotNull(public_, "public_"); - this.public_ = Optional.ofNullable(public_); + this.public_ = JsonNullable.of(public_); return this; } /** - * If true, this client is public and cannot securely store a client secret. - * Only the authorization code flow with proof key for code exchange (PKCE) may be used. - * Public clients cannot be updated to be confidential clients, and vice versa. + * If true, this client is public and you can use the Proof Key of Code Exchange (PKCE) flow. */ - public CreateOAuthApplicationRequestBody withPublic(Optional public_) { + public CreateOAuthApplicationRequestBody withPublic(JsonNullable public_) { Utils.checkNotNull(public_, "public_"); this.public_ = public_; return this; @@ -179,6 +228,7 @@ public boolean equals(java.lang.Object o) { CreateOAuthApplicationRequestBody other = (CreateOAuthApplicationRequestBody) o; return Objects.deepEquals(this.name, other.name) && + Objects.deepEquals(this.redirectUris, other.redirectUris) && Objects.deepEquals(this.callbackUrl, other.callbackUrl) && Objects.deepEquals(this.scopes, other.scopes) && Objects.deepEquals(this.public_, other.public_); @@ -188,6 +238,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Objects.hash( name, + redirectUris, callbackUrl, scopes, public_); @@ -197,6 +248,7 @@ public int hashCode() { public String toString() { return Utils.toString(CreateOAuthApplicationRequestBody.class, "name", name, + "redirectUris", redirectUris, "callbackUrl", callbackUrl, "scopes", scopes, "public_", public_); @@ -206,11 +258,14 @@ public final static class Builder { private String name; - private String callbackUrl; + private JsonNullable> redirectUris = JsonNullable.undefined(); + + @Deprecated + private JsonNullable callbackUrl = JsonNullable.undefined(); - private Optional scopes; + private JsonNullable scopes; - private Optional public_ = Optional.empty(); + private JsonNullable public_ = JsonNullable.undefined(); private Builder() { // force use of static builder() method @@ -225,10 +280,41 @@ public Builder name(String name) { return this; } + /** + * An array of redirect URIs of the new OAuth application + */ + public Builder redirectUris(List redirectUris) { + Utils.checkNotNull(redirectUris, "redirectUris"); + this.redirectUris = JsonNullable.of(redirectUris); + return this; + } + + /** + * An array of redirect URIs of the new OAuth application + */ + public Builder redirectUris(JsonNullable> redirectUris) { + Utils.checkNotNull(redirectUris, "redirectUris"); + this.redirectUris = redirectUris; + return this; + } + /** * The callback URL of the new OAuth application + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public Builder callbackUrl(String callbackUrl) { + Utils.checkNotNull(callbackUrl, "callbackUrl"); + this.callbackUrl = JsonNullable.of(callbackUrl); + return this; + } + + /** + * The callback URL of the new OAuth application + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public Builder callbackUrl(JsonNullable callbackUrl) { Utils.checkNotNull(callbackUrl, "callbackUrl"); this.callbackUrl = callbackUrl; return this; @@ -239,36 +325,32 @@ public Builder callbackUrl(String callbackUrl) { */ public Builder scopes(String scopes) { Utils.checkNotNull(scopes, "scopes"); - this.scopes = Optional.ofNullable(scopes); + this.scopes = JsonNullable.of(scopes); return this; } /** * Define the allowed scopes for the new OAuth applications that dictate the user payload of the OAuth user info endpoint. Available scopes are `profile`, `email`, `public_metadata`, `private_metadata`. Provide the requested scopes as a string, separated by spaces. */ - public Builder scopes(Optional scopes) { + public Builder scopes(JsonNullable scopes) { Utils.checkNotNull(scopes, "scopes"); this.scopes = scopes; return this; } /** - * If true, this client is public and cannot securely store a client secret. - * Only the authorization code flow with proof key for code exchange (PKCE) may be used. - * Public clients cannot be updated to be confidential clients, and vice versa. + * If true, this client is public and you can use the Proof Key of Code Exchange (PKCE) flow. */ public Builder public_(boolean public_) { Utils.checkNotNull(public_, "public_"); - this.public_ = Optional.ofNullable(public_); + this.public_ = JsonNullable.of(public_); return this; } /** - * If true, this client is public and cannot securely store a client secret. - * Only the authorization code flow with proof key for code exchange (PKCE) may be used. - * Public clients cannot be updated to be confidential clients, and vice versa. + * If true, this client is public and you can use the Proof Key of Code Exchange (PKCE) flow. */ - public Builder public_(Optional public_) { + public Builder public_(JsonNullable public_) { Utils.checkNotNull(public_, "public_"); this.public_ = public_; return this; @@ -279,16 +361,17 @@ public CreateOAuthApplicationRequestBody build() { scopes = _SINGLETON_VALUE_Scopes.value(); } return new CreateOAuthApplicationRequestBody( name, + redirectUris, callbackUrl, scopes, public_); } - private static final LazySingletonValue> _SINGLETON_VALUE_Scopes = + private static final LazySingletonValue> _SINGLETON_VALUE_Scopes = new LazySingletonValue<>( "scopes", "\"profile email\"", - new TypeReference>() {}); + new TypeReference>() {}); } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateOAuthApplicationRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateOAuthApplicationRequestBuilder.java index c2db3892..b280625b 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateOAuthApplicationRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateOAuthApplicationRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class CreateOAuthApplicationRequestBuilder { - private CreateOAuthApplicationRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallCreateOAuthApplication sdk; public CreateOAuthApplicationRequestBuilder(SDKMethodInterfaces.MethodCallCreateOAuthApplication sdk) { this.sdk = sdk; } - + public CreateOAuthApplicationRequestBuilder request(CreateOAuthApplicationRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public CreateOAuthApplicationRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkPrivateMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkPrivateMetadata.java deleted file mode 100644 index f403d398..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkPrivateMetadata.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * CreateOrganizationInvitationBulkPrivateMetadata - Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. - */ - -public class CreateOrganizationInvitationBulkPrivateMetadata { - - @JsonCreator - public CreateOrganizationInvitationBulkPrivateMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(CreateOrganizationInvitationBulkPrivateMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public CreateOrganizationInvitationBulkPrivateMetadata build() { - return new CreateOrganizationInvitationBulkPrivateMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkPublicMetadata.java deleted file mode 100644 index a3a5f150..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkPublicMetadata.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * CreateOrganizationInvitationBulkPublicMetadata - Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. - */ - -public class CreateOrganizationInvitationBulkPublicMetadata { - - @JsonCreator - public CreateOrganizationInvitationBulkPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(CreateOrganizationInvitationBulkPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public CreateOrganizationInvitationBulkPublicMetadata build() { - return new CreateOrganizationInvitationBulkPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkRequest.java b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkRequest.java index 6a271dc6..531c89b8 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkRequest.java @@ -24,12 +24,12 @@ public class CreateOrganizationInvitationBulkRequest { private String organizationId; @SpeakeasyMetadata("request:mediaType=application/json") - private List requestBody; + private List requestBody; @JsonCreator public CreateOrganizationInvitationBulkRequest( String organizationId, - List requestBody) { + List requestBody) { Utils.checkNotNull(organizationId, "organizationId"); Utils.checkNotNull(requestBody, "requestBody"); this.organizationId = organizationId; @@ -45,7 +45,7 @@ public String organizationId() { } @JsonIgnore - public List requestBody() { + public List requestBody() { return requestBody; } @@ -62,7 +62,7 @@ public CreateOrganizationInvitationBulkRequest withOrganizationId(String organiz return this; } - public CreateOrganizationInvitationBulkRequest withRequestBody(List requestBody) { + public CreateOrganizationInvitationBulkRequest withRequestBody(List requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; @@ -100,7 +100,7 @@ public final static class Builder { private String organizationId; - private List requestBody; + private List requestBody; private Builder() { // force use of static builder() method @@ -115,7 +115,7 @@ public Builder organizationId(String organizationId) { return this; } - public Builder requestBody(List requestBody) { + public Builder requestBody(List requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkRequestBody.java new file mode 100644 index 00000000..4c2fcbb2 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkRequestBody.java @@ -0,0 +1,415 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class CreateOrganizationInvitationBulkRequestBody { + + /** + * The email address of the new member that is going to be invited to the organization + */ + @JsonProperty("email_address") + private String emailAddress; + + /** + * The ID of the user that invites the new member to the organization. + * Must be an administrator in the organization. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("inviter_user_id") + private JsonNullable inviterUserId; + + /** + * The role of the new member in the organization. + */ + @JsonProperty("role") + private String role; + + /** + * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("public_metadata") + private Optional> publicMetadata; + + /** + * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("private_metadata") + private Optional> privateMetadata; + + /** + * Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("redirect_url") + private Optional redirectUrl; + + @JsonCreator + public CreateOrganizationInvitationBulkRequestBody( + @JsonProperty("email_address") String emailAddress, + @JsonProperty("inviter_user_id") JsonNullable inviterUserId, + @JsonProperty("role") String role, + @JsonProperty("public_metadata") Optional> publicMetadata, + @JsonProperty("private_metadata") Optional> privateMetadata, + @JsonProperty("redirect_url") Optional redirectUrl) { + Utils.checkNotNull(emailAddress, "emailAddress"); + Utils.checkNotNull(inviterUserId, "inviterUserId"); + Utils.checkNotNull(role, "role"); + Utils.checkNotNull(publicMetadata, "publicMetadata"); + Utils.checkNotNull(privateMetadata, "privateMetadata"); + Utils.checkNotNull(redirectUrl, "redirectUrl"); + this.emailAddress = emailAddress; + this.inviterUserId = inviterUserId; + this.role = role; + this.publicMetadata = publicMetadata; + this.privateMetadata = privateMetadata; + this.redirectUrl = redirectUrl; + } + + public CreateOrganizationInvitationBulkRequestBody( + String emailAddress, + String role) { + this(emailAddress, JsonNullable.undefined(), role, Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * The email address of the new member that is going to be invited to the organization + */ + @JsonIgnore + public String emailAddress() { + return emailAddress; + } + + /** + * The ID of the user that invites the new member to the organization. + * Must be an administrator in the organization. + */ + @JsonIgnore + public JsonNullable inviterUserId() { + return inviterUserId; + } + + /** + * The role of the new member in the organization. + */ + @JsonIgnore + public String role() { + return role; + } + + /** + * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> publicMetadata() { + return (Optional>) publicMetadata; + } + + /** + * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> privateMetadata() { + return (Optional>) privateMetadata; + } + + /** + * Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. + */ + @JsonIgnore + public Optional redirectUrl() { + return redirectUrl; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The email address of the new member that is going to be invited to the organization + */ + public CreateOrganizationInvitationBulkRequestBody withEmailAddress(String emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = emailAddress; + return this; + } + + /** + * The ID of the user that invites the new member to the organization. + * Must be an administrator in the organization. + */ + public CreateOrganizationInvitationBulkRequestBody withInviterUserId(String inviterUserId) { + Utils.checkNotNull(inviterUserId, "inviterUserId"); + this.inviterUserId = JsonNullable.of(inviterUserId); + return this; + } + + /** + * The ID of the user that invites the new member to the organization. + * Must be an administrator in the organization. + */ + public CreateOrganizationInvitationBulkRequestBody withInviterUserId(JsonNullable inviterUserId) { + Utils.checkNotNull(inviterUserId, "inviterUserId"); + this.inviterUserId = inviterUserId; + return this; + } + + /** + * The role of the new member in the organization. + */ + public CreateOrganizationInvitationBulkRequestBody withRole(String role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + /** + * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. + */ + public CreateOrganizationInvitationBulkRequestBody withPublicMetadata(Map publicMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + this.publicMetadata = Optional.ofNullable(publicMetadata); + return this; + } + + /** + * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. + */ + public CreateOrganizationInvitationBulkRequestBody withPublicMetadata(Optional> publicMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + this.publicMetadata = publicMetadata; + return this; + } + + /** + * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. + */ + public CreateOrganizationInvitationBulkRequestBody withPrivateMetadata(Map privateMetadata) { + Utils.checkNotNull(privateMetadata, "privateMetadata"); + this.privateMetadata = Optional.ofNullable(privateMetadata); + return this; + } + + /** + * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. + */ + public CreateOrganizationInvitationBulkRequestBody withPrivateMetadata(Optional> privateMetadata) { + Utils.checkNotNull(privateMetadata, "privateMetadata"); + this.privateMetadata = privateMetadata; + return this; + } + + /** + * Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. + */ + public CreateOrganizationInvitationBulkRequestBody withRedirectUrl(String redirectUrl) { + Utils.checkNotNull(redirectUrl, "redirectUrl"); + this.redirectUrl = Optional.ofNullable(redirectUrl); + return this; + } + + /** + * Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. + */ + public CreateOrganizationInvitationBulkRequestBody withRedirectUrl(Optional redirectUrl) { + Utils.checkNotNull(redirectUrl, "redirectUrl"); + this.redirectUrl = redirectUrl; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateOrganizationInvitationBulkRequestBody other = (CreateOrganizationInvitationBulkRequestBody) o; + return + Objects.deepEquals(this.emailAddress, other.emailAddress) && + Objects.deepEquals(this.inviterUserId, other.inviterUserId) && + Objects.deepEquals(this.role, other.role) && + Objects.deepEquals(this.publicMetadata, other.publicMetadata) && + Objects.deepEquals(this.privateMetadata, other.privateMetadata) && + Objects.deepEquals(this.redirectUrl, other.redirectUrl); + } + + @Override + public int hashCode() { + return Objects.hash( + emailAddress, + inviterUserId, + role, + publicMetadata, + privateMetadata, + redirectUrl); + } + + @Override + public String toString() { + return Utils.toString(CreateOrganizationInvitationBulkRequestBody.class, + "emailAddress", emailAddress, + "inviterUserId", inviterUserId, + "role", role, + "publicMetadata", publicMetadata, + "privateMetadata", privateMetadata, + "redirectUrl", redirectUrl); + } + + public final static class Builder { + + private String emailAddress; + + private JsonNullable inviterUserId = JsonNullable.undefined(); + + private String role; + + private Optional> publicMetadata = Optional.empty(); + + private Optional> privateMetadata = Optional.empty(); + + private Optional redirectUrl = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The email address of the new member that is going to be invited to the organization + */ + public Builder emailAddress(String emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = emailAddress; + return this; + } + + /** + * The ID of the user that invites the new member to the organization. + * Must be an administrator in the organization. + */ + public Builder inviterUserId(String inviterUserId) { + Utils.checkNotNull(inviterUserId, "inviterUserId"); + this.inviterUserId = JsonNullable.of(inviterUserId); + return this; + } + + /** + * The ID of the user that invites the new member to the organization. + * Must be an administrator in the organization. + */ + public Builder inviterUserId(JsonNullable inviterUserId) { + Utils.checkNotNull(inviterUserId, "inviterUserId"); + this.inviterUserId = inviterUserId; + return this; + } + + /** + * The role of the new member in the organization. + */ + public Builder role(String role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + /** + * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. + */ + public Builder publicMetadata(Map publicMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + this.publicMetadata = Optional.ofNullable(publicMetadata); + return this; + } + + /** + * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. + */ + public Builder publicMetadata(Optional> publicMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + this.publicMetadata = publicMetadata; + return this; + } + + /** + * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. + */ + public Builder privateMetadata(Map privateMetadata) { + Utils.checkNotNull(privateMetadata, "privateMetadata"); + this.privateMetadata = Optional.ofNullable(privateMetadata); + return this; + } + + /** + * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. + */ + public Builder privateMetadata(Optional> privateMetadata) { + Utils.checkNotNull(privateMetadata, "privateMetadata"); + this.privateMetadata = privateMetadata; + return this; + } + + /** + * Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. + */ + public Builder redirectUrl(String redirectUrl) { + Utils.checkNotNull(redirectUrl, "redirectUrl"); + this.redirectUrl = Optional.ofNullable(redirectUrl); + return this; + } + + /** + * Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. + */ + public Builder redirectUrl(Optional redirectUrl) { + Utils.checkNotNull(redirectUrl, "redirectUrl"); + this.redirectUrl = redirectUrl; + return this; + } + + public CreateOrganizationInvitationBulkRequestBody build() { + return new CreateOrganizationInvitationBulkRequestBody( + emailAddress, + inviterUserId, + role, + publicMetadata, + privateMetadata, + redirectUrl); + } + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkRequestBuilder.java index 0bce9b94..acd86f2a 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationBulkRequestBuilder.java @@ -11,7 +11,7 @@ public class CreateOrganizationInvitationBulkRequestBuilder { private String organizationId; - private List requestBody; + private List requestBody; private final SDKMethodInterfaces.MethodCallCreateOrganizationInvitationBulk sdk; public CreateOrganizationInvitationBulkRequestBuilder(SDKMethodInterfaces.MethodCallCreateOrganizationInvitationBulk sdk) { @@ -24,7 +24,7 @@ public CreateOrganizationInvitationBulkRequestBuilder organizationId(String orga return this; } - public CreateOrganizationInvitationBulkRequestBuilder requestBody(List requestBody) { + public CreateOrganizationInvitationBulkRequestBuilder requestBody(List requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationPrivateMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationPrivateMetadata.java deleted file mode 100644 index 8b7ead31..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationPrivateMetadata.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * CreateOrganizationInvitationPrivateMetadata - Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. - */ - -public class CreateOrganizationInvitationPrivateMetadata { - - @JsonCreator - public CreateOrganizationInvitationPrivateMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(CreateOrganizationInvitationPrivateMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public CreateOrganizationInvitationPrivateMetadata build() { - return new CreateOrganizationInvitationPrivateMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationPublicMetadata.java deleted file mode 100644 index ccffe357..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationPublicMetadata.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * CreateOrganizationInvitationPublicMetadata - Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. - */ - -public class CreateOrganizationInvitationPublicMetadata { - - @JsonCreator - public CreateOrganizationInvitationPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(CreateOrganizationInvitationPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public CreateOrganizationInvitationPublicMetadata build() { - return new CreateOrganizationInvitationPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationRequest.java b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationRequest.java index 4b579e86..bbbb6d5e 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationRequest.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Objects; +import java.util.Optional; public class CreateOrganizationInvitationRequest { @@ -23,17 +25,22 @@ public class CreateOrganizationInvitationRequest { private String organizationId; @SpeakeasyMetadata("request:mediaType=application/json") - private CreateOrganizationInvitationRequestBody requestBody; + private Optional requestBody; @JsonCreator public CreateOrganizationInvitationRequest( String organizationId, - CreateOrganizationInvitationRequestBody requestBody) { + Optional requestBody) { Utils.checkNotNull(organizationId, "organizationId"); Utils.checkNotNull(requestBody, "requestBody"); this.organizationId = organizationId; this.requestBody = requestBody; } + + public CreateOrganizationInvitationRequest( + String organizationId) { + this(organizationId, Optional.empty()); + } /** * The ID of the organization for which to send the invitation @@ -43,9 +50,10 @@ public String organizationId() { return organizationId; } + @SuppressWarnings("unchecked") @JsonIgnore - public CreateOrganizationInvitationRequestBody requestBody() { - return requestBody; + public Optional requestBody() { + return (Optional) requestBody; } public final static Builder builder() { @@ -62,6 +70,12 @@ public CreateOrganizationInvitationRequest withOrganizationId(String organizatio } public CreateOrganizationInvitationRequest withRequestBody(CreateOrganizationInvitationRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public CreateOrganizationInvitationRequest withRequestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; @@ -99,7 +113,7 @@ public final static class Builder { private String organizationId; - private CreateOrganizationInvitationRequestBody requestBody; + private Optional requestBody = Optional.empty(); private Builder() { // force use of static builder() method @@ -115,6 +129,12 @@ public Builder organizationId(String organizationId) { } public Builder requestBody(CreateOrganizationInvitationRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public Builder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationRequestBody.java index 5a912976..42c7c12f 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationRequestBody.java @@ -11,9 +11,12 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.util.Map; import java.util.Objects; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -43,17 +46,19 @@ public class CreateOrganizationInvitationRequestBody { /** * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; /** * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("private_metadata") - private Optional privateMetadata; + private Optional> privateMetadata; /** * Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. @@ -62,32 +67,42 @@ public class CreateOrganizationInvitationRequestBody { @JsonProperty("redirect_url") private Optional redirectUrl; + /** + * The number of days the invitation will be valid for. By default, the invitation has a 30 days expire. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("expires_in_days") + private JsonNullable expiresInDays; + @JsonCreator public CreateOrganizationInvitationRequestBody( @JsonProperty("email_address") String emailAddress, @JsonProperty("inviter_user_id") JsonNullable inviterUserId, @JsonProperty("role") String role, - @JsonProperty("public_metadata") Optional publicMetadata, - @JsonProperty("private_metadata") Optional privateMetadata, - @JsonProperty("redirect_url") Optional redirectUrl) { + @JsonProperty("public_metadata") Optional> publicMetadata, + @JsonProperty("private_metadata") Optional> privateMetadata, + @JsonProperty("redirect_url") Optional redirectUrl, + @JsonProperty("expires_in_days") JsonNullable expiresInDays) { Utils.checkNotNull(emailAddress, "emailAddress"); Utils.checkNotNull(inviterUserId, "inviterUserId"); Utils.checkNotNull(role, "role"); Utils.checkNotNull(publicMetadata, "publicMetadata"); Utils.checkNotNull(privateMetadata, "privateMetadata"); Utils.checkNotNull(redirectUrl, "redirectUrl"); + Utils.checkNotNull(expiresInDays, "expiresInDays"); this.emailAddress = emailAddress; this.inviterUserId = inviterUserId; this.role = role; this.publicMetadata = publicMetadata; this.privateMetadata = privateMetadata; this.redirectUrl = redirectUrl; + this.expiresInDays = expiresInDays; } public CreateOrganizationInvitationRequestBody( String emailAddress, String role) { - this(emailAddress, JsonNullable.undefined(), role, Optional.empty(), Optional.empty(), Optional.empty()); + this(emailAddress, JsonNullable.undefined(), role, Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined()); } /** @@ -117,20 +132,22 @@ public String role() { /** * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } /** * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional privateMetadata() { - return (Optional) privateMetadata; + public Optional> privateMetadata() { + return (Optional>) privateMetadata; } /** @@ -141,6 +158,14 @@ public Optional redirectUrl() { return redirectUrl; } + /** + * The number of days the invitation will be valid for. By default, the invitation has a 30 days expire. + */ + @JsonIgnore + public JsonNullable expiresInDays() { + return expiresInDays; + } + public final static Builder builder() { return new Builder(); } @@ -185,8 +210,9 @@ public CreateOrganizationInvitationRequestBody withRole(String role) { /** * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. */ - public CreateOrganizationInvitationRequestBody withPublicMetadata(CreateOrganizationInvitationPublicMetadata publicMetadata) { + public CreateOrganizationInvitationRequestBody withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -194,8 +220,9 @@ public CreateOrganizationInvitationRequestBody withPublicMetadata(CreateOrganiza /** * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. */ - public CreateOrganizationInvitationRequestBody withPublicMetadata(Optional publicMetadata) { + public CreateOrganizationInvitationRequestBody withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -203,8 +230,9 @@ public CreateOrganizationInvitationRequestBody withPublicMetadata(Optional privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; @@ -212,8 +240,9 @@ public CreateOrganizationInvitationRequestBody withPrivateMetadata(CreateOrganiz /** * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. */ - public CreateOrganizationInvitationRequestBody withPrivateMetadata(Optional privateMetadata) { + public CreateOrganizationInvitationRequestBody withPrivateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -236,6 +265,24 @@ public CreateOrganizationInvitationRequestBody withRedirectUrl(Optional this.redirectUrl = redirectUrl; return this; } + + /** + * The number of days the invitation will be valid for. By default, the invitation has a 30 days expire. + */ + public CreateOrganizationInvitationRequestBody withExpiresInDays(long expiresInDays) { + Utils.checkNotNull(expiresInDays, "expiresInDays"); + this.expiresInDays = JsonNullable.of(expiresInDays); + return this; + } + + /** + * The number of days the invitation will be valid for. By default, the invitation has a 30 days expire. + */ + public CreateOrganizationInvitationRequestBody withExpiresInDays(JsonNullable expiresInDays) { + Utils.checkNotNull(expiresInDays, "expiresInDays"); + this.expiresInDays = expiresInDays; + return this; + } @Override public boolean equals(java.lang.Object o) { @@ -252,7 +299,8 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.role, other.role) && Objects.deepEquals(this.publicMetadata, other.publicMetadata) && Objects.deepEquals(this.privateMetadata, other.privateMetadata) && - Objects.deepEquals(this.redirectUrl, other.redirectUrl); + Objects.deepEquals(this.redirectUrl, other.redirectUrl) && + Objects.deepEquals(this.expiresInDays, other.expiresInDays); } @Override @@ -263,7 +311,8 @@ public int hashCode() { role, publicMetadata, privateMetadata, - redirectUrl); + redirectUrl, + expiresInDays); } @Override @@ -274,7 +323,8 @@ public String toString() { "role", role, "publicMetadata", publicMetadata, "privateMetadata", privateMetadata, - "redirectUrl", redirectUrl); + "redirectUrl", redirectUrl, + "expiresInDays", expiresInDays); } public final static class Builder { @@ -285,11 +335,13 @@ public final static class Builder { private String role; - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); - private Optional privateMetadata = Optional.empty(); + private Optional> privateMetadata = Optional.empty(); - private Optional redirectUrl = Optional.empty(); + private Optional redirectUrl = Optional.empty(); + + private JsonNullable expiresInDays = JsonNullable.undefined(); private Builder() { // force use of static builder() method @@ -335,8 +387,9 @@ public Builder role(String role) { /** * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. */ - public Builder publicMetadata(CreateOrganizationInvitationPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -344,8 +397,9 @@ public Builder publicMetadata(CreateOrganizationInvitationPublicMetadata publicM /** * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. */ - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -353,8 +407,9 @@ public Builder publicMetadata(Optional privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; @@ -362,8 +417,9 @@ public Builder privateMetadata(CreateOrganizationInvitationPrivateMetadata priva /** * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. + * When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership. */ - public Builder privateMetadata(Optional privateMetadata) { + public Builder privateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -386,6 +442,24 @@ public Builder redirectUrl(Optional redirectUrl) { this.redirectUrl = redirectUrl; return this; } + + /** + * The number of days the invitation will be valid for. By default, the invitation has a 30 days expire. + */ + public Builder expiresInDays(long expiresInDays) { + Utils.checkNotNull(expiresInDays, "expiresInDays"); + this.expiresInDays = JsonNullable.of(expiresInDays); + return this; + } + + /** + * The number of days the invitation will be valid for. By default, the invitation has a 30 days expire. + */ + public Builder expiresInDays(JsonNullable expiresInDays) { + Utils.checkNotNull(expiresInDays, "expiresInDays"); + this.expiresInDays = expiresInDays; + return this; + } public CreateOrganizationInvitationRequestBody build() { return new CreateOrganizationInvitationRequestBody( @@ -394,7 +468,8 @@ public CreateOrganizationInvitationRequestBody build() { role, publicMetadata, privateMetadata, - redirectUrl); + redirectUrl, + expiresInDays); } } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationRequestBuilder.java index f2823c6d..1dcce53f 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationInvitationRequestBuilder.java @@ -6,11 +6,12 @@ import com.clerk.backend_api.utils.Utils; import java.lang.String; +import java.util.Optional; public class CreateOrganizationInvitationRequestBuilder { private String organizationId; - private CreateOrganizationInvitationRequestBody requestBody; + private Optional requestBody = Optional.empty(); private final SDKMethodInterfaces.MethodCallCreateOrganizationInvitation sdk; public CreateOrganizationInvitationRequestBuilder(SDKMethodInterfaces.MethodCallCreateOrganizationInvitation sdk) { @@ -22,8 +23,14 @@ public CreateOrganizationInvitationRequestBuilder organizationId(String organiza this.organizationId = organizationId; return this; } - + public CreateOrganizationInvitationRequestBuilder requestBody(CreateOrganizationInvitationRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.of(requestBody); + return this; + } + + public CreateOrganizationInvitationRequestBuilder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationPrivateMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationPrivateMetadata.java deleted file mode 100644 index 602afc02..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationPrivateMetadata.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * CreateOrganizationPrivateMetadata - Metadata saved on the organization, accessible only from the Backend API - */ - -public class CreateOrganizationPrivateMetadata { - - @JsonCreator - public CreateOrganizationPrivateMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(CreateOrganizationPrivateMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public CreateOrganizationPrivateMetadata build() { - return new CreateOrganizationPrivateMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationPublicMetadata.java deleted file mode 100644 index 3146a90b..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationPublicMetadata.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * CreateOrganizationPublicMetadata - Metadata saved on the organization, read-only from the Frontend API and fully accessible (read/write) from the Backend API - */ - -public class CreateOrganizationPublicMetadata { - - @JsonCreator - public CreateOrganizationPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(CreateOrganizationPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public CreateOrganizationPublicMetadata build() { - return new CreateOrganizationPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationRequestBody.java index 4e24cff8..6fb89d86 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationRequestBody.java @@ -12,9 +12,11 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.util.Map; import java.util.Objects; import java.util.Optional; @@ -31,22 +33,23 @@ public class CreateOrganizationRequestBody { /** * The ID of the User who will become the administrator for the new organization */ + @JsonInclude(Include.NON_ABSENT) @JsonProperty("created_by") - private String createdBy; + private Optional createdBy; /** * Metadata saved on the organization, accessible only from the Backend API */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("private_metadata") - private Optional privateMetadata; + private Optional> privateMetadata; /** * Metadata saved on the organization, read-only from the Frontend API and fully accessible (read/write) from the Backend API */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; /** * A slug for the new organization. @@ -74,9 +77,9 @@ public class CreateOrganizationRequestBody { @JsonCreator public CreateOrganizationRequestBody( @JsonProperty("name") String name, - @JsonProperty("created_by") String createdBy, - @JsonProperty("private_metadata") Optional privateMetadata, - @JsonProperty("public_metadata") Optional publicMetadata, + @JsonProperty("created_by") Optional createdBy, + @JsonProperty("private_metadata") Optional> privateMetadata, + @JsonProperty("public_metadata") Optional> publicMetadata, @JsonProperty("slug") Optional slug, @JsonProperty("max_allowed_memberships") Optional maxAllowedMemberships, @JsonProperty("created_at") Optional createdAt) { @@ -97,9 +100,8 @@ public CreateOrganizationRequestBody( } public CreateOrganizationRequestBody( - String name, - String createdBy) { - this(name, createdBy, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + String name) { + this(name, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -115,7 +117,7 @@ public String name() { * The ID of the User who will become the administrator for the new organization */ @JsonIgnore - public String createdBy() { + public Optional createdBy() { return createdBy; } @@ -124,8 +126,8 @@ public String createdBy() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional privateMetadata() { - return (Optional) privateMetadata; + public Optional> privateMetadata() { + return (Optional>) privateMetadata; } /** @@ -133,8 +135,8 @@ public Optional privateMetadata() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } /** @@ -181,6 +183,15 @@ public CreateOrganizationRequestBody withName(String name) { * The ID of the User who will become the administrator for the new organization */ public CreateOrganizationRequestBody withCreatedBy(String createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = Optional.ofNullable(createdBy); + return this; + } + + /** + * The ID of the User who will become the administrator for the new organization + */ + public CreateOrganizationRequestBody withCreatedBy(Optional createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = createdBy; return this; @@ -189,7 +200,7 @@ public CreateOrganizationRequestBody withCreatedBy(String createdBy) { /** * Metadata saved on the organization, accessible only from the Backend API */ - public CreateOrganizationRequestBody withPrivateMetadata(CreateOrganizationPrivateMetadata privateMetadata) { + public CreateOrganizationRequestBody withPrivateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; @@ -198,7 +209,7 @@ public CreateOrganizationRequestBody withPrivateMetadata(CreateOrganizationPriva /** * Metadata saved on the organization, accessible only from the Backend API */ - public CreateOrganizationRequestBody withPrivateMetadata(Optional privateMetadata) { + public CreateOrganizationRequestBody withPrivateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -207,7 +218,7 @@ public CreateOrganizationRequestBody withPrivateMetadata(Optional publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -216,7 +227,7 @@ public CreateOrganizationRequestBody withPublicMetadata(CreateOrganizationPublic /** * Metadata saved on the organization, read-only from the Frontend API and fully accessible (read/write) from the Backend API */ - public CreateOrganizationRequestBody withPublicMetadata(Optional publicMetadata) { + public CreateOrganizationRequestBody withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -327,11 +338,11 @@ public final static class Builder { private String name; - private String createdBy; + private Optional createdBy = Optional.empty(); - private Optional privateMetadata = Optional.empty(); + private Optional> privateMetadata = Optional.empty(); - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); private Optional slug = Optional.empty(); @@ -357,6 +368,15 @@ public Builder name(String name) { * The ID of the User who will become the administrator for the new organization */ public Builder createdBy(String createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = Optional.ofNullable(createdBy); + return this; + } + + /** + * The ID of the User who will become the administrator for the new organization + */ + public Builder createdBy(Optional createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = createdBy; return this; @@ -365,7 +385,7 @@ public Builder createdBy(String createdBy) { /** * Metadata saved on the organization, accessible only from the Backend API */ - public Builder privateMetadata(CreateOrganizationPrivateMetadata privateMetadata) { + public Builder privateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; @@ -374,7 +394,7 @@ public Builder privateMetadata(CreateOrganizationPrivateMetadata privateMetadata /** * Metadata saved on the organization, accessible only from the Backend API */ - public Builder privateMetadata(Optional privateMetadata) { + public Builder privateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -383,7 +403,7 @@ public Builder privateMetadata(Optional publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -392,7 +412,7 @@ public Builder publicMetadata(CreateOrganizationPublicMetadata publicMetadata) { /** * Metadata saved on the organization, read-only from the Frontend API and fully accessible (read/write) from the Backend API */ - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationRequestBuilder.java index 9cbffb83..0d7f7260 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateOrganizationRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class CreateOrganizationRequestBuilder { - private CreateOrganizationRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallCreateOrganization sdk; public CreateOrganizationRequestBuilder(SDKMethodInterfaces.MethodCallCreateOrganization sdk) { this.sdk = sdk; } - + public CreateOrganizationRequestBuilder request(CreateOrganizationRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public CreateOrganizationRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreatePhoneNumberRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreatePhoneNumberRequestBuilder.java index 14fc6972..2f306969 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreatePhoneNumberRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreatePhoneNumberRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class CreatePhoneNumberRequestBuilder { - private CreatePhoneNumberRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallCreatePhoneNumber sdk; public CreatePhoneNumberRequestBuilder(SDKMethodInterfaces.MethodCallCreatePhoneNumber sdk) { this.sdk = sdk; } - + public CreatePhoneNumberRequestBuilder request(CreatePhoneNumberRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public CreatePhoneNumberRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateRedirectURLRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateRedirectURLRequestBuilder.java index 13bf7c96..beb79ed6 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateRedirectURLRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateRedirectURLRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class CreateRedirectURLRequestBuilder { - private CreateRedirectURLRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallCreateRedirectURL sdk; public CreateRedirectURLRequestBuilder(SDKMethodInterfaces.MethodCallCreateRedirectURL sdk) { this.sdk = sdk; } - + public CreateRedirectURLRequestBuilder request(CreateRedirectURLRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public CreateRedirectURLRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateSAMLConnectionRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateSAMLConnectionRequestBody.java index a4830f85..afecd5d7 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateSAMLConnectionRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateSAMLConnectionRequestBody.java @@ -73,6 +73,13 @@ public class CreateSAMLConnectionRequestBody { @JsonProperty("idp_metadata") private JsonNullable idpMetadata; + /** + * The ID of the organization to which users of this SAML Connection will be added + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("organization_id") + private JsonNullable organizationId; + /** * Define the attribute name mapping between Identity Provider and Clerk's user properties */ @@ -90,6 +97,7 @@ public CreateSAMLConnectionRequestBody( @JsonProperty("idp_certificate") JsonNullable idpCertificate, @JsonProperty("idp_metadata_url") JsonNullable idpMetadataUrl, @JsonProperty("idp_metadata") JsonNullable idpMetadata, + @JsonProperty("organization_id") JsonNullable organizationId, @JsonProperty("attribute_mapping") JsonNullable attributeMapping) { Utils.checkNotNull(name, "name"); Utils.checkNotNull(domain, "domain"); @@ -99,6 +107,7 @@ public CreateSAMLConnectionRequestBody( Utils.checkNotNull(idpCertificate, "idpCertificate"); Utils.checkNotNull(idpMetadataUrl, "idpMetadataUrl"); Utils.checkNotNull(idpMetadata, "idpMetadata"); + Utils.checkNotNull(organizationId, "organizationId"); Utils.checkNotNull(attributeMapping, "attributeMapping"); this.name = name; this.domain = domain; @@ -108,6 +117,7 @@ public CreateSAMLConnectionRequestBody( this.idpCertificate = idpCertificate; this.idpMetadataUrl = idpMetadataUrl; this.idpMetadata = idpMetadata; + this.organizationId = organizationId; this.attributeMapping = attributeMapping; } @@ -115,7 +125,7 @@ public CreateSAMLConnectionRequestBody( String name, String domain, Provider provider) { - this(name, domain, provider, JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); + this(name, domain, provider, JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); } /** @@ -182,6 +192,14 @@ public JsonNullable idpMetadata() { return idpMetadata; } + /** + * The ID of the organization to which users of this SAML Connection will be added + */ + @JsonIgnore + public JsonNullable organizationId() { + return organizationId; + } + /** * Define the attribute name mapping between Identity Provider and Clerk's user properties */ @@ -312,6 +330,24 @@ public CreateSAMLConnectionRequestBody withIdpMetadata(JsonNullable idpM return this; } + /** + * The ID of the organization to which users of this SAML Connection will be added + */ + public CreateSAMLConnectionRequestBody withOrganizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = JsonNullable.of(organizationId); + return this; + } + + /** + * The ID of the organization to which users of this SAML Connection will be added + */ + public CreateSAMLConnectionRequestBody withOrganizationId(JsonNullable organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + /** * Define the attribute name mapping between Identity Provider and Clerk's user properties */ @@ -348,6 +384,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.idpCertificate, other.idpCertificate) && Objects.deepEquals(this.idpMetadataUrl, other.idpMetadataUrl) && Objects.deepEquals(this.idpMetadata, other.idpMetadata) && + Objects.deepEquals(this.organizationId, other.organizationId) && Objects.deepEquals(this.attributeMapping, other.attributeMapping); } @@ -362,6 +399,7 @@ public int hashCode() { idpCertificate, idpMetadataUrl, idpMetadata, + organizationId, attributeMapping); } @@ -376,6 +414,7 @@ public String toString() { "idpCertificate", idpCertificate, "idpMetadataUrl", idpMetadataUrl, "idpMetadata", idpMetadata, + "organizationId", organizationId, "attributeMapping", attributeMapping); } @@ -397,6 +436,8 @@ public final static class Builder { private JsonNullable idpMetadata = JsonNullable.undefined(); + private JsonNullable organizationId = JsonNullable.undefined(); + private JsonNullable attributeMapping = JsonNullable.undefined(); private Builder() { @@ -520,6 +561,24 @@ public Builder idpMetadata(JsonNullable idpMetadata) { return this; } + /** + * The ID of the organization to which users of this SAML Connection will be added + */ + public Builder organizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = JsonNullable.of(organizationId); + return this; + } + + /** + * The ID of the organization to which users of this SAML Connection will be added + */ + public Builder organizationId(JsonNullable organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + /** * Define the attribute name mapping between Identity Provider and Clerk's user properties */ @@ -548,6 +607,7 @@ public CreateSAMLConnectionRequestBody build() { idpCertificate, idpMetadataUrl, idpMetadata, + organizationId, attributeMapping); } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateSAMLConnectionRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateSAMLConnectionRequestBuilder.java index 01c1302e..7d08ca90 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateSAMLConnectionRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateSAMLConnectionRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class CreateSAMLConnectionRequestBuilder { - private CreateSAMLConnectionRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallCreateSAMLConnection sdk; public CreateSAMLConnectionRequestBuilder(SDKMethodInterfaces.MethodCallCreateSAMLConnection sdk) { this.sdk = sdk; } - + public CreateSAMLConnectionRequestBuilder request(CreateSAMLConnectionRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public CreateSAMLConnectionRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateUserTOTPRequest.java b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionRequestBody.java similarity index 50% rename from src/main/java/com/clerk/backend_api/models/operations/CreateUserTOTPRequest.java rename to src/main/java/com/clerk/backend_api/models/operations/CreateSessionRequestBody.java index 10e36e21..56f560e6 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateUserTOTPRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionRequestBody.java @@ -5,35 +5,43 @@ package com.clerk.backend_api.models.operations; -import com.clerk.backend_api.utils.SpeakeasyMetadata; import com.clerk.backend_api.utils.Utils; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.Override; import java.lang.String; import java.util.Objects; +import java.util.Optional; -public class CreateUserTOTPRequest { +public class CreateSessionRequestBody { /** - * The ID of the user for whom the TOTP is being created. + * The ID representing the user */ - @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=user_id") - private String userId; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("user_id") + private Optional userId; @JsonCreator - public CreateUserTOTPRequest( - String userId) { + public CreateSessionRequestBody( + @JsonProperty("user_id") Optional userId) { Utils.checkNotNull(userId, "userId"); this.userId = userId; } + + public CreateSessionRequestBody() { + this(Optional.empty()); + } /** - * The ID of the user for whom the TOTP is being created. + * The ID representing the user */ @JsonIgnore - public String userId() { + public Optional userId() { return userId; } @@ -42,9 +50,18 @@ public final static Builder builder() { } /** - * The ID of the user for whom the TOTP is being created. + * The ID representing the user + */ + public CreateSessionRequestBody withUserId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = Optional.ofNullable(userId); + return this; + } + + /** + * The ID representing the user */ - public CreateUserTOTPRequest withUserId(String userId) { + public CreateSessionRequestBody withUserId(Optional userId) { Utils.checkNotNull(userId, "userId"); this.userId = userId; return this; @@ -58,7 +75,7 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CreateUserTOTPRequest other = (CreateUserTOTPRequest) o; + CreateSessionRequestBody other = (CreateSessionRequestBody) o; return Objects.deepEquals(this.userId, other.userId); } @@ -71,29 +88,38 @@ public int hashCode() { @Override public String toString() { - return Utils.toString(CreateUserTOTPRequest.class, + return Utils.toString(CreateSessionRequestBody.class, "userId", userId); } public final static class Builder { - private String userId; + private Optional userId = Optional.empty(); private Builder() { // force use of static builder() method } /** - * The ID of the user for whom the TOTP is being created. + * The ID representing the user */ public Builder userId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = Optional.ofNullable(userId); + return this; + } + + /** + * The ID representing the user + */ + public Builder userId(Optional userId) { Utils.checkNotNull(userId, "userId"); this.userId = userId; return this; } - public CreateUserTOTPRequest build() { - return new CreateUserTOTPRequest( + public CreateSessionRequestBody build() { + return new CreateSessionRequestBody( userId); } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateSessionRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionRequestBuilder.java new file mode 100644 index 00000000..081caac2 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionRequestBuilder.java @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.Utils; +import java.util.Optional; + +public class CreateSessionRequestBuilder { + + private Optional request = Optional.empty(); + private final SDKMethodInterfaces.MethodCallCreateSession sdk; + + public CreateSessionRequestBuilder(SDKMethodInterfaces.MethodCallCreateSession sdk) { + this.sdk = sdk; + } + + public CreateSessionRequestBuilder request(CreateSessionRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public CreateSessionRequestBuilder request(Optional request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CreateSessionResponse call() throws Exception { + + return sdk.createSession( + request); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateUserTOTPResponse.java b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionResponse.java similarity index 72% rename from src/main/java/com/clerk/backend_api/models/operations/CreateUserTOTPResponse.java rename to src/main/java/com/clerk/backend_api/models/operations/CreateSessionResponse.java index 7f7a70e7..1d17d87b 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateUserTOTPResponse.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionResponse.java @@ -5,7 +5,7 @@ package com.clerk.backend_api.models.operations; -import com.clerk.backend_api.models.components.Totp; +import com.clerk.backend_api.models.components.Session; import com.clerk.backend_api.utils.Response; import com.clerk.backend_api.utils.Utils; import com.fasterxml.jackson.annotation.JsonCreator; @@ -20,7 +20,7 @@ import java.util.Optional; -public class CreateUserTOTPResponse implements Response { +public class CreateSessionResponse implements Response { /** * HTTP response content type for this operation @@ -38,27 +38,27 @@ public class CreateUserTOTPResponse implements Response { private HttpResponse rawResponse; /** - * A TOTP (Time-based One-Time Password) + * Success */ - private Optional totp; + private Optional session; @JsonCreator - public CreateUserTOTPResponse( + public CreateSessionResponse( String contentType, int statusCode, HttpResponse rawResponse, - Optional totp) { + Optional session) { Utils.checkNotNull(contentType, "contentType"); Utils.checkNotNull(statusCode, "statusCode"); Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(totp, "totp"); + Utils.checkNotNull(session, "session"); this.contentType = contentType; this.statusCode = statusCode; this.rawResponse = rawResponse; - this.totp = totp; + this.session = session; } - public CreateUserTOTPResponse( + public CreateSessionResponse( String contentType, int statusCode, HttpResponse rawResponse) { @@ -90,12 +90,12 @@ public HttpResponse rawResponse() { } /** - * A TOTP (Time-based One-Time Password) + * Success */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional totp() { - return (Optional) totp; + public Optional session() { + return (Optional) session; } public final static Builder builder() { @@ -105,7 +105,7 @@ public final static Builder builder() { /** * HTTP response content type for this operation */ - public CreateUserTOTPResponse withContentType(String contentType) { + public CreateSessionResponse withContentType(String contentType) { Utils.checkNotNull(contentType, "contentType"); this.contentType = contentType; return this; @@ -114,7 +114,7 @@ public CreateUserTOTPResponse withContentType(String contentType) { /** * HTTP response status code for this operation */ - public CreateUserTOTPResponse withStatusCode(int statusCode) { + public CreateSessionResponse withStatusCode(int statusCode) { Utils.checkNotNull(statusCode, "statusCode"); this.statusCode = statusCode; return this; @@ -123,27 +123,27 @@ public CreateUserTOTPResponse withStatusCode(int statusCode) { /** * Raw HTTP response; suitable for custom response parsing */ - public CreateUserTOTPResponse withRawResponse(HttpResponse rawResponse) { + public CreateSessionResponse withRawResponse(HttpResponse rawResponse) { Utils.checkNotNull(rawResponse, "rawResponse"); this.rawResponse = rawResponse; return this; } /** - * A TOTP (Time-based One-Time Password) + * Success */ - public CreateUserTOTPResponse withTotp(Totp totp) { - Utils.checkNotNull(totp, "totp"); - this.totp = Optional.ofNullable(totp); + public CreateSessionResponse withSession(Session session) { + Utils.checkNotNull(session, "session"); + this.session = Optional.ofNullable(session); return this; } /** - * A TOTP (Time-based One-Time Password) + * Success */ - public CreateUserTOTPResponse withTotp(Optional totp) { - Utils.checkNotNull(totp, "totp"); - this.totp = totp; + public CreateSessionResponse withSession(Optional session) { + Utils.checkNotNull(session, "session"); + this.session = session; return this; } @@ -155,12 +155,12 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - CreateUserTOTPResponse other = (CreateUserTOTPResponse) o; + CreateSessionResponse other = (CreateSessionResponse) o; return Objects.deepEquals(this.contentType, other.contentType) && Objects.deepEquals(this.statusCode, other.statusCode) && Objects.deepEquals(this.rawResponse, other.rawResponse) && - Objects.deepEquals(this.totp, other.totp); + Objects.deepEquals(this.session, other.session); } @Override @@ -169,16 +169,16 @@ public int hashCode() { contentType, statusCode, rawResponse, - totp); + session); } @Override public String toString() { - return Utils.toString(CreateUserTOTPResponse.class, + return Utils.toString(CreateSessionResponse.class, "contentType", contentType, "statusCode", statusCode, "rawResponse", rawResponse, - "totp", totp); + "session", session); } public final static class Builder { @@ -189,7 +189,7 @@ public final static class Builder { private HttpResponse rawResponse; - private Optional totp = Optional.empty(); + private Optional session = Optional.empty(); private Builder() { // force use of static builder() method @@ -223,29 +223,29 @@ public Builder rawResponse(HttpResponse rawResponse) { } /** - * A TOTP (Time-based One-Time Password) + * Success */ - public Builder totp(Totp totp) { - Utils.checkNotNull(totp, "totp"); - this.totp = Optional.ofNullable(totp); + public Builder session(Session session) { + Utils.checkNotNull(session, "session"); + this.session = Optional.ofNullable(session); return this; } /** - * A TOTP (Time-based One-Time Password) + * Success */ - public Builder totp(Optional totp) { - Utils.checkNotNull(totp, "totp"); - this.totp = totp; + public Builder session(Optional session) { + Utils.checkNotNull(session, "session"); + this.session = session; return this; } - public CreateUserTOTPResponse build() { - return new CreateUserTOTPResponse( + public CreateSessionResponse build() { + return new CreateSessionResponse( contentType, statusCode, rawResponse, - totp); + session); } } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateObject.java b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateObject.java new file mode 100644 index 00000000..476eca31 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateObject.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum CreateSessionTokenFromTemplateObject { + TOKEN("token"); + + @JsonValue + private final String value; + + private CreateSessionTokenFromTemplateObject(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (CreateSessionTokenFromTemplateObject o: CreateSessionTokenFromTemplateObject.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/CreateSessionTokenFromTemplateRequest.java b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateRequest.java index 7967e82e..e6d8e5c8 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateRequest.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Objects; +import java.util.Optional; public class CreateSessionTokenFromTemplateRequest { @@ -28,14 +30,26 @@ public class CreateSessionTokenFromTemplateRequest { @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=template_name") private String templateName; + @SpeakeasyMetadata("request:mediaType=application/json") + private Optional requestBody; + @JsonCreator public CreateSessionTokenFromTemplateRequest( String sessionId, - String templateName) { + String templateName, + Optional requestBody) { Utils.checkNotNull(sessionId, "sessionId"); Utils.checkNotNull(templateName, "templateName"); + Utils.checkNotNull(requestBody, "requestBody"); this.sessionId = sessionId; this.templateName = templateName; + this.requestBody = requestBody; + } + + public CreateSessionTokenFromTemplateRequest( + String sessionId, + String templateName) { + this(sessionId, templateName, Optional.empty()); } /** @@ -54,6 +68,12 @@ public String templateName() { return templateName; } + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional requestBody() { + return (Optional) requestBody; + } + public final static Builder builder() { return new Builder(); } @@ -75,6 +95,18 @@ public CreateSessionTokenFromTemplateRequest withTemplateName(String templateNam this.templateName = templateName; return this; } + + public CreateSessionTokenFromTemplateRequest withRequestBody(CreateSessionTokenFromTemplateRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public CreateSessionTokenFromTemplateRequest withRequestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } @Override public boolean equals(java.lang.Object o) { @@ -87,28 +119,33 @@ public boolean equals(java.lang.Object o) { CreateSessionTokenFromTemplateRequest other = (CreateSessionTokenFromTemplateRequest) o; return Objects.deepEquals(this.sessionId, other.sessionId) && - Objects.deepEquals(this.templateName, other.templateName); + Objects.deepEquals(this.templateName, other.templateName) && + Objects.deepEquals(this.requestBody, other.requestBody); } @Override public int hashCode() { return Objects.hash( sessionId, - templateName); + templateName, + requestBody); } @Override public String toString() { return Utils.toString(CreateSessionTokenFromTemplateRequest.class, "sessionId", sessionId, - "templateName", templateName); + "templateName", templateName, + "requestBody", requestBody); } public final static class Builder { private String sessionId; - private String templateName; + private String templateName; + + private Optional requestBody = Optional.empty(); private Builder() { // force use of static builder() method @@ -131,11 +168,24 @@ public Builder templateName(String templateName) { this.templateName = templateName; return this; } + + public Builder requestBody(CreateSessionTokenFromTemplateRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public Builder requestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } public CreateSessionTokenFromTemplateRequest build() { return new CreateSessionTokenFromTemplateRequest( sessionId, - templateName); + templateName, + requestBody); } } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateRequestBody.java new file mode 100644 index 00000000..94b01327 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateRequestBody.java @@ -0,0 +1,128 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class CreateSessionTokenFromTemplateRequestBody { + + /** + * Use this parameter to override the JWT token lifetime. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("expires_in_seconds") + private JsonNullable expiresInSeconds; + + @JsonCreator + public CreateSessionTokenFromTemplateRequestBody( + @JsonProperty("expires_in_seconds") JsonNullable expiresInSeconds) { + Utils.checkNotNull(expiresInSeconds, "expiresInSeconds"); + this.expiresInSeconds = expiresInSeconds; + } + + public CreateSessionTokenFromTemplateRequestBody() { + this(JsonNullable.undefined()); + } + + /** + * Use this parameter to override the JWT token lifetime. + */ + @JsonIgnore + public JsonNullable expiresInSeconds() { + return expiresInSeconds; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Use this parameter to override the JWT token lifetime. + */ + public CreateSessionTokenFromTemplateRequestBody withExpiresInSeconds(double expiresInSeconds) { + Utils.checkNotNull(expiresInSeconds, "expiresInSeconds"); + this.expiresInSeconds = JsonNullable.of(expiresInSeconds); + return this; + } + + /** + * Use this parameter to override the JWT token lifetime. + */ + public CreateSessionTokenFromTemplateRequestBody withExpiresInSeconds(JsonNullable expiresInSeconds) { + Utils.checkNotNull(expiresInSeconds, "expiresInSeconds"); + this.expiresInSeconds = expiresInSeconds; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSessionTokenFromTemplateRequestBody other = (CreateSessionTokenFromTemplateRequestBody) o; + return + Objects.deepEquals(this.expiresInSeconds, other.expiresInSeconds); + } + + @Override + public int hashCode() { + return Objects.hash( + expiresInSeconds); + } + + @Override + public String toString() { + return Utils.toString(CreateSessionTokenFromTemplateRequestBody.class, + "expiresInSeconds", expiresInSeconds); + } + + public final static class Builder { + + private JsonNullable expiresInSeconds = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + /** + * Use this parameter to override the JWT token lifetime. + */ + public Builder expiresInSeconds(double expiresInSeconds) { + Utils.checkNotNull(expiresInSeconds, "expiresInSeconds"); + this.expiresInSeconds = JsonNullable.of(expiresInSeconds); + return this; + } + + /** + * Use this parameter to override the JWT token lifetime. + */ + public Builder expiresInSeconds(JsonNullable expiresInSeconds) { + Utils.checkNotNull(expiresInSeconds, "expiresInSeconds"); + this.expiresInSeconds = expiresInSeconds; + return this; + } + + public CreateSessionTokenFromTemplateRequestBody build() { + return new CreateSessionTokenFromTemplateRequestBody( + expiresInSeconds); + } + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateRequestBuilder.java index 386e522e..7f83d727 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateRequestBuilder.java @@ -6,11 +6,13 @@ import com.clerk.backend_api.utils.Utils; import java.lang.String; +import java.util.Optional; public class CreateSessionTokenFromTemplateRequestBuilder { private String sessionId; private String templateName; + private Optional requestBody = Optional.empty(); private final SDKMethodInterfaces.MethodCallCreateSessionTokenFromTemplate sdk; public CreateSessionTokenFromTemplateRequestBuilder(SDKMethodInterfaces.MethodCallCreateSessionTokenFromTemplate sdk) { @@ -28,11 +30,24 @@ public CreateSessionTokenFromTemplateRequestBuilder templateName(String template this.templateName = templateName; return this; } + + public CreateSessionTokenFromTemplateRequestBuilder requestBody(CreateSessionTokenFromTemplateRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.of(requestBody); + return this; + } + + public CreateSessionTokenFromTemplateRequestBuilder requestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } public CreateSessionTokenFromTemplateResponse call() throws Exception { return sdk.createTokenFromTemplate( sessionId, - templateName); + templateName, + requestBody); } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateResponseBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateResponseBody.java index 075a2305..586a8fad 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateResponseBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenFromTemplateResponseBody.java @@ -25,7 +25,7 @@ public class CreateSessionTokenFromTemplateResponseBody { @JsonInclude(Include.NON_ABSENT) @JsonProperty("object") - private Optional object; + private Optional object; @JsonInclude(Include.NON_ABSENT) @JsonProperty("jwt") @@ -33,7 +33,7 @@ public class CreateSessionTokenFromTemplateResponseBody { @JsonCreator public CreateSessionTokenFromTemplateResponseBody( - @JsonProperty("object") Optional object, + @JsonProperty("object") Optional object, @JsonProperty("jwt") Optional jwt) { Utils.checkNotNull(object, "object"); Utils.checkNotNull(jwt, "jwt"); @@ -47,8 +47,8 @@ public CreateSessionTokenFromTemplateResponseBody() { @SuppressWarnings("unchecked") @JsonIgnore - public Optional object() { - return (Optional) object; + public Optional object() { + return (Optional) object; } @JsonIgnore @@ -60,13 +60,13 @@ public final static Builder builder() { return new Builder(); } - public CreateSessionTokenFromTemplateResponseBody withObject(Object object) { + public CreateSessionTokenFromTemplateResponseBody withObject(CreateSessionTokenFromTemplateObject object) { Utils.checkNotNull(object, "object"); this.object = Optional.ofNullable(object); return this; } - public CreateSessionTokenFromTemplateResponseBody withObject(Optional object) { + public CreateSessionTokenFromTemplateResponseBody withObject(Optional object) { Utils.checkNotNull(object, "object"); this.object = object; return this; @@ -114,7 +114,7 @@ public String toString() { public final static class Builder { - private Optional object = Optional.empty(); + private Optional object = Optional.empty(); private Optional jwt = Optional.empty(); @@ -122,13 +122,13 @@ private Builder() { // force use of static builder() method } - public Builder object(Object object) { + public Builder object(CreateSessionTokenFromTemplateObject object) { Utils.checkNotNull(object, "object"); this.object = Optional.ofNullable(object); return this; } - public Builder object(Optional object) { + public Builder object(Optional object) { Utils.checkNotNull(object, "object"); this.object = object; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenRequest.java b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenRequest.java new file mode 100644 index 00000000..bf599290 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenRequest.java @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + + +import com.clerk.backend_api.utils.SpeakeasyMetadata; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + + +public class CreateSessionTokenRequest { + + /** + * The ID of the session + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=session_id") + private String sessionId; + + @SpeakeasyMetadata("request:mediaType=application/json") + private Optional requestBody; + + @JsonCreator + public CreateSessionTokenRequest( + String sessionId, + Optional requestBody) { + Utils.checkNotNull(sessionId, "sessionId"); + Utils.checkNotNull(requestBody, "requestBody"); + this.sessionId = sessionId; + this.requestBody = requestBody; + } + + public CreateSessionTokenRequest( + String sessionId) { + this(sessionId, Optional.empty()); + } + + /** + * The ID of the session + */ + @JsonIgnore + public String sessionId() { + return sessionId; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional requestBody() { + return (Optional) requestBody; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the session + */ + public CreateSessionTokenRequest withSessionId(String sessionId) { + Utils.checkNotNull(sessionId, "sessionId"); + this.sessionId = sessionId; + return this; + } + + public CreateSessionTokenRequest withRequestBody(CreateSessionTokenRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public CreateSessionTokenRequest withRequestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSessionTokenRequest other = (CreateSessionTokenRequest) o; + return + Objects.deepEquals(this.sessionId, other.sessionId) && + Objects.deepEquals(this.requestBody, other.requestBody); + } + + @Override + public int hashCode() { + return Objects.hash( + sessionId, + requestBody); + } + + @Override + public String toString() { + return Utils.toString(CreateSessionTokenRequest.class, + "sessionId", sessionId, + "requestBody", requestBody); + } + + public final static class Builder { + + private String sessionId; + + private Optional requestBody = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the session + */ + public Builder sessionId(String sessionId) { + Utils.checkNotNull(sessionId, "sessionId"); + this.sessionId = sessionId; + return this; + } + + public Builder requestBody(CreateSessionTokenRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public Builder requestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public CreateSessionTokenRequest build() { + return new CreateSessionTokenRequest( + sessionId, + requestBody); + } + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenRequestBody.java new file mode 100644 index 00000000..2a53bdd8 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenRequestBody.java @@ -0,0 +1,128 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class CreateSessionTokenRequestBody { + + /** + * Use this parameter to override the default session token lifetime. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("expires_in_seconds") + private JsonNullable expiresInSeconds; + + @JsonCreator + public CreateSessionTokenRequestBody( + @JsonProperty("expires_in_seconds") JsonNullable expiresInSeconds) { + Utils.checkNotNull(expiresInSeconds, "expiresInSeconds"); + this.expiresInSeconds = expiresInSeconds; + } + + public CreateSessionTokenRequestBody() { + this(JsonNullable.undefined()); + } + + /** + * Use this parameter to override the default session token lifetime. + */ + @JsonIgnore + public JsonNullable expiresInSeconds() { + return expiresInSeconds; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Use this parameter to override the default session token lifetime. + */ + public CreateSessionTokenRequestBody withExpiresInSeconds(double expiresInSeconds) { + Utils.checkNotNull(expiresInSeconds, "expiresInSeconds"); + this.expiresInSeconds = JsonNullable.of(expiresInSeconds); + return this; + } + + /** + * Use this parameter to override the default session token lifetime. + */ + public CreateSessionTokenRequestBody withExpiresInSeconds(JsonNullable expiresInSeconds) { + Utils.checkNotNull(expiresInSeconds, "expiresInSeconds"); + this.expiresInSeconds = expiresInSeconds; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSessionTokenRequestBody other = (CreateSessionTokenRequestBody) o; + return + Objects.deepEquals(this.expiresInSeconds, other.expiresInSeconds); + } + + @Override + public int hashCode() { + return Objects.hash( + expiresInSeconds); + } + + @Override + public String toString() { + return Utils.toString(CreateSessionTokenRequestBody.class, + "expiresInSeconds", expiresInSeconds); + } + + public final static class Builder { + + private JsonNullable expiresInSeconds = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + /** + * Use this parameter to override the default session token lifetime. + */ + public Builder expiresInSeconds(double expiresInSeconds) { + Utils.checkNotNull(expiresInSeconds, "expiresInSeconds"); + this.expiresInSeconds = JsonNullable.of(expiresInSeconds); + return this; + } + + /** + * Use this parameter to override the default session token lifetime. + */ + public Builder expiresInSeconds(JsonNullable expiresInSeconds) { + Utils.checkNotNull(expiresInSeconds, "expiresInSeconds"); + this.expiresInSeconds = expiresInSeconds; + return this; + } + + public CreateSessionTokenRequestBody build() { + return new CreateSessionTokenRequestBody( + expiresInSeconds); + } + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenRequestBuilder.java new file mode 100644 index 00000000..f54a4cbd --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenRequestBuilder.java @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.Utils; +import java.lang.String; +import java.util.Optional; + +public class CreateSessionTokenRequestBuilder { + + private String sessionId; + private Optional requestBody = Optional.empty(); + private final SDKMethodInterfaces.MethodCallCreateSessionToken sdk; + + public CreateSessionTokenRequestBuilder(SDKMethodInterfaces.MethodCallCreateSessionToken sdk) { + this.sdk = sdk; + } + + public CreateSessionTokenRequestBuilder sessionId(String sessionId) { + Utils.checkNotNull(sessionId, "sessionId"); + this.sessionId = sessionId; + return this; + } + + public CreateSessionTokenRequestBuilder requestBody(CreateSessionTokenRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.of(requestBody); + return this; + } + + public CreateSessionTokenRequestBuilder requestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public CreateSessionTokenResponse call() throws Exception { + + return sdk.createSessionToken( + sessionId, + requestBody); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenResponse.java b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenResponse.java new file mode 100644 index 00000000..62979b15 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenResponse.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + + +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class CreateSessionTokenResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private Optional object; + + @JsonCreator + public CreateSessionTokenResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional object) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(object, "object"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.object = object; + } + + public CreateSessionTokenResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public CreateSessionTokenResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateSessionTokenResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateSessionTokenResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public CreateSessionTokenResponse withObject(CreateSessionTokenResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public CreateSessionTokenResponse withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSessionTokenResponse other = (CreateSessionTokenResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.object, other.object); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + statusCode, + rawResponse, + object); + } + + @Override + public String toString() { + return Utils.toString(CreateSessionTokenResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "object", object); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional object = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public Builder object(CreateSessionTokenResponseBody object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + /** + * OK + */ + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public CreateSessionTokenResponse build() { + return new CreateSessionTokenResponse( + contentType, + statusCode, + rawResponse, + object); + } + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenResponseBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenResponseBody.java new file mode 100644 index 00000000..6b18b3b4 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateSessionTokenResponseBody.java @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + +/** + * CreateSessionTokenResponseBody - OK + */ + +public class CreateSessionTokenResponseBody { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("object") + private Optional object; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("jwt") + private Optional jwt; + + @JsonCreator + public CreateSessionTokenResponseBody( + @JsonProperty("object") Optional object, + @JsonProperty("jwt") Optional jwt) { + Utils.checkNotNull(object, "object"); + Utils.checkNotNull(jwt, "jwt"); + this.object = object; + this.jwt = jwt; + } + + public CreateSessionTokenResponseBody() { + this(Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional object() { + return (Optional) object; + } + + @JsonIgnore + public Optional jwt() { + return jwt; + } + + public final static Builder builder() { + return new Builder(); + } + + public CreateSessionTokenResponseBody withObject(Object object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + public CreateSessionTokenResponseBody withObject(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public CreateSessionTokenResponseBody withJwt(String jwt) { + Utils.checkNotNull(jwt, "jwt"); + this.jwt = Optional.ofNullable(jwt); + return this; + } + + public CreateSessionTokenResponseBody withJwt(Optional jwt) { + Utils.checkNotNull(jwt, "jwt"); + this.jwt = jwt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSessionTokenResponseBody other = (CreateSessionTokenResponseBody) o; + return + Objects.deepEquals(this.object, other.object) && + Objects.deepEquals(this.jwt, other.jwt); + } + + @Override + public int hashCode() { + return Objects.hash( + object, + jwt); + } + + @Override + public String toString() { + return Utils.toString(CreateSessionTokenResponseBody.class, + "object", object, + "jwt", jwt); + } + + public final static class Builder { + + private Optional object = Optional.empty(); + + private Optional jwt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder object(Object object) { + Utils.checkNotNull(object, "object"); + this.object = Optional.ofNullable(object); + return this; + } + + public Builder object(Optional object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + public Builder jwt(String jwt) { + Utils.checkNotNull(jwt, "jwt"); + this.jwt = Optional.ofNullable(jwt); + return this; + } + + public Builder jwt(Optional jwt) { + Utils.checkNotNull(jwt, "jwt"); + this.jwt = jwt; + return this; + } + + public CreateSessionTokenResponseBody build() { + return new CreateSessionTokenResponseBody( + object, + jwt); + } + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateSignInTokenRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateSignInTokenRequestBuilder.java index d7fcd299..4cc8aa27 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateSignInTokenRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateSignInTokenRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class CreateSignInTokenRequestBuilder { - private CreateSignInTokenRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallCreateSignInToken sdk; public CreateSignInTokenRequestBuilder(SDKMethodInterfaces.MethodCallCreateSignInToken sdk) { this.sdk = sdk; } - + public CreateSignInTokenRequestBuilder request(CreateSignInTokenRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public CreateSignInTokenRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateUserRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateUserRequestBody.java index 83ec43b8..0ae2b4ba 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateUserRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateUserRequestBody.java @@ -13,10 +13,12 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.Boolean; import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -154,14 +156,14 @@ public class CreateUserRequestBody { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; /** * Metadata saved on the user, that is only visible to your Backend API */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("private_metadata") - private Optional privateMetadata; + private Optional> privateMetadata; /** * Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. @@ -169,7 +171,7 @@ public class CreateUserRequestBody { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("unsafe_metadata") - private Optional unsafeMetadata; + private Optional> unsafeMetadata; /** * If enabled, user can delete themselves via FAPI. @@ -233,9 +235,9 @@ public CreateUserRequestBody( @JsonProperty("skip_password_requirement") Optional skipPasswordRequirement, @JsonProperty("totp_secret") Optional totpSecret, @JsonProperty("backup_codes") Optional> backupCodes, - @JsonProperty("public_metadata") Optional publicMetadata, - @JsonProperty("private_metadata") Optional privateMetadata, - @JsonProperty("unsafe_metadata") Optional unsafeMetadata, + @JsonProperty("public_metadata") Optional> publicMetadata, + @JsonProperty("private_metadata") Optional> privateMetadata, + @JsonProperty("unsafe_metadata") Optional> unsafeMetadata, @JsonProperty("delete_self_enabled") JsonNullable deleteSelfEnabled, @JsonProperty("legal_accepted_at") JsonNullable legalAcceptedAt, @JsonProperty("skip_legal_checks") JsonNullable skipLegalChecks, @@ -442,8 +444,8 @@ public Optional> backupCodes() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } /** @@ -451,8 +453,8 @@ public Optional publicMetadata() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional privateMetadata() { - return (Optional) privateMetadata; + public Optional> privateMetadata() { + return (Optional>) privateMetadata; } /** @@ -461,8 +463,8 @@ public Optional privateMetadata() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional unsafeMetadata() { - return (Optional) unsafeMetadata; + public Optional> unsafeMetadata() { + return (Optional>) unsafeMetadata; } /** @@ -830,7 +832,7 @@ public CreateUserRequestBody withBackupCodes(Optional> ba /** * Metadata saved on the user, that is visible to both your Frontend and Backend APIs */ - public CreateUserRequestBody withPublicMetadata(PublicMetadata publicMetadata) { + public CreateUserRequestBody withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -839,7 +841,7 @@ public CreateUserRequestBody withPublicMetadata(PublicMetadata publicMetadata) { /** * Metadata saved on the user, that is visible to both your Frontend and Backend APIs */ - public CreateUserRequestBody withPublicMetadata(Optional publicMetadata) { + public CreateUserRequestBody withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -848,7 +850,7 @@ public CreateUserRequestBody withPublicMetadata(Optional privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; @@ -857,7 +859,7 @@ public CreateUserRequestBody withPrivateMetadata(PrivateMetadata privateMetadata /** * Metadata saved on the user, that is only visible to your Backend API */ - public CreateUserRequestBody withPrivateMetadata(Optional privateMetadata) { + public CreateUserRequestBody withPrivateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -867,7 +869,7 @@ public CreateUserRequestBody withPrivateMetadata(Optional unsafeMetadata) { Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); this.unsafeMetadata = Optional.ofNullable(unsafeMetadata); return this; @@ -877,7 +879,7 @@ public CreateUserRequestBody withUnsafeMetadata(UnsafeMetadata unsafeMetadata) { * Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. * Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. */ - public CreateUserRequestBody withUnsafeMetadata(Optional unsafeMetadata) { + public CreateUserRequestBody withUnsafeMetadata(Optional> unsafeMetadata) { Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); this.unsafeMetadata = unsafeMetadata; return this; @@ -1120,11 +1122,11 @@ public final static class Builder { private Optional> backupCodes = Optional.empty(); - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); - private Optional privateMetadata = Optional.empty(); + private Optional> privateMetadata = Optional.empty(); - private Optional unsafeMetadata = Optional.empty(); + private Optional> unsafeMetadata = Optional.empty(); private JsonNullable deleteSelfEnabled = JsonNullable.undefined(); @@ -1451,7 +1453,7 @@ public Builder backupCodes(Optional> backupCodes) { /** * Metadata saved on the user, that is visible to both your Frontend and Backend APIs */ - public Builder publicMetadata(PublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -1460,7 +1462,7 @@ public Builder publicMetadata(PublicMetadata publicMetadata) { /** * Metadata saved on the user, that is visible to both your Frontend and Backend APIs */ - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -1469,7 +1471,7 @@ public Builder publicMetadata(Optional publicMetadata) /** * Metadata saved on the user, that is only visible to your Backend API */ - public Builder privateMetadata(PrivateMetadata privateMetadata) { + public Builder privateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; @@ -1478,7 +1480,7 @@ public Builder privateMetadata(PrivateMetadata privateMetadata) { /** * Metadata saved on the user, that is only visible to your Backend API */ - public Builder privateMetadata(Optional privateMetadata) { + public Builder privateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -1488,7 +1490,7 @@ public Builder privateMetadata(Optional privateMetada * Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. * Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. */ - public Builder unsafeMetadata(UnsafeMetadata unsafeMetadata) { + public Builder unsafeMetadata(Map unsafeMetadata) { Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); this.unsafeMetadata = Optional.ofNullable(unsafeMetadata); return this; @@ -1498,7 +1500,7 @@ public Builder unsafeMetadata(UnsafeMetadata unsafeMetadata) { * Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. * Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. */ - public Builder unsafeMetadata(Optional unsafeMetadata) { + public Builder unsafeMetadata(Optional> unsafeMetadata) { Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); this.unsafeMetadata = unsafeMetadata; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateUserTOTPRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateUserTOTPRequestBuilder.java deleted file mode 100644 index 2f658ccb..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateUserTOTPRequestBuilder.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - -import com.clerk.backend_api.utils.Utils; -import java.lang.String; - -public class CreateUserTOTPRequestBuilder { - - private String userId; - private final SDKMethodInterfaces.MethodCallCreateUserTOTP sdk; - - public CreateUserTOTPRequestBuilder(SDKMethodInterfaces.MethodCallCreateUserTOTP sdk) { - this.sdk = sdk; - } - - public CreateUserTOTPRequestBuilder userId(String userId) { - Utils.checkNotNull(userId, "userId"); - this.userId = userId; - return this; - } - - public CreateUserTOTPResponse call() throws Exception { - - return sdk.createTOTP( - userId); - } -} diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateWaitlistEntryRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateWaitlistEntryRequestBody.java new file mode 100644 index 00000000..b41d158e --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateWaitlistEntryRequestBody.java @@ -0,0 +1,176 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class CreateWaitlistEntryRequestBody { + + /** + * The email address to add to the waitlist + */ + @JsonProperty("email_address") + private String emailAddress; + + /** + * Optional flag which denotes whether an email invitation should be sent to the given email address. + * Defaults to `true`. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("notify") + private Optional notify_; + + @JsonCreator + public CreateWaitlistEntryRequestBody( + @JsonProperty("email_address") String emailAddress, + @JsonProperty("notify") Optional notify_) { + Utils.checkNotNull(emailAddress, "emailAddress"); + Utils.checkNotNull(notify_, "notify_"); + this.emailAddress = emailAddress; + this.notify_ = notify_; + } + + public CreateWaitlistEntryRequestBody( + String emailAddress) { + this(emailAddress, Optional.empty()); + } + + /** + * The email address to add to the waitlist + */ + @JsonIgnore + public String emailAddress() { + return emailAddress; + } + + /** + * Optional flag which denotes whether an email invitation should be sent to the given email address. + * Defaults to `true`. + */ + @JsonIgnore + public Optional notify_() { + return notify_; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The email address to add to the waitlist + */ + public CreateWaitlistEntryRequestBody withEmailAddress(String emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = emailAddress; + return this; + } + + /** + * Optional flag which denotes whether an email invitation should be sent to the given email address. + * Defaults to `true`. + */ + public CreateWaitlistEntryRequestBody withNotify(boolean notify_) { + Utils.checkNotNull(notify_, "notify_"); + this.notify_ = Optional.ofNullable(notify_); + return this; + } + + /** + * Optional flag which denotes whether an email invitation should be sent to the given email address. + * Defaults to `true`. + */ + public CreateWaitlistEntryRequestBody withNotify(Optional notify_) { + Utils.checkNotNull(notify_, "notify_"); + this.notify_ = notify_; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateWaitlistEntryRequestBody other = (CreateWaitlistEntryRequestBody) o; + return + Objects.deepEquals(this.emailAddress, other.emailAddress) && + Objects.deepEquals(this.notify_, other.notify_); + } + + @Override + public int hashCode() { + return Objects.hash( + emailAddress, + notify_); + } + + @Override + public String toString() { + return Utils.toString(CreateWaitlistEntryRequestBody.class, + "emailAddress", emailAddress, + "notify_", notify_); + } + + public final static class Builder { + + private String emailAddress; + + private Optional notify_ = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The email address to add to the waitlist + */ + public Builder emailAddress(String emailAddress) { + Utils.checkNotNull(emailAddress, "emailAddress"); + this.emailAddress = emailAddress; + return this; + } + + /** + * Optional flag which denotes whether an email invitation should be sent to the given email address. + * Defaults to `true`. + */ + public Builder notify_(boolean notify_) { + Utils.checkNotNull(notify_, "notify_"); + this.notify_ = Optional.ofNullable(notify_); + return this; + } + + /** + * Optional flag which denotes whether an email invitation should be sent to the given email address. + * Defaults to `true`. + */ + public Builder notify_(Optional notify_) { + Utils.checkNotNull(notify_, "notify_"); + this.notify_ = notify_; + return this; + } + + public CreateWaitlistEntryRequestBody build() { + return new CreateWaitlistEntryRequestBody( + emailAddress, + notify_); + } + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateWaitlistEntryRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/CreateWaitlistEntryRequestBuilder.java new file mode 100644 index 00000000..ab22dcac --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateWaitlistEntryRequestBuilder.java @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.Utils; +import java.util.Optional; + +public class CreateWaitlistEntryRequestBuilder { + + private Optional request = Optional.empty(); + private final SDKMethodInterfaces.MethodCallCreateWaitlistEntry sdk; + + public CreateWaitlistEntryRequestBuilder(SDKMethodInterfaces.MethodCallCreateWaitlistEntry sdk) { + this.sdk = sdk; + } + + public CreateWaitlistEntryRequestBuilder request(CreateWaitlistEntryRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public CreateWaitlistEntryRequestBuilder request(Optional request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CreateWaitlistEntryResponse call() throws Exception { + + return sdk.createWaitlistEntry( + request); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateWaitlistEntryResponse.java b/src/main/java/com/clerk/backend_api/models/operations/CreateWaitlistEntryResponse.java new file mode 100644 index 00000000..7779bec7 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateWaitlistEntryResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + + +import com.clerk.backend_api.models.components.WaitlistEntry; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class CreateWaitlistEntryResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * A Waitlist Entry + */ + private Optional waitlistEntry; + + @JsonCreator + public CreateWaitlistEntryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional waitlistEntry) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(waitlistEntry, "waitlistEntry"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.waitlistEntry = waitlistEntry; + } + + public CreateWaitlistEntryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * A Waitlist Entry + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional waitlistEntry() { + return (Optional) waitlistEntry; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public CreateWaitlistEntryResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateWaitlistEntryResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateWaitlistEntryResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * A Waitlist Entry + */ + public CreateWaitlistEntryResponse withWaitlistEntry(WaitlistEntry waitlistEntry) { + Utils.checkNotNull(waitlistEntry, "waitlistEntry"); + this.waitlistEntry = Optional.ofNullable(waitlistEntry); + return this; + } + + /** + * A Waitlist Entry + */ + public CreateWaitlistEntryResponse withWaitlistEntry(Optional waitlistEntry) { + Utils.checkNotNull(waitlistEntry, "waitlistEntry"); + this.waitlistEntry = waitlistEntry; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateWaitlistEntryResponse other = (CreateWaitlistEntryResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.waitlistEntry, other.waitlistEntry); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + statusCode, + rawResponse, + waitlistEntry); + } + + @Override + public String toString() { + return Utils.toString(CreateWaitlistEntryResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "waitlistEntry", waitlistEntry); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional waitlistEntry = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * A Waitlist Entry + */ + public Builder waitlistEntry(WaitlistEntry waitlistEntry) { + Utils.checkNotNull(waitlistEntry, "waitlistEntry"); + this.waitlistEntry = Optional.ofNullable(waitlistEntry); + return this; + } + + /** + * A Waitlist Entry + */ + public Builder waitlistEntry(Optional waitlistEntry) { + Utils.checkNotNull(waitlistEntry, "waitlistEntry"); + this.waitlistEntry = waitlistEntry; + return this; + } + + public CreateWaitlistEntryResponse build() { + return new CreateWaitlistEntryResponse( + contentType, + statusCode, + rawResponse, + waitlistEntry); + } + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/GetInstanceRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceRequestBuilder.java new file mode 100644 index 00000000..1397f59a --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceRequestBuilder.java @@ -0,0 +1,20 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + + +public class GetInstanceRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetInstance sdk; + + public GetInstanceRequestBuilder(SDKMethodInterfaces.MethodCallGetInstance sdk) { + this.sdk = sdk; + } + + public GetInstanceResponse call() throws Exception { + + return sdk.getInstanceDirect(); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/GetInstanceResponse.java b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceResponse.java new file mode 100644 index 00000000..f68732c6 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + + +import com.clerk.backend_api.models.components.Instance; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetInstanceResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Success + */ + private Optional instance; + + @JsonCreator + public GetInstanceResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional instance) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(instance, "instance"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.instance = instance; + } + + public GetInstanceResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Success + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional instance() { + return (Optional) instance; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetInstanceResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetInstanceResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetInstanceResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Success + */ + public GetInstanceResponse withInstance(Instance instance) { + Utils.checkNotNull(instance, "instance"); + this.instance = Optional.ofNullable(instance); + return this; + } + + /** + * Success + */ + public GetInstanceResponse withInstance(Optional instance) { + Utils.checkNotNull(instance, "instance"); + this.instance = instance; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetInstanceResponse other = (GetInstanceResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.instance, other.instance); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + statusCode, + rawResponse, + instance); + } + + @Override + public String toString() { + return Utils.toString(GetInstanceResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "instance", instance); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional instance = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Success + */ + public Builder instance(Instance instance) { + Utils.checkNotNull(instance, "instance"); + this.instance = Optional.ofNullable(instance); + return this; + } + + /** + * Success + */ + public Builder instance(Optional instance) { + Utils.checkNotNull(instance, "instance"); + this.instance = instance; + return this; + } + + public GetInstanceResponse build() { + return new GetInstanceResponse( + contentType, + statusCode, + rawResponse, + instance); + } + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/GetJWKSResponse.java b/src/main/java/com/clerk/backend_api/models/operations/GetJWKSResponse.java index c8184f12..8c5263ba 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/GetJWKSResponse.java +++ b/src/main/java/com/clerk/backend_api/models/operations/GetJWKSResponse.java @@ -5,7 +5,7 @@ package com.clerk.backend_api.models.operations; -import com.clerk.backend_api.models.components.WellKnownJWKS; +import com.clerk.backend_api.models.components.Jwks; import com.clerk.backend_api.utils.Response; import com.clerk.backend_api.utils.Utils; import com.fasterxml.jackson.annotation.JsonCreator; @@ -40,22 +40,22 @@ public class GetJWKSResponse implements Response { /** * Get the JSON Web Key Set */ - private Optional wellKnownJWKS; + private Optional jwks; @JsonCreator public GetJWKSResponse( String contentType, int statusCode, HttpResponse rawResponse, - Optional wellKnownJWKS) { + Optional jwks) { Utils.checkNotNull(contentType, "contentType"); Utils.checkNotNull(statusCode, "statusCode"); Utils.checkNotNull(rawResponse, "rawResponse"); - Utils.checkNotNull(wellKnownJWKS, "wellKnownJWKS"); + Utils.checkNotNull(jwks, "jwks"); this.contentType = contentType; this.statusCode = statusCode; this.rawResponse = rawResponse; - this.wellKnownJWKS = wellKnownJWKS; + this.jwks = jwks; } public GetJWKSResponse( @@ -94,8 +94,8 @@ public HttpResponse rawResponse() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional wellKnownJWKS() { - return (Optional) wellKnownJWKS; + public Optional jwks() { + return (Optional) jwks; } public final static Builder builder() { @@ -132,18 +132,18 @@ public GetJWKSResponse withRawResponse(HttpResponse rawResponse) { /** * Get the JSON Web Key Set */ - public GetJWKSResponse withWellKnownJWKS(WellKnownJWKS wellKnownJWKS) { - Utils.checkNotNull(wellKnownJWKS, "wellKnownJWKS"); - this.wellKnownJWKS = Optional.ofNullable(wellKnownJWKS); + public GetJWKSResponse withJwks(Jwks jwks) { + Utils.checkNotNull(jwks, "jwks"); + this.jwks = Optional.ofNullable(jwks); return this; } /** * Get the JSON Web Key Set */ - public GetJWKSResponse withWellKnownJWKS(Optional wellKnownJWKS) { - Utils.checkNotNull(wellKnownJWKS, "wellKnownJWKS"); - this.wellKnownJWKS = wellKnownJWKS; + public GetJWKSResponse withJwks(Optional jwks) { + Utils.checkNotNull(jwks, "jwks"); + this.jwks = jwks; return this; } @@ -160,7 +160,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.contentType, other.contentType) && Objects.deepEquals(this.statusCode, other.statusCode) && Objects.deepEquals(this.rawResponse, other.rawResponse) && - Objects.deepEquals(this.wellKnownJWKS, other.wellKnownJWKS); + Objects.deepEquals(this.jwks, other.jwks); } @Override @@ -169,7 +169,7 @@ public int hashCode() { contentType, statusCode, rawResponse, - wellKnownJWKS); + jwks); } @Override @@ -178,7 +178,7 @@ public String toString() { "contentType", contentType, "statusCode", statusCode, "rawResponse", rawResponse, - "wellKnownJWKS", wellKnownJWKS); + "jwks", jwks); } public final static class Builder { @@ -189,7 +189,7 @@ public final static class Builder { private HttpResponse rawResponse; - private Optional wellKnownJWKS = Optional.empty(); + private Optional jwks = Optional.empty(); private Builder() { // force use of static builder() method @@ -225,18 +225,18 @@ public Builder rawResponse(HttpResponse rawResponse) { /** * Get the JSON Web Key Set */ - public Builder wellKnownJWKS(WellKnownJWKS wellKnownJWKS) { - Utils.checkNotNull(wellKnownJWKS, "wellKnownJWKS"); - this.wellKnownJWKS = Optional.ofNullable(wellKnownJWKS); + public Builder jwks(Jwks jwks) { + Utils.checkNotNull(jwks, "jwks"); + this.jwks = Optional.ofNullable(jwks); return this; } /** * Get the JSON Web Key Set */ - public Builder wellKnownJWKS(Optional wellKnownJWKS) { - Utils.checkNotNull(wellKnownJWKS, "wellKnownJWKS"); - this.wellKnownJWKS = wellKnownJWKS; + public Builder jwks(Optional jwks) { + Utils.checkNotNull(jwks, "jwks"); + this.jwks = jwks; return this; } @@ -245,7 +245,7 @@ public GetJWKSResponse build() { contentType, statusCode, rawResponse, - wellKnownJWKS); + jwks); } } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/GetOAuthAccessTokenPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/GetOAuthAccessTokenPublicMetadata.java deleted file mode 100644 index f05c431a..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/GetOAuthAccessTokenPublicMetadata.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - - -public class GetOAuthAccessTokenPublicMetadata { - - @JsonCreator - public GetOAuthAccessTokenPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(GetOAuthAccessTokenPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public GetOAuthAccessTokenPublicMetadata build() { - return new GetOAuthAccessTokenPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/GetUserListRequest.java b/src/main/java/com/clerk/backend_api/models/operations/GetUserListRequest.java index c94e9f5f..2ead2253 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/GetUserListRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/GetUserListRequest.java @@ -11,6 +11,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; +import java.lang.Deprecated; import java.lang.Long; import java.lang.Override; import java.lang.String; @@ -99,13 +101,76 @@ public class GetUserListRequest { private Optional query; /** - * Returns users that had session activity since the given date, with day precision. - * Providing a value with higher precision than day will result in an error. + * Returns users with emails that match the given query, via case-insensitive partial match. + * For example, `email_address_query=ello` will match a user with the email `HELLO@example.com`. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=email_address_query") + private Optional emailAddressQuery; + + /** + * Returns users with phone numbers that match the given query, via case-insensitive partial match. + * For example, `phone_number_query=555` will match a user with the phone number `+1555xxxxxxx`. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=phone_number_query") + private Optional phoneNumberQuery; + + /** + * Returns users with usernames that match the given query, via case-insensitive partial match. + * For example, `username_query=CoolUser` will match a user with the username `SomeCoolUser`. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=username_query") + private Optional usernameQuery; + + /** + * Returns users with names that match the given query, via case-insensitive partial match. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=name_query") + private Optional nameQuery; + + /** + * Returns users which are either banned (`banned=true`) or not banned (`banned=false`). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=banned") + private Optional banned; + + /** + * Returns users whose last session activity was before the given date (with millisecond precision). + * Example: use 1700690400000 to retrieve users whose last session activity was before 2023-11-23. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=last_active_at_before") + private Optional lastActiveAtBefore; + + /** + * Returns users whose last session activity was after the given date (with millisecond precision). + * Example: use 1700690400000 to retrieve users whose last session activity was after 2023-11-23. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=last_active_at_after") + private Optional lastActiveAtAfter; + + /** + * Returns users that had session activity since the given date. * Example: use 1700690400000 to retrieve users that had session activity from 2023-11-23 until the current day. + * Deprecated in favor of `last_active_at_after`. + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=last_active_at_since") + @Deprecated private Optional lastActiveAtSince; + /** + * Returns users who have been created before the given date (with millisecond precision). + * Example: use 1730160000000 to retrieve users who have been created before 2024-10-29. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=created_at_before") + private Optional createdAtBefore; + + /** + * Returns users who have been created after the given date (with millisecond precision). + * Example: use 1730160000000 to retrieve users who have been created after 2024-10-29. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=created_at_after") + private Optional createdAtAfter; + /** * Applies a limit to the number of results returned. * Can be used for paginating the results together with `offset`. @@ -142,7 +207,16 @@ public GetUserListRequest( Optional> userId, Optional> organizationId, Optional query, + Optional emailAddressQuery, + Optional phoneNumberQuery, + Optional usernameQuery, + Optional nameQuery, + Optional banned, + Optional lastActiveAtBefore, + Optional lastActiveAtAfter, Optional lastActiveAtSince, + Optional createdAtBefore, + Optional createdAtAfter, Optional limit, Optional offset, Optional orderBy) { @@ -154,7 +228,16 @@ public GetUserListRequest( Utils.checkNotNull(userId, "userId"); Utils.checkNotNull(organizationId, "organizationId"); Utils.checkNotNull(query, "query"); + Utils.checkNotNull(emailAddressQuery, "emailAddressQuery"); + Utils.checkNotNull(phoneNumberQuery, "phoneNumberQuery"); + Utils.checkNotNull(usernameQuery, "usernameQuery"); + Utils.checkNotNull(nameQuery, "nameQuery"); + Utils.checkNotNull(banned, "banned"); + Utils.checkNotNull(lastActiveAtBefore, "lastActiveAtBefore"); + Utils.checkNotNull(lastActiveAtAfter, "lastActiveAtAfter"); Utils.checkNotNull(lastActiveAtSince, "lastActiveAtSince"); + Utils.checkNotNull(createdAtBefore, "createdAtBefore"); + Utils.checkNotNull(createdAtAfter, "createdAtAfter"); Utils.checkNotNull(limit, "limit"); Utils.checkNotNull(offset, "offset"); Utils.checkNotNull(orderBy, "orderBy"); @@ -166,14 +249,23 @@ public GetUserListRequest( this.userId = userId; this.organizationId = organizationId; this.query = query; + this.emailAddressQuery = emailAddressQuery; + this.phoneNumberQuery = phoneNumberQuery; + this.usernameQuery = usernameQuery; + this.nameQuery = nameQuery; + this.banned = banned; + this.lastActiveAtBefore = lastActiveAtBefore; + this.lastActiveAtAfter = lastActiveAtAfter; this.lastActiveAtSince = lastActiveAtSince; + this.createdAtBefore = createdAtBefore; + this.createdAtAfter = createdAtAfter; this.limit = limit; this.offset = offset; this.orderBy = orderBy; } public GetUserListRequest() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -276,15 +368,96 @@ public Optional query() { } /** - * Returns users that had session activity since the given date, with day precision. - * Providing a value with higher precision than day will result in an error. + * Returns users with emails that match the given query, via case-insensitive partial match. + * For example, `email_address_query=ello` will match a user with the email `HELLO@example.com`. + */ + @JsonIgnore + public Optional emailAddressQuery() { + return emailAddressQuery; + } + + /** + * Returns users with phone numbers that match the given query, via case-insensitive partial match. + * For example, `phone_number_query=555` will match a user with the phone number `+1555xxxxxxx`. + */ + @JsonIgnore + public Optional phoneNumberQuery() { + return phoneNumberQuery; + } + + /** + * Returns users with usernames that match the given query, via case-insensitive partial match. + * For example, `username_query=CoolUser` will match a user with the username `SomeCoolUser`. + */ + @JsonIgnore + public Optional usernameQuery() { + return usernameQuery; + } + + /** + * Returns users with names that match the given query, via case-insensitive partial match. + */ + @JsonIgnore + public Optional nameQuery() { + return nameQuery; + } + + /** + * Returns users which are either banned (`banned=true`) or not banned (`banned=false`). + */ + @JsonIgnore + public Optional banned() { + return banned; + } + + /** + * Returns users whose last session activity was before the given date (with millisecond precision). + * Example: use 1700690400000 to retrieve users whose last session activity was before 2023-11-23. + */ + @JsonIgnore + public Optional lastActiveAtBefore() { + return lastActiveAtBefore; + } + + /** + * Returns users whose last session activity was after the given date (with millisecond precision). + * Example: use 1700690400000 to retrieve users whose last session activity was after 2023-11-23. + */ + @JsonIgnore + public Optional lastActiveAtAfter() { + return lastActiveAtAfter; + } + + /** + * Returns users that had session activity since the given date. * Example: use 1700690400000 to retrieve users that had session activity from 2023-11-23 until the current day. + * Deprecated in favor of `last_active_at_after`. + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated @JsonIgnore public Optional lastActiveAtSince() { return lastActiveAtSince; } + /** + * Returns users who have been created before the given date (with millisecond precision). + * Example: use 1730160000000 to retrieve users who have been created before 2024-10-29. + */ + @JsonIgnore + public Optional createdAtBefore() { + return createdAtBefore; + } + + /** + * Returns users who have been created after the given date (with millisecond precision). + * Example: use 1730160000000 to retrieve users who have been created after 2024-10-29. + */ + @JsonIgnore + public Optional createdAtAfter() { + return createdAtAfter; + } + /** * Applies a limit to the number of results returned. * Can be used for paginating the results together with `offset`. @@ -522,10 +695,148 @@ public GetUserListRequest withQuery(Optional query) { } /** - * Returns users that had session activity since the given date, with day precision. - * Providing a value with higher precision than day will result in an error. + * Returns users with emails that match the given query, via case-insensitive partial match. + * For example, `email_address_query=ello` will match a user with the email `HELLO@example.com`. + */ + public GetUserListRequest withEmailAddressQuery(String emailAddressQuery) { + Utils.checkNotNull(emailAddressQuery, "emailAddressQuery"); + this.emailAddressQuery = Optional.ofNullable(emailAddressQuery); + return this; + } + + /** + * Returns users with emails that match the given query, via case-insensitive partial match. + * For example, `email_address_query=ello` will match a user with the email `HELLO@example.com`. + */ + public GetUserListRequest withEmailAddressQuery(Optional emailAddressQuery) { + Utils.checkNotNull(emailAddressQuery, "emailAddressQuery"); + this.emailAddressQuery = emailAddressQuery; + return this; + } + + /** + * Returns users with phone numbers that match the given query, via case-insensitive partial match. + * For example, `phone_number_query=555` will match a user with the phone number `+1555xxxxxxx`. + */ + public GetUserListRequest withPhoneNumberQuery(String phoneNumberQuery) { + Utils.checkNotNull(phoneNumberQuery, "phoneNumberQuery"); + this.phoneNumberQuery = Optional.ofNullable(phoneNumberQuery); + return this; + } + + /** + * Returns users with phone numbers that match the given query, via case-insensitive partial match. + * For example, `phone_number_query=555` will match a user with the phone number `+1555xxxxxxx`. + */ + public GetUserListRequest withPhoneNumberQuery(Optional phoneNumberQuery) { + Utils.checkNotNull(phoneNumberQuery, "phoneNumberQuery"); + this.phoneNumberQuery = phoneNumberQuery; + return this; + } + + /** + * Returns users with usernames that match the given query, via case-insensitive partial match. + * For example, `username_query=CoolUser` will match a user with the username `SomeCoolUser`. + */ + public GetUserListRequest withUsernameQuery(String usernameQuery) { + Utils.checkNotNull(usernameQuery, "usernameQuery"); + this.usernameQuery = Optional.ofNullable(usernameQuery); + return this; + } + + /** + * Returns users with usernames that match the given query, via case-insensitive partial match. + * For example, `username_query=CoolUser` will match a user with the username `SomeCoolUser`. + */ + public GetUserListRequest withUsernameQuery(Optional usernameQuery) { + Utils.checkNotNull(usernameQuery, "usernameQuery"); + this.usernameQuery = usernameQuery; + return this; + } + + /** + * Returns users with names that match the given query, via case-insensitive partial match. + */ + public GetUserListRequest withNameQuery(String nameQuery) { + Utils.checkNotNull(nameQuery, "nameQuery"); + this.nameQuery = Optional.ofNullable(nameQuery); + return this; + } + + /** + * Returns users with names that match the given query, via case-insensitive partial match. + */ + public GetUserListRequest withNameQuery(Optional nameQuery) { + Utils.checkNotNull(nameQuery, "nameQuery"); + this.nameQuery = nameQuery; + return this; + } + + /** + * Returns users which are either banned (`banned=true`) or not banned (`banned=false`). + */ + public GetUserListRequest withBanned(boolean banned) { + Utils.checkNotNull(banned, "banned"); + this.banned = Optional.ofNullable(banned); + return this; + } + + /** + * Returns users which are either banned (`banned=true`) or not banned (`banned=false`). + */ + public GetUserListRequest withBanned(Optional banned) { + Utils.checkNotNull(banned, "banned"); + this.banned = banned; + return this; + } + + /** + * Returns users whose last session activity was before the given date (with millisecond precision). + * Example: use 1700690400000 to retrieve users whose last session activity was before 2023-11-23. + */ + public GetUserListRequest withLastActiveAtBefore(long lastActiveAtBefore) { + Utils.checkNotNull(lastActiveAtBefore, "lastActiveAtBefore"); + this.lastActiveAtBefore = Optional.ofNullable(lastActiveAtBefore); + return this; + } + + /** + * Returns users whose last session activity was before the given date (with millisecond precision). + * Example: use 1700690400000 to retrieve users whose last session activity was before 2023-11-23. + */ + public GetUserListRequest withLastActiveAtBefore(Optional lastActiveAtBefore) { + Utils.checkNotNull(lastActiveAtBefore, "lastActiveAtBefore"); + this.lastActiveAtBefore = lastActiveAtBefore; + return this; + } + + /** + * Returns users whose last session activity was after the given date (with millisecond precision). + * Example: use 1700690400000 to retrieve users whose last session activity was after 2023-11-23. + */ + public GetUserListRequest withLastActiveAtAfter(long lastActiveAtAfter) { + Utils.checkNotNull(lastActiveAtAfter, "lastActiveAtAfter"); + this.lastActiveAtAfter = Optional.ofNullable(lastActiveAtAfter); + return this; + } + + /** + * Returns users whose last session activity was after the given date (with millisecond precision). + * Example: use 1700690400000 to retrieve users whose last session activity was after 2023-11-23. + */ + public GetUserListRequest withLastActiveAtAfter(Optional lastActiveAtAfter) { + Utils.checkNotNull(lastActiveAtAfter, "lastActiveAtAfter"); + this.lastActiveAtAfter = lastActiveAtAfter; + return this; + } + + /** + * Returns users that had session activity since the given date. * Example: use 1700690400000 to retrieve users that had session activity from 2023-11-23 until the current day. + * Deprecated in favor of `last_active_at_after`. + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public GetUserListRequest withLastActiveAtSince(long lastActiveAtSince) { Utils.checkNotNull(lastActiveAtSince, "lastActiveAtSince"); this.lastActiveAtSince = Optional.ofNullable(lastActiveAtSince); @@ -533,16 +844,58 @@ public GetUserListRequest withLastActiveAtSince(long lastActiveAtSince) { } /** - * Returns users that had session activity since the given date, with day precision. - * Providing a value with higher precision than day will result in an error. + * Returns users that had session activity since the given date. * Example: use 1700690400000 to retrieve users that had session activity from 2023-11-23 until the current day. + * Deprecated in favor of `last_active_at_after`. + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public GetUserListRequest withLastActiveAtSince(Optional lastActiveAtSince) { Utils.checkNotNull(lastActiveAtSince, "lastActiveAtSince"); this.lastActiveAtSince = lastActiveAtSince; return this; } + /** + * Returns users who have been created before the given date (with millisecond precision). + * Example: use 1730160000000 to retrieve users who have been created before 2024-10-29. + */ + public GetUserListRequest withCreatedAtBefore(long createdAtBefore) { + Utils.checkNotNull(createdAtBefore, "createdAtBefore"); + this.createdAtBefore = Optional.ofNullable(createdAtBefore); + return this; + } + + /** + * Returns users who have been created before the given date (with millisecond precision). + * Example: use 1730160000000 to retrieve users who have been created before 2024-10-29. + */ + public GetUserListRequest withCreatedAtBefore(Optional createdAtBefore) { + Utils.checkNotNull(createdAtBefore, "createdAtBefore"); + this.createdAtBefore = createdAtBefore; + return this; + } + + /** + * Returns users who have been created after the given date (with millisecond precision). + * Example: use 1730160000000 to retrieve users who have been created after 2024-10-29. + */ + public GetUserListRequest withCreatedAtAfter(long createdAtAfter) { + Utils.checkNotNull(createdAtAfter, "createdAtAfter"); + this.createdAtAfter = Optional.ofNullable(createdAtAfter); + return this; + } + + /** + * Returns users who have been created after the given date (with millisecond precision). + * Example: use 1730160000000 to retrieve users who have been created after 2024-10-29. + */ + public GetUserListRequest withCreatedAtAfter(Optional createdAtAfter) { + Utils.checkNotNull(createdAtAfter, "createdAtAfter"); + this.createdAtAfter = createdAtAfter; + return this; + } + /** * Applies a limit to the number of results returned. * Can be used for paginating the results together with `offset`. @@ -631,7 +984,16 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.userId, other.userId) && Objects.deepEquals(this.organizationId, other.organizationId) && Objects.deepEquals(this.query, other.query) && + Objects.deepEquals(this.emailAddressQuery, other.emailAddressQuery) && + Objects.deepEquals(this.phoneNumberQuery, other.phoneNumberQuery) && + Objects.deepEquals(this.usernameQuery, other.usernameQuery) && + Objects.deepEquals(this.nameQuery, other.nameQuery) && + Objects.deepEquals(this.banned, other.banned) && + Objects.deepEquals(this.lastActiveAtBefore, other.lastActiveAtBefore) && + Objects.deepEquals(this.lastActiveAtAfter, other.lastActiveAtAfter) && Objects.deepEquals(this.lastActiveAtSince, other.lastActiveAtSince) && + Objects.deepEquals(this.createdAtBefore, other.createdAtBefore) && + Objects.deepEquals(this.createdAtAfter, other.createdAtAfter) && Objects.deepEquals(this.limit, other.limit) && Objects.deepEquals(this.offset, other.offset) && Objects.deepEquals(this.orderBy, other.orderBy); @@ -648,7 +1010,16 @@ public int hashCode() { userId, organizationId, query, + emailAddressQuery, + phoneNumberQuery, + usernameQuery, + nameQuery, + banned, + lastActiveAtBefore, + lastActiveAtAfter, lastActiveAtSince, + createdAtBefore, + createdAtAfter, limit, offset, orderBy); @@ -665,7 +1036,16 @@ public String toString() { "userId", userId, "organizationId", organizationId, "query", query, + "emailAddressQuery", emailAddressQuery, + "phoneNumberQuery", phoneNumberQuery, + "usernameQuery", usernameQuery, + "nameQuery", nameQuery, + "banned", banned, + "lastActiveAtBefore", lastActiveAtBefore, + "lastActiveAtAfter", lastActiveAtAfter, "lastActiveAtSince", lastActiveAtSince, + "createdAtBefore", createdAtBefore, + "createdAtAfter", createdAtAfter, "limit", limit, "offset", offset, "orderBy", orderBy); @@ -689,8 +1069,27 @@ public final static class Builder { private Optional query = Optional.empty(); + private Optional emailAddressQuery = Optional.empty(); + + private Optional phoneNumberQuery = Optional.empty(); + + private Optional usernameQuery = Optional.empty(); + + private Optional nameQuery = Optional.empty(); + + private Optional banned = Optional.empty(); + + private Optional lastActiveAtBefore = Optional.empty(); + + private Optional lastActiveAtAfter = Optional.empty(); + + @Deprecated private Optional lastActiveAtSince = Optional.empty(); + private Optional createdAtBefore = Optional.empty(); + + private Optional createdAtAfter = Optional.empty(); + private Optional limit; private Optional offset; @@ -902,10 +1301,148 @@ public Builder query(Optional query) { } /** - * Returns users that had session activity since the given date, with day precision. - * Providing a value with higher precision than day will result in an error. + * Returns users with emails that match the given query, via case-insensitive partial match. + * For example, `email_address_query=ello` will match a user with the email `HELLO@example.com`. + */ + public Builder emailAddressQuery(String emailAddressQuery) { + Utils.checkNotNull(emailAddressQuery, "emailAddressQuery"); + this.emailAddressQuery = Optional.ofNullable(emailAddressQuery); + return this; + } + + /** + * Returns users with emails that match the given query, via case-insensitive partial match. + * For example, `email_address_query=ello` will match a user with the email `HELLO@example.com`. + */ + public Builder emailAddressQuery(Optional emailAddressQuery) { + Utils.checkNotNull(emailAddressQuery, "emailAddressQuery"); + this.emailAddressQuery = emailAddressQuery; + return this; + } + + /** + * Returns users with phone numbers that match the given query, via case-insensitive partial match. + * For example, `phone_number_query=555` will match a user with the phone number `+1555xxxxxxx`. + */ + public Builder phoneNumberQuery(String phoneNumberQuery) { + Utils.checkNotNull(phoneNumberQuery, "phoneNumberQuery"); + this.phoneNumberQuery = Optional.ofNullable(phoneNumberQuery); + return this; + } + + /** + * Returns users with phone numbers that match the given query, via case-insensitive partial match. + * For example, `phone_number_query=555` will match a user with the phone number `+1555xxxxxxx`. + */ + public Builder phoneNumberQuery(Optional phoneNumberQuery) { + Utils.checkNotNull(phoneNumberQuery, "phoneNumberQuery"); + this.phoneNumberQuery = phoneNumberQuery; + return this; + } + + /** + * Returns users with usernames that match the given query, via case-insensitive partial match. + * For example, `username_query=CoolUser` will match a user with the username `SomeCoolUser`. + */ + public Builder usernameQuery(String usernameQuery) { + Utils.checkNotNull(usernameQuery, "usernameQuery"); + this.usernameQuery = Optional.ofNullable(usernameQuery); + return this; + } + + /** + * Returns users with usernames that match the given query, via case-insensitive partial match. + * For example, `username_query=CoolUser` will match a user with the username `SomeCoolUser`. + */ + public Builder usernameQuery(Optional usernameQuery) { + Utils.checkNotNull(usernameQuery, "usernameQuery"); + this.usernameQuery = usernameQuery; + return this; + } + + /** + * Returns users with names that match the given query, via case-insensitive partial match. + */ + public Builder nameQuery(String nameQuery) { + Utils.checkNotNull(nameQuery, "nameQuery"); + this.nameQuery = Optional.ofNullable(nameQuery); + return this; + } + + /** + * Returns users with names that match the given query, via case-insensitive partial match. + */ + public Builder nameQuery(Optional nameQuery) { + Utils.checkNotNull(nameQuery, "nameQuery"); + this.nameQuery = nameQuery; + return this; + } + + /** + * Returns users which are either banned (`banned=true`) or not banned (`banned=false`). + */ + public Builder banned(boolean banned) { + Utils.checkNotNull(banned, "banned"); + this.banned = Optional.ofNullable(banned); + return this; + } + + /** + * Returns users which are either banned (`banned=true`) or not banned (`banned=false`). + */ + public Builder banned(Optional banned) { + Utils.checkNotNull(banned, "banned"); + this.banned = banned; + return this; + } + + /** + * Returns users whose last session activity was before the given date (with millisecond precision). + * Example: use 1700690400000 to retrieve users whose last session activity was before 2023-11-23. + */ + public Builder lastActiveAtBefore(long lastActiveAtBefore) { + Utils.checkNotNull(lastActiveAtBefore, "lastActiveAtBefore"); + this.lastActiveAtBefore = Optional.ofNullable(lastActiveAtBefore); + return this; + } + + /** + * Returns users whose last session activity was before the given date (with millisecond precision). + * Example: use 1700690400000 to retrieve users whose last session activity was before 2023-11-23. + */ + public Builder lastActiveAtBefore(Optional lastActiveAtBefore) { + Utils.checkNotNull(lastActiveAtBefore, "lastActiveAtBefore"); + this.lastActiveAtBefore = lastActiveAtBefore; + return this; + } + + /** + * Returns users whose last session activity was after the given date (with millisecond precision). + * Example: use 1700690400000 to retrieve users whose last session activity was after 2023-11-23. + */ + public Builder lastActiveAtAfter(long lastActiveAtAfter) { + Utils.checkNotNull(lastActiveAtAfter, "lastActiveAtAfter"); + this.lastActiveAtAfter = Optional.ofNullable(lastActiveAtAfter); + return this; + } + + /** + * Returns users whose last session activity was after the given date (with millisecond precision). + * Example: use 1700690400000 to retrieve users whose last session activity was after 2023-11-23. + */ + public Builder lastActiveAtAfter(Optional lastActiveAtAfter) { + Utils.checkNotNull(lastActiveAtAfter, "lastActiveAtAfter"); + this.lastActiveAtAfter = lastActiveAtAfter; + return this; + } + + /** + * Returns users that had session activity since the given date. * Example: use 1700690400000 to retrieve users that had session activity from 2023-11-23 until the current day. + * Deprecated in favor of `last_active_at_after`. + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public Builder lastActiveAtSince(long lastActiveAtSince) { Utils.checkNotNull(lastActiveAtSince, "lastActiveAtSince"); this.lastActiveAtSince = Optional.ofNullable(lastActiveAtSince); @@ -913,16 +1450,58 @@ public Builder lastActiveAtSince(long lastActiveAtSince) { } /** - * Returns users that had session activity since the given date, with day precision. - * Providing a value with higher precision than day will result in an error. + * Returns users that had session activity since the given date. * Example: use 1700690400000 to retrieve users that had session activity from 2023-11-23 until the current day. + * Deprecated in favor of `last_active_at_after`. + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public Builder lastActiveAtSince(Optional lastActiveAtSince) { Utils.checkNotNull(lastActiveAtSince, "lastActiveAtSince"); this.lastActiveAtSince = lastActiveAtSince; return this; } + /** + * Returns users who have been created before the given date (with millisecond precision). + * Example: use 1730160000000 to retrieve users who have been created before 2024-10-29. + */ + public Builder createdAtBefore(long createdAtBefore) { + Utils.checkNotNull(createdAtBefore, "createdAtBefore"); + this.createdAtBefore = Optional.ofNullable(createdAtBefore); + return this; + } + + /** + * Returns users who have been created before the given date (with millisecond precision). + * Example: use 1730160000000 to retrieve users who have been created before 2024-10-29. + */ + public Builder createdAtBefore(Optional createdAtBefore) { + Utils.checkNotNull(createdAtBefore, "createdAtBefore"); + this.createdAtBefore = createdAtBefore; + return this; + } + + /** + * Returns users who have been created after the given date (with millisecond precision). + * Example: use 1730160000000 to retrieve users who have been created after 2024-10-29. + */ + public Builder createdAtAfter(long createdAtAfter) { + Utils.checkNotNull(createdAtAfter, "createdAtAfter"); + this.createdAtAfter = Optional.ofNullable(createdAtAfter); + return this; + } + + /** + * Returns users who have been created after the given date (with millisecond precision). + * Example: use 1730160000000 to retrieve users who have been created after 2024-10-29. + */ + public Builder createdAtAfter(Optional createdAtAfter) { + Utils.checkNotNull(createdAtAfter, "createdAtAfter"); + this.createdAtAfter = createdAtAfter; + return this; + } + /** * Applies a limit to the number of results returned. * Can be used for paginating the results together with `offset`. @@ -1011,7 +1590,16 @@ public GetUserListRequest build() { userId, organizationId, query, + emailAddressQuery, + phoneNumberQuery, + usernameQuery, + nameQuery, + banned, + lastActiveAtBefore, + lastActiveAtAfter, lastActiveAtSince, + createdAtBefore, + createdAtAfter, limit, offset, orderBy); diff --git a/src/main/java/com/clerk/backend_api/models/operations/GetUsersCountRequest.java b/src/main/java/com/clerk/backend_api/models/operations/GetUsersCountRequest.java index e90b776b..255f9573 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/GetUsersCountRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/GetUsersCountRequest.java @@ -9,6 +9,7 @@ import com.clerk.backend_api.utils.Utils; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import java.lang.Boolean; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -75,6 +76,36 @@ public class GetUsersCountRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=query") private Optional query; + /** + * Counts users with emails that match the given query, via case-insensitive partial match. + * For example, `email_address_query=ello` will match a user with the email `HELLO@example.com`, + * and will be included in the resulting count. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=email_address_query") + private Optional emailAddressQuery; + + /** + * Counts users with phone numbers that match the given query, via case-insensitive partial match. + * For example, `phone_number_query=555` will match a user with the phone number `+1555xxxxxxx`, + * and will be included in the resulting count. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=phone_number_query") + private Optional phoneNumberQuery; + + /** + * Counts users with usernames that match the given query, via case-insensitive partial match. + * For example, `username_query=CoolUser` will match a user with the username `SomeCoolUser`, + * and will be included in the resulting count. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=username_query") + private Optional usernameQuery; + + /** + * Counts users which are either banned (`banned=true`) or not banned (`banned=false`). + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=banned") + private Optional banned; + @JsonCreator public GetUsersCountRequest( Optional> emailAddress, @@ -83,7 +114,11 @@ public GetUsersCountRequest( Optional> username, Optional> web3Wallet, Optional> userId, - Optional query) { + Optional query, + Optional emailAddressQuery, + Optional phoneNumberQuery, + Optional usernameQuery, + Optional banned) { Utils.checkNotNull(emailAddress, "emailAddress"); Utils.checkNotNull(phoneNumber, "phoneNumber"); Utils.checkNotNull(externalId, "externalId"); @@ -91,6 +126,10 @@ public GetUsersCountRequest( Utils.checkNotNull(web3Wallet, "web3Wallet"); Utils.checkNotNull(userId, "userId"); Utils.checkNotNull(query, "query"); + Utils.checkNotNull(emailAddressQuery, "emailAddressQuery"); + Utils.checkNotNull(phoneNumberQuery, "phoneNumberQuery"); + Utils.checkNotNull(usernameQuery, "usernameQuery"); + Utils.checkNotNull(banned, "banned"); this.emailAddress = emailAddress; this.phoneNumber = phoneNumber; this.externalId = externalId; @@ -98,10 +137,14 @@ public GetUsersCountRequest( this.web3Wallet = web3Wallet; this.userId = userId; this.query = query; + this.emailAddressQuery = emailAddressQuery; + this.phoneNumberQuery = phoneNumberQuery; + this.usernameQuery = usernameQuery; + this.banned = banned; } public GetUsersCountRequest() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -180,6 +223,44 @@ public Optional query() { return query; } + /** + * Counts users with emails that match the given query, via case-insensitive partial match. + * For example, `email_address_query=ello` will match a user with the email `HELLO@example.com`, + * and will be included in the resulting count. + */ + @JsonIgnore + public Optional emailAddressQuery() { + return emailAddressQuery; + } + + /** + * Counts users with phone numbers that match the given query, via case-insensitive partial match. + * For example, `phone_number_query=555` will match a user with the phone number `+1555xxxxxxx`, + * and will be included in the resulting count. + */ + @JsonIgnore + public Optional phoneNumberQuery() { + return phoneNumberQuery; + } + + /** + * Counts users with usernames that match the given query, via case-insensitive partial match. + * For example, `username_query=CoolUser` will match a user with the username `SomeCoolUser`, + * and will be included in the resulting count. + */ + @JsonIgnore + public Optional usernameQuery() { + return usernameQuery; + } + + /** + * Counts users which are either banned (`banned=true`) or not banned (`banned=false`). + */ + @JsonIgnore + public Optional banned() { + return banned; + } + public final static Builder builder() { return new Builder(); } @@ -337,6 +418,90 @@ public GetUsersCountRequest withQuery(Optional query) { this.query = query; return this; } + + /** + * Counts users with emails that match the given query, via case-insensitive partial match. + * For example, `email_address_query=ello` will match a user with the email `HELLO@example.com`, + * and will be included in the resulting count. + */ + public GetUsersCountRequest withEmailAddressQuery(String emailAddressQuery) { + Utils.checkNotNull(emailAddressQuery, "emailAddressQuery"); + this.emailAddressQuery = Optional.ofNullable(emailAddressQuery); + return this; + } + + /** + * Counts users with emails that match the given query, via case-insensitive partial match. + * For example, `email_address_query=ello` will match a user with the email `HELLO@example.com`, + * and will be included in the resulting count. + */ + public GetUsersCountRequest withEmailAddressQuery(Optional emailAddressQuery) { + Utils.checkNotNull(emailAddressQuery, "emailAddressQuery"); + this.emailAddressQuery = emailAddressQuery; + return this; + } + + /** + * Counts users with phone numbers that match the given query, via case-insensitive partial match. + * For example, `phone_number_query=555` will match a user with the phone number `+1555xxxxxxx`, + * and will be included in the resulting count. + */ + public GetUsersCountRequest withPhoneNumberQuery(String phoneNumberQuery) { + Utils.checkNotNull(phoneNumberQuery, "phoneNumberQuery"); + this.phoneNumberQuery = Optional.ofNullable(phoneNumberQuery); + return this; + } + + /** + * Counts users with phone numbers that match the given query, via case-insensitive partial match. + * For example, `phone_number_query=555` will match a user with the phone number `+1555xxxxxxx`, + * and will be included in the resulting count. + */ + public GetUsersCountRequest withPhoneNumberQuery(Optional phoneNumberQuery) { + Utils.checkNotNull(phoneNumberQuery, "phoneNumberQuery"); + this.phoneNumberQuery = phoneNumberQuery; + return this; + } + + /** + * Counts users with usernames that match the given query, via case-insensitive partial match. + * For example, `username_query=CoolUser` will match a user with the username `SomeCoolUser`, + * and will be included in the resulting count. + */ + public GetUsersCountRequest withUsernameQuery(String usernameQuery) { + Utils.checkNotNull(usernameQuery, "usernameQuery"); + this.usernameQuery = Optional.ofNullable(usernameQuery); + return this; + } + + /** + * Counts users with usernames that match the given query, via case-insensitive partial match. + * For example, `username_query=CoolUser` will match a user with the username `SomeCoolUser`, + * and will be included in the resulting count. + */ + public GetUsersCountRequest withUsernameQuery(Optional usernameQuery) { + Utils.checkNotNull(usernameQuery, "usernameQuery"); + this.usernameQuery = usernameQuery; + return this; + } + + /** + * Counts users which are either banned (`banned=true`) or not banned (`banned=false`). + */ + public GetUsersCountRequest withBanned(boolean banned) { + Utils.checkNotNull(banned, "banned"); + this.banned = Optional.ofNullable(banned); + return this; + } + + /** + * Counts users which are either banned (`banned=true`) or not banned (`banned=false`). + */ + public GetUsersCountRequest withBanned(Optional banned) { + Utils.checkNotNull(banned, "banned"); + this.banned = banned; + return this; + } @Override public boolean equals(java.lang.Object o) { @@ -354,7 +519,11 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.username, other.username) && Objects.deepEquals(this.web3Wallet, other.web3Wallet) && Objects.deepEquals(this.userId, other.userId) && - Objects.deepEquals(this.query, other.query); + Objects.deepEquals(this.query, other.query) && + Objects.deepEquals(this.emailAddressQuery, other.emailAddressQuery) && + Objects.deepEquals(this.phoneNumberQuery, other.phoneNumberQuery) && + Objects.deepEquals(this.usernameQuery, other.usernameQuery) && + Objects.deepEquals(this.banned, other.banned); } @Override @@ -366,7 +535,11 @@ public int hashCode() { username, web3Wallet, userId, - query); + query, + emailAddressQuery, + phoneNumberQuery, + usernameQuery, + banned); } @Override @@ -378,7 +551,11 @@ public String toString() { "username", username, "web3Wallet", web3Wallet, "userId", userId, - "query", query); + "query", query, + "emailAddressQuery", emailAddressQuery, + "phoneNumberQuery", phoneNumberQuery, + "usernameQuery", usernameQuery, + "banned", banned); } public final static class Builder { @@ -395,7 +572,15 @@ public final static class Builder { private Optional> userId = Optional.empty(); - private Optional query = Optional.empty(); + private Optional query = Optional.empty(); + + private Optional emailAddressQuery = Optional.empty(); + + private Optional phoneNumberQuery = Optional.empty(); + + private Optional usernameQuery = Optional.empty(); + + private Optional banned = Optional.empty(); private Builder() { // force use of static builder() method @@ -554,6 +739,90 @@ public Builder query(Optional query) { this.query = query; return this; } + + /** + * Counts users with emails that match the given query, via case-insensitive partial match. + * For example, `email_address_query=ello` will match a user with the email `HELLO@example.com`, + * and will be included in the resulting count. + */ + public Builder emailAddressQuery(String emailAddressQuery) { + Utils.checkNotNull(emailAddressQuery, "emailAddressQuery"); + this.emailAddressQuery = Optional.ofNullable(emailAddressQuery); + return this; + } + + /** + * Counts users with emails that match the given query, via case-insensitive partial match. + * For example, `email_address_query=ello` will match a user with the email `HELLO@example.com`, + * and will be included in the resulting count. + */ + public Builder emailAddressQuery(Optional emailAddressQuery) { + Utils.checkNotNull(emailAddressQuery, "emailAddressQuery"); + this.emailAddressQuery = emailAddressQuery; + return this; + } + + /** + * Counts users with phone numbers that match the given query, via case-insensitive partial match. + * For example, `phone_number_query=555` will match a user with the phone number `+1555xxxxxxx`, + * and will be included in the resulting count. + */ + public Builder phoneNumberQuery(String phoneNumberQuery) { + Utils.checkNotNull(phoneNumberQuery, "phoneNumberQuery"); + this.phoneNumberQuery = Optional.ofNullable(phoneNumberQuery); + return this; + } + + /** + * Counts users with phone numbers that match the given query, via case-insensitive partial match. + * For example, `phone_number_query=555` will match a user with the phone number `+1555xxxxxxx`, + * and will be included in the resulting count. + */ + public Builder phoneNumberQuery(Optional phoneNumberQuery) { + Utils.checkNotNull(phoneNumberQuery, "phoneNumberQuery"); + this.phoneNumberQuery = phoneNumberQuery; + return this; + } + + /** + * Counts users with usernames that match the given query, via case-insensitive partial match. + * For example, `username_query=CoolUser` will match a user with the username `SomeCoolUser`, + * and will be included in the resulting count. + */ + public Builder usernameQuery(String usernameQuery) { + Utils.checkNotNull(usernameQuery, "usernameQuery"); + this.usernameQuery = Optional.ofNullable(usernameQuery); + return this; + } + + /** + * Counts users with usernames that match the given query, via case-insensitive partial match. + * For example, `username_query=CoolUser` will match a user with the username `SomeCoolUser`, + * and will be included in the resulting count. + */ + public Builder usernameQuery(Optional usernameQuery) { + Utils.checkNotNull(usernameQuery, "usernameQuery"); + this.usernameQuery = usernameQuery; + return this; + } + + /** + * Counts users which are either banned (`banned=true`) or not banned (`banned=false`). + */ + public Builder banned(boolean banned) { + Utils.checkNotNull(banned, "banned"); + this.banned = Optional.ofNullable(banned); + return this; + } + + /** + * Counts users which are either banned (`banned=true`) or not banned (`banned=false`). + */ + public Builder banned(Optional banned) { + Utils.checkNotNull(banned, "banned"); + this.banned = banned; + return this; + } public GetUsersCountRequest build() { return new GetUsersCountRequest( @@ -563,7 +832,11 @@ public GetUsersCountRequest build() { username, web3Wallet, userId, - query); + query, + emailAddressQuery, + phoneNumberQuery, + usernameQuery, + banned); } } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/ListInvitationsRequest.java b/src/main/java/com/clerk/backend_api/models/operations/ListInvitationsRequest.java index 51f76213..6b52cc6a 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/ListInvitationsRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/ListInvitationsRequest.java @@ -42,21 +42,30 @@ public class ListInvitationsRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=status") private Optional status; + /** + * Filter invitations based on their `email_address` or `id` + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=query") + private Optional query; + @JsonCreator public ListInvitationsRequest( Optional limit, Optional offset, - Optional status) { + Optional status, + Optional query) { Utils.checkNotNull(limit, "limit"); Utils.checkNotNull(offset, "offset"); Utils.checkNotNull(status, "status"); + Utils.checkNotNull(query, "query"); this.limit = limit; this.offset = offset; this.status = status; + this.query = query; } public ListInvitationsRequest() { - this(Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -87,6 +96,14 @@ public Optional status() { return (Optional) status; } + /** + * Filter invitations based on their `email_address` or `id` + */ + @JsonIgnore + public Optional query() { + return query; + } + public final static Builder builder() { return new Builder(); } @@ -150,6 +167,24 @@ public ListInvitationsRequest withStatus(Optional query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } @Override public boolean equals(java.lang.Object o) { @@ -163,7 +198,8 @@ public boolean equals(java.lang.Object o) { return Objects.deepEquals(this.limit, other.limit) && Objects.deepEquals(this.offset, other.offset) && - Objects.deepEquals(this.status, other.status); + Objects.deepEquals(this.status, other.status) && + Objects.deepEquals(this.query, other.query); } @Override @@ -171,7 +207,8 @@ public int hashCode() { return Objects.hash( limit, offset, - status); + status, + query); } @Override @@ -179,7 +216,8 @@ public String toString() { return Utils.toString(ListInvitationsRequest.class, "limit", limit, "offset", offset, - "status", status); + "status", status, + "query", query); } public final static class Builder { @@ -188,7 +226,9 @@ public final static class Builder { private Optional offset; - private Optional status = Optional.empty(); + private Optional status = Optional.empty(); + + private Optional query = Optional.empty(); private Builder() { // force use of static builder() method @@ -253,6 +293,24 @@ public Builder status(Optional status this.status = status; return this; } + + /** + * Filter invitations based on their `email_address` or `id` + */ + public Builder query(String query) { + Utils.checkNotNull(query, "query"); + this.query = Optional.ofNullable(query); + return this; + } + + /** + * Filter invitations based on their `email_address` or `id` + */ + public Builder query(Optional query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } public ListInvitationsRequest build() { if (limit == null) { @@ -263,7 +321,8 @@ public ListInvitationsRequest build() { } return new ListInvitationsRequest( limit, offset, - status); + status, + query); } private static final LazySingletonValue> _SINGLETON_VALUE_Limit = diff --git a/src/main/java/com/clerk/backend_api/models/operations/ListInvitationsRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/ListInvitationsRequestBuilder.java index 6511f0af..7e6c0648 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/ListInvitationsRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/ListInvitationsRequestBuilder.java @@ -8,6 +8,7 @@ import com.clerk.backend_api.utils.Utils; import com.fasterxml.jackson.core.type.TypeReference; import java.lang.Long; +import java.lang.String; import java.util.Optional; public class ListInvitationsRequestBuilder { @@ -21,6 +22,7 @@ public class ListInvitationsRequestBuilder { "0", new TypeReference>() {}); private Optional status = Optional.empty(); + private Optional query = Optional.empty(); private final SDKMethodInterfaces.MethodCallListInvitations sdk; public ListInvitationsRequestBuilder(SDKMethodInterfaces.MethodCallListInvitations sdk) { @@ -62,6 +64,18 @@ public ListInvitationsRequestBuilder status(Optional query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } public ListInvitationsResponse call() throws Exception { if (limit == null) { @@ -73,7 +87,8 @@ public ListInvitationsResponse call() throws Exception { return sdk.list( limit, offset, - status); + status, + query); } private static final LazySingletonValue> _SINGLETON_VALUE_Limit = diff --git a/src/main/java/com/clerk/backend_api/models/operations/ListSAMLConnectionsRequest.java b/src/main/java/com/clerk/backend_api/models/operations/ListSAMLConnectionsRequest.java index 63d4175f..fdad290d 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/ListSAMLConnectionsRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/ListSAMLConnectionsRequest.java @@ -14,6 +14,8 @@ import java.lang.Long; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; import java.util.Objects; import java.util.Optional; @@ -35,18 +37,33 @@ public class ListSAMLConnectionsRequest { @SpeakeasyMetadata("queryParam:style=form,explode=true,name=offset") private Optional offset; + /** + * Returns SAML connections that have an associated organization ID to the + * given organizations. + * For each organization id, the `+` and `-` can be + * prepended to the id, which denote whether the + * respective organization should be included or + * excluded from the result set. + * Accepts up to 100 organization ids. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=organization_id") + private Optional> organizationId; + @JsonCreator public ListSAMLConnectionsRequest( Optional limit, - Optional offset) { + Optional offset, + Optional> organizationId) { Utils.checkNotNull(limit, "limit"); Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(organizationId, "organizationId"); this.limit = limit; this.offset = offset; + this.organizationId = organizationId; } public ListSAMLConnectionsRequest() { - this(Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -68,6 +85,21 @@ public Optional offset() { return offset; } + /** + * Returns SAML connections that have an associated organization ID to the + * given organizations. + * For each organization id, the `+` and `-` can be + * prepended to the id, which denote whether the + * respective organization should be included or + * excluded from the result set. + * Accepts up to 100 organization ids. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> organizationId() { + return (Optional>) organizationId; + } + public final static Builder builder() { return new Builder(); } @@ -113,6 +145,36 @@ public ListSAMLConnectionsRequest withOffset(Optional offset) { this.offset = offset; return this; } + + /** + * Returns SAML connections that have an associated organization ID to the + * given organizations. + * For each organization id, the `+` and `-` can be + * prepended to the id, which denote whether the + * respective organization should be included or + * excluded from the result set. + * Accepts up to 100 organization ids. + */ + public ListSAMLConnectionsRequest withOrganizationId(List organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = Optional.ofNullable(organizationId); + return this; + } + + /** + * Returns SAML connections that have an associated organization ID to the + * given organizations. + * For each organization id, the `+` and `-` can be + * prepended to the id, which denote whether the + * respective organization should be included or + * excluded from the result set. + * Accepts up to 100 organization ids. + */ + public ListSAMLConnectionsRequest withOrganizationId(Optional> organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } @Override public boolean equals(java.lang.Object o) { @@ -125,28 +187,33 @@ public boolean equals(java.lang.Object o) { ListSAMLConnectionsRequest other = (ListSAMLConnectionsRequest) o; return Objects.deepEquals(this.limit, other.limit) && - Objects.deepEquals(this.offset, other.offset); + Objects.deepEquals(this.offset, other.offset) && + Objects.deepEquals(this.organizationId, other.organizationId); } @Override public int hashCode() { return Objects.hash( limit, - offset); + offset, + organizationId); } @Override public String toString() { return Utils.toString(ListSAMLConnectionsRequest.class, "limit", limit, - "offset", offset); + "offset", offset, + "organizationId", organizationId); } public final static class Builder { private Optional limit; - private Optional offset; + private Optional offset; + + private Optional> organizationId = Optional.empty(); private Builder() { // force use of static builder() method @@ -193,6 +260,36 @@ public Builder offset(Optional offset) { this.offset = offset; return this; } + + /** + * Returns SAML connections that have an associated organization ID to the + * given organizations. + * For each organization id, the `+` and `-` can be + * prepended to the id, which denote whether the + * respective organization should be included or + * excluded from the result set. + * Accepts up to 100 organization ids. + */ + public Builder organizationId(List organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = Optional.ofNullable(organizationId); + return this; + } + + /** + * Returns SAML connections that have an associated organization ID to the + * given organizations. + * For each organization id, the `+` and `-` can be + * prepended to the id, which denote whether the + * respective organization should be included or + * excluded from the result set. + * Accepts up to 100 organization ids. + */ + public Builder organizationId(Optional> organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } public ListSAMLConnectionsRequest build() { if (limit == null) { @@ -202,7 +299,8 @@ public ListSAMLConnectionsRequest build() { offset = _SINGLETON_VALUE_Offset.value(); } return new ListSAMLConnectionsRequest( limit, - offset); + offset, + organizationId); } private static final LazySingletonValue> _SINGLETON_VALUE_Limit = diff --git a/src/main/java/com/clerk/backend_api/models/operations/ListSAMLConnectionsRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/ListSAMLConnectionsRequestBuilder.java index 4d59c524..f7ba7e4f 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/ListSAMLConnectionsRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/ListSAMLConnectionsRequestBuilder.java @@ -8,6 +8,8 @@ import com.clerk.backend_api.utils.Utils; import com.fasterxml.jackson.core.type.TypeReference; import java.lang.Long; +import java.lang.String; +import java.util.List; import java.util.Optional; public class ListSAMLConnectionsRequestBuilder { @@ -20,6 +22,7 @@ public class ListSAMLConnectionsRequestBuilder { "offset", "0", new TypeReference>() {}); + private Optional> organizationId = Optional.empty(); private final SDKMethodInterfaces.MethodCallListSAMLConnections sdk; public ListSAMLConnectionsRequestBuilder(SDKMethodInterfaces.MethodCallListSAMLConnections sdk) { @@ -49,6 +52,18 @@ public ListSAMLConnectionsRequestBuilder offset(Optional offset) { this.offset = offset; return this; } + + public ListSAMLConnectionsRequestBuilder organizationId(List organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = Optional.of(organizationId); + return this; + } + + public ListSAMLConnectionsRequestBuilder organizationId(Optional> organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } public ListSAMLConnectionsResponse call() throws Exception { if (limit == null) { @@ -59,7 +74,8 @@ public ListSAMLConnectionsResponse call() throws Exception { } return sdk.list( limit, - offset); + offset, + organizationId); } private static final LazySingletonValue> _SINGLETON_VALUE_Limit = diff --git a/src/main/java/com/clerk/backend_api/models/operations/ListWaitlistEntriesQueryParamStatus.java b/src/main/java/com/clerk/backend_api/models/operations/ListWaitlistEntriesQueryParamStatus.java new file mode 100644 index 00000000..5b2a4174 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ListWaitlistEntriesQueryParamStatus.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * ListWaitlistEntriesQueryParamStatus - Filter waitlist entries by their status + */ +public enum ListWaitlistEntriesQueryParamStatus { + PENDING("pending"), + INVITED("invited"), + COMPLETED("completed"), + REJECTED("rejected"); + + @JsonValue + private final String value; + + private ListWaitlistEntriesQueryParamStatus(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (ListWaitlistEntriesQueryParamStatus o: ListWaitlistEntriesQueryParamStatus.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/ListWaitlistEntriesRequest.java b/src/main/java/com/clerk/backend_api/models/operations/ListWaitlistEntriesRequest.java new file mode 100644 index 00000000..879610ff --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ListWaitlistEntriesRequest.java @@ -0,0 +1,439 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + + +import com.clerk.backend_api.utils.LazySingletonValue; +import com.clerk.backend_api.utils.SpeakeasyMetadata; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + + +public class ListWaitlistEntriesRequest { + + /** + * Applies a limit to the number of results returned. + * Can be used for paginating the results together with `offset`. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") + private Optional limit; + + /** + * Skip the first `offset` results when paginating. + * Needs to be an integer greater or equal to zero. + * To be used in conjunction with `limit`. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=offset") + private Optional offset; + + /** + * Filter waitlist entries by email address + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=query") + private Optional query; + + /** + * Filter waitlist entries by their status + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=status") + private Optional status; + + /** + * Specify the order of results. Supported values are: + * - `created_at` + * - `email_address` + * - `invited_at` + * + * Use `+` for ascending or `-` for descending order. Defaults to `-created_at`. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=order_by") + private Optional orderBy; + + @JsonCreator + public ListWaitlistEntriesRequest( + Optional limit, + Optional offset, + Optional query, + Optional status, + Optional orderBy) { + Utils.checkNotNull(limit, "limit"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(query, "query"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(orderBy, "orderBy"); + this.limit = limit; + this.offset = offset; + this.query = query; + this.status = status; + this.orderBy = orderBy; + } + + public ListWaitlistEntriesRequest() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Applies a limit to the number of results returned. + * Can be used for paginating the results together with `offset`. + */ + @JsonIgnore + public Optional limit() { + return limit; + } + + /** + * Skip the first `offset` results when paginating. + * Needs to be an integer greater or equal to zero. + * To be used in conjunction with `limit`. + */ + @JsonIgnore + public Optional offset() { + return offset; + } + + /** + * Filter waitlist entries by email address + */ + @JsonIgnore + public Optional query() { + return query; + } + + /** + * Filter waitlist entries by their status + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional status() { + return (Optional) status; + } + + /** + * Specify the order of results. Supported values are: + * - `created_at` + * - `email_address` + * - `invited_at` + * + * Use `+` for ascending or `-` for descending order. Defaults to `-created_at`. + */ + @JsonIgnore + public Optional orderBy() { + return orderBy; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Applies a limit to the number of results returned. + * Can be used for paginating the results together with `offset`. + */ + public ListWaitlistEntriesRequest withLimit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + /** + * Applies a limit to the number of results returned. + * Can be used for paginating the results together with `offset`. + */ + public ListWaitlistEntriesRequest withLimit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + /** + * Skip the first `offset` results when paginating. + * Needs to be an integer greater or equal to zero. + * To be used in conjunction with `limit`. + */ + public ListWaitlistEntriesRequest withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * Skip the first `offset` results when paginating. + * Needs to be an integer greater or equal to zero. + * To be used in conjunction with `limit`. + */ + public ListWaitlistEntriesRequest withOffset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + /** + * Filter waitlist entries by email address + */ + public ListWaitlistEntriesRequest withQuery(String query) { + Utils.checkNotNull(query, "query"); + this.query = Optional.ofNullable(query); + return this; + } + + /** + * Filter waitlist entries by email address + */ + public ListWaitlistEntriesRequest withQuery(Optional query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + /** + * Filter waitlist entries by their status + */ + public ListWaitlistEntriesRequest withStatus(ListWaitlistEntriesQueryParamStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * Filter waitlist entries by their status + */ + public ListWaitlistEntriesRequest withStatus(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Specify the order of results. Supported values are: + * - `created_at` + * - `email_address` + * - `invited_at` + * + * Use `+` for ascending or `-` for descending order. Defaults to `-created_at`. + */ + public ListWaitlistEntriesRequest withOrderBy(String orderBy) { + Utils.checkNotNull(orderBy, "orderBy"); + this.orderBy = Optional.ofNullable(orderBy); + return this; + } + + /** + * Specify the order of results. Supported values are: + * - `created_at` + * - `email_address` + * - `invited_at` + * + * Use `+` for ascending or `-` for descending order. Defaults to `-created_at`. + */ + public ListWaitlistEntriesRequest withOrderBy(Optional orderBy) { + Utils.checkNotNull(orderBy, "orderBy"); + this.orderBy = orderBy; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListWaitlistEntriesRequest other = (ListWaitlistEntriesRequest) o; + return + Objects.deepEquals(this.limit, other.limit) && + Objects.deepEquals(this.offset, other.offset) && + Objects.deepEquals(this.query, other.query) && + Objects.deepEquals(this.status, other.status) && + Objects.deepEquals(this.orderBy, other.orderBy); + } + + @Override + public int hashCode() { + return Objects.hash( + limit, + offset, + query, + status, + orderBy); + } + + @Override + public String toString() { + return Utils.toString(ListWaitlistEntriesRequest.class, + "limit", limit, + "offset", offset, + "query", query, + "status", status, + "orderBy", orderBy); + } + + public final static class Builder { + + private Optional limit; + + private Optional offset; + + private Optional query = Optional.empty(); + + private Optional status = Optional.empty(); + + private Optional orderBy; + + private Builder() { + // force use of static builder() method + } + + /** + * Applies a limit to the number of results returned. + * Can be used for paginating the results together with `offset`. + */ + public Builder limit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = Optional.ofNullable(limit); + return this; + } + + /** + * Applies a limit to the number of results returned. + * Can be used for paginating the results together with `offset`. + */ + public Builder limit(Optional limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + /** + * Skip the first `offset` results when paginating. + * Needs to be an integer greater or equal to zero. + * To be used in conjunction with `limit`. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = Optional.ofNullable(offset); + return this; + } + + /** + * Skip the first `offset` results when paginating. + * Needs to be an integer greater or equal to zero. + * To be used in conjunction with `limit`. + */ + public Builder offset(Optional offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + /** + * Filter waitlist entries by email address + */ + public Builder query(String query) { + Utils.checkNotNull(query, "query"); + this.query = Optional.ofNullable(query); + return this; + } + + /** + * Filter waitlist entries by email address + */ + public Builder query(Optional query) { + Utils.checkNotNull(query, "query"); + this.query = query; + return this; + } + + /** + * Filter waitlist entries by their status + */ + public Builder status(ListWaitlistEntriesQueryParamStatus status) { + Utils.checkNotNull(status, "status"); + this.status = Optional.ofNullable(status); + return this; + } + + /** + * Filter waitlist entries by their status + */ + public Builder status(Optional status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * Specify the order of results. Supported values are: + * - `created_at` + * - `email_address` + * - `invited_at` + * + * Use `+` for ascending or `-` for descending order. Defaults to `-created_at`. + */ + public Builder orderBy(String orderBy) { + Utils.checkNotNull(orderBy, "orderBy"); + this.orderBy = Optional.ofNullable(orderBy); + return this; + } + + /** + * Specify the order of results. Supported values are: + * - `created_at` + * - `email_address` + * - `invited_at` + * + * Use `+` for ascending or `-` for descending order. Defaults to `-created_at`. + */ + public Builder orderBy(Optional orderBy) { + Utils.checkNotNull(orderBy, "orderBy"); + this.orderBy = orderBy; + return this; + } + + public ListWaitlistEntriesRequest build() { + if (limit == null) { + limit = _SINGLETON_VALUE_Limit.value(); + } + if (offset == null) { + offset = _SINGLETON_VALUE_Offset.value(); + } + if (orderBy == null) { + orderBy = _SINGLETON_VALUE_OrderBy.value(); + } return new ListWaitlistEntriesRequest( + limit, + offset, + query, + status, + orderBy); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_Limit = + new LazySingletonValue<>( + "limit", + "10", + new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_Offset = + new LazySingletonValue<>( + "offset", + "0", + new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_OrderBy = + new LazySingletonValue<>( + "order_by", + "\"-created_at\"", + new TypeReference>() {}); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/ListWaitlistEntriesRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/ListWaitlistEntriesRequestBuilder.java new file mode 100644 index 00000000..560d8c33 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ListWaitlistEntriesRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.Utils; + +public class ListWaitlistEntriesRequestBuilder { + + private ListWaitlistEntriesRequest request; + private final SDKMethodInterfaces.MethodCallListWaitlistEntries sdk; + + public ListWaitlistEntriesRequestBuilder(SDKMethodInterfaces.MethodCallListWaitlistEntries sdk) { + this.sdk = sdk; + } + + public ListWaitlistEntriesRequestBuilder request(ListWaitlistEntriesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ListWaitlistEntriesResponse call() throws Exception { + + return sdk.listWaitlistEntries( + request); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/ListWaitlistEntriesResponse.java b/src/main/java/com/clerk/backend_api/models/operations/ListWaitlistEntriesResponse.java new file mode 100644 index 00000000..46242db4 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/ListWaitlistEntriesResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + + +import com.clerk.backend_api.models.components.WaitlistEntries; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class ListWaitlistEntriesResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * List of waitlist entries + */ + private Optional waitlistEntries; + + @JsonCreator + public ListWaitlistEntriesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional waitlistEntries) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(waitlistEntries, "waitlistEntries"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.waitlistEntries = waitlistEntries; + } + + public ListWaitlistEntriesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * List of waitlist entries + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional waitlistEntries() { + return (Optional) waitlistEntries; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public ListWaitlistEntriesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListWaitlistEntriesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListWaitlistEntriesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * List of waitlist entries + */ + public ListWaitlistEntriesResponse withWaitlistEntries(WaitlistEntries waitlistEntries) { + Utils.checkNotNull(waitlistEntries, "waitlistEntries"); + this.waitlistEntries = Optional.ofNullable(waitlistEntries); + return this; + } + + /** + * List of waitlist entries + */ + public ListWaitlistEntriesResponse withWaitlistEntries(Optional waitlistEntries) { + Utils.checkNotNull(waitlistEntries, "waitlistEntries"); + this.waitlistEntries = waitlistEntries; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListWaitlistEntriesResponse other = (ListWaitlistEntriesResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.waitlistEntries, other.waitlistEntries); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + statusCode, + rawResponse, + waitlistEntries); + } + + @Override + public String toString() { + return Utils.toString(ListWaitlistEntriesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "waitlistEntries", waitlistEntries); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional waitlistEntries = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * List of waitlist entries + */ + public Builder waitlistEntries(WaitlistEntries waitlistEntries) { + Utils.checkNotNull(waitlistEntries, "waitlistEntries"); + this.waitlistEntries = Optional.ofNullable(waitlistEntries); + return this; + } + + /** + * List of waitlist entries + */ + public Builder waitlistEntries(Optional waitlistEntries) { + Utils.checkNotNull(waitlistEntries, "waitlistEntries"); + this.waitlistEntries = waitlistEntries; + return this; + } + + public ListWaitlistEntriesResponse build() { + return new ListWaitlistEntriesResponse( + contentType, + statusCode, + rawResponse, + waitlistEntries); + } + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/operations/MergeOrganizationMetadataPrivateMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/MergeOrganizationMetadataPrivateMetadata.java deleted file mode 100644 index 60dad7e5..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/MergeOrganizationMetadataPrivateMetadata.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * MergeOrganizationMetadataPrivateMetadata - Metadata saved on the organization that is only visible to your backend. - * The new object will be merged with the existing value. - */ - -public class MergeOrganizationMetadataPrivateMetadata { - - @JsonCreator - public MergeOrganizationMetadataPrivateMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(MergeOrganizationMetadataPrivateMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public MergeOrganizationMetadataPrivateMetadata build() { - return new MergeOrganizationMetadataPrivateMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/MergeOrganizationMetadataPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/MergeOrganizationMetadataPublicMetadata.java deleted file mode 100644 index d5a7c696..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/MergeOrganizationMetadataPublicMetadata.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * MergeOrganizationMetadataPublicMetadata - Metadata saved on the organization, that is visible to both your frontend and backend. - * The new object will be merged with the existing value. - */ - -public class MergeOrganizationMetadataPublicMetadata { - - @JsonCreator - public MergeOrganizationMetadataPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(MergeOrganizationMetadataPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public MergeOrganizationMetadataPublicMetadata build() { - return new MergeOrganizationMetadataPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/MergeOrganizationMetadataRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/MergeOrganizationMetadataRequestBody.java index 02841695..542411fb 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/MergeOrganizationMetadataRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/MergeOrganizationMetadataRequestBody.java @@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.util.Map; import java.util.Objects; import java.util.Optional; @@ -26,7 +28,7 @@ public class MergeOrganizationMetadataRequestBody { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; /** * Metadata saved on the organization that is only visible to your backend. @@ -34,12 +36,12 @@ public class MergeOrganizationMetadataRequestBody { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("private_metadata") - private Optional privateMetadata; + private Optional> privateMetadata; @JsonCreator public MergeOrganizationMetadataRequestBody( - @JsonProperty("public_metadata") Optional publicMetadata, - @JsonProperty("private_metadata") Optional privateMetadata) { + @JsonProperty("public_metadata") Optional> publicMetadata, + @JsonProperty("private_metadata") Optional> privateMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); Utils.checkNotNull(privateMetadata, "privateMetadata"); this.publicMetadata = publicMetadata; @@ -56,8 +58,8 @@ public MergeOrganizationMetadataRequestBody() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } /** @@ -66,8 +68,8 @@ public Optional publicMetadata() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional privateMetadata() { - return (Optional) privateMetadata; + public Optional> privateMetadata() { + return (Optional>) privateMetadata; } public final static Builder builder() { @@ -78,7 +80,7 @@ public final static Builder builder() { * Metadata saved on the organization, that is visible to both your frontend and backend. * The new object will be merged with the existing value. */ - public MergeOrganizationMetadataRequestBody withPublicMetadata(MergeOrganizationMetadataPublicMetadata publicMetadata) { + public MergeOrganizationMetadataRequestBody withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -88,7 +90,7 @@ public MergeOrganizationMetadataRequestBody withPublicMetadata(MergeOrganization * Metadata saved on the organization, that is visible to both your frontend and backend. * The new object will be merged with the existing value. */ - public MergeOrganizationMetadataRequestBody withPublicMetadata(Optional publicMetadata) { + public MergeOrganizationMetadataRequestBody withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -98,7 +100,7 @@ public MergeOrganizationMetadataRequestBody withPublicMetadata(Optional privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; @@ -108,7 +110,7 @@ public MergeOrganizationMetadataRequestBody withPrivateMetadata(MergeOrganizatio * Metadata saved on the organization that is only visible to your backend. * The new object will be merged with the existing value. */ - public MergeOrganizationMetadataRequestBody withPrivateMetadata(Optional privateMetadata) { + public MergeOrganizationMetadataRequestBody withPrivateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -144,9 +146,9 @@ public String toString() { public final static class Builder { - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); - private Optional privateMetadata = Optional.empty(); + private Optional> privateMetadata = Optional.empty(); private Builder() { // force use of static builder() method @@ -156,7 +158,7 @@ private Builder() { * Metadata saved on the organization, that is visible to both your frontend and backend. * The new object will be merged with the existing value. */ - public Builder publicMetadata(MergeOrganizationMetadataPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -166,7 +168,7 @@ public Builder publicMetadata(MergeOrganizationMetadataPublicMetadata publicMeta * Metadata saved on the organization, that is visible to both your frontend and backend. * The new object will be merged with the existing value. */ - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -176,7 +178,7 @@ public Builder publicMetadata(Optional privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; @@ -186,7 +188,7 @@ public Builder privateMetadata(MergeOrganizationMetadataPrivateMetadata privateM * Metadata saved on the organization that is only visible to your backend. * The new object will be merged with the existing value. */ - public Builder privateMetadata(Optional privateMetadata) { + public Builder privateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/PrivateMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/PrivateMetadata.java deleted file mode 100644 index 5122a958..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/PrivateMetadata.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * PrivateMetadata - Metadata saved on the user, that is only visible to your Backend API - */ - -public class PrivateMetadata { - - @JsonCreator - public PrivateMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(PrivateMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public PrivateMetadata build() { - return new PrivateMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/PublicMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/PublicMetadata.java deleted file mode 100644 index af3d609b..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/PublicMetadata.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * PublicMetadata - Metadata saved on the user, that is visible to both your Frontend and Backend APIs - */ - -public class PublicMetadata { - - @JsonCreator - public PublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(PublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public PublicMetadata build() { - return new PublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/RequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/RequestBody.java index 2a08e616..0604d105 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/RequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/RequestBody.java @@ -5,15 +5,21 @@ package com.clerk.backend_api.models.operations; +import com.clerk.backend_api.utils.LazySingletonValue; import com.clerk.backend_api.utils.Utils; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.util.Map; import java.util.Objects; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -22,76 +28,79 @@ public class RequestBody { /** - * The email address of the new member that is going to be invited to the organization + * The email address the invitation will be sent to */ @JsonProperty("email_address") private String emailAddress; /** - * The ID of the user that invites the new member to the organization. - * Must be an administrator in the organization. + * Metadata that will be attached to the newly created invitation. + * The value of this property should be a well-formed JSON object. + * Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("inviter_user_id") - private JsonNullable inviterUserId; + @JsonProperty("public_metadata") + private Optional> publicMetadata; /** - * The role of the new member in the organization. + * The URL where the user is redirected upon visiting the invitation link, where they can accept the invitation. Required if you have implemented a [custom flow for handling application invitations](/docs/custom-flows/invitations). */ - @JsonProperty("role") - private String role; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("redirect_url") + private Optional redirectUrl; /** - * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * Optional flag which denotes whether an email invitation should be sent to the given email address. + * Defaults to true. */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("public_metadata") - private Optional publicMetadata; + @JsonProperty("notify") + private JsonNullable notify_; /** - * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. + * Whether an invitation should be created if there is already an existing invitation for this email + * address, or it's claimed by another user. */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("private_metadata") - private Optional privateMetadata; + @JsonProperty("ignore_existing") + private JsonNullable ignoreExisting; /** - * Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. + * The number of days the invitation will be valid for. By default, the invitation expires after 30 days. */ @JsonInclude(Include.NON_ABSENT) - @JsonProperty("redirect_url") - private Optional redirectUrl; + @JsonProperty("expires_in_days") + private JsonNullable expiresInDays; @JsonCreator public RequestBody( @JsonProperty("email_address") String emailAddress, - @JsonProperty("inviter_user_id") JsonNullable inviterUserId, - @JsonProperty("role") String role, - @JsonProperty("public_metadata") Optional publicMetadata, - @JsonProperty("private_metadata") Optional privateMetadata, - @JsonProperty("redirect_url") Optional redirectUrl) { + @JsonProperty("public_metadata") Optional> publicMetadata, + @JsonProperty("redirect_url") Optional redirectUrl, + @JsonProperty("notify") JsonNullable notify_, + @JsonProperty("ignore_existing") JsonNullable ignoreExisting, + @JsonProperty("expires_in_days") JsonNullable expiresInDays) { Utils.checkNotNull(emailAddress, "emailAddress"); - Utils.checkNotNull(inviterUserId, "inviterUserId"); - Utils.checkNotNull(role, "role"); Utils.checkNotNull(publicMetadata, "publicMetadata"); - Utils.checkNotNull(privateMetadata, "privateMetadata"); Utils.checkNotNull(redirectUrl, "redirectUrl"); + Utils.checkNotNull(notify_, "notify_"); + Utils.checkNotNull(ignoreExisting, "ignoreExisting"); + Utils.checkNotNull(expiresInDays, "expiresInDays"); this.emailAddress = emailAddress; - this.inviterUserId = inviterUserId; - this.role = role; this.publicMetadata = publicMetadata; - this.privateMetadata = privateMetadata; this.redirectUrl = redirectUrl; + this.notify_ = notify_; + this.ignoreExisting = ignoreExisting; + this.expiresInDays = expiresInDays; } public RequestBody( - String emailAddress, - String role) { - this(emailAddress, JsonNullable.undefined(), role, Optional.empty(), Optional.empty(), Optional.empty()); + String emailAddress) { + this(emailAddress, Optional.empty(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); } /** - * The email address of the new member that is going to be invited to the organization + * The email address the invitation will be sent to */ @JsonIgnore public String emailAddress() { @@ -99,46 +108,48 @@ public String emailAddress() { } /** - * The ID of the user that invites the new member to the organization. - * Must be an administrator in the organization. + * Metadata that will be attached to the newly created invitation. + * The value of this property should be a well-formed JSON object. + * Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. */ + @SuppressWarnings("unchecked") @JsonIgnore - public JsonNullable inviterUserId() { - return inviterUserId; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } /** - * The role of the new member in the organization. + * The URL where the user is redirected upon visiting the invitation link, where they can accept the invitation. Required if you have implemented a [custom flow for handling application invitations](/docs/custom-flows/invitations). */ @JsonIgnore - public String role() { - return role; + public Optional redirectUrl() { + return redirectUrl; } /** - * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * Optional flag which denotes whether an email invitation should be sent to the given email address. + * Defaults to true. */ - @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public JsonNullable notify_() { + return notify_; } /** - * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. + * Whether an invitation should be created if there is already an existing invitation for this email + * address, or it's claimed by another user. */ - @SuppressWarnings("unchecked") @JsonIgnore - public Optional privateMetadata() { - return (Optional) privateMetadata; + public JsonNullable ignoreExisting() { + return ignoreExisting; } /** - * Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. + * The number of days the invitation will be valid for. By default, the invitation expires after 30 days. */ @JsonIgnore - public Optional redirectUrl() { - return redirectUrl; + public JsonNullable expiresInDays() { + return expiresInDays; } public final static Builder builder() { @@ -146,7 +157,7 @@ public final static Builder builder() { } /** - * The email address of the new member that is going to be invited to the organization + * The email address the invitation will be sent to */ public RequestBody withEmailAddress(String emailAddress) { Utils.checkNotNull(emailAddress, "emailAddress"); @@ -155,85 +166,100 @@ public RequestBody withEmailAddress(String emailAddress) { } /** - * The ID of the user that invites the new member to the organization. - * Must be an administrator in the organization. + * Metadata that will be attached to the newly created invitation. + * The value of this property should be a well-formed JSON object. + * Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. */ - public RequestBody withInviterUserId(String inviterUserId) { - Utils.checkNotNull(inviterUserId, "inviterUserId"); - this.inviterUserId = JsonNullable.of(inviterUserId); + public RequestBody withPublicMetadata(Map publicMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } /** - * The ID of the user that invites the new member to the organization. - * Must be an administrator in the organization. + * Metadata that will be attached to the newly created invitation. + * The value of this property should be a well-formed JSON object. + * Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. */ - public RequestBody withInviterUserId(JsonNullable inviterUserId) { - Utils.checkNotNull(inviterUserId, "inviterUserId"); - this.inviterUserId = inviterUserId; + public RequestBody withPublicMetadata(Optional> publicMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + this.publicMetadata = publicMetadata; return this; } /** - * The role of the new member in the organization. + * The URL where the user is redirected upon visiting the invitation link, where they can accept the invitation. Required if you have implemented a [custom flow for handling application invitations](/docs/custom-flows/invitations). */ - public RequestBody withRole(String role) { - Utils.checkNotNull(role, "role"); - this.role = role; + public RequestBody withRedirectUrl(String redirectUrl) { + Utils.checkNotNull(redirectUrl, "redirectUrl"); + this.redirectUrl = Optional.ofNullable(redirectUrl); return this; } /** - * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * The URL where the user is redirected upon visiting the invitation link, where they can accept the invitation. Required if you have implemented a [custom flow for handling application invitations](/docs/custom-flows/invitations). */ - public RequestBody withPublicMetadata(CreateOrganizationInvitationBulkPublicMetadata publicMetadata) { - Utils.checkNotNull(publicMetadata, "publicMetadata"); - this.publicMetadata = Optional.ofNullable(publicMetadata); + public RequestBody withRedirectUrl(Optional redirectUrl) { + Utils.checkNotNull(redirectUrl, "redirectUrl"); + this.redirectUrl = redirectUrl; return this; } /** - * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * Optional flag which denotes whether an email invitation should be sent to the given email address. + * Defaults to true. */ - public RequestBody withPublicMetadata(Optional publicMetadata) { - Utils.checkNotNull(publicMetadata, "publicMetadata"); - this.publicMetadata = publicMetadata; + public RequestBody withNotify(boolean notify_) { + Utils.checkNotNull(notify_, "notify_"); + this.notify_ = JsonNullable.of(notify_); return this; } /** - * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. + * Optional flag which denotes whether an email invitation should be sent to the given email address. + * Defaults to true. */ - public RequestBody withPrivateMetadata(CreateOrganizationInvitationBulkPrivateMetadata privateMetadata) { - Utils.checkNotNull(privateMetadata, "privateMetadata"); - this.privateMetadata = Optional.ofNullable(privateMetadata); + public RequestBody withNotify(JsonNullable notify_) { + Utils.checkNotNull(notify_, "notify_"); + this.notify_ = notify_; return this; } /** - * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. + * Whether an invitation should be created if there is already an existing invitation for this email + * address, or it's claimed by another user. */ - public RequestBody withPrivateMetadata(Optional privateMetadata) { - Utils.checkNotNull(privateMetadata, "privateMetadata"); - this.privateMetadata = privateMetadata; + public RequestBody withIgnoreExisting(boolean ignoreExisting) { + Utils.checkNotNull(ignoreExisting, "ignoreExisting"); + this.ignoreExisting = JsonNullable.of(ignoreExisting); return this; } /** - * Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. + * Whether an invitation should be created if there is already an existing invitation for this email + * address, or it's claimed by another user. */ - public RequestBody withRedirectUrl(String redirectUrl) { - Utils.checkNotNull(redirectUrl, "redirectUrl"); - this.redirectUrl = Optional.ofNullable(redirectUrl); + public RequestBody withIgnoreExisting(JsonNullable ignoreExisting) { + Utils.checkNotNull(ignoreExisting, "ignoreExisting"); + this.ignoreExisting = ignoreExisting; return this; } /** - * Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. + * The number of days the invitation will be valid for. By default, the invitation expires after 30 days. */ - public RequestBody withRedirectUrl(Optional redirectUrl) { - Utils.checkNotNull(redirectUrl, "redirectUrl"); - this.redirectUrl = redirectUrl; + public RequestBody withExpiresInDays(long expiresInDays) { + Utils.checkNotNull(expiresInDays, "expiresInDays"); + this.expiresInDays = JsonNullable.of(expiresInDays); + return this; + } + + /** + * The number of days the invitation will be valid for. By default, the invitation expires after 30 days. + */ + public RequestBody withExpiresInDays(JsonNullable expiresInDays) { + Utils.checkNotNull(expiresInDays, "expiresInDays"); + this.expiresInDays = expiresInDays; return this; } @@ -248,55 +274,55 @@ public boolean equals(java.lang.Object o) { RequestBody other = (RequestBody) o; return Objects.deepEquals(this.emailAddress, other.emailAddress) && - Objects.deepEquals(this.inviterUserId, other.inviterUserId) && - Objects.deepEquals(this.role, other.role) && Objects.deepEquals(this.publicMetadata, other.publicMetadata) && - Objects.deepEquals(this.privateMetadata, other.privateMetadata) && - Objects.deepEquals(this.redirectUrl, other.redirectUrl); + Objects.deepEquals(this.redirectUrl, other.redirectUrl) && + Objects.deepEquals(this.notify_, other.notify_) && + Objects.deepEquals(this.ignoreExisting, other.ignoreExisting) && + Objects.deepEquals(this.expiresInDays, other.expiresInDays); } @Override public int hashCode() { return Objects.hash( emailAddress, - inviterUserId, - role, publicMetadata, - privateMetadata, - redirectUrl); + redirectUrl, + notify_, + ignoreExisting, + expiresInDays); } @Override public String toString() { return Utils.toString(RequestBody.class, "emailAddress", emailAddress, - "inviterUserId", inviterUserId, - "role", role, "publicMetadata", publicMetadata, - "privateMetadata", privateMetadata, - "redirectUrl", redirectUrl); + "redirectUrl", redirectUrl, + "notify_", notify_, + "ignoreExisting", ignoreExisting, + "expiresInDays", expiresInDays); } public final static class Builder { private String emailAddress; - private JsonNullable inviterUserId = JsonNullable.undefined(); + private Optional> publicMetadata = Optional.empty(); - private String role; + private Optional redirectUrl = Optional.empty(); - private Optional publicMetadata = Optional.empty(); + private JsonNullable notify_; - private Optional privateMetadata = Optional.empty(); + private JsonNullable ignoreExisting; - private Optional redirectUrl = Optional.empty(); + private JsonNullable expiresInDays = JsonNullable.undefined(); private Builder() { // force use of static builder() method } /** - * The email address of the new member that is going to be invited to the organization + * The email address the invitation will be sent to */ public Builder emailAddress(String emailAddress) { Utils.checkNotNull(emailAddress, "emailAddress"); @@ -305,97 +331,129 @@ public Builder emailAddress(String emailAddress) { } /** - * The ID of the user that invites the new member to the organization. - * Must be an administrator in the organization. + * Metadata that will be attached to the newly created invitation. + * The value of this property should be a well-formed JSON object. + * Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. */ - public Builder inviterUserId(String inviterUserId) { - Utils.checkNotNull(inviterUserId, "inviterUserId"); - this.inviterUserId = JsonNullable.of(inviterUserId); + public Builder publicMetadata(Map publicMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } /** - * The ID of the user that invites the new member to the organization. - * Must be an administrator in the organization. + * Metadata that will be attached to the newly created invitation. + * The value of this property should be a well-formed JSON object. + * Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. */ - public Builder inviterUserId(JsonNullable inviterUserId) { - Utils.checkNotNull(inviterUserId, "inviterUserId"); - this.inviterUserId = inviterUserId; + public Builder publicMetadata(Optional> publicMetadata) { + Utils.checkNotNull(publicMetadata, "publicMetadata"); + this.publicMetadata = publicMetadata; return this; } /** - * The role of the new member in the organization. + * The URL where the user is redirected upon visiting the invitation link, where they can accept the invitation. Required if you have implemented a [custom flow for handling application invitations](/docs/custom-flows/invitations). */ - public Builder role(String role) { - Utils.checkNotNull(role, "role"); - this.role = role; + public Builder redirectUrl(String redirectUrl) { + Utils.checkNotNull(redirectUrl, "redirectUrl"); + this.redirectUrl = Optional.ofNullable(redirectUrl); return this; } /** - * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * The URL where the user is redirected upon visiting the invitation link, where they can accept the invitation. Required if you have implemented a [custom flow for handling application invitations](/docs/custom-flows/invitations). */ - public Builder publicMetadata(CreateOrganizationInvitationBulkPublicMetadata publicMetadata) { - Utils.checkNotNull(publicMetadata, "publicMetadata"); - this.publicMetadata = Optional.ofNullable(publicMetadata); + public Builder redirectUrl(Optional redirectUrl) { + Utils.checkNotNull(redirectUrl, "redirectUrl"); + this.redirectUrl = redirectUrl; return this; } /** - * Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. + * Optional flag which denotes whether an email invitation should be sent to the given email address. + * Defaults to true. */ - public Builder publicMetadata(Optional publicMetadata) { - Utils.checkNotNull(publicMetadata, "publicMetadata"); - this.publicMetadata = publicMetadata; + public Builder notify_(boolean notify_) { + Utils.checkNotNull(notify_, "notify_"); + this.notify_ = JsonNullable.of(notify_); return this; } /** - * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. + * Optional flag which denotes whether an email invitation should be sent to the given email address. + * Defaults to true. */ - public Builder privateMetadata(CreateOrganizationInvitationBulkPrivateMetadata privateMetadata) { - Utils.checkNotNull(privateMetadata, "privateMetadata"); - this.privateMetadata = Optional.ofNullable(privateMetadata); + public Builder notify_(JsonNullable notify_) { + Utils.checkNotNull(notify_, "notify_"); + this.notify_ = notify_; return this; } /** - * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. + * Whether an invitation should be created if there is already an existing invitation for this email + * address, or it's claimed by another user. */ - public Builder privateMetadata(Optional privateMetadata) { - Utils.checkNotNull(privateMetadata, "privateMetadata"); - this.privateMetadata = privateMetadata; + public Builder ignoreExisting(boolean ignoreExisting) { + Utils.checkNotNull(ignoreExisting, "ignoreExisting"); + this.ignoreExisting = JsonNullable.of(ignoreExisting); return this; } /** - * Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. + * Whether an invitation should be created if there is already an existing invitation for this email + * address, or it's claimed by another user. */ - public Builder redirectUrl(String redirectUrl) { - Utils.checkNotNull(redirectUrl, "redirectUrl"); - this.redirectUrl = Optional.ofNullable(redirectUrl); + public Builder ignoreExisting(JsonNullable ignoreExisting) { + Utils.checkNotNull(ignoreExisting, "ignoreExisting"); + this.ignoreExisting = ignoreExisting; return this; } /** - * Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. + * The number of days the invitation will be valid for. By default, the invitation expires after 30 days. */ - public Builder redirectUrl(Optional redirectUrl) { - Utils.checkNotNull(redirectUrl, "redirectUrl"); - this.redirectUrl = redirectUrl; + public Builder expiresInDays(long expiresInDays) { + Utils.checkNotNull(expiresInDays, "expiresInDays"); + this.expiresInDays = JsonNullable.of(expiresInDays); + return this; + } + + /** + * The number of days the invitation will be valid for. By default, the invitation expires after 30 days. + */ + public Builder expiresInDays(JsonNullable expiresInDays) { + Utils.checkNotNull(expiresInDays, "expiresInDays"); + this.expiresInDays = expiresInDays; return this; } public RequestBody build() { - return new RequestBody( + if (notify_ == null) { + notify_ = _SINGLETON_VALUE_Notify.value(); + } + if (ignoreExisting == null) { + ignoreExisting = _SINGLETON_VALUE_IgnoreExisting.value(); + } return new RequestBody( emailAddress, - inviterUserId, - role, publicMetadata, - privateMetadata, - redirectUrl); + redirectUrl, + notify_, + ignoreExisting, + expiresInDays); } + + private static final LazySingletonValue> _SINGLETON_VALUE_Notify = + new LazySingletonValue<>( + "notify", + "true", + new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_IgnoreExisting = + new LazySingletonValue<>( + "ignore_existing", + "false", + new TypeReference>() {}); } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/ResponseBody.java b/src/main/java/com/clerk/backend_api/models/operations/ResponseBody.java index 9ad25a19..6555a884 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/ResponseBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/ResponseBody.java @@ -11,10 +11,13 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -56,7 +59,7 @@ public class ResponseBody { @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; @JsonInclude(Include.NON_ABSENT) @JsonProperty("label") @@ -77,6 +80,13 @@ public class ResponseBody { @JsonProperty("token_secret") private Optional tokenSecret; + /** + * Unix timestamp of the access token expiration. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("expires_at") + private JsonNullable expiresAt; + @JsonCreator public ResponseBody( @JsonProperty("object") Optional object, @@ -84,10 +94,11 @@ public ResponseBody( @JsonProperty("provider_user_id") Optional providerUserId, @JsonProperty("token") Optional token, @JsonProperty("provider") Optional provider, - @JsonProperty("public_metadata") Optional publicMetadata, + @JsonProperty("public_metadata") Optional> publicMetadata, @JsonProperty("label") JsonNullable label, @JsonProperty("scopes") Optional> scopes, - @JsonProperty("token_secret") Optional tokenSecret) { + @JsonProperty("token_secret") Optional tokenSecret, + @JsonProperty("expires_at") JsonNullable expiresAt) { Utils.checkNotNull(object, "object"); Utils.checkNotNull(externalAccountId, "externalAccountId"); Utils.checkNotNull(providerUserId, "providerUserId"); @@ -97,6 +108,7 @@ public ResponseBody( Utils.checkNotNull(label, "label"); Utils.checkNotNull(scopes, "scopes"); Utils.checkNotNull(tokenSecret, "tokenSecret"); + Utils.checkNotNull(expiresAt, "expiresAt"); this.object = object; this.externalAccountId = externalAccountId; this.providerUserId = providerUserId; @@ -106,10 +118,11 @@ public ResponseBody( this.label = label; this.scopes = scopes; this.tokenSecret = tokenSecret; + this.expiresAt = expiresAt; } public ResponseBody() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined(), Optional.empty(), Optional.empty(), JsonNullable.undefined()); } @JsonIgnore @@ -151,8 +164,8 @@ public Optional provider() { @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } @JsonIgnore @@ -178,6 +191,14 @@ public Optional tokenSecret() { return tokenSecret; } + /** + * Unix timestamp of the access token expiration. + */ + @JsonIgnore + public JsonNullable expiresAt() { + return expiresAt; + } + public final static Builder builder() { return new Builder(); } @@ -266,13 +287,13 @@ public ResponseBody withProvider(Optional provider) { return this; } - public ResponseBody withPublicMetadata(GetOAuthAccessTokenPublicMetadata publicMetadata) { + public ResponseBody withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } - public ResponseBody withPublicMetadata(Optional publicMetadata) { + public ResponseBody withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -327,6 +348,24 @@ public ResponseBody withTokenSecret(Optional tokenSecret) { this.tokenSecret = tokenSecret; return this; } + + /** + * Unix timestamp of the access token expiration. + */ + public ResponseBody withExpiresAt(long expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = JsonNullable.of(expiresAt); + return this; + } + + /** + * Unix timestamp of the access token expiration. + */ + public ResponseBody withExpiresAt(JsonNullable expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = expiresAt; + return this; + } @Override public boolean equals(java.lang.Object o) { @@ -346,7 +385,8 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.publicMetadata, other.publicMetadata) && Objects.deepEquals(this.label, other.label) && Objects.deepEquals(this.scopes, other.scopes) && - Objects.deepEquals(this.tokenSecret, other.tokenSecret); + Objects.deepEquals(this.tokenSecret, other.tokenSecret) && + Objects.deepEquals(this.expiresAt, other.expiresAt); } @Override @@ -360,7 +400,8 @@ public int hashCode() { publicMetadata, label, scopes, - tokenSecret); + tokenSecret, + expiresAt); } @Override @@ -374,7 +415,8 @@ public String toString() { "publicMetadata", publicMetadata, "label", label, "scopes", scopes, - "tokenSecret", tokenSecret); + "tokenSecret", tokenSecret, + "expiresAt", expiresAt); } public final static class Builder { @@ -389,13 +431,15 @@ public final static class Builder { private Optional provider = Optional.empty(); - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); private JsonNullable label = JsonNullable.undefined(); private Optional> scopes = Optional.empty(); - private Optional tokenSecret = Optional.empty(); + private Optional tokenSecret = Optional.empty(); + + private JsonNullable expiresAt = JsonNullable.undefined(); private Builder() { // force use of static builder() method @@ -485,13 +529,13 @@ public Builder provider(Optional provider) { return this; } - public Builder publicMetadata(GetOAuthAccessTokenPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; } - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -546,6 +590,24 @@ public Builder tokenSecret(Optional tokenSecret) { this.tokenSecret = tokenSecret; return this; } + + /** + * Unix timestamp of the access token expiration. + */ + public Builder expiresAt(long expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = JsonNullable.of(expiresAt); + return this; + } + + /** + * Unix timestamp of the access token expiration. + */ + public Builder expiresAt(JsonNullable expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = expiresAt; + return this; + } public ResponseBody build() { return new ResponseBody( @@ -557,7 +619,8 @@ public ResponseBody build() { publicMetadata, label, scopes, - tokenSecret); + tokenSecret, + expiresAt); } } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/SDKMethodInterfaces.java b/src/main/java/com/clerk/backend_api/models/operations/SDKMethodInterfaces.java index 2434f270..2677062d 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/SDKMethodInterfaces.java +++ b/src/main/java/com/clerk/backend_api/models/operations/SDKMethodInterfaces.java @@ -35,7 +35,7 @@ GetClientListResponse list( public interface MethodCallVerifyClient { VerifyClientResponse verify( - VerifyClientRequestBody request) throws Exception; + Optional request) throws Exception; } @@ -47,7 +47,7 @@ GetClientResponse get( public interface MethodCallCreateEmailAddress { CreateEmailAddressResponse create( - CreateEmailAddressRequestBody request) throws Exception; + Optional request) throws Exception; } @@ -66,13 +66,13 @@ DeleteEmailAddressResponse delete( public interface MethodCallUpdateEmailAddress { UpdateEmailAddressResponse update( String emailAddressId, - UpdateEmailAddressRequestBody requestBody) throws Exception; + Optional requestBody) throws Exception; } public interface MethodCallCreatePhoneNumber { CreatePhoneNumberResponse create( - CreatePhoneNumberRequestBody request) throws Exception; + Optional request) throws Exception; } @@ -91,7 +91,7 @@ DeletePhoneNumberResponse delete( public interface MethodCallUpdatePhoneNumber { UpdatePhoneNumberResponse update( String phoneNumberId, - UpdatePhoneNumberRequestBody requestBody) throws Exception; + Optional requestBody) throws Exception; } @@ -101,6 +101,12 @@ GetSessionListResponse list( } + public interface MethodCallCreateSession { + CreateSessionResponse createSession( + Optional request) throws Exception; + } + + public interface MethodCallGetSession { GetSessionResponse get( String sessionId) throws Exception; @@ -120,10 +126,18 @@ VerifySessionResponse verify( } + public interface MethodCallCreateSessionToken { + CreateSessionTokenResponse createSessionToken( + String sessionId, + Optional requestBody) throws Exception; + } + + public interface MethodCallCreateSessionTokenFromTemplate { CreateSessionTokenFromTemplateResponse createTokenFromTemplate( String sessionId, - String templateName) throws Exception; + String templateName, + Optional requestBody) throws Exception; } @@ -248,7 +262,7 @@ DeleteUserProfileImageResponse deleteProfileImage( public interface MethodCallUpdateUserMetadata { UpdateUserMetadataResponse updateMetadata( String userId, - UpdateUserMetadataRequestBody requestBody) throws Exception; + Optional requestBody) throws Exception; } @@ -279,14 +293,14 @@ UsersGetOrganizationInvitationsResponse getOrganizationInvitations( public interface MethodCallVerifyPassword { VerifyPasswordResponse verifyPassword( String userId, - VerifyPasswordRequestBody requestBody) throws Exception; + Optional requestBody) throws Exception; } public interface MethodCallVerifyTOTP { VerifyTOTPResponse verifyTOTP( String userId, - VerifyTOTPRequestBody requestBody) throws Exception; + Optional requestBody) throws Exception; } @@ -316,12 +330,6 @@ UserWeb3WalletDeleteResponse deleteWeb3Wallet( } - public interface MethodCallCreateUserTOTP { - CreateUserTOTPResponse createTOTP( - String userId) throws Exception; - } - - public interface MethodCallDeleteTOTP { DeleteTOTPResponse deleteTotp( String userId) throws Exception; @@ -337,7 +345,7 @@ DeleteExternalAccountResponse deleteExternalAccount( public interface MethodCallCreateInvitation { CreateInvitationResponse create( - CreateInvitationRequestBody request) throws Exception; + Optional request) throws Exception; } @@ -345,7 +353,14 @@ public interface MethodCallListInvitations { ListInvitationsResponse list( Optional limit, Optional offset, - Optional status) throws Exception; + Optional status, + Optional query) throws Exception; + } + + + public interface MethodCallCreateBulkInvitations { + CreateBulkInvitationsResponse createBulkInvitations( + Optional> request) throws Exception; } @@ -364,7 +379,7 @@ ListInstanceOrganizationInvitationsResponse getAll( public interface MethodCallCreateOrganizationInvitation { CreateOrganizationInvitationResponse create( String organizationId, - CreateOrganizationInvitationRequestBody requestBody) throws Exception; + Optional requestBody) throws Exception; } @@ -380,7 +395,7 @@ ListOrganizationInvitationsResponse list( public interface MethodCallCreateOrganizationInvitationBulk { CreateOrganizationInvitationBulkResponse bulkCreate( String organizationId, - List requestBody) throws Exception; + List requestBody) throws Exception; } @@ -414,13 +429,13 @@ public interface MethodCallListAllowlistIdentifiers { public interface MethodCallCreateAllowlistIdentifier { CreateAllowlistIdentifierResponse createAllowlistIdentifier( - CreateAllowlistIdentifierRequestBody request) throws Exception; + Optional request) throws Exception; } public interface MethodCallCreateBlocklistIdentifier { CreateBlocklistIdentifierResponse createBlocklistIdentifier( - CreateBlocklistIdentifierRequestBody request) throws Exception; + Optional request) throws Exception; } @@ -443,7 +458,7 @@ public interface MethodCallListBlocklistIdentifiers { public interface MethodCallUpdateInstanceAuthConfig { UpdateInstanceAuthConfigResponse updateInstanceSettings( - UpdateInstanceAuthConfigRequestBody request) throws Exception; + Optional request) throws Exception; } @@ -455,13 +470,13 @@ UpdateProductionInstanceDomainResponse updateDomain( public interface MethodCallChangeProductionInstanceDomain { ChangeProductionInstanceDomainResponse changeProductionInstanceDomain( - ChangeProductionInstanceDomainRequestBody request) throws Exception; + Optional request) throws Exception; } public interface MethodCallCreateActorToken { CreateActorTokenResponse create( - CreateActorTokenRequestBody request) throws Exception; + Optional request) throws Exception; } @@ -478,7 +493,7 @@ public interface MethodCallListDomains { public interface MethodCallAddDomain { AddDomainResponse add( - AddDomainRequestBody request) throws Exception; + Optional request) throws Exception; } @@ -495,21 +510,26 @@ UpdateDomainResponse update( } + public interface MethodCallGetInstance { + GetInstanceResponse getInstanceDirect() throws Exception; + } + + public interface MethodCallUpdateInstance { UpdateInstanceResponse update( - UpdateInstanceRequestBody request) throws Exception; + Optional request) throws Exception; } public interface MethodCallUpdateInstanceRestrictions { UpdateInstanceRestrictionsResponse updateRestrictions( - UpdateInstanceRestrictionsRequestBody request) throws Exception; + Optional request) throws Exception; } public interface MethodCallUpdateInstanceOrganizationSettings { UpdateInstanceOrganizationSettingsResponse updateOrganizationSettings( - UpdateInstanceOrganizationSettingsRequestBody request) throws Exception; + Optional request) throws Exception; } @@ -535,7 +555,7 @@ public interface MethodCallListJWTTemplates { public interface MethodCallCreateJWTTemplate { CreateJWTTemplateResponse create( - CreateJWTTemplateRequestBody request) throws Exception; + Optional request) throws Exception; } @@ -548,7 +568,7 @@ GetJWTTemplateResponse get( public interface MethodCallUpdateJWTTemplate { UpdateJWTTemplateResponse update( String templateId, - UpdateJWTTemplateRequestBody requestBody) throws Exception; + Optional requestBody) throws Exception; } @@ -566,7 +586,7 @@ ListOrganizationsResponse list( public interface MethodCallCreateOrganization { CreateOrganizationResponse create( - CreateOrganizationRequestBody request) throws Exception; + Optional request) throws Exception; } @@ -600,7 +620,7 @@ MergeOrganizationMetadataResponse mergeMetadata( public interface MethodCallUploadOrganizationLogo { UploadOrganizationLogoResponse uploadLogo( String organizationId, - UploadOrganizationLogoRequestBody requestBody) throws Exception; + Optional requestBody) throws Exception; } @@ -645,7 +665,7 @@ public interface MethodCallUpdateOrganizationMembershipMetadata { UpdateOrganizationMembershipMetadataResponse updateMetadata( String organizationId, String userId, - UpdateOrganizationMembershipMetadataRequestBody requestBody) throws Exception; + Optional requestBody) throws Exception; } @@ -687,7 +707,7 @@ UpdateOrganizationDomainResponse update( public interface MethodCallVerifyDomainProxy { VerifyDomainProxyResponse verify( - VerifyDomainProxyRequestBody request) throws Exception; + Optional request) throws Exception; } @@ -698,7 +718,7 @@ public interface MethodCallListRedirectURLs { public interface MethodCallCreateRedirectURL { CreateRedirectURLResponse create( - CreateRedirectURLRequestBody request) throws Exception; + Optional request) throws Exception; } @@ -716,7 +736,7 @@ DeleteRedirectURLResponse delete( public interface MethodCallCreateSignInToken { CreateSignInTokenResponse create( - CreateSignInTokenRequestBody request) throws Exception; + Optional request) throws Exception; } @@ -729,7 +749,7 @@ RevokeSignInTokenResponse revoke( public interface MethodCallUpdateSignUp { UpdateSignUpResponse update( String id, - UpdateSignUpRequestBody requestBody) throws Exception; + Optional requestBody) throws Exception; } @@ -742,7 +762,7 @@ ListOAuthApplicationsResponse list( public interface MethodCallCreateOAuthApplication { CreateOAuthApplicationResponse create( - CreateOAuthApplicationRequestBody request) throws Exception; + Optional request) throws Exception; } @@ -774,13 +794,14 @@ RotateOAuthApplicationSecretResponse rotateSecret( public interface MethodCallListSAMLConnections { ListSAMLConnectionsResponse list( Optional limit, - Optional offset) throws Exception; + Optional offset, + Optional> organizationId) throws Exception; } public interface MethodCallCreateSAMLConnection { CreateSAMLConnectionResponse create( - CreateSAMLConnectionRequestBody request) throws Exception; + Optional request) throws Exception; } @@ -808,4 +829,16 @@ public interface MethodCallCreateTestingToken { } + public interface MethodCallListWaitlistEntries { + ListWaitlistEntriesResponse listWaitlistEntries( + ListWaitlistEntriesRequest request) throws Exception; + } + + + public interface MethodCallCreateWaitlistEntry { + CreateWaitlistEntryResponse createWaitlistEntry( + Optional request) throws Exception; + } + + } diff --git a/src/main/java/com/clerk/backend_api/models/operations/TemplateSlug.java b/src/main/java/com/clerk/backend_api/models/operations/TemplateSlug.java new file mode 100644 index 00000000..b46d2c00 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/TemplateSlug.java @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package com.clerk.backend_api.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * TemplateSlug - The slug of the email template to use for the invitation email. + * If not provided, the "invitation" template will be used. + */ +public enum TemplateSlug { + INVITATION("invitation"), + WAITLIST_INVITATION("waitlist_invitation"); + + @JsonValue + private final String value; + + private TemplateSlug(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (TemplateSlug o: TemplateSlug.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/UnsafeMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/UnsafeMetadata.java deleted file mode 100644 index 289eed99..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/UnsafeMetadata.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * UnsafeMetadata - Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. - * Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. - */ - -public class UnsafeMetadata { - - @JsonCreator - public UnsafeMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(UnsafeMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public UnsafeMetadata build() { - return new UnsafeMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateEmailAddressRequest.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateEmailAddressRequest.java index 75801243..9a7ede16 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateEmailAddressRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateEmailAddressRequest.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Objects; +import java.util.Optional; public class UpdateEmailAddressRequest { @@ -23,17 +25,22 @@ public class UpdateEmailAddressRequest { private String emailAddressId; @SpeakeasyMetadata("request:mediaType=application/json") - private UpdateEmailAddressRequestBody requestBody; + private Optional requestBody; @JsonCreator public UpdateEmailAddressRequest( String emailAddressId, - UpdateEmailAddressRequestBody requestBody) { + Optional requestBody) { Utils.checkNotNull(emailAddressId, "emailAddressId"); Utils.checkNotNull(requestBody, "requestBody"); this.emailAddressId = emailAddressId; this.requestBody = requestBody; } + + public UpdateEmailAddressRequest( + String emailAddressId) { + this(emailAddressId, Optional.empty()); + } /** * The ID of the email address to update @@ -43,9 +50,10 @@ public String emailAddressId() { return emailAddressId; } + @SuppressWarnings("unchecked") @JsonIgnore - public UpdateEmailAddressRequestBody requestBody() { - return requestBody; + public Optional requestBody() { + return (Optional) requestBody; } public final static Builder builder() { @@ -62,6 +70,12 @@ public UpdateEmailAddressRequest withEmailAddressId(String emailAddressId) { } public UpdateEmailAddressRequest withRequestBody(UpdateEmailAddressRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public UpdateEmailAddressRequest withRequestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; @@ -99,7 +113,7 @@ public final static class Builder { private String emailAddressId; - private UpdateEmailAddressRequestBody requestBody; + private Optional requestBody = Optional.empty(); private Builder() { // force use of static builder() method @@ -115,6 +129,12 @@ public Builder emailAddressId(String emailAddressId) { } public Builder requestBody(UpdateEmailAddressRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public Builder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateEmailAddressRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateEmailAddressRequestBuilder.java index 17d57edf..d784cc28 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateEmailAddressRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateEmailAddressRequestBuilder.java @@ -6,11 +6,12 @@ import com.clerk.backend_api.utils.Utils; import java.lang.String; +import java.util.Optional; public class UpdateEmailAddressRequestBuilder { private String emailAddressId; - private UpdateEmailAddressRequestBody requestBody; + private Optional requestBody = Optional.empty(); private final SDKMethodInterfaces.MethodCallUpdateEmailAddress sdk; public UpdateEmailAddressRequestBuilder(SDKMethodInterfaces.MethodCallUpdateEmailAddress sdk) { @@ -22,8 +23,14 @@ public UpdateEmailAddressRequestBuilder emailAddressId(String emailAddressId) { this.emailAddressId = emailAddressId; return this; } - + public UpdateEmailAddressRequestBuilder requestBody(UpdateEmailAddressRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.of(requestBody); + return this; + } + + public UpdateEmailAddressRequestBuilder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceAuthConfigRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceAuthConfigRequestBuilder.java index a10a6912..3b4ad9ee 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceAuthConfigRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceAuthConfigRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class UpdateInstanceAuthConfigRequestBuilder { - private UpdateInstanceAuthConfigRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallUpdateInstanceAuthConfig sdk; public UpdateInstanceAuthConfigRequestBuilder(SDKMethodInterfaces.MethodCallUpdateInstanceAuthConfig sdk) { this.sdk = sdk; } - + public UpdateInstanceAuthConfigRequestBuilder request(UpdateInstanceAuthConfigRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public UpdateInstanceAuthConfigRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceOrganizationSettingsRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceOrganizationSettingsRequestBuilder.java index 1a5600c7..d7a8e47d 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceOrganizationSettingsRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceOrganizationSettingsRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class UpdateInstanceOrganizationSettingsRequestBuilder { - private UpdateInstanceOrganizationSettingsRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallUpdateInstanceOrganizationSettings sdk; public UpdateInstanceOrganizationSettingsRequestBuilder(SDKMethodInterfaces.MethodCallUpdateInstanceOrganizationSettings sdk) { this.sdk = sdk; } - + public UpdateInstanceOrganizationSettingsRequestBuilder request(UpdateInstanceOrganizationSettingsRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public UpdateInstanceOrganizationSettingsRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceRequestBuilder.java index b66a33b3..bb0e01a1 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class UpdateInstanceRequestBuilder { - private UpdateInstanceRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallUpdateInstance sdk; public UpdateInstanceRequestBuilder(SDKMethodInterfaces.MethodCallUpdateInstance sdk) { this.sdk = sdk; } - + public UpdateInstanceRequestBuilder request(UpdateInstanceRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public UpdateInstanceRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceRestrictionsRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceRestrictionsRequestBuilder.java index ba2fc526..8e7c8672 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceRestrictionsRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceRestrictionsRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class UpdateInstanceRestrictionsRequestBuilder { - private UpdateInstanceRestrictionsRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallUpdateInstanceRestrictions sdk; public UpdateInstanceRestrictionsRequestBuilder(SDKMethodInterfaces.MethodCallUpdateInstanceRestrictions sdk) { this.sdk = sdk; } - + public UpdateInstanceRestrictionsRequestBuilder request(UpdateInstanceRestrictionsRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public UpdateInstanceRestrictionsRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateJWTTemplateRequest.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateJWTTemplateRequest.java index 168870c3..f9f2d529 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateJWTTemplateRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateJWTTemplateRequest.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Objects; +import java.util.Optional; public class UpdateJWTTemplateRequest { @@ -23,17 +25,22 @@ public class UpdateJWTTemplateRequest { private String templateId; @SpeakeasyMetadata("request:mediaType=application/json") - private UpdateJWTTemplateRequestBody requestBody; + private Optional requestBody; @JsonCreator public UpdateJWTTemplateRequest( String templateId, - UpdateJWTTemplateRequestBody requestBody) { + Optional requestBody) { Utils.checkNotNull(templateId, "templateId"); Utils.checkNotNull(requestBody, "requestBody"); this.templateId = templateId; this.requestBody = requestBody; } + + public UpdateJWTTemplateRequest( + String templateId) { + this(templateId, Optional.empty()); + } /** * The ID of the JWT template to update @@ -43,9 +50,10 @@ public String templateId() { return templateId; } + @SuppressWarnings("unchecked") @JsonIgnore - public UpdateJWTTemplateRequestBody requestBody() { - return requestBody; + public Optional requestBody() { + return (Optional) requestBody; } public final static Builder builder() { @@ -62,6 +70,12 @@ public UpdateJWTTemplateRequest withTemplateId(String templateId) { } public UpdateJWTTemplateRequest withRequestBody(UpdateJWTTemplateRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public UpdateJWTTemplateRequest withRequestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; @@ -99,7 +113,7 @@ public final static class Builder { private String templateId; - private UpdateJWTTemplateRequestBody requestBody; + private Optional requestBody = Optional.empty(); private Builder() { // force use of static builder() method @@ -115,6 +129,12 @@ public Builder templateId(String templateId) { } public Builder requestBody(UpdateJWTTemplateRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public Builder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateJWTTemplateRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateJWTTemplateRequestBuilder.java index f3c9e7ad..6dcda7f8 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateJWTTemplateRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateJWTTemplateRequestBuilder.java @@ -6,11 +6,12 @@ import com.clerk.backend_api.utils.Utils; import java.lang.String; +import java.util.Optional; public class UpdateJWTTemplateRequestBuilder { private String templateId; - private UpdateJWTTemplateRequestBody requestBody; + private Optional requestBody = Optional.empty(); private final SDKMethodInterfaces.MethodCallUpdateJWTTemplate sdk; public UpdateJWTTemplateRequestBuilder(SDKMethodInterfaces.MethodCallUpdateJWTTemplate sdk) { @@ -22,8 +23,14 @@ public UpdateJWTTemplateRequestBuilder templateId(String templateId) { this.templateId = templateId; return this; } - + public UpdateJWTTemplateRequestBuilder requestBody(UpdateJWTTemplateRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.of(requestBody); + return this; + } + + public UpdateJWTTemplateRequestBuilder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateOAuthApplicationRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateOAuthApplicationRequestBody.java index a7081019..ceba87fd 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateOAuthApplicationRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateOAuthApplicationRequestBody.java @@ -13,10 +13,15 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.type.TypeReference; +import java.lang.Boolean; +import java.lang.Deprecated; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; import java.util.Objects; import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; public class UpdateOAuthApplicationRequestBody { @@ -26,52 +31,85 @@ public class UpdateOAuthApplicationRequestBody { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("name") - private Optional name; + private JsonNullable name; + + /** + * An array of redirect URIs of the new OAuth application + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("redirect_uris") + private JsonNullable> redirectUris; /** * The new callback URL of the OAuth application + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("callback_url") - private Optional callbackUrl; + @Deprecated + private JsonNullable callbackUrl; /** * Define the allowed scopes for the new OAuth applications that dictate the user payload of the OAuth user info endpoint. Available scopes are `profile`, `email`, `public_metadata`, `private_metadata`. Provide the requested scopes as a string, separated by spaces. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("scopes") - private Optional scopes; + private JsonNullable scopes; + + /** + * If true, this client is public and you can use the Proof Key of Code Exchange (PKCE) flow. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("public") + private Optional public_; @JsonCreator public UpdateOAuthApplicationRequestBody( - @JsonProperty("name") Optional name, - @JsonProperty("callback_url") Optional callbackUrl, - @JsonProperty("scopes") Optional scopes) { + @JsonProperty("name") JsonNullable name, + @JsonProperty("redirect_uris") JsonNullable> redirectUris, + @JsonProperty("callback_url") JsonNullable callbackUrl, + @JsonProperty("scopes") JsonNullable scopes, + @JsonProperty("public") Optional public_) { Utils.checkNotNull(name, "name"); + Utils.checkNotNull(redirectUris, "redirectUris"); Utils.checkNotNull(callbackUrl, "callbackUrl"); Utils.checkNotNull(scopes, "scopes"); + Utils.checkNotNull(public_, "public_"); this.name = name; + this.redirectUris = redirectUris; this.callbackUrl = callbackUrl; this.scopes = scopes; + this.public_ = public_; } public UpdateOAuthApplicationRequestBody() { - this(Optional.empty(), Optional.empty(), Optional.empty()); + this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty()); } /** * The new name of the OAuth application */ @JsonIgnore - public Optional name() { + public JsonNullable name() { return name; } + /** + * An array of redirect URIs of the new OAuth application + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> redirectUris() { + return (JsonNullable>) redirectUris; + } + /** * The new callback URL of the OAuth application + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated @JsonIgnore - public Optional callbackUrl() { + public JsonNullable callbackUrl() { return callbackUrl; } @@ -79,10 +117,18 @@ public Optional callbackUrl() { * Define the allowed scopes for the new OAuth applications that dictate the user payload of the OAuth user info endpoint. Available scopes are `profile`, `email`, `public_metadata`, `private_metadata`. Provide the requested scopes as a string, separated by spaces. */ @JsonIgnore - public Optional scopes() { + public JsonNullable scopes() { return scopes; } + /** + * If true, this client is public and you can use the Proof Key of Code Exchange (PKCE) flow. + */ + @JsonIgnore + public Optional public_() { + return public_; + } + public final static Builder builder() { return new Builder(); } @@ -92,32 +138,54 @@ public final static Builder builder() { */ public UpdateOAuthApplicationRequestBody withName(String name) { Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); + this.name = JsonNullable.of(name); return this; } /** * The new name of the OAuth application */ - public UpdateOAuthApplicationRequestBody withName(Optional name) { + public UpdateOAuthApplicationRequestBody withName(JsonNullable name) { Utils.checkNotNull(name, "name"); this.name = name; return this; } + /** + * An array of redirect URIs of the new OAuth application + */ + public UpdateOAuthApplicationRequestBody withRedirectUris(List redirectUris) { + Utils.checkNotNull(redirectUris, "redirectUris"); + this.redirectUris = JsonNullable.of(redirectUris); + return this; + } + + /** + * An array of redirect URIs of the new OAuth application + */ + public UpdateOAuthApplicationRequestBody withRedirectUris(JsonNullable> redirectUris) { + Utils.checkNotNull(redirectUris, "redirectUris"); + this.redirectUris = redirectUris; + return this; + } + /** * The new callback URL of the OAuth application + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public UpdateOAuthApplicationRequestBody withCallbackUrl(String callbackUrl) { Utils.checkNotNull(callbackUrl, "callbackUrl"); - this.callbackUrl = Optional.ofNullable(callbackUrl); + this.callbackUrl = JsonNullable.of(callbackUrl); return this; } /** * The new callback URL of the OAuth application + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ - public UpdateOAuthApplicationRequestBody withCallbackUrl(Optional callbackUrl) { + @Deprecated + public UpdateOAuthApplicationRequestBody withCallbackUrl(JsonNullable callbackUrl) { Utils.checkNotNull(callbackUrl, "callbackUrl"); this.callbackUrl = callbackUrl; return this; @@ -128,18 +196,36 @@ public UpdateOAuthApplicationRequestBody withCallbackUrl(Optional callba */ public UpdateOAuthApplicationRequestBody withScopes(String scopes) { Utils.checkNotNull(scopes, "scopes"); - this.scopes = Optional.ofNullable(scopes); + this.scopes = JsonNullable.of(scopes); return this; } /** * Define the allowed scopes for the new OAuth applications that dictate the user payload of the OAuth user info endpoint. Available scopes are `profile`, `email`, `public_metadata`, `private_metadata`. Provide the requested scopes as a string, separated by spaces. */ - public UpdateOAuthApplicationRequestBody withScopes(Optional scopes) { + public UpdateOAuthApplicationRequestBody withScopes(JsonNullable scopes) { Utils.checkNotNull(scopes, "scopes"); this.scopes = scopes; return this; } + + /** + * If true, this client is public and you can use the Proof Key of Code Exchange (PKCE) flow. + */ + public UpdateOAuthApplicationRequestBody withPublic(boolean public_) { + Utils.checkNotNull(public_, "public_"); + this.public_ = Optional.ofNullable(public_); + return this; + } + + /** + * If true, this client is public and you can use the Proof Key of Code Exchange (PKCE) flow. + */ + public UpdateOAuthApplicationRequestBody withPublic(Optional public_) { + Utils.checkNotNull(public_, "public_"); + this.public_ = public_; + return this; + } @Override public boolean equals(java.lang.Object o) { @@ -152,33 +238,44 @@ public boolean equals(java.lang.Object o) { UpdateOAuthApplicationRequestBody other = (UpdateOAuthApplicationRequestBody) o; return Objects.deepEquals(this.name, other.name) && + Objects.deepEquals(this.redirectUris, other.redirectUris) && Objects.deepEquals(this.callbackUrl, other.callbackUrl) && - Objects.deepEquals(this.scopes, other.scopes); + Objects.deepEquals(this.scopes, other.scopes) && + Objects.deepEquals(this.public_, other.public_); } @Override public int hashCode() { return Objects.hash( name, + redirectUris, callbackUrl, - scopes); + scopes, + public_); } @Override public String toString() { return Utils.toString(UpdateOAuthApplicationRequestBody.class, "name", name, + "redirectUris", redirectUris, "callbackUrl", callbackUrl, - "scopes", scopes); + "scopes", scopes, + "public_", public_); } public final static class Builder { - private Optional name = Optional.empty(); + private JsonNullable name = JsonNullable.undefined(); - private Optional callbackUrl = Optional.empty(); + private JsonNullable> redirectUris = JsonNullable.undefined(); - private Optional scopes; + @Deprecated + private JsonNullable callbackUrl = JsonNullable.undefined(); + + private JsonNullable scopes; + + private Optional public_ = Optional.empty(); private Builder() { // force use of static builder() method @@ -189,32 +286,54 @@ private Builder() { */ public Builder name(String name) { Utils.checkNotNull(name, "name"); - this.name = Optional.ofNullable(name); + this.name = JsonNullable.of(name); return this; } /** * The new name of the OAuth application */ - public Builder name(Optional name) { + public Builder name(JsonNullable name) { Utils.checkNotNull(name, "name"); this.name = name; return this; } + /** + * An array of redirect URIs of the new OAuth application + */ + public Builder redirectUris(List redirectUris) { + Utils.checkNotNull(redirectUris, "redirectUris"); + this.redirectUris = JsonNullable.of(redirectUris); + return this; + } + + /** + * An array of redirect URIs of the new OAuth application + */ + public Builder redirectUris(JsonNullable> redirectUris) { + Utils.checkNotNull(redirectUris, "redirectUris"); + this.redirectUris = redirectUris; + return this; + } + /** * The new callback URL of the OAuth application + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ + @Deprecated public Builder callbackUrl(String callbackUrl) { Utils.checkNotNull(callbackUrl, "callbackUrl"); - this.callbackUrl = Optional.ofNullable(callbackUrl); + this.callbackUrl = JsonNullable.of(callbackUrl); return this; } /** * The new callback URL of the OAuth application + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ - public Builder callbackUrl(Optional callbackUrl) { + @Deprecated + public Builder callbackUrl(JsonNullable callbackUrl) { Utils.checkNotNull(callbackUrl, "callbackUrl"); this.callbackUrl = callbackUrl; return this; @@ -225,33 +344,53 @@ public Builder callbackUrl(Optional callbackUrl) { */ public Builder scopes(String scopes) { Utils.checkNotNull(scopes, "scopes"); - this.scopes = Optional.ofNullable(scopes); + this.scopes = JsonNullable.of(scopes); return this; } /** * Define the allowed scopes for the new OAuth applications that dictate the user payload of the OAuth user info endpoint. Available scopes are `profile`, `email`, `public_metadata`, `private_metadata`. Provide the requested scopes as a string, separated by spaces. */ - public Builder scopes(Optional scopes) { + public Builder scopes(JsonNullable scopes) { Utils.checkNotNull(scopes, "scopes"); this.scopes = scopes; return this; } + + /** + * If true, this client is public and you can use the Proof Key of Code Exchange (PKCE) flow. + */ + public Builder public_(boolean public_) { + Utils.checkNotNull(public_, "public_"); + this.public_ = Optional.ofNullable(public_); + return this; + } + + /** + * If true, this client is public and you can use the Proof Key of Code Exchange (PKCE) flow. + */ + public Builder public_(Optional public_) { + Utils.checkNotNull(public_, "public_"); + this.public_ = public_; + return this; + } public UpdateOAuthApplicationRequestBody build() { if (scopes == null) { scopes = _SINGLETON_VALUE_Scopes.value(); } return new UpdateOAuthApplicationRequestBody( name, + redirectUris, callbackUrl, - scopes); + scopes, + public_); } - private static final LazySingletonValue> _SINGLETON_VALUE_Scopes = + private static final LazySingletonValue> _SINGLETON_VALUE_Scopes = new LazySingletonValue<>( "scopes", "\"profile email\"", - new TypeReference>() {}); + new TypeReference>() {}); } } diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataPrivateMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataPrivateMetadata.java deleted file mode 100644 index 1ec83399..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataPrivateMetadata.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * UpdateOrganizationMembershipMetadataPrivateMetadata - Metadata saved on the organization membership that is only visible to your backend. - * The new object will be merged with the existing value. - */ - -public class UpdateOrganizationMembershipMetadataPrivateMetadata { - - @JsonCreator - public UpdateOrganizationMembershipMetadataPrivateMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(UpdateOrganizationMembershipMetadataPrivateMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public UpdateOrganizationMembershipMetadataPrivateMetadata build() { - return new UpdateOrganizationMembershipMetadataPrivateMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataPublicMetadata.java deleted file mode 100644 index bcaec255..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataPublicMetadata.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * UpdateOrganizationMembershipMetadataPublicMetadata - Metadata saved on the organization membership, that is visible to both your frontend and backend. - * The new object will be merged with the existing value. - */ - -public class UpdateOrganizationMembershipMetadataPublicMetadata { - - @JsonCreator - public UpdateOrganizationMembershipMetadataPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(UpdateOrganizationMembershipMetadataPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public UpdateOrganizationMembershipMetadataPublicMetadata build() { - return new UpdateOrganizationMembershipMetadataPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataRequest.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataRequest.java index c86caa25..b2c82a33 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataRequest.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Objects; +import java.util.Optional; public class UpdateOrganizationMembershipMetadataRequest { @@ -29,13 +31,13 @@ public class UpdateOrganizationMembershipMetadataRequest { private String userId; @SpeakeasyMetadata("request:mediaType=application/json") - private UpdateOrganizationMembershipMetadataRequestBody requestBody; + private Optional requestBody; @JsonCreator public UpdateOrganizationMembershipMetadataRequest( String organizationId, String userId, - UpdateOrganizationMembershipMetadataRequestBody requestBody) { + Optional requestBody) { Utils.checkNotNull(organizationId, "organizationId"); Utils.checkNotNull(userId, "userId"); Utils.checkNotNull(requestBody, "requestBody"); @@ -43,6 +45,12 @@ public UpdateOrganizationMembershipMetadataRequest( this.userId = userId; this.requestBody = requestBody; } + + public UpdateOrganizationMembershipMetadataRequest( + String organizationId, + String userId) { + this(organizationId, userId, Optional.empty()); + } /** * The ID of the organization the membership belongs to @@ -60,9 +68,10 @@ public String userId() { return userId; } + @SuppressWarnings("unchecked") @JsonIgnore - public UpdateOrganizationMembershipMetadataRequestBody requestBody() { - return requestBody; + public Optional requestBody() { + return (Optional) requestBody; } public final static Builder builder() { @@ -88,6 +97,12 @@ public UpdateOrganizationMembershipMetadataRequest withUserId(String userId) { } public UpdateOrganizationMembershipMetadataRequest withRequestBody(UpdateOrganizationMembershipMetadataRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public UpdateOrganizationMembershipMetadataRequest withRequestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; @@ -130,7 +145,7 @@ public final static class Builder { private String userId; - private UpdateOrganizationMembershipMetadataRequestBody requestBody; + private Optional requestBody = Optional.empty(); private Builder() { // force use of static builder() method @@ -155,6 +170,12 @@ public Builder userId(String userId) { } public Builder requestBody(UpdateOrganizationMembershipMetadataRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public Builder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataRequestBody.java index 6ce35a54..383b5d9f 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataRequestBody.java @@ -11,9 +11,11 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.util.Map; import java.util.Objects; import java.util.Optional; @@ -26,7 +28,7 @@ public class UpdateOrganizationMembershipMetadataRequestBody { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; /** * Metadata saved on the organization membership that is only visible to your backend. @@ -34,12 +36,12 @@ public class UpdateOrganizationMembershipMetadataRequestBody { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("private_metadata") - private Optional privateMetadata; + private Optional> privateMetadata; @JsonCreator public UpdateOrganizationMembershipMetadataRequestBody( - @JsonProperty("public_metadata") Optional publicMetadata, - @JsonProperty("private_metadata") Optional privateMetadata) { + @JsonProperty("public_metadata") Optional> publicMetadata, + @JsonProperty("private_metadata") Optional> privateMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); Utils.checkNotNull(privateMetadata, "privateMetadata"); this.publicMetadata = publicMetadata; @@ -56,8 +58,8 @@ public UpdateOrganizationMembershipMetadataRequestBody() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } /** @@ -66,8 +68,8 @@ public Optional publicMetada */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional privateMetadata() { - return (Optional) privateMetadata; + public Optional> privateMetadata() { + return (Optional>) privateMetadata; } public final static Builder builder() { @@ -78,7 +80,7 @@ public final static Builder builder() { * Metadata saved on the organization membership, that is visible to both your frontend and backend. * The new object will be merged with the existing value. */ - public UpdateOrganizationMembershipMetadataRequestBody withPublicMetadata(UpdateOrganizationMembershipMetadataPublicMetadata publicMetadata) { + public UpdateOrganizationMembershipMetadataRequestBody withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -88,7 +90,7 @@ public UpdateOrganizationMembershipMetadataRequestBody withPublicMetadata(Update * Metadata saved on the organization membership, that is visible to both your frontend and backend. * The new object will be merged with the existing value. */ - public UpdateOrganizationMembershipMetadataRequestBody withPublicMetadata(Optional publicMetadata) { + public UpdateOrganizationMembershipMetadataRequestBody withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -98,7 +100,7 @@ public UpdateOrganizationMembershipMetadataRequestBody withPublicMetadata(Option * Metadata saved on the organization membership that is only visible to your backend. * The new object will be merged with the existing value. */ - public UpdateOrganizationMembershipMetadataRequestBody withPrivateMetadata(UpdateOrganizationMembershipMetadataPrivateMetadata privateMetadata) { + public UpdateOrganizationMembershipMetadataRequestBody withPrivateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; @@ -108,7 +110,7 @@ public UpdateOrganizationMembershipMetadataRequestBody withPrivateMetadata(Updat * Metadata saved on the organization membership that is only visible to your backend. * The new object will be merged with the existing value. */ - public UpdateOrganizationMembershipMetadataRequestBody withPrivateMetadata(Optional privateMetadata) { + public UpdateOrganizationMembershipMetadataRequestBody withPrivateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -144,9 +146,9 @@ public String toString() { public final static class Builder { - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); - private Optional privateMetadata = Optional.empty(); + private Optional> privateMetadata = Optional.empty(); private Builder() { // force use of static builder() method @@ -156,7 +158,7 @@ private Builder() { * Metadata saved on the organization membership, that is visible to both your frontend and backend. * The new object will be merged with the existing value. */ - public Builder publicMetadata(UpdateOrganizationMembershipMetadataPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -166,7 +168,7 @@ public Builder publicMetadata(UpdateOrganizationMembershipMetadataPublicMetadata * Metadata saved on the organization membership, that is visible to both your frontend and backend. * The new object will be merged with the existing value. */ - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -176,7 +178,7 @@ public Builder publicMetadata(Optional privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; @@ -186,7 +188,7 @@ public Builder privateMetadata(UpdateOrganizationMembershipMetadataPrivateMetada * Metadata saved on the organization membership that is only visible to your backend. * The new object will be merged with the existing value. */ - public Builder privateMetadata(Optional privateMetadata) { + public Builder privateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataRequestBuilder.java index 64e1af35..9dec12d8 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationMembershipMetadataRequestBuilder.java @@ -6,12 +6,13 @@ import com.clerk.backend_api.utils.Utils; import java.lang.String; +import java.util.Optional; public class UpdateOrganizationMembershipMetadataRequestBuilder { private String organizationId; private String userId; - private UpdateOrganizationMembershipMetadataRequestBody requestBody; + private Optional requestBody = Optional.empty(); private final SDKMethodInterfaces.MethodCallUpdateOrganizationMembershipMetadata sdk; public UpdateOrganizationMembershipMetadataRequestBuilder(SDKMethodInterfaces.MethodCallUpdateOrganizationMembershipMetadata sdk) { @@ -29,8 +30,14 @@ public UpdateOrganizationMembershipMetadataRequestBuilder userId(String userId) this.userId = userId; return this; } - + public UpdateOrganizationMembershipMetadataRequestBuilder requestBody(UpdateOrganizationMembershipMetadataRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.of(requestBody); + return this; + } + + public UpdateOrganizationMembershipMetadataRequestBuilder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationPrivateMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationPrivateMetadata.java deleted file mode 100644 index 7c26aac2..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationPrivateMetadata.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * UpdateOrganizationPrivateMetadata - Metadata saved on the organization that is only visible to your backend. - */ - -public class UpdateOrganizationPrivateMetadata { - - @JsonCreator - public UpdateOrganizationPrivateMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(UpdateOrganizationPrivateMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public UpdateOrganizationPrivateMetadata build() { - return new UpdateOrganizationPrivateMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationPublicMetadata.java deleted file mode 100644 index 1f1d869b..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationPublicMetadata.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * UpdateOrganizationPublicMetadata - Metadata saved on the organization, that is visible to both your frontend and backend. - */ - -public class UpdateOrganizationPublicMetadata { - - @JsonCreator - public UpdateOrganizationPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(UpdateOrganizationPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public UpdateOrganizationPublicMetadata build() { - return new UpdateOrganizationPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationRequestBody.java index c0aaf6fe..e69f778b 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateOrganizationRequestBody.java @@ -13,9 +13,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.lang.Boolean; import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; +import java.util.Map; import java.util.Objects; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -28,14 +30,14 @@ public class UpdateOrganizationRequestBody { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; /** * Metadata saved on the organization that is only visible to your backend. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("private_metadata") - private Optional privateMetadata; + private Optional> privateMetadata; /** * The new name of the organization. @@ -75,8 +77,8 @@ public class UpdateOrganizationRequestBody { @JsonCreator public UpdateOrganizationRequestBody( - @JsonProperty("public_metadata") Optional publicMetadata, - @JsonProperty("private_metadata") Optional privateMetadata, + @JsonProperty("public_metadata") Optional> publicMetadata, + @JsonProperty("private_metadata") Optional> privateMetadata, @JsonProperty("name") JsonNullable name, @JsonProperty("slug") JsonNullable slug, @JsonProperty("max_allowed_memberships") JsonNullable maxAllowedMemberships, @@ -107,8 +109,8 @@ public UpdateOrganizationRequestBody() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } /** @@ -116,8 +118,8 @@ public Optional publicMetadata() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional privateMetadata() { - return (Optional) privateMetadata; + public Optional> privateMetadata() { + return (Optional>) privateMetadata; } /** @@ -168,7 +170,7 @@ public final static Builder builder() { /** * Metadata saved on the organization, that is visible to both your frontend and backend. */ - public UpdateOrganizationRequestBody withPublicMetadata(UpdateOrganizationPublicMetadata publicMetadata) { + public UpdateOrganizationRequestBody withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -177,7 +179,7 @@ public UpdateOrganizationRequestBody withPublicMetadata(UpdateOrganizationPublic /** * Metadata saved on the organization, that is visible to both your frontend and backend. */ - public UpdateOrganizationRequestBody withPublicMetadata(Optional publicMetadata) { + public UpdateOrganizationRequestBody withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -186,7 +188,7 @@ public UpdateOrganizationRequestBody withPublicMetadata(Optional privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; @@ -195,7 +197,7 @@ public UpdateOrganizationRequestBody withPrivateMetadata(UpdateOrganizationPriva /** * Metadata saved on the organization that is only visible to your backend. */ - public UpdateOrganizationRequestBody withPrivateMetadata(Optional privateMetadata) { + public UpdateOrganizationRequestBody withPrivateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -338,9 +340,9 @@ public String toString() { public final static class Builder { - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); - private Optional privateMetadata = Optional.empty(); + private Optional> privateMetadata = Optional.empty(); private JsonNullable name = JsonNullable.undefined(); @@ -359,7 +361,7 @@ private Builder() { /** * Metadata saved on the organization, that is visible to both your frontend and backend. */ - public Builder publicMetadata(UpdateOrganizationPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -368,7 +370,7 @@ public Builder publicMetadata(UpdateOrganizationPublicMetadata publicMetadata) { /** * Metadata saved on the organization, that is visible to both your frontend and backend. */ - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -377,7 +379,7 @@ public Builder publicMetadata(Optional privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; @@ -386,7 +388,7 @@ public Builder privateMetadata(UpdateOrganizationPrivateMetadata privateMetadata /** * Metadata saved on the organization that is only visible to your backend. */ - public Builder privateMetadata(Optional privateMetadata) { + public Builder privateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdatePhoneNumberRequest.java b/src/main/java/com/clerk/backend_api/models/operations/UpdatePhoneNumberRequest.java index a0ef2dce..ede296f0 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdatePhoneNumberRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdatePhoneNumberRequest.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Objects; +import java.util.Optional; public class UpdatePhoneNumberRequest { @@ -23,17 +25,22 @@ public class UpdatePhoneNumberRequest { private String phoneNumberId; @SpeakeasyMetadata("request:mediaType=application/json") - private UpdatePhoneNumberRequestBody requestBody; + private Optional requestBody; @JsonCreator public UpdatePhoneNumberRequest( String phoneNumberId, - UpdatePhoneNumberRequestBody requestBody) { + Optional requestBody) { Utils.checkNotNull(phoneNumberId, "phoneNumberId"); Utils.checkNotNull(requestBody, "requestBody"); this.phoneNumberId = phoneNumberId; this.requestBody = requestBody; } + + public UpdatePhoneNumberRequest( + String phoneNumberId) { + this(phoneNumberId, Optional.empty()); + } /** * The ID of the phone number to update @@ -43,9 +50,10 @@ public String phoneNumberId() { return phoneNumberId; } + @SuppressWarnings("unchecked") @JsonIgnore - public UpdatePhoneNumberRequestBody requestBody() { - return requestBody; + public Optional requestBody() { + return (Optional) requestBody; } public final static Builder builder() { @@ -62,6 +70,12 @@ public UpdatePhoneNumberRequest withPhoneNumberId(String phoneNumberId) { } public UpdatePhoneNumberRequest withRequestBody(UpdatePhoneNumberRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public UpdatePhoneNumberRequest withRequestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; @@ -99,7 +113,7 @@ public final static class Builder { private String phoneNumberId; - private UpdatePhoneNumberRequestBody requestBody; + private Optional requestBody = Optional.empty(); private Builder() { // force use of static builder() method @@ -115,6 +129,12 @@ public Builder phoneNumberId(String phoneNumberId) { } public Builder requestBody(UpdatePhoneNumberRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public Builder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdatePhoneNumberRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/UpdatePhoneNumberRequestBuilder.java index 4fcc6d01..cc28ab97 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdatePhoneNumberRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdatePhoneNumberRequestBuilder.java @@ -6,11 +6,12 @@ import com.clerk.backend_api.utils.Utils; import java.lang.String; +import java.util.Optional; public class UpdatePhoneNumberRequestBuilder { private String phoneNumberId; - private UpdatePhoneNumberRequestBody requestBody; + private Optional requestBody = Optional.empty(); private final SDKMethodInterfaces.MethodCallUpdatePhoneNumber sdk; public UpdatePhoneNumberRequestBuilder(SDKMethodInterfaces.MethodCallUpdatePhoneNumber sdk) { @@ -22,8 +23,14 @@ public UpdatePhoneNumberRequestBuilder phoneNumberId(String phoneNumberId) { this.phoneNumberId = phoneNumberId; return this; } - + public UpdatePhoneNumberRequestBuilder requestBody(UpdatePhoneNumberRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.of(requestBody); + return this; + } + + public UpdatePhoneNumberRequestBuilder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateSAMLConnectionRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateSAMLConnectionRequestBody.java index bf394cc1..eb702cb5 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateSAMLConnectionRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateSAMLConnectionRequestBody.java @@ -70,6 +70,13 @@ public class UpdateSAMLConnectionRequestBody { @JsonProperty("idp_metadata") private JsonNullable idpMetadata; + /** + * The ID of the organization to which users of this SAML Connection will be added + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("organization_id") + private JsonNullable organizationId; + /** * Define the atrtibute name mapping between Identity Provider and Clerk's user properties */ @@ -121,6 +128,7 @@ public UpdateSAMLConnectionRequestBody( @JsonProperty("idp_certificate") JsonNullable idpCertificate, @JsonProperty("idp_metadata_url") JsonNullable idpMetadataUrl, @JsonProperty("idp_metadata") JsonNullable idpMetadata, + @JsonProperty("organization_id") JsonNullable organizationId, @JsonProperty("attribute_mapping") JsonNullable attributeMapping, @JsonProperty("active") JsonNullable active, @JsonProperty("sync_user_attributes") JsonNullable syncUserAttributes, @@ -134,6 +142,7 @@ public UpdateSAMLConnectionRequestBody( Utils.checkNotNull(idpCertificate, "idpCertificate"); Utils.checkNotNull(idpMetadataUrl, "idpMetadataUrl"); Utils.checkNotNull(idpMetadata, "idpMetadata"); + Utils.checkNotNull(organizationId, "organizationId"); Utils.checkNotNull(attributeMapping, "attributeMapping"); Utils.checkNotNull(active, "active"); Utils.checkNotNull(syncUserAttributes, "syncUserAttributes"); @@ -147,6 +156,7 @@ public UpdateSAMLConnectionRequestBody( this.idpCertificate = idpCertificate; this.idpMetadataUrl = idpMetadataUrl; this.idpMetadata = idpMetadata; + this.organizationId = organizationId; this.attributeMapping = attributeMapping; this.active = active; this.syncUserAttributes = syncUserAttributes; @@ -156,7 +166,7 @@ public UpdateSAMLConnectionRequestBody( } public UpdateSAMLConnectionRequestBody() { - this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); + this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined()); } /** @@ -215,6 +225,14 @@ public JsonNullable idpMetadata() { return idpMetadata; } + /** + * The ID of the organization to which users of this SAML Connection will be added + */ + @JsonIgnore + public JsonNullable organizationId() { + return organizationId; + } + /** * Define the atrtibute name mapping between Identity Provider and Clerk's user properties */ @@ -394,6 +412,24 @@ public UpdateSAMLConnectionRequestBody withIdpMetadata(JsonNullable idpM return this; } + /** + * The ID of the organization to which users of this SAML Connection will be added + */ + public UpdateSAMLConnectionRequestBody withOrganizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = JsonNullable.of(organizationId); + return this; + } + + /** + * The ID of the organization to which users of this SAML Connection will be added + */ + public UpdateSAMLConnectionRequestBody withOrganizationId(JsonNullable organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + /** * Define the atrtibute name mapping between Identity Provider and Clerk's user properties */ @@ -519,6 +555,7 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.idpCertificate, other.idpCertificate) && Objects.deepEquals(this.idpMetadataUrl, other.idpMetadataUrl) && Objects.deepEquals(this.idpMetadata, other.idpMetadata) && + Objects.deepEquals(this.organizationId, other.organizationId) && Objects.deepEquals(this.attributeMapping, other.attributeMapping) && Objects.deepEquals(this.active, other.active) && Objects.deepEquals(this.syncUserAttributes, other.syncUserAttributes) && @@ -537,6 +574,7 @@ public int hashCode() { idpCertificate, idpMetadataUrl, idpMetadata, + organizationId, attributeMapping, active, syncUserAttributes, @@ -555,6 +593,7 @@ public String toString() { "idpCertificate", idpCertificate, "idpMetadataUrl", idpMetadataUrl, "idpMetadata", idpMetadata, + "organizationId", organizationId, "attributeMapping", attributeMapping, "active", active, "syncUserAttributes", syncUserAttributes, @@ -579,6 +618,8 @@ public final static class Builder { private JsonNullable idpMetadata = JsonNullable.undefined(); + private JsonNullable organizationId = JsonNullable.undefined(); + private JsonNullable attributeMapping = JsonNullable.undefined(); private JsonNullable active = JsonNullable.undefined(); @@ -721,6 +762,24 @@ public Builder idpMetadata(JsonNullable idpMetadata) { return this; } + /** + * The ID of the organization to which users of this SAML Connection will be added + */ + public Builder organizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = JsonNullable.of(organizationId); + return this; + } + + /** + * The ID of the organization to which users of this SAML Connection will be added + */ + public Builder organizationId(JsonNullable organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + /** * Define the atrtibute name mapping between Identity Provider and Clerk's user properties */ @@ -838,6 +897,7 @@ public UpdateSAMLConnectionRequestBody build() { idpCertificate, idpMetadataUrl, idpMetadata, + organizationId, attributeMapping, active, syncUserAttributes, diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateSignUpRequest.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateSignUpRequest.java index f08902dd..e71b6d42 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateSignUpRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateSignUpRequest.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Objects; +import java.util.Optional; public class UpdateSignUpRequest { @@ -23,17 +25,22 @@ public class UpdateSignUpRequest { private String id; @SpeakeasyMetadata("request:mediaType=application/json") - private UpdateSignUpRequestBody requestBody; + private Optional requestBody; @JsonCreator public UpdateSignUpRequest( String id, - UpdateSignUpRequestBody requestBody) { + Optional requestBody) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(requestBody, "requestBody"); this.id = id; this.requestBody = requestBody; } + + public UpdateSignUpRequest( + String id) { + this(id, Optional.empty()); + } /** * The ID of the sign-up to update @@ -43,9 +50,10 @@ public String id() { return id; } + @SuppressWarnings("unchecked") @JsonIgnore - public UpdateSignUpRequestBody requestBody() { - return requestBody; + public Optional requestBody() { + return (Optional) requestBody; } public final static Builder builder() { @@ -62,6 +70,12 @@ public UpdateSignUpRequest withId(String id) { } public UpdateSignUpRequest withRequestBody(UpdateSignUpRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public UpdateSignUpRequest withRequestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; @@ -99,7 +113,7 @@ public final static class Builder { private String id; - private UpdateSignUpRequestBody requestBody; + private Optional requestBody = Optional.empty(); private Builder() { // force use of static builder() method @@ -115,6 +129,12 @@ public Builder id(String id) { } public Builder requestBody(UpdateSignUpRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public Builder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateSignUpRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateSignUpRequestBuilder.java index 9f85a571..cc744b46 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateSignUpRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateSignUpRequestBuilder.java @@ -6,11 +6,12 @@ import com.clerk.backend_api.utils.Utils; import java.lang.String; +import java.util.Optional; public class UpdateSignUpRequestBuilder { private String id; - private UpdateSignUpRequestBody requestBody; + private Optional requestBody = Optional.empty(); private final SDKMethodInterfaces.MethodCallUpdateSignUp sdk; public UpdateSignUpRequestBuilder(SDKMethodInterfaces.MethodCallUpdateSignUp sdk) { @@ -22,8 +23,14 @@ public UpdateSignUpRequestBuilder id(String id) { this.id = id; return this; } - + public UpdateSignUpRequestBuilder requestBody(UpdateSignUpRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.of(requestBody); + return this; + } + + public UpdateSignUpRequestBuilder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateUserMetadataRequest.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateUserMetadataRequest.java index 62cd0870..536ed14c 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateUserMetadataRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateUserMetadataRequest.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Objects; +import java.util.Optional; public class UpdateUserMetadataRequest { @@ -23,17 +25,22 @@ public class UpdateUserMetadataRequest { private String userId; @SpeakeasyMetadata("request:mediaType=application/json") - private UpdateUserMetadataRequestBody requestBody; + private Optional requestBody; @JsonCreator public UpdateUserMetadataRequest( String userId, - UpdateUserMetadataRequestBody requestBody) { + Optional requestBody) { Utils.checkNotNull(userId, "userId"); Utils.checkNotNull(requestBody, "requestBody"); this.userId = userId; this.requestBody = requestBody; } + + public UpdateUserMetadataRequest( + String userId) { + this(userId, Optional.empty()); + } /** * The ID of the user whose metadata will be updated and merged @@ -43,9 +50,10 @@ public String userId() { return userId; } + @SuppressWarnings("unchecked") @JsonIgnore - public UpdateUserMetadataRequestBody requestBody() { - return requestBody; + public Optional requestBody() { + return (Optional) requestBody; } public final static Builder builder() { @@ -62,6 +70,12 @@ public UpdateUserMetadataRequest withUserId(String userId) { } public UpdateUserMetadataRequest withRequestBody(UpdateUserMetadataRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public UpdateUserMetadataRequest withRequestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; @@ -99,7 +113,7 @@ public final static class Builder { private String userId; - private UpdateUserMetadataRequestBody requestBody; + private Optional requestBody = Optional.empty(); private Builder() { // force use of static builder() method @@ -115,6 +129,12 @@ public Builder userId(String userId) { } public Builder requestBody(UpdateUserMetadataRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public Builder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateUserMetadataRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateUserMetadataRequestBuilder.java index fa0df3bd..485b3f4d 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateUserMetadataRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateUserMetadataRequestBuilder.java @@ -6,11 +6,12 @@ import com.clerk.backend_api.utils.Utils; import java.lang.String; +import java.util.Optional; public class UpdateUserMetadataRequestBuilder { private String userId; - private UpdateUserMetadataRequestBody requestBody; + private Optional requestBody = Optional.empty(); private final SDKMethodInterfaces.MethodCallUpdateUserMetadata sdk; public UpdateUserMetadataRequestBuilder(SDKMethodInterfaces.MethodCallUpdateUserMetadata sdk) { @@ -22,8 +23,14 @@ public UpdateUserMetadataRequestBuilder userId(String userId) { this.userId = userId; return this; } - + public UpdateUserMetadataRequestBuilder requestBody(UpdateUserMetadataRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.of(requestBody); + return this; + } + + public UpdateUserMetadataRequestBuilder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateUserPrivateMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateUserPrivateMetadata.java deleted file mode 100644 index 419e6ce0..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateUserPrivateMetadata.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * UpdateUserPrivateMetadata - Metadata saved on the user, that is only visible to your Backend API - */ - -public class UpdateUserPrivateMetadata { - - @JsonCreator - public UpdateUserPrivateMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(UpdateUserPrivateMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public UpdateUserPrivateMetadata build() { - return new UpdateUserPrivateMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateUserPublicMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateUserPublicMetadata.java deleted file mode 100644 index 7cafdff8..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateUserPublicMetadata.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * UpdateUserPublicMetadata - Metadata saved on the user, that is visible to both your Frontend and Backend APIs - */ - -public class UpdateUserPublicMetadata { - - @JsonCreator - public UpdateUserPublicMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(UpdateUserPublicMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public UpdateUserPublicMetadata build() { - return new UpdateUserPublicMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateUserRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateUserRequestBody.java index 2785ba2c..61d82aa3 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateUserRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateUserRequestBody.java @@ -15,10 +15,12 @@ import com.fasterxml.jackson.core.type.TypeReference; import java.lang.Boolean; import java.lang.Long; +import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -164,14 +166,14 @@ public class UpdateUserRequestBody { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("public_metadata") - private Optional publicMetadata; + private Optional> publicMetadata; /** * Metadata saved on the user, that is only visible to your Backend API */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("private_metadata") - private Optional privateMetadata; + private Optional> privateMetadata; /** * Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. @@ -179,7 +181,7 @@ public class UpdateUserRequestBody { */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("unsafe_metadata") - private Optional unsafeMetadata; + private Optional> unsafeMetadata; /** * If true, the user can delete themselves with the Frontend API. @@ -242,9 +244,9 @@ public UpdateUserRequestBody( @JsonProperty("sign_out_of_other_sessions") JsonNullable signOutOfOtherSessions, @JsonProperty("totp_secret") Optional totpSecret, @JsonProperty("backup_codes") Optional> backupCodes, - @JsonProperty("public_metadata") Optional publicMetadata, - @JsonProperty("private_metadata") Optional privateMetadata, - @JsonProperty("unsafe_metadata") Optional unsafeMetadata, + @JsonProperty("public_metadata") Optional> publicMetadata, + @JsonProperty("private_metadata") Optional> privateMetadata, + @JsonProperty("unsafe_metadata") Optional> unsafeMetadata, @JsonProperty("delete_self_enabled") JsonNullable deleteSelfEnabled, @JsonProperty("create_organization_enabled") JsonNullable createOrganizationEnabled, @JsonProperty("legal_accepted_at") JsonNullable legalAcceptedAt, @@ -462,8 +464,8 @@ public Optional> backupCodes() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional publicMetadata() { - return (Optional) publicMetadata; + public Optional> publicMetadata() { + return (Optional>) publicMetadata; } /** @@ -471,8 +473,8 @@ public Optional publicMetadata() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional privateMetadata() { - return (Optional) privateMetadata; + public Optional> privateMetadata() { + return (Optional>) privateMetadata; } /** @@ -481,8 +483,8 @@ public Optional privateMetadata() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional unsafeMetadata() { - return (Optional) unsafeMetadata; + public Optional> unsafeMetadata() { + return (Optional>) unsafeMetadata; } /** @@ -871,7 +873,7 @@ public UpdateUserRequestBody withBackupCodes(Optional> ba /** * Metadata saved on the user, that is visible to both your Frontend and Backend APIs */ - public UpdateUserRequestBody withPublicMetadata(UpdateUserPublicMetadata publicMetadata) { + public UpdateUserRequestBody withPublicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -880,7 +882,7 @@ public UpdateUserRequestBody withPublicMetadata(UpdateUserPublicMetadata publicM /** * Metadata saved on the user, that is visible to both your Frontend and Backend APIs */ - public UpdateUserRequestBody withPublicMetadata(Optional publicMetadata) { + public UpdateUserRequestBody withPublicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -889,7 +891,7 @@ public UpdateUserRequestBody withPublicMetadata(Optional privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; @@ -898,7 +900,7 @@ public UpdateUserRequestBody withPrivateMetadata(UpdateUserPrivateMetadata priva /** * Metadata saved on the user, that is only visible to your Backend API */ - public UpdateUserRequestBody withPrivateMetadata(Optional privateMetadata) { + public UpdateUserRequestBody withPrivateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -908,7 +910,7 @@ public UpdateUserRequestBody withPrivateMetadata(Optional unsafeMetadata) { Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); this.unsafeMetadata = Optional.ofNullable(unsafeMetadata); return this; @@ -918,7 +920,7 @@ public UpdateUserRequestBody withUnsafeMetadata(UpdateUserUnsafeMetadata unsafeM * Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. * Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. */ - public UpdateUserRequestBody withUnsafeMetadata(Optional unsafeMetadata) { + public UpdateUserRequestBody withUnsafeMetadata(Optional> unsafeMetadata) { Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); this.unsafeMetadata = unsafeMetadata; return this; @@ -1165,11 +1167,11 @@ public final static class Builder { private Optional> backupCodes = Optional.empty(); - private Optional publicMetadata = Optional.empty(); + private Optional> publicMetadata = Optional.empty(); - private Optional privateMetadata = Optional.empty(); + private Optional> privateMetadata = Optional.empty(); - private Optional unsafeMetadata = Optional.empty(); + private Optional> unsafeMetadata = Optional.empty(); private JsonNullable deleteSelfEnabled = JsonNullable.undefined(); @@ -1520,7 +1522,7 @@ public Builder backupCodes(Optional> backupCodes) { /** * Metadata saved on the user, that is visible to both your Frontend and Backend APIs */ - public Builder publicMetadata(UpdateUserPublicMetadata publicMetadata) { + public Builder publicMetadata(Map publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = Optional.ofNullable(publicMetadata); return this; @@ -1529,7 +1531,7 @@ public Builder publicMetadata(UpdateUserPublicMetadata publicMetadata) { /** * Metadata saved on the user, that is visible to both your Frontend and Backend APIs */ - public Builder publicMetadata(Optional publicMetadata) { + public Builder publicMetadata(Optional> publicMetadata) { Utils.checkNotNull(publicMetadata, "publicMetadata"); this.publicMetadata = publicMetadata; return this; @@ -1538,7 +1540,7 @@ public Builder publicMetadata(Optional publi /** * Metadata saved on the user, that is only visible to your Backend API */ - public Builder privateMetadata(UpdateUserPrivateMetadata privateMetadata) { + public Builder privateMetadata(Map privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = Optional.ofNullable(privateMetadata); return this; @@ -1547,7 +1549,7 @@ public Builder privateMetadata(UpdateUserPrivateMetadata privateMetadata) { /** * Metadata saved on the user, that is only visible to your Backend API */ - public Builder privateMetadata(Optional privateMetadata) { + public Builder privateMetadata(Optional> privateMetadata) { Utils.checkNotNull(privateMetadata, "privateMetadata"); this.privateMetadata = privateMetadata; return this; @@ -1557,7 +1559,7 @@ public Builder privateMetadata(Optional pri * Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. * Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. */ - public Builder unsafeMetadata(UpdateUserUnsafeMetadata unsafeMetadata) { + public Builder unsafeMetadata(Map unsafeMetadata) { Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); this.unsafeMetadata = Optional.ofNullable(unsafeMetadata); return this; @@ -1567,7 +1569,7 @@ public Builder unsafeMetadata(UpdateUserUnsafeMetadata unsafeMetadata) { * Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. * Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. */ - public Builder unsafeMetadata(Optional unsafeMetadata) { + public Builder unsafeMetadata(Optional> unsafeMetadata) { Utils.checkNotNull(unsafeMetadata, "unsafeMetadata"); this.unsafeMetadata = unsafeMetadata; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateUserUnsafeMetadata.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateUserUnsafeMetadata.java deleted file mode 100644 index ae07574e..00000000 --- a/src/main/java/com/clerk/backend_api/models/operations/UpdateUserUnsafeMetadata.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package com.clerk.backend_api.models.operations; - - -import com.clerk.backend_api.utils.Utils; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * UpdateUserUnsafeMetadata - Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. - * Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. - */ - -public class UpdateUserUnsafeMetadata { - - @JsonCreator - public UpdateUserUnsafeMetadata() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(UpdateUserUnsafeMetadata.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public UpdateUserUnsafeMetadata build() { - return new UpdateUserUnsafeMetadata( - ); - } - } -} - diff --git a/src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoRequest.java b/src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoRequest.java index e411e512..832f5009 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoRequest.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Objects; +import java.util.Optional; public class UploadOrganizationLogoRequest { @@ -23,17 +25,22 @@ public class UploadOrganizationLogoRequest { private String organizationId; @SpeakeasyMetadata("request:mediaType=multipart/form-data") - private UploadOrganizationLogoRequestBody requestBody; + private Optional requestBody; @JsonCreator public UploadOrganizationLogoRequest( String organizationId, - UploadOrganizationLogoRequestBody requestBody) { + Optional requestBody) { Utils.checkNotNull(organizationId, "organizationId"); Utils.checkNotNull(requestBody, "requestBody"); this.organizationId = organizationId; this.requestBody = requestBody; } + + public UploadOrganizationLogoRequest( + String organizationId) { + this(organizationId, Optional.empty()); + } /** * The ID of the organization for which to upload a logo @@ -43,9 +50,10 @@ public String organizationId() { return organizationId; } + @SuppressWarnings("unchecked") @JsonIgnore - public UploadOrganizationLogoRequestBody requestBody() { - return requestBody; + public Optional requestBody() { + return (Optional) requestBody; } public final static Builder builder() { @@ -62,6 +70,12 @@ public UploadOrganizationLogoRequest withOrganizationId(String organizationId) { } public UploadOrganizationLogoRequest withRequestBody(UploadOrganizationLogoRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public UploadOrganizationLogoRequest withRequestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; @@ -99,7 +113,7 @@ public final static class Builder { private String organizationId; - private UploadOrganizationLogoRequestBody requestBody; + private Optional requestBody = Optional.empty(); private Builder() { // force use of static builder() method @@ -115,6 +129,12 @@ public Builder organizationId(String organizationId) { } public Builder requestBody(UploadOrganizationLogoRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public Builder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoRequestBuilder.java index de7d6713..51e71a66 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/UploadOrganizationLogoRequestBuilder.java @@ -6,11 +6,12 @@ import com.clerk.backend_api.utils.Utils; import java.lang.String; +import java.util.Optional; public class UploadOrganizationLogoRequestBuilder { private String organizationId; - private UploadOrganizationLogoRequestBody requestBody; + private Optional requestBody = Optional.empty(); private final SDKMethodInterfaces.MethodCallUploadOrganizationLogo sdk; public UploadOrganizationLogoRequestBuilder(SDKMethodInterfaces.MethodCallUploadOrganizationLogo sdk) { @@ -22,8 +23,14 @@ public UploadOrganizationLogoRequestBuilder organizationId(String organizationId this.organizationId = organizationId; return this; } - + public UploadOrganizationLogoRequestBuilder requestBody(UploadOrganizationLogoRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.of(requestBody); + return this; + } + + public UploadOrganizationLogoRequestBuilder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/VerifyClientRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/VerifyClientRequestBody.java index bec34161..1c0a4cba 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/VerifyClientRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/VerifyClientRequestBody.java @@ -16,6 +16,9 @@ import java.util.Objects; import java.util.Optional; +/** + * VerifyClientRequestBody - Parameters. + */ public class VerifyClientRequestBody { diff --git a/src/main/java/com/clerk/backend_api/models/operations/VerifyClientRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/VerifyClientRequestBuilder.java index 8d03f2d4..f46c330e 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/VerifyClientRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/VerifyClientRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class VerifyClientRequestBuilder { - private VerifyClientRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallVerifyClient sdk; public VerifyClientRequestBuilder(SDKMethodInterfaces.MethodCallVerifyClient sdk) { this.sdk = sdk; } - + public VerifyClientRequestBuilder request(VerifyClientRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public VerifyClientRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/VerifyDomainProxyRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/VerifyDomainProxyRequestBuilder.java index ca9b3778..d54992e5 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/VerifyDomainProxyRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/VerifyDomainProxyRequestBuilder.java @@ -5,17 +5,24 @@ package com.clerk.backend_api.models.operations; import com.clerk.backend_api.utils.Utils; +import java.util.Optional; public class VerifyDomainProxyRequestBuilder { - private VerifyDomainProxyRequestBody request; + private Optional request = Optional.empty(); private final SDKMethodInterfaces.MethodCallVerifyDomainProxy sdk; public VerifyDomainProxyRequestBuilder(SDKMethodInterfaces.MethodCallVerifyDomainProxy sdk) { this.sdk = sdk; } - + public VerifyDomainProxyRequestBuilder request(VerifyDomainProxyRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public VerifyDomainProxyRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/VerifyPasswordRequest.java b/src/main/java/com/clerk/backend_api/models/operations/VerifyPasswordRequest.java index 11f69c5c..d682904b 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/VerifyPasswordRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/VerifyPasswordRequest.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Objects; +import java.util.Optional; public class VerifyPasswordRequest { @@ -23,17 +25,22 @@ public class VerifyPasswordRequest { private String userId; @SpeakeasyMetadata("request:mediaType=application/json") - private VerifyPasswordRequestBody requestBody; + private Optional requestBody; @JsonCreator public VerifyPasswordRequest( String userId, - VerifyPasswordRequestBody requestBody) { + Optional requestBody) { Utils.checkNotNull(userId, "userId"); Utils.checkNotNull(requestBody, "requestBody"); this.userId = userId; this.requestBody = requestBody; } + + public VerifyPasswordRequest( + String userId) { + this(userId, Optional.empty()); + } /** * The ID of the user for whom to verify the password @@ -43,9 +50,10 @@ public String userId() { return userId; } + @SuppressWarnings("unchecked") @JsonIgnore - public VerifyPasswordRequestBody requestBody() { - return requestBody; + public Optional requestBody() { + return (Optional) requestBody; } public final static Builder builder() { @@ -62,6 +70,12 @@ public VerifyPasswordRequest withUserId(String userId) { } public VerifyPasswordRequest withRequestBody(VerifyPasswordRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public VerifyPasswordRequest withRequestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; @@ -99,7 +113,7 @@ public final static class Builder { private String userId; - private VerifyPasswordRequestBody requestBody; + private Optional requestBody = Optional.empty(); private Builder() { // force use of static builder() method @@ -115,6 +129,12 @@ public Builder userId(String userId) { } public Builder requestBody(VerifyPasswordRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public Builder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/VerifyPasswordRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/VerifyPasswordRequestBuilder.java index b6b94a62..9514bfba 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/VerifyPasswordRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/VerifyPasswordRequestBuilder.java @@ -6,11 +6,12 @@ import com.clerk.backend_api.utils.Utils; import java.lang.String; +import java.util.Optional; public class VerifyPasswordRequestBuilder { private String userId; - private VerifyPasswordRequestBody requestBody; + private Optional requestBody = Optional.empty(); private final SDKMethodInterfaces.MethodCallVerifyPassword sdk; public VerifyPasswordRequestBuilder(SDKMethodInterfaces.MethodCallVerifyPassword sdk) { @@ -22,8 +23,14 @@ public VerifyPasswordRequestBuilder userId(String userId) { this.userId = userId; return this; } - + public VerifyPasswordRequestBuilder requestBody(VerifyPasswordRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.of(requestBody); + return this; + } + + public VerifyPasswordRequestBuilder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/VerifyTOTPRequest.java b/src/main/java/com/clerk/backend_api/models/operations/VerifyTOTPRequest.java index 76748e4b..89608bb8 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/VerifyTOTPRequest.java +++ b/src/main/java/com/clerk/backend_api/models/operations/VerifyTOTPRequest.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; import java.util.Objects; +import java.util.Optional; public class VerifyTOTPRequest { @@ -23,17 +25,22 @@ public class VerifyTOTPRequest { private String userId; @SpeakeasyMetadata("request:mediaType=application/json") - private VerifyTOTPRequestBody requestBody; + private Optional requestBody; @JsonCreator public VerifyTOTPRequest( String userId, - VerifyTOTPRequestBody requestBody) { + Optional requestBody) { Utils.checkNotNull(userId, "userId"); Utils.checkNotNull(requestBody, "requestBody"); this.userId = userId; this.requestBody = requestBody; } + + public VerifyTOTPRequest( + String userId) { + this(userId, Optional.empty()); + } /** * The ID of the user for whom to verify the TOTP @@ -43,9 +50,10 @@ public String userId() { return userId; } + @SuppressWarnings("unchecked") @JsonIgnore - public VerifyTOTPRequestBody requestBody() { - return requestBody; + public Optional requestBody() { + return (Optional) requestBody; } public final static Builder builder() { @@ -62,6 +70,12 @@ public VerifyTOTPRequest withUserId(String userId) { } public VerifyTOTPRequest withRequestBody(VerifyTOTPRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public VerifyTOTPRequest withRequestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; @@ -99,7 +113,7 @@ public final static class Builder { private String userId; - private VerifyTOTPRequestBody requestBody; + private Optional requestBody = Optional.empty(); private Builder() { // force use of static builder() method @@ -115,6 +129,12 @@ public Builder userId(String userId) { } public Builder requestBody(VerifyTOTPRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + public Builder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/models/operations/VerifyTOTPRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/VerifyTOTPRequestBuilder.java index 1e4ff9e0..d5c63848 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/VerifyTOTPRequestBuilder.java +++ b/src/main/java/com/clerk/backend_api/models/operations/VerifyTOTPRequestBuilder.java @@ -6,11 +6,12 @@ import com.clerk.backend_api.utils.Utils; import java.lang.String; +import java.util.Optional; public class VerifyTOTPRequestBuilder { private String userId; - private VerifyTOTPRequestBody requestBody; + private Optional requestBody = Optional.empty(); private final SDKMethodInterfaces.MethodCallVerifyTOTP sdk; public VerifyTOTPRequestBuilder(SDKMethodInterfaces.MethodCallVerifyTOTP sdk) { @@ -22,8 +23,14 @@ public VerifyTOTPRequestBuilder userId(String userId) { this.userId = userId; return this; } - + public VerifyTOTPRequestBuilder requestBody(VerifyTOTPRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.of(requestBody); + return this; + } + + public VerifyTOTPRequestBuilder requestBody(Optional requestBody) { Utils.checkNotNull(requestBody, "requestBody"); this.requestBody = requestBody; return this; diff --git a/src/main/java/com/clerk/backend_api/utils/HTTPRequest.java b/src/main/java/com/clerk/backend_api/utils/HTTPRequest.java index 61ea3076..b97ca72a 100644 --- a/src/main/java/com/clerk/backend_api/utils/HTTPRequest.java +++ b/src/main/java/com/clerk/backend_api/utils/HTTPRequest.java @@ -46,7 +46,9 @@ public HTTPRequest addHeader(String key, String value) { headerValues = new ArrayList<>(); headers.put(key, headerValues); } - headerValues.add(value); + if (!headerValues.contains(value)) { + headerValues.add(value); + } return this; } diff --git a/src/main/java/com/clerk/backend_api/utils/RecordingClient.java b/src/main/java/com/clerk/backend_api/utils/RecordingClient.java new file mode 100644 index 00000000..23919c87 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/utils/RecordingClient.java @@ -0,0 +1,51 @@ +/* + * 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.URISyntaxException; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.function.Function; + +// internal testing use +public final class RecordingClient implements HTTPClient { + + private final List requests = new CopyOnWriteArrayList<>(); + private final HTTPClient client; + private final List> beforeRequestHooks = new ArrayList<>(); + + public RecordingClient() { + this.client = new SpeakeasyHTTPClient(); + } + + @Override + public HttpResponse send(HttpRequest request) + throws IOException, InterruptedException, URISyntaxException { + for (Function hook : beforeRequestHooks) { + request = hook.apply(request); + } + requests.add(request); + return client.send(request); + } + + public List requests() { + return requests; + } + + public RecordingClient beforeRequest(Function hook) { + beforeRequestHooks.add(hook); + return this; + } + + public void reset() { + requests.clear(); + } + +} \ No newline at end of file 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 6edc06e9..14238274 100644 --- a/src/main/java/com/clerk/backend_api/utils/RequestBody.java +++ b/src/main/java/com/clerk/backend_api/utils/RequestBody.java @@ -12,17 +12,16 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.regex.Pattern; import java.util.Optional; +import java.util.regex.Pattern; -import org.apache.http.HttpEntity; -import org.apache.http.NameValuePair; -import org.apache.http.client.entity.UrlEncodedFormEntity; -import org.apache.http.entity.ContentType; -import org.apache.http.entity.mime.HttpMultipartMode; -import org.apache.http.entity.mime.MultipartEntityBuilder; -import org.apache.http.message.BasicNameValuePair; - +import org.apache.hc.client5.http.entity.UrlEncodedFormEntity; +import org.apache.hc.client5.http.entity.mime.HttpMultipartMode; +import org.apache.hc.client5.http.entity.mime.MultipartEntityBuilder; +import org.apache.hc.core5.http.ContentType; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.NameValuePair; +import org.apache.hc.core5.http.message.BasicNameValuePair; import org.openapitools.jackson.nullable.JsonNullable; import com.fasterxml.jackson.databind.ObjectMapper; @@ -120,7 +119,7 @@ private static SerializedBody serializeContentType(String fieldName, String cont private static SerializedBody serializeMultipart(Object value) throws IllegalArgumentException, IllegalAccessException, UnsupportedOperationException, IOException { MultipartEntityBuilder builder = MultipartEntityBuilder.create(); - builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE); + builder.setMode(HttpMultipartMode.EXTENDED); String boundary = "-------------" + System.currentTimeMillis(); builder.setBoundary(boundary); @@ -161,7 +160,7 @@ private static SerializedBody serializeMultipart(Object value) } HttpEntity entity = builder.build(); - String ct = builder.build().getContentType().getValue(); + String ct = builder.build().getContentType(); return new SerializedBody(ct, BodyPublishers.ofInputStream(() -> { try { return entity.getContent(); @@ -334,8 +333,9 @@ public static SerializedBody serializeFormData(Object value) throw new RuntimeException("Invalid type for form data"); } + @SuppressWarnings("resource") UrlEncodedFormEntity entity = new UrlEncodedFormEntity(params); - String ct = entity.getContentType().getValue(); + String ct = entity.getContentType(); // ensure that a fresh open input stream is provided every time // by the BodyPublisher return new SerializedBody(ct, BodyPublishers.ofInputStream(() -> {