@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
@@ -1,6 +1,6 @@
1
1
  import { Base64 } from 'js-base64';
2
2
  import moment from 'moment';
3
- import { KEYUTIL, jws, b64utoutf8 } from 'jsrsasign';
3
+ import { jws, b64utoutf8, KEYUTIL } from 'jsrsasign';
4
4
  import 'sip.js/lib/api/session-state';
5
5
  import 'events';
6
6
  import { jsonToGraphQLQuery } from 'json-to-graphql-query/lib/jsonToGraphQLQuery';
@@ -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
 
@@ -4643,4 +4647,4 @@ var api = {
4643
4647
  },
4644
4648
  };
4645
4649
 
4646
- export { api as default };
4650
+ export default api;
@@ -120,4 +120,4 @@ var iceIpv4 = {
120
120
  }),
121
121
  };
122
122
 
123
- export { iceIpv4 as default };
123
+ export default iceIpv4;
@@ -1,6 +1,6 @@
1
1
  import { Base64 } from 'js-base64';
2
2
  import moment from 'moment';
3
- import { KEYUTIL, jws, b64utoutf8 } from 'jsrsasign';
3
+ import { jws, b64utoutf8, KEYUTIL } from 'jsrsasign';
4
4
  import { SessionState } from 'sip.js/lib/api/session-state';
5
5
  import EventEmitter from 'events';
6
6
  import { jsonToGraphQLQuery } from 'json-to-graphql-query/lib/jsonToGraphQLQuery';
@@ -400,7 +400,7 @@ class IssueReporter {
400
400
  payload._retry = retry + 1;
401
401
  }
402
402
 
403
- this._sendDebugToGrafana(body, retry + 1);
403
+ this._sendDebugToGrafana(payload, retry + 1);
404
404
  }, 5000 + retry * 1000);
405
405
  });
406
406
  }
@@ -2603,7 +2603,8 @@ class ExternalApp {
2603
2603
 
2604
2604
 
2605
2605
 
2606
-
2606
+
2607
+
2607
2608
 
2608
2609
 
2609
2610
  class Meeting {
@@ -2615,6 +2616,7 @@ class Meeting {
2615
2616
 
2616
2617
 
2617
2618
 
2619
+
2618
2620
 
2619
2621
 
2620
2622
  static parse(plain ) {
@@ -2626,6 +2628,7 @@ class Meeting {
2626
2628
  port: plain.port,
2627
2629
  uuid: plain.uuid,
2628
2630
  number: plain.number,
2631
+ persistent: plain.persistent,
2629
2632
  });
2630
2633
  }
2631
2634
 
@@ -2633,7 +2636,7 @@ class Meeting {
2633
2636
  return newFrom(meeting, Meeting);
2634
2637
  }
2635
2638
 
2636
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
2639
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
2637
2640
  this.guestSipAuthorization = guestSipAuthorization;
2638
2641
  this.uri = uri;
2639
2642
  this.name = name;
@@ -2641,6 +2644,7 @@ class Meeting {
2641
2644
  this.port = port;
2642
2645
  this.uuid = uuid;
2643
2646
  this.number = number;
2647
+ this.persistent = persistent;
2644
2648
 
2645
2649
  // Useful to compare instead of instanceof with minified code
2646
2650
  this.type = 'Meeting';
@@ -3230,7 +3234,7 @@ class Recording {
3230
3234
 
3231
3235
 
3232
3236
 
3233
- static parseMany(recordings ) {
3237
+ static parseMany(recordings = []) {
3234
3238
  return recordings.map(item => Recording.parse(item));
3235
3239
  }
3236
3240
 
@@ -3356,7 +3360,7 @@ class CallLog {
3356
3360
  duration: (plain.duration || 0) * 1000, // duration is in seconds
3357
3361
  start: moment(plain.start).toDate(),
3358
3362
  end: plain.end ? moment(plain.end).toDate() : null,
3359
- recordings: Recording.parseMany(plain.recordings),
3363
+ recordings: Recording.parseMany(plain.recordings || []),
3360
3364
  });
3361
3365
  }
3362
3366
 
@@ -6613,7 +6617,7 @@ class WebRTCClient extends Emitter {
6613
6617
  // We search for the last transceiver without `video-` in the mid (video- means remote transceiver)
6614
6618
  const transceivers = pc.getTransceivers();
6615
6619
  const transceiverIdx = lastIndexOf(transceivers, transceiver =>
6616
- transceiver.sender.track === null && transceiver.mid.indexOf('video') === -1);
6620
+ transceiver.sender.track === null && transceiver.mid && transceiver.mid.indexOf('video') === -1);
6617
6621
 
6618
6622
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
6619
6623
  } else {
@@ -8223,4 +8227,4 @@ var index = [
8223
8227
  iceIpv4,
8224
8228
  ];
8225
8229
 
8226
- export { index as default };
8230
+ export default index;
@@ -101,4 +101,4 @@ var symmetricNat = {
101
101
  }),
102
102
  };
103
103
 
104
- export { symmetricNat as default };
104
+ export default symmetricNat;
@@ -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
  }
