@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
@@ -18,7 +18,8 @@ var newFrom = (instance , ToClass ) => {
18
18
 
19
19
 
20
20
 
21
-
21
+
22
+
22
23
 
23
24
 
24
25
  class Meeting {
@@ -30,6 +31,7 @@ class Meeting {
30
31
 
31
32
 
32
33
 
34
+
33
35
 
34
36
 
35
37
  static parse(plain ) {
@@ -41,6 +43,7 @@ class Meeting {
41
43
  port: plain.port,
42
44
  uuid: plain.uuid,
43
45
  number: plain.number,
46
+ persistent: plain.persistent,
44
47
  });
45
48
  }
46
49
 
@@ -48,7 +51,7 @@ class Meeting {
48
51
  return newFrom(meeting, Meeting);
49
52
  }
50
53
 
51
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
54
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
52
55
  this.guestSipAuthorization = guestSipAuthorization;
53
56
  this.uri = uri;
54
57
  this.name = name;
@@ -56,6 +59,7 @@ class Meeting {
56
59
  this.port = port;
57
60
  this.uuid = uuid;
58
61
  this.number = number;
62
+ this.persistent = persistent;
59
63
 
60
64
  // Useful to compare instead of instanceof with minified code
61
65
  this.type = 'Meeting';
@@ -68,4 +72,4 @@ class Meeting {
68
72
  }
69
73
  }
70
74
 
71
- export { Meeting as default };
75
+ export default Meeting;
@@ -76,4 +76,4 @@ class NotificationOptions {
76
76
  }
77
77
  }
78
78
 
79
- export { NotificationOptions as default };
79
+ export default NotificationOptions;
@@ -1,4 +1,4 @@
1
- import { KEYUTIL, jws, b64utoutf8 } from 'jsrsasign';
1
+ import { jws, b64utoutf8, KEYUTIL } from 'jsrsasign';
2
2
  import moment from 'moment';
3
3
  import { SessionState } from 'sip.js/lib/api/session-state';
4
4
  import EventEmitter from 'events';
@@ -2092,7 +2092,7 @@ class Recording {
2092
2092
 
2093
2093
 
2094
2094
 
2095
- static parseMany(recordings ) {
2095
+ static parseMany(recordings = []) {
2096
2096
  return recordings.map(item => Recording.parse(item));
2097
2097
  }
2098
2098
 
@@ -2218,7 +2218,7 @@ class CallLog {
2218
2218
  duration: (plain.duration || 0) * 1000, // duration is in seconds
2219
2219
  start: moment(plain.start).toDate(),
2220
2220
  end: plain.end ? moment(plain.end).toDate() : null,
2221
- recordings: Recording.parseMany(plain.recordings),
2221
+ recordings: Recording.parseMany(plain.recordings || []),
2222
2222
  });
2223
2223
  }
2224
2224
 
@@ -2762,7 +2762,7 @@ class IssueReporter {
2762
2762
  payload._retry = retry + 1;
2763
2763
  }
2764
2764
 
2765
- this._sendDebugToGrafana(body, retry + 1);
2765
+ this._sendDebugToGrafana(payload, retry + 1);
2766
2766
  }, 5000 + retry * 1000);
2767
2767
  });
2768
2768
  }
