refactor: unify pagination helpers

This commit is contained in:
Peter Steinberger
2026-01-12 02:58:00 +00:00
parent e4d2773d46
commit d5a527d5fb
15 changed files with 307 additions and 182 deletions
+14 -7
View File
@@ -253,13 +253,20 @@ export interface GetTweetResult {
error?: string;
}
export interface SearchResult {
success: boolean;
tweets?: TweetData[];
error?: string;
/** Cursor for fetching the next page of results */
nextCursor?: string;
}
export type SearchResult =
| {
success: true;
tweets: TweetData[];
/** Cursor for fetching the next page of results */
nextCursor?: string;
}
| {
success: false;
error: string;
tweets?: TweetData[];
/** Cursor for fetching the next page of results */
nextCursor?: string;
};
export interface CurrentUserResult {
success: boolean;