@wazo/sdk 0.37.18 → 0.37.19

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 (158) hide show
  1. package/dist/wazo-sdk.js +13 -5
  2. package/esm/__tests__/api-client.test.js +9 -5
  3. package/esm/__tests__/web-rtc-client.test.js +10 -6
  4. package/esm/api/agentd.js +2 -2
  5. package/esm/api/amid.js +2 -2
  6. package/esm/api/application.js +2 -2
  7. package/esm/api/auth.js +4 -3
  8. package/esm/api/call-logd.js +4 -4
  9. package/esm/api/calld.js +2 -2
  10. package/esm/api/chatd.js +2 -2
  11. package/esm/api/confd.js +8 -4
  12. package/esm/api/ctid-ng.js +2 -2
  13. package/esm/api/dird.js +2 -2
  14. package/esm/api/webhookd.js +2 -2
  15. package/esm/api-client.js +11 -7
  16. package/esm/checker/Checker.js +11 -7
  17. package/esm/checker/checks/aor.js +11 -7
  18. package/esm/checker/checks/api.js +11 -7
  19. package/esm/checker/checks/ice-ipv4.js +1 -1
  20. package/esm/checker/checks/index.js +12 -8
  21. package/esm/checker/checks/symmetric-nat.js +1 -1
  22. package/esm/checker/checks/wazo-websocket.js +2 -2
  23. package/esm/checker/checks/webrtc-transport.js +12 -8
  24. package/esm/checker/checks/webrtc.js +12 -8
  25. package/esm/domain/AdHocAPIConference.js +11 -7
  26. package/esm/domain/Agent.js +1 -1
  27. package/esm/domain/BadResponse.js +1 -1
  28. package/esm/domain/Call.js +1 -1
  29. package/esm/domain/CallLog.js +3 -3
  30. package/esm/domain/CallSession.js +1 -1
  31. package/esm/domain/ChatMessage.js +1 -1
  32. package/esm/domain/ChatRoom.js +1 -1
  33. package/esm/domain/Contact.js +2 -1
  34. package/esm/domain/Country.js +1 -1
  35. package/esm/domain/Device/DebugDevice.js +1 -1
  36. package/esm/domain/ExternalApp.js +1 -1
  37. package/esm/domain/Features.js +11 -6
  38. package/esm/domain/ForwardOption.js +2 -1
  39. package/esm/domain/IndirectTransfer.js +1 -1
  40. package/esm/domain/Line.js +1 -1
  41. package/esm/domain/Meeting.js +7 -3
  42. package/esm/domain/NotificationOptions.js +1 -1
  43. package/esm/domain/Phone/CTIPhone.js +12 -7
  44. package/esm/domain/Phone/WebRTCPhone.js +3 -2
  45. package/esm/domain/Profile.js +2 -1
  46. package/esm/domain/Recording.js +2 -2
  47. package/esm/domain/Relocation.js +1 -1
  48. package/esm/domain/Room.js +1 -1
  49. package/esm/domain/ServerError.js +1 -1
  50. package/esm/domain/Session.js +2 -2
  51. package/esm/domain/SipLine.js +1 -1
  52. package/esm/domain/Subscription.js +1 -1
  53. package/esm/domain/SwitchboardCall.js +1 -1
  54. package/esm/domain/Voicemail.js +1 -1
  55. package/esm/domain/__tests__/CallLog.test.js +2 -2
  56. package/esm/index.js +12 -8
  57. package/esm/lib/WazoSessionDescriptionHandler.js +3 -2
  58. package/esm/service/CallApi.js +11 -7
  59. package/esm/service/IssueReporter.js +2 -2
  60. package/esm/service/__tests__/IssueReporter.test.js +1 -1
  61. package/esm/service/getApiClient.js +12 -7
  62. package/esm/simple/Auth.js +12 -7
  63. package/esm/simple/Configuration.js +11 -7
  64. package/esm/simple/Directory.js +10 -6
  65. package/esm/simple/Phone.js +11 -7
  66. package/esm/simple/Websocket.js +2 -2
  67. package/esm/simple/index.js +11 -7
  68. package/esm/simple/room/LocalParticipant.js +24 -24
  69. package/esm/simple/room/Participant.js +23 -21
  70. package/esm/simple/room/RemoteParticipant.js +25 -25
  71. package/esm/simple/room/Room.js +24 -21
  72. package/esm/simple/room/SipRoom.js +12 -10
  73. package/esm/simple/room/Stream.js +12 -10
  74. package/esm/simple/room/__tests__/RemoteParticipant.test.js +10 -6
  75. package/esm/simple/utils.js +10 -6
  76. package/esm/utils/Emitter.js +1 -1
  77. package/esm/utils/Heartbeat.js +1 -1
  78. package/esm/utils/__tests__/api-requester.test.js +1 -1
  79. package/esm/utils/api-requester.js +3 -2
  80. package/esm/utils/compare-version.js +1 -1
  81. package/esm/utils/isMobile.js +1 -1
  82. package/esm/utils/new-from.js +1 -1
  83. package/esm/utils/once.js +1 -1
  84. package/esm/utils/update-from.js +1 -1
  85. package/esm/web-rtc-client.js +13 -8
  86. package/esm/websocket-client.js +3 -2
  87. package/lib/__tests__/api-client.test.js +18 -14
  88. package/lib/__tests__/web-rtc-client.test.js +27 -23
  89. package/lib/api/agentd.js +2 -2
  90. package/lib/api/amid.js +2 -2
  91. package/lib/api/application.js +2 -2
  92. package/lib/api/auth.js +3 -3
  93. package/lib/api/call-logd.js +9 -9
  94. package/lib/api/calld.js +5 -5
  95. package/lib/api/chatd.js +3 -3
  96. package/lib/api/confd.js +8 -4
  97. package/lib/api/ctid-ng.js +5 -5
  98. package/lib/api/dird.js +2 -2
  99. package/lib/api/webhookd.js +2 -2
  100. package/lib/api-client.js +18 -14
  101. package/lib/checker/Checker.js +28 -24
  102. package/lib/checker/checks/aor.js +18 -14
  103. package/lib/checker/checks/api.js +18 -14
  104. package/lib/checker/checks/index.js +28 -24
  105. package/lib/checker/checks/wazo-websocket.js +4 -4
  106. package/lib/checker/checks/webrtc-transport.js +27 -23
  107. package/lib/checker/checks/webrtc.js +27 -23
  108. package/lib/domain/AdHocAPIConference.js +18 -14
  109. package/lib/domain/Call.js +1 -1
  110. package/lib/domain/CallLog.js +7 -7
  111. package/lib/domain/ChatMessage.js +1 -1
  112. package/lib/domain/Contact.js +1 -1
  113. package/lib/domain/Features.js +19 -15
  114. package/lib/domain/ForwardOption.js +1 -1
  115. package/lib/domain/Meeting.js +6 -2
  116. package/lib/domain/Phone/CTIPhone.js +20 -16
  117. package/lib/domain/Phone/WebRTCPhone.js +4 -4
  118. package/lib/domain/Profile.js +1 -1
  119. package/lib/domain/Recording.js +3 -3
  120. package/lib/domain/Voicemail.js +1 -1
  121. package/lib/domain/__tests__/Call.test.js +1 -1
  122. package/lib/domain/__tests__/CallLog.test.js +13 -13
  123. package/lib/domain/__tests__/Voicemail.test.js +1 -1
  124. package/lib/index.js +31 -27
  125. package/lib/lib/WazoSessionDescriptionHandler.js +7 -7
  126. package/lib/service/CallApi.js +18 -14
  127. package/lib/service/IssueReporter.js +2 -2
  128. package/lib/service/__tests__/IssueReporter.test.js +2 -2
  129. package/lib/service/getApiClient.js +19 -15
  130. package/lib/simple/Auth.js +30 -26
  131. package/lib/simple/Configuration.js +29 -25
  132. package/lib/simple/Directory.js +18 -14
  133. package/lib/simple/Phone.js +29 -25
  134. package/lib/simple/Websocket.js +4 -4
  135. package/lib/simple/index.js +29 -25
  136. package/lib/simple/room/LocalParticipant.js +43 -43
  137. package/lib/simple/room/Participant.js +41 -39
  138. package/lib/simple/room/RemoteParticipant.js +44 -44
  139. package/lib/simple/room/Room.js +42 -40
  140. package/lib/simple/room/SipRoom.js +31 -29
  141. package/lib/simple/room/Stream.js +31 -29
  142. package/lib/simple/room/__tests__/RemoteParticipant.test.js +29 -25
  143. package/lib/simple/utils.js +29 -25
  144. package/lib/utils/Emitter.js +1 -1
  145. package/lib/utils/PhoneNumberUtil.js +2 -2
  146. package/lib/utils/__tests__/PhoneNumberUtil.test.js +2 -2
  147. package/lib/utils/__tests__/api-requester.test.js +2 -2
  148. package/lib/utils/__tests__/sdp.test.js +12 -12
  149. package/lib/utils/api-requester.js +3 -3
  150. package/lib/utils/sdp.js +10 -10
  151. package/lib/web-rtc-client.js +28 -24
  152. package/lib/websocket-client.js +5 -5
  153. package/package.json +1 -1
  154. package/src/domain/CallLog.js +1 -1
  155. package/src/domain/Meeting.js +6 -2
  156. package/src/domain/Recording.js +1 -1
  157. package/src/service/IssueReporter.js +1 -1
  158. package/src/web-rtc-client.js +1 -1
