@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
@@ -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
 
@@ -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 {
package/esm/api/agentd.js CHANGED
@@ -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
  }
@@ -801,4 +801,4 @@ var agentd = (client , baseUrl ) => ({
801
801
  ),
802
802
  });
803
803
 
804
- export { agentd as default };
804
+ export default agentd;
package/esm/api/amid.js CHANGED
@@ -317,7 +317,7 @@ class IssueReporter {
317
317
  payload._retry = retry + 1;
318
318
  }
319
319
 
320
- this._sendDebugToGrafana(body, retry + 1);
320
+ this._sendDebugToGrafana(payload, retry + 1);
321
321
  }, 5000 + retry * 1000);
322
322
  });
323
323
  }
@@ -380,4 +380,4 @@ var amid = (client , baseUrl ) => ({
380
380
  },
381
381
  });
382
382
 
383
- export { amid as default };
383
+ export default amid;
@@ -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
  }
@@ -801,4 +801,4 @@ var application = (client , baseUrl ) => ({
801
801
  ApiRequester.successResponseParser),
802
802
  });
803
803
 
804
- export { application as default };
804
+ export default application;
package/esm/api/auth.js CHANGED
@@ -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
 
5
5
  /* */
6
6
 
@@ -379,7 +379,7 @@ class IssueReporter {
379
379
  payload._retry = retry + 1;
380
380
  }
381
381
 
382
- this._sendDebugToGrafana(body, retry + 1);
382
+ this._sendDebugToGrafana(payload, retry + 1);
383
383
  }, 5000 + retry * 1000);
384
384
  });
385
385
  }
@@ -1161,4 +1161,5 @@ var auth = (client , baseUrl ) => ({
1161
1161
  client.delete(`${baseUrl}/users/${userUuid}/external/${provider}`),
1162
1162
  });
1163
1163
 
1164
- export { DETAULT_EXPIRATION, auth as default };
1164
+ export default auth;
1165
+ export { DETAULT_EXPIRATION };
@@ -318,7 +318,7 @@ class IssueReporter {
318
318
  payload._retry = retry + 1;
319
319
  }
320
320
 
321
- this._sendDebugToGrafana(body, retry + 1);
321
+ this._sendDebugToGrafana(payload, retry + 1);
322
322
  }, 5000 + retry * 1000);
323
323
  });
324
324
  }
@@ -420,7 +420,7 @@ class Recording {
420
420
 
421
421
 
422
422
 
423
- static parseMany(recordings ) {
423
+ static parseMany(recordings = []) {
424
424
  return recordings.map(item => Recording.parse(item));
425
425
  }
426
426
 
@@ -546,7 +546,7 @@ class CallLog {
546
546
  duration: (plain.duration || 0) * 1000, // duration is in seconds
547
547
  start: moment(plain.start).toDate(),
548
548
  end: plain.end ? moment(plain.end).toDate() : null,
549
- recordings: Recording.parseMany(plain.recordings),
549
+ recordings: Recording.parseMany(plain.recordings || []),
550
550
  });
551
551
  }
552
552
 
@@ -689,4 +689,4 @@ var callLogd = (client , baseUrl ) => ({
689
689
  client.get(`${baseUrl}/users/me/cdr`, { from: from.toISOString(), number }).then(CallLog.parseMany),
690
690
  });
691
691
 
692
- export { callLogd as default };
692
+ export default callLogd;
package/esm/api/calld.js CHANGED
@@ -379,7 +379,7 @@ class IssueReporter {
379
379
  payload._retry = retry + 1;
380
380
  }
381
381
 
382
- this._sendDebugToGrafana(body, retry + 1);
382
+ this._sendDebugToGrafana(payload, retry + 1);
383
383
  }, 5000 + retry * 1000);
384
384
  });
385
385
  }
@@ -1389,4 +1389,4 @@ var calld = (client , baseUrl ) => ({
1389
1389
 
1390
1390
  });
1391
1391
 
1392
- export { calld as default };
1392
+ export default calld;
package/esm/api/chatd.js CHANGED
@@ -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
  }
@@ -1267,4 +1267,4 @@ var chatd = (client , baseUrl ) => ({
1267
1267
  client.get(`${baseUrl}/users/me/rooms/messages`, options),
1268
1268
  });
