/** * 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 { EngineListTeamHook, EngineTeamHook, EngineTeamHookServiceCreateTeamHookBody, EngineTeamHookServicePatchTeamHookBody, EngineTeamHookServiceUpdateTeamHookBody, SearchTeamHookParams, } from '../_models'; // --- header start // export const // --- title start getTeamHookService = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end const searchTeamHook = ( teamId: string, params?: SearchTeamHookParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/call_center/teams/${teamId}/hooks`, { ...options, params: { ...params, ...options?.params, }, }); }; const createTeamHook = ( teamId: string, engineTeamHookServiceCreateTeamHookBody: EngineTeamHookServiceCreateTeamHookBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/call_center/teams/${teamId}/hooks`, engineTeamHookServiceCreateTeamHookBody, options, ); }; const deleteTeamHook = ( teamId: string, id: number, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete( `/call_center/teams/${teamId}/hooks/${id}`, options, ); }; const readTeamHook = ( teamId: string, id: number, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get( `/call_center/teams/${teamId}/hooks/${id}`, options, ); }; const patchTeamHook = ( teamId: string, id: number, engineTeamHookServicePatchTeamHookBody: EngineTeamHookServicePatchTeamHookBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.patch( `/call_center/teams/${teamId}/hooks/${id}`, engineTeamHookServicePatchTeamHookBody, options, ); }; const updateTeamHook = ( teamId: string, id: number, engineTeamHookServiceUpdateTeamHookBody: EngineTeamHookServiceUpdateTeamHookBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.put( `/call_center/teams/${teamId}/hooks/${id}`, engineTeamHookServiceUpdateTeamHookBody, options, ); }; // --- footer start return { searchTeamHook, createTeamHook, deleteTeamHook, readTeamHook, patchTeamHook, updateTeamHook, }; }; export type SearchTeamHookResult = AxiosResponse; export type CreateTeamHookResult = AxiosResponse; export type DeleteTeamHookResult = AxiosResponse; export type ReadTeamHookResult = AxiosResponse; export type PatchTeamHookResult = AxiosResponse; export type UpdateTeamHookResult = AxiosResponse; // --- footer end