@wazo/sdk 0.38.7 → 0.38.10

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 (121) hide show
  1. package/dist/wazo-sdk.js +2 -2
  2. package/esm/__tests__/api-client.test.js +163 -2
  3. package/esm/__tests__/web-rtc-client.test.js +248 -27
  4. package/esm/api/auth.js +12 -0
  5. package/esm/api/calld.js +8 -0
  6. package/esm/api/confd.js +134 -2
  7. package/esm/api/ctid-ng.js +1 -0
  8. package/esm/api-client.js +163 -2
  9. package/esm/checker/Checker.js +204 -24
  10. package/esm/checker/checks/aor.js +163 -2
  11. package/esm/checker/checks/api.js +163 -2
  12. package/esm/checker/checks/index.js +204 -24
  13. package/esm/checker/checks/wazo-websocket.js +2 -0
  14. package/esm/checker/checks/webrtc-transport.js +202 -24
  15. package/esm/checker/checks/webrtc.js +202 -24
  16. package/esm/domain/AdHocAPIConference.js +170 -4
  17. package/esm/domain/Features.js +170 -4
  18. package/esm/domain/Meeting.js +18 -0
  19. package/esm/domain/MeetingAuthorization.js +70 -0
  20. package/esm/domain/Phone/CTIPhone.js +170 -4
  21. package/esm/domain/Phone/WebRTCPhone.js +2 -3
  22. package/esm/domain/__tests__/Meeting.test.js +87 -1
  23. package/esm/domain/__tests__/MeetingAuthorization.test.js +109 -0
  24. package/esm/index.js +300 -36
  25. package/esm/service/CallApi.js +170 -4
  26. package/esm/service/getApiClient.js +176 -5
  27. package/esm/simple/Auth.js +301 -37
  28. package/esm/simple/Configuration.js +300 -36
  29. package/esm/simple/Directory.js +170 -4
  30. package/esm/simple/Phone.js +300 -36
  31. package/esm/simple/Softphone.js +5 -0
  32. package/esm/simple/Websocket.js +3 -0
  33. package/esm/simple/index.js +300 -36
  34. package/esm/simple/room/LocalParticipant.js +300 -36
  35. package/esm/simple/room/Participant.js +300 -36
  36. package/esm/simple/room/RemoteParticipant.js +300 -36
  37. package/esm/simple/room/Room.js +300 -36
  38. package/esm/simple/room/SipRoom.js +300 -36
  39. package/esm/simple/room/Stream.js +300 -36
  40. package/esm/simple/room/__tests__/Participant.test.js +14812 -0
  41. package/esm/simple/room/__tests__/RemoteParticipant.test.js +300 -36
  42. package/esm/simple/utils.js +300 -36
  43. package/esm/utils/__tests__/object.test.js +57 -0
  44. package/esm/utils/__tests__/string.test.js +30 -0
  45. package/esm/utils/object.js +24 -0
  46. package/esm/utils/string.js +10 -0
  47. package/esm/web-rtc-client.js +202 -24
  48. package/esm/websocket-client.js +3 -1
  49. package/lib/__tests__/api-client.test.js +163 -2
  50. package/lib/__tests__/web-rtc-client.test.js +248 -27
  51. package/lib/api/auth.js +12 -0
  52. package/lib/api/calld.js +8 -0
  53. package/lib/api/confd.js +134 -2
  54. package/lib/api/ctid-ng.js +1 -0
  55. package/lib/api-client.js +163 -2
  56. package/lib/checker/Checker.js +204 -24
  57. package/lib/checker/checks/aor.js +163 -2
  58. package/lib/checker/checks/api.js +163 -2
  59. package/lib/checker/checks/index.js +204 -24
  60. package/lib/checker/checks/wazo-websocket.js +2 -0
  61. package/lib/checker/checks/webrtc-transport.js +202 -24
  62. package/lib/checker/checks/webrtc.js +202 -24
  63. package/lib/domain/AdHocAPIConference.js +170 -4
  64. package/lib/domain/Features.js +170 -4
  65. package/lib/domain/Meeting.js +18 -0
  66. package/lib/domain/MeetingAuthorization.js +79 -0
  67. package/lib/domain/Phone/CTIPhone.js +170 -4
  68. package/lib/domain/Phone/WebRTCPhone.js +2 -3
  69. package/lib/domain/__tests__/Meeting.test.js +87 -1
  70. package/lib/domain/__tests__/MeetingAuthorization.test.js +111 -0
  71. package/lib/index.js +300 -36
  72. package/lib/service/CallApi.js +170 -4
  73. package/lib/service/getApiClient.js +176 -4
  74. package/lib/simple/Auth.js +301 -36
  75. package/lib/simple/Configuration.js +300 -36
  76. package/lib/simple/Directory.js +170 -4
  77. package/lib/simple/Phone.js +300 -36
  78. package/lib/simple/Softphone.js +5 -0
  79. package/lib/simple/Websocket.js +3 -0
  80. package/lib/simple/index.js +300 -36
  81. package/lib/simple/room/LocalParticipant.js +300 -36
  82. package/lib/simple/room/Participant.js +300 -36
  83. package/lib/simple/room/RemoteParticipant.js +300 -36
  84. package/lib/simple/room/Room.js +300 -36
  85. package/lib/simple/room/SipRoom.js +300 -36
  86. package/lib/simple/room/Stream.js +300 -36
  87. package/lib/simple/room/__tests__/Participant.test.js +14822 -0
  88. package/lib/simple/room/__tests__/RemoteParticipant.test.js +300 -36
  89. package/lib/simple/utils.js +300 -36
  90. package/lib/utils/__tests__/object.test.js +59 -0
  91. package/lib/utils/__tests__/string.test.js +32 -0
  92. package/lib/utils/object.js +28 -0
  93. package/lib/utils/string.js +14 -0
  94. package/lib/web-rtc-client.js +202 -24
  95. package/lib/websocket-client.js +3 -0
  96. package/package.json +1 -1
  97. package/src/__tests__/web-rtc-client.test.js +46 -3
  98. package/src/api/auth.js +12 -0
  99. package/src/api/calld.js +8 -0
  100. package/src/api/confd.js +43 -2
  101. package/src/api-client.js +8 -0
  102. package/src/domain/Meeting.js +20 -0
  103. package/src/domain/MeetingAuthorization.js +67 -0
  104. package/src/domain/Phone/WebRTCPhone.js +1 -3
  105. package/src/domain/__tests__/Meeting.test.js +70 -1
  106. package/src/domain/__tests__/MeetingAuthorization.test.js +58 -0
  107. package/src/service/getApiClient.js +13 -2
  108. package/src/simple/Auth.js +35 -4
  109. package/src/simple/Softphone.js +5 -0
  110. package/src/simple/index.js +2 -1
  111. package/src/simple/room/Participant.js +40 -0
  112. package/src/simple/room/Room.js +2 -2
  113. package/src/simple/room/SipRoom.js +1 -1
  114. package/src/simple/room/__tests__/Participant.test.js +81 -0
  115. package/src/types/WebSocketMessage.js +7 -1
  116. package/src/utils/__tests__/object.test.js +35 -0
  117. package/src/utils/__tests__/string.test.js +23 -0
  118. package/src/utils/object.js +15 -0
  119. package/src/utils/string.js +8 -0
  120. package/src/web-rtc-client.js +39 -22
  121. 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;
