import { api } from 'shared/api'
import type { ResultDomain } from 'shared/types'


/**
 * 认证 API
 * 通过 Gateway (8180) 访问 Auth Service (8181)
 * 路由规则：/urban-lifeline/auth/** → auth-service/urban-lifeline/auth/**
 */
export const chatAPI = {
    baseUrl: "/urban-lifeline/xxx",//随后端更新

    /**
     * 根据agentId获取聊天会话id
     * @param agentId agentId
     * @returns 发送结果
     */
    async chatHistory(agentId: string): Promise<ResultDomain<string>> {
        // const response = await api.post<null>(`${this.baseUrl}/send-sms-code`, { phone })
        // return response.data
        return [];
    },
    
    /**
     * 根据agentId和conversationId获取聊天记录
     * @param agentId agentId
     * @param conversationId conversationId
     * @returns 发送结果
     */
    async chatConversation(agentId: string, conversationId: string): Promise<ResultDomain<any>> {
        // const response = await api.post<null>(`${this.baseUrl}/send-sms-code`, { phone })
        // return response.data
        return [];
    },
}