@vkontakte/calls-sdk 2.8.12-dev.d8ade7f9.0 → 2.8.12-dev.dbe4e248.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 +16 -3
- package/abstract/BaseApi.d.ts +1 -1
- package/abstract/BaseSignaling.d.ts +5 -4
- package/calls-sdk.cjs.js +10 -10
- package/calls-sdk.esm.js +2435 -2445
- package/classes/CallRegistry.d.ts +1 -1
- package/classes/ExternalIdCache.d.ts +1 -0
- package/classes/{Conversation.d.ts → conversation/Conversation.d.ts} +40 -36
- package/classes/conversation/Conversation.testUtils.d.ts +148 -0
- package/classes/{ConversationResponseValidator.d.ts → conversation/ConversationResponseValidator.d.ts} +1 -1
- package/classes/{DisplayLayoutRequester.d.ts → conversation/DisplayLayoutRequester.d.ts} +5 -5
- package/classes/conversation/index.d.ts +1 -0
- package/classes/stat/CallLifecycleStats.d.ts +0 -4
- package/classes/transport/DirectTransport.d.ts +1 -0
- package/classes/transport/ServerTransport.d.ts +1 -0
- package/default/Api.d.ts +1 -1
- package/default/Signaling.d.ts +7 -12
- package/default/SignalingTransport.d.ts +6 -1
- package/enums/ClientHangupReason.d.ts +7 -0
- package/enums/Stat.d.ts +0 -1
- package/package.json +1 -1
- package/static/External.d.ts +1 -1
- package/static/Params.d.ts +1 -1
- package/static/Utils.d.ts +1 -1
- package/static/WebRTCUtils.d.ts +1 -6
- package/utils/IceServers.d.ts +2 -0
- package/utils/NavigatorPermissions.d.ts +2 -2
package/CallsSDK.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import Api from './default/Api';
|
|
|
14
14
|
import Signaling from './default/Signaling';
|
|
15
15
|
import CallDirection from './enums/CallDirection';
|
|
16
16
|
import CallType from './enums/CallType';
|
|
17
|
+
import type ClientHangupReason from './enums/ClientHangupReason';
|
|
17
18
|
import ChatRoomEventType from './enums/ChatRoomEventType';
|
|
18
19
|
import ConversationFeature from './enums/ConversationFeature';
|
|
19
20
|
import ConversationOption from './enums/ConversationOption';
|
|
@@ -272,8 +273,14 @@ export declare function authorize(authToken?: string, apiBaseUrl?: IAPIBaseUrl):
|
|
|
272
273
|
export declare function acceptCall(mediaOptions?: MediaOption[], conversationId?: string): Promise<ConversationData>;
|
|
273
274
|
/**
|
|
274
275
|
* Отклонить входящий звонок
|
|
276
|
+
*
|
|
277
|
+
* @param conversationId ID звонка
|
|
278
|
+
* @param params.reason Причина завершения для проброса в сигналинг
|
|
279
|
+
* (по умолчанию `REJECTED`). См. {@link ClientHangupReason}.
|
|
275
280
|
*/
|
|
276
|
-
export declare function declineCall(conversationId?: string
|
|
281
|
+
export declare function declineCall(conversationId?: string, params?: {
|
|
282
|
+
reason?: ClientHangupReason;
|
|
283
|
+
}): Promise<void>;
|
|
277
284
|
/**
|
|
278
285
|
* Присоединиться к активному звонку
|
|
279
286
|
*
|
|
@@ -295,8 +302,14 @@ export declare function joinCallInternal(conversationId: string, mediaOptions: M
|
|
|
295
302
|
export declare function joinCallByLink(joinLink: string, mediaOptions?: MediaOption[], anonymToken?: string, observedIds?: ExternalUserId[], payload?: string, onFastJoin?: FastJoinHandler): Promise<ConversationData>;
|
|
296
303
|
/**
|
|
297
304
|
* Завершить текущий разговор
|
|
305
|
+
*
|
|
306
|
+
* @param conversationId ID звонка
|
|
307
|
+
* @param params.reason Причина завершения для проброса в сигналинг.
|
|
308
|
+
* По умолчанию `HUNGUP` (если звонок активен) или `CANCELED`. См. {@link ClientHangupReason}.
|
|
298
309
|
*/
|
|
299
|
-
export declare function hangup(conversationId?: string
|
|
310
|
+
export declare function hangup(conversationId?: string, params?: {
|
|
311
|
+
reason?: ClientHangupReason;
|
|
312
|
+
}): Promise<void>;
|
|
300
313
|
/**
|
|
301
314
|
* Добавить собеседника в звонок
|
|
302
315
|
*
|
|
@@ -781,5 +794,5 @@ export declare function getSyncedTime(): number;
|
|
|
781
794
|
* Версия SDK
|
|
782
795
|
*/
|
|
783
796
|
export declare function version(): string;
|
|
784
|
-
export type { AddParticipantParams, AudienceModeHandsResponse, BrowserName, CompositeUserId, ConversationData, ConversationParams, ConversationResponse, CustomError, ExternalId, ExternalParticipant, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, DisplayLayoutRequest, GetParticipantsSignalingResponse, GetRoomsSignalingResponse, HangupReasonData, IApiEnv, IAPIBaseUrl, IAsrStartParams, IAsrStopParams, IAsrData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantId, ParticipantLayout, ParticipantListMarkers, ParticipantListType, ParticipantPriority, ParticipantsStateList, ParticipantStateData, ParticipantStateDataKey, ParticipantStateMapped, ParticipantStreamDescription, ParticipantListChunkParameters, ParticipantListMarker, RequestKeyFrame, Rooms, IGetParticipantsParameters, ScreenCaptureSettings, SignalingMessage, StatResult, StopStream, WaitingHallResponse, IMovieMetaData, IVideoDimentions, IFeedbackExternal, ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, IRoomId, Room, RoomsUpdate, RoomParticipantUpdate, IUpdateMovieData, IFeaturesPerRole, IMuteParticipantParams, IMuteParticipantInternalParams, IStartStreamData, IStopStreamData, IPublishStreamData, VmojiError, FastStartHandler, FastStartParams, FastJoinHandler, FastJoinParams, FastJoinResponse, };
|
|
797
|
+
export type { AddParticipantParams, AudienceModeHandsResponse, BrowserName, ClientHangupReason, CompositeUserId, ConversationData, ConversationParams, ConversationResponse, CustomError, ExternalId, ExternalParticipant, ExternalParticipantListChunk, ExternalParticipantListMarker, ExternalParticipantListMarkers as ExternalParticipantMarkers, ExternalParticipantId, DisplayLayoutRequest, GetParticipantsSignalingResponse, GetRoomsSignalingResponse, HangupReasonData, IApiEnv, IAPIBaseUrl, IAsrStartParams, IAsrStopParams, IAsrData, IceServer, JSONArray, JSONObject, JSONType, Layout, MediaModifiers, MediaSettings, MuteStates, OkUserId, ParamsObject, ParticipantId, ParticipantLayout, ParticipantListMarkers, ParticipantListType, ParticipantPriority, ParticipantsStateList, ParticipantStateData, ParticipantStateDataKey, ParticipantStateMapped, ParticipantStreamDescription, ParticipantListChunkParameters, ParticipantListMarker, RequestKeyFrame, Rooms, IGetParticipantsParameters, ScreenCaptureSettings, SignalingMessage, StatResult, StopStream, WaitingHallResponse, IMovieMetaData, IVideoDimentions, IFeedbackExternal, ISharedMovieInfo, ISharedMovieStoppedInfo, ISharedMovieState, ISharedMovieStateResponse, IAddMovieParams, IOnRemoteMovieData, IMoviePreview, IRoomId, Room, RoomsUpdate, RoomParticipantUpdate, IUpdateMovieData, IFeaturesPerRole, IMuteParticipantParams, IMuteParticipantInternalParams, IStartStreamData, IStopStreamData, IPublishStreamData, VmojiError, FastStartHandler, FastStartParams, FastJoinHandler, FastJoinParams, FastJoinResponse, };
|
|
785
798
|
export { Api, AuthData, BaseLogger, CallDirection, CallType, ChatRoomEventType, ConversationOption, DebugMessageType, ExternalIdType, FacingMode, FatalError, HangupReason, HangupType, MediaOption, MediaTrackKind, MediaType, MuteState, ParticipantState, ParticipantStateDataValue, ParticipantStatus, RecordRole, Signaling, SignalingCommandType, SignalingConnectionType, SignalingNotification, UserRole, UserType, TransportTopology, RoomsEventType, ConversationFeature, ArrayDequeue, ApiExternal, VolumeDetector, };
|
package/abstract/BaseApi.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export default abstract class BaseApi {
|
|
|
38
38
|
*/
|
|
39
39
|
setAbortSignal(signal: AbortSignal | undefined): void;
|
|
40
40
|
abstract authorize(): Promise<void>;
|
|
41
|
-
abstract userId(participantId: ParticipantId):
|
|
41
|
+
abstract userId(participantId: ParticipantId): ExternalParticipantId;
|
|
42
42
|
abstract deviceId(): string;
|
|
43
43
|
abstract createConversation(conversationId: string, payload?: string, requireAuthToJoin?: boolean, createConversationParameters?: {
|
|
44
44
|
onlyAdminCanShareMovie?: boolean;
|
|
@@ -42,6 +42,9 @@ export interface AddParticipantParams {
|
|
|
42
42
|
*/
|
|
43
43
|
payload?: string;
|
|
44
44
|
}
|
|
45
|
+
export declare class SignalingDisposedError extends Error {
|
|
46
|
+
constructor(command?: string);
|
|
47
|
+
}
|
|
45
48
|
/**
|
|
46
49
|
* Should trigger SignalingEvent.NOTIFICATION on notification message and SignalingEvent.FAILED on error
|
|
47
50
|
* https://wiki.odkl.ru/display/projects/Signaling+API#SignalingAPI-Notifications
|
|
@@ -55,7 +58,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
55
58
|
*/
|
|
56
59
|
setAbortSignal(signal: AbortSignal | undefined): void;
|
|
57
60
|
abstract connect(connectionType: SignalingConnectionType, conversation?: ConversationResponse): Promise<SignalingMessage.Connection>;
|
|
58
|
-
abstract
|
|
61
|
+
abstract dispose(cause?: Error): void;
|
|
59
62
|
abstract hangup(reason: string): Promise<SignalingMessage | void>;
|
|
60
63
|
abstract acceptCall(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
61
64
|
abstract sendSdp(participantId: ParticipantId, sdp: RTCSessionDescriptionInit, extraPayload?: Record<string, any>): Promise<SignalingMessage>;
|
|
@@ -130,9 +133,7 @@ export default abstract class BaseSignaling extends EventEmitter {
|
|
|
130
133
|
requestRealloc(): void;
|
|
131
134
|
setEndpoint(endpoint: string): void;
|
|
132
135
|
setWebTransportEndpoint(endpoint: string | null): void;
|
|
133
|
-
setConversationId(conversationId: string): void;
|
|
134
136
|
readyToSend(isReady?: boolean): void;
|
|
135
|
-
|
|
136
|
-
requestTestMode(consumerCommand: string, producerCommand: string | null): void;
|
|
137
|
+
requestTestMode(consumerCommand: string, producerCommand: string | null): Promise<SignalingMessage | void>;
|
|
137
138
|
getNextCommandSequenceNumber(): number;
|
|
138
139
|
}
|