refactor: add type definitions for API responses

This commit is contained in:
pa
2025-07-16 13:31:48 +09:00
committed by Natsumi
parent 342850dc7e
commit 0e50a67c25
17 changed files with 601 additions and 206 deletions

View File

@@ -1,6 +1,9 @@
import { request } from '../service/request';
import { useGroupStore, useNotificationStore } from '../stores';
/**
* @returns {any}
*/
function getGalleryStore() {
return useGroupStore();
}
@@ -35,6 +38,10 @@ const notificationReq = {
});
},
/**
* @param {{n?: number, offset?: number}} params
* @returns {Promise<{json: any, params: any}>}
*/
getHiddenFriendRequests(params) {
return request('auth/user/notifications', {
method: 'GET',
@@ -52,6 +59,10 @@ const notificationReq = {
});
},
/**
* @param {{n?: number, offset?: number, type?: string}} params
* @returns {Promise<{json: any, params: any}>}
*/
getNotificationsV2(params) {
return request('notifications', {
method: 'GET',