import 'package:dio/dio.dart';
import 'package:location/base/app_base_request.dart';
import 'package:location/base/base_response.dart';
import 'package:location/data/api/request/add_friend_request.dart';
import 'package:location/data/api/request/configs_request.dart';
import 'package:location/data/api/request/contact_request.dart';
import 'package:location/data/api/request/electric_request.dart';
import 'package:location/data/api/request/friends_list_request.dart';
import 'package:location/data/api/request/friends_operation_request.dart';
import 'package:location/data/api/request/location_phone_event_request.dart';
import 'package:location/data/api/request/login_request.dart';
import 'package:location/data/api/request/member_list_request.dart';
import 'package:location/data/api/request/message_request.dart';
import 'package:location/data/api/request/notification_report_request.dart';
import 'package:location/data/api/request/one_click_login_request.dart';
import 'package:location/data/api/request/operation_friend_request.dart';
import 'package:location/data/api/request/order_status_request.dart';
import 'package:location/data/api/request/query_track_request.dart';
import 'package:location/data/api/request/request_friendlist_request.dart';
import 'package:location/data/api/request/send_code_request.dart';
import 'package:location/data/api/request/submit_and_request_pay_request.dart';
import 'package:location/data/api/request/subscription_check_request.dart';
import 'package:location/data/api/request/subscription_resume_request.dart';
import 'package:location/data/api/request/track_daily_action_request.dart';
import 'package:location/data/api/request/upload_client_id_request.dart';
import 'package:location/data/api/request/user_avatar_update_request.dart';
import 'package:location/data/api/response/configs_response.dart';
import 'package:location/data/api/response/contact_list_response.dart';
import 'package:location/data/api/response/contact_may_day_all_response.dart';
import 'package:location/data/api/response/daily_keyword_response.dart';
import 'package:location/data/api/response/electric_query_response.dart';
import 'package:location/data/api/response/friends_list_response.dart';
import 'package:location/data/api/response/item_list_response.dart';
import 'package:location/data/api/response/location_track_days_response.dart';
import 'package:location/data/api/response/login_response.dart';
import 'package:location/data/api/response/member_status_response.dart';
import 'package:location/data/api/response/member_trial_info_response.dart';
import 'package:location/data/api/response/message_response.dart';
import 'package:location/data/api/response/order_first_check_response.dart';
import 'package:location/data/api/response/order_status_response.dart';
import 'package:location/data/api/response/query_track_response.dart';
import 'package:location/data/api/response/request_friend_list_response.dart';
import 'package:location/data/api/response/request_pay_response.dart';
import 'package:location/data/api/response/subscription_check_response.dart';
import 'package:location/data/api/response/track_daily_action_response.dart';
import 'package:location/data/api/response/track_daily_dialogs_response.dart';
import 'package:location/data/api/response/track_daily_interpret_response.dart';
import 'package:location/data/api/response/track_daily_response.dart';
import 'package:location/data/api/response/track_daily_summary_response.dart';
import 'package:location/data/api/response/user_avatar_response.dart';
import 'package:retrofit/error_logger.dart';
import 'package:retrofit/http.dart';
import 'package:retrofit/dio.dart';
import '../bean/user_info.dart';

part 'atmob_api.g.dart';

@RestApi()
abstract class AtmobApi {
  factory AtmobApi(Dio dio, {String baseUrl, ParseErrorLogger? errorLogger}) =
      _AtmobApi;

  @POST("/s/v1/user/code")
  Future<BaseResponse> loginSendCode(@Body() SendCodeRequest request);

  @POST("/s/v1/user/login")
  Future<BaseResponse<LoginResponse>> loginUserLogin(
      @Body() LoginRequest request);

  @POST("/s/v1/user/member")
  Future<BaseResponse<MemberStatusResponse>> getMemberStatus(
      @Body() AppBaseRequest request);

  @POST("/s/v1/friend/list")
  Future<BaseResponse<FriendsListResponse>> friendList(
      @Body() FriendsListRequest request);

