@stream-io/node-sdk 0.7.25 → 0.7.27

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.
@@ -2384,6 +2384,56 @@ export interface CallStatsLocation {
2384
2384
  subdivision?: string;
2385
2385
  }
2386
2386
 
2387
+ export interface CallStatsMapLocation {
2388
+ count: number;
2389
+
2390
+ live_count: number;
2391
+
2392
+ location?: CallStatsLocation;
2393
+ }
2394
+
2395
+ export interface CallStatsMapPublisher {
2396
+ is_live: boolean;
2397
+
2398
+ user_id: string;
2399
+
2400
+ user_session_id: string;
2401
+
2402
+ published_tracks: PublishedTrackFlags;
2403
+
2404
+ name?: string;
2405
+
2406
+ publisher_type?: string;
2407
+
2408
+ location?: CallStatsLocation;
2409
+ }
2410
+
2411
+ export interface CallStatsMapPublishers {
2412
+ publishers: CallStatsMapPublisher[];
2413
+ }
2414
+
2415
+ export interface CallStatsMapSFUs {
2416
+ locations: SFULocationResponse[];
2417
+ }
2418
+
2419
+ export interface CallStatsMapSubscriber {
2420
+ is_live: boolean;
2421
+
2422
+ user_id: string;
2423
+
2424
+ user_session_id: string;
2425
+
2426
+ name?: string;
2427
+
2428
+ location?: CallStatsLocation;
2429
+ }
2430
+
2431
+ export interface CallStatsMapSubscribers {
2432
+ locations: CallStatsMapLocation[];
2433
+
2434
+ participants?: CallStatsMapSubscriber[];
2435
+ }
2436
+
2387
2437
  export interface CallStatsParticipant {
2388
2438
  user_id: string;
2389
2439
 
@@ -4039,6 +4089,12 @@ export interface ContentCountRuleParameters {
4039
4089
  time_window?: string;
4040
4090
  }
4041
4091
 
4092
+ export interface Coordinates {
4093
+ latitude: number;
4094
+
4095
+ longitude: number;
4096
+ }
4097
+
4042
4098
  export interface CountByMinuteResponse {
4043
4099
  count: number;
4044
4100
 
@@ -4786,6 +4842,18 @@ export interface DeleteFeedViewResponse {
4786
4842
  duration: string;
4787
4843
  }
4788
4844
 
4845
+ export interface DeleteFeedsBatchRequest {
4846
+ feeds: string[];
4847
+
4848
+ hard_delete?: boolean;
4849
+ }
4850
+
4851
+ export interface DeleteFeedsBatchResponse {
4852
+ duration: string;
4853
+
4854
+ task_id: string;
4855
+ }
4856
+
4789
4857
  export interface DeleteMessageRequest {
4790
4858
  hard_delete?: boolean;
4791
4859
 
@@ -5140,6 +5208,44 @@ export interface EnrichedReaction {
5140
5208
  user?: Data;
5141
5209
  }
5142
5210
 
5211
+ export interface EnrichmentOptions {
5212
+ skip_activity?: boolean;
5213
+
5214
+ skip_activity_collections?: boolean;
5215
+
5216
+ skip_activity_comments?: boolean;
5217
+
5218
+ skip_activity_current_feed?: boolean;
5219
+
5220
+ skip_activity_mentioned_users?: boolean;
5221
+
5222
+ skip_activity_own_bookmarks?: boolean;
5223
+
5224
+ skip_activity_parents?: boolean;
5225
+
5226
+ skip_activity_poll?: boolean;
5227
+
5228
+ skip_activity_reactions?: boolean;
5229
+
5230
+ skip_activity_refresh_image_urls?: boolean;
5231
+
5232
+ skip_all?: boolean;
5233
+
5234
+ skip_feed_member_user?: boolean;
5235
+
5236
+ skip_followers?: boolean;
5237
+
5238
+ skip_following?: boolean;
5239
+
5240
+ skip_own_capabilities?: boolean;
5241
+
5242
+ skip_own_followings?: boolean;
5243
+
5244
+ skip_own_follows?: boolean;
5245
+
5246
+ skip_pins?: boolean;
5247
+ }
5248
+
5143
5249
  export interface EntityCreatorResponse {
5144
5250
  ban_count: number;
5145
5251
 
@@ -5614,6 +5720,16 @@ export const FeedOwnCapability = {
5614
5720
  export type FeedOwnCapability =
5615
5721
  (typeof FeedOwnCapability)[keyof typeof FeedOwnCapability];
5616
5722
 
5723
+ export interface FeedOwnData {
5724
+ own_capabilities?: FeedOwnCapability[];
5725
+
5726
+ own_followings?: FollowResponse[];
5727
+
5728
+ own_follows?: FollowResponse[];
5729
+
5730
+ own_membership?: FeedMemberResponse;
5731
+ }
5732
+
5617
5733
  export interface FeedRequest {
5618
5734
  feed_group_id: string;
5619
5735
 
@@ -5635,6 +5751,8 @@ export interface FeedRequest {
5635
5751
  }
5636
5752
 
5637
5753
  export interface FeedResponse {
5754
+ activity_count: number;
5755
+
5638
5756
  created_at: Date;
5639
5757
 
5640
5758
  description: string;
@@ -5667,6 +5785,8 @@ export interface FeedResponse {
5667
5785
 
5668
5786
  own_capabilities?: FeedOwnCapability[];
5669
5787
 
5788
+ own_followings?: FollowResponse[];
5789
+
5670
5790
  own_follows?: FollowResponse[];
5671
5791
 
5672
5792
  custom?: Record<string, any>;
@@ -5675,6 +5795,8 @@ export interface FeedResponse {
5675
5795
  }
5676
5796
 
5677
5797
  export interface FeedSuggestionResponse {
5798
+ activity_count: number;
5799
+
5678
5800
  created_at: Date;
5679
5801
 
5680
5802
  description: string;
@@ -5711,6 +5833,8 @@ export interface FeedSuggestionResponse {
5711
5833
 
5712
5834
  own_capabilities?: FeedOwnCapability[];
5713
5835
 
5836
+ own_followings?: FollowResponse[];
5837
+
5714
5838
  own_follows?: FollowResponse[];
5715
5839
 
5716
5840
  algorithm_scores?: Record<string, number>;
@@ -5989,6 +6113,8 @@ export interface FollowBatchRequest {
5989
6113
  export interface FollowBatchResponse {
5990
6114
  duration: string;
5991
6115
 
6116
+ created: FollowResponse[];
6117
+
5992
6118
  follows: FollowResponse[];
5993
6119
  }
5994
6120
 
@@ -6630,6 +6756,8 @@ export interface GetOrCreateFeedRequest {
6630
6756
 
6631
6757
  data?: FeedInput;
6632
6758
 
6759
+ enrichment_options?: EnrichmentOptions;
6760
+
6633
6761
  external_ranking?: Record<string, any>;
6634
6762
 
6635
6763
  filter?: Record<string, any>;
@@ -7330,6 +7458,14 @@ export interface ListTranscriptionsResponse {
7330
7458
  transcriptions: CallTranscription[];
7331
7459
  }
7332
7460
 
7461
+ export interface Location {
7462
+ continent_code: string;
7463
+
7464
+ country_iso_code: string;
7465
+
7466
+ subdivision_iso_code: string;
7467
+ }
7468
+
7333
7469
  export interface MarkActivityRequest {
7334
7470
  mark_all_read?: boolean;
7335
7471
 
@@ -8584,18 +8720,20 @@ export interface OverviewDashboardConfig {
8584
8720
  visible_charts?: string[];
8585
8721
  }
8586
8722
 
8587
- export interface OwnCapabilitiesBatchRequest {
8723
+ export interface OwnBatchRequest {
8588
8724
  feeds: string[];
8589
8725
 
8590
8726
  user_id?: string;
8591
8727
 
8728
+ fields?: string[];
8729
+
8592
8730
  user?: UserRequest;
8593
8731
  }
8594
8732
 
8595
- export interface OwnCapabilitiesBatchResponse {
8733
+ export interface OwnBatchResponse {
8596
8734
  duration: string;
8597
8735
 
8598
- capabilities: Record<string, FeedOwnCapability[]>;
8736
+ data: Record<string, FeedOwnData>;
8599
8737
  }
8600
8738
 
8601
8739
  export const OwnCapability = {
@@ -9722,6 +9860,36 @@ export interface QueryCallSessionParticipantStatsTimelineResponse {
9722
9860
  events: CallParticipantTimeline[];
9723
9861
  }
9724
9862
 
9863
+ export interface QueryCallStatsMapResponse {
9864
+ call_id: string;
9865
+
9866
+ call_session_id: string;
9867
+
9868
+ call_type: string;
9869
+
9870
+ duration: string;
9871
+
9872
+ counts: CallStatsParticipantCounts;
9873
+
9874
+ call_ended_at?: Date;
9875
+
9876
+ call_started_at?: Date;
9877
+
9878
+ data_source?: string;
9879
+
9880
+ end_time?: Date;
9881
+
9882
+ generated_at?: Date;
9883
+
9884
+ start_time?: Date;
9885
+
9886
+ publishers?: CallStatsMapPublishers;
9887
+
9888
+ sfus?: CallStatsMapSFUs;
9889
+
9890
+ subscribers?: CallStatsMapSubscribers;
9891
+ }
9892
+
9725
9893
  export interface QueryCallStatsRequest {
9726
9894
  limit?: number;
9727
9895
 
@@ -11150,6 +11318,18 @@ export interface SDKUsageReportResponse {
11150
11318
  daily: DailyAggregateSDKUsageReportResponse[];
11151
11319
  }
11152
11320
 
11321
+ export interface SFULocationResponse {
11322
+ datacenter: string;
11323
+
11324
+ id: string;
11325
+
11326
+ coordinates: Coordinates;
11327
+
11328
+ location: Location;
11329
+
11330
+ count?: number;
11331
+ }
11332
+
11153
11333
  export interface SIPCallConfigsRequest {
11154
11334
  custom_data?: Record<string, any>;
11155
11335
  }
@@ -44,6 +44,7 @@ import {
44
44
  QueryCallParticipantsResponse,
45
45
  QueryCallSessionParticipantStatsResponse,
46
46
  QueryCallSessionParticipantStatsTimelineResponse,
47
+ QueryCallStatsMapResponse,
47
48
  QueryCallStatsRequest,
48
49
  QueryCallStatsResponse,
49
50
  QueryCallsRequest,
@@ -1256,6 +1257,43 @@ export class VideoApi {
1256
1257
  return { ...response.body, metadata: response.metadata };
1257
1258
  }
1258
1259
 
1260
+ async getCallStatsMap(request: {
1261
+ call_type: string;
1262
+ call_id: string;
1263
+ session: string;
1264
+ start_time?: Date;
1265
+ end_time?: Date;
1266
+ exclude_publishers?: boolean;
1267
+ exclude_subscribers?: boolean;
1268
+ exclude_sfus?: boolean;
1269
+ }): Promise<StreamResponse<QueryCallStatsMapResponse>> {
1270
+ const queryParams = {
1271
+ start_time: request?.start_time,
1272
+ end_time: request?.end_time,
1273
+ exclude_publishers: request?.exclude_publishers,
1274
+ exclude_subscribers: request?.exclude_subscribers,
1275
+ exclude_sfus: request?.exclude_sfus,
1276
+ };
1277
+ const pathParams = {
1278
+ call_type: request?.call_type,
1279
+ call_id: request?.call_id,
1280
+ session: request?.session,
1281
+ };
1282
+
1283
+ const response = await this.apiClient.sendRequest<
1284
+ StreamResponse<QueryCallStatsMapResponse>
1285
+ >(
1286
+ 'GET',
1287
+ '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/map',
1288
+ pathParams,
1289
+ queryParams,
1290
+ );
1291
+
1292
+ decoders.QueryCallStatsMapResponse?.(response.body);
1293
+
1294
+ return { ...response.body, metadata: response.metadata };
1295
+ }
1296
+
1259
1297
  async getCallSessionParticipantStatsDetails(request: {
1260
1298
  call_type: string;
1261
1299
  call_id: string;