@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
 
@@ -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 {
@@ -13504,7 +13508,7 @@ const Wazo = {
13504
13508
  SipRoom,
13505
13509
  RemoteParticipant,
13506
13510
  LocalParticipant,
13507
- Stream: Stream$1,
13511
+ Stream,
13508
13512
  createLocalVideoStream,
13509
13513
  createLocalAudioStream,
13510
13514
  Configuration: Configuration$1,
@@ -13625,6 +13629,4 @@ class Stream {
13625
13629
  }
13626
13630
  }
13627
13631
 
13628
- var Stream$1 = Stream;
13629
-
13630
- export { Stream$1 as default };
13632
+ export default Stream;
@@ -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 {
@@ -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 {
@@ -26,4 +26,4 @@ class Emitter {
26
26
  }
27
27
  }
28
28
 
29
- export { Emitter as default };
29
+ export default Emitter;
@@ -93,4 +93,4 @@ class Heartbeat {
93
93
  }
94
94
  }
95
95
 
96
- export { Heartbeat as default };
96
+ export default Heartbeat;
@@ -378,7 +378,7 @@ class IssueReporter {
378
378
  payload._retry = retry + 1;
379
379
  }
380
380
 
381
- this._sendDebugToGrafana(body, retry + 1);
381
+ this._sendDebugToGrafana(payload, retry + 1);
382
382
  }, 5000 + retry * 1000);
383
383
  });
384
384
  }
@@ -378,7 +378,7 @@ class IssueReporter {
378
378
  payload._retry = retry + 1;
379
379
  }
380
380
 
381
- this._sendDebugToGrafana(body, retry + 1);
381
+ this._sendDebugToGrafana(payload, retry + 1);
382
382
  }, 5000 + retry * 1000);
383
383
  });
384
384
  }
@@ -665,4 +665,5 @@ class ApiRequester {
665
665
  }
666
666
  }
667
667
 
668
- export { ApiRequester as default, realFetch };
668
+ export default ApiRequester;
669
+ export { realFetch };
@@ -17,4 +17,4 @@ const compareVersions = (a, b) => {
17
17
  return segmentsA.length - segmentsB.length;
18
18
  };
19
19
 
20
- export { compareVersions as default };
20
+ export default compareVersions;
@@ -2,4 +2,4 @@
2
2
  /* global navigator */
3
3
  const isMobile = () => typeof navigator !== 'undefined' && navigator.product === 'ReactNative';
4
4
 
5
- export { isMobile as default };
5
+ export default isMobile;
@@ -9,4 +9,4 @@ var newFrom = (instance , ToClass ) => {
9
9
  return new ToClass(args);
10
10
  };
11
11
 
12
- export { newFrom as default };
12
+ export default newFrom;
package/esm/utils/once.js CHANGED
@@ -13,4 +13,4 @@ function once(func ) {
13
13
  };
14
14
  }
15
15
 
16
- export { once as default };
16
+ export default once;
@@ -14,4 +14,4 @@ var updateFrom = (instance , from ) => {
14
14
  });
15
15
  };
16
16
 
17
- export { updateFrom as default };
17
+ export default updateFrom;
@@ -19,7 +19,7 @@ import 'sip.js/lib/platform/web/session-description-handler/session-description-
19
19
  import moment from 'moment';
20
20
  import { Base64 } from 'js-base64';
21
21
  import sdpParser from 'sdp-transform';
22
- import { KEYUTIL, jws, b64utoutf8 } from 'jsrsasign';
22
+ import { jws, b64utoutf8, KEYUTIL } from 'jsrsasign';
23
23
  import { jsonToGraphQLQuery } from 'json-to-graphql-query/lib/jsonToGraphQLQuery';
24
24
 
25
25
  /* */
@@ -664,7 +664,7 @@ class IssueReporter {
664
664
  payload._retry = retry + 1;
665
665
  }
666
666
 
667
- this._sendDebugToGrafana(body, retry + 1);
667
+ this._sendDebugToGrafana(payload, retry + 1);
668
668
  }, 5000 + retry * 1000);
