@vkontakte/calls-sdk 2.8.11-dev.273c92c2.0 → 2.8.11-dev.3630109f.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.
@@ -1,8 +1,108 @@
1
+ /**
2
+ * Запись отладочного лога SDK.
3
+ */
1
4
  export type CurrentLogItem = {
2
5
  readonly t: number;
3
6
  readonly l: string;
4
7
  readonly d: any[];
5
8
  readonly h: string;
6
9
  };
7
- export declare function add(level: string, args: any[]): void;
10
+ /**
11
+ * Информация о сохраненной локальной сессии логирования.
12
+ */
13
+ export type DebugLogSessionInfo = {
14
+ /**
15
+ * Внутренний id локальной сессии логирования.
16
+ */
17
+ readonly sessionId: string;
18
+ /**
19
+ * Id звонка. Может быть null, если звонок не успел стартовать.
20
+ */
21
+ readonly conversationId: string | null;
22
+ /**
23
+ * Время первой записи в ms.
24
+ */
25
+ readonly startTime: number;
26
+ /**
27
+ * Время последней записи в ms.
28
+ */
29
+ readonly endTime: number;
30
+ /**
31
+ * Время последнего обновления в ms.
32
+ */
33
+ readonly updatedAt: number;
34
+ /**
35
+ * Размер сохраненных данных в байтах.
36
+ */
37
+ readonly bytes: number;
38
+ /**
39
+ * Количество записей лога.
40
+ */
41
+ readonly entriesCount: number;
42
+ };
43
+ /**
44
+ * Статистика локального хранилища отладочных логов.
45
+ */
46
+ export type DebugLogStorageStats = {
47
+ /**
48
+ * Доступен ли IndexedDB для сохранения логов.
49
+ */
50
+ readonly supported: boolean;
51
+ /**
52
+ * Количество сохраненных звонков.
53
+ */
54
+ readonly callsCount: number;
55
+ /**
56
+ * Количество локальных сессий логирования.
57
+ */
58
+ readonly sessionsCount: number;
59
+ /**
60
+ * Размер сохраненных логов SDK в байтах.
61
+ */
62
+ readonly usedBytes: number;
63
+ /**
64
+ * Максимальный размер DebugStorage в байтах.
65
+ */
66
+ readonly maxBytes: number;
67
+ /**
68
+ * Максимальное количество звонков в DebugStorage.
69
+ */
70
+ readonly maxCalls: number;
71
+ /**
72
+ * Общая квота браузерного хранилища, если доступна.
73
+ */
74
+ readonly quotaBytes?: number;
75
+ /**
76
+ * Использование браузерного хранилища, если доступно.
77
+ */
78
+ readonly usageBytes?: number;
79
+ };
80
+ /**
81
+ * Параметры чтения или очистки локальных логов.
82
+ */
83
+ export type DebugLogGetParams = {
84
+ /**
85
+ * Id звонка. Вернет все локальные сессии с этим conversationId.
86
+ */
87
+ readonly conversationId: string;
88
+ readonly sessionId?: never;
89
+ } | {
90
+ /**
91
+ * Внутренний id локальной сессии из debugLogs.list().
92
+ */
93
+ readonly sessionId: string;
94
+ readonly conversationId?: never;
95
+ };
96
+ export declare function add(level: string, args: any[], sessionId?: string): CurrentLogItem;
8
97
  export declare function init(): void;
98
+ export declare function startSession(forceNew?: boolean): string;
99
+ export declare function setConversationId(conversationId: string | null, sessionId?: string): void;
100
+ export declare function list(): Promise<DebugLogSessionInfo[]>;
101
+ export declare function getCurrentSession(): Promise<DebugLogSessionInfo | null>;
102
+ export declare function get(params: DebugLogGetParams): Promise<CurrentLogItem[]>;
103
+ export declare function getJson(params: DebugLogGetParams): Promise<string>;
104
+ export declare function download(params: DebugLogGetParams): Promise<string>;
105
+ export declare function clear(params?: DebugLogGetParams): Promise<void>;
106
+ export declare function stats(): Promise<DebugLogStorageStats>;
107
+ export declare function getAllJson(): Promise<string>;
108
+ export declare function downloadAll(): Promise<string>;
@@ -1,22 +0,0 @@
1
- import Conversation from './Conversation';
2
- export interface HoldableConversation extends Conversation {
3
- id: string;
4
- hold(hold: boolean): Promise<void>;
5
- }
6
- export declare class CallRegistry {
7
- private _conversations;
8
- private _activeId;
9
- private _mutex;
10
- add(conversation: HoldableConversation): void;
11
- remove(id: string | null): void;
12
- get(id: string): HoldableConversation | undefined;
13
- getActive(): HoldableConversation | null;
14
- getActiveId(): string | null;
15
- has(id: string): boolean;
16
- getAll(): HoldableConversation[];
17
- get callsLength(): number;
18
- setActive(id: string): Promise<void>;
19
- clear(): void;
20
- }
21
- declare const callRegistry: CallRegistry;
22
- export { callRegistry };
@@ -1,5 +0,0 @@
1
- import { TCapabilities } from '../types/Capabilities';
2
- declare namespace Capabilities {
3
- function get(): TCapabilities;
4
- }
5
- export default Capabilities;
@@ -1,13 +0,0 @@
1
- import { CurrentLogItem } from '../utils/DebugStorage';
2
- export declare class ConversationDebugLogger {
3
- private static _list;
4
- private static _conversationId;
5
- static get startTime(): number;
6
- static get endTime(): number;
7
- static startSession(): void;
8
- static get conversationId(): string | null;
9
- static set conversationId(conversationId: string | null);
10
- static add(item: CurrentLogItem): void;
11
- private static _createContextLogs;
12
- static collectLogs(): CurrentLogItem[];
13
- }
@@ -1,24 +0,0 @@
1
- export type TCapabilities = {
2
- estimatedPerformanceIndex: number;
3
- audioMix: boolean;
4
- consumerUpdate: boolean;
5
- producerNotificationDataChannelVersion: number;
6
- producerCommandDataChannelVersion: number;
7
- consumerScreenDataChannelVersion: number;
8
- producerScreenDataChannelVersion: number;
9
- asrDataChannelVersion: number;
10
- animojiDataChannelVersion: number;
11
- animojiBackendRender: boolean;
12
- onDemandTracks: boolean;
13
- unifiedPlan: boolean;
14
- singleSession: boolean;
15
- videoTracksCount: number;
16
- red: boolean;
17
- audioShare: boolean;
18
- fastScreenShare: boolean;
19
- videoSuspend: boolean;
20
- simulcast: boolean;
21
- consumerFastScreenShare: boolean;
22
- consumerFastScreenShareQualityOnDemand: boolean;
23
- transparentAudio: boolean;
24
- };