/** * 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 { DeleteRoutingOutboundCallParams, EngineCreateRoutingOutboundCallRequest, EngineListRoutingOutboundCall, EngineMovePositionRoutingOutboundCallResponse, EngineRoutingOutboundCall, EngineRoutingOutboundCallServiceMovePositionRoutingOutboundCallBody, EngineRoutingOutboundCallServicePatchRoutingOutboundCallBody, EngineRoutingOutboundCallServiceUpdateRoutingOutboundCallBody, ReadRoutingOutboundCallParams, SearchRoutingOutboundCallParams, } from '../_models'; // --- header start // export const // --- title start getRoutingOutboundCallService = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end /** * @summary List of RoutingOutboundCall */ const searchRoutingOutboundCall = ( params?: SearchRoutingOutboundCallParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/routing/outbound/calls`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Create RoutingOutboundCall */ const createRoutingOutboundCall = ( engineCreateRoutingOutboundCallRequest: EngineCreateRoutingOutboundCallRequest, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/routing/outbound/calls`, engineCreateRoutingOutboundCallRequest, options, ); }; /** * @summary Move RoutingOutboundCall */ const movePositionRoutingOutboundCall = ( fromId: string, toId: string, engineRoutingOutboundCallServiceMovePositionRoutingOutboundCallBody: EngineRoutingOutboundCallServiceMovePositionRoutingOutboundCallBody, options?: AxiosRequestConfig, ): Promise< AxiosResponse > => { return axiosInstance.patch( `/routing/outbound/calls/${fromId}/to/${toId}`, engineRoutingOutboundCallServiceMovePositionRoutingOutboundCallBody, options, ); }; /** * @summary Remove RoutingOutboundCall */ const deleteRoutingOutboundCall = ( id: string, params?: DeleteRoutingOutboundCallParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete(`/routing/outbound/calls/${id}`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary RoutingOutboundCall item */ const readRoutingOutboundCall = ( id: string, params?: ReadRoutingOutboundCallParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/routing/outbound/calls/${id}`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Patch RoutingOutboundCall */ const patchRoutingOutboundCall = ( id: string, engineRoutingOutboundCallServicePatchRoutingOutboundCallBody: EngineRoutingOutboundCallServicePatchRoutingOutboundCallBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.patch( `/routing/outbound/calls/${id}`, engineRoutingOutboundCallServicePatchRoutingOutboundCallBody, options, ); }; /** * @summary Update RoutingOutboundCall */ const updateRoutingOutboundCall = ( id: string, engineRoutingOutboundCallServiceUpdateRoutingOutboundCallBody: EngineRoutingOutboundCallServiceUpdateRoutingOutboundCallBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.put( `/routing/outbound/calls/${id}`, engineRoutingOutboundCallServiceUpdateRoutingOutboundCallBody, options, ); }; // --- footer start return { searchRoutingOutboundCall, createRoutingOutboundCall, movePositionRoutingOutboundCall, deleteRoutingOutboundCall, readRoutingOutboundCall, patchRoutingOutboundCall, updateRoutingOutboundCall, }; }; export type SearchRoutingOutboundCallResult = AxiosResponse; export type CreateRoutingOutboundCallResult = AxiosResponse; export type MovePositionRoutingOutboundCallResult = AxiosResponse; export type DeleteRoutingOutboundCallResult = AxiosResponse; export type ReadRoutingOutboundCallResult = AxiosResponse; export type PatchRoutingOutboundCallResult = AxiosResponse; export type UpdateRoutingOutboundCallResult = AxiosResponse; // --- footer end