32992834ee
- Xiaohongshu search via local MCP service (opt-in, zero impact if service not running) - Reddit public JSON fallback (works with zero API keys) - Reddit priority: ScrapeCreators -> OpenAI -> public fallback - Updated env.py: Reddit always available via public fallback Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
666 B
TypeScript
27 lines
666 B
TypeScript
export type CursorPage<T> = {
|
|
success: true;
|
|
items: T[];
|
|
cursor?: string;
|
|
} | {
|
|
success: false;
|
|
error: string;
|
|
};
|
|
export type CursorPaginationResult<T> = {
|
|
success: true;
|
|
items: T[];
|
|
nextCursor?: string;
|
|
} | {
|
|
success: false;
|
|
error: string;
|
|
items?: T[];
|
|
nextCursor?: string;
|
|
};
|
|
export declare function paginateCursor<T>(opts: {
|
|
cursor?: string;
|
|
maxPages?: number;
|
|
pageDelayMs?: number;
|
|
sleep: (ms: number) => Promise<void>;
|
|
getKey: (item: T) => string;
|
|
fetchPage: (cursor?: string) => Promise<CursorPage<T>>;
|
|
}): Promise<CursorPaginationResult<T>>;
|
|
//# sourceMappingURL=paginate-cursor.d.ts.map
|