@wazo/sdk 0.37.1 → 0.37.2

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 (105) hide show
  1. package/dist/wazo-sdk.js +5 -5
  2. package/esm/__tests__/api-client.test.js +7 -1
  3. package/esm/__tests__/web-rtc-client.test.js +13 -1
  4. package/esm/api/agentd.js +7 -1
  5. package/esm/api/amid.js +7 -1
  6. package/esm/api/application.js +7 -1
  7. package/esm/api/auth.js +7 -1
  8. package/esm/api/call-logd.js +7 -1
  9. package/esm/api/calld.js +7 -1
  10. package/esm/api/chatd.js +7 -1
  11. package/esm/api/confd.js +7 -1
  12. package/esm/api/ctid-ng.js +7 -1
  13. package/esm/api/dird.js +7 -1
  14. package/esm/api/webhookd.js +7 -1
  15. package/esm/api-client.js +7 -1
  16. package/esm/checker/Checker.js +13 -1
  17. package/esm/checker/checks/aor.js +7 -1
  18. package/esm/checker/checks/api.js +7 -1
  19. package/esm/checker/checks/index.js +13 -1
  20. package/esm/checker/checks/wazo-websocket.js +7 -1
  21. package/esm/checker/checks/webrtc-transport.js +13 -1
  22. package/esm/checker/checks/webrtc.js +13 -1
  23. package/esm/domain/AdHocAPIConference.js +7 -1
  24. package/esm/domain/Features.js +7 -1
  25. package/esm/domain/Phone/CTIPhone.js +11 -1
  26. package/esm/domain/Phone/WebRTCPhone.js +7 -1
  27. package/esm/index.js +5648 -5229
  28. package/esm/lib/WazoSessionDescriptionHandler.js +7 -1
  29. package/esm/service/CallApi.js +7 -1
  30. package/esm/service/IssueReporter.js +7 -1
  31. package/esm/service/__tests__/IssueReporter.test.js +9 -1
  32. package/esm/service/getApiClient.js +7 -1
  33. package/esm/simple/Auth.js +426 -9
  34. package/esm/simple/Configuration.js +426 -9
  35. package/esm/simple/Directory.js +7 -1
  36. package/esm/simple/Phone.js +426 -9
  37. package/esm/simple/Websocket.js +7 -1
  38. package/esm/simple/index.js +426 -9
  39. package/esm/simple/room/LocalParticipant.js +426 -9
  40. package/esm/simple/room/Participant.js +426 -9
  41. package/esm/simple/room/RemoteParticipant.js +426 -9
  42. package/esm/simple/room/Room.js +426 -9
  43. package/esm/simple/room/Stream.js +426 -9
  44. package/esm/simple/room/__tests__/RemoteParticipant.test.js +426 -9
  45. package/esm/simple/utils.js +426 -9
  46. package/esm/utils/__tests__/api-requester.test.js +7 -1
  47. package/esm/utils/api-requester.js +7 -1
  48. package/esm/web-rtc-client.js +13 -1
  49. package/esm/websocket-client.js +7 -1
  50. package/lib/__tests__/api-client.test.js +7 -1
  51. package/lib/__tests__/web-rtc-client.test.js +13 -1
  52. package/lib/api/agentd.js +7 -1
  53. package/lib/api/amid.js +7 -1
  54. package/lib/api/application.js +7 -1
  55. package/lib/api/auth.js +7 -1
  56. package/lib/api/call-logd.js +7 -1
  57. package/lib/api/calld.js +7 -1
  58. package/lib/api/chatd.js +7 -1
  59. package/lib/api/confd.js +7 -1
  60. package/lib/api/ctid-ng.js +7 -1
  61. package/lib/api/dird.js +7 -1
  62. package/lib/api/webhookd.js +7 -1
  63. package/lib/api-client.js +7 -1
  64. package/lib/checker/Checker.js +13 -1
  65. package/lib/checker/checks/aor.js +7 -1
  66. package/lib/checker/checks/api.js +7 -1
  67. package/lib/checker/checks/index.js +13 -1
  68. package/lib/checker/checks/wazo-websocket.js +7 -1
  69. package/lib/checker/checks/webrtc-transport.js +13 -1
  70. package/lib/checker/checks/webrtc.js +13 -1
  71. package/lib/domain/AdHocAPIConference.js +7 -1
  72. package/lib/domain/Features.js +7 -1
  73. package/lib/domain/Phone/CTIPhone.js +11 -1
  74. package/lib/domain/Phone/WebRTCPhone.js +7 -1
  75. package/lib/index.js +5648 -5229
  76. package/lib/lib/WazoSessionDescriptionHandler.js +7 -1
  77. package/lib/service/CallApi.js +7 -1
  78. package/lib/service/IssueReporter.js +7 -1
  79. package/lib/service/__tests__/IssueReporter.test.js +9 -1
  80. package/lib/service/getApiClient.js +7 -1
  81. package/lib/simple/Auth.js +426 -9
  82. package/lib/simple/Configuration.js +426 -9
  83. package/lib/simple/Directory.js +7 -1
  84. package/lib/simple/Phone.js +426 -9
  85. package/lib/simple/Websocket.js +7 -1
  86. package/lib/simple/index.js +426 -9
  87. package/lib/simple/room/LocalParticipant.js +426 -9
  88. package/lib/simple/room/Participant.js +426 -9
  89. package/lib/simple/room/RemoteParticipant.js +426 -9
  90. package/lib/simple/room/Room.js +426 -9
  91. package/lib/simple/room/Stream.js +426 -9
  92. package/lib/simple/room/__tests__/RemoteParticipant.test.js +426 -9
  93. package/lib/simple/utils.js +426 -9
  94. package/lib/utils/__tests__/api-requester.test.js +7 -1
  95. package/lib/utils/api-requester.js +7 -1
  96. package/lib/web-rtc-client.js +13 -1
  97. package/lib/websocket-client.js +7 -1
  98. package/package.json +1 -1
  99. package/src/domain/Phone/CTIPhone.js +4 -0
  100. package/src/domain/Phone/Phone.js +2 -0
  101. package/src/index.js +4 -0
  102. package/src/service/IssueReporter.js +7 -1
  103. package/src/service/__tests__/IssueReporter.test.js +2 -0
  104. package/src/simple/index.js +4 -0
  105. package/src/web-rtc-client.js +6 -0