  @POST("/s/v1/confs")
  Future<BaseResponse<ConfigsResponse>> getConfigs(
      @Body() ConfigsRequest request);

  @POST("/s/v1/friend/virtual")
  Future<BaseResponse<UserInfo>> getFriendVirtual(
      @Body() AppBaseRequest request);

  @POST("/s/v1/friend/blocked")
  Future<BaseResponse> updateFriendBlocked(
      @Body() FriendsOperationRequest request);

  @POST("/s/v1/friend/delete")
  Future<BaseResponse> deleteFriend(@Body() FriendsOperationRequest request);

  @POST("/s/v1/friend/remark")
  Future<BaseResponse> updateFriendRemark(
      @Body() FriendsOperationRequest request);

  @POST("/s/v1/friend/request/send")
  Future<BaseResponse> addFriendRequest(@Body() AddFriendRequest request);

  @POST("/s/v1/friend/virtual/track")
  Future<BaseResponse<QueryTrackResponse>> queryVirtualTrack(
      @Body() AppBaseRequest request);

  @POST("/s/v1/location/track/query")
  Future<BaseResponse<QueryTrackResponse>> queryTrack(
      @Body() QueryTrackRequest request, @DioOptions() RequestOptions options);

  @POST("/s/v1/friend/get")
  Future<BaseResponse<UserInfo?>> getUserInfoFromId(
      @Body() FriendsOperationRequest request);

  @POST("/s/v1/friend/virtual")
  Future<BaseResponse<UserInfo?>> getVirtualFromId(
      @Body() FriendsOperationRequest request);

  @POST("/s/v1/friend/message/list")
  Future<BaseResponse<MessageResponse>> getMessageList(
      @Body() MessageRequest request);

  @POST("/s/v1/friend/request/list")
  Future<BaseResponse<RequestFriendListResponse>> getRequestFriendList(
      @Body() RequestFriendListRequest request);

  @POST("/s/v1/friend/request/list/waiting")
  Future<BaseResponse<RequestFriendListResponse>> getRequestWaitingList(
      @Body() RequestFriendListRequest request);

  @POST("/s/v1/friend/request/accept")
  Future<BaseResponse> acceptFriendAccept(
      @Body() OperationFriendRequest request);

  @POST("/s/v1/friend/request/refuse")
  Future<BaseResponse> refuseFriendAccept(
      @Body() OperationFriendRequest request);

  @POST("/s/v1/contact/list")
  Future<BaseResponse<ContactListResponse>> getContactList(
      @Body() AppBaseRequest request);

  @POST("/s/v1/contact/create")
  Future<BaseResponse> contactCreate(@Body() ContactRequest request);

  @POST("/s/v1/contact/favor")
  Future<BaseResponse> contactFavor(@Body() ContactRequest request);

  @POST("/s/v1/contact/delete")
  Future<BaseResponse> contactDelete(@Body() ContactRequest request);

  //向单个紧急联系人求救
  @POST("/s/v1/contact/mayday")
  Future<BaseResponse> contactMayDay(@Body() ContactRequest request);

  //向默认紧急联系人求救
  @POST("/s/v1/contact/mayday/favor")
  Future<BaseResponse> contactMayDayFavor(@Body() AppBaseRequest request);

  //向所有紧急联系人求救
  @POST("/s/v1/contact/mayday/all")
  Future<BaseResponse<ContactMayDayAllResponse>> contactMayDayAll(
      @Body() AppBaseRequest request);

  @POST("/s/v1/user/clear")
  Future<BaseResponse> userClear(@Body() AppBaseRequest request);

  @POST("/s/v1/member/trial")
  Future<BaseResponse> memberTrial(@Body() AppBaseRequest request);

  @POST("/s/v1/item/list")
  Future<BaseResponse<ItemListResponse>> getMemberList(
      @Body() MemberListRequest request);

  @POST("/s/v1/order/submitAndRequestPay")
  Future<BaseResponse<RequestPayResponse>> submitAndRequestPay(
      @Body() SubmitAndRequestPayRequest request);

