Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions stream-chat-android-client/src/main/baseline-prof.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1243,10 +1243,6 @@ Lio/getstream/chat/android/client/api2/model/response/ChannelResponseJsonAdapter
HSPLio/getstream/chat/android/client/api2/model/response/ChannelResponseJsonAdapter;-><init>(Lcom/squareup/moshi/Moshi;)V
HPLio/getstream/chat/android/client/api2/model/response/ChannelResponseJsonAdapter;->fromJson(Lcom/squareup/moshi/JsonReader;)Lio/getstream/chat/android/client/api2/model/response/ChannelResponse;
HPLio/getstream/chat/android/client/api2/model/response/ChannelResponseJsonAdapter;->fromJson(Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
PLio/getstream/chat/android/client/api2/model/response/CompletableResponse;-><init>(Ljava/lang/String;)V
PLio/getstream/chat/android/client/api2/model/response/CompletableResponseJsonAdapter;-><init>(Lcom/squareup/moshi/Moshi;)V
PLio/getstream/chat/android/client/api2/model/response/CompletableResponseJsonAdapter;->fromJson(Lcom/squareup/moshi/JsonReader;)Lio/getstream/chat/android/client/api2/model/response/CompletableResponse;
PLio/getstream/chat/android/client/api2/model/response/CompletableResponseJsonAdapter;->fromJson(Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
PLio/getstream/chat/android/client/api2/model/response/EventResponseJsonAdapter;-><init>(Lcom/squareup/moshi/Moshi;)V
Lio/getstream/chat/android/client/api2/model/response/FileUploadConfigDto;
HSPLio/getstream/chat/android/client/api2/model/response/FileUploadConfigDto;-><init>(Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/lang/Long;)V
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

package io.getstream.chat.android.client.api

import io.getstream.chat.android.client.api.models.CompletableResponse
import io.getstream.chat.android.client.api.models.UploadFileResponse
import io.getstream.chat.android.client.call.RetrofitCall
import io.getstream.chat.android.client.utils.ProgressCallback
import io.getstream.chat.android.network.models.Response
import okhttp3.MultipartBody
import retrofit2.http.DELETE
import retrofit2.http.Multipart
Expand Down Expand Up @@ -54,14 +54,14 @@ internal interface RetrofitCdnApi {
@Path("type") channelType: String,
@Path("id") channelId: String,
@Query("url") url: String,
): RetrofitCall<CompletableResponse>
): RetrofitCall<Response>

@DELETE("/channels/{type}/{id}/image")
fun deleteImage(
@Path("type") channelType: String,
@Path("id") channelId: String,
@Query("url") url: String,
): RetrofitCall<CompletableResponse>
): RetrofitCall<Response>

@Multipart
@POST("/uploads/file")
Expand All @@ -73,7 +73,7 @@ internal interface RetrofitCdnApi {
@DELETE("/uploads/file")
fun deleteFile(
@Query("url") url: String,
): RetrofitCall<CompletableResponse>
): RetrofitCall<Response>

@Multipart
@POST("/uploads/image")
Expand All @@ -85,5 +85,5 @@ internal interface RetrofitCdnApi {
@DELETE("/uploads/image")
fun deleteImage(
@Query("url") url: String,
): RetrofitCall<CompletableResponse>
): RetrofitCall<Response>
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ import io.getstream.chat.android.client.api2.model.requests.UpdateCooldownReques
import io.getstream.chat.android.client.api2.model.requests.UpdateMemberPartialRequest
import io.getstream.chat.android.client.api2.model.requests.UpdateMemberPartialResponse
import io.getstream.chat.android.client.api2.model.response.ChannelResponse
import io.getstream.chat.android.client.api2.model.response.CompletableResponse
import io.getstream.chat.android.client.api2.model.response.EventResponse
import io.getstream.chat.android.client.api2.model.response.MessagesResponse
import io.getstream.chat.android.client.api2.model.response.QueryChannelsResponse
import io.getstream.chat.android.client.api2.model.response.QueryGroupedChannelsResponse
import io.getstream.chat.android.client.call.RetrofitCall
import io.getstream.chat.android.network.models.Response
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
Expand Down Expand Up @@ -89,7 +89,7 @@ internal interface ChannelApi {
@POST("/channels/read")
fun markAllRead(
@Body map: Map<String, String> = emptyMap(),
): RetrofitCall<CompletableResponse>
): RetrofitCall<Response>

