@vkontakte/calls-sdk 2.8.5-dev.1925f9b.0 → 2.8.5-dev.36da4e4e.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
@@ -368,8 +368,13 @@ export declare function changePriorities(priorities: ParticipantPriority[]): Pro
368
368
  * Изменяет состояния пользователя в звонке (например, "поднять руку" или "отошёл")
369
369
  *
370
370
  * @param state Список состояний в виде ключ-значение. Максимальная длина ключей и значений - 5 символов. Пустые значения будут пропущены
371
+ * @param externalId Внешний ID пользователя
372
+ */
373
+ export declare function changeParticipantState(state: Record<string, string>, externalId?: ExternalId): Promise<void>;
374
+ /**
375
+ * Принудительно опустить руки участников в текущем сессионном зале админа
371
376
  */
372
- export declare function changeParticipantState(state: Record<string, string>): Promise<void>;
377
+ export declare function putHandsDown(): Promise<void>;
373
378
  /**
374
379
  * Изменяет лейаут.
375
380
  * Также сообщает серверу каких участников звонка стримить на этот клиент
@@ -413,6 +418,13 @@ export declare function setMediaModifiers(mediaModifiers: MediaModifiers): Promi
413
418
  * @param enabled true - включить, false - отключить
414
419
  */
415
420
  export declare function enableVideoSuspend(enabled: boolean): Promise<void>;
421
+ /**
422
+ * Режим, при котором будет предложено включить автоматическое
423
+ * отключение приёма видео в условиях плохого соединения
424
+ *
425
+ * @param enabled true - включить, false - отключить
426
+ */
427
+ export declare function enableVideoSuspendSuggest(enabled: boolean): Promise<void>;
416
428
  /**
417
429
  * Включить/выключить опции звонка
418
430
  *
@@ -656,6 +668,14 @@ export declare function getParticipantListChunk(participantListChunkParameters:
656
668
  export declare function getParticipants(parameters: IGetParticipantsParameters): Promise<ExternalParticipant[]>;
657
669
  export declare function feedback(key: string): Promise<SignalingMessage>;
658
670
  export declare function userFeedbackStats(userResponse: number, reason?: string, groupCallUsersCount?: number): void;
671
+ /**
672
+ * Логирует клиентское событие статистики
673
+ *
674
+ * @param eventType Тип события
675
+ * @param eventData Дополнительные данные события
676
+ * @param immediatelty Отправить ли событие немедленно
677
+ */
678
+ export declare function logClientEvent(eventType: string, eventData?: Record<string, string | number | boolean>, immediately?: boolean): void;
659
679
  export declare function enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
660
680
  /**
661
681
  * Удаляет записи истории звонков
@@ -8,6 +8,13 @@ export type ClientStats = {
8
8
  vcid: ConversationData['id'] | null;
9
9
  [k: string]: string | number | null;
10
10
  };
11
+ export type ClientEvent = {
12
+ timestamp: number;
13
+ call_topology: 'D' | 'S';
14
+ event_type: string;
15
+ vcid: ConversationData['id'] | null;
16
+ [k: string]: string | number | boolean | null;
17
+ };
11
18
  export type LogItem = {
12
19
  count?: number;
13
20
  custom: ClientStats;
@@ -52,6 +59,10 @@ export default abstract class BaseApi {
52
59
  * method: vchat.clientStats
53
60
  */
54
61
  logClientStats(items: ClientStats[]): void;
62
+ /**
63
+ * method: vchat.clientEvents
64
+ */
65
+ logClientEvents(items: ClientEvent[]): void;
55
66
  abstract getOkIdsByExternalIds(externalIds: ExternalId[]): Promise<OkUserId[]>;
56
67
  abstract getParticipantIdsByExternalIds(externalIds: ExternalId[]): Promise<Map<ExternalId, ParticipantId>>;
57
68
  abstract getExternalIdsByOkIds(uids: OkUserId[]): Promise<ExternalParticipantId[]>;
@@ -46,9 +46,8 @@ export default abstract class BaseSignaling extends EventEmitter {
46
46
  abstract sendSdp(participantId: ParticipantId, sdp: RTCSessionDescriptionInit): Promise<SignalingMessage>;
47
47
  abstract sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
48
48
  abstract changeMediaSettings(mediaSettings: MediaSettings): Promise<SignalingMessage>;
49
- abstract changeParticipantState(state: {
50
- [key: string]: string;
51
- }): Promise<SignalingMessage>;
49
+ abstract changeParticipantState(state: Record<string, string>, compositeUserId?: CompositeUserId): Promise<SignalingMessage>;
50
+ abstract putHandsDown(): Promise<SignalingMessage>;
52
51
  abstract addParticipant(participantId: CompositeUserId, params?: AddParticipantParams): Promise<SignalingMessage>;
53
52
  abstract removeParticipant(participantId: CompositeUserId, ban?: boolean): Promise<SignalingMessage>;
54
53
  abstract allocateConsumer(description: RTCSessionDescription | null, capabilities: {
@@ -92,6 +91,7 @@ export default abstract class BaseSignaling extends EventEmitter {
92
91
  abstract pinParticipant(participantId: ParticipantId, unpin: boolean, roomId: number | null): Promise<SignalingMessage>;
93
92
  abstract updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<SignalingMessage>;
94
93
  abstract enableVideoSuspend(enabled: boolean): Promise<SignalingMessage>;
94
+ abstract enableVideoSuspendSuggest(enabled: boolean): Promise<SignalingMessage>;
95
95
  abstract changeOptions(changes: {
96
96
  [key in ConversationOption]?: boolean;
97
97
  }): Promise<SignalingMessage>;