package com.ytpm.service;

import com.ytpm.advertise.param.AddPlacementParam;
import com.ytpm.advertise.param.ComprehensiveReportParam;
import com.ytpm.advertise.param.HourReportParam;
import com.ytpm.advertise.param.Network;
import com.ytpm.advertise.param.RelativeChannelParam;
import com.ytpm.advertise.param.RoiReportParam;
import com.ytpm.advertise.param.UnitsListParam;
import com.ytpm.advertise.param.UnitsParam;
import com.ytpm.advertise.view.AddAppResponse;
import com.ytpm.advertise.view.AddPlacementResponse;
import com.ytpm.advertise.view.AppV1View;
import com.ytpm.advertise.view.ComprehensiveAppReport;
import com.ytpm.advertise.view.ComprehensiveReportView;
import com.ytpm.advertise.view.HourReportRes;
import com.ytpm.advertise.view.HourReportView;
import com.ytpm.advertise.view.ReportRoiView;
import com.ytpm.advertise.view.UnitsListView;
import com.ytpm.advertise.view.UnitsView;
import com.ytpm.general.Result;
import com.ytpm.general.ResultTable;
import com.ytpm.advertise.param.AddAppParam;

import java.util.List;

public interface TakuApiService {
    /**
     * 保存应用
     */
    Result<AddAppResponse> saveApp(AddAppParam param);
    /**
     * 查询应用列表
     */
    ResultTable<AppV1View> getAppList(String takuPublicKey);
    /**
     * 删除应用
     */
    Result<AddAppResponse> delApp(String appId,String takuPublicKey);
    /**
     * Taku应用关联广告平台
     */
    Result<?> relativePlatform(RelativeChannelParam channelParam);
    /**
     * 获取广告平台信息
     */
    ResultTable<Network> getNetworks(String takuPublicKey);
    /**
     * 新增广告位
     */
    ResultTable<AddPlacementResponse> addPlacements(AddPlacementParam param);

    /**
     * 获取广告位列表
     */
    ResultTable<?> getPlacementList(AddPlacementParam param);

    /**
     * 删除广告位
     */
    Result<?> delPlacement(List<String> placementIds,String takuPublicKey);

    /**
     * 获取广告源列表
     */
    ResultTable<UnitsListView> getUnitsList(UnitsListParam unitsListParam);

    /**
     * 获取广告源详情
     */
    ResultTable<UnitsView> getUnitsView(List<Integer> ids, String takuPublicKey);

    /**
     * 保存广告源信息
     */
    Result<?> saveUnits(UnitsParam param);

    /**
     * 修改广告源信息
     */
    Result<?> updateUnits(UnitsParam param);

    /**
     * 删除广告源
     */
    Result<?> delUnits(List<Integer> adsource_ids,String takuPublicKey);

    /**
     * 查询综合报表
     */
    Result<ComprehensiveReportView> comprehensiveReport(ComprehensiveReportParam param);

    /**
     * 查询APP综合报表
     */
    List<ComprehensiveAppReport> getAppReport(ComprehensiveReportParam param);
    /**
     * 查询ROI报表
     */
    ResultTable<ReportRoiView> getReportRoi(RoiReportParam param);

    /**
     * 查询ROI——Ltv报表
     */
    ResultTable<ReportRoiView> getReportRoiLtv(RoiReportParam param);

    /**
     * 查询分小时报表
     */
    ResultTable<HourReportView> hourReport(HourReportParam param);

    /**
     * 异步查询分小时报表
     */
    Result<List<HourReportRes>> concurrentHourReports(List<HourReportParam> param);
}
