/** * 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 { CreateLinkParams, ListLinksParams, LocateLinkParams, UpdateLink2Body, UpdateLink2Params, UpdateLinkBody, UpdateLinkParams, WebitelCasesCaseLink, WebitelCasesCaseLinkList, } from '../_models'; // --- header start // export const // --- title start getCaseLinks = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end /** * @summary With Case */ const listLinks = ( caseEtag: string, params?: ListLinksParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/cases/${caseEtag}/links`, { ...options, params: { ...params, ...options?.params, }, }); }; const createLink = ( caseEtag: string, params?: CreateLinkParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post(`/cases/${caseEtag}/links`, undefined, { ...options, params: { ...params, ...options?.params, }, }); }; const deleteLink = ( caseEtag: string, etag: string, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete( `/cases/${caseEtag}/links/${etag}`, options, ); }; const locateLink = ( caseEtag: string, etag: string, params?: LocateLinkParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/cases/${caseEtag}/links/${etag}`, { ...options, params: { ...params, ...options?.params, }, }); }; const updateLink2 = ( caseEtag: string, updateLink2Body: UpdateLink2Body, params?: UpdateLink2Params, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.patch( `/cases/${caseEtag}/links/input.etag}`, updateLink2Body, { ...options, params: { ...params, ...options?.params, }, }, ); }; const updateLink = ( caseEtag: string, updateLinkBody: UpdateLinkBody, params?: UpdateLinkParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.put( `/cases/${caseEtag}/links/input.etag}`, updateLinkBody, { ...options, params: { ...params, ...options?.params, }, }, ); }; // --- footer start return { listLinks, createLink, deleteLink, locateLink, updateLink2, updateLink, }; }; export type ListLinksResult = AxiosResponse; export type CreateLinkResult = AxiosResponse; export type DeleteLinkResult = AxiosResponse; export type LocateLinkResult = AxiosResponse; export type UpdateLink2Result = AxiosResponse; export type UpdateLinkResult = AxiosResponse; // --- footer end