@wazo/sdk 0.47.4 → 0.47.6

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.
package/dist/index.js CHANGED
@@ -52,6 +52,7 @@ __webpack_require__.d(__webpack_exports__, {
52
52
  setOnRefreshToken: ()=>setOnRefreshToken,
53
53
  Profile: ()=>Profile,
54
54
  getCallableNumber: ()=>getCallableNumber,
55
+ UserIdentity: ()=>UserIdentity,
55
56
  obfuscateToken: ()=>obfuscateToken,
56
57
  IndirectTransfer: ()=>IndirectTransfer,
57
58
  SipLine: ()=>SipLine,
@@ -95,7 +96,7 @@ __webpack_require__.d(__webpack_exports__, {
95
96
  Contact: ()=>Contact,
96
97
  setCurrentServer: ()=>setCurrentServer,
97
98
  parsePhoneNumber: ()=>parsePhoneNumber,
98
- SessionDescriptionHandler: ()=>lib_WazoSessionDescriptionHandler,
99
+ SessionDescriptionHandler: ()=>WazoSessionDescriptionHandler,
99
100
  default: ()=>src_0,
100
101
  SFUNotAvailableError: ()=>SFUNotAvailableError,
101
102
  Incall: ()=>Incall,
@@ -151,6 +152,7 @@ __webpack_require__.d(websocket_client_namespaceObject, {
151
152
  CALL_LOG_USER_CREATED: ()=>CALL_LOG_USER_CREATED,
152
153
  CALL_RESUMED: ()=>CALL_RESUMED,
153
154
  CALL_UPDATED: ()=>CALL_UPDATED,
155
+ CHATD_MESSAGE_DELIVERY_STATUS: ()=>CHATD_MESSAGE_DELIVERY_STATUS,
154
156
  CHATD_PRESENCE_UPDATED: ()=>CHATD_PRESENCE_UPDATED,
155
157
  CHATD_USER_ROOM_CREATED: ()=>CHATD_USER_ROOM_CREATED,
156
158
  CHATD_USER_ROOM_MESSAGE_CREATED: ()=>CHATD_USER_ROOM_MESSAGE_CREATED,
@@ -1434,6 +1436,9 @@ class ChatMessage {
1434
1436
  userUuid;
1435
1437
  roomUuid;
1436
1438
  read;
1439
+ channelType;
1440
+ backend;
1441
+ deliveryStatus;
1437
1442
  static parseMany(plain) {
1438
1443
  if (!plain || !plain.items) return [];
1439
1444
  return plain.items.map((item)=>ChatMessage.parse(item));
@@ -1446,13 +1451,16 @@ class ChatMessage {
1446
1451
  alias: plain.alias,
1447
1452
  userUuid: plain.user_uuid,
1448
1453
  read: true,
1449
- roomUuid: plain.room ? plain.room.uuid : null
1454
+ roomUuid: plain.room ? plain.room.uuid : null,
1455
+ channelType: plain.delivery?.type ?? 'internal',
1456
+ backend: plain.delivery?.backend ?? null,
1457
+ deliveryStatus: plain.delivery?.status ?? null
1450
1458
  });
1451
1459
  }
1452
1460
  static newFrom(message) {
1453
1461
  return new_from(message, ChatMessage);
1454
1462
  }
1455
- constructor({ uuid, date, content, userUuid, alias, roomUuid, read } = {}){
1463
+ constructor({ uuid, date, content, userUuid, alias, roomUuid, read, channelType, backend, deliveryStatus } = {}){
1456
1464
  this.uuid = uuid;
1457
1465
  this.date = date;
1458
1466
  this.content = content;
@@ -1461,6 +1469,9 @@ class ChatMessage {
1461
1469
  this.roomUuid = roomUuid;
1462
1470
  this.read = read;
1463
1471
  this.type = 'ChatMessage';
1472
+ this.channelType = channelType ?? 'internal';
1473
+ this.backend = backend ?? null;
1474
+ this.deliveryStatus = deliveryStatus ?? null;
1464
1475
  }
1465
1476
  is(other) {
1466
1477
  return this.uuid === other.uuid;
@@ -2741,6 +2752,7 @@ class ChatRoom {
2741
2752
  name;
2742
2753
  users;
2743
2754
  kind;
2755
+ capabilities;
2744
2756
  static parseMany(plain) {
2745
2757
  if (!plain || !plain.items) return [];
2746
2758
  return plain.items.map((item)=>ChatRoom.parse(item));
@@ -2750,20 +2762,53 @@ class ChatRoom {
2750
2762
  uuid: plain.uuid,
2751
2763
  name: plain.name,
2752
2764
  users: plain.users,
2753
- kind: plain.kind
2765
+ kind: plain.kind,
2766
+ capabilities: plain.capabilities ?? [
2767
+ 'internal'
2768
+ ]
2754
2769
  });
2755
2770
  }
2756
2771
  static newFrom(room) {
2757
2772
  return new_from(room, ChatRoom);
2758
2773
  }
2759
- constructor({ uuid, name, users, kind } = {}){
2774
+ constructor({ uuid, name, users, kind, capabilities } = {}){
2760
2775
  this.uuid = uuid;
2761
2776
  this.name = name;
2762
2777
  this.users = users;
2763
2778
  this.kind = kind;
2779
+ this.capabilities = capabilities ?? [
2780
+ 'internal'
2781
+ ];
2764
2782
  this.type = 'ChatRoom';
2765
2783
  }
2766
2784
  }
2785
+ class UserIdentity {
2786
+ uuid;
2787
+ type;
2788
+ backend;
2789
+ identity;
2790
+ static parseMany(plain) {
2791
+ if (!plain?.items) return [];
2792
+ return plain.items.map((item)=>UserIdentity.parse(item));
2793
+ }
2794
+ static parse(plain) {
2795
+ return new UserIdentity({
2796
+ uuid: plain.uuid,
2797
+ type: plain.type,
2798
+ backend: plain.backend,
2799
+ identity: plain.identity
2800
+ });
2801
+ }
2802
+ static newFrom(userIdentity) {
2803
+ return new_from(userIdentity, UserIdentity);
2804
+ }
2805
+ constructor({ uuid, type, backend, identity } = {}){
2806
+ this.uuid = uuid;
2807
+ this.type = type;
2808
+ this.backend = backend;
2809
+ this.identity = identity;
2810
+ }
2811
+ }
2767
2812
  const MAX_PRESENCE_FETCHED = 30;
2768
2813
  const chatd = (client, baseUrl)=>({
2769
2814
  updateState: (contactUuid, state)=>client.put(`${baseUrl}/users/${contactUuid}/presences`, {
@@ -2803,8 +2848,23 @@ const chatd = (client, baseUrl)=>({
2803
2848
  const qs = ApiRequester.getQueryString(params || {});
2804
2849
  return client.get(`${baseUrl}/users/me/rooms/${roomUuid}/messages${qs.length ? `?${qs}` : ''}`).then((response)=>ChatMessage.parseMany(response));
2805
2850
  },
2806
- sendRoomMessage: async (roomUuid, message)=>client.post(`${baseUrl}/users/me/rooms/${roomUuid}/messages`, message).then(ChatMessage.parse),
2807
- getMessages: async (options)=>client.get(`${baseUrl}/users/me/rooms/messages`, options)
2851
+ sendRoomMessage: async (roomUuid, message, senderIdentityUuid)=>{
2852
+ const senderIdentity = senderIdentityUuid ? {
2853
+ sender_identity_uuid: senderIdentityUuid
2854
+ } : {};
2855
+ const body = {
2856
+ ...message,
2857
+ ...senderIdentity
2858
+ };
2859
+ return client.post(`${baseUrl}/users/me/rooms/${roomUuid}/messages`, body).then(ChatMessage.parse);
2860
+ },
2861
+ getMessages: async (options)=>client.get(`${baseUrl}/users/me/rooms/messages`, options),
2862
+ getIdentities: async (roomUuid)=>{
2863
+ const query = roomUuid ? {
2864
+ room_uuid: roomUuid
2865
+ } : void 0;
2866
+ return client.get(`${baseUrl}/users/me/identities`, query).then((response)=>UserIdentity.parseMany(response));
2867
+ }
2808
2868
  });
2809
2869
  class IndirectTransfer {
2810
2870
  status;
@@ -4244,6 +4304,7 @@ const AUTH_USER_EXTERNAL_AUTH_DELETED = 'auth_user_external_auth_deleted';
4244
4304
  const CHATD_PRESENCE_UPDATED = 'chatd_presence_updated';
4245
4305
  const CHATD_USER_ROOM_MESSAGE_CREATED = 'chatd_user_room_message_created';
4246
4306
  const CHATD_USER_ROOM_CREATED = 'chatd_user_room_created';
4307
+ const CHATD_MESSAGE_DELIVERY_STATUS = 'chatd_message_delivery_status';
4247
4308
  const CONFERENCE_USER_PARTICIPANT_JOINED = 'conference_user_participant_joined';
4248
4309
  const CONFERENCE_USER_PARTICIPANT_LEFT = 'conference_user_participant_left';
4249
4310
  const CONFERENCE_USER_PARTICIPANT_TALK_STARTED = 'conference_user_participant_talk_started';
@@ -4579,6 +4640,7 @@ WebSocketClient.eventLists = [
4579
4640
  CHATD_PRESENCE_UPDATED,
4580
4641
  CHATD_USER_ROOM_MESSAGE_CREATED,
4581
4642
  CHATD_USER_ROOM_CREATED,
4643
+ CHATD_MESSAGE_DELIVERY_STATUS,
4582
4644
  CONFERENCE_USER_PARTICIPANT_JOINED,
4583
4645
  CONFERENCE_USER_PARTICIPANT_LEFT,
4584
4646
  MEETING_USER_PARTICIPANT_JOINED,
@@ -4729,7 +4791,7 @@ const wazoMediaStreamFactory = (constraints)=>{
4729
4791
  if (constraints.screen && !constraints.desktop) return navigator.mediaDevices.getDisplayMedia.call(navigator.mediaDevices, constraints);
4730
4792
  return navigator.mediaDevices.getUserMedia.call(navigator.mediaDevices, constraints);
4731
4793
  };
4732
- class WazoSessionDescriptionHandler extends session_description_handler_namespaceObject.SessionDescriptionHandler {
4794
+ class WazoSessionDescriptionHandler_WazoSessionDescriptionHandler extends session_description_handler_namespaceObject.SessionDescriptionHandler {
4733
4795
  gatheredCandidates;
4734
4796
  eventEmitter;
4735
4797
  isWeb;
@@ -5002,7 +5064,11 @@ class WazoSessionDescriptionHandler extends session_description_handler_namespac
5002
5064
  ...options.constraints
5003
5065
  } : {};
5004
5066
  if (this.localMediaStreamConstraints) {
5005
- if (JSON.stringify(this.localMediaStreamConstraints.audio) === JSON.stringify(constraints.audio) && JSON.stringify(this.localMediaStreamConstraints.video) === JSON.stringify(constraints.video)) return Promise.resolve();
5067
+ if (this._constraintsEqual(this.localMediaStreamConstraints.audio, constraints.audio) && this._constraintsEqual(this.localMediaStreamConstraints.video, constraints.video)) {
5068
+ const hasActiveAudio = !constraints.audio || (this._localMediaStream?.getAudioTracks() || []).some((t)=>'live' === t.readyState && t.enabled);
5069
+ const hasActiveVideo = !constraints.video || (this._localMediaStream?.getVideoTracks() || []).some((t)=>'live' === t.readyState && t.enabled);
5070
+ if (hasActiveAudio && hasActiveVideo) return Promise.resolve();
5071
+ }
5006
5072
  } else if (void 0 === constraints.audio && void 0 === constraints.video) constraints = {
5007
5073
  audio: true
5008
5074
  };
@@ -5012,8 +5078,22 @@ class WazoSessionDescriptionHandler extends session_description_handler_namespac
5012
5078
  return mediaStream;
5013
5079
  });
5014
5080
  }
5081
+ _constraintsEqual(a, b) {
5082
+ if (a === b) return true;
5083
+ if (typeof a !== typeof b) return false;
5084
+ if ('object' != typeof a || null === a || null === b) return a === b;
5085
+ if (Array.isArray(a) !== Array.isArray(b)) return false;
5086
+ if (Array.isArray(a)) {
5087
+ if (a.length !== b.length) return false;
5088
+ return a.every((val, i)=>this._constraintsEqual(val, b[i]));
5089
+ }
5090
+ const keysA = Object.keys(a).sort((x, y)=>x.localeCompare(y));
5091
+ const keysB = Object.keys(b).sort((x, y)=>x.localeCompare(y));
5092
+ if (keysA.length !== keysB.length) return false;
5093
+ return keysA.every((key, i)=>keysB[i] === key && this._constraintsEqual(a[key], b[key]));
5094
+ }
5015
5095
  }
5016
- const lib_WazoSessionDescriptionHandler = WazoSessionDescriptionHandler;
5096
+ const WazoSessionDescriptionHandler = WazoSessionDescriptionHandler_WazoSessionDescriptionHandler;
5017
5097
  const lastIndexOf = (array, method)=>{
5018
5098
  const start = array.length - 1;
5019
5099
  for(let i = start; i >= 0; i--)if (method(array[i])) return i;
@@ -5947,21 +6027,41 @@ class WebRTCClient extends Emitter {
5947
6027
  }
5948
6028
  }
5949
6029
  }
5950
- if (this.audio) this.audio = {
5951
- deviceId: {
5952
- exact: deviceId
5953
- }
5954
- };
6030
+ if (this.audio) {
6031
+ const prevAudio = 'object' == typeof this.audio ? this.audio : {};
6032
+ this.audio = {
6033
+ deviceId: {
6034
+ exact: deviceId
6035
+ },
6036
+ ...'autoGainControl' in prevAudio ? {
6037
+ autoGainControl: prevAudio.autoGainControl
6038
+ } : {},
6039
+ ...'noiseSuppression' in prevAudio ? {
6040
+ noiseSuppression: prevAudio.noiseSuppression
6041
+ } : {},
6042
+ ...'echoCancellation' in prevAudio ? {
6043
+ echoCancellation: prevAudio.echoCancellation
6044
+ } : {}
6045
+ };
6046
+ }
5955
6047
  if (session && navigator.mediaDevices) {
5956
6048
  const sdh = session.sessionDescriptionHandler;
5957
6049
  const pc = sdh?.peerConnection;
5958
6050
  const constraints = {
5959
- audio: {
6051
+ audio: 'object' == typeof this.audio ? {
6052
+ ...this.audio,
6053
+ deviceId: {
6054
+ exact: deviceId
6055
+ }
6056
+ } : {
5960
6057
  deviceId: {
5961
6058
  exact: deviceId
5962
6059
  }
5963
6060
  }
5964
6061
  };
6062
+ web_rtc_client_logger.info('changing audio input device with constraints', {
6063
+ constraints
6064
+ });
5965
6065
  const stream = await navigator.mediaDevices.getUserMedia(constraints);
5966
6066
  const audioTrack = stream.getAudioTracks()[0];
5967
6067
  const sender = pc && pc.getSenders && pc.getSenders().find((s)=>audioTrack && s && s.track && s.track.kind === audioTrack.kind);
@@ -6509,7 +6609,7 @@ class WebRTCClient extends Emitter {
6509
6609
  ...options.peerConnectionConfiguration || {}
6510
6610
  }
6511
6611
  };
6512
- return new lib_WazoSessionDescriptionHandler(uaLogger, wazoMediaStreamFactory, sdhOptions, isWeb, session);
6612
+ return new WazoSessionDescriptionHandler(uaLogger, wazoMediaStreamFactory, sdhOptions, isWeb, session);
6513
6613
  },
6514
6614
  transportOptions: {
6515
6615
  traceSip: uaOptionsOverrides?.traceSip || false,
@@ -9991,9 +10091,9 @@ class Participant_Participant extends Emitter {
9991
10091
  }
9992
10092
  }
9993
10093
  const Participant = Participant_Participant;
9994
- class LocalParticipant_LocalParticipant extends Participant {
10094
+ class LocalParticipant extends Participant {
9995
10095
  }
9996
- const LocalParticipant = LocalParticipant_LocalParticipant;
10096
+ const room_LocalParticipant = LocalParticipant;
9997
10097
  class RemoteParticipant extends Participant {
9998
10098
  constructor(room, rawParticipant, extra = {}){
9999
10099
  super(room, rawParticipant, extra);
@@ -10816,7 +10916,7 @@ const simple_Wazo = {
10816
10916
  Room: room_Room,
10817
10917
  SipRoom: room_SipRoom,
10818
10918
  RemoteParticipant: room_RemoteParticipant,
10819
- LocalParticipant: LocalParticipant,
10919
+ LocalParticipant: room_LocalParticipant,
10820
10920
  Participant: Participant,
10821
10921
  Stream: Stream,
10822
10922
  createLocalVideoStream: createLocalVideoStream,
package/dist/index.mjs CHANGED
@@ -94,6 +94,7 @@ __webpack_require__.d(websocket_client_namespaceObject, {
94
94
  CALL_LOG_USER_CREATED: ()=>CALL_LOG_USER_CREATED,
95
95
  CALL_RESUMED: ()=>CALL_RESUMED,
96
96
  CALL_UPDATED: ()=>CALL_UPDATED,
97
+ CHATD_MESSAGE_DELIVERY_STATUS: ()=>CHATD_MESSAGE_DELIVERY_STATUS,
97
98
  CHATD_PRESENCE_UPDATED: ()=>CHATD_PRESENCE_UPDATED,
98
99
  CHATD_USER_ROOM_CREATED: ()=>CHATD_USER_ROOM_CREATED,
99
100
  CHATD_USER_ROOM_MESSAGE_CREATED: ()=>CHATD_USER_ROOM_MESSAGE_CREATED,
@@ -1374,6 +1375,9 @@ class ChatMessage {
1374
1375
  userUuid;
1375
1376
  roomUuid;
1376
1377
  read;
1378
+ channelType;
1379
+ backend;
1380
+ deliveryStatus;
1377
1381
  static parseMany(plain) {
1378
1382
  if (!plain || !plain.items) return [];
1379
1383
  return plain.items.map((item)=>ChatMessage.parse(item));
@@ -1386,13 +1390,16 @@ class ChatMessage {
1386
1390
  alias: plain.alias,
1387
1391
  userUuid: plain.user_uuid,
1388
1392
  read: true,
1389
- roomUuid: plain.room ? plain.room.uuid : null
1393
+ roomUuid: plain.room ? plain.room.uuid : null,
1394
+ channelType: plain.delivery?.type ?? 'internal',
1395
+ backend: plain.delivery?.backend ?? null,
1396
+ deliveryStatus: plain.delivery?.status ?? null
1390
1397
  });
1391
1398
  }
1392
1399
  static newFrom(message) {
1393
1400
  return new_from(message, ChatMessage);
1394
1401
  }
1395
- constructor({ uuid, date, content, userUuid, alias, roomUuid, read } = {}){
1402
+ constructor({ uuid, date, content, userUuid, alias, roomUuid, read, channelType, backend, deliveryStatus } = {}){
1396
1403
  this.uuid = uuid;
1397
1404
  this.date = date;
1398
1405
  this.content = content;
@@ -1401,6 +1408,9 @@ class ChatMessage {
1401
1408
  this.roomUuid = roomUuid;
1402
1409
  this.read = read;
1403
1410
  this.type = 'ChatMessage';
1411
+ this.channelType = channelType ?? 'internal';
1412
+ this.backend = backend ?? null;
1413
+ this.deliveryStatus = deliveryStatus ?? null;
1404
1414
  }
1405
1415
  is(other) {
1406
1416
  return this.uuid === other.uuid;
@@ -2677,6 +2687,7 @@ class ChatRoom {
2677
2687
  name;
2678
2688
  users;
2679
2689
  kind;
2690
+ capabilities;
2680
2691
  static parseMany(plain) {
2681
2692
  if (!plain || !plain.items) return [];
2682
2693
  return plain.items.map((item)=>ChatRoom.parse(item));
@@ -2686,20 +2697,53 @@ class ChatRoom {
2686
2697
  uuid: plain.uuid,
2687
2698
  name: plain.name,
2688
2699
  users: plain.users,
2689
- kind: plain.kind
2700
+ kind: plain.kind,
2701
+ capabilities: plain.capabilities ?? [
2702
+ 'internal'
2703
+ ]
2690
2704
  });
2691
2705
  }
2692
2706
  static newFrom(room) {
2693
2707
  return new_from(room, ChatRoom);
2694
2708
  }
2695
- constructor({ uuid, name, users, kind } = {}){
2709
+ constructor({ uuid, name, users, kind, capabilities } = {}){
2696
2710
  this.uuid = uuid;
2697
2711
  this.name = name;
2698
2712
  this.users = users;
2699
2713
  this.kind = kind;
2714
+ this.capabilities = capabilities ?? [
2715
+ 'internal'
2716
+ ];
2700
2717
  this.type = 'ChatRoom';
2701
2718
  }
2702
2719
  }
2720
+ class UserIdentity {
2721
+ uuid;
2722
+ type;
2723
+ backend;
2724
+ identity;
2725
+ static parseMany(plain) {
2726
+ if (!plain?.items) return [];
2727
+ return plain.items.map((item)=>UserIdentity.parse(item));
2728
+ }
2729
+ static parse(plain) {
2730
+ return new UserIdentity({
2731
+ uuid: plain.uuid,
2732
+ type: plain.type,
2733
+ backend: plain.backend,
2734
+ identity: plain.identity
2735
+ });
2736
+ }
2737
+ static newFrom(userIdentity) {
2738
+ return new_from(userIdentity, UserIdentity);
2739
+ }
2740
+ constructor({ uuid, type, backend, identity } = {}){
2741
+ this.uuid = uuid;
2742
+ this.type = type;
2743
+ this.backend = backend;
2744
+ this.identity = identity;
2745
+ }
2746
+ }
2703
2747
  const MAX_PRESENCE_FETCHED = 30;
2704
2748
  const chatd = (client, baseUrl)=>({
2705
2749
  updateState: (contactUuid, state)=>client.put(`${baseUrl}/users/${contactUuid}/presences`, {
@@ -2739,8 +2783,23 @@ const chatd = (client, baseUrl)=>({
2739
2783
  const qs = ApiRequester.getQueryString(params || {});
2740
2784
  return client.get(`${baseUrl}/users/me/rooms/${roomUuid}/messages${qs.length ? `?${qs}` : ''}`).then((response)=>ChatMessage.parseMany(response));
2741
2785
  },
2742
- sendRoomMessage: async (roomUuid, message)=>client.post(`${baseUrl}/users/me/rooms/${roomUuid}/messages`, message).then(ChatMessage.parse),
2743
- getMessages: async (options)=>client.get(`${baseUrl}/users/me/rooms/messages`, options)
2786
+ sendRoomMessage: async (roomUuid, message, senderIdentityUuid)=>{
2787
+ const senderIdentity = senderIdentityUuid ? {
2788
+ sender_identity_uuid: senderIdentityUuid
2789
+ } : {};
2790
+ const body = {
2791
+ ...message,
2792
+ ...senderIdentity
2793
+ };
2794
+ return client.post(`${baseUrl}/users/me/rooms/${roomUuid}/messages`, body).then(ChatMessage.parse);
2795
+ },
2796
+ getMessages: async (options)=>client.get(`${baseUrl}/users/me/rooms/messages`, options),
2797
+ getIdentities: async (roomUuid)=>{
2798
+ const query = roomUuid ? {
2799
+ room_uuid: roomUuid
2800
+ } : void 0;
2801
+ return client.get(`${baseUrl}/users/me/identities`, query).then((response)=>UserIdentity.parseMany(response));
2802
+ }
2744
2803
  });
2745
2804
  class IndirectTransfer {
2746
2805
  status;
@@ -4177,6 +4236,7 @@ const AUTH_USER_EXTERNAL_AUTH_DELETED = 'auth_user_external_auth_deleted';
4177
4236
  const CHATD_PRESENCE_UPDATED = 'chatd_presence_updated';
4178
4237
  const CHATD_USER_ROOM_MESSAGE_CREATED = 'chatd_user_room_message_created';
4179
4238
  const CHATD_USER_ROOM_CREATED = 'chatd_user_room_created';
4239
+ const CHATD_MESSAGE_DELIVERY_STATUS = 'chatd_message_delivery_status';
4180
4240
  const CONFERENCE_USER_PARTICIPANT_JOINED = 'conference_user_participant_joined';
4181
4241
  const CONFERENCE_USER_PARTICIPANT_LEFT = 'conference_user_participant_left';
4182
4242
  const CONFERENCE_USER_PARTICIPANT_TALK_STARTED = 'conference_user_participant_talk_started';
@@ -4512,6 +4572,7 @@ WebSocketClient.eventLists = [
4512
4572
  CHATD_PRESENCE_UPDATED,
4513
4573
  CHATD_USER_ROOM_MESSAGE_CREATED,
4514
4574
  CHATD_USER_ROOM_CREATED,
4575
+ CHATD_MESSAGE_DELIVERY_STATUS,
4515
4576
  CONFERENCE_USER_PARTICIPANT_JOINED,
4516
4577
  CONFERENCE_USER_PARTICIPANT_LEFT,
4517
4578
  MEETING_USER_PARTICIPANT_JOINED,
@@ -4644,7 +4705,7 @@ const wazoMediaStreamFactory = (constraints)=>{
4644
4705
  if (constraints.screen && !constraints.desktop) return navigator.mediaDevices.getDisplayMedia.call(navigator.mediaDevices, constraints);
4645
4706
  return navigator.mediaDevices.getUserMedia.call(navigator.mediaDevices, constraints);
4646
4707
  };
4647
- class WazoSessionDescriptionHandler extends __WEBPACK_EXTERNAL_MODULE_sip_js_lib_platform_web_session_description_handler_session_description_handler_fdd90ea0__.SessionDescriptionHandler {
4708
+ class WazoSessionDescriptionHandler_WazoSessionDescriptionHandler extends __WEBPACK_EXTERNAL_MODULE_sip_js_lib_platform_web_session_description_handler_session_description_handler_fdd90ea0__.SessionDescriptionHandler {
4648
4709
  gatheredCandidates;
4649
4710
  eventEmitter;
4650
4711
  isWeb;
@@ -4917,7 +4978,11 @@ class WazoSessionDescriptionHandler extends __WEBPACK_EXTERNAL_MODULE_sip_js_lib
4917
4978
  ...options.constraints
4918
4979
  } : {};
4919
4980
  if (this.localMediaStreamConstraints) {
4920
- if (JSON.stringify(this.localMediaStreamConstraints.audio) === JSON.stringify(constraints.audio) && JSON.stringify(this.localMediaStreamConstraints.video) === JSON.stringify(constraints.video)) return Promise.resolve();
4981
+ if (this._constraintsEqual(this.localMediaStreamConstraints.audio, constraints.audio) && this._constraintsEqual(this.localMediaStreamConstraints.video, constraints.video)) {
4982
+ const hasActiveAudio = !constraints.audio || (this._localMediaStream?.getAudioTracks() || []).some((t)=>'live' === t.readyState && t.enabled);
4983
+ const hasActiveVideo = !constraints.video || (this._localMediaStream?.getVideoTracks() || []).some((t)=>'live' === t.readyState && t.enabled);
4984
+ if (hasActiveAudio && hasActiveVideo) return Promise.resolve();
4985
+ }
4921
4986
  } else if (void 0 === constraints.audio && void 0 === constraints.video) constraints = {
4922
4987
  audio: true
4923
4988
  };
@@ -4927,8 +4992,22 @@ class WazoSessionDescriptionHandler extends __WEBPACK_EXTERNAL_MODULE_sip_js_lib
4927
4992
  return mediaStream;
4928
4993
  });
4929
4994
  }
4995
+ _constraintsEqual(a, b) {
4996
+ if (a === b) return true;
4997
+ if (typeof a !== typeof b) return false;
4998
+ if ('object' != typeof a || null === a || null === b) return a === b;
4999
+ if (Array.isArray(a) !== Array.isArray(b)) return false;
5000
+ if (Array.isArray(a)) {
5001
+ if (a.length !== b.length) return false;
5002
+ return a.every((val, i)=>this._constraintsEqual(val, b[i]));
5003
+ }
5004
+ const keysA = Object.keys(a).sort((x, y)=>x.localeCompare(y));
5005
+ const keysB = Object.keys(b).sort((x, y)=>x.localeCompare(y));
5006
+ if (keysA.length !== keysB.length) return false;
5007
+ return keysA.every((key, i)=>keysB[i] === key && this._constraintsEqual(a[key], b[key]));
5008
+ }
4930
5009
  }
4931
- const lib_WazoSessionDescriptionHandler = WazoSessionDescriptionHandler;
5010
+ const WazoSessionDescriptionHandler = WazoSessionDescriptionHandler_WazoSessionDescriptionHandler;
4932
5011
  const lastIndexOf = (array, method)=>{
4933
5012
  const start = array.length - 1;
4934
5013
  for(let i = start; i >= 0; i--)if (method(array[i])) return i;
@@ -5862,21 +5941,41 @@ class WebRTCClient extends Emitter {
5862
5941
  }
5863
5942
  }
5864
5943
  }
5865
- if (this.audio) this.audio = {
5866
- deviceId: {
5867
- exact: deviceId
5868
- }
5869
- };
5944
+ if (this.audio) {
5945
+ const prevAudio = 'object' == typeof this.audio ? this.audio : {};
5946
+ this.audio = {
5947
+ deviceId: {
5948
+ exact: deviceId
5949
+ },
5950
+ ...'autoGainControl' in prevAudio ? {
5951
+ autoGainControl: prevAudio.autoGainControl
5952
+ } : {},
5953
+ ...'noiseSuppression' in prevAudio ? {
5954
+ noiseSuppression: prevAudio.noiseSuppression
5955
+ } : {},
5956
+ ...'echoCancellation' in prevAudio ? {
5957
+ echoCancellation: prevAudio.echoCancellation
5958
+ } : {}
5959
+ };
5960
+ }
5870
5961
  if (session && navigator.mediaDevices) {
5871
5962
  const sdh = session.sessionDescriptionHandler;
5872
5963
  const pc = sdh?.peerConnection;
5873
5964
  const constraints = {
5874
- audio: {
5965
+ audio: 'object' == typeof this.audio ? {
5966
+ ...this.audio,
5967
+ deviceId: {
5968
+ exact: deviceId
5969
+ }
5970
+ } : {
5875
5971
  deviceId: {
5876
5972
  exact: deviceId
5877
5973
  }
5878
5974
  }
5879
5975
  };
5976
+ web_rtc_client_logger.info('changing audio input device with constraints', {
5977
+ constraints
5978
+ });
5880
5979
  const stream = await navigator.mediaDevices.getUserMedia(constraints);
5881
5980
  const audioTrack = stream.getAudioTracks()[0];
5882
5981
  const sender = pc && pc.getSenders && pc.getSenders().find((s)=>audioTrack && s && s.track && s.track.kind === audioTrack.kind);
@@ -6424,7 +6523,7 @@ class WebRTCClient extends Emitter {
6424
6523
  ...options.peerConnectionConfiguration || {}
6425
6524
  }
6426
6525
  };
6427
- return new lib_WazoSessionDescriptionHandler(uaLogger, wazoMediaStreamFactory, sdhOptions, isWeb, session);
6526
+ return new WazoSessionDescriptionHandler(uaLogger, wazoMediaStreamFactory, sdhOptions, isWeb, session);
6428
6527
  },
6429
6528
  transportOptions: {
6430
6529
  traceSip: uaOptionsOverrides?.traceSip || false,
@@ -9906,9 +10005,9 @@ class Participant_Participant extends Emitter {
9906
10005
  }
9907
10006
  }
9908
10007
  const Participant = Participant_Participant;
9909
- class LocalParticipant_LocalParticipant extends Participant {
10008
+ class LocalParticipant extends Participant {
9910
10009
  }
9911
- const LocalParticipant = LocalParticipant_LocalParticipant;
10010
+ const room_LocalParticipant = LocalParticipant;
9912
10011
  class RemoteParticipant extends Participant {
9913
10012
  constructor(room, rawParticipant, extra = {}){
9914
10013
  super(room, rawParticipant, extra);
@@ -10731,7 +10830,7 @@ const simple_Wazo = {
10731
10830
  Room: room_Room,
10732
10831
  SipRoom: room_SipRoom,
10733
10832
  RemoteParticipant: room_RemoteParticipant,
10734
- LocalParticipant: LocalParticipant,
10833
+ LocalParticipant: room_LocalParticipant,
10735
10834
  Participant: Participant,
10736
10835
  Stream: Stream,
10737
10836
  createLocalVideoStream: createLocalVideoStream,
@@ -10918,4 +11017,4 @@ const getCallableNumber = (number, country)=>{
10918
11017
  };
10919
11018
  const { SOCKET_EVENTS: types_SOCKET_EVENTS, ...types_OTHER_EVENTS } = websocket_client_namespaceObject;
10920
11019
  const src_0 = simple;
10921
- export { AdHocAPIConference, domain_Agent as Agent, ApiRequester, BadResponse, BaseApiClient, Country as COUNTRIES, CTIPhone, Call, CallApi, CallLog, CallSession, CallerID, ChatMessage, ChatRoom, checker_Checker as Checker, Contact, DebugDevice, Emitter, ExternalApp, FORWARD_KEYS, domain_Features as Features, ForwardOption, Incall, IndirectTransfer, IssueReporter, LINE_STATE, Line, Meeting, MeetingAuthorization, MeetingStatus, NotificationOptions, STATE as PROFILE_STATE, Profile, RECORDING_STATE, Recording, domain_Relocation as Relocation, Room, SFUNotAvailableError, SOCKET_EVENTS, ServerError, Session, lib_WazoSessionDescriptionHandler as SessionDescriptionHandler, SipLine, domain_SwitchboardCall as SwitchboardCall, Voicemail, VoicemailFolder, ApiClient as WazoApiClient, WebRTCClient, WebRTCPhone, websocket_client as WebSocketClient, camelToUnderscore, src_0 as default, service_getApiClient as getApiClient, getCallableNumber, getDisplayableNumber, guessParsePhoneNumber, obfuscateToken, parsePhoneNumber, setApiToken, setCurrentServer, setIsMobile, setOnRefreshToken, setOnRefreshTokenError };
11020
+ export { AdHocAPIConference, domain_Agent as Agent, ApiRequester, BadResponse, BaseApiClient, Country as COUNTRIES, CTIPhone, Call, CallApi, CallLog, CallSession, CallerID, ChatMessage, ChatRoom, checker_Checker as Checker, Contact, DebugDevice, Emitter, ExternalApp, FORWARD_KEYS, domain_Features as Features, ForwardOption, Incall, IndirectTransfer, IssueReporter, LINE_STATE, Line, Meeting, MeetingAuthorization, MeetingStatus, NotificationOptions, STATE as PROFILE_STATE, Profile, RECORDING_STATE, Recording, domain_Relocation as Relocation, Room, SFUNotAvailableError, SOCKET_EVENTS, ServerError, Session, WazoSessionDescriptionHandler as SessionDescriptionHandler, SipLine, domain_SwitchboardCall as SwitchboardCall, UserIdentity, Voicemail, VoicemailFolder, ApiClient as WazoApiClient, WebRTCClient, WebRTCPhone, websocket_client as WebSocketClient, camelToUnderscore, src_0 as default, service_getApiClient as getApiClient, getCallableNumber, getDisplayableNumber, guessParsePhoneNumber, obfuscateToken, parsePhoneNumber, setApiToken, setCurrentServer, setIsMobile, setOnRefreshToken, setOnRefreshTokenError };
@@ -3,6 +3,7 @@ import type { PresenceResponse, UUID } from '../domain/types';
3
3
  import ChatRoom from '../domain/ChatRoom';
4
4
  import type { ChatUser, ChatMessageListResponse } from '../domain/ChatMessage';
5
5
  import ChatMessage from '../domain/ChatMessage';
6
+ import UserIdentity from '../domain/UserIdentity';
6
7
  type GetMessagesOptions = {
7
8
  direction?: string;
8
9
  limit?: number;
@@ -21,8 +22,9 @@ declare const _default: (client: ApiRequester, baseUrl: string) => {
21
22
  getUserRooms: () => Promise<Array<ChatRoom>>;
22
23
  createRoom: (name: string, users: Array<ChatUser>, kind?: string) => Promise<ChatRoom>;
23
24
  getRoomMessages: (roomUuid: string, params?: GetMessagesOptions) => Promise<Array<ChatMessage>>;
24
- sendRoomMessage: (roomUuid: string, message: ChatMessage) => Promise<ChatMessage>;
25
+ sendRoomMessage: (roomUuid: string, message: ChatMessage, senderIdentityUuid?: string) => Promise<ChatMessage>;
25
26
  getMessages: (options: GetMessagesOptions) => Promise<ChatMessageListResponse>;
27
+ getIdentities: (roomUuid?: string) => Promise<Array<UserIdentity>>;
26
28
  };
27
29
  export default _default;
28
30
  //# sourceMappingURL=chatd.d.ts.map
@@ -1 +1 @@
1
- {"version":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AC,QAAQ,CAAC;gCAMxD,MAAM,WAAW,kBAAkB,KAAG,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;gCAKjE,MAAM,WAAW,WAAW,uBAAuB,MAAM,KAAG,OAAO,CAAC,WAAW,CAAC;2BAMrF,kBAAkB,KAAG,OAAO,CAAC,uBAAuB,CAAC;+BAEjD,MAAM,KAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;;AAhExE,wBAoEI"}
@@ -2,10 +2,16 @@ export type ChatUser = {
2
2
  tenant_uuid: string;
3
3
  uuid: string;
4
4
  wazo_uuid: string;
5
+ identity?: string;
5
6
  };
6
7
  export type ChatMessageResponseRoom = {
7
8
  uuid: string | null | undefined;
8
9
  };
10
+ export type ChatMessageDelivery = {
11
+ type?: string;
12
+ backend?: string | null;
13
+ status?: string;
14
+ };
9
15
  export type ChatMessageResponse = {
10
16
  alias: string;
11
17
  content: string;
@@ -15,6 +21,7 @@ export type ChatMessageResponse = {
15
21
  uuid: string;
16
22
  wazo_uuid: string;
17
23
  room: ChatMessageResponseRoom | null | undefined;
24
+ delivery?: ChatMessageDelivery | null;
18
25
  };
19
26
  export type ChatMessageListResponse = {
20
27
  filtered: number;
@@ -30,10 +37,13 @@ export default class ChatMessage {
30
37
  userUuid: string;
31
38
  roomUuid: string | null | undefined;
32
39
  read: boolean;
40
+ channelType: string;
41
+ backend: string | null;
42
+ deliveryStatus: string | null;
33
43
  static parseMany(plain: ChatMessageListResponse): Array<ChatMessage>;
34
44
  static parse(plain: ChatMessageResponse): ChatMessage;
35
45
  static newFrom(message: ChatMessage): any;
36
- constructor({ uuid, date, content, userUuid, alias, roomUuid, read, }?: Record<string, any>);
46
+ constructor({ uuid, date, content, userUuid, alias, roomUuid, read, channelType, backend, deliveryStatus, }?: Record<string, any>);
37
47
  is(other: ChatMessage): boolean;
38
48
  isIncoming(userUuid: string): boolean;
39
49
  acknowledge(): this;
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMessage.d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AAK,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;CACnC,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,EAAE,MAAM,CAAC;IAEb,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,EAAE,IAAI,CAAC;IAEX,KAAK,EAAE,MAAM,CAAC;IAEd,QAAQ,EAAE,MAAM,CAAC;IAEjB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAEpC,IAAI,EAAE,OAAO,CAAC;IAEd,WAAW,EAAE,MAAM,CAAC;IAEpB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,uBAAuB,GAAG,KAAK,CAAC,WAAW,CAAC;IAQpE,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,mBAAmB,GAAG,WAAW;IAerD,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,WAAW;gBAIvB,EACV,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,OAAO,EACP,cAAc,GACf,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM;IAgB3B,EAAE,CAAC,KAAK,EAAE,WAAW;IAIrB,UAAU,CAAC,QAAQ,EAAE,MAAM;IAI3B,WAAW;CAMZ"}
@@ -4,6 +4,7 @@ export type RoomResponse = {
4
4
  uuid: string;
5
5
  users: Array<ChatUser>;
6
6
  kind?: string;
7
+ capabilities?: string[];
7
8
  };
8
9
  export type RootListResponse = {
9
10
  filtered: number;
@@ -16,9 +17,10 @@ export default class ChatRoom {
16
17
  name: string;
17
18
  users: Array<ChatUser>;
18
19
  kind?: string;
20
+ capabilities: string[];
19
21
  static parseMany(plain: RootListResponse): Array<ChatRoom>;
20
22
  static parse(plain: RoomResponse): ChatRoom;
21
23
  static newFrom(room: ChatRoom): any;
22
- constructor({ uuid, name, users, kind, }?: Record<string, any>);
24
+ constructor({ uuid, name, users, kind, capabilities, }?: Record<string, any>);
23
25
  }
24
26
  //# sourceMappingURL=ChatRoom.d.ts.map