@stream-io/video-client 1.39.2 → 1.40.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,7 +1,7 @@
1
1
  import { Publisher, Subscriber, TrackPublishOptions } from './rtc';
2
2
  import { CallState } from './store';
3
3
  import { ScopedLogger } from './logger';
4
- import type { AcceptCallResponse, BlockUserResponse, CallRingEvent, CallSettingsResponse, CollectUserFeedbackRequest, CollectUserFeedbackResponse, DeleteCallRequest, DeleteCallResponse, EndCallResponse, GetCallReportResponse, GetCallResponse, GetCallSessionParticipantStatsDetailsResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, JoinCallResponse, KickUserRequest, KickUserResponse, ListRecordingsResponse, ListTranscriptionsResponse, MuteUsersResponse, PinRequest, PinResponse, QueryCallMembersRequest, QueryCallMembersResponse, QueryCallSessionParticipantStatsResponse, QueryCallSessionParticipantStatsTimelineResponse, RejectCallResponse, RequestPermissionRequest, RequestPermissionResponse, RingCallRequest, RingCallResponse, SendCallEventResponse, SendReactionRequest, SendReactionResponse, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartFrameRecordingRequest, StartFrameRecordingResponse, StartHLSBroadcastingResponse, StartRecordingRequest, StartRecordingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopFrameRecordingResponse, StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, StopRecordingResponse, StopRTMPBroadcastsResponse, StopTranscriptionResponse, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse } from './gen/coordinator';
4
+ import type { AcceptCallResponse, BlockUserResponse, CallRingEvent, CallSettingsResponse, CollectUserFeedbackRequest, CollectUserFeedbackResponse, DeleteCallRequest, DeleteCallResponse, EndCallResponse, GetCallReportResponse, GetCallResponse, GetCallSessionParticipantStatsDetailsResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, JoinCallResponse, KickUserRequest, KickUserResponse, ListRecordingsResponse, ListTranscriptionsResponse, MuteUsersResponse, PinRequest, PinResponse, QueryCallMembersRequest, QueryCallMembersResponse, QueryCallSessionParticipantStatsResponse, QueryCallSessionParticipantStatsTimelineResponse, QueryCallStatsMapResponse, RejectCallResponse, RequestPermissionRequest, RequestPermissionResponse, RingCallRequest, RingCallResponse, SendCallEventResponse, SendReactionRequest, SendReactionResponse, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartFrameRecordingRequest, StartFrameRecordingResponse, StartHLSBroadcastingResponse, StartRecordingRequest, StartRecordingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopFrameRecordingResponse, StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, StopRecordingResponse, StopRTMPBroadcastsResponse, StopTranscriptionResponse, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse } from './gen/coordinator';
5
5
  import { AudioTrackType, CallConstructor, CallLeaveOptions, ClientPublishOptions, ClosedCaptionsSettings, JoinCallData, TrackMuteType, VideoTrackType } from './types';
6
6
  import { ClientCapability, TrackType, VideoDimension } from './gen/video/sfu/models/models';
7
7
  import { Tracer } from './stats';
