package com.amz.genie.services

import com.amz.genie.models.GeneralDetailResponse
import com.amz.genie.models.GeneralResponse
import com.amz.genie.models.InboxThreadResponse
import com.amz.genie.models.Message
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.POST
import retrofit2.http.Query

interface GeneralServices {
    @GET("general/list")
    fun list(
        @Header("Authorization") token: String?,
        @Query("general_id") generalId: Int
    ): Call<GeneralResponse>

    @GET("inbox/detail")
    fun detail(
        @Header("Authorization") token: String?,
        @Query("counterpart_kode") counterPartKode: String?,
        @Query("page") page: Int,
        @Query("per_page") perPage: Int
    ): Call<GeneralDetailResponse>

    @GET("inbox/thread")
    fun threadDetail(
        @Header("Authorization") token: String?,
        @Query("counterpart_kode") counterpart: String,
        @Query("aksi_id") aksiId: Int,
        @Query("page") page: Int,
        @Query("per_page") perPage: Int
    ): Call<InboxThreadResponse>

    @POST("inbox/readed")
    fun readed(
        @Header("Authorization") token: String?,
        @Query("aksi_reaksi_id") aksiReaksiId: Int,
        @Query("tipe") tipe: String,
    ): Call<Message>

}