@wazo/sdk 0.38.5 → 0.38.8

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 (135) hide show
  1. package/README.md +1 -1
  2. package/dist/wazo-sdk.js +2 -2
  3. package/esm/__tests__/api-client.test.js +148 -2
  4. package/esm/__tests__/web-rtc-client.test.js +303 -26
  5. package/esm/api/calld.js +14 -0
  6. package/esm/api/confd.js +134 -2
  7. package/esm/api/ctid-ng.js +6 -0
  8. package/esm/api-client.js +148 -2
  9. package/esm/checker/Checker.js +212 -26
  10. package/esm/checker/checks/aor.js +148 -2
  11. package/esm/checker/checks/api.js +148 -2
  12. package/esm/checker/checks/index.js +212 -26
  13. package/esm/checker/checks/wazo-websocket.js +2 -0
  14. package/esm/checker/checks/webrtc-transport.js +210 -26
  15. package/esm/checker/checks/webrtc.js +210 -26
  16. package/esm/domain/AdHocAPIConference.js +148 -2
  17. package/esm/domain/Call.js +6 -0
  18. package/esm/domain/CallSession.js +1 -1
  19. package/esm/domain/Features.js +148 -2
  20. package/esm/domain/Meeting.js +18 -0
  21. package/esm/domain/MeetingAuthorization.js +70 -0
  22. package/esm/domain/Phone/CTIPhone.js +149 -3
  23. package/esm/domain/Phone/WebRTCPhone.js +3 -3
  24. package/esm/domain/__tests__/Call.test.js +6 -0
  25. package/esm/domain/__tests__/CallSession.test.js +1 -1
  26. package/esm/domain/__tests__/IndirectTransfer.test.js +1 -1
  27. package/esm/domain/__tests__/Meeting.test.js +87 -1
  28. package/esm/domain/__tests__/MeetingAuthorization.test.js +109 -0
  29. package/esm/domain/__tests__/Room.test.js +1 -1
  30. package/esm/index.js +258 -32
  31. package/esm/lib/WazoSessionDescriptionHandler.js +22 -1
  32. package/esm/service/CallApi.js +148 -2
  33. package/esm/service/getApiClient.js +148 -2
  34. package/esm/simple/Auth.js +258 -32
  35. package/esm/simple/Configuration.js +258 -32
  36. package/esm/simple/Directory.js +148 -2
  37. package/esm/simple/Phone.js +258 -32
  38. package/esm/simple/Websocket.js +3 -0
  39. package/esm/simple/index.js +258 -32
  40. package/esm/simple/room/LocalParticipant.js +258 -32
  41. package/esm/simple/room/Participant.js +258 -32
  42. package/esm/simple/room/RemoteParticipant.js +258 -32
  43. package/esm/simple/room/Room.js +258 -32
  44. package/esm/simple/room/SipRoom.js +258 -32
  45. package/esm/simple/room/Stream.js +258 -32
  46. package/esm/simple/room/__tests__/Participant.test.js +14747 -0
  47. package/esm/simple/room/__tests__/RemoteParticipant.test.js +258 -32
  48. package/esm/simple/utils.js +258 -32
  49. package/esm/utils/__tests__/object.test.js +57 -0
  50. package/esm/utils/__tests__/sdp.test.js +50 -0
  51. package/esm/utils/__tests__/string.test.js +30 -0
  52. package/esm/utils/object.js +24 -0
  53. package/esm/utils/sdp.js +19 -1
  54. package/esm/utils/string.js +10 -0
  55. package/esm/web-rtc-client.js +210 -26
  56. package/esm/websocket-client.js +3 -1
  57. package/lib/__tests__/api-client.test.js +148 -2
  58. package/lib/__tests__/web-rtc-client.test.js +303 -26
  59. package/lib/api/calld.js +14 -0
  60. package/lib/api/confd.js +134 -2
  61. package/lib/api/ctid-ng.js +6 -0
  62. package/lib/api-client.js +148 -2
  63. package/lib/checker/Checker.js +212 -26
  64. package/lib/checker/checks/aor.js +148 -2
  65. package/lib/checker/checks/api.js +148 -2
  66. package/lib/checker/checks/index.js +212 -26
  67. package/lib/checker/checks/wazo-websocket.js +2 -0
  68. package/lib/checker/checks/webrtc-transport.js +210 -26
  69. package/lib/checker/checks/webrtc.js +210 -26
  70. package/lib/domain/AdHocAPIConference.js +148 -2
  71. package/lib/domain/Call.js +6 -0
  72. package/lib/domain/CallSession.js +1 -1
  73. package/lib/domain/Features.js +148 -2
  74. package/lib/domain/Meeting.js +18 -0
  75. package/lib/domain/MeetingAuthorization.js +79 -0
  76. package/lib/domain/Phone/CTIPhone.js +149 -3
  77. package/lib/domain/Phone/WebRTCPhone.js +3 -3
  78. package/lib/domain/__tests__/Call.test.js +6 -0
  79. package/lib/domain/__tests__/CallSession.test.js +1 -1
  80. package/lib/domain/__tests__/IndirectTransfer.test.js +1 -1
  81. package/lib/domain/__tests__/Meeting.test.js +87 -1
  82. package/lib/domain/__tests__/MeetingAuthorization.test.js +111 -0
  83. package/lib/domain/__tests__/Room.test.js +1 -1
  84. package/lib/index.js +258 -32
  85. package/lib/lib/WazoSessionDescriptionHandler.js +22 -1
  86. package/lib/service/CallApi.js +148 -2
  87. package/lib/service/getApiClient.js +148 -2
  88. package/lib/simple/Auth.js +258 -32
  89. package/lib/simple/Configuration.js +258 -32
  90. package/lib/simple/Directory.js +148 -2
  91. package/lib/simple/Phone.js +258 -32
  92. package/lib/simple/Websocket.js +3 -0
  93. package/lib/simple/index.js +258 -32
  94. package/lib/simple/room/LocalParticipant.js +258 -32
  95. package/lib/simple/room/Participant.js +258 -32
  96. package/lib/simple/room/RemoteParticipant.js +258 -32
  97. package/lib/simple/room/Room.js +258 -32
  98. package/lib/simple/room/SipRoom.js +258 -32
  99. package/lib/simple/room/Stream.js +258 -32
  100. package/lib/simple/room/__tests__/Participant.test.js +14757 -0
  101. package/lib/simple/room/__tests__/RemoteParticipant.test.js +258 -32
  102. package/lib/simple/utils.js +258 -32
  103. package/lib/utils/__tests__/object.test.js +59 -0
  104. package/lib/utils/__tests__/sdp.test.js +50 -0
  105. package/lib/utils/__tests__/string.test.js +32 -0
  106. package/lib/utils/object.js +28 -0
  107. package/lib/utils/sdp.js +19 -0
  108. package/lib/utils/string.js +14 -0
  109. package/lib/web-rtc-client.js +210 -26
  110. package/lib/websocket-client.js +3 -0
  111. package/package.json +2 -2
  112. package/src/__tests__/web-rtc-client.test.js +93 -0
  113. package/src/api/calld.js +8 -0
  114. package/src/api/confd.js +43 -2
  115. package/src/domain/Call.js +6 -0
  116. package/src/domain/CallSession.js +1 -1
  117. package/src/domain/Meeting.js +20 -0
  118. package/src/domain/MeetingAuthorization.js +67 -0
  119. package/src/domain/Phone/WebRTCPhone.js +2 -2
  120. package/src/domain/__tests__/Meeting.test.js +70 -1
  121. package/src/domain/__tests__/MeetingAuthorization.test.js +58 -0
  122. package/src/lib/WazoSessionDescriptionHandler.js +5 -2
  123. package/src/simple/room/Participant.js +40 -0
  124. package/src/simple/room/Room.js +2 -2
  125. package/src/simple/room/SipRoom.js +1 -1
  126. package/src/simple/room/__tests__/Participant.test.js +81 -0
  127. package/src/types/WebSocketMessage.js +7 -1
  128. package/src/utils/__tests__/object.test.js +35 -0
  129. package/src/utils/__tests__/sdp.test.js +33 -1
  130. package/src/utils/__tests__/string.test.js +23 -0
  131. package/src/utils/object.js +15 -0
  132. package/src/utils/sdp.js +18 -0
  133. package/src/utils/string.js +8 -0
  134. package/src/web-rtc-client.js +40 -23
  135. package/src/websocket-client.js +2 -0