@@ -93,6 +93,8 @@ export declare class Call {
93
93
  private lastOfflineTimestamp;
94
94
  private networkAvailableTask;
95
95
  private trackPublishOrder;
96
+ private joinResponseTimeout?;
97
+ private rpcRequestTimeout?;
96
98
  private joinCallData?;
97
99
  private hasJoinedOnce;
98
100
  private deviceSettingsAppliedOnce;
@@ -228,8 +230,10 @@ export declare class Call {
228
230
  *
229
231
  * @returns a promise which resolves once the call join-flow has finished.
230
232
  */
231
- join: ({ maxJoinRetries, ...data }?: JoinCallData & {
233
+ join: ({ maxJoinRetries, joinResponseTimeout, rpcRequestTimeout, ...data }?: JoinCallData & {
232
234
  maxJoinRetries?: number;
235
+ joinResponseTimeout?: number;
236
+ rpcRequestTimeout?: number;
233
237
  }) => Promise<void>;
234
238
  /**
235
239
  * Will make a single attempt to watch for call related WebSocket events
@@ -692,6 +696,17 @@ export declare class Call {
692
696
  * @param custom Custom data
693
697
  */
694
698
  submitFeedback: (rating: number, { reason, custom, }?: Pick<CollectUserFeedbackRequest, "reason" | "custom">) => Promise<CollectUserFeedbackResponse>;
699
+ /**
700
+ * Retrieves the call stats for the current call session in a format suitable
701
+ * for displaying in map-like UIs.
702
+ */
703
+ getCallStatsMap: (params?: {
704
+ start_time?: Date | string;
705
+ end_time?: Date | string;
706
+ exclude_publishers?: boolean;
707
+ exclude_subscribers?: boolean;
708
+ exclude_sfus?: boolean;
709
+ }, callSessionId?: string | undefined) => Promise<QueryCallStatsMapResponse>;
695
710
  /**
696
711
  * Sends a custom event to all call participants.
697
712
  *
@@ -31,6 +31,11 @@ export type StreamSfuClientConstructor = {
31
31
  * Defaults to 5000ms.
32
32
  */
33
33
  joinResponseTimeout?: number;
34
+ /**
35
+ * The request timeout in milliseconds for RPC requests.
36
+ * Defaults to 5000ms.
37
+ */
38
+ rpcRequestTimeout?: number;
34
39
  /**
35
40
  * Callback for when the WebSocket connection is closed.
36
41
  */
@@ -137,7 +142,7 @@ export declare class StreamSfuClient {
137
142
  /**
138
143
  * Constructs a new SFU client.
139
144
  */
140
- constructor({ dispatcher, credentials, sessionId, cid, tag, joinResponseTimeout, onSignalClose, streamClient, enableTracing, }: StreamSfuClientConstructor);
145
+ constructor({ dispatcher, credentials, sessionId, cid, tag, joinResponseTimeout, rpcRequestTimeout, onSignalClose, streamClient, enableTracing, }: StreamSfuClientConstructor);
141
146
  private createWebSocket;
142
147
  get isHealthy(): boolean;
143
148
  get joinTask(): Promise<JoinResponse>;
@@ -1476,6 +1476,12 @@ export interface CallRecording {
1476
1476
  * @memberof CallRecording
1477
1477
  */
1478
1478
  filename: string;
1479
+ /**
1480
+ *
1481
+ * @type {string}
1482
+ * @memberof CallRecording
1483
+ */
1484
+ recording_type: string;
1479
1485
  /**
1480
1486
  *
1481
1487
  * @type {string}
@@ -2586,6 +2592,12 @@ export interface CallStatsLocation {
2586
2592
  * @memberof CallStatsLocation
2587
2593
  */
2588
2594
  country?: string;
2595
+ /**
2596
+ *
2597
+ * @type {string}
2598
+ * @memberof CallStatsLocation
2599
+ */
2600
+ country_iso_code?: string;
2589
2601
  /**
2590
2602
  *
2591
2603
  * @type {number}
@@ -2605,6 +2617,162 @@ export interface CallStatsLocation {
2605
2617
  */
2606
2618
  subdivision?: string;
2607
2619
  }
2620
+ /**
2621
+ *
2622
+ * @export
2623
+ * @interface CallStatsMapLocation
2624
+ */
2625
+ export interface CallStatsMapLocation {
2626
+ /**
2627
+ *
2628
+ * @type {number}
2629
+ * @memberof CallStatsMapLocation
2630
+ */
2631
+ count: number;
2632
+ /**
2633
+ *
2634
+ * @type {number}
2635
+ * @memberof CallStatsMapLocation
2636
+ */
2637
+ live_count: number;
2638
+ /**
2639
+ *
2640
+ * @type {CallStatsLocation}
2641
+ * @memberof CallStatsMapLocation
2642
+ */
2643
+ location?: CallStatsLocation;
2644
+ }
2645
+ /**
2646
+ *
2647
+ * @export
2648
+ * @interface CallStatsMapPublisher
2649
+ */
2650
+ export interface CallStatsMapPublisher {
2651
+ /**
2652
+ *
2653
+ * @type {boolean}
2654
+ * @memberof CallStatsMapPublisher
2655
+ */
2656
+ is_live: boolean;
2657
+ /**
2658
+ *
2659
+ * @type {CallStatsLocation}
2660
+ * @memberof CallStatsMapPublisher
2661
+ */
2662
+ location?: CallStatsLocation;
2663
+ /**
2664
+ *
2665
+ * @type {string}
2666
+ * @memberof CallStatsMapPublisher
2667
+ */
2668
+ name?: string;
2669
+ /**
2670
+ *
2671
+ * @type {PublishedTrackFlags}
2672
+ * @memberof CallStatsMapPublisher
2673
+ */
2674
+ published_tracks: PublishedTrackFlags;
2675
+ /**
2676
+ *
2677
+ * @type {string}
2678
+ * @memberof CallStatsMapPublisher
2679
+ */
2680
+ publisher_type?: string;
2681
+ /**
2682
+ *
2683
+ * @type {string}
2684
+ * @memberof CallStatsMapPublisher
2685
+ */
2686
+ user_id: string;
2687
+ /**
2688
+ *
2689
+ * @type {string}
2690
+ * @memberof CallStatsMapPublisher
2691
+ */
2692
+ user_session_id: string;
2693
+ }
2694
+ /**
2695
+ *
2696
+ * @export
2697
+ * @interface CallStatsMapPublishers
2698
+ */
2699
+ export interface CallStatsMapPublishers {
2700
+ /**
2701
+ *
2702
+ * @type {Array<CallStatsMapPublisher>}
2703
+ * @memberof CallStatsMapPublishers
2704
+ */
2705
+ publishers: Array<CallStatsMapPublisher>;
2706
+ }
2707
+ /**
2708
+ *
2709
+ * @export
2710
+ * @interface CallStatsMapSFUs
2711
+ */
2712
+ export interface CallStatsMapSFUs {
2713
+ /**
2714
+ *
2715
+ * @type {Array<SFULocationResponse>}
2716
+ * @memberof CallStatsMapSFUs
2717
+ */
2718
+ locations: Array<SFULocationResponse>;
2719
+ }
2720
+ /**
2721
+ *
2722
+ * @export
2723
+ * @interface CallStatsMapSubscriber
2724
+ */
2725
+ export interface CallStatsMapSubscriber {
2726
+ /**
2727
+ *
2728
+ * @type {boolean}
2729
+ * @memberof CallStatsMapSubscriber
2730
+ */
2731
+ is_live: boolean;
2732
+ /**
2733
+ *
2734
+ * @type {CallStatsLocation}
2735
+ * @memberof CallStatsMapSubscriber
2736
+ */
2737
+ location?: CallStatsLocation;
2738
+ /**
2739
+ *
2740
+ * @type {string}
2741
+ * @memberof CallStatsMapSubscriber
2742
+ */
2743
+ name?: string;
2744
+ /**
2745
+ *
2746
+ * @type {string}
2747
+ * @memberof CallStatsMapSubscriber
2748
+ */
2749
+ user_id: string;
2750
+ /**
2751
+ *
2752
+ * @type {string}
2753
+ * @memberof CallStatsMapSubscriber
2754
+ */
2755
+ user_session_id: string;
2756
+ }
2757
+ /**
2758
+ *
2759
+ * @export
2760
+ * @interface CallStatsMapSubscribers
2761
+ */
2762
+ export interface CallStatsMapSubscribers {
2763
+ /**
2764
+ *
2765
+ * @type {Array<CallStatsMapLocation>}
2766
+ * @memberof CallStatsMapSubscribers
2767
+ */
2768
+ locations: Array<CallStatsMapLocation>;
2769
+ /**
2770
+ *
2771
+ * @type {Array<CallStatsMapSubscriber>}
2772
+ * @memberof CallStatsMapSubscribers
2773
+ */
2774
+ participants?: Array<CallStatsMapSubscriber>;
2775
+ }
2608
2776
  /**
2609
2777
  *
2610
2778
  * @export
@@ -3452,6 +3620,25 @@ export interface ConnectionErrorEvent {
3452
3620
  */
3453
3621
  type: string;
3454
3622
  }
3623
+ /**
3624
+ *
3625
+ * @export
3626
+ * @interface Coordinates
3627
+ */
3628
+ export interface Coordinates {
3629
+ /**
3630
+ *
3631
+ * @type {number}
3632
+ * @memberof Coordinates
3633
+ */
3634
+ latitude: number;
3635
+ /**
3636
+ *
3637
+ * @type {number}
3638
+ * @memberof Coordinates
3639
+ */
3640
+ longitude: number;
3641
+ }
3455
3642
  /**
3456
3643
  *
3457
3644
  * @export
@@ -4008,6 +4195,88 @@ export interface EndCallResponse {
4008
4195
  */
4009
4196
  duration: string;
4010
4197
  }
4198
+ /**
4199
+ *
4200
+ * @export
4201
+ * @interface FeedsPreferencesResponse
4202
+ */
4203
+ export interface FeedsPreferencesResponse {
4204
+ /**
4205
+ *
4206
+ * @type {string}
4207
+ * @memberof FeedsPreferencesResponse
4208
+ */
4209
+ comment?: string;
4210
+ /**
4211
+ *
4212
+ * @type {string}
4213
+ * @memberof FeedsPreferencesResponse
4214
+ */
4215
+ comment_reaction?: string;
4216
+ /**
4217
+ *
4218
+ * @type {{ [key: string]: string; }}
4219
+ * @memberof FeedsPreferencesResponse
4220
+ */
4221
+ custom_activity_types?: {
4222
+ [key: string]: string;
4223
+ };
4224
+ /**
4225
+ *
4226
+ * @type {string}
4227
+ * @memberof FeedsPreferencesResponse
4228
+ */
4229
+ follow?: string;
4230
+ /**
4231
+ *
4232
+ * @type {string}
4233
+ * @memberof FeedsPreferencesResponse
4234
+ */
4235
+ mention?: string;
4236
+ /**
4237
+ *
4238
+ * @type {string}
4239
+ * @memberof FeedsPreferencesResponse
4240
+ */
4241
+ reaction?: string;
4242
+ }
4243
+ /**
4244
+ *
4245
+ * @export
4246
+ * @interface FileUploadConfig
4247
+ */
4248
+ export interface FileUploadConfig {
4249
+ /**
4250
+ *
4251
+ * @type {Array<string>}
4252
+ * @memberof FileUploadConfig
4253
+ */
4254
+ allowed_file_extensions: Array<string>;
4255
+ /**
4256
+ *
4257
+ * @type {Array<string>}
4258
+ * @memberof FileUploadConfig
4259
+ */
4260
+ allowed_mime_types: Array<string>;
4261
+ /**
4262
+ *
4263
+ * @type {Array<string>}
4264
+ * @memberof FileUploadConfig
4265
+ */
4266
+ blocked_file_extensions: Array<string>;
4267
+ /**
4268
+ *
4269
+ * @type {Array<string>}
4270
+ * @memberof FileUploadConfig
4271
+ */
4272
+ blocked_mime_types: Array<string>;
4273
+ /**
4274
+ *
4275
+ * @type {number}
4276
+ * @memberof FileUploadConfig
4277
+ */
4278
+ size_limit: number;
4279
+ }
4011
4280
  /**
4012
4281
  *
4013
4282
  * @export
@@ -5211,6 +5480,31 @@ export interface ListTranscriptionsResponse {
5211
5480
  */
5212
5481
  transcriptions: Array<CallTranscription>;
5213
5482
  }
5483
+ /**
5484
+ *
5485
+ * @export
5486
+ * @interface Location
5487
+ */
5488
+ export interface Location {
5489
+ /**
5490
+ *
5491
+ * @type {string}
5492
+ * @memberof Location
5493
+ */
5494
+ continent_code: string;
5495
+ /**
5496
+ *
5497
+ * @type {string}
5498
+ * @memberof Location
5499
+ */
5500
+ country_iso_code: string;
5501
+ /**
5502
+ *
5503
+ * @type {string}
5504
+ * @memberof Location
5505
+ */
5506
+ subdivision_iso_code: string;
5507
+ }
5214
5508
  /**
5215
5509
  * MemberRequest is the payload for adding a member to a call.
5216
5510
  * @export
@@ -5600,10 +5894,10 @@ export interface OwnUserResponse {
5600
5894
  privacy_settings?: object;
5601
5895
  /**
5602
5896
  *
5603
- * @type {PushPreferences}
5897
+ * @type {PushPreferencesResponse}
5604
5898
  * @memberof OwnUserResponse
5605
5899
  */
5606
- push_preferences?: PushPreferences;
5900
+ push_preferences?: PushPreferencesResponse;
5607
5901
  /**
5608
5902
  *
5609
5903
  * @type {string}
@@ -6160,27 +6454,39 @@ export interface PublisherStatsResponse {
6160
6454
  /**
6161
6455
  *
6162
6456
  * @export
6163
- * @interface PushPreferences
6457
+ * @interface PushPreferencesResponse
6164
6458
  */
6165
- export interface PushPreferences {
6459
+ export interface PushPreferencesResponse {
6166
6460
  /**
6167
6461
  *
6168
6462
  * @type {string}
6169
- * @memberof PushPreferences
6463
+ * @memberof PushPreferencesResponse
6170
6464
  */
6171
6465
  call_level?: string;
6172
6466
  /**
6173
6467
  *
6174
6468
  * @type {string}
6175
- * @memberof PushPreferences
6469
+ * @memberof PushPreferencesResponse
6176
6470
  */
6177
6471
  chat_level?: string;
6178
6472
  /**
6179
6473
  *
6180
6474
  * @type {string}
6181
- * @memberof PushPreferences
6475
+ * @memberof PushPreferencesResponse
6182
6476
  */
6183
6477
  disabled_until?: string;
6478
+ /**
6479
+ *
6480
+ * @type {string}
6481
+ * @memberof PushPreferencesResponse
6482
+ */
6483
+ feeds_level?: string;
6484
+ /**
6485
+ *
6486
+ * @type {FeedsPreferencesResponse}
6487
+ * @memberof PushPreferencesResponse
6488
+ */
6489
+ feeds_preferences?: FeedsPreferencesResponse;
6184
6490
  }
6185
6491
  /**
6186
6492
  *
@@ -6556,6 +6862,97 @@ export interface QueryCallSessionParticipantStatsTimelineResponse {
6556
6862
  */
6557
6863
  user_session_id: string;
6558
6864
  }
6865
+ /**
6866
+ * Basic response information
6867
+ * @export
6868
+ * @interface QueryCallStatsMapResponse
6869
+ */
6870
+ export interface QueryCallStatsMapResponse {
6871
+ /**
6872
+ *
6873
+ * @type {string}
6874
+ * @memberof QueryCallStatsMapResponse
6875
+ */
6876
+ call_ended_at?: string;
6877
+ /**
6878
+ *
6879
+ * @type {string}
6880
+ * @memberof QueryCallStatsMapResponse
6881
+ */
6882
+ call_id: string;
6883
+ /**
6884
+ *
6885
+ * @type {string}
6886
+ * @memberof QueryCallStatsMapResponse
6887
+ */
6888
+ call_session_id: string;
6889
+ /**
6890
+ *
6891
+ * @type {string}
6892
+ * @memberof QueryCallStatsMapResponse
6893
+ */
6894
+ call_started_at?: string;
6895
+ /**
6896
+ *
6897
+ * @type {string}
6898
+ * @memberof QueryCallStatsMapResponse
6899
+ */
6900
+ call_type: string;
6901
+ /**
6902
+ *
6903
+ * @type {CallStatsParticipantCounts}
6904
+ * @memberof QueryCallStatsMapResponse
6905
+ */
6906
+ counts: CallStatsParticipantCounts;
6907
+ /**
6908
+ *
6909
+ * @type {string}
6910
+ * @memberof QueryCallStatsMapResponse
6911
+ */
6912
+ data_source?: string;
6913
+ /**
6914
+ * Duration of the request in milliseconds
6915
+ * @type {string}
6916
+ * @memberof QueryCallStatsMapResponse
6917
+ */
6918
+ duration: string;
6919
+ /**
6920
+ *
6921
+ * @type {string}
6922
+ * @memberof QueryCallStatsMapResponse
6923
+ */
6924
+ end_time?: string;
6925
+ /**
6926
+ *
6927
+ * @type {string}
6928
+ * @memberof QueryCallStatsMapResponse
6929
+ */
6930
+ generated_at?: string;
6931
+ /**
6932
+ *
6933
+ * @type {CallStatsMapPublishers}
6934
+ * @memberof QueryCallStatsMapResponse
6935
+ */
6936
+ publishers?: CallStatsMapPublishers;
6937
+ /**
6938
+ *
6939
+ * @type {CallStatsMapSFUs}
6940
+ * @memberof QueryCallStatsMapResponse
6941
+ */
6942
+ sfus?: CallStatsMapSFUs;
6943
+ /**
6944
+ *
6945
+ * @type {string}
6946
+ * @memberof QueryCallStatsMapResponse
6947
+ */
6948
+ start_time?: string;
6949
+ /**
6950
+ *
6951
+ * @type {CallStatsMapSubscribers}
6952
+ * @memberof QueryCallStatsMapResponse
6953
+ */
6954
+ subscribers?: CallStatsMapSubscribers;
6955
+ }
6559
6956
  /**
6560
6957
  *
6561
6958
  * @export
@@ -7237,6 +7634,37 @@ export interface SDKUsageReportResponse {
7237
7634
  */
7238
7635
  daily: Array<DailyAggregateSDKUsageReportResponse>;
7239
7636
  }
7637
+ /**
7638
+ *
7639
+ * @export
7640
+ * @interface SFULocationResponse
7641
+ */
7642
+ export interface SFULocationResponse {
7643
+ /**
7644
+ *
7645
+ * @type {Coordinates}
7646
+ * @memberof SFULocationResponse
7647
+ */
7648
+ coordinates: Coordinates;
7649
+ /**
7650
+ *
7651
+ * @type {string}
7652
+ * @memberof SFULocationResponse
7653
+ */
7654
+ datacenter: string;
7655
+ /**
7656
+ *
7657
+ * @type {string}
7658
+ * @memberof SFULocationResponse
7659
+ */
7660
+ id: string;
7661
+ /**
7662
+ *
7663
+ * @type {Location}
7664
+ * @memberof SFULocationResponse
7665
+ */
7666
+ location: Location;
7667
+ }
7240
7668
  /**
7241
7669
  *
7242
7670
  * @export
@@ -7487,6 +7915,12 @@ export interface SIPInboundRoutingRuleResponse {
7487
7915
  * @memberof SIPInboundRoutingRuleResponse
7488
7916
  */
7489
7917
  caller_numbers?: Array<string>;
7918
+ /**
7919
+ * Creation timestamp
7920
+ * @type {string}
7921
+ * @memberof SIPInboundRoutingRuleResponse
7922
+ */
7923
+ created_at: string;
7490
7924
  /**
7491
7925
  *
7492
7926
  * @type {SIPDirectRoutingRuleCallConfigsResponse}
@@ -7530,11 +7964,11 @@ export interface SIPInboundRoutingRuleResponse {
7530
7964
  */
7531
7965
  trunk_ids: Array<string>;
7532
7966
  /**
7533
- *
7534
- * @type {object}
7967
+ * Last update timestamp
7968
+ * @type {string}
7535
7969
  * @memberof SIPInboundRoutingRuleResponse
7536
7970
  */
7537
- updated_at: object;
7971
+ updated_at: string;
7538
7972
  }