@@ -3480,7 +3480,8 @@ class ExternalApp {
3480
3480
 
3481
3481
 
3482
3482
 
3483
-
3483
+
3484
+
3484
3485
 
3485
3486
 
3486
3487
  class Meeting {
@@ -3492,6 +3493,7 @@ class Meeting {
3492
3493
 
3493
3494
 
3494
3495
 
3496
+
3495
3497
 
3496
3498
 
3497
3499
  static parse(plain ) {
@@ -3503,6 +3505,7 @@ class Meeting {
3503
3505
  port: plain.port,
3504
3506
  uuid: plain.uuid,
3505
3507
  number: plain.number,
3508
+ persistent: plain.persistent,
3506
3509
  });
3507
3510
  }
3508
3511
 
@@ -3510,7 +3513,7 @@ class Meeting {
3510
3513
  return newFrom(meeting, Meeting);
3511
3514
  }
3512
3515
 
3513
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
3516
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
3514
3517
  this.guestSipAuthorization = guestSipAuthorization;
3515
3518
  this.uri = uri;
3516
3519
  this.name = name;
@@ -3518,6 +3521,7 @@ class Meeting {
3518
3521
  this.port = port;
3519
3522
  this.uuid = uuid;
3520
3523
  this.number = number;
3524
+ this.persistent = persistent;
3521
3525
 
3522
3526
  // Useful to compare instead of instanceof with minified code
3523
3527
  this.type = 'Meeting';
@@ -5384,4 +5388,5 @@ class CTIPhone extends Emitter {
5384
5388
  useLocalVideoElement() {}
5385
5389
  }
5386
5390
 
5387
- export { TRANSFER_FLOW_ATTENDED, TRANSFER_FLOW_BLIND, CTIPhone as default };
5391
+ export default CTIPhone;
5392
+ export { TRANSFER_FLOW_ATTENDED, TRANSFER_FLOW_BLIND };
@@ -739,7 +739,7 @@ class IssueReporter {
739
739
  payload._retry = retry + 1;
740
740
  }
741
741
 
742
- this._sendDebugToGrafana(body, retry + 1);
742
+ this._sendDebugToGrafana(payload, retry + 1);
743
743
  }, 5000 + retry * 1000);
744
744
  });
745
745
  }
@@ -2490,4 +2490,5 @@ class WebRTCPhone extends Emitter {
2490
2490
  }
2491
2491
  }
2492
2492
 
2493
- export { MESSAGE_TYPE_CHAT, MESSAGE_TYPE_SIGNAL, ON_AUDIO_STREAM, ON_CALL_ACCEPTED, ON_CALL_ANSWERED, ON_CALL_CANCELED, ON_CALL_ENDED, ON_CALL_ENDING, ON_CALL_ERROR, ON_CALL_FAILED, ON_CALL_HELD, ON_CALL_INCOMING, ON_CALL_MUTED, ON_CALL_OUTGOING, ON_CALL_RESUMED, ON_CALL_UNHELD, ON_CALL_UNMUTED, ON_CAMERA_DISABLED, ON_CAMERA_RESUMED, ON_CHAT, ON_DISCONNECTED, ON_MESSAGE, ON_MESSAGE_TRACK_UPDATED, ON_NETWORK_STATS, ON_PLAY_HANGUP_SOUND, ON_PLAY_INBOUND_CALL_SIGNAL_SOUND, ON_PLAY_PROGRESS_SOUND, ON_PLAY_RING_SOUND, ON_PROGRESS, ON_REGISTERED, ON_REINVITE, ON_REMOVE_STREAM, ON_SHARE_SCREEN_ENDED, ON_SHARE_SCREEN_ENDING, ON_SHARE_SCREEN_STARTED, ON_SIGNAL, ON_TERMINATE_SOUND, ON_TRACK, ON_UNREGISTERED, ON_USER_AGENT, ON_VIDEO_INPUT_CHANGE, ON_VIDEO_STREAM, WebRTCPhone as default, events };
2493
+ export default WebRTCPhone;
2494
+ export { MESSAGE_TYPE_CHAT, MESSAGE_TYPE_SIGNAL, ON_AUDIO_STREAM, ON_CALL_ACCEPTED, ON_CALL_ANSWERED, ON_CALL_CANCELED, ON_CALL_ENDED, ON_CALL_ENDING, ON_CALL_ERROR, ON_CALL_FAILED, ON_CALL_HELD, ON_CALL_INCOMING, ON_CALL_MUTED, ON_CALL_OUTGOING, ON_CALL_RESUMED, ON_CALL_UNHELD, ON_CALL_UNMUTED, ON_CAMERA_DISABLED, ON_CAMERA_RESUMED, ON_CHAT, ON_DISCONNECTED, ON_MESSAGE, ON_MESSAGE_TRACK_UPDATED, ON_NETWORK_STATS, ON_PLAY_HANGUP_SOUND, ON_PLAY_INBOUND_CALL_SIGNAL_SOUND, ON_PLAY_PROGRESS_SOUND, ON_PLAY_RING_SOUND, ON_PROGRESS, ON_REGISTERED, ON_REINVITE, ON_REMOVE_STREAM, ON_SHARE_SCREEN_ENDED, ON_SHARE_SCREEN_ENDING, ON_SHARE_SCREEN_STARTED, ON_SIGNAL, ON_TERMINATE_SOUND, ON_TRACK, ON_UNREGISTERED, ON_USER_AGENT, ON_VIDEO_INPUT_CHANGE, ON_VIDEO_STREAM, events };
@@ -399,4 +399,5 @@ class Profile {
399
399
  }
