@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
@@ -36,6 +36,7 @@ const RECORD_STATE_ACTIVE = 'active';
36
36
 
37
37
 
38
38
 
39
+
39
40
 
40
41
 
41
42
 
@@ -46,6 +47,7 @@ const RECORD_STATE_ACTIVE = 'active';
46
47
 
47
48
 
48
49
 
50
+
49
51
 
50
52
 
51
53
 
@@ -74,6 +76,7 @@ class Call {
74
76
 
75
77
 
76
78
 
79
+
77
80
 
78
81
 
79
82
 
@@ -98,6 +101,7 @@ class Call {
98
101
  calleeNumber: plain.peer_caller_id_number,
99
102
  dialedExtension: plain.dialed_extension,
100
103
  isCaller: plain.is_caller,
104
+ isVideo: plain.is_video,
101
105
  muted: plain.muted,
102
106
  onHold: plain.on_hold,
103
107
  status: plain.status,
@@ -121,6 +125,7 @@ class Call {
121
125
  calleeNumber,
122
126
  dialedExtension,
123
127
  isCaller,
128
+ isVideo,
124
129
  lineId,
125
130
  muted,
126
131
  onHold,
@@ -144,6 +149,7 @@ class Call {
144
149
  this.startingTime = startingTime;
145
150
  this.talkingToIds = talkingToIds || [];
146
151
  this.recording = recording;
152
+ this.isVideo = !!isVideo;
147
153
 
148
154
  // Useful to compare instead of instanceof with minified code
149
155
  this.type = 'Call';
@@ -3171,6 +3177,70 @@ class ExternalApp {
3171
3177
 
3172
3178
  //
3173
3179
 
3180
+ class MeetingAuthorization {
3181
+
3182
+
3183
+
3184
+
3185
+
3186
+
3187
+ constructor({
3188
+ meetingUuid,
3189
+ uuid,
3190
+ userUuid,
3191
+ userName,
3192
+ } = {}) {
3193
+ this.meetingUuid = meetingUuid;
3194
+ this.uuid = uuid;
3195
+ this.userUuid = userUuid;
3196
+ this.userName = userName;
3197
+ }
3198
+
3199
+ setStatus(status ) {
3200
+ this.status = status;
3201
+ }
3202
+
3203
+ getStatus() {
3204
+ return this.status;
3205
+ }
3206
+
3207
+ static parse(plain ) {
3208
+ const {
3209
+ meeting_uuid: meetingUuid,
3210
+ uuid,
3211
+ guest_uuid: userUuid,
3212
+ guest_name: userName,
3213
+ } = plain;
3214
+
3215
+ return new MeetingAuthorization({
3216
+ meetingUuid,
3217
+ uuid,
3218
+ userUuid,
3219
+ userName,
3220
+ });
3221
+ }
3222
+
3223
+ static parseMany(items ) {
3224
+ if (!items) {
3225
+ return [];
3226
+ }
3227
+ return items.map(MeetingAuthorization.parse);
3228
+ }
3229
+ }
3230
+
3231
+ //
3232
+
3233
+
3234
+
3235
+
3236
+
3237
+
3238
+
3239
+
3240
+
3241
+
3242
+
3243
+
3174
3244
 
3175
3245
 
3176
3246
 
@@ -3181,6 +3251,7 @@ class ExternalApp {
3181
3251
 
3182
3252
 
3183
3253
 
3254
+
3184
3255
 
3185
3256
 
3186
3257
  class Meeting {
@@ -3195,6 +3266,8 @@ class Meeting {
3195
3266
 
3196
3267
 
3197
3268
 
3269
+
3270
+
3198
3271
 
3199
3272
  static parse(plain ) {
3200
3273
  return new Meeting({
@@ -3207,6 +3280,7 @@ class Meeting {
3207
3280
  extension: plain.exten,
3208
3281
  persistent: plain.persistent,
3209
3282
  creationTime: moment__default['default'](plain.creation_time).toDate(),
3283
+ requireAuthorization: plain.require_authorization,
3210
3284
  });
3211
3285
  }
3212
3286
 
@@ -3231,6 +3305,7 @@ class Meeting {
3231
3305
  extension,
3232
3306
  persistent,
3233
3307
  creationTime,
3308
+ requireAuthorization,
3234
3309
  } = {}) {
3235
3310
  this.guestSipAuthorization = guestSipAuthorization;
3236
3311
  this.uri = uri;
@@ -3241,6 +3316,7 @@ class Meeting {
3241
3316
  this.extension = extension;
3242
3317
  this.persistent = persistent;
3243
3318
  this.creationTime = creationTime;
3319
+ this.requireAuthorization = requireAuthorization;
3244
3320
 
3245
3321
  // Useful to compare instead of instanceof with minified code
3246
3322
  this.type = 'Meeting';
@@ -3251,8 +3327,32 @@ class Meeting {
3251
3327
  const [username, secret] = atob(this.guestSipAuthorization).split(':');
3252
3328
  return { username, secret };
3253
3329
  }
3330
+
3254
3331
  }
3255
3332
 
3333
+ //
3334
+
3335
+ const camelToUnderscore = (key ) => {
3336
+ if (typeof key !== 'string') {
3337
+ throw new Error('Input is not a string');
3338
+ }
3339
+ return key.charAt(0).toLowerCase() + key.substring(1).replace(/([A-Z])/g, '_$1').toLowerCase();
3340
+ };
3341
+
3342
+ //
3343
+
3344
+ const convertKeysFromCamelToUnderscore = (args ) => {
3345
+ if (!args || typeof args !== 'object' || Array.isArray(args)) {
3346
+ throw new Error('Input is not an object');
3347
+ }
3348
+
3349
+ return Object.keys(args).reduce((acc, key) => {
3350
+ acc[camelToUnderscore(key)] = typeof args[key] === 'object' && !Array.isArray(args[key])
3351
+ ? convertKeysFromCamelToUnderscore(args[key]) : args[key];
3352
+ return acc;
3353
+ }, {});
3354
+ };
3355
+
3256
3356
  /* */
3257
3357
 
3258
3358
  var confdMethods = (client , baseUrl ) => ({
@@ -3321,8 +3421,18 @@ var confdMethods = (client , baseUrl ) => ({
3321
3421
  getMyMeetings: () =>
3322
3422
  client.get(`${baseUrl}/users/me/meetings`).then(response => Meeting.parseMany(response.items)),
3323
3423
 
3324
- createMyMeeting: (name , persistent ) =>
3325
- client.post(`${baseUrl}/users/me/meetings`, { name, persistent }).then(Meeting.parse),
3424
+ createMyMeeting: (args ) =>
3425
+ client
3426
+ .post(`${baseUrl}/users/me/meetings`, convertKeysFromCamelToUnderscore(args))
3427
+ .then(Meeting.parse),
3428
+
3429
+ updateMyMeeting: (meetingUuid , data ) =>
3430
+ client.put(
3431
+ `${baseUrl}/users/me/meetings/${meetingUuid}`,
3432
+ convertKeysFromCamelToUnderscore(data),
3433
+ null,
3434
+ ApiRequester.successResponseParser,
3435
+ ),
3326
3436
 
3327
3437
  deleteMyMeeting: (meetingUuid ) =>
3328
3438
  client.delete(`${baseUrl}/users/me/meetings/${meetingUuid}`, null),
@@ -3330,8 +3440,36 @@ var confdMethods = (client , baseUrl ) => ({
3330
3440
  getMeeting: (meetingUuid ) =>
3331
3441
  client.get(`${baseUrl}/meetings/${meetingUuid}`, null).then(Meeting.parse),
3332
3442
 
3443
+ meetingAuthorizations: (meetingUuid ) =>
3444
+ client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/authorizations`, null).then(MeetingAuthorization.parseMany),
3445
+
3446
+ meetingAuthorizationReject: (meetingUuid , authorizationUuid ) =>
3447
+ client.put(
3448
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/reject`,
3449
+ {},
3450
+ null,
3451
+ ApiRequester.successResponseParser,
3452
+ ),
3453
+
3454
+ meetingAuthorizationAccept: (meetingUuid , authorizationUuid ) =>
3455
+ client.put(
3456
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/accept`,
3457
+ {},
3458
+ null,
3459
+ ApiRequester.successResponseParser,
3460
+ ),
3461
+
3333
3462
  guestGetMeeting: (meetingUuid ) =>
3334
3463
  client.get(`${baseUrl}/guests/me/meetings/${meetingUuid}`, null).then(Meeting.parse),
3464
+
3465
+ guestAuthorizationRequest: (userUuid , meetingUuid , username ) =>
3466
+ client
3467
+ .post(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations`, { guest_name: username })
3468
+ .then(MeetingAuthorization.parse),
3469
+
3470
+ guestAuthorizationCheck: (userUuid , meetingUuid , authorizationUuid ) =>
3471
+ client.get(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations/${authorizationUuid}`, null),
3472
+
3335
3473
  });
3336
3474
 
3337
3475
  //
@@ -4207,6 +4345,14 @@ var calldMethods = (client , baseUrl ) => ({
4207
4345
  getMeetingParticipantsAsUser: async (meetingUuid ) =>
4208
4346
  client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/participants`),
4209
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
+
4210
4356
  listTrunks: () => client.get(`${baseUrl}/trunks`),
4211
4357
 
4212
4358
  mute: (callId ) =>
@@ -2633,6 +2633,70 @@ class ExternalApp {
2633
2633
 
2634
2634
  //
2635
2635
 
2636
+ class MeetingAuthorization {
2637
+
2638
+
2639
+
2640
+
2641
+
2642
+
2643
+ constructor({
2644
+ meetingUuid,
2645
+ uuid,
2646
+ userUuid,
2647
+ userName,
2648
+ } = {}) {
2649
+ this.meetingUuid = meetingUuid;
2650
+ this.uuid = uuid;
2651
+ this.userUuid = userUuid;
2652
+ this.userName = userName;
2653
+ }
2654
+
2655
+ setStatus(status ) {
2656
+ this.status = status;
2657
+ }
2658
+
2659
+ getStatus() {
2660
+ return this.status;
2661
+ }
2662
+
2663
+ static parse(plain ) {
2664
+ const {
2665
+ meeting_uuid: meetingUuid,
2666
+ uuid,
2667
+ guest_uuid: userUuid,
2668
+ guest_name: userName,
2669
+ } = plain;
2670
+
2671
+ return new MeetingAuthorization({
2672
+ meetingUuid,
2673
+ uuid,
2674
+ userUuid,
2675
+ userName,
2676
+ });
2677
+ }
2678
+
2679
+ static parseMany(items ) {
2680
+ if (!items) {
2681
+ return [];
2682
+ }
2683
+ return items.map(MeetingAuthorization.parse);
2684
+ }
2685
+ }
2686
+
2687
+ //
2688
+
2689
+
2690
+
2691
+
2692
+
2693
+
2694
+
2695
+
2696
+
2697
+
2698
+
2699
+
2636
2700
 
2637
2701
 
2638
2702
 
@@ -2643,6 +2707,7 @@ class ExternalApp {
2643
2707
 
2644
2708
 
2645
2709
 
2710
+
2646
2711
 
2647
2712
 
2648
2713
  class Meeting {
@@ -2657,6 +2722,8 @@ class Meeting {
2657
2722
 
2658
2723
 
2659
2724
 
2725
+
2726
+
2660
2727
 
2661
2728
  static parse(plain ) {
2662
2729
  return new Meeting({
@@ -2669,6 +2736,7 @@ class Meeting {
2669
2736
  extension: plain.exten,
2670
2737
  persistent: plain.persistent,
2671
2738
  creationTime: moment__default['default'](plain.creation_time).toDate(),
2739
+ requireAuthorization: plain.require_authorization,
2672
2740
  });
2673
2741
  }
2674
2742
 
@@ -2693,6 +2761,7 @@ class Meeting {
2693
2761
  extension,
2694
2762
  persistent,
2695
2763
  creationTime,
2764
+ requireAuthorization,
2696
2765
  } = {}) {
2697
2766
  this.guestSipAuthorization = guestSipAuthorization;
2698
2767
  this.uri = uri;
@@ -2703,6 +2772,7 @@ class Meeting {
2703
2772
  this.extension = extension;
2704
2773
  this.persistent = persistent;
2705
2774
  this.creationTime = creationTime;
2775
+ this.requireAuthorization = requireAuthorization;
2706
2776
 
2707
2777
  // Useful to compare instead of instanceof with minified code
2708
2778
  this.type = 'Meeting';
@@ -2713,8 +2783,32 @@ class Meeting {
2713
2783
  const [username, secret] = atob(this.guestSipAuthorization).split(':');
2714
2784
  return { username, secret };
2715
2785
  }
2786
+
2716
2787
  }
2717
2788
 
2789
+ //
2790
+
2791
+ const camelToUnderscore = (key ) => {
2792
+ if (typeof key !== 'string') {
2793
+ throw new Error('Input is not a string');
2794
+ }
2795
+ return key.charAt(0).toLowerCase() + key.substring(1).replace(/([A-Z])/g, '_$1').toLowerCase();
2796
+ };
2797
+
2798
+ //
2799
+
2800
+ const convertKeysFromCamelToUnderscore = (args ) => {
2801
+ if (!args || typeof args !== 'object' || Array.isArray(args)) {
2802
+ throw new Error('Input is not an object');
2803
+ }
2804
+
2805
+ return Object.keys(args).reduce((acc, key) => {
2806
+ acc[camelToUnderscore(key)] = typeof args[key] === 'object' && !Array.isArray(args[key])
2807
+ ? convertKeysFromCamelToUnderscore(args[key]) : args[key];
2808
+ return acc;
2809
+ }, {});
2810
+ };
2811
+
2718
2812
  /* */
2719
2813
 
2720
2814
  var confdMethods = (client , baseUrl ) => ({
@@ -2783,8 +2877,18 @@ var confdMethods = (client , baseUrl ) => ({
2783
2877
  getMyMeetings: () =>
2784
2878
  client.get(`${baseUrl}/users/me/meetings`).then(response => Meeting.parseMany(response.items)),
2785
2879
 
2786
- createMyMeeting: (name , persistent ) =>
2787
- client.post(`${baseUrl}/users/me/meetings`, { name, persistent }).then(Meeting.parse),
2880
+ createMyMeeting: (args ) =>
2881
+ client
2882
+ .post(`${baseUrl}/users/me/meetings`, convertKeysFromCamelToUnderscore(args))
2883
+ .then(Meeting.parse),
2884
+
2885
+ updateMyMeeting: (meetingUuid , data ) =>
2886
+ client.put(
2887
+ `${baseUrl}/users/me/meetings/${meetingUuid}`,
2888
+ convertKeysFromCamelToUnderscore(data),
2889
+ null,
2890
+ ApiRequester.successResponseParser,
2891
+ ),
2788
2892
 
2789
2893
  deleteMyMeeting: (meetingUuid ) =>
2790
2894
  client.delete(`${baseUrl}/users/me/meetings/${meetingUuid}`, null),
@@ -2792,8 +2896,36 @@ var confdMethods = (client , baseUrl ) => ({
2792
2896
  getMeeting: (meetingUuid ) =>
2793
2897
  client.get(`${baseUrl}/meetings/${meetingUuid}`, null).then(Meeting.parse),
2794
2898
 
2899
+ meetingAuthorizations: (meetingUuid ) =>
2900
+ client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/authorizations`, null).then(MeetingAuthorization.parseMany),
2901
+
2902
+ meetingAuthorizationReject: (meetingUuid , authorizationUuid ) =>
2903
+ client.put(
2904
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/reject`,
2905
+ {},
2906
+ null,
2907
+ ApiRequester.successResponseParser,
2908
+ ),
2909
+
2910
+ meetingAuthorizationAccept: (meetingUuid , authorizationUuid ) =>
2911
+ client.put(
2912
+ `${baseUrl}/users/me/meetings/${meetingUuid}/authorizations/${authorizationUuid}/accept`,
2913
+ {},
2914
+ null,
2915
+ ApiRequester.successResponseParser,
2916
+ ),
2917
+
2795
2918
  guestGetMeeting: (meetingUuid ) =>
2796
2919
  client.get(`${baseUrl}/guests/me/meetings/${meetingUuid}`, null).then(Meeting.parse),
2920
+
2921
+ guestAuthorizationRequest: (userUuid , meetingUuid , username ) =>
2922
+ client
2923
+ .post(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations`, { guest_name: username })
2924
+ .then(MeetingAuthorization.parse),
2925
+
2926
+ guestAuthorizationCheck: (userUuid , meetingUuid , authorizationUuid ) =>
2927
+ client.get(`${baseUrl}/guests/${userUuid}/meetings/${meetingUuid}/authorizations/${authorizationUuid}`, null),
2928
+
2797
2929
  });
2798
2930
 
2799
2931
  //
@@ -3059,6 +3191,7 @@ const RECORD_STATE_ACTIVE = 'active';
3059
3191
 
3060
3192
 
3061
3193
 
3194
+
3062
3195
 
3063
3196
 
3064
3197
 
@@ -3069,6 +3202,7 @@ const RECORD_STATE_ACTIVE = 'active';
3069
3202
 
3070
3203
 
3071
3204
 
3205
+
3072
3206
 
3073
3207
 
3074
3208
 
@@ -3097,6 +3231,7 @@ class Call {
3097
3231
 
3098
3232
 
3099
3233
 
3234
+
3100
3235
 
3101
3236
 
3102
3237
 
@@ -3121,6 +3256,7 @@ class Call {
3121
3256
  calleeNumber: plain.peer_caller_id_number,
3122
3257
  dialedExtension: plain.dialed_extension,
3123
3258
  isCaller: plain.is_caller,
3259
+ isVideo: plain.is_video,
3124
3260
  muted: plain.muted,
3125
3261
  onHold: plain.on_hold,
3126
3262
  status: plain.status,
@@ -3144,6 +3280,7 @@ class Call {
3144
3280
  calleeNumber,
3145
3281
  dialedExtension,
3146
3282
  isCaller,
3283
+ isVideo,
3147
3284
  lineId,
3148
3285
  muted,
3149
3286
  onHold,
@@ -3167,6 +3304,7 @@ class Call {
3167
3304
  this.startingTime = startingTime;
3168
3305
  this.talkingToIds = talkingToIds || [];
3169
3306
  this.recording = recording;
3307
+ this.isVideo = !!isVideo;
3170
3308
 
3171
3309
  // Useful to compare instead of instanceof with minified code
3172
3310
  this.type = 'Call';
@@ -4209,6 +4347,14 @@ var calldMethods = (client , baseUrl ) => ({
4209
4347
  getMeetingParticipantsAsUser: async (meetingUuid ) =>
4210
4348
  client.get(`${baseUrl}/users/me/meetings/${meetingUuid}/participants`),
4211
4349
 
4350
+ banMeetingParticipant: (meetingUuid , participantUuid ) =>
4351
+ client.delete(
4352
+ `${baseUrl}/users/me/meetings/${meetingUuid}/participants/${participantUuid}`,
4353
+ null,
4354
+ null,
4355
+ ApiRequester.successResponseParser,
4356
+ ),
4357
+
4212
4358
  listTrunks: () => client.get(`${baseUrl}/trunks`),
4213
4359
 
4214
4360
  mute: (callId ) =>