/** * 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 { DeleteSkillParams, EngineCreateSkillAgentResponse, EngineCreateSkillRequest, EngineDeleteSkillAgentResponse, EngineListSkill, EngineListSkillAgent, EnginePatchSkillAgentResponse, EngineSkill, EngineSkillServiceCreateSkillAgentBody, EngineSkillServiceDeleteSkillAgentBody, EngineSkillServicePatchSkillAgentBody, EngineSkillServiceUpdateSkillBody, ReadSkillParams, SearchSkillAgentParams, SearchSkillParams, } from '../_models'; // --- header start // export const // --- title start getSkillService = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end /** * @summary List of Skill */ const searchSkill = ( params?: SearchSkillParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/call_center/skills`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Create Skill */ const createSkill = ( engineCreateSkillRequest: EngineCreateSkillRequest, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/call_center/skills`, engineCreateSkillRequest, options, ); }; /** * @summary Remove Skill */ const deleteSkill = ( id: string, params?: DeleteSkillParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete(`/call_center/skills/${id}`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Skill item */ const readSkill = ( id: string, params?: ReadSkillParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/call_center/skills/${id}`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Update Skill */ const updateSkill = ( id: string, engineSkillServiceUpdateSkillBody: EngineSkillServiceUpdateSkillBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.put( `/call_center/skills/${id}`, engineSkillServiceUpdateSkillBody, options, ); }; const deleteSkillAgent = ( skillId: string, engineSkillServiceDeleteSkillAgentBody: EngineSkillServiceDeleteSkillAgentBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete(`/call_center/skills/${skillId}/agents`, { data: engineSkillServiceDeleteSkillAgentBody, ...options, }); }; /** * @summary For agents SearchSkillAgent */ const searchSkillAgent = ( skillId: string, params?: SearchSkillAgentParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/call_center/skills/${skillId}/agents`, { ...options, params: { ...params, ...options?.params, }, }); }; const patchSkillAgent = ( skillId: string, engineSkillServicePatchSkillAgentBody: EngineSkillServicePatchSkillAgentBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.patch( `/call_center/skills/${skillId}/agents`, engineSkillServicePatchSkillAgentBody, options, ); }; const createSkillAgent = ( skillId: string, engineSkillServiceCreateSkillAgentBody: EngineSkillServiceCreateSkillAgentBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/call_center/skills/${skillId}/agents`, engineSkillServiceCreateSkillAgentBody, options, ); }; // --- footer start return { searchSkill, createSkill, deleteSkill, readSkill, updateSkill, deleteSkillAgent, searchSkillAgent, patchSkillAgent, createSkillAgent, }; }; export type SearchSkillResult = AxiosResponse; export type CreateSkillResult = AxiosResponse; export type DeleteSkillResult = AxiosResponse; export type ReadSkillResult = AxiosResponse; export type UpdateSkillResult = AxiosResponse; export type DeleteSkillAgentResult = AxiosResponse; export type SearchSkillAgentResult = AxiosResponse; export type PatchSkillAgentResult = AxiosResponse; export type CreateSkillAgentResult = AxiosResponse; // --- footer end