Skip to content

Commit 61a90f5

Browse files
authored
Merge pull request #37 from takker99/fix-export
✨ Add type definitions for Scrapbox backup json
2 parents 2ce189e + 2dae369 commit 61a90f5

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

response.ts

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export interface SearchedTitle
202202
links: string[];
203203
}
204204

205-
/** exportもしくはbackupをとったときのページデータ */
205+
/** exportしたときのページデータ */
206206
export interface ExportedPage<hasMetadata extends true | false = false>
207207
extends Pick<Page, "title" | "updated" | "created" | "id"> {
208208
/** ページ本文
@@ -228,6 +228,31 @@ export interface ExportedData<hasMetadata extends true | false = false> {
228228
pages: ExportedPage<hasMetadata>[];
229229
}
230230

231+
/** backupされるページデータ */
232+
export interface BackupedPage
233+
extends Pick<Page, "title" | "updated" | "created" | "id"> {
234+
/** ページ本文 */
235+
lines: Pick<BaseLine, "text" | "created" | "updated">[];
236+
237+
/** ページに含まれているリンク*/
238+
linksLc: StringLc[];
239+
}
240+
241+
/** project backup data */
242+
export interface BackupData {
243+
/** project's name */
244+
name: string;
245+
246+
/** project's display name */
247+
displayName: string;
248+
249+
/** このデータを生成した日時 (UNIX時刻) */
250+
exported: UnixTime;
251+
252+
/** backuped pages */
253+
pages: BackupedPage[];
254+
}
255+
231256
/** メタデータ無しインポート用ページデータ */
232257
export interface ImportedLightPage {
233258
/** page's title

0 commit comments

Comments
 (0)