@unboundcx/sdk 4.8.15 → 4.8.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unboundcx/sdk",
3
- "version": "4.8.15",
3
+ "version": "4.8.16",
4
4
  "description": "Official JavaScript SDK for the Unbound API - A comprehensive toolkit for integrating with Unbound's communication, AI, and data management services",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/services/voice.js CHANGED
@@ -250,20 +250,21 @@ export class VoiceService {
250
250
  return this.mute(voiceChannelId, 'unmute', direction);
251
251
  }
252
252
 
253
- async sendDtmf(voiceChannelId, dtmf) {
253
+ async sendDtmf(voiceChannelId, dtmf, mode) {
254
254
  this.sdk.validateParams(
255
- { voiceChannelId, dtmf },
255
+ { voiceChannelId, dtmf, mode },
256
256
  {
257
257
  voiceChannelId: { type: 'string', required: true },
258
258
  dtmf: { type: 'string', required: true },
259
+ mode: { type: 'string', required: false },
259
260
  },
260
261
  );
261
262
 
262
263
  const params = {
263
- body: { dtmf },
264
+ body: mode ? { dtmf, mode } : { dtmf },
264
265
  };
265
266
 
266
- const result = await internalRequest(this.sdk,
267
+ const result = await internalRequest(this.sdk,
267
268
  `/voice/calls/dtmf/${voiceChannelId}`,
268
269
  'POST',
269
270
  params,