@@ -309,7 +309,13 @@ class IssueReporter {
309
309
  }
310
310
 
311
311
  _isLevelAbove(level1 , level2 ) {
312
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
312
+ const index1 = LOG_LEVELS.indexOf(level1);
313
+ const index2 = LOG_LEVELS.indexOf(level2);
314
+ if (index1 === -1 || index2 === -1) {
315
+ return false;
316
+ }
317
+
318
+ return index1 > index2;
313
319
  }
314
320
 
315
321
  _makeCategory(category ) {
@@ -591,7 +591,13 @@ class IssueReporter {
591
591
  }
592
592
 
593
593
  _isLevelAbove(level1 , level2 ) {
594
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
594
+ const index1 = LOG_LEVELS.indexOf(level1);
595
+ const index2 = LOG_LEVELS.indexOf(level2);
596
+ if (index1 === -1 || index2 === -1) {
597
+ return false;
598
+ }
599
+
600
+ return index1 > index2;
595
601
  }
596
602
 
597
603
  _makeCategory(category ) {
@@ -5692,6 +5698,9 @@ class WebRTCClient extends Emitter {
5692
5698
  if (!this._isWeb()) {
5693
5699
  options.sessionDescriptionHandlerModifiers = [holdModifier];
5694
5700
  }
5701
+ options.sessionDescriptionHandlerOptions = {
5702
+ constraints: options.constraints,
5703
+ };
5695
5704
 
5696
5705
  // Send re-INVITE
5697
5706
  return session.invite(options);
@@ -5731,6 +5740,9 @@ class WebRTCClient extends Emitter {
5731
5740
  // (eg: holdModifier)
5732
5741
  options.sessionDescriptionHandlerModifiers = [];
5733
5742
  }
5743
+ options.sessionDescriptionHandlerOptions = {
5744
+ constraints: options.constraints,
5745
+ };
5734
5746
 
5735
5747
  // Send re-INVITE
5736
5748
  return session.invite(options);
package/esm/api/agentd.js CHANGED
@@ -305,7 +305,13 @@ class IssueReporter {
305
305
  }
306
306
 
307
307
  _isLevelAbove(level1 , level2 ) {
308
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
308
+ const index1 = LOG_LEVELS.indexOf(level1);
309
+ const index2 = LOG_LEVELS.indexOf(level2);
310
+ if (index1 === -1 || index2 === -1) {
311
+ return false;
312
+ }
313
+
314
+ return index1 > index2;
309
315
  }
310
316
 
311
317
  _makeCategory(category ) {
package/esm/api/amid.js CHANGED
@@ -244,7 +244,13 @@ class IssueReporter {
244
244
  }
245
245
 
246
246
  _isLevelAbove(level1 , level2 ) {
247
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
247
+ const index1 = LOG_LEVELS.indexOf(level1);
248
+ const index2 = LOG_LEVELS.indexOf(level2);
249
+ if (index1 === -1 || index2 === -1) {
250
+ return false;
251
+ }
252
+
253
+ return index1 > index2;
248
254
  }
249
255
 
250
256
  _makeCategory(category ) {
@@ -305,7 +305,13 @@ class IssueReporter {
305
305
  }
306
306
 
307
307
  _isLevelAbove(level1 , level2 ) {
308
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
308
+ const index1 = LOG_LEVELS.indexOf(level1);
309
+ const index2 = LOG_LEVELS.indexOf(level2);
310
+ if (index1 === -1 || index2 === -1) {
311
+ return false;
312
+ }
313
+
314
+ return index1 > index2;
309
315
  }
310
316
 
311
317
  _makeCategory(category ) {
package/esm/api/auth.js CHANGED
@@ -306,7 +306,13 @@ class IssueReporter {
306
306
  }
307
307
 
308
308
  _isLevelAbove(level1 , level2 ) {
309
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
309
+ const index1 = LOG_LEVELS.indexOf(level1);
310
+ const index2 = LOG_LEVELS.indexOf(level2);
311
+ if (index1 === -1 || index2 === -1) {
312
+ return false;
313
+ }
314
+
315
+ return index1 > index2;
310
316
  }
311
317
 
312
318
  _makeCategory(category ) {
@@ -245,7 +245,13 @@ class IssueReporter {
245
245
  }
246
246
 
247
247
  _isLevelAbove(level1 , level2 ) {
248
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
248
+ const index1 = LOG_LEVELS.indexOf(level1);
249
+ const index2 = LOG_LEVELS.indexOf(level2);
250
+ if (index1 === -1 || index2 === -1) {
251
+ return false;
252
+ }
253
+
254
+ return index1 > index2;
249
255
  }
250
256
 
251
257
  _makeCategory(category ) {
package/esm/api/calld.js CHANGED
@@ -306,7 +306,13 @@ class IssueReporter {
306
306
  }
307
307
 
308
308
  _isLevelAbove(level1 , level2 ) {
309
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
309
+ const index1 = LOG_LEVELS.indexOf(level1);
310
+ const index2 = LOG_LEVELS.indexOf(level2);
311
+ if (index1 === -1 || index2 === -1) {
312
+ return false;
313
+ }
314
+
315
+ return index1 > index2;
310
316
  }
311
317
 
312
318
  _makeCategory(category ) {
package/esm/api/chatd.js CHANGED
@@ -305,7 +305,13 @@ class IssueReporter {
305
305
  }
306
306
 
307
307
  _isLevelAbove(level1 , level2 ) {
308
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
308
+ const index1 = LOG_LEVELS.indexOf(level1);
309
+ const index2 = LOG_LEVELS.indexOf(level2);
310
+ if (index1 === -1 || index2 === -1) {
311
+ return false;
312
+ }
313
+
314
+ return index1 > index2;
309
315
  }
310
316
 
311
317
  _makeCategory(category ) {
package/esm/api/confd.js CHANGED
@@ -305,7 +305,13 @@ class IssueReporter {
305
305
  }
306
306
 
307
307
  _isLevelAbove(level1 , level2 ) {
308
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
308
+ const index1 = LOG_LEVELS.indexOf(level1);
309
+ const index2 = LOG_LEVELS.indexOf(level2);
310
+ if (index1 === -1 || index2 === -1) {
311
+ return false;
312
+ }
313
+
314
+ return index1 > index2;
309
315
  }
310
316
 
311
317
  _makeCategory(category ) {
@@ -309,7 +309,13 @@ class IssueReporter {
309
309
  }
310
310
 
311
311
  _isLevelAbove(level1 , level2 ) {
312
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
312
+ const index1 = LOG_LEVELS.indexOf(level1);
313
+ const index2 = LOG_LEVELS.indexOf(level2);
314
+ if (index1 === -1 || index2 === -1) {
315
+ return false;
316
+ }
317
+
318
+ return index1 > index2;
313
319
  }
314
320
 
315
321
  _makeCategory(category ) {
package/esm/api/dird.js CHANGED
@@ -307,7 +307,13 @@ class IssueReporter {
307
307
  }
308
308
 
309
309
  _isLevelAbove(level1 , level2 ) {
310
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
310
+ const index1 = LOG_LEVELS.indexOf(level1);
311
+ const index2 = LOG_LEVELS.indexOf(level2);
312
+ if (index1 === -1 || index2 === -1) {
313
+ return false;
314
+ }
315
+
316
+ return index1 > index2;
311
317
  }
312
318
 
313
319
  _makeCategory(category ) {
@@ -244,7 +244,13 @@ class IssueReporter {
244
244
  }
245
245
 
246
246
  _isLevelAbove(level1 , level2 ) {
247
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
247
+ const index1 = LOG_LEVELS.indexOf(level1);
248
+ const index2 = LOG_LEVELS.indexOf(level2);
249
+ if (index1 === -1 || index2 === -1) {
250
+ return false;
251
+ }
252
+
253
+ return index1 > index2;
248
254
  }
249
255
 
250
256
  _makeCategory(category ) {
package/esm/api-client.js CHANGED
@@ -309,7 +309,13 @@ class IssueReporter {
309
309
  }
310
310
 
311
311
  _isLevelAbove(level1 , level2 ) {
312
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
312
+ const index1 = LOG_LEVELS.indexOf(level1);
313
+ const index2 = LOG_LEVELS.indexOf(level2);
314
+ if (index1 === -1 || index2 === -1) {
315
+ return false;
316
+ }
317
+
318
+ return index1 > index2;
313
319
  }
314
320
 
315
321
  _makeCategory(category ) {
@@ -327,7 +327,13 @@ class IssueReporter {
327
327
  }
328
328
 
329
329
  _isLevelAbove(level1 , level2 ) {
330
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
330
+ const index1 = LOG_LEVELS.indexOf(level1);
331
+ const index2 = LOG_LEVELS.indexOf(level2);
332
+ if (index1 === -1 || index2 === -1) {
333
+ return false;
334
+ }
335
+
336
+ return index1 > index2;
331
337
  }
332
338
 
333
339
  _makeCategory(category ) {
@@ -6271,6 +6277,9 @@ class WebRTCClient extends Emitter {
6271
6277
  if (!this._isWeb()) {
6272
6278
  options.sessionDescriptionHandlerModifiers = [holdModifier];
6273
6279
  }
6280
+ options.sessionDescriptionHandlerOptions = {
6281
+ constraints: options.constraints,
6282
+ };
6274
6283
 
6275
6284
  // Send re-INVITE
6276
6285
  return session.invite(options);
@@ -6310,6 +6319,9 @@ class WebRTCClient extends Emitter {
6310
6319
  // (eg: holdModifier)
6311
6320
  options.sessionDescriptionHandlerModifiers = [];
6312
6321
  }
6322
+ options.sessionDescriptionHandlerOptions = {
6323
+ constraints: options.constraints,
6324
+ };
6313
6325
 
6314
6326
  // Send re-INVITE
6315
6327
  return session.invite(options);
@@ -309,7 +309,13 @@ class IssueReporter {
309
309
  }
310
310
 
311
311
  _isLevelAbove(level1 , level2 ) {
312
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
312
+ const index1 = LOG_LEVELS.indexOf(level1);
313
+ const index2 = LOG_LEVELS.indexOf(level2);
314
+ if (index1 === -1 || index2 === -1) {
315
+ return false;
316
+ }
317
+
318
+ return index1 > index2;
313
319
  }
314
320
 
315
321
  _makeCategory(category ) {
@@ -309,7 +309,13 @@ class IssueReporter {
309
309
  }
310
310
 
311
311
  _isLevelAbove(level1 , level2 ) {
312
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
312
+ const index1 = LOG_LEVELS.indexOf(level1);
313
+ const index2 = LOG_LEVELS.indexOf(level2);
314
+ if (index1 === -1 || index2 === -1) {
315
+ return false;
316
+ }
317
+
318
+ return index1 > index2;
313
319
  }
314
320
 
315
321
  _makeCategory(category ) {
@@ -327,7 +327,13 @@ class IssueReporter {
327
327
  }
328
328
 
329
329
  _isLevelAbove(level1 , level2 ) {
330
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
330
+ const index1 = LOG_LEVELS.indexOf(level1);
331
+ const index2 = LOG_LEVELS.indexOf(level2);
332
+ if (index1 === -1 || index2 === -1) {
333
+ return false;
334
+ }
335
+
336
+ return index1 > index2;
331
337
  }
332
338
 
333
339
  _makeCategory(category ) {
@@ -6271,6 +6277,9 @@ class WebRTCClient extends Emitter {
6271
6277
  if (!this._isWeb()) {
6272
6278
  options.sessionDescriptionHandlerModifiers = [holdModifier];
6273
6279
  }
6280
+ options.sessionDescriptionHandlerOptions = {
6281
+ constraints: options.constraints,
6282
+ };
6274
6283
 
6275
6284
  // Send re-INVITE
6276
6285
  return session.invite(options);
@@ -6310,6 +6319,9 @@ class WebRTCClient extends Emitter {
6310
6319
  // (eg: holdModifier)
6311
6320
  options.sessionDescriptionHandlerModifiers = [];
6312
6321
  }
6322
+ options.sessionDescriptionHandlerOptions = {
6323
+ constraints: options.constraints,
6324
+ };
6313
6325
 
6314
6326
  // Send re-INVITE
6315
6327
  return session.invite(options);
@@ -300,7 +300,13 @@ class IssueReporter {
300
300
  }
301
301
 
302
302
  _isLevelAbove(level1 , level2 ) {
303
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
303
+ const index1 = LOG_LEVELS.indexOf(level1);
304
+ const index2 = LOG_LEVELS.indexOf(level2);
305
+ if (index1 === -1 || index2 === -1) {
306
+ return false;
307
+ }
308
+
309
+ return index1 > index2;
304
310
  }
305
311
 
306
312
  _makeCategory(category ) {
@@ -591,7 +591,13 @@ class IssueReporter {
591
591
  }
592
592
 
593
593
  _isLevelAbove(level1 , level2 ) {
594
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
594
+ const index1 = LOG_LEVELS.indexOf(level1);
595
+ const index2 = LOG_LEVELS.indexOf(level2);
596
+ if (index1 === -1 || index2 === -1) {
597
+ return false;
598
+ }
599
+
600
+ return index1 > index2;
595
601
  }
596
602
 
597
603
  _makeCategory(category ) {
@@ -5692,6 +5698,9 @@ class WebRTCClient extends Emitter {
5692
5698
  if (!this._isWeb()) {
5693
5699
  options.sessionDescriptionHandlerModifiers = [holdModifier];
5694
5700
  }
5701
+ options.sessionDescriptionHandlerOptions = {
5702
+ constraints: options.constraints,
5703
+ };
5695
5704
 
5696
5705
  // Send re-INVITE
5697
5706
  return session.invite(options);
@@ -5731,6 +5740,9 @@ class WebRTCClient extends Emitter {
5731
5740
  // (eg: holdModifier)
5732
5741
  options.sessionDescriptionHandlerModifiers = [];
5733
5742
  }
5743
+ options.sessionDescriptionHandlerOptions = {
5744
+ constraints: options.constraints,
5745
+ };
5734
5746
 
5735
5747
  // Send re-INVITE
5736
5748
  return session.invite(options);
@@ -591,7 +591,13 @@ class IssueReporter {
591
591
  }
592
592
 
593
593
  _isLevelAbove(level1 , level2 ) {
594
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
594
+ const index1 = LOG_LEVELS.indexOf(level1);
595
+ const index2 = LOG_LEVELS.indexOf(level2);
596
+ if (index1 === -1 || index2 === -1) {
597
+ return false;
598
+ }
599
+
600
+ return index1 > index2;
595
601
  }
596
602
 
597
603
  _makeCategory(category ) {
@@ -5692,6 +5698,9 @@ class WebRTCClient extends Emitter {
5692
5698
  if (!this._isWeb()) {
5693
5699
  options.sessionDescriptionHandlerModifiers = [holdModifier];
5694
5700
  }
5701
+ options.sessionDescriptionHandlerOptions = {
5702
+ constraints: options.constraints,
5703
+ };
5695
5704
 
5696
5705
  // Send re-INVITE
5697
5706
  return session.invite(options);
@@ -5731,6 +5740,9 @@ class WebRTCClient extends Emitter {
5731
5740
  // (eg: holdModifier)
5732
5741
  options.sessionDescriptionHandlerModifiers = [];
5733
5742
  }
5743
+ options.sessionDescriptionHandlerOptions = {
5744
+ constraints: options.constraints,
5745
+ };
5734
5746
 
5735
5747
  // Send re-INVITE
5736
5748
  return session.invite(options);
@@ -526,7 +526,13 @@ class IssueReporter {
526
526
  }
527
527
 
528
528
  _isLevelAbove(level1 , level2 ) {
529
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
529
+ const index1 = LOG_LEVELS.indexOf(level1);
530
+ const index2 = LOG_LEVELS.indexOf(level2);
531
+ if (index1 === -1 || index2 === -1) {
532
+ return false;
533
+ }
534
+
535
+ return index1 > index2;
530
536
  }
531
537
 
532
538
  _makeCategory(category ) {
@@ -309,7 +309,13 @@ class IssueReporter {
309
309
  }
310
310
 
311
311
  _isLevelAbove(level1 , level2 ) {
312
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
312
+ const index1 = LOG_LEVELS.indexOf(level1);
313
+ const index2 = LOG_LEVELS.indexOf(level2);
314
+ if (index1 === -1 || index2 === -1) {
315
+ return false;
316
+ }
317
+
318
+ return index1 > index2;
313
319
  }
314
320
 
315
321
  _makeCategory(category ) {
@@ -2676,7 +2676,13 @@ class IssueReporter {
2676
2676
  }
2677
2677
 
2678
2678
  _isLevelAbove(level1 , level2 ) {
2679
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
2679
+ const index1 = LOG_LEVELS.indexOf(level1);
2680
+ const index2 = LOG_LEVELS.indexOf(level2);
2681
+ if (index1 === -1 || index2 === -1) {
2682
+ return false;
2683
+ }
2684
+
2685
+ return index1 > index2;
2680
2686
  }
2681
2687
 
2682
2688
  _makeCategory(category ) {
@@ -5159,6 +5165,10 @@ class CTIPhone extends Emitter {
5159
5165
  return null;
5160
5166
  }
5161
5167
 
5168
+ getLocalVideoStream() {
5169
+ return null;
5170
+ }
5171
+
5162
5172
  setActiveSipSession() {}
5163
5173
 
5164
5174
  isRegistered() {
@@ -653,7 +653,13 @@ class IssueReporter {
653
653
  }
654
654
 
655
655
  _isLevelAbove(level1 , level2 ) {
656
- return LOG_LEVELS.indexOf(level1) > LOG_LEVELS.indexOf(level2);
656
+ const index1 = LOG_LEVELS.indexOf(level1);
657
+ const index2 = LOG_LEVELS.indexOf(level2);
658
+ if (index1 === -1 || index2 === -1) {
659
+ return false;
660
+ }
661
+
662
+ return index1 > index2;
657
663
  }
658
664
 
659
665
  _makeCategory(category ) {