@vkontakte/calls-sdk 2.5.3-beta.7 → 2.5.3-dev.18fb1f2.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.
@@ -3,7 +3,8 @@ import ParticipantState from '../enums/ParticipantState';
3
3
  import UserRole from '../enums/UserRole';
4
4
  import { ParticipantStatus } from '../static/External';
5
5
  import MediaSettings from '../types/MediaSettings';
6
- import { ExternalParticipantId } from './ExternalId';
6
+ import { ExternalId, ExternalParticipantId, ExternalParticipantListMarkers } from './ExternalId';
7
+ import { ISharedMovieInfo } from './MovieShare';
7
8
  import MuteStates from './MuteStates';
8
9
  import ParticipantLayout from './ParticipantLayout';
9
10
  /**
@@ -16,6 +17,13 @@ export declare type CompositeUserId = string;
16
17
  */
17
18
  export declare type ParticipantId = string;
18
19
  export declare type OkUserId = number;
20
+ export declare type ParticipantListType = 'GRID' | 'SIDE' | 'ADMIN';
21
+ export interface ParticipantListMarker {
22
+ rank?: number;
23
+ ts?: number;
24
+ id?: CompositeUserId;
25
+ }
26
+ export declare type ParticipantListMarkers = Record<ParticipantListType, ParticipantListMarker>;
19
27
  /**
20
28
  * Стейт участника звонка
21
29
  */
@@ -47,4 +55,9 @@ export interface Participant {
47
55
  muteStates: MuteStates;
48
56
  unmuteOptions: MediaOption[];
49
57
  observedIds: CompositeUserId[];
58
+ markers?: ExternalParticipantListMarkers;
59
+ movieShareInfos?: ISharedMovieInfo[];
60
+ }
61
+ export interface IGetParticipantsParameters {
62
+ externalIds: ExternalId[];
50
63
  }
@@ -0,0 +1,13 @@
1
+ import { ParticipantListMarker, ParticipantListType } from './Participant';
2
+ export interface ParticipantListChunkParameters {
3
+ listType: ParticipantListType;
4
+ count: number;
5
+ /** Anchor in sorted list to start from. Mutually exclusive with "fromIdx" */
6
+ fromMarker?: ParticipantListMarker;
7
+ /** Position in sorted list to start from (0-based). Mutually exclusive with "fromMarker" */
8
+ fromIdx?: number;
9
+ /** If true then list is to be iterated in reverse order */
10
+ backward?: boolean;
11
+ /** If true then resulting chunk will start from Participant with specified marker, if such Participant (still) exists */
12
+ includeMarker?: boolean;
13
+ }
@@ -9,10 +9,11 @@ import UserRole from '../enums/UserRole';
9
9
  import UserType from '../enums/UserType';
10
10
  import MediaModifiers from './MediaModifiers';
11
11
  import MediaSettings from './MediaSettings';
12
+ import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
12
13
  import MuteStates from './MuteStates';
13
- import { CompositeUserId, OkUserId, ParticipantId } from './Participant';
14
+ import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
14
15
  import VideoSettings from './VideoSettings';
15
- import { WaitingParticipant } from './WaitingHall';
16
+ import { ChatRoom } from './WaitingHall';
16
17
  declare type SignalingMessage = Record<string, any>;
