/** * Telegraph Export Functions * Export pages and backup accounts to Markdown or HTML */ /** * Exported page data */ export interface ExportedPage { /** Page title */ title: string; /** Page path */ path: string; /** Full URL to the page */ url: string; /** Export format */ format: 'markdown' | 'html'; /** Exported content */ content: string; } /** * Account backup data */ export interface AccountBackup { /** Total number of pages in account */ total_count: number; /** Number of pages exported */ exported_count: number; /** Export format */ format: 'markdown' | 'html'; /** Exported pages */ pages: Omit[]; } /** * Export a Telegraph page to Markdown or HTML * * @param params - Export parameters * @returns Exported page data * * @example * ```typescript * // Export to Markdown * const exported = await exportPage({ * path: 'Sample-Page-12-15', * format: 'markdown' * }); * console.log(exported.title); * console.log(exported.content); * * // Export to HTML * const exportedHtml = await exportPage({ * path: 'Sample-Page-12-15', * format: 'html' * }); * console.log(exportedHtml.content); * ``` */ export declare function exportPage(params: { path: string; format?: 'markdown' | 'html'; }): Promise; /** * Backup all pages from a Telegraph account * * @param params - Backup parameters * @returns Account backup data * * @example * ```typescript * // Backup to Markdown * const backup = await backupAccount({ * accessToken: 'your-access-token', * format: 'markdown', * limit: 100 * }); * * console.log(`Backed up ${backup.exported_count} of ${backup.total_count} pages`); * * // Save each page to a file * for (const page of backup.pages) { * const filename = `${page.path}.md`; * await fs.writeFile(filename, page.content); * } * ``` */ export declare function backupAccount(params: { accessToken: string; format?: 'markdown' | 'html'; limit?: number; }): Promise; //# sourceMappingURL=export.d.ts.map