@unboundcx/sdk 2.8.0 → 2.8.2

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 +11 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unboundcx/sdk",
3
- "version": "2.8.0",
3
+ "version": "2.8.2",
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
@@ -14,13 +14,15 @@ export class VideoService {
14
14
  return result;
15
15
  }
16
16
 
17
- async joinRoom(room, password, email) {
17
+ async joinRoom(room, password, email, name, tokenType = 'cookie') {
18
18
  this.sdk.validateParams(
19
- { room, password, email },
19
+ { room, password, email, name, tokenType },
20
20
  {
21
21
  room: { type: 'string', required: true },
22
22
  password: { type: 'string', required: false },
23
23
  email: { type: 'string', required: false },
24
+ name: { type: 'string', required: false },
25
+ tokenType: { type: 'string', required: true },
24
26
  },
25
27
  );
26
28
 
@@ -28,7 +30,8 @@ export class VideoService {
28
30
  body: {
29
31
  password,
30
32
  email,
31
- tokenType: 'cookie',
33
+ name,
34
+ tokenType,
32
35
  },
33
36
  };
34
37
  const result = await this.sdk._fetch(
@@ -379,11 +382,12 @@ export class VideoService {
379
382
  return result;
380
383
  }
381
384
 
382
- async validateGuestToken(token) {
385
+ async validateGuestToken(id, token) {
383
386
  this.sdk.validateParams(
384
- { token },
387
+ { id, token },
385
388
  {
386
- token: { type: 'string', required: true },
389
+ id: { type: 'string', required: true },
390
+ token: { type: 'string', required: false },
387
391
  },
388
392
  );
389
393
 
@@ -392,7 +396,7 @@ export class VideoService {
392
396
  };
393
397
 
394
398
  const result = await this.sdk._fetch(
395
- '/video/validateGuestToken',
399
+ `/video/${id}/validate`,
396
400
  'POST',
397
401
  params,
398
402
  );