@@ -1886,7 +1886,7 @@ class IssueReporter {
1886
1886
  payload._retry = retry + 1;
1887
1887
  }
1888
1888
 
1889
- this._sendDebugToGrafana(body, retry + 1);
1889
+ this._sendDebugToGrafana(payload, retry + 1);
1890
1890
  }, 5000 + retry * 1000);
1891
1891
  });
1892
1892
  }
@@ -2604,7 +2604,8 @@ class ExternalApp {
2604
2604
 
2605
2605
 
2606
2606
 
2607
-
2607
+
2608
+
2608
2609
 
2609
2610
 
2610
2611
  class Meeting {
@@ -2616,6 +2617,7 @@ class Meeting {
2616
2617
 
2617
2618
 
2618
2619
 
2620
+
2619
2621
 
2620
2622
 
2621
2623
  static parse(plain ) {
@@ -2627,6 +2629,7 @@ class Meeting {
2627
2629
  port: plain.port,
2628
2630
  uuid: plain.uuid,
2629
2631
  number: plain.number,
2632
+ persistent: plain.persistent,
2630
2633
  });
2631
2634
  }
2632
2635
 
@@ -2634,7 +2637,7 @@ class Meeting {
2634
2637
  return newFrom(meeting, Meeting);
2635
2638
  }
2636
2639
 
2637
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
2640
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
2638
2641
  this.guestSipAuthorization = guestSipAuthorization;
2639
2642
  this.uri = uri;
2640
2643
  this.name = name;
@@ -2642,6 +2645,7 @@ class Meeting {
2642
2645
  this.port = port;
2643
2646
  this.uuid = uuid;
2644
2647
  this.number = number;
2648
+ this.persistent = persistent;
2645
2649
 
2646
2650
  // Useful to compare instead of instanceof with minified code
2647
2651
  this.type = 'Meeting';
@@ -3576,7 +3580,7 @@ class Recording {
3576
3580
 
3577
3581
 
3578
3582
 
3579
- static parseMany(recordings ) {
3583
+ static parseMany(recordings = []) {
3580
3584
  return recordings.map(item => Recording.parse(item));
3581
3585
  }
3582
3586
 
@@ -3702,7 +3706,7 @@ class CallLog {
3702
3706
  duration: (plain.duration || 0) * 1000, // duration is in seconds
3703
3707
  start: moment(plain.start).toDate(),
3704
3708
  end: plain.end ? moment(plain.end).toDate() : null,
3705
- recordings: Recording.parseMany(plain.recordings),
3709
+ recordings: Recording.parseMany(plain.recordings || []),
3706
3710
  });
3707
3711
  }
3708
3712
 
@@ -7028,7 +7032,7 @@ class WebRTCClient extends Emitter {
7028
7032
  // We search for the last transceiver without `video-` in the mid (video- means remote transceiver)
7029
7033
  const transceivers = pc.getTransceivers();
7030
7034
  const transceiverIdx = lastIndexOf(transceivers, transceiver =>
7031
- transceiver.sender.track === null && transceiver.mid.indexOf('video') === -1);
7035
+ transceiver.sender.track === null && transceiver.mid && transceiver.mid.indexOf('video') === -1);
7032
7036
 
7033
7037
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7034
7038
  } else {
@@ -13625,4 +13629,4 @@ if (!global.wazoConfigurationInstance) {
13625
13629
 
13626
13630
  var Configuration$1 = global.wazoConfigurationInstance;
13627
13631
 
13628
- export { Configuration$1 as default };
13632
+ export default Configuration$1;
@@ -382,7 +382,7 @@ class IssueReporter {
382
382
  payload._retry = retry + 1;
383
383
  }
384
384
 
385
- this._sendDebugToGrafana(body, retry + 1);
385
+ this._sendDebugToGrafana(payload, retry + 1);
386
386
  }, 5000 + retry * 1000);
387
387
  });
