@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
@@ -1052,6 +1052,7 @@ const LINE_STATE = {
1052
1052
 
1053
1053
 
1054
1054
 
1055
+
1055
1056
 
1056
1057
 
1057
1058
 
@@ -1088,6 +1089,7 @@ const LINE_STATE = {
1088
1089
 
1089
1090
 
1090
1091
 
1092
+
1091
1093
 
1092
1094
 
1093
1095
 
@@ -1119,6 +1121,7 @@ class Profile {
1119
1121
 
1120
1122
 
1121
1123
 
1124
+
1122
1125
 
1123
1126
 
1124
1127
 
@@ -1135,6 +1138,7 @@ class Profile {
1135
1138
  lines: plain.lines.map(line => Line.parse(line)),
1136
1139
  username: plain.username,
1137
1140
  mobileNumber: plain.mobile_phone_number || '',
1141
+ ringSeconds: plain.ring_seconds,
1138
1142
  forwards: [
1139
1143
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1140
1144
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1171,6 +1175,7 @@ class Profile {
1171
1175
  switchboards,
1172
1176
  agent,
1173
1177
  status,
1178
+ ringSeconds,
1174
1179
  sipLines,
1175
1180
  callPickupTargetUsers,
1176
1181
  onlineCallRecordEnabled,
@@ -1192,6 +1197,7 @@ class Profile {
1192
1197
  this.status = status;
1193
1198
  this.callPickupTargetUsers = callPickupTargetUsers;
1194
1199
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1200
+ this.ringSeconds = ringSeconds;
1195
1201
 
1196
1202
  this.sipLines = sipLines || [];
1197
1203
  }
@@ -2197,6 +2203,7 @@ var authMethods = (client , baseUrl ) => ({
2197
2203
 
2198
2204
 
2199
2205
 
2206
+
2200
2207
  ) {
2201
2208
  const body = {
2202
2209
  backend: params.backend || DEFAULT_BACKEND_USER,
@@ -2216,6 +2223,10 @@ var authMethods = (client , baseUrl ) => ({
2216
2223
  headers['Wazo-Session-Type'] = 'mobile';
2217
2224
  }
2218
2225
 
2226
+ if (params.tenantId) {
2227
+ body.tenant_id = params.tenantId;
2228
+ }
2229
+
2219
2230
  return client.post(`${baseUrl}/token`, body, headers).then(response => Session.parse(response));
2220
2231
  },
2221
2232
 
@@ -3284,11 +3295,13 @@ class Recording {
3284
3295
 
3285
3296
 
3286
3297
 
3298
+
3287
3299
 
3288
3300
 
3289
3301
 
3290
3302
 
3291
3303
 
3304
+
3292
3305
 
3293
3306
 
3294
3307
 
@@ -3309,10 +3322,12 @@ class Recording {
3309
3322
 
3310
3323
 
3311
3324
 
3325
+
3312
3326
 
3313
3327
 
3314
3328
 
3315
3329
 
3330
+
3316
3331
 
3317
3332
 
3318
3333
 
@@ -3374,10 +3389,12 @@ class CallLog {
3374
3389
  || plain.destination_extension
3375
3390
  || `meeting-${plain.requested_name || plain.destination_name || ''}`,
3376
3391
  name: plain.requested_name || plain.destination_name || '',
3392
+ uuid: plain.destination_user_uuid,
3377
3393
  },
3378
3394
  source: {
3379
3395
  extension: plain.source_extension,
3380
3396
  name: plain.source_name,
3397
+ uuid: plain.source_user_uuid,
3381
3398
  },
3382
3399
  id: plain.id,
3383
3400
  duration: (plain.duration || 0) * 1000, // duration is in seconds
@@ -1070,6 +1070,7 @@ const LINE_STATE = {
1070
1070
 
1071
1071
 
1072
1072
 
1073
+
1073
1074
 
1074
1075
 
1075
1076
 
@@ -1106,6 +1107,7 @@ const LINE_STATE = {
1106
1107
 
1107
1108
 
1108
1109
 
1110
+
1109
1111
 
1110
1112
 
1111
1113
 
@@ -1137,6 +1139,7 @@ class Profile {
1137
1139
 
1138
1140
 
1139
1141
 
1142
+
1140
1143
 
1141
1144
 
1142
1145
 
@@ -1153,6 +1156,7 @@ class Profile {
1153
1156
  lines: plain.lines.map(line => Line.parse(line)),
1154
1157
  username: plain.username,
1155
1158
  mobileNumber: plain.mobile_phone_number || '',
1159
+ ringSeconds: plain.ring_seconds,
1156
1160
  forwards: [
1157
1161
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1158
1162
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1189,6 +1193,7 @@ class Profile {
1189
1193
  switchboards,
1190
1194
  agent,
1191
1195
  status,
1196
+ ringSeconds,
1192
1197
  sipLines,
1193
1198
  callPickupTargetUsers,
1194
1199
  onlineCallRecordEnabled,
@@ -1210,6 +1215,7 @@ class Profile {
1210
1215
  this.status = status;
1211
1216
  this.callPickupTargetUsers = callPickupTargetUsers;
1212
1217
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1218
+ this.ringSeconds = ringSeconds;
1213
1219
 
1214
1220
  this.sipLines = sipLines || [];
1215
1221
  }
@@ -2215,6 +2221,7 @@ var authMethods = (client , baseUrl ) => ({
2215
2221
 
2216
2222
 
2217
2223
 
2224
+
2218
2225
  ) {
2219
2226
  const body = {
2220
2227
  backend: params.backend || DEFAULT_BACKEND_USER,
@@ -2234,6 +2241,10 @@ var authMethods = (client , baseUrl ) => ({
2234
2241
  headers['Wazo-Session-Type'] = 'mobile';
2235
2242
  }
2236
2243
 
2244
+ if (params.tenantId) {
2245
+ body.tenant_id = params.tenantId;
2246
+ }
2247
+
2237
2248
  return client.post(`${baseUrl}/token`, body, headers).then(response => Session.parse(response));
2238
2249
  },
2239
2250
 
@@ -3328,11 +3339,13 @@ class Recording {
3328
3339
 
3329
3340
 
3330
3341
 
3342
+
3331
3343
 
3332
3344
 
3333
3345
 
3334
3346
 
3335
3347
 
3348
+
3336
3349
 
3337
3350
 
3338
3351
 
@@ -3353,10 +3366,12 @@ class Recording {
3353
3366
 
3354
3367
 
3355
3368
 
3369
+
3356
3370
 
3357
3371
 
3358
3372
 
3359
3373
 
3374
+
3360
3375
 
3361
3376
 
3362
3377
 
@@ -3418,10 +3433,12 @@ class CallLog {
3418
3433
  || plain.destination_extension
3419
3434
  || `meeting-${plain.requested_name || plain.destination_name || ''}`,
3420
3435
  name: plain.requested_name || plain.destination_name || '',
3436
+ uuid: plain.destination_user_uuid,
3421
3437
  },
3422
3438
  source: {
3423
3439
  extension: plain.source_extension,
3424
3440
  name: plain.source_name,
3441
+ uuid: plain.source_user_uuid,
3425
3442
  },
3426
3443
  id: plain.id,
3427
3444
  duration: (plain.duration || 0) * 1000, // duration is in seconds
@@ -5947,7 +5964,7 @@ const ON_NETWORK_STATS = 'onNetworkStats';
5947
5964
  const ON_DISCONNECTED = 'onDisconnected';
5948
5965
  class CanceledCallError extends Error {}
5949
5966
 
5950
- const MAX_REGISTER_TRIES = 10;
5967
+ const MAX_REGISTER_TRIES = 5;
5951
5968
 
5952
5969
 
5953
5970
 
@@ -1600,6 +1600,7 @@ const LINE_STATE = {
1600
1600
 
1601
1601
 
1602
1602
 
1603
+
1603
1604
 
1604
1605
 
1605
1606
 
@@ -1636,6 +1637,7 @@ const LINE_STATE = {
1636
1637
 
1637
1638
 
1638
1639
 
1640
+
1639
1641
 
1640
1642
 
1641
1643
 
@@ -1667,6 +1669,7 @@ class Profile {
1667
1669
 
1668
1670
 
1669
1671
 
1672
+
1670
1673
 
1671
1674
 
1672
1675
 
@@ -1683,6 +1686,7 @@ class Profile {
1683
1686
  lines: plain.lines.map(line => Line.parse(line)),
1684
1687
  username: plain.username,
1685
1688
  mobileNumber: plain.mobile_phone_number || '',
1689
+ ringSeconds: plain.ring_seconds,
1686
1690
  forwards: [
1687
1691
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1688
1692
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1719,6 +1723,7 @@ class Profile {
1719
1723
  switchboards,
1720
1724
  agent,
1721
1725
  status,
1726
+ ringSeconds,
1722
1727
  sipLines,
1723
1728
  callPickupTargetUsers,
1724
1729
  onlineCallRecordEnabled,
@@ -1740,6 +1745,7 @@ class Profile {
1740
1745
  this.status = status;
1741
1746
  this.callPickupTargetUsers = callPickupTargetUsers;
1742
1747
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1748
+ this.ringSeconds = ringSeconds;
1743
1749
 
1744
1750
  this.sipLines = sipLines || [];
1745
1751
  }
@@ -2745,6 +2751,7 @@ var authMethods = (client , baseUrl ) => ({
2745
2751
 
2746
2752
 
2747
2753
 
2754
+
2748
2755
  ) {
2749
2756
  const body = {
2750
2757
  backend: params.backend || DEFAULT_BACKEND_USER,
@@ -2764,6 +2771,10 @@ var authMethods = (client , baseUrl ) => ({
2764
2771
  headers['Wazo-Session-Type'] = 'mobile';
2765
2772
  }
2766
2773
 
2774
+ if (params.tenantId) {
2775
+ body.tenant_id = params.tenantId;
2776
+ }
2777
+
2767
2778
  return client.post(`${baseUrl}/token`, body, headers).then(response => Session.parse(response));
2768
2779
  },
2769
2780
 
@@ -3832,11 +3843,13 @@ class Recording {
3832
3843
 
3833
3844
 
3834
3845
 
3846
+
3835
3847
 
3836
3848
 
3837
3849
 
3838
3850
 
3839
3851
 
3852
+
3840
3853
 
3841
3854
 
3842
3855
 
@@ -3857,10 +3870,12 @@ class Recording {
3857
3870
 
3858
3871
 
3859
3872
 
3873
+
3860
3874
 
3861
3875
 
3862
3876
 
3863
3877
 
3878
+
3864
3879
 
3865
3880
 
3866
3881
 
@@ -3922,10 +3937,12 @@ class CallLog {
3922
3937
  || plain.destination_extension
3923
3938
  || `meeting-${plain.requested_name || plain.destination_name || ''}`,
3924
3939
  name: plain.requested_name || plain.destination_name || '',
3940
+ uuid: plain.destination_user_uuid,
3925
3941
  },
3926
3942
  source: {
3927
3943
  extension: plain.source_extension,
3928
3944
  name: plain.source_name,
3945
+ uuid: plain.source_user_uuid,
3929
3946
  },
3930
3947
  id: plain.id,
3931
3948
  duration: (plain.duration || 0) * 1000, // duration is in seconds
@@ -5362,7 +5379,7 @@ const ON_NETWORK_STATS = 'onNetworkStats';
5362
5379
  const ON_DISCONNECTED = 'onDisconnected';
5363
5380
  class CanceledCallError extends Error {}
5364
5381
 
5365
- const MAX_REGISTER_TRIES = 10;
5382
+ const MAX_REGISTER_TRIES = 5;
5366
5383
 
5367
5384
 
5368
5385
 
@@ -1600,6 +1600,7 @@ const LINE_STATE = {
1600
1600
 
1601
1601
 
1602
1602
 
1603
+
1603
1604
 
1604
1605
 
1605
1606
 
@@ -1636,6 +1637,7 @@ const LINE_STATE = {
1636
1637
 
1637
1638
 
1638
1639
 
1640
+
1639
1641
 
1640
1642
 
1641
1643
 
@@ -1667,6 +1669,7 @@ class Profile {
1667
1669
 
1668
1670
 
1669
1671
 
1672
+
1670
1673
 
1671
1674
 
1672
1675
 
@@ -1683,6 +1686,7 @@ class Profile {
1683
1686
  lines: plain.lines.map(line => Line.parse(line)),
1684
1687
  username: plain.username,
1685
1688
  mobileNumber: plain.mobile_phone_number || '',
1689
+ ringSeconds: plain.ring_seconds,
1686
1690
  forwards: [
1687
1691
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1688
1692
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1719,6 +1723,7 @@ class Profile {
1719
1723
  switchboards,
1720
1724
  agent,
1721
1725
  status,
1726
+ ringSeconds,
1722
1727
  sipLines,
1723
1728
  callPickupTargetUsers,
1724
1729
  onlineCallRecordEnabled,
@@ -1740,6 +1745,7 @@ class Profile {
1740
1745
  this.status = status;
1741
1746
  this.callPickupTargetUsers = callPickupTargetUsers;
1742
1747
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1748
+ this.ringSeconds = ringSeconds;
1743
1749
 
1744
1750
  this.sipLines = sipLines || [];
1745
1751
  }
@@ -2745,6 +2751,7 @@ var authMethods = (client , baseUrl ) => ({
2745
2751
 
2746
2752
 
2747
2753
 
2754
+
2748
2755
  ) {
2749
2756
  const body = {
2750
2757
  backend: params.backend || DEFAULT_BACKEND_USER,
@@ -2764,6 +2771,10 @@ var authMethods = (client , baseUrl ) => ({
2764
2771
  headers['Wazo-Session-Type'] = 'mobile';
2765
2772
  }
2766
2773
 
2774
+ if (params.tenantId) {
2775
+ body.tenant_id = params.tenantId;
2776
+ }
2777
+
2767
2778
  return client.post(`${baseUrl}/token`, body, headers).then(response => Session.parse(response));
2768
2779
  },
2769
2780
 
@@ -3832,11 +3843,13 @@ class Recording {
3832
3843
 
3833
3844
 
3834
3845
 
3846
+
3835
3847
 
3836
3848
 
3837
3849
 
3838
3850
 
3839
3851
 
3852
+
3840
3853
 
3841
3854
 
3842
3855
 
@@ -3857,10 +3870,12 @@ class Recording {
3857
3870
 
3858
3871
 
3859
3872
 
3873
+
3860
3874
 
3861
3875
 
3862
3876
 
3863
3877
 
3878
+
3864
3879
 
3865
3880
 
3866
3881
 
@@ -3922,10 +3937,12 @@ class CallLog {
3922
3937
  || plain.destination_extension
3923
3938
  || `meeting-${plain.requested_name || plain.destination_name || ''}`,
3924
3939
  name: plain.requested_name || plain.destination_name || '',
3940
+ uuid: plain.destination_user_uuid,
3925
3941
  },
3926
3942
  source: {
3927
3943
  extension: plain.source_extension,
3928
3944
  name: plain.source_name,
3945
+ uuid: plain.source_user_uuid,
3929
3946
  },
3930
3947
  id: plain.id,
3931
3948
  duration: (plain.duration || 0) * 1000, // duration is in seconds
@@ -5362,7 +5379,7 @@ const ON_NETWORK_STATS = 'onNetworkStats';
5362
5379
  const ON_DISCONNECTED = 'onDisconnected';
5363
5380
  class CanceledCallError extends Error {}
5364
5381
 
5365
- const MAX_REGISTER_TRIES = 10;
5382
+ const MAX_REGISTER_TRIES = 5;
5366
5383
 
5367
5384
 
5368
5385
 
@@ -1261,6 +1261,7 @@ const LINE_STATE = {
1261
1261
 
1262
1262
 
1263
1263
 
1264
+
1264
1265
 
1265
1266
 
1266
1267
 
@@ -1297,6 +1298,7 @@ const LINE_STATE = {
1297
1298
 
1298
1299
 
1299
1300
 
1301
+
1300
1302
 
1301
1303
 
1302
1304
 
@@ -1328,6 +1330,7 @@ class Profile {
1328
1330
 
1329
1331
 
1330
1332
 
1333
+
1331
1334
 
1332
1335
 
1333
1336
 
@@ -1344,6 +1347,7 @@ class Profile {
1344
1347
  lines: plain.lines.map(line => Line.parse(line)),
1345
1348
  username: plain.username,
1346
1349
  mobileNumber: plain.mobile_phone_number || '',
1350
+ ringSeconds: plain.ring_seconds,
1347
1351
  forwards: [
1348
1352
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1349
1353
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1380,6 +1384,7 @@ class Profile {
1380
1384
  switchboards,
1381
1385
  agent,
1382
1386
  status,
1387
+ ringSeconds,
1383
1388
  sipLines,
1384
1389
  callPickupTargetUsers,
1385
1390
  onlineCallRecordEnabled,
@@ -1401,6 +1406,7 @@ class Profile {
1401
1406
  this.status = status;
1402
1407
  this.callPickupTargetUsers = callPickupTargetUsers;
1403
1408
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1409
+ this.ringSeconds = ringSeconds;
1404
1410
 
1405
1411
  this.sipLines = sipLines || [];
1406
1412
  }
@@ -2406,6 +2412,7 @@ var authMethods = (client , baseUrl ) => ({
2406
2412
 
2407
2413
 
2408
2414
 
2415
+
2409
2416
  ) {
2410
2417
  const body = {
2411
2418
  backend: params.backend || DEFAULT_BACKEND_USER,
@@ -2425,6 +2432,10 @@ var authMethods = (client , baseUrl ) => ({
2425
2432
  headers['Wazo-Session-Type'] = 'mobile';
2426
2433
  }
2427
2434
 
2435
+ if (params.tenantId) {
2436
+ body.tenant_id = params.tenantId;
2437
+ }
2438
+
2428
2439
  return client.post(`${baseUrl}/token`, body, headers).then(response => Session.parse(response));
2429
2440
  },
2430
2441
 
@@ -3284,11 +3295,13 @@ class Recording {
3284
3295
 
3285
3296
 
3286
3297
 
3298
+
3287
3299
 
3288
3300
 
3289
3301
 
3290
3302
 
3291
3303
 
3304
+
3292
3305
 
3293
3306
 
3294
3307
 
@@ -3309,10 +3322,12 @@ class Recording {
3309
3322
 
3310
3323
 
3311
3324
 
3325
+
3312
3326
 
3313
3327
 
3314
3328
 
3315
3329
 
3330
+
3316
3331
 
3317
3332
 
3318
3333
 
@@ -3374,10 +3389,12 @@ class CallLog {
3374
3389
  || plain.destination_extension
3375
3390
  || `meeting-${plain.requested_name || plain.destination_name || ''}`,
3376
3391
  name: plain.requested_name || plain.destination_name || '',
3392
+ uuid: plain.destination_user_uuid,
3377
3393
  },
3378
3394
  source: {
3379
3395
  extension: plain.source_extension,
3380
3396
  name: plain.source_name,
3397
+ uuid: plain.source_user_uuid,
3381
3398
  },
3382
3399
  id: plain.id,
3383
3400
  duration: (plain.duration || 0) * 1000, // duration is in seconds
@@ -4783,6 +4800,10 @@ class AdHocAPIConference {
4783
4800
  this.conferenceId = conferenceId || '';
4784
4801
  this.muted = muted || false;
4785
4802
  this.paused = paused || false;
4803
+
4804
+ if (this.host) {
4805
+ this.host.setIsConference(true);
4806
+ }
4786
4807
  }
4787
4808
 
4788
4809
  async start() {
@@ -87,11 +87,13 @@ class Recording {
87
87
 
88
88
 
89
89
 
90
+
90
91
 
91
92
 
92
93
 
93
94
 
94
95
 
96
+
95
97
 
96
98
 
97
99
 
@@ -112,10 +114,12 @@ class Recording {
112
114
 
113
115
 
114
116
 
117
+
115
118
 
116
119
 
117
120
 
118
121
 
122
+
119
123
 
120
124
 
121
125
 
@@ -177,10 +181,12 @@ class CallLog {
177
181
  || plain.destination_extension
178
182
  || `meeting-${plain.requested_name || plain.destination_name || ''}`,
179
183
  name: plain.requested_name || plain.destination_name || '',
184
+ uuid: plain.destination_user_uuid,
180
185
  },
181
186
  source: {
182
187
  extension: plain.source_extension,
183
188
  name: plain.source_name,
189
+ uuid: plain.source_user_uuid,
184
190
  },
185
191
  id: plain.id,
186
192
  duration: (plain.duration || 0) * 1000, // duration is in seconds
@@ -59,6 +59,7 @@ var updateFrom = (instance , from ) => {
59
59
 
60
60
 
61
61
 
62
+
62
63
 
63
64
 
64
65
  class CallSession {
@@ -121,6 +122,8 @@ class CallSession {
121
122
 
122
123
 
123
124
 
125
+
126
+
124
127
 
125
128
 
126
129
 
@@ -152,6 +155,7 @@ class CallSession {
152
155
  videoRemotelyDowngraded,
153
156
  sipSession,
154
157
  answerTime,
158
+ conference,
155
159
  } ) {
156
160
  this.callId = callId;
157
161
  this.sipCallId = sipCallId;
@@ -180,6 +184,7 @@ class CallSession {
180
184
  this.videoRemotelyDowngraded = videoRemotelyDowngraded;
181
185
  this.sipSession = sipSession;
182
186
  this.answerTime = answerTime || this.answerTime;
187
+ this.conference = conference;
183
188
 
184
189
  // Useful to compare instead of instanceof with minified code
185
190
  this.type = 'CallSession';
@@ -237,6 +242,10 @@ class CallSession {
237
242
  this.screensharing = false;
238
243
  }
239
244
 
245
+ setIsConference(conference ) {
246
+ this.conference = conference;
247
+ }
248
+
240
249
  isIncoming() {
241
250
  return !this.isCaller && !this.answered;
242
251
  }
@@ -313,6 +322,10 @@ class CallSession {
313
322
  return this.sipStatus === SessionState.Terminated;
314
323
  }
315
324
 
325
+ isConference() {
326
+ return this.conference;
327
+ }
328
+
316
329
  getElapsedTimeInSeconds() {
317
330
  if (!this.startTime) {
318
331
  return 0;
@@ -404,6 +417,7 @@ class CallSession {
404
417
  cameraEnabled: false,
405
418
  dialedExtension: call.dialedExtension,
406
419
  call,
420
+ conference: false, // @FIXME?
407
421
  });
408
422
  }
409
423
  }