@stream-io/node-sdk 0.7.25 → 0.7.26

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,25 @@ 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_follows?: boolean;
2991
+ skip_pins?: boolean;
2992
+ }
2931
2993
  export interface EntityCreatorResponse {
2932
2994
  ban_count: number;
2933
2995
  banned: boolean;
@@ -3207,6 +3269,11 @@ export declare const FeedOwnCapability: {
3207
3269
  readonly UPDATE_OWN_COMMENT: "update-own-comment";
3208
3270
  };
3209
3271
  export type FeedOwnCapability = (typeof FeedOwnCapability)[keyof typeof FeedOwnCapability];
3272
+ export interface FeedOwnData {
3273
+ own_capabilities?: FeedOwnCapability[];
3274
+ own_follows?: FollowResponse[];
3275
+ own_membership?: FeedMemberResponse;
3276
+ }
3210
3277
  export interface FeedRequest {
3211
3278
  feed_group_id: string;
3212
3279
  feed_id: string;
@@ -3219,6 +3286,7 @@ export interface FeedRequest {
3219
3286
  custom?: Record<string, any>;
3220
3287
  }
3221
3288
  export interface FeedResponse {
3289
+ activity_count: number;
3222
3290
  created_at: Date;
3223
3291
  description: string;
3224
3292
  feed: string;
@@ -3240,6 +3308,7 @@ export interface FeedResponse {
3240
3308
  own_membership?: FeedMemberResponse;
3241
3309
  }
3242
3310
  export interface FeedSuggestionResponse {
3311
+ activity_count: number;
3243
3312
  created_at: Date;
3244
3313
  description: string;
3245
3314
  feed: string;
@@ -3422,6 +3491,7 @@ export interface FollowBatchRequest {
3422
3491
  }
3423
3492
  export interface FollowBatchResponse {
3424
3493
  duration: string;
3494
+ created: FollowResponse[];
3425
3495
  follows: FollowResponse[];
3426
3496
  }
3427
3497
  export interface FollowCreatedEvent {
@@ -3789,6 +3859,7 @@ export interface GetOrCreateFeedRequest {
3789
3859
  view?: string;
3790
3860
  watch?: boolean;
3791
3861
  data?: FeedInput;
3862
+ enrichment_options?: EnrichmentOptions;
3792
3863
  external_ranking?: Record<string, any>;
3793
3864
  filter?: Record<string, any>;
3794
3865
  followers_pagination?: PagerRequest;
@@ -4215,6 +4286,11 @@ export interface ListTranscriptionsResponse {
4215
4286
  duration: string;
4216
4287
  transcriptions: CallTranscription[];
4217
4288
  }
4289
+ export interface Location {
4290
+ continent_code: string;
4291
+ country_iso_code: string;
4292
+ subdivision_iso_code: string;
4293
+ }
4218
4294
  export interface MarkActivityRequest {
4219
4295
  mark_all_read?: boolean;
4220
4296
  mark_all_seen?: boolean;
@@ -4909,14 +4985,15 @@ export interface OverviewDashboardConfig {
4909
4985
  default_date_range_days?: number;
4910
4986
  visible_charts?: string[];
4911
4987
  }
4912
- export interface OwnCapabilitiesBatchRequest {
4988
+ export interface OwnBatchRequest {
4913
4989
  feeds: string[];
4914
4990
  user_id?: string;
4991
+ fields?: string[];
4915
4992
  user?: UserRequest;
4916
4993
  }
4917
- export interface OwnCapabilitiesBatchResponse {
4994
+ export interface OwnBatchResponse {
4918
4995
  duration: string;
4919
- capabilities: Record<string, FeedOwnCapability[]>;
4996
+ data: Record<string, FeedOwnData>;
4920
4997
  }
4921
4998
  export declare const OwnCapability: {
4922
4999
  readonly BLOCK_USERS: "block-users";
@@ -5567,6 +5644,22 @@ export interface QueryCallSessionParticipantStatsTimelineResponse {
5567
5644
  user_session_id: string;
5568
5645
  events: CallParticipantTimeline[];
5569
5646
  }
5647
+ export interface QueryCallStatsMapResponse {
5648
+ call_id: string;
5649
+ call_session_id: string;
5650
+ call_type: string;
5651
+ duration: string;
5652
+ counts: CallStatsParticipantCounts;
5653
+ call_ended_at?: Date;
5654
+ call_started_at?: Date;
5655
+ data_source?: string;
5656
+ end_time?: Date;
5657
+ generated_at?: Date;
5658
+ start_time?: Date;
5659
+ publishers?: CallStatsMapPublishers;
5660
+ sfus?: CallStatsMapSFUs;
5661
+ subscribers?: CallStatsMapSubscribers;
5662
+ }
5570
5663
  export interface QueryCallStatsRequest {
5571
5664
  limit?: number;
5572
5665
  next?: string;
@@ -6379,6 +6472,13 @@ export interface SDKUsageReport {
6379
6472
  export interface SDKUsageReportResponse {
6380
6473
  daily: DailyAggregateSDKUsageReportResponse[];
6381
6474
  }
6475
+ export interface SFULocationResponse {
6476
+ datacenter: string;
6477
+ id: string;
6478
+ coordinates: Coordinates;
6479
+ location: Location;
6480
+ count?: number;
6481
+ }
6382
6482
  export interface SIPCallConfigsRequest {
6383
6483
  custom_data?: Record<string, any>;
6384
6484
  }
@@ -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.26",
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,15 @@ 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_follows: { type: 'FollowResponse', isSingle: false },
2100
+
2101
+ own_membership: { type: 'FeedMemberResponse', isSingle: true },
2102
+ };
2103
+ return decode(typeMappings, input);
2104
+ };
2105
+
2097
2106
  decoders.FeedResponse = (input?: Record<string, any>) => {
2098
2107
  const typeMappings: TypeMapping = {
2099
2108
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -2195,6 +2204,8 @@ decoders.FlagUpdatedEvent = (input?: Record<string, any>) => {
2195
2204
 
2196
2205
  decoders.FollowBatchResponse = (input?: Record<string, any>) => {
2197
2206
  const typeMappings: TypeMapping = {
2207
+ created: { type: 'FollowResponse', isSingle: false },
2208
+
2198
2209
  follows: { type: 'FollowResponse', isSingle: false },
2199
2210
  };
2200
2211
  return decode(typeMappings, input);
@@ -3164,6 +3175,13 @@ decoders.NotificationStatusResponse = (input?: Record<string, any>) => {
3164
3175
  return decode(typeMappings, input);
3165
3176
  };
3166
3177
 
3178
+ decoders.OwnBatchResponse = (input?: Record<string, any>) => {
3179
+ const typeMappings: TypeMapping = {
3180
+ data: { type: 'FeedOwnData', isSingle: false },
3181
+ };
3182
+ return decode(typeMappings, input);
3183
+ };
3184
+
3167
3185
  decoders.OwnUser = (input?: Record<string, any>) => {
3168
3186
  const typeMappings: TypeMapping = {
3169
3187
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -3490,6 +3508,21 @@ decoders.QueryCallSessionParticipantStatsTimelineResponse = (
3490
3508
  return decode(typeMappings, input);
3491
3509
  };
3492
3510
 
3511
+ decoders.QueryCallStatsMapResponse = (input?: Record<string, any>) => {
3512
+ const typeMappings: TypeMapping = {
3513
+ call_ended_at: { type: 'DatetimeType', isSingle: true },
3514
+
3515
+ call_started_at: { type: 'DatetimeType', isSingle: true },
3516
+
3517
+ end_time: { type: 'DatetimeType', isSingle: true },
3518
+
3519
+ generated_at: { type: 'DatetimeType', isSingle: true },
3520
+
3521
+ start_time: { type: 'DatetimeType', isSingle: true },
3522
+ };
3523
+ return decode(typeMappings, input);
3524
+ };
3525
+
3493
3526
  decoders.QueryCallStatsResponse = (input?: Record<string, any>) => {
3494
3527
  const typeMappings: TypeMapping = {
3495
3528
  reports: { type: 'CallStatsReportSummaryResponse', isSingle: false },