/** * 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 { ContactLinkingServiceCreateContactFromConversationParams, ContactLinkingServiceLinkContactToClientParams, WebitelChatEmptyResponse, WebitelChatLookup, } from '../_models'; // --- header start // export const // --- title start getContactLinkingService = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end /** * @summary CreateContactFromConversation creates new contact from the data existing in the conversation and after that links this contact to the external user. */ const contactLinkingServiceCreateContactFromConversation = ( conversationId: string, params?: ContactLinkingServiceCreateContactFromConversationParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/chat/${conversationId}/contact`, undefined, { ...options, params: { ...params, ...options?.params, }, }, ); }; /** * @summary LinkContactToClient creates connection between existing internal contact and external client. */ const contactLinkingServiceLinkContactToClient = ( conversationId: string, params?: ContactLinkingServiceLinkContactToClientParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post(`/chat/${conversationId}/link`, undefined, { ...options, params: { ...params, ...options?.params, }, }); }; // --- footer start return { contactLinkingServiceCreateContactFromConversation, contactLinkingServiceLinkContactToClient, }; }; export type ContactLinkingServiceCreateContactFromConversationResult = AxiosResponse; export type ContactLinkingServiceLinkContactToClientResult = AxiosResponse; // --- footer end