feat!: playlists

This commit is contained in:
2024-12-01 03:49:08 +01:00
parent 1a4bde9618
commit 2772abcd2f
40 changed files with 1530 additions and 69 deletions

View File

@@ -4,6 +4,12 @@
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
import { Library } from "./library";
import type { RemoveTrackFromPlaylistRequest } from "./library";
import type { AddTrackToPlaylistRequest } from "./library";
import type { DeletePlaylistRequest } from "./library";
import type { CreatePlaylistResponse } from "./library";
import type { CreatePlaylistRequest } from "./library";
import type { ListPlaylistsResponse } from "./library";
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
import type { TrackList } from "./library";
import type { Empty } from "./google/protobuf/empty";
@@ -17,6 +23,26 @@ export interface ILibraryClient {
* @generated from protobuf rpc: ListTracks(google.protobuf.Empty) returns (library.TrackList);
*/
listTracks(input: Empty, options?: RpcOptions): UnaryCall<Empty, TrackList>;
/**
* @generated from protobuf rpc: ListPlaylists(google.protobuf.Empty) returns (library.ListPlaylistsResponse);
*/
listPlaylists(input: Empty, options?: RpcOptions): UnaryCall<Empty, ListPlaylistsResponse>;
/**
* @generated from protobuf rpc: CreatePlaylist(library.CreatePlaylistRequest) returns (library.CreatePlaylistResponse);
*/
createPlaylist(input: CreatePlaylistRequest, options?: RpcOptions): UnaryCall<CreatePlaylistRequest, CreatePlaylistResponse>;
/**
* @generated from protobuf rpc: DeletePlaylist(library.DeletePlaylistRequest) returns (google.protobuf.Empty);
*/
deletePlaylist(input: DeletePlaylistRequest, options?: RpcOptions): UnaryCall<DeletePlaylistRequest, Empty>;
/**
* @generated from protobuf rpc: AddTrackToPlaylist(library.AddTrackToPlaylistRequest) returns (google.protobuf.Empty);
*/
addTrackToPlaylist(input: AddTrackToPlaylistRequest, options?: RpcOptions): UnaryCall<AddTrackToPlaylistRequest, Empty>;
/**
* @generated from protobuf rpc: RemoveTrackFromPlaylist(library.RemoveTrackFromPlaylistRequest) returns (google.protobuf.Empty);
*/
removeTrackFromPlaylist(input: RemoveTrackFromPlaylistRequest, options?: RpcOptions): UnaryCall<RemoveTrackFromPlaylistRequest, Empty>;
}
/**
* @generated from protobuf service library.Library
@@ -34,4 +60,39 @@ export class LibraryClient implements ILibraryClient, ServiceInfo {
const method = this.methods[0], opt = this._transport.mergeOptions(options);
return stackIntercept<Empty, TrackList>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: ListPlaylists(google.protobuf.Empty) returns (library.ListPlaylistsResponse);
*/
listPlaylists(input: Empty, options?: RpcOptions): UnaryCall<Empty, ListPlaylistsResponse> {
const method = this.methods[1], opt = this._transport.mergeOptions(options);
return stackIntercept<Empty, ListPlaylistsResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: CreatePlaylist(library.CreatePlaylistRequest) returns (library.CreatePlaylistResponse);
*/
createPlaylist(input: CreatePlaylistRequest, options?: RpcOptions): UnaryCall<CreatePlaylistRequest, CreatePlaylistResponse> {
const method = this.methods[2], opt = this._transport.mergeOptions(options);
return stackIntercept<CreatePlaylistRequest, CreatePlaylistResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: DeletePlaylist(library.DeletePlaylistRequest) returns (google.protobuf.Empty);
*/
deletePlaylist(input: DeletePlaylistRequest, options?: RpcOptions): UnaryCall<DeletePlaylistRequest, Empty> {
const method = this.methods[3], opt = this._transport.mergeOptions(options);
return stackIntercept<DeletePlaylistRequest, Empty>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: AddTrackToPlaylist(library.AddTrackToPlaylistRequest) returns (google.protobuf.Empty);
*/
addTrackToPlaylist(input: AddTrackToPlaylistRequest, options?: RpcOptions): UnaryCall<AddTrackToPlaylistRequest, Empty> {
const method = this.methods[4], opt = this._transport.mergeOptions(options);
return stackIntercept<AddTrackToPlaylistRequest, Empty>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: RemoveTrackFromPlaylist(library.RemoveTrackFromPlaylistRequest) returns (google.protobuf.Empty);
*/
removeTrackFromPlaylist(input: RemoveTrackFromPlaylistRequest, options?: RpcOptions): UnaryCall<RemoveTrackFromPlaylistRequest, Empty> {
const method = this.methods[5], opt = this._transport.mergeOptions(options);
return stackIntercept<RemoveTrackFromPlaylistRequest, Empty>("unary", this._transport, method, opt, input);
}
}