Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 67 additions & 2 deletions api/pages/project.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BasePage } from "../../base.ts";
import type { CommitId, PageId, UnixTime, UserId } from "../../base.ts";

/** the response type of https://scrpabox.io/api/pages/:projectname */
export interface PageList {
Expand All @@ -15,5 +15,70 @@ export interface PageList {
count: number;

/** 取得できたページ情報 */
pages: BasePage[];
pages: PageSummery[];
}

/** a page summery included in {@linkcode PageList} */
export interface PageSummery {
/** page id */
id: PageId;

/** 最新の編集コミットid */
commitId: CommitId;

/** the title of a page */
title: string;

/** the thumbnail URL of a page if exists
*
* set to `null` if not exists
*/
image: string | null;

/** the thumbnail text of a page.
*
* the maximum number of lines is 5.
*/
descriptions: string[];

/** the user who created the page (maybe) */
user: {
id: UserId;
};

/** the user who last updated the page (maybe) */
lastUpdateUser: {
id: UserId;
};

/** ピン留めの状態を表す数値
*
* - 0: ピンされてない
* - 0以外: ピンされている
*/
pin: number;

/** ページの作成日時 */
created: UnixTime;

/** ページの最終更新日時 */
updated: UnixTime;

/** Date last visitedに使われる最終アクセス日時 */
accessed: UnixTime;

/** ページの閲覧回数 */
views: number;

/** 被リンク数 */
linked: number;

/** The total number of lines in the page */
linesCount: number;

/** The total number of characters in the page */
charsCount: number;

/** The list of helpfeel notations in the page */
helpfeels: string[];
}