@POST("/channels/{type}/{id}")
fun updateChannel(
Expand Down Expand Up @@ -175,7 +175,7 @@ internal interface ChannelApi {
@Path("type") channelType: String,
@Path("id") channelId: String,
@Body body: HideChannelRequest,
): RetrofitCall<CompletableResponse>
): RetrofitCall<Response>

@POST("/channels/{type}/{id}/truncate")
fun truncateChannel(
Expand All @@ -197,22 +197,22 @@ internal interface ChannelApi {
@Path("type") channelType: String,
@Path("id") channelId: String,
@Body request: MarkReadRequest,
): RetrofitCall<CompletableResponse>
): RetrofitCall<Response>

@POST("/channels/{type}/{id}/unread")
fun markUnread(
@Path("type") channelType: String,
@Path("id") channelId: String,
@Body request: MarkUnreadRequest,
): RetrofitCall<CompletableResponse>
): RetrofitCall<Response>

@POST("/channels/{type}/{id}/show")
@JvmSuppressWildcards // See issue: https://github.com/square/retrofit/issues/3275
fun showChannel(
@Path("type") channelType: String,
@Path("id") channelId: String,
@Body body: Map<Any, Any>,
): RetrofitCall<CompletableResponse>
): RetrofitCall<Response>

@POST("/channels/{type}/{id}/stop-watching")
@JvmSuppressWildcards // See issue: https://github.com/square/retrofit/issues/3275
Expand All @@ -221,7 +221,7 @@ internal interface ChannelApi {
@Path("id") channelId: String,
@Query(QueryParams.CONNECTION_ID) connectionId: String,
@Body body: Map<Any, Any>,
): RetrofitCall<CompletableResponse>
): RetrofitCall<Response>