400
400
  }
401
401
 
402
- export { LINE_STATE, STATE, Profile as default };
402
+ export default Profile;
403
+ export { LINE_STATE, STATE };
@@ -25,7 +25,7 @@ class Recording {
25
25
 
26
26
 
27
27
 
28
- static parseMany(recordings ) {
28
+ static parseMany(recordings = []) {
29
29
  return recordings.map(item => Recording.parse(item));
30
30
  }
31
31
 
@@ -48,4 +48,4 @@ class Recording {
48
48
  }
49
49
  }
50
50
 
51
- export { Recording as default };
51
+ export default Recording;
@@ -41,4 +41,4 @@ class Relocation {
41
41
 
42
42
  Relocation.MIN_ENGINE_VERSION_REQUIRED = '19.09';
43
43
 
44
- export { Relocation as default };
44
+ export default Relocation;
@@ -137,4 +137,4 @@ class Room {
137
137
  }
138
138
  }
139
139
 
140
- export { Room as default };
140
+ export default Room;
@@ -59,4 +59,4 @@ class ServerError extends BadResponse {
59
59
  }
60
60
  }
61
61
 
62
- export { ServerError as default };
62
+ export default ServerError;
@@ -1,4 +1,4 @@
1
- import { KEYUTIL, jws, b64utoutf8 } from 'jsrsasign';
1
+ import { jws, b64utoutf8, KEYUTIL } from 'jsrsasign';
2
2
 
3
3
  //
4
4
 
@@ -254,4 +254,4 @@ class Session {
254
254
  }
255
255
  }
256
256
 
257
- export { Session as default };
257
+ export default Session;
@@ -156,4 +156,4 @@ class SipLine {
156
156
  }
157
157
  }
158
158
 
159
- export { SipLine as default };
159
+ export default SipLine;
@@ -83,4 +83,4 @@ class Subscription {
83
83
  }
84
84
  }
85
85
 
86
- export { Subscription as default };
86
+ export default Subscription;
@@ -145,4 +145,4 @@ SwitchboardCall.STATE = {
145
145
  HELD: 'held',
146
146
  };
147
147
 
148
- export { SwitchboardCall as default };
148
+ export default SwitchboardCall;
@@ -120,4 +120,4 @@ class Voicemail {
120
120
  }
121
121
  }
122
122
 
123
- export { Voicemail as default };
123
+ export default Voicemail;
@@ -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
 
package/esm/index.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 { 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';
@@ -402,7 +402,7 @@ class IssueReporter {
402
402
  payload._retry = retry + 1;
403
403
  }
404
404
 
405
- this._sendDebugToGrafana(body, retry + 1);
405
+ this._sendDebugToGrafana(payload, retry + 1);
406
406
  }, 5000 + retry * 1000);
407
407
  });
408
408
  }
