@stream-io/node-sdk 0.7.24 → 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.
package/dist/index.cjs.js CHANGED
@@ -1583,6 +1583,13 @@ decoders.FeedMemberUpdatedEvent = (input) => {
1583
1583
  };
1584
1584
  return decode(typeMappings, input);
1585
1585
  };
1586
+ decoders.FeedOwnData = (input) => {
1587
+ const typeMappings = {
1588
+ own_follows: { type: 'FollowResponse', isSingle: false },
1589
+ own_membership: { type: 'FeedMemberResponse', isSingle: true },
1590
+ };
1591
+ return decode(typeMappings, input);
1592
+ };
1586
1593
  decoders.FeedResponse = (input) => {
1587
1594
  const typeMappings = {
1588
1595
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -1656,6 +1663,7 @@ decoders.FlagUpdatedEvent = (input) => {
1656
1663
  };
1657
1664
  decoders.FollowBatchResponse = (input) => {
1658
1665
  const typeMappings = {
1666
+ created: { type: 'FollowResponse', isSingle: false },
1659
1667
  follows: { type: 'FollowResponse', isSingle: false },
1660
1668
  };
1661
1669
  return decode(typeMappings, input);
@@ -2369,6 +2377,12 @@ decoders.NotificationStatusResponse = (input) => {
2369
2377
  };
2370
2378
  return decode(typeMappings, input);
2371
2379
  };
2380
+ decoders.OwnBatchResponse = (input) => {
2381
+ const typeMappings = {
2382
+ data: { type: 'FeedOwnData', isSingle: false },
2383
+ };
2384
+ return decode(typeMappings, input);
2385
+ };
2372
2386
  decoders.OwnUser = (input) => {
2373
2387
  const typeMappings = {
2374
2388
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -2610,6 +2624,16 @@ decoders.QueryCallSessionParticipantStatsTimelineResponse = (input) => {
2610
2624
  };
2611
2625
  return decode(typeMappings, input);
2612
2626
  };
2627
+ decoders.QueryCallStatsMapResponse = (input) => {
2628
+ const typeMappings = {
2629
+ call_ended_at: { type: 'DatetimeType', isSingle: true },
2630
+ call_started_at: { type: 'DatetimeType', isSingle: true },
2631
+ end_time: { type: 'DatetimeType', isSingle: true },
2632
+ generated_at: { type: 'DatetimeType', isSingle: true },
2633
+ start_time: { type: 'DatetimeType', isSingle: true },
2634
+ };
2635
+ return decode(typeMappings, input);
2636
+ };
2613
2637
  decoders.QueryCallStatsResponse = (input) => {
2614
2638
  const typeMappings = {
2615
2639
  reports: { type: 'CallStatsReportSummaryResponse', isSingle: false },
@@ -4903,6 +4927,23 @@ class VideoApi {
4903
4927
  decoders.DeleteTranscriptionResponse?.(response.body);
4904
4928
  return { ...response.body, metadata: response.metadata };
4905
4929
  }
4930
+ async getCallStatsMap(request) {
4931
+ const queryParams = {
4932
+ start_time: request?.start_time,
4933
+ end_time: request?.end_time,
4934
+ exclude_publishers: request?.exclude_publishers,
4935
+ exclude_subscribers: request?.exclude_subscribers,
4936
+ exclude_sfus: request?.exclude_sfus,
4937
+ };
4938
+ const pathParams = {
4939
+ call_type: request?.call_type,
4940
+ call_id: request?.call_id,
4941
+ session: request?.session,
4942
+ };
4943
+ const response = await this.apiClient.sendRequest('GET', '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/map', pathParams, queryParams);
4944
+ decoders.QueryCallStatsMapResponse?.(response.body);
4945
+ return { ...response.body, metadata: response.metadata };
4946
+ }
4906
4947
  async getCallSessionParticipantStatsDetails(request) {
4907
4948
  const queryParams = {
4908
4949
  since: request?.since,
@@ -7058,7 +7099,7 @@ class ApiClient {
7058
7099
  const headers = {
7059
7100
  Authorization: this.apiConfig.token,
7060
7101
  'stream-auth-type': 'jwt',
7061
- 'X-Stream-Client': 'stream-node-' + "0.7.24",
7102
+ 'X-Stream-Client': 'stream-node-' + "0.7.26",
7062
7103
  'Accept-Encoding': 'gzip',
7063
7104
  'x-client-request-id': clientRequestId,
7064
7105
  };
@@ -7690,6 +7731,7 @@ class FeedsApi {
7690
7731
  view: request?.view,
7691
7732
  watch: request?.watch,
7692
7733
  data: request?.data,
7734
+ enrichment_options: request?.enrichment_options,
7693
7735
  external_ranking: request?.external_ranking,
7694
7736
  filter: request?.filter,
7695
7737
  followers_pagination: request?.followers_pagination,
@@ -7980,14 +8022,24 @@ class FeedsApi {
7980
8022
  decoders.CreateFeedsBatchResponse?.(response.body);
7981
8023
  return { ...response.body, metadata: response.metadata };
7982
8024
  }
7983
- async ownCapabilitiesBatch(request) {
8025
+ async deleteFeedsBatch(request) {
8026
+ const body = {
8027
+ feeds: request?.feeds,
8028
+ hard_delete: request?.hard_delete,
8029
+ };
8030
+ const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feeds/delete', undefined, undefined, body, 'application/json');
8031
+ decoders.DeleteFeedsBatchResponse?.(response.body);
8032
+ return { ...response.body, metadata: response.metadata };
8033
+ }
8034
+ async ownBatch(request) {
7984
8035
  const body = {
7985
8036
  feeds: request?.feeds,
7986
8037
  user_id: request?.user_id,
8038
+ fields: request?.fields,
7987
8039
  user: request?.user,
7988
8040
  };
7989
- const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feeds/own_capabilities/batch', undefined, undefined, body, 'application/json');
7990
- decoders.OwnCapabilitiesBatchResponse?.(response.body);
8041
+ const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feeds/own/batch', undefined, undefined, body, 'application/json');
8042
+ decoders.OwnBatchResponse?.(response.body);
7991
8043
  return { ...response.body, metadata: response.metadata };
7992
8044
  }
7993
8045
  async _queryFeeds(request) {
@@ -8060,6 +8112,14 @@ class FeedsApi {
8060
8112
  decoders.FollowBatchResponse?.(response.body);
8061
8113
  return { ...response.body, metadata: response.metadata };
8062
8114
  }
8115
+ async getOrCreateFollows(request) {
8116
+ const body = {
8117
+ follows: request?.follows,
8118
+ };
8119
+ const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/follows/batch/upsert', undefined, undefined, body, 'application/json');
8120
+ decoders.FollowBatchResponse?.(response.body);
8121
+ return { ...response.body, metadata: response.metadata };
8122
+ }
8063
8123
  async queryFollows(request) {
8064
8124
  const body = {
8065
8125
  limit: request?.limit,
@@ -8155,6 +8215,14 @@ class FeedsApi {
8155
8215
  decoders.UnfollowBatchResponse?.(response.body);
8156
8216
  return { ...response.body, metadata: response.metadata };
8157
8217
  }
8218
+ async getOrCreateUnfollows(request) {
8219
+ const body = {
8220
+ follows: request?.follows,
8221
+ };
8222
+ const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/unfollow/batch/upsert', undefined, undefined, body, 'application/json');
8223
+ decoders.UnfollowBatchResponse?.(response.body);
8224
+ return { ...response.body, metadata: response.metadata };
8225
+ }
8158
8226
  async deleteFeedUserData(request) {
8159
8227
  const pathParams = {
8160
8228
  user_id: request?.user_id,
@@ -8275,6 +8343,18 @@ class StreamFeedsClient extends FeedsApi {
8275
8343
  this.addReaction = (request) => {
8276
8344
  return super.addActivityReaction(request);
8277
8345
  };
8346
+ /**
8347
+ * @deprecated use `getOrCreateFollows` instead
8348
+ */
8349
+ this.followBatch = (request) => {
8350
+ return super.followBatch(request);
8351
+ };
8352
+ /**
8353
+ * @deprecated use `getOrCreateUnfollows` instead
8354
+ */
8355
+ this.followUnbatch = (request) => {
8356
+ return super.unfollowBatch(request);
8357
+ };
8278
8358
  }
8279
8359
  }
8280
8360