import { Command } from 'commander'; /** * Build the JSON summary for video search / trending results. * Inlines key fields (incl. the web `url`) so an agent can surface clickable * source links without reading the full cache file. Full data stays in cache. */ export declare function buildVideoJsonSummary(command: string, response: any, cacheFile: string | null): { command: string; summary: { result_count: any; videos: any; }; cache_file: string | null; }; /** * 从用户输入解析数字 seller_id(供 shop-products 单测)。 * - 纯数字 → 原样返回。 * - 店铺链接(含 `/shop/store/` 或 `/view/store/`)→ 取 `store/` 后紧邻的数字段, * 中间允许至多一个 `@handle/` 段,忽略 query/hash。 * - 其它 → null(命令层报错并引导 fallback 到商品链接)。 */ export declare function extractSellerId(input: string): string | null; /** * 翻页聚合 TikTok Shop 全店商品。`fetchPage` 注入 api 调用(供单测),循环至多 `pages` * 页、`hasMore=false` 提前停。中途失败(已成 ≥1 页)→ 返回 `partial` + 已积累数据 + * 最后成功页的 next cursor(供 `--cursor` 续拉);首页即失败 → 原样 rethrow。 * * 响应字段路径钉死 route body(`{ success, data: { shop, products }, meta: { count, * hasMore, cursor, dataSource } }`):shop←page.data.shop(首个成功页)、 * products←page.data.products、hasMore←page.meta.hasMore、cursor←page.meta.cursor。 */ export declare function fetchShopProductPages(fetchPage: (cursor?: string) => Promise, options: { pages: number; cursor?: string; }): Promise<{ shop: any; products: any[]; pagesFetched: number; hasMore: boolean; cursor?: string; partial?: boolean; error?: string; }>; export declare const tiktokCommand: Command; //# sourceMappingURL=tiktok.d.ts.map