@vkontakte/calls-sdk 2.8.11-dev.d27d8de2.0 → 2.8.11-dev.d5496fb5.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
@@ -67,6 +67,7 @@ import { VmojiError } from './types/Vmoji';
67
67
  import { VolumeDetector } from './classes/VolumeDetector';
68
68
  import { FastStartHandler, FastStartParams } from './types/FastStart';
69
69
  import { FastJoinHandler, FastJoinParams, FastJoinResponse } from './types/FastJoin';
70
+ import PushData from './types/PushData';
70
71
  export type { CurrentLogItem, DebugLogGetParams, DebugLogSessionInfo, DebugLogStorageStats } from './utils/DebugStorage';
71
72
  /**
72
73
  * Информация о текущем браузере
@@ -255,6 +256,7 @@ export declare function callInternal(ids: OkUserId[], type: CallType | undefined
255
256
  */
256
257
  export declare function processPush(conversationId: string, conversationParams?: string): Promise<void>;
257
258
  export declare function processPushInternal(conversationId: string, type?: UserType, peerId?: number, conversationParams?: string, wsEndpoint?: string, userId?: number): Promise<void>;
259
+ export declare function getInbounds(): Promise<PushData[]>;
258
260
  /**
259
261
  * Авторизоваться для совершения звонков
260
262
  *
@@ -267,11 +269,11 @@ export declare function authorize(authToken?: string, apiBaseUrl?: IAPIBaseUrl):
267
269
  *
268
270
  * @param mediaOptions Нужно ли включать камеру и микрофон
269
271
  */
270
- export declare function acceptCall(mediaOptions?: MediaOption[]): Promise<ConversationData>;
272
+ export declare function acceptCall(mediaOptions?: MediaOption[], conversationId?: string): Promise<ConversationData>;
271
273
  /**
272
274
  * Отклонить входящий звонок
273
275
  */
274
- export declare function declineCall(): Promise<void>;
276
+ export declare function declineCall(conversationId?: string): Promise<void>;
275
277
  /**
276
278
  * Присоединиться к активному звонку
277
279
  *
@@ -294,7 +296,7 @@ export declare function joinCallByLink(joinLink: string, mediaOptions?: MediaOpt
294
296
  /**
295
297
  * Завершить текущий разговор
296
298
  */
297
- export declare function hangup(): Promise<void>;
299
+ export declare function hangup(conversationId?: string): Promise<void>;
298
300
  /**
299
301
  * Добавить собеседника в звонок
300
302
  *
@@ -342,7 +344,7 @@ export declare function changeDevice(kind: MediaDeviceKind, deviceId: string): P
342
344
  * state Включить или выключить захват экрана
343
345
  * settings Параметры захваты экрана
344
346
  */
345
- export declare function captureScreen(stateOrSettings: boolean | ScreenCaptureSettings): Promise<void>;
347
+ export declare function captureScreen(stateOrSettings: boolean | ScreenCaptureSettings, conversationId?: string): Promise<void>;
346
348
  /**
347
349
  * Включить/выключить передачу точек вимоджи
348
350
  *
@@ -363,13 +365,13 @@ export declare function setVideoStream(stream: MediaStream, isScreen?: boolean):
363
365
  *
364
366
  * @param enabled
365
367
  */
366
- export declare function toggleLocalVideo(enabled: boolean): Promise<void>;
368
+ export declare function toggleLocalVideo(enabled: boolean, conversationId?: string): Promise<void>;
367
369
  /**
368
370
  * Включить или выключить свой микрофон
369
371
  *
370
372
  * @param enabled
371
373
  */
372
- export declare function toggleLocalAudio(enabled: boolean): Promise<void>;
374
+ export declare function toggleLocalAudio(enabled: boolean, conversationId?: string): Promise<void>;
373
375
  /**
374
376
  * Изменяет размеры локального видео
375
377
  *
@@ -395,12 +397,6 @@ export declare function changePriorities(priorities: ParticipantPriority[]): Pro
395
397
  * @param externalId Внешний ID пользователя
396
398
  */
397
399
  export declare function changeParticipantState(state: ParticipantStateData, externalId?: ExternalId): Promise<void>;
398
- /**
399
- * Ставит звонок на удержание
400
- *
401
- * @param hold - true/false
402
- */
403
- export declare function hold(hold: boolean): Promise<void>;
404
400
  /**
405
401
  * Принудительно опустить руки участников в текущем сессионном зале админа
406
402
  */
@@ -748,16 +744,7 @@ export declare function acceptPromotion(reject?: boolean): Promise<void>;
748
744
  export declare function getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<ExternalParticipantListChunk>;
749
745
  export declare function getParticipants(parameters: IGetParticipantsParameters): Promise<ExternalParticipant[]>;
750
746
  export declare function feedback(key: string): Promise<SignalingMessage>;
