@stream-io/video-client 0.0.36 → 0.0.38

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.
@@ -70,9 +70,8 @@ export declare class StreamVideoClient {
70
70
  *
71
71
  * @param type the type of the call.
72
72
  * @param id the id of the call, if not provided a unique random value is used
73
- * @param {boolean} [ringing] whether the call should be created in the ringing state.
74
73
  */
75
- call: (type: string, id: string, ringing?: boolean) => Call;
74
+ call: (type: string, id: string) => Call;
76
75
  /**
77
76
  * Creates a new guest user with the given data.
78
77
  *
@@ -141,6 +140,12 @@ export declare class StreamVideoClient {
141
140
  * @return {string} Returns a token
142
141
  */
143
142
  createToken(userID: string, exp?: number, iat?: number, call_cids?: string[]): string;
143
+ /**
144
+ * A callback that can be used to create ringing calls from push notifications. If the call already exists, it will do nothing.
145
+ * @param call_cid
146
+ * @returns
147
+ */
148
+ onRingingCall: (call_cid: string) => Promise<Call>;
144
149
  /**
145
150
  * Connects the given anonymous user to the client.
146
151
  *
@@ -12,10 +12,10 @@ export interface APIError {
12
12
  StatusCode: number;
13
13
  /**
14
14
  * API error code
15
- * @type {string}
15
+ * @type {number}
16
16
  * @memberof APIError
17
17
  */
18
- code: APIErrorCodeEnum;
18
+ code: number;
19
19
  /**
20
20
  * Additional error-specific information
21
21
  * @type {Array<number>}
@@ -49,44 +49,6 @@ export interface APIError {
49
49
  */
50
50
  more_info: string;
51
51
  }
52
- /**
53
- * @export
54
- */
55
- export declare const APIErrorCodeEnum: {
56
- readonly INTERNAL_ERROR: "internal-error";
57
- readonly ACCESS_KEY_ERROR: "access-key-error";
58
- readonly INPUT_ERROR: "input-error";
59
- readonly AUTH_FAILED: "auth-failed";
60
- readonly DUPLICATE_USERNAME: "duplicate-username";
61
- readonly RATE_LIMITED: "rate-limited";
62
- readonly NOT_FOUND: "not-found";
63
- readonly NOT_ALLOWED: "not-allowed";
64
- readonly EVENT_NOT_SUPPORTED: "event-not-supported";
65
- readonly CHANNEL_FEATURE_NOT_SUPPORTED: "channel-feature-not-supported";
66
- readonly MESSAGE_TOO_LONG: "message-too-long";
67
- readonly MULTIPLE_NESTING_LEVEL: "multiple-nesting-level";
68
- readonly PAYLOAD_TOO_BIG: "payload-too-big";
69
- readonly EXPIRED_TOKEN: "expired-token";
70
- readonly TOKEN_NOT_VALID_YET: "token-not-valid-yet";
71
- readonly TOKEN_USED_BEFORE_IAT: "token-used-before-iat";
72
- readonly INVALID_TOKEN_SIGNATURE: "invalid-token-signature";
73
- readonly CUSTOM_COMMAND_ENDPOINT_MISSING: "custom-command-endpoint-missing";
74
- readonly CUSTOM_COMMAND_ENDPOINTCALL_ERROR: "custom-command-endpoint=call-error";
75
- readonly CONNECTION_ID_NOT_FOUND: "connection-id-not-found";
76
- readonly COOL_DOWN: "cool-down";
77
- readonly QUERY_CHANNEL_PERMISSIONS_MISMATCH: "query-channel-permissions-mismatch";
78
- readonly TOO_MANY_CONNECTIONS: "too-many-connections";
79
- readonly NOT_SUPPORTED_IN_PUSH_V1: "not-supported-in-push-v1";
80
- readonly MODERATION_FAILED: "moderation-failed";
81
- readonly VIDEO_PROVIDER_NOT_CONFIGURED: "video-provider-not-configured";
82
- readonly VIDEO_INVALID_CALL_ID: "video-invalid-call-id";
83
- readonly VIDEO_CREATE_CALL_FAILED: "video-create-call-failed";
84
- readonly APP_SUSPENDED: "app-suspended";
85
- readonly VIDEO_NO_DATACENTERS_AVAILABLE: "video-no-datacenters-available";
86
- readonly VIDEO_JOIN_CALL_FAILURE: "video-join-call-failure";
87
- readonly QUERY_CALLS_PERMISSIONS_MISMATCH: "query-calls-permissions-mismatch";
88
- };
89
- export type APIErrorCodeEnum = (typeof APIErrorCodeEnum)[keyof typeof APIErrorCodeEnum];
90
52
  /**
91
53
  *
92
54
  * @export
@@ -150,6 +112,12 @@ export interface AudioSettings {
150
112
  * @memberof AudioSettings
151
113
  */
