feat(captain): add FAQ suggestion review interface

This commit is contained in:
aakashb95
2026-07-14 23:00:38 +05:30
parent 44ad817fb3
commit d3e1ad56ac
8 changed files with 673 additions and 304 deletions
@@ -0,0 +1,35 @@
/* global axios */
import ApiClient from '../ApiClient';
class CaptainFaqSuggestions extends ApiClient {
constructor() {
super('captain/faq_suggestions', { accountScoped: true });
}
get({ page = 1, search, assistantId, status = 'open' } = {}) {
return axios.get(this.url, {
params: {
page,
search,
assistant_id: assistantId,
status,
},
});
}
update(id, data) {
return axios.patch(`${this.url}/${id}`, { faq_suggestion: data });
}
approve(id, data) {
return axios.post(`${this.url}/${id}/approve`, {
faq_suggestion: data,
});
}
dismiss(id) {
return axios.post(`${this.url}/${id}/dismiss`);
}
}
export default new CaptainFaqSuggestions();