/** * 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 { DeleteBucketParams, EngineBucket, EngineBucketServiceUpdateBucketBody, EngineCreateBucketRequest, EngineListBucket, ReadBucketParams, SearchBucketParams, } from '../_models'; // --- header start // export const // --- title start getBucketService = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end /** * @summary List of Bucket */ const searchBucket = ( params?: SearchBucketParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/call_center/buckets`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Create Bucket */ const createBucket = ( engineCreateBucketRequest: EngineCreateBucketRequest, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/call_center/buckets`, engineCreateBucketRequest, options, ); }; /** * @summary Remove Bucket */ const deleteBucket = ( id: string, params?: DeleteBucketParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete(`/call_center/buckets/${id}`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Bucket item */ const readBucket = ( id: string, params?: ReadBucketParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/call_center/buckets/${id}`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Update Bucket */ const updateBucket = ( id: string, engineBucketServiceUpdateBucketBody: EngineBucketServiceUpdateBucketBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.put( `/call_center/buckets/${id}`, engineBucketServiceUpdateBucketBody, options, ); }; // --- footer start return { searchBucket, createBucket, deleteBucket, readBucket, updateBucket, }; }; export type SearchBucketResult = AxiosResponse; export type CreateBucketResult = AxiosResponse; export type DeleteBucketResult = AxiosResponse; export type ReadBucketResult = AxiosResponse; export type UpdateBucketResult = AxiosResponse; // --- footer end