152
114
  access_request_enabled: boolean;
115
+ /**
116
+ *
117
+ * @type {string}
118
+ * @memberof AudioSettings
119
+ */
120
+ default_device: AudioSettingsDefaultDeviceEnum;
153
121
  /**
154
122
  *
155
123
  * @type {boolean}
@@ -175,6 +143,14 @@ export interface AudioSettings {
175
143
  */
176
144
  speaker_default_on: boolean;
177
145
  }
146
+ /**
147
+ * @export
148
+ */
149
+ export declare const AudioSettingsDefaultDeviceEnum: {
150
+ readonly SPEAKER: "speaker";
151
+ readonly EARPIECE: "earpiece";
152
+ };
153
+ export type AudioSettingsDefaultDeviceEnum = (typeof AudioSettingsDefaultDeviceEnum)[keyof typeof AudioSettingsDefaultDeviceEnum];
178
154
  /**
179
155
  *
180
156
  * @export
@@ -187,6 +163,12 @@ export interface AudioSettingsRequest {
187
163
  * @memberof AudioSettingsRequest
188
164
  */
189
165
  access_request_enabled?: boolean;
166
+ /**
167
+ *
168
+ * @type {string}
169
+ * @memberof AudioSettingsRequest
170
+ */
171
+ default_device: AudioSettingsRequestDefaultDeviceEnum;
190
172
  /**
191
173
  *
192
174
  * @type {boolean}
@@ -212,6 +194,14 @@ export interface AudioSettingsRequest {
212
194
  */
213
195
  speaker_default_on?: boolean;
214
196
  }
197
+ /**
198
+ * @export
199
+ */
200
+ export declare const AudioSettingsRequestDefaultDeviceEnum: {
201
+ readonly SPEAKER: "speaker";
202
+ readonly EARPIECE: "earpiece";
203
+ };
204
+ export type AudioSettingsRequestDefaultDeviceEnum = (typeof AudioSettingsRequestDefaultDeviceEnum)[keyof typeof AudioSettingsRequestDefaultDeviceEnum];
215
205
  /**
216
206
  *
217
207
  * @export
@@ -744,12 +734,24 @@ export interface CallParticipantResponse {
744
734
  * @memberof CallParticipantResponse
745
735
  */
746
736
  joined_at: string;
737
+ /**
738
+ *
739
+ * @type {string}
740
+ * @memberof CallParticipantResponse
741
+ */
742
+ role: string;
747
743
  /**
748
744
  *
749
745
  * @type {UserResponse}
750
746
  * @memberof CallParticipantResponse
751
747
  */
752
748
  user: UserResponse;
749
+ /**
750
+ *
751
+ * @type {string}
752
+ * @memberof CallParticipantResponse
753
+ */
754
+ user_session_id: string;
753
755
  }
754
756
  /**
755
757
  * This event is sent when a reaction is sent in a call, clients should use this to show the reaction in the call screen
@@ -1196,6 +1198,12 @@ export interface CallSessionParticipantJoinedEvent {
1196
1198
  * @memberof CallSessionParticipantJoinedEvent
1197
1199
  */
