@unboundcx/sdk 4.8.14 → 4.8.15

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/video.js +26 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unboundcx/sdk",
3
- "version": "4.8.14",
3
+ "version": "4.8.15",
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 options) validationSchema.startDate = { type: 'string' };
462
- if ('endDate' in options) validationSchema.endDate = { type: 'string' };
463
- if ('limit' in options) validationSchema.limit = { type: 'number' };
464
- if ('offset' in options) validationSchema.offset = { type: 'number' };
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(options, validationSchema);
484
+ this.sdk.validateParams({ ...rest, engagementSessionId }, validationSchema);
468
485
  }
469
486
 
470
487
  const params = {
471
- query: options,
488
+ query: {
489
+ ...rest,
490
+ engagementSessionId,
491
+ },
472
492
  };
473
493
 
474
494
  const result = await internalRequest(this.sdk, '/video/meetings', 'GET', params);