17
18
  export declare type RecordInfo = {
18
19
  initiator: ParticipantId;
@@ -31,12 +32,8 @@ declare namespace SignalingMessage {
31
32
  id: number;
32
33
  type?: string;
33
34
  }
34
- export type ParticipantListType = 'GRID' | 'SIDE' | 'ADMIN';
35
- export interface ParticipantListMarker {
36
- rank: number;
37
- ts: number;
38
- id?: CompositeUserId;
39
- }
35
+ export type ParticipantListType = ParticipantParticipantListType;
36
+ export type ParticipantListMarker = ParticipantParticipantListMarker;
40
37
  export interface Participant {
41
38
  id: OkUserId;
42
39
  idType?: UserType;
@@ -56,8 +53,15 @@ declare namespace SignalingMessage {
56
53
  restricted?: boolean;
57
54
  muteStates?: MuteStates;
58
55
  unmuteOptions?: MediaOption[];
59
- markers?: Record<ParticipantListType, ParticipantListMarker>;
56
+ markers?: ParticipantListMarkers;
60
57
  observedIds?: CompositeUserId[];
58
+ movieShareInfos?: ISharedMovieInfo[];
59
+ }
60
+ export interface ParticipantListChunk extends Notification {
61
+ participants: (Participant & Required<Pick<Participant, 'markers'>>)[];
62
+ countBefore: number;
63
+ countAfter: number;
64
+ markerFound: boolean;
61
65
  }
62
66
  interface Conversation {
63
67
  id: string;
@@ -107,6 +111,7 @@ declare namespace SignalingMessage {
107
111
  deviceIdx?: number;
108
112
  peerId: PeerId;
109
113
  reason: HangupType;
114
+ markers?: ParticipantListMarkers;
110
115
  }
111
116
  export interface ClosedConversation extends Notification {
112
117
  reason: HangupType;
@@ -117,6 +122,7 @@ declare namespace SignalingMessage {
117
122
  deviceIdx?: number;
118
123
  peerId: PeerId;
119
124
  mediaSettings: Partial<MediaSettings>;
125
+ markers?: ParticipantListMarkers;
120
126
  }
121
127
  export interface ParticipantStateChanged extends Notification {
122
128
  participantId: OkUserId;
@@ -128,6 +134,7 @@ declare namespace SignalingMessage {
128
134
  state: Record<string, string>;
129
135
  stateUpdateTs: Record<string, number>;
130
136
  };
137
+ markers?: ParticipantListMarkers;
131
138
  }
132
139
  export interface RolesChanged extends Notification {
133
140
  adminId: ParticipantId;
@@ -235,11 +242,11 @@ declare namespace SignalingMessage {
235
242
  }
236
243
  export interface ChatRoomUpdated extends Notification {
237
244
  eventType: ChatRoomEventType;
238
- totalCount: number;
239
- firstParticipants: WaitingParticipant[];
240
- addedParticipantIds: ParticipantId[];
241
- removedParticipantIds: ParticipantId[];
242
- feedback: Record<string, any>[];
245
+ totalCount: ChatRoom['totalCount'];
246
+ firstParticipants?: ChatRoom['firstParticipants'];
247
+ addedParticipantIds?: ParticipantId[];
248
+ removedParticipantIds?: ParticipantId[];
249
+ feedback?: ChatRoom['feedback'];
243
250
  }
244
251
  export interface VideoQualityUpdate extends Notification {
245
252
  quality: {
@@ -262,6 +269,16 @@ declare namespace SignalingMessage {
262
269
  isConcurrent: boolean;
263
270
  peerId: PeerId;
264
271
  mediaModifiers: MediaModifiers;
272
+ participants?: ParticipantListChunk;
273
+ chatRoom?: ChatRoom;
274
+ }
275
+ export interface SharedMovieState extends Notification {
276
+ data: ISharedMovieState[];
277
+ }
278
+ export interface SharedMovieInfo extends Notification {
279
+ movieShareInfo: ISharedMovieInfo;
280
+ }
281
+ export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
265
282
  }
266
283
  export {};
267
284
  }
@@ -9,6 +9,19 @@ export declare type WaitingParticipant = {
9
9
  id: WaitingParticipantId;
10
10
  externalId?: SignalingMessage.ExternalId;
11
11
  };
12
+ export declare type Feedback = {
13
+ key: string;
14
+ totalCount: number;
15
+ currentCount: number;
16
+ timeout: number;
17
+ participantIds: CompositeUserId[];
18
+ };
19
+ export declare type ChatRoom = {
20
+ totalCount: number;
21
+ firstParticipants?: WaitingParticipant[];
22
+ handCount?: number;
23
+ feedback?: Feedback[];
24
+ };
12
25
  /**
13
26
  * Ответ на запрос `getWaitingHall`
14
27
  */