A decentralized music tracking and discovery platform built on AT Protocol 🎵

Refactor code to improve consistency and readability by adding missing commas in various files, ensuring proper formatting in function calls and object definitions. This includes updates in sync.ts, getProfile.ts, getArtistListeners.ts, createScrobble.ts, getScrobbles.ts, createSong.ts, and multiple Spotify-related files.

+5072 -4994
+5
apps/api/lexicons/album/album.json
··· 53 ], 54 "maxSize": 2000000 55 }, 56 "tags": { 57 "type": "array", 58 "description": "The tags of the album.",
··· 53 ], 54 "maxSize": 2000000 55 }, 56 + "albumArtUrl": { 57 + "type": "string", 58 + "description": "The URL of the album art of the album.", 59 + "format": "uri" 60 + }, 61 "tags": { 62 "type": "array", 63 "description": "The tags of the album.",
+5
apps/api/lexicons/artist/artist.json
··· 33 ], 34 "maxSize": 2000000 35 }, 36 "tags": { 37 "type": "array", 38 "description": "The tags of the artist.",
··· 33 ], 34 "maxSize": 2000000 35 }, 36 + "pictureUrl": { 37 + "type": "string", 38 + "description": "The URL of the picture of the artist.", 39 + "format": "uri" 40 + }, 41 "tags": { 42 "type": "array", 43 "description": "The tags of the artist.",
+5
apps/api/lexicons/scrobble/scrobble.json
··· 108 ], 109 "maxSize": 2000000 110 }, 111 "youtubeLink": { 112 "type": "string", 113 "description": "The YouTube link of the song.",
··· 108 ], 109 "maxSize": 2000000 110 }, 111 + "albumArtUrl": { 112 + "type": "string", 113 + "description": "The URL of the album art of the song.", 114 + "format": "uri" 115 + }, 116 "youtubeLink": { 117 "type": "string", 118 "description": "The YouTube link of the song.",
+5
apps/api/lexicons/song/song.json
··· 109 ], 110 "maxSize": 2000000 111 }, 112 "youtubeLink": { 113 "type": "string", 114 "description": "The YouTube link of the song.",
··· 109 ], 110 "maxSize": 2000000 111 }, 112 + "albumArtUrl": { 113 + "type": "string", 114 + "description": "The URL of the album art of the song.", 115 + "format": "uri" 116 + }, 117 "youtubeLink": { 118 "type": "string", 119 "description": "The YouTube link of the song.",
+6
apps/api/pkl/defs/album/album.pkl
··· 54 maxSize = 2000000 55 } 56 57 ["tags"] = new Array { 58 type = "array" 59 description = "The tags of the album."
··· 54 maxSize = 2000000 55 } 56 57 + ["albumArtUrl"] = new StringType { 58 + type = "string" 59 + description = "The URL of the album art of the album." 60 + format = "uri" 61 + } 62 + 63 ["tags"] = new Array { 64 type = "array" 65 description = "The tags of the album."
+6
apps/api/pkl/defs/artist/artist.pkl
··· 31 maxSize = 2000000 32 } 33 34 ["tags"] = new Array { 35 type = "array" 36 description = "The tags of the artist."
··· 31 maxSize = 2000000 32 } 33 34 + ["pictureUrl"] = new StringType { 35 + type = "string" 36 + description = "The URL of the picture of the artist." 37 + format = "uri" 38 + } 39 + 40 ["tags"] = new Array { 41 type = "array" 42 description = "The tags of the artist."
+6
apps/api/pkl/defs/scrobble/scrobble.pkl
··· 115 maxSize = 2000000 116 } 117 118 ["youtubeLink"] = new StringType { 119 type = "string" 120 description = "The YouTube link of the song."
··· 115 maxSize = 2000000 116 } 117 118 + ["albumArtUrl"] = new StringType { 119 + type = "string" 120 + description = "The URL of the album art of the song." 121 + format = "uri" 122 + } 123 + 124 ["youtubeLink"] = new StringType { 125 type = "string" 126 description = "The YouTube link of the song."
+6
apps/api/pkl/defs/song/song.pkl
··· 116 maxSize = 2000000 117 } 118 119 ["youtubeLink"] = new StringType { 120 type = "string" 121 description = "The YouTube link of the song."
··· 116 maxSize = 2000000 117 } 118 119 + ["albumArtUrl"] = new StringType { 120 + type = "string" 121 + description = "The URL of the album art of the song." 122 + format = "uri" 123 + } 124 + 125 ["youtubeLink"] = new StringType { 126 type = "string" 127 description = "The YouTube link of the song."
+1 -1
apps/api/src/bsky/app.ts
··· 77 ? Math.floor(Date.now() / 1000) + 60 * 60 * 24 * 365 * 1000 78 : Math.floor(Date.now() / 1000) + 60 * 60 * 24 * 7, 79 }, 80 - env.JWT_SECRET 81 ); 82 ctx.kv.set(did, token); 83 } catch (err) {
··· 77 ? Math.floor(Date.now() / 1000) + 60 * 60 * 24 * 365 * 1000 78 : Math.floor(Date.now() / 1000) + 60 * 60 * 24 * 7, 79 }, 80 + env.JWT_SECRET, 81 ); 82 ctx.kv.set(did, token); 83 } catch (err) {
+340 -340
apps/api/src/lexicon/index.ts
··· 3 */ 4 import { 5 createServer as createXrpcServer, 6 - type Server as XrpcServer, 7 - type Options as XrpcOptions, 8 - type AuthVerifier, 9 - type StreamAuthVerifier, 10 - } from '@atproto/xrpc-server' 11 - import { schemas } from './lexicons' 12 - import type * as AppRockskyActorGetActorAlbums from './types/app/rocksky/actor/getActorAlbums' 13 - import type * as AppRockskyActorGetActorArtists from './types/app/rocksky/actor/getActorArtists' 14 - import type * as AppRockskyActorGetActorLovedSongs from './types/app/rocksky/actor/getActorLovedSongs' 15 - import type * as AppRockskyActorGetActorPlaylists from './types/app/rocksky/actor/getActorPlaylists' 16 - import type * as AppRockskyActorGetActorScrobbles from './types/app/rocksky/actor/getActorScrobbles' 17 - import type * as AppRockskyActorGetActorSongs from './types/app/rocksky/actor/getActorSongs' 18 - import type * as AppRockskyActorGetProfile from './types/app/rocksky/actor/getProfile' 19 - import type * as AppRockskyAlbumGetAlbum from './types/app/rocksky/album/getAlbum' 20 - import type * as AppRockskyAlbumGetAlbums from './types/app/rocksky/album/getAlbums' 21 - import type * as AppRockskyAlbumGetAlbumTracks from './types/app/rocksky/album/getAlbumTracks' 22 - import type * as AppRockskyApikeyCreateApikey from './types/app/rocksky/apikey/createApikey' 23 - import type * as AppRockskyApikeyGetApikeys from './types/app/rocksky/apikey/getApikeys' 24 - import type * as AppRockskyApikeyRemoveApikey from './types/app/rocksky/apikey/removeApikey' 25 - import type * as AppRockskyApikeyUpdateApikey from './types/app/rocksky/apikey/updateApikey' 26 - import type * as AppRockskyArtistGetArtistAlbums from './types/app/rocksky/artist/getArtistAlbums' 27 - import type * as AppRockskyArtistGetArtist from './types/app/rocksky/artist/getArtist' 28 - import type * as AppRockskyArtistGetArtistListeners from './types/app/rocksky/artist/getArtistListeners' 29 - import type * as AppRockskyArtistGetArtists from './types/app/rocksky/artist/getArtists' 30 - import type * as AppRockskyArtistGetArtistTracks from './types/app/rocksky/artist/getArtistTracks' 31 - import type * as AppRockskyChartsGetScrobblesChart from './types/app/rocksky/charts/getScrobblesChart' 32 - import type * as AppRockskyDropboxDownloadFile from './types/app/rocksky/dropbox/downloadFile' 33 - import type * as AppRockskyDropboxGetFiles from './types/app/rocksky/dropbox/getFiles' 34 - import type * as AppRockskyDropboxGetMetadata from './types/app/rocksky/dropbox/getMetadata' 35 - import type * as AppRockskyDropboxGetTemporaryLink from './types/app/rocksky/dropbox/getTemporaryLink' 36 - import type * as AppRockskyFeedGetNowPlayings from './types/app/rocksky/feed/getNowPlayings' 37 - import type * as AppRockskyFeedSearch from './types/app/rocksky/feed/search' 38 - import type * as AppRockskyGoogledriveDownloadFile from './types/app/rocksky/googledrive/downloadFile' 39 - import type * as AppRockskyGoogledriveGetFile from './types/app/rocksky/googledrive/getFile' 40 - import type * as AppRockskyGoogledriveGetFiles from './types/app/rocksky/googledrive/getFiles' 41 - import type * as AppRockskyLikeDislikeShout from './types/app/rocksky/like/dislikeShout' 42 - import type * as AppRockskyLikeDislikeSong from './types/app/rocksky/like/dislikeSong' 43 - import type * as AppRockskyLikeLikeShout from './types/app/rocksky/like/likeShout' 44 - import type * as AppRockskyLikeLikeSong from './types/app/rocksky/like/likeSong' 45 - import type * as AppRockskyPlayerAddDirectoryToQueue from './types/app/rocksky/player/addDirectoryToQueue' 46 - import type * as AppRockskyPlayerAddItemsToQueue from './types/app/rocksky/player/addItemsToQueue' 47 - import type * as AppRockskyPlayerGetCurrentlyPlaying from './types/app/rocksky/player/getCurrentlyPlaying' 48 - import type * as AppRockskyPlayerGetPlaybackQueue from './types/app/rocksky/player/getPlaybackQueue' 49 - import type * as AppRockskyPlayerNext from './types/app/rocksky/player/next' 50 - import type * as AppRockskyPlayerPause from './types/app/rocksky/player/pause' 51 - import type * as AppRockskyPlayerPlayDirectory from './types/app/rocksky/player/playDirectory' 52 - import type * as AppRockskyPlayerPlayFile from './types/app/rocksky/player/playFile' 53 - import type * as AppRockskyPlayerPlay from './types/app/rocksky/player/play' 54 - import type * as AppRockskyPlayerPrevious from './types/app/rocksky/player/previous' 55 - import type * as AppRockskyPlayerSeek from './types/app/rocksky/player/seek' 56 - import type * as AppRockskyPlaylistCreatePlaylist from './types/app/rocksky/playlist/createPlaylist' 57 - import type * as AppRockskyPlaylistGetPlaylist from './types/app/rocksky/playlist/getPlaylist' 58 - import type * as AppRockskyPlaylistGetPlaylists from './types/app/rocksky/playlist/getPlaylists' 59 - import type * as AppRockskyPlaylistInsertDirectory from './types/app/rocksky/playlist/insertDirectory' 60 - import type * as AppRockskyPlaylistInsertFiles from './types/app/rocksky/playlist/insertFiles' 61 - import type * as AppRockskyPlaylistRemovePlaylist from './types/app/rocksky/playlist/removePlaylist' 62 - import type * as AppRockskyPlaylistRemoveTrack from './types/app/rocksky/playlist/removeTrack' 63 - import type * as AppRockskyPlaylistStartPlaylist from './types/app/rocksky/playlist/startPlaylist' 64 - import type * as AppRockskyScrobbleCreateScrobble from './types/app/rocksky/scrobble/createScrobble' 65 - import type * as AppRockskyScrobbleGetScrobble from './types/app/rocksky/scrobble/getScrobble' 66 - import type * as AppRockskyScrobbleGetScrobbles from './types/app/rocksky/scrobble/getScrobbles' 67 - import type * as AppRockskyShoutCreateShout from './types/app/rocksky/shout/createShout' 68 - import type * as AppRockskyShoutGetAlbumShouts from './types/app/rocksky/shout/getAlbumShouts' 69 - import type * as AppRockskyShoutGetArtistShouts from './types/app/rocksky/shout/getArtistShouts' 70 - import type * as AppRockskyShoutGetProfileShouts from './types/app/rocksky/shout/getProfileShouts' 71 - import type * as AppRockskyShoutGetShoutReplies from './types/app/rocksky/shout/getShoutReplies' 72 - import type * as AppRockskyShoutGetTrackShouts from './types/app/rocksky/shout/getTrackShouts' 73 - import type * as AppRockskyShoutRemoveShout from './types/app/rocksky/shout/removeShout' 74 - import type * as AppRockskyShoutReplyShout from './types/app/rocksky/shout/replyShout' 75 - import type * as AppRockskyShoutReportShout from './types/app/rocksky/shout/reportShout' 76 - import type * as AppRockskySongCreateSong from './types/app/rocksky/song/createSong' 77 - import type * as AppRockskySongGetSong from './types/app/rocksky/song/getSong' 78 - import type * as AppRockskySongGetSongs from './types/app/rocksky/song/getSongs' 79 - import type * as AppRockskySpotifyGetCurrentlyPlaying from './types/app/rocksky/spotify/getCurrentlyPlaying' 80 - import type * as AppRockskySpotifyNext from './types/app/rocksky/spotify/next' 81 - import type * as AppRockskySpotifyPause from './types/app/rocksky/spotify/pause' 82 - import type * as AppRockskySpotifyPlay from './types/app/rocksky/spotify/play' 83 - import type * as AppRockskySpotifyPrevious from './types/app/rocksky/spotify/previous' 84 - import type * as AppRockskySpotifySeek from './types/app/rocksky/spotify/seek' 85 - import type * as AppRockskyStatsGetStats from './types/app/rocksky/stats/getStats' 86 87 export function createServer(options?: XrpcOptions): Server { 88 - return new Server(options) 89 } 90 91 export class Server { 92 - xrpc: XrpcServer 93 - app: AppNS 94 - com: ComNS 95 96 constructor(options?: XrpcOptions) { 97 - this.xrpc = createXrpcServer(schemas, options) 98 - this.app = new AppNS(this) 99 - this.com = new ComNS(this) 100 } 101 } 102 103 export class AppNS { 104 - _server: Server 105 - rocksky: AppRockskyNS 106 - bsky: AppBskyNS 107 108 constructor(server: Server) { 109 - this._server = server 110 - this.rocksky = new AppRockskyNS(server) 111 - this.bsky = new AppBskyNS(server) 112 } 113 } 114 115 export class AppRockskyNS { 116 - _server: Server 117 - actor: AppRockskyActorNS 118 - album: AppRockskyAlbumNS 119 - apikey: AppRockskyApikeyNS 120 - artist: AppRockskyArtistNS 121 - charts: AppRockskyChartsNS 122 - dropbox: AppRockskyDropboxNS 123 - feed: AppRockskyFeedNS 124 - googledrive: AppRockskyGoogledriveNS 125 - like: AppRockskyLikeNS 126 - player: AppRockskyPlayerNS 127 - playlist: AppRockskyPlaylistNS 128 - scrobble: AppRockskyScrobbleNS 129 - shout: AppRockskyShoutNS 130 - song: AppRockskySongNS 131 - spotify: AppRockskySpotifyNS 132 - stats: AppRockskyStatsNS 133 134 constructor(server: Server) { 135 - this._server = server 136 - this.actor = new AppRockskyActorNS(server) 137 - this.album = new AppRockskyAlbumNS(server) 138 - this.apikey = new AppRockskyApikeyNS(server) 139 - this.artist = new AppRockskyArtistNS(server) 140 - this.charts = new AppRockskyChartsNS(server) 141 - this.dropbox = new AppRockskyDropboxNS(server) 142 - this.feed = new AppRockskyFeedNS(server) 143 - this.googledrive = new AppRockskyGoogledriveNS(server) 144 - this.like = new AppRockskyLikeNS(server) 145 - this.player = new AppRockskyPlayerNS(server) 146 - this.playlist = new AppRockskyPlaylistNS(server) 147 - this.scrobble = new AppRockskyScrobbleNS(server) 148 - this.shout = new AppRockskyShoutNS(server) 149 - this.song = new AppRockskySongNS(server) 150 - this.spotify = new AppRockskySpotifyNS(server) 151 - this.stats = new AppRockskyStatsNS(server) 152 } 153 } 154 155 export class AppRockskyActorNS { 156 - _server: Server 157 158 constructor(server: Server) { 159 - this._server = server 160 } 161 162 getActorAlbums<AV extends AuthVerifier>( ··· 166 AppRockskyActorGetActorAlbums.HandlerReqCtx<ExtractAuth<AV>> 167 >, 168 ) { 169 - const nsid = 'app.rocksky.actor.getActorAlbums' // @ts-ignore 170 - return this._server.xrpc.method(nsid, cfg) 171 } 172 173 getActorArtists<AV extends AuthVerifier>( ··· 177 AppRockskyActorGetActorArtists.HandlerReqCtx<ExtractAuth<AV>> 178 >, 179 ) { 180 - const nsid = 'app.rocksky.actor.getActorArtists' // @ts-ignore 181 - return this._server.xrpc.method(nsid, cfg) 182 } 183 184 getActorLovedSongs<AV extends AuthVerifier>( ··· 188 AppRockskyActorGetActorLovedSongs.HandlerReqCtx<ExtractAuth<AV>> 189 >, 190 ) { 191 - const nsid = 'app.rocksky.actor.getActorLovedSongs' // @ts-ignore 192 - return this._server.xrpc.method(nsid, cfg) 193 } 194 195 getActorPlaylists<AV extends AuthVerifier>( ··· 199 AppRockskyActorGetActorPlaylists.HandlerReqCtx<ExtractAuth<AV>> 200 >, 201 ) { 202 - const nsid = 'app.rocksky.actor.getActorPlaylists' // @ts-ignore 203 - return this._server.xrpc.method(nsid, cfg) 204 } 205 206 getActorScrobbles<AV extends AuthVerifier>( ··· 210 AppRockskyActorGetActorScrobbles.HandlerReqCtx<ExtractAuth<AV>> 211 >, 212 ) { 213 - const nsid = 'app.rocksky.actor.getActorScrobbles' // @ts-ignore 214 - return this._server.xrpc.method(nsid, cfg) 215 } 216 217 getActorSongs<AV extends AuthVerifier>( ··· 221 AppRockskyActorGetActorSongs.HandlerReqCtx<ExtractAuth<AV>> 222 >, 223 ) { 224 - const nsid = 'app.rocksky.actor.getActorSongs' // @ts-ignore 225 - return this._server.xrpc.method(nsid, cfg) 226 } 227 228 getProfile<AV extends AuthVerifier>( ··· 232 AppRockskyActorGetProfile.HandlerReqCtx<ExtractAuth<AV>> 233 >, 234 ) { 235 - const nsid = 'app.rocksky.actor.getProfile' // @ts-ignore 236 - return this._server.xrpc.method(nsid, cfg) 237 } 238 } 239 240 export class AppRockskyAlbumNS { 241 - _server: Server 242 243 constructor(server: Server) { 244 - this._server = server 245 } 246 247 getAlbum<AV extends AuthVerifier>( ··· 251 AppRockskyAlbumGetAlbum.HandlerReqCtx<ExtractAuth<AV>> 252 >, 253 ) { 254 - const nsid = 'app.rocksky.album.getAlbum' // @ts-ignore 255 - return this._server.xrpc.method(nsid, cfg) 256 } 257 258 getAlbums<AV extends AuthVerifier>( ··· 262 AppRockskyAlbumGetAlbums.HandlerReqCtx<ExtractAuth<AV>> 263 >, 264 ) { 265 - const nsid = 'app.rocksky.album.getAlbums' // @ts-ignore 266 - return this._server.xrpc.method(nsid, cfg) 267 } 268 269 getAlbumTracks<AV extends AuthVerifier>( ··· 273 AppRockskyAlbumGetAlbumTracks.HandlerReqCtx<ExtractAuth<AV>> 274 >, 275 ) { 276 - const nsid = 'app.rocksky.album.getAlbumTracks' // @ts-ignore 277 - return this._server.xrpc.method(nsid, cfg) 278 } 279 } 280 281 export class AppRockskyApikeyNS { 282 - _server: Server 283 284 constructor(server: Server) { 285 - this._server = server 286 } 287 288 createApikey<AV extends AuthVerifier>( ··· 292 AppRockskyApikeyCreateApikey.HandlerReqCtx<ExtractAuth<AV>> 293 >, 294 ) { 295 - const nsid = 'app.rocksky.apikey.createApikey' // @ts-ignore 296 - return this._server.xrpc.method(nsid, cfg) 297 } 298 299 getApikeys<AV extends AuthVerifier>( ··· 303 AppRockskyApikeyGetApikeys.HandlerReqCtx<ExtractAuth<AV>> 304 >, 305 ) { 306 - const nsid = 'app.rocksky.apikey.getApikeys' // @ts-ignore 307 - return this._server.xrpc.method(nsid, cfg) 308 } 309 310 removeApikey<AV extends AuthVerifier>( ··· 314 AppRockskyApikeyRemoveApikey.HandlerReqCtx<ExtractAuth<AV>> 315 >, 316 ) { 317 - const nsid = 'app.rocksky.apikey.removeApikey' // @ts-ignore 318 - return this._server.xrpc.method(nsid, cfg) 319 } 320 321 updateApikey<AV extends AuthVerifier>( ··· 325 AppRockskyApikeyUpdateApikey.HandlerReqCtx<ExtractAuth<AV>> 326 >, 327 ) { 328 - const nsid = 'app.rocksky.apikey.updateApikey' // @ts-ignore 329 - return this._server.xrpc.method(nsid, cfg) 330 } 331 } 332 333 export class AppRockskyArtistNS { 334 - _server: Server 335 336 constructor(server: Server) { 337 - this._server = server 338 } 339 340 getArtistAlbums<AV extends AuthVerifier>( ··· 344 AppRockskyArtistGetArtistAlbums.HandlerReqCtx<ExtractAuth<AV>> 345 >, 346 ) { 347 - const nsid = 'app.rocksky.artist.getArtistAlbums' // @ts-ignore 348 - return this._server.xrpc.method(nsid, cfg) 349 } 350 351 getArtist<AV extends AuthVerifier>( ··· 355 AppRockskyArtistGetArtist.HandlerReqCtx<ExtractAuth<AV>> 356 >, 357 ) { 358 - const nsid = 'app.rocksky.artist.getArtist' // @ts-ignore 359 - return this._server.xrpc.method(nsid, cfg) 360 } 361 362 getArtistListeners<AV extends AuthVerifier>( ··· 366 AppRockskyArtistGetArtistListeners.HandlerReqCtx<ExtractAuth<AV>> 367 >, 368 ) { 369 - const nsid = 'app.rocksky.artist.getArtistListeners' // @ts-ignore 370 - return this._server.xrpc.method(nsid, cfg) 371 } 372 373 getArtists<AV extends AuthVerifier>( ··· 377 AppRockskyArtistGetArtists.HandlerReqCtx<ExtractAuth<AV>> 378 >, 379 ) { 380 - const nsid = 'app.rocksky.artist.getArtists' // @ts-ignore 381 - return this._server.xrpc.method(nsid, cfg) 382 } 383 384 getArtistTracks<AV extends AuthVerifier>( ··· 388 AppRockskyArtistGetArtistTracks.HandlerReqCtx<ExtractAuth<AV>> 389 >, 390 ) { 391 - const nsid = 'app.rocksky.artist.getArtistTracks' // @ts-ignore 392 - return this._server.xrpc.method(nsid, cfg) 393 } 394 } 395 396 export class AppRockskyChartsNS { 397 - _server: Server 398 399 constructor(server: Server) { 400 - this._server = server 401 } 402 403 getScrobblesChart<AV extends AuthVerifier>( ··· 407 AppRockskyChartsGetScrobblesChart.HandlerReqCtx<ExtractAuth<AV>> 408 >, 409 ) { 410 - const nsid = 'app.rocksky.charts.getScrobblesChart' // @ts-ignore 411 - return this._server.xrpc.method(nsid, cfg) 412 } 413 } 414 415 export class AppRockskyDropboxNS { 416 - _server: Server 417 418 constructor(server: Server) { 419 - this._server = server 420 } 421 422 downloadFile<AV extends AuthVerifier>( ··· 426 AppRockskyDropboxDownloadFile.HandlerReqCtx<ExtractAuth<AV>> 427 >, 428 ) { 429 - const nsid = 'app.rocksky.dropbox.downloadFile' // @ts-ignore 430 - return this._server.xrpc.method(nsid, cfg) 431 } 432 433 getFiles<AV extends AuthVerifier>( ··· 437 AppRockskyDropboxGetFiles.HandlerReqCtx<ExtractAuth<AV>> 438 >, 439 ) { 440 - const nsid = 'app.rocksky.dropbox.getFiles' // @ts-ignore 441 - return this._server.xrpc.method(nsid, cfg) 442 } 443 444 getMetadata<AV extends AuthVerifier>( ··· 448 AppRockskyDropboxGetMetadata.HandlerReqCtx<ExtractAuth<AV>> 449 >, 450 ) { 451 - const nsid = 'app.rocksky.dropbox.getMetadata' // @ts-ignore 452 - return this._server.xrpc.method(nsid, cfg) 453 } 454 455 getTemporaryLink<AV extends AuthVerifier>( ··· 459 AppRockskyDropboxGetTemporaryLink.HandlerReqCtx<ExtractAuth<AV>> 460 >, 461 ) { 462 - const nsid = 'app.rocksky.dropbox.getTemporaryLink' // @ts-ignore 463 - return this._server.xrpc.method(nsid, cfg) 464 } 465 } 466 467 export class AppRockskyFeedNS { 468 - _server: Server 469 470 constructor(server: Server) { 471 - this._server = server 472 } 473 474 getNowPlayings<AV extends AuthVerifier>( ··· 478 AppRockskyFeedGetNowPlayings.HandlerReqCtx<ExtractAuth<AV>> 479 >, 480 ) { 481 - const nsid = 'app.rocksky.feed.getNowPlayings' // @ts-ignore 482 - return this._server.xrpc.method(nsid, cfg) 483 } 484 485 search<AV extends AuthVerifier>( ··· 489 AppRockskyFeedSearch.HandlerReqCtx<ExtractAuth<AV>> 490 >, 491 ) { 492 - const nsid = 'app.rocksky.feed.search' // @ts-ignore 493 - return this._server.xrpc.method(nsid, cfg) 494 } 495 } 496 497 export class AppRockskyGoogledriveNS { 498 - _server: Server 499 500 constructor(server: Server) { 501 - this._server = server 502 } 503 504 downloadFile<AV extends AuthVerifier>( ··· 508 AppRockskyGoogledriveDownloadFile.HandlerReqCtx<ExtractAuth<AV>> 509 >, 510 ) { 511 - const nsid = 'app.rocksky.googledrive.downloadFile' // @ts-ignore 512 - return this._server.xrpc.method(nsid, cfg) 513 } 514 515 getFile<AV extends AuthVerifier>( ··· 519 AppRockskyGoogledriveGetFile.HandlerReqCtx<ExtractAuth<AV>> 520 >, 521 ) { 522 - const nsid = 'app.rocksky.googledrive.getFile' // @ts-ignore 523 - return this._server.xrpc.method(nsid, cfg) 524 } 525 526 getFiles<AV extends AuthVerifier>( ··· 530 AppRockskyGoogledriveGetFiles.HandlerReqCtx<ExtractAuth<AV>> 531 >, 532 ) { 533 - const nsid = 'app.rocksky.googledrive.getFiles' // @ts-ignore 534 - return this._server.xrpc.method(nsid, cfg) 535 } 536 } 537 538 export class AppRockskyLikeNS { 539 - _server: Server 540 541 constructor(server: Server) { 542 - this._server = server 543 } 544 545 dislikeShout<AV extends AuthVerifier>( ··· 549 AppRockskyLikeDislikeShout.HandlerReqCtx<ExtractAuth<AV>> 550 >, 551 ) { 552 - const nsid = 'app.rocksky.like.dislikeShout' // @ts-ignore 553 - return this._server.xrpc.method(nsid, cfg) 554 } 555 556 dislikeSong<AV extends AuthVerifier>( ··· 560 AppRockskyLikeDislikeSong.HandlerReqCtx<ExtractAuth<AV>> 561 >, 562 ) { 563 - const nsid = 'app.rocksky.like.dislikeSong' // @ts-ignore 564 - return this._server.xrpc.method(nsid, cfg) 565 } 566 567 likeShout<AV extends AuthVerifier>( ··· 571 AppRockskyLikeLikeShout.HandlerReqCtx<ExtractAuth<AV>> 572 >, 573 ) { 574 - const nsid = 'app.rocksky.like.likeShout' // @ts-ignore 575 - return this._server.xrpc.method(nsid, cfg) 576 } 577 578 likeSong<AV extends AuthVerifier>( ··· 582 AppRockskyLikeLikeSong.HandlerReqCtx<ExtractAuth<AV>> 583 >, 584 ) { 585 - const nsid = 'app.rocksky.like.likeSong' // @ts-ignore 586 - return this._server.xrpc.method(nsid, cfg) 587 } 588 } 589 590 export class AppRockskyPlayerNS { 591 - _server: Server 592 593 constructor(server: Server) { 594 - this._server = server 595 } 596 597 addDirectoryToQueue<AV extends AuthVerifier>( ··· 601 AppRockskyPlayerAddDirectoryToQueue.HandlerReqCtx<ExtractAuth<AV>> 602 >, 603 ) { 604 - const nsid = 'app.rocksky.player.addDirectoryToQueue' // @ts-ignore 605 - return this._server.xrpc.method(nsid, cfg) 606 } 607 608 addItemsToQueue<AV extends AuthVerifier>( ··· 612 AppRockskyPlayerAddItemsToQueue.HandlerReqCtx<ExtractAuth<AV>> 613 >, 614 ) { 615 - const nsid = 'app.rocksky.player.addItemsToQueue' // @ts-ignore 616 - return this._server.xrpc.method(nsid, cfg) 617 } 618 619 getCurrentlyPlaying<AV extends AuthVerifier>( ··· 623 AppRockskyPlayerGetCurrentlyPlaying.HandlerReqCtx<ExtractAuth<AV>> 624 >, 625 ) { 626 - const nsid = 'app.rocksky.player.getCurrentlyPlaying' // @ts-ignore 627 - return this._server.xrpc.method(nsid, cfg) 628 } 629 630 getPlaybackQueue<AV extends AuthVerifier>( ··· 634 AppRockskyPlayerGetPlaybackQueue.HandlerReqCtx<ExtractAuth<AV>> 635 >, 636 ) { 637 - const nsid = 'app.rocksky.player.getPlaybackQueue' // @ts-ignore 638 - return this._server.xrpc.method(nsid, cfg) 639 } 640 641 next<AV extends AuthVerifier>( ··· 645 AppRockskyPlayerNext.HandlerReqCtx<ExtractAuth<AV>> 646 >, 647 ) { 648 - const nsid = 'app.rocksky.player.next' // @ts-ignore 649 - return this._server.xrpc.method(nsid, cfg) 650 } 651 652 pause<AV extends AuthVerifier>( ··· 656 AppRockskyPlayerPause.HandlerReqCtx<ExtractAuth<AV>> 657 >, 658 ) { 659 - const nsid = 'app.rocksky.player.pause' // @ts-ignore 660 - return this._server.xrpc.method(nsid, cfg) 661 } 662 663 playDirectory<AV extends AuthVerifier>( ··· 667 AppRockskyPlayerPlayDirectory.HandlerReqCtx<ExtractAuth<AV>> 668 >, 669 ) { 670 - const nsid = 'app.rocksky.player.playDirectory' // @ts-ignore 671 - return this._server.xrpc.method(nsid, cfg) 672 } 673 674 playFile<AV extends AuthVerifier>( ··· 678 AppRockskyPlayerPlayFile.HandlerReqCtx<ExtractAuth<AV>> 679 >, 680 ) { 681 - const nsid = 'app.rocksky.player.playFile' // @ts-ignore 682 - return this._server.xrpc.method(nsid, cfg) 683 } 684 685 play<AV extends AuthVerifier>( ··· 689 AppRockskyPlayerPlay.HandlerReqCtx<ExtractAuth<AV>> 690 >, 691 ) { 692 - const nsid = 'app.rocksky.player.play' // @ts-ignore 693 - return this._server.xrpc.method(nsid, cfg) 694 } 695 696 previous<AV extends AuthVerifier>( ··· 700 AppRockskyPlayerPrevious.HandlerReqCtx<ExtractAuth<AV>> 701 >, 702 ) { 703 - const nsid = 'app.rocksky.player.previous' // @ts-ignore 704 - return this._server.xrpc.method(nsid, cfg) 705 } 706 707 seek<AV extends AuthVerifier>( ··· 711 AppRockskyPlayerSeek.HandlerReqCtx<ExtractAuth<AV>> 712 >, 713 ) { 714 - const nsid = 'app.rocksky.player.seek' // @ts-ignore 715 - return this._server.xrpc.method(nsid, cfg) 716 } 717 } 718 719 export class AppRockskyPlaylistNS { 720 - _server: Server 721 722 constructor(server: Server) { 723 - this._server = server 724 } 725 726 createPlaylist<AV extends AuthVerifier>( ··· 730 AppRockskyPlaylistCreatePlaylist.HandlerReqCtx<ExtractAuth<AV>> 731 >, 732 ) { 733 - const nsid = 'app.rocksky.playlist.createPlaylist' // @ts-ignore 734 - return this._server.xrpc.method(nsid, cfg) 735 } 736 737 getPlaylist<AV extends AuthVerifier>( ··· 741 AppRockskyPlaylistGetPlaylist.HandlerReqCtx<ExtractAuth<AV>> 742 >, 743 ) { 744 - const nsid = 'app.rocksky.playlist.getPlaylist' // @ts-ignore 745 - return this._server.xrpc.method(nsid, cfg) 746 } 747 748 getPlaylists<AV extends AuthVerifier>( ··· 752 AppRockskyPlaylistGetPlaylists.HandlerReqCtx<ExtractAuth<AV>> 753 >, 754 ) { 755 - const nsid = 'app.rocksky.playlist.getPlaylists' // @ts-ignore 756 - return this._server.xrpc.method(nsid, cfg) 757 } 758 759 insertDirectory<AV extends AuthVerifier>( ··· 763 AppRockskyPlaylistInsertDirectory.HandlerReqCtx<ExtractAuth<AV>> 764 >, 765 ) { 766 - const nsid = 'app.rocksky.playlist.insertDirectory' // @ts-ignore 767 - return this._server.xrpc.method(nsid, cfg) 768 } 769 770 insertFiles<AV extends AuthVerifier>( ··· 774 AppRockskyPlaylistInsertFiles.HandlerReqCtx<ExtractAuth<AV>> 775 >, 776 ) { 777 - const nsid = 'app.rocksky.playlist.insertFiles' // @ts-ignore 778 - return this._server.xrpc.method(nsid, cfg) 779 } 780 781 removePlaylist<AV extends AuthVerifier>( ··· 785 AppRockskyPlaylistRemovePlaylist.HandlerReqCtx<ExtractAuth<AV>> 786 >, 787 ) { 788 - const nsid = 'app.rocksky.playlist.removePlaylist' // @ts-ignore 789 - return this._server.xrpc.method(nsid, cfg) 790 } 791 792 removeTrack<AV extends AuthVerifier>( ··· 796 AppRockskyPlaylistRemoveTrack.HandlerReqCtx<ExtractAuth<AV>> 797 >, 798 ) { 799 - const nsid = 'app.rocksky.playlist.removeTrack' // @ts-ignore 800 - return this._server.xrpc.method(nsid, cfg) 801 } 802 803 startPlaylist<AV extends AuthVerifier>( ··· 807 AppRockskyPlaylistStartPlaylist.HandlerReqCtx<ExtractAuth<AV>> 808 >, 809 ) { 810 - const nsid = 'app.rocksky.playlist.startPlaylist' // @ts-ignore 811 - return this._server.xrpc.method(nsid, cfg) 812 } 813 } 814 815 export class AppRockskyScrobbleNS { 816 - _server: Server 817 818 constructor(server: Server) { 819 - this._server = server 820 } 821 822 createScrobble<AV extends AuthVerifier>( ··· 826 AppRockskyScrobbleCreateScrobble.HandlerReqCtx<ExtractAuth<AV>> 827 >, 828 ) { 829 - const nsid = 'app.rocksky.scrobble.createScrobble' // @ts-ignore 830 - return this._server.xrpc.method(nsid, cfg) 831 } 832 833 getScrobble<AV extends AuthVerifier>( ··· 837 AppRockskyScrobbleGetScrobble.HandlerReqCtx<ExtractAuth<AV>> 838 >, 839 ) { 840 - const nsid = 'app.rocksky.scrobble.getScrobble' // @ts-ignore 841 - return this._server.xrpc.method(nsid, cfg) 842 } 843 844 getScrobbles<AV extends AuthVerifier>( ··· 848 AppRockskyScrobbleGetScrobbles.HandlerReqCtx<ExtractAuth<AV>> 849 >, 850 ) { 851 - const nsid = 'app.rocksky.scrobble.getScrobbles' // @ts-ignore 852 - return this._server.xrpc.method(nsid, cfg) 853 } 854 } 855 856 export class AppRockskyShoutNS { 857 - _server: Server 858 859 constructor(server: Server) { 860 - this._server = server 861 } 862 863 createShout<AV extends AuthVerifier>( ··· 867 AppRockskyShoutCreateShout.HandlerReqCtx<ExtractAuth<AV>> 868 >, 869 ) { 870 - const nsid = 'app.rocksky.shout.createShout' // @ts-ignore 871 - return this._server.xrpc.method(nsid, cfg) 872 } 873 874 getAlbumShouts<AV extends AuthVerifier>( ··· 878 AppRockskyShoutGetAlbumShouts.HandlerReqCtx<ExtractAuth<AV>> 879 >, 880 ) { 881 - const nsid = 'app.rocksky.shout.getAlbumShouts' // @ts-ignore 882 - return this._server.xrpc.method(nsid, cfg) 883 } 884 885 getArtistShouts<AV extends AuthVerifier>( ··· 889 AppRockskyShoutGetArtistShouts.HandlerReqCtx<ExtractAuth<AV>> 890 >, 891 ) { 892 - const nsid = 'app.rocksky.shout.getArtistShouts' // @ts-ignore 893 - return this._server.xrpc.method(nsid, cfg) 894 } 895 896 getProfileShouts<AV extends AuthVerifier>( ··· 900 AppRockskyShoutGetProfileShouts.HandlerReqCtx<ExtractAuth<AV>> 901 >, 902 ) { 903 - const nsid = 'app.rocksky.shout.getProfileShouts' // @ts-ignore 904 - return this._server.xrpc.method(nsid, cfg) 905 } 906 907 getShoutReplies<AV extends AuthVerifier>( ··· 911 AppRockskyShoutGetShoutReplies.HandlerReqCtx<ExtractAuth<AV>> 912 >, 913 ) { 914 - const nsid = 'app.rocksky.shout.getShoutReplies' // @ts-ignore 915 - return this._server.xrpc.method(nsid, cfg) 916 } 917 918 getTrackShouts<AV extends AuthVerifier>( ··· 922 AppRockskyShoutGetTrackShouts.HandlerReqCtx<ExtractAuth<AV>> 923 >, 924 ) { 925 - const nsid = 'app.rocksky.shout.getTrackShouts' // @ts-ignore 926 - return this._server.xrpc.method(nsid, cfg) 927 } 928 929 removeShout<AV extends AuthVerifier>( ··· 933 AppRockskyShoutRemoveShout.HandlerReqCtx<ExtractAuth<AV>> 934 >, 935 ) { 936 - const nsid = 'app.rocksky.shout.removeShout' // @ts-ignore 937 - return this._server.xrpc.method(nsid, cfg) 938 } 939 940 replyShout<AV extends AuthVerifier>( ··· 944 AppRockskyShoutReplyShout.HandlerReqCtx<ExtractAuth<AV>> 945 >, 946 ) { 947 - const nsid = 'app.rocksky.shout.replyShout' // @ts-ignore 948 - return this._server.xrpc.method(nsid, cfg) 949 } 950 951 reportShout<AV extends AuthVerifier>( ··· 955 AppRockskyShoutReportShout.HandlerReqCtx<ExtractAuth<AV>> 956 >, 957 ) { 958 - const nsid = 'app.rocksky.shout.reportShout' // @ts-ignore 959 - return this._server.xrpc.method(nsid, cfg) 960 } 961 } 962 963 export class AppRockskySongNS { 964 - _server: Server 965 966 constructor(server: Server) { 967 - this._server = server 968 } 969 970 createSong<AV extends AuthVerifier>( ··· 974 AppRockskySongCreateSong.HandlerReqCtx<ExtractAuth<AV>> 975 >, 976 ) { 977 - const nsid = 'app.rocksky.song.createSong' // @ts-ignore 978 - return this._server.xrpc.method(nsid, cfg) 979 } 980 981 getSong<AV extends AuthVerifier>( ··· 985 AppRockskySongGetSong.HandlerReqCtx<ExtractAuth<AV>> 986 >, 987 ) { 988 - const nsid = 'app.rocksky.song.getSong' // @ts-ignore 989 - return this._server.xrpc.method(nsid, cfg) 990 } 991 992 getSongs<AV extends AuthVerifier>( ··· 996 AppRockskySongGetSongs.HandlerReqCtx<ExtractAuth<AV>> 997 >, 998 ) { 999 - const nsid = 'app.rocksky.song.getSongs' // @ts-ignore 1000 - return this._server.xrpc.method(nsid, cfg) 1001 } 1002 } 1003 1004 export class AppRockskySpotifyNS { 1005 - _server: Server 1006 1007 constructor(server: Server) { 1008 - this._server = server 1009 } 1010 1011 getCurrentlyPlaying<AV extends AuthVerifier>( ··· 1015 AppRockskySpotifyGetCurrentlyPlaying.HandlerReqCtx<ExtractAuth<AV>> 1016 >, 1017 ) { 1018 - const nsid = 'app.rocksky.spotify.getCurrentlyPlaying' // @ts-ignore 1019 - return this._server.xrpc.method(nsid, cfg) 1020 } 1021 1022 next<AV extends AuthVerifier>( ··· 1026 AppRockskySpotifyNext.HandlerReqCtx<ExtractAuth<AV>> 1027 >, 1028 ) { 1029 - const nsid = 'app.rocksky.spotify.next' // @ts-ignore 1030 - return this._server.xrpc.method(nsid, cfg) 1031 } 1032 1033 pause<AV extends AuthVerifier>( ··· 1037 AppRockskySpotifyPause.HandlerReqCtx<ExtractAuth<AV>> 1038 >, 1039 ) { 1040 - const nsid = 'app.rocksky.spotify.pause' // @ts-ignore 1041 - return this._server.xrpc.method(nsid, cfg) 1042 } 1043 1044 play<AV extends AuthVerifier>( ··· 1048 AppRockskySpotifyPlay.HandlerReqCtx<ExtractAuth<AV>> 1049 >, 1050 ) { 1051 - const nsid = 'app.rocksky.spotify.play' // @ts-ignore 1052 - return this._server.xrpc.method(nsid, cfg) 1053 } 1054 1055 previous<AV extends AuthVerifier>( ··· 1059 AppRockskySpotifyPrevious.HandlerReqCtx<ExtractAuth<AV>> 1060 >, 1061 ) { 1062 - const nsid = 'app.rocksky.spotify.previous' // @ts-ignore 1063 - return this._server.xrpc.method(nsid, cfg) 1064 } 1065 1066 seek<AV extends AuthVerifier>( ··· 1070 AppRockskySpotifySeek.HandlerReqCtx<ExtractAuth<AV>> 1071 >, 1072 ) { 1073 - const nsid = 'app.rocksky.spotify.seek' // @ts-ignore 1074 - return this._server.xrpc.method(nsid, cfg) 1075 } 1076 } 1077 1078 export class AppRockskyStatsNS { 1079 - _server: Server 1080 1081 constructor(server: Server) { 1082 - this._server = server 1083 } 1084 1085 getStats<AV extends AuthVerifier>( ··· 1089 AppRockskyStatsGetStats.HandlerReqCtx<ExtractAuth<AV>> 1090 >, 1091 ) { 1092 - const nsid = 'app.rocksky.stats.getStats' // @ts-ignore 1093 - return this._server.xrpc.method(nsid, cfg) 1094 } 1095 } 1096 1097 export class AppBskyNS { 1098 - _server: Server 1099 - actor: AppBskyActorNS 1100 1101 constructor(server: Server) { 1102 - this._server = server 1103 - this.actor = new AppBskyActorNS(server) 1104 } 1105 } 1106 1107 export class AppBskyActorNS { 1108 - _server: Server 1109 1110 constructor(server: Server) { 1111 - this._server = server 1112 } 1113 } 1114 1115 export class ComNS { 1116 - _server: Server 1117 - atproto: ComAtprotoNS 1118 1119 constructor(server: Server) { 1120 - this._server = server 1121 - this.atproto = new ComAtprotoNS(server) 1122 } 1123 } 1124 1125 export class ComAtprotoNS { 1126 - _server: Server 1127 - repo: ComAtprotoRepoNS 1128 1129 constructor(server: Server) { 1130 - this._server = server 1131 - this.repo = new ComAtprotoRepoNS(server) 1132 } 1133 } 1134 1135 export class ComAtprotoRepoNS { 1136 - _server: Server 1137 1138 constructor(server: Server) { 1139 - this._server = server 1140 } 1141 } 1142 1143 type SharedRateLimitOpts<T> = { 1144 - name: string 1145 - calcKey?: (ctx: T) => string | null 1146 - calcPoints?: (ctx: T) => number 1147 - } 1148 type RouteRateLimitOpts<T> = { 1149 - durationMs: number 1150 - points: number 1151 - calcKey?: (ctx: T) => string | null 1152 - calcPoints?: (ctx: T) => number 1153 - } 1154 - type HandlerOpts = { blobLimit?: number } 1155 - type HandlerRateLimitOpts<T> = SharedRateLimitOpts<T> | RouteRateLimitOpts<T> 1156 type ConfigOf<Auth, Handler, ReqCtx> = 1157 | Handler 1158 | { 1159 - auth?: Auth 1160 - opts?: HandlerOpts 1161 - rateLimit?: HandlerRateLimitOpts<ReqCtx> | HandlerRateLimitOpts<ReqCtx>[] 1162 - handler: Handler 1163 - } 1164 type ExtractAuth<AV extends AuthVerifier | StreamAuthVerifier> = Extract< 1165 Awaited<ReturnType<AV>>, 1166 { credentials: unknown } 1167 - >
··· 3 */ 4 import { 5 createServer as createXrpcServer, 6 + Server as XrpcServer, 7 + Options as XrpcOptions, 8 + AuthVerifier, 9 + StreamAuthVerifier, 10 + } from "@atproto/xrpc-server"; 11 + import { schemas } from "./lexicons"; 12 + import * as AppRockskyActorGetActorAlbums from "./types/app/rocksky/actor/getActorAlbums"; 13 + import * as AppRockskyActorGetActorArtists from "./types/app/rocksky/actor/getActorArtists"; 14 + import * as AppRockskyActorGetActorLovedSongs from "./types/app/rocksky/actor/getActorLovedSongs"; 15 + import * as AppRockskyActorGetActorPlaylists from "./types/app/rocksky/actor/getActorPlaylists"; 16 + import * as AppRockskyActorGetActorScrobbles from "./types/app/rocksky/actor/getActorScrobbles"; 17 + import * as AppRockskyActorGetActorSongs from "./types/app/rocksky/actor/getActorSongs"; 18 + import * as AppRockskyActorGetProfile from "./types/app/rocksky/actor/getProfile"; 19 + import * as AppRockskyAlbumGetAlbum from "./types/app/rocksky/album/getAlbum"; 20 + import * as AppRockskyAlbumGetAlbums from "./types/app/rocksky/album/getAlbums"; 21 + import * as AppRockskyAlbumGetAlbumTracks from "./types/app/rocksky/album/getAlbumTracks"; 22 + import * as AppRockskyApikeyCreateApikey from "./types/app/rocksky/apikey/createApikey"; 23 + import * as AppRockskyApikeyGetApikeys from "./types/app/rocksky/apikey/getApikeys"; 24 + import * as AppRockskyApikeyRemoveApikey from "./types/app/rocksky/apikey/removeApikey"; 25 + import * as AppRockskyApikeyUpdateApikey from "./types/app/rocksky/apikey/updateApikey"; 26 + import * as AppRockskyArtistGetArtistAlbums from "./types/app/rocksky/artist/getArtistAlbums"; 27 + import * as AppRockskyArtistGetArtist from "./types/app/rocksky/artist/getArtist"; 28 + import * as AppRockskyArtistGetArtistListeners from "./types/app/rocksky/artist/getArtistListeners"; 29 + import * as AppRockskyArtistGetArtists from "./types/app/rocksky/artist/getArtists"; 30 + import * as AppRockskyArtistGetArtistTracks from "./types/app/rocksky/artist/getArtistTracks"; 31 + import * as AppRockskyChartsGetScrobblesChart from "./types/app/rocksky/charts/getScrobblesChart"; 32 + import * as AppRockskyDropboxDownloadFile from "./types/app/rocksky/dropbox/downloadFile"; 33 + import * as AppRockskyDropboxGetFiles from "./types/app/rocksky/dropbox/getFiles"; 34 + import * as AppRockskyDropboxGetMetadata from "./types/app/rocksky/dropbox/getMetadata"; 35 + import * as AppRockskyDropboxGetTemporaryLink from "./types/app/rocksky/dropbox/getTemporaryLink"; 36 + import * as AppRockskyFeedGetNowPlayings from "./types/app/rocksky/feed/getNowPlayings"; 37 + import * as AppRockskyFeedSearch from "./types/app/rocksky/feed/search"; 38 + import * as AppRockskyGoogledriveDownloadFile from "./types/app/rocksky/googledrive/downloadFile"; 39 + import * as AppRockskyGoogledriveGetFile from "./types/app/rocksky/googledrive/getFile"; 40 + import * as AppRockskyGoogledriveGetFiles from "./types/app/rocksky/googledrive/getFiles"; 41 + import * as AppRockskyLikeDislikeShout from "./types/app/rocksky/like/dislikeShout"; 42 + import * as AppRockskyLikeDislikeSong from "./types/app/rocksky/like/dislikeSong"; 43 + import * as AppRockskyLikeLikeShout from "./types/app/rocksky/like/likeShout"; 44 + import * as AppRockskyLikeLikeSong from "./types/app/rocksky/like/likeSong"; 45 + import * as AppRockskyPlayerAddDirectoryToQueue from "./types/app/rocksky/player/addDirectoryToQueue"; 46 + import * as AppRockskyPlayerAddItemsToQueue from "./types/app/rocksky/player/addItemsToQueue"; 47 + import * as AppRockskyPlayerGetCurrentlyPlaying from "./types/app/rocksky/player/getCurrentlyPlaying"; 48 + import * as AppRockskyPlayerGetPlaybackQueue from "./types/app/rocksky/player/getPlaybackQueue"; 49 + import * as AppRockskyPlayerNext from "./types/app/rocksky/player/next"; 50 + import * as AppRockskyPlayerPause from "./types/app/rocksky/player/pause"; 51 + import * as AppRockskyPlayerPlayDirectory from "./types/app/rocksky/player/playDirectory"; 52 + import * as AppRockskyPlayerPlayFile from "./types/app/rocksky/player/playFile"; 53 + import * as AppRockskyPlayerPlay from "./types/app/rocksky/player/play"; 54 + import * as AppRockskyPlayerPrevious from "./types/app/rocksky/player/previous"; 55 + import * as AppRockskyPlayerSeek from "./types/app/rocksky/player/seek"; 56 + import * as AppRockskyPlaylistCreatePlaylist from "./types/app/rocksky/playlist/createPlaylist"; 57 + import * as AppRockskyPlaylistGetPlaylist from "./types/app/rocksky/playlist/getPlaylist"; 58 + import * as AppRockskyPlaylistGetPlaylists from "./types/app/rocksky/playlist/getPlaylists"; 59 + import * as AppRockskyPlaylistInsertDirectory from "./types/app/rocksky/playlist/insertDirectory"; 60 + import * as AppRockskyPlaylistInsertFiles from "./types/app/rocksky/playlist/insertFiles"; 61 + import * as AppRockskyPlaylistRemovePlaylist from "./types/app/rocksky/playlist/removePlaylist"; 62 + import * as AppRockskyPlaylistRemoveTrack from "./types/app/rocksky/playlist/removeTrack"; 63 + import * as AppRockskyPlaylistStartPlaylist from "./types/app/rocksky/playlist/startPlaylist"; 64 + import * as AppRockskyScrobbleCreateScrobble from "./types/app/rocksky/scrobble/createScrobble"; 65 + import * as AppRockskyScrobbleGetScrobble from "./types/app/rocksky/scrobble/getScrobble"; 66 + import * as AppRockskyScrobbleGetScrobbles from "./types/app/rocksky/scrobble/getScrobbles"; 67 + import * as AppRockskyShoutCreateShout from "./types/app/rocksky/shout/createShout"; 68 + import * as AppRockskyShoutGetAlbumShouts from "./types/app/rocksky/shout/getAlbumShouts"; 69 + import * as AppRockskyShoutGetArtistShouts from "./types/app/rocksky/shout/getArtistShouts"; 70 + import * as AppRockskyShoutGetProfileShouts from "./types/app/rocksky/shout/getProfileShouts"; 71 + import * as AppRockskyShoutGetShoutReplies from "./types/app/rocksky/shout/getShoutReplies"; 72 + import * as AppRockskyShoutGetTrackShouts from "./types/app/rocksky/shout/getTrackShouts"; 73 + import * as AppRockskyShoutRemoveShout from "./types/app/rocksky/shout/removeShout"; 74 + import * as AppRockskyShoutReplyShout from "./types/app/rocksky/shout/replyShout"; 75 + import * as AppRockskyShoutReportShout from "./types/app/rocksky/shout/reportShout"; 76 + import * as AppRockskySongCreateSong from "./types/app/rocksky/song/createSong"; 77 + import * as AppRockskySongGetSong from "./types/app/rocksky/song/getSong"; 78 + import * as AppRockskySongGetSongs from "./types/app/rocksky/song/getSongs"; 79 + import * as AppRockskySpotifyGetCurrentlyPlaying from "./types/app/rocksky/spotify/getCurrentlyPlaying"; 80 + import * as AppRockskySpotifyNext from "./types/app/rocksky/spotify/next"; 81 + import * as AppRockskySpotifyPause from "./types/app/rocksky/spotify/pause"; 82 + import * as AppRockskySpotifyPlay from "./types/app/rocksky/spotify/play"; 83 + import * as AppRockskySpotifyPrevious from "./types/app/rocksky/spotify/previous"; 84 + import * as AppRockskySpotifySeek from "./types/app/rocksky/spotify/seek"; 85 + import * as AppRockskyStatsGetStats from "./types/app/rocksky/stats/getStats"; 86 87 export function createServer(options?: XrpcOptions): Server { 88 + return new Server(options); 89 } 90 91 export class Server { 92 + xrpc: XrpcServer; 93 + app: AppNS; 94 + com: ComNS; 95 96 constructor(options?: XrpcOptions) { 97 + this.xrpc = createXrpcServer(schemas, options); 98 + this.app = new AppNS(this); 99 + this.com = new ComNS(this); 100 } 101 } 102 103 export class AppNS { 104 + _server: Server; 105 + rocksky: AppRockskyNS; 106 + bsky: AppBskyNS; 107 108 constructor(server: Server) { 109 + this._server = server; 110 + this.rocksky = new AppRockskyNS(server); 111 + this.bsky = new AppBskyNS(server); 112 } 113 } 114 115 export class AppRockskyNS { 116 + _server: Server; 117 + actor: AppRockskyActorNS; 118 + album: AppRockskyAlbumNS; 119 + apikey: AppRockskyApikeyNS; 120 + artist: AppRockskyArtistNS; 121 + charts: AppRockskyChartsNS; 122 + dropbox: AppRockskyDropboxNS; 123 + feed: AppRockskyFeedNS; 124 + googledrive: AppRockskyGoogledriveNS; 125 + like: AppRockskyLikeNS; 126 + player: AppRockskyPlayerNS; 127 + playlist: AppRockskyPlaylistNS; 128 + scrobble: AppRockskyScrobbleNS; 129 + shout: AppRockskyShoutNS; 130 + song: AppRockskySongNS; 131 + spotify: AppRockskySpotifyNS; 132 + stats: AppRockskyStatsNS; 133 134 constructor(server: Server) { 135 + this._server = server; 136 + this.actor = new AppRockskyActorNS(server); 137 + this.album = new AppRockskyAlbumNS(server); 138 + this.apikey = new AppRockskyApikeyNS(server); 139 + this.artist = new AppRockskyArtistNS(server); 140 + this.charts = new AppRockskyChartsNS(server); 141 + this.dropbox = new AppRockskyDropboxNS(server); 142 + this.feed = new AppRockskyFeedNS(server); 143 + this.googledrive = new AppRockskyGoogledriveNS(server); 144 + this.like = new AppRockskyLikeNS(server); 145 + this.player = new AppRockskyPlayerNS(server); 146 + this.playlist = new AppRockskyPlaylistNS(server); 147 + this.scrobble = new AppRockskyScrobbleNS(server); 148 + this.shout = new AppRockskyShoutNS(server); 149 + this.song = new AppRockskySongNS(server); 150 + this.spotify = new AppRockskySpotifyNS(server); 151 + this.stats = new AppRockskyStatsNS(server); 152 } 153 } 154 155 export class AppRockskyActorNS { 156 + _server: Server; 157 158 constructor(server: Server) { 159 + this._server = server; 160 } 161 162 getActorAlbums<AV extends AuthVerifier>( ··· 166 AppRockskyActorGetActorAlbums.HandlerReqCtx<ExtractAuth<AV>> 167 >, 168 ) { 169 + const nsid = "app.rocksky.actor.getActorAlbums"; // @ts-ignore 170 + return this._server.xrpc.method(nsid, cfg); 171 } 172 173 getActorArtists<AV extends AuthVerifier>( ··· 177 AppRockskyActorGetActorArtists.HandlerReqCtx<ExtractAuth<AV>> 178 >, 179 ) { 180 + const nsid = "app.rocksky.actor.getActorArtists"; // @ts-ignore 181 + return this._server.xrpc.method(nsid, cfg); 182 } 183 184 getActorLovedSongs<AV extends AuthVerifier>( ··· 188 AppRockskyActorGetActorLovedSongs.HandlerReqCtx<ExtractAuth<AV>> 189 >, 190 ) { 191 + const nsid = "app.rocksky.actor.getActorLovedSongs"; // @ts-ignore 192 + return this._server.xrpc.method(nsid, cfg); 193 } 194 195 getActorPlaylists<AV extends AuthVerifier>( ··· 199 AppRockskyActorGetActorPlaylists.HandlerReqCtx<ExtractAuth<AV>> 200 >, 201 ) { 202 + const nsid = "app.rocksky.actor.getActorPlaylists"; // @ts-ignore 203 + return this._server.xrpc.method(nsid, cfg); 204 } 205 206 getActorScrobbles<AV extends AuthVerifier>( ··· 210 AppRockskyActorGetActorScrobbles.HandlerReqCtx<ExtractAuth<AV>> 211 >, 212 ) { 213 + const nsid = "app.rocksky.actor.getActorScrobbles"; // @ts-ignore 214 + return this._server.xrpc.method(nsid, cfg); 215 } 216 217 getActorSongs<AV extends AuthVerifier>( ··· 221 AppRockskyActorGetActorSongs.HandlerReqCtx<ExtractAuth<AV>> 222 >, 223 ) { 224 + const nsid = "app.rocksky.actor.getActorSongs"; // @ts-ignore 225 + return this._server.xrpc.method(nsid, cfg); 226 } 227 228 getProfile<AV extends AuthVerifier>( ··· 232 AppRockskyActorGetProfile.HandlerReqCtx<ExtractAuth<AV>> 233 >, 234 ) { 235 + const nsid = "app.rocksky.actor.getProfile"; // @ts-ignore 236 + return this._server.xrpc.method(nsid, cfg); 237 } 238 } 239 240 export class AppRockskyAlbumNS { 241 + _server: Server; 242 243 constructor(server: Server) { 244 + this._server = server; 245 } 246 247 getAlbum<AV extends AuthVerifier>( ··· 251 AppRockskyAlbumGetAlbum.HandlerReqCtx<ExtractAuth<AV>> 252 >, 253 ) { 254 + const nsid = "app.rocksky.album.getAlbum"; // @ts-ignore 255 + return this._server.xrpc.method(nsid, cfg); 256 } 257 258 getAlbums<AV extends AuthVerifier>( ··· 262 AppRockskyAlbumGetAlbums.HandlerReqCtx<ExtractAuth<AV>> 263 >, 264 ) { 265 + const nsid = "app.rocksky.album.getAlbums"; // @ts-ignore 266 + return this._server.xrpc.method(nsid, cfg); 267 } 268 269 getAlbumTracks<AV extends AuthVerifier>( ··· 273 AppRockskyAlbumGetAlbumTracks.HandlerReqCtx<ExtractAuth<AV>> 274 >, 275 ) { 276 + const nsid = "app.rocksky.album.getAlbumTracks"; // @ts-ignore 277 + return this._server.xrpc.method(nsid, cfg); 278 } 279 } 280 281 export class AppRockskyApikeyNS { 282 + _server: Server; 283 284 constructor(server: Server) { 285 + this._server = server; 286 } 287 288 createApikey<AV extends AuthVerifier>( ··· 292 AppRockskyApikeyCreateApikey.HandlerReqCtx<ExtractAuth<AV>> 293 >, 294 ) { 295 + const nsid = "app.rocksky.apikey.createApikey"; // @ts-ignore 296 + return this._server.xrpc.method(nsid, cfg); 297 } 298 299 getApikeys<AV extends AuthVerifier>( ··· 303 AppRockskyApikeyGetApikeys.HandlerReqCtx<ExtractAuth<AV>> 304 >, 305 ) { 306 + const nsid = "app.rocksky.apikey.getApikeys"; // @ts-ignore 307 + return this._server.xrpc.method(nsid, cfg); 308 } 309 310 removeApikey<AV extends AuthVerifier>( ··· 314 AppRockskyApikeyRemoveApikey.HandlerReqCtx<ExtractAuth<AV>> 315 >, 316 ) { 317 + const nsid = "app.rocksky.apikey.removeApikey"; // @ts-ignore 318 + return this._server.xrpc.method(nsid, cfg); 319 } 320 321 updateApikey<AV extends AuthVerifier>( ··· 325 AppRockskyApikeyUpdateApikey.HandlerReqCtx<ExtractAuth<AV>> 326 >, 327 ) { 328 + const nsid = "app.rocksky.apikey.updateApikey"; // @ts-ignore 329 + return this._server.xrpc.method(nsid, cfg); 330 } 331 } 332 333 export class AppRockskyArtistNS { 334 + _server: Server; 335 336 constructor(server: Server) { 337 + this._server = server; 338 } 339 340 getArtistAlbums<AV extends AuthVerifier>( ··· 344 AppRockskyArtistGetArtistAlbums.HandlerReqCtx<ExtractAuth<AV>> 345 >, 346 ) { 347 + const nsid = "app.rocksky.artist.getArtistAlbums"; // @ts-ignore 348 + return this._server.xrpc.method(nsid, cfg); 349 } 350 351 getArtist<AV extends AuthVerifier>( ··· 355 AppRockskyArtistGetArtist.HandlerReqCtx<ExtractAuth<AV>> 356 >, 357 ) { 358 + const nsid = "app.rocksky.artist.getArtist"; // @ts-ignore 359 + return this._server.xrpc.method(nsid, cfg); 360 } 361 362 getArtistListeners<AV extends AuthVerifier>( ··· 366 AppRockskyArtistGetArtistListeners.HandlerReqCtx<ExtractAuth<AV>> 367 >, 368 ) { 369 + const nsid = "app.rocksky.artist.getArtistListeners"; // @ts-ignore 370 + return this._server.xrpc.method(nsid, cfg); 371 } 372 373 getArtists<AV extends AuthVerifier>( ··· 377 AppRockskyArtistGetArtists.HandlerReqCtx<ExtractAuth<AV>> 378 >, 379 ) { 380 + const nsid = "app.rocksky.artist.getArtists"; // @ts-ignore 381 + return this._server.xrpc.method(nsid, cfg); 382 } 383 384 getArtistTracks<AV extends AuthVerifier>( ··· 388 AppRockskyArtistGetArtistTracks.HandlerReqCtx<ExtractAuth<AV>> 389 >, 390 ) { 391 + const nsid = "app.rocksky.artist.getArtistTracks"; // @ts-ignore 392 + return this._server.xrpc.method(nsid, cfg); 393 } 394 } 395 396 export class AppRockskyChartsNS { 397 + _server: Server; 398 399 constructor(server: Server) { 400 + this._server = server; 401 } 402 403 getScrobblesChart<AV extends AuthVerifier>( ··· 407 AppRockskyChartsGetScrobblesChart.HandlerReqCtx<ExtractAuth<AV>> 408 >, 409 ) { 410 + const nsid = "app.rocksky.charts.getScrobblesChart"; // @ts-ignore 411 + return this._server.xrpc.method(nsid, cfg); 412 } 413 } 414 415 export class AppRockskyDropboxNS { 416 + _server: Server; 417 418 constructor(server: Server) { 419 + this._server = server; 420 } 421 422 downloadFile<AV extends AuthVerifier>( ··· 426 AppRockskyDropboxDownloadFile.HandlerReqCtx<ExtractAuth<AV>> 427 >, 428 ) { 429 + const nsid = "app.rocksky.dropbox.downloadFile"; // @ts-ignore 430 + return this._server.xrpc.method(nsid, cfg); 431 } 432 433 getFiles<AV extends AuthVerifier>( ··· 437 AppRockskyDropboxGetFiles.HandlerReqCtx<ExtractAuth<AV>> 438 >, 439 ) { 440 + const nsid = "app.rocksky.dropbox.getFiles"; // @ts-ignore 441 + return this._server.xrpc.method(nsid, cfg); 442 } 443 444 getMetadata<AV extends AuthVerifier>( ··· 448 AppRockskyDropboxGetMetadata.HandlerReqCtx<ExtractAuth<AV>> 449 >, 450 ) { 451 + const nsid = "app.rocksky.dropbox.getMetadata"; // @ts-ignore 452 + return this._server.xrpc.method(nsid, cfg); 453 } 454 455 getTemporaryLink<AV extends AuthVerifier>( ··· 459 AppRockskyDropboxGetTemporaryLink.HandlerReqCtx<ExtractAuth<AV>> 460 >, 461 ) { 462 + const nsid = "app.rocksky.dropbox.getTemporaryLink"; // @ts-ignore 463 + return this._server.xrpc.method(nsid, cfg); 464 } 465 } 466 467 export class AppRockskyFeedNS { 468 + _server: Server; 469 470 constructor(server: Server) { 471 + this._server = server; 472 } 473 474 getNowPlayings<AV extends AuthVerifier>( ··· 478 AppRockskyFeedGetNowPlayings.HandlerReqCtx<ExtractAuth<AV>> 479 >, 480 ) { 481 + const nsid = "app.rocksky.feed.getNowPlayings"; // @ts-ignore 482 + return this._server.xrpc.method(nsid, cfg); 483 } 484 485 search<AV extends AuthVerifier>( ··· 489 AppRockskyFeedSearch.HandlerReqCtx<ExtractAuth<AV>> 490 >, 491 ) { 492 + const nsid = "app.rocksky.feed.search"; // @ts-ignore 493 + return this._server.xrpc.method(nsid, cfg); 494 } 495 } 496 497 export class AppRockskyGoogledriveNS { 498 + _server: Server; 499 500 constructor(server: Server) { 501 + this._server = server; 502 } 503 504 downloadFile<AV extends AuthVerifier>( ··· 508 AppRockskyGoogledriveDownloadFile.HandlerReqCtx<ExtractAuth<AV>> 509 >, 510 ) { 511 + const nsid = "app.rocksky.googledrive.downloadFile"; // @ts-ignore 512 + return this._server.xrpc.method(nsid, cfg); 513 } 514 515 getFile<AV extends AuthVerifier>( ··· 519 AppRockskyGoogledriveGetFile.HandlerReqCtx<ExtractAuth<AV>> 520 >, 521 ) { 522 + const nsid = "app.rocksky.googledrive.getFile"; // @ts-ignore 523 + return this._server.xrpc.method(nsid, cfg); 524 } 525 526 getFiles<AV extends AuthVerifier>( ··· 530 AppRockskyGoogledriveGetFiles.HandlerReqCtx<ExtractAuth<AV>> 531 >, 532 ) { 533 + const nsid = "app.rocksky.googledrive.getFiles"; // @ts-ignore 534 + return this._server.xrpc.method(nsid, cfg); 535 } 536 } 537 538 export class AppRockskyLikeNS { 539 + _server: Server; 540 541 constructor(server: Server) { 542 + this._server = server; 543 } 544 545 dislikeShout<AV extends AuthVerifier>( ··· 549 AppRockskyLikeDislikeShout.HandlerReqCtx<ExtractAuth<AV>> 550 >, 551 ) { 552 + const nsid = "app.rocksky.like.dislikeShout"; // @ts-ignore 553 + return this._server.xrpc.method(nsid, cfg); 554 } 555 556 dislikeSong<AV extends AuthVerifier>( ··· 560 AppRockskyLikeDislikeSong.HandlerReqCtx<ExtractAuth<AV>> 561 >, 562 ) { 563 + const nsid = "app.rocksky.like.dislikeSong"; // @ts-ignore 564 + return this._server.xrpc.method(nsid, cfg); 565 } 566 567 likeShout<AV extends AuthVerifier>( ··· 571 AppRockskyLikeLikeShout.HandlerReqCtx<ExtractAuth<AV>> 572 >, 573 ) { 574 + const nsid = "app.rocksky.like.likeShout"; // @ts-ignore 575 + return this._server.xrpc.method(nsid, cfg); 576 } 577 578 likeSong<AV extends AuthVerifier>( ··· 582 AppRockskyLikeLikeSong.HandlerReqCtx<ExtractAuth<AV>> 583 >, 584 ) { 585 + const nsid = "app.rocksky.like.likeSong"; // @ts-ignore 586 + return this._server.xrpc.method(nsid, cfg); 587 } 588 } 589 590 export class AppRockskyPlayerNS { 591 + _server: Server; 592 593 constructor(server: Server) { 594 + this._server = server; 595 } 596 597 addDirectoryToQueue<AV extends AuthVerifier>( ··· 601 AppRockskyPlayerAddDirectoryToQueue.HandlerReqCtx<ExtractAuth<AV>> 602 >, 603 ) { 604 + const nsid = "app.rocksky.player.addDirectoryToQueue"; // @ts-ignore 605 + return this._server.xrpc.method(nsid, cfg); 606 } 607 608 addItemsToQueue<AV extends AuthVerifier>( ··· 612 AppRockskyPlayerAddItemsToQueue.HandlerReqCtx<ExtractAuth<AV>> 613 >, 614 ) { 615 + const nsid = "app.rocksky.player.addItemsToQueue"; // @ts-ignore 616 + return this._server.xrpc.method(nsid, cfg); 617 } 618 619 getCurrentlyPlaying<AV extends AuthVerifier>( ··· 623 AppRockskyPlayerGetCurrentlyPlaying.HandlerReqCtx<ExtractAuth<AV>> 624 >, 625 ) { 626 + const nsid = "app.rocksky.player.getCurrentlyPlaying"; // @ts-ignore 627 + return this._server.xrpc.method(nsid, cfg); 628 } 629 630 getPlaybackQueue<AV extends AuthVerifier>( ··· 634 AppRockskyPlayerGetPlaybackQueue.HandlerReqCtx<ExtractAuth<AV>> 635 >, 636 ) { 637 + const nsid = "app.rocksky.player.getPlaybackQueue"; // @ts-ignore 638 + return this._server.xrpc.method(nsid, cfg); 639 } 640 641 next<AV extends AuthVerifier>( ··· 645 AppRockskyPlayerNext.HandlerReqCtx<ExtractAuth<AV>> 646 >, 647 ) { 648 + const nsid = "app.rocksky.player.next"; // @ts-ignore 649 + return this._server.xrpc.method(nsid, cfg); 650 } 651 652 pause<AV extends AuthVerifier>( ··· 656 AppRockskyPlayerPause.HandlerReqCtx<ExtractAuth<AV>> 657 >, 658 ) { 659 + const nsid = "app.rocksky.player.pause"; // @ts-ignore 660 + return this._server.xrpc.method(nsid, cfg); 661 } 662 663 playDirectory<AV extends AuthVerifier>( ··· 667 AppRockskyPlayerPlayDirectory.HandlerReqCtx<ExtractAuth<AV>> 668 >, 669 ) { 670 + const nsid = "app.rocksky.player.playDirectory"; // @ts-ignore 671 + return this._server.xrpc.method(nsid, cfg); 672 } 673 674 playFile<AV extends AuthVerifier>( ··· 678 AppRockskyPlayerPlayFile.HandlerReqCtx<ExtractAuth<AV>> 679 >, 680 ) { 681 + const nsid = "app.rocksky.player.playFile"; // @ts-ignore 682 + return this._server.xrpc.method(nsid, cfg); 683 } 684 685 play<AV extends AuthVerifier>( ··· 689 AppRockskyPlayerPlay.HandlerReqCtx<ExtractAuth<AV>> 690 >, 691 ) { 692 + const nsid = "app.rocksky.player.play"; // @ts-ignore 693 + return this._server.xrpc.method(nsid, cfg); 694 } 695 696 previous<AV extends AuthVerifier>( ··· 700 AppRockskyPlayerPrevious.HandlerReqCtx<ExtractAuth<AV>> 701 >, 702 ) { 703 + const nsid = "app.rocksky.player.previous"; // @ts-ignore 704 + return this._server.xrpc.method(nsid, cfg); 705 } 706 707 seek<AV extends AuthVerifier>( ··· 711 AppRockskyPlayerSeek.HandlerReqCtx<ExtractAuth<AV>> 712 >, 713 ) { 714 + const nsid = "app.rocksky.player.seek"; // @ts-ignore 715 + return this._server.xrpc.method(nsid, cfg); 716 } 717 } 718 719 export class AppRockskyPlaylistNS { 720 + _server: Server; 721 722 constructor(server: Server) { 723 + this._server = server; 724 } 725 726 createPlaylist<AV extends AuthVerifier>( ··· 730 AppRockskyPlaylistCreatePlaylist.HandlerReqCtx<ExtractAuth<AV>> 731 >, 732 ) { 733 + const nsid = "app.rocksky.playlist.createPlaylist"; // @ts-ignore 734 + return this._server.xrpc.method(nsid, cfg); 735 } 736 737 getPlaylist<AV extends AuthVerifier>( ··· 741 AppRockskyPlaylistGetPlaylist.HandlerReqCtx<ExtractAuth<AV>> 742 >, 743 ) { 744 + const nsid = "app.rocksky.playlist.getPlaylist"; // @ts-ignore 745 + return this._server.xrpc.method(nsid, cfg); 746 } 747 748 getPlaylists<AV extends AuthVerifier>( ··· 752 AppRockskyPlaylistGetPlaylists.HandlerReqCtx<ExtractAuth<AV>> 753 >, 754 ) { 755 + const nsid = "app.rocksky.playlist.getPlaylists"; // @ts-ignore 756 + return this._server.xrpc.method(nsid, cfg); 757 } 758 759 insertDirectory<AV extends AuthVerifier>( ··· 763 AppRockskyPlaylistInsertDirectory.HandlerReqCtx<ExtractAuth<AV>> 764 >, 765 ) { 766 + const nsid = "app.rocksky.playlist.insertDirectory"; // @ts-ignore 767 + return this._server.xrpc.method(nsid, cfg); 768 } 769 770 insertFiles<AV extends AuthVerifier>( ··· 774 AppRockskyPlaylistInsertFiles.HandlerReqCtx<ExtractAuth<AV>> 775 >, 776 ) { 777 + const nsid = "app.rocksky.playlist.insertFiles"; // @ts-ignore 778 + return this._server.xrpc.method(nsid, cfg); 779 } 780 781 removePlaylist<AV extends AuthVerifier>( ··· 785 AppRockskyPlaylistRemovePlaylist.HandlerReqCtx<ExtractAuth<AV>> 786 >, 787 ) { 788 + const nsid = "app.rocksky.playlist.removePlaylist"; // @ts-ignore 789 + return this._server.xrpc.method(nsid, cfg); 790 } 791 792 removeTrack<AV extends AuthVerifier>( ··· 796 AppRockskyPlaylistRemoveTrack.HandlerReqCtx<ExtractAuth<AV>> 797 >, 798 ) { 799 + const nsid = "app.rocksky.playlist.removeTrack"; // @ts-ignore 800 + return this._server.xrpc.method(nsid, cfg); 801 } 802 803 startPlaylist<AV extends AuthVerifier>( ··· 807 AppRockskyPlaylistStartPlaylist.HandlerReqCtx<ExtractAuth<AV>> 808 >, 809 ) { 810 + const nsid = "app.rocksky.playlist.startPlaylist"; // @ts-ignore 811 + return this._server.xrpc.method(nsid, cfg); 812 } 813 } 814 815 export class AppRockskyScrobbleNS { 816 + _server: Server; 817 818 constructor(server: Server) { 819 + this._server = server; 820 } 821 822 createScrobble<AV extends AuthVerifier>( ··· 826 AppRockskyScrobbleCreateScrobble.HandlerReqCtx<ExtractAuth<AV>> 827 >, 828 ) { 829 + const nsid = "app.rocksky.scrobble.createScrobble"; // @ts-ignore 830 + return this._server.xrpc.method(nsid, cfg); 831 } 832 833 getScrobble<AV extends AuthVerifier>( ··· 837 AppRockskyScrobbleGetScrobble.HandlerReqCtx<ExtractAuth<AV>> 838 >, 839 ) { 840 + const nsid = "app.rocksky.scrobble.getScrobble"; // @ts-ignore 841 + return this._server.xrpc.method(nsid, cfg); 842 } 843 844 getScrobbles<AV extends AuthVerifier>( ··· 848 AppRockskyScrobbleGetScrobbles.HandlerReqCtx<ExtractAuth<AV>> 849 >, 850 ) { 851 + const nsid = "app.rocksky.scrobble.getScrobbles"; // @ts-ignore 852 + return this._server.xrpc.method(nsid, cfg); 853 } 854 } 855 856 export class AppRockskyShoutNS { 857 + _server: Server; 858 859 constructor(server: Server) { 860 + this._server = server; 861 } 862 863 createShout<AV extends AuthVerifier>( ··· 867 AppRockskyShoutCreateShout.HandlerReqCtx<ExtractAuth<AV>> 868 >, 869 ) { 870 + const nsid = "app.rocksky.shout.createShout"; // @ts-ignore 871 + return this._server.xrpc.method(nsid, cfg); 872 } 873 874 getAlbumShouts<AV extends AuthVerifier>( ··· 878 AppRockskyShoutGetAlbumShouts.HandlerReqCtx<ExtractAuth<AV>> 879 >, 880 ) { 881 + const nsid = "app.rocksky.shout.getAlbumShouts"; // @ts-ignore 882 + return this._server.xrpc.method(nsid, cfg); 883 } 884 885 getArtistShouts<AV extends AuthVerifier>( ··· 889 AppRockskyShoutGetArtistShouts.HandlerReqCtx<ExtractAuth<AV>> 890 >, 891 ) { 892 + const nsid = "app.rocksky.shout.getArtistShouts"; // @ts-ignore 893 + return this._server.xrpc.method(nsid, cfg); 894 } 895 896 getProfileShouts<AV extends AuthVerifier>( ··· 900 AppRockskyShoutGetProfileShouts.HandlerReqCtx<ExtractAuth<AV>> 901 >, 902 ) { 903 + const nsid = "app.rocksky.shout.getProfileShouts"; // @ts-ignore 904 + return this._server.xrpc.method(nsid, cfg); 905 } 906 907 getShoutReplies<AV extends AuthVerifier>( ··· 911 AppRockskyShoutGetShoutReplies.HandlerReqCtx<ExtractAuth<AV>> 912 >, 913 ) { 914 + const nsid = "app.rocksky.shout.getShoutReplies"; // @ts-ignore 915 + return this._server.xrpc.method(nsid, cfg); 916 } 917 918 getTrackShouts<AV extends AuthVerifier>( ··· 922 AppRockskyShoutGetTrackShouts.HandlerReqCtx<ExtractAuth<AV>> 923 >, 924 ) { 925 + const nsid = "app.rocksky.shout.getTrackShouts"; // @ts-ignore 926 + return this._server.xrpc.method(nsid, cfg); 927 } 928 929 removeShout<AV extends AuthVerifier>( ··· 933 AppRockskyShoutRemoveShout.HandlerReqCtx<ExtractAuth<AV>> 934 >, 935 ) { 936 + const nsid = "app.rocksky.shout.removeShout"; // @ts-ignore 937 + return this._server.xrpc.method(nsid, cfg); 938 } 939 940 replyShout<AV extends AuthVerifier>( ··· 944 AppRockskyShoutReplyShout.HandlerReqCtx<ExtractAuth<AV>> 945 >, 946 ) { 947 + const nsid = "app.rocksky.shout.replyShout"; // @ts-ignore 948 + return this._server.xrpc.method(nsid, cfg); 949 } 950 951 reportShout<AV extends AuthVerifier>( ··· 955 AppRockskyShoutReportShout.HandlerReqCtx<ExtractAuth<AV>> 956 >, 957 ) { 958 + const nsid = "app.rocksky.shout.reportShout"; // @ts-ignore 959 + return this._server.xrpc.method(nsid, cfg); 960 } 961 } 962 963 export class AppRockskySongNS { 964 + _server: Server; 965 966 constructor(server: Server) { 967 + this._server = server; 968 } 969 970 createSong<AV extends AuthVerifier>( ··· 974 AppRockskySongCreateSong.HandlerReqCtx<ExtractAuth<AV>> 975 >, 976 ) { 977 + const nsid = "app.rocksky.song.createSong"; // @ts-ignore 978 + return this._server.xrpc.method(nsid, cfg); 979 } 980 981 getSong<AV extends AuthVerifier>( ··· 985 AppRockskySongGetSong.HandlerReqCtx<ExtractAuth<AV>> 986 >, 987 ) { 988 + const nsid = "app.rocksky.song.getSong"; // @ts-ignore 989 + return this._server.xrpc.method(nsid, cfg); 990 } 991 992 getSongs<AV extends AuthVerifier>( ··· 996 AppRockskySongGetSongs.HandlerReqCtx<ExtractAuth<AV>> 997 >, 998 ) { 999 + const nsid = "app.rocksky.song.getSongs"; // @ts-ignore 1000 + return this._server.xrpc.method(nsid, cfg); 1001 } 1002 } 1003 1004 export class AppRockskySpotifyNS { 1005 + _server: Server; 1006 1007 constructor(server: Server) { 1008 + this._server = server; 1009 } 1010 1011 getCurrentlyPlaying<AV extends AuthVerifier>( ··· 1015 AppRockskySpotifyGetCurrentlyPlaying.HandlerReqCtx<ExtractAuth<AV>> 1016 >, 1017 ) { 1018 + const nsid = "app.rocksky.spotify.getCurrentlyPlaying"; // @ts-ignore 1019 + return this._server.xrpc.method(nsid, cfg); 1020 } 1021 1022 next<AV extends AuthVerifier>( ··· 1026 AppRockskySpotifyNext.HandlerReqCtx<ExtractAuth<AV>> 1027 >, 1028 ) { 1029 + const nsid = "app.rocksky.spotify.next"; // @ts-ignore 1030 + return this._server.xrpc.method(nsid, cfg); 1031 } 1032 1033 pause<AV extends AuthVerifier>( ··· 1037 AppRockskySpotifyPause.HandlerReqCtx<ExtractAuth<AV>> 1038 >, 1039 ) { 1040 + const nsid = "app.rocksky.spotify.pause"; // @ts-ignore 1041 + return this._server.xrpc.method(nsid, cfg); 1042 } 1043 1044 play<AV extends AuthVerifier>( ··· 1048 AppRockskySpotifyPlay.HandlerReqCtx<ExtractAuth<AV>> 1049 >, 1050 ) { 1051 + const nsid = "app.rocksky.spotify.play"; // @ts-ignore 1052 + return this._server.xrpc.method(nsid, cfg); 1053 } 1054 1055 previous<AV extends AuthVerifier>( ··· 1059 AppRockskySpotifyPrevious.HandlerReqCtx<ExtractAuth<AV>> 1060 >, 1061 ) { 1062 + const nsid = "app.rocksky.spotify.previous"; // @ts-ignore 1063 + return this._server.xrpc.method(nsid, cfg); 1064 } 1065 1066 seek<AV extends AuthVerifier>( ··· 1070 AppRockskySpotifySeek.HandlerReqCtx<ExtractAuth<AV>> 1071 >, 1072 ) { 1073 + const nsid = "app.rocksky.spotify.seek"; // @ts-ignore 1074 + return this._server.xrpc.method(nsid, cfg); 1075 } 1076 } 1077 1078 export class AppRockskyStatsNS { 1079 + _server: Server; 1080 1081 constructor(server: Server) { 1082 + this._server = server; 1083 } 1084 1085 getStats<AV extends AuthVerifier>( ··· 1089 AppRockskyStatsGetStats.HandlerReqCtx<ExtractAuth<AV>> 1090 >, 1091 ) { 1092 + const nsid = "app.rocksky.stats.getStats"; // @ts-ignore 1093 + return this._server.xrpc.method(nsid, cfg); 1094 } 1095 } 1096 1097 export class AppBskyNS { 1098 + _server: Server; 1099 + actor: AppBskyActorNS; 1100 1101 constructor(server: Server) { 1102 + this._server = server; 1103 + this.actor = new AppBskyActorNS(server); 1104 } 1105 } 1106 1107 export class AppBskyActorNS { 1108 + _server: Server; 1109 1110 constructor(server: Server) { 1111 + this._server = server; 1112 } 1113 } 1114 1115 export class ComNS { 1116 + _server: Server; 1117 + atproto: ComAtprotoNS; 1118 1119 constructor(server: Server) { 1120 + this._server = server; 1121 + this.atproto = new ComAtprotoNS(server); 1122 } 1123 } 1124 1125 export class ComAtprotoNS { 1126 + _server: Server; 1127 + repo: ComAtprotoRepoNS; 1128 1129 constructor(server: Server) { 1130 + this._server = server; 1131 + this.repo = new ComAtprotoRepoNS(server); 1132 } 1133 } 1134 1135 export class ComAtprotoRepoNS { 1136 + _server: Server; 1137 1138 constructor(server: Server) { 1139 + this._server = server; 1140 } 1141 } 1142 1143 type SharedRateLimitOpts<T> = { 1144 + name: string; 1145 + calcKey?: (ctx: T) => string | null; 1146 + calcPoints?: (ctx: T) => number; 1147 + }; 1148 type RouteRateLimitOpts<T> = { 1149 + durationMs: number; 1150 + points: number; 1151 + calcKey?: (ctx: T) => string | null; 1152 + calcPoints?: (ctx: T) => number; 1153 + }; 1154 + type HandlerOpts = { blobLimit?: number }; 1155 + type HandlerRateLimitOpts<T> = SharedRateLimitOpts<T> | RouteRateLimitOpts<T>; 1156 type ConfigOf<Auth, Handler, ReqCtx> = 1157 | Handler 1158 | { 1159 + auth?: Auth; 1160 + opts?: HandlerOpts; 1161 + rateLimit?: HandlerRateLimitOpts<ReqCtx> | HandlerRateLimitOpts<ReqCtx>[]; 1162 + handler: Handler; 1163 + }; 1164 type ExtractAuth<AV extends AuthVerifier | StreamAuthVerifier> = Extract< 1165 Awaited<ReturnType<AV>>, 1166 { credentials: unknown } 1167 + >;
+1869 -1849
apps/api/src/lexicon/lexicons.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type LexiconDoc, Lexicons } from '@atproto/lexicon' 5 6 export const schemaDict = { 7 AppRockskyActorDefs: { 8 lexicon: 1, 9 - id: 'app.rocksky.actor.defs', 10 defs: { 11 profileViewDetailed: { 12 - type: 'object', 13 properties: { 14 id: { 15 - type: 'string', 16 - description: 'The unique identifier of the actor.', 17 }, 18 did: { 19 - type: 'string', 20 - description: 'The DID of the actor.', 21 }, 22 handle: { 23 - type: 'string', 24 - description: 'The handle of the actor.', 25 }, 26 displayName: { 27 - type: 'string', 28 - description: 'The display name of the actor.', 29 }, 30 avatar: { 31 - type: 'string', 32 description: "The URL of the actor's avatar image.", 33 - format: 'uri', 34 }, 35 createdAt: { 36 - type: 'string', 37 - description: 'The date and time when the actor was created.', 38 - format: 'datetime', 39 }, 40 updatedAt: { 41 - type: 'string', 42 - description: 'The date and time when the actor was last updated.', 43 - format: 'datetime', 44 }, 45 }, 46 }, 47 profileViewBasic: { 48 - type: 'object', 49 properties: { 50 id: { 51 - type: 'string', 52 - description: 'The unique identifier of the actor.', 53 }, 54 did: { 55 - type: 'string', 56 - description: 'The DID of the actor.', 57 }, 58 handle: { 59 - type: 'string', 60 - description: 'The handle of the actor.', 61 }, 62 displayName: { 63 - type: 'string', 64 - description: 'The display name of the actor.', 65 }, 66 avatar: { 67 - type: 'string', 68 description: "The URL of the actor's avatar image.", 69 - format: 'uri', 70 }, 71 createdAt: { 72 - type: 'string', 73 - description: 'The date and time when the actor was created.', 74 - format: 'datetime', 75 }, 76 updatedAt: { 77 - type: 'string', 78 - description: 'The date and time when the actor was last updated.', 79 - format: 'datetime', 80 }, 81 }, 82 }, ··· 84 }, 85 AppRockskyActorGetActorAlbums: { 86 lexicon: 1, 87 - id: 'app.rocksky.actor.getActorAlbums', 88 defs: { 89 main: { 90 - type: 'query', 91 - description: 'Get albums for an actor', 92 parameters: { 93 - type: 'params', 94 - required: ['did'], 95 properties: { 96 did: { 97 - type: 'string', 98 - description: 'The DID or handle of the actor', 99 - format: 'at-identifier', 100 }, 101 limit: { 102 - type: 'integer', 103 - description: 'The maximum number of albums to return', 104 minimum: 1, 105 }, 106 offset: { 107 - type: 'integer', 108 - description: 'The offset for pagination', 109 minimum: 0, 110 }, 111 }, 112 }, 113 output: { 114 - encoding: 'application/json', 115 schema: { 116 - type: 'object', 117 properties: { 118 albums: { 119 - type: 'array', 120 items: { 121 - type: 'ref', 122 - ref: 'lex:app.rocksky.album.defs#albumViewBasic', 123 }, 124 }, 125 }, ··· 130 }, 131 AppRockskyActorGetActorArtists: { 132 lexicon: 1, 133 - id: 'app.rocksky.actor.getActorArtists', 134 defs: { 135 main: { 136 - type: 'query', 137 - description: 'Get artists for an actor', 138 parameters: { 139 - type: 'params', 140 - required: ['did'], 141 properties: { 142 did: { 143 - type: 'string', 144 - description: 'The DID or handle of the actor', 145 - format: 'at-identifier', 146 }, 147 limit: { 148 - type: 'integer', 149 - description: 'The maximum number of albums to return', 150 minimum: 1, 151 }, 152 offset: { 153 - type: 'integer', 154 - description: 'The offset for pagination', 155 minimum: 0, 156 }, 157 }, 158 }, 159 output: { 160 - encoding: 'application/json', 161 schema: { 162 - type: 'object', 163 properties: { 164 artists: { 165 - type: 'array', 166 items: { 167 - type: 'ref', 168 - ref: 'lex:app.rocksky.artist.defs#artistViewBasic', 169 }, 170 }, 171 }, ··· 176 }, 177 AppRockskyActorGetActorLovedSongs: { 178 lexicon: 1, 179 - id: 'app.rocksky.actor.getActorLovedSongs', 180 defs: { 181 main: { 182 - type: 'query', 183 - description: 'Get loved songs for an actor', 184 parameters: { 185 - type: 'params', 186 - required: ['did'], 187 properties: { 188 did: { 189 - type: 'string', 190 - description: 'The DID or handle of the actor', 191 - format: 'at-identifier', 192 }, 193 limit: { 194 - type: 'integer', 195 - description: 'The maximum number of albums to return', 196 minimum: 1, 197 }, 198 offset: { 199 - type: 'integer', 200 - description: 'The offset for pagination', 201 minimum: 0, 202 }, 203 }, 204 }, 205 output: { 206 - encoding: 'application/json', 207 schema: { 208 - type: 'object', 209 properties: { 210 tracks: { 211 - type: 'array', 212 items: { 213 - type: 'ref', 214 - ref: 'lex:app.rocksky.song.defs#songViewBasic', 215 }, 216 }, 217 }, ··· 222 }, 223 AppRockskyActorGetActorPlaylists: { 224 lexicon: 1, 225 - id: 'app.rocksky.actor.getActorPlaylists', 226 defs: { 227 main: { 228 - type: 'query', 229 - description: 'Get playlists for an actor', 230 parameters: { 231 - type: 'params', 232 - required: ['did'], 233 properties: { 234 did: { 235 - type: 'string', 236 - description: 'The DID or handle of the actor', 237 - format: 'at-identifier', 238 }, 239 limit: { 240 - type: 'integer', 241 - description: 'The maximum number of albums to return', 242 minimum: 1, 243 }, 244 offset: { 245 - type: 'integer', 246 - description: 'The offset for pagination', 247 minimum: 0, 248 }, 249 }, 250 }, 251 output: { 252 - encoding: 'application/json', 253 schema: { 254 - type: 'object', 255 properties: { 256 playlists: { 257 - type: 'array', 258 items: { 259 - type: 'ref', 260 - ref: 'lex:app.rocksky.playlist.defs#playlistViewBasic', 261 }, 262 }, 263 }, ··· 268 }, 269 AppRockskyActorGetActorScrobbles: { 270 lexicon: 1, 271 - id: 'app.rocksky.actor.getActorScrobbles', 272 defs: { 273 main: { 274 - type: 'query', 275 - description: 'Get scrobbles for an actor', 276 parameters: { 277 - type: 'params', 278 - required: ['did'], 279 properties: { 280 did: { 281 - type: 'string', 282 - description: 'The DID or handle of the actor', 283 - format: 'at-identifier', 284 }, 285 limit: { 286 - type: 'integer', 287 - description: 'The maximum number of albums to return', 288 minimum: 1, 289 }, 290 offset: { 291 - type: 'integer', 292 - description: 'The offset for pagination', 293 minimum: 0, 294 }, 295 }, 296 }, 297 output: { 298 - encoding: 'application/json', 299 schema: { 300 - type: 'object', 301 properties: { 302 scrobbles: { 303 - type: 'array', 304 items: { 305 - type: 'ref', 306 - ref: 'lex:app.rocksky.scrobble.defs#scrobbleViewBasic', 307 }, 308 }, 309 }, ··· 314 }, 315 AppRockskyActorGetActorSongs: { 316 lexicon: 1, 317 - id: 'app.rocksky.actor.getActorSongs', 318 defs: { 319 main: { 320 - type: 'query', 321 - description: 'Get songs for an actor', 322 parameters: { 323 - type: 'params', 324 - required: ['did'], 325 properties: { 326 did: { 327 - type: 'string', 328 - description: 'The DID or handle of the actor', 329 - format: 'at-identifier', 330 }, 331 limit: { 332 - type: 'integer', 333 - description: 'The maximum number of albums to return', 334 minimum: 1, 335 }, 336 offset: { 337 - type: 'integer', 338 - description: 'The offset for pagination', 339 minimum: 0, 340 }, 341 }, 342 }, 343 output: { 344 - encoding: 'application/json', 345 schema: { 346 - type: 'object', 347 properties: { 348 songs: { 349 - type: 'array', 350 items: { 351 - type: 'ref', 352 - ref: 'lex:app.rocksky.song.defs#songViewBasic', 353 }, 354 }, 355 }, ··· 360 }, 361 AppRockskyActorGetProfile: { 362 lexicon: 1, 363 - id: 'app.rocksky.actor.getProfile', 364 defs: { 365 main: { 366 - type: 'query', 367 - description: 'Get the profile of an actor', 368 parameters: { 369 - type: 'params', 370 properties: { 371 did: { 372 - type: 'string', 373 - description: 'The DID or handle of the actor', 374 - format: 'at-identifier', 375 }, 376 }, 377 }, 378 output: { 379 - encoding: 'application/json', 380 schema: { 381 - type: 'ref', 382 - ref: 'lex:app.rocksky.actor.defs#profileViewDetailed', 383 }, 384 }, 385 }, ··· 387 }, 388 AppBskyActorProfile: { 389 lexicon: 1, 390 - id: 'app.bsky.actor.profile', 391 defs: { 392 main: { 393 - type: 'record', 394 - description: 'A declaration of a Bluesky account profile.', 395 - key: 'literal:self', 396 record: { 397 - type: 'object', 398 properties: { 399 displayName: { 400 - type: 'string', 401 maxGraphemes: 64, 402 maxLength: 640, 403 }, 404 description: { 405 - type: 'string', 406 - description: 'Free-form profile description text.', 407 maxGraphemes: 256, 408 maxLength: 2560, 409 }, 410 avatar: { 411 - type: 'blob', 412 description: 413 "Small image to be displayed next to posts from account. AKA, 'profile picture'", 414 - accept: ['image/png', 'image/jpeg'], 415 maxSize: 1000000, 416 }, 417 banner: { 418 - type: 'blob', 419 description: 420 - 'Larger horizontal image to display behind profile view.', 421 - accept: ['image/png', 'image/jpeg'], 422 maxSize: 10000000, 423 }, 424 labels: { 425 - type: 'union', 426 description: 427 - 'Self-label values, specific to the Bluesky application, on the overall account.', 428 - refs: ['lex:com.atproto.label.defs#selfLabels'], 429 }, 430 joinedViaStarterPack: { 431 - type: 'ref', 432 - ref: 'lex:com.atproto.repo.strongRef', 433 }, 434 createdAt: { 435 - type: 'string', 436 - format: 'datetime', 437 }, 438 }, 439 }, ··· 442 }, 443 AppRockskyAlbum: { 444 lexicon: 1, 445 - id: 'app.rocksky.album', 446 defs: { 447 main: { 448 - type: 'record', 449 - description: 'A declaration of an album.', 450 - key: 'tid', 451 record: { 452 - type: 'object', 453 - required: ['title', 'artist', 'createdAt'], 454 properties: { 455 title: { 456 - type: 'string', 457 - description: 'The title of the album.', 458 minLength: 1, 459 maxLength: 512, 460 }, 461 artist: { 462 - type: 'string', 463 - description: 'The artist of the album.', 464 minLength: 1, 465 maxLength: 256, 466 }, 467 duration: { 468 - type: 'integer', 469 - description: 'The duration of the album in seconds.', 470 }, 471 releaseDate: { 472 - type: 'string', 473 - description: 'The release date of the album.', 474 - format: 'datetime', 475 }, 476 year: { 477 - type: 'integer', 478 - description: 'The year the album was released.', 479 }, 480 genre: { 481 - type: 'string', 482 - description: 'The genre of the album.', 483 maxLength: 256, 484 }, 485 albumArt: { 486 - type: 'blob', 487 - description: 'The album art of the album.', 488 - accept: ['image/png', 'image/jpeg'], 489 maxSize: 2000000, 490 }, 491 tags: { 492 - type: 'array', 493 - description: 'The tags of the album.', 494 items: { 495 - type: 'string', 496 minLength: 1, 497 maxLength: 256, 498 }, 499 }, 500 youtubeLink: { 501 - type: 'string', 502 - description: 'The YouTube link of the album.', 503 - format: 'uri', 504 }, 505 spotifyLink: { 506 - type: 'string', 507 - description: 'The Spotify link of the album.', 508 - format: 'uri', 509 }, 510 tidalLink: { 511 - type: 'string', 512 - description: 'The tidal link of the album.', 513 - format: 'uri', 514 }, 515 appleMusicLink: { 516 - type: 'string', 517 - description: 'The Apple Music link of the album.', 518 - format: 'uri', 519 }, 520 createdAt: { 521 - type: 'string', 522 - description: 'The date and time when the album was created.', 523 - format: 'datetime', 524 }, 525 }, 526 }, ··· 529 }, 530 AppRockskyAlbumDefs: { 531 lexicon: 1, 532 - id: 'app.rocksky.album.defs', 533 defs: { 534 albumViewBasic: { 535 - type: 'object', 536 properties: { 537 id: { 538 - type: 'string', 539 - description: 'The unique identifier of the album.', 540 }, 541 uri: { 542 - type: 'string', 543 - description: 'The URI of the album.', 544 - format: 'at-uri', 545 }, 546 title: { 547 - type: 'string', 548 - description: 'The title of the album.', 549 }, 550 artist: { 551 - type: 'string', 552 - description: 'The artist of the album.', 553 }, 554 artistUri: { 555 - type: 'string', 556 description: "The URI of the album's artist.", 557 - format: 'at-uri', 558 }, 559 year: { 560 - type: 'integer', 561 - description: 'The year the album was released.', 562 }, 563 albumArt: { 564 - type: 'string', 565 - description: 'The URL of the album art image.', 566 - format: 'uri', 567 }, 568 releaseDate: { 569 - type: 'string', 570 - description: 'The release date of the album.', 571 }, 572 sha256: { 573 - type: 'string', 574 - description: 'The SHA256 hash of the album.', 575 }, 576 playCount: { 577 - type: 'integer', 578 - description: 'The number of times the album has been played.', 579 minimum: 0, 580 }, 581 uniqueListeners: { 582 - type: 'integer', 583 description: 584 - 'The number of unique listeners who have played the album.', 585 minimum: 0, 586 }, 587 }, 588 }, 589 albumViewDetailed: { 590 - type: 'object', 591 properties: { 592 id: { 593 - type: 'string', 594 - description: 'The unique identifier of the album.', 595 }, 596 uri: { 597 - type: 'string', 598 - description: 'The URI of the album.', 599 - format: 'at-uri', 600 }, 601 title: { 602 - type: 'string', 603 - description: 'The title of the album.', 604 }, 605 artist: { 606 - type: 'string', 607 - description: 'The artist of the album.', 608 }, 609 artistUri: { 610 - type: 'string', 611 description: "The URI of the album's artist.", 612 - format: 'at-uri', 613 }, 614 year: { 615 - type: 'integer', 616 - description: 'The year the album was released.', 617 }, 618 albumArt: { 619 - type: 'string', 620 - description: 'The URL of the album art image.', 621 - format: 'uri', 622 }, 623 releaseDate: { 624 - type: 'string', 625 - description: 'The release date of the album.', 626 }, 627 sha256: { 628 - type: 'string', 629 - description: 'The SHA256 hash of the album.', 630 }, 631 playCount: { 632 - type: 'integer', 633 - description: 'The number of times the album has been played.', 634 minimum: 0, 635 }, 636 uniqueListeners: { 637 - type: 'integer', 638 description: 639 - 'The number of unique listeners who have played the album.', 640 minimum: 0, 641 }, 642 tracks: { 643 - type: 'array', 644 items: { 645 - type: 'ref', 646 - ref: 'lex:app.rocksky.song.defs.songViewBasic', 647 }, 648 }, 649 }, ··· 652 }, 653 AppRockskyAlbumGetAlbum: { 654 lexicon: 1, 655 - id: 'app.rocksky.album.getAlbum', 656 defs: { 657 main: { 658 - type: 'query', 659 - description: 'Get detailed album view', 660 parameters: { 661 - type: 'params', 662 - required: ['uri'], 663 properties: { 664 uri: { 665 - type: 'string', 666 - description: 'The URI of the album to retrieve.', 667 - format: 'at-uri', 668 }, 669 }, 670 }, 671 output: { 672 - encoding: 'application/json', 673 schema: { 674 - type: 'ref', 675 - ref: 'lex:app.rocksky.album.defs#albumViewDetailed', 676 }, 677 }, 678 }, ··· 680 }, 681 AppRockskyAlbumGetAlbums: { 682 lexicon: 1, 683 - id: 'app.rocksky.album.getAlbums', 684 defs: { 685 main: { 686 - type: 'query', 687 - description: 'Get albums', 688 parameters: { 689 - type: 'params', 690 properties: { 691 limit: { 692 - type: 'integer', 693 - description: 'The maximum number of albums to return', 694 minimum: 1, 695 }, 696 offset: { 697 - type: 'integer', 698 - description: 'The offset for pagination', 699 minimum: 0, 700 }, 701 }, 702 }, 703 output: { 704 - encoding: 'application/json', 705 schema: { 706 - type: 'object', 707 properties: { 708 albums: { 709 - type: 'array', 710 items: { 711 - type: 'ref', 712 - ref: 'lex:app.rocksky.album.defs#albumViewBasic', 713 }, 714 }, 715 }, ··· 720 }, 721 AppRockskyAlbumGetAlbumTracks: { 722 lexicon: 1, 723 - id: 'app.rocksky.album.getAlbumTracks', 724 defs: { 725 main: { 726 - type: 'query', 727 - description: 'Get tracks for an album', 728 parameters: { 729 - type: 'params', 730 - required: ['uri'], 731 properties: { 732 uri: { 733 - type: 'string', 734 - description: 'The URI of the album to retrieve tracks from', 735 - format: 'at-uri', 736 }, 737 }, 738 }, 739 output: { 740 - encoding: 'application/json', 741 schema: { 742 - type: 'object', 743 properties: { 744 tracks: { 745 - type: 'array', 746 items: { 747 - type: 'ref', 748 - ref: 'lex:app.rocksky.song.defs#songViewBasic', 749 }, 750 }, 751 }, ··· 756 }, 757 AppRockskyApikeyCreateApikey: { 758 lexicon: 1, 759 - id: 'app.rocksky.apikey.createApikey', 760 defs: { 761 main: { 762 - type: 'procedure', 763 - description: 'Create a new API key for the authenticated user', 764 input: { 765 - encoding: 'application/json', 766 schema: { 767 - type: 'object', 768 - required: ['name'], 769 properties: { 770 name: { 771 - type: 'string', 772 - description: 'The name of the API key.', 773 }, 774 description: { 775 - type: 'string', 776 - description: 'A description for the API key.', 777 }, 778 }, 779 }, 780 }, 781 output: { 782 - encoding: 'application/json', 783 schema: { 784 - type: 'ref', 785 - ref: 'lex:app.rocksky.apikey.defs#apiKey', 786 }, 787 }, 788 }, ··· 790 }, 791 AppRockskyApikeyDefs: { 792 lexicon: 1, 793 - id: 'app.rocksky.apikey.defs', 794 defs: { 795 apiKeyView: { 796 - type: 'object', 797 properties: { 798 id: { 799 - type: 'string', 800 - description: 'The unique identifier of the API key.', 801 }, 802 name: { 803 - type: 'string', 804 - description: 'The name of the API key.', 805 }, 806 description: { 807 - type: 'string', 808 - description: 'A description for the API key.', 809 }, 810 createdAt: { 811 - type: 'string', 812 - description: 'The date and time when the API key was created.', 813 - format: 'datetime', 814 }, 815 }, 816 }, ··· 818 }, 819 AppRockskyApikeysDefs: { 820 lexicon: 1, 821 - id: 'app.rocksky.apikeys.defs', 822 defs: {}, 823 }, 824 AppRockskyApikeyGetApikeys: { 825 lexicon: 1, 826 - id: 'app.rocksky.apikey.getApikeys', 827 defs: { 828 main: { 829 - type: 'query', 830 - description: 'Get a list of API keys for the authenticated user', 831 parameters: { 832 - type: 'params', 833 properties: { 834 offset: { 835 - type: 'integer', 836 description: 837 - 'The number of API keys to skip before starting to collect the result set.', 838 }, 839 limit: { 840 - type: 'integer', 841 - description: 'The number of API keys to return per page.', 842 }, 843 }, 844 }, 845 output: { 846 - encoding: 'application/json', 847 schema: { 848 - type: 'object', 849 properties: { 850 apiKeys: { 851 - type: 'array', 852 items: { 853 - type: 'ref', 854 - ref: 'lex:app.rocksky.apikey.defs#apikeyView', 855 }, 856 }, 857 }, ··· 862 }, 863 AppRockskyApikeyRemoveApikey: { 864 lexicon: 1, 865 - id: 'app.rocksky.apikey.removeApikey', 866 defs: { 867 main: { 868 - type: 'procedure', 869 - description: 'Remove an API key for the authenticated user', 870 parameters: { 871 - type: 'params', 872 - required: ['id'], 873 properties: { 874 id: { 875 - type: 'string', 876 - description: 'The ID of the API key to remove.', 877 }, 878 }, 879 }, 880 output: { 881 - encoding: 'application/json', 882 schema: { 883 - type: 'ref', 884 - ref: 'lex:app.rocksky.apikey.defs#apiKey', 885 }, 886 }, 887 }, ··· 889 }, 890 AppRockskyApikeyUpdateApikey: { 891 lexicon: 1, 892 - id: 'app.rocksky.apikey.updateApikey', 893 defs: { 894 main: { 895 - type: 'procedure', 896 - description: 'Update an existing API key for the authenticated user', 897 input: { 898 - encoding: 'application/json', 899 schema: { 900 - type: 'object', 901 - required: ['id', 'name'], 902 properties: { 903 id: { 904 - type: 'string', 905 - description: 'The ID of the API key to update.', 906 }, 907 name: { 908 - type: 'string', 909 - description: 'The new name of the API key.', 910 }, 911 description: { 912 - type: 'string', 913 - description: 'A new description for the API key.', 914 }, 915 }, 916 }, 917 }, 918 output: { 919 - encoding: 'application/json', 920 schema: { 921 - type: 'ref', 922 - ref: 'lex:app.rocksky.apikey.defs#apiKey', 923 }, 924 }, 925 }, ··· 927 }, 928 AppRockskyArtist: { 929 lexicon: 1, 930 - id: 'app.rocksky.artist', 931 defs: { 932 main: { 933 - type: 'record', 934 - description: 'A declaration of an artist.', 935 - key: 'tid', 936 record: { 937 - type: 'object', 938 - required: ['name', 'createdAt'], 939 properties: { 940 name: { 941 - type: 'string', 942 - description: 'The name of the artist.', 943 minLength: 1, 944 maxLength: 512, 945 }, 946 bio: { 947 - type: 'string', 948 - description: 'The biography of the artist.', 949 maxLength: 1000, 950 }, 951 picture: { 952 - type: 'blob', 953 - description: 'The picture of the artist.', 954 - accept: ['image/png', 'image/jpeg'], 955 maxSize: 2000000, 956 }, 957 tags: { 958 - type: 'array', 959 - description: 'The tags of the artist.', 960 items: { 961 - type: 'string', 962 minLength: 1, 963 maxLength: 256, 964 }, 965 }, 966 born: { 967 - type: 'string', 968 - description: 'The birth date of the artist.', 969 - format: 'datetime', 970 }, 971 died: { 972 - type: 'string', 973 - description: 'The death date of the artist.', 974 - format: 'datetime', 975 }, 976 bornIn: { 977 - type: 'string', 978 - description: 'The birth place of the artist.', 979 maxLength: 256, 980 }, 981 createdAt: { 982 - type: 'string', 983 - description: 'The date when the artist was created.', 984 - format: 'datetime', 985 }, 986 }, 987 }, ··· 990 }, 991 AppRockskyArtistDefs: { 992 lexicon: 1, 993 - id: 'app.rocksky.artist.defs', 994 defs: { 995 artistViewBasic: { 996 - type: 'object', 997 properties: { 998 id: { 999 - type: 'string', 1000 - description: 'The unique identifier of the artist.', 1001 }, 1002 uri: { 1003 - type: 'string', 1004 - description: 'The URI of the artist.', 1005 - format: 'at-uri', 1006 }, 1007 name: { 1008 - type: 'string', 1009 - description: 'The name of the artist.', 1010 }, 1011 picture: { 1012 - type: 'string', 1013 - description: 'The picture of the artist.', 1014 }, 1015 sha256: { 1016 - type: 'string', 1017 - description: 'The SHA256 hash of the artist.', 1018 }, 1019 playCount: { 1020 - type: 'integer', 1021 - description: 'The number of times the artist has been played.', 1022 minimum: 0, 1023 }, 1024 uniqueListeners: { 1025 - type: 'integer', 1026 description: 1027 - 'The number of unique listeners who have played the artist.', 1028 minimum: 0, 1029 }, 1030 }, 1031 }, 1032 artistViewDetailed: { 1033 - type: 'object', 1034 properties: { 1035 id: { 1036 - type: 'string', 1037 - description: 'The unique identifier of the artist.', 1038 }, 1039 uri: { 1040 - type: 'string', 1041 - description: 'The URI of the artist.', 1042 - format: 'at-uri', 1043 }, 1044 name: { 1045 - type: 'string', 1046 - description: 'The name of the artist.', 1047 }, 1048 picture: { 1049 - type: 'string', 1050 - description: 'The picture of the artist.', 1051 }, 1052 sha256: { 1053 - type: 'string', 1054 - description: 'The SHA256 hash of the artist.', 1055 }, 1056 playCount: { 1057 - type: 'integer', 1058 - description: 'The number of times the artist has been played.', 1059 minimum: 0, 1060 }, 1061 uniqueListeners: { 1062 - type: 'integer', 1063 description: 1064 - 'The number of unique listeners who have played the artist.', 1065 minimum: 0, 1066 }, 1067 }, 1068 }, 1069 songViewBasic: { 1070 - type: 'object', 1071 properties: { 1072 uri: { 1073 - type: 'string', 1074 - description: 'The URI of the song.', 1075 - format: 'at-uri', 1076 }, 1077 title: { 1078 - type: 'string', 1079 - description: 'The title of the song.', 1080 }, 1081 playCount: { 1082 - type: 'integer', 1083 - description: 'The number of times the song has been played.', 1084 minimum: 0, 1085 }, 1086 }, 1087 }, 1088 listenerViewBasic: { 1089 - type: 'object', 1090 properties: { 1091 id: { 1092 - type: 'string', 1093 - description: 'The unique identifier of the actor.', 1094 }, 1095 did: { 1096 - type: 'string', 1097 - description: 'The DID of the listener.', 1098 }, 1099 handle: { 1100 - type: 'string', 1101 - description: 'The handle of the listener.', 1102 }, 1103 displayName: { 1104 - type: 'string', 1105 - description: 'The display name of the listener.', 1106 }, 1107 avatar: { 1108 - type: 'string', 1109 description: "The URL of the listener's avatar image.", 1110 - format: 'uri', 1111 }, 1112 mostListenedSong: { 1113 - type: 'ref', 1114 - ref: 'lex:app.rocksky.artist.defs#songViewBasic', 1115 }, 1116 totalPlays: { 1117 - type: 'integer', 1118 - description: 'The total number of plays by the listener.', 1119 minimum: 0, 1120 }, 1121 rank: { 1122 - type: 'integer', 1123 description: 1124 - 'The rank of the listener among all listeners of the artist.', 1125 minimum: 1, 1126 }, 1127 }, ··· 1130 }, 1131 AppRockskyArtistGetArtistAlbums: { 1132 lexicon: 1, 1133 - id: 'app.rocksky.artist.getArtistAlbums', 1134 defs: { 1135 main: { 1136 - type: 'query', 1137 description: "Get artist's albums", 1138 parameters: { 1139 - type: 'params', 1140 - required: ['uri'], 1141 properties: { 1142 uri: { 1143 - type: 'string', 1144 - description: 'The URI of the artist to retrieve albums from', 1145 - format: 'at-uri', 1146 }, 1147 }, 1148 }, 1149 output: { 1150 - encoding: 'application/json', 1151 schema: { 1152 - type: 'object', 1153 properties: { 1154 albums: { 1155 - type: 'array', 1156 items: { 1157 - type: 'ref', 1158 - ref: 'lex:app.rocksky.album.defs#albumViewBasic', 1159 }, 1160 }, 1161 }, ··· 1166 }, 1167 AppRockskyArtistGetArtist: { 1168 lexicon: 1, 1169 - id: 'app.rocksky.artist.getArtist', 1170 defs: { 1171 main: { 1172 - type: 'query', 1173 - description: 'Get artist details', 1174 parameters: { 1175 - type: 'params', 1176 - required: ['uri'], 1177 properties: { 1178 uri: { 1179 - type: 'string', 1180 - description: 'The URI of the artist to retrieve details from', 1181 - format: 'at-uri', 1182 }, 1183 }, 1184 }, 1185 output: { 1186 - encoding: 'application/json', 1187 schema: { 1188 - type: 'ref', 1189 - ref: 'lex:app.rocksky.artist.defs#artistViewDetailed', 1190 }, 1191 }, 1192 }, ··· 1194 }, 1195 AppRockskyArtistGetArtistListeners: { 1196 lexicon: 1, 1197 - id: 'app.rocksky.artist.getArtistListeners', 1198 defs: { 1199 main: { 1200 - type: 'query', 1201 - description: 'Get artist listeners', 1202 parameters: { 1203 - type: 'params', 1204 - required: ['uri'], 1205 properties: { 1206 uri: { 1207 - type: 'string', 1208 - description: 'The URI of the artist to retrieve listeners from', 1209 - format: 'at-uri', 1210 }, 1211 offset: { 1212 - type: 'integer', 1213 - description: 'Number of items to skip before returning results', 1214 }, 1215 limit: { 1216 - type: 'integer', 1217 - description: 'Maximum number of results to return', 1218 }, 1219 }, 1220 }, 1221 output: { 1222 - encoding: 'application/json', 1223 schema: { 1224 - type: 'object', 1225 properties: { 1226 listeners: { 1227 - type: 'array', 1228 items: { 1229 - type: 'ref', 1230 - ref: 'lex:app.rocksky.artist.defs#listenerViewBasic', 1231 }, 1232 }, 1233 }, ··· 1238 }, 1239 AppRockskyArtistGetArtists: { 1240 lexicon: 1, 1241 - id: 'app.rocksky.artist.getArtists', 1242 defs: { 1243 main: { 1244 - type: 'query', 1245 - description: 'Get artists', 1246 parameters: { 1247 - type: 'params', 1248 properties: { 1249 limit: { 1250 - type: 'integer', 1251 - description: 'The maximum number of artists to return', 1252 minimum: 1, 1253 }, 1254 offset: { 1255 - type: 'integer', 1256 - description: 'The offset for pagination', 1257 minimum: 0, 1258 }, 1259 }, 1260 }, 1261 output: { 1262 - encoding: 'application/json', 1263 schema: { 1264 - type: 'object', 1265 properties: { 1266 artists: { 1267 - type: 'array', 1268 items: { 1269 - type: 'ref', 1270 - ref: 'lex:app.rocksky.artist.defs#artistViewBasic', 1271 }, 1272 }, 1273 }, ··· 1278 }, 1279 AppRockskyArtistGetArtistTracks: { 1280 lexicon: 1, 1281 - id: 'app.rocksky.artist.getArtistTracks', 1282 defs: { 1283 main: { 1284 - type: 'query', 1285 description: "Get artist's tracks", 1286 parameters: { 1287 - type: 'params', 1288 properties: { 1289 uri: { 1290 - type: 'string', 1291 - description: 'The URI of the artist to retrieve albums from', 1292 - format: 'at-uri', 1293 }, 1294 limit: { 1295 - type: 'integer', 1296 - description: 'The maximum number of tracks to return', 1297 minimum: 1, 1298 }, 1299 offset: { 1300 - type: 'integer', 1301 - description: 'The offset for pagination', 1302 minimum: 0, 1303 }, 1304 }, 1305 }, 1306 output: { 1307 - encoding: 'application/json', 1308 schema: { 1309 - type: 'object', 1310 properties: { 1311 tracks: { 1312 - type: 'array', 1313 items: { 1314 - type: 'ref', 1315 - ref: 'lex:app.rocksky.song.defs#songViewBasic', 1316 }, 1317 }, 1318 }, ··· 1323 }, 1324 AppRockskyChartsDefs: { 1325 lexicon: 1, 1326 - id: 'app.rocksky.charts.defs', 1327 defs: { 1328 chartsView: { 1329 - type: 'object', 1330 properties: { 1331 scrobbles: { 1332 - type: 'array', 1333 items: { 1334 - type: 'ref', 1335 - ref: 'lex:app.rocksky.charts.defs#scrobbleViewBasic', 1336 }, 1337 }, 1338 }, 1339 }, 1340 scrobbleViewBasic: { 1341 - type: 'object', 1342 properties: { 1343 date: { 1344 - type: 'string', 1345 - description: 'The date of the scrobble.', 1346 - format: 'datetime', 1347 }, 1348 count: { 1349 - type: 'integer', 1350 - description: 'The number of scrobbles on this date.', 1351 }, 1352 }, 1353 }, ··· 1355 }, 1356 AppRockskyChartsGetScrobblesChart: { 1357 lexicon: 1, 1358 - id: 'app.rocksky.charts.getScrobblesChart', 1359 defs: { 1360 main: { 1361 - type: 'query', 1362 - description: 'Get the scrobbles chart', 1363 parameters: { 1364 - type: 'params', 1365 properties: { 1366 did: { 1367 - type: 'string', 1368 - description: 'The DID or handle of the actor', 1369 - format: 'at-identifier', 1370 }, 1371 artisturi: { 1372 - type: 'string', 1373 - description: 'The URI of the artist to filter by', 1374 - format: 'at-uri', 1375 }, 1376 albumuri: { 1377 - type: 'string', 1378 - description: 'The URI of the album to filter by', 1379 - format: 'at-uri', 1380 }, 1381 songuri: { 1382 - type: 'string', 1383 - description: 'The URI of the track to filter by', 1384 - format: 'at-uri', 1385 }, 1386 }, 1387 }, 1388 output: { 1389 - encoding: 'application/json', 1390 schema: { 1391 - type: 'ref', 1392 - ref: 'lex:app.rocksky.charts.defs#chartsView', 1393 }, 1394 }, 1395 }, ··· 1397 }, 1398 AppRockskyDropboxDefs: { 1399 lexicon: 1, 1400 - id: 'app.rocksky.dropbox.defs', 1401 defs: { 1402 fileView: { 1403 - type: 'object', 1404 properties: { 1405 id: { 1406 - type: 'string', 1407 - description: 'The unique identifier of the file.', 1408 }, 1409 name: { 1410 - type: 'string', 1411 - description: 'The name of the file.', 1412 }, 1413 pathLower: { 1414 - type: 'string', 1415 - description: 'The lowercased path of the file.', 1416 }, 1417 pathDisplay: { 1418 - type: 'string', 1419 - description: 'The display path of the file.', 1420 }, 1421 clientModified: { 1422 - type: 'string', 1423 description: 1424 - 'The last modified date and time of the file on the client.', 1425 - format: 'datetime', 1426 }, 1427 serverModified: { 1428 - type: 'string', 1429 description: 1430 - 'The last modified date and time of the file on the server.', 1431 - format: 'datetime', 1432 }, 1433 }, 1434 }, 1435 fileListView: { 1436 - type: 'object', 1437 properties: { 1438 files: { 1439 - type: 'array', 1440 - description: 'A list of files in the Dropbox.', 1441 items: { 1442 - type: 'ref', 1443 - ref: 'lex:app.rocksky.dropbox.defs#fileView', 1444 }, 1445 }, 1446 }, 1447 }, 1448 temporaryLinkView: { 1449 - type: 'object', 1450 properties: { 1451 link: { 1452 - type: 'string', 1453 - description: 'The temporary link to access the file.', 1454 - format: 'uri', 1455 }, 1456 }, 1457 }, ··· 1459 }, 1460 AppRockskyDropboxDownloadFile: { 1461 lexicon: 1, 1462 - id: 'app.rocksky.dropbox.downloadFile', 1463 defs: { 1464 main: { 1465 - type: 'query', 1466 - description: 'Download a file from Dropbox by its unique identifier', 1467 parameters: { 1468 - type: 'params', 1469 - required: ['fileId'], 1470 properties: { 1471 fileId: { 1472 - type: 'string', 1473 - description: 'The unique identifier of the file to download', 1474 }, 1475 }, 1476 }, 1477 output: { 1478 - encoding: 'application/octet-stream', 1479 }, 1480 }, 1481 }, 1482 }, 1483 AppRockskyDropboxGetFiles: { 1484 lexicon: 1, 1485 - id: 'app.rocksky.dropbox.getFiles', 1486 defs: { 1487 main: { 1488 - type: 'query', 1489 - description: 'Retrieve a list of files from Dropbox', 1490 parameters: { 1491 - type: 'params', 1492 properties: { 1493 at: { 1494 - type: 'string', 1495 - description: 'Path to the Dropbox folder or root directory', 1496 }, 1497 }, 1498 }, 1499 output: { 1500 - encoding: 'application/json', 1501 schema: { 1502 - type: 'ref', 1503 - ref: 'lex:app.rocksky.dropbox.defs#fileListView', 1504 }, 1505 }, 1506 }, ··· 1508 }, 1509 AppRockskyDropboxGetMetadata: { 1510 lexicon: 1, 1511 - id: 'app.rocksky.dropbox.getMetadata', 1512 defs: { 1513 main: { 1514 - type: 'query', 1515 - description: 'Retrieve metadata of a file or folder in Dropbox', 1516 parameters: { 1517 - type: 'params', 1518 - required: ['path'], 1519 properties: { 1520 path: { 1521 - type: 'string', 1522 - description: 'Path to the file or folder in Dropbox', 1523 }, 1524 }, 1525 }, 1526 output: { 1527 - encoding: 'application/json', 1528 schema: { 1529 - type: 'ref', 1530 - ref: 'lex:app.rocksky.dropbox.defs#fileView', 1531 }, 1532 }, 1533 }, ··· 1535 }, 1536 AppRockskyDropboxGetTemporaryLink: { 1537 lexicon: 1, 1538 - id: 'app.rocksky.dropbox.getTemporaryLink', 1539 defs: { 1540 main: { 1541 - type: 'query', 1542 - description: 'Retrieve a temporary link to access a file in Dropbox', 1543 parameters: { 1544 - type: 'params', 1545 - required: ['path'], 1546 properties: { 1547 path: { 1548 - type: 'string', 1549 - description: 'Path to the file in Dropbox', 1550 }, 1551 }, 1552 }, 1553 output: { 1554 - encoding: 'application/json', 1555 schema: { 1556 - type: 'ref', 1557 - ref: 'lex:app.rocksky.dropbox.defs#temporaryLinkView', 1558 }, 1559 }, 1560 }, ··· 1562 }, 1563 AppRockskyFeedDefs: { 1564 lexicon: 1, 1565 - id: 'app.rocksky.feed.defs', 1566 defs: { 1567 searchResultsView: { 1568 - type: 'object', 1569 properties: { 1570 hits: { 1571 - type: 'array', 1572 items: { 1573 - type: 'union', 1574 refs: [ 1575 - 'lex:app.rocksky.song.defs#songViewBasic', 1576 - 'lex:app.rocksky.album.defs#albumViewBasic', 1577 - 'lex:app.rocksky.artist.defs#artistViewBasic', 1578 - 'lex:app.rocksky.playlist.defs#playlistViewBasic', 1579 - 'lex:app.rocksky.actor.defs#profileViewBasic', 1580 ], 1581 }, 1582 }, 1583 processingTimeMs: { 1584 - type: 'integer', 1585 }, 1586 limit: { 1587 - type: 'integer', 1588 }, 1589 offset: { 1590 - type: 'integer', 1591 }, 1592 estimatedTotalHits: { 1593 - type: 'integer', 1594 }, 1595 }, 1596 }, 1597 nowPlayingView: { 1598 - type: 'object', 1599 properties: { 1600 album: { 1601 - type: 'string', 1602 }, 1603 albumArt: { 1604 - type: 'string', 1605 - format: 'uri', 1606 }, 1607 albumArtist: { 1608 - type: 'string', 1609 }, 1610 albumUri: { 1611 - type: 'string', 1612 - format: 'at-uri', 1613 }, 1614 artist: { 1615 - type: 'string', 1616 }, 1617 artistUri: { 1618 - type: 'string', 1619 - format: 'at-uri', 1620 }, 1621 avatar: { 1622 - type: 'string', 1623 - format: 'uri', 1624 }, 1625 createdAt: { 1626 - type: 'string', 1627 }, 1628 did: { 1629 - type: 'string', 1630 - format: 'at-identifier', 1631 }, 1632 handle: { 1633 - type: 'string', 1634 }, 1635 id: { 1636 - type: 'string', 1637 }, 1638 title: { 1639 - type: 'string', 1640 }, 1641 trackId: { 1642 - type: 'string', 1643 }, 1644 trackUri: { 1645 - type: 'string', 1646 - format: 'at-uri', 1647 }, 1648 uri: { 1649 - type: 'string', 1650 - format: 'at-uri', 1651 }, 1652 }, 1653 }, 1654 nowPlayingsView: { 1655 - type: 'object', 1656 properties: { 1657 nowPlayings: { 1658 - type: 'array', 1659 items: { 1660 - type: 'ref', 1661 - ref: 'lex:app.rocksky.feed.defs#nowPlayingView', 1662 }, 1663 }, 1664 }, ··· 1667 }, 1668 AppRockskyFeedGetNowPlayings: { 1669 lexicon: 1, 1670 - id: 'app.rocksky.feed.getNowPlayings', 1671 defs: { 1672 main: { 1673 - type: 'query', 1674 - description: 'Get all currently playing tracks by users', 1675 parameters: { 1676 - type: 'params', 1677 properties: { 1678 size: { 1679 - type: 'integer', 1680 description: 1681 - 'The maximum number of now playing tracks to return.', 1682 minimum: 1, 1683 }, 1684 }, 1685 }, 1686 output: { 1687 - encoding: 'application/json', 1688 schema: { 1689 - type: 'ref', 1690 - ref: 'lex:app.rocksky.feed.defs#nowPlayingsView', 1691 }, 1692 }, 1693 }, ··· 1695 }, 1696 AppRockskyFeedSearch: { 1697 lexicon: 1, 1698 - id: 'app.rocksky.feed.search', 1699 defs: { 1700 main: { 1701 - type: 'query', 1702 - description: 'Search for content in the feed', 1703 parameters: { 1704 - type: 'params', 1705 - required: ['query'], 1706 properties: { 1707 query: { 1708 - type: 'string', 1709 - description: 'The search query string', 1710 }, 1711 }, 1712 }, 1713 output: { 1714 - encoding: 'application/json', 1715 schema: { 1716 - type: 'ref', 1717 - ref: 'lex:app.rocksky.feed.defs#searchResultsView', 1718 }, 1719 }, 1720 }, ··· 1722 }, 1723 AppRockskyGoogledriveDefs: { 1724 lexicon: 1, 1725 - id: 'app.rocksky.googledrive.defs', 1726 defs: { 1727 fileView: { 1728 - type: 'object', 1729 properties: { 1730 id: { 1731 - type: 'string', 1732 - description: 'The unique identifier of the file.', 1733 }, 1734 }, 1735 }, 1736 fileListView: { 1737 - type: 'object', 1738 properties: { 1739 files: { 1740 - type: 'array', 1741 items: { 1742 - type: 'ref', 1743 - ref: 'lex:app.rocksky.googledrive.defs#fileView', 1744 }, 1745 }, 1746 }, ··· 1749 }, 1750 AppRockskyGoogledriveDownloadFile: { 1751 lexicon: 1, 1752 - id: 'app.rocksky.googledrive.downloadFile', 1753 defs: { 1754 main: { 1755 - type: 'query', 1756 description: 1757 - 'Download a file from Google Drive by its unique identifier', 1758 parameters: { 1759 - type: 'params', 1760 - required: ['fileId'], 1761 properties: { 1762 fileId: { 1763 - type: 'string', 1764 - description: 'The unique identifier of the file to download', 1765 }, 1766 }, 1767 }, 1768 output: { 1769 - encoding: 'application/octet-stream', 1770 }, 1771 }, 1772 }, 1773 }, 1774 AppRockskyGoogledriveGetFile: { 1775 lexicon: 1, 1776 - id: 'app.rocksky.googledrive.getFile', 1777 defs: { 1778 main: { 1779 - type: 'query', 1780 - description: 'Get a file from Google Drive by its unique identifier', 1781 parameters: { 1782 - type: 'params', 1783 - required: ['fileId'], 1784 properties: { 1785 fileId: { 1786 - type: 'string', 1787 - description: 'The unique identifier of the file to retrieve', 1788 }, 1789 }, 1790 }, 1791 output: { 1792 - encoding: 'application/json', 1793 schema: { 1794 - type: 'ref', 1795 - ref: 'lex:app.rocksky.googledrive.defs#fileView', 1796 }, 1797 }, 1798 }, ··· 1800 }, 1801 AppRockskyGoogledriveGetFiles: { 1802 lexicon: 1, 1803 - id: 'app.rocksky.googledrive.getFiles', 1804 defs: { 1805 main: { 1806 - type: 'query', 1807 - description: 'Get a list of files from Google Drive', 1808 parameters: { 1809 - type: 'params', 1810 properties: { 1811 at: { 1812 - type: 'string', 1813 - description: 'Path to the Google Drive folder or root directory', 1814 }, 1815 }, 1816 }, 1817 output: { 1818 - encoding: 'application/json', 1819 schema: { 1820 - type: 'ref', 1821 - ref: 'lex:app.rocksky.googledrive.defs#fileListView', 1822 }, 1823 }, 1824 }, ··· 1826 }, 1827 AppRockskyLikeDislikeShout: { 1828 lexicon: 1, 1829 - id: 'app.rocksky.like.dislikeShout', 1830 defs: { 1831 main: { 1832 - type: 'procedure', 1833 - description: 'Dislike a shout', 1834 input: { 1835 - encoding: 'application/json', 1836 schema: { 1837 - type: 'object', 1838 properties: { 1839 uri: { 1840 - type: 'string', 1841 - description: 'The unique identifier of the shout to dislike', 1842 - format: 'at-uri', 1843 }, 1844 }, 1845 }, 1846 }, 1847 output: { 1848 - encoding: 'application/json', 1849 schema: { 1850 - type: 'ref', 1851 - ref: 'lex:app.rocksky.shout.defs#shoutView', 1852 }, 1853 }, 1854 }, ··· 1856 }, 1857 AppRockskyLikeDislikeSong: { 1858 lexicon: 1, 1859 - id: 'app.rocksky.like.dislikeSong', 1860 defs: { 1861 main: { 1862 - type: 'procedure', 1863 - description: 'Dislike a song', 1864 input: { 1865 - encoding: 'application/json', 1866 schema: { 1867 - type: 'object', 1868 properties: { 1869 uri: { 1870 - type: 'string', 1871 - description: 'The unique identifier of the song to dislike', 1872 - format: 'at-uri', 1873 }, 1874 }, 1875 }, 1876 }, 1877 output: { 1878 - encoding: 'application/json', 1879 schema: { 1880 - type: 'ref', 1881 - ref: 'lex:app.rocksky.song.defs#songViewDetailed', 1882 }, 1883 }, 1884 }, ··· 1886 }, 1887 AppRockskyLike: { 1888 lexicon: 1, 1889 - id: 'app.rocksky.like', 1890 defs: { 1891 main: { 1892 - type: 'record', 1893 - description: 'A declaration of a like.', 1894 - key: 'tid', 1895 record: { 1896 - type: 'object', 1897 - required: ['createdAt', 'subject'], 1898 properties: { 1899 createdAt: { 1900 - type: 'string', 1901 - description: 'The date when the like was created.', 1902 - format: 'datetime', 1903 }, 1904 subject: { 1905 - type: 'ref', 1906 - ref: 'lex:com.atproto.repo.strongRef', 1907 }, 1908 }, 1909 }, ··· 1912 }, 1913 AppRockskyLikeLikeShout: { 1914 lexicon: 1, 1915 - id: 'app.rocksky.like.likeShout', 1916 defs: { 1917 main: { 1918 - type: 'procedure', 1919 - description: 'Like a shout', 1920 input: { 1921 - encoding: 'application/json', 1922 schema: { 1923 - type: 'object', 1924 properties: { 1925 uri: { 1926 - type: 'string', 1927 - description: 'The unique identifier of the shout to like', 1928 - format: 'at-uri', 1929 }, 1930 }, 1931 }, 1932 }, 1933 output: { 1934 - encoding: 'application/json', 1935 schema: { 1936 - type: 'ref', 1937 - ref: 'lex:app.rocksky.shout.defs#shoutView', 1938 }, 1939 }, 1940 }, ··· 1942 }, 1943 AppRockskyLikeLikeSong: { 1944 lexicon: 1, 1945 - id: 'app.rocksky.like.likeSong', 1946 defs: { 1947 main: { 1948 - type: 'procedure', 1949 - description: 'Like a song', 1950 input: { 1951 - encoding: 'application/json', 1952 schema: { 1953 - type: 'object', 1954 properties: { 1955 uri: { 1956 - type: 'string', 1957 - description: 'The unique identifier of the song to like', 1958 - format: 'at-uri', 1959 }, 1960 }, 1961 }, 1962 }, 1963 output: { 1964 - encoding: 'application/json', 1965 schema: { 1966 - type: 'ref', 1967 - ref: 'lex:app.rocksky.song.defs#songViewDetailed', 1968 }, 1969 }, 1970 }, ··· 1972 }, 1973 AppRockskyPlayerAddDirectoryToQueue: { 1974 lexicon: 1, 1975 - id: 'app.rocksky.player.addDirectoryToQueue', 1976 defs: { 1977 main: { 1978 - type: 'procedure', 1979 description: "Add directory to the player's queue", 1980 parameters: { 1981 - type: 'params', 1982 - required: ['directory'], 1983 properties: { 1984 playerId: { 1985 - type: 'string', 1986 }, 1987 directory: { 1988 - type: 'string', 1989 - description: 'The directory to add to the queue', 1990 }, 1991 position: { 1992 - type: 'integer', 1993 description: 1994 - 'Position in the queue to insert the directory at, defaults to the end if not specified', 1995 }, 1996 shuffle: { 1997 - type: 'boolean', 1998 description: 1999 - 'Whether to shuffle the added directory in the queue', 2000 }, 2001 }, 2002 }, ··· 2005 }, 2006 AppRockskyPlayerAddItemsToQueue: { 2007 lexicon: 1, 2008 - id: 'app.rocksky.player.addItemsToQueue', 2009 defs: { 2010 main: { 2011 - type: 'procedure', 2012 description: "Add items to the player's queue", 2013 parameters: { 2014 - type: 'params', 2015 - required: ['items'], 2016 properties: { 2017 playerId: { 2018 - type: 'string', 2019 }, 2020 items: { 2021 - type: 'array', 2022 items: { 2023 - type: 'string', 2024 - description: 'List of file identifiers to add to the queue', 2025 }, 2026 }, 2027 position: { 2028 - type: 'integer', 2029 description: 2030 - 'Position in the queue to insert the items at, defaults to the end if not specified', 2031 }, 2032 shuffle: { 2033 - type: 'boolean', 2034 - description: 'Whether to shuffle the added items in the queue', 2035 }, 2036 }, 2037 }, ··· 2040 }, 2041 AppRockskyPlayerDefs: { 2042 lexicon: 1, 2043 - id: 'app.rocksky.player.defs', 2044 defs: { 2045 currentlyPlayingViewDetailed: { 2046 - type: 'object', 2047 properties: { 2048 title: { 2049 - type: 'string', 2050 - description: 'The title of the currently playing track', 2051 }, 2052 }, 2053 }, 2054 playbackQueueViewDetailed: { 2055 - type: 'object', 2056 properties: { 2057 tracks: { 2058 - type: 'array', 2059 items: { 2060 - type: 'ref', 2061 - ref: 'lex:app.rocksky.song.defs.songViewBasic', 2062 }, 2063 }, 2064 }, ··· 2067 }, 2068 AppRockskyPlayerGetCurrentlyPlaying: { 2069 lexicon: 1, 2070 - id: 'app.rocksky.player.getCurrentlyPlaying', 2071 defs: { 2072 main: { 2073 - type: 'query', 2074 - description: 'Get the currently playing track', 2075 parameters: { 2076 - type: 'params', 2077 properties: { 2078 playerId: { 2079 - type: 'string', 2080 }, 2081 actor: { 2082 - type: 'string', 2083 description: 2084 - 'Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user.', 2085 - format: 'at-identifier', 2086 }, 2087 }, 2088 }, 2089 output: { 2090 - encoding: 'application/json', 2091 schema: { 2092 - type: 'ref', 2093 - ref: 'lex:app.rocksky.player.defs#currentlyPlayingViewDetailed', 2094 }, 2095 }, 2096 }, ··· 2098 }, 2099 AppRockskyPlayerGetPlaybackQueue: { 2100 lexicon: 1, 2101 - id: 'app.rocksky.player.getPlaybackQueue', 2102 defs: { 2103 main: { 2104 - type: 'query', 2105 - description: 'Retrieve the current playback queue', 2106 parameters: { 2107 - type: 'params', 2108 properties: { 2109 playerId: { 2110 - type: 'string', 2111 }, 2112 }, 2113 }, 2114 output: { 2115 - encoding: 'application/json', 2116 schema: { 2117 - type: 'ref', 2118 - ref: 'lex:app.rocksky.player.defs#playbackQueueViewDetailed', 2119 }, 2120 }, 2121 }, ··· 2123 }, 2124 AppRockskyPlayerNext: { 2125 lexicon: 1, 2126 - id: 'app.rocksky.player.next', 2127 defs: { 2128 main: { 2129 - type: 'procedure', 2130 - description: 'Play the next track in the queue', 2131 parameters: { 2132 - type: 'params', 2133 properties: { 2134 playerId: { 2135 - type: 'string', 2136 }, 2137 }, 2138 }, ··· 2141 }, 2142 AppRockskyPlayerPause: { 2143 lexicon: 1, 2144 - id: 'app.rocksky.player.pause', 2145 defs: { 2146 main: { 2147 - type: 'procedure', 2148 - description: 'Pause the currently playing track', 2149 parameters: { 2150 - type: 'params', 2151 properties: { 2152 playerId: { 2153 - type: 'string', 2154 }, 2155 }, 2156 }, ··· 2159 }, 2160 AppRockskyPlayerPlayDirectory: { 2161 lexicon: 1, 2162 - id: 'app.rocksky.player.playDirectory', 2163 defs: { 2164 main: { 2165 - type: 'procedure', 2166 - description: 'Play all tracks in a directory', 2167 parameters: { 2168 - type: 'params', 2169 - required: ['directoryId'], 2170 properties: { 2171 playerId: { 2172 - type: 'string', 2173 }, 2174 directoryId: { 2175 - type: 'string', 2176 }, 2177 shuffle: { 2178 - type: 'boolean', 2179 }, 2180 recurse: { 2181 - type: 'boolean', 2182 }, 2183 position: { 2184 - type: 'integer', 2185 }, 2186 }, 2187 }, ··· 2190 }, 2191 AppRockskyPlayerPlayFile: { 2192 lexicon: 1, 2193 - id: 'app.rocksky.player.playFile', 2194 defs: { 2195 main: { 2196 - type: 'procedure', 2197 - description: 'Play a specific audio file', 2198 parameters: { 2199 - type: 'params', 2200 - required: ['fileId'], 2201 properties: { 2202 playerId: { 2203 - type: 'string', 2204 }, 2205 fileId: { 2206 - type: 'string', 2207 }, 2208 }, 2209 }, ··· 2212 }, 2213 AppRockskyPlayerPlay: { 2214 lexicon: 1, 2215 - id: 'app.rocksky.player.play', 2216 defs: { 2217 main: { 2218 - type: 'procedure', 2219 - description: 'Resume playback of the currently paused track', 2220 parameters: { 2221 - type: 'params', 2222 properties: { 2223 playerId: { 2224 - type: 'string', 2225 }, 2226 }, 2227 }, ··· 2230 }, 2231 AppRockskyPlayerPrevious: { 2232 lexicon: 1, 2233 - id: 'app.rocksky.player.previous', 2234 defs: { 2235 main: { 2236 - type: 'procedure', 2237 - description: 'Play the previous track in the queue', 2238 parameters: { 2239 - type: 'params', 2240 properties: { 2241 playerId: { 2242 - type: 'string', 2243 }, 2244 }, 2245 }, ··· 2248 }, 2249 AppRockskyPlayerSeek: { 2250 lexicon: 1, 2251 - id: 'app.rocksky.player.seek', 2252 defs: { 2253 main: { 2254 - type: 'procedure', 2255 description: 2256 - 'Seek to a specific position in the currently playing track', 2257 parameters: { 2258 - type: 'params', 2259 - required: ['position'], 2260 properties: { 2261 playerId: { 2262 - type: 'string', 2263 }, 2264 position: { 2265 - type: 'integer', 2266 - description: 'The position in seconds to seek to', 2267 }, 2268 }, 2269 }, ··· 2272 }, 2273 AppRockskyPlaylistCreatePlaylist: { 2274 lexicon: 1, 2275 - id: 'app.rocksky.playlist.createPlaylist', 2276 defs: { 2277 main: { 2278 - type: 'procedure', 2279 - description: 'Create a new playlist', 2280 parameters: { 2281 - type: 'params', 2282 - required: ['name'], 2283 properties: { 2284 name: { 2285 - type: 'string', 2286 - description: 'The name of the playlist', 2287 }, 2288 description: { 2289 - type: 'string', 2290 - description: 'A brief description of the playlist', 2291 }, 2292 }, 2293 }, ··· 2296 }, 2297 AppRockskyPlaylistDefs: { 2298 lexicon: 1, 2299 - id: 'app.rocksky.playlist.defs', 2300 defs: { 2301 playlistViewDetailed: { 2302 - type: 'object', 2303 description: 2304 - 'Detailed view of a playlist, including its tracks and metadata', 2305 properties: { 2306 id: { 2307 - type: 'string', 2308 - description: 'The unique identifier of the playlist.', 2309 }, 2310 title: { 2311 - type: 'string', 2312 - description: 'The title of the playlist.', 2313 }, 2314 uri: { 2315 - type: 'string', 2316 - description: 'The URI of the playlist.', 2317 - format: 'at-uri', 2318 }, 2319 curatorDid: { 2320 - type: 'string', 2321 - description: 'The DID of the curator of the playlist.', 2322 - format: 'at-identifier', 2323 }, 2324 curatorHandle: { 2325 - type: 'string', 2326 - description: 'The handle of the curator of the playlist.', 2327 - format: 'at-identifier', 2328 }, 2329 curatorName: { 2330 - type: 'string', 2331 - description: 'The name of the curator of the playlist.', 2332 }, 2333 curatorAvatarUrl: { 2334 - type: 'string', 2335 - description: 'The URL of the avatar image of the curator.', 2336 - format: 'uri', 2337 }, 2338 description: { 2339 - type: 'string', 2340 - description: 'A description of the playlist.', 2341 }, 2342 coverImageUrl: { 2343 - type: 'string', 2344 - description: 'The URL of the cover image for the playlist.', 2345 - format: 'uri', 2346 }, 2347 createdAt: { 2348 - type: 'string', 2349 - description: 'The date and time when the playlist was created.', 2350 - format: 'datetime', 2351 }, 2352 tracks: { 2353 - type: 'array', 2354 - description: 'A list of tracks in the playlist.', 2355 items: { 2356 - type: 'ref', 2357 - ref: 'lex:app.rocksky.song.defs#songViewBasic', 2358 }, 2359 }, 2360 }, 2361 }, 2362 playlistViewBasic: { 2363 - type: 'object', 2364 - description: 'Basic view of a playlist, including its metadata', 2365 properties: { 2366 id: { 2367 - type: 'string', 2368 - description: 'The unique identifier of the playlist.', 2369 }, 2370 title: { 2371 - type: 'string', 2372 - description: 'The title of the playlist.', 2373 }, 2374 uri: { 2375 - type: 'string', 2376 - description: 'The URI of the playlist.', 2377 - format: 'at-uri', 2378 }, 2379 curatorDid: { 2380 - type: 'string', 2381 - description: 'The DID of the curator of the playlist.', 2382 - format: 'at-identifier', 2383 }, 2384 curatorHandle: { 2385 - type: 'string', 2386 - description: 'The handle of the curator of the playlist.', 2387 - format: 'at-identifier', 2388 }, 2389 curatorName: { 2390 - type: 'string', 2391 - description: 'The name of the curator of the playlist.', 2392 }, 2393 curatorAvatarUrl: { 2394 - type: 'string', 2395 - description: 'The URL of the avatar image of the curator.', 2396 - format: 'uri', 2397 }, 2398 description: { 2399 - type: 'string', 2400 - description: 'A description of the playlist.', 2401 }, 2402 coverImageUrl: { 2403 - type: 'string', 2404 - description: 'The URL of the cover image for the playlist.', 2405 - format: 'uri', 2406 }, 2407 createdAt: { 2408 - type: 'string', 2409 - description: 'The date and time when the playlist was created.', 2410 - format: 'datetime', 2411 }, 2412 trackCount: { 2413 - type: 'integer', 2414 - description: 'The number of tracks in the playlist.', 2415 minimum: 0, 2416 }, 2417 }, ··· 2420 }, 2421 AppRockskyPlaylistGetPlaylist: { 2422 lexicon: 1, 2423 - id: 'app.rocksky.playlist.getPlaylist', 2424 defs: { 2425 main: { 2426 - type: 'query', 2427 - description: 'Retrieve a playlist by its ID', 2428 parameters: { 2429 - type: 'params', 2430 - required: ['uri'], 2431 properties: { 2432 uri: { 2433 - type: 'string', 2434 - description: 'The URI of the playlist to retrieve.', 2435 - format: 'at-uri', 2436 }, 2437 }, 2438 }, 2439 output: { 2440 - encoding: 'application/json', 2441 schema: { 2442 - type: 'ref', 2443 - ref: 'lex:app.rocksky.playlist.defs#playlistViewDetailed', 2444 }, 2445 }, 2446 }, ··· 2448 }, 2449 AppRockskyPlaylistGetPlaylists: { 2450 lexicon: 1, 2451 - id: 'app.rocksky.playlist.getPlaylists', 2452 defs: { 2453 main: { 2454 - type: 'query', 2455 - description: 'Retrieve a list of playlists', 2456 parameters: { 2457 - type: 'params', 2458 properties: { 2459 limit: { 2460 - type: 'integer', 2461 - description: 'The maximum number of playlists to return.', 2462 }, 2463 offset: { 2464 - type: 'integer', 2465 description: 2466 - 'The offset for pagination, used to skip a number of playlists.', 2467 }, 2468 }, 2469 }, 2470 output: { 2471 - encoding: 'application/json', 2472 schema: { 2473 - type: 'object', 2474 properties: { 2475 playlists: { 2476 - type: 'array', 2477 items: { 2478 - type: 'ref', 2479 - ref: 'lex:app.rocksky.playlist.defs#playlistViewBasic', 2480 }, 2481 }, 2482 }, ··· 2487 }, 2488 AppRockskyPlaylistInsertDirectory: { 2489 lexicon: 1, 2490 - id: 'app.rocksky.playlist.insertDirectory', 2491 defs: { 2492 main: { 2493 - type: 'procedure', 2494 - description: 'Insert a directory into a playlist', 2495 parameters: { 2496 - type: 'params', 2497 - required: ['uri', 'directory'], 2498 properties: { 2499 uri: { 2500 - type: 'string', 2501 - description: 'The URI of the playlist to start', 2502 - format: 'at-uri', 2503 }, 2504 directory: { 2505 - type: 'string', 2506 - description: 'The directory (id) to insert into the playlist', 2507 }, 2508 position: { 2509 - type: 'integer', 2510 description: 2511 - 'The position in the playlist to insert the directory at, if not specified, the directory will be appended', 2512 }, 2513 }, 2514 }, ··· 2517 }, 2518 AppRockskyPlaylistInsertFiles: { 2519 lexicon: 1, 2520 - id: 'app.rocksky.playlist.insertFiles', 2521 defs: { 2522 main: { 2523 - type: 'procedure', 2524 - description: 'Insert files into a playlist', 2525 parameters: { 2526 - type: 'params', 2527 - required: ['uri', 'files'], 2528 properties: { 2529 uri: { 2530 - type: 'string', 2531 - description: 'The URI of the playlist to start', 2532 - format: 'at-uri', 2533 }, 2534 files: { 2535 - type: 'array', 2536 items: { 2537 - type: 'string', 2538 - description: 'List of file (id) to insert into the playlist', 2539 }, 2540 }, 2541 position: { 2542 - type: 'integer', 2543 description: 2544 - 'The position in the playlist to insert the files at, if not specified, files will be appended', 2545 }, 2546 }, 2547 }, ··· 2550 }, 2551 AppRockskyPlaylist: { 2552 lexicon: 1, 2553 - id: 'app.rocksky.playlist', 2554 defs: { 2555 main: { 2556 - type: 'record', 2557 - description: 'A declaration of a playlist.', 2558 - key: 'tid', 2559 record: { 2560 - type: 'object', 2561 - required: ['name', 'createdAt'], 2562 properties: { 2563 name: { 2564 - type: 'string', 2565 - description: 'The name of the playlist.', 2566 minLength: 1, 2567 maxLength: 512, 2568 }, 2569 description: { 2570 - type: 'string', 2571 - description: 'The playlist description.', 2572 minLength: 1, 2573 maxLength: 256, 2574 }, 2575 picture: { 2576 - type: 'blob', 2577 - description: 'The picture of the playlist.', 2578 - accept: ['image/png', 'image/jpeg'], 2579 maxSize: 2000000, 2580 }, 2581 tracks: { 2582 - type: 'array', 2583 - description: 'The tracks in the playlist.', 2584 items: { 2585 - type: 'ref', 2586 - ref: 'lex:app.rocksky.song#record', 2587 }, 2588 }, 2589 createdAt: { 2590 - type: 'string', 2591 - description: 'The date the playlist was created.', 2592 - format: 'datetime', 2593 }, 2594 spotifyLink: { 2595 - type: 'string', 2596 - description: 'The Spotify link of the playlist.', 2597 }, 2598 tidalLink: { 2599 - type: 'string', 2600 - description: 'The Tidal link of the playlist.', 2601 }, 2602 youtubeLink: { 2603 - type: 'string', 2604 - description: 'The YouTube link of the playlist.', 2605 }, 2606 appleMusicLink: { 2607 - type: 'string', 2608 - description: 'The Apple Music link of the playlist.', 2609 }, 2610 }, 2611 }, ··· 2614 }, 2615 AppRockskyPlaylistRemovePlaylist: { 2616 lexicon: 1, 2617 - id: 'app.rocksky.playlist.removePlaylist', 2618 defs: { 2619 main: { 2620 - type: 'procedure', 2621 - description: 'Remove a playlist', 2622 parameters: { 2623 - type: 'params', 2624 - required: ['uri'], 2625 properties: { 2626 uri: { 2627 - type: 'string', 2628 - description: 'The URI of the playlist to remove', 2629 - format: 'at-uri', 2630 }, 2631 }, 2632 }, ··· 2635 }, 2636 AppRockskyPlaylistRemoveTrack: { 2637 lexicon: 1, 2638 - id: 'app.rocksky.playlist.removeTrack', 2639 defs: { 2640 main: { 2641 - type: 'procedure', 2642 - description: 'Remove a track from a playlist', 2643 parameters: { 2644 - type: 'params', 2645 - required: ['uri', 'position'], 2646 properties: { 2647 uri: { 2648 - type: 'string', 2649 - description: 'The URI of the playlist to remove the track from', 2650 - format: 'at-uri', 2651 }, 2652 position: { 2653 - type: 'integer', 2654 description: 2655 - 'The position of the track to remove in the playlist', 2656 }, 2657 }, 2658 }, ··· 2661 }, 2662 AppRockskyPlaylistStartPlaylist: { 2663 lexicon: 1, 2664 - id: 'app.rocksky.playlist.startPlaylist', 2665 defs: { 2666 main: { 2667 - type: 'procedure', 2668 - description: 'Start a playlist', 2669 parameters: { 2670 - type: 'params', 2671 - required: ['uri'], 2672 properties: { 2673 uri: { 2674 - type: 'string', 2675 - description: 'The URI of the playlist to start', 2676 - format: 'at-uri', 2677 }, 2678 shuffle: { 2679 - type: 'boolean', 2680 - description: 'Whether to shuffle the playlist when starting it', 2681 }, 2682 position: { 2683 - type: 'integer', 2684 description: 2685 - 'The position in the playlist to start from, if not specified, starts from the beginning', 2686 }, 2687 }, 2688 }, ··· 2691 }, 2692 AppRockskyRadioDefs: { 2693 lexicon: 1, 2694 - id: 'app.rocksky.radio.defs', 2695 defs: { 2696 radioViewBasic: { 2697 - type: 'object', 2698 properties: { 2699 id: { 2700 - type: 'string', 2701 - description: 'The unique identifier of the radio.', 2702 }, 2703 name: { 2704 - type: 'string', 2705 - description: 'The name of the radio.', 2706 }, 2707 description: { 2708 - type: 'string', 2709 - description: 'A brief description of the radio.', 2710 }, 2711 createdAt: { 2712 - type: 'string', 2713 - description: 'The date and time when the radio was created.', 2714 - format: 'datetime', 2715 }, 2716 }, 2717 }, 2718 radioViewDetailed: { 2719 - type: 'object', 2720 properties: { 2721 id: { 2722 - type: 'string', 2723 - description: 'The unique identifier of the radio.', 2724 }, 2725 name: { 2726 - type: 'string', 2727 - description: 'The name of the radio.', 2728 }, 2729 description: { 2730 - type: 'string', 2731 - description: 'A brief description of the radio.', 2732 }, 2733 website: { 2734 - type: 'string', 2735 - description: 'The website of the radio.', 2736 - format: 'uri', 2737 }, 2738 url: { 2739 - type: 'string', 2740 - description: 'The streaming URL of the radio.', 2741 - format: 'uri', 2742 }, 2743 genre: { 2744 - type: 'string', 2745 - description: 'The genre of the radio.', 2746 }, 2747 logo: { 2748 - type: 'string', 2749 - description: 'The logo of the radio station.', 2750 }, 2751 createdAt: { 2752 - type: 'string', 2753 - description: 'The date and time when the radio was created.', 2754 - format: 'datetime', 2755 }, 2756 }, 2757 }, ··· 2759 }, 2760 AppRockskyRadio: { 2761 lexicon: 1, 2762 - id: 'app.rocksky.radio', 2763 defs: { 2764 main: { 2765 - type: 'record', 2766 - description: 'A declaration of a radio station.', 2767 - key: 'tid', 2768 record: { 2769 - type: 'object', 2770 - required: ['name', 'url', 'createdAt'], 2771 properties: { 2772 name: { 2773 - type: 'string', 2774 - description: 'The name of the radio station.', 2775 minLength: 1, 2776 maxLength: 512, 2777 }, 2778 url: { 2779 - type: 'string', 2780 - description: 'The URL of the radio station.', 2781 - format: 'uri', 2782 }, 2783 description: { 2784 - type: 'string', 2785 - description: 'A description of the radio station.', 2786 minLength: 1, 2787 maxLength: 1000, 2788 }, 2789 genre: { 2790 - type: 'string', 2791 - description: 'The genre of the radio station.', 2792 minLength: 1, 2793 maxLength: 256, 2794 }, 2795 logo: { 2796 - type: 'blob', 2797 - description: 'The logo of the radio station.', 2798 - accept: ['image/png', 'image/jpeg'], 2799 maxSize: 2000000, 2800 }, 2801 website: { 2802 - type: 'string', 2803 - description: 'The website of the radio station.', 2804 - format: 'uri', 2805 }, 2806 createdAt: { 2807 - type: 'string', 2808 - description: 'The date when the radio station was created.', 2809 - format: 'datetime', 2810 }, 2811 }, 2812 }, ··· 2815 }, 2816 AppRockskyScrobbleCreateScrobble: { 2817 lexicon: 1, 2818 - id: 'app.rocksky.scrobble.createScrobble', 2819 defs: { 2820 main: { 2821 - type: 'procedure', 2822 - description: 'Create a new scrobble', 2823 input: { 2824 - encoding: 'application/json', 2825 schema: { 2826 - type: 'object', 2827 - required: ['title', 'artist'], 2828 properties: { 2829 title: { 2830 - type: 'string', 2831 - description: 'The title of the track being scrobbled', 2832 }, 2833 artist: { 2834 - type: 'string', 2835 - description: 'The artist of the track being scrobbled', 2836 }, 2837 album: { 2838 - type: 'string', 2839 - description: 'The album of the track being scrobbled', 2840 }, 2841 duration: { 2842 - type: 'integer', 2843 - description: 'The duration of the track in seconds', 2844 }, 2845 mbId: { 2846 - type: 'string', 2847 - description: 'The MusicBrainz ID of the track, if available', 2848 }, 2849 albumArt: { 2850 - type: 'string', 2851 - description: 'The URL of the album art for the track', 2852 - format: 'uri', 2853 }, 2854 trackNumber: { 2855 - type: 'integer', 2856 - description: 'The track number of the track in the album', 2857 }, 2858 releaseDate: { 2859 - type: 'string', 2860 description: 2861 - 'The release date of the track, formatted as YYYY-MM-DD', 2862 }, 2863 year: { 2864 - type: 'integer', 2865 - description: 'The year the track was released', 2866 }, 2867 discNumber: { 2868 - type: 'integer', 2869 description: 2870 - 'The disc number of the track in the album, if applicable', 2871 }, 2872 lyrics: { 2873 - type: 'string', 2874 - description: 'The lyrics of the track, if available', 2875 }, 2876 composer: { 2877 - type: 'string', 2878 - description: 'The composer of the track, if available', 2879 }, 2880 copyrightMessage: { 2881 - type: 'string', 2882 description: 2883 - 'The copyright message for the track, if available', 2884 }, 2885 label: { 2886 - type: 'string', 2887 - description: 'The record label of the track, if available', 2888 }, 2889 artistPicture: { 2890 - type: 'string', 2891 description: "The URL of the artist's picture, if available", 2892 - format: 'uri', 2893 }, 2894 spotifyLink: { 2895 - type: 'string', 2896 - description: 'The Spotify link for the track, if available', 2897 - format: 'uri', 2898 }, 2899 lastfmLink: { 2900 - type: 'string', 2901 - description: 'The Last.fm link for the track, if available', 2902 - format: 'uri', 2903 }, 2904 tidalLink: { 2905 - type: 'string', 2906 - description: 'The Tidal link for the track, if available', 2907 - format: 'uri', 2908 }, 2909 appleMusicLink: { 2910 - type: 'string', 2911 - description: 'The Apple Music link for the track, if available', 2912 - format: 'uri', 2913 }, 2914 youtubeLink: { 2915 - type: 'string', 2916 - description: 'The Youtube link for the track, if available', 2917 - format: 'uri', 2918 }, 2919 deezerLink: { 2920 - type: 'string', 2921 - description: 'The Deezer link for the track, if available', 2922 - format: 'uri', 2923 }, 2924 timestamp: { 2925 - type: 'integer', 2926 description: 2927 - 'The timestamp of the scrobble in milliseconds since epoch', 2928 }, 2929 }, 2930 }, 2931 }, 2932 output: { 2933 - encoding: 'application/json', 2934 schema: { 2935 - type: 'ref', 2936 - ref: 'lex:app.rocksky.scrobble.defs#scrobbleViewBasic', 2937 }, 2938 }, 2939 }, ··· 2941 }, 2942 AppRockskyScrobbleDefs: { 2943 lexicon: 1, 2944 - id: 'app.rocksky.scrobble.defs', 2945 defs: { 2946 scrobbleViewBasic: { 2947 - type: 'object', 2948 properties: { 2949 id: { 2950 - type: 'string', 2951 - description: 'The unique identifier of the scrobble.', 2952 }, 2953 user: { 2954 - type: 'string', 2955 - description: 'The handle of the user who created the scrobble.', 2956 }, 2957 userDisplayName: { 2958 - type: 'string', 2959 description: 2960 - 'The display name of the user who created the scrobble.', 2961 }, 2962 userAvatar: { 2963 - type: 'string', 2964 - description: 'The avatar URL of the user who created the scrobble.', 2965 - format: 'uri', 2966 }, 2967 title: { 2968 - type: 'string', 2969 - description: 'The title of the scrobble.', 2970 }, 2971 artist: { 2972 - type: 'string', 2973 - description: 'The artist of the song.', 2974 }, 2975 artistUri: { 2976 - type: 'string', 2977 - description: 'The URI of the artist.', 2978 - format: 'at-uri', 2979 }, 2980 album: { 2981 - type: 'string', 2982 - description: 'The album of the song.', 2983 }, 2984 albumUri: { 2985 - type: 'string', 2986 - description: 'The URI of the album.', 2987 - format: 'at-uri', 2988 }, 2989 cover: { 2990 - type: 'string', 2991 - description: 'The album art URL of the song.', 2992 - format: 'uri', 2993 }, 2994 date: { 2995 - type: 'string', 2996 - description: 'The timestamp when the scrobble was created.', 2997 - format: 'datetime', 2998 }, 2999 uri: { 3000 - type: 'string', 3001 - description: 'The URI of the scrobble.', 3002 - format: 'uri', 3003 }, 3004 sha256: { 3005 - type: 'string', 3006 - description: 'The SHA256 hash of the scrobble data.', 3007 }, 3008 }, 3009 }, 3010 scrobbleViewDetailed: { 3011 - type: 'object', 3012 properties: { 3013 id: { 3014 - type: 'string', 3015 - description: 'The unique identifier of the scrobble.', 3016 }, 3017 user: { 3018 - type: 'string', 3019 - description: 'The handle of the user who created the scrobble.', 3020 }, 3021 title: { 3022 - type: 'string', 3023 - description: 'The title of the scrobble.', 3024 }, 3025 artist: { 3026 - type: 'string', 3027 - description: 'The artist of the song.', 3028 }, 3029 artistUri: { 3030 - type: 'string', 3031 - description: 'The URI of the artist.', 3032 - format: 'at-uri', 3033 }, 3034 album: { 3035 - type: 'string', 3036 - description: 'The album of the song.', 3037 }, 3038 albumUri: { 3039 - type: 'string', 3040 - description: 'The URI of the album.', 3041 - format: 'at-uri', 3042 }, 3043 cover: { 3044 - type: 'string', 3045 - description: 'The album art URL of the song.', 3046 - format: 'uri', 3047 }, 3048 date: { 3049 - type: 'string', 3050 - description: 'The timestamp when the scrobble was created.', 3051 - format: 'datetime', 3052 }, 3053 uri: { 3054 - type: 'string', 3055 - description: 'The URI of the scrobble.', 3056 - format: 'uri', 3057 }, 3058 sha256: { 3059 - type: 'string', 3060 - description: 'The SHA256 hash of the scrobble data.', 3061 }, 3062 listeners: { 3063 - type: 'integer', 3064 - description: 'The number of listeners', 3065 }, 3066 scrobbles: { 3067 - type: 'integer', 3068 - description: 'The number of scrobbles for this song', 3069 }, 3070 }, 3071 }, ··· 3073 }, 3074 AppRockskyScrobbleGetScrobble: { 3075 lexicon: 1, 3076 - id: 'app.rocksky.scrobble.getScrobble', 3077 defs: { 3078 main: { 3079 - type: 'query', 3080 - description: 'Get a scrobble by its unique identifier', 3081 parameters: { 3082 - type: 'params', 3083 - required: ['uri'], 3084 properties: { 3085 uri: { 3086 - type: 'string', 3087 - description: 'The unique identifier of the scrobble', 3088 - format: 'at-uri', 3089 }, 3090 }, 3091 }, 3092 output: { 3093 - encoding: 'application/json', 3094 schema: { 3095 - type: 'ref', 3096 - ref: 'lex:app.rocksky.scrobble.defs#scrobbleViewDetailed', 3097 }, 3098 }, 3099 }, ··· 3101 }, 3102 AppRockskyScrobbleGetScrobbles: { 3103 lexicon: 1, 3104 - id: 'app.rocksky.scrobble.getScrobbles', 3105 defs: { 3106 main: { 3107 - type: 'query', 3108 - description: 'Get scrobbles all scrobbles', 3109 parameters: { 3110 - type: 'params', 3111 properties: { 3112 did: { 3113 - type: 'string', 3114 - description: 'The DID or handle of the actor', 3115 - format: 'at-identifier', 3116 }, 3117 limit: { 3118 - type: 'integer', 3119 - description: 'The maximum number of scrobbles to return', 3120 minimum: 1, 3121 }, 3122 offset: { 3123 - type: 'integer', 3124 - description: 'The offset for pagination', 3125 minimum: 0, 3126 }, 3127 }, 3128 }, 3129 output: { 3130 - encoding: 'application/json', 3131 schema: { 3132 - type: 'object', 3133 properties: { 3134 scrobbles: { 3135 - type: 'array', 3136 items: { 3137 - type: 'ref', 3138 - ref: 'lex:app.rocksky.scrobble.defs#scrobbleViewBasic', 3139 }, 3140 }, 3141 }, ··· 3146 }, 3147 AppRockskyScrobble: { 3148 lexicon: 1, 3149 - id: 'app.rocksky.scrobble', 3150 defs: { 3151 main: { 3152 - type: 'record', 3153 - description: 'A declaration of a scrobble.', 3154 - key: 'tid', 3155 record: { 3156 - type: 'object', 3157 required: [ 3158 - 'title', 3159 - 'artist', 3160 - 'album', 3161 - 'albumArtist', 3162 - 'duration', 3163 - 'createdAt', 3164 ], 3165 properties: { 3166 title: { 3167 - type: 'string', 3168 - description: 'The title of the song.', 3169 minLength: 1, 3170 maxLength: 512, 3171 }, 3172 artist: { 3173 - type: 'string', 3174 - description: 'The artist of the song.', 3175 minLength: 1, 3176 maxLength: 256, 3177 }, 3178 albumArtist: { 3179 - type: 'string', 3180 - description: 'The album artist of the song.', 3181 minLength: 1, 3182 maxLength: 256, 3183 }, 3184 album: { 3185 - type: 'string', 3186 - description: 'The album of the song.', 3187 minLength: 1, 3188 maxLength: 256, 3189 }, 3190 duration: { 3191 - type: 'integer', 3192 - description: 'The duration of the song in seconds.', 3193 minimum: 1, 3194 }, 3195 trackNumber: { 3196 - type: 'integer', 3197 - description: 'The track number of the song in the album.', 3198 minimum: 1, 3199 }, 3200 discNumber: { 3201 - type: 'integer', 3202 - description: 'The disc number of the song in the album.', 3203 minimum: 1, 3204 }, 3205 releaseDate: { 3206 - type: 'string', 3207 - description: 'The release date of the song.', 3208 - format: 'datetime', 3209 }, 3210 year: { 3211 - type: 'integer', 3212 - description: 'The year the song was released.', 3213 }, 3214 genre: { 3215 - type: 'string', 3216 - description: 'The genre of the song.', 3217 maxLength: 256, 3218 }, 3219 tags: { 3220 - type: 'array', 3221 - description: 'The tags of the song.', 3222 items: { 3223 - type: 'string', 3224 minLength: 1, 3225 maxLength: 256, 3226 }, 3227 }, 3228 composer: { 3229 - type: 'string', 3230 - description: 'The composer of the song.', 3231 maxLength: 256, 3232 }, 3233 lyrics: { 3234 - type: 'string', 3235 - description: 'The lyrics of the song.', 3236 maxLength: 10000, 3237 }, 3238 copyrightMessage: { 3239 - type: 'string', 3240 - description: 'The copyright message of the song.', 3241 maxLength: 256, 3242 }, 3243 wiki: { 3244 - type: 'string', 3245 - description: 'Informations about the song', 3246 maxLength: 10000, 3247 }, 3248 albumArt: { 3249 - type: 'blob', 3250 - description: 'The album art of the song.', 3251 - accept: ['image/png', 'image/jpeg'], 3252 maxSize: 2000000, 3253 }, 3254 youtubeLink: { 3255 - type: 'string', 3256 - description: 'The YouTube link of the song.', 3257 - format: 'uri', 3258 }, 3259 spotifyLink: { 3260 - type: 'string', 3261 - description: 'The Spotify link of the song.', 3262 - format: 'uri', 3263 }, 3264 tidalLink: { 3265 - type: 'string', 3266 - description: 'The Tidal link of the song.', 3267 - format: 'uri', 3268 }, 3269 appleMusicLink: { 3270 - type: 'string', 3271 - description: 'The Apple Music link of the song.', 3272 - format: 'uri', 3273 }, 3274 createdAt: { 3275 - type: 'string', 3276 - description: 'The date when the song was created.', 3277 - format: 'datetime', 3278 }, 3279 mbid: { 3280 - type: 'string', 3281 - description: 'The MusicBrainz ID of the song.', 3282 }, 3283 label: { 3284 - type: 'string', 3285 - description: 'The label of the song.', 3286 maxLength: 256, 3287 }, 3288 }, ··· 3292 }, 3293 AppRockskyShoutCreateShout: { 3294 lexicon: 1, 3295 - id: 'app.rocksky.shout.createShout', 3296 defs: { 3297 main: { 3298 - type: 'procedure', 3299 - description: 'Create a new shout', 3300 input: { 3301 - encoding: 'application/json', 3302 schema: { 3303 - type: 'object', 3304 properties: { 3305 message: { 3306 - type: 'string', 3307 - description: 'The content of the shout', 3308 minLength: 1, 3309 }, 3310 }, 3311 }, 3312 }, 3313 output: { 3314 - encoding: 'application/json', 3315 schema: { 3316 - type: 'ref', 3317 - ref: 'lex:app.rocksky.shout.defs#shoutView', 3318 }, 3319 }, 3320 }, ··· 3322 }, 3323 AppRockskyShoutDefs: { 3324 lexicon: 1, 3325 - id: 'app.rocksky.shout.defs', 3326 defs: { 3327 author: { 3328 - type: 'object', 3329 properties: { 3330 id: { 3331 - type: 'string', 3332 - description: 'The unique identifier of the author.', 3333 }, 3334 did: { 3335 - type: 'string', 3336 - description: 'The decentralized identifier (DID) of the author.', 3337 - format: 'at-identifier', 3338 }, 3339 handle: { 3340 - type: 'string', 3341 - description: 'The handle of the author.', 3342 - format: 'at-identifier', 3343 }, 3344 displayName: { 3345 - type: 'string', 3346 - description: 'The display name of the author.', 3347 }, 3348 avatar: { 3349 - type: 'string', 3350 description: "The URL of the author's avatar image.", 3351 - format: 'uri', 3352 }, 3353 }, 3354 }, 3355 shoutView: { 3356 - type: 'object', 3357 properties: { 3358 id: { 3359 - type: 'string', 3360 - description: 'The unique identifier of the shout.', 3361 }, 3362 message: { 3363 - type: 'string', 3364 - description: 'The content of the shout.', 3365 }, 3366 parent: { 3367 - type: 'string', 3368 description: 3369 - 'The ID of the parent shout if this is a reply, otherwise null.', 3370 }, 3371 createdAt: { 3372 - type: 'string', 3373 - description: 'The date and time when the shout was created.', 3374 - format: 'datetime', 3375 }, 3376 author: { 3377 - type: 'ref', 3378 - description: 'The author of the shout.', 3379 - ref: 'lex:app.rocksky.shout.defs#author', 3380 }, 3381 }, 3382 }, ··· 3384 }, 3385 AppRockskyShoutGetAlbumShouts: { 3386 lexicon: 1, 3387 - id: 'app.rocksky.shout.getAlbumShouts', 3388 defs: { 3389 main: { 3390 - type: 'query', 3391 - description: 'Get shouts for an album', 3392 parameters: { 3393 - type: 'params', 3394 - required: ['uri'], 3395 properties: { 3396 uri: { 3397 - type: 'string', 3398 description: 3399 - 'The unique identifier of the album to retrieve shouts for', 3400 - format: 'at-uri', 3401 }, 3402 limit: { 3403 - type: 'integer', 3404 - description: 'The maximum number of shouts to return', 3405 minimum: 1, 3406 }, 3407 offset: { 3408 - type: 'integer', 3409 description: 3410 - 'The number of shouts to skip before starting to collect the result set', 3411 minimum: 0, 3412 }, 3413 }, 3414 }, 3415 output: { 3416 - encoding: 'application/json', 3417 schema: { 3418 - type: 'object', 3419 properties: { 3420 shouts: { 3421 - type: 'array', 3422 items: { 3423 - type: 'ref', 3424 - ref: 'lex:app.rocksky.shout.defs#shoutViewBasic', 3425 }, 3426 }, 3427 }, ··· 3432 }, 3433 AppRockskyShoutGetArtistShouts: { 3434 lexicon: 1, 3435 - id: 'app.rocksky.shout.getArtistShouts', 3436 defs: { 3437 main: { 3438 - type: 'query', 3439 - description: 'Get shouts for an artist', 3440 parameters: { 3441 - type: 'params', 3442 - required: ['uri'], 3443 properties: { 3444 uri: { 3445 - type: 'string', 3446 - description: 'The URI of the artist to retrieve shouts for', 3447 - format: 'at-uri', 3448 }, 3449 limit: { 3450 - type: 'integer', 3451 - description: 'The maximum number of shouts to return', 3452 minimum: 1, 3453 }, 3454 offset: { 3455 - type: 'integer', 3456 description: 3457 - 'The number of shouts to skip before starting to collect the result set', 3458 minimum: 0, 3459 }, 3460 }, 3461 }, 3462 output: { 3463 - encoding: 'application/json', 3464 schema: { 3465 - type: 'object', 3466 properties: { 3467 shouts: { 3468 - type: 'array', 3469 items: { 3470 - type: 'ref', 3471 - ref: 'lex:app.rocksky.shout.defs#shoutViewBasic', 3472 }, 3473 }, 3474 }, ··· 3479 }, 3480 AppRockskyShoutGetProfileShouts: { 3481 lexicon: 1, 3482 - id: 'app.rocksky.shout.getProfileShouts', 3483 defs: { 3484 main: { 3485 - type: 'query', 3486 description: "Get the shouts of an actor's profile", 3487 parameters: { 3488 - type: 'params', 3489 - required: ['did'], 3490 properties: { 3491 did: { 3492 - type: 'string', 3493 - description: 'The DID or handle of the actor', 3494 - format: 'at-identifier', 3495 }, 3496 offset: { 3497 - type: 'integer', 3498 - description: 'The offset for pagination', 3499 minimum: 0, 3500 }, 3501 limit: { 3502 - type: 'integer', 3503 - description: 'The maximum number of shouts to return', 3504 minimum: 1, 3505 }, 3506 }, 3507 }, 3508 output: { 3509 - encoding: 'application/json', 3510 schema: { 3511 - type: 'object', 3512 properties: { 3513 shouts: { 3514 - type: 'array', 3515 items: { 3516 - type: 'ref', 3517 - ref: 'lex:app.rocksky.shout.defs#shoutViewBasic', 3518 }, 3519 }, 3520 }, ··· 3525 }, 3526 AppRockskyShoutGetShoutReplies: { 3527 lexicon: 1, 3528 - id: 'app.rocksky.shout.getShoutReplies', 3529 defs: { 3530 main: { 3531 - type: 'query', 3532 - description: 'Get replies to a shout', 3533 parameters: { 3534 - type: 'params', 3535 - required: ['uri'], 3536 properties: { 3537 uri: { 3538 - type: 'string', 3539 - description: 'The URI of the shout to retrieve replies for', 3540 - format: 'at-uri', 3541 }, 3542 limit: { 3543 - type: 'integer', 3544 - description: 'The maximum number of shouts to return', 3545 minimum: 1, 3546 }, 3547 offset: { 3548 - type: 'integer', 3549 description: 3550 - 'The number of shouts to skip before starting to collect the result set', 3551 minimum: 0, 3552 }, 3553 }, 3554 }, 3555 output: { 3556 - encoding: 'application/json', 3557 schema: { 3558 - type: 'object', 3559 properties: { 3560 shouts: { 3561 - type: 'array', 3562 items: { 3563 - type: 'ref', 3564 - ref: 'lex:app.rocksky.shout.defs#shoutViewBasic', 3565 }, 3566 }, 3567 }, ··· 3572 }, 3573 AppRockskyShoutGetTrackShouts: { 3574 lexicon: 1, 3575 - id: 'app.rocksky.shout.getTrackShouts', 3576 defs: { 3577 main: { 3578 - type: 'query', 3579 - description: 'Get all shouts for a specific track', 3580 parameters: { 3581 - type: 'params', 3582 - required: ['uri'], 3583 properties: { 3584 uri: { 3585 - type: 'string', 3586 - description: 'The URI of the track to retrieve shouts for', 3587 - format: 'at-uri', 3588 }, 3589 }, 3590 }, 3591 output: { 3592 - encoding: 'application/json', 3593 schema: { 3594 - type: 'object', 3595 properties: { 3596 shouts: { 3597 - type: 'array', 3598 items: { 3599 - type: 'ref', 3600 - ref: 'lex:app.rocksky.shout.defs#shoutViewBasic', 3601 }, 3602 }, 3603 }, ··· 3608 }, 3609 AppRockskyShoutRemoveShout: { 3610 lexicon: 1, 3611 - id: 'app.rocksky.shout.removeShout', 3612 defs: { 3613 main: { 3614 - type: 'procedure', 3615 - description: 'Remove a shout by its ID', 3616 parameters: { 3617 - type: 'params', 3618 - required: ['id'], 3619 properties: { 3620 id: { 3621 - type: 'string', 3622 - description: 'The ID of the shout to be removed', 3623 }, 3624 }, 3625 }, 3626 output: { 3627 - encoding: 'application/json', 3628 schema: { 3629 - type: 'ref', 3630 - ref: 'lex:app.rocksky.shout.defs#shoutView', 3631 }, 3632 }, 3633 }, ··· 3635 }, 3636 AppRockskyShoutReplyShout: { 3637 lexicon: 1, 3638 - id: 'app.rocksky.shout.replyShout', 3639 defs: { 3640 main: { 3641 - type: 'procedure', 3642 - description: 'Reply to a shout', 3643 input: { 3644 - encoding: 'application/json', 3645 schema: { 3646 - type: 'object', 3647 - required: ['shoutId', 'message'], 3648 properties: { 3649 shoutId: { 3650 - type: 'string', 3651 - description: 'The unique identifier of the shout to reply to', 3652 }, 3653 message: { 3654 - type: 'string', 3655 - description: 'The content of the reply', 3656 minLength: 1, 3657 }, 3658 }, 3659 }, 3660 }, 3661 output: { 3662 - encoding: 'application/json', 3663 schema: { 3664 - type: 'ref', 3665 - ref: 'lex:app.rocksky.shout.defs#shoutView', 3666 }, 3667 }, 3668 }, ··· 3670 }, 3671 AppRockskyShoutReportShout: { 3672 lexicon: 1, 3673 - id: 'app.rocksky.shout.reportShout', 3674 defs: { 3675 main: { 3676 - type: 'procedure', 3677 - description: 'Report a shout for moderation', 3678 input: { 3679 - encoding: 'application/json', 3680 schema: { 3681 - type: 'object', 3682 - required: ['shoutId'], 3683 properties: { 3684 shoutId: { 3685 - type: 'string', 3686 - description: 'The unique identifier of the shout to report', 3687 }, 3688 reason: { 3689 - type: 'string', 3690 - description: 'The reason for reporting the shout', 3691 minLength: 1, 3692 }, 3693 }, 3694 }, 3695 }, 3696 output: { 3697 - encoding: 'application/json', 3698 schema: { 3699 - type: 'ref', 3700 - ref: 'lex:app.rocksky.shout.defs#shoutView', 3701 }, 3702 }, 3703 }, ··· 3705 }, 3706 AppRockskyShout: { 3707 lexicon: 1, 3708 - id: 'app.rocksky.shout', 3709 defs: { 3710 main: { 3711 - type: 'record', 3712 - description: 'A declaration of a shout.', 3713 - key: 'tid', 3714 record: { 3715 - type: 'object', 3716 - required: ['message', 'createdAt', 'subject'], 3717 properties: { 3718 message: { 3719 - type: 'string', 3720 - description: 'The message of the shout.', 3721 minLength: 1, 3722 maxLength: 1000, 3723 }, 3724 createdAt: { 3725 - type: 'string', 3726 - description: 'The date when the shout was created.', 3727 - format: 'datetime', 3728 }, 3729 parent: { 3730 - type: 'ref', 3731 - ref: 'lex:com.atproto.repo.strongRef', 3732 }, 3733 subject: { 3734 - type: 'ref', 3735 - ref: 'lex:com.atproto.repo.strongRef', 3736 }, 3737 }, 3738 }, ··· 3741 }, 3742 AppRockskySongCreateSong: { 3743 lexicon: 1, 3744 - id: 'app.rocksky.song.createSong', 3745 defs: { 3746 main: { 3747 - type: 'procedure', 3748 - description: 'Create a new song', 3749 input: { 3750 - encoding: 'application/json', 3751 schema: { 3752 - type: 'object', 3753 - required: ['title', 'artist', 'album', 'albumArtist'], 3754 properties: { 3755 title: { 3756 - type: 'string', 3757 - description: 'The title of the song', 3758 }, 3759 artist: { 3760 - type: 'string', 3761 - description: 'The artist of the song', 3762 }, 3763 albumArtist: { 3764 - type: 'string', 3765 description: 3766 - 'The album artist of the song, if different from the main artist', 3767 }, 3768 album: { 3769 - type: 'string', 3770 - description: 'The album of the song, if applicable', 3771 }, 3772 duration: { 3773 - type: 'integer', 3774 - description: 'The duration of the song in seconds', 3775 }, 3776 mbId: { 3777 - type: 'string', 3778 - description: 'The MusicBrainz ID of the song, if available', 3779 }, 3780 albumArt: { 3781 - type: 'string', 3782 - description: 'The URL of the album art for the song', 3783 - format: 'uri', 3784 }, 3785 trackNumber: { 3786 - type: 'integer', 3787 description: 3788 - 'The track number of the song in the album, if applicable', 3789 }, 3790 releaseDate: { 3791 - type: 'string', 3792 description: 3793 - 'The release date of the song, formatted as YYYY-MM-DD', 3794 }, 3795 year: { 3796 - type: 'integer', 3797 - description: 'The year the song was released', 3798 }, 3799 discNumber: { 3800 - type: 'integer', 3801 description: 3802 - 'The disc number of the song in the album, if applicable', 3803 }, 3804 lyrics: { 3805 - type: 'string', 3806 - description: 'The lyrics of the song, if available', 3807 }, 3808 }, 3809 }, 3810 }, 3811 output: { 3812 - encoding: 'application/json', 3813 schema: { 3814 - type: 'ref', 3815 - ref: 'lex:app.rocksky.song.defs#songViewDetailed', 3816 }, 3817 }, 3818 }, ··· 3820 }, 3821 AppRockskySongDefs: { 3822 lexicon: 1, 3823 - id: 'app.rocksky.song.defs', 3824 defs: { 3825 songViewBasic: { 3826 - type: 'object', 3827 properties: { 3828 id: { 3829 - type: 'string', 3830 - description: 'The unique identifier of the song.', 3831 }, 3832 title: { 3833 - type: 'string', 3834 - description: 'The title of the song.', 3835 }, 3836 artist: { 3837 - type: 'string', 3838 - description: 'The artist of the song.', 3839 }, 3840 albumArtist: { 3841 - type: 'string', 3842 - description: 'The artist of the album the song belongs to.', 3843 }, 3844 albumArt: { 3845 - type: 'string', 3846 - description: 'The URL of the album art image.', 3847 - format: 'uri', 3848 }, 3849 uri: { 3850 - type: 'string', 3851 - description: 'The URI of the song.', 3852 - format: 'at-uri', 3853 }, 3854 album: { 3855 - type: 'string', 3856 - description: 'The album of the song.', 3857 }, 3858 duration: { 3859 - type: 'integer', 3860 - description: 'The duration of the song in milliseconds.', 3861 }, 3862 trackNumber: { 3863 - type: 'integer', 3864 - description: 'The track number of the song in the album.', 3865 }, 3866 discNumber: { 3867 - type: 'integer', 3868 - description: 'The disc number of the song in the album.', 3869 }, 3870 playCount: { 3871 - type: 'integer', 3872 - description: 'The number of times the song has been played.', 3873 minimum: 0, 3874 }, 3875 uniqueListeners: { 3876 - type: 'integer', 3877 description: 3878 - 'The number of unique listeners who have played the song.', 3879 minimum: 0, 3880 }, 3881 albumUri: { 3882 - type: 'string', 3883 - description: 'The URI of the album the song belongs to.', 3884 - format: 'at-uri', 3885 }, 3886 artistUri: { 3887 - type: 'string', 3888 - description: 'The URI of the artist of the song.', 3889 - format: 'at-uri', 3890 }, 3891 sha256: { 3892 - type: 'string', 3893 - description: 'The SHA256 hash of the song.', 3894 }, 3895 createdAt: { 3896 - type: 'string', 3897 - description: 'The timestamp when the song was created.', 3898 - format: 'datetime', 3899 }, 3900 }, 3901 }, 3902 songViewDetailed: { 3903 - type: 'object', 3904 properties: { 3905 id: { 3906 - type: 'string', 3907 - description: 'The unique identifier of the song.', 3908 }, 3909 title: { 3910 - type: 'string', 3911 - description: 'The title of the song.', 3912 }, 3913 artist: { 3914 - type: 'string', 3915 - description: 'The artist of the song.', 3916 }, 3917 albumArtist: { 3918 - type: 'string', 3919 - description: 'The artist of the album the song belongs to.', 3920 }, 3921 albumArt: { 3922 - type: 'string', 3923 - description: 'The URL of the album art image.', 3924 - format: 'uri', 3925 }, 3926 uri: { 3927 - type: 'string', 3928 - description: 'The URI of the song.', 3929 - format: 'at-uri', 3930 }, 3931 album: { 3932 - type: 'string', 3933 - description: 'The album of the song.', 3934 }, 3935 duration: { 3936 - type: 'integer', 3937 - description: 'The duration of the song in milliseconds.', 3938 }, 3939 trackNumber: { 3940 - type: 'integer', 3941 - description: 'The track number of the song in the album.', 3942 }, 3943 discNumber: { 3944 - type: 'integer', 3945 - description: 'The disc number of the song in the album.', 3946 }, 3947 playCount: { 3948 - type: 'integer', 3949 - description: 'The number of times the song has been played.', 3950 minimum: 0, 3951 }, 3952 uniqueListeners: { 3953 - type: 'integer', 3954 description: 3955 - 'The number of unique listeners who have played the song.', 3956 minimum: 0, 3957 }, 3958 albumUri: { 3959 - type: 'string', 3960 - description: 'The URI of the album the song belongs to.', 3961 - format: 'at-uri', 3962 }, 3963 artistUri: { 3964 - type: 'string', 3965 - description: 'The URI of the artist of the song.', 3966 - format: 'at-uri', 3967 }, 3968 sha256: { 3969 - type: 'string', 3970 - description: 'The SHA256 hash of the song.', 3971 }, 3972 createdAt: { 3973 - type: 'string', 3974 - description: 'The timestamp when the song was created.', 3975 - format: 'datetime', 3976 }, 3977 }, 3978 }, ··· 3980 }, 3981 AppRockskySongGetSong: { 3982 lexicon: 1, 3983 - id: 'app.rocksky.song.getSong', 3984 defs: { 3985 main: { 3986 - type: 'query', 3987 - description: 'Get a song by its uri', 3988 parameters: { 3989 - type: 'params', 3990 - required: ['uri'], 3991 properties: { 3992 uri: { 3993 - type: 'string', 3994 - description: 'The unique identifier of the song to retrieve', 3995 - format: 'at-uri', 3996 }, 3997 }, 3998 }, 3999 output: { 4000 - encoding: 'application/json', 4001 schema: { 4002 - type: 'ref', 4003 - ref: 'lex:app.rocksky.song.defs#songViewDetailed', 4004 }, 4005 }, 4006 }, ··· 4008 }, 4009 AppRockskySongGetSongs: { 4010 lexicon: 1, 4011 - id: 'app.rocksky.song.getSongs', 4012 defs: { 4013 main: { 4014 - type: 'query', 4015 - description: 'Get songs', 4016 parameters: { 4017 - type: 'params', 4018 properties: { 4019 limit: { 4020 - type: 'integer', 4021 - description: 'The maximum number of songs to return', 4022 minimum: 1, 4023 }, 4024 offset: { 4025 - type: 'integer', 4026 - description: 'The offset for pagination', 4027 minimum: 0, 4028 }, 4029 }, 4030 }, 4031 output: { 4032 - encoding: 'application/json', 4033 schema: { 4034 - type: 'object', 4035 properties: { 4036 songs: { 4037 - type: 'array', 4038 items: { 4039 - type: 'ref', 4040 - ref: 'lex:app.rocksky.song.defs#songViewBasic', 4041 }, 4042 }, 4043 }, ··· 4048 }, 4049 AppRockskySong: { 4050 lexicon: 1, 4051 - id: 'app.rocksky.song', 4052 defs: { 4053 main: { 4054 - type: 'record', 4055 - description: 'A declaration of a song.', 4056 - key: 'tid', 4057 record: { 4058 - type: 'object', 4059 required: [ 4060 - 'title', 4061 - 'artist', 4062 - 'album', 4063 - 'albumArtist', 4064 - 'duration', 4065 - 'createdAt', 4066 ], 4067 properties: { 4068 title: { 4069 - type: 'string', 4070 - description: 'The title of the song.', 4071 minLength: 1, 4072 maxLength: 512, 4073 }, 4074 artist: { 4075 - type: 'string', 4076 - description: 'The artist of the song.', 4077 minLength: 1, 4078 maxLength: 256, 4079 }, 4080 albumArtist: { 4081 - type: 'string', 4082 - description: 'The album artist of the song.', 4083 minLength: 1, 4084 maxLength: 256, 4085 }, 4086 album: { 4087 - type: 'string', 4088 - description: 'The album of the song.', 4089 minLength: 1, 4090 maxLength: 256, 4091 }, 4092 duration: { 4093 - type: 'integer', 4094 - description: 'The duration of the song in seconds.', 4095 minimum: 1, 4096 }, 4097 trackNumber: { 4098 - type: 'integer', 4099 - description: 'The track number of the song in the album.', 4100 minimum: 1, 4101 }, 4102 discNumber: { 4103 - type: 'integer', 4104 - description: 'The disc number of the song in the album.', 4105 minimum: 1, 4106 }, 4107 releaseDate: { 4108 - type: 'string', 4109 - description: 'The release date of the song.', 4110 - format: 'datetime', 4111 }, 4112 year: { 4113 - type: 'integer', 4114 - description: 'The year the song was released.', 4115 }, 4116 genre: { 4117 - type: 'string', 4118 - description: 'The genre of the song.', 4119 minLength: 1, 4120 maxLength: 256, 4121 }, 4122 tags: { 4123 - type: 'array', 4124 - description: 'The tags of the song.', 4125 items: { 4126 - type: 'string', 4127 minLength: 1, 4128 maxLength: 256, 4129 }, 4130 }, 4131 composer: { 4132 - type: 'string', 4133 - description: 'The composer of the song.', 4134 maxLength: 256, 4135 }, 4136 lyrics: { 4137 - type: 'string', 4138 - description: 'The lyrics of the song.', 4139 maxLength: 10000, 4140 }, 4141 copyrightMessage: { 4142 - type: 'string', 4143 - description: 'The copyright message of the song.', 4144 maxLength: 256, 4145 }, 4146 wiki: { 4147 - type: 'string', 4148 - description: 'Informations about the song', 4149 maxLength: 10000, 4150 }, 4151 albumArt: { 4152 - type: 'blob', 4153 - description: 'The album art of the song.', 4154 - accept: ['image/png', 'image/jpeg'], 4155 maxSize: 2000000, 4156 }, 4157 youtubeLink: { 4158 - type: 'string', 4159 - description: 'The YouTube link of the song.', 4160 - format: 'uri', 4161 }, 4162 spotifyLink: { 4163 - type: 'string', 4164 - description: 'The Spotify link of the song.', 4165 - format: 'uri', 4166 }, 4167 tidalLink: { 4168 - type: 'string', 4169 - description: 'The Tidal link of the song.', 4170 - format: 'uri', 4171 }, 4172 appleMusicLink: { 4173 - type: 'string', 4174 - description: 'The Apple Music link of the song.', 4175 - format: 'uri', 4176 }, 4177 createdAt: { 4178 - type: 'string', 4179 - description: 'The date when the song was created.', 4180 - format: 'datetime', 4181 }, 4182 mbid: { 4183 - type: 'string', 4184 - description: 'The MusicBrainz ID of the song.', 4185 }, 4186 label: { 4187 - type: 'string', 4188 - description: 'The label of the song.', 4189 maxLength: 256, 4190 }, 4191 }, ··· 4195 }, 4196 AppRockskySpotifyDefs: { 4197 lexicon: 1, 4198 - id: 'app.rocksky.spotify.defs', 4199 defs: { 4200 spotifyTrackView: { 4201 - type: 'object', 4202 properties: { 4203 id: { 4204 - type: 'string', 4205 - description: 'The unique identifier of the Spotify track.', 4206 }, 4207 name: { 4208 - type: 'string', 4209 - description: 'The name of the track.', 4210 }, 4211 artist: { 4212 - type: 'string', 4213 - description: 'The name of the artist.', 4214 }, 4215 album: { 4216 - type: 'string', 4217 - description: 'The name of the album.', 4218 }, 4219 duration: { 4220 - type: 'integer', 4221 - description: 'The duration of the track in milliseconds.', 4222 }, 4223 previewUrl: { 4224 - type: 'string', 4225 - description: 'A URL to a preview of the track.', 4226 }, 4227 }, 4228 }, ··· 4230 }, 4231 AppRockskySpotifyGetCurrentlyPlaying: { 4232 lexicon: 1, 4233 - id: 'app.rocksky.spotify.getCurrentlyPlaying', 4234 defs: { 4235 main: { 4236 - type: 'query', 4237 - description: 'Get the currently playing track', 4238 parameters: { 4239 - type: 'params', 4240 properties: { 4241 actor: { 4242 - type: 'string', 4243 description: 4244 - 'Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user.', 4245 - format: 'at-identifier', 4246 }, 4247 }, 4248 }, 4249 output: { 4250 - encoding: 'application/json', 4251 schema: { 4252 - type: 'ref', 4253 - ref: 'lex:app.rocksky.player.defs#currentlyPlayingViewDetailed', 4254 }, 4255 }, 4256 }, ··· 4258 }, 4259 AppRockskySpotifyNext: { 4260 lexicon: 1, 4261 - id: 'app.rocksky.spotify.next', 4262 defs: { 4263 main: { 4264 - type: 'procedure', 4265 - description: 'Play the next track in the queue', 4266 }, 4267 }, 4268 }, 4269 AppRockskySpotifyPause: { 4270 lexicon: 1, 4271 - id: 'app.rocksky.spotify.pause', 4272 defs: { 4273 main: { 4274 - type: 'procedure', 4275 - description: 'Pause the currently playing track', 4276 }, 4277 }, 4278 }, 4279 AppRockskySpotifyPlay: { 4280 lexicon: 1, 4281 - id: 'app.rocksky.spotify.play', 4282 defs: { 4283 main: { 4284 - type: 'procedure', 4285 - description: 'Resume playback of the currently paused track', 4286 }, 4287 }, 4288 }, 4289 AppRockskySpotifyPrevious: { 4290 lexicon: 1, 4291 - id: 'app.rocksky.spotify.previous', 4292 defs: { 4293 main: { 4294 - type: 'procedure', 4295 - description: 'Play the previous track in the queue', 4296 }, 4297 }, 4298 }, 4299 AppRockskySpotifySeek: { 4300 lexicon: 1, 4301 - id: 'app.rocksky.spotify.seek', 4302 defs: { 4303 main: { 4304 - type: 'procedure', 4305 description: 4306 - 'Seek to a specific position in the currently playing track', 4307 parameters: { 4308 - type: 'params', 4309 - required: ['position'], 4310 properties: { 4311 position: { 4312 - type: 'integer', 4313 - description: 'The position in seconds to seek to', 4314 }, 4315 }, 4316 }, ··· 4319 }, 4320 AppRockskyStatsDefs: { 4321 lexicon: 1, 4322 - id: 'app.rocksky.stats.defs', 4323 defs: { 4324 statsView: { 4325 - type: 'object', 4326 properties: { 4327 scrobbles: { 4328 - type: 'integer', 4329 - description: 'The total number of scrobbles.', 4330 }, 4331 artists: { 4332 - type: 'integer', 4333 - description: 'The total number of unique artists scrobbled.', 4334 }, 4335 lovedTracks: { 4336 - type: 'integer', 4337 - description: 'The total number of tracks marked as loved.', 4338 }, 4339 albums: { 4340 - type: 'integer', 4341 - description: 'The total number of unique albums scrobbled.', 4342 }, 4343 tracks: { 4344 - type: 'integer', 4345 - description: 'The total number of unique tracks scrobbled.', 4346 }, 4347 }, 4348 }, ··· 4350 }, 4351 AppRockskyStatsGetStats: { 4352 lexicon: 1, 4353 - id: 'app.rocksky.stats.getStats', 4354 defs: { 4355 main: { 4356 - type: 'query', 4357 parameters: { 4358 - type: 'params', 4359 - required: ['did'], 4360 properties: { 4361 did: { 4362 - type: 'string', 4363 - description: 'The DID or handle of the user to get stats for.', 4364 - format: 'at-identifier', 4365 }, 4366 }, 4367 }, 4368 output: { 4369 - encoding: 'application/json', 4370 schema: { 4371 - type: 'ref', 4372 - ref: 'lex:app.rocksky.stats.defs#statsView', 4373 }, 4374 }, 4375 }, ··· 4377 }, 4378 ComAtprotoRepoStrongRef: { 4379 lexicon: 1, 4380 - id: 'com.atproto.repo.strongRef', 4381 - description: 'A URI with a content-hash fingerprint.', 4382 defs: { 4383 main: { 4384 - type: 'object', 4385 - required: ['uri', 'cid'], 4386 properties: { 4387 uri: { 4388 - type: 'string', 4389 - format: 'at-uri', 4390 }, 4391 cid: { 4392 - type: 'string', 4393 - format: 'cid', 4394 }, 4395 }, 4396 }, 4397 }, 4398 }, 4399 - } as const satisfies Record<string, LexiconDoc> 4400 4401 - export const schemas = Object.values(schemaDict) 4402 - export const lexicons: Lexicons = new Lexicons(schemas) 4403 export const ids = { 4404 - AppRockskyActorDefs: 'app.rocksky.actor.defs', 4405 - AppRockskyActorGetActorAlbums: 'app.rocksky.actor.getActorAlbums', 4406 - AppRockskyActorGetActorArtists: 'app.rocksky.actor.getActorArtists', 4407 - AppRockskyActorGetActorLovedSongs: 'app.rocksky.actor.getActorLovedSongs', 4408 - AppRockskyActorGetActorPlaylists: 'app.rocksky.actor.getActorPlaylists', 4409 - AppRockskyActorGetActorScrobbles: 'app.rocksky.actor.getActorScrobbles', 4410 - AppRockskyActorGetActorSongs: 'app.rocksky.actor.getActorSongs', 4411 - AppRockskyActorGetProfile: 'app.rocksky.actor.getProfile', 4412 - AppBskyActorProfile: 'app.bsky.actor.profile', 4413 - AppRockskyAlbum: 'app.rocksky.album', 4414 - AppRockskyAlbumDefs: 'app.rocksky.album.defs', 4415 - AppRockskyAlbumGetAlbum: 'app.rocksky.album.getAlbum', 4416 - AppRockskyAlbumGetAlbums: 'app.rocksky.album.getAlbums', 4417 - AppRockskyAlbumGetAlbumTracks: 'app.rocksky.album.getAlbumTracks', 4418 - AppRockskyApikeyCreateApikey: 'app.rocksky.apikey.createApikey', 4419 - AppRockskyApikeyDefs: 'app.rocksky.apikey.defs', 4420 - AppRockskyApikeysDefs: 'app.rocksky.apikeys.defs', 4421 - AppRockskyApikeyGetApikeys: 'app.rocksky.apikey.getApikeys', 4422 - AppRockskyApikeyRemoveApikey: 'app.rocksky.apikey.removeApikey', 4423 - AppRockskyApikeyUpdateApikey: 'app.rocksky.apikey.updateApikey', 4424 - AppRockskyArtist: 'app.rocksky.artist', 4425 - AppRockskyArtistDefs: 'app.rocksky.artist.defs', 4426 - AppRockskyArtistGetArtistAlbums: 'app.rocksky.artist.getArtistAlbums', 4427 - AppRockskyArtistGetArtist: 'app.rocksky.artist.getArtist', 4428 - AppRockskyArtistGetArtistListeners: 'app.rocksky.artist.getArtistListeners', 4429 - AppRockskyArtistGetArtists: 'app.rocksky.artist.getArtists', 4430 - AppRockskyArtistGetArtistTracks: 'app.rocksky.artist.getArtistTracks', 4431 - AppRockskyChartsDefs: 'app.rocksky.charts.defs', 4432 - AppRockskyChartsGetScrobblesChart: 'app.rocksky.charts.getScrobblesChart', 4433 - AppRockskyDropboxDefs: 'app.rocksky.dropbox.defs', 4434 - AppRockskyDropboxDownloadFile: 'app.rocksky.dropbox.downloadFile', 4435 - AppRockskyDropboxGetFiles: 'app.rocksky.dropbox.getFiles', 4436 - AppRockskyDropboxGetMetadata: 'app.rocksky.dropbox.getMetadata', 4437 - AppRockskyDropboxGetTemporaryLink: 'app.rocksky.dropbox.getTemporaryLink', 4438 - AppRockskyFeedDefs: 'app.rocksky.feed.defs', 4439 - AppRockskyFeedGetNowPlayings: 'app.rocksky.feed.getNowPlayings', 4440 - AppRockskyFeedSearch: 'app.rocksky.feed.search', 4441 - AppRockskyGoogledriveDefs: 'app.rocksky.googledrive.defs', 4442 - AppRockskyGoogledriveDownloadFile: 'app.rocksky.googledrive.downloadFile', 4443 - AppRockskyGoogledriveGetFile: 'app.rocksky.googledrive.getFile', 4444 - AppRockskyGoogledriveGetFiles: 'app.rocksky.googledrive.getFiles', 4445 - AppRockskyLikeDislikeShout: 'app.rocksky.like.dislikeShout', 4446 - AppRockskyLikeDislikeSong: 'app.rocksky.like.dislikeSong', 4447 - AppRockskyLike: 'app.rocksky.like', 4448 - AppRockskyLikeLikeShout: 'app.rocksky.like.likeShout', 4449 - AppRockskyLikeLikeSong: 'app.rocksky.like.likeSong', 4450 - AppRockskyPlayerAddDirectoryToQueue: 'app.rocksky.player.addDirectoryToQueue', 4451 - AppRockskyPlayerAddItemsToQueue: 'app.rocksky.player.addItemsToQueue', 4452 - AppRockskyPlayerDefs: 'app.rocksky.player.defs', 4453 - AppRockskyPlayerGetCurrentlyPlaying: 'app.rocksky.player.getCurrentlyPlaying', 4454 - AppRockskyPlayerGetPlaybackQueue: 'app.rocksky.player.getPlaybackQueue', 4455 - AppRockskyPlayerNext: 'app.rocksky.player.next', 4456 - AppRockskyPlayerPause: 'app.rocksky.player.pause', 4457 - AppRockskyPlayerPlayDirectory: 'app.rocksky.player.playDirectory', 4458 - AppRockskyPlayerPlayFile: 'app.rocksky.player.playFile', 4459 - AppRockskyPlayerPlay: 'app.rocksky.player.play', 4460 - AppRockskyPlayerPrevious: 'app.rocksky.player.previous', 4461 - AppRockskyPlayerSeek: 'app.rocksky.player.seek', 4462 - AppRockskyPlaylistCreatePlaylist: 'app.rocksky.playlist.createPlaylist', 4463 - AppRockskyPlaylistDefs: 'app.rocksky.playlist.defs', 4464 - AppRockskyPlaylistGetPlaylist: 'app.rocksky.playlist.getPlaylist', 4465 - AppRockskyPlaylistGetPlaylists: 'app.rocksky.playlist.getPlaylists', 4466 - AppRockskyPlaylistInsertDirectory: 'app.rocksky.playlist.insertDirectory', 4467 - AppRockskyPlaylistInsertFiles: 'app.rocksky.playlist.insertFiles', 4468 - AppRockskyPlaylist: 'app.rocksky.playlist', 4469 - AppRockskyPlaylistRemovePlaylist: 'app.rocksky.playlist.removePlaylist', 4470 - AppRockskyPlaylistRemoveTrack: 'app.rocksky.playlist.removeTrack', 4471 - AppRockskyPlaylistStartPlaylist: 'app.rocksky.playlist.startPlaylist', 4472 - AppRockskyRadioDefs: 'app.rocksky.radio.defs', 4473 - AppRockskyRadio: 'app.rocksky.radio', 4474 - AppRockskyScrobbleCreateScrobble: 'app.rocksky.scrobble.createScrobble', 4475 - AppRockskyScrobbleDefs: 'app.rocksky.scrobble.defs', 4476 - AppRockskyScrobbleGetScrobble: 'app.rocksky.scrobble.getScrobble', 4477 - AppRockskyScrobbleGetScrobbles: 'app.rocksky.scrobble.getScrobbles', 4478 - AppRockskyScrobble: 'app.rocksky.scrobble', 4479 - AppRockskyShoutCreateShout: 'app.rocksky.shout.createShout', 4480 - AppRockskyShoutDefs: 'app.rocksky.shout.defs', 4481 - AppRockskyShoutGetAlbumShouts: 'app.rocksky.shout.getAlbumShouts', 4482 - AppRockskyShoutGetArtistShouts: 'app.rocksky.shout.getArtistShouts', 4483 - AppRockskyShoutGetProfileShouts: 'app.rocksky.shout.getProfileShouts', 4484 - AppRockskyShoutGetShoutReplies: 'app.rocksky.shout.getShoutReplies', 4485 - AppRockskyShoutGetTrackShouts: 'app.rocksky.shout.getTrackShouts', 4486 - AppRockskyShoutRemoveShout: 'app.rocksky.shout.removeShout', 4487 - AppRockskyShoutReplyShout: 'app.rocksky.shout.replyShout', 4488 - AppRockskyShoutReportShout: 'app.rocksky.shout.reportShout', 4489 - AppRockskyShout: 'app.rocksky.shout', 4490 - AppRockskySongCreateSong: 'app.rocksky.song.createSong', 4491 - AppRockskySongDefs: 'app.rocksky.song.defs', 4492 - AppRockskySongGetSong: 'app.rocksky.song.getSong', 4493 - AppRockskySongGetSongs: 'app.rocksky.song.getSongs', 4494 - AppRockskySong: 'app.rocksky.song', 4495 - AppRockskySpotifyDefs: 'app.rocksky.spotify.defs', 4496 AppRockskySpotifyGetCurrentlyPlaying: 4497 - 'app.rocksky.spotify.getCurrentlyPlaying', 4498 - AppRockskySpotifyNext: 'app.rocksky.spotify.next', 4499 - AppRockskySpotifyPause: 'app.rocksky.spotify.pause', 4500 - AppRockskySpotifyPlay: 'app.rocksky.spotify.play', 4501 - AppRockskySpotifyPrevious: 'app.rocksky.spotify.previous', 4502 - AppRockskySpotifySeek: 'app.rocksky.spotify.seek', 4503 - AppRockskyStatsDefs: 'app.rocksky.stats.defs', 4504 - AppRockskyStatsGetStats: 'app.rocksky.stats.getStats', 4505 - ComAtprotoRepoStrongRef: 'com.atproto.repo.strongRef', 4506 - }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { LexiconDoc, Lexicons } from "@atproto/lexicon"; 5 6 export const schemaDict = { 7 AppRockskyActorDefs: { 8 lexicon: 1, 9 + id: "app.rocksky.actor.defs", 10 defs: { 11 profileViewDetailed: { 12 + type: "object", 13 properties: { 14 id: { 15 + type: "string", 16 + description: "The unique identifier of the actor.", 17 }, 18 did: { 19 + type: "string", 20 + description: "The DID of the actor.", 21 }, 22 handle: { 23 + type: "string", 24 + description: "The handle of the actor.", 25 }, 26 displayName: { 27 + type: "string", 28 + description: "The display name of the actor.", 29 }, 30 avatar: { 31 + type: "string", 32 description: "The URL of the actor's avatar image.", 33 + format: "uri", 34 }, 35 createdAt: { 36 + type: "string", 37 + description: "The date and time when the actor was created.", 38 + format: "datetime", 39 }, 40 updatedAt: { 41 + type: "string", 42 + description: "The date and time when the actor was last updated.", 43 + format: "datetime", 44 }, 45 }, 46 }, 47 profileViewBasic: { 48 + type: "object", 49 properties: { 50 id: { 51 + type: "string", 52 + description: "The unique identifier of the actor.", 53 }, 54 did: { 55 + type: "string", 56 + description: "The DID of the actor.", 57 }, 58 handle: { 59 + type: "string", 60 + description: "The handle of the actor.", 61 }, 62 displayName: { 63 + type: "string", 64 + description: "The display name of the actor.", 65 }, 66 avatar: { 67 + type: "string", 68 description: "The URL of the actor's avatar image.", 69 + format: "uri", 70 }, 71 createdAt: { 72 + type: "string", 73 + description: "The date and time when the actor was created.", 74 + format: "datetime", 75 }, 76 updatedAt: { 77 + type: "string", 78 + description: "The date and time when the actor was last updated.", 79 + format: "datetime", 80 }, 81 }, 82 }, ··· 84 }, 85 AppRockskyActorGetActorAlbums: { 86 lexicon: 1, 87 + id: "app.rocksky.actor.getActorAlbums", 88 defs: { 89 main: { 90 + type: "query", 91 + description: "Get albums for an actor", 92 parameters: { 93 + type: "params", 94 + required: ["did"], 95 properties: { 96 did: { 97 + type: "string", 98 + description: "The DID or handle of the actor", 99 + format: "at-identifier", 100 }, 101 limit: { 102 + type: "integer", 103 + description: "The maximum number of albums to return", 104 minimum: 1, 105 }, 106 offset: { 107 + type: "integer", 108 + description: "The offset for pagination", 109 minimum: 0, 110 }, 111 }, 112 }, 113 output: { 114 + encoding: "application/json", 115 schema: { 116 + type: "object", 117 properties: { 118 albums: { 119 + type: "array", 120 items: { 121 + type: "ref", 122 + ref: "lex:app.rocksky.album.defs#albumViewBasic", 123 }, 124 }, 125 }, ··· 130 }, 131 AppRockskyActorGetActorArtists: { 132 lexicon: 1, 133 + id: "app.rocksky.actor.getActorArtists", 134 defs: { 135 main: { 136 + type: "query", 137 + description: "Get artists for an actor", 138 parameters: { 139 + type: "params", 140 + required: ["did"], 141 properties: { 142 did: { 143 + type: "string", 144 + description: "The DID or handle of the actor", 145 + format: "at-identifier", 146 }, 147 limit: { 148 + type: "integer", 149 + description: "The maximum number of albums to return", 150 minimum: 1, 151 }, 152 offset: { 153 + type: "integer", 154 + description: "The offset for pagination", 155 minimum: 0, 156 }, 157 }, 158 }, 159 output: { 160 + encoding: "application/json", 161 schema: { 162 + type: "object", 163 properties: { 164 artists: { 165 + type: "array", 166 items: { 167 + type: "ref", 168 + ref: "lex:app.rocksky.artist.defs#artistViewBasic", 169 }, 170 }, 171 }, ··· 176 }, 177 AppRockskyActorGetActorLovedSongs: { 178 lexicon: 1, 179 + id: "app.rocksky.actor.getActorLovedSongs", 180 defs: { 181 main: { 182 + type: "query", 183 + description: "Get loved songs for an actor", 184 parameters: { 185 + type: "params", 186 + required: ["did"], 187 properties: { 188 did: { 189 + type: "string", 190 + description: "The DID or handle of the actor", 191 + format: "at-identifier", 192 }, 193 limit: { 194 + type: "integer", 195 + description: "The maximum number of albums to return", 196 minimum: 1, 197 }, 198 offset: { 199 + type: "integer", 200 + description: "The offset for pagination", 201 minimum: 0, 202 }, 203 }, 204 }, 205 output: { 206 + encoding: "application/json", 207 schema: { 208 + type: "object", 209 properties: { 210 tracks: { 211 + type: "array", 212 items: { 213 + type: "ref", 214 + ref: "lex:app.rocksky.song.defs#songViewBasic", 215 }, 216 }, 217 }, ··· 222 }, 223 AppRockskyActorGetActorPlaylists: { 224 lexicon: 1, 225 + id: "app.rocksky.actor.getActorPlaylists", 226 defs: { 227 main: { 228 + type: "query", 229 + description: "Get playlists for an actor", 230 parameters: { 231 + type: "params", 232 + required: ["did"], 233 properties: { 234 did: { 235 + type: "string", 236 + description: "The DID or handle of the actor", 237 + format: "at-identifier", 238 }, 239 limit: { 240 + type: "integer", 241 + description: "The maximum number of albums to return", 242 minimum: 1, 243 }, 244 offset: { 245 + type: "integer", 246 + description: "The offset for pagination", 247 minimum: 0, 248 }, 249 }, 250 }, 251 output: { 252 + encoding: "application/json", 253 schema: { 254 + type: "object", 255 properties: { 256 playlists: { 257 + type: "array", 258 items: { 259 + type: "ref", 260 + ref: "lex:app.rocksky.playlist.defs#playlistViewBasic", 261 }, 262 }, 263 }, ··· 268 }, 269 AppRockskyActorGetActorScrobbles: { 270 lexicon: 1, 271 + id: "app.rocksky.actor.getActorScrobbles", 272 defs: { 273 main: { 274 + type: "query", 275 + description: "Get scrobbles for an actor", 276 parameters: { 277 + type: "params", 278 + required: ["did"], 279 properties: { 280 did: { 281 + type: "string", 282 + description: "The DID or handle of the actor", 283 + format: "at-identifier", 284 }, 285 limit: { 286 + type: "integer", 287 + description: "The maximum number of albums to return", 288 minimum: 1, 289 }, 290 offset: { 291 + type: "integer", 292 + description: "The offset for pagination", 293 minimum: 0, 294 }, 295 }, 296 }, 297 output: { 298 + encoding: "application/json", 299 schema: { 300 + type: "object", 301 properties: { 302 scrobbles: { 303 + type: "array", 304 items: { 305 + type: "ref", 306 + ref: "lex:app.rocksky.scrobble.defs#scrobbleViewBasic", 307 }, 308 }, 309 }, ··· 314 }, 315 AppRockskyActorGetActorSongs: { 316 lexicon: 1, 317 + id: "app.rocksky.actor.getActorSongs", 318 defs: { 319 main: { 320 + type: "query", 321 + description: "Get songs for an actor", 322 parameters: { 323 + type: "params", 324 + required: ["did"], 325 properties: { 326 did: { 327 + type: "string", 328 + description: "The DID or handle of the actor", 329 + format: "at-identifier", 330 }, 331 limit: { 332 + type: "integer", 333 + description: "The maximum number of albums to return", 334 minimum: 1, 335 }, 336 offset: { 337 + type: "integer", 338 + description: "The offset for pagination", 339 minimum: 0, 340 }, 341 }, 342 }, 343 output: { 344 + encoding: "application/json", 345 schema: { 346 + type: "object", 347 properties: { 348 songs: { 349 + type: "array", 350 items: { 351 + type: "ref", 352 + ref: "lex:app.rocksky.song.defs#songViewBasic", 353 }, 354 }, 355 }, ··· 360 }, 361 AppRockskyActorGetProfile: { 362 lexicon: 1, 363 + id: "app.rocksky.actor.getProfile", 364 defs: { 365 main: { 366 + type: "query", 367 + description: "Get the profile of an actor", 368 parameters: { 369 + type: "params", 370 properties: { 371 did: { 372 + type: "string", 373 + description: "The DID or handle of the actor", 374 + format: "at-identifier", 375 }, 376 }, 377 }, 378 output: { 379 + encoding: "application/json", 380 schema: { 381 + type: "ref", 382 + ref: "lex:app.rocksky.actor.defs#profileViewDetailed", 383 }, 384 }, 385 }, ··· 387 }, 388 AppBskyActorProfile: { 389 lexicon: 1, 390 + id: "app.bsky.actor.profile", 391 defs: { 392 main: { 393 + type: "record", 394 + description: "A declaration of a Bluesky account profile.", 395 + key: "literal:self", 396 record: { 397 + type: "object", 398 properties: { 399 displayName: { 400 + type: "string", 401 maxGraphemes: 64, 402 maxLength: 640, 403 }, 404 description: { 405 + type: "string", 406 + description: "Free-form profile description text.", 407 maxGraphemes: 256, 408 maxLength: 2560, 409 }, 410 avatar: { 411 + type: "blob", 412 description: 413 "Small image to be displayed next to posts from account. AKA, 'profile picture'", 414 + accept: ["image/png", "image/jpeg"], 415 maxSize: 1000000, 416 }, 417 banner: { 418 + type: "blob", 419 description: 420 + "Larger horizontal image to display behind profile view.", 421 + accept: ["image/png", "image/jpeg"], 422 maxSize: 10000000, 423 }, 424 labels: { 425 + type: "union", 426 description: 427 + "Self-label values, specific to the Bluesky application, on the overall account.", 428 + refs: ["lex:com.atproto.label.defs#selfLabels"], 429 }, 430 joinedViaStarterPack: { 431 + type: "ref", 432 + ref: "lex:com.atproto.repo.strongRef", 433 }, 434 createdAt: { 435 + type: "string", 436 + format: "datetime", 437 }, 438 }, 439 }, ··· 442 }, 443 AppRockskyAlbum: { 444 lexicon: 1, 445 + id: "app.rocksky.album", 446 defs: { 447 main: { 448 + type: "record", 449 + description: "A declaration of an album.", 450 + key: "tid", 451 record: { 452 + type: "object", 453 + required: ["title", "artist", "createdAt"], 454 properties: { 455 title: { 456 + type: "string", 457 + description: "The title of the album.", 458 minLength: 1, 459 maxLength: 512, 460 }, 461 artist: { 462 + type: "string", 463 + description: "The artist of the album.", 464 minLength: 1, 465 maxLength: 256, 466 }, 467 duration: { 468 + type: "integer", 469 + description: "The duration of the album in seconds.", 470 }, 471 releaseDate: { 472 + type: "string", 473 + description: "The release date of the album.", 474 + format: "datetime", 475 }, 476 year: { 477 + type: "integer", 478 + description: "The year the album was released.", 479 }, 480 genre: { 481 + type: "string", 482 + description: "The genre of the album.", 483 maxLength: 256, 484 }, 485 albumArt: { 486 + type: "blob", 487 + description: "The album art of the album.", 488 + accept: ["image/png", "image/jpeg"], 489 maxSize: 2000000, 490 }, 491 + albumArtUrl: { 492 + type: "string", 493 + description: "The URL of the album art of the album.", 494 + format: "uri", 495 + }, 496 tags: { 497 + type: "array", 498 + description: "The tags of the album.", 499 items: { 500 + type: "string", 501 minLength: 1, 502 maxLength: 256, 503 }, 504 }, 505 youtubeLink: { 506 + type: "string", 507 + description: "The YouTube link of the album.", 508 + format: "uri", 509 }, 510 spotifyLink: { 511 + type: "string", 512 + description: "The Spotify link of the album.", 513 + format: "uri", 514 }, 515 tidalLink: { 516 + type: "string", 517 + description: "The tidal link of the album.", 518 + format: "uri", 519 }, 520 appleMusicLink: { 521 + type: "string", 522 + description: "The Apple Music link of the album.", 523 + format: "uri", 524 }, 525 createdAt: { 526 + type: "string", 527 + description: "The date and time when the album was created.", 528 + format: "datetime", 529 }, 530 }, 531 }, ··· 534 }, 535 AppRockskyAlbumDefs: { 536 lexicon: 1, 537 + id: "app.rocksky.album.defs", 538 defs: { 539 albumViewBasic: { 540 + type: "object", 541 properties: { 542 id: { 543 + type: "string", 544 + description: "The unique identifier of the album.", 545 }, 546 uri: { 547 + type: "string", 548 + description: "The URI of the album.", 549 + format: "at-uri", 550 }, 551 title: { 552 + type: "string", 553 + description: "The title of the album.", 554 }, 555 artist: { 556 + type: "string", 557 + description: "The artist of the album.", 558 }, 559 artistUri: { 560 + type: "string", 561 description: "The URI of the album's artist.", 562 + format: "at-uri", 563 }, 564 year: { 565 + type: "integer", 566 + description: "The year the album was released.", 567 }, 568 albumArt: { 569 + type: "string", 570 + description: "The URL of the album art image.", 571 + format: "uri", 572 }, 573 releaseDate: { 574 + type: "string", 575 + description: "The release date of the album.", 576 }, 577 sha256: { 578 + type: "string", 579 + description: "The SHA256 hash of the album.", 580 }, 581 playCount: { 582 + type: "integer", 583 + description: "The number of times the album has been played.", 584 minimum: 0, 585 }, 586 uniqueListeners: { 587 + type: "integer", 588 description: 589 + "The number of unique listeners who have played the album.", 590 minimum: 0, 591 }, 592 }, 593 }, 594 albumViewDetailed: { 595 + type: "object", 596 properties: { 597 id: { 598 + type: "string", 599 + description: "The unique identifier of the album.", 600 }, 601 uri: { 602 + type: "string", 603 + description: "The URI of the album.", 604 + format: "at-uri", 605 }, 606 title: { 607 + type: "string", 608 + description: "The title of the album.", 609 }, 610 artist: { 611 + type: "string", 612 + description: "The artist of the album.", 613 }, 614 artistUri: { 615 + type: "string", 616 description: "The URI of the album's artist.", 617 + format: "at-uri", 618 }, 619 year: { 620 + type: "integer", 621 + description: "The year the album was released.", 622 }, 623 albumArt: { 624 + type: "string", 625 + description: "The URL of the album art image.", 626 + format: "uri", 627 }, 628 releaseDate: { 629 + type: "string", 630 + description: "The release date of the album.", 631 }, 632 sha256: { 633 + type: "string", 634 + description: "The SHA256 hash of the album.", 635 }, 636 playCount: { 637 + type: "integer", 638 + description: "The number of times the album has been played.", 639 minimum: 0, 640 }, 641 uniqueListeners: { 642 + type: "integer", 643 description: 644 + "The number of unique listeners who have played the album.", 645 minimum: 0, 646 }, 647 tracks: { 648 + type: "array", 649 items: { 650 + type: "ref", 651 + ref: "lex:app.rocksky.song.defs.songViewBasic", 652 }, 653 }, 654 }, ··· 657 }, 658 AppRockskyAlbumGetAlbum: { 659 lexicon: 1, 660 + id: "app.rocksky.album.getAlbum", 661 defs: { 662 main: { 663 + type: "query", 664 + description: "Get detailed album view", 665 parameters: { 666 + type: "params", 667 + required: ["uri"], 668 properties: { 669 uri: { 670 + type: "string", 671 + description: "The URI of the album to retrieve.", 672 + format: "at-uri", 673 }, 674 }, 675 }, 676 output: { 677 + encoding: "application/json", 678 schema: { 679 + type: "ref", 680 + ref: "lex:app.rocksky.album.defs#albumViewDetailed", 681 }, 682 }, 683 }, ··· 685 }, 686 AppRockskyAlbumGetAlbums: { 687 lexicon: 1, 688 + id: "app.rocksky.album.getAlbums", 689 defs: { 690 main: { 691 + type: "query", 692 + description: "Get albums", 693 parameters: { 694 + type: "params", 695 properties: { 696 limit: { 697 + type: "integer", 698 + description: "The maximum number of albums to return", 699 minimum: 1, 700 }, 701 offset: { 702 + type: "integer", 703 + description: "The offset for pagination", 704 minimum: 0, 705 }, 706 }, 707 }, 708 output: { 709 + encoding: "application/json", 710 schema: { 711 + type: "object", 712 properties: { 713 albums: { 714 + type: "array", 715 items: { 716 + type: "ref", 717 + ref: "lex:app.rocksky.album.defs#albumViewBasic", 718 }, 719 }, 720 }, ··· 725 }, 726 AppRockskyAlbumGetAlbumTracks: { 727 lexicon: 1, 728 + id: "app.rocksky.album.getAlbumTracks", 729 defs: { 730 main: { 731 + type: "query", 732 + description: "Get tracks for an album", 733 parameters: { 734 + type: "params", 735 + required: ["uri"], 736 properties: { 737 uri: { 738 + type: "string", 739 + description: "The URI of the album to retrieve tracks from", 740 + format: "at-uri", 741 }, 742 }, 743 }, 744 output: { 745 + encoding: "application/json", 746 schema: { 747 + type: "object", 748 properties: { 749 tracks: { 750 + type: "array", 751 items: { 752 + type: "ref", 753 + ref: "lex:app.rocksky.song.defs#songViewBasic", 754 }, 755 }, 756 }, ··· 761 }, 762 AppRockskyApikeyCreateApikey: { 763 lexicon: 1, 764 + id: "app.rocksky.apikey.createApikey", 765 defs: { 766 main: { 767 + type: "procedure", 768 + description: "Create a new API key for the authenticated user", 769 input: { 770 + encoding: "application/json", 771 schema: { 772 + type: "object", 773 + required: ["name"], 774 properties: { 775 name: { 776 + type: "string", 777 + description: "The name of the API key.", 778 }, 779 description: { 780 + type: "string", 781 + description: "A description for the API key.", 782 }, 783 }, 784 }, 785 }, 786 output: { 787 + encoding: "application/json", 788 schema: { 789 + type: "ref", 790 + ref: "lex:app.rocksky.apikey.defs#apiKey", 791 }, 792 }, 793 }, ··· 795 }, 796 AppRockskyApikeyDefs: { 797 lexicon: 1, 798 + id: "app.rocksky.apikey.defs", 799 defs: { 800 apiKeyView: { 801 + type: "object", 802 properties: { 803 id: { 804 + type: "string", 805 + description: "The unique identifier of the API key.", 806 }, 807 name: { 808 + type: "string", 809 + description: "The name of the API key.", 810 }, 811 description: { 812 + type: "string", 813 + description: "A description for the API key.", 814 }, 815 createdAt: { 816 + type: "string", 817 + description: "The date and time when the API key was created.", 818 + format: "datetime", 819 }, 820 }, 821 }, ··· 823 }, 824 AppRockskyApikeysDefs: { 825 lexicon: 1, 826 + id: "app.rocksky.apikeys.defs", 827 defs: {}, 828 }, 829 AppRockskyApikeyGetApikeys: { 830 lexicon: 1, 831 + id: "app.rocksky.apikey.getApikeys", 832 defs: { 833 main: { 834 + type: "query", 835 + description: "Get a list of API keys for the authenticated user", 836 parameters: { 837 + type: "params", 838 properties: { 839 offset: { 840 + type: "integer", 841 description: 842 + "The number of API keys to skip before starting to collect the result set.", 843 }, 844 limit: { 845 + type: "integer", 846 + description: "The number of API keys to return per page.", 847 }, 848 }, 849 }, 850 output: { 851 + encoding: "application/json", 852 schema: { 853 + type: "object", 854 properties: { 855 apiKeys: { 856 + type: "array", 857 items: { 858 + type: "ref", 859 + ref: "lex:app.rocksky.apikey.defs#apikeyView", 860 }, 861 }, 862 }, ··· 867 }, 868 AppRockskyApikeyRemoveApikey: { 869 lexicon: 1, 870 + id: "app.rocksky.apikey.removeApikey", 871 defs: { 872 main: { 873 + type: "procedure", 874 + description: "Remove an API key for the authenticated user", 875 parameters: { 876 + type: "params", 877 + required: ["id"], 878 properties: { 879 id: { 880 + type: "string", 881 + description: "The ID of the API key to remove.", 882 }, 883 }, 884 }, 885 output: { 886 + encoding: "application/json", 887 schema: { 888 + type: "ref", 889 + ref: "lex:app.rocksky.apikey.defs#apiKey", 890 }, 891 }, 892 }, ··· 894 }, 895 AppRockskyApikeyUpdateApikey: { 896 lexicon: 1, 897 + id: "app.rocksky.apikey.updateApikey", 898 defs: { 899 main: { 900 + type: "procedure", 901 + description: "Update an existing API key for the authenticated user", 902 input: { 903 + encoding: "application/json", 904 schema: { 905 + type: "object", 906 + required: ["id", "name"], 907 properties: { 908 id: { 909 + type: "string", 910 + description: "The ID of the API key to update.", 911 }, 912 name: { 913 + type: "string", 914 + description: "The new name of the API key.", 915 }, 916 description: { 917 + type: "string", 918 + description: "A new description for the API key.", 919 }, 920 }, 921 }, 922 }, 923 output: { 924 + encoding: "application/json", 925 schema: { 926 + type: "ref", 927 + ref: "lex:app.rocksky.apikey.defs#apiKey", 928 }, 929 }, 930 }, ··· 932 }, 933 AppRockskyArtist: { 934 lexicon: 1, 935 + id: "app.rocksky.artist", 936 defs: { 937 main: { 938 + type: "record", 939 + description: "A declaration of an artist.", 940 + key: "tid", 941 record: { 942 + type: "object", 943 + required: ["name", "createdAt"], 944 properties: { 945 name: { 946 + type: "string", 947 + description: "The name of the artist.", 948 minLength: 1, 949 maxLength: 512, 950 }, 951 bio: { 952 + type: "string", 953 + description: "The biography of the artist.", 954 maxLength: 1000, 955 }, 956 picture: { 957 + type: "blob", 958 + description: "The picture of the artist.", 959 + accept: ["image/png", "image/jpeg"], 960 maxSize: 2000000, 961 }, 962 + pictureUrl: { 963 + type: "string", 964 + description: "The URL of the picture of the artist.", 965 + format: "uri", 966 + }, 967 tags: { 968 + type: "array", 969 + description: "The tags of the artist.", 970 items: { 971 + type: "string", 972 minLength: 1, 973 maxLength: 256, 974 }, 975 }, 976 born: { 977 + type: "string", 978 + description: "The birth date of the artist.", 979 + format: "datetime", 980 }, 981 died: { 982 + type: "string", 983 + description: "The death date of the artist.", 984 + format: "datetime", 985 }, 986 bornIn: { 987 + type: "string", 988 + description: "The birth place of the artist.", 989 maxLength: 256, 990 }, 991 createdAt: { 992 + type: "string", 993 + description: "The date when the artist was created.", 994 + format: "datetime", 995 }, 996 }, 997 }, ··· 1000 }, 1001 AppRockskyArtistDefs: { 1002 lexicon: 1, 1003 + id: "app.rocksky.artist.defs", 1004 defs: { 1005 artistViewBasic: { 1006 + type: "object", 1007 properties: { 1008 id: { 1009 + type: "string", 1010 + description: "The unique identifier of the artist.", 1011 }, 1012 uri: { 1013 + type: "string", 1014 + description: "The URI of the artist.", 1015 + format: "at-uri", 1016 }, 1017 name: { 1018 + type: "string", 1019 + description: "The name of the artist.", 1020 }, 1021 picture: { 1022 + type: "string", 1023 + description: "The picture of the artist.", 1024 }, 1025 sha256: { 1026 + type: "string", 1027 + description: "The SHA256 hash of the artist.", 1028 }, 1029 playCount: { 1030 + type: "integer", 1031 + description: "The number of times the artist has been played.", 1032 minimum: 0, 1033 }, 1034 uniqueListeners: { 1035 + type: "integer", 1036 description: 1037 + "The number of unique listeners who have played the artist.", 1038 minimum: 0, 1039 }, 1040 }, 1041 }, 1042 artistViewDetailed: { 1043 + type: "object", 1044 properties: { 1045 id: { 1046 + type: "string", 1047 + description: "The unique identifier of the artist.", 1048 }, 1049 uri: { 1050 + type: "string", 1051 + description: "The URI of the artist.", 1052 + format: "at-uri", 1053 }, 1054 name: { 1055 + type: "string", 1056 + description: "The name of the artist.", 1057 }, 1058 picture: { 1059 + type: "string", 1060 + description: "The picture of the artist.", 1061 }, 1062 sha256: { 1063 + type: "string", 1064 + description: "The SHA256 hash of the artist.", 1065 }, 1066 playCount: { 1067 + type: "integer", 1068 + description: "The number of times the artist has been played.", 1069 minimum: 0, 1070 }, 1071 uniqueListeners: { 1072 + type: "integer", 1073 description: 1074 + "The number of unique listeners who have played the artist.", 1075 minimum: 0, 1076 }, 1077 }, 1078 }, 1079 songViewBasic: { 1080 + type: "object", 1081 properties: { 1082 uri: { 1083 + type: "string", 1084 + description: "The URI of the song.", 1085 + format: "at-uri", 1086 }, 1087 title: { 1088 + type: "string", 1089 + description: "The title of the song.", 1090 }, 1091 playCount: { 1092 + type: "integer", 1093 + description: "The number of times the song has been played.", 1094 minimum: 0, 1095 }, 1096 }, 1097 }, 1098 listenerViewBasic: { 1099 + type: "object", 1100 properties: { 1101 id: { 1102 + type: "string", 1103 + description: "The unique identifier of the actor.", 1104 }, 1105 did: { 1106 + type: "string", 1107 + description: "The DID of the listener.", 1108 }, 1109 handle: { 1110 + type: "string", 1111 + description: "The handle of the listener.", 1112 }, 1113 displayName: { 1114 + type: "string", 1115 + description: "The display name of the listener.", 1116 }, 1117 avatar: { 1118 + type: "string", 1119 description: "The URL of the listener's avatar image.", 1120 + format: "uri", 1121 }, 1122 mostListenedSong: { 1123 + type: "ref", 1124 + ref: "lex:app.rocksky.artist.defs#songViewBasic", 1125 }, 1126 totalPlays: { 1127 + type: "integer", 1128 + description: "The total number of plays by the listener.", 1129 minimum: 0, 1130 }, 1131 rank: { 1132 + type: "integer", 1133 description: 1134 + "The rank of the listener among all listeners of the artist.", 1135 minimum: 1, 1136 }, 1137 }, ··· 1140 }, 1141 AppRockskyArtistGetArtistAlbums: { 1142 lexicon: 1, 1143 + id: "app.rocksky.artist.getArtistAlbums", 1144 defs: { 1145 main: { 1146 + type: "query", 1147 description: "Get artist's albums", 1148 parameters: { 1149 + type: "params", 1150 + required: ["uri"], 1151 properties: { 1152 uri: { 1153 + type: "string", 1154 + description: "The URI of the artist to retrieve albums from", 1155 + format: "at-uri", 1156 }, 1157 }, 1158 }, 1159 output: { 1160 + encoding: "application/json", 1161 schema: { 1162 + type: "object", 1163 properties: { 1164 albums: { 1165 + type: "array", 1166 items: { 1167 + type: "ref", 1168 + ref: "lex:app.rocksky.album.defs#albumViewBasic", 1169 }, 1170 }, 1171 }, ··· 1176 }, 1177 AppRockskyArtistGetArtist: { 1178 lexicon: 1, 1179 + id: "app.rocksky.artist.getArtist", 1180 defs: { 1181 main: { 1182 + type: "query", 1183 + description: "Get artist details", 1184 parameters: { 1185 + type: "params", 1186 + required: ["uri"], 1187 properties: { 1188 uri: { 1189 + type: "string", 1190 + description: "The URI of the artist to retrieve details from", 1191 + format: "at-uri", 1192 }, 1193 }, 1194 }, 1195 output: { 1196 + encoding: "application/json", 1197 schema: { 1198 + type: "ref", 1199 + ref: "lex:app.rocksky.artist.defs#artistViewDetailed", 1200 }, 1201 }, 1202 }, ··· 1204 }, 1205 AppRockskyArtistGetArtistListeners: { 1206 lexicon: 1, 1207 + id: "app.rocksky.artist.getArtistListeners", 1208 defs: { 1209 main: { 1210 + type: "query", 1211 + description: "Get artist listeners", 1212 parameters: { 1213 + type: "params", 1214 + required: ["uri"], 1215 properties: { 1216 uri: { 1217 + type: "string", 1218 + description: "The URI of the artist to retrieve listeners from", 1219 + format: "at-uri", 1220 }, 1221 offset: { 1222 + type: "integer", 1223 + description: "Number of items to skip before returning results", 1224 }, 1225 limit: { 1226 + type: "integer", 1227 + description: "Maximum number of results to return", 1228 }, 1229 }, 1230 }, 1231 output: { 1232 + encoding: "application/json", 1233 schema: { 1234 + type: "object", 1235 properties: { 1236 listeners: { 1237 + type: "array", 1238 items: { 1239 + type: "ref", 1240 + ref: "lex:app.rocksky.artist.defs#listenerViewBasic", 1241 }, 1242 }, 1243 }, ··· 1248 }, 1249 AppRockskyArtistGetArtists: { 1250 lexicon: 1, 1251 + id: "app.rocksky.artist.getArtists", 1252 defs: { 1253 main: { 1254 + type: "query", 1255 + description: "Get artists", 1256 parameters: { 1257 + type: "params", 1258 properties: { 1259 limit: { 1260 + type: "integer", 1261 + description: "The maximum number of artists to return", 1262 minimum: 1, 1263 }, 1264 offset: { 1265 + type: "integer", 1266 + description: "The offset for pagination", 1267 minimum: 0, 1268 }, 1269 }, 1270 }, 1271 output: { 1272 + encoding: "application/json", 1273 schema: { 1274 + type: "object", 1275 properties: { 1276 artists: { 1277 + type: "array", 1278 items: { 1279 + type: "ref", 1280 + ref: "lex:app.rocksky.artist.defs#artistViewBasic", 1281 }, 1282 }, 1283 }, ··· 1288 }, 1289 AppRockskyArtistGetArtistTracks: { 1290 lexicon: 1, 1291 + id: "app.rocksky.artist.getArtistTracks", 1292 defs: { 1293 main: { 1294 + type: "query", 1295 description: "Get artist's tracks", 1296 parameters: { 1297 + type: "params", 1298 properties: { 1299 uri: { 1300 + type: "string", 1301 + description: "The URI of the artist to retrieve albums from", 1302 + format: "at-uri", 1303 }, 1304 limit: { 1305 + type: "integer", 1306 + description: "The maximum number of tracks to return", 1307 minimum: 1, 1308 }, 1309 offset: { 1310 + type: "integer", 1311 + description: "The offset for pagination", 1312 minimum: 0, 1313 }, 1314 }, 1315 }, 1316 output: { 1317 + encoding: "application/json", 1318 schema: { 1319 + type: "object", 1320 properties: { 1321 tracks: { 1322 + type: "array", 1323 items: { 1324 + type: "ref", 1325 + ref: "lex:app.rocksky.song.defs#songViewBasic", 1326 }, 1327 }, 1328 }, ··· 1333 }, 1334 AppRockskyChartsDefs: { 1335 lexicon: 1, 1336 + id: "app.rocksky.charts.defs", 1337 defs: { 1338 chartsView: { 1339 + type: "object", 1340 properties: { 1341 scrobbles: { 1342 + type: "array", 1343 items: { 1344 + type: "ref", 1345 + ref: "lex:app.rocksky.charts.defs#scrobbleViewBasic", 1346 }, 1347 }, 1348 }, 1349 }, 1350 scrobbleViewBasic: { 1351 + type: "object", 1352 properties: { 1353 date: { 1354 + type: "string", 1355 + description: "The date of the scrobble.", 1356 + format: "datetime", 1357 }, 1358 count: { 1359 + type: "integer", 1360 + description: "The number of scrobbles on this date.", 1361 }, 1362 }, 1363 }, ··· 1365 }, 1366 AppRockskyChartsGetScrobblesChart: { 1367 lexicon: 1, 1368 + id: "app.rocksky.charts.getScrobblesChart", 1369 defs: { 1370 main: { 1371 + type: "query", 1372 + description: "Get the scrobbles chart", 1373 parameters: { 1374 + type: "params", 1375 properties: { 1376 did: { 1377 + type: "string", 1378 + description: "The DID or handle of the actor", 1379 + format: "at-identifier", 1380 }, 1381 artisturi: { 1382 + type: "string", 1383 + description: "The URI of the artist to filter by", 1384 + format: "at-uri", 1385 }, 1386 albumuri: { 1387 + type: "string", 1388 + description: "The URI of the album to filter by", 1389 + format: "at-uri", 1390 }, 1391 songuri: { 1392 + type: "string", 1393 + description: "The URI of the track to filter by", 1394 + format: "at-uri", 1395 }, 1396 }, 1397 }, 1398 output: { 1399 + encoding: "application/json", 1400 schema: { 1401 + type: "ref", 1402 + ref: "lex:app.rocksky.charts.defs#chartsView", 1403 }, 1404 }, 1405 }, ··· 1407 }, 1408 AppRockskyDropboxDefs: { 1409 lexicon: 1, 1410 + id: "app.rocksky.dropbox.defs", 1411 defs: { 1412 fileView: { 1413 + type: "object", 1414 properties: { 1415 id: { 1416 + type: "string", 1417 + description: "The unique identifier of the file.", 1418 }, 1419 name: { 1420 + type: "string", 1421 + description: "The name of the file.", 1422 }, 1423 pathLower: { 1424 + type: "string", 1425 + description: "The lowercased path of the file.", 1426 }, 1427 pathDisplay: { 1428 + type: "string", 1429 + description: "The display path of the file.", 1430 }, 1431 clientModified: { 1432 + type: "string", 1433 description: 1434 + "The last modified date and time of the file on the client.", 1435 + format: "datetime", 1436 }, 1437 serverModified: { 1438 + type: "string", 1439 description: 1440 + "The last modified date and time of the file on the server.", 1441 + format: "datetime", 1442 }, 1443 }, 1444 }, 1445 fileListView: { 1446 + type: "object", 1447 properties: { 1448 files: { 1449 + type: "array", 1450 + description: "A list of files in the Dropbox.", 1451 items: { 1452 + type: "ref", 1453 + ref: "lex:app.rocksky.dropbox.defs#fileView", 1454 }, 1455 }, 1456 }, 1457 }, 1458 temporaryLinkView: { 1459 + type: "object", 1460 properties: { 1461 link: { 1462 + type: "string", 1463 + description: "The temporary link to access the file.", 1464 + format: "uri", 1465 }, 1466 }, 1467 }, ··· 1469 }, 1470 AppRockskyDropboxDownloadFile: { 1471 lexicon: 1, 1472 + id: "app.rocksky.dropbox.downloadFile", 1473 defs: { 1474 main: { 1475 + type: "query", 1476 + description: "Download a file from Dropbox by its unique identifier", 1477 parameters: { 1478 + type: "params", 1479 + required: ["fileId"], 1480 properties: { 1481 fileId: { 1482 + type: "string", 1483 + description: "The unique identifier of the file to download", 1484 }, 1485 }, 1486 }, 1487 output: { 1488 + encoding: "application/octet-stream", 1489 }, 1490 }, 1491 }, 1492 }, 1493 AppRockskyDropboxGetFiles: { 1494 lexicon: 1, 1495 + id: "app.rocksky.dropbox.getFiles", 1496 defs: { 1497 main: { 1498 + type: "query", 1499 + description: "Retrieve a list of files from Dropbox", 1500 parameters: { 1501 + type: "params", 1502 properties: { 1503 at: { 1504 + type: "string", 1505 + description: "Path to the Dropbox folder or root directory", 1506 }, 1507 }, 1508 }, 1509 output: { 1510 + encoding: "application/json", 1511 schema: { 1512 + type: "ref", 1513 + ref: "lex:app.rocksky.dropbox.defs#fileListView", 1514 }, 1515 }, 1516 }, ··· 1518 }, 1519 AppRockskyDropboxGetMetadata: { 1520 lexicon: 1, 1521 + id: "app.rocksky.dropbox.getMetadata", 1522 defs: { 1523 main: { 1524 + type: "query", 1525 + description: "Retrieve metadata of a file or folder in Dropbox", 1526 parameters: { 1527 + type: "params", 1528 + required: ["path"], 1529 properties: { 1530 path: { 1531 + type: "string", 1532 + description: "Path to the file or folder in Dropbox", 1533 }, 1534 }, 1535 }, 1536 output: { 1537 + encoding: "application/json", 1538 schema: { 1539 + type: "ref", 1540 + ref: "lex:app.rocksky.dropbox.defs#fileView", 1541 }, 1542 }, 1543 }, ··· 1545 }, 1546 AppRockskyDropboxGetTemporaryLink: { 1547 lexicon: 1, 1548 + id: "app.rocksky.dropbox.getTemporaryLink", 1549 defs: { 1550 main: { 1551 + type: "query", 1552 + description: "Retrieve a temporary link to access a file in Dropbox", 1553 parameters: { 1554 + type: "params", 1555 + required: ["path"], 1556 properties: { 1557 path: { 1558 + type: "string", 1559 + description: "Path to the file in Dropbox", 1560 }, 1561 }, 1562 }, 1563 output: { 1564 + encoding: "application/json", 1565 schema: { 1566 + type: "ref", 1567 + ref: "lex:app.rocksky.dropbox.defs#temporaryLinkView", 1568 }, 1569 }, 1570 }, ··· 1572 }, 1573 AppRockskyFeedDefs: { 1574 lexicon: 1, 1575 + id: "app.rocksky.feed.defs", 1576 defs: { 1577 searchResultsView: { 1578 + type: "object", 1579 properties: { 1580 hits: { 1581 + type: "array", 1582 items: { 1583 + type: "union", 1584 refs: [ 1585 + "lex:app.rocksky.song.defs#songViewBasic", 1586 + "lex:app.rocksky.album.defs#albumViewBasic", 1587 + "lex:app.rocksky.artist.defs#artistViewBasic", 1588 + "lex:app.rocksky.playlist.defs#playlistViewBasic", 1589 + "lex:app.rocksky.actor.defs#profileViewBasic", 1590 ], 1591 }, 1592 }, 1593 processingTimeMs: { 1594 + type: "integer", 1595 }, 1596 limit: { 1597 + type: "integer", 1598 }, 1599 offset: { 1600 + type: "integer", 1601 }, 1602 estimatedTotalHits: { 1603 + type: "integer", 1604 }, 1605 }, 1606 }, 1607 nowPlayingView: { 1608 + type: "object", 1609 properties: { 1610 album: { 1611 + type: "string", 1612 }, 1613 albumArt: { 1614 + type: "string", 1615 + format: "uri", 1616 }, 1617 albumArtist: { 1618 + type: "string", 1619 }, 1620 albumUri: { 1621 + type: "string", 1622 + format: "at-uri", 1623 }, 1624 artist: { 1625 + type: "string", 1626 }, 1627 artistUri: { 1628 + type: "string", 1629 + format: "at-uri", 1630 }, 1631 avatar: { 1632 + type: "string", 1633 + format: "uri", 1634 }, 1635 createdAt: { 1636 + type: "string", 1637 }, 1638 did: { 1639 + type: "string", 1640 + format: "at-identifier", 1641 }, 1642 handle: { 1643 + type: "string", 1644 }, 1645 id: { 1646 + type: "string", 1647 }, 1648 title: { 1649 + type: "string", 1650 }, 1651 trackId: { 1652 + type: "string", 1653 }, 1654 trackUri: { 1655 + type: "string", 1656 + format: "at-uri", 1657 }, 1658 uri: { 1659 + type: "string", 1660 + format: "at-uri", 1661 }, 1662 }, 1663 }, 1664 nowPlayingsView: { 1665 + type: "object", 1666 properties: { 1667 nowPlayings: { 1668 + type: "array", 1669 items: { 1670 + type: "ref", 1671 + ref: "lex:app.rocksky.feed.defs#nowPlayingView", 1672 }, 1673 }, 1674 }, ··· 1677 }, 1678 AppRockskyFeedGetNowPlayings: { 1679 lexicon: 1, 1680 + id: "app.rocksky.feed.getNowPlayings", 1681 defs: { 1682 main: { 1683 + type: "query", 1684 + description: "Get all currently playing tracks by users", 1685 parameters: { 1686 + type: "params", 1687 properties: { 1688 size: { 1689 + type: "integer", 1690 description: 1691 + "The maximum number of now playing tracks to return.", 1692 minimum: 1, 1693 }, 1694 }, 1695 }, 1696 output: { 1697 + encoding: "application/json", 1698 schema: { 1699 + type: "ref", 1700 + ref: "lex:app.rocksky.feed.defs#nowPlayingsView", 1701 }, 1702 }, 1703 }, ··· 1705 }, 1706 AppRockskyFeedSearch: { 1707 lexicon: 1, 1708 + id: "app.rocksky.feed.search", 1709 defs: { 1710 main: { 1711 + type: "query", 1712 + description: "Search for content in the feed", 1713 parameters: { 1714 + type: "params", 1715 + required: ["query"], 1716 properties: { 1717 query: { 1718 + type: "string", 1719 + description: "The search query string", 1720 }, 1721 }, 1722 }, 1723 output: { 1724 + encoding: "application/json", 1725 schema: { 1726 + type: "ref", 1727 + ref: "lex:app.rocksky.feed.defs#searchResultsView", 1728 }, 1729 }, 1730 }, ··· 1732 }, 1733 AppRockskyGoogledriveDefs: { 1734 lexicon: 1, 1735 + id: "app.rocksky.googledrive.defs", 1736 defs: { 1737 fileView: { 1738 + type: "object", 1739 properties: { 1740 id: { 1741 + type: "string", 1742 + description: "The unique identifier of the file.", 1743 }, 1744 }, 1745 }, 1746 fileListView: { 1747 + type: "object", 1748 properties: { 1749 files: { 1750 + type: "array", 1751 items: { 1752 + type: "ref", 1753 + ref: "lex:app.rocksky.googledrive.defs#fileView", 1754 }, 1755 }, 1756 }, ··· 1759 }, 1760 AppRockskyGoogledriveDownloadFile: { 1761 lexicon: 1, 1762 + id: "app.rocksky.googledrive.downloadFile", 1763 defs: { 1764 main: { 1765 + type: "query", 1766 description: 1767 + "Download a file from Google Drive by its unique identifier", 1768 parameters: { 1769 + type: "params", 1770 + required: ["fileId"], 1771 properties: { 1772 fileId: { 1773 + type: "string", 1774 + description: "The unique identifier of the file to download", 1775 }, 1776 }, 1777 }, 1778 output: { 1779 + encoding: "application/octet-stream", 1780 }, 1781 }, 1782 }, 1783 }, 1784 AppRockskyGoogledriveGetFile: { 1785 lexicon: 1, 1786 + id: "app.rocksky.googledrive.getFile", 1787 defs: { 1788 main: { 1789 + type: "query", 1790 + description: "Get a file from Google Drive by its unique identifier", 1791 parameters: { 1792 + type: "params", 1793 + required: ["fileId"], 1794 properties: { 1795 fileId: { 1796 + type: "string", 1797 + description: "The unique identifier of the file to retrieve", 1798 }, 1799 }, 1800 }, 1801 output: { 1802 + encoding: "application/json", 1803 schema: { 1804 + type: "ref", 1805 + ref: "lex:app.rocksky.googledrive.defs#fileView", 1806 }, 1807 }, 1808 }, ··· 1810 }, 1811 AppRockskyGoogledriveGetFiles: { 1812 lexicon: 1, 1813 + id: "app.rocksky.googledrive.getFiles", 1814 defs: { 1815 main: { 1816 + type: "query", 1817 + description: "Get a list of files from Google Drive", 1818 parameters: { 1819 + type: "params", 1820 properties: { 1821 at: { 1822 + type: "string", 1823 + description: "Path to the Google Drive folder or root directory", 1824 }, 1825 }, 1826 }, 1827 output: { 1828 + encoding: "application/json", 1829 schema: { 1830 + type: "ref", 1831 + ref: "lex:app.rocksky.googledrive.defs#fileListView", 1832 }, 1833 }, 1834 }, ··· 1836 }, 1837 AppRockskyLikeDislikeShout: { 1838 lexicon: 1, 1839 + id: "app.rocksky.like.dislikeShout", 1840 defs: { 1841 main: { 1842 + type: "procedure", 1843 + description: "Dislike a shout", 1844 input: { 1845 + encoding: "application/json", 1846 schema: { 1847 + type: "object", 1848 properties: { 1849 uri: { 1850 + type: "string", 1851 + description: "The unique identifier of the shout to dislike", 1852 + format: "at-uri", 1853 }, 1854 }, 1855 }, 1856 }, 1857 output: { 1858 + encoding: "application/json", 1859 schema: { 1860 + type: "ref", 1861 + ref: "lex:app.rocksky.shout.defs#shoutView", 1862 }, 1863 }, 1864 }, ··· 1866 }, 1867 AppRockskyLikeDislikeSong: { 1868 lexicon: 1, 1869 + id: "app.rocksky.like.dislikeSong", 1870 defs: { 1871 main: { 1872 + type: "procedure", 1873 + description: "Dislike a song", 1874 input: { 1875 + encoding: "application/json", 1876 schema: { 1877 + type: "object", 1878 properties: { 1879 uri: { 1880 + type: "string", 1881 + description: "The unique identifier of the song to dislike", 1882 + format: "at-uri", 1883 }, 1884 }, 1885 }, 1886 }, 1887 output: { 1888 + encoding: "application/json", 1889 schema: { 1890 + type: "ref", 1891 + ref: "lex:app.rocksky.song.defs#songViewDetailed", 1892 }, 1893 }, 1894 }, ··· 1896 }, 1897 AppRockskyLike: { 1898 lexicon: 1, 1899 + id: "app.rocksky.like", 1900 defs: { 1901 main: { 1902 + type: "record", 1903 + description: "A declaration of a like.", 1904 + key: "tid", 1905 record: { 1906 + type: "object", 1907 + required: ["createdAt", "subject"], 1908 properties: { 1909 createdAt: { 1910 + type: "string", 1911 + description: "The date when the like was created.", 1912 + format: "datetime", 1913 }, 1914 subject: { 1915 + type: "ref", 1916 + ref: "lex:com.atproto.repo.strongRef", 1917 }, 1918 }, 1919 }, ··· 1922 }, 1923 AppRockskyLikeLikeShout: { 1924 lexicon: 1, 1925 + id: "app.rocksky.like.likeShout", 1926 defs: { 1927 main: { 1928 + type: "procedure", 1929 + description: "Like a shout", 1930 input: { 1931 + encoding: "application/json", 1932 schema: { 1933 + type: "object", 1934 properties: { 1935 uri: { 1936 + type: "string", 1937 + description: "The unique identifier of the shout to like", 1938 + format: "at-uri", 1939 }, 1940 }, 1941 }, 1942 }, 1943 output: { 1944 + encoding: "application/json", 1945 schema: { 1946 + type: "ref", 1947 + ref: "lex:app.rocksky.shout.defs#shoutView", 1948 }, 1949 }, 1950 }, ··· 1952 }, 1953 AppRockskyLikeLikeSong: { 1954 lexicon: 1, 1955 + id: "app.rocksky.like.likeSong", 1956 defs: { 1957 main: { 1958 + type: "procedure", 1959 + description: "Like a song", 1960 input: { 1961 + encoding: "application/json", 1962 schema: { 1963 + type: "object", 1964 properties: { 1965 uri: { 1966 + type: "string", 1967 + description: "The unique identifier of the song to like", 1968 + format: "at-uri", 1969 }, 1970 }, 1971 }, 1972 }, 1973 output: { 1974 + encoding: "application/json", 1975 schema: { 1976 + type: "ref", 1977 + ref: "lex:app.rocksky.song.defs#songViewDetailed", 1978 }, 1979 }, 1980 }, ··· 1982 }, 1983 AppRockskyPlayerAddDirectoryToQueue: { 1984 lexicon: 1, 1985 + id: "app.rocksky.player.addDirectoryToQueue", 1986 defs: { 1987 main: { 1988 + type: "procedure", 1989 description: "Add directory to the player's queue", 1990 parameters: { 1991 + type: "params", 1992 + required: ["directory"], 1993 properties: { 1994 playerId: { 1995 + type: "string", 1996 }, 1997 directory: { 1998 + type: "string", 1999 + description: "The directory to add to the queue", 2000 }, 2001 position: { 2002 + type: "integer", 2003 description: 2004 + "Position in the queue to insert the directory at, defaults to the end if not specified", 2005 }, 2006 shuffle: { 2007 + type: "boolean", 2008 description: 2009 + "Whether to shuffle the added directory in the queue", 2010 }, 2011 }, 2012 }, ··· 2015 }, 2016 AppRockskyPlayerAddItemsToQueue: { 2017 lexicon: 1, 2018 + id: "app.rocksky.player.addItemsToQueue", 2019 defs: { 2020 main: { 2021 + type: "procedure", 2022 description: "Add items to the player's queue", 2023 parameters: { 2024 + type: "params", 2025 + required: ["items"], 2026 properties: { 2027 playerId: { 2028 + type: "string", 2029 }, 2030 items: { 2031 + type: "array", 2032 items: { 2033 + type: "string", 2034 + description: "List of file identifiers to add to the queue", 2035 }, 2036 }, 2037 position: { 2038 + type: "integer", 2039 description: 2040 + "Position in the queue to insert the items at, defaults to the end if not specified", 2041 }, 2042 shuffle: { 2043 + type: "boolean", 2044 + description: "Whether to shuffle the added items in the queue", 2045 }, 2046 }, 2047 }, ··· 2050 }, 2051 AppRockskyPlayerDefs: { 2052 lexicon: 1, 2053 + id: "app.rocksky.player.defs", 2054 defs: { 2055 currentlyPlayingViewDetailed: { 2056 + type: "object", 2057 properties: { 2058 title: { 2059 + type: "string", 2060 + description: "The title of the currently playing track", 2061 }, 2062 }, 2063 }, 2064 playbackQueueViewDetailed: { 2065 + type: "object", 2066 properties: { 2067 tracks: { 2068 + type: "array", 2069 items: { 2070 + type: "ref", 2071 + ref: "lex:app.rocksky.song.defs.songViewBasic", 2072 }, 2073 }, 2074 }, ··· 2077 }, 2078 AppRockskyPlayerGetCurrentlyPlaying: { 2079 lexicon: 1, 2080 + id: "app.rocksky.player.getCurrentlyPlaying", 2081 defs: { 2082 main: { 2083 + type: "query", 2084 + description: "Get the currently playing track", 2085 parameters: { 2086 + type: "params", 2087 properties: { 2088 playerId: { 2089 + type: "string", 2090 }, 2091 actor: { 2092 + type: "string", 2093 description: 2094 + "Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user.", 2095 + format: "at-identifier", 2096 }, 2097 }, 2098 }, 2099 output: { 2100 + encoding: "application/json", 2101 schema: { 2102 + type: "ref", 2103 + ref: "lex:app.rocksky.player.defs#currentlyPlayingViewDetailed", 2104 }, 2105 }, 2106 }, ··· 2108 }, 2109 AppRockskyPlayerGetPlaybackQueue: { 2110 lexicon: 1, 2111 + id: "app.rocksky.player.getPlaybackQueue", 2112 defs: { 2113 main: { 2114 + type: "query", 2115 + description: "Retrieve the current playback queue", 2116 parameters: { 2117 + type: "params", 2118 properties: { 2119 playerId: { 2120 + type: "string", 2121 }, 2122 }, 2123 }, 2124 output: { 2125 + encoding: "application/json", 2126 schema: { 2127 + type: "ref", 2128 + ref: "lex:app.rocksky.player.defs#playbackQueueViewDetailed", 2129 }, 2130 }, 2131 }, ··· 2133 }, 2134 AppRockskyPlayerNext: { 2135 lexicon: 1, 2136 + id: "app.rocksky.player.next", 2137 defs: { 2138 main: { 2139 + type: "procedure", 2140 + description: "Play the next track in the queue", 2141 parameters: { 2142 + type: "params", 2143 properties: { 2144 playerId: { 2145 + type: "string", 2146 }, 2147 }, 2148 }, ··· 2151 }, 2152 AppRockskyPlayerPause: { 2153 lexicon: 1, 2154 + id: "app.rocksky.player.pause", 2155 defs: { 2156 main: { 2157 + type: "procedure", 2158 + description: "Pause the currently playing track", 2159 parameters: { 2160 + type: "params", 2161 properties: { 2162 playerId: { 2163 + type: "string", 2164 }, 2165 }, 2166 }, ··· 2169 }, 2170 AppRockskyPlayerPlayDirectory: { 2171 lexicon: 1, 2172 + id: "app.rocksky.player.playDirectory", 2173 defs: { 2174 main: { 2175 + type: "procedure", 2176 + description: "Play all tracks in a directory", 2177 parameters: { 2178 + type: "params", 2179 + required: ["directoryId"], 2180 properties: { 2181 playerId: { 2182 + type: "string", 2183 }, 2184 directoryId: { 2185 + type: "string", 2186 }, 2187 shuffle: { 2188 + type: "boolean", 2189 }, 2190 recurse: { 2191 + type: "boolean", 2192 }, 2193 position: { 2194 + type: "integer", 2195 }, 2196 }, 2197 }, ··· 2200 }, 2201 AppRockskyPlayerPlayFile: { 2202 lexicon: 1, 2203 + id: "app.rocksky.player.playFile", 2204 defs: { 2205 main: { 2206 + type: "procedure", 2207 + description: "Play a specific audio file", 2208 parameters: { 2209 + type: "params", 2210 + required: ["fileId"], 2211 properties: { 2212 playerId: { 2213 + type: "string", 2214 }, 2215 fileId: { 2216 + type: "string", 2217 }, 2218 }, 2219 }, ··· 2222 }, 2223 AppRockskyPlayerPlay: { 2224 lexicon: 1, 2225 + id: "app.rocksky.player.play", 2226 defs: { 2227 main: { 2228 + type: "procedure", 2229 + description: "Resume playback of the currently paused track", 2230 parameters: { 2231 + type: "params", 2232 properties: { 2233 playerId: { 2234 + type: "string", 2235 }, 2236 }, 2237 }, ··· 2240 }, 2241 AppRockskyPlayerPrevious: { 2242 lexicon: 1, 2243 + id: "app.rocksky.player.previous", 2244 defs: { 2245 main: { 2246 + type: "procedure", 2247 + description: "Play the previous track in the queue", 2248 parameters: { 2249 + type: "params", 2250 properties: { 2251 playerId: { 2252 + type: "string", 2253 }, 2254 }, 2255 }, ··· 2258 }, 2259 AppRockskyPlayerSeek: { 2260 lexicon: 1, 2261 + id: "app.rocksky.player.seek", 2262 defs: { 2263 main: { 2264 + type: "procedure", 2265 description: 2266 + "Seek to a specific position in the currently playing track", 2267 parameters: { 2268 + type: "params", 2269 + required: ["position"], 2270 properties: { 2271 playerId: { 2272 + type: "string", 2273 }, 2274 position: { 2275 + type: "integer", 2276 + description: "The position in seconds to seek to", 2277 }, 2278 }, 2279 }, ··· 2282 }, 2283 AppRockskyPlaylistCreatePlaylist: { 2284 lexicon: 1, 2285 + id: "app.rocksky.playlist.createPlaylist", 2286 defs: { 2287 main: { 2288 + type: "procedure", 2289 + description: "Create a new playlist", 2290 parameters: { 2291 + type: "params", 2292 + required: ["name"], 2293 properties: { 2294 name: { 2295 + type: "string", 2296 + description: "The name of the playlist", 2297 }, 2298 description: { 2299 + type: "string", 2300 + description: "A brief description of the playlist", 2301 }, 2302 }, 2303 }, ··· 2306 }, 2307 AppRockskyPlaylistDefs: { 2308 lexicon: 1, 2309 + id: "app.rocksky.playlist.defs", 2310 defs: { 2311 playlistViewDetailed: { 2312 + type: "object", 2313 description: 2314 + "Detailed view of a playlist, including its tracks and metadata", 2315 properties: { 2316 id: { 2317 + type: "string", 2318 + description: "The unique identifier of the playlist.", 2319 }, 2320 title: { 2321 + type: "string", 2322 + description: "The title of the playlist.", 2323 }, 2324 uri: { 2325 + type: "string", 2326 + description: "The URI of the playlist.", 2327 + format: "at-uri", 2328 }, 2329 curatorDid: { 2330 + type: "string", 2331 + description: "The DID of the curator of the playlist.", 2332 + format: "at-identifier", 2333 }, 2334 curatorHandle: { 2335 + type: "string", 2336 + description: "The handle of the curator of the playlist.", 2337 + format: "at-identifier", 2338 }, 2339 curatorName: { 2340 + type: "string", 2341 + description: "The name of the curator of the playlist.", 2342 }, 2343 curatorAvatarUrl: { 2344 + type: "string", 2345 + description: "The URL of the avatar image of the curator.", 2346 + format: "uri", 2347 }, 2348 description: { 2349 + type: "string", 2350 + description: "A description of the playlist.", 2351 }, 2352 coverImageUrl: { 2353 + type: "string", 2354 + description: "The URL of the cover image for the playlist.", 2355 + format: "uri", 2356 }, 2357 createdAt: { 2358 + type: "string", 2359 + description: "The date and time when the playlist was created.", 2360 + format: "datetime", 2361 }, 2362 tracks: { 2363 + type: "array", 2364 + description: "A list of tracks in the playlist.", 2365 items: { 2366 + type: "ref", 2367 + ref: "lex:app.rocksky.song.defs#songViewBasic", 2368 }, 2369 }, 2370 }, 2371 }, 2372 playlistViewBasic: { 2373 + type: "object", 2374 + description: "Basic view of a playlist, including its metadata", 2375 properties: { 2376 id: { 2377 + type: "string", 2378 + description: "The unique identifier of the playlist.", 2379 }, 2380 title: { 2381 + type: "string", 2382 + description: "The title of the playlist.", 2383 }, 2384 uri: { 2385 + type: "string", 2386 + description: "The URI of the playlist.", 2387 + format: "at-uri", 2388 }, 2389 curatorDid: { 2390 + type: "string", 2391 + description: "The DID of the curator of the playlist.", 2392 + format: "at-identifier", 2393 }, 2394 curatorHandle: { 2395 + type: "string", 2396 + description: "The handle of the curator of the playlist.", 2397 + format: "at-identifier", 2398 }, 2399 curatorName: { 2400 + type: "string", 2401 + description: "The name of the curator of the playlist.", 2402 }, 2403 curatorAvatarUrl: { 2404 + type: "string", 2405 + description: "The URL of the avatar image of the curator.", 2406 + format: "uri", 2407 }, 2408 description: { 2409 + type: "string", 2410 + description: "A description of the playlist.", 2411 }, 2412 coverImageUrl: { 2413 + type: "string", 2414 + description: "The URL of the cover image for the playlist.", 2415 + format: "uri", 2416 }, 2417 createdAt: { 2418 + type: "string", 2419 + description: "The date and time when the playlist was created.", 2420 + format: "datetime", 2421 }, 2422 trackCount: { 2423 + type: "integer", 2424 + description: "The number of tracks in the playlist.", 2425 minimum: 0, 2426 }, 2427 }, ··· 2430 }, 2431 AppRockskyPlaylistGetPlaylist: { 2432 lexicon: 1, 2433 + id: "app.rocksky.playlist.getPlaylist", 2434 defs: { 2435 main: { 2436 + type: "query", 2437 + description: "Retrieve a playlist by its ID", 2438 parameters: { 2439 + type: "params", 2440 + required: ["uri"], 2441 properties: { 2442 uri: { 2443 + type: "string", 2444 + description: "The URI of the playlist to retrieve.", 2445 + format: "at-uri", 2446 }, 2447 }, 2448 }, 2449 output: { 2450 + encoding: "application/json", 2451 schema: { 2452 + type: "ref", 2453 + ref: "lex:app.rocksky.playlist.defs#playlistViewDetailed", 2454 }, 2455 }, 2456 }, ··· 2458 }, 2459 AppRockskyPlaylistGetPlaylists: { 2460 lexicon: 1, 2461 + id: "app.rocksky.playlist.getPlaylists", 2462 defs: { 2463 main: { 2464 + type: "query", 2465 + description: "Retrieve a list of playlists", 2466 parameters: { 2467 + type: "params", 2468 properties: { 2469 limit: { 2470 + type: "integer", 2471 + description: "The maximum number of playlists to return.", 2472 }, 2473 offset: { 2474 + type: "integer", 2475 description: 2476 + "The offset for pagination, used to skip a number of playlists.", 2477 }, 2478 }, 2479 }, 2480 output: { 2481 + encoding: "application/json", 2482 schema: { 2483 + type: "object", 2484 properties: { 2485 playlists: { 2486 + type: "array", 2487 items: { 2488 + type: "ref", 2489 + ref: "lex:app.rocksky.playlist.defs#playlistViewBasic", 2490 }, 2491 }, 2492 }, ··· 2497 }, 2498 AppRockskyPlaylistInsertDirectory: { 2499 lexicon: 1, 2500 + id: "app.rocksky.playlist.insertDirectory", 2501 defs: { 2502 main: { 2503 + type: "procedure", 2504 + description: "Insert a directory into a playlist", 2505 parameters: { 2506 + type: "params", 2507 + required: ["uri", "directory"], 2508 properties: { 2509 uri: { 2510 + type: "string", 2511 + description: "The URI of the playlist to start", 2512 + format: "at-uri", 2513 }, 2514 directory: { 2515 + type: "string", 2516 + description: "The directory (id) to insert into the playlist", 2517 }, 2518 position: { 2519 + type: "integer", 2520 description: 2521 + "The position in the playlist to insert the directory at, if not specified, the directory will be appended", 2522 }, 2523 }, 2524 }, ··· 2527 }, 2528 AppRockskyPlaylistInsertFiles: { 2529 lexicon: 1, 2530 + id: "app.rocksky.playlist.insertFiles", 2531 defs: { 2532 main: { 2533 + type: "procedure", 2534 + description: "Insert files into a playlist", 2535 parameters: { 2536 + type: "params", 2537 + required: ["uri", "files"], 2538 properties: { 2539 uri: { 2540 + type: "string", 2541 + description: "The URI of the playlist to start", 2542 + format: "at-uri", 2543 }, 2544 files: { 2545 + type: "array", 2546 items: { 2547 + type: "string", 2548 + description: "List of file (id) to insert into the playlist", 2549 }, 2550 }, 2551 position: { 2552 + type: "integer", 2553 description: 2554 + "The position in the playlist to insert the files at, if not specified, files will be appended", 2555 }, 2556 }, 2557 }, ··· 2560 }, 2561 AppRockskyPlaylist: { 2562 lexicon: 1, 2563 + id: "app.rocksky.playlist", 2564 defs: { 2565 main: { 2566 + type: "record", 2567 + description: "A declaration of a playlist.", 2568 + key: "tid", 2569 record: { 2570 + type: "object", 2571 + required: ["name", "createdAt"], 2572 properties: { 2573 name: { 2574 + type: "string", 2575 + description: "The name of the playlist.", 2576 minLength: 1, 2577 maxLength: 512, 2578 }, 2579 description: { 2580 + type: "string", 2581 + description: "The playlist description.", 2582 minLength: 1, 2583 maxLength: 256, 2584 }, 2585 picture: { 2586 + type: "blob", 2587 + description: "The picture of the playlist.", 2588 + accept: ["image/png", "image/jpeg"], 2589 maxSize: 2000000, 2590 }, 2591 tracks: { 2592 + type: "array", 2593 + description: "The tracks in the playlist.", 2594 items: { 2595 + type: "ref", 2596 + ref: "lex:app.rocksky.song#record", 2597 }, 2598 }, 2599 createdAt: { 2600 + type: "string", 2601 + description: "The date the playlist was created.", 2602 + format: "datetime", 2603 }, 2604 spotifyLink: { 2605 + type: "string", 2606 + description: "The Spotify link of the playlist.", 2607 }, 2608 tidalLink: { 2609 + type: "string", 2610 + description: "The Tidal link of the playlist.", 2611 }, 2612 youtubeLink: { 2613 + type: "string", 2614 + description: "The YouTube link of the playlist.", 2615 }, 2616 appleMusicLink: { 2617 + type: "string", 2618 + description: "The Apple Music link of the playlist.", 2619 }, 2620 }, 2621 }, ··· 2624 }, 2625 AppRockskyPlaylistRemovePlaylist: { 2626 lexicon: 1, 2627 + id: "app.rocksky.playlist.removePlaylist", 2628 defs: { 2629 main: { 2630 + type: "procedure", 2631 + description: "Remove a playlist", 2632 parameters: { 2633 + type: "params", 2634 + required: ["uri"], 2635 properties: { 2636 uri: { 2637 + type: "string", 2638 + description: "The URI of the playlist to remove", 2639 + format: "at-uri", 2640 }, 2641 }, 2642 }, ··· 2645 }, 2646 AppRockskyPlaylistRemoveTrack: { 2647 lexicon: 1, 2648 + id: "app.rocksky.playlist.removeTrack", 2649 defs: { 2650 main: { 2651 + type: "procedure", 2652 + description: "Remove a track from a playlist", 2653 parameters: { 2654 + type: "params", 2655 + required: ["uri", "position"], 2656 properties: { 2657 uri: { 2658 + type: "string", 2659 + description: "The URI of the playlist to remove the track from", 2660 + format: "at-uri", 2661 }, 2662 position: { 2663 + type: "integer", 2664 description: 2665 + "The position of the track to remove in the playlist", 2666 }, 2667 }, 2668 }, ··· 2671 }, 2672 AppRockskyPlaylistStartPlaylist: { 2673 lexicon: 1, 2674 + id: "app.rocksky.playlist.startPlaylist", 2675 defs: { 2676 main: { 2677 + type: "procedure", 2678 + description: "Start a playlist", 2679 parameters: { 2680 + type: "params", 2681 + required: ["uri"], 2682 properties: { 2683 uri: { 2684 + type: "string", 2685 + description: "The URI of the playlist to start", 2686 + format: "at-uri", 2687 }, 2688 shuffle: { 2689 + type: "boolean", 2690 + description: "Whether to shuffle the playlist when starting it", 2691 }, 2692 position: { 2693 + type: "integer", 2694 description: 2695 + "The position in the playlist to start from, if not specified, starts from the beginning", 2696 }, 2697 }, 2698 }, ··· 2701 }, 2702 AppRockskyRadioDefs: { 2703 lexicon: 1, 2704 + id: "app.rocksky.radio.defs", 2705 defs: { 2706 radioViewBasic: { 2707 + type: "object", 2708 properties: { 2709 id: { 2710 + type: "string", 2711 + description: "The unique identifier of the radio.", 2712 }, 2713 name: { 2714 + type: "string", 2715 + description: "The name of the radio.", 2716 }, 2717 description: { 2718 + type: "string", 2719 + description: "A brief description of the radio.", 2720 }, 2721 createdAt: { 2722 + type: "string", 2723 + description: "The date and time when the radio was created.", 2724 + format: "datetime", 2725 }, 2726 }, 2727 }, 2728 radioViewDetailed: { 2729 + type: "object", 2730 properties: { 2731 id: { 2732 + type: "string", 2733 + description: "The unique identifier of the radio.", 2734 }, 2735 name: { 2736 + type: "string", 2737 + description: "The name of the radio.", 2738 }, 2739 description: { 2740 + type: "string", 2741 + description: "A brief description of the radio.", 2742 }, 2743 website: { 2744 + type: "string", 2745 + description: "The website of the radio.", 2746 + format: "uri", 2747 }, 2748 url: { 2749 + type: "string", 2750 + description: "The streaming URL of the radio.", 2751 + format: "uri", 2752 }, 2753 genre: { 2754 + type: "string", 2755 + description: "The genre of the radio.", 2756 }, 2757 logo: { 2758 + type: "string", 2759 + description: "The logo of the radio station.", 2760 }, 2761 createdAt: { 2762 + type: "string", 2763 + description: "The date and time when the radio was created.", 2764 + format: "datetime", 2765 }, 2766 }, 2767 }, ··· 2769 }, 2770 AppRockskyRadio: { 2771 lexicon: 1, 2772 + id: "app.rocksky.radio", 2773 defs: { 2774 main: { 2775 + type: "record", 2776 + description: "A declaration of a radio station.", 2777 + key: "tid", 2778 record: { 2779 + type: "object", 2780 + required: ["name", "url", "createdAt"], 2781 properties: { 2782 name: { 2783 + type: "string", 2784 + description: "The name of the radio station.", 2785 minLength: 1, 2786 maxLength: 512, 2787 }, 2788 url: { 2789 + type: "string", 2790 + description: "The URL of the radio station.", 2791 + format: "uri", 2792 }, 2793 description: { 2794 + type: "string", 2795 + description: "A description of the radio station.", 2796 minLength: 1, 2797 maxLength: 1000, 2798 }, 2799 genre: { 2800 + type: "string", 2801 + description: "The genre of the radio station.", 2802 minLength: 1, 2803 maxLength: 256, 2804 }, 2805 logo: { 2806 + type: "blob", 2807 + description: "The logo of the radio station.", 2808 + accept: ["image/png", "image/jpeg"], 2809 maxSize: 2000000, 2810 }, 2811 website: { 2812 + type: "string", 2813 + description: "The website of the radio station.", 2814 + format: "uri", 2815 }, 2816 createdAt: { 2817 + type: "string", 2818 + description: "The date when the radio station was created.", 2819 + format: "datetime", 2820 }, 2821 }, 2822 }, ··· 2825 }, 2826 AppRockskyScrobbleCreateScrobble: { 2827 lexicon: 1, 2828 + id: "app.rocksky.scrobble.createScrobble", 2829 defs: { 2830 main: { 2831 + type: "procedure", 2832 + description: "Create a new scrobble", 2833 input: { 2834 + encoding: "application/json", 2835 schema: { 2836 + type: "object", 2837 + required: ["title", "artist"], 2838 properties: { 2839 title: { 2840 + type: "string", 2841 + description: "The title of the track being scrobbled", 2842 }, 2843 artist: { 2844 + type: "string", 2845 + description: "The artist of the track being scrobbled", 2846 }, 2847 album: { 2848 + type: "string", 2849 + description: "The album of the track being scrobbled", 2850 }, 2851 duration: { 2852 + type: "integer", 2853 + description: "The duration of the track in seconds", 2854 }, 2855 mbId: { 2856 + type: "string", 2857 + description: "The MusicBrainz ID of the track, if available", 2858 }, 2859 albumArt: { 2860 + type: "string", 2861 + description: "The URL of the album art for the track", 2862 + format: "uri", 2863 }, 2864 trackNumber: { 2865 + type: "integer", 2866 + description: "The track number of the track in the album", 2867 }, 2868 releaseDate: { 2869 + type: "string", 2870 description: 2871 + "The release date of the track, formatted as YYYY-MM-DD", 2872 }, 2873 year: { 2874 + type: "integer", 2875 + description: "The year the track was released", 2876 }, 2877 discNumber: { 2878 + type: "integer", 2879 description: 2880 + "The disc number of the track in the album, if applicable", 2881 }, 2882 lyrics: { 2883 + type: "string", 2884 + description: "The lyrics of the track, if available", 2885 }, 2886 composer: { 2887 + type: "string", 2888 + description: "The composer of the track, if available", 2889 }, 2890 copyrightMessage: { 2891 + type: "string", 2892 description: 2893 + "The copyright message for the track, if available", 2894 }, 2895 label: { 2896 + type: "string", 2897 + description: "The record label of the track, if available", 2898 }, 2899 artistPicture: { 2900 + type: "string", 2901 description: "The URL of the artist's picture, if available", 2902 + format: "uri", 2903 }, 2904 spotifyLink: { 2905 + type: "string", 2906 + description: "The Spotify link for the track, if available", 2907 + format: "uri", 2908 }, 2909 lastfmLink: { 2910 + type: "string", 2911 + description: "The Last.fm link for the track, if available", 2912 + format: "uri", 2913 }, 2914 tidalLink: { 2915 + type: "string", 2916 + description: "The Tidal link for the track, if available", 2917 + format: "uri", 2918 }, 2919 appleMusicLink: { 2920 + type: "string", 2921 + description: "The Apple Music link for the track, if available", 2922 + format: "uri", 2923 }, 2924 youtubeLink: { 2925 + type: "string", 2926 + description: "The Youtube link for the track, if available", 2927 + format: "uri", 2928 }, 2929 deezerLink: { 2930 + type: "string", 2931 + description: "The Deezer link for the track, if available", 2932 + format: "uri", 2933 }, 2934 timestamp: { 2935 + type: "integer", 2936 description: 2937 + "The timestamp of the scrobble in milliseconds since epoch", 2938 }, 2939 }, 2940 }, 2941 }, 2942 output: { 2943 + encoding: "application/json", 2944 schema: { 2945 + type: "ref", 2946 + ref: "lex:app.rocksky.scrobble.defs#scrobbleViewBasic", 2947 }, 2948 }, 2949 }, ··· 2951 }, 2952 AppRockskyScrobbleDefs: { 2953 lexicon: 1, 2954 + id: "app.rocksky.scrobble.defs", 2955 defs: { 2956 scrobbleViewBasic: { 2957 + type: "object", 2958 properties: { 2959 id: { 2960 + type: "string", 2961 + description: "The unique identifier of the scrobble.", 2962 }, 2963 user: { 2964 + type: "string", 2965 + description: "The handle of the user who created the scrobble.", 2966 }, 2967 userDisplayName: { 2968 + type: "string", 2969 description: 2970 + "The display name of the user who created the scrobble.", 2971 }, 2972 userAvatar: { 2973 + type: "string", 2974 + description: "The avatar URL of the user who created the scrobble.", 2975 + format: "uri", 2976 }, 2977 title: { 2978 + type: "string", 2979 + description: "The title of the scrobble.", 2980 }, 2981 artist: { 2982 + type: "string", 2983 + description: "The artist of the song.", 2984 }, 2985 artistUri: { 2986 + type: "string", 2987 + description: "The URI of the artist.", 2988 + format: "at-uri", 2989 }, 2990 album: { 2991 + type: "string", 2992 + description: "The album of the song.", 2993 }, 2994 albumUri: { 2995 + type: "string", 2996 + description: "The URI of the album.", 2997 + format: "at-uri", 2998 }, 2999 cover: { 3000 + type: "string", 3001 + description: "The album art URL of the song.", 3002 + format: "uri", 3003 }, 3004 date: { 3005 + type: "string", 3006 + description: "The timestamp when the scrobble was created.", 3007 + format: "datetime", 3008 }, 3009 uri: { 3010 + type: "string", 3011 + description: "The URI of the scrobble.", 3012 + format: "uri", 3013 }, 3014 sha256: { 3015 + type: "string", 3016 + description: "The SHA256 hash of the scrobble data.", 3017 }, 3018 }, 3019 }, 3020 scrobbleViewDetailed: { 3021 + type: "object", 3022 properties: { 3023 id: { 3024 + type: "string", 3025 + description: "The unique identifier of the scrobble.", 3026 }, 3027 user: { 3028 + type: "string", 3029 + description: "The handle of the user who created the scrobble.", 3030 }, 3031 title: { 3032 + type: "string", 3033 + description: "The title of the scrobble.", 3034 }, 3035 artist: { 3036 + type: "string", 3037 + description: "The artist of the song.", 3038 }, 3039 artistUri: { 3040 + type: "string", 3041 + description: "The URI of the artist.", 3042 + format: "at-uri", 3043 }, 3044 album: { 3045 + type: "string", 3046 + description: "The album of the song.", 3047 }, 3048 albumUri: { 3049 + type: "string", 3050 + description: "The URI of the album.", 3051 + format: "at-uri", 3052 }, 3053 cover: { 3054 + type: "string", 3055 + description: "The album art URL of the song.", 3056 + format: "uri", 3057 }, 3058 date: { 3059 + type: "string", 3060 + description: "The timestamp when the scrobble was created.", 3061 + format: "datetime", 3062 }, 3063 uri: { 3064 + type: "string", 3065 + description: "The URI of the scrobble.", 3066 + format: "uri", 3067 }, 3068 sha256: { 3069 + type: "string", 3070 + description: "The SHA256 hash of the scrobble data.", 3071 }, 3072 listeners: { 3073 + type: "integer", 3074 + description: "The number of listeners", 3075 }, 3076 scrobbles: { 3077 + type: "integer", 3078 + description: "The number of scrobbles for this song", 3079 }, 3080 }, 3081 }, ··· 3083 }, 3084 AppRockskyScrobbleGetScrobble: { 3085 lexicon: 1, 3086 + id: "app.rocksky.scrobble.getScrobble", 3087 defs: { 3088 main: { 3089 + type: "query", 3090 + description: "Get a scrobble by its unique identifier", 3091 parameters: { 3092 + type: "params", 3093 + required: ["uri"], 3094 properties: { 3095 uri: { 3096 + type: "string", 3097 + description: "The unique identifier of the scrobble", 3098 + format: "at-uri", 3099 }, 3100 }, 3101 }, 3102 output: { 3103 + encoding: "application/json", 3104 schema: { 3105 + type: "ref", 3106 + ref: "lex:app.rocksky.scrobble.defs#scrobbleViewDetailed", 3107 }, 3108 }, 3109 }, ··· 3111 }, 3112 AppRockskyScrobbleGetScrobbles: { 3113 lexicon: 1, 3114 + id: "app.rocksky.scrobble.getScrobbles", 3115 defs: { 3116 main: { 3117 + type: "query", 3118 + description: "Get scrobbles all scrobbles", 3119 parameters: { 3120 + type: "params", 3121 properties: { 3122 did: { 3123 + type: "string", 3124 + description: "The DID or handle of the actor", 3125 + format: "at-identifier", 3126 }, 3127 limit: { 3128 + type: "integer", 3129 + description: "The maximum number of scrobbles to return", 3130 minimum: 1, 3131 }, 3132 offset: { 3133 + type: "integer", 3134 + description: "The offset for pagination", 3135 minimum: 0, 3136 }, 3137 }, 3138 }, 3139 output: { 3140 + encoding: "application/json", 3141 schema: { 3142 + type: "object", 3143 properties: { 3144 scrobbles: { 3145 + type: "array", 3146 items: { 3147 + type: "ref", 3148 + ref: "lex:app.rocksky.scrobble.defs#scrobbleViewBasic", 3149 }, 3150 }, 3151 }, ··· 3156 }, 3157 AppRockskyScrobble: { 3158 lexicon: 1, 3159 + id: "app.rocksky.scrobble", 3160 defs: { 3161 main: { 3162 + type: "record", 3163 + description: "A declaration of a scrobble.", 3164 + key: "tid", 3165 record: { 3166 + type: "object", 3167 required: [ 3168 + "title", 3169 + "artist", 3170 + "album", 3171 + "albumArtist", 3172 + "duration", 3173 + "createdAt", 3174 ], 3175 properties: { 3176 title: { 3177 + type: "string", 3178 + description: "The title of the song.", 3179 minLength: 1, 3180 maxLength: 512, 3181 }, 3182 artist: { 3183 + type: "string", 3184 + description: "The artist of the song.", 3185 minLength: 1, 3186 maxLength: 256, 3187 }, 3188 albumArtist: { 3189 + type: "string", 3190 + description: "The album artist of the song.", 3191 minLength: 1, 3192 maxLength: 256, 3193 }, 3194 album: { 3195 + type: "string", 3196 + description: "The album of the song.", 3197 minLength: 1, 3198 maxLength: 256, 3199 }, 3200 duration: { 3201 + type: "integer", 3202 + description: "The duration of the song in seconds.", 3203 minimum: 1, 3204 }, 3205 trackNumber: { 3206 + type: "integer", 3207 + description: "The track number of the song in the album.", 3208 minimum: 1, 3209 }, 3210 discNumber: { 3211 + type: "integer", 3212 + description: "The disc number of the song in the album.", 3213 minimum: 1, 3214 }, 3215 releaseDate: { 3216 + type: "string", 3217 + description: "The release date of the song.", 3218 + format: "datetime", 3219 }, 3220 year: { 3221 + type: "integer", 3222 + description: "The year the song was released.", 3223 }, 3224 genre: { 3225 + type: "string", 3226 + description: "The genre of the song.", 3227 maxLength: 256, 3228 }, 3229 tags: { 3230 + type: "array", 3231 + description: "The tags of the song.", 3232 items: { 3233 + type: "string", 3234 minLength: 1, 3235 maxLength: 256, 3236 }, 3237 }, 3238 composer: { 3239 + type: "string", 3240 + description: "The composer of the song.", 3241 maxLength: 256, 3242 }, 3243 lyrics: { 3244 + type: "string", 3245 + description: "The lyrics of the song.", 3246 maxLength: 10000, 3247 }, 3248 copyrightMessage: { 3249 + type: "string", 3250 + description: "The copyright message of the song.", 3251 maxLength: 256, 3252 }, 3253 wiki: { 3254 + type: "string", 3255 + description: "Informations about the song", 3256 maxLength: 10000, 3257 }, 3258 albumArt: { 3259 + type: "blob", 3260 + description: "The album art of the song.", 3261 + accept: ["image/png", "image/jpeg"], 3262 maxSize: 2000000, 3263 }, 3264 + albumArtUrl: { 3265 + type: "string", 3266 + description: "The URL of the album art of the song.", 3267 + format: "uri", 3268 + }, 3269 youtubeLink: { 3270 + type: "string", 3271 + description: "The YouTube link of the song.", 3272 + format: "uri", 3273 }, 3274 spotifyLink: { 3275 + type: "string", 3276 + description: "The Spotify link of the song.", 3277 + format: "uri", 3278 }, 3279 tidalLink: { 3280 + type: "string", 3281 + description: "The Tidal link of the song.", 3282 + format: "uri", 3283 }, 3284 appleMusicLink: { 3285 + type: "string", 3286 + description: "The Apple Music link of the song.", 3287 + format: "uri", 3288 }, 3289 createdAt: { 3290 + type: "string", 3291 + description: "The date when the song was created.", 3292 + format: "datetime", 3293 }, 3294 mbid: { 3295 + type: "string", 3296 + description: "The MusicBrainz ID of the song.", 3297 }, 3298 label: { 3299 + type: "string", 3300 + description: "The label of the song.", 3301 maxLength: 256, 3302 }, 3303 }, ··· 3307 }, 3308 AppRockskyShoutCreateShout: { 3309 lexicon: 1, 3310 + id: "app.rocksky.shout.createShout", 3311 defs: { 3312 main: { 3313 + type: "procedure", 3314 + description: "Create a new shout", 3315 input: { 3316 + encoding: "application/json", 3317 schema: { 3318 + type: "object", 3319 properties: { 3320 message: { 3321 + type: "string", 3322 + description: "The content of the shout", 3323 minLength: 1, 3324 }, 3325 }, 3326 }, 3327 }, 3328 output: { 3329 + encoding: "application/json", 3330 schema: { 3331 + type: "ref", 3332 + ref: "lex:app.rocksky.shout.defs#shoutView", 3333 }, 3334 }, 3335 }, ··· 3337 }, 3338 AppRockskyShoutDefs: { 3339 lexicon: 1, 3340 + id: "app.rocksky.shout.defs", 3341 defs: { 3342 author: { 3343 + type: "object", 3344 properties: { 3345 id: { 3346 + type: "string", 3347 + description: "The unique identifier of the author.", 3348 }, 3349 did: { 3350 + type: "string", 3351 + description: "The decentralized identifier (DID) of the author.", 3352 + format: "at-identifier", 3353 }, 3354 handle: { 3355 + type: "string", 3356 + description: "The handle of the author.", 3357 + format: "at-identifier", 3358 }, 3359 displayName: { 3360 + type: "string", 3361 + description: "The display name of the author.", 3362 }, 3363 avatar: { 3364 + type: "string", 3365 description: "The URL of the author's avatar image.", 3366 + format: "uri", 3367 }, 3368 }, 3369 }, 3370 shoutView: { 3371 + type: "object", 3372 properties: { 3373 id: { 3374 + type: "string", 3375 + description: "The unique identifier of the shout.", 3376 }, 3377 message: { 3378 + type: "string", 3379 + description: "The content of the shout.", 3380 }, 3381 parent: { 3382 + type: "string", 3383 description: 3384 + "The ID of the parent shout if this is a reply, otherwise null.", 3385 }, 3386 createdAt: { 3387 + type: "string", 3388 + description: "The date and time when the shout was created.", 3389 + format: "datetime", 3390 }, 3391 author: { 3392 + type: "ref", 3393 + description: "The author of the shout.", 3394 + ref: "lex:app.rocksky.shout.defs#author", 3395 }, 3396 }, 3397 }, ··· 3399 }, 3400 AppRockskyShoutGetAlbumShouts: { 3401 lexicon: 1, 3402 + id: "app.rocksky.shout.getAlbumShouts", 3403 defs: { 3404 main: { 3405 + type: "query", 3406 + description: "Get shouts for an album", 3407 parameters: { 3408 + type: "params", 3409 + required: ["uri"], 3410 properties: { 3411 uri: { 3412 + type: "string", 3413 description: 3414 + "The unique identifier of the album to retrieve shouts for", 3415 + format: "at-uri", 3416 }, 3417 limit: { 3418 + type: "integer", 3419 + description: "The maximum number of shouts to return", 3420 minimum: 1, 3421 }, 3422 offset: { 3423 + type: "integer", 3424 description: 3425 + "The number of shouts to skip before starting to collect the result set", 3426 minimum: 0, 3427 }, 3428 }, 3429 }, 3430 output: { 3431 + encoding: "application/json", 3432 schema: { 3433 + type: "object", 3434 properties: { 3435 shouts: { 3436 + type: "array", 3437 items: { 3438 + type: "ref", 3439 + ref: "lex:app.rocksky.shout.defs#shoutViewBasic", 3440 }, 3441 }, 3442 }, ··· 3447 }, 3448 AppRockskyShoutGetArtistShouts: { 3449 lexicon: 1, 3450 + id: "app.rocksky.shout.getArtistShouts", 3451 defs: { 3452 main: { 3453 + type: "query", 3454 + description: "Get shouts for an artist", 3455 parameters: { 3456 + type: "params", 3457 + required: ["uri"], 3458 properties: { 3459 uri: { 3460 + type: "string", 3461 + description: "The URI of the artist to retrieve shouts for", 3462 + format: "at-uri", 3463 }, 3464 limit: { 3465 + type: "integer", 3466 + description: "The maximum number of shouts to return", 3467 minimum: 1, 3468 }, 3469 offset: { 3470 + type: "integer", 3471 description: 3472 + "The number of shouts to skip before starting to collect the result set", 3473 minimum: 0, 3474 }, 3475 }, 3476 }, 3477 output: { 3478 + encoding: "application/json", 3479 schema: { 3480 + type: "object", 3481 properties: { 3482 shouts: { 3483 + type: "array", 3484 items: { 3485 + type: "ref", 3486 + ref: "lex:app.rocksky.shout.defs#shoutViewBasic", 3487 }, 3488 }, 3489 }, ··· 3494 }, 3495 AppRockskyShoutGetProfileShouts: { 3496 lexicon: 1, 3497 + id: "app.rocksky.shout.getProfileShouts", 3498 defs: { 3499 main: { 3500 + type: "query", 3501 description: "Get the shouts of an actor's profile", 3502 parameters: { 3503 + type: "params", 3504 + required: ["did"], 3505 properties: { 3506 did: { 3507 + type: "string", 3508 + description: "The DID or handle of the actor", 3509 + format: "at-identifier", 3510 }, 3511 offset: { 3512 + type: "integer", 3513 + description: "The offset for pagination", 3514 minimum: 0, 3515 }, 3516 limit: { 3517 + type: "integer", 3518 + description: "The maximum number of shouts to return", 3519 minimum: 1, 3520 }, 3521 }, 3522 }, 3523 output: { 3524 + encoding: "application/json", 3525 schema: { 3526 + type: "object", 3527 properties: { 3528 shouts: { 3529 + type: "array", 3530 items: { 3531 + type: "ref", 3532 + ref: "lex:app.rocksky.shout.defs#shoutViewBasic", 3533 }, 3534 }, 3535 }, ··· 3540 }, 3541 AppRockskyShoutGetShoutReplies: { 3542 lexicon: 1, 3543 + id: "app.rocksky.shout.getShoutReplies", 3544 defs: { 3545 main: { 3546 + type: "query", 3547 + description: "Get replies to a shout", 3548 parameters: { 3549 + type: "params", 3550 + required: ["uri"], 3551 properties: { 3552 uri: { 3553 + type: "string", 3554 + description: "The URI of the shout to retrieve replies for", 3555 + format: "at-uri", 3556 }, 3557 limit: { 3558 + type: "integer", 3559 + description: "The maximum number of shouts to return", 3560 minimum: 1, 3561 }, 3562 offset: { 3563 + type: "integer", 3564 description: 3565 + "The number of shouts to skip before starting to collect the result set", 3566 minimum: 0, 3567 }, 3568 }, 3569 }, 3570 output: { 3571 + encoding: "application/json", 3572 schema: { 3573 + type: "object", 3574 properties: { 3575 shouts: { 3576 + type: "array", 3577 items: { 3578 + type: "ref", 3579 + ref: "lex:app.rocksky.shout.defs#shoutViewBasic", 3580 }, 3581 }, 3582 }, ··· 3587 }, 3588 AppRockskyShoutGetTrackShouts: { 3589 lexicon: 1, 3590 + id: "app.rocksky.shout.getTrackShouts", 3591 defs: { 3592 main: { 3593 + type: "query", 3594 + description: "Get all shouts for a specific track", 3595 parameters: { 3596 + type: "params", 3597 + required: ["uri"], 3598 properties: { 3599 uri: { 3600 + type: "string", 3601 + description: "The URI of the track to retrieve shouts for", 3602 + format: "at-uri", 3603 }, 3604 }, 3605 }, 3606 output: { 3607 + encoding: "application/json", 3608 schema: { 3609 + type: "object", 3610 properties: { 3611 shouts: { 3612 + type: "array", 3613 items: { 3614 + type: "ref", 3615 + ref: "lex:app.rocksky.shout.defs#shoutViewBasic", 3616 }, 3617 }, 3618 }, ··· 3623 }, 3624 AppRockskyShoutRemoveShout: { 3625 lexicon: 1, 3626 + id: "app.rocksky.shout.removeShout", 3627 defs: { 3628 main: { 3629 + type: "procedure", 3630 + description: "Remove a shout by its ID", 3631 parameters: { 3632 + type: "params", 3633 + required: ["id"], 3634 properties: { 3635 id: { 3636 + type: "string", 3637 + description: "The ID of the shout to be removed", 3638 }, 3639 }, 3640 }, 3641 output: { 3642 + encoding: "application/json", 3643 schema: { 3644 + type: "ref", 3645 + ref: "lex:app.rocksky.shout.defs#shoutView", 3646 }, 3647 }, 3648 }, ··· 3650 }, 3651 AppRockskyShoutReplyShout: { 3652 lexicon: 1, 3653 + id: "app.rocksky.shout.replyShout", 3654 defs: { 3655 main: { 3656 + type: "procedure", 3657 + description: "Reply to a shout", 3658 input: { 3659 + encoding: "application/json", 3660 schema: { 3661 + type: "object", 3662 + required: ["shoutId", "message"], 3663 properties: { 3664 shoutId: { 3665 + type: "string", 3666 + description: "The unique identifier of the shout to reply to", 3667 }, 3668 message: { 3669 + type: "string", 3670 + description: "The content of the reply", 3671 minLength: 1, 3672 }, 3673 }, 3674 }, 3675 }, 3676 output: { 3677 + encoding: "application/json", 3678 schema: { 3679 + type: "ref", 3680 + ref: "lex:app.rocksky.shout.defs#shoutView", 3681 }, 3682 }, 3683 }, ··· 3685 }, 3686 AppRockskyShoutReportShout: { 3687 lexicon: 1, 3688 + id: "app.rocksky.shout.reportShout", 3689 defs: { 3690 main: { 3691 + type: "procedure", 3692 + description: "Report a shout for moderation", 3693 input: { 3694 + encoding: "application/json", 3695 schema: { 3696 + type: "object", 3697 + required: ["shoutId"], 3698 properties: { 3699 shoutId: { 3700 + type: "string", 3701 + description: "The unique identifier of the shout to report", 3702 }, 3703 reason: { 3704 + type: "string", 3705 + description: "The reason for reporting the shout", 3706 minLength: 1, 3707 }, 3708 }, 3709 }, 3710 }, 3711 output: { 3712 + encoding: "application/json", 3713 schema: { 3714 + type: "ref", 3715 + ref: "lex:app.rocksky.shout.defs#shoutView", 3716 }, 3717 }, 3718 }, ··· 3720 }, 3721 AppRockskyShout: { 3722 lexicon: 1, 3723 + id: "app.rocksky.shout", 3724 defs: { 3725 main: { 3726 + type: "record", 3727 + description: "A declaration of a shout.", 3728 + key: "tid", 3729 record: { 3730 + type: "object", 3731 + required: ["message", "createdAt", "subject"], 3732 properties: { 3733 message: { 3734 + type: "string", 3735 + description: "The message of the shout.", 3736 minLength: 1, 3737 maxLength: 1000, 3738 }, 3739 createdAt: { 3740 + type: "string", 3741 + description: "The date when the shout was created.", 3742 + format: "datetime", 3743 }, 3744 parent: { 3745 + type: "ref", 3746 + ref: "lex:com.atproto.repo.strongRef", 3747 }, 3748 subject: { 3749 + type: "ref", 3750 + ref: "lex:com.atproto.repo.strongRef", 3751 }, 3752 }, 3753 }, ··· 3756 }, 3757 AppRockskySongCreateSong: { 3758 lexicon: 1, 3759 + id: "app.rocksky.song.createSong", 3760 defs: { 3761 main: { 3762 + type: "procedure", 3763 + description: "Create a new song", 3764 input: { 3765 + encoding: "application/json", 3766 schema: { 3767 + type: "object", 3768 + required: ["title", "artist", "album", "albumArtist"], 3769 properties: { 3770 title: { 3771 + type: "string", 3772 + description: "The title of the song", 3773 }, 3774 artist: { 3775 + type: "string", 3776 + description: "The artist of the song", 3777 }, 3778 albumArtist: { 3779 + type: "string", 3780 description: 3781 + "The album artist of the song, if different from the main artist", 3782 }, 3783 album: { 3784 + type: "string", 3785 + description: "The album of the song, if applicable", 3786 }, 3787 duration: { 3788 + type: "integer", 3789 + description: "The duration of the song in seconds", 3790 }, 3791 mbId: { 3792 + type: "string", 3793 + description: "The MusicBrainz ID of the song, if available", 3794 }, 3795 albumArt: { 3796 + type: "string", 3797 + description: "The URL of the album art for the song", 3798 + format: "uri", 3799 }, 3800 trackNumber: { 3801 + type: "integer", 3802 description: 3803 + "The track number of the song in the album, if applicable", 3804 }, 3805 releaseDate: { 3806 + type: "string", 3807 description: 3808 + "The release date of the song, formatted as YYYY-MM-DD", 3809 }, 3810 year: { 3811 + type: "integer", 3812 + description: "The year the song was released", 3813 }, 3814 discNumber: { 3815 + type: "integer", 3816 description: 3817 + "The disc number of the song in the album, if applicable", 3818 }, 3819 lyrics: { 3820 + type: "string", 3821 + description: "The lyrics of the song, if available", 3822 }, 3823 }, 3824 }, 3825 }, 3826 output: { 3827 + encoding: "application/json", 3828 schema: { 3829 + type: "ref", 3830 + ref: "lex:app.rocksky.song.defs#songViewDetailed", 3831 }, 3832 }, 3833 }, ··· 3835 }, 3836 AppRockskySongDefs: { 3837 lexicon: 1, 3838 + id: "app.rocksky.song.defs", 3839 defs: { 3840 songViewBasic: { 3841 + type: "object", 3842 properties: { 3843 id: { 3844 + type: "string", 3845 + description: "The unique identifier of the song.", 3846 }, 3847 title: { 3848 + type: "string", 3849 + description: "The title of the song.", 3850 }, 3851 artist: { 3852 + type: "string", 3853 + description: "The artist of the song.", 3854 }, 3855 albumArtist: { 3856 + type: "string", 3857 + description: "The artist of the album the song belongs to.", 3858 }, 3859 albumArt: { 3860 + type: "string", 3861 + description: "The URL of the album art image.", 3862 + format: "uri", 3863 }, 3864 uri: { 3865 + type: "string", 3866 + description: "The URI of the song.", 3867 + format: "at-uri", 3868 }, 3869 album: { 3870 + type: "string", 3871 + description: "The album of the song.", 3872 }, 3873 duration: { 3874 + type: "integer", 3875 + description: "The duration of the song in milliseconds.", 3876 }, 3877 trackNumber: { 3878 + type: "integer", 3879 + description: "The track number of the song in the album.", 3880 }, 3881 discNumber: { 3882 + type: "integer", 3883 + description: "The disc number of the song in the album.", 3884 }, 3885 playCount: { 3886 + type: "integer", 3887 + description: "The number of times the song has been played.", 3888 minimum: 0, 3889 }, 3890 uniqueListeners: { 3891 + type: "integer", 3892 description: 3893 + "The number of unique listeners who have played the song.", 3894 minimum: 0, 3895 }, 3896 albumUri: { 3897 + type: "string", 3898 + description: "The URI of the album the song belongs to.", 3899 + format: "at-uri", 3900 }, 3901 artistUri: { 3902 + type: "string", 3903 + description: "The URI of the artist of the song.", 3904 + format: "at-uri", 3905 }, 3906 sha256: { 3907 + type: "string", 3908 + description: "The SHA256 hash of the song.", 3909 }, 3910 createdAt: { 3911 + type: "string", 3912 + description: "The timestamp when the song was created.", 3913 + format: "datetime", 3914 }, 3915 }, 3916 }, 3917 songViewDetailed: { 3918 + type: "object", 3919 properties: { 3920 id: { 3921 + type: "string", 3922 + description: "The unique identifier of the song.", 3923 }, 3924 title: { 3925 + type: "string", 3926 + description: "The title of the song.", 3927 }, 3928 artist: { 3929 + type: "string", 3930 + description: "The artist of the song.", 3931 }, 3932 albumArtist: { 3933 + type: "string", 3934 + description: "The artist of the album the song belongs to.", 3935 }, 3936 albumArt: { 3937 + type: "string", 3938 + description: "The URL of the album art image.", 3939 + format: "uri", 3940 }, 3941 uri: { 3942 + type: "string", 3943 + description: "The URI of the song.", 3944 + format: "at-uri", 3945 }, 3946 album: { 3947 + type: "string", 3948 + description: "The album of the song.", 3949 }, 3950 duration: { 3951 + type: "integer", 3952 + description: "The duration of the song in milliseconds.", 3953 }, 3954 trackNumber: { 3955 + type: "integer", 3956 + description: "The track number of the song in the album.", 3957 }, 3958 discNumber: { 3959 + type: "integer", 3960 + description: "The disc number of the song in the album.", 3961 }, 3962 playCount: { 3963 + type: "integer", 3964 + description: "The number of times the song has been played.", 3965 minimum: 0, 3966 }, 3967 uniqueListeners: { 3968 + type: "integer", 3969 description: 3970 + "The number of unique listeners who have played the song.", 3971 minimum: 0, 3972 }, 3973 albumUri: { 3974 + type: "string", 3975 + description: "The URI of the album the song belongs to.", 3976 + format: "at-uri", 3977 }, 3978 artistUri: { 3979 + type: "string", 3980 + description: "The URI of the artist of the song.", 3981 + format: "at-uri", 3982 }, 3983 sha256: { 3984 + type: "string", 3985 + description: "The SHA256 hash of the song.", 3986 }, 3987 createdAt: { 3988 + type: "string", 3989 + description: "The timestamp when the song was created.", 3990 + format: "datetime", 3991 }, 3992 }, 3993 }, ··· 3995 }, 3996 AppRockskySongGetSong: { 3997 lexicon: 1, 3998 + id: "app.rocksky.song.getSong", 3999 defs: { 4000 main: { 4001 + type: "query", 4002 + description: "Get a song by its uri", 4003 parameters: { 4004 + type: "params", 4005 + required: ["uri"], 4006 properties: { 4007 uri: { 4008 + type: "string", 4009 + description: "The unique identifier of the song to retrieve", 4010 + format: "at-uri", 4011 }, 4012 }, 4013 }, 4014 output: { 4015 + encoding: "application/json", 4016 schema: { 4017 + type: "ref", 4018 + ref: "lex:app.rocksky.song.defs#songViewDetailed", 4019 }, 4020 }, 4021 }, ··· 4023 }, 4024 AppRockskySongGetSongs: { 4025 lexicon: 1, 4026 + id: "app.rocksky.song.getSongs", 4027 defs: { 4028 main: { 4029 + type: "query", 4030 + description: "Get songs", 4031 parameters: { 4032 + type: "params", 4033 properties: { 4034 limit: { 4035 + type: "integer", 4036 + description: "The maximum number of songs to return", 4037 minimum: 1, 4038 }, 4039 offset: { 4040 + type: "integer", 4041 + description: "The offset for pagination", 4042 minimum: 0, 4043 }, 4044 }, 4045 }, 4046 output: { 4047 + encoding: "application/json", 4048 schema: { 4049 + type: "object", 4050 properties: { 4051 songs: { 4052 + type: "array", 4053 items: { 4054 + type: "ref", 4055 + ref: "lex:app.rocksky.song.defs#songViewBasic", 4056 }, 4057 }, 4058 }, ··· 4063 }, 4064 AppRockskySong: { 4065 lexicon: 1, 4066 + id: "app.rocksky.song", 4067 defs: { 4068 main: { 4069 + type: "record", 4070 + description: "A declaration of a song.", 4071 + key: "tid", 4072 record: { 4073 + type: "object", 4074 required: [ 4075 + "title", 4076 + "artist", 4077 + "album", 4078 + "albumArtist", 4079 + "duration", 4080 + "createdAt", 4081 ], 4082 properties: { 4083 title: { 4084 + type: "string", 4085 + description: "The title of the song.", 4086 minLength: 1, 4087 maxLength: 512, 4088 }, 4089 artist: { 4090 + type: "string", 4091 + description: "The artist of the song.", 4092 minLength: 1, 4093 maxLength: 256, 4094 }, 4095 albumArtist: { 4096 + type: "string", 4097 + description: "The album artist of the song.", 4098 minLength: 1, 4099 maxLength: 256, 4100 }, 4101 album: { 4102 + type: "string", 4103 + description: "The album of the song.", 4104 minLength: 1, 4105 maxLength: 256, 4106 }, 4107 duration: { 4108 + type: "integer", 4109 + description: "The duration of the song in seconds.", 4110 minimum: 1, 4111 }, 4112 trackNumber: { 4113 + type: "integer", 4114 + description: "The track number of the song in the album.", 4115 minimum: 1, 4116 }, 4117 discNumber: { 4118 + type: "integer", 4119 + description: "The disc number of the song in the album.", 4120 minimum: 1, 4121 }, 4122 releaseDate: { 4123 + type: "string", 4124 + description: "The release date of the song.", 4125 + format: "datetime", 4126 }, 4127 year: { 4128 + type: "integer", 4129 + description: "The year the song was released.", 4130 }, 4131 genre: { 4132 + type: "string", 4133 + description: "The genre of the song.", 4134 minLength: 1, 4135 maxLength: 256, 4136 }, 4137 tags: { 4138 + type: "array", 4139 + description: "The tags of the song.", 4140 items: { 4141 + type: "string", 4142 minLength: 1, 4143 maxLength: 256, 4144 }, 4145 }, 4146 composer: { 4147 + type: "string", 4148 + description: "The composer of the song.", 4149 maxLength: 256, 4150 }, 4151 lyrics: { 4152 + type: "string", 4153 + description: "The lyrics of the song.", 4154 maxLength: 10000, 4155 }, 4156 copyrightMessage: { 4157 + type: "string", 4158 + description: "The copyright message of the song.", 4159 maxLength: 256, 4160 }, 4161 wiki: { 4162 + type: "string", 4163 + description: "Informations about the song", 4164 maxLength: 10000, 4165 }, 4166 albumArt: { 4167 + type: "blob", 4168 + description: "The album art of the song.", 4169 + accept: ["image/png", "image/jpeg"], 4170 maxSize: 2000000, 4171 }, 4172 + albumArtUrl: { 4173 + type: "string", 4174 + description: "The URL of the album art of the song.", 4175 + format: "uri", 4176 + }, 4177 youtubeLink: { 4178 + type: "string", 4179 + description: "The YouTube link of the song.", 4180 + format: "uri", 4181 }, 4182 spotifyLink: { 4183 + type: "string", 4184 + description: "The Spotify link of the song.", 4185 + format: "uri", 4186 }, 4187 tidalLink: { 4188 + type: "string", 4189 + description: "The Tidal link of the song.", 4190 + format: "uri", 4191 }, 4192 appleMusicLink: { 4193 + type: "string", 4194 + description: "The Apple Music link of the song.", 4195 + format: "uri", 4196 }, 4197 createdAt: { 4198 + type: "string", 4199 + description: "The date when the song was created.", 4200 + format: "datetime", 4201 }, 4202 mbid: { 4203 + type: "string", 4204 + description: "The MusicBrainz ID of the song.", 4205 }, 4206 label: { 4207 + type: "string", 4208 + description: "The label of the song.", 4209 maxLength: 256, 4210 }, 4211 }, ··· 4215 }, 4216 AppRockskySpotifyDefs: { 4217 lexicon: 1, 4218 + id: "app.rocksky.spotify.defs", 4219 defs: { 4220 spotifyTrackView: { 4221 + type: "object", 4222 properties: { 4223 id: { 4224 + type: "string", 4225 + description: "The unique identifier of the Spotify track.", 4226 }, 4227 name: { 4228 + type: "string", 4229 + description: "The name of the track.", 4230 }, 4231 artist: { 4232 + type: "string", 4233 + description: "The name of the artist.", 4234 }, 4235 album: { 4236 + type: "string", 4237 + description: "The name of the album.", 4238 }, 4239 duration: { 4240 + type: "integer", 4241 + description: "The duration of the track in milliseconds.", 4242 }, 4243 previewUrl: { 4244 + type: "string", 4245 + description: "A URL to a preview of the track.", 4246 }, 4247 }, 4248 }, ··· 4250 }, 4251 AppRockskySpotifyGetCurrentlyPlaying: { 4252 lexicon: 1, 4253 + id: "app.rocksky.spotify.getCurrentlyPlaying", 4254 defs: { 4255 main: { 4256 + type: "query", 4257 + description: "Get the currently playing track", 4258 parameters: { 4259 + type: "params", 4260 properties: { 4261 actor: { 4262 + type: "string", 4263 description: 4264 + "Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user.", 4265 + format: "at-identifier", 4266 }, 4267 }, 4268 }, 4269 output: { 4270 + encoding: "application/json", 4271 schema: { 4272 + type: "ref", 4273 + ref: "lex:app.rocksky.player.defs#currentlyPlayingViewDetailed", 4274 }, 4275 }, 4276 }, ··· 4278 }, 4279 AppRockskySpotifyNext: { 4280 lexicon: 1, 4281 + id: "app.rocksky.spotify.next", 4282 defs: { 4283 main: { 4284 + type: "procedure", 4285 + description: "Play the next track in the queue", 4286 }, 4287 }, 4288 }, 4289 AppRockskySpotifyPause: { 4290 lexicon: 1, 4291 + id: "app.rocksky.spotify.pause", 4292 defs: { 4293 main: { 4294 + type: "procedure", 4295 + description: "Pause the currently playing track", 4296 }, 4297 }, 4298 }, 4299 AppRockskySpotifyPlay: { 4300 lexicon: 1, 4301 + id: "app.rocksky.spotify.play", 4302 defs: { 4303 main: { 4304 + type: "procedure", 4305 + description: "Resume playback of the currently paused track", 4306 }, 4307 }, 4308 }, 4309 AppRockskySpotifyPrevious: { 4310 lexicon: 1, 4311 + id: "app.rocksky.spotify.previous", 4312 defs: { 4313 main: { 4314 + type: "procedure", 4315 + description: "Play the previous track in the queue", 4316 }, 4317 }, 4318 }, 4319 AppRockskySpotifySeek: { 4320 lexicon: 1, 4321 + id: "app.rocksky.spotify.seek", 4322 defs: { 4323 main: { 4324 + type: "procedure", 4325 description: 4326 + "Seek to a specific position in the currently playing track", 4327 parameters: { 4328 + type: "params", 4329 + required: ["position"], 4330 properties: { 4331 position: { 4332 + type: "integer", 4333 + description: "The position in seconds to seek to", 4334 }, 4335 }, 4336 }, ··· 4339 }, 4340 AppRockskyStatsDefs: { 4341 lexicon: 1, 4342 + id: "app.rocksky.stats.defs", 4343 defs: { 4344 statsView: { 4345 + type: "object", 4346 properties: { 4347 scrobbles: { 4348 + type: "integer", 4349 + description: "The total number of scrobbles.", 4350 }, 4351 artists: { 4352 + type: "integer", 4353 + description: "The total number of unique artists scrobbled.", 4354 }, 4355 lovedTracks: { 4356 + type: "integer", 4357 + description: "The total number of tracks marked as loved.", 4358 }, 4359 albums: { 4360 + type: "integer", 4361 + description: "The total number of unique albums scrobbled.", 4362 }, 4363 tracks: { 4364 + type: "integer", 4365 + description: "The total number of unique tracks scrobbled.", 4366 }, 4367 }, 4368 }, ··· 4370 }, 4371 AppRockskyStatsGetStats: { 4372 lexicon: 1, 4373 + id: "app.rocksky.stats.getStats", 4374 defs: { 4375 main: { 4376 + type: "query", 4377 parameters: { 4378 + type: "params", 4379 + required: ["did"], 4380 properties: { 4381 did: { 4382 + type: "string", 4383 + description: "The DID or handle of the user to get stats for.", 4384 + format: "at-identifier", 4385 }, 4386 }, 4387 }, 4388 output: { 4389 + encoding: "application/json", 4390 schema: { 4391 + type: "ref", 4392 + ref: "lex:app.rocksky.stats.defs#statsView", 4393 }, 4394 }, 4395 }, ··· 4397 }, 4398 ComAtprotoRepoStrongRef: { 4399 lexicon: 1, 4400 + id: "com.atproto.repo.strongRef", 4401 + description: "A URI with a content-hash fingerprint.", 4402 defs: { 4403 main: { 4404 + type: "object", 4405 + required: ["uri", "cid"], 4406 properties: { 4407 uri: { 4408 + type: "string", 4409 + format: "at-uri", 4410 }, 4411 cid: { 4412 + type: "string", 4413 + format: "cid", 4414 }, 4415 }, 4416 }, 4417 }, 4418 }, 4419 + } as const satisfies Record<string, LexiconDoc>; 4420 4421 + export const schemas = Object.values(schemaDict); 4422 + export const lexicons: Lexicons = new Lexicons(schemas); 4423 export const ids = { 4424 + AppRockskyActorDefs: "app.rocksky.actor.defs", 4425 + AppRockskyActorGetActorAlbums: "app.rocksky.actor.getActorAlbums", 4426 + AppRockskyActorGetActorArtists: "app.rocksky.actor.getActorArtists", 4427 + AppRockskyActorGetActorLovedSongs: "app.rocksky.actor.getActorLovedSongs", 4428 + AppRockskyActorGetActorPlaylists: "app.rocksky.actor.getActorPlaylists", 4429 + AppRockskyActorGetActorScrobbles: "app.rocksky.actor.getActorScrobbles", 4430 + AppRockskyActorGetActorSongs: "app.rocksky.actor.getActorSongs", 4431 + AppRockskyActorGetProfile: "app.rocksky.actor.getProfile", 4432 + AppBskyActorProfile: "app.bsky.actor.profile", 4433 + AppRockskyAlbum: "app.rocksky.album", 4434 + AppRockskyAlbumDefs: "app.rocksky.album.defs", 4435 + AppRockskyAlbumGetAlbum: "app.rocksky.album.getAlbum", 4436 + AppRockskyAlbumGetAlbums: "app.rocksky.album.getAlbums", 4437 + AppRockskyAlbumGetAlbumTracks: "app.rocksky.album.getAlbumTracks", 4438 + AppRockskyApikeyCreateApikey: "app.rocksky.apikey.createApikey", 4439 + AppRockskyApikeyDefs: "app.rocksky.apikey.defs", 4440 + AppRockskyApikeysDefs: "app.rocksky.apikeys.defs", 4441 + AppRockskyApikeyGetApikeys: "app.rocksky.apikey.getApikeys", 4442 + AppRockskyApikeyRemoveApikey: "app.rocksky.apikey.removeApikey", 4443 + AppRockskyApikeyUpdateApikey: "app.rocksky.apikey.updateApikey", 4444 + AppRockskyArtist: "app.rocksky.artist", 4445 + AppRockskyArtistDefs: "app.rocksky.artist.defs", 4446 + AppRockskyArtistGetArtistAlbums: "app.rocksky.artist.getArtistAlbums", 4447 + AppRockskyArtistGetArtist: "app.rocksky.artist.getArtist", 4448 + AppRockskyArtistGetArtistListeners: "app.rocksky.artist.getArtistListeners", 4449 + AppRockskyArtistGetArtists: "app.rocksky.artist.getArtists", 4450 + AppRockskyArtistGetArtistTracks: "app.rocksky.artist.getArtistTracks", 4451 + AppRockskyChartsDefs: "app.rocksky.charts.defs", 4452 + AppRockskyChartsGetScrobblesChart: "app.rocksky.charts.getScrobblesChart", 4453 + AppRockskyDropboxDefs: "app.rocksky.dropbox.defs", 4454 + AppRockskyDropboxDownloadFile: "app.rocksky.dropbox.downloadFile", 4455 + AppRockskyDropboxGetFiles: "app.rocksky.dropbox.getFiles", 4456 + AppRockskyDropboxGetMetadata: "app.rocksky.dropbox.getMetadata", 4457 + AppRockskyDropboxGetTemporaryLink: "app.rocksky.dropbox.getTemporaryLink", 4458 + AppRockskyFeedDefs: "app.rocksky.feed.defs", 4459 + AppRockskyFeedGetNowPlayings: "app.rocksky.feed.getNowPlayings", 4460 + AppRockskyFeedSearch: "app.rocksky.feed.search", 4461 + AppRockskyGoogledriveDefs: "app.rocksky.googledrive.defs", 4462 + AppRockskyGoogledriveDownloadFile: "app.rocksky.googledrive.downloadFile", 4463 + AppRockskyGoogledriveGetFile: "app.rocksky.googledrive.getFile", 4464 + AppRockskyGoogledriveGetFiles: "app.rocksky.googledrive.getFiles", 4465 + AppRockskyLikeDislikeShout: "app.rocksky.like.dislikeShout", 4466 + AppRockskyLikeDislikeSong: "app.rocksky.like.dislikeSong", 4467 + AppRockskyLike: "app.rocksky.like", 4468 + AppRockskyLikeLikeShout: "app.rocksky.like.likeShout", 4469 + AppRockskyLikeLikeSong: "app.rocksky.like.likeSong", 4470 + AppRockskyPlayerAddDirectoryToQueue: "app.rocksky.player.addDirectoryToQueue", 4471 + AppRockskyPlayerAddItemsToQueue: "app.rocksky.player.addItemsToQueue", 4472 + AppRockskyPlayerDefs: "app.rocksky.player.defs", 4473 + AppRockskyPlayerGetCurrentlyPlaying: "app.rocksky.player.getCurrentlyPlaying", 4474 + AppRockskyPlayerGetPlaybackQueue: "app.rocksky.player.getPlaybackQueue", 4475 + AppRockskyPlayerNext: "app.rocksky.player.next", 4476 + AppRockskyPlayerPause: "app.rocksky.player.pause", 4477 + AppRockskyPlayerPlayDirectory: "app.rocksky.player.playDirectory", 4478 + AppRockskyPlayerPlayFile: "app.rocksky.player.playFile", 4479 + AppRockskyPlayerPlay: "app.rocksky.player.play", 4480 + AppRockskyPlayerPrevious: "app.rocksky.player.previous", 4481 + AppRockskyPlayerSeek: "app.rocksky.player.seek", 4482 + AppRockskyPlaylistCreatePlaylist: "app.rocksky.playlist.createPlaylist", 4483 + AppRockskyPlaylistDefs: "app.rocksky.playlist.defs", 4484 + AppRockskyPlaylistGetPlaylist: "app.rocksky.playlist.getPlaylist", 4485 + AppRockskyPlaylistGetPlaylists: "app.rocksky.playlist.getPlaylists", 4486 + AppRockskyPlaylistInsertDirectory: "app.rocksky.playlist.insertDirectory", 4487 + AppRockskyPlaylistInsertFiles: "app.rocksky.playlist.insertFiles", 4488 + AppRockskyPlaylist: "app.rocksky.playlist", 4489 + AppRockskyPlaylistRemovePlaylist: "app.rocksky.playlist.removePlaylist", 4490 + AppRockskyPlaylistRemoveTrack: "app.rocksky.playlist.removeTrack", 4491 + AppRockskyPlaylistStartPlaylist: "app.rocksky.playlist.startPlaylist", 4492 + AppRockskyRadioDefs: "app.rocksky.radio.defs", 4493 + AppRockskyRadio: "app.rocksky.radio", 4494 + AppRockskyScrobbleCreateScrobble: "app.rocksky.scrobble.createScrobble", 4495 + AppRockskyScrobbleDefs: "app.rocksky.scrobble.defs", 4496 + AppRockskyScrobbleGetScrobble: "app.rocksky.scrobble.getScrobble", 4497 + AppRockskyScrobbleGetScrobbles: "app.rocksky.scrobble.getScrobbles", 4498 + AppRockskyScrobble: "app.rocksky.scrobble", 4499 + AppRockskyShoutCreateShout: "app.rocksky.shout.createShout", 4500 + AppRockskyShoutDefs: "app.rocksky.shout.defs", 4501 + AppRockskyShoutGetAlbumShouts: "app.rocksky.shout.getAlbumShouts", 4502 + AppRockskyShoutGetArtistShouts: "app.rocksky.shout.getArtistShouts", 4503 + AppRockskyShoutGetProfileShouts: "app.rocksky.shout.getProfileShouts", 4504 + AppRockskyShoutGetShoutReplies: "app.rocksky.shout.getShoutReplies", 4505 + AppRockskyShoutGetTrackShouts: "app.rocksky.shout.getTrackShouts", 4506 + AppRockskyShoutRemoveShout: "app.rocksky.shout.removeShout", 4507 + AppRockskyShoutReplyShout: "app.rocksky.shout.replyShout", 4508 + AppRockskyShoutReportShout: "app.rocksky.shout.reportShout", 4509 + AppRockskyShout: "app.rocksky.shout", 4510 + AppRockskySongCreateSong: "app.rocksky.song.createSong", 4511 + AppRockskySongDefs: "app.rocksky.song.defs", 4512 + AppRockskySongGetSong: "app.rocksky.song.getSong", 4513 + AppRockskySongGetSongs: "app.rocksky.song.getSongs", 4514 + AppRockskySong: "app.rocksky.song", 4515 + AppRockskySpotifyDefs: "app.rocksky.spotify.defs", 4516 AppRockskySpotifyGetCurrentlyPlaying: 4517 + "app.rocksky.spotify.getCurrentlyPlaying", 4518 + AppRockskySpotifyNext: "app.rocksky.spotify.next", 4519 + AppRockskySpotifyPause: "app.rocksky.spotify.pause", 4520 + AppRockskySpotifyPlay: "app.rocksky.spotify.play", 4521 + AppRockskySpotifyPrevious: "app.rocksky.spotify.previous", 4522 + AppRockskySpotifySeek: "app.rocksky.spotify.seek", 4523 + AppRockskyStatsDefs: "app.rocksky.stats.defs", 4524 + AppRockskyStatsGetStats: "app.rocksky.stats.getStats", 4525 + ComAtprotoRepoStrongRef: "com.atproto.repo.strongRef", 4526 + };
+19 -19
apps/api/src/lexicon/types/app/bsky/actor/profile.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type { ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 - import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' 9 - import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' 10 11 export interface Record { 12 - displayName?: string 13 /** Free-form profile description text. */ 14 - description?: string 15 /** Small image to be displayed next to posts from account. AKA, 'profile picture' */ 16 - avatar?: BlobRef 17 /** Larger horizontal image to display behind profile view. */ 18 - banner?: BlobRef 19 labels?: 20 | ComAtprotoLabelDefs.SelfLabels 21 - | { $type: string; [k: string]: unknown } 22 - joinedViaStarterPack?: ComAtprotoRepoStrongRef.Main 23 - createdAt?: string 24 - [k: string]: unknown 25 } 26 27 export function isRecord(v: unknown): v is Record { 28 return ( 29 isObj(v) && 30 - hasProp(v, '$type') && 31 - (v.$type === 'app.bsky.actor.profile#main' || 32 - v.$type === 'app.bsky.actor.profile') 33 - ) 34 } 35 36 export function validateRecord(v: unknown): ValidationResult { 37 - return lexicons.validate('app.bsky.actor.profile#main', v) 38 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 + import * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs"; 9 + import * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef"; 10 11 export interface Record { 12 + displayName?: string; 13 /** Free-form profile description text. */ 14 + description?: string; 15 /** Small image to be displayed next to posts from account. AKA, 'profile picture' */ 16 + avatar?: BlobRef; 17 /** Larger horizontal image to display behind profile view. */ 18 + banner?: BlobRef; 19 labels?: 20 | ComAtprotoLabelDefs.SelfLabels 21 + | { $type: string; [k: string]: unknown }; 22 + joinedViaStarterPack?: ComAtprotoRepoStrongRef.Main; 23 + createdAt?: string; 24 + [k: string]: unknown; 25 } 26 27 export function isRecord(v: unknown): v is Record { 28 return ( 29 isObj(v) && 30 + hasProp(v, "$type") && 31 + (v.$type === "app.bsky.actor.profile#main" || 32 + v.$type === "app.bsky.actor.profile") 33 + ); 34 } 35 36 export function validateRecord(v: unknown): ValidationResult { 37 + return lexicons.validate("app.bsky.actor.profile#main", v); 38 }
+28 -28
apps/api/src/lexicon/types/app/rocksky/actor/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface ProfileViewDetailed { 10 /** The unique identifier of the actor. */ 11 - id?: string 12 /** The DID of the actor. */ 13 - did?: string 14 /** The handle of the actor. */ 15 - handle?: string 16 /** The display name of the actor. */ 17 - displayName?: string 18 /** The URL of the actor's avatar image. */ 19 - avatar?: string 20 /** The date and time when the actor was created. */ 21 - createdAt?: string 22 /** The date and time when the actor was last updated. */ 23 - updatedAt?: string 24 - [k: string]: unknown 25 } 26 27 export function isProfileViewDetailed(v: unknown): v is ProfileViewDetailed { 28 return ( 29 isObj(v) && 30 - hasProp(v, '$type') && 31 - v.$type === 'app.rocksky.actor.defs#profileViewDetailed' 32 - ) 33 } 34 35 export function validateProfileViewDetailed(v: unknown): ValidationResult { 36 - return lexicons.validate('app.rocksky.actor.defs#profileViewDetailed', v) 37 } 38 39 export interface ProfileViewBasic { 40 /** The unique identifier of the actor. */ 41 - id?: string 42 /** The DID of the actor. */ 43 - did?: string 44 /** The handle of the actor. */ 45 - handle?: string 46 /** The display name of the actor. */ 47 - displayName?: string 48 /** The URL of the actor's avatar image. */ 49 - avatar?: string 50 /** The date and time when the actor was created. */ 51 - createdAt?: string 52 /** The date and time when the actor was last updated. */ 53 - updatedAt?: string 54 - [k: string]: unknown 55 } 56 57 export function isProfileViewBasic(v: unknown): v is ProfileViewBasic { 58 return ( 59 isObj(v) && 60 - hasProp(v, '$type') && 61 - v.$type === 'app.rocksky.actor.defs#profileViewBasic' 62 - ) 63 } 64 65 export function validateProfileViewBasic(v: unknown): ValidationResult { 66 - return lexicons.validate('app.rocksky.actor.defs#profileViewBasic', v) 67 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface ProfileViewDetailed { 10 /** The unique identifier of the actor. */ 11 + id?: string; 12 /** The DID of the actor. */ 13 + did?: string; 14 /** The handle of the actor. */ 15 + handle?: string; 16 /** The display name of the actor. */ 17 + displayName?: string; 18 /** The URL of the actor's avatar image. */ 19 + avatar?: string; 20 /** The date and time when the actor was created. */ 21 + createdAt?: string; 22 /** The date and time when the actor was last updated. */ 23 + updatedAt?: string; 24 + [k: string]: unknown; 25 } 26 27 export function isProfileViewDetailed(v: unknown): v is ProfileViewDetailed { 28 return ( 29 isObj(v) && 30 + hasProp(v, "$type") && 31 + v.$type === "app.rocksky.actor.defs#profileViewDetailed" 32 + ); 33 } 34 35 export function validateProfileViewDetailed(v: unknown): ValidationResult { 36 + return lexicons.validate("app.rocksky.actor.defs#profileViewDetailed", v); 37 } 38 39 export interface ProfileViewBasic { 40 /** The unique identifier of the actor. */ 41 + id?: string; 42 /** The DID of the actor. */ 43 + did?: string; 44 /** The handle of the actor. */ 45 + handle?: string; 46 /** The display name of the actor. */ 47 + displayName?: string; 48 /** The URL of the actor's avatar image. */ 49 + avatar?: string; 50 /** The date and time when the actor was created. */ 51 + createdAt?: string; 52 /** The date and time when the actor was last updated. */ 53 + updatedAt?: string; 54 + [k: string]: unknown; 55 } 56 57 export function isProfileViewBasic(v: unknown): v is ProfileViewBasic { 58 return ( 59 isObj(v) && 60 + hasProp(v, "$type") && 61 + v.$type === "app.rocksky.actor.defs#profileViewBasic" 62 + ); 63 } 64 65 export function validateProfileViewBasic(v: unknown): ValidationResult { 66 + return lexicons.validate("app.rocksky.actor.defs#profileViewBasic", v); 67 }
+28 -28
apps/api/src/lexicon/types/app/rocksky/actor/getActorAlbums.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyAlbumDefs from '../album/defs' 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 - did: string 15 /** The maximum number of albums to return */ 16 - limit?: number 17 /** The offset for pagination */ 18 - offset?: number 19 } 20 21 - export type InputSchema = undefined 22 23 export interface OutputSchema { 24 - albums?: AppRockskyAlbumDefs.AlbumViewBasic[] 25 - [k: string]: unknown 26 } 27 28 - export type HandlerInput = undefined 29 30 export interface HandlerSuccess { 31 - encoding: 'application/json' 32 - body: OutputSchema 33 - headers?: { [key: string]: string } 34 } 35 36 export interface HandlerError { 37 - status: number 38 - message?: string 39 } 40 41 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 - auth: HA 44 - params: QueryParams 45 - input: HandlerInput 46 - req: express.Request 47 - res: express.Response 48 - resetRouteRateLimits: () => Promise<void> 49 - } 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyAlbumDefs from "../album/defs"; 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 + did: string; 15 /** The maximum number of albums to return */ 16 + limit?: number; 17 /** The offset for pagination */ 18 + offset?: number; 19 } 20 21 + export type InputSchema = undefined; 22 23 export interface OutputSchema { 24 + albums?: AppRockskyAlbumDefs.AlbumViewBasic[]; 25 + [k: string]: unknown; 26 } 27 28 + export type HandlerInput = undefined; 29 30 export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 } 35 36 export interface HandlerError { 37 + status: number; 38 + message?: string; 39 } 40 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+28 -28
apps/api/src/lexicon/types/app/rocksky/actor/getActorArtists.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyArtistDefs from '../artist/defs' 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 - did: string 15 /** The maximum number of albums to return */ 16 - limit?: number 17 /** The offset for pagination */ 18 - offset?: number 19 } 20 21 - export type InputSchema = undefined 22 23 export interface OutputSchema { 24 - artists?: AppRockskyArtistDefs.ArtistViewBasic[] 25 - [k: string]: unknown 26 } 27 28 - export type HandlerInput = undefined 29 30 export interface HandlerSuccess { 31 - encoding: 'application/json' 32 - body: OutputSchema 33 - headers?: { [key: string]: string } 34 } 35 36 export interface HandlerError { 37 - status: number 38 - message?: string 39 } 40 41 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 - auth: HA 44 - params: QueryParams 45 - input: HandlerInput 46 - req: express.Request 47 - res: express.Response 48 - resetRouteRateLimits: () => Promise<void> 49 - } 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyArtistDefs from "../artist/defs"; 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 + did: string; 15 /** The maximum number of albums to return */ 16 + limit?: number; 17 /** The offset for pagination */ 18 + offset?: number; 19 } 20 21 + export type InputSchema = undefined; 22 23 export interface OutputSchema { 24 + artists?: AppRockskyArtistDefs.ArtistViewBasic[]; 25 + [k: string]: unknown; 26 } 27 28 + export type HandlerInput = undefined; 29 30 export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 } 35 36 export interface HandlerError { 37 + status: number; 38 + message?: string; 39 } 40 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+28 -28
apps/api/src/lexicon/types/app/rocksky/actor/getActorLovedSongs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskySongDefs from '../song/defs' 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 - did: string 15 /** The maximum number of albums to return */ 16 - limit?: number 17 /** The offset for pagination */ 18 - offset?: number 19 } 20 21 - export type InputSchema = undefined 22 23 export interface OutputSchema { 24 - tracks?: AppRockskySongDefs.SongViewBasic[] 25 - [k: string]: unknown 26 } 27 28 - export type HandlerInput = undefined 29 30 export interface HandlerSuccess { 31 - encoding: 'application/json' 32 - body: OutputSchema 33 - headers?: { [key: string]: string } 34 } 35 36 export interface HandlerError { 37 - status: number 38 - message?: string 39 } 40 41 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 - auth: HA 44 - params: QueryParams 45 - input: HandlerInput 46 - req: express.Request 47 - res: express.Response 48 - resetRouteRateLimits: () => Promise<void> 49 - } 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskySongDefs from "../song/defs"; 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 + did: string; 15 /** The maximum number of albums to return */ 16 + limit?: number; 17 /** The offset for pagination */ 18 + offset?: number; 19 } 20 21 + export type InputSchema = undefined; 22 23 export interface OutputSchema { 24 + tracks?: AppRockskySongDefs.SongViewBasic[]; 25 + [k: string]: unknown; 26 } 27 28 + export type HandlerInput = undefined; 29 30 export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 } 35 36 export interface HandlerError { 37 + status: number; 38 + message?: string; 39 } 40 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+28 -28
apps/api/src/lexicon/types/app/rocksky/actor/getActorPlaylists.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyPlaylistDefs from '../playlist/defs' 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 - did: string 15 /** The maximum number of albums to return */ 16 - limit?: number 17 /** The offset for pagination */ 18 - offset?: number 19 } 20 21 - export type InputSchema = undefined 22 23 export interface OutputSchema { 24 - playlists?: AppRockskyPlaylistDefs.PlaylistViewBasic[] 25 - [k: string]: unknown 26 } 27 28 - export type HandlerInput = undefined 29 30 export interface HandlerSuccess { 31 - encoding: 'application/json' 32 - body: OutputSchema 33 - headers?: { [key: string]: string } 34 } 35 36 export interface HandlerError { 37 - status: number 38 - message?: string 39 } 40 41 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 - auth: HA 44 - params: QueryParams 45 - input: HandlerInput 46 - req: express.Request 47 - res: express.Response 48 - resetRouteRateLimits: () => Promise<void> 49 - } 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyPlaylistDefs from "../playlist/defs"; 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 + did: string; 15 /** The maximum number of albums to return */ 16 + limit?: number; 17 /** The offset for pagination */ 18 + offset?: number; 19 } 20 21 + export type InputSchema = undefined; 22 23 export interface OutputSchema { 24 + playlists?: AppRockskyPlaylistDefs.PlaylistViewBasic[]; 25 + [k: string]: unknown; 26 } 27 28 + export type HandlerInput = undefined; 29 30 export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 } 35 36 export interface HandlerError { 37 + status: number; 38 + message?: string; 39 } 40 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+28 -28
apps/api/src/lexicon/types/app/rocksky/actor/getActorScrobbles.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyScrobbleDefs from '../scrobble/defs' 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 - did: string 15 /** The maximum number of albums to return */ 16 - limit?: number 17 /** The offset for pagination */ 18 - offset?: number 19 } 20 21 - export type InputSchema = undefined 22 23 export interface OutputSchema { 24 - scrobbles?: AppRockskyScrobbleDefs.ScrobbleViewBasic[] 25 - [k: string]: unknown 26 } 27 28 - export type HandlerInput = undefined 29 30 export interface HandlerSuccess { 31 - encoding: 'application/json' 32 - body: OutputSchema 33 - headers?: { [key: string]: string } 34 } 35 36 export interface HandlerError { 37 - status: number 38 - message?: string 39 } 40 41 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 - auth: HA 44 - params: QueryParams 45 - input: HandlerInput 46 - req: express.Request 47 - res: express.Response 48 - resetRouteRateLimits: () => Promise<void> 49 - } 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyScrobbleDefs from "../scrobble/defs"; 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 + did: string; 15 /** The maximum number of albums to return */ 16 + limit?: number; 17 /** The offset for pagination */ 18 + offset?: number; 19 } 20 21 + export type InputSchema = undefined; 22 23 export interface OutputSchema { 24 + scrobbles?: AppRockskyScrobbleDefs.ScrobbleViewBasic[]; 25 + [k: string]: unknown; 26 } 27 28 + export type HandlerInput = undefined; 29 30 export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 } 35 36 export interface HandlerError { 37 + status: number; 38 + message?: string; 39 } 40 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+28 -28
apps/api/src/lexicon/types/app/rocksky/actor/getActorSongs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskySongDefs from '../song/defs' 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 - did: string 15 /** The maximum number of albums to return */ 16 - limit?: number 17 /** The offset for pagination */ 18 - offset?: number 19 } 20 21 - export type InputSchema = undefined 22 23 export interface OutputSchema { 24 - songs?: AppRockskySongDefs.SongViewBasic[] 25 - [k: string]: unknown 26 } 27 28 - export type HandlerInput = undefined 29 30 export interface HandlerSuccess { 31 - encoding: 'application/json' 32 - body: OutputSchema 33 - headers?: { [key: string]: string } 34 } 35 36 export interface HandlerError { 37 - status: number 38 - message?: string 39 } 40 41 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 - auth: HA 44 - params: QueryParams 45 - input: HandlerInput 46 - req: express.Request 47 - res: express.Response 48 - resetRouteRateLimits: () => Promise<void> 49 - } 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskySongDefs from "../song/defs"; 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 + did: string; 15 /** The maximum number of albums to return */ 16 + limit?: number; 17 /** The offset for pagination */ 18 + offset?: number; 19 } 20 21 + export type InputSchema = undefined; 22 23 export interface OutputSchema { 24 + songs?: AppRockskySongDefs.SongViewBasic[]; 25 + [k: string]: unknown; 26 } 27 28 + export type HandlerInput = undefined; 29 30 export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 } 35 36 export interface HandlerError { 37 + status: number; 38 + message?: string; 39 } 40 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+25 -25
apps/api/src/lexicon/types/app/rocksky/actor/getProfile.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyActorDefs from './defs' 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 - did?: string 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskyActorDefs.ProfileViewDetailed 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyActorDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 + did?: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskyActorDefs.ProfileViewDetailed; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+24 -22
apps/api/src/lexicon/types/app/rocksky/album.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type { ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../lexicons' 6 - import { isObj, hasProp } from '../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface Record { 10 /** The title of the album. */ 11 - title: string 12 /** The artist of the album. */ 13 - artist: string 14 /** The duration of the album in seconds. */ 15 - duration?: number 16 /** The release date of the album. */ 17 - releaseDate?: string 18 /** The year the album was released. */ 19 - year?: number 20 /** The genre of the album. */ 21 - genre?: string 22 /** The album art of the album. */ 23 - albumArt?: BlobRef 24 /** The tags of the album. */ 25 - tags?: string[] 26 /** The YouTube link of the album. */ 27 - youtubeLink?: string 28 /** The Spotify link of the album. */ 29 - spotifyLink?: string 30 /** The tidal link of the album. */ 31 - tidalLink?: string 32 /** The Apple Music link of the album. */ 33 - appleMusicLink?: string 34 /** The date and time when the album was created. */ 35 - createdAt: string 36 - [k: string]: unknown 37 } 38 39 export function isRecord(v: unknown): v is Record { 40 return ( 41 isObj(v) && 42 - hasProp(v, '$type') && 43 - (v.$type === 'app.rocksky.album#main' || v.$type === 'app.rocksky.album') 44 - ) 45 } 46 47 export function validateRecord(v: unknown): ValidationResult { 48 - return lexicons.validate('app.rocksky.album#main', v) 49 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../lexicons"; 6 + import { isObj, hasProp } from "../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface Record { 10 /** The title of the album. */ 11 + title: string; 12 /** The artist of the album. */ 13 + artist: string; 14 /** The duration of the album in seconds. */ 15 + duration?: number; 16 /** The release date of the album. */ 17 + releaseDate?: string; 18 /** The year the album was released. */ 19 + year?: number; 20 /** The genre of the album. */ 21 + genre?: string; 22 /** The album art of the album. */ 23 + albumArt?: BlobRef; 24 + /** The URL of the album art of the album. */ 25 + albumArtUrl?: string; 26 /** The tags of the album. */ 27 + tags?: string[]; 28 /** The YouTube link of the album. */ 29 + youtubeLink?: string; 30 /** The Spotify link of the album. */ 31 + spotifyLink?: string; 32 /** The tidal link of the album. */ 33 + tidalLink?: string; 34 /** The Apple Music link of the album. */ 35 + appleMusicLink?: string; 36 /** The date and time when the album was created. */ 37 + createdAt: string; 38 + [k: string]: unknown; 39 } 40 41 export function isRecord(v: unknown): v is Record { 42 return ( 43 isObj(v) && 44 + hasProp(v, "$type") && 45 + (v.$type === "app.rocksky.album#main" || v.$type === "app.rocksky.album") 46 + ); 47 } 48 49 export function validateRecord(v: unknown): ValidationResult { 50 + return lexicons.validate("app.rocksky.album#main", v); 51 }
+38 -38
apps/api/src/lexicon/types/app/rocksky/album/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 - import type * as AppRockskySongDefsSongViewBasic from '../song/defs/songViewBasic' 9 10 export interface AlbumViewBasic { 11 /** The unique identifier of the album. */ 12 - id?: string 13 /** The URI of the album. */ 14 - uri?: string 15 /** The title of the album. */ 16 - title?: string 17 /** The artist of the album. */ 18 - artist?: string 19 /** The URI of the album's artist. */ 20 - artistUri?: string 21 /** The year the album was released. */ 22 - year?: number 23 /** The URL of the album art image. */ 24 - albumArt?: string 25 /** The release date of the album. */ 26 - releaseDate?: string 27 /** The SHA256 hash of the album. */ 28 - sha256?: string 29 /** The number of times the album has been played. */ 30 - playCount?: number 31 /** The number of unique listeners who have played the album. */ 32 - uniqueListeners?: number 33 - [k: string]: unknown 34 } 35 36 export function isAlbumViewBasic(v: unknown): v is AlbumViewBasic { 37 return ( 38 isObj(v) && 39 - hasProp(v, '$type') && 40 - v.$type === 'app.rocksky.album.defs#albumViewBasic' 41 - ) 42 } 43 44 export function validateAlbumViewBasic(v: unknown): ValidationResult { 45 - return lexicons.validate('app.rocksky.album.defs#albumViewBasic', v) 46 } 47 48 export interface AlbumViewDetailed { 49 /** The unique identifier of the album. */ 50 - id?: string 51 /** The URI of the album. */ 52 - uri?: string 53 /** The title of the album. */ 54 - title?: string 55 /** The artist of the album. */ 56 - artist?: string 57 /** The URI of the album's artist. */ 58 - artistUri?: string 59 /** The year the album was released. */ 60 - year?: number 61 /** The URL of the album art image. */ 62 - albumArt?: string 63 /** The release date of the album. */ 64 - releaseDate?: string 65 /** The SHA256 hash of the album. */ 66 - sha256?: string 67 /** The number of times the album has been played. */ 68 - playCount?: number 69 /** The number of unique listeners who have played the album. */ 70 - uniqueListeners?: number 71 - tracks?: AppRockskySongDefsSongViewBasic.Main[] 72 - [k: string]: unknown 73 } 74 75 export function isAlbumViewDetailed(v: unknown): v is AlbumViewDetailed { 76 return ( 77 isObj(v) && 78 - hasProp(v, '$type') && 79 - v.$type === 'app.rocksky.album.defs#albumViewDetailed' 80 - ) 81 } 82 83 export function validateAlbumViewDetailed(v: unknown): ValidationResult { 84 - return lexicons.validate('app.rocksky.album.defs#albumViewDetailed', v) 85 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 + import * as AppRockskySongDefsSongViewBasic from "../song/defs/songViewBasic"; 9 10 export interface AlbumViewBasic { 11 /** The unique identifier of the album. */ 12 + id?: string; 13 /** The URI of the album. */ 14 + uri?: string; 15 /** The title of the album. */ 16 + title?: string; 17 /** The artist of the album. */ 18 + artist?: string; 19 /** The URI of the album's artist. */ 20 + artistUri?: string; 21 /** The year the album was released. */ 22 + year?: number; 23 /** The URL of the album art image. */ 24 + albumArt?: string; 25 /** The release date of the album. */ 26 + releaseDate?: string; 27 /** The SHA256 hash of the album. */ 28 + sha256?: string; 29 /** The number of times the album has been played. */ 30 + playCount?: number; 31 /** The number of unique listeners who have played the album. */ 32 + uniqueListeners?: number; 33 + [k: string]: unknown; 34 } 35 36 export function isAlbumViewBasic(v: unknown): v is AlbumViewBasic { 37 return ( 38 isObj(v) && 39 + hasProp(v, "$type") && 40 + v.$type === "app.rocksky.album.defs#albumViewBasic" 41 + ); 42 } 43 44 export function validateAlbumViewBasic(v: unknown): ValidationResult { 45 + return lexicons.validate("app.rocksky.album.defs#albumViewBasic", v); 46 } 47 48 export interface AlbumViewDetailed { 49 /** The unique identifier of the album. */ 50 + id?: string; 51 /** The URI of the album. */ 52 + uri?: string; 53 /** The title of the album. */ 54 + title?: string; 55 /** The artist of the album. */ 56 + artist?: string; 57 /** The URI of the album's artist. */ 58 + artistUri?: string; 59 /** The year the album was released. */ 60 + year?: number; 61 /** The URL of the album art image. */ 62 + albumArt?: string; 63 /** The release date of the album. */ 64 + releaseDate?: string; 65 /** The SHA256 hash of the album. */ 66 + sha256?: string; 67 /** The number of times the album has been played. */ 68 + playCount?: number; 69 /** The number of unique listeners who have played the album. */ 70 + uniqueListeners?: number; 71 + tracks?: AppRockskySongDefsSongViewBasic.Main[]; 72 + [k: string]: unknown; 73 } 74 75 export function isAlbumViewDetailed(v: unknown): v is AlbumViewDetailed { 76 return ( 77 isObj(v) && 78 + hasProp(v, "$type") && 79 + v.$type === "app.rocksky.album.defs#albumViewDetailed" 80 + ); 81 } 82 83 export function validateAlbumViewDetailed(v: unknown): ValidationResult { 84 + return lexicons.validate("app.rocksky.album.defs#albumViewDetailed", v); 85 }
+25 -25
apps/api/src/lexicon/types/app/rocksky/album/getAlbum.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyAlbumDefs from './defs' 11 12 export interface QueryParams { 13 /** The URI of the album to retrieve. */ 14 - uri: string 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskyAlbumDefs.AlbumViewDetailed 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyAlbumDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The URI of the album to retrieve. */ 14 + uri: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskyAlbumDefs.AlbumViewDetailed; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+26 -26
apps/api/src/lexicon/types/app/rocksky/album/getAlbumTracks.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskySongDefs from '../song/defs' 11 12 export interface QueryParams { 13 /** The URI of the album to retrieve tracks from */ 14 - uri: string 15 } 16 17 - export type InputSchema = undefined 18 19 export interface OutputSchema { 20 - tracks?: AppRockskySongDefs.SongViewBasic[] 21 - [k: string]: unknown 22 } 23 24 - export type HandlerInput = undefined 25 26 export interface HandlerSuccess { 27 - encoding: 'application/json' 28 - body: OutputSchema 29 - headers?: { [key: string]: string } 30 } 31 32 export interface HandlerError { 33 - status: number 34 - message?: string 35 } 36 37 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 38 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 39 - auth: HA 40 - params: QueryParams 41 - input: HandlerInput 42 - req: express.Request 43 - res: express.Response 44 - resetRouteRateLimits: () => Promise<void> 45 - } 46 export type Handler<HA extends HandlerAuth = never> = ( 47 ctx: HandlerReqCtx<HA>, 48 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskySongDefs from "../song/defs"; 11 12 export interface QueryParams { 13 /** The URI of the album to retrieve tracks from */ 14 + uri: string; 15 } 16 17 + export type InputSchema = undefined; 18 19 export interface OutputSchema { 20 + tracks?: AppRockskySongDefs.SongViewBasic[]; 21 + [k: string]: unknown; 22 } 23 24 + export type HandlerInput = undefined; 25 26 export interface HandlerSuccess { 27 + encoding: "application/json"; 28 + body: OutputSchema; 29 + headers?: { [key: string]: string }; 30 } 31 32 export interface HandlerError { 33 + status: number; 34 + message?: string; 35 } 36 37 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 38 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 39 + auth: HA; 40 + params: QueryParams; 41 + input: HandlerInput; 42 + req: express.Request; 43 + res: express.Response; 44 + resetRouteRateLimits: () => Promise<void>; 45 + }; 46 export type Handler<HA extends HandlerAuth = never> = ( 47 ctx: HandlerReqCtx<HA>, 48 + ) => Promise<HandlerOutput> | HandlerOutput;
+27 -27
apps/api/src/lexicon/types/app/rocksky/album/getAlbums.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyAlbumDefs from './defs' 11 12 export interface QueryParams { 13 /** The maximum number of albums to return */ 14 - limit?: number 15 /** The offset for pagination */ 16 - offset?: number 17 } 18 19 - export type InputSchema = undefined 20 21 export interface OutputSchema { 22 - albums?: AppRockskyAlbumDefs.AlbumViewBasic[] 23 - [k: string]: unknown 24 } 25 26 - export type HandlerInput = undefined 27 28 export interface HandlerSuccess { 29 - encoding: 'application/json' 30 - body: OutputSchema 31 - headers?: { [key: string]: string } 32 } 33 34 export interface HandlerError { 35 - status: number 36 - message?: string 37 } 38 39 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 40 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 41 - auth: HA 42 - params: QueryParams 43 - input: HandlerInput 44 - req: express.Request 45 - res: express.Response 46 - resetRouteRateLimits: () => Promise<void> 47 - } 48 export type Handler<HA extends HandlerAuth = never> = ( 49 ctx: HandlerReqCtx<HA>, 50 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyAlbumDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The maximum number of albums to return */ 14 + limit?: number; 15 /** The offset for pagination */ 16 + offset?: number; 17 } 18 19 + export type InputSchema = undefined; 20 21 export interface OutputSchema { 22 + albums?: AppRockskyAlbumDefs.AlbumViewBasic[]; 23 + [k: string]: unknown; 24 } 25 26 + export type HandlerInput = undefined; 27 28 export interface HandlerSuccess { 29 + encoding: "application/json"; 30 + body: OutputSchema; 31 + headers?: { [key: string]: string }; 32 } 33 34 export interface HandlerError { 35 + status: number; 36 + message?: string; 37 } 38 39 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 40 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 41 + auth: HA; 42 + params: QueryParams; 43 + input: HandlerInput; 44 + req: express.Request; 45 + res: express.Response; 46 + resetRouteRateLimits: () => Promise<void>; 47 + }; 48 export type Handler<HA extends HandlerAuth = never> = ( 49 ctx: HandlerReqCtx<HA>, 50 + ) => Promise<HandlerOutput> | HandlerOutput;
+28 -28
apps/api/src/lexicon/types/app/rocksky/apikey/createApikey.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyApikeyDefs from './defs' 11 12 - export type QueryParams = {} 13 14 export interface InputSchema { 15 /** The name of the API key. */ 16 - name: string 17 /** A description for the API key. */ 18 - description?: string 19 - [k: string]: unknown 20 } 21 22 - export type OutputSchema = AppRockskyApikeyDefs.ApiKey 23 24 export interface HandlerInput { 25 - encoding: 'application/json' 26 - body: InputSchema 27 } 28 29 export interface HandlerSuccess { 30 - encoding: 'application/json' 31 - body: OutputSchema 32 - headers?: { [key: string]: string } 33 } 34 35 export interface HandlerError { 36 - status: number 37 - message?: string 38 } 39 40 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 41 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 42 - auth: HA 43 - params: QueryParams 44 - input: HandlerInput 45 - req: express.Request 46 - res: express.Response 47 - resetRouteRateLimits: () => Promise<void> 48 - } 49 export type Handler<HA extends HandlerAuth = never> = ( 50 ctx: HandlerReqCtx<HA>, 51 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyApikeyDefs from "./defs"; 11 12 + export interface QueryParams {} 13 14 export interface InputSchema { 15 /** The name of the API key. */ 16 + name: string; 17 /** A description for the API key. */ 18 + description?: string; 19 + [k: string]: unknown; 20 } 21 22 + export type OutputSchema = AppRockskyApikeyDefs.ApiKey; 23 24 export interface HandlerInput { 25 + encoding: "application/json"; 26 + body: InputSchema; 27 } 28 29 export interface HandlerSuccess { 30 + encoding: "application/json"; 31 + body: OutputSchema; 32 + headers?: { [key: string]: string }; 33 } 34 35 export interface HandlerError { 36 + status: number; 37 + message?: string; 38 } 39 40 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 41 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 42 + auth: HA; 43 + params: QueryParams; 44 + input: HandlerInput; 45 + req: express.Request; 46 + res: express.Response; 47 + resetRouteRateLimits: () => Promise<void>; 48 + }; 49 export type Handler<HA extends HandlerAuth = never> = ( 50 ctx: HandlerReqCtx<HA>, 51 + ) => Promise<HandlerOutput> | HandlerOutput;
+13 -13
apps/api/src/lexicon/types/app/rocksky/apikey/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface ApiKeyView { 10 /** The unique identifier of the API key. */ 11 - id?: string 12 /** The name of the API key. */ 13 - name?: string 14 /** A description for the API key. */ 15 - description?: string 16 /** The date and time when the API key was created. */ 17 - createdAt?: string 18 - [k: string]: unknown 19 } 20 21 export function isApiKeyView(v: unknown): v is ApiKeyView { 22 return ( 23 isObj(v) && 24 - hasProp(v, '$type') && 25 - v.$type === 'app.rocksky.apikey.defs#apiKeyView' 26 - ) 27 } 28 29 export function validateApiKeyView(v: unknown): ValidationResult { 30 - return lexicons.validate('app.rocksky.apikey.defs#apiKeyView', v) 31 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface ApiKeyView { 10 /** The unique identifier of the API key. */ 11 + id?: string; 12 /** The name of the API key. */ 13 + name?: string; 14 /** A description for the API key. */ 15 + description?: string; 16 /** The date and time when the API key was created. */ 17 + createdAt?: string; 18 + [k: string]: unknown; 19 } 20 21 export function isApiKeyView(v: unknown): v is ApiKeyView { 22 return ( 23 isObj(v) && 24 + hasProp(v, "$type") && 25 + v.$type === "app.rocksky.apikey.defs#apiKeyView" 26 + ); 27 } 28 29 export function validateApiKeyView(v: unknown): ValidationResult { 30 + return lexicons.validate("app.rocksky.apikey.defs#apiKeyView", v); 31 }
+27 -27
apps/api/src/lexicon/types/app/rocksky/apikey/getApikeys.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyApikeyDefs from './defs' 11 12 export interface QueryParams { 13 /** The number of API keys to skip before starting to collect the result set. */ 14 - offset?: number 15 /** The number of API keys to return per page. */ 16 - limit?: number 17 } 18 19 - export type InputSchema = undefined 20 21 export interface OutputSchema { 22 - apiKeys?: AppRockskyApikeyDefs.ApikeyView[] 23 - [k: string]: unknown 24 } 25 26 - export type HandlerInput = undefined 27 28 export interface HandlerSuccess { 29 - encoding: 'application/json' 30 - body: OutputSchema 31 - headers?: { [key: string]: string } 32 } 33 34 export interface HandlerError { 35 - status: number 36 - message?: string 37 } 38 39 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 40 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 41 - auth: HA 42 - params: QueryParams 43 - input: HandlerInput 44 - req: express.Request 45 - res: express.Response 46 - resetRouteRateLimits: () => Promise<void> 47 - } 48 export type Handler<HA extends HandlerAuth = never> = ( 49 ctx: HandlerReqCtx<HA>, 50 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyApikeyDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The number of API keys to skip before starting to collect the result set. */ 14 + offset?: number; 15 /** The number of API keys to return per page. */ 16 + limit?: number; 17 } 18 19 + export type InputSchema = undefined; 20 21 export interface OutputSchema { 22 + apiKeys?: AppRockskyApikeyDefs.ApikeyView[]; 23 + [k: string]: unknown; 24 } 25 26 + export type HandlerInput = undefined; 27 28 export interface HandlerSuccess { 29 + encoding: "application/json"; 30 + body: OutputSchema; 31 + headers?: { [key: string]: string }; 32 } 33 34 export interface HandlerError { 35 + status: number; 36 + message?: string; 37 } 38 39 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 40 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 41 + auth: HA; 42 + params: QueryParams; 43 + input: HandlerInput; 44 + req: express.Request; 45 + res: express.Response; 46 + resetRouteRateLimits: () => Promise<void>; 47 + }; 48 export type Handler<HA extends HandlerAuth = never> = ( 49 ctx: HandlerReqCtx<HA>, 50 + ) => Promise<HandlerOutput> | HandlerOutput;
+25 -25
apps/api/src/lexicon/types/app/rocksky/apikey/removeApikey.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyApikeyDefs from './defs' 11 12 export interface QueryParams { 13 /** The ID of the API key to remove. */ 14 - id: string 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskyApikeyDefs.ApiKey 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyApikeyDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The ID of the API key to remove. */ 14 + id: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskyApikeyDefs.ApiKey; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+29 -29
apps/api/src/lexicon/types/app/rocksky/apikey/updateApikey.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyApikeyDefs from './defs' 11 12 - export type QueryParams = {} 13 14 export interface InputSchema { 15 /** The ID of the API key to update. */ 16 - id: string 17 /** The new name of the API key. */ 18 - name: string 19 /** A new description for the API key. */ 20 - description?: string 21 - [k: string]: unknown 22 } 23 24 - export type OutputSchema = AppRockskyApikeyDefs.ApiKey 25 26 export interface HandlerInput { 27 - encoding: 'application/json' 28 - body: InputSchema 29 } 30 31 export interface HandlerSuccess { 32 - encoding: 'application/json' 33 - body: OutputSchema 34 - headers?: { [key: string]: string } 35 } 36 37 export interface HandlerError { 38 - status: number 39 - message?: string 40 } 41 42 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 43 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 44 - auth: HA 45 - params: QueryParams 46 - input: HandlerInput 47 - req: express.Request 48 - res: express.Response 49 - resetRouteRateLimits: () => Promise<void> 50 - } 51 export type Handler<HA extends HandlerAuth = never> = ( 52 ctx: HandlerReqCtx<HA>, 53 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyApikeyDefs from "./defs"; 11 12 + export interface QueryParams {} 13 14 export interface InputSchema { 15 /** The ID of the API key to update. */ 16 + id: string; 17 /** The new name of the API key. */ 18 + name: string; 19 /** A new description for the API key. */ 20 + description?: string; 21 + [k: string]: unknown; 22 } 23 24 + export type OutputSchema = AppRockskyApikeyDefs.ApiKey; 25 26 export interface HandlerInput { 27 + encoding: "application/json"; 28 + body: InputSchema; 29 } 30 31 export interface HandlerSuccess { 32 + encoding: "application/json"; 33 + body: OutputSchema; 34 + headers?: { [key: string]: string }; 35 } 36 37 export interface HandlerError { 38 + status: number; 39 + message?: string; 40 } 41 42 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 43 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 44 + auth: HA; 45 + params: QueryParams; 46 + input: HandlerInput; 47 + req: express.Request; 48 + res: express.Response; 49 + resetRouteRateLimits: () => Promise<void>; 50 + }; 51 export type Handler<HA extends HandlerAuth = never> = ( 52 ctx: HandlerReqCtx<HA>, 53 + ) => Promise<HandlerOutput> | HandlerOutput;
+4 -4
apps/api/src/lexicon/types/app/rocksky/apikeys/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid'
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid";
+19 -17
apps/api/src/lexicon/types/app/rocksky/artist.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type { ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../lexicons' 6 - import { isObj, hasProp } from '../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface Record { 10 /** The name of the artist. */ 11 - name: string 12 /** The biography of the artist. */ 13 - bio?: string 14 /** The picture of the artist. */ 15 - picture?: BlobRef 16 /** The tags of the artist. */ 17 - tags?: string[] 18 /** The birth date of the artist. */ 19 - born?: string 20 /** The death date of the artist. */ 21 - died?: string 22 /** The birth place of the artist. */ 23 - bornIn?: string 24 /** The date when the artist was created. */ 25 - createdAt: string 26 - [k: string]: unknown 27 } 28 29 export function isRecord(v: unknown): v is Record { 30 return ( 31 isObj(v) && 32 - hasProp(v, '$type') && 33 - (v.$type === 'app.rocksky.artist#main' || v.$type === 'app.rocksky.artist') 34 - ) 35 } 36 37 export function validateRecord(v: unknown): ValidationResult { 38 - return lexicons.validate('app.rocksky.artist#main', v) 39 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../lexicons"; 6 + import { isObj, hasProp } from "../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface Record { 10 /** The name of the artist. */ 11 + name: string; 12 /** The biography of the artist. */ 13 + bio?: string; 14 /** The picture of the artist. */ 15 + picture?: BlobRef; 16 + /** The URL of the picture of the artist. */ 17 + pictureUrl?: string; 18 /** The tags of the artist. */ 19 + tags?: string[]; 20 /** The birth date of the artist. */ 21 + born?: string; 22 /** The death date of the artist. */ 23 + died?: string; 24 /** The birth place of the artist. */ 25 + bornIn?: string; 26 /** The date when the artist was created. */ 27 + createdAt: string; 28 + [k: string]: unknown; 29 } 30 31 export function isRecord(v: unknown): v is Record { 32 return ( 33 isObj(v) && 34 + hasProp(v, "$type") && 35 + (v.$type === "app.rocksky.artist#main" || v.$type === "app.rocksky.artist") 36 + ); 37 } 38 39 export function validateRecord(v: unknown): ValidationResult { 40 + return lexicons.validate("app.rocksky.artist#main", v); 41 }
+49 -49
apps/api/src/lexicon/types/app/rocksky/artist/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface ArtistViewBasic { 10 /** The unique identifier of the artist. */ 11 - id?: string 12 /** The URI of the artist. */ 13 - uri?: string 14 /** The name of the artist. */ 15 - name?: string 16 /** The picture of the artist. */ 17 - picture?: string 18 /** The SHA256 hash of the artist. */ 19 - sha256?: string 20 /** The number of times the artist has been played. */ 21 - playCount?: number 22 /** The number of unique listeners who have played the artist. */ 23 - uniqueListeners?: number 24 - [k: string]: unknown 25 } 26 27 export function isArtistViewBasic(v: unknown): v is ArtistViewBasic { 28 return ( 29 isObj(v) && 30 - hasProp(v, '$type') && 31 - v.$type === 'app.rocksky.artist.defs#artistViewBasic' 32 - ) 33 } 34 35 export function validateArtistViewBasic(v: unknown): ValidationResult { 36 - return lexicons.validate('app.rocksky.artist.defs#artistViewBasic', v) 37 } 38 39 export interface ArtistViewDetailed { 40 /** The unique identifier of the artist. */ 41 - id?: string 42 /** The URI of the artist. */ 43 - uri?: string 44 /** The name of the artist. */ 45 - name?: string 46 /** The picture of the artist. */ 47 - picture?: string 48 /** The SHA256 hash of the artist. */ 49 - sha256?: string 50 /** The number of times the artist has been played. */ 51 - playCount?: number 52 /** The number of unique listeners who have played the artist. */ 53 - uniqueListeners?: number 54 - [k: string]: unknown 55 } 56 57 export function isArtistViewDetailed(v: unknown): v is ArtistViewDetailed { 58 return ( 59 isObj(v) && 60 - hasProp(v, '$type') && 61 - v.$type === 'app.rocksky.artist.defs#artistViewDetailed' 62 - ) 63 } 64 65 export function validateArtistViewDetailed(v: unknown): ValidationResult { 66 - return lexicons.validate('app.rocksky.artist.defs#artistViewDetailed', v) 67 } 68 69 export interface SongViewBasic { 70 /** The URI of the song. */ 71 - uri?: string 72 /** The title of the song. */ 73 - title?: string 74 /** The number of times the song has been played. */ 75 - playCount?: number 76 - [k: string]: unknown 77 } 78 79 export function isSongViewBasic(v: unknown): v is SongViewBasic { 80 return ( 81 isObj(v) && 82 - hasProp(v, '$type') && 83 - v.$type === 'app.rocksky.artist.defs#songViewBasic' 84 - ) 85 } 86 87 export function validateSongViewBasic(v: unknown): ValidationResult { 88 - return lexicons.validate('app.rocksky.artist.defs#songViewBasic', v) 89 } 90 91 export interface ListenerViewBasic { 92 /** The unique identifier of the actor. */ 93 - id?: string 94 /** The DID of the listener. */ 95 - did?: string 96 /** The handle of the listener. */ 97 - handle?: string 98 /** The display name of the listener. */ 99 - displayName?: string 100 /** The URL of the listener's avatar image. */ 101 - avatar?: string 102 - mostListenedSong?: SongViewBasic 103 /** The total number of plays by the listener. */ 104 - totalPlays?: number 105 /** The rank of the listener among all listeners of the artist. */ 106 - rank?: number 107 - [k: string]: unknown 108 } 109 110 export function isListenerViewBasic(v: unknown): v is ListenerViewBasic { 111 return ( 112 isObj(v) && 113 - hasProp(v, '$type') && 114 - v.$type === 'app.rocksky.artist.defs#listenerViewBasic' 115 - ) 116 } 117 118 export function validateListenerViewBasic(v: unknown): ValidationResult { 119 - return lexicons.validate('app.rocksky.artist.defs#listenerViewBasic', v) 120 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface ArtistViewBasic { 10 /** The unique identifier of the artist. */ 11 + id?: string; 12 /** The URI of the artist. */ 13 + uri?: string; 14 /** The name of the artist. */ 15 + name?: string; 16 /** The picture of the artist. */ 17 + picture?: string; 18 /** The SHA256 hash of the artist. */ 19 + sha256?: string; 20 /** The number of times the artist has been played. */ 21 + playCount?: number; 22 /** The number of unique listeners who have played the artist. */ 23 + uniqueListeners?: number; 24 + [k: string]: unknown; 25 } 26 27 export function isArtistViewBasic(v: unknown): v is ArtistViewBasic { 28 return ( 29 isObj(v) && 30 + hasProp(v, "$type") && 31 + v.$type === "app.rocksky.artist.defs#artistViewBasic" 32 + ); 33 } 34 35 export function validateArtistViewBasic(v: unknown): ValidationResult { 36 + return lexicons.validate("app.rocksky.artist.defs#artistViewBasic", v); 37 } 38 39 export interface ArtistViewDetailed { 40 /** The unique identifier of the artist. */ 41 + id?: string; 42 /** The URI of the artist. */ 43 + uri?: string; 44 /** The name of the artist. */ 45 + name?: string; 46 /** The picture of the artist. */ 47 + picture?: string; 48 /** The SHA256 hash of the artist. */ 49 + sha256?: string; 50 /** The number of times the artist has been played. */ 51 + playCount?: number; 52 /** The number of unique listeners who have played the artist. */ 53 + uniqueListeners?: number; 54 + [k: string]: unknown; 55 } 56 57 export function isArtistViewDetailed(v: unknown): v is ArtistViewDetailed { 58 return ( 59 isObj(v) && 60 + hasProp(v, "$type") && 61 + v.$type === "app.rocksky.artist.defs#artistViewDetailed" 62 + ); 63 } 64 65 export function validateArtistViewDetailed(v: unknown): ValidationResult { 66 + return lexicons.validate("app.rocksky.artist.defs#artistViewDetailed", v); 67 } 68 69 export interface SongViewBasic { 70 /** The URI of the song. */ 71 + uri?: string; 72 /** The title of the song. */ 73 + title?: string; 74 /** The number of times the song has been played. */ 75 + playCount?: number; 76 + [k: string]: unknown; 77 } 78 79 export function isSongViewBasic(v: unknown): v is SongViewBasic { 80 return ( 81 isObj(v) && 82 + hasProp(v, "$type") && 83 + v.$type === "app.rocksky.artist.defs#songViewBasic" 84 + ); 85 } 86 87 export function validateSongViewBasic(v: unknown): ValidationResult { 88 + return lexicons.validate("app.rocksky.artist.defs#songViewBasic", v); 89 } 90 91 export interface ListenerViewBasic { 92 /** The unique identifier of the actor. */ 93 + id?: string; 94 /** The DID of the listener. */ 95 + did?: string; 96 /** The handle of the listener. */ 97 + handle?: string; 98 /** The display name of the listener. */ 99 + displayName?: string; 100 /** The URL of the listener's avatar image. */ 101 + avatar?: string; 102 + mostListenedSong?: SongViewBasic; 103 /** The total number of plays by the listener. */ 104 + totalPlays?: number; 105 /** The rank of the listener among all listeners of the artist. */ 106 + rank?: number; 107 + [k: string]: unknown; 108 } 109 110 export function isListenerViewBasic(v: unknown): v is ListenerViewBasic { 111 return ( 112 isObj(v) && 113 + hasProp(v, "$type") && 114 + v.$type === "app.rocksky.artist.defs#listenerViewBasic" 115 + ); 116 } 117 118 export function validateListenerViewBasic(v: unknown): ValidationResult { 119 + return lexicons.validate("app.rocksky.artist.defs#listenerViewBasic", v); 120 }
+25 -25
apps/api/src/lexicon/types/app/rocksky/artist/getArtist.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyArtistDefs from './defs' 11 12 export interface QueryParams { 13 /** The URI of the artist to retrieve details from */ 14 - uri: string 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskyArtistDefs.ArtistViewDetailed 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyArtistDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The URI of the artist to retrieve details from */ 14 + uri: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskyArtistDefs.ArtistViewDetailed; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+26 -26
apps/api/src/lexicon/types/app/rocksky/artist/getArtistAlbums.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyAlbumDefs from '../album/defs' 11 12 export interface QueryParams { 13 /** The URI of the artist to retrieve albums from */ 14 - uri: string 15 } 16 17 - export type InputSchema = undefined 18 19 export interface OutputSchema { 20 - albums?: AppRockskyAlbumDefs.AlbumViewBasic[] 21 - [k: string]: unknown 22 } 23 24 - export type HandlerInput = undefined 25 26 export interface HandlerSuccess { 27 - encoding: 'application/json' 28 - body: OutputSchema 29 - headers?: { [key: string]: string } 30 } 31 32 export interface HandlerError { 33 - status: number 34 - message?: string 35 } 36 37 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 38 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 39 - auth: HA 40 - params: QueryParams 41 - input: HandlerInput 42 - req: express.Request 43 - res: express.Response 44 - resetRouteRateLimits: () => Promise<void> 45 - } 46 export type Handler<HA extends HandlerAuth = never> = ( 47 ctx: HandlerReqCtx<HA>, 48 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyAlbumDefs from "../album/defs"; 11 12 export interface QueryParams { 13 /** The URI of the artist to retrieve albums from */ 14 + uri: string; 15 } 16 17 + export type InputSchema = undefined; 18 19 export interface OutputSchema { 20 + albums?: AppRockskyAlbumDefs.AlbumViewBasic[]; 21 + [k: string]: unknown; 22 } 23 24 + export type HandlerInput = undefined; 25 26 export interface HandlerSuccess { 27 + encoding: "application/json"; 28 + body: OutputSchema; 29 + headers?: { [key: string]: string }; 30 } 31 32 export interface HandlerError { 33 + status: number; 34 + message?: string; 35 } 36 37 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 38 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 39 + auth: HA; 40 + params: QueryParams; 41 + input: HandlerInput; 42 + req: express.Request; 43 + res: express.Response; 44 + resetRouteRateLimits: () => Promise<void>; 45 + }; 46 export type Handler<HA extends HandlerAuth = never> = ( 47 ctx: HandlerReqCtx<HA>, 48 + ) => Promise<HandlerOutput> | HandlerOutput;
+28 -28
apps/api/src/lexicon/types/app/rocksky/artist/getArtistListeners.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyArtistDefs from './defs' 11 12 export interface QueryParams { 13 /** The URI of the artist to retrieve listeners from */ 14 - uri: string 15 /** Number of items to skip before returning results */ 16 - offset?: number 17 /** Maximum number of results to return */ 18 - limit?: number 19 } 20 21 - export type InputSchema = undefined 22 23 export interface OutputSchema { 24 - listeners?: AppRockskyArtistDefs.ListenerViewBasic[] 25 - [k: string]: unknown 26 } 27 28 - export type HandlerInput = undefined 29 30 export interface HandlerSuccess { 31 - encoding: 'application/json' 32 - body: OutputSchema 33 - headers?: { [key: string]: string } 34 } 35 36 export interface HandlerError { 37 - status: number 38 - message?: string 39 } 40 41 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 - auth: HA 44 - params: QueryParams 45 - input: HandlerInput 46 - req: express.Request 47 - res: express.Response 48 - resetRouteRateLimits: () => Promise<void> 49 - } 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyArtistDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The URI of the artist to retrieve listeners from */ 14 + uri: string; 15 /** Number of items to skip before returning results */ 16 + offset?: number; 17 /** Maximum number of results to return */ 18 + limit?: number; 19 } 20 21 + export type InputSchema = undefined; 22 23 export interface OutputSchema { 24 + listeners?: AppRockskyArtistDefs.ListenerViewBasic[]; 25 + [k: string]: unknown; 26 } 27 28 + export type HandlerInput = undefined; 29 30 export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 } 35 36 export interface HandlerError { 37 + status: number; 38 + message?: string; 39 } 40 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+28 -28
apps/api/src/lexicon/types/app/rocksky/artist/getArtistTracks.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskySongDefs from '../song/defs' 11 12 export interface QueryParams { 13 /** The URI of the artist to retrieve albums from */ 14 - uri?: string 15 /** The maximum number of tracks to return */ 16 - limit?: number 17 /** The offset for pagination */ 18 - offset?: number 19 } 20 21 - export type InputSchema = undefined 22 23 export interface OutputSchema { 24 - tracks?: AppRockskySongDefs.SongViewBasic[] 25 - [k: string]: unknown 26 } 27 28 - export type HandlerInput = undefined 29 30 export interface HandlerSuccess { 31 - encoding: 'application/json' 32 - body: OutputSchema 33 - headers?: { [key: string]: string } 34 } 35 36 export interface HandlerError { 37 - status: number 38 - message?: string 39 } 40 41 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 - auth: HA 44 - params: QueryParams 45 - input: HandlerInput 46 - req: express.Request 47 - res: express.Response 48 - resetRouteRateLimits: () => Promise<void> 49 - } 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskySongDefs from "../song/defs"; 11 12 export interface QueryParams { 13 /** The URI of the artist to retrieve albums from */ 14 + uri?: string; 15 /** The maximum number of tracks to return */ 16 + limit?: number; 17 /** The offset for pagination */ 18 + offset?: number; 19 } 20 21 + export type InputSchema = undefined; 22 23 export interface OutputSchema { 24 + tracks?: AppRockskySongDefs.SongViewBasic[]; 25 + [k: string]: unknown; 26 } 27 28 + export type HandlerInput = undefined; 29 30 export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 } 35 36 export interface HandlerError { 37 + status: number; 38 + message?: string; 39 } 40 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+27 -27
apps/api/src/lexicon/types/app/rocksky/artist/getArtists.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyArtistDefs from './defs' 11 12 export interface QueryParams { 13 /** The maximum number of artists to return */ 14 - limit?: number 15 /** The offset for pagination */ 16 - offset?: number 17 } 18 19 - export type InputSchema = undefined 20 21 export interface OutputSchema { 22 - artists?: AppRockskyArtistDefs.ArtistViewBasic[] 23 - [k: string]: unknown 24 } 25 26 - export type HandlerInput = undefined 27 28 export interface HandlerSuccess { 29 - encoding: 'application/json' 30 - body: OutputSchema 31 - headers?: { [key: string]: string } 32 } 33 34 export interface HandlerError { 35 - status: number 36 - message?: string 37 } 38 39 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 40 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 41 - auth: HA 42 - params: QueryParams 43 - input: HandlerInput 44 - req: express.Request 45 - res: express.Response 46 - resetRouteRateLimits: () => Promise<void> 47 - } 48 export type Handler<HA extends HandlerAuth = never> = ( 49 ctx: HandlerReqCtx<HA>, 50 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyArtistDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The maximum number of artists to return */ 14 + limit?: number; 15 /** The offset for pagination */ 16 + offset?: number; 17 } 18 19 + export type InputSchema = undefined; 20 21 export interface OutputSchema { 22 + artists?: AppRockskyArtistDefs.ArtistViewBasic[]; 23 + [k: string]: unknown; 24 } 25 26 + export type HandlerInput = undefined; 27 28 export interface HandlerSuccess { 29 + encoding: "application/json"; 30 + body: OutputSchema; 31 + headers?: { [key: string]: string }; 32 } 33 34 export interface HandlerError { 35 + status: number; 36 + message?: string; 37 } 38 39 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 40 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 41 + auth: HA; 42 + params: QueryParams; 43 + input: HandlerInput; 44 + req: express.Request; 45 + res: express.Response; 46 + resetRouteRateLimits: () => Promise<void>; 47 + }; 48 export type Handler<HA extends HandlerAuth = never> = ( 49 ctx: HandlerReqCtx<HA>, 50 + ) => Promise<HandlerOutput> | HandlerOutput;
+17 -17
apps/api/src/lexicon/types/app/rocksky/charts/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface ChartsView { 10 - scrobbles?: ScrobbleViewBasic[] 11 - [k: string]: unknown 12 } 13 14 export function isChartsView(v: unknown): v is ChartsView { 15 return ( 16 isObj(v) && 17 - hasProp(v, '$type') && 18 - v.$type === 'app.rocksky.charts.defs#chartsView' 19 - ) 20 } 21 22 export function validateChartsView(v: unknown): ValidationResult { 23 - return lexicons.validate('app.rocksky.charts.defs#chartsView', v) 24 } 25 26 export interface ScrobbleViewBasic { 27 /** The date of the scrobble. */ 28 - date?: string 29 /** The number of scrobbles on this date. */ 30 - count?: number 31 - [k: string]: unknown 32 } 33 34 export function isScrobbleViewBasic(v: unknown): v is ScrobbleViewBasic { 35 return ( 36 isObj(v) && 37 - hasProp(v, '$type') && 38 - v.$type === 'app.rocksky.charts.defs#scrobbleViewBasic' 39 - ) 40 } 41 42 export function validateScrobbleViewBasic(v: unknown): ValidationResult { 43 - return lexicons.validate('app.rocksky.charts.defs#scrobbleViewBasic', v) 44 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface ChartsView { 10 + scrobbles?: ScrobbleViewBasic[]; 11 + [k: string]: unknown; 12 } 13 14 export function isChartsView(v: unknown): v is ChartsView { 15 return ( 16 isObj(v) && 17 + hasProp(v, "$type") && 18 + v.$type === "app.rocksky.charts.defs#chartsView" 19 + ); 20 } 21 22 export function validateChartsView(v: unknown): ValidationResult { 23 + return lexicons.validate("app.rocksky.charts.defs#chartsView", v); 24 } 25 26 export interface ScrobbleViewBasic { 27 /** The date of the scrobble. */ 28 + date?: string; 29 /** The number of scrobbles on this date. */ 30 + count?: number; 31 + [k: string]: unknown; 32 } 33 34 export function isScrobbleViewBasic(v: unknown): v is ScrobbleViewBasic { 35 return ( 36 isObj(v) && 37 + hasProp(v, "$type") && 38 + v.$type === "app.rocksky.charts.defs#scrobbleViewBasic" 39 + ); 40 } 41 42 export function validateScrobbleViewBasic(v: unknown): ValidationResult { 43 + return lexicons.validate("app.rocksky.charts.defs#scrobbleViewBasic", v); 44 }
+28 -28
apps/api/src/lexicon/types/app/rocksky/charts/getScrobblesChart.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyChartsDefs from './defs' 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 - did?: string 15 /** The URI of the artist to filter by */ 16 - artisturi?: string 17 /** The URI of the album to filter by */ 18 - albumuri?: string 19 /** The URI of the track to filter by */ 20 - songuri?: string 21 } 22 23 - export type InputSchema = undefined 24 - export type OutputSchema = AppRockskyChartsDefs.ChartsView 25 - export type HandlerInput = undefined 26 27 export interface HandlerSuccess { 28 - encoding: 'application/json' 29 - body: OutputSchema 30 - headers?: { [key: string]: string } 31 } 32 33 export interface HandlerError { 34 - status: number 35 - message?: string 36 } 37 38 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 39 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 40 - auth: HA 41 - params: QueryParams 42 - input: HandlerInput 43 - req: express.Request 44 - res: express.Response 45 - resetRouteRateLimits: () => Promise<void> 46 - } 47 export type Handler<HA extends HandlerAuth = never> = ( 48 ctx: HandlerReqCtx<HA>, 49 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyChartsDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 + did?: string; 15 /** The URI of the artist to filter by */ 16 + artisturi?: string; 17 /** The URI of the album to filter by */ 18 + albumuri?: string; 19 /** The URI of the track to filter by */ 20 + songuri?: string; 21 } 22 23 + export type InputSchema = undefined; 24 + export type OutputSchema = AppRockskyChartsDefs.ChartsView; 25 + export type HandlerInput = undefined; 26 27 export interface HandlerSuccess { 28 + encoding: "application/json"; 29 + body: OutputSchema; 30 + headers?: { [key: string]: string }; 31 } 32 33 export interface HandlerError { 34 + status: number; 35 + message?: string; 36 } 37 38 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 39 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 40 + auth: HA; 41 + params: QueryParams; 42 + input: HandlerInput; 43 + req: express.Request; 44 + res: express.Response; 45 + resetRouteRateLimits: () => Promise<void>; 46 + }; 47 export type Handler<HA extends HandlerAuth = never> = ( 48 ctx: HandlerReqCtx<HA>, 49 + ) => Promise<HandlerOutput> | HandlerOutput;
+27 -27
apps/api/src/lexicon/types/app/rocksky/dropbox/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface FileView { 10 /** The unique identifier of the file. */ 11 - id?: string 12 /** The name of the file. */ 13 - name?: string 14 /** The lowercased path of the file. */ 15 - pathLower?: string 16 /** The display path of the file. */ 17 - pathDisplay?: string 18 /** The last modified date and time of the file on the client. */ 19 - clientModified?: string 20 /** The last modified date and time of the file on the server. */ 21 - serverModified?: string 22 - [k: string]: unknown 23 } 24 25 export function isFileView(v: unknown): v is FileView { 26 return ( 27 isObj(v) && 28 - hasProp(v, '$type') && 29 - v.$type === 'app.rocksky.dropbox.defs#fileView' 30 - ) 31 } 32 33 export function validateFileView(v: unknown): ValidationResult { 34 - return lexicons.validate('app.rocksky.dropbox.defs#fileView', v) 35 } 36 37 export interface FileListView { 38 /** A list of files in the Dropbox. */ 39 - files?: FileView[] 40 - [k: string]: unknown 41 } 42 43 export function isFileListView(v: unknown): v is FileListView { 44 return ( 45 isObj(v) && 46 - hasProp(v, '$type') && 47 - v.$type === 'app.rocksky.dropbox.defs#fileListView' 48 - ) 49 } 50 51 export function validateFileListView(v: unknown): ValidationResult { 52 - return lexicons.validate('app.rocksky.dropbox.defs#fileListView', v) 53 } 54 55 export interface TemporaryLinkView { 56 /** The temporary link to access the file. */ 57 - link?: string 58 - [k: string]: unknown 59 } 60 61 export function isTemporaryLinkView(v: unknown): v is TemporaryLinkView { 62 return ( 63 isObj(v) && 64 - hasProp(v, '$type') && 65 - v.$type === 'app.rocksky.dropbox.defs#temporaryLinkView' 66 - ) 67 } 68 69 export function validateTemporaryLinkView(v: unknown): ValidationResult { 70 - return lexicons.validate('app.rocksky.dropbox.defs#temporaryLinkView', v) 71 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface FileView { 10 /** The unique identifier of the file. */ 11 + id?: string; 12 /** The name of the file. */ 13 + name?: string; 14 /** The lowercased path of the file. */ 15 + pathLower?: string; 16 /** The display path of the file. */ 17 + pathDisplay?: string; 18 /** The last modified date and time of the file on the client. */ 19 + clientModified?: string; 20 /** The last modified date and time of the file on the server. */ 21 + serverModified?: string; 22 + [k: string]: unknown; 23 } 24 25 export function isFileView(v: unknown): v is FileView { 26 return ( 27 isObj(v) && 28 + hasProp(v, "$type") && 29 + v.$type === "app.rocksky.dropbox.defs#fileView" 30 + ); 31 } 32 33 export function validateFileView(v: unknown): ValidationResult { 34 + return lexicons.validate("app.rocksky.dropbox.defs#fileView", v); 35 } 36 37 export interface FileListView { 38 /** A list of files in the Dropbox. */ 39 + files?: FileView[]; 40 + [k: string]: unknown; 41 } 42 43 export function isFileListView(v: unknown): v is FileListView { 44 return ( 45 isObj(v) && 46 + hasProp(v, "$type") && 47 + v.$type === "app.rocksky.dropbox.defs#fileListView" 48 + ); 49 } 50 51 export function validateFileListView(v: unknown): ValidationResult { 52 + return lexicons.validate("app.rocksky.dropbox.defs#fileListView", v); 53 } 54 55 export interface TemporaryLinkView { 56 /** The temporary link to access the file. */ 57 + link?: string; 58 + [k: string]: unknown; 59 } 60 61 export function isTemporaryLinkView(v: unknown): v is TemporaryLinkView { 62 return ( 63 isObj(v) && 64 + hasProp(v, "$type") && 65 + v.$type === "app.rocksky.dropbox.defs#temporaryLinkView" 66 + ); 67 } 68 69 export function validateTemporaryLinkView(v: unknown): ValidationResult { 70 + return lexicons.validate("app.rocksky.dropbox.defs#temporaryLinkView", v); 71 }
+24 -24
apps/api/src/lexicon/types/app/rocksky/dropbox/downloadFile.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import type stream from 'stream' 6 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 7 - import { lexicons } from '../../../../lexicons' 8 - import { isObj, hasProp } from '../../../../util' 9 - import { CID } from 'multiformats/cid' 10 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 11 12 export interface QueryParams { 13 /** The unique identifier of the file to download */ 14 - fileId: string 15 } 16 17 - export type InputSchema = undefined 18 - export type HandlerInput = undefined 19 20 export interface HandlerSuccess { 21 - encoding: 'application/octet-stream' 22 - body: Uint8Array | stream.Readable 23 - headers?: { [key: string]: string } 24 } 25 26 export interface HandlerError { 27 - status: number 28 - message?: string 29 } 30 31 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 32 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 33 - auth: HA 34 - params: QueryParams 35 - input: HandlerInput 36 - req: express.Request 37 - res: express.Response 38 - resetRouteRateLimits: () => Promise<void> 39 - } 40 export type Handler<HA extends HandlerAuth = never> = ( 41 ctx: HandlerReqCtx<HA>, 42 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import stream from "stream"; 6 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 7 + import { lexicons } from "../../../../lexicons"; 8 + import { isObj, hasProp } from "../../../../util"; 9 + import { CID } from "multiformats/cid"; 10 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 11 12 export interface QueryParams { 13 /** The unique identifier of the file to download */ 14 + fileId: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type HandlerInput = undefined; 19 20 export interface HandlerSuccess { 21 + encoding: "application/octet-stream"; 22 + body: Uint8Array | stream.Readable; 23 + headers?: { [key: string]: string }; 24 } 25 26 export interface HandlerError { 27 + status: number; 28 + message?: string; 29 } 30 31 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 32 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 33 + auth: HA; 34 + params: QueryParams; 35 + input: HandlerInput; 36 + req: express.Request; 37 + res: express.Response; 38 + resetRouteRateLimits: () => Promise<void>; 39 + }; 40 export type Handler<HA extends HandlerAuth = never> = ( 41 ctx: HandlerReqCtx<HA>, 42 + ) => Promise<HandlerOutput> | HandlerOutput;
+25 -25
apps/api/src/lexicon/types/app/rocksky/dropbox/getFiles.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyDropboxDefs from './defs' 11 12 export interface QueryParams { 13 /** Path to the Dropbox folder or root directory */ 14 - at?: string 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskyDropboxDefs.FileListView 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyDropboxDefs from "./defs"; 11 12 export interface QueryParams { 13 /** Path to the Dropbox folder or root directory */ 14 + at?: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskyDropboxDefs.FileListView; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+25 -25
apps/api/src/lexicon/types/app/rocksky/dropbox/getMetadata.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyDropboxDefs from './defs' 11 12 export interface QueryParams { 13 /** Path to the file or folder in Dropbox */ 14 - path: string 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskyDropboxDefs.FileView 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyDropboxDefs from "./defs"; 11 12 export interface QueryParams { 13 /** Path to the file or folder in Dropbox */ 14 + path: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskyDropboxDefs.FileView; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+25 -25
apps/api/src/lexicon/types/app/rocksky/dropbox/getTemporaryLink.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyDropboxDefs from './defs' 11 12 export interface QueryParams { 13 /** Path to the file in Dropbox */ 14 - path: string 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskyDropboxDefs.TemporaryLinkView 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyDropboxDefs from "./defs"; 11 12 export interface QueryParams { 13 /** Path to the file in Dropbox */ 14 + path: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskyDropboxDefs.TemporaryLinkView; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+45 -45
apps/api/src/lexicon/types/app/rocksky/feed/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 - import type * as AppRockskySongDefs from '../song/defs' 9 - import type * as AppRockskyAlbumDefs from '../album/defs' 10 - import type * as AppRockskyArtistDefs from '../artist/defs' 11 - import type * as AppRockskyPlaylistDefs from '../playlist/defs' 12 - import type * as AppRockskyActorDefs from '../actor/defs' 13 14 export interface SearchResultsView { 15 hits?: ( ··· 19 | AppRockskyPlaylistDefs.PlaylistViewBasic 20 | AppRockskyActorDefs.ProfileViewBasic 21 | { $type: string; [k: string]: unknown } 22 - )[] 23 - processingTimeMs?: number 24 - limit?: number 25 - offset?: number 26 - estimatedTotalHits?: number 27 - [k: string]: unknown 28 } 29 30 export function isSearchResultsView(v: unknown): v is SearchResultsView { 31 return ( 32 isObj(v) && 33 - hasProp(v, '$type') && 34 - v.$type === 'app.rocksky.feed.defs#searchResultsView' 35 - ) 36 } 37 38 export function validateSearchResultsView(v: unknown): ValidationResult { 39 - return lexicons.validate('app.rocksky.feed.defs#searchResultsView', v) 40 } 41 42 export interface NowPlayingView { 43 - album?: string 44 - albumArt?: string 45 - albumArtist?: string 46 - albumUri?: string 47 - artist?: string 48 - artistUri?: string 49 - avatar?: string 50 - createdAt?: string 51 - did?: string 52 - handle?: string 53 - id?: string 54 - title?: string 55 - trackId?: string 56 - trackUri?: string 57 - uri?: string 58 - [k: string]: unknown 59 } 60 61 export function isNowPlayingView(v: unknown): v is NowPlayingView { 62 return ( 63 isObj(v) && 64 - hasProp(v, '$type') && 65 - v.$type === 'app.rocksky.feed.defs#nowPlayingView' 66 - ) 67 } 68 69 export function validateNowPlayingView(v: unknown): ValidationResult { 70 - return lexicons.validate('app.rocksky.feed.defs#nowPlayingView', v) 71 } 72 73 export interface NowPlayingsView { 74 - nowPlayings?: NowPlayingView[] 75 - [k: string]: unknown 76 } 77 78 export function isNowPlayingsView(v: unknown): v is NowPlayingsView { 79 return ( 80 isObj(v) && 81 - hasProp(v, '$type') && 82 - v.$type === 'app.rocksky.feed.defs#nowPlayingsView' 83 - ) 84 } 85 86 export function validateNowPlayingsView(v: unknown): ValidationResult { 87 - return lexicons.validate('app.rocksky.feed.defs#nowPlayingsView', v) 88 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 + import * as AppRockskySongDefs from "../song/defs"; 9 + import * as AppRockskyAlbumDefs from "../album/defs"; 10 + import * as AppRockskyArtistDefs from "../artist/defs"; 11 + import * as AppRockskyPlaylistDefs from "../playlist/defs"; 12 + import * as AppRockskyActorDefs from "../actor/defs"; 13 14 export interface SearchResultsView { 15 hits?: ( ··· 19 | AppRockskyPlaylistDefs.PlaylistViewBasic 20 | AppRockskyActorDefs.ProfileViewBasic 21 | { $type: string; [k: string]: unknown } 22 + )[]; 23 + processingTimeMs?: number; 24 + limit?: number; 25 + offset?: number; 26 + estimatedTotalHits?: number; 27 + [k: string]: unknown; 28 } 29 30 export function isSearchResultsView(v: unknown): v is SearchResultsView { 31 return ( 32 isObj(v) && 33 + hasProp(v, "$type") && 34 + v.$type === "app.rocksky.feed.defs#searchResultsView" 35 + ); 36 } 37 38 export function validateSearchResultsView(v: unknown): ValidationResult { 39 + return lexicons.validate("app.rocksky.feed.defs#searchResultsView", v); 40 } 41 42 export interface NowPlayingView { 43 + album?: string; 44 + albumArt?: string; 45 + albumArtist?: string; 46 + albumUri?: string; 47 + artist?: string; 48 + artistUri?: string; 49 + avatar?: string; 50 + createdAt?: string; 51 + did?: string; 52 + handle?: string; 53 + id?: string; 54 + title?: string; 55 + trackId?: string; 56 + trackUri?: string; 57 + uri?: string; 58 + [k: string]: unknown; 59 } 60 61 export function isNowPlayingView(v: unknown): v is NowPlayingView { 62 return ( 63 isObj(v) && 64 + hasProp(v, "$type") && 65 + v.$type === "app.rocksky.feed.defs#nowPlayingView" 66 + ); 67 } 68 69 export function validateNowPlayingView(v: unknown): ValidationResult { 70 + return lexicons.validate("app.rocksky.feed.defs#nowPlayingView", v); 71 } 72 73 export interface NowPlayingsView { 74 + nowPlayings?: NowPlayingView[]; 75 + [k: string]: unknown; 76 } 77 78 export function isNowPlayingsView(v: unknown): v is NowPlayingsView { 79 return ( 80 isObj(v) && 81 + hasProp(v, "$type") && 82 + v.$type === "app.rocksky.feed.defs#nowPlayingsView" 83 + ); 84 } 85 86 export function validateNowPlayingsView(v: unknown): ValidationResult { 87 + return lexicons.validate("app.rocksky.feed.defs#nowPlayingsView", v); 88 }
+25 -25
apps/api/src/lexicon/types/app/rocksky/feed/getNowPlayings.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyFeedDefs from './defs' 11 12 export interface QueryParams { 13 /** The maximum number of now playing tracks to return. */ 14 - size?: number 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskyFeedDefs.NowPlayingsView 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyFeedDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The maximum number of now playing tracks to return. */ 14 + size?: number; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskyFeedDefs.NowPlayingsView; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+25 -25
apps/api/src/lexicon/types/app/rocksky/feed/search.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyFeedDefs from './defs' 11 12 export interface QueryParams { 13 /** The search query string */ 14 - query: string 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskyFeedDefs.SearchResultsView 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyFeedDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The search query string */ 14 + query: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskyFeedDefs.SearchResultsView; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+16 -16
apps/api/src/lexicon/types/app/rocksky/googledrive/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface FileView { 10 /** The unique identifier of the file. */ 11 - id?: string 12 - [k: string]: unknown 13 } 14 15 export function isFileView(v: unknown): v is FileView { 16 return ( 17 isObj(v) && 18 - hasProp(v, '$type') && 19 - v.$type === 'app.rocksky.googledrive.defs#fileView' 20 - ) 21 } 22 23 export function validateFileView(v: unknown): ValidationResult { 24 - return lexicons.validate('app.rocksky.googledrive.defs#fileView', v) 25 } 26 27 export interface FileListView { 28 - files?: FileView[] 29 - [k: string]: unknown 30 } 31 32 export function isFileListView(v: unknown): v is FileListView { 33 return ( 34 isObj(v) && 35 - hasProp(v, '$type') && 36 - v.$type === 'app.rocksky.googledrive.defs#fileListView' 37 - ) 38 } 39 40 export function validateFileListView(v: unknown): ValidationResult { 41 - return lexicons.validate('app.rocksky.googledrive.defs#fileListView', v) 42 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface FileView { 10 /** The unique identifier of the file. */ 11 + id?: string; 12 + [k: string]: unknown; 13 } 14 15 export function isFileView(v: unknown): v is FileView { 16 return ( 17 isObj(v) && 18 + hasProp(v, "$type") && 19 + v.$type === "app.rocksky.googledrive.defs#fileView" 20 + ); 21 } 22 23 export function validateFileView(v: unknown): ValidationResult { 24 + return lexicons.validate("app.rocksky.googledrive.defs#fileView", v); 25 } 26 27 export interface FileListView { 28 + files?: FileView[]; 29 + [k: string]: unknown; 30 } 31 32 export function isFileListView(v: unknown): v is FileListView { 33 return ( 34 isObj(v) && 35 + hasProp(v, "$type") && 36 + v.$type === "app.rocksky.googledrive.defs#fileListView" 37 + ); 38 } 39 40 export function validateFileListView(v: unknown): ValidationResult { 41 + return lexicons.validate("app.rocksky.googledrive.defs#fileListView", v); 42 }
+24 -24
apps/api/src/lexicon/types/app/rocksky/googledrive/downloadFile.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import type stream from 'stream' 6 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 7 - import { lexicons } from '../../../../lexicons' 8 - import { isObj, hasProp } from '../../../../util' 9 - import { CID } from 'multiformats/cid' 10 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 11 12 export interface QueryParams { 13 /** The unique identifier of the file to download */ 14 - fileId: string 15 } 16 17 - export type InputSchema = undefined 18 - export type HandlerInput = undefined 19 20 export interface HandlerSuccess { 21 - encoding: 'application/octet-stream' 22 - body: Uint8Array | stream.Readable 23 - headers?: { [key: string]: string } 24 } 25 26 export interface HandlerError { 27 - status: number 28 - message?: string 29 } 30 31 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 32 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 33 - auth: HA 34 - params: QueryParams 35 - input: HandlerInput 36 - req: express.Request 37 - res: express.Response 38 - resetRouteRateLimits: () => Promise<void> 39 - } 40 export type Handler<HA extends HandlerAuth = never> = ( 41 ctx: HandlerReqCtx<HA>, 42 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import stream from "stream"; 6 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 7 + import { lexicons } from "../../../../lexicons"; 8 + import { isObj, hasProp } from "../../../../util"; 9 + import { CID } from "multiformats/cid"; 10 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 11 12 export interface QueryParams { 13 /** The unique identifier of the file to download */ 14 + fileId: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type HandlerInput = undefined; 19 20 export interface HandlerSuccess { 21 + encoding: "application/octet-stream"; 22 + body: Uint8Array | stream.Readable; 23 + headers?: { [key: string]: string }; 24 } 25 26 export interface HandlerError { 27 + status: number; 28 + message?: string; 29 } 30 31 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 32 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 33 + auth: HA; 34 + params: QueryParams; 35 + input: HandlerInput; 36 + req: express.Request; 37 + res: express.Response; 38 + resetRouteRateLimits: () => Promise<void>; 39 + }; 40 export type Handler<HA extends HandlerAuth = never> = ( 41 ctx: HandlerReqCtx<HA>, 42 + ) => Promise<HandlerOutput> | HandlerOutput;
+25 -25
apps/api/src/lexicon/types/app/rocksky/googledrive/getFile.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyGoogledriveDefs from './defs' 11 12 export interface QueryParams { 13 /** The unique identifier of the file to retrieve */ 14 - fileId: string 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskyGoogledriveDefs.FileView 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyGoogledriveDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The unique identifier of the file to retrieve */ 14 + fileId: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskyGoogledriveDefs.FileView; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+25 -25
apps/api/src/lexicon/types/app/rocksky/googledrive/getFiles.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyGoogledriveDefs from './defs' 11 12 export interface QueryParams { 13 /** Path to the Google Drive folder or root directory */ 14 - at?: string 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskyGoogledriveDefs.FileListView 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyGoogledriveDefs from "./defs"; 11 12 export interface QueryParams { 13 /** Path to the Google Drive folder or root directory */ 14 + at?: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskyGoogledriveDefs.FileListView; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+12 -12
apps/api/src/lexicon/types/app/rocksky/like.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../lexicons' 6 - import { isObj, hasProp } from '../../../util' 7 - import { CID } from 'multiformats/cid' 8 - import type * as ComAtprotoRepoStrongRef from '../../com/atproto/repo/strongRef' 9 10 export interface Record { 11 /** The date when the like was created. */ 12 - createdAt: string 13 - subject: ComAtprotoRepoStrongRef.Main 14 - [k: string]: unknown 15 } 16 17 export function isRecord(v: unknown): v is Record { 18 return ( 19 isObj(v) && 20 - hasProp(v, '$type') && 21 - (v.$type === 'app.rocksky.like#main' || v.$type === 'app.rocksky.like') 22 - ) 23 } 24 25 export function validateRecord(v: unknown): ValidationResult { 26 - return lexicons.validate('app.rocksky.like#main', v) 27 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../lexicons"; 6 + import { isObj, hasProp } from "../../../util"; 7 + import { CID } from "multiformats/cid"; 8 + import * as ComAtprotoRepoStrongRef from "../../com/atproto/repo/strongRef"; 9 10 export interface Record { 11 /** The date when the like was created. */ 12 + createdAt: string; 13 + subject: ComAtprotoRepoStrongRef.Main; 14 + [k: string]: unknown; 15 } 16 17 export function isRecord(v: unknown): v is Record { 18 return ( 19 isObj(v) && 20 + hasProp(v, "$type") && 21 + (v.$type === "app.rocksky.like#main" || v.$type === "app.rocksky.like") 22 + ); 23 } 24 25 export function validateRecord(v: unknown): ValidationResult { 26 + return lexicons.validate("app.rocksky.like#main", v); 27 }
+27 -27
apps/api/src/lexicon/types/app/rocksky/like/dislikeShout.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyShoutDefs from '../shout/defs' 11 12 - export type QueryParams = {} 13 14 export interface InputSchema { 15 /** The unique identifier of the shout to dislike */ 16 - uri?: string 17 - [k: string]: unknown 18 } 19 20 - export type OutputSchema = AppRockskyShoutDefs.ShoutView 21 22 export interface HandlerInput { 23 - encoding: 'application/json' 24 - body: InputSchema 25 } 26 27 export interface HandlerSuccess { 28 - encoding: 'application/json' 29 - body: OutputSchema 30 - headers?: { [key: string]: string } 31 } 32 33 export interface HandlerError { 34 - status: number 35 - message?: string 36 } 37 38 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 39 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 40 - auth: HA 41 - params: QueryParams 42 - input: HandlerInput 43 - req: express.Request 44 - res: express.Response 45 - resetRouteRateLimits: () => Promise<void> 46 - } 47 export type Handler<HA extends HandlerAuth = never> = ( 48 ctx: HandlerReqCtx<HA>, 49 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyShoutDefs from "../shout/defs"; 11 12 + export interface QueryParams {} 13 14 export interface InputSchema { 15 /** The unique identifier of the shout to dislike */ 16 + uri?: string; 17 + [k: string]: unknown; 18 } 19 20 + export type OutputSchema = AppRockskyShoutDefs.ShoutView; 21 22 export interface HandlerInput { 23 + encoding: "application/json"; 24 + body: InputSchema; 25 } 26 27 export interface HandlerSuccess { 28 + encoding: "application/json"; 29 + body: OutputSchema; 30 + headers?: { [key: string]: string }; 31 } 32 33 export interface HandlerError { 34 + status: number; 35 + message?: string; 36 } 37 38 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 39 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 40 + auth: HA; 41 + params: QueryParams; 42 + input: HandlerInput; 43 + req: express.Request; 44 + res: express.Response; 45 + resetRouteRateLimits: () => Promise<void>; 46 + }; 47 export type Handler<HA extends HandlerAuth = never> = ( 48 ctx: HandlerReqCtx<HA>, 49 + ) => Promise<HandlerOutput> | HandlerOutput;
+27 -27
apps/api/src/lexicon/types/app/rocksky/like/dislikeSong.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskySongDefs from '../song/defs' 11 12 - export type QueryParams = {} 13 14 export interface InputSchema { 15 /** The unique identifier of the song to dislike */ 16 - uri?: string 17 - [k: string]: unknown 18 } 19 20 - export type OutputSchema = AppRockskySongDefs.SongViewDetailed 21 22 export interface HandlerInput { 23 - encoding: 'application/json' 24 - body: InputSchema 25 } 26 27 export interface HandlerSuccess { 28 - encoding: 'application/json' 29 - body: OutputSchema 30 - headers?: { [key: string]: string } 31 } 32 33 export interface HandlerError { 34 - status: number 35 - message?: string 36 } 37 38 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 39 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 40 - auth: HA 41 - params: QueryParams 42 - input: HandlerInput 43 - req: express.Request 44 - res: express.Response 45 - resetRouteRateLimits: () => Promise<void> 46 - } 47 export type Handler<HA extends HandlerAuth = never> = ( 48 ctx: HandlerReqCtx<HA>, 49 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskySongDefs from "../song/defs"; 11 12 + export interface QueryParams {} 13 14 export interface InputSchema { 15 /** The unique identifier of the song to dislike */ 16 + uri?: string; 17 + [k: string]: unknown; 18 } 19 20 + export type OutputSchema = AppRockskySongDefs.SongViewDetailed; 21 22 export interface HandlerInput { 23 + encoding: "application/json"; 24 + body: InputSchema; 25 } 26 27 export interface HandlerSuccess { 28 + encoding: "application/json"; 29 + body: OutputSchema; 30 + headers?: { [key: string]: string }; 31 } 32 33 export interface HandlerError { 34 + status: number; 35 + message?: string; 36 } 37 38 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 39 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 40 + auth: HA; 41 + params: QueryParams; 42 + input: HandlerInput; 43 + req: express.Request; 44 + res: express.Response; 45 + resetRouteRateLimits: () => Promise<void>; 46 + }; 47 export type Handler<HA extends HandlerAuth = never> = ( 48 ctx: HandlerReqCtx<HA>, 49 + ) => Promise<HandlerOutput> | HandlerOutput;
+27 -27
apps/api/src/lexicon/types/app/rocksky/like/likeShout.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyShoutDefs from '../shout/defs' 11 12 - export type QueryParams = {} 13 14 export interface InputSchema { 15 /** The unique identifier of the shout to like */ 16 - uri?: string 17 - [k: string]: unknown 18 } 19 20 - export type OutputSchema = AppRockskyShoutDefs.ShoutView 21 22 export interface HandlerInput { 23 - encoding: 'application/json' 24 - body: InputSchema 25 } 26 27 export interface HandlerSuccess { 28 - encoding: 'application/json' 29 - body: OutputSchema 30 - headers?: { [key: string]: string } 31 } 32 33 export interface HandlerError { 34 - status: number 35 - message?: string 36 } 37 38 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 39 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 40 - auth: HA 41 - params: QueryParams 42 - input: HandlerInput 43 - req: express.Request 44 - res: express.Response 45 - resetRouteRateLimits: () => Promise<void> 46 - } 47 export type Handler<HA extends HandlerAuth = never> = ( 48 ctx: HandlerReqCtx<HA>, 49 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyShoutDefs from "../shout/defs"; 11 12 + export interface QueryParams {} 13 14 export interface InputSchema { 15 /** The unique identifier of the shout to like */ 16 + uri?: string; 17 + [k: string]: unknown; 18 } 19 20 + export type OutputSchema = AppRockskyShoutDefs.ShoutView; 21 22 export interface HandlerInput { 23 + encoding: "application/json"; 24 + body: InputSchema; 25 } 26 27 export interface HandlerSuccess { 28 + encoding: "application/json"; 29 + body: OutputSchema; 30 + headers?: { [key: string]: string }; 31 } 32 33 export interface HandlerError { 34 + status: number; 35 + message?: string; 36 } 37 38 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 39 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 40 + auth: HA; 41 + params: QueryParams; 42 + input: HandlerInput; 43 + req: express.Request; 44 + res: express.Response; 45 + resetRouteRateLimits: () => Promise<void>; 46 + }; 47 export type Handler<HA extends HandlerAuth = never> = ( 48 ctx: HandlerReqCtx<HA>, 49 + ) => Promise<HandlerOutput> | HandlerOutput;
+27 -27
apps/api/src/lexicon/types/app/rocksky/like/likeSong.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskySongDefs from '../song/defs' 11 12 - export type QueryParams = {} 13 14 export interface InputSchema { 15 /** The unique identifier of the song to like */ 16 - uri?: string 17 - [k: string]: unknown 18 } 19 20 - export type OutputSchema = AppRockskySongDefs.SongViewDetailed 21 22 export interface HandlerInput { 23 - encoding: 'application/json' 24 - body: InputSchema 25 } 26 27 export interface HandlerSuccess { 28 - encoding: 'application/json' 29 - body: OutputSchema 30 - headers?: { [key: string]: string } 31 } 32 33 export interface HandlerError { 34 - status: number 35 - message?: string 36 } 37 38 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 39 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 40 - auth: HA 41 - params: QueryParams 42 - input: HandlerInput 43 - req: express.Request 44 - res: express.Response 45 - resetRouteRateLimits: () => Promise<void> 46 - } 47 export type Handler<HA extends HandlerAuth = never> = ( 48 ctx: HandlerReqCtx<HA>, 49 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskySongDefs from "../song/defs"; 11 12 + export interface QueryParams {} 13 14 export interface InputSchema { 15 /** The unique identifier of the song to like */ 16 + uri?: string; 17 + [k: string]: unknown; 18 } 19 20 + export type OutputSchema = AppRockskySongDefs.SongViewDetailed; 21 22 export interface HandlerInput { 23 + encoding: "application/json"; 24 + body: InputSchema; 25 } 26 27 export interface HandlerSuccess { 28 + encoding: "application/json"; 29 + body: OutputSchema; 30 + headers?: { [key: string]: string }; 31 } 32 33 export interface HandlerError { 34 + status: number; 35 + message?: string; 36 } 37 38 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 39 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 40 + auth: HA; 41 + params: QueryParams; 42 + input: HandlerInput; 43 + req: express.Request; 44 + res: express.Response; 45 + resetRouteRateLimits: () => Promise<void>; 46 + }; 47 export type Handler<HA extends HandlerAuth = never> = ( 48 ctx: HandlerReqCtx<HA>, 49 + ) => Promise<HandlerOutput> | HandlerOutput;
+23 -23
apps/api/src/lexicon/types/app/rocksky/player/addDirectoryToQueue.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 export interface QueryParams { 12 - playerId?: string 13 /** The directory to add to the queue */ 14 - directory: string 15 /** Position in the queue to insert the directory at, defaults to the end if not specified */ 16 - position?: number 17 /** Whether to shuffle the added directory in the queue */ 18 - shuffle?: boolean 19 } 20 21 - export type InputSchema = undefined 22 - export type HandlerInput = undefined 23 24 export interface HandlerError { 25 - status: number 26 - message?: string 27 } 28 29 - export type HandlerOutput = HandlerError | void 30 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 31 - auth: HA 32 - params: QueryParams 33 - input: HandlerInput 34 - req: express.Request 35 - res: express.Response 36 - resetRouteRateLimits: () => Promise<void> 37 - } 38 export type Handler<HA extends HandlerAuth = never> = ( 39 ctx: HandlerReqCtx<HA>, 40 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 export interface QueryParams { 12 + playerId?: string; 13 /** The directory to add to the queue */ 14 + directory: string; 15 /** Position in the queue to insert the directory at, defaults to the end if not specified */ 16 + position?: number; 17 /** Whether to shuffle the added directory in the queue */ 18 + shuffle?: boolean; 19 } 20 21 + export type InputSchema = undefined; 22 + export type HandlerInput = undefined; 23 24 export interface HandlerError { 25 + status: number; 26 + message?: string; 27 } 28 29 + export type HandlerOutput = HandlerError | void; 30 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 31 + auth: HA; 32 + params: QueryParams; 33 + input: HandlerInput; 34 + req: express.Request; 35 + res: express.Response; 36 + resetRouteRateLimits: () => Promise<void>; 37 + }; 38 export type Handler<HA extends HandlerAuth = never> = ( 39 ctx: HandlerReqCtx<HA>, 40 + ) => Promise<HandlerOutput> | HandlerOutput;
+23 -23
apps/api/src/lexicon/types/app/rocksky/player/addItemsToQueue.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 export interface QueryParams { 12 - playerId?: string 13 - items: string[] 14 /** Position in the queue to insert the items at, defaults to the end if not specified */ 15 - position?: number 16 /** Whether to shuffle the added items in the queue */ 17 - shuffle?: boolean 18 } 19 20 - export type InputSchema = undefined 21 - export type HandlerInput = undefined 22 23 export interface HandlerError { 24 - status: number 25 - message?: string 26 } 27 28 - export type HandlerOutput = HandlerError | void 29 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 30 - auth: HA 31 - params: QueryParams 32 - input: HandlerInput 33 - req: express.Request 34 - res: express.Response 35 - resetRouteRateLimits: () => Promise<void> 36 - } 37 export type Handler<HA extends HandlerAuth = never> = ( 38 ctx: HandlerReqCtx<HA>, 39 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 export interface QueryParams { 12 + playerId?: string; 13 + items: string[]; 14 /** Position in the queue to insert the items at, defaults to the end if not specified */ 15 + position?: number; 16 /** Whether to shuffle the added items in the queue */ 17 + shuffle?: boolean; 18 } 19 20 + export type InputSchema = undefined; 21 + export type HandlerInput = undefined; 22 23 export interface HandlerError { 24 + status: number; 25 + message?: string; 26 } 27 28 + export type HandlerOutput = HandlerError | void; 29 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 30 + auth: HA; 31 + params: QueryParams; 32 + input: HandlerInput; 33 + req: express.Request; 34 + res: express.Response; 35 + resetRouteRateLimits: () => Promise<void>; 36 + }; 37 export type Handler<HA extends HandlerAuth = never> = ( 38 ctx: HandlerReqCtx<HA>, 39 + ) => Promise<HandlerOutput> | HandlerOutput;
+19 -19
apps/api/src/lexicon/types/app/rocksky/player/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 - import type * as AppRockskySongDefsSongViewBasic from '../song/defs/songViewBasic' 9 10 export interface CurrentlyPlayingViewDetailed { 11 /** The title of the currently playing track */ 12 - title?: string 13 - [k: string]: unknown 14 } 15 16 export function isCurrentlyPlayingViewDetailed( ··· 18 ): v is CurrentlyPlayingViewDetailed { 19 return ( 20 isObj(v) && 21 - hasProp(v, '$type') && 22 - v.$type === 'app.rocksky.player.defs#currentlyPlayingViewDetailed' 23 - ) 24 } 25 26 export function validateCurrentlyPlayingViewDetailed( 27 v: unknown, 28 ): ValidationResult { 29 return lexicons.validate( 30 - 'app.rocksky.player.defs#currentlyPlayingViewDetailed', 31 v, 32 - ) 33 } 34 35 export interface PlaybackQueueViewDetailed { 36 - tracks?: AppRockskySongDefsSongViewBasic.Main[] 37 - [k: string]: unknown 38 } 39 40 export function isPlaybackQueueViewDetailed( ··· 42 ): v is PlaybackQueueViewDetailed { 43 return ( 44 isObj(v) && 45 - hasProp(v, '$type') && 46 - v.$type === 'app.rocksky.player.defs#playbackQueueViewDetailed' 47 - ) 48 } 49 50 export function validatePlaybackQueueViewDetailed( 51 v: unknown, 52 ): ValidationResult { 53 return lexicons.validate( 54 - 'app.rocksky.player.defs#playbackQueueViewDetailed', 55 v, 56 - ) 57 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 + import * as AppRockskySongDefsSongViewBasic from "../song/defs/songViewBasic"; 9 10 export interface CurrentlyPlayingViewDetailed { 11 /** The title of the currently playing track */ 12 + title?: string; 13 + [k: string]: unknown; 14 } 15 16 export function isCurrentlyPlayingViewDetailed( ··· 18 ): v is CurrentlyPlayingViewDetailed { 19 return ( 20 isObj(v) && 21 + hasProp(v, "$type") && 22 + v.$type === "app.rocksky.player.defs#currentlyPlayingViewDetailed" 23 + ); 24 } 25 26 export function validateCurrentlyPlayingViewDetailed( 27 v: unknown, 28 ): ValidationResult { 29 return lexicons.validate( 30 + "app.rocksky.player.defs#currentlyPlayingViewDetailed", 31 v, 32 + ); 33 } 34 35 export interface PlaybackQueueViewDetailed { 36 + tracks?: AppRockskySongDefsSongViewBasic.Main[]; 37 + [k: string]: unknown; 38 } 39 40 export function isPlaybackQueueViewDetailed( ··· 42 ): v is PlaybackQueueViewDetailed { 43 return ( 44 isObj(v) && 45 + hasProp(v, "$type") && 46 + v.$type === "app.rocksky.player.defs#playbackQueueViewDetailed" 47 + ); 48 } 49 50 export function validatePlaybackQueueViewDetailed( 51 v: unknown, 52 ): ValidationResult { 53 return lexicons.validate( 54 + "app.rocksky.player.defs#playbackQueueViewDetailed", 55 v, 56 + ); 57 }
+26 -26
apps/api/src/lexicon/types/app/rocksky/player/getCurrentlyPlaying.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyPlayerDefs from './defs' 11 12 export interface QueryParams { 13 - playerId?: string 14 /** Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. */ 15 - actor?: string 16 } 17 18 - export type InputSchema = undefined 19 - export type OutputSchema = AppRockskyPlayerDefs.CurrentlyPlayingViewDetailed 20 - export type HandlerInput = undefined 21 22 export interface HandlerSuccess { 23 - encoding: 'application/json' 24 - body: OutputSchema 25 - headers?: { [key: string]: string } 26 } 27 28 export interface HandlerError { 29 - status: number 30 - message?: string 31 } 32 33 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 34 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 35 - auth: HA 36 - params: QueryParams 37 - input: HandlerInput 38 - req: express.Request 39 - res: express.Response 40 - resetRouteRateLimits: () => Promise<void> 41 - } 42 export type Handler<HA extends HandlerAuth = never> = ( 43 ctx: HandlerReqCtx<HA>, 44 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyPlayerDefs from "./defs"; 11 12 export interface QueryParams { 13 + playerId?: string; 14 /** Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. */ 15 + actor?: string; 16 } 17 18 + export type InputSchema = undefined; 19 + export type OutputSchema = AppRockskyPlayerDefs.CurrentlyPlayingViewDetailed; 20 + export type HandlerInput = undefined; 21 22 export interface HandlerSuccess { 23 + encoding: "application/json"; 24 + body: OutputSchema; 25 + headers?: { [key: string]: string }; 26 } 27 28 export interface HandlerError { 29 + status: number; 30 + message?: string; 31 } 32 33 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 34 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 35 + auth: HA; 36 + params: QueryParams; 37 + input: HandlerInput; 38 + req: express.Request; 39 + res: express.Response; 40 + resetRouteRateLimits: () => Promise<void>; 41 + }; 42 export type Handler<HA extends HandlerAuth = never> = ( 43 ctx: HandlerReqCtx<HA>, 44 + ) => Promise<HandlerOutput> | HandlerOutput;
+25 -25
apps/api/src/lexicon/types/app/rocksky/player/getPlaybackQueue.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyPlayerDefs from './defs' 11 12 export interface QueryParams { 13 - playerId?: string 14 } 15 16 - export type InputSchema = undefined 17 - export type OutputSchema = AppRockskyPlayerDefs.PlaybackQueueViewDetailed 18 - export type HandlerInput = undefined 19 20 export interface HandlerSuccess { 21 - encoding: 'application/json' 22 - body: OutputSchema 23 - headers?: { [key: string]: string } 24 } 25 26 export interface HandlerError { 27 - status: number 28 - message?: string 29 } 30 31 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 32 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 33 - auth: HA 34 - params: QueryParams 35 - input: HandlerInput 36 - req: express.Request 37 - res: express.Response 38 - resetRouteRateLimits: () => Promise<void> 39 - } 40 export type Handler<HA extends HandlerAuth = never> = ( 41 ctx: HandlerReqCtx<HA>, 42 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyPlayerDefs from "./defs"; 11 12 export interface QueryParams { 13 + playerId?: string; 14 } 15 16 + export type InputSchema = undefined; 17 + export type OutputSchema = AppRockskyPlayerDefs.PlaybackQueueViewDetailed; 18 + export type HandlerInput = undefined; 19 20 export interface HandlerSuccess { 21 + encoding: "application/json"; 22 + body: OutputSchema; 23 + headers?: { [key: string]: string }; 24 } 25 26 export interface HandlerError { 27 + status: number; 28 + message?: string; 29 } 30 31 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 32 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 33 + auth: HA; 34 + params: QueryParams; 35 + input: HandlerInput; 36 + req: express.Request; 37 + res: express.Response; 38 + resetRouteRateLimits: () => Promise<void>; 39 + }; 40 export type Handler<HA extends HandlerAuth = never> = ( 41 ctx: HandlerReqCtx<HA>, 42 + ) => Promise<HandlerOutput> | HandlerOutput;
+20 -20
apps/api/src/lexicon/types/app/rocksky/player/next.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 export interface QueryParams { 12 - playerId?: string 13 } 14 15 - export type InputSchema = undefined 16 - export type HandlerInput = undefined 17 18 export interface HandlerError { 19 - status: number 20 - message?: string 21 } 22 23 - export type HandlerOutput = HandlerError | void 24 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 25 - auth: HA 26 - params: QueryParams 27 - input: HandlerInput 28 - req: express.Request 29 - res: express.Response 30 - resetRouteRateLimits: () => Promise<void> 31 - } 32 export type Handler<HA extends HandlerAuth = never> = ( 33 ctx: HandlerReqCtx<HA>, 34 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 export interface QueryParams { 12 + playerId?: string; 13 } 14 15 + export type InputSchema = undefined; 16 + export type HandlerInput = undefined; 17 18 export interface HandlerError { 19 + status: number; 20 + message?: string; 21 } 22 23 + export type HandlerOutput = HandlerError | void; 24 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 25 + auth: HA; 26 + params: QueryParams; 27 + input: HandlerInput; 28 + req: express.Request; 29 + res: express.Response; 30 + resetRouteRateLimits: () => Promise<void>; 31 + }; 32 export type Handler<HA extends HandlerAuth = never> = ( 33 ctx: HandlerReqCtx<HA>, 34 + ) => Promise<HandlerOutput> | HandlerOutput;
+20 -20
apps/api/src/lexicon/types/app/rocksky/player/pause.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 export interface QueryParams { 12 - playerId?: string 13 } 14 15 - export type InputSchema = undefined 16 - export type HandlerInput = undefined 17 18 export interface HandlerError { 19 - status: number 20 - message?: string 21 } 22 23 - export type HandlerOutput = HandlerError | void 24 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 25 - auth: HA 26 - params: QueryParams 27 - input: HandlerInput 28 - req: express.Request 29 - res: express.Response 30 - resetRouteRateLimits: () => Promise<void> 31 - } 32 export type Handler<HA extends HandlerAuth = never> = ( 33 ctx: HandlerReqCtx<HA>, 34 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 export interface QueryParams { 12 + playerId?: string; 13 } 14 15 + export type InputSchema = undefined; 16 + export type HandlerInput = undefined; 17 18 export interface HandlerError { 19 + status: number; 20 + message?: string; 21 } 22 23 + export type HandlerOutput = HandlerError | void; 24 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 25 + auth: HA; 26 + params: QueryParams; 27 + input: HandlerInput; 28 + req: express.Request; 29 + res: express.Response; 30 + resetRouteRateLimits: () => Promise<void>; 31 + }; 32 export type Handler<HA extends HandlerAuth = never> = ( 33 ctx: HandlerReqCtx<HA>, 34 + ) => Promise<HandlerOutput> | HandlerOutput;
+20 -20
apps/api/src/lexicon/types/app/rocksky/player/play.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 export interface QueryParams { 12 - playerId?: string 13 } 14 15 - export type InputSchema = undefined 16 - export type HandlerInput = undefined 17 18 export interface HandlerError { 19 - status: number 20 - message?: string 21 } 22 23 - export type HandlerOutput = HandlerError | void 24 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 25 - auth: HA 26 - params: QueryParams 27 - input: HandlerInput 28 - req: express.Request 29 - res: express.Response 30 - resetRouteRateLimits: () => Promise<void> 31 - } 32 export type Handler<HA extends HandlerAuth = never> = ( 33 ctx: HandlerReqCtx<HA>, 34 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 export interface QueryParams { 12 + playerId?: string; 13 } 14 15 + export type InputSchema = undefined; 16 + export type HandlerInput = undefined; 17 18 export interface HandlerError { 19 + status: number; 20 + message?: string; 21 } 22 23 + export type HandlerOutput = HandlerError | void; 24 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 25 + auth: HA; 26 + params: QueryParams; 27 + input: HandlerInput; 28 + req: express.Request; 29 + res: express.Response; 30 + resetRouteRateLimits: () => Promise<void>; 31 + }; 32 export type Handler<HA extends HandlerAuth = never> = ( 33 ctx: HandlerReqCtx<HA>, 34 + ) => Promise<HandlerOutput> | HandlerOutput;
+24 -24
apps/api/src/lexicon/types/app/rocksky/player/playDirectory.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 export interface QueryParams { 12 - playerId?: string 13 - directoryId: string 14 - shuffle?: boolean 15 - recurse?: boolean 16 - position?: number 17 } 18 19 - export type InputSchema = undefined 20 - export type HandlerInput = undefined 21 22 export interface HandlerError { 23 - status: number 24 - message?: string 25 } 26 27 - export type HandlerOutput = HandlerError | void 28 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 29 - auth: HA 30 - params: QueryParams 31 - input: HandlerInput 32 - req: express.Request 33 - res: express.Response 34 - resetRouteRateLimits: () => Promise<void> 35 - } 36 export type Handler<HA extends HandlerAuth = never> = ( 37 ctx: HandlerReqCtx<HA>, 38 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 export interface QueryParams { 12 + playerId?: string; 13 + directoryId: string; 14 + shuffle?: boolean; 15 + recurse?: boolean; 16 + position?: number; 17 } 18 19 + export type InputSchema = undefined; 20 + export type HandlerInput = undefined; 21 22 export interface HandlerError { 23 + status: number; 24 + message?: string; 25 } 26 27 + export type HandlerOutput = HandlerError | void; 28 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 29 + auth: HA; 30 + params: QueryParams; 31 + input: HandlerInput; 32 + req: express.Request; 33 + res: express.Response; 34 + resetRouteRateLimits: () => Promise<void>; 35 + }; 36 export type Handler<HA extends HandlerAuth = never> = ( 37 ctx: HandlerReqCtx<HA>, 38 + ) => Promise<HandlerOutput> | HandlerOutput;
+21 -21
apps/api/src/lexicon/types/app/rocksky/player/playFile.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 export interface QueryParams { 12 - playerId?: string 13 - fileId: string 14 } 15 16 - export type InputSchema = undefined 17 - export type HandlerInput = undefined 18 19 export interface HandlerError { 20 - status: number 21 - message?: string 22 } 23 24 - export type HandlerOutput = HandlerError | void 25 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 26 - auth: HA 27 - params: QueryParams 28 - input: HandlerInput 29 - req: express.Request 30 - res: express.Response 31 - resetRouteRateLimits: () => Promise<void> 32 - } 33 export type Handler<HA extends HandlerAuth = never> = ( 34 ctx: HandlerReqCtx<HA>, 35 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 export interface QueryParams { 12 + playerId?: string; 13 + fileId: string; 14 } 15 16 + export type InputSchema = undefined; 17 + export type HandlerInput = undefined; 18 19 export interface HandlerError { 20 + status: number; 21 + message?: string; 22 } 23 24 + export type HandlerOutput = HandlerError | void; 25 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 26 + auth: HA; 27 + params: QueryParams; 28 + input: HandlerInput; 29 + req: express.Request; 30 + res: express.Response; 31 + resetRouteRateLimits: () => Promise<void>; 32 + }; 33 export type Handler<HA extends HandlerAuth = never> = ( 34 ctx: HandlerReqCtx<HA>, 35 + ) => Promise<HandlerOutput> | HandlerOutput;
+20 -20
apps/api/src/lexicon/types/app/rocksky/player/previous.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 export interface QueryParams { 12 - playerId?: string 13 } 14 15 - export type InputSchema = undefined 16 - export type HandlerInput = undefined 17 18 export interface HandlerError { 19 - status: number 20 - message?: string 21 } 22 23 - export type HandlerOutput = HandlerError | void 24 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 25 - auth: HA 26 - params: QueryParams 27 - input: HandlerInput 28 - req: express.Request 29 - res: express.Response 30 - resetRouteRateLimits: () => Promise<void> 31 - } 32 export type Handler<HA extends HandlerAuth = never> = ( 33 ctx: HandlerReqCtx<HA>, 34 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 export interface QueryParams { 12 + playerId?: string; 13 } 14 15 + export type InputSchema = undefined; 16 + export type HandlerInput = undefined; 17 18 export interface HandlerError { 19 + status: number; 20 + message?: string; 21 } 22 23 + export type HandlerOutput = HandlerError | void; 24 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 25 + auth: HA; 26 + params: QueryParams; 27 + input: HandlerInput; 28 + req: express.Request; 29 + res: express.Response; 30 + resetRouteRateLimits: () => Promise<void>; 31 + }; 32 export type Handler<HA extends HandlerAuth = never> = ( 33 ctx: HandlerReqCtx<HA>, 34 + ) => Promise<HandlerOutput> | HandlerOutput;
+21 -21
apps/api/src/lexicon/types/app/rocksky/player/seek.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 export interface QueryParams { 12 - playerId?: string 13 /** The position in seconds to seek to */ 14 - position: number 15 } 16 17 - export type InputSchema = undefined 18 - export type HandlerInput = undefined 19 20 export interface HandlerError { 21 - status: number 22 - message?: string 23 } 24 25 - export type HandlerOutput = HandlerError | void 26 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 27 - auth: HA 28 - params: QueryParams 29 - input: HandlerInput 30 - req: express.Request 31 - res: express.Response 32 - resetRouteRateLimits: () => Promise<void> 33 - } 34 export type Handler<HA extends HandlerAuth = never> = ( 35 ctx: HandlerReqCtx<HA>, 36 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 export interface QueryParams { 12 + playerId?: string; 13 /** The position in seconds to seek to */ 14 + position: number; 15 } 16 17 + export type InputSchema = undefined; 18 + export type HandlerInput = undefined; 19 20 export interface HandlerError { 21 + status: number; 22 + message?: string; 23 } 24 25 + export type HandlerOutput = HandlerError | void; 26 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 27 + auth: HA; 28 + params: QueryParams; 29 + input: HandlerInput; 30 + req: express.Request; 31 + res: express.Response; 32 + resetRouteRateLimits: () => Promise<void>; 33 + }; 34 export type Handler<HA extends HandlerAuth = never> = ( 35 ctx: HandlerReqCtx<HA>, 36 + ) => Promise<HandlerOutput> | HandlerOutput;
+20 -20
apps/api/src/lexicon/types/app/rocksky/playlist.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type { ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../lexicons' 6 - import { isObj, hasProp } from '../../../util' 7 - import { CID } from 'multiformats/cid' 8 - import type * as AppRockskySong from './song' 9 10 export interface Record { 11 /** The name of the playlist. */ 12 - name: string 13 /** The playlist description. */ 14 - description?: string 15 /** The picture of the playlist. */ 16 - picture?: BlobRef 17 /** The tracks in the playlist. */ 18 - tracks?: AppRockskySong.Record[] 19 /** The date the playlist was created. */ 20 - createdAt: string 21 /** The Spotify link of the playlist. */ 22 - spotifyLink?: string 23 /** The Tidal link of the playlist. */ 24 - tidalLink?: string 25 /** The YouTube link of the playlist. */ 26 - youtubeLink?: string 27 /** The Apple Music link of the playlist. */ 28 - appleMusicLink?: string 29 - [k: string]: unknown 30 } 31 32 export function isRecord(v: unknown): v is Record { 33 return ( 34 isObj(v) && 35 - hasProp(v, '$type') && 36 - (v.$type === 'app.rocksky.playlist#main' || 37 - v.$type === 'app.rocksky.playlist') 38 - ) 39 } 40 41 export function validateRecord(v: unknown): ValidationResult { 42 - return lexicons.validate('app.rocksky.playlist#main', v) 43 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../lexicons"; 6 + import { isObj, hasProp } from "../../../util"; 7 + import { CID } from "multiformats/cid"; 8 + import * as AppRockskySong from "./song"; 9 10 export interface Record { 11 /** The name of the playlist. */ 12 + name: string; 13 /** The playlist description. */ 14 + description?: string; 15 /** The picture of the playlist. */ 16 + picture?: BlobRef; 17 /** The tracks in the playlist. */ 18 + tracks?: AppRockskySong.Record[]; 19 /** The date the playlist was created. */ 20 + createdAt: string; 21 /** The Spotify link of the playlist. */ 22 + spotifyLink?: string; 23 /** The Tidal link of the playlist. */ 24 + tidalLink?: string; 25 /** The YouTube link of the playlist. */ 26 + youtubeLink?: string; 27 /** The Apple Music link of the playlist. */ 28 + appleMusicLink?: string; 29 + [k: string]: unknown; 30 } 31 32 export function isRecord(v: unknown): v is Record { 33 return ( 34 isObj(v) && 35 + hasProp(v, "$type") && 36 + (v.$type === "app.rocksky.playlist#main" || 37 + v.$type === "app.rocksky.playlist") 38 + ); 39 } 40 41 export function validateRecord(v: unknown): ValidationResult { 42 + return lexicons.validate("app.rocksky.playlist#main", v); 43 }
+21 -21
apps/api/src/lexicon/types/app/rocksky/playlist/createPlaylist.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 export interface QueryParams { 12 /** The name of the playlist */ 13 - name: string 14 /** A brief description of the playlist */ 15 - description?: string 16 } 17 18 - export type InputSchema = undefined 19 - export type HandlerInput = undefined 20 21 export interface HandlerError { 22 - status: number 23 - message?: string 24 } 25 26 - export type HandlerOutput = HandlerError | void 27 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 28 - auth: HA 29 - params: QueryParams 30 - input: HandlerInput 31 - req: express.Request 32 - res: express.Response 33 - resetRouteRateLimits: () => Promise<void> 34 - } 35 export type Handler<HA extends HandlerAuth = never> = ( 36 ctx: HandlerReqCtx<HA>, 37 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 export interface QueryParams { 12 /** The name of the playlist */ 13 + name: string; 14 /** A brief description of the playlist */ 15 + description?: string; 16 } 17 18 + export type InputSchema = undefined; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerError { 22 + status: number; 23 + message?: string; 24 } 25 26 + export type HandlerOutput = HandlerError | void; 27 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 28 + auth: HA; 29 + params: QueryParams; 30 + input: HandlerInput; 31 + req: express.Request; 32 + res: express.Response; 33 + resetRouteRateLimits: () => Promise<void>; 34 + }; 35 export type Handler<HA extends HandlerAuth = never> = ( 36 ctx: HandlerReqCtx<HA>, 37 + ) => Promise<HandlerOutput> | HandlerOutput;
+37 -37
apps/api/src/lexicon/types/app/rocksky/playlist/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 - import type * as AppRockskySongDefs from '../song/defs' 9 10 /** Detailed view of a playlist, including its tracks and metadata */ 11 export interface PlaylistViewDetailed { 12 /** The unique identifier of the playlist. */ 13 - id?: string 14 /** The title of the playlist. */ 15 - title?: string 16 /** The URI of the playlist. */ 17 - uri?: string 18 /** The DID of the curator of the playlist. */ 19 - curatorDid?: string 20 /** The handle of the curator of the playlist. */ 21 - curatorHandle?: string 22 /** The name of the curator of the playlist. */ 23 - curatorName?: string 24 /** The URL of the avatar image of the curator. */ 25 - curatorAvatarUrl?: string 26 /** A description of the playlist. */ 27 - description?: string 28 /** The URL of the cover image for the playlist. */ 29 - coverImageUrl?: string 30 /** The date and time when the playlist was created. */ 31 - createdAt?: string 32 /** A list of tracks in the playlist. */ 33 - tracks?: AppRockskySongDefs.SongViewBasic[] 34 - [k: string]: unknown 35 } 36 37 export function isPlaylistViewDetailed(v: unknown): v is PlaylistViewDetailed { 38 return ( 39 isObj(v) && 40 - hasProp(v, '$type') && 41 - v.$type === 'app.rocksky.playlist.defs#playlistViewDetailed' 42 - ) 43 } 44 45 export function validatePlaylistViewDetailed(v: unknown): ValidationResult { 46 - return lexicons.validate('app.rocksky.playlist.defs#playlistViewDetailed', v) 47 } 48 49 /** Basic view of a playlist, including its metadata */ 50 export interface PlaylistViewBasic { 51 /** The unique identifier of the playlist. */ 52 - id?: string 53 /** The title of the playlist. */ 54 - title?: string 55 /** The URI of the playlist. */ 56 - uri?: string 57 /** The DID of the curator of the playlist. */ 58 - curatorDid?: string 59 /** The handle of the curator of the playlist. */ 60 - curatorHandle?: string 61 /** The name of the curator of the playlist. */ 62 - curatorName?: string 63 /** The URL of the avatar image of the curator. */ 64 - curatorAvatarUrl?: string 65 /** A description of the playlist. */ 66 - description?: string 67 /** The URL of the cover image for the playlist. */ 68 - coverImageUrl?: string 69 /** The date and time when the playlist was created. */ 70 - createdAt?: string 71 /** The number of tracks in the playlist. */ 72 - trackCount?: number 73 - [k: string]: unknown 74 } 75 76 export function isPlaylistViewBasic(v: unknown): v is PlaylistViewBasic { 77 return ( 78 isObj(v) && 79 - hasProp(v, '$type') && 80 - v.$type === 'app.rocksky.playlist.defs#playlistViewBasic' 81 - ) 82 } 83 84 export function validatePlaylistViewBasic(v: unknown): ValidationResult { 85 - return lexicons.validate('app.rocksky.playlist.defs#playlistViewBasic', v) 86 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 + import * as AppRockskySongDefs from "../song/defs"; 9 10 /** Detailed view of a playlist, including its tracks and metadata */ 11 export interface PlaylistViewDetailed { 12 /** The unique identifier of the playlist. */ 13 + id?: string; 14 /** The title of the playlist. */ 15 + title?: string; 16 /** The URI of the playlist. */ 17 + uri?: string; 18 /** The DID of the curator of the playlist. */ 19 + curatorDid?: string; 20 /** The handle of the curator of the playlist. */ 21 + curatorHandle?: string; 22 /** The name of the curator of the playlist. */ 23 + curatorName?: string; 24 /** The URL of the avatar image of the curator. */ 25 + curatorAvatarUrl?: string; 26 /** A description of the playlist. */ 27 + description?: string; 28 /** The URL of the cover image for the playlist. */ 29 + coverImageUrl?: string; 30 /** The date and time when the playlist was created. */ 31 + createdAt?: string; 32 /** A list of tracks in the playlist. */ 33 + tracks?: AppRockskySongDefs.SongViewBasic[]; 34 + [k: string]: unknown; 35 } 36 37 export function isPlaylistViewDetailed(v: unknown): v is PlaylistViewDetailed { 38 return ( 39 isObj(v) && 40 + hasProp(v, "$type") && 41 + v.$type === "app.rocksky.playlist.defs#playlistViewDetailed" 42 + ); 43 } 44 45 export function validatePlaylistViewDetailed(v: unknown): ValidationResult { 46 + return lexicons.validate("app.rocksky.playlist.defs#playlistViewDetailed", v); 47 } 48 49 /** Basic view of a playlist, including its metadata */ 50 export interface PlaylistViewBasic { 51 /** The unique identifier of the playlist. */ 52 + id?: string; 53 /** The title of the playlist. */ 54 + title?: string; 55 /** The URI of the playlist. */ 56 + uri?: string; 57 /** The DID of the curator of the playlist. */ 58 + curatorDid?: string; 59 /** The handle of the curator of the playlist. */ 60 + curatorHandle?: string; 61 /** The name of the curator of the playlist. */ 62 + curatorName?: string; 63 /** The URL of the avatar image of the curator. */ 64 + curatorAvatarUrl?: string; 65 /** A description of the playlist. */ 66 + description?: string; 67 /** The URL of the cover image for the playlist. */ 68 + coverImageUrl?: string; 69 /** The date and time when the playlist was created. */ 70 + createdAt?: string; 71 /** The number of tracks in the playlist. */ 72 + trackCount?: number; 73 + [k: string]: unknown; 74 } 75 76 export function isPlaylistViewBasic(v: unknown): v is PlaylistViewBasic { 77 return ( 78 isObj(v) && 79 + hasProp(v, "$type") && 80 + v.$type === "app.rocksky.playlist.defs#playlistViewBasic" 81 + ); 82 } 83 84 export function validatePlaylistViewBasic(v: unknown): ValidationResult { 85 + return lexicons.validate("app.rocksky.playlist.defs#playlistViewBasic", v); 86 }
+25 -25
apps/api/src/lexicon/types/app/rocksky/playlist/getPlaylist.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyPlaylistDefs from './defs' 11 12 export interface QueryParams { 13 /** The URI of the playlist to retrieve. */ 14 - uri: string 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskyPlaylistDefs.PlaylistViewDetailed 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyPlaylistDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The URI of the playlist to retrieve. */ 14 + uri: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskyPlaylistDefs.PlaylistViewDetailed; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+27 -27
apps/api/src/lexicon/types/app/rocksky/playlist/getPlaylists.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyPlaylistDefs from './defs' 11 12 export interface QueryParams { 13 /** The maximum number of playlists to return. */ 14 - limit?: number 15 /** The offset for pagination, used to skip a number of playlists. */ 16 - offset?: number 17 } 18 19 - export type InputSchema = undefined 20 21 export interface OutputSchema { 22 - playlists?: AppRockskyPlaylistDefs.PlaylistViewBasic[] 23 - [k: string]: unknown 24 } 25 26 - export type HandlerInput = undefined 27 28 export interface HandlerSuccess { 29 - encoding: 'application/json' 30 - body: OutputSchema 31 - headers?: { [key: string]: string } 32 } 33 34 export interface HandlerError { 35 - status: number 36 - message?: string 37 } 38 39 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 40 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 41 - auth: HA 42 - params: QueryParams 43 - input: HandlerInput 44 - req: express.Request 45 - res: express.Response 46 - resetRouteRateLimits: () => Promise<void> 47 - } 48 export type Handler<HA extends HandlerAuth = never> = ( 49 ctx: HandlerReqCtx<HA>, 50 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyPlaylistDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The maximum number of playlists to return. */ 14 + limit?: number; 15 /** The offset for pagination, used to skip a number of playlists. */ 16 + offset?: number; 17 } 18 19 + export type InputSchema = undefined; 20 21 export interface OutputSchema { 22 + playlists?: AppRockskyPlaylistDefs.PlaylistViewBasic[]; 23 + [k: string]: unknown; 24 } 25 26 + export type HandlerInput = undefined; 27 28 export interface HandlerSuccess { 29 + encoding: "application/json"; 30 + body: OutputSchema; 31 + headers?: { [key: string]: string }; 32 } 33 34 export interface HandlerError { 35 + status: number; 36 + message?: string; 37 } 38 39 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 40 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 41 + auth: HA; 42 + params: QueryParams; 43 + input: HandlerInput; 44 + req: express.Request; 45 + res: express.Response; 46 + resetRouteRateLimits: () => Promise<void>; 47 + }; 48 export type Handler<HA extends HandlerAuth = never> = ( 49 ctx: HandlerReqCtx<HA>, 50 + ) => Promise<HandlerOutput> | HandlerOutput;
+22 -22
apps/api/src/lexicon/types/app/rocksky/playlist/insertDirectory.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 export interface QueryParams { 12 /** The URI of the playlist to start */ 13 - uri: string 14 /** The directory (id) to insert into the playlist */ 15 - directory: string 16 /** The position in the playlist to insert the directory at, if not specified, the directory will be appended */ 17 - position?: number 18 } 19 20 - export type InputSchema = undefined 21 - export type HandlerInput = undefined 22 23 export interface HandlerError { 24 - status: number 25 - message?: string 26 } 27 28 - export type HandlerOutput = HandlerError | void 29 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 30 - auth: HA 31 - params: QueryParams 32 - input: HandlerInput 33 - req: express.Request 34 - res: express.Response 35 - resetRouteRateLimits: () => Promise<void> 36 - } 37 export type Handler<HA extends HandlerAuth = never> = ( 38 ctx: HandlerReqCtx<HA>, 39 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 export interface QueryParams { 12 /** The URI of the playlist to start */ 13 + uri: string; 14 /** The directory (id) to insert into the playlist */ 15 + directory: string; 16 /** The position in the playlist to insert the directory at, if not specified, the directory will be appended */ 17 + position?: number; 18 } 19 20 + export type InputSchema = undefined; 21 + export type HandlerInput = undefined; 22 23 export interface HandlerError { 24 + status: number; 25 + message?: string; 26 } 27 28 + export type HandlerOutput = HandlerError | void; 29 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 30 + auth: HA; 31 + params: QueryParams; 32 + input: HandlerInput; 33 + req: express.Request; 34 + res: express.Response; 35 + resetRouteRateLimits: () => Promise<void>; 36 + }; 37 export type Handler<HA extends HandlerAuth = never> = ( 38 ctx: HandlerReqCtx<HA>, 39 + ) => Promise<HandlerOutput> | HandlerOutput;
+22 -22
apps/api/src/lexicon/types/app/rocksky/playlist/insertFiles.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 export interface QueryParams { 12 /** The URI of the playlist to start */ 13 - uri: string 14 - files: string[] 15 /** The position in the playlist to insert the files at, if not specified, files will be appended */ 16 - position?: number 17 } 18 19 - export type InputSchema = undefined 20 - export type HandlerInput = undefined 21 22 export interface HandlerError { 23 - status: number 24 - message?: string 25 } 26 27 - export type HandlerOutput = HandlerError | void 28 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 29 - auth: HA 30 - params: QueryParams 31 - input: HandlerInput 32 - req: express.Request 33 - res: express.Response 34 - resetRouteRateLimits: () => Promise<void> 35 - } 36 export type Handler<HA extends HandlerAuth = never> = ( 37 ctx: HandlerReqCtx<HA>, 38 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 export interface QueryParams { 12 /** The URI of the playlist to start */ 13 + uri: string; 14 + files: string[]; 15 /** The position in the playlist to insert the files at, if not specified, files will be appended */ 16 + position?: number; 17 } 18 19 + export type InputSchema = undefined; 20 + export type HandlerInput = undefined; 21 22 export interface HandlerError { 23 + status: number; 24 + message?: string; 25 } 26 27 + export type HandlerOutput = HandlerError | void; 28 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 29 + auth: HA; 30 + params: QueryParams; 31 + input: HandlerInput; 32 + req: express.Request; 33 + res: express.Response; 34 + resetRouteRateLimits: () => Promise<void>; 35 + }; 36 export type Handler<HA extends HandlerAuth = never> = ( 37 ctx: HandlerReqCtx<HA>, 38 + ) => Promise<HandlerOutput> | HandlerOutput;
+20 -20
apps/api/src/lexicon/types/app/rocksky/playlist/removePlaylist.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 export interface QueryParams { 12 /** The URI of the playlist to remove */ 13 - uri: string 14 } 15 16 - export type InputSchema = undefined 17 - export type HandlerInput = undefined 18 19 export interface HandlerError { 20 - status: number 21 - message?: string 22 } 23 24 - export type HandlerOutput = HandlerError | void 25 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 26 - auth: HA 27 - params: QueryParams 28 - input: HandlerInput 29 - req: express.Request 30 - res: express.Response 31 - resetRouteRateLimits: () => Promise<void> 32 - } 33 export type Handler<HA extends HandlerAuth = never> = ( 34 ctx: HandlerReqCtx<HA>, 35 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 export interface QueryParams { 12 /** The URI of the playlist to remove */ 13 + uri: string; 14 } 15 16 + export type InputSchema = undefined; 17 + export type HandlerInput = undefined; 18 19 export interface HandlerError { 20 + status: number; 21 + message?: string; 22 } 23 24 + export type HandlerOutput = HandlerError | void; 25 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 26 + auth: HA; 27 + params: QueryParams; 28 + input: HandlerInput; 29 + req: express.Request; 30 + res: express.Response; 31 + resetRouteRateLimits: () => Promise<void>; 32 + }; 33 export type Handler<HA extends HandlerAuth = never> = ( 34 ctx: HandlerReqCtx<HA>, 35 + ) => Promise<HandlerOutput> | HandlerOutput;
+21 -21
apps/api/src/lexicon/types/app/rocksky/playlist/removeTrack.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 export interface QueryParams { 12 /** The URI of the playlist to remove the track from */ 13 - uri: string 14 /** The position of the track to remove in the playlist */ 15 - position: number 16 } 17 18 - export type InputSchema = undefined 19 - export type HandlerInput = undefined 20 21 export interface HandlerError { 22 - status: number 23 - message?: string 24 } 25 26 - export type HandlerOutput = HandlerError | void 27 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 28 - auth: HA 29 - params: QueryParams 30 - input: HandlerInput 31 - req: express.Request 32 - res: express.Response 33 - resetRouteRateLimits: () => Promise<void> 34 - } 35 export type Handler<HA extends HandlerAuth = never> = ( 36 ctx: HandlerReqCtx<HA>, 37 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 export interface QueryParams { 12 /** The URI of the playlist to remove the track from */ 13 + uri: string; 14 /** The position of the track to remove in the playlist */ 15 + position: number; 16 } 17 18 + export type InputSchema = undefined; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerError { 22 + status: number; 23 + message?: string; 24 } 25 26 + export type HandlerOutput = HandlerError | void; 27 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 28 + auth: HA; 29 + params: QueryParams; 30 + input: HandlerInput; 31 + req: express.Request; 32 + res: express.Response; 33 + resetRouteRateLimits: () => Promise<void>; 34 + }; 35 export type Handler<HA extends HandlerAuth = never> = ( 36 ctx: HandlerReqCtx<HA>, 37 + ) => Promise<HandlerOutput> | HandlerOutput;
+22 -22
apps/api/src/lexicon/types/app/rocksky/playlist/startPlaylist.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 export interface QueryParams { 12 /** The URI of the playlist to start */ 13 - uri: string 14 /** Whether to shuffle the playlist when starting it */ 15 - shuffle?: boolean 16 /** The position in the playlist to start from, if not specified, starts from the beginning */ 17 - position?: number 18 } 19 20 - export type InputSchema = undefined 21 - export type HandlerInput = undefined 22 23 export interface HandlerError { 24 - status: number 25 - message?: string 26 } 27 28 - export type HandlerOutput = HandlerError | void 29 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 30 - auth: HA 31 - params: QueryParams 32 - input: HandlerInput 33 - req: express.Request 34 - res: express.Response 35 - resetRouteRateLimits: () => Promise<void> 36 - } 37 export type Handler<HA extends HandlerAuth = never> = ( 38 ctx: HandlerReqCtx<HA>, 39 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 export interface QueryParams { 12 /** The URI of the playlist to start */ 13 + uri: string; 14 /** Whether to shuffle the playlist when starting it */ 15 + shuffle?: boolean; 16 /** The position in the playlist to start from, if not specified, starts from the beginning */ 17 + position?: number; 18 } 19 20 + export type InputSchema = undefined; 21 + export type HandlerInput = undefined; 22 23 export interface HandlerError { 24 + status: number; 25 + message?: string; 26 } 27 28 + export type HandlerOutput = HandlerError | void; 29 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 30 + auth: HA; 31 + params: QueryParams; 32 + input: HandlerInput; 33 + req: express.Request; 34 + res: express.Response; 35 + resetRouteRateLimits: () => Promise<void>; 36 + }; 37 export type Handler<HA extends HandlerAuth = never> = ( 38 ctx: HandlerReqCtx<HA>, 39 + ) => Promise<HandlerOutput> | HandlerOutput;
+16 -16
apps/api/src/lexicon/types/app/rocksky/radio.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type { ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../lexicons' 6 - import { isObj, hasProp } from '../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface Record { 10 /** The name of the radio station. */ 11 - name: string 12 /** The URL of the radio station. */ 13 - url: string 14 /** A description of the radio station. */ 15 - description?: string 16 /** The genre of the radio station. */ 17 - genre?: string 18 /** The logo of the radio station. */ 19 - logo?: BlobRef 20 /** The website of the radio station. */ 21 - website?: string 22 /** The date when the radio station was created. */ 23 - createdAt: string 24 - [k: string]: unknown 25 } 26 27 export function isRecord(v: unknown): v is Record { 28 return ( 29 isObj(v) && 30 - hasProp(v, '$type') && 31 - (v.$type === 'app.rocksky.radio#main' || v.$type === 'app.rocksky.radio') 32 - ) 33 } 34 35 export function validateRecord(v: unknown): ValidationResult { 36 - return lexicons.validate('app.rocksky.radio#main', v) 37 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../lexicons"; 6 + import { isObj, hasProp } from "../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface Record { 10 /** The name of the radio station. */ 11 + name: string; 12 /** The URL of the radio station. */ 13 + url: string; 14 /** A description of the radio station. */ 15 + description?: string; 16 /** The genre of the radio station. */ 17 + genre?: string; 18 /** The logo of the radio station. */ 19 + logo?: BlobRef; 20 /** The website of the radio station. */ 21 + website?: string; 22 /** The date when the radio station was created. */ 23 + createdAt: string; 24 + [k: string]: unknown; 25 } 26 27 export function isRecord(v: unknown): v is Record { 28 return ( 29 isObj(v) && 30 + hasProp(v, "$type") && 31 + (v.$type === "app.rocksky.radio#main" || v.$type === "app.rocksky.radio") 32 + ); 33 } 34 35 export function validateRecord(v: unknown): ValidationResult { 36 + return lexicons.validate("app.rocksky.radio#main", v); 37 }
+26 -26
apps/api/src/lexicon/types/app/rocksky/radio/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface RadioViewBasic { 10 /** The unique identifier of the radio. */ 11 - id?: string 12 /** The name of the radio. */ 13 - name?: string 14 /** A brief description of the radio. */ 15 - description?: string 16 /** The date and time when the radio was created. */ 17 - createdAt?: string 18 - [k: string]: unknown 19 } 20 21 export function isRadioViewBasic(v: unknown): v is RadioViewBasic { 22 return ( 23 isObj(v) && 24 - hasProp(v, '$type') && 25 - v.$type === 'app.rocksky.radio.defs#radioViewBasic' 26 - ) 27 } 28 29 export function validateRadioViewBasic(v: unknown): ValidationResult { 30 - return lexicons.validate('app.rocksky.radio.defs#radioViewBasic', v) 31 } 32 33 export interface RadioViewDetailed { 34 /** The unique identifier of the radio. */ 35 - id?: string 36 /** The name of the radio. */ 37 - name?: string 38 /** A brief description of the radio. */ 39 - description?: string 40 /** The website of the radio. */ 41 - website?: string 42 /** The streaming URL of the radio. */ 43 - url?: string 44 /** The genre of the radio. */ 45 - genre?: string 46 /** The logo of the radio station. */ 47 - logo?: string 48 /** The date and time when the radio was created. */ 49 - createdAt?: string 50 - [k: string]: unknown 51 } 52 53 export function isRadioViewDetailed(v: unknown): v is RadioViewDetailed { 54 return ( 55 isObj(v) && 56 - hasProp(v, '$type') && 57 - v.$type === 'app.rocksky.radio.defs#radioViewDetailed' 58 - ) 59 } 60 61 export function validateRadioViewDetailed(v: unknown): ValidationResult { 62 - return lexicons.validate('app.rocksky.radio.defs#radioViewDetailed', v) 63 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface RadioViewBasic { 10 /** The unique identifier of the radio. */ 11 + id?: string; 12 /** The name of the radio. */ 13 + name?: string; 14 /** A brief description of the radio. */ 15 + description?: string; 16 /** The date and time when the radio was created. */ 17 + createdAt?: string; 18 + [k: string]: unknown; 19 } 20 21 export function isRadioViewBasic(v: unknown): v is RadioViewBasic { 22 return ( 23 isObj(v) && 24 + hasProp(v, "$type") && 25 + v.$type === "app.rocksky.radio.defs#radioViewBasic" 26 + ); 27 } 28 29 export function validateRadioViewBasic(v: unknown): ValidationResult { 30 + return lexicons.validate("app.rocksky.radio.defs#radioViewBasic", v); 31 } 32 33 export interface RadioViewDetailed { 34 /** The unique identifier of the radio. */ 35 + id?: string; 36 /** The name of the radio. */ 37 + name?: string; 38 /** A brief description of the radio. */ 39 + description?: string; 40 /** The website of the radio. */ 41 + website?: string; 42 /** The streaming URL of the radio. */ 43 + url?: string; 44 /** The genre of the radio. */ 45 + genre?: string; 46 /** The logo of the radio station. */ 47 + logo?: string; 48 /** The date and time when the radio was created. */ 49 + createdAt?: string; 50 + [k: string]: unknown; 51 } 52 53 export function isRadioViewDetailed(v: unknown): v is RadioViewDetailed { 54 return ( 55 isObj(v) && 56 + hasProp(v, "$type") && 57 + v.$type === "app.rocksky.radio.defs#radioViewDetailed" 58 + ); 59 } 60 61 export function validateRadioViewDetailed(v: unknown): ValidationResult { 62 + return lexicons.validate("app.rocksky.radio.defs#radioViewDetailed", v); 63 }
+35 -33
apps/api/src/lexicon/types/app/rocksky/scrobble.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type { ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../lexicons' 6 - import { isObj, hasProp } from '../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface Record { 10 /** The title of the song. */ 11 - title: string 12 /** The artist of the song. */ 13 - artist: string 14 /** The album artist of the song. */ 15 - albumArtist: string 16 /** The album of the song. */ 17 - album: string 18 /** The duration of the song in seconds. */ 19 - duration: number 20 /** The track number of the song in the album. */ 21 - trackNumber?: number 22 /** The disc number of the song in the album. */ 23 - discNumber?: number 24 /** The release date of the song. */ 25 - releaseDate?: string 26 /** The year the song was released. */ 27 - year?: number 28 /** The genre of the song. */ 29 - genre?: string 30 /** The tags of the song. */ 31 - tags?: string[] 32 /** The composer of the song. */ 33 - composer?: string 34 /** The lyrics of the song. */ 35 - lyrics?: string 36 /** The copyright message of the song. */ 37 - copyrightMessage?: string 38 /** Informations about the song */ 39 - wiki?: string 40 /** The album art of the song. */ 41 - albumArt?: BlobRef 42 /** The YouTube link of the song. */ 43 - youtubeLink?: string 44 /** The Spotify link of the song. */ 45 - spotifyLink?: string 46 /** The Tidal link of the song. */ 47 - tidalLink?: string 48 /** The Apple Music link of the song. */ 49 - appleMusicLink?: string 50 /** The date when the song was created. */ 51 - createdAt: string 52 /** The MusicBrainz ID of the song. */ 53 - mbid?: string 54 /** The label of the song. */ 55 - label?: string 56 - [k: string]: unknown 57 } 58 59 export function isRecord(v: unknown): v is Record { 60 return ( 61 isObj(v) && 62 - hasProp(v, '$type') && 63 - (v.$type === 'app.rocksky.scrobble#main' || 64 - v.$type === 'app.rocksky.scrobble') 65 - ) 66 } 67 68 export function validateRecord(v: unknown): ValidationResult { 69 - return lexicons.validate('app.rocksky.scrobble#main', v) 70 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../lexicons"; 6 + import { isObj, hasProp } from "../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface Record { 10 /** The title of the song. */ 11 + title: string; 12 /** The artist of the song. */ 13 + artist: string; 14 /** The album artist of the song. */ 15 + albumArtist: string; 16 /** The album of the song. */ 17 + album: string; 18 /** The duration of the song in seconds. */ 19 + duration: number; 20 /** The track number of the song in the album. */ 21 + trackNumber?: number; 22 /** The disc number of the song in the album. */ 23 + discNumber?: number; 24 /** The release date of the song. */ 25 + releaseDate?: string; 26 /** The year the song was released. */ 27 + year?: number; 28 /** The genre of the song. */ 29 + genre?: string; 30 /** The tags of the song. */ 31 + tags?: string[]; 32 /** The composer of the song. */ 33 + composer?: string; 34 /** The lyrics of the song. */ 35 + lyrics?: string; 36 /** The copyright message of the song. */ 37 + copyrightMessage?: string; 38 /** Informations about the song */ 39 + wiki?: string; 40 /** The album art of the song. */ 41 + albumArt?: BlobRef; 42 + /** The URL of the album art of the song. */ 43 + albumArtUrl?: string; 44 /** The YouTube link of the song. */ 45 + youtubeLink?: string; 46 /** The Spotify link of the song. */ 47 + spotifyLink?: string; 48 /** The Tidal link of the song. */ 49 + tidalLink?: string; 50 /** The Apple Music link of the song. */ 51 + appleMusicLink?: string; 52 /** The date when the song was created. */ 53 + createdAt: string; 54 /** The MusicBrainz ID of the song. */ 55 + mbid?: string; 56 /** The label of the song. */ 57 + label?: string; 58 + [k: string]: unknown; 59 } 60 61 export function isRecord(v: unknown): v is Record { 62 return ( 63 isObj(v) && 64 + hasProp(v, "$type") && 65 + (v.$type === "app.rocksky.scrobble#main" || 66 + v.$type === "app.rocksky.scrobble") 67 + ); 68 } 69 70 export function validateRecord(v: unknown): ValidationResult { 71 + return lexicons.validate("app.rocksky.scrobble#main", v); 72 }
+48 -48
apps/api/src/lexicon/types/app/rocksky/scrobble/createScrobble.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyScrobbleDefs from './defs' 11 12 - export type QueryParams = {} 13 14 export interface InputSchema { 15 /** The title of the track being scrobbled */ 16 - title: string 17 /** The artist of the track being scrobbled */ 18 - artist: string 19 /** The album of the track being scrobbled */ 20 - album?: string 21 /** The duration of the track in seconds */ 22 - duration?: number 23 /** The MusicBrainz ID of the track, if available */ 24 - mbId?: string 25 /** The URL of the album art for the track */ 26 - albumArt?: string 27 /** The track number of the track in the album */ 28 - trackNumber?: number 29 /** The release date of the track, formatted as YYYY-MM-DD */ 30 - releaseDate?: string 31 /** The year the track was released */ 32 - year?: number 33 /** The disc number of the track in the album, if applicable */ 34 - discNumber?: number 35 /** The lyrics of the track, if available */ 36 - lyrics?: string 37 /** The composer of the track, if available */ 38 - composer?: string 39 /** The copyright message for the track, if available */ 40 - copyrightMessage?: string 41 /** The record label of the track, if available */ 42 - label?: string 43 /** The URL of the artist's picture, if available */ 44 - artistPicture?: string 45 /** The Spotify link for the track, if available */ 46 - spotifyLink?: string 47 /** The Last.fm link for the track, if available */ 48 - lastfmLink?: string 49 /** The Tidal link for the track, if available */ 50 - tidalLink?: string 51 /** The Apple Music link for the track, if available */ 52 - appleMusicLink?: string 53 /** The Youtube link for the track, if available */ 54 - youtubeLink?: string 55 /** The Deezer link for the track, if available */ 56 - deezerLink?: string 57 /** The timestamp of the scrobble in milliseconds since epoch */ 58 - timestamp?: number 59 - [k: string]: unknown 60 } 61 62 - export type OutputSchema = AppRockskyScrobbleDefs.ScrobbleViewBasic 63 64 export interface HandlerInput { 65 - encoding: 'application/json' 66 - body: InputSchema 67 } 68 69 export interface HandlerSuccess { 70 - encoding: 'application/json' 71 - body: OutputSchema 72 - headers?: { [key: string]: string } 73 } 74 75 export interface HandlerError { 76 - status: number 77 - message?: string 78 } 79 80 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 81 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 82 - auth: HA 83 - params: QueryParams 84 - input: HandlerInput 85 - req: express.Request 86 - res: express.Response 87 - resetRouteRateLimits: () => Promise<void> 88 - } 89 export type Handler<HA extends HandlerAuth = never> = ( 90 ctx: HandlerReqCtx<HA>, 91 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyScrobbleDefs from "./defs"; 11 12 + export interface QueryParams {} 13 14 export interface InputSchema { 15 /** The title of the track being scrobbled */ 16 + title: string; 17 /** The artist of the track being scrobbled */ 18 + artist: string; 19 /** The album of the track being scrobbled */ 20 + album?: string; 21 /** The duration of the track in seconds */ 22 + duration?: number; 23 /** The MusicBrainz ID of the track, if available */ 24 + mbId?: string; 25 /** The URL of the album art for the track */ 26 + albumArt?: string; 27 /** The track number of the track in the album */ 28 + trackNumber?: number; 29 /** The release date of the track, formatted as YYYY-MM-DD */ 30 + releaseDate?: string; 31 /** The year the track was released */ 32 + year?: number; 33 /** The disc number of the track in the album, if applicable */ 34 + discNumber?: number; 35 /** The lyrics of the track, if available */ 36 + lyrics?: string; 37 /** The composer of the track, if available */ 38 + composer?: string; 39 /** The copyright message for the track, if available */ 40 + copyrightMessage?: string; 41 /** The record label of the track, if available */ 42 + label?: string; 43 /** The URL of the artist's picture, if available */ 44 + artistPicture?: string; 45 /** The Spotify link for the track, if available */ 46 + spotifyLink?: string; 47 /** The Last.fm link for the track, if available */ 48 + lastfmLink?: string; 49 /** The Tidal link for the track, if available */ 50 + tidalLink?: string; 51 /** The Apple Music link for the track, if available */ 52 + appleMusicLink?: string; 53 /** The Youtube link for the track, if available */ 54 + youtubeLink?: string; 55 /** The Deezer link for the track, if available */ 56 + deezerLink?: string; 57 /** The timestamp of the scrobble in milliseconds since epoch */ 58 + timestamp?: number; 59 + [k: string]: unknown; 60 } 61 62 + export type OutputSchema = AppRockskyScrobbleDefs.ScrobbleViewBasic; 63 64 export interface HandlerInput { 65 + encoding: "application/json"; 66 + body: InputSchema; 67 } 68 69 export interface HandlerSuccess { 70 + encoding: "application/json"; 71 + body: OutputSchema; 72 + headers?: { [key: string]: string }; 73 } 74 75 export interface HandlerError { 76 + status: number; 77 + message?: string; 78 } 79 80 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 81 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 82 + auth: HA; 83 + params: QueryParams; 84 + input: HandlerInput; 85 + req: express.Request; 86 + res: express.Response; 87 + resetRouteRateLimits: () => Promise<void>; 88 + }; 89 export type Handler<HA extends HandlerAuth = never> = ( 90 ctx: HandlerReqCtx<HA>, 91 + ) => Promise<HandlerOutput> | HandlerOutput;
+40 -40
apps/api/src/lexicon/types/app/rocksky/scrobble/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface ScrobbleViewBasic { 10 /** The unique identifier of the scrobble. */ 11 - id?: string 12 /** The handle of the user who created the scrobble. */ 13 - user?: string 14 /** The display name of the user who created the scrobble. */ 15 - userDisplayName?: string 16 /** The avatar URL of the user who created the scrobble. */ 17 - userAvatar?: string 18 /** The title of the scrobble. */ 19 - title?: string 20 /** The artist of the song. */ 21 - artist?: string 22 /** The URI of the artist. */ 23 - artistUri?: string 24 /** The album of the song. */ 25 - album?: string 26 /** The URI of the album. */ 27 - albumUri?: string 28 /** The album art URL of the song. */ 29 - cover?: string 30 /** The timestamp when the scrobble was created. */ 31 - date?: string 32 /** The URI of the scrobble. */ 33 - uri?: string 34 /** The SHA256 hash of the scrobble data. */ 35 - sha256?: string 36 - [k: string]: unknown 37 } 38 39 export function isScrobbleViewBasic(v: unknown): v is ScrobbleViewBasic { 40 return ( 41 isObj(v) && 42 - hasProp(v, '$type') && 43 - v.$type === 'app.rocksky.scrobble.defs#scrobbleViewBasic' 44 - ) 45 } 46 47 export function validateScrobbleViewBasic(v: unknown): ValidationResult { 48 - return lexicons.validate('app.rocksky.scrobble.defs#scrobbleViewBasic', v) 49 } 50 51 export interface ScrobbleViewDetailed { 52 /** The unique identifier of the scrobble. */ 53 - id?: string 54 /** The handle of the user who created the scrobble. */ 55 - user?: string 56 /** The title of the scrobble. */ 57 - title?: string 58 /** The artist of the song. */ 59 - artist?: string 60 /** The URI of the artist. */ 61 - artistUri?: string 62 /** The album of the song. */ 63 - album?: string 64 /** The URI of the album. */ 65 - albumUri?: string 66 /** The album art URL of the song. */ 67 - cover?: string 68 /** The timestamp when the scrobble was created. */ 69 - date?: string 70 /** The URI of the scrobble. */ 71 - uri?: string 72 /** The SHA256 hash of the scrobble data. */ 73 - sha256?: string 74 /** The number of listeners */ 75 - listeners?: number 76 /** The number of scrobbles for this song */ 77 - scrobbles?: number 78 - [k: string]: unknown 79 } 80 81 export function isScrobbleViewDetailed(v: unknown): v is ScrobbleViewDetailed { 82 return ( 83 isObj(v) && 84 - hasProp(v, '$type') && 85 - v.$type === 'app.rocksky.scrobble.defs#scrobbleViewDetailed' 86 - ) 87 } 88 89 export function validateScrobbleViewDetailed(v: unknown): ValidationResult { 90 - return lexicons.validate('app.rocksky.scrobble.defs#scrobbleViewDetailed', v) 91 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface ScrobbleViewBasic { 10 /** The unique identifier of the scrobble. */ 11 + id?: string; 12 /** The handle of the user who created the scrobble. */ 13 + user?: string; 14 /** The display name of the user who created the scrobble. */ 15 + userDisplayName?: string; 16 /** The avatar URL of the user who created the scrobble. */ 17 + userAvatar?: string; 18 /** The title of the scrobble. */ 19 + title?: string; 20 /** The artist of the song. */ 21 + artist?: string; 22 /** The URI of the artist. */ 23 + artistUri?: string; 24 /** The album of the song. */ 25 + album?: string; 26 /** The URI of the album. */ 27 + albumUri?: string; 28 /** The album art URL of the song. */ 29 + cover?: string; 30 /** The timestamp when the scrobble was created. */ 31 + date?: string; 32 /** The URI of the scrobble. */ 33 + uri?: string; 34 /** The SHA256 hash of the scrobble data. */ 35 + sha256?: string; 36 + [k: string]: unknown; 37 } 38 39 export function isScrobbleViewBasic(v: unknown): v is ScrobbleViewBasic { 40 return ( 41 isObj(v) && 42 + hasProp(v, "$type") && 43 + v.$type === "app.rocksky.scrobble.defs#scrobbleViewBasic" 44 + ); 45 } 46 47 export function validateScrobbleViewBasic(v: unknown): ValidationResult { 48 + return lexicons.validate("app.rocksky.scrobble.defs#scrobbleViewBasic", v); 49 } 50 51 export interface ScrobbleViewDetailed { 52 /** The unique identifier of the scrobble. */ 53 + id?: string; 54 /** The handle of the user who created the scrobble. */ 55 + user?: string; 56 /** The title of the scrobble. */ 57 + title?: string; 58 /** The artist of the song. */ 59 + artist?: string; 60 /** The URI of the artist. */ 61 + artistUri?: string; 62 /** The album of the song. */ 63 + album?: string; 64 /** The URI of the album. */ 65 + albumUri?: string; 66 /** The album art URL of the song. */ 67 + cover?: string; 68 /** The timestamp when the scrobble was created. */ 69 + date?: string; 70 /** The URI of the scrobble. */ 71 + uri?: string; 72 /** The SHA256 hash of the scrobble data. */ 73 + sha256?: string; 74 /** The number of listeners */ 75 + listeners?: number; 76 /** The number of scrobbles for this song */ 77 + scrobbles?: number; 78 + [k: string]: unknown; 79 } 80 81 export function isScrobbleViewDetailed(v: unknown): v is ScrobbleViewDetailed { 82 return ( 83 isObj(v) && 84 + hasProp(v, "$type") && 85 + v.$type === "app.rocksky.scrobble.defs#scrobbleViewDetailed" 86 + ); 87 } 88 89 export function validateScrobbleViewDetailed(v: unknown): ValidationResult { 90 + return lexicons.validate("app.rocksky.scrobble.defs#scrobbleViewDetailed", v); 91 }
+25 -25
apps/api/src/lexicon/types/app/rocksky/scrobble/getScrobble.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyScrobbleDefs from './defs' 11 12 export interface QueryParams { 13 /** The unique identifier of the scrobble */ 14 - uri: string 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskyScrobbleDefs.ScrobbleViewDetailed 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyScrobbleDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The unique identifier of the scrobble */ 14 + uri: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskyScrobbleDefs.ScrobbleViewDetailed; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+28 -28
apps/api/src/lexicon/types/app/rocksky/scrobble/getScrobbles.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyScrobbleDefs from './defs' 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 - did?: string 15 /** The maximum number of scrobbles to return */ 16 - limit?: number 17 /** The offset for pagination */ 18 - offset?: number 19 } 20 21 - export type InputSchema = undefined 22 23 export interface OutputSchema { 24 - scrobbles?: AppRockskyScrobbleDefs.ScrobbleViewBasic[] 25 - [k: string]: unknown 26 } 27 28 - export type HandlerInput = undefined 29 30 export interface HandlerSuccess { 31 - encoding: 'application/json' 32 - body: OutputSchema 33 - headers?: { [key: string]: string } 34 } 35 36 export interface HandlerError { 37 - status: number 38 - message?: string 39 } 40 41 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 - auth: HA 44 - params: QueryParams 45 - input: HandlerInput 46 - req: express.Request 47 - res: express.Response 48 - resetRouteRateLimits: () => Promise<void> 49 - } 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyScrobbleDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 + did?: string; 15 /** The maximum number of scrobbles to return */ 16 + limit?: number; 17 /** The offset for pagination */ 18 + offset?: number; 19 } 20 21 + export type InputSchema = undefined; 22 23 export interface OutputSchema { 24 + scrobbles?: AppRockskyScrobbleDefs.ScrobbleViewBasic[]; 25 + [k: string]: unknown; 26 } 27 28 + export type HandlerInput = undefined; 29 30 export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 } 35 36 export interface HandlerError { 37 + status: number; 38 + message?: string; 39 } 40 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+14 -14
apps/api/src/lexicon/types/app/rocksky/shout.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../lexicons' 6 - import { isObj, hasProp } from '../../../util' 7 - import { CID } from 'multiformats/cid' 8 - import type * as ComAtprotoRepoStrongRef from '../../com/atproto/repo/strongRef' 9 10 export interface Record { 11 /** The message of the shout. */ 12 - message: string 13 /** The date when the shout was created. */ 14 - createdAt: string 15 - parent?: ComAtprotoRepoStrongRef.Main 16 - subject: ComAtprotoRepoStrongRef.Main 17 - [k: string]: unknown 18 } 19 20 export function isRecord(v: unknown): v is Record { 21 return ( 22 isObj(v) && 23 - hasProp(v, '$type') && 24 - (v.$type === 'app.rocksky.shout#main' || v.$type === 'app.rocksky.shout') 25 - ) 26 } 27 28 export function validateRecord(v: unknown): ValidationResult { 29 - return lexicons.validate('app.rocksky.shout#main', v) 30 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../lexicons"; 6 + import { isObj, hasProp } from "../../../util"; 7 + import { CID } from "multiformats/cid"; 8 + import * as ComAtprotoRepoStrongRef from "../../com/atproto/repo/strongRef"; 9 10 export interface Record { 11 /** The message of the shout. */ 12 + message: string; 13 /** The date when the shout was created. */ 14 + createdAt: string; 15 + parent?: ComAtprotoRepoStrongRef.Main; 16 + subject: ComAtprotoRepoStrongRef.Main; 17 + [k: string]: unknown; 18 } 19 20 export function isRecord(v: unknown): v is Record { 21 return ( 22 isObj(v) && 23 + hasProp(v, "$type") && 24 + (v.$type === "app.rocksky.shout#main" || v.$type === "app.rocksky.shout") 25 + ); 26 } 27 28 export function validateRecord(v: unknown): ValidationResult { 29 + return lexicons.validate("app.rocksky.shout#main", v); 30 }
+27 -27
apps/api/src/lexicon/types/app/rocksky/shout/createShout.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyShoutDefs from './defs' 11 12 - export type QueryParams = {} 13 14 export interface InputSchema { 15 /** The content of the shout */ 16 - message?: string 17 - [k: string]: unknown 18 } 19 20 - export type OutputSchema = AppRockskyShoutDefs.ShoutView 21 22 export interface HandlerInput { 23 - encoding: 'application/json' 24 - body: InputSchema 25 } 26 27 export interface HandlerSuccess { 28 - encoding: 'application/json' 29 - body: OutputSchema 30 - headers?: { [key: string]: string } 31 } 32 33 export interface HandlerError { 34 - status: number 35 - message?: string 36 } 37 38 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 39 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 40 - auth: HA 41 - params: QueryParams 42 - input: HandlerInput 43 - req: express.Request 44 - res: express.Response 45 - resetRouteRateLimits: () => Promise<void> 46 - } 47 export type Handler<HA extends HandlerAuth = never> = ( 48 ctx: HandlerReqCtx<HA>, 49 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyShoutDefs from "./defs"; 11 12 + export interface QueryParams {} 13 14 export interface InputSchema { 15 /** The content of the shout */ 16 + message?: string; 17 + [k: string]: unknown; 18 } 19 20 + export type OutputSchema = AppRockskyShoutDefs.ShoutView; 21 22 export interface HandlerInput { 23 + encoding: "application/json"; 24 + body: InputSchema; 25 } 26 27 export interface HandlerSuccess { 28 + encoding: "application/json"; 29 + body: OutputSchema; 30 + headers?: { [key: string]: string }; 31 } 32 33 export interface HandlerError { 34 + status: number; 35 + message?: string; 36 } 37 38 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 39 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 40 + auth: HA; 41 + params: QueryParams; 42 + input: HandlerInput; 43 + req: express.Request; 44 + res: express.Response; 45 + resetRouteRateLimits: () => Promise<void>; 46 + }; 47 export type Handler<HA extends HandlerAuth = never> = ( 48 ctx: HandlerReqCtx<HA>, 49 + ) => Promise<HandlerOutput> | HandlerOutput;
+24 -24
apps/api/src/lexicon/types/app/rocksky/shout/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface Author { 10 /** The unique identifier of the author. */ 11 - id?: string 12 /** The decentralized identifier (DID) of the author. */ 13 - did?: string 14 /** The handle of the author. */ 15 - handle?: string 16 /** The display name of the author. */ 17 - displayName?: string 18 /** The URL of the author's avatar image. */ 19 - avatar?: string 20 - [k: string]: unknown 21 } 22 23 export function isAuthor(v: unknown): v is Author { 24 return ( 25 isObj(v) && 26 - hasProp(v, '$type') && 27 - v.$type === 'app.rocksky.shout.defs#author' 28 - ) 29 } 30 31 export function validateAuthor(v: unknown): ValidationResult { 32 - return lexicons.validate('app.rocksky.shout.defs#author', v) 33 } 34 35 export interface ShoutView { 36 /** The unique identifier of the shout. */ 37 - id?: string 38 /** The content of the shout. */ 39 - message?: string 40 /** The ID of the parent shout if this is a reply, otherwise null. */ 41 - parent?: string 42 /** The date and time when the shout was created. */ 43 - createdAt?: string 44 - author?: Author 45 - [k: string]: unknown 46 } 47 48 export function isShoutView(v: unknown): v is ShoutView { 49 return ( 50 isObj(v) && 51 - hasProp(v, '$type') && 52 - v.$type === 'app.rocksky.shout.defs#shoutView' 53 - ) 54 } 55 56 export function validateShoutView(v: unknown): ValidationResult { 57 - return lexicons.validate('app.rocksky.shout.defs#shoutView', v) 58 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface Author { 10 /** The unique identifier of the author. */ 11 + id?: string; 12 /** The decentralized identifier (DID) of the author. */ 13 + did?: string; 14 /** The handle of the author. */ 15 + handle?: string; 16 /** The display name of the author. */ 17 + displayName?: string; 18 /** The URL of the author's avatar image. */ 19 + avatar?: string; 20 + [k: string]: unknown; 21 } 22 23 export function isAuthor(v: unknown): v is Author { 24 return ( 25 isObj(v) && 26 + hasProp(v, "$type") && 27 + v.$type === "app.rocksky.shout.defs#author" 28 + ); 29 } 30 31 export function validateAuthor(v: unknown): ValidationResult { 32 + return lexicons.validate("app.rocksky.shout.defs#author", v); 33 } 34 35 export interface ShoutView { 36 /** The unique identifier of the shout. */ 37 + id?: string; 38 /** The content of the shout. */ 39 + message?: string; 40 /** The ID of the parent shout if this is a reply, otherwise null. */ 41 + parent?: string; 42 /** The date and time when the shout was created. */ 43 + createdAt?: string; 44 + author?: Author; 45 + [k: string]: unknown; 46 } 47 48 export function isShoutView(v: unknown): v is ShoutView { 49 return ( 50 isObj(v) && 51 + hasProp(v, "$type") && 52 + v.$type === "app.rocksky.shout.defs#shoutView" 53 + ); 54 } 55 56 export function validateShoutView(v: unknown): ValidationResult { 57 + return lexicons.validate("app.rocksky.shout.defs#shoutView", v); 58 }
+28 -28
apps/api/src/lexicon/types/app/rocksky/shout/getAlbumShouts.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyShoutDefs from './defs' 11 12 export interface QueryParams { 13 /** The unique identifier of the album to retrieve shouts for */ 14 - uri: string 15 /** The maximum number of shouts to return */ 16 - limit?: number 17 /** The number of shouts to skip before starting to collect the result set */ 18 - offset?: number 19 } 20 21 - export type InputSchema = undefined 22 23 export interface OutputSchema { 24 - shouts?: AppRockskyShoutDefs.ShoutViewBasic[] 25 - [k: string]: unknown 26 } 27 28 - export type HandlerInput = undefined 29 30 export interface HandlerSuccess { 31 - encoding: 'application/json' 32 - body: OutputSchema 33 - headers?: { [key: string]: string } 34 } 35 36 export interface HandlerError { 37 - status: number 38 - message?: string 39 } 40 41 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 - auth: HA 44 - params: QueryParams 45 - input: HandlerInput 46 - req: express.Request 47 - res: express.Response 48 - resetRouteRateLimits: () => Promise<void> 49 - } 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyShoutDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The unique identifier of the album to retrieve shouts for */ 14 + uri: string; 15 /** The maximum number of shouts to return */ 16 + limit?: number; 17 /** The number of shouts to skip before starting to collect the result set */ 18 + offset?: number; 19 } 20 21 + export type InputSchema = undefined; 22 23 export interface OutputSchema { 24 + shouts?: AppRockskyShoutDefs.ShoutViewBasic[]; 25 + [k: string]: unknown; 26 } 27 28 + export type HandlerInput = undefined; 29 30 export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 } 35 36 export interface HandlerError { 37 + status: number; 38 + message?: string; 39 } 40 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+28 -28
apps/api/src/lexicon/types/app/rocksky/shout/getArtistShouts.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyShoutDefs from './defs' 11 12 export interface QueryParams { 13 /** The URI of the artist to retrieve shouts for */ 14 - uri: string 15 /** The maximum number of shouts to return */ 16 - limit?: number 17 /** The number of shouts to skip before starting to collect the result set */ 18 - offset?: number 19 } 20 21 - export type InputSchema = undefined 22 23 export interface OutputSchema { 24 - shouts?: AppRockskyShoutDefs.ShoutViewBasic[] 25 - [k: string]: unknown 26 } 27 28 - export type HandlerInput = undefined 29 30 export interface HandlerSuccess { 31 - encoding: 'application/json' 32 - body: OutputSchema 33 - headers?: { [key: string]: string } 34 } 35 36 export interface HandlerError { 37 - status: number 38 - message?: string 39 } 40 41 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 - auth: HA 44 - params: QueryParams 45 - input: HandlerInput 46 - req: express.Request 47 - res: express.Response 48 - resetRouteRateLimits: () => Promise<void> 49 - } 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyShoutDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The URI of the artist to retrieve shouts for */ 14 + uri: string; 15 /** The maximum number of shouts to return */ 16 + limit?: number; 17 /** The number of shouts to skip before starting to collect the result set */ 18 + offset?: number; 19 } 20 21 + export type InputSchema = undefined; 22 23 export interface OutputSchema { 24 + shouts?: AppRockskyShoutDefs.ShoutViewBasic[]; 25 + [k: string]: unknown; 26 } 27 28 + export type HandlerInput = undefined; 29 30 export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 } 35 36 export interface HandlerError { 37 + status: number; 38 + message?: string; 39 } 40 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+28 -28
apps/api/src/lexicon/types/app/rocksky/shout/getProfileShouts.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyShoutDefs from './defs' 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 - did: string 15 /** The offset for pagination */ 16 - offset?: number 17 /** The maximum number of shouts to return */ 18 - limit?: number 19 } 20 21 - export type InputSchema = undefined 22 23 export interface OutputSchema { 24 - shouts?: AppRockskyShoutDefs.ShoutViewBasic[] 25 - [k: string]: unknown 26 } 27 28 - export type HandlerInput = undefined 29 30 export interface HandlerSuccess { 31 - encoding: 'application/json' 32 - body: OutputSchema 33 - headers?: { [key: string]: string } 34 } 35 36 export interface HandlerError { 37 - status: number 38 - message?: string 39 } 40 41 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 - auth: HA 44 - params: QueryParams 45 - input: HandlerInput 46 - req: express.Request 47 - res: express.Response 48 - resetRouteRateLimits: () => Promise<void> 49 - } 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyShoutDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The DID or handle of the actor */ 14 + did: string; 15 /** The offset for pagination */ 16 + offset?: number; 17 /** The maximum number of shouts to return */ 18 + limit?: number; 19 } 20 21 + export type InputSchema = undefined; 22 23 export interface OutputSchema { 24 + shouts?: AppRockskyShoutDefs.ShoutViewBasic[]; 25 + [k: string]: unknown; 26 } 27 28 + export type HandlerInput = undefined; 29 30 export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 } 35 36 export interface HandlerError { 37 + status: number; 38 + message?: string; 39 } 40 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+28 -28
apps/api/src/lexicon/types/app/rocksky/shout/getShoutReplies.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyShoutDefs from './defs' 11 12 export interface QueryParams { 13 /** The URI of the shout to retrieve replies for */ 14 - uri: string 15 /** The maximum number of shouts to return */ 16 - limit?: number 17 /** The number of shouts to skip before starting to collect the result set */ 18 - offset?: number 19 } 20 21 - export type InputSchema = undefined 22 23 export interface OutputSchema { 24 - shouts?: AppRockskyShoutDefs.ShoutViewBasic[] 25 - [k: string]: unknown 26 } 27 28 - export type HandlerInput = undefined 29 30 export interface HandlerSuccess { 31 - encoding: 'application/json' 32 - body: OutputSchema 33 - headers?: { [key: string]: string } 34 } 35 36 export interface HandlerError { 37 - status: number 38 - message?: string 39 } 40 41 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 - auth: HA 44 - params: QueryParams 45 - input: HandlerInput 46 - req: express.Request 47 - res: express.Response 48 - resetRouteRateLimits: () => Promise<void> 49 - } 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyShoutDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The URI of the shout to retrieve replies for */ 14 + uri: string; 15 /** The maximum number of shouts to return */ 16 + limit?: number; 17 /** The number of shouts to skip before starting to collect the result set */ 18 + offset?: number; 19 } 20 21 + export type InputSchema = undefined; 22 23 export interface OutputSchema { 24 + shouts?: AppRockskyShoutDefs.ShoutViewBasic[]; 25 + [k: string]: unknown; 26 } 27 28 + export type HandlerInput = undefined; 29 30 export interface HandlerSuccess { 31 + encoding: "application/json"; 32 + body: OutputSchema; 33 + headers?: { [key: string]: string }; 34 } 35 36 export interface HandlerError { 37 + status: number; 38 + message?: string; 39 } 40 41 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 42 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 43 + auth: HA; 44 + params: QueryParams; 45 + input: HandlerInput; 46 + req: express.Request; 47 + res: express.Response; 48 + resetRouteRateLimits: () => Promise<void>; 49 + }; 50 export type Handler<HA extends HandlerAuth = never> = ( 51 ctx: HandlerReqCtx<HA>, 52 + ) => Promise<HandlerOutput> | HandlerOutput;
+26 -26
apps/api/src/lexicon/types/app/rocksky/shout/getTrackShouts.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyShoutDefs from './defs' 11 12 export interface QueryParams { 13 /** The URI of the track to retrieve shouts for */ 14 - uri: string 15 } 16 17 - export type InputSchema = undefined 18 19 export interface OutputSchema { 20 - shouts?: AppRockskyShoutDefs.ShoutViewBasic[] 21 - [k: string]: unknown 22 } 23 24 - export type HandlerInput = undefined 25 26 export interface HandlerSuccess { 27 - encoding: 'application/json' 28 - body: OutputSchema 29 - headers?: { [key: string]: string } 30 } 31 32 export interface HandlerError { 33 - status: number 34 - message?: string 35 } 36 37 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 38 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 39 - auth: HA 40 - params: QueryParams 41 - input: HandlerInput 42 - req: express.Request 43 - res: express.Response 44 - resetRouteRateLimits: () => Promise<void> 45 - } 46 export type Handler<HA extends HandlerAuth = never> = ( 47 ctx: HandlerReqCtx<HA>, 48 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyShoutDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The URI of the track to retrieve shouts for */ 14 + uri: string; 15 } 16 17 + export type InputSchema = undefined; 18 19 export interface OutputSchema { 20 + shouts?: AppRockskyShoutDefs.ShoutViewBasic[]; 21 + [k: string]: unknown; 22 } 23 24 + export type HandlerInput = undefined; 25 26 export interface HandlerSuccess { 27 + encoding: "application/json"; 28 + body: OutputSchema; 29 + headers?: { [key: string]: string }; 30 } 31 32 export interface HandlerError { 33 + status: number; 34 + message?: string; 35 } 36 37 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 38 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 39 + auth: HA; 40 + params: QueryParams; 41 + input: HandlerInput; 42 + req: express.Request; 43 + res: express.Response; 44 + resetRouteRateLimits: () => Promise<void>; 45 + }; 46 export type Handler<HA extends HandlerAuth = never> = ( 47 ctx: HandlerReqCtx<HA>, 48 + ) => Promise<HandlerOutput> | HandlerOutput;
+25 -25
apps/api/src/lexicon/types/app/rocksky/shout/removeShout.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyShoutDefs from './defs' 11 12 export interface QueryParams { 13 /** The ID of the shout to be removed */ 14 - id: string 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskyShoutDefs.ShoutView 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyShoutDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The ID of the shout to be removed */ 14 + id: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskyShoutDefs.ShoutView; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+28 -28
apps/api/src/lexicon/types/app/rocksky/shout/replyShout.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyShoutDefs from './defs' 11 12 - export type QueryParams = {} 13 14 export interface InputSchema { 15 /** The unique identifier of the shout to reply to */ 16 - shoutId: string 17 /** The content of the reply */ 18 - message: string 19 - [k: string]: unknown 20 } 21 22 - export type OutputSchema = AppRockskyShoutDefs.ShoutView 23 24 export interface HandlerInput { 25 - encoding: 'application/json' 26 - body: InputSchema 27 } 28 29 export interface HandlerSuccess { 30 - encoding: 'application/json' 31 - body: OutputSchema 32 - headers?: { [key: string]: string } 33 } 34 35 export interface HandlerError { 36 - status: number 37 - message?: string 38 } 39 40 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 41 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 42 - auth: HA 43 - params: QueryParams 44 - input: HandlerInput 45 - req: express.Request 46 - res: express.Response 47 - resetRouteRateLimits: () => Promise<void> 48 - } 49 export type Handler<HA extends HandlerAuth = never> = ( 50 ctx: HandlerReqCtx<HA>, 51 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyShoutDefs from "./defs"; 11 12 + export interface QueryParams {} 13 14 export interface InputSchema { 15 /** The unique identifier of the shout to reply to */ 16 + shoutId: string; 17 /** The content of the reply */ 18 + message: string; 19 + [k: string]: unknown; 20 } 21 22 + export type OutputSchema = AppRockskyShoutDefs.ShoutView; 23 24 export interface HandlerInput { 25 + encoding: "application/json"; 26 + body: InputSchema; 27 } 28 29 export interface HandlerSuccess { 30 + encoding: "application/json"; 31 + body: OutputSchema; 32 + headers?: { [key: string]: string }; 33 } 34 35 export interface HandlerError { 36 + status: number; 37 + message?: string; 38 } 39 40 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 41 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 42 + auth: HA; 43 + params: QueryParams; 44 + input: HandlerInput; 45 + req: express.Request; 46 + res: express.Response; 47 + resetRouteRateLimits: () => Promise<void>; 48 + }; 49 export type Handler<HA extends HandlerAuth = never> = ( 50 ctx: HandlerReqCtx<HA>, 51 + ) => Promise<HandlerOutput> | HandlerOutput;
+28 -28
apps/api/src/lexicon/types/app/rocksky/shout/reportShout.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyShoutDefs from './defs' 11 12 - export type QueryParams = {} 13 14 export interface InputSchema { 15 /** The unique identifier of the shout to report */ 16 - shoutId: string 17 /** The reason for reporting the shout */ 18 - reason?: string 19 - [k: string]: unknown 20 } 21 22 - export type OutputSchema = AppRockskyShoutDefs.ShoutView 23 24 export interface HandlerInput { 25 - encoding: 'application/json' 26 - body: InputSchema 27 } 28 29 export interface HandlerSuccess { 30 - encoding: 'application/json' 31 - body: OutputSchema 32 - headers?: { [key: string]: string } 33 } 34 35 export interface HandlerError { 36 - status: number 37 - message?: string 38 } 39 40 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 41 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 42 - auth: HA 43 - params: QueryParams 44 - input: HandlerInput 45 - req: express.Request 46 - res: express.Response 47 - resetRouteRateLimits: () => Promise<void> 48 - } 49 export type Handler<HA extends HandlerAuth = never> = ( 50 ctx: HandlerReqCtx<HA>, 51 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyShoutDefs from "./defs"; 11 12 + export interface QueryParams {} 13 14 export interface InputSchema { 15 /** The unique identifier of the shout to report */ 16 + shoutId: string; 17 /** The reason for reporting the shout */ 18 + reason?: string; 19 + [k: string]: unknown; 20 } 21 22 + export type OutputSchema = AppRockskyShoutDefs.ShoutView; 23 24 export interface HandlerInput { 25 + encoding: "application/json"; 26 + body: InputSchema; 27 } 28 29 export interface HandlerSuccess { 30 + encoding: "application/json"; 31 + body: OutputSchema; 32 + headers?: { [key: string]: string }; 33 } 34 35 export interface HandlerError { 36 + status: number; 37 + message?: string; 38 } 39 40 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 41 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 42 + auth: HA; 43 + params: QueryParams; 44 + input: HandlerInput; 45 + req: express.Request; 46 + res: express.Response; 47 + resetRouteRateLimits: () => Promise<void>; 48 + }; 49 export type Handler<HA extends HandlerAuth = never> = ( 50 ctx: HandlerReqCtx<HA>, 51 + ) => Promise<HandlerOutput> | HandlerOutput;
+34 -32
apps/api/src/lexicon/types/app/rocksky/song.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type { ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../lexicons' 6 - import { isObj, hasProp } from '../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface Record { 10 /** The title of the song. */ 11 - title: string 12 /** The artist of the song. */ 13 - artist: string 14 /** The album artist of the song. */ 15 - albumArtist: string 16 /** The album of the song. */ 17 - album: string 18 /** The duration of the song in seconds. */ 19 - duration: number 20 /** The track number of the song in the album. */ 21 - trackNumber?: number 22 /** The disc number of the song in the album. */ 23 - discNumber?: number 24 /** The release date of the song. */ 25 - releaseDate?: string 26 /** The year the song was released. */ 27 - year?: number 28 /** The genre of the song. */ 29 - genre?: string 30 /** The tags of the song. */ 31 - tags?: string[] 32 /** The composer of the song. */ 33 - composer?: string 34 /** The lyrics of the song. */ 35 - lyrics?: string 36 /** The copyright message of the song. */ 37 - copyrightMessage?: string 38 /** Informations about the song */ 39 - wiki?: string 40 /** The album art of the song. */ 41 - albumArt?: BlobRef 42 /** The YouTube link of the song. */ 43 - youtubeLink?: string 44 /** The Spotify link of the song. */ 45 - spotifyLink?: string 46 /** The Tidal link of the song. */ 47 - tidalLink?: string 48 /** The Apple Music link of the song. */ 49 - appleMusicLink?: string 50 /** The date when the song was created. */ 51 - createdAt: string 52 /** The MusicBrainz ID of the song. */ 53 - mbid?: string 54 /** The label of the song. */ 55 - label?: string 56 - [k: string]: unknown 57 } 58 59 export function isRecord(v: unknown): v is Record { 60 return ( 61 isObj(v) && 62 - hasProp(v, '$type') && 63 - (v.$type === 'app.rocksky.song#main' || v.$type === 'app.rocksky.song') 64 - ) 65 } 66 67 export function validateRecord(v: unknown): ValidationResult { 68 - return lexicons.validate('app.rocksky.song#main', v) 69 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../lexicons"; 6 + import { isObj, hasProp } from "../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface Record { 10 /** The title of the song. */ 11 + title: string; 12 /** The artist of the song. */ 13 + artist: string; 14 /** The album artist of the song. */ 15 + albumArtist: string; 16 /** The album of the song. */ 17 + album: string; 18 /** The duration of the song in seconds. */ 19 + duration: number; 20 /** The track number of the song in the album. */ 21 + trackNumber?: number; 22 /** The disc number of the song in the album. */ 23 + discNumber?: number; 24 /** The release date of the song. */ 25 + releaseDate?: string; 26 /** The year the song was released. */ 27 + year?: number; 28 /** The genre of the song. */ 29 + genre?: string; 30 /** The tags of the song. */ 31 + tags?: string[]; 32 /** The composer of the song. */ 33 + composer?: string; 34 /** The lyrics of the song. */ 35 + lyrics?: string; 36 /** The copyright message of the song. */ 37 + copyrightMessage?: string; 38 /** Informations about the song */ 39 + wiki?: string; 40 /** The album art of the song. */ 41 + albumArt?: BlobRef; 42 + /** The URL of the album art of the song. */ 43 + albumArtUrl?: string; 44 /** The YouTube link of the song. */ 45 + youtubeLink?: string; 46 /** The Spotify link of the song. */ 47 + spotifyLink?: string; 48 /** The Tidal link of the song. */ 49 + tidalLink?: string; 50 /** The Apple Music link of the song. */ 51 + appleMusicLink?: string; 52 /** The date when the song was created. */ 53 + createdAt: string; 54 /** The MusicBrainz ID of the song. */ 55 + mbid?: string; 56 /** The label of the song. */ 57 + label?: string; 58 + [k: string]: unknown; 59 } 60 61 export function isRecord(v: unknown): v is Record { 62 return ( 63 isObj(v) && 64 + hasProp(v, "$type") && 65 + (v.$type === "app.rocksky.song#main" || v.$type === "app.rocksky.song") 66 + ); 67 } 68 69 export function validateRecord(v: unknown): ValidationResult { 70 + return lexicons.validate("app.rocksky.song#main", v); 71 }
+38 -38
apps/api/src/lexicon/types/app/rocksky/song/createSong.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskySongDefs from './defs' 11 12 - export type QueryParams = {} 13 14 export interface InputSchema { 15 /** The title of the song */ 16 - title: string 17 /** The artist of the song */ 18 - artist: string 19 /** The album artist of the song, if different from the main artist */ 20 - albumArtist: string 21 /** The album of the song, if applicable */ 22 - album: string 23 /** The duration of the song in seconds */ 24 - duration?: number 25 /** The MusicBrainz ID of the song, if available */ 26 - mbId?: string 27 /** The URL of the album art for the song */ 28 - albumArt?: string 29 /** The track number of the song in the album, if applicable */ 30 - trackNumber?: number 31 /** The release date of the song, formatted as YYYY-MM-DD */ 32 - releaseDate?: string 33 /** The year the song was released */ 34 - year?: number 35 /** The disc number of the song in the album, if applicable */ 36 - discNumber?: number 37 /** The lyrics of the song, if available */ 38 - lyrics?: string 39 - [k: string]: unknown 40 } 41 42 - export type OutputSchema = AppRockskySongDefs.SongViewDetailed 43 44 export interface HandlerInput { 45 - encoding: 'application/json' 46 - body: InputSchema 47 } 48 49 export interface HandlerSuccess { 50 - encoding: 'application/json' 51 - body: OutputSchema 52 - headers?: { [key: string]: string } 53 } 54 55 export interface HandlerError { 56 - status: number 57 - message?: string 58 } 59 60 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 61 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 62 - auth: HA 63 - params: QueryParams 64 - input: HandlerInput 65 - req: express.Request 66 - res: express.Response 67 - resetRouteRateLimits: () => Promise<void> 68 - } 69 export type Handler<HA extends HandlerAuth = never> = ( 70 ctx: HandlerReqCtx<HA>, 71 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskySongDefs from "./defs"; 11 12 + export interface QueryParams {} 13 14 export interface InputSchema { 15 /** The title of the song */ 16 + title: string; 17 /** The artist of the song */ 18 + artist: string; 19 /** The album artist of the song, if different from the main artist */ 20 + albumArtist: string; 21 /** The album of the song, if applicable */ 22 + album: string; 23 /** The duration of the song in seconds */ 24 + duration?: number; 25 /** The MusicBrainz ID of the song, if available */ 26 + mbId?: string; 27 /** The URL of the album art for the song */ 28 + albumArt?: string; 29 /** The track number of the song in the album, if applicable */ 30 + trackNumber?: number; 31 /** The release date of the song, formatted as YYYY-MM-DD */ 32 + releaseDate?: string; 33 /** The year the song was released */ 34 + year?: number; 35 /** The disc number of the song in the album, if applicable */ 36 + discNumber?: number; 37 /** The lyrics of the song, if available */ 38 + lyrics?: string; 39 + [k: string]: unknown; 40 } 41 42 + export type OutputSchema = AppRockskySongDefs.SongViewDetailed; 43 44 export interface HandlerInput { 45 + encoding: "application/json"; 46 + body: InputSchema; 47 } 48 49 export interface HandlerSuccess { 50 + encoding: "application/json"; 51 + body: OutputSchema; 52 + headers?: { [key: string]: string }; 53 } 54 55 export interface HandlerError { 56 + status: number; 57 + message?: string; 58 } 59 60 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 61 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 62 + auth: HA; 63 + params: QueryParams; 64 + input: HandlerInput; 65 + req: express.Request; 66 + res: express.Response; 67 + resetRouteRateLimits: () => Promise<void>; 68 + }; 69 export type Handler<HA extends HandlerAuth = never> = ( 70 ctx: HandlerReqCtx<HA>, 71 + ) => Promise<HandlerOutput> | HandlerOutput;
+46 -46
apps/api/src/lexicon/types/app/rocksky/song/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface SongViewBasic { 10 /** The unique identifier of the song. */ 11 - id?: string 12 /** The title of the song. */ 13 - title?: string 14 /** The artist of the song. */ 15 - artist?: string 16 /** The artist of the album the song belongs to. */ 17 - albumArtist?: string 18 /** The URL of the album art image. */ 19 - albumArt?: string 20 /** The URI of the song. */ 21 - uri?: string 22 /** The album of the song. */ 23 - album?: string 24 /** The duration of the song in milliseconds. */ 25 - duration?: number 26 /** The track number of the song in the album. */ 27 - trackNumber?: number 28 /** The disc number of the song in the album. */ 29 - discNumber?: number 30 /** The number of times the song has been played. */ 31 - playCount?: number 32 /** The number of unique listeners who have played the song. */ 33 - uniqueListeners?: number 34 /** The URI of the album the song belongs to. */ 35 - albumUri?: string 36 /** The URI of the artist of the song. */ 37 - artistUri?: string 38 /** The SHA256 hash of the song. */ 39 - sha256?: string 40 /** The timestamp when the song was created. */ 41 - createdAt?: string 42 - [k: string]: unknown 43 } 44 45 export function isSongViewBasic(v: unknown): v is SongViewBasic { 46 return ( 47 isObj(v) && 48 - hasProp(v, '$type') && 49 - v.$type === 'app.rocksky.song.defs#songViewBasic' 50 - ) 51 } 52 53 export function validateSongViewBasic(v: unknown): ValidationResult { 54 - return lexicons.validate('app.rocksky.song.defs#songViewBasic', v) 55 } 56 57 export interface SongViewDetailed { 58 /** The unique identifier of the song. */ 59 - id?: string 60 /** The title of the song. */ 61 - title?: string 62 /** The artist of the song. */ 63 - artist?: string 64 /** The artist of the album the song belongs to. */ 65 - albumArtist?: string 66 /** The URL of the album art image. */ 67 - albumArt?: string 68 /** The URI of the song. */ 69 - uri?: string 70 /** The album of the song. */ 71 - album?: string 72 /** The duration of the song in milliseconds. */ 73 - duration?: number 74 /** The track number of the song in the album. */ 75 - trackNumber?: number 76 /** The disc number of the song in the album. */ 77 - discNumber?: number 78 /** The number of times the song has been played. */ 79 - playCount?: number 80 /** The number of unique listeners who have played the song. */ 81 - uniqueListeners?: number 82 /** The URI of the album the song belongs to. */ 83 - albumUri?: string 84 /** The URI of the artist of the song. */ 85 - artistUri?: string 86 /** The SHA256 hash of the song. */ 87 - sha256?: string 88 /** The timestamp when the song was created. */ 89 - createdAt?: string 90 - [k: string]: unknown 91 } 92 93 export function isSongViewDetailed(v: unknown): v is SongViewDetailed { 94 return ( 95 isObj(v) && 96 - hasProp(v, '$type') && 97 - v.$type === 'app.rocksky.song.defs#songViewDetailed' 98 - ) 99 } 100 101 export function validateSongViewDetailed(v: unknown): ValidationResult { 102 - return lexicons.validate('app.rocksky.song.defs#songViewDetailed', v) 103 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface SongViewBasic { 10 /** The unique identifier of the song. */ 11 + id?: string; 12 /** The title of the song. */ 13 + title?: string; 14 /** The artist of the song. */ 15 + artist?: string; 16 /** The artist of the album the song belongs to. */ 17 + albumArtist?: string; 18 /** The URL of the album art image. */ 19 + albumArt?: string; 20 /** The URI of the song. */ 21 + uri?: string; 22 /** The album of the song. */ 23 + album?: string; 24 /** The duration of the song in milliseconds. */ 25 + duration?: number; 26 /** The track number of the song in the album. */ 27 + trackNumber?: number; 28 /** The disc number of the song in the album. */ 29 + discNumber?: number; 30 /** The number of times the song has been played. */ 31 + playCount?: number; 32 /** The number of unique listeners who have played the song. */ 33 + uniqueListeners?: number; 34 /** The URI of the album the song belongs to. */ 35 + albumUri?: string; 36 /** The URI of the artist of the song. */ 37 + artistUri?: string; 38 /** The SHA256 hash of the song. */ 39 + sha256?: string; 40 /** The timestamp when the song was created. */ 41 + createdAt?: string; 42 + [k: string]: unknown; 43 } 44 45 export function isSongViewBasic(v: unknown): v is SongViewBasic { 46 return ( 47 isObj(v) && 48 + hasProp(v, "$type") && 49 + v.$type === "app.rocksky.song.defs#songViewBasic" 50 + ); 51 } 52 53 export function validateSongViewBasic(v: unknown): ValidationResult { 54 + return lexicons.validate("app.rocksky.song.defs#songViewBasic", v); 55 } 56 57 export interface SongViewDetailed { 58 /** The unique identifier of the song. */ 59 + id?: string; 60 /** The title of the song. */ 61 + title?: string; 62 /** The artist of the song. */ 63 + artist?: string; 64 /** The artist of the album the song belongs to. */ 65 + albumArtist?: string; 66 /** The URL of the album art image. */ 67 + albumArt?: string; 68 /** The URI of the song. */ 69 + uri?: string; 70 /** The album of the song. */ 71 + album?: string; 72 /** The duration of the song in milliseconds. */ 73 + duration?: number; 74 /** The track number of the song in the album. */ 75 + trackNumber?: number; 76 /** The disc number of the song in the album. */ 77 + discNumber?: number; 78 /** The number of times the song has been played. */ 79 + playCount?: number; 80 /** The number of unique listeners who have played the song. */ 81 + uniqueListeners?: number; 82 /** The URI of the album the song belongs to. */ 83 + albumUri?: string; 84 /** The URI of the artist of the song. */ 85 + artistUri?: string; 86 /** The SHA256 hash of the song. */ 87 + sha256?: string; 88 /** The timestamp when the song was created. */ 89 + createdAt?: string; 90 + [k: string]: unknown; 91 } 92 93 export function isSongViewDetailed(v: unknown): v is SongViewDetailed { 94 return ( 95 isObj(v) && 96 + hasProp(v, "$type") && 97 + v.$type === "app.rocksky.song.defs#songViewDetailed" 98 + ); 99 } 100 101 export function validateSongViewDetailed(v: unknown): ValidationResult { 102 + return lexicons.validate("app.rocksky.song.defs#songViewDetailed", v); 103 }
+25 -25
apps/api/src/lexicon/types/app/rocksky/song/getSong.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskySongDefs from './defs' 11 12 export interface QueryParams { 13 /** The unique identifier of the song to retrieve */ 14 - uri: string 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskySongDefs.SongViewDetailed 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskySongDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The unique identifier of the song to retrieve */ 14 + uri: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskySongDefs.SongViewDetailed; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+27 -27
apps/api/src/lexicon/types/app/rocksky/song/getSongs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskySongDefs from './defs' 11 12 export interface QueryParams { 13 /** The maximum number of songs to return */ 14 - limit?: number 15 /** The offset for pagination */ 16 - offset?: number 17 } 18 19 - export type InputSchema = undefined 20 21 export interface OutputSchema { 22 - songs?: AppRockskySongDefs.SongViewBasic[] 23 - [k: string]: unknown 24 } 25 26 - export type HandlerInput = undefined 27 28 export interface HandlerSuccess { 29 - encoding: 'application/json' 30 - body: OutputSchema 31 - headers?: { [key: string]: string } 32 } 33 34 export interface HandlerError { 35 - status: number 36 - message?: string 37 } 38 39 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 40 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 41 - auth: HA 42 - params: QueryParams 43 - input: HandlerInput 44 - req: express.Request 45 - res: express.Response 46 - resetRouteRateLimits: () => Promise<void> 47 - } 48 export type Handler<HA extends HandlerAuth = never> = ( 49 ctx: HandlerReqCtx<HA>, 50 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskySongDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The maximum number of songs to return */ 14 + limit?: number; 15 /** The offset for pagination */ 16 + offset?: number; 17 } 18 19 + export type InputSchema = undefined; 20 21 export interface OutputSchema { 22 + songs?: AppRockskySongDefs.SongViewBasic[]; 23 + [k: string]: unknown; 24 } 25 26 + export type HandlerInput = undefined; 27 28 export interface HandlerSuccess { 29 + encoding: "application/json"; 30 + body: OutputSchema; 31 + headers?: { [key: string]: string }; 32 } 33 34 export interface HandlerError { 35 + status: number; 36 + message?: string; 37 } 38 39 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 40 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 41 + auth: HA; 42 + params: QueryParams; 43 + input: HandlerInput; 44 + req: express.Request; 45 + res: express.Response; 46 + resetRouteRateLimits: () => Promise<void>; 47 + }; 48 export type Handler<HA extends HandlerAuth = never> = ( 49 ctx: HandlerReqCtx<HA>, 50 + ) => Promise<HandlerOutput> | HandlerOutput;
+15 -15
apps/api/src/lexicon/types/app/rocksky/spotify/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface SpotifyTrackView { 10 /** The unique identifier of the Spotify track. */ 11 - id?: string 12 /** The name of the track. */ 13 - name?: string 14 /** The name of the artist. */ 15 - artist?: string 16 /** The name of the album. */ 17 - album?: string 18 /** The duration of the track in milliseconds. */ 19 - duration?: number 20 /** A URL to a preview of the track. */ 21 - previewUrl?: string 22 - [k: string]: unknown 23 } 24 25 export function isSpotifyTrackView(v: unknown): v is SpotifyTrackView { 26 return ( 27 isObj(v) && 28 - hasProp(v, '$type') && 29 - v.$type === 'app.rocksky.spotify.defs#spotifyTrackView' 30 - ) 31 } 32 33 export function validateSpotifyTrackView(v: unknown): ValidationResult { 34 - return lexicons.validate('app.rocksky.spotify.defs#spotifyTrackView', v) 35 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface SpotifyTrackView { 10 /** The unique identifier of the Spotify track. */ 11 + id?: string; 12 /** The name of the track. */ 13 + name?: string; 14 /** The name of the artist. */ 15 + artist?: string; 16 /** The name of the album. */ 17 + album?: string; 18 /** The duration of the track in milliseconds. */ 19 + duration?: number; 20 /** A URL to a preview of the track. */ 21 + previewUrl?: string; 22 + [k: string]: unknown; 23 } 24 25 export function isSpotifyTrackView(v: unknown): v is SpotifyTrackView { 26 return ( 27 isObj(v) && 28 + hasProp(v, "$type") && 29 + v.$type === "app.rocksky.spotify.defs#spotifyTrackView" 30 + ); 31 } 32 33 export function validateSpotifyTrackView(v: unknown): ValidationResult { 34 + return lexicons.validate("app.rocksky.spotify.defs#spotifyTrackView", v); 35 }
+25 -25
apps/api/src/lexicon/types/app/rocksky/spotify/getCurrentlyPlaying.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyPlayerDefs from '../player/defs' 11 12 export interface QueryParams { 13 /** Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. */ 14 - actor?: string 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskyPlayerDefs.CurrentlyPlayingViewDetailed 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyPlayerDefs from "../player/defs"; 11 12 export interface QueryParams { 13 /** Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. */ 14 + actor?: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskyPlayerDefs.CurrentlyPlayingViewDetailed; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+20 -20
apps/api/src/lexicon/types/app/rocksky/spotify/next.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 - export type QueryParams = {} 12 13 - export type InputSchema = undefined 14 - export type HandlerInput = undefined 15 16 export interface HandlerError { 17 - status: number 18 - message?: string 19 } 20 21 - export type HandlerOutput = HandlerError | void 22 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 23 - auth: HA 24 - params: QueryParams 25 - input: HandlerInput 26 - req: express.Request 27 - res: express.Response 28 - resetRouteRateLimits: () => Promise<void> 29 - } 30 export type Handler<HA extends HandlerAuth = never> = ( 31 ctx: HandlerReqCtx<HA>, 32 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 + export interface QueryParams {} 12 13 + export type InputSchema = undefined; 14 + export type HandlerInput = undefined; 15 16 export interface HandlerError { 17 + status: number; 18 + message?: string; 19 } 20 21 + export type HandlerOutput = HandlerError | void; 22 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 23 + auth: HA; 24 + params: QueryParams; 25 + input: HandlerInput; 26 + req: express.Request; 27 + res: express.Response; 28 + resetRouteRateLimits: () => Promise<void>; 29 + }; 30 export type Handler<HA extends HandlerAuth = never> = ( 31 ctx: HandlerReqCtx<HA>, 32 + ) => Promise<HandlerOutput> | HandlerOutput;
+20 -20
apps/api/src/lexicon/types/app/rocksky/spotify/pause.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 - export type QueryParams = {} 12 13 - export type InputSchema = undefined 14 - export type HandlerInput = undefined 15 16 export interface HandlerError { 17 - status: number 18 - message?: string 19 } 20 21 - export type HandlerOutput = HandlerError | void 22 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 23 - auth: HA 24 - params: QueryParams 25 - input: HandlerInput 26 - req: express.Request 27 - res: express.Response 28 - resetRouteRateLimits: () => Promise<void> 29 - } 30 export type Handler<HA extends HandlerAuth = never> = ( 31 ctx: HandlerReqCtx<HA>, 32 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 + export interface QueryParams {} 12 13 + export type InputSchema = undefined; 14 + export type HandlerInput = undefined; 15 16 export interface HandlerError { 17 + status: number; 18 + message?: string; 19 } 20 21 + export type HandlerOutput = HandlerError | void; 22 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 23 + auth: HA; 24 + params: QueryParams; 25 + input: HandlerInput; 26 + req: express.Request; 27 + res: express.Response; 28 + resetRouteRateLimits: () => Promise<void>; 29 + }; 30 export type Handler<HA extends HandlerAuth = never> = ( 31 ctx: HandlerReqCtx<HA>, 32 + ) => Promise<HandlerOutput> | HandlerOutput;
+20 -20
apps/api/src/lexicon/types/app/rocksky/spotify/play.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 - export type QueryParams = {} 12 13 - export type InputSchema = undefined 14 - export type HandlerInput = undefined 15 16 export interface HandlerError { 17 - status: number 18 - message?: string 19 } 20 21 - export type HandlerOutput = HandlerError | void 22 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 23 - auth: HA 24 - params: QueryParams 25 - input: HandlerInput 26 - req: express.Request 27 - res: express.Response 28 - resetRouteRateLimits: () => Promise<void> 29 - } 30 export type Handler<HA extends HandlerAuth = never> = ( 31 ctx: HandlerReqCtx<HA>, 32 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 + export interface QueryParams {} 12 13 + export type InputSchema = undefined; 14 + export type HandlerInput = undefined; 15 16 export interface HandlerError { 17 + status: number; 18 + message?: string; 19 } 20 21 + export type HandlerOutput = HandlerError | void; 22 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 23 + auth: HA; 24 + params: QueryParams; 25 + input: HandlerInput; 26 + req: express.Request; 27 + res: express.Response; 28 + resetRouteRateLimits: () => Promise<void>; 29 + }; 30 export type Handler<HA extends HandlerAuth = never> = ( 31 ctx: HandlerReqCtx<HA>, 32 + ) => Promise<HandlerOutput> | HandlerOutput;
+20 -20
apps/api/src/lexicon/types/app/rocksky/spotify/previous.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 - export type QueryParams = {} 12 13 - export type InputSchema = undefined 14 - export type HandlerInput = undefined 15 16 export interface HandlerError { 17 - status: number 18 - message?: string 19 } 20 21 - export type HandlerOutput = HandlerError | void 22 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 23 - auth: HA 24 - params: QueryParams 25 - input: HandlerInput 26 - req: express.Request 27 - res: express.Response 28 - resetRouteRateLimits: () => Promise<void> 29 - } 30 export type Handler<HA extends HandlerAuth = never> = ( 31 ctx: HandlerReqCtx<HA>, 32 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 + export interface QueryParams {} 12 13 + export type InputSchema = undefined; 14 + export type HandlerInput = undefined; 15 16 export interface HandlerError { 17 + status: number; 18 + message?: string; 19 } 20 21 + export type HandlerOutput = HandlerError | void; 22 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 23 + auth: HA; 24 + params: QueryParams; 25 + input: HandlerInput; 26 + req: express.Request; 27 + res: express.Response; 28 + resetRouteRateLimits: () => Promise<void>; 29 + }; 30 export type Handler<HA extends HandlerAuth = never> = ( 31 ctx: HandlerReqCtx<HA>, 32 + ) => Promise<HandlerOutput> | HandlerOutput;
+20 -20
apps/api/src/lexicon/types/app/rocksky/spotify/seek.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import { type HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 11 export interface QueryParams { 12 /** The position in seconds to seek to */ 13 - position: number 14 } 15 16 - export type InputSchema = undefined 17 - export type HandlerInput = undefined 18 19 export interface HandlerError { 20 - status: number 21 - message?: string 22 } 23 24 - export type HandlerOutput = HandlerError | void 25 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 26 - auth: HA 27 - params: QueryParams 28 - input: HandlerInput 29 - req: express.Request 30 - res: express.Response 31 - resetRouteRateLimits: () => Promise<void> 32 - } 33 export type Handler<HA extends HandlerAuth = never> = ( 34 ctx: HandlerReqCtx<HA>, 35 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 11 export interface QueryParams { 12 /** The position in seconds to seek to */ 13 + position: number; 14 } 15 16 + export type InputSchema = undefined; 17 + export type HandlerInput = undefined; 18 19 export interface HandlerError { 20 + status: number; 21 + message?: string; 22 } 23 24 + export type HandlerOutput = HandlerError | void; 25 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 26 + auth: HA; 27 + params: QueryParams; 28 + input: HandlerInput; 29 + req: express.Request; 30 + res: express.Response; 31 + resetRouteRateLimits: () => Promise<void>; 32 + }; 33 export type Handler<HA extends HandlerAuth = never> = ( 34 ctx: HandlerReqCtx<HA>, 35 + ) => Promise<HandlerOutput> | HandlerOutput;
+14 -14
apps/api/src/lexicon/types/app/rocksky/stats/defs.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface StatsView { 10 /** The total number of scrobbles. */ 11 - scrobbles?: number 12 /** The total number of unique artists scrobbled. */ 13 - artists?: number 14 /** The total number of tracks marked as loved. */ 15 - lovedTracks?: number 16 /** The total number of unique albums scrobbled. */ 17 - albums?: number 18 /** The total number of unique tracks scrobbled. */ 19 - tracks?: number 20 - [k: string]: unknown 21 } 22 23 export function isStatsView(v: unknown): v is StatsView { 24 return ( 25 isObj(v) && 26 - hasProp(v, '$type') && 27 - v.$type === 'app.rocksky.stats.defs#statsView' 28 - ) 29 } 30 31 export function validateStatsView(v: unknown): ValidationResult { 32 - return lexicons.validate('app.rocksky.stats.defs#statsView', v) 33 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface StatsView { 10 /** The total number of scrobbles. */ 11 + scrobbles?: number; 12 /** The total number of unique artists scrobbled. */ 13 + artists?: number; 14 /** The total number of tracks marked as loved. */ 15 + lovedTracks?: number; 16 /** The total number of unique albums scrobbled. */ 17 + albums?: number; 18 /** The total number of unique tracks scrobbled. */ 19 + tracks?: number; 20 + [k: string]: unknown; 21 } 22 23 export function isStatsView(v: unknown): v is StatsView { 24 return ( 25 isObj(v) && 26 + hasProp(v, "$type") && 27 + v.$type === "app.rocksky.stats.defs#statsView" 28 + ); 29 } 30 31 export function validateStatsView(v: unknown): ValidationResult { 32 + return lexicons.validate("app.rocksky.stats.defs#statsView", v); 33 }
+25 -25
apps/api/src/lexicon/types/app/rocksky/stats/getStats.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import type express from 'express' 5 - import { ValidationResult, BlobRef } from '@atproto/lexicon' 6 - import { lexicons } from '../../../../lexicons' 7 - import { isObj, hasProp } from '../../../../util' 8 - import { CID } from 'multiformats/cid' 9 - import type { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' 10 - import type * as AppRockskyStatsDefs from './defs' 11 12 export interface QueryParams { 13 /** The DID or handle of the user to get stats for. */ 14 - did: string 15 } 16 17 - export type InputSchema = undefined 18 - export type OutputSchema = AppRockskyStatsDefs.StatsView 19 - export type HandlerInput = undefined 20 21 export interface HandlerSuccess { 22 - encoding: 'application/json' 23 - body: OutputSchema 24 - headers?: { [key: string]: string } 25 } 26 27 export interface HandlerError { 28 - status: number 29 - message?: string 30 } 31 32 - export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 - auth: HA 35 - params: QueryParams 36 - input: HandlerInput 37 - req: express.Request 38 - res: express.Response 39 - resetRouteRateLimits: () => Promise<void> 40 - } 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 - ) => Promise<HandlerOutput> | HandlerOutput
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import express from "express"; 5 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 6 + import { lexicons } from "../../../../lexicons"; 7 + import { isObj, hasProp } from "../../../../util"; 8 + import { CID } from "multiformats/cid"; 9 + import { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; 10 + import * as AppRockskyStatsDefs from "./defs"; 11 12 export interface QueryParams { 13 /** The DID or handle of the user to get stats for. */ 14 + did: string; 15 } 16 17 + export type InputSchema = undefined; 18 + export type OutputSchema = AppRockskyStatsDefs.StatsView; 19 + export type HandlerInput = undefined; 20 21 export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 } 26 27 export interface HandlerError { 28 + status: number; 29 + message?: string; 30 } 31 32 + export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; 33 export type HandlerReqCtx<HA extends HandlerAuth = never> = { 34 + auth: HA; 35 + params: QueryParams; 36 + input: HandlerInput; 37 + req: express.Request; 38 + res: express.Response; 39 + resetRouteRateLimits: () => Promise<void>; 40 + }; 41 export type Handler<HA extends HandlerAuth = never> = ( 42 ctx: HandlerReqCtx<HA>, 43 + ) => Promise<HandlerOutput> | HandlerOutput;
+12 -12
apps/api/src/lexicon/types/com/atproto/repo/strongRef.ts
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 - import { type ValidationResult, BlobRef } from '@atproto/lexicon' 5 - import { lexicons } from '../../../../lexicons' 6 - import { isObj, hasProp } from '../../../../util' 7 - import { CID } from 'multiformats/cid' 8 9 export interface Main { 10 - uri: string 11 - cid: string 12 - [k: string]: unknown 13 } 14 15 export function isMain(v: unknown): v is Main { 16 return ( 17 isObj(v) && 18 - hasProp(v, '$type') && 19 - (v.$type === 'com.atproto.repo.strongRef#main' || 20 - v.$type === 'com.atproto.repo.strongRef') 21 - ) 22 } 23 24 export function validateMain(v: unknown): ValidationResult { 25 - return lexicons.validate('com.atproto.repo.strongRef#main', v) 26 }
··· 1 /** 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 + import { ValidationResult, BlobRef } from "@atproto/lexicon"; 5 + import { lexicons } from "../../../../lexicons"; 6 + import { isObj, hasProp } from "../../../../util"; 7 + import { CID } from "multiformats/cid"; 8 9 export interface Main { 10 + uri: string; 11 + cid: string; 12 + [k: string]: unknown; 13 } 14 15 export function isMain(v: unknown): v is Main { 16 return ( 17 isObj(v) && 18 + hasProp(v, "$type") && 19 + (v.$type === "com.atproto.repo.strongRef#main" || 20 + v.$type === "com.atproto.repo.strongRef") 21 + ); 22 } 23 24 export function validateMain(v: unknown): ValidationResult { 25 + return lexicons.validate("com.atproto.repo.strongRef#main", v); 26 }
+2 -2
apps/api/src/lexicon/util.ts
··· 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 export function isObj(v: unknown): v is Record<string, unknown> { 5 - return typeof v === 'object' && v !== null 6 } 7 8 export function hasProp<K extends PropertyKey>( 9 data: object, 10 prop: K, 11 ): data is Record<K, unknown> { 12 - return prop in data 13 }
··· 2 * GENERATED CODE - DO NOT MODIFY 3 */ 4 export function isObj(v: unknown): v is Record<string, unknown> { 5 + return typeof v === "object" && v !== null; 6 } 7 8 export function hasProp<K extends PropertyKey>( 9 data: object, 10 prop: K, 11 ): data is Record<K, unknown> { 12 + return prop in data; 13 }
+32 -32
apps/api/src/nowplaying/nowplaying.service.ts
··· 14 15 export async function putArtistRecord( 16 track: Track, 17 - agent: Agent 18 ): Promise<string | null> { 19 const rkey = TID.nextStr(); 20 const record: { ··· 63 64 export async function putAlbumRecord( 65 track: Track, 66 - agent: Agent 67 ): Promise<string | null> { 68 const rkey = TID.nextStr(); 69 let albumArt; ··· 123 124 export async function putSongRecord( 125 track: Track, 126 - agent: Agent 127 ): Promise<string | null> { 128 const rkey = TID.nextStr(); 129 let albumArt; ··· 191 192 async function putScrobbleRecord( 193 track: Track, 194 - agent: Agent 195 ): Promise<string | null> { 196 const rkey = TID.nextStr(); 197 let albumArt; ··· 369 ctx: Context, 370 track: Track, 371 agent: Agent, 372 - userDid: string 373 ): Promise<void> { 374 // check if scrobble already exists (user did + timestamp) 375 const scrobbleTime = dayjs.unix(track.timestamp); ··· 393 if (existingScrobble) { 394 console.log( 395 `Scrobble already exists for ${chalk.cyan(track.title)} at ${chalk.cyan( 396 - dayjs.unix(track.timestamp).format("YYYY-MM-DD HH:mm:ss") 397 - )}` 398 ); 399 return; 400 } ··· 406 equals( 407 createHash("sha256") 408 .update( 409 - `${track.title} - ${track.artist} - ${track.album}`.toLowerCase() 410 ) 411 - .digest("hex") 412 - ) 413 ) 414 .getFirst(); 415 ··· 420 equals( 421 createHash("sha256") 422 .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) 423 - .digest("hex") 424 - ) 425 ) 426 .getFirst(); 427 if (album) { ··· 438 equals( 439 createHash("sha256") 440 .update(track.albumArtist.toLowerCase()) 441 - .digest("hex") 442 - ) 443 ) 444 .getFirst(); 445 if (artist) { ··· 466 equals( 467 createHash("sha256") 468 .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) 469 - .digest("hex") 470 - ) 471 ) 472 .getFirst(); 473 ··· 480 equals( 481 createHash("sha256") 482 .update( 483 - `${track.title} - ${track.artist} - ${track.album}`.toLowerCase() 484 ) 485 - .digest("hex") 486 - ) 487 ) 488 .getFirst(); 489 await new Promise((resolve) => setTimeout(resolve, 1000)); ··· 496 497 if (existingTrack) { 498 console.log( 499 - `Song found: ${chalk.cyan(existingTrack.xata_id)} - ${track.title}, after ${chalk.magenta(tries)} tries` 500 ); 501 } 502 ··· 546 equals( 547 createHash("sha256") 548 .update( 549 - `${track.title} - ${track.artist} - ${track.album}`.toLowerCase() 550 ) 551 - .digest("hex") 552 - ) 553 ) 554 .getFirst(); 555 ··· 559 tries < 30 560 ) { 561 console.log( 562 - `Artist uri not ready, trying again: ${chalk.magenta(tries + 1)}` 563 ); 564 existingTrack = await ctx.client.db.tracks 565 .filter( ··· 567 equals( 568 createHash("sha256") 569 .update( 570 - `${track.title} - ${track.artist} - ${track.album}`.toLowerCase() 571 ) 572 - .digest("hex") 573 - ) 574 ) 575 .getFirst(); 576 ··· 582 equals( 583 createHash("sha256") 584 .update(track.albumArtist.toLowerCase()) 585 - .digest("hex") 586 - ) 587 ) 588 .getFirst(); 589 if (artist) { ··· 602 equals( 603 createHash("sha256") 604 .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) 605 - .digest("hex") 606 - ) 607 ) 608 .getFirst(); 609 if (album) { ··· 630 631 if (existingTrack?.artist_uri) { 632 console.log( 633 - `Artist uri ready: ${chalk.cyan(existingTrack.xata_id)} - ${track.title}, after ${chalk.magenta(tries)} tries` 634 ); 635 } 636
··· 14 15 export async function putArtistRecord( 16 track: Track, 17 + agent: Agent, 18 ): Promise<string | null> { 19 const rkey = TID.nextStr(); 20 const record: { ··· 63 64 export async function putAlbumRecord( 65 track: Track, 66 + agent: Agent, 67 ): Promise<string | null> { 68 const rkey = TID.nextStr(); 69 let albumArt; ··· 123 124 export async function putSongRecord( 125 track: Track, 126 + agent: Agent, 127 ): Promise<string | null> { 128 const rkey = TID.nextStr(); 129 let albumArt; ··· 191 192 async function putScrobbleRecord( 193 track: Track, 194 + agent: Agent, 195 ): Promise<string | null> { 196 const rkey = TID.nextStr(); 197 let albumArt; ··· 369 ctx: Context, 370 track: Track, 371 agent: Agent, 372 + userDid: string, 373 ): Promise<void> { 374 // check if scrobble already exists (user did + timestamp) 375 const scrobbleTime = dayjs.unix(track.timestamp); ··· 393 if (existingScrobble) { 394 console.log( 395 `Scrobble already exists for ${chalk.cyan(track.title)} at ${chalk.cyan( 396 + dayjs.unix(track.timestamp).format("YYYY-MM-DD HH:mm:ss"), 397 + )}`, 398 ); 399 return; 400 } ··· 406 equals( 407 createHash("sha256") 408 .update( 409 + `${track.title} - ${track.artist} - ${track.album}`.toLowerCase(), 410 ) 411 + .digest("hex"), 412 + ), 413 ) 414 .getFirst(); 415 ··· 420 equals( 421 createHash("sha256") 422 .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) 423 + .digest("hex"), 424 + ), 425 ) 426 .getFirst(); 427 if (album) { ··· 438 equals( 439 createHash("sha256") 440 .update(track.albumArtist.toLowerCase()) 441 + .digest("hex"), 442 + ), 443 ) 444 .getFirst(); 445 if (artist) { ··· 466 equals( 467 createHash("sha256") 468 .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) 469 + .digest("hex"), 470 + ), 471 ) 472 .getFirst(); 473 ··· 480 equals( 481 createHash("sha256") 482 .update( 483 + `${track.title} - ${track.artist} - ${track.album}`.toLowerCase(), 484 ) 485 + .digest("hex"), 486 + ), 487 ) 488 .getFirst(); 489 await new Promise((resolve) => setTimeout(resolve, 1000)); ··· 496 497 if (existingTrack) { 498 console.log( 499 + `Song found: ${chalk.cyan(existingTrack.xata_id)} - ${track.title}, after ${chalk.magenta(tries)} tries`, 500 ); 501 } 502 ··· 546 equals( 547 createHash("sha256") 548 .update( 549 + `${track.title} - ${track.artist} - ${track.album}`.toLowerCase(), 550 ) 551 + .digest("hex"), 552 + ), 553 ) 554 .getFirst(); 555 ··· 559 tries < 30 560 ) { 561 console.log( 562 + `Artist uri not ready, trying again: ${chalk.magenta(tries + 1)}`, 563 ); 564 existingTrack = await ctx.client.db.tracks 565 .filter( ··· 567 equals( 568 createHash("sha256") 569 .update( 570 + `${track.title} - ${track.artist} - ${track.album}`.toLowerCase(), 571 ) 572 + .digest("hex"), 573 + ), 574 ) 575 .getFirst(); 576 ··· 582 equals( 583 createHash("sha256") 584 .update(track.albumArtist.toLowerCase()) 585 + .digest("hex"), 586 + ), 587 ) 588 .getFirst(); 589 if (artist) { ··· 602 equals( 603 createHash("sha256") 604 .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) 605 + .digest("hex"), 606 + ), 607 ) 608 .getFirst(); 609 if (album) { ··· 630 631 if (existingTrack?.artist_uri) { 632 console.log( 633 + `Artist uri ready: ${chalk.cyan(existingTrack.xata_id)} - ${track.title}, after ${chalk.magenta(tries)} tries`, 634 ); 635 } 636
+3 -3
apps/api/src/scripts/genres.ts
··· 11 .from(tables.spotifyTokens) 12 .leftJoin( 13 tables.spotifyAccounts, 14 - eq(tables.spotifyAccounts.userId, tables.spotifyTokens.userId) 15 ) 16 .where(eq(tables.spotifyAccounts.isBetaUser, true)) 17 .execute() ··· 51 headers: { 52 Authorization: `Bearer ${token}`, 53 }, 54 - } 55 ) 56 .then( 57 (res) => ··· 64 images: Array<{ url: string }>; 65 }>; 66 }; 67 - }> 68 ) 69 .then(async (data) => _.get(data, "artists.items.0")); 70
··· 11 .from(tables.spotifyTokens) 12 .leftJoin( 13 tables.spotifyAccounts, 14 + eq(tables.spotifyAccounts.userId, tables.spotifyTokens.userId), 15 ) 16 .where(eq(tables.spotifyAccounts.isBetaUser, true)) 17 .execute() ··· 51 headers: { 52 Authorization: `Bearer ${token}`, 53 }, 54 + }, 55 ) 56 .then( 57 (res) => ··· 64 images: Array<{ url: string }>; 65 }>; 66 }; 67 + }>, 68 ) 69 .then(async (data) => _.get(data, "artists.items.0")); 70
+11 -11
apps/api/src/scripts/sync.ts
··· 25 equals( 26 createHash("sha256") 27 .update( 28 - `${track.title} - ${track.artist} - ${track.album}`.toLowerCase() 29 ) 30 - .digest("hex") 31 - ) 32 ) 33 .getFirst(); 34 ··· 40 equals( 41 createHash("sha256") 42 .update(`${track.album} - ${track.album_artist}`.toLowerCase()) 43 - .digest("hex") 44 - ) 45 ) 46 .getFirst(); 47 if (album) { ··· 59 equals( 60 createHash("sha256") 61 .update(track.album_artist.toLowerCase()) 62 - .digest("hex") 63 - ) 64 ) 65 .getFirst(); 66 if (artist) { ··· 76 equals( 77 createHash("sha256") 78 .update(`${track.album} - ${track.album_artist}`.toLowerCase()) 79 - .digest("hex") 80 - ) 81 ) 82 .getFirst(); 83 ··· 89 equals( 90 createHash("sha256") 91 .update(track.album_artist.toLowerCase()) 92 - .digest("hex") 93 - ) 94 ) 95 .getFirst(); 96 if (artist) {
··· 25 equals( 26 createHash("sha256") 27 .update( 28 + `${track.title} - ${track.artist} - ${track.album}`.toLowerCase(), 29 ) 30 + .digest("hex"), 31 + ), 32 ) 33 .getFirst(); 34 ··· 40 equals( 41 createHash("sha256") 42 .update(`${track.album} - ${track.album_artist}`.toLowerCase()) 43 + .digest("hex"), 44 + ), 45 ) 46 .getFirst(); 47 if (album) { ··· 59 equals( 60 createHash("sha256") 61 .update(track.album_artist.toLowerCase()) 62 + .digest("hex"), 63 + ), 64 ) 65 .getFirst(); 66 if (artist) { ··· 76 equals( 77 createHash("sha256") 78 .update(`${track.album} - ${track.album_artist}`.toLowerCase()) 79 + .digest("hex"), 80 + ), 81 ) 82 .getFirst(); 83 ··· 89 equals( 90 createHash("sha256") 91 .update(track.album_artist.toLowerCase()) 92 + .digest("hex"), 93 + ), 94 ) 95 .getFirst(); 96 if (artist) {
+9 -9
apps/api/src/xrpc/app/rocksky/actor/getProfile.ts
··· 33 Effect.catchAll((err) => { 34 console.error(err); 35 return Effect.succeed({}); 36 - }) 37 ); 38 server.app.rocksky.actor.getProfile({ 39 auth: ctx.authVerifier, ··· 192 .from(tables.spotifyAccounts) 193 .leftJoin( 194 tables.users, 195 - eq(tables.spotifyAccounts.userId, tables.users.id) 196 ) 197 .where(eq(tables.users.did, did)) 198 .execute() ··· 202 .from(tables.spotifyTokens) 203 .leftJoin( 204 tables.users, 205 - eq(tables.spotifyTokens.userId, tables.users.id) 206 ) 207 .where(eq(tables.users.did, did)) 208 .execute() ··· 212 .from(tables.googleDriveAccounts) 213 .leftJoin( 214 tables.users, 215 - eq(tables.googleDriveAccounts.userId, tables.users.id) 216 ) 217 .where(eq(tables.users.did, did)) 218 .execute() ··· 222 .from(tables.dropboxAccounts) 223 .leftJoin( 224 tables.users, 225 - eq(tables.dropboxAccounts.userId, tables.users.id) 226 ) 227 .where(eq(tables.users.did, did)) 228 .execute() ··· 279 xata_createdat: profile.user.createdAt.toISOString(), 280 xata_updatedat: profile.user.updatedAt.toISOString(), 281 xata_version: 1, 282 - }) 283 - ) 284 ); 285 } else { 286 // Update existing user in background if handle or avatar or displayName changed ··· 313 xata_createdat: profile.user.createdAt.toISOString(), 314 xata_updatedat: new Date().toISOString(), 315 xata_version: (profile.user.xataVersion || 1) + 1, 316 - }) 317 - ) 318 ); 319 } 320 }
··· 33 Effect.catchAll((err) => { 34 console.error(err); 35 return Effect.succeed({}); 36 + }), 37 ); 38 server.app.rocksky.actor.getProfile({ 39 auth: ctx.authVerifier, ··· 192 .from(tables.spotifyAccounts) 193 .leftJoin( 194 tables.users, 195 + eq(tables.spotifyAccounts.userId, tables.users.id), 196 ) 197 .where(eq(tables.users.did, did)) 198 .execute() ··· 202 .from(tables.spotifyTokens) 203 .leftJoin( 204 tables.users, 205 + eq(tables.spotifyTokens.userId, tables.users.id), 206 ) 207 .where(eq(tables.users.did, did)) 208 .execute() ··· 212 .from(tables.googleDriveAccounts) 213 .leftJoin( 214 tables.users, 215 + eq(tables.googleDriveAccounts.userId, tables.users.id), 216 ) 217 .where(eq(tables.users.did, did)) 218 .execute() ··· 222 .from(tables.dropboxAccounts) 223 .leftJoin( 224 tables.users, 225 + eq(tables.dropboxAccounts.userId, tables.users.id), 226 ) 227 .where(eq(tables.users.did, did)) 228 .execute() ··· 279 xata_createdat: profile.user.createdAt.toISOString(), 280 xata_updatedat: profile.user.updatedAt.toISOString(), 281 xata_version: 1, 282 + }), 283 + ), 284 ); 285 } else { 286 // Update existing user in background if handle or avatar or displayName changed ··· 313 xata_createdat: profile.user.createdAt.toISOString(), 314 xata_updatedat: new Date().toISOString(), 315 xata_version: (profile.user.xataVersion || 1) + 1, 316 + }), 317 + ), 318 ); 319 } 320 }
+1 -1
apps/api/src/xrpc/app/rocksky/artist/getArtistListeners.ts
··· 15 Effect.catchAll((err) => { 16 console.error(err); 17 return Effect.succeed({ listeners: [] }); 18 - }) 19 ); 20 server.app.rocksky.artist.getArtistListeners({ 21 handler: async ({ params }) => {
··· 15 Effect.catchAll((err) => { 16 console.error(err); 17 return Effect.succeed({ listeners: [] }); 18 + }), 19 ); 20 server.app.rocksky.artist.getArtistListeners({ 21 handler: async ({ params }) => {
+182 -182
apps/api/src/xrpc/app/rocksky/scrobble/createScrobble.ts
··· 38 pipe( 39 scrobbleTrack(ctx, track, agent, did), 40 Effect.tap(() => 41 - Effect.logInfo(`Scrobble created for ${chalk.cyan(track.title)}`) 42 - ) 43 - ) 44 ), 45 Effect.flatMap(presentation), 46 Effect.retry({ times: 3 }), ··· 48 Effect.catchAll((err) => { 49 console.error(err); 50 return Effect.succeed({}); 51 - }) 52 ); 53 server.app.rocksky.scrobble.createScrobble({ 54 auth: ctx.authVerifier, ··· 82 ctx, 83 did, 84 input, 85 - })) 86 ), 87 Match.orElse(() => { 88 throw new Error("Authentication required to create a scrobble"); 89 - }) 90 ), 91 catch: (error) => new Error(`Failed to create agent: ${error}`), 92 }); ··· 138 Effect.flatMap(([imageBuffer, options]) => 139 pipe( 140 Effect.tryPromise(() => agent.uploadBlob(imageBuffer, options)), 141 - Effect.map((uploadResponse) => uploadResponse.data.blob) 142 - ) 143 ), 144 - Effect.catchAll(() => Effect.succeed(undefined as BlobRef | undefined)) 145 ); 146 147 const putRecord = <T>( 148 agent: Agent, 149 collection: string, 150 record: T, 151 - validate: (record: T) => { success: boolean } 152 ) => 153 pipe( 154 Effect.succeed(record), 155 Effect.filterOrFail( 156 (rec) => validate(rec).success, 157 - () => new Error("Invalid record") 158 ), 159 Effect.flatMap(() => 160 pipe( ··· 167 rkey, 168 record, 169 validate: false, 170 - }) 171 - ) 172 ), 173 Effect.tap((res) => 174 - Effect.logInfo(`Record created at ${res.data.uri}`) 175 ), 176 - Effect.map((res) => res.data.uri) 177 - ) 178 ), 179 Effect.catchAll((error) => { 180 console.error(`Error creating ${collection} record`, error); 181 return Effect.succeed(null); 182 - }) 183 ); 184 185 const putArtistRecord = (track: Track, agent: Agent) => ··· 195 tags: track.genres, 196 })), 197 Effect.flatMap((record) => 198 - putRecord(agent, "app.rocksky.artist", record, Artist.validateRecord) 199 - ) 200 ); 201 202 const putAlbumRecord = (track: Track, agent: Agent) => ··· 204 Match.value(track.albumArt).pipe( 205 Match.when( 206 (url) => !!url, 207 - (url) => uploadImage(url, agent) 208 ), 209 - Match.orElse(() => Effect.succeed(undefined as BlobRef | undefined)) 210 ), 211 Effect.map((albumArt) => ({ 212 $type: "app.rocksky.album", ··· 220 albumArt, 221 })), 222 Effect.flatMap((record) => 223 - putRecord(agent, "app.rocksky.album", record, Album.validateRecord) 224 - ) 225 ); 226 227 const putSongRecord = (track: Track, agent: Agent) => ··· 229 Match.value(track.albumArt).pipe( 230 Match.when( 231 (url) => !!url, 232 - (url) => uploadImage(url, agent) 233 ), 234 - Match.orElse(() => Effect.succeed(undefined as BlobRef | undefined)) 235 ), 236 Effect.map((albumArt) => ({ 237 $type: "app.rocksky.song", ··· 254 spotifyLink: track.spotifyLink ?? undefined, 255 })), 256 Effect.flatMap((record) => 257 - putRecord(agent, "app.rocksky.song", record, Song.validateRecord) 258 - ) 259 ); 260 261 const putScrobbleRecord = (track: Track, agent: Agent) => ··· 263 Match.value(track.albumArt).pipe( 264 Match.when( 265 (url) => !!url, 266 - (url) => uploadImage(url, agent) 267 ), 268 - Match.orElse(() => Effect.succeed(undefined as BlobRef | undefined)) 269 ), 270 Effect.map((albumArt) => ({ 271 $type: "app.rocksky.scrobble", ··· 290 spotifyLink: track.spotifyLink ?? undefined, 291 })), 292 Effect.flatMap((record) => 293 - putRecord(agent, "app.rocksky.scrobble", record, Scrobble.validateRecord) 294 - ) 295 ); 296 297 const getScrobble = ({ ctx, id }: { ctx: Context; id: string }) => ··· 303 .leftJoin(tables.albums, eq(tables.albums.id, tables.scrobbles.albumId)) 304 .leftJoin( 305 tables.artists, 306 - eq(tables.artists.id, tables.scrobbles.artistId) 307 ) 308 .leftJoin(tables.users, eq(tables.users.id, tables.scrobbles.userId)) 309 .where(eq(tables.scrobbles.id, id)) 310 .execute() 311 - .then(([row]) => row) 312 ); 313 314 const getUserAlbum = ( ··· 318 artists: SelectArtist; 319 users: SelectUser; 320 tracks: SelectTrack; 321 - } 322 ) => 323 Effect.tryPromise(() => 324 ctx.db ··· 326 .from(tables.userAlbums) 327 .where(eq(tables.userAlbums.albumId, scrobble.albums.id)) 328 .execute() 329 - .then(([row]) => row) 330 ); 331 332 const getUserArtist = ( ··· 336 artists: SelectArtist; 337 users: SelectUser; 338 tracks: SelectTrack; 339 - } 340 ) => 341 Effect.tryPromise(() => 342 ctx.db ··· 344 .from(tables.userArtists) 345 .where(eq(tables.userArtists.id, scrobble.artists.id)) 346 .execute() 347 - .then(([row]) => row) 348 ); 349 350 const getUserTrack = ( ··· 354 artists: SelectArtist; 355 users: SelectUser; 356 tracks: SelectTrack; 357 - } 358 ) => 359 Effect.tryPromise(() => 360 ctx.db ··· 362 .from(tables.userTracks) 363 .where(eq(tables.userTracks.id, scrobble.tracks.id)) 364 .execute() 365 - .then(([row]) => row) 366 ); 367 368 const getAlbumTrack = ( ··· 372 artists: SelectArtist; 373 users: SelectUser; 374 tracks: SelectTrack; 375 - } 376 ) => 377 Effect.tryPromise(() => 378 ctx.db ··· 380 .from(tables.albumTracks) 381 .where(eq(tables.albumTracks.trackId, scrobble.tracks.id)) 382 .execute() 383 - .then(([row]) => row) 384 ); 385 386 const getArtistTrack = ( ··· 390 artists: SelectArtist; 391 users: SelectUser; 392 tracks: SelectTrack; 393 - } 394 ) => 395 Effect.tryPromise(() => 396 ctx.db ··· 398 .from(tables.artistTracks) 399 .where(eq(tables.artistTracks.trackId, scrobble.tracks.id)) 400 .execute() 401 - .then(([row]) => row) 402 ); 403 404 const getArtistAlbum = ( ··· 408 artists: SelectArtist; 409 users: SelectUser; 410 tracks: SelectTrack; 411 - } 412 ) => 413 Effect.tryPromise(() => 414 ctx.db ··· 417 .where( 418 and( 419 eq(tables.artistAlbums.albumId, scrobble.albums.id), 420 - eq(tables.artistAlbums.artistId, scrobble.artists.id) 421 - ) 422 ) 423 - .then(([row]) => row) 424 ); 425 426 const createUserArtist = ( ··· 430 artists: SelectArtist; 431 users: SelectUser; 432 tracks: SelectTrack; 433 - } 434 ) => 435 pipe( 436 Effect.tryPromise(() => ··· 442 uri: scrobble.artists.uri, 443 scrobbles: 1, 444 } as InsertUserArtist) 445 - .execute() 446 ), 447 Effect.flatMap(() => 448 Effect.tryPromise(() => ··· 451 .from(tables.userArtists) 452 .where(eq(tables.userArtists.artistId, scrobble.artists.id)) 453 .execute() 454 - .then(([row]) => row) 455 - ) 456 - ) 457 ); 458 459 const createUserAlbum = ( ··· 463 artists: SelectArtist; 464 users: SelectUser; 465 tracks: SelectTrack; 466 - } 467 ) => 468 pipe( 469 Effect.tryPromise(() => ··· 475 uri: scrobble.albums.uri, 476 scrobbles: 1, 477 } as InsertUserAlbum) 478 - .execute() 479 ), 480 Effect.flatMap(() => 481 Effect.tryPromise(() => ··· 484 .from(tables.userAlbums) 485 .where(eq(tables.userAlbums.albumId, scrobble.albums.id)) 486 .execute() 487 - .then(([row]) => row) 488 - ) 489 - ) 490 ); 491 492 const createUserTrack = ( ··· 496 artists: SelectArtist; 497 users: SelectUser; 498 tracks: SelectTrack; 499 - } 500 ) => 501 pipe( 502 Effect.tryPromise(() => ··· 508 uri: scrobble.tracks.uri, 509 scrobbles: 1, 510 } as InsertUserTrack) 511 - .execute() 512 ), 513 Effect.flatMap(() => 514 Effect.tryPromise(() => ··· 516 .select() 517 .from(tables.userTracks) 518 .where(eq(tables.userTracks.trackId, scrobble.tracks.id)) 519 - .then(([row]) => row) 520 - ) 521 - ) 522 ); 523 524 const publishScrobble = (ctx: Context, id: string) => ··· 689 xata_updatedat: artistAlbum.updatedAt.toISOString(), 690 xata_version: artistAlbum.xataVersion, 691 }, 692 - }) 693 - ) 694 - ) 695 - ) 696 - ) 697 ), 698 Effect.flatMap((data) => 699 Effect.try(() => 700 ctx.nc.publish( 701 "rocksky.scrobble", 702 Buffer.from( 703 - JSON.stringify(data).replaceAll("sha_256", "sha256") 704 - ) 705 - ) 706 - ) 707 - ) 708 - ) 709 - ) 710 - ) 711 - ) 712 ); 713 714 const computeTrackHash = (track: Track): Effect.Effect<string, never> => 715 Effect.succeed( 716 createHash("sha256") 717 .update(`${track.title} - ${track.artist} - ${track.album}`.toLowerCase()) 718 - .digest("hex") 719 ); 720 721 const computeAlbumHash = (track: Track): Effect.Effect<string, never> => 722 Effect.succeed( 723 createHash("sha256") 724 .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) 725 - .digest("hex") 726 ); 727 728 const computeArtistHash = (track: Track): Effect.Effect<string, never> => 729 Effect.succeed( 730 - createHash("sha256").update(track.albumArtist.toLowerCase()).digest("hex") 731 ); 732 733 const fetchExistingTrack = ( 734 ctx: Context, 735 - trackHash: string 736 ): Effect.Effect<SelectTrack | undefined, Error> => 737 Effect.tryPromise(() => 738 ctx.db ··· 740 .from(tables.tracks) 741 .where(eq(tables.tracks.sha256, trackHash)) 742 .execute() 743 - .then(([row]) => row) 744 ); 745 746 // Update track metadata (album_uri and artist_uri) 747 const updateTrackMetadata = ( 748 ctx: Context, 749 track: Track, 750 - trackRecord: SelectTrack 751 ) => 752 pipe( 753 Effect.succeed(trackRecord), ··· 762 .from(tables.albums) 763 .where(eq(tables.albums.sha256, albumHash)) 764 .execute() 765 - .then(([row]) => row) 766 - ) 767 ), 768 Effect.flatMap((album) => 769 album ··· 774 albumUri: album.uri, 775 }) 776 .where(eq(tables.tracks.id, trackRecord.id)) 777 - .execute() 778 ) 779 - : Effect.succeed(undefined) 780 - ) 781 ) 782 - : Effect.succeed(undefined) 783 ), 784 Effect.tap((trackRecord) => 785 !trackRecord.artistUri ··· 792 .from(tables.artists) 793 .where(eq(tables.artists.sha256, artistHash)) 794 .execute() 795 - .then(([row]) => row) 796 - ) 797 ), 798 Effect.flatMap((artist) => 799 artist ··· 804 artistUri: artist.uri, 805 }) 806 .where(eq(tables.tracks.id, trackRecord.id)) 807 - .execute() 808 ) 809 - : Effect.succeed(undefined) 810 - ) 811 ) 812 - : Effect.succeed(undefined) 813 - ) 814 ); 815 816 // Ensure track exists or create it ··· 819 track: Track, 820 agent: Agent, 821 userDid: string, 822 - existingTrack: SelectTrack | undefined 823 ) => 824 pipe( 825 Effect.succeed(existingTrack), ··· 827 Match.value(trackOpt).pipe( 828 Match.when( 829 (value) => !!value, 830 - () => updateTrackMetadata(ctx, track, trackOpt) 831 ), 832 - Match.orElse(() => Effect.succeed(undefined)) 833 - ) 834 ), 835 Effect.flatMap((trackOpt) => 836 pipe( ··· 840 .from(tables.userTracks) 841 .leftJoin( 842 tables.tracks, 843 - eq(tables.userTracks.trackId, tables.tracks.id) 844 ) 845 .leftJoin( 846 tables.users, 847 - eq(tables.userTracks.userId, tables.users.id) 848 ) 849 .where( 850 and( 851 eq(tables.tracks.id, trackOpt?.id), 852 - eq(tables.users.did, userDid) 853 - ) 854 ) 855 .execute() 856 - .then(([row]) => row.user_tracks) 857 ), 858 Effect.flatMap((userTrack) => 859 Option.isNone(Option.fromNullable(userTrack)) || 860 !userTrack?.uri?.includes(userDid) 861 ? putSongRecord(track, agent) 862 - : Effect.succeed(null) 863 - ) 864 - ) 865 - ) 866 ); 867 868 // Ensure album exists or create it ··· 870 ctx: Context, 871 track: Track, 872 agent: Agent, 873 - userDid: string 874 ) => 875 pipe( 876 computeAlbumHash(track), ··· 881 .from(tables.albums) 882 .where(eq(tables.albums.sha256, albumHash)) 883 .execute() 884 - .then(([row]) => row) 885 - ) 886 ), 887 Effect.flatMap((existingAlbum) => 888 pipe( ··· 894 .from(tables.userAlbums) 895 .leftJoin( 896 tables.albums, 897 - eq(tables.userAlbums.albumId, tables.albums.id) 898 ) 899 .leftJoin( 900 tables.users, 901 - eq(tables.userAlbums.userId, tables.users.id) 902 ) 903 .where( 904 and( 905 eq(tables.albums.id, album.id), 906 - eq(tables.users.did, userDid) 907 - ) 908 ) 909 .execute() 910 - .then(([row]) => row.user_albums) 911 - ) 912 ), 913 Effect.flatMap((userAlbum) => 914 Option.isNone(Option.fromNullable(existingAlbum)) || 915 Option.isNone(Option.fromNullable(userAlbum)) || 916 !userAlbum?.uri?.includes(userDid) 917 ? putAlbumRecord(track, agent) 918 - : Effect.succeed(null) 919 - ) 920 - ) 921 - ) 922 ); 923 924 // Ensure artist exists or create it ··· 926 ctx: Context, 927 track: Track, 928 agent: Agent, 929 - userDid: string 930 ) => 931 pipe( 932 computeArtistHash(track), ··· 937 .from(tables.artists) 938 .where(eq(tables.artists.sha256, artistHash)) 939 .execute() 940 - .then(([row]) => row) 941 - ) 942 ), 943 Effect.flatMap((existingArtist) => 944 pipe( ··· 950 .from(tables.userArtists) 951 .leftJoin( 952 tables.artists, 953 - eq(tables.userArtists.artistId, tables.artists.id) 954 ) 955 .leftJoin( 956 tables.users, 957 - eq(tables.userArtists.userId, tables.users.id) 958 ) 959 .where( 960 and( 961 eq(tables.artists.id, artist.id), 962 - eq(tables.users.did, userDid) 963 - ) 964 ) 965 .execute() 966 - .then(([row]) => row.user_artists) 967 - ) 968 ), 969 Effect.flatMap((userArtist) => 970 Effect.if( ··· 974 { 975 onTrue: () => putArtistRecord(track, agent), 976 onFalse: () => Effect.succeed(null), 977 - } 978 - ) 979 - ) 980 - ) 981 - ) 982 ); 983 984 // Retry fetching track until metadata is ready 985 const retryFetchTrack = ( 986 ctx: Context, 987 trackHash: string, 988 - initialTrack: SelectTrack | undefined 989 ) => 990 pipe( 991 Effect.iterate( ··· 1001 .from(tables.tracks) 1002 .where(eq(tables.tracks.sha256, trackHash)) 1003 .execute() 1004 - .then(([row]) => row) 1005 ), 1006 Effect.flatMap((trackRecord) => 1007 Option.fromNullable(trackRecord).pipe( 1008 Effect.flatMap((track) => 1009 - updateTrackMetadata(ctx, track, trackRecord) 1010 - ) 1011 - ) 1012 ), 1013 Effect.tap((trackRecord) => 1014 Effect.logInfo( 1015 trackRecord 1016 ? `Track metadata ready: ${chalk.cyan(trackRecord.id)} - ${track.title}, after ${chalk.magenta(tries + 1)} tries` 1017 - : `Retrying track fetch: ${chalk.magenta(tries + 1)}` 1018 - ) 1019 ), 1020 Effect.map((trackRecord) => ({ 1021 tries: tries + 1, 1022 track: trackRecord, 1023 })), 1024 - Effect.delay("1 second") 1025 ), 1026 - } 1027 ), 1028 Effect.tap(({ tries, track }) => 1029 tries >= 30 && !(track?.artistUri && track?.albumUri) 1030 ? Effect.logError( 1031 - `Track metadata not ready after ${chalk.magenta("30 tries")}` 1032 ) 1033 - : Effect.succeed(undefined) 1034 ), 1035 - Effect.map(({ track }) => track) 1036 ); 1037 1038 // Retry fetching scrobble until complete ··· 1070 .from(tables.scrobbles) 1071 .leftJoin( 1072 tables.tracks, 1073 - eq(tables.scrobbles.trackId, tables.tracks.id) 1074 ) 1075 .leftJoin( 1076 tables.albums, 1077 - eq(tables.scrobbles.albumId, tables.albums.id) 1078 ) 1079 .leftJoin( 1080 tables.artists, 1081 - eq(tables.scrobbles.artistId, tables.artists.id) 1082 ) 1083 .leftJoin( 1084 tables.users, 1085 - eq(tables.scrobbles.userId, tables.users.id) 1086 ) 1087 .where(eq(tables.scrobbles.uri, scrobbleUri)) 1088 .execute() 1089 - .then(([row]) => row) 1090 ), 1091 Effect.tap((scrobble) => 1092 Effect.if( ··· 1103 artistUri: scrobble.artists.uri, 1104 }) 1105 .where(eq(tables.albums.id, scrobble.albums.id)) 1106 - .execute() 1107 ), 1108 onFalse: () => Effect.succeed(undefined), 1109 - } 1110 - ) 1111 ), 1112 Effect.flatMap(() => 1113 Effect.tryPromise(() => ··· 1116 .from(tables.scrobbles) 1117 .leftJoin( 1118 tables.tracks, 1119 - eq(tables.scrobbles.trackId, tables.tracks.id) 1120 ) 1121 .leftJoin( 1122 tables.albums, 1123 - eq(tables.scrobbles.albumId, tables.albums.id) 1124 ) 1125 .leftJoin( 1126 tables.artists, 1127 - eq(tables.scrobbles.artistId, tables.artists.id) 1128 ) 1129 .leftJoin( 1130 tables.users, 1131 - eq(tables.scrobbles.userId, tables.users.id) 1132 ) 1133 .where(eq(tables.scrobbles.uri, scrobbleUri)) 1134 .execute() 1135 - .then(([row]) => row) 1136 - ) 1137 ), 1138 Effect.map((scrobble) => ({ 1139 tries: tries + 1, ··· 1150 scrobble.tracks.albumUri && 1151 scrobble.scrobbles 1152 ? `Scrobble found after ${chalk.magenta(tries + 1)} tries` 1153 - : `Scrobble not found, trying again: ${chalk.magenta(tries + 1)}` 1154 - ) 1155 ), 1156 - Effect.delay("1 second") 1157 ), 1158 - } 1159 ), 1160 Effect.tap(({ tries, scrobble }) => 1161 tries >= 30 && ··· 1169 scrobble.tracks.albumUri 1170 ) 1171 ? Effect.logError( 1172 - `Scrobble not found after ${chalk.magenta("30 tries")}` 1173 ) 1174 - : Effect.succeed(undefined) 1175 ), 1176 - Effect.map(({ scrobble }) => scrobble) 1177 ); 1178 1179 export const scrobbleTrack = ( 1180 ctx: Context, 1181 track: Track, 1182 agent: Agent, 1183 - userDid: string 1184 ) => 1185 pipe( 1186 computeTrackHash(track), ··· 1193 Effect.flatMap(() => ensureAlbum(ctx, track, agent, userDid)), 1194 Effect.flatMap(() => ensureArtist(ctx, track, agent, userDid)), 1195 Effect.flatMap(() => 1196 - retryFetchTrack(ctx, trackHash, existingTrack) 1197 ), 1198 Effect.flatMap(() => 1199 pipe( ··· 1213 ? pipe( 1214 publishScrobble(ctx, scrobble.scrobbles.id), 1215 Effect.tap(() => 1216 - Effect.logInfo("Scrobble published") 1217 - ) 1218 ) 1219 - : Effect.succeed(undefined) 1220 - ) 1221 - ) 1222 - ) 1223 - ) 1224 - ) 1225 - ) 1226 - ) 1227 - ) 1228 - ) 1229 );
··· 38 pipe( 39 scrobbleTrack(ctx, track, agent, did), 40 Effect.tap(() => 41 + Effect.logInfo(`Scrobble created for ${chalk.cyan(track.title)}`), 42 + ), 43 + ), 44 ), 45 Effect.flatMap(presentation), 46 Effect.retry({ times: 3 }), ··· 48 Effect.catchAll((err) => { 49 console.error(err); 50 return Effect.succeed({}); 51 + }), 52 ); 53 server.app.rocksky.scrobble.createScrobble({ 54 auth: ctx.authVerifier, ··· 82 ctx, 83 did, 84 input, 85 + })), 86 ), 87 Match.orElse(() => { 88 throw new Error("Authentication required to create a scrobble"); 89 + }), 90 ), 91 catch: (error) => new Error(`Failed to create agent: ${error}`), 92 }); ··· 138 Effect.flatMap(([imageBuffer, options]) => 139 pipe( 140 Effect.tryPromise(() => agent.uploadBlob(imageBuffer, options)), 141 + Effect.map((uploadResponse) => uploadResponse.data.blob), 142 + ), 143 ), 144 + Effect.catchAll(() => Effect.succeed(undefined as BlobRef | undefined)), 145 ); 146 147 const putRecord = <T>( 148 agent: Agent, 149 collection: string, 150 record: T, 151 + validate: (record: T) => { success: boolean }, 152 ) => 153 pipe( 154 Effect.succeed(record), 155 Effect.filterOrFail( 156 (rec) => validate(rec).success, 157 + () => new Error("Invalid record"), 158 ), 159 Effect.flatMap(() => 160 pipe( ··· 167 rkey, 168 record, 169 validate: false, 170 + }), 171 + ), 172 ), 173 Effect.tap((res) => 174 + Effect.logInfo(`Record created at ${res.data.uri}`), 175 ), 176 + Effect.map((res) => res.data.uri), 177 + ), 178 ), 179 Effect.catchAll((error) => { 180 console.error(`Error creating ${collection} record`, error); 181 return Effect.succeed(null); 182 + }), 183 ); 184 185 const putArtistRecord = (track: Track, agent: Agent) => ··· 195 tags: track.genres, 196 })), 197 Effect.flatMap((record) => 198 + putRecord(agent, "app.rocksky.artist", record, Artist.validateRecord), 199 + ), 200 ); 201 202 const putAlbumRecord = (track: Track, agent: Agent) => ··· 204 Match.value(track.albumArt).pipe( 205 Match.when( 206 (url) => !!url, 207 + (url) => uploadImage(url, agent), 208 ), 209 + Match.orElse(() => Effect.succeed(undefined as BlobRef | undefined)), 210 ), 211 Effect.map((albumArt) => ({ 212 $type: "app.rocksky.album", ··· 220 albumArt, 221 })), 222 Effect.flatMap((record) => 223 + putRecord(agent, "app.rocksky.album", record, Album.validateRecord), 224 + ), 225 ); 226 227 const putSongRecord = (track: Track, agent: Agent) => ··· 229 Match.value(track.albumArt).pipe( 230 Match.when( 231 (url) => !!url, 232 + (url) => uploadImage(url, agent), 233 ), 234 + Match.orElse(() => Effect.succeed(undefined as BlobRef | undefined)), 235 ), 236 Effect.map((albumArt) => ({ 237 $type: "app.rocksky.song", ··· 254 spotifyLink: track.spotifyLink ?? undefined, 255 })), 256 Effect.flatMap((record) => 257 + putRecord(agent, "app.rocksky.song", record, Song.validateRecord), 258 + ), 259 ); 260 261 const putScrobbleRecord = (track: Track, agent: Agent) => ··· 263 Match.value(track.albumArt).pipe( 264 Match.when( 265 (url) => !!url, 266 + (url) => uploadImage(url, agent), 267 ), 268 + Match.orElse(() => Effect.succeed(undefined as BlobRef | undefined)), 269 ), 270 Effect.map((albumArt) => ({ 271 $type: "app.rocksky.scrobble", ··· 290 spotifyLink: track.spotifyLink ?? undefined, 291 })), 292 Effect.flatMap((record) => 293 + putRecord(agent, "app.rocksky.scrobble", record, Scrobble.validateRecord), 294 + ), 295 ); 296 297 const getScrobble = ({ ctx, id }: { ctx: Context; id: string }) => ··· 303 .leftJoin(tables.albums, eq(tables.albums.id, tables.scrobbles.albumId)) 304 .leftJoin( 305 tables.artists, 306 + eq(tables.artists.id, tables.scrobbles.artistId), 307 ) 308 .leftJoin(tables.users, eq(tables.users.id, tables.scrobbles.userId)) 309 .where(eq(tables.scrobbles.id, id)) 310 .execute() 311 + .then(([row]) => row), 312 ); 313 314 const getUserAlbum = ( ··· 318 artists: SelectArtist; 319 users: SelectUser; 320 tracks: SelectTrack; 321 + }, 322 ) => 323 Effect.tryPromise(() => 324 ctx.db ··· 326 .from(tables.userAlbums) 327 .where(eq(tables.userAlbums.albumId, scrobble.albums.id)) 328 .execute() 329 + .then(([row]) => row), 330 ); 331 332 const getUserArtist = ( ··· 336 artists: SelectArtist; 337 users: SelectUser; 338 tracks: SelectTrack; 339 + }, 340 ) => 341 Effect.tryPromise(() => 342 ctx.db ··· 344 .from(tables.userArtists) 345 .where(eq(tables.userArtists.id, scrobble.artists.id)) 346 .execute() 347 + .then(([row]) => row), 348 ); 349 350 const getUserTrack = ( ··· 354 artists: SelectArtist; 355 users: SelectUser; 356 tracks: SelectTrack; 357 + }, 358 ) => 359 Effect.tryPromise(() => 360 ctx.db ··· 362 .from(tables.userTracks) 363 .where(eq(tables.userTracks.id, scrobble.tracks.id)) 364 .execute() 365 + .then(([row]) => row), 366 ); 367 368 const getAlbumTrack = ( ··· 372 artists: SelectArtist; 373 users: SelectUser; 374 tracks: SelectTrack; 375 + }, 376 ) => 377 Effect.tryPromise(() => 378 ctx.db ··· 380 .from(tables.albumTracks) 381 .where(eq(tables.albumTracks.trackId, scrobble.tracks.id)) 382 .execute() 383 + .then(([row]) => row), 384 ); 385 386 const getArtistTrack = ( ··· 390 artists: SelectArtist; 391 users: SelectUser; 392 tracks: SelectTrack; 393 + }, 394 ) => 395 Effect.tryPromise(() => 396 ctx.db ··· 398 .from(tables.artistTracks) 399 .where(eq(tables.artistTracks.trackId, scrobble.tracks.id)) 400 .execute() 401 + .then(([row]) => row), 402 ); 403 404 const getArtistAlbum = ( ··· 408 artists: SelectArtist; 409 users: SelectUser; 410 tracks: SelectTrack; 411 + }, 412 ) => 413 Effect.tryPromise(() => 414 ctx.db ··· 417 .where( 418 and( 419 eq(tables.artistAlbums.albumId, scrobble.albums.id), 420 + eq(tables.artistAlbums.artistId, scrobble.artists.id), 421 + ), 422 ) 423 + .then(([row]) => row), 424 ); 425 426 const createUserArtist = ( ··· 430 artists: SelectArtist; 431 users: SelectUser; 432 tracks: SelectTrack; 433 + }, 434 ) => 435 pipe( 436 Effect.tryPromise(() => ··· 442 uri: scrobble.artists.uri, 443 scrobbles: 1, 444 } as InsertUserArtist) 445 + .execute(), 446 ), 447 Effect.flatMap(() => 448 Effect.tryPromise(() => ··· 451 .from(tables.userArtists) 452 .where(eq(tables.userArtists.artistId, scrobble.artists.id)) 453 .execute() 454 + .then(([row]) => row), 455 + ), 456 + ), 457 ); 458 459 const createUserAlbum = ( ··· 463 artists: SelectArtist; 464 users: SelectUser; 465 tracks: SelectTrack; 466 + }, 467 ) => 468 pipe( 469 Effect.tryPromise(() => ··· 475 uri: scrobble.albums.uri, 476 scrobbles: 1, 477 } as InsertUserAlbum) 478 + .execute(), 479 ), 480 Effect.flatMap(() => 481 Effect.tryPromise(() => ··· 484 .from(tables.userAlbums) 485 .where(eq(tables.userAlbums.albumId, scrobble.albums.id)) 486 .execute() 487 + .then(([row]) => row), 488 + ), 489 + ), 490 ); 491 492 const createUserTrack = ( ··· 496 artists: SelectArtist; 497 users: SelectUser; 498 tracks: SelectTrack; 499 + }, 500 ) => 501 pipe( 502 Effect.tryPromise(() => ··· 508 uri: scrobble.tracks.uri, 509 scrobbles: 1, 510 } as InsertUserTrack) 511 + .execute(), 512 ), 513 Effect.flatMap(() => 514 Effect.tryPromise(() => ··· 516 .select() 517 .from(tables.userTracks) 518 .where(eq(tables.userTracks.trackId, scrobble.tracks.id)) 519 + .then(([row]) => row), 520 + ), 521 + ), 522 ); 523 524 const publishScrobble = (ctx: Context, id: string) => ··· 689 xata_updatedat: artistAlbum.updatedAt.toISOString(), 690 xata_version: artistAlbum.xataVersion, 691 }, 692 + }), 693 + ), 694 + ), 695 + ), 696 + ), 697 ), 698 Effect.flatMap((data) => 699 Effect.try(() => 700 ctx.nc.publish( 701 "rocksky.scrobble", 702 Buffer.from( 703 + JSON.stringify(data).replaceAll("sha_256", "sha256"), 704 + ), 705 + ), 706 + ), 707 + ), 708 + ), 709 + ), 710 + ), 711 + ), 712 ); 713 714 const computeTrackHash = (track: Track): Effect.Effect<string, never> => 715 Effect.succeed( 716 createHash("sha256") 717 .update(`${track.title} - ${track.artist} - ${track.album}`.toLowerCase()) 718 + .digest("hex"), 719 ); 720 721 const computeAlbumHash = (track: Track): Effect.Effect<string, never> => 722 Effect.succeed( 723 createHash("sha256") 724 .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) 725 + .digest("hex"), 726 ); 727 728 const computeArtistHash = (track: Track): Effect.Effect<string, never> => 729 Effect.succeed( 730 + createHash("sha256").update(track.albumArtist.toLowerCase()).digest("hex"), 731 ); 732 733 const fetchExistingTrack = ( 734 ctx: Context, 735 + trackHash: string, 736 ): Effect.Effect<SelectTrack | undefined, Error> => 737 Effect.tryPromise(() => 738 ctx.db ··· 740 .from(tables.tracks) 741 .where(eq(tables.tracks.sha256, trackHash)) 742 .execute() 743 + .then(([row]) => row), 744 ); 745 746 // Update track metadata (album_uri and artist_uri) 747 const updateTrackMetadata = ( 748 ctx: Context, 749 track: Track, 750 + trackRecord: SelectTrack, 751 ) => 752 pipe( 753 Effect.succeed(trackRecord), ··· 762 .from(tables.albums) 763 .where(eq(tables.albums.sha256, albumHash)) 764 .execute() 765 + .then(([row]) => row), 766 + ), 767 ), 768 Effect.flatMap((album) => 769 album ··· 774 albumUri: album.uri, 775 }) 776 .where(eq(tables.tracks.id, trackRecord.id)) 777 + .execute(), 778 ) 779 + : Effect.succeed(undefined), 780 + ), 781 ) 782 + : Effect.succeed(undefined), 783 ), 784 Effect.tap((trackRecord) => 785 !trackRecord.artistUri ··· 792 .from(tables.artists) 793 .where(eq(tables.artists.sha256, artistHash)) 794 .execute() 795 + .then(([row]) => row), 796 + ), 797 ), 798 Effect.flatMap((artist) => 799 artist ··· 804 artistUri: artist.uri, 805 }) 806 .where(eq(tables.tracks.id, trackRecord.id)) 807 + .execute(), 808 ) 809 + : Effect.succeed(undefined), 810 + ), 811 ) 812 + : Effect.succeed(undefined), 813 + ), 814 ); 815 816 // Ensure track exists or create it ··· 819 track: Track, 820 agent: Agent, 821 userDid: string, 822 + existingTrack: SelectTrack | undefined, 823 ) => 824 pipe( 825 Effect.succeed(existingTrack), ··· 827 Match.value(trackOpt).pipe( 828 Match.when( 829 (value) => !!value, 830 + () => updateTrackMetadata(ctx, track, trackOpt), 831 ), 832 + Match.orElse(() => Effect.succeed(undefined)), 833 + ), 834 ), 835 Effect.flatMap((trackOpt) => 836 pipe( ··· 840 .from(tables.userTracks) 841 .leftJoin( 842 tables.tracks, 843 + eq(tables.userTracks.trackId, tables.tracks.id), 844 ) 845 .leftJoin( 846 tables.users, 847 + eq(tables.userTracks.userId, tables.users.id), 848 ) 849 .where( 850 and( 851 eq(tables.tracks.id, trackOpt?.id), 852 + eq(tables.users.did, userDid), 853 + ), 854 ) 855 .execute() 856 + .then(([row]) => row.user_tracks), 857 ), 858 Effect.flatMap((userTrack) => 859 Option.isNone(Option.fromNullable(userTrack)) || 860 !userTrack?.uri?.includes(userDid) 861 ? putSongRecord(track, agent) 862 + : Effect.succeed(null), 863 + ), 864 + ), 865 + ), 866 ); 867 868 // Ensure album exists or create it ··· 870 ctx: Context, 871 track: Track, 872 agent: Agent, 873 + userDid: string, 874 ) => 875 pipe( 876 computeAlbumHash(track), ··· 881 .from(tables.albums) 882 .where(eq(tables.albums.sha256, albumHash)) 883 .execute() 884 + .then(([row]) => row), 885 + ), 886 ), 887 Effect.flatMap((existingAlbum) => 888 pipe( ··· 894 .from(tables.userAlbums) 895 .leftJoin( 896 tables.albums, 897 + eq(tables.userAlbums.albumId, tables.albums.id), 898 ) 899 .leftJoin( 900 tables.users, 901 + eq(tables.userAlbums.userId, tables.users.id), 902 ) 903 .where( 904 and( 905 eq(tables.albums.id, album.id), 906 + eq(tables.users.did, userDid), 907 + ), 908 ) 909 .execute() 910 + .then(([row]) => row.user_albums), 911 + ), 912 ), 913 Effect.flatMap((userAlbum) => 914 Option.isNone(Option.fromNullable(existingAlbum)) || 915 Option.isNone(Option.fromNullable(userAlbum)) || 916 !userAlbum?.uri?.includes(userDid) 917 ? putAlbumRecord(track, agent) 918 + : Effect.succeed(null), 919 + ), 920 + ), 921 + ), 922 ); 923 924 // Ensure artist exists or create it ··· 926 ctx: Context, 927 track: Track, 928 agent: Agent, 929 + userDid: string, 930 ) => 931 pipe( 932 computeArtistHash(track), ··· 937 .from(tables.artists) 938 .where(eq(tables.artists.sha256, artistHash)) 939 .execute() 940 + .then(([row]) => row), 941 + ), 942 ), 943 Effect.flatMap((existingArtist) => 944 pipe( ··· 950 .from(tables.userArtists) 951 .leftJoin( 952 tables.artists, 953 + eq(tables.userArtists.artistId, tables.artists.id), 954 ) 955 .leftJoin( 956 tables.users, 957 + eq(tables.userArtists.userId, tables.users.id), 958 ) 959 .where( 960 and( 961 eq(tables.artists.id, artist.id), 962 + eq(tables.users.did, userDid), 963 + ), 964 ) 965 .execute() 966 + .then(([row]) => row.user_artists), 967 + ), 968 ), 969 Effect.flatMap((userArtist) => 970 Effect.if( ··· 974 { 975 onTrue: () => putArtistRecord(track, agent), 976 onFalse: () => Effect.succeed(null), 977 + }, 978 + ), 979 + ), 980 + ), 981 + ), 982 ); 983 984 // Retry fetching track until metadata is ready 985 const retryFetchTrack = ( 986 ctx: Context, 987 trackHash: string, 988 + initialTrack: SelectTrack | undefined, 989 ) => 990 pipe( 991 Effect.iterate( ··· 1001 .from(tables.tracks) 1002 .where(eq(tables.tracks.sha256, trackHash)) 1003 .execute() 1004 + .then(([row]) => row), 1005 ), 1006 Effect.flatMap((trackRecord) => 1007 Option.fromNullable(trackRecord).pipe( 1008 Effect.flatMap((track) => 1009 + updateTrackMetadata(ctx, track, trackRecord), 1010 + ), 1011 + ), 1012 ), 1013 Effect.tap((trackRecord) => 1014 Effect.logInfo( 1015 trackRecord 1016 ? `Track metadata ready: ${chalk.cyan(trackRecord.id)} - ${track.title}, after ${chalk.magenta(tries + 1)} tries` 1017 + : `Retrying track fetch: ${chalk.magenta(tries + 1)}`, 1018 + ), 1019 ), 1020 Effect.map((trackRecord) => ({ 1021 tries: tries + 1, 1022 track: trackRecord, 1023 })), 1024 + Effect.delay("1 second"), 1025 ), 1026 + }, 1027 ), 1028 Effect.tap(({ tries, track }) => 1029 tries >= 30 && !(track?.artistUri && track?.albumUri) 1030 ? Effect.logError( 1031 + `Track metadata not ready after ${chalk.magenta("30 tries")}`, 1032 ) 1033 + : Effect.succeed(undefined), 1034 ), 1035 + Effect.map(({ track }) => track), 1036 ); 1037 1038 // Retry fetching scrobble until complete ··· 1070 .from(tables.scrobbles) 1071 .leftJoin( 1072 tables.tracks, 1073 + eq(tables.scrobbles.trackId, tables.tracks.id), 1074 ) 1075 .leftJoin( 1076 tables.albums, 1077 + eq(tables.scrobbles.albumId, tables.albums.id), 1078 ) 1079 .leftJoin( 1080 tables.artists, 1081 + eq(tables.scrobbles.artistId, tables.artists.id), 1082 ) 1083 .leftJoin( 1084 tables.users, 1085 + eq(tables.scrobbles.userId, tables.users.id), 1086 ) 1087 .where(eq(tables.scrobbles.uri, scrobbleUri)) 1088 .execute() 1089 + .then(([row]) => row), 1090 ), 1091 Effect.tap((scrobble) => 1092 Effect.if( ··· 1103 artistUri: scrobble.artists.uri, 1104 }) 1105 .where(eq(tables.albums.id, scrobble.albums.id)) 1106 + .execute(), 1107 ), 1108 onFalse: () => Effect.succeed(undefined), 1109 + }, 1110 + ), 1111 ), 1112 Effect.flatMap(() => 1113 Effect.tryPromise(() => ··· 1116 .from(tables.scrobbles) 1117 .leftJoin( 1118 tables.tracks, 1119 + eq(tables.scrobbles.trackId, tables.tracks.id), 1120 ) 1121 .leftJoin( 1122 tables.albums, 1123 + eq(tables.scrobbles.albumId, tables.albums.id), 1124 ) 1125 .leftJoin( 1126 tables.artists, 1127 + eq(tables.scrobbles.artistId, tables.artists.id), 1128 ) 1129 .leftJoin( 1130 tables.users, 1131 + eq(tables.scrobbles.userId, tables.users.id), 1132 ) 1133 .where(eq(tables.scrobbles.uri, scrobbleUri)) 1134 .execute() 1135 + .then(([row]) => row), 1136 + ), 1137 ), 1138 Effect.map((scrobble) => ({ 1139 tries: tries + 1, ··· 1150 scrobble.tracks.albumUri && 1151 scrobble.scrobbles 1152 ? `Scrobble found after ${chalk.magenta(tries + 1)} tries` 1153 + : `Scrobble not found, trying again: ${chalk.magenta(tries + 1)}`, 1154 + ), 1155 ), 1156 + Effect.delay("1 second"), 1157 ), 1158 + }, 1159 ), 1160 Effect.tap(({ tries, scrobble }) => 1161 tries >= 30 && ··· 1169 scrobble.tracks.albumUri 1170 ) 1171 ? Effect.logError( 1172 + `Scrobble not found after ${chalk.magenta("30 tries")}`, 1173 ) 1174 + : Effect.succeed(undefined), 1175 ), 1176 + Effect.map(({ scrobble }) => scrobble), 1177 ); 1178 1179 export const scrobbleTrack = ( 1180 ctx: Context, 1181 track: Track, 1182 agent: Agent, 1183 + userDid: string, 1184 ) => 1185 pipe( 1186 computeTrackHash(track), ··· 1193 Effect.flatMap(() => ensureAlbum(ctx, track, agent, userDid)), 1194 Effect.flatMap(() => ensureArtist(ctx, track, agent, userDid)), 1195 Effect.flatMap(() => 1196 + retryFetchTrack(ctx, trackHash, existingTrack), 1197 ), 1198 Effect.flatMap(() => 1199 pipe( ··· 1213 ? pipe( 1214 publishScrobble(ctx, scrobble.scrobbles.id), 1215 Effect.tap(() => 1216 + Effect.logInfo("Scrobble published"), 1217 + ), 1218 ) 1219 + : Effect.succeed(undefined), 1220 + ), 1221 + ), 1222 + ), 1223 + ), 1224 + ), 1225 + ), 1226 + ), 1227 + ), 1228 + ), 1229 );
+2 -2
apps/api/src/xrpc/app/rocksky/scrobble/getScrobbles.ts
··· 21 Effect.catchAll((err) => { 22 console.error("Error retrieving scrobbles:", err); 23 return Effect.succeed({ scrobbles: [] }); 24 - }) 25 ); 26 server.app.rocksky.scrobble.getScrobbles({ 27 handler: async ({ params }) => { ··· 58 }; 59 60 const presentation = ( 61 - data: Scrobbles 62 ): Effect.Effect<{ scrobbles: ScrobbleViewBasic[] }, never> => { 63 return Effect.sync(() => ({ 64 scrobbles: data.map(({ scrobbles, tracks, users }) => ({
··· 21 Effect.catchAll((err) => { 22 console.error("Error retrieving scrobbles:", err); 23 return Effect.succeed({ scrobbles: [] }); 24 + }), 25 ); 26 server.app.rocksky.scrobble.getScrobbles({ 27 handler: async ({ params }) => { ··· 58 }; 59 60 const presentation = ( 61 + data: Scrobbles, 62 ): Effect.Effect<{ scrobbles: ScrobbleViewBasic[] }, never> => { 63 return Effect.sync(() => ({ 64 scrobbles: data.map(({ scrobbles, tracks, users }) => ({
+8 -2
apps/api/src/xrpc/app/rocksky/song/createSong.ts
··· 19 import tables from "schema"; 20 import type { InsertAlbumTrack, SelectAlbumTrack } from "schema/album-tracks"; 21 import type { SelectAlbum } from "schema/albums"; 22 - import type { InsertArtistAlbum, SelectArtistAlbum } from "schema/artist-albums"; 23 - import type { InsertArtistTrack, SelectArtistTrack } from "schema/artist-tracks"; 24 import type { SelectArtist } from "schema/artists"; 25 import type { SelectTrack } from "schema/tracks"; 26 import { type Track, trackSchema } from "types/track";
··· 19 import tables from "schema"; 20 import type { InsertAlbumTrack, SelectAlbumTrack } from "schema/album-tracks"; 21 import type { SelectAlbum } from "schema/albums"; 22 + import type { 23 + InsertArtistAlbum, 24 + SelectArtistAlbum, 25 + } from "schema/artist-albums"; 26 + import type { 27 + InsertArtistTrack, 28 + SelectArtistTrack, 29 + } from "schema/artist-tracks"; 30 import type { SelectArtist } from "schema/artists"; 31 import type { SelectTrack } from "schema/tracks"; 32 import { type Track, trackSchema } from "types/track";
+14 -14
apps/api/src/xrpc/app/rocksky/spotify/getCurrentlyPlaying.ts
··· 23 Effect.catchAll((err) => { 24 console.error(err); 25 return Effect.succeed({}); 26 - }) 27 ); 28 server.app.rocksky.spotify.getCurrentlyPlaying({ 29 auth: ctx.authVerifier, ··· 54 .where( 55 or( 56 eq(tables.users.did, params.actor || did), 57 - eq(tables.users.handle, params.actor || did) 58 - ) 59 ) 60 .execute() 61 .then((users) => ({ user: users[0], ctx, params, did })), ··· 90 .from(tables.spotifyAccounts) 91 .leftJoin( 92 tables.users, 93 - eq(tables.users.id, tables.spotifyAccounts.userId) 94 ) 95 .where( 96 or( 97 eq(tables.users.did, params.actor || did), 98 - eq(tables.users.handle, params.actor || did) 99 - ) 100 ) 101 .execute() 102 .then(([results]) => ({ ··· 129 Match.value(cached).pipe( 130 Match.when(null, () => ({})), 131 Match.when(undefined, () => ({})), 132 - Match.orElse(() => JSON.parse(cached)) 133 - ) 134 ) 135 .then((cached) => [cached, ctx, user]), 136 catch: (error) => ··· 143 try: async () => { 144 const sha256 = createHash("sha256") 145 .update( 146 - `${track.item.name} - ${track.item.artists.map((x) => x.name).join(", ")} - ${track.item.album.name}`.toLowerCase() 147 ) 148 .digest("hex"); 149 const [record] = await ctx.db ··· 156 .from(tables.lovedTracks) 157 .leftJoin( 158 tables.tracks, 159 - eq(tables.lovedTracks.trackId, tables.tracks.id) 160 ) 161 .leftJoin(tables.users, eq(tables.lovedTracks.userId, tables.users.id)) 162 .where( 163 - and(eq(tables.tracks.sha256, sha256), eq(tables.users.did, user.did)) 164 ) 165 .execute() 166 .then((results) => 167 Match.value(track).pipe( 168 Match.when( 169 (t) => !Object.keys(t).length, 170 - () => ({}) 171 ), 172 Match.orElse(() => ({ 173 ...track, ··· 175 artistUri: record?.artistUri, 176 albumUri: record?.albumUri, 177 liked: results.length > 0, 178 - })) 179 - ) 180 ); 181 }, 182 catch: (error) => new Error(`Failed to retrieve URI and likes: ${error}`),
··· 23 Effect.catchAll((err) => { 24 console.error(err); 25 return Effect.succeed({}); 26 + }), 27 ); 28 server.app.rocksky.spotify.getCurrentlyPlaying({ 29 auth: ctx.authVerifier, ··· 54 .where( 55 or( 56 eq(tables.users.did, params.actor || did), 57 + eq(tables.users.handle, params.actor || did), 58 + ), 59 ) 60 .execute() 61 .then((users) => ({ user: users[0], ctx, params, did })), ··· 90 .from(tables.spotifyAccounts) 91 .leftJoin( 92 tables.users, 93 + eq(tables.users.id, tables.spotifyAccounts.userId), 94 ) 95 .where( 96 or( 97 eq(tables.users.did, params.actor || did), 98 + eq(tables.users.handle, params.actor || did), 99 + ), 100 ) 101 .execute() 102 .then(([results]) => ({ ··· 129 Match.value(cached).pipe( 130 Match.when(null, () => ({})), 131 Match.when(undefined, () => ({})), 132 + Match.orElse(() => JSON.parse(cached)), 133 + ), 134 ) 135 .then((cached) => [cached, ctx, user]), 136 catch: (error) => ··· 143 try: async () => { 144 const sha256 = createHash("sha256") 145 .update( 146 + `${track.item.name} - ${track.item.artists.map((x) => x.name).join(", ")} - ${track.item.album.name}`.toLowerCase(), 147 ) 148 .digest("hex"); 149 const [record] = await ctx.db ··· 156 .from(tables.lovedTracks) 157 .leftJoin( 158 tables.tracks, 159 + eq(tables.lovedTracks.trackId, tables.tracks.id), 160 ) 161 .leftJoin(tables.users, eq(tables.lovedTracks.userId, tables.users.id)) 162 .where( 163 + and(eq(tables.tracks.sha256, sha256), eq(tables.users.did, user.did)), 164 ) 165 .execute() 166 .then((results) => 167 Match.value(track).pipe( 168 Match.when( 169 (t) => !Object.keys(t).length, 170 + () => ({}), 171 ), 172 Match.orElse(() => ({ 173 ...track, ··· 175 artistUri: record?.artistUri, 176 albumUri: record?.albumUri, 177 liked: results.length > 0, 178 + })), 179 + ), 180 ); 181 }, 182 catch: (error) => new Error(`Failed to retrieve URI and likes: ${error}`),
+2 -2
apps/api/src/xrpc/app/rocksky/spotify/next.ts
··· 23 Effect.catchAll((err) => { 24 console.error(err); 25 return Effect.succeed({}); 26 - }) 27 ); 28 server.app.rocksky.spotify.next({ 29 auth: ctx.authVerifier, ··· 72 .where(eq(tables.spotifyTokens.userId, user.id)) 73 .execute() 74 .then(([spotifyToken]) => 75 - decrypt(spotifyToken.refreshToken, env.SPOTIFY_ENCRYPTION_KEY) 76 ) 77 .then((refreshToken) => ({ 78 user,
··· 23 Effect.catchAll((err) => { 24 console.error(err); 25 return Effect.succeed({}); 26 + }), 27 ); 28 server.app.rocksky.spotify.next({ 29 auth: ctx.authVerifier, ··· 72 .where(eq(tables.spotifyTokens.userId, user.id)) 73 .execute() 74 .then(([spotifyToken]) => 75 + decrypt(spotifyToken.refreshToken, env.SPOTIFY_ENCRYPTION_KEY), 76 ) 77 .then((refreshToken) => ({ 78 user,
+2 -2
apps/api/src/xrpc/app/rocksky/spotify/pause.ts
··· 23 Effect.catchAll((err) => { 24 console.error(err); 25 return Effect.succeed({}); 26 - }) 27 ); 28 server.app.rocksky.spotify.pause({ 29 auth: ctx.authVerifier, ··· 72 .where(eq(tables.spotifyTokens.userId, user.id)) 73 .execute() 74 .then(([spotifyToken]) => 75 - decrypt(spotifyToken.refreshToken, env.SPOTIFY_ENCRYPTION_KEY) 76 ) 77 .then((refreshToken) => ({ 78 user,
··· 23 Effect.catchAll((err) => { 24 console.error(err); 25 return Effect.succeed({}); 26 + }), 27 ); 28 server.app.rocksky.spotify.pause({ 29 auth: ctx.authVerifier, ··· 72 .where(eq(tables.spotifyTokens.userId, user.id)) 73 .execute() 74 .then(([spotifyToken]) => 75 + decrypt(spotifyToken.refreshToken, env.SPOTIFY_ENCRYPTION_KEY), 76 ) 77 .then((refreshToken) => ({ 78 user,
+2 -2
apps/api/src/xrpc/app/rocksky/spotify/play.ts
··· 23 Effect.catchAll((err) => { 24 console.error(err); 25 return Effect.succeed({}); 26 - }) 27 ); 28 server.app.rocksky.spotify.play({ 29 auth: ctx.authVerifier, ··· 72 .where(eq(tables.spotifyTokens.userId, user.id)) 73 .execute() 74 .then(([spotifyToken]) => 75 - decrypt(spotifyToken.refreshToken, env.SPOTIFY_ENCRYPTION_KEY) 76 ) 77 .then((refreshToken) => ({ 78 user,
··· 23 Effect.catchAll((err) => { 24 console.error(err); 25 return Effect.succeed({}); 26 + }), 27 ); 28 server.app.rocksky.spotify.play({ 29 auth: ctx.authVerifier, ··· 72 .where(eq(tables.spotifyTokens.userId, user.id)) 73 .execute() 74 .then(([spotifyToken]) => 75 + decrypt(spotifyToken.refreshToken, env.SPOTIFY_ENCRYPTION_KEY), 76 ) 77 .then((refreshToken) => ({ 78 user,
+2 -2
apps/api/src/xrpc/app/rocksky/spotify/previous.ts
··· 23 Effect.catchAll((err) => { 24 console.error(err); 25 return Effect.succeed({}); 26 - }) 27 ); 28 server.app.rocksky.spotify.previous({ 29 auth: ctx.authVerifier, ··· 72 .where(eq(tables.spotifyTokens.userId, user.id)) 73 .execute() 74 .then(([spotifyToken]) => 75 - decrypt(spotifyToken.refreshToken, env.SPOTIFY_ENCRYPTION_KEY) 76 ) 77 .then((refreshToken) => ({ 78 refreshToken,
··· 23 Effect.catchAll((err) => { 24 console.error(err); 25 return Effect.succeed({}); 26 + }), 27 ); 28 server.app.rocksky.spotify.previous({ 29 auth: ctx.authVerifier, ··· 72 .where(eq(tables.spotifyTokens.userId, user.id)) 73 .execute() 74 .then(([spotifyToken]) => 75 + decrypt(spotifyToken.refreshToken, env.SPOTIFY_ENCRYPTION_KEY), 76 ) 77 .then((refreshToken) => ({ 78 refreshToken,