@@ -2605,7 +2605,8 @@ class ExternalApp {
2605
2605
 
2606
2606
 
2607
2607
 
2608
-
2608
+
2609
+
2609
2610
 
2610
2611
 
2611
2612
  class Meeting {
@@ -2617,6 +2618,7 @@ class Meeting {
2617
2618
 
2618
2619
 
2619
2620
 
2621
+
2620
2622
 
2621
2623
 
2622
2624
  static parse(plain ) {
@@ -2628,6 +2630,7 @@ class Meeting {
2628
2630
  port: plain.port,
2629
2631
  uuid: plain.uuid,
2630
2632
  number: plain.number,
2633
+ persistent: plain.persistent,
2631
2634
  });
2632
2635
  }
2633
2636
 
@@ -2635,7 +2638,7 @@ class Meeting {
2635
2638
  return newFrom(meeting, Meeting);
2636
2639
  }
2637
2640
 
2638
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
2641
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
2639
2642
  this.guestSipAuthorization = guestSipAuthorization;
2640
2643
  this.uri = uri;
2641
2644
  this.name = name;
@@ -2643,6 +2646,7 @@ class Meeting {
2643
2646
  this.port = port;
2644
2647
  this.uuid = uuid;
2645
2648
  this.number = number;
2649
+ this.persistent = persistent;
2646
2650
 
2647
2651
  // Useful to compare instead of instanceof with minified code
2648
2652
  this.type = 'Meeting';
@@ -3577,7 +3581,7 @@ class Recording {
3577
3581
 
3578
3582
 
3579
3583
 
3580
- static parseMany(recordings ) {
3584
+ static parseMany(recordings = []) {
3581
3585
  return recordings.map(item => Recording.parse(item));
3582
3586
  }
3583
3587
 
@@ -3703,7 +3707,7 @@ class CallLog {
3703
3707
  duration: (plain.duration || 0) * 1000, // duration is in seconds
3704
3708
  start: moment(plain.start).toDate(),
3705
3709
  end: plain.end ? moment(plain.end).toDate() : null,
3706
- recordings: Recording.parseMany(plain.recordings),
3710
+ recordings: Recording.parseMany(plain.recordings || []),
3707
3711
  });
3708
3712
  }
3709
3713
 
@@ -6854,7 +6858,7 @@ class WebRTCClient extends Emitter {
6854
6858
  // We search for the last transceiver without `video-` in the mid (video- means remote transceiver)
6855
6859
  const transceivers = pc.getTransceivers();
6856
6860
  const transceiverIdx = lastIndexOf(transceivers, transceiver =>
6857
- transceiver.sender.track === null && transceiver.mid.indexOf('video') === -1);
6861
+ transceiver.sender.track === null && transceiver.mid && transceiver.mid.indexOf('video') === -1);
6858
6862
 
6859
6863
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
6860
6864
  } else {
@@ -13827,4 +13831,4 @@ var index = {
13827
13831
  Meeting,
13828
13832
  };
13829
13833
 
13830
- export { index as default };
13834
+ export default index;
@@ -349,7 +349,7 @@ class IssueReporter {
349
349
  payload._retry = retry + 1;
350
350
  }
351
351
 
352
- this._sendDebugToGrafana(body, retry + 1);
352
+ this._sendDebugToGrafana(payload, retry + 1);
353
353
  }, 5000 + retry * 1000);
354
354
  });
355
355
  }
@@ -888,4 +888,5 @@ class WazoSessionDescriptionHandler extends SessionDescriptionHandler {
888
888
  }
889
889
  }
890
890
 
891
- export { WazoSessionDescriptionHandler as default, wazoMediaStreamFactory };
891
+ export default WazoSessionDescriptionHandler;
892
+ export { wazoMediaStreamFactory };
@@ -1,5 +1,5 @@
1
1
  import moment from 'moment';
2
- import { KEYUTIL, jws, b64utoutf8 } from 'jsrsasign';
2
+ import { jws, b64utoutf8, KEYUTIL } from 'jsrsasign';
3
3
  import 'sip.js/lib/api/session-state';
4
4
  import { Base64 } from 'js-base64';
5
5
  import 'events';
