From 8d3157aee39a4d991718b0daa0ec4714855202df Mon Sep 17 00:00:00 2001 From: Stytch Codegen Bot Date: Thu, 16 Apr 2026 17:15:05 +0000 Subject: [PATCH] Documentation updates --- .../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 | 38 +++- .../b2b/api/recoverycodes/RecoveryCodes.kt | 21 +- .../b2b/api/scimconnection/SCIMConnection.kt | 56 ++--- .../stytch/java/b2b/api/sessions/Sessions.kt | 65 ++---- .../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 +- .../DiscoveryIntermediateSessions.kt | 2 +- .../DiscoveryOrganizations.kt | 10 +- .../java/b2b/models/magiclinks/MagicLinks.kt | 2 +- .../models/magiclinksemail/MagicLinksEmail.kt | 18 +- .../MagicLinksEmailDiscovery.kt | 8 +- .../com/stytch/java/b2b/models/oauth/OAuth.kt | 2 +- .../b2b/models/organizations/Organizations.kt | 32 +++ .../OrganizationsMembers.kt | 8 +- .../java/b2b/models/otpemail/OTPEmail.kt | 14 +- .../otpemaildiscovery/OTPEmailDiscovery.kt | 7 +- .../stytch/java/b2b/models/otpsms/OTPSms.kt | 2 +- .../java/b2b/models/passwords/Passwords.kt | 10 +- .../PasswordsDiscoveryEmail.kt | 23 +- .../models/passwordsemail/PasswordsEmail.kt | 25 +- .../PasswordsExistingPassword.kt | 2 +- .../passwordssession/PasswordsSession.kt | 2 +- .../com/stytch/java/b2b/models/rbac/RBAC.kt | 32 +++ .../com/stytch/java/b2b/models/scim/SCIM.kt | 128 +++++++++++ .../models/scimconnection/SCIMConnection.kt | 18 +- .../java/b2b/models/sessions/Sessions.kt | 2 +- .../com/stytch/java/b2b/models/sso/SSO.kt | 213 +++++++++++++++++- .../b2b/models/ssoexternal/SSOExternal.kt | 8 +- .../stytch/java/b2b/models/ssooidc/SSOOIDC.kt | 6 +- .../stytch/java/b2b/models/ssosaml/SSOSAML.kt | 9 +- .../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 +- .../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 | 53 ++--- .../m2mclientssecrets/M2MClientsSecrets.kt | 21 +- .../consumer/api/magiclinks/MagicLinks.kt | 107 ++++++--- .../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 | 58 ++--- .../stytch/java/consumer/api/totps/TOTPs.kt | 28 +-- .../stytch/java/consumer/api/users/Users.kt | 119 +++++----- .../java/consumer/api/webauthn/WebAuthn.kt | 138 ++++++------ .../models/magiclinksemail/MagicLinksEmail.kt | 31 +-- .../java/consumer/models/otpemail/OTPEmail.kt | 24 +- .../java/consumer/models/otpsms/OTPSms.kt | 4 +- .../models/otpwhatsapp/OTPWhatsApp.kt | 4 +- .../consumer/models/passwords/Passwords.kt | 10 +- .../models/passwordsemail/PasswordsEmail.kt | 18 +- .../stytch/java/consumer/models/rbac/RBAC.kt | 23 ++ .../java/consumer/models/users/Users.kt | 17 ++ .../java/consumer/models/webauthn/WebAuthn.kt | 8 + version.gradle.kts | 2 +- 99 files changed, 1291 insertions(+), 984 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 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..053a5370 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 @@ -26,6 +26,10 @@ import java.util.concurrent.CompletableFuture public interface Organizations { /** + * + * The organization RBAC policy feature is currently in private beta and must be enabled for your Workspace. Please + * contact Stytch support at support@stytch.com to request access. + * * Get the active RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy contains * the roles that have been defined specifically for that organization, allowing for organization-specific permissioning * models. @@ -46,6 +50,10 @@ public interface Organizations { public suspend fun getOrgPolicy(data: GetOrgPolicyRequest): StytchResult /** + * + * The organization RBAC policy feature is currently in private beta and must be enabled for your Workspace. Please + * contact Stytch support at support@stytch.com to request access. + * * Get the active RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy contains * the roles that have been defined specifically for that organization, allowing for organization-specific permissioning * models. @@ -69,6 +77,10 @@ public interface Organizations { ) /** + * + * The organization RBAC policy feature is currently in private beta and must be enabled for your Workspace. Please + * contact Stytch support at support@stytch.com to request access. + * * Get the active RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy contains * the roles that have been defined specifically for that organization, allowing for organization-specific permissioning * models. @@ -89,6 +101,10 @@ public interface Organizations { public fun getOrgPolicyCompletable(data: GetOrgPolicyRequest): CompletableFuture> /** + * + * The organization RBAC policy feature is currently in private beta and must be enabled for your Workspace. Please + * contact Stytch support at support@stytch.com to request access. + * * Set the RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy allows you to * define roles that are specific to that organization, providing fine-grained control over permissions at the * organization level. @@ -117,6 +133,10 @@ public interface Organizations { public suspend fun setOrgPolicy(data: SetOrgPolicyRequest): StytchResult /** + * + * The organization RBAC policy feature is currently in private beta and must be enabled for your Workspace. Please + * contact Stytch support at support@stytch.com to request access. + * * Set the RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy allows you to * define roles that are specific to that organization, providing fine-grained control over permissions at the * organization level. @@ -148,6 +168,10 @@ public interface Organizations { ) /** + * + * The organization RBAC policy feature is currently in private beta and must be enabled for your Workspace. Please + * contact Stytch support at support@stytch.com to request access. + * * Set the RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy allows you to * define roles that are specific to that organization, providing fine-grained control over permissions at the * organization level. @@ -203,10 +227,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 +249,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..3663cb3a 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 @@ -270,9 +270,6 @@ public interface Sessions { * The Access Token must contain the `full_access` scope (only available to First Party clients) and must not be more than * 5 minutes old. Access Tokens may only be exchanged a single time. * - * The Member Session returned will be the same Member Session that was active in your application (the authorizing party) - * during the initial authorization flow. - * * Because the Member previously completed MFA and satisfied all Organization authentication requirements at the time of * the original Access Token issuance, this endpoint will never return an `intermediate_session_token` or require MFA. */ @@ -285,9 +282,6 @@ public interface Sessions { * The Access Token must contain the `full_access` scope (only available to First Party clients) and must not be more than * 5 minutes old. Access Tokens may only be exchanged a single time. * - * The Member Session returned will be the same Member Session that was active in your application (the authorizing party) - * during the initial authorization flow. - * * Because the Member previously completed MFA and satisfied all Organization authentication requirements at the time of * the original Access Token issuance, this endpoint will never return an `intermediate_session_token` or require MFA. */ @@ -303,9 +297,6 @@ public interface Sessions { * The Access Token must contain the `full_access` scope (only available to First Party clients) and must not be more than * 5 minutes old. Access Tokens may only be exchanged a single time. * - * The Member Session returned will be the same Member Session that was active in your application (the authorizing party) - * during the initial authorization flow. - * * Because the Member previously completed MFA and satisfied all Organization authentication requirements at the time of * the original Access Token issuance, this endpoint will never return an `intermediate_session_token` or require MFA. */ @@ -580,10 +571,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 +593,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 +625,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 +647,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 +671,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 +693,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 +715,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 +740,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/b2b/models/discoveryintermediatesessions/DiscoveryIntermediateSessions.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/discoveryintermediatesessions/DiscoveryIntermediateSessions.kt index 69dc793e..23063d12 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/discoveryintermediatesessions/DiscoveryIntermediateSessions.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/discoveryintermediatesessions/DiscoveryIntermediateSessions.kt @@ -103,7 +103,7 @@ public data class ExchangeRequest * one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to * use when sending the passcode. * - * Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + * Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value * is provided, the copy defaults to English. diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/discoveryorganizations/DiscoveryOrganizations.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/discoveryorganizations/DiscoveryOrganizations.kt index 84060626..be2feca0 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/discoveryorganizations/DiscoveryOrganizations.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/discoveryorganizations/DiscoveryOrganizations.kt @@ -418,6 +418,11 @@ public data class CreateResponse */ @Json(name = "member") val member: Member, + /** + * The [Organization object](https://stytch.com/docs/b2b/api/organization-object). + */ + @Json(name = "organization") + val organization: Organization, /** * Indicates whether the Member is fully authenticated. If false, the Member needs to complete an MFA step to log in to * the Organization. @@ -449,11 +454,6 @@ public data class CreateResponse */ @Json(name = "member_session") val memberSession: MemberSession? = null, - /** - * The [Organization object](https://stytch.com/docs/b2b/api/organization-object). - */ - @Json(name = "organization") - val organization: Organization? = null, /** * Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA. */ diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/magiclinks/MagicLinks.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/magiclinks/MagicLinks.kt index fd01c735..bd746309 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/magiclinks/MagicLinks.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/magiclinks/MagicLinks.kt @@ -98,7 +98,7 @@ public data class AuthenticateRequest * one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to * use when sending the passcode. * - * Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + * Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value * is provided, the copy defaults to English. diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/magiclinksemail/MagicLinksEmail.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/magiclinksemail/MagicLinksEmail.kt index 1da28bb0..915f24d1 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/magiclinksemail/MagicLinksEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/magiclinksemail/MagicLinksEmail.kt @@ -113,14 +113,14 @@ public data class InviteRequest @Json(name = "untrusted_metadata") val untrustedMetadata: Map? = emptyMap(), /** - * Use a custom template for invite emails. By default, it will use your default email template. The template must be a - * template - * using our built-in customizations or a custom HTML email for Magic Links - Invite. + * Use a custom template for invite emails. By default, it will use your default email template. Templates can be added in + * the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML + * templates with type “Magic Links - Invite”. */ @Json(name = "invite_template_id") val inviteTemplateId: String? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese @@ -227,21 +227,21 @@ public data class LoginOrSignupRequest @Json(name = "pkce_code_challenge") val pkceCodeChallenge: String? = null, /** - * Use a custom template for login emails. By default, it will use your default email template. The template must be from - * Stytch's - * built-in customizations or a custom HTML email for Magic Links - Login. + * Use a custom template for login emails. By default, it will use your default email template. Templates can be added in + * the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML + * templates with type “Magic Links - Login”. */ @Json(name = "login_template_id") val loginTemplateId: String? = null, /** * Use a custom template for signup emails. By default, it will use your default email template. The template must be from * Stytch's - * built-in customizations or a custom HTML email for Magic Links - Signup. + * built-in customizations or a custom HTML email for “Magic Links - Signup”. */ @Json(name = "signup_template_id") val signupTemplateId: String? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/magiclinksemaildiscovery/MagicLinksEmailDiscovery.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/magiclinksemaildiscovery/MagicLinksEmailDiscovery.kt index 258d24c5..ab9fd6a7 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/magiclinksemaildiscovery/MagicLinksEmailDiscovery.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/magiclinksemaildiscovery/MagicLinksEmailDiscovery.kt @@ -53,14 +53,14 @@ public data class SendRequest @Json(name = "pkce_code_challenge") val pkceCodeChallenge: String? = null, /** - * Use a custom template for discovery emails. By default, it will use your default email template. The template must be - * from Stytch's - * built-in customizations or a custom HTML email for Magic Links - Login. + * Use a custom template for discovery emails. By default, it will use your default email template. Templates can be added + * in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom + * HTML templates with type “Magic Links - Login”. */ @Json(name = "login_template_id") val loginTemplateId: String? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/oauth/OAuth.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/oauth/OAuth.kt index 488ebff8..a460b825 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/oauth/OAuth.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/oauth/OAuth.kt @@ -134,7 +134,7 @@ public data class AuthenticateRequest * one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to * use when sending the passcode. * - * Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + * Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value * is provided, the copy defaults to English. diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/organizations/Organizations.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/organizations/Organizations.kt index b6c2a1a4..fed87ecf 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/organizations/Organizations.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/organizations/Organizations.kt @@ -380,6 +380,9 @@ public data class Member */ @Json(name = "is_admin") val isAdmin: Boolean, + /** + * Globally unique UUID that identifies a TOTP instance. + */ @Json(name = "totp_registration_id") val totpRegistrationId: String, /** @@ -398,6 +401,10 @@ public data class Member */ @Json(name = "retired_email_addresses") val retiredEmailAddresses: List, + /** + * Whether the Member is temporarily locked due to too many failed authentication attempts. See the + * [User Locking Guide](https://stytch.com/docs/resources/platform/user-locks) for more information. + */ @Json(name = "is_locked") val isLocked: Boolean, /** @@ -413,6 +420,10 @@ public data class Member */ @Json(name = "mfa_phone_number") val mfaPhoneNumber: String, + /** + * The Member's default MFA method. This value is used to determine which secondary MFA method to use in the case of + * multiple methods registered for a Member. The current possible values are `sms_otp` and `totp`. + */ @Json(name = "default_mfa_method") val defaultMfaMethod: String, /** @@ -458,8 +469,16 @@ public data class Member */ @Json(name = "external_id") val externalId: String? = null, + /** + * When the member lock was created, if there is one. Values conform to the RFC 3339 standard and are expressed in UTC, + * e.g. `2021-12-29T12:33:09Z`. + */ @Json(name = "lock_created_at") val lockCreatedAt: Instant? = null, + /** + * When the member lock expires, if there is one. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. + * `2021-12-29T12:33:09Z`. + */ @Json(name = "lock_expires_at") val lockExpiresAt: Instant? = null, ) @@ -791,6 +810,16 @@ public data class Organization */ @Json(name = "allowed_auth_methods") val allowedAuthMethods: List, + /** + * The setting that controls the MFA policy for all Members in the Organization. The accepted values are: + * + * `REQUIRED_FOR_ALL` – All Members within the Organization will be required to complete MFA every time they wish to log + * in. However, any active Session that existed prior to this setting change will remain valid. + * + * `OPTIONAL` – The default value. The Organization does not require MFA by default for all Members. Members will be + * required to complete MFA only if their `mfa_enrolled` status is set to true. + * + */ @Json(name = "mfa_policy") val mfaPolicy: String, /** @@ -831,6 +860,9 @@ public data class Organization */ @Json(name = "oauth_tenant_jit_provisioning") val oauthTenantJITProvisioning: String, + /** + * A list of email domains that are claimed by the Organization. + */ @Json(name = "claimed_email_domains") val claimedEmailDomains: List, /** diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/organizationsmembers/OrganizationsMembers.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/organizationsmembers/OrganizationsMembers.kt index 008f7420..9a7b2d55 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/organizationsmembers/OrganizationsMembers.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/organizationsmembers/OrganizationsMembers.kt @@ -982,7 +982,7 @@ public data class StartEmailUpdateRequest @Json(name = "login_redirect_url") val loginRedirectURL: String? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese @@ -995,9 +995,9 @@ public data class StartEmailUpdateRequest @Json(name = "locale") val locale: StartEmailUpdateRequestLocale? = null, /** - * Use a custom template for login emails. By default, it will use your default email template. The template must be from - * Stytch's - * built-in customizations or a custom HTML email for Magic Links - Login. + * Use a custom template for login emails. By default, it will use your default email template. Templates can be added in + * the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML + * templates with type “Magic Links - Login”. */ @Json(name = "login_template_id") val loginTemplateId: String? = null, diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/otpemail/OTPEmail.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/otpemail/OTPEmail.kt index 7110d34d..9b721991 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/otpemail/OTPEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/otpemail/OTPEmail.kt @@ -122,7 +122,7 @@ public data class AuthenticateRequest @Json(name = "session_custom_claims") val sessionCustomClaims: Map? = emptyMap(), /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese @@ -259,19 +259,21 @@ public data class LoginOrSignupRequest @Json(name = "email_address") val emailAddress: String, /** - * Use a custom template for login emails. By default, it will use your default email template. The template must be a - * template using our built-in customizations or a custom HTML email for OTP - Login. + * Use a custom template for login emails. By default, it will use your default email template. Templates can be added in + * the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML + * templates with type “OTP - Login”. */ @Json(name = "login_template_id") val loginTemplateId: String? = null, /** - * Use a custom template for signup emails. By default, it will use your default email template. The template must be a - * template using our built-in customizations or a custom HTML email for OTP - Signup. + * Use a custom template for signup emails. By default, it will use your default email template. Templates can be added in + * the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML + * templates with type “OTP - Signup”. */ @Json(name = "signup_template_id") val signupTemplateId: String? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/otpemaildiscovery/OTPEmailDiscovery.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/otpemaildiscovery/OTPEmailDiscovery.kt index 25244a61..e50266d4 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/otpemaildiscovery/OTPEmailDiscovery.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/otpemaildiscovery/OTPEmailDiscovery.kt @@ -116,13 +116,14 @@ public data class SendRequest @Json(name = "email_address") val emailAddress: String, /** - * Use a custom template for login emails. By default, it will use your default email template. The template must be a - * template using our built-in customizations or a custom HTML email for OTP - Login. + * Use a custom template for login emails. By default, it will use your default email template. Templates can be added in + * the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML + * templates with type “OTP - Login”. */ @Json(name = "login_template_id") val loginTemplateId: String? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/otpsms/OTPSms.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/otpsms/OTPSms.kt index e78ad379..ae121059 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/otpsms/OTPSms.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/otpsms/OTPSms.kt @@ -226,7 +226,7 @@ public data class SendRequest @Json(name = "mfa_phone_number") val mfaPhoneNumber: String? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwords/Passwords.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwords/Passwords.kt index 3b00096d..8c3f72a0 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwords/Passwords.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwords/Passwords.kt @@ -190,7 +190,7 @@ public data class AuthenticateRequest * one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to * use when sending the passcode. * - * Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + * Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value * is provided, the copy defaults to English. @@ -507,8 +507,8 @@ public data class StrengthCheckResponse * Returns `true` if the password passes our password validation. We offer two validation options, * [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy) is the default option which offers a high level of * sophistication. - * We also offer [LUDS](https://stytch.com/docs/b2b/guides/passwords/strength-policy). If an email address is included - * in the call we also + * We also offer [LUDS](https://stytch.com/docs/b2b/guides/passwords/strength-policy) which is less sophisticated + * but easier to understand. If an email address is included in the call we also * require that the password hasn't been compromised using built-in breach detection powered by * [HaveIBeenPwned](https://haveibeenpwned.com/) */ @@ -532,8 +532,8 @@ public data class StrengthCheckResponse val strengthPolicy: String, /** * Will return `true` if breach detection will be evaluated. By default this option is enabled. - * This option can be disabled by contacting - * [support@stytch.com](mailto:support@stytch.com?subject=Password%20strength%20configuration). + * This option can be disabled in the + * [dashboard](https://stytch.com/dashboard/password-strength-config#breach-detection). * If this value is false then `breached_password` will always be `false` as well. */ @Json(name = "breach_detection_on_create") diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwordsdiscoveryemail/PasswordsDiscoveryEmail.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwordsdiscoveryemail/PasswordsDiscoveryEmail.kt index 486f7e04..f6fba2ee 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwordsdiscoveryemail/PasswordsDiscoveryEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwordsdiscoveryemail/PasswordsDiscoveryEmail.kt @@ -101,11 +101,12 @@ public data class ResetStartRequest @Json(name = "email_address") val emailAddress: String, /** - * The URL that the Member clicks from the reset password link. This URL should be an endpoint in the backend server that - * verifies the request by querying - * Stytch's authenticate endpoint and finishes the reset password flow. If this value is not passed, the default - * `reset_password_redirect_url` that you set in your Dashboard is used. - * If you have not set a default `reset_password_redirect_url`, an error is returned. + * The URL that the Member is redirected to from the reset password magic link. This URL should display your application's + * reset password page. + * Before rendering the reset page, extract the `token` from the query parameters. On the reset page, collect the new + * password and complete the flow by calling the corresponding Password Reset by Email endpoint. + * If this parameter is not specified, the default Reset Password redirect URL configured in the Dashboard will be used. + * If you have not set a default Reset Password redirect URL, an error is returned. */ @Json(name = "reset_password_redirect_url") val resetPasswordRedirectURL: String? = null, @@ -120,8 +121,9 @@ public data class ResetStartRequest @Json(name = "discovery_redirect_url") val discoveryRedirectURL: String? = null, /** - * Use a custom template for reset password emails. By default, it will use your default email template. The template must - * be a template using our built-in customizations or a custom HTML email for Passwords - Reset Password. + * Use a custom template for reset password emails. By default, it will use your default email template. Templates can be + * added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or + * custom HTML templates with type “Passwords - Reset Password”. */ @Json(name = "reset_password_template_id") val resetPasswordTemplateId: String? = null, @@ -134,7 +136,7 @@ public data class ResetStartRequest @Json(name = "pkce_code_challenge") val pkceCodeChallenge: String? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese @@ -149,8 +151,9 @@ public data class ResetStartRequest /** * Use a custom template for verification emails sent during password reset flows. When cross-organization passwords are * enabled for your Project, this template will be used the first time a user sets a password via a - * password reset flow. By default, it will use your default email template. The template must be a template using our - * built-in customizations or a custom HTML email for Passwords - Email Verification. + * password reset flow. By default, it will use your default email template. Templates can be added in the + * [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML + * templates with type “Passwords - Email Verification”. */ @Json(name = "verify_email_template_id") val verifyEmailTemplateId: String? = null, diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwordsemail/PasswordsEmail.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwordsemail/PasswordsEmail.kt index a83db220..3253b0cc 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwordsemail/PasswordsEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwordsemail/PasswordsEmail.kt @@ -202,7 +202,7 @@ public data class ResetRequest * one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to * use when sending the passcode. * - * Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + * Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value * is provided, the copy defaults to English. @@ -345,11 +345,12 @@ public data class ResetStartRequest @Json(name = "email_address") val emailAddress: String, /** - * The URL that the Member clicks from the reset password link. This URL should be an endpoint in the backend server that - * verifies the request by querying - * Stytch's authenticate endpoint and finishes the reset password flow. If this value is not passed, the default - * `reset_password_redirect_url` that you set in your Dashboard is used. - * If you have not set a default `reset_password_redirect_url`, an error is returned. + * The URL that the Member is redirected to from the reset password magic link. This URL should display your application's + * reset password page. + * Before rendering the reset page, extract the `token` from the query parameters. On the reset page, collect the new + * password and complete the flow by calling the corresponding Password Reset by Email endpoint. + * If this parameter is not specified, the default Reset Password redirect URL configured in the Dashboard will be used. + * If you have not set a default Reset Password redirect URL, an error is returned. */ @Json(name = "reset_password_redirect_url") val resetPasswordRedirectURL: String? = null, @@ -376,7 +377,7 @@ public data class ResetStartRequest @Json(name = "login_redirect_url") val loginRedirectURL: String? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese @@ -389,16 +390,18 @@ public data class ResetStartRequest @Json(name = "locale") val locale: ResetStartRequestLocale? = null, /** - * Use a custom template for reset password emails. By default, it will use your default email template. The template must - * be a template using our built-in customizations or a custom HTML email for Passwords - Reset Password. + * Use a custom template for reset password emails. By default, it will use your default email template. Templates can be + * added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or + * custom HTML templates with type “Passwords - Reset Password”. */ @Json(name = "reset_password_template_id") val resetPasswordTemplateId: String? = null, /** * Use a custom template for verification emails sent during password reset flows. When cross-organization passwords are * enabled for your Project, this template will be used the first time a user sets a password via a - * password reset flow. By default, it will use your default email template. The template must be a template using our - * built-in customizations or a custom HTML email for Passwords - Email Verification. + * password reset flow. By default, it will use your default email template. Templates can be added in the + * [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML + * templates with type “Passwords - Email Verification”. */ @Json(name = "verify_email_template_id") val verifyEmailTemplateId: String? = null, diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwordsexistingpassword/PasswordsExistingPassword.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwordsexistingpassword/PasswordsExistingPassword.kt index 278f07ba..171aa677 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwordsexistingpassword/PasswordsExistingPassword.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwordsexistingpassword/PasswordsExistingPassword.kt @@ -102,7 +102,7 @@ public data class ResetRequest * one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to * use when sending the passcode. * - * Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + * Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value * is provided, the copy defaults to English. diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwordssession/PasswordsSession.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwordssession/PasswordsSession.kt index 97fb4924..1b2334eb 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwordssession/PasswordsSession.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/passwordssession/PasswordsSession.kt @@ -88,7 +88,7 @@ public data class ResetRequest @Json(name = "session_custom_claims") val sessionCustomClaims: Map? = emptyMap(), /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/rbac/RBAC.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/rbac/RBAC.kt index 94c2e59f..1dd9d9b3 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/rbac/RBAC.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/rbac/RBAC.kt @@ -34,6 +34,9 @@ public data class Policy */ @Json(name = "resources") val resources: List, + /** + * An array of [Scope objects](https://stytch.com/docs/b2b/api/rbac-scope-object). + */ @Json(name = "scopes") val scopes: List, ) @@ -178,10 +181,19 @@ public data class PolicyRolePermission public data class PolicyScope @JvmOverloads constructor( + /** + * The unique identifier of the RBAC Scope, provided by the developer and intended to be human-readable. + */ @Json(name = "scope") val scope: String, + /** + * The description of the RBAC Scope. + */ @Json(name = "description") val description: String, + /** + * A list of permissions that link a [Resource](https://stytch.com/docs/b2b/api/rbac-resource-object) to a list of actions. + */ @Json(name = "permissions") val permissions: List, ) @@ -190,8 +202,28 @@ public data class PolicyScope public data class PolicyScopePermission @JvmOverloads constructor( + /** + * A unique identifier of the RBAC Resource, provided by the developer and intended to be human-readable. + * + * A `resource_id` is not allowed to start with `stytch`, which is a special prefix used for Stytch default Resources + * with reserved `resource_id`s. These include: + * + * * `stytch.organization` + * * `stytch.member` + * * `stytch.sso` + * * `stytch.self` + * + * Check out the [guide on Stytch default Resources](https://stytch.com/docs/b2b/guides/rbac/stytch-default) for a more + * detailed explanation. + * + * + */ @Json(name = "resource_id") val resourceId: String, + /** + * A list of permitted actions the Scope is required to take with the provided Resource. You can use `*` as a wildcard to + * require a Scope permission to use all possible actions related to the Resource. + */ @Json(name = "actions") val actions: List, ) diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/scim/SCIM.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/scim/SCIM.kt index 3324e19b..32ef1a24 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/scim/SCIM.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/scim/SCIM.kt @@ -218,26 +218,66 @@ public data class SCIMAttributes public data class SCIMConnection @JvmOverloads constructor( + /** + * Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations + * on an Organization, so be sure to preserve this value. You may also use the organization_slug or + * organization_external_id here as a convenience. + */ @Json(name = "organization_id") val organizationId: String, + /** + * The ID of the SCIM connection. + */ @Json(name = "connection_id") val connectionId: String, + /** + * The status of the connection. The possible values are deleted or active. + */ @Json(name = "status") val status: String, + /** + * A human-readable display name for the connection. + */ @Json(name = "display_name") val displayName: String, + /** + * Name of the IdP. Enum with possible values: `okta`, `microsoft-entra`, `cyberark`, `jumpcloud`, `onelogin`, + * `pingfederate`, `rippling` or `generic`. + * + * Specifying a known provider allows Stytch to handle any provider-specific logic, such as automatically appending + * `?aadOptscim062020` to the returned BaseURL for `microsoft-entra` SCIM Connections to + * [enable the SCIM 2.0 compliant flag](https://learn.microsoft.com/en-us/entra/identity/app-provisioning/application-provisioning-config-problem-scim-compatibility#scim-20-compliance-issues-and-status). + */ @Json(name = "identity_provider") val identityProvider: String, + /** + * The URL supplied to the Identity Provider (IdP) alongside the bearer token enabling access to Stytch's SCIM API + * endpoints + */ @Json(name = "base_url") val baseURL: String, + /** + * The last four digits of the bearer token. If you've lost access to your `bearer_token` and need to generate a new one, + * use the [SCIM rotate token start endpoint](https://stytch.com/docs/b2b/api/scim-rotate-token-start). + */ @Json(name = "bearer_token_last_four") val bearerTokenLastFour: String, + /** + * An array of SCIM group implicit role assignments. Each object in the array must contain a `group_id` and a `role_id`. + */ @Json(name = "scim_group_implicit_role_assignments") val scimGroupImplicitRoleAssignments: List, @Json(name = "next_bearer_token_last_four") val nextBearerTokenLastFour: String, + /** + * The bearer token expiry time. + */ @Json(name = "bearer_token_expires_at") val bearerTokenExpiresAt: Instant? = null, + /** + * This field is supplied only during [token rotation](https://stytch.com/docs/b2b/api/scim-rotate-token-start). The next + * bearer token expiry time. + */ @Json(name = "next_bearer_token_expires_at") val nextBearerTokenExpiresAt: Instant? = null, ) @@ -246,26 +286,71 @@ public data class SCIMConnection public data class SCIMConnectionWithNextToken @JvmOverloads constructor( + /** + * Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations + * on an Organization, so be sure to preserve this value. You may also use the organization_slug or + * organization_external_id here as a convenience. + */ @Json(name = "organization_id") val organizationId: String, + /** + * The ID of the SCIM connection. + */ @Json(name = "connection_id") val connectionId: String, + /** + * The status of the connection. The possible values are deleted or active. + */ @Json(name = "status") val status: String, + /** + * A human-readable display name for the connection. + */ @Json(name = "display_name") val displayName: String, + /** + * The URL supplied to the Identity Provider (IdP) alongside the bearer token enabling access to Stytch's SCIM API + * endpoints + */ @Json(name = "base_url") val baseURL: String, + /** + * Name of the IdP. Enum with possible values: `okta`, `microsoft-entra`, `cyberark`, `jumpcloud`, `onelogin`, + * `pingfederate`, `rippling` or `generic`. + * + * Specifying a known provider allows Stytch to handle any provider-specific logic, such as automatically appending + * `?aadOptscim062020` to the returned BaseURL for `microsoft-entra` SCIM Connections to + * [enable the SCIM 2.0 compliant flag](https://learn.microsoft.com/en-us/entra/identity/app-provisioning/application-provisioning-config-problem-scim-compatibility#scim-20-compliance-issues-and-status). + */ @Json(name = "identity_provider") val identityProvider: String, + /** + * The last four digits of the bearer token. If you've lost access to your `bearer_token` and need to generate a new one, + * use the [SCIM rotate token start endpoint](https://stytch.com/docs/b2b/api/scim-rotate-token-start). + */ @Json(name = "bearer_token_last_four") val bearerTokenLastFour: String, + /** + * This field is supplied only during [token rotation](https://stytch.com/docs/b2b/api/scim-rotate-token-start). This + * token should be used as the new bearer token for the SCIM connection after token rotation has been completed using the + * [SCIM rotate token complete endpoint](https://stytch.com/docs/b2b/api/scim-rotate-token-complete). + */ @Json(name = "next_bearer_token") val nextBearerToken: String, + /** + * An array of SCIM group implicit role assignments. Each object in the array must contain a `group_id` and a `role_id`. + */ @Json(name = "scim_group_implicit_role_assignments") val scimGroupImplicitRoleAssignments: List, + /** + * The bearer token expiry time. + */ @Json(name = "bearer_token_expires_at") val bearerTokenExpiresAt: Instant? = null, + /** + * This field is supplied only during [token rotation](https://stytch.com/docs/b2b/api/scim-rotate-token-start). The next + * bearer token expiry time. + */ @Json(name = "next_bearer_token_expires_at") val nextBearerTokenExpiresAt: Instant? = null, ) @@ -274,22 +359,59 @@ public data class SCIMConnectionWithNextToken public data class SCIMConnectionWithToken @JvmOverloads constructor( + /** + * Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations + * on an Organization, so be sure to preserve this value. You may also use the organization_slug or + * organization_external_id here as a convenience. + */ @Json(name = "organization_id") val organizationId: String, + /** + * The ID of the SCIM connection. + */ @Json(name = "connection_id") val connectionId: String, + /** + * The status of the connection. The possible values are deleted or active. + */ @Json(name = "status") val status: String, + /** + * A human-readable display name for the connection. + */ @Json(name = "display_name") val displayName: String, + /** + * Name of the IdP. Enum with possible values: `okta`, `microsoft-entra`, `cyberark`, `jumpcloud`, `onelogin`, + * `pingfederate`, `rippling` or `generic`. + * + * Specifying a known provider allows Stytch to handle any provider-specific logic, such as automatically appending + * `?aadOptscim062020` to the returned BaseURL for `microsoft-entra` SCIM Connections to + * [enable the SCIM 2.0 compliant flag](https://learn.microsoft.com/en-us/entra/identity/app-provisioning/application-provisioning-config-problem-scim-compatibility#scim-20-compliance-issues-and-status). + */ @Json(name = "identity_provider") val identityProvider: String, + /** + * The URL supplied to the Identity Provider (IdP) alongside the bearer token enabling access to Stytch's SCIM API + * endpoints + */ @Json(name = "base_url") val baseURL: String, + /** + * The token supplied to the Identity Provider (IdP) alongside the base URL that grants access to Stytch's SCIM API + * endpoints. It should be included in HTTP authorization headers. This field is supplied only on creation of the SCIM + * connection. + */ @Json(name = "bearer_token") val bearerToken: String, + /** + * An array of SCIM group implicit role assignments. Each object in the array must contain a `group_id` and a `role_id`. + */ @Json(name = "scim_group_implicit_role_assignments") val scimGroupImplicitRoleAssignments: List, + /** + * The bearer token expiry time. + */ @Json(name = "bearer_token_expires_at") val bearerTokenExpiresAt: Instant? = null, ) @@ -327,8 +449,14 @@ public data class SCIMGroup public data class SCIMGroupImplicitRoleAssignments @JvmOverloads constructor( + /** + * The ID of the role. + */ @Json(name = "role_id") val roleId: String, + /** + * The ID of the group. + */ @Json(name = "group_id") val groupId: String, @Json(name = "group_name") diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/scimconnection/SCIMConnection.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/scimconnection/SCIMConnection.kt index ff34790e..60308540 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/scimconnection/SCIMConnection.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/scimconnection/SCIMConnection.kt @@ -264,8 +264,7 @@ public data class CreateResponse @Json(name = "status_code") val statusCode: Int, /** - * The `SCIM Connection` object affected by this API call. See the - * [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object) for complete response field details. + * The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object). */ @Json(name = "connection") val connection: SCIMConnectionWithToken? = null, @@ -413,8 +412,7 @@ public data class GetResponse @Json(name = "status_code") val statusCode: Int, /** - * A [SCIM Connection](https://stytch.com/docs/b2b/api/scim-connection-object) connection belonging to the organization - * (currently limited to one). + * The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object). */ @Json(name = "connection") val connection: SCIMConnection? = null, @@ -461,8 +459,7 @@ public data class RotateCancelResponse @Json(name = "status_code") val statusCode: Int, /** - * The `SCIM Connection` object affected by this API call. See the - * [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object) for complete response field details. + * The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object). */ @Json(name = "connection") val connection: SCIMConnection? = null, @@ -509,8 +506,7 @@ public data class RotateCompleteResponse @Json(name = "status_code") val statusCode: Int, /** - * The `SCIM Connection` object affected by this API call. See the - * [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object) for complete response field details. + * The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object). */ @Json(name = "connection") val connection: SCIMConnection? = null, @@ -557,8 +553,7 @@ public data class RotateStartResponse @Json(name = "status_code") val statusCode: Int, /** - * The `SCIM Connection` object affected by this API call. See the - * [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object) for complete response field details. + * The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object). */ @Json(name = "connection") val connection: SCIMConnectionWithNextToken? = null, @@ -617,8 +612,7 @@ public data class UpdateResponse @Json(name = "status_code") val statusCode: Int, /** - * The `SAML Connection` object affected by this API call. See the - * [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object) for complete response field details. + * The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object). */ @Json(name = "connection") val connection: SCIMConnection? = null, diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/sessions/Sessions.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/sessions/Sessions.kt index f7ad27d2..26c7571f 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/sessions/Sessions.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/sessions/Sessions.kt @@ -595,7 +595,7 @@ public data class ExchangeRequest * one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to * use when sending the passcode. * - * Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + * Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value * is provided, the copy defaults to English. diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/sso/SSO.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/sso/SSO.kt index 266fdd45..828c3b1e 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/sso/SSO.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/sso/SSO.kt @@ -48,20 +48,52 @@ public enum class AuthenticateRequestLocale { public data class Connection @JvmOverloads constructor( + /** + * Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations + * on an Organization, so be sure to preserve this value. You may also use the organization_slug or + * organization_external_id here as a convenience. + */ @Json(name = "organization_id") val organizationId: String, + /** + * Globally unique UUID that identifies a specific External SSO Connection. + */ @Json(name = "connection_id") val connectionId: String, + /** + * Globally unique UUID that identifies a different Organization within your Project. + */ @Json(name = "external_organization_id") val externalOrganizationId: String, + /** + * Globally unique UUID that identifies a specific SSO connection configured for a different Organization in your Project. + */ @Json(name = "external_connection_id") val externalConnectionId: String, + /** + * A human-readable display name for the connection. + */ @Json(name = "display_name") val displayName: String, + /** + * The status of the connection. External connections are always active. + */ @Json(name = "status") val status: String, + /** + * All Members who log in with this External connection will implicitly receive the specified Roles. See the + * [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment. + * Implicit role assignments are not supported for External connections if the underlying SSO connection is an OIDC + * connection. + */ @Json(name = "external_connection_implicit_role_assignments") val externalConnectionImplicitRoleAssignments: List, + /** + * Defines the names of the groups + * that grant specific role assignments. For each group-Role pair, if a Member logs in with this external connection and + * belongs to the specified group, they will be granted the associated Role. See the + * [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment. + */ @Json(name = "external_group_implicit_role_assignments") val externalGroupImplicitRoleAssignments: List, ) @@ -70,6 +102,19 @@ public data class Connection public data class ConnectionImplicitRoleAssignment @JvmOverloads constructor( + /** + * The unique identifier of the RBAC Role, provided by the developer and intended to be human-readable. + * + * Reserved `role_id`s that are predefined by Stytch include: + * + * * `stytch_member` + * * `stytch_admin` + * + * Check out the [guide on Stytch default Roles](https://stytch.com/docs/b2b/guides/rbac/stytch-default) for a more + * detailed explanation. + * + * + */ @Json(name = "role_id") val roleId: String, ) @@ -138,34 +183,92 @@ public data class GroupImplicitRoleAssignment public data class OIDCConnection @JvmOverloads constructor( + /** + * Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations + * on an Organization, so be sure to preserve this value. You may also use the organization_slug or + * organization_external_id here as a convenience. + */ @Json(name = "organization_id") val organizationId: String, + /** + * Globally unique UUID that identifies a specific OIDC Connection. + */ @Json(name = "connection_id") val connectionId: String, + /** + * The status of the connection. The possible values are pending or active. See the + * [Update OIDC Connection endpoint](https://stytch.com/docs/b2b/api/update-oidc-connection) for more details. + */ @Json(name = "status") val status: String, + /** + * A human-readable display name for the connection. + */ @Json(name = "display_name") val displayName: String, + /** + * The callback URL for this OIDC connection. This value will be passed to the IdP to redirect the Member back to Stytch + * after a sign-in attempt. + */ @Json(name = "redirect_url") val redirectURL: String, + /** + * The OAuth2.0 client ID used to authenticate login attempts. This will be provided by the IdP. + */ @Json(name = "client_id") val clientId: String, + /** + * The secret belonging to the OAuth2.0 client used to authenticate login attempts. This will be provided by the IdP. + */ @Json(name = "client_secret") val clientSecret: String, + /** + * A case-sensitive `https://` URL that uniquely identifies the IdP. This will be provided by the IdP. + */ @Json(name = "issuer") val issuer: String, + /** + * The location of the URL that starts an OAuth login at the IdP. This will be provided by the IdP. + */ @Json(name = "authorization_url") val authorizationURL: String, + /** + * The location of the URL that issues OAuth2.0 access tokens and OIDC ID tokens. This will be provided by the IdP. + */ @Json(name = "token_url") val tokenURL: String, + /** + * The location of the IDP's [UserInfo Endpoint](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo). This + * will be provided by the IdP. + */ @Json(name = "userinfo_url") val userinfoURL: String, + /** + * The location of the IdP's JSON Web Key Set, used to verify credentials issued by the IdP. This will be provided by the + * IdP. + */ @Json(name = "jwks_url") val jwksURL: String, + /** + * Name of the IdP. Enum with possible values: `classlink`, `cyberark`, `duo`, `google-workspace`, `jumpcloud`, + * `keycloak`, `miniorange`, `microsoft-entra`, `okta`, `onelogin`, `pingfederate`, `rippling`, `salesforce`, + * `shibboleth`, or `generic`. + * + * Specifying a known provider allows Stytch to handle any provider-specific logic. + */ @Json(name = "identity_provider") val identityProvider: String, + /** + * A space-separated list of custom scopes that will be requested on every SSOStart call. If set, this value will replace + * the default set of OIDC scopes requested: `openid email profile`. Additional scopes can be requested using the + * `custom_scopes` query parameter on individual SSOStart calls. + */ @Json(name = "custom_scopes") val customScopes: String, + /** + * An object that represents the attributes used to identify a Member. This object will map the IdP-defined User + * attributes to Stytch-specific values, which will appear on the member's Trusted Metadata. + */ @Json(name = "attribute_mapping") val attributeMapping: Map? = emptyMap(), ) @@ -174,44 +277,121 @@ public data class OIDCConnection public data class SAMLConnection @JvmOverloads constructor( + /** + * Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations + * on an Organization, so be sure to preserve this value. You may also use the organization_slug or + * organization_external_id here as a convenience. + */ @Json(name = "organization_id") val organizationId: String, + /** + * Globally unique UUID that identifies a specific SAML Connection. + */ @Json(name = "connection_id") val connectionId: String, + /** + * The status of the connection. The possible values are pending or active. See the + * [Update SAML Connection endpoint](https://stytch.com/docs/b2b/api/update-saml-connection) for more details. + */ @Json(name = "status") val status: String, + /** + * A globally unique name for the IdP. This will be provided by the IdP. + */ @Json(name = "idp_entity_id") val idpEntityId: String, + /** + * A human-readable display name for the connection. + */ @Json(name = "display_name") val displayName: String, + /** + * The URL for which assertions for login requests will be sent. This will be provided by the IdP. + */ @Json(name = "idp_sso_url") val idpSSOURL: String, + /** + * The URL of the Assertion Consumer Service. This value will be passed to the IdP to redirect the Member back to Stytch + * after a sign-in attempt. Read our [SAML Overview](https://stytch.com/docs/b2b/api/saml-overview) for more info. + */ @Json(name = "acs_url") val acsURL: String, + /** + * The URL of the Audience Restriction. This value will indicate that Stytch is the intended audience of an assertion. + * Read our [SAML Overview](https://stytch.com/docs/b2b/api/saml-overview) for more info. + */ @Json(name = "audience_uri") val audienceUri: String, + /** + * A list of X.509 certificates Stytch will use to sign its assertion requests. Certificates should be uploaded to the IdP. + */ @Json(name = "signing_certificates") val signingCertificates: List, + /** + * A list of X.509 certificates Stytch will use to validate an assertion callback. Certificates should be populated from + * the IdP. + */ @Json(name = "verification_certificates") val verificationCertificates: List, @Json(name = "encryption_private_keys") val encryptionPrivateKeys: List, + /** + * All Members who log in with this SAML connection will implicitly receive the specified Roles. See the + * [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment. + */ @Json(name = "saml_connection_implicit_role_assignments") val samlConnectionImplicitRoleAssignments: List, + /** + * Defines the names of the SAML groups + * that grant specific role assignments. For each group-Role pair, if a Member logs in with this SAML connection and + * belongs to the specified SAML group, they will be granted the associated Role. See the + * [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment. + */ @Json(name = "saml_group_implicit_role_assignments") val samlGroupImplicitRoleAssignments: List, + /** + * An alternative URL to use for the Audience Restriction. This value can be used when you wish to migrate an existing + * SAML integration to Stytch with zero downtime. Read our + * [SSO migration guide](https://stytch.com/docs/b2b/guides/migrations/additional-migration-considerations) for more info. + */ @Json(name = "alternative_audience_uri") val alternativeAudienceUri: String, + /** + * Name of the IdP. Enum with possible values: `classlink`, `cyberark`, `duo`, `google-workspace`, `jumpcloud`, + * `keycloak`, `miniorange`, `microsoft-entra`, `okta`, `onelogin`, `pingfederate`, `rippling`, `salesforce`, + * `shibboleth`, or `generic`. + * + * Specifying a known provider allows Stytch to handle any provider-specific logic. + */ @Json(name = "identity_provider") val identityProvider: String, + /** + * The NameID format the SAML Connection expects to use. Defaults to + * `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`. + */ @Json(name = "nameid_format") val nameidFormat: String, + /** + * An alternative URL to use for the `AssertionConsumerServiceURL` in SP initiated SAML AuthNRequests. This value can be + * used when you wish to migrate an existing SAML integration to Stytch with zero downtime. Note that you will be + * responsible for proxying requests sent to the Alternative ACS URL to Stytch. Read our + * [SSO migration guide](https://stytch.com/docs/b2b/guides/migrations/additional-migration-considerations) for more info. + */ @Json(name = "alternative_acs_url") val alternativeAcsURL: String, + /** + * Determines whether IDP initiated auth is allowed for a given SAML connection. Defaults to false (IDP Initiated Auth is + * enabled). + */ @Json(name = "idp_initiated_auth_disabled") val idpInitiatedAuthDisabled: Boolean, @Json(name = "allow_gateway_callback") val allowGatewayCallback: Boolean, + /** + * An object that represents the attributes used to identify a Member. This object will map the IdP-defined User + * attributes to Stytch-specific values. Required attributes: `email` and one of `full_name` or `first_name` and + * `last_name`. + */ @Json(name = "attribute_mapping") val attributeMapping: Map? = emptyMap(), ) @@ -220,6 +400,19 @@ public data class SAMLConnection public data class SAMLConnectionImplicitRoleAssignment @JvmOverloads constructor( + /** + * The unique identifier of the RBAC Role, provided by the developer and intended to be human-readable. + * + * Reserved `role_id`s that are predefined by Stytch include: + * + * * `stytch_member` + * * `stytch_admin` + * + * Check out the [guide on Stytch default Roles](https://stytch.com/docs/b2b/guides/rbac/stytch-default) for a more + * detailed explanation. + * + * + */ @Json(name = "role_id") val roleId: String, ) @@ -238,16 +431,34 @@ public data class SAMLGroupImplicitRoleAssignment public data class X509Certificate @JvmOverloads constructor( + /** + * The ID of the certificate. + */ @Json(name = "certificate_id") val certificateId: String, + /** + * The certificate, in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format. + */ @Json(name = "certificate") val certificate: String, + /** + * The issuer of the certificate. For signing certificates, this value will be "Stytch". + */ @Json(name = "issuer") val issuer: String, + /** + * A timestamp that indicates when the certificate was created. + */ @Json(name = "created_at") val createdAt: Instant? = null, + /** + * A timestamp that indicates when the certificate will expire. + */ @Json(name = "expires_at") val expiresAt: Instant? = null, + /** + * A timestamp that indicates when the certificate was updated. + */ @Json(name = "updated_at") val updatedAt: Instant? = null, ) @@ -312,7 +523,7 @@ public data class AuthenticateRequest * one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to * use when sending the passcode. * - * Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + * Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value * is provided, the copy defaults to English. diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/ssoexternal/SSOExternal.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/ssoexternal/SSOExternal.kt index 29b6074e..420618cc 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/ssoexternal/SSOExternal.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/ssoexternal/SSOExternal.kt @@ -108,9 +108,7 @@ public data class CreateConnectionResponse @Json(name = "status_code") val statusCode: Int, /** - * The `External Connection` object affected by this API call. See the - * [External Connection Object](https://stytch.com/docs/b2b/api/external-connection-object) for complete response field - * details. + * The [External Connection Object](https://stytch.com/docs/b2b/api/external-connection-object). */ @Json(name = "connection") val connection: Connection? = null, @@ -183,9 +181,7 @@ public data class UpdateConnectionResponse @Json(name = "status_code") val statusCode: Int, /** - * The `External Connection` object affected by this API call. See the - * [External Connection Object](https://stytch.com/docs/b2b/api/external-connection-object) for complete response field - * details. + * The [External Connection Object](https://stytch.com/docs/b2b/api/external-connection-object). */ @Json(name = "connection") val connection: Connection? = null, diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/ssooidc/SSOOIDC.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/ssooidc/SSOOIDC.kt index f5856e6a..fdbc39cf 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/ssooidc/SSOOIDC.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/ssooidc/SSOOIDC.kt @@ -195,8 +195,7 @@ public data class CreateConnectionResponse @Json(name = "status_code") val statusCode: Int, /** - * The `OIDC Connection` object affected by this API call. See the - * [OIDC Connection Object](https://stytch.com/docs/b2b/api/oidc-connection-object) for complete response field details. + * The [OIDC Connection Object](https://stytch.com/docs/b2b/api/oidc-connection-object). */ @Json(name = "connection") val connection: OIDCConnection? = null, @@ -306,8 +305,7 @@ public data class UpdateConnectionResponse @Json(name = "status_code") val statusCode: Int, /** - * The `OIDC Connection` object affected by this API call. See the - * [OIDC Connection Object](https://stytch.com/docs/b2b/api/oidc-connection-object) for complete response field details. + * The [OIDC Connection Object](https://stytch.com/docs/b2b/api/oidc-connection-object). */ @Json(name = "connection") val connection: OIDCConnection? = null, diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/ssosaml/SSOSAML.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/ssosaml/SSOSAML.kt index 52d3e86a..72aac1a4 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/models/ssosaml/SSOSAML.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/ssosaml/SSOSAML.kt @@ -254,8 +254,7 @@ public data class CreateConnectionResponse @Json(name = "status_code") val statusCode: Int, /** - * The `SAML Connection` object affected by this API call. See the - * [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object) for complete response field details. + * The [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object) */ @Json(name = "connection") val connection: SAMLConnection? = null, @@ -410,8 +409,7 @@ public data class UpdateByURLResponse @Json(name = "status_code") val statusCode: Int, /** - * The `SAML Connection` object affected by this API call. See the - * [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object) for complete response field details. + * The [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object) */ @Json(name = "connection") val connection: SAMLConnection? = null, @@ -554,8 +552,7 @@ public data class UpdateConnectionResponse @Json(name = "status_code") val statusCode: Int, /** - * The `SAML Connection` object affected by this API call. See the - * [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object) for complete response field details. + * The [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object) */ @Json(name = "connection") val connection: SAMLConnection? = null, 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 d3e96dea..a2c649d1 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.2.0" +internal const val VERSION = "10.0.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/fraudemail/FraudEmail.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/api/fraudemail/FraudEmail.kt index 077408ef..c3f03415 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,8 +82,7 @@ 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 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..5198113f 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 @@ -87,10 +87,10 @@ public interface Clients { public fun searchCompletable(data: SearchRequest): CompletableFuture> /** - * Updates an existing M2M Client. You can use this endpoint to activate or deactivate a M2M Client by changing its + * Updates an existing M2M Client. You can use this endpoint to activate or deactivate an M2M Client by changing its * `status`. A deactivated M2M Client will not be allowed to perform future token exchange flows until it is reactivated. * - * **Important:** Deactivating a M2M Client will not invalidate any existing JWTs issued to the client, only prevent it + * **Important:** Deactivating an M2M Client will not invalidate any existing JWTs issued to the client, only prevent it * from receiving new ones. * To protect more-sensitive routes, pass a lower `max_token_age` value * when[authenticating the token](https://stytch.com/docs/b2b/api/authenticate-m2m-token)[authenticating the token](https://stytch.com/docs/api/authenticate-m2m-token). @@ -98,10 +98,10 @@ public interface Clients { public suspend fun update(data: UpdateRequest): StytchResult /** - * Updates an existing M2M Client. You can use this endpoint to activate or deactivate a M2M Client by changing its + * Updates an existing M2M Client. You can use this endpoint to activate or deactivate an M2M Client by changing its * `status`. A deactivated M2M Client will not be allowed to perform future token exchange flows until it is reactivated. * - * **Important:** Deactivating a M2M Client will not invalidate any existing JWTs issued to the client, only prevent it + * **Important:** Deactivating an M2M Client will not invalidate any existing JWTs issued to the client, only prevent it * from receiving new ones. * To protect more-sensitive routes, pass a lower `max_token_age` value * when[authenticating the token](https://stytch.com/docs/b2b/api/authenticate-m2m-token)[authenticating the token](https://stytch.com/docs/api/authenticate-m2m-token). @@ -112,10 +112,10 @@ public interface Clients { ) /** - * Updates an existing M2M Client. You can use this endpoint to activate or deactivate a M2M Client by changing its + * Updates an existing M2M Client. You can use this endpoint to activate or deactivate an M2M Client by changing its * `status`. A deactivated M2M Client will not be allowed to perform future token exchange flows until it is reactivated. * - * **Important:** Deactivating a M2M Client will not invalidate any existing JWTs issued to the client, only prevent it + * **Important:** Deactivating an M2M Client will not invalidate any existing JWTs issued to the client, only prevent it * from receiving new ones. * To protect more-sensitive routes, pass a lower `max_token_age` value * when[authenticating the token](https://stytch.com/docs/b2b/api/authenticate-m2m-token)[authenticating the token](https://stytch.com/docs/api/authenticate-m2m-token). @@ -125,7 +125,7 @@ public interface Clients { /** * Deletes the M2M Client. * - * **Important:** Deleting a M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from + * **Important:** Deleting an M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from * receiving new ones. * To protect more-sensitive routes, pass a lower `max_token_age` value * when[authenticating the token](https://stytch.com/docs/b2b/api/authenticate-m2m-token)[authenticating the token](https://stytch.com/docs/api/authenticate-m2m-token). @@ -135,7 +135,7 @@ public interface Clients { /** * Deletes the M2M Client. * - * **Important:** Deleting a M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from + * **Important:** Deleting an M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from * receiving new ones. * To protect more-sensitive routes, pass a lower `max_token_age` value * when[authenticating the token](https://stytch.com/docs/b2b/api/authenticate-m2m-token)[authenticating the token](https://stytch.com/docs/api/authenticate-m2m-token). @@ -148,7 +148,7 @@ public interface Clients { /** * Deletes the M2M Client. * - * **Important:** Deleting a M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from + * **Important:** Deleting an M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from * receiving new ones. * To protect more-sensitive routes, pass a lower `max_token_age` value * when[authenticating the token](https://stytch.com/docs/b2b/api/authenticate-m2m-token)[authenticating the token](https://stytch.com/docs/api/authenticate-m2m-token). @@ -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..474366e8 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 @@ -49,30 +49,60 @@ public interface MagicLinks { public fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> /** - * Create an Embeddable Magic Link token for a User. Access to this endpoint is restricted. To enable it, please send us a - * note at support@stytch.com. + * Create an Embeddable Magic Link token for a User. * - * ### Next steps - * Send the returned `token` value to the end user in a link which directs to your application. When the end user follows - * your link, collect the token, and call [Authenticate Magic Link](https://stytch.com/docs/api/authenticate-magic-link) - * to complete authentication. + * ### Important usage notes * - * **Note:** Authenticating an Embeddable Magic Link token will **not** result in any of the Stytch User's factors (email - * address or phone number) being marked as verified, as Stytch cannot confirm where the user received the token. + * Carefully review the following notes before using Embeddable Magic Links: + * + * * Embeddable Magic Link tokens are **sensitive values**. You should handle and store them securely. + * * Authenticating an Embeddable Magic Link token will not mark any of a user's delivery factors (email address or phone + * number) as verified, since we cannot confirm how the token was sent to the user. + * * Embeddable Magic Links are only available in our Consumer API, and not our B2B API. + * + * When sending Embeddable Magic Links via email: + * + * * Deliverability is paramount. Carefully test your email copy to ensure it reaches your users' inboxes. Small changes + * can result in your emails being sent to spam. + * * In some cases, email security bots may follow links within incoming emails before your users open them. This consumes + * the Embeddable Magic Link token, preventing the user from logging in when they later click the link. Our Email Magic + * Links product automatically prevents this (details + * [here](https://stytch.com/docs/consumer-auth/authentication/magic-links/redirect-routing)). However, when sending your + * own emails containing Embeddable Magic Links, you'll be responsible for detecting and stopping bot traffic using tools + * like CAPTCHA or [Device Fingerprinting](https://stytch.com/docs/fraud-risk/device-fingerprinting/overview). + * + * We also recommend checking out our + * [Trusted Auth Tokens](https://stytch.com/docs/consumer-auth/authentication/trusted-auth-tokens/overview) product, which + * is available in both our Consumer and B2B APIs and can be a better fit for some use cases. */ public suspend fun create(data: CreateRequest): StytchResult /** - * Create an Embeddable Magic Link token for a User. Access to this endpoint is restricted. To enable it, please send us a - * note at support@stytch.com. + * Create an Embeddable Magic Link token for a User. + * + * ### Important usage notes + * + * Carefully review the following notes before using Embeddable Magic Links: * - * ### Next steps - * Send the returned `token` value to the end user in a link which directs to your application. When the end user follows - * your link, collect the token, and call [Authenticate Magic Link](https://stytch.com/docs/api/authenticate-magic-link) - * to complete authentication. + * * Embeddable Magic Link tokens are **sensitive values**. You should handle and store them securely. + * * Authenticating an Embeddable Magic Link token will not mark any of a user's delivery factors (email address or phone + * number) as verified, since we cannot confirm how the token was sent to the user. + * * Embeddable Magic Links are only available in our Consumer API, and not our B2B API. * - * **Note:** Authenticating an Embeddable Magic Link token will **not** result in any of the Stytch User's factors (email - * address or phone number) being marked as verified, as Stytch cannot confirm where the user received the token. + * When sending Embeddable Magic Links via email: + * + * * Deliverability is paramount. Carefully test your email copy to ensure it reaches your users' inboxes. Small changes + * can result in your emails being sent to spam. + * * In some cases, email security bots may follow links within incoming emails before your users open them. This consumes + * the Embeddable Magic Link token, preventing the user from logging in when they later click the link. Our Email Magic + * Links product automatically prevents this (details + * [here](https://stytch.com/docs/consumer-auth/authentication/magic-links/redirect-routing)). However, when sending your + * own emails containing Embeddable Magic Links, you'll be responsible for detecting and stopping bot traffic using tools + * like CAPTCHA or [Device Fingerprinting](https://stytch.com/docs/fraud-risk/device-fingerprinting/overview). + * + * We also recommend checking out our + * [Trusted Auth Tokens](https://stytch.com/docs/consumer-auth/authentication/trusted-auth-tokens/overview) product, which + * is available in both our Consumer and B2B APIs and can be a better fit for some use cases. */ public fun create( data: CreateRequest, @@ -80,16 +110,31 @@ public interface MagicLinks { ) /** - * Create an Embeddable Magic Link token for a User. Access to this endpoint is restricted. To enable it, please send us a - * note at support@stytch.com. + * Create an Embeddable Magic Link token for a User. + * + * ### Important usage notes + * + * Carefully review the following notes before using Embeddable Magic Links: + * + * * Embeddable Magic Link tokens are **sensitive values**. You should handle and store them securely. + * * Authenticating an Embeddable Magic Link token will not mark any of a user's delivery factors (email address or phone + * number) as verified, since we cannot confirm how the token was sent to the user. + * * Embeddable Magic Links are only available in our Consumer API, and not our B2B API. + * + * When sending Embeddable Magic Links via email: * - * ### Next steps - * Send the returned `token` value to the end user in a link which directs to your application. When the end user follows - * your link, collect the token, and call [Authenticate Magic Link](https://stytch.com/docs/api/authenticate-magic-link) - * to complete authentication. + * * Deliverability is paramount. Carefully test your email copy to ensure it reaches your users' inboxes. Small changes + * can result in your emails being sent to spam. + * * In some cases, email security bots may follow links within incoming emails before your users open them. This consumes + * the Embeddable Magic Link token, preventing the user from logging in when they later click the link. Our Email Magic + * Links product automatically prevents this (details + * [here](https://stytch.com/docs/consumer-auth/authentication/magic-links/redirect-routing)). However, when sending your + * own emails containing Embeddable Magic Links, you'll be responsible for detecting and stopping bot traffic using tools + * like CAPTCHA or [Device Fingerprinting](https://stytch.com/docs/fraud-risk/device-fingerprinting/overview). * - * **Note:** Authenticating an Embeddable Magic Link token will **not** result in any of the Stytch User's factors (email - * address or phone number) being marked as verified, as Stytch cannot confirm where the user received the token. + * We also recommend checking out our + * [Trusted Auth Tokens](https://stytch.com/docs/consumer-auth/authentication/trusted-auth-tokens/overview) product, which + * is available in both our Consumer and B2B APIs and can be a better fit for some use cases. */ public fun createCompletable(data: CreateRequest): CompletableFuture> } @@ -120,10 +165,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 +187,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..a3b9734d 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 @@ -167,9 +167,6 @@ public interface Sessions { * Use this endpoint to exchange a Connected Apps Access Token back into a Stytch Session for the underlying User. * This session can be used with the Stytch SDKs and APIs. * - * The Session returned will be the same Session that was active in your application (the authorizing party) during the - * initial authorization flow. - * * The Access Token must contain the `full_access` scope (only available to First Party clients) and must not be more than * 5 minutes old. Access Tokens may only be exchanged a single time. */ @@ -179,9 +176,6 @@ public interface Sessions { * Use this endpoint to exchange a Connected Apps Access Token back into a Stytch Session for the underlying User. * This session can be used with the Stytch SDKs and APIs. * - * The Session returned will be the same Session that was active in your application (the authorizing party) during the - * initial authorization flow. - * * The Access Token must contain the `full_access` scope (only available to First Party clients) and must not be more than * 5 minutes old. Access Tokens may only be exchanged a single time. */ @@ -194,9 +188,6 @@ public interface Sessions { * Use this endpoint to exchange a Connected Apps Access Token back into a Stytch Session for the underlying User. * This session can be used with the Stytch SDKs and APIs. * - * The Session returned will be the same Session that was active in your application (the authorizing party) during the - * initial authorization flow. - * * The Access Token must contain the `full_access` scope (only available to First Party clients) and must not be more than * 5 minutes old. Access Tokens may only be exchanged a single time. */ @@ -430,10 +421,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 +443,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 +465,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 +487,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 +511,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 +536,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 +558,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..47883461 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 @@ -42,11 +42,13 @@ public interface WebAuthn { * [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) with the data from * [public_key_credential_creation_options](https://w3c.github.io/webauthn/#dictionary-makecredentialoptions) passed to * the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) request via the public - * key argument. We recommend using the `create()` wrapper provided by the webauthn-json library. + * key argument. * - * If you are not using the [webauthn-json](https://github.com/github/webauthn-json) library, the - * `public_key_credential_creation_options` will need to be converted to a suitable public key by unmarshalling the JSON, - * base64 decoding the user ID field, and converting user ID and the challenge fields into an array buffer. + * When using built-in browser methods like `navigator.credentials.create()`, set the `use_base64_url_encoding` option to + * `true`. + * + * See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and + * example code. */ public suspend fun registerStart(data: RegisterStartRequest): StytchResult @@ -59,11 +61,13 @@ public interface WebAuthn { * [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) with the data from * [public_key_credential_creation_options](https://w3c.github.io/webauthn/#dictionary-makecredentialoptions) passed to * the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) request via the public - * key argument. We recommend using the `create()` wrapper provided by the webauthn-json library. + * key argument. + * + * When using built-in browser methods like `navigator.credentials.create()`, set the `use_base64_url_encoding` option to + * `true`. * - * If you are not using the [webauthn-json](https://github.com/github/webauthn-json) library, the - * `public_key_credential_creation_options` will need to be converted to a suitable public key by unmarshalling the JSON, - * base64 decoding the user ID field, and converting user ID and the challenge fields into an array buffer. + * See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and + * example code. */ public fun registerStart( data: RegisterStartRequest, @@ -79,11 +83,13 @@ public interface WebAuthn { * [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) with the data from * [public_key_credential_creation_options](https://w3c.github.io/webauthn/#dictionary-makecredentialoptions) passed to * the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) request via the public - * key argument. We recommend using the `create()` wrapper provided by the webauthn-json library. + * key argument. + * + * When using built-in browser methods like `navigator.credentials.create()`, set the `use_base64_url_encoding` option to + * `true`. * - * If you are not using the [webauthn-json](https://github.com/github/webauthn-json) library, the - * `public_key_credential_creation_options` will need to be converted to a suitable public key by unmarshalling the JSON, - * base64 decoding the user ID field, and converting user ID and the challenge fields into an array buffer. + * See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and + * example code. */ public fun registerStartCompletable(data: RegisterStartRequest): CompletableFuture> @@ -92,11 +98,8 @@ public interface WebAuthn { * [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) request to this endpoint as * the `public_key_credential` parameter. * - * If the [webauthn-json](https://github.com/github/webauthn-json) library's `create()` method was used, the response can - * be passed directly to the [register endpoint](https://stytch.com/docs/api/webauthn-register). If not, some fields (the - * client data and the attestation object) from the - * [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) response will need to be - * converted from array buffers to strings and marshalled into JSON. + * See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and + * example code. */ public suspend fun register(data: RegisterRequest): StytchResult @@ -105,11 +108,8 @@ public interface WebAuthn { * [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) request to this endpoint as * the `public_key_credential` parameter. * - * If the [webauthn-json](https://github.com/github/webauthn-json) library's `create()` method was used, the response can - * be passed directly to the [register endpoint](https://stytch.com/docs/api/webauthn-register). If not, some fields (the - * client data and the attestation object) from the - * [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) response will need to be - * converted from array buffers to strings and marshalled into JSON. + * See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and + * example code. */ public fun register( data: RegisterRequest, @@ -121,11 +121,8 @@ public interface WebAuthn { * [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) request to this endpoint as * the `public_key_credential` parameter. * - * If the [webauthn-json](https://github.com/github/webauthn-json) library's `create()` method was used, the response can - * be passed directly to the [register endpoint](https://stytch.com/docs/api/webauthn-register). If not, some fields (the - * client data and the attestation object) from the - * [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) response will need to be - * converted from array buffers to strings and marshalled into JSON. + * See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and + * example code. */ public fun registerCompletable(data: RegisterRequest): CompletableFuture> @@ -138,11 +135,12 @@ public interface WebAuthn { * [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) with the data from * `public_key_credential_request_options` passed to the * [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) request via the public key argument. - * We recommend using the `get()` wrapper provided by the webauthn-json library. * - * If you are not using the [webauthn-json](https://github.com/github/webauthn-json) library, `the - * public_key_credential_request_options` will need to be converted to a suitable public key by unmarshalling the JSON and - * converting some the fields to array buffers. + * When using built-in browser methods like `navigator.credentials.get()`, set the `use_base64_url_encoding` option to + * `true`. + * + * See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and + * example code. */ public suspend fun authenticateStart(data: AuthenticateStartRequest): StytchResult @@ -155,11 +153,12 @@ public interface WebAuthn { * [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) with the data from * `public_key_credential_request_options` passed to the * [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) request via the public key argument. - * We recommend using the `get()` wrapper provided by the webauthn-json library. * - * If you are not using the [webauthn-json](https://github.com/github/webauthn-json) library, `the - * public_key_credential_request_options` will need to be converted to a suitable public key by unmarshalling the JSON and - * converting some the fields to array buffers. + * When using built-in browser methods like `navigator.credentials.get()`, set the `use_base64_url_encoding` option to + * `true`. + * + * See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and + * example code. */ public fun authenticateStart( data: AuthenticateStartRequest, @@ -175,11 +174,12 @@ public interface WebAuthn { * [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) with the data from * `public_key_credential_request_options` passed to the * [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) request via the public key argument. - * We recommend using the `get()` wrapper provided by the webauthn-json library. * - * If you are not using the [webauthn-json](https://github.com/github/webauthn-json) library, `the - * public_key_credential_request_options` will need to be converted to a suitable public key by unmarshalling the JSON and - * converting some the fields to array buffers. + * When using built-in browser methods like `navigator.credentials.get()`, set the `use_base64_url_encoding` option to + * `true`. + * + * See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and + * example code. */ public fun authenticateStartCompletable(data: AuthenticateStartRequest): CompletableFuture> @@ -188,10 +188,8 @@ public interface WebAuthn { * [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) request to the authenticate * endpoint. * - * If the [webauthn-json](https://github.com/github/webauthn-json) library's `get()` method was used, the response can be - * passed directly to the [authenticate endpoint](https://stytch.com/docs/api/webauthn-authenticate). If not some fields - * from the [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) response will need to be - * converted from array buffers to strings and marshalled into JSON. + * See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and + * example code. */ public suspend fun authenticate(data: AuthenticateRequest): StytchResult @@ -200,10 +198,8 @@ public interface WebAuthn { * [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) request to the authenticate * endpoint. * - * If the [webauthn-json](https://github.com/github/webauthn-json) library's `get()` method was used, the response can be - * passed directly to the [authenticate endpoint](https://stytch.com/docs/api/webauthn-authenticate). If not some fields - * from the [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) response will need to be - * converted from array buffers to strings and marshalled into JSON. + * See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and + * example code. */ public fun authenticate( data: AuthenticateRequest, @@ -215,10 +211,8 @@ public interface WebAuthn { * [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) request to the authenticate * endpoint. * - * If the [webauthn-json](https://github.com/github/webauthn-json) library's `get()` method was used, the response can be - * passed directly to the [authenticate endpoint](https://stytch.com/docs/api/webauthn-authenticate). If not some fields - * from the [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) response will need to be - * converted from array buffers to strings and marshalled into JSON. + * See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and + * example code. */ public fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture> @@ -283,10 +277,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 +299,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 +321,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 +343,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 +365,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 +390,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/magiclinksemail/MagicLinksEmail.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/models/magiclinksemail/MagicLinksEmail.kt index 928fa10a..1da5c38d 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/models/magiclinksemail/MagicLinksEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/models/magiclinksemail/MagicLinksEmail.kt @@ -69,8 +69,9 @@ public data class InviteRequest @Json(name = "email") val email: String, /** - * Use a custom template for invite emails. By default, it will use your default email template. The template must be a - * template using our built-in customizations or a custom HTML email for Magic links - Invite. + * Use a custom template for invite emails. By default, it will use your default email template. Templates can be added in + * the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML + * templates with type “Magic links - Invite”. */ @Json(name = "invite_template_id") val inviteTemplateId: String? = null, @@ -100,7 +101,7 @@ public data class InviteRequest @Json(name = "invite_expiration_minutes") val inviteExpirationMinutes: Int? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese @@ -199,14 +200,16 @@ public data class LoginOrCreateRequest @Json(name = "signup_expiration_minutes") val signupExpirationMinutes: Int? = null, /** - * Use a custom template for login emails. By default, it will use your default email template. The template must be a - * template using our built-in customizations or a custom HTML email for Magic links - Login. + * Use a custom template for login emails. By default, it will use your default email template. Templates can be added in + * the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML + * templates with type “Magic links - Login”. */ @Json(name = "login_template_id") val loginTemplateId: String? = null, /** - * Use a custom template for sign-up emails. By default, it will use your default email template. The template must be a - * template using our built-in customizations or a custom HTML email for Magic links - Sign-up. + * Use a custom template for sign-up emails. By default, it will use your default email template. Templates can be added + * in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom + * HTML templates with type “Magic links - Sign-up”. */ @Json(name = "signup_template_id") val signupTemplateId: String? = null, @@ -232,7 +235,7 @@ public data class LoginOrCreateRequest @Json(name = "code_challenge") val codeChallenge: String? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese @@ -330,8 +333,9 @@ public data class SendRequest @Json(name = "email") val email: String, /** - * Use a custom template for login emails. By default, it will use your default email template. The template must be a - * template using our built-in customizations or a custom HTML email for Magic links - Login. + * Use a custom template for login emails. By default, it will use your default email template. Templates can be added in + * the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML + * templates with type “Magic links - Login”. */ @Json(name = "login_template_id") val loginTemplateId: String? = null, @@ -391,7 +395,7 @@ public data class SendRequest @Json(name = "session_jwt") val sessionJWT: String? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese @@ -404,8 +408,9 @@ public data class SendRequest @Json(name = "locale") val locale: SendRequestLocale? = null, /** - * Use a custom template for sign-up emails. By default, it will use your default email template. The template must be a - * template using our built-in customizations or a custom HTML email for Magic links - Sign-up. + * Use a custom template for sign-up emails. By default, it will use your default email template. Templates can be added + * in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom + * HTML templates with type “Magic links - Sign-up”. */ @Json(name = "signup_template_id") val signupTemplateId: String? = null, diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/models/otpemail/OTPEmail.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/models/otpemail/OTPEmail.kt index 74dfb4a6..04fd363b 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/models/otpemail/OTPEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/models/otpemail/OTPEmail.kt @@ -75,7 +75,7 @@ public data class LoginOrCreateRequest @Json(name = "create_user_as_pending") val createUserAsPending: Boolean? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese @@ -88,14 +88,16 @@ public data class LoginOrCreateRequest @Json(name = "locale") val locale: LoginOrCreateRequestLocale? = null, /** - * Use a custom template for login emails. By default, it will use your default email template. The template must be a - * template using our built-in customizations or a custom HTML email for Magic links - Login. + * Use a custom template for login emails. By default, it will use your default email template. Templates can be added in + * the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML + * templates with type “Magic links - Login”. */ @Json(name = "login_template_id") val loginTemplateId: String? = null, /** - * Use a custom template for sign-up emails. By default, it will use your default email template. The template must be a - * template using our built-in customizations or a custom HTML email for Magic links - Sign-up. + * Use a custom template for sign-up emails. By default, it will use your default email template. Templates can be added + * in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom + * HTML templates with type “Magic links - Sign-up”. */ @Json(name = "signup_template_id") val signupTemplateId: String? = null, @@ -163,7 +165,7 @@ public data class SendRequest @Json(name = "attributes") val attributes: Attributes? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese @@ -191,14 +193,16 @@ public data class SendRequest @Json(name = "session_jwt") val sessionJWT: String? = null, /** - * Use a custom template for login emails. By default, it will use your default email template. The template must be a - * template using our built-in customizations or a custom HTML email for OTP - Login. + * Use a custom template for login emails. By default, it will use your default email template. Templates can be added in + * the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML + * templates with type “OTP - Login”. */ @Json(name = "login_template_id") val loginTemplateId: String? = null, /** - * Use a custom template for sign-up emails. By default, it will use your default email template. The template must be a - * template using our built-in customizations or a custom HTML email for OTP - Sign-up. + * Use a custom template for sign-up emails. By default, it will use your default email template. Templates can be added + * in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom + * HTML templates with type “OTP - Sign-up”. */ @Json(name = "signup_template_id") val signupTemplateId: String? = null, diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/models/otpsms/OTPSms.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/models/otpsms/OTPSms.kt index ce4f0e97..3c9a6ca7 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/models/otpsms/OTPSms.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/models/otpsms/OTPSms.kt @@ -99,7 +99,7 @@ public data class LoginOrCreateRequest @Json(name = "create_user_as_pending") val createUserAsPending: Boolean? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese @@ -175,7 +175,7 @@ public data class SendRequest @Json(name = "attributes") val attributes: Attributes? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/models/otpwhatsapp/OTPWhatsApp.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/models/otpwhatsapp/OTPWhatsApp.kt index e126bcb8..4022e7ae 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/models/otpwhatsapp/OTPWhatsApp.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/models/otpwhatsapp/OTPWhatsApp.kt @@ -99,7 +99,7 @@ public data class LoginOrCreateRequest @Json(name = "create_user_as_pending") val createUserAsPending: Boolean? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese @@ -175,7 +175,7 @@ public data class SendRequest @Json(name = "attributes") val attributes: Attributes? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/models/passwords/Passwords.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/models/passwords/Passwords.kt index 255f415f..0ecb7d65 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/models/passwords/Passwords.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/models/passwords/Passwords.kt @@ -677,9 +677,9 @@ public data class StrengthCheckResponse /** * Returns `true` if the password passes our password validation. We offer two validation options, * [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy) is the default option which offers a high level of - * sophistication. We also offer [LUDS](https://stytch.com/docs/guides/passwords/strength-policy). If an email address is - * included in the call we also require that the password hasn't been compromised using built-in breach detection powered - * by [HaveIBeenPwned](https://haveibeenpwned.com/). + * sophistication. We also offer [LUDS](https://stytch.com/docs/guides/passwords/strength-policy) which is less + * sophisticated but easier to understand. If an email address is included in the call we also require that the password + * hasn't been compromised using built-in breach detection powered by [HaveIBeenPwned](https://haveibeenpwned.com/). */ @Json(name = "valid_password") val validPassword: Boolean, @@ -701,8 +701,8 @@ public data class StrengthCheckResponse val strengthPolicy: String, /** * Will return `true` if breach detection will be evaluated. By default this option is enabled. This option can be - * disabled by contacting [support@stytch.com](mailto:support@stytch.com?subject=Password%20strength%20configuration). If - * this value is `false` then `breached_password` will always be `false` as well. + * disabled in the [dashboard](https://stytch.com/dashboard/password-strength-config#breach-detection). If this value is + * `false` then `breached_password` will always be `false` as well. */ @Json(name = "breach_detection_on_create") val breachDetectionOnCreate: Boolean, diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/models/passwordsemail/PasswordsEmail.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/models/passwordsemail/PasswordsEmail.kt index 8cf51c38..07470a30 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/models/passwordsemail/PasswordsEmail.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/models/passwordsemail/PasswordsEmail.kt @@ -181,12 +181,12 @@ public data class ResetStartRequest @Json(name = "email") val email: String, /** - * The url that the user clicks from the password reset email to finish the reset password flow. - * This should be a url that your app receives and parses before showing your app's reset password page. - * After the user submits a new password to your app, it should send an API request to complete the password reset - * process. - * If this value is not passed, the default reset password redirect URL that you set in your Dashboard is used. - * If you have not set a default reset password redirect URL, an error is returned. + * The URL that the User is redirected to from the reset password magic link. This URL should display your application's + * reset password page. + * Before rendering the reset page, extract the `token` from the query parameters. On the reset page, collect the new + * password and complete the flow by calling the corresponding Password Reset by Email endpoint. + * If this parameter is not specified, the default Reset Password redirect URL configured in the Dashboard will be used. + * If you have not set a default Reset Password redirect URL, an error is returned. */ @Json(name = "reset_password_redirect_url") val resetPasswordRedirectURL: String? = null, @@ -219,7 +219,7 @@ public data class ResetStartRequest @Json(name = "login_redirect_url") val loginRedirectURL: String? = null, /** - * Used to determine which language to use when sending the user this delivery method. Parameter is a + * Used to determine which language to use when sending the user this delivery method. Parameter is an * [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. * * Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese @@ -233,8 +233,8 @@ public data class ResetStartRequest val locale: ResetStartRequestLocale? = null, /** * Use a custom template for password reset emails. By default, it will use your default email template. - * The template must be a template using our built-in customizations or a custom HTML email for Passwords - Password - * reset. + * Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in + * customization options or custom HTML templates with type “Passwords - Password reset”. */ @Json(name = "reset_password_template_id") val resetPasswordTemplateId: String? = null, diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/models/rbac/RBAC.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/models/rbac/RBAC.kt index 8801f684..22a24d88 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/models/rbac/RBAC.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/models/rbac/RBAC.kt @@ -23,6 +23,9 @@ public data class Policy */ @Json(name = "resources") val resources: List, + /** + * An array of [Scope objects](https://stytch.com/docs/api/rbac-scope-object). + */ @Json(name = "scopes") val scopes: List, ) @@ -102,10 +105,19 @@ public data class PolicyRolePermission public data class PolicyScope @JvmOverloads constructor( + /** + * The unique identifier of the RBAC Scope, provided by the developer and intended to be human-readable. + */ @Json(name = "scope") val scope: String, + /** + * The description of the RBAC Scope. + */ @Json(name = "description") val description: String, + /** + * A list of permissions that link a [Resource](https://stytch.com/docs/api/rbac-resource-object) to a list of actions. + */ @Json(name = "permissions") val permissions: List, ) @@ -114,8 +126,19 @@ public data class PolicyScope public data class PolicyScopePermission @JvmOverloads constructor( + /** + * A unique identifier of the RBAC Resource, provided by the developer and intended to be human-readable. + * + * A `resource_id` is not allowed to start with `stytch`, which is a special prefix used for Stytch default Resources + * with reserved `resource_id`s. + * + */ @Json(name = "resource_id") val resourceId: String, + /** + * A list of permitted actions the Scope is required to take with the provided Resource. You can use `*` as a wildcard to + * require a Scope permission to use all possible actions related to the Resource. + */ @Json(name = "actions") val actions: List, ) diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/models/users/Users.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/models/users/Users.kt index 1b31409e..b245ab27 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/models/users/Users.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/models/users/Users.kt @@ -284,6 +284,10 @@ public data class User */ @Json(name = "biometric_registrations") val biometricRegistrations: List, + /** + * Whether the User is temporarily locked due to too many failed authentication attempts. See the + * [User Locking Guide](https://stytch.com/docs/resources/platform/user-locks) for more information. + */ @Json(name = "is_locked") val isLocked: Boolean, /** @@ -321,10 +325,23 @@ public data class User */ @Json(name = "untrusted_metadata") val untrustedMetadata: Map? = emptyMap(), + /** + * An identifier that can be used in most API calls where a `member_id` is expected. This is a string consisting of + * alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters. External IDs must be unique + * within the project. + */ @Json(name = "external_id") val externalId: String? = null, + /** + * When the user lock was created, if there is one. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. + * `2021-12-29T12:33:09Z`. + */ @Json(name = "lock_created_at") val lockCreatedAt: Instant? = null, + /** + * When the user lock expires, if there is one. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. + * `2021-12-29T12:33:09Z`. + */ @Json(name = "lock_expires_at") val lockExpiresAt: Instant? = null, ) diff --git a/stytch/src/main/kotlin/com/stytch/java/consumer/models/webauthn/WebAuthn.kt b/stytch/src/main/kotlin/com/stytch/java/consumer/models/webauthn/WebAuthn.kt index ac1bc6c2..98abec30 100644 --- a/stytch/src/main/kotlin/com/stytch/java/consumer/models/webauthn/WebAuthn.kt +++ b/stytch/src/main/kotlin/com/stytch/java/consumer/models/webauthn/WebAuthn.kt @@ -183,6 +183,10 @@ public data class AuthenticateStartRequest */ @Json(name = "return_passkey_credential_options") val returnPasskeyCredentialOptions: Boolean? = null, + /** + * If true, values in the `public_key_credential_creation_options` will be base64 URL encoded. Set this option to true + * when using built-in browser methods like `navigator.credentials.create` and `navigator.credentials.get`. + */ @Json(name = "use_base64_url_encoding") val useBase64URLEncoding: Boolean? = null, ) @@ -426,6 +430,10 @@ public data class RegisterStartRequest val overrideName: String? = null, @Json(name = "override_display_name") val overrideDisplayName: String? = null, + /** + * If true, values in the `public_key_credential_creation_options` will be base64 URL encoded. Set this option to true + * when using built-in browser methods like `navigator.credentials.create` and `navigator.credentials.get`. + */ @Json(name = "use_base64_url_encoding") val useBase64URLEncoding: Boolean? = null, ) diff --git a/version.gradle.kts b/version.gradle.kts index 3e1d71cb..2876fa4e 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -1 +1 @@ -version = "9.2.0" +version = "10.0.0"