@vkontakte/calls-sdk 2.8.11-dev.5500645b.0 → 2.8.11-dev.69b107ee.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.
Files changed (72) hide show
  1. package/CallsSDK.d.ts +52 -14
  2. package/abstract/BaseApi.d.ts +5 -5
  3. package/abstract/BaseSignaling.d.ts +2 -3
  4. package/calls-sdk.cjs.js +16 -14
  5. package/calls-sdk.esm.js +11741 -14
  6. package/classes/AudioFix.d.ts +5 -1
  7. package/classes/AudioOutput.d.ts +5 -1
  8. package/classes/Conversation.d.ts +9 -6
  9. package/classes/ConversationResponseValidator.d.ts +3 -0
  10. package/classes/DebugInfo.d.ts +3 -0
  11. package/classes/DisplayLayoutRequester.d.ts +39 -0
  12. package/classes/ExternalIdCache.d.ts +19 -0
  13. package/classes/MediaSource.d.ts +5 -1
  14. package/classes/ParticipantIdRegistry.d.ts +3 -0
  15. package/classes/ProducerCommandSerializationService.d.ts +3 -0
  16. package/classes/SignalingActor.d.ts +3 -1
  17. package/classes/SpeakerDetector.d.ts +2 -1
  18. package/classes/SpecListener.d.ts +5 -1
  19. package/classes/StatsLogger.d.ts +29 -0
  20. package/classes/VideoEffectsFpsLimiter.d.ts +3 -0
  21. package/classes/asr/AsrReceiver.d.ts +3 -1
  22. package/classes/codec/LibVPxDecoder.d.ts +3 -0
  23. package/classes/codec/LibVPxEncoder.d.ts +3 -1
  24. package/classes/codec/WebCodecsDecoder.d.ts +3 -0
  25. package/classes/codec/WebCodecsEncoder.d.ts +3 -1
  26. package/classes/codec/WorkerBase.d.ts +5 -0
  27. package/classes/screenshare/BaseStreamBuilder.d.ts +4 -1
  28. package/classes/screenshare/CanvasRenderer.d.ts +3 -1
  29. package/classes/screenshare/ScreenCaptureReceiver.d.ts +7 -1
  30. package/classes/screenshare/ScreenCaptureSender.d.ts +5 -1
  31. package/classes/screenshare/ScreenCongestionControl.d.ts +3 -1
  32. package/classes/screenshare/StreamBuilder.d.ts +5 -1
  33. package/classes/screenshare/TrackGeneratorRenderer.d.ts +3 -1
  34. package/classes/screenshare/WebmBuilder.d.ts +3 -1
  35. package/classes/stat/CodecStatsAggregator.d.ts +7 -7
  36. package/classes/stat/ConversationStats.d.ts +21 -0
  37. package/classes/stat/StatAggregator.d.ts +6 -6
  38. package/classes/stat/StatFirstMediaReceived.d.ts +6 -2
  39. package/classes/stat/StatPings.d.ts +9 -9
  40. package/classes/stat/StatScreenShareFirstFrame.d.ts +3 -1
  41. package/classes/stat/StatSignalingCommands.d.ts +8 -8
  42. package/classes/transport/BaseTransport.d.ts +1 -1
  43. package/classes/transport/DirectStatReporter.d.ts +3 -1
  44. package/classes/transport/DirectTransport.d.ts +9 -6
  45. package/classes/transport/PerfStatReporter.d.ts +5 -1
  46. package/classes/transport/ServerTransport.d.ts +10 -10
  47. package/classes/transport/Transport.d.ts +12 -30
  48. package/default/Api.d.ts +6 -14
  49. package/default/Signaling.d.ts +40 -45
  50. package/default/SignalingTransport.d.ts +68 -0
  51. package/enums/HangupType.d.ts +2 -1
  52. package/enums/TransportState.d.ts +10 -0
  53. package/enums/TransportTopology.d.ts +5 -0
  54. package/package.json +1 -1
  55. package/static/Debug.d.ts +27 -8
  56. package/static/External.d.ts +3 -4
  57. package/static/Params.d.ts +14 -17
  58. package/static/Utils.d.ts +3 -2
  59. package/static/WebRTCUtils.d.ts +7 -4
  60. package/types/Conversation.d.ts +1 -1
  61. package/types/FastStart.d.ts +1 -0
  62. package/types/ParticipantLayout.d.ts +33 -0
  63. package/types/PerfStatReporter.d.ts +2 -1
  64. package/types/PushData.d.ts +3 -0
  65. package/types/SignalingMessage.d.ts +5 -1
  66. package/types/Statistics.d.ts +1 -5
  67. package/types/WebTransport.d.ts +5 -0
  68. package/utils/DebugStorage.d.ts +100 -1
  69. package/classes/Logger.d.ts +0 -41
  70. package/classes/stat/EventMetricsService.d.ts +0 -9
  71. package/static/ConversationDebugLogger.d.ts +0 -13
  72. package/static/DebugVideoStats.d.ts +0 -22
