feat: Add a pre-chat form on widget (#1769)

This commit is contained in:
Pranav Raj S 2021-02-16 00:14:13 +05:30 committed by GitHub
parent 5f2bf7dfd2
commit 037ffc7419
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 604 additions and 200 deletions

View file

@ -1,6 +1,12 @@
import endPoints from 'widget/api/endPoints';
import { API } from 'widget/helpers/axios';
const createConversationAPI = async content => {
const urlData = endPoints.createConversation(content);
const result = await API.post(urlData.url, urlData.params);
return result;
};
const sendMessageAPI = async content => {
const urlData = endPoints.sendMessage(content);
const result = await API.post(urlData.url, urlData.params);
@ -38,6 +44,7 @@ const setUserLastSeenAt = async ({ lastSeen }) => {
};
export {
createConversationAPI,
sendMessageAPI,
getConversationAPI,
getMessagesAPI,