@vkontakte/calls-sdk 2.8.2-dev.638a3c6.0 → 2.8.2-dev.6410270.0
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/CallsSDK.d.ts +23 -20
- package/abstract/BaseApi.d.ts +2 -3
- package/abstract/BaseSignaling.d.ts +3 -2
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +3 -1
- package/classes/transport/Transport.d.ts +0 -1
- package/default/Api.d.ts +2 -3
- package/default/Signaling.d.ts +3 -2
- package/enums/SignalingCommandType.d.ts +1 -1
- package/package.json +3 -3
- package/static/Params.d.ts +6 -6
- package/static/Utils.d.ts +1 -1
- package/types/ExternalId.d.ts +5 -5
- package/types/Streams.d.ts +0 -7
package/CallsSDK.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CallsSDK
|
|
3
3
|
*/
|
|
4
|
-
import type { IEffect, VideoEffects } from '@vkontakte/calls-video-effects';
|
|
5
4
|
import type * as Vmoji from '@vkontakte/calls-vmoji';
|
|
5
|
+
import type { IEffect, VideoEffects } from '@vkontakte/calls-video-effects';
|
|
6
6
|
import BaseApi from './abstract/BaseApi';
|
|
7
7
|
import BaseLogger from './abstract/BaseLogger';
|
|
8
8
|
import BaseSignaling, { AddParticipantParams } from './abstract/BaseSignaling';
|
|
9
9
|
import HangupReason, { HangupReasonData } from './classes/HangupReason';
|
|
10
10
|
import { MediaTrackKind } from './classes/MediaSource';
|
|
11
|
+
import { StatResult } from './types/Statistics';
|
|
11
12
|
import { TransportTopology } from './classes/transport/Transport';
|
|
12
13
|
import Api from './default/Api';
|
|
13
14
|
import Signaling from './default/Signaling';
|
|
14
15
|
import CallDirection from './enums/CallDirection';
|
|
15
16
|
import CallType from './enums/CallType';
|
|
16
17
|
import ChatRoomEventType from './enums/ChatRoomEventType';
|
|
17
|
-
import ConversationFeature from './enums/ConversationFeature';
|
|
18
18
|
import ConversationOption from './enums/ConversationOption';
|
|
19
19
|
import FatalError from './enums/FatalError';
|
|
20
20
|
import HangupType from './enums/HangupType';
|
|
@@ -22,7 +22,6 @@ import MediaOption from './enums/MediaOption';
|
|
|
22
22
|
import MuteState from './enums/MuteState';
|
|
23
23
|
import ParticipantState from './enums/ParticipantState';
|
|
24
24
|
import RecordRole from './enums/RecordRole';
|
|
25
|
-
import RoomsEventType from './enums/RoomsEventType';
|
|
26
25
|
import SignalingCommandType from './enums/SignalingCommandType';
|
|
27
26
|
import SignalingConnectionType from './enums/SignalingConnectionType';
|
|
28
27
|
import SignalingNotification from './enums/SignalingNotification';
|
|
@@ -34,30 +33,31 @@ import { JSONArray, JSONObject, JSONType } from './static/Json';
|
|
|
34
33
|
import { ParamsObject } from './static/Params';
|
|
35
34
|
import Utils from './static/Utils';
|
|
36
35
|
import WebRTCUtils, { FacingMode } from './static/WebRTCUtils';
|
|
37
|
-
import {
|
|
38
|
-
import { ConversationData } from './types/Conversation';
|
|
39
|
-
import { IFeaturesPerRole } from './types/ConversationFeature';
|
|
36
|
+
import { IAsrStartParams, IAsrStopParams, IAsrData } from './types/Asr';
|
|
40
37
|
import ConversationParams from './types/ConversationParams';
|
|
41
38
|
import ConversationResponse from './types/ConversationResponse';
|
|
42
39
|
import { ExternalId, ExternalIdType, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers, ExternalUserId } from './types/ExternalId';
|
|
43
|
-
import { IFeedbackExternal } from './types/Feedback';
|
|
44
40
|
import IceServer from './types/IceServer';
|
|
45
41
|
import MediaModifiers from './types/MediaModifiers';
|
|
46
42
|
import { IVideoDimentions, MediaSettings } from './types/MediaSettings';
|
|
47
|
-
import { IAddMovieParams, IMovieMetaData, IMoviePreview, IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStateResponse, ISharedMovieStoppedInfo, IUpdateMovieData } from './types/MovieShare';
|
|
48
43
|
import MuteStates, { IMuteParticipantInternalParams, IMuteParticipantParams } from './types/MuteStates';
|
|
49
44
|
import { IGetParticipantsParameters, OkUserId, ParticipantListMarker, ParticipantListMarkers, ParticipantListType, ParticipantStateMapped } from './types/Participant';
|
|
50
45
|
import ParticipantLayout, { Layout, RequestKeyFrame, StopStream } from './types/ParticipantLayout';
|
|
51
46
|
import { ParticipantListChunkParameters } from './types/ParticipantListChunk';
|
|
52
47
|
import ParticipantPriority from './types/ParticipantPriority';
|
|
53
48
|
import { MediaType, ParticipantStreamDescription } from './types/ParticipantStreamDescription';
|
|
54
|
-
import {
|
|
49
|
+
import { Room, RoomsUpdate, RoomParticipantUpdate, Rooms, IRoomId } from './types/Room';
|
|
50
|
+
import RoomsEventType from './enums/RoomsEventType';
|
|
55
51
|
import { ScreenCaptureSettings } from './types/ScreenCaptureSettings';
|
|
56
52
|
import SignalingMessage from './types/SignalingMessage';
|
|
57
|
-
import { StatResult } from './types/Statistics';
|
|
58
|
-
import { IStartStreamData, IStopStreamData } from './types/Streams';
|
|
59
53
|
import { WaitingHallResponse } from './types/WaitingHall';
|
|
54
|
+
import { IFeedbackExternal } from './types/Feedback';
|
|
55
|
+
import { ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, IUpdateMovieData, IMovieMetaData } from './types/MovieShare';
|
|
56
|
+
import { IStartStreamData, IStopStreamData } from './types/Streams';
|
|
57
|
+
import ConversationFeature from './enums/ConversationFeature';
|
|
58
|
+
import { IFeaturesPerRole } from './types/ConversationFeature';
|
|
60
59
|
import { ArrayDequeue } from './utils/ArrayDequeue';
|
|
60
|
+
import { ConversationData } from './types/Conversation';
|
|
61
61
|
/**
|
|
62
62
|
* Информация о текущем браузере
|
|
63
63
|
*/
|
|
@@ -224,7 +224,7 @@ export declare function init(params: Partial<ParamsObject>): Promise<void>;
|
|
|
224
224
|
* @param requireAuthToJoin Запретить анонимам подключаться по ссылке (если поддерживается сервером)
|
|
225
225
|
* @param onlyAdminCanShareMovie Только администратор может включать совметсный просмотр
|
|
226
226
|
*/
|
|
227
|
-
export declare function callTo(externalId?: ExternalId | ExternalId[], mediaOptions?: MediaOption[], payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, onlyAdminCanShareMovie?: boolean): Promise<ConversationData>;
|
|
227
|
+
export declare function callTo(externalId?: string | ExternalId | string[] | ExternalId[], mediaOptions?: MediaOption[], payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, onlyAdminCanShareMovie?: boolean): Promise<ConversationData>;
|
|
228
228
|
export declare function callInternal(ids: OkUserId[], type: CallType | undefined, mediaOptions: MediaOption[], payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, onlyAdminCanShareMovie?: boolean): Promise<ConversationData>;
|
|
229
229
|
/**
|
|
230
230
|
* Обработать пуш о входящем звонке
|
|
@@ -282,7 +282,7 @@ export declare function hangup(): Promise<void>;
|
|
|
282
282
|
* @param externalId Внешний ID пользователя
|
|
283
283
|
* @param params Параметры
|
|
284
284
|
*/
|
|
285
|
-
export declare function addParticipant(externalId: ExternalId, params?: AddParticipantParams): Promise<void>;
|
|
285
|
+
export declare function addParticipant(externalId: string | ExternalId, params?: AddParticipantParams): Promise<void>;
|
|
286
286
|
export declare function addParticipantInternal(uid: OkUserId, params?: AddParticipantParams): Promise<void>;
|
|
287
287
|
/**
|
|
288
288
|
* Удалить собеседника из звонка
|
|
@@ -290,7 +290,7 @@ export declare function addParticipantInternal(uid: OkUserId, params?: AddPartic
|
|
|
290
290
|
* @param externalId Внешний ID пользователя
|
|
291
291
|
* @param ban Забанить пользователя
|
|
292
292
|
*/
|
|
293
|
-
export declare function removeParticipant(externalId: ExternalId, ban?: boolean): Promise<void>;
|
|
293
|
+
export declare function removeParticipant(externalId: string | ExternalId, ban?: boolean): Promise<void>;
|
|
294
294
|
export declare function removeParticipantInternal(uid: OkUserId, ban?: boolean): Promise<void>;
|
|
295
295
|
/**
|
|
296
296
|
* Изменить камеру на фронтальную или заднюю (для мобильных устройств)
|
|
@@ -420,7 +420,7 @@ export declare function changeConversationOptions(changes: {
|
|
|
420
420
|
* @param message Сообщение
|
|
421
421
|
* @param externalId Внешний ID пользователя (если не указано, отправит всем)
|
|
422
422
|
*/
|
|
423
|
-
export declare function chatMessage(message: string, externalId?: ExternalId | null): Promise<void>;
|
|
423
|
+
export declare function chatMessage(message: string, externalId?: string | ExternalId | null): Promise<void>;
|
|
424
424
|
export declare function chatMessageInternal(message: string, uid?: OkUserId | null): Promise<void>;
|
|
425
425
|
/**
|
|
426
426
|
* Получить историю сообщений чата
|
|
@@ -506,12 +506,15 @@ export declare function stopStream(roomId?: number | null): Promise<undefined>;
|
|
|
506
506
|
* Устанавливает роль участника в запись звонка
|
|
507
507
|
* Если хотя бы у одного участника звонка выставлена роль, то в записи звонка будут
|
|
508
508
|
* видны только те участники, у кого есть роль.
|
|
509
|
-
*
|
|
510
|
-
*
|
|
511
|
-
*
|
|
512
|
-
*
|
|
509
|
+
* KING - участник показывается крупно в записи звонка (только один участник имеет такую роль)
|
|
510
|
+
* PAWN - участник показывается в записи звонка
|
|
511
|
+
* null - роль удаляется
|
|
512
|
+
*
|
|
513
|
+
* @param externalId Внешний ID пользователя
|
|
514
|
+
* @param role Роль, если null, то роль удалится
|
|
515
|
+
* @param roomId ID сессионного зала записи. Если null, то роль применится в основном звонке
|
|
513
516
|
*/
|
|
514
|
-
export declare function
|
|
517
|
+
export declare function recordSetRole(externalId: ExternalId, role: RecordRole | null, roomId?: number | null): Promise<void>;
|
|
515
518
|
/**
|
|
516
519
|
* Получить информацию о трансляции звонка
|
|
517
520
|
*/
|
package/abstract/BaseApi.d.ts
CHANGED
|
@@ -44,10 +44,9 @@ export default abstract class BaseApi {
|
|
|
44
44
|
abstract setUserId(userId: OkUserId): void;
|
|
45
45
|
log(items: LogItem[]): void;
|
|
46
46
|
prepareUserIds(ids: OkUserId[]): Promise<void>;
|
|
47
|
-
abstract getOkIdsByExternalIds(externalIds: ExternalId[]): Promise<OkUserId[]>;
|
|
48
|
-
abstract getParticipantIdsByExternalIds(externalIds: ExternalId[]): Promise<Map<ExternalId, ParticipantId>>;
|
|
47
|
+
abstract getOkIdsByExternalIds(externalIds: (string | ExternalId)[]): Promise<OkUserId[]>;
|
|
49
48
|
abstract getExternalIdsByOkIds(uids: OkUserId[]): Promise<ExternalParticipantId[]>;
|
|
50
|
-
getCachedOkIdByExternalId(externalId:
|
|
49
|
+
getCachedOkIdByExternalId(externalId: ExternalParticipantId): CompositeUserId | null;
|
|
51
50
|
cacheExternalId(participantId: CompositeUserId, externalId: ExternalParticipantId): void;
|
|
52
51
|
hangupConversation(conversationId: string): void;
|
|
53
52
|
removeHistoryRecords(recordIds: number[]): Promise<void>;
|
|
@@ -6,6 +6,7 @@ import { TransportTopology } from '../classes/transport/Transport';
|
|
|
6
6
|
import ConversationFeature from '../enums/ConversationFeature';
|
|
7
7
|
import ConversationOption from '../enums/ConversationOption';
|
|
8
8
|
import MediaOption from '../enums/MediaOption';
|
|
9
|
+
import RecordRole from '../enums/RecordRole';
|
|
9
10
|
import SignalingConnectionType from '../enums/SignalingConnectionType';
|
|
10
11
|
import UserRole from '../enums/UserRole';
|
|
11
12
|
import { JSONObject } from '../static/Json';
|
|
@@ -19,7 +20,7 @@ import { CompositeUserId, ParticipantId } from '../types/Participant';
|
|
|
19
20
|
import { ParticipantLayout, RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
|
|
20
21
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
21
22
|
import SignalingMessage from '../types/SignalingMessage';
|
|
22
|
-
import {
|
|
23
|
+
import { IStartStreamData, IStopStreamData } from '../types/Streams';
|
|
23
24
|
import { WaitingParticipantId } from '../types/WaitingHall';
|
|
24
25
|
import { SharingStatReport } from '../classes/screenshare/SharingStatReport';
|
|
25
26
|
/**
|
|
@@ -74,7 +75,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
74
75
|
abstract removeRooms(roomIds: number[]): Promise<SignalingMessage>;
|
|
75
76
|
abstract startStream(data: IStartStreamData): Promise<SignalingMessage>;
|
|
76
77
|
abstract stopStream(data: IStopStreamData): Promise<SignalingMessage>;
|
|
77
|
-
abstract
|
|
78
|
+
abstract recordSetRole(participantId: ParticipantId, role: RecordRole | null, roomId: number | null): Promise<SignalingMessage>;
|
|
78
79
|
abstract getRecordStatus(): Promise<SignalingMessage>;
|
|
79
80
|
abstract switchTopology(topology: TransportTopology, force?: boolean): Promise<SignalingMessage>;
|
|
80
81
|
abstract reportPerfStat(report: PerfStatReport): Promise<SignalingMessage>;
|