diff --git a/crates/jacquard-api/Cargo.toml b/crates/jacquard-api/Cargo.toml index dee652179..3f8935db5 100644 --- a/crates/jacquard-api/Cargo.toml +++ b/crates/jacquard-api/Cargo.toml @@ -30,13 +30,14 @@ minimal = [ "com_atproto", "com_bad_example"] bluesky = [ "com_atproto", "app_bsky", "chat_bsky", "tools_ozone", "minimal"] other = ["sh_tangled", "sh_weaver", "pub_leaflet", "net_anisota", "network_slices", "tools_smokesignal", "com_whtwnd", "community_lexicon", "place_stream", "blue__2048", "minimal" ] lexicon_community = ["community_lexicon", "my_skylights", "com_whtwnd", "social_psky", "blue_linkat", "minimal"] -ufos = [ "moe_karashiiro", "dev_regnault", "buzz_bookhive", "uk_ewancroft", "win_tomo_x", "dev_fudgeu", "dev_ocbwoy3", "blog_pckt", "net_bnewbold", "club_stellz", "dev_baileytownsend", "net_aftertheinter", "org_devcon","org_robocracy", "garden_lexicon", "social_clippr", "social_grain", "social_pmsky", "com_crabdance", "app_blebbit", "app_ocho", "uk_skyblur", "us_polhem", "blue_atplane", "net_mmatt", "minimal" ] +ufos = [ "moe_karashiiro", "dev_regnault", "buzz_bookhive", "uk_ewancroft", "win_tomo_x", "dev_fudgeu", "dev_ocbwoy3", "blog_pckt", "net_bnewbold", "club_stellz", "dev_baileytownsend", "net_aftertheinter", "org_devcon","org_robocracy", "garden_lexicon", "social_clippr", "social_grain", "social_pmsky", "com_crabdance", "app_blebbit", "app_ocho", "uk_skyblur", "us_polhem", "blue_atplane", "net_mmatt", "minimal", "app_rocksky"] # --- generated --- # Generated namespace features app_blebbit = [] app_bsky = [] app_ocho = [] +app_rocksky = [] beauty_cybernetic = [] blog_pckt = [] blue__2048 = [] diff --git a/crates/jacquard-api/lexicons/app_rocksky_actor_defs.json b/crates/jacquard-api/lexicons/app_rocksky_actor_defs.json new file mode 100644 index 000000000..031c67bf4 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_actor_defs.json @@ -0,0 +1,78 @@ +{ + "lexicon": 1, + "id": "app.rocksky.actor.defs", + "defs": { + "profileViewBasic": { + "type": "object", + "properties": { + "avatar": { + "type": "string", + "description": "The URL of the actor's avatar image.", + "format": "uri" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the actor was created.", + "format": "datetime" + }, + "did": { + "type": "string", + "description": "The DID of the actor." + }, + "displayName": { + "type": "string", + "description": "The display name of the actor." + }, + "handle": { + "type": "string", + "description": "The handle of the actor." + }, + "id": { + "type": "string", + "description": "The unique identifier of the actor." + }, + "updatedAt": { + "type": "string", + "description": "The date and time when the actor was last updated.", + "format": "datetime" + } + } + }, + "profileViewDetailed": { + "type": "object", + "properties": { + "avatar": { + "type": "string", + "description": "The URL of the actor's avatar image.", + "format": "uri" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the actor was created.", + "format": "datetime" + }, + "did": { + "type": "string", + "description": "The DID of the actor." + }, + "displayName": { + "type": "string", + "description": "The display name of the actor." + }, + "handle": { + "type": "string", + "description": "The handle of the actor." + }, + "id": { + "type": "string", + "description": "The unique identifier of the actor." + }, + "updatedAt": { + "type": "string", + "description": "The date and time when the actor was last updated.", + "format": "datetime" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_actor_getActorAlbums.json b/crates/jacquard-api/lexicons/app_rocksky_actor_getActorAlbums.json new file mode 100644 index 000000000..202f54ca3 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_actor_getActorAlbums.json @@ -0,0 +1,48 @@ +{ + "lexicon": 1, + "id": "app.rocksky.actor.getActorAlbums", + "defs": { + "main": { + "type": "query", + "description": "Get albums for an actor", + "parameters": { + "type": "params", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "description": "The DID or handle of the actor", + "format": "at-identifier" + }, + "limit": { + "type": "integer", + "description": "The maximum number of albums to return", + "minimum": 1 + }, + "offset": { + "type": "integer", + "description": "The offset for pagination", + "minimum": 0 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "albums": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.album.defs#albumViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_actor_getActorArtists.json b/crates/jacquard-api/lexicons/app_rocksky_actor_getActorArtists.json new file mode 100644 index 000000000..05a5c9ec7 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_actor_getActorArtists.json @@ -0,0 +1,48 @@ +{ + "lexicon": 1, + "id": "app.rocksky.actor.getActorArtists", + "defs": { + "main": { + "type": "query", + "description": "Get artists for an actor", + "parameters": { + "type": "params", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "description": "The DID or handle of the actor", + "format": "at-identifier" + }, + "limit": { + "type": "integer", + "description": "The maximum number of albums to return", + "minimum": 1 + }, + "offset": { + "type": "integer", + "description": "The offset for pagination", + "minimum": 0 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "artists": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.artist.defs#artistViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_actor_getActorLovedSongs.json b/crates/jacquard-api/lexicons/app_rocksky_actor_getActorLovedSongs.json new file mode 100644 index 000000000..48ba27a2c --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_actor_getActorLovedSongs.json @@ -0,0 +1,48 @@ +{ + "lexicon": 1, + "id": "app.rocksky.actor.getActorLovedSongs", + "defs": { + "main": { + "type": "query", + "description": "Get loved songs for an actor", + "parameters": { + "type": "params", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "description": "The DID or handle of the actor", + "format": "at-identifier" + }, + "limit": { + "type": "integer", + "description": "The maximum number of albums to return", + "minimum": 1 + }, + "offset": { + "type": "integer", + "description": "The offset for pagination", + "minimum": 0 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "tracks": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.song.defs#songViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_actor_getActorPlaylists.json b/crates/jacquard-api/lexicons/app_rocksky_actor_getActorPlaylists.json new file mode 100644 index 000000000..a7bea3985 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_actor_getActorPlaylists.json @@ -0,0 +1,48 @@ +{ + "lexicon": 1, + "id": "app.rocksky.actor.getActorPlaylists", + "defs": { + "main": { + "type": "query", + "description": "Get playlists for an actor", + "parameters": { + "type": "params", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "description": "The DID or handle of the actor", + "format": "at-identifier" + }, + "limit": { + "type": "integer", + "description": "The maximum number of albums to return", + "minimum": 1 + }, + "offset": { + "type": "integer", + "description": "The offset for pagination", + "minimum": 0 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "playlists": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.playlist.defs#playlistViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_actor_getActorScrobbles.json b/crates/jacquard-api/lexicons/app_rocksky_actor_getActorScrobbles.json new file mode 100644 index 000000000..46c44d485 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_actor_getActorScrobbles.json @@ -0,0 +1,48 @@ +{ + "lexicon": 1, + "id": "app.rocksky.actor.getActorScrobbles", + "defs": { + "main": { + "type": "query", + "description": "Get scrobbles for an actor", + "parameters": { + "type": "params", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "description": "The DID or handle of the actor", + "format": "at-identifier" + }, + "limit": { + "type": "integer", + "description": "The maximum number of albums to return", + "minimum": 1 + }, + "offset": { + "type": "integer", + "description": "The offset for pagination", + "minimum": 0 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "scrobbles": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.scrobble.defs#scrobbleViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_actor_getActorSongs.json b/crates/jacquard-api/lexicons/app_rocksky_actor_getActorSongs.json new file mode 100644 index 000000000..ab8f7aa97 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_actor_getActorSongs.json @@ -0,0 +1,48 @@ +{ + "lexicon": 1, + "id": "app.rocksky.actor.getActorSongs", + "defs": { + "main": { + "type": "query", + "description": "Get songs for an actor", + "parameters": { + "type": "params", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "description": "The DID or handle of the actor", + "format": "at-identifier" + }, + "limit": { + "type": "integer", + "description": "The maximum number of albums to return", + "minimum": 1 + }, + "offset": { + "type": "integer", + "description": "The offset for pagination", + "minimum": 0 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "songs": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.song.defs#songViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_actor_getProfile.json b/crates/jacquard-api/lexicons/app_rocksky_actor_getProfile.json new file mode 100644 index 000000000..eb9414710 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_actor_getProfile.json @@ -0,0 +1,27 @@ +{ + "lexicon": 1, + "id": "app.rocksky.actor.getProfile", + "defs": { + "main": { + "type": "query", + "description": "Get the profile of an actor", + "parameters": { + "type": "params", + "properties": { + "did": { + "type": "string", + "description": "The DID or handle of the actor", + "format": "at-identifier" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.actor.defs#profileViewDetailed" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_album.json b/crates/jacquard-api/lexicons/app_rocksky_album.json new file mode 100644 index 000000000..4d10e5bdc --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_album.json @@ -0,0 +1,94 @@ +{ + "lexicon": 1, + "id": "app.rocksky.album", + "defs": { + "main": { + "type": "record", + "description": "A declaration of an album.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "title", + "artist", + "createdAt" + ], + "properties": { + "albumArt": { + "type": "blob", + "description": "The album art of the album.", + "accept": [ + "image/png", + "image/jpeg" + ], + "maxSize": 2000000 + }, + "appleMusicLink": { + "type": "string", + "description": "The Apple Music link of the album.", + "format": "uri" + }, + "artist": { + "type": "string", + "description": "The artist of the album.", + "minLength": 1, + "maxLength": 256 + }, + "createdAt": { + "type": "string", + "description": "The date and time when the album was created.", + "format": "datetime" + }, + "duration": { + "type": "integer", + "description": "The duration of the album in seconds." + }, + "genre": { + "type": "string", + "description": "The genre of the album.", + "maxLength": 256 + }, + "releaseDate": { + "type": "string", + "description": "The release date of the album.", + "format": "datetime" + }, + "spotifyLink": { + "type": "string", + "description": "The Spotify link of the album.", + "format": "uri" + }, + "tags": { + "type": "array", + "description": "The tags of the album.", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 256 + } + }, + "tidalLink": { + "type": "string", + "description": "The tidal link of the album.", + "format": "uri" + }, + "title": { + "type": "string", + "description": "The title of the album.", + "minLength": 1, + "maxLength": 512 + }, + "year": { + "type": "integer", + "description": "The year the album was released." + }, + "youtubeLink": { + "type": "string", + "description": "The YouTube link of the album.", + "format": "uri" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_album_defs.json b/crates/jacquard-api/lexicons/app_rocksky_album_defs.json new file mode 100644 index 000000000..55ebbab77 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_album_defs.json @@ -0,0 +1,121 @@ +{ + "lexicon": 1, + "id": "app.rocksky.album.defs", + "defs": { + "albumViewBasic": { + "type": "object", + "properties": { + "albumArt": { + "type": "string", + "description": "The URL of the album art image.", + "format": "uri" + }, + "artist": { + "type": "string", + "description": "The artist of the album." + }, + "artistUri": { + "type": "string", + "description": "The URI of the album's artist.", + "format": "at-uri" + }, + "id": { + "type": "string", + "description": "The unique identifier of the album." + }, + "playCount": { + "type": "integer", + "description": "The number of times the album has been played.", + "minimum": 0 + }, + "releaseDate": { + "type": "string", + "description": "The release date of the album." + }, + "sha256": { + "type": "string", + "description": "The SHA256 hash of the album." + }, + "title": { + "type": "string", + "description": "The title of the album." + }, + "uniqueListeners": { + "type": "integer", + "description": "The number of unique listeners who have played the album.", + "minimum": 0 + }, + "uri": { + "type": "string", + "description": "The URI of the album.", + "format": "at-uri" + }, + "year": { + "type": "integer", + "description": "The year the album was released." + } + } + }, + "albumViewDetailed": { + "type": "object", + "properties": { + "albumArt": { + "type": "string", + "description": "The URL of the album art image.", + "format": "uri" + }, + "artist": { + "type": "string", + "description": "The artist of the album." + }, + "artistUri": { + "type": "string", + "description": "The URI of the album's artist.", + "format": "at-uri" + }, + "id": { + "type": "string", + "description": "The unique identifier of the album." + }, + "playCount": { + "type": "integer", + "description": "The number of times the album has been played.", + "minimum": 0 + }, + "releaseDate": { + "type": "string", + "description": "The release date of the album." + }, + "sha256": { + "type": "string", + "description": "The SHA256 hash of the album." + }, + "title": { + "type": "string", + "description": "The title of the album." + }, + "tracks": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.song.defs.songViewBasic" + } + }, + "uniqueListeners": { + "type": "integer", + "description": "The number of unique listeners who have played the album.", + "minimum": 0 + }, + "uri": { + "type": "string", + "description": "The URI of the album.", + "format": "at-uri" + }, + "year": { + "type": "integer", + "description": "The year the album was released." + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_album_getAlbum.json b/crates/jacquard-api/lexicons/app_rocksky_album_getAlbum.json new file mode 100644 index 000000000..12737635e --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_album_getAlbum.json @@ -0,0 +1,30 @@ +{ + "lexicon": 1, + "id": "app.rocksky.album.getAlbum", + "defs": { + "main": { + "type": "query", + "description": "Get detailed album view", + "parameters": { + "type": "params", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string", + "description": "The URI of the album to retrieve.", + "format": "at-uri" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.album.defs#albumViewDetailed" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_album_getAlbumTracks.json b/crates/jacquard-api/lexicons/app_rocksky_album_getAlbumTracks.json new file mode 100644 index 000000000..06e864802 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_album_getAlbumTracks.json @@ -0,0 +1,38 @@ +{ + "lexicon": 1, + "id": "app.rocksky.album.getAlbumTracks", + "defs": { + "main": { + "type": "query", + "description": "Get tracks for an album", + "parameters": { + "type": "params", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string", + "description": "The URI of the album to retrieve tracks from", + "format": "at-uri" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "tracks": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.song.defs#songViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_album_getAlbums.json b/crates/jacquard-api/lexicons/app_rocksky_album_getAlbums.json new file mode 100644 index 000000000..c5002c8dd --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_album_getAlbums.json @@ -0,0 +1,40 @@ +{ + "lexicon": 1, + "id": "app.rocksky.album.getAlbums", + "defs": { + "main": { + "type": "query", + "description": "Get albums", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "description": "The maximum number of albums to return", + "minimum": 1 + }, + "offset": { + "type": "integer", + "description": "The offset for pagination", + "minimum": 0 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "albums": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.album.defs#albumViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_apikey_createApikey.json b/crates/jacquard-api/lexicons/app_rocksky_apikey_createApikey.json new file mode 100644 index 000000000..cd3b5db1a --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_apikey_createApikey.json @@ -0,0 +1,36 @@ +{ + "lexicon": 1, + "id": "app.rocksky.apikey.createApikey", + "defs": { + "main": { + "type": "procedure", + "description": "Create a new API key for the authenticated user", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "description": { + "type": "string", + "description": "A description for the API key." + }, + "name": { + "type": "string", + "description": "The name of the API key." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.apikey.defs#apiKey" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_apikey_defs.json b/crates/jacquard-api/lexicons/app_rocksky_apikey_defs.json new file mode 100644 index 000000000..e4b8f7c9f --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_apikey_defs.json @@ -0,0 +1,28 @@ +{ + "lexicon": 1, + "id": "app.rocksky.apikey.defs", + "defs": { + "apiKeyView": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "The date and time when the API key was created.", + "format": "datetime" + }, + "description": { + "type": "string", + "description": "A description for the API key." + }, + "id": { + "type": "string", + "description": "The unique identifier of the API key." + }, + "name": { + "type": "string", + "description": "The name of the API key." + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_apikey_getApikeys.json b/crates/jacquard-api/lexicons/app_rocksky_apikey_getApikeys.json new file mode 100644 index 000000000..255dc14e5 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_apikey_getApikeys.json @@ -0,0 +1,38 @@ +{ + "lexicon": 1, + "id": "app.rocksky.apikey.getApikeys", + "defs": { + "main": { + "type": "query", + "description": "Get a list of API keys for the authenticated user", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "description": "The number of API keys to return per page." + }, + "offset": { + "type": "integer", + "description": "The number of API keys to skip before starting to collect the result set." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "apiKeys": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.apikey.defs#apikeyView" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_apikey_removeApikey.json b/crates/jacquard-api/lexicons/app_rocksky_apikey_removeApikey.json new file mode 100644 index 000000000..3f2b543ae --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_apikey_removeApikey.json @@ -0,0 +1,29 @@ +{ + "lexicon": 1, + "id": "app.rocksky.apikey.removeApikey", + "defs": { + "main": { + "type": "procedure", + "description": "Remove an API key for the authenticated user", + "parameters": { + "type": "params", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "The ID of the API key to remove." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.apikey.defs#apiKey" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_apikey_updateApikey.json b/crates/jacquard-api/lexicons/app_rocksky_apikey_updateApikey.json new file mode 100644 index 000000000..4f8d28c39 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_apikey_updateApikey.json @@ -0,0 +1,41 @@ +{ + "lexicon": 1, + "id": "app.rocksky.apikey.updateApikey", + "defs": { + "main": { + "type": "procedure", + "description": "Update an existing API key for the authenticated user", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "description": { + "type": "string", + "description": "A new description for the API key." + }, + "id": { + "type": "string", + "description": "The ID of the API key to update." + }, + "name": { + "type": "string", + "description": "The new name of the API key." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.apikey.defs#apiKey" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_apikeys_defs.json b/crates/jacquard-api/lexicons/app_rocksky_apikeys_defs.json new file mode 100644 index 000000000..8400a8043 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_apikeys_defs.json @@ -0,0 +1,5 @@ +{ + "lexicon": 1, + "id": "app.rocksky.apikeys.defs", + "defs": {} +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_artist.json b/crates/jacquard-api/lexicons/app_rocksky_artist.json new file mode 100644 index 000000000..43d262d8b --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_artist.json @@ -0,0 +1,69 @@ +{ + "lexicon": 1, + "id": "app.rocksky.artist", + "defs": { + "main": { + "type": "record", + "description": "A declaration of an artist.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "name", + "createdAt" + ], + "properties": { + "bio": { + "type": "string", + "description": "The biography of the artist.", + "maxLength": 1000 + }, + "born": { + "type": "string", + "description": "The birth date of the artist.", + "format": "datetime" + }, + "bornIn": { + "type": "string", + "description": "The birth place of the artist.", + "maxLength": 256 + }, + "createdAt": { + "type": "string", + "description": "The date when the artist was created.", + "format": "datetime" + }, + "died": { + "type": "string", + "description": "The death date of the artist.", + "format": "datetime" + }, + "name": { + "type": "string", + "description": "The name of the artist.", + "minLength": 1, + "maxLength": 512 + }, + "picture": { + "type": "blob", + "description": "The picture of the artist.", + "accept": [ + "image/png", + "image/jpeg" + ], + "maxSize": 2000000 + }, + "tags": { + "type": "array", + "description": "The tags of the artist.", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 256 + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_artist_defs.json b/crates/jacquard-api/lexicons/app_rocksky_artist_defs.json new file mode 100644 index 000000000..6a0b5d2cf --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_artist_defs.json @@ -0,0 +1,78 @@ +{ + "lexicon": 1, + "id": "app.rocksky.artist.defs", + "defs": { + "artistViewBasic": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the artist." + }, + "name": { + "type": "string", + "description": "The name of the artist." + }, + "picture": { + "type": "string", + "description": "The picture of the artist." + }, + "playCount": { + "type": "integer", + "description": "The number of times the artist has been played.", + "minimum": 0 + }, + "sha256": { + "type": "string", + "description": "The SHA256 hash of the artist." + }, + "uniqueListeners": { + "type": "integer", + "description": "The number of unique listeners who have played the artist.", + "minimum": 0 + }, + "uri": { + "type": "string", + "description": "The URI of the artist.", + "format": "at-uri" + } + } + }, + "artistViewDetailed": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the artist." + }, + "name": { + "type": "string", + "description": "The name of the artist." + }, + "picture": { + "type": "string", + "description": "The picture of the artist." + }, + "playCount": { + "type": "integer", + "description": "The number of times the artist has been played.", + "minimum": 0 + }, + "sha256": { + "type": "string", + "description": "The SHA256 hash of the artist." + }, + "uniqueListeners": { + "type": "integer", + "description": "The number of unique listeners who have played the artist.", + "minimum": 0 + }, + "uri": { + "type": "string", + "description": "The URI of the artist.", + "format": "at-uri" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_artist_getArtist.json b/crates/jacquard-api/lexicons/app_rocksky_artist_getArtist.json new file mode 100644 index 000000000..346468d84 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_artist_getArtist.json @@ -0,0 +1,30 @@ +{ + "lexicon": 1, + "id": "app.rocksky.artist.getArtist", + "defs": { + "main": { + "type": "query", + "description": "Get artist details", + "parameters": { + "type": "params", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string", + "description": "The URI of the artist to retrieve details from", + "format": "at-uri" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.artist.defs#artistViewDetailed" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_artist_getArtistAlbums.json b/crates/jacquard-api/lexicons/app_rocksky_artist_getArtistAlbums.json new file mode 100644 index 000000000..6ee893349 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_artist_getArtistAlbums.json @@ -0,0 +1,38 @@ +{ + "lexicon": 1, + "id": "app.rocksky.artist.getArtistAlbums", + "defs": { + "main": { + "type": "query", + "description": "Get artist's albums", + "parameters": { + "type": "params", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string", + "description": "The URI of the artist to retrieve albums from", + "format": "at-uri" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "albums": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.album.defs#albumViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_artist_getArtistTracks.json b/crates/jacquard-api/lexicons/app_rocksky_artist_getArtistTracks.json new file mode 100644 index 000000000..7fa4344fe --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_artist_getArtistTracks.json @@ -0,0 +1,45 @@ +{ + "lexicon": 1, + "id": "app.rocksky.artist.getArtistTracks", + "defs": { + "main": { + "type": "query", + "description": "Get artist's tracks", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "description": "The maximum number of tracks to return", + "minimum": 1 + }, + "offset": { + "type": "integer", + "description": "The offset for pagination", + "minimum": 0 + }, + "uri": { + "type": "string", + "description": "The URI of the artist to retrieve albums from", + "format": "at-uri" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "tracks": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.song.defs#songViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_artist_getArtists.json b/crates/jacquard-api/lexicons/app_rocksky_artist_getArtists.json new file mode 100644 index 000000000..24dcd917a --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_artist_getArtists.json @@ -0,0 +1,40 @@ +{ + "lexicon": 1, + "id": "app.rocksky.artist.getArtists", + "defs": { + "main": { + "type": "query", + "description": "Get artists", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "description": "The maximum number of artists to return", + "minimum": 1 + }, + "offset": { + "type": "integer", + "description": "The offset for pagination", + "minimum": 0 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "artists": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.artist.defs#artistViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_charts_defs.json b/crates/jacquard-api/lexicons/app_rocksky_charts_defs.json new file mode 100644 index 000000000..336a8c04b --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_charts_defs.json @@ -0,0 +1,32 @@ +{ + "lexicon": 1, + "id": "app.rocksky.charts.defs", + "defs": { + "chartsView": { + "type": "object", + "properties": { + "scrobbles": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.charts.defs#scrobbleViewBasic" + } + } + } + }, + "scrobbleViewBasic": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "The number of scrobbles on this date." + }, + "date": { + "type": "string", + "description": "The date of the scrobble.", + "format": "datetime" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_charts_getScrobblesChart.json b/crates/jacquard-api/lexicons/app_rocksky_charts_getScrobblesChart.json new file mode 100644 index 000000000..f9ff941c8 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_charts_getScrobblesChart.json @@ -0,0 +1,42 @@ +{ + "lexicon": 1, + "id": "app.rocksky.charts.getScrobblesChart", + "defs": { + "main": { + "type": "query", + "description": "Get the scrobbles chart", + "parameters": { + "type": "params", + "properties": { + "albumuri": { + "type": "string", + "description": "The URI of the album to filter by", + "format": "at-uri" + }, + "artisturi": { + "type": "string", + "description": "The URI of the artist to filter by", + "format": "at-uri" + }, + "did": { + "type": "string", + "description": "The DID or handle of the actor", + "format": "at-identifier" + }, + "songuri": { + "type": "string", + "description": "The URI of the track to filter by", + "format": "at-uri" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.charts.defs#chartsView" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_dropbox_defs.json b/crates/jacquard-api/lexicons/app_rocksky_dropbox_defs.json new file mode 100644 index 000000000..7cdc43379 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_dropbox_defs.json @@ -0,0 +1,60 @@ +{ + "lexicon": 1, + "id": "app.rocksky.dropbox.defs", + "defs": { + "fileListView": { + "type": "object", + "properties": { + "files": { + "type": "array", + "description": "A list of files in the Dropbox.", + "items": { + "type": "ref", + "ref": "app.rocksky.dropbox.defs#fileView" + } + } + } + }, + "fileView": { + "type": "object", + "properties": { + "clientModified": { + "type": "string", + "description": "The last modified date and time of the file on the client.", + "format": "datetime" + }, + "id": { + "type": "string", + "description": "The unique identifier of the file." + }, + "name": { + "type": "string", + "description": "The name of the file." + }, + "pathDisplay": { + "type": "string", + "description": "The display path of the file." + }, + "pathLower": { + "type": "string", + "description": "The lowercased path of the file." + }, + "serverModified": { + "type": "string", + "description": "The last modified date and time of the file on the server.", + "format": "datetime" + } + } + }, + "temporaryLinkView": { + "type": "object", + "properties": { + "link": { + "type": "string", + "description": "The temporary link to access the file.", + "format": "uri" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_dropbox_downloadFile.json b/crates/jacquard-api/lexicons/app_rocksky_dropbox_downloadFile.json new file mode 100644 index 000000000..96e7f953c --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_dropbox_downloadFile.json @@ -0,0 +1,25 @@ +{ + "lexicon": 1, + "id": "app.rocksky.dropbox.downloadFile", + "defs": { + "main": { + "type": "query", + "description": "Download a file from Dropbox by its unique identifier", + "parameters": { + "type": "params", + "required": [ + "fileId" + ], + "properties": { + "fileId": { + "type": "string", + "description": "The unique identifier of the file to download" + } + } + }, + "output": { + "encoding": "application/octet-stream" + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_dropbox_getFiles.json b/crates/jacquard-api/lexicons/app_rocksky_dropbox_getFiles.json new file mode 100644 index 000000000..8be30e104 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_dropbox_getFiles.json @@ -0,0 +1,26 @@ +{ + "lexicon": 1, + "id": "app.rocksky.dropbox.getFiles", + "defs": { + "main": { + "type": "query", + "description": "Retrieve a list of files from Dropbox", + "parameters": { + "type": "params", + "properties": { + "at": { + "type": "string", + "description": "Path to the Dropbox folder or root directory" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.dropbox.defs#fileListView" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_dropbox_getMetadata.json b/crates/jacquard-api/lexicons/app_rocksky_dropbox_getMetadata.json new file mode 100644 index 000000000..e63fb1821 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_dropbox_getMetadata.json @@ -0,0 +1,29 @@ +{ + "lexicon": 1, + "id": "app.rocksky.dropbox.getMetadata", + "defs": { + "main": { + "type": "query", + "description": "Retrieve metadata of a file or folder in Dropbox", + "parameters": { + "type": "params", + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string", + "description": "Path to the file or folder in Dropbox" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.dropbox.defs#fileView" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_dropbox_getTemporaryLink.json b/crates/jacquard-api/lexicons/app_rocksky_dropbox_getTemporaryLink.json new file mode 100644 index 000000000..713a81dc0 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_dropbox_getTemporaryLink.json @@ -0,0 +1,29 @@ +{ + "lexicon": 1, + "id": "app.rocksky.dropbox.getTemporaryLink", + "defs": { + "main": { + "type": "query", + "description": "Retrieve a temporary link to access a file in Dropbox", + "parameters": { + "type": "params", + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string", + "description": "Path to the file in Dropbox" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.dropbox.defs#temporaryLinkView" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_feed_defs.json b/crates/jacquard-api/lexicons/app_rocksky_feed_defs.json new file mode 100644 index 000000000..ad5235b55 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_feed_defs.json @@ -0,0 +1,105 @@ +{ + "lexicon": 1, + "id": "app.rocksky.feed.defs", + "defs": { + "nowPlayingView": { + "type": "object", + "properties": { + "album": { + "type": "string" + }, + "albumArt": { + "type": "string", + "format": "uri" + }, + "albumArtist": { + "type": "string" + }, + "albumUri": { + "type": "string", + "format": "at-uri" + }, + "artist": { + "type": "string" + }, + "artistUri": { + "type": "string", + "format": "at-uri" + }, + "avatar": { + "type": "string", + "format": "uri" + }, + "createdAt": { + "type": "string" + }, + "did": { + "type": "string", + "format": "at-identifier" + }, + "handle": { + "type": "string" + }, + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "trackId": { + "type": "string" + }, + "trackUri": { + "type": "string", + "format": "at-uri" + }, + "uri": { + "type": "string", + "format": "at-uri" + } + } + }, + "nowPlayingsView": { + "type": "object", + "properties": { + "nowPlayings": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.feed.defs#nowPlayingView" + } + } + } + }, + "searchResultsView": { + "type": "object", + "properties": { + "estimatedTotalHits": { + "type": "integer" + }, + "hits": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "app.rocksky.song.defs#songViewBasic", + "app.rocksky.album.defs#albumViewBasic", + "app.rocksky.artist.defs#artistViewBasic", + "app.rocksky.playlist.defs#playlistViewBasic", + "app.rocksky.actor.defs#profileViewBasic" + ] + } + }, + "limit": { + "type": "integer" + }, + "offset": { + "type": "integer" + }, + "processingTimeMs": { + "type": "integer" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_feed_getNowPlayings.json b/crates/jacquard-api/lexicons/app_rocksky_feed_getNowPlayings.json new file mode 100644 index 000000000..90e1cd146 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_feed_getNowPlayings.json @@ -0,0 +1,27 @@ +{ + "lexicon": 1, + "id": "app.rocksky.feed.getNowPlayings", + "defs": { + "main": { + "type": "query", + "description": "Get all currently playing tracks by users", + "parameters": { + "type": "params", + "properties": { + "size": { + "type": "integer", + "description": "The maximum number of now playing tracks to return.", + "minimum": 1 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.feed.defs#nowPlayingsView" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_feed_search.json b/crates/jacquard-api/lexicons/app_rocksky_feed_search.json new file mode 100644 index 000000000..8510736d9 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_feed_search.json @@ -0,0 +1,29 @@ +{ + "lexicon": 1, + "id": "app.rocksky.feed.search", + "defs": { + "main": { + "type": "query", + "description": "Search for content in the feed", + "parameters": { + "type": "params", + "required": [ + "query" + ], + "properties": { + "query": { + "type": "string", + "description": "The search query string" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.feed.defs#searchResultsView" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_googledrive_defs.json b/crates/jacquard-api/lexicons/app_rocksky_googledrive_defs.json new file mode 100644 index 000000000..1ebcf8761 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_googledrive_defs.json @@ -0,0 +1,27 @@ +{ + "lexicon": 1, + "id": "app.rocksky.googledrive.defs", + "defs": { + "fileListView": { + "type": "object", + "properties": { + "files": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.googledrive.defs#fileView" + } + } + } + }, + "fileView": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the file." + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_googledrive_downloadFile.json b/crates/jacquard-api/lexicons/app_rocksky_googledrive_downloadFile.json new file mode 100644 index 000000000..3dfcc7720 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_googledrive_downloadFile.json @@ -0,0 +1,25 @@ +{ + "lexicon": 1, + "id": "app.rocksky.googledrive.downloadFile", + "defs": { + "main": { + "type": "query", + "description": "Download a file from Google Drive by its unique identifier", + "parameters": { + "type": "params", + "required": [ + "fileId" + ], + "properties": { + "fileId": { + "type": "string", + "description": "The unique identifier of the file to download" + } + } + }, + "output": { + "encoding": "application/octet-stream" + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_googledrive_getFile.json b/crates/jacquard-api/lexicons/app_rocksky_googledrive_getFile.json new file mode 100644 index 000000000..b5f6a0c00 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_googledrive_getFile.json @@ -0,0 +1,29 @@ +{ + "lexicon": 1, + "id": "app.rocksky.googledrive.getFile", + "defs": { + "main": { + "type": "query", + "description": "Get a file from Google Drive by its unique identifier", + "parameters": { + "type": "params", + "required": [ + "fileId" + ], + "properties": { + "fileId": { + "type": "string", + "description": "The unique identifier of the file to retrieve" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.googledrive.defs#fileView" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_googledrive_getFiles.json b/crates/jacquard-api/lexicons/app_rocksky_googledrive_getFiles.json new file mode 100644 index 000000000..c19397b48 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_googledrive_getFiles.json @@ -0,0 +1,26 @@ +{ + "lexicon": 1, + "id": "app.rocksky.googledrive.getFiles", + "defs": { + "main": { + "type": "query", + "description": "Get a list of files from Google Drive", + "parameters": { + "type": "params", + "properties": { + "at": { + "type": "string", + "description": "Path to the Google Drive folder or root directory" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.googledrive.defs#fileListView" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_like.json b/crates/jacquard-api/lexicons/app_rocksky_like.json new file mode 100644 index 000000000..0dcbcff19 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_like.json @@ -0,0 +1,29 @@ +{ + "lexicon": 1, + "id": "app.rocksky.like", + "defs": { + "main": { + "type": "record", + "description": "A declaration of a like.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "createdAt", + "subject" + ], + "properties": { + "createdAt": { + "type": "string", + "description": "The date when the like was created.", + "format": "datetime" + }, + "subject": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_like_dislikeShout.json b/crates/jacquard-api/lexicons/app_rocksky_like_dislikeShout.json new file mode 100644 index 000000000..6e78bee3c --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_like_dislikeShout.json @@ -0,0 +1,30 @@ +{ + "lexicon": 1, + "id": "app.rocksky.like.dislikeShout", + "defs": { + "main": { + "type": "procedure", + "description": "Dislike a shout", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "The unique identifier of the shout to dislike", + "format": "at-uri" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.shout.defs#shoutView" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_like_dislikeSong.json b/crates/jacquard-api/lexicons/app_rocksky_like_dislikeSong.json new file mode 100644 index 000000000..dc8af51e6 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_like_dislikeSong.json @@ -0,0 +1,30 @@ +{ + "lexicon": 1, + "id": "app.rocksky.like.dislikeSong", + "defs": { + "main": { + "type": "procedure", + "description": "Dislike a song", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "The unique identifier of the song to dislike", + "format": "at-uri" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.song.defs#songViewDetailed" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_like_likeShout.json b/crates/jacquard-api/lexicons/app_rocksky_like_likeShout.json new file mode 100644 index 000000000..552db61f9 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_like_likeShout.json @@ -0,0 +1,30 @@ +{ + "lexicon": 1, + "id": "app.rocksky.like.likeShout", + "defs": { + "main": { + "type": "procedure", + "description": "Like a shout", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "The unique identifier of the shout to like", + "format": "at-uri" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.shout.defs#shoutView" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_like_likeSong.json b/crates/jacquard-api/lexicons/app_rocksky_like_likeSong.json new file mode 100644 index 000000000..f245eebe5 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_like_likeSong.json @@ -0,0 +1,30 @@ +{ + "lexicon": 1, + "id": "app.rocksky.like.likeSong", + "defs": { + "main": { + "type": "procedure", + "description": "Like a song", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "The unique identifier of the song to like", + "format": "at-uri" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.song.defs#songViewDetailed" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_player_defs.json b/crates/jacquard-api/lexicons/app_rocksky_player_defs.json new file mode 100644 index 000000000..0aff37491 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_player_defs.json @@ -0,0 +1,15 @@ +{ + "lexicon": 1, + "id": "app.rocksky.player.defs", + "defs": { + "currentlyPlayingViewDetailed": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The title of the currently playing track" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_player_getCurrentlyPlaying.json b/crates/jacquard-api/lexicons/app_rocksky_player_getCurrentlyPlaying.json new file mode 100644 index 000000000..2104b67f5 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_player_getCurrentlyPlaying.json @@ -0,0 +1,27 @@ +{ + "lexicon": 1, + "id": "app.rocksky.player.getCurrentlyPlaying", + "defs": { + "main": { + "type": "query", + "description": "Get the currently playing track", + "parameters": { + "type": "params", + "properties": { + "actor": { + "type": "string", + "description": "Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user.", + "format": "at-identifier" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.player.defs#currentlyPlayingViewDetailed" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_player_next.json b/crates/jacquard-api/lexicons/app_rocksky_player_next.json new file mode 100644 index 000000000..1e553a0e1 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_player_next.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "app.rocksky.player.next", + "defs": { + "main": { + "type": "procedure", + "description": "Play the next track in the queue" + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_player_pause.json b/crates/jacquard-api/lexicons/app_rocksky_player_pause.json new file mode 100644 index 000000000..16a4182b5 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_player_pause.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "app.rocksky.player.pause", + "defs": { + "main": { + "type": "procedure", + "description": "Pause the currently playing track" + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_player_play.json b/crates/jacquard-api/lexicons/app_rocksky_player_play.json new file mode 100644 index 000000000..46f15bd1a --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_player_play.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "app.rocksky.player.play", + "defs": { + "main": { + "type": "procedure", + "description": "Resume playback of the currently paused track" + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_player_previous.json b/crates/jacquard-api/lexicons/app_rocksky_player_previous.json new file mode 100644 index 000000000..b7f5b5378 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_player_previous.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "app.rocksky.player.previous", + "defs": { + "main": { + "type": "procedure", + "description": "Play the previous track in the queue" + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_player_seek.json b/crates/jacquard-api/lexicons/app_rocksky_player_seek.json new file mode 100644 index 000000000..536c889d5 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_player_seek.json @@ -0,0 +1,22 @@ +{ + "lexicon": 1, + "id": "app.rocksky.player.seek", + "defs": { + "main": { + "type": "procedure", + "description": "Seek to a specific position in the currently playing track", + "parameters": { + "type": "params", + "required": [ + "position" + ], + "properties": { + "position": { + "type": "integer", + "description": "The position in seconds to seek to" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_playlist.json b/crates/jacquard-api/lexicons/app_rocksky_playlist.json new file mode 100644 index 000000000..b35639b95 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_playlist.json @@ -0,0 +1,70 @@ +{ + "lexicon": 1, + "id": "app.rocksky.playlist", + "defs": { + "main": { + "type": "record", + "description": "A declaration of a playlist.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "name", + "createdAt" + ], + "properties": { + "appleMusicLink": { + "type": "string", + "description": "The Apple Music link of the playlist." + }, + "createdAt": { + "type": "string", + "description": "The date the playlist was created.", + "format": "datetime" + }, + "description": { + "type": "string", + "description": "The playlist description.", + "minLength": 1, + "maxLength": 256 + }, + "name": { + "type": "string", + "description": "The name of the playlist.", + "minLength": 1, + "maxLength": 512 + }, + "picture": { + "type": "blob", + "description": "The picture of the playlist.", + "accept": [ + "image/png", + "image/jpeg" + ], + "maxSize": 2000000 + }, + "spotifyLink": { + "type": "string", + "description": "The Spotify link of the playlist." + }, + "tidalLink": { + "type": "string", + "description": "The Tidal link of the playlist." + }, + "tracks": { + "type": "array", + "description": "The tracks in the playlist.", + "items": { + "type": "ref", + "ref": "app.rocksky.song#record" + } + }, + "youtubeLink": { + "type": "string", + "description": "The YouTube link of the playlist." + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_playlist_defs.json b/crates/jacquard-api/lexicons/app_rocksky_playlist_defs.json new file mode 100644 index 000000000..7396a5812 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_playlist_defs.json @@ -0,0 +1,123 @@ +{ + "lexicon": 1, + "id": "app.rocksky.playlist.defs", + "defs": { + "playlistViewBasic": { + "type": "object", + "description": "Basic view of a playlist, including its metadata", + "properties": { + "coverImageUrl": { + "type": "string", + "description": "The URL of the cover image for the playlist.", + "format": "uri" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the playlist was created.", + "format": "datetime" + }, + "curatorAvatarUrl": { + "type": "string", + "description": "The URL of the avatar image of the curator.", + "format": "uri" + }, + "curatorDid": { + "type": "string", + "description": "The DID of the curator of the playlist.", + "format": "at-identifier" + }, + "curatorHandle": { + "type": "string", + "description": "The handle of the curator of the playlist.", + "format": "at-identifier" + }, + "curatorName": { + "type": "string", + "description": "The name of the curator of the playlist." + }, + "description": { + "type": "string", + "description": "A description of the playlist." + }, + "id": { + "type": "string", + "description": "The unique identifier of the playlist." + }, + "title": { + "type": "string", + "description": "The title of the playlist." + }, + "trackCount": { + "type": "integer", + "description": "The number of tracks in the playlist.", + "minimum": 0 + }, + "uri": { + "type": "string", + "description": "The URI of the playlist.", + "format": "at-uri" + } + } + }, + "playlistViewDetailed": { + "type": "object", + "description": "Detailed view of a playlist, including its tracks and metadata", + "properties": { + "coverImageUrl": { + "type": "string", + "description": "The URL of the cover image for the playlist.", + "format": "uri" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the playlist was created.", + "format": "datetime" + }, + "curatorAvatarUrl": { + "type": "string", + "description": "The URL of the avatar image of the curator.", + "format": "uri" + }, + "curatorDid": { + "type": "string", + "description": "The DID of the curator of the playlist.", + "format": "at-identifier" + }, + "curatorHandle": { + "type": "string", + "description": "The handle of the curator of the playlist.", + "format": "at-identifier" + }, + "curatorName": { + "type": "string", + "description": "The name of the curator of the playlist." + }, + "description": { + "type": "string", + "description": "A description of the playlist." + }, + "id": { + "type": "string", + "description": "The unique identifier of the playlist." + }, + "title": { + "type": "string", + "description": "The title of the playlist." + }, + "tracks": { + "type": "array", + "description": "A list of tracks in the playlist.", + "items": { + "type": "ref", + "ref": "app.rocksky.song.defs#songViewBasic" + } + }, + "uri": { + "type": "string", + "description": "The URI of the playlist.", + "format": "at-uri" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_playlist_getPlaylist.json b/crates/jacquard-api/lexicons/app_rocksky_playlist_getPlaylist.json new file mode 100644 index 000000000..3810921df --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_playlist_getPlaylist.json @@ -0,0 +1,30 @@ +{ + "lexicon": 1, + "id": "app.rocksky.playlist.getPlaylist", + "defs": { + "main": { + "type": "query", + "description": "Retrieve a playlist by its ID", + "parameters": { + "type": "params", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string", + "description": "The URI of the playlist to retrieve.", + "format": "at-uri" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.playlist.defs#playlistViewDetailed" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_playlist_getPlaylists.json b/crates/jacquard-api/lexicons/app_rocksky_playlist_getPlaylists.json new file mode 100644 index 000000000..945850128 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_playlist_getPlaylists.json @@ -0,0 +1,38 @@ +{ + "lexicon": 1, + "id": "app.rocksky.playlist.getPlaylists", + "defs": { + "main": { + "type": "query", + "description": "Retrieve a list of playlists", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "description": "The maximum number of playlists to return." + }, + "offset": { + "type": "integer", + "description": "The offset for pagination, used to skip a number of playlists." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "playlists": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.playlist.defs#playlistViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_radio.json b/crates/jacquard-api/lexicons/app_rocksky_radio.json new file mode 100644 index 000000000..422777062 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_radio.json @@ -0,0 +1,63 @@ +{ + "lexicon": 1, + "id": "app.rocksky.radio", + "defs": { + "main": { + "type": "record", + "description": "A declaration of a radio station.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "name", + "url", + "createdAt" + ], + "properties": { + "createdAt": { + "type": "string", + "description": "The date when the radio station was created.", + "format": "datetime" + }, + "description": { + "type": "string", + "description": "A description of the radio station.", + "minLength": 1, + "maxLength": 1000 + }, + "genre": { + "type": "string", + "description": "The genre of the radio station.", + "minLength": 1, + "maxLength": 256 + }, + "logo": { + "type": "blob", + "description": "The logo of the radio station.", + "accept": [ + "image/png", + "image/jpeg" + ], + "maxSize": 2000000 + }, + "name": { + "type": "string", + "description": "The name of the radio station.", + "minLength": 1, + "maxLength": 512 + }, + "url": { + "type": "string", + "description": "The URL of the radio station.", + "format": "uri" + }, + "website": { + "type": "string", + "description": "The website of the radio station.", + "format": "uri" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_radio_defs.json b/crates/jacquard-api/lexicons/app_rocksky_radio_defs.json new file mode 100644 index 000000000..a52a09062 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_radio_defs.json @@ -0,0 +1,68 @@ +{ + "lexicon": 1, + "id": "app.rocksky.radio.defs", + "defs": { + "radioViewBasic": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "The date and time when the radio was created.", + "format": "datetime" + }, + "description": { + "type": "string", + "description": "A brief description of the radio." + }, + "id": { + "type": "string", + "description": "The unique identifier of the radio." + }, + "name": { + "type": "string", + "description": "The name of the radio." + } + } + }, + "radioViewDetailed": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "The date and time when the radio was created.", + "format": "datetime" + }, + "description": { + "type": "string", + "description": "A brief description of the radio." + }, + "genre": { + "type": "string", + "description": "The genre of the radio." + }, + "id": { + "type": "string", + "description": "The unique identifier of the radio." + }, + "logo": { + "type": "string", + "description": "The logo of the radio station." + }, + "name": { + "type": "string", + "description": "The name of the radio." + }, + "url": { + "type": "string", + "description": "The streaming URL of the radio.", + "format": "uri" + }, + "website": { + "type": "string", + "description": "The website of the radio.", + "format": "uri" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_scrobble.json b/crates/jacquard-api/lexicons/app_rocksky_scrobble.json new file mode 100644 index 000000000..2db40c452 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_scrobble.json @@ -0,0 +1,149 @@ +{ + "lexicon": 1, + "id": "app.rocksky.scrobble", + "defs": { + "main": { + "type": "record", + "description": "A declaration of a scrobble.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "title", + "artist", + "album", + "albumArtist", + "duration", + "createdAt" + ], + "properties": { + "album": { + "type": "string", + "description": "The album of the song.", + "minLength": 1, + "maxLength": 256 + }, + "albumArt": { + "type": "blob", + "description": "The album art of the song.", + "accept": [ + "image/png", + "image/jpeg" + ], + "maxSize": 2000000 + }, + "albumArtist": { + "type": "string", + "description": "The album artist of the song.", + "minLength": 1, + "maxLength": 256 + }, + "appleMusicLink": { + "type": "string", + "description": "The Apple Music link of the song.", + "format": "uri" + }, + "artist": { + "type": "string", + "description": "The artist of the song.", + "minLength": 1, + "maxLength": 256 + }, + "composer": { + "type": "string", + "description": "The composer of the song.", + "maxLength": 256 + }, + "copyrightMessage": { + "type": "string", + "description": "The copyright message of the song.", + "maxLength": 256 + }, + "createdAt": { + "type": "string", + "description": "The date when the song was created.", + "format": "datetime" + }, + "discNumber": { + "type": "integer", + "description": "The disc number of the song in the album.", + "minimum": 1 + }, + "duration": { + "type": "integer", + "description": "The duration of the song in seconds.", + "minimum": 1 + }, + "genre": { + "type": "string", + "description": "The genre of the song.", + "maxLength": 256 + }, + "label": { + "type": "string", + "description": "The label of the song.", + "maxLength": 256 + }, + "lyrics": { + "type": "string", + "description": "The lyrics of the song.", + "maxLength": 10000 + }, + "mbid": { + "type": "string", + "description": "The MusicBrainz ID of the song." + }, + "releaseDate": { + "type": "string", + "description": "The release date of the song.", + "format": "datetime" + }, + "spotifyLink": { + "type": "string", + "description": "The Spotify link of the song.", + "format": "uri" + }, + "tags": { + "type": "array", + "description": "The tags of the song.", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 256 + } + }, + "tidalLink": { + "type": "string", + "description": "The Tidal link of the song.", + "format": "uri" + }, + "title": { + "type": "string", + "description": "The title of the song.", + "minLength": 1, + "maxLength": 512 + }, + "trackNumber": { + "type": "integer", + "description": "The track number of the song in the album.", + "minimum": 1 + }, + "wiki": { + "type": "string", + "description": "Informations about the song", + "maxLength": 10000 + }, + "year": { + "type": "integer", + "description": "The year the song was released." + }, + "youtubeLink": { + "type": "string", + "description": "The YouTube link of the song.", + "format": "uri" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_scrobble_createScrobble.json b/crates/jacquard-api/lexicons/app_rocksky_scrobble_createScrobble.json new file mode 100644 index 000000000..663c45857 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_scrobble_createScrobble.json @@ -0,0 +1,125 @@ +{ + "lexicon": 1, + "id": "app.rocksky.scrobble.createScrobble", + "defs": { + "main": { + "type": "procedure", + "description": "Create a new scrobble", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "title", + "artist" + ], + "properties": { + "album": { + "type": "string", + "description": "The album of the track being scrobbled" + }, + "albumArt": { + "type": "string", + "description": "The URL of the album art for the track", + "format": "uri" + }, + "appleMusicLink": { + "type": "string", + "description": "The Apple Music link for the track, if available", + "format": "uri" + }, + "artist": { + "type": "string", + "description": "The artist of the track being scrobbled" + }, + "artistPicture": { + "type": "string", + "description": "The URL of the artist's picture, if available", + "format": "uri" + }, + "composer": { + "type": "string", + "description": "The composer of the track, if available" + }, + "copyrightMessage": { + "type": "string", + "description": "The copyright message for the track, if available" + }, + "deezerLink": { + "type": "string", + "description": "The Deezer link for the track, if available", + "format": "uri" + }, + "discNumber": { + "type": "integer", + "description": "The disc number of the track in the album, if applicable" + }, + "duration": { + "type": "integer", + "description": "The duration of the track in seconds" + }, + "label": { + "type": "string", + "description": "The record label of the track, if available" + }, + "lastfmLink": { + "type": "string", + "description": "The Last.fm link for the track, if available", + "format": "uri" + }, + "lyrics": { + "type": "string", + "description": "The lyrics of the track, if available" + }, + "mbId": { + "type": "string", + "description": "The MusicBrainz ID of the track, if available" + }, + "releaseDate": { + "type": "string", + "description": "The release date of the track, formatted as YYYY-MM-DD" + }, + "spotifyLink": { + "type": "string", + "description": "The Spotify link for the track, if available", + "format": "uri" + }, + "tidalLink": { + "type": "string", + "description": "The Tidal link for the track, if available", + "format": "uri" + }, + "timestamp": { + "type": "integer", + "description": "The timestamp of the scrobble in milliseconds since epoch" + }, + "title": { + "type": "string", + "description": "The title of the track being scrobbled" + }, + "trackNumber": { + "type": "integer", + "description": "The track number of the track in the album" + }, + "year": { + "type": "integer", + "description": "The year the track was released" + }, + "youtubeLink": { + "type": "string", + "description": "The Youtube link for the track, if available", + "format": "uri" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.scrobble.defs#scrobbleViewBasic" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_scrobble_defs.json b/crates/jacquard-api/lexicons/app_rocksky_scrobble_defs.json new file mode 100644 index 000000000..63d63ac7f --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_scrobble_defs.json @@ -0,0 +1,122 @@ +{ + "lexicon": 1, + "id": "app.rocksky.scrobble.defs", + "defs": { + "scrobbleViewBasic": { + "type": "object", + "properties": { + "album": { + "type": "string", + "description": "The album of the song." + }, + "albumUri": { + "type": "string", + "description": "The URI of the album.", + "format": "at-uri" + }, + "artist": { + "type": "string", + "description": "The artist of the song." + }, + "artistUri": { + "type": "string", + "description": "The URI of the artist.", + "format": "at-uri" + }, + "cover": { + "type": "string", + "description": "The album art URL of the song.", + "format": "uri" + }, + "date": { + "type": "string", + "description": "The timestamp when the scrobble was created.", + "format": "datetime" + }, + "id": { + "type": "string", + "description": "The unique identifier of the scrobble." + }, + "sha256": { + "type": "string", + "description": "The SHA256 hash of the scrobble data." + }, + "title": { + "type": "string", + "description": "The title of the scrobble." + }, + "uri": { + "type": "string", + "description": "The URI of the scrobble.", + "format": "uri" + }, + "user": { + "type": "string", + "description": "The handle of the user who created the scrobble." + } + } + }, + "scrobbleViewDetailed": { + "type": "object", + "properties": { + "album": { + "type": "string", + "description": "The album of the song." + }, + "albumUri": { + "type": "string", + "description": "The URI of the album.", + "format": "at-uri" + }, + "artist": { + "type": "string", + "description": "The artist of the song." + }, + "artistUri": { + "type": "string", + "description": "The URI of the artist.", + "format": "at-uri" + }, + "cover": { + "type": "string", + "description": "The album art URL of the song.", + "format": "uri" + }, + "date": { + "type": "string", + "description": "The timestamp when the scrobble was created.", + "format": "datetime" + }, + "id": { + "type": "string", + "description": "The unique identifier of the scrobble." + }, + "listeners": { + "type": "integer", + "description": "The number of listeners" + }, + "scrobbles": { + "type": "integer", + "description": "The number of scrobbles for this song" + }, + "sha256": { + "type": "string", + "description": "The SHA256 hash of the scrobble data." + }, + "title": { + "type": "string", + "description": "The title of the scrobble." + }, + "uri": { + "type": "string", + "description": "The URI of the scrobble.", + "format": "uri" + }, + "user": { + "type": "string", + "description": "The handle of the user who created the scrobble." + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_scrobble_getScrobble.json b/crates/jacquard-api/lexicons/app_rocksky_scrobble_getScrobble.json new file mode 100644 index 000000000..e2da355a3 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_scrobble_getScrobble.json @@ -0,0 +1,30 @@ +{ + "lexicon": 1, + "id": "app.rocksky.scrobble.getScrobble", + "defs": { + "main": { + "type": "query", + "description": "Get a scrobble by its unique identifier", + "parameters": { + "type": "params", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string", + "description": "The unique identifier of the scrobble", + "format": "at-uri" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.scrobble.defs#scrobbleViewDetailed" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_scrobble_getScrobbles.json b/crates/jacquard-api/lexicons/app_rocksky_scrobble_getScrobbles.json new file mode 100644 index 000000000..c64fa6287 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_scrobble_getScrobbles.json @@ -0,0 +1,45 @@ +{ + "lexicon": 1, + "id": "app.rocksky.scrobble.getScrobbles", + "defs": { + "main": { + "type": "query", + "description": "Get scrobbles all scrobbles", + "parameters": { + "type": "params", + "properties": { + "did": { + "type": "string", + "description": "The DID or handle of the actor", + "format": "at-identifier" + }, + "limit": { + "type": "integer", + "description": "The maximum number of scrobbles to return", + "minimum": 1 + }, + "offset": { + "type": "integer", + "description": "The offset for pagination", + "minimum": 0 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "scrobbles": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.scrobble.defs#scrobbleViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_shout.json b/crates/jacquard-api/lexicons/app_rocksky_shout.json new file mode 100644 index 000000000..9534490e9 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_shout.json @@ -0,0 +1,40 @@ +{ + "lexicon": 1, + "id": "app.rocksky.shout", + "defs": { + "main": { + "type": "record", + "description": "A declaration of a shout.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "message", + "createdAt", + "subject" + ], + "properties": { + "createdAt": { + "type": "string", + "description": "The date when the shout was created.", + "format": "datetime" + }, + "message": { + "type": "string", + "description": "The message of the shout.", + "minLength": 1, + "maxLength": 1000 + }, + "parent": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "subject": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_shout_createShout.json b/crates/jacquard-api/lexicons/app_rocksky_shout_createShout.json new file mode 100644 index 000000000..b589b1892 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_shout_createShout.json @@ -0,0 +1,30 @@ +{ + "lexicon": 1, + "id": "app.rocksky.shout.createShout", + "defs": { + "main": { + "type": "procedure", + "description": "Create a new shout", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "The content of the shout", + "minLength": 1 + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.shout.defs#shoutView" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_shout_defs.json b/crates/jacquard-api/lexicons/app_rocksky_shout_defs.json new file mode 100644 index 000000000..15140262f --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_shout_defs.json @@ -0,0 +1,61 @@ +{ + "lexicon": 1, + "id": "app.rocksky.shout.defs", + "defs": { + "author": { + "type": "object", + "properties": { + "avatar": { + "type": "string", + "description": "The URL of the author's avatar image.", + "format": "uri" + }, + "did": { + "type": "string", + "description": "The decentralized identifier (DID) of the author.", + "format": "at-identifier" + }, + "displayName": { + "type": "string", + "description": "The display name of the author." + }, + "handle": { + "type": "string", + "description": "The handle of the author.", + "format": "at-identifier" + }, + "id": { + "type": "string", + "description": "The unique identifier of the author." + } + } + }, + "shoutView": { + "type": "object", + "properties": { + "author": { + "type": "ref", + "description": "The author of the shout.", + "ref": "app.rocksky.shout.defs#author" + }, + "createdAt": { + "type": "string", + "description": "The date and time when the shout was created.", + "format": "datetime" + }, + "id": { + "type": "string", + "description": "The unique identifier of the shout." + }, + "message": { + "type": "string", + "description": "The content of the shout." + }, + "parent": { + "type": "string", + "description": "The ID of the parent shout if this is a reply, otherwise null." + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_shout_getAlbumShouts.json b/crates/jacquard-api/lexicons/app_rocksky_shout_getAlbumShouts.json new file mode 100644 index 000000000..cea0ef69b --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_shout_getAlbumShouts.json @@ -0,0 +1,48 @@ +{ + "lexicon": 1, + "id": "app.rocksky.shout.getAlbumShouts", + "defs": { + "main": { + "type": "query", + "description": "Get shouts for an album", + "parameters": { + "type": "params", + "required": [ + "uri" + ], + "properties": { + "limit": { + "type": "integer", + "description": "The maximum number of shouts to return", + "minimum": 1 + }, + "offset": { + "type": "integer", + "description": "The number of shouts to skip before starting to collect the result set", + "minimum": 0 + }, + "uri": { + "type": "string", + "description": "The unique identifier of the album to retrieve shouts for", + "format": "at-uri" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "shouts": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.shout.defs#shoutViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_shout_getArtistShouts.json b/crates/jacquard-api/lexicons/app_rocksky_shout_getArtistShouts.json new file mode 100644 index 000000000..a81614f5a --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_shout_getArtistShouts.json @@ -0,0 +1,48 @@ +{ + "lexicon": 1, + "id": "app.rocksky.shout.getArtistShouts", + "defs": { + "main": { + "type": "query", + "description": "Get shouts for an artist", + "parameters": { + "type": "params", + "required": [ + "uri" + ], + "properties": { + "limit": { + "type": "integer", + "description": "The maximum number of shouts to return", + "minimum": 1 + }, + "offset": { + "type": "integer", + "description": "The number of shouts to skip before starting to collect the result set", + "minimum": 0 + }, + "uri": { + "type": "string", + "description": "The URI of the artist to retrieve shouts for", + "format": "at-uri" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "shouts": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.shout.defs#shoutViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_shout_getProfileShouts.json b/crates/jacquard-api/lexicons/app_rocksky_shout_getProfileShouts.json new file mode 100644 index 000000000..67f5af5ca --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_shout_getProfileShouts.json @@ -0,0 +1,48 @@ +{ + "lexicon": 1, + "id": "app.rocksky.shout.getProfileShouts", + "defs": { + "main": { + "type": "query", + "description": "Get the shouts of an actor's profile", + "parameters": { + "type": "params", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "description": "The DID or handle of the actor", + "format": "at-identifier" + }, + "limit": { + "type": "integer", + "description": "The maximum number of shouts to return", + "minimum": 1 + }, + "offset": { + "type": "integer", + "description": "The offset for pagination", + "minimum": 0 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "shouts": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.shout.defs#shoutViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_shout_getShoutReplies.json b/crates/jacquard-api/lexicons/app_rocksky_shout_getShoutReplies.json new file mode 100644 index 000000000..f456e085e --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_shout_getShoutReplies.json @@ -0,0 +1,48 @@ +{ + "lexicon": 1, + "id": "app.rocksky.shout.getShoutReplies", + "defs": { + "main": { + "type": "query", + "description": "Get replies to a shout", + "parameters": { + "type": "params", + "required": [ + "uri" + ], + "properties": { + "limit": { + "type": "integer", + "description": "The maximum number of shouts to return", + "minimum": 1 + }, + "offset": { + "type": "integer", + "description": "The number of shouts to skip before starting to collect the result set", + "minimum": 0 + }, + "uri": { + "type": "string", + "description": "The URI of the shout to retrieve replies for", + "format": "at-uri" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "shouts": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.shout.defs#shoutViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_shout_getTrackShouts.json b/crates/jacquard-api/lexicons/app_rocksky_shout_getTrackShouts.json new file mode 100644 index 000000000..513de0450 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_shout_getTrackShouts.json @@ -0,0 +1,38 @@ +{ + "lexicon": 1, + "id": "app.rocksky.shout.getTrackShouts", + "defs": { + "main": { + "type": "query", + "description": "Get all shouts for a specific track", + "parameters": { + "type": "params", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string", + "description": "The URI of the track to retrieve shouts for", + "format": "at-uri" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "shouts": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.shout.defs#shoutViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_shout_removeShout.json b/crates/jacquard-api/lexicons/app_rocksky_shout_removeShout.json new file mode 100644 index 000000000..29cff5167 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_shout_removeShout.json @@ -0,0 +1,29 @@ +{ + "lexicon": 1, + "id": "app.rocksky.shout.removeShout", + "defs": { + "main": { + "type": "procedure", + "description": "Remove a shout by its ID", + "parameters": { + "type": "params", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "The ID of the shout to be removed" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.shout.defs#shoutView" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_shout_replyShout.json b/crates/jacquard-api/lexicons/app_rocksky_shout_replyShout.json new file mode 100644 index 000000000..c399d694d --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_shout_replyShout.json @@ -0,0 +1,38 @@ +{ + "lexicon": 1, + "id": "app.rocksky.shout.replyShout", + "defs": { + "main": { + "type": "procedure", + "description": "Reply to a shout", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "shoutId", + "message" + ], + "properties": { + "message": { + "type": "string", + "description": "The content of the reply", + "minLength": 1 + }, + "shoutId": { + "type": "string", + "description": "The unique identifier of the shout to reply to" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.shout.defs#shoutView" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_shout_reportShout.json b/crates/jacquard-api/lexicons/app_rocksky_shout_reportShout.json new file mode 100644 index 000000000..a1207d464 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_shout_reportShout.json @@ -0,0 +1,37 @@ +{ + "lexicon": 1, + "id": "app.rocksky.shout.reportShout", + "defs": { + "main": { + "type": "procedure", + "description": "Report a shout for moderation", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "shoutId" + ], + "properties": { + "reason": { + "type": "string", + "description": "The reason for reporting the shout", + "minLength": 1 + }, + "shoutId": { + "type": "string", + "description": "The unique identifier of the shout to report" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.shout.defs#shoutView" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_song.json b/crates/jacquard-api/lexicons/app_rocksky_song.json new file mode 100644 index 000000000..2d3402547 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_song.json @@ -0,0 +1,150 @@ +{ + "lexicon": 1, + "id": "app.rocksky.song", + "defs": { + "main": { + "type": "record", + "description": "A declaration of a song.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "title", + "artist", + "album", + "albumArtist", + "duration", + "createdAt" + ], + "properties": { + "album": { + "type": "string", + "description": "The album of the song.", + "minLength": 1, + "maxLength": 256 + }, + "albumArt": { + "type": "blob", + "description": "The album art of the song.", + "accept": [ + "image/png", + "image/jpeg" + ], + "maxSize": 2000000 + }, + "albumArtist": { + "type": "string", + "description": "The album artist of the song.", + "minLength": 1, + "maxLength": 256 + }, + "appleMusicLink": { + "type": "string", + "description": "The Apple Music link of the song.", + "format": "uri" + }, + "artist": { + "type": "string", + "description": "The artist of the song.", + "minLength": 1, + "maxLength": 256 + }, + "composer": { + "type": "string", + "description": "The composer of the song.", + "maxLength": 256 + }, + "copyrightMessage": { + "type": "string", + "description": "The copyright message of the song.", + "maxLength": 256 + }, + "createdAt": { + "type": "string", + "description": "The date when the song was created.", + "format": "datetime" + }, + "discNumber": { + "type": "integer", + "description": "The disc number of the song in the album.", + "minimum": 1 + }, + "duration": { + "type": "integer", + "description": "The duration of the song in seconds.", + "minimum": 1 + }, + "genre": { + "type": "string", + "description": "The genre of the song.", + "minLength": 1, + "maxLength": 256 + }, + "label": { + "type": "string", + "description": "The label of the song.", + "maxLength": 256 + }, + "lyrics": { + "type": "string", + "description": "The lyrics of the song.", + "maxLength": 10000 + }, + "mbid": { + "type": "string", + "description": "The MusicBrainz ID of the song." + }, + "releaseDate": { + "type": "string", + "description": "The release date of the song.", + "format": "datetime" + }, + "spotifyLink": { + "type": "string", + "description": "The Spotify link of the song.", + "format": "uri" + }, + "tags": { + "type": "array", + "description": "The tags of the song.", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 256 + } + }, + "tidalLink": { + "type": "string", + "description": "The Tidal link of the song.", + "format": "uri" + }, + "title": { + "type": "string", + "description": "The title of the song.", + "minLength": 1, + "maxLength": 512 + }, + "trackNumber": { + "type": "integer", + "description": "The track number of the song in the album.", + "minimum": 1 + }, + "wiki": { + "type": "string", + "description": "Informations about the song", + "maxLength": 10000 + }, + "year": { + "type": "integer", + "description": "The year the song was released." + }, + "youtubeLink": { + "type": "string", + "description": "The YouTube link of the song.", + "format": "uri" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_song_createSong.json b/crates/jacquard-api/lexicons/app_rocksky_song_createSong.json new file mode 100644 index 000000000..2cf9ce337 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_song_createSong.json @@ -0,0 +1,80 @@ +{ + "lexicon": 1, + "id": "app.rocksky.song.createSong", + "defs": { + "main": { + "type": "procedure", + "description": "Create a new song", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "title", + "artist", + "album", + "albumArtist" + ], + "properties": { + "album": { + "type": "string", + "description": "The album of the song, if applicable" + }, + "albumArt": { + "type": "string", + "description": "The URL of the album art for the song", + "format": "uri" + }, + "albumArtist": { + "type": "string", + "description": "The album artist of the song, if different from the main artist" + }, + "artist": { + "type": "string", + "description": "The artist of the song" + }, + "discNumber": { + "type": "integer", + "description": "The disc number of the song in the album, if applicable" + }, + "duration": { + "type": "integer", + "description": "The duration of the song in seconds" + }, + "lyrics": { + "type": "string", + "description": "The lyrics of the song, if available" + }, + "mbId": { + "type": "string", + "description": "The MusicBrainz ID of the song, if available" + }, + "releaseDate": { + "type": "string", + "description": "The release date of the song, formatted as YYYY-MM-DD" + }, + "title": { + "type": "string", + "description": "The title of the song" + }, + "trackNumber": { + "type": "integer", + "description": "The track number of the song in the album, if applicable" + }, + "year": { + "type": "integer", + "description": "The year the song was released" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.song.defs#songViewDetailed" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_song_defs.json b/crates/jacquard-api/lexicons/app_rocksky_song_defs.json new file mode 100644 index 000000000..b2268ed9f --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_song_defs.json @@ -0,0 +1,158 @@ +{ + "lexicon": 1, + "id": "app.rocksky.song.defs", + "defs": { + "songViewBasic": { + "type": "object", + "properties": { + "album": { + "type": "string", + "description": "The album of the song." + }, + "albumArt": { + "type": "string", + "description": "The URL of the album art image.", + "format": "uri" + }, + "albumArtist": { + "type": "string", + "description": "The artist of the album the song belongs to." + }, + "albumUri": { + "type": "string", + "description": "The URI of the album the song belongs to.", + "format": "at-uri" + }, + "artist": { + "type": "string", + "description": "The artist of the song." + }, + "artistUri": { + "type": "string", + "description": "The URI of the artist of the song.", + "format": "at-uri" + }, + "createdAt": { + "type": "string", + "description": "The timestamp when the song was created.", + "format": "datetime" + }, + "discNumber": { + "type": "integer", + "description": "The disc number of the song in the album." + }, + "duration": { + "type": "integer", + "description": "The duration of the song in milliseconds." + }, + "id": { + "type": "string", + "description": "The unique identifier of the song." + }, + "playCount": { + "type": "integer", + "description": "The number of times the song has been played.", + "minimum": 0 + }, + "sha256": { + "type": "string", + "description": "The SHA256 hash of the song." + }, + "title": { + "type": "string", + "description": "The title of the song." + }, + "trackNumber": { + "type": "integer", + "description": "The track number of the song in the album." + }, + "uniqueListeners": { + "type": "integer", + "description": "The number of unique listeners who have played the song.", + "minimum": 0 + }, + "uri": { + "type": "string", + "description": "The URI of the song.", + "format": "at-uri" + } + } + }, + "songViewDetailed": { + "type": "object", + "properties": { + "album": { + "type": "string", + "description": "The album of the song." + }, + "albumArt": { + "type": "string", + "description": "The URL of the album art image.", + "format": "uri" + }, + "albumArtist": { + "type": "string", + "description": "The artist of the album the song belongs to." + }, + "albumUri": { + "type": "string", + "description": "The URI of the album the song belongs to.", + "format": "at-uri" + }, + "artist": { + "type": "string", + "description": "The artist of the song." + }, + "artistUri": { + "type": "string", + "description": "The URI of the artist of the song.", + "format": "at-uri" + }, + "createdAt": { + "type": "string", + "description": "The timestamp when the song was created.", + "format": "datetime" + }, + "discNumber": { + "type": "integer", + "description": "The disc number of the song in the album." + }, + "duration": { + "type": "integer", + "description": "The duration of the song in milliseconds." + }, + "id": { + "type": "string", + "description": "The unique identifier of the song." + }, + "playCount": { + "type": "integer", + "description": "The number of times the song has been played.", + "minimum": 0 + }, + "sha256": { + "type": "string", + "description": "The SHA256 hash of the song." + }, + "title": { + "type": "string", + "description": "The title of the song." + }, + "trackNumber": { + "type": "integer", + "description": "The track number of the song in the album." + }, + "uniqueListeners": { + "type": "integer", + "description": "The number of unique listeners who have played the song.", + "minimum": 0 + }, + "uri": { + "type": "string", + "description": "The URI of the song.", + "format": "at-uri" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_song_getSong.json b/crates/jacquard-api/lexicons/app_rocksky_song_getSong.json new file mode 100644 index 000000000..42d783a03 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_song_getSong.json @@ -0,0 +1,30 @@ +{ + "lexicon": 1, + "id": "app.rocksky.song.getSong", + "defs": { + "main": { + "type": "query", + "description": "Get a song by its uri", + "parameters": { + "type": "params", + "required": [ + "uri" + ], + "properties": { + "uri": { + "type": "string", + "description": "The unique identifier of the song to retrieve", + "format": "at-uri" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.song.defs#songViewDetailed" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_song_getSongs.json b/crates/jacquard-api/lexicons/app_rocksky_song_getSongs.json new file mode 100644 index 000000000..d67b45a89 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_song_getSongs.json @@ -0,0 +1,40 @@ +{ + "lexicon": 1, + "id": "app.rocksky.song.getSongs", + "defs": { + "main": { + "type": "query", + "description": "Get songs", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "description": "The maximum number of songs to return", + "minimum": 1 + }, + "offset": { + "type": "integer", + "description": "The offset for pagination", + "minimum": 0 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "songs": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.rocksky.song.defs#songViewBasic" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_spotify_defs.json b/crates/jacquard-api/lexicons/app_rocksky_spotify_defs.json new file mode 100644 index 000000000..6b825c1b6 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_spotify_defs.json @@ -0,0 +1,35 @@ +{ + "lexicon": 1, + "id": "app.rocksky.spotify.defs", + "defs": { + "spotifyTrackView": { + "type": "object", + "properties": { + "album": { + "type": "string", + "description": "The name of the album." + }, + "artist": { + "type": "string", + "description": "The name of the artist." + }, + "duration": { + "type": "integer", + "description": "The duration of the track in milliseconds." + }, + "id": { + "type": "string", + "description": "The unique identifier of the Spotify track." + }, + "name": { + "type": "string", + "description": "The name of the track." + }, + "previewUrl": { + "type": "string", + "description": "A URL to a preview of the track." + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_spotify_getCurrentlyPlaying.json b/crates/jacquard-api/lexicons/app_rocksky_spotify_getCurrentlyPlaying.json new file mode 100644 index 000000000..18b39f32a --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_spotify_getCurrentlyPlaying.json @@ -0,0 +1,27 @@ +{ + "lexicon": 1, + "id": "app.rocksky.spotify.getCurrentlyPlaying", + "defs": { + "main": { + "type": "query", + "description": "Get the currently playing track", + "parameters": { + "type": "params", + "properties": { + "actor": { + "type": "string", + "description": "Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user.", + "format": "at-identifier" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.player.defs#currentlyPlayingViewDetailed" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_spotify_next.json b/crates/jacquard-api/lexicons/app_rocksky_spotify_next.json new file mode 100644 index 000000000..e386bc4e8 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_spotify_next.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "app.rocksky.spotify.next", + "defs": { + "main": { + "type": "procedure", + "description": "Play the next track in the queue" + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_spotify_pause.json b/crates/jacquard-api/lexicons/app_rocksky_spotify_pause.json new file mode 100644 index 000000000..4751d032b --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_spotify_pause.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "app.rocksky.spotify.pause", + "defs": { + "main": { + "type": "procedure", + "description": "Pause the currently playing track" + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_spotify_play.json b/crates/jacquard-api/lexicons/app_rocksky_spotify_play.json new file mode 100644 index 000000000..76137baa1 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_spotify_play.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "app.rocksky.spotify.play", + "defs": { + "main": { + "type": "procedure", + "description": "Resume playback of the currently paused track" + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_spotify_previous.json b/crates/jacquard-api/lexicons/app_rocksky_spotify_previous.json new file mode 100644 index 000000000..c972f9984 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_spotify_previous.json @@ -0,0 +1,10 @@ +{ + "lexicon": 1, + "id": "app.rocksky.spotify.previous", + "defs": { + "main": { + "type": "procedure", + "description": "Play the previous track in the queue" + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_spotify_seek.json b/crates/jacquard-api/lexicons/app_rocksky_spotify_seek.json new file mode 100644 index 000000000..f53517281 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_spotify_seek.json @@ -0,0 +1,22 @@ +{ + "lexicon": 1, + "id": "app.rocksky.spotify.seek", + "defs": { + "main": { + "type": "procedure", + "description": "Seek to a specific position in the currently playing track", + "parameters": { + "type": "params", + "required": [ + "position" + ], + "properties": { + "position": { + "type": "integer", + "description": "The position in seconds to seek to" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_stats_defs.json b/crates/jacquard-api/lexicons/app_rocksky_stats_defs.json new file mode 100644 index 000000000..05f16e51a --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_stats_defs.json @@ -0,0 +1,31 @@ +{ + "lexicon": 1, + "id": "app.rocksky.stats.defs", + "defs": { + "statsView": { + "type": "object", + "properties": { + "albums": { + "type": "integer", + "description": "The total number of unique albums scrobbled." + }, + "artists": { + "type": "integer", + "description": "The total number of unique artists scrobbled." + }, + "lovedTracks": { + "type": "integer", + "description": "The total number of tracks marked as loved." + }, + "scrobbles": { + "type": "integer", + "description": "The total number of scrobbles." + }, + "tracks": { + "type": "integer", + "description": "The total number of unique tracks scrobbled." + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/app_rocksky_stats_getStats.json b/crates/jacquard-api/lexicons/app_rocksky_stats_getStats.json new file mode 100644 index 000000000..6424b8c05 --- /dev/null +++ b/crates/jacquard-api/lexicons/app_rocksky_stats_getStats.json @@ -0,0 +1,29 @@ +{ + "lexicon": 1, + "id": "app.rocksky.stats.getStats", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "description": "The DID or handle of the user to get stats for.", + "format": "at-identifier" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "app.rocksky.stats.defs#statsView" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky.rs b/crates/jacquard-api/src/app_rocksky.rs new file mode 100644 index 000000000..3a6f01ab1 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky.rs @@ -0,0 +1,22 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod actor; +pub mod album; +pub mod apikey; +pub mod artist; +pub mod charts; +pub mod dropbox; +pub mod feed; +pub mod googledrive; +pub mod like; +pub mod player; +pub mod playlist; +pub mod radio; +pub mod scrobble; +pub mod shout; +pub mod song; +pub mod spotify; +pub mod stats; \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/actor.rs b/crates/jacquard-api/src/app_rocksky/actor.rs new file mode 100644 index 000000000..3aaeb3938 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/actor.rs @@ -0,0 +1,96 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.actor.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_actor_albums; +pub mod get_actor_artists; +pub mod get_actor_loved_songs; +pub mod get_actor_playlists; +pub mod get_actor_scrobbles; +pub mod get_actor_songs; +pub mod get_profile; + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct ProfileViewBasic<'a> { + /// The URL of the actor's avatar image. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub avatar: std::option::Option>, + /// The date and time when the actor was created. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub created_at: std::option::Option, + /// The DID of the actor. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub did: std::option::Option>, + /// The display name of the actor. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub display_name: std::option::Option>, + /// The handle of the actor. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub handle: std::option::Option>, + /// The unique identifier of the actor. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The date and time when the actor was last updated. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub updated_at: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct ProfileViewDetailed<'a> { + /// The URL of the actor's avatar image. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub avatar: std::option::Option>, + /// The date and time when the actor was created. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub created_at: std::option::Option, + /// The DID of the actor. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub did: std::option::Option>, + /// The display name of the actor. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub display_name: std::option::Option>, + /// The handle of the actor. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub handle: std::option::Option>, + /// The unique identifier of the actor. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The date and time when the actor was last updated. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub updated_at: std::option::Option, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/actor/get_actor_albums.rs b/crates/jacquard-api/src/app_rocksky/actor/get_actor_albums.rs new file mode 100644 index 000000000..571697ce0 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/actor/get_actor_albums.rs @@ -0,0 +1,73 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.actor.getActorAlbums +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetActorAlbums<'a> { + #[serde(borrow)] + pub did: jacquard_common::types::ident::AtIdentifier<'a>, + ///(min: 1) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + ///(min: 0) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetActorAlbumsOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub albums: std::option::Option>>, +} + +///Response type for +///app.rocksky.actor.getActorAlbums +pub struct GetActorAlbumsResponse; +impl jacquard_common::xrpc::XrpcResp for GetActorAlbumsResponse { + const NSID: &'static str = "app.rocksky.actor.getActorAlbums"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetActorAlbumsOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetActorAlbums<'a> { + const NSID: &'static str = "app.rocksky.actor.getActorAlbums"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetActorAlbumsResponse; +} + +///Endpoint type for +///app.rocksky.actor.getActorAlbums +pub struct GetActorAlbumsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetActorAlbumsRequest { + const PATH: &'static str = "/xrpc/app.rocksky.actor.getActorAlbums"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetActorAlbums<'de>; + type Response = GetActorAlbumsResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/actor/get_actor_artists.rs b/crates/jacquard-api/src/app_rocksky/actor/get_actor_artists.rs new file mode 100644 index 000000000..269838885 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/actor/get_actor_artists.rs @@ -0,0 +1,75 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.actor.getActorArtists +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetActorArtists<'a> { + #[serde(borrow)] + pub did: jacquard_common::types::ident::AtIdentifier<'a>, + ///(min: 1) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + ///(min: 0) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetActorArtistsOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artists: std::option::Option< + Vec>, + >, +} + +///Response type for +///app.rocksky.actor.getActorArtists +pub struct GetActorArtistsResponse; +impl jacquard_common::xrpc::XrpcResp for GetActorArtistsResponse { + const NSID: &'static str = "app.rocksky.actor.getActorArtists"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetActorArtistsOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetActorArtists<'a> { + const NSID: &'static str = "app.rocksky.actor.getActorArtists"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetActorArtistsResponse; +} + +///Endpoint type for +///app.rocksky.actor.getActorArtists +pub struct GetActorArtistsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetActorArtistsRequest { + const PATH: &'static str = "/xrpc/app.rocksky.actor.getActorArtists"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetActorArtists<'de>; + type Response = GetActorArtistsResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/actor/get_actor_loved_songs.rs b/crates/jacquard-api/src/app_rocksky/actor/get_actor_loved_songs.rs new file mode 100644 index 000000000..22f7edbea --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/actor/get_actor_loved_songs.rs @@ -0,0 +1,73 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.actor.getActorLovedSongs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetActorLovedSongs<'a> { + #[serde(borrow)] + pub did: jacquard_common::types::ident::AtIdentifier<'a>, + ///(min: 1) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + ///(min: 0) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetActorLovedSongsOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub tracks: std::option::Option>>, +} + +///Response type for +///app.rocksky.actor.getActorLovedSongs +pub struct GetActorLovedSongsResponse; +impl jacquard_common::xrpc::XrpcResp for GetActorLovedSongsResponse { + const NSID: &'static str = "app.rocksky.actor.getActorLovedSongs"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetActorLovedSongsOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetActorLovedSongs<'a> { + const NSID: &'static str = "app.rocksky.actor.getActorLovedSongs"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetActorLovedSongsResponse; +} + +///Endpoint type for +///app.rocksky.actor.getActorLovedSongs +pub struct GetActorLovedSongsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetActorLovedSongsRequest { + const PATH: &'static str = "/xrpc/app.rocksky.actor.getActorLovedSongs"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetActorLovedSongs<'de>; + type Response = GetActorLovedSongsResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/actor/get_actor_playlists.rs b/crates/jacquard-api/src/app_rocksky/actor/get_actor_playlists.rs new file mode 100644 index 000000000..55e597740 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/actor/get_actor_playlists.rs @@ -0,0 +1,75 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.actor.getActorPlaylists +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetActorPlaylists<'a> { + #[serde(borrow)] + pub did: jacquard_common::types::ident::AtIdentifier<'a>, + ///(min: 1) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + ///(min: 0) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetActorPlaylistsOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub playlists: std::option::Option< + Vec>, + >, +} + +///Response type for +///app.rocksky.actor.getActorPlaylists +pub struct GetActorPlaylistsResponse; +impl jacquard_common::xrpc::XrpcResp for GetActorPlaylistsResponse { + const NSID: &'static str = "app.rocksky.actor.getActorPlaylists"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetActorPlaylistsOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetActorPlaylists<'a> { + const NSID: &'static str = "app.rocksky.actor.getActorPlaylists"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetActorPlaylistsResponse; +} + +///Endpoint type for +///app.rocksky.actor.getActorPlaylists +pub struct GetActorPlaylistsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetActorPlaylistsRequest { + const PATH: &'static str = "/xrpc/app.rocksky.actor.getActorPlaylists"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetActorPlaylists<'de>; + type Response = GetActorPlaylistsResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/actor/get_actor_scrobbles.rs b/crates/jacquard-api/src/app_rocksky/actor/get_actor_scrobbles.rs new file mode 100644 index 000000000..ffba0068f --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/actor/get_actor_scrobbles.rs @@ -0,0 +1,75 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.actor.getActorScrobbles +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetActorScrobbles<'a> { + #[serde(borrow)] + pub did: jacquard_common::types::ident::AtIdentifier<'a>, + ///(min: 1) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + ///(min: 0) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetActorScrobblesOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub scrobbles: std::option::Option< + Vec>, + >, +} + +///Response type for +///app.rocksky.actor.getActorScrobbles +pub struct GetActorScrobblesResponse; +impl jacquard_common::xrpc::XrpcResp for GetActorScrobblesResponse { + const NSID: &'static str = "app.rocksky.actor.getActorScrobbles"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetActorScrobblesOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetActorScrobbles<'a> { + const NSID: &'static str = "app.rocksky.actor.getActorScrobbles"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetActorScrobblesResponse; +} + +///Endpoint type for +///app.rocksky.actor.getActorScrobbles +pub struct GetActorScrobblesRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetActorScrobblesRequest { + const PATH: &'static str = "/xrpc/app.rocksky.actor.getActorScrobbles"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetActorScrobbles<'de>; + type Response = GetActorScrobblesResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/actor/get_actor_songs.rs b/crates/jacquard-api/src/app_rocksky/actor/get_actor_songs.rs new file mode 100644 index 000000000..4b1e1ce99 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/actor/get_actor_songs.rs @@ -0,0 +1,73 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.actor.getActorSongs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetActorSongs<'a> { + #[serde(borrow)] + pub did: jacquard_common::types::ident::AtIdentifier<'a>, + ///(min: 1) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + ///(min: 0) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetActorSongsOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub songs: std::option::Option>>, +} + +///Response type for +///app.rocksky.actor.getActorSongs +pub struct GetActorSongsResponse; +impl jacquard_common::xrpc::XrpcResp for GetActorSongsResponse { + const NSID: &'static str = "app.rocksky.actor.getActorSongs"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetActorSongsOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetActorSongs<'a> { + const NSID: &'static str = "app.rocksky.actor.getActorSongs"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetActorSongsResponse; +} + +///Endpoint type for +///app.rocksky.actor.getActorSongs +pub struct GetActorSongsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetActorSongsRequest { + const PATH: &'static str = "/xrpc/app.rocksky.actor.getActorSongs"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetActorSongs<'de>; + type Response = GetActorSongsResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/actor/get_profile.rs b/crates/jacquard-api/src/app_rocksky/actor/get_profile.rs new file mode 100644 index 000000000..67b9b533b --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/actor/get_profile.rs @@ -0,0 +1,67 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.actor.getProfile +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetProfile<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub did: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetProfileOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::actor::ProfileViewDetailed<'a>, +} + +///Response type for +///app.rocksky.actor.getProfile +pub struct GetProfileResponse; +impl jacquard_common::xrpc::XrpcResp for GetProfileResponse { + const NSID: &'static str = "app.rocksky.actor.getProfile"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetProfileOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetProfile<'a> { + const NSID: &'static str = "app.rocksky.actor.getProfile"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetProfileResponse; +} + +///Endpoint type for +///app.rocksky.actor.getProfile +pub struct GetProfileRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetProfileRequest { + const PATH: &'static str = "/xrpc/app.rocksky.actor.getProfile"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetProfile<'de>; + type Response = GetProfileResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/album.rs b/crates/jacquard-api/src/app_rocksky/album.rs new file mode 100644 index 000000000..28fc5fe0a --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/album.rs @@ -0,0 +1,240 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.album.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_album; +pub mod get_album_tracks; +pub mod get_albums; + +/// A declaration of an album. +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + bon::Builder +)] +#[serde(rename_all = "camelCase")] +pub struct Album<'a> { + /// The album art of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub album_art: Option>, + /// The Apple Music link of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub apple_music_link: Option>, + /// The artist of the album. + #[serde(borrow)] + #[builder(into)] + pub artist: jacquard_common::CowStr<'a>, + /// The date and time when the album was created. + pub created_at: jacquard_common::types::string::Datetime, + /// The duration of the album in seconds. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + pub duration: Option, + /// The genre of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub genre: Option>, + /// The release date of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + pub release_date: Option, + /// The Spotify link of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub spotify_link: Option>, + /// The tags of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub tags: Option>>, + /// The tidal link of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub tidal_link: Option>, + /// The title of the album. + #[serde(borrow)] + #[builder(into)] + pub title: jacquard_common::CowStr<'a>, + /// The year the album was released. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + pub year: Option, + /// The YouTube link of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub youtube_link: Option>, +} + +/// Typed wrapper for GetRecord response with this collection's record type. +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct AlbumGetRecordOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub cid: std::option::Option>, + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, + #[serde(borrow)] + pub value: Album<'a>, +} + +/// Marker type for deserializing records from this collection. +pub struct AlbumRecord; +impl jacquard_common::xrpc::XrpcResp for AlbumRecord { + const NSID: &'static str = "app.rocksky.album"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = AlbumGetRecordOutput<'de>; + type Err<'de> = jacquard_common::types::collection::RecordError<'de>; +} + +impl jacquard_common::types::collection::Collection for Album<'_> { + const NSID: &'static str = "app.rocksky.album"; + type Record = AlbumRecord; +} + +impl From> for Album<'_> { + fn from(output: AlbumGetRecordOutput<'_>) -> Self { + use jacquard_common::IntoStatic; + output.value.into_static() + } +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct AlbumViewBasic<'a> { + /// The URL of the album art image. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album_art: std::option::Option>, + /// The artist of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artist: std::option::Option>, + /// The URI of the album's artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artist_uri: std::option::Option>, + /// The unique identifier of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The number of times the album has been played. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub play_count: std::option::Option, + /// The release date of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub release_date: std::option::Option>, + /// The SHA256 hash of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub sha256: std::option::Option>, + /// The title of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub title: std::option::Option>, + /// The number of unique listeners who have played the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub unique_listeners: std::option::Option, + /// The URI of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub uri: std::option::Option>, + /// The year the album was released. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub year: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct AlbumViewDetailed<'a> { + /// The URL of the album art image. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album_art: std::option::Option>, + /// The artist of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artist: std::option::Option>, + /// The URI of the album's artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artist_uri: std::option::Option>, + /// The unique identifier of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The number of times the album has been played. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub play_count: std::option::Option, + /// The release date of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub release_date: std::option::Option>, + /// The SHA256 hash of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub sha256: std::option::Option>, + /// The title of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub title: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub tracks: std::option::Option>>, + /// The number of unique listeners who have played the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub unique_listeners: std::option::Option, + /// The URI of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub uri: std::option::Option>, + /// The year the album was released. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub year: std::option::Option, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/album/get_album.rs b/crates/jacquard-api/src/app_rocksky/album/get_album.rs new file mode 100644 index 000000000..e7ea90218 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/album/get_album.rs @@ -0,0 +1,66 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.album.getAlbum +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetAlbum<'a> { + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetAlbumOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::album::AlbumViewDetailed<'a>, +} + +///Response type for +///app.rocksky.album.getAlbum +pub struct GetAlbumResponse; +impl jacquard_common::xrpc::XrpcResp for GetAlbumResponse { + const NSID: &'static str = "app.rocksky.album.getAlbum"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetAlbumOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetAlbum<'a> { + const NSID: &'static str = "app.rocksky.album.getAlbum"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetAlbumResponse; +} + +///Endpoint type for +///app.rocksky.album.getAlbum +pub struct GetAlbumRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetAlbumRequest { + const PATH: &'static str = "/xrpc/app.rocksky.album.getAlbum"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetAlbum<'de>; + type Response = GetAlbumResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/album/get_album_tracks.rs b/crates/jacquard-api/src/app_rocksky/album/get_album_tracks.rs new file mode 100644 index 000000000..ad427569d --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/album/get_album_tracks.rs @@ -0,0 +1,67 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.album.getAlbumTracks +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetAlbumTracks<'a> { + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetAlbumTracksOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub tracks: std::option::Option>>, +} + +///Response type for +///app.rocksky.album.getAlbumTracks +pub struct GetAlbumTracksResponse; +impl jacquard_common::xrpc::XrpcResp for GetAlbumTracksResponse { + const NSID: &'static str = "app.rocksky.album.getAlbumTracks"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetAlbumTracksOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetAlbumTracks<'a> { + const NSID: &'static str = "app.rocksky.album.getAlbumTracks"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetAlbumTracksResponse; +} + +///Endpoint type for +///app.rocksky.album.getAlbumTracks +pub struct GetAlbumTracksRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetAlbumTracksRequest { + const PATH: &'static str = "/xrpc/app.rocksky.album.getAlbumTracks"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetAlbumTracks<'de>; + type Response = GetAlbumTracksResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/album/get_albums.rs b/crates/jacquard-api/src/app_rocksky/album/get_albums.rs new file mode 100644 index 000000000..8f0b09693 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/album/get_albums.rs @@ -0,0 +1,71 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.album.getAlbums +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetAlbums { + ///(min: 1) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + ///(min: 0) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetAlbumsOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub albums: std::option::Option>>, +} + +///Response type for +///app.rocksky.album.getAlbums +pub struct GetAlbumsResponse; +impl jacquard_common::xrpc::XrpcResp for GetAlbumsResponse { + const NSID: &'static str = "app.rocksky.album.getAlbums"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetAlbumsOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for GetAlbums { + const NSID: &'static str = "app.rocksky.album.getAlbums"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetAlbumsResponse; +} + +///Endpoint type for +///app.rocksky.album.getAlbums +pub struct GetAlbumsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetAlbumsRequest { + const PATH: &'static str = "/xrpc/app.rocksky.album.getAlbums"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetAlbums; + type Response = GetAlbumsResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/apikey.rs b/crates/jacquard-api/src/app_rocksky/apikey.rs new file mode 100644 index 000000000..fcc8ae193 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/apikey.rs @@ -0,0 +1,41 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.apikey.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod create_apikey; +pub mod get_apikeys; +pub mod remove_apikey; +pub mod update_apikey; + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct ApiKeyView<'a> { + /// The date and time when the API key was created. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub created_at: std::option::Option, + /// A description for the API key. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub description: std::option::Option>, + /// The unique identifier of the API key. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The name of the API key. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub name: std::option::Option>, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/apikey/create_apikey.rs b/crates/jacquard-api/src/app_rocksky/apikey/create_apikey.rs new file mode 100644 index 000000000..632f9a671 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/apikey/create_apikey.rs @@ -0,0 +1,75 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.apikey.createApikey +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct CreateApikey<'a> { + /// A description for the API key. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub description: std::option::Option>, + /// The name of the API key. + #[serde(borrow)] + pub name: jacquard_common::CowStr<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct CreateApikeyOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: jacquard_common::types::value::Data<'a>, +} + +///Response type for +///app.rocksky.apikey.createApikey +pub struct CreateApikeyResponse; +impl jacquard_common::xrpc::XrpcResp for CreateApikeyResponse { + const NSID: &'static str = "app.rocksky.apikey.createApikey"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = CreateApikeyOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for CreateApikey<'a> { + const NSID: &'static str = "app.rocksky.apikey.createApikey"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = CreateApikeyResponse; +} + +///Endpoint type for +///app.rocksky.apikey.createApikey +pub struct CreateApikeyRequest; +impl jacquard_common::xrpc::XrpcEndpoint for CreateApikeyRequest { + const PATH: &'static str = "/xrpc/app.rocksky.apikey.createApikey"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = CreateApikey<'de>; + type Response = CreateApikeyResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/apikey/get_apikeys.rs b/crates/jacquard-api/src/app_rocksky/apikey/get_apikeys.rs new file mode 100644 index 000000000..51795bbaa --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/apikey/get_apikeys.rs @@ -0,0 +1,69 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.apikey.getApikeys +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetApikeys { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetApikeysOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub api_keys: std::option::Option>>, +} + +///Response type for +///app.rocksky.apikey.getApikeys +pub struct GetApikeysResponse; +impl jacquard_common::xrpc::XrpcResp for GetApikeysResponse { + const NSID: &'static str = "app.rocksky.apikey.getApikeys"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetApikeysOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for GetApikeys { + const NSID: &'static str = "app.rocksky.apikey.getApikeys"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetApikeysResponse; +} + +///Endpoint type for +///app.rocksky.apikey.getApikeys +pub struct GetApikeysRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetApikeysRequest { + const PATH: &'static str = "/xrpc/app.rocksky.apikey.getApikeys"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetApikeys; + type Response = GetApikeysResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/apikey/remove_apikey.rs b/crates/jacquard-api/src/app_rocksky/apikey/remove_apikey.rs new file mode 100644 index 000000000..bb95b8590 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/apikey/remove_apikey.rs @@ -0,0 +1,83 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.apikey.removeApikey +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct RemoveApikeyParams<'a> { + #[serde(borrow)] + #[builder(into)] + pub id: jacquard_common::CowStr<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct RemoveApikeyOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: jacquard_common::types::value::Data<'a>, +} + +/// XRPC request marker type +#[derive( + Debug, + Clone, + Copy, + PartialEq, + Eq, + serde::Serialize, + serde::Deserialize, + jacquard_derive::IntoStatic +)] +pub struct RemoveApikey; +///Response type for +///app.rocksky.apikey.removeApikey +pub struct RemoveApikeyResponse; +impl jacquard_common::xrpc::XrpcResp for RemoveApikeyResponse { + const NSID: &'static str = "app.rocksky.apikey.removeApikey"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = RemoveApikeyOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for RemoveApikey { + const NSID: &'static str = "app.rocksky.apikey.removeApikey"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = RemoveApikeyResponse; +} + +///Endpoint type for +///app.rocksky.apikey.removeApikey +pub struct RemoveApikeyRequest; +impl jacquard_common::xrpc::XrpcEndpoint for RemoveApikeyRequest { + const PATH: &'static str = "/xrpc/app.rocksky.apikey.removeApikey"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = RemoveApikey; + type Response = RemoveApikeyResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/apikey/update_apikey.rs b/crates/jacquard-api/src/app_rocksky/apikey/update_apikey.rs new file mode 100644 index 000000000..a49f8b004 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/apikey/update_apikey.rs @@ -0,0 +1,78 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.apikey.updateApikey +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct UpdateApikey<'a> { + /// A new description for the API key. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub description: std::option::Option>, + /// The ID of the API key to update. + #[serde(borrow)] + pub id: jacquard_common::CowStr<'a>, + /// The new name of the API key. + #[serde(borrow)] + pub name: jacquard_common::CowStr<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct UpdateApikeyOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: jacquard_common::types::value::Data<'a>, +} + +///Response type for +///app.rocksky.apikey.updateApikey +pub struct UpdateApikeyResponse; +impl jacquard_common::xrpc::XrpcResp for UpdateApikeyResponse { + const NSID: &'static str = "app.rocksky.apikey.updateApikey"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = UpdateApikeyOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for UpdateApikey<'a> { + const NSID: &'static str = "app.rocksky.apikey.updateApikey"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = UpdateApikeyResponse; +} + +///Endpoint type for +///app.rocksky.apikey.updateApikey +pub struct UpdateApikeyRequest; +impl jacquard_common::xrpc::XrpcEndpoint for UpdateApikeyRequest { + const PATH: &'static str = "/xrpc/app.rocksky.apikey.updateApikey"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = UpdateApikey<'de>; + type Response = UpdateApikeyResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/artist.rs b/crates/jacquard-api/src/app_rocksky/artist.rs new file mode 100644 index 000000000..d6c62befa --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/artist.rs @@ -0,0 +1,185 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.artist.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_artist; +pub mod get_artist_albums; +pub mod get_artist_tracks; +pub mod get_artists; + +/// A declaration of an artist. +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + bon::Builder +)] +#[serde(rename_all = "camelCase")] +pub struct Artist<'a> { + /// The biography of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub bio: Option>, + /// The birth date of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + pub born: Option, + /// The birth place of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub born_in: Option>, + /// The date when the artist was created. + pub created_at: jacquard_common::types::string::Datetime, + /// The death date of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + pub died: Option, + /// The name of the artist. + #[serde(borrow)] + #[builder(into)] + pub name: jacquard_common::CowStr<'a>, + /// The picture of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub picture: Option>, + /// The tags of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub tags: Option>>, +} + +/// Typed wrapper for GetRecord response with this collection's record type. +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct ArtistGetRecordOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub cid: std::option::Option>, + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, + #[serde(borrow)] + pub value: Artist<'a>, +} + +/// Marker type for deserializing records from this collection. +pub struct ArtistRecord; +impl jacquard_common::xrpc::XrpcResp for ArtistRecord { + const NSID: &'static str = "app.rocksky.artist"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = ArtistGetRecordOutput<'de>; + type Err<'de> = jacquard_common::types::collection::RecordError<'de>; +} + +impl jacquard_common::types::collection::Collection for Artist<'_> { + const NSID: &'static str = "app.rocksky.artist"; + type Record = ArtistRecord; +} + +impl From> for Artist<'_> { + fn from(output: ArtistGetRecordOutput<'_>) -> Self { + use jacquard_common::IntoStatic; + output.value.into_static() + } +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct ArtistViewBasic<'a> { + /// The unique identifier of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The name of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub name: std::option::Option>, + /// The picture of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub picture: std::option::Option>, + /// The number of times the artist has been played. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub play_count: std::option::Option, + /// The SHA256 hash of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub sha256: std::option::Option>, + /// The number of unique listeners who have played the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub unique_listeners: std::option::Option, + /// The URI of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub uri: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct ArtistViewDetailed<'a> { + /// The unique identifier of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The name of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub name: std::option::Option>, + /// The picture of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub picture: std::option::Option>, + /// The number of times the artist has been played. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub play_count: std::option::Option, + /// The SHA256 hash of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub sha256: std::option::Option>, + /// The number of unique listeners who have played the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub unique_listeners: std::option::Option, + /// The URI of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub uri: std::option::Option>, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/artist/get_artist.rs b/crates/jacquard-api/src/app_rocksky/artist/get_artist.rs new file mode 100644 index 000000000..6b7b2cdb9 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/artist/get_artist.rs @@ -0,0 +1,66 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.artist.getArtist +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetArtist<'a> { + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetArtistOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::artist::ArtistViewDetailed<'a>, +} + +///Response type for +///app.rocksky.artist.getArtist +pub struct GetArtistResponse; +impl jacquard_common::xrpc::XrpcResp for GetArtistResponse { + const NSID: &'static str = "app.rocksky.artist.getArtist"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetArtistOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetArtist<'a> { + const NSID: &'static str = "app.rocksky.artist.getArtist"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetArtistResponse; +} + +///Endpoint type for +///app.rocksky.artist.getArtist +pub struct GetArtistRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetArtistRequest { + const PATH: &'static str = "/xrpc/app.rocksky.artist.getArtist"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetArtist<'de>; + type Response = GetArtistResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/artist/get_artist_albums.rs b/crates/jacquard-api/src/app_rocksky/artist/get_artist_albums.rs new file mode 100644 index 000000000..dd01c48d4 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/artist/get_artist_albums.rs @@ -0,0 +1,67 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.artist.getArtistAlbums +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetArtistAlbums<'a> { + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetArtistAlbumsOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub albums: std::option::Option>>, +} + +///Response type for +///app.rocksky.artist.getArtistAlbums +pub struct GetArtistAlbumsResponse; +impl jacquard_common::xrpc::XrpcResp for GetArtistAlbumsResponse { + const NSID: &'static str = "app.rocksky.artist.getArtistAlbums"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetArtistAlbumsOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetArtistAlbums<'a> { + const NSID: &'static str = "app.rocksky.artist.getArtistAlbums"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetArtistAlbumsResponse; +} + +///Endpoint type for +///app.rocksky.artist.getArtistAlbums +pub struct GetArtistAlbumsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetArtistAlbumsRequest { + const PATH: &'static str = "/xrpc/app.rocksky.artist.getArtistAlbums"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetArtistAlbums<'de>; + type Response = GetArtistAlbumsResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/artist/get_artist_tracks.rs b/crates/jacquard-api/src/app_rocksky/artist/get_artist_tracks.rs new file mode 100644 index 000000000..6b43e9006 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/artist/get_artist_tracks.rs @@ -0,0 +1,74 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.artist.getArtistTracks +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetArtistTracks<'a> { + ///(min: 1) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + ///(min: 0) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub uri: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetArtistTracksOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub tracks: std::option::Option>>, +} + +///Response type for +///app.rocksky.artist.getArtistTracks +pub struct GetArtistTracksResponse; +impl jacquard_common::xrpc::XrpcResp for GetArtistTracksResponse { + const NSID: &'static str = "app.rocksky.artist.getArtistTracks"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetArtistTracksOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetArtistTracks<'a> { + const NSID: &'static str = "app.rocksky.artist.getArtistTracks"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetArtistTracksResponse; +} + +///Endpoint type for +///app.rocksky.artist.getArtistTracks +pub struct GetArtistTracksRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetArtistTracksRequest { + const PATH: &'static str = "/xrpc/app.rocksky.artist.getArtistTracks"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetArtistTracks<'de>; + type Response = GetArtistTracksResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/artist/get_artists.rs b/crates/jacquard-api/src/app_rocksky/artist/get_artists.rs new file mode 100644 index 000000000..69f1cce58 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/artist/get_artists.rs @@ -0,0 +1,73 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.artist.getArtists +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetArtists { + ///(min: 1) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + ///(min: 0) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetArtistsOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artists: std::option::Option< + Vec>, + >, +} + +///Response type for +///app.rocksky.artist.getArtists +pub struct GetArtistsResponse; +impl jacquard_common::xrpc::XrpcResp for GetArtistsResponse { + const NSID: &'static str = "app.rocksky.artist.getArtists"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetArtistsOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for GetArtists { + const NSID: &'static str = "app.rocksky.artist.getArtists"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetArtistsResponse; +} + +///Endpoint type for +///app.rocksky.artist.getArtists +pub struct GetArtistsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetArtistsRequest { + const PATH: &'static str = "/xrpc/app.rocksky.artist.getArtists"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetArtists; + type Response = GetArtistsResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/charts.rs b/crates/jacquard-api/src/app_rocksky/charts.rs new file mode 100644 index 000000000..ae79cf9e6 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/charts.rs @@ -0,0 +1,49 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.charts.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_scrobbles_chart; + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct ChartsView<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub scrobbles: std::option::Option< + Vec>, + >, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct ScrobbleViewBasic<'a> { + /// The number of scrobbles on this date. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub count: std::option::Option, + /// The date of the scrobble. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub date: std::option::Option, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/charts/get_scrobbles_chart.rs b/crates/jacquard-api/src/app_rocksky/charts/get_scrobbles_chart.rs new file mode 100644 index 000000000..9358ee6d1 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/charts/get_scrobbles_chart.rs @@ -0,0 +1,76 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.charts.getScrobblesChart +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetScrobblesChart<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub albumuri: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artisturi: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub did: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub songuri: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetScrobblesChartOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::charts::ChartsView<'a>, +} + +///Response type for +///app.rocksky.charts.getScrobblesChart +pub struct GetScrobblesChartResponse; +impl jacquard_common::xrpc::XrpcResp for GetScrobblesChartResponse { + const NSID: &'static str = "app.rocksky.charts.getScrobblesChart"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetScrobblesChartOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetScrobblesChart<'a> { + const NSID: &'static str = "app.rocksky.charts.getScrobblesChart"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetScrobblesChartResponse; +} + +///Endpoint type for +///app.rocksky.charts.getScrobblesChart +pub struct GetScrobblesChartRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetScrobblesChartRequest { + const PATH: &'static str = "/xrpc/app.rocksky.charts.getScrobblesChart"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetScrobblesChart<'de>; + type Response = GetScrobblesChartResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/dropbox.rs b/crates/jacquard-api/src/app_rocksky/dropbox.rs new file mode 100644 index 000000000..444b6bfb9 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/dropbox.rs @@ -0,0 +1,86 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.dropbox.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod download_file; +pub mod get_files; +pub mod get_metadata; +pub mod get_temporary_link; + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct FileListView<'a> { + /// A list of files in the Dropbox. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub files: std::option::Option>>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct FileView<'a> { + /// The last modified date and time of the file on the client. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub client_modified: std::option::Option, + /// The unique identifier of the file. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The name of the file. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub name: std::option::Option>, + /// The display path of the file. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub path_display: std::option::Option>, + /// The lowercased path of the file. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub path_lower: std::option::Option>, + /// The last modified date and time of the file on the server. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub server_modified: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct TemporaryLinkView<'a> { + /// The temporary link to access the file. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub link: std::option::Option>, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/dropbox/download_file.rs b/crates/jacquard-api/src/app_rocksky/dropbox/download_file.rs new file mode 100644 index 000000000..8b62f8785 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/dropbox/download_file.rs @@ -0,0 +1,62 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.dropbox.downloadFile +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct DownloadFile<'a> { + #[serde(borrow)] + #[builder(into)] + pub file_id: jacquard_common::CowStr<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct DownloadFileOutput<'a> {} +///Response type for +///app.rocksky.dropbox.downloadFile +pub struct DownloadFileResponse; +impl jacquard_common::xrpc::XrpcResp for DownloadFileResponse { + const NSID: &'static str = "app.rocksky.dropbox.downloadFile"; + const ENCODING: &'static str = "application/octet-stream"; + type Output<'de> = DownloadFileOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for DownloadFile<'a> { + const NSID: &'static str = "app.rocksky.dropbox.downloadFile"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = DownloadFileResponse; +} + +///Endpoint type for +///app.rocksky.dropbox.downloadFile +pub struct DownloadFileRequest; +impl jacquard_common::xrpc::XrpcEndpoint for DownloadFileRequest { + const PATH: &'static str = "/xrpc/app.rocksky.dropbox.downloadFile"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = DownloadFile<'de>; + type Response = DownloadFileResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/dropbox/get_files.rs b/crates/jacquard-api/src/app_rocksky/dropbox/get_files.rs new file mode 100644 index 000000000..fcb56c247 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/dropbox/get_files.rs @@ -0,0 +1,68 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.dropbox.getFiles +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetFiles<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + #[builder(into)] + pub at: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetFilesOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::dropbox::FileListView<'a>, +} + +///Response type for +///app.rocksky.dropbox.getFiles +pub struct GetFilesResponse; +impl jacquard_common::xrpc::XrpcResp for GetFilesResponse { + const NSID: &'static str = "app.rocksky.dropbox.getFiles"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetFilesOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetFiles<'a> { + const NSID: &'static str = "app.rocksky.dropbox.getFiles"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetFilesResponse; +} + +///Endpoint type for +///app.rocksky.dropbox.getFiles +pub struct GetFilesRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetFilesRequest { + const PATH: &'static str = "/xrpc/app.rocksky.dropbox.getFiles"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetFiles<'de>; + type Response = GetFilesResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/dropbox/get_metadata.rs b/crates/jacquard-api/src/app_rocksky/dropbox/get_metadata.rs new file mode 100644 index 000000000..450afddea --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/dropbox/get_metadata.rs @@ -0,0 +1,67 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.dropbox.getMetadata +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetMetadata<'a> { + #[serde(borrow)] + #[builder(into)] + pub path: jacquard_common::CowStr<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetMetadataOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::dropbox::FileView<'a>, +} + +///Response type for +///app.rocksky.dropbox.getMetadata +pub struct GetMetadataResponse; +impl jacquard_common::xrpc::XrpcResp for GetMetadataResponse { + const NSID: &'static str = "app.rocksky.dropbox.getMetadata"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetMetadataOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetMetadata<'a> { + const NSID: &'static str = "app.rocksky.dropbox.getMetadata"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetMetadataResponse; +} + +///Endpoint type for +///app.rocksky.dropbox.getMetadata +pub struct GetMetadataRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetMetadataRequest { + const PATH: &'static str = "/xrpc/app.rocksky.dropbox.getMetadata"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetMetadata<'de>; + type Response = GetMetadataResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/dropbox/get_temporary_link.rs b/crates/jacquard-api/src/app_rocksky/dropbox/get_temporary_link.rs new file mode 100644 index 000000000..479cf9c33 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/dropbox/get_temporary_link.rs @@ -0,0 +1,67 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.dropbox.getTemporaryLink +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetTemporaryLink<'a> { + #[serde(borrow)] + #[builder(into)] + pub path: jacquard_common::CowStr<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetTemporaryLinkOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::dropbox::TemporaryLinkView<'a>, +} + +///Response type for +///app.rocksky.dropbox.getTemporaryLink +pub struct GetTemporaryLinkResponse; +impl jacquard_common::xrpc::XrpcResp for GetTemporaryLinkResponse { + const NSID: &'static str = "app.rocksky.dropbox.getTemporaryLink"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetTemporaryLinkOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetTemporaryLink<'a> { + const NSID: &'static str = "app.rocksky.dropbox.getTemporaryLink"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetTemporaryLinkResponse; +} + +///Endpoint type for +///app.rocksky.dropbox.getTemporaryLink +pub struct GetTemporaryLinkRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetTemporaryLinkRequest { + const PATH: &'static str = "/xrpc/app.rocksky.dropbox.getTemporaryLink"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetTemporaryLink<'de>; + type Response = GetTemporaryLinkResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/feed.rs b/crates/jacquard-api/src/app_rocksky/feed.rs new file mode 100644 index 000000000..a3fd3a584 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/feed.rs @@ -0,0 +1,140 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.feed.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_now_playings; +pub mod search; + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct NowPlayingView<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album_art: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album_artist: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album_uri: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artist: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artist_uri: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub avatar: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub created_at: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub did: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub handle: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub title: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub track_id: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub track_uri: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub uri: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct NowPlayingsView<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub now_playings: std::option::Option< + Vec>, + >, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct SearchResultsView<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub estimated_total_hits: std::option::Option, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub hits: std::option::Option>>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub processing_time_ms: std::option::Option, +} + +#[jacquard_derive::open_union] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(tag = "$type")] +#[serde(bound(deserialize = "'de: 'a"))] +pub enum SearchResultsViewHitsItem<'a> { + #[serde(rename = "app.rocksky.song.defs#songViewBasic")] + SongViewBasic(Box>), + #[serde(rename = "app.rocksky.album.defs#albumViewBasic")] + AlbumViewBasic(Box>), + #[serde(rename = "app.rocksky.artist.defs#artistViewBasic")] + ArtistViewBasic(Box>), + #[serde(rename = "app.rocksky.playlist.defs#playlistViewBasic")] + PlaylistViewBasic(Box>), + #[serde(rename = "app.rocksky.actor.defs#profileViewBasic")] + ProfileViewBasic(Box>), +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/feed/get_now_playings.rs b/crates/jacquard-api/src/app_rocksky/feed/get_now_playings.rs new file mode 100644 index 000000000..8f07f3309 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/feed/get_now_playings.rs @@ -0,0 +1,67 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.feed.getNowPlayings +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetNowPlayings { + ///(min: 1) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub size: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetNowPlayingsOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::feed::NowPlayingsView<'a>, +} + +///Response type for +///app.rocksky.feed.getNowPlayings +pub struct GetNowPlayingsResponse; +impl jacquard_common::xrpc::XrpcResp for GetNowPlayingsResponse { + const NSID: &'static str = "app.rocksky.feed.getNowPlayings"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetNowPlayingsOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for GetNowPlayings { + const NSID: &'static str = "app.rocksky.feed.getNowPlayings"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetNowPlayingsResponse; +} + +///Endpoint type for +///app.rocksky.feed.getNowPlayings +pub struct GetNowPlayingsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetNowPlayingsRequest { + const PATH: &'static str = "/xrpc/app.rocksky.feed.getNowPlayings"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetNowPlayings; + type Response = GetNowPlayingsResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/feed/search.rs b/crates/jacquard-api/src/app_rocksky/feed/search.rs new file mode 100644 index 000000000..1e25f3c3a --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/feed/search.rs @@ -0,0 +1,67 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.feed.search +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct Search<'a> { + #[serde(borrow)] + #[builder(into)] + pub query: jacquard_common::CowStr<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct SearchOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::feed::SearchResultsView<'a>, +} + +///Response type for +///app.rocksky.feed.search +pub struct SearchResponse; +impl jacquard_common::xrpc::XrpcResp for SearchResponse { + const NSID: &'static str = "app.rocksky.feed.search"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = SearchOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for Search<'a> { + const NSID: &'static str = "app.rocksky.feed.search"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = SearchResponse; +} + +///Endpoint type for +///app.rocksky.feed.search +pub struct SearchRequest; +impl jacquard_common::xrpc::XrpcEndpoint for SearchRequest { + const PATH: &'static str = "/xrpc/app.rocksky.feed.search"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = Search<'de>; + type Response = SearchResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/googledrive.rs b/crates/jacquard-api/src/app_rocksky/googledrive.rs new file mode 100644 index 000000000..85903d12a --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/googledrive.rs @@ -0,0 +1,47 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.googledrive.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod download_file; +pub mod get_file; +pub mod get_files; + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct FileListView<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub files: std::option::Option>>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct FileView<'a> { + /// The unique identifier of the file. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/googledrive/download_file.rs b/crates/jacquard-api/src/app_rocksky/googledrive/download_file.rs new file mode 100644 index 000000000..56195f7d5 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/googledrive/download_file.rs @@ -0,0 +1,62 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.googledrive.downloadFile +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct DownloadFile<'a> { + #[serde(borrow)] + #[builder(into)] + pub file_id: jacquard_common::CowStr<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct DownloadFileOutput<'a> {} +///Response type for +///app.rocksky.googledrive.downloadFile +pub struct DownloadFileResponse; +impl jacquard_common::xrpc::XrpcResp for DownloadFileResponse { + const NSID: &'static str = "app.rocksky.googledrive.downloadFile"; + const ENCODING: &'static str = "application/octet-stream"; + type Output<'de> = DownloadFileOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for DownloadFile<'a> { + const NSID: &'static str = "app.rocksky.googledrive.downloadFile"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = DownloadFileResponse; +} + +///Endpoint type for +///app.rocksky.googledrive.downloadFile +pub struct DownloadFileRequest; +impl jacquard_common::xrpc::XrpcEndpoint for DownloadFileRequest { + const PATH: &'static str = "/xrpc/app.rocksky.googledrive.downloadFile"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = DownloadFile<'de>; + type Response = DownloadFileResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/googledrive/get_file.rs b/crates/jacquard-api/src/app_rocksky/googledrive/get_file.rs new file mode 100644 index 000000000..bab54fde1 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/googledrive/get_file.rs @@ -0,0 +1,67 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.googledrive.getFile +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetFile<'a> { + #[serde(borrow)] + #[builder(into)] + pub file_id: jacquard_common::CowStr<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetFileOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::googledrive::FileView<'a>, +} + +///Response type for +///app.rocksky.googledrive.getFile +pub struct GetFileResponse; +impl jacquard_common::xrpc::XrpcResp for GetFileResponse { + const NSID: &'static str = "app.rocksky.googledrive.getFile"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetFileOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetFile<'a> { + const NSID: &'static str = "app.rocksky.googledrive.getFile"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetFileResponse; +} + +///Endpoint type for +///app.rocksky.googledrive.getFile +pub struct GetFileRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetFileRequest { + const PATH: &'static str = "/xrpc/app.rocksky.googledrive.getFile"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetFile<'de>; + type Response = GetFileResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/googledrive/get_files.rs b/crates/jacquard-api/src/app_rocksky/googledrive/get_files.rs new file mode 100644 index 000000000..ccc8724b7 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/googledrive/get_files.rs @@ -0,0 +1,68 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.googledrive.getFiles +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetFiles<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + #[builder(into)] + pub at: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetFilesOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::googledrive::FileListView<'a>, +} + +///Response type for +///app.rocksky.googledrive.getFiles +pub struct GetFilesResponse; +impl jacquard_common::xrpc::XrpcResp for GetFilesResponse { + const NSID: &'static str = "app.rocksky.googledrive.getFiles"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetFilesOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetFiles<'a> { + const NSID: &'static str = "app.rocksky.googledrive.getFiles"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetFilesResponse; +} + +///Endpoint type for +///app.rocksky.googledrive.getFiles +pub struct GetFilesRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetFilesRequest { + const PATH: &'static str = "/xrpc/app.rocksky.googledrive.getFiles"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetFiles<'de>; + type Response = GetFilesResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/like.rs b/crates/jacquard-api/src/app_rocksky/like.rs new file mode 100644 index 000000000..cac06ab29 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/like.rs @@ -0,0 +1,73 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.like +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod dislike_shout; +pub mod dislike_song; +pub mod like_shout; +pub mod like_song; + +/// A declaration of a like. +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + bon::Builder +)] +#[serde(rename_all = "camelCase")] +pub struct Like<'a> { + /// The date when the like was created. + pub created_at: jacquard_common::types::string::Datetime, + #[serde(borrow)] + pub subject: crate::com_atproto::repo::strong_ref::StrongRef<'a>, +} + +/// Typed wrapper for GetRecord response with this collection's record type. +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct LikeGetRecordOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub cid: std::option::Option>, + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, + #[serde(borrow)] + pub value: Like<'a>, +} + +/// Marker type for deserializing records from this collection. +pub struct LikeRecord; +impl jacquard_common::xrpc::XrpcResp for LikeRecord { + const NSID: &'static str = "app.rocksky.like"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = LikeGetRecordOutput<'de>; + type Err<'de> = jacquard_common::types::collection::RecordError<'de>; +} + +impl jacquard_common::types::collection::Collection for Like<'_> { + const NSID: &'static str = "app.rocksky.like"; + type Record = LikeRecord; +} + +impl From> for Like<'_> { + fn from(output: LikeGetRecordOutput<'_>) -> Self { + use jacquard_common::IntoStatic; + output.value.into_static() + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/like/dislike_shout.rs b/crates/jacquard-api/src/app_rocksky/like/dislike_shout.rs new file mode 100644 index 000000000..3eca28edd --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/like/dislike_shout.rs @@ -0,0 +1,72 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.like.dislikeShout +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct DislikeShout<'a> { + /// The unique identifier of the shout to dislike + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub uri: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct DislikeShoutOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::shout::ShoutView<'a>, +} + +///Response type for +///app.rocksky.like.dislikeShout +pub struct DislikeShoutResponse; +impl jacquard_common::xrpc::XrpcResp for DislikeShoutResponse { + const NSID: &'static str = "app.rocksky.like.dislikeShout"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = DislikeShoutOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for DislikeShout<'a> { + const NSID: &'static str = "app.rocksky.like.dislikeShout"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = DislikeShoutResponse; +} + +///Endpoint type for +///app.rocksky.like.dislikeShout +pub struct DislikeShoutRequest; +impl jacquard_common::xrpc::XrpcEndpoint for DislikeShoutRequest { + const PATH: &'static str = "/xrpc/app.rocksky.like.dislikeShout"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = DislikeShout<'de>; + type Response = DislikeShoutResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/like/dislike_song.rs b/crates/jacquard-api/src/app_rocksky/like/dislike_song.rs new file mode 100644 index 000000000..7511b5148 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/like/dislike_song.rs @@ -0,0 +1,72 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.like.dislikeSong +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct DislikeSong<'a> { + /// The unique identifier of the song to dislike + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub uri: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct DislikeSongOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::song::SongViewDetailed<'a>, +} + +///Response type for +///app.rocksky.like.dislikeSong +pub struct DislikeSongResponse; +impl jacquard_common::xrpc::XrpcResp for DislikeSongResponse { + const NSID: &'static str = "app.rocksky.like.dislikeSong"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = DislikeSongOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for DislikeSong<'a> { + const NSID: &'static str = "app.rocksky.like.dislikeSong"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = DislikeSongResponse; +} + +///Endpoint type for +///app.rocksky.like.dislikeSong +pub struct DislikeSongRequest; +impl jacquard_common::xrpc::XrpcEndpoint for DislikeSongRequest { + const PATH: &'static str = "/xrpc/app.rocksky.like.dislikeSong"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = DislikeSong<'de>; + type Response = DislikeSongResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/like/like_shout.rs b/crates/jacquard-api/src/app_rocksky/like/like_shout.rs new file mode 100644 index 000000000..379f7b115 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/like/like_shout.rs @@ -0,0 +1,72 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.like.likeShout +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct LikeShout<'a> { + /// The unique identifier of the shout to like + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub uri: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct LikeShoutOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::shout::ShoutView<'a>, +} + +///Response type for +///app.rocksky.like.likeShout +pub struct LikeShoutResponse; +impl jacquard_common::xrpc::XrpcResp for LikeShoutResponse { + const NSID: &'static str = "app.rocksky.like.likeShout"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = LikeShoutOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for LikeShout<'a> { + const NSID: &'static str = "app.rocksky.like.likeShout"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = LikeShoutResponse; +} + +///Endpoint type for +///app.rocksky.like.likeShout +pub struct LikeShoutRequest; +impl jacquard_common::xrpc::XrpcEndpoint for LikeShoutRequest { + const PATH: &'static str = "/xrpc/app.rocksky.like.likeShout"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = LikeShout<'de>; + type Response = LikeShoutResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/like/like_song.rs b/crates/jacquard-api/src/app_rocksky/like/like_song.rs new file mode 100644 index 000000000..49a3d229b --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/like/like_song.rs @@ -0,0 +1,72 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.like.likeSong +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct LikeSong<'a> { + /// The unique identifier of the song to like + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub uri: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct LikeSongOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::song::SongViewDetailed<'a>, +} + +///Response type for +///app.rocksky.like.likeSong +pub struct LikeSongResponse; +impl jacquard_common::xrpc::XrpcResp for LikeSongResponse { + const NSID: &'static str = "app.rocksky.like.likeSong"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = LikeSongOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for LikeSong<'a> { + const NSID: &'static str = "app.rocksky.like.likeSong"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = LikeSongResponse; +} + +///Endpoint type for +///app.rocksky.like.likeSong +pub struct LikeSongRequest; +impl jacquard_common::xrpc::XrpcEndpoint for LikeSongRequest { + const PATH: &'static str = "/xrpc/app.rocksky.like.likeSong"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = LikeSong<'de>; + type Response = LikeSongResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/player.rs b/crates/jacquard-api/src/app_rocksky/player.rs new file mode 100644 index 000000000..569c54645 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/player.rs @@ -0,0 +1,32 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.player.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_currently_playing; +pub mod next; +pub mod pause; +pub mod play; +pub mod previous; +pub mod seek; + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct CurrentlyPlayingViewDetailed<'a> { + /// The title of the currently playing track + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub title: std::option::Option>, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/player/get_currently_playing.rs b/crates/jacquard-api/src/app_rocksky/player/get_currently_playing.rs new file mode 100644 index 000000000..0dbf57dbc --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/player/get_currently_playing.rs @@ -0,0 +1,67 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.player.getCurrentlyPlaying +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetCurrentlyPlaying<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub actor: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetCurrentlyPlayingOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::player::CurrentlyPlayingViewDetailed<'a>, +} + +///Response type for +///app.rocksky.player.getCurrentlyPlaying +pub struct GetCurrentlyPlayingResponse; +impl jacquard_common::xrpc::XrpcResp for GetCurrentlyPlayingResponse { + const NSID: &'static str = "app.rocksky.player.getCurrentlyPlaying"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetCurrentlyPlayingOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetCurrentlyPlaying<'a> { + const NSID: &'static str = "app.rocksky.player.getCurrentlyPlaying"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetCurrentlyPlayingResponse; +} + +///Endpoint type for +///app.rocksky.player.getCurrentlyPlaying +pub struct GetCurrentlyPlayingRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetCurrentlyPlayingRequest { + const PATH: &'static str = "/xrpc/app.rocksky.player.getCurrentlyPlaying"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetCurrentlyPlaying<'de>; + type Response = GetCurrentlyPlayingResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/player/next.rs b/crates/jacquard-api/src/app_rocksky/player/next.rs new file mode 100644 index 000000000..53a717823 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/player/next.rs @@ -0,0 +1,48 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.player.next +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +/// XRPC request marker type +#[derive( + Debug, + Clone, + Copy, + PartialEq, + Eq, + serde::Serialize, + serde::Deserialize, + jacquard_derive::IntoStatic +)] +pub struct Next; +///Response type for +///app.rocksky.player.next +pub struct NextResponse; +impl jacquard_common::xrpc::XrpcResp for NextResponse { + const NSID: &'static str = "app.rocksky.player.next"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for Next { + const NSID: &'static str = "app.rocksky.player.next"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = NextResponse; +} + +///Endpoint type for +///app.rocksky.player.next +pub struct NextRequest; +impl jacquard_common::xrpc::XrpcEndpoint for NextRequest { + const PATH: &'static str = "/xrpc/app.rocksky.player.next"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = Next; + type Response = NextResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/player/pause.rs b/crates/jacquard-api/src/app_rocksky/player/pause.rs new file mode 100644 index 000000000..27daa1c18 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/player/pause.rs @@ -0,0 +1,48 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.player.pause +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +/// XRPC request marker type +#[derive( + Debug, + Clone, + Copy, + PartialEq, + Eq, + serde::Serialize, + serde::Deserialize, + jacquard_derive::IntoStatic +)] +pub struct Pause; +///Response type for +///app.rocksky.player.pause +pub struct PauseResponse; +impl jacquard_common::xrpc::XrpcResp for PauseResponse { + const NSID: &'static str = "app.rocksky.player.pause"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for Pause { + const NSID: &'static str = "app.rocksky.player.pause"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = PauseResponse; +} + +///Endpoint type for +///app.rocksky.player.pause +pub struct PauseRequest; +impl jacquard_common::xrpc::XrpcEndpoint for PauseRequest { + const PATH: &'static str = "/xrpc/app.rocksky.player.pause"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = Pause; + type Response = PauseResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/player/play.rs b/crates/jacquard-api/src/app_rocksky/player/play.rs new file mode 100644 index 000000000..afa76318d --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/player/play.rs @@ -0,0 +1,48 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.player.play +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +/// XRPC request marker type +#[derive( + Debug, + Clone, + Copy, + PartialEq, + Eq, + serde::Serialize, + serde::Deserialize, + jacquard_derive::IntoStatic +)] +pub struct Play; +///Response type for +///app.rocksky.player.play +pub struct PlayResponse; +impl jacquard_common::xrpc::XrpcResp for PlayResponse { + const NSID: &'static str = "app.rocksky.player.play"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for Play { + const NSID: &'static str = "app.rocksky.player.play"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = PlayResponse; +} + +///Endpoint type for +///app.rocksky.player.play +pub struct PlayRequest; +impl jacquard_common::xrpc::XrpcEndpoint for PlayRequest { + const PATH: &'static str = "/xrpc/app.rocksky.player.play"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = Play; + type Response = PlayResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/player/previous.rs b/crates/jacquard-api/src/app_rocksky/player/previous.rs new file mode 100644 index 000000000..51e50b378 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/player/previous.rs @@ -0,0 +1,48 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.player.previous +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +/// XRPC request marker type +#[derive( + Debug, + Clone, + Copy, + PartialEq, + Eq, + serde::Serialize, + serde::Deserialize, + jacquard_derive::IntoStatic +)] +pub struct Previous; +///Response type for +///app.rocksky.player.previous +pub struct PreviousResponse; +impl jacquard_common::xrpc::XrpcResp for PreviousResponse { + const NSID: &'static str = "app.rocksky.player.previous"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for Previous { + const NSID: &'static str = "app.rocksky.player.previous"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = PreviousResponse; +} + +///Endpoint type for +///app.rocksky.player.previous +pub struct PreviousRequest; +impl jacquard_common::xrpc::XrpcEndpoint for PreviousRequest { + const PATH: &'static str = "/xrpc/app.rocksky.player.previous"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = Previous; + type Response = PreviousResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/player/seek.rs b/crates/jacquard-api/src/app_rocksky/player/seek.rs new file mode 100644 index 000000000..d6e4882e4 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/player/seek.rs @@ -0,0 +1,64 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.player.seek +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct SeekParams { + pub position: i64, +} + +/// XRPC request marker type +#[derive( + Debug, + Clone, + Copy, + PartialEq, + Eq, + serde::Serialize, + serde::Deserialize, + jacquard_derive::IntoStatic +)] +pub struct Seek; +///Response type for +///app.rocksky.player.seek +pub struct SeekResponse; +impl jacquard_common::xrpc::XrpcResp for SeekResponse { + const NSID: &'static str = "app.rocksky.player.seek"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for Seek { + const NSID: &'static str = "app.rocksky.player.seek"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = SeekResponse; +} + +///Endpoint type for +///app.rocksky.player.seek +pub struct SeekRequest; +impl jacquard_common::xrpc::XrpcEndpoint for SeekRequest { + const PATH: &'static str = "/xrpc/app.rocksky.player.seek"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = Seek; + type Response = SeekResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/playlist.rs b/crates/jacquard-api/src/app_rocksky/playlist.rs new file mode 100644 index 000000000..152af98c8 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/playlist.rs @@ -0,0 +1,233 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.playlist.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_playlist; +pub mod get_playlists; + +/// A declaration of a playlist. +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + bon::Builder +)] +#[serde(rename_all = "camelCase")] +pub struct Playlist<'a> { + /// The Apple Music link of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub apple_music_link: Option>, + /// The date the playlist was created. + pub created_at: jacquard_common::types::string::Datetime, + /// The playlist description. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub description: Option>, + /// The name of the playlist. + #[serde(borrow)] + #[builder(into)] + pub name: jacquard_common::CowStr<'a>, + /// The picture of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub picture: Option>, + /// The Spotify link of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub spotify_link: Option>, + /// The Tidal link of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub tidal_link: Option>, + /// The tracks in the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub tracks: Option>>, + /// The YouTube link of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub youtube_link: Option>, +} + +/// Typed wrapper for GetRecord response with this collection's record type. +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct PlaylistGetRecordOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub cid: std::option::Option>, + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, + #[serde(borrow)] + pub value: Playlist<'a>, +} + +/// Marker type for deserializing records from this collection. +pub struct PlaylistRecord; +impl jacquard_common::xrpc::XrpcResp for PlaylistRecord { + const NSID: &'static str = "app.rocksky.playlist"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = PlaylistGetRecordOutput<'de>; + type Err<'de> = jacquard_common::types::collection::RecordError<'de>; +} + +impl jacquard_common::types::collection::Collection for Playlist<'_> { + const NSID: &'static str = "app.rocksky.playlist"; + type Record = PlaylistRecord; +} + +impl From> for Playlist<'_> { + fn from(output: PlaylistGetRecordOutput<'_>) -> Self { + use jacquard_common::IntoStatic; + output.value.into_static() + } +} + +/// Basic view of a playlist, including its metadata +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct PlaylistViewBasic<'a> { + /// The URL of the cover image for the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub cover_image_url: std::option::Option>, + /// The date and time when the playlist was created. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub created_at: std::option::Option, + /// The URL of the avatar image of the curator. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub curator_avatar_url: std::option::Option>, + /// The DID of the curator of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub curator_did: std::option::Option< + jacquard_common::types::ident::AtIdentifier<'a>, + >, + /// The handle of the curator of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub curator_handle: std::option::Option< + jacquard_common::types::ident::AtIdentifier<'a>, + >, + /// The name of the curator of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub curator_name: std::option::Option>, + /// A description of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub description: std::option::Option>, + /// The unique identifier of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The title of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub title: std::option::Option>, + /// The number of tracks in the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub track_count: std::option::Option, + /// The URI of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub uri: std::option::Option>, +} + +/// Detailed view of a playlist, including its tracks and metadata +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct PlaylistViewDetailed<'a> { + /// The URL of the cover image for the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub cover_image_url: std::option::Option>, + /// The date and time when the playlist was created. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub created_at: std::option::Option, + /// The URL of the avatar image of the curator. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub curator_avatar_url: std::option::Option>, + /// The DID of the curator of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub curator_did: std::option::Option< + jacquard_common::types::ident::AtIdentifier<'a>, + >, + /// The handle of the curator of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub curator_handle: std::option::Option< + jacquard_common::types::ident::AtIdentifier<'a>, + >, + /// The name of the curator of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub curator_name: std::option::Option>, + /// A description of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub description: std::option::Option>, + /// The unique identifier of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The title of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub title: std::option::Option>, + /// A list of tracks in the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub tracks: std::option::Option>>, + /// The URI of the playlist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub uri: std::option::Option>, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/playlist/get_playlist.rs b/crates/jacquard-api/src/app_rocksky/playlist/get_playlist.rs new file mode 100644 index 000000000..63517cb51 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/playlist/get_playlist.rs @@ -0,0 +1,66 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.playlist.getPlaylist +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetPlaylist<'a> { + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetPlaylistOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::playlist::PlaylistViewDetailed<'a>, +} + +///Response type for +///app.rocksky.playlist.getPlaylist +pub struct GetPlaylistResponse; +impl jacquard_common::xrpc::XrpcResp for GetPlaylistResponse { + const NSID: &'static str = "app.rocksky.playlist.getPlaylist"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetPlaylistOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetPlaylist<'a> { + const NSID: &'static str = "app.rocksky.playlist.getPlaylist"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetPlaylistResponse; +} + +///Endpoint type for +///app.rocksky.playlist.getPlaylist +pub struct GetPlaylistRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetPlaylistRequest { + const PATH: &'static str = "/xrpc/app.rocksky.playlist.getPlaylist"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetPlaylist<'de>; + type Response = GetPlaylistResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/playlist/get_playlists.rs b/crates/jacquard-api/src/app_rocksky/playlist/get_playlists.rs new file mode 100644 index 000000000..fd847a35a --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/playlist/get_playlists.rs @@ -0,0 +1,71 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.playlist.getPlaylists +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetPlaylists { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetPlaylistsOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub playlists: std::option::Option< + Vec>, + >, +} + +///Response type for +///app.rocksky.playlist.getPlaylists +pub struct GetPlaylistsResponse; +impl jacquard_common::xrpc::XrpcResp for GetPlaylistsResponse { + const NSID: &'static str = "app.rocksky.playlist.getPlaylists"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetPlaylistsOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for GetPlaylists { + const NSID: &'static str = "app.rocksky.playlist.getPlaylists"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetPlaylistsResponse; +} + +///Endpoint type for +///app.rocksky.playlist.getPlaylists +pub struct GetPlaylistsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetPlaylistsRequest { + const PATH: &'static str = "/xrpc/app.rocksky.playlist.getPlaylists"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetPlaylists; + type Response = GetPlaylistsResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/radio.rs b/crates/jacquard-api/src/app_rocksky/radio.rs new file mode 100644 index 000000000..f72fca1f4 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/radio.rs @@ -0,0 +1,169 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.radio.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +/// A declaration of a radio station. +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + bon::Builder +)] +#[serde(rename_all = "camelCase")] +pub struct Radio<'a> { + /// The date when the radio station was created. + pub created_at: jacquard_common::types::string::Datetime, + /// A description of the radio station. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub description: Option>, + /// The genre of the radio station. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub genre: Option>, + /// The logo of the radio station. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub logo: Option>, + /// The name of the radio station. + #[serde(borrow)] + #[builder(into)] + pub name: jacquard_common::CowStr<'a>, + /// The URL of the radio station. + #[serde(borrow)] + pub url: jacquard_common::types::string::Uri<'a>, + /// The website of the radio station. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub website: Option>, +} + +/// Typed wrapper for GetRecord response with this collection's record type. +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct RadioGetRecordOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub cid: std::option::Option>, + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, + #[serde(borrow)] + pub value: Radio<'a>, +} + +/// Marker type for deserializing records from this collection. +pub struct RadioRecord; +impl jacquard_common::xrpc::XrpcResp for RadioRecord { + const NSID: &'static str = "app.rocksky.radio"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = RadioGetRecordOutput<'de>; + type Err<'de> = jacquard_common::types::collection::RecordError<'de>; +} + +impl jacquard_common::types::collection::Collection for Radio<'_> { + const NSID: &'static str = "app.rocksky.radio"; + type Record = RadioRecord; +} + +impl From> for Radio<'_> { + fn from(output: RadioGetRecordOutput<'_>) -> Self { + use jacquard_common::IntoStatic; + output.value.into_static() + } +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct RadioViewBasic<'a> { + /// The date and time when the radio was created. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub created_at: std::option::Option, + /// A brief description of the radio. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub description: std::option::Option>, + /// The unique identifier of the radio. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The name of the radio. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub name: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct RadioViewDetailed<'a> { + /// The date and time when the radio was created. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub created_at: std::option::Option, + /// A brief description of the radio. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub description: std::option::Option>, + /// The genre of the radio. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub genre: std::option::Option>, + /// The unique identifier of the radio. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The logo of the radio station. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub logo: std::option::Option>, + /// The name of the radio. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub name: std::option::Option>, + /// The streaming URL of the radio. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub url: std::option::Option>, + /// The website of the radio. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub website: std::option::Option>, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/scrobble.rs b/crates/jacquard-api/src/app_rocksky/scrobble.rs new file mode 100644 index 000000000..76d482337 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/scrobble.rs @@ -0,0 +1,291 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.scrobble.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod create_scrobble; +pub mod get_scrobble; +pub mod get_scrobbles; + +/// A declaration of a scrobble. +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + bon::Builder +)] +#[serde(rename_all = "camelCase")] +pub struct Scrobble<'a> { + /// The album of the song. + #[serde(borrow)] + #[builder(into)] + pub album: jacquard_common::CowStr<'a>, + /// The album art of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub album_art: Option>, + /// The album artist of the song. + #[serde(borrow)] + #[builder(into)] + pub album_artist: jacquard_common::CowStr<'a>, + /// The Apple Music link of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub apple_music_link: Option>, + /// The artist of the song. + #[serde(borrow)] + #[builder(into)] + pub artist: jacquard_common::CowStr<'a>, + /// The composer of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub composer: Option>, + /// The copyright message of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub copyright_message: Option>, + /// The date when the song was created. + pub created_at: jacquard_common::types::string::Datetime, + /// The disc number of the song in the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + pub disc_number: Option, + /// The duration of the song in seconds. + pub duration: i64, + /// The genre of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub genre: Option>, + /// The label of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub label: Option>, + /// The lyrics of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub lyrics: Option>, + /// The MusicBrainz ID of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub mbid: Option>, + /// The release date of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + pub release_date: Option, + /// The Spotify link of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub spotify_link: Option>, + /// The tags of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub tags: Option>>, + /// The Tidal link of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub tidal_link: Option>, + /// The title of the song. + #[serde(borrow)] + #[builder(into)] + pub title: jacquard_common::CowStr<'a>, + /// The track number of the song in the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + pub track_number: Option, + /// Informations about the song + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub wiki: Option>, + /// The year the song was released. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + pub year: Option, + /// The YouTube link of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub youtube_link: Option>, +} + +/// Typed wrapper for GetRecord response with this collection's record type. +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct ScrobbleGetRecordOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub cid: std::option::Option>, + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, + #[serde(borrow)] + pub value: Scrobble<'a>, +} + +/// Marker type for deserializing records from this collection. +pub struct ScrobbleRecord; +impl jacquard_common::xrpc::XrpcResp for ScrobbleRecord { + const NSID: &'static str = "app.rocksky.scrobble"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = ScrobbleGetRecordOutput<'de>; + type Err<'de> = jacquard_common::types::collection::RecordError<'de>; +} + +impl jacquard_common::types::collection::Collection for Scrobble<'_> { + const NSID: &'static str = "app.rocksky.scrobble"; + type Record = ScrobbleRecord; +} + +impl From> for Scrobble<'_> { + fn from(output: ScrobbleGetRecordOutput<'_>) -> Self { + use jacquard_common::IntoStatic; + output.value.into_static() + } +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct ScrobbleViewBasic<'a> { + /// The album of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album: std::option::Option>, + /// The URI of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album_uri: std::option::Option>, + /// The artist of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artist: std::option::Option>, + /// The URI of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artist_uri: std::option::Option>, + /// The album art URL of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub cover: std::option::Option>, + /// The timestamp when the scrobble was created. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub date: std::option::Option, + /// The unique identifier of the scrobble. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The SHA256 hash of the scrobble data. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub sha256: std::option::Option>, + /// The title of the scrobble. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub title: std::option::Option>, + /// The URI of the scrobble. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub uri: std::option::Option>, + /// The handle of the user who created the scrobble. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub user: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct ScrobbleViewDetailed<'a> { + /// The album of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album: std::option::Option>, + /// The URI of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album_uri: std::option::Option>, + /// The artist of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artist: std::option::Option>, + /// The URI of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artist_uri: std::option::Option>, + /// The album art URL of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub cover: std::option::Option>, + /// The timestamp when the scrobble was created. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub date: std::option::Option, + /// The unique identifier of the scrobble. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The number of listeners + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub listeners: std::option::Option, + /// The number of scrobbles for this song + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub scrobbles: std::option::Option, + /// The SHA256 hash of the scrobble data. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub sha256: std::option::Option>, + /// The title of the scrobble. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub title: std::option::Option>, + /// The URI of the scrobble. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub uri: std::option::Option>, + /// The handle of the user who created the scrobble. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub user: std::option::Option>, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/scrobble/create_scrobble.rs b/crates/jacquard-api/src/app_rocksky/scrobble/create_scrobble.rs new file mode 100644 index 000000000..5e3b31aed --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/scrobble/create_scrobble.rs @@ -0,0 +1,149 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.scrobble.createScrobble +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct CreateScrobble<'a> { + /// The album of the track being scrobbled + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album: std::option::Option>, + /// The URL of the album art for the track + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album_art: std::option::Option>, + /// The Apple Music link for the track, if available + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub apple_music_link: std::option::Option>, + /// The artist of the track being scrobbled + #[serde(borrow)] + pub artist: jacquard_common::CowStr<'a>, + /// The URL of the artist's picture, if available + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artist_picture: std::option::Option>, + /// The composer of the track, if available + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub composer: std::option::Option>, + /// The copyright message for the track, if available + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub copyright_message: std::option::Option>, + /// The Deezer link for the track, if available + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub deezer_link: std::option::Option>, + /// The disc number of the track in the album, if applicable + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub disc_number: std::option::Option, + /// The duration of the track in seconds + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub duration: std::option::Option, + /// The record label of the track, if available + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub label: std::option::Option>, + /// The Last.fm link for the track, if available + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub lastfm_link: std::option::Option>, + /// The lyrics of the track, if available + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub lyrics: std::option::Option>, + /// The MusicBrainz ID of the track, if available + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub mb_id: std::option::Option>, + /// The release date of the track, formatted as YYYY-MM-DD + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub release_date: std::option::Option>, + /// The Spotify link for the track, if available + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub spotify_link: std::option::Option>, + /// The Tidal link for the track, if available + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub tidal_link: std::option::Option>, + /// The timestamp of the scrobble in milliseconds since epoch + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub timestamp: std::option::Option, + /// The title of the track being scrobbled + #[serde(borrow)] + pub title: jacquard_common::CowStr<'a>, + /// The track number of the track in the album + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub track_number: std::option::Option, + /// The year the track was released + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub year: std::option::Option, + /// The Youtube link for the track, if available + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub youtube_link: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct CreateScrobbleOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::scrobble::ScrobbleViewBasic<'a>, +} + +///Response type for +///app.rocksky.scrobble.createScrobble +pub struct CreateScrobbleResponse; +impl jacquard_common::xrpc::XrpcResp for CreateScrobbleResponse { + const NSID: &'static str = "app.rocksky.scrobble.createScrobble"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = CreateScrobbleOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for CreateScrobble<'a> { + const NSID: &'static str = "app.rocksky.scrobble.createScrobble"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = CreateScrobbleResponse; +} + +///Endpoint type for +///app.rocksky.scrobble.createScrobble +pub struct CreateScrobbleRequest; +impl jacquard_common::xrpc::XrpcEndpoint for CreateScrobbleRequest { + const PATH: &'static str = "/xrpc/app.rocksky.scrobble.createScrobble"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = CreateScrobble<'de>; + type Response = CreateScrobbleResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/scrobble/get_scrobble.rs b/crates/jacquard-api/src/app_rocksky/scrobble/get_scrobble.rs new file mode 100644 index 000000000..4fbb9f67d --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/scrobble/get_scrobble.rs @@ -0,0 +1,66 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.scrobble.getScrobble +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetScrobble<'a> { + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetScrobbleOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::scrobble::ScrobbleViewDetailed<'a>, +} + +///Response type for +///app.rocksky.scrobble.getScrobble +pub struct GetScrobbleResponse; +impl jacquard_common::xrpc::XrpcResp for GetScrobbleResponse { + const NSID: &'static str = "app.rocksky.scrobble.getScrobble"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetScrobbleOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetScrobble<'a> { + const NSID: &'static str = "app.rocksky.scrobble.getScrobble"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetScrobbleResponse; +} + +///Endpoint type for +///app.rocksky.scrobble.getScrobble +pub struct GetScrobbleRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetScrobbleRequest { + const PATH: &'static str = "/xrpc/app.rocksky.scrobble.getScrobble"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetScrobble<'de>; + type Response = GetScrobbleResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/scrobble/get_scrobbles.rs b/crates/jacquard-api/src/app_rocksky/scrobble/get_scrobbles.rs new file mode 100644 index 000000000..c4ff068fc --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/scrobble/get_scrobbles.rs @@ -0,0 +1,76 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.scrobble.getScrobbles +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetScrobbles<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub did: std::option::Option>, + ///(min: 1) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + ///(min: 0) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetScrobblesOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub scrobbles: std::option::Option< + Vec>, + >, +} + +///Response type for +///app.rocksky.scrobble.getScrobbles +pub struct GetScrobblesResponse; +impl jacquard_common::xrpc::XrpcResp for GetScrobblesResponse { + const NSID: &'static str = "app.rocksky.scrobble.getScrobbles"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetScrobblesOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetScrobbles<'a> { + const NSID: &'static str = "app.rocksky.scrobble.getScrobbles"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetScrobblesResponse; +} + +///Endpoint type for +///app.rocksky.scrobble.getScrobbles +pub struct GetScrobblesRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetScrobblesRequest { + const PATH: &'static str = "/xrpc/app.rocksky.scrobble.getScrobbles"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetScrobbles<'de>; + type Response = GetScrobblesResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/shout.rs b/crates/jacquard-api/src/app_rocksky/shout.rs new file mode 100644 index 000000000..45985b2ad --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/shout.rs @@ -0,0 +1,155 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.shout.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod create_shout; +pub mod get_album_shouts; +pub mod get_artist_shouts; +pub mod get_profile_shouts; +pub mod get_shout_replies; +pub mod get_track_shouts; +pub mod remove_shout; +pub mod reply_shout; +pub mod report_shout; + +/// A declaration of a shout. +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + bon::Builder +)] +#[serde(rename_all = "camelCase")] +pub struct Shout<'a> { + /// The date when the shout was created. + pub created_at: jacquard_common::types::string::Datetime, + /// The message of the shout. + #[serde(borrow)] + #[builder(into)] + pub message: jacquard_common::CowStr<'a>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub parent: Option>, + #[serde(borrow)] + pub subject: crate::com_atproto::repo::strong_ref::StrongRef<'a>, +} + +/// Typed wrapper for GetRecord response with this collection's record type. +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct ShoutGetRecordOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub cid: std::option::Option>, + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, + #[serde(borrow)] + pub value: Shout<'a>, +} + +/// Marker type for deserializing records from this collection. +pub struct ShoutRecord; +impl jacquard_common::xrpc::XrpcResp for ShoutRecord { + const NSID: &'static str = "app.rocksky.shout"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = ShoutGetRecordOutput<'de>; + type Err<'de> = jacquard_common::types::collection::RecordError<'de>; +} + +impl jacquard_common::types::collection::Collection for Shout<'_> { + const NSID: &'static str = "app.rocksky.shout"; + type Record = ShoutRecord; +} + +impl From> for Shout<'_> { + fn from(output: ShoutGetRecordOutput<'_>) -> Self { + use jacquard_common::IntoStatic; + output.value.into_static() + } +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct Author<'a> { + /// The URL of the author's avatar image. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub avatar: std::option::Option>, + /// The decentralized identifier (DID) of the author. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub did: std::option::Option>, + /// The display name of the author. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub display_name: std::option::Option>, + /// The handle of the author. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub handle: std::option::Option>, + /// The unique identifier of the author. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct ShoutView<'a> { + /// The author of the shout. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub author: std::option::Option>, + /// The date and time when the shout was created. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub created_at: std::option::Option, + /// The unique identifier of the shout. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The content of the shout. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub message: std::option::Option>, + /// The ID of the parent shout if this is a reply, otherwise null. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub parent: std::option::Option>, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/shout/create_shout.rs b/crates/jacquard-api/src/app_rocksky/shout/create_shout.rs new file mode 100644 index 000000000..143af3970 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/shout/create_shout.rs @@ -0,0 +1,72 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.shout.createShout +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct CreateShout<'a> { + /// The content of the shout + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub message: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct CreateShoutOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::shout::ShoutView<'a>, +} + +///Response type for +///app.rocksky.shout.createShout +pub struct CreateShoutResponse; +impl jacquard_common::xrpc::XrpcResp for CreateShoutResponse { + const NSID: &'static str = "app.rocksky.shout.createShout"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = CreateShoutOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for CreateShout<'a> { + const NSID: &'static str = "app.rocksky.shout.createShout"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = CreateShoutResponse; +} + +///Endpoint type for +///app.rocksky.shout.createShout +pub struct CreateShoutRequest; +impl jacquard_common::xrpc::XrpcEndpoint for CreateShoutRequest { + const PATH: &'static str = "/xrpc/app.rocksky.shout.createShout"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = CreateShout<'de>; + type Response = CreateShoutResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/shout/get_album_shouts.rs b/crates/jacquard-api/src/app_rocksky/shout/get_album_shouts.rs new file mode 100644 index 000000000..94538d6b1 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/shout/get_album_shouts.rs @@ -0,0 +1,73 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.shout.getAlbumShouts +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetAlbumShouts<'a> { + ///(min: 1) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + ///(min: 0) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetAlbumShoutsOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub shouts: std::option::Option>>, +} + +///Response type for +///app.rocksky.shout.getAlbumShouts +pub struct GetAlbumShoutsResponse; +impl jacquard_common::xrpc::XrpcResp for GetAlbumShoutsResponse { + const NSID: &'static str = "app.rocksky.shout.getAlbumShouts"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetAlbumShoutsOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetAlbumShouts<'a> { + const NSID: &'static str = "app.rocksky.shout.getAlbumShouts"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetAlbumShoutsResponse; +} + +///Endpoint type for +///app.rocksky.shout.getAlbumShouts +pub struct GetAlbumShoutsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetAlbumShoutsRequest { + const PATH: &'static str = "/xrpc/app.rocksky.shout.getAlbumShouts"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetAlbumShouts<'de>; + type Response = GetAlbumShoutsResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/shout/get_artist_shouts.rs b/crates/jacquard-api/src/app_rocksky/shout/get_artist_shouts.rs new file mode 100644 index 000000000..578d9eee1 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/shout/get_artist_shouts.rs @@ -0,0 +1,73 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.shout.getArtistShouts +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetArtistShouts<'a> { + ///(min: 1) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + ///(min: 0) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetArtistShoutsOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub shouts: std::option::Option>>, +} + +///Response type for +///app.rocksky.shout.getArtistShouts +pub struct GetArtistShoutsResponse; +impl jacquard_common::xrpc::XrpcResp for GetArtistShoutsResponse { + const NSID: &'static str = "app.rocksky.shout.getArtistShouts"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetArtistShoutsOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetArtistShouts<'a> { + const NSID: &'static str = "app.rocksky.shout.getArtistShouts"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetArtistShoutsResponse; +} + +///Endpoint type for +///app.rocksky.shout.getArtistShouts +pub struct GetArtistShoutsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetArtistShoutsRequest { + const PATH: &'static str = "/xrpc/app.rocksky.shout.getArtistShouts"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetArtistShouts<'de>; + type Response = GetArtistShoutsResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/shout/get_profile_shouts.rs b/crates/jacquard-api/src/app_rocksky/shout/get_profile_shouts.rs new file mode 100644 index 000000000..80274f670 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/shout/get_profile_shouts.rs @@ -0,0 +1,73 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.shout.getProfileShouts +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetProfileShouts<'a> { + #[serde(borrow)] + pub did: jacquard_common::types::ident::AtIdentifier<'a>, + ///(min: 1) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + ///(min: 0) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetProfileShoutsOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub shouts: std::option::Option>>, +} + +///Response type for +///app.rocksky.shout.getProfileShouts +pub struct GetProfileShoutsResponse; +impl jacquard_common::xrpc::XrpcResp for GetProfileShoutsResponse { + const NSID: &'static str = "app.rocksky.shout.getProfileShouts"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetProfileShoutsOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetProfileShouts<'a> { + const NSID: &'static str = "app.rocksky.shout.getProfileShouts"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetProfileShoutsResponse; +} + +///Endpoint type for +///app.rocksky.shout.getProfileShouts +pub struct GetProfileShoutsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetProfileShoutsRequest { + const PATH: &'static str = "/xrpc/app.rocksky.shout.getProfileShouts"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetProfileShouts<'de>; + type Response = GetProfileShoutsResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/shout/get_shout_replies.rs b/crates/jacquard-api/src/app_rocksky/shout/get_shout_replies.rs new file mode 100644 index 000000000..de712b858 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/shout/get_shout_replies.rs @@ -0,0 +1,73 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.shout.getShoutReplies +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetShoutReplies<'a> { + ///(min: 1) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + ///(min: 0) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetShoutRepliesOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub shouts: std::option::Option>>, +} + +///Response type for +///app.rocksky.shout.getShoutReplies +pub struct GetShoutRepliesResponse; +impl jacquard_common::xrpc::XrpcResp for GetShoutRepliesResponse { + const NSID: &'static str = "app.rocksky.shout.getShoutReplies"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetShoutRepliesOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetShoutReplies<'a> { + const NSID: &'static str = "app.rocksky.shout.getShoutReplies"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetShoutRepliesResponse; +} + +///Endpoint type for +///app.rocksky.shout.getShoutReplies +pub struct GetShoutRepliesRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetShoutRepliesRequest { + const PATH: &'static str = "/xrpc/app.rocksky.shout.getShoutReplies"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetShoutReplies<'de>; + type Response = GetShoutRepliesResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/shout/get_track_shouts.rs b/crates/jacquard-api/src/app_rocksky/shout/get_track_shouts.rs new file mode 100644 index 000000000..a9b5ba04e --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/shout/get_track_shouts.rs @@ -0,0 +1,67 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.shout.getTrackShouts +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetTrackShouts<'a> { + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetTrackShoutsOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub shouts: std::option::Option>>, +} + +///Response type for +///app.rocksky.shout.getTrackShouts +pub struct GetTrackShoutsResponse; +impl jacquard_common::xrpc::XrpcResp for GetTrackShoutsResponse { + const NSID: &'static str = "app.rocksky.shout.getTrackShouts"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetTrackShoutsOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetTrackShouts<'a> { + const NSID: &'static str = "app.rocksky.shout.getTrackShouts"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetTrackShoutsResponse; +} + +///Endpoint type for +///app.rocksky.shout.getTrackShouts +pub struct GetTrackShoutsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetTrackShoutsRequest { + const PATH: &'static str = "/xrpc/app.rocksky.shout.getTrackShouts"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetTrackShouts<'de>; + type Response = GetTrackShoutsResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/shout/remove_shout.rs b/crates/jacquard-api/src/app_rocksky/shout/remove_shout.rs new file mode 100644 index 000000000..845cd3b44 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/shout/remove_shout.rs @@ -0,0 +1,83 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.shout.removeShout +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct RemoveShoutParams<'a> { + #[serde(borrow)] + #[builder(into)] + pub id: jacquard_common::CowStr<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct RemoveShoutOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::shout::ShoutView<'a>, +} + +/// XRPC request marker type +#[derive( + Debug, + Clone, + Copy, + PartialEq, + Eq, + serde::Serialize, + serde::Deserialize, + jacquard_derive::IntoStatic +)] +pub struct RemoveShout; +///Response type for +///app.rocksky.shout.removeShout +pub struct RemoveShoutResponse; +impl jacquard_common::xrpc::XrpcResp for RemoveShoutResponse { + const NSID: &'static str = "app.rocksky.shout.removeShout"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = RemoveShoutOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for RemoveShout { + const NSID: &'static str = "app.rocksky.shout.removeShout"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = RemoveShoutResponse; +} + +///Endpoint type for +///app.rocksky.shout.removeShout +pub struct RemoveShoutRequest; +impl jacquard_common::xrpc::XrpcEndpoint for RemoveShoutRequest { + const PATH: &'static str = "/xrpc/app.rocksky.shout.removeShout"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = RemoveShout; + type Response = RemoveShoutResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/shout/reply_shout.rs b/crates/jacquard-api/src/app_rocksky/shout/reply_shout.rs new file mode 100644 index 000000000..29aebb273 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/shout/reply_shout.rs @@ -0,0 +1,74 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.shout.replyShout +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct ReplyShout<'a> { + /// The content of the reply + #[serde(borrow)] + pub message: jacquard_common::CowStr<'a>, + /// The unique identifier of the shout to reply to + #[serde(borrow)] + pub shout_id: jacquard_common::CowStr<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct ReplyShoutOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::shout::ShoutView<'a>, +} + +///Response type for +///app.rocksky.shout.replyShout +pub struct ReplyShoutResponse; +impl jacquard_common::xrpc::XrpcResp for ReplyShoutResponse { + const NSID: &'static str = "app.rocksky.shout.replyShout"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = ReplyShoutOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for ReplyShout<'a> { + const NSID: &'static str = "app.rocksky.shout.replyShout"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = ReplyShoutResponse; +} + +///Endpoint type for +///app.rocksky.shout.replyShout +pub struct ReplyShoutRequest; +impl jacquard_common::xrpc::XrpcEndpoint for ReplyShoutRequest { + const PATH: &'static str = "/xrpc/app.rocksky.shout.replyShout"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = ReplyShout<'de>; + type Response = ReplyShoutResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/shout/report_shout.rs b/crates/jacquard-api/src/app_rocksky/shout/report_shout.rs new file mode 100644 index 000000000..ebbdd42e8 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/shout/report_shout.rs @@ -0,0 +1,75 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.shout.reportShout +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct ReportShout<'a> { + /// The reason for reporting the shout + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub reason: std::option::Option>, + /// The unique identifier of the shout to report + #[serde(borrow)] + pub shout_id: jacquard_common::CowStr<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct ReportShoutOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::shout::ShoutView<'a>, +} + +///Response type for +///app.rocksky.shout.reportShout +pub struct ReportShoutResponse; +impl jacquard_common::xrpc::XrpcResp for ReportShoutResponse { + const NSID: &'static str = "app.rocksky.shout.reportShout"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = ReportShoutOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for ReportShout<'a> { + const NSID: &'static str = "app.rocksky.shout.reportShout"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = ReportShoutResponse; +} + +///Endpoint type for +///app.rocksky.shout.reportShout +pub struct ReportShoutRequest; +impl jacquard_common::xrpc::XrpcEndpoint for ReportShoutRequest { + const PATH: &'static str = "/xrpc/app.rocksky.shout.reportShout"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = ReportShout<'de>; + type Response = ReportShoutResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/song.rs b/crates/jacquard-api/src/app_rocksky/song.rs new file mode 100644 index 000000000..0ce02e513 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/song.rs @@ -0,0 +1,315 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.song.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod create_song; +pub mod get_song; +pub mod get_songs; + +/// A declaration of a song. +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + bon::Builder +)] +#[serde(rename_all = "camelCase")] +pub struct Song<'a> { + /// The album of the song. + #[serde(borrow)] + #[builder(into)] + pub album: jacquard_common::CowStr<'a>, + /// The album art of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub album_art: Option>, + /// The album artist of the song. + #[serde(borrow)] + #[builder(into)] + pub album_artist: jacquard_common::CowStr<'a>, + /// The Apple Music link of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub apple_music_link: Option>, + /// The artist of the song. + #[serde(borrow)] + #[builder(into)] + pub artist: jacquard_common::CowStr<'a>, + /// The composer of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub composer: Option>, + /// The copyright message of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub copyright_message: Option>, + /// The date when the song was created. + pub created_at: jacquard_common::types::string::Datetime, + /// The disc number of the song in the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + pub disc_number: Option, + /// The duration of the song in seconds. + pub duration: i64, + /// The genre of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub genre: Option>, + /// The label of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub label: Option>, + /// The lyrics of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub lyrics: Option>, + /// The MusicBrainz ID of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub mbid: Option>, + /// The release date of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + pub release_date: Option, + /// The Spotify link of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub spotify_link: Option>, + /// The tags of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub tags: Option>>, + /// The Tidal link of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub tidal_link: Option>, + /// The title of the song. + #[serde(borrow)] + #[builder(into)] + pub title: jacquard_common::CowStr<'a>, + /// The track number of the song in the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + pub track_number: Option, + /// Informations about the song + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub wiki: Option>, + /// The year the song was released. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + pub year: Option, + /// The YouTube link of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[builder(into)] + #[serde(borrow)] + pub youtube_link: Option>, +} + +/// Typed wrapper for GetRecord response with this collection's record type. +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct SongGetRecordOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub cid: std::option::Option>, + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, + #[serde(borrow)] + pub value: Song<'a>, +} + +/// Marker type for deserializing records from this collection. +pub struct SongRecord; +impl jacquard_common::xrpc::XrpcResp for SongRecord { + const NSID: &'static str = "app.rocksky.song"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = SongGetRecordOutput<'de>; + type Err<'de> = jacquard_common::types::collection::RecordError<'de>; +} + +impl jacquard_common::types::collection::Collection for Song<'_> { + const NSID: &'static str = "app.rocksky.song"; + type Record = SongRecord; +} + +impl From> for Song<'_> { + fn from(output: SongGetRecordOutput<'_>) -> Self { + use jacquard_common::IntoStatic; + output.value.into_static() + } +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct SongViewBasic<'a> { + /// The album of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album: std::option::Option>, + /// The URL of the album art image. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album_art: std::option::Option>, + /// The artist of the album the song belongs to. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album_artist: std::option::Option>, + /// The URI of the album the song belongs to. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album_uri: std::option::Option>, + /// The artist of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artist: std::option::Option>, + /// The URI of the artist of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artist_uri: std::option::Option>, + /// The timestamp when the song was created. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub created_at: std::option::Option, + /// The disc number of the song in the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub disc_number: std::option::Option, + /// The duration of the song in milliseconds. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub duration: std::option::Option, + /// The unique identifier of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The number of times the song has been played. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub play_count: std::option::Option, + /// The SHA256 hash of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub sha256: std::option::Option>, + /// The title of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub title: std::option::Option>, + /// The track number of the song in the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub track_number: std::option::Option, + /// The number of unique listeners who have played the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub unique_listeners: std::option::Option, + /// The URI of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub uri: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct SongViewDetailed<'a> { + /// The album of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album: std::option::Option>, + /// The URL of the album art image. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album_art: std::option::Option>, + /// The artist of the album the song belongs to. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album_artist: std::option::Option>, + /// The URI of the album the song belongs to. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album_uri: std::option::Option>, + /// The artist of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artist: std::option::Option>, + /// The URI of the artist of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artist_uri: std::option::Option>, + /// The timestamp when the song was created. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub created_at: std::option::Option, + /// The disc number of the song in the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub disc_number: std::option::Option, + /// The duration of the song in milliseconds. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub duration: std::option::Option, + /// The unique identifier of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The number of times the song has been played. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub play_count: std::option::Option, + /// The SHA256 hash of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub sha256: std::option::Option>, + /// The title of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub title: std::option::Option>, + /// The track number of the song in the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub track_number: std::option::Option, + /// The number of unique listeners who have played the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub unique_listeners: std::option::Option, + /// The URI of the song. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub uri: std::option::Option>, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/song/create_song.rs b/crates/jacquard-api/src/app_rocksky/song/create_song.rs new file mode 100644 index 000000000..3dfd72636 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/song/create_song.rs @@ -0,0 +1,108 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.song.createSong +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct CreateSong<'a> { + /// The album of the song, if applicable + #[serde(borrow)] + pub album: jacquard_common::CowStr<'a>, + /// The URL of the album art for the song + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album_art: std::option::Option>, + /// The album artist of the song, if different from the main artist + #[serde(borrow)] + pub album_artist: jacquard_common::CowStr<'a>, + /// The artist of the song + #[serde(borrow)] + pub artist: jacquard_common::CowStr<'a>, + /// The disc number of the song in the album, if applicable + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub disc_number: std::option::Option, + /// The duration of the song in seconds + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub duration: std::option::Option, + /// The lyrics of the song, if available + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub lyrics: std::option::Option>, + /// The MusicBrainz ID of the song, if available + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub mb_id: std::option::Option>, + /// The release date of the song, formatted as YYYY-MM-DD + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub release_date: std::option::Option>, + /// The title of the song + #[serde(borrow)] + pub title: jacquard_common::CowStr<'a>, + /// The track number of the song in the album, if applicable + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub track_number: std::option::Option, + /// The year the song was released + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub year: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct CreateSongOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::song::SongViewDetailed<'a>, +} + +///Response type for +///app.rocksky.song.createSong +pub struct CreateSongResponse; +impl jacquard_common::xrpc::XrpcResp for CreateSongResponse { + const NSID: &'static str = "app.rocksky.song.createSong"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = CreateSongOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for CreateSong<'a> { + const NSID: &'static str = "app.rocksky.song.createSong"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = CreateSongResponse; +} + +///Endpoint type for +///app.rocksky.song.createSong +pub struct CreateSongRequest; +impl jacquard_common::xrpc::XrpcEndpoint for CreateSongRequest { + const PATH: &'static str = "/xrpc/app.rocksky.song.createSong"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = CreateSong<'de>; + type Response = CreateSongResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/song/get_song.rs b/crates/jacquard-api/src/app_rocksky/song/get_song.rs new file mode 100644 index 000000000..56d27b6c7 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/song/get_song.rs @@ -0,0 +1,66 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.song.getSong +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetSong<'a> { + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetSongOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::song::SongViewDetailed<'a>, +} + +///Response type for +///app.rocksky.song.getSong +pub struct GetSongResponse; +impl jacquard_common::xrpc::XrpcResp for GetSongResponse { + const NSID: &'static str = "app.rocksky.song.getSong"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetSongOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetSong<'a> { + const NSID: &'static str = "app.rocksky.song.getSong"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetSongResponse; +} + +///Endpoint type for +///app.rocksky.song.getSong +pub struct GetSongRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetSongRequest { + const PATH: &'static str = "/xrpc/app.rocksky.song.getSong"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetSong<'de>; + type Response = GetSongResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/song/get_songs.rs b/crates/jacquard-api/src/app_rocksky/song/get_songs.rs new file mode 100644 index 000000000..11e36334d --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/song/get_songs.rs @@ -0,0 +1,71 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.song.getSongs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetSongs { + ///(min: 1) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub limit: std::option::Option, + ///(min: 0) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub offset: std::option::Option, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct GetSongsOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub songs: std::option::Option>>, +} + +///Response type for +///app.rocksky.song.getSongs +pub struct GetSongsResponse; +impl jacquard_common::xrpc::XrpcResp for GetSongsResponse { + const NSID: &'static str = "app.rocksky.song.getSongs"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetSongsOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for GetSongs { + const NSID: &'static str = "app.rocksky.song.getSongs"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetSongsResponse; +} + +///Endpoint type for +///app.rocksky.song.getSongs +pub struct GetSongsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetSongsRequest { + const PATH: &'static str = "/xrpc/app.rocksky.song.getSongs"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetSongs; + type Response = GetSongsResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/spotify.rs b/crates/jacquard-api/src/app_rocksky/spotify.rs new file mode 100644 index 000000000..e379d4a33 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/spotify.rs @@ -0,0 +1,51 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.spotify.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_currently_playing; +pub mod next; +pub mod pause; +pub mod play; +pub mod previous; +pub mod seek; + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct SpotifyTrackView<'a> { + /// The name of the album. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub album: std::option::Option>, + /// The name of the artist. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub artist: std::option::Option>, + /// The duration of the track in milliseconds. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub duration: std::option::Option, + /// The unique identifier of the Spotify track. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub id: std::option::Option>, + /// The name of the track. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub name: std::option::Option>, + /// A URL to a preview of the track. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub preview_url: std::option::Option>, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/spotify/get_currently_playing.rs b/crates/jacquard-api/src/app_rocksky/spotify/get_currently_playing.rs new file mode 100644 index 000000000..c7561b8e2 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/spotify/get_currently_playing.rs @@ -0,0 +1,67 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.spotify.getCurrentlyPlaying +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetCurrentlyPlaying<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub actor: std::option::Option>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetCurrentlyPlayingOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::player::CurrentlyPlayingViewDetailed<'a>, +} + +///Response type for +///app.rocksky.spotify.getCurrentlyPlaying +pub struct GetCurrentlyPlayingResponse; +impl jacquard_common::xrpc::XrpcResp for GetCurrentlyPlayingResponse { + const NSID: &'static str = "app.rocksky.spotify.getCurrentlyPlaying"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetCurrentlyPlayingOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetCurrentlyPlaying<'a> { + const NSID: &'static str = "app.rocksky.spotify.getCurrentlyPlaying"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetCurrentlyPlayingResponse; +} + +///Endpoint type for +///app.rocksky.spotify.getCurrentlyPlaying +pub struct GetCurrentlyPlayingRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetCurrentlyPlayingRequest { + const PATH: &'static str = "/xrpc/app.rocksky.spotify.getCurrentlyPlaying"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetCurrentlyPlaying<'de>; + type Response = GetCurrentlyPlayingResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/spotify/next.rs b/crates/jacquard-api/src/app_rocksky/spotify/next.rs new file mode 100644 index 000000000..73004a7e1 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/spotify/next.rs @@ -0,0 +1,48 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.spotify.next +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +/// XRPC request marker type +#[derive( + Debug, + Clone, + Copy, + PartialEq, + Eq, + serde::Serialize, + serde::Deserialize, + jacquard_derive::IntoStatic +)] +pub struct Next; +///Response type for +///app.rocksky.spotify.next +pub struct NextResponse; +impl jacquard_common::xrpc::XrpcResp for NextResponse { + const NSID: &'static str = "app.rocksky.spotify.next"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for Next { + const NSID: &'static str = "app.rocksky.spotify.next"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = NextResponse; +} + +///Endpoint type for +///app.rocksky.spotify.next +pub struct NextRequest; +impl jacquard_common::xrpc::XrpcEndpoint for NextRequest { + const PATH: &'static str = "/xrpc/app.rocksky.spotify.next"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = Next; + type Response = NextResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/spotify/pause.rs b/crates/jacquard-api/src/app_rocksky/spotify/pause.rs new file mode 100644 index 000000000..1fd3180ae --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/spotify/pause.rs @@ -0,0 +1,48 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.spotify.pause +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +/// XRPC request marker type +#[derive( + Debug, + Clone, + Copy, + PartialEq, + Eq, + serde::Serialize, + serde::Deserialize, + jacquard_derive::IntoStatic +)] +pub struct Pause; +///Response type for +///app.rocksky.spotify.pause +pub struct PauseResponse; +impl jacquard_common::xrpc::XrpcResp for PauseResponse { + const NSID: &'static str = "app.rocksky.spotify.pause"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for Pause { + const NSID: &'static str = "app.rocksky.spotify.pause"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = PauseResponse; +} + +///Endpoint type for +///app.rocksky.spotify.pause +pub struct PauseRequest; +impl jacquard_common::xrpc::XrpcEndpoint for PauseRequest { + const PATH: &'static str = "/xrpc/app.rocksky.spotify.pause"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = Pause; + type Response = PauseResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/spotify/play.rs b/crates/jacquard-api/src/app_rocksky/spotify/play.rs new file mode 100644 index 000000000..0b0cd26fe --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/spotify/play.rs @@ -0,0 +1,48 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.spotify.play +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +/// XRPC request marker type +#[derive( + Debug, + Clone, + Copy, + PartialEq, + Eq, + serde::Serialize, + serde::Deserialize, + jacquard_derive::IntoStatic +)] +pub struct Play; +///Response type for +///app.rocksky.spotify.play +pub struct PlayResponse; +impl jacquard_common::xrpc::XrpcResp for PlayResponse { + const NSID: &'static str = "app.rocksky.spotify.play"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for Play { + const NSID: &'static str = "app.rocksky.spotify.play"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = PlayResponse; +} + +///Endpoint type for +///app.rocksky.spotify.play +pub struct PlayRequest; +impl jacquard_common::xrpc::XrpcEndpoint for PlayRequest { + const PATH: &'static str = "/xrpc/app.rocksky.spotify.play"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = Play; + type Response = PlayResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/spotify/previous.rs b/crates/jacquard-api/src/app_rocksky/spotify/previous.rs new file mode 100644 index 000000000..259d66434 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/spotify/previous.rs @@ -0,0 +1,48 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.spotify.previous +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +/// XRPC request marker type +#[derive( + Debug, + Clone, + Copy, + PartialEq, + Eq, + serde::Serialize, + serde::Deserialize, + jacquard_derive::IntoStatic +)] +pub struct Previous; +///Response type for +///app.rocksky.spotify.previous +pub struct PreviousResponse; +impl jacquard_common::xrpc::XrpcResp for PreviousResponse { + const NSID: &'static str = "app.rocksky.spotify.previous"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for Previous { + const NSID: &'static str = "app.rocksky.spotify.previous"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = PreviousResponse; +} + +///Endpoint type for +///app.rocksky.spotify.previous +pub struct PreviousRequest; +impl jacquard_common::xrpc::XrpcEndpoint for PreviousRequest { + const PATH: &'static str = "/xrpc/app.rocksky.spotify.previous"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = Previous; + type Response = PreviousResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/spotify/seek.rs b/crates/jacquard-api/src/app_rocksky/spotify/seek.rs new file mode 100644 index 000000000..447effc51 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/spotify/seek.rs @@ -0,0 +1,64 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.spotify.seek +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct SeekParams { + pub position: i64, +} + +/// XRPC request marker type +#[derive( + Debug, + Clone, + Copy, + PartialEq, + Eq, + serde::Serialize, + serde::Deserialize, + jacquard_derive::IntoStatic +)] +pub struct Seek; +///Response type for +///app.rocksky.spotify.seek +pub struct SeekResponse; +impl jacquard_common::xrpc::XrpcResp for SeekResponse { + const NSID: &'static str = "app.rocksky.spotify.seek"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = (); + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl jacquard_common::xrpc::XrpcRequest for Seek { + const NSID: &'static str = "app.rocksky.spotify.seek"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = SeekResponse; +} + +///Endpoint type for +///app.rocksky.spotify.seek +pub struct SeekRequest; +impl jacquard_common::xrpc::XrpcEndpoint for SeekRequest { + const PATH: &'static str = "/xrpc/app.rocksky.spotify.seek"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request<'de> = Seek; + type Response = SeekResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/stats.rs b/crates/jacquard-api/src/app_rocksky/stats.rs new file mode 100644 index 000000000..3f8253685 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/stats.rs @@ -0,0 +1,38 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.stats.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod get_stats; + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic, + Default +)] +#[serde(rename_all = "camelCase")] +pub struct StatsView<'a> { + /// The total number of unique albums scrobbled. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub albums: std::option::Option, + /// The total number of unique artists scrobbled. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub artists: std::option::Option, + /// The total number of tracks marked as loved. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub loved_tracks: std::option::Option, + /// The total number of scrobbles. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub scrobbles: std::option::Option, + /// The total number of unique tracks scrobbled. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub tracks: std::option::Option, +} \ No newline at end of file diff --git a/crates/jacquard-api/src/app_rocksky/stats/get_stats.rs b/crates/jacquard-api/src/app_rocksky/stats/get_stats.rs new file mode 100644 index 000000000..8c60daa49 --- /dev/null +++ b/crates/jacquard-api/src/app_rocksky/stats/get_stats.rs @@ -0,0 +1,66 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: app.rocksky.stats.getStats +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + bon::Builder, + jacquard_derive::IntoStatic +)] +#[builder(start_fn = new)] +#[serde(rename_all = "camelCase")] +pub struct GetStats<'a> { + #[serde(borrow)] + pub did: jacquard_common::types::ident::AtIdentifier<'a>, +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetStatsOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::app_rocksky::stats::StatsView<'a>, +} + +///Response type for +///app.rocksky.stats.getStats +pub struct GetStatsResponse; +impl jacquard_common::xrpc::XrpcResp for GetStatsResponse { + const NSID: &'static str = "app.rocksky.stats.getStats"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetStatsOutput<'de>; + type Err<'de> = jacquard_common::xrpc::GenericError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetStats<'a> { + const NSID: &'static str = "app.rocksky.stats.getStats"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetStatsResponse; +} + +///Endpoint type for +///app.rocksky.stats.getStats +pub struct GetStatsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetStatsRequest { + const PATH: &'static str = "/xrpc/app.rocksky.stats.getStats"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetStats<'de>; + type Response = GetStatsResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/lib.rs b/crates/jacquard-api/src/lib.rs index 762e1c40d..d83ac35a2 100644 --- a/crates/jacquard-api/src/lib.rs +++ b/crates/jacquard-api/src/lib.rs @@ -12,6 +12,9 @@ pub mod app_bsky; #[cfg(feature = "app_ocho")] pub mod app_ocho; +#[cfg(feature = "app_rocksky")] +pub mod app_rocksky; + #[cfg(feature = "beauty_cybernetic")] pub mod beauty_cybernetic; diff --git a/lexicons.kdl b/lexicons.kdl index a5a7b34e0..8c1b68abe 100644 --- a/lexicons.kdl +++ b/lexicons.kdl @@ -94,3 +94,8 @@ source "skylights" type="git" priority=50 { repo "https://github.com/Gregoor/skylights" pattern "**/*.json" } + +source "rocksky" type="git" priority=50 { + repo "https://github.com/tsirysndr/rocksky-lexicons/" + pattern "lexicons/**/*.json" +}