package com.younki.maidmatching.services;

import com.younki.maidmatching.services.HTTP.AddDetailRequest;
import com.younki.maidmatching.services.HTTP.ChangePasswordRequest;
import com.younki.maidmatching.services.HTTP.GlobalResponse;
import com.younki.maidmatching.services.HTTP.AddSkillRequest;
import com.younki.maidmatching.services.HTTP.LoginRequest;
import com.younki.maidmatching.services.HTTP.LoginResponse;
import com.younki.maidmatching.services.HTTP.RegisterRequest;
import com.younki.maidmatching.services.HTTP.UserResponse;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface UserService {
    @POST("login/user")
    Call<LoginResponse> userLogin(@Body LoginRequest loginRequest);

    @POST("register")
    Call<GlobalResponse> userRegister(@Body RegisterRequest registerRequest);

    @POST("user/password/{id}")
    Call<GlobalResponse> changePassword(@Body ChangePasswordRequest changePasswordRequest, @Path("id") String id);

    @GET("user/get/maids")
    Call<UserResponse> getMaid();
    @GET("user/get/maids")
    Call<UserResponse> getMaid(@Query("search") String search);

    @GET("user/{id}")
    Call<UserResponse> getUserDetail(@Path("id") String id);

    @POST("user/{id}/addskills")
    Call<GlobalResponse> userSkills(@Body AddSkillRequest addSkillRequest, @Path("id") String id);

    @POST("user/{id}/adddetails")
    Call<GlobalResponse> userDetails(@Body AddDetailRequest addDetailRequest, @Path("id") String id);

    @Multipart
    @POST("user/setimage")
    Call<GlobalResponse> updateImage(@Part("user_id") int userId,
                                   @Part MultipartBody.Part image);

    @Multipart
    @POST("user/verify")
    Call<GlobalResponse> verify(@Part("user_id") int userId,
                                    @Part MultipartBody.Part image_verif,
                                    @Part MultipartBody.Part ktp);
}
