/*
 * @Author: zc
 * @description 坐席辅助
 */
import request from '@/utils/request';
/**
 * @description 链接捷通华声坐席辅助
 * @param {string} telNo
 */
export const voiceAssistant = (telNo: string) => {
	return request(
		{
			url: `users/getUserByAgentId/${telNo}`,
			method: 'get',
			baseURL: import.meta.env.VITE_VOICE_ASSISTANT_API_URL, // 请求地址  可以在不同url中修改
		},
		{
			error_message_show: false,
		}
	);
};
/**
 * @description 获取捷通华声识别内容
 * @param {string} callId
 */
export const voiceAssistantContent = (callId: string) => {
	return request(
		{
			url: `/monitor/remote/details/${callId}`,
			method: 'get',
			baseURL: import.meta.env.VITE_VOICE_ASSISTANT_API_URL,
		},
		{
			error_message_show: false,
		}
	);
};
/**
 * @description 捷通华声错别字检测
 * @param {object} data
 */
export const jthsErrorWord = (data: object) => {
	return request(
		{
			url: `/nlp/service/analyse/atc`,
			method: 'post',
			data,
			baseURL: import.meta.env.VITE_JTHS_ERROR_WORD_URL,
			headers: {
				Signature: import.meta.env.VITE_JTHS_ERROR_WORD_SIGN,
				Timestamp: 1689148449820,
				'Org-Key':import.meta.env.VITE_JTHS_ERROR_WORD_KEY,
				Nonce: import.meta.env.VITE_JTHS_ERROR_WORD_NONCE,
				'content-type':'application/json;charset=UTF-8'
			},
		},
		{
			error_message_show: false,
		}
	);
};