1269
1269
 
1270
- export { chatd as default };
1270
+ export default chatd;
package/esm/api/confd.js CHANGED
@@ -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
  }
@@ -1259,7 +1259,8 @@ class ExternalApp {
1259
1259
 
1260
1260
 
1261
1261
 
1262
-
1262
+
1263
+
1263
1264
 
1264
1265
 
1265
1266
  class Meeting {
@@ -1271,6 +1272,7 @@ class Meeting {
1271
1272
 
1272
1273
 
1273
1274
 
1275
+
1274
1276
 
1275
1277
 
1276
1278
  static parse(plain ) {
@@ -1282,6 +1284,7 @@ class Meeting {
1282
1284
  port: plain.port,
1283
1285
  uuid: plain.uuid,
1284
1286
  number: plain.number,
1287
+ persistent: plain.persistent,
1285
1288
  });
1286
1289
  }
1287
1290
 
@@ -1289,7 +1292,7 @@ class Meeting {
1289
1292
  return newFrom(meeting, Meeting);
1290
1293
  }
1291
1294
 
1292
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
1295
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
1293
1296
  this.guestSipAuthorization = guestSipAuthorization;
1294
1297
  this.uri = uri;
1295
1298
  this.name = name;
@@ -1297,6 +1300,7 @@ class Meeting {
1297
1300
  this.port = port;
1298
1301
  this.uuid = uuid;
1299
1302
  this.number = number;
1303
+ this.persistent = persistent;
1300
1304
 
1301
1305
  // Useful to compare instead of instanceof with minified code
1302
1306
  this.type = 'Meeting';
@@ -1387,4 +1391,4 @@ var confd = (client , baseUrl ) => ({
1387
1391
  client.get(`${baseUrl}/guests/me/meetings/${meetingUuid}`, null).then(Meeting.parse),
1388
1392
  });
1389
1393
 
1390
- export { confd as default };
1394
+ export default confd;
@@ -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
  }
@@ -1297,4 +1297,4 @@ var ctidNgMethods = (client , baseUrl ) => ({
1297
1297
 
1298
1298
  });
1299
1299
 
1300
- export { ctidNgMethods as default };
1300
+ export default ctidNgMethods;
package/esm/api/dird.js CHANGED
@@ -380,7 +380,7 @@ class IssueReporter {
380
380
  payload._retry = retry + 1;
381
381
  }
382
382
 
383
- this._sendDebugToGrafana(body, retry + 1);
383
+ this._sendDebugToGrafana(payload, retry + 1);
384
384
  }, 5000 + retry * 1000);
385
385
  });
386
386
  }
@@ -1557,4 +1557,4 @@ var dird = (client , baseUrl ) => ({
1557
1557
 
1558
1558
  });
1559
1559
 
1560
- export { dird as default };
1560
+ export default dird;
@@ -317,7 +317,7 @@ class IssueReporter {
317
317
  payload._retry = retry + 1;
318
318
  }
319
319
 
320
- this._sendDebugToGrafana(body, retry + 1);
320
+ this._sendDebugToGrafana(payload, retry + 1);
321
321
  }, 5000 + retry * 1000);
322
322
  });
323
323
  }
@@ -482,4 +482,4 @@ var webhookd = (client , baseUrl ) => ({
482
482
  client.delete(`${baseUrl}/users/me/subscriptions/${uuid}`),
483
483
  });
484
484
 
485
- export { webhookd as default };
485
+ export default webhookd;
package/esm/api-client.js CHANGED
@@ -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
 
@@ -4568,4 +4572,4 @@ class ApiClient {
4568
4572
  }
4569
4573
  }
4570
4574
 
4571
- export { ApiClient as default };
4575
+ export default ApiClient;
@@ -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 {
@@ -8282,4 +8286,4 @@ class Checker {
8282
8286
  }
8283
8287
  }
8284
8288
 
8285
- export { Checker as default };
8289
+ export default Checker;
@@ -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
 
@@ -4597,4 +4601,4 @@ var aor = {
4597
4601
  },
4598
4602
  };
4599
4603
 
4600
- export { aor as default };
4604
+ export default aor;