@wazo/sdk 0.38.7 → 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 (106) hide show
  1. package/dist/wazo-sdk.js +2 -2
  2. package/esm/__tests__/api-client.test.js +142 -2
  3. package/esm/__tests__/web-rtc-client.test.js +227 -27
  4. package/esm/api/calld.js +8 -0
  5. package/esm/api/confd.js +134 -2
  6. package/esm/api-client.js +142 -2
  7. package/esm/checker/Checker.js +183 -24
  8. package/esm/checker/checks/aor.js +142 -2
  9. package/esm/checker/checks/api.js +142 -2
  10. package/esm/checker/checks/index.js +183 -24
  11. package/esm/checker/checks/wazo-websocket.js +2 -0
  12. package/esm/checker/checks/webrtc-transport.js +181 -24
  13. package/esm/checker/checks/webrtc.js +181 -24
  14. package/esm/domain/AdHocAPIConference.js +142 -2
  15. package/esm/domain/Features.js +142 -2
  16. package/esm/domain/Meeting.js +18 -0
  17. package/esm/domain/MeetingAuthorization.js +70 -0
  18. package/esm/domain/Phone/CTIPhone.js +142 -2
  19. package/esm/domain/__tests__/Meeting.test.js +87 -1
  20. package/esm/domain/__tests__/MeetingAuthorization.test.js +109 -0
  21. package/esm/index.js +226 -27
  22. package/esm/service/CallApi.js +142 -2
  23. package/esm/service/getApiClient.js +142 -2
  24. package/esm/simple/Auth.js +226 -27
  25. package/esm/simple/Configuration.js +226 -27
  26. package/esm/simple/Directory.js +142 -2
  27. package/esm/simple/Phone.js +226 -27
  28. package/esm/simple/Websocket.js +3 -0
  29. package/esm/simple/index.js +226 -27
  30. package/esm/simple/room/LocalParticipant.js +226 -27
  31. package/esm/simple/room/Participant.js +226 -27
  32. package/esm/simple/room/RemoteParticipant.js +226 -27
  33. package/esm/simple/room/Room.js +226 -27
  34. package/esm/simple/room/SipRoom.js +226 -27
  35. package/esm/simple/room/Stream.js +226 -27
  36. package/esm/simple/room/__tests__/Participant.test.js +14747 -0
  37. package/esm/simple/room/__tests__/RemoteParticipant.test.js +226 -27
  38. package/esm/simple/utils.js +226 -27
  39. package/esm/utils/__tests__/object.test.js +57 -0
  40. package/esm/utils/__tests__/string.test.js +30 -0
  41. package/esm/utils/object.js +24 -0
  42. package/esm/utils/string.js +10 -0
  43. package/esm/web-rtc-client.js +181 -24
  44. package/esm/websocket-client.js +3 -1
  45. package/lib/__tests__/api-client.test.js +142 -2
  46. package/lib/__tests__/web-rtc-client.test.js +227 -27
  47. package/lib/api/calld.js +8 -0
  48. package/lib/api/confd.js +134 -2
  49. package/lib/api-client.js +142 -2
  50. package/lib/checker/Checker.js +183 -24
  51. package/lib/checker/checks/aor.js +142 -2
  52. package/lib/checker/checks/api.js +142 -2
  53. package/lib/checker/checks/index.js +183 -24
  54. package/lib/checker/checks/wazo-websocket.js +2 -0
  55. package/lib/checker/checks/webrtc-transport.js +181 -24
  56. package/lib/checker/checks/webrtc.js +181 -24
  57. package/lib/domain/AdHocAPIConference.js +142 -2
  58. package/lib/domain/Features.js +142 -2
  59. package/lib/domain/Meeting.js +18 -0
  60. package/lib/domain/MeetingAuthorization.js +79 -0
  61. package/lib/domain/Phone/CTIPhone.js +142 -2
  62. package/lib/domain/__tests__/Meeting.test.js +87 -1
  63. package/lib/domain/__tests__/MeetingAuthorization.test.js +111 -0
  64. package/lib/index.js +226 -27
  65. package/lib/service/CallApi.js +142 -2
  66. package/lib/service/getApiClient.js +142 -2
  67. package/lib/simple/Auth.js +226 -27
  68. package/lib/simple/Configuration.js +226 -27
  69. package/lib/simple/Directory.js +142 -2
  70. package/lib/simple/Phone.js +226 -27
  71. package/lib/simple/Websocket.js +3 -0
  72. package/lib/simple/index.js +226 -27
  73. package/lib/simple/room/LocalParticipant.js +226 -27
  74. package/lib/simple/room/Participant.js +226 -27
  75. package/lib/simple/room/RemoteParticipant.js +226 -27
  76. package/lib/simple/room/Room.js +226 -27
  77. package/lib/simple/room/SipRoom.js +226 -27
  78. package/lib/simple/room/Stream.js +226 -27
  79. package/lib/simple/room/__tests__/Participant.test.js +14757 -0
  80. package/lib/simple/room/__tests__/RemoteParticipant.test.js +226 -27
  81. package/lib/simple/utils.js +226 -27
  82. package/lib/utils/__tests__/object.test.js +59 -0
  83. package/lib/utils/__tests__/string.test.js +32 -0
  84. package/lib/utils/object.js +28 -0
  85. package/lib/utils/string.js +14 -0
  86. package/lib/web-rtc-client.js +181 -24
  87. package/lib/websocket-client.js +3 -0
  88. package/package.json +2 -2
  89. package/src/__tests__/web-rtc-client.test.js +46 -3
  90. package/src/api/calld.js +8 -0
  91. package/src/api/confd.js +43 -2
  92. package/src/domain/Meeting.js +20 -0
  93. package/src/domain/MeetingAuthorization.js +67 -0
  94. package/src/domain/__tests__/Meeting.test.js +70 -1
  95. package/src/domain/__tests__/MeetingAuthorization.test.js +58 -0
  96. package/src/simple/room/Participant.js +40 -0
  97. package/src/simple/room/Room.js +2 -2
  98. package/src/simple/room/SipRoom.js +1 -1
  99. package/src/simple/room/__tests__/Participant.test.js +81 -0
  100. package/src/types/WebSocketMessage.js +7 -1
  101. package/src/utils/__tests__/object.test.js +35 -0
  102. package/src/utils/__tests__/string.test.js +23 -0
  103. package/src/utils/object.js +15 -0
  104. package/src/utils/string.js +8 -0
  105. package/src/web-rtc-client.js +39 -22
  106. package/src/websocket-client.js +2 -0
