From 5ea7094bb812c1aaf800a08070d3bb7ea521fa6e Mon Sep 17 00:00:00 2001 From: takker99 <37929109+takker99@users.noreply.github.com> Date: Sat, 21 Dec 2024 17:45:27 +0900 Subject: [PATCH] fix: Catch up with the response type from `https://scrapbox.io/api/page-data/export/:projectname.json` --- response.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/response.ts b/response.ts index fc41eb1..8387448 100644 --- a/response.ts +++ b/response.ts @@ -301,16 +301,16 @@ export interface SearchedTitle /** exportしたときのページデータ */ export interface ExportedPage - extends Pick { + extends Pick { /** ページ本文 * * `hasMetadata === true`のときは行のmetadataが入る * それ以外の場合は行のテキストが入る */ - lines: hasMetadata extends true ? Omit[] - : string[]; + lines: hasMetadata extends true ? Omit[] : string[]; } +/** JSON data exported from https://scrapbox.io/api/page-data/export/:projectname.json */ export interface ExportedData { /** project's name */ name: string; @@ -321,10 +321,17 @@ export interface ExportedData { /** このデータを生成した日時 (UNIX時刻) */ exported: UnixTime; + /** project members */ + users: UserForExport[]; + /** exported pages */ pages: ExportedPage[]; } +/** user infomation included in exported data */ +export interface UserForExport + extends Pick {} + /** backupされるページデータ */ export interface BackupedPage extends Pick {