/** * 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 { DeleteListCommunicationParams, DeleteListParams, EngineCreateListRequest, EngineList, EngineListCommunication, EngineListOfList, EngineListOfListCommunication, EngineListServiceCreateListCommunicationBody, EngineListServiceUpdateListBody, EngineListServiceUpdateListCommunicationBody, ReadListCommunicationParams, ReadListParams, SearchListCommunicationParams, SearchListParams, } from '../_models'; // --- header start // export const // --- title start getListService = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end /** * @summary List of List */ const searchList = ( params?: SearchListParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/call_center/list`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Create List */ const createList = ( engineCreateListRequest: EngineCreateListRequest, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/call_center/list`, engineCreateListRequest, options, ); }; /** * @summary Remove list */ const deleteList = ( id: string, params?: DeleteListParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete(`/call_center/list/${id}`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary List item */ const readList = ( id: string, params?: ReadListParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/call_center/list/${id}`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Update list */ const updateList = ( id: string, engineListServiceUpdateListBody: EngineListServiceUpdateListBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.put( `/call_center/list/${id}`, engineListServiceUpdateListBody, options, ); }; /** * @summary List of List */ const searchListCommunication = ( listId: string, params?: SearchListCommunicationParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/call_center/list/${listId}/communication`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Create ListCommunication */ const createListCommunication = ( listId: string, engineListServiceCreateListCommunicationBody: EngineListServiceCreateListCommunicationBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/call_center/list/${listId}/communication`, engineListServiceCreateListCommunicationBody, options, ); }; /** * @summary Remove ListCommunication */ const deleteListCommunication = ( listId: string, id: string, params?: DeleteListCommunicationParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete( `/call_center/list/${listId}/communication/${id}`, { ...options, params: { ...params, ...options?.params, }, }, ); }; /** * @summary List item */ const readListCommunication = ( listId: string, id: string, params?: ReadListCommunicationParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get( `/call_center/list/${listId}/communication/${id}`, { ...options, params: { ...params, ...options?.params, }, }, ); }; /** * @summary Update ListCommunication */ const updateListCommunication = ( listId: string, id: string, engineListServiceUpdateListCommunicationBody: EngineListServiceUpdateListCommunicationBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.put( `/call_center/list/${listId}/communication/${id}`, engineListServiceUpdateListCommunicationBody, options, ); }; // --- footer start return { searchList, createList, deleteList, readList, updateList, searchListCommunication, createListCommunication, deleteListCommunication, readListCommunication, updateListCommunication, }; }; export type SearchListResult = AxiosResponse; export type CreateListResult = AxiosResponse; export type DeleteListResult = AxiosResponse; export type ReadListResult = AxiosResponse; export type UpdateListResult = AxiosResponse; export type SearchListCommunicationResult = AxiosResponse; export type CreateListCommunicationResult = AxiosResponse; export type DeleteListCommunicationResult = AxiosResponse; export type ReadListCommunicationResult = AxiosResponse; export type UpdateListCommunicationResult = AxiosResponse; // --- footer end