7539
7973
  /**
7540
7974
  * PIN protection configuration response
@@ -7574,11 +8008,11 @@ export interface SIPPinProtectionConfigsResponse {
7574
8008
  */
7575
8009
  export interface SIPTrunkResponse {
7576
8010
  /**
7577
- *
7578
- * @type {object}
8011
+ * Creation timestamp
8012
+ * @type {string}
7579
8013
  * @memberof SIPTrunkResponse
7580
8014
  */
7581
- created_at: object;
8015
+ created_at: string;
7582
8016
  /**
7583
8017
  * Unique identifier for the SIP trunk
7584
8018
  * @type {string}
@@ -7604,11 +8038,11 @@ export interface SIPTrunkResponse {
7604
8038
  */
7605
8039
  password: string;
7606
8040
  /**
7607
- *
7608
- * @type {object}
8041
+ * Last update timestamp
8042
+ * @type {string}
7609
8043
  * @memberof SIPTrunkResponse
7610
8044
  */
7611
- updated_at: object;
8045
+ updated_at: string;
7612
8046
  /**
7613
8047
  * The URI for the SIP trunk
7614
8048
  * @type {string}
@@ -5,7 +5,9 @@ import type { Trace } from '../stats';
5
5
  import type { ScopedLogger } from '../logger';
6
6
  import type { LogLevel } from '@stream-io/logger';
7
7
  export declare const withHeaders: (headers: Record<string, string>) => RpcInterceptor;
8
- export declare const withRequestLogger: (logger: ScopedLogger, level: LogLevel) => RpcInterceptor;
8
+ export declare const TIMEOUT_SYMBOL = "@@stream-io/timeout";
9
+ export declare const withTimeout: (timeoutMs: number, trace?: Trace) => RpcInterceptor;
10
+ export declare const withRequestLogger: (logger: ScopedLogger, level?: LogLevel) => RpcInterceptor;
9
11
  export declare const withRequestTracer: (trace: Trace) => RpcInterceptor;
10
12
  /**
11
13
  * Creates new SignalServerClient instance.
@@ -1,5 +1,6 @@
1
1
  import { FinishedUnaryCall, UnaryCall } from '@protobuf-ts/runtime-rpc';
2
2
  import { Error as SfuError } from '../gen/video/sfu/models/models';
3
+ import type { RpcInvocationMeta } from './types';
3
4
  /**
4
5
  * An internal interface which asserts that "retryable" SFU responses
5
6
  * contain a field called "error".
@@ -19,5 +20,6 @@ export interface SfuResponseWithError {
19
20
  *
20
21
  * @param rpc the closure around the RPC call to execute.
21
22
  * @param signal the signal to abort the RPC call and retries loop.
23
+ * @param maxRetries the maximum number of retries to perform. Defaults to `Number.POSITIVE_INFINITY`.
22
24
  */
23
- export declare const retryable: <I extends object, O extends SfuResponseWithError>(rpc: () => UnaryCall<I, O>, signal?: AbortSignal) => Promise<FinishedUnaryCall<I, O>>;
25
+ export declare const retryable: <I extends object, O extends SfuResponseWithError>(rpc: (invocationMeta: RpcInvocationMeta) => UnaryCall<I, O>, signal?: AbortSignal, maxRetries?: number) => Promise<FinishedUnaryCall<I, O>>;
@@ -0,0 +1,8 @@
1
+ export type RpcInvocationMeta = {
2
+ attempt: number;
3
+ };
4
+ declare module '@protobuf-ts/runtime-rpc' {
5
+ interface RpcOptions {
6
+ invocationMeta?: RpcInvocationMeta;
7
+ }
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-client",
3
- "version": "1.39.2",
3
+ "version": "1.40.0",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.es.js",
6
6
  "browser": "dist/index.browser.es.js",