@@ -1705,7 +1705,7 @@ class Recording {
1705
1705
 
1706
1706
 
1707
1707
 
1708
- static parseMany(recordings ) {
1708
+ static parseMany(recordings = []) {
1709
1709
  return recordings.map(item => Recording.parse(item));
1710
1710
  }
1711
1711
 
@@ -1831,7 +1831,7 @@ class CallLog {
1831
1831
  duration: (plain.duration || 0) * 1000, // duration is in seconds
1832
1832
  start: moment(plain.start).toDate(),
1833
1833
  end: plain.end ? moment(plain.end).toDate() : null,
1834
- recordings: Recording.parseMany(plain.recordings),
1834
+ recordings: Recording.parseMany(plain.recordings || []),
1835
1835
  });
1836
1836
  }
1837
1837
 
@@ -2391,7 +2391,7 @@ class IssueReporter {
2391
2391
  payload._retry = retry + 1;
2392
2392
  }
2393
2393
 
2394
- this._sendDebugToGrafana(body, retry + 1);
2394
+ this._sendDebugToGrafana(payload, retry + 1);
2395
2395
  }, 5000 + retry * 1000);
2396
2396
  });
2397
2397
  }
@@ -3109,7 +3109,8 @@ class ExternalApp {
3109
3109
 
3110
3110
 
3111
3111
 
3112
-
3112
+
3113
+
3113
3114
 
3114
3115
 
3115
3116
  class Meeting {
@@ -3121,6 +3122,7 @@ class Meeting {
3121
3122
 
3122
3123
 
3123
3124
 
3125
+
3124
3126
 
3125
3127
 
3126
3128
  static parse(plain ) {
@@ -3132,6 +3134,7 @@ class Meeting {
3132
3134
  port: plain.port,
3133
3135
  uuid: plain.uuid,
3134
3136
  number: plain.number,
3137
+ persistent: plain.persistent,
3135
3138
  });
3136
3139
  }
3137
3140
 
@@ -3139,7 +3142,7 @@ class Meeting {
3139
3142
  return newFrom(meeting, Meeting);
3140
3143
  }
3141
3144
 
3142
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
3145
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
3143
3146
  this.guestSipAuthorization = guestSipAuthorization;
3144
3147
  this.uri = uri;
3145
3148
  this.name = name;
@@ -3147,6 +3150,7 @@ class Meeting {
3147
3150
  this.port = port;
3148
3151
  this.uuid = uuid;
3149
3152
  this.number = number;
3153
+ this.persistent = persistent;
3150
3154
 
3151
3155
  // Useful to compare instead of instanceof with minified code
3152
3156
  this.type = 'Meeting';
@@ -4689,4 +4693,4 @@ class CallApi {
4689
4693
  }
4690
4694
  }
4691
4695
 
4692
- export { CallApi as default };
4696
+ export default CallApi;
@@ -345,7 +345,7 @@ class IssueReporter {
345
345
  payload._retry = retry + 1;
346
346
  }
347
347
 
348
- this._sendDebugToGrafana(body, retry + 1);
348
+ this._sendDebugToGrafana(payload, retry + 1);
349
349
  }, 5000 + retry * 1000);
350
350
  });
351
351
  }
@@ -367,4 +367,4 @@ class IssueReporter {
367
367
 
368
368
  var IssueReporter$1 = new IssueReporter();
369
369
 
370
- export { IssueReporter$1 as default };
370
+ export default IssueReporter$1;
@@ -345,7 +345,7 @@ class IssueReporter {
345
345
  payload._retry = retry + 1;
346
346
  }
347
347
 
348
- this._sendDebugToGrafana(body, retry + 1);
348
+ this._sendDebugToGrafana(payload, retry + 1);
349
349
  }, 5000 + retry * 1000);
350
350
  });
351
351
  }
@@ -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
 
@@ -4644,4 +4648,5 @@ var getApiClient = (forServer ) => {
4644
4648
  return fillClient(global.wazoClients[server]);
4645
4649
  };
4646
4650
 
