Something went wrong. Try again.
A Bsky-like frontend using the atprotocol natively.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553export type Did = string;
export type Handle = string;
export type AtUri = string;
export type Cid = string;
export type Cursor = string;
export interface Label { cts: string; src: string; uri: string; val: string; neg?: boolean; ver?: number;}
export interface SelfLabel { $type: 'com.atproto.label.defs#selfLabel'; val: string;}
export type LabelValue = Label | SelfLabel | { $type: string; val?: string; src?: string; neg?: boolean };
export interface ResolvedLabel { val: string; displayName: string; labelerName: string; labelerAvatar?: string;}
export interface ProfileViewBasic { did: Did; handle: Handle; displayName?: string; avatar?: string; labels?: LabelValue[]; pronouns?: string; website?: string; /** If true, this profile was constructed from PDS data because the appView * was unavailable or returned a suspended/takedown status. */ suspended?: boolean; viewer?: { muted?: boolean; blockedBy?: boolean; following?: AtUri; followedBy?: AtUri; };}
export interface EmbedAspectRatio { width: number; height: number;}
export interface EmbedImageView { $type: 'app.bsky.embed.images#view'; images: { thumb: string; fullsize: string; alt: string; aspectRatio?: EmbedAspectRatio; }[];}
export interface EmbedVideoView { $type: 'app.bsky.embed.video#view'; cid: string; playlist: string; thumbnail?: string; alt?: string; aspectRatio?: EmbedAspectRatio;}
export interface EmbedExternalView { $type: 'app.bsky.embed.external#view'; external: { uri: string; title: string; description: string; thumb?: string; };}
export interface EmbedViewRecord { $type: 'app.bsky.embed.record#viewRecord'; uri: AtUri; cid: Cid; author: ProfileViewBasic; value: { text: string; createdAt: string; embed?: unknown; facets?: unknown[]; }; labels?: LabelValue[]; replyCount?: number; repostCount?: number; likeCount?: number; quoteCount?: number; embeds?: unknown[]; indexedAt: string;}
export interface EmbedRecordViewNotFound { $type: 'app.bsky.embed.record#viewNotFound'; uri: AtUri; notFound: true;}
export interface EmbedRecordViewBlocked { $type: 'app.bsky.embed.record#viewBlocked'; uri: AtUri; blocked: true;}
export interface EmbedRecordView { $type: 'app.bsky.embed.record#view'; record: EmbedViewRecord | EmbedRecordViewNotFound | EmbedRecordViewBlocked | { $type: string };}
export interface EmbedRecordWithMediaView { $type: 'app.bsky.embed.recordWithMedia#view'; record: EmbedRecordView; media: EmbedImageView | EmbedVideoView | EmbedExternalView | { $type: string };}
export type EmbedView = | EmbedImageView | EmbedVideoView | EmbedExternalView | EmbedRecordView | EmbedRecordWithMediaView | { $type: string };
export interface ProfileViewDetailed { did: Did; handle: Handle; displayName?: string; description?: string; avatar?: string; banner?: string; followsCount?: number; followersCount?: number; postsCount?: number; labels?: Label[]; pronouns?: string; website?: string; indexedAt?: string; /** If true, this profile was fetched from the PDS directly because the * appView was unavailable or returned a takedown/suspended status. */ suspended?: boolean; pinnedPost?: { uri: AtUri; cid: Cid; }; viewer?: { muted?: boolean; mutedByList?: unknown; blockedBy?: boolean; blocking?: AtUri; blockingByList?: unknown; following?: AtUri; followedBy?: AtUri; knownFollowers?: { count: number; followers: ProfileViewBasic[]; }; };}
export interface FacetByteSlice { byteStart: number; byteEnd: number;}
export interface FacetMention { $type: 'app.bsky.richtext.facet#mention'; did: string;}
export interface FacetLink { $type: 'app.bsky.richtext.facet#link'; uri: string;}
export interface FacetTag { $type: 'app.bsky.richtext.facet#tag'; tag: string;}
export type FacetFeature = FacetMention | FacetLink | FacetTag | { $type: string };
export interface Facet { index: FacetByteSlice; features: FacetFeature[];}
export interface PostView { uri: AtUri; cid: Cid; author: ProfileViewBasic; record: { $type: string; text: string; createdAt: string; embed?: unknown; reply?: { root: { uri: AtUri; cid: Cid }; parent: { uri: AtUri; cid: Cid }; }; langs?: string[]; facets?: Facet[]; }; embed?: EmbedView; replyCount?: number; repostCount?: number; likeCount?: number; quoteCount?: number; indexedAt: string; labels?: Label[]; viewer?: { repost?: AtUri; like?: AtUri; threadMuted?: boolean; };}
export interface ReplyRef { root: PostView | NotFoundPost | BlockedPost | { $type: string }; parent: PostView | NotFoundPost | BlockedPost | { $type: string }; grandparentAuthor?: ProfileViewBasic;}
export interface FeedViewPost { post: PostView; reply?: ReplyRef; reason?: { $type: string; by: ProfileViewBasic; indexedAt: string; };}
export interface GetTimelineResponse { cursor?: Cursor; feed: FeedViewPost[];}
export interface ThreadViewPost { $type: 'app.bsky.feed.defs#threadViewPost'; post: PostView; parent?: ThreadViewPost | NotFoundPost | BlockedPost | { $type: string }; replies?: (ThreadViewPost | NotFoundPost | BlockedPost | { $type: string })[];}
export interface NotFoundPost { $type: 'app.bsky.feed.defs#notFoundPost'; uri: AtUri; notFound: true;}
export interface BlockedPost { $type: 'app.bsky.feed.defs#blockedPost'; uri: AtUri; blocked: true;}
/** * A post constructed from a raw repo record when the appView is unavailable * or the author's PDS is suspended/deactivated. Contains the essential data * needed to render the post, but may lack appView-enriched fields like * likeCount, replyCount, etc. */export interface SuspendedPost { $type: 'foxsky.feed.defs#suspendedPost'; uri: AtUri; cid: Cid; author: ProfileViewBasic; record: { $type: string; text: string; createdAt: string; embed?: unknown; reply?: { root: { uri: AtUri; cid: Cid }; parent: { uri: AtUri; cid: Cid }; }; langs?: string[]; facets?: Facet[]; }; embed?: EmbedView; replyCount?: number; repostCount?: number; likeCount?: number; quoteCount?: number; indexedAt: string; labels?: Label[]; viewer?: { repost?: AtUri; like?: AtUri; threadMuted?: boolean; };}
export interface GetPostThreadResponse { thread: ThreadViewPost | NotFoundPost | BlockedPost | SuspendedPost | { $type: string };}
export function isThreadViewPost(t: unknown): t is ThreadViewPost { return typeof t === 'object' && t !== null && (t as { $type?: string }).$type === 'app.bsky.feed.defs#threadViewPost';}
export function isBlockedPost(t: unknown): t is BlockedPost { return typeof t === 'object' && t !== null && (t as { $type?: string }).$type === 'app.bsky.feed.defs#blockedPost';}
export function isNotFoundPost(t: unknown): t is NotFoundPost { return typeof t === 'object' && t !== null && (t as { $type?: string }).$type === 'app.bsky.feed.defs#notFoundPost';}
export function isSuspendedPost(t: unknown): t is SuspendedPost { return typeof t === 'object' && t !== null && (t as { $type?: string }).$type === 'foxsky.feed.defs#suspendedPost';}
/** Convert a SuspendedPost into a ThreadViewPost wrapper so the rest of the * thread rendering pipeline works unchanged. */export function suspendedToThread(sp: SuspendedPost): ThreadViewPost { return { $type: 'app.bsky.feed.defs#threadViewPost', post: sp, parent: undefined, replies: undefined, } as ThreadViewPost;}
export interface BlobRef { $type: 'blob'; ref: { $link: string }; mimeType: string; size: number;}
export interface UploadBlobResponse { blob: BlobRef;}
export interface ActorTypeaheadResult { did: Did; handle: Handle; displayName?: string; avatar?: string;}
export interface SearchActorsTypeaheadResponse { actors: ActorTypeaheadResult[];}
export interface FeedGeneratorInfo { uri: AtUri; cid: Cid; did: Did; creator: ProfileViewBasic & { displayName?: string; description?: string; avatar?: string; }; displayName: string; description?: string; avatar?: string; likeCount?: number; indexedAt: string; viewer?: { like?: AtUri; };}
export interface SavedFeedEntry { id: string; type: 'feed' | 'list' | 'timeline' | string; value: string; pinned: boolean;}
export interface GetFeedResponse { cursor?: Cursor; feed: FeedViewPost[];}
export interface SearchPostsResponse { cursor?: Cursor; hitsTotal?: number; posts: PostView[];}
export interface ActorSearchResult { did: Did; handle: Handle; displayName?: string; description?: string; avatar?: string; indexedAt?: string;}
export interface SearchActorsResponse { cursor?: Cursor; actors: ActorSearchResult[];}
export type NotificationReason = | 'like' | 'repost' | 'follow' | 'mention' | 'reply' | 'quote' | 'starterpack-joined' | 'verified' | 'unverified' | 'like-via-repost' | 'repost-via-repost' | 'subscribed-post' | 'contact-match';
export interface Notification { uri: AtUri; cid: Cid; author: ProfileViewBasic & { description?: string; indexedAt?: string; }; reason: NotificationReason; reasonSubject?: string; record: Record<string, unknown>; isRead: boolean; indexedAt: string; labels?: Label[]; priority?: boolean; seenAt?: string;}
export interface ListNotificationsResponse { cursor?: Cursor; notifications: Notification[]; priority: boolean;}
export interface UnreadCountResponse { count: number;}
export interface SessionData { did: Did; handle: Handle; accessJwt: string; refreshJwt: string;}
export interface BookmarkItem { subject: { uri: AtUri; cid: Cid }; createdAt: string; item: PostView | { $type: string; uri: AtUri; notFound?: true; blocked?: boolean };}
export interface GetBookmarksResponse { cursor?: Cursor; bookmarks: BookmarkItem[];}
export interface FeedGeneratorView { uri: AtUri; cid: Cid; did: Did; creator: { did: Did; handle: Handle; displayName?: string; avatar?: string; }; displayName: string; description?: string; descriptionFacets?: Facet[]; avatar?: string; likeCount?: number; acceptsInteractions?: boolean; labels?: Label[]; indexedAt: string; viewer?: { like?: AtUri; };}
export interface GetActorFeedsResponse { cursor?: Cursor; feeds: FeedGeneratorView[];}
export interface SearchFeedsResponse { cursor?: Cursor; feeds: FeedGeneratorView[];}