From 519bafbf20e4b65012e0971078e3557dfc9fd204 Mon Sep 17 00:00:00 2001 From: Stytch Codegen Bot Date: Wed, 21 Jan 2026 21:21:43 +0000 Subject: [PATCH 1/2] Add DFP Email Risk endpoint --- .../com/stytch/java/b2b/StytchB2BClient.kt | 6 +- .../DiscoveryIntermediateSessions.kt | 7 +- .../DiscoveryOrganizations.kt | 14 +-- .../stytch/java/b2b/api/idpoauth/IDPOAuth.kt | 14 +-- .../b2b/api/impersonation/Impersonation.kt | 7 +- .../java/b2b/api/magiclinks/MagicLinks.kt | 7 +- .../MagicLinksDiscovery.kt | 7 +- .../api/magiclinksemail/MagicLinksEmail.kt | 14 +-- .../MagicLinksEmailDiscovery.kt | 7 +- .../com/stytch/java/b2b/api/oauth/OAuth.kt | 7 +- .../b2b/api/oauthdiscovery/OAuthDiscovery.kt | 7 +- .../b2b/api/organizations/Organizations.kt | 63 ++++------ .../OrganizationsMembers.kt | 105 +++++++--------- .../OrganizationsMembersConnectedApps.kt | 7 +- .../OrganizationsMembersOAuthProviders.kt | 35 +++--- .../stytch/java/b2b/api/otpemail/OTPEmail.kt | 14 +-- .../otpemaildiscovery/OTPEmailDiscovery.kt | 14 +-- .../com/stytch/java/b2b/api/otpsms/OTPSms.kt | 14 +-- .../java/b2b/api/passwords/Passwords.kt | 21 ++-- .../passwordsdiscovery/PasswordsDiscovery.kt | 7 +- .../PasswordsDiscoveryEmail.kt | 14 +-- .../b2b/api/passwordsemail/PasswordsEmail.kt | 21 ++-- .../PasswordsExistingPassword.kt | 7 +- .../api/passwordssession/PasswordsSession.kt | 7 +- .../com/stytch/java/b2b/api/rbac/RBAC.kt | 7 +- .../rbacorganizations/RBACOrganizations.kt | 14 +-- .../b2b/api/recoverycodes/RecoveryCodes.kt | 21 ++-- .../b2b/api/scimconnection/SCIMConnection.kt | 56 ++++----- .../stytch/java/b2b/api/sessions/Sessions.kt | 56 ++++----- .../kotlin/com/stytch/java/b2b/api/sso/SSO.kt | 21 ++-- .../java/b2b/api/ssoexternal/SSOExternal.kt | 14 +-- .../stytch/java/b2b/api/ssooidc/SSOOIDC.kt | 14 +-- .../stytch/java/b2b/api/ssosaml/SSOSAML.kt | 35 +++--- .../com/stytch/java/b2b/api/totps/TOTPs.kt | 21 ++-- .../kotlin/com/stytch/java/common/Version.kt | 2 +- .../com/stytch/java/consumer/StytchClient.kt | 6 +- .../ConnectedAppsClients.kt | 35 +++--- .../ConnectedAppsClientsSecrets.kt | 21 ++-- .../api/cryptowallets/CryptoWallets.kt | 14 +-- .../stytch/java/consumer/api/debug/Debug.kt | 7 +- .../stytch/java/consumer/api/fraud/Fraud.kt | 5 + .../consumer/api/fraudemail/FraudEmail.kt | 88 +++++++++++++ .../api/fraudfingerprint/FraudFingerprint.kt | 7 +- .../consumer/api/fraudrules/FraudRules.kt | 14 +-- .../FraudVerdictReasons.kt | 14 +-- .../java/consumer/api/idpoauth/IDPOAuth.kt | 14 +-- .../api/impersonation/Impersonation.kt | 7 +- .../consumer/api/m2mclients/M2MClients.kt | 35 +++--- .../m2mclientssecrets/M2MClientsSecrets.kt | 21 ++-- .../consumer/api/magiclinks/MagicLinks.kt | 14 +-- .../api/magiclinksemail/MagicLinksEmail.kt | 28 ++--- .../stytch/java/consumer/api/oauth/OAuth.kt | 14 +-- .../com/stytch/java/consumer/api/otp/OTP.kt | 7 +- .../java/consumer/api/otpemail/OTPEmail.kt | 14 +-- .../stytch/java/consumer/api/otpsms/OTPSms.kt | 14 +-- .../consumer/api/otpwhatsapp/OTPWhatsApp.kt | 14 +-- .../java/consumer/api/passwords/Passwords.kt | 28 ++--- .../api/passwordsemail/PasswordsEmail.kt | 14 +-- .../PasswordsExistingPassword.kt | 7 +- .../api/passwordssession/PasswordsSession.kt | 7 +- .../java/consumer/api/project/Project.kt | 7 +- .../com/stytch/java/consumer/api/rbac/RBAC.kt | 7 +- .../java/consumer/api/sessions/Sessions.kt | 49 ++++---- .../stytch/java/consumer/api/totps/TOTPs.kt | 28 ++--- .../stytch/java/consumer/api/users/Users.kt | 119 ++++++++---------- .../java/consumer/api/webauthn/WebAuthn.kt | 42 +++---- .../java/consumer/models/fraud/Fraud.kt | 48 +++++++ .../consumer/models/fraudemail/FraudEmail.kt | 84 +++++++++++++ version.gradle.kts | 2 +- 69 files changed, 778 insertions(+), 744 deletions(-) create mode 100644 stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudemail/FraudEmail.kt create mode 100644 stytch/src/main/kotlin/com/stytch/java/consumer/models/fraudemail/FraudEmail.kt diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/StytchB2BClient.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/StytchB2BClient.kt index d0f6e010..95341d00 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/StytchB2BClient.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/StytchB2BClient.kt @@ -55,11 +55,7 @@ import kotlinx.coroutines.SupervisorJob public class StytchB2BClient @JvmOverloads - constructor( - projectId: String, - secret: String, - clientConfig: OptionalClientConfig = OptionalClientConfig(), - ) { + constructor(projectId: String, secret: String, clientConfig: OptionalClientConfig = OptionalClientConfig()) { private val coroutineScope = CoroutineScope(SupervisorJob()) private val baseUrl = getBaseUrl(projectId, clientConfig) private val httpClient: HttpClient = diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryintermediatesessions/DiscoveryIntermediateSessions.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryintermediatesessions/DiscoveryIntermediateSessions.kt index 71ba32a0..a8d0fb32 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryintermediatesessions/DiscoveryIntermediateSessions.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryintermediatesessions/DiscoveryIntermediateSessions.kt @@ -145,8 +145,7 @@ internal class IntermediateSessionsImpl( } override fun exchangeCompletable(data: ExchangeRequest): CompletableFuture> = - coroutineScope - .async { - exchange(data) - }.asCompletableFuture() + coroutineScope.async { + exchange(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryorganizations/DiscoveryOrganizations.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryorganizations/DiscoveryOrganizations.kt index f9bf29f3..c6babf48 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryorganizations/DiscoveryOrganizations.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryorganizations/DiscoveryOrganizations.kt @@ -219,10 +219,9 @@ internal class OrganizationsImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope - .async { - create(data) - }.asCompletableFuture() + coroutineScope.async { + create(data) + }.asCompletableFuture() override suspend fun list(data: ListRequest): StytchResult = withContext(Dispatchers.IO) { @@ -242,8 +241,7 @@ internal class OrganizationsImpl( } override fun listCompletable(data: ListRequest): CompletableFuture> = - coroutineScope - .async { - list(data) - }.asCompletableFuture() + coroutineScope.async { + list(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/idpoauth/IDPOAuth.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/idpoauth/IDPOAuth.kt index bc774532..52fc8904 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/idpoauth/IDPOAuth.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/idpoauth/IDPOAuth.kt @@ -213,10 +213,9 @@ internal class OAuthImpl( } override fun authorizeStartCompletable(data: AuthorizeStartRequest): CompletableFuture> = - coroutineScope - .async { - authorizeStart(data) - }.asCompletableFuture() + coroutineScope.async { + authorizeStart(data) + }.asCompletableFuture() override suspend fun authorize(data: AuthorizeRequest): StytchResult = withContext(Dispatchers.IO) { @@ -236,8 +235,7 @@ internal class OAuthImpl( } override fun authorizeCompletable(data: AuthorizeRequest): CompletableFuture> = - coroutineScope - .async { - authorize(data) - }.asCompletableFuture() + coroutineScope.async { + authorize(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/impersonation/Impersonation.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/impersonation/Impersonation.kt index 2b26b137..31bbcde6 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/impersonation/Impersonation.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/impersonation/Impersonation.kt @@ -82,8 +82,7 @@ internal class ImpersonationImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinks/MagicLinks.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinks/MagicLinks.kt index 103a6a3c..42252c39 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinks/MagicLinks.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinks/MagicLinks.kt @@ -129,8 +129,7 @@ internal class MagicLinksImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksdiscovery/MagicLinksDiscovery.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksdiscovery/MagicLinksDiscovery.kt index 58b55eda..98a65eb2 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksdiscovery/MagicLinksDiscovery.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksdiscovery/MagicLinksDiscovery.kt @@ -67,8 +67,7 @@ internal class DiscoveryImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemail/MagicLinksEmail.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemail/MagicLinksEmail.kt index fe9bd68c..8b86b01c 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemail/MagicLinksEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemail/MagicLinksEmail.kt @@ -137,10 +137,9 @@ internal class EmailImpl( } override fun loginOrSignupCompletable(data: LoginOrSignupRequest): CompletableFuture> = - coroutineScope - .async { - loginOrSignup(data) - }.asCompletableFuture() + coroutineScope.async { + loginOrSignup(data) + }.asCompletableFuture() override suspend fun invite( data: InviteRequest, @@ -170,8 +169,7 @@ internal class EmailImpl( data: InviteRequest, methodOptions: InviteRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - invite(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + invite(data, methodOptions) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemaildiscovery/MagicLinksEmailDiscovery.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemaildiscovery/MagicLinksEmailDiscovery.kt index 91a7351d..318226ab 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemaildiscovery/MagicLinksEmailDiscovery.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemaildiscovery/MagicLinksEmailDiscovery.kt @@ -64,8 +64,7 @@ internal class DiscoveryImpl( } override fun sendCompletable(data: SendRequest): CompletableFuture> = - coroutineScope - .async { - send(data) - }.asCompletableFuture() + coroutineScope.async { + send(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/oauth/OAuth.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/oauth/OAuth.kt index 94a31615..beccc3f4 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/oauth/OAuth.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/oauth/OAuth.kt @@ -148,8 +148,7 @@ internal class OAuthImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/oauthdiscovery/OAuthDiscovery.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/oauthdiscovery/OAuthDiscovery.kt index 6cda22a6..6beaf325 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/oauthdiscovery/OAuthDiscovery.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/oauthdiscovery/OAuthDiscovery.kt @@ -67,8 +67,7 @@ internal class DiscoveryImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizations/Organizations.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizations/Organizations.kt index 3fa7856c..183edaea 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizations/Organizations.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizations/Organizations.kt @@ -317,10 +317,9 @@ internal class OrganizationsImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope - .async { - create(data) - }.asCompletableFuture() + coroutineScope.async { + create(data) + }.asCompletableFuture() override suspend fun get(data: GetRequest): StytchResult = withContext(Dispatchers.IO) { @@ -343,10 +342,9 @@ internal class OrganizationsImpl( } override fun getCompletable(data: GetRequest): CompletableFuture> = - coroutineScope - .async { - get(data) - }.asCompletableFuture() + coroutineScope.async { + get(data) + }.asCompletableFuture() override suspend fun update( data: UpdateRequest, @@ -376,10 +374,9 @@ internal class OrganizationsImpl( data: UpdateRequest, methodOptions: UpdateRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - update(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + update(data, methodOptions) + }.asCompletableFuture() override suspend fun delete( data: DeleteRequest, @@ -408,10 +405,9 @@ internal class OrganizationsImpl( data: DeleteRequest, methodOptions: DeleteRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - delete(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + delete(data, methodOptions) + }.asCompletableFuture() override suspend fun search(data: SearchRequest): StytchResult = withContext(Dispatchers.IO) { @@ -431,10 +427,9 @@ internal class OrganizationsImpl( } override fun searchCompletable(data: SearchRequest): CompletableFuture> = - coroutineScope - .async { - search(data) - }.asCompletableFuture() + coroutineScope.async { + search(data) + }.asCompletableFuture() override suspend fun metrics(data: MetricsRequest): StytchResult = withContext(Dispatchers.IO) { @@ -457,10 +452,9 @@ internal class OrganizationsImpl( } override fun metricsCompletable(data: MetricsRequest): CompletableFuture> = - coroutineScope - .async { - metrics(data) - }.asCompletableFuture() + coroutineScope.async { + metrics(data) + }.asCompletableFuture() override suspend fun connectedApps( data: ConnectedAppsRequest, @@ -493,10 +487,9 @@ internal class OrganizationsImpl( data: ConnectedAppsRequest, methodOptions: ConnectedAppsRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - connectedApps(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + connectedApps(data, methodOptions) + }.asCompletableFuture() override suspend fun getConnectedApp( data: GetConnectedAppRequest, @@ -529,10 +522,9 @@ internal class OrganizationsImpl( data: GetConnectedAppRequest, methodOptions: GetConnectedAppRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - getConnectedApp(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + getConnectedApp(data, methodOptions) + }.asCompletableFuture() override suspend fun deleteExternalId( data: DeleteExternalIdRequest, @@ -561,8 +553,7 @@ internal class OrganizationsImpl( data: DeleteExternalIdRequest, methodOptions: DeleteExternalIdRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - deleteExternalId(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + deleteExternalId(data, methodOptions) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembers/OrganizationsMembers.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembers/OrganizationsMembers.kt index b6c2f57c..738363c6 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembers/OrganizationsMembers.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembers/OrganizationsMembers.kt @@ -666,10 +666,9 @@ internal class MembersImpl( data: UpdateRequest, methodOptions: UpdateRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - update(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + update(data, methodOptions) + }.asCompletableFuture() override suspend fun delete( data: DeleteRequest, @@ -698,10 +697,9 @@ internal class MembersImpl( data: DeleteRequest, methodOptions: DeleteRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - delete(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + delete(data, methodOptions) + }.asCompletableFuture() override suspend fun reactivate( data: ReactivateRequest, @@ -731,10 +729,9 @@ internal class MembersImpl( data: ReactivateRequest, methodOptions: ReactivateRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - reactivate(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + reactivate(data, methodOptions) + }.asCompletableFuture() override suspend fun deleteMFAPhoneNumber( data: DeleteMFAPhoneNumberRequest, @@ -763,10 +760,9 @@ internal class MembersImpl( data: DeleteMFAPhoneNumberRequest, methodOptions: DeleteMFAPhoneNumberRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - deleteMFAPhoneNumber(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + deleteMFAPhoneNumber(data, methodOptions) + }.asCompletableFuture() override suspend fun deleteTOTP( data: DeleteTOTPRequest, @@ -795,10 +791,9 @@ internal class MembersImpl( data: DeleteTOTPRequest, methodOptions: DeleteTOTPRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - deleteTOTP(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + deleteTOTP(data, methodOptions) + }.asCompletableFuture() override suspend fun search( data: SearchRequest, @@ -828,10 +823,9 @@ internal class MembersImpl( data: SearchRequest, methodOptions: SearchRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - search(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + search(data, methodOptions) + }.asCompletableFuture() override suspend fun deletePassword( data: DeletePasswordRequest, @@ -860,10 +854,9 @@ internal class MembersImpl( data: DeletePasswordRequest, methodOptions: DeletePasswordRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - deletePassword(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + deletePassword(data, methodOptions) + }.asCompletableFuture() override suspend fun dangerouslyGet(data: DangerouslyGetRequest): StytchResult = withContext(Dispatchers.IO) { @@ -886,10 +879,9 @@ internal class MembersImpl( } override fun dangerouslyGetCompletable(data: DangerouslyGetRequest): CompletableFuture> = - coroutineScope - .async { - dangerouslyGet(data) - }.asCompletableFuture() + coroutineScope.async { + dangerouslyGet(data) + }.asCompletableFuture() override suspend fun oidcProviders(data: OIDCProviderInformationRequest): StytchResult = withContext(Dispatchers.IO) { @@ -912,10 +904,9 @@ internal class MembersImpl( } override fun oidcProvidersCompletable(data: OIDCProviderInformationRequest): CompletableFuture> = - coroutineScope - .async { - oidcProviders(data) - }.asCompletableFuture() + coroutineScope.async { + oidcProviders(data) + }.asCompletableFuture() override suspend fun unlinkRetiredEmail( data: UnlinkRetiredEmailRequest, @@ -945,10 +936,9 @@ internal class MembersImpl( data: UnlinkRetiredEmailRequest, methodOptions: UnlinkRetiredEmailRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - unlinkRetiredEmail(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + unlinkRetiredEmail(data, methodOptions) + }.asCompletableFuture() override suspend fun startEmailUpdate( data: StartEmailUpdateRequest, @@ -978,10 +968,9 @@ internal class MembersImpl( data: StartEmailUpdateRequest, methodOptions: StartEmailUpdateRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - startEmailUpdate(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + startEmailUpdate(data, methodOptions) + }.asCompletableFuture() override suspend fun getConnectedApps( data: GetConnectedAppsRequest, @@ -1014,10 +1003,9 @@ internal class MembersImpl( data: GetConnectedAppsRequest, methodOptions: GetConnectedAppsRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - getConnectedApps(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + getConnectedApps(data, methodOptions) + }.asCompletableFuture() override suspend fun deleteExternalId( data: DeleteExternalIdRequest, @@ -1046,10 +1034,9 @@ internal class MembersImpl( data: DeleteExternalIdRequest, methodOptions: DeleteExternalIdRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - deleteExternalId(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + deleteExternalId(data, methodOptions) + }.asCompletableFuture() override suspend fun create( data: CreateRequest, @@ -1079,10 +1066,9 @@ internal class MembersImpl( data: CreateRequest, methodOptions: CreateRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - create(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + create(data, methodOptions) + }.asCompletableFuture() override suspend fun get(data: GetRequest): StytchResult = withContext(Dispatchers.IO) { @@ -1105,8 +1091,7 @@ internal class MembersImpl( } override fun getCompletable(data: GetRequest): CompletableFuture> = - coroutineScope - .async { - get(data) - }.asCompletableFuture() + coroutineScope.async { + get(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembersconnectedapps/OrganizationsMembersConnectedApps.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembersconnectedapps/OrganizationsMembersConnectedApps.kt index c3916a9c..01a742e3 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembersconnectedapps/OrganizationsMembersConnectedApps.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembersconnectedapps/OrganizationsMembersConnectedApps.kt @@ -92,8 +92,7 @@ internal class ConnectedAppsImpl( data: RevokeRequest, methodOptions: RevokeRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - revoke(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + revoke(data, methodOptions) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembersoauthproviders/OrganizationsMembersOAuthProviders.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembersoauthproviders/OrganizationsMembersOAuthProviders.kt index 32dca88c..b51a4137 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembersoauthproviders/OrganizationsMembersOAuthProviders.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembersoauthproviders/OrganizationsMembersOAuthProviders.kt @@ -203,10 +203,9 @@ internal class OAuthProvidersImpl( } override fun googleCompletable(data: ProviderInformationRequest): CompletableFuture> = - coroutineScope - .async { - google(data) - }.asCompletableFuture() + coroutineScope.async { + google(data) + }.asCompletableFuture() override suspend fun microsoft(data: ProviderInformationRequest): StytchResult = withContext(Dispatchers.IO) { @@ -233,10 +232,9 @@ internal class OAuthProvidersImpl( } override fun microsoftCompletable(data: ProviderInformationRequest): CompletableFuture> = - coroutineScope - .async { - microsoft(data) - }.asCompletableFuture() + coroutineScope.async { + microsoft(data) + }.asCompletableFuture() override suspend fun slack(data: SlackRequest): StytchResult = withContext(Dispatchers.IO) { @@ -259,10 +257,9 @@ internal class OAuthProvidersImpl( } override fun slackCompletable(data: SlackRequest): CompletableFuture> = - coroutineScope - .async { - slack(data) - }.asCompletableFuture() + coroutineScope.async { + slack(data) + }.asCompletableFuture() override suspend fun hubspot(data: ProviderInformationRequest): StytchResult = withContext(Dispatchers.IO) { @@ -285,10 +282,9 @@ internal class OAuthProvidersImpl( } override fun hubspotCompletable(data: ProviderInformationRequest): CompletableFuture> = - coroutineScope - .async { - hubspot(data) - }.asCompletableFuture() + coroutineScope.async { + hubspot(data) + }.asCompletableFuture() override suspend fun github(data: ProviderInformationRequest): StytchResult = withContext(Dispatchers.IO) { @@ -311,8 +307,7 @@ internal class OAuthProvidersImpl( } override fun githubCompletable(data: ProviderInformationRequest): CompletableFuture> = - coroutineScope - .async { - github(data) - }.asCompletableFuture() + coroutineScope.async { + github(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpemail/OTPEmail.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpemail/OTPEmail.kt index c0303a06..d348f30c 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpemail/OTPEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpemail/OTPEmail.kt @@ -165,10 +165,9 @@ internal class EmailImpl( } override fun loginOrSignupCompletable(data: LoginOrSignupRequest): CompletableFuture> = - coroutineScope - .async { - loginOrSignup(data) - }.asCompletableFuture() + coroutineScope.async { + loginOrSignup(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -188,8 +187,7 @@ internal class EmailImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpemaildiscovery/OTPEmailDiscovery.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpemaildiscovery/OTPEmailDiscovery.kt index 31a4deea..f6ce2d8c 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpemaildiscovery/OTPEmailDiscovery.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpemaildiscovery/OTPEmailDiscovery.kt @@ -90,10 +90,9 @@ internal class DiscoveryImpl( } override fun sendCompletable(data: SendRequest): CompletableFuture> = - coroutineScope - .async { - send(data) - }.asCompletableFuture() + coroutineScope.async { + send(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -113,8 +112,7 @@ internal class DiscoveryImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpsms/OTPSms.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpsms/OTPSms.kt index 3a24ad1e..4c0184b0 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpsms/OTPSms.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpsms/OTPSms.kt @@ -273,10 +273,9 @@ internal class SmsImpl( } override fun sendCompletable(data: SendRequest): CompletableFuture> = - coroutineScope - .async { - send(data) - }.asCompletableFuture() + coroutineScope.async { + send(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -296,8 +295,7 @@ internal class SmsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwords/Passwords.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwords/Passwords.kt index 5a136c1a..ad20792d 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwords/Passwords.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwords/Passwords.kt @@ -278,10 +278,9 @@ internal class PasswordsImpl( } override fun strengthCheckCompletable(data: StrengthCheckRequest): CompletableFuture> = - coroutineScope - .async { - strengthCheck(data) - }.asCompletableFuture() + coroutineScope.async { + strengthCheck(data) + }.asCompletableFuture() override suspend fun migrate(data: MigrateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -301,10 +300,9 @@ internal class PasswordsImpl( } override fun migrateCompletable(data: MigrateRequest): CompletableFuture> = - coroutineScope - .async { - migrate(data) - }.asCompletableFuture() + coroutineScope.async { + migrate(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -324,8 +322,7 @@ internal class PasswordsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsdiscovery/PasswordsDiscovery.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsdiscovery/PasswordsDiscovery.kt index e0bdc0f5..84efbfa0 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsdiscovery/PasswordsDiscovery.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsdiscovery/PasswordsDiscovery.kt @@ -100,8 +100,7 @@ internal class DiscoveryImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsdiscoveryemail/PasswordsDiscoveryEmail.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsdiscoveryemail/PasswordsDiscoveryEmail.kt index a05757cf..8f9ad3b4 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsdiscoveryemail/PasswordsDiscoveryEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsdiscoveryemail/PasswordsDiscoveryEmail.kt @@ -138,10 +138,9 @@ internal class EmailImpl( } override fun resetStartCompletable(data: ResetStartRequest): CompletableFuture> = - coroutineScope - .async { - resetStart(data) - }.asCompletableFuture() + coroutineScope.async { + resetStart(data) + }.asCompletableFuture() override suspend fun reset(data: ResetRequest): StytchResult = withContext(Dispatchers.IO) { @@ -161,8 +160,7 @@ internal class EmailImpl( } override fun resetCompletable(data: ResetRequest): CompletableFuture> = - coroutineScope - .async { - reset(data) - }.asCompletableFuture() + coroutineScope.async { + reset(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsemail/PasswordsEmail.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsemail/PasswordsEmail.kt index 43e38500..e9544780 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsemail/PasswordsEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsemail/PasswordsEmail.kt @@ -199,10 +199,9 @@ internal class EmailImpl( } override fun resetStartCompletable(data: ResetStartRequest): CompletableFuture> = - coroutineScope - .async { - resetStart(data) - }.asCompletableFuture() + coroutineScope.async { + resetStart(data) + }.asCompletableFuture() override suspend fun reset(data: ResetRequest): StytchResult = withContext(Dispatchers.IO) { @@ -222,10 +221,9 @@ internal class EmailImpl( } override fun resetCompletable(data: ResetRequest): CompletableFuture> = - coroutineScope - .async { - reset(data) - }.asCompletableFuture() + coroutineScope.async { + reset(data) + }.asCompletableFuture() override suspend fun requireReset( data: RequireResetRequest, @@ -255,8 +253,7 @@ internal class EmailImpl( data: RequireResetRequest, methodOptions: RequireResetRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - requireReset(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + requireReset(data, methodOptions) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsexistingpassword/PasswordsExistingPassword.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsexistingpassword/PasswordsExistingPassword.kt index bcc816b2..aa40e404 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsexistingpassword/PasswordsExistingPassword.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsexistingpassword/PasswordsExistingPassword.kt @@ -124,8 +124,7 @@ internal class ExistingPasswordImpl( } override fun resetCompletable(data: ResetRequest): CompletableFuture> = - coroutineScope - .async { - reset(data) - }.asCompletableFuture() + coroutineScope.async { + reset(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordssession/PasswordsSession.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordssession/PasswordsSession.kt index 57c98bf9..2e4f7933 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordssession/PasswordsSession.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordssession/PasswordsSession.kt @@ -79,8 +79,7 @@ internal class SessionsImpl( } override fun resetCompletable(data: ResetRequest): CompletableFuture> = - coroutineScope - .async { - reset(data) - }.asCompletableFuture() + coroutineScope.async { + reset(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/rbac/RBAC.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/rbac/RBAC.kt index 53dd7bdb..562a7faa 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/rbac/RBAC.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/rbac/RBAC.kt @@ -114,8 +114,7 @@ internal class RBACImpl( } override fun policyCompletable(data: PolicyRequest): CompletableFuture> = - coroutineScope - .async { - policy(data) - }.asCompletableFuture() + coroutineScope.async { + policy(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/rbacorganizations/RBACOrganizations.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/rbacorganizations/RBACOrganizations.kt index d8cb5e7b..ade66031 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/rbacorganizations/RBACOrganizations.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/rbacorganizations/RBACOrganizations.kt @@ -203,10 +203,9 @@ internal class OrganizationsImpl( } override fun getOrgPolicyCompletable(data: GetOrgPolicyRequest): CompletableFuture> = - coroutineScope - .async { - getOrgPolicy(data) - }.asCompletableFuture() + coroutineScope.async { + getOrgPolicy(data) + }.asCompletableFuture() override suspend fun setOrgPolicy(data: SetOrgPolicyRequest): StytchResult = withContext(Dispatchers.IO) { @@ -226,8 +225,7 @@ internal class OrganizationsImpl( } override fun setOrgPolicyCompletable(data: SetOrgPolicyRequest): CompletableFuture> = - coroutineScope - .async { - setOrgPolicy(data) - }.asCompletableFuture() + coroutineScope.async { + setOrgPolicy(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/recoverycodes/RecoveryCodes.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/recoverycodes/RecoveryCodes.kt index 56e78f71..6c43f749 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/recoverycodes/RecoveryCodes.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/recoverycodes/RecoveryCodes.kt @@ -112,10 +112,9 @@ internal class RecoveryCodesImpl( } override fun recoverCompletable(data: RecoverRequest): CompletableFuture> = - coroutineScope - .async { - recover(data) - }.asCompletableFuture() + coroutineScope.async { + recover(data) + }.asCompletableFuture() override suspend fun get(data: GetRequest): StytchResult = withContext(Dispatchers.IO) { @@ -138,10 +137,9 @@ internal class RecoveryCodesImpl( } override fun getCompletable(data: GetRequest): CompletableFuture> = - coroutineScope - .async { - get(data) - }.asCompletableFuture() + coroutineScope.async { + get(data) + }.asCompletableFuture() override suspend fun rotate(data: RotateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -161,8 +159,7 @@ internal class RecoveryCodesImpl( } override fun rotateCompletable(data: RotateRequest): CompletableFuture> = - coroutineScope - .async { - rotate(data) - }.asCompletableFuture() + coroutineScope.async { + rotate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/scimconnection/SCIMConnection.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/scimconnection/SCIMConnection.kt index c5435d86..3497320b 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/scimconnection/SCIMConnection.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/scimconnection/SCIMConnection.kt @@ -286,10 +286,9 @@ internal class ConnectionImpl( data: UpdateRequest, methodOptions: UpdateRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - update(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + update(data, methodOptions) + }.asCompletableFuture() override suspend fun delete( data: DeleteRequest, @@ -318,10 +317,9 @@ internal class ConnectionImpl( data: DeleteRequest, methodOptions: DeleteRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - delete(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + delete(data, methodOptions) + }.asCompletableFuture() override suspend fun rotateStart( data: RotateStartRequest, @@ -351,10 +349,9 @@ internal class ConnectionImpl( data: RotateStartRequest, methodOptions: RotateStartRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - rotateStart(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + rotateStart(data, methodOptions) + }.asCompletableFuture() override suspend fun rotateComplete( data: RotateCompleteRequest, @@ -384,10 +381,9 @@ internal class ConnectionImpl( data: RotateCompleteRequest, methodOptions: RotateCompleteRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - rotateComplete(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + rotateComplete(data, methodOptions) + }.asCompletableFuture() override suspend fun rotateCancel( data: RotateCancelRequest, @@ -417,10 +413,9 @@ internal class ConnectionImpl( data: RotateCancelRequest, methodOptions: RotateCancelRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - rotateCancel(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + rotateCancel(data, methodOptions) + }.asCompletableFuture() override suspend fun getGroups( data: GetGroupsRequest, @@ -453,10 +448,9 @@ internal class ConnectionImpl( data: GetGroupsRequest, methodOptions: GetGroupsRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - getGroups(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + getGroups(data, methodOptions) + }.asCompletableFuture() override suspend fun create( data: CreateRequest, @@ -486,10 +480,9 @@ internal class ConnectionImpl( data: CreateRequest, methodOptions: CreateRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - create(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + create(data, methodOptions) + }.asCompletableFuture() override suspend fun get( data: GetRequest, @@ -522,8 +515,7 @@ internal class ConnectionImpl( data: GetRequest, methodOptions: GetRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - get(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + get(data, methodOptions) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/sessions/Sessions.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/sessions/Sessions.kt index 358d5bac..db30a23f 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/sessions/Sessions.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/sessions/Sessions.kt @@ -580,10 +580,9 @@ internal class SessionsImpl( } override fun getCompletable(data: GetRequest): CompletableFuture> = - coroutineScope - .async { - get(data) - }.asCompletableFuture() + coroutineScope.async { + get(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -603,10 +602,9 @@ internal class SessionsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() override suspend fun revoke( data: RevokeRequest, @@ -636,10 +634,9 @@ internal class SessionsImpl( data: RevokeRequest, methodOptions: RevokeRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - revoke(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + revoke(data, methodOptions) + }.asCompletableFuture() override suspend fun exchange(data: ExchangeRequest): StytchResult = withContext(Dispatchers.IO) { @@ -659,10 +656,9 @@ internal class SessionsImpl( } override fun exchangeCompletable(data: ExchangeRequest): CompletableFuture> = - coroutineScope - .async { - exchange(data) - }.asCompletableFuture() + coroutineScope.async { + exchange(data) + }.asCompletableFuture() override suspend fun exchangeAccessToken(data: ExchangeAccessTokenRequest): StytchResult = withContext(Dispatchers.IO) { @@ -684,10 +680,9 @@ internal class SessionsImpl( override fun exchangeAccessTokenCompletable( data: ExchangeAccessTokenRequest, ): CompletableFuture> = - coroutineScope - .async { - exchangeAccessToken(data) - }.asCompletableFuture() + coroutineScope.async { + exchangeAccessToken(data) + }.asCompletableFuture() override suspend fun attest(data: AttestRequest): StytchResult = withContext(Dispatchers.IO) { @@ -707,10 +702,9 @@ internal class SessionsImpl( } override fun attestCompletable(data: AttestRequest): CompletableFuture> = - coroutineScope - .async { - attest(data) - }.asCompletableFuture() + coroutineScope.async { + attest(data) + }.asCompletableFuture() override suspend fun migrate(data: MigrateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -730,10 +724,9 @@ internal class SessionsImpl( } override fun migrateCompletable(data: MigrateRequest): CompletableFuture> = - coroutineScope - .async { - migrate(data) - }.asCompletableFuture() + coroutineScope.async { + migrate(data) + }.asCompletableFuture() override suspend fun getJWKS(data: GetJWKSRequest): StytchResult = withContext(Dispatchers.IO) { @@ -756,10 +749,9 @@ internal class SessionsImpl( } override fun getJWKSCompletable(data: GetJWKSRequest): CompletableFuture> = - coroutineScope - .async { - getJWKS(data) - }.asCompletableFuture() + coroutineScope.async { + getJWKS(data) + }.asCompletableFuture() // MANUAL(authenticateJWT_impl)(SERVICE_METHOD) override suspend fun authenticateJwt( diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/sso/SSO.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/sso/SSO.kt index 95931576..4d1905d7 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/sso/SSO.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/sso/SSO.kt @@ -205,10 +205,9 @@ internal class SSOImpl( data: GetConnectionsRequest, methodOptions: GetConnectionsRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - getConnections(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + getConnections(data, methodOptions) + }.asCompletableFuture() override suspend fun deleteConnection( data: DeleteConnectionRequest, @@ -237,10 +236,9 @@ internal class SSOImpl( data: DeleteConnectionRequest, methodOptions: DeleteConnectionRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - deleteConnection(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + deleteConnection(data, methodOptions) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -260,8 +258,7 @@ internal class SSOImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssoexternal/SSOExternal.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssoexternal/SSOExternal.kt index 28e59a75..c2fa1cd0 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssoexternal/SSOExternal.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssoexternal/SSOExternal.kt @@ -110,10 +110,9 @@ internal class ExternalImpl( data: CreateConnectionRequest, methodOptions: CreateConnectionRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - createConnection(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + createConnection(data, methodOptions) + }.asCompletableFuture() override suspend fun updateConnection( data: UpdateConnectionRequest, @@ -143,8 +142,7 @@ internal class ExternalImpl( data: UpdateConnectionRequest, methodOptions: UpdateConnectionRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - updateConnection(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + updateConnection(data, methodOptions) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssooidc/SSOOIDC.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssooidc/SSOOIDC.kt index 06c146cb..f415ed74 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssooidc/SSOOIDC.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssooidc/SSOOIDC.kt @@ -179,10 +179,9 @@ internal class OIDCImpl( data: CreateConnectionRequest, methodOptions: CreateConnectionRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - createConnection(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + createConnection(data, methodOptions) + }.asCompletableFuture() override suspend fun updateConnection( data: UpdateConnectionRequest, @@ -212,8 +211,7 @@ internal class OIDCImpl( data: UpdateConnectionRequest, methodOptions: UpdateConnectionRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - updateConnection(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + updateConnection(data, methodOptions) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssosaml/SSOSAML.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssosaml/SSOSAML.kt index c035217f..d43d91a0 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssosaml/SSOSAML.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssosaml/SSOSAML.kt @@ -239,10 +239,9 @@ internal class SAMLImpl( data: CreateConnectionRequest, methodOptions: CreateConnectionRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - createConnection(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + createConnection(data, methodOptions) + }.asCompletableFuture() override suspend fun updateConnection( data: UpdateConnectionRequest, @@ -272,10 +271,9 @@ internal class SAMLImpl( data: UpdateConnectionRequest, methodOptions: UpdateConnectionRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - updateConnection(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + updateConnection(data, methodOptions) + }.asCompletableFuture() override suspend fun updateByURL( data: UpdateByURLRequest, @@ -305,10 +303,9 @@ internal class SAMLImpl( data: UpdateByURLRequest, methodOptions: UpdateByURLRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - updateByURL(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + updateByURL(data, methodOptions) + }.asCompletableFuture() override suspend fun deleteVerificationCertificate( data: DeleteVerificationCertificateRequest, @@ -340,10 +337,9 @@ internal class SAMLImpl( data: DeleteVerificationCertificateRequest, methodOptions: DeleteVerificationCertificateRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - deleteVerificationCertificate(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + deleteVerificationCertificate(data, methodOptions) + }.asCompletableFuture() override suspend fun deleteEncryptionPrivateKey( data: DeleteEncryptionPrivateKeyRequest, @@ -375,8 +371,7 @@ internal class SAMLImpl( data: DeleteEncryptionPrivateKeyRequest, methodOptions: DeleteEncryptionPrivateKeyRequestOptions?, ): CompletableFuture> = - coroutineScope - .async { - deleteEncryptionPrivateKey(data, methodOptions) - }.asCompletableFuture() + coroutineScope.async { + deleteEncryptionPrivateKey(data, methodOptions) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/totps/TOTPs.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/totps/TOTPs.kt index b9b07b76..e0094cf9 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/totps/TOTPs.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/totps/TOTPs.kt @@ -128,10 +128,9 @@ internal class TOTPsImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope - .async { - create(data) - }.asCompletableFuture() + coroutineScope.async { + create(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -151,10 +150,9 @@ internal class TOTPsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() override suspend fun migrate(data: MigrateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -174,8 +172,7 @@ internal class TOTPsImpl( } override fun migrateCompletable(data: MigrateRequest): CompletableFuture> = - coroutineScope - .async { - migrate(data) - }.asCompletableFuture() + coroutineScope.async { + migrate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/common/Version.kt b/stytch/src/main/kotlin/com/stytch/java/common/Version.kt index 228bef9b..d3e96dea 100644 --- a/stytch/src/main/kotlin/com/stytch/java/common/Version.kt +++ b/stytch/src/main/kotlin/com/stytch/java/common/Version.kt @@ -1,3 +1,3 @@ package com.stytch.java.common -internal const val VERSION = "9.1.0" +internal const val VERSION = "9.2.0" diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/StytchClient.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/StytchClient.kt index e7d9a048..2875a223 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/StytchClient.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/StytchClient.kt @@ -50,11 +50,7 @@ import kotlinx.coroutines.SupervisorJob public class StytchClient @JvmOverloads - constructor( - projectId: String, - secret: String, - clientConfig: OptionalClientConfig = OptionalClientConfig(), - ) { + constructor(projectId: String, secret: String, clientConfig: OptionalClientConfig = OptionalClientConfig()) { private val coroutineScope = CoroutineScope(SupervisorJob()) private val baseUrl = getBaseUrl(projectId, clientConfig) private val httpClient: HttpClient = diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/connectedappsclients/ConnectedAppsClients.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/connectedappsclients/ConnectedAppsClients.kt index 05e20ba3..76e4d957 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/connectedappsclients/ConnectedAppsClients.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/connectedappsclients/ConnectedAppsClients.kt @@ -170,10 +170,9 @@ internal class ClientsImpl( } override fun getCompletable(data: GetRequest): CompletableFuture> = - coroutineScope - .async { - get(data) - }.asCompletableFuture() + coroutineScope.async { + get(data) + }.asCompletableFuture() override suspend fun update(data: UpdateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -193,10 +192,9 @@ internal class ClientsImpl( } override fun updateCompletable(data: UpdateRequest): CompletableFuture> = - coroutineScope - .async { - update(data) - }.asCompletableFuture() + coroutineScope.async { + update(data) + }.asCompletableFuture() override suspend fun delete(data: DeleteRequest): StytchResult = withContext(Dispatchers.IO) { @@ -215,10 +213,9 @@ internal class ClientsImpl( } override fun deleteCompletable(data: DeleteRequest): CompletableFuture> = - coroutineScope - .async { - delete(data) - }.asCompletableFuture() + coroutineScope.async { + delete(data) + }.asCompletableFuture() override suspend fun search(data: SearchRequest): StytchResult = withContext(Dispatchers.IO) { @@ -238,10 +235,9 @@ internal class ClientsImpl( } override fun searchCompletable(data: SearchRequest): CompletableFuture> = - coroutineScope - .async { - search(data) - }.asCompletableFuture() + coroutineScope.async { + search(data) + }.asCompletableFuture() override suspend fun create(data: CreateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -261,8 +257,7 @@ internal class ClientsImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope - .async { - create(data) - }.asCompletableFuture() + coroutineScope.async { + create(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/connectedappsclientssecrets/ConnectedAppsClientsSecrets.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/connectedappsclientssecrets/ConnectedAppsClientsSecrets.kt index a8f4e3aa..a40400b1 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/connectedappsclientssecrets/ConnectedAppsClientsSecrets.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/connectedappsclientssecrets/ConnectedAppsClientsSecrets.kt @@ -137,10 +137,9 @@ internal class SecretsImpl( } override fun rotateStartCompletable(data: RotateStartRequest): CompletableFuture> = - coroutineScope - .async { - rotateStart(data) - }.asCompletableFuture() + coroutineScope.async { + rotateStart(data) + }.asCompletableFuture() override suspend fun rotateCancel(data: RotateCancelRequest): StytchResult = withContext(Dispatchers.IO) { @@ -160,10 +159,9 @@ internal class SecretsImpl( } override fun rotateCancelCompletable(data: RotateCancelRequest): CompletableFuture> = - coroutineScope - .async { - rotateCancel(data) - }.asCompletableFuture() + coroutineScope.async { + rotateCancel(data) + }.asCompletableFuture() override suspend fun rotate(data: RotateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -183,8 +181,7 @@ internal class SecretsImpl( } override fun rotateCompletable(data: RotateRequest): CompletableFuture> = - coroutineScope - .async { - rotate(data) - }.asCompletableFuture() + coroutineScope.async { + rotate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/cryptowallets/CryptoWallets.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/cryptowallets/CryptoWallets.kt index 640043dc..cbe81ebf 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/cryptowallets/CryptoWallets.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/cryptowallets/CryptoWallets.kt @@ -108,10 +108,9 @@ internal class CryptoWalletsImpl( } override fun authenticateStartCompletable(data: AuthenticateStartRequest): CompletableFuture> = - coroutineScope - .async { - authenticateStart(data) - }.asCompletableFuture() + coroutineScope.async { + authenticateStart(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -131,8 +130,7 @@ internal class CryptoWalletsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/debug/Debug.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/debug/Debug.kt index 64db01b8..2a32ce55 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/debug/Debug.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/debug/Debug.kt @@ -60,8 +60,7 @@ internal class DebugImpl( } override fun whoamiCompletable(data: WhoamiRequest): CompletableFuture> = - coroutineScope - .async { - whoami(data) - }.asCompletableFuture() + coroutineScope.async { + whoami(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraud/Fraud.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraud/Fraud.kt index 5a27cafa..0f2aaa39 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraud/Fraud.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraud/Fraud.kt @@ -8,6 +8,8 @@ package com.stytch.java.consumer.api.fraud import com.squareup.moshi.Moshi import com.stytch.java.common.InstantAdapter +import com.stytch.java.consumer.api.fraudemail.Email +import com.stytch.java.consumer.api.fraudemail.EmailImpl import com.stytch.java.consumer.api.fraudfingerprint.Fingerprint import com.stytch.java.consumer.api.fraudfingerprint.FingerprintImpl import com.stytch.java.consumer.api.fraudrules.Rules @@ -23,6 +25,8 @@ public interface Fraud { public val rules: Rules public val verdictReasons: VerdictReasons + + public val email: Email } internal class FraudImpl( @@ -34,4 +38,5 @@ internal class FraudImpl( override val fingerprint: Fingerprint = FingerprintImpl(httpClient, coroutineScope) override val rules: Rules = RulesImpl(httpClient, coroutineScope) override val verdictReasons: VerdictReasons = VerdictReasonsImpl(httpClient, coroutineScope) + override val email: Email = EmailImpl(httpClient, coroutineScope) } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudemail/FraudEmail.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudemail/FraudEmail.kt new file mode 100644 index 00000000..c3f03415 --- /dev/null +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudemail/FraudEmail.kt @@ -0,0 +1,88 @@ +package com.stytch.java.consumer.api.fraudemail + +// !!! +// WARNING: This file is autogenerated +// Only modify code within MANUAL() sections +// or your changes may be overwritten later! +// !!! + +import com.squareup.moshi.Moshi +import com.stytch.java.common.InstantAdapter +import com.stytch.java.common.StytchResult +import com.stytch.java.consumer.models.fraudemail.RiskRequest +import com.stytch.java.consumer.models.fraudemail.RiskResponse +import com.stytch.java.http.HttpClient +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.async +import kotlinx.coroutines.future.asCompletableFuture +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext +import java.util.concurrent.CompletableFuture + +public interface Email { + /** + * Get risk information for a specific email address. + * The response will contain a recommended action (`ALLOW`, `BLOCK`, or `CHALLENGE`) and a more granular `risk_score`. + * You can also check the `address_information` and `domain_information` fields for more information about the email + * address and email domain. + * + * This feature is in beta. Reach out to us [here](mailto:fraud-team@stytch.com?subject=Email_Intelligence_Early_Access) + * if you'd like to request early access. + */ + public suspend fun risk(data: RiskRequest): StytchResult + + /** + * Get risk information for a specific email address. + * The response will contain a recommended action (`ALLOW`, `BLOCK`, or `CHALLENGE`) and a more granular `risk_score`. + * You can also check the `address_information` and `domain_information` fields for more information about the email + * address and email domain. + * + * This feature is in beta. Reach out to us [here](mailto:fraud-team@stytch.com?subject=Email_Intelligence_Early_Access) + * if you'd like to request early access. + */ + public fun risk( + data: RiskRequest, + callback: (StytchResult) -> Unit, + ) + + /** + * Get risk information for a specific email address. + * The response will contain a recommended action (`ALLOW`, `BLOCK`, or `CHALLENGE`) and a more granular `risk_score`. + * You can also check the `address_information` and `domain_information` fields for more information about the email + * address and email domain. + * + * This feature is in beta. Reach out to us [here](mailto:fraud-team@stytch.com?subject=Email_Intelligence_Early_Access) + * if you'd like to request early access. + */ + public fun riskCompletable(data: RiskRequest): CompletableFuture> +} + +internal class EmailImpl( + private val httpClient: HttpClient, + private val coroutineScope: CoroutineScope, +) : Email { + private val moshi = Moshi.Builder().add(InstantAdapter()).build() + + override suspend fun risk(data: RiskRequest): StytchResult = + withContext(Dispatchers.IO) { + var headers = emptyMap() + + val asJson = moshi.adapter(RiskRequest::class.java).toJson(data) + httpClient.post("/v1/email/risk", asJson, headers) + } + + override fun risk( + data: RiskRequest, + callback: (StytchResult) -> Unit, + ) { + coroutineScope.launch { + callback(risk(data)) + } + } + + override fun riskCompletable(data: RiskRequest): CompletableFuture> = + coroutineScope.async { + risk(data) + }.asCompletableFuture() +} diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudfingerprint/FraudFingerprint.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudfingerprint/FraudFingerprint.kt index 6cb89040..b4b9b024 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudfingerprint/FraudFingerprint.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudfingerprint/FraudFingerprint.kt @@ -115,8 +115,7 @@ internal class FingerprintImpl( } override fun lookupCompletable(data: LookupRequest): CompletableFuture> = - coroutineScope - .async { - lookup(data) - }.asCompletableFuture() + coroutineScope.async { + lookup(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudrules/FraudRules.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudrules/FraudRules.kt index 936aeae9..b5486a3c 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudrules/FraudRules.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudrules/FraudRules.kt @@ -141,10 +141,9 @@ internal class RulesImpl( } override fun setCompletable(data: SetRequest): CompletableFuture> = - coroutineScope - .async { - set(data) - }.asCompletableFuture() + coroutineScope.async { + set(data) + }.asCompletableFuture() override suspend fun list(data: ListRequest): StytchResult = withContext(Dispatchers.IO) { @@ -164,8 +163,7 @@ internal class RulesImpl( } override fun listCompletable(data: ListRequest): CompletableFuture> = - coroutineScope - .async { - list(data) - }.asCompletableFuture() + coroutineScope.async { + list(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudverdictreasons/FraudVerdictReasons.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudverdictreasons/FraudVerdictReasons.kt index e18a3a71..20dc495f 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudverdictreasons/FraudVerdictReasons.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudverdictreasons/FraudVerdictReasons.kt @@ -108,10 +108,9 @@ internal class VerdictReasonsImpl( } override fun overrideCompletable(data: OverrideRequest): CompletableFuture> = - coroutineScope - .async { - override(data) - }.asCompletableFuture() + coroutineScope.async { + override(data) + }.asCompletableFuture() override suspend fun list(data: ListRequest): StytchResult = withContext(Dispatchers.IO) { @@ -131,8 +130,7 @@ internal class VerdictReasonsImpl( } override fun listCompletable(data: ListRequest): CompletableFuture> = - coroutineScope - .async { - list(data) - }.asCompletableFuture() + coroutineScope.async { + list(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/idpoauth/IDPOAuth.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/idpoauth/IDPOAuth.kt index c6aee897..b293ac71 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/idpoauth/IDPOAuth.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/idpoauth/IDPOAuth.kt @@ -213,10 +213,9 @@ internal class OAuthImpl( } override fun authorizeStartCompletable(data: AuthorizeStartRequest): CompletableFuture> = - coroutineScope - .async { - authorizeStart(data) - }.asCompletableFuture() + coroutineScope.async { + authorizeStart(data) + }.asCompletableFuture() override suspend fun authorize(data: AuthorizeRequest): StytchResult = withContext(Dispatchers.IO) { @@ -236,8 +235,7 @@ internal class OAuthImpl( } override fun authorizeCompletable(data: AuthorizeRequest): CompletableFuture> = - coroutineScope - .async { - authorize(data) - }.asCompletableFuture() + coroutineScope.async { + authorize(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/impersonation/Impersonation.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/impersonation/Impersonation.kt index d10e1619..7ea42f58 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/impersonation/Impersonation.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/impersonation/Impersonation.kt @@ -82,8 +82,7 @@ internal class ImpersonationImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/m2mclients/M2MClients.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/m2mclients/M2MClients.kt index 36ee778d..84fbdf5c 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/m2mclients/M2MClients.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/m2mclients/M2MClients.kt @@ -221,10 +221,9 @@ internal class ClientsImpl( } override fun getCompletable(data: GetRequest): CompletableFuture> = - coroutineScope - .async { - get(data) - }.asCompletableFuture() + coroutineScope.async { + get(data) + }.asCompletableFuture() override suspend fun search(data: SearchRequest): StytchResult = withContext(Dispatchers.IO) { @@ -244,10 +243,9 @@ internal class ClientsImpl( } override fun searchCompletable(data: SearchRequest): CompletableFuture> = - coroutineScope - .async { - search(data) - }.asCompletableFuture() + coroutineScope.async { + search(data) + }.asCompletableFuture() override suspend fun update(data: UpdateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -267,10 +265,9 @@ internal class ClientsImpl( } override fun updateCompletable(data: UpdateRequest): CompletableFuture> = - coroutineScope - .async { - update(data) - }.asCompletableFuture() + coroutineScope.async { + update(data) + }.asCompletableFuture() override suspend fun delete(data: DeleteRequest): StytchResult = withContext(Dispatchers.IO) { @@ -289,10 +286,9 @@ internal class ClientsImpl( } override fun deleteCompletable(data: DeleteRequest): CompletableFuture> = - coroutineScope - .async { - delete(data) - }.asCompletableFuture() + coroutineScope.async { + delete(data) + }.asCompletableFuture() override suspend fun create(data: CreateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -312,8 +308,7 @@ internal class ClientsImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope - .async { - create(data) - }.asCompletableFuture() + coroutineScope.async { + create(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/m2mclientssecrets/M2MClientsSecrets.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/m2mclientssecrets/M2MClientsSecrets.kt index 1c866b93..a00de29f 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/m2mclientssecrets/M2MClientsSecrets.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/m2mclientssecrets/M2MClientsSecrets.kt @@ -152,10 +152,9 @@ internal class SecretsImpl( } override fun rotateStartCompletable(data: RotateStartRequest): CompletableFuture> = - coroutineScope - .async { - rotateStart(data) - }.asCompletableFuture() + coroutineScope.async { + rotateStart(data) + }.asCompletableFuture() override suspend fun rotateCancel(data: RotateCancelRequest): StytchResult = withContext(Dispatchers.IO) { @@ -175,10 +174,9 @@ internal class SecretsImpl( } override fun rotateCancelCompletable(data: RotateCancelRequest): CompletableFuture> = - coroutineScope - .async { - rotateCancel(data) - }.asCompletableFuture() + coroutineScope.async { + rotateCancel(data) + }.asCompletableFuture() override suspend fun rotate(data: RotateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -198,8 +196,7 @@ internal class SecretsImpl( } override fun rotateCompletable(data: RotateRequest): CompletableFuture> = - coroutineScope - .async { - rotate(data) - }.asCompletableFuture() + coroutineScope.async { + rotate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/magiclinks/MagicLinks.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/magiclinks/MagicLinks.kt index f4fae76c..bb001d01 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/magiclinks/MagicLinks.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/magiclinks/MagicLinks.kt @@ -120,10 +120,9 @@ internal class MagicLinksImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() override suspend fun create(data: CreateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -143,8 +142,7 @@ internal class MagicLinksImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope - .async { - create(data) - }.asCompletableFuture() + coroutineScope.async { + create(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/magiclinksemail/MagicLinksEmail.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/magiclinksemail/MagicLinksEmail.kt index 851a588d..c72ebefd 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/magiclinksemail/MagicLinksEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/magiclinksemail/MagicLinksEmail.kt @@ -214,10 +214,9 @@ internal class EmailImpl( } override fun sendCompletable(data: SendRequest): CompletableFuture> = - coroutineScope - .async { - send(data) - }.asCompletableFuture() + coroutineScope.async { + send(data) + }.asCompletableFuture() override suspend fun loginOrCreate(data: LoginOrCreateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -237,10 +236,9 @@ internal class EmailImpl( } override fun loginOrCreateCompletable(data: LoginOrCreateRequest): CompletableFuture> = - coroutineScope - .async { - loginOrCreate(data) - }.asCompletableFuture() + coroutineScope.async { + loginOrCreate(data) + }.asCompletableFuture() override suspend fun invite(data: InviteRequest): StytchResult = withContext(Dispatchers.IO) { @@ -260,10 +258,9 @@ internal class EmailImpl( } override fun inviteCompletable(data: InviteRequest): CompletableFuture> = - coroutineScope - .async { - invite(data) - }.asCompletableFuture() + coroutineScope.async { + invite(data) + }.asCompletableFuture() override suspend fun revokeInvite(data: RevokeInviteRequest): StytchResult = withContext(Dispatchers.IO) { @@ -283,8 +280,7 @@ internal class EmailImpl( } override fun revokeInviteCompletable(data: RevokeInviteRequest): CompletableFuture> = - coroutineScope - .async { - revokeInvite(data) - }.asCompletableFuture() + coroutineScope.async { + revokeInvite(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/oauth/OAuth.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/oauth/OAuth.kt index 5a4d0c9e..92bd6ab4 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/oauth/OAuth.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/oauth/OAuth.kt @@ -126,10 +126,9 @@ internal class OAuthImpl( } override fun attachCompletable(data: AttachRequest): CompletableFuture> = - coroutineScope - .async { - attach(data) - }.asCompletableFuture() + coroutineScope.async { + attach(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -149,8 +148,7 @@ internal class OAuthImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/otp/OTP.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/otp/OTP.kt index 5143e70f..e57f564e 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/otp/OTP.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/otp/OTP.kt @@ -89,8 +89,7 @@ internal class OTPsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpemail/OTPEmail.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpemail/OTPEmail.kt index 822fbee0..a334c11c 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpemail/OTPEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpemail/OTPEmail.kt @@ -138,10 +138,9 @@ internal class EmailImpl( } override fun sendCompletable(data: SendRequest): CompletableFuture> = - coroutineScope - .async { - send(data) - }.asCompletableFuture() + coroutineScope.async { + send(data) + }.asCompletableFuture() override suspend fun loginOrCreate(data: LoginOrCreateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -161,8 +160,7 @@ internal class EmailImpl( } override fun loginOrCreateCompletable(data: LoginOrCreateRequest): CompletableFuture> = - coroutineScope - .async { - loginOrCreate(data) - }.asCompletableFuture() + coroutineScope.async { + loginOrCreate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpsms/OTPSms.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpsms/OTPSms.kt index 0260dfdf..586fd8a3 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpsms/OTPSms.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpsms/OTPSms.kt @@ -234,10 +234,9 @@ internal class SmsImpl( } override fun sendCompletable(data: SendRequest): CompletableFuture> = - coroutineScope - .async { - send(data) - }.asCompletableFuture() + coroutineScope.async { + send(data) + }.asCompletableFuture() override suspend fun loginOrCreate(data: LoginOrCreateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -257,8 +256,7 @@ internal class SmsImpl( } override fun loginOrCreateCompletable(data: LoginOrCreateRequest): CompletableFuture> = - coroutineScope - .async { - loginOrCreate(data) - }.asCompletableFuture() + coroutineScope.async { + loginOrCreate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpwhatsapp/OTPWhatsApp.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpwhatsapp/OTPWhatsApp.kt index ff60c334..ecddd5c2 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpwhatsapp/OTPWhatsApp.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpwhatsapp/OTPWhatsApp.kt @@ -180,10 +180,9 @@ internal class WhatsAppImpl( } override fun sendCompletable(data: SendRequest): CompletableFuture> = - coroutineScope - .async { - send(data) - }.asCompletableFuture() + coroutineScope.async { + send(data) + }.asCompletableFuture() override suspend fun loginOrCreate(data: LoginOrCreateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -203,8 +202,7 @@ internal class WhatsAppImpl( } override fun loginOrCreateCompletable(data: LoginOrCreateRequest): CompletableFuture> = - coroutineScope - .async { - loginOrCreate(data) - }.asCompletableFuture() + coroutineScope.async { + loginOrCreate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwords/Passwords.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwords/Passwords.kt index 207ca181..9d4220cb 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwords/Passwords.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwords/Passwords.kt @@ -293,10 +293,9 @@ internal class PasswordsImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope - .async { - create(data) - }.asCompletableFuture() + coroutineScope.async { + create(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -316,10 +315,9 @@ internal class PasswordsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() override suspend fun strengthCheck(data: StrengthCheckRequest): StytchResult = withContext(Dispatchers.IO) { @@ -339,10 +337,9 @@ internal class PasswordsImpl( } override fun strengthCheckCompletable(data: StrengthCheckRequest): CompletableFuture> = - coroutineScope - .async { - strengthCheck(data) - }.asCompletableFuture() + coroutineScope.async { + strengthCheck(data) + }.asCompletableFuture() override suspend fun migrate(data: MigrateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -362,8 +359,7 @@ internal class PasswordsImpl( } override fun migrateCompletable(data: MigrateRequest): CompletableFuture> = - coroutineScope - .async { - migrate(data) - }.asCompletableFuture() + coroutineScope.async { + migrate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordsemail/PasswordsEmail.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordsemail/PasswordsEmail.kt index 3c0f8fc1..5dca5fb1 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordsemail/PasswordsEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordsemail/PasswordsEmail.kt @@ -111,10 +111,9 @@ internal class EmailImpl( } override fun resetStartCompletable(data: ResetStartRequest): CompletableFuture> = - coroutineScope - .async { - resetStart(data) - }.asCompletableFuture() + coroutineScope.async { + resetStart(data) + }.asCompletableFuture() override suspend fun reset(data: ResetRequest): StytchResult = withContext(Dispatchers.IO) { @@ -134,8 +133,7 @@ internal class EmailImpl( } override fun resetCompletable(data: ResetRequest): CompletableFuture> = - coroutineScope - .async { - reset(data) - }.asCompletableFuture() + coroutineScope.async { + reset(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordsexistingpassword/PasswordsExistingPassword.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordsexistingpassword/PasswordsExistingPassword.kt index 252e2b81..d9b9d1af 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordsexistingpassword/PasswordsExistingPassword.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordsexistingpassword/PasswordsExistingPassword.kt @@ -70,8 +70,7 @@ internal class ExistingPasswordImpl( } override fun resetCompletable(data: ResetRequest): CompletableFuture> = - coroutineScope - .async { - reset(data) - }.asCompletableFuture() + coroutineScope.async { + reset(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordssession/PasswordsSession.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordssession/PasswordsSession.kt index e11cf092..f9c16969 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordssession/PasswordsSession.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordssession/PasswordsSession.kt @@ -79,8 +79,7 @@ internal class SessionsImpl( } override fun resetCompletable(data: ResetRequest): CompletableFuture> = - coroutineScope - .async { - reset(data) - }.asCompletableFuture() + coroutineScope.async { + reset(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/project/Project.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/project/Project.kt index 6df7fa3a..9a7d54d6 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/project/Project.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/project/Project.kt @@ -60,8 +60,7 @@ internal class ProjectImpl( } override fun metricsCompletable(data: MetricsRequest): CompletableFuture> = - coroutineScope - .async { - metrics(data) - }.asCompletableFuture() + coroutineScope.async { + metrics(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/rbac/RBAC.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/rbac/RBAC.kt index 83800dde..d4a99f1a 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/rbac/RBAC.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/rbac/RBAC.kt @@ -111,8 +111,7 @@ internal class RBACImpl( } override fun policyCompletable(data: PolicyRequest): CompletableFuture> = - coroutineScope - .async { - policy(data) - }.asCompletableFuture() + coroutineScope.async { + policy(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/sessions/Sessions.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/sessions/Sessions.kt index d36b611b..261889e4 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/sessions/Sessions.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/sessions/Sessions.kt @@ -430,10 +430,9 @@ internal class SessionsImpl( } override fun getCompletable(data: GetRequest): CompletableFuture> = - coroutineScope - .async { - get(data) - }.asCompletableFuture() + coroutineScope.async { + get(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -453,10 +452,9 @@ internal class SessionsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() override suspend fun revoke(data: RevokeRequest): StytchResult = withContext(Dispatchers.IO) { @@ -476,10 +474,9 @@ internal class SessionsImpl( } override fun revokeCompletable(data: RevokeRequest): CompletableFuture> = - coroutineScope - .async { - revoke(data) - }.asCompletableFuture() + coroutineScope.async { + revoke(data) + }.asCompletableFuture() override suspend fun migrate(data: MigrateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -499,10 +496,9 @@ internal class SessionsImpl( } override fun migrateCompletable(data: MigrateRequest): CompletableFuture> = - coroutineScope - .async { - migrate(data) - }.asCompletableFuture() + coroutineScope.async { + migrate(data) + }.asCompletableFuture() override suspend fun exchangeAccessToken(data: ExchangeAccessTokenRequest): StytchResult = withContext(Dispatchers.IO) { @@ -524,10 +520,9 @@ internal class SessionsImpl( override fun exchangeAccessTokenCompletable( data: ExchangeAccessTokenRequest, ): CompletableFuture> = - coroutineScope - .async { - exchangeAccessToken(data) - }.asCompletableFuture() + coroutineScope.async { + exchangeAccessToken(data) + }.asCompletableFuture() override suspend fun getJWKS(data: GetJWKSRequest): StytchResult = withContext(Dispatchers.IO) { @@ -550,10 +545,9 @@ internal class SessionsImpl( } override fun getJWKSCompletable(data: GetJWKSRequest): CompletableFuture> = - coroutineScope - .async { - getJWKS(data) - }.asCompletableFuture() + coroutineScope.async { + getJWKS(data) + }.asCompletableFuture() override suspend fun attest(data: AttestRequest): StytchResult = withContext(Dispatchers.IO) { @@ -573,10 +567,9 @@ internal class SessionsImpl( } override fun attestCompletable(data: AttestRequest): CompletableFuture> = - coroutineScope - .async { - attest(data) - }.asCompletableFuture() + coroutineScope.async { + attest(data) + }.asCompletableFuture() // MANUAL(authenticateJWT_impl)(SERVICE_METHOD) override suspend fun authenticateJwt( diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/totps/TOTPs.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/totps/TOTPs.kt index 79deec54..ec1db76f 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/totps/TOTPs.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/totps/TOTPs.kt @@ -127,10 +127,9 @@ internal class TOTPsImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope - .async { - create(data) - }.asCompletableFuture() + coroutineScope.async { + create(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -150,10 +149,9 @@ internal class TOTPsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() override suspend fun recoveryCodes(data: RecoveryCodesRequest): StytchResult = withContext(Dispatchers.IO) { @@ -173,10 +171,9 @@ internal class TOTPsImpl( } override fun recoveryCodesCompletable(data: RecoveryCodesRequest): CompletableFuture> = - coroutineScope - .async { - recoveryCodes(data) - }.asCompletableFuture() + coroutineScope.async { + recoveryCodes(data) + }.asCompletableFuture() override suspend fun recover(data: RecoverRequest): StytchResult = withContext(Dispatchers.IO) { @@ -196,8 +193,7 @@ internal class TOTPsImpl( } override fun recoverCompletable(data: RecoverRequest): CompletableFuture> = - coroutineScope - .async { - recover(data) - }.asCompletableFuture() + coroutineScope.async { + recover(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/users/Users.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/users/Users.kt index 4baaa038..1d8bf60c 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/users/Users.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/users/Users.kt @@ -497,10 +497,9 @@ internal class UsersImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope - .async { - create(data) - }.asCompletableFuture() + coroutineScope.async { + create(data) + }.asCompletableFuture() override suspend fun get(data: GetRequest): StytchResult = withContext(Dispatchers.IO) { @@ -523,10 +522,9 @@ internal class UsersImpl( } override fun getCompletable(data: GetRequest): CompletableFuture> = - coroutineScope - .async { - get(data) - }.asCompletableFuture() + coroutineScope.async { + get(data) + }.asCompletableFuture() override suspend fun search(data: SearchRequest): StytchResult = withContext(Dispatchers.IO) { @@ -546,10 +544,9 @@ internal class UsersImpl( } override fun searchCompletable(data: SearchRequest): CompletableFuture> = - coroutineScope - .async { - search(data) - }.asCompletableFuture() + coroutineScope.async { + search(data) + }.asCompletableFuture() override suspend fun update(data: UpdateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -569,10 +566,9 @@ internal class UsersImpl( } override fun updateCompletable(data: UpdateRequest): CompletableFuture> = - coroutineScope - .async { - update(data) - }.asCompletableFuture() + coroutineScope.async { + update(data) + }.asCompletableFuture() override suspend fun exchangePrimaryFactor(data: ExchangePrimaryFactorRequest): StytchResult = withContext(Dispatchers.IO) { @@ -594,10 +590,9 @@ internal class UsersImpl( override fun exchangePrimaryFactorCompletable( data: ExchangePrimaryFactorRequest, ): CompletableFuture> = - coroutineScope - .async { - exchangePrimaryFactor(data) - }.asCompletableFuture() + coroutineScope.async { + exchangePrimaryFactor(data) + }.asCompletableFuture() override suspend fun delete(data: DeleteRequest): StytchResult = withContext(Dispatchers.IO) { @@ -616,10 +611,9 @@ internal class UsersImpl( } override fun deleteCompletable(data: DeleteRequest): CompletableFuture> = - coroutineScope - .async { - delete(data) - }.asCompletableFuture() + coroutineScope.async { + delete(data) + }.asCompletableFuture() override suspend fun deleteEmail(data: DeleteEmailRequest): StytchResult = withContext(Dispatchers.IO) { @@ -638,10 +632,9 @@ internal class UsersImpl( } override fun deleteEmailCompletable(data: DeleteEmailRequest): CompletableFuture> = - coroutineScope - .async { - deleteEmail(data) - }.asCompletableFuture() + coroutineScope.async { + deleteEmail(data) + }.asCompletableFuture() override suspend fun deletePhoneNumber(data: DeletePhoneNumberRequest): StytchResult = withContext(Dispatchers.IO) { @@ -660,10 +653,9 @@ internal class UsersImpl( } override fun deletePhoneNumberCompletable(data: DeletePhoneNumberRequest): CompletableFuture> = - coroutineScope - .async { - deletePhoneNumber(data) - }.asCompletableFuture() + coroutineScope.async { + deletePhoneNumber(data) + }.asCompletableFuture() override suspend fun deleteWebAuthnRegistration( data: DeleteWebAuthnRegistrationRequest, @@ -686,10 +678,9 @@ internal class UsersImpl( override fun deleteWebAuthnRegistrationCompletable( data: DeleteWebAuthnRegistrationRequest, ): CompletableFuture> = - coroutineScope - .async { - deleteWebAuthnRegistration(data) - }.asCompletableFuture() + coroutineScope.async { + deleteWebAuthnRegistration(data) + }.asCompletableFuture() override suspend fun deleteBiometricRegistration( data: DeleteBiometricRegistrationRequest, @@ -712,10 +703,9 @@ internal class UsersImpl( override fun deleteBiometricRegistrationCompletable( data: DeleteBiometricRegistrationRequest, ): CompletableFuture> = - coroutineScope - .async { - deleteBiometricRegistration(data) - }.asCompletableFuture() + coroutineScope.async { + deleteBiometricRegistration(data) + }.asCompletableFuture() override suspend fun deleteTOTP(data: DeleteTOTPRequest): StytchResult = withContext(Dispatchers.IO) { @@ -734,10 +724,9 @@ internal class UsersImpl( } override fun deleteTOTPCompletable(data: DeleteTOTPRequest): CompletableFuture> = - coroutineScope - .async { - deleteTOTP(data) - }.asCompletableFuture() + coroutineScope.async { + deleteTOTP(data) + }.asCompletableFuture() override suspend fun deleteCryptoWallet(data: DeleteCryptoWalletRequest): StytchResult = withContext(Dispatchers.IO) { @@ -758,10 +747,9 @@ internal class UsersImpl( override fun deleteCryptoWalletCompletable( data: DeleteCryptoWalletRequest, ): CompletableFuture> = - coroutineScope - .async { - deleteCryptoWallet(data) - }.asCompletableFuture() + coroutineScope.async { + deleteCryptoWallet(data) + }.asCompletableFuture() override suspend fun deletePassword(data: DeletePasswordRequest): StytchResult = withContext(Dispatchers.IO) { @@ -780,10 +768,9 @@ internal class UsersImpl( } override fun deletePasswordCompletable(data: DeletePasswordRequest): CompletableFuture> = - coroutineScope - .async { - deletePassword(data) - }.asCompletableFuture() + coroutineScope.async { + deletePassword(data) + }.asCompletableFuture() override suspend fun deleteOAuthRegistration(data: DeleteOAuthRegistrationRequest): StytchResult = withContext(Dispatchers.IO) { @@ -804,10 +791,9 @@ internal class UsersImpl( override fun deleteOAuthRegistrationCompletable( data: DeleteOAuthRegistrationRequest, ): CompletableFuture> = - coroutineScope - .async { - deleteOAuthRegistration(data) - }.asCompletableFuture() + coroutineScope.async { + deleteOAuthRegistration(data) + }.asCompletableFuture() override suspend fun deleteExternalId(data: DeleteExternalIdRequest): StytchResult = withContext(Dispatchers.IO) { @@ -826,10 +812,9 @@ internal class UsersImpl( } override fun deleteExternalIdCompletable(data: DeleteExternalIdRequest): CompletableFuture> = - coroutineScope - .async { - deleteExternalId(data) - }.asCompletableFuture() + coroutineScope.async { + deleteExternalId(data) + }.asCompletableFuture() override suspend fun connectedApps(data: ConnectedAppsRequest): StytchResult = withContext(Dispatchers.IO) { @@ -852,10 +837,9 @@ internal class UsersImpl( } override fun connectedAppsCompletable(data: ConnectedAppsRequest): CompletableFuture> = - coroutineScope - .async { - connectedApps(data) - }.asCompletableFuture() + coroutineScope.async { + connectedApps(data) + }.asCompletableFuture() override suspend fun revoke(data: RevokeRequest): StytchResult = withContext(Dispatchers.IO) { @@ -875,8 +859,7 @@ internal class UsersImpl( } override fun revokeCompletable(data: RevokeRequest): CompletableFuture> = - coroutineScope - .async { - revoke(data) - }.asCompletableFuture() + coroutineScope.async { + revoke(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/webauthn/WebAuthn.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/webauthn/WebAuthn.kt index 380aab87..ff712fa9 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/webauthn/WebAuthn.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/webauthn/WebAuthn.kt @@ -283,10 +283,9 @@ internal class WebAuthnImpl( } override fun registerStartCompletable(data: RegisterStartRequest): CompletableFuture> = - coroutineScope - .async { - registerStart(data) - }.asCompletableFuture() + coroutineScope.async { + registerStart(data) + }.asCompletableFuture() override suspend fun register(data: RegisterRequest): StytchResult = withContext(Dispatchers.IO) { @@ -306,10 +305,9 @@ internal class WebAuthnImpl( } override fun registerCompletable(data: RegisterRequest): CompletableFuture> = - coroutineScope - .async { - register(data) - }.asCompletableFuture() + coroutineScope.async { + register(data) + }.asCompletableFuture() override suspend fun authenticateStart(data: AuthenticateStartRequest): StytchResult = withContext(Dispatchers.IO) { @@ -329,10 +327,9 @@ internal class WebAuthnImpl( } override fun authenticateStartCompletable(data: AuthenticateStartRequest): CompletableFuture> = - coroutineScope - .async { - authenticateStart(data) - }.asCompletableFuture() + coroutineScope.async { + authenticateStart(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -352,10 +349,9 @@ internal class WebAuthnImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope - .async { - authenticate(data) - }.asCompletableFuture() + coroutineScope.async { + authenticate(data) + }.asCompletableFuture() override suspend fun update(data: UpdateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -375,10 +371,9 @@ internal class WebAuthnImpl( } override fun updateCompletable(data: UpdateRequest): CompletableFuture> = - coroutineScope - .async { - update(data) - }.asCompletableFuture() + coroutineScope.async { + update(data) + }.asCompletableFuture() override suspend fun listCredentials(data: ListCredentialsRequest): StytchResult = withContext(Dispatchers.IO) { @@ -401,8 +396,7 @@ internal class WebAuthnImpl( } override fun listCredentialsCompletable(data: ListCredentialsRequest): CompletableFuture> = - coroutineScope - .async { - listCredentials(data) - }.asCompletableFuture() + coroutineScope.async { + listCredentials(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/models/fraud/Fraud.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/models/fraud/Fraud.kt index 31def102..96ba919c 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/models/fraud/Fraud.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/models/fraud/Fraud.kt @@ -112,6 +112,38 @@ public data class ASNProperties val network: String, ) +@JsonClass(generateAdapter = true) +public data class AddressInformation + @JvmOverloads + constructor( + /** + * Whether email sent to this address is known to have bounced previously. + */ + @Json(name = "has_known_bounces") + val hasKnownBounces: Boolean, + /** + * Whether this email address is valid. + */ + @Json(name = "has_valid_syntax") + val hasValidSyntax: Boolean, + /** + * Whether the local part of the email appears to be a role or group, rather than an individual end user. + */ + @Json(name = "is_suspected_role_address") + val isSuspectedRoleAddress: Boolean, + /** + * The normalized email address after removing '.' characters and any characters after a '+'. + */ + @Json(name = "normalized_email") + val normalizedEmail: String, + /** + * The number of '.' and '+' characters in the email address. A higher tumbling count indicates a higher potential for + * fraud. + */ + @Json(name = "tumbling_character_count") + val tumblingCharacterCount: Int, + ) + @JsonClass(generateAdapter = true) public data class BrowserProperties @JvmOverloads @@ -123,6 +155,22 @@ public data class BrowserProperties val userAgent: String, ) +@JsonClass(generateAdapter = true) +public data class DomainInformation + @JvmOverloads + constructor( + /** + * Whether the email has appropriate DNS records to deliver a message. + */ + @Json(name = "has_mx_or_a_record") + val hasMXOrARecord: Boolean, + /** + * Whether the email domain is known to be disposable. + */ + @Json(name = "is_disposable_domain") + val isDisposableDomain: Boolean, + ) + @JsonClass(generateAdapter = true) public data class Fingerprints @JvmOverloads diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/models/fraudemail/FraudEmail.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/models/fraudemail/FraudEmail.kt new file mode 100644 index 00000000..ae8fdfba --- /dev/null +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/models/fraudemail/FraudEmail.kt @@ -0,0 +1,84 @@ +package com.stytch.java.consumer.models.fraudemail + +// !!! +// WARNING: This file is autogenerated +// Only modify code within MANUAL() sections +// or your changes may be overwritten later! +// !!! + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass +import com.stytch.java.consumer.models.fraud.AddressInformation +import com.stytch.java.consumer.models.fraud.DomainInformation + +@JsonClass(generateAdapter = false) +public enum class RiskResponseAction { + @Json(name = "ALLOW") + ALLOW, + + @Json(name = "CHALLENGE") + CHALLENGE, + + @Json(name = "BLOCK") + BLOCK, +} + +/** +* Request type for `Email.risk`. +*/ +@JsonClass(generateAdapter = true) +public data class RiskRequest + @JvmOverloads + constructor( + /** + * The email address to check. + */ + @Json(name = "email_address") + val emailAddress: String, + ) + +/** +* Response type for `Email.risk`. +*/ +@JsonClass(generateAdapter = true) +public data class RiskResponse + @JvmOverloads + constructor( + /** + * Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we + * may ask for this value to help identify a specific API call when helping you debug an issue. + */ + @Json(name = "request_id") + val requestId: String, + /** + * Information about the email address. + */ + @Json(name = "address_information") + val addressInformation: AddressInformation, + /** + * Information about the email domain. + */ + @Json(name = "domain_information") + val domainInformation: DomainInformation, + /** + * The suggested action based on the attributes of the email address. The available actions are: + * * `ALLOW` - This email is most likely safe to send to and not fraudulent. + * * `BLOCK` - This email is invalid or exhibits signs of fraud. We recommend blocking the end user. + * * `CHALLENGE` - This email has some potentially fraudulent attributes. We recommend increased friction such as 2FA or + * other forms of extended user verification before allowing the privileged action to proceed. + * + */ + @Json(name = "action") + val action: RiskResponseAction, + /** + * A score from 0 to 100 indicating how risky the email is. 100 is the most risky. + */ + @Json(name = "risk_score") + val riskScore: Int, + /** + * The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values + * equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. + */ + @Json(name = "status_code") + val statusCode: Int, + ) diff --git a/version.gradle.kts b/version.gradle.kts index a0460881..3e1d71cb 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -1 +1 @@ -version = "9.1.0" +version = "9.2.0" From 51071e02dcf5d43d9966c284cc28c77e08349c6d Mon Sep 17 00:00:00 2001 From: Jennifer McCleary Date: Wed, 21 Jan 2026 17:44:03 -0500 Subject: [PATCH 2/2] Run ktlint manually --- .../com/stytch/java/b2b/StytchB2BClient.kt | 6 +- .../DiscoveryIntermediateSessions.kt | 7 +- .../DiscoveryOrganizations.kt | 14 ++- .../stytch/java/b2b/api/idpoauth/IDPOAuth.kt | 14 ++- .../b2b/api/impersonation/Impersonation.kt | 7 +- .../java/b2b/api/magiclinks/MagicLinks.kt | 7 +- .../MagicLinksDiscovery.kt | 7 +- .../api/magiclinksemail/MagicLinksEmail.kt | 14 ++- .../MagicLinksEmailDiscovery.kt | 7 +- .../com/stytch/java/b2b/api/oauth/OAuth.kt | 7 +- .../b2b/api/oauthdiscovery/OAuthDiscovery.kt | 7 +- .../b2b/api/organizations/Organizations.kt | 63 ++++++---- .../OrganizationsMembers.kt | 105 +++++++++------- .../OrganizationsMembersConnectedApps.kt | 7 +- .../OrganizationsMembersOAuthProviders.kt | 35 +++--- .../stytch/java/b2b/api/otpemail/OTPEmail.kt | 14 ++- .../otpemaildiscovery/OTPEmailDiscovery.kt | 14 ++- .../com/stytch/java/b2b/api/otpsms/OTPSms.kt | 14 ++- .../java/b2b/api/passwords/Passwords.kt | 21 ++-- .../passwordsdiscovery/PasswordsDiscovery.kt | 7 +- .../PasswordsDiscoveryEmail.kt | 14 ++- .../b2b/api/passwordsemail/PasswordsEmail.kt | 21 ++-- .../PasswordsExistingPassword.kt | 7 +- .../api/passwordssession/PasswordsSession.kt | 7 +- .../com/stytch/java/b2b/api/rbac/RBAC.kt | 7 +- .../rbacorganizations/RBACOrganizations.kt | 14 ++- .../b2b/api/recoverycodes/RecoveryCodes.kt | 21 ++-- .../b2b/api/scimconnection/SCIMConnection.kt | 56 +++++---- .../stytch/java/b2b/api/sessions/Sessions.kt | 56 +++++---- .../kotlin/com/stytch/java/b2b/api/sso/SSO.kt | 21 ++-- .../java/b2b/api/ssoexternal/SSOExternal.kt | 14 ++- .../stytch/java/b2b/api/ssooidc/SSOOIDC.kt | 14 ++- .../stytch/java/b2b/api/ssosaml/SSOSAML.kt | 35 +++--- .../com/stytch/java/b2b/api/totps/TOTPs.kt | 21 ++-- .../com/stytch/java/consumer/StytchClient.kt | 6 +- .../ConnectedAppsClients.kt | 35 +++--- .../ConnectedAppsClientsSecrets.kt | 21 ++-- .../api/cryptowallets/CryptoWallets.kt | 14 ++- .../stytch/java/consumer/api/debug/Debug.kt | 7 +- .../consumer/api/fraudemail/FraudEmail.kt | 7 +- .../api/fraudfingerprint/FraudFingerprint.kt | 7 +- .../consumer/api/fraudrules/FraudRules.kt | 14 ++- .../FraudVerdictReasons.kt | 14 ++- .../java/consumer/api/idpoauth/IDPOAuth.kt | 14 ++- .../api/impersonation/Impersonation.kt | 7 +- .../consumer/api/m2mclients/M2MClients.kt | 35 +++--- .../m2mclientssecrets/M2MClientsSecrets.kt | 21 ++-- .../consumer/api/magiclinks/MagicLinks.kt | 14 ++- .../api/magiclinksemail/MagicLinksEmail.kt | 28 +++-- .../stytch/java/consumer/api/oauth/OAuth.kt | 14 ++- .../com/stytch/java/consumer/api/otp/OTP.kt | 7 +- .../java/consumer/api/otpemail/OTPEmail.kt | 14 ++- .../stytch/java/consumer/api/otpsms/OTPSms.kt | 14 ++- .../consumer/api/otpwhatsapp/OTPWhatsApp.kt | 14 ++- .../java/consumer/api/passwords/Passwords.kt | 28 +++-- .../api/passwordsemail/PasswordsEmail.kt | 14 ++- .../PasswordsExistingPassword.kt | 7 +- .../api/passwordssession/PasswordsSession.kt | 7 +- .../java/consumer/api/project/Project.kt | 7 +- .../com/stytch/java/consumer/api/rbac/RBAC.kt | 7 +- .../java/consumer/api/sessions/Sessions.kt | 49 ++++---- .../stytch/java/consumer/api/totps/TOTPs.kt | 28 +++-- .../stytch/java/consumer/api/users/Users.kt | 119 ++++++++++-------- .../java/consumer/api/webauthn/WebAuthn.kt | 42 ++++--- 64 files changed, 746 insertions(+), 554 deletions(-) diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/StytchB2BClient.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/StytchB2BClient.kt index 95341d00..d0f6e010 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/StytchB2BClient.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/StytchB2BClient.kt @@ -55,7 +55,11 @@ import kotlinx.coroutines.SupervisorJob public class StytchB2BClient @JvmOverloads - constructor(projectId: String, secret: String, clientConfig: OptionalClientConfig = OptionalClientConfig()) { + constructor( + projectId: String, + secret: String, + clientConfig: OptionalClientConfig = OptionalClientConfig(), + ) { private val coroutineScope = CoroutineScope(SupervisorJob()) private val baseUrl = getBaseUrl(projectId, clientConfig) private val httpClient: HttpClient = diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryintermediatesessions/DiscoveryIntermediateSessions.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryintermediatesessions/DiscoveryIntermediateSessions.kt index a8d0fb32..71ba32a0 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryintermediatesessions/DiscoveryIntermediateSessions.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryintermediatesessions/DiscoveryIntermediateSessions.kt @@ -145,7 +145,8 @@ internal class IntermediateSessionsImpl( } override fun exchangeCompletable(data: ExchangeRequest): CompletableFuture> = - coroutineScope.async { - exchange(data) - }.asCompletableFuture() + coroutineScope + .async { + exchange(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryorganizations/DiscoveryOrganizations.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryorganizations/DiscoveryOrganizations.kt index c6babf48..f9bf29f3 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryorganizations/DiscoveryOrganizations.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryorganizations/DiscoveryOrganizations.kt @@ -219,9 +219,10 @@ internal class OrganizationsImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope.async { - create(data) - }.asCompletableFuture() + coroutineScope + .async { + create(data) + }.asCompletableFuture() override suspend fun list(data: ListRequest): StytchResult = withContext(Dispatchers.IO) { @@ -241,7 +242,8 @@ internal class OrganizationsImpl( } override fun listCompletable(data: ListRequest): CompletableFuture> = - coroutineScope.async { - list(data) - }.asCompletableFuture() + coroutineScope + .async { + list(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/idpoauth/IDPOAuth.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/idpoauth/IDPOAuth.kt index 52fc8904..bc774532 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/idpoauth/IDPOAuth.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/idpoauth/IDPOAuth.kt @@ -213,9 +213,10 @@ internal class OAuthImpl( } override fun authorizeStartCompletable(data: AuthorizeStartRequest): CompletableFuture> = - coroutineScope.async { - authorizeStart(data) - }.asCompletableFuture() + coroutineScope + .async { + authorizeStart(data) + }.asCompletableFuture() override suspend fun authorize(data: AuthorizeRequest): StytchResult = withContext(Dispatchers.IO) { @@ -235,7 +236,8 @@ internal class OAuthImpl( } override fun authorizeCompletable(data: AuthorizeRequest): CompletableFuture> = - coroutineScope.async { - authorize(data) - }.asCompletableFuture() + coroutineScope + .async { + authorize(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/impersonation/Impersonation.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/impersonation/Impersonation.kt index 31bbcde6..2b26b137 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/impersonation/Impersonation.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/impersonation/Impersonation.kt @@ -82,7 +82,8 @@ internal class ImpersonationImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinks/MagicLinks.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinks/MagicLinks.kt index 42252c39..103a6a3c 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinks/MagicLinks.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinks/MagicLinks.kt @@ -129,7 +129,8 @@ internal class MagicLinksImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksdiscovery/MagicLinksDiscovery.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksdiscovery/MagicLinksDiscovery.kt index 98a65eb2..58b55eda 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksdiscovery/MagicLinksDiscovery.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksdiscovery/MagicLinksDiscovery.kt @@ -67,7 +67,8 @@ internal class DiscoveryImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemail/MagicLinksEmail.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemail/MagicLinksEmail.kt index 8b86b01c..fe9bd68c 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemail/MagicLinksEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemail/MagicLinksEmail.kt @@ -137,9 +137,10 @@ internal class EmailImpl( } override fun loginOrSignupCompletable(data: LoginOrSignupRequest): CompletableFuture> = - coroutineScope.async { - loginOrSignup(data) - }.asCompletableFuture() + coroutineScope + .async { + loginOrSignup(data) + }.asCompletableFuture() override suspend fun invite( data: InviteRequest, @@ -169,7 +170,8 @@ internal class EmailImpl( data: InviteRequest, methodOptions: InviteRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - invite(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + invite(data, methodOptions) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemaildiscovery/MagicLinksEmailDiscovery.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemaildiscovery/MagicLinksEmailDiscovery.kt index 318226ab..91a7351d 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemaildiscovery/MagicLinksEmailDiscovery.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemaildiscovery/MagicLinksEmailDiscovery.kt @@ -64,7 +64,8 @@ internal class DiscoveryImpl( } override fun sendCompletable(data: SendRequest): CompletableFuture> = - coroutineScope.async { - send(data) - }.asCompletableFuture() + coroutineScope + .async { + send(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/oauth/OAuth.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/oauth/OAuth.kt index beccc3f4..94a31615 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/oauth/OAuth.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/oauth/OAuth.kt @@ -148,7 +148,8 @@ internal class OAuthImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/oauthdiscovery/OAuthDiscovery.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/oauthdiscovery/OAuthDiscovery.kt index 6beaf325..6cda22a6 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/oauthdiscovery/OAuthDiscovery.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/oauthdiscovery/OAuthDiscovery.kt @@ -67,7 +67,8 @@ internal class DiscoveryImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizations/Organizations.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizations/Organizations.kt index 183edaea..3fa7856c 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizations/Organizations.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizations/Organizations.kt @@ -317,9 +317,10 @@ internal class OrganizationsImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope.async { - create(data) - }.asCompletableFuture() + coroutineScope + .async { + create(data) + }.asCompletableFuture() override suspend fun get(data: GetRequest): StytchResult = withContext(Dispatchers.IO) { @@ -342,9 +343,10 @@ internal class OrganizationsImpl( } override fun getCompletable(data: GetRequest): CompletableFuture> = - coroutineScope.async { - get(data) - }.asCompletableFuture() + coroutineScope + .async { + get(data) + }.asCompletableFuture() override suspend fun update( data: UpdateRequest, @@ -374,9 +376,10 @@ internal class OrganizationsImpl( data: UpdateRequest, methodOptions: UpdateRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - update(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + update(data, methodOptions) + }.asCompletableFuture() override suspend fun delete( data: DeleteRequest, @@ -405,9 +408,10 @@ internal class OrganizationsImpl( data: DeleteRequest, methodOptions: DeleteRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - delete(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + delete(data, methodOptions) + }.asCompletableFuture() override suspend fun search(data: SearchRequest): StytchResult = withContext(Dispatchers.IO) { @@ -427,9 +431,10 @@ internal class OrganizationsImpl( } override fun searchCompletable(data: SearchRequest): CompletableFuture> = - coroutineScope.async { - search(data) - }.asCompletableFuture() + coroutineScope + .async { + search(data) + }.asCompletableFuture() override suspend fun metrics(data: MetricsRequest): StytchResult = withContext(Dispatchers.IO) { @@ -452,9 +457,10 @@ internal class OrganizationsImpl( } override fun metricsCompletable(data: MetricsRequest): CompletableFuture> = - coroutineScope.async { - metrics(data) - }.asCompletableFuture() + coroutineScope + .async { + metrics(data) + }.asCompletableFuture() override suspend fun connectedApps( data: ConnectedAppsRequest, @@ -487,9 +493,10 @@ internal class OrganizationsImpl( data: ConnectedAppsRequest, methodOptions: ConnectedAppsRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - connectedApps(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + connectedApps(data, methodOptions) + }.asCompletableFuture() override suspend fun getConnectedApp( data: GetConnectedAppRequest, @@ -522,9 +529,10 @@ internal class OrganizationsImpl( data: GetConnectedAppRequest, methodOptions: GetConnectedAppRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - getConnectedApp(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + getConnectedApp(data, methodOptions) + }.asCompletableFuture() override suspend fun deleteExternalId( data: DeleteExternalIdRequest, @@ -553,7 +561,8 @@ internal class OrganizationsImpl( data: DeleteExternalIdRequest, methodOptions: DeleteExternalIdRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - deleteExternalId(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + deleteExternalId(data, methodOptions) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembers/OrganizationsMembers.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembers/OrganizationsMembers.kt index 738363c6..b6c2f57c 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembers/OrganizationsMembers.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembers/OrganizationsMembers.kt @@ -666,9 +666,10 @@ internal class MembersImpl( data: UpdateRequest, methodOptions: UpdateRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - update(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + update(data, methodOptions) + }.asCompletableFuture() override suspend fun delete( data: DeleteRequest, @@ -697,9 +698,10 @@ internal class MembersImpl( data: DeleteRequest, methodOptions: DeleteRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - delete(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + delete(data, methodOptions) + }.asCompletableFuture() override suspend fun reactivate( data: ReactivateRequest, @@ -729,9 +731,10 @@ internal class MembersImpl( data: ReactivateRequest, methodOptions: ReactivateRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - reactivate(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + reactivate(data, methodOptions) + }.asCompletableFuture() override suspend fun deleteMFAPhoneNumber( data: DeleteMFAPhoneNumberRequest, @@ -760,9 +763,10 @@ internal class MembersImpl( data: DeleteMFAPhoneNumberRequest, methodOptions: DeleteMFAPhoneNumberRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - deleteMFAPhoneNumber(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + deleteMFAPhoneNumber(data, methodOptions) + }.asCompletableFuture() override suspend fun deleteTOTP( data: DeleteTOTPRequest, @@ -791,9 +795,10 @@ internal class MembersImpl( data: DeleteTOTPRequest, methodOptions: DeleteTOTPRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - deleteTOTP(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + deleteTOTP(data, methodOptions) + }.asCompletableFuture() override suspend fun search( data: SearchRequest, @@ -823,9 +828,10 @@ internal class MembersImpl( data: SearchRequest, methodOptions: SearchRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - search(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + search(data, methodOptions) + }.asCompletableFuture() override suspend fun deletePassword( data: DeletePasswordRequest, @@ -854,9 +860,10 @@ internal class MembersImpl( data: DeletePasswordRequest, methodOptions: DeletePasswordRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - deletePassword(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + deletePassword(data, methodOptions) + }.asCompletableFuture() override suspend fun dangerouslyGet(data: DangerouslyGetRequest): StytchResult = withContext(Dispatchers.IO) { @@ -879,9 +886,10 @@ internal class MembersImpl( } override fun dangerouslyGetCompletable(data: DangerouslyGetRequest): CompletableFuture> = - coroutineScope.async { - dangerouslyGet(data) - }.asCompletableFuture() + coroutineScope + .async { + dangerouslyGet(data) + }.asCompletableFuture() override suspend fun oidcProviders(data: OIDCProviderInformationRequest): StytchResult = withContext(Dispatchers.IO) { @@ -904,9 +912,10 @@ internal class MembersImpl( } override fun oidcProvidersCompletable(data: OIDCProviderInformationRequest): CompletableFuture> = - coroutineScope.async { - oidcProviders(data) - }.asCompletableFuture() + coroutineScope + .async { + oidcProviders(data) + }.asCompletableFuture() override suspend fun unlinkRetiredEmail( data: UnlinkRetiredEmailRequest, @@ -936,9 +945,10 @@ internal class MembersImpl( data: UnlinkRetiredEmailRequest, methodOptions: UnlinkRetiredEmailRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - unlinkRetiredEmail(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + unlinkRetiredEmail(data, methodOptions) + }.asCompletableFuture() override suspend fun startEmailUpdate( data: StartEmailUpdateRequest, @@ -968,9 +978,10 @@ internal class MembersImpl( data: StartEmailUpdateRequest, methodOptions: StartEmailUpdateRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - startEmailUpdate(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + startEmailUpdate(data, methodOptions) + }.asCompletableFuture() override suspend fun getConnectedApps( data: GetConnectedAppsRequest, @@ -1003,9 +1014,10 @@ internal class MembersImpl( data: GetConnectedAppsRequest, methodOptions: GetConnectedAppsRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - getConnectedApps(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + getConnectedApps(data, methodOptions) + }.asCompletableFuture() override suspend fun deleteExternalId( data: DeleteExternalIdRequest, @@ -1034,9 +1046,10 @@ internal class MembersImpl( data: DeleteExternalIdRequest, methodOptions: DeleteExternalIdRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - deleteExternalId(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + deleteExternalId(data, methodOptions) + }.asCompletableFuture() override suspend fun create( data: CreateRequest, @@ -1066,9 +1079,10 @@ internal class MembersImpl( data: CreateRequest, methodOptions: CreateRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - create(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + create(data, methodOptions) + }.asCompletableFuture() override suspend fun get(data: GetRequest): StytchResult = withContext(Dispatchers.IO) { @@ -1091,7 +1105,8 @@ internal class MembersImpl( } override fun getCompletable(data: GetRequest): CompletableFuture> = - coroutineScope.async { - get(data) - }.asCompletableFuture() + coroutineScope + .async { + get(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembersconnectedapps/OrganizationsMembersConnectedApps.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembersconnectedapps/OrganizationsMembersConnectedApps.kt index 01a742e3..c3916a9c 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembersconnectedapps/OrganizationsMembersConnectedApps.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembersconnectedapps/OrganizationsMembersConnectedApps.kt @@ -92,7 +92,8 @@ internal class ConnectedAppsImpl( data: RevokeRequest, methodOptions: RevokeRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - revoke(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + revoke(data, methodOptions) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembersoauthproviders/OrganizationsMembersOAuthProviders.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembersoauthproviders/OrganizationsMembersOAuthProviders.kt index b51a4137..32dca88c 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembersoauthproviders/OrganizationsMembersOAuthProviders.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/organizationsmembersoauthproviders/OrganizationsMembersOAuthProviders.kt @@ -203,9 +203,10 @@ internal class OAuthProvidersImpl( } override fun googleCompletable(data: ProviderInformationRequest): CompletableFuture> = - coroutineScope.async { - google(data) - }.asCompletableFuture() + coroutineScope + .async { + google(data) + }.asCompletableFuture() override suspend fun microsoft(data: ProviderInformationRequest): StytchResult = withContext(Dispatchers.IO) { @@ -232,9 +233,10 @@ internal class OAuthProvidersImpl( } override fun microsoftCompletable(data: ProviderInformationRequest): CompletableFuture> = - coroutineScope.async { - microsoft(data) - }.asCompletableFuture() + coroutineScope + .async { + microsoft(data) + }.asCompletableFuture() override suspend fun slack(data: SlackRequest): StytchResult = withContext(Dispatchers.IO) { @@ -257,9 +259,10 @@ internal class OAuthProvidersImpl( } override fun slackCompletable(data: SlackRequest): CompletableFuture> = - coroutineScope.async { - slack(data) - }.asCompletableFuture() + coroutineScope + .async { + slack(data) + }.asCompletableFuture() override suspend fun hubspot(data: ProviderInformationRequest): StytchResult = withContext(Dispatchers.IO) { @@ -282,9 +285,10 @@ internal class OAuthProvidersImpl( } override fun hubspotCompletable(data: ProviderInformationRequest): CompletableFuture> = - coroutineScope.async { - hubspot(data) - }.asCompletableFuture() + coroutineScope + .async { + hubspot(data) + }.asCompletableFuture() override suspend fun github(data: ProviderInformationRequest): StytchResult = withContext(Dispatchers.IO) { @@ -307,7 +311,8 @@ internal class OAuthProvidersImpl( } override fun githubCompletable(data: ProviderInformationRequest): CompletableFuture> = - coroutineScope.async { - github(data) - }.asCompletableFuture() + coroutineScope + .async { + github(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpemail/OTPEmail.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpemail/OTPEmail.kt index d348f30c..c0303a06 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpemail/OTPEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpemail/OTPEmail.kt @@ -165,9 +165,10 @@ internal class EmailImpl( } override fun loginOrSignupCompletable(data: LoginOrSignupRequest): CompletableFuture> = - coroutineScope.async { - loginOrSignup(data) - }.asCompletableFuture() + coroutineScope + .async { + loginOrSignup(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -187,7 +188,8 @@ internal class EmailImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpemaildiscovery/OTPEmailDiscovery.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpemaildiscovery/OTPEmailDiscovery.kt index f6ce2d8c..31a4deea 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpemaildiscovery/OTPEmailDiscovery.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpemaildiscovery/OTPEmailDiscovery.kt @@ -90,9 +90,10 @@ internal class DiscoveryImpl( } override fun sendCompletable(data: SendRequest): CompletableFuture> = - coroutineScope.async { - send(data) - }.asCompletableFuture() + coroutineScope + .async { + send(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -112,7 +113,8 @@ internal class DiscoveryImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpsms/OTPSms.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpsms/OTPSms.kt index 4c0184b0..3a24ad1e 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpsms/OTPSms.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/otpsms/OTPSms.kt @@ -273,9 +273,10 @@ internal class SmsImpl( } override fun sendCompletable(data: SendRequest): CompletableFuture> = - coroutineScope.async { - send(data) - }.asCompletableFuture() + coroutineScope + .async { + send(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -295,7 +296,8 @@ internal class SmsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwords/Passwords.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwords/Passwords.kt index ad20792d..5a136c1a 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwords/Passwords.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwords/Passwords.kt @@ -278,9 +278,10 @@ internal class PasswordsImpl( } override fun strengthCheckCompletable(data: StrengthCheckRequest): CompletableFuture> = - coroutineScope.async { - strengthCheck(data) - }.asCompletableFuture() + coroutineScope + .async { + strengthCheck(data) + }.asCompletableFuture() override suspend fun migrate(data: MigrateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -300,9 +301,10 @@ internal class PasswordsImpl( } override fun migrateCompletable(data: MigrateRequest): CompletableFuture> = - coroutineScope.async { - migrate(data) - }.asCompletableFuture() + coroutineScope + .async { + migrate(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -322,7 +324,8 @@ internal class PasswordsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsdiscovery/PasswordsDiscovery.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsdiscovery/PasswordsDiscovery.kt index 84efbfa0..e0bdc0f5 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsdiscovery/PasswordsDiscovery.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsdiscovery/PasswordsDiscovery.kt @@ -100,7 +100,8 @@ internal class DiscoveryImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsdiscoveryemail/PasswordsDiscoveryEmail.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsdiscoveryemail/PasswordsDiscoveryEmail.kt index 8f9ad3b4..a05757cf 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsdiscoveryemail/PasswordsDiscoveryEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsdiscoveryemail/PasswordsDiscoveryEmail.kt @@ -138,9 +138,10 @@ internal class EmailImpl( } override fun resetStartCompletable(data: ResetStartRequest): CompletableFuture> = - coroutineScope.async { - resetStart(data) - }.asCompletableFuture() + coroutineScope + .async { + resetStart(data) + }.asCompletableFuture() override suspend fun reset(data: ResetRequest): StytchResult = withContext(Dispatchers.IO) { @@ -160,7 +161,8 @@ internal class EmailImpl( } override fun resetCompletable(data: ResetRequest): CompletableFuture> = - coroutineScope.async { - reset(data) - }.asCompletableFuture() + coroutineScope + .async { + reset(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsemail/PasswordsEmail.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsemail/PasswordsEmail.kt index e9544780..43e38500 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsemail/PasswordsEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsemail/PasswordsEmail.kt @@ -199,9 +199,10 @@ internal class EmailImpl( } override fun resetStartCompletable(data: ResetStartRequest): CompletableFuture> = - coroutineScope.async { - resetStart(data) - }.asCompletableFuture() + coroutineScope + .async { + resetStart(data) + }.asCompletableFuture() override suspend fun reset(data: ResetRequest): StytchResult = withContext(Dispatchers.IO) { @@ -221,9 +222,10 @@ internal class EmailImpl( } override fun resetCompletable(data: ResetRequest): CompletableFuture> = - coroutineScope.async { - reset(data) - }.asCompletableFuture() + coroutineScope + .async { + reset(data) + }.asCompletableFuture() override suspend fun requireReset( data: RequireResetRequest, @@ -253,7 +255,8 @@ internal class EmailImpl( data: RequireResetRequest, methodOptions: RequireResetRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - requireReset(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + requireReset(data, methodOptions) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsexistingpassword/PasswordsExistingPassword.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsexistingpassword/PasswordsExistingPassword.kt index aa40e404..bcc816b2 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsexistingpassword/PasswordsExistingPassword.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordsexistingpassword/PasswordsExistingPassword.kt @@ -124,7 +124,8 @@ internal class ExistingPasswordImpl( } override fun resetCompletable(data: ResetRequest): CompletableFuture> = - coroutineScope.async { - reset(data) - }.asCompletableFuture() + coroutineScope + .async { + reset(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordssession/PasswordsSession.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordssession/PasswordsSession.kt index 2e4f7933..57c98bf9 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordssession/PasswordsSession.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/passwordssession/PasswordsSession.kt @@ -79,7 +79,8 @@ internal class SessionsImpl( } override fun resetCompletable(data: ResetRequest): CompletableFuture> = - coroutineScope.async { - reset(data) - }.asCompletableFuture() + coroutineScope + .async { + reset(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/rbac/RBAC.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/rbac/RBAC.kt index 562a7faa..53dd7bdb 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/rbac/RBAC.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/rbac/RBAC.kt @@ -114,7 +114,8 @@ internal class RBACImpl( } override fun policyCompletable(data: PolicyRequest): CompletableFuture> = - coroutineScope.async { - policy(data) - }.asCompletableFuture() + coroutineScope + .async { + policy(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/rbacorganizations/RBACOrganizations.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/rbacorganizations/RBACOrganizations.kt index ade66031..d8cb5e7b 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/rbacorganizations/RBACOrganizations.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/rbacorganizations/RBACOrganizations.kt @@ -203,9 +203,10 @@ internal class OrganizationsImpl( } override fun getOrgPolicyCompletable(data: GetOrgPolicyRequest): CompletableFuture> = - coroutineScope.async { - getOrgPolicy(data) - }.asCompletableFuture() + coroutineScope + .async { + getOrgPolicy(data) + }.asCompletableFuture() override suspend fun setOrgPolicy(data: SetOrgPolicyRequest): StytchResult = withContext(Dispatchers.IO) { @@ -225,7 +226,8 @@ internal class OrganizationsImpl( } override fun setOrgPolicyCompletable(data: SetOrgPolicyRequest): CompletableFuture> = - coroutineScope.async { - setOrgPolicy(data) - }.asCompletableFuture() + coroutineScope + .async { + setOrgPolicy(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/recoverycodes/RecoveryCodes.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/recoverycodes/RecoveryCodes.kt index 6c43f749..56e78f71 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/recoverycodes/RecoveryCodes.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/recoverycodes/RecoveryCodes.kt @@ -112,9 +112,10 @@ internal class RecoveryCodesImpl( } override fun recoverCompletable(data: RecoverRequest): CompletableFuture> = - coroutineScope.async { - recover(data) - }.asCompletableFuture() + coroutineScope + .async { + recover(data) + }.asCompletableFuture() override suspend fun get(data: GetRequest): StytchResult = withContext(Dispatchers.IO) { @@ -137,9 +138,10 @@ internal class RecoveryCodesImpl( } override fun getCompletable(data: GetRequest): CompletableFuture> = - coroutineScope.async { - get(data) - }.asCompletableFuture() + coroutineScope + .async { + get(data) + }.asCompletableFuture() override suspend fun rotate(data: RotateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -159,7 +161,8 @@ internal class RecoveryCodesImpl( } override fun rotateCompletable(data: RotateRequest): CompletableFuture> = - coroutineScope.async { - rotate(data) - }.asCompletableFuture() + coroutineScope + .async { + rotate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/scimconnection/SCIMConnection.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/scimconnection/SCIMConnection.kt index 3497320b..c5435d86 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/scimconnection/SCIMConnection.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/scimconnection/SCIMConnection.kt @@ -286,9 +286,10 @@ internal class ConnectionImpl( data: UpdateRequest, methodOptions: UpdateRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - update(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + update(data, methodOptions) + }.asCompletableFuture() override suspend fun delete( data: DeleteRequest, @@ -317,9 +318,10 @@ internal class ConnectionImpl( data: DeleteRequest, methodOptions: DeleteRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - delete(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + delete(data, methodOptions) + }.asCompletableFuture() override suspend fun rotateStart( data: RotateStartRequest, @@ -349,9 +351,10 @@ internal class ConnectionImpl( data: RotateStartRequest, methodOptions: RotateStartRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - rotateStart(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + rotateStart(data, methodOptions) + }.asCompletableFuture() override suspend fun rotateComplete( data: RotateCompleteRequest, @@ -381,9 +384,10 @@ internal class ConnectionImpl( data: RotateCompleteRequest, methodOptions: RotateCompleteRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - rotateComplete(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + rotateComplete(data, methodOptions) + }.asCompletableFuture() override suspend fun rotateCancel( data: RotateCancelRequest, @@ -413,9 +417,10 @@ internal class ConnectionImpl( data: RotateCancelRequest, methodOptions: RotateCancelRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - rotateCancel(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + rotateCancel(data, methodOptions) + }.asCompletableFuture() override suspend fun getGroups( data: GetGroupsRequest, @@ -448,9 +453,10 @@ internal class ConnectionImpl( data: GetGroupsRequest, methodOptions: GetGroupsRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - getGroups(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + getGroups(data, methodOptions) + }.asCompletableFuture() override suspend fun create( data: CreateRequest, @@ -480,9 +486,10 @@ internal class ConnectionImpl( data: CreateRequest, methodOptions: CreateRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - create(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + create(data, methodOptions) + }.asCompletableFuture() override suspend fun get( data: GetRequest, @@ -515,7 +522,8 @@ internal class ConnectionImpl( data: GetRequest, methodOptions: GetRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - get(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + get(data, methodOptions) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/sessions/Sessions.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/sessions/Sessions.kt index db30a23f..358d5bac 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/sessions/Sessions.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/sessions/Sessions.kt @@ -580,9 +580,10 @@ internal class SessionsImpl( } override fun getCompletable(data: GetRequest): CompletableFuture> = - coroutineScope.async { - get(data) - }.asCompletableFuture() + coroutineScope + .async { + get(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -602,9 +603,10 @@ internal class SessionsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() override suspend fun revoke( data: RevokeRequest, @@ -634,9 +636,10 @@ internal class SessionsImpl( data: RevokeRequest, methodOptions: RevokeRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - revoke(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + revoke(data, methodOptions) + }.asCompletableFuture() override suspend fun exchange(data: ExchangeRequest): StytchResult = withContext(Dispatchers.IO) { @@ -656,9 +659,10 @@ internal class SessionsImpl( } override fun exchangeCompletable(data: ExchangeRequest): CompletableFuture> = - coroutineScope.async { - exchange(data) - }.asCompletableFuture() + coroutineScope + .async { + exchange(data) + }.asCompletableFuture() override suspend fun exchangeAccessToken(data: ExchangeAccessTokenRequest): StytchResult = withContext(Dispatchers.IO) { @@ -680,9 +684,10 @@ internal class SessionsImpl( override fun exchangeAccessTokenCompletable( data: ExchangeAccessTokenRequest, ): CompletableFuture> = - coroutineScope.async { - exchangeAccessToken(data) - }.asCompletableFuture() + coroutineScope + .async { + exchangeAccessToken(data) + }.asCompletableFuture() override suspend fun attest(data: AttestRequest): StytchResult = withContext(Dispatchers.IO) { @@ -702,9 +707,10 @@ internal class SessionsImpl( } override fun attestCompletable(data: AttestRequest): CompletableFuture> = - coroutineScope.async { - attest(data) - }.asCompletableFuture() + coroutineScope + .async { + attest(data) + }.asCompletableFuture() override suspend fun migrate(data: MigrateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -724,9 +730,10 @@ internal class SessionsImpl( } override fun migrateCompletable(data: MigrateRequest): CompletableFuture> = - coroutineScope.async { - migrate(data) - }.asCompletableFuture() + coroutineScope + .async { + migrate(data) + }.asCompletableFuture() override suspend fun getJWKS(data: GetJWKSRequest): StytchResult = withContext(Dispatchers.IO) { @@ -749,9 +756,10 @@ internal class SessionsImpl( } override fun getJWKSCompletable(data: GetJWKSRequest): CompletableFuture> = - coroutineScope.async { - getJWKS(data) - }.asCompletableFuture() + coroutineScope + .async { + getJWKS(data) + }.asCompletableFuture() // MANUAL(authenticateJWT_impl)(SERVICE_METHOD) override suspend fun authenticateJwt( diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/sso/SSO.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/sso/SSO.kt index 4d1905d7..95931576 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/sso/SSO.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/sso/SSO.kt @@ -205,9 +205,10 @@ internal class SSOImpl( data: GetConnectionsRequest, methodOptions: GetConnectionsRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - getConnections(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + getConnections(data, methodOptions) + }.asCompletableFuture() override suspend fun deleteConnection( data: DeleteConnectionRequest, @@ -236,9 +237,10 @@ internal class SSOImpl( data: DeleteConnectionRequest, methodOptions: DeleteConnectionRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - deleteConnection(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + deleteConnection(data, methodOptions) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -258,7 +260,8 @@ internal class SSOImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssoexternal/SSOExternal.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssoexternal/SSOExternal.kt index c2fa1cd0..28e59a75 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssoexternal/SSOExternal.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssoexternal/SSOExternal.kt @@ -110,9 +110,10 @@ internal class ExternalImpl( data: CreateConnectionRequest, methodOptions: CreateConnectionRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - createConnection(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + createConnection(data, methodOptions) + }.asCompletableFuture() override suspend fun updateConnection( data: UpdateConnectionRequest, @@ -142,7 +143,8 @@ internal class ExternalImpl( data: UpdateConnectionRequest, methodOptions: UpdateConnectionRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - updateConnection(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + updateConnection(data, methodOptions) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssooidc/SSOOIDC.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssooidc/SSOOIDC.kt index f415ed74..06c146cb 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssooidc/SSOOIDC.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssooidc/SSOOIDC.kt @@ -179,9 +179,10 @@ internal class OIDCImpl( data: CreateConnectionRequest, methodOptions: CreateConnectionRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - createConnection(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + createConnection(data, methodOptions) + }.asCompletableFuture() override suspend fun updateConnection( data: UpdateConnectionRequest, @@ -211,7 +212,8 @@ internal class OIDCImpl( data: UpdateConnectionRequest, methodOptions: UpdateConnectionRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - updateConnection(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + updateConnection(data, methodOptions) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssosaml/SSOSAML.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssosaml/SSOSAML.kt index d43d91a0..c035217f 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssosaml/SSOSAML.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/ssosaml/SSOSAML.kt @@ -239,9 +239,10 @@ internal class SAMLImpl( data: CreateConnectionRequest, methodOptions: CreateConnectionRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - createConnection(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + createConnection(data, methodOptions) + }.asCompletableFuture() override suspend fun updateConnection( data: UpdateConnectionRequest, @@ -271,9 +272,10 @@ internal class SAMLImpl( data: UpdateConnectionRequest, methodOptions: UpdateConnectionRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - updateConnection(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + updateConnection(data, methodOptions) + }.asCompletableFuture() override suspend fun updateByURL( data: UpdateByURLRequest, @@ -303,9 +305,10 @@ internal class SAMLImpl( data: UpdateByURLRequest, methodOptions: UpdateByURLRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - updateByURL(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + updateByURL(data, methodOptions) + }.asCompletableFuture() override suspend fun deleteVerificationCertificate( data: DeleteVerificationCertificateRequest, @@ -337,9 +340,10 @@ internal class SAMLImpl( data: DeleteVerificationCertificateRequest, methodOptions: DeleteVerificationCertificateRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - deleteVerificationCertificate(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + deleteVerificationCertificate(data, methodOptions) + }.asCompletableFuture() override suspend fun deleteEncryptionPrivateKey( data: DeleteEncryptionPrivateKeyRequest, @@ -371,7 +375,8 @@ internal class SAMLImpl( data: DeleteEncryptionPrivateKeyRequest, methodOptions: DeleteEncryptionPrivateKeyRequestOptions?, ): CompletableFuture> = - coroutineScope.async { - deleteEncryptionPrivateKey(data, methodOptions) - }.asCompletableFuture() + coroutineScope + .async { + deleteEncryptionPrivateKey(data, methodOptions) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/totps/TOTPs.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/totps/TOTPs.kt index e0094cf9..b9b07b76 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/api/totps/TOTPs.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/totps/TOTPs.kt @@ -128,9 +128,10 @@ internal class TOTPsImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope.async { - create(data) - }.asCompletableFuture() + coroutineScope + .async { + create(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -150,9 +151,10 @@ internal class TOTPsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() override suspend fun migrate(data: MigrateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -172,7 +174,8 @@ internal class TOTPsImpl( } override fun migrateCompletable(data: MigrateRequest): CompletableFuture> = - coroutineScope.async { - migrate(data) - }.asCompletableFuture() + coroutineScope + .async { + migrate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/StytchClient.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/StytchClient.kt index 2875a223..e7d9a048 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/StytchClient.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/StytchClient.kt @@ -50,7 +50,11 @@ import kotlinx.coroutines.SupervisorJob public class StytchClient @JvmOverloads - constructor(projectId: String, secret: String, clientConfig: OptionalClientConfig = OptionalClientConfig()) { + constructor( + projectId: String, + secret: String, + clientConfig: OptionalClientConfig = OptionalClientConfig(), + ) { private val coroutineScope = CoroutineScope(SupervisorJob()) private val baseUrl = getBaseUrl(projectId, clientConfig) private val httpClient: HttpClient = diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/connectedappsclients/ConnectedAppsClients.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/connectedappsclients/ConnectedAppsClients.kt index 76e4d957..05e20ba3 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/connectedappsclients/ConnectedAppsClients.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/connectedappsclients/ConnectedAppsClients.kt @@ -170,9 +170,10 @@ internal class ClientsImpl( } override fun getCompletable(data: GetRequest): CompletableFuture> = - coroutineScope.async { - get(data) - }.asCompletableFuture() + coroutineScope + .async { + get(data) + }.asCompletableFuture() override suspend fun update(data: UpdateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -192,9 +193,10 @@ internal class ClientsImpl( } override fun updateCompletable(data: UpdateRequest): CompletableFuture> = - coroutineScope.async { - update(data) - }.asCompletableFuture() + coroutineScope + .async { + update(data) + }.asCompletableFuture() override suspend fun delete(data: DeleteRequest): StytchResult = withContext(Dispatchers.IO) { @@ -213,9 +215,10 @@ internal class ClientsImpl( } override fun deleteCompletable(data: DeleteRequest): CompletableFuture> = - coroutineScope.async { - delete(data) - }.asCompletableFuture() + coroutineScope + .async { + delete(data) + }.asCompletableFuture() override suspend fun search(data: SearchRequest): StytchResult = withContext(Dispatchers.IO) { @@ -235,9 +238,10 @@ internal class ClientsImpl( } override fun searchCompletable(data: SearchRequest): CompletableFuture> = - coroutineScope.async { - search(data) - }.asCompletableFuture() + coroutineScope + .async { + search(data) + }.asCompletableFuture() override suspend fun create(data: CreateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -257,7 +261,8 @@ internal class ClientsImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope.async { - create(data) - }.asCompletableFuture() + coroutineScope + .async { + create(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/connectedappsclientssecrets/ConnectedAppsClientsSecrets.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/connectedappsclientssecrets/ConnectedAppsClientsSecrets.kt index a40400b1..a8f4e3aa 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/connectedappsclientssecrets/ConnectedAppsClientsSecrets.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/connectedappsclientssecrets/ConnectedAppsClientsSecrets.kt @@ -137,9 +137,10 @@ internal class SecretsImpl( } override fun rotateStartCompletable(data: RotateStartRequest): CompletableFuture> = - coroutineScope.async { - rotateStart(data) - }.asCompletableFuture() + coroutineScope + .async { + rotateStart(data) + }.asCompletableFuture() override suspend fun rotateCancel(data: RotateCancelRequest): StytchResult = withContext(Dispatchers.IO) { @@ -159,9 +160,10 @@ internal class SecretsImpl( } override fun rotateCancelCompletable(data: RotateCancelRequest): CompletableFuture> = - coroutineScope.async { - rotateCancel(data) - }.asCompletableFuture() + coroutineScope + .async { + rotateCancel(data) + }.asCompletableFuture() override suspend fun rotate(data: RotateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -181,7 +183,8 @@ internal class SecretsImpl( } override fun rotateCompletable(data: RotateRequest): CompletableFuture> = - coroutineScope.async { - rotate(data) - }.asCompletableFuture() + coroutineScope + .async { + rotate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/cryptowallets/CryptoWallets.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/cryptowallets/CryptoWallets.kt index cbe81ebf..640043dc 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/cryptowallets/CryptoWallets.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/cryptowallets/CryptoWallets.kt @@ -108,9 +108,10 @@ internal class CryptoWalletsImpl( } override fun authenticateStartCompletable(data: AuthenticateStartRequest): CompletableFuture> = - coroutineScope.async { - authenticateStart(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticateStart(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -130,7 +131,8 @@ internal class CryptoWalletsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/debug/Debug.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/debug/Debug.kt index 2a32ce55..64db01b8 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/debug/Debug.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/debug/Debug.kt @@ -60,7 +60,8 @@ internal class DebugImpl( } override fun whoamiCompletable(data: WhoamiRequest): CompletableFuture> = - coroutineScope.async { - whoami(data) - }.asCompletableFuture() + coroutineScope + .async { + whoami(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudemail/FraudEmail.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudemail/FraudEmail.kt index c3f03415..077408ef 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudemail/FraudEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudemail/FraudEmail.kt @@ -82,7 +82,8 @@ internal class EmailImpl( } override fun riskCompletable(data: RiskRequest): CompletableFuture> = - coroutineScope.async { - risk(data) - }.asCompletableFuture() + coroutineScope + .async { + risk(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudfingerprint/FraudFingerprint.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudfingerprint/FraudFingerprint.kt index b4b9b024..6cb89040 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudfingerprint/FraudFingerprint.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudfingerprint/FraudFingerprint.kt @@ -115,7 +115,8 @@ internal class FingerprintImpl( } override fun lookupCompletable(data: LookupRequest): CompletableFuture> = - coroutineScope.async { - lookup(data) - }.asCompletableFuture() + coroutineScope + .async { + lookup(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudrules/FraudRules.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudrules/FraudRules.kt index b5486a3c..936aeae9 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudrules/FraudRules.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudrules/FraudRules.kt @@ -141,9 +141,10 @@ internal class RulesImpl( } override fun setCompletable(data: SetRequest): CompletableFuture> = - coroutineScope.async { - set(data) - }.asCompletableFuture() + coroutineScope + .async { + set(data) + }.asCompletableFuture() override suspend fun list(data: ListRequest): StytchResult = withContext(Dispatchers.IO) { @@ -163,7 +164,8 @@ internal class RulesImpl( } override fun listCompletable(data: ListRequest): CompletableFuture> = - coroutineScope.async { - list(data) - }.asCompletableFuture() + coroutineScope + .async { + list(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudverdictreasons/FraudVerdictReasons.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudverdictreasons/FraudVerdictReasons.kt index 20dc495f..e18a3a71 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudverdictreasons/FraudVerdictReasons.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudverdictreasons/FraudVerdictReasons.kt @@ -108,9 +108,10 @@ internal class VerdictReasonsImpl( } override fun overrideCompletable(data: OverrideRequest): CompletableFuture> = - coroutineScope.async { - override(data) - }.asCompletableFuture() + coroutineScope + .async { + override(data) + }.asCompletableFuture() override suspend fun list(data: ListRequest): StytchResult = withContext(Dispatchers.IO) { @@ -130,7 +131,8 @@ internal class VerdictReasonsImpl( } override fun listCompletable(data: ListRequest): CompletableFuture> = - coroutineScope.async { - list(data) - }.asCompletableFuture() + coroutineScope + .async { + list(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/idpoauth/IDPOAuth.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/idpoauth/IDPOAuth.kt index b293ac71..c6aee897 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/idpoauth/IDPOAuth.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/idpoauth/IDPOAuth.kt @@ -213,9 +213,10 @@ internal class OAuthImpl( } override fun authorizeStartCompletable(data: AuthorizeStartRequest): CompletableFuture> = - coroutineScope.async { - authorizeStart(data) - }.asCompletableFuture() + coroutineScope + .async { + authorizeStart(data) + }.asCompletableFuture() override suspend fun authorize(data: AuthorizeRequest): StytchResult = withContext(Dispatchers.IO) { @@ -235,7 +236,8 @@ internal class OAuthImpl( } override fun authorizeCompletable(data: AuthorizeRequest): CompletableFuture> = - coroutineScope.async { - authorize(data) - }.asCompletableFuture() + coroutineScope + .async { + authorize(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/impersonation/Impersonation.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/impersonation/Impersonation.kt index 7ea42f58..d10e1619 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/impersonation/Impersonation.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/impersonation/Impersonation.kt @@ -82,7 +82,8 @@ internal class ImpersonationImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/m2mclients/M2MClients.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/m2mclients/M2MClients.kt index 84fbdf5c..36ee778d 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/m2mclients/M2MClients.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/m2mclients/M2MClients.kt @@ -221,9 +221,10 @@ internal class ClientsImpl( } override fun getCompletable(data: GetRequest): CompletableFuture> = - coroutineScope.async { - get(data) - }.asCompletableFuture() + coroutineScope + .async { + get(data) + }.asCompletableFuture() override suspend fun search(data: SearchRequest): StytchResult = withContext(Dispatchers.IO) { @@ -243,9 +244,10 @@ internal class ClientsImpl( } override fun searchCompletable(data: SearchRequest): CompletableFuture> = - coroutineScope.async { - search(data) - }.asCompletableFuture() + coroutineScope + .async { + search(data) + }.asCompletableFuture() override suspend fun update(data: UpdateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -265,9 +267,10 @@ internal class ClientsImpl( } override fun updateCompletable(data: UpdateRequest): CompletableFuture> = - coroutineScope.async { - update(data) - }.asCompletableFuture() + coroutineScope + .async { + update(data) + }.asCompletableFuture() override suspend fun delete(data: DeleteRequest): StytchResult = withContext(Dispatchers.IO) { @@ -286,9 +289,10 @@ internal class ClientsImpl( } override fun deleteCompletable(data: DeleteRequest): CompletableFuture> = - coroutineScope.async { - delete(data) - }.asCompletableFuture() + coroutineScope + .async { + delete(data) + }.asCompletableFuture() override suspend fun create(data: CreateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -308,7 +312,8 @@ internal class ClientsImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope.async { - create(data) - }.asCompletableFuture() + coroutineScope + .async { + create(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/m2mclientssecrets/M2MClientsSecrets.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/m2mclientssecrets/M2MClientsSecrets.kt index a00de29f..1c866b93 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/m2mclientssecrets/M2MClientsSecrets.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/m2mclientssecrets/M2MClientsSecrets.kt @@ -152,9 +152,10 @@ internal class SecretsImpl( } override fun rotateStartCompletable(data: RotateStartRequest): CompletableFuture> = - coroutineScope.async { - rotateStart(data) - }.asCompletableFuture() + coroutineScope + .async { + rotateStart(data) + }.asCompletableFuture() override suspend fun rotateCancel(data: RotateCancelRequest): StytchResult = withContext(Dispatchers.IO) { @@ -174,9 +175,10 @@ internal class SecretsImpl( } override fun rotateCancelCompletable(data: RotateCancelRequest): CompletableFuture> = - coroutineScope.async { - rotateCancel(data) - }.asCompletableFuture() + coroutineScope + .async { + rotateCancel(data) + }.asCompletableFuture() override suspend fun rotate(data: RotateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -196,7 +198,8 @@ internal class SecretsImpl( } override fun rotateCompletable(data: RotateRequest): CompletableFuture> = - coroutineScope.async { - rotate(data) - }.asCompletableFuture() + coroutineScope + .async { + rotate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/magiclinks/MagicLinks.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/magiclinks/MagicLinks.kt index bb001d01..f4fae76c 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/magiclinks/MagicLinks.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/magiclinks/MagicLinks.kt @@ -120,9 +120,10 @@ internal class MagicLinksImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() override suspend fun create(data: CreateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -142,7 +143,8 @@ internal class MagicLinksImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope.async { - create(data) - }.asCompletableFuture() + coroutineScope + .async { + create(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/magiclinksemail/MagicLinksEmail.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/magiclinksemail/MagicLinksEmail.kt index c72ebefd..851a588d 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/magiclinksemail/MagicLinksEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/magiclinksemail/MagicLinksEmail.kt @@ -214,9 +214,10 @@ internal class EmailImpl( } override fun sendCompletable(data: SendRequest): CompletableFuture> = - coroutineScope.async { - send(data) - }.asCompletableFuture() + coroutineScope + .async { + send(data) + }.asCompletableFuture() override suspend fun loginOrCreate(data: LoginOrCreateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -236,9 +237,10 @@ internal class EmailImpl( } override fun loginOrCreateCompletable(data: LoginOrCreateRequest): CompletableFuture> = - coroutineScope.async { - loginOrCreate(data) - }.asCompletableFuture() + coroutineScope + .async { + loginOrCreate(data) + }.asCompletableFuture() override suspend fun invite(data: InviteRequest): StytchResult = withContext(Dispatchers.IO) { @@ -258,9 +260,10 @@ internal class EmailImpl( } override fun inviteCompletable(data: InviteRequest): CompletableFuture> = - coroutineScope.async { - invite(data) - }.asCompletableFuture() + coroutineScope + .async { + invite(data) + }.asCompletableFuture() override suspend fun revokeInvite(data: RevokeInviteRequest): StytchResult = withContext(Dispatchers.IO) { @@ -280,7 +283,8 @@ internal class EmailImpl( } override fun revokeInviteCompletable(data: RevokeInviteRequest): CompletableFuture> = - coroutineScope.async { - revokeInvite(data) - }.asCompletableFuture() + coroutineScope + .async { + revokeInvite(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/oauth/OAuth.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/oauth/OAuth.kt index 92bd6ab4..5a4d0c9e 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/oauth/OAuth.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/oauth/OAuth.kt @@ -126,9 +126,10 @@ internal class OAuthImpl( } override fun attachCompletable(data: AttachRequest): CompletableFuture> = - coroutineScope.async { - attach(data) - }.asCompletableFuture() + coroutineScope + .async { + attach(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -148,7 +149,8 @@ internal class OAuthImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/otp/OTP.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/otp/OTP.kt index e57f564e..5143e70f 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/otp/OTP.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/otp/OTP.kt @@ -89,7 +89,8 @@ internal class OTPsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpemail/OTPEmail.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpemail/OTPEmail.kt index a334c11c..822fbee0 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpemail/OTPEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpemail/OTPEmail.kt @@ -138,9 +138,10 @@ internal class EmailImpl( } override fun sendCompletable(data: SendRequest): CompletableFuture> = - coroutineScope.async { - send(data) - }.asCompletableFuture() + coroutineScope + .async { + send(data) + }.asCompletableFuture() override suspend fun loginOrCreate(data: LoginOrCreateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -160,7 +161,8 @@ internal class EmailImpl( } override fun loginOrCreateCompletable(data: LoginOrCreateRequest): CompletableFuture> = - coroutineScope.async { - loginOrCreate(data) - }.asCompletableFuture() + coroutineScope + .async { + loginOrCreate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpsms/OTPSms.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpsms/OTPSms.kt index 586fd8a3..0260dfdf 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpsms/OTPSms.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpsms/OTPSms.kt @@ -234,9 +234,10 @@ internal class SmsImpl( } override fun sendCompletable(data: SendRequest): CompletableFuture> = - coroutineScope.async { - send(data) - }.asCompletableFuture() + coroutineScope + .async { + send(data) + }.asCompletableFuture() override suspend fun loginOrCreate(data: LoginOrCreateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -256,7 +257,8 @@ internal class SmsImpl( } override fun loginOrCreateCompletable(data: LoginOrCreateRequest): CompletableFuture> = - coroutineScope.async { - loginOrCreate(data) - }.asCompletableFuture() + coroutineScope + .async { + loginOrCreate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpwhatsapp/OTPWhatsApp.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpwhatsapp/OTPWhatsApp.kt index ecddd5c2..ff60c334 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpwhatsapp/OTPWhatsApp.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/otpwhatsapp/OTPWhatsApp.kt @@ -180,9 +180,10 @@ internal class WhatsAppImpl( } override fun sendCompletable(data: SendRequest): CompletableFuture> = - coroutineScope.async { - send(data) - }.asCompletableFuture() + coroutineScope + .async { + send(data) + }.asCompletableFuture() override suspend fun loginOrCreate(data: LoginOrCreateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -202,7 +203,8 @@ internal class WhatsAppImpl( } override fun loginOrCreateCompletable(data: LoginOrCreateRequest): CompletableFuture> = - coroutineScope.async { - loginOrCreate(data) - }.asCompletableFuture() + coroutineScope + .async { + loginOrCreate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwords/Passwords.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwords/Passwords.kt index 9d4220cb..207ca181 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwords/Passwords.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwords/Passwords.kt @@ -293,9 +293,10 @@ internal class PasswordsImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope.async { - create(data) - }.asCompletableFuture() + coroutineScope + .async { + create(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -315,9 +316,10 @@ internal class PasswordsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() override suspend fun strengthCheck(data: StrengthCheckRequest): StytchResult = withContext(Dispatchers.IO) { @@ -337,9 +339,10 @@ internal class PasswordsImpl( } override fun strengthCheckCompletable(data: StrengthCheckRequest): CompletableFuture> = - coroutineScope.async { - strengthCheck(data) - }.asCompletableFuture() + coroutineScope + .async { + strengthCheck(data) + }.asCompletableFuture() override suspend fun migrate(data: MigrateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -359,7 +362,8 @@ internal class PasswordsImpl( } override fun migrateCompletable(data: MigrateRequest): CompletableFuture> = - coroutineScope.async { - migrate(data) - }.asCompletableFuture() + coroutineScope + .async { + migrate(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordsemail/PasswordsEmail.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordsemail/PasswordsEmail.kt index 5dca5fb1..3c0f8fc1 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordsemail/PasswordsEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordsemail/PasswordsEmail.kt @@ -111,9 +111,10 @@ internal class EmailImpl( } override fun resetStartCompletable(data: ResetStartRequest): CompletableFuture> = - coroutineScope.async { - resetStart(data) - }.asCompletableFuture() + coroutineScope + .async { + resetStart(data) + }.asCompletableFuture() override suspend fun reset(data: ResetRequest): StytchResult = withContext(Dispatchers.IO) { @@ -133,7 +134,8 @@ internal class EmailImpl( } override fun resetCompletable(data: ResetRequest): CompletableFuture> = - coroutineScope.async { - reset(data) - }.asCompletableFuture() + coroutineScope + .async { + reset(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordsexistingpassword/PasswordsExistingPassword.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordsexistingpassword/PasswordsExistingPassword.kt index d9b9d1af..252e2b81 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordsexistingpassword/PasswordsExistingPassword.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordsexistingpassword/PasswordsExistingPassword.kt @@ -70,7 +70,8 @@ internal class ExistingPasswordImpl( } override fun resetCompletable(data: ResetRequest): CompletableFuture> = - coroutineScope.async { - reset(data) - }.asCompletableFuture() + coroutineScope + .async { + reset(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordssession/PasswordsSession.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordssession/PasswordsSession.kt index f9c16969..e11cf092 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordssession/PasswordsSession.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/passwordssession/PasswordsSession.kt @@ -79,7 +79,8 @@ internal class SessionsImpl( } override fun resetCompletable(data: ResetRequest): CompletableFuture> = - coroutineScope.async { - reset(data) - }.asCompletableFuture() + coroutineScope + .async { + reset(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/project/Project.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/project/Project.kt index 9a7d54d6..6df7fa3a 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/project/Project.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/project/Project.kt @@ -60,7 +60,8 @@ internal class ProjectImpl( } override fun metricsCompletable(data: MetricsRequest): CompletableFuture> = - coroutineScope.async { - metrics(data) - }.asCompletableFuture() + coroutineScope + .async { + metrics(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/rbac/RBAC.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/rbac/RBAC.kt index d4a99f1a..83800dde 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/rbac/RBAC.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/rbac/RBAC.kt @@ -111,7 +111,8 @@ internal class RBACImpl( } override fun policyCompletable(data: PolicyRequest): CompletableFuture> = - coroutineScope.async { - policy(data) - }.asCompletableFuture() + coroutineScope + .async { + policy(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/sessions/Sessions.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/sessions/Sessions.kt index 261889e4..d36b611b 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/sessions/Sessions.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/sessions/Sessions.kt @@ -430,9 +430,10 @@ internal class SessionsImpl( } override fun getCompletable(data: GetRequest): CompletableFuture> = - coroutineScope.async { - get(data) - }.asCompletableFuture() + coroutineScope + .async { + get(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -452,9 +453,10 @@ internal class SessionsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() override suspend fun revoke(data: RevokeRequest): StytchResult = withContext(Dispatchers.IO) { @@ -474,9 +476,10 @@ internal class SessionsImpl( } override fun revokeCompletable(data: RevokeRequest): CompletableFuture> = - coroutineScope.async { - revoke(data) - }.asCompletableFuture() + coroutineScope + .async { + revoke(data) + }.asCompletableFuture() override suspend fun migrate(data: MigrateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -496,9 +499,10 @@ internal class SessionsImpl( } override fun migrateCompletable(data: MigrateRequest): CompletableFuture> = - coroutineScope.async { - migrate(data) - }.asCompletableFuture() + coroutineScope + .async { + migrate(data) + }.asCompletableFuture() override suspend fun exchangeAccessToken(data: ExchangeAccessTokenRequest): StytchResult = withContext(Dispatchers.IO) { @@ -520,9 +524,10 @@ internal class SessionsImpl( override fun exchangeAccessTokenCompletable( data: ExchangeAccessTokenRequest, ): CompletableFuture> = - coroutineScope.async { - exchangeAccessToken(data) - }.asCompletableFuture() + coroutineScope + .async { + exchangeAccessToken(data) + }.asCompletableFuture() override suspend fun getJWKS(data: GetJWKSRequest): StytchResult = withContext(Dispatchers.IO) { @@ -545,9 +550,10 @@ internal class SessionsImpl( } override fun getJWKSCompletable(data: GetJWKSRequest): CompletableFuture> = - coroutineScope.async { - getJWKS(data) - }.asCompletableFuture() + coroutineScope + .async { + getJWKS(data) + }.asCompletableFuture() override suspend fun attest(data: AttestRequest): StytchResult = withContext(Dispatchers.IO) { @@ -567,9 +573,10 @@ internal class SessionsImpl( } override fun attestCompletable(data: AttestRequest): CompletableFuture> = - coroutineScope.async { - attest(data) - }.asCompletableFuture() + coroutineScope + .async { + attest(data) + }.asCompletableFuture() // MANUAL(authenticateJWT_impl)(SERVICE_METHOD) override suspend fun authenticateJwt( diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/totps/TOTPs.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/totps/TOTPs.kt index ec1db76f..79deec54 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/totps/TOTPs.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/totps/TOTPs.kt @@ -127,9 +127,10 @@ internal class TOTPsImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope.async { - create(data) - }.asCompletableFuture() + coroutineScope + .async { + create(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -149,9 +150,10 @@ internal class TOTPsImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() override suspend fun recoveryCodes(data: RecoveryCodesRequest): StytchResult = withContext(Dispatchers.IO) { @@ -171,9 +173,10 @@ internal class TOTPsImpl( } override fun recoveryCodesCompletable(data: RecoveryCodesRequest): CompletableFuture> = - coroutineScope.async { - recoveryCodes(data) - }.asCompletableFuture() + coroutineScope + .async { + recoveryCodes(data) + }.asCompletableFuture() override suspend fun recover(data: RecoverRequest): StytchResult = withContext(Dispatchers.IO) { @@ -193,7 +196,8 @@ internal class TOTPsImpl( } override fun recoverCompletable(data: RecoverRequest): CompletableFuture> = - coroutineScope.async { - recover(data) - }.asCompletableFuture() + coroutineScope + .async { + recover(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/users/Users.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/users/Users.kt index 1d8bf60c..4baaa038 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/users/Users.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/users/Users.kt @@ -497,9 +497,10 @@ internal class UsersImpl( } override fun createCompletable(data: CreateRequest): CompletableFuture> = - coroutineScope.async { - create(data) - }.asCompletableFuture() + coroutineScope + .async { + create(data) + }.asCompletableFuture() override suspend fun get(data: GetRequest): StytchResult = withContext(Dispatchers.IO) { @@ -522,9 +523,10 @@ internal class UsersImpl( } override fun getCompletable(data: GetRequest): CompletableFuture> = - coroutineScope.async { - get(data) - }.asCompletableFuture() + coroutineScope + .async { + get(data) + }.asCompletableFuture() override suspend fun search(data: SearchRequest): StytchResult = withContext(Dispatchers.IO) { @@ -544,9 +546,10 @@ internal class UsersImpl( } override fun searchCompletable(data: SearchRequest): CompletableFuture> = - coroutineScope.async { - search(data) - }.asCompletableFuture() + coroutineScope + .async { + search(data) + }.asCompletableFuture() override suspend fun update(data: UpdateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -566,9 +569,10 @@ internal class UsersImpl( } override fun updateCompletable(data: UpdateRequest): CompletableFuture> = - coroutineScope.async { - update(data) - }.asCompletableFuture() + coroutineScope + .async { + update(data) + }.asCompletableFuture() override suspend fun exchangePrimaryFactor(data: ExchangePrimaryFactorRequest): StytchResult = withContext(Dispatchers.IO) { @@ -590,9 +594,10 @@ internal class UsersImpl( override fun exchangePrimaryFactorCompletable( data: ExchangePrimaryFactorRequest, ): CompletableFuture> = - coroutineScope.async { - exchangePrimaryFactor(data) - }.asCompletableFuture() + coroutineScope + .async { + exchangePrimaryFactor(data) + }.asCompletableFuture() override suspend fun delete(data: DeleteRequest): StytchResult = withContext(Dispatchers.IO) { @@ -611,9 +616,10 @@ internal class UsersImpl( } override fun deleteCompletable(data: DeleteRequest): CompletableFuture> = - coroutineScope.async { - delete(data) - }.asCompletableFuture() + coroutineScope + .async { + delete(data) + }.asCompletableFuture() override suspend fun deleteEmail(data: DeleteEmailRequest): StytchResult = withContext(Dispatchers.IO) { @@ -632,9 +638,10 @@ internal class UsersImpl( } override fun deleteEmailCompletable(data: DeleteEmailRequest): CompletableFuture> = - coroutineScope.async { - deleteEmail(data) - }.asCompletableFuture() + coroutineScope + .async { + deleteEmail(data) + }.asCompletableFuture() override suspend fun deletePhoneNumber(data: DeletePhoneNumberRequest): StytchResult = withContext(Dispatchers.IO) { @@ -653,9 +660,10 @@ internal class UsersImpl( } override fun deletePhoneNumberCompletable(data: DeletePhoneNumberRequest): CompletableFuture> = - coroutineScope.async { - deletePhoneNumber(data) - }.asCompletableFuture() + coroutineScope + .async { + deletePhoneNumber(data) + }.asCompletableFuture() override suspend fun deleteWebAuthnRegistration( data: DeleteWebAuthnRegistrationRequest, @@ -678,9 +686,10 @@ internal class UsersImpl( override fun deleteWebAuthnRegistrationCompletable( data: DeleteWebAuthnRegistrationRequest, ): CompletableFuture> = - coroutineScope.async { - deleteWebAuthnRegistration(data) - }.asCompletableFuture() + coroutineScope + .async { + deleteWebAuthnRegistration(data) + }.asCompletableFuture() override suspend fun deleteBiometricRegistration( data: DeleteBiometricRegistrationRequest, @@ -703,9 +712,10 @@ internal class UsersImpl( override fun deleteBiometricRegistrationCompletable( data: DeleteBiometricRegistrationRequest, ): CompletableFuture> = - coroutineScope.async { - deleteBiometricRegistration(data) - }.asCompletableFuture() + coroutineScope + .async { + deleteBiometricRegistration(data) + }.asCompletableFuture() override suspend fun deleteTOTP(data: DeleteTOTPRequest): StytchResult = withContext(Dispatchers.IO) { @@ -724,9 +734,10 @@ internal class UsersImpl( } override fun deleteTOTPCompletable(data: DeleteTOTPRequest): CompletableFuture> = - coroutineScope.async { - deleteTOTP(data) - }.asCompletableFuture() + coroutineScope + .async { + deleteTOTP(data) + }.asCompletableFuture() override suspend fun deleteCryptoWallet(data: DeleteCryptoWalletRequest): StytchResult = withContext(Dispatchers.IO) { @@ -747,9 +758,10 @@ internal class UsersImpl( override fun deleteCryptoWalletCompletable( data: DeleteCryptoWalletRequest, ): CompletableFuture> = - coroutineScope.async { - deleteCryptoWallet(data) - }.asCompletableFuture() + coroutineScope + .async { + deleteCryptoWallet(data) + }.asCompletableFuture() override suspend fun deletePassword(data: DeletePasswordRequest): StytchResult = withContext(Dispatchers.IO) { @@ -768,9 +780,10 @@ internal class UsersImpl( } override fun deletePasswordCompletable(data: DeletePasswordRequest): CompletableFuture> = - coroutineScope.async { - deletePassword(data) - }.asCompletableFuture() + coroutineScope + .async { + deletePassword(data) + }.asCompletableFuture() override suspend fun deleteOAuthRegistration(data: DeleteOAuthRegistrationRequest): StytchResult = withContext(Dispatchers.IO) { @@ -791,9 +804,10 @@ internal class UsersImpl( override fun deleteOAuthRegistrationCompletable( data: DeleteOAuthRegistrationRequest, ): CompletableFuture> = - coroutineScope.async { - deleteOAuthRegistration(data) - }.asCompletableFuture() + coroutineScope + .async { + deleteOAuthRegistration(data) + }.asCompletableFuture() override suspend fun deleteExternalId(data: DeleteExternalIdRequest): StytchResult = withContext(Dispatchers.IO) { @@ -812,9 +826,10 @@ internal class UsersImpl( } override fun deleteExternalIdCompletable(data: DeleteExternalIdRequest): CompletableFuture> = - coroutineScope.async { - deleteExternalId(data) - }.asCompletableFuture() + coroutineScope + .async { + deleteExternalId(data) + }.asCompletableFuture() override suspend fun connectedApps(data: ConnectedAppsRequest): StytchResult = withContext(Dispatchers.IO) { @@ -837,9 +852,10 @@ internal class UsersImpl( } override fun connectedAppsCompletable(data: ConnectedAppsRequest): CompletableFuture> = - coroutineScope.async { - connectedApps(data) - }.asCompletableFuture() + coroutineScope + .async { + connectedApps(data) + }.asCompletableFuture() override suspend fun revoke(data: RevokeRequest): StytchResult = withContext(Dispatchers.IO) { @@ -859,7 +875,8 @@ internal class UsersImpl( } override fun revokeCompletable(data: RevokeRequest): CompletableFuture> = - coroutineScope.async { - revoke(data) - }.asCompletableFuture() + coroutineScope + .async { + revoke(data) + }.asCompletableFuture() } diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/api/webauthn/WebAuthn.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/webauthn/WebAuthn.kt index ff712fa9..380aab87 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/api/webauthn/WebAuthn.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/api/webauthn/WebAuthn.kt @@ -283,9 +283,10 @@ internal class WebAuthnImpl( } override fun registerStartCompletable(data: RegisterStartRequest): CompletableFuture> = - coroutineScope.async { - registerStart(data) - }.asCompletableFuture() + coroutineScope + .async { + registerStart(data) + }.asCompletableFuture() override suspend fun register(data: RegisterRequest): StytchResult = withContext(Dispatchers.IO) { @@ -305,9 +306,10 @@ internal class WebAuthnImpl( } override fun registerCompletable(data: RegisterRequest): CompletableFuture> = - coroutineScope.async { - register(data) - }.asCompletableFuture() + coroutineScope + .async { + register(data) + }.asCompletableFuture() override suspend fun authenticateStart(data: AuthenticateStartRequest): StytchResult = withContext(Dispatchers.IO) { @@ -327,9 +329,10 @@ internal class WebAuthnImpl( } override fun authenticateStartCompletable(data: AuthenticateStartRequest): CompletableFuture> = - coroutineScope.async { - authenticateStart(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticateStart(data) + }.asCompletableFuture() override suspend fun authenticate(data: AuthenticateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -349,9 +352,10 @@ internal class WebAuthnImpl( } override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> = - coroutineScope.async { - authenticate(data) - }.asCompletableFuture() + coroutineScope + .async { + authenticate(data) + }.asCompletableFuture() override suspend fun update(data: UpdateRequest): StytchResult = withContext(Dispatchers.IO) { @@ -371,9 +375,10 @@ internal class WebAuthnImpl( } override fun updateCompletable(data: UpdateRequest): CompletableFuture> = - coroutineScope.async { - update(data) - }.asCompletableFuture() + coroutineScope + .async { + update(data) + }.asCompletableFuture() override suspend fun listCredentials(data: ListCredentialsRequest): StytchResult = withContext(Dispatchers.IO) { @@ -396,7 +401,8 @@ internal class WebAuthnImpl( } override fun listCredentialsCompletable(data: ListCredentialsRequest): CompletableFuture> = - coroutineScope.async { - listCredentials(data) - }.asCompletableFuture() + coroutineScope + .async { + listCredentials(data) + }.asCompletableFuture() }