package com.atmob.voiceai.data.api;


import com.atmob.app.lib.base.BaseResponse;
import com.atmob.voiceai.data.api.request.BaseRequest;
import com.atmob.voiceai.data.api.request.CloneDeleteRequest;
import com.atmob.voiceai.data.api.request.OrderPayRequest;
import com.atmob.voiceai.data.api.request.OrderStatusRequest;
import com.atmob.voiceai.data.api.request.PayGoodsRequest;
import com.atmob.voiceai.data.api.request.SubResumeRequest;
import com.atmob.voiceai.data.api.request.TextTosSpeechRequest;
import com.atmob.voiceai.data.api.request.VoiceCloneRequest;
import com.atmob.voiceai.data.api.request.VoiceHistoryRequest;
import com.atmob.voiceai.data.api.request.VoiceListRequest;
import com.atmob.voiceai.data.api.response.OrderPayResponse;
import com.atmob.voiceai.data.api.response.OrderStatusResponse;
import com.atmob.voiceai.data.api.response.PayGoodsResponse;
import com.atmob.voiceai.data.api.response.TextToSpeechResponse;
import com.atmob.voiceai.data.api.response.UserInfoResponse;
import com.atmob.voiceai.data.api.response.VoiceCloneListResponse;
import com.atmob.voiceai.data.api.response.VoiceCloneResponse;
import com.atmob.voiceai.data.api.response.VoiceHistoryResponse;
import com.atmob.voiceai.data.api.response.VoiceInfoResponse;
import com.atmob.voiceai.data.api.response.VoiceListResponse;
import com.atmob.voiceai.data.api.response.VoiceTypeResponse;
import com.atmob.voiceai.data.api.timeout.ConnectionTime;

import atmob.okhttp3.RequestBody;
import atmob.reactivex.rxjava3.core.Single;
import atmob.retrofit2.http.Body;
import atmob.retrofit2.http.POST;

public interface AtmobApi {


    @POST("/project/voice/v1/voice/info")
    Single<BaseResponse<VoiceInfoResponse>> getVoiceInfo(@Body BaseRequest request);

    @POST("/project/voice/v1/voice/type")
    Single<BaseResponse<VoiceTypeResponse>> getVoiceType(@Body BaseRequest request);


    @POST("/project/voice/v1/voice/list")
    Single<BaseResponse<VoiceListResponse>> getVoiceList(@Body VoiceListRequest request);

    @POST("/project/voice/v1/clone/list")
    Single<BaseResponse<VoiceCloneListResponse>> getCloneList(@Body BaseRequest request);

    @POST("/project/voice/v1/clone/delete")
    Single<BaseResponse<Object>> cloneDelete(@Body CloneDeleteRequest request);

    @POST("/project/voice/v1/voice/history")
    Single<BaseResponse<VoiceHistoryResponse>> voiceHistory(@Body VoiceHistoryRequest request);

    @POST("/project/voice/v1/user/info")
    Single<BaseResponse<UserInfoResponse>> userInfo(@Body BaseRequest request);


    @POST("/project/voice/v1/item/list")
    Single<BaseResponse<PayGoodsResponse>> payGoodsList(@Body PayGoodsRequest request);

    @POST("/project/voice/v1/order/pay")
    Single<BaseResponse<OrderPayResponse>> orderPay(@Body OrderPayRequest request);

    @POST("/project/voice/v1/order/status")
    Single<BaseResponse<OrderStatusResponse>> orderStatus(@Body OrderStatusRequest request);

    @POST("/project/voice/v1/member/subscription/resume")
    Single<BaseResponse<Object>> subscriptionResume(@Body SubResumeRequest request);

    @ConnectionTime(connectTimeOut = 25, readTimeout = 25)
    @POST("/project/voice/v1/voice/textToSpeech")
    Single<BaseResponse<TextToSpeechResponse>> textToSpeech(@Body TextTosSpeechRequest request);


    @ConnectionTime(connectTimeOut = 25, writeTimeout = 120)
    @POST("/project/voice/v1/voice/clone")
    Single<BaseResponse<VoiceCloneResponse>> voiceClone(@Body RequestBody requestBody);
}