669
669
  });
670
670
  }
@@ -3166,7 +3166,8 @@ class ExternalApp {
3166
3166
 
3167
3167
 
3168
3168
 
3169
-
3169
+
3170
+
3170
3171
 
3171
3172
 
3172
3173
  class Meeting {
@@ -3178,6 +3179,7 @@ class Meeting {
3178
3179
 
3179
3180
 
3180
3181
 
3182
+
3181
3183
 
3182
3184
 
3183
3185
  static parse(plain ) {
@@ -3189,6 +3191,7 @@ class Meeting {
3189
3191
  port: plain.port,
3190
3192
  uuid: plain.uuid,
3191
3193
  number: plain.number,
3194
+ persistent: plain.persistent,
3192
3195
  });
3193
3196
  }
3194
3197
 
@@ -3196,7 +3199,7 @@ class Meeting {
3196
3199
  return newFrom(meeting, Meeting);
3197
3200
  }
3198
3201
 
3199
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
3202
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
3200
3203
  this.guestSipAuthorization = guestSipAuthorization;
3201
3204
  this.uri = uri;
3202
3205
  this.name = name;
@@ -3204,6 +3207,7 @@ class Meeting {
3204
3207
  this.port = port;
3205
3208
  this.uuid = uuid;
3206
3209
  this.number = number;
3210
+ this.persistent = persistent;
3207
3211
 
3208
3212
  // Useful to compare instead of instanceof with minified code
3209
3213
  this.type = 'Meeting';
@@ -3767,7 +3771,7 @@ class Recording {
3767
3771
 
3768
3772
 
3769
3773
 
3770
- static parseMany(recordings ) {
3774
+ static parseMany(recordings = []) {
3771
3775
  return recordings.map(item => Recording.parse(item));
3772
3776
  }
3773
3777
 
@@ -3893,7 +3897,7 @@ class CallLog {
3893
3897
  duration: (plain.duration || 0) * 1000, // duration is in seconds
3894
3898
  start: moment(plain.start).toDate(),
3895
3899
  end: plain.end ? moment(plain.end).toDate() : null,
3896
- recordings: Recording.parseMany(plain.recordings),
3900
+ recordings: Recording.parseMany(plain.recordings || []),
3897
3901
  });
3898
3902
  }
3899
3903
 
@@ -6033,7 +6037,7 @@ class WebRTCClient extends Emitter {
6033
6037
  // We search for the last transceiver without `video-` in the mid (video- means remote transceiver)
6034
6038
  const transceivers = pc.getTransceivers();
6035
6039
  const transceiverIdx = lastIndexOf(transceivers, transceiver =>
6036
- transceiver.sender.track === null && transceiver.mid.indexOf('video') === -1);
6040
+ transceiver.sender.track === null && transceiver.mid && transceiver.mid.indexOf('video') === -1);
6037
6041
 
6038
6042
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
6039
6043
  } else {
@@ -7366,4 +7370,5 @@ class WebRTCClient extends Emitter {
7366
7370
 
7367
7371
  }
7368
7372
 
7369
- export { CanceledCallError, WebRTCClient as default, events, replaceLocalIpModifier, transportEvents };
7373
+ export default WebRTCClient;
7374
+ export { CanceledCallError, events, replaceLocalIpModifier, transportEvents };
@@ -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
  }
@@ -930,4 +930,5 @@ WebSocketClient.eventLists = [
930
930
  CONFERENCE_ADHOC_DELETED,
931
931
  ];
932
932
 
933
- export { AGENT_PAUSED, AGENT_STATUS_UPDATE, AGENT_UNPAUSED, APPLICATION_CALL_ANSWERED, APPLICATION_CALL_DELETED, APPLICATION_CALL_DTMF_RECEIVED, APPLICATION_CALL_ENTERED, APPLICATION_CALL_INITIATED, APPLICATION_CALL_UPDATED, APPLICATION_DESTINATION_NODE_CREATED, APPLICATION_NODE_CREATED, APPLICATION_NODE_DELETED, APPLICATION_NODE_UPDATED, APPLICATION_PLAYBACK_CREATED, APPLICATION_PLAYBACK_DELETED, APPLICATION_PROGRESS_STARTED, APPLICATION_PROGRESS_STOPPED, APPLICATION_SNOOP_CREATED, APPLICATION_SNOOP_DELETED, APPLICATION_SNOOP_UPDATED, APPLICATION_USER_OUTGOING_CALL_CREATED, AUTH_SESSION_EXPIRE_SOON, AUTH_USER_EXTERNAL_AUTH_ADDED, AUTH_USER_EXTERNAL_AUTH_DELETED, CALL_ANSWERED, CALL_CREATED, CALL_DTMF_CREATED, CALL_ENDED, CALL_HELD, CALL_LOG_USER_CREATED, CALL_RESUMED, CALL_UPDATED, CHATD_PRESENCE_UPDATED, CHATD_USER_ROOM_CREATED, CHATD_USER_ROOM_MESSAGE_CREATED, CHAT_MESSAGE_RECEIVED, CHAT_MESSAGE_SENT, CONFERENCE_ADHOC_DELETED, CONFERENCE_ADHOC_PARTICIPANT_LEFT, CONFERENCE_USER_PARTICIPANT_JOINED, CONFERENCE_USER_PARTICIPANT_LEFT, CONFERENCE_USER_PARTICIPANT_TALK_STARTED, CONFERENCE_USER_PARTICIPANT_TALK_STOPPED, ENDPOINT_STATUS_UPDATE, FAVORITE_ADDED, FAVORITE_DELETED, FAX_OUTBOUND_USER_CREATED, FAX_OUTBOUND_USER_FAILED, FAX_OUTBOUND_USER_SUCCEEDED, HEARTBEAT_ENGINE_VERSION, LINE_STATUS_UPDATED, MEETING_USER_PARTICIPANT_JOINED, MEETING_USER_PARTICIPANT_LEFT, SOCKET_EVENTS, SWITCHBOARD_HELD_CALLS_UPDATED, SWITCHBOARD_HELD_CALL_ANSWERED, SWITCHBOARD_QUEUED_CALLS_UPDATED, SWITCHBOARD_QUEUED_CALL_ANSWERED, TRUNK_STATUS_UPDATED, USERS_FORWARDS_BUSY_UPDATED, USERS_FORWARDS_NOANSWER_UPDATED, USERS_FORWARDS_UNCONDITIONAL_UPDATED, USERS_SERVICES_DND_UPDATED, USER_STATUS_UPDATE, USER_VOICEMAIL_MESSAGE_CREATED, USER_VOICEMAIL_MESSAGE_DELETED, USER_VOICEMAIL_MESSAGE_UPDATED, WebSocketClient as default };
933
+ export default WebSocketClient;
934
+ export { AGENT_PAUSED, AGENT_STATUS_UPDATE, AGENT_UNPAUSED, APPLICATION_CALL_ANSWERED, APPLICATION_CALL_DELETED, APPLICATION_CALL_DTMF_RECEIVED, APPLICATION_CALL_ENTERED, APPLICATION_CALL_INITIATED, APPLICATION_CALL_UPDATED, APPLICATION_DESTINATION_NODE_CREATED, APPLICATION_NODE_CREATED, APPLICATION_NODE_DELETED, APPLICATION_NODE_UPDATED, APPLICATION_PLAYBACK_CREATED, APPLICATION_PLAYBACK_DELETED, APPLICATION_PROGRESS_STARTED, APPLICATION_PROGRESS_STOPPED, APPLICATION_SNOOP_CREATED, APPLICATION_SNOOP_DELETED, APPLICATION_SNOOP_UPDATED, APPLICATION_USER_OUTGOING_CALL_CREATED, AUTH_SESSION_EXPIRE_SOON, AUTH_USER_EXTERNAL_AUTH_ADDED, AUTH_USER_EXTERNAL_AUTH_DELETED, CALL_ANSWERED, CALL_CREATED, CALL_DTMF_CREATED, CALL_ENDED, CALL_HELD, CALL_LOG_USER_CREATED, CALL_RESUMED, CALL_UPDATED, CHATD_PRESENCE_UPDATED, CHATD_USER_ROOM_CREATED, CHATD_USER_ROOM_MESSAGE_CREATED, CHAT_MESSAGE_RECEIVED, CHAT_MESSAGE_SENT, CONFERENCE_ADHOC_DELETED, CONFERENCE_ADHOC_PARTICIPANT_LEFT, CONFERENCE_USER_PARTICIPANT_JOINED, CONFERENCE_USER_PARTICIPANT_LEFT, CONFERENCE_USER_PARTICIPANT_TALK_STARTED, CONFERENCE_USER_PARTICIPANT_TALK_STOPPED, ENDPOINT_STATUS_UPDATE, FAVORITE_ADDED, FAVORITE_DELETED, FAX_OUTBOUND_USER_CREATED, FAX_OUTBOUND_USER_FAILED, FAX_OUTBOUND_USER_SUCCEEDED, HEARTBEAT_ENGINE_VERSION, LINE_STATUS_UPDATED, MEETING_USER_PARTICIPANT_JOINED, MEETING_USER_PARTICIPANT_LEFT, SOCKET_EVENTS, SWITCHBOARD_HELD_CALLS_UPDATED, SWITCHBOARD_HELD_CALL_ANSWERED, SWITCHBOARD_QUEUED_CALLS_UPDATED, SWITCHBOARD_QUEUED_CALL_ANSWERED, TRUNK_STATUS_UPDATED, USERS_FORWARDS_BUSY_UPDATED, USERS_FORWARDS_NOANSWER_UPDATED, USERS_FORWARDS_UNCONDITIONAL_UPDATED, USERS_SERVICES_DND_UPDATED, USER_STATUS_UPDATE, USER_VOICEMAIL_MESSAGE_CREATED, USER_VOICEMAIL_MESSAGE_DELETED, USER_VOICEMAIL_MESSAGE_UPDATED };
@@ -211,7 +211,7 @@ class IssueReporter {
211
211
  args.splice(1, 1);
212
212
  }
213
213
 
214
- const date = moment__default["default"]().format('YYYY-MM-DD HH:mm:ss.SSS');
214
+ const date = moment__default['default']().format('YYYY-MM-DD HH:mm:ss.SSS');
215
215
  const message = args.join(', ');
216
216
  let consoleMessage = message;
217
217
 
@@ -388,7 +388,7 @@ class IssueReporter {
388
388
  payload._retry = retry + 1;
389
389
  }
390
390
 
391
- this._sendDebugToGrafana(body, retry + 1);
391
+ this._sendDebugToGrafana(payload, retry + 1);
392
392
  }, 5000 + retry * 1000);
