@flashphoner/sfusdk 2.0.54 → 2.0.56
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/client.version +1 -1
- package/package.json +1 -4
- package/dist/examples/sfu.d.ts +0 -13
- package/dist/src/index.d.ts +0 -6
- package/dist/src/sdk/connection.d.ts +0 -28
- package/dist/src/sdk/constants.d.ts +0 -385
- package/dist/src/sdk/logger.d.ts +0 -18
- package/dist/src/sdk/notifier.d.ts +0 -7
- package/dist/src/sdk/promises.d.ts +0 -11
- package/dist/src/sdk/room-extended.d.ts +0 -14
- package/dist/src/sdk/room.d.ts +0 -30
- package/dist/src/sdk/sfu-extended.d.ts +0 -135
- package/dist/src/sdk/sfu.d.ts +0 -23
package/dist/client.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.0.
|
|
1
|
+
2.0.56-3b657b2c9a1a2c3f468f8b89c44c8063fd4eb70b
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flashphoner/sfusdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.56",
|
|
4
4
|
"description": "Official Flashphoner WebCallServer SFU SDK package",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"clean": "rm -rf dist/*",
|
|
12
12
|
"test": "jest --runInBand --forceExit",
|
|
13
13
|
"build": "tsc",
|
|
14
|
-
"build-examples": "webpack --mode=production",
|
|
15
14
|
"publish-lib": "npm run build && npm publish",
|
|
16
15
|
"publish-beta": "npm run build && npm publish --tag beta",
|
|
17
16
|
"publish-dryrun": "npm run build && npm publish --dry-run"
|
|
@@ -30,8 +29,6 @@
|
|
|
30
29
|
"ts-jest": "^27.1.4",
|
|
31
30
|
"ts-loader": "^9.2.8",
|
|
32
31
|
"typescript": "^4.6.3",
|
|
33
|
-
"webpack": "^5.72.0",
|
|
34
|
-
"webpack-cli": "^4.9.2",
|
|
35
32
|
"wrtc": "^0.4.7"
|
|
36
33
|
},
|
|
37
34
|
"dependencies": {
|
package/dist/examples/sfu.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Sfu, RoomEvent, SfuEvent, State } from "../src";
|
|
2
|
-
export declare function createRoom(options: {
|
|
3
|
-
url: string;
|
|
4
|
-
roomName: string;
|
|
5
|
-
pin: string;
|
|
6
|
-
nickname: string;
|
|
7
|
-
pc: RTCPeerConnection;
|
|
8
|
-
}): Sfu;
|
|
9
|
-
export declare const constants: {
|
|
10
|
-
SFU_EVENT: typeof SfuEvent;
|
|
11
|
-
SFU_ROOM_EVENT: typeof RoomEvent;
|
|
12
|
-
SFU_STATE: typeof State;
|
|
13
|
-
};
|
package/dist/src/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Sfu } from "./sdk/sfu";
|
|
2
|
-
import { SfuExtended } from "./sdk/sfu-extended";
|
|
3
|
-
import { SfuEvent, RoomEvent, State, RoomState } from "./sdk/constants";
|
|
4
|
-
export declare const sfu: Sfu;
|
|
5
|
-
export declare const sfuExtended: SfuExtended;
|
|
6
|
-
export { Sfu, SfuExtended, SfuEvent, RoomEvent, State, RoomState };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { InternalMessage } from "./constants";
|
|
2
|
-
declare type InitialUserData = {
|
|
3
|
-
sipLogin: string;
|
|
4
|
-
sipVisibleName: string;
|
|
5
|
-
pmi: string;
|
|
6
|
-
};
|
|
7
|
-
declare type OnMessageCallback = (arg0: string, arg1: Array<InternalMessage>) => void;
|
|
8
|
-
declare type OnBinaryDataCallback = (arg0: string, arg1: ArrayBuffer) => void;
|
|
9
|
-
export declare class Connection {
|
|
10
|
-
private ws;
|
|
11
|
-
private onError;
|
|
12
|
-
private onClose;
|
|
13
|
-
private onMessage;
|
|
14
|
-
private onBinaryData;
|
|
15
|
-
private connected;
|
|
16
|
-
private connectionTimeout;
|
|
17
|
-
constructor(onMessage: OnMessageCallback, onBinaryData: OnBinaryDataCallback, onError: Function, onClose: Function);
|
|
18
|
-
connect(options: {
|
|
19
|
-
url: string;
|
|
20
|
-
appName: string;
|
|
21
|
-
timeout: number;
|
|
22
|
-
custom: object | null;
|
|
23
|
-
}): Promise<InitialUserData>;
|
|
24
|
-
send(message: string, data: any): void;
|
|
25
|
-
sendBinaryData(data: any): void;
|
|
26
|
-
close(): void;
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
@@ -1,385 +0,0 @@
|
|
|
1
|
-
export declare enum SfuEvent {
|
|
2
|
-
CONNECTED = "CONNECTED",
|
|
3
|
-
FAILED = "FAILED",
|
|
4
|
-
DISCONNECTED = "DISCONNECTED",
|
|
5
|
-
MESSAGE = "MESSAGE",
|
|
6
|
-
USER_LIST = "USER_LIST",
|
|
7
|
-
USER_CHATS = "USER_CHATS",
|
|
8
|
-
CHAT_LOADED = "CHAT_LOADED",
|
|
9
|
-
NEW_CHAT = "NEW_CHAT",
|
|
10
|
-
CHAT_DELETED = "CHAT_DELETED",
|
|
11
|
-
CHAT_UPDATED = "CHAT_UPDATED",
|
|
12
|
-
MESSAGE_STATE = "MESSAGE_STATE",
|
|
13
|
-
CONTACT_UPDATE = "CONTACT_UPDATE",
|
|
14
|
-
CONTACT_REMOVED = "CONTACT_REMOVED",
|
|
15
|
-
CONTACT_INVITE = "CONTACT_INVITE",
|
|
16
|
-
PUBLIC_CHANNELS = "PUBLIC_CHANNELS",
|
|
17
|
-
USER_CALENDAR = "USER_CALENDAR",
|
|
18
|
-
ACK = "ACK",
|
|
19
|
-
ATTACHMENT_DATA = "ATTACHMENT_DATA"
|
|
20
|
-
}
|
|
21
|
-
export declare enum RoomEvent {
|
|
22
|
-
CREATED = "CREATED",
|
|
23
|
-
FAILED = "FAILED",
|
|
24
|
-
ADD_TRACKS = "ADD_TRACKS",
|
|
25
|
-
REMOVE_TRACKS = "REMOVE_TRACKS",
|
|
26
|
-
MESSAGE = "MESSAGE",
|
|
27
|
-
CONTROL_MESSAGE = "CONTROL_MESSAGE",
|
|
28
|
-
JOINED = "JOINED",
|
|
29
|
-
LEFT = "LEFT",
|
|
30
|
-
DETACHED = "DETACHED",
|
|
31
|
-
EVICTED = "EVICTED",
|
|
32
|
-
REMOTE_SDP = "REMOTE_SDP",
|
|
33
|
-
TRACK_QUALITY_STATE = "TRACK_QUALITY_STATE",
|
|
34
|
-
OPERATION_FAILED = "OPERATION_FAILED",
|
|
35
|
-
WAITING_LIST = "SFU_WAITING_LIST",
|
|
36
|
-
WAITING_ROOM_UPDATE = "SFU_WAITING_ROOM_UPDATE",
|
|
37
|
-
MUTE_TRACKS = "MUTE_TRACKS",
|
|
38
|
-
PARTICIPANT_LIST = "PARTICIPANT_LIST",
|
|
39
|
-
ROLE_ASSIGNED = "ROLE_ASSIGNED"
|
|
40
|
-
}
|
|
41
|
-
export declare enum State {
|
|
42
|
-
NEW = "NEW",
|
|
43
|
-
PENDING = "PENDING",
|
|
44
|
-
CONNECTED = "CONNECTED",
|
|
45
|
-
AUTHENTICATED = "AUTHENTICATED",
|
|
46
|
-
DISCONNECTED = "DISCONNECTED",
|
|
47
|
-
FAILED = "FAILED"
|
|
48
|
-
}
|
|
49
|
-
export declare enum RoomState {
|
|
50
|
-
NEW = "NEW",
|
|
51
|
-
PENDING = "PENDING",
|
|
52
|
-
JOINED = "JOINED",
|
|
53
|
-
FAILED = "FAILED",
|
|
54
|
-
DISPOSED = "DISPOSED"
|
|
55
|
-
}
|
|
56
|
-
export declare enum Operations {
|
|
57
|
-
ROOM_CREATE = "ROOM_CREATE",
|
|
58
|
-
ROOM_JOIN = "ROOM_JOIN",
|
|
59
|
-
ROOM_DESTROY = "ROOM_DESTROY",
|
|
60
|
-
SEND_MESSAGE = "SEND_MESSAGE",
|
|
61
|
-
USER_LIST = "USER_LIST",
|
|
62
|
-
USER_CALENDAR = "USER_CALENDAR",
|
|
63
|
-
ADD_CALENDAR_EVENT = "ADD_CALENDAR_EVENT",
|
|
64
|
-
REMOVE_CALENDAR_EVENT = "REMOVE_CALENDAR_EVENT",
|
|
65
|
-
ROOM_UPDATE = "ROOM_UPDATE",
|
|
66
|
-
MUTE_TRACKS = "MUTE_TRACKS",
|
|
67
|
-
ASSIGN_ROLE = "ASSIGN_ROLE",
|
|
68
|
-
SUBSCRIBE_TO_WAITING_PARTICIPANT = "SUBSCRIBE_TO_WAITING_PARTICIPANT",
|
|
69
|
-
UNSUBSCRIBE_FROM_WAITING_PARTICIPANT = "UNSUBSCRIBE_FROM_WAITING_PARTICIPANT",
|
|
70
|
-
MOVE_TO_WAITING_ROOM = "MOVE_TO_WAITING_ROOM",
|
|
71
|
-
CREATE_CHAT = "CREATE_CHAT",
|
|
72
|
-
DELETE_CHAT = "DELETE_CHAT",
|
|
73
|
-
RENAME_CHAT = "RENAME_CHAT",
|
|
74
|
-
LOAD_CHAT = "LOAD_CHAT",
|
|
75
|
-
ADD_MEMBER_TO_CHAT = "ADD_MEMBER_TO_CHAT",
|
|
76
|
-
REMOVE_MEMBER_FROM_CHAT = "REMOVE_MEMBER_FROM_CHAT",
|
|
77
|
-
UPDATE_CHAT_PREFERENCES = "UPDATE_CHAT_PREFERENCES",
|
|
78
|
-
GET_USER_CHATS = "GET_USER_CHATS"
|
|
79
|
-
}
|
|
80
|
-
export declare enum ParticipantRole {
|
|
81
|
-
OWNER = "OWNER",
|
|
82
|
-
ADMIN = "ADMIN",
|
|
83
|
-
PARTICIPANT = "PARTICIPANT"
|
|
84
|
-
}
|
|
85
|
-
export declare enum TrackType {
|
|
86
|
-
AUDIO = "AUDIO",
|
|
87
|
-
VIDEO = "VIDEO"
|
|
88
|
-
}
|
|
89
|
-
export declare enum InternalApi {
|
|
90
|
-
Z_APP = "sfuZClientApp",
|
|
91
|
-
P_APP = "sfuApp",
|
|
92
|
-
DEFAULT_METHOD = "sfuCallback",
|
|
93
|
-
BINARY_DATA = "binaryData",
|
|
94
|
-
JOIN_ROOM = "joinRoom",
|
|
95
|
-
CREATE_ROOM = "createRoom",
|
|
96
|
-
UPDATE_ROOM_STATE = "updateRoomState",
|
|
97
|
-
DESTROY_ROOM = "destroyRoom",
|
|
98
|
-
LEAVE_ROOM = "leaveRoom",
|
|
99
|
-
CHANGE_QUALITY = "changeQuality",
|
|
100
|
-
AUTHORIZE_WAITING_LIST = "authorizeWaitingList",
|
|
101
|
-
MESSAGE = "SFU_MESSAGE",
|
|
102
|
-
MESSAGE_STATE = "SFU_MESSAGE_STATE",
|
|
103
|
-
USER_LIST = "SFU_USER_LIST",
|
|
104
|
-
USER_CALENDAR = "SFU_USER_CALENDAR",
|
|
105
|
-
USER_CHATS = "SFU_USER_CHATS",
|
|
106
|
-
PUBLIC_CHANNELS = "SFU_PUBLIC_CHANNELS",
|
|
107
|
-
CHAT_LOADED = "SFU_CHAT_LOADED",
|
|
108
|
-
NEW_CHAT = "SFU_NEW_CHAT",
|
|
109
|
-
CHAT_DELETED = "SFU_CHAT_DELETED",
|
|
110
|
-
CHAT_UPDATED = "SFU_UPDATE_CHAT",
|
|
111
|
-
CONTACT_UPDATED = "SFU_CONTACT_UPDATE",
|
|
112
|
-
CONTACT_INVITE = "SFU_CONTACT_INVITE",
|
|
113
|
-
CONTACT_REMOVED = "SFU_CONTACT_REMOVED",
|
|
114
|
-
GET_USER_LIST = "getUserList",
|
|
115
|
-
GET_USER_CALENDAR = "getUserCalendar",
|
|
116
|
-
ADD_CALENDAR_EVENT = "addCalendarEvent",
|
|
117
|
-
REMOVE_CALENDAR_EVENT = "removeCalendarEvent",
|
|
118
|
-
MUTE_TRACK = "muteTrack",
|
|
119
|
-
SEND_MESSAGE = "sendMessage",
|
|
120
|
-
GET_ATTACHMENT = "loadAttachment",
|
|
121
|
-
SEND_CONTROL_MESSAGE = "sendControlMessage",
|
|
122
|
-
MARK_MESSAGE_READ = "markMessageRead",
|
|
123
|
-
MARK_MESSAGE_UNREAD = "markMessageUnread",
|
|
124
|
-
INVITE_CONTACT = "inviteContact",
|
|
125
|
-
REMOVE_CONTACT = "removeContact",
|
|
126
|
-
CONFIRM_CONTACT = "confirmContact",
|
|
127
|
-
ASSIGN_ROLE = "assignRole",
|
|
128
|
-
SUBSCRIBE_TO_WAITING_PARTICIPANT = "subscribeToWaitingParticipant",
|
|
129
|
-
UNSUBSCRIBE_FROM_WAITING_PARTICIPANT = "unsubscribeFromWaitingParticipant",
|
|
130
|
-
MOVE_TO_WAITING_ROOM = "moveToWaitingRoom",
|
|
131
|
-
CONFIGURE_WAITING_ROOM = "configureWaitingRoom",
|
|
132
|
-
TRACK_CONTENT_HEADER = "a=content =",
|
|
133
|
-
GET_USER_CHATS = "getUserChats",
|
|
134
|
-
GET_PUBLIC_CHANNELS = "getPublicChannels",
|
|
135
|
-
LOAD_CHAT = "loadChat",
|
|
136
|
-
CREATE_CHAT = "createChat",
|
|
137
|
-
DELETE_CHAT = "deleteChat",
|
|
138
|
-
RENAME_CHAT = "renameChat",
|
|
139
|
-
ADD_MEMBER_TO_CHAT = "addMemberToChat",
|
|
140
|
-
REMOVE_MEMBER_FROM_CHAT = "removeMemberFromChat",
|
|
141
|
-
UPDATE_CHANNEL_SEND_POLICY = "updateChannelSendPolicy",
|
|
142
|
-
ADD_CHANNEL_SEND_PERMISSION_LIST_MEMBER = "addChannelSendPermissionListMember",
|
|
143
|
-
REMOVE_CHANNEL_SEND_PERMISSION_LIST_MEMBER = "removeChannelSendPermissionListMember",
|
|
144
|
-
ADD_CHAT_TO_FAVOURITES = "addChatToFavourites",
|
|
145
|
-
REMOVE_CHAT_FROM_FAVOURITES = "removeChatFromFavourites",
|
|
146
|
-
ADD_CONTACT_TO_FAVOURITES = "addContactToFavourites",
|
|
147
|
-
REMOVE_CONTACT_FROM_FAVOURITES = "removeContactFromFavourites"
|
|
148
|
-
}
|
|
149
|
-
export declare const ATTACHMENT_CHUNK_SIZE = 100000;
|
|
150
|
-
export declare type InternalMessage = {
|
|
151
|
-
type: SfuEvent | RoomEvent | InternalApi;
|
|
152
|
-
roomName: string;
|
|
153
|
-
internalMessageId: string;
|
|
154
|
-
};
|
|
155
|
-
export declare type OperationFailed = InternalMessage & {
|
|
156
|
-
operation: Operations;
|
|
157
|
-
error: string;
|
|
158
|
-
info: any;
|
|
159
|
-
};
|
|
160
|
-
export declare type RoomMessage = InternalMessage & {
|
|
161
|
-
message: {
|
|
162
|
-
nickName: UserNickname;
|
|
163
|
-
message: string;
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
export declare type FragmentedMessage = {
|
|
167
|
-
id: string;
|
|
168
|
-
last: boolean;
|
|
169
|
-
payload: string;
|
|
170
|
-
};
|
|
171
|
-
export declare enum RemoteSdpType {
|
|
172
|
-
OFFER = "offer",
|
|
173
|
-
ANSWER = "answer"
|
|
174
|
-
}
|
|
175
|
-
export declare type RemoteSdp = InternalMessage & {
|
|
176
|
-
info: {
|
|
177
|
-
sdp: string;
|
|
178
|
-
type: RemoteSdpType;
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
|
-
export declare type RoleAssigned = InternalMessage & {
|
|
182
|
-
name: UserNickname;
|
|
183
|
-
role: ParticipantRole;
|
|
184
|
-
};
|
|
185
|
-
export declare type CreatedRoom = InternalMessage & {
|
|
186
|
-
inviteId: string;
|
|
187
|
-
};
|
|
188
|
-
export declare type JoinedRoom = InternalMessage & {
|
|
189
|
-
name: UserNickname;
|
|
190
|
-
};
|
|
191
|
-
export declare type LeftRoom = InternalMessage & {
|
|
192
|
-
name: UserNickname;
|
|
193
|
-
};
|
|
194
|
-
export declare type EvictedFromRoom = InternalMessage & {
|
|
195
|
-
name: UserNickname;
|
|
196
|
-
};
|
|
197
|
-
export declare type WaitingListEvent = InternalMessage & {
|
|
198
|
-
users: Array<User>;
|
|
199
|
-
};
|
|
200
|
-
export declare type AddRemoveTracks = InternalMessage & {
|
|
201
|
-
info: {
|
|
202
|
-
nickName: UserNickname;
|
|
203
|
-
waitingRoom: boolean;
|
|
204
|
-
info: Array<{
|
|
205
|
-
id: string;
|
|
206
|
-
type: TrackType;
|
|
207
|
-
contentType: string;
|
|
208
|
-
mid: string;
|
|
209
|
-
quality: Array<string>;
|
|
210
|
-
mute: boolean;
|
|
211
|
-
}>;
|
|
212
|
-
};
|
|
213
|
-
};
|
|
214
|
-
export declare type WaitingRoomUpdate = InternalMessage & {
|
|
215
|
-
enabled: boolean;
|
|
216
|
-
};
|
|
217
|
-
export declare enum MessageState {
|
|
218
|
-
NO_DELIVERY_NO_READ = "NO_DELIVERY_NO_READ",
|
|
219
|
-
PARTIAL_DELIVERY_NO_READ = "PARTIAL_DELIVERY_NO_READ",
|
|
220
|
-
PARTIAL_DELIVERY_PARTIAL_READ = "PARTIAL_DELIVERY_PARTIAL_READ",
|
|
221
|
-
FULL_DELIVERY_NO_READ = "FULL_DELIVERY_NO_READ",
|
|
222
|
-
FULL_DELIVERY_PARTIAL_READ = "FULL_DELIVERY_PARTIAL_READ",
|
|
223
|
-
FULL_DELIVERY_FULL_READ = "FULL_DELIVERY_FULL_READ",
|
|
224
|
-
PENDING_ATTACHMENTS = "PENDING_ATTACHMENTS"
|
|
225
|
-
}
|
|
226
|
-
export declare type MessageStatus = {
|
|
227
|
-
id: string;
|
|
228
|
-
chatId: string;
|
|
229
|
-
delivered: boolean;
|
|
230
|
-
state: MessageState;
|
|
231
|
-
lastReadMessageId: string;
|
|
232
|
-
info: string;
|
|
233
|
-
date: number;
|
|
234
|
-
attachments: Array<MessageAttachment>;
|
|
235
|
-
};
|
|
236
|
-
export declare enum MessageAttachmentType {
|
|
237
|
-
file = "file",
|
|
238
|
-
picture = "picture"
|
|
239
|
-
}
|
|
240
|
-
export declare type MessageAttachment = {
|
|
241
|
-
type: MessageAttachmentType;
|
|
242
|
-
name: string;
|
|
243
|
-
size: number;
|
|
244
|
-
id: number;
|
|
245
|
-
};
|
|
246
|
-
export declare type MessageAttachmentData = {
|
|
247
|
-
size: number;
|
|
248
|
-
payload: ArrayBuffer;
|
|
249
|
-
id: number;
|
|
250
|
-
};
|
|
251
|
-
export declare type AttachmentRequest = {
|
|
252
|
-
messageId: string;
|
|
253
|
-
chatId: string;
|
|
254
|
-
id: string;
|
|
255
|
-
name: string;
|
|
256
|
-
};
|
|
257
|
-
export declare type Message = {
|
|
258
|
-
id: string;
|
|
259
|
-
chatId: string;
|
|
260
|
-
date: number;
|
|
261
|
-
from: UserId;
|
|
262
|
-
to?: UserId;
|
|
263
|
-
status: MessageState;
|
|
264
|
-
body: string;
|
|
265
|
-
attachments: Array<MessageAttachment>;
|
|
266
|
-
};
|
|
267
|
-
export declare type SfuMessageEvent = InternalMessage & {
|
|
268
|
-
message: Message;
|
|
269
|
-
};
|
|
270
|
-
export declare type MessageStatusEvent = InternalMessage & {
|
|
271
|
-
status: MessageStatus;
|
|
272
|
-
};
|
|
273
|
-
export declare enum UserState {
|
|
274
|
-
OFFLINE = "OFFLINE",
|
|
275
|
-
ONLINE = "ONLINE",
|
|
276
|
-
PENDING_REGISTRATION = "PENDING_REGISTRATION"
|
|
277
|
-
}
|
|
278
|
-
export declare type Invite = InternalMessage & {
|
|
279
|
-
id: string;
|
|
280
|
-
from: UserId;
|
|
281
|
-
to: UserId | UserEmail;
|
|
282
|
-
};
|
|
283
|
-
export declare type User = {
|
|
284
|
-
state: UserState;
|
|
285
|
-
id: UserId;
|
|
286
|
-
nickname: UserNickname;
|
|
287
|
-
confirmed: boolean;
|
|
288
|
-
favourite: boolean;
|
|
289
|
-
invite: Invite;
|
|
290
|
-
};
|
|
291
|
-
export declare type UserListEvent = InternalMessage & {
|
|
292
|
-
list: Array<User>;
|
|
293
|
-
};
|
|
294
|
-
export declare type ContactInviteEvent = InternalMessage & {
|
|
295
|
-
invite: Invite;
|
|
296
|
-
};
|
|
297
|
-
export declare type ContactUpdateEvent = InternalMessage & {
|
|
298
|
-
contact: User;
|
|
299
|
-
};
|
|
300
|
-
export declare type ContactRemovedEvent = InternalMessage & {
|
|
301
|
-
contact: User;
|
|
302
|
-
};
|
|
303
|
-
export declare type CalendarEvent = {
|
|
304
|
-
id: string;
|
|
305
|
-
accessCode: string;
|
|
306
|
-
description: string;
|
|
307
|
-
title: string;
|
|
308
|
-
start: number;
|
|
309
|
-
end: number;
|
|
310
|
-
ownerVideo: boolean;
|
|
311
|
-
participantVideo: boolean;
|
|
312
|
-
recurring: boolean;
|
|
313
|
-
usePMI: boolean;
|
|
314
|
-
waitingRoom: boolean;
|
|
315
|
-
};
|
|
316
|
-
export declare type Calendar = {
|
|
317
|
-
events: Array<CalendarEvent>;
|
|
318
|
-
};
|
|
319
|
-
export declare type UserCalendarEvent = InternalMessage & {
|
|
320
|
-
calendar: Calendar;
|
|
321
|
-
};
|
|
322
|
-
export declare type UserSpecificChatInfo = {
|
|
323
|
-
id: string;
|
|
324
|
-
favourite: boolean;
|
|
325
|
-
channel: boolean;
|
|
326
|
-
name: string;
|
|
327
|
-
owner: UserId;
|
|
328
|
-
members: Array<UserId>;
|
|
329
|
-
lastReadMessageId: string;
|
|
330
|
-
canSend: boolean;
|
|
331
|
-
channelType: ChannelType;
|
|
332
|
-
channelSendPolicy: ChannelSendPolicy;
|
|
333
|
-
sendPermissionList: Array<string>;
|
|
334
|
-
};
|
|
335
|
-
export declare enum ChannelType {
|
|
336
|
-
PUBLIC = "PUBLIC",
|
|
337
|
-
PRIVATE = "PRIVATE"
|
|
338
|
-
}
|
|
339
|
-
export declare enum ChannelSendPolicy {
|
|
340
|
-
EVERYONE = "EVERYONE",
|
|
341
|
-
ADMIN = "ADMIN",
|
|
342
|
-
ADMIN_AND_LIST = "ADMIN_AND_LIST"
|
|
343
|
-
}
|
|
344
|
-
export declare type Chat = {
|
|
345
|
-
id: string;
|
|
346
|
-
name: string;
|
|
347
|
-
owner: UserId;
|
|
348
|
-
member: UserId;
|
|
349
|
-
favourite: boolean;
|
|
350
|
-
members: Array<UserId>;
|
|
351
|
-
messages: Array<Message>;
|
|
352
|
-
channel: boolean;
|
|
353
|
-
channelType: ChannelType;
|
|
354
|
-
channelSendPolicy: ChannelSendPolicy;
|
|
355
|
-
sendPermissionList: Array<string>;
|
|
356
|
-
};
|
|
357
|
-
export declare type NewChatEvent = InternalMessage & {
|
|
358
|
-
info: UserSpecificChatInfo;
|
|
359
|
-
};
|
|
360
|
-
export declare type RemovedChatEvent = InternalMessage & {
|
|
361
|
-
info: UserSpecificChatInfo;
|
|
362
|
-
};
|
|
363
|
-
export declare type UpdateChatEvent = InternalMessage & {
|
|
364
|
-
info: UserSpecificChatInfo;
|
|
365
|
-
};
|
|
366
|
-
export declare type ChatMap = {
|
|
367
|
-
[key: string]: UserSpecificChatInfo;
|
|
368
|
-
};
|
|
369
|
-
export declare type ChatsEvent = InternalMessage & {
|
|
370
|
-
chats: ChatMap;
|
|
371
|
-
};
|
|
372
|
-
export declare type PublicChannelsEvent = InternalMessage & {
|
|
373
|
-
channels: ChatMap;
|
|
374
|
-
};
|
|
375
|
-
export declare type ChatLoadedEvent = InternalMessage & {
|
|
376
|
-
chat: Chat;
|
|
377
|
-
};
|
|
378
|
-
export declare type OperationFailedEvent = InternalMessage & {
|
|
379
|
-
operation: Operations;
|
|
380
|
-
error: string;
|
|
381
|
-
info: any;
|
|
382
|
-
};
|
|
383
|
-
export declare type UserId = string;
|
|
384
|
-
export declare type UserNickname = string;
|
|
385
|
-
export declare type UserEmail = string;
|
package/dist/src/sdk/logger.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare enum Verbosity {
|
|
2
|
-
ERROR = 0,
|
|
3
|
-
WARN = 1,
|
|
4
|
-
INFO = 2,
|
|
5
|
-
DEBUG = 3,
|
|
6
|
-
TRACE = 4
|
|
7
|
-
}
|
|
8
|
-
declare type PrefixFunction = () => string;
|
|
9
|
-
declare const _default: {
|
|
10
|
-
setPrefix: (func: PrefixFunction) => void;
|
|
11
|
-
setVerbosity: (verbosityLevel: Verbosity) => void;
|
|
12
|
-
error: (...args: any[]) => void;
|
|
13
|
-
warn: (...args: any[]) => void;
|
|
14
|
-
info: (...args: any[]) => void;
|
|
15
|
-
debug: (...args: any[]) => void;
|
|
16
|
-
trace: (...args: any[]) => void;
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare type NotifierHandler<T> = (arg0?: T) => void;
|
|
2
|
-
export declare class Notifier<T extends string, A extends object> {
|
|
3
|
-
#private;
|
|
4
|
-
add(event: T, handler: NotifierHandler<A>): void;
|
|
5
|
-
remove(event: T, handler: NotifierHandler<A>): void;
|
|
6
|
-
notify(event: T, msg?: A): void;
|
|
7
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare function add(id: string, resolve: Function, reject: Function): void;
|
|
2
|
-
export declare function resolve(id: string, args?: any): boolean;
|
|
3
|
-
export declare function reject(id: string, args?: any): boolean;
|
|
4
|
-
declare function promised(id: string): boolean;
|
|
5
|
-
declare const _default: {
|
|
6
|
-
add: typeof add;
|
|
7
|
-
resolve: typeof resolve;
|
|
8
|
-
reject: typeof reject;
|
|
9
|
-
promised: typeof promised;
|
|
10
|
-
};
|
|
11
|
-
export default _default;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Room } from "./room";
|
|
2
|
-
import { Connection } from "./connection";
|
|
3
|
-
import { CreatedRoom, ParticipantRole, UserId, UserNickname, WaitingRoomUpdate } from "./constants";
|
|
4
|
-
export declare class RoomExtended extends Room {
|
|
5
|
-
constructor(connection: Connection, pc: RTCPeerConnection, name: string, pin: string);
|
|
6
|
-
createRoom(): Promise<CreatedRoom>;
|
|
7
|
-
sendControlMessage(to: UserNickname, msg: string, broadcast: boolean): Promise<void>;
|
|
8
|
-
authorizeWaitingList(userId: UserId, authorized: boolean): Promise<void>;
|
|
9
|
-
moveToWaitingRoom(nickname: UserNickname): Promise<void>;
|
|
10
|
-
configureWaitingRoom(enabled: boolean): Promise<WaitingRoomUpdate>;
|
|
11
|
-
assignRole(nickname: UserNickname, role: ParticipantRole): Promise<void>;
|
|
12
|
-
subscribeToWaitingParticipant(nickname: UserNickname): Promise<void>;
|
|
13
|
-
unsubscribeFromWaitingParticipant(nickname: UserNickname): Promise<void>;
|
|
14
|
-
}
|
package/dist/src/sdk/room.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { InternalMessage, JoinedRoom, LeftRoom, ParticipantRole, RoomEvent, RoomState } from "./constants";
|
|
2
|
-
import { Connection } from "./connection";
|
|
3
|
-
export declare class Room {
|
|
4
|
-
#private;
|
|
5
|
-
protected connection: Connection;
|
|
6
|
-
_name: string;
|
|
7
|
-
_pin: string;
|
|
8
|
-
protected pr: string;
|
|
9
|
-
constructor(connection: Connection, pc: RTCPeerConnection, name: string, pin: string);
|
|
10
|
-
processEvent(e: InternalMessage): Promise<void>;
|
|
11
|
-
join(config?: {
|
|
12
|
-
[key: string]: string;
|
|
13
|
-
}): Promise<JoinedRoom>;
|
|
14
|
-
updateState(config?: {
|
|
15
|
-
[key: string]: string;
|
|
16
|
-
}): Promise<void>;
|
|
17
|
-
destroyRoom(): Promise<void>;
|
|
18
|
-
leaveRoom(): Promise<LeftRoom>;
|
|
19
|
-
sendMessage(msg: string): Promise<void>;
|
|
20
|
-
changeQuality(trackId: string, quality: string, tid: number): Promise<void>;
|
|
21
|
-
muteTrack(trackId: string, mute: boolean): Promise<void>;
|
|
22
|
-
on(event: RoomEvent, callback: (arg0: InternalMessage) => void): Room;
|
|
23
|
-
off(event: RoomEvent, callback: (arg0: InternalMessage) => void): Room;
|
|
24
|
-
name(): string;
|
|
25
|
-
pin(): string;
|
|
26
|
-
pc(): RTCPeerConnection;
|
|
27
|
-
role(): ParticipantRole;
|
|
28
|
-
invite(): string;
|
|
29
|
-
state(): RoomState;
|
|
30
|
-
}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { AttachmentRequest, Calendar, ChannelSendPolicy, ChannelType, Chat, ChatMap, InternalMessage, Invite, Message, MessageAttachment, MessageAttachmentData, MessageStatus, SfuEvent, State, User, UserEmail, UserId, UserNickname, UserSpecificChatInfo } from "./constants";
|
|
2
|
-
import { RoomExtended } from "./room-extended";
|
|
3
|
-
declare type NotifyUnion = InternalMessage | Message | MessageStatus | Array<User> | Calendar | UserSpecificChatInfo | Invite | User | ChatMap | Chat | ArrayBuffer;
|
|
4
|
-
export declare class SfuExtended {
|
|
5
|
-
#private;
|
|
6
|
-
constructor();
|
|
7
|
-
connect(options: {
|
|
8
|
-
url: string;
|
|
9
|
-
username: UserId;
|
|
10
|
-
password: string;
|
|
11
|
-
nickname: UserNickname;
|
|
12
|
-
timeout?: number;
|
|
13
|
-
}): Promise<{
|
|
14
|
-
username: UserId;
|
|
15
|
-
nickname: UserNickname;
|
|
16
|
-
pmi: string;
|
|
17
|
-
}>;
|
|
18
|
-
sendMessage(msg: {
|
|
19
|
-
body: string;
|
|
20
|
-
chatId: string;
|
|
21
|
-
attachments?: Array<MessageAttachment>;
|
|
22
|
-
}): Promise<MessageStatus>;
|
|
23
|
-
sendMessageAttachments(attachments: Array<MessageAttachmentData>): Promise<void>;
|
|
24
|
-
getMessageAttachment(attachment: AttachmentRequest): void;
|
|
25
|
-
markMessageRead(msg: {
|
|
26
|
-
id: string;
|
|
27
|
-
chatId: string;
|
|
28
|
-
}): Promise<MessageStatus>;
|
|
29
|
-
markMessageUnread(msg: {
|
|
30
|
-
id: string;
|
|
31
|
-
chatId: string;
|
|
32
|
-
}): Promise<MessageStatus>;
|
|
33
|
-
getUserList(): Promise<User[]>;
|
|
34
|
-
getUserCalendar(): Promise<Calendar>;
|
|
35
|
-
addCalendarEvent(event: {
|
|
36
|
-
id: string;
|
|
37
|
-
title: string;
|
|
38
|
-
description: string;
|
|
39
|
-
start: number;
|
|
40
|
-
end: number;
|
|
41
|
-
recurring: boolean;
|
|
42
|
-
accessCode: string;
|
|
43
|
-
waitingRoom: boolean;
|
|
44
|
-
usePMI: boolean;
|
|
45
|
-
ownerVideo: boolean;
|
|
46
|
-
participantVideo: boolean;
|
|
47
|
-
}): Promise<void>;
|
|
48
|
-
removeCalendarEvent(event: {
|
|
49
|
-
id: string;
|
|
50
|
-
}): Promise<void>;
|
|
51
|
-
getUserChats(): Promise<ChatMap>;
|
|
52
|
-
getPublicChannels(): Promise<ChatMap>;
|
|
53
|
-
loadChat(chat: {
|
|
54
|
-
id: string;
|
|
55
|
-
}): Promise<Chat>;
|
|
56
|
-
createChat(chat: {
|
|
57
|
-
id?: string;
|
|
58
|
-
name?: string;
|
|
59
|
-
members?: Array<UserId>;
|
|
60
|
-
favourite?: boolean;
|
|
61
|
-
channel?: boolean;
|
|
62
|
-
channelType?: ChannelType;
|
|
63
|
-
channelSendPolicy?: ChannelSendPolicy;
|
|
64
|
-
sendPermissionList?: Array<string>;
|
|
65
|
-
}): Promise<UserSpecificChatInfo>;
|
|
66
|
-
deleteChat(chat: {
|
|
67
|
-
id: string;
|
|
68
|
-
}): Promise<void>;
|
|
69
|
-
renameChat(chat: {
|
|
70
|
-
id: string;
|
|
71
|
-
name: string;
|
|
72
|
-
}): Promise<void>;
|
|
73
|
-
addMemberToChat(chat: {
|
|
74
|
-
id: string;
|
|
75
|
-
member: UserId;
|
|
76
|
-
}): Promise<UserSpecificChatInfo>;
|
|
77
|
-
removeMemberFromChat(chat: {
|
|
78
|
-
id: string;
|
|
79
|
-
member: UserId;
|
|
80
|
-
}): Promise<UserSpecificChatInfo>;
|
|
81
|
-
inviteContact(invite: {
|
|
82
|
-
to: UserId | UserEmail;
|
|
83
|
-
}): Promise<User>;
|
|
84
|
-
addContactToFavourites(contact: {
|
|
85
|
-
id: UserId;
|
|
86
|
-
}): Promise<User>;
|
|
87
|
-
removeContactFromFavourites(contact: {
|
|
88
|
-
id: UserId;
|
|
89
|
-
}): Promise<User>;
|
|
90
|
-
confirmContact(invite: {
|
|
91
|
-
id: string;
|
|
92
|
-
from: UserId;
|
|
93
|
-
to: UserId;
|
|
94
|
-
}): Promise<User>;
|
|
95
|
-
removeContact(contact: {
|
|
96
|
-
id: UserId;
|
|
97
|
-
}): Promise<User>;
|
|
98
|
-
updateChannelSendPolicy(channel: {
|
|
99
|
-
id: string;
|
|
100
|
-
channelSendPolicy: ChannelSendPolicy;
|
|
101
|
-
}): Promise<UserSpecificChatInfo>;
|
|
102
|
-
addChannelSendPermissionListMember(channel: {
|
|
103
|
-
id: string;
|
|
104
|
-
member: UserId;
|
|
105
|
-
}): Promise<UserSpecificChatInfo>;
|
|
106
|
-
removeChannelSendPermissionListMember(channel: {
|
|
107
|
-
id: string;
|
|
108
|
-
member: UserId;
|
|
109
|
-
}): Promise<UserSpecificChatInfo>;
|
|
110
|
-
addChatToFavourites(chat: {
|
|
111
|
-
id: string;
|
|
112
|
-
}): Promise<UserSpecificChatInfo>;
|
|
113
|
-
removeChatFromFavourites(chat: {
|
|
114
|
-
id: string;
|
|
115
|
-
}): Promise<UserSpecificChatInfo>;
|
|
116
|
-
createRoom(options: {
|
|
117
|
-
pc: RTCPeerConnection;
|
|
118
|
-
name: string;
|
|
119
|
-
pin: string;
|
|
120
|
-
}): RoomExtended;
|
|
121
|
-
getRoom(options: {
|
|
122
|
-
name: string;
|
|
123
|
-
}): RoomExtended;
|
|
124
|
-
disconnect(): void;
|
|
125
|
-
user(): {
|
|
126
|
-
username: string;
|
|
127
|
-
nickname: string;
|
|
128
|
-
pmi: string;
|
|
129
|
-
};
|
|
130
|
-
server(): string;
|
|
131
|
-
state(): State;
|
|
132
|
-
on(event: SfuEvent, callback: (arg0: NotifyUnion) => void): SfuExtended;
|
|
133
|
-
off(event: SfuEvent, callback: (arg0: NotifyUnion) => void): SfuExtended;
|
|
134
|
-
}
|
|
135
|
-
export {};
|
package/dist/src/sdk/sfu.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { InternalMessage, SfuEvent, State, UserNickname } from "./constants";
|
|
2
|
-
import { Room } from "./room";
|
|
3
|
-
export declare class Sfu {
|
|
4
|
-
#private;
|
|
5
|
-
constructor();
|
|
6
|
-
connect(options: {
|
|
7
|
-
url: string;
|
|
8
|
-
timeout?: number;
|
|
9
|
-
nickname: UserNickname;
|
|
10
|
-
logGroup: string;
|
|
11
|
-
}): Promise<void>;
|
|
12
|
-
createRoom(options: {
|
|
13
|
-
pc: RTCPeerConnection;
|
|
14
|
-
name: string;
|
|
15
|
-
pin: string;
|
|
16
|
-
}): Room;
|
|
17
|
-
disconnect(): void;
|
|
18
|
-
room(): Room;
|
|
19
|
-
nickname(): string;
|
|
20
|
-
state(): State;
|
|
21
|
-
on(event: SfuEvent, callback: (arg0: InternalMessage) => void): Sfu;
|
|
22
|
-
off(event: SfuEvent, callback: (arg0: InternalMessage) => void): Sfu;
|
|
23
|
-
}
|