mirror of
https://github.com/chatwoot/chatwoot.git
synced 2026-06-13 21:01:16 +08:00
Co-authored-by: fayazara <[email protected]> Co-authored-by: Pranav Raj S <[email protected]>
23 lines
469 B
JavaScript
23 lines
469 B
JavaScript
/* global axios */
|
|
import ApiClient from './ApiClient';
|
|
|
|
class AutomationsAPI extends ApiClient {
|
|
constructor() {
|
|
super('automation_rules', { accountScoped: true });
|
|
}
|
|
|
|
clone(automationId) {
|
|
return axios.post(`${this.url}/${automationId}/clone`);
|
|
}
|
|
|
|
attachment(file) {
|
|
return axios.post(`${this.url}/attach_file`, file, {
|
|
headers: {
|
|
'Content-Type': 'multipart/form-data',
|
|
},
|
|
});
|
|
}
|
|
}
|
|
|
|
export default new AutomationsAPI();
|