package/static/Debug.d.ts CHANGED
@@ -7,14 +7,33 @@ export declare enum DebugMessageType {
7
7
  WARN = "WARN",
8
8
  ERROR = "ERROR"
9
9
  }
10
+ export type DebugMessageContext = {
11
+ readonly sessionId: string | null;
12
+ readonly conversationId: string | null;
13
+ };
14
+ export type DebugLogger = {
15
+ debug(...args: any[]): void;
16
+ log(...args: any[]): void;
17
+ warn(...args: any[]): void;
18
+ error(...args: any[]): void;
19
+ };
20
+ export type DebugSessionLogger = DebugLogger & {
21
+ readonly sessionId: string | null;
22
+ readonly conversationId: string | null;
23
+ setConversationId(conversationId: string | null): void;
24
+ };
10
25
  declare namespace Debug {
11
- let debug: Function;
12
- let log: Function;
13
- let warn: Function;
14
- let error: Function;
15
- function enabled(): boolean;
16
- function toggle(enable: boolean): void;
17
- function send(type: DebugMessageType, ...args: any[]): void;
18
- function test(tag: string, ...args: any[]): void;
26
+ type ContextProvider = () => DebugMessageContext;
27
+ export function debug(...args: any[]): void;
28
+ export function log(...args: any[]): void;
29
+ export function warn(...args: any[]): void;
30
+ export function error(...args: any[]): void;
31
+ export function enabled(): boolean;
32
+ export function toggle(enable: boolean): void;
33
+ export function send(type: DebugMessageType, ...args: any[]): void;
34
+ export function createLogger(getContext: ContextProvider): DebugLogger;
35
+ export function createSessionLogger(initialConversationId?: string | null): DebugSessionLogger;
36
+ export function test(tag: string, ...args: any[]): void;
37
+ export {};
19
38
  }
20
39
  export default Debug;
@@ -446,6 +446,9 @@ declare namespace External {
446
446
  * @param args
447
447
  */
448
448
  function onDebugMessage(type: DebugMessageType, ...args: any[]): void;
449
+ function onDebugMessageWithContext(type: DebugMessageType, context: {
450
+ conversationId: string | null;
451
+ }, ...args: any[]): void;
449
452
  /**
450
453
  * Статистика звонка
451
454
  *
@@ -563,9 +566,5 @@ declare namespace External {
563
566
  * Собеседник подключился к сигналлингу
564
567
  */
565
568
  function onPeerRegistered(): void;
566
- /**
567
- * Дебаг информация по видеопотоку, отформатированная SDK для отображения в клиенте.
568
- */
569
- function onVideoStreamDebug(externalParticipantId: ExternalParticipantId, debug: string): void;
570
569
  }
571
570
  export default External;
