Chatwoot/app/javascript/dashboard/api/channel/fbChannel.js
Sojan Jose a3c2d4e5bd
Chore: Add Facebook app set up documentation (#647)
Co-authored-by: Pranav Raj S <pranavrajs@gmail.com>
2020-03-28 11:43:02 +05:30

31 lines
682 B
JavaScript

/* global axios */
import ApiClient from '../ApiClient';
class FBChannel extends ApiClient {
constructor() {
super('facebook_indicators', { accountScoped: true });
}
markSeen({ inboxId, contactId }) {
return axios.post(`${this.url}/mark_seen`, {
inbox_id: inboxId,
contact_id: contactId,
});
}
toggleTyping({ status, inboxId, contactId }) {
return axios.post(`${this.url}/typing_${status}`, {
inbox_id: inboxId,
contact_id: contactId,
});
}
create(params) {
return axios.post(
`${this.url.replace(this.resource, '')}callbacks/register_facebook_page`,
params
);
}
}
export default new FBChannel();