@stream-io/feeds-client 0.2.20 → 0.3.0
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 +21 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/react-bindings.js +1 -57
- package/dist/cjs/react-bindings.js.map +1 -1
- package/dist/es/index.mjs +2 -2
- package/dist/es/react-bindings.mjs +1 -57
- package/dist/es/react-bindings.mjs.map +1 -1
- package/dist/{feeds-client-BlR_3zy2.js → feeds-client-DmA8dntK.js} +2 -2
- package/dist/{feeds-client-BlR_3zy2.js.map → feeds-client-DmA8dntK.js.map} +1 -1
- package/dist/{feeds-client-BObWT4vl.mjs → feeds-client-DuLOUu6_.mjs} +2 -2
- package/dist/{feeds-client-BObWT4vl.mjs.map → feeds-client-DuLOUu6_.mjs.map} +1 -1
- package/dist/types/bindings/react/contexts/StreamFeedContext.d.ts +2 -2
- package/dist/types/bindings/react/contexts/StreamFeedsContext.d.ts +2 -2
- package/dist/types/bindings/react/contexts/StreamSearchContext.d.ts +2 -2
- package/dist/types/bindings/react/contexts/StreamSearchResultsContext.d.ts +2 -2
- package/dist/types/bindings/react/hooks/client-state-hooks/useClientConnectedUser.d.ts +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useAggregatedActivities.d.ts +2 -2
- package/dist/types/bindings/react/hooks/feed-state-hooks/useComments.d.ts +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useFeedActivities.d.ts +3 -3
- package/dist/types/bindings/react/hooks/feed-state-hooks/useFeedMetadata.d.ts +2 -2
- package/dist/types/bindings/react/hooks/feed-state-hooks/useFollowers.d.ts +4 -4
- package/dist/types/bindings/react/hooks/feed-state-hooks/useFollowing.d.ts +4 -4
- package/dist/types/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivityRead.d.ts +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useIsAggregatedActivitySeen.d.ts +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useNotificationStatus.d.ts +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useOwnCapabilities.d.ts +1 -1
- package/dist/types/bindings/react/hooks/feed-state-hooks/useOwnFollows.d.ts +2 -2
- package/dist/types/bindings/react/hooks/search-state-hooks/useSearchQuery.d.ts +1 -1
- package/dist/types/bindings/react/hooks/search-state-hooks/useSearchResult.d.ts +2 -2
- package/dist/types/bindings/react/hooks/search-state-hooks/useSearchSources.d.ts +2 -2
- package/dist/types/bindings/react/hooks/useCreateFeedsClient.d.ts +1 -1
- package/dist/types/bindings/react/index.d.ts +0 -1
- package/dist/types/bindings/react/index.d.ts.map +1 -1
- package/dist/types/bindings/react/wrappers/StreamFeed.d.ts +2 -2
- package/dist/types/bindings/react/wrappers/StreamFeeds.d.ts +2 -2
- package/dist/types/bindings/react/wrappers/StreamSearch.d.ts +2 -2
- package/dist/types/bindings/react/wrappers/StreamSearchResults.d.ts +2 -2
- package/dist/types/common/ApiClient.d.ts +3 -3
- package/dist/types/common/EventDispatcher.d.ts +1 -1
- package/dist/types/common/Poll.d.ts +2 -2
- package/dist/types/common/rate-limit.d.ts +1 -1
- package/dist/types/common/real-time/StableWSConnection.d.ts +6 -6
- package/dist/types/common/real-time/event-models.d.ts +1 -2
- package/dist/types/common/search/ActivitySearchSource.d.ts +3 -3
- package/dist/types/common/search/BaseSearchSource.d.ts +2 -2
- package/dist/types/common/search/FeedSearchSource.d.ts +3 -3
- package/dist/types/common/search/SearchController.d.ts +1 -1
- package/dist/types/common/search/UserSearchSource.d.ts +4 -4
- package/dist/types/common/types.d.ts +1 -1
- package/dist/types/feed/event-handlers/activity/handle-activity-added.d.ts +3 -3
- package/dist/types/feed/event-handlers/activity/handle-activity-deleted.d.ts +3 -3
- package/dist/types/feed/event-handlers/activity/handle-activity-marked.d.ts +3 -3
- package/dist/types/feed/event-handlers/activity/handle-activity-pinned.d.ts +2 -2
- package/dist/types/feed/event-handlers/activity/handle-activity-reaction-added.d.ts +3 -3
- package/dist/types/feed/event-handlers/activity/handle-activity-reaction-deleted.d.ts +3 -3
- package/dist/types/feed/event-handlers/activity/handle-activity-reaction-updated.d.ts +3 -3
- package/dist/types/feed/event-handlers/activity/handle-activity-removed-from-feed.d.ts +2 -2
- package/dist/types/feed/event-handlers/activity/handle-activity-unpinned.d.ts +2 -2
- package/dist/types/feed/event-handlers/activity/handle-activity-updated.d.ts +3 -3
- package/dist/types/feed/event-handlers/activity-updater.d.ts +14 -14
- package/dist/types/feed/event-handlers/add-aggregated-activities-to-state.d.ts +2 -2
- package/dist/types/feed/event-handlers/bookmark/handle-bookmark-added.d.ts +3 -3
- package/dist/types/feed/event-handlers/bookmark/handle-bookmark-deleted.d.ts +3 -3
- package/dist/types/feed/event-handlers/bookmark/handle-bookmark-updated.d.ts +3 -3
- package/dist/types/feed/event-handlers/comment/handle-comment-added.d.ts +2 -2
- package/dist/types/feed/event-handlers/comment/handle-comment-deleted.d.ts +2 -3
- package/dist/types/feed/event-handlers/comment/handle-comment-reaction-added.d.ts +2 -3
- package/dist/types/feed/event-handlers/comment/handle-comment-reaction-deleted.d.ts +2 -3
- package/dist/types/feed/event-handlers/comment/handle-comment-reaction-updated.d.ts +2 -3
- package/dist/types/feed/event-handlers/comment/handle-comment-updated.d.ts +2 -3
- package/dist/types/feed/event-handlers/comment/utils/update-comment-count.d.ts +1 -2
- package/dist/types/feed/event-handlers/feed/handle-feed-updated.d.ts +2 -2
- package/dist/types/feed/event-handlers/feed-member/handle-feed-member-added.d.ts +2 -2
- package/dist/types/feed/event-handlers/feed-member/handle-feed-member-removed.d.ts +2 -2
- package/dist/types/feed/event-handlers/feed-member/handle-feed-member-updated.d.ts +2 -2
- package/dist/types/feed/event-handlers/follow/handle-follow-created.d.ts +3 -3
- package/dist/types/feed/event-handlers/follow/handle-follow-deleted.d.ts +3 -3
- package/dist/types/feed/event-handlers/follow/handle-follow-updated.d.ts +2 -2
- package/dist/types/feed/event-handlers/notification-feed/handle-notification-feed-updated.d.ts +3 -3
- package/dist/types/feed/event-handlers/story-feeds/handle-story-feeds-updated.d.ts +3 -3
- package/dist/types/feed/event-handlers/watch/handle-watch-started.d.ts +1 -1
- package/dist/types/feed/event-handlers/watch/handle-watch-stopped.d.ts +1 -1
- package/dist/types/feed/feed.d.ts +9 -9
- package/dist/types/feeds-client/event-handlers/user/handle-user-updated.d.ts +2 -2
- package/dist/types/feeds-client/feeds-client.d.ts +15 -15
- package/dist/types/gen/feeds/FeedApi.d.ts +2 -2
- package/dist/types/gen/feeds/FeedsApi.d.ts +2 -2
- package/dist/types/gen/model-decoders/event-decoder-mapping.d.ts +1 -1
- package/dist/types/gen/moderation/ModerationApi.d.ts +2 -2
- package/dist/types/types-internal.d.ts +1 -1
- package/dist/types/types.d.ts +4 -5
- package/dist/types/utils/event-triggered-by-connected-user.d.ts +2 -2
- package/dist/types/utils/logger.d.ts +10 -10
- package/dist/types/utils/state-update-queue.d.ts +4 -4
- package/dist/types/utils/throttling/throttled-get-batched-own-capabilities.d.ts +2 -2
- package/dist/types/utils/type-assertions.d.ts +2 -2
- package/package.json +6 -6
- package/src/bindings/react/index.ts +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types/bindings/react/hooks/util/index.d.ts +0 -3
- package/dist/types/bindings/react/hooks/util/index.d.ts.map +0 -1
- package/dist/types/bindings/react/hooks/util/useBookmarkActions.d.ts +0 -14
- package/dist/types/bindings/react/hooks/util/useBookmarkActions.d.ts.map +0 -1
- package/dist/types/bindings/react/hooks/util/useReactionActions.d.ts +0 -18
- package/dist/types/bindings/react/hooks/util/useReactionActions.d.ts.map +0 -1
- package/src/bindings/react/hooks/util/index.ts +0 -2
- package/src/bindings/react/hooks/util/useBookmarkActions.ts +0 -40
- package/src/bindings/react/hooks/util/useReactionActions.ts +0 -57
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.3.0](https://github.com/GetStream/stream-feeds-js/compare/@stream-io/feeds-client-0.2.21...@stream-io/feeds-client-0.3.0) (2025-10-22)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* remove unstable util hooks (#146)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* remove unstable util hooks ([#146](https://github.com/GetStream/stream-feeds-js/issues/146)) ([ac2f6b2](https://github.com/GetStream/stream-feeds-js/commit/ac2f6b26887286695f1c6a31a5616ef4fc0166e0))
|
|
15
|
+
|
|
16
|
+
## [0.2.21](https://github.com/GetStream/stream-feeds-js/compare/@stream-io/feeds-client-0.2.20...@stream-io/feeds-client-0.2.21) (2025-10-22)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
* fix tests ([d076fcf](https://github.com/GetStream/stream-feeds-js/commit/d076fcf3838bb46795b73796462ac083841cb7b6))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* resolve [@self](https://github.com/self) in emitted declarations ([#143](https://github.com/GetStream/stream-feeds-js/issues/143)) ([30f7966](https://github.com/GetStream/stream-feeds-js/commit/30f796633a18b49fcea4f0275fd85748f70e44f3)), closes [#142](https://github.com/GetStream/stream-feeds-js/issues/142)
|
|
25
|
+
|
|
5
26
|
## [0.2.20](https://github.com/GetStream/stream-feeds-js/compare/@stream-io/feeds-client-0.2.19...@stream-io/feeds-client-0.2.20) (2025-10-20)
|
|
6
27
|
|
|
7
28
|
|
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-
|
|
4
|
+
const feedsClient = require("../feeds-client-DmA8dntK.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-
|
|
5
|
+
const feedsClient = require("../feeds-client-DmA8dntK.js");
|
|
6
6
|
require("@stream-io/logger");
|
|
7
7
|
require("axios");
|
|
8
8
|
var shim = { exports: {} };
|
|
@@ -735,60 +735,6 @@ const useSearchSources = (controllerFromProps) => {
|
|
|
735
735
|
const selector = ({ sources }) => ({
|
|
736
736
|
sources
|
|
737
737
|
});
|
|
738
|
-
const useReactionActions = ({
|
|
739
|
-
entity,
|
|
740
|
-
type
|
|
741
|
-
}) => {
|
|
742
|
-
const client = useFeedsClient();
|
|
743
|
-
const isComment = feedsClient.isCommentResponse(entity);
|
|
744
|
-
const hasOwnReaction = require$$0.useMemo(
|
|
745
|
-
() => !!entity.own_reactions?.find((r) => r.type === type),
|
|
746
|
-
[entity.own_reactions, type]
|
|
747
|
-
);
|
|
748
|
-
const addReaction = useStableCallback(async () => {
|
|
749
|
-
await (isComment ? client?.addCommentReaction({ id: entity.id, type }) : client?.addActivityReaction({ activity_id: entity.id, type }));
|
|
750
|
-
});
|
|
751
|
-
const removeReaction = useStableCallback(async () => {
|
|
752
|
-
await (isComment ? client?.deleteCommentReaction({ id: entity.id, type }) : client?.deleteActivityReaction({
|
|
753
|
-
activity_id: entity.id,
|
|
754
|
-
type
|
|
755
|
-
}));
|
|
756
|
-
});
|
|
757
|
-
const toggleReaction = useStableCallback(async () => {
|
|
758
|
-
if (hasOwnReaction) {
|
|
759
|
-
await removeReaction();
|
|
760
|
-
} else {
|
|
761
|
-
await addReaction();
|
|
762
|
-
}
|
|
763
|
-
});
|
|
764
|
-
return require$$0.useMemo(
|
|
765
|
-
() => ({ addReaction, removeReaction, toggleReaction }),
|
|
766
|
-
[addReaction, removeReaction, toggleReaction]
|
|
767
|
-
);
|
|
768
|
-
};
|
|
769
|
-
const useBookmarkActions = ({
|
|
770
|
-
entity
|
|
771
|
-
}) => {
|
|
772
|
-
const client = useFeedsClient();
|
|
773
|
-
const hasOwnBookmark = entity.own_bookmarks?.length > 0;
|
|
774
|
-
const addBookmark = useStableCallback(async () => {
|
|
775
|
-
await client?.addBookmark({ activity_id: entity.id });
|
|
776
|
-
});
|
|
777
|
-
const removeBookmark = useStableCallback(async () => {
|
|
778
|
-
await client?.deleteBookmark({ activity_id: entity.id });
|
|
779
|
-
});
|
|
780
|
-
const toggleBookmark = useStableCallback(async () => {
|
|
781
|
-
if (hasOwnBookmark) {
|
|
782
|
-
await removeBookmark();
|
|
783
|
-
} else {
|
|
784
|
-
await addBookmark();
|
|
785
|
-
}
|
|
786
|
-
});
|
|
787
|
-
return require$$0.useMemo(
|
|
788
|
-
() => ({ addBookmark, removeBookmark, toggleBookmark }),
|
|
789
|
-
[addBookmark, removeBookmark, toggleBookmark]
|
|
790
|
-
);
|
|
791
|
-
};
|
|
792
738
|
var jsxRuntime = { exports: {} };
|
|
793
739
|
var reactJsxRuntime_production = {};
|
|
794
740
|
/**
|
|
@@ -1323,7 +1269,6 @@ exports.StreamSearchContext = StreamSearchContext;
|
|
|
1323
1269
|
exports.StreamSearchResults = StreamSearchResults;
|
|
1324
1270
|
exports.StreamSearchResultsContext = StreamSearchResultsContext;
|
|
1325
1271
|
exports.useAggregatedActivities = useAggregatedActivities;
|
|
1326
|
-
exports.useBookmarkActions = useBookmarkActions;
|
|
1327
1272
|
exports.useClientConnectedUser = useClientConnectedUser;
|
|
1328
1273
|
exports.useComments = useComments;
|
|
1329
1274
|
exports.useCreateFeedsClient = useCreateFeedsClient;
|
|
@@ -1338,7 +1283,6 @@ exports.useIsAggregatedActivitySeen = useIsAggregatedActivitySeen;
|
|
|
1338
1283
|
exports.useNotificationStatus = useNotificationStatus;
|
|
1339
1284
|
exports.useOwnCapabilities = useOwnCapabilities;
|
|
1340
1285
|
exports.useOwnFollows = useOwnFollows;
|
|
1341
|
-
exports.useReactionActions = useReactionActions;
|
|
1342
1286
|
exports.useSearchContext = useSearchContext;
|
|
1343
1287
|
exports.useSearchQuery = useSearchQuery;
|
|
1344
1288
|
exports.useSearchResult = useSearchResult;
|