package com.example.petstoremobile.api;

import com.example.petstoremobile.dtos.CustomerDTO;
import com.example.petstoremobile.dtos.DropdownDTO;
import com.example.petstoremobile.dtos.PageResponse;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface CustomerApi {

    @GET("api/v1/customers")
    Call<PageResponse<CustomerDTO>> getAllCustomers(@Query("page") int page, @Query("size") int size);

    @GET("api/v1/customers/{customerId}")
    Call<CustomerDTO> getCustomerById(@Path("customerId") Long customerId);

    @PUT("api/v1/customers/{customerId}")
    Call<CustomerDTO> updateCustomer(@Path("customerId") Long customerId, @Body CustomerDTO customer);

    @DELETE("api/v1/customers/{customerId}")
    Call<Void> deleteCustomer(@Path("customerId") Long customerId);

    @POST("api/v1/auth/register")
    Call<CustomerDTO> registerCustomer(@Body CustomerDTO customer);

    @GET("api/v1/dropdowns/customers")
    Call<List<DropdownDTO>> getCustomerDropdowns();
}
