@vkontakte/calls-sdk 2.8.5-beta.2 → 2.8.5-dev.043879f0.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
@@ -656,6 +656,14 @@ export declare function getParticipantListChunk(participantListChunkParameters:
656
656
  export declare function getParticipants(parameters: IGetParticipantsParameters): Promise<ExternalParticipant[]>;
657
657
  export declare function feedback(key: string): Promise<SignalingMessage>;
658
658
  export declare function userFeedbackStats(userResponse: number, reason?: string, groupCallUsersCount?: number): void;
659
+ /**
660
+ * Логирует клиентское событие статистики
661
+ *
662
+ * @param eventType Тип события
663
+ * @param eventData Дополнительные данные события
664
+ * @param immediatelty Отправить ли событие немедленно
665
+ */
666
+ export declare function logClientEvent(eventType: string, eventData?: Record<string, string | number | boolean>, immediately?: boolean): void;
659
667
  export declare function enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
660
668
  /**
661
669
  * Удаляет записи истории звонков
@@ -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[]>;