package com.crm.chat.data.api

import com.crm.chat.data.model.UpdateUserRequest
import com.crm.chat.data.model.User
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.Response
import retrofit2.http.*

interface UserApiService {

    @GET("api/iam/users/{id}")
    suspend fun getUserById(@Path("id") userId: Long): Response<User>

    @PUT("api/iam/users/{id}")
    suspend fun updateUser(@Path("id") userId: Long, @Body request: UpdateUserRequest): Response<User>

    @Multipart
    @POST("api/iam/users/{id}/avatar")
    suspend fun uploadUserAvatar(
        @Path("id") userId: Long,
        @Part file: MultipartBody.Part
    ): Response<User>

    @DELETE("api/iam/users/{id}/avatar")
    suspend fun removeUserAvatar(@Path("id") userId: Long): Response<User>
}
