mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-29 03:33:47 +02:00
refactor: add type definitions for API responses
This commit is contained in:
@@ -3,7 +3,7 @@ import { useWorldStore } from '../stores';
|
||||
|
||||
const worldReq = {
|
||||
/**
|
||||
* @type {import('../types/world').getWorld}
|
||||
* @type {import('../types/api/world').GetWorld}
|
||||
*/
|
||||
getWorld(params) {
|
||||
const worldStore = useWorldStore();
|
||||
@@ -47,22 +47,7 @@ const worldReq = {
|
||||
},
|
||||
|
||||
/**
|
||||
* @typedef {object} WorldSearchParameter
|
||||
* @property {number} n
|
||||
* @property {number} offset
|
||||
* @property {string} search
|
||||
* @property {string} userId
|
||||
* @property {'me' | 'friend'} user
|
||||
* @property {'popularity' | 'heat' | 'trust' | 'shuffle' | 'favorites' | 'reportScore' | 'reportCount' | 'publicationDate' | 'labsPublicationDate' | 'created' | '_created_at' | 'updated' | '_updated_at' | 'order'} sort
|
||||
* @property {'ascending' | 'descending'} order
|
||||
* @property {'public' | 'private' | 'hidden' | 'all'} releaseStatus
|
||||
* @property {boolean} featured
|
||||
*/
|
||||
/**
|
||||
*
|
||||
* @param {WorldSearchParameter} params
|
||||
* @param {string?} option sub-path of calling endpoint
|
||||
* @returns {Promise<{json: any, params, option}>}
|
||||
* @type {import('../types/api/world').GetWorlds}
|
||||
*/
|
||||
getWorlds(params, option) {
|
||||
const worldStore = useWorldStore();
|
||||
|
||||
Reference in New Issue
Block a user