@wazo/sdk 0.37.33 → 0.37.36

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 (98) hide show
  1. package/README.md +1 -0
  2. package/dist/wazo-sdk.js +2 -2
  3. package/esm/__tests__/api-client.test.js +17 -0
  4. package/esm/__tests__/web-rtc-client.test.js +18 -1
  5. package/esm/api/auth.js +5 -0
  6. package/esm/api/call-logd.js +6 -0
  7. package/esm/api/chatd.js +6 -0
  8. package/esm/api/confd.js +6 -0
  9. package/esm/api-client.js +17 -0
  10. package/esm/checker/Checker.js +18 -1
  11. package/esm/checker/checks/aor.js +17 -0
  12. package/esm/checker/checks/api.js +17 -0
  13. package/esm/checker/checks/index.js +18 -1
  14. package/esm/checker/checks/webrtc-transport.js +18 -1
  15. package/esm/checker/checks/webrtc.js +18 -1
  16. package/esm/domain/AdHocAPIConference.js +21 -0
  17. package/esm/domain/CallLog.js +6 -0
  18. package/esm/domain/CallSession.js +14 -0
  19. package/esm/domain/Features.js +17 -0
  20. package/esm/domain/Phone/CTIPhone.js +31 -0
  21. package/esm/domain/Phone/WebRTCPhone.js +65 -15
  22. package/esm/domain/Profile.js +6 -0
  23. package/esm/domain/__tests__/CallLog.test.js +10 -0
  24. package/esm/domain/__tests__/CallSession.test.js +14 -0
  25. package/esm/domain/__tests__/IndirectTransfer.test.js +14 -0
  26. package/esm/domain/__tests__/Profile.test.js +6 -0
  27. package/esm/domain/__tests__/Room.test.js +14 -0
  28. package/esm/domain/__tests__/Session.test.js +6 -0
  29. package/esm/index.js +93 -22
  30. package/esm/service/CallApi.js +17 -0
  31. package/esm/service/getApiClient.js +17 -0
  32. package/esm/simple/Auth.js +93 -22
  33. package/esm/simple/Configuration.js +93 -22
  34. package/esm/simple/Directory.js +17 -0
  35. package/esm/simple/Phone.js +93 -22
  36. package/esm/simple/index.js +93 -22
  37. package/esm/simple/room/LocalParticipant.js +93 -22
  38. package/esm/simple/room/Participant.js +93 -22
  39. package/esm/simple/room/RemoteParticipant.js +93 -22
  40. package/esm/simple/room/Room.js +93 -22
  41. package/esm/simple/room/SipRoom.js +93 -22
  42. package/esm/simple/room/Stream.js +93 -22
  43. package/esm/simple/room/__tests__/RemoteParticipant.test.js +93 -22
  44. package/esm/simple/utils.js +93 -22
  45. package/esm/web-rtc-client.js +18 -1
  46. package/lib/__tests__/api-client.test.js +17 -0
  47. package/lib/__tests__/web-rtc-client.test.js +18 -1
  48. package/lib/api/auth.js +5 -0
  49. package/lib/api/call-logd.js +6 -0
  50. package/lib/api/chatd.js +6 -0
  51. package/lib/api/confd.js +6 -0
  52. package/lib/api-client.js +17 -0
  53. package/lib/checker/Checker.js +18 -1
  54. package/lib/checker/checks/aor.js +17 -0
  55. package/lib/checker/checks/api.js +17 -0
  56. package/lib/checker/checks/index.js +18 -1
  57. package/lib/checker/checks/webrtc-transport.js +18 -1
  58. package/lib/checker/checks/webrtc.js +18 -1
  59. package/lib/domain/AdHocAPIConference.js +21 -0
  60. package/lib/domain/CallLog.js +6 -0
  61. package/lib/domain/CallSession.js +14 -0
  62. package/lib/domain/Features.js +17 -0
  63. package/lib/domain/Phone/CTIPhone.js +31 -0
  64. package/lib/domain/Phone/WebRTCPhone.js +65 -15
  65. package/lib/domain/Profile.js +6 -0
  66. package/lib/domain/__tests__/CallLog.test.js +10 -0
  67. package/lib/domain/__tests__/CallSession.test.js +14 -0
  68. package/lib/domain/__tests__/IndirectTransfer.test.js +14 -0
  69. package/lib/domain/__tests__/Profile.test.js +6 -0
  70. package/lib/domain/__tests__/Room.test.js +14 -0
  71. package/lib/domain/__tests__/Session.test.js +6 -0
  72. package/lib/index.js +93 -22
  73. package/lib/service/CallApi.js +17 -0
  74. package/lib/service/getApiClient.js +17 -0
  75. package/lib/simple/Auth.js +93 -22
  76. package/lib/simple/Configuration.js +93 -22
  77. package/lib/simple/Directory.js +17 -0
  78. package/lib/simple/Phone.js +93 -22
  79. package/lib/simple/index.js +93 -22
  80. package/lib/simple/room/LocalParticipant.js +93 -22
  81. package/lib/simple/room/Participant.js +93 -22
  82. package/lib/simple/room/RemoteParticipant.js +93 -22
  83. package/lib/simple/room/Room.js +93 -22
  84. package/lib/simple/room/SipRoom.js +93 -22
  85. package/lib/simple/room/Stream.js +93 -22
  86. package/lib/simple/room/__tests__/RemoteParticipant.test.js +93 -22
  87. package/lib/simple/utils.js +93 -22
  88. package/lib/web-rtc-client.js +18 -1
  89. package/package.json +1 -1
  90. package/src/api/auth.js +5 -0
  91. package/src/domain/AdHocAPIConference.js +4 -0
  92. package/src/domain/CallLog.js +6 -0
  93. package/src/domain/CallSession.js +14 -0
  94. package/src/domain/Phone/WebRTCPhone.js +51 -15
  95. package/src/domain/Profile.js +6 -0
  96. package/src/domain/__tests__/CallLog.test.js +4 -0
  97. package/src/simple/Phone.js +6 -6
  98. package/src/web-rtc-client.js +1 -1