1198
1200
  user: UserResponse;
1201
+ /**
1202
+ * The user session ID of the user that joined the call session
1203
+ * @type {string}
1204
+ * @memberof CallSessionParticipantJoinedEvent
1205
+ */
1206
+ user_session_id: string;
1199
1207
  }
1200
1208
  /**
1201
1209
  * This event is sent when a participant leaves a call session
@@ -1233,6 +1241,12 @@ export interface CallSessionParticipantLeftEvent {
1233
1241
  * @memberof CallSessionParticipantLeftEvent
1234
1242
  */
1235
1243
  user: UserResponse;
1244
+ /**
1245
+ * The user session ID of the user that left the call session
1246
+ * @type {string}
1247
+ * @memberof CallSessionParticipantLeftEvent
1248
+ */
1249
+ user_session_id: string;
1236
1250
  }
1237
1251
  /**
1238
1252
  *
@@ -1665,6 +1679,37 @@ export interface ConnectedEvent {
1665
1679
  */
1666
1680
  type: string;
1667
1681
  }
1682
+ /**
1683
+ * This event is sent when the WS connection fails
1684
+ * @export
1685
+ * @interface ConnectionErrorEvent
1686
+ */
1687
+ export interface ConnectionErrorEvent {
1688
+ /**
1689
+ *
1690
+ * @type {string}
1691
+ * @memberof ConnectionErrorEvent
1692
+ */
1693
+ connection_id: string;
1694
+ /**
1695
+ *
1696
+ * @type {string}
1697
+ * @memberof ConnectionErrorEvent
1698
+ */
1699
+ created_at: string;
1700
+ /**
1701
+ *
1702
+ * @type {APIError}
1703
+ * @memberof ConnectionErrorEvent
1704
+ */
1705
+ error: APIError | null;
1706
+ /**
1707
+ * The type of event: "connection.ok" in this case
1708
+ * @type {string}
1709
+ * @memberof ConnectionErrorEvent
1710
+ */
1711
+ type: string;
1712
+ }
1668
1713
  /**
1669
1714
  *
1670
1715
  * @export
@@ -2986,7 +3031,7 @@ export interface QueryCallsRequest {
2986
3031
  * @type {Array<SortParamRequest>}
2987
3032
  * @memberof QueryCallsRequest
2988
3033
  */
2989
- sort: Array<SortParamRequest>;
3034
+ sort?: Array<SortParamRequest>;
2990
3035
  /**
2991
3036
  *
2992
3037
  * @type {boolean}
@@ -3044,7 +3089,7 @@ export interface QueryMembersRequest {
3044
3089
  * @type {string}
3045
3090
  * @memberof QueryMembersRequest
3046
3091
  */
3047
- id?: string;
3092
+ id: string;
3048
3093
  /**
3049
3094
  *
3050
3095
  * @type {number}
@@ -3479,13 +3524,13 @@ export interface SendReactionResponse {
3479
3524
  */
