Skip to content

Commit 4d96a73

Browse files
author
Stytch Codegen Bot
committed
Add custom org roles endpoints
1 parent bb11d80 commit 4d96a73

File tree

72 files changed

+1155
-725
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1155
-725
lines changed

stytch/src/main/kotlin/com/stytch/java/b2b/StytchB2BClient.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,7 @@ import kotlinx.coroutines.SupervisorJob
5555

5656
public class StytchB2BClient
5757
@JvmOverloads
58-
constructor(
59-
projectId: String,
60-
secret: String,
61-
clientConfig: OptionalClientConfig = OptionalClientConfig(),
62-
) {
58+
constructor(projectId: String, secret: String, clientConfig: OptionalClientConfig = OptionalClientConfig()) {
6359
private val coroutineScope = CoroutineScope(SupervisorJob())
6460
private val baseUrl = getBaseUrl(projectId, clientConfig)
6561
private val httpClient: HttpClient =

stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryintermediatesessions/DiscoveryIntermediateSessions.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ internal class IntermediateSessionsImpl(
145145
}
146146

147147
override fun exchangeCompletable(data: ExchangeRequest): CompletableFuture<StytchResult<ExchangeResponse>> =
148-
coroutineScope
149-
.async {
150-
exchange(data)
151-
}.asCompletableFuture()
148+
coroutineScope.async {
149+
exchange(data)
150+
}.asCompletableFuture()
152151
}

stytch/src/main/kotlin/com/stytch/java/b2b/api/discoveryorganizations/DiscoveryOrganizations.kt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,9 @@ internal class OrganizationsImpl(
219219
}
220220

221221
override fun createCompletable(data: CreateRequest): CompletableFuture<StytchResult<CreateResponse>> =
222-
coroutineScope
223-
.async {
224-
create(data)
225-
}.asCompletableFuture()
222+
coroutineScope.async {
223+
create(data)
224+
}.asCompletableFuture()
226225

227226
override suspend fun list(data: ListRequest): StytchResult<ListResponse> =
228227
withContext(Dispatchers.IO) {
@@ -242,8 +241,7 @@ internal class OrganizationsImpl(
242241
}
243242

244243
override fun listCompletable(data: ListRequest): CompletableFuture<StytchResult<ListResponse>> =
245-
coroutineScope
246-
.async {
247-
list(data)
248-
}.asCompletableFuture()
244+
coroutineScope.async {
245+
list(data)
246+
}.asCompletableFuture()
249247
}

stytch/src/main/kotlin/com/stytch/java/b2b/api/idpoauth/IDPOAuth.kt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,9 @@ internal class OAuthImpl(
213213
}
214214

215215
override fun authorizeStartCompletable(data: AuthorizeStartRequest): CompletableFuture<StytchResult<AuthorizeStartResponse>> =
216-
coroutineScope
217-
.async {
218-
authorizeStart(data)
219-
}.asCompletableFuture()
216+
coroutineScope.async {
217+
authorizeStart(data)
218+
}.asCompletableFuture()
220219

221220
override suspend fun authorize(data: AuthorizeRequest): StytchResult<AuthorizeResponse> =
222221
withContext(Dispatchers.IO) {
@@ -236,8 +235,7 @@ internal class OAuthImpl(
236235
}
237236

238237
override fun authorizeCompletable(data: AuthorizeRequest): CompletableFuture<StytchResult<AuthorizeResponse>> =
239-
coroutineScope
240-
.async {
241-
authorize(data)
242-
}.asCompletableFuture()
238+
coroutineScope.async {
239+
authorize(data)
240+
}.asCompletableFuture()
243241
}

stytch/src/main/kotlin/com/stytch/java/b2b/api/impersonation/Impersonation.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ internal class ImpersonationImpl(
8282
}
8383

8484
override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture<StytchResult<AuthenticateResponse>> =
85-
coroutineScope
86-
.async {
87-
authenticate(data)
88-
}.asCompletableFuture()
85+
coroutineScope.async {
86+
authenticate(data)
87+
}.asCompletableFuture()
8988
}

stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinks/MagicLinks.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ internal class MagicLinksImpl(
129129
}
130130

131131
override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture<StytchResult<AuthenticateResponse>> =
132-
coroutineScope
133-
.async {
134-
authenticate(data)
135-
}.asCompletableFuture()
132+
coroutineScope.async {
133+
authenticate(data)
134+
}.asCompletableFuture()
136135
}

stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksdiscovery/MagicLinksDiscovery.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ internal class DiscoveryImpl(
6767
}
6868

6969
override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture<StytchResult<AuthenticateResponse>> =
70-
coroutineScope
71-
.async {
72-
authenticate(data)
73-
}.asCompletableFuture()
70+
coroutineScope.async {
71+
authenticate(data)
72+
}.asCompletableFuture()
7473
}

stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemail/MagicLinksEmail.kt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,9 @@ internal class EmailImpl(
137137
}
138138

139139
override fun loginOrSignupCompletable(data: LoginOrSignupRequest): CompletableFuture<StytchResult<LoginOrSignupResponse>> =
140-
coroutineScope
141-
.async {
142-
loginOrSignup(data)
143-
}.asCompletableFuture()
140+
coroutineScope.async {
141+
loginOrSignup(data)
142+
}.asCompletableFuture()
144143

145144
override suspend fun invite(
146145
data: InviteRequest,
@@ -170,8 +169,7 @@ internal class EmailImpl(
170169
data: InviteRequest,
171170
methodOptions: InviteRequestOptions?,
172171
): CompletableFuture<StytchResult<InviteResponse>> =
173-
coroutineScope
174-
.async {
175-
invite(data, methodOptions)
176-
}.asCompletableFuture()
172+
coroutineScope.async {
173+
invite(data, methodOptions)
174+
}.asCompletableFuture()
177175
}

stytch/src/main/kotlin/com/stytch/java/b2b/api/magiclinksemaildiscovery/MagicLinksEmailDiscovery.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ internal class DiscoveryImpl(
6464
}
6565

6666
override fun sendCompletable(data: SendRequest): CompletableFuture<StytchResult<SendResponse>> =
67-
coroutineScope
68-
.async {
69-
send(data)
70-
}.asCompletableFuture()
67+
coroutineScope.async {
68+
send(data)
69+
}.asCompletableFuture()
7170
}

stytch/src/main/kotlin/com/stytch/java/b2b/api/oauth/OAuth.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ internal class OAuthImpl(
148148
}
149149

150150
override fun authenticateCompletable(data: AuthenticateRequest): CompletableFuture<StytchResult<AuthenticateResponse>> =
151-
coroutineScope
152-
.async {
153-
authenticate(data)
154-
}.asCompletableFuture()
151+
coroutineScope.async {
152+
authenticate(data)
153+
}.asCompletableFuture()
155154
}

0 commit comments

Comments
 (0)