package/lib/api/confd.js CHANGED
@@ -1292,6 +1292,70 @@ class ExternalApp {
1292
1292
 
1293
1293
  //
1294
1294
 
1295
+ class MeetingAuthorization {
1296
+
1297
+
1298
+
1299
+
1300
+
1301
+
1302
+ constructor({
1303
+ meetingUuid,
1304
+ uuid,
1305
+ userUuid,
1306
+ userName,
1307
+ } = {}) {
1308
+ this.meetingUuid = meetingUuid;
1309
+ this.uuid = uuid;
1310
+ this.userUuid = userUuid;
1311
+ this.userName = userName;
1312
+ }
1313
+
1314
+ setStatus(status ) {
1315
+ this.status = status;
1316
+ }
1317
+
1318
+ getStatus() {
1319
+ return this.status;
1320
+ }
1321
+
1322
+ static parse(plain ) {
1323
+ const {
1324
+ meeting_uuid: meetingUuid,
1325
+ uuid,
1326
+ guest_uuid: userUuid,
1327
+ guest_name: userName,
1328
+ } = plain;
1329
+
1330
+ return new MeetingAuthorization({
1331
+ meetingUuid,
1332
+ uuid,
1333
+ userUuid,
1334
+ userName,
1335
+ });
1336
+ }
1337
+
1338
+ static parseMany(items ) {
1339
+ if (!items) {
1340
+ return [];
1341
+ }
1342
+ return items.map(MeetingAuthorization.parse);
1343
+ }
1344
+ }
1345
+
1346
+ //
1347
+
1348
+
1349
+
1350
+
1351
+
1352
+
1353
+
1354
+
1355
+
1356
+
1357
+
1358
+
1295
1359
 
1296
1360
 
1297
1361
 
@@ -1302,6 +1366,7 @@ class ExternalApp {
1302
1366
 
1303
1367
 
1304
1368
 
1369
+
1305
1370
 
1306
1371
 
1307
1372
  class Meeting {
@@ -1316,6 +1381,8 @@ class Meeting {
1316
1381
 
1317
1382
 
1318
1383
 
1384
+
1385
+
1319
1386
 
1320
1387
  static parse(plain ) {
1321
1388
  return new Meeting({
@@ -1328,6 +1395,7 @@ class Meeting {
1328
1395
  extension: plain.exten,
1329
1396
  persistent: plain.persistent,
1330
1397
  creationTime: moment__default['default'](plain.creation_time).toDate(),
1398
+ requireAuthorization: plain.require_authorization,
1331
1399
  });
1332
1400
  }
1333
1401
 
@@ -1352,6 +1420,7 @@ class Meeting {
1352
1420
  extension,
1353
1421
  persistent,
1354
1422
  creationTime,
1423
+ requireAuthorization,
1355
1424
  } = {}) {
1356
1425
  this.guestSipAuthorization = guestSipAuthorization;
1357
1426
  this.uri = uri;
@@ -1362,6 +1431,7 @@ class Meeting {
1362
1431
  this.extension = extension;
1363
1432
  this.persistent = persistent;
1364
1433
  this.creationTime = creationTime;
1434
+ this.requireAuthorization = requireAuthorization;
1365
1435
 
1366
1436
  // Useful to compare instead of instanceof with minified code
1367
1437
  this.type = 'Meeting';
@@ -1372,8 +1442,32 @@ class Meeting {
1372
1442
  const [username, secret] = atob(this.guestSipAuthorization).split(':');
1373
1443
  return { username, secret };
1374
1444
  }
1445
+
1375
1446
  }
1376
1447
 
1448
+ //
1449
+
1450
+ const camelToUnderscore = (key ) => {
1451
+ if (typeof key !== 'string') {
1452
+ throw new Error('Input is not a string');
1453
+ }
1454
+ return key.charAt(0).toLowerCase() + key.substring(1).replace(/([A-Z])/g, '_$1').toLowerCase();
1455
+ };
1456
+
1457
+ //
1458
+
1459
+ const convertKeysFromCamelToUnderscore = (args ) => {
1460
+ if (!args || typeof args !== 'object' || Array.isArray(args)) {
1461
+ throw new Error('Input is not an object');
1462
+ }
1463
+
1464
+ return Object.keys(args).reduce((acc, key) => {
1465
+ acc[camelToUnderscore(key)] = typeof args[key] === 'object' && !Array.isArray(args[key])
1466
+ ? convertKeysFromCamelToUnderscore(args[key]) : args[key];
1467
+ return acc;
1468
+ }, {});
1469
+ };
1470
+
1377
1471
  /* */
1378
1472
 
1379
1473
  var confd = (client , baseUrl ) => ({
@@ -1442,8 +1536,18 @@ var confd = (client , baseUrl ) => ({
1442
1536
  getMyMeetings: () =>
1443
1537
  client.get(`${baseUrl}/users/me/meetings`).then(response => Meeting.parseMany(response.items)),
1444
1538
 
1445
- createMyMeeting: (name , persistent ) =>
1446
- client.post(`${baseUrl}/users/me/meetings`, { name, persistent }).then(Meeting.parse),
1539
+ createMyMeeting: (args ) =>
1540
+ client
1541
+ .post(`${baseUrl}/users/me/meetings`, convertKeysFromCamelToUnderscore(args))
1542
+ .then(Meeting.parse),
1543
+
1544
+ updateMyMeeting: (meetingUuid , data ) =>
1545
+ client.put(
1546
+ `${baseUrl}/users/me/meetings/${meetingUuid}`,
1547
+ convertKeysFromCamelToUnderscore(data),
1548
+ null,
1549
+ ApiRequester.successResponseParser,
1550
+ ),
1447
1551
 
1448
1552
  deleteMyMeeting: (meetingUuid ) =>
1449
1553
  client.delete(`${baseUrl}/users/me/meetings/${meetingUuid}`, null),
@@ -1451,8 +1555,36 @@ var confd = (client , baseUrl ) => ({
1451
1555
  getMeeting: (meetingUuid ) =>
1452
1556
  client.get(`${baseUrl}/meetings/${meetingUuid}`, null).then(Meeting.parse),
1453
1557
 
1558
+ meetingAuthorizations: (meetingUuid ) =>
1559
+ client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/authorizations`, null).then(MeetingAuthorization.parseMany),
1560
+
1561
+ meetingAuthorizationReject: (meetingUuid , authorizationUuid ) =>
1562
+ client.put(
1563
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/reject`,
1564
+ {},
1565
+ null,
1566
+ ApiRequester.successResponseParser,
1567
+ ),
1568
+
1569
+ meetingAuthorizationAccept: (meetingUuid , authorizationUuid ) =>
1570
+ client.put(
1571
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/accept`,
1572
+ {},
1573
+ null,
1574
+ ApiRequester.successResponseParser,
1575
+ ),
1576
+
1454
1577
  guestGetMeeting: (meetingUuid ) =>
1455
1578
  client.get(`${baseUrl}/guests/me/meetings/${meetingUuid}`, null).then(Meeting.parse),
1579
+
1580
+ guestAuthorizationRequest: (userUuid , meetingUuid , username ) =>
1581
+ client
1582
+ .post(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations`, { guest_name: username })
1583
+ .then(MeetingAuthorization.parse),
1584
+
1585
+ guestAuthorizationCheck: (userUuid , meetingUuid , authorizationUuid ) =>
1586
+ client.get(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations/${authorizationUuid}`, null),
1587
+
1456
1588
  });
1457
1589
 
1458
1590
  module.exports = confd;
@@ -977,6 +977,7 @@ const RECORD_STATE_ACTIVE = 'active';
977
977
 
978
978
 
979
979
 
980
+
980
981
 
981
982
 
982
983
 
@@ -987,6 +988,7 @@ const RECORD_STATE_ACTIVE = 'active';
987
988
 
988
989
 
989
990
 
991
+
990
992
 
991
993
 
992
994
 
@@ -1015,6 +1017,7 @@ class Call {
1015
1017
 
1016
1018
 
1017
1019
 
1020
+
1018
1021
 
1019
1022
 
1020
1023
 
@@ -1039,6 +1042,7 @@ class Call {
1039
1042
  calleeNumber: plain.peer_caller_id_number,
1040
1043
  dialedExtension: plain.dialed_extension,
1041
1044
  isCaller: plain.is_caller,
1045
+ isVideo: plain.is_video,
1042
1046
  muted: plain.muted,
1043
1047
  onHold: plain.on_hold,
1044
1048
  status: plain.status,
@@ -1062,6 +1066,7 @@ class Call {
1062
1066
  calleeNumber,
1063
1067
  dialedExtension,
1064
1068
  isCaller,
1069
+ isVideo,
1065
1070
  lineId,
1066
1071
  muted,
1067
1072
  onHold,
@@ -1085,6 +1090,7 @@ class Call {
1085
1090
  this.startingTime = startingTime;
1086
1091
  this.talkingToIds = talkingToIds || [];
1087
1092
  this.recording = recording;
1093
+ this.isVideo = !!isVideo;
1088
1094
 
1089
1095
  // Useful to compare instead of instanceof with minified code
1090
1096
  this.type = 'Call';
package/lib/api-client.js CHANGED
@@ -2631,6 +2631,70 @@ class ExternalApp {
2631
2631
 
2632
2632
  //
2633
2633
 
2634
+ class MeetingAuthorization {
2635
+
2636
+
2637
+
2638
+
2639
+
2640
+
2641
+ constructor({
2642
+ meetingUuid,
2643
+ uuid,
2644
+ userUuid,
2645
+ userName,
2646
+ } = {}) {
2647
+ this.meetingUuid = meetingUuid;
2648
+ this.uuid = uuid;
2649
+ this.userUuid = userUuid;
2650
+ this.userName = userName;
2651
+ }
2652
+
2653
+ setStatus(status ) {
2654
+ this.status = status;
2655
+ }
2656
+
2657
+ getStatus() {
2658
+ return this.status;
2659
+ }
2660
+
2661
+ static parse(plain ) {
2662
+ const {
2663
+ meeting_uuid: meetingUuid,
2664
+ uuid,
2665
+ guest_uuid: userUuid,
2666
+ guest_name: userName,
2667
+ } = plain;
2668
+
2669
+ return new MeetingAuthorization({
2670
+ meetingUuid,
2671
+ uuid,
2672
+ userUuid,
2673
+ userName,
2674
+ });
2675
+ }
2676
+
2677
+ static parseMany(items ) {
2678
+ if (!items) {
2679
+ return [];
2680
+ }
2681
+ return items.map(MeetingAuthorization.parse);
2682
+ }
2683
+ }
2684
+
2685
+ //
2686
+
2687
+
2688
+
2689
+
2690
+
2691
+
2692
+
2693
+
2694
+
2695
+
2696
+
2697
+
2634
2698
 
2635
2699
 
2636
2700
 
@@ -2641,6 +2705,7 @@ class ExternalApp {
2641
2705
 
2642
2706
 
2643
2707
 
2708
+
2644
2709
 
2645
2710
 
2646
2711
  class Meeting {
@@ -2655,6 +2720,8 @@ class Meeting {
2655
2720
 
2656
2721
 
2657
2722
 
2723
+
2724
+
2658
2725
 
2659
2726
  static parse(plain ) {
2660
2727
  return new Meeting({
@@ -2667,6 +2734,7 @@ class Meeting {
2667
2734
  extension: plain.exten,
2668
2735
  persistent: plain.persistent,
2669
2736
  creationTime: moment__default['default'](plain.creation_time).toDate(),
2737
+ requireAuthorization: plain.require_authorization,
2670
2738
  });
2671
2739
  }
2672
2740
 
@@ -2691,6 +2759,7 @@ class Meeting {
2691
2759
  extension,
2692
2760
  persistent,
2693
2761
  creationTime,
2762
+ requireAuthorization,
2694
2763
  } = {}) {
2695
2764
  this.guestSipAuthorization = guestSipAuthorization;
2696
2765
  this.uri = uri;
@@ -2701,6 +2770,7 @@ class Meeting {
2701
2770
  this.extension = extension;
2702
2771
  this.persistent = persistent;
2703
2772
  this.creationTime = creationTime;
2773
+ this.requireAuthorization = requireAuthorization;
2704
2774
 
2705
2775
  // Useful to compare instead of instanceof with minified code
2706
2776
  this.type = 'Meeting';
@@ -2711,8 +2781,32 @@ class Meeting {
2711
2781
  const [username, secret] = atob(this.guestSipAuthorization).split(':');
2712
2782
  return { username, secret };
2713
2783
  }
2784
+
2714
2785
  }
2715
2786
 
2787
+ //
2788
+
2789
+ const camelToUnderscore = (key ) => {
2790
+ if (typeof key !== 'string') {
2791
+ throw new Error('Input is not a string');
2792
+ }
2793
+ return key.charAt(0).toLowerCase() + key.substring(1).replace(/([A-Z])/g, '_$1').toLowerCase();
2794
+ };
2795
+
2796
+ //
2797
+
2798
+ const convertKeysFromCamelToUnderscore = (args ) => {
2799
+ if (!args || typeof args !== 'object' || Array.isArray(args)) {
2800
+ throw new Error('Input is not an object');
2801
+ }
2802
+
2803
+ return Object.keys(args).reduce((acc, key) => {
2804
+ acc[camelToUnderscore(key)] = typeof args[key] === 'object' && !Array.isArray(args[key])
2805
+ ? convertKeysFromCamelToUnderscore(args[key]) : args[key];
2806
+ return acc;
2807
+ }, {});
2808
+ };
2809
+
2716
2810
  /* */
2717
2811
 
2718
2812
  var confdMethods = (client , baseUrl ) => ({
@@ -2781,8 +2875,18 @@ var confdMethods = (client , baseUrl ) => ({
2781
2875
  getMyMeetings: () =>
2782
2876
  client.get(`${baseUrl}/users/me/meetings`).then(response => Meeting.parseMany(response.items)),
2783
2877
 
2784
- createMyMeeting: (name , persistent ) =>
2785
- client.post(`${baseUrl}/users/me/meetings`, { name, persistent }).then(Meeting.parse),
2878
+ createMyMeeting: (args ) =>
2879
+ client
2880
+ .post(`${baseUrl}/users/me/meetings`, convertKeysFromCamelToUnderscore(args))
2881
+ .then(Meeting.parse),
2882
+
2883
+ updateMyMeeting: (meetingUuid , data ) =>
2884
+ client.put(
2885
+ `${baseUrl}/users/me/meetings/${meetingUuid}`,
2886
+ convertKeysFromCamelToUnderscore(data),
2887
+ null,
2888
+ ApiRequester.successResponseParser,
2889
+ ),
2786
2890
 
2787
2891
  deleteMyMeeting: (meetingUuid ) =>
2788
2892
  client.delete(`${baseUrl}/users/me/meetings/${meetingUuid}`, null),
@@ -2790,8 +2894,36 @@ var confdMethods = (client , baseUrl ) => ({
2790
2894
  getMeeting: (meetingUuid ) =>
2791
2895
  client.get(`${baseUrl}/meetings/${meetingUuid}`, null).then(Meeting.parse),
2792
2896
 
2897
+ meetingAuthorizations: (meetingUuid ) =>
2898
+ client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/authorizations`, null).then(MeetingAuthorization.parseMany),
2899
+
2900
+ meetingAuthorizationReject: (meetingUuid , authorizationUuid ) =>
2901
+ client.put(
2902
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/reject`,
2903
+ {},
2904
+ null,
2905
+ ApiRequester.successResponseParser,
2906
+ ),
2907
+
2908
+ meetingAuthorizationAccept: (meetingUuid , authorizationUuid ) =>
2909
+ client.put(
2910
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/accept`,
2911
+ {},
2912
+ null,
2913
+ ApiRequester.successResponseParser,
2914
+ ),
2915
+
2793
2916
  guestGetMeeting: (meetingUuid ) =>
2794
2917
  client.get(`${baseUrl}/guests/me/meetings/${meetingUuid}`, null).then(Meeting.parse),
2918
+
2919
+ guestAuthorizationRequest: (userUuid , meetingUuid , username ) =>
2920
+ client
2921
+ .post(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations`, { guest_name: username })
2922
+ .then(MeetingAuthorization.parse),
2923
+
2924
+ guestAuthorizationCheck: (userUuid , meetingUuid , authorizationUuid ) =>
2925
+ client.get(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations/${authorizationUuid}`, null),
2926
+
2795
2927
  });
2796
2928
 
2797
2929
  //
@@ -3057,6 +3189,7 @@ const RECORD_STATE_ACTIVE = 'active';
3057
3189
 
3058
3190
 
3059
3191
 
3192
+
3060
3193
 
3061
3194
 
3062
3195
 
@@ -3067,6 +3200,7 @@ const RECORD_STATE_ACTIVE = 'active';
3067
3200
 
3068
3201
 
3069
3202
 
3203
+
3070
3204
 
3071
3205
 
3072
3206
 
@@ -3095,6 +3229,7 @@ class Call {
3095
3229
 
3096
3230
 
3097
3231
 
3232
+
3098
3233
 
3099
3234
 
3100
3235
 
@@ -3119,6 +3254,7 @@ class Call {
3119
3254
  calleeNumber: plain.peer_caller_id_number,
3120
3255
  dialedExtension: plain.dialed_extension,
3121
3256
  isCaller: plain.is_caller,
3257
+ isVideo: plain.is_video,
3122
3258
  muted: plain.muted,
3123
3259
  onHold: plain.on_hold,
3124
3260
  status: plain.status,
@@ -3142,6 +3278,7 @@ class Call {
3142
3278
  calleeNumber,
3143
3279
  dialedExtension,
3144
3280
  isCaller,
3281
+ isVideo,
3145
3282
  lineId,
3146
3283
  muted,
3147
3284
  onHold,
@@ -3165,6 +3302,7 @@ class Call {
3165
3302
  this.startingTime = startingTime;
3166
3303
  this.talkingToIds = talkingToIds || [];
3167
3304
  this.recording = recording;
3305
+ this.isVideo = !!isVideo;
3168
3306
 
3169
3307
  // Useful to compare instead of instanceof with minified code
3170
3308
  this.type = 'Call';
@@ -4224,6 +4362,14 @@ var calldMethods = (client , baseUrl ) => ({
4224
4362
  getMeetingParticipantsAsUser: async (meetingUuid ) =>
4225
4363
  client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/participants`),
4226
4364
 
4365
+ banMeetingParticipant: (meetingUuid , participantUuid ) =>
4366
+ client.delete(
4367
+ `${baseUrl}/users/me/meetings/${meetingUuid}/participants/${participantUuid}`,
4368
+ null,
4369
+ null,
4370
+ ApiRequester.successResponseParser,
4371
+ ),
4372
+
4227
4373
  listTrunks: () => client.get(`${baseUrl}/trunks`),
4228
4374
 
4229
4375
  mute: (callId ) =>