@unboundcx/sdk 4.0.13 → 4.0.14

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.0.13",
3
+ "version": "4.0.14",
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
@@ -22,9 +22,9 @@ export class VoiceService {
22
22
  return result;
23
23
  }
24
24
 
25
- async call({ to, from, destination, app, timeout, customHeaders }) {
25
+ async call({ to, from, destination, app, timeout, customHeaders, statusWebhook }) {
26
26
  this.sdk.validateParams(
27
- { to, from, destination, app, timeout, customHeaders },
27
+ { to, from, destination, app, timeout, customHeaders, statusWebhook },
28
28
  {
29
29
  to: { type: 'string', required: true },
30
30
  from: { type: 'string', required: true },
@@ -32,6 +32,10 @@ export class VoiceService {
32
32
  app: { type: 'object', required: false },
33
33
  timeout: { type: 'number', required: false },
34
34
  customHeaders: { type: 'object', required: false },
35
+ // { url, static } — internal endpoint that receives call progress
36
+ // events (trying/ringing/answered/failed) with `static` fields
37
+ // merged into each POST body
38
+ statusWebhook: { type: 'object', required: false },
35
39
  },
36
40
  );
37
41
 
@@ -43,6 +47,7 @@ export class VoiceService {
43
47
  app,
44
48
  timeout,
45
49
  customHeaders,
50
+ statusWebhook,
46
51
  },
47
52
  };
48
53