A decentralized music tracking and discovery platform built on AT Protocol 🎵 rocksky.app
spotify atproto lastfm musicbrainz scrobbling listenbrainz
0

Configure Feed

Select the types of activity you want to include in your feed.

feat(sdk): propagate app.rocksky.library.* to all SDK generated layers

Regenerate every SDK's generated code from the lexicons so the 41 new
library methods are present and callable across all languages.

- crates/rocksky-sdk (Rust engine for the 8 FFI SDKs — python/kotlin/ruby/
elixir/erlang/gleam/clojure): jacquard-regenerated; adds the app_rocksky/
library/* request builders + `pub mod library;`. All FFI SDKs can already
invoke library endpoints via the existing generic rocksky_get(nsid, params)
C-ABI path.
- TypeScript (sdk/typescript) + Go (sdk/go): regenerated types via
tools/lexgen. The Endpoints map grows by the 41 library endpoints.
- tools/lexgen: fix a latent endpoint-type-name collision. Names were derived
from the method segment only, so library's Subsonic-style getSong/getAlbum/
getPlaylist/search/etc. collided with the existing song/album/playlist/feed
namespaces and silently clobbered them. Now colliding stems are qualified
with the namespace segment (LibraryGetSong vs SongGetSong); unique names are
untouched, so nothing hand-written breaks.

Verified: cargo check (rocksky-sdk, rocksky-uniffi, rocksky-nif), TS
`tsc --noEmit`, and Go `go build ./...` all pass.

+5959 -174
+1
crates/rocksky-sdk/src/app_rocksky.rs
··· 13 13 pub mod feed; 14 14 pub mod googledrive; 15 15 pub mod graph; 16 + pub mod library; 16 17 pub mod like; 17 18 pub mod mirror; 18 19 pub mod player;
+47
crates/rocksky-sdk/src/app_rocksky/library.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // This file was automatically generated from Lexicon schemas. 4 + // Any manual changes will be overwritten on the next regeneration. 5 + 6 + //! Generated bindings for the `app.rocksky.library` Lexicon namespace/module. 7 + pub mod create_playlist; 8 + pub mod delete_album; 9 + pub mod delete_playlist; 10 + pub mod delete_song; 11 + pub mod get_album; 12 + pub mod get_album_info; 13 + pub mod get_album_list; 14 + pub mod get_artist; 15 + pub mod get_artist_info; 16 + pub mod get_artists; 17 + pub mod get_cover_art_url; 18 + pub mod get_download_url; 19 + pub mod get_genres; 20 + pub mod get_indexes; 21 + pub mod get_internet_radio_stations; 22 + pub mod get_license; 23 + pub mod get_lyrics; 24 + pub mod get_music_directory; 25 + pub mod get_music_folders; 26 + pub mod get_now_playing; 27 + pub mod get_play_queue; 28 + pub mod get_playlist; 29 + pub mod get_playlists; 30 + pub mod get_random_songs; 31 + pub mod get_scan_status; 32 + pub mod get_similar_songs; 33 + pub mod get_song; 34 + pub mod get_songs_by_genre; 35 + pub mod get_starred; 36 + pub mod get_stream_url; 37 + pub mod get_top_songs; 38 + pub mod get_user; 39 + pub mod ping; 40 + pub mod save_play_queue; 41 + pub mod scrobble; 42 + pub mod search; 43 + pub mod star; 44 + pub mod start_scan; 45 + pub mod unstar; 46 + pub mod update_now_playing; 47 + pub mod update_playlist;
+69
crates/rocksky-sdk/src/app_rocksky/library/create_playlist.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.createPlaylist 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct CreatePlaylist<S: BosStr = DefaultStr> { 25 + ///The playlist name. 26 + pub name: S, 27 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 28 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 29 + } 30 + 31 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 32 + #[serde( 33 + rename_all = "camelCase", 34 + bound(deserialize = "S: Deserialize<'de> + BosStr") 35 + )] 36 + pub struct CreatePlaylistOutput<S: BosStr = DefaultStr> { 37 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 38 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 39 + } 40 + 41 + /** Response marker for the `app.rocksky.library.createPlaylist` procedure. 42 + 43 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `CreatePlaylistOutput<S>` for this endpoint.*/ 44 + pub struct CreatePlaylistResponse; 45 + impl jacquard_common::xrpc::XrpcResp for CreatePlaylistResponse { 46 + const NSID: &'static str = "app.rocksky.library.createPlaylist"; 47 + const ENCODING: &'static str = "application/json"; 48 + type Output<S: BosStr> = CreatePlaylistOutput<S>; 49 + type Err = jacquard_common::xrpc::GenericError; 50 + } 51 + 52 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for CreatePlaylist<S> { 53 + const NSID: &'static str = "app.rocksky.library.createPlaylist"; 54 + const METHOD: jacquard_common::xrpc::XrpcMethod = 55 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 56 + type Response = CreatePlaylistResponse; 57 + } 58 + 59 + /** Endpoint marker for the `app.rocksky.library.createPlaylist` procedure. 60 + 61 + Path: `/xrpc/app.rocksky.library.createPlaylist`. The request payload type is `CreatePlaylist<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 62 + pub struct CreatePlaylistRequest; 63 + impl jacquard_common::xrpc::XrpcEndpoint for CreatePlaylistRequest { 64 + const PATH: &'static str = "/xrpc/app.rocksky.library.createPlaylist"; 65 + const METHOD: jacquard_common::xrpc::XrpcMethod = 66 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 67 + type Request<S: BosStr> = CreatePlaylist<S>; 68 + type Response = CreatePlaylistResponse; 69 + }
+73
crates/rocksky-sdk/src/app_rocksky/library/delete_album.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.deleteAlbum 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct DeleteAlbum<S: BosStr = DefaultStr> { 25 + ///The album id (album xata_id, as exposed by the library API). 26 + pub id: S, 27 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 28 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 29 + } 30 + 31 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 32 + #[serde( 33 + rename_all = "camelCase", 34 + bound(deserialize = "S: Deserialize<'de> + BosStr") 35 + )] 36 + pub struct DeleteAlbumOutput<S: BosStr = DefaultStr> { 37 + ///Number of uploads deleted for the album. 38 + pub deleted: i64, 39 + ///Always "ok" on success. 40 + pub status: S, 41 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 42 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 43 + } 44 + 45 + /** Response marker for the `app.rocksky.library.deleteAlbum` procedure. 46 + 47 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `DeleteAlbumOutput<S>` for this endpoint.*/ 48 + pub struct DeleteAlbumResponse; 49 + impl jacquard_common::xrpc::XrpcResp for DeleteAlbumResponse { 50 + const NSID: &'static str = "app.rocksky.library.deleteAlbum"; 51 + const ENCODING: &'static str = "application/json"; 52 + type Output<S: BosStr> = DeleteAlbumOutput<S>; 53 + type Err = jacquard_common::xrpc::GenericError; 54 + } 55 + 56 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for DeleteAlbum<S> { 57 + const NSID: &'static str = "app.rocksky.library.deleteAlbum"; 58 + const METHOD: jacquard_common::xrpc::XrpcMethod = 59 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 60 + type Response = DeleteAlbumResponse; 61 + } 62 + 63 + /** Endpoint marker for the `app.rocksky.library.deleteAlbum` procedure. 64 + 65 + Path: `/xrpc/app.rocksky.library.deleteAlbum`. The request payload type is `DeleteAlbum<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 66 + pub struct DeleteAlbumRequest; 67 + impl jacquard_common::xrpc::XrpcEndpoint for DeleteAlbumRequest { 68 + const PATH: &'static str = "/xrpc/app.rocksky.library.deleteAlbum"; 69 + const METHOD: jacquard_common::xrpc::XrpcMethod = 70 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 71 + type Request<S: BosStr> = DeleteAlbum<S>; 72 + type Response = DeleteAlbumResponse; 73 + }
+69
crates/rocksky-sdk/src/app_rocksky/library/delete_playlist.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.deletePlaylist 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct DeletePlaylist<S: BosStr = DefaultStr> { 25 + ///The playlist id to delete. 26 + pub id: S, 27 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 28 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 29 + } 30 + 31 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 32 + #[serde( 33 + rename_all = "camelCase", 34 + bound(deserialize = "S: Deserialize<'de> + BosStr") 35 + )] 36 + pub struct DeletePlaylistOutput<S: BosStr = DefaultStr> { 37 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 38 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 39 + } 40 + 41 + /** Response marker for the `app.rocksky.library.deletePlaylist` procedure. 42 + 43 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `DeletePlaylistOutput<S>` for this endpoint.*/ 44 + pub struct DeletePlaylistResponse; 45 + impl jacquard_common::xrpc::XrpcResp for DeletePlaylistResponse { 46 + const NSID: &'static str = "app.rocksky.library.deletePlaylist"; 47 + const ENCODING: &'static str = "application/json"; 48 + type Output<S: BosStr> = DeletePlaylistOutput<S>; 49 + type Err = jacquard_common::xrpc::GenericError; 50 + } 51 + 52 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for DeletePlaylist<S> { 53 + const NSID: &'static str = "app.rocksky.library.deletePlaylist"; 54 + const METHOD: jacquard_common::xrpc::XrpcMethod = 55 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 56 + type Response = DeletePlaylistResponse; 57 + } 58 + 59 + /** Endpoint marker for the `app.rocksky.library.deletePlaylist` procedure. 60 + 61 + Path: `/xrpc/app.rocksky.library.deletePlaylist`. The request payload type is `DeletePlaylist<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 62 + pub struct DeletePlaylistRequest; 63 + impl jacquard_common::xrpc::XrpcEndpoint for DeletePlaylistRequest { 64 + const PATH: &'static str = "/xrpc/app.rocksky.library.deletePlaylist"; 65 + const METHOD: jacquard_common::xrpc::XrpcMethod = 66 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 67 + type Request<S: BosStr> = DeletePlaylist<S>; 68 + type Response = DeletePlaylistResponse; 69 + }
+73
crates/rocksky-sdk/src/app_rocksky/library/delete_song.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.deleteSong 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct DeleteSong<S: BosStr = DefaultStr> { 25 + ///The song id (track xata_id, as exposed by the library API). 26 + pub id: S, 27 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 28 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 29 + } 30 + 31 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 32 + #[serde( 33 + rename_all = "camelCase", 34 + bound(deserialize = "S: Deserialize<'de> + BosStr") 35 + )] 36 + pub struct DeleteSongOutput<S: BosStr = DefaultStr> { 37 + ///Number of uploads deleted (0 or 1). 38 + pub deleted: i64, 39 + ///Always "ok" on success. 40 + pub status: S, 41 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 42 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 43 + } 44 + 45 + /** Response marker for the `app.rocksky.library.deleteSong` procedure. 46 + 47 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `DeleteSongOutput<S>` for this endpoint.*/ 48 + pub struct DeleteSongResponse; 49 + impl jacquard_common::xrpc::XrpcResp for DeleteSongResponse { 50 + const NSID: &'static str = "app.rocksky.library.deleteSong"; 51 + const ENCODING: &'static str = "application/json"; 52 + type Output<S: BosStr> = DeleteSongOutput<S>; 53 + type Err = jacquard_common::xrpc::GenericError; 54 + } 55 + 56 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for DeleteSong<S> { 57 + const NSID: &'static str = "app.rocksky.library.deleteSong"; 58 + const METHOD: jacquard_common::xrpc::XrpcMethod = 59 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 60 + type Response = DeleteSongResponse; 61 + } 62 + 63 + /** Endpoint marker for the `app.rocksky.library.deleteSong` procedure. 64 + 65 + Path: `/xrpc/app.rocksky.library.deleteSong`. The request payload type is `DeleteSong<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 66 + pub struct DeleteSongRequest; 67 + impl jacquard_common::xrpc::XrpcEndpoint for DeleteSongRequest { 68 + const PATH: &'static str = "/xrpc/app.rocksky.library.deleteSong"; 69 + const METHOD: jacquard_common::xrpc::XrpcMethod = 70 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 71 + type Request<S: BosStr> = DeleteSong<S>; 72 + type Response = DeleteSongResponse; 73 + }
+168
crates/rocksky-sdk/src/app_rocksky/library/get_album.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getAlbum 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct GetAlbum<S: BosStr = DefaultStr> { 25 + pub id: S, 26 + } 27 + 28 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 29 + #[serde( 30 + rename_all = "camelCase", 31 + bound(deserialize = "S: Deserialize<'de> + BosStr") 32 + )] 33 + pub struct GetAlbumOutput<S: BosStr = DefaultStr> { 34 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 35 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 36 + } 37 + 38 + /** Response marker for the `app.rocksky.library.getAlbum` query. 39 + 40 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetAlbumOutput<S>` for this endpoint.*/ 41 + pub struct GetAlbumResponse; 42 + impl jacquard_common::xrpc::XrpcResp for GetAlbumResponse { 43 + const NSID: &'static str = "app.rocksky.library.getAlbum"; 44 + const ENCODING: &'static str = "application/json"; 45 + type Output<S: BosStr> = GetAlbumOutput<S>; 46 + type Err = jacquard_common::xrpc::GenericError; 47 + } 48 + 49 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetAlbum<S> { 50 + const NSID: &'static str = "app.rocksky.library.getAlbum"; 51 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 52 + type Response = GetAlbumResponse; 53 + } 54 + 55 + /** Endpoint marker for the `app.rocksky.library.getAlbum` query. 56 + 57 + Path: `/xrpc/app.rocksky.library.getAlbum`. The request payload type is `GetAlbum<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 58 + pub struct GetAlbumRequest; 59 + impl jacquard_common::xrpc::XrpcEndpoint for GetAlbumRequest { 60 + const PATH: &'static str = "/xrpc/app.rocksky.library.getAlbum"; 61 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 62 + type Request<S: BosStr> = GetAlbum<S>; 63 + type Response = GetAlbumResponse; 64 + } 65 + 66 + pub mod get_album_state { 67 + 68 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 69 + #[allow(unused)] 70 + use ::core::marker::PhantomData; 71 + mod sealed { 72 + pub trait Sealed {} 73 + } 74 + /// State trait tracking which required fields have been set 75 + pub trait State: sealed::Sealed { 76 + type Id; 77 + } 78 + /// Empty state - all required fields are unset 79 + pub struct Empty(()); 80 + impl sealed::Sealed for Empty {} 81 + impl State for Empty { 82 + type Id = Unset; 83 + } 84 + ///State transition - sets the `id` field to Set 85 + pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>); 86 + impl<St: State> sealed::Sealed for SetId<St> {} 87 + impl<St: State> State for SetId<St> { 88 + type Id = Set<members::id>; 89 + } 90 + /// Marker types for field names 91 + #[allow(non_camel_case_types)] 92 + pub mod members { 93 + ///Marker type for the `id` field 94 + pub struct id(()); 95 + } 96 + } 97 + 98 + /// Builder for constructing an instance of this type. 99 + pub struct GetAlbumBuilder<St: get_album_state::State, S: BosStr = DefaultStr> { 100 + _state: PhantomData<fn() -> St>, 101 + _fields: (Option<S>,), 102 + _type: PhantomData<fn() -> S>, 103 + } 104 + 105 + impl GetAlbum<DefaultStr> { 106 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 107 + pub fn new() -> GetAlbumBuilder<get_album_state::Empty, DefaultStr> { 108 + GetAlbumBuilder::new() 109 + } 110 + } 111 + 112 + impl<S: BosStr> GetAlbum<S> { 113 + /// Create a new builder for this type 114 + pub fn builder() -> GetAlbumBuilder<get_album_state::Empty, S> { 115 + GetAlbumBuilder::builder() 116 + } 117 + } 118 + 119 + impl GetAlbumBuilder<get_album_state::Empty, DefaultStr> { 120 + /// Create a new builder with all fields unset, using the default string type, if needed 121 + pub fn new() -> Self { 122 + GetAlbumBuilder { 123 + _state: PhantomData, 124 + _fields: (None,), 125 + _type: PhantomData, 126 + } 127 + } 128 + } 129 + 130 + impl<S: BosStr> GetAlbumBuilder<get_album_state::Empty, S> { 131 + /// Create a new builder with all fields unset 132 + pub fn builder() -> Self { 133 + GetAlbumBuilder { 134 + _state: PhantomData, 135 + _fields: (None,), 136 + _type: PhantomData, 137 + } 138 + } 139 + } 140 + 141 + impl<St, S: BosStr> GetAlbumBuilder<St, S> 142 + where 143 + St: get_album_state::State, 144 + St::Id: get_album_state::IsUnset, 145 + { 146 + /// Set the `id` field (required) 147 + pub fn id(mut self, value: impl Into<S>) -> GetAlbumBuilder<get_album_state::SetId<St>, S> { 148 + self._fields.0 = Option::Some(value.into()); 149 + GetAlbumBuilder { 150 + _state: PhantomData, 151 + _fields: self._fields, 152 + _type: PhantomData, 153 + } 154 + } 155 + } 156 + 157 + impl<St, S: BosStr> GetAlbumBuilder<St, S> 158 + where 159 + St: get_album_state::State, 160 + St::Id: get_album_state::IsSet, 161 + { 162 + /// Build the final struct. 163 + pub fn build(self) -> GetAlbum<S> { 164 + GetAlbum { 165 + id: self._fields.0.unwrap(), 166 + } 167 + } 168 + }
+171
crates/rocksky-sdk/src/app_rocksky/library/get_album_info.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getAlbumInfo 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct GetAlbumInfo<S: BosStr = DefaultStr> { 25 + pub id: S, 26 + } 27 + 28 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 29 + #[serde( 30 + rename_all = "camelCase", 31 + bound(deserialize = "S: Deserialize<'de> + BosStr") 32 + )] 33 + pub struct GetAlbumInfoOutput<S: BosStr = DefaultStr> { 34 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 35 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 36 + } 37 + 38 + /** Response marker for the `app.rocksky.library.getAlbumInfo` query. 39 + 40 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetAlbumInfoOutput<S>` for this endpoint.*/ 41 + pub struct GetAlbumInfoResponse; 42 + impl jacquard_common::xrpc::XrpcResp for GetAlbumInfoResponse { 43 + const NSID: &'static str = "app.rocksky.library.getAlbumInfo"; 44 + const ENCODING: &'static str = "application/json"; 45 + type Output<S: BosStr> = GetAlbumInfoOutput<S>; 46 + type Err = jacquard_common::xrpc::GenericError; 47 + } 48 + 49 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetAlbumInfo<S> { 50 + const NSID: &'static str = "app.rocksky.library.getAlbumInfo"; 51 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 52 + type Response = GetAlbumInfoResponse; 53 + } 54 + 55 + /** Endpoint marker for the `app.rocksky.library.getAlbumInfo` query. 56 + 57 + Path: `/xrpc/app.rocksky.library.getAlbumInfo`. The request payload type is `GetAlbumInfo<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 58 + pub struct GetAlbumInfoRequest; 59 + impl jacquard_common::xrpc::XrpcEndpoint for GetAlbumInfoRequest { 60 + const PATH: &'static str = "/xrpc/app.rocksky.library.getAlbumInfo"; 61 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 62 + type Request<S: BosStr> = GetAlbumInfo<S>; 63 + type Response = GetAlbumInfoResponse; 64 + } 65 + 66 + pub mod get_album_info_state { 67 + 68 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 69 + #[allow(unused)] 70 + use ::core::marker::PhantomData; 71 + mod sealed { 72 + pub trait Sealed {} 73 + } 74 + /// State trait tracking which required fields have been set 75 + pub trait State: sealed::Sealed { 76 + type Id; 77 + } 78 + /// Empty state - all required fields are unset 79 + pub struct Empty(()); 80 + impl sealed::Sealed for Empty {} 81 + impl State for Empty { 82 + type Id = Unset; 83 + } 84 + ///State transition - sets the `id` field to Set 85 + pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>); 86 + impl<St: State> sealed::Sealed for SetId<St> {} 87 + impl<St: State> State for SetId<St> { 88 + type Id = Set<members::id>; 89 + } 90 + /// Marker types for field names 91 + #[allow(non_camel_case_types)] 92 + pub mod members { 93 + ///Marker type for the `id` field 94 + pub struct id(()); 95 + } 96 + } 97 + 98 + /// Builder for constructing an instance of this type. 99 + pub struct GetAlbumInfoBuilder<St: get_album_info_state::State, S: BosStr = DefaultStr> { 100 + _state: PhantomData<fn() -> St>, 101 + _fields: (Option<S>,), 102 + _type: PhantomData<fn() -> S>, 103 + } 104 + 105 + impl GetAlbumInfo<DefaultStr> { 106 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 107 + pub fn new() -> GetAlbumInfoBuilder<get_album_info_state::Empty, DefaultStr> { 108 + GetAlbumInfoBuilder::new() 109 + } 110 + } 111 + 112 + impl<S: BosStr> GetAlbumInfo<S> { 113 + /// Create a new builder for this type 114 + pub fn builder() -> GetAlbumInfoBuilder<get_album_info_state::Empty, S> { 115 + GetAlbumInfoBuilder::builder() 116 + } 117 + } 118 + 119 + impl GetAlbumInfoBuilder<get_album_info_state::Empty, DefaultStr> { 120 + /// Create a new builder with all fields unset, using the default string type, if needed 121 + pub fn new() -> Self { 122 + GetAlbumInfoBuilder { 123 + _state: PhantomData, 124 + _fields: (None,), 125 + _type: PhantomData, 126 + } 127 + } 128 + } 129 + 130 + impl<S: BosStr> GetAlbumInfoBuilder<get_album_info_state::Empty, S> { 131 + /// Create a new builder with all fields unset 132 + pub fn builder() -> Self { 133 + GetAlbumInfoBuilder { 134 + _state: PhantomData, 135 + _fields: (None,), 136 + _type: PhantomData, 137 + } 138 + } 139 + } 140 + 141 + impl<St, S: BosStr> GetAlbumInfoBuilder<St, S> 142 + where 143 + St: get_album_info_state::State, 144 + St::Id: get_album_info_state::IsUnset, 145 + { 146 + /// Set the `id` field (required) 147 + pub fn id( 148 + mut self, 149 + value: impl Into<S>, 150 + ) -> GetAlbumInfoBuilder<get_album_info_state::SetId<St>, S> { 151 + self._fields.0 = Option::Some(value.into()); 152 + GetAlbumInfoBuilder { 153 + _state: PhantomData, 154 + _fields: self._fields, 155 + _type: PhantomData, 156 + } 157 + } 158 + } 159 + 160 + impl<St, S: BosStr> GetAlbumInfoBuilder<St, S> 161 + where 162 + St: get_album_info_state::State, 163 + St::Id: get_album_info_state::IsSet, 164 + { 165 + /// Build the final struct. 166 + pub fn build(self) -> GetAlbumInfo<S> { 167 + GetAlbumInfo { 168 + id: self._fields.0.unwrap(), 169 + } 170 + } 171 + }
+259
crates/rocksky-sdk/src/app_rocksky/library/get_album_list.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getAlbumList 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct GetAlbumList<S: BosStr = DefaultStr> { 25 + #[serde(skip_serializing_if = "Option::is_none")] 26 + pub from_year: Option<i64>, 27 + #[serde(skip_serializing_if = "Option::is_none")] 28 + pub genre: Option<S>, 29 + /// (min: 0) 30 + #[serde(skip_serializing_if = "Option::is_none")] 31 + pub offset: Option<i64>, 32 + #[serde(skip_serializing_if = "Option::is_none")] 33 + pub size: Option<i64>, 34 + #[serde(skip_serializing_if = "Option::is_none")] 35 + pub to_year: Option<i64>, 36 + pub r#type: S, 37 + } 38 + 39 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 40 + #[serde( 41 + rename_all = "camelCase", 42 + bound(deserialize = "S: Deserialize<'de> + BosStr") 43 + )] 44 + pub struct GetAlbumListOutput<S: BosStr = DefaultStr> { 45 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 46 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 47 + } 48 + 49 + /** Response marker for the `app.rocksky.library.getAlbumList` query. 50 + 51 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetAlbumListOutput<S>` for this endpoint.*/ 52 + pub struct GetAlbumListResponse; 53 + impl jacquard_common::xrpc::XrpcResp for GetAlbumListResponse { 54 + const NSID: &'static str = "app.rocksky.library.getAlbumList"; 55 + const ENCODING: &'static str = "application/json"; 56 + type Output<S: BosStr> = GetAlbumListOutput<S>; 57 + type Err = jacquard_common::xrpc::GenericError; 58 + } 59 + 60 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetAlbumList<S> { 61 + const NSID: &'static str = "app.rocksky.library.getAlbumList"; 62 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 63 + type Response = GetAlbumListResponse; 64 + } 65 + 66 + /** Endpoint marker for the `app.rocksky.library.getAlbumList` query. 67 + 68 + Path: `/xrpc/app.rocksky.library.getAlbumList`. The request payload type is `GetAlbumList<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 69 + pub struct GetAlbumListRequest; 70 + impl jacquard_common::xrpc::XrpcEndpoint for GetAlbumListRequest { 71 + const PATH: &'static str = "/xrpc/app.rocksky.library.getAlbumList"; 72 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 73 + type Request<S: BosStr> = GetAlbumList<S>; 74 + type Response = GetAlbumListResponse; 75 + } 76 + 77 + pub mod get_album_list_state { 78 + 79 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 80 + #[allow(unused)] 81 + use ::core::marker::PhantomData; 82 + mod sealed { 83 + pub trait Sealed {} 84 + } 85 + /// State trait tracking which required fields have been set 86 + pub trait State: sealed::Sealed { 87 + type Type; 88 + } 89 + /// Empty state - all required fields are unset 90 + pub struct Empty(()); 91 + impl sealed::Sealed for Empty {} 92 + impl State for Empty { 93 + type Type = Unset; 94 + } 95 + ///State transition - sets the `type` field to Set 96 + pub struct SetType<St: State = Empty>(PhantomData<fn() -> St>); 97 + impl<St: State> sealed::Sealed for SetType<St> {} 98 + impl<St: State> State for SetType<St> { 99 + type Type = Set<members::r#type>; 100 + } 101 + /// Marker types for field names 102 + #[allow(non_camel_case_types)] 103 + pub mod members { 104 + ///Marker type for the `type` field 105 + pub struct r#type(()); 106 + } 107 + } 108 + 109 + /// Builder for constructing an instance of this type. 110 + pub struct GetAlbumListBuilder<St: get_album_list_state::State, S: BosStr = DefaultStr> { 111 + _state: PhantomData<fn() -> St>, 112 + _fields: ( 113 + Option<i64>, 114 + Option<S>, 115 + Option<i64>, 116 + Option<i64>, 117 + Option<i64>, 118 + Option<S>, 119 + ), 120 + _type: PhantomData<fn() -> S>, 121 + } 122 + 123 + impl GetAlbumList<DefaultStr> { 124 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 125 + pub fn new() -> GetAlbumListBuilder<get_album_list_state::Empty, DefaultStr> { 126 + GetAlbumListBuilder::new() 127 + } 128 + } 129 + 130 + impl<S: BosStr> GetAlbumList<S> { 131 + /// Create a new builder for this type 132 + pub fn builder() -> GetAlbumListBuilder<get_album_list_state::Empty, S> { 133 + GetAlbumListBuilder::builder() 134 + } 135 + } 136 + 137 + impl GetAlbumListBuilder<get_album_list_state::Empty, DefaultStr> { 138 + /// Create a new builder with all fields unset, using the default string type, if needed 139 + pub fn new() -> Self { 140 + GetAlbumListBuilder { 141 + _state: PhantomData, 142 + _fields: (None, None, None, None, None, None), 143 + _type: PhantomData, 144 + } 145 + } 146 + } 147 + 148 + impl<S: BosStr> GetAlbumListBuilder<get_album_list_state::Empty, S> { 149 + /// Create a new builder with all fields unset 150 + pub fn builder() -> Self { 151 + GetAlbumListBuilder { 152 + _state: PhantomData, 153 + _fields: (None, None, None, None, None, None), 154 + _type: PhantomData, 155 + } 156 + } 157 + } 158 + 159 + impl<St: get_album_list_state::State, S: BosStr> GetAlbumListBuilder<St, S> { 160 + /// Set the `fromYear` field (optional) 161 + pub fn from_year(mut self, value: impl Into<Option<i64>>) -> Self { 162 + self._fields.0 = value.into(); 163 + self 164 + } 165 + /// Set the `fromYear` field to an Option value (optional) 166 + pub fn maybe_from_year(mut self, value: Option<i64>) -> Self { 167 + self._fields.0 = value; 168 + self 169 + } 170 + } 171 + 172 + impl<St: get_album_list_state::State, S: BosStr> GetAlbumListBuilder<St, S> { 173 + /// Set the `genre` field (optional) 174 + pub fn genre(mut self, value: impl Into<Option<S>>) -> Self { 175 + self._fields.1 = value.into(); 176 + self 177 + } 178 + /// Set the `genre` field to an Option value (optional) 179 + pub fn maybe_genre(mut self, value: Option<S>) -> Self { 180 + self._fields.1 = value; 181 + self 182 + } 183 + } 184 + 185 + impl<St: get_album_list_state::State, S: BosStr> GetAlbumListBuilder<St, S> { 186 + /// Set the `offset` field (optional) 187 + pub fn offset(mut self, value: impl Into<Option<i64>>) -> Self { 188 + self._fields.2 = value.into(); 189 + self 190 + } 191 + /// Set the `offset` field to an Option value (optional) 192 + pub fn maybe_offset(mut self, value: Option<i64>) -> Self { 193 + self._fields.2 = value; 194 + self 195 + } 196 + } 197 + 198 + impl<St: get_album_list_state::State, S: BosStr> GetAlbumListBuilder<St, S> { 199 + /// Set the `size` field (optional) 200 + pub fn size(mut self, value: impl Into<Option<i64>>) -> Self { 201 + self._fields.3 = value.into(); 202 + self 203 + } 204 + /// Set the `size` field to an Option value (optional) 205 + pub fn maybe_size(mut self, value: Option<i64>) -> Self { 206 + self._fields.3 = value; 207 + self 208 + } 209 + } 210 + 211 + impl<St: get_album_list_state::State, S: BosStr> GetAlbumListBuilder<St, S> { 212 + /// Set the `toYear` field (optional) 213 + pub fn to_year(mut self, value: impl Into<Option<i64>>) -> Self { 214 + self._fields.4 = value.into(); 215 + self 216 + } 217 + /// Set the `toYear` field to an Option value (optional) 218 + pub fn maybe_to_year(mut self, value: Option<i64>) -> Self { 219 + self._fields.4 = value; 220 + self 221 + } 222 + } 223 + 224 + impl<St, S: BosStr> GetAlbumListBuilder<St, S> 225 + where 226 + St: get_album_list_state::State, 227 + St::Type: get_album_list_state::IsUnset, 228 + { 229 + /// Set the `type` field (required) 230 + pub fn r#type( 231 + mut self, 232 + value: impl Into<S>, 233 + ) -> GetAlbumListBuilder<get_album_list_state::SetType<St>, S> { 234 + self._fields.5 = Option::Some(value.into()); 235 + GetAlbumListBuilder { 236 + _state: PhantomData, 237 + _fields: self._fields, 238 + _type: PhantomData, 239 + } 240 + } 241 + } 242 + 243 + impl<St, S: BosStr> GetAlbumListBuilder<St, S> 244 + where 245 + St: get_album_list_state::State, 246 + St::Type: get_album_list_state::IsSet, 247 + { 248 + /// Build the final struct. 249 + pub fn build(self) -> GetAlbumList<S> { 250 + GetAlbumList { 251 + from_year: self._fields.0, 252 + genre: self._fields.1, 253 + offset: self._fields.2, 254 + size: self._fields.3, 255 + to_year: self._fields.4, 256 + r#type: self._fields.5.unwrap(), 257 + } 258 + } 259 + }
+168
crates/rocksky-sdk/src/app_rocksky/library/get_artist.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getArtist 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct GetArtist<S: BosStr = DefaultStr> { 25 + pub id: S, 26 + } 27 + 28 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 29 + #[serde( 30 + rename_all = "camelCase", 31 + bound(deserialize = "S: Deserialize<'de> + BosStr") 32 + )] 33 + pub struct GetArtistOutput<S: BosStr = DefaultStr> { 34 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 35 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 36 + } 37 + 38 + /** Response marker for the `app.rocksky.library.getArtist` query. 39 + 40 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetArtistOutput<S>` for this endpoint.*/ 41 + pub struct GetArtistResponse; 42 + impl jacquard_common::xrpc::XrpcResp for GetArtistResponse { 43 + const NSID: &'static str = "app.rocksky.library.getArtist"; 44 + const ENCODING: &'static str = "application/json"; 45 + type Output<S: BosStr> = GetArtistOutput<S>; 46 + type Err = jacquard_common::xrpc::GenericError; 47 + } 48 + 49 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetArtist<S> { 50 + const NSID: &'static str = "app.rocksky.library.getArtist"; 51 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 52 + type Response = GetArtistResponse; 53 + } 54 + 55 + /** Endpoint marker for the `app.rocksky.library.getArtist` query. 56 + 57 + Path: `/xrpc/app.rocksky.library.getArtist`. The request payload type is `GetArtist<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 58 + pub struct GetArtistRequest; 59 + impl jacquard_common::xrpc::XrpcEndpoint for GetArtistRequest { 60 + const PATH: &'static str = "/xrpc/app.rocksky.library.getArtist"; 61 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 62 + type Request<S: BosStr> = GetArtist<S>; 63 + type Response = GetArtistResponse; 64 + } 65 + 66 + pub mod get_artist_state { 67 + 68 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 69 + #[allow(unused)] 70 + use ::core::marker::PhantomData; 71 + mod sealed { 72 + pub trait Sealed {} 73 + } 74 + /// State trait tracking which required fields have been set 75 + pub trait State: sealed::Sealed { 76 + type Id; 77 + } 78 + /// Empty state - all required fields are unset 79 + pub struct Empty(()); 80 + impl sealed::Sealed for Empty {} 81 + impl State for Empty { 82 + type Id = Unset; 83 + } 84 + ///State transition - sets the `id` field to Set 85 + pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>); 86 + impl<St: State> sealed::Sealed for SetId<St> {} 87 + impl<St: State> State for SetId<St> { 88 + type Id = Set<members::id>; 89 + } 90 + /// Marker types for field names 91 + #[allow(non_camel_case_types)] 92 + pub mod members { 93 + ///Marker type for the `id` field 94 + pub struct id(()); 95 + } 96 + } 97 + 98 + /// Builder for constructing an instance of this type. 99 + pub struct GetArtistBuilder<St: get_artist_state::State, S: BosStr = DefaultStr> { 100 + _state: PhantomData<fn() -> St>, 101 + _fields: (Option<S>,), 102 + _type: PhantomData<fn() -> S>, 103 + } 104 + 105 + impl GetArtist<DefaultStr> { 106 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 107 + pub fn new() -> GetArtistBuilder<get_artist_state::Empty, DefaultStr> { 108 + GetArtistBuilder::new() 109 + } 110 + } 111 + 112 + impl<S: BosStr> GetArtist<S> { 113 + /// Create a new builder for this type 114 + pub fn builder() -> GetArtistBuilder<get_artist_state::Empty, S> { 115 + GetArtistBuilder::builder() 116 + } 117 + } 118 + 119 + impl GetArtistBuilder<get_artist_state::Empty, DefaultStr> { 120 + /// Create a new builder with all fields unset, using the default string type, if needed 121 + pub fn new() -> Self { 122 + GetArtistBuilder { 123 + _state: PhantomData, 124 + _fields: (None,), 125 + _type: PhantomData, 126 + } 127 + } 128 + } 129 + 130 + impl<S: BosStr> GetArtistBuilder<get_artist_state::Empty, S> { 131 + /// Create a new builder with all fields unset 132 + pub fn builder() -> Self { 133 + GetArtistBuilder { 134 + _state: PhantomData, 135 + _fields: (None,), 136 + _type: PhantomData, 137 + } 138 + } 139 + } 140 + 141 + impl<St, S: BosStr> GetArtistBuilder<St, S> 142 + where 143 + St: get_artist_state::State, 144 + St::Id: get_artist_state::IsUnset, 145 + { 146 + /// Set the `id` field (required) 147 + pub fn id(mut self, value: impl Into<S>) -> GetArtistBuilder<get_artist_state::SetId<St>, S> { 148 + self._fields.0 = Option::Some(value.into()); 149 + GetArtistBuilder { 150 + _state: PhantomData, 151 + _fields: self._fields, 152 + _type: PhantomData, 153 + } 154 + } 155 + } 156 + 157 + impl<St, S: BosStr> GetArtistBuilder<St, S> 158 + where 159 + St: get_artist_state::State, 160 + St::Id: get_artist_state::IsSet, 161 + { 162 + /// Build the final struct. 163 + pub fn build(self) -> GetArtist<S> { 164 + GetArtist { 165 + id: self._fields.0.unwrap(), 166 + } 167 + } 168 + }
+171
crates/rocksky-sdk/src/app_rocksky/library/get_artist_info.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getArtistInfo 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct GetArtistInfo<S: BosStr = DefaultStr> { 25 + pub id: S, 26 + } 27 + 28 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 29 + #[serde( 30 + rename_all = "camelCase", 31 + bound(deserialize = "S: Deserialize<'de> + BosStr") 32 + )] 33 + pub struct GetArtistInfoOutput<S: BosStr = DefaultStr> { 34 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 35 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 36 + } 37 + 38 + /** Response marker for the `app.rocksky.library.getArtistInfo` query. 39 + 40 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetArtistInfoOutput<S>` for this endpoint.*/ 41 + pub struct GetArtistInfoResponse; 42 + impl jacquard_common::xrpc::XrpcResp for GetArtistInfoResponse { 43 + const NSID: &'static str = "app.rocksky.library.getArtistInfo"; 44 + const ENCODING: &'static str = "application/json"; 45 + type Output<S: BosStr> = GetArtistInfoOutput<S>; 46 + type Err = jacquard_common::xrpc::GenericError; 47 + } 48 + 49 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetArtistInfo<S> { 50 + const NSID: &'static str = "app.rocksky.library.getArtistInfo"; 51 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 52 + type Response = GetArtistInfoResponse; 53 + } 54 + 55 + /** Endpoint marker for the `app.rocksky.library.getArtistInfo` query. 56 + 57 + Path: `/xrpc/app.rocksky.library.getArtistInfo`. The request payload type is `GetArtistInfo<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 58 + pub struct GetArtistInfoRequest; 59 + impl jacquard_common::xrpc::XrpcEndpoint for GetArtistInfoRequest { 60 + const PATH: &'static str = "/xrpc/app.rocksky.library.getArtistInfo"; 61 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 62 + type Request<S: BosStr> = GetArtistInfo<S>; 63 + type Response = GetArtistInfoResponse; 64 + } 65 + 66 + pub mod get_artist_info_state { 67 + 68 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 69 + #[allow(unused)] 70 + use ::core::marker::PhantomData; 71 + mod sealed { 72 + pub trait Sealed {} 73 + } 74 + /// State trait tracking which required fields have been set 75 + pub trait State: sealed::Sealed { 76 + type Id; 77 + } 78 + /// Empty state - all required fields are unset 79 + pub struct Empty(()); 80 + impl sealed::Sealed for Empty {} 81 + impl State for Empty { 82 + type Id = Unset; 83 + } 84 + ///State transition - sets the `id` field to Set 85 + pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>); 86 + impl<St: State> sealed::Sealed for SetId<St> {} 87 + impl<St: State> State for SetId<St> { 88 + type Id = Set<members::id>; 89 + } 90 + /// Marker types for field names 91 + #[allow(non_camel_case_types)] 92 + pub mod members { 93 + ///Marker type for the `id` field 94 + pub struct id(()); 95 + } 96 + } 97 + 98 + /// Builder for constructing an instance of this type. 99 + pub struct GetArtistInfoBuilder<St: get_artist_info_state::State, S: BosStr = DefaultStr> { 100 + _state: PhantomData<fn() -> St>, 101 + _fields: (Option<S>,), 102 + _type: PhantomData<fn() -> S>, 103 + } 104 + 105 + impl GetArtistInfo<DefaultStr> { 106 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 107 + pub fn new() -> GetArtistInfoBuilder<get_artist_info_state::Empty, DefaultStr> { 108 + GetArtistInfoBuilder::new() 109 + } 110 + } 111 + 112 + impl<S: BosStr> GetArtistInfo<S> { 113 + /// Create a new builder for this type 114 + pub fn builder() -> GetArtistInfoBuilder<get_artist_info_state::Empty, S> { 115 + GetArtistInfoBuilder::builder() 116 + } 117 + } 118 + 119 + impl GetArtistInfoBuilder<get_artist_info_state::Empty, DefaultStr> { 120 + /// Create a new builder with all fields unset, using the default string type, if needed 121 + pub fn new() -> Self { 122 + GetArtistInfoBuilder { 123 + _state: PhantomData, 124 + _fields: (None,), 125 + _type: PhantomData, 126 + } 127 + } 128 + } 129 + 130 + impl<S: BosStr> GetArtistInfoBuilder<get_artist_info_state::Empty, S> { 131 + /// Create a new builder with all fields unset 132 + pub fn builder() -> Self { 133 + GetArtistInfoBuilder { 134 + _state: PhantomData, 135 + _fields: (None,), 136 + _type: PhantomData, 137 + } 138 + } 139 + } 140 + 141 + impl<St, S: BosStr> GetArtistInfoBuilder<St, S> 142 + where 143 + St: get_artist_info_state::State, 144 + St::Id: get_artist_info_state::IsUnset, 145 + { 146 + /// Set the `id` field (required) 147 + pub fn id( 148 + mut self, 149 + value: impl Into<S>, 150 + ) -> GetArtistInfoBuilder<get_artist_info_state::SetId<St>, S> { 151 + self._fields.0 = Option::Some(value.into()); 152 + GetArtistInfoBuilder { 153 + _state: PhantomData, 154 + _fields: self._fields, 155 + _type: PhantomData, 156 + } 157 + } 158 + } 159 + 160 + impl<St, S: BosStr> GetArtistInfoBuilder<St, S> 161 + where 162 + St: get_artist_info_state::State, 163 + St::Id: get_artist_info_state::IsSet, 164 + { 165 + /// Build the final struct. 166 + pub fn build(self) -> GetArtistInfo<S> { 167 + GetArtistInfo { 168 + id: self._fields.0.unwrap(), 169 + } 170 + } 171 + }
+59
crates/rocksky-sdk/src/app_rocksky/library/get_artists.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getArtists 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde(rename_all = "camelCase")] 21 + pub struct GetArtists; 22 + 23 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 24 + #[serde( 25 + rename_all = "camelCase", 26 + bound(deserialize = "S: Deserialize<'de> + BosStr") 27 + )] 28 + pub struct GetArtistsOutput<S: BosStr = DefaultStr> { 29 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 30 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 31 + } 32 + 33 + /** Response marker for the `app.rocksky.library.getArtists` query. 34 + 35 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetArtistsOutput<S>` for this endpoint.*/ 36 + pub struct GetArtistsResponse; 37 + impl jacquard_common::xrpc::XrpcResp for GetArtistsResponse { 38 + const NSID: &'static str = "app.rocksky.library.getArtists"; 39 + const ENCODING: &'static str = "application/json"; 40 + type Output<S: BosStr> = GetArtistsOutput<S>; 41 + type Err = jacquard_common::xrpc::GenericError; 42 + } 43 + 44 + impl jacquard_common::xrpc::XrpcRequest for GetArtists { 45 + const NSID: &'static str = "app.rocksky.library.getArtists"; 46 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 47 + type Response = GetArtistsResponse; 48 + } 49 + 50 + /** Endpoint marker for the `app.rocksky.library.getArtists` query. 51 + 52 + Path: `/xrpc/app.rocksky.library.getArtists`. The request payload type is `GetArtists`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 53 + pub struct GetArtistsRequest; 54 + impl jacquard_common::xrpc::XrpcEndpoint for GetArtistsRequest { 55 + const PATH: &'static str = "/xrpc/app.rocksky.library.getArtists"; 56 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 + type Request<S: BosStr> = GetArtists; 58 + type Response = GetArtistsResponse; 59 + }
+190
crates/rocksky-sdk/src/app_rocksky/library/get_cover_art_url.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getCoverArtUrl 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::string::UriValue; 15 + use jacquard_common::types::value::Data; 16 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 17 + use jacquard_derive::IntoStatic; 18 + use serde::{Deserialize, Serialize}; 19 + 20 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 21 + #[serde( 22 + rename_all = "camelCase", 23 + bound(deserialize = "S: Deserialize<'de> + BosStr") 24 + )] 25 + pub struct GetCoverArtUrl<S: BosStr = DefaultStr> { 26 + pub id: S, 27 + #[serde(skip_serializing_if = "Option::is_none")] 28 + pub size: Option<i64>, 29 + } 30 + 31 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 32 + #[serde( 33 + rename_all = "camelCase", 34 + bound(deserialize = "S: Deserialize<'de> + BosStr") 35 + )] 36 + pub struct GetCoverArtUrlOutput<S: BosStr = DefaultStr> { 37 + ///The resolved media or cover-art URL. 38 + pub url: UriValue<S>, 39 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 40 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 41 + } 42 + 43 + /** Response marker for the `app.rocksky.library.getCoverArtUrl` query. 44 + 45 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetCoverArtUrlOutput<S>` for this endpoint.*/ 46 + pub struct GetCoverArtUrlResponse; 47 + impl jacquard_common::xrpc::XrpcResp for GetCoverArtUrlResponse { 48 + const NSID: &'static str = "app.rocksky.library.getCoverArtUrl"; 49 + const ENCODING: &'static str = "application/json"; 50 + type Output<S: BosStr> = GetCoverArtUrlOutput<S>; 51 + type Err = jacquard_common::xrpc::GenericError; 52 + } 53 + 54 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetCoverArtUrl<S> { 55 + const NSID: &'static str = "app.rocksky.library.getCoverArtUrl"; 56 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 + type Response = GetCoverArtUrlResponse; 58 + } 59 + 60 + /** Endpoint marker for the `app.rocksky.library.getCoverArtUrl` query. 61 + 62 + Path: `/xrpc/app.rocksky.library.getCoverArtUrl`. The request payload type is `GetCoverArtUrl<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 63 + pub struct GetCoverArtUrlRequest; 64 + impl jacquard_common::xrpc::XrpcEndpoint for GetCoverArtUrlRequest { 65 + const PATH: &'static str = "/xrpc/app.rocksky.library.getCoverArtUrl"; 66 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 67 + type Request<S: BosStr> = GetCoverArtUrl<S>; 68 + type Response = GetCoverArtUrlResponse; 69 + } 70 + 71 + pub mod get_cover_art_url_state { 72 + 73 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 74 + #[allow(unused)] 75 + use ::core::marker::PhantomData; 76 + mod sealed { 77 + pub trait Sealed {} 78 + } 79 + /// State trait tracking which required fields have been set 80 + pub trait State: sealed::Sealed { 81 + type Id; 82 + } 83 + /// Empty state - all required fields are unset 84 + pub struct Empty(()); 85 + impl sealed::Sealed for Empty {} 86 + impl State for Empty { 87 + type Id = Unset; 88 + } 89 + ///State transition - sets the `id` field to Set 90 + pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>); 91 + impl<St: State> sealed::Sealed for SetId<St> {} 92 + impl<St: State> State for SetId<St> { 93 + type Id = Set<members::id>; 94 + } 95 + /// Marker types for field names 96 + #[allow(non_camel_case_types)] 97 + pub mod members { 98 + ///Marker type for the `id` field 99 + pub struct id(()); 100 + } 101 + } 102 + 103 + /// Builder for constructing an instance of this type. 104 + pub struct GetCoverArtUrlBuilder<St: get_cover_art_url_state::State, S: BosStr = DefaultStr> { 105 + _state: PhantomData<fn() -> St>, 106 + _fields: (Option<S>, Option<i64>), 107 + _type: PhantomData<fn() -> S>, 108 + } 109 + 110 + impl GetCoverArtUrl<DefaultStr> { 111 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 112 + pub fn new() -> GetCoverArtUrlBuilder<get_cover_art_url_state::Empty, DefaultStr> { 113 + GetCoverArtUrlBuilder::new() 114 + } 115 + } 116 + 117 + impl<S: BosStr> GetCoverArtUrl<S> { 118 + /// Create a new builder for this type 119 + pub fn builder() -> GetCoverArtUrlBuilder<get_cover_art_url_state::Empty, S> { 120 + GetCoverArtUrlBuilder::builder() 121 + } 122 + } 123 + 124 + impl GetCoverArtUrlBuilder<get_cover_art_url_state::Empty, DefaultStr> { 125 + /// Create a new builder with all fields unset, using the default string type, if needed 126 + pub fn new() -> Self { 127 + GetCoverArtUrlBuilder { 128 + _state: PhantomData, 129 + _fields: (None, None), 130 + _type: PhantomData, 131 + } 132 + } 133 + } 134 + 135 + impl<S: BosStr> GetCoverArtUrlBuilder<get_cover_art_url_state::Empty, S> { 136 + /// Create a new builder with all fields unset 137 + pub fn builder() -> Self { 138 + GetCoverArtUrlBuilder { 139 + _state: PhantomData, 140 + _fields: (None, None), 141 + _type: PhantomData, 142 + } 143 + } 144 + } 145 + 146 + impl<St, S: BosStr> GetCoverArtUrlBuilder<St, S> 147 + where 148 + St: get_cover_art_url_state::State, 149 + St::Id: get_cover_art_url_state::IsUnset, 150 + { 151 + /// Set the `id` field (required) 152 + pub fn id( 153 + mut self, 154 + value: impl Into<S>, 155 + ) -> GetCoverArtUrlBuilder<get_cover_art_url_state::SetId<St>, S> { 156 + self._fields.0 = Option::Some(value.into()); 157 + GetCoverArtUrlBuilder { 158 + _state: PhantomData, 159 + _fields: self._fields, 160 + _type: PhantomData, 161 + } 162 + } 163 + } 164 + 165 + impl<St: get_cover_art_url_state::State, S: BosStr> GetCoverArtUrlBuilder<St, S> { 166 + /// Set the `size` field (optional) 167 + pub fn size(mut self, value: impl Into<Option<i64>>) -> Self { 168 + self._fields.1 = value.into(); 169 + self 170 + } 171 + /// Set the `size` field to an Option value (optional) 172 + pub fn maybe_size(mut self, value: Option<i64>) -> Self { 173 + self._fields.1 = value; 174 + self 175 + } 176 + } 177 + 178 + impl<St, S: BosStr> GetCoverArtUrlBuilder<St, S> 179 + where 180 + St: get_cover_art_url_state::State, 181 + St::Id: get_cover_art_url_state::IsSet, 182 + { 183 + /// Build the final struct. 184 + pub fn build(self) -> GetCoverArtUrl<S> { 185 + GetCoverArtUrl { 186 + id: self._fields.0.unwrap(), 187 + size: self._fields.1, 188 + } 189 + } 190 + }
+174
crates/rocksky-sdk/src/app_rocksky/library/get_download_url.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getDownloadUrl 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::string::UriValue; 15 + use jacquard_common::types::value::Data; 16 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 17 + use jacquard_derive::IntoStatic; 18 + use serde::{Deserialize, Serialize}; 19 + 20 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 21 + #[serde( 22 + rename_all = "camelCase", 23 + bound(deserialize = "S: Deserialize<'de> + BosStr") 24 + )] 25 + pub struct GetDownloadUrl<S: BosStr = DefaultStr> { 26 + pub id: S, 27 + } 28 + 29 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 30 + #[serde( 31 + rename_all = "camelCase", 32 + bound(deserialize = "S: Deserialize<'de> + BosStr") 33 + )] 34 + pub struct GetDownloadUrlOutput<S: BosStr = DefaultStr> { 35 + ///The resolved media or cover-art URL. 36 + pub url: UriValue<S>, 37 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 38 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 39 + } 40 + 41 + /** Response marker for the `app.rocksky.library.getDownloadUrl` query. 42 + 43 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetDownloadUrlOutput<S>` for this endpoint.*/ 44 + pub struct GetDownloadUrlResponse; 45 + impl jacquard_common::xrpc::XrpcResp for GetDownloadUrlResponse { 46 + const NSID: &'static str = "app.rocksky.library.getDownloadUrl"; 47 + const ENCODING: &'static str = "application/json"; 48 + type Output<S: BosStr> = GetDownloadUrlOutput<S>; 49 + type Err = jacquard_common::xrpc::GenericError; 50 + } 51 + 52 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetDownloadUrl<S> { 53 + const NSID: &'static str = "app.rocksky.library.getDownloadUrl"; 54 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 55 + type Response = GetDownloadUrlResponse; 56 + } 57 + 58 + /** Endpoint marker for the `app.rocksky.library.getDownloadUrl` query. 59 + 60 + Path: `/xrpc/app.rocksky.library.getDownloadUrl`. The request payload type is `GetDownloadUrl<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 61 + pub struct GetDownloadUrlRequest; 62 + impl jacquard_common::xrpc::XrpcEndpoint for GetDownloadUrlRequest { 63 + const PATH: &'static str = "/xrpc/app.rocksky.library.getDownloadUrl"; 64 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 65 + type Request<S: BosStr> = GetDownloadUrl<S>; 66 + type Response = GetDownloadUrlResponse; 67 + } 68 + 69 + pub mod get_download_url_state { 70 + 71 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 72 + #[allow(unused)] 73 + use ::core::marker::PhantomData; 74 + mod sealed { 75 + pub trait Sealed {} 76 + } 77 + /// State trait tracking which required fields have been set 78 + pub trait State: sealed::Sealed { 79 + type Id; 80 + } 81 + /// Empty state - all required fields are unset 82 + pub struct Empty(()); 83 + impl sealed::Sealed for Empty {} 84 + impl State for Empty { 85 + type Id = Unset; 86 + } 87 + ///State transition - sets the `id` field to Set 88 + pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>); 89 + impl<St: State> sealed::Sealed for SetId<St> {} 90 + impl<St: State> State for SetId<St> { 91 + type Id = Set<members::id>; 92 + } 93 + /// Marker types for field names 94 + #[allow(non_camel_case_types)] 95 + pub mod members { 96 + ///Marker type for the `id` field 97 + pub struct id(()); 98 + } 99 + } 100 + 101 + /// Builder for constructing an instance of this type. 102 + pub struct GetDownloadUrlBuilder<St: get_download_url_state::State, S: BosStr = DefaultStr> { 103 + _state: PhantomData<fn() -> St>, 104 + _fields: (Option<S>,), 105 + _type: PhantomData<fn() -> S>, 106 + } 107 + 108 + impl GetDownloadUrl<DefaultStr> { 109 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 110 + pub fn new() -> GetDownloadUrlBuilder<get_download_url_state::Empty, DefaultStr> { 111 + GetDownloadUrlBuilder::new() 112 + } 113 + } 114 + 115 + impl<S: BosStr> GetDownloadUrl<S> { 116 + /// Create a new builder for this type 117 + pub fn builder() -> GetDownloadUrlBuilder<get_download_url_state::Empty, S> { 118 + GetDownloadUrlBuilder::builder() 119 + } 120 + } 121 + 122 + impl GetDownloadUrlBuilder<get_download_url_state::Empty, DefaultStr> { 123 + /// Create a new builder with all fields unset, using the default string type, if needed 124 + pub fn new() -> Self { 125 + GetDownloadUrlBuilder { 126 + _state: PhantomData, 127 + _fields: (None,), 128 + _type: PhantomData, 129 + } 130 + } 131 + } 132 + 133 + impl<S: BosStr> GetDownloadUrlBuilder<get_download_url_state::Empty, S> { 134 + /// Create a new builder with all fields unset 135 + pub fn builder() -> Self { 136 + GetDownloadUrlBuilder { 137 + _state: PhantomData, 138 + _fields: (None,), 139 + _type: PhantomData, 140 + } 141 + } 142 + } 143 + 144 + impl<St, S: BosStr> GetDownloadUrlBuilder<St, S> 145 + where 146 + St: get_download_url_state::State, 147 + St::Id: get_download_url_state::IsUnset, 148 + { 149 + /// Set the `id` field (required) 150 + pub fn id( 151 + mut self, 152 + value: impl Into<S>, 153 + ) -> GetDownloadUrlBuilder<get_download_url_state::SetId<St>, S> { 154 + self._fields.0 = Option::Some(value.into()); 155 + GetDownloadUrlBuilder { 156 + _state: PhantomData, 157 + _fields: self._fields, 158 + _type: PhantomData, 159 + } 160 + } 161 + } 162 + 163 + impl<St, S: BosStr> GetDownloadUrlBuilder<St, S> 164 + where 165 + St: get_download_url_state::State, 166 + St::Id: get_download_url_state::IsSet, 167 + { 168 + /// Build the final struct. 169 + pub fn build(self) -> GetDownloadUrl<S> { 170 + GetDownloadUrl { 171 + id: self._fields.0.unwrap(), 172 + } 173 + } 174 + }
+59
crates/rocksky-sdk/src/app_rocksky/library/get_genres.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getGenres 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde(rename_all = "camelCase")] 21 + pub struct GetGenres; 22 + 23 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 24 + #[serde( 25 + rename_all = "camelCase", 26 + bound(deserialize = "S: Deserialize<'de> + BosStr") 27 + )] 28 + pub struct GetGenresOutput<S: BosStr = DefaultStr> { 29 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 30 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 31 + } 32 + 33 + /** Response marker for the `app.rocksky.library.getGenres` query. 34 + 35 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetGenresOutput<S>` for this endpoint.*/ 36 + pub struct GetGenresResponse; 37 + impl jacquard_common::xrpc::XrpcResp for GetGenresResponse { 38 + const NSID: &'static str = "app.rocksky.library.getGenres"; 39 + const ENCODING: &'static str = "application/json"; 40 + type Output<S: BosStr> = GetGenresOutput<S>; 41 + type Err = jacquard_common::xrpc::GenericError; 42 + } 43 + 44 + impl jacquard_common::xrpc::XrpcRequest for GetGenres { 45 + const NSID: &'static str = "app.rocksky.library.getGenres"; 46 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 47 + type Response = GetGenresResponse; 48 + } 49 + 50 + /** Endpoint marker for the `app.rocksky.library.getGenres` query. 51 + 52 + Path: `/xrpc/app.rocksky.library.getGenres`. The request payload type is `GetGenres`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 53 + pub struct GetGenresRequest; 54 + impl jacquard_common::xrpc::XrpcEndpoint for GetGenresRequest { 55 + const PATH: &'static str = "/xrpc/app.rocksky.library.getGenres"; 56 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 + type Request<S: BosStr> = GetGenres; 58 + type Response = GetGenresResponse; 59 + }
+59
crates/rocksky-sdk/src/app_rocksky/library/get_indexes.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getIndexes 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde(rename_all = "camelCase")] 21 + pub struct GetIndexes; 22 + 23 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 24 + #[serde( 25 + rename_all = "camelCase", 26 + bound(deserialize = "S: Deserialize<'de> + BosStr") 27 + )] 28 + pub struct GetIndexesOutput<S: BosStr = DefaultStr> { 29 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 30 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 31 + } 32 + 33 + /** Response marker for the `app.rocksky.library.getIndexes` query. 34 + 35 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetIndexesOutput<S>` for this endpoint.*/ 36 + pub struct GetIndexesResponse; 37 + impl jacquard_common::xrpc::XrpcResp for GetIndexesResponse { 38 + const NSID: &'static str = "app.rocksky.library.getIndexes"; 39 + const ENCODING: &'static str = "application/json"; 40 + type Output<S: BosStr> = GetIndexesOutput<S>; 41 + type Err = jacquard_common::xrpc::GenericError; 42 + } 43 + 44 + impl jacquard_common::xrpc::XrpcRequest for GetIndexes { 45 + const NSID: &'static str = "app.rocksky.library.getIndexes"; 46 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 47 + type Response = GetIndexesResponse; 48 + } 49 + 50 + /** Endpoint marker for the `app.rocksky.library.getIndexes` query. 51 + 52 + Path: `/xrpc/app.rocksky.library.getIndexes`. The request payload type is `GetIndexes`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 53 + pub struct GetIndexesRequest; 54 + impl jacquard_common::xrpc::XrpcEndpoint for GetIndexesRequest { 55 + const PATH: &'static str = "/xrpc/app.rocksky.library.getIndexes"; 56 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 + type Request<S: BosStr> = GetIndexes; 58 + type Response = GetIndexesResponse; 59 + }
+59
crates/rocksky-sdk/src/app_rocksky/library/get_internet_radio_stations.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getInternetRadioStations 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde(rename_all = "camelCase")] 21 + pub struct GetInternetRadioStations; 22 + 23 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 24 + #[serde( 25 + rename_all = "camelCase", 26 + bound(deserialize = "S: Deserialize<'de> + BosStr") 27 + )] 28 + pub struct GetInternetRadioStationsOutput<S: BosStr = DefaultStr> { 29 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 30 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 31 + } 32 + 33 + /** Response marker for the `app.rocksky.library.getInternetRadioStations` query. 34 + 35 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetInternetRadioStationsOutput<S>` for this endpoint.*/ 36 + pub struct GetInternetRadioStationsResponse; 37 + impl jacquard_common::xrpc::XrpcResp for GetInternetRadioStationsResponse { 38 + const NSID: &'static str = "app.rocksky.library.getInternetRadioStations"; 39 + const ENCODING: &'static str = "application/json"; 40 + type Output<S: BosStr> = GetInternetRadioStationsOutput<S>; 41 + type Err = jacquard_common::xrpc::GenericError; 42 + } 43 + 44 + impl jacquard_common::xrpc::XrpcRequest for GetInternetRadioStations { 45 + const NSID: &'static str = "app.rocksky.library.getInternetRadioStations"; 46 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 47 + type Response = GetInternetRadioStationsResponse; 48 + } 49 + 50 + /** Endpoint marker for the `app.rocksky.library.getInternetRadioStations` query. 51 + 52 + Path: `/xrpc/app.rocksky.library.getInternetRadioStations`. The request payload type is `GetInternetRadioStations`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 53 + pub struct GetInternetRadioStationsRequest; 54 + impl jacquard_common::xrpc::XrpcEndpoint for GetInternetRadioStationsRequest { 55 + const PATH: &'static str = "/xrpc/app.rocksky.library.getInternetRadioStations"; 56 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 + type Request<S: BosStr> = GetInternetRadioStations; 58 + type Response = GetInternetRadioStationsResponse; 59 + }
+59
crates/rocksky-sdk/src/app_rocksky/library/get_license.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getLicense 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde(rename_all = "camelCase")] 21 + pub struct GetLicense; 22 + 23 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 24 + #[serde( 25 + rename_all = "camelCase", 26 + bound(deserialize = "S: Deserialize<'de> + BosStr") 27 + )] 28 + pub struct GetLicenseOutput<S: BosStr = DefaultStr> { 29 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 30 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 31 + } 32 + 33 + /** Response marker for the `app.rocksky.library.getLicense` query. 34 + 35 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetLicenseOutput<S>` for this endpoint.*/ 36 + pub struct GetLicenseResponse; 37 + impl jacquard_common::xrpc::XrpcResp for GetLicenseResponse { 38 + const NSID: &'static str = "app.rocksky.library.getLicense"; 39 + const ENCODING: &'static str = "application/json"; 40 + type Output<S: BosStr> = GetLicenseOutput<S>; 41 + type Err = jacquard_common::xrpc::GenericError; 42 + } 43 + 44 + impl jacquard_common::xrpc::XrpcRequest for GetLicense { 45 + const NSID: &'static str = "app.rocksky.library.getLicense"; 46 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 47 + type Response = GetLicenseResponse; 48 + } 49 + 50 + /** Endpoint marker for the `app.rocksky.library.getLicense` query. 51 + 52 + Path: `/xrpc/app.rocksky.library.getLicense`. The request payload type is `GetLicense`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 53 + pub struct GetLicenseRequest; 54 + impl jacquard_common::xrpc::XrpcEndpoint for GetLicenseRequest { 55 + const PATH: &'static str = "/xrpc/app.rocksky.library.getLicense"; 56 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 + type Request<S: BosStr> = GetLicense; 58 + type Response = GetLicenseResponse; 59 + }
+168
crates/rocksky-sdk/src/app_rocksky/library/get_lyrics.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getLyrics 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct GetLyrics<S: BosStr = DefaultStr> { 25 + #[serde(skip_serializing_if = "Option::is_none")] 26 + pub artist: Option<S>, 27 + #[serde(skip_serializing_if = "Option::is_none")] 28 + pub title: Option<S>, 29 + } 30 + 31 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 32 + #[serde( 33 + rename_all = "camelCase", 34 + bound(deserialize = "S: Deserialize<'de> + BosStr") 35 + )] 36 + pub struct GetLyricsOutput<S: BosStr = DefaultStr> { 37 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 38 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 39 + } 40 + 41 + /** Response marker for the `app.rocksky.library.getLyrics` query. 42 + 43 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetLyricsOutput<S>` for this endpoint.*/ 44 + pub struct GetLyricsResponse; 45 + impl jacquard_common::xrpc::XrpcResp for GetLyricsResponse { 46 + const NSID: &'static str = "app.rocksky.library.getLyrics"; 47 + const ENCODING: &'static str = "application/json"; 48 + type Output<S: BosStr> = GetLyricsOutput<S>; 49 + type Err = jacquard_common::xrpc::GenericError; 50 + } 51 + 52 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetLyrics<S> { 53 + const NSID: &'static str = "app.rocksky.library.getLyrics"; 54 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 55 + type Response = GetLyricsResponse; 56 + } 57 + 58 + /** Endpoint marker for the `app.rocksky.library.getLyrics` query. 59 + 60 + Path: `/xrpc/app.rocksky.library.getLyrics`. The request payload type is `GetLyrics<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 61 + pub struct GetLyricsRequest; 62 + impl jacquard_common::xrpc::XrpcEndpoint for GetLyricsRequest { 63 + const PATH: &'static str = "/xrpc/app.rocksky.library.getLyrics"; 64 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 65 + type Request<S: BosStr> = GetLyrics<S>; 66 + type Response = GetLyricsResponse; 67 + } 68 + 69 + pub mod get_lyrics_state { 70 + 71 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 72 + #[allow(unused)] 73 + use ::core::marker::PhantomData; 74 + mod sealed { 75 + pub trait Sealed {} 76 + } 77 + /// State trait tracking which required fields have been set 78 + pub trait State: sealed::Sealed {} 79 + /// Empty state - all required fields are unset 80 + pub struct Empty(()); 81 + impl sealed::Sealed for Empty {} 82 + impl State for Empty {} 83 + /// Marker types for field names 84 + #[allow(non_camel_case_types)] 85 + pub mod members {} 86 + } 87 + 88 + /// Builder for constructing an instance of this type. 89 + pub struct GetLyricsBuilder<St: get_lyrics_state::State, S: BosStr = DefaultStr> { 90 + _state: PhantomData<fn() -> St>, 91 + _fields: (Option<S>, Option<S>), 92 + _type: PhantomData<fn() -> S>, 93 + } 94 + 95 + impl GetLyrics<DefaultStr> { 96 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 97 + pub fn new() -> GetLyricsBuilder<get_lyrics_state::Empty, DefaultStr> { 98 + GetLyricsBuilder::new() 99 + } 100 + } 101 + 102 + impl<S: BosStr> GetLyrics<S> { 103 + /// Create a new builder for this type 104 + pub fn builder() -> GetLyricsBuilder<get_lyrics_state::Empty, S> { 105 + GetLyricsBuilder::builder() 106 + } 107 + } 108 + 109 + impl GetLyricsBuilder<get_lyrics_state::Empty, DefaultStr> { 110 + /// Create a new builder with all fields unset, using the default string type, if needed 111 + pub fn new() -> Self { 112 + GetLyricsBuilder { 113 + _state: PhantomData, 114 + _fields: (None, None), 115 + _type: PhantomData, 116 + } 117 + } 118 + } 119 + 120 + impl<S: BosStr> GetLyricsBuilder<get_lyrics_state::Empty, S> { 121 + /// Create a new builder with all fields unset 122 + pub fn builder() -> Self { 123 + GetLyricsBuilder { 124 + _state: PhantomData, 125 + _fields: (None, None), 126 + _type: PhantomData, 127 + } 128 + } 129 + } 130 + 131 + impl<St: get_lyrics_state::State, S: BosStr> GetLyricsBuilder<St, S> { 132 + /// Set the `artist` field (optional) 133 + pub fn artist(mut self, value: impl Into<Option<S>>) -> Self { 134 + self._fields.0 = value.into(); 135 + self 136 + } 137 + /// Set the `artist` field to an Option value (optional) 138 + pub fn maybe_artist(mut self, value: Option<S>) -> Self { 139 + self._fields.0 = value; 140 + self 141 + } 142 + } 143 + 144 + impl<St: get_lyrics_state::State, S: BosStr> GetLyricsBuilder<St, S> { 145 + /// Set the `title` field (optional) 146 + pub fn title(mut self, value: impl Into<Option<S>>) -> Self { 147 + self._fields.1 = value.into(); 148 + self 149 + } 150 + /// Set the `title` field to an Option value (optional) 151 + pub fn maybe_title(mut self, value: Option<S>) -> Self { 152 + self._fields.1 = value; 153 + self 154 + } 155 + } 156 + 157 + impl<St, S: BosStr> GetLyricsBuilder<St, S> 158 + where 159 + St: get_lyrics_state::State, 160 + { 161 + /// Build the final struct. 162 + pub fn build(self) -> GetLyrics<S> { 163 + GetLyrics { 164 + artist: self._fields.0, 165 + title: self._fields.1, 166 + } 167 + } 168 + }
+171
crates/rocksky-sdk/src/app_rocksky/library/get_music_directory.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getMusicDirectory 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct GetMusicDirectory<S: BosStr = DefaultStr> { 25 + pub id: S, 26 + } 27 + 28 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 29 + #[serde( 30 + rename_all = "camelCase", 31 + bound(deserialize = "S: Deserialize<'de> + BosStr") 32 + )] 33 + pub struct GetMusicDirectoryOutput<S: BosStr = DefaultStr> { 34 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 35 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 36 + } 37 + 38 + /** Response marker for the `app.rocksky.library.getMusicDirectory` query. 39 + 40 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetMusicDirectoryOutput<S>` for this endpoint.*/ 41 + pub struct GetMusicDirectoryResponse; 42 + impl jacquard_common::xrpc::XrpcResp for GetMusicDirectoryResponse { 43 + const NSID: &'static str = "app.rocksky.library.getMusicDirectory"; 44 + const ENCODING: &'static str = "application/json"; 45 + type Output<S: BosStr> = GetMusicDirectoryOutput<S>; 46 + type Err = jacquard_common::xrpc::GenericError; 47 + } 48 + 49 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetMusicDirectory<S> { 50 + const NSID: &'static str = "app.rocksky.library.getMusicDirectory"; 51 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 52 + type Response = GetMusicDirectoryResponse; 53 + } 54 + 55 + /** Endpoint marker for the `app.rocksky.library.getMusicDirectory` query. 56 + 57 + Path: `/xrpc/app.rocksky.library.getMusicDirectory`. The request payload type is `GetMusicDirectory<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 58 + pub struct GetMusicDirectoryRequest; 59 + impl jacquard_common::xrpc::XrpcEndpoint for GetMusicDirectoryRequest { 60 + const PATH: &'static str = "/xrpc/app.rocksky.library.getMusicDirectory"; 61 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 62 + type Request<S: BosStr> = GetMusicDirectory<S>; 63 + type Response = GetMusicDirectoryResponse; 64 + } 65 + 66 + pub mod get_music_directory_state { 67 + 68 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 69 + #[allow(unused)] 70 + use ::core::marker::PhantomData; 71 + mod sealed { 72 + pub trait Sealed {} 73 + } 74 + /// State trait tracking which required fields have been set 75 + pub trait State: sealed::Sealed { 76 + type Id; 77 + } 78 + /// Empty state - all required fields are unset 79 + pub struct Empty(()); 80 + impl sealed::Sealed for Empty {} 81 + impl State for Empty { 82 + type Id = Unset; 83 + } 84 + ///State transition - sets the `id` field to Set 85 + pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>); 86 + impl<St: State> sealed::Sealed for SetId<St> {} 87 + impl<St: State> State for SetId<St> { 88 + type Id = Set<members::id>; 89 + } 90 + /// Marker types for field names 91 + #[allow(non_camel_case_types)] 92 + pub mod members { 93 + ///Marker type for the `id` field 94 + pub struct id(()); 95 + } 96 + } 97 + 98 + /// Builder for constructing an instance of this type. 99 + pub struct GetMusicDirectoryBuilder<St: get_music_directory_state::State, S: BosStr = DefaultStr> { 100 + _state: PhantomData<fn() -> St>, 101 + _fields: (Option<S>,), 102 + _type: PhantomData<fn() -> S>, 103 + } 104 + 105 + impl GetMusicDirectory<DefaultStr> { 106 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 107 + pub fn new() -> GetMusicDirectoryBuilder<get_music_directory_state::Empty, DefaultStr> { 108 + GetMusicDirectoryBuilder::new() 109 + } 110 + } 111 + 112 + impl<S: BosStr> GetMusicDirectory<S> { 113 + /// Create a new builder for this type 114 + pub fn builder() -> GetMusicDirectoryBuilder<get_music_directory_state::Empty, S> { 115 + GetMusicDirectoryBuilder::builder() 116 + } 117 + } 118 + 119 + impl GetMusicDirectoryBuilder<get_music_directory_state::Empty, DefaultStr> { 120 + /// Create a new builder with all fields unset, using the default string type, if needed 121 + pub fn new() -> Self { 122 + GetMusicDirectoryBuilder { 123 + _state: PhantomData, 124 + _fields: (None,), 125 + _type: PhantomData, 126 + } 127 + } 128 + } 129 + 130 + impl<S: BosStr> GetMusicDirectoryBuilder<get_music_directory_state::Empty, S> { 131 + /// Create a new builder with all fields unset 132 + pub fn builder() -> Self { 133 + GetMusicDirectoryBuilder { 134 + _state: PhantomData, 135 + _fields: (None,), 136 + _type: PhantomData, 137 + } 138 + } 139 + } 140 + 141 + impl<St, S: BosStr> GetMusicDirectoryBuilder<St, S> 142 + where 143 + St: get_music_directory_state::State, 144 + St::Id: get_music_directory_state::IsUnset, 145 + { 146 + /// Set the `id` field (required) 147 + pub fn id( 148 + mut self, 149 + value: impl Into<S>, 150 + ) -> GetMusicDirectoryBuilder<get_music_directory_state::SetId<St>, S> { 151 + self._fields.0 = Option::Some(value.into()); 152 + GetMusicDirectoryBuilder { 153 + _state: PhantomData, 154 + _fields: self._fields, 155 + _type: PhantomData, 156 + } 157 + } 158 + } 159 + 160 + impl<St, S: BosStr> GetMusicDirectoryBuilder<St, S> 161 + where 162 + St: get_music_directory_state::State, 163 + St::Id: get_music_directory_state::IsSet, 164 + { 165 + /// Build the final struct. 166 + pub fn build(self) -> GetMusicDirectory<S> { 167 + GetMusicDirectory { 168 + id: self._fields.0.unwrap(), 169 + } 170 + } 171 + }
+59
crates/rocksky-sdk/src/app_rocksky/library/get_music_folders.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getMusicFolders 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde(rename_all = "camelCase")] 21 + pub struct GetMusicFolders; 22 + 23 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 24 + #[serde( 25 + rename_all = "camelCase", 26 + bound(deserialize = "S: Deserialize<'de> + BosStr") 27 + )] 28 + pub struct GetMusicFoldersOutput<S: BosStr = DefaultStr> { 29 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 30 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 31 + } 32 + 33 + /** Response marker for the `app.rocksky.library.getMusicFolders` query. 34 + 35 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetMusicFoldersOutput<S>` for this endpoint.*/ 36 + pub struct GetMusicFoldersResponse; 37 + impl jacquard_common::xrpc::XrpcResp for GetMusicFoldersResponse { 38 + const NSID: &'static str = "app.rocksky.library.getMusicFolders"; 39 + const ENCODING: &'static str = "application/json"; 40 + type Output<S: BosStr> = GetMusicFoldersOutput<S>; 41 + type Err = jacquard_common::xrpc::GenericError; 42 + } 43 + 44 + impl jacquard_common::xrpc::XrpcRequest for GetMusicFolders { 45 + const NSID: &'static str = "app.rocksky.library.getMusicFolders"; 46 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 47 + type Response = GetMusicFoldersResponse; 48 + } 49 + 50 + /** Endpoint marker for the `app.rocksky.library.getMusicFolders` query. 51 + 52 + Path: `/xrpc/app.rocksky.library.getMusicFolders`. The request payload type is `GetMusicFolders`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 53 + pub struct GetMusicFoldersRequest; 54 + impl jacquard_common::xrpc::XrpcEndpoint for GetMusicFoldersRequest { 55 + const PATH: &'static str = "/xrpc/app.rocksky.library.getMusicFolders"; 56 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 + type Request<S: BosStr> = GetMusicFolders; 58 + type Response = GetMusicFoldersResponse; 59 + }
+59
crates/rocksky-sdk/src/app_rocksky/library/get_now_playing.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getNowPlaying 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde(rename_all = "camelCase")] 21 + pub struct GetNowPlaying; 22 + 23 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 24 + #[serde( 25 + rename_all = "camelCase", 26 + bound(deserialize = "S: Deserialize<'de> + BosStr") 27 + )] 28 + pub struct GetNowPlayingOutput<S: BosStr = DefaultStr> { 29 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 30 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 31 + } 32 + 33 + /** Response marker for the `app.rocksky.library.getNowPlaying` query. 34 + 35 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetNowPlayingOutput<S>` for this endpoint.*/ 36 + pub struct GetNowPlayingResponse; 37 + impl jacquard_common::xrpc::XrpcResp for GetNowPlayingResponse { 38 + const NSID: &'static str = "app.rocksky.library.getNowPlaying"; 39 + const ENCODING: &'static str = "application/json"; 40 + type Output<S: BosStr> = GetNowPlayingOutput<S>; 41 + type Err = jacquard_common::xrpc::GenericError; 42 + } 43 + 44 + impl jacquard_common::xrpc::XrpcRequest for GetNowPlaying { 45 + const NSID: &'static str = "app.rocksky.library.getNowPlaying"; 46 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 47 + type Response = GetNowPlayingResponse; 48 + } 49 + 50 + /** Endpoint marker for the `app.rocksky.library.getNowPlaying` query. 51 + 52 + Path: `/xrpc/app.rocksky.library.getNowPlaying`. The request payload type is `GetNowPlaying`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 53 + pub struct GetNowPlayingRequest; 54 + impl jacquard_common::xrpc::XrpcEndpoint for GetNowPlayingRequest { 55 + const PATH: &'static str = "/xrpc/app.rocksky.library.getNowPlaying"; 56 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 + type Request<S: BosStr> = GetNowPlaying; 58 + type Response = GetNowPlayingResponse; 59 + }
+59
crates/rocksky-sdk/src/app_rocksky/library/get_play_queue.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getPlayQueue 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde(rename_all = "camelCase")] 21 + pub struct GetPlayQueue; 22 + 23 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 24 + #[serde( 25 + rename_all = "camelCase", 26 + bound(deserialize = "S: Deserialize<'de> + BosStr") 27 + )] 28 + pub struct GetPlayQueueOutput<S: BosStr = DefaultStr> { 29 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 30 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 31 + } 32 + 33 + /** Response marker for the `app.rocksky.library.getPlayQueue` query. 34 + 35 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetPlayQueueOutput<S>` for this endpoint.*/ 36 + pub struct GetPlayQueueResponse; 37 + impl jacquard_common::xrpc::XrpcResp for GetPlayQueueResponse { 38 + const NSID: &'static str = "app.rocksky.library.getPlayQueue"; 39 + const ENCODING: &'static str = "application/json"; 40 + type Output<S: BosStr> = GetPlayQueueOutput<S>; 41 + type Err = jacquard_common::xrpc::GenericError; 42 + } 43 + 44 + impl jacquard_common::xrpc::XrpcRequest for GetPlayQueue { 45 + const NSID: &'static str = "app.rocksky.library.getPlayQueue"; 46 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 47 + type Response = GetPlayQueueResponse; 48 + } 49 + 50 + /** Endpoint marker for the `app.rocksky.library.getPlayQueue` query. 51 + 52 + Path: `/xrpc/app.rocksky.library.getPlayQueue`. The request payload type is `GetPlayQueue`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 53 + pub struct GetPlayQueueRequest; 54 + impl jacquard_common::xrpc::XrpcEndpoint for GetPlayQueueRequest { 55 + const PATH: &'static str = "/xrpc/app.rocksky.library.getPlayQueue"; 56 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 + type Request<S: BosStr> = GetPlayQueue; 58 + type Response = GetPlayQueueResponse; 59 + }
+171
crates/rocksky-sdk/src/app_rocksky/library/get_playlist.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getPlaylist 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct GetPlaylist<S: BosStr = DefaultStr> { 25 + pub id: S, 26 + } 27 + 28 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 29 + #[serde( 30 + rename_all = "camelCase", 31 + bound(deserialize = "S: Deserialize<'de> + BosStr") 32 + )] 33 + pub struct GetPlaylistOutput<S: BosStr = DefaultStr> { 34 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 35 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 36 + } 37 + 38 + /** Response marker for the `app.rocksky.library.getPlaylist` query. 39 + 40 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetPlaylistOutput<S>` for this endpoint.*/ 41 + pub struct GetPlaylistResponse; 42 + impl jacquard_common::xrpc::XrpcResp for GetPlaylistResponse { 43 + const NSID: &'static str = "app.rocksky.library.getPlaylist"; 44 + const ENCODING: &'static str = "application/json"; 45 + type Output<S: BosStr> = GetPlaylistOutput<S>; 46 + type Err = jacquard_common::xrpc::GenericError; 47 + } 48 + 49 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetPlaylist<S> { 50 + const NSID: &'static str = "app.rocksky.library.getPlaylist"; 51 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 52 + type Response = GetPlaylistResponse; 53 + } 54 + 55 + /** Endpoint marker for the `app.rocksky.library.getPlaylist` query. 56 + 57 + Path: `/xrpc/app.rocksky.library.getPlaylist`. The request payload type is `GetPlaylist<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 58 + pub struct GetPlaylistRequest; 59 + impl jacquard_common::xrpc::XrpcEndpoint for GetPlaylistRequest { 60 + const PATH: &'static str = "/xrpc/app.rocksky.library.getPlaylist"; 61 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 62 + type Request<S: BosStr> = GetPlaylist<S>; 63 + type Response = GetPlaylistResponse; 64 + } 65 + 66 + pub mod get_playlist_state { 67 + 68 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 69 + #[allow(unused)] 70 + use ::core::marker::PhantomData; 71 + mod sealed { 72 + pub trait Sealed {} 73 + } 74 + /// State trait tracking which required fields have been set 75 + pub trait State: sealed::Sealed { 76 + type Id; 77 + } 78 + /// Empty state - all required fields are unset 79 + pub struct Empty(()); 80 + impl sealed::Sealed for Empty {} 81 + impl State for Empty { 82 + type Id = Unset; 83 + } 84 + ///State transition - sets the `id` field to Set 85 + pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>); 86 + impl<St: State> sealed::Sealed for SetId<St> {} 87 + impl<St: State> State for SetId<St> { 88 + type Id = Set<members::id>; 89 + } 90 + /// Marker types for field names 91 + #[allow(non_camel_case_types)] 92 + pub mod members { 93 + ///Marker type for the `id` field 94 + pub struct id(()); 95 + } 96 + } 97 + 98 + /// Builder for constructing an instance of this type. 99 + pub struct GetPlaylistBuilder<St: get_playlist_state::State, S: BosStr = DefaultStr> { 100 + _state: PhantomData<fn() -> St>, 101 + _fields: (Option<S>,), 102 + _type: PhantomData<fn() -> S>, 103 + } 104 + 105 + impl GetPlaylist<DefaultStr> { 106 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 107 + pub fn new() -> GetPlaylistBuilder<get_playlist_state::Empty, DefaultStr> { 108 + GetPlaylistBuilder::new() 109 + } 110 + } 111 + 112 + impl<S: BosStr> GetPlaylist<S> { 113 + /// Create a new builder for this type 114 + pub fn builder() -> GetPlaylistBuilder<get_playlist_state::Empty, S> { 115 + GetPlaylistBuilder::builder() 116 + } 117 + } 118 + 119 + impl GetPlaylistBuilder<get_playlist_state::Empty, DefaultStr> { 120 + /// Create a new builder with all fields unset, using the default string type, if needed 121 + pub fn new() -> Self { 122 + GetPlaylistBuilder { 123 + _state: PhantomData, 124 + _fields: (None,), 125 + _type: PhantomData, 126 + } 127 + } 128 + } 129 + 130 + impl<S: BosStr> GetPlaylistBuilder<get_playlist_state::Empty, S> { 131 + /// Create a new builder with all fields unset 132 + pub fn builder() -> Self { 133 + GetPlaylistBuilder { 134 + _state: PhantomData, 135 + _fields: (None,), 136 + _type: PhantomData, 137 + } 138 + } 139 + } 140 + 141 + impl<St, S: BosStr> GetPlaylistBuilder<St, S> 142 + where 143 + St: get_playlist_state::State, 144 + St::Id: get_playlist_state::IsUnset, 145 + { 146 + /// Set the `id` field (required) 147 + pub fn id( 148 + mut self, 149 + value: impl Into<S>, 150 + ) -> GetPlaylistBuilder<get_playlist_state::SetId<St>, S> { 151 + self._fields.0 = Option::Some(value.into()); 152 + GetPlaylistBuilder { 153 + _state: PhantomData, 154 + _fields: self._fields, 155 + _type: PhantomData, 156 + } 157 + } 158 + } 159 + 160 + impl<St, S: BosStr> GetPlaylistBuilder<St, S> 161 + where 162 + St: get_playlist_state::State, 163 + St::Id: get_playlist_state::IsSet, 164 + { 165 + /// Build the final struct. 166 + pub fn build(self) -> GetPlaylist<S> { 167 + GetPlaylist { 168 + id: self._fields.0.unwrap(), 169 + } 170 + } 171 + }
+59
crates/rocksky-sdk/src/app_rocksky/library/get_playlists.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getPlaylists 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde(rename_all = "camelCase")] 21 + pub struct GetPlaylists; 22 + 23 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 24 + #[serde( 25 + rename_all = "camelCase", 26 + bound(deserialize = "S: Deserialize<'de> + BosStr") 27 + )] 28 + pub struct GetPlaylistsOutput<S: BosStr = DefaultStr> { 29 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 30 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 31 + } 32 + 33 + /** Response marker for the `app.rocksky.library.getPlaylists` query. 34 + 35 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetPlaylistsOutput<S>` for this endpoint.*/ 36 + pub struct GetPlaylistsResponse; 37 + impl jacquard_common::xrpc::XrpcResp for GetPlaylistsResponse { 38 + const NSID: &'static str = "app.rocksky.library.getPlaylists"; 39 + const ENCODING: &'static str = "application/json"; 40 + type Output<S: BosStr> = GetPlaylistsOutput<S>; 41 + type Err = jacquard_common::xrpc::GenericError; 42 + } 43 + 44 + impl jacquard_common::xrpc::XrpcRequest for GetPlaylists { 45 + const NSID: &'static str = "app.rocksky.library.getPlaylists"; 46 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 47 + type Response = GetPlaylistsResponse; 48 + } 49 + 50 + /** Endpoint marker for the `app.rocksky.library.getPlaylists` query. 51 + 52 + Path: `/xrpc/app.rocksky.library.getPlaylists`. The request payload type is `GetPlaylists`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 53 + pub struct GetPlaylistsRequest; 54 + impl jacquard_common::xrpc::XrpcEndpoint for GetPlaylistsRequest { 55 + const PATH: &'static str = "/xrpc/app.rocksky.library.getPlaylists"; 56 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 + type Request<S: BosStr> = GetPlaylists; 58 + type Response = GetPlaylistsResponse; 59 + }
+200
crates/rocksky-sdk/src/app_rocksky/library/get_random_songs.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getRandomSongs 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct GetRandomSongs<S: BosStr = DefaultStr> { 25 + #[serde(skip_serializing_if = "Option::is_none")] 26 + pub from_year: Option<i64>, 27 + #[serde(skip_serializing_if = "Option::is_none")] 28 + pub genre: Option<S>, 29 + #[serde(skip_serializing_if = "Option::is_none")] 30 + pub size: Option<i64>, 31 + #[serde(skip_serializing_if = "Option::is_none")] 32 + pub to_year: Option<i64>, 33 + } 34 + 35 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 36 + #[serde( 37 + rename_all = "camelCase", 38 + bound(deserialize = "S: Deserialize<'de> + BosStr") 39 + )] 40 + pub struct GetRandomSongsOutput<S: BosStr = DefaultStr> { 41 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 42 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 43 + } 44 + 45 + /** Response marker for the `app.rocksky.library.getRandomSongs` query. 46 + 47 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetRandomSongsOutput<S>` for this endpoint.*/ 48 + pub struct GetRandomSongsResponse; 49 + impl jacquard_common::xrpc::XrpcResp for GetRandomSongsResponse { 50 + const NSID: &'static str = "app.rocksky.library.getRandomSongs"; 51 + const ENCODING: &'static str = "application/json"; 52 + type Output<S: BosStr> = GetRandomSongsOutput<S>; 53 + type Err = jacquard_common::xrpc::GenericError; 54 + } 55 + 56 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetRandomSongs<S> { 57 + const NSID: &'static str = "app.rocksky.library.getRandomSongs"; 58 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 59 + type Response = GetRandomSongsResponse; 60 + } 61 + 62 + /** Endpoint marker for the `app.rocksky.library.getRandomSongs` query. 63 + 64 + Path: `/xrpc/app.rocksky.library.getRandomSongs`. The request payload type is `GetRandomSongs<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 65 + pub struct GetRandomSongsRequest; 66 + impl jacquard_common::xrpc::XrpcEndpoint for GetRandomSongsRequest { 67 + const PATH: &'static str = "/xrpc/app.rocksky.library.getRandomSongs"; 68 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 69 + type Request<S: BosStr> = GetRandomSongs<S>; 70 + type Response = GetRandomSongsResponse; 71 + } 72 + 73 + pub mod get_random_songs_state { 74 + 75 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 76 + #[allow(unused)] 77 + use ::core::marker::PhantomData; 78 + mod sealed { 79 + pub trait Sealed {} 80 + } 81 + /// State trait tracking which required fields have been set 82 + pub trait State: sealed::Sealed {} 83 + /// Empty state - all required fields are unset 84 + pub struct Empty(()); 85 + impl sealed::Sealed for Empty {} 86 + impl State for Empty {} 87 + /// Marker types for field names 88 + #[allow(non_camel_case_types)] 89 + pub mod members {} 90 + } 91 + 92 + /// Builder for constructing an instance of this type. 93 + pub struct GetRandomSongsBuilder<St: get_random_songs_state::State, S: BosStr = DefaultStr> { 94 + _state: PhantomData<fn() -> St>, 95 + _fields: (Option<i64>, Option<S>, Option<i64>, Option<i64>), 96 + _type: PhantomData<fn() -> S>, 97 + } 98 + 99 + impl GetRandomSongs<DefaultStr> { 100 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 101 + pub fn new() -> GetRandomSongsBuilder<get_random_songs_state::Empty, DefaultStr> { 102 + GetRandomSongsBuilder::new() 103 + } 104 + } 105 + 106 + impl<S: BosStr> GetRandomSongs<S> { 107 + /// Create a new builder for this type 108 + pub fn builder() -> GetRandomSongsBuilder<get_random_songs_state::Empty, S> { 109 + GetRandomSongsBuilder::builder() 110 + } 111 + } 112 + 113 + impl GetRandomSongsBuilder<get_random_songs_state::Empty, DefaultStr> { 114 + /// Create a new builder with all fields unset, using the default string type, if needed 115 + pub fn new() -> Self { 116 + GetRandomSongsBuilder { 117 + _state: PhantomData, 118 + _fields: (None, None, None, None), 119 + _type: PhantomData, 120 + } 121 + } 122 + } 123 + 124 + impl<S: BosStr> GetRandomSongsBuilder<get_random_songs_state::Empty, S> { 125 + /// Create a new builder with all fields unset 126 + pub fn builder() -> Self { 127 + GetRandomSongsBuilder { 128 + _state: PhantomData, 129 + _fields: (None, None, None, None), 130 + _type: PhantomData, 131 + } 132 + } 133 + } 134 + 135 + impl<St: get_random_songs_state::State, S: BosStr> GetRandomSongsBuilder<St, S> { 136 + /// Set the `fromYear` field (optional) 137 + pub fn from_year(mut self, value: impl Into<Option<i64>>) -> Self { 138 + self._fields.0 = value.into(); 139 + self 140 + } 141 + /// Set the `fromYear` field to an Option value (optional) 142 + pub fn maybe_from_year(mut self, value: Option<i64>) -> Self { 143 + self._fields.0 = value; 144 + self 145 + } 146 + } 147 + 148 + impl<St: get_random_songs_state::State, S: BosStr> GetRandomSongsBuilder<St, S> { 149 + /// Set the `genre` field (optional) 150 + pub fn genre(mut self, value: impl Into<Option<S>>) -> Self { 151 + self._fields.1 = value.into(); 152 + self 153 + } 154 + /// Set the `genre` field to an Option value (optional) 155 + pub fn maybe_genre(mut self, value: Option<S>) -> Self { 156 + self._fields.1 = value; 157 + self 158 + } 159 + } 160 + 161 + impl<St: get_random_songs_state::State, S: BosStr> GetRandomSongsBuilder<St, S> { 162 + /// Set the `size` field (optional) 163 + pub fn size(mut self, value: impl Into<Option<i64>>) -> Self { 164 + self._fields.2 = value.into(); 165 + self 166 + } 167 + /// Set the `size` field to an Option value (optional) 168 + pub fn maybe_size(mut self, value: Option<i64>) -> Self { 169 + self._fields.2 = value; 170 + self 171 + } 172 + } 173 + 174 + impl<St: get_random_songs_state::State, S: BosStr> GetRandomSongsBuilder<St, S> { 175 + /// Set the `toYear` field (optional) 176 + pub fn to_year(mut self, value: impl Into<Option<i64>>) -> Self { 177 + self._fields.3 = value.into(); 178 + self 179 + } 180 + /// Set the `toYear` field to an Option value (optional) 181 + pub fn maybe_to_year(mut self, value: Option<i64>) -> Self { 182 + self._fields.3 = value; 183 + self 184 + } 185 + } 186 + 187 + impl<St, S: BosStr> GetRandomSongsBuilder<St, S> 188 + where 189 + St: get_random_songs_state::State, 190 + { 191 + /// Build the final struct. 192 + pub fn build(self) -> GetRandomSongs<S> { 193 + GetRandomSongs { 194 + from_year: self._fields.0, 195 + genre: self._fields.1, 196 + size: self._fields.2, 197 + to_year: self._fields.3, 198 + } 199 + } 200 + }
+59
crates/rocksky-sdk/src/app_rocksky/library/get_scan_status.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getScanStatus 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde(rename_all = "camelCase")] 21 + pub struct GetScanStatus; 22 + 23 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 24 + #[serde( 25 + rename_all = "camelCase", 26 + bound(deserialize = "S: Deserialize<'de> + BosStr") 27 + )] 28 + pub struct GetScanStatusOutput<S: BosStr = DefaultStr> { 29 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 30 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 31 + } 32 + 33 + /** Response marker for the `app.rocksky.library.getScanStatus` query. 34 + 35 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetScanStatusOutput<S>` for this endpoint.*/ 36 + pub struct GetScanStatusResponse; 37 + impl jacquard_common::xrpc::XrpcResp for GetScanStatusResponse { 38 + const NSID: &'static str = "app.rocksky.library.getScanStatus"; 39 + const ENCODING: &'static str = "application/json"; 40 + type Output<S: BosStr> = GetScanStatusOutput<S>; 41 + type Err = jacquard_common::xrpc::GenericError; 42 + } 43 + 44 + impl jacquard_common::xrpc::XrpcRequest for GetScanStatus { 45 + const NSID: &'static str = "app.rocksky.library.getScanStatus"; 46 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 47 + type Response = GetScanStatusResponse; 48 + } 49 + 50 + /** Endpoint marker for the `app.rocksky.library.getScanStatus` query. 51 + 52 + Path: `/xrpc/app.rocksky.library.getScanStatus`. The request payload type is `GetScanStatus`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 53 + pub struct GetScanStatusRequest; 54 + impl jacquard_common::xrpc::XrpcEndpoint for GetScanStatusRequest { 55 + const PATH: &'static str = "/xrpc/app.rocksky.library.getScanStatus"; 56 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 + type Request<S: BosStr> = GetScanStatus; 58 + type Response = GetScanStatusResponse; 59 + }
+187
crates/rocksky-sdk/src/app_rocksky/library/get_similar_songs.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getSimilarSongs 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct GetSimilarSongs<S: BosStr = DefaultStr> { 25 + #[serde(skip_serializing_if = "Option::is_none")] 26 + pub count: Option<i64>, 27 + pub id: S, 28 + } 29 + 30 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 31 + #[serde( 32 + rename_all = "camelCase", 33 + bound(deserialize = "S: Deserialize<'de> + BosStr") 34 + )] 35 + pub struct GetSimilarSongsOutput<S: BosStr = DefaultStr> { 36 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 37 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 38 + } 39 + 40 + /** Response marker for the `app.rocksky.library.getSimilarSongs` query. 41 + 42 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetSimilarSongsOutput<S>` for this endpoint.*/ 43 + pub struct GetSimilarSongsResponse; 44 + impl jacquard_common::xrpc::XrpcResp for GetSimilarSongsResponse { 45 + const NSID: &'static str = "app.rocksky.library.getSimilarSongs"; 46 + const ENCODING: &'static str = "application/json"; 47 + type Output<S: BosStr> = GetSimilarSongsOutput<S>; 48 + type Err = jacquard_common::xrpc::GenericError; 49 + } 50 + 51 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetSimilarSongs<S> { 52 + const NSID: &'static str = "app.rocksky.library.getSimilarSongs"; 53 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 54 + type Response = GetSimilarSongsResponse; 55 + } 56 + 57 + /** Endpoint marker for the `app.rocksky.library.getSimilarSongs` query. 58 + 59 + Path: `/xrpc/app.rocksky.library.getSimilarSongs`. The request payload type is `GetSimilarSongs<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 60 + pub struct GetSimilarSongsRequest; 61 + impl jacquard_common::xrpc::XrpcEndpoint for GetSimilarSongsRequest { 62 + const PATH: &'static str = "/xrpc/app.rocksky.library.getSimilarSongs"; 63 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 64 + type Request<S: BosStr> = GetSimilarSongs<S>; 65 + type Response = GetSimilarSongsResponse; 66 + } 67 + 68 + pub mod get_similar_songs_state { 69 + 70 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 71 + #[allow(unused)] 72 + use ::core::marker::PhantomData; 73 + mod sealed { 74 + pub trait Sealed {} 75 + } 76 + /// State trait tracking which required fields have been set 77 + pub trait State: sealed::Sealed { 78 + type Id; 79 + } 80 + /// Empty state - all required fields are unset 81 + pub struct Empty(()); 82 + impl sealed::Sealed for Empty {} 83 + impl State for Empty { 84 + type Id = Unset; 85 + } 86 + ///State transition - sets the `id` field to Set 87 + pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>); 88 + impl<St: State> sealed::Sealed for SetId<St> {} 89 + impl<St: State> State for SetId<St> { 90 + type Id = Set<members::id>; 91 + } 92 + /// Marker types for field names 93 + #[allow(non_camel_case_types)] 94 + pub mod members { 95 + ///Marker type for the `id` field 96 + pub struct id(()); 97 + } 98 + } 99 + 100 + /// Builder for constructing an instance of this type. 101 + pub struct GetSimilarSongsBuilder<St: get_similar_songs_state::State, S: BosStr = DefaultStr> { 102 + _state: PhantomData<fn() -> St>, 103 + _fields: (Option<i64>, Option<S>), 104 + _type: PhantomData<fn() -> S>, 105 + } 106 + 107 + impl GetSimilarSongs<DefaultStr> { 108 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 109 + pub fn new() -> GetSimilarSongsBuilder<get_similar_songs_state::Empty, DefaultStr> { 110 + GetSimilarSongsBuilder::new() 111 + } 112 + } 113 + 114 + impl<S: BosStr> GetSimilarSongs<S> { 115 + /// Create a new builder for this type 116 + pub fn builder() -> GetSimilarSongsBuilder<get_similar_songs_state::Empty, S> { 117 + GetSimilarSongsBuilder::builder() 118 + } 119 + } 120 + 121 + impl GetSimilarSongsBuilder<get_similar_songs_state::Empty, DefaultStr> { 122 + /// Create a new builder with all fields unset, using the default string type, if needed 123 + pub fn new() -> Self { 124 + GetSimilarSongsBuilder { 125 + _state: PhantomData, 126 + _fields: (None, None), 127 + _type: PhantomData, 128 + } 129 + } 130 + } 131 + 132 + impl<S: BosStr> GetSimilarSongsBuilder<get_similar_songs_state::Empty, S> { 133 + /// Create a new builder with all fields unset 134 + pub fn builder() -> Self { 135 + GetSimilarSongsBuilder { 136 + _state: PhantomData, 137 + _fields: (None, None), 138 + _type: PhantomData, 139 + } 140 + } 141 + } 142 + 143 + impl<St: get_similar_songs_state::State, S: BosStr> GetSimilarSongsBuilder<St, S> { 144 + /// Set the `count` field (optional) 145 + pub fn count(mut self, value: impl Into<Option<i64>>) -> Self { 146 + self._fields.0 = value.into(); 147 + self 148 + } 149 + /// Set the `count` field to an Option value (optional) 150 + pub fn maybe_count(mut self, value: Option<i64>) -> Self { 151 + self._fields.0 = value; 152 + self 153 + } 154 + } 155 + 156 + impl<St, S: BosStr> GetSimilarSongsBuilder<St, S> 157 + where 158 + St: get_similar_songs_state::State, 159 + St::Id: get_similar_songs_state::IsUnset, 160 + { 161 + /// Set the `id` field (required) 162 + pub fn id( 163 + mut self, 164 + value: impl Into<S>, 165 + ) -> GetSimilarSongsBuilder<get_similar_songs_state::SetId<St>, S> { 166 + self._fields.1 = Option::Some(value.into()); 167 + GetSimilarSongsBuilder { 168 + _state: PhantomData, 169 + _fields: self._fields, 170 + _type: PhantomData, 171 + } 172 + } 173 + } 174 + 175 + impl<St, S: BosStr> GetSimilarSongsBuilder<St, S> 176 + where 177 + St: get_similar_songs_state::State, 178 + St::Id: get_similar_songs_state::IsSet, 179 + { 180 + /// Build the final struct. 181 + pub fn build(self) -> GetSimilarSongs<S> { 182 + GetSimilarSongs { 183 + count: self._fields.0, 184 + id: self._fields.1.unwrap(), 185 + } 186 + } 187 + }
+168
crates/rocksky-sdk/src/app_rocksky/library/get_song.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getSong 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct GetSong<S: BosStr = DefaultStr> { 25 + pub id: S, 26 + } 27 + 28 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 29 + #[serde( 30 + rename_all = "camelCase", 31 + bound(deserialize = "S: Deserialize<'de> + BosStr") 32 + )] 33 + pub struct GetSongOutput<S: BosStr = DefaultStr> { 34 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 35 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 36 + } 37 + 38 + /** Response marker for the `app.rocksky.library.getSong` query. 39 + 40 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetSongOutput<S>` for this endpoint.*/ 41 + pub struct GetSongResponse; 42 + impl jacquard_common::xrpc::XrpcResp for GetSongResponse { 43 + const NSID: &'static str = "app.rocksky.library.getSong"; 44 + const ENCODING: &'static str = "application/json"; 45 + type Output<S: BosStr> = GetSongOutput<S>; 46 + type Err = jacquard_common::xrpc::GenericError; 47 + } 48 + 49 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetSong<S> { 50 + const NSID: &'static str = "app.rocksky.library.getSong"; 51 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 52 + type Response = GetSongResponse; 53 + } 54 + 55 + /** Endpoint marker for the `app.rocksky.library.getSong` query. 56 + 57 + Path: `/xrpc/app.rocksky.library.getSong`. The request payload type is `GetSong<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 58 + pub struct GetSongRequest; 59 + impl jacquard_common::xrpc::XrpcEndpoint for GetSongRequest { 60 + const PATH: &'static str = "/xrpc/app.rocksky.library.getSong"; 61 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 62 + type Request<S: BosStr> = GetSong<S>; 63 + type Response = GetSongResponse; 64 + } 65 + 66 + pub mod get_song_state { 67 + 68 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 69 + #[allow(unused)] 70 + use ::core::marker::PhantomData; 71 + mod sealed { 72 + pub trait Sealed {} 73 + } 74 + /// State trait tracking which required fields have been set 75 + pub trait State: sealed::Sealed { 76 + type Id; 77 + } 78 + /// Empty state - all required fields are unset 79 + pub struct Empty(()); 80 + impl sealed::Sealed for Empty {} 81 + impl State for Empty { 82 + type Id = Unset; 83 + } 84 + ///State transition - sets the `id` field to Set 85 + pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>); 86 + impl<St: State> sealed::Sealed for SetId<St> {} 87 + impl<St: State> State for SetId<St> { 88 + type Id = Set<members::id>; 89 + } 90 + /// Marker types for field names 91 + #[allow(non_camel_case_types)] 92 + pub mod members { 93 + ///Marker type for the `id` field 94 + pub struct id(()); 95 + } 96 + } 97 + 98 + /// Builder for constructing an instance of this type. 99 + pub struct GetSongBuilder<St: get_song_state::State, S: BosStr = DefaultStr> { 100 + _state: PhantomData<fn() -> St>, 101 + _fields: (Option<S>,), 102 + _type: PhantomData<fn() -> S>, 103 + } 104 + 105 + impl GetSong<DefaultStr> { 106 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 107 + pub fn new() -> GetSongBuilder<get_song_state::Empty, DefaultStr> { 108 + GetSongBuilder::new() 109 + } 110 + } 111 + 112 + impl<S: BosStr> GetSong<S> { 113 + /// Create a new builder for this type 114 + pub fn builder() -> GetSongBuilder<get_song_state::Empty, S> { 115 + GetSongBuilder::builder() 116 + } 117 + } 118 + 119 + impl GetSongBuilder<get_song_state::Empty, DefaultStr> { 120 + /// Create a new builder with all fields unset, using the default string type, if needed 121 + pub fn new() -> Self { 122 + GetSongBuilder { 123 + _state: PhantomData, 124 + _fields: (None,), 125 + _type: PhantomData, 126 + } 127 + } 128 + } 129 + 130 + impl<S: BosStr> GetSongBuilder<get_song_state::Empty, S> { 131 + /// Create a new builder with all fields unset 132 + pub fn builder() -> Self { 133 + GetSongBuilder { 134 + _state: PhantomData, 135 + _fields: (None,), 136 + _type: PhantomData, 137 + } 138 + } 139 + } 140 + 141 + impl<St, S: BosStr> GetSongBuilder<St, S> 142 + where 143 + St: get_song_state::State, 144 + St::Id: get_song_state::IsUnset, 145 + { 146 + /// Set the `id` field (required) 147 + pub fn id(mut self, value: impl Into<S>) -> GetSongBuilder<get_song_state::SetId<St>, S> { 148 + self._fields.0 = Option::Some(value.into()); 149 + GetSongBuilder { 150 + _state: PhantomData, 151 + _fields: self._fields, 152 + _type: PhantomData, 153 + } 154 + } 155 + } 156 + 157 + impl<St, S: BosStr> GetSongBuilder<St, S> 158 + where 159 + St: get_song_state::State, 160 + St::Id: get_song_state::IsSet, 161 + { 162 + /// Build the final struct. 163 + pub fn build(self) -> GetSong<S> { 164 + GetSong { 165 + id: self._fields.0.unwrap(), 166 + } 167 + } 168 + }
+204
crates/rocksky-sdk/src/app_rocksky/library/get_songs_by_genre.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getSongsByGenre 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct GetSongsByGenre<S: BosStr = DefaultStr> { 25 + #[serde(skip_serializing_if = "Option::is_none")] 26 + pub count: Option<i64>, 27 + pub genre: S, 28 + /// (min: 0) 29 + #[serde(skip_serializing_if = "Option::is_none")] 30 + pub offset: Option<i64>, 31 + } 32 + 33 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 34 + #[serde( 35 + rename_all = "camelCase", 36 + bound(deserialize = "S: Deserialize<'de> + BosStr") 37 + )] 38 + pub struct GetSongsByGenreOutput<S: BosStr = DefaultStr> { 39 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 40 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 41 + } 42 + 43 + /** Response marker for the `app.rocksky.library.getSongsByGenre` query. 44 + 45 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetSongsByGenreOutput<S>` for this endpoint.*/ 46 + pub struct GetSongsByGenreResponse; 47 + impl jacquard_common::xrpc::XrpcResp for GetSongsByGenreResponse { 48 + const NSID: &'static str = "app.rocksky.library.getSongsByGenre"; 49 + const ENCODING: &'static str = "application/json"; 50 + type Output<S: BosStr> = GetSongsByGenreOutput<S>; 51 + type Err = jacquard_common::xrpc::GenericError; 52 + } 53 + 54 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetSongsByGenre<S> { 55 + const NSID: &'static str = "app.rocksky.library.getSongsByGenre"; 56 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 + type Response = GetSongsByGenreResponse; 58 + } 59 + 60 + /** Endpoint marker for the `app.rocksky.library.getSongsByGenre` query. 61 + 62 + Path: `/xrpc/app.rocksky.library.getSongsByGenre`. The request payload type is `GetSongsByGenre<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 63 + pub struct GetSongsByGenreRequest; 64 + impl jacquard_common::xrpc::XrpcEndpoint for GetSongsByGenreRequest { 65 + const PATH: &'static str = "/xrpc/app.rocksky.library.getSongsByGenre"; 66 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 67 + type Request<S: BosStr> = GetSongsByGenre<S>; 68 + type Response = GetSongsByGenreResponse; 69 + } 70 + 71 + pub mod get_songs_by_genre_state { 72 + 73 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 74 + #[allow(unused)] 75 + use ::core::marker::PhantomData; 76 + mod sealed { 77 + pub trait Sealed {} 78 + } 79 + /// State trait tracking which required fields have been set 80 + pub trait State: sealed::Sealed { 81 + type Genre; 82 + } 83 + /// Empty state - all required fields are unset 84 + pub struct Empty(()); 85 + impl sealed::Sealed for Empty {} 86 + impl State for Empty { 87 + type Genre = Unset; 88 + } 89 + ///State transition - sets the `genre` field to Set 90 + pub struct SetGenre<St: State = Empty>(PhantomData<fn() -> St>); 91 + impl<St: State> sealed::Sealed for SetGenre<St> {} 92 + impl<St: State> State for SetGenre<St> { 93 + type Genre = Set<members::genre>; 94 + } 95 + /// Marker types for field names 96 + #[allow(non_camel_case_types)] 97 + pub mod members { 98 + ///Marker type for the `genre` field 99 + pub struct genre(()); 100 + } 101 + } 102 + 103 + /// Builder for constructing an instance of this type. 104 + pub struct GetSongsByGenreBuilder<St: get_songs_by_genre_state::State, S: BosStr = DefaultStr> { 105 + _state: PhantomData<fn() -> St>, 106 + _fields: (Option<i64>, Option<S>, Option<i64>), 107 + _type: PhantomData<fn() -> S>, 108 + } 109 + 110 + impl GetSongsByGenre<DefaultStr> { 111 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 112 + pub fn new() -> GetSongsByGenreBuilder<get_songs_by_genre_state::Empty, DefaultStr> { 113 + GetSongsByGenreBuilder::new() 114 + } 115 + } 116 + 117 + impl<S: BosStr> GetSongsByGenre<S> { 118 + /// Create a new builder for this type 119 + pub fn builder() -> GetSongsByGenreBuilder<get_songs_by_genre_state::Empty, S> { 120 + GetSongsByGenreBuilder::builder() 121 + } 122 + } 123 + 124 + impl GetSongsByGenreBuilder<get_songs_by_genre_state::Empty, DefaultStr> { 125 + /// Create a new builder with all fields unset, using the default string type, if needed 126 + pub fn new() -> Self { 127 + GetSongsByGenreBuilder { 128 + _state: PhantomData, 129 + _fields: (None, None, None), 130 + _type: PhantomData, 131 + } 132 + } 133 + } 134 + 135 + impl<S: BosStr> GetSongsByGenreBuilder<get_songs_by_genre_state::Empty, S> { 136 + /// Create a new builder with all fields unset 137 + pub fn builder() -> Self { 138 + GetSongsByGenreBuilder { 139 + _state: PhantomData, 140 + _fields: (None, None, None), 141 + _type: PhantomData, 142 + } 143 + } 144 + } 145 + 146 + impl<St: get_songs_by_genre_state::State, S: BosStr> GetSongsByGenreBuilder<St, S> { 147 + /// Set the `count` field (optional) 148 + pub fn count(mut self, value: impl Into<Option<i64>>) -> Self { 149 + self._fields.0 = value.into(); 150 + self 151 + } 152 + /// Set the `count` field to an Option value (optional) 153 + pub fn maybe_count(mut self, value: Option<i64>) -> Self { 154 + self._fields.0 = value; 155 + self 156 + } 157 + } 158 + 159 + impl<St, S: BosStr> GetSongsByGenreBuilder<St, S> 160 + where 161 + St: get_songs_by_genre_state::State, 162 + St::Genre: get_songs_by_genre_state::IsUnset, 163 + { 164 + /// Set the `genre` field (required) 165 + pub fn genre( 166 + mut self, 167 + value: impl Into<S>, 168 + ) -> GetSongsByGenreBuilder<get_songs_by_genre_state::SetGenre<St>, S> { 169 + self._fields.1 = Option::Some(value.into()); 170 + GetSongsByGenreBuilder { 171 + _state: PhantomData, 172 + _fields: self._fields, 173 + _type: PhantomData, 174 + } 175 + } 176 + } 177 + 178 + impl<St: get_songs_by_genre_state::State, S: BosStr> GetSongsByGenreBuilder<St, S> { 179 + /// Set the `offset` field (optional) 180 + pub fn offset(mut self, value: impl Into<Option<i64>>) -> Self { 181 + self._fields.2 = value.into(); 182 + self 183 + } 184 + /// Set the `offset` field to an Option value (optional) 185 + pub fn maybe_offset(mut self, value: Option<i64>) -> Self { 186 + self._fields.2 = value; 187 + self 188 + } 189 + } 190 + 191 + impl<St, S: BosStr> GetSongsByGenreBuilder<St, S> 192 + where 193 + St: get_songs_by_genre_state::State, 194 + St::Genre: get_songs_by_genre_state::IsSet, 195 + { 196 + /// Build the final struct. 197 + pub fn build(self) -> GetSongsByGenre<S> { 198 + GetSongsByGenre { 199 + count: self._fields.0, 200 + genre: self._fields.1.unwrap(), 201 + offset: self._fields.2, 202 + } 203 + } 204 + }
+59
crates/rocksky-sdk/src/app_rocksky/library/get_starred.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getStarred 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde(rename_all = "camelCase")] 21 + pub struct GetStarred; 22 + 23 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 24 + #[serde( 25 + rename_all = "camelCase", 26 + bound(deserialize = "S: Deserialize<'de> + BosStr") 27 + )] 28 + pub struct GetStarredOutput<S: BosStr = DefaultStr> { 29 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 30 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 31 + } 32 + 33 + /** Response marker for the `app.rocksky.library.getStarred` query. 34 + 35 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetStarredOutput<S>` for this endpoint.*/ 36 + pub struct GetStarredResponse; 37 + impl jacquard_common::xrpc::XrpcResp for GetStarredResponse { 38 + const NSID: &'static str = "app.rocksky.library.getStarred"; 39 + const ENCODING: &'static str = "application/json"; 40 + type Output<S: BosStr> = GetStarredOutput<S>; 41 + type Err = jacquard_common::xrpc::GenericError; 42 + } 43 + 44 + impl jacquard_common::xrpc::XrpcRequest for GetStarred { 45 + const NSID: &'static str = "app.rocksky.library.getStarred"; 46 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 47 + type Response = GetStarredResponse; 48 + } 49 + 50 + /** Endpoint marker for the `app.rocksky.library.getStarred` query. 51 + 52 + Path: `/xrpc/app.rocksky.library.getStarred`. The request payload type is `GetStarred`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 53 + pub struct GetStarredRequest; 54 + impl jacquard_common::xrpc::XrpcEndpoint for GetStarredRequest { 55 + const PATH: &'static str = "/xrpc/app.rocksky.library.getStarred"; 56 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 + type Request<S: BosStr> = GetStarred; 58 + type Response = GetStarredResponse; 59 + }
+206
crates/rocksky-sdk/src/app_rocksky/library/get_stream_url.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getStreamUrl 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::string::UriValue; 15 + use jacquard_common::types::value::Data; 16 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 17 + use jacquard_derive::IntoStatic; 18 + use serde::{Deserialize, Serialize}; 19 + 20 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 21 + #[serde( 22 + rename_all = "camelCase", 23 + bound(deserialize = "S: Deserialize<'de> + BosStr") 24 + )] 25 + pub struct GetStreamUrl<S: BosStr = DefaultStr> { 26 + #[serde(skip_serializing_if = "Option::is_none")] 27 + pub format: Option<S>, 28 + pub id: S, 29 + #[serde(skip_serializing_if = "Option::is_none")] 30 + pub max_bit_rate: Option<i64>, 31 + } 32 + 33 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 34 + #[serde( 35 + rename_all = "camelCase", 36 + bound(deserialize = "S: Deserialize<'de> + BosStr") 37 + )] 38 + pub struct GetStreamUrlOutput<S: BosStr = DefaultStr> { 39 + ///The resolved media or cover-art URL. 40 + pub url: UriValue<S>, 41 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 42 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 43 + } 44 + 45 + /** Response marker for the `app.rocksky.library.getStreamUrl` query. 46 + 47 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetStreamUrlOutput<S>` for this endpoint.*/ 48 + pub struct GetStreamUrlResponse; 49 + impl jacquard_common::xrpc::XrpcResp for GetStreamUrlResponse { 50 + const NSID: &'static str = "app.rocksky.library.getStreamUrl"; 51 + const ENCODING: &'static str = "application/json"; 52 + type Output<S: BosStr> = GetStreamUrlOutput<S>; 53 + type Err = jacquard_common::xrpc::GenericError; 54 + } 55 + 56 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetStreamUrl<S> { 57 + const NSID: &'static str = "app.rocksky.library.getStreamUrl"; 58 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 59 + type Response = GetStreamUrlResponse; 60 + } 61 + 62 + /** Endpoint marker for the `app.rocksky.library.getStreamUrl` query. 63 + 64 + Path: `/xrpc/app.rocksky.library.getStreamUrl`. The request payload type is `GetStreamUrl<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 65 + pub struct GetStreamUrlRequest; 66 + impl jacquard_common::xrpc::XrpcEndpoint for GetStreamUrlRequest { 67 + const PATH: &'static str = "/xrpc/app.rocksky.library.getStreamUrl"; 68 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 69 + type Request<S: BosStr> = GetStreamUrl<S>; 70 + type Response = GetStreamUrlResponse; 71 + } 72 + 73 + pub mod get_stream_url_state { 74 + 75 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 76 + #[allow(unused)] 77 + use ::core::marker::PhantomData; 78 + mod sealed { 79 + pub trait Sealed {} 80 + } 81 + /// State trait tracking which required fields have been set 82 + pub trait State: sealed::Sealed { 83 + type Id; 84 + } 85 + /// Empty state - all required fields are unset 86 + pub struct Empty(()); 87 + impl sealed::Sealed for Empty {} 88 + impl State for Empty { 89 + type Id = Unset; 90 + } 91 + ///State transition - sets the `id` field to Set 92 + pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>); 93 + impl<St: State> sealed::Sealed for SetId<St> {} 94 + impl<St: State> State for SetId<St> { 95 + type Id = Set<members::id>; 96 + } 97 + /// Marker types for field names 98 + #[allow(non_camel_case_types)] 99 + pub mod members { 100 + ///Marker type for the `id` field 101 + pub struct id(()); 102 + } 103 + } 104 + 105 + /// Builder for constructing an instance of this type. 106 + pub struct GetStreamUrlBuilder<St: get_stream_url_state::State, S: BosStr = DefaultStr> { 107 + _state: PhantomData<fn() -> St>, 108 + _fields: (Option<S>, Option<S>, Option<i64>), 109 + _type: PhantomData<fn() -> S>, 110 + } 111 + 112 + impl GetStreamUrl<DefaultStr> { 113 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 114 + pub fn new() -> GetStreamUrlBuilder<get_stream_url_state::Empty, DefaultStr> { 115 + GetStreamUrlBuilder::new() 116 + } 117 + } 118 + 119 + impl<S: BosStr> GetStreamUrl<S> { 120 + /// Create a new builder for this type 121 + pub fn builder() -> GetStreamUrlBuilder<get_stream_url_state::Empty, S> { 122 + GetStreamUrlBuilder::builder() 123 + } 124 + } 125 + 126 + impl GetStreamUrlBuilder<get_stream_url_state::Empty, DefaultStr> { 127 + /// Create a new builder with all fields unset, using the default string type, if needed 128 + pub fn new() -> Self { 129 + GetStreamUrlBuilder { 130 + _state: PhantomData, 131 + _fields: (None, None, None), 132 + _type: PhantomData, 133 + } 134 + } 135 + } 136 + 137 + impl<S: BosStr> GetStreamUrlBuilder<get_stream_url_state::Empty, S> { 138 + /// Create a new builder with all fields unset 139 + pub fn builder() -> Self { 140 + GetStreamUrlBuilder { 141 + _state: PhantomData, 142 + _fields: (None, None, None), 143 + _type: PhantomData, 144 + } 145 + } 146 + } 147 + 148 + impl<St: get_stream_url_state::State, S: BosStr> GetStreamUrlBuilder<St, S> { 149 + /// Set the `format` field (optional) 150 + pub fn format(mut self, value: impl Into<Option<S>>) -> Self { 151 + self._fields.0 = value.into(); 152 + self 153 + } 154 + /// Set the `format` field to an Option value (optional) 155 + pub fn maybe_format(mut self, value: Option<S>) -> Self { 156 + self._fields.0 = value; 157 + self 158 + } 159 + } 160 + 161 + impl<St, S: BosStr> GetStreamUrlBuilder<St, S> 162 + where 163 + St: get_stream_url_state::State, 164 + St::Id: get_stream_url_state::IsUnset, 165 + { 166 + /// Set the `id` field (required) 167 + pub fn id( 168 + mut self, 169 + value: impl Into<S>, 170 + ) -> GetStreamUrlBuilder<get_stream_url_state::SetId<St>, S> { 171 + self._fields.1 = Option::Some(value.into()); 172 + GetStreamUrlBuilder { 173 + _state: PhantomData, 174 + _fields: self._fields, 175 + _type: PhantomData, 176 + } 177 + } 178 + } 179 + 180 + impl<St: get_stream_url_state::State, S: BosStr> GetStreamUrlBuilder<St, S> { 181 + /// Set the `maxBitRate` field (optional) 182 + pub fn max_bit_rate(mut self, value: impl Into<Option<i64>>) -> Self { 183 + self._fields.2 = value.into(); 184 + self 185 + } 186 + /// Set the `maxBitRate` field to an Option value (optional) 187 + pub fn maybe_max_bit_rate(mut self, value: Option<i64>) -> Self { 188 + self._fields.2 = value; 189 + self 190 + } 191 + } 192 + 193 + impl<St, S: BosStr> GetStreamUrlBuilder<St, S> 194 + where 195 + St: get_stream_url_state::State, 196 + St::Id: get_stream_url_state::IsSet, 197 + { 198 + /// Build the final struct. 199 + pub fn build(self) -> GetStreamUrl<S> { 200 + GetStreamUrl { 201 + format: self._fields.0, 202 + id: self._fields.1.unwrap(), 203 + max_bit_rate: self._fields.2, 204 + } 205 + } 206 + }
+187
crates/rocksky-sdk/src/app_rocksky/library/get_top_songs.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getTopSongs 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct GetTopSongs<S: BosStr = DefaultStr> { 25 + pub artist: S, 26 + #[serde(skip_serializing_if = "Option::is_none")] 27 + pub count: Option<i64>, 28 + } 29 + 30 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 31 + #[serde( 32 + rename_all = "camelCase", 33 + bound(deserialize = "S: Deserialize<'de> + BosStr") 34 + )] 35 + pub struct GetTopSongsOutput<S: BosStr = DefaultStr> { 36 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 37 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 38 + } 39 + 40 + /** Response marker for the `app.rocksky.library.getTopSongs` query. 41 + 42 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetTopSongsOutput<S>` for this endpoint.*/ 43 + pub struct GetTopSongsResponse; 44 + impl jacquard_common::xrpc::XrpcResp for GetTopSongsResponse { 45 + const NSID: &'static str = "app.rocksky.library.getTopSongs"; 46 + const ENCODING: &'static str = "application/json"; 47 + type Output<S: BosStr> = GetTopSongsOutput<S>; 48 + type Err = jacquard_common::xrpc::GenericError; 49 + } 50 + 51 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for GetTopSongs<S> { 52 + const NSID: &'static str = "app.rocksky.library.getTopSongs"; 53 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 54 + type Response = GetTopSongsResponse; 55 + } 56 + 57 + /** Endpoint marker for the `app.rocksky.library.getTopSongs` query. 58 + 59 + Path: `/xrpc/app.rocksky.library.getTopSongs`. The request payload type is `GetTopSongs<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 60 + pub struct GetTopSongsRequest; 61 + impl jacquard_common::xrpc::XrpcEndpoint for GetTopSongsRequest { 62 + const PATH: &'static str = "/xrpc/app.rocksky.library.getTopSongs"; 63 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 64 + type Request<S: BosStr> = GetTopSongs<S>; 65 + type Response = GetTopSongsResponse; 66 + } 67 + 68 + pub mod get_top_songs_state { 69 + 70 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 71 + #[allow(unused)] 72 + use ::core::marker::PhantomData; 73 + mod sealed { 74 + pub trait Sealed {} 75 + } 76 + /// State trait tracking which required fields have been set 77 + pub trait State: sealed::Sealed { 78 + type Artist; 79 + } 80 + /// Empty state - all required fields are unset 81 + pub struct Empty(()); 82 + impl sealed::Sealed for Empty {} 83 + impl State for Empty { 84 + type Artist = Unset; 85 + } 86 + ///State transition - sets the `artist` field to Set 87 + pub struct SetArtist<St: State = Empty>(PhantomData<fn() -> St>); 88 + impl<St: State> sealed::Sealed for SetArtist<St> {} 89 + impl<St: State> State for SetArtist<St> { 90 + type Artist = Set<members::artist>; 91 + } 92 + /// Marker types for field names 93 + #[allow(non_camel_case_types)] 94 + pub mod members { 95 + ///Marker type for the `artist` field 96 + pub struct artist(()); 97 + } 98 + } 99 + 100 + /// Builder for constructing an instance of this type. 101 + pub struct GetTopSongsBuilder<St: get_top_songs_state::State, S: BosStr = DefaultStr> { 102 + _state: PhantomData<fn() -> St>, 103 + _fields: (Option<S>, Option<i64>), 104 + _type: PhantomData<fn() -> S>, 105 + } 106 + 107 + impl GetTopSongs<DefaultStr> { 108 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 109 + pub fn new() -> GetTopSongsBuilder<get_top_songs_state::Empty, DefaultStr> { 110 + GetTopSongsBuilder::new() 111 + } 112 + } 113 + 114 + impl<S: BosStr> GetTopSongs<S> { 115 + /// Create a new builder for this type 116 + pub fn builder() -> GetTopSongsBuilder<get_top_songs_state::Empty, S> { 117 + GetTopSongsBuilder::builder() 118 + } 119 + } 120 + 121 + impl GetTopSongsBuilder<get_top_songs_state::Empty, DefaultStr> { 122 + /// Create a new builder with all fields unset, using the default string type, if needed 123 + pub fn new() -> Self { 124 + GetTopSongsBuilder { 125 + _state: PhantomData, 126 + _fields: (None, None), 127 + _type: PhantomData, 128 + } 129 + } 130 + } 131 + 132 + impl<S: BosStr> GetTopSongsBuilder<get_top_songs_state::Empty, S> { 133 + /// Create a new builder with all fields unset 134 + pub fn builder() -> Self { 135 + GetTopSongsBuilder { 136 + _state: PhantomData, 137 + _fields: (None, None), 138 + _type: PhantomData, 139 + } 140 + } 141 + } 142 + 143 + impl<St, S: BosStr> GetTopSongsBuilder<St, S> 144 + where 145 + St: get_top_songs_state::State, 146 + St::Artist: get_top_songs_state::IsUnset, 147 + { 148 + /// Set the `artist` field (required) 149 + pub fn artist( 150 + mut self, 151 + value: impl Into<S>, 152 + ) -> GetTopSongsBuilder<get_top_songs_state::SetArtist<St>, S> { 153 + self._fields.0 = Option::Some(value.into()); 154 + GetTopSongsBuilder { 155 + _state: PhantomData, 156 + _fields: self._fields, 157 + _type: PhantomData, 158 + } 159 + } 160 + } 161 + 162 + impl<St: get_top_songs_state::State, S: BosStr> GetTopSongsBuilder<St, S> { 163 + /// Set the `count` field (optional) 164 + pub fn count(mut self, value: impl Into<Option<i64>>) -> Self { 165 + self._fields.1 = value.into(); 166 + self 167 + } 168 + /// Set the `count` field to an Option value (optional) 169 + pub fn maybe_count(mut self, value: Option<i64>) -> Self { 170 + self._fields.1 = value; 171 + self 172 + } 173 + } 174 + 175 + impl<St, S: BosStr> GetTopSongsBuilder<St, S> 176 + where 177 + St: get_top_songs_state::State, 178 + St::Artist: get_top_songs_state::IsSet, 179 + { 180 + /// Build the final struct. 181 + pub fn build(self) -> GetTopSongs<S> { 182 + GetTopSongs { 183 + artist: self._fields.0.unwrap(), 184 + count: self._fields.1, 185 + } 186 + } 187 + }
+59
crates/rocksky-sdk/src/app_rocksky/library/get_user.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.getUser 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde(rename_all = "camelCase")] 21 + pub struct GetUser; 22 + 23 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 24 + #[serde( 25 + rename_all = "camelCase", 26 + bound(deserialize = "S: Deserialize<'de> + BosStr") 27 + )] 28 + pub struct GetUserOutput<S: BosStr = DefaultStr> { 29 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 30 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 31 + } 32 + 33 + /** Response marker for the `app.rocksky.library.getUser` query. 34 + 35 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `GetUserOutput<S>` for this endpoint.*/ 36 + pub struct GetUserResponse; 37 + impl jacquard_common::xrpc::XrpcResp for GetUserResponse { 38 + const NSID: &'static str = "app.rocksky.library.getUser"; 39 + const ENCODING: &'static str = "application/json"; 40 + type Output<S: BosStr> = GetUserOutput<S>; 41 + type Err = jacquard_common::xrpc::GenericError; 42 + } 43 + 44 + impl jacquard_common::xrpc::XrpcRequest for GetUser { 45 + const NSID: &'static str = "app.rocksky.library.getUser"; 46 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 47 + type Response = GetUserResponse; 48 + } 49 + 50 + /** Endpoint marker for the `app.rocksky.library.getUser` query. 51 + 52 + Path: `/xrpc/app.rocksky.library.getUser`. The request payload type is `GetUser`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 53 + pub struct GetUserRequest; 54 + impl jacquard_common::xrpc::XrpcEndpoint for GetUserRequest { 55 + const PATH: &'static str = "/xrpc/app.rocksky.library.getUser"; 56 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 + type Request<S: BosStr> = GetUser; 58 + type Response = GetUserResponse; 59 + }
+59
crates/rocksky-sdk/src/app_rocksky/library/ping.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.ping 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde(rename_all = "camelCase")] 21 + pub struct Ping; 22 + 23 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 24 + #[serde( 25 + rename_all = "camelCase", 26 + bound(deserialize = "S: Deserialize<'de> + BosStr") 27 + )] 28 + pub struct PingOutput<S: BosStr = DefaultStr> { 29 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 30 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 31 + } 32 + 33 + /** Response marker for the `app.rocksky.library.ping` query. 34 + 35 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `PingOutput<S>` for this endpoint.*/ 36 + pub struct PingResponse; 37 + impl jacquard_common::xrpc::XrpcResp for PingResponse { 38 + const NSID: &'static str = "app.rocksky.library.ping"; 39 + const ENCODING: &'static str = "application/json"; 40 + type Output<S: BosStr> = PingOutput<S>; 41 + type Err = jacquard_common::xrpc::GenericError; 42 + } 43 + 44 + impl jacquard_common::xrpc::XrpcRequest for Ping { 45 + const NSID: &'static str = "app.rocksky.library.ping"; 46 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 47 + type Response = PingResponse; 48 + } 49 + 50 + /** Endpoint marker for the `app.rocksky.library.ping` query. 51 + 52 + Path: `/xrpc/app.rocksky.library.ping`. The request payload type is `Ping`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 53 + pub struct PingRequest; 54 + impl jacquard_common::xrpc::XrpcEndpoint for PingRequest { 55 + const PATH: &'static str = "/xrpc/app.rocksky.library.ping"; 56 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 + type Request<S: BosStr> = Ping; 58 + type Response = PingResponse; 59 + }
+76
crates/rocksky-sdk/src/app_rocksky/library/save_play_queue.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.savePlayQueue 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct SavePlayQueue<S: BosStr = DefaultStr> { 25 + ///The id of the currently playing song. 26 + #[serde(skip_serializing_if = "Option::is_none")] 27 + pub current: Option<S>, 28 + ///Comma-separated song ids in the queue. 29 + #[serde(skip_serializing_if = "Option::is_none")] 30 + pub id: Option<S>, 31 + ///Position within the current song, in milliseconds. 32 + #[serde(skip_serializing_if = "Option::is_none")] 33 + pub position: Option<i64>, 34 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 35 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 36 + } 37 + 38 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 39 + #[serde( 40 + rename_all = "camelCase", 41 + bound(deserialize = "S: Deserialize<'de> + BosStr") 42 + )] 43 + pub struct SavePlayQueueOutput<S: BosStr = DefaultStr> { 44 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 45 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 46 + } 47 + 48 + /** Response marker for the `app.rocksky.library.savePlayQueue` procedure. 49 + 50 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `SavePlayQueueOutput<S>` for this endpoint.*/ 51 + pub struct SavePlayQueueResponse; 52 + impl jacquard_common::xrpc::XrpcResp for SavePlayQueueResponse { 53 + const NSID: &'static str = "app.rocksky.library.savePlayQueue"; 54 + const ENCODING: &'static str = "application/json"; 55 + type Output<S: BosStr> = SavePlayQueueOutput<S>; 56 + type Err = jacquard_common::xrpc::GenericError; 57 + } 58 + 59 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for SavePlayQueue<S> { 60 + const NSID: &'static str = "app.rocksky.library.savePlayQueue"; 61 + const METHOD: jacquard_common::xrpc::XrpcMethod = 62 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 63 + type Response = SavePlayQueueResponse; 64 + } 65 + 66 + /** Endpoint marker for the `app.rocksky.library.savePlayQueue` procedure. 67 + 68 + Path: `/xrpc/app.rocksky.library.savePlayQueue`. The request payload type is `SavePlayQueue<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 69 + pub struct SavePlayQueueRequest; 70 + impl jacquard_common::xrpc::XrpcEndpoint for SavePlayQueueRequest { 71 + const PATH: &'static str = "/xrpc/app.rocksky.library.savePlayQueue"; 72 + const METHOD: jacquard_common::xrpc::XrpcMethod = 73 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 74 + type Request<S: BosStr> = SavePlayQueue<S>; 75 + type Response = SavePlayQueueResponse; 76 + }
+75
crates/rocksky-sdk/src/app_rocksky/library/scrobble.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.scrobble 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct Scrobble<S: BosStr = DefaultStr> { 25 + ///The song id. 26 + pub id: S, 27 + ///True for a final submission, false for a now-playing update. 28 + #[serde(skip_serializing_if = "Option::is_none")] 29 + pub submission: Option<bool>, 30 + ///Play time as a Unix timestamp in milliseconds. 31 + #[serde(skip_serializing_if = "Option::is_none")] 32 + pub time: Option<i64>, 33 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 34 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 35 + } 36 + 37 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 38 + #[serde( 39 + rename_all = "camelCase", 40 + bound(deserialize = "S: Deserialize<'de> + BosStr") 41 + )] 42 + pub struct ScrobbleOutput<S: BosStr = DefaultStr> { 43 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 44 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 45 + } 46 + 47 + /** Response marker for the `app.rocksky.library.scrobble` procedure. 48 + 49 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `ScrobbleOutput<S>` for this endpoint.*/ 50 + pub struct ScrobbleResponse; 51 + impl jacquard_common::xrpc::XrpcResp for ScrobbleResponse { 52 + const NSID: &'static str = "app.rocksky.library.scrobble"; 53 + const ENCODING: &'static str = "application/json"; 54 + type Output<S: BosStr> = ScrobbleOutput<S>; 55 + type Err = jacquard_common::xrpc::GenericError; 56 + } 57 + 58 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for Scrobble<S> { 59 + const NSID: &'static str = "app.rocksky.library.scrobble"; 60 + const METHOD: jacquard_common::xrpc::XrpcMethod = 61 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 62 + type Response = ScrobbleResponse; 63 + } 64 + 65 + /** Endpoint marker for the `app.rocksky.library.scrobble` procedure. 66 + 67 + Path: `/xrpc/app.rocksky.library.scrobble`. The request payload type is `Scrobble<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 68 + pub struct ScrobbleRequest; 69 + impl jacquard_common::xrpc::XrpcEndpoint for ScrobbleRequest { 70 + const PATH: &'static str = "/xrpc/app.rocksky.library.scrobble"; 71 + const METHOD: jacquard_common::xrpc::XrpcMethod = 72 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 73 + type Request<S: BosStr> = Scrobble<S>; 74 + type Response = ScrobbleResponse; 75 + }
+275
crates/rocksky-sdk/src/app_rocksky/library/search.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.search 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct Search<S: BosStr = DefaultStr> { 25 + #[serde(skip_serializing_if = "Option::is_none")] 26 + pub album_count: Option<i64>, 27 + /// (min: 0) 28 + #[serde(skip_serializing_if = "Option::is_none")] 29 + pub album_offset: Option<i64>, 30 + #[serde(skip_serializing_if = "Option::is_none")] 31 + pub artist_count: Option<i64>, 32 + /// (min: 0) 33 + #[serde(skip_serializing_if = "Option::is_none")] 34 + pub artist_offset: Option<i64>, 35 + pub query: S, 36 + #[serde(skip_serializing_if = "Option::is_none")] 37 + pub song_count: Option<i64>, 38 + /// (min: 0) 39 + #[serde(skip_serializing_if = "Option::is_none")] 40 + pub song_offset: Option<i64>, 41 + } 42 + 43 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 44 + #[serde( 45 + rename_all = "camelCase", 46 + bound(deserialize = "S: Deserialize<'de> + BosStr") 47 + )] 48 + pub struct SearchOutput<S: BosStr = DefaultStr> { 49 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 50 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 51 + } 52 + 53 + /** Response marker for the `app.rocksky.library.search` query. 54 + 55 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `SearchOutput<S>` for this endpoint.*/ 56 + pub struct SearchResponse; 57 + impl jacquard_common::xrpc::XrpcResp for SearchResponse { 58 + const NSID: &'static str = "app.rocksky.library.search"; 59 + const ENCODING: &'static str = "application/json"; 60 + type Output<S: BosStr> = SearchOutput<S>; 61 + type Err = jacquard_common::xrpc::GenericError; 62 + } 63 + 64 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for Search<S> { 65 + const NSID: &'static str = "app.rocksky.library.search"; 66 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 67 + type Response = SearchResponse; 68 + } 69 + 70 + /** Endpoint marker for the `app.rocksky.library.search` query. 71 + 72 + Path: `/xrpc/app.rocksky.library.search`. The request payload type is `Search<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 73 + pub struct SearchRequest; 74 + impl jacquard_common::xrpc::XrpcEndpoint for SearchRequest { 75 + const PATH: &'static str = "/xrpc/app.rocksky.library.search"; 76 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 77 + type Request<S: BosStr> = Search<S>; 78 + type Response = SearchResponse; 79 + } 80 + 81 + pub mod search_state { 82 + 83 + pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; 84 + #[allow(unused)] 85 + use ::core::marker::PhantomData; 86 + mod sealed { 87 + pub trait Sealed {} 88 + } 89 + /// State trait tracking which required fields have been set 90 + pub trait State: sealed::Sealed { 91 + type Query; 92 + } 93 + /// Empty state - all required fields are unset 94 + pub struct Empty(()); 95 + impl sealed::Sealed for Empty {} 96 + impl State for Empty { 97 + type Query = Unset; 98 + } 99 + ///State transition - sets the `query` field to Set 100 + pub struct SetQuery<St: State = Empty>(PhantomData<fn() -> St>); 101 + impl<St: State> sealed::Sealed for SetQuery<St> {} 102 + impl<St: State> State for SetQuery<St> { 103 + type Query = Set<members::query>; 104 + } 105 + /// Marker types for field names 106 + #[allow(non_camel_case_types)] 107 + pub mod members { 108 + ///Marker type for the `query` field 109 + pub struct query(()); 110 + } 111 + } 112 + 113 + /// Builder for constructing an instance of this type. 114 + pub struct SearchBuilder<St: search_state::State, S: BosStr = DefaultStr> { 115 + _state: PhantomData<fn() -> St>, 116 + _fields: ( 117 + Option<i64>, 118 + Option<i64>, 119 + Option<i64>, 120 + Option<i64>, 121 + Option<S>, 122 + Option<i64>, 123 + Option<i64>, 124 + ), 125 + _type: PhantomData<fn() -> S>, 126 + } 127 + 128 + impl Search<DefaultStr> { 129 + /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed 130 + pub fn new() -> SearchBuilder<search_state::Empty, DefaultStr> { 131 + SearchBuilder::new() 132 + } 133 + } 134 + 135 + impl<S: BosStr> Search<S> { 136 + /// Create a new builder for this type 137 + pub fn builder() -> SearchBuilder<search_state::Empty, S> { 138 + SearchBuilder::builder() 139 + } 140 + } 141 + 142 + impl SearchBuilder<search_state::Empty, DefaultStr> { 143 + /// Create a new builder with all fields unset, using the default string type, if needed 144 + pub fn new() -> Self { 145 + SearchBuilder { 146 + _state: PhantomData, 147 + _fields: (None, None, None, None, None, None, None), 148 + _type: PhantomData, 149 + } 150 + } 151 + } 152 + 153 + impl<S: BosStr> SearchBuilder<search_state::Empty, S> { 154 + /// Create a new builder with all fields unset 155 + pub fn builder() -> Self { 156 + SearchBuilder { 157 + _state: PhantomData, 158 + _fields: (None, None, None, None, None, None, None), 159 + _type: PhantomData, 160 + } 161 + } 162 + } 163 + 164 + impl<St: search_state::State, S: BosStr> SearchBuilder<St, S> { 165 + /// Set the `albumCount` field (optional) 166 + pub fn album_count(mut self, value: impl Into<Option<i64>>) -> Self { 167 + self._fields.0 = value.into(); 168 + self 169 + } 170 + /// Set the `albumCount` field to an Option value (optional) 171 + pub fn maybe_album_count(mut self, value: Option<i64>) -> Self { 172 + self._fields.0 = value; 173 + self 174 + } 175 + } 176 + 177 + impl<St: search_state::State, S: BosStr> SearchBuilder<St, S> { 178 + /// Set the `albumOffset` field (optional) 179 + pub fn album_offset(mut self, value: impl Into<Option<i64>>) -> Self { 180 + self._fields.1 = value.into(); 181 + self 182 + } 183 + /// Set the `albumOffset` field to an Option value (optional) 184 + pub fn maybe_album_offset(mut self, value: Option<i64>) -> Self { 185 + self._fields.1 = value; 186 + self 187 + } 188 + } 189 + 190 + impl<St: search_state::State, S: BosStr> SearchBuilder<St, S> { 191 + /// Set the `artistCount` field (optional) 192 + pub fn artist_count(mut self, value: impl Into<Option<i64>>) -> Self { 193 + self._fields.2 = value.into(); 194 + self 195 + } 196 + /// Set the `artistCount` field to an Option value (optional) 197 + pub fn maybe_artist_count(mut self, value: Option<i64>) -> Self { 198 + self._fields.2 = value; 199 + self 200 + } 201 + } 202 + 203 + impl<St: search_state::State, S: BosStr> SearchBuilder<St, S> { 204 + /// Set the `artistOffset` field (optional) 205 + pub fn artist_offset(mut self, value: impl Into<Option<i64>>) -> Self { 206 + self._fields.3 = value.into(); 207 + self 208 + } 209 + /// Set the `artistOffset` field to an Option value (optional) 210 + pub fn maybe_artist_offset(mut self, value: Option<i64>) -> Self { 211 + self._fields.3 = value; 212 + self 213 + } 214 + } 215 + 216 + impl<St, S: BosStr> SearchBuilder<St, S> 217 + where 218 + St: search_state::State, 219 + St::Query: search_state::IsUnset, 220 + { 221 + /// Set the `query` field (required) 222 + pub fn query(mut self, value: impl Into<S>) -> SearchBuilder<search_state::SetQuery<St>, S> { 223 + self._fields.4 = Option::Some(value.into()); 224 + SearchBuilder { 225 + _state: PhantomData, 226 + _fields: self._fields, 227 + _type: PhantomData, 228 + } 229 + } 230 + } 231 + 232 + impl<St: search_state::State, S: BosStr> SearchBuilder<St, S> { 233 + /// Set the `songCount` field (optional) 234 + pub fn song_count(mut self, value: impl Into<Option<i64>>) -> Self { 235 + self._fields.5 = value.into(); 236 + self 237 + } 238 + /// Set the `songCount` field to an Option value (optional) 239 + pub fn maybe_song_count(mut self, value: Option<i64>) -> Self { 240 + self._fields.5 = value; 241 + self 242 + } 243 + } 244 + 245 + impl<St: search_state::State, S: BosStr> SearchBuilder<St, S> { 246 + /// Set the `songOffset` field (optional) 247 + pub fn song_offset(mut self, value: impl Into<Option<i64>>) -> Self { 248 + self._fields.6 = value.into(); 249 + self 250 + } 251 + /// Set the `songOffset` field to an Option value (optional) 252 + pub fn maybe_song_offset(mut self, value: Option<i64>) -> Self { 253 + self._fields.6 = value; 254 + self 255 + } 256 + } 257 + 258 + impl<St, S: BosStr> SearchBuilder<St, S> 259 + where 260 + St: search_state::State, 261 + St::Query: search_state::IsSet, 262 + { 263 + /// Build the final struct. 264 + pub fn build(self) -> Search<S> { 265 + Search { 266 + album_count: self._fields.0, 267 + album_offset: self._fields.1, 268 + artist_count: self._fields.2, 269 + artist_offset: self._fields.3, 270 + query: self._fields.4.unwrap(), 271 + song_count: self._fields.5, 272 + song_offset: self._fields.6, 273 + } 274 + } 275 + }
+75
crates/rocksky-sdk/src/app_rocksky/library/star.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.star 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct Star<S: BosStr = DefaultStr> { 25 + ///An album id to star. 26 + #[serde(skip_serializing_if = "Option::is_none")] 27 + pub album_id: Option<S>, 28 + ///An artist id to star. 29 + #[serde(skip_serializing_if = "Option::is_none")] 30 + pub artist_id: Option<S>, 31 + ///The song id to star. 32 + pub id: S, 33 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 34 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 35 + } 36 + 37 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 38 + #[serde( 39 + rename_all = "camelCase", 40 + bound(deserialize = "S: Deserialize<'de> + BosStr") 41 + )] 42 + pub struct StarOutput<S: BosStr = DefaultStr> { 43 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 44 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 45 + } 46 + 47 + /** Response marker for the `app.rocksky.library.star` procedure. 48 + 49 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `StarOutput<S>` for this endpoint.*/ 50 + pub struct StarResponse; 51 + impl jacquard_common::xrpc::XrpcResp for StarResponse { 52 + const NSID: &'static str = "app.rocksky.library.star"; 53 + const ENCODING: &'static str = "application/json"; 54 + type Output<S: BosStr> = StarOutput<S>; 55 + type Err = jacquard_common::xrpc::GenericError; 56 + } 57 + 58 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for Star<S> { 59 + const NSID: &'static str = "app.rocksky.library.star"; 60 + const METHOD: jacquard_common::xrpc::XrpcMethod = 61 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 62 + type Response = StarResponse; 63 + } 64 + 65 + /** Endpoint marker for the `app.rocksky.library.star` procedure. 66 + 67 + Path: `/xrpc/app.rocksky.library.star`. The request payload type is `Star<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 68 + pub struct StarRequest; 69 + impl jacquard_common::xrpc::XrpcEndpoint for StarRequest { 70 + const PATH: &'static str = "/xrpc/app.rocksky.library.star"; 71 + const METHOD: jacquard_common::xrpc::XrpcMethod = 72 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 73 + type Request<S: BosStr> = Star<S>; 74 + type Response = StarResponse; 75 + }
+59
crates/rocksky-sdk/src/app_rocksky/library/start_scan.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.startScan 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] 20 + #[serde(rename_all = "camelCase")] 21 + pub struct StartScan; 22 + 23 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 24 + #[serde( 25 + rename_all = "camelCase", 26 + bound(deserialize = "S: Deserialize<'de> + BosStr") 27 + )] 28 + pub struct StartScanOutput<S: BosStr = DefaultStr> { 29 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 30 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 31 + } 32 + 33 + /** Response marker for the `app.rocksky.library.startScan` query. 34 + 35 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `StartScanOutput<S>` for this endpoint.*/ 36 + pub struct StartScanResponse; 37 + impl jacquard_common::xrpc::XrpcResp for StartScanResponse { 38 + const NSID: &'static str = "app.rocksky.library.startScan"; 39 + const ENCODING: &'static str = "application/json"; 40 + type Output<S: BosStr> = StartScanOutput<S>; 41 + type Err = jacquard_common::xrpc::GenericError; 42 + } 43 + 44 + impl jacquard_common::xrpc::XrpcRequest for StartScan { 45 + const NSID: &'static str = "app.rocksky.library.startScan"; 46 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 47 + type Response = StartScanResponse; 48 + } 49 + 50 + /** Endpoint marker for the `app.rocksky.library.startScan` query. 51 + 52 + Path: `/xrpc/app.rocksky.library.startScan`. The request payload type is `StartScan`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 53 + pub struct StartScanRequest; 54 + impl jacquard_common::xrpc::XrpcEndpoint for StartScanRequest { 55 + const PATH: &'static str = "/xrpc/app.rocksky.library.startScan"; 56 + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 57 + type Request<S: BosStr> = StartScan; 58 + type Response = StartScanResponse; 59 + }
+75
crates/rocksky-sdk/src/app_rocksky/library/unstar.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.unstar 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct Unstar<S: BosStr = DefaultStr> { 25 + ///An album id to unstar. 26 + #[serde(skip_serializing_if = "Option::is_none")] 27 + pub album_id: Option<S>, 28 + ///An artist id to unstar. 29 + #[serde(skip_serializing_if = "Option::is_none")] 30 + pub artist_id: Option<S>, 31 + ///The song id to unstar. 32 + pub id: S, 33 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 34 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 35 + } 36 + 37 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 38 + #[serde( 39 + rename_all = "camelCase", 40 + bound(deserialize = "S: Deserialize<'de> + BosStr") 41 + )] 42 + pub struct UnstarOutput<S: BosStr = DefaultStr> { 43 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 44 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 45 + } 46 + 47 + /** Response marker for the `app.rocksky.library.unstar` procedure. 48 + 49 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `UnstarOutput<S>` for this endpoint.*/ 50 + pub struct UnstarResponse; 51 + impl jacquard_common::xrpc::XrpcResp for UnstarResponse { 52 + const NSID: &'static str = "app.rocksky.library.unstar"; 53 + const ENCODING: &'static str = "application/json"; 54 + type Output<S: BosStr> = UnstarOutput<S>; 55 + type Err = jacquard_common::xrpc::GenericError; 56 + } 57 + 58 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for Unstar<S> { 59 + const NSID: &'static str = "app.rocksky.library.unstar"; 60 + const METHOD: jacquard_common::xrpc::XrpcMethod = 61 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 62 + type Response = UnstarResponse; 63 + } 64 + 65 + /** Endpoint marker for the `app.rocksky.library.unstar` procedure. 66 + 67 + Path: `/xrpc/app.rocksky.library.unstar`. The request payload type is `Unstar<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 68 + pub struct UnstarRequest; 69 + impl jacquard_common::xrpc::XrpcEndpoint for UnstarRequest { 70 + const PATH: &'static str = "/xrpc/app.rocksky.library.unstar"; 71 + const METHOD: jacquard_common::xrpc::XrpcMethod = 72 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 73 + type Request<S: BosStr> = Unstar<S>; 74 + type Response = UnstarResponse; 75 + }
+69
crates/rocksky-sdk/src/app_rocksky/library/update_now_playing.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.updateNowPlaying 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct UpdateNowPlaying<S: BosStr = DefaultStr> { 25 + ///The song id. 26 + pub id: S, 27 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 28 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 29 + } 30 + 31 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 32 + #[serde( 33 + rename_all = "camelCase", 34 + bound(deserialize = "S: Deserialize<'de> + BosStr") 35 + )] 36 + pub struct UpdateNowPlayingOutput<S: BosStr = DefaultStr> { 37 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 38 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 39 + } 40 + 41 + /** Response marker for the `app.rocksky.library.updateNowPlaying` procedure. 42 + 43 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `UpdateNowPlayingOutput<S>` for this endpoint.*/ 44 + pub struct UpdateNowPlayingResponse; 45 + impl jacquard_common::xrpc::XrpcResp for UpdateNowPlayingResponse { 46 + const NSID: &'static str = "app.rocksky.library.updateNowPlaying"; 47 + const ENCODING: &'static str = "application/json"; 48 + type Output<S: BosStr> = UpdateNowPlayingOutput<S>; 49 + type Err = jacquard_common::xrpc::GenericError; 50 + } 51 + 52 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for UpdateNowPlaying<S> { 53 + const NSID: &'static str = "app.rocksky.library.updateNowPlaying"; 54 + const METHOD: jacquard_common::xrpc::XrpcMethod = 55 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 56 + type Response = UpdateNowPlayingResponse; 57 + } 58 + 59 + /** Endpoint marker for the `app.rocksky.library.updateNowPlaying` procedure. 60 + 61 + Path: `/xrpc/app.rocksky.library.updateNowPlaying`. The request payload type is `UpdateNowPlaying<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 62 + pub struct UpdateNowPlayingRequest; 63 + impl jacquard_common::xrpc::XrpcEndpoint for UpdateNowPlayingRequest { 64 + const PATH: &'static str = "/xrpc/app.rocksky.library.updateNowPlaying"; 65 + const METHOD: jacquard_common::xrpc::XrpcMethod = 66 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 67 + type Request<S: BosStr> = UpdateNowPlaying<S>; 68 + type Response = UpdateNowPlayingResponse; 69 + }
+81
crates/rocksky-sdk/src/app_rocksky/library/update_playlist.rs
··· 1 + // @generated by jacquard-lexicon. DO NOT EDIT. 2 + // 3 + // Lexicon: app.rocksky.library.updatePlaylist 4 + // 5 + // This file was automatically generated from Lexicon schemas. 6 + // Any manual changes will be overwritten on the next regeneration. 7 + 8 + #[allow(unused_imports)] 9 + use alloc::collections::BTreeMap; 10 + 11 + #[allow(unused_imports)] 12 + use core::marker::PhantomData; 13 + use jacquard_common::deps::smol_str::SmolStr; 14 + use jacquard_common::types::value::Data; 15 + use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr}; 16 + use jacquard_derive::IntoStatic; 17 + use serde::{Deserialize, Serialize}; 18 + 19 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 20 + #[serde( 21 + rename_all = "camelCase", 22 + bound(deserialize = "S: Deserialize<'de> + BosStr") 23 + )] 24 + pub struct UpdatePlaylist<S: BosStr = DefaultStr> { 25 + ///New playlist comment. 26 + #[serde(skip_serializing_if = "Option::is_none")] 27 + pub comment: Option<S>, 28 + ///New playlist name. 29 + #[serde(skip_serializing_if = "Option::is_none")] 30 + pub name: Option<S>, 31 + ///The playlist id to update. 32 + pub playlist_id: S, 33 + ///A song id to add to the playlist. 34 + #[serde(skip_serializing_if = "Option::is_none")] 35 + pub song_id_to_add: Option<S>, 36 + ///A track index to remove from the playlist. 37 + #[serde(skip_serializing_if = "Option::is_none")] 38 + pub song_index_to_remove: Option<i64>, 39 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 40 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 41 + } 42 + 43 + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] 44 + #[serde( 45 + rename_all = "camelCase", 46 + bound(deserialize = "S: Deserialize<'de> + BosStr") 47 + )] 48 + pub struct UpdatePlaylistOutput<S: BosStr = DefaultStr> { 49 + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] 50 + pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>, 51 + } 52 + 53 + /** Response marker for the `app.rocksky.library.updatePlaylist` procedure. 54 + 55 + Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `UpdatePlaylistOutput<S>` for this endpoint.*/ 56 + pub struct UpdatePlaylistResponse; 57 + impl jacquard_common::xrpc::XrpcResp for UpdatePlaylistResponse { 58 + const NSID: &'static str = "app.rocksky.library.updatePlaylist"; 59 + const ENCODING: &'static str = "application/json"; 60 + type Output<S: BosStr> = UpdatePlaylistOutput<S>; 61 + type Err = jacquard_common::xrpc::GenericError; 62 + } 63 + 64 + impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for UpdatePlaylist<S> { 65 + const NSID: &'static str = "app.rocksky.library.updatePlaylist"; 66 + const METHOD: jacquard_common::xrpc::XrpcMethod = 67 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 68 + type Response = UpdatePlaylistResponse; 69 + } 70 + 71 + /** Endpoint marker for the `app.rocksky.library.updatePlaylist` procedure. 72 + 73 + Path: `/xrpc/app.rocksky.library.updatePlaylist`. The request payload type is `UpdatePlaylist<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/ 74 + pub struct UpdatePlaylistRequest; 75 + impl jacquard_common::xrpc::XrpcEndpoint for UpdatePlaylistRequest { 76 + const PATH: &'static str = "/xrpc/app.rocksky.library.updatePlaylist"; 77 + const METHOD: jacquard_common::xrpc::XrpcMethod = 78 + jacquard_common::xrpc::XrpcMethod::Procedure("application/json"); 79 + type Request<S: BosStr> = UpdatePlaylist<S>; 80 + type Response = UpdatePlaylistResponse; 81 + }
+486 -84
sdk/go/rocksky/gen/types.go
··· 124 124 Shuffle bool `json:"shuffle,omitempty"` 125 125 } 126 126 127 + type AlbumGetAlbumParams struct { 128 + // The URI of the album to retrieve. 129 + URI string `json:"uri,omitempty"` 130 + } 131 + 127 132 type AlbumRecord struct { 128 133 // The title of the album. 129 134 Title string `json:"title,omitempty"` ··· 218 223 CreatedAt string `json:"createdAt,omitempty"` 219 224 } 220 225 226 + type ArtistGetArtistParams struct { 227 + // The URI of the artist to retrieve details from 228 + URI string `json:"uri,omitempty"` 229 + } 230 + 231 + type ArtistGetArtistsOutput struct { 232 + Artists []ArtistViewBasic `json:"artists,omitempty"` 233 + } 234 + 235 + type ArtistGetArtistsParams struct { 236 + // The maximum number of artists to return 237 + Limit int `json:"limit,omitempty"` 238 + // The offset for pagination 239 + Offset int `json:"offset,omitempty"` 240 + // The names of the artists to return 241 + Names string `json:"names,omitempty"` 242 + // The genre to filter artists by 243 + Genre string `json:"genre,omitempty"` 244 + } 245 + 221 246 type ArtistListenerViewBasic struct { 222 247 // The unique identifier of the actor. 223 248 ID string `json:"id,omitempty"` ··· 344 369 Description string `json:"description,omitempty"` 345 370 } 346 371 347 - type CreatePlaylistParams struct { 348 - // The name of the playlist 349 - Name string `json:"name,omitempty"` 350 - // A brief description of the playlist 351 - Description string `json:"description,omitempty"` 352 - } 353 - 354 372 type CreateScrobbleInput struct { 355 373 // The title of the track being scrobbled 356 374 Title string `json:"title,omitempty"` ··· 434 452 Lyrics string `json:"lyrics,omitempty"` 435 453 } 436 454 455 + type DeleteAlbumInput struct { 456 + // The album id (album xata_id, as exposed by the library API). 457 + ID string `json:"id,omitempty"` 458 + } 459 + 460 + type DeleteAlbumOutput struct { 461 + // Always "ok" on success. 462 + Status string `json:"status,omitempty"` 463 + // Number of uploads deleted for the album. 464 + Deleted int `json:"deleted,omitempty"` 465 + } 466 + 467 + type DeletePlaylistInput struct { 468 + // The playlist id to delete. 469 + ID string `json:"id,omitempty"` 470 + } 471 + 472 + type DeletePlaylistOutput struct { 473 + } 474 + 475 + type DeleteSongInput struct { 476 + // The song id (track xata_id, as exposed by the library API). 477 + ID string `json:"id,omitempty"` 478 + } 479 + 480 + type DeleteSongOutput struct { 481 + // Always "ok" on success. 482 + Status string `json:"status,omitempty"` 483 + // Number of uploads deleted (0 or 1). 484 + Deleted int `json:"deleted,omitempty"` 485 + } 486 + 437 487 type DescribeFeedGeneratorOutput struct { 438 488 // The DID of the feed generator. 439 489 DID string `json:"did,omitempty"` ··· 454 504 URI string `json:"uri,omitempty"` 455 505 } 456 506 457 - type DownloadFileParams struct { 507 + type DropboxDownloadFileParams struct { 458 508 // The unique identifier of the file to download 459 509 FileID string `json:"fileId,omitempty"` 460 510 } ··· 477 527 ClientModified string `json:"clientModified,omitempty"` 478 528 // The last modified date and time of the file on the server. 479 529 ServerModified string `json:"serverModified,omitempty"` 530 + } 531 + 532 + type DropboxGetFilesParams struct { 533 + // Path to the Dropbox folder or root directory 534 + At string `json:"at,omitempty"` 480 535 } 481 536 482 537 type DropboxTemporaryLinkView struct { ··· 555 610 Source string `json:"source,omitempty"` 556 611 } 557 612 613 + type FeedSearchParams struct { 614 + // The search query string 615 + Query string `json:"query,omitempty"` 616 + } 617 + 558 618 type FeedSearchResultsView struct { 559 619 Hits []any `json:"hits,omitempty"` 560 620 ProcessingTimeMS int `json:"processingTimeMs,omitempty"` ··· 729 789 EndDate string `json:"endDate,omitempty"` 730 790 } 731 791 732 - type GetAlbumParams struct { 733 - // The URI of the album to retrieve. 734 - URI string `json:"uri,omitempty"` 792 + type GetAlbumInfoOutput struct { 793 + } 794 + 795 + type GetAlbumInfoParams struct { 796 + // The album id 797 + ID string `json:"id,omitempty"` 798 + } 799 + 800 + type GetAlbumListOutput struct { 801 + } 802 + 803 + type GetAlbumListParams struct { 804 + // List type: newest, alphabeticalByName, alphabeticalByArtist, random, recent, byYear, byGenre, starred. 805 + Type string `json:"type,omitempty"` 806 + // Number of albums to return (max 500). 807 + Size int `json:"size,omitempty"` 808 + // Offset for pagination. 809 + Offset int `json:"offset,omitempty"` 810 + // First year in a byYear range. 811 + FromYear int `json:"fromYear,omitempty"` 812 + // Last year in a byYear range. 813 + ToYear int `json:"toYear,omitempty"` 814 + // Genre name when type is byGenre. 815 + Genre string `json:"genre,omitempty"` 735 816 } 736 817 737 818 type GetAlbumRecommendationsParams struct { ··· 795 876 URI string `json:"uri,omitempty"` 796 877 } 797 878 879 + type GetArtistInfoOutput struct { 880 + } 881 + 882 + type GetArtistInfoParams struct { 883 + // The artist id 884 + ID string `json:"id,omitempty"` 885 + } 886 + 798 887 type GetArtistListenersOutput struct { 799 888 Listeners []ArtistListenerViewBasic `json:"listeners,omitempty"` 800 889 } ··· 806 895 Offset int `json:"offset,omitempty"` 807 896 // Maximum number of results to return 808 897 Limit int `json:"limit,omitempty"` 809 - } 810 - 811 - type GetArtistParams struct { 812 - // The URI of the artist to retrieve details from 813 - URI string `json:"uri,omitempty"` 814 898 } 815 899 816 900 type GetArtistRecentListenersOutput struct { ··· 845 929 Offset int `json:"offset,omitempty"` 846 930 } 847 931 848 - type GetArtistsOutput struct { 849 - Artists []ArtistViewBasic `json:"artists,omitempty"` 850 - } 851 - 852 - type GetArtistsParams struct { 853 - // The maximum number of artists to return 854 - Limit int `json:"limit,omitempty"` 855 - // The offset for pagination 856 - Offset int `json:"offset,omitempty"` 857 - // The names of the artists to return 858 - Names string `json:"names,omitempty"` 859 - // The genre to filter artists by 860 - Genre string `json:"genre,omitempty"` 861 - } 862 - 863 932 type GetArtistTracksOutput struct { 864 933 Tracks []SongViewBasic `json:"tracks,omitempty"` 865 934 } ··· 878 947 DID string `json:"did,omitempty"` 879 948 } 880 949 881 - type GetCurrentlyPlayingParams struct { 882 - PlayerID string `json:"playerId,omitempty"` 883 - // Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. 884 - Actor string `json:"actor,omitempty"` 950 + type GetCoverArtUrlOutput struct { 951 + // The resolved media or cover-art URL. 952 + URL string `json:"url,omitempty"` 953 + } 954 + 955 + type GetCoverArtUrlParams struct { 956 + // The cover-art id (album, artist or song). 957 + ID string `json:"id,omitempty"` 958 + // Requested square size in pixels. 959 + Size int `json:"size,omitempty"` 960 + } 961 + 962 + type GetDownloadUrlOutput struct { 963 + // The resolved media or cover-art URL. 964 + URL string `json:"url,omitempty"` 965 + } 966 + 967 + type GetDownloadUrlParams struct { 968 + // The song id. 969 + ID string `json:"id,omitempty"` 885 970 } 886 971 887 972 type GetFeedGeneratorOutput struct { ··· 929 1014 FileID string `json:"fileId,omitempty"` 930 1015 } 931 1016 932 - type GetFilesParams struct { 933 - // Path to the Dropbox folder or root directory 934 - At string `json:"at,omitempty"` 935 - } 936 - 937 1017 type GetFollowersOutput struct { 938 1018 Subject *ActorProfileViewBasic `json:"subject,omitempty"` 939 1019 Followers []ActorProfileViewBasic `json:"followers,omitempty"` ··· 968 1048 Cursor string `json:"cursor,omitempty"` 969 1049 } 970 1050 1051 + type GetGenresOutput struct { 1052 + } 1053 + 1054 + type GetGenresParams struct { 1055 + } 1056 + 971 1057 type GetGlobalStatsParams struct { 972 1058 } 973 1059 1060 + type GetIndexesOutput struct { 1061 + } 1062 + 1063 + type GetIndexesParams struct { 1064 + } 1065 + 1066 + type GetInternetRadioStationsOutput struct { 1067 + } 1068 + 1069 + type GetInternetRadioStationsParams struct { 1070 + } 1071 + 974 1072 type GetKnownFollowersOutput struct { 975 1073 Subject *ActorProfileViewBasic `json:"subject,omitempty"` 976 1074 Followers []ActorProfileViewBasic `json:"followers,omitempty"` ··· 984 1082 Cursor string `json:"cursor,omitempty"` 985 1083 } 986 1084 1085 + type GetLicenseOutput struct { 1086 + } 1087 + 1088 + type GetLicenseParams struct { 1089 + } 1090 + 1091 + type GetLyricsOutput struct { 1092 + } 1093 + 1094 + type GetLyricsParams struct { 1095 + // The artist name. 1096 + Artist string `json:"artist,omitempty"` 1097 + // The song title. 1098 + Title string `json:"title,omitempty"` 1099 + } 1100 + 987 1101 type GetMetadataParams struct { 988 1102 // Path to the file or folder in Dropbox 989 1103 Path string `json:"path,omitempty"` ··· 996 1110 type GetMirrorSourcesParams struct { 997 1111 } 998 1112 999 - type GetPlaybackQueueParams struct { 1000 - PlayerID string `json:"playerId,omitempty"` 1113 + type GetMusicDirectoryOutput struct { 1001 1114 } 1002 1115 1003 - type GetPlaylistParams struct { 1004 - // The URI of the playlist to retrieve. 1005 - URI string `json:"uri,omitempty"` 1116 + type GetMusicDirectoryParams struct { 1117 + // The directory id 1118 + ID string `json:"id,omitempty"` 1006 1119 } 1007 1120 1008 - type GetPlaylistsOutput struct { 1009 - Playlists []PlaylistViewBasic `json:"playlists,omitempty"` 1121 + type GetMusicFoldersOutput struct { 1010 1122 } 1011 1123 1012 - type GetPlaylistsParams struct { 1013 - // The maximum number of playlists to return. 1014 - Limit int `json:"limit,omitempty"` 1015 - // The offset for pagination, used to skip a number of playlists. 1016 - Offset int `json:"offset,omitempty"` 1124 + type GetMusicFoldersParams struct { 1125 + } 1126 + 1127 + type GetNowPlayingOutput struct { 1128 + } 1129 + 1130 + type GetNowPlayingParams struct { 1131 + } 1132 + 1133 + type GetPlaybackQueueParams struct { 1134 + PlayerID string `json:"playerId,omitempty"` 1135 + } 1136 + 1137 + type GetPlayQueueOutput struct { 1138 + } 1139 + 1140 + type GetPlayQueueParams struct { 1017 1141 } 1018 1142 1019 1143 type GetProfileParams struct { ··· 1034 1158 Limit int `json:"limit,omitempty"` 1035 1159 } 1036 1160 1161 + type GetRandomSongsOutput struct { 1162 + } 1163 + 1164 + type GetRandomSongsParams struct { 1165 + // Number of songs to return (max 500). 1166 + Size int `json:"size,omitempty"` 1167 + // Only return songs in this genre. 1168 + Genre string `json:"genre,omitempty"` 1169 + // Only return songs published after or in this year. 1170 + FromYear int `json:"fromYear,omitempty"` 1171 + // Only return songs published before or in this year. 1172 + ToYear int `json:"toYear,omitempty"` 1173 + } 1174 + 1037 1175 type GetRecommendationsParams struct { 1038 1176 // DID or handle of the user to recommend for. 1039 1177 DID string `json:"did,omitempty"` 1040 1178 Limit int `json:"limit,omitempty"` 1179 + } 1180 + 1181 + type GetScanStatusOutput struct { 1182 + } 1183 + 1184 + type GetScanStatusParams struct { 1041 1185 } 1042 1186 1043 1187 type GetScrobbleParams struct { ··· 1090 1234 Offset int `json:"offset,omitempty"` 1091 1235 } 1092 1236 1093 - type GetSongParams struct { 1094 - // The AT-URI of the song to retrieve 1095 - URI string `json:"uri,omitempty"` 1096 - // The MusicBrainz ID of the song to retrieve 1097 - MBID string `json:"mbid,omitempty"` 1098 - // The International Standard Recording Code (ISRC) of the song to retrieve 1099 - ISRC string `json:"isrc,omitempty"` 1100 - // The Spotify track ID of the song to retrieve (resolved internally to the Spotify track URL) 1101 - SpotifyID string `json:"spotifyId,omitempty"` 1237 + type GetSimilarSongsOutput struct { 1238 + } 1239 + 1240 + type GetSimilarSongsParams struct { 1241 + // The artist, album or song id 1242 + ID string `json:"id,omitempty"` 1243 + // Number of songs to return. 1244 + Count int `json:"count,omitempty"` 1102 1245 } 1103 1246 1104 1247 type GetSongRecentListenersOutput struct { ··· 1114 1257 Limit int `json:"limit,omitempty"` 1115 1258 } 1116 1259 1260 + type GetSongsByGenreOutput struct { 1261 + } 1262 + 1263 + type GetSongsByGenreParams struct { 1264 + // The genre name. 1265 + Genre string `json:"genre,omitempty"` 1266 + // Number of songs to return (max 500). 1267 + Count int `json:"count,omitempty"` 1268 + // Offset for pagination. 1269 + Offset int `json:"offset,omitempty"` 1270 + } 1271 + 1117 1272 type GetSongsOutput struct { 1118 1273 Songs []SongViewBasic `json:"songs,omitempty"` 1119 1274 } ··· 1133 1288 SpotifyID string `json:"spotifyId,omitempty"` 1134 1289 } 1135 1290 1291 + type GetStarredOutput struct { 1292 + } 1293 + 1294 + type GetStarredParams struct { 1295 + } 1296 + 1136 1297 type GetStatsParams struct { 1137 1298 // The DID or handle of the user to get stats for. 1138 1299 DID string `json:"did,omitempty"` ··· 1147 1308 Following bool `json:"following,omitempty"` 1148 1309 } 1149 1310 1311 + type GetStreamUrlOutput struct { 1312 + // The resolved media or cover-art URL. 1313 + URL string `json:"url,omitempty"` 1314 + } 1315 + 1316 + type GetStreamUrlParams struct { 1317 + // The song id. 1318 + ID string `json:"id,omitempty"` 1319 + // Maximum bitrate (kbps); 0 means no limit. 1320 + MaxBitRate int `json:"maxBitRate,omitempty"` 1321 + // Preferred transcode format. 1322 + Format string `json:"format,omitempty"` 1323 + } 1324 + 1150 1325 type GetTemporaryLinkParams struct { 1151 1326 // Path to the file in Dropbox 1152 1327 Path string `json:"path,omitempty"` ··· 1167 1342 EndDate string `json:"endDate,omitempty"` 1168 1343 } 1169 1344 1345 + type GetTopSongsOutput struct { 1346 + } 1347 + 1348 + type GetTopSongsParams struct { 1349 + // The artist name. 1350 + Artist string `json:"artist,omitempty"` 1351 + // Number of songs to return. 1352 + Count int `json:"count,omitempty"` 1353 + } 1354 + 1170 1355 type GetTopTracksOutput struct { 1171 1356 Tracks []SongViewBasic `json:"tracks,omitempty"` 1172 1357 } ··· 1191 1376 URI string `json:"uri,omitempty"` 1192 1377 } 1193 1378 1379 + type GetUserOutput struct { 1380 + } 1381 + 1382 + type GetUserParams struct { 1383 + } 1384 + 1194 1385 type GetWrappedParams struct { 1195 1386 // The DID or handle of the user 1196 1387 DID string `json:"did,omitempty"` ··· 1198 1389 Year int `json:"year,omitempty"` 1199 1390 } 1200 1391 1392 + type GoogledriveDownloadFileParams struct { 1393 + // The unique identifier of the file to download 1394 + FileID string `json:"fileId,omitempty"` 1395 + } 1396 + 1201 1397 type GoogledriveFileListView struct { 1202 1398 Files []GoogledriveFileView `json:"files,omitempty"` 1203 1399 } ··· 1207 1403 ID string `json:"id,omitempty"` 1208 1404 } 1209 1405 1406 + type GoogledriveGetFilesParams struct { 1407 + // Path to the Google Drive folder or root directory 1408 + At string `json:"at,omitempty"` 1409 + } 1410 + 1210 1411 // GraphNotFoundActor indicates that a handle or DID could not be resolved 1211 1412 type GraphNotFoundActor struct { 1212 1413 Actor string `json:"actor,omitempty"` ··· 1238 1439 Position int `json:"position,omitempty"` 1239 1440 } 1240 1441 1442 + type LibraryCreatePlaylistInput struct { 1443 + // The playlist name. 1444 + Name string `json:"name,omitempty"` 1445 + } 1446 + 1447 + type LibraryCreatePlaylistOutput struct { 1448 + } 1449 + 1450 + type LibraryGetAlbumOutput struct { 1451 + } 1452 + 1453 + type LibraryGetAlbumParams struct { 1454 + // The album id 1455 + ID string `json:"id,omitempty"` 1456 + } 1457 + 1458 + type LibraryGetArtistOutput struct { 1459 + } 1460 + 1461 + type LibraryGetArtistParams struct { 1462 + // The artist id 1463 + ID string `json:"id,omitempty"` 1464 + } 1465 + 1466 + type LibraryGetArtistsOutput struct { 1467 + } 1468 + 1469 + type LibraryGetArtistsParams struct { 1470 + } 1471 + 1472 + type LibraryGetPlaylistOutput struct { 1473 + } 1474 + 1475 + type LibraryGetPlaylistParams struct { 1476 + // The playlist id 1477 + ID string `json:"id,omitempty"` 1478 + } 1479 + 1480 + type LibraryGetPlaylistsOutput struct { 1481 + } 1482 + 1483 + type LibraryGetPlaylistsParams struct { 1484 + } 1485 + 1486 + type LibraryGetSongOutput struct { 1487 + } 1488 + 1489 + type LibraryGetSongParams struct { 1490 + // The song id 1491 + ID string `json:"id,omitempty"` 1492 + } 1493 + 1494 + type LibrarySearchOutput struct { 1495 + } 1496 + 1497 + type LibrarySearchParams struct { 1498 + // The search query. 1499 + Query string `json:"query,omitempty"` 1500 + // Maximum number of artists to return. 1501 + ArtistCount int `json:"artistCount,omitempty"` 1502 + // Artist result offset. 1503 + ArtistOffset int `json:"artistOffset,omitempty"` 1504 + // Maximum number of albums to return. 1505 + AlbumCount int `json:"albumCount,omitempty"` 1506 + // Album result offset. 1507 + AlbumOffset int `json:"albumOffset,omitempty"` 1508 + // Maximum number of songs to return. 1509 + SongCount int `json:"songCount,omitempty"` 1510 + // Song result offset. 1511 + SongOffset int `json:"songOffset,omitempty"` 1512 + } 1513 + 1241 1514 type LikeRecord struct { 1242 1515 // The date when the like was created. 1243 1516 CreatedAt string `json:"createdAt,omitempty"` ··· 1280 1553 LastScrobbleSeenAt string `json:"lastScrobbleSeenAt,omitempty"` 1281 1554 } 1282 1555 1283 - type NextParams struct { 1284 - PlayerID string `json:"playerId,omitempty"` 1556 + type PingOutput struct { 1285 1557 } 1286 1558 1287 - type PauseParams struct { 1288 - PlayerID string `json:"playerId,omitempty"` 1559 + type PingParams struct { 1289 1560 } 1290 1561 1291 1562 type PlayDirectoryParams struct { ··· 1301 1572 Title string `json:"title,omitempty"` 1302 1573 } 1303 1574 1575 + type PlayerGetCurrentlyPlayingParams struct { 1576 + PlayerID string `json:"playerId,omitempty"` 1577 + // Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. 1578 + Actor string `json:"actor,omitempty"` 1579 + } 1580 + 1581 + type PlayerNextParams struct { 1582 + PlayerID string `json:"playerId,omitempty"` 1583 + } 1584 + 1585 + type PlayerPauseParams struct { 1586 + PlayerID string `json:"playerId,omitempty"` 1587 + } 1588 + 1304 1589 type PlayerPlaybackQueueViewDetailed struct { 1305 1590 Tracks []SongViewBasic `json:"tracks,omitempty"` 1306 1591 } 1307 1592 1593 + type PlayerPlayParams struct { 1594 + PlayerID string `json:"playerId,omitempty"` 1595 + } 1596 + 1597 + type PlayerPreviousParams struct { 1598 + PlayerID string `json:"playerId,omitempty"` 1599 + } 1600 + 1601 + type PlayerSeekParams struct { 1602 + PlayerID string `json:"playerId,omitempty"` 1603 + // The position in seconds to seek to 1604 + Position int `json:"position,omitempty"` 1605 + } 1606 + 1308 1607 type PlayFileParams struct { 1309 1608 PlayerID string `json:"playerId,omitempty"` 1310 1609 FileID string `json:"fileId,omitempty"` 1610 + } 1611 + 1612 + type PlaylistCreatePlaylistParams struct { 1613 + // The name of the playlist 1614 + Name string `json:"name,omitempty"` 1615 + // A brief description of the playlist 1616 + Description string `json:"description,omitempty"` 1617 + } 1618 + 1619 + type PlaylistGetPlaylistParams struct { 1620 + // The URI of the playlist to retrieve. 1621 + URI string `json:"uri,omitempty"` 1622 + } 1623 + 1624 + type PlaylistGetPlaylistsOutput struct { 1625 + Playlists []PlaylistViewBasic `json:"playlists,omitempty"` 1626 + } 1627 + 1628 + type PlaylistGetPlaylistsParams struct { 1629 + // The maximum number of playlists to return. 1630 + Limit int `json:"limit,omitempty"` 1631 + // The offset for pagination, used to skip a number of playlists. 1632 + Offset int `json:"offset,omitempty"` 1311 1633 } 1312 1634 1313 1635 type PlaylistItemRecord struct { ··· 1390 1712 CreatedAt string `json:"createdAt,omitempty"` 1391 1713 // A list of tracks in the playlist. 1392 1714 Tracks []SongViewBasic `json:"tracks,omitempty"` 1393 - } 1394 - 1395 - type PlayParams struct { 1396 - PlayerID string `json:"playerId,omitempty"` 1397 - } 1398 - 1399 - type PreviousParams struct { 1400 - PlayerID string `json:"playerId,omitempty"` 1401 1715 } 1402 1716 1403 1717 type ProfileRecord struct { ··· 1587 1901 Channels string `json:"channels,omitempty"` 1588 1902 } 1589 1903 1904 + type SavePlayQueueInput struct { 1905 + // Comma-separated song ids in the queue. 1906 + ID string `json:"id,omitempty"` 1907 + // The id of the currently playing song. 1908 + Current string `json:"current,omitempty"` 1909 + // Position within the current song, in milliseconds. 1910 + Position int `json:"position,omitempty"` 1911 + } 1912 + 1913 + type SavePlayQueueOutput struct { 1914 + } 1915 + 1590 1916 type ScrobbleFirstScrobbleView struct { 1591 1917 // The handle of the user who first scrobbled this song. 1592 1918 Handle string `json:"handle,omitempty"` ··· 1594 1920 Avatar string `json:"avatar,omitempty"` 1595 1921 // The timestamp of the first scrobble. 1596 1922 Timestamp string `json:"timestamp,omitempty"` 1923 + } 1924 + 1925 + type ScrobbleInput struct { 1926 + // The song id. 1927 + ID string `json:"id,omitempty"` 1928 + // Play time as a Unix timestamp in milliseconds. 1929 + Time int `json:"time,omitempty"` 1930 + // True for a final submission, false for a now-playing update. 1931 + Submission bool `json:"submission,omitempty"` 1932 + } 1933 + 1934 + type ScrobbleOutput struct { 1597 1935 } 1598 1936 1599 1937 type ScrobbleRecord struct { ··· 1722 2060 FirstScrobble *ScrobbleFirstScrobbleView `json:"firstScrobble,omitempty"` 1723 2061 } 1724 2062 1725 - type SearchParams struct { 1726 - // The search query string 1727 - Query string `json:"query,omitempty"` 1728 - } 1729 - 1730 - type SeekParams struct { 1731 - PlayerID string `json:"playerId,omitempty"` 1732 - // The position in seconds to seek to 1733 - Position int `json:"position,omitempty"` 1734 - } 1735 - 1736 2063 type SettingsRecord struct { 1737 2064 // Crossfade settings 1738 2065 Crossfade *RockboxCrossfadeSettings `json:"crossfade,omitempty"` ··· 1792 2119 Timestamp string `json:"timestamp,omitempty"` 1793 2120 } 1794 2121 2122 + type SongGetSongParams struct { 2123 + // The AT-URI of the song to retrieve 2124 + URI string `json:"uri,omitempty"` 2125 + // The MusicBrainz ID of the song to retrieve 2126 + MBID string `json:"mbid,omitempty"` 2127 + // The International Standard Recording Code (ISRC) of the song to retrieve 2128 + ISRC string `json:"isrc,omitempty"` 2129 + // The Spotify track ID of the song to retrieve (resolved internally to the Spotify track URL) 2130 + SpotifyID string `json:"spotifyId,omitempty"` 2131 + } 2132 + 1795 2133 type SongRecentListenerView struct { 1796 2134 // The unique identifier of the listener. 1797 2135 ID string `json:"id,omitempty"` ··· 1947 2285 FirstScrobble *SongFirstScrobbleView `json:"firstScrobble,omitempty"` 1948 2286 } 1949 2287 2288 + type SpotifyGetCurrentlyPlayingParams struct { 2289 + // Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. 2290 + Actor string `json:"actor,omitempty"` 2291 + } 2292 + 2293 + type SpotifySeekParams struct { 2294 + // The position in seconds to seek to 2295 + Position int `json:"position,omitempty"` 2296 + } 2297 + 1950 2298 type SpotifyTrackView struct { 1951 2299 // The unique identifier of the Spotify track. 1952 2300 ID string `json:"id,omitempty"` ··· 1962 2310 PreviewURL string `json:"previewUrl,omitempty"` 1963 2311 } 1964 2312 2313 + type StarInput struct { 2314 + // The song id to star. 2315 + ID string `json:"id,omitempty"` 2316 + // An album id to star. 2317 + AlbumID string `json:"albumId,omitempty"` 2318 + // An artist id to star. 2319 + ArtistID string `json:"artistId,omitempty"` 2320 + } 2321 + 2322 + type StarOutput struct { 2323 + } 2324 + 1965 2325 type StartPlaylistParams struct { 1966 2326 // The URI of the playlist to start 1967 2327 URI string `json:"uri,omitempty"` ··· 1969 2329 Shuffle bool `json:"shuffle,omitempty"` 1970 2330 // The position in the playlist to start from, if not specified, starts from the beginning 1971 2331 Position int `json:"position,omitempty"` 2332 + } 2333 + 2334 + type StartScanOutput struct { 2335 + } 2336 + 2337 + type StartScanParams struct { 1972 2338 } 1973 2339 1974 2340 type StatsGlobalStatsView struct { ··· 2132 2498 Account string `json:"account,omitempty"` 2133 2499 } 2134 2500 2501 + type UnstarInput struct { 2502 + // The song id to unstar. 2503 + ID string `json:"id,omitempty"` 2504 + // An album id to unstar. 2505 + AlbumID string `json:"albumId,omitempty"` 2506 + // An artist id to unstar. 2507 + ArtistID string `json:"artistId,omitempty"` 2508 + } 2509 + 2510 + type UnstarOutput struct { 2511 + } 2512 + 2135 2513 type UpdateApikeyInput struct { 2136 2514 // The ID of the API key to update. 2137 2515 ID string `json:"id,omitempty"` ··· 2140 2518 // A new description for the API key. 2141 2519 Description string `json:"description,omitempty"` 2142 2520 } 2521 + 2522 + type UpdateNowPlayingInput struct { 2523 + // The song id. 2524 + ID string `json:"id,omitempty"` 2525 + } 2526 + 2527 + type UpdateNowPlayingOutput struct { 2528 + } 2529 + 2530 + type UpdatePlaylistInput struct { 2531 + // The playlist id to update. 2532 + PlaylistID string `json:"playlistId,omitempty"` 2533 + // New playlist name. 2534 + Name string `json:"name,omitempty"` 2535 + // New playlist comment. 2536 + Comment string `json:"comment,omitempty"` 2537 + // A song id to add to the playlist. 2538 + SongIDToAdd string `json:"songIdToAdd,omitempty"` 2539 + // A track index to remove from the playlist. 2540 + SongIndexToRemove int `json:"songIndexToRemove,omitempty"` 2541 + } 2542 + 2543 + type UpdatePlaylistOutput struct { 2544 + }
+578 -85
sdk/typescript/src/generated/types.ts
··· 124 124 shuffle?: boolean; 125 125 } 126 126 127 + export interface AlbumGetAlbumParams { 128 + /** The URI of the album to retrieve. */ 129 + uri: AtUri; 130 + } 131 + 127 132 export interface AlbumRecord { 128 133 /** The title of the album. */ 129 134 title: string; ··· 218 223 createdAt?: DateTime; 219 224 } 220 225 226 + export interface ArtistGetArtistParams { 227 + /** The URI of the artist to retrieve details from */ 228 + uri: AtUri; 229 + } 230 + 231 + export interface ArtistGetArtistsOutput { 232 + artists?: ArtistViewBasic[]; 233 + } 234 + 235 + export interface ArtistGetArtistsParams { 236 + /** The maximum number of artists to return */ 237 + limit?: number; 238 + /** The offset for pagination */ 239 + offset?: number; 240 + /** The names of the artists to return */ 241 + names?: string; 242 + /** The genre to filter artists by */ 243 + genre?: string; 244 + } 245 + 221 246 export interface ArtistListenerViewBasic { 222 247 /** The unique identifier of the actor. */ 223 248 id?: string; ··· 344 369 description?: string; 345 370 } 346 371 347 - export interface CreatePlaylistParams { 348 - /** The name of the playlist */ 349 - name: string; 350 - /** A brief description of the playlist */ 351 - description?: string; 352 - } 353 - 354 372 export interface CreateScrobbleInput { 355 373 /** The title of the track being scrobbled */ 356 374 title: string; ··· 434 452 lyrics?: string; 435 453 } 436 454 455 + export interface DeleteAlbumInput { 456 + /** The album id (album xata_id, as exposed by the library API). */ 457 + id: string; 458 + } 459 + 460 + export interface DeleteAlbumOutput { 461 + /** Always "ok" on success. */ 462 + status: string; 463 + /** Number of uploads deleted for the album. */ 464 + deleted: number; 465 + } 466 + 467 + export interface DeletePlaylistInput { 468 + /** The playlist id to delete. */ 469 + id: string; 470 + } 471 + 472 + export interface DeletePlaylistOutput { 473 + 474 + } 475 + 476 + export interface DeleteSongInput { 477 + /** The song id (track xata_id, as exposed by the library API). */ 478 + id: string; 479 + } 480 + 481 + export interface DeleteSongOutput { 482 + /** Always "ok" on success. */ 483 + status: string; 484 + /** Number of uploads deleted (0 or 1). */ 485 + deleted: number; 486 + } 487 + 437 488 export interface DescribeFeedGeneratorOutput { 438 489 /** The DID of the feed generator. */ 439 490 did?: AtIdentifier; ··· 455 506 uri?: AtUri; 456 507 } 457 508 458 - export interface DownloadFileParams { 509 + export interface DropboxDownloadFileParams { 459 510 /** The unique identifier of the file to download */ 460 511 fileId: string; 461 512 } ··· 478 529 clientModified?: DateTime; 479 530 /** The last modified date and time of the file on the server. */ 480 531 serverModified?: DateTime; 532 + } 533 + 534 + export interface DropboxGetFilesParams { 535 + /** Path to the Dropbox folder or root directory */ 536 + at?: string; 481 537 } 482 538 483 539 export interface DropboxTemporaryLinkView { ··· 554 610 recommendationScore?: number; 555 611 /** neighbour | social | serendipity */ 556 612 source?: string; 613 + } 614 + 615 + export interface FeedSearchParams { 616 + /** The search query string */ 617 + query: string; 557 618 } 558 619 559 620 export interface FeedSearchResultsView { ··· 730 791 endDate?: DateTime; 731 792 } 732 793 733 - export interface GetAlbumParams { 734 - /** The URI of the album to retrieve. */ 735 - uri: AtUri; 794 + export interface GetAlbumInfoOutput { 795 + 796 + } 797 + 798 + export interface GetAlbumInfoParams { 799 + /** The album id */ 800 + id: string; 801 + } 802 + 803 + export interface GetAlbumListOutput { 804 + 805 + } 806 + 807 + export interface GetAlbumListParams { 808 + /** List type: newest, alphabeticalByName, alphabeticalByArtist, random, recent, byYear, byGenre, starred. */ 809 + type: string; 810 + /** Number of albums to return (max 500). */ 811 + size?: number; 812 + /** Offset for pagination. */ 813 + offset?: number; 814 + /** First year in a byYear range. */ 815 + fromYear?: number; 816 + /** Last year in a byYear range. */ 817 + toYear?: number; 818 + /** Genre name when type is byGenre. */ 819 + genre?: string; 736 820 } 737 821 738 822 export interface GetAlbumRecommendationsParams { ··· 796 880 uri: AtUri; 797 881 } 798 882 883 + export interface GetArtistInfoOutput { 884 + 885 + } 886 + 887 + export interface GetArtistInfoParams { 888 + /** The artist id */ 889 + id: string; 890 + } 891 + 799 892 export interface GetArtistListenersOutput { 800 893 listeners?: ArtistListenerViewBasic[]; 801 894 } ··· 807 900 offset?: number; 808 901 /** Maximum number of results to return */ 809 902 limit?: number; 810 - } 811 - 812 - export interface GetArtistParams { 813 - /** The URI of the artist to retrieve details from */ 814 - uri: AtUri; 815 903 } 816 904 817 905 export interface GetArtistRecentListenersOutput { ··· 846 934 offset?: number; 847 935 } 848 936 849 - export interface GetArtistsOutput { 850 - artists?: ArtistViewBasic[]; 851 - } 852 - 853 - export interface GetArtistsParams { 854 - /** The maximum number of artists to return */ 855 - limit?: number; 856 - /** The offset for pagination */ 857 - offset?: number; 858 - /** The names of the artists to return */ 859 - names?: string; 860 - /** The genre to filter artists by */ 861 - genre?: string; 862 - } 863 - 864 937 export interface GetArtistTracksOutput { 865 938 tracks?: SongViewBasic[]; 866 939 } ··· 879 952 did?: AtIdentifier; 880 953 } 881 954 882 - export interface GetCurrentlyPlayingParams { 883 - playerId?: string; 884 - /** Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. */ 885 - actor?: AtIdentifier; 955 + export interface GetCoverArtUrlOutput { 956 + /** The resolved media or cover-art URL. */ 957 + url: Uri; 958 + } 959 + 960 + export interface GetCoverArtUrlParams { 961 + /** The cover-art id (album, artist or song). */ 962 + id: string; 963 + /** Requested square size in pixels. */ 964 + size?: number; 965 + } 966 + 967 + export interface GetDownloadUrlOutput { 968 + /** The resolved media or cover-art URL. */ 969 + url: Uri; 970 + } 971 + 972 + export interface GetDownloadUrlParams { 973 + /** The song id. */ 974 + id: string; 886 975 } 887 976 888 977 export interface GetFeedGeneratorOutput { ··· 930 1019 fileId: string; 931 1020 } 932 1021 933 - export interface GetFilesParams { 934 - /** Path to the Dropbox folder or root directory */ 935 - at?: string; 936 - } 937 - 938 1022 export interface GetFollowersOutput { 939 1023 subject: ActorProfileViewBasic; 940 1024 followers: ActorProfileViewBasic[]; ··· 969 1053 cursor?: string; 970 1054 } 971 1055 1056 + export interface GetGenresOutput { 1057 + 1058 + } 1059 + 1060 + export interface GetGenresParams { 1061 + 1062 + } 1063 + 972 1064 export interface GetGlobalStatsParams { 973 1065 974 1066 } 975 1067 1068 + export interface GetIndexesOutput { 1069 + 1070 + } 1071 + 1072 + export interface GetIndexesParams { 1073 + 1074 + } 1075 + 1076 + export interface GetInternetRadioStationsOutput { 1077 + 1078 + } 1079 + 1080 + export interface GetInternetRadioStationsParams { 1081 + 1082 + } 1083 + 976 1084 export interface GetKnownFollowersOutput { 977 1085 subject: ActorProfileViewBasic; 978 1086 followers: ActorProfileViewBasic[]; ··· 986 1094 cursor?: string; 987 1095 } 988 1096 1097 + export interface GetLicenseOutput { 1098 + 1099 + } 1100 + 1101 + export interface GetLicenseParams { 1102 + 1103 + } 1104 + 1105 + export interface GetLyricsOutput { 1106 + 1107 + } 1108 + 1109 + export interface GetLyricsParams { 1110 + /** The artist name. */ 1111 + artist?: string; 1112 + /** The song title. */ 1113 + title?: string; 1114 + } 1115 + 989 1116 export interface GetMetadataParams { 990 1117 /** Path to the file or folder in Dropbox */ 991 1118 path: string; ··· 999 1126 1000 1127 } 1001 1128 1129 + export interface GetMusicDirectoryOutput { 1130 + 1131 + } 1132 + 1133 + export interface GetMusicDirectoryParams { 1134 + /** The directory id */ 1135 + id: string; 1136 + } 1137 + 1138 + export interface GetMusicFoldersOutput { 1139 + 1140 + } 1141 + 1142 + export interface GetMusicFoldersParams { 1143 + 1144 + } 1145 + 1146 + export interface GetNowPlayingOutput { 1147 + 1148 + } 1149 + 1150 + export interface GetNowPlayingParams { 1151 + 1152 + } 1153 + 1002 1154 export interface GetPlaybackQueueParams { 1003 1155 playerId?: string; 1004 1156 } 1005 1157 1006 - export interface GetPlaylistParams { 1007 - /** The URI of the playlist to retrieve. */ 1008 - uri: AtUri; 1158 + export interface GetPlayQueueOutput { 1159 + 1009 1160 } 1010 1161 1011 - export interface GetPlaylistsOutput { 1012 - playlists?: PlaylistViewBasic[]; 1013 - } 1162 + export interface GetPlayQueueParams { 1014 1163 1015 - export interface GetPlaylistsParams { 1016 - /** The maximum number of playlists to return. */ 1017 - limit?: number; 1018 - /** The offset for pagination, used to skip a number of playlists. */ 1019 - offset?: number; 1020 1164 } 1021 1165 1022 1166 export interface GetProfileParams { ··· 1037 1181 limit?: number; 1038 1182 } 1039 1183 1184 + export interface GetRandomSongsOutput { 1185 + 1186 + } 1187 + 1188 + export interface GetRandomSongsParams { 1189 + /** Number of songs to return (max 500). */ 1190 + size?: number; 1191 + /** Only return songs in this genre. */ 1192 + genre?: string; 1193 + /** Only return songs published after or in this year. */ 1194 + fromYear?: number; 1195 + /** Only return songs published before or in this year. */ 1196 + toYear?: number; 1197 + } 1198 + 1040 1199 export interface GetRecommendationsParams { 1041 1200 /** DID or handle of the user to recommend for. */ 1042 1201 did: string; 1043 1202 limit?: number; 1203 + } 1204 + 1205 + export interface GetScanStatusOutput { 1206 + 1207 + } 1208 + 1209 + export interface GetScanStatusParams { 1210 + 1044 1211 } 1045 1212 1046 1213 export interface GetScrobbleParams { ··· 1093 1260 offset?: number; 1094 1261 } 1095 1262 1096 - export interface GetSongParams { 1097 - /** The AT-URI of the song to retrieve */ 1098 - uri?: AtUri; 1099 - /** The MusicBrainz ID of the song to retrieve */ 1100 - mbid?: string; 1101 - /** The International Standard Recording Code (ISRC) of the song to retrieve */ 1102 - isrc?: string; 1103 - /** The Spotify track ID of the song to retrieve (resolved internally to the Spotify track URL) */ 1104 - spotifyId?: string; 1263 + export interface GetSimilarSongsOutput { 1264 + 1265 + } 1266 + 1267 + export interface GetSimilarSongsParams { 1268 + /** The artist, album or song id */ 1269 + id: string; 1270 + /** Number of songs to return. */ 1271 + count?: number; 1105 1272 } 1106 1273 1107 1274 export interface GetSongRecentListenersOutput { ··· 1117 1284 limit?: number; 1118 1285 } 1119 1286 1287 + export interface GetSongsByGenreOutput { 1288 + 1289 + } 1290 + 1291 + export interface GetSongsByGenreParams { 1292 + /** The genre name. */ 1293 + genre: string; 1294 + /** Number of songs to return (max 500). */ 1295 + count?: number; 1296 + /** Offset for pagination. */ 1297 + offset?: number; 1298 + } 1299 + 1120 1300 export interface GetSongsOutput { 1121 1301 songs?: SongViewBasic[]; 1122 1302 } ··· 1136 1316 spotifyId?: string; 1137 1317 } 1138 1318 1319 + export interface GetStarredOutput { 1320 + 1321 + } 1322 + 1323 + export interface GetStarredParams { 1324 + 1325 + } 1326 + 1139 1327 export interface GetStatsParams { 1140 1328 /** The DID or handle of the user to get stats for. */ 1141 1329 did: AtIdentifier; ··· 1150 1338 following?: boolean; 1151 1339 } 1152 1340 1341 + export interface GetStreamUrlOutput { 1342 + /** The resolved media or cover-art URL. */ 1343 + url: Uri; 1344 + } 1345 + 1346 + export interface GetStreamUrlParams { 1347 + /** The song id. */ 1348 + id: string; 1349 + /** Maximum bitrate (kbps); 0 means no limit. */ 1350 + maxBitRate?: number; 1351 + /** Preferred transcode format. */ 1352 + format?: string; 1353 + } 1354 + 1153 1355 export interface GetTemporaryLinkParams { 1154 1356 /** Path to the file in Dropbox */ 1155 1357 path: string; ··· 1170 1372 endDate?: DateTime; 1171 1373 } 1172 1374 1375 + export interface GetTopSongsOutput { 1376 + 1377 + } 1378 + 1379 + export interface GetTopSongsParams { 1380 + /** The artist name. */ 1381 + artist: string; 1382 + /** Number of songs to return. */ 1383 + count?: number; 1384 + } 1385 + 1173 1386 export interface GetTopTracksOutput { 1174 1387 tracks?: SongViewBasic[]; 1175 1388 } ··· 1194 1407 uri: AtUri; 1195 1408 } 1196 1409 1410 + export interface GetUserOutput { 1411 + 1412 + } 1413 + 1414 + export interface GetUserParams { 1415 + 1416 + } 1417 + 1197 1418 export interface GetWrappedParams { 1198 1419 /** The DID or handle of the user */ 1199 1420 did: AtIdentifier; ··· 1201 1422 year?: number; 1202 1423 } 1203 1424 1425 + export interface GoogledriveDownloadFileParams { 1426 + /** The unique identifier of the file to download */ 1427 + fileId: string; 1428 + } 1429 + 1204 1430 export interface GoogledriveFileListView { 1205 1431 files?: GoogledriveFileView[]; 1206 1432 } ··· 1208 1434 export interface GoogledriveFileView { 1209 1435 /** The unique identifier of the file. */ 1210 1436 id?: string; 1437 + } 1438 + 1439 + export interface GoogledriveGetFilesParams { 1440 + /** Path to the Google Drive folder or root directory */ 1441 + at?: string; 1211 1442 } 1212 1443 1213 1444 /** indicates that a handle or DID could not be resolved */ ··· 1241 1472 position?: number; 1242 1473 } 1243 1474 1475 + export interface LibraryCreatePlaylistInput { 1476 + /** The playlist name. */ 1477 + name: string; 1478 + } 1479 + 1480 + export interface LibraryCreatePlaylistOutput { 1481 + 1482 + } 1483 + 1484 + export interface LibraryGetAlbumOutput { 1485 + 1486 + } 1487 + 1488 + export interface LibraryGetAlbumParams { 1489 + /** The album id */ 1490 + id: string; 1491 + } 1492 + 1493 + export interface LibraryGetArtistOutput { 1494 + 1495 + } 1496 + 1497 + export interface LibraryGetArtistParams { 1498 + /** The artist id */ 1499 + id: string; 1500 + } 1501 + 1502 + export interface LibraryGetArtistsOutput { 1503 + 1504 + } 1505 + 1506 + export interface LibraryGetArtistsParams { 1507 + 1508 + } 1509 + 1510 + export interface LibraryGetPlaylistOutput { 1511 + 1512 + } 1513 + 1514 + export interface LibraryGetPlaylistParams { 1515 + /** The playlist id */ 1516 + id: string; 1517 + } 1518 + 1519 + export interface LibraryGetPlaylistsOutput { 1520 + 1521 + } 1522 + 1523 + export interface LibraryGetPlaylistsParams { 1524 + 1525 + } 1526 + 1527 + export interface LibraryGetSongOutput { 1528 + 1529 + } 1530 + 1531 + export interface LibraryGetSongParams { 1532 + /** The song id */ 1533 + id: string; 1534 + } 1535 + 1536 + export interface LibrarySearchOutput { 1537 + 1538 + } 1539 + 1540 + export interface LibrarySearchParams { 1541 + /** The search query. */ 1542 + query: string; 1543 + /** Maximum number of artists to return. */ 1544 + artistCount?: number; 1545 + /** Artist result offset. */ 1546 + artistOffset?: number; 1547 + /** Maximum number of albums to return. */ 1548 + albumCount?: number; 1549 + /** Album result offset. */ 1550 + albumOffset?: number; 1551 + /** Maximum number of songs to return. */ 1552 + songCount?: number; 1553 + /** Song result offset. */ 1554 + songOffset?: number; 1555 + } 1556 + 1244 1557 export interface LikeRecord { 1245 1558 /** The date when the like was created. */ 1246 1559 createdAt: DateTime; ··· 1283 1596 lastScrobbleSeenAt?: DateTime; 1284 1597 } 1285 1598 1286 - export interface NextParams { 1287 - playerId?: string; 1599 + export interface PingOutput { 1600 + 1288 1601 } 1289 1602 1290 - export interface PauseParams { 1291 - playerId?: string; 1603 + export interface PingParams { 1604 + 1292 1605 } 1293 1606 1294 1607 export interface PlayDirectoryParams { ··· 1304 1617 title?: string; 1305 1618 } 1306 1619 1620 + export interface PlayerGetCurrentlyPlayingParams { 1621 + playerId?: string; 1622 + /** Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. */ 1623 + actor?: AtIdentifier; 1624 + } 1625 + 1626 + export interface PlayerNextParams { 1627 + playerId?: string; 1628 + } 1629 + 1630 + export interface PlayerPauseParams { 1631 + playerId?: string; 1632 + } 1633 + 1307 1634 export interface PlayerPlaybackQueueViewDetailed { 1308 1635 tracks?: SongViewBasic[]; 1309 1636 } 1310 1637 1638 + export interface PlayerPlayParams { 1639 + playerId?: string; 1640 + } 1641 + 1642 + export interface PlayerPreviousParams { 1643 + playerId?: string; 1644 + } 1645 + 1646 + export interface PlayerSeekParams { 1647 + playerId?: string; 1648 + /** The position in seconds to seek to */ 1649 + position: number; 1650 + } 1651 + 1311 1652 export interface PlayFileParams { 1312 1653 playerId?: string; 1313 1654 fileId: string; 1655 + } 1656 + 1657 + export interface PlaylistCreatePlaylistParams { 1658 + /** The name of the playlist */ 1659 + name: string; 1660 + /** A brief description of the playlist */ 1661 + description?: string; 1662 + } 1663 + 1664 + export interface PlaylistGetPlaylistParams { 1665 + /** The URI of the playlist to retrieve. */ 1666 + uri: AtUri; 1667 + } 1668 + 1669 + export interface PlaylistGetPlaylistsOutput { 1670 + playlists?: PlaylistViewBasic[]; 1671 + } 1672 + 1673 + export interface PlaylistGetPlaylistsParams { 1674 + /** The maximum number of playlists to return. */ 1675 + limit?: number; 1676 + /** The offset for pagination, used to skip a number of playlists. */ 1677 + offset?: number; 1314 1678 } 1315 1679 1316 1680 export interface PlaylistItemRecord { ··· 1395 1759 tracks?: SongViewBasic[]; 1396 1760 } 1397 1761 1398 - export interface PlayParams { 1399 - playerId?: string; 1400 - } 1401 - 1402 - export interface PreviousParams { 1403 - playerId?: string; 1404 - } 1405 - 1406 1762 export interface ProfileRecord { 1407 1763 displayName?: string; 1408 1764 /** Free-form profile description text. */ ··· 1590 1946 channels?: string; 1591 1947 } 1592 1948 1949 + export interface SavePlayQueueInput { 1950 + /** Comma-separated song ids in the queue. */ 1951 + id?: string; 1952 + /** The id of the currently playing song. */ 1953 + current?: string; 1954 + /** Position within the current song, in milliseconds. */ 1955 + position?: number; 1956 + } 1957 + 1958 + export interface SavePlayQueueOutput { 1959 + 1960 + } 1961 + 1593 1962 export interface ScrobbleFirstScrobbleView { 1594 1963 /** The handle of the user who first scrobbled this song. */ 1595 1964 handle?: string; ··· 1599 1968 timestamp?: DateTime; 1600 1969 } 1601 1970 1971 + export interface ScrobbleInput { 1972 + /** The song id. */ 1973 + id: string; 1974 + /** Play time as a Unix timestamp in milliseconds. */ 1975 + time?: number; 1976 + /** True for a final submission, false for a now-playing update. */ 1977 + submission?: boolean; 1978 + } 1979 + 1980 + export interface ScrobbleOutput { 1981 + 1982 + } 1983 + 1602 1984 export interface ScrobbleRecord { 1603 1985 /** The title of the song. */ 1604 1986 title: string; ··· 1725 2107 firstScrobble?: ScrobbleFirstScrobbleView; 1726 2108 } 1727 2109 1728 - export interface SearchParams { 1729 - /** The search query string */ 1730 - query: string; 1731 - } 1732 - 1733 - export interface SeekParams { 1734 - playerId?: string; 1735 - /** The position in seconds to seek to */ 1736 - position: number; 1737 - } 1738 - 1739 2110 export interface SettingsRecord { 1740 2111 /** Crossfade settings */ 1741 2112 crossfade?: RockboxCrossfadeSettings; ··· 1795 2166 timestamp?: DateTime; 1796 2167 } 1797 2168 2169 + export interface SongGetSongParams { 2170 + /** The AT-URI of the song to retrieve */ 2171 + uri?: AtUri; 2172 + /** The MusicBrainz ID of the song to retrieve */ 2173 + mbid?: string; 2174 + /** The International Standard Recording Code (ISRC) of the song to retrieve */ 2175 + isrc?: string; 2176 + /** The Spotify track ID of the song to retrieve (resolved internally to the Spotify track URL) */ 2177 + spotifyId?: string; 2178 + } 2179 + 1798 2180 export interface SongRecentListenerView { 1799 2181 /** The unique identifier of the listener. */ 1800 2182 id?: string; ··· 1950 2332 firstScrobble?: SongFirstScrobbleView; 1951 2333 } 1952 2334 2335 + export interface SpotifyGetCurrentlyPlayingParams { 2336 + /** Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. */ 2337 + actor?: AtIdentifier; 2338 + } 2339 + 2340 + export interface SpotifySeekParams { 2341 + /** The position in seconds to seek to */ 2342 + position: number; 2343 + } 2344 + 1953 2345 export interface SpotifyTrackView { 1954 2346 /** The unique identifier of the Spotify track. */ 1955 2347 id?: string; ··· 1965 2357 previewUrl?: string; 1966 2358 } 1967 2359 2360 + export interface StarInput { 2361 + /** The song id to star. */ 2362 + id: string; 2363 + /** An album id to star. */ 2364 + albumId?: string; 2365 + /** An artist id to star. */ 2366 + artistId?: string; 2367 + } 2368 + 2369 + export interface StarOutput { 2370 + 2371 + } 2372 + 1968 2373 export interface StartPlaylistParams { 1969 2374 /** The URI of the playlist to start */ 1970 2375 uri: AtUri; ··· 1972 2377 shuffle?: boolean; 1973 2378 /** The position in the playlist to start from, if not specified, starts from the beginning */ 1974 2379 position?: number; 2380 + } 2381 + 2382 + export interface StartScanOutput { 2383 + 2384 + } 2385 + 2386 + export interface StartScanParams { 2387 + 1975 2388 } 1976 2389 1977 2390 export interface StatsGlobalStatsView { ··· 2135 2548 account: AtIdentifier; 2136 2549 } 2137 2550 2551 + export interface UnstarInput { 2552 + /** The song id to unstar. */ 2553 + id: string; 2554 + /** An album id to unstar. */ 2555 + albumId?: string; 2556 + /** An artist id to unstar. */ 2557 + artistId?: string; 2558 + } 2559 + 2560 + export interface UnstarOutput { 2561 + 2562 + } 2563 + 2138 2564 export interface UpdateApikeyInput { 2139 2565 /** The ID of the API key to update. */ 2140 2566 id: string; ··· 2144 2570 description?: string; 2145 2571 } 2146 2572 2573 + export interface UpdateNowPlayingInput { 2574 + /** The song id. */ 2575 + id: string; 2576 + } 2577 + 2578 + export interface UpdateNowPlayingOutput { 2579 + 2580 + } 2581 + 2582 + export interface UpdatePlaylistInput { 2583 + /** The playlist id to update. */ 2584 + playlistId: string; 2585 + /** New playlist name. */ 2586 + name?: string; 2587 + /** New playlist comment. */ 2588 + comment?: string; 2589 + /** A song id to add to the playlist. */ 2590 + songIdToAdd?: string; 2591 + /** A track index to remove from the playlist. */ 2592 + songIndexToRemove?: number; 2593 + } 2594 + 2595 + export interface UpdatePlaylistOutput { 2596 + 2597 + } 2598 + 2147 2599 /** 2148 2600 * Map of every XRPC method (NSID) to the type of its response body. 2149 2601 * Endpoints with no output map to `void`. Used by the SDK to type method ··· 2171 2623 "app.rocksky.artist.getArtistAlbums": GetArtistAlbumsOutput; 2172 2624 "app.rocksky.artist.getArtistListeners": GetArtistListenersOutput; 2173 2625 "app.rocksky.artist.getArtistRecentListeners": GetArtistRecentListenersOutput; 2174 - "app.rocksky.artist.getArtists": GetArtistsOutput; 2626 + "app.rocksky.artist.getArtists": ArtistGetArtistsOutput; 2175 2627 "app.rocksky.artist.getArtistTracks": GetArtistTracksOutput; 2176 2628 "app.rocksky.charts.getScrobblesChart": ChartsView; 2177 2629 "app.rocksky.charts.getTopArtists": GetTopArtistsOutput; ··· 2198 2650 "app.rocksky.graph.getFollows": GetFollowsOutput; 2199 2651 "app.rocksky.graph.getKnownFollowers": GetKnownFollowersOutput; 2200 2652 "app.rocksky.graph.unfollowAccount": UnfollowAccountOutput; 2653 + "app.rocksky.library.createPlaylist": LibraryCreatePlaylistOutput; 2654 + "app.rocksky.library.deleteAlbum": DeleteAlbumOutput; 2655 + "app.rocksky.library.deletePlaylist": DeletePlaylistOutput; 2656 + "app.rocksky.library.deleteSong": DeleteSongOutput; 2657 + "app.rocksky.library.getAlbum": LibraryGetAlbumOutput; 2658 + "app.rocksky.library.getAlbumInfo": GetAlbumInfoOutput; 2659 + "app.rocksky.library.getAlbumList": GetAlbumListOutput; 2660 + "app.rocksky.library.getArtist": LibraryGetArtistOutput; 2661 + "app.rocksky.library.getArtistInfo": GetArtistInfoOutput; 2662 + "app.rocksky.library.getArtists": LibraryGetArtistsOutput; 2663 + "app.rocksky.library.getCoverArtUrl": GetCoverArtUrlOutput; 2664 + "app.rocksky.library.getDownloadUrl": GetDownloadUrlOutput; 2665 + "app.rocksky.library.getGenres": GetGenresOutput; 2666 + "app.rocksky.library.getIndexes": GetIndexesOutput; 2667 + "app.rocksky.library.getInternetRadioStations": GetInternetRadioStationsOutput; 2668 + "app.rocksky.library.getLicense": GetLicenseOutput; 2669 + "app.rocksky.library.getLyrics": GetLyricsOutput; 2670 + "app.rocksky.library.getMusicDirectory": GetMusicDirectoryOutput; 2671 + "app.rocksky.library.getMusicFolders": GetMusicFoldersOutput; 2672 + "app.rocksky.library.getNowPlaying": GetNowPlayingOutput; 2673 + "app.rocksky.library.getPlaylist": LibraryGetPlaylistOutput; 2674 + "app.rocksky.library.getPlaylists": LibraryGetPlaylistsOutput; 2675 + "app.rocksky.library.getPlayQueue": GetPlayQueueOutput; 2676 + "app.rocksky.library.getRandomSongs": GetRandomSongsOutput; 2677 + "app.rocksky.library.getScanStatus": GetScanStatusOutput; 2678 + "app.rocksky.library.getSimilarSongs": GetSimilarSongsOutput; 2679 + "app.rocksky.library.getSong": LibraryGetSongOutput; 2680 + "app.rocksky.library.getSongsByGenre": GetSongsByGenreOutput; 2681 + "app.rocksky.library.getStarred": GetStarredOutput; 2682 + "app.rocksky.library.getStreamUrl": GetStreamUrlOutput; 2683 + "app.rocksky.library.getTopSongs": GetTopSongsOutput; 2684 + "app.rocksky.library.getUser": GetUserOutput; 2685 + "app.rocksky.library.ping": PingOutput; 2686 + "app.rocksky.library.savePlayQueue": SavePlayQueueOutput; 2687 + "app.rocksky.library.scrobble": ScrobbleOutput; 2688 + "app.rocksky.library.search": LibrarySearchOutput; 2689 + "app.rocksky.library.star": StarOutput; 2690 + "app.rocksky.library.startScan": StartScanOutput; 2691 + "app.rocksky.library.unstar": UnstarOutput; 2692 + "app.rocksky.library.updateNowPlaying": UpdateNowPlayingOutput; 2693 + "app.rocksky.library.updatePlaylist": UpdatePlaylistOutput; 2201 2694 "app.rocksky.like.dislikeShout": ShoutView; 2202 2695 "app.rocksky.like.dislikeSong": SongViewDetailed; 2203 2696 "app.rocksky.like.likeShout": ShoutView; ··· 2217 2710 "app.rocksky.player.seek": void; 2218 2711 "app.rocksky.playlist.createPlaylist": void; 2219 2712 "app.rocksky.playlist.getPlaylist": PlaylistViewDetailed; 2220 - "app.rocksky.playlist.getPlaylists": GetPlaylistsOutput; 2713 + "app.rocksky.playlist.getPlaylists": PlaylistGetPlaylistsOutput; 2221 2714 "app.rocksky.playlist.insertDirectory": void; 2222 2715 "app.rocksky.playlist.insertFiles": void; 2223 2716 "app.rocksky.playlist.removePlaylist": void;
+48 -5
tools/lexgen/generate.ts
··· 56 56 return pascal(last); 57 57 } 58 58 59 + // The namespace segment (second-to-last), used to disambiguate endpoint type 60 + // names when two namespaces expose the same method name. 61 + function nsidParentNs(nsid: string): string { 62 + const segs = nsid.split("."); 63 + return segs.length >= 2 ? pascal(segs[segs.length - 2]) : ""; 64 + } 65 + 59 66 function typeNameFor( 60 67 nsid: string, 61 68 defName: string, ··· 174 181 const refs = new Set<string>(); 175 182 const endpoints: EndpointDef[] = []; 176 183 184 + // Endpoint type names (Params/Input/Output/Message) are derived from the 185 + // method — the last NSID segment — so two namespaces exposing the same method 186 + // name (e.g. app.rocksky.library.getSong and app.rocksky.song.getSong) would 187 + // produce the same name and silently clobber each other. Pre-scan to find the 188 + // colliding stems, then qualify only those with the namespace segment 189 + // (LibraryGetSong vs SongGetSong). Unique method names keep their short names, 190 + // so nothing that isn't actually colliding is renamed. 191 + const stemProducers = new Map<string, Set<string>>(); 192 + for (const f of files) { 193 + let doc: any; 194 + try { 195 + doc = JSON.parse(readFileSync(f, "utf8")); 196 + } catch { 197 + continue; 198 + } 199 + const nsid: string = doc.id; 200 + if (!nsid) continue; 201 + for (const def of Object.values<any>(doc.defs ?? {})) { 202 + if ( 203 + def.type === "query" || 204 + def.type === "procedure" || 205 + def.type === "subscription" 206 + ) { 207 + const stem = nsidNs(nsid); 208 + let set = stemProducers.get(stem); 209 + if (!set) stemProducers.set(stem, (set = new Set())); 210 + set.add(nsid); 211 + } 212 + } 213 + } 214 + const endpointStem = (nsid: string): string => { 215 + const stem = nsidNs(nsid); 216 + const producers = stemProducers.get(stem); 217 + return producers && producers.size > 1 ? nsidParentNs(nsid) + stem : stem; 218 + }; 219 + 177 220 const hoist = (name: string, t: NamedType) => { 178 221 if (!types.find((x) => x.name === name)) types.push(t); 179 222 }; ··· 215 258 case "query": 216 259 case "procedure": 217 260 case "subscription": { 218 - const paramsName = typeNameFor(nsid, "main", "params", "Params"); 261 + const paramsName = endpointStem(nsid) + "Params"; 219 262 if (def.parameters && def.parameters.properties) { 220 263 const ctx: ParseCtx = { ...baseCtx, parentTypeName: paramsName, hoist }; 221 264 const t = buildNamedType(paramsName, def.parameters, ctx); 222 265 types.push(t); 223 266 } 224 267 if (def.type === "procedure" && def.input?.schema?.type === "object") { 225 - const name = nsidNs(nsid) + "Input"; 268 + const name = endpointStem(nsid) + "Input"; 226 269 const ctx: ParseCtx = { ...baseCtx, parentTypeName: name, hoist }; 227 270 const t = buildNamedType(name, def.input.schema, ctx); 228 271 types.push(t); ··· 231 274 if (def.output?.schema) { 232 275 const schema = def.output.schema; 233 276 if (schema.type === "object") { 234 - const name = nsidNs(nsid) + "Output"; 277 + const name = endpointStem(nsid) + "Output"; 235 278 const ctx: ParseCtx = { ...baseCtx, parentTypeName: name, hoist }; 236 279 const t = buildNamedType(name, schema, ctx); 237 280 types.push(t); 238 281 outputRef = { kind: "ref", targetId: `__inline:${name}` }; 239 282 } else { 240 - const ctx: ParseCtx = { ...baseCtx, parentTypeName: nsidNs(nsid) + "Output", hoist }; 283 + const ctx: ParseCtx = { ...baseCtx, parentTypeName: endpointStem(nsid) + "Output", hoist }; 241 284 outputRef = parseTypeRef(schema, ctx); 242 285 } 243 286 } 244 287 endpoints.push({ nsid, kind: def.type, output: outputRef }); 245 288 if (def.message?.schema?.type === "object") { 246 - const name = nsidNs(nsid) + "Message"; 289 + const name = endpointStem(nsid) + "Message"; 247 290 const ctx: ParseCtx = { ...baseCtx, parentTypeName: name, hoist }; 248 291 const t = buildNamedType(name, def.message.schema, ctx); 249 292 types.push(t);