1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-18 00:28:16 +09:00

feat: add type of gallery (#55)

* update GalleryPost type

* update gallery/featured type

* update gallery/popular type

* update gallery/posts type

* update gallery/posts/create type

* update gallery/posts/like type

* update gallery/posts/show type

* update gallery/posts/unlike type

* update gallery/posts/update type
This commit is contained in:
日高 凌 2023-02-11 07:55:29 +09:00 committed by GitHub
parent 4922cb92e0
commit 13a2d16eab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 73 additions and 26 deletions

View File

@ -1177,20 +1177,29 @@ export type Endpoints = {
res: null; res: null;
}; };
'gallery/featured': { 'gallery/featured': {
req: TODO; req: null;
res: TODO; res: GalleryPost[];
}; };
'gallery/popular': { 'gallery/popular': {
req: TODO; req: null;
res: TODO; res: GalleryPost[];
}; };
'gallery/posts': { 'gallery/posts': {
req: TODO; req: {
res: TODO; limit?: number;
sinceId?: GalleryPost['id'];
untilId?: GalleryPost['id'];
};
res: GalleryPost[];
}; };
'gallery/posts/create': { 'gallery/posts/create': {
req: TODO; req: {
res: TODO; title: GalleryPost['title'];
description?: GalleryPost['description'];
fileIds: GalleryPost['fileIds'];
isSensitive?: GalleryPost['isSensitive'];
};
res: GalleryPost;
}; };
'gallery/posts/delete': { 'gallery/posts/delete': {
req: { req: {
@ -1199,20 +1208,32 @@ export type Endpoints = {
res: null; res: null;
}; };
'gallery/posts/like': { 'gallery/posts/like': {
req: TODO; req: {
res: TODO; postId: GalleryPost['id'];
};
res: null;
}; };
'gallery/posts/show': { 'gallery/posts/show': {
req: TODO; req: {
res: TODO; postId: GalleryPost['id'];
};
res: GalleryPost;
}; };
'gallery/posts/unlike': { 'gallery/posts/unlike': {
req: TODO; req: {
res: TODO; postId: GalleryPost['id'];
};
res: null;
}; };
'gallery/posts/update': { 'gallery/posts/update': {
req: TODO; req: {
res: TODO; postId: GalleryPost['id'];
title: GalleryPost['title'];
description?: GalleryPost['description'];
fileIds: GalleryPost['fileIds'];
isSensitive?: GalleryPost['isSensitive'];
};
res: GalleryPost;
}; };
'games/reversi/games': { 'games/reversi/games': {
req: TODO; req: TODO;
@ -2224,7 +2245,20 @@ type FollowRequest = {
}; };
// @public (undocumented) // @public (undocumented)
type GalleryPost = TODO_2; type GalleryPost = {
id: ID;
createdAt: DateString;
updatedAt: DateString;
userId: User['id'];
user: User;
title: string;
description: string | null;
fileIds: DriveFile['id'][];
files: DriveFile[];
isSensitive: boolean;
likedCount: number;
isLiked?: boolean;
};
// @public (undocumented) // @public (undocumented)
type ID = string; type ID = string;

View File

@ -317,15 +317,15 @@ export type Endpoints = {
'following/requests/reject': { req: { userId: User['id'] }; res: null; }; 'following/requests/reject': { req: { userId: User['id'] }; res: null; };
// gallery // gallery
'gallery/featured': { req: TODO; res: TODO; }; 'gallery/featured': { req: null; res: GalleryPost[]; };
'gallery/popular': { req: TODO; res: TODO; }; 'gallery/popular': { req: null; res: GalleryPost[]; };
'gallery/posts': { req: TODO; res: TODO; }; 'gallery/posts': { req: { limit?: number; sinceId?: GalleryPost['id']; untilId?: GalleryPost['id']; }; res: GalleryPost[]; };
'gallery/posts/create': { req: TODO; res: TODO; }; 'gallery/posts/create': { req: { title: GalleryPost['title']; description?: GalleryPost['description']; fileIds: GalleryPost['fileIds']; isSensitive?: GalleryPost['isSensitive'] }; res: GalleryPost; };
'gallery/posts/delete': { req: { postId: GalleryPost['id'] }; res: null; }; 'gallery/posts/delete': { req: { postId: GalleryPost['id'] }; res: null; };
'gallery/posts/like': { req: TODO; res: TODO; }; 'gallery/posts/like': { req: { postId: GalleryPost['id'] }; res: null; };
'gallery/posts/show': { req: TODO; res: TODO; }; 'gallery/posts/show': { req: { postId: GalleryPost['id'] }; res: GalleryPost; };
'gallery/posts/unlike': { req: TODO; res: TODO; }; 'gallery/posts/unlike': { req: { postId: GalleryPost['id'] }; res: null; };
'gallery/posts/update': { req: TODO; res: TODO; }; 'gallery/posts/update': { req: { postId: GalleryPost['id']; title: GalleryPost['title']; description?: GalleryPost['description']; fileIds: GalleryPost['fileIds']; isSensitive?: GalleryPost['isSensitive'] }; res: GalleryPost; };
// games // games
'games/reversi/games': { req: TODO; res: TODO; }; 'games/reversi/games': { req: TODO; res: TODO; };

View File

@ -123,7 +123,20 @@ export type DriveFile = {
export type DriveFolder = TODO; export type DriveFolder = TODO;
export type GalleryPost = TODO; export type GalleryPost = {
id: ID;
createdAt: DateString;
updatedAt: DateString;
userId: User['id'];
user: User;
title: string;
description: string | null;
fileIds: DriveFile['id'][];
files: DriveFile[];
isSensitive: boolean;
likedCount: number;
isLiked?: boolean;
};
export type Note = { export type Note = {
id: ID; id: ID;