/** * 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 { WfmCreateWorkingScheduleRequest, WfmCreateWorkingScheduleResponse, WfmDeleteWorkingScheduleResponse, WfmReadWorkingScheduleForecastResponse, WfmReadWorkingScheduleResponse, WfmSearchWorkingScheduleResponse, WfmUpdateWorkingScheduleAddAgentsResponse, WfmUpdateWorkingScheduleRemoveAgentResponse, WfmUpdateWorkingScheduleResponse, WorkingScheduleServiceReadWorkingScheduleForecastParams, WorkingScheduleServiceReadWorkingScheduleParams, WorkingScheduleServiceSearchWorkingScheduleParams, WorkingScheduleServiceUpdateWorkingScheduleAddAgentsBody, WorkingScheduleServiceUpdateWorkingScheduleBody, } from '../_models'; // --- header start // export const // --- title start getWorkingScheduleService = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end const workingScheduleServiceSearchWorkingSchedule = ( params?: WorkingScheduleServiceSearchWorkingScheduleParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/wfm/lookups/working_schedules`, { ...options, params: { ...params, ...options?.params, }, }); }; const workingScheduleServiceCreateWorkingSchedule = ( wfmCreateWorkingScheduleRequest: WfmCreateWorkingScheduleRequest, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/wfm/lookups/working_schedules`, wfmCreateWorkingScheduleRequest, options, ); }; const workingScheduleServiceDeleteWorkingSchedule = ( id: string, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete( `/wfm/lookups/working_schedules/${id}`, options, ); }; const workingScheduleServiceReadWorkingSchedule = ( id: string, params?: WorkingScheduleServiceReadWorkingScheduleParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/wfm/lookups/working_schedules/${id}`, { ...options, params: { ...params, ...options?.params, }, }); }; const workingScheduleServiceUpdateWorkingScheduleAddAgents = ( id: string, workingScheduleServiceUpdateWorkingScheduleAddAgentsBody: WorkingScheduleServiceUpdateWorkingScheduleAddAgentsBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/wfm/lookups/working_schedules/${id}/agents`, workingScheduleServiceUpdateWorkingScheduleAddAgentsBody, options, ); }; const workingScheduleServiceUpdateWorkingScheduleRemoveAgent = ( id: string, agentId: string, options?: AxiosRequestConfig, ): Promise< AxiosResponse > => { return axiosInstance.delete( `/wfm/lookups/working_schedules/${id}/agents/${agentId}`, options, ); }; const workingScheduleServiceReadWorkingScheduleForecast = ( id: string, params?: WorkingScheduleServiceReadWorkingScheduleForecastParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get( `/wfm/lookups/working_schedules/${id}/forecast`, { ...options, params: { ...params, ...options?.params, }, }, ); }; const workingScheduleServiceUpdateWorkingSchedule = ( workingScheduleServiceUpdateWorkingScheduleBody: WorkingScheduleServiceUpdateWorkingScheduleBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.put( `/wfm/lookups/working_schedules/item.id}`, workingScheduleServiceUpdateWorkingScheduleBody, options, ); }; // --- footer start return { workingScheduleServiceSearchWorkingSchedule, workingScheduleServiceCreateWorkingSchedule, workingScheduleServiceDeleteWorkingSchedule, workingScheduleServiceReadWorkingSchedule, workingScheduleServiceUpdateWorkingScheduleAddAgents, workingScheduleServiceUpdateWorkingScheduleRemoveAgent, workingScheduleServiceReadWorkingScheduleForecast, workingScheduleServiceUpdateWorkingSchedule, }; }; export type WorkingScheduleServiceSearchWorkingScheduleResult = AxiosResponse; export type WorkingScheduleServiceCreateWorkingScheduleResult = AxiosResponse; export type WorkingScheduleServiceDeleteWorkingScheduleResult = AxiosResponse; export type WorkingScheduleServiceReadWorkingScheduleResult = AxiosResponse; export type WorkingScheduleServiceUpdateWorkingScheduleAddAgentsResult = AxiosResponse; export type WorkingScheduleServiceUpdateWorkingScheduleRemoveAgentResult = AxiosResponse; export type WorkingScheduleServiceReadWorkingScheduleForecastResult = AxiosResponse; export type WorkingScheduleServiceUpdateWorkingScheduleResult = AxiosResponse; // --- footer end