/** * Generated by orval v8.19.0 🍺 * Do not edit manually. * Webitel API * OpenAPI spec version: 24.04.0 */ import axios from '@aliasedDeps/api-services/axios'; import type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'; import type { DeleteAgentSkillParams, DeleteAgentSkillsParams, EngineAgentSkill, EngineAgentSkillServiceCreateAgentSkillBody, EngineAgentSkillServiceCreateAgentSkillsBody, EngineAgentSkillServicePatchAgentSkillBody, EngineAgentSkillServicePatchAgentSkillsBody, EngineAgentSkillServiceUpdateAgentSkillBody, EngineCreateAgentSkillsResponse, EngineListAgentSkill, EngineListSkill, ReadAgentSkillParams, SearchAgentSkillParams, SearchLookupAgentNotExistsSkillParams, } from '../_models'; // --- header start // export const // --- title start getAgentSkillService = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end const deleteAgentSkills = ( agentId: string, params?: DeleteAgentSkillsParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete(`/call_center/agents/${agentId}/skills`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary List of AgentSkill */ const searchAgentSkill = ( agentId: string, params?: SearchAgentSkillParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/call_center/agents/${agentId}/skills`, { ...options, params: { ...params, ...options?.params, }, }); }; const patchAgentSkills = ( agentId: string, engineAgentSkillServicePatchAgentSkillsBody: EngineAgentSkillServicePatchAgentSkillsBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.patch( `/call_center/agents/${agentId}/skills`, engineAgentSkillServicePatchAgentSkillsBody, options, ); }; /** * @summary Create AgentSkill */ const createAgentSkill = ( agentId: string, engineAgentSkillServiceCreateAgentSkillBody: EngineAgentSkillServiceCreateAgentSkillBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/call_center/agents/${agentId}/skills`, engineAgentSkillServiceCreateAgentSkillBody, options, ); }; const createAgentSkills = ( agentId: string, engineAgentSkillServiceCreateAgentSkillsBody: EngineAgentSkillServiceCreateAgentSkillsBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/call_center/agents/${agentId}/skills/bulk`, engineAgentSkillServiceCreateAgentSkillsBody, options, ); }; /** * @summary Remove AgentSkill */ const deleteAgentSkill = ( agentId: string, id: string, params?: DeleteAgentSkillParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete( `/call_center/agents/${agentId}/skills/${id}`, { ...options, params: { ...params, ...options?.params, }, }, ); }; /** * @summary AgentSkill item */ const readAgentSkill = ( agentId: string, id: string, params?: ReadAgentSkillParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get( `/call_center/agents/${agentId}/skills/${id}`, { ...options, params: { ...params, ...options?.params, }, }, ); }; const patchAgentSkill = ( agentId: string, id: string, engineAgentSkillServicePatchAgentSkillBody: EngineAgentSkillServicePatchAgentSkillBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.patch( `/call_center/agents/${agentId}/skills/${id}`, engineAgentSkillServicePatchAgentSkillBody, options, ); }; /** * @summary Update AgentSkill */ const updateAgentSkill = ( agentId: string, id: string, engineAgentSkillServiceUpdateAgentSkillBody: EngineAgentSkillServiceUpdateAgentSkillBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.put( `/call_center/agents/${agentId}/skills/${id}`, engineAgentSkillServiceUpdateAgentSkillBody, options, ); }; /** * @summary SearchLookupAgentNotExistsSkill */ const searchLookupAgentNotExistsSkill = ( agentId: string, params?: SearchLookupAgentNotExistsSkillParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get( `/call_center/lookups/agents/skills/${agentId}`, { ...options, params: { ...params, ...options?.params, }, }, ); }; // --- footer start return { deleteAgentSkills, searchAgentSkill, patchAgentSkills, createAgentSkill, createAgentSkills, deleteAgentSkill, readAgentSkill, patchAgentSkill, updateAgentSkill, searchLookupAgentNotExistsSkill, }; }; export type DeleteAgentSkillsResult = AxiosResponse; export type SearchAgentSkillResult = AxiosResponse; export type PatchAgentSkillsResult = AxiosResponse; export type CreateAgentSkillResult = AxiosResponse; export type CreateAgentSkillsResult = AxiosResponse; export type DeleteAgentSkillResult = AxiosResponse; export type ReadAgentSkillResult = AxiosResponse; export type PatchAgentSkillResult = AxiosResponse; export type UpdateAgentSkillResult = AxiosResponse; export type SearchLookupAgentNotExistsSkillResult = AxiosResponse; // --- footer end