import 'package:clean/data/api/request/order_pay_request.dart';
import 'package:clean/data/api/request/order_status_request.dart';
import 'package:clean/data/api/request/subscription_resume_request.dart';
import 'package:clean/data/api/response/order_pay_response.dart';
import 'package:clean/data/api/response/order_status_response.dart';
import 'package:clean/data/api/response/store_index_response.dart';
import 'package:clean/data/api/response/subscription_resume_response.dart';
import 'package:clean/data/api/response/user_info_response.dart';
import 'package:clean/data/api/response/wallpaper_list_response.dart';
import 'package:dio/dio.dart';
import 'package:retrofit/error_logger.dart';
import 'package:retrofit/http.dart';

import '../../base/base_request.dart';
import '../../base/base_response.dart';
import '../consts/constants.dart';
import 'network_module.dart';

part 'atmob_api.g.dart';

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

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

  @POST("/project/clean/v1/item/list")
  Future<BaseResponse<StoreIndexResponse>> storeIndex(
      @Body() BaseRequest request);

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

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

  @POST("/project/clean/v1/member/subscription/resume")
  Future<BaseResponse> resume(
      @Body() SubscriptionResumeRequest request);

  @POST("/project/clean/v1/clean/wallpaper/list")
  Future<BaseResponse<WallpaperListResponse>> wallpaperList(
      @Body() BaseRequest request);

}

final atmobApi = AtmobApi(defaultDio, baseUrl: Constants.baseUrl);