@@ -1609,6 +1609,7 @@ const LINE_STATE = {
1609
1609
 
1610
1610
 
1611
1611
 
1612
+
1612
1613
 
1613
1614
 
1614
1615
 
@@ -1645,6 +1646,7 @@ const LINE_STATE = {
1645
1646
 
1646
1647
 
1647
1648
 
1649
+
1648
1650
 
1649
1651
 
1650
1652
 
@@ -1676,6 +1678,7 @@ class Profile {
1676
1678
 
1677
1679
 
1678
1680
 
1681
+
1679
1682
 
1680
1683
 
1681
1684
 
@@ -1692,6 +1695,7 @@ class Profile {
1692
1695
  lines: plain.lines.map(line => Line.parse(line)),
1693
1696
  username: plain.username,
1694
1697
  mobileNumber: plain.mobile_phone_number || '',
1698
+ ringSeconds: plain.ring_seconds,
1695
1699
  forwards: [
1696
1700
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1697
1701
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1728,6 +1732,7 @@ class Profile {
1728
1732
  switchboards,
1729
1733
  agent,
1730
1734
  status,
1735
+ ringSeconds,
1731
1736
  sipLines,
1732
1737
  callPickupTargetUsers,
1733
1738
  onlineCallRecordEnabled,
@@ -1749,6 +1754,7 @@ class Profile {
1749
1754
  this.status = status;
1750
1755
  this.callPickupTargetUsers = callPickupTargetUsers;
1751
1756
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1757
+ this.ringSeconds = ringSeconds;
1752
1758
 
1753
1759
  this.sipLines = sipLines || [];
1754
1760
  }
@@ -2754,6 +2760,7 @@ var authMethods = (client , baseUrl ) => ({
2754
2760
 
2755
2761
 
2756
2762
 
2763
+
2757
2764
  ) {
2758
2765
  const body = {
2759
2766
  backend: params.backend || DEFAULT_BACKEND_USER,
@@ -2773,6 +2780,10 @@ var authMethods = (client , baseUrl ) => ({
2773
2780
  headers['Wazo-Session-Type'] = 'mobile';
2774
2781
  }
2775
2782
 
2783
+ if (params.tenantId) {
2784
+ body.tenant_id = params.tenantId;
2785
+ }
2786
+
2776
2787
  return client.post(`${baseUrl}/token`, body, headers).then(response => Session.parse(response));
2777
2788
  },
2778
2789
 
@@ -3841,11 +3852,13 @@ class Recording {
3841
3852
 
3842
3853
 
3843
3854
 
3855
+
3844
3856
 
3845
3857
 
3846
3858
 
3847
3859
 
3848
3860
 
3861
+
3849
3862
 
3850
3863
 
3851
3864
 
@@ -3866,10 +3879,12 @@ class Recording {
3866
3879
 
3867
3880
 
3868
3881
 
3882
+
3869
3883
 
3870
3884
 
3871
3885
 
3872
3886
 
3887
+
3873
3888
 
3874
3889
 
3875
3890
 
@@ -3931,10 +3946,12 @@ class CallLog {
3931
3946
  || plain.destination_extension
3932
3947
  || `meeting-${plain.requested_name || plain.destination_name || ''}`,
3933
3948
  name: plain.requested_name || plain.destination_name || '',
3949
+ uuid: plain.destination_user_uuid,
3934
3950
  },
3935
3951
  source: {
3936
3952
  extension: plain.source_extension,
3937
3953
  name: plain.source_name,
3954
+ uuid: plain.source_user_uuid,
3938
3955
  },
3939
3956
  id: plain.id,
3940
3957
  duration: (plain.duration || 0) * 1000, // duration is in seconds
@@ -5371,7 +5388,7 @@ const ON_NETWORK_STATS = 'onNetworkStats';
5371
5388
  const ON_DISCONNECTED = 'onDisconnected';
5372
5389
  class CanceledCallError extends Error {}
5373
5390
 
5374
- const MAX_REGISTER_TRIES = 10;
5391
+ const MAX_REGISTER_TRIES = 5;
5375
5392
 
5376
5393
 
5377
5394
 
@@ -1609,6 +1609,7 @@ const LINE_STATE = {
1609
1609
 
1610
1610
 
1611
1611
 
1612
+
1612
1613
 
1613
1614
 
1614
1615
 
@@ -1645,6 +1646,7 @@ const LINE_STATE = {
1645
1646
 
1646
1647
 
1647
1648
 
1649
+
1648
1650
 
1649
1651
 
1650
1652
 
@@ -1676,6 +1678,7 @@ class Profile {
1676
1678
 
1677
1679
 
1678
1680
 
1681
+
1679
1682
 
1680
1683
 
1681
1684
 
@@ -1692,6 +1695,7 @@ class Profile {
1692
1695
  lines: plain.lines.map(line => Line.parse(line)),
1693
1696
  username: plain.username,
1694
1697
  mobileNumber: plain.mobile_phone_number || '',
1698
+ ringSeconds: plain.ring_seconds,
1695
1699
  forwards: [
1696
1700
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1697
1701
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1728,6 +1732,7 @@ class Profile {
1728
1732
  switchboards,
1729
1733
  agent,
1730
1734
  status,
1735
+ ringSeconds,
1731
1736
  sipLines,
1732
1737
  callPickupTargetUsers,
1733
1738
  onlineCallRecordEnabled,
@@ -1749,6 +1754,7 @@ class Profile {
1749
1754
  this.status = status;
1750
1755
  this.callPickupTargetUsers = callPickupTargetUsers;
1751
1756
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1757
+ this.ringSeconds = ringSeconds;
1752
1758
 
1753
1759
  this.sipLines = sipLines || [];
1754
1760
  }
@@ -2754,6 +2760,7 @@ var authMethods = (client , baseUrl ) => ({
2754
2760
 
2755
2761
 
2756
2762
 
2763
+
2757
2764
  ) {
2758
2765
  const body = {
2759
2766
  backend: params.backend || DEFAULT_BACKEND_USER,
@@ -2773,6 +2780,10 @@ var authMethods = (client , baseUrl ) => ({
2773
2780
  headers['Wazo-Session-Type'] = 'mobile';
2774
2781
  }
2775
2782
 
2783
+ if (params.tenantId) {
2784
+ body.tenant_id = params.tenantId;
2785
+ }
2786
+
2776
2787
  return client.post(`${baseUrl}/token`, body, headers).then(response => Session.parse(response));
2777
2788
  },
2778
2789
 
@@ -3841,11 +3852,13 @@ class Recording {
3841
3852
 
3842
3853
 
3843
3854
 
3855
+
3844
3856
 
3845
3857
 
3846
3858
 
3847
3859
 
3848
3860
 
3861
+
3849
3862
 
3850
3863
 
3851
3864
 
@@ -3866,10 +3879,12 @@ class Recording {
3866
3879
 
3867
3880
 
3868
3881
 
3882
+
3869
3883
 
3870
3884
 
3871
3885
 
3872
3886
 
3887
+
3873
3888
 
3874
3889
 
3875
3890
 
@@ -3931,10 +3946,12 @@ class CallLog {
3931
3946
  || plain.destination_extension
3932
3947
  || `meeting-${plain.requested_name || plain.destination_name || ''}`,
3933
3948
  name: plain.requested_name || plain.destination_name || '',
3949
+ uuid: plain.destination_user_uuid,
3934
3950
  },
3935
3951
  source: {
3936
3952
  extension: plain.source_extension,
3937
3953
  name: plain.source_name,
3954
+ uuid: plain.source_user_uuid,
3938
3955
  },
3939
3956
  id: plain.id,
3940
3957
  duration: (plain.duration || 0) * 1000, // duration is in seconds
@@ -5371,7 +5388,7 @@ const ON_NETWORK_STATS = 'onNetworkStats';
5371
5388
  const ON_DISCONNECTED = 'onDisconnected';
5372
5389
  class CanceledCallError extends Error {}
5373
5390
 
5374
- const MAX_REGISTER_TRIES = 10;
5391
+ const MAX_REGISTER_TRIES = 5;
5375
5392
 
5376
5393
 
5377
5394
 
@@ -1267,6 +1267,7 @@ const LINE_STATE = {
1267
1267
 
1268
1268
 
1269
1269
 
1270
+
1270
1271
 
1271
1272
 
1272
1273
 
@@ -1303,6 +1304,7 @@ const LINE_STATE = {
1303
1304
 
1304
1305
 
1305
1306
 
1307
+
1306
1308
 
1307
1309
 
1308
1310
 
@@ -1334,6 +1336,7 @@ class Profile {
1334
1336
 
1335
1337
 
1336
1338
 
1339
+
1337
1340
 
1338
1341
 
1339
1342
 
@@ -1350,6 +1353,7 @@ class Profile {
1350
1353
  lines: plain.lines.map(line => Line.parse(line)),
1351
1354
  username: plain.username,
1352
1355
  mobileNumber: plain.mobile_phone_number || '',
1356
+ ringSeconds: plain.ring_seconds,
1353
1357
  forwards: [
1354
1358
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1355
1359
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1386,6 +1390,7 @@ class Profile {
1386
1390
  switchboards,
1387
1391
  agent,
1388
1392
  status,
1393
+ ringSeconds,
1389
1394
  sipLines,
1390
1395
  callPickupTargetUsers,
1391
1396
  onlineCallRecordEnabled,
@@ -1407,6 +1412,7 @@ class Profile {
1407
1412
  this.status = status;
1408
1413
  this.callPickupTargetUsers = callPickupTargetUsers;
1409
1414
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1415
+ this.ringSeconds = ringSeconds;
1410
1416
 
1411
1417
  this.sipLines = sipLines || [];
1412
1418
  }
@@ -2412,6 +2418,7 @@ var authMethods = (client , baseUrl ) => ({
2412
2418
 
2413
2419
 
2414
2420
 
2421
+
2415
2422
  ) {
2416
2423
  const body = {
2417
2424
  backend: params.backend || DEFAULT_BACKEND_USER,
@@ -2431,6 +2438,10 @@ var authMethods = (client , baseUrl ) => ({
2431
2438
  headers['Wazo-Session-Type'] = 'mobile';
2432
2439
  }
2433
2440
 
2441
+ if (params.tenantId) {
2442
+ body.tenant_id = params.tenantId;
2443
+ }
2444
+
2434
2445
  return client.post(`${baseUrl}/token`, body, headers).then(response => Session.parse(response));
2435
2446
  },
2436
2447
 
@@ -3290,11 +3301,13 @@ class Recording {
3290
3301
 
3291
3302
 
3292
3303
 
3304
+
3293
3305
 
3294
3306
 
3295
3307
 
3296
3308
 
3297
3309
 
3310
+
3298
3311
 
3299
3312
 
3300
3313
 
@@ -3315,10 +3328,12 @@ class Recording {
3315
3328
 
3316
3329
 
3317
3330
 
3331
+
3318
3332
 
3319
3333
 
3320
3334
 
3321
3335
 
3336
+
3322
3337
 
3323
3338
 
3324
3339
 
@@ -3380,10 +3395,12 @@ class CallLog {
3380
3395
  || plain.destination_extension
3381
3396
  || `meeting-${plain.requested_name || plain.destination_name || ''}`,
3382
3397
  name: plain.requested_name || plain.destination_name || '',
3398
+ uuid: plain.destination_user_uuid,
3383
3399
  },
3384
3400
  source: {
3385
3401
  extension: plain.source_extension,
3386
3402
  name: plain.source_name,
3403
+ uuid: plain.source_user_uuid,
3387
3404
  },
3388
3405
  id: plain.id,
3389
3406
  duration: (plain.duration || 0) * 1000, // duration is in seconds
@@ -4789,6 +4806,10 @@ class AdHocAPIConference {
4789
4806
  this.conferenceId = conferenceId || '';
4790
4807
  this.muted = muted || false;
4791
4808
  this.paused = paused || false;
4809
+
4810
+ if (this.host) {
4811
+ this.host.setIsConference(true);
4812
+ }
4792
4813
  }
4793
4814
 
4794
4815
  async start() {
@@ -93,11 +93,13 @@ class Recording {
93
93
 
94
94
 
95
95
 
96
+
96
97
 
97
98
 
98
99
 
99
100
 
100
101
 
102
+
101
103
 
102
104
 
103
105
 
@@ -118,10 +120,12 @@ class Recording {
118
120
 
119
121
 
120
122
 
123
+
121
124
 
122
125
 
123
126
 
124
127
 
128
+
125
129
 
126
130
 
127
131
 
@@ -183,10 +187,12 @@ class CallLog {
183
187
  || plain.destination_extension
184
188
  || `meeting-${plain.requested_name || plain.destination_name || ''}`,
185
189
  name: plain.requested_name || plain.destination_name || '',
190
+ uuid: plain.destination_user_uuid,
186
191
  },
187
192
  source: {
188
193
  extension: plain.source_extension,
189
194
  name: plain.source_name,
195
+ uuid: plain.source_user_uuid,
190
196
  },
191
197
  id: plain.id,
192
198
  duration: (plain.duration || 0) * 1000, // duration is in seconds
@@ -61,6 +61,7 @@ var updateFrom = (instance , from ) => {
61
61
 
62
62
 
63
63
 
64
+
64
65
 
65
66
 
66
67
  class CallSession {
@@ -123,6 +124,8 @@ class CallSession {
123
124
 
124
125
 
125
126
 
127
+
128
+
126
129
 
127
130
 
128
131
 
@@ -154,6 +157,7 @@ class CallSession {
154
157
  videoRemotelyDowngraded,
155
158
  sipSession,
156
159
  answerTime,
160
+ conference,
157
161
  } ) {
158
162
  this.callId = callId;
159
163
  this.sipCallId = sipCallId;
@@ -182,6 +186,7 @@ class CallSession {
182
186
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
183
187
  this.sipSession = sipSession;
184
188
  this.answerTime = answerTime || this.answerTime;
189
+ this.conference = conference;
185
190
 
186
191
  // Useful to compare instead of instanceof with minified code
187
192
  this.type = 'CallSession';
@@ -239,6 +244,10 @@ class CallSession {
239
244
  this.screensharing = false;
240
245
  }
241
246
 
247
+ setIsConference(conference ) {
248
+ this.conference = conference;
249
+ }
250
+
242
251
  isIncoming() {
243
252
  return !this.isCaller && !this.answered;
244
253
  }
@@ -315,6 +324,10 @@ class CallSession {
315
324
  return this.sipStatus === sessionState.SessionState.Terminated;
316
325
  }
317
326
 
327
+ isConference() {
328
+ return this.conference;
329
+ }
330
+
318
331
  getElapsedTimeInSeconds() {
319
332
  if (!this.startTime) {
320
333
  return 0;
@@ -406,6 +419,7 @@ class CallSession {
406
419
  cameraEnabled: false,
407
420
  dialedExtension: call.dialedExtension,
408
421
  call,
422
+ conference: false, // @FIXME?
409
423
  });
410
424
  }
411
425
  }
@@ -1060,6 +1060,7 @@ const LINE_STATE = {
1060
1060
 
1061
1061
 
1062
1062
 
1063
+
1063
1064
 
1064
1065
 
1065
1066
 
@@ -1096,6 +1097,7 @@ const LINE_STATE = {
1096
1097
 
1097
1098
 
1098
1099
 
1100
+
1099
1101
 
1100
1102
 
1101
1103
 
@@ -1127,6 +1129,7 @@ class Profile {
1127
1129
 
1128
1130
 
1129
1131
 
1132
+
1130
1133
 
1131
1134
 
1132
1135
 
@@ -1143,6 +1146,7 @@ class Profile {
1143
1146
  lines: plain.lines.map(line => Line.parse(line)),
1144
1147
  username: plain.username,
1145
1148
  mobileNumber: plain.mobile_phone_number || '',
1149
+ ringSeconds: plain.ring_seconds,
1146
1150
  forwards: [
1147
1151
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1148
1152
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1179,6 +1183,7 @@ class Profile {
1179
1183
  switchboards,
1180
1184
  agent,
1181
1185
  status,
1186
+ ringSeconds,
1182
1187
  sipLines,
1183
1188
  callPickupTargetUsers,
1184
1189
  onlineCallRecordEnabled,
@@ -1200,6 +1205,7 @@ class Profile {
1200
1205
  this.status = status;
1201
1206
  this.callPickupTargetUsers = callPickupTargetUsers;
1202
1207
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1208
+ this.ringSeconds = ringSeconds;
1203
1209
 
1204
1210
  this.sipLines = sipLines || [];
1205
1211
  }
@@ -2205,6 +2211,7 @@ var authMethods = (client , baseUrl ) => ({
2205
2211
 
2206
2212
 
2207
2213
 
2214
+
2208
2215
  ) {
2209
2216
  const body = {
2210
2217
  backend: params.backend || DEFAULT_BACKEND_USER,
@@ -2224,6 +2231,10 @@ var authMethods = (client , baseUrl ) => ({
2224
2231
  headers['Wazo-Session-Type'] = 'mobile';
2225
2232
  }
2226
2233
 
2234
+ if (params.tenantId) {
2235
+ body.tenant_id = params.tenantId;
2236
+ }
2237
+
2227
2238
  return client.post(`${baseUrl}/token`, body, headers).then(response => Session.parse(response));
2228
2239
  },
2229
2240
 
@@ -3292,11 +3303,13 @@ class Recording {
3292
3303
 
3293
3304
 
3294
3305
 
3306
+
3295
3307
 
3296
3308
 
3297
3309
 
3298
3310
 
3299
3311
 
3312
+
3300
3313
 
3301
3314
 
3302
3315
 
@@ -3317,10 +3330,12 @@ class Recording {
3317
3330
 
3318
3331
 
3319
3332
 
3333
+
3320
3334
 
3321
3335
 
3322
3336
 
3323
3337
 
3338
+
3324
3339
 
3325
3340
 
3326
3341
 
@@ -3382,10 +3397,12 @@ class CallLog {
3382
3397
  || plain.destination_extension
3383
3398
  || `meeting-${plain.requested_name || plain.destination_name || ''}`,
3384
3399
  name: plain.requested_name || plain.destination_name || '',
3400
+ uuid: plain.destination_user_uuid,
3385
3401
  },
3386
3402
  source: {
3387
3403
  extension: plain.source_extension,
3388
3404
  name: plain.source_name,
3405
+ uuid: plain.source_user_uuid,
3389
3406
  },
3390
3407
  id: plain.id,
3391
3408
  duration: (plain.duration || 0) * 1000, // duration is in seconds
@@ -374,6 +374,7 @@ const LINE_STATE = {
374
374
 
375
375
 
376
376
 
377
+
377
378
 
378
379
 
379
380
 
@@ -410,6 +411,7 @@ const LINE_STATE = {
410
411
 
411
412
 
412
413
 
414
+
413
415
 
414
416
 
415
417
 
@@ -441,6 +443,7 @@ class Profile {
441
443
 
442
444
 
443
445
 
446
+
444
447
 
445
448
 
446
449
 
@@ -457,6 +460,7 @@ class Profile {
457
460
  lines: plain.lines.map(line => Line.parse(line)),
458
461
  username: plain.username,
459
462
  mobileNumber: plain.mobile_phone_number || '',
463
+ ringSeconds: plain.ring_seconds,
460
464
  forwards: [
461
465
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
462
466
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -493,6 +497,7 @@ class Profile {
493
497
  switchboards,
494
498
  agent,
495
499
  status,
500
+ ringSeconds,
496
501
  sipLines,
497
502
  callPickupTargetUsers,
498
503
  onlineCallRecordEnabled,
@@ -514,6 +519,7 @@ class Profile {
514
519
  this.status = status;
515
520
  this.callPickupTargetUsers = callPickupTargetUsers;
516
521
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
522
+ this.ringSeconds = ringSeconds;
517
523
 
518
524
  this.sipLines = sipLines || [];
519
525
  }
@@ -1742,6 +1748,7 @@ var updateFrom = (instance , from ) => {
1742
1748
 
1743
1749
 
1744
1750
 
1751
+
1745
1752
 
1746
1753
 
1747
1754
  class CallSession {
@@ -1804,6 +1811,8 @@ class CallSession {
1804
1811
 
1805
1812
 
1806
1813
 
1814
+
1815
+
1807
1816
 
1808
1817
 
1809
1818
 
@@ -1835,6 +1844,7 @@ class CallSession {
1835
1844
  videoRemotelyDowngraded,
1836
1845
  sipSession,
1837
1846
  answerTime,
1847
+ conference,
1838
1848
  } ) {
1839
1849
  this.callId = callId;
1840
1850
  this.sipCallId = sipCallId;
@@ -1863,6 +1873,7 @@ class CallSession {
1863
1873
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
1864
1874
  this.sipSession = sipSession;
1865
1875
  this.answerTime = answerTime || this.answerTime;
1876
+ this.conference = conference;
1866
1877
 
1867
1878
  // Useful to compare instead of instanceof with minified code
1868
1879
  this.type = 'CallSession';
@@ -1920,6 +1931,10 @@ class CallSession {
1920
1931
  this.screensharing = false;
1921
1932
  }
1922
1933
 
1934
+ setIsConference(conference ) {
1935
+ this.conference = conference;
1936
+ }
1937
+
1923
1938
  isIncoming() {
1924
1939
  return !this.isCaller && !this.answered;
1925
1940
  }
@@ -1996,6 +2011,10 @@ class CallSession {
1996
2011
  return this.sipStatus === sessionState.SessionState.Terminated;
1997
2012
  }
1998
2013
 
2014
+ isConference() {
2015
+ return this.conference;
2016
+ }
2017
+
1999
2018
  getElapsedTimeInSeconds() {
2000
2019
  if (!this.startTime) {
2001
2020
  return 0;
@@ -2087,6 +2106,7 @@ class CallSession {
2087
2106
  cameraEnabled: false,
2088
2107
  dialedExtension: call.dialedExtension,
2089
2108
  call,
2109
+ conference: false, // @FIXME?
2090
2110
  });
2091
2111
  }
2092
2112
  }
@@ -2176,11 +2196,13 @@ class Recording {
2176
2196
 
2177
2197
 
2178
2198
 
2199
+
2179
2200
 
2180
2201
 
2181
2202
 
2182
2203
 
2183
2204
 
2205
+
2184
2206
 
2185
2207
 
2186
2208
 
@@ -2201,10 +2223,12 @@ class Recording {
2201
2223
 
2202
2224
 
2203
2225
 
2226
+
2204
2227
 
2205
2228
 
2206
2229
 
2207
2230
 
2231
+
2208
2232
 
2209
2233
 
2210
2234
 
@@ -2266,10 +2290,12 @@ class CallLog {
2266
2290
  || plain.destination_extension
2267
2291
  || `meeting-${plain.requested_name || plain.destination_name || ''}`,
2268
2292
  name: plain.requested_name || plain.destination_name || '',
2293
+ uuid: plain.destination_user_uuid,
2269
2294
  },
2270
2295
  source: {
2271
2296
  extension: plain.source_extension,
2272
2297
  name: plain.source_name,
2298
+ uuid: plain.source_user_uuid,
2273
2299
  },
2274
2300
  id: plain.id,
2275
2301
  duration: (plain.duration || 0) * 1000, // duration is in seconds
@@ -3146,6 +3172,7 @@ var authMethods = (client , baseUrl ) => ({
3146
3172
 
3147
3173
 
3148
3174
 
3175
+
3149
3176
  ) {
3150
3177
  const body = {
3151
3178
  backend: params.backend || DEFAULT_BACKEND_USER,
@@ -3165,6 +3192,10 @@ var authMethods = (client , baseUrl ) => ({
3165
3192
  headers['Wazo-Session-Type'] = 'mobile';
3166
3193
  }
3167
3194
 
3195
+ if (params.tenantId) {
3196
+ body.tenant_id = params.tenantId;
3197
+ }
3198
+
3168
3199
  return client.post(`${baseUrl}/token`, body, headers).then(response => Session.parse(response));
3169
3200
  },
3170
3201