11import {
2- CommitId ,
3- Line ,
4- Page as PageBase ,
2+ BaseLine ,
3+ BasePage ,
54 PageId ,
65 ProjectId ,
76 StringLc ,
@@ -10,7 +9,7 @@ import {
109} from "./base.ts" ;
1110
1211/** 関連ページのメタデータ */
13- export interface RelatedPage extends PageBase {
12+ export interface RelatedPage extends BasePage {
1413 /** ページ内のリンク */ linksLc : StringLc [ ] ;
1514 /** おそらく被リンク数 */ linked : number ;
1615}
@@ -32,27 +31,16 @@ export interface UserInfo extends User {
3231 /** accountの更新日時 */ updated : UnixTime ;
3332}
3433
35- /** summary of page information */
36- export interface PageSummary extends PageBase {
37- /** ピン留めされていたら1, されていなかったら0 */ pin : 0 | 1 ;
38- /** ページの閲覧回数 */ views : number ;
39- /** おそらく被リンク数 */ linked : number ;
40- /** 最新の編集コミットid */ commitId : CommitId ;
41- /** ページの作成日時 */ created : UnixTime ;
42- /** page rank */ pageRank : number ;
43- /** Page historyの最終生成日時 */ snapshotCreated : UnixTime | null ;
44- }
45-
4634/** page information */
47- export interface Page extends PageSummary {
35+ export interface Page extends BasePage {
4836 /** APIを叩いたuserの最終アクセス日時。
4937 *
5038 * おそらくこの値を元にテロメアの未読/既読の判別をしている
5139 */
5240 lastAccessed : UnixTime | null ;
5341 /** 生成されたPage historyの数 */ snapshotCount : number ;
5442 /** 不明。削除されたページだとfalse? */ persistent : boolean ;
55- /** ページの行情報 */ lines : Line [ ] ;
43+ /** ページの行情報 */ lines : BaseLine [ ] ;
5644 /** ページ内のリンク */ links : string [ ] ;
5745 /** ページ内のアイコン */ icons : string [ ] ;
5846 /** ページ内に含まれる、scrapbox.ioにアップロードしたファイルへのリンク */
@@ -74,7 +62,7 @@ export interface PageList {
7462 /** parameterに渡したskipと同じ */ skip : number ;
7563 /** parameterに渡したlimitと同じ */ limit : number ;
7664 /** projectの全ページ数 (中身のないページを除く) */ count : number ;
77- /** 取得できたページ情報 */ pages : PageSummary [ ] ;
65+ /** 取得できたページ情報 */ pages : BasePage [ ] ;
7866}
7967
8068/** project information which isn't joined */
@@ -128,7 +116,7 @@ export type UserResponse = GuestUser | MemberUser;
128116
129117/** the response type of https://scrapbox.io/api/pages/:projectname/search/titles */
130118export interface SearchedTitle
131- extends Pick < PageBase , "id" | "title" | "updated" > {
119+ extends Pick < BasePage , "id" | "title" | "updated" > {
132120 /** 画像が存在するかどうか */ hasIcon : boolean ;
133121 /** ページ内のリンク */ links : string [ ] ;
134122}
@@ -141,7 +129,7 @@ export interface ExportedPage<hasMetadata extends true | false = false>
141129 * `hasMetadata === true`のときは行のmetadataが入る
142130 * それ以外の場合は行のテキストが入る
143131 */
144- lines : hasMetadata extends true ? Omit < Line , "id" | "userId" > [ ]
132+ lines : hasMetadata extends true ? Omit < BaseLine , "id" | "userId" > [ ]
145133 : string [ ] ;
146134}
147135
0 commit comments