3480
3525
  export interface SortParamRequest {
3481
3526
  /**
3482
- *
3527
+ * Direction of sorting, -1 for descending, 1 for ascending
3483
3528
  * @type {number}
3484
3529
  * @memberof SortParamRequest
3485
3530
  */
3486
3531
  direction?: number;
3487
3532
  /**
3488
- *
3533
+ * Name of field to sort by
3489
3534
  * @type {string}
3490
3535
  * @memberof SortParamRequest
3491
3536
  */
@@ -4185,6 +4230,8 @@ export type VideoEvent = ({
4185
4230
  } & CallUpdatedEvent) | ({
4186
4231
  type: 'call.user_muted';
4187
4232
  } & CallUserMuted) | ({
4233
+ type: 'connection.error';
4234
+ } & ConnectionErrorEvent) | ({
4188
4235
  type: 'connection.ok';
4189
4236
  } & ConnectedEvent) | ({
4190
4237
  type: 'custom';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-client",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -303,15 +303,13 @@ export class StreamVideoClient {
303
303
  *
304
304
  * @param type the type of the call.
305
305
  * @param id the id of the call, if not provided a unique random value is used
306
- * @param {boolean} [ringing] whether the call should be created in the ringing state.
307
306
  */
308
- call = (type: string, id: string, ringing?: boolean) => {
307
+ call = (type: string, id: string) => {
309
308
  return new Call({
310
309
  streamClient: this.streamClient,
311
310
  id: id,
312
311
  type: type,
313
312
  clientStore: this.writeableStateStore,
314
- ringing,
315
313
  });
316
314
  };
317
315
 
@@ -484,6 +482,33 @@ export class StreamVideoClient {
484
482
  return this.streamClient.createToken(userID, exp, iat, call_cids);
485
483
  }
486
484
 
485
+ /**
486
+ * A callback that can be used to create ringing calls from push notifications. If the call already exists, it will do nothing.
487
+ * @param call_cid
488
+ * @returns
489
+ */
490
+ onRingingCall = async (call_cid: string) => {
491
+ // if we find the call and is already ringing, we don't need to create a new call
492
+ // as client would have received the call.ring state because the app had WS alive when receiving push notifications
493
+ let call = this.readOnlyStateStore.calls.find(
494
+ (c) => c.cid === call_cid && c.ringing,
495
+ );
496
+ if (!call) {
497
+ // if not it means that WS is not alive when receiving the push notifications and we need to fetch the call
498
+ const [callType, callId] = call_cid.split(':');
499
+ call = new Call({
500
+ streamClient: this.streamClient,
501
+ type: callType,
502
+ id: callId,
503
+ clientStore: this.writeableStateStore,
504
+ ringing: true,
505
+ });
506
+ await call.get();
507
+ }
508
+
509
+ return call;
510
+ };
511
+
487
512
  /**
488
513
  * Connects the given anonymous user to the client.
489
514
  *
@@ -68,6 +68,7 @@ describe('call.session events', () => {
68
68
  id: 'user-id',
69
69
  role: 'user',
70
70
  },
71
+ user_session_id: '123',
71
72
  });
72
73
  expect(state.metadata).toEqual({
73
74
  session: {
@@ -78,6 +79,8 @@ describe('call.session events', () => {
78
79
  id: 'user-id',
79
80
  role: 'user',
80
81
  },
82
+ user_session_id: '123',
83
+ role: 'user',
81
84
  },
82
85
  ],
83
86
  participants_count_by_role: {
@@ -100,6 +103,7 @@ describe('call.session events', () => {
100
103
  id: 'user-id',
101
104
  role: 'user',
102
105
  },
106
+ user_session_id: '123',
103
107
  },
104
108
  ],
105
109
  participants_count_by_role: {
@@ -115,6 +119,7 @@ describe('call.session events', () => {
115
119
  id: 'user-id',
116
120
  role: 'user',
117
121
  },
122
+ user_session_id: '123',
118
123
  });
119
124
  expect(state.metadata).toEqual({
120
125
  session: {
@@ -33,7 +33,7 @@ export const watchCallSessionEnded = (state: CallState) => {
33
33
  export const watchCallSessionParticipantJoined = (state: CallState) => {
34
34
  return function onCallParticipantJoined(event: StreamVideoEvent) {
35
35
  if (event.type !== 'call.session_participant_joined') return;
36
- const { user } = event;
36
+ const { user, user_session_id } = event;
37
37
  state.setMetadata((metadata) => {
38
38
  if (!metadata || !metadata.session) {
39
39
  state.logger(
@@ -55,6 +55,8 @@ export const watchCallSessionParticipantJoined = (state: CallState) => {
55
55
  // FIXME OL: ideally, this comes from the backend
56
56
  joined_at: new Date().toISOString(),
57
57
  user,
58
+ role: user.role,
59
+ user_session_id,
58
60
  },
59
61
  ],
60
62
  participants_count_by_role: {
@@ -75,7 +77,7 @@ export const watchCallSessionParticipantJoined = (state: CallState) => {
75
77
  export const watchCallSessionParticipantLeft = (state: CallState) => {
76
78
  return function onCallParticipantLeft(event: StreamVideoEvent) {
77
79
  if (event.type !== 'call.session_participant_left') return;
78
- const { user } = event;
80
+ const { user, user_session_id } = event;
79
81
  state.setMetadata((metadata) => {
80
82
  if (!metadata || !metadata.session) {
81
83
  state.logger(
@@ -91,7 +93,9 @@ export const watchCallSessionParticipantLeft = (state: CallState) => {
91
93
  ...metadata,
92
94
  session: {
93
95
  ...session,
94
- participants: participants.filter((p) => p.user.id !== user.id),
96
+ participants: participants.filter(
97
+ (p) => p.user_session_id !== user_session_id,
98
+ ),
95
99
  participants_count_by_role: {
96
100
  ...participants_count_by_role,
97
101
  [user.role]: Math.max(
@@ -14,10 +14,10 @@ export interface APIError {
14
14
  StatusCode: number;
15
15
  /**
16
16
  * API error code
17
- * @type {string}
17
+ * @type {number}
18
18
  * @memberof APIError
19
19
  */
20
- code: APIErrorCodeEnum;
20
+ code: number;
21
21
  /**
22
22
  * Additional error-specific information
23
23
  * @type {Array<number>}
@@ -49,47 +49,6 @@ export interface APIError {
49
49
  */
50
50
  more_info: string;
51
51
  }
52
-
53
- /**
54
- * @export
55
- */
56
- export const APIErrorCodeEnum = {
57
- INTERNAL_ERROR: 'internal-error',
58
- ACCESS_KEY_ERROR: 'access-key-error',
59
- INPUT_ERROR: 'input-error',
60
- AUTH_FAILED: 'auth-failed',
61
- DUPLICATE_USERNAME: 'duplicate-username',
62
- RATE_LIMITED: 'rate-limited',
63
- NOT_FOUND: 'not-found',
64
- NOT_ALLOWED: 'not-allowed',
65
- EVENT_NOT_SUPPORTED: 'event-not-supported',
66
- CHANNEL_FEATURE_NOT_SUPPORTED: 'channel-feature-not-supported',
67
- MESSAGE_TOO_LONG: 'message-too-long',
68
- MULTIPLE_NESTING_LEVEL: 'multiple-nesting-level',
69
- PAYLOAD_TOO_BIG: 'payload-too-big',
70
- EXPIRED_TOKEN: 'expired-token',
71
- TOKEN_NOT_VALID_YET: 'token-not-valid-yet',
72
- TOKEN_USED_BEFORE_IAT: 'token-used-before-iat',
73
- INVALID_TOKEN_SIGNATURE: 'invalid-token-signature',
74
- CUSTOM_COMMAND_ENDPOINT_MISSING: 'custom-command-endpoint-missing',
75
- CUSTOM_COMMAND_ENDPOINTCALL_ERROR: 'custom-command-endpoint=call-error',
76
- CONNECTION_ID_NOT_FOUND: 'connection-id-not-found',
77
- COOL_DOWN: 'cool-down',
78
- QUERY_CHANNEL_PERMISSIONS_MISMATCH: 'query-channel-permissions-mismatch',
79
- TOO_MANY_CONNECTIONS: 'too-many-connections',
80
- NOT_SUPPORTED_IN_PUSH_V1: 'not-supported-in-push-v1',
81
- MODERATION_FAILED: 'moderation-failed',
82
- VIDEO_PROVIDER_NOT_CONFIGURED: 'video-provider-not-configured',
83
- VIDEO_INVALID_CALL_ID: 'video-invalid-call-id',
84
- VIDEO_CREATE_CALL_FAILED: 'video-create-call-failed',
85
- APP_SUSPENDED: 'app-suspended',
86
- VIDEO_NO_DATACENTERS_AVAILABLE: 'video-no-datacenters-available',
87
- VIDEO_JOIN_CALL_FAILURE: 'video-join-call-failure',
88
- QUERY_CALLS_PERMISSIONS_MISMATCH: 'query-calls-permissions-mismatch',
89
- } as const;
90
- export type APIErrorCodeEnum =
91
- (typeof APIErrorCodeEnum)[keyof typeof APIErrorCodeEnum];
92
-
93
52
  /**
94
53
  *
95
54
  * @export
@@ -153,6 +112,12 @@ export interface AudioSettings {
153
112
  * @memberof AudioSettings
154
113
  */
155
114
  access_request_enabled: boolean;
115
+ /**
116
+ *
117
+ * @type {string}
118
+ * @memberof AudioSettings
119
+ */
120
+ default_device: AudioSettingsDefaultDeviceEnum;
156
121
  /**
157
122
  *
158
123
  * @type {boolean}
@@ -178,6 +143,17 @@ export interface AudioSettings {
178
143
  */
179
144
  speaker_default_on: boolean;
180
145
  }
146
+
147
+ /**
148
+ * @export
149
+ */
150
+ export const AudioSettingsDefaultDeviceEnum = {
151
+ SPEAKER: 'speaker',
152
+ EARPIECE: 'earpiece',
153
+ } as const;
154
+ export type AudioSettingsDefaultDeviceEnum =
155
+ (typeof AudioSettingsDefaultDeviceEnum)[keyof typeof AudioSettingsDefaultDeviceEnum];
156
+
181
157
  /**
182
158
  *
183
159
  * @export
@@ -190,6 +166,12 @@ export interface AudioSettingsRequest {
190
166
  * @memberof AudioSettingsRequest
191
167
  */
192
168
  access_request_enabled?: boolean;
169
+ /**
170
+ *
171
+ * @type {string}
172
+ * @memberof AudioSettingsRequest
173
+ */
174
+ default_device: AudioSettingsRequestDefaultDeviceEnum;
193
175
  /**
194
176
  *
195
177
  * @type {boolean}
@@ -215,6 +197,17 @@ export interface AudioSettingsRequest {
215
197
  */
216
198
  speaker_default_on?: boolean;
217
199
  }
200
+
201
+ /**
202
+ * @export
203
+ */
204
+ export const AudioSettingsRequestDefaultDeviceEnum = {
205
+ SPEAKER: 'speaker',
206
+ EARPIECE: 'earpiece',
207
+ } as const;
208
+ export type AudioSettingsRequestDefaultDeviceEnum =
209
+ (typeof AudioSettingsRequestDefaultDeviceEnum)[keyof typeof AudioSettingsRequestDefaultDeviceEnum];
210
+
218
211
  /**
219
212
  *
220
213
  * @export
@@ -745,12 +738,24 @@ export interface CallParticipantResponse {
745
738
  * @memberof CallParticipantResponse
746
739
  */
747
740
  joined_at: string;
741
+ /**
742
+ *
743
+ * @type {string}
744
+ * @memberof CallParticipantResponse
745
+ */
746
+ role: string;
748
747
  /**
749
748
  *
750
749
  * @type {UserResponse}
751
750
  * @memberof CallParticipantResponse
752
751
  */
753
752
  user: UserResponse;
753
+ /**
754
+ *
755
+ * @type {string}
756
+ * @memberof CallParticipantResponse
757
+ */
758
+ user_session_id: string;
754
759
  }