@GET("/channels/{type}/{id}/pinned_messages")
fun getPinnedMessages(
Expand All @@ -233,5 +233,5 @@ internal interface ChannelApi {
@POST("/channels/delivered")
fun markDelivered(
@Body request: MarkDeliveredRequest,
): RetrofitCall<CompletableResponse>
): RetrofitCall<Response>
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ package io.getstream.chat.android.client.api2.endpoint

import io.getstream.chat.android.client.api.AuthenticatedApi
import io.getstream.chat.android.client.api2.model.requests.AddDeviceRequest
import io.getstream.chat.android.client.api2.model.response.CompletableResponse
import io.getstream.chat.android.client.api2.model.response.DevicesResponse
import io.getstream.chat.android.client.call.RetrofitCall
import io.getstream.chat.android.network.models.Response
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
Expand All @@ -34,8 +34,8 @@ internal interface DeviceApi {
fun getDevices(): RetrofitCall<DevicesResponse>

@POST("/devices")
fun addDevices(@Body request: AddDeviceRequest): RetrofitCall<CompletableResponse>
fun addDevices(@Body request: AddDeviceRequest): RetrofitCall<Response>

@DELETE("/devices")
fun deleteDevice(@Query("id") id: String): RetrofitCall<CompletableResponse>
fun deleteDevice(@Query("id") id: String): RetrofitCall<Response>
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import io.getstream.chat.android.client.api2.model.requests.ReactionRequest
import io.getstream.chat.android.client.api2.model.requests.SendActionRequest
import io.getstream.chat.android.client.api2.model.requests.SendMessageRequest
import io.getstream.chat.android.client.api2.model.requests.UpdateMessageRequest
import io.getstream.chat.android.client.api2.model.response.CompletableResponse
import io.getstream.chat.android.client.api2.model.response.DraftMessageResponse
import io.getstream.chat.android.client.api2.model.response.MessageResponse
import io.getstream.chat.android.client.api2.model.response.MessagesResponse
Expand All @@ -35,6 +34,7 @@ import io.getstream.chat.android.client.api2.model.response.ReactionResponse
import io.getstream.chat.android.client.api2.model.response.ReactionsResponse
import io.getstream.chat.android.client.api2.model.response.TranslateMessageRequest
import io.getstream.chat.android.client.call.RetrofitCall
import io.getstream.chat.android.network.models.Response
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
Expand Down Expand Up @@ -69,7 +69,7 @@ internal interface MessageApi {
@Path("type") channelType: String,
@Path("id") channelId: String,
@Query("parent_id") parentId: String?,
): RetrofitCall<CompletableResponse>
): RetrofitCall<Response>

@POST("/drafts/query")
fun queryDraftMessages(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import io.getstream.chat.android.client.api2.model.requests.FlagRequest
import io.getstream.chat.android.client.api2.model.requests.MuteChannelRequest
import io.getstream.chat.android.client.api2.model.requests.MuteUserRequest
import io.getstream.chat.android.client.api2.model.requests.QueryBannedUsersRequest
import io.getstream.chat.android.client.api2.model.response.CompletableResponse
import io.getstream.chat.android.client.api2.model.response.FlagResponse
import io.getstream.chat.android.client.api2.model.response.MuteUserResponse
import io.getstream.chat.android.client.api2.model.response.QueryBannedUsersResponse
import io.getstream.chat.android.client.call.RetrofitCall
import io.getstream.chat.android.network.models.Response
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
Expand All @@ -41,13 +41,13 @@ internal interface ModerationApi {
fun muteUser(@Body body: MuteUserRequest): RetrofitCall<MuteUserResponse>

@POST("/moderation/unmute")
fun unmuteUser(@Body body: MuteUserRequest): RetrofitCall<CompletableResponse>
fun unmuteUser(@Body body: MuteUserRequest): RetrofitCall<Response>

@POST("/moderation/mute/channel")
fun muteChannel(@Body body: MuteChannelRequest): RetrofitCall<CompletableResponse>
fun muteChannel(@Body body: MuteChannelRequest): RetrofitCall<Response>

@POST("/moderation/unmute/channel")
fun unmuteChannel(@Body body: MuteChannelRequest): RetrofitCall<CompletableResponse>
fun unmuteChannel(@Body body: MuteChannelRequest): RetrofitCall<Response>

@POST("/moderation/flag")
fun flag(@Body body: FlagRequest): RetrofitCall<FlagResponse>
Expand All @@ -56,15 +56,15 @@ internal interface ModerationApi {
fun unflag(@Body body: Map<String, String>): RetrofitCall<FlagResponse>

@POST("/moderation/ban")
fun banUser(@Body body: BanUserRequest): RetrofitCall<CompletableResponse>
fun banUser(@Body body: BanUserRequest): RetrofitCall<Response>

@DELETE("/moderation/ban")
fun unbanUser(
@Query("target_user_id") targetUserId: String,
@Query("type") channelType: String,
@Query("id") channelId: String,
@Query("shadow") shadow: Boolean,
): RetrofitCall<CompletableResponse>
): RetrofitCall<Response>

@GET("/query_banned_users")
fun queryBannedUsers(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ import io.getstream.chat.android.client.api2.model.requests.QueryPollVotesReques
import io.getstream.chat.android.client.api2.model.requests.QueryPollsRequest
import io.getstream.chat.android.client.api2.model.requests.UpdatePollRequest
import io.getstream.chat.android.client.api2.model.requests.UpstreamOptionDto
import io.getstream.chat.android.client.api2.model.response.CompletableResponse
import io.getstream.chat.android.client.api2.model.response.PollOptionResponse
import io.getstream.chat.android.client.api2.model.response.PollResponse
import io.getstream.chat.android.client.api2.model.response.PollVoteResponse
import io.getstream.chat.android.client.api2.model.response.QueryPollVotesResponse
import io.getstream.chat.android.client.api2.model.response.QueryPollsResponse
import io.getstream.chat.android.client.call.RetrofitCall
import io.getstream.chat.android.network.models.Response
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
Expand Down Expand Up @@ -76,7 +76,7 @@ internal interface PollsApi {
* @param pollId The ID of the poll to delete.
*/
@DELETE("/polls/{poll_id}")
fun deletePoll(@Path("poll_id") pollId: String): RetrofitCall<CompletableResponse>
fun deletePoll(@Path("poll_id") pollId: String): RetrofitCall<Response>

/**
* Retrieves a poll by its ID.
Expand Down Expand Up @@ -148,7 +148,7 @@ internal interface PollsApi {
fun deletePollOption(
@Path("poll_id") pollId: String,
@Path("option_id") optionId: String,
): RetrofitCall<CompletableResponse>
): RetrofitCall<Response>

// MISSING: Get poll option

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ package io.getstream.chat.android.client.api2.endpoint
import io.getstream.chat.android.client.api.AuthenticatedApi
import io.getstream.chat.android.client.api2.model.requests.QueryRemindersRequest
import io.getstream.chat.android.client.api2.model.requests.ReminderRequest
import io.getstream.chat.android.client.api2.model.response.CompletableResponse
import io.getstream.chat.android.client.api2.model.response.QueryRemindersResponse
import io.getstream.chat.android.client.api2.model.response.ReminderResponse
import io.getstream.chat.android.client.call.RetrofitCall
import io.getstream.chat.android.network.models.Response
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.PATCH
Expand Down Expand Up @@ -77,5 +77,5 @@ internal interface RemindersApi {
@DELETE("/messages/{id}/reminders")
fun deleteReminder(
@Path("id") messageId: String,
): RetrofitCall<CompletableResponse>
): RetrofitCall<Response>
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import io.getstream.chat.android.client.api2.model.requests.AddUserGroupMembersR
import io.getstream.chat.android.client.api2.model.requests.CreateUserGroupRequest
import io.getstream.chat.android.client.api2.model.requests.RemoveUserGroupMembersRequest
import io.getstream.chat.android.client.api2.model.requests.UpdateUserGroupRequest
import io.getstream.chat.android.client.api2.model.response.CompletableResponse
import io.getstream.chat.android.client.api2.model.response.UserGroupResponse
import io.getstream.chat.android.client.api2.model.response.UserGroupsResponse
import io.getstream.chat.android.client.call.RetrofitCall
import io.getstream.chat.android.network.models.Response
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
Expand Down Expand Up @@ -72,7 +72,7 @@ internal interface UserGroupApi {
fun deleteUserGroup(
@Path("id") id: String,
@Query("team_id") teamId: String? = null,
): RetrofitCall<CompletableResponse>
): RetrofitCall<Response>

@POST("/usergroups/{id}/members")
fun addUserGroupMembers(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,23 @@
* limitations under the License.
*/

package io.getstream.chat.android.client.api2.model.response
@file:Suppress(
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport",
)

package io.getstream.chat.android.network.models

import com.squareup.moshi.JsonClass
import com.squareup.moshi.Json

/**
* Basic response information
*/

@JsonClass(generateAdapter = true)
internal data class CompletableResponse(
val duration: String,
@com.squareup.moshi.JsonClass(generateAdapter = true)
internal data class Response(
@Json(name = "duration")
val duration: kotlin.String,
Comment thread
andremion marked this conversation as resolved.
)
Loading
Loading