4647
- export { getApiClient as default, setApiClientId, setApiToken, setCurrentServer, setFetchOptions, setIsMobile, setOnRefreshToken, setRefreshBackend, setRefreshExpiration, setRefreshToken };
4651
+ export default getApiClient;
4652
+ export { setApiClientId, setApiToken, setCurrentServer, setFetchOptions, setIsMobile, setOnRefreshToken, setRefreshBackend, setRefreshExpiration, setRefreshToken };
@@ -1886,7 +1886,7 @@ class IssueReporter {
1886
1886
  payload._retry = retry + 1;
1887
1887
  }
1888
1888
 
1889
- this._sendDebugToGrafana(body, retry + 1);
1889
+ this._sendDebugToGrafana(payload, retry + 1);
1890
1890
  }, 5000 + retry * 1000);
1891
1891
  });
1892
1892
  }
@@ -2604,7 +2604,8 @@ class ExternalApp {
2604
2604
 
2605
2605
 
2606
2606
 
2607
-
2607
+
2608
+
2608
2609
 
2609
2610
 
2610
2611
  class Meeting {
@@ -2616,6 +2617,7 @@ class Meeting {
2616
2617
 
2617
2618
 
2618
2619
 
2620
+
2619
2621
 
2620
2622
 
2621
2623
  static parse(plain ) {
@@ -2627,6 +2629,7 @@ class Meeting {
2627
2629
  port: plain.port,
2628
2630
  uuid: plain.uuid,
2629
2631
  number: plain.number,
2632
+ persistent: plain.persistent,
2630
2633
  });
2631
2634
  }
2632
2635
 
@@ -2634,7 +2637,7 @@ class Meeting {
2634
2637
  return newFrom(meeting, Meeting);
2635
2638
  }
2636
2639
 
2637
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
2640
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
2638
2641
  this.guestSipAuthorization = guestSipAuthorization;
2639
2642
  this.uri = uri;
2640
2643
  this.name = name;
@@ -2642,6 +2645,7 @@ class Meeting {
2642
2645
  this.port = port;
2643
2646
  this.uuid = uuid;
2644
2647
  this.number = number;
2648
+ this.persistent = persistent;
2645
2649
 
2646
2650
  // Useful to compare instead of instanceof with minified code
2647
2651
  this.type = 'Meeting';
@@ -3576,7 +3580,7 @@ class Recording {
3576
3580
 
3577
3581
 
3578
3582
 
3579
- static parseMany(recordings ) {
3583
+ static parseMany(recordings = []) {
3580
3584
  return recordings.map(item => Recording.parse(item));
3581
3585
  }
3582
3586
 
@@ -3702,7 +3706,7 @@ class CallLog {
3702
3706
  duration: (plain.duration || 0) * 1000, // duration is in seconds
3703
3707
  start: moment(plain.start).toDate(),
3704
3708
  end: plain.end ? moment(plain.end).toDate() : null,
3705
- recordings: Recording.parseMany(plain.recordings),
3709
+ recordings: Recording.parseMany(plain.recordings || []),
3706
3710
  });
3707
3711
  }
3708
3712
 
@@ -7028,7 +7032,7 @@ class WebRTCClient extends Emitter {
7028
7032
  // We search for the last transceiver without `video-` in the mid (video- means remote transceiver)
7029
7033
  const transceivers = pc.getTransceivers();
7030
7034
  const transceiverIdx = lastIndexOf(transceivers, transceiver =>
7031
- transceiver.sender.track === null && transceiver.mid.indexOf('video') === -1);
7035
+ transceiver.sender.track === null && transceiver.mid && transceiver.mid.indexOf('video') === -1);
7032
7036
 
7033
7037
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7034
7038
  } else {
@@ -13625,4 +13629,5 @@ if (!global.wazoAuthInstance) {
13625
13629
 
13626
13630
  var Auth$1 = global.wazoAuthInstance;
13627
13631
 
13628
- export { InvalidAuthorization, InvalidSubscription, Auth$1 as default };
13632
+ export default Auth$1;
13633
+ export { InvalidAuthorization, InvalidSubscription };