package com.cyksj.service.api;

import com.cyksj.model.request.ClaudeCodeApiKeysReq;
import com.cyksj.model.response.claudecode.ClaudeCodeResp;
import com.cyksj.model.views.ClaudeCodeUserApiKeysView;

import java.util.Date;
import java.util.List;

/**
 * 项目名: yhlxj11111111
 * 文件名: ClaudeCodexApiService
 * 创建者: JavaZou
 * 创建时间:2025/9/25 16:35
 */
public interface ClaudeCodexApiService {

	/**
	 * 创建keys
	 * @param req
	 * @return
	 * @throws Exception
	 */
	ClaudeCodeResp createApiKeys(ClaudeCodeApiKeysReq req) throws Exception;

	/**
	 * 删除keys
	 */
	void deleteApiKeysById(Long userId, Long keyId) throws Exception;


	/**
	 * key列表
	 */
	List<ClaudeCodeUserApiKeysView> getUserApiKeys(Long codexUserId);

	/**
	 * 生成或更新codex套餐
	 */
	ClaudeCodeResp createOrUpdateCodexUserPackageApi(Long userId, String planName, Integer openaiDailyLimit, Integer openaiQuota, Date expiryTime) throws Exception;

	/**
	 * 删除codex用户套餐
	 */
	boolean delCodexUserPackages(Long userId);

	/**
	 * 获取用户OpenAI使用统计
	 */
	ClaudeCodeResp getCodexUserOpenAIUsage(Long userId, String period);

	/**
	 * codex 用户仪表盘
	 */
	ClaudeCodeResp getCodexUserDashboard(Long userId);

	/**
	 * codex用户使用量统计
	 */
	ClaudeCodeResp getCodexUserAnalytics(Long userId, String start, String end, Integer page, Integer limit, String order);
}