755
760
  /**
756
761
  * This event is sent when a reaction is sent in a call, clients should use this to show the reaction in the call screen
@@ -1193,6 +1198,12 @@ export interface CallSessionParticipantJoinedEvent {
1193
1198
  * @memberof CallSessionParticipantJoinedEvent
1194
1199
  */
1195
1200
  user: UserResponse;
1201
+ /**
1202
+ * The user session ID of the user that joined the call session
1203
+ * @type {string}
1204
+ * @memberof CallSessionParticipantJoinedEvent
1205
+ */
1206
+ user_session_id: string;
1196
1207
  }
1197
1208
  /**
1198
1209
  * This event is sent when a participant leaves a call session
@@ -1230,6 +1241,12 @@ export interface CallSessionParticipantLeftEvent {
1230
1241
  * @memberof CallSessionParticipantLeftEvent
1231
1242
  */
1232
1243
  user: UserResponse;
1244
+ /**
1245
+ * The user session ID of the user that left the call session
1246
+ * @type {string}
1247
+ * @memberof CallSessionParticipantLeftEvent
1248
+ */
1249
+ user_session_id: string;
1233
1250
  }
1234
1251
  /**
1235
1252
  *
@@ -1650,6 +1667,37 @@ export interface ConnectedEvent {
1650
1667
  */
