forked from bluesky-social/atproto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support firehose feed algorithm (bluesky-social#205)
* Split getFeed() into getAuthorFeed() and getHomeFeed() * Remove unused getFeed codegen file * Unify queries for getHomeFeed and getAuthorFeed * Factor out common query parts for building feeds * Test firehose and default feed algorithm * Fix api tsconfig reference
- Loading branch information
Showing
17 changed files
with
1,037 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/** | ||
* GENERATED CODE - DO NOT MODIFY | ||
*/ | ||
import { Headers, XRPCError } from '@adxp/xrpc' | ||
|
||
export interface QueryParams { | ||
author: string; | ||
limit?: number; | ||
before?: string; | ||
} | ||
|
||
export interface CallOptions { | ||
headers?: Headers; | ||
} | ||
|
||
export type InputSchema = undefined | ||
|
||
export interface OutputSchema { | ||
feed: FeedItem[]; | ||
} | ||
export interface FeedItem { | ||
cursor?: string; | ||
uri: string; | ||
author: User; | ||
repostedBy?: User; | ||
record: {}; | ||
embed?: RecordEmbed | ExternalEmbed | UnknownEmbed; | ||
replyCount: number; | ||
repostCount: number; | ||
likeCount: number; | ||
indexedAt: string; | ||
myState?: { | ||
repost?: string, | ||
like?: string, | ||
}; | ||
} | ||
export interface User { | ||
did: string; | ||
name: string; | ||
displayName?: string; | ||
} | ||
export interface RecordEmbed { | ||
type: 'record'; | ||
author: User; | ||
record: {}; | ||
} | ||
export interface ExternalEmbed { | ||
type: 'external'; | ||
uri: string; | ||
title: string; | ||
description: string; | ||
imageUri: string; | ||
} | ||
export interface UnknownEmbed { | ||
type: string; | ||
} | ||
|
||
export interface Response { | ||
success: boolean; | ||
headers: Headers; | ||
data: OutputSchema; | ||
} | ||
|
||
export function toKnownErr(e: any) { | ||
if (e instanceof XRPCError) { | ||
} | ||
return e | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/** | ||
* GENERATED CODE - DO NOT MODIFY | ||
*/ | ||
import { Headers, XRPCError } from '@adxp/xrpc' | ||
|
||
export interface QueryParams { | ||
algorithm?: string; | ||
limit?: number; | ||
before?: string; | ||
} | ||
|
||
export interface CallOptions { | ||
headers?: Headers; | ||
} | ||
|
||
export type InputSchema = undefined | ||
|
||
export interface OutputSchema { | ||
feed: FeedItem[]; | ||
} | ||
export interface FeedItem { | ||
cursor?: string; | ||
uri: string; | ||
author: User; | ||
repostedBy?: User; | ||
record: {}; | ||
embed?: RecordEmbed | ExternalEmbed | UnknownEmbed; | ||
replyCount: number; | ||
repostCount: number; | ||
likeCount: number; | ||
indexedAt: string; | ||
myState?: { | ||
repost?: string, | ||
like?: string, | ||
}; | ||
} | ||
export interface User { | ||
did: string; | ||
name: string; | ||
displayName?: string; | ||
} | ||
export interface RecordEmbed { | ||
type: 'record'; | ||
author: User; | ||
record: {}; | ||
} | ||
export interface ExternalEmbed { | ||
type: 'external'; | ||
uri: string; | ||
title: string; | ||
description: string; | ||
imageUri: string; | ||
} | ||
export interface UnknownEmbed { | ||
type: string; | ||
} | ||
|
||
export interface Response { | ||
success: boolean; | ||
headers: Headers; | ||
data: OutputSchema; | ||
} | ||
|
||
export function toKnownErr(e: any) { | ||
if (e instanceof XRPCError) { | ||
} | ||
return e | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.