@@ -3211,6 +3211,70 @@ class ExternalApp {
3211
3211
 
3212
3212
  //
3213
3213
 
3214
+ class MeetingAuthorization {
3215
+
3216
+
3217
+
3218
+
3219
+
3220
+
3221
+ constructor({
3222
+ meetingUuid,
3223
+ uuid,
3224
+ userUuid,
3225
+ userName,
3226
+ } = {}) {
3227
+ this.meetingUuid = meetingUuid;
3228
+ this.uuid = uuid;
3229
+ this.userUuid = userUuid;
3230
+ this.userName = userName;
3231
+ }
3232
+
3233
+ setStatus(status ) {
3234
+ this.status = status;
3235
+ }
3236
+
3237
+ getStatus() {
3238
+ return this.status;
3239
+ }
3240
+
3241
+ static parse(plain ) {
3242
+ const {
3243
+ meeting_uuid: meetingUuid,
3244
+ uuid,
3245
+ guest_uuid: userUuid,
3246
+ guest_name: userName,
3247
+ } = plain;
3248
+
3249
+ return new MeetingAuthorization({
3250
+ meetingUuid,
3251
+ uuid,
3252
+ userUuid,
3253
+ userName,
3254
+ });
3255
+ }
3256
+
3257
+ static parseMany(items ) {
3258
+ if (!items) {
3259
+ return [];
3260
+ }
3261
+ return items.map(MeetingAuthorization.parse);
3262
+ }
3263
+ }
3264
+
3265
+ //
3266
+
3267
+
3268
+
3269
+
3270
+
3271
+
3272
+
3273
+
3274
+
3275
+
3276
+
3277
+
3214
3278
 
3215
3279
 
3216
3280
 
@@ -3221,6 +3285,7 @@ class ExternalApp {
3221
3285
 
3222
3286
 
3223
3287
 
3288
+
3224
3289
 
3225
3290
 
3226
3291
  class Meeting {
@@ -3235,6 +3300,8 @@ class Meeting {
3235
3300
 
3236
3301
 
3237
3302
 
3303
+
3304
+
3238
3305
 
3239
3306
  static parse(plain ) {
3240
3307
  return new Meeting({
@@ -3247,6 +3314,7 @@ class Meeting {
3247
3314
  extension: plain.exten,
3248
3315
  persistent: plain.persistent,
3249
3316
  creationTime: moment__default['default'](plain.creation_time).toDate(),
3317
+ requireAuthorization: plain.require_authorization,
3250
3318
  });
3251
3319
  }
3252
3320
 
@@ -3271,6 +3339,7 @@ class Meeting {
3271
3339
  extension,
3272
3340
  persistent,
3273
3341
  creationTime,
3342
+ requireAuthorization,
3274
3343
  } = {}) {
3275
3344
  this.guestSipAuthorization = guestSipAuthorization;
3276
3345
  this.uri = uri;
@@ -3281,6 +3350,7 @@ class Meeting {
3281
3350
  this.extension = extension;
3282
3351
  this.persistent = persistent;
3283
3352
  this.creationTime = creationTime;
3353
+ this.requireAuthorization = requireAuthorization;
3284
3354
 
3285
3355
  // Useful to compare instead of instanceof with minified code
3286
3356
  this.type = 'Meeting';
@@ -3291,8 +3361,32 @@ class Meeting {
3291
3361
  const [username, secret] = atob(this.guestSipAuthorization).split(':');
3292
3362
  return { username, secret };
3293
3363
  }
3364
+
3294
3365
  }
3295
3366
 
3367
+ //
3368
+
3369
+ const camelToUnderscore = (key ) => {
3370
+ if (typeof key !== 'string') {
3371
+ throw new Error('Input is not a string');
3372
+ }
3373
+ return key.charAt(0).toLowerCase() + key.substring(1).replace(/([A-Z])/g, '_$1').toLowerCase();
3374
+ };
3375
+
3376
+ //
3377
+
3378
+ const convertKeysFromCamelToUnderscore = (args ) => {
3379
+ if (!args || typeof args !== 'object' || Array.isArray(args)) {
3380
+ throw new Error('Input is not an object');
3381
+ }
3382
+
3383
+ return Object.keys(args).reduce((acc, key) => {
3384
+ acc[camelToUnderscore(key)] = typeof args[key] === 'object' && !Array.isArray(args[key])
3385
+ ? convertKeysFromCamelToUnderscore(args[key]) : args[key];
3386
+ return acc;
3387
+ }, {});
3388
+ };
3389
+
3296
3390
  /* */
3297
3391
 
3298
3392
  var confdMethods = (client , baseUrl ) => ({
@@ -3361,8 +3455,18 @@ var confdMethods = (client , baseUrl ) => ({
3361
3455
  getMyMeetings: () =>
3362
3456
  client.get(`${baseUrl}/users/me/meetings`).then(response => Meeting.parseMany(response.items)),
3363
3457
 
3364
- createMyMeeting: (name , persistent ) =>
3365
- client.post(`${baseUrl}/users/me/meetings`, { name, persistent }).then(Meeting.parse),
3458
+ createMyMeeting: (args ) =>
3459
+ client
3460
+ .post(`${baseUrl}/users/me/meetings`, convertKeysFromCamelToUnderscore(args))
3461
+ .then(Meeting.parse),
3462
+
3463
+ updateMyMeeting: (meetingUuid , data ) =>
3464
+ client.put(
3465
+ `${baseUrl}/users/me/meetings/${meetingUuid}`,
3466
+ convertKeysFromCamelToUnderscore(data),
3467
+ null,
3468
+ ApiRequester.successResponseParser,
3469
+ ),
3366
3470
 
3367
3471
  deleteMyMeeting: (meetingUuid ) =>
3368
3472
  client.delete(`${baseUrl}/users/me/meetings/${meetingUuid}`, null),
@@ -3370,8 +3474,36 @@ var confdMethods = (client , baseUrl ) => ({
3370
3474
  getMeeting: (meetingUuid ) =>
3371
3475
  client.get(`${baseUrl}/meetings/${meetingUuid}`, null).then(Meeting.parse),
3372
3476
 
3477
+ meetingAuthorizations: (meetingUuid ) =>
3478
+ client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/authorizations`, null).then(MeetingAuthorization.parseMany),
3479
+
3480
+ meetingAuthorizationReject: (meetingUuid , authorizationUuid ) =>
3481
+ client.put(
3482
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/reject`,
3483
+ {},
3484
+ null,
3485
+ ApiRequester.successResponseParser,
3486
+ ),
3487
+
3488
+ meetingAuthorizationAccept: (meetingUuid , authorizationUuid ) =>
3489
+ client.put(
3490
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/accept`,
3491
+ {},
3492
+ null,
3493
+ ApiRequester.successResponseParser,
3494
+ ),
3495
+
3373
3496
  guestGetMeeting: (meetingUuid ) =>
3374
3497
  client.get(`${baseUrl}/guests/me/meetings/${meetingUuid}`, null).then(Meeting.parse),
3498
+
3499
+ guestAuthorizationRequest: (userUuid , meetingUuid , username ) =>
3500
+ client
3501
+ .post(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations`, { guest_name: username })
3502
+ .then(MeetingAuthorization.parse),
3503
+
3504
+ guestAuthorizationCheck: (userUuid , meetingUuid , authorizationUuid ) =>
3505
+ client.get(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations/${authorizationUuid}`, null),
3506
+
3375
3507
  });
3376
3508
 
3377
3509
  //
@@ -4810,6 +4942,14 @@ var calldMethods = (client , baseUrl ) => ({
4810
4942
  getMeetingParticipantsAsUser: async (meetingUuid ) =>
4811
4943
  client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/participants`),
4812
4944
 
4945
+ banMeetingParticipant: (meetingUuid , participantUuid ) =>
4946
+ client.delete(
4947
+ `${baseUrl}/users/me/meetings/${meetingUuid}/participants/${participantUuid}`,
4948
+ null,
4949
+ null,
4950
+ ApiRequester.successResponseParser,
4951
+ ),
4952
+
4813
4953
  listTrunks: () => client.get(`${baseUrl}/trunks`),
4814
4954
 
4815
4955
  mute: (callId ) =>
@@ -6450,7 +6590,7 @@ class WebRTCClient extends Emitter {
6450
6590
  });
6451
6591
  }
6452
6592
 
6453
- changeAudioInputDevice(id , session , force ) {
6593
+ async changeAudioInputDevice(id , session , force ) {
6454
6594
  const currentId = this.getAudioDeviceId();
6455
6595
  logger.info('setting audio input device', { id, currentId, session: !!session });
6456
6596
 
@@ -6458,33 +6598,50 @@ class WebRTCClient extends Emitter {
6458
6598
  return null;
6459
6599
  }
6460
6600
 
6601
+ // in order to handle an audio track change for default devices
6602
+ // we need the actual id of the device (not 'default')
6603
+ let deviceId = id;
6604
+ if (id === 'default' && navigator.mediaDevices) {
6605
+ const devices = await navigator.mediaDevices.enumerateDevices();
6606
+ const defaultDevice = devices.find(device => device.deviceId === 'default');
6607
+ if (defaultDevice) {
6608
+ const deviceLabel = defaultDevice.label.replace('Default - ', '');
6609
+ const targetDevice = devices.find(device => device.label === deviceLabel);
6610
+ if (targetDevice) {
6611
+ deviceId = targetDevice.deviceId;
6612
+ if (!force && deviceId === currentId) {
6613
+ return null;
6614
+ }
6615
+ }
6616
+ }
6617
+ }
6618
+
6461
6619
  // let's update the local audio value
6462
6620
  if (this.audio) {
6463
6621
  this.audio = {
6464
6622
  deviceId: {
6465
- exact: id,
6623
+ exact: deviceId,
6466
6624
  },
6467
6625
  };
6468
6626
  }
6469
6627
 
6470
- if (session) {
6628
+ if (session && navigator.mediaDevices) {
6471
6629
  const sdh = session.sessionDescriptionHandler;
6472
6630
  const pc = sdh.peerConnection;
6473
6631
 
6474
- // $FlowFixMe
6475
- return navigator.mediaDevices.getUserMedia({ audio: { deviceId: { exact: id } } }).then(async stream => {
6476
- const audioTrack = stream.getAudioTracks()[0];
6477
- const sender = pc && pc.getSenders().find(s => audioTrack && s && s.track && s.track.kind === audioTrack.kind);
6632
+ const constraints = { audio: { deviceId: { exact: deviceId } } };
6633
+ const stream = await navigator.mediaDevices.getUserMedia(constraints);
6634
+ const audioTrack = stream.getAudioTracks()[0];
6635
+ const sender = pc && pc.getSenders().find(s => audioTrack && s && s.track && s.track.kind === audioTrack.kind);
6478
6636
 
6479
- if (sender) {
6480
- if (sender.track) {
6481
- audioTrack.enabled = sender.track.enabled;
6482
- }
6483
- sender.replaceTrack(audioTrack);
6637
+ if (sender) {
6638
+ if (sender.track) {
6639
+ audioTrack.enabled = sender.track.enabled;
6484
6640
  }
6641
+ sender.replaceTrack(audioTrack);
6642
+ }
6485
6643
 
6486
- return stream;
6487
- });
6644
+ return stream;
6488
6645
  }
6489
6646
  }
6490
6647
 
@@ -6504,14 +6661,14 @@ class WebRTCClient extends Emitter {
6504
6661
  return null;
6505
6662
  }
6506
6663
 
6507
- // let's update the local video value
6508
- if (this.video) {
6509
- this.video = {
6510
- deviceId: {
6511
- exact: id,
6512
- },
6513
- };
6514
- }
6664
+ // let's make sure we don't lose other video constraints settings -- width, height, frameRate...
6665
+ const videoObject = typeof this.video === 'object' ? this.video : {};
6666
+ this.video = {
6667
+ ...videoObject,
6668
+ deviceId: {
6669
+ exact: id,
6670
+ },
6671
+ };
6515
6672
  }
6516
6673
 
6517
6674
  changeSessionVideoInputDevice(id , session ) {
@@ -2846,6 +2846,70 @@ class ExternalApp {
2846
2846
 
2847
2847
  //
2848
2848
 
2849
+ class MeetingAuthorization {
2850
+
2851
+
2852
+
2853
+
2854
+
2855
+
2856
+ constructor({
2857
+ meetingUuid,
2858
+ uuid,
2859
+ userUuid,
2860
+ userName,
2861
+ } = {}) {
2862
+ this.meetingUuid = meetingUuid;
2863
+ this.uuid = uuid;
2864
+ this.userUuid = userUuid;
2865
+ this.userName = userName;
2866
+ }
2867
+
2868
+ setStatus(status ) {
2869
+ this.status = status;
2870
+ }
2871
+
2872
+ getStatus() {
2873
+ return this.status;
2874
+ }
2875
+
2876
+ static parse(plain ) {
2877
+ const {
2878
+ meeting_uuid: meetingUuid,
2879
+ uuid,
2880
+ guest_uuid: userUuid,
2881
+ guest_name: userName,
2882
+ } = plain;
2883
+
2884
+ return new MeetingAuthorization({
2885
+ meetingUuid,
2886
+ uuid,
2887
+ userUuid,
2888
+ userName,
2889
+ });
2890
+ }
2891
+
2892
+ static parseMany(items ) {
2893
+ if (!items) {
2894
+ return [];
2895
+ }
2896
+ return items.map(MeetingAuthorization.parse);
2897
+ }
2898
+ }
2899
+
2900
+ //
2901
+
2902
+
2903
+
2904
+
2905
+
2906
+
2907
+
2908
+
2909
+
2910
+
2911
+
2912
+
2849
2913
 
2850
2914
 
2851
2915
 
@@ -2856,6 +2920,7 @@ class ExternalApp {
2856
2920
 
2857
2921
 
2858
2922
 
2923
+
2859
2924
 
2860
2925
 
2861
2926
  class Meeting {
@@ -2870,6 +2935,8 @@ class Meeting {
2870
2935
 
2871
2936
 
2872
2937
 
2938
+
2939
+
2873
2940
 
2874
2941
  static parse(plain ) {
2875
2942
  return new Meeting({
@@ -2882,6 +2949,7 @@ class Meeting {
2882
2949
  extension: plain.exten,
2883
2950
  persistent: plain.persistent,
2884
2951
  creationTime: moment__default['default'](plain.creation_time).toDate(),
2952
+ requireAuthorization: plain.require_authorization,
2885
2953
  });
2886
2954
  }
2887
2955
 
@@ -2906,6 +2974,7 @@ class Meeting {
2906
2974
  extension,
2907
2975
  persistent,
2908
2976
  creationTime,
2977
+ requireAuthorization,
2909
2978
  } = {}) {
2910
2979
  this.guestSipAuthorization = guestSipAuthorization;
2911
2980
  this.uri = uri;
@@ -2916,6 +2985,7 @@ class Meeting {
2916
2985
  this.extension = extension;
2917
2986
  this.persistent = persistent;
2918
2987
  this.creationTime = creationTime;
2988
+ this.requireAuthorization = requireAuthorization;
2919
2989
 
2920
2990
  // Useful to compare instead of instanceof with minified code
2921
2991
  this.type = 'Meeting';
@@ -2926,8 +2996,32 @@ class Meeting {
2926
2996
  const [username, secret] = atob(this.guestSipAuthorization).split(':');
2927
2997
  return { username, secret };
2928
2998
  }
2999
+
2929
3000
  }
2930
3001
 
3002
+ //
3003
+
3004
+ const camelToUnderscore = (key ) => {
3005
+ if (typeof key !== 'string') {
3006
+ throw new Error('Input is not a string');
3007
+ }
3008
+ return key.charAt(0).toLowerCase() + key.substring(1).replace(/([A-Z])/g, '_$1').toLowerCase();
3009
+ };
3010
+
3011
+ //
3012
+
3013
+ const convertKeysFromCamelToUnderscore = (args ) => {
3014
+ if (!args || typeof args !== 'object' || Array.isArray(args)) {
3015
+ throw new Error('Input is not an object');
3016
+ }
3017
+
3018
+ return Object.keys(args).reduce((acc, key) => {
3019
+ acc[camelToUnderscore(key)] = typeof args[key] === 'object' && !Array.isArray(args[key])
3020
+ ? convertKeysFromCamelToUnderscore(args[key]) : args[key];
3021
+ return acc;
3022
+ }, {});
3023
+ };
3024
+
2931
3025
  /* */
2932
3026
 
2933
3027
  var confdMethods = (client , baseUrl ) => ({
@@ -2996,8 +3090,18 @@ var confdMethods = (client , baseUrl ) => ({
2996
3090
  getMyMeetings: () =>
2997
3091
  client.get(`${baseUrl}/users/me/meetings`).then(response => Meeting.parseMany(response.items)),
2998
3092
 
2999
- createMyMeeting: (name , persistent ) =>
3000
- client.post(`${baseUrl}/users/me/meetings`, { name, persistent }).then(Meeting.parse),
3093
+ createMyMeeting: (args ) =>
3094
+ client
3095
+ .post(`${baseUrl}/users/me/meetings`, convertKeysFromCamelToUnderscore(args))
3096
+ .then(Meeting.parse),
3097
+
3098
+ updateMyMeeting: (meetingUuid , data ) =>
3099
+ client.put(
3100
+ `${baseUrl}/users/me/meetings/${meetingUuid}`,
3101
+ convertKeysFromCamelToUnderscore(data),
3102
+ null,
3103
+ ApiRequester.successResponseParser,
3104
+ ),
3001
3105
 
3002
3106
  deleteMyMeeting: (meetingUuid ) =>
3003
3107
  client.delete(`${baseUrl}/users/me/meetings/${meetingUuid}`, null),
@@ -3005,8 +3109,36 @@ var confdMethods = (client , baseUrl ) => ({
3005
3109
  getMeeting: (meetingUuid ) =>
3006
3110
  client.get(`${baseUrl}/meetings/${meetingUuid}`, null).then(Meeting.parse),
3007
3111
 
3112
+ meetingAuthorizations: (meetingUuid ) =>
3113
+ client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/authorizations`, null).then(MeetingAuthorization.parseMany),
3114
+
3115
+ meetingAuthorizationReject: (meetingUuid , authorizationUuid ) =>
3116
+ client.put(
3117
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/reject`,
3118
+ {},
3119
+ null,
3120
+ ApiRequester.successResponseParser,
3121
+ ),
3122
+
3123
+ meetingAuthorizationAccept: (meetingUuid , authorizationUuid ) =>
3124
+ client.put(
3125
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/accept`,
3126
+ {},
3127
+ null,
3128
+ ApiRequester.successResponseParser,
3129
+ ),
3130
+
3008
3131
  guestGetMeeting: (meetingUuid ) =>
3009
3132
  client.get(`${baseUrl}/guests/me/meetings/${meetingUuid}`, null).then(Meeting.parse),
3133
+
3134
+ guestAuthorizationRequest: (userUuid , meetingUuid , username ) =>
3135
+ client
3136
+ .post(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations`, { guest_name: username })
3137
+ .then(MeetingAuthorization.parse),
3138
+
3139
+ guestAuthorizationCheck: (userUuid , meetingUuid , authorizationUuid ) =>
3140
+ client.get(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations/${authorizationUuid}`, null),
3141
+
3010
3142
  });
3011
3143
 
3012
3144
  //
@@ -4213,6 +4345,14 @@ var calldMethods = (client , baseUrl ) => ({
4213
4345
  getMeetingParticipantsAsUser: async (meetingUuid ) =>
4214
4346
  client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/participants`),
4215
4347
 
4348
+ banMeetingParticipant: (meetingUuid , participantUuid ) =>
4349
+ client.delete(
4350
+ `${baseUrl}/users/me/meetings/${meetingUuid}/participants/${participantUuid}`,
4351
+ null,
4352
+ null,
4353
+ ApiRequester.successResponseParser,
4354
+ ),
4355
+
4216
4356
  listTrunks: () => client.get(`${baseUrl}/trunks`),
4217
4357
 
4218
4358
  mute: (callId ) =>