388
388
  }
@@ -2585,7 +2585,8 @@ class ExternalApp {
2585
2585
 
2586
2586
 
2587
2587
 
2588
-
2588
+
2589
+
2589
2590
 
2590
2591
 
2591
2592
  class Meeting {
@@ -2597,6 +2598,7 @@ class Meeting {
2597
2598
 
2598
2599
 
2599
2600
 
2601
+
2600
2602
 
2601
2603
 
2602
2604
  static parse(plain ) {
@@ -2608,6 +2610,7 @@ class Meeting {
2608
2610
  port: plain.port,
2609
2611
  uuid: plain.uuid,
2610
2612
  number: plain.number,
2613
+ persistent: plain.persistent,
2611
2614
  });
2612
2615
  }
2613
2616
 
@@ -2615,7 +2618,7 @@ class Meeting {
2615
2618
  return newFrom(meeting, Meeting);
2616
2619
  }
2617
2620
 
2618
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
2621
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
2619
2622
  this.guestSipAuthorization = guestSipAuthorization;
2620
2623
  this.uri = uri;
2621
2624
  this.name = name;
@@ -2623,6 +2626,7 @@ class Meeting {
2623
2626
  this.port = port;
2624
2627
  this.uuid = uuid;
2625
2628
  this.number = number;
2629
+ this.persistent = persistent;
2626
2630
 
2627
2631
  // Useful to compare instead of instanceof with minified code
2628
2632
  this.type = 'Meeting';
@@ -3186,7 +3190,7 @@ class Recording {
3186
3190
 
3187
3191
 
3188
3192
 
3189
- static parseMany(recordings ) {
3193
+ static parseMany(recordings = []) {
3190
3194
  return recordings.map(item => Recording.parse(item));
3191
3195
  }
3192
3196
 
@@ -3312,7 +3316,7 @@ class CallLog {
3312
3316
  duration: (plain.duration || 0) * 1000, // duration is in seconds
3313
3317
  start: moment(plain.start).toDate(),
3314
3318
  end: plain.end ? moment(plain.end).toDate() : null,
3315
- recordings: Recording.parseMany(plain.recordings),
3319
+ recordings: Recording.parseMany(plain.recordings || []),
3316
3320
  });
3317
3321
  }
3318
3322
 
@@ -4624,4 +4628,4 @@ if (!global.wazoDirectoryInstance) {
4624
4628
 
4625
4629
  var Directory$1 = global.wazoDirectoryInstance;
4626
4630
 
4627
- export { Directory$1 as default };
4631
+ export default Directory$1;
@@ -963,7 +963,7 @@ class IssueReporter {
963
963
  payload._retry = retry + 1;
964
964
  }
965
965
 
966
- this._sendDebugToGrafana(body, retry + 1);
966
+ this._sendDebugToGrafana(payload, retry + 1);
967
967
  }, 5000 + retry * 1000);
968
968
  });
