@vkontakte/calls-sdk 2.8.2-dev.420d5a9.0 → 2.8.2-dev.638a3c6.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 (49) hide show
  1. package/CallsSDK.d.ts +63 -38
  2. package/abstract/BaseApi.d.ts +11 -9
  3. package/abstract/BaseSignaling.d.ts +11 -6
  4. package/calls-sdk.cjs.js +8 -8
  5. package/calls-sdk.esm.js +8 -8
  6. package/classes/Conversation.d.ts +17 -11
  7. package/classes/FpsMeter.d.ts +10 -0
  8. package/classes/SpecListener.d.ts +0 -1
  9. package/classes/codec/Types.d.ts +11 -1
  10. package/classes/screenshare/PacketHistory.d.ts +2 -2
  11. package/classes/screenshare/ScreenCaptureSender.d.ts +12 -3
  12. package/classes/screenshare/ScreenCongestionControl.d.ts +1 -1
  13. package/classes/screenshare/StreamBuilder.d.ts +1 -0
  14. package/classes/screenshare/Utils.d.ts +1 -1
  15. package/classes/stat/StatAggregator.d.ts +1 -1
  16. package/classes/stat/StatFirstMediaReceived.d.ts +14 -2
  17. package/classes/transport/BaseTransport.d.ts +13 -0
  18. package/classes/transport/DirectTransport.d.ts +7 -18
  19. package/classes/transport/ServerTransport.d.ts +7 -17
  20. package/classes/transport/Transport.d.ts +7 -3
  21. package/default/Api.d.ts +12 -13
  22. package/default/Signaling.d.ts +11 -6
  23. package/enums/FatalError.d.ts +1 -0
  24. package/enums/SignalingCommandType.d.ts +4 -2
  25. package/enums/SignalingNotification.d.ts +0 -1
  26. package/package.json +3 -3
  27. package/static/External.d.ts +34 -16
  28. package/static/Params.d.ts +38 -31
  29. package/static/Utils.d.ts +8 -4
  30. package/types/Asr.d.ts +1 -1
  31. package/types/Conversation.d.ts +3 -0
  32. package/types/ExternalId.d.ts +13 -15
  33. package/types/{Logger.d.ts → IEventualStatLog.d.ts} +2 -2
  34. package/types/MovieShare.d.ts +2 -2
  35. package/types/MuteStates.d.ts +1 -1
  36. package/types/Participant.d.ts +4 -3
  37. package/types/ParticipantLayout.d.ts +2 -2
  38. package/types/ParticipantListChunk.d.ts +1 -1
  39. package/types/ParticipantStreamDescription.d.ts +3 -3
  40. package/types/PerfStatReporter.d.ts +1 -1
  41. package/types/Room.d.ts +4 -0
  42. package/types/SignalingCommand.d.ts +2 -1
  43. package/types/SignalingMessage.d.ts +17 -4
  44. package/types/Statistics.d.ts +3 -4
  45. package/types/Streams.d.ts +7 -0
  46. package/utils/ArrayDequeue.d.ts +1 -1
  47. package/utils/ArrayList.d.ts +5 -2
  48. package/utils/FastList.d.ts +5 -2
  49. package/utils/IList.d.ts +5 -2
@@ -2,10 +2,12 @@ import { TransportTopology } from '../classes/transport/Transport';
2
2
  import ChatRoomEventType from '../enums/ChatRoomEventType';
3
3
  import ConversationFeature from '../enums/ConversationFeature';
4
4
  import ConversationOption from '../enums/ConversationOption';
5
+ import FatalError from '../enums/FatalError';
5
6
  import HangupType from '../enums/HangupType';
6
7
  import MediaOption from '../enums/MediaOption';
7
8
  import ParticipantState from '../enums/ParticipantState';
8
9
  import RoomsEventType from '../enums/RoomsEventType';
10
+ import SignalingCommandType from '../enums/SignalingCommandType';
9
11
  import UserRole from '../enums/UserRole';
10
12
  import UserType from '../enums/UserType';
11
13
  import { AsrInfo } from './Asr';
@@ -16,6 +18,7 @@ import MediaSettings from './MediaSettings';
16
18
  import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
17
19
  import MuteStates from './MuteStates';
18
20
  import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
21
+ import { IRoomId } from './Room';
19
22
  import VideoSettings from './VideoSettings';
20
23
  import { ChatRoom } from './WaitingHall';
