package com.cretin.webservices.service.api.v2

import com.cretin.webdb.request.v2.*
import org.springframework.web.multipart.MultipartFile
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse

interface V2TranslateService {

    /**
     * 上传翻译
     */
    fun upload(data: DesktopTranslateAddRequest, httpServletRequest: HttpServletRequest): Any

    /**
     * 初始化
     */
    fun init(data: DesktopTranslateInitRequest, httpServletRequest: HttpServletRequest): Any

    /**
     * 获取首页翻译列表
     */
    fun list(data: AdminTranslateListRequest, httpServletRequest: HttpServletRequest): Any

    /**
     * 配置感兴趣的渠道
     */
    fun channelSelect(data: TranslateChannelConfigRequest, httpServletRequest: HttpServletRequest)

    /**
     * 编辑翻译
     */
    fun editTranslate(data: TranslateEditRequest, httpServletRequest: HttpServletRequest)

    /**
     * 获取应用列表
     */
    fun projectList(data:TranslateProjectListRequest,httpServletRequest: HttpServletRequest): Any

    /**
     * 获取渠道列表
     */
    fun translateAllChannelList(data: TranslateChannelListRequest, httpServletRequest: HttpServletRequest): Any

    /**
     * 更新渠道列表
     */
    fun translateAllChannelListUpdate(data: TranslateChannelUpdateRequest, httpServletRequest: HttpServletRequest)

    /**
     * 项目创建
     */
    fun projectCreate(data: TranslateProjectCreateRequest, httpServletRequest: HttpServletRequest)

    /**
     * 在线翻译
     */
    fun onlineConvert(data: TranslateOnlineConvertRequest, httpServletRequest: HttpServletRequest): Any

    /**
     * 登录
     */
    fun login(data: DesktopTranslateLoginRequest, httpServletRequest: HttpServletRequest): Any

    /**
     * 获取平台数据
     */
    fun platfroms(httpServletRequest: HttpServletRequest): Any

    /**
     * 下载前的预览
     */
    fun downloadPre(data: DesktopTranslateListRequest, httpServletRequest: HttpServletRequest): Any

    /**
     * 同步项目信息
     */
    fun projectAsync(data: DesktopTranslateAsyncRequest, httpServletRequest: HttpServletRequest): Any

    /**
     * 下载翻译数据
     */
    fun downloadList(data: DesktopTranslateListRequest, httpServletRequest: HttpServletRequest): Any

    /**
     * 内容转换
     */
    fun downloadDataConvert(data: DesktopTranslateDataConvertRequest, httpServletRequest: HttpServletRequest): Any

    /**
     * 本地php文件转化成可以预览的内容
     */
    fun commonLocalPhpConvertPre(data: DesktopTranslateDataConvertRequest, httpServletRequest: HttpServletRequest): Any

    /**
     * 上传php的原始json内容 生成最终生成的文件内容
     */
    fun downloadPhpDataConvert(data: DesktopTranslatePhpDataConvertRequest, httpServletRequest: HttpServletRequest): Any

    /**
     * 导出excel
     */
    fun excelExport(data: TranslateExcelExportRequest, httpServletResponse: HttpServletResponse)

    /**
     * 导入excel
     */
    fun importExcel(appId: Int, file: MultipartFile, httpServletResponse: HttpServletResponse): Any

    /**
     * 获取应用信息
     */
    fun appInfo(httpServletResponse: HttpServletResponse): Any

    /**
     * 获取提示信息
     */
    fun commonTips(data: DesktopTranslateTipsRequest, httpServletRequest: HttpServletRequest): Any

    /**
     * 编辑模块
     */
    fun moduleConfig(data: TranslateModuleConfigRequest, httpServletRequest: HttpServletRequest)

    /**
     * 获取升级信息
     */
    fun commonAppUpdate(data: DesktopTranslateAppUpdateRequest, httpServletRequest: HttpServletRequest): Any
}