Skip to content

Commit d92bed3

Browse files
authored
Merge pull request #35 from takker99/fix-projects
✨ Add Response type of /api/projects
2 parents 2343403 + 46aec0b commit d92bed3

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

response.ts

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ export interface PageList {
122122
pages: BasePage[];
123123
}
124124

125-
/** project information which isn't joined */
126-
export interface NotMemberProject {
125+
/** project information */
126+
export interface Project {
127127
id: ProjectId;
128128
name: string;
129129
displayName: string;
@@ -132,9 +132,26 @@ export interface NotMemberProject {
132132
theme: string;
133133
gyazoTeamsName: string | null;
134134
googleAnalyticsCode: string | null;
135-
image?: string;
135+
/** planの種類
136+
*
137+
* public projectの場合は`null`になる
138+
*
139+
* 古いprojectだとpropertyが生えていない
140+
*/
141+
plan?: string | null;
136142
created: UnixTime;
137143
updated: UnixTime;
144+
isMember: boolean;
145+
}
146+
147+
/** the response type of /api/projects */
148+
export interface ProjectResponse {
149+
projects: Project[];
150+
}
151+
152+
/** project information which isn't joined */
153+
export interface NotMemberProject extends Omit<Project, "isMember"> {
154+
image?: string;
138155
isMember: false;
139156
}
140157

0 commit comments

Comments
 (0)