1651
1668
  type: string;
1652
1669
  }
1670
+ /**
1671
+ * This event is sent when the WS connection fails
1672
+ * @export
1673
+ * @interface ConnectionErrorEvent
1674
+ */
1675
+ export interface ConnectionErrorEvent {
1676
+ /**
1677
+ *
1678
+ * @type {string}
1679
+ * @memberof ConnectionErrorEvent
1680
+ */
1681
+ connection_id: string;
1682
+ /**
1683
+ *
1684
+ * @type {string}
1685
+ * @memberof ConnectionErrorEvent
1686
+ */
1687
+ created_at: string;
1688
+ /**
1689
+ *
1690
+ * @type {APIError}
1691
+ * @memberof ConnectionErrorEvent
1692
+ */
1693
+ error: APIError | null;
1694
+ /**
1695
+ * The type of event: "connection.ok" in this case
1696
+ * @type {string}
1697
+ * @memberof ConnectionErrorEvent
1698
+ */
1699
+ type: string;
1700
+ }
1653
1701
  /**
1654
1702
  *
1655
1703
  * @export
@@ -2958,7 +3006,7 @@ export interface QueryCallsRequest {
2958
3006
  * @type {Array<SortParamRequest>}
2959
3007
  * @memberof QueryCallsRequest
2960
3008
  */
