import { $Typed, Un$Typed, Unknown$TypedObject, UriString } from '@atproto/lex'; import { AtUriString, DidString } from '@atproto/syntax'; import { Actor, ProfileViewerState } from '../hydration/actor.js'; import { AssociatedSiteStandardRecord, SiteStandardDocument, SiteStandardPublication } from '../hydration/external.js'; import { FeedItem, Repost } from '../hydration/feed.js'; import { HydrationState } from '../hydration/hydrator.js'; import { Label } from '../hydration/label.js'; import { ImageUriBuilder } from '../image/uri.js'; import { Notification } from '../proto/bsky_pb.js'; import { ActivitySubscription, BlockedPost, BookmarkView, Embed, EmbedView, ExternalEmbed, ExternalEmbedSourceView, ExternalEmbedView, FeedViewPost, FollowRecord, GeneratorView, GetPostThreadV2QueryParams, ImagesEmbed, ImagesEmbedView, KnownFollowers, LabelerRecord, LabelerView, LabelerViewDetailed, LikeRecord, ListItemView, ListView, ListViewBasic, MaybePostView, NotFoundPost, NotificationRecordDeleted, NotificationView, PostEmbedView, PostRecord, PostView, ProfileAssociatedActivitySubscription, ProfileAssociatedChat, ProfileRecord, ProfileView, ProfileViewBasic, ProfileViewDetailed, ProfileViewer, ReasonPin, ReasonRepost, RecordEmbed, RecordEmbedView, RecordWithMedia, RecordWithMediaView, ReplyRef, RepostRecord, StarterPackView, StarterPackViewBasic, StatusView, ThreadItem, ThreadOtherItem, ThreadViewPost, ThreadgateView, VerificationRecord, VerificationState, VideoEmbed, VideoEmbedView } from './types.js'; import { VideoUriBuilder } from './util.js'; export declare class Views { private opts; imgUriBuilder: ImageUriBuilder; videoUriBuilder: VideoUriBuilder; indexedAtEpoch: Date | undefined; private threadTagsBumpDown; private threadTagsHide; private visibilityTagHide; private visibilityTagRankPrefix; constructor(opts: { imgUriBuilder: ImageUriBuilder; videoUriBuilder: VideoUriBuilder; indexedAtEpoch: Date | undefined; threadTagsBumpDown: readonly string[]; threadTagsHide: readonly string[]; visibilityTagHide: string; visibilityTagRankPrefix: string; }); actorIsNoHosted(did: DidString, state: HydrationState): boolean; actorIsDeactivated(did: DidString, state: HydrationState): boolean; actorIsTakendown(did: DidString, state: HydrationState): boolean; noUnauthenticatedPost(state: HydrationState, post: PostView): boolean; viewerBlockExists(did: DidString, state: HydrationState): boolean; viewerMuteExists(did: DidString, state: HydrationState): boolean; blockingByList(viewer: ProfileViewerState, state: HydrationState): undefined | AtUriString; blockedByList(viewer: ProfileViewerState, state: HydrationState): undefined | AtUriString; mutedByList(viewer: ProfileViewerState, state: HydrationState): undefined | AtUriString; recordActive(uri: AtUriString, state: HydrationState): AtUriString | undefined; viewerSeesNeedsReview({ did, uri }: { did?: DidString; uri?: AtUriString; }, state: HydrationState): boolean; replyIsHiddenByThreadgate(replyUri: AtUriString, rootPostUri: AtUriString, state: HydrationState): boolean; profileDetailed(did: DidString, state: HydrationState): Un$Typed | undefined; profile(did: DidString, state: HydrationState): Un$Typed | undefined; profileBasic(did: DidString, state: HydrationState): Un$Typed | undefined; profileAssociatedChat(actor: Actor): ProfileAssociatedChat | undefined; profileAssociatedActivitySubscription(actor: Actor): ProfileAssociatedActivitySubscription; profileKnownFollowers(did: DidString, state: HydrationState): ProfileView | undefined; profileViewer(did: DidString, state: HydrationState): ProfileViewer | undefined; profileViewerActivitySubscription(profileViewer: ProfileViewerState, did: DidString, state: HydrationState): ActivitySubscription | undefined; profileWebsite(did: DidString, state: HydrationState): UriString | undefined; knownFollowers(did: DidString, state: HydrationState): KnownFollowers | undefined; verification(did: DidString, state: HydrationState): VerificationState | undefined; status(did: DidString, state: HydrationState): StatusView | undefined; blockedProfileViewer(did: DidString, state: HydrationState): ProfileViewer | undefined; list(uri: AtUriString, state: HydrationState): Un$Typed | undefined; listBasic(uri: AtUriString, state: HydrationState): Un$Typed | undefined; listItemView(uri: AtUriString, did: DidString, state: HydrationState): Un$Typed | undefined; starterPackBasic(uri: AtUriString, state: HydrationState): Un$Typed | undefined; starterPack(uri: AtUriString, state: HydrationState): Un$Typed | undefined; selfLabels({ uri, cid, record, }: { uri?: AtUriString; cid?: string; record?: PostRecord | LikeRecord | RepostRecord | FollowRecord | ProfileRecord | LabelerRecord | VerificationRecord | NotificationRecordDeleted; }): Label[]; labeler(did: DidString, state: HydrationState): Un$Typed | undefined; labelerDetailed(did: DidString, state: HydrationState): Un$Typed | undefined; feedItemBlocksAndMutes(item: FeedItem, state: HydrationState): { originatorMuted: boolean; originatorBlocked: boolean; authorMuted: boolean; authorBlocked: boolean; ancestorAuthorBlocked: boolean; }; feedGenerator(uri: AtUriString, state: HydrationState): Un$Typed | undefined; threadgate(uri: AtUriString, state: HydrationState): Un$Typed | undefined; post(uri: AtUriString, state: HydrationState, depth?: number): Un$Typed | undefined; feedViewPost(item: FeedItem, state: HydrationState): Un$Typed | undefined; replyRef(uri: AtUriString, state: HydrationState): Un$Typed | undefined; maybePost(uri: AtUriString, state: HydrationState): $Typed; blockedPost(uri: AtUriString, authorDid: DidString, state: HydrationState): $Typed; notFoundPost(uri: AtUriString): $Typed; reasonRepost(uri: AtUriString, repost: Repost, state: HydrationState): $Typed | undefined; reasonPin(): $Typed; bookmark(key: string, state: HydrationState): Un$Typed | undefined; thread(skele: { anchor: AtUriString; uris: AtUriString[]; }, state: HydrationState, opts: { height: number; depth: number; }): $Typed | $Typed | $Typed; threadParent(childUri: AtUriString, rootUri: string, state: HydrationState, height: number): $Typed | $Typed | $Typed | undefined; threadReplies(parentUri: AtUriString, rootUri: AtUriString, childrenByParentUri: Record, state: HydrationState, depth: number): ($Typed | $Typed)[] | undefined; threadV2(skeleton: { anchor: AtUriString; uris: AtUriString[]; }, state: HydrationState, { above, below, branchingFactor, sort, }: { above: number; below: number; branchingFactor: number; sort: GetPostThreadV2QueryParams['sort']; }): { hasOtherReplies: boolean; thread: ThreadItem[]; }; private threadV2Parent; private threadV2Replies; private threadV2ItemPost; private threadV2ItemNoUnauthenticated; private threadV2ItemNotFound; private threadV2ItemBlocked; threadOtherV2(skeleton: { anchor: AtUriString; uris: AtUriString[]; }, state: HydrationState, { below, branchingFactor, }: { below: number; branchingFactor: number; }): ThreadOtherItem[]; private threadOtherV2Replies; private threadOtherV2ItemPostAnchor; private threadOtherV2ItemPost; private checkThreadV2ReplyInclusion; private isOtherThreadPost; private groupThreadChildrenByParent; embed(postUri: AtUriString, embed: $Typed | Unknown$TypedObject, state: HydrationState, depth: number): $Typed | undefined; imagesEmbed(did: DidString, embed: ImagesEmbed): $Typed; videoEmbed(did: DidString, embed: VideoEmbed): $Typed; externalEmbed(did: DidString, embed: ExternalEmbed, state: HydrationState): $Typed; /** * Read-path entry point: caller has the post's `external.associatedRefs[]` * and the global hydration state, and we resolve the matching SS records * by ref. Used by `externalEmbed`. * * Returns a fully-populated `viewExternal['external']` shape (including * the required `uri`/`title`/`description`), or `undefined` if the * records didn't hydrate, didn't pass URL validation, or couldn't * supply the required fields. Callers spread the result over a base * view to layer SS-derived fields on top of post-author-supplied ones. * * `assumedUrl` is the canonical web URL the embed claims to represent * (the post's `external.uri` on the read path, the request's `url` on * compose). Validation logic uses it to confirm the SS records actually * back that URL, and the same value is echoed back as `uri` on the * returned overlay. */ externalEmbedFromStandardSite({ associatedRefs, state, assumedUrl, }: { associatedRefs: ExternalEmbed['external']['associatedRefs']; state: HydrationState; assumedUrl: string; }): ExternalEmbedView['external'] | undefined; /** * Compose-path entry point: caller already knows which document and * publication backed the request and has them in hand (e.g. from * iterating the SS hydration maps directly). Skips the by-ref lookup * that `externalEmbedFromStandardSite` does. Used by * `getEmbedExternalView`. * * Returns a fully-populated `viewExternal['external']` shape (including * the required `uri`/`title`/`description`), or `undefined` if any of * the validation gates rejected the pair or the records couldn't * supply the required fields. * * `state` is still needed for label hydration. `assumedUrl` is the * canonical web URL the embed claims to represent (the post's * `external.uri` on the read path, the request's `url` on compose); * validation logic uses it to confirm the SS records actually back that * URL, and the same value is echoed back as `uri` on the returned * overlay. */ externalEmbedFromStandardSiteRecords({ document, publication, state, assumedUrl, }: { document: AssociatedSiteStandardRecord | undefined; publication: AssociatedSiteStandardRecord | undefined; state: HydrationState; assumedUrl: string; }): ExternalEmbedView['external'] | undefined; externalEmbedSource(publication: AssociatedSiteStandardRecord): $Typed; embedNotFound(uri: AtUriString): $Typed; embedDetached(uri: AtUriString): $Typed; embedBlocked(uri: AtUriString, state: HydrationState): $Typed; embedPostView(uri: AtUriString, state: HydrationState, depth: number): $Typed | undefined; recordEmbed(postUri: AtUriString, embed: RecordEmbed, state: HydrationState, depth: number, withTypeTag: false): RecordEmbedView; recordEmbed(postUri: AtUriString, embed: RecordEmbed, state: HydrationState, depth: number, withTypeTag?: true): $Typed; private recordEmbedWrapper; recordWithMediaEmbed(postUri: AtUriString, embed: RecordWithMedia, state: HydrationState, depth: number): $Typed | undefined; userReplyDisabled(uri: AtUriString, state: HydrationState): boolean | undefined; userPostEmbeddingDisabled(uri: AtUriString, state: HydrationState): boolean | undefined; viewerPinned(uri: AtUriString, state: HydrationState, authorDid: string): boolean | undefined; notification(notif: Notification, lastSeenAt: string | undefined, state: HydrationState): Un$Typed | undefined; indexedAt({ sortedAt, indexedAt }: { sortedAt: Date; indexedAt: Date; }): Date; } //# sourceMappingURL=index.d.ts.map