import { AtUriString, DidString } from '@atproto/syntax'; import { DataPlaneClient } from '../data-plane/client/index.js'; import { FeedGenRecord, GateRecord, LikeRecord, PostRecord, PostgateRecord, RepostRecord } from '../views/types.js'; import { HydrationMap, ItemRef, RecordInfo } from './util.js'; export type Post = RecordInfo & { violatesThreadGate: boolean; violatesEmbeddingRules: boolean; hasThreadGate: boolean; hasPostGate: boolean; tags: Set; /** * Debug information for internal development */ debug?: { tags?: string[]; }; }; export type Posts = HydrationMap; export type PostViewerState = { like?: AtUriString; repost?: AtUriString; bookmarked?: boolean; threadMuted?: boolean; }; export type PostViewerStates = HydrationMap; export type ThreadContext = { like?: AtUriString; }; export type ThreadContexts = HydrationMap; export type PostAgg = { likes: number; replies: number; reposts: number; quotes: number; bookmarks: number; }; export type PostAggs = HydrationMap; export type Like = RecordInfo; export type Likes = HydrationMap; export type Repost = RecordInfo; export type Reposts = HydrationMap; export type FeedGenAgg = { likes: number; }; export type FeedGenAggs = HydrationMap; export type FeedGen = RecordInfo; export type FeedGens = HydrationMap; export type FeedGenViewerState = { like?: AtUriString; }; export type FeedGenViewerStates = HydrationMap; export type Threadgate = RecordInfo; export type Threadgates = HydrationMap; export type Postgate = RecordInfo; export type Postgates = HydrationMap; export type ThreadRef = ItemRef & { threadRoot: AtUriString; }; export type FeedItem = { post: ItemRef; repost?: ItemRef; /** * If true, overrides the `reason` with `app.bsky.feed.defs#reasonPin`. Used * only in author feeds. */ authorPinned?: boolean; }; export type GetPostsHydrationOptions = { processDynamicTagsForView?: 'thread' | 'search'; }; export declare class FeedHydrator { dataplane: DataPlaneClient; constructor(dataplane: DataPlaneClient); getPosts(uris: AtUriString[], includeTakedowns?: boolean, given?: Posts, viewer?: string | null, options?: GetPostsHydrationOptions): Promise; getPostViewerStates(refs: ThreadRef[], viewer: string): Promise; private getThreadMutes; getThreadContexts(refs: ThreadRef[]): Promise; getPostAggregates(refs: ItemRef[], viewer: DidString | null): Promise; getFeedGens(uris: AtUriString[], includeTakedowns?: boolean): Promise; getFeedGenViewerStates(uris: AtUriString[], viewer: DidString): Promise; getFeedGenAggregates(refs: ItemRef[], viewer: DidString | null): Promise; getThreadgatesForPosts(postUris: AtUriString[], includeTakedowns?: boolean): Promise; getThreadgateRecords(uris: AtUriString[], includeTakedowns?: boolean): Promise; getPostgatesForPosts(postUris: AtUriString[], includeTakedowns?: boolean): Promise; getPostgateRecords(uris: AtUriString[], includeTakedowns?: boolean): Promise; getLikes(uris: AtUriString[], includeTakedowns?: boolean): Promise; getReposts(uris: AtUriString[], includeTakedowns?: boolean): Promise; } //# sourceMappingURL=feed.d.ts.map