@vkontakte/calls-sdk 2.8.5-dev.7d0e2b7.0 → 2.8.5-dev.e150bc92.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
@@ -208,7 +208,7 @@ export declare function setVideoEffects(effects: VideoEffects): void;
208
208
  * @param vmoji Экземпляр класса `Vmoji` из `@vkontakte/calls-vmoji`
209
209
  * @param sdk Экземпляр модуля `@vkontakte/calls-vmoji`, нужен для проброски дебаг сообщений
210
210
  */
211
- export declare function setVmoji(vmoji: typeof Vmoji, sdk?: Parameters<typeof Vmoji.setSDK>[0] | null, renderingOptions?: Vmoji.RenderingOptions | null): void;
211
+ export declare function setVmoji(vmoji: typeof Vmoji, sdk?: Parameters<typeof Vmoji.setSDK>[0] | null, renderingOptions?: Partial<Vmoji.RenderingOptions>, protocolVersion?: Vmoji.AnimojiVersion): void;
212
212
  /**
213
213
  * Инициализирует библиотеку
214
214
  *
@@ -619,6 +619,12 @@ export declare function setAudioStream(stream: MediaStream): Promise<void>;
619
619
  * нужен только в случае присвоения участнику чужого аватара
620
620
  */
621
621
  export declare function setVmojiSvg(svg: string | ArrayBuffer, externalId?: ExternalId | null, customKey?: string | null): Promise<void>;
622
+ /**
623
+ * Позволяет установить цвет фона собственного vmoji
624
+ *
625
+ * @param {(RGBTuple|string)} fill - цвет в виде rgb-кортежа или hex-кода
626
+ */
627
+ export declare function setVmojiFill(fill: Vmoji.RGBTuple | string): void;
622
628
  /**
623
629
  * Получить состояние зала ожидания
624
630
  *
@@ -656,6 +662,14 @@ export declare function getParticipantListChunk(participantListChunkParameters:
656
662
  export declare function getParticipants(parameters: IGetParticipantsParameters): Promise<ExternalParticipant[]>;
657
663
  export declare function feedback(key: string): Promise<SignalingMessage>;
658
664
  export declare function userFeedbackStats(userResponse: number, reason?: string, groupCallUsersCount?: number): void;
665
+ /**
666
+ * Логирует клиентское событие статистики
667
+ *
668
+ * @param eventType Тип события
669
+ * @param eventData Дополнительные данные события
670
+ * @param immediatelty Отправить ли событие немедленно
671
+ */
672
+ export declare function logClientEvent(eventType: string, eventData?: Record<string, string | number | boolean>, immediately?: boolean): void;
659
673
  export declare function enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
660
674
  /**
661
675
  * Удаляет записи истории звонков
@@ -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[]>;
@@ -106,6 +106,7 @@ export default abstract class BaseSignaling extends EventEmitter {
106
106
  abstract useCommandDataChannel(status: boolean): void;
107
107
  abstract getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<SignalingMessage>;
108
108
  abstract getParticipants(externalIds: SignalingMessage.ExternalId[]): Promise<GetParticipantsSignalingResponse>;
109
+ abstract getPeerId(): number | null;
109
110
  abstract startAsr(params: IAsrStartParams): Promise<SignalingMessage>;
110
111
  abstract stopAsr(params?: IAsrStopParams): Promise<SignalingMessage>;
111
112
  abstract requestAsr(request: boolean): Promise<SignalingMessage>;