@@ -968,4 +968,4 @@ var wazoWebsocket = {
968
968
  }),
969
969
  };
970
970
 
971
- export { wazoWebsocket as default };
971
+ export default wazoWebsocket;
@@ -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
 
@@ -6030,7 +6034,7 @@ class WebRTCClient extends Emitter {
6030
6034
  // We search for the last transceiver without `video-` in the mid (video- means remote transceiver)
6031
6035
  const transceivers = pc.getTransceivers();
6032
6036
  const transceiverIdx = lastIndexOf(transceivers, transceiver =>
6033
- transceiver.sender.track === null && transceiver.mid.indexOf('video') === -1);
6037
+ transceiver.sender.track === null && transceiver.mid && transceiver.mid.indexOf('video') === -1);
6034
6038
 
6035
6039
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
6036
6040
  } else {
@@ -7400,4 +7404,4 @@ var webrtcTransport = {
7400
7404
  }),
7401
7405
  };
7402
7406
 
7403
- export { webrtcTransport as default };
7407
+ export default webrtcTransport;
@@ -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
 
@@ -6030,7 +6034,7 @@ class WebRTCClient extends Emitter {
6030
6034
  // We search for the last transceiver without `video-` in the mid (video- means remote transceiver)
6031
6035
  const transceivers = pc.getTransceivers();
6032
6036
  const transceiverIdx = lastIndexOf(transceivers, transceiver =>
6033
- transceiver.sender.track === null && transceiver.mid.indexOf('video') === -1);
6037
+ transceiver.sender.track === null && transceiver.mid && transceiver.mid.indexOf('video') === -1);
6034
6038
 
6035
6039
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
6036
6040
  } else {
@@ -7409,4 +7413,4 @@ var webrtc = {
7409
7413
  }),
7410
7414
  };
7411
7415
 
7412
- export { webrtc as default };
7416
+ export default webrtc;
@@ -1,7 +1,7 @@
1
1
  import 'sip.js/lib/api/session-state';
2
2
  import moment from 'moment';
3
3
  import { Base64 } from 'js-base64';
4
- import { KEYUTIL, jws, b64utoutf8 } from 'jsrsasign';
4
+ import { jws, b64utoutf8, KEYUTIL } from 'jsrsasign';
5
5
  import 'events';
6
6
  import { jsonToGraphQLQuery } from 'json-to-graphql-query/lib/jsonToGraphQLQuery';
7
7
 
@@ -599,7 +599,7 @@ class IssueReporter {
599
599
  payload._retry = retry + 1;
600
600
  }
601
601
 
602
- this._sendDebugToGrafana(body, retry + 1);
602
+ this._sendDebugToGrafana(payload, retry + 1);
603
603
  }, 5000 + retry * 1000);
604
604
  });
605
605
  }
