/** * 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 { DeleteAgentTeamParams, EngineAgentTeam, EngineAgentTeamServiceUpdateAgentTeamBody, EngineCreateAgentTeamRequest, EngineListAgentTeam, ReadAgentTeamParams, SearchAgentTeamParams, } from '../_models'; // --- header start // export const // --- title start getAgentTeamService = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end /** * @summary List of AgentTeam */ const searchAgentTeam = ( params?: SearchAgentTeamParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/call_center/teams`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Create AgentTeam */ const createAgentTeam = ( engineCreateAgentTeamRequest: EngineCreateAgentTeamRequest, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/call_center/teams`, engineCreateAgentTeamRequest, options, ); }; /** * @summary Remove AgentTeam */ const deleteAgentTeam = ( id: string, params?: DeleteAgentTeamParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete(`/call_center/teams/${id}`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary AgentTeam item */ const readAgentTeam = ( id: string, params?: ReadAgentTeamParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/call_center/teams/${id}`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Update AgentTeam */ const updateAgentTeam = ( id: string, engineAgentTeamServiceUpdateAgentTeamBody: EngineAgentTeamServiceUpdateAgentTeamBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.put( `/call_center/teams/${id}`, engineAgentTeamServiceUpdateAgentTeamBody, options, ); }; // --- footer start return { searchAgentTeam, createAgentTeam, deleteAgentTeam, readAgentTeam, updateAgentTeam, }; }; export type SearchAgentTeamResult = AxiosResponse; export type CreateAgentTeamResult = AxiosResponse; export type DeleteAgentTeamResult = AxiosResponse; export type ReadAgentTeamResult = AxiosResponse; export type UpdateAgentTeamResult = AxiosResponse; // --- footer end