From c10957fd39e1d0cfec3abf18364539b2bc04b26c Mon Sep 17 00:00:00 2001 From: takker99 <37929109+takker99@users.noreply.github.com> Date: Sun, 14 Jul 2024 10:34:34 +0900 Subject: [PATCH 1/3] feat(project): Keep up with changes about projects --- response.ts | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/response.ts b/response.ts index b291e42..fa4a092 100644 --- a/response.ts +++ b/response.ts @@ -201,12 +201,6 @@ export interface Project { loginStrategies: string[]; - theme: string; - - gyazoTeamsName: string | null; - - googleAnalyticsCode: string | null; - /** planの種類 * * public projectの場合は`null`になる @@ -215,11 +209,21 @@ export interface Project { */ plan?: string | null; + theme: string; + + gyazoTeamsName: string | null; + + translation: boolean; + + infobox: boolean; + created: UnixTime; updated: UnixTime; isMember: boolean; + + trialing: boolean; } /** the response type of /api/projects */ @@ -228,17 +232,18 @@ export interface ProjectResponse { } /** project information which isn't joined */ -export interface NotMemberProject extends Omit { +export interface NotMemberProject + extends Omit { image?: string; isMember: false; } /** project information which is joined */ -export interface MemberProject extends Omit { +export interface MemberProject extends Omit { isMember: true; - plan?: string | null; + image?: string; users: UserInfo[]; @@ -246,7 +251,7 @@ export interface MemberProject extends Omit { owner: UserId; - trialing: boolean; + isUserPageExists: boolean; trialMaxPages: number; @@ -258,6 +263,8 @@ export interface MemberProject extends Omit { emailAddressPatterns: string[]; + projectScript: boolean; + backuped: UnixTime | null; } @@ -420,6 +427,8 @@ export interface SearchResult { /** 検索文字列と完全一致するタイトルが見つかったら`true` */ existsExactTitleMatch: boolean; + field: "title" | "helpfeels" | "lines"; + /** 全文検索エンジンの名前 */ backend: string; From f243ccc34af877cd2768ee536972c45f07cb35d3 Mon Sep 17 00:00:00 2001 From: takker99 <37929109+takker99@users.noreply.github.com> Date: Sun, 14 Jul 2024 10:36:02 +0900 Subject: [PATCH 2/3] feat(search): Keep up with changes about search --- response.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/response.ts b/response.ts index fa4a092..06564a3 100644 --- a/response.ts +++ b/response.ts @@ -459,6 +459,18 @@ export interface FoundPage { lines: string[]; } +/** the response type of /api/pages/:projectname/search/files */ +export interface FileSearchResult + extends Omit { + /** 見つかったページ */ + pages: FoundPageByFile[]; +} + +/** /api/pages/:projectname/search/files で見つかったページ */ +export interface FoundPageByFile extends FoundPage { + file: string; +} + /** the response type of /api/projects/search/query and /api/projects/search/watch-list */ export interface ProjectSearchResult { /** 検索文字列 */ From 90580b09e04cec9c2cfd7897b2d93c06560db4c6 Mon Sep 17 00:00:00 2001 From: takker99 <37929109+takker99@users.noreply.github.com> Date: Sun, 14 Jul 2024 10:36:15 +0900 Subject: [PATCH 3/3] feat(page-snapshot): Keep up with changes about page-snapshots --- response.ts | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/response.ts b/response.ts index 06564a3..bc800ae 100644 --- a/response.ts +++ b/response.ts @@ -516,13 +516,33 @@ export interface CommitsResponse { } /** the response type of /api/page-snapshots/:projectname/:pageid */ -export interface PageSnapshot { +export interface PageSnapshotList { pageId: PageId; + /** 作成されているsnapshotsのtimestamp idのリスト */ + timestamps: SnapshotTimestamp[]; + /** 作成されているsnapshots */ snapshots: Snapshot[]; } +export interface SnapshotTimestamp { + id: string; + created: UnixTime; +} + +/** the response type of /api/page-snapshots/:projectname/:pageid/:timestampid */ +export interface PageSnapshotResult { + page: PageWithSnapshot; + + snapshot: Snapshot; +} + +export interface PageWithSnapshot extends BasePage { + user: Pick; + lastupdateUser: Pick | null; +} + /** a page snapshot */ export interface Snapshot { /** snapshotを撮ったときのページタイトル */