import { $Typed } from '@atproto/lex'; import { HydrateCtx } from '../hydration/hydrator.js'; import { GetPostThreadV2QueryParams, ThreadItem, ThreadItemBlocked, ThreadItemNoUnauthenticated, ThreadItemNotFound, ThreadItemPost, ThreadOtherItem } from './types.js'; type ThreadItemValue = Omit & { value: T; }; export type ThreadItemValueBlocked = ThreadItemValue<$Typed>; export type ThreadItemValueNoUnauthenticated = ThreadItemValue<$Typed>; export type ThreadItemValueNotFound = ThreadItemValue<$Typed>; export type ThreadItemValuePost = ThreadItemValue<$Typed>; type ThreadBlockedNode = { type: 'blocked'; item: ThreadItemValueBlocked; }; type ThreadNoUnauthenticatedNode = { type: 'noUnauthenticated'; parent: ThreadTree | undefined; item: ThreadItemValueNoUnauthenticated; }; type ThreadNotFoundNode = { type: 'notFound'; item: ThreadItemValueNotFound; }; type ThreadPostNode = { type: 'post'; item: ThreadItemValuePost; tags: Set; hasOPLike: boolean; parent: ThreadTree | undefined; replies: ThreadTree[] | undefined; }; type ThreadOtherItemValue = Omit & { value: T; }; export type ThreadOtherItemValuePost = ThreadOtherItemValue<$Typed>; export type ThreadOtherAnchorPostNode = { type: 'hiddenAnchor'; item: Omit & { value: undefined; }; replies: ThreadOtherPostNode[] | undefined; }; export type ThreadOtherPostNode = { type: 'hiddenPost'; item: ThreadOtherItemValuePost; tags: Set; replies: ThreadOtherPostNode[] | undefined; }; export type ThreadTreeVisible = ThreadBlockedNode | ThreadNoUnauthenticatedNode | ThreadNotFoundNode | ThreadPostNode; export type ThreadTreeOther = ThreadOtherAnchorPostNode | ThreadOtherPostNode; export type ThreadTree = ThreadTreeVisible | ThreadTreeOther; /** This function mutates the tree parameter. */ export declare function sortTrimFlattenThreadTree(anchorTree: ThreadTree, options: SortTrimFlattenOptions, useExploration?: boolean): any; type SortTrimFlattenOptions = { branchingFactor: GetPostThreadV2QueryParams['branchingFactor']; opDid: string; sort?: GetPostThreadV2QueryParams['sort']; viewer: HydrateCtx['viewer']; threadTagsBumpDown: readonly string[]; threadTagsHide: readonly string[]; visibilityTagRankPrefix: string; }; export declare function sortTrimThreadTreeExploration(n: ThreadTree, opts: SortTrimFlattenOptions): ThreadTree; export {}; //# sourceMappingURL=threads-v2.d.ts.map