393
393
  });
394
394
  }
@@ -2591,7 +2591,8 @@ class ExternalApp {
2591
2591
 
2592
2592
 
2593
2593
 
2594
-
2594
+
2595
+
2595
2596
 
2596
2597
 
2597
2598
  class Meeting {
@@ -2603,6 +2604,7 @@ class Meeting {
2603
2604
 
2604
2605
 
2605
2606
 
2607
+
2606
2608
 
2607
2609
 
2608
2610
  static parse(plain ) {
@@ -2614,6 +2616,7 @@ class Meeting {
2614
2616
  port: plain.port,
2615
2617
  uuid: plain.uuid,
2616
2618
  number: plain.number,
2619
+ persistent: plain.persistent,
2617
2620
  });
2618
2621
  }
2619
2622
 
@@ -2621,7 +2624,7 @@ class Meeting {
2621
2624
  return newFrom(meeting, Meeting);
2622
2625
  }
2623
2626
 
2624
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
2627
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
2625
2628
  this.guestSipAuthorization = guestSipAuthorization;
2626
2629
  this.uri = uri;
2627
2630
  this.name = name;
@@ -2629,6 +2632,7 @@ class Meeting {
2629
2632
  this.port = port;
2630
2633
  this.uuid = uuid;
2631
2634
  this.number = number;
2635
+ this.persistent = persistent;
2632
2636
 
2633
2637
  // Useful to compare instead of instanceof with minified code
2634
2638
  this.type = 'Meeting';
@@ -2809,7 +2813,7 @@ class ChatMessage {
2809
2813
  static parse(plain ) {
2810
2814
  return new ChatMessage({
2811
2815
  uuid: plain.uuid,
2812
- date: moment__default["default"](plain.created_at).toDate(),
2816
+ date: moment__default['default'](plain.created_at).toDate(),
2813
2817
  content: plain.content,
2814
2818
  alias: plain.alias,
2815
2819
  userUuid: plain.user_uuid,
@@ -2901,7 +2905,7 @@ class Voicemail {
2901
2905
  static parse(plain ) {
2902
2906
  return new Voicemail({
2903
2907
  id: plain.id,
2904
- date: moment__default["default"](plain.timestamp * 1000).toDate(),
2908
+ date: moment__default['default'](plain.timestamp * 1000).toDate(),
2905
2909
  duration: plain.duration * 1000,
2906
2910
  caller: {
2907
2911
  name: plain.caller_id_name,
@@ -3038,7 +3042,7 @@ class Call {
3038
3042
  onHold: plain.on_hold,
3039
3043
  status: plain.status,
3040
3044
  lineId: plain.line_id,
3041
- startingTime: moment__default["default"](plain.creation_time).toDate(),
3045
+ startingTime: moment__default['default'](plain.creation_time).toDate(),
3042
3046
  talkingToIds: Object.keys(plain.talking_to || {}),
3043
3047
  recording: plain.record_state === RECORD_STATE_ACTIVE,
3044
3048
  });
@@ -3192,7 +3196,7 @@ class Recording {
3192
3196
 
3193
3197
 
3194
3198
 
3195
- static parseMany(recordings ) {
3199
+ static parseMany(recordings = []) {
3196
3200
  return recordings.map(item => Recording.parse(item));
3197
3201
  }
3198
3202
 
@@ -3200,8 +3204,8 @@ class Recording {
3200
3204
  return new Recording({
3201
3205
  deleted: plain.deleted,
3202
3206
  fileName: plain.filename,
3203
- end: plain.end_time ? moment__default["default"](plain.end_time).toDate() : null,
3204
- start: moment__default["default"](plain.start_time).toDate(),
3207
+ end: plain.end_time ? moment__default['default'](plain.end_time).toDate() : null,
3208
+ start: moment__default['default'](plain.start_time).toDate(),
3205
3209
  uuid: plain.uuid,
3206
3210
  });
3207
3211
  }
@@ -3299,7 +3303,7 @@ class CallLog {
3299
3303
 
3300
3304
  static parse(plain ) {
3301
3305
  return new CallLog({
3302
- answer: plain.answer ? moment__default["default"](plain.answer).toDate() : null,
3306
+ answer: plain.answer ? moment__default['default'](plain.answer).toDate() : null,
3303
3307
  answered: plain.answered,
3304
3308
  callDirection: plain.call_direction,
3305
3309
  destination: {
@@ -3316,9 +3320,9 @@ class CallLog {
3316
3320
  },
3317
3321
  id: plain.id,
3318
3322
  duration: (plain.duration || 0) * 1000, // duration is in seconds
3319
- start: moment__default["default"](plain.start).toDate(),
3320
- end: plain.end ? moment__default["default"](plain.end).toDate() : null,
3321
- recordings: Recording.parseMany(plain.recordings),
3323
+ start: moment__default['default'](plain.start).toDate(),
3324
+ end: plain.end ? moment__default['default'](plain.end).toDate() : null,
3325
+ recordings: Recording.parseMany(plain.recordings || []),
3322
3326
  });
3323
3327
  }
3324
3328