mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
25 lines
899 B
TypeScript
25 lines
899 B
TypeScript
|
|
import type { AlbumListQuery, SongListQuery } from './types';
|
||
|
|
import type { AlbumDetailQuery } from './types';
|
||
|
|
|
||
|
|
export const queryKeys = {
|
||
|
|
albums: {
|
||
|
|
detail: (serverId: string, query: AlbumDetailQuery) =>
|
||
|
|
[serverId, 'albums', 'detail', query] as const,
|
||
|
|
list: (serverId: string, query: AlbumListQuery) => [serverId, 'albums', 'list', query] as const,
|
||
|
|
root: ['albums'],
|
||
|
|
serverRoot: (serverId: string) => [serverId, 'albums'],
|
||
|
|
songs: (serverId: string, query: SongListQuery) =>
|
||
|
|
[serverId, 'albums', 'songs', query] as const,
|
||
|
|
},
|
||
|
|
genres: {
|
||
|
|
list: (serverId: string) => [serverId, 'genres', 'list'] as const,
|
||
|
|
root: (serverId: string) => [serverId, 'genres'] as const,
|
||
|
|
},
|
||
|
|
server: {
|
||
|
|
root: (serverId: string) => [serverId] as const,
|
||
|
|
},
|
||
|
|
songs: {
|
||
|
|
list: (serverId: string, query: SongListQuery) => [serverId, 'songs', 'list', query] as const,
|
||
|
|
},
|
||
|
|
};
|