969
969
  }
@@ -3155,7 +3155,8 @@ class ExternalApp {
3155
3155
 
3156
3156
 
3157
3157
 
3158
-
3158
+
3159
+
3159
3160
 
3160
3161
 
3161
3162
  class Meeting {
@@ -3167,6 +3168,7 @@ class Meeting {
3167
3168
 
3168
3169
 
3169
3170
 
3171
+
3170
3172
 
3171
3173
 
3172
3174
  static parse(plain ) {
@@ -3178,6 +3180,7 @@ class Meeting {
3178
3180
  port: plain.port,
3179
3181
  uuid: plain.uuid,
3180
3182
  number: plain.number,
3183
+ persistent: plain.persistent,
3181
3184
  });
3182
3185
  }
3183
3186
 
@@ -3185,7 +3188,7 @@ class Meeting {
3185
3188
  return newFrom(meeting, Meeting);
3186
3189
  }
3187
3190
 
3188
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
3191
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
3189
3192
  this.guestSipAuthorization = guestSipAuthorization;
3190
3193
  this.uri = uri;
3191
3194
  this.name = name;
@@ -3193,6 +3196,7 @@ class Meeting {
3193
3196
  this.port = port;
3194
3197
  this.uuid = uuid;
3195
3198
  this.number = number;
3199
+ this.persistent = persistent;
3196
3200
 
3197
3201
  // Useful to compare instead of instanceof with minified code
3198
3202
  this.type = 'Meeting';
@@ -3576,7 +3580,7 @@ class Recording {
3576
3580
 
3577
3581
 
3578
3582
 
3579
- static parseMany(recordings ) {
3583
+ static parseMany(recordings = []) {
3580
3584
  return recordings.map(item => Recording.parse(item));
3581
3585
  }
3582
3586
 
@@ -3702,7 +3706,7 @@ class CallLog {
3702
3706
  duration: (plain.duration || 0) * 1000, // duration is in seconds
3703
3707
  start: moment(plain.start).toDate(),
3704
3708
  end: plain.end ? moment(plain.end).toDate() : null,
3705
- recordings: Recording.parseMany(plain.recordings),
3709
+ recordings: Recording.parseMany(plain.recordings || []),
3706
3710
  });
3707
3711
  }
3708
3712
 
@@ -7028,7 +7032,7 @@ class WebRTCClient extends Emitter {
7028
7032
  // We search for the last transceiver without `video-` in the mid (video- means remote transceiver)
7029
7033
  const transceivers = pc.getTransceivers();
7030
7034
  const transceiverIdx = lastIndexOf(transceivers, transceiver =>
7031
- transceiver.sender.track === null && transceiver.mid.indexOf('video') === -1);
7035
+ transceiver.sender.track === null && transceiver.mid && transceiver.mid.indexOf('video') === -1);
7032
7036
 
7033
7037
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7034
7038
  } else {
@@ -13625,4 +13629,4 @@ if (!global.wazoTelephonyInstance) {
13625
13629
 
13626
13630
  var Phone$1 = global.wazoTelephonyInstance;
13627
13631
 
13628
- export { Phone$1 as default };
13632
+ export default Phone$1;
@@ -373,7 +373,7 @@ class IssueReporter {
373
373
  payload._retry = retry + 1;
374
374
  }
375
375
 
376
- this._sendDebugToGrafana(body, retry + 1);
376
+ this._sendDebugToGrafana(payload, retry + 1);
377
377
  }, 5000 + retry * 1000);
378
378
  });