@@ -2791,7 +2791,8 @@ class ExternalApp {
2791
2791
 
2792
2792
 
2793
2793
 
2794
-
2794
+
2795
+
2795
2796
 
2796
2797
 
2797
2798
  class Meeting {
@@ -2803,6 +2804,7 @@ class Meeting {
2803
2804
 
2804
2805
 
2805
2806
 
2807
+
2806
2808
 
2807
2809
 
2808
2810
  static parse(plain ) {
@@ -2814,6 +2816,7 @@ class Meeting {
2814
2816
  port: plain.port,
2815
2817
  uuid: plain.uuid,
2816
2818
  number: plain.number,
2819
+ persistent: plain.persistent,
2817
2820
  });
2818
2821
  }
2819
2822
 
@@ -2821,7 +2824,7 @@ class Meeting {
2821
2824
  return newFrom(meeting, Meeting);
2822
2825
  }
2823
2826
 
2824
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
2827
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
2825
2828
  this.guestSipAuthorization = guestSipAuthorization;
2826
2829
  this.uri = uri;
2827
2830
  this.name = name;
@@ -2829,6 +2832,7 @@ class Meeting {
2829
2832
  this.port = port;
2830
2833
  this.uuid = uuid;
2831
2834
  this.number = number;
2835
+ this.persistent = persistent;
2832
2836
 
2833
2837
  // Useful to compare instead of instanceof with minified code
2834
2838
  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
 
@@ -4783,4 +4787,4 @@ class AdHocAPIConference {
4783
4787
  }
4784
4788
  }
4785
4789
 
4786
- export { AdHocAPIConference as default };
4790
+ export default AdHocAPIConference;
@@ -61,4 +61,4 @@ class Agent {
61
61
  }
62
62
  }
63
63
 
64
- export { Agent as default };
64
+ export default Agent;
@@ -41,4 +41,4 @@ class BadResponse extends Error {
41
41
  }
42
42
  }
43
43
 
44
- export { BadResponse as default };
44
+ export default BadResponse;
@@ -201,4 +201,4 @@ class Call {
201
201
  }
202
202
  }
203
203
 
204
- export { Call as default };
204
+ export default Call;
@@ -53,7 +53,7 @@ class Recording {
53
53
 
54
54
 
55
55
 
56
- static parseMany(recordings ) {
56
+ static parseMany(recordings = []) {
57
57
  return recordings.map(item => Recording.parse(item));
58
58
  }
59
59
 
@@ -179,7 +179,7 @@ class CallLog {
179
179
  duration: (plain.duration || 0) * 1000, // duration is in seconds
180
180
  start: moment(plain.start).toDate(),
181
181
  end: plain.end ? moment(plain.end).toDate() : null,
182
- recordings: Recording.parseMany(plain.recordings),
182
+ recordings: Recording.parseMany(plain.recordings || []),
183
183
  });
184
184
  }
185
185
 
@@ -303,4 +303,4 @@ class CallLog {
303
303
  }
304
304
  }
305
305
 
306
- export { CallLog as default };
306
+ export default CallLog;
@@ -373,4 +373,4 @@ class CallSession {
373
373
  }
374
374
  }
375
375
 
376
- export { CallSession as default };
376
+ export default CallSession;
@@ -101,4 +101,4 @@ class ChatMessage {
101
101
  }
102
102
  }
103
103
 
104
- export { ChatMessage as default };
104
+ export default ChatMessage;
@@ -56,4 +56,4 @@ class ChatRoom {
56
56
  }
57
57
  }
58
58
 
59
- export { ChatRoom as default };
59
+ export default ChatRoom;
@@ -740,4 +740,5 @@ class Contact {
740
740
  }
741
741
  }
742
742
 
743
- export { BACKEND, Contact as default };
743
+ export default Contact;
744
+ export { BACKEND };
@@ -17,4 +17,4 @@ var Country = {
17
17
  SWITZERLAND: 'CH',
18
18
  };
19
19
 
20
- export { Country as default };
20
+ export default Country;
@@ -45,4 +45,4 @@ class DebugDevice {
45
45
  }
46
46
  }
47
47
 
48
- export { DebugDevice as default };
48
+ export default DebugDevice;
@@ -54,4 +54,4 @@ class ExternalApp {
54
54
  }
55
55
  }
56
56
 
57
- export { ExternalApp as default };
57
+ export default ExternalApp;
@@ -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
 
@@ -4674,4 +4678,5 @@ class Features {
4674
4678
 
4675
4679
  var Features$1 = new Features();
4676
4680
 
4677
- export { FEATURES, Features$1 as default, getScopeName };
4681
+ export default Features$1;
4682
+ export { FEATURES, getScopeName };
@@ -68,4 +68,5 @@ class ForwardOption {
68
68
  }
69
69
  }
70
70
 
71
- export { FORWARD_KEYS, ForwardOption as default };
71
+ export default ForwardOption;
72
+ export { FORWARD_KEYS };
@@ -96,4 +96,4 @@ class IndirectTransfer {
96
96
  }
97
97
  }
98
98
 
99
- export { IndirectTransfer as default };
99
+ export default IndirectTransfer;
@@ -87,4 +87,4 @@ class Line {
87
87
  }
88
88
  }
89
89
 
90
- export { Line as default };
90
+ export default Line;