@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.
@@ -1,5 +1,5 @@
1
1
  import { FeedsApi } from './gen/feeds/FeedsApi';
2
- import { AddReactionRequest, QueryFeedsRequest } from './gen/models';
2
+ import { AddReactionRequest, FollowBatchRequest, QueryFeedsRequest, UnfollowBatchRequest } from './gen/models';
3
3
  import { StreamFeed } from './StreamFeed';
4
4
  export declare class StreamFeedsClient extends FeedsApi {
5
5
  feed: (group: string, id: string) => StreamFeed;
@@ -10,4 +10,12 @@ export declare class StreamFeedsClient extends FeedsApi {
10
10
  addReaction: (request: AddReactionRequest & {
11
11
  activity_id: string;
12
12
  }) => Promise<import("./types").StreamResponse<import("./gen/models").AddReactionResponse>>;
13
+ /**
14
+ * @deprecated use `getOrCreateFollows` instead
15
+ */
16
+ followBatch: (request: FollowBatchRequest) => Promise<import("./types").StreamResponse<import("./gen/models").FollowBatchResponse>>;
17
+ /**
18
+ * @deprecated use `getOrCreateUnfollows` instead
19
+ */
20
+ followUnbatch: (request: UnfollowBatchRequest) => Promise<import("./types").StreamResponse<import("./gen/models").UnfollowBatchResponse>>;
13
21
  }
@@ -1,5 +1,5 @@
1
1
  import { ApiClient, StreamResponse } from '../../gen-imports';
2
- import { AcceptFeedMemberInviteRequest, AcceptFeedMemberInviteResponse, AcceptFollowRequest, AcceptFollowResponse, ActivityFeedbackRequest, ActivityFeedbackResponse, AddActivityRequest, AddActivityResponse, AddBookmarkRequest, AddBookmarkResponse, AddCommentReactionRequest, AddCommentReactionResponse, AddCommentRequest, AddCommentResponse, AddCommentsBatchRequest, AddCommentsBatchResponse, AddReactionRequest, AddReactionResponse, CastPollVoteRequest, CreateCollectionsRequest, CreateCollectionsResponse, CreateFeedGroupRequest, CreateFeedGroupResponse, CreateFeedViewRequest, CreateFeedViewResponse, CreateFeedsBatchRequest, CreateFeedsBatchResponse, CreateMembershipLevelRequest, CreateMembershipLevelResponse, DeleteActivitiesRequest, DeleteActivitiesResponse, DeleteActivityReactionResponse, DeleteActivityResponse, DeleteBookmarkFolderResponse, DeleteBookmarkResponse, DeleteCollectionsResponse, DeleteCommentReactionResponse, DeleteCommentResponse, DeleteFeedGroupResponse, DeleteFeedResponse, DeleteFeedUserDataRequest, DeleteFeedUserDataResponse, DeleteFeedViewResponse, ExportFeedUserDataResponse, FollowBatchRequest, FollowBatchResponse, FollowRequest, GetActivityResponse, GetCommentRepliesResponse, GetCommentResponse, GetCommentsResponse, GetFeedGroupResponse, GetFeedViewResponse, GetFeedVisibilityResponse, GetFeedsRateLimitsResponse, GetFollowSuggestionsResponse, GetOrCreateFeedGroupRequest, GetOrCreateFeedGroupResponse, GetOrCreateFeedRequest, GetOrCreateFeedResponse, GetOrCreateFeedViewRequest, GetOrCreateFeedViewResponse, ListFeedGroupsResponse, ListFeedViewsResponse, ListFeedVisibilitiesResponse, MarkActivityRequest, OwnCapabilitiesBatchRequest, OwnCapabilitiesBatchResponse, PinActivityRequest, PinActivityResponse, PollVoteResponse, QueryActivitiesRequest, QueryActivitiesResponse, QueryActivityReactionsRequest, QueryActivityReactionsResponse, QueryBookmarkFoldersRequest, QueryBookmarkFoldersResponse, QueryBookmarksRequest, QueryBookmarksResponse, QueryCommentReactionsRequest, QueryCommentReactionsResponse, QueryCommentsRequest, QueryCommentsResponse, QueryFeedMembersRequest, QueryFeedMembersResponse, QueryFeedsRequest, QueryFeedsResponse, QueryFeedsUsageStatsRequest, QueryFeedsUsageStatsResponse, QueryFollowsRequest, QueryFollowsResponse, QueryMembershipLevelsRequest, QueryMembershipLevelsResponse, ReadCollectionsResponse, RejectFeedMemberInviteRequest, RejectFeedMemberInviteResponse, RejectFollowRequest, RejectFollowResponse, Response, SingleFollowResponse, UnfollowBatchRequest, UnfollowBatchResponse, UnfollowResponse, UnpinActivityResponse, UpdateActivityPartialRequest, UpdateActivityPartialResponse, UpdateActivityRequest, UpdateActivityResponse, UpdateBookmarkFolderRequest, UpdateBookmarkFolderResponse, UpdateBookmarkRequest, UpdateBookmarkResponse, UpdateCollectionsRequest, UpdateCollectionsResponse, UpdateCommentRequest, UpdateCommentResponse, UpdateFeedGroupRequest, UpdateFeedGroupResponse, UpdateFeedMembersRequest, UpdateFeedMembersResponse, UpdateFeedRequest, UpdateFeedResponse, UpdateFeedViewRequest, UpdateFeedViewResponse, UpdateFeedVisibilityRequest, UpdateFeedVisibilityResponse, UpdateFollowRequest, UpdateFollowResponse, UpdateMembershipLevelRequest, UpdateMembershipLevelResponse, UpsertActivitiesRequest, UpsertActivitiesResponse, UpsertCollectionsRequest, UpsertCollectionsResponse } from '../models';
2
+ import { AcceptFeedMemberInviteRequest, AcceptFeedMemberInviteResponse, AcceptFollowRequest, AcceptFollowResponse, ActivityFeedbackRequest, ActivityFeedbackResponse, AddActivityRequest, AddActivityResponse, AddBookmarkRequest, AddBookmarkResponse, AddCommentReactionRequest, AddCommentReactionResponse, AddCommentRequest, AddCommentResponse, AddCommentsBatchRequest, AddCommentsBatchResponse, AddReactionRequest, AddReactionResponse, CastPollVoteRequest, CreateCollectionsRequest, CreateCollectionsResponse, CreateFeedGroupRequest, CreateFeedGroupResponse, CreateFeedViewRequest, CreateFeedViewResponse, CreateFeedsBatchRequest, CreateFeedsBatchResponse, CreateMembershipLevelRequest, CreateMembershipLevelResponse, DeleteActivitiesRequest, DeleteActivitiesResponse, DeleteActivityReactionResponse, DeleteActivityResponse, DeleteBookmarkFolderResponse, DeleteBookmarkResponse, DeleteCollectionsResponse, DeleteCommentReactionResponse, DeleteCommentResponse, DeleteFeedGroupResponse, DeleteFeedResponse, DeleteFeedUserDataRequest, DeleteFeedUserDataResponse, DeleteFeedViewResponse, DeleteFeedsBatchRequest, DeleteFeedsBatchResponse, ExportFeedUserDataResponse, FollowBatchRequest, FollowBatchResponse, FollowRequest, GetActivityResponse, GetCommentRepliesResponse, GetCommentResponse, GetCommentsResponse, GetFeedGroupResponse, GetFeedViewResponse, GetFeedVisibilityResponse, GetFeedsRateLimitsResponse, GetFollowSuggestionsResponse, GetOrCreateFeedGroupRequest, GetOrCreateFeedGroupResponse, GetOrCreateFeedRequest, GetOrCreateFeedResponse, GetOrCreateFeedViewRequest, GetOrCreateFeedViewResponse, ListFeedGroupsResponse, ListFeedViewsResponse, ListFeedVisibilitiesResponse, MarkActivityRequest, OwnBatchRequest, OwnBatchResponse, PinActivityRequest, PinActivityResponse, PollVoteResponse, QueryActivitiesRequest, QueryActivitiesResponse, QueryActivityReactionsRequest, QueryActivityReactionsResponse, QueryBookmarkFoldersRequest, QueryBookmarkFoldersResponse, QueryBookmarksRequest, QueryBookmarksResponse, QueryCommentReactionsRequest, QueryCommentReactionsResponse, QueryCommentsRequest, QueryCommentsResponse, QueryFeedMembersRequest, QueryFeedMembersResponse, QueryFeedsRequest, QueryFeedsResponse, QueryFeedsUsageStatsRequest, QueryFeedsUsageStatsResponse, QueryFollowsRequest, QueryFollowsResponse, QueryMembershipLevelsRequest, QueryMembershipLevelsResponse, ReadCollectionsResponse, RejectFeedMemberInviteRequest, RejectFeedMemberInviteResponse, RejectFollowRequest, RejectFollowResponse, Response, SingleFollowResponse, UnfollowBatchRequest, UnfollowBatchResponse, UnfollowResponse, UnpinActivityResponse, UpdateActivityPartialRequest, UpdateActivityPartialResponse, UpdateActivityRequest, UpdateActivityResponse, UpdateBookmarkFolderRequest, UpdateBookmarkFolderResponse, UpdateBookmarkRequest, UpdateBookmarkResponse, UpdateCollectionsRequest, UpdateCollectionsResponse, UpdateCommentRequest, UpdateCommentResponse, UpdateFeedGroupRequest, UpdateFeedGroupResponse, UpdateFeedMembersRequest, UpdateFeedMembersResponse, UpdateFeedRequest, UpdateFeedResponse, UpdateFeedViewRequest, UpdateFeedViewResponse, UpdateFeedVisibilityRequest, UpdateFeedVisibilityResponse, UpdateFollowRequest, UpdateFollowResponse, UpdateMembershipLevelRequest, UpdateMembershipLevelResponse, UpsertActivitiesRequest, UpsertActivitiesResponse, UpsertCollectionsRequest, UpsertCollectionsResponse } from '../models';
3
3
  export declare class FeedsApi {
4
4
  readonly apiClient: ApiClient;
5
5
  constructor(apiClient: ApiClient);
@@ -205,7 +205,8 @@ export declare class FeedsApi {
205
205
  name: string;
206
206
  }): Promise<StreamResponse<UpdateFeedVisibilityResponse>>;
207
207
  createFeedsBatch(request: CreateFeedsBatchRequest): Promise<StreamResponse<CreateFeedsBatchResponse>>;
208
- ownCapabilitiesBatch(request: OwnCapabilitiesBatchRequest): Promise<StreamResponse<OwnCapabilitiesBatchResponse>>;
208
+ deleteFeedsBatch(request: DeleteFeedsBatchRequest): Promise<StreamResponse<DeleteFeedsBatchResponse>>;
209
+ ownBatch(request: OwnBatchRequest): Promise<StreamResponse<OwnBatchResponse>>;
209
210
  protected _queryFeeds(request?: QueryFeedsRequest): Promise<StreamResponse<QueryFeedsResponse>>;
210
211
  getFeedsRateLimits(request?: {
211
212
  endpoints?: string;
@@ -218,6 +219,7 @@ export declare class FeedsApi {
218
219
  follow(request: FollowRequest): Promise<StreamResponse<SingleFollowResponse>>;
219
220
  acceptFollow(request: AcceptFollowRequest): Promise<StreamResponse<AcceptFollowResponse>>;
220
221
  followBatch(request: FollowBatchRequest): Promise<StreamResponse<FollowBatchResponse>>;
222
+ getOrCreateFollows(request: FollowBatchRequest): Promise<StreamResponse<FollowBatchResponse>>;
221
223
  queryFollows(request?: QueryFollowsRequest): Promise<StreamResponse<QueryFollowsResponse>>;
222
224
  rejectFollow(request: RejectFollowRequest): Promise<StreamResponse<RejectFollowResponse>>;
223
225
  unfollow(request: {
@@ -234,6 +236,7 @@ export declare class FeedsApi {
234
236
  }): Promise<StreamResponse<UpdateMembershipLevelResponse>>;
235
237
  queryFeedsUsageStats(request?: QueryFeedsUsageStatsRequest): Promise<StreamResponse<QueryFeedsUsageStatsResponse>>;
236
238
  unfollowBatch(request: UnfollowBatchRequest): Promise<StreamResponse<UnfollowBatchResponse>>;
239
+ getOrCreateUnfollows(request: UnfollowBatchRequest): Promise<StreamResponse<UnfollowBatchResponse>>;
237
240
  deleteFeedUserData(request: DeleteFeedUserDataRequest & {
238
241
  user_id: string;
239
242
  }): Promise<StreamResponse<DeleteFeedUserDataResponse>>;
@@ -1342,6 +1342,37 @@ export interface CallStatsLocation {
1342
1342
  longitude?: number;
1343
1343
  subdivision?: string;
1344
1344
  }
1345
+ export interface CallStatsMapLocation {
1346
+ count: number;
1347
+ live_count: number;
1348
+ location?: CallStatsLocation;
1349
+ }
1350
+ export interface CallStatsMapPublisher {
1351
+ is_live: boolean;
1352
+ user_id: string;
1353
+ user_session_id: string;
1354
+ published_tracks: PublishedTrackFlags;
1355
+ name?: string;
1356
+ publisher_type?: string;
1357
+ location?: CallStatsLocation;
1358
+ }
1359
+ export interface CallStatsMapPublishers {
1360
+ publishers: CallStatsMapPublisher[];
1361
+ }
1362
+ export interface CallStatsMapSFUs {
1363
+ locations: SFULocationResponse[];
1364
+ }
1365
+ export interface CallStatsMapSubscriber {
1366
+ is_live: boolean;
1367
+ user_id: string;
1368
+ user_session_id: string;
1369
+ name?: string;
1370
+ location?: CallStatsLocation;
1371
+ }
1372
+ export interface CallStatsMapSubscribers {
1373
+ locations: CallStatsMapLocation[];
1374
+ participants?: CallStatsMapSubscriber[];
1375
+ }
1345
1376
  export interface CallStatsParticipant {
1346
1377
  user_id: string;
1347
1378
  sessions: CallStatsParticipantSession[];
@@ -2269,6 +2300,10 @@ export interface ContentCountRuleParameters {
2269
2300
  threshold?: number;
2270
2301
  time_window?: string;
2271
2302
  }
2303
+ export interface Coordinates {
2304
+ latitude: number;
2305
+ longitude: number;
2306
+ }
2272
2307
  export interface CountByMinuteResponse {
2273
2308
  count: number;
2274
2309
  start_ts: Date;
@@ -2716,6 +2751,14 @@ export interface DeleteFeedUserDataResponse {
2716
2751
  export interface DeleteFeedViewResponse {
2717
2752
  duration: string;
2718
2753
  }
2754
+ export interface DeleteFeedsBatchRequest {
2755
+ feeds: string[];
2756
+ hard_delete?: boolean;
2757
+ }
2758
+ export interface DeleteFeedsBatchResponse {
2759
+ duration: string;
2760
+ task_id: string;
2761
+ }
2719
2762
  export interface DeleteMessageRequest {
2720
2763
  hard_delete?: boolean;
2721
2764
  reason?: string;
@@ -2928,6 +2971,26 @@ export interface EnrichedReaction {
2928
2971
  updated_at?: Time;
2929
2972
  user?: Data;
2930
2973
  }
2974
+ export interface EnrichmentOptions {
2975
+ skip_activity?: boolean;
2976
+ skip_activity_collections?: boolean;
2977
+ skip_activity_comments?: boolean;
2978
+ skip_activity_current_feed?: boolean;
2979
+ skip_activity_mentioned_users?: boolean;
2980
+ skip_activity_own_bookmarks?: boolean;
2981
+ skip_activity_parents?: boolean;
2982
+ skip_activity_poll?: boolean;
2983
+ skip_activity_reactions?: boolean;
2984
+ skip_activity_refresh_image_urls?: boolean;
2985
+ skip_all?: boolean;
2986
+ skip_feed_member_user?: boolean;
2987
+ skip_followers?: boolean;
2988
+ skip_following?: boolean;
2989
+ skip_own_capabilities?: boolean;
2990
+ skip_own_followings?: boolean;
2991
+ skip_own_follows?: boolean;
2992
+ skip_pins?: boolean;
2993
+ }
2931
2994
  export interface EntityCreatorResponse {
2932
2995
  ban_count: number;
2933
2996
  banned: boolean;
@@ -3207,6 +3270,12 @@ export declare const FeedOwnCapability: {
3207
3270
  readonly UPDATE_OWN_COMMENT: "update-own-comment";
3208
3271
  };
3209
3272
  export type FeedOwnCapability = (typeof FeedOwnCapability)[keyof typeof FeedOwnCapability];
3273
+ export interface FeedOwnData {
3274
+ own_capabilities?: FeedOwnCapability[];
3275
+ own_followings?: FollowResponse[];
3276
+ own_follows?: FollowResponse[];
3277
+ own_membership?: FeedMemberResponse;
3278
+ }
3210
3279
  export interface FeedRequest {
3211
3280
  feed_group_id: string;
3212
3281
  feed_id: string;
@@ -3219,6 +3288,7 @@ export interface FeedRequest {
3219
3288
  custom?: Record<string, any>;
3220
3289
  }
3221
3290
  export interface FeedResponse {
3291
+ activity_count: number;
3222
3292
  created_at: Date;
3223
3293
  description: string;
3224
3294
  feed: string;
@@ -3235,11 +3305,13 @@ export interface FeedResponse {
3235
3305
  visibility?: string;
3236
3306
  filter_tags?: string[];
3237
3307
  own_capabilities?: FeedOwnCapability[];
3308
+ own_followings?: FollowResponse[];
3238
3309
  own_follows?: FollowResponse[];
3239
3310
  custom?: Record<string, any>;
3240
3311
  own_membership?: FeedMemberResponse;
3241
3312
  }
3242
3313
  export interface FeedSuggestionResponse {
3314
+ activity_count: number;
3243
3315
  created_at: Date;
3244
3316
  description: string;
3245
3317
  feed: string;
@@ -3258,6 +3330,7 @@ export interface FeedSuggestionResponse {
3258
3330
  visibility?: string;
3259
3331
  filter_tags?: string[];
3260
3332
  own_capabilities?: FeedOwnCapability[];
3333
+ own_followings?: FollowResponse[];
3261
3334
  own_follows?: FollowResponse[];
3262
3335
  algorithm_scores?: Record<string, number>;
3263
3336
  custom?: Record<string, any>;
@@ -3422,6 +3495,7 @@ export interface FollowBatchRequest {
3422
3495
  }
3423
3496
  export interface FollowBatchResponse {
3424
3497
  duration: string;
3498
+ created: FollowResponse[];
3425
3499
  follows: FollowResponse[];
3426
3500
  }
3427
3501
  export interface FollowCreatedEvent {
@@ -3789,6 +3863,7 @@ export interface GetOrCreateFeedRequest {
3789
3863
  view?: string;
3790
3864
  watch?: boolean;
3791
3865
  data?: FeedInput;
3866
+ enrichment_options?: EnrichmentOptions;
3792
3867
  external_ranking?: Record<string, any>;
3793
3868
  filter?: Record<string, any>;
3794
3869
  followers_pagination?: PagerRequest;
@@ -4215,6 +4290,11 @@ export interface ListTranscriptionsResponse {
4215
4290
  duration: string;
4216
4291
  transcriptions: CallTranscription[];
4217
4292
  }
4293
+ export interface Location {
4294
+ continent_code: string;
4295
+ country_iso_code: string;
4296
+ subdivision_iso_code: string;
4297
+ }
4218
4298
  export interface MarkActivityRequest {
4219
4299
  mark_all_read?: boolean;
4220
4300
  mark_all_seen?: boolean;
@@ -4909,14 +4989,15 @@ export interface OverviewDashboardConfig {
4909
4989
  default_date_range_days?: number;
4910
4990
  visible_charts?: string[];
4911
4991
  }
4912
- export interface OwnCapabilitiesBatchRequest {
4992
+ export interface OwnBatchRequest {
4913
4993
  feeds: string[];
4914
4994
  user_id?: string;
4995
+ fields?: string[];
4915
4996
  user?: UserRequest;
4916
4997
  }
4917
- export interface OwnCapabilitiesBatchResponse {
4998
+ export interface OwnBatchResponse {
4918
4999
  duration: string;
4919
- capabilities: Record<string, FeedOwnCapability[]>;
5000
+ data: Record<string, FeedOwnData>;
4920
5001
  }
4921
5002
  export declare const OwnCapability: {
4922
5003
  readonly BLOCK_USERS: "block-users";
@@ -5567,6 +5648,22 @@ export interface QueryCallSessionParticipantStatsTimelineResponse {
5567
5648
  user_session_id: string;
5568
5649
  events: CallParticipantTimeline[];
5569
5650
  }
5651
+ export interface QueryCallStatsMapResponse {
5652
+ call_id: string;
5653
+ call_session_id: string;
5654
+ call_type: string;
5655
+ duration: string;
5656
+ counts: CallStatsParticipantCounts;
5657
+ call_ended_at?: Date;
5658
+ call_started_at?: Date;
5659
+ data_source?: string;
5660
+ end_time?: Date;
5661
+ generated_at?: Date;
5662
+ start_time?: Date;
5663
+ publishers?: CallStatsMapPublishers;
5664
+ sfus?: CallStatsMapSFUs;
5665
+ subscribers?: CallStatsMapSubscribers;
5666
+ }
5570
5667
  export interface QueryCallStatsRequest {
5571
5668
  limit?: number;
5572
5669
  next?: string;
@@ -6379,6 +6476,13 @@ export interface SDKUsageReport {
6379
6476
  export interface SDKUsageReportResponse {
6380
6477
  daily: DailyAggregateSDKUsageReportResponse[];
6381
6478
  }
6479
+ export interface SFULocationResponse {
6480
+ datacenter: string;
6481
+ id: string;
6482
+ coordinates: Coordinates;
6483
+ location: Location;
6484
+ count?: number;
6485
+ }
6382
6486
  export interface SIPCallConfigsRequest {
6383
6487
  custom_data?: Record<string, any>;
6384
6488
  }
@@ -1,5 +1,5 @@
1
1
  import { ApiClient, StreamResponse } from '../../gen-imports';
2
- import { BlockUserRequest, BlockUserResponse, CollectUserFeedbackRequest, CollectUserFeedbackResponse, CreateCallTypeRequest, CreateCallTypeResponse, CreateSIPTrunkRequest, CreateSIPTrunkResponse, DeleteCallRequest, DeleteCallResponse, DeleteRecordingResponse, DeleteSIPInboundRoutingRuleResponse, DeleteSIPTrunkResponse, DeleteTranscriptionResponse, EndCallResponse, GetActiveCallsStatusResponse, GetCallReportResponse, GetCallResponse, GetCallSessionParticipantStatsDetailsResponse, GetCallTypeResponse, GetEdgesResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, KickUserRequest, KickUserResponse, ListCallTypeResponse, ListRecordingsResponse, ListSIPInboundRoutingRuleResponse, ListSIPTrunksResponse, ListTranscriptionsResponse, MuteUsersRequest, MuteUsersResponse, PinRequest, PinResponse, QueryAggregateCallStatsRequest, QueryAggregateCallStatsResponse, QueryCallMembersRequest, QueryCallMembersResponse, QueryCallParticipantsRequest, QueryCallParticipantsResponse, QueryCallSessionParticipantStatsResponse, QueryCallSessionParticipantStatsTimelineResponse, QueryCallStatsRequest, QueryCallStatsResponse, QueryCallsRequest, QueryCallsResponse, QueryUserFeedbackRequest, QueryUserFeedbackResponse, ResolveSipInboundRequest, ResolveSipInboundResponse, Response, RingCallRequest, RingCallResponse, SIPInboundRoutingRuleRequest, SIPInboundRoutingRuleResponse, SendCallEventRequest, SendCallEventResponse, SendClosedCaptionRequest, SendClosedCaptionResponse, SortParamRequest, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartFrameRecordingRequest, StartFrameRecordingResponse, StartHLSBroadcastingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, StartRecordingRequest, StartRecordingResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopFrameRecordingResponse, StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, StopRTMPBroadcastsRequest, StopRTMPBroadcastsResponse, StopRecordingResponse, StopTranscriptionRequest, StopTranscriptionResponse, UnblockUserRequest, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateCallTypeRequest, UpdateCallTypeResponse, UpdateSIPInboundRoutingRuleRequest, UpdateSIPInboundRoutingRuleResponse, UpdateSIPTrunkRequest, UpdateSIPTrunkResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse } from '../models';
2
+ import { BlockUserRequest, BlockUserResponse, CollectUserFeedbackRequest, CollectUserFeedbackResponse, CreateCallTypeRequest, CreateCallTypeResponse, CreateSIPTrunkRequest, CreateSIPTrunkResponse, DeleteCallRequest, DeleteCallResponse, DeleteRecordingResponse, DeleteSIPInboundRoutingRuleResponse, DeleteSIPTrunkResponse, DeleteTranscriptionResponse, EndCallResponse, GetActiveCallsStatusResponse, GetCallReportResponse, GetCallResponse, GetCallSessionParticipantStatsDetailsResponse, GetCallTypeResponse, GetEdgesResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, KickUserRequest, KickUserResponse, ListCallTypeResponse, ListRecordingsResponse, ListSIPInboundRoutingRuleResponse, ListSIPTrunksResponse, ListTranscriptionsResponse, MuteUsersRequest, MuteUsersResponse, PinRequest, PinResponse, QueryAggregateCallStatsRequest, QueryAggregateCallStatsResponse, QueryCallMembersRequest, QueryCallMembersResponse, QueryCallParticipantsRequest, QueryCallParticipantsResponse, QueryCallSessionParticipantStatsResponse, QueryCallSessionParticipantStatsTimelineResponse, QueryCallStatsMapResponse, QueryCallStatsRequest, QueryCallStatsResponse, QueryCallsRequest, QueryCallsResponse, QueryUserFeedbackRequest, QueryUserFeedbackResponse, ResolveSipInboundRequest, ResolveSipInboundResponse, Response, RingCallRequest, RingCallResponse, SIPInboundRoutingRuleRequest, SIPInboundRoutingRuleResponse, SendCallEventRequest, SendCallEventResponse, SendClosedCaptionRequest, SendClosedCaptionResponse, SortParamRequest, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartFrameRecordingRequest, StartFrameRecordingResponse, StartHLSBroadcastingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, StartRecordingRequest, StartRecordingResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopFrameRecordingResponse, StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, StopRTMPBroadcastsRequest, StopRTMPBroadcastsResponse, StopRecordingResponse, StopTranscriptionRequest, StopTranscriptionResponse, UnblockUserRequest, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateCallTypeRequest, UpdateCallTypeResponse, UpdateSIPInboundRoutingRuleRequest, UpdateSIPInboundRoutingRuleResponse, UpdateSIPTrunkRequest, UpdateSIPTrunkResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse } from '../models';
3
3
  export declare class VideoApi {
4
4
  readonly apiClient: ApiClient;
5
5
  constructor(apiClient: ApiClient);
@@ -172,6 +172,16 @@ export declare class VideoApi {
172
172
  session: string;
173
173
  filename: string;
174
174
  }): Promise<StreamResponse<DeleteTranscriptionResponse>>;
175
+ getCallStatsMap(request: {
176
+ call_type: string;
177
+ call_id: string;
178
+ session: string;
179
+ start_time?: Date;
180
+ end_time?: Date;
181
+ exclude_publishers?: boolean;
182
+ exclude_subscribers?: boolean;
183
+ exclude_sfus?: boolean;
184
+ }): Promise<StreamResponse<QueryCallStatsMapResponse>>;
175
185
  getCallSessionParticipantStatsDetails(request: {
176
186
  call_type: string;
177
187
  call_id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/node-sdk",
3
- "version": "0.7.25",
3
+ "version": "0.7.27",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {
@@ -1,5 +1,10 @@
1
1
  import { FeedsApi } from './gen/feeds/FeedsApi';
2
- import { AddReactionRequest, QueryFeedsRequest } from './gen/models';
2
+ import {
3
+ AddReactionRequest,
4
+ FollowBatchRequest,
5
+ QueryFeedsRequest,
6
+ UnfollowBatchRequest,
7
+ } from './gen/models';
3
8
  import { StreamFeed } from './StreamFeed';
4
9
 
5
10
  export class StreamFeedsClient extends FeedsApi {
@@ -17,4 +22,18 @@ export class StreamFeedsClient extends FeedsApi {
17
22
  addReaction = (request: AddReactionRequest & { activity_id: string }) => {
18
23
  return super.addActivityReaction(request);
19
24
  };
25
+
26
+ /**
27
+ * @deprecated use `getOrCreateFollows` instead
28
+ */
29
+ followBatch = (request: FollowBatchRequest) => {
30
+ return super.followBatch(request);
31
+ };
32
+
33
+ /**
34
+ * @deprecated use `getOrCreateUnfollows` instead
35
+ */
36
+ followUnbatch = (request: UnfollowBatchRequest) => {
37
+ return super.unfollowBatch(request);
38
+ };
20
39
  }
@@ -43,6 +43,8 @@ import {
43
43
  DeleteFeedUserDataRequest,
44
44
  DeleteFeedUserDataResponse,
45
45
  DeleteFeedViewResponse,
46
+ DeleteFeedsBatchRequest,
47
+ DeleteFeedsBatchResponse,
46
48
  ExportFeedUserDataResponse,
47
49
  FollowBatchRequest,
48
50
  FollowBatchResponse,
@@ -66,8 +68,8 @@ import {
66
68
  ListFeedViewsResponse,
67
69
  ListFeedVisibilitiesResponse,
68
70
  MarkActivityRequest,
69
- OwnCapabilitiesBatchRequest,
70
- OwnCapabilitiesBatchResponse,
71
+ OwnBatchRequest,
72
+ OwnBatchResponse,
71
73
  PinActivityRequest,
72
74
  PinActivityResponse,
73
75
  PollVoteResponse,
@@ -1237,6 +1239,7 @@ export class FeedsApi {
1237
1239
  view: request?.view,
1238
1240
  watch: request?.watch,
1239
1241
  data: request?.data,
1242
+ enrichment_options: request?.enrichment_options,
1240
1243
  external_ranking: request?.external_ranking,
1241
1244
  filter: request?.filter,
1242
1245
  followers_pagination: request?.followers_pagination,
@@ -1849,27 +1852,52 @@ export class FeedsApi {
1849
1852
  return { ...response.body, metadata: response.metadata };
1850
1853
  }
1851
1854
 
1852
- async ownCapabilitiesBatch(
1853
- request: OwnCapabilitiesBatchRequest,
1854
- ): Promise<StreamResponse<OwnCapabilitiesBatchResponse>> {
1855
+ async deleteFeedsBatch(
1856
+ request: DeleteFeedsBatchRequest,
1857
+ ): Promise<StreamResponse<DeleteFeedsBatchResponse>> {
1858
+ const body = {
1859
+ feeds: request?.feeds,
1860
+ hard_delete: request?.hard_delete,
1861
+ };
1862
+
1863
+ const response = await this.apiClient.sendRequest<
1864
+ StreamResponse<DeleteFeedsBatchResponse>
1865
+ >(
1866
+ 'POST',
1867
+ '/api/v2/feeds/feeds/delete',
1868
+ undefined,
1869
+ undefined,
1870
+ body,
1871
+ 'application/json',
1872
+ );
1873
+
1874
+ decoders.DeleteFeedsBatchResponse?.(response.body);
1875
+
1876
+ return { ...response.body, metadata: response.metadata };
1877
+ }
1878
+
1879
+ async ownBatch(
1880
+ request: OwnBatchRequest,
1881
+ ): Promise<StreamResponse<OwnBatchResponse>> {
1855
1882
  const body = {
1856
1883
  feeds: request?.feeds,
1857
1884
  user_id: request?.user_id,
1885
+ fields: request?.fields,
1858
1886
  user: request?.user,
1859
1887
  };
1860
1888
 
1861
1889
  const response = await this.apiClient.sendRequest<
1862
- StreamResponse<OwnCapabilitiesBatchResponse>
1890
+ StreamResponse<OwnBatchResponse>
1863
1891
  >(
1864
1892
  'POST',
1865
- '/api/v2/feeds/feeds/own_capabilities/batch',
1893
+ '/api/v2/feeds/feeds/own/batch',
1866
1894
  undefined,
1867
1895
  undefined,
1868
1896
  body,
1869
1897
  'application/json',
1870
1898
  );
1871
1899
 
1872
- decoders.OwnCapabilitiesBatchResponse?.(response.body);
1900
+ decoders.OwnBatchResponse?.(response.body);
1873
1901
 
1874
1902
  return { ...response.body, metadata: response.metadata };
1875
1903
  }
@@ -2031,6 +2059,29 @@ export class FeedsApi {
2031
2059
  return { ...response.body, metadata: response.metadata };
2032
2060
  }
2033
2061
 
2062
+ async getOrCreateFollows(
2063
+ request: FollowBatchRequest,
2064
+ ): Promise<StreamResponse<FollowBatchResponse>> {
2065
+ const body = {
2066
+ follows: request?.follows,
2067
+ };
2068
+
2069
+ const response = await this.apiClient.sendRequest<
2070
+ StreamResponse<FollowBatchResponse>
2071
+ >(
2072
+ 'POST',
2073
+ '/api/v2/feeds/follows/batch/upsert',
2074
+ undefined,
2075
+ undefined,
2076
+ body,
2077
+ 'application/json',
2078
+ );
2079
+
2080
+ decoders.FollowBatchResponse?.(response.body);
2081
+
2082
+ return { ...response.body, metadata: response.metadata };
2083
+ }
2084
+
2034
2085
  async queryFollows(
2035
2086
  request?: QueryFollowsRequest,
2036
2087
  ): Promise<StreamResponse<QueryFollowsResponse>> {
@@ -2256,6 +2307,29 @@ export class FeedsApi {
2256
2307
  return { ...response.body, metadata: response.metadata };
2257
2308
  }
2258
2309
 
2310
+ async getOrCreateUnfollows(
2311
+ request: UnfollowBatchRequest,
2312
+ ): Promise<StreamResponse<UnfollowBatchResponse>> {
2313
+ const body = {
2314
+ follows: request?.follows,
2315
+ };
2316
+
2317
+ const response = await this.apiClient.sendRequest<
2318
+ StreamResponse<UnfollowBatchResponse>
2319
+ >(
2320
+ 'POST',
2321
+ '/api/v2/feeds/unfollow/batch/upsert',
2322
+ undefined,
2323
+ undefined,
2324
+ body,
2325
+ 'application/json',
2326
+ );
2327
+
2328
+ decoders.UnfollowBatchResponse?.(response.body);
2329
+
2330
+ return { ...response.body, metadata: response.metadata };
2331
+ }
2332
+
2259
2333
  async deleteFeedUserData(
2260
2334
  request: DeleteFeedUserDataRequest & { user_id: string },
2261
2335
  ): Promise<StreamResponse<DeleteFeedUserDataResponse>> {
@@ -2094,6 +2094,17 @@ decoders.FeedMemberUpdatedEvent = (input?: Record<string, any>) => {
2094
2094
  return decode(typeMappings, input);
2095
2095
  };
2096
2096
 
2097
+ decoders.FeedOwnData = (input?: Record<string, any>) => {
2098
+ const typeMappings: TypeMapping = {
2099
+ own_followings: { type: 'FollowResponse', isSingle: false },
2100
+
2101
+ own_follows: { type: 'FollowResponse', isSingle: false },
2102
+
2103
+ own_membership: { type: 'FeedMemberResponse', isSingle: true },
2104
+ };
2105
+ return decode(typeMappings, input);
2106
+ };
2107
+
2097
2108
  decoders.FeedResponse = (input?: Record<string, any>) => {
2098
2109
  const typeMappings: TypeMapping = {
2099
2110
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -2104,6 +2115,8 @@ decoders.FeedResponse = (input?: Record<string, any>) => {
2104
2115
 
2105
2116
  deleted_at: { type: 'DatetimeType', isSingle: true },
2106
2117
 
2118
+ own_followings: { type: 'FollowResponse', isSingle: false },
2119
+
2107
2120
  own_follows: { type: 'FollowResponse', isSingle: false },
2108
2121
 
2109
2122
  own_membership: { type: 'FeedMemberResponse', isSingle: true },
@@ -2121,6 +2134,8 @@ decoders.FeedSuggestionResponse = (input?: Record<string, any>) => {
2121
2134
 
2122
2135
  deleted_at: { type: 'DatetimeType', isSingle: true },
2123
2136
 
2137
+ own_followings: { type: 'FollowResponse', isSingle: false },
2138
+
2124
2139
  own_follows: { type: 'FollowResponse', isSingle: false },
2125
2140
 
2126
2141
  own_membership: { type: 'FeedMemberResponse', isSingle: true },
@@ -2195,6 +2210,8 @@ decoders.FlagUpdatedEvent = (input?: Record<string, any>) => {
2195
2210
 
2196
2211
  decoders.FollowBatchResponse = (input?: Record<string, any>) => {
2197
2212
  const typeMappings: TypeMapping = {
2213
+ created: { type: 'FollowResponse', isSingle: false },
2214
+
2198
2215
  follows: { type: 'FollowResponse', isSingle: false },
2199
2216
  };
2200
2217
  return decode(typeMappings, input);
@@ -3164,6 +3181,13 @@ decoders.NotificationStatusResponse = (input?: Record<string, any>) => {
3164
3181
  return decode(typeMappings, input);
3165
3182
  };
3166
3183
 
3184
+ decoders.OwnBatchResponse = (input?: Record<string, any>) => {
3185
+ const typeMappings: TypeMapping = {
3186
+ data: { type: 'FeedOwnData', isSingle: false },
3187
+ };
3188
+ return decode(typeMappings, input);
3189
+ };
3190
+
3167
3191
  decoders.OwnUser = (input?: Record<string, any>) => {
3168
3192
  const typeMappings: TypeMapping = {
3169
3193
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -3490,6 +3514,21 @@ decoders.QueryCallSessionParticipantStatsTimelineResponse = (
3490
3514
  return decode(typeMappings, input);
3491
3515
  };
3492
3516
 
3517
+ decoders.QueryCallStatsMapResponse = (input?: Record<string, any>) => {
3518
+ const typeMappings: TypeMapping = {
3519
+ call_ended_at: { type: 'DatetimeType', isSingle: true },
3520
+
3521
+ call_started_at: { type: 'DatetimeType', isSingle: true },
3522
+
3523
+ end_time: { type: 'DatetimeType', isSingle: true },
3524
+
3525
+ generated_at: { type: 'DatetimeType', isSingle: true },
3526
+
3527
+ start_time: { type: 'DatetimeType', isSingle: true },
3528
+ };
3529
+ return decode(typeMappings, input);
3530
+ };
3531
+
3493
3532
  decoders.QueryCallStatsResponse = (input?: Record<string, any>) => {
3494
3533
  const typeMappings: TypeMapping = {
3495
3534
  reports: { type: 'CallStatsReportSummaryResponse', isSingle: false },