@vkontakte/calls-sdk 2.8.13-dev.3b07b09d.0 → 2.8.13-dev.45510c4e.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 CHANGED
@@ -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';
@@ -59,6 +60,7 @@ import { IRoomId, Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from './type
59
60
  import { ScreenCaptureSettings } from './types/ScreenCaptureSettings';
60
61
  import SignalingMessage, { GetRoomsSignalingResponse, GetParticipantsSignalingResponse } from './types/SignalingMessage';
61
62
  import { StatResult } from './types/Statistics';
63
+ import { ClientStatsEvent } from './types/ClientStatsEvent';
62
64
  import { IStartStreamData, IStopStreamData, IPublishStreamData } from './types/Streams';
63
65
  import { WaitingHallResponse } from './types/WaitingHall';
64
66
  import { ArrayDequeue } from './utils/ArrayDequeue';
@@ -267,12 +269,8 @@ export declare function processPush(conversationId: string, conversationParams?:
267
269
  export declare function processPushInternal(conversationId: string, type?: UserType, peerId?: number, conversationParams?: string, wsEndpoint?: string, userId?: number): Promise<void>;
268
270
  export declare function getInbounds(): Promise<PushData[]>;
269
271
  /**
270
- * Запускает отправку клиентской статистики.
271
- *
272
- * Нужен только если `init()` был вызван с `autoStartStats: false`: до этого
273
- * момента события копятся в IndexedDB и в сеть не уходят. Первый дрейн после
274
- * старта забирает всё накопленное. Повторные вызовы и вызов после автостарта
275
- * ничего не делают, как и вызов при `statQueueEnabled: false`.
272
+ * Запускает отправку клиентской статистики. Нужен только при
273
+ * `autoStartStats: false`; повторные вызовы ничего не делают.
276
274
  */
277
275
  export declare function startStats(): void;
278
276
  /**
@@ -813,5 +811,5 @@ export declare function getSyncedTime(): number;
813
811
  * Версия SDK
814
812
  */
815
813
  export declare function version(): string;
816
- 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, };
817
- 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, };
814
+ 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, };
815
+ 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, };
@@ -7,6 +7,7 @@ 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;
@@ -26,6 +27,9 @@ export type LogItem = {
26
27
  };
27
28
  export default abstract class BaseApi {
28
29
  protected _abortSignal?: AbortSignal;
30
+ protected _apiCallStats: ApiCallStats | null;
31
+ /** Куда писать время выполнения запросов, появляется вместе со звонком */
32
+ setApiCallStats(apiCallStats: ApiCallStats | null): void;
29
33
  /**
30
34
  * Устанавливает сигнал прерывания для запуска звонка, если не успели отменить до установки соединения с другим участником, то он больше ни как не будет использоваться
31
35
  * @param signal - Сигнал прерывания или undefined для очистки
@@ -63,16 +67,12 @@ export default abstract class BaseApi {
63
67
  /**
64
68
  * method: vchat.clientStats
65
69
  *
66
- * Резолвится только после подтверждённой сервером отправки: вызывающий
67
- * код удаляет события из очереди по факту резолва.
70
+ * Резолвится только после подтверждённой сервером отправки.
68
71
  */
69
72
  logClientStats(items: ClientStats[]): Promise<void>;
70
73
  /**
71
- * method: vchat.clientStats под сохранённым session_key другого пользователя.
72
- *
73
- * Одна попытка, без перелогина: не приняли — вызывающий код выбрасывает
74
- * батч. Бросает сырую ошибку API или транспорта; классифицирует её
75
- * вызывающий код. Состояние текущего пользователя (AuthData) не трогает.
74
+ * method: vchat.clientStats под сохранённым session_key другого
75
+ * пользователя. Одна попытка, без перелогина; AuthData не трогает.
76
76
  */
77
77
  logClientStatsWith(sessionKey: string, items: ClientStats[]): Promise<void>;
78
78
  abstract uploadDebugLogs(conversationId: string, startTime: number, endTime: number, log: string): Promise<void>;