27 lines
761 B
TypeScript
27 lines
761 B
TypeScript
/**
|
|
* The site search finds dumps, users and playlists at once. This module types
|
|
* its results, which the `Search` page shows under one tab per kind.
|
|
*
|
|
* @module
|
|
*/
|
|
|
|
import type { PaginatedData } from "./api.ts";
|
|
import type { Dump } from "./dump.ts";
|
|
import type { Playlist } from "./playlist.ts";
|
|
import type { PublicUser } from "./user.ts";
|
|
|
|
/**
|
|
* Returned by `GET /api/search` to the `Search` page. Only the dumps are paged,
|
|
* and each page brings the users and playlists again.
|
|
*/
|
|
export interface SearchResults {
|
|
/**
|
|
* It always has its `total`, which the page shows in the dumps tab's label.
|
|
*/
|
|
dumps: PaginatedData<Dump>;
|
|
/** There are 20 at most. */
|
|
users: PublicUser[];
|
|
/** There are 20 at most. */
|
|
playlists: Playlist[];
|
|
}
|