/** * 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 { DeleteCommentParams, ListCommentsParams, LocateCommentParams, PublishCommentParams, UpdateComment2Body, UpdateComment2Params, UpdateCommentBody, UpdateCommentParams, WebitelCasesCaseComment, WebitelCasesCaseCommentList, WebitelCasesInputCaseComment, } from '../_models'; // --- header start // export const // --- title start getCaseComments = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end /** * @summary Delete a specific comment by its etag */ const deleteComment = ( etag: string, params?: DeleteCommentParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete(`/cases/comments/${etag}`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Retrieve a specific comment by its etag */ const locateComment = ( etag: string, params?: LocateCommentParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/cases/comments/${etag}`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Update a specific comment by its etag */ const updateComment2 = ( updateComment2Body: UpdateComment2Body, params?: UpdateComment2Params, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.patch( `/cases/comments/input.etag}`, updateComment2Body, { ...options, params: { ...params, ...options?.params, }, }, ); }; /** * @summary Update a specific comment by its etag */ const updateComment = ( updateCommentBody: UpdateCommentBody, params?: UpdateCommentParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.put( `/cases/comments/input.etag}`, updateCommentBody, { ...options, params: { ...params, ...options?.params, }, }, ); }; /** * @summary Retrieve a list of comments associated with a specific case */ const listComments = ( caseEtag: string, params?: ListCommentsParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/cases/${caseEtag}/comments`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Publish comment into a specific case */ const publishComment = ( caseEtag: string, webitelCasesInputCaseComment: WebitelCasesInputCaseComment, params?: PublishCommentParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/cases/${caseEtag}/comments`, webitelCasesInputCaseComment, { ...options, params: { ...params, ...options?.params, }, }, ); }; // --- footer start return { deleteComment, locateComment, updateComment2, updateComment, listComments, publishComment, }; }; export type DeleteCommentResult = AxiosResponse; export type LocateCommentResult = AxiosResponse; export type UpdateComment2Result = AxiosResponse; export type UpdateCommentResult = AxiosResponse; export type ListCommentsResult = AxiosResponse; export type PublishCommentResult = AxiosResponse; // --- footer end