import { Injectable } from '@nestjs/common' import { ServiceResponse } from '@/response/response.interface' import { HttpClientService } from '@/shared/http-client/http-client.service' @Injectable() export class AgentTestHttpService { private readonly baseUrl = 'http://192.168.206.189:8083/api' constructor(private readonly httpClientService: HttpClientService) {} private async makeRequest( endpoint: string, params?: Record ): Promise> { const url = `${this.baseUrl}/${endpoint}` return this.httpClientService.get(url, params) } async makeRequestPost( endpoint: string, params?: Record ): Promise> { const url = `${this.baseUrl}/${endpoint}` return this.httpClientService.post(url, params) } async createTestTask( params: Record ): Promise> { return this.makeRequestPost('createTestTask', params) } async getEvaluteType(): Promise> { return this.makeRequestPost('getEvaluteType') } async getTestTaskList( params: Record ): Promise> { return this.makeRequestPost('getTestTaskList', params) } async stopTestTask( params: Record ): Promise> { return this.makeRequestPost('stopTestTask', params) } async resumeTestTask( params: Record ): Promise> { return this.makeRequestPost('resumeTestTask', params) } async getTestTaskConversations( params: Record ): Promise> { return this.makeRequest( 'getTestTaskConversations', params ) } }