diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/ConfigureNewAccountCommand.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/ConfigureNewAccountCommand.kt index 5345bcd..0af6d1f 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/ConfigureNewAccountCommand.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/ConfigureNewAccountCommand.kt @@ -5,7 +5,7 @@ import io.timemates.api.rsocket.authorizations.types.sdk import io.timemates.api.rsocket.common.commands.RSocketCommand import io.timemates.api.rsocket.common.ext.requestResponse import io.timemates.sdk.authorization.email.requests.ConfigureNewAccountRequest -import io.timemates.api.rsocket.authorizations.requests.ConfigureAccountRequest as RSocketConfigureAccountRequest +import io.timemates.api.rsocket.authorizations.requests.RSocketConfigureAccountRequest as RSocketConfigureAccountRequest internal object ConfigureNewAccountCommand : RSocketCommand { override suspend fun execute(rSocket: RSocket, input: ConfigureNewAccountRequest): ConfigureNewAccountRequest.Result { diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/ConfirmAuthorizationCommand.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/ConfirmAuthorizationCommand.kt index bdfebe8..a6c0a1d 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/ConfirmAuthorizationCommand.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/ConfirmAuthorizationCommand.kt @@ -5,7 +5,7 @@ import io.timemates.api.rsocket.authorizations.types.sdk import io.timemates.api.rsocket.common.commands.RSocketCommand import io.timemates.api.rsocket.common.ext.requestResponse import io.timemates.sdk.authorization.email.requests.ConfirmAuthorizationRequest -import io.timemates.api.rsocket.authorizations.requests.ConfirmAuthorizationRequest as RSocketConfirmAuthorizationRequest +import io.timemates.api.rsocket.authorizations.requests.RSocketConfirmAuthorizationRequest as RSocketConfirmAuthorizationRequest internal object ConfirmAuthorizationCommand : RSocketCommand { override suspend fun execute(rSocket: RSocket, input: ConfirmAuthorizationRequest): ConfirmAuthorizationRequest.Result { diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/GetAuthorizationSessionsCommand.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/GetAuthorizationSessionsCommand.kt index 33b0b84..433260b 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/GetAuthorizationSessionsCommand.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/GetAuthorizationSessionsCommand.kt @@ -1,7 +1,7 @@ package io.timemates.api.rsocket.authorizations.commands import io.rsocket.kotlin.RSocket -import io.timemates.api.rsocket.authorizations.requests.GetAuthorizationsRequest +import io.timemates.api.rsocket.authorizations.requests.RSocketGetAuthorizationsRequest import io.timemates.api.rsocket.authorizations.types.SerializableAuthorization import io.timemates.api.rsocket.authorizations.types.sdk import io.timemates.api.rsocket.common.commands.RSocketCommand @@ -16,7 +16,7 @@ internal object GetAuthorizationSessionsCommand : RSocketCommand { return rSocket.requestResponse( route = "authorizations.list", - data = GetAuthorizationsRequest(input.nextPageToken?.string), + data = RSocketGetAuthorizationsRequest(input.nextPageToken?.string), accessHash = input.accessHash.string, ).let { result -> Page( diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/RenewAuthorizationCommand.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/RenewAuthorizationCommand.kt index ba7bbfd..63a83fa 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/RenewAuthorizationCommand.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/RenewAuthorizationCommand.kt @@ -7,7 +7,7 @@ import io.timemates.sdk.authorization.sessions.requests.RenewAuthorizationReques import io.timemates.sdk.authorization.types.value.AccessHash import io.timemates.sdk.common.annotations.ExperimentalTimeMatesApi import io.timemates.sdk.common.constructor.createOrThrow -import io.timemates.api.rsocket.authorizations.requests.RenewAuthorizationRequest as RSocketRenewAuthorizationRequest +import io.timemates.api.rsocket.authorizations.requests.RSocketRenewAuthorizationRequest as RSocketRenewAuthorizationRequest @OptIn(ExperimentalTimeMatesApi::class) internal object RenewAuthorizationCommand : RSocketCommand { diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/StartAuthorizationCommand.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/StartAuthorizationCommand.kt index 8394eb8..7832cac 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/StartAuthorizationCommand.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/StartAuthorizationCommand.kt @@ -9,7 +9,7 @@ import io.timemates.sdk.authorization.email.types.value.VerificationHash import io.timemates.sdk.common.constructor.createOrThrow import io.timemates.sdk.common.types.value.Count import kotlinx.datetime.Instant -import io.timemates.api.rsocket.authorizations.requests.StartAuthorizationRequest as RSocketStartAuthorizationRequest +import io.timemates.api.rsocket.authorizations.requests.RSocketStartAuthorizationRequest as RSocketStartAuthorizationRequest internal object StartAuthorizationCommand : RSocketCommand { override suspend fun execute( diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/TerminateCurrentAuthorizationCommand.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/TerminateCurrentAuthorizationCommand.kt index c99e1f9..2bb1e29 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/TerminateCurrentAuthorizationCommand.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/commands/TerminateCurrentAuthorizationCommand.kt @@ -1,7 +1,7 @@ package io.timemates.api.rsocket.authorizations.commands import io.rsocket.kotlin.RSocket -import io.timemates.api.rsocket.authorizations.requests.TerminateAuthorizationRequest +import io.timemates.api.rsocket.authorizations.requests.RSocketTerminateAuthorizationRequest import io.timemates.api.rsocket.common.commands.RSocketCommand import io.timemates.api.rsocket.common.ext.requestResponse import io.timemates.sdk.authorization.sessions.requests.TerminateCurrentAuthorizationSessionRequest @@ -11,7 +11,7 @@ internal object TerminateCurrentAuthorizationCommand : RSocketCommand Empty } } diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/ConfigureAccountRequest.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketConfigureAccountRequest.kt similarity index 79% rename from rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/ConfigureAccountRequest.kt rename to rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketConfigureAccountRequest.kt index 8f0a72a..88319b1 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/ConfigureAccountRequest.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketConfigureAccountRequest.kt @@ -5,11 +5,11 @@ import io.timemates.api.rsocket.common.markers.RSocketRequest import kotlinx.serialization.Serializable @Serializable -internal data class ConfigureAccountRequest( +internal data class RSocketConfigureAccountRequest( val verificationHash: String, val name: String, val description: String?, -) : RSocketRequest { +) : RSocketRequest { @Serializable data class Result( val authorization: SerializableAuthorization, diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/ConfirmAuthorizationRequest.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketConfirmAuthorizationRequest.kt similarity index 78% rename from rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/ConfirmAuthorizationRequest.kt rename to rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketConfirmAuthorizationRequest.kt index a8fb57d..0568cd6 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/ConfirmAuthorizationRequest.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketConfirmAuthorizationRequest.kt @@ -5,10 +5,10 @@ import io.timemates.api.rsocket.common.markers.RSocketRequest import kotlinx.serialization.Serializable @Serializable -internal data class ConfirmAuthorizationRequest( +internal data class RSocketConfirmAuthorizationRequest( val verificationHash: String, val confirmationCode: String, -) : RSocketRequest { +) : RSocketRequest { data class Response( val isNewAccount: Boolean, val authorization: SerializableAuthorization?, diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/GetAuthorizationsRequest.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketGetAuthorizationsRequest.kt similarity index 77% rename from rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/GetAuthorizationsRequest.kt rename to rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketGetAuthorizationsRequest.kt index f191ad6..4ec8464 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/GetAuthorizationsRequest.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketGetAuthorizationsRequest.kt @@ -5,9 +5,9 @@ import io.timemates.api.rsocket.common.markers.RSocketRequest import kotlinx.serialization.Serializable @Serializable -internal data class GetAuthorizationsRequest( +internal data class RSocketGetAuthorizationsRequest( val pageToken: String? = null, -) : RSocketRequest { +) : RSocketRequest { @Serializable data class Result(val list: List, val nextPageToken: String?) diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RenewAuthorizationRequest.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketRenewAuthorizationRequest.kt similarity index 70% rename from rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RenewAuthorizationRequest.kt rename to rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketRenewAuthorizationRequest.kt index 1656599..1d52739 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RenewAuthorizationRequest.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketRenewAuthorizationRequest.kt @@ -4,9 +4,9 @@ import io.timemates.api.rsocket.common.markers.RSocketRequest import kotlinx.serialization.Serializable @Serializable -internal data class RenewAuthorizationRequest( +internal data class RSocketRenewAuthorizationRequest( val refreshHash: String, -) : RSocketRequest { +) : RSocketRequest { @Serializable data class Result(val accessHash: String) } \ No newline at end of file diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/StartAuthorizationRequest.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketStartAuthorizationRequest.kt similarity index 80% rename from rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/StartAuthorizationRequest.kt rename to rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketStartAuthorizationRequest.kt index 8904e26..33d6e2e 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/StartAuthorizationRequest.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketStartAuthorizationRequest.kt @@ -5,10 +5,10 @@ import io.timemates.api.rsocket.common.markers.RSocketRequest import kotlinx.serialization.Serializable @Serializable -internal data class StartAuthorizationRequest( +internal data class RSocketStartAuthorizationRequest( val email: String, val clientMetadata: SerializableAuthMetadata, -) : RSocketRequest { +) : RSocketRequest { @Serializable data class Result( val verificationHash: String, diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/TerminateAuthorizationRequest.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketTerminateAuthorizationRequest.kt similarity index 70% rename from rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/TerminateAuthorizationRequest.kt rename to rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketTerminateAuthorizationRequest.kt index 5bcdba0..f46d8a0 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/TerminateAuthorizationRequest.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/authorizations/requests/RSocketTerminateAuthorizationRequest.kt @@ -5,11 +5,11 @@ import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -internal sealed class TerminateAuthorizationRequest : RSocketRequest { +internal sealed class RSocketTerminateAuthorizationRequest : RSocketRequest { /** * This type of termination request terminates authorization with which * user has sent termination request. */ @SerialName("current") - data object Current : TerminateAuthorizationRequest() + data object Current : RSocketTerminateAuthorizationRequest() } \ No newline at end of file diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/commands/EditEmailCommand.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/commands/EditEmailCommand.kt index 9de520a..b5b8080 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/commands/EditEmailCommand.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/commands/EditEmailCommand.kt @@ -3,11 +3,8 @@ package io.timemates.api.rsocket.users.commands import io.rsocket.kotlin.RSocket import io.timemates.api.rsocket.common.commands.RSocketCommand import io.timemates.api.rsocket.common.ext.requestResponse -import io.timemates.api.rsocket.users.requests.EditUserProfileRequest -import io.timemates.api.rsocket.users.types.serializable import io.timemates.sdk.common.annotations.ExperimentalTimeMatesApi import io.timemates.sdk.common.types.Empty -import io.timemates.sdk.users.profile.requests.EditProfileRequest import io.timemates.sdk.users.settings.requests.EditEmailRequest @OptIn(ExperimentalTimeMatesApi::class) @@ -15,7 +12,7 @@ internal object EditEmailCommand : RSocketCommand { override suspend fun execute(rSocket: RSocket, input: EditEmailRequest): Empty { return rSocket.requestResponse( route = "users.email.edit", - data = io.timemates.api.rsocket.users.requests.EditEmailRequest( + data = io.timemates.api.rsocket.users.requests.RSocketEditEmailRequest( email = input.newEmail.string, ), accessHash = input.accessHash.string, diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/commands/EditProfileCommand.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/commands/EditProfileCommand.kt index 556a5b5..14b44dc 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/commands/EditProfileCommand.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/commands/EditProfileCommand.kt @@ -3,7 +3,7 @@ package io.timemates.api.rsocket.users.commands import io.rsocket.kotlin.RSocket import io.timemates.api.rsocket.common.commands.RSocketCommand import io.timemates.api.rsocket.common.ext.requestResponse -import io.timemates.api.rsocket.users.requests.EditUserProfileRequest +import io.timemates.api.rsocket.users.requests.RSocketEditUserProfileRequest import io.timemates.api.rsocket.users.types.serializable import io.timemates.sdk.common.types.Empty import io.timemates.sdk.users.profile.requests.EditProfileRequest @@ -12,7 +12,7 @@ internal object EditProfileCommand : RSocketCommand { override suspend fun execute(rSocket: RSocket, input: EditProfileRequest): Empty { return rSocket.requestResponse( route = "users.profile.edit", - data = EditUserProfileRequest( + data = RSocketEditUserProfileRequest( name = input.name?.string, description = input.description?.string, avatar = input.avatar?.serializable(), diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/commands/GetUsersCommand.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/commands/GetUsersCommand.kt index 02c6e93..8bb7a8c 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/commands/GetUsersCommand.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/commands/GetUsersCommand.kt @@ -6,7 +6,7 @@ import io.timemates.api.rsocket.common.ext.requestResponse import io.timemates.api.rsocket.users.types.SerializableUser import io.timemates.api.rsocket.users.types.sdk import io.timemates.sdk.users.profile.requests.GetUsersRequest -import io.timemates.api.rsocket.users.requests.GetUsersRequest as RSocketGetUsersRequest +import io.timemates.api.rsocket.users.requests.RSocketGetUsersRequest as RSocketGetUsersRequest internal object GetUsersCommand : RSocketCommand { override suspend fun execute(rSocket: RSocket, input: GetUsersRequest): GetUsersRequest.Result { diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/EditEmailRequest.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/RSocketEditEmailRequest.kt similarity index 82% rename from rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/EditEmailRequest.kt rename to rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/RSocketEditEmailRequest.kt index 7a10739..6407e4c 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/EditEmailRequest.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/RSocketEditEmailRequest.kt @@ -4,6 +4,6 @@ import io.timemates.api.rsocket.common.markers.RSocketRequest import kotlinx.serialization.Serializable @Serializable -internal data class EditEmailRequest( +internal data class RSocketEditEmailRequest( val email: String, ) : RSocketRequest \ No newline at end of file diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/EditUserProfileRequest.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/RSocketEditUserProfileRequest.kt similarity index 87% rename from rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/EditUserProfileRequest.kt rename to rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/RSocketEditUserProfileRequest.kt index 405e4a1..1b754b3 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/EditUserProfileRequest.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/RSocketEditUserProfileRequest.kt @@ -5,7 +5,7 @@ import io.timemates.api.rsocket.users.types.SerializableAvatar import kotlinx.serialization.Serializable @Serializable -internal data class EditUserProfileRequest( +internal data class RSocketEditUserProfileRequest( val avatar: SerializableAvatar?, val name: String?, val description: String?, diff --git a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/GetUsersRequest.kt b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/RSocketGetUsersRequest.kt similarity index 77% rename from rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/GetUsersRequest.kt rename to rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/RSocketGetUsersRequest.kt index ae4a011..d502374 100644 --- a/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/GetUsersRequest.kt +++ b/rsocket-engine/src/commonMain/kotlin/io/timemates/api/rsocket/users/requests/RSocketGetUsersRequest.kt @@ -5,9 +5,9 @@ import io.timemates.api.rsocket.users.types.SerializableUser import kotlinx.serialization.Serializable @Serializable -internal data class GetUsersRequest( +internal data class RSocketGetUsersRequest( val ids: List, -) : RSocketRequest { +) : RSocketRequest { @Serializable data class Result(val list: List) } \ No newline at end of file