📝型定義修正 (scrapbox-jp/types)
scrapbox-jp/typesの型定義の修正・追加に関する作業ページ
修正案件が発生したら、適宜タイトルの✅を📝に変える
やること
型定義追加
api/stream/:projectname/
/icons/done.iconapi/commits/:projectname/:pageid
https://github.com/scrapbox-jp/types/pull/28
/icons/done.iconapi/page-snapshots/:projectname/:pageid
https://github.com/scrapbox-jp/types/pull/34
/icons/done.iconapi/projects
https://github.com/scrapbox-jp/types/pull/35
型定義修正
/icons/done.iconapi/pages/:projectname/:pagetitle
external linksで追加されたpropertiesを入れる
https://github.com/scrapbox-jp/types/pull/31
/icons/done.iconscrapbox.Project.pages
hasIconはoptional
titleLengthForSort: number;が追加
https://github.com/scrapbox-jp/types/pull/29
scrapbox.Page.lines
TableBlockのcellsがNode[]になっていない
2022-04-16 12:32:59 string[]のままだった
どうやってリンク解析してるんだろう?
2023-08-14 03:52:36 どっかで調べた。Rendering時に解析してるみたい
/icons/done.iconSpotifyとAnchorの埋め込み追加
https://github.com/scrapbox-jp/types/pull/30
/icons/done.iconNotLoggedInErrorにprojectを生やす
https://github.com/scrapbox-jp/types/pull/32
/icons/done.iconPageMenu.addItemの型ミスってる
https://github.com/scrapbox-jp/types/blob/0.3.0/pageMenu.ts#L20
https://github.com/scrapbox-jp/types/pull/33
api/pages/:projectname/search/titlesの型定義変更
変更前
https://code2svg.vercel.app/svg/L195-203/https://raw.githubusercontent.com/scrapbox-jp/types/0.4.2/response.ts#.svg https://github.com/scrapbox-jp/types/blob/0.4.2/response.ts#L195-L203
変更後
code:ts
/** the response type of https://scrapbox.io/api/pages/:projectname/search/titles */
export interface SearchedTitle
extends Pick<BasePage, "id" | "title" | "updated"> {
/** サムネイルURL */
image?: string;
/** ページ内のリンク */
links: string[];
}
どうやらサムネイルのURLが直接埋め込まれるように変更されたみたい
おそらく、api/pages/:projectname/:pagetitle/iconを使わないことで、scrapbox.ioをいちいち経由せず、clientから直接画像サーバーへ画像を問い合わせられるようにするため
同様の修正がscrapbox.Project.pagesにも適用されていた
#2023-08-14 03:52:15
#2022-05-01 20:36:40
#2022-04-16 11:52:13