@unboundcx/sdk 4.8.14 → 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 +1 -1
- package/services/video.js +26 -6
- package/services/voice.js +5 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unboundcx/sdk",
|
|
3
|
-
"version": "4.8.
|
|
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/video.js
CHANGED
|
@@ -455,20 +455,40 @@ export class VideoService {
|
|
|
455
455
|
return await internalRequest(this.sdk, `/video/${roomId}`, 'GET', params);
|
|
456
456
|
}
|
|
457
457
|
|
|
458
|
+
/**
|
|
459
|
+
* List meetings visible to the current user.
|
|
460
|
+
*
|
|
461
|
+
* @param {Object} [options] - Parameters
|
|
462
|
+
* @param {string} [options.startDate] - Start of the search window
|
|
463
|
+
* @param {string} [options.endDate] - End of the search window
|
|
464
|
+
* @param {number} [options.limit] - Max results
|
|
465
|
+
* @param {number} [options.offset] - Pagination offset
|
|
466
|
+
* @param {string} [options.engagementSessionId] - When set, returns meetings tied to this
|
|
467
|
+
* engagement session instead of filtering by the caller's own hosts/participants email —
|
|
468
|
+
* lets a reviewing manager see meetings they weren't part of.
|
|
469
|
+
* @returns {Promise<Object>} Meetings list result
|
|
470
|
+
*/
|
|
458
471
|
async listMeetings(options = {}) {
|
|
472
|
+
const { engagementSessionId, ...rest } = options;
|
|
473
|
+
|
|
459
474
|
// Validate optional parameters
|
|
460
475
|
const validationSchema = {};
|
|
461
|
-
if ('startDate' in
|
|
462
|
-
if ('endDate' in
|
|
463
|
-
if ('limit' in
|
|
464
|
-
if ('offset' in
|
|
476
|
+
if ('startDate' in rest) validationSchema.startDate = { type: 'string' };
|
|
477
|
+
if ('endDate' in rest) validationSchema.endDate = { type: 'string' };
|
|
478
|
+
if ('limit' in rest) validationSchema.limit = { type: 'number' };
|
|
479
|
+
if ('offset' in rest) validationSchema.offset = { type: 'number' };
|
|
480
|
+
if (engagementSessionId !== undefined)
|
|
481
|
+
validationSchema.engagementSessionId = { type: 'string' };
|
|
465
482
|
|
|
466
483
|
if (Object.keys(validationSchema).length > 0) {
|
|
467
|
-
this.sdk.validateParams(
|
|
484
|
+
this.sdk.validateParams({ ...rest, engagementSessionId }, validationSchema);
|
|
468
485
|
}
|
|
469
486
|
|
|
470
487
|
const params = {
|
|
471
|
-
query:
|
|
488
|
+
query: {
|
|
489
|
+
...rest,
|
|
490
|
+
engagementSessionId,
|
|
491
|
+
},
|
|
472
492
|
};
|
|
473
493
|
|
|
474
494
|
const result = await internalRequest(this.sdk, '/video/meetings', 'GET', params);
|
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,
|