@vkontakte/calls-sdk 2.8.13-dev.805c82c2.0 → 2.8.13-dev.85486f32.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 +51 -18
- package/abstract/BaseApi.d.ts +14 -10
- package/calls-sdk.cjs.js +7 -7
- package/calls-sdk.esm.js +5343 -3528
- package/classes/AudioFix.d.ts +2 -2
- package/classes/AudioOutput.d.ts +7 -6
- package/classes/CallRegistry.d.ts +22 -6
- package/classes/MediaSource.d.ts +16 -2
- package/classes/SignalingErrors.d.ts +6 -0
- package/classes/SpecListener.d.ts +2 -2
- package/classes/StatsLogger.d.ts +1 -1
- package/classes/codec/LibVPxDecoder.d.ts +2 -2
- package/classes/codec/LibVPxEncoder.d.ts +2 -2
- package/classes/codec/WebCodecsDecoder.d.ts +2 -2
- package/classes/codec/WebCodecsEncoder.d.ts +2 -2
- package/classes/codec/WorkerBase.d.ts +3 -3
- package/classes/conversation/Conversation.d.ts +32 -10
- package/classes/conversation/Conversation.testUtils.d.ts +4 -3
- package/classes/screenshare/ScreenCaptureReceiver.d.ts +2 -2
- package/classes/screenshare/ScreenCaptureSender.d.ts +3 -3
- package/classes/screenshare/StreamBuilder.d.ts +2 -2
- package/classes/stat/ApiCallStats.d.ts +12 -0
- package/classes/stat/BatteryStats.d.ts +25 -0
- package/classes/stat/CallLifecycleStats.d.ts +5 -2
- package/classes/stat/CallStatTail.d.ts +65 -0
- package/classes/stat/ClientResourceStats.d.ts +41 -0
- package/classes/stat/CodecStatsAggregator.d.ts +5 -2
- package/classes/stat/ConversationStats.d.ts +22 -3
- package/classes/stat/MlStats.d.ts +37 -0
- package/classes/stat/NetworkAdaptationStats.d.ts +35 -0
- package/classes/stat/PeerConnectionStats.d.ts +22 -0
- package/classes/stat/SdpStats.d.ts +40 -0
- package/classes/stat/Stat.testUtils.d.ts +17 -0
- package/classes/stat/StatAggregator.d.ts +15 -3
- package/classes/stat/StatClock.d.ts +28 -0
- package/classes/stat/StatDrainScheduler.d.ts +113 -0
- package/classes/stat/StatEventCollector.d.ts +45 -0
- package/classes/stat/StatPings.d.ts +6 -2
- package/classes/stat/StatQueue.d.ts +118 -0
- package/classes/stat/StatSignalingCommands.d.ts +4 -2
- package/classes/transport/BaseTransport.d.ts +3 -3
- package/classes/transport/DirectNetworkRating.d.ts +16 -0
- package/classes/transport/DirectTransport.d.ts +16 -5
- package/classes/transport/PerfStatReporter.d.ts +10 -4
- package/classes/transport/RemotePacketLoss.d.ts +15 -0
- package/classes/transport/ServerTransport.d.ts +7 -3
- package/classes/transport/SimulcastSender.d.ts +3 -3
- package/classes/transport/Statistics.d.ts +5 -4
- package/classes/transport/Transport.d.ts +12 -8
- package/classes/transport/VadGate.d.ts +39 -0
- package/default/Api.d.ts +14 -2
- package/default/Signaling.d.ts +22 -20
- package/default/SignalingSession.d.ts +92 -0
- package/enums/ActiveFeature.d.ts +19 -0
- package/enums/SessionError.d.ts +10 -0
- package/enums/Stat.d.ts +28 -1
- package/package.json +3 -3
- package/static/ApiTransport.d.ts +5 -1
- package/static/AuthData.d.ts +11 -1
- package/static/BrowserEnvironment.d.ts +90 -0
- package/static/External.d.ts +11 -0
- package/static/Params.d.ts +80 -18
- package/static/SessionStore.d.ts +29 -0
- package/static/SimulcastInfo.d.ts +1 -0
- package/static/WebRTCUtils.d.ts +12 -76
- package/types/AddParticipantParams.d.ts +18 -0
- package/types/ClientStatsEvent.d.ts +12 -0
- package/types/DeviceSelection.d.ts +8 -0
- package/types/ExternalId.d.ts +1 -1
- package/types/FastHangup.d.ts +10 -8
- package/types/IEventualStatLog.d.ts +1 -1
- package/types/Params.d.ts +1 -1
- package/types/Participant.d.ts +2 -2
- package/types/PerfStatReporter.d.ts +26 -1
- package/types/SignalingMessage.d.ts +3 -0
- package/types/Statistics.d.ts +22 -7
- package/utils/ErrorText.d.ts +2 -0
- package/abstract/BaseSignaling.d.ts +0 -143
- package/classes/transport/DirectStatReporter.d.ts +0 -46
- package/default/SignalingTransport.d.ts +0 -76
package/CallsSDK.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { IEffect, VideoEffects } from '@vkontakte/calls-video-effects';
|
|
|
5
5
|
import type { EffectVoiceChange, VadControllerOptions, VadLib } from '@vkontakte/calls-audio-effects';
|
|
6
6
|
import type * as Vmoji from '@vkontakte/calls-vmoji';
|
|
7
7
|
import BaseLogger from './abstract/BaseLogger';
|
|
8
|
-
import { AddParticipantParams } from './
|
|
8
|
+
import type { AddParticipantParams } from './types/AddParticipantParams';
|
|
9
9
|
import HangupReason, { HangupReasonData, CustomError } from './classes/HangupReason';
|
|
10
10
|
import { MediaTrackKind } from './classes/MediaSource';
|
|
11
11
|
import { AudienceModeHandsResponse } from './types/AudienceMode';
|
|
@@ -28,6 +28,7 @@ import RoomsEventType from './enums/RoomsEventType';
|
|
|
28
28
|
import SignalingCommandType from './enums/SignalingCommandType';
|
|
29
29
|
import SignalingConnectionType from './enums/SignalingConnectionType';
|
|
30
30
|
import SignalingNotification from './enums/SignalingNotification';
|
|
31
|
+
import Stat from './enums/Stat';
|
|
31
32
|
import UserRole from './enums/UserRole';
|
|
32
33
|
import UserType from './enums/UserType';
|
|
33
34
|
import { DebugMessageType } from './static/Debug';
|
|
@@ -36,7 +37,8 @@ import { ParticipantStatus } from './static/External';
|
|
|
36
37
|
import { JSONArray, JSONObject, JSONType } from './static/Json';
|
|
37
38
|
import { ParamsObject } from './static/Params';
|
|
38
39
|
import Utils from './static/Utils';
|
|
39
|
-
import
|
|
40
|
+
import BrowserEnvironment, { BrowserName } from './static/BrowserEnvironment';
|
|
41
|
+
import WebRTCUtils, { FacingMode } from './static/WebRTCUtils';
|
|
40
42
|
import { IAsrData, IAsrStartParams, IAsrStopParams } from './types/Asr';
|
|
41
43
|
import { ConversationData } from './types/Conversation';
|
|
42
44
|
import { IFeaturesPerRole } from './types/ConversationFeature';
|
|
@@ -59,6 +61,7 @@ import { IRoomId, Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from './type
|
|
|
59
61
|
import { ScreenCaptureSettings } from './types/ScreenCaptureSettings';
|
|
60
62
|
import SignalingMessage, { GetRoomsSignalingResponse, GetParticipantsSignalingResponse } from './types/SignalingMessage';
|
|
61
63
|
import { StatResult } from './types/Statistics';
|
|
64
|
+
import { ClientStatsEvent } from './types/ClientStatsEvent';
|
|
62
65
|
import { IStartStreamData, IStopStreamData, IPublishStreamData } from './types/Streams';
|
|
63
66
|
import { WaitingHallResponse } from './types/WaitingHall';
|
|
64
67
|
import { ArrayDequeue } from './utils/ArrayDequeue';
|
|
@@ -70,6 +73,7 @@ import { FastStartHandler, FastStartParams } from './types/FastStart';
|
|
|
70
73
|
import { FastJoinHandler, FastJoinParams, FastJoinResponse } from './types/FastJoin';
|
|
71
74
|
import { FastHangupHandler, FastHangupParams, FastHangupResponse, HangupParams } from './types/FastHangup';
|
|
72
75
|
import PushData from './types/PushData';
|
|
76
|
+
import type { DeviceSelection, DeviceSelectionMode } from './types/DeviceSelection';
|
|
73
77
|
export type { CurrentLogItem, DebugLogGetParams, DebugLogSessionInfo, DebugLogStorageStats } from './utils/DebugStorage';
|
|
74
78
|
/**
|
|
75
79
|
* Информация о текущем браузере
|
|
@@ -111,6 +115,12 @@ export declare const browser: {
|
|
|
111
115
|
* Возвращает сохраненное устройство вывода
|
|
112
116
|
*/
|
|
113
117
|
getSavedOutput: typeof WebRTCUtils.getSavedOutput;
|
|
118
|
+
/** Возвращает способ выбора и фактически используемую камеру. */
|
|
119
|
+
getCameraSelection: typeof WebRTCUtils.getCameraSelection;
|
|
120
|
+
/** Возвращает способ выбора и фактически используемый микрофон. */
|
|
121
|
+
getMicrophoneSelection: typeof WebRTCUtils.getMicrophoneSelection;
|
|
122
|
+
/** Возвращает способ выбора и фактически используемый аудиовыход. */
|
|
123
|
+
getOutputSelection: typeof WebRTCUtils.getOutputSelection;
|
|
114
124
|
/**
|
|
115
125
|
* Проверяет получен ли доступ к камере
|
|
116
126
|
*/
|
|
@@ -144,43 +154,57 @@ export declare const browser: {
|
|
|
144
154
|
*
|
|
145
155
|
* _Метод доступен до инициализации_
|
|
146
156
|
*/
|
|
147
|
-
isBrowserSupported: typeof
|
|
157
|
+
isBrowserSupported: typeof BrowserEnvironment.isBrowserSupported;
|
|
148
158
|
/**
|
|
149
159
|
* Проверяет поддержку трансляции экрана браузером
|
|
150
160
|
*
|
|
151
161
|
* _Метод доступен до инициализации_
|
|
152
162
|
*/
|
|
153
|
-
isScreenCapturingSupported: typeof
|
|
163
|
+
isScreenCapturingSupported: typeof BrowserEnvironment.isScreenCapturingSupported;
|
|
164
|
+
/**
|
|
165
|
+
* Проверяет поддержку выбора микрофона браузером, независимо от списка устройств и разрешений.
|
|
166
|
+
* Не запрашивает разрешения и не захватывает медиа.
|
|
167
|
+
*
|
|
168
|
+
* _Метод доступен до инициализации_
|
|
169
|
+
*/
|
|
170
|
+
canSelectAudioInput: typeof BrowserEnvironment.canSelectAudioInput;
|
|
171
|
+
/**
|
|
172
|
+
* Проверяет поддержку выбора аудиовыхода браузером, независимо от списка устройств и разрешений.
|
|
173
|
+
* Не запрашивает разрешения и не меняет аудиовыход.
|
|
174
|
+
*
|
|
175
|
+
* _Метод доступен до инициализации_
|
|
176
|
+
*/
|
|
177
|
+
canSelectAudioOutput: typeof BrowserEnvironment.canSelectAudioOutput;
|
|
154
178
|
/**
|
|
155
179
|
* Имя операционной системы
|
|
156
180
|
*
|
|
157
181
|
* _Метод доступен до инициализации_
|
|
158
182
|
*/
|
|
159
|
-
os: typeof
|
|
183
|
+
os: typeof BrowserEnvironment.os;
|
|
160
184
|
/**
|
|
161
185
|
* Мобильный браузер или нет
|
|
162
186
|
*
|
|
163
187
|
* _Метод доступен до инициализации_
|
|
164
188
|
*/
|
|
165
|
-
isMobile: typeof
|
|
189
|
+
isMobile: typeof BrowserEnvironment.isMobile;
|
|
166
190
|
/**
|
|
167
191
|
* Имя браузера
|
|
168
192
|
*
|
|
169
193
|
* _Метод доступен до инициализации_
|
|
170
194
|
*/
|
|
171
|
-
browserName: typeof
|
|
195
|
+
browserName: typeof BrowserEnvironment.browserName;
|
|
172
196
|
/**
|
|
173
197
|
* Версия браузера
|
|
174
198
|
*
|
|
175
199
|
* _Метод доступен до инициализации_
|
|
176
200
|
*/
|
|
177
|
-
browserVersion: typeof
|
|
201
|
+
browserVersion: typeof BrowserEnvironment.browserVersion;
|
|
178
202
|
/**
|
|
179
203
|
* Если браузер основан на хроме - возвращает версию
|
|
180
204
|
*
|
|
181
205
|
* _Метод доступен до инициализации_
|
|
182
206
|
*/
|
|
183
|
-
baseChromeVersion: typeof
|
|
207
|
+
baseChromeVersion: typeof BrowserEnvironment.baseChromeVersion;
|
|
184
208
|
/**
|
|
185
209
|
* Возвращает AudioContext
|
|
186
210
|
*/
|
|
@@ -190,7 +214,7 @@ export declare const browser: {
|
|
|
190
214
|
*
|
|
191
215
|
* _Метод доступен до инициализации_
|
|
192
216
|
*/
|
|
193
|
-
isAudioShareSupported: typeof
|
|
217
|
+
isAudioShareSupported: typeof BrowserEnvironment.isAudioShareSupported;
|
|
194
218
|
};
|
|
195
219
|
/**
|
|
196
220
|
* Вспомогательные функции
|
|
@@ -256,9 +280,9 @@ export declare function callInternal(ids: OkUserId[], type: CallType | undefined
|
|
|
256
280
|
* Обработать пуш о входящем звонке
|
|
257
281
|
*
|
|
258
282
|
* Для любого входящего пуша нужно вызвать этот метод.
|
|
259
|
-
* Если уже есть
|
|
283
|
+
* Если уже есть звонок с другим пользователем и удержание выключено, метод отправит "занято" вызывающему абоненту
|
|
260
284
|
*
|
|
261
|
-
* `acceptCall` и `declineCall`
|
|
285
|
+
* Перед `acceptCall` и `declineCall` необходимо дождаться успешного завершения `processPush`.
|
|
262
286
|
*
|
|
263
287
|
* @param conversationId ID звонка
|
|
264
288
|
* @param conversationParams conversationParams в base64
|
|
@@ -266,6 +290,11 @@ export declare function callInternal(ids: OkUserId[], type: CallType | undefined
|
|
|
266
290
|
export declare function processPush(conversationId: string, conversationParams?: string): Promise<void>;
|
|
267
291
|
export declare function processPushInternal(conversationId: string, type?: UserType, peerId?: number, conversationParams?: string, wsEndpoint?: string, userId?: number): Promise<void>;
|
|
268
292
|
export declare function getInbounds(): Promise<PushData[]>;
|
|
293
|
+
/**
|
|
294
|
+
* Запускает отправку клиентской статистики. Нужен только при
|
|
295
|
+
* `autoStartStats: false`; повторные вызовы ничего не делают.
|
|
296
|
+
*/
|
|
297
|
+
export declare function startStats(): void;
|
|
269
298
|
/**
|
|
270
299
|
* Авторизоваться для совершения звонков
|
|
271
300
|
*
|
|
@@ -285,7 +314,7 @@ export declare function acceptCall(mediaOptions?: MediaOption[], conversationId?
|
|
|
285
314
|
* @param params Параметры завершения. `params.conversationId` — ID звонка
|
|
286
315
|
* (по умолчанию текущий активный), `params.reason` — причина завершения
|
|
287
316
|
* для проброса в сигналинг (по умолчанию `REJECTED`). См. {@link ClientHangupReason}.
|
|
288
|
-
* `params.onFastHangup` — опционально:
|
|
317
|
+
* `params.onFastHangup` — опционально: при ответе `{ success: false }` SDK отправляет Calls API beacon.
|
|
289
318
|
* На закрытии вкладки не используется. См. {@link HangupParams}.
|
|
290
319
|
*/
|
|
291
320
|
export declare function declineCall(params?: HangupParams): Promise<void>;
|
|
@@ -315,8 +344,11 @@ export declare function joinCallByLink(joinLink: string, mediaOptions?: MediaOpt
|
|
|
315
344
|
* (по умолчанию текущий активный), `params.reason` — причина завершения
|
|
316
345
|
* для проброса в сигналинг: по умолчанию `HUNGUP` (если звонок активен) или `CANCELED`.
|
|
317
346
|
* См. {@link ClientHangupReason}.
|
|
318
|
-
* `params.onFastHangup` — опционально:
|
|
319
|
-
* Без него API
|
|
347
|
+
* `params.onFastHangup` — опционально: при ответе `{ success: false }` SDK отправляет Calls API beacon.
|
|
348
|
+
* Без него отправляется Calls API beacon, если серверный ID уже известен. На `pagehide` всегда beacon.
|
|
349
|
+
* Локальное завершение и постановка onHangup в очередь происходят сразу; Promise ждёт известную SDK работу по завершению
|
|
350
|
+
* в пределах waitResponseDelay, без подтверждения доставки beacon или signaling HANGUP.
|
|
351
|
+
* Повторный вызов для того же завершающегося звонка возвращает тот же Promise.
|
|
320
352
|
* См. {@link HangupParams}.
|
|
321
353
|
*/
|
|
322
354
|
export declare function hangup(params?: HangupParams): Promise<void>;
|
|
@@ -325,8 +357,9 @@ export declare function hangup(params?: HangupParams): Promise<void>;
|
|
|
325
357
|
*
|
|
326
358
|
* @param externalIds Внешние ID пользователей
|
|
327
359
|
* @param params Параметры
|
|
360
|
+
* @returns Участники из ответа сервера в публичном формате; undefined, если активного звонка нет или сигналинг не готов.
|
|
328
361
|
*/
|
|
329
|
-
export declare function addParticipant(externalIds: ExternalId | ExternalId[], params?: AddParticipantParams): Promise<
|
|
362
|
+
export declare function addParticipant(externalIds: ExternalId | ExternalId[], params?: AddParticipantParams): Promise<ExternalParticipant[] | undefined>;
|
|
330
363
|
/**
|
|
331
364
|
* @deprecated - используйте addParticipant
|
|
332
365
|
* @param uids
|
|
@@ -804,5 +837,5 @@ export declare function getSyncedTime(): number;
|
|
|
804
837
|
* Версия SDK
|
|
805
838
|
*/
|
|
806
839
|
export declare function version(): string;
|
|
807
|
-
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, FastHangupHandler, FastHangupParams, FastHangupResponse, HangupParams, };
|
|
808
|
-
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, };
|
|
840
|
+
export type { AddParticipantParams, AudienceModeHandsResponse, BrowserName, ClientHangupReason, ClientStatsEvent, 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, FastHangupHandler, FastHangupParams, FastHangupResponse, HangupParams, DeviceSelection, DeviceSelectionMode, };
|
|
841
|
+
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, Stat, UserRole, UserType, TransportTopology, RoomsEventType, ConversationFeature, ArrayDequeue, ApiExternal, VolumeDetector, };
|
package/abstract/BaseApi.d.ts
CHANGED
|
@@ -7,17 +7,11 @@ import ConversationResponse from '../types/ConversationResponse';
|
|
|
7
7
|
import { ExternalId, ExternalParticipantId, ExternalUserId } from '../types/ExternalId';
|
|
8
8
|
import { OkUserId, ParticipantId } from '../types/Participant';
|
|
9
9
|
import PushData from '../types/PushData';
|
|
10
|
+
import { ApiCallStats } from '../classes/stat/ApiCallStats';
|
|
10
11
|
export type ClientStats = {
|
|
11
12
|
call_topology: 'D' | 'S';
|
|
12
13
|
vcid: ConversationData['id'] | null;
|
|
13
|
-
[k: string]: string | number | boolean | null;
|
|
14
|
-
};
|
|
15
|
-
export type ClientEvent = {
|
|
16
|
-
timestamp: number;
|
|
17
|
-
call_topology: 'D' | 'S';
|
|
18
|
-
event_type: string;
|
|
19
|
-
vcid: ConversationData['id'] | null;
|
|
20
|
-
[k: string]: string | number | boolean | null;
|
|
14
|
+
[k: string]: string | string[] | number | boolean | null;
|
|
21
15
|
};
|
|
22
16
|
export type LogItem = {
|
|
23
17
|
count?: number;
|
|
@@ -33,6 +27,9 @@ export type LogItem = {
|
|
|
33
27
|
};
|
|
34
28
|
export default abstract class BaseApi {
|
|
35
29
|
protected _abortSignal?: AbortSignal;
|
|
30
|
+
protected _apiCallStats: ApiCallStats | null;
|
|
31
|
+
/** Куда писать время выполнения запросов, появляется вместе со звонком */
|
|
32
|
+
setApiCallStats(apiCallStats: ApiCallStats | null): void;
|
|
36
33
|
/**
|
|
37
34
|
* Устанавливает сигнал прерывания для запуска звонка, если не успели отменить до установки соединения с другим участником, то он больше ни как не будет использоваться
|
|
38
35
|
* @param signal - Сигнал прерывания или undefined для очистки
|
|
@@ -69,8 +66,15 @@ export default abstract class BaseApi {
|
|
|
69
66
|
log(items: LogItem[]): void;
|
|
70
67
|
/**
|
|
71
68
|
* method: vchat.clientStats
|
|
69
|
+
*
|
|
70
|
+
* Резолвится только после подтверждённой сервером отправки.
|
|
71
|
+
*/
|
|
72
|
+
logClientStats(items: ClientStats[]): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* method: vchat.clientStats под сохранённым session_key другого
|
|
75
|
+
* пользователя. Одна попытка, без перелогина; AuthData не трогает.
|
|
72
76
|
*/
|
|
73
|
-
|
|
77
|
+
logClientStatsWith(sessionKey: string, items: ClientStats[]): Promise<void>;
|
|
74
78
|
abstract uploadDebugLogs(conversationId: string, startTime: number, endTime: number, log: string): Promise<void>;
|
|
75
79
|
getCachedParticipantIdByExternalId(externalId: ExternalId): ParticipantId | null;
|
|
76
80
|
getCachedExternalIdByParticipantId(participantId: ParticipantId): ExternalParticipantId | null;
|
|
@@ -78,7 +82,7 @@ export default abstract class BaseApi {
|
|
|
78
82
|
mapDecorativeId(decorativeId: ParticipantId, initialId: ParticipantId): void;
|
|
79
83
|
unmapDecorativeId(initialId: ParticipantId): void;
|
|
80
84
|
getDecorativeIdByInitialId(initialId: ParticipantId): ParticipantId | undefined;
|
|
81
|
-
hangupConversation(conversationId: string, reason?: HangupType, hangupParams?: Partial<IHangupParams>):
|
|
85
|
+
hangupConversation(conversationId: string, reason?: HangupType, hangupParams?: Partial<IHangupParams>): Promise<boolean>;
|
|
82
86
|
removeHistoryRecords(recordIds: number[]): Promise<void>;
|
|
83
87
|
getServerTime(): Promise<number>;
|
|
84
88
|
cleanup(): void;
|