751
- export declare function userFeedbackStats(userResponse: number, reason?: string, groupCallUsersCount?: number): void;
752
- /**
753
- * Логирует клиентское событие статистики
754
- *
755
- * @param eventType Тип события
756
- * @param eventData Дополнительные данные события
757
- * @param immediatelty Отправить ли событие немедленно
758
- */
759
- export declare function logClientEvent(eventType: string, eventData?: Record<string, string | number | boolean>, immediately?: boolean): void;
760
- export declare function enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
747
+ export declare function enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[], conversationId?: string): Promise<void>;
761
748
  /**
762
749
  * Удаляет записи истории звонков
763
750
  *
@@ -781,6 +768,8 @@ export declare function stopUrlSharing(): Promise<void>;
781
768
  export declare function sendTestCommand(name: string, params?: any): void;
782
769
  export declare function startAnalyzingAudio(expectAudio: boolean, expectedActiveTracks?: number | null, expectedTrackFrequencies?: number[] | null): void;
783
770
  export declare function stopAnalyzingAudio(): void;
771
+ export declare function switchCall(conversationId: string): Promise<void>;
772
+ export declare function getActiveCallId(): string | null;
784
773
  /**
785
774
  * Возвращает текущее время, скорректированное на смещение относительно серверного времени.
786
775
  * Доступно после установки соединения (начало/присоединение к звонку).
@@ -5,6 +5,7 @@ import ConversationParams from '../types/ConversationParams';
5
5
  import ConversationResponse from '../types/ConversationResponse';
6
6
  import { ExternalId, ExternalParticipantId, ExternalUserId } from '../types/ExternalId';
7
7
  import { CompositeUserId, OkUserId, ParticipantId } from '../types/Participant';
8
+ import PushData from '../types/PushData';
8
9
  export type ClientStats = {
9
10
  vcid: ConversationData['id'] | null;
10
11
  [k: string]: string | number | boolean | null;
@@ -68,14 +69,10 @@ export default abstract class BaseApi {
68
69
  * method: vchat.clientStats
69
70
  */
70
71
  logClientStats(items: ClientStats[]): void;
71
- /**
72
- * method: vchat.clientEvents
73
- */
74
- logClientEvents(items: ClientEvent[]): void;
75
72
  abstract uploadDebugLogs(conversationId: string, startTime: number, endTime: number, log: string): Promise<void>;
73
+ abstract getExternalIdsByOkIds(uids: OkUserId[]): Promise<ExternalParticipantId[]>;
76
74
  getCachedOkIdByExternalId(externalId: ExternalId): ParticipantId | null;
77
75
  getCachedRawOkIdByExternalId(externalId: ExternalId): OkUserId | null;
78
- getCachedExternalIdByOkId(okId: OkUserId): ExternalParticipantId | null;
79
76
  cacheExternalId(compositeId: OkUserId | CompositeUserId | ParticipantId, externalId: ExternalParticipantId): void;
80
77
  mapDecorativeId(decorativeId: OkUserId | CompositeUserId | ParticipantId, okId: OkUserId | CompositeUserId): void;
81
78
  unmapDecorativeId(decorativeId: OkUserId | CompositeUserId | ParticipantId): void;
@@ -85,4 +82,5 @@ export default abstract class BaseApi {
85
82
  removeHistoryRecords(recordIds: number[]): Promise<void>;
86
83
  getServerTime(): Promise<number>;
87
84
  cleanup(): void;
85
+ getInbounds(): Promise<PushData[]>;
88
86
  }
@@ -1,5 +1,6 @@
1
1
  import EventEmitter from '../classes/EventEmitter';
2
2
  import { ParticipantIdRegistry } from '../classes/ParticipantIdRegistry';
3
+ import { TCapabilities } from '../types/Capabilities';
3
4
  import { StreamDescriptionString } from '../types/ParticipantStreamDescription';
4
5
  import { PerfStatReport } from '../types/PerfStatReporter';
5
6
  import { NetworkStatReport } from '../types/NetworkStatReport';
@@ -61,14 +62,12 @@ export default abstract class BaseSignaling extends EventEmitter {
61
62
  abstract sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
62
63
  abstract changeMediaSettings(mediaSettings: MediaSettings): Promise<SignalingMessage>;
63
64
  abstract changeParticipantState(state: ParticipantStateData, compositeUserId?: CompositeUserId): Promise<SignalingMessage>;
64
- abstract hold(hold: boolean): Promise<SignalingMessage>;
65
+ abstract hold(hold: boolean, capabilities?: TCapabilities): Promise<SignalingMessage>;
65
66
  abstract putHandsDown(): Promise<SignalingMessage>;
66
67
  abstract addParticipant(externalIds: CompositeUserId[], params?: AddParticipantParams): Promise<SignalingMessage>;
67
68
  abstract addParticipantLegacy(participantIds: CompositeUserId[], params?: AddParticipantParams): Promise<SignalingMessage>;
68
69
  abstract removeParticipant(participantId: CompositeUserId, ban?: boolean): Promise<SignalingMessage>;
69
- abstract allocateConsumer(description: RTCSessionDescription | null, capabilities: {
70
- [key: string]: number | boolean | string;
71
- }): Promise<SignalingMessage>;
70
+ abstract allocateConsumer(description: RTCSessionDescription | null, capabilities: TCapabilities): Promise<SignalingMessage>;
72
71
  abstract acceptProducer(description: RTCSessionDescriptionInit, ssrcs: string[], sessionId: string): Promise<SignalingMessage>;
73
72
  /**
74
73
  * @deprecated Use updateDisplayLayout instead