feat(whatsapp-call): add call recording, transcription, beforeunload termination and documentation

This commit is contained in:
Tanmay Deep Sharma
2026-03-24 13:13:49 +05:30
parent d6eb945d25
commit 504a32214e
19 changed files with 1943 additions and 193 deletions
@@ -6,6 +6,10 @@ class WhatsappCallsAPI extends ApiClient {
super('whatsapp_calls', { accountScoped: true });
}
show(callId) {
return axios.get(`${this.url}/${callId}`);
}
accept(callId, sdpAnswer) {
return axios.post(`${this.url}/${callId}/accept`, {
sdp_answer: sdpAnswer,
@@ -26,6 +30,14 @@ class WhatsappCallsAPI extends ApiClient {
sdp_offer: sdpOffer,
});
}
uploadRecording(callId, blob) {
const formData = new FormData();
formData.append('recording', blob, `call-${callId}.webm`);
return axios.post(`${this.url}/${callId}/upload_recording`, formData, {
headers: { 'Content-Type': 'multipart/form-data' },
});
}
}
export default new WhatsappCallsAPI();