feat(dm): 음성 메시지 API 계약을 추가한다

This commit is contained in:
2026-07-11 22:02:51 +09:00
parent 2786e45c75
commit 62007862a5
2 changed files with 20 additions and 0 deletions

View File

@@ -2,10 +2,14 @@ package kr.co.vividnext.sodalive.v2.main.chat.dm.data
import io.reactivex.rxjava3.core.Single import io.reactivex.rxjava3.core.Single
import kr.co.vividnext.sodalive.common.ApiResponse import kr.co.vividnext.sodalive.common.ApiResponse
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.http.Body import retrofit2.http.Body
import retrofit2.http.GET import retrofit2.http.GET
import retrofit2.http.Multipart
import retrofit2.http.Header import retrofit2.http.Header
import retrofit2.http.POST import retrofit2.http.POST
import retrofit2.http.Part
import retrofit2.http.Path import retrofit2.http.Path
import retrofit2.http.Query import retrofit2.http.Query
@@ -30,4 +34,13 @@ interface DmChatApi {
@Query("cursor") cursor: Long?, @Query("cursor") cursor: Long?,
@Query("limit") limit: Int = 20 @Query("limit") limit: Int = 20
): Single<ApiResponse<DmChatMessagesPageResponse>> ): Single<ApiResponse<DmChatMessagesPageResponse>>
@Multipart
@POST("/api/v2/user-creator-chat/rooms/{roomId}/messages/voice")
fun sendDmVoiceMessage(
@Header("Authorization") authHeader: String,
@Path("roomId") roomId: Long,
@Part voiceMessageFile: MultipartBody.Part,
@Part("request") request: RequestBody
): Single<ApiResponse<SendDmVoiceMessageResponse>>
} }

View File

@@ -42,3 +42,10 @@ data class DmChatMessageResponse(
@SerializedName("senderNickname") val senderNickname: String, @SerializedName("senderNickname") val senderNickname: String,
@SerializedName("senderProfileImageUrl") val senderProfileImageUrl: String @SerializedName("senderProfileImageUrl") val senderProfileImageUrl: String
) )
@Keep
data class SendDmVoiceMessageResponse(
@SerializedName("message") val message: DmChatMessageResponse,
@SerializedName("deliveredRealtime") val deliveredRealtime: Boolean,
@SerializedName("pushSent") val pushSent: Boolean
)