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 79e60fc..c9bba74 100644 --- a/stytch/src/main/kotlin/com/stytch/java/b2b/StytchB2BClient.kt +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/StytchB2BClient.kt @@ -21,6 +21,8 @@ import com.stytch.java.b2b.api.rbac.RBAC import com.stytch.java.b2b.api.rbac.RBACImpl import com.stytch.java.b2b.api.recoverycodes.RecoveryCodes import com.stytch.java.b2b.api.recoverycodes.RecoveryCodesImpl +import com.stytch.java.b2b.api.scim.SCIM +import com.stytch.java.b2b.api.scim.SCIMImpl import com.stytch.java.b2b.api.sessions.Sessions import com.stytch.java.b2b.api.sessions.SessionsImpl import com.stytch.java.b2b.api.sso.SSO @@ -70,6 +72,9 @@ public object StytchB2BClient { @JvmStatic public lateinit var recoveryCodes: RecoveryCodes + @JvmStatic + public lateinit var scim: SCIM + @JvmStatic public lateinit var sso: SSO @@ -110,6 +115,7 @@ public object StytchB2BClient { passwords = PasswordsImpl(httpClient, coroutineScope) rbac = RBACImpl(httpClient, coroutineScope) recoveryCodes = RecoveryCodesImpl(httpClient, coroutineScope) + scim = SCIMImpl(httpClient, coroutineScope) sso = SSOImpl(httpClient, coroutineScope) sessions = SessionsImpl(httpClient, coroutineScope, httpsJwks, jwtOptions, policyCache) totps = TOTPsImpl(httpClient, coroutineScope) diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/scim/SCIM.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/scim/SCIM.kt new file mode 100644 index 0000000..d3bfbfc --- /dev/null +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/scim/SCIM.kt @@ -0,0 +1,27 @@ +package com.stytch.java.b2b.api.scim + +// !!! +// WARNING: This file is autogenerated +// Only modify code within MANUAL() sections +// or your changes may be overwritten later! +// !!! + +import com.squareup.moshi.Moshi +import com.stytch.java.b2b.api.scimconnections.Connections +import com.stytch.java.b2b.api.scimconnections.ConnectionsImpl +import com.stytch.java.common.InstantAdapter +import com.stytch.java.http.HttpClient +import kotlinx.coroutines.CoroutineScope + +public interface SCIM { + public val connections: Connections +} + +internal class SCIMImpl( + private val httpClient: HttpClient, + private val coroutineScope: CoroutineScope, +) : SCIM { + private val moshi = Moshi.Builder().add(InstantAdapter()).build() + + override val connections: Connections = ConnectionsImpl(httpClient, coroutineScope) +} diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/api/scimconnections/SCIMConnections.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/api/scimconnections/SCIMConnections.kt new file mode 100644 index 0000000..40d2051 --- /dev/null +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/api/scimconnections/SCIMConnections.kt @@ -0,0 +1,335 @@ +package com.stytch.java.b2b.api.scimconnections + +// !!! +// WARNING: This file is autogenerated +// Only modify code within MANUAL() sections +// or your changes may be overwritten later! +// !!! + +import com.squareup.moshi.JsonAdapter +import com.squareup.moshi.Moshi +import com.squareup.moshi.Types +import com.stytch.java.b2b.models.scimconnections.CreateRequest +import com.stytch.java.b2b.models.scimconnections.CreateResponse +import com.stytch.java.b2b.models.scimconnections.DeleteRequest +import com.stytch.java.b2b.models.scimconnections.DeleteResponse +import com.stytch.java.b2b.models.scimconnections.GetRequest +import com.stytch.java.b2b.models.scimconnections.GetResponse +import com.stytch.java.b2b.models.scimconnections.RotateCancelRequest +import com.stytch.java.b2b.models.scimconnections.RotateCancelResponse +import com.stytch.java.b2b.models.scimconnections.RotateCompleteRequest +import com.stytch.java.b2b.models.scimconnections.RotateCompleteResponse +import com.stytch.java.b2b.models.scimconnections.RotateStartRequest +import com.stytch.java.b2b.models.scimconnections.RotateStartResponse +import com.stytch.java.b2b.models.scimconnections.UpdateRequest +import com.stytch.java.b2b.models.scimconnections.UpdateResponse +import com.stytch.java.common.InstantAdapter +import com.stytch.java.common.StytchResult +import com.stytch.java.http.HttpClient +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.async +import kotlinx.coroutines.future.asCompletableFuture +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext +import java.util.concurrent.CompletableFuture + +public interface Connections { + /** + * Update a SCIM Connection. /%} + */ + public suspend fun update(data: UpdateRequest): StytchResult + + /** + * Update a SCIM Connection. /%} + */ + public fun update( + data: UpdateRequest, + callback: (StytchResult) -> Unit, + ) + + /** + * Update a SCIM Connection. /%} + */ + public fun updateCompletable(data: UpdateRequest): CompletableFuture> + + /** + * Deletes a SCIM Connection. /%} + */ + public suspend fun delete(data: DeleteRequest): StytchResult + + /** + * Deletes a SCIM Connection. /%} + */ + public fun delete( + data: DeleteRequest, + callback: (StytchResult) -> Unit, + ) + + /** + * Deletes a SCIM Connection. /%} + */ + public fun deleteCompletable(data: DeleteRequest): CompletableFuture> + + /** + * Start a SCIM token rotation. /%} + */ + public suspend fun rotateStart(data: RotateStartRequest): StytchResult + + /** + * Start a SCIM token rotation. /%} + */ + public fun rotateStart( + data: RotateStartRequest, + callback: (StytchResult) -> Unit, + ) + + /** + * Start a SCIM token rotation. /%} + */ + public fun rotateStartCompletable(data: RotateStartRequest): CompletableFuture> + + /** + * Completes a SCIM token rotation. This will complete the current token rotation process and update the active token to + * be the new token supplied in the [start SCIM token rotation](https://stytch.com/docs/b2b/api/scim-rotate-token-start) + * response. /%} + */ + public suspend fun rotateComplete(data: RotateCompleteRequest): StytchResult + + /** + * Completes a SCIM token rotation. This will complete the current token rotation process and update the active token to + * be the new token supplied in the [start SCIM token rotation](https://stytch.com/docs/b2b/api/scim-rotate-token-start) + * response. /%} + */ + public fun rotateComplete( + data: RotateCompleteRequest, + callback: (StytchResult) -> Unit, + ) + + /** + * Completes a SCIM token rotation. This will complete the current token rotation process and update the active token to + * be the new token supplied in the [start SCIM token rotation](https://stytch.com/docs/b2b/api/scim-rotate-token-start) + * response. /%} + */ + public fun rotateCompleteCompletable(data: RotateCompleteRequest): CompletableFuture> + + /** + * Cancel a SCIM token rotation. This will cancel the current token rotation process, keeping the original token active. + * /%} + */ + public suspend fun rotateCancel(data: RotateCancelRequest): StytchResult + + /** + * Cancel a SCIM token rotation. This will cancel the current token rotation process, keeping the original token active. + * /%} + */ + public fun rotateCancel( + data: RotateCancelRequest, + callback: (StytchResult) -> Unit, + ) + + /** + * Cancel a SCIM token rotation. This will cancel the current token rotation process, keeping the original token active. + * /%} + */ + public fun rotateCancelCompletable(data: RotateCancelRequest): CompletableFuture> + + /** + * Create a new SCIM Connection. /%} + */ + public suspend fun create(data: CreateRequest): StytchResult + + /** + * Create a new SCIM Connection. /%} + */ + public fun create( + data: CreateRequest, + callback: (StytchResult) -> Unit, + ) + + /** + * Create a new SCIM Connection. /%} + */ + public fun createCompletable(data: CreateRequest): CompletableFuture> + + /** + * Get SCIM Connections. /%} + */ + public suspend fun get(data: GetRequest): StytchResult + + /** + * Get SCIM Connections. /%} + */ + public fun get( + data: GetRequest, + callback: (StytchResult) -> Unit, + ) + + /** + * Get SCIM Connections. /%} + */ + public fun getCompletable(data: GetRequest): CompletableFuture> +} + +internal class ConnectionsImpl( + private val httpClient: HttpClient, + private val coroutineScope: CoroutineScope, +) : Connections { + private val moshi = Moshi.Builder().add(InstantAdapter()).build() + + override suspend fun update(data: UpdateRequest): StytchResult = + withContext(Dispatchers.IO) { + var headers = emptyMap() + + val asJson = moshi.adapter(UpdateRequest::class.java).toJson(data) + httpClient.put("/v1/b2b/scim/${data.organizationId}/connections/${data.connectionId}", asJson, headers) + } + + override fun update( + data: UpdateRequest, + callback: (StytchResult) -> Unit, + ) { + coroutineScope.launch { + callback(update(data)) + } + } + + override fun updateCompletable(data: UpdateRequest): CompletableFuture> = + coroutineScope.async { + update(data) + }.asCompletableFuture() + + override suspend fun delete(data: DeleteRequest): StytchResult = + withContext(Dispatchers.IO) { + var headers = emptyMap() + + httpClient.delete("/v1/b2b/scim/${data.organizationId}/connections/${data.connectionId}", headers) + } + + override fun delete( + data: DeleteRequest, + callback: (StytchResult) -> Unit, + ) { + coroutineScope.launch { + callback(delete(data)) + } + } + + override fun deleteCompletable(data: DeleteRequest): CompletableFuture> = + coroutineScope.async { + delete(data) + }.asCompletableFuture() + + override suspend fun rotateStart(data: RotateStartRequest): StytchResult = + withContext(Dispatchers.IO) { + var headers = emptyMap() + + val asJson = moshi.adapter(RotateStartRequest::class.java).toJson(data) + httpClient.post("/v1/b2b/scim/${data.organizationId}/connections/${data.connectionId}/rotate/start", asJson, headers) + } + + override fun rotateStart( + data: RotateStartRequest, + callback: (StytchResult) -> Unit, + ) { + coroutineScope.launch { + callback(rotateStart(data)) + } + } + + override fun rotateStartCompletable(data: RotateStartRequest): CompletableFuture> = + coroutineScope.async { + rotateStart(data) + }.asCompletableFuture() + + override suspend fun rotateComplete(data: RotateCompleteRequest): StytchResult = + withContext(Dispatchers.IO) { + var headers = emptyMap() + + val asJson = moshi.adapter(RotateCompleteRequest::class.java).toJson(data) + httpClient.post("/v1/b2b/scim/${data.organizationId}/connections/${data.connectionId}/rotate/complete", asJson, headers) + } + + override fun rotateComplete( + data: RotateCompleteRequest, + callback: (StytchResult) -> Unit, + ) { + coroutineScope.launch { + callback(rotateComplete(data)) + } + } + + override fun rotateCompleteCompletable(data: RotateCompleteRequest): CompletableFuture> = + coroutineScope.async { + rotateComplete(data) + }.asCompletableFuture() + + override suspend fun rotateCancel(data: RotateCancelRequest): StytchResult = + withContext(Dispatchers.IO) { + var headers = emptyMap() + + val asJson = moshi.adapter(RotateCancelRequest::class.java).toJson(data) + httpClient.post("/v1/b2b/scim/${data.organizationId}/connections/${data.connectionId}/rotate/cancel", asJson, headers) + } + + override fun rotateCancel( + data: RotateCancelRequest, + callback: (StytchResult) -> Unit, + ) { + coroutineScope.launch { + callback(rotateCancel(data)) + } + } + + override fun rotateCancelCompletable(data: RotateCancelRequest): CompletableFuture> = + coroutineScope.async { + rotateCancel(data) + }.asCompletableFuture() + + override suspend fun create(data: CreateRequest): StytchResult = + withContext(Dispatchers.IO) { + var headers = emptyMap() + + val asJson = moshi.adapter(CreateRequest::class.java).toJson(data) + httpClient.post("/v1/b2b/scim/${data.organizationId}/connections", asJson, headers) + } + + override fun create( + data: CreateRequest, + callback: (StytchResult) -> Unit, + ) { + coroutineScope.launch { + callback(create(data)) + } + } + + override fun createCompletable(data: CreateRequest): CompletableFuture> = + coroutineScope.async { + create(data) + }.asCompletableFuture() + + override suspend fun get(data: GetRequest): StytchResult = + withContext(Dispatchers.IO) { + var headers = emptyMap() + + val asJson = moshi.adapter(GetRequest::class.java).toJson(data) + val type = Types.newParameterizedType(Map::class.java, String::class.java, Any::class.java) + val adapter: JsonAdapter> = moshi.adapter(type) + val asMap = adapter.fromJson(asJson) ?: emptyMap() + httpClient.get("/v1/b2b/scim/${data.organizationId}/connections", asMap, headers) + } + + override fun get( + data: GetRequest, + callback: (StytchResult) -> Unit, + ) { + coroutineScope.launch { + callback(get(data)) + } + } + + override fun getCompletable(data: GetRequest): CompletableFuture> = + coroutineScope.async { + get(data) + }.asCompletableFuture() +} 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 new file mode 100644 index 0000000..054c5d1 --- /dev/null +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/scim/SCIM.kt @@ -0,0 +1,99 @@ +package com.stytch.java.b2b.models.scim + +// !!! +// WARNING: This file is autogenerated +// Only modify code within MANUAL() sections +// or your changes may be overwritten later! +// !!! + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass +import java.time.Instant + +@JsonClass(generateAdapter = true) +public data class SCIMConnection + @JvmOverloads + constructor( + @Json(name = "organization_id") + val organizationId: String, + @Json(name = "connection_id") + val connectionId: String, + @Json(name = "status") + val status: String, + @Json(name = "display_name") + val displayName: String, + @Json(name = "idp") + val identityProvider: String, + @Json(name = "base_url") + val baseURL: String, + @Json(name = "bearer_token_last_four") + val bearerTokenLastFour: String, + @Json(name = "scim_group_implicit_role_assignments") + val scimGroupImplicitRoleAssignments: List, + @Json(name = "bearer_token_expires_at") + val bearerTokenExpiresAt: Instant? = null, + ) + +@JsonClass(generateAdapter = true) +public data class SCIMConnectionWithNextToken + @JvmOverloads + constructor( + @Json(name = "organization_id") + val organizationId: String, + @Json(name = "connection_id") + val connectionId: String, + @Json(name = "status") + val status: String, + @Json(name = "display_name") + val displayName: String, + @Json(name = "base_url") + val baseURL: String, + @Json(name = "idp") + val identityProvider: String, + @Json(name = "bearer_token_last_four") + val bearerTokenLastFour: String, + @Json(name = "next_bearer_token") + val nextBearerToken: String, + @Json(name = "scim_group_implicit_role_assignments") + val scimGroupImplicitRoleAssignments: List, + @Json(name = "bearer_token_expires_at") + val bearerTokenExpiresAt: Instant? = null, + @Json(name = "next_bearer_token_expires_at") + val nextBearerTokenExpiresAt: Instant? = null, + ) + +@JsonClass(generateAdapter = true) +public data class SCIMConnectionWithToken + @JvmOverloads + constructor( + @Json(name = "organization_id") + val organizationId: String, + @Json(name = "connection_id") + val connectionId: String, + @Json(name = "status") + val status: String, + @Json(name = "display_name") + val displayName: String, + @Json(name = "idp") + val identityProvider: String, + @Json(name = "base_url") + val baseURL: String, + @Json(name = "bearer_token") + val bearerToken: String, + @Json(name = "scim_group_implicit_role_assignments") + val scimGroupImplicitRoleAssignments: List, + @Json(name = "bearer_token_expires_at") + val bearerTokenExpiresAt: Instant? = null, + ) + +@JsonClass(generateAdapter = true) +public data class SCIMGroupImplicitRoleAssignments + @JvmOverloads + constructor( + @Json(name = "role_id") + val roleId: String, + @Json(name = "group_id") + val groupId: String, + @Json(name = "group_name") + val groupName: String, + ) diff --git a/stytch/src/main/kotlin/com/stytch/java/b2b/models/scimconnections/SCIMConnections.kt b/stytch/src/main/kotlin/com/stytch/java/b2b/models/scimconnections/SCIMConnections.kt new file mode 100644 index 0000000..0d362e1 --- /dev/null +++ b/stytch/src/main/kotlin/com/stytch/java/b2b/models/scimconnections/SCIMConnections.kt @@ -0,0 +1,368 @@ +package com.stytch.java.b2b.models.scimconnections + +// !!! +// WARNING: This file is autogenerated +// Only modify code within MANUAL() sections +// or your changes may be overwritten later! +// !!! + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass +import com.stytch.java.b2b.models.scim.SCIMConnection +import com.stytch.java.b2b.models.scim.SCIMConnectionWithNextToken +import com.stytch.java.b2b.models.scim.SCIMConnectionWithToken +import com.stytch.java.b2b.models.scim.SCIMGroupImplicitRoleAssignments + +@JsonClass(generateAdapter = false) +public enum class CreateRequestIdp { + @Json(name = "unknown") + UNKNOWN, + + @Json(name = "okta") + OKTA, + + @Json(name = "microsoftentra") + MICROSOFTENTRA, +} + +@JsonClass(generateAdapter = false) +public enum class UpdateRequestIdp { + @Json(name = "unknown") + UNKNOWN, + + @Json(name = "okta") + OKTA, + + @Json(name = "microsoftentra") + MICROSOFTENTRA, +} + +/** +* Request type for `Connections.create`. +*/ +@JsonClass(generateAdapter = true) +public data class CreateRequest + @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. + */ + @Json(name = "organization_id") + val organizationId: String, + /** + * A human-readable display name for the connection. + */ + @Json(name = "display_name") + val displayName: String? = null, + @Json(name = "idp") + val identityProvider: CreateRequestIdp? = null, + ) + +/** +* Response type for `Connections.create`. +*/ +@JsonClass(generateAdapter = true) +public data class CreateResponse + @JvmOverloads + constructor( + /** + * Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we + * may ask for this value to help identify a specific API call when helping you debug an issue. + */ + @Json(name = "request_id") + val requestId: String, + /** + * The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values + * equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. + */ + @Json(name = "status_code") + val statusCode: Int, + /** + * 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. + */ + @Json(name = "connection") + val connection: SCIMConnectionWithToken? = null, + ) + +/** +* Request type for `Connections.delete`. +*/ +@JsonClass(generateAdapter = true) +public data class DeleteRequest + @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. + */ + @Json(name = "organization_id") + val organizationId: String, + /** + * Globally unique UUID that identifies a specific SSO `connection_id` for a Member. + */ + @Json(name = "connection_id") + val connectionId: String, + ) + +/** +* Response type for `Connections.delete`. +*/ +@JsonClass(generateAdapter = true) +public data class DeleteResponse + @JvmOverloads + constructor( + /** + * Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we + * may ask for this value to help identify a specific API call when helping you debug an issue. + */ + @Json(name = "request_id") + val requestId: String, + /** + * The `connection_id` that was deleted as part of the delete request. + */ + @Json(name = "connection_id") + val connectionId: String, + /** + * The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values + * equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. + */ + @Json(name = "status_code") + val statusCode: Int, + ) + +/** +* Request type for `Connections.get`. +*/ +@JsonClass(generateAdapter = true) +public data class GetRequest + @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. + */ + @Json(name = "organization_id") + val organizationId: String, + ) + +/** +* Response type for `Connections.get`. +*/ +@JsonClass(generateAdapter = true) +public data class GetResponse + @JvmOverloads + constructor( + /** + * Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we + * may ask for this value to help identify a specific API call when helping you debug an issue. + */ + @Json(name = "request_id") + val requestId: String, + @Json(name = "connections") + val connections: List, + /** + * The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values + * equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. + */ + @Json(name = "status_code") + val statusCode: Int, + ) + +/** +* Request type for `Connections.rotateCancel`. +*/ +@JsonClass(generateAdapter = true) +public data class RotateCancelRequest + @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. + */ + @Json(name = "organization_id") + val organizationId: String, + /** + * The ID of the SCIM connection. + */ + @Json(name = "connection_id") + val connectionId: String, + ) + +/** +* Response type for `Connections.rotateCancel`. +*/ +@JsonClass(generateAdapter = true) +public data class RotateCancelResponse + @JvmOverloads + constructor( + /** + * Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we + * may ask for this value to help identify a specific API call when helping you debug an issue. + */ + @Json(name = "request_id") + val requestId: String, + /** + * The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values + * equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. + */ + @Json(name = "status_code") + val statusCode: Int, + /** + * 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. + */ + @Json(name = "connection") + val connection: SCIMConnection? = null, + ) + +/** +* Request type for `Connections.rotateComplete`. +*/ +@JsonClass(generateAdapter = true) +public data class RotateCompleteRequest + @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. + */ + @Json(name = "organization_id") + val organizationId: String, + /** + * The ID of the SCIM connection. + */ + @Json(name = "connection_id") + val connectionId: String, + ) + +/** +* Response type for `Connections.rotateComplete`. +*/ +@JsonClass(generateAdapter = true) +public data class RotateCompleteResponse + @JvmOverloads + constructor( + /** + * Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we + * may ask for this value to help identify a specific API call when helping you debug an issue. + */ + @Json(name = "request_id") + val requestId: String, + /** + * The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values + * equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. + */ + @Json(name = "status_code") + val statusCode: Int, + /** + * 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. + */ + @Json(name = "connection") + val connection: SCIMConnection? = null, + ) + +/** +* Request type for `Connections.rotateStart`. +*/ +@JsonClass(generateAdapter = true) +public data class RotateStartRequest + @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. + */ + @Json(name = "organization_id") + val organizationId: String, + /** + * The ID of the SCIM connection. + */ + @Json(name = "connection_id") + val connectionId: String, + ) + +/** +* Response type for `Connections.rotateStart`. +*/ +@JsonClass(generateAdapter = true) +public data class RotateStartResponse + @JvmOverloads + constructor( + /** + * Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we + * may ask for this value to help identify a specific API call when helping you debug an issue. + */ + @Json(name = "request_id") + val requestId: String, + /** + * The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values + * equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. + */ + @Json(name = "status_code") + val statusCode: Int, + /** + * 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. + */ + @Json(name = "connection") + val connection: SCIMConnectionWithNextToken? = null, + ) + +/** +* Request type for `Connections.update`. +*/ +@JsonClass(generateAdapter = true) +public data class UpdateRequest + @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. + */ + @Json(name = "organization_id") + val organizationId: String, + /** + * The ID of the SCIM connection. + */ + @Json(name = "connection_id") + val connectionId: String, + /** + * A human-readable display name for the connection. + */ + @Json(name = "display_name") + val displayName: String? = null, + @Json(name = "idp") + val identityProvider: UpdateRequestIdp? = null, + @Json(name = "scim_group_implicit_role_assignments") + val scimGroupImplicitRoleAssignments: List? = emptyList(), + ) + +/** +* Response type for `Connections.update`. +*/ +@JsonClass(generateAdapter = true) +public data class UpdateResponse + @JvmOverloads + constructor( + /** + * Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we + * may ask for this value to help identify a specific API call when helping you debug an issue. + */ + @Json(name = "request_id") + val requestId: String, + /** + * The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values + * equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors. + */ + @Json(name = "status_code") + val statusCode: Int, + /** + * 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. + */ + @Json(name = "connection") + val connection: SCIMConnection? = 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 a02caf6..dc82ca3 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 = "4.0.0" +internal const val VERSION = "4.1.0" diff --git a/version.gradle.kts b/version.gradle.kts index 7ed90fe..b58821b 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -1 +1 @@ -version = "4.0.0" +version = "4.1.0"