  @POST("/s/v1/order/payStatus")
  Future<BaseResponse<OrderStatusResponse>> orderStatus(
      @Body() OrderStatusRequest request);

  @POST("/s/v1/client/device/info/upload")
  Future<BaseResponse> uploadClientId(@Body() UploadClientIdRequest request);

  ///查询订阅状态
  @POST("/s/v1/subscription/check")
  Future<BaseResponse<SubscriptionCheckResponse>> subscriptionCheck(
      @Body() SubscriptionCheckRequest request);

  ///恢复订阅
  @POST("/s/v1/subscription/resume")
  Future<BaseResponse> subscriptionresume(
      @Body() SubscriptionResumeRequest request);

  ///试用结束查看试用信息-
  @POST("/s/v1/member/trial/info")
  Future<BaseResponse<MemberTrialInfoResponse>> memberTrailInfo(
      @Body() AppBaseRequest request);

  ///试用期间上报查看轨迹次数-
  @POST("/s/v1/member/trial/track")
  Future<BaseResponse> memberTrailTrack(@Body() AppBaseRequest request);

  @POST("/s/v1/user/avatar/list")
  Future<BaseResponse<UserAvatarResponse>> userAvatarList(
      @Body() AppBaseRequest request);

  @POST("/s/v1/user/avatar/update")
  Future<BaseResponse> userAvatarUpdate(
      @Body() UserAvatarUpdateRequest request);

  ///检查是否是首次购买-中台
  @POST("/s/v1/order/pay/check")
  Future<BaseResponse<OrderFirstCheckResponse>> orderFirstCheck(
      @Body() AppBaseRequest request);

  ///检查是否是首次购买-中台
  @POST("/s/v1/member/evaluate")
  Future<BaseResponse> memberEvaluate(@Body() AppBaseRequest request);

  @POST("/s/v1/location/track/days")
  Future<BaseResponse<LocationTrackDaysResponse>> locationTrackDays(
      @Body() AppBaseRequest request);

  @POST("/s/v1/location/track/daily/query")
  Future<BaseResponse<TrackDailyResponse>> trackDailyQuery(
      @Body() QueryTrackRequest request, @DioOptions() RequestOptions options);

  @POST("/s/v1/location/track/daily/summary")
  Future<BaseResponse<TrackDailySummaryResponse>> trackDailySummary(
      @Body() QueryTrackRequest request, @DioOptions() RequestOptions options);

  //上报推送信息-中台
  @POST("/central/notification/v1/notification/report")
  Future<BaseResponse> notificationReport(
      @Body() NotificationReportRequest request);

  ///每日轨迹弹框报告-中台
  @POST("/s/v1/location/track/daily/dialogs")
  Future<BaseResponse<TrackDailyDialogsResponse>> locationTrackDailyDialogs(
      @Body() AppBaseRequest request);

  @POST("/s/v1/location/track/daily/action")
  Future<BaseResponse<TrackDailyActionResponse>> trackDailyAction(
      @Body() TrackDailyActionRequest request,
      @DioOptions() RequestOptions options);

  @POST("/s/v1/location/phone/event")
  Future<BaseResponse> locationPhoneEvent(
      @Body() LocationPhoneEventRequest request);

  @POST("/s/v1/user/electric/report")
  Future<BaseResponse> electricReport(@Body() ElectricRequest request);

  @POST("/s/v1/chat/daily/keyword")
  Future<BaseResponse<DailyKeywordResponse>> dailyKeyword(
      @Body() QueryTrackRequest request);

  @POST("/s/v1/location/track/daily/interpret")
  Future<BaseResponse<TrackDailyInterpretResponse>> trackDailyInterpret(
      @Body() QueryTrackRequest request);

  @POST("/s/v1/user/electric/query")
  Future<BaseResponse<ElectricQueryResponse>> userElectricQuery(
      @Body() FriendsOperationRequest request);

  @POST("/s/v1/user/login/oneclick")
  Future<BaseResponse<LoginResponse>> oneClickLogin(
      @Body() OneClickLoginRequest request);
}
