1717package io.getstream.chat.android.client.api2.endpoint
1818
1919import io.getstream.chat.android.client.api.AuthenticatedApi
20- import io.getstream.chat.android.client.api2.model.response.MessageResponse
2120import io.getstream.chat.android.client.call.RetrofitCall
2221import io.getstream.chat.android.network.models.CreateDraftResponse
22+ import io.getstream.chat.android.network.models.DeleteMessageResponse
23+ import io.getstream.chat.android.network.models.DeleteReactionResponse
24+ import io.getstream.chat.android.network.models.GetMessageResponse
2325import io.getstream.chat.android.network.models.GetReactionsResponse
2426import io.getstream.chat.android.network.models.GetRepliesResponse
2527import io.getstream.chat.android.network.models.MessageActionRequest
28+ import io.getstream.chat.android.network.models.MessageActionResponse
2629import io.getstream.chat.android.network.models.QueryDraftsRequest
2730import io.getstream.chat.android.network.models.QueryDraftsResponse
2831import io.getstream.chat.android.network.models.QueryReactionsRequest
2932import io.getstream.chat.android.network.models.QueryReactionsResponse
3033import io.getstream.chat.android.network.models.Response
3134import io.getstream.chat.android.network.models.SendMessageRequest
35+ import io.getstream.chat.android.network.models.SendMessageResponse
3236import io.getstream.chat.android.network.models.SendReactionRequest
3337import io.getstream.chat.android.network.models.SendReactionResponse
3438import io.getstream.chat.android.network.models.TranslateMessageRequest
39+ import io.getstream.chat.android.network.models.TranslateMessageResponse
3540import io.getstream.chat.android.network.models.UpdateMessagePartialRequest
41+ import io.getstream.chat.android.network.models.UpdateMessagePartialResponse
3642import io.getstream.chat.android.network.models.UpdateMessageRequest
43+ import io.getstream.chat.android.network.models.UpdateMessageResponse
3744import retrofit2.http.Body
3845import retrofit2.http.DELETE
3946import retrofit2.http.GET
@@ -54,7 +61,7 @@ internal interface MessageApi {
5461 @Path(" type" ) channelType : String ,
5562 @Path(" id" ) channelId : String ,
5663 @Body message : SendMessageRequest ,
57- ): RetrofitCall <MessageResponse >
64+ ): RetrofitCall <SendMessageResponse >
5865
5966 @POST(" /channels/{type}/{id}/draft" )
6067 fun createDraftMessage (
@@ -77,7 +84,7 @@ internal interface MessageApi {
7784 fun queryDrafts (@Body body : QueryDraftsRequest ): RetrofitCall <QueryDraftsResponse >
7885
7986 @GET(" /messages/{id}" )
80- fun getMessage (@Path(" id" ) messageId : String ): RetrofitCall <MessageResponse >
87+ fun getMessage (@Path(" id" ) messageId : String ): RetrofitCall <GetMessageResponse >
8188
8289 /* *
8390 * [REST documentation]()https://getstream.io/chat/docs/rest/#messages-updatemessage)
@@ -86,7 +93,7 @@ internal interface MessageApi {
8693 fun updateMessage (
8794 @Path(" id" ) messageId : String ,
8895 @Body message : UpdateMessageRequest ,
89- ): RetrofitCall <MessageResponse >
96+ ): RetrofitCall <UpdateMessageResponse >
9097
9198 /* *
9299 * [Rest documentation](https://getstream.io/chat/docs/rest/#messages-updatemessagepartial-request)
@@ -95,20 +102,20 @@ internal interface MessageApi {
95102 fun partialUpdateMessage (
96103 @Path(" id" ) messageId : String ,
97104 @Body body : UpdateMessagePartialRequest ,
98- ): RetrofitCall <MessageResponse >
105+ ): RetrofitCall <UpdateMessagePartialResponse >
99106
100107 @DELETE(" /messages/{id}" )
101108 fun deleteMessage (
102109 @Path(" id" ) messageId : String ,
103110 @Query(" hard" ) hard : Boolean? ,
104111 @Query(" delete_for_me" ) deleteForMe : Boolean? ,
105- ): RetrofitCall <MessageResponse >
112+ ): RetrofitCall <DeleteMessageResponse >
106113
107114 @POST(" /messages/{id}/action" )
108115 fun sendAction (
109116 @Path(" id" ) messageId : String ,
110117 @Body request : MessageActionRequest ,
111- ): RetrofitCall <MessageResponse >
118+ ): RetrofitCall <MessageActionResponse >
112119
113120 @POST(" /messages/{id}/reaction" )
114121 fun sendReaction (
@@ -120,7 +127,7 @@ internal interface MessageApi {
120127 fun deleteReaction (
121128 @Path(" id" ) messageId : String ,
122129 @Path(" type" ) reactionType : String ,
123- ): RetrofitCall <MessageResponse >
130+ ): RetrofitCall <DeleteReactionResponse >
124131
125132 @GET(" /messages/{id}/reactions" )
126133 fun getReactions (
@@ -139,7 +146,7 @@ internal interface MessageApi {
139146 fun translate (
140147 @Path(" messageId" ) messageId : String ,
141148 @Body request : TranslateMessageRequest ,
142- ): RetrofitCall <MessageResponse >
149+ ): RetrofitCall <TranslateMessageResponse >
143150
144151 @GET(" /messages/{parent_id}/replies" )
145152 fun getReplies (
0 commit comments