@unboundcx/sdk 4.13.142 → 4.13.143
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 +1 -1
- package/services/voicemailDrops.js +39 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unboundcx/sdk",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.143",
|
|
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",
|
|
@@ -12,10 +12,22 @@ export class VoicemailDropTypesService {
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* List voicemail drop types.
|
|
15
|
+
* @param {Object} [params]
|
|
16
|
+
* @param {boolean} [params.includeInactive]
|
|
15
17
|
* @returns {Promise<{results: Object[]}>}
|
|
16
18
|
*/
|
|
17
|
-
async list() {
|
|
18
|
-
return internalRequest(this.sdk, '/voicemailDrops/types', 'GET');
|
|
19
|
+
async list(params = {}) {
|
|
20
|
+
return internalRequest(this.sdk, '/voicemailDrops/types', 'GET', { query: { ...params } });
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Get a single voicemail drop type.
|
|
25
|
+
* @param {string} id
|
|
26
|
+
* @returns {Promise<Object>}
|
|
27
|
+
*/
|
|
28
|
+
async get(id) {
|
|
29
|
+
this.sdk.validateParams({ id }, { id: { type: 'string', required: true } });
|
|
30
|
+
return internalRequest(this.sdk, `/voicemailDrops/types/${id}`, 'GET');
|
|
19
31
|
}
|
|
20
32
|
|
|
21
33
|
/**
|
|
@@ -58,6 +70,31 @@ export class VoicemailDropTypesService {
|
|
|
58
70
|
this.sdk.validateParams({ id }, { id: { type: 'string', required: true } });
|
|
59
71
|
return internalRequest(this.sdk, `/voicemailDrops/types/${id}`, 'DELETE');
|
|
60
72
|
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Set which users/groups can see a voicemail drop type.
|
|
76
|
+
* @param {string} id
|
|
77
|
+
* @param {Object} options
|
|
78
|
+
* @param {string[]} [options.userIds]
|
|
79
|
+
* @param {string[]} [options.groupIds]
|
|
80
|
+
* @returns {Promise<Object>}
|
|
81
|
+
*/
|
|
82
|
+
async setAccess(id, { userIds, groupIds } = {}) {
|
|
83
|
+
this.sdk.validateParams({ id }, { id: { type: 'string', required: true } });
|
|
84
|
+
return internalRequest(this.sdk, `/voicemailDrops/types/${id}/access`, 'PUT', {
|
|
85
|
+
body: { userIds, groupIds },
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* List users who have recorded a voicemail drop message for this type.
|
|
91
|
+
* @param {string} id
|
|
92
|
+
* @returns {Promise<{results: Object[]}>}
|
|
93
|
+
*/
|
|
94
|
+
async recordings(id) {
|
|
95
|
+
this.sdk.validateParams({ id }, { id: { type: 'string', required: true } });
|
|
96
|
+
return internalRequest(this.sdk, `/voicemailDrops/types/${id}/recordings`, 'GET');
|
|
97
|
+
}
|
|
61
98
|
}
|
|
62
99
|
|
|
63
100
|
// Build a multipart body for a single audio file + scalar fields. Mirrors
|