/** * 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 { ShiftTemplateServiceReadShiftTemplateParams, ShiftTemplateServiceSearchShiftTemplateParams, ShiftTemplateServiceUpdateShiftTemplateBody, WfmCreateShiftTemplateRequest, WfmCreateShiftTemplateResponse, WfmDeleteShiftTemplateResponse, WfmReadShiftTemplateResponse, WfmSearchShiftTemplateResponse, WfmUpdateShiftTemplateResponse, } from '../_models'; // --- header start // export const // --- title start getShiftTemplateService = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end const shiftTemplateServiceSearchShiftTemplate = ( params?: ShiftTemplateServiceSearchShiftTemplateParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/wfm/lookups/shift_templates`, { ...options, params: { ...params, ...options?.params, }, }); }; const shiftTemplateServiceCreateShiftTemplate = ( wfmCreateShiftTemplateRequest: WfmCreateShiftTemplateRequest, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/wfm/lookups/shift_templates`, wfmCreateShiftTemplateRequest, options, ); }; const shiftTemplateServiceDeleteShiftTemplate = ( id: string, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete( `/wfm/lookups/shift_templates/${id}`, options, ); }; const shiftTemplateServiceReadShiftTemplate = ( id: string, params?: ShiftTemplateServiceReadShiftTemplateParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/wfm/lookups/shift_templates/${id}`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary UpdateShiftTemplate updates a shift template with a list times. Update existing time, create that not exists in database and delete that not exists in the list. */ const shiftTemplateServiceUpdateShiftTemplate = ( shiftTemplateServiceUpdateShiftTemplateBody: ShiftTemplateServiceUpdateShiftTemplateBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.put( `/wfm/lookups/shift_templates/item.id}`, shiftTemplateServiceUpdateShiftTemplateBody, options, ); }; // --- footer start return { shiftTemplateServiceSearchShiftTemplate, shiftTemplateServiceCreateShiftTemplate, shiftTemplateServiceDeleteShiftTemplate, shiftTemplateServiceReadShiftTemplate, shiftTemplateServiceUpdateShiftTemplate, }; }; export type ShiftTemplateServiceSearchShiftTemplateResult = AxiosResponse; export type ShiftTemplateServiceCreateShiftTemplateResult = AxiosResponse; export type ShiftTemplateServiceDeleteShiftTemplateResult = AxiosResponse; export type ShiftTemplateServiceReadShiftTemplateResult = AxiosResponse; export type ShiftTemplateServiceUpdateShiftTemplateResult = AxiosResponse; // --- footer end