379
379
  }
@@ -1085,4 +1085,4 @@ if (!global.wazoWebsocketInstance) {
1085
1085
 
1086
1086
  var Websocket$1 = global.wazoWebsocketInstance;
1087
1087
 
1088
- export { Websocket$1 as default };
1088
+ export default Websocket$1;
@@ -1886,7 +1886,7 @@ class IssueReporter {
1886
1886
  payload._retry = retry + 1;
1887
1887
  }
1888
1888
 
1889
- this._sendDebugToGrafana(body, retry + 1);
1889
+ this._sendDebugToGrafana(payload, retry + 1);
1890
1890
  }, 5000 + retry * 1000);
1891
1891
  });
1892
1892
  }
@@ -2604,7 +2604,8 @@ class ExternalApp {
2604
2604
 
2605
2605
 
2606
2606
 
2607
-
2607
+
2608
+
2608
2609
 
2609
2610
 
2610
2611
  class Meeting {
@@ -2616,6 +2617,7 @@ class Meeting {
2616
2617
 
2617
2618
 
2618
2619
 
2620
+
2619
2621
 
2620
2622
 
2621
2623
  static parse(plain ) {
@@ -2627,6 +2629,7 @@ class Meeting {
2627
2629
  port: plain.port,
2628
2630
  uuid: plain.uuid,
2629
2631
  number: plain.number,
2632
+ persistent: plain.persistent,
2630
2633
  });
2631
2634
  }
2632
2635
 
@@ -2634,7 +2637,7 @@ class Meeting {
2634
2637
  return newFrom(meeting, Meeting);
2635
2638
  }
2636
2639
 
2637
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
2640
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
2638
2641
  this.guestSipAuthorization = guestSipAuthorization;
2639
2642
  this.uri = uri;
2640
2643
  this.name = name;
@@ -2642,6 +2645,7 @@ class Meeting {
2642
2645
  this.port = port;
2643
2646
  this.uuid = uuid;
2644
2647
  this.number = number;
2648
+ this.persistent = persistent;
2645
2649
 
2646
2650
  // Useful to compare instead of instanceof with minified code
2647
2651
  this.type = 'Meeting';
@@ -3576,7 +3580,7 @@ class Recording {
3576
3580
 
3577
3581
 
3578
3582
 
3579
- static parseMany(recordings ) {
3583
+ static parseMany(recordings = []) {
3580
3584
  return recordings.map(item => Recording.parse(item));
3581
3585
  }
3582
3586
 
@@ -3702,7 +3706,7 @@ class CallLog {
3702
3706
  duration: (plain.duration || 0) * 1000, // duration is in seconds
3703
3707
  start: moment(plain.start).toDate(),
3704
3708
  end: plain.end ? moment(plain.end).toDate() : null,
3705
- recordings: Recording.parseMany(plain.recordings),
3709
+ recordings: Recording.parseMany(plain.recordings || []),
3706
3710
  });
3707
3711
  }
3708
3712
 
@@ -7292,7 +7296,7 @@ class WebRTCClient extends Emitter {
7292
7296
  // We search for the last transceiver without `video-` in the mid (video- means remote transceiver)
7293
7297
  const transceivers = pc.getTransceivers();
7294
7298
  const transceiverIdx = lastIndexOf(transceivers, transceiver =>
7295
- transceiver.sender.track === null && transceiver.mid.indexOf('video') === -1);
7299
+ transceiver.sender.track === null && transceiver.mid && transceiver.mid.indexOf('video') === -1);
7296
7300
 
7297
7301
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7298
7302
  } else {
@@ -13625,4 +13629,4 @@ if (global) {
13625
13629
  global.Wazo = Wazo;
13626
13630
  }
13627
13631
 
13628
- export { Wazo as default };
13632
+ export default Wazo;
@@ -692,7 +692,7 @@ class IssueReporter {
692
692
  payload._retry = retry + 1;
693
693
  }
694
694
 
695
- this._sendDebugToGrafana(body, retry + 1);
695
+ this._sendDebugToGrafana(payload, retry + 1);
696
696
  }, 5000 + retry * 1000);
697
697
  });
