@stream-io/feeds-client 0.3.17 → 0.3.18

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.3.18](https://github.com/GetStream/stream-feeds-js/compare/@stream-io/feeds-client-0.3.17...@stream-io/feeds-client-0.3.18) (2025-12-10)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * backfill current feed ([#187](https://github.com/GetStream/stream-feeds-js/issues/187)) ([e215250](https://github.com/GetStream/stream-feeds-js/commit/e215250141aae281464fcec6267934c9a1aecb11))
11
+
5
12
  ## [0.3.17](https://github.com/GetStream/stream-feeds-js/compare/@stream-io/feeds-client-0.3.16...@stream-io/feeds-client-0.3.17) (2025-12-08)
6
13
 
7
14
 
package/README.md CHANGED
@@ -1,9 +1,36 @@
1
+ # Official plain JS SDK and low-level client for Stream Feeds
1
2
 
3
+ Bring users together through personalized feeds, threaded discussions, and real-time updates that make every interaction feel meaningful.
2
4
 
5
+ ## **Quick Links**
3
6
 
7
+ - [Register](https://getstream.io/chat/trial/) to get an API key for Stream Feeds
8
+ - [React Sample apps](../../#react-sample-apps)
9
+ - [Docs](https://getstream.io/activity-feeds/docs/)
4
10
 
11
+ ## What is Stream?
5
12
 
13
+ Stream allows developers to rapidly deploy scalable feeds, chat messaging and video with an industry leading 99.999% uptime SLA guarantee.
6
14
 
15
+ Stream's Activity Feed V3 SDK enables teams of all sizes to build scalable activity feeds. The best place to get started is to follow the tutorial:
7
16
 
17
+ TODO
8
18
 
19
+ ## 👩‍💻 Free for Makers 👨‍💻
9
20
 
21
+ Stream is free for most side and hobby projects. To qualify, your project/company needs to have < 5 team members and < $10k in monthly revenue. Makers get $100 in monthly credit for feeds for free.
22
+
23
+ ## 💡 Supported Features 💡
24
+
25
+ Here are some of the features we support:
26
+
27
+ - **For-You feed**: Most modern apps combine a “For You” feed with a regular “Following” feed. With activity selectors you can:
28
+ - surface popular activities
29
+ - show activities near the user
30
+ - match activities to a user’s interests
31
+ - mix-and-match these selectors to build an engaging personalized feed.
32
+ - **Comments**: Voting, threading, images, URL previews, @mentions & notifications. Basically all the features of Reddit style commenting systems.
33
+ - **Advanced feed features**: Activity expiration • visibility controls • feed visibility levels • feed members • bookmarking • follow-approval flow • stories support.
34
+ - **Activity filtering**: Filter activity feeds with almost no hit to performance
35
+ - **Search & queries**: Activity search, **query activities**, and **query feeds** endpoints.
36
+ - **Modern essentials**: Permissions • OpenAPI spec • GDPR endpoints • realtime WebSocket events • push notifications • “own capabilities” API.
package/dist/cjs/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const stateStore = require("@stream-io/state-store");
4
- const feedsClient = require("../feeds-client-BGF3utPy.js");
4
+ const feedsClient = require("../feeds-client-Be5gS8Xx.js");
5
5
  const loggerInternal = require("@stream-io/logger");
6
6
  const ChannelOwnCapability = {
7
7
  BAN_CHANNEL_MEMBERS: "ban-channel-members",
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const require$$0 = require("react");
4
4
  require("@stream-io/state-store");
5
- const feedsClient = require("../feeds-client-BGF3utPy.js");
5
+ const feedsClient = require("../feeds-client-Be5gS8Xx.js");
6
6
  require("axios");
7
7
  var shim = { exports: {} };
8
8
  var useSyncExternalStoreShim_production = {};
package/dist/es/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { StateStore } from "@stream-io/state-store";
2
2
  export * from "@stream-io/state-store";
3
- import { d as debounce } from "../feeds-client-Bq_SWnZW.mjs";
4
- import { A, C, a, F, S, b, c, n, m, k, g, e, h, f, j, i, r, s, u, l } from "../feeds-client-Bq_SWnZW.mjs";
3
+ import { d as debounce } from "../feeds-client-DT_p8LU4.mjs";
4
+ import { A, C, a, F, S, b, c, n, m, k, g, e, h, f, j, i, r, s, u, l } from "../feeds-client-DT_p8LU4.mjs";
5
5
  import { LogLevelEnum } from "@stream-io/logger";
6
6
  const ChannelOwnCapability = {
7
7
  BAN_CHANNEL_MEMBERS: "ban-channel-members",
@@ -1,6 +1,6 @@
1
1
  import require$$0, { useCallback, useMemo, useState, useEffect, createContext, useContext, useRef } from "react";
2
2
  import "@stream-io/state-store";
3
- import { F as FeedsClient, g as isCommentResponse, c as checkHasAnotherPage } from "../feeds-client-Bq_SWnZW.mjs";
3
+ import { F as FeedsClient, g as isCommentResponse, c as checkHasAnotherPage } from "../feeds-client-DT_p8LU4.mjs";
4
4
  import "axios";
5
5
  var shim = { exports: {} };
6
6
  var useSyncExternalStoreShim_production = {};
@@ -3932,7 +3932,7 @@ const getRateLimitFromResponseHeader = (response_headers) => {
3932
3932
  };
3933
3933
  return result;
3934
3934
  };
3935
- const version = "0.3.17";
3935
+ const version = "0.3.18";
3936
3936
  class ApiClient {
3937
3937
  constructor(apiKey, tokenManager, connectionIdManager, options) {
3938
3938
  this.apiKey = apiKey;
@@ -5297,13 +5297,10 @@ const sharedUpdateActivity$6 = ({
5297
5297
  if (eventBelongsToCurrentUser) {
5298
5298
  newOwnBookmarks = [...newOwnBookmarks, event.bookmark];
5299
5299
  }
5300
- if (!event.bookmark.activity.current_feed && event.bookmark.activity.feeds.length === 1 && currentActivity.current_feed) {
5301
- event.bookmark.activity.current_feed = currentActivity.current_feed;
5302
- }
5303
5300
  return {
5304
- ...event.bookmark.activity,
5305
- own_bookmarks: newOwnBookmarks,
5306
- own_reactions: currentActivity.own_reactions
5301
+ ...currentActivity,
5302
+ bookmark_count: event.bookmark.activity.bookmark_count,
5303
+ own_bookmarks: newOwnBookmarks
5307
5304
  };
5308
5305
  };
5309
5306
  const addBookmarkToActivities = (event, activities, eventBelongsToCurrentUser) => updateEntityInArray({
@@ -5373,13 +5370,10 @@ const sharedUpdateActivity$5 = ({
5373
5370
  (bookmark) => !isSameBookmark(bookmark, event.bookmark)
5374
5371
  );
5375
5372
  }
5376
- if (!event.bookmark.activity.current_feed && event.bookmark.activity.feeds.length === 1 && currentActivity.current_feed) {
5377
- event.bookmark.activity.current_feed = currentActivity.current_feed;
5378
- }
5379
5373
  return {
5380
- ...event.bookmark.activity,
5381
- own_bookmarks: newOwnBookmarks,
5382
- own_reactions: currentActivity.own_reactions
5374
+ ...currentActivity,
5375
+ bookmark_count: event.bookmark.activity.bookmark_count,
5376
+ own_bookmarks: newOwnBookmarks
5383
5377
  };
5384
5378
  };
5385
5379
  const removeBookmarkFromActivities = (event, activities, eventBelongsToCurrentUser) => updateEntityInArray({
@@ -5451,9 +5445,9 @@ const sharedUpdateActivity$4 = ({
5451
5445
  }
5452
5446
  }
5453
5447
  return {
5454
- ...event.bookmark.activity,
5455
- own_bookmarks: newOwnBookmarks,
5456
- own_reactions: currentActivity.own_reactions
5448
+ ...currentActivity,
5449
+ bookmark_count: event.bookmark.activity.bookmark_count,
5450
+ own_bookmarks: newOwnBookmarks
5457
5451
  };
5458
5452
  };
5459
5453
  const updateBookmarkInActivities = (event, activities, eventBelongsToCurrentUser) => updateEntityInArray({
@@ -5611,9 +5605,6 @@ const updateActivity = ({
5611
5605
  currentActivity,
5612
5606
  newActivtiy
5613
5607
  }) => {
5614
- if (!newActivtiy.current_feed && newActivtiy.feeds.length === 1 && currentActivity.current_feed) {
5615
- newActivtiy.current_feed = currentActivity.current_feed;
5616
- }
5617
5608
  return {
5618
5609
  ...newActivtiy,
5619
5610
  own_reactions: currentActivity.own_reactions,
@@ -5663,12 +5654,6 @@ function handleActivityUpdated(payload, fromWs) {
5663
5654
  activities: currentActivities,
5664
5655
  pinned_activities: currentPinnedActivities
5665
5656
  } = this.currentState;
5666
- const currentActivity = currentActivities?.find(
5667
- (a) => a.id === payload.activity.id
5668
- );
5669
- if (!payload.activity.current_feed && payload.activity.feeds.length === 1 && currentActivity?.current_feed) {
5670
- payload.activity.current_feed = currentActivity.current_feed;
5671
- }
5672
5657
  const [result1, result2] = [
5673
5658
  this.hasActivity(payload.activity.id) ? updateActivityInState(payload, currentActivities) : void 0,
5674
5659
  updatePinnedActivityInState(payload, currentPinnedActivities)
@@ -6832,6 +6817,19 @@ const _Feed = class _Feed extends FeedApi {
6832
6817
  handleWSEvent(event) {
6833
6818
  const eventHandler = this.eventHandlers[event.type];
6834
6819
  if (eventHandler !== _Feed.noop) {
6820
+ if ("activity" in event && this.hasActivity(event.activity.id)) {
6821
+ const currentActivity = this.currentState.activities?.find(
6822
+ (a) => a.id === event.activity.id
6823
+ );
6824
+ if (event.activity.feeds.length > 1 && !event.activity.current_feed && currentActivity?.current_feed) {
6825
+ event.activity.current_feed = currentActivity.current_feed;
6826
+ }
6827
+ if (event.activity.feeds.length === 1 && event.activity.current_feed && currentActivity?.current_feed) {
6828
+ event.activity.current_feed.own_capabilities = currentActivity.current_feed.own_capabilities;
6829
+ event.activity.current_feed.own_follows = currentActivity.current_feed.own_follows;
6830
+ event.activity.current_feed.own_membership = currentActivity.current_feed.own_membership;
6831
+ }
6832
+ }
6835
6833
  eventHandler?.(event);
6836
6834
  }
6837
6835
  if (typeof eventHandler === "undefined") {
@@ -7766,4 +7764,4 @@ exports.replaceUniqueArrayMerge = replaceUniqueArrayMerge;
7766
7764
  exports.shouldUpdateState = shouldUpdateState;
7767
7765
  exports.uniqueArrayMerge = uniqueArrayMerge;
7768
7766
  exports.updateEntityInArray = updateEntityInArray;
7769
- //# sourceMappingURL=feeds-client-BGF3utPy.js.map
7767
+ //# sourceMappingURL=feeds-client-Be5gS8Xx.js.map