feat: remove, copy and reorder several playlist songs at once

This commit is contained in:
DiheChen committed 2026-11-09 21:28:12 +08:00
1 parent a07ef81e3c
commit 4a59c639cd
33 files changed
+1570 -92

No files matched your search

+19 -3
View File
@@ -109,6 +109,15 @@ export interface ChangePasswordRequest {
newPassword: string
}
export interface CopyMyPlaylistItemsRequest {
from: string
tracks: Track[]
}
export interface CopyMyPlaylistItemsResponse {
added: number
}
export type CreateMemberRequest = Record<string, never>
export interface CreateMemberResponse {
@@ -171,6 +180,11 @@ export interface LoginResponse {
memberToken: string
}
export interface MoveMyPlaylistItemsRequest {
before?: Track
tracks: Track[]
}
export interface RegisterRequest {
password: string
username: string
@@ -180,8 +194,8 @@ export interface RegisterResponse {
account: Account
}
export interface RemoveMyPlaylistItemRequest {
track: Track
export interface RemoveMyPlaylistItemsRequest {
tracks: Track[]
}
export interface RenameMyPlaylistRequest {
@@ -227,7 +241,9 @@ export function httpClient(send: HttpSend) {
deleteMyPlaylist: (id: string) => send<void>({ method: 'DELETE', path: `/api/me/playlists/${encodeURIComponent(id)}`, auth: 'member' }),
listMyPlaylistItems: (id: string) => send<ListMyPlaylistItemsResponse>({ method: 'GET', path: `/api/me/playlists/${encodeURIComponent(id)}/items`, auth: 'member' }),
addMyPlaylistItem: (id: string, body: AddMyPlaylistItemRequest) => send<AddMyPlaylistItemResponse>({ method: 'POST', path: `/api/me/playlists/${encodeURIComponent(id)}/items`, auth: 'member', body }),
removeMyPlaylistItem: (id: string, body: RemoveMyPlaylistItemRequest) => send<void>({ method: 'POST', path: `/api/me/playlists/${encodeURIComponent(id)}/removals`, auth: 'member', body }),
removeMyPlaylistItems: (id: string, body: RemoveMyPlaylistItemsRequest) => send<void>({ method: 'POST', path: `/api/me/playlists/${encodeURIComponent(id)}/removals`, auth: 'member', body }),
copyMyPlaylistItems: (id: string, body: CopyMyPlaylistItemsRequest) => send<CopyMyPlaylistItemsResponse>({ method: 'POST', path: `/api/me/playlists/${encodeURIComponent(id)}/copies`, auth: 'member', body }),
moveMyPlaylistItems: (id: string, body: MoveMyPlaylistItemsRequest) => send<void>({ method: 'POST', path: `/api/me/playlists/${encodeURIComponent(id)}/moves`, auth: 'member', body }),
listRooms: () => send<ListRoomsResponse>({ method: 'GET', path: '/api/rooms', auth: 'none' }),
getRoom: (ref: string) => send<RoomListing>({ method: 'GET', path: `/api/rooms/${encodeURIComponent(ref)}`, auth: 'none' }),
createRoom: (body: CreateRoomRequest) => send<CreateRoomResponse>({ method: 'POST', path: '/api/rooms', auth: 'none', body }),
+1 -1
View File
@@ -1,6 +1,6 @@
// Code generated by protocolgen from protocol/idl.json; DO NOT EDIT.
export const PROTOCOL_VERSION = '189d6eb97c028124'
export const PROTOCOL_VERSION = '000976bd80c1113a'
export interface APIKey {
key: string