Skip to content

Commit 7b3ec71

Browse files
authored
Merge pull request #49 from takker99:infobox
feat: add properties related to infobox and 2 hop search
2 parents 35c504c + ea1da59 commit 7b3ec71

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

response.ts

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,21 @@ export interface Page extends BasePage {
7070
/** ページ内に含まれる、scrapbox.ioにアップロードしたファイルのfile id */
7171
files: string[];
7272

73+
infoboxDefinition: string[];
74+
75+
infoboxResult: InfoboxResult[];
76+
77+
infoboxDisableLinks: string[];
78+
7379
/** 関連ページリスト */
7480
relatedPages: RelatedPages;
7581

76-
/** 最後にページを更新したユーザー */
82+
/** ページを作成したユーザー */
7783
user: User;
7884

85+
/** 最後にページを更新したユーザー */
86+
lastUpdateUser: User;
87+
7988
/** ページを編集したユーザーのうち、`user`以外の人 */
8089
collaborators: User[];
8190
}
@@ -92,6 +101,22 @@ export interface RelatedPages {
92101

93102
/** このページを参照しているページorアイコンがあればtrue */
94103
hasBackLinksOrIcons: boolean;
104+
105+
/** 2 hop searchのquery */
106+
search: string;
107+
108+
/** 全文検索エンジンの名前 */
109+
searchBackend: string;
110+
}
111+
112+
export interface InfoboxResult {
113+
title: string;
114+
115+
infobox: Record<string, string>;
116+
117+
hallucination: boolean;
118+
119+
truncated: boolean;
95120
}
96121

97122
/** 関連ページのメタデータ */
@@ -103,6 +128,8 @@ export interface RelatedPage extends
103128
| "image"
104129
| "descriptions"
105130
| "linked"
131+
| "pageRank"
132+
| "created"
106133
| "updated"
107134
| "accessed"
108135
> {
@@ -115,10 +142,19 @@ export interface RelatedPage extends
115142
* links2hopの場合:ページ内の全てのリンクのうち、`Page.links`に含まれるリンク
116143
*/
117144
linksLc: StringLc[];
145+
146+
infoboxResult: InfoboxResult[];
147+
148+
infoboxDisableLinks: string[];
149+
150+
search: SearchQuery;
118151
}
119152

120153
/** 外部プロジェクトの関連ページ */
121-
export interface ProjectRelatedPage extends Omit<RelatedPage, "linksLc"> {
154+
export interface ProjectRelatedPage
155+
extends Omit<RelatedPage, "linksLc" | "created" | "pageRank"> {
156+
created: number | null;
157+
122158
/** project name */
123159
projectName: string;
124160
}

0 commit comments

Comments
 (0)