@@ -1186,6 +1186,7 @@ global.wazoClientId = global.wazoClientId || {};
1186
1186
  global.wazoClientToken = global.wazoClientToken || {};
1187
1187
  global.wazoRefreshToken = global.wazoRefreshToken || {};
1188
1188
  global.wazoRefreshTenantId = global.wazoRefreshTenantId || {};
1189
+ global.wazoRefreshDomainName = global.wazoRefreshDomainName || {};
1189
1190
  global.wazoOnRefreshToken = global.wazoOnRefreshToken || {};
1190
1191
  global.wazoOnRefreshTokenError = global.wazoOnRefreshTokenError || {};
1191
1192
  global.wazoRefreshExpiration = global.wazoRefreshExpiration || {};
package/esm/api-client.js CHANGED
@@ -2209,6 +2209,7 @@ var authMethods = (client , baseUrl ) => ({
2209
2209
 
2210
2210
 
2211
2211
 
2212
+
2212
2213
  ) {
2213
2214
  const body = {
2214
2215
  backend: params.backend || DEFAULT_BACKEND_USER,
@@ -2229,9 +2230,14 @@ var authMethods = (client , baseUrl ) => ({
2229
2230
  }
2230
2231
 
2231
2232
  if (params.tenantId) {
2233
+ console.warn('Use of `tenantId` is deprecated when calling logIn() method, use `domainName` instead.');
2232
2234
  body.tenant_id = params.tenantId;
2233
2235
  }
2234
2236
 
2237
+ if (params.domainName) {
2238
+ body.domain_name = params.domainName;
2239
+ }
2240
+
2235
2241
  return client.post(`${baseUrl}/token`, body, headers).then(response => Session.parse(response));
2236
2242
  },
2237
2243
 
@@ -2244,6 +2250,7 @@ var authMethods = (client , baseUrl ) => ({
2244
2250
  expiration ,
2245
2251
  isMobile = false,
2246
2252
  tenantId ,
2253
+ domainName ,
2247
2254
  ) => {
2248
2255
  const body = {
2249
2256
  backend: backend || DEFAULT_BACKEND_USER,
@@ -2253,9 +2260,14 @@ var authMethods = (client , baseUrl ) => ({
2253
2260
  };
2254
2261
 
2255
2262
  if (tenantId) {
2263
+ console.warn('Use of `tenantId` is deprecated when calling refreshToken() method, use `domainName` instead.');
2256
2264
  body.tenant_id = tenantId;
2257
2265
  }
2258
2266
 
2267
+ if (domainName) {
2268
+ body.domain_name = domainName;
2269
+ }
2270
+
2259
2271
  const headers = {
2260
2272
  'Content-Type': 'application/json',
2261
2273
  ...(isMobile ? { 'Wazo-Session-Type': 'mobile' } : {}),
@@ -2625,6 +2637,70 @@ class ExternalApp {
2625
2637
 
2626
2638
  //
2627
2639
 
2640
+ class MeetingAuthorization {
2641
+
2642
+
2643
+
2644
+
2645
+
2646
+
2647
+ constructor({
2648
+ meetingUuid,
2649
+ uuid,
2650
+ userUuid,
2651
+ userName,
2652
+ } = {}) {
2653
+ this.meetingUuid = meetingUuid;
2654
+ this.uuid = uuid;
2655
+ this.userUuid = userUuid;
2656
+ this.userName = userName;
2657
+ }
2658
+
2659
+ setStatus(status ) {
2660
+ this.status = status;
2661
+ }
2662
+
2663
+ getStatus() {
2664
+ return this.status;
2665
+ }
2666
+
2667
+ static parse(plain ) {
2668
+ const {
2669
+ meeting_uuid: meetingUuid,
2670
+ uuid,
2671
+ guest_uuid: userUuid,
2672
+ guest_name: userName,
2673
+ } = plain;
2674
+
2675
+ return new MeetingAuthorization({
2676
+ meetingUuid,
2677
+ uuid,
2678
+ userUuid,
2679
+ userName,
2680
+ });
2681
+ }
2682
+
2683
+ static parseMany(items ) {
2684
+ if (!items) {
2685
+ return [];
2686
+ }
2687
+ return items.map(MeetingAuthorization.parse);
2688
+ }
2689
+ }
2690
+
2691
+ //
2692
+
2693
+
2694
+
2695
+
2696
+
2697
+
2698
+
2699
+
2700
+
2701
+
2702
+
2703
+
2628
2704
 
2629
2705
 
2630
2706
 
@@ -2635,6 +2711,7 @@ class ExternalApp {
2635
2711
 
2636
2712
 
2637
2713
 
2714
+
2638
2715
 
2639
2716
 
2640
2717
  class Meeting {
@@ -2649,6 +2726,8 @@ class Meeting {
2649
2726
 
2650
2727
 
2651
2728
 
2729
+
2730
+
2652
2731
 
2653
2732
  static parse(plain ) {
2654
2733
  return new Meeting({
@@ -2661,6 +2740,7 @@ class Meeting {
2661
2740
  extension: plain.exten,
2662
2741
  persistent: plain.persistent,
2663
2742
  creationTime: moment(plain.creation_time).toDate(),
2743
+ requireAuthorization: plain.require_authorization,
2664
2744
  });
2665
2745
  }
2666
2746
 
@@ -2685,6 +2765,7 @@ class Meeting {
2685
2765
  extension,
2686
2766
  persistent,
2687
2767
  creationTime,
2768
+ requireAuthorization,
2688
2769
  } = {}) {
2689
2770
  this.guestSipAuthorization = guestSipAuthorization;
2690
2771
  this.uri = uri;
@@ -2695,6 +2776,7 @@ class Meeting {
2695
2776
  this.extension = extension;
2696
2777
  this.persistent = persistent;
2697
2778
  this.creationTime = creationTime;
2779
+ this.requireAuthorization = requireAuthorization;
2698
2780
 
2699
2781
  // Useful to compare instead of instanceof with minified code
2700
2782
  this.type = 'Meeting';
@@ -2705,8 +2787,32 @@ class Meeting {
2705
2787
  const [username, secret] = atob(this.guestSipAuthorization).split(':');
2706
2788
  return { username, secret };
2707
2789
  }
2790
+
2708
2791
  }
2709
2792
 
2793
+ //
2794
+
2795
+ const camelToUnderscore = (key ) => {
2796
+ if (typeof key !== 'string') {
2797
+ throw new Error('Input is not a string');
2798
+ }
2799
+ return key.charAt(0).toLowerCase() + key.substring(1).replace(/([A-Z])/g, '_$1').toLowerCase();
2800
+ };
2801
+
2802
+ //
2803
+
2804
+ const convertKeysFromCamelToUnderscore = (args ) => {
2805
+ if (!args || typeof args !== 'object' || Array.isArray(args)) {
2806
+ throw new Error('Input is not an object');
2807
+ }
2808
+
2809
+ return Object.keys(args).reduce((acc, key) => {
2810
+ acc[camelToUnderscore(key)] = typeof args[key] === 'object' && !Array.isArray(args[key])
2811
+ ? convertKeysFromCamelToUnderscore(args[key]) : args[key];
2812
+ return acc;
2813
+ }, {});
2814
+ };
2815
+
2710
2816
  /* */
2711
2817
 
2712
2818
  var confdMethods = (client , baseUrl ) => ({
@@ -2775,8 +2881,18 @@ var confdMethods = (client , baseUrl ) => ({
2775
2881
  getMyMeetings: () =>
2776
2882
  client.get(`${baseUrl}/users/me/meetings`).then(response => Meeting.parseMany(response.items)),
2777
2883
 
2778
- createMyMeeting: (name , persistent ) =>
2779
- client.post(`${baseUrl}/users/me/meetings`, { name, persistent }).then(Meeting.parse),
2884
+ createMyMeeting: (args ) =>
2885
+ client
2886
+ .post(`${baseUrl}/users/me/meetings`, convertKeysFromCamelToUnderscore(args))
2887
+ .then(Meeting.parse),
2888
+
2889
+ updateMyMeeting: (meetingUuid , data ) =>
2890
+ client.put(
2891
+ `${baseUrl}/users/me/meetings/${meetingUuid}`,
2892
+ convertKeysFromCamelToUnderscore(data),
2893
+ null,
2894
+ ApiRequester.successResponseParser,
2895
+ ),
2780
2896
 
2781
2897
  deleteMyMeeting: (meetingUuid ) =>
2782
2898
  client.delete(`${baseUrl}/users/me/meetings/${meetingUuid}`, null),
@@ -2784,8 +2900,36 @@ var confdMethods = (client , baseUrl ) => ({
2784
2900
  getMeeting: (meetingUuid ) =>
2785
2901
  client.get(`${baseUrl}/meetings/${meetingUuid}`, null).then(Meeting.parse),
2786
2902
 
2903
+ meetingAuthorizations: (meetingUuid ) =>
2904
+ client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/authorizations`, null).then(MeetingAuthorization.parseMany),
2905
+
2906
+ meetingAuthorizationReject: (meetingUuid , authorizationUuid ) =>
2907
+ client.put(
2908
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/reject`,
2909
+ {},
2910
+ null,
2911
+ ApiRequester.successResponseParser,
2912
+ ),
2913
+
2914
+ meetingAuthorizationAccept: (meetingUuid , authorizationUuid ) =>
2915
+ client.put(
2916
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/accept`,
2917
+ {},
2918
+ null,
2919
+ ApiRequester.successResponseParser,
2920
+ ),
2921
+
2787
2922
  guestGetMeeting: (meetingUuid ) =>
2788
2923
  client.get(`${baseUrl}/guests/me/meetings/${meetingUuid}`, null).then(Meeting.parse),
2924
+
2925
+ guestAuthorizationRequest: (userUuid , meetingUuid , username ) =>
2926
+ client
2927
+ .post(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations`, { guest_name: username })
2928
+ .then(MeetingAuthorization.parse),
2929
+
2930
+ guestAuthorizationCheck: (userUuid , meetingUuid , authorizationUuid ) =>
2931
+ client.get(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations/${authorizationUuid}`, null),
2932
+
2789
2933
  });
2790
2934
 
2791
2935
  //
@@ -3550,6 +3694,7 @@ global.wazoClientId = global.wazoClientId || {};
3550
3694
  global.wazoClientToken = global.wazoClientToken || {};
3551
3695
  global.wazoRefreshToken = global.wazoRefreshToken || {};
3552
3696
  global.wazoRefreshTenantId = global.wazoRefreshTenantId || {};
3697
+ global.wazoRefreshDomainName = global.wazoRefreshDomainName || {};
3553
3698
  global.wazoOnRefreshToken = global.wazoOnRefreshToken || {};
3554
3699
  global.wazoOnRefreshTokenError = global.wazoOnRefreshTokenError || {};
3555
3700
  global.wazoRefreshExpiration = global.wazoRefreshExpiration || {};
@@ -4224,6 +4369,14 @@ var calldMethods = (client , baseUrl ) => ({
4224
4369
  getMeetingParticipantsAsUser: async (meetingUuid ) =>
4225
4370
  client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/participants`),
4226
4371
 
4372
+ banMeetingParticipant: (meetingUuid , participantUuid ) =>
4373
+ client.delete(
4374
+ `${baseUrl}/users/me/meetings/${meetingUuid}/participants/${participantUuid}`,
4375
+ null,
4376
+ null,
4377
+ ApiRequester.successResponseParser,
4378
+ ),
4379
+
4227
4380
  listTrunks: () => client.get(`${baseUrl}/trunks`),
4228
4381
 
4229
4382
  mute: (callId ) =>
@@ -4601,6 +4754,7 @@ class ApiClient {
4601
4754
 
4602
4755
 
4603
4756
 
4757
+
4604
4758
 
4605
4759
 
4606
4760
 
@@ -4642,6 +4796,7 @@ class ApiClient {
4642
4796
  refreshToken: this.refreshToken,
4643
4797
  refreshBackend: this.refreshBackend,
4644
4798
  refreshTenantId: this.refreshTenantId,
4799
+ refreshDomainName: this.refreshDomainName,
4645
4800
  refreshExpiration: this.refreshExpiration,
4646
4801
  isMobile: this.isMobile,
4647
4802
  });
@@ -4657,6 +4812,7 @@ class ApiClient {
4657
4812
  this.refreshExpiration,
4658
4813
  this.isMobile,
4659
4814
  this.refreshTenantId,
4815
+ this.refreshDomainName,
4660
4816
  );
4661
4817
 
4662
4818
  logger.info('token refreshed', { token: session.token });
@@ -4710,9 +4866,14 @@ class ApiClient {
4710
4866
  }
4711
4867
 
4712
4868
  setRefreshTenantId(tenantId ) {
4869
+ console.warn('Use of `setRefreshTenantId` is deprecated, use `setRefreshDomainName` instead');
4713
4870
  this.refreshTenantId = tenantId;
4714
4871
  }
4715
4872
 
4873
+ setRefreshDomainName(domainName ) {
4874
+ this.refreshDomainName = domainName;
4875
+ }
4876
+
4716
4877
  setIsMobile(isMobile ) {
4717
4878
  this.isMobile = isMobile;
4718
4879
  }