diff options
| author | 日高 凌 <ryo.hi.19971219@gmail.com> | 2023-02-11 07:55:29 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-11 07:55:29 +0900 |
| commit | 13a2d16eab8637b6250396548619cd2cdf80a3c3 (patch) | |
| tree | 0ef341588bff6f7f2b728481d4a69f8fad229a30 /src/api.types.ts | |
| parent | 0.0.15 (diff) | |
| download | sharkey-13a2d16eab8637b6250396548619cd2cdf80a3c3.tar.gz sharkey-13a2d16eab8637b6250396548619cd2cdf80a3c3.tar.bz2 sharkey-13a2d16eab8637b6250396548619cd2cdf80a3c3.zip | |
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
Diffstat (limited to 'src/api.types.ts')
| -rw-r--r-- | src/api.types.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/api.types.ts b/src/api.types.ts index 2a08af7d64..4fbf42f917 100644 --- a/src/api.types.ts +++ b/src/api.types.ts @@ -317,15 +317,15 @@ export type Endpoints = { 'following/requests/reject': { req: { userId: User['id'] }; res: null; }; // gallery - 'gallery/featured': { req: TODO; res: TODO; }; - 'gallery/popular': { req: TODO; res: TODO; }; - 'gallery/posts': { req: TODO; res: TODO; }; - 'gallery/posts/create': { req: TODO; res: TODO; }; + 'gallery/featured': { req: null; res: GalleryPost[]; }; + 'gallery/popular': { req: null; res: GalleryPost[]; }; + 'gallery/posts': { req: { limit?: number; sinceId?: GalleryPost['id']; untilId?: GalleryPost['id']; }; res: GalleryPost[]; }; + '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/like': { req: TODO; res: TODO; }; - 'gallery/posts/show': { req: TODO; res: TODO; }; - 'gallery/posts/unlike': { req: TODO; res: TODO; }; - 'gallery/posts/update': { req: TODO; res: TODO; }; + 'gallery/posts/like': { req: { postId: GalleryPost['id'] }; res: null; }; + 'gallery/posts/show': { req: { postId: GalleryPost['id'] }; res: GalleryPost; }; + 'gallery/posts/unlike': { req: { postId: GalleryPost['id'] }; res: null; }; + 'gallery/posts/update': { req: { postId: GalleryPost['id']; title: GalleryPost['title']; description?: GalleryPost['description']; fileIds: GalleryPost['fileIds']; isSensitive?: GalleryPost['isSensitive'] }; res: GalleryPost; }; // games 'games/reversi/games': { req: TODO; res: TODO; }; |