2019-10-29 07:20:54 +00:00
|
|
|
const sendMessage = content => ({
|
|
|
|
url: `/api/v1/widget/messages${window.location.search}`,
|
|
|
|
params: {
|
|
|
|
message: {
|
|
|
|
content,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2019-12-11 15:27:06 +00:00
|
|
|
const getConversation = ({ before }) => ({
|
2019-10-29 07:20:54 +00:00
|
|
|
url: `/api/v1/widget/messages${window.location.search}`,
|
2019-12-11 15:27:06 +00:00
|
|
|
params: { before },
|
2019-10-29 07:20:54 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
export default {
|
|
|
|
sendMessage,
|
|
|
|
getConversation,
|
|
|
|
};
|