2961
- sort: Array<SortParamRequest>;
3009
+ sort?: Array<SortParamRequest>;
2962
3010
  /**
2963
3011
  *
2964
3012
  * @type {boolean}
@@ -3014,7 +3062,7 @@ export interface QueryMembersRequest {
3014
3062
  * @type {string}
3015
3063
  * @memberof QueryMembersRequest
3016
3064
  */
3017
- id?: string;
3065
+ id: string;
3018
3066
  /**
3019
3067
  *
3020
3068
  * @type {number}
@@ -3453,13 +3501,13 @@ export interface SendReactionResponse {
3453
3501
  */
3454
3502
  export interface SortParamRequest {
3455
3503
  /**
3456
- *
3504
+ * Direction of sorting, -1 for descending, 1 for ascending
3457
3505
  * @type {number}
3458
3506
  * @memberof SortParamRequest
3459
3507
  */
3460
3508
  direction?: number;
3461
3509
  /**
3462
- *
3510
+ * Name of field to sort by
3463
3511
  * @type {string}
3464
3512
  * @memberof SortParamRequest
3465
3513
  */
@@ -4135,6 +4183,7 @@ export type VideoEvent =
4135
4183
  | ({ type: 'call.unblocked_user' } & UnblockedUserEvent)
4136
4184
  | ({ type: 'call.updated' } & CallUpdatedEvent)
4137
4185
  | ({ type: 'call.user_muted' } & CallUserMuted)
4186
+ | ({ type: 'connection.error' } & ConnectionErrorEvent)
4138
4187
  | ({ type: 'connection.ok' } & ConnectedEvent)
4139
4188
  | ({ type: 'custom' } & CustomVideoEvent)
4140
4189
  | ({ type: 'health.check' } & HealthCheckEvent);