import { FeedsApi } from '../gen/feeds/FeedsApi';
import { ActivityResponse, FileUploadRequest, FollowBatchRequest, FollowRequest, ImageUploadRequest, OwnUser, PollResponse, PollVotesResponse, QueryFeedsRequest, QueryPollVotesRequest, UpdateFollowRequest, UserRequest } from '../gen/models';
import { FeedsEvent, StreamFile, TokenOrProvider } from '../types';
import { StateStore } from '../common/StateStore';
import { FeedsClientOptions, StreamResponse } from '../common/types';
import { ModerationClient } from '../moderation-client';
import { StreamPoll } from '../common/Poll';
import { Feed } from '../feed';
export type FeedsClientState = {
    connected_user: OwnUser | undefined;
    is_ws_connection_healthy: boolean;
};
export declare class FeedsClient extends FeedsApi {
    readonly state: StateStore<FeedsClientState>;
    readonly moderation: ModerationClient;
    private readonly tokenManager;
    private wsConnection?;
    private readonly connectionIdManager;
    private readonly eventDispatcher;
    private readonly polls_by_id;
    private activeFeeds;
    private healthyConnectionChangedEventCount;
    constructor(apiKey: string, options?: FeedsClientOptions);
    pollFromState: (id: string) => StreamPoll | undefined;
    hydratePollCache(activities: ActivityResponse[]): void;
    connectUser: (user: UserRequest, tokenProvider: TokenOrProvider) => Promise<void>;
    devToken: (userId: string) => string;
    closePoll: (request: {
        poll_id: string;
    }) => Promise<StreamResponse<PollResponse>>;
    uploadFile: (request: Omit<FileUploadRequest, "file"> & {
        file: StreamFile;
    }) => Promise<StreamResponse<import("../gen/models").FileUploadResponse>>;
    uploadImage: (request: Omit<ImageUploadRequest, "file"> & {
        file: StreamFile;
    }) => Promise<StreamResponse<import("../gen/models").ImageUploadResponse>>;
    queryPollAnswers: (request: QueryPollVotesRequest & {
        poll_id: string;
        user_id?: string;
    }) => Promise<StreamResponse<PollVotesResponse>>;
    queryPollOptionVotes: (request: QueryPollVotesRequest & {
        filter: QueryPollVotesRequest["filter"] & {
            option_id: string;
        };
        poll_id: string;
        user_id?: string;
    }) => Promise<StreamResponse<PollVotesResponse>>;
    disconnectUser: () => Promise<void>;
    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" | "health.check" | "user.updated" | "moderation.custom_action" | "moderation.flagged" | "moderation.mark_reviewed" | "user.banned" | "user.deactivated" | "user.muted" | "user.reactivated" | "connection.changed", handler: (event: FeedsEvent & {
        fid?: string;
    }) => void) => () => void;
    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" | "health.check" | "user.updated" | "moderation.custom_action" | "moderation.flagged" | "moderation.mark_reviewed" | "user.banned" | "user.deactivated" | "user.muted" | "user.reactivated" | "connection.changed", handler: (event: FeedsEvent & {
        fid?: string;
    }) => void) => void;
    feed: (groupId: string, id: string) => Feed;
    queryFeeds(request?: QueryFeedsRequest): Promise<{
        feeds: Feed[];
        next: string | undefined;
        prev: string | undefined;
        metadata: import("../common/types").RequestMetadata;
        duration: string;
    }>;
    updateNetworkConnectionStatus: (event: {
        type: "online" | "offline";
    } | Event) => void;
    updateFollow(request: UpdateFollowRequest): Promise<StreamResponse<import("../gen/models").UpdateFollowResponse>>;
    follow(request: FollowRequest): Promise<StreamResponse<import("../gen/models").SingleFollowResponse>>;
    followBatch(request: FollowBatchRequest): Promise<StreamResponse<import("../gen/models").FollowBatchResponse>>;
    unfollow(request: FollowRequest): Promise<StreamResponse<import("../gen/models").UnfollowResponse>>;
    stopWatchingFeed(request: {
        feed_group_id: string;
        feed_id: string;
    }): Promise<StreamResponse<import("../gen/models").Response>>;
    private readonly getOrCreateActiveFeed;
    private findActiveFeedByActivityId;
}
