@stream-io/feeds-client 0.2.20 → 0.2.21
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 +10 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/react-bindings.js +1 -1
- package/dist/es/index.mjs +2 -2
- package/dist/es/react-bindings.mjs +1 -1
- package/dist/{feeds-client-BlR_3zy2.js → feeds-client--EbdwYrY.js} +2 -2
- package/dist/{feeds-client-BlR_3zy2.js.map → feeds-client--EbdwYrY.js.map} +1 -1
- package/dist/{feeds-client-BObWT4vl.mjs → feeds-client-5nGcdeuG.mjs} +2 -2
- package/dist/{feeds-client-BObWT4vl.mjs.map → feeds-client-5nGcdeuG.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/hooks/util/useBookmarkActions.d.ts +4 -4
- package/dist/types/bindings/react/hooks/util/useReactionActions.d.ts +4 -4
- 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/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const StreamFeedContext: import(
|
|
1
|
+
import { Feed } from '../../..';
|
|
2
|
+
export declare const StreamFeedContext: import('react').Context<Feed | undefined>;
|
|
3
3
|
/**
|
|
4
4
|
* The props for the StreamFeedProvider component.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const StreamFeedsContext: import(
|
|
1
|
+
import { FeedsClient } from '../../..';
|
|
2
|
+
export declare const StreamFeedsContext: import('react').Context<FeedsClient | undefined>;
|
|
3
3
|
/**
|
|
4
4
|
* The props for the StreamFeedsProvider component.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const StreamSearchContext: import(
|
|
1
|
+
import { SearchController } from '../../..';
|
|
2
|
+
export declare const StreamSearchContext: import('react').Context<SearchController | undefined>;
|
|
3
3
|
/**
|
|
4
4
|
* The props for the StreamSearchProvider component.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const StreamSearchResultsContext: import(
|
|
1
|
+
import { SearchSource } from '../../..';
|
|
2
|
+
export declare const StreamSearchResultsContext: import('react').Context<SearchSource<any> | undefined>;
|
|
3
3
|
/**
|
|
4
4
|
* The props for the StreamSearchResultsProvider component.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A React hook that returns the currently connected user on a `FeedsClient` instance and null otherwise.
|
|
3
3
|
*/
|
|
4
|
-
export declare const useClientConnectedUser: () => import(
|
|
4
|
+
export declare const useClientConnectedUser: () => import('../../../..').OwnUser | undefined;
|
|
5
5
|
//# sourceMappingURL=useClientConnectedUser.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Feed, FeedState } from '../../../..';
|
|
2
2
|
declare const selector: ({ is_loading_activities, next, aggregated_activities, }: FeedState) => {
|
|
3
3
|
is_loading: boolean;
|
|
4
4
|
has_next_page: boolean;
|
|
5
|
-
aggregated_activities: import(
|
|
5
|
+
aggregated_activities: import('../../../..').AggregatedActivityResponse[];
|
|
6
6
|
};
|
|
7
7
|
type UseAggregatedActivitiesReturnType = ReturnType<typeof selector> & {
|
|
8
8
|
loadNextPage: () => Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ActivityResponse, CommentResponse, CommentParent, Feed, FeedState } from '../../../..';
|
|
2
2
|
type UseCommentsReturnType<T extends ActivityResponse | CommentResponse> = {
|
|
3
3
|
comments: NonNullable<FeedState['comments_by_entity_id'][T['id']]>['comments'];
|
|
4
4
|
comments_pagination: NonNullable<FeedState['comments_by_entity_id'][T['id']]>['pagination'];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Feed } from '../../../..';
|
|
2
2
|
/**
|
|
3
3
|
* A React hook that returns a reactive object containing the current activities,
|
|
4
4
|
* loading state and whether there is a next page to paginate to or not.
|
|
5
5
|
*/
|
|
6
6
|
export declare const useFeedActivities: (feedFromProps?: Feed) => {
|
|
7
|
-
loadNextPage: import(
|
|
7
|
+
loadNextPage: import('../internal').StableCallback<[], Promise<void>>;
|
|
8
8
|
is_loading?: boolean | undefined;
|
|
9
9
|
has_next_page?: boolean | undefined;
|
|
10
|
-
activities?: import(
|
|
10
|
+
activities?: import('../../../..').ActivityResponse[] | undefined;
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=useFeedActivities.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Feed } from '../../../..';
|
|
2
2
|
/**
|
|
3
3
|
* A React hook that returns a reactive object containing some often used
|
|
4
4
|
* metadata for a feed.
|
|
5
5
|
*/
|
|
6
6
|
export declare const useFeedMetadata: (feedFromProps?: Feed) => {
|
|
7
|
-
created_by: import(
|
|
7
|
+
created_by: import('../../../..').UserResponse | undefined;
|
|
8
8
|
follower_count: number;
|
|
9
9
|
following_count: number;
|
|
10
10
|
created_at: Date | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Feed, FeedState } from '../../../..';
|
|
2
2
|
declare const selector: ({ follower_count, followers, followers_pagination, }: FeedState) => {
|
|
3
3
|
follower_count: number | undefined;
|
|
4
|
-
followers: import(
|
|
5
|
-
followers_pagination: (import(
|
|
6
|
-
sort?: import(
|
|
4
|
+
followers: import('../../../..').FollowResponse[] | undefined;
|
|
5
|
+
followers_pagination: (import('../../../..').PagerResponse & import('../../../..').LoadingStates & {
|
|
6
|
+
sort?: import('../../../..').SortParamRequest[];
|
|
7
7
|
}) | undefined;
|
|
8
8
|
};
|
|
9
9
|
type UseFollowersReturnType = ReturnType<typeof selector> & {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Feed, FeedState } from '../../../..';
|
|
2
2
|
declare const selector: ({ following_count, following, following_pagination, }: FeedState) => {
|
|
3
3
|
following_count: number | undefined;
|
|
4
|
-
following: import(
|
|
5
|
-
following_pagination: (import(
|
|
6
|
-
sort?: import(
|
|
4
|
+
following: import('../../../..').FollowResponse[] | undefined;
|
|
5
|
+
following_pagination: (import('../../../..').PagerResponse & import('../../../..').LoadingStates & {
|
|
6
|
+
sort?: import('../../../..').SortParamRequest[];
|
|
7
7
|
}) | undefined;
|
|
8
8
|
};
|
|
9
9
|
type UseFollowingReturnType = ReturnType<typeof selector> & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AggregatedActivityResponse, Feed } from '../../../..';
|
|
2
2
|
export declare const useIsAggregatedActivityRead: ({ feed: feedFromProps, aggregatedActivity, }: {
|
|
3
3
|
feed?: Feed;
|
|
4
4
|
aggregatedActivity: AggregatedActivityResponse;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AggregatedActivityResponse, Feed } from '../../../..';
|
|
2
2
|
export declare const useIsAggregatedActivitySeen: ({ feed: feedFromProps, aggregatedActivity, }: {
|
|
3
3
|
feed?: Feed;
|
|
4
4
|
aggregatedActivity: AggregatedActivityResponse;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Feed } from '../../../..';
|
|
2
2
|
/**
|
|
3
3
|
* A React hook that returns a reactive array of feeds that the current user
|
|
4
4
|
* owns and are following the respective feed that we are observing.
|
|
5
5
|
*/
|
|
6
6
|
export declare const useOwnFollows: (feedFromProps?: Feed) => {
|
|
7
|
-
own_follows: import(
|
|
7
|
+
own_follows: import('../../../..').FollowResponse[] | undefined;
|
|
8
8
|
} | undefined;
|
|
9
9
|
//# sourceMappingURL=useOwnFollows.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { SearchSource } from '../../../..';
|
|
2
2
|
export declare const useSearchResult: (sourceFromProps?: SearchSource) => {
|
|
3
3
|
items: any[] | undefined;
|
|
4
4
|
error: Error | undefined;
|
|
5
5
|
isLoading: boolean | undefined;
|
|
6
6
|
hasNext: boolean | undefined;
|
|
7
|
-
loadMore: import(
|
|
7
|
+
loadMore: import('../internal').StableCallback<[], Promise<void>>;
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=useSearchResult.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { SearchController } from '../../../..';
|
|
2
2
|
export declare const useSearchSources: (controllerFromProps?: SearchController) => {
|
|
3
|
-
sources: import(
|
|
3
|
+
sources: import('../../../..').SearchSource<any>[];
|
|
4
4
|
} | undefined;
|
|
5
5
|
//# sourceMappingURL=useSearchSources.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FeedsClient,
|
|
1
|
+
import { FeedsClient, FeedsClientOptions, UserRequest, TokenOrProvider } from '../../..';
|
|
2
2
|
/**
|
|
3
3
|
* A React hook to create, connect and return an instance of `FeedsClient`.
|
|
4
4
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ActivityResponse } from '../../../..';
|
|
2
2
|
/**
|
|
3
3
|
* A utility hook that takes in an entity and creates bookmark actions
|
|
4
4
|
* that can then be used on the UI. The entity is expected to be an ActivityResponse.
|
|
@@ -7,8 +7,8 @@ import type { ActivityResponse } from '@self';
|
|
|
7
7
|
export declare const useBookmarkActions: ({ entity, }: {
|
|
8
8
|
entity: ActivityResponse;
|
|
9
9
|
}) => {
|
|
10
|
-
addBookmark: import(
|
|
11
|
-
removeBookmark: import(
|
|
12
|
-
toggleBookmark: import(
|
|
10
|
+
addBookmark: import('../internal').StableCallback<[], Promise<void>>;
|
|
11
|
+
removeBookmark: import('../internal').StableCallback<[], Promise<void>>;
|
|
12
|
+
toggleBookmark: import('../internal').StableCallback<[], Promise<void>>;
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=useBookmarkActions.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CommentParent } from '../../../..';
|
|
2
2
|
/**
|
|
3
3
|
* A utility hook that takes in an entity and a reaction type, and creates reaction actions
|
|
4
4
|
* that can then be used on the UI. The entity can be either an ActivityResponse or a CommentResponse
|
|
@@ -11,8 +11,8 @@ export declare const useReactionActions: ({ entity, type, }: {
|
|
|
11
11
|
entity: CommentParent;
|
|
12
12
|
type: string;
|
|
13
13
|
}) => {
|
|
14
|
-
addReaction: import(
|
|
15
|
-
removeReaction: import(
|
|
16
|
-
toggleReaction: import(
|
|
14
|
+
addReaction: import('../internal').StableCallback<[], Promise<void>>;
|
|
15
|
+
removeReaction: import('../internal').StableCallback<[], Promise<void>>;
|
|
16
|
+
toggleReaction: import('../internal').StableCallback<[], Promise<void>>;
|
|
17
17
|
};
|
|
18
18
|
//# sourceMappingURL=useReactionActions.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { StreamFeedsContextProps } from '../contexts/StreamFeedsContext';
|
|
3
3
|
export declare const StreamFeeds: {
|
|
4
4
|
({ client, children }: PropsWithChildren<StreamFeedsContextProps>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
displayName: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { SearchController } from '../../..';
|
|
3
3
|
/**
|
|
4
4
|
* The props for the StreamSearch component. It accepts a `SearchController` instance.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { SearchSource } from '../../..';
|
|
3
3
|
/**
|
|
4
4
|
* The props for the StreamSearchResults component. It accepts a `SearchSource` instance.
|
|
5
5
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { RequestMetadata, FeedsClientOptions } from './types';
|
|
2
|
+
import { TokenManager } from './TokenManager';
|
|
3
|
+
import { ConnectionIdManager } from './ConnectionIdManager';
|
|
4
4
|
type RequiredAtLeastOne<T> = {
|
|
5
5
|
[K in keyof T]: Required<Pick<T, K>> & Partial<Omit<T, K>>;
|
|
6
6
|
}[keyof T];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StateStore } from '@stream-io/state-store';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { FeedsClient } from '../feeds-client';
|
|
3
|
+
import { PollVote, QueryPollVotesRequest, PollUpdatedFeedEvent, PollClosedFeedEvent, PollVoteCastedFeedEvent, PollVoteChangedFeedEvent, PollVoteRemovedFeedEvent, Poll as PollType } from '../gen/models';
|
|
4
4
|
export declare const isVoteAnswer: (vote: PollVote) => boolean;
|
|
5
5
|
export type PollAnswersQueryParams = QueryPollVotesRequest & {
|
|
6
6
|
poll_id: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { UserRequest } from '../../gen/models';
|
|
2
|
+
import { TokenManager } from '../TokenManager';
|
|
3
|
+
import { ConnectionIdManager } from '../ConnectionIdManager';
|
|
4
|
+
import { ConnectedEvent } from './event-models';
|
|
5
5
|
export type WSConfig = {
|
|
6
6
|
baseUrl: string;
|
|
7
7
|
user: UserRequest;
|
|
@@ -56,8 +56,8 @@ export declare class StableWSConnection {
|
|
|
56
56
|
private readonly clientId;
|
|
57
57
|
private readonly logger;
|
|
58
58
|
constructor(config: WSConfig, tokenManager: TokenManager, connectionIdManager: ConnectionIdManager, decoders?: Array<(event: any) => any>);
|
|
59
|
-
on: (eventName: "network.changed" | "all" | "app.updated" | "feeds.activity.added" | "feeds.activity.deleted" | "feeds.activity.marked" | "feeds.activity.pinned" | "feeds.activity.reaction.added" | "feeds.activity.reaction.deleted" | "feeds.activity.reaction.updated" | "feeds.activity.removed_from_feed" | "feeds.activity.unpinned" | "feeds.activity.updated" | "feeds.bookmark.added" | "feeds.bookmark.deleted" | "feeds.bookmark.updated" | "feeds.bookmark_folder.deleted" | "feeds.bookmark_folder.updated" | "feeds.comment.added" | "feeds.comment.deleted" | "feeds.comment.reaction.added" | "feeds.comment.reaction.deleted" | "feeds.comment.reaction.updated" | "feeds.comment.updated" | "feeds.feed.created" | "feeds.feed.deleted" | "feeds.feed.updated" | "feeds.feed_group.changed" | "feeds.feed_group.deleted" | "feeds.feed_member.added" | "feeds.feed_member.removed" | "feeds.feed_member.updated" | "feeds.follow.created" | "feeds.follow.deleted" | "feeds.follow.updated" | "feeds.notification_feed.updated" | "feeds.poll.closed" | "feeds.poll.deleted" | "feeds.poll.updated" | "feeds.poll.vote_casted" | "feeds.poll.vote_changed" | "feeds.poll.vote_removed" | "feeds.stories_feed.updated" | "health.check" | "moderation.custom_action" | "moderation.mark_reviewed" | "user.updated" | "moderation.flagged" | "user.banned" | "user.deactivated" | "user.muted" | "user.reactivated" | "connection.changed" | "errors.unhandled", handler: (event: import(
|
|
60
|
-
off: (eventName: "network.changed" | "all" | "app.updated" | "feeds.activity.added" | "feeds.activity.deleted" | "feeds.activity.marked" | "feeds.activity.pinned" | "feeds.activity.reaction.added" | "feeds.activity.reaction.deleted" | "feeds.activity.reaction.updated" | "feeds.activity.removed_from_feed" | "feeds.activity.unpinned" | "feeds.activity.updated" | "feeds.bookmark.added" | "feeds.bookmark.deleted" | "feeds.bookmark.updated" | "feeds.bookmark_folder.deleted" | "feeds.bookmark_folder.updated" | "feeds.comment.added" | "feeds.comment.deleted" | "feeds.comment.reaction.added" | "feeds.comment.reaction.deleted" | "feeds.comment.reaction.updated" | "feeds.comment.updated" | "feeds.feed.created" | "feeds.feed.deleted" | "feeds.feed.updated" | "feeds.feed_group.changed" | "feeds.feed_group.deleted" | "feeds.feed_member.added" | "feeds.feed_member.removed" | "feeds.feed_member.updated" | "feeds.follow.created" | "feeds.follow.deleted" | "feeds.follow.updated" | "feeds.notification_feed.updated" | "feeds.poll.closed" | "feeds.poll.deleted" | "feeds.poll.updated" | "feeds.poll.vote_casted" | "feeds.poll.vote_changed" | "feeds.poll.vote_removed" | "feeds.stories_feed.updated" | "health.check" | "moderation.custom_action" | "moderation.mark_reviewed" | "user.updated" | "moderation.flagged" | "user.banned" | "user.deactivated" | "user.muted" | "user.reactivated" | "connection.changed" | "errors.unhandled", handler: (event: import(
|
|
59
|
+
on: (eventName: "network.changed" | "all" | "app.updated" | "feeds.activity.added" | "feeds.activity.deleted" | "feeds.activity.marked" | "feeds.activity.pinned" | "feeds.activity.reaction.added" | "feeds.activity.reaction.deleted" | "feeds.activity.reaction.updated" | "feeds.activity.removed_from_feed" | "feeds.activity.unpinned" | "feeds.activity.updated" | "feeds.bookmark.added" | "feeds.bookmark.deleted" | "feeds.bookmark.updated" | "feeds.bookmark_folder.deleted" | "feeds.bookmark_folder.updated" | "feeds.comment.added" | "feeds.comment.deleted" | "feeds.comment.reaction.added" | "feeds.comment.reaction.deleted" | "feeds.comment.reaction.updated" | "feeds.comment.updated" | "feeds.feed.created" | "feeds.feed.deleted" | "feeds.feed.updated" | "feeds.feed_group.changed" | "feeds.feed_group.deleted" | "feeds.feed_member.added" | "feeds.feed_member.removed" | "feeds.feed_member.updated" | "feeds.follow.created" | "feeds.follow.deleted" | "feeds.follow.updated" | "feeds.notification_feed.updated" | "feeds.poll.closed" | "feeds.poll.deleted" | "feeds.poll.updated" | "feeds.poll.vote_casted" | "feeds.poll.vote_changed" | "feeds.poll.vote_removed" | "feeds.stories_feed.updated" | "health.check" | "moderation.custom_action" | "moderation.mark_reviewed" | "user.updated" | "moderation.flagged" | "user.banned" | "user.deactivated" | "user.muted" | "user.reactivated" | "connection.changed" | "errors.unhandled", handler: (event: import('../..').FeedsEvent) => void) => () => void;
|
|
60
|
+
off: (eventName: "network.changed" | "all" | "app.updated" | "feeds.activity.added" | "feeds.activity.deleted" | "feeds.activity.marked" | "feeds.activity.pinned" | "feeds.activity.reaction.added" | "feeds.activity.reaction.deleted" | "feeds.activity.reaction.updated" | "feeds.activity.removed_from_feed" | "feeds.activity.unpinned" | "feeds.activity.updated" | "feeds.bookmark.added" | "feeds.bookmark.deleted" | "feeds.bookmark.updated" | "feeds.bookmark_folder.deleted" | "feeds.bookmark_folder.updated" | "feeds.comment.added" | "feeds.comment.deleted" | "feeds.comment.reaction.added" | "feeds.comment.reaction.deleted" | "feeds.comment.reaction.updated" | "feeds.comment.updated" | "feeds.feed.created" | "feeds.feed.deleted" | "feeds.feed.updated" | "feeds.feed_group.changed" | "feeds.feed_group.deleted" | "feeds.feed_member.added" | "feeds.feed_member.removed" | "feeds.feed_member.updated" | "feeds.follow.created" | "feeds.follow.deleted" | "feeds.follow.updated" | "feeds.notification_feed.updated" | "feeds.poll.closed" | "feeds.poll.deleted" | "feeds.poll.updated" | "feeds.poll.vote_casted" | "feeds.poll.vote_changed" | "feeds.poll.vote_removed" | "feeds.stories_feed.updated" | "health.check" | "moderation.custom_action" | "moderation.mark_reviewed" | "user.updated" | "moderation.flagged" | "user.banned" | "user.deactivated" | "user.muted" | "user.reactivated" | "connection.changed" | "errors.unhandled", handler: (event: import('../..').FeedsEvent) => void) => void;
|
|
61
61
|
offAll: (eventName?: "network.changed" | "all" | "app.updated" | "feeds.activity.added" | "feeds.activity.deleted" | "feeds.activity.marked" | "feeds.activity.pinned" | "feeds.activity.reaction.added" | "feeds.activity.reaction.deleted" | "feeds.activity.reaction.updated" | "feeds.activity.removed_from_feed" | "feeds.activity.unpinned" | "feeds.activity.updated" | "feeds.bookmark.added" | "feeds.bookmark.deleted" | "feeds.bookmark.updated" | "feeds.bookmark_folder.deleted" | "feeds.bookmark_folder.updated" | "feeds.comment.added" | "feeds.comment.deleted" | "feeds.comment.reaction.added" | "feeds.comment.reaction.deleted" | "feeds.comment.reaction.updated" | "feeds.comment.updated" | "feeds.feed.created" | "feeds.feed.deleted" | "feeds.feed.updated" | "feeds.feed_group.changed" | "feeds.feed_group.deleted" | "feeds.feed_member.added" | "feeds.feed_member.removed" | "feeds.feed_member.updated" | "feeds.follow.created" | "feeds.follow.deleted" | "feeds.follow.updated" | "feeds.notification_feed.updated" | "feeds.poll.closed" | "feeds.poll.deleted" | "feeds.poll.updated" | "feeds.poll.vote_casted" | "feeds.poll.vote_changed" | "feeds.poll.vote_removed" | "feeds.stories_feed.updated" | "health.check" | "moderation.custom_action" | "moderation.mark_reviewed" | "user.updated" | "moderation.flagged" | "user.banned" | "user.deactivated" | "user.muted" | "user.reactivated" | "connection.changed" | "errors.unhandled" | undefined) => void;
|
|
62
62
|
/**
|
|
63
63
|
* connect - Connect to the WS URL
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseSearchSource } from './BaseSearchSource';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { SearchSourceOptions } from './types';
|
|
3
|
+
import { FeedsClient } from '../../feeds-client';
|
|
4
|
+
import { ActivityResponse } from '../../gen/models';
|
|
5
5
|
export declare class ActivitySearchSource extends BaseSearchSource<ActivityResponse> {
|
|
6
6
|
readonly type: "activity";
|
|
7
7
|
private readonly client;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StateStore } from '@stream-io/state-store';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { DebouncedFunc } from '../utils';
|
|
3
|
+
import { QueryReturnValue, SearchSourceOptions, SearchSourceState, SearchSourceType } from './types';
|
|
4
4
|
export type DebounceOptions = {
|
|
5
5
|
debounceMs: number;
|
|
6
6
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseSearchSource } from './BaseSearchSource';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { SearchSourceOptions } from './types';
|
|
3
|
+
import { FeedsClient } from '../../feeds-client';
|
|
4
|
+
import { Feed } from '../../feed';
|
|
5
5
|
export type FeedSearchSourceOptions = SearchSourceOptions & {
|
|
6
6
|
groupId?: string;
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseSearchSource } from './BaseSearchSource';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { SearchSourceOptions } from './types';
|
|
3
|
+
import { FeedsClient } from '../../feeds-client';
|
|
4
|
+
import { UserResponse } from '../../gen/models';
|
|
5
5
|
export declare class UserSearchSource extends BaseSearchSource<UserResponse> {
|
|
6
6
|
readonly type: "user";
|
|
7
7
|
private readonly client;
|
|
@@ -10,7 +10,7 @@ export declare class UserSearchSource extends BaseSearchSource<UserResponse> {
|
|
|
10
10
|
items: never[];
|
|
11
11
|
next?: undefined;
|
|
12
12
|
} | {
|
|
13
|
-
items: import(
|
|
13
|
+
items: import('../..').FullUserResponse[];
|
|
14
14
|
next: undefined;
|
|
15
15
|
}>;
|
|
16
16
|
protected filterQueryResults(items: UserResponse[]): UserResponse[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { Feed } from '../../feed';
|
|
2
|
+
import { ActivityResponse } from '../../../gen/models';
|
|
3
|
+
import { EventPayload } from '../../../types-internal';
|
|
4
4
|
export declare function addActivitiesToState(this: Feed, newActivities: ActivityResponse[], activities: ActivityResponse[] | undefined, position: 'start' | 'end'): {
|
|
5
5
|
changed: boolean;
|
|
6
6
|
activities: ActivityResponse[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { Feed } from '../../feed';
|
|
2
|
+
import { ActivityPinResponse, ActivityResponse } from '../../../gen/models';
|
|
3
|
+
import { EventPayload, UpdateStateResult } from '../../../types-internal';
|
|
4
4
|
export declare function removeActivityFromState(this: Feed, activityResponse: ActivityResponse, activities: ActivityResponse[] | undefined): UpdateStateResult<{
|
|
5
5
|
activities: ActivityResponse[] | undefined;
|
|
6
6
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { ActivityMarkEvent, NotificationStatusResponse } from '../../../gen/models';
|
|
2
|
+
import { EventPayload, UpdateStateResult } from '../../../types-internal';
|
|
3
|
+
import { Feed } from '../../feed';
|
|
4
4
|
export declare const updateNotificationStatusFromActivityMarked: (event: ActivityMarkEvent, currentNotificationStatus: NotificationStatusResponse | undefined, aggregatedActivities?: Array<{
|
|
5
5
|
group: string;
|
|
6
6
|
}>) => UpdateStateResult<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { EventPayload } from '../../../types-internal';
|
|
2
|
+
import { Feed } from '../../feed';
|
|
3
3
|
export declare function handleActivityPinned(this: Feed, event: EventPayload<'feeds.activity.pinned'>): void;
|
|
4
4
|
//# sourceMappingURL=handle-activity-pinned.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { Feed } from '../../feed';
|
|
2
|
+
import { ActivityPinResponse, ActivityResponse } from '../../../gen/models';
|
|
3
|
+
import { EventPayload, PartializeAllBut } from '../../../types-internal';
|
|
4
4
|
export type ActivityReactionAddedPayload = PartializeAllBut<EventPayload<'feeds.activity.reaction.added'>, 'activity' | 'reaction'>;
|
|
5
5
|
export declare const addReactionToActivities: (payload: ActivityReactionAddedPayload, activities: ActivityResponse[] | undefined, eventBelongsToCurrentUser: boolean) => {
|
|
6
6
|
changed: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { Feed } from '../../feed';
|
|
2
|
+
import { ActivityPinResponse, ActivityResponse } from '../../../gen/models';
|
|
3
|
+
import { EventPayload, PartializeAllBut } from '../../../types-internal';
|
|
4
4
|
export type ActivityReactionDeletedPayload = PartializeAllBut<EventPayload<'feeds.activity.reaction.deleted'>, 'activity' | 'reaction'>;
|
|
5
5
|
export declare const removeReactionFromActivities: (payload: ActivityReactionDeletedPayload, activities: ActivityResponse[] | undefined, eventBelongsToCurrentUser: boolean) => {
|
|
6
6
|
changed: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { Feed } from '../../feed';
|
|
2
|
+
import { ActivityPinResponse, ActivityResponse } from '../../../gen/models';
|
|
3
|
+
import { EventPayload, PartializeAllBut } from '../../../types-internal';
|
|
4
4
|
export type ActivityReactionUpdatedPayload = PartializeAllBut<EventPayload<'feeds.activity.reaction.updated'>, 'activity' | 'reaction'>;
|
|
5
5
|
export declare const updateReactionInActivities: (payload: ActivityReactionUpdatedPayload, activities: ActivityResponse[] | undefined, eventBelongsToCurrentUser: boolean) => {
|
|
6
6
|
changed: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { Feed } from '../../../feed';
|
|
2
|
+
import { EventPayload } from '../../../types-internal';
|
|
3
3
|
export declare function handleActivityRemovedFromFeed(this: Feed, event: EventPayload<'feeds.activity.removed_from_feed'>): void;
|
|
4
4
|
//# sourceMappingURL=handle-activity-removed-from-feed.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { EventPayload } from '../../../types-internal';
|
|
2
|
+
import { Feed } from '../../feed';
|
|
3
3
|
export declare function handleActivityUnpinned(this: Feed, event: EventPayload<'feeds.activity.unpinned'>): void;
|
|
4
4
|
//# sourceMappingURL=handle-activity-unpinned.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { Feed } from '../../../feed';
|
|
2
|
+
import { ActivityPinResponse, ActivityResponse } from '../../../gen/models';
|
|
3
|
+
import { EventPayload, PartializeAllBut } from '../../../types-internal';
|
|
4
4
|
export type ActivityUpdatedPayload = PartializeAllBut<EventPayload<'feeds.activity.updated'>, 'activity'>;
|
|
5
5
|
export declare const updateActivityInState: (event: ActivityUpdatedPayload, activities: ActivityResponse[] | undefined) => {
|
|
6
6
|
changed: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ActivityResponse } from '../../gen/models';
|
|
2
2
|
export declare const updateActivity: ({ currentActivity, newActivtiy, }: {
|
|
3
3
|
currentActivity: ActivityResponse;
|
|
4
4
|
newActivtiy: ActivityResponse;
|
|
5
5
|
}) => {
|
|
6
|
-
own_reactions: import(
|
|
7
|
-
own_bookmarks: import(
|
|
6
|
+
own_reactions: import('../..').FeedsReactionResponse[];
|
|
7
|
+
own_bookmarks: import('../..').BookmarkResponse[];
|
|
8
8
|
bookmark_count: number;
|
|
9
9
|
comment_count: number;
|
|
10
10
|
created_at: Date;
|
|
@@ -16,17 +16,17 @@ export declare const updateActivity: ({ currentActivity, newActivtiy, }: {
|
|
|
16
16
|
type: string;
|
|
17
17
|
updated_at: Date;
|
|
18
18
|
visibility: "public" | "private" | "tag";
|
|
19
|
-
attachments: import(
|
|
20
|
-
comments: import(
|
|
19
|
+
attachments: import('../..').Attachment[];
|
|
20
|
+
comments: import('../..').CommentResponse[];
|
|
21
21
|
feeds: string[];
|
|
22
22
|
filter_tags: string[];
|
|
23
23
|
interest_tags: string[];
|
|
24
|
-
latest_reactions: import(
|
|
25
|
-
mentioned_users: import(
|
|
24
|
+
latest_reactions: import('../..').FeedsReactionResponse[];
|
|
25
|
+
mentioned_users: import('../..').UserResponse[];
|
|
26
26
|
custom: Record<string, any>;
|
|
27
|
-
reaction_groups: Record<string, import(
|
|
27
|
+
reaction_groups: Record<string, import('../..').ReactionGroupResponse>;
|
|
28
28
|
search_data: Record<string, any>;
|
|
29
|
-
user: import(
|
|
29
|
+
user: import('../..').UserResponse;
|
|
30
30
|
deleted_at?: Date;
|
|
31
31
|
edited_at?: Date;
|
|
32
32
|
expires_at?: Date;
|
|
@@ -34,11 +34,11 @@ export declare const updateActivity: ({ currentActivity, newActivtiy, }: {
|
|
|
34
34
|
is_watched?: boolean;
|
|
35
35
|
text?: string;
|
|
36
36
|
visibility_tag?: string;
|
|
37
|
-
current_feed?: import(
|
|
38
|
-
location?: import(
|
|
39
|
-
moderation?: import(
|
|
40
|
-
notification_context?: import(
|
|
37
|
+
current_feed?: import('../..').FeedResponse;
|
|
38
|
+
location?: import('../..').ActivityLocation;
|
|
39
|
+
moderation?: import('../..').ModerationV2Response;
|
|
40
|
+
notification_context?: import('../..').NotificationContext;
|
|
41
41
|
parent?: ActivityResponse;
|
|
42
|
-
poll?: import(
|
|
42
|
+
poll?: import('../..').PollResponseData;
|
|
43
43
|
};
|
|
44
44
|
//# sourceMappingURL=activity-updater.d.ts.map
|