@wazo/sdk 0.47.5 → 0.47.7
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 +109 -14
- package/dist/index.mjs +107 -14
- package/dist/types/api/chatd.d.ts +3 -1
- package/dist/types/api/chatd.d.ts.map +1 -1
- package/dist/types/domain/CallSession.d.ts +3 -1
- package/dist/types/domain/CallSession.d.ts.map +1 -1
- package/dist/types/domain/ChatMessage.d.ts +11 -1
- package/dist/types/domain/ChatMessage.d.ts.map +1 -1
- package/dist/types/domain/ChatRoom.d.ts +3 -1
- package/dist/types/domain/ChatRoom.d.ts.map +1 -1
- package/dist/types/domain/Phone/WebRTCPhone.d.ts.map +1 -1
- package/dist/types/domain/UserIdentity.d.ts +21 -0
- package/dist/types/domain/UserIdentity.d.ts.map +1 -0
- package/dist/types/domain/types.d.ts +2 -0
- package/dist/types/domain/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/WebSocketMessage.d.ts +11 -1
- package/dist/types/types/WebSocketMessage.d.ts.map +1 -1
- package/dist/types/utils/__tests__/sip-diversion.test.d.ts +2 -0
- package/dist/types/utils/__tests__/sip-diversion.test.d.ts.map +1 -0
- package/dist/types/utils/sip-diversion.d.ts +8 -0
- package/dist/types/utils/sip-diversion.d.ts.map +1 -0
- package/dist/types/web-rtc-client.d.ts.map +1 -1
- package/dist/types/websocket-client.d.ts +1 -0
- package/dist/types/websocket-client.d.ts.map +1 -1
- package/dist/wazo-sdk.js +105 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -52,10 +52,12 @@ __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,
|
|
58
59
|
getDisplayableNumber: ()=>getDisplayableNumber,
|
|
60
|
+
parseDiversionHeader: ()=>parseDiversionHeader,
|
|
59
61
|
Agent: ()=>domain_Agent,
|
|
60
62
|
SwitchboardCall: ()=>domain_SwitchboardCall,
|
|
61
63
|
NotificationOptions: ()=>NotificationOptions,
|
|
@@ -95,7 +97,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
95
97
|
Contact: ()=>Contact,
|
|
96
98
|
setCurrentServer: ()=>setCurrentServer,
|
|
97
99
|
parsePhoneNumber: ()=>parsePhoneNumber,
|
|
98
|
-
SessionDescriptionHandler: ()=>
|
|
100
|
+
SessionDescriptionHandler: ()=>WazoSessionDescriptionHandler,
|
|
99
101
|
default: ()=>src_0,
|
|
100
102
|
SFUNotAvailableError: ()=>SFUNotAvailableError,
|
|
101
103
|
Incall: ()=>Incall,
|
|
@@ -151,6 +153,7 @@ __webpack_require__.d(websocket_client_namespaceObject, {
|
|
|
151
153
|
CALL_LOG_USER_CREATED: ()=>CALL_LOG_USER_CREATED,
|
|
152
154
|
CALL_RESUMED: ()=>CALL_RESUMED,
|
|
153
155
|
CALL_UPDATED: ()=>CALL_UPDATED,
|
|
156
|
+
CHATD_MESSAGE_DELIVERY_STATUS: ()=>CHATD_MESSAGE_DELIVERY_STATUS,
|
|
154
157
|
CHATD_PRESENCE_UPDATED: ()=>CHATD_PRESENCE_UPDATED,
|
|
155
158
|
CHATD_USER_ROOM_CREATED: ()=>CHATD_USER_ROOM_CREATED,
|
|
156
159
|
CHATD_USER_ROOM_MESSAGE_CREATED: ()=>CHATD_USER_ROOM_MESSAGE_CREATED,
|
|
@@ -1434,6 +1437,9 @@ class ChatMessage {
|
|
|
1434
1437
|
userUuid;
|
|
1435
1438
|
roomUuid;
|
|
1436
1439
|
read;
|
|
1440
|
+
channelType;
|
|
1441
|
+
backend;
|
|
1442
|
+
deliveryStatus;
|
|
1437
1443
|
static parseMany(plain) {
|
|
1438
1444
|
if (!plain || !plain.items) return [];
|
|
1439
1445
|
return plain.items.map((item)=>ChatMessage.parse(item));
|
|
@@ -1446,13 +1452,16 @@ class ChatMessage {
|
|
|
1446
1452
|
alias: plain.alias,
|
|
1447
1453
|
userUuid: plain.user_uuid,
|
|
1448
1454
|
read: true,
|
|
1449
|
-
roomUuid: plain.room ? plain.room.uuid : null
|
|
1455
|
+
roomUuid: plain.room ? plain.room.uuid : null,
|
|
1456
|
+
channelType: plain.delivery?.type ?? 'internal',
|
|
1457
|
+
backend: plain.delivery?.backend ?? null,
|
|
1458
|
+
deliveryStatus: plain.delivery?.status ?? null
|
|
1450
1459
|
});
|
|
1451
1460
|
}
|
|
1452
1461
|
static newFrom(message) {
|
|
1453
1462
|
return new_from(message, ChatMessage);
|
|
1454
1463
|
}
|
|
1455
|
-
constructor({ uuid, date, content, userUuid, alias, roomUuid, read } = {}){
|
|
1464
|
+
constructor({ uuid, date, content, userUuid, alias, roomUuid, read, channelType, backend, deliveryStatus } = {}){
|
|
1456
1465
|
this.uuid = uuid;
|
|
1457
1466
|
this.date = date;
|
|
1458
1467
|
this.content = content;
|
|
@@ -1461,6 +1470,9 @@ class ChatMessage {
|
|
|
1461
1470
|
this.roomUuid = roomUuid;
|
|
1462
1471
|
this.read = read;
|
|
1463
1472
|
this.type = 'ChatMessage';
|
|
1473
|
+
this.channelType = channelType ?? 'internal';
|
|
1474
|
+
this.backend = backend ?? null;
|
|
1475
|
+
this.deliveryStatus = deliveryStatus ?? null;
|
|
1464
1476
|
}
|
|
1465
1477
|
is(other) {
|
|
1466
1478
|
return this.uuid === other.uuid;
|
|
@@ -1725,6 +1737,7 @@ class CallSession {
|
|
|
1725
1737
|
isCaller;
|
|
1726
1738
|
answeredBySystem;
|
|
1727
1739
|
dialedExtension;
|
|
1740
|
+
diversion;
|
|
1728
1741
|
ringing;
|
|
1729
1742
|
paused;
|
|
1730
1743
|
sipCallId;
|
|
@@ -1742,7 +1755,7 @@ class CallSession {
|
|
|
1742
1755
|
recordingState;
|
|
1743
1756
|
sipSession;
|
|
1744
1757
|
conference;
|
|
1745
|
-
constructor({ answered, answeredBySystem, isCaller, displayName, callId, muted, videoMuted, number, paused, ringing, startTime, creationTime, endTime, cameraEnabled, dialedExtension, sipCallId, sipStatus, callerNumber, call, autoAnswer, ignored, screensharing, recording, recordingPaused, recordingState, videoRemotelyDowngraded, sipSession, answerTime, conference }){
|
|
1758
|
+
constructor({ answered, answeredBySystem, isCaller, displayName, callId, muted, videoMuted, number, paused, ringing, startTime, creationTime, endTime, cameraEnabled, dialedExtension, diversion, sipCallId, sipStatus, callerNumber, call, autoAnswer, ignored, screensharing, recording, recordingPaused, recordingState, videoRemotelyDowngraded, sipSession, answerTime, conference }){
|
|
1746
1759
|
this.callId = callId;
|
|
1747
1760
|
this.sipCallId = sipCallId;
|
|
1748
1761
|
this.displayName = displayName;
|
|
@@ -1760,6 +1773,7 @@ class CallSession {
|
|
|
1760
1773
|
this.callerNumber = callerNumber;
|
|
1761
1774
|
this.cameraEnabled = cameraEnabled;
|
|
1762
1775
|
this.dialedExtension = dialedExtension || '';
|
|
1776
|
+
this.diversion = diversion;
|
|
1763
1777
|
this.call = call;
|
|
1764
1778
|
this.sipStatus = sipStatus;
|
|
1765
1779
|
this.autoAnswer = autoAnswer || false;
|
|
@@ -2741,6 +2755,7 @@ class ChatRoom {
|
|
|
2741
2755
|
name;
|
|
2742
2756
|
users;
|
|
2743
2757
|
kind;
|
|
2758
|
+
capabilities;
|
|
2744
2759
|
static parseMany(plain) {
|
|
2745
2760
|
if (!plain || !plain.items) return [];
|
|
2746
2761
|
return plain.items.map((item)=>ChatRoom.parse(item));
|
|
@@ -2750,20 +2765,53 @@ class ChatRoom {
|
|
|
2750
2765
|
uuid: plain.uuid,
|
|
2751
2766
|
name: plain.name,
|
|
2752
2767
|
users: plain.users,
|
|
2753
|
-
kind: plain.kind
|
|
2768
|
+
kind: plain.kind,
|
|
2769
|
+
capabilities: plain.capabilities ?? [
|
|
2770
|
+
'internal'
|
|
2771
|
+
]
|
|
2754
2772
|
});
|
|
2755
2773
|
}
|
|
2756
2774
|
static newFrom(room) {
|
|
2757
2775
|
return new_from(room, ChatRoom);
|
|
2758
2776
|
}
|
|
2759
|
-
constructor({ uuid, name, users, kind } = {}){
|
|
2777
|
+
constructor({ uuid, name, users, kind, capabilities } = {}){
|
|
2760
2778
|
this.uuid = uuid;
|
|
2761
2779
|
this.name = name;
|
|
2762
2780
|
this.users = users;
|
|
2763
2781
|
this.kind = kind;
|
|
2782
|
+
this.capabilities = capabilities ?? [
|
|
2783
|
+
'internal'
|
|
2784
|
+
];
|
|
2764
2785
|
this.type = 'ChatRoom';
|
|
2765
2786
|
}
|
|
2766
2787
|
}
|
|
2788
|
+
class UserIdentity {
|
|
2789
|
+
uuid;
|
|
2790
|
+
type;
|
|
2791
|
+
backend;
|
|
2792
|
+
identity;
|
|
2793
|
+
static parseMany(plain) {
|
|
2794
|
+
if (!plain?.items) return [];
|
|
2795
|
+
return plain.items.map((item)=>UserIdentity.parse(item));
|
|
2796
|
+
}
|
|
2797
|
+
static parse(plain) {
|
|
2798
|
+
return new UserIdentity({
|
|
2799
|
+
uuid: plain.uuid,
|
|
2800
|
+
type: plain.type,
|
|
2801
|
+
backend: plain.backend,
|
|
2802
|
+
identity: plain.identity
|
|
2803
|
+
});
|
|
2804
|
+
}
|
|
2805
|
+
static newFrom(userIdentity) {
|
|
2806
|
+
return new_from(userIdentity, UserIdentity);
|
|
2807
|
+
}
|
|
2808
|
+
constructor({ uuid, type, backend, identity } = {}){
|
|
2809
|
+
this.uuid = uuid;
|
|
2810
|
+
this.type = type;
|
|
2811
|
+
this.backend = backend;
|
|
2812
|
+
this.identity = identity;
|
|
2813
|
+
}
|
|
2814
|
+
}
|
|
2767
2815
|
const MAX_PRESENCE_FETCHED = 30;
|
|
2768
2816
|
const chatd = (client, baseUrl)=>({
|
|
2769
2817
|
updateState: (contactUuid, state)=>client.put(`${baseUrl}/users/${contactUuid}/presences`, {
|
|
@@ -2803,8 +2851,23 @@ const chatd = (client, baseUrl)=>({
|
|
|
2803
2851
|
const qs = ApiRequester.getQueryString(params || {});
|
|
2804
2852
|
return client.get(`${baseUrl}/users/me/rooms/${roomUuid}/messages${qs.length ? `?${qs}` : ''}`).then((response)=>ChatMessage.parseMany(response));
|
|
2805
2853
|
},
|
|
2806
|
-
sendRoomMessage: async (roomUuid, message)=>
|
|
2807
|
-
|
|
2854
|
+
sendRoomMessage: async (roomUuid, message, senderIdentityUuid)=>{
|
|
2855
|
+
const senderIdentity = senderIdentityUuid ? {
|
|
2856
|
+
sender_identity_uuid: senderIdentityUuid
|
|
2857
|
+
} : {};
|
|
2858
|
+
const body = {
|
|
2859
|
+
...message,
|
|
2860
|
+
...senderIdentity
|
|
2861
|
+
};
|
|
2862
|
+
return client.post(`${baseUrl}/users/me/rooms/${roomUuid}/messages`, body).then(ChatMessage.parse);
|
|
2863
|
+
},
|
|
2864
|
+
getMessages: async (options)=>client.get(`${baseUrl}/users/me/rooms/messages`, options),
|
|
2865
|
+
getIdentities: async (roomUuid)=>{
|
|
2866
|
+
const query = roomUuid ? {
|
|
2867
|
+
room_uuid: roomUuid
|
|
2868
|
+
} : void 0;
|
|
2869
|
+
return client.get(`${baseUrl}/users/me/identities`, query).then((response)=>UserIdentity.parseMany(response));
|
|
2870
|
+
}
|
|
2808
2871
|
});
|
|
2809
2872
|
class IndirectTransfer {
|
|
2810
2873
|
status;
|
|
@@ -4244,6 +4307,7 @@ const AUTH_USER_EXTERNAL_AUTH_DELETED = 'auth_user_external_auth_deleted';
|
|
|
4244
4307
|
const CHATD_PRESENCE_UPDATED = 'chatd_presence_updated';
|
|
4245
4308
|
const CHATD_USER_ROOM_MESSAGE_CREATED = 'chatd_user_room_message_created';
|
|
4246
4309
|
const CHATD_USER_ROOM_CREATED = 'chatd_user_room_created';
|
|
4310
|
+
const CHATD_MESSAGE_DELIVERY_STATUS = 'chatd_message_delivery_status';
|
|
4247
4311
|
const CONFERENCE_USER_PARTICIPANT_JOINED = 'conference_user_participant_joined';
|
|
4248
4312
|
const CONFERENCE_USER_PARTICIPANT_LEFT = 'conference_user_participant_left';
|
|
4249
4313
|
const CONFERENCE_USER_PARTICIPANT_TALK_STARTED = 'conference_user_participant_talk_started';
|
|
@@ -4579,6 +4643,7 @@ WebSocketClient.eventLists = [
|
|
|
4579
4643
|
CHATD_PRESENCE_UPDATED,
|
|
4580
4644
|
CHATD_USER_ROOM_MESSAGE_CREATED,
|
|
4581
4645
|
CHATD_USER_ROOM_CREATED,
|
|
4646
|
+
CHATD_MESSAGE_DELIVERY_STATUS,
|
|
4582
4647
|
CONFERENCE_USER_PARTICIPANT_JOINED,
|
|
4583
4648
|
CONFERENCE_USER_PARTICIPANT_LEFT,
|
|
4584
4649
|
MEETING_USER_PARTICIPANT_JOINED,
|
|
@@ -4729,7 +4794,7 @@ const wazoMediaStreamFactory = (constraints)=>{
|
|
|
4729
4794
|
if (constraints.screen && !constraints.desktop) return navigator.mediaDevices.getDisplayMedia.call(navigator.mediaDevices, constraints);
|
|
4730
4795
|
return navigator.mediaDevices.getUserMedia.call(navigator.mediaDevices, constraints);
|
|
4731
4796
|
};
|
|
4732
|
-
class
|
|
4797
|
+
class WazoSessionDescriptionHandler_WazoSessionDescriptionHandler extends session_description_handler_namespaceObject.SessionDescriptionHandler {
|
|
4733
4798
|
gatheredCandidates;
|
|
4734
4799
|
eventEmitter;
|
|
4735
4800
|
isWeb;
|
|
@@ -5031,7 +5096,7 @@ class WazoSessionDescriptionHandler extends session_description_handler_namespac
|
|
|
5031
5096
|
return keysA.every((key, i)=>keysB[i] === key && this._constraintsEqual(a[key], b[key]));
|
|
5032
5097
|
}
|
|
5033
5098
|
}
|
|
5034
|
-
const
|
|
5099
|
+
const WazoSessionDescriptionHandler = WazoSessionDescriptionHandler_WazoSessionDescriptionHandler;
|
|
5035
5100
|
const lastIndexOf = (array, method)=>{
|
|
5036
5101
|
const start = array.length - 1;
|
|
5037
5102
|
for(let i = start; i >= 0; i--)if (method(array[i])) return i;
|
|
@@ -6547,7 +6612,7 @@ class WebRTCClient extends Emitter {
|
|
|
6547
6612
|
...options.peerConnectionConfiguration || {}
|
|
6548
6613
|
}
|
|
6549
6614
|
};
|
|
6550
|
-
return new
|
|
6615
|
+
return new WazoSessionDescriptionHandler(uaLogger, wazoMediaStreamFactory, sdhOptions, isWeb, session);
|
|
6551
6616
|
},
|
|
6552
6617
|
transportOptions: {
|
|
6553
6618
|
traceSip: uaOptionsOverrides?.traceSip || false,
|
|
@@ -6596,6 +6661,10 @@ class WebRTCClient extends Emitter {
|
|
|
6596
6661
|
_setupSession(session) {
|
|
6597
6662
|
const sipSessionId = this.getSipSessionId(session);
|
|
6598
6663
|
if (!session.delegate) session.delegate = {};
|
|
6664
|
+
if (session instanceof lib_api_namespaceObject.Invitation) {
|
|
6665
|
+
const diversion = session.request.getHeaders('Diversion');
|
|
6666
|
+
if (diversion?.length) session.diversion = diversion;
|
|
6667
|
+
}
|
|
6599
6668
|
session.delegate.onSessionDescriptionHandler = (sdh)=>{
|
|
6600
6669
|
sdh.on('error', (e)=>{
|
|
6601
6670
|
this.eventEmitter.emit(ON_ERROR, e);
|
|
@@ -8830,6 +8899,7 @@ class WebRTCPhone extends Emitter {
|
|
|
8830
8899
|
recordingPaused: !!fromSession && fromSession.isRecordingPaused(),
|
|
8831
8900
|
recordingState: fromSession ? fromSession.recordingState : RECORDING_STATE.INACTIVE,
|
|
8832
8901
|
sipSession,
|
|
8902
|
+
diversion: sipSession?.diversion,
|
|
8833
8903
|
conference: !!fromSession && fromSession.isConference(),
|
|
8834
8904
|
...extra
|
|
8835
8905
|
});
|
|
@@ -10029,9 +10099,9 @@ class Participant_Participant extends Emitter {
|
|
|
10029
10099
|
}
|
|
10030
10100
|
}
|
|
10031
10101
|
const Participant = Participant_Participant;
|
|
10032
|
-
class
|
|
10102
|
+
class LocalParticipant extends Participant {
|
|
10033
10103
|
}
|
|
10034
|
-
const
|
|
10104
|
+
const room_LocalParticipant = LocalParticipant;
|
|
10035
10105
|
class RemoteParticipant extends Participant {
|
|
10036
10106
|
constructor(room, rawParticipant, extra = {}){
|
|
10037
10107
|
super(room, rawParticipant, extra);
|
|
@@ -10854,7 +10924,7 @@ const simple_Wazo = {
|
|
|
10854
10924
|
Room: room_Room,
|
|
10855
10925
|
SipRoom: room_SipRoom,
|
|
10856
10926
|
RemoteParticipant: room_RemoteParticipant,
|
|
10857
|
-
LocalParticipant:
|
|
10927
|
+
LocalParticipant: room_LocalParticipant,
|
|
10858
10928
|
Participant: Participant,
|
|
10859
10929
|
Stream: Stream,
|
|
10860
10930
|
createLocalVideoStream: createLocalVideoStream,
|
|
@@ -10986,6 +11056,31 @@ class DebugDevice {
|
|
|
10986
11056
|
console.info('DebugDevice - Put off speaker');
|
|
10987
11057
|
}
|
|
10988
11058
|
}
|
|
11059
|
+
const grammar_namespaceObject = require("sip.js/lib/grammar/grammar");
|
|
11060
|
+
const unquote = (value)=>{
|
|
11061
|
+
if (!value) return;
|
|
11062
|
+
if (value.length >= 2 && value.startsWith('"') && value.endsWith('"')) return value.slice(1, -1).replace(/\\(.)/g, '$1');
|
|
11063
|
+
return value;
|
|
11064
|
+
};
|
|
11065
|
+
const parseDiversionHeader = (raw)=>{
|
|
11066
|
+
if (!raw) return null;
|
|
11067
|
+
const header = grammar_namespaceObject.Grammar.nameAddrHeaderParse(raw);
|
|
11068
|
+
if (!header) return null;
|
|
11069
|
+
const reason = unquote(header.getParam('reason'));
|
|
11070
|
+
const privacy = unquote(header.getParam('privacy'));
|
|
11071
|
+
return {
|
|
11072
|
+
number: header.uri.user ?? '',
|
|
11073
|
+
...header.displayName ? {
|
|
11074
|
+
name: header.displayName
|
|
11075
|
+
} : {},
|
|
11076
|
+
...reason ? {
|
|
11077
|
+
reason
|
|
11078
|
+
} : {},
|
|
11079
|
+
...privacy ? {
|
|
11080
|
+
privacy
|
|
11081
|
+
} : {}
|
|
11082
|
+
};
|
|
11083
|
+
};
|
|
10989
11084
|
const external_libphonenumber_js_namespaceObject = require("libphonenumber-js");
|
|
10990
11085
|
const EXTRA_CHAR_REGEXP = /[^+*\d]/g;
|
|
10991
11086
|
const DEFAULT_GUESSING_COUNTRIES = [
|
package/dist/index.mjs
CHANGED
|
@@ -21,6 +21,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_getstats__ from "getstats";
|
|
|
21
21
|
import * as __WEBPACK_EXTERNAL_MODULE_sip_js_lib_api_f9f0ade8__ from "sip.js/lib/api";
|
|
22
22
|
import * as __WEBPACK_EXTERNAL_MODULE_sip_js_lib_platform_web_session_description_handler_session_description_handler_fdd90ea0__ from "sip.js/lib/platform/web/session-description-handler/session-description-handler";
|
|
23
23
|
import * as __WEBPACK_EXTERNAL_MODULE_sdp_transform_45b84e5d__ from "sdp-transform";
|
|
24
|
+
import * as __WEBPACK_EXTERNAL_MODULE_sip_js_lib_grammar_grammar_2e1b3d6e__ from "sip.js/lib/grammar/grammar";
|
|
24
25
|
import * as __WEBPACK_EXTERNAL_MODULE_libphonenumber_js_7e4a9e9f__ from "libphonenumber-js";
|
|
25
26
|
var __webpack_require__ = {};
|
|
26
27
|
(()=>{
|
|
@@ -94,6 +95,7 @@ __webpack_require__.d(websocket_client_namespaceObject, {
|
|
|
94
95
|
CALL_LOG_USER_CREATED: ()=>CALL_LOG_USER_CREATED,
|
|
95
96
|
CALL_RESUMED: ()=>CALL_RESUMED,
|
|
96
97
|
CALL_UPDATED: ()=>CALL_UPDATED,
|
|
98
|
+
CHATD_MESSAGE_DELIVERY_STATUS: ()=>CHATD_MESSAGE_DELIVERY_STATUS,
|
|
97
99
|
CHATD_PRESENCE_UPDATED: ()=>CHATD_PRESENCE_UPDATED,
|
|
98
100
|
CHATD_USER_ROOM_CREATED: ()=>CHATD_USER_ROOM_CREATED,
|
|
99
101
|
CHATD_USER_ROOM_MESSAGE_CREATED: ()=>CHATD_USER_ROOM_MESSAGE_CREATED,
|
|
@@ -1374,6 +1376,9 @@ class ChatMessage {
|
|
|
1374
1376
|
userUuid;
|
|
1375
1377
|
roomUuid;
|
|
1376
1378
|
read;
|
|
1379
|
+
channelType;
|
|
1380
|
+
backend;
|
|
1381
|
+
deliveryStatus;
|
|
1377
1382
|
static parseMany(plain) {
|
|
1378
1383
|
if (!plain || !plain.items) return [];
|
|
1379
1384
|
return plain.items.map((item)=>ChatMessage.parse(item));
|
|
@@ -1386,13 +1391,16 @@ class ChatMessage {
|
|
|
1386
1391
|
alias: plain.alias,
|
|
1387
1392
|
userUuid: plain.user_uuid,
|
|
1388
1393
|
read: true,
|
|
1389
|
-
roomUuid: plain.room ? plain.room.uuid : null
|
|
1394
|
+
roomUuid: plain.room ? plain.room.uuid : null,
|
|
1395
|
+
channelType: plain.delivery?.type ?? 'internal',
|
|
1396
|
+
backend: plain.delivery?.backend ?? null,
|
|
1397
|
+
deliveryStatus: plain.delivery?.status ?? null
|
|
1390
1398
|
});
|
|
1391
1399
|
}
|
|
1392
1400
|
static newFrom(message) {
|
|
1393
1401
|
return new_from(message, ChatMessage);
|
|
1394
1402
|
}
|
|
1395
|
-
constructor({ uuid, date, content, userUuid, alias, roomUuid, read } = {}){
|
|
1403
|
+
constructor({ uuid, date, content, userUuid, alias, roomUuid, read, channelType, backend, deliveryStatus } = {}){
|
|
1396
1404
|
this.uuid = uuid;
|
|
1397
1405
|
this.date = date;
|
|
1398
1406
|
this.content = content;
|
|
@@ -1401,6 +1409,9 @@ class ChatMessage {
|
|
|
1401
1409
|
this.roomUuid = roomUuid;
|
|
1402
1410
|
this.read = read;
|
|
1403
1411
|
this.type = 'ChatMessage';
|
|
1412
|
+
this.channelType = channelType ?? 'internal';
|
|
1413
|
+
this.backend = backend ?? null;
|
|
1414
|
+
this.deliveryStatus = deliveryStatus ?? null;
|
|
1404
1415
|
}
|
|
1405
1416
|
is(other) {
|
|
1406
1417
|
return this.uuid === other.uuid;
|
|
@@ -1664,6 +1675,7 @@ class CallSession {
|
|
|
1664
1675
|
isCaller;
|
|
1665
1676
|
answeredBySystem;
|
|
1666
1677
|
dialedExtension;
|
|
1678
|
+
diversion;
|
|
1667
1679
|
ringing;
|
|
1668
1680
|
paused;
|
|
1669
1681
|
sipCallId;
|
|
@@ -1681,7 +1693,7 @@ class CallSession {
|
|
|
1681
1693
|
recordingState;
|
|
1682
1694
|
sipSession;
|
|
1683
1695
|
conference;
|
|
1684
|
-
constructor({ answered, answeredBySystem, isCaller, displayName, callId, muted, videoMuted, number, paused, ringing, startTime, creationTime, endTime, cameraEnabled, dialedExtension, sipCallId, sipStatus, callerNumber, call, autoAnswer, ignored, screensharing, recording, recordingPaused, recordingState, videoRemotelyDowngraded, sipSession, answerTime, conference }){
|
|
1696
|
+
constructor({ answered, answeredBySystem, isCaller, displayName, callId, muted, videoMuted, number, paused, ringing, startTime, creationTime, endTime, cameraEnabled, dialedExtension, diversion, sipCallId, sipStatus, callerNumber, call, autoAnswer, ignored, screensharing, recording, recordingPaused, recordingState, videoRemotelyDowngraded, sipSession, answerTime, conference }){
|
|
1685
1697
|
this.callId = callId;
|
|
1686
1698
|
this.sipCallId = sipCallId;
|
|
1687
1699
|
this.displayName = displayName;
|
|
@@ -1699,6 +1711,7 @@ class CallSession {
|
|
|
1699
1711
|
this.callerNumber = callerNumber;
|
|
1700
1712
|
this.cameraEnabled = cameraEnabled;
|
|
1701
1713
|
this.dialedExtension = dialedExtension || '';
|
|
1714
|
+
this.diversion = diversion;
|
|
1702
1715
|
this.call = call;
|
|
1703
1716
|
this.sipStatus = sipStatus;
|
|
1704
1717
|
this.autoAnswer = autoAnswer || false;
|
|
@@ -2677,6 +2690,7 @@ class ChatRoom {
|
|
|
2677
2690
|
name;
|
|
2678
2691
|
users;
|
|
2679
2692
|
kind;
|
|
2693
|
+
capabilities;
|
|
2680
2694
|
static parseMany(plain) {
|
|
2681
2695
|
if (!plain || !plain.items) return [];
|
|
2682
2696
|
return plain.items.map((item)=>ChatRoom.parse(item));
|
|
@@ -2686,20 +2700,53 @@ class ChatRoom {
|
|
|
2686
2700
|
uuid: plain.uuid,
|
|
2687
2701
|
name: plain.name,
|
|
2688
2702
|
users: plain.users,
|
|
2689
|
-
kind: plain.kind
|
|
2703
|
+
kind: plain.kind,
|
|
2704
|
+
capabilities: plain.capabilities ?? [
|
|
2705
|
+
'internal'
|
|
2706
|
+
]
|
|
2690
2707
|
});
|
|
2691
2708
|
}
|
|
2692
2709
|
static newFrom(room) {
|
|
2693
2710
|
return new_from(room, ChatRoom);
|
|
2694
2711
|
}
|
|
2695
|
-
constructor({ uuid, name, users, kind } = {}){
|
|
2712
|
+
constructor({ uuid, name, users, kind, capabilities } = {}){
|
|
2696
2713
|
this.uuid = uuid;
|
|
2697
2714
|
this.name = name;
|
|
2698
2715
|
this.users = users;
|
|
2699
2716
|
this.kind = kind;
|
|
2717
|
+
this.capabilities = capabilities ?? [
|
|
2718
|
+
'internal'
|
|
2719
|
+
];
|
|
2700
2720
|
this.type = 'ChatRoom';
|
|
2701
2721
|
}
|
|
2702
2722
|
}
|
|
2723
|
+
class UserIdentity {
|
|
2724
|
+
uuid;
|
|
2725
|
+
type;
|
|
2726
|
+
backend;
|
|
2727
|
+
identity;
|
|
2728
|
+
static parseMany(plain) {
|
|
2729
|
+
if (!plain?.items) return [];
|
|
2730
|
+
return plain.items.map((item)=>UserIdentity.parse(item));
|
|
2731
|
+
}
|
|
2732
|
+
static parse(plain) {
|
|
2733
|
+
return new UserIdentity({
|
|
2734
|
+
uuid: plain.uuid,
|
|
2735
|
+
type: plain.type,
|
|
2736
|
+
backend: plain.backend,
|
|
2737
|
+
identity: plain.identity
|
|
2738
|
+
});
|
|
2739
|
+
}
|
|
2740
|
+
static newFrom(userIdentity) {
|
|
2741
|
+
return new_from(userIdentity, UserIdentity);
|
|
2742
|
+
}
|
|
2743
|
+
constructor({ uuid, type, backend, identity } = {}){
|
|
2744
|
+
this.uuid = uuid;
|
|
2745
|
+
this.type = type;
|
|
2746
|
+
this.backend = backend;
|
|
2747
|
+
this.identity = identity;
|
|
2748
|
+
}
|
|
2749
|
+
}
|
|
2703
2750
|
const MAX_PRESENCE_FETCHED = 30;
|
|
2704
2751
|
const chatd = (client, baseUrl)=>({
|
|
2705
2752
|
updateState: (contactUuid, state)=>client.put(`${baseUrl}/users/${contactUuid}/presences`, {
|
|
@@ -2739,8 +2786,23 @@ const chatd = (client, baseUrl)=>({
|
|
|
2739
2786
|
const qs = ApiRequester.getQueryString(params || {});
|
|
2740
2787
|
return client.get(`${baseUrl}/users/me/rooms/${roomUuid}/messages${qs.length ? `?${qs}` : ''}`).then((response)=>ChatMessage.parseMany(response));
|
|
2741
2788
|
},
|
|
2742
|
-
sendRoomMessage: async (roomUuid, message)=>
|
|
2743
|
-
|
|
2789
|
+
sendRoomMessage: async (roomUuid, message, senderIdentityUuid)=>{
|
|
2790
|
+
const senderIdentity = senderIdentityUuid ? {
|
|
2791
|
+
sender_identity_uuid: senderIdentityUuid
|
|
2792
|
+
} : {};
|
|
2793
|
+
const body = {
|
|
2794
|
+
...message,
|
|
2795
|
+
...senderIdentity
|
|
2796
|
+
};
|
|
2797
|
+
return client.post(`${baseUrl}/users/me/rooms/${roomUuid}/messages`, body).then(ChatMessage.parse);
|
|
2798
|
+
},
|
|
2799
|
+
getMessages: async (options)=>client.get(`${baseUrl}/users/me/rooms/messages`, options),
|
|
2800
|
+
getIdentities: async (roomUuid)=>{
|
|
2801
|
+
const query = roomUuid ? {
|
|
2802
|
+
room_uuid: roomUuid
|
|
2803
|
+
} : void 0;
|
|
2804
|
+
return client.get(`${baseUrl}/users/me/identities`, query).then((response)=>UserIdentity.parseMany(response));
|
|
2805
|
+
}
|
|
2744
2806
|
});
|
|
2745
2807
|
class IndirectTransfer {
|
|
2746
2808
|
status;
|
|
@@ -4177,6 +4239,7 @@ const AUTH_USER_EXTERNAL_AUTH_DELETED = 'auth_user_external_auth_deleted';
|
|
|
4177
4239
|
const CHATD_PRESENCE_UPDATED = 'chatd_presence_updated';
|
|
4178
4240
|
const CHATD_USER_ROOM_MESSAGE_CREATED = 'chatd_user_room_message_created';
|
|
4179
4241
|
const CHATD_USER_ROOM_CREATED = 'chatd_user_room_created';
|
|
4242
|
+
const CHATD_MESSAGE_DELIVERY_STATUS = 'chatd_message_delivery_status';
|
|
4180
4243
|
const CONFERENCE_USER_PARTICIPANT_JOINED = 'conference_user_participant_joined';
|
|
4181
4244
|
const CONFERENCE_USER_PARTICIPANT_LEFT = 'conference_user_participant_left';
|
|
4182
4245
|
const CONFERENCE_USER_PARTICIPANT_TALK_STARTED = 'conference_user_participant_talk_started';
|
|
@@ -4512,6 +4575,7 @@ WebSocketClient.eventLists = [
|
|
|
4512
4575
|
CHATD_PRESENCE_UPDATED,
|
|
4513
4576
|
CHATD_USER_ROOM_MESSAGE_CREATED,
|
|
4514
4577
|
CHATD_USER_ROOM_CREATED,
|
|
4578
|
+
CHATD_MESSAGE_DELIVERY_STATUS,
|
|
4515
4579
|
CONFERENCE_USER_PARTICIPANT_JOINED,
|
|
4516
4580
|
CONFERENCE_USER_PARTICIPANT_LEFT,
|
|
4517
4581
|
MEETING_USER_PARTICIPANT_JOINED,
|
|
@@ -4644,7 +4708,7 @@ const wazoMediaStreamFactory = (constraints)=>{
|
|
|
4644
4708
|
if (constraints.screen && !constraints.desktop) return navigator.mediaDevices.getDisplayMedia.call(navigator.mediaDevices, constraints);
|
|
4645
4709
|
return navigator.mediaDevices.getUserMedia.call(navigator.mediaDevices, constraints);
|
|
4646
4710
|
};
|
|
4647
|
-
class
|
|
4711
|
+
class WazoSessionDescriptionHandler_WazoSessionDescriptionHandler extends __WEBPACK_EXTERNAL_MODULE_sip_js_lib_platform_web_session_description_handler_session_description_handler_fdd90ea0__.SessionDescriptionHandler {
|
|
4648
4712
|
gatheredCandidates;
|
|
4649
4713
|
eventEmitter;
|
|
4650
4714
|
isWeb;
|
|
@@ -4946,7 +5010,7 @@ class WazoSessionDescriptionHandler extends __WEBPACK_EXTERNAL_MODULE_sip_js_lib
|
|
|
4946
5010
|
return keysA.every((key, i)=>keysB[i] === key && this._constraintsEqual(a[key], b[key]));
|
|
4947
5011
|
}
|
|
4948
5012
|
}
|
|
4949
|
-
const
|
|
5013
|
+
const WazoSessionDescriptionHandler = WazoSessionDescriptionHandler_WazoSessionDescriptionHandler;
|
|
4950
5014
|
const lastIndexOf = (array, method)=>{
|
|
4951
5015
|
const start = array.length - 1;
|
|
4952
5016
|
for(let i = start; i >= 0; i--)if (method(array[i])) return i;
|
|
@@ -6462,7 +6526,7 @@ class WebRTCClient extends Emitter {
|
|
|
6462
6526
|
...options.peerConnectionConfiguration || {}
|
|
6463
6527
|
}
|
|
6464
6528
|
};
|
|
6465
|
-
return new
|
|
6529
|
+
return new WazoSessionDescriptionHandler(uaLogger, wazoMediaStreamFactory, sdhOptions, isWeb, session);
|
|
6466
6530
|
},
|
|
6467
6531
|
transportOptions: {
|
|
6468
6532
|
traceSip: uaOptionsOverrides?.traceSip || false,
|
|
@@ -6511,6 +6575,10 @@ class WebRTCClient extends Emitter {
|
|
|
6511
6575
|
_setupSession(session) {
|
|
6512
6576
|
const sipSessionId = this.getSipSessionId(session);
|
|
6513
6577
|
if (!session.delegate) session.delegate = {};
|
|
6578
|
+
if (session instanceof __WEBPACK_EXTERNAL_MODULE_sip_js_lib_api_f9f0ade8__.Invitation) {
|
|
6579
|
+
const diversion = session.request.getHeaders('Diversion');
|
|
6580
|
+
if (diversion?.length) session.diversion = diversion;
|
|
6581
|
+
}
|
|
6514
6582
|
session.delegate.onSessionDescriptionHandler = (sdh)=>{
|
|
6515
6583
|
sdh.on('error', (e)=>{
|
|
6516
6584
|
this.eventEmitter.emit(ON_ERROR, e);
|
|
@@ -8745,6 +8813,7 @@ class WebRTCPhone extends Emitter {
|
|
|
8745
8813
|
recordingPaused: !!fromSession && fromSession.isRecordingPaused(),
|
|
8746
8814
|
recordingState: fromSession ? fromSession.recordingState : RECORDING_STATE.INACTIVE,
|
|
8747
8815
|
sipSession,
|
|
8816
|
+
diversion: sipSession?.diversion,
|
|
8748
8817
|
conference: !!fromSession && fromSession.isConference(),
|
|
8749
8818
|
...extra
|
|
8750
8819
|
});
|
|
@@ -9944,9 +10013,9 @@ class Participant_Participant extends Emitter {
|
|
|
9944
10013
|
}
|
|
9945
10014
|
}
|
|
9946
10015
|
const Participant = Participant_Participant;
|
|
9947
|
-
class
|
|
10016
|
+
class LocalParticipant extends Participant {
|
|
9948
10017
|
}
|
|
9949
|
-
const
|
|
10018
|
+
const room_LocalParticipant = LocalParticipant;
|
|
9950
10019
|
class RemoteParticipant extends Participant {
|
|
9951
10020
|
constructor(room, rawParticipant, extra = {}){
|
|
9952
10021
|
super(room, rawParticipant, extra);
|
|
@@ -10769,7 +10838,7 @@ const simple_Wazo = {
|
|
|
10769
10838
|
Room: room_Room,
|
|
10770
10839
|
SipRoom: room_SipRoom,
|
|
10771
10840
|
RemoteParticipant: room_RemoteParticipant,
|
|
10772
|
-
LocalParticipant:
|
|
10841
|
+
LocalParticipant: room_LocalParticipant,
|
|
10773
10842
|
Participant: Participant,
|
|
10774
10843
|
Stream: Stream,
|
|
10775
10844
|
createLocalVideoStream: createLocalVideoStream,
|
|
@@ -10901,6 +10970,30 @@ class DebugDevice {
|
|
|
10901
10970
|
console.info('DebugDevice - Put off speaker');
|
|
10902
10971
|
}
|
|
10903
10972
|
}
|
|
10973
|
+
const unquote = (value)=>{
|
|
10974
|
+
if (!value) return;
|
|
10975
|
+
if (value.length >= 2 && value.startsWith('"') && value.endsWith('"')) return value.slice(1, -1).replace(/\\(.)/g, '$1');
|
|
10976
|
+
return value;
|
|
10977
|
+
};
|
|
10978
|
+
const parseDiversionHeader = (raw)=>{
|
|
10979
|
+
if (!raw) return null;
|
|
10980
|
+
const header = __WEBPACK_EXTERNAL_MODULE_sip_js_lib_grammar_grammar_2e1b3d6e__.Grammar.nameAddrHeaderParse(raw);
|
|
10981
|
+
if (!header) return null;
|
|
10982
|
+
const reason = unquote(header.getParam('reason'));
|
|
10983
|
+
const privacy = unquote(header.getParam('privacy'));
|
|
10984
|
+
return {
|
|
10985
|
+
number: header.uri.user ?? '',
|
|
10986
|
+
...header.displayName ? {
|
|
10987
|
+
name: header.displayName
|
|
10988
|
+
} : {},
|
|
10989
|
+
...reason ? {
|
|
10990
|
+
reason
|
|
10991
|
+
} : {},
|
|
10992
|
+
...privacy ? {
|
|
10993
|
+
privacy
|
|
10994
|
+
} : {}
|
|
10995
|
+
};
|
|
10996
|
+
};
|
|
10904
10997
|
const EXTRA_CHAR_REGEXP = /[^+*\d]/g;
|
|
10905
10998
|
const DEFAULT_GUESSING_COUNTRIES = [
|
|
10906
10999
|
'US',
|
|
@@ -10956,4 +11049,4 @@ const getCallableNumber = (number, country)=>{
|
|
|
10956
11049
|
};
|
|
10957
11050
|
const { SOCKET_EVENTS: types_SOCKET_EVENTS, ...types_OTHER_EVENTS } = websocket_client_namespaceObject;
|
|
10958
11051
|
const src_0 = simple;
|
|
10959
|
-
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,
|
|
11052
|
+
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, parseDiversionHeader, 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":3,"file":"chatd.d.ts","sourceRoot":"","sources":["../../../src/api/chatd.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,QAAQ,MAAM,oBAAoB,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,WAAW,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"chatd.d.ts","sourceRoot":"","sources":["../../../src/api/chatd.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,QAAQ,MAAM,oBAAoB,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAQlD,KAAK,kBAAkB,GAAG;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;iCAKuB,YAAY,WAAW,MAAM;+BACzB,IAAI,SAAS,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;gCAIrC,IAAI,SAAS,MAAM,UAAU,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;4BAQpD,IAAI,KAAG,OAAO,CAAC,MAAM,CAAC;wCAEV,IAAI,KAAG,OAAO,CAAC,gBAAgB,CAAC;gCAExC,IAAI,KAAG,OAAO,CAAC,MAAM,CAAC;uCAEf,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;wBAwBlF,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;uBAEvB,MAAM,SAAS,KAAK,CAAC,QAAQ,CAAC,SAAS,MAAM,KAAG,OAAO,CAAC,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"}
|
|
@@ -10,6 +10,7 @@ type CallSessionArguments = {
|
|
|
10
10
|
cameraEnabled: boolean;
|
|
11
11
|
creationTime?: Date | null | undefined;
|
|
12
12
|
dialedExtension?: string | null;
|
|
13
|
+
diversion?: string[];
|
|
13
14
|
displayName: string;
|
|
14
15
|
endTime?: Date | null | undefined;
|
|
15
16
|
isCaller: boolean;
|
|
@@ -47,6 +48,7 @@ export default class CallSession {
|
|
|
47
48
|
isCaller: boolean;
|
|
48
49
|
answeredBySystem: boolean;
|
|
49
50
|
dialedExtension: string;
|
|
51
|
+
diversion?: string[];
|
|
50
52
|
ringing: boolean;
|
|
51
53
|
paused: boolean;
|
|
52
54
|
sipCallId: string;
|
|
@@ -64,7 +66,7 @@ export default class CallSession {
|
|
|
64
66
|
recordingState: RecordingStateType;
|
|
65
67
|
sipSession: WazoSession | undefined;
|
|
66
68
|
conference: boolean;
|
|
67
|
-
constructor({ answered, answeredBySystem, isCaller, displayName, callId, muted, videoMuted, number, paused, ringing, startTime, creationTime, endTime, cameraEnabled, dialedExtension, sipCallId, sipStatus, callerNumber, call, autoAnswer, ignored, screensharing, recording, recordingPaused, recordingState, videoRemotelyDowngraded, sipSession, answerTime, conference, }: CallSessionArguments);
|
|
69
|
+
constructor({ answered, answeredBySystem, isCaller, displayName, callId, muted, videoMuted, number, paused, ringing, startTime, creationTime, endTime, cameraEnabled, dialedExtension, diversion, sipCallId, sipStatus, callerNumber, call, autoAnswer, ignored, screensharing, recording, recordingPaused, recordingState, videoRemotelyDowngraded, sipSession, answerTime, conference, }: CallSessionArguments);
|
|
68
70
|
resume(): void;
|
|
69
71
|
hold(): void;
|
|
70
72
|
mute(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallSession.d.ts","sourceRoot":"","sources":["../../../src/domain/CallSession.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,EAAE,EAAmB,KAAK,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAGxE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,OAAO,CAA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