@@ -104,13 +104,6 @@ export type ParamsObject = {
104
104
  debugLog: boolean;
105
105
  /** @hidden */
106
106
  debug: boolean;
107
- /**
108
- * Вкчлючает отправку на клиент статы по входящим/исходящим видео-потокам
109
- * @hidden
110
- *
111
- * _По умолчанию: `false`_
112
- */
113
- debugVideoStreams: boolean;
114
107
  /**
115
108
  * Выставляет таймаут в ms для fetch запросов от sdk
116
109
  * По умолчанию 5000 ms
@@ -313,6 +306,12 @@ export type ParamsObject = {
313
306
  * _По умолчанию: `30`_
314
307
  */
315
308
  videoTracksCount: number;
309
+ /**
310
+ * Минимальный интервал отправки diff для requestDisplayLayout в миллисекундах.
311
+ *
312
+ * _По умолчанию: `250`_
313
+ */
314
+ requestDisplayLayoutThrottleMs: number;
316
315
  /** @hidden */
317
316
  movieShare: boolean;
318
317
  /** @hidden */
@@ -737,6 +736,12 @@ export type ParamsObject = {
737
736
  * Получено отладочное сообщение. Работает только при выключенном режиме отладки
738
737
  */
739
738
  onDebugMessage?: (type: DebugMessageType, ...args: any[]) => void;
739
+ /**
740
+ * Получено отладочное сообщение с контекстом звонка. Работает только при выключенном режиме отладки
741
+ */
742
+ onDebugMessageWithContext?: (type: DebugMessageType, context: {
743
+ conversationId: string | null;
744
+ }, ...args: any[]) => void;
740
745
  /**
741
746
  * Статистика звонка
742
747
  */
@@ -870,15 +875,6 @@ export type ParamsObject = {
870
875
  * Собеседник подключился к сигналлингу
871
876
  */
872
877
  onPeerRegistered?: () => void;
873
- /**
874
- * Дебаг информация по видеопотоку, отформатированная SDK для отображения в клиенте.
875
- *
876
- * Работает только если включен `debugVideoStreams`.
877
- *
878
- * @param externalParticipantId Id участника, к которому относится видеопоток
879
- * @param debug Отформатированный текст для отображения
880
- */
881
- onVideoStreamDebug?: (externalParticipantId: ExternalParticipantId, debug: string) => void;
882
878
  };
883
879
  export default abstract class Params {
884
880
  private static _params;
@@ -930,7 +926,6 @@ export default abstract class Params {
930
926
  static get waitMessageDelay(): number;
931
927
  static get waitAnotherTabDelay(): number;
932
928
  static get debugLog(): boolean;
933
- static get debugVideoStreams(): false | ((externalParticipantId: ExternalParticipantId, debug: string) => void) | undefined;
934
929
  static get forceRelayPolicy(): boolean;
935
930
  static set forceRelayPolicy(value: boolean);
936
931
  static get videoMinWidth(): number;
@@ -980,6 +975,7 @@ export default abstract class Params {
980
975
  static get audioNack(): boolean;
981
976
  static get movieShare(): boolean;
982
977
  static get videoTracksCount(): number;
978
+ static get requestDisplayLayoutThrottleMs(): number;
983
979
  static get breakVideoPayloadTypes(): boolean;
984
980
  static get useCallsToContacts(): boolean;
985
981
  static get useParticipantListChunk(): boolean;
@@ -1027,6 +1023,7 @@ export default abstract class Params {
1027
1023
  screenShareCongestionControl: boolean;
1028
1024
  screenShareCongestionControlThreshold: number;
1029
1025
  videoTracksCount: number;
1026
+ requestDisplayLayoutThrottleMs: number;
1030
1027
  asrDataChannel: boolean;
1031
1028
  videoMaxHeight: number;
1032
1029
  videoMaxWidth: number;
package/static/Utils.d.ts CHANGED
@@ -3,6 +3,7 @@ import { ExternalParticipant, ExternalParticipantListMarker } from '../types/Ext
3
3
  import { CompositeUserId, OkUserId, Participant, ParticipantId, ParticipantStateMapped } from '../types/Participant';
4
4
  import SignalingMessage from '../types/SignalingMessage';
5
5
  import VideoSettings from '../types/VideoSettings';
6
+ import { type DebugLogger } from './Debug';
6
7
  export declare const PARAMETERS_SEPARATOR = ":";
7
8
  export declare const DEVICE_IDX_PARAMETER = "d";
8
9
  /** @hidden */
@@ -36,8 +37,8 @@ declare namespace Utils {
36
37
  function delay(time: number, { signal }?: {
37
38
  signal?: AbortSignal;
38
39
  }): Promise<void>;
39
- function applySettings(pc: RTCPeerConnection, videoSettings: VideoSettings, prevSettings: any): any;
40
- function applyVideoTrackSettings(videoSettings: VideoSettings, s: RTCRtpSender, track: MediaStreamTrack | null, prevSettings: any, retSettings: any): void;
40
+ function applySettings(pc: RTCPeerConnection, videoSettings: VideoSettings, prevSettings: any, debug?: DebugLogger): any;
41
+ function applyVideoTrackSettings(videoSettings: VideoSettings, s: RTCRtpSender, track: MediaStreamTrack | null, prevSettings: any, retSettings: any, debug?: DebugLogger): void;
41
42
  /**
42
43
  * Проверяет, есть ли в первом массиве хотя бы один элемент из второго массива
43
44
  * @param arr Где ищем
@@ -2,6 +2,8 @@
2
2
  * Вспомогательный плагин для работы с WebRTC
3
3
  */
4
4
  import { IVideoDimentions } from '../types/MediaSettings';
5
+ import type StatsLogger from '../classes/StatsLogger';
6
+ import { type DebugLogger } from './Debug';
5
7
  /**
6
8
  * Тип камеры мобильного устройства
7
9
  */
@@ -75,6 +77,7 @@ declare namespace WebRTCUtils {
75
77
  * Проверяет получены ли разрешения, необходимые для текущего звонка
76
78
  */
77
79
  function hasPermissions(needVideo?: boolean): boolean;
80
+ function releaseFirefoxMicrophonePermissionWarmup(): void;
78
81
  /**
79
82
  * Запрашивает камеру и микрофон пользователя
80
83
  *
@@ -82,24 +85,24 @@ declare namespace WebRTCUtils {
82
85
  * @param needAudio Нужно ли аудио
83
86
  * @param needEmptyTracks Добавлять ли в стрим пустые треки для отключенного видео/аудио
84
87
  */
85
- function getUserMedia(needVideo?: boolean, needAudio?: boolean, needEmptyTracks?: boolean): Promise<MediaStream>;
88
+ function getUserMedia(needVideo?: boolean, needAudio?: boolean, needEmptyTracks?: boolean, debug?: DebugLogger, logger?: StatsLogger | null): Promise<MediaStream>;
86
89
  /**
87
90
  * Запрашивает трансляцию экрана пользователя с опциональным захватом звука
88
91
  */
89
- function getScreenMedia(fastScreenShare: boolean, withAudioShare: boolean): Promise<MediaStream>;
92
+ function getScreenMedia(fastScreenShare: boolean, withAudioShare: boolean, debug?: DebugLogger, logger?: StatsLogger | null): Promise<MediaStream>;
90
93
  /**
91
94
  * Запрашивает камеру пользователя
92
95
  *
93
96
  * @param deviceId ID устройства
94
97
  * @param resolution Размеры видео
95
98
  */
96
- function getUserVideo(deviceId?: string, resolution?: IVideoDimentions): Promise<MediaStream>;
99
+ function getUserVideo(deviceId?: string, resolution?: IVideoDimentions, debug?: DebugLogger, logger?: StatsLogger | null): Promise<MediaStream>;
97
100
  /**
98
101
  * Запрашивает микрофон пользователя
99
102
  *
100
103
  * @param deviceId ID устройства
101
104
  */
102
- function getUserAudio(deviceId?: string): Promise<MediaStream>;
105
+ function getUserAudio(deviceId?: string, debug?: DebugLogger, logger?: StatsLogger | null): Promise<MediaStream>;
103
106
  /**
104
107
  * Устанавливает размер видео в стриме
105
108
  *
@@ -1,4 +1,4 @@
1
- import { TransportTopology } from '../classes/transport/Transport';
1
+ import TransportTopology from '../enums/TransportTopology';
2
2
  import CallDirection from '../enums/CallDirection';
3
3
  import CallType from '../enums/CallType';
4
4
  import ConversationFeature from '../enums/ConversationFeature';
@@ -31,6 +31,7 @@ export interface FastStartParams {
31
31
  conversationId: string;
32
32
  internalParams: string;
33
33
  externalIds?: ExternalId[];
34
+ payload: string;
34
35
  opponentType: CallType;
35
36
  mediaOptions: MediaOption[];
36
37
  joiningAllowed?: boolean;
@@ -54,4 +54,37 @@ export type ParticipantLayout = (Layout | StopStream | RequestKeyFrame) & {
54
54
  */
55
55
  streamName?: string;
56
56
  };
57
+ /**
58
+ * Запрос стрима, который клиент хочет получать для отображения.
59
+ */
60
+ export type DisplayLayoutRequest = {
61
+ /**
62
+ * Внешний ID пользователя
63
+ */
64
+ uid: ExternalParticipantId | string;
65
+ /**
66
+ * Тип медиа (видео с камеры, картинка с экрана, лайв или мувик)
67
+ */
68
+ mediaType: MediaType;
69
+ /**
70
+ * Ширина окошка в котором отображается видео, в пикселях
71
+ */
72
+ width: number;
73
+ /**
74
+ * Высота окошка в котором отображается видео, в пикселях
75
+ */
76
+ height: number;
77
+ /**
78
+ * Отображать видео как CSS object-fit: cover. По умолчанию используется contain.
79
+ */
80
+ cover?: boolean;
81
+ /**
82
+ * Приоритет
83
+ */
84
+ priority?: number;
85
+ /**
86
+ * ID лайва или мувика. null для камеры или скрин-шары.
87
+ */
88
+ streamName?: string;
89
+ };
57
90
  export default ParticipantLayout;
@@ -41,10 +41,11 @@ export interface CallStatReport {
41
41
  remote_connection_type?: RTCIceCandidateType;
42
42
  }
43
43
  export interface ICallStatLog extends Pick<CallStatReport, 'call_topology' | 'nack_sent' | 'nack_received' | 'pli_sent' | 'pli_received' | 'fir_sent' | 'fir_received' | 'frames_dropped' | 'stat_time_delta'>, Pick<Partial<CallStatReport>, 'rtt' | 'jitter_video' | 'jitter_audio' | 'interframe_delay_variance' | 'freeze_count' | 'total_freezes_duration' | 'ss_freeze_count' | 'ss_total_freezes_duration' | 'inserted_audio_samples_for_deceleration' | 'removed_audio_samples_for_acceleration' | 'concealed_audio_samples' | 'total_audio_energy' | 'local_address' | 'local_connection_type' | 'network_type' | 'transport' | 'remote_address' | 'remote_connection_type'> {
44
+ is_simulcast?: boolean;
44
45
  concealed_silent_audio_samples?: number;
45
46
  concealment_audio_avg_size?: number;
46
47
  video_loss?: number;
47
48
  audio_loss?: number;
48
49
  cpu_hardware_concurrency?: number;
49
- [k: string]: string | number | undefined;
50
+ [k: string]: string | number | boolean | undefined;
50
51
  }
@@ -1,8 +1,11 @@
1
+ import IceServer from './IceServer';
1
2
  type PushData = {
2
3
  caller_id: string;
3
4
  caller_client_type?: string;
4
5
  conversation_id: string;
5
6
  endpoint: string;
7
+ wt_endpoint?: string;
8
+ turn_server?: IceServer;
6
9
  is_video: boolean;
7
10
  token: string;
8
11
  sdp_offer?: string;
@@ -1,5 +1,5 @@
1
1
  import { AnimojiVersion } from '@vkontakte/calls-vmoji';
2
- import { TransportTopology } from '../classes/transport/Transport';
2
+ import TransportTopology from '../enums/TransportTopology';
3
3
  import ChatRoomEventType from '../enums/ChatRoomEventType';
4
4
  import ConversationFeature from '../enums/ConversationFeature';
5
5
  import ConversationOption from '../enums/ConversationOption';
@@ -190,6 +190,7 @@ declare namespace SignalingMessage {
190
190
  deviceIdx?: number;
191
191
  peerId: PeerId;
192
192
  reason: HangupType;
193
+ errorCode?: string;
193
194
  markers?: ParticipantListMarkers;
194
195
  }
195
196
  export interface ClosedConversation extends Notification {
@@ -366,6 +367,9 @@ declare namespace SignalingMessage {
366
367
  export interface Connection extends Notification {
367
368
  endpoint: string;
368
369
  conversation: Conversation;
370
+ conversationParams: {
371
+ serverTime: number;
372
+ };
369
373
  isConcurrent: boolean;
370
374
  peerId: PeerId;
371
375
  mediaModifiers: MediaModifiers;
@@ -1,4 +1,4 @@
1
- import { TransportTopology } from '../classes/transport/Transport';
1
+ import TransportTopology from '../enums/TransportTopology';
2
2
  export type StatTransport = {
3
3
  timestamp: number;
4
4
  availableOutgoingBitrate: number;
@@ -113,10 +113,6 @@ export interface StatRtp extends StatRtpOutboundVideo {
113
113
  * Идентификатор пользователя, связанный с этим потоком
114
114
  */
115
115
  userId?: string;
116
- /**
117
- * Идентификатор media track, связанный с этим RTP потоком
118
- */
119
- trackId?: string;
120
116
  /**
121
117
  * Пропускная способность в битах в секунду
122
118
  */
@@ -7,6 +7,8 @@ declare class WebTransportEventual {
7
7
  private readonly url;
8
8
  private readonly options;
9
9
  private readonly compression;
10
+ private closeRequested;
11
+ private closeEventEmitted;
10
12
  private encoder;
11
13
  private decoder;
12
14
  onopen: ((this: WebTransportEventual, ev: Event) => any) | null;
@@ -20,7 +22,10 @@ declare class WebTransportEventual {
20
22
  private readChunks;
21
23
  private readLoop;
22
24
  send(data: string): Promise<void>;
25
+ private createErrorEvent;
23
26
  close(code?: number, reason?: string): void;
27
+ private closeConnectedTransport;
28
+ private emitClose;
24
29
  static isBrowserSupported(): boolean;
25
30
  }
26
31
  export { WebTransportEventual as WebTransport };
@@ -1,8 +1,107 @@
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 startConversationSession(): string;
99
+ export declare function setConversationId(conversationId: string | null, sessionId?: string): void;
100
+ export declare function list(): Promise<DebugLogSessionInfo[]>;
101
+ export declare function get(params: DebugLogGetParams): Promise<CurrentLogItem[]>;
102
+ export declare function getJson(params: DebugLogGetParams): Promise<string>;
103
+ export declare function download(params: DebugLogGetParams): Promise<string>;
104
+ export declare function clear(params?: DebugLogGetParams): Promise<void>;
105
+ export declare function stats(): Promise<DebugLogStorageStats>;
106
+ export declare function getAllJson(): Promise<string>;
107
+ export declare function downloadAll(): Promise<string>;
@@ -1,41 +0,0 @@
1
- import BaseApi from '../abstract/BaseApi';
2
- import BaseLogger from '../abstract/BaseLogger';
3
- import StatLog from '../enums/StatLog';
4
- /**
5
- * Класс отвечает за отправку различной информации в сервис статистики (события, статистика и подобное)
6
- */
7
- export default class Logger extends BaseLogger {
8
- private static _instance;
9
- private static _conversationIdProvider;
10
- static setConversationIdProvider(provider: () => string | null): void;
11
- static create(api: BaseApi, externalLogger: BaseLogger | null): void;
12
- static log(name: StatLog, value?: string, immediately?: boolean): void;
13
- static logCustom(name: StatLog, params: Record<string, string | number>, immediately?: boolean): void;
14
- static logClientStats(params: Record<string, string | number | undefined | null>, immediately?: boolean): void;
15
- static logClientEvent(params: Record<string, string | number | undefined | null>, immediately?: boolean): void;
16
- static destroy(): void;
17
- private readonly _externalLogger;
18
- private readonly _api;
19
- private readonly _batchInterval;
20
- private _batchedLogItems;
21
- private _batchedClientStats;
22
- private _batchedClientEvents;
23
- private _batchTimeout;
24
- private _serverTimeDelta;
25
- constructor(api: BaseApi, externalLogger: BaseLogger | null);
26
- log(name: StatLog, value?: string, immediately?: boolean): void;
27
- logCustom(name: string, params: Record<string, string | number>, immediately?: boolean): void;
28
- logClientStats(data: Record<string, string | number | undefined | null>, immediately?: boolean): void;
29
- logClientEvent(data: Record<string, string | number | undefined | null>, immediately?: boolean): void;
30
- destroy(): void;
31
- private _logInternal;
32
- private _getConversationId;
33
- private _sendBatch;
34
- private _startTimeout;
35
- private _stopTimeout;
36
- private _sendLogItems;
37
- private _sendClientStats;
38
- private _sendClientEvents;
39
- private _calculateServerTimeDelta;
40
- private _now;
41
- }
@@ -1,9 +0,0 @@
1
- import HangupReason from '../HangupReason';
2
- import { TransportTopology } from '../transport/Transport';
3
- /**
4
- * Класс для работы с событийными метриками, обертка для правильной отправки событий
5
- */
6
- export declare class EventMetricsService {
7
- private static correctHangupReason;
8
- static sendHangupEvent(reason: HangupReason, topology?: TransportTopology): void;
9
- }
@@ -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,22 +0,0 @@
1
- import { ExternalParticipantId } from '../types/ExternalId';
2
- export declare const enum VideoStreamDebugDirection {
3
- INBOUND = "inbound",
4
- OUTBOUND = "outbound"
5
- }
6
- export type VideoStreamDebugData = {
7
- direction: VideoStreamDebugDirection;
8
- externalParticipantId: ExternalParticipantId;
9
- trackId?: string;
10
- mimeType?: string;
11
- width?: number;
12
- height?: number;
13
- frameRate?: number;
14
- bitrate?: number;
15
- packetsLost?: number;
16
- };
17
- declare namespace DebugVideoStats {
18
- function format(data: VideoStreamDebugData): string;
19
- function send(data: VideoStreamDebugData): void;
20
- function clear(externalParticipantId: ExternalParticipantId): void;
21
- }
22
- export default DebugVideoStats;