package com.chinaweal.aiccs.outside.api;

import com.chinaweal.aiccs.outside.dto.JgmhTodoRequestDto;
import com.dtflys.forest.annotation.*;
import com.dtflys.forest.http.ForestResponse;

/**
 * 统一监管门户 Forest API接口
 */
@BaseRequest(baseURL = "${jgmhDoorBaseUrl}")
public interface JgmhDoorApi {

    /**
     * 获取token
     * GET /zt/api/auth/token?key={appid}
     * Header: DI-Authorization: {app_secret}
     */
    @GetRequest(url = "/zt/api/auth/token?key={appId}", headers = "DI-Authorization:${jgmhDoor.appSecret}")
    ForestResponse<String> getToken();

    /**
     * 推送待办事项
     * POST /zt/api/dataservice/v1/tyjgmhXZdbsx?token={token}
     */
    @PostRequest(url = "/zt/api/dataservice/v1/tyjgmhXZdbsx?token={token}", contentType = "application/json")
    ForestResponse<String> pushTodoItems(@Var("token") String token, @JSONBody JgmhTodoRequestDto requestDto);
}
