@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
@@ -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
 
package/esm/api/auth.js CHANGED
@@ -960,6 +960,7 @@ var auth = (client , baseUrl ) => ({
960
960
 
961
961
 
962
962
 
963
+
963
964
  ) {
964
965
  const body = {
965
966
  backend: params.backend || DEFAULT_BACKEND_USER,
@@ -979,6 +980,10 @@ var auth = (client , baseUrl ) => ({
979
980
  headers['Wazo-Session-Type'] = 'mobile';
980
981
  }
981
982
 
983
+ if (params.tenantId) {
984
+ body.tenant_id = params.tenantId;
985
+ }
986
+
982
987
  return client.post(`${baseUrl}/token`, body, headers).then(response => Session.parse(response));
983
988
  },
984
989
 
@@ -477,11 +477,13 @@ class Recording {
477
477
 
478
478
 
479
479
 
480
+
480
481
 
481
482
 
482
483
 
483
484
 
484
485
 
486
+
485
487
 
486
488
 
487
489
 
@@ -502,10 +504,12 @@ class Recording {
502
504
 
503
505
 
504
506
 
507
+
505
508
 
506
509
 
507
510
 
508
511
 
512
+
509
513
 
510
514
 
511
515
 
@@ -567,10 +571,12 @@ class CallLog {
567
571
  || plain.destination_extension
568
572
  || `meeting-${plain.requested_name || plain.destination_name || ''}`,
569
573
  name: plain.requested_name || plain.destination_name || '',
574
+ uuid: plain.destination_user_uuid,
570
575
  },
571
576
  source: {
572
577
  extension: plain.source_extension,
573
578
  name: plain.source_name,
579
+ uuid: plain.source_user_uuid,
574
580
  },
575
581
  id: plain.id,
576
582
  duration: (plain.duration || 0) * 1000, // duration is in seconds
package/esm/api/chatd.js CHANGED
@@ -881,6 +881,7 @@ const LINE_STATE = {
881
881
 
882
882
 
883
883
 
884
+
884
885
 
885
886
 
886
887
 
@@ -917,6 +918,7 @@ const LINE_STATE = {
917
918
 
918
919
 
919
920
 
921
+
920
922
 
921
923
 
922
924
 
@@ -948,6 +950,7 @@ class Profile {
948
950
 
949
951
 
950
952
 
953
+
951
954
 
952
955
 
953
956
 
@@ -964,6 +967,7 @@ class Profile {
964
967
  lines: plain.lines.map(line => Line.parse(line)),
965
968
  username: plain.username,
966
969
  mobileNumber: plain.mobile_phone_number || '',
970
+ ringSeconds: plain.ring_seconds,
967
971
  forwards: [
968
972
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
969
973
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1000,6 +1004,7 @@ class Profile {
1000
1004
  switchboards,
1001
1005
  agent,
1002
1006
  status,
1007
+ ringSeconds,
1003
1008
  sipLines,
1004
1009
  callPickupTargetUsers,
1005
1010
  onlineCallRecordEnabled,
@@ -1021,6 +1026,7 @@ class Profile {
1021
1026
  this.status = status;
1022
1027
  this.callPickupTargetUsers = callPickupTargetUsers;
1023
1028
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1029
+ this.ringSeconds = ringSeconds;
1024
1030
 
1025
1031
  this.sipLines = sipLines || [];
1026
1032
  }
package/esm/api/confd.js CHANGED
@@ -1028,6 +1028,7 @@ const LINE_STATE = {
1028
1028
 
1029
1029
 
1030
1030
 
1031
+
1031
1032
 
1032
1033
 
1033
1034
 
@@ -1064,6 +1065,7 @@ const LINE_STATE = {
1064
1065
 
1065
1066
 
1066
1067
 
1068
+
1067
1069
 
1068
1070
 
1069
1071
 
@@ -1095,6 +1097,7 @@ class Profile {
1095
1097
 
1096
1098
 
1097
1099
 
1100
+
1098
1101
 
1099
1102
 
1100
1103
 
@@ -1111,6 +1114,7 @@ class Profile {
1111
1114
  lines: plain.lines.map(line => Line.parse(line)),
1112
1115
  username: plain.username,
1113
1116
  mobileNumber: plain.mobile_phone_number || '',
1117
+ ringSeconds: plain.ring_seconds,
1114
1118
  forwards: [
1115
1119
  ForwardOption.parse(plain.forwards.unconditional, FORWARD_KEYS.UNCONDITIONAL),
1116
1120
  ForwardOption.parse(plain.forwards.noanswer, FORWARD_KEYS.NO_ANSWER),
@@ -1147,6 +1151,7 @@ class Profile {
1147
1151
  switchboards,
1148
1152
  agent,
1149
1153
  status,
1154
+ ringSeconds,
1150
1155
  sipLines,
1151
1156
  callPickupTargetUsers,
1152
1157
  onlineCallRecordEnabled,
@@ -1168,6 +1173,7 @@ class Profile {
1168
1173
  this.status = status;
1169
1174
  this.callPickupTargetUsers = callPickupTargetUsers;
1170
1175
  this.onlineCallRecordEnabled = onlineCallRecordEnabled;
1176
+ this.ringSeconds = ringSeconds;
1171
1177
 
1172
1178
  this.sipLines = sipLines || [];
1173
1179
  }
package/esm/api-client.js CHANGED
@@ -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
 
@@ -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