@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
@@ -99,7 +99,7 @@ class Call {
99
99
  onHold: plain.on_hold,
100
100
  status: plain.status,
101
101
  lineId: plain.line_id,
102
- startingTime: moment__default["default"](plain.creation_time).toDate(),
102
+ startingTime: moment__default['default'](plain.creation_time).toDate(),
103
103
  talkingToIds: Object.keys(plain.talking_to || {}),
104
104
  recording: plain.record_state === RECORD_STATE_ACTIVE,
105
105
  });
@@ -428,7 +428,7 @@ class IssueReporter {
428
428
  args.splice(1, 1);
429
429
  }
430
430
 
431
- const date = moment__default["default"]().format('YYYY-MM-DD HH:mm:ss.SSS');
431
+ const date = moment__default['default']().format('YYYY-MM-DD HH:mm:ss.SSS');
432
432
  const message = args.join(', ');
433
433
  let consoleMessage = message;
434
434
 
@@ -605,7 +605,7 @@ class IssueReporter {
605
605
  payload._retry = retry + 1;
606
606
  }
607
607
 
608
- this._sendDebugToGrafana(body, retry + 1);
608
+ this._sendDebugToGrafana(payload, retry + 1);
609
609
  }, 5000 + retry * 1000);
610
610
  });
611
611
  }