698
698
  }
@@ -2630,7 +2630,8 @@ class ExternalApp {
2630
2630
 
2631
2631
 
2632
2632
 
2633
-
2633
+
2634
+
2634
2635
 
2635
2636
 
2636
2637
  class Meeting {
@@ -2642,6 +2643,7 @@ class Meeting {
2642
2643
 
2643
2644
 
2644
2645
 
2646
+
2645
2647
 
2646
2648
 
2647
2649
  static parse(plain ) {
@@ -2653,6 +2655,7 @@ class Meeting {
2653
2655
  port: plain.port,
2654
2656
  uuid: plain.uuid,
2655
2657
  number: plain.number,
2658
+ persistent: plain.persistent,
2656
2659
  });
2657
2660
  }
2658
2661
 
@@ -2660,7 +2663,7 @@ class Meeting {
2660
2663
  return newFrom(meeting, Meeting);
2661
2664
  }
2662
2665
 
2663
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
2666
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
2664
2667
  this.guestSipAuthorization = guestSipAuthorization;
2665
2668
  this.uri = uri;
2666
2669
  this.name = name;
@@ -2668,6 +2671,7 @@ class Meeting {
2668
2671
  this.port = port;
2669
2672
  this.uuid = uuid;
2670
2673
  this.number = number;
2674
+ this.persistent = persistent;
2671
2675
 
2672
2676
  // Useful to compare instead of instanceof with minified code
2673
2677
  this.type = 'Meeting';
@@ -3576,7 +3580,7 @@ class Recording {
3576
3580
 
3577
3581
 
3578
3582
 
3579
- static parseMany(recordings ) {
3583
+ static parseMany(recordings = []) {
3580
3584
  return recordings.map(item => Recording.parse(item));
3581
3585
  }
3582
3586
 
@@ -3702,7 +3706,7 @@ class CallLog {
3702
3706
  duration: (plain.duration || 0) * 1000, // duration is in seconds
3703
3707
  start: moment(plain.start).toDate(),
3704
3708
  end: plain.end ? moment(plain.end).toDate() : null,
3705
- recordings: Recording.parseMany(plain.recordings),
3709
+ recordings: Recording.parseMany(plain.recordings || []),
3706
3710
  });
3707
3711
  }
3708
3712
 
@@ -7292,7 +7296,7 @@ class WebRTCClient extends Emitter {
7292
7296
  // We search for the last transceiver without `video-` in the mid (video- means remote transceiver)
7293
7297
  const transceivers = pc.getTransceivers();
7294
7298
  const transceiverIdx = lastIndexOf(transceivers, transceiver =>
7295
- transceiver.sender.track === null && transceiver.mid.indexOf('video') === -1);
7299
+ transceiver.sender.track === null && transceiver.mid && transceiver.mid.indexOf('video') === -1);
7296
7300
 
7297
7301
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7298
7302
  } else {
@@ -11331,7 +11335,7 @@ var Websocket$1 = global.wazoWebsocketInstance;
11331
11335
 
11332
11336
  const logger$3 = IssueReporter$1.loggerFor('sdk-sip-room');
11333
11337
 
11334
- class SipRoom extends Room$1 {
11338
+ class SipRoom extends Room {
11335
11339
 
11336
11340
  static async connect({ extension, constraints, audioOnly = false, extra, room } ) {
11337
11341
  logger$3.info('connecting to sip room', { extension, audioOnly, room: !!room });
@@ -11661,7 +11665,7 @@ class NotificationOptions {
11661
11665
 
11662
11666
 
11663
11667
  // Represents a conference room, like `9000`.
11664
- class Room$2 {
11668
+ class Room$1 {
11665
11669
 
11666
11670
 
11667
11671
 
@@ -11682,7 +11686,7 @@ class Room$2 {
11682
11686
  }
11683
11687
 
11684
11688
  connect(callSession ) {
11685
- return new Room$2({ ...this, connectedCallSession: callSession });
11689
+ return new Room$1({ ...this, connectedCallSession: callSession });
11686
11690
  }
11687
11691
 
11688
11692
  has(callSession ) {
@@ -11691,7 +11695,7 @@ class Room$2 {
11691
11695
 
11692
11696
  addParticipant(uuid , extension , talking = null) {
11693
11697
  if (!this.participants.some(participant => participant.uuid === uuid || participant.extension === extension)) {
11694
- return new Room$2({ ...this, participants: [...this.participants, { uuid, extension, talking }] });
11698
+ return new Room$1({ ...this, participants: [...this.participants, { uuid, extension, talking }] });
11695
11699
  }
11696
11700
 
11697
11701
  return this;
@@ -11710,7 +11714,7 @@ class Room$2 {
11710
11714
  updatedParticipants.push(participant);
11711
11715
  }
11712
11716
 
11713
- return new Room$2({ ...this, participants: updatedParticipants });
11717
+ return new Room$1({ ...this, participants: updatedParticipants });
11714
11718
  }
11715
11719
 
11716
11720
  updateParticipantByExtension(extension , participant , shouldAdd = false) {
@@ -11726,7 +11730,7 @@ class Room$2 {
11726
11730
  updatedParticipants.push(participant);
11727
11731
  }
11728
11732
 
11729
- return new Room$2({ ...this, participants: updatedParticipants });
11733
+ return new Room$1({ ...this, participants: updatedParticipants });
11730
11734
  }
11731
11735
 
11732
11736
  hasCallWithId(id ) {
@@ -11734,18 +11738,18 @@ class Room$2 {
11734
11738
  }
11735
11739
 
11736
11740
  disconnect() {
11737
- return new Room$2({ ...this, connectedCallSession: null });
11741
+ return new Room$1({ ...this, connectedCallSession: null });
11738
11742
  }
11739
11743
 
11740
11744
  removeParticipantWithUUID(uuid ) {
11741
- return new Room$2({
11745
+ return new Room$1({
11742
11746
  ...this,
11743
11747
  participants: this.participants.filter(participant => participant.uuid !== uuid),
11744
11748
  });
11745
11749
  }
11746
11750
 
11747
11751
  removeParticipantWithExtension(extension ) {
11748
- return new Room$2({
11752
+ return new Room$1({
11749
11753
  ...this,
11750
11754
  participants: this.participants.filter(participant => participant.extension !== extension),
11751
11755
  });
@@ -11756,7 +11760,7 @@ class Room$2 {
11756
11760
  }
11757
11761
 
11758
11762
  static newFrom(room ) {
11759
- return newFrom(room, Room$2);
11763
+ return newFrom(room, Room$1);
11760
11764
  }
11761
11765
  }
11762
11766
 
@@ -12427,10 +12431,10 @@ const Wazo = {
12427
12431
  Auth: Auth$1,
12428
12432
  Phone: Phone$1,
12429
12433
  Websocket: Websocket$1,
12430
- Room: Room$1,
12434
+ Room,
12431
12435
  SipRoom,
12432
12436
  RemoteParticipant,
12433
- LocalParticipant: LocalParticipant$1,
12437
+ LocalParticipant,
12434
12438
  Stream,
12435
12439
  createLocalVideoStream,
12436
12440
  createLocalAudioStream,
@@ -12460,7 +12464,7 @@ const Wazo = {
12460
12464
  Session,
12461
12465
  Voicemail,
12462
12466
  Relocation,
12463
- ConferenceRoom: Room$2,
12467
+ ConferenceRoom: Room$1,
12464
12468
  CallSession,
12465
12469
  IndirectTransfer,
12466
12470
  SwitchboardCall,
@@ -13330,8 +13334,6 @@ class Room extends Emitter {
13330
13334
  }
13331
13335
  }
13332
13336
 
13333
- var Room$1 = Room;
13334
-
13335
13337
  //
13336
13338
 
13337
13339
  const logger = IssueReporter$1.loggerFor('room');
@@ -13627,6 +13629,4 @@ class Participant extends Emitter {
13627
13629
  class LocalParticipant extends Participant {
13628
13630
  }
13629
13631
 
13630
- var LocalParticipant$1 = LocalParticipant;
13631
-
13632
- export { LocalParticipant$1 as default };
13632
+ export default LocalParticipant;