/** * 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 { DeleteCommunicationTypeParams, EngineCommunicationType, EngineCommunicationTypeRequest, EngineCommunicationTypeServicePatchCommunicationTypeBody, EngineCommunicationTypeServiceUpdateCommunicationTypeBody, EngineListCommunicationType, ReadCommunicationTypeParams, SearchCommunicationTypeParams, } from '../_models'; // --- header start // export const // --- title start getCommunicationTypeService = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end /** * @summary List of CommunicationType */ const searchCommunicationType = ( params?: SearchCommunicationTypeParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/call_center/communication_type`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Create CommunicationType */ const createCommunicationType = ( engineCommunicationTypeRequest: EngineCommunicationTypeRequest, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/call_center/communication_type`, engineCommunicationTypeRequest, options, ); }; /** * @summary Remove CommunicationType */ const deleteCommunicationType = ( id: string, params?: DeleteCommunicationTypeParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete(`/call_center/communication_type/${id}`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary CommunicationType item */ const readCommunicationType = ( id: string, params?: ReadCommunicationTypeParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/call_center/communication_type/${id}`, { ...options, params: { ...params, ...options?.params, }, }); }; const patchCommunicationType = ( id: string, engineCommunicationTypeServicePatchCommunicationTypeBody: EngineCommunicationTypeServicePatchCommunicationTypeBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.patch( `/call_center/communication_type/${id}`, engineCommunicationTypeServicePatchCommunicationTypeBody, options, ); }; /** * @summary Update CommunicationType */ const updateCommunicationType = ( id: string, engineCommunicationTypeServiceUpdateCommunicationTypeBody: EngineCommunicationTypeServiceUpdateCommunicationTypeBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.put( `/call_center/communication_type/${id}`, engineCommunicationTypeServiceUpdateCommunicationTypeBody, options, ); }; // --- footer start return { searchCommunicationType, createCommunicationType, deleteCommunicationType, readCommunicationType, patchCommunicationType, updateCommunicationType, }; }; export type SearchCommunicationTypeResult = AxiosResponse; export type CreateCommunicationTypeResult = AxiosResponse; export type DeleteCommunicationTypeResult = AxiosResponse; export type ReadCommunicationTypeResult = AxiosResponse; export type PatchCommunicationTypeResult = AxiosResponse; export type UpdateCommunicationTypeResult = AxiosResponse; // --- footer end