@unboundcx/sdk 4.8.4 → 4.8.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/services/inbox.js +20 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unboundcx/sdk",
3
- "version": "4.8.4",
3
+ "version": "4.8.5",
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/inbox.js CHANGED
@@ -91,4 +91,24 @@ export class InboxService {
91
91
  const result = await this.sdk._fetch('/inbox/stats', 'GET');
92
92
  return result;
93
93
  }
94
+
95
+ /**
96
+ * Trigger transcription for a voicemail that has a recording but no
97
+ * transcript (fire-and-forget server-side; poll the record for the
98
+ * resulting `transcription` / `transcriptionStatus`).
99
+ *
100
+ * @param {string} voicemailMessageId
101
+ * @returns {Promise<{accepted?: boolean, skipped?: boolean}>}
102
+ */
103
+ async transcribeVoicemail(voicemailMessageId) {
104
+ this.sdk.validateParams(
105
+ { voicemailMessageId },
106
+ { voicemailMessageId: { type: 'string', required: true } },
107
+ );
108
+ return await this.sdk._fetch(
109
+ `/inbox/voicemail/${voicemailMessageId}/transcribe`,
110
+ 'POST',
111
+ { body: {} },
112
+ );
113
+ }
94
114
  }