21
24
  export type RecordInfo = {
@@ -26,6 +29,17 @@ export type RecordInfo = {
26
29
  recordExternalMovieId?: string;
27
30
  recordExternalOwnerId?: string;
28
31
  };
32
+ export interface SignalingResponse extends SignalingMessage {
33
+ response?: SignalingCommandType;
34
+ error?: string;
35
+ reason?: HangupType | FatalError;
36
+ sequence?: number;
37
+ type: 'response' | 'error' | 'timeout';
38
+ }
39
+ export interface SignalingSuccessResponse extends SignalingResponse {
40
+ response: SignalingCommandType;
41
+ sequence: number;
42
+ }
29
43
  declare namespace SignalingMessage {
30
44
  export interface ExternalId {
31
45
  type: 'UNKNOWN' | 'VK' | 'ANONYM';
@@ -174,7 +188,7 @@ declare namespace SignalingMessage {
174
188
  stateUpdated?: boolean;
175
189
  unmute?: boolean;
176
190
  muteAll?: boolean;
177
- roomId?: number;
191
+ roomId?: number | null;
178
192
  }
179
193
  export interface PinParticipant extends Notification {
180
194
  participantId: ParticipantId;
@@ -305,9 +319,6 @@ declare namespace SignalingMessage {
305
319
  roomId?: number;
306
320
  };
307
321
  }
308
- export interface JoinLinkChanged extends Notification {
309
- joinLink: string;
310
- }
311
322
  export interface Feedback extends Notification {
312
323
  feedback: IFeedback[];
313
324
  roomId?: number;
@@ -317,8 +328,10 @@ declare namespace SignalingMessage {
317
328
  }
318
329
  export interface SharedMovieInfo extends Notification {
319
330
  movieShareInfo: ISharedMovieInfo;
331
+ roomId?: IRoomId;
320
332
  }
321
333
  export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
334
+ roomId?: IRoomId;
322
335
  }
323
336
  export interface RoomsUpdated extends Notification {
324
337
  updates: Partial<Record<RoomsEventType, {
@@ -1,5 +1,4 @@
1
1
  import { TransportTopology } from '../classes/transport/Transport';
2
- import { ExternalParticipantId } from './ExternalId';
3
2
  export type StatTransport = {
4
3
  totalRoundTripTime: number;
5
4
  currentRoundTripTime: number;
@@ -32,7 +31,7 @@ export type StatRtp = {
32
31
  pliCount: number;
33
32
  firCount: number;
34
33
  nackCount: number;
35
- userId?: string | ExternalParticipantId;
34
+ userId?: string;
36
35
  bandwidth?: number;
37
36
  packetLoss?: number;
38
37
  clockRate?: number;
@@ -51,9 +50,9 @@ export type StatRtp = {
51
50
  silentConcealedSamples?: number;
52
51
  concealmentEvents?: number;
53
52
  totalAudioEnergy?: number;
54
- totalFreezesDuration?: number;
53
+ totalFreezesDuration: number;
55
54
  totalFreezesDurationDelta?: number;
56
- freezeCount?: number;
55
+ freezeCount: number;
57
56
  freezeCountDelta?: number;
58
57
  };
59
58
  export type StatItem = {
@@ -1,3 +1,4 @@
1
+ import { ParticipantId } from './Participant';
1
2
  export interface IStartStreamData {
2
3
  movieId: string | null;
3
4
  name: string | null;
@@ -9,3 +10,9 @@ export interface IStartStreamData {
9
10
  export interface IStopStreamData {
10
11
  roomId: number | null;
11
12
  }
13
+ export interface IRecordConfData {
14
+ king?: ParticipantId;
15
+ pawns?: ParticipantId[];
16
+ hideParticipantCount: boolean;
17
+ roomId: number | null;
18
+ }
@@ -14,7 +14,7 @@ export declare class ArrayDequeue<T = any> {
14
14
  get length(): number;
15
15
  /** возвращает текущую длину очереди */
16
16
  get left(): number;
17
- toArray(): T[];
17
+ toArray(): (T | null)[];
18
18
  /** добавить элемент в очередь */
19
19
  add(element: T): void;
20
20
  /** вычисляет значение след курсора по кругу */
@@ -1,10 +1,13 @@
1
1
  import IList from './IList';
2
- export declare class ArrayList<T> implements IList<T> {
2
+ export declare class ArrayList<T = never> implements IList<T> {
3
3
  private _items;
4
4
  get length(): number;
5
- push(data: T): void;
5
+ push(...data: T[]): void;
6
+ merge(data: ArrayList<T>): void;
6
7
  shift(): T | null;
7
8
  bisect(): void;
9
+ head(): T | null;
10
+ tail(): T | null;
8
11
  clear(): void;
9
12
  toString(): string;
10
13
  }
@@ -1,12 +1,15 @@
1
1
  import IList from './IList';
2
- export declare class FastList<T> implements IList<T> {
2
+ export declare class FastList<T = never> implements IList<T> {
3
3
  private _head;
4
4
  private _tail;
5
5
  private _length;
6
6
  get length(): number;
7
- push(data: T): void;
7
+ push(...data: T[]): void;
8
+ merge(data: FastList<T>): void;
8
9
  shift(): T | null;
9
10
  bisect(): void;
11
+ head(): T | null;
12
+ tail(): T | null;
10
13
  clear(): void;
11
14
  toString(): string;
12
15
  }
package/utils/IList.d.ts CHANGED
@@ -1,8 +1,11 @@
1
- export default interface IList<T> {
1
+ export default interface IList<T = never> {
2
2
  readonly length: number;
3
- push(data: T): void;
3
+ push(...data: T[]): void;
4
+ merge(data: IList<T>): void;
4
5
  shift(): T | null;
5
6
  bisect(): void;
6
7
  clear(): void;
8
+ head(): T | null;
9
+ tail(): T | null;
7
10
  toString(): string;
8
11
  }