@@ -2797,7 +2797,8 @@ class ExternalApp {
2797
2797
 
2798
2798
 
2799
2799
 
2800
-
2800
+
2801
+
2801
2802
 
2802
2803
 
2803
2804
  class Meeting {
@@ -2809,6 +2810,7 @@ class Meeting {
2809
2810
 
2810
2811
 
2811
2812
 
2813
+
2812
2814
 
2813
2815
 
2814
2816
  static parse(plain ) {
@@ -2820,6 +2822,7 @@ class Meeting {
2820
2822
  port: plain.port,
2821
2823
  uuid: plain.uuid,
2822
2824
  number: plain.number,
2825
+ persistent: plain.persistent,
2823
2826
  });
2824
2827
  }
2825
2828
 
@@ -2827,7 +2830,7 @@ class Meeting {
2827
2830
  return newFrom(meeting, Meeting);
2828
2831
  }
2829
2832
 
2830
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
2833
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
2831
2834
  this.guestSipAuthorization = guestSipAuthorization;
2832
2835
  this.uri = uri;
2833
2836
  this.name = name;
@@ -2835,6 +2838,7 @@ class Meeting {
2835
2838
  this.port = port;
2836
2839
  this.uuid = uuid;
2837
2840
  this.number = number;
2841
+ this.persistent = persistent;
2838
2842
 
2839
2843
  // Useful to compare instead of instanceof with minified code
2840
2844
  this.type = 'Meeting';
@@ -3015,7 +3019,7 @@ class ChatMessage {
3015
3019
  static parse(plain ) {
3016
3020
  return new ChatMessage({
3017
3021
  uuid: plain.uuid,
3018
- date: moment__default["default"](plain.created_at).toDate(),
3022
+ date: moment__default['default'](plain.created_at).toDate(),
3019
3023
  content: plain.content,
3020
3024
  alias: plain.alias,
3021
3025
  userUuid: plain.user_uuid,
@@ -3107,7 +3111,7 @@ class Voicemail {
3107
3111
  static parse(plain ) {
3108
3112
  return new Voicemail({
3109
3113
  id: plain.id,
3110
- date: moment__default["default"](plain.timestamp * 1000).toDate(),
3114
+ date: moment__default['default'](plain.timestamp * 1000).toDate(),
3111
3115
  duration: plain.duration * 1000,
3112
3116
  caller: {
3113
3117
  name: plain.caller_id_name,
@@ -3192,7 +3196,7 @@ class Recording {
3192
3196
 
3193
3197
 
3194
3198
 
3195
- static parseMany(recordings ) {
3199
+ static parseMany(recordings = []) {
3196
3200
  return recordings.map(item => Recording.parse(item));
3197
3201
  }
3198
3202
 
@@ -3200,8 +3204,8 @@ class Recording {
3200
3204
  return new Recording({
3201
3205
  deleted: plain.deleted,
3202
3206
  fileName: plain.filename,
3203
- end: plain.end_time ? moment__default["default"](plain.end_time).toDate() : null,
3204
- start: moment__default["default"](plain.start_time).toDate(),
3207
+ end: plain.end_time ? moment__default['default'](plain.end_time).toDate() : null,
3208
+ start: moment__default['default'](plain.start_time).toDate(),
3205
3209
  uuid: plain.uuid,
3206
3210
  });
3207
3211
  }
@@ -3299,7 +3303,7 @@ class CallLog {
3299
3303
 
3300
3304
  static parse(plain ) {
3301
3305
  return new CallLog({
3302
- answer: plain.answer ? moment__default["default"](plain.answer).toDate() : null,
3306
+ answer: plain.answer ? moment__default['default'](plain.answer).toDate() : null,
3303
3307
  answered: plain.answered,
3304
3308
  callDirection: plain.call_direction,
3305
3309
  destination: {
@@ -3316,9 +3320,9 @@ class CallLog {
3316
3320
  },
3317
3321
  id: plain.id,
3318
3322
  duration: (plain.duration || 0) * 1000, // duration is in seconds
3319
- start: moment__default["default"](plain.start).toDate(),
3320
- end: plain.end ? moment__default["default"](plain.end).toDate() : null,
3321
- recordings: Recording.parseMany(plain.recordings),
3323
+ start: moment__default['default'](plain.start).toDate(),
3324
+ end: plain.end ? moment__default['default'](plain.end).toDate() : null,
3325
+ recordings: Recording.parseMany(plain.recordings || []),
3322
3326
  });
3323
3327
  }
3324
3328
 
@@ -94,7 +94,7 @@ class Call {
94
94
  onHold: plain.on_hold,
95
95
  status: plain.status,
96
96
  lineId: plain.line_id,
97
- startingTime: moment__default["default"](plain.creation_time).toDate(),
97
+ startingTime: moment__default['default'](plain.creation_time).toDate(),
98
98
  talkingToIds: Object.keys(plain.talking_to || {}),
99
99
  recording: plain.record_state === RECORD_STATE_ACTIVE,
100
100
  });
@@ -59,7 +59,7 @@ class Recording {
59
59
 
60
60
 
61
61
 
62
- static parseMany(recordings ) {
62
+ static parseMany(recordings = []) {
63
63
  return recordings.map(item => Recording.parse(item));
64
64
  }
65
65
 
@@ -67,8 +67,8 @@ class Recording {
67
67
  return new Recording({
68
68
  deleted: plain.deleted,
69
69
  fileName: plain.filename,
70
- end: plain.end_time ? moment__default["default"](plain.end_time).toDate() : null,
71
- start: moment__default["default"](plain.start_time).toDate(),
70
+ end: plain.end_time ? moment__default['default'](plain.end_time).toDate() : null,
71
+ start: moment__default['default'](plain.start_time).toDate(),
72
72
  uuid: plain.uuid,
73
73
  });
74
74
  }
@@ -166,7 +166,7 @@ class CallLog {
166
166
 
167
167
  static parse(plain ) {
168
168
  return new CallLog({
169
- answer: plain.answer ? moment__default["default"](plain.answer).toDate() : null,
169
+ answer: plain.answer ? moment__default['default'](plain.answer).toDate() : null,
170
170
  answered: plain.answered,
171
171
  callDirection: plain.call_direction,
172
172
  destination: {
@@ -183,9 +183,9 @@ class CallLog {
183
183
  },
184
184
  id: plain.id,
185
185
  duration: (plain.duration || 0) * 1000, // duration is in seconds
186
- start: moment__default["default"](plain.start).toDate(),
187
- end: plain.end ? moment__default["default"](plain.end).toDate() : null,
188
- recordings: Recording.parseMany(plain.recordings),
186
+ start: moment__default['default'](plain.start).toDate(),
187
+ end: plain.end ? moment__default['default'](plain.end).toDate() : null,
188
+ recordings: Recording.parseMany(plain.recordings || []),
189
189
  });
190
190
  }
191
191
 
@@ -64,7 +64,7 @@ class ChatMessage {
64
64
  static parse(plain ) {
65
65
  return new ChatMessage({
66
66
  uuid: plain.uuid,
67
- date: moment__default["default"](plain.created_at).toDate(),
67
+ date: moment__default['default'](plain.created_at).toDate(),
68
68
  content: plain.content,
69
69
  alias: plain.alias,
70
70
  userUuid: plain.user_uuid,
@@ -745,4 +745,4 @@ class Contact {
745
745
  }
746
746
 
747
747
  exports.BACKEND = BACKEND;
748
- exports["default"] = Contact;
748
+ exports.default = Contact;
@@ -213,7 +213,7 @@ class IssueReporter {
213
213
  args.splice(1, 1);
214
214
  }
215
215
 
216
- const date = moment__default["default"]().format('YYYY-MM-DD HH:mm:ss.SSS');
216
+ const date = moment__default['default']().format('YYYY-MM-DD HH:mm:ss.SSS');
217
217
  const message = args.join(', ');
218
218
  let consoleMessage = message;
219
219
 
@@ -390,7 +390,7 @@ class IssueReporter {
390
390
  payload._retry = retry + 1;
391
391
  }
392
392
 
393
- this._sendDebugToGrafana(body, retry + 1);
393
+ this._sendDebugToGrafana(payload, retry + 1);
394
394
  }, 5000 + retry * 1000);
395
395
  });
396
396
  }
@@ -2593,7 +2593,8 @@ class ExternalApp {
2593
2593
 
2594
2594
 
2595
2595
 
2596
-
2596
+
2597
+
2597
2598
 
2598
2599
 
2599
2600
  class Meeting {
@@ -2605,6 +2606,7 @@ class Meeting {
2605
2606
 
2606
2607
 
2607
2608
 
2609
+
2608
2610
 
2609
2611
 
2610
2612
  static parse(plain ) {
@@ -2616,6 +2618,7 @@ class Meeting {
2616
2618
  port: plain.port,
2617
2619
  uuid: plain.uuid,
2618
2620
  number: plain.number,
2621
+ persistent: plain.persistent,
2619
2622
  });
2620
2623
  }
2621
2624
 
@@ -2623,7 +2626,7 @@ class Meeting {
2623
2626
  return newFrom(meeting, Meeting);
2624
2627
  }
2625
2628
 
2626
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
2629
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
2627
2630
  this.guestSipAuthorization = guestSipAuthorization;
2628
2631
  this.uri = uri;
2629
2632
  this.name = name;
@@ -2631,6 +2634,7 @@ class Meeting {
2631
2634
  this.port = port;
2632
2635
  this.uuid = uuid;
2633
2636
  this.number = number;
2637
+ this.persistent = persistent;
2634
2638
 
2635
2639
  // Useful to compare instead of instanceof with minified code
2636
2640
  this.type = 'Meeting';
@@ -2811,7 +2815,7 @@ class ChatMessage {
2811
2815
  static parse(plain ) {
2812
2816
  return new ChatMessage({
2813
2817
  uuid: plain.uuid,
2814
- date: moment__default["default"](plain.created_at).toDate(),
2818
+ date: moment__default['default'](plain.created_at).toDate(),
2815
2819
  content: plain.content,
2816
2820
  alias: plain.alias,
2817
2821
  userUuid: plain.user_uuid,
@@ -2903,7 +2907,7 @@ class Voicemail {
2903
2907
  static parse(plain ) {
2904
2908
  return new Voicemail({
2905
2909
  id: plain.id,
2906
- date: moment__default["default"](plain.timestamp * 1000).toDate(),
2910
+ date: moment__default['default'](plain.timestamp * 1000).toDate(),
2907
2911
  duration: plain.duration * 1000,
2908
2912
  caller: {
2909
2913
  name: plain.caller_id_name,
@@ -3040,7 +3044,7 @@ class Call {
3040
3044
  onHold: plain.on_hold,
3041
3045
  status: plain.status,
3042
3046
  lineId: plain.line_id,
3043
- startingTime: moment__default["default"](plain.creation_time).toDate(),
3047
+ startingTime: moment__default['default'](plain.creation_time).toDate(),
3044
3048
  talkingToIds: Object.keys(plain.talking_to || {}),
3045
3049
  recording: plain.record_state === RECORD_STATE_ACTIVE,
3046
3050
  });
@@ -3194,7 +3198,7 @@ class Recording {
3194
3198
 
3195
3199
 
3196
3200
 
3197
- static parseMany(recordings ) {
3201
+ static parseMany(recordings = []) {
3198
3202
  return recordings.map(item => Recording.parse(item));
3199
3203
  }
3200
3204
 
@@ -3202,8 +3206,8 @@ class Recording {
3202
3206
  return new Recording({
3203
3207
  deleted: plain.deleted,
3204
3208
  fileName: plain.filename,
3205
- end: plain.end_time ? moment__default["default"](plain.end_time).toDate() : null,
3206
- start: moment__default["default"](plain.start_time).toDate(),
3209
+ end: plain.end_time ? moment__default['default'](plain.end_time).toDate() : null,
3210
+ start: moment__default['default'](plain.start_time).toDate(),
3207
3211
  uuid: plain.uuid,
3208
3212
  });
3209
3213
  }
@@ -3301,7 +3305,7 @@ class CallLog {
3301
3305
 
3302
3306
  static parse(plain ) {
3303
3307
  return new CallLog({
3304
- answer: plain.answer ? moment__default["default"](plain.answer).toDate() : null,
3308
+ answer: plain.answer ? moment__default['default'](plain.answer).toDate() : null,
3305
3309
  answered: plain.answered,
3306
3310
  callDirection: plain.call_direction,
3307
3311
  destination: {
@@ -3318,9 +3322,9 @@ class CallLog {
3318
3322
  },
3319
3323
  id: plain.id,
3320
3324
  duration: (plain.duration || 0) * 1000, // duration is in seconds
3321
- start: moment__default["default"](plain.start).toDate(),
3322
- end: plain.end ? moment__default["default"](plain.end).toDate() : null,
3323
- recordings: Recording.parseMany(plain.recordings),
3325
+ start: moment__default['default'](plain.start).toDate(),
3326
+ end: plain.end ? moment__default['default'](plain.end).toDate() : null,
3327
+ recordings: Recording.parseMany(plain.recordings || []),
3324
3328
  });
3325
3329
  }
3326
3330
 
@@ -4683,5 +4687,5 @@ class Features {
4683
4687
  var Features$1 = new Features();
4684
4688
 
4685
4689
  exports.FEATURES = FEATURES;
4686
- exports["default"] = Features$1;
4690
+ exports.default = Features$1;
4687
4691
  exports.getScopeName = getScopeName;
@@ -73,4 +73,4 @@ class ForwardOption {
73
73
  }
74
74
 
75
75
  exports.FORWARD_KEYS = FORWARD_KEYS;
76
- exports["default"] = ForwardOption;
76
+ exports.default = ForwardOption;
@@ -20,7 +20,8 @@ var newFrom = (instance , ToClass ) => {
20
20
 
21
21
 
22
22
 
23
-
23
+
24
+
24
25
 
25
26
 
26
27
  class Meeting {
@@ -32,6 +33,7 @@ class Meeting {
32
33
 
33
34
 
34
35
 
36
+
35
37
 
36
38
 
37
39
  static parse(plain ) {
@@ -43,6 +45,7 @@ class Meeting {
43
45
  port: plain.port,
44
46
  uuid: plain.uuid,
45
47
  number: plain.number,
48
+ persistent: plain.persistent,
46
49
  });
47
50
  }
48
51
 
@@ -50,7 +53,7 @@ class Meeting {
50
53
  return newFrom(meeting, Meeting);
51
54
  }
52
55
 
53
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
56
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
54
57
  this.guestSipAuthorization = guestSipAuthorization;
55
58
  this.uri = uri;
56
59
  this.name = name;
@@ -58,6 +61,7 @@ class Meeting {
58
61
  this.port = port;
59
62
  this.uuid = uuid;
60
63
  this.number = number;
64
+ this.persistent = persistent;
61
65
 
62
66
  // Useful to compare instead of instanceof with minified code
63
67
  this.type = 'Meeting';
@@ -1576,7 +1576,7 @@ class Call {
1576
1576
  onHold: plain.on_hold,
1577
1577
  status: plain.status,
1578
1578
  lineId: plain.line_id,
1579
- startingTime: moment__default["default"](plain.creation_time).toDate(),
1579
+ startingTime: moment__default['default'](plain.creation_time).toDate(),
1580
1580
  talkingToIds: Object.keys(plain.talking_to || {}),
1581
1581
  recording: plain.record_state === RECORD_STATE_ACTIVE,
1582
1582
  });
@@ -2056,7 +2056,7 @@ class Emitter {
2056
2056
 
2057
2057
 
2058
2058
  constructor() {
2059
- this.eventEmitter = new EventEmitter__default["default"]();
2059
+ this.eventEmitter = new EventEmitter__default['default']();
2060
2060
  }
2061
2061
 
2062
2062
  on(event , callback ) {
@@ -2101,7 +2101,7 @@ class Recording {
2101
2101
 
2102
2102
 
2103
2103
 
2104
- static parseMany(recordings ) {
2104
+ static parseMany(recordings = []) {
2105
2105
  return recordings.map(item => Recording.parse(item));
2106
2106
  }
2107
2107
 
@@ -2109,8 +2109,8 @@ class Recording {
2109
2109
  return new Recording({
2110
2110
  deleted: plain.deleted,
2111
2111
  fileName: plain.filename,
2112
- end: plain.end_time ? moment__default["default"](plain.end_time).toDate() : null,
2113
- start: moment__default["default"](plain.start_time).toDate(),
2112
+ end: plain.end_time ? moment__default['default'](plain.end_time).toDate() : null,
2113
+ start: moment__default['default'](plain.start_time).toDate(),
2114
2114
  uuid: plain.uuid,
2115
2115
  });
2116
2116
  }
@@ -2208,7 +2208,7 @@ class CallLog {
2208
2208
 
2209
2209
  static parse(plain ) {
2210
2210
  return new CallLog({
2211
- answer: plain.answer ? moment__default["default"](plain.answer).toDate() : null,
2211
+ answer: plain.answer ? moment__default['default'](plain.answer).toDate() : null,
2212
2212
  answered: plain.answered,
2213
2213
  callDirection: plain.call_direction,
2214
2214
  destination: {
@@ -2225,9 +2225,9 @@ class CallLog {
2225
2225
  },
2226
2226
  id: plain.id,
2227
2227
  duration: (plain.duration || 0) * 1000, // duration is in seconds
2228
- start: moment__default["default"](plain.start).toDate(),
2229
- end: plain.end ? moment__default["default"](plain.end).toDate() : null,
2230
- recordings: Recording.parseMany(plain.recordings),
2228
+ start: moment__default['default'](plain.start).toDate(),
2229
+ end: plain.end ? moment__default['default'](plain.end).toDate() : null,
2230
+ recordings: Recording.parseMany(plain.recordings || []),
2231
2231
  });
2232
2232
  }
2233
2233
 
@@ -2594,7 +2594,7 @@ class IssueReporter {
2594
2594
  args.splice(1, 1);
2595
2595
  }
2596
2596
 
2597
- const date = moment__default["default"]().format('YYYY-MM-DD HH:mm:ss.SSS');
2597
+ const date = moment__default['default']().format('YYYY-MM-DD HH:mm:ss.SSS');
2598
2598
  const message = args.join(', ');
2599
2599
  let consoleMessage = message;
2600
2600
 
@@ -2771,7 +2771,7 @@ class IssueReporter {
2771
2771
  payload._retry = retry + 1;
2772
2772
  }
2773
2773
 
2774
- this._sendDebugToGrafana(body, retry + 1);
2774
+ this._sendDebugToGrafana(payload, retry + 1);
2775
2775
  }, 5000 + retry * 1000);
2776
2776
  });
2777
2777
  }
@@ -3489,7 +3489,8 @@ class ExternalApp {
3489
3489
 
3490
3490
 
3491
3491
 
3492
-
3492
+
3493
+
3493
3494
 
3494
3495
 
3495
3496
  class Meeting {
@@ -3501,6 +3502,7 @@ class Meeting {
3501
3502
 
3502
3503
 
3503
3504
 
3505
+
3504
3506
 
3505
3507
 
3506
3508
  static parse(plain ) {
@@ -3512,6 +3514,7 @@ class Meeting {
3512
3514
  port: plain.port,
3513
3515
  uuid: plain.uuid,
3514
3516
  number: plain.number,
3517
+ persistent: plain.persistent,
3515
3518
  });
3516
3519
  }
3517
3520
 
@@ -3519,7 +3522,7 @@ class Meeting {
3519
3522
  return newFrom(meeting, Meeting);
3520
3523
  }
3521
3524
 
3522
- constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number } = {}) {
3525
+ constructor({ uuid, name, guestSipAuthorization, ownerUuids, port, uri, number, persistent } = {}) {
3523
3526
  this.guestSipAuthorization = guestSipAuthorization;
3524
3527
  this.uri = uri;
3525
3528
  this.name = name;
@@ -3527,6 +3530,7 @@ class Meeting {
3527
3530
  this.port = port;
3528
3531
  this.uuid = uuid;
3529
3532
  this.number = number;
3533
+ this.persistent = persistent;
3530
3534
 
3531
3535
  // Useful to compare instead of instanceof with minified code
3532
3536
  this.type = 'Meeting';
@@ -3664,7 +3668,7 @@ class ChatMessage {
3664
3668
  static parse(plain ) {
3665
3669
  return new ChatMessage({
3666
3670
  uuid: plain.uuid,
3667
- date: moment__default["default"](plain.created_at).toDate(),
3671
+ date: moment__default['default'](plain.created_at).toDate(),
3668
3672
  content: plain.content,
3669
3673
  alias: plain.alias,
3670
3674
  userUuid: plain.user_uuid,
@@ -3756,7 +3760,7 @@ class Voicemail {
3756
3760
  static parse(plain ) {
3757
3761
  return new Voicemail({
3758
3762
  id: plain.id,
3759
- date: moment__default["default"](plain.timestamp * 1000).toDate(),
3763
+ date: moment__default['default'](plain.timestamp * 1000).toDate(),
3760
3764
  duration: plain.duration * 1000,
3761
3765
  caller: {
3762
3766
  name: plain.caller_id_name,
@@ -5395,4 +5399,4 @@ class CTIPhone extends Emitter {
5395
5399
 
5396
5400
  exports.TRANSFER_FLOW_ATTENDED = TRANSFER_FLOW_ATTENDED;
5397
5401
  exports.TRANSFER_FLOW_BLIND = TRANSFER_FLOW_BLIND;
5398
- exports["default"] = CTIPhone;
5402
+ exports.default = CTIPhone;
@@ -571,7 +571,7 @@ class IssueReporter {
571
571
  args.splice(1, 1);
572
572
  }
573
573
 
574
- const date = moment__default["default"]().format('YYYY-MM-DD HH:mm:ss.SSS');
574
+ const date = moment__default['default']().format('YYYY-MM-DD HH:mm:ss.SSS');
575
575
  const message = args.join(', ');
576
576
  let consoleMessage = message;
577
577
 
@@ -748,7 +748,7 @@ class IssueReporter {
748
748
  payload._retry = retry + 1;
749
749
  }
750
750
 
751
- this._sendDebugToGrafana(body, retry + 1);
751
+ this._sendDebugToGrafana(payload, retry + 1);
752
752
  }, 5000 + retry * 1000);
753
753
  });
754
754
  }
@@ -780,7 +780,7 @@ class Emitter {
780
780
 
781
781
 
782
782
  constructor() {
783
- this.eventEmitter = new EventEmitter__default["default"]();
783
+ this.eventEmitter = new EventEmitter__default['default']();
784
784
  }
785
785
 
786
786
  on(event , callback ) {
@@ -2541,5 +2541,5 @@ exports.ON_UNREGISTERED = ON_UNREGISTERED;
2541
2541
  exports.ON_USER_AGENT = ON_USER_AGENT;
2542
2542
  exports.ON_VIDEO_INPUT_CHANGE = ON_VIDEO_INPUT_CHANGE;
2543
2543
  exports.ON_VIDEO_STREAM = ON_VIDEO_STREAM;
2544
- exports["default"] = WebRTCPhone;
2544
+ exports.default = WebRTCPhone;
2545
2545
  exports.events = events;
@@ -405,4 +405,4 @@ class Profile {
405
405
 
406
406
  exports.LINE_STATE = LINE_STATE;
407
407
  exports.STATE = STATE;
408
- exports["default"] = Profile;
408
+ exports.default = Profile;
@@ -31,7 +31,7 @@ class Recording {
31
31
 
32
32
 
33
33
 
34
- static parseMany(recordings ) {
34
+ static parseMany(recordings = []) {
35
35
  return recordings.map(item => Recording.parse(item));
36
36
  }
37
37
 
@@ -39,8 +39,8 @@ class Recording {
39
39
  return new Recording({
40
40
  deleted: plain.deleted,
41
41
  fileName: plain.filename,
42
- end: plain.end_time ? moment__default["default"](plain.end_time).toDate() : null,
43
- start: moment__default["default"](plain.start_time).toDate(),
42
+ end: plain.end_time ? moment__default['default'](plain.end_time).toDate() : null,
43
+ start: moment__default['default'](plain.start_time).toDate(),
44
44
  uuid: plain.uuid,
45
45
  });
46
46
  }
@@ -66,7 +66,7 @@ class Voicemail {
66
66
  static parse(plain ) {
67
67
  return new Voicemail({
68
68
  id: plain.id,
69
- date: moment__default["default"](plain.timestamp * 1000).toDate(),
69
+ date: moment__default['default'](plain.timestamp * 1000).toDate(),
70
70
  duration: plain.duration * 1000,
71
71
  caller: {
72
72
  name: plain.caller_id_name,
@@ -94,7 +94,7 @@ class Call {
94
94
  onHold: plain.on_hold,
95
95
  status: plain.status,
96
96
  lineId: plain.line_id,
97
- startingTime: moment__default["default"](plain.creation_time).toDate(),
97
+ startingTime: moment__default['default'](plain.creation_time).toDate(),
98
98
  talkingToIds: Object.keys(plain.talking_to || {}),
99
99
  recording: plain.record_state === RECORD_STATE_ACTIVE,
100
100
  });