@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/esm/api/confd.js CHANGED
@@ -1286,6 +1286,70 @@ class ExternalApp {
1286
1286
 
1287
1287
  //
1288
1288
 
1289
+ class MeetingAuthorization {
1290
+
1291
+
1292
+
1293
+
1294
+
1295
+
1296
+ constructor({
1297
+ meetingUuid,
1298
+ uuid,
1299
+ userUuid,
1300
+ userName,
1301
+ } = {}) {
1302
+ this.meetingUuid = meetingUuid;
1303
+ this.uuid = uuid;
1304
+ this.userUuid = userUuid;
1305
+ this.userName = userName;
1306
+ }
1307
+
1308
+ setStatus(status ) {
1309
+ this.status = status;
1310
+ }
1311
+
1312
+ getStatus() {
1313
+ return this.status;
1314
+ }
1315
+
1316
+ static parse(plain ) {
1317
+ const {
1318
+ meeting_uuid: meetingUuid,
1319
+ uuid,
1320
+ guest_uuid: userUuid,
1321
+ guest_name: userName,
1322
+ } = plain;
1323
+
1324
+ return new MeetingAuthorization({
1325
+ meetingUuid,
1326
+ uuid,
1327
+ userUuid,
1328
+ userName,
1329
+ });
1330
+ }
1331
+
1332
+ static parseMany(items ) {
1333
+ if (!items) {
1334
+ return [];
1335
+ }
1336
+ return items.map(MeetingAuthorization.parse);
1337
+ }
1338
+ }
1339
+
1340
+ //
1341
+
1342
+
1343
+
1344
+
1345
+
1346
+
1347
+
1348
+
1349
+
1350
+
1351
+
1352
+
1289
1353
 
1290
1354
 
1291
1355
 
@@ -1296,6 +1360,7 @@ class ExternalApp {
1296
1360
 
1297
1361
 
1298
1362
 
1363
+
1299
1364
 
1300
1365
 
1301
1366
  class Meeting {
@@ -1310,6 +1375,8 @@ class Meeting {
1310
1375
 
1311
1376
 
1312
1377
 
1378
+
1379
+
1313
1380
 
1314
1381
  static parse(plain ) {
1315
1382
  return new Meeting({
@@ -1322,6 +1389,7 @@ class Meeting {
1322
1389
  extension: plain.exten,
1323
1390
  persistent: plain.persistent,
1324
1391
  creationTime: moment(plain.creation_time).toDate(),
1392
+ requireAuthorization: plain.require_authorization,
1325
1393
  });
1326
1394
  }
1327
1395
 
@@ -1346,6 +1414,7 @@ class Meeting {
1346
1414
  extension,
1347
1415
  persistent,
1348
1416
  creationTime,
1417
+ requireAuthorization,
1349
1418
  } = {}) {
1350
1419
  this.guestSipAuthorization = guestSipAuthorization;
1351
1420
  this.uri = uri;
@@ -1356,6 +1425,7 @@ class Meeting {
1356
1425
  this.extension = extension;
1357
1426
  this.persistent = persistent;
1358
1427
  this.creationTime = creationTime;
1428
+ this.requireAuthorization = requireAuthorization;
1359
1429
 
1360
1430
  // Useful to compare instead of instanceof with minified code
1361
1431
  this.type = 'Meeting';
@@ -1366,8 +1436,32 @@ class Meeting {
1366
1436
  const [username, secret] = atob(this.guestSipAuthorization).split(':');
1367
1437
  return { username, secret };
1368
1438
  }
1439
+
1369
1440
  }
1370
1441
 
1442
+ //
1443
+
1444
+ const camelToUnderscore = (key ) => {
1445
+ if (typeof key !== 'string') {
1446
+ throw new Error('Input is not a string');
1447
+ }
1448
+ return key.charAt(0).toLowerCase() + key.substring(1).replace(/([A-Z])/g, '_$1').toLowerCase();
1449
+ };
1450
+
1451
+ //
1452
+
1453
+ const convertKeysFromCamelToUnderscore = (args ) => {
1454
+ if (!args || typeof args !== 'object' || Array.isArray(args)) {
1455
+ throw new Error('Input is not an object');
1456
+ }
1457
+
1458
+ return Object.keys(args).reduce((acc, key) => {
1459
+ acc[camelToUnderscore(key)] = typeof args[key] === 'object' && !Array.isArray(args[key])
1460
+ ? convertKeysFromCamelToUnderscore(args[key]) : args[key];
1461
+ return acc;
1462
+ }, {});
1463
+ };
1464
+
1371
1465
  /* */
1372
1466
 
1373
1467
  var confd = (client , baseUrl ) => ({
@@ -1436,8 +1530,18 @@ var confd = (client , baseUrl ) => ({
1436
1530
  getMyMeetings: () =>
1437
1531
  client.get(`${baseUrl}/users/me/meetings`).then(response => Meeting.parseMany(response.items)),
1438
1532
 
1439
- createMyMeeting: (name , persistent ) =>
1440
- client.post(`${baseUrl}/users/me/meetings`, { name, persistent }).then(Meeting.parse),
1533
+ createMyMeeting: (args ) =>
1534
+ client
1535
+ .post(`${baseUrl}/users/me/meetings`, convertKeysFromCamelToUnderscore(args))
1536
+ .then(Meeting.parse),
1537
+
1538
+ updateMyMeeting: (meetingUuid , data ) =>
1539
+ client.put(
1540
+ `${baseUrl}/users/me/meetings/${meetingUuid}`,
1541
+ convertKeysFromCamelToUnderscore(data),
1542
+ null,
1543
+ ApiRequester.successResponseParser,
1544
+ ),
1441
1545
 
1442
1546
  deleteMyMeeting: (meetingUuid ) =>
1443
1547
  client.delete(`${baseUrl}/users/me/meetings/${meetingUuid}`, null),
@@ -1445,8 +1549,36 @@ var confd = (client , baseUrl ) => ({
1445
1549
  getMeeting: (meetingUuid ) =>
1446
1550
  client.get(`${baseUrl}/meetings/${meetingUuid}`, null).then(Meeting.parse),
1447
1551
 
1552
+ meetingAuthorizations: (meetingUuid ) =>
1553
+ client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/authorizations`, null).then(MeetingAuthorization.parseMany),
1554
+
1555
+ meetingAuthorizationReject: (meetingUuid , authorizationUuid ) =>
1556
+ client.put(
1557
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/reject`,
1558
+ {},
1559
+ null,
1560
+ ApiRequester.successResponseParser,
1561
+ ),
1562
+
1563
+ meetingAuthorizationAccept: (meetingUuid , authorizationUuid ) =>
1564
+ client.put(
1565
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/accept`,
1566
+ {},
1567
+ null,
1568
+ ApiRequester.successResponseParser,
1569
+ ),
1570
+
1448
1571
  guestGetMeeting: (meetingUuid ) =>
1449
1572
  client.get(`${baseUrl}/guests/me/meetings/${meetingUuid}`, null).then(Meeting.parse),
1573
+
1574
+ guestAuthorizationRequest: (userUuid , meetingUuid , username ) =>
1575
+ client
1576
+ .post(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations`, { guest_name: username })
1577
+ .then(MeetingAuthorization.parse),
1578
+
1579
+ guestAuthorizationCheck: (userUuid , meetingUuid , authorizationUuid ) =>
1580
+ client.get(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations/${authorizationUuid}`, null),
1581
+
1450
1582
  });
1451
1583
 
1452
1584
  export default confd;
@@ -971,6 +971,7 @@ const RECORD_STATE_ACTIVE = 'active';
971
971
 
972
972
 
973
973
 
974
+
974
975
 
975
976
 
976
977
 
@@ -981,6 +982,7 @@ const RECORD_STATE_ACTIVE = 'active';
981
982
 
982
983
 
983
984
 
985
+
984
986
 
985
987
 
986
988
 
@@ -1009,6 +1011,7 @@ class Call {
1009
1011
 
1010
1012
 
1011
1013
 
1014
+
1012
1015
 
1013
1016
 
1014
1017
 
@@ -1033,6 +1036,7 @@ class Call {
1033
1036
  calleeNumber: plain.peer_caller_id_number,
1034
1037
  dialedExtension: plain.dialed_extension,
1035
1038
  isCaller: plain.is_caller,
1039
+ isVideo: plain.is_video,
1036
1040
  muted: plain.muted,
1037
1041
  onHold: plain.on_hold,
1038
1042
  status: plain.status,
@@ -1056,6 +1060,7 @@ class Call {
1056
1060
  calleeNumber,
1057
1061
  dialedExtension,
1058
1062
  isCaller,
1063
+ isVideo,
1059
1064
  lineId,
1060
1065
  muted,
1061
1066
  onHold,
@@ -1079,6 +1084,7 @@ class Call {
1079
1084
  this.startingTime = startingTime;
1080
1085
  this.talkingToIds = talkingToIds || [];
1081
1086
  this.recording = recording;
1087
+ this.isVideo = !!isVideo;
1082
1088
 
1083
1089
  // Useful to compare instead of instanceof with minified code
1084
1090
  this.type = 'Call';
package/esm/api-client.js CHANGED
@@ -2625,6 +2625,70 @@ class ExternalApp {
2625
2625
 
2626
2626
  //
2627
2627
 
2628
+ class MeetingAuthorization {
2629
+
2630
+
2631
+
2632
+
2633
+
2634
+
2635
+ constructor({
2636
+ meetingUuid,
2637
+ uuid,
2638
+ userUuid,
2639
+ userName,
2640
+ } = {}) {
2641
+ this.meetingUuid = meetingUuid;
2642
+ this.uuid = uuid;
2643
+ this.userUuid = userUuid;
2644
+ this.userName = userName;
2645
+ }
2646
+
2647
+ setStatus(status ) {
2648
+ this.status = status;
2649
+ }
2650
+
2651
+ getStatus() {
2652
+ return this.status;
2653
+ }
2654
+
2655
+ static parse(plain ) {
2656
+ const {
2657
+ meeting_uuid: meetingUuid,
2658
+ uuid,
2659
+ guest_uuid: userUuid,
2660
+ guest_name: userName,
2661
+ } = plain;
2662
+
2663
+ return new MeetingAuthorization({
2664
+ meetingUuid,
2665
+ uuid,
2666
+ userUuid,
2667
+ userName,
2668
+ });
2669
+ }
2670
+
2671
+ static parseMany(items ) {
2672
+ if (!items) {
2673
+ return [];
2674
+ }
2675
+ return items.map(MeetingAuthorization.parse);
2676
+ }
2677
+ }
2678
+
2679
+ //
2680
+
2681
+
2682
+
2683
+
2684
+
2685
+
2686
+
2687
+
2688
+
2689
+
2690
+
2691
+
2628
2692
 
2629
2693
 
2630
2694
 
@@ -2635,6 +2699,7 @@ class ExternalApp {
2635
2699
 
2636
2700
 
2637
2701
 
2702
+
2638
2703
 
2639
2704
 
2640
2705
  class Meeting {
@@ -2649,6 +2714,8 @@ class Meeting {
2649
2714
 
2650
2715
 
2651
2716
 
2717
+
2718
+
2652
2719
 
2653
2720
  static parse(plain ) {
2654
2721
  return new Meeting({
@@ -2661,6 +2728,7 @@ class Meeting {
2661
2728
  extension: plain.exten,
2662
2729
  persistent: plain.persistent,
2663
2730
  creationTime: moment(plain.creation_time).toDate(),
2731
+ requireAuthorization: plain.require_authorization,
2664
2732
  });
2665
2733
  }
2666
2734
 
@@ -2685,6 +2753,7 @@ class Meeting {
2685
2753
  extension,
2686
2754
  persistent,
2687
2755
  creationTime,
2756
+ requireAuthorization,
2688
2757
  } = {}) {
2689
2758
  this.guestSipAuthorization = guestSipAuthorization;
2690
2759
  this.uri = uri;
@@ -2695,6 +2764,7 @@ class Meeting {
2695
2764
  this.extension = extension;
2696
2765
  this.persistent = persistent;
2697
2766
  this.creationTime = creationTime;
2767
+ this.requireAuthorization = requireAuthorization;
2698
2768
 
2699
2769
  // Useful to compare instead of instanceof with minified code
2700
2770
  this.type = 'Meeting';
@@ -2705,8 +2775,32 @@ class Meeting {
2705
2775
  const [username, secret] = atob(this.guestSipAuthorization).split(':');
2706
2776
  return { username, secret };
2707
2777
  }
2778
+
2708
2779
  }
2709
2780
 
2781
+ //
2782
+
2783
+ const camelToUnderscore = (key ) => {
2784
+ if (typeof key !== 'string') {
2785
+ throw new Error('Input is not a string');
2786
+ }
2787
+ return key.charAt(0).toLowerCase() + key.substring(1).replace(/([A-Z])/g, '_$1').toLowerCase();
2788
+ };
2789
+
2790
+ //
2791
+
2792
+ const convertKeysFromCamelToUnderscore = (args ) => {
2793
+ if (!args || typeof args !== 'object' || Array.isArray(args)) {
2794
+ throw new Error('Input is not an object');
2795
+ }
2796
+
2797
+ return Object.keys(args).reduce((acc, key) => {
2798
+ acc[camelToUnderscore(key)] = typeof args[key] === 'object' && !Array.isArray(args[key])
2799
+ ? convertKeysFromCamelToUnderscore(args[key]) : args[key];
2800
+ return acc;
2801
+ }, {});
2802
+ };
2803
+
2710
2804
  /* */
2711
2805
 
2712
2806
  var confdMethods = (client , baseUrl ) => ({
@@ -2775,8 +2869,18 @@ var confdMethods = (client , baseUrl ) => ({
2775
2869
  getMyMeetings: () =>
2776
2870
  client.get(`${baseUrl}/users/me/meetings`).then(response => Meeting.parseMany(response.items)),
2777
2871
 
2778
- createMyMeeting: (name , persistent ) =>
2779
- client.post(`${baseUrl}/users/me/meetings`, { name, persistent }).then(Meeting.parse),
2872
+ createMyMeeting: (args ) =>
2873
+ client
2874
+ .post(`${baseUrl}/users/me/meetings`, convertKeysFromCamelToUnderscore(args))
2875
+ .then(Meeting.parse),
2876
+
2877
+ updateMyMeeting: (meetingUuid , data ) =>
2878
+ client.put(
2879
+ `${baseUrl}/users/me/meetings/${meetingUuid}`,
2880
+ convertKeysFromCamelToUnderscore(data),
2881
+ null,
2882
+ ApiRequester.successResponseParser,
2883
+ ),
2780
2884
 
2781
2885
  deleteMyMeeting: (meetingUuid ) =>
2782
2886
  client.delete(`${baseUrl}/users/me/meetings/${meetingUuid}`, null),
@@ -2784,8 +2888,36 @@ var confdMethods = (client , baseUrl ) => ({
2784
2888
  getMeeting: (meetingUuid ) =>
2785
2889
  client.get(`${baseUrl}/meetings/${meetingUuid}`, null).then(Meeting.parse),
2786
2890
 
2891
+ meetingAuthorizations: (meetingUuid ) =>
2892
+ client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/authorizations`, null).then(MeetingAuthorization.parseMany),
2893
+
2894
+ meetingAuthorizationReject: (meetingUuid , authorizationUuid ) =>
2895
+ client.put(
2896
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/reject`,
2897
+ {},
2898
+ null,
2899
+ ApiRequester.successResponseParser,
2900
+ ),
2901
+
2902
+ meetingAuthorizationAccept: (meetingUuid , authorizationUuid ) =>
2903
+ client.put(
2904
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/accept`,
2905
+ {},
2906
+ null,
2907
+ ApiRequester.successResponseParser,
2908
+ ),
2909
+
2787
2910
  guestGetMeeting: (meetingUuid ) =>
2788
2911
  client.get(`${baseUrl}/guests/me/meetings/${meetingUuid}`, null).then(Meeting.parse),
2912
+
2913
+ guestAuthorizationRequest: (userUuid , meetingUuid , username ) =>
2914
+ client
2915
+ .post(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations`, { guest_name: username })
2916
+ .then(MeetingAuthorization.parse),
2917
+
2918
+ guestAuthorizationCheck: (userUuid , meetingUuid , authorizationUuid ) =>
2919
+ client.get(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations/${authorizationUuid}`, null),
2920
+
2789
2921
  });
2790
2922
 
2791
2923
  //
@@ -3051,6 +3183,7 @@ const RECORD_STATE_ACTIVE = 'active';
3051
3183
 
3052
3184
 
3053
3185
 
3186
+
3054
3187
 
3055
3188
 
3056
3189
 
@@ -3061,6 +3194,7 @@ const RECORD_STATE_ACTIVE = 'active';
3061
3194
 
3062
3195
 
3063
3196
 
3197
+
3064
3198
 
3065
3199
 
3066
3200
 
@@ -3089,6 +3223,7 @@ class Call {
3089
3223
 
3090
3224
 
3091
3225
 
3226
+
3092
3227
 
3093
3228
 
3094
3229
 
@@ -3113,6 +3248,7 @@ class Call {
3113
3248
  calleeNumber: plain.peer_caller_id_number,
3114
3249
  dialedExtension: plain.dialed_extension,
3115
3250
  isCaller: plain.is_caller,
3251
+ isVideo: plain.is_video,
3116
3252
  muted: plain.muted,
3117
3253
  onHold: plain.on_hold,
3118
3254
  status: plain.status,
@@ -3136,6 +3272,7 @@ class Call {
3136
3272
  calleeNumber,
3137
3273
  dialedExtension,
3138
3274
  isCaller,
3275
+ isVideo,
3139
3276
  lineId,
3140
3277
  muted,
3141
3278
  onHold,
@@ -3159,6 +3296,7 @@ class Call {
3159
3296
  this.startingTime = startingTime;
3160
3297
  this.talkingToIds = talkingToIds || [];
3161
3298
  this.recording = recording;
3299
+ this.isVideo = !!isVideo;
3162
3300
 
3163
3301
  // Useful to compare instead of instanceof with minified code
3164
3302
  this.type = 'Call';
@@ -4218,6 +4356,14 @@ var calldMethods = (client , baseUrl ) => ({
4218
4356
  getMeetingParticipantsAsUser: async (meetingUuid ) =>
4219
4357
  client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/participants`),
4220
4358
 
4359
+ banMeetingParticipant: (meetingUuid , participantUuid ) =>
4360
+ client.delete(
4361
+ `${baseUrl}/users/me/meetings/${meetingUuid}/participants/${participantUuid}`,
4362
+ null,
4363
+ null,
4364
+ ApiRequester.successResponseParser,
4365
+ ),
4366
+
4221
4367
  listTrunks: () => client.get(`${baseUrl}/trunks`),
4222
4368
 
4223
4369
  mute: (callId ) =>