/** * 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 { CreateRelatedCaseParams, ListRelatedCasesParams, LocateRelatedCaseParams, UpdateRelatedCase2Body, UpdateRelatedCase2Params, UpdateRelatedCaseBody, UpdateRelatedCaseParams, WebitelCasesCreateInputRelatedCase, WebitelCasesRelatedCase, WebitelCasesRelatedCaseList, } from '../_models'; // --- header start // export const // --- title start getRelatedCases = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end /** * @summary Update an existing related case */ const updateRelatedCase2 = ( etag: string, updateRelatedCase2Body: UpdateRelatedCase2Body, params?: UpdateRelatedCase2Params, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.patch( `/cases/input.primary_case.id}/related/${etag}`, updateRelatedCase2Body, { ...options, params: { ...params, ...options?.params, }, }, ); }; /** * @summary Update an existing related case */ const updateRelatedCase = ( etag: string, updateRelatedCaseBody: UpdateRelatedCaseBody, params?: UpdateRelatedCaseParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.put( `/cases/input.primary_case.id}/related/${etag}`, updateRelatedCaseBody, { ...options, params: { ...params, ...options?.params, }, }, ); }; /** * @summary List all related cases for a specific case */ const listRelatedCases = ( primaryCaseEtag: string, params?: ListRelatedCasesParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/cases/${primaryCaseEtag}/related`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Create a new related case */ const createRelatedCase = ( primaryCaseEtag: string, webitelCasesCreateInputRelatedCase: WebitelCasesCreateInputRelatedCase, params?: CreateRelatedCaseParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/cases/${primaryCaseEtag}/related`, webitelCasesCreateInputRelatedCase, { ...options, params: { ...params, ...options?.params, }, }, ); }; /** * @summary Delete a specific related case */ const deleteRelatedCase = ( primaryCaseEtag: string, etag: string, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete( `/cases/${primaryCaseEtag}/related/${etag}`, options, ); }; /** * @summary Retrieve a specific related case by ID */ const locateRelatedCase = ( primaryCaseEtag: string, etag: string, params?: LocateRelatedCaseParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/cases/${primaryCaseEtag}/related/${etag}`, { ...options, params: { ...params, ...options?.params, }, }); }; // --- footer start return { updateRelatedCase2, updateRelatedCase, listRelatedCases, createRelatedCase, deleteRelatedCase, locateRelatedCase, }; }; export type UpdateRelatedCase2Result = AxiosResponse; export type UpdateRelatedCaseResult = AxiosResponse; export type ListRelatedCasesResult = AxiosResponse; export type CreateRelatedCaseResult = AxiosResponse; export type DeleteRelatedCaseResult = AxiosResponse; export type LocateRelatedCaseResult = AxiosResponse; // --- footer end