diff --git a/apps/api/biome.json b/apps/api/biome.json new file mode 100644 index 00000000..29daa5ec --- /dev/null +++ b/apps/api/biome.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.2.3/schema.json", + "vcs": { + "enabled": false, + "clientKind": "git", + "useIgnoreFile": false + }, + "files": { + "ignoreUnknown": false + }, + "formatter": { + "enabled": true, + "indentStyle": "space" + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + }, + "javascript": { + "formatter": { + "quoteStyle": "double" + } + }, + "assist": { + "enabled": true, + "actions": { + "source": { + "organizeImports": "on" + } + } + } +} \ No newline at end of file diff --git a/apps/api/lexicons/player/addDirectoryToQueue.json b/apps/api/lexicons/player/addDirectoryToQueue.json new file mode 100644 index 00000000..fedada50 --- /dev/null +++ b/apps/api/lexicons/player/addDirectoryToQueue.json @@ -0,0 +1,33 @@ +{ + "lexicon": 1, + "id": "app.rocksky.player.addDirectoryToQueue", + "defs": { + "main": { + "type": "procedure", + "description": "Add directory to the player's queue", + "parameters": { + "type": "params", + "required": [ + "directory" + ], + "properties": { + "playerId": { + "type": "string" + }, + "directory": { + "type": "string", + "description": "The directory to add to the queue" + }, + "position": { + "type": "integer", + "description": "Position in the queue to insert the directory at, defaults to the end if not specified" + }, + "shuffle": { + "type": "boolean", + "description": "Whether to shuffle the added directory in the queue" + } + } + } + } + } +} diff --git a/apps/api/package.json b/apps/api/package.json index 004fbc46..2c7dc3e8 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -19,7 +19,9 @@ "prod:xrpc": "tsx ./src/server.ts", "db:migrate": "drizzle-kit migrate", "db:gen-migration": "drizzle-kit generate", - "prod:all": "concurrently 'tsx ./src/index.ts' 'tsx ./src/server.ts'" + "prod:all": "concurrently 'tsx ./src/index.ts' 'tsx ./src/server.ts'", + "format": "biome format src", + "lint": "biome lint src" }, "dependencies": { "@atproto/api": "^0.13.31", @@ -74,6 +76,7 @@ "zod": "^3.24.1" }, "devDependencies": { + "@biomejs/biome": "^2.2.3", "@pkl-community/pkl": "^0.28.2", "@types/express": "^5.0.2", "@types/lodash": "^4.17.17", diff --git a/apps/api/pkl/defs/player/addDirectoryToQueue.pkl b/apps/api/pkl/defs/player/addDirectoryToQueue.pkl new file mode 100644 index 00000000..e540e86d --- /dev/null +++ b/apps/api/pkl/defs/player/addDirectoryToQueue.pkl @@ -0,0 +1,31 @@ +amends "../../schema/lexicon.pkl" + +lexicon = 1 +id = "app.rocksky.player.addDirectoryToQueue" +defs = new Mapping { + ["main"] { + type = "procedure" + description = "Add directory to the player's queue" + parameters { + type = "params" + required = List("directory") + properties { + ["playerId"] = new StringType { + type = "string" + } + ["directory"] = new StringType { + type = "string" + description = "The directory to add to the queue" + } + ["position"] = new IntegerType { + type = "integer" + description = "Position in the queue to insert the directory at, defaults to the end if not specified" + } + ["shuffle"] = new BooleanType { + type = "boolean" + description = "Whether to shuffle the added directory in the queue" + } + } + } + } +} \ No newline at end of file diff --git a/apps/api/src/apikeys/app.ts b/apps/api/src/apikeys/app.ts index c5377754..671111ff 100644 --- a/apps/api/src/apikeys/app.ts +++ b/apps/api/src/apikeys/app.ts @@ -114,7 +114,7 @@ app.put("/:id", async (c) => { .update(tables.apiKeys) .set(data) .where( - and(eq(tables.apiKeys.id, id), eq(tables.apiKeys.userId, user.xata_id)) + and(eq(tables.apiKeys.id, id), eq(tables.apiKeys.userId, user.xata_id)), ) .execute(); @@ -150,7 +150,7 @@ app.delete("/:id", async (c) => { await ctx.db .delete(tables.apiKeys) .where( - and(eq(tables.apiKeys.id, id), eq(tables.apiKeys.userId, user.xata_id)) + and(eq(tables.apiKeys.id, id), eq(tables.apiKeys.userId, user.xata_id)), ) .execute(); diff --git a/apps/api/src/auth/client.ts b/apps/api/src/auth/client.ts index efb05533..41f4f081 100644 --- a/apps/api/src/auth/client.ts +++ b/apps/api/src/auth/client.ts @@ -14,7 +14,7 @@ export const createClient = async (db: Database) => { client_id: publicUrl ? `${url}/client-metadata.json` : `http://localhost?redirect_uri=${enc( - `${url}/oauth/callback` + `${url}/oauth/callback`, )}&scope=${enc("atproto transition:generic")}`, client_uri: url, redirect_uris: [`${url}/oauth/callback`], diff --git a/apps/api/src/bsky/app.ts b/apps/api/src/bsky/app.ts index 772b9dc5..f408372f 100644 --- a/apps/api/src/bsky/app.ts +++ b/apps/api/src/bsky/app.ts @@ -1,4 +1,4 @@ -import { BlobRef } from "@atproto/lexicon"; +import type { BlobRef } from "@atproto/lexicon"; import { isValidHandle } from "@atproto/syntax"; import { equals } from "@xata.io/client"; import { ctx } from "context"; @@ -77,7 +77,7 @@ app.get("/oauth/callback", async (c) => { ? Math.floor(Date.now() / 1000) + 60 * 60 * 24 * 365 * 1000 : Math.floor(Date.now() / 1000) + 60 * 60 * 24 * 7, }, - env.JWT_SECRET + env.JWT_SECRET, ); ctx.kv.set(did, token); } catch (err) { diff --git a/apps/api/src/db.ts b/apps/api/src/db.ts index c0ffeb29..502cf758 100644 --- a/apps/api/src/db.ts +++ b/apps/api/src/db.ts @@ -1,8 +1,8 @@ import SqliteDb from "better-sqlite3"; import { Kysely, - Migration, - MigrationProvider, + type Migration, + type MigrationProvider, Migrator, SqliteDialect, } from "kysely"; diff --git a/apps/api/src/dropbox/app.ts b/apps/api/src/dropbox/app.ts index 376f65b8..17826afc 100644 --- a/apps/api/src/dropbox/app.ts +++ b/apps/api/src/dropbox/app.ts @@ -47,7 +47,7 @@ app.get("/oauth/callback", async (c) => { client_id: env.DROPBOX_CLIENT_ID, client_secret: env.DROPBOX_CLIENT_SECRET, redirect_uri: env.DROPBOX_REDIRECT_URI, - } + }, ); const dropbox = await ctx.client.db.dropbox @@ -60,9 +60,9 @@ app.get("/oauth/callback", async (c) => { { refresh_token: encrypt( response.data.refresh_token, - env.SPOTIFY_ENCRYPTION_KEY + env.SPOTIFY_ENCRYPTION_KEY, ), - } + }, ); await ctx.client.db.dropbox.createOrUpdate(dropbox?.xata_id, { @@ -305,11 +305,11 @@ app.get("/download", async (c) => { c.header( "Content-Type", - response.headers["content-type"] || "application/octet-stream" + response.headers["content-type"] || "application/octet-stream", ); c.header( "Content-Disposition", - response.headers["content-disposition"] || "attachment" + response.headers["content-disposition"] || "attachment", ); return new Response(response.data, { diff --git a/apps/api/src/googledrive/app.ts b/apps/api/src/googledrive/app.ts index 94c59967..62f6745f 100644 --- a/apps/api/src/googledrive/app.ts +++ b/apps/api/src/googledrive/app.ts @@ -32,13 +32,13 @@ app.get("/login", async (c) => { } const credentials = JSON.parse( - fs.readFileSync("credentials.json").toString("utf-8") + fs.readFileSync("credentials.json").toString("utf-8"), ); const { client_id, client_secret } = credentials.installed || credentials.web; const oAuth2Client = new google.auth.OAuth2( client_id, client_secret, - env.GOOGLE_REDIRECT_URI + env.GOOGLE_REDIRECT_URI, ); // Generate Auth URL @@ -60,7 +60,7 @@ app.get("/oauth/callback", async (c) => { const entries = Object.fromEntries(params.entries()); const credentials = JSON.parse( - fs.readFileSync("credentials.json").toString("utf-8") + fs.readFileSync("credentials.json").toString("utf-8"), ); const { client_id, client_secret } = credentials.installed || credentials.web; @@ -83,9 +83,9 @@ app.get("/oauth/callback", async (c) => { { refresh_token: encrypt( response.data.refresh_token, - env.SPOTIFY_ENCRYPTION_KEY + env.SPOTIFY_ENCRYPTION_KEY, ), - } + }, ); await ctx.client.db.google_drive.createOrUpdate(googledrive?.xata_id, { @@ -181,7 +181,7 @@ app.get("/files", async (c) => { { did, parent_id, - } + }, ); return c.json(data); } @@ -202,7 +202,7 @@ app.get("/files", async (c) => { { did, parent_id: response.data.files[0].id, - } + }, ); return c.json(data); } catch (error) { @@ -210,14 +210,14 @@ app.get("/files", async (c) => { console.error("Axios error:", error.response?.data || error.message); const credentials = JSON.parse( - fs.readFileSync("credentials.json").toString("utf-8") + fs.readFileSync("credentials.json").toString("utf-8"), ); const { client_id, client_secret } = credentials.installed || credentials.web; const oAuth2Client = new google.auth.OAuth2( client_id, client_secret, - env.GOOGLE_REDIRECT_URI + env.GOOGLE_REDIRECT_URI, ); // Generate Auth URL @@ -294,11 +294,11 @@ app.get("/files/:id/download", async (c) => { c.header( "Content-Type", - response.headers["content-type"] || "application/octet-stream" + response.headers["content-type"] || "application/octet-stream", ); c.header( "Content-Disposition", - response.headers["content-disposition"] || "attachment" + response.headers["content-disposition"] || "attachment", ); return new Response(response.data, { diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index dee0f4ca..2246f8aa 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -41,7 +41,7 @@ app.use( rateLimiter({ limit: 1000, window: 30, // 👈 30 seconds - }) + }), ); app.use("*", async (c, next) => { @@ -149,7 +149,7 @@ app.get("/now-playing", async (c) => { ctx.redis.get(`nowplaying:${user.did}:status`), ]); return c.json( - nowPlaying ? { ...JSON.parse(nowPlaying), is_playing: status === "1" } : {} + nowPlaying ? { ...JSON.parse(nowPlaying), is_playing: status === "1" } : {}, ); }); @@ -280,7 +280,7 @@ app.get("/public/scrobbles", async (c) => { listeners: 1, sha256: item.track_id.sha256, id: item.xata_id, - })) + })), ); }); diff --git a/apps/api/src/lexicon/index.ts b/apps/api/src/lexicon/index.ts index 858828db..4542d508 100644 --- a/apps/api/src/lexicon/index.ts +++ b/apps/api/src/lexicon/index.ts @@ -7,154 +7,155 @@ import { Options as XrpcOptions, AuthVerifier, StreamAuthVerifier, -} from '@atproto/xrpc-server' -import { schemas } from './lexicons' -import * as AppRockskyActorGetActorAlbums from './types/app/rocksky/actor/getActorAlbums' -import * as AppRockskyActorGetActorArtists from './types/app/rocksky/actor/getActorArtists' -import * as AppRockskyActorGetActorLovedSongs from './types/app/rocksky/actor/getActorLovedSongs' -import * as AppRockskyActorGetActorPlaylists from './types/app/rocksky/actor/getActorPlaylists' -import * as AppRockskyActorGetActorScrobbles from './types/app/rocksky/actor/getActorScrobbles' -import * as AppRockskyActorGetActorSongs from './types/app/rocksky/actor/getActorSongs' -import * as AppRockskyActorGetProfile from './types/app/rocksky/actor/getProfile' -import * as AppRockskyAlbumGetAlbum from './types/app/rocksky/album/getAlbum' -import * as AppRockskyAlbumGetAlbums from './types/app/rocksky/album/getAlbums' -import * as AppRockskyAlbumGetAlbumTracks from './types/app/rocksky/album/getAlbumTracks' -import * as AppRockskyApikeyCreateApikey from './types/app/rocksky/apikey/createApikey' -import * as AppRockskyApikeyGetApikeys from './types/app/rocksky/apikey/getApikeys' -import * as AppRockskyApikeyRemoveApikey from './types/app/rocksky/apikey/removeApikey' -import * as AppRockskyApikeyUpdateApikey from './types/app/rocksky/apikey/updateApikey' -import * as AppRockskyArtistGetArtistAlbums from './types/app/rocksky/artist/getArtistAlbums' -import * as AppRockskyArtistGetArtist from './types/app/rocksky/artist/getArtist' -import * as AppRockskyArtistGetArtists from './types/app/rocksky/artist/getArtists' -import * as AppRockskyArtistGetArtistTracks from './types/app/rocksky/artist/getArtistTracks' -import * as AppRockskyChartsGetScrobblesChart from './types/app/rocksky/charts/getScrobblesChart' -import * as AppRockskyDropboxDownloadFile from './types/app/rocksky/dropbox/downloadFile' -import * as AppRockskyDropboxGetFiles from './types/app/rocksky/dropbox/getFiles' -import * as AppRockskyDropboxGetMetadata from './types/app/rocksky/dropbox/getMetadata' -import * as AppRockskyDropboxGetTemporaryLink from './types/app/rocksky/dropbox/getTemporaryLink' -import * as AppRockskyFeedGetNowPlayings from './types/app/rocksky/feed/getNowPlayings' -import * as AppRockskyFeedSearch from './types/app/rocksky/feed/search' -import * as AppRockskyGoogledriveDownloadFile from './types/app/rocksky/googledrive/downloadFile' -import * as AppRockskyGoogledriveGetFile from './types/app/rocksky/googledrive/getFile' -import * as AppRockskyGoogledriveGetFiles from './types/app/rocksky/googledrive/getFiles' -import * as AppRockskyLikeDislikeShout from './types/app/rocksky/like/dislikeShout' -import * as AppRockskyLikeDislikeSong from './types/app/rocksky/like/dislikeSong' -import * as AppRockskyLikeLikeShout from './types/app/rocksky/like/likeShout' -import * as AppRockskyLikeLikeSong from './types/app/rocksky/like/likeSong' -import * as AppRockskyPlayerAddItemsToQueue from './types/app/rocksky/player/addItemsToQueue' -import * as AppRockskyPlayerGetCurrentlyPlaying from './types/app/rocksky/player/getCurrentlyPlaying' -import * as AppRockskyPlayerGetPlaybackQueue from './types/app/rocksky/player/getPlaybackQueue' -import * as AppRockskyPlayerNext from './types/app/rocksky/player/next' -import * as AppRockskyPlayerPause from './types/app/rocksky/player/pause' -import * as AppRockskyPlayerPlayDirectory from './types/app/rocksky/player/playDirectory' -import * as AppRockskyPlayerPlayFile from './types/app/rocksky/player/playFile' -import * as AppRockskyPlayerPlay from './types/app/rocksky/player/play' -import * as AppRockskyPlayerPrevious from './types/app/rocksky/player/previous' -import * as AppRockskyPlayerSeek from './types/app/rocksky/player/seek' -import * as AppRockskyPlaylistCreatePlaylist from './types/app/rocksky/playlist/createPlaylist' -import * as AppRockskyPlaylistGetPlaylist from './types/app/rocksky/playlist/getPlaylist' -import * as AppRockskyPlaylistGetPlaylists from './types/app/rocksky/playlist/getPlaylists' -import * as AppRockskyPlaylistInsertDirectory from './types/app/rocksky/playlist/insertDirectory' -import * as AppRockskyPlaylistInsertFiles from './types/app/rocksky/playlist/insertFiles' -import * as AppRockskyPlaylistRemovePlaylist from './types/app/rocksky/playlist/removePlaylist' -import * as AppRockskyPlaylistRemoveTrack from './types/app/rocksky/playlist/removeTrack' -import * as AppRockskyPlaylistStartPlaylist from './types/app/rocksky/playlist/startPlaylist' -import * as AppRockskyScrobbleCreateScrobble from './types/app/rocksky/scrobble/createScrobble' -import * as AppRockskyScrobbleGetScrobble from './types/app/rocksky/scrobble/getScrobble' -import * as AppRockskyScrobbleGetScrobbles from './types/app/rocksky/scrobble/getScrobbles' -import * as AppRockskyShoutCreateShout from './types/app/rocksky/shout/createShout' -import * as AppRockskyShoutGetAlbumShouts from './types/app/rocksky/shout/getAlbumShouts' -import * as AppRockskyShoutGetArtistShouts from './types/app/rocksky/shout/getArtistShouts' -import * as AppRockskyShoutGetProfileShouts from './types/app/rocksky/shout/getProfileShouts' -import * as AppRockskyShoutGetShoutReplies from './types/app/rocksky/shout/getShoutReplies' -import * as AppRockskyShoutGetTrackShouts from './types/app/rocksky/shout/getTrackShouts' -import * as AppRockskyShoutRemoveShout from './types/app/rocksky/shout/removeShout' -import * as AppRockskyShoutReplyShout from './types/app/rocksky/shout/replyShout' -import * as AppRockskyShoutReportShout from './types/app/rocksky/shout/reportShout' -import * as AppRockskySongCreateSong from './types/app/rocksky/song/createSong' -import * as AppRockskySongGetSong from './types/app/rocksky/song/getSong' -import * as AppRockskySongGetSongs from './types/app/rocksky/song/getSongs' -import * as AppRockskySpotifyGetCurrentlyPlaying from './types/app/rocksky/spotify/getCurrentlyPlaying' -import * as AppRockskySpotifyNext from './types/app/rocksky/spotify/next' -import * as AppRockskySpotifyPause from './types/app/rocksky/spotify/pause' -import * as AppRockskySpotifyPlay from './types/app/rocksky/spotify/play' -import * as AppRockskySpotifyPrevious from './types/app/rocksky/spotify/previous' -import * as AppRockskySpotifySeek from './types/app/rocksky/spotify/seek' -import * as AppRockskyStatsGetStats from './types/app/rocksky/stats/getStats' +} from "@atproto/xrpc-server"; +import { schemas } from "./lexicons"; +import * as AppRockskyActorGetActorAlbums from "./types/app/rocksky/actor/getActorAlbums"; +import * as AppRockskyActorGetActorArtists from "./types/app/rocksky/actor/getActorArtists"; +import * as AppRockskyActorGetActorLovedSongs from "./types/app/rocksky/actor/getActorLovedSongs"; +import * as AppRockskyActorGetActorPlaylists from "./types/app/rocksky/actor/getActorPlaylists"; +import * as AppRockskyActorGetActorScrobbles from "./types/app/rocksky/actor/getActorScrobbles"; +import * as AppRockskyActorGetActorSongs from "./types/app/rocksky/actor/getActorSongs"; +import * as AppRockskyActorGetProfile from "./types/app/rocksky/actor/getProfile"; +import * as AppRockskyAlbumGetAlbum from "./types/app/rocksky/album/getAlbum"; +import * as AppRockskyAlbumGetAlbums from "./types/app/rocksky/album/getAlbums"; +import * as AppRockskyAlbumGetAlbumTracks from "./types/app/rocksky/album/getAlbumTracks"; +import * as AppRockskyApikeyCreateApikey from "./types/app/rocksky/apikey/createApikey"; +import * as AppRockskyApikeyGetApikeys from "./types/app/rocksky/apikey/getApikeys"; +import * as AppRockskyApikeyRemoveApikey from "./types/app/rocksky/apikey/removeApikey"; +import * as AppRockskyApikeyUpdateApikey from "./types/app/rocksky/apikey/updateApikey"; +import * as AppRockskyArtistGetArtistAlbums from "./types/app/rocksky/artist/getArtistAlbums"; +import * as AppRockskyArtistGetArtist from "./types/app/rocksky/artist/getArtist"; +import * as AppRockskyArtistGetArtists from "./types/app/rocksky/artist/getArtists"; +import * as AppRockskyArtistGetArtistTracks from "./types/app/rocksky/artist/getArtistTracks"; +import * as AppRockskyChartsGetScrobblesChart from "./types/app/rocksky/charts/getScrobblesChart"; +import * as AppRockskyDropboxDownloadFile from "./types/app/rocksky/dropbox/downloadFile"; +import * as AppRockskyDropboxGetFiles from "./types/app/rocksky/dropbox/getFiles"; +import * as AppRockskyDropboxGetMetadata from "./types/app/rocksky/dropbox/getMetadata"; +import * as AppRockskyDropboxGetTemporaryLink from "./types/app/rocksky/dropbox/getTemporaryLink"; +import * as AppRockskyFeedGetNowPlayings from "./types/app/rocksky/feed/getNowPlayings"; +import * as AppRockskyFeedSearch from "./types/app/rocksky/feed/search"; +import * as AppRockskyGoogledriveDownloadFile from "./types/app/rocksky/googledrive/downloadFile"; +import * as AppRockskyGoogledriveGetFile from "./types/app/rocksky/googledrive/getFile"; +import * as AppRockskyGoogledriveGetFiles from "./types/app/rocksky/googledrive/getFiles"; +import * as AppRockskyLikeDislikeShout from "./types/app/rocksky/like/dislikeShout"; +import * as AppRockskyLikeDislikeSong from "./types/app/rocksky/like/dislikeSong"; +import * as AppRockskyLikeLikeShout from "./types/app/rocksky/like/likeShout"; +import * as AppRockskyLikeLikeSong from "./types/app/rocksky/like/likeSong"; +import * as AppRockskyPlayerAddDirectoryToQueue from "./types/app/rocksky/player/addDirectoryToQueue"; +import * as AppRockskyPlayerAddItemsToQueue from "./types/app/rocksky/player/addItemsToQueue"; +import * as AppRockskyPlayerGetCurrentlyPlaying from "./types/app/rocksky/player/getCurrentlyPlaying"; +import * as AppRockskyPlayerGetPlaybackQueue from "./types/app/rocksky/player/getPlaybackQueue"; +import * as AppRockskyPlayerNext from "./types/app/rocksky/player/next"; +import * as AppRockskyPlayerPause from "./types/app/rocksky/player/pause"; +import * as AppRockskyPlayerPlayDirectory from "./types/app/rocksky/player/playDirectory"; +import * as AppRockskyPlayerPlayFile from "./types/app/rocksky/player/playFile"; +import * as AppRockskyPlayerPlay from "./types/app/rocksky/player/play"; +import * as AppRockskyPlayerPrevious from "./types/app/rocksky/player/previous"; +import * as AppRockskyPlayerSeek from "./types/app/rocksky/player/seek"; +import * as AppRockskyPlaylistCreatePlaylist from "./types/app/rocksky/playlist/createPlaylist"; +import * as AppRockskyPlaylistGetPlaylist from "./types/app/rocksky/playlist/getPlaylist"; +import * as AppRockskyPlaylistGetPlaylists from "./types/app/rocksky/playlist/getPlaylists"; +import * as AppRockskyPlaylistInsertDirectory from "./types/app/rocksky/playlist/insertDirectory"; +import * as AppRockskyPlaylistInsertFiles from "./types/app/rocksky/playlist/insertFiles"; +import * as AppRockskyPlaylistRemovePlaylist from "./types/app/rocksky/playlist/removePlaylist"; +import * as AppRockskyPlaylistRemoveTrack from "./types/app/rocksky/playlist/removeTrack"; +import * as AppRockskyPlaylistStartPlaylist from "./types/app/rocksky/playlist/startPlaylist"; +import * as AppRockskyScrobbleCreateScrobble from "./types/app/rocksky/scrobble/createScrobble"; +import * as AppRockskyScrobbleGetScrobble from "./types/app/rocksky/scrobble/getScrobble"; +import * as AppRockskyScrobbleGetScrobbles from "./types/app/rocksky/scrobble/getScrobbles"; +import * as AppRockskyShoutCreateShout from "./types/app/rocksky/shout/createShout"; +import * as AppRockskyShoutGetAlbumShouts from "./types/app/rocksky/shout/getAlbumShouts"; +import * as AppRockskyShoutGetArtistShouts from "./types/app/rocksky/shout/getArtistShouts"; +import * as AppRockskyShoutGetProfileShouts from "./types/app/rocksky/shout/getProfileShouts"; +import * as AppRockskyShoutGetShoutReplies from "./types/app/rocksky/shout/getShoutReplies"; +import * as AppRockskyShoutGetTrackShouts from "./types/app/rocksky/shout/getTrackShouts"; +import * as AppRockskyShoutRemoveShout from "./types/app/rocksky/shout/removeShout"; +import * as AppRockskyShoutReplyShout from "./types/app/rocksky/shout/replyShout"; +import * as AppRockskyShoutReportShout from "./types/app/rocksky/shout/reportShout"; +import * as AppRockskySongCreateSong from "./types/app/rocksky/song/createSong"; +import * as AppRockskySongGetSong from "./types/app/rocksky/song/getSong"; +import * as AppRockskySongGetSongs from "./types/app/rocksky/song/getSongs"; +import * as AppRockskySpotifyGetCurrentlyPlaying from "./types/app/rocksky/spotify/getCurrentlyPlaying"; +import * as AppRockskySpotifyNext from "./types/app/rocksky/spotify/next"; +import * as AppRockskySpotifyPause from "./types/app/rocksky/spotify/pause"; +import * as AppRockskySpotifyPlay from "./types/app/rocksky/spotify/play"; +import * as AppRockskySpotifyPrevious from "./types/app/rocksky/spotify/previous"; +import * as AppRockskySpotifySeek from "./types/app/rocksky/spotify/seek"; +import * as AppRockskyStatsGetStats from "./types/app/rocksky/stats/getStats"; export function createServer(options?: XrpcOptions): Server { - return new Server(options) + return new Server(options); } export class Server { - xrpc: XrpcServer - app: AppNS - com: ComNS + xrpc: XrpcServer; + app: AppNS; + com: ComNS; constructor(options?: XrpcOptions) { - this.xrpc = createXrpcServer(schemas, options) - this.app = new AppNS(this) - this.com = new ComNS(this) + this.xrpc = createXrpcServer(schemas, options); + this.app = new AppNS(this); + this.com = new ComNS(this); } } export class AppNS { - _server: Server - rocksky: AppRockskyNS - bsky: AppBskyNS + _server: Server; + rocksky: AppRockskyNS; + bsky: AppBskyNS; constructor(server: Server) { - this._server = server - this.rocksky = new AppRockskyNS(server) - this.bsky = new AppBskyNS(server) + this._server = server; + this.rocksky = new AppRockskyNS(server); + this.bsky = new AppBskyNS(server); } } export class AppRockskyNS { - _server: Server - actor: AppRockskyActorNS - album: AppRockskyAlbumNS - apikey: AppRockskyApikeyNS - artist: AppRockskyArtistNS - charts: AppRockskyChartsNS - dropbox: AppRockskyDropboxNS - feed: AppRockskyFeedNS - googledrive: AppRockskyGoogledriveNS - like: AppRockskyLikeNS - player: AppRockskyPlayerNS - playlist: AppRockskyPlaylistNS - scrobble: AppRockskyScrobbleNS - shout: AppRockskyShoutNS - song: AppRockskySongNS - spotify: AppRockskySpotifyNS - stats: AppRockskyStatsNS + _server: Server; + actor: AppRockskyActorNS; + album: AppRockskyAlbumNS; + apikey: AppRockskyApikeyNS; + artist: AppRockskyArtistNS; + charts: AppRockskyChartsNS; + dropbox: AppRockskyDropboxNS; + feed: AppRockskyFeedNS; + googledrive: AppRockskyGoogledriveNS; + like: AppRockskyLikeNS; + player: AppRockskyPlayerNS; + playlist: AppRockskyPlaylistNS; + scrobble: AppRockskyScrobbleNS; + shout: AppRockskyShoutNS; + song: AppRockskySongNS; + spotify: AppRockskySpotifyNS; + stats: AppRockskyStatsNS; constructor(server: Server) { - this._server = server - this.actor = new AppRockskyActorNS(server) - this.album = new AppRockskyAlbumNS(server) - this.apikey = new AppRockskyApikeyNS(server) - this.artist = new AppRockskyArtistNS(server) - this.charts = new AppRockskyChartsNS(server) - this.dropbox = new AppRockskyDropboxNS(server) - this.feed = new AppRockskyFeedNS(server) - this.googledrive = new AppRockskyGoogledriveNS(server) - this.like = new AppRockskyLikeNS(server) - this.player = new AppRockskyPlayerNS(server) - this.playlist = new AppRockskyPlaylistNS(server) - this.scrobble = new AppRockskyScrobbleNS(server) - this.shout = new AppRockskyShoutNS(server) - this.song = new AppRockskySongNS(server) - this.spotify = new AppRockskySpotifyNS(server) - this.stats = new AppRockskyStatsNS(server) + this._server = server; + this.actor = new AppRockskyActorNS(server); + this.album = new AppRockskyAlbumNS(server); + this.apikey = new AppRockskyApikeyNS(server); + this.artist = new AppRockskyArtistNS(server); + this.charts = new AppRockskyChartsNS(server); + this.dropbox = new AppRockskyDropboxNS(server); + this.feed = new AppRockskyFeedNS(server); + this.googledrive = new AppRockskyGoogledriveNS(server); + this.like = new AppRockskyLikeNS(server); + this.player = new AppRockskyPlayerNS(server); + this.playlist = new AppRockskyPlaylistNS(server); + this.scrobble = new AppRockskyScrobbleNS(server); + this.shout = new AppRockskyShoutNS(server); + this.song = new AppRockskySongNS(server); + this.spotify = new AppRockskySpotifyNS(server); + this.stats = new AppRockskyStatsNS(server); } } export class AppRockskyActorNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } getActorAlbums( @@ -164,8 +165,8 @@ export class AppRockskyActorNS { AppRockskyActorGetActorAlbums.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.actor.getActorAlbums' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.actor.getActorAlbums"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getActorArtists( @@ -175,8 +176,8 @@ export class AppRockskyActorNS { AppRockskyActorGetActorArtists.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.actor.getActorArtists' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.actor.getActorArtists"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getActorLovedSongs( @@ -186,8 +187,8 @@ export class AppRockskyActorNS { AppRockskyActorGetActorLovedSongs.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.actor.getActorLovedSongs' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.actor.getActorLovedSongs"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getActorPlaylists( @@ -197,8 +198,8 @@ export class AppRockskyActorNS { AppRockskyActorGetActorPlaylists.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.actor.getActorPlaylists' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.actor.getActorPlaylists"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getActorScrobbles( @@ -208,8 +209,8 @@ export class AppRockskyActorNS { AppRockskyActorGetActorScrobbles.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.actor.getActorScrobbles' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.actor.getActorScrobbles"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getActorSongs( @@ -219,8 +220,8 @@ export class AppRockskyActorNS { AppRockskyActorGetActorSongs.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.actor.getActorSongs' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.actor.getActorSongs"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getProfile( @@ -230,16 +231,16 @@ export class AppRockskyActorNS { AppRockskyActorGetProfile.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.actor.getProfile' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.actor.getProfile"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } } export class AppRockskyAlbumNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } getAlbum( @@ -249,8 +250,8 @@ export class AppRockskyAlbumNS { AppRockskyAlbumGetAlbum.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.album.getAlbum' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.album.getAlbum"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getAlbums( @@ -260,8 +261,8 @@ export class AppRockskyAlbumNS { AppRockskyAlbumGetAlbums.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.album.getAlbums' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.album.getAlbums"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getAlbumTracks( @@ -271,16 +272,16 @@ export class AppRockskyAlbumNS { AppRockskyAlbumGetAlbumTracks.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.album.getAlbumTracks' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.album.getAlbumTracks"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } } export class AppRockskyApikeyNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } createApikey( @@ -290,8 +291,8 @@ export class AppRockskyApikeyNS { AppRockskyApikeyCreateApikey.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.apikey.createApikey' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.apikey.createApikey"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getApikeys( @@ -301,8 +302,8 @@ export class AppRockskyApikeyNS { AppRockskyApikeyGetApikeys.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.apikey.getApikeys' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.apikey.getApikeys"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } removeApikey( @@ -312,8 +313,8 @@ export class AppRockskyApikeyNS { AppRockskyApikeyRemoveApikey.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.apikey.removeApikey' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.apikey.removeApikey"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } updateApikey( @@ -323,16 +324,16 @@ export class AppRockskyApikeyNS { AppRockskyApikeyUpdateApikey.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.apikey.updateApikey' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.apikey.updateApikey"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } } export class AppRockskyArtistNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } getArtistAlbums( @@ -342,8 +343,8 @@ export class AppRockskyArtistNS { AppRockskyArtistGetArtistAlbums.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.artist.getArtistAlbums' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.artist.getArtistAlbums"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getArtist( @@ -353,8 +354,8 @@ export class AppRockskyArtistNS { AppRockskyArtistGetArtist.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.artist.getArtist' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.artist.getArtist"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getArtists( @@ -364,8 +365,8 @@ export class AppRockskyArtistNS { AppRockskyArtistGetArtists.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.artist.getArtists' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.artist.getArtists"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getArtistTracks( @@ -375,16 +376,16 @@ export class AppRockskyArtistNS { AppRockskyArtistGetArtistTracks.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.artist.getArtistTracks' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.artist.getArtistTracks"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } } export class AppRockskyChartsNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } getScrobblesChart( @@ -394,16 +395,16 @@ export class AppRockskyChartsNS { AppRockskyChartsGetScrobblesChart.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.charts.getScrobblesChart' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.charts.getScrobblesChart"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } } export class AppRockskyDropboxNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } downloadFile( @@ -413,8 +414,8 @@ export class AppRockskyDropboxNS { AppRockskyDropboxDownloadFile.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.dropbox.downloadFile' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.dropbox.downloadFile"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getFiles( @@ -424,8 +425,8 @@ export class AppRockskyDropboxNS { AppRockskyDropboxGetFiles.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.dropbox.getFiles' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.dropbox.getFiles"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getMetadata( @@ -435,8 +436,8 @@ export class AppRockskyDropboxNS { AppRockskyDropboxGetMetadata.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.dropbox.getMetadata' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.dropbox.getMetadata"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getTemporaryLink( @@ -446,16 +447,16 @@ export class AppRockskyDropboxNS { AppRockskyDropboxGetTemporaryLink.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.dropbox.getTemporaryLink' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.dropbox.getTemporaryLink"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } } export class AppRockskyFeedNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } getNowPlayings( @@ -465,8 +466,8 @@ export class AppRockskyFeedNS { AppRockskyFeedGetNowPlayings.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.feed.getNowPlayings' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.feed.getNowPlayings"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } search( @@ -476,16 +477,16 @@ export class AppRockskyFeedNS { AppRockskyFeedSearch.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.feed.search' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.feed.search"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } } export class AppRockskyGoogledriveNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } downloadFile( @@ -495,8 +496,8 @@ export class AppRockskyGoogledriveNS { AppRockskyGoogledriveDownloadFile.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.googledrive.downloadFile' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.googledrive.downloadFile"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getFile( @@ -506,8 +507,8 @@ export class AppRockskyGoogledriveNS { AppRockskyGoogledriveGetFile.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.googledrive.getFile' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.googledrive.getFile"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getFiles( @@ -517,16 +518,16 @@ export class AppRockskyGoogledriveNS { AppRockskyGoogledriveGetFiles.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.googledrive.getFiles' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.googledrive.getFiles"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } } export class AppRockskyLikeNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } dislikeShout( @@ -536,8 +537,8 @@ export class AppRockskyLikeNS { AppRockskyLikeDislikeShout.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.like.dislikeShout' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.like.dislikeShout"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } dislikeSong( @@ -547,8 +548,8 @@ export class AppRockskyLikeNS { AppRockskyLikeDislikeSong.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.like.dislikeSong' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.like.dislikeSong"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } likeShout( @@ -558,8 +559,8 @@ export class AppRockskyLikeNS { AppRockskyLikeLikeShout.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.like.likeShout' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.like.likeShout"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } likeSong( @@ -569,16 +570,27 @@ export class AppRockskyLikeNS { AppRockskyLikeLikeSong.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.like.likeSong' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.like.likeSong"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } } export class AppRockskyPlayerNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; + } + + addDirectoryToQueue( + cfg: ConfigOf< + AV, + AppRockskyPlayerAddDirectoryToQueue.Handler>, + AppRockskyPlayerAddDirectoryToQueue.HandlerReqCtx> + >, + ) { + const nsid = "app.rocksky.player.addDirectoryToQueue"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } addItemsToQueue( @@ -588,8 +600,8 @@ export class AppRockskyPlayerNS { AppRockskyPlayerAddItemsToQueue.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.player.addItemsToQueue' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.player.addItemsToQueue"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getCurrentlyPlaying( @@ -599,8 +611,8 @@ export class AppRockskyPlayerNS { AppRockskyPlayerGetCurrentlyPlaying.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.player.getCurrentlyPlaying' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.player.getCurrentlyPlaying"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getPlaybackQueue( @@ -610,8 +622,8 @@ export class AppRockskyPlayerNS { AppRockskyPlayerGetPlaybackQueue.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.player.getPlaybackQueue' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.player.getPlaybackQueue"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } next( @@ -621,8 +633,8 @@ export class AppRockskyPlayerNS { AppRockskyPlayerNext.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.player.next' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.player.next"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } pause( @@ -632,8 +644,8 @@ export class AppRockskyPlayerNS { AppRockskyPlayerPause.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.player.pause' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.player.pause"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } playDirectory( @@ -643,8 +655,8 @@ export class AppRockskyPlayerNS { AppRockskyPlayerPlayDirectory.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.player.playDirectory' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.player.playDirectory"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } playFile( @@ -654,8 +666,8 @@ export class AppRockskyPlayerNS { AppRockskyPlayerPlayFile.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.player.playFile' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.player.playFile"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } play( @@ -665,8 +677,8 @@ export class AppRockskyPlayerNS { AppRockskyPlayerPlay.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.player.play' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.player.play"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } previous( @@ -676,8 +688,8 @@ export class AppRockskyPlayerNS { AppRockskyPlayerPrevious.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.player.previous' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.player.previous"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } seek( @@ -687,16 +699,16 @@ export class AppRockskyPlayerNS { AppRockskyPlayerSeek.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.player.seek' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.player.seek"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } } export class AppRockskyPlaylistNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } createPlaylist( @@ -706,8 +718,8 @@ export class AppRockskyPlaylistNS { AppRockskyPlaylistCreatePlaylist.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.playlist.createPlaylist' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.playlist.createPlaylist"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getPlaylist( @@ -717,8 +729,8 @@ export class AppRockskyPlaylistNS { AppRockskyPlaylistGetPlaylist.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.playlist.getPlaylist' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.playlist.getPlaylist"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getPlaylists( @@ -728,8 +740,8 @@ export class AppRockskyPlaylistNS { AppRockskyPlaylistGetPlaylists.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.playlist.getPlaylists' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.playlist.getPlaylists"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } insertDirectory( @@ -739,8 +751,8 @@ export class AppRockskyPlaylistNS { AppRockskyPlaylistInsertDirectory.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.playlist.insertDirectory' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.playlist.insertDirectory"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } insertFiles( @@ -750,8 +762,8 @@ export class AppRockskyPlaylistNS { AppRockskyPlaylistInsertFiles.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.playlist.insertFiles' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.playlist.insertFiles"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } removePlaylist( @@ -761,8 +773,8 @@ export class AppRockskyPlaylistNS { AppRockskyPlaylistRemovePlaylist.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.playlist.removePlaylist' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.playlist.removePlaylist"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } removeTrack( @@ -772,8 +784,8 @@ export class AppRockskyPlaylistNS { AppRockskyPlaylistRemoveTrack.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.playlist.removeTrack' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.playlist.removeTrack"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } startPlaylist( @@ -783,16 +795,16 @@ export class AppRockskyPlaylistNS { AppRockskyPlaylistStartPlaylist.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.playlist.startPlaylist' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.playlist.startPlaylist"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } } export class AppRockskyScrobbleNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } createScrobble( @@ -802,8 +814,8 @@ export class AppRockskyScrobbleNS { AppRockskyScrobbleCreateScrobble.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.scrobble.createScrobble' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.scrobble.createScrobble"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getScrobble( @@ -813,8 +825,8 @@ export class AppRockskyScrobbleNS { AppRockskyScrobbleGetScrobble.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.scrobble.getScrobble' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.scrobble.getScrobble"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getScrobbles( @@ -824,16 +836,16 @@ export class AppRockskyScrobbleNS { AppRockskyScrobbleGetScrobbles.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.scrobble.getScrobbles' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.scrobble.getScrobbles"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } } export class AppRockskyShoutNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } createShout( @@ -843,8 +855,8 @@ export class AppRockskyShoutNS { AppRockskyShoutCreateShout.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.shout.createShout' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.shout.createShout"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getAlbumShouts( @@ -854,8 +866,8 @@ export class AppRockskyShoutNS { AppRockskyShoutGetAlbumShouts.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.shout.getAlbumShouts' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.shout.getAlbumShouts"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getArtistShouts( @@ -865,8 +877,8 @@ export class AppRockskyShoutNS { AppRockskyShoutGetArtistShouts.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.shout.getArtistShouts' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.shout.getArtistShouts"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getProfileShouts( @@ -876,8 +888,8 @@ export class AppRockskyShoutNS { AppRockskyShoutGetProfileShouts.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.shout.getProfileShouts' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.shout.getProfileShouts"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getShoutReplies( @@ -887,8 +899,8 @@ export class AppRockskyShoutNS { AppRockskyShoutGetShoutReplies.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.shout.getShoutReplies' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.shout.getShoutReplies"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getTrackShouts( @@ -898,8 +910,8 @@ export class AppRockskyShoutNS { AppRockskyShoutGetTrackShouts.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.shout.getTrackShouts' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.shout.getTrackShouts"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } removeShout( @@ -909,8 +921,8 @@ export class AppRockskyShoutNS { AppRockskyShoutRemoveShout.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.shout.removeShout' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.shout.removeShout"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } replyShout( @@ -920,8 +932,8 @@ export class AppRockskyShoutNS { AppRockskyShoutReplyShout.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.shout.replyShout' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.shout.replyShout"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } reportShout( @@ -931,16 +943,16 @@ export class AppRockskyShoutNS { AppRockskyShoutReportShout.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.shout.reportShout' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.shout.reportShout"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } } export class AppRockskySongNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } createSong( @@ -950,8 +962,8 @@ export class AppRockskySongNS { AppRockskySongCreateSong.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.song.createSong' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.song.createSong"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getSong( @@ -961,8 +973,8 @@ export class AppRockskySongNS { AppRockskySongGetSong.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.song.getSong' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.song.getSong"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } getSongs( @@ -972,16 +984,16 @@ export class AppRockskySongNS { AppRockskySongGetSongs.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.song.getSongs' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.song.getSongs"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } } export class AppRockskySpotifyNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } getCurrentlyPlaying( @@ -991,8 +1003,8 @@ export class AppRockskySpotifyNS { AppRockskySpotifyGetCurrentlyPlaying.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.spotify.getCurrentlyPlaying' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.spotify.getCurrentlyPlaying"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } next( @@ -1002,8 +1014,8 @@ export class AppRockskySpotifyNS { AppRockskySpotifyNext.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.spotify.next' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.spotify.next"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } pause( @@ -1013,8 +1025,8 @@ export class AppRockskySpotifyNS { AppRockskySpotifyPause.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.spotify.pause' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.spotify.pause"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } play( @@ -1024,8 +1036,8 @@ export class AppRockskySpotifyNS { AppRockskySpotifyPlay.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.spotify.play' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.spotify.play"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } previous( @@ -1035,8 +1047,8 @@ export class AppRockskySpotifyNS { AppRockskySpotifyPrevious.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.spotify.previous' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.spotify.previous"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } seek( @@ -1046,16 +1058,16 @@ export class AppRockskySpotifyNS { AppRockskySpotifySeek.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.spotify.seek' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.spotify.seek"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } } export class AppRockskyStatsNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } getStats( @@ -1065,79 +1077,79 @@ export class AppRockskyStatsNS { AppRockskyStatsGetStats.HandlerReqCtx> >, ) { - const nsid = 'app.rocksky.stats.getStats' // @ts-ignore - return this._server.xrpc.method(nsid, cfg) + const nsid = "app.rocksky.stats.getStats"; // @ts-ignore + return this._server.xrpc.method(nsid, cfg); } } export class AppBskyNS { - _server: Server - actor: AppBskyActorNS + _server: Server; + actor: AppBskyActorNS; constructor(server: Server) { - this._server = server - this.actor = new AppBskyActorNS(server) + this._server = server; + this.actor = new AppBskyActorNS(server); } } export class AppBskyActorNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } } export class ComNS { - _server: Server - atproto: ComAtprotoNS + _server: Server; + atproto: ComAtprotoNS; constructor(server: Server) { - this._server = server - this.atproto = new ComAtprotoNS(server) + this._server = server; + this.atproto = new ComAtprotoNS(server); } } export class ComAtprotoNS { - _server: Server - repo: ComAtprotoRepoNS + _server: Server; + repo: ComAtprotoRepoNS; constructor(server: Server) { - this._server = server - this.repo = new ComAtprotoRepoNS(server) + this._server = server; + this.repo = new ComAtprotoRepoNS(server); } } export class ComAtprotoRepoNS { - _server: Server + _server: Server; constructor(server: Server) { - this._server = server + this._server = server; } } type SharedRateLimitOpts = { - name: string - calcKey?: (ctx: T) => string | null - calcPoints?: (ctx: T) => number -} + name: string; + calcKey?: (ctx: T) => string | null; + calcPoints?: (ctx: T) => number; +}; type RouteRateLimitOpts = { - durationMs: number - points: number - calcKey?: (ctx: T) => string | null - calcPoints?: (ctx: T) => number -} -type HandlerOpts = { blobLimit?: number } -type HandlerRateLimitOpts = SharedRateLimitOpts | RouteRateLimitOpts + durationMs: number; + points: number; + calcKey?: (ctx: T) => string | null; + calcPoints?: (ctx: T) => number; +}; +type HandlerOpts = { blobLimit?: number }; +type HandlerRateLimitOpts = SharedRateLimitOpts | RouteRateLimitOpts; type ConfigOf = | Handler | { - auth?: Auth - opts?: HandlerOpts - rateLimit?: HandlerRateLimitOpts | HandlerRateLimitOpts[] - handler: Handler - } + auth?: Auth; + opts?: HandlerOpts; + rateLimit?: HandlerRateLimitOpts | HandlerRateLimitOpts[]; + handler: Handler; + }; type ExtractAuth = Extract< Awaited>, { credentials: unknown } -> +>; diff --git a/apps/api/src/lexicon/lexicons.ts b/apps/api/src/lexicon/lexicons.ts index 34122fdd..1c24889d 100644 --- a/apps/api/src/lexicon/lexicons.ts +++ b/apps/api/src/lexicon/lexicons.ts @@ -1,82 +1,82 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { LexiconDoc, Lexicons } from '@atproto/lexicon' +import { type LexiconDoc, Lexicons } from "@atproto/lexicon"; export const schemaDict = { AppRockskyActorDefs: { lexicon: 1, - id: 'app.rocksky.actor.defs', + id: "app.rocksky.actor.defs", defs: { profileViewDetailed: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the actor.', + type: "string", + description: "The unique identifier of the actor.", }, did: { - type: 'string', - description: 'The DID of the actor.', + type: "string", + description: "The DID of the actor.", }, handle: { - type: 'string', - description: 'The handle of the actor.', + type: "string", + description: "The handle of the actor.", }, displayName: { - type: 'string', - description: 'The display name of the actor.', + type: "string", + description: "The display name of the actor.", }, avatar: { - type: 'string', + type: "string", description: "The URL of the actor's avatar image.", - format: 'uri', + format: "uri", }, createdAt: { - type: 'string', - description: 'The date and time when the actor was created.', - format: 'datetime', + type: "string", + description: "The date and time when the actor was created.", + format: "datetime", }, updatedAt: { - type: 'string', - description: 'The date and time when the actor was last updated.', - format: 'datetime', + type: "string", + description: "The date and time when the actor was last updated.", + format: "datetime", }, }, }, profileViewBasic: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the actor.', + type: "string", + description: "The unique identifier of the actor.", }, did: { - type: 'string', - description: 'The DID of the actor.', + type: "string", + description: "The DID of the actor.", }, handle: { - type: 'string', - description: 'The handle of the actor.', + type: "string", + description: "The handle of the actor.", }, displayName: { - type: 'string', - description: 'The display name of the actor.', + type: "string", + description: "The display name of the actor.", }, avatar: { - type: 'string', + type: "string", description: "The URL of the actor's avatar image.", - format: 'uri', + format: "uri", }, createdAt: { - type: 'string', - description: 'The date and time when the actor was created.', - format: 'datetime', + type: "string", + description: "The date and time when the actor was created.", + format: "datetime", }, updatedAt: { - type: 'string', - description: 'The date and time when the actor was last updated.', - format: 'datetime', + type: "string", + description: "The date and time when the actor was last updated.", + format: "datetime", }, }, }, @@ -84,42 +84,42 @@ export const schemaDict = { }, AppRockskyActorGetActorAlbums: { lexicon: 1, - id: 'app.rocksky.actor.getActorAlbums', + id: "app.rocksky.actor.getActorAlbums", defs: { main: { - type: 'query', - description: 'Get albums for an actor', + type: "query", + description: "Get albums for an actor", parameters: { - type: 'params', - required: ['did'], + type: "params", + required: ["did"], properties: { did: { - type: 'string', - description: 'The DID or handle of the actor', - format: 'at-identifier', + type: "string", + description: "The DID or handle of the actor", + format: "at-identifier", }, limit: { - type: 'integer', - description: 'The maximum number of albums to return', + type: "integer", + description: "The maximum number of albums to return", minimum: 1, }, offset: { - type: 'integer', - description: 'The offset for pagination', + type: "integer", + description: "The offset for pagination", minimum: 0, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { albums: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.album.defs#albumViewBasic', + type: "ref", + ref: "lex:app.rocksky.album.defs#albumViewBasic", }, }, }, @@ -130,42 +130,42 @@ export const schemaDict = { }, AppRockskyActorGetActorArtists: { lexicon: 1, - id: 'app.rocksky.actor.getActorArtists', + id: "app.rocksky.actor.getActorArtists", defs: { main: { - type: 'query', - description: 'Get artists for an actor', + type: "query", + description: "Get artists for an actor", parameters: { - type: 'params', - required: ['did'], + type: "params", + required: ["did"], properties: { did: { - type: 'string', - description: 'The DID or handle of the actor', - format: 'at-identifier', + type: "string", + description: "The DID or handle of the actor", + format: "at-identifier", }, limit: { - type: 'integer', - description: 'The maximum number of albums to return', + type: "integer", + description: "The maximum number of albums to return", minimum: 1, }, offset: { - type: 'integer', - description: 'The offset for pagination', + type: "integer", + description: "The offset for pagination", minimum: 0, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { artists: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.artist.defs#artistViewBasic', + type: "ref", + ref: "lex:app.rocksky.artist.defs#artistViewBasic", }, }, }, @@ -176,42 +176,42 @@ export const schemaDict = { }, AppRockskyActorGetActorLovedSongs: { lexicon: 1, - id: 'app.rocksky.actor.getActorLovedSongs', + id: "app.rocksky.actor.getActorLovedSongs", defs: { main: { - type: 'query', - description: 'Get loved songs for an actor', + type: "query", + description: "Get loved songs for an actor", parameters: { - type: 'params', - required: ['did'], + type: "params", + required: ["did"], properties: { did: { - type: 'string', - description: 'The DID or handle of the actor', - format: 'at-identifier', + type: "string", + description: "The DID or handle of the actor", + format: "at-identifier", }, limit: { - type: 'integer', - description: 'The maximum number of albums to return', + type: "integer", + description: "The maximum number of albums to return", minimum: 1, }, offset: { - type: 'integer', - description: 'The offset for pagination', + type: "integer", + description: "The offset for pagination", minimum: 0, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { tracks: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.song.defs#songViewBasic', + type: "ref", + ref: "lex:app.rocksky.song.defs#songViewBasic", }, }, }, @@ -222,42 +222,42 @@ export const schemaDict = { }, AppRockskyActorGetActorPlaylists: { lexicon: 1, - id: 'app.rocksky.actor.getActorPlaylists', + id: "app.rocksky.actor.getActorPlaylists", defs: { main: { - type: 'query', - description: 'Get playlists for an actor', + type: "query", + description: "Get playlists for an actor", parameters: { - type: 'params', - required: ['did'], + type: "params", + required: ["did"], properties: { did: { - type: 'string', - description: 'The DID or handle of the actor', - format: 'at-identifier', + type: "string", + description: "The DID or handle of the actor", + format: "at-identifier", }, limit: { - type: 'integer', - description: 'The maximum number of albums to return', + type: "integer", + description: "The maximum number of albums to return", minimum: 1, }, offset: { - type: 'integer', - description: 'The offset for pagination', + type: "integer", + description: "The offset for pagination", minimum: 0, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { playlists: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.playlist.defs#playlistViewBasic', + type: "ref", + ref: "lex:app.rocksky.playlist.defs#playlistViewBasic", }, }, }, @@ -268,42 +268,42 @@ export const schemaDict = { }, AppRockskyActorGetActorScrobbles: { lexicon: 1, - id: 'app.rocksky.actor.getActorScrobbles', + id: "app.rocksky.actor.getActorScrobbles", defs: { main: { - type: 'query', - description: 'Get scrobbles for an actor', + type: "query", + description: "Get scrobbles for an actor", parameters: { - type: 'params', - required: ['did'], + type: "params", + required: ["did"], properties: { did: { - type: 'string', - description: 'The DID or handle of the actor', - format: 'at-identifier', + type: "string", + description: "The DID or handle of the actor", + format: "at-identifier", }, limit: { - type: 'integer', - description: 'The maximum number of albums to return', + type: "integer", + description: "The maximum number of albums to return", minimum: 1, }, offset: { - type: 'integer', - description: 'The offset for pagination', + type: "integer", + description: "The offset for pagination", minimum: 0, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { scrobbles: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.scrobble.defs#scrobbleViewBasic', + type: "ref", + ref: "lex:app.rocksky.scrobble.defs#scrobbleViewBasic", }, }, }, @@ -314,42 +314,42 @@ export const schemaDict = { }, AppRockskyActorGetActorSongs: { lexicon: 1, - id: 'app.rocksky.actor.getActorSongs', + id: "app.rocksky.actor.getActorSongs", defs: { main: { - type: 'query', - description: 'Get songs for an actor', + type: "query", + description: "Get songs for an actor", parameters: { - type: 'params', - required: ['did'], + type: "params", + required: ["did"], properties: { did: { - type: 'string', - description: 'The DID or handle of the actor', - format: 'at-identifier', + type: "string", + description: "The DID or handle of the actor", + format: "at-identifier", }, limit: { - type: 'integer', - description: 'The maximum number of albums to return', + type: "integer", + description: "The maximum number of albums to return", minimum: 1, }, offset: { - type: 'integer', - description: 'The offset for pagination', + type: "integer", + description: "The offset for pagination", minimum: 0, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { songs: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.song.defs#songViewBasic', + type: "ref", + ref: "lex:app.rocksky.song.defs#songViewBasic", }, }, }, @@ -360,26 +360,26 @@ export const schemaDict = { }, AppRockskyActorGetProfile: { lexicon: 1, - id: 'app.rocksky.actor.getProfile', + id: "app.rocksky.actor.getProfile", defs: { main: { - type: 'query', - description: 'Get the profile of an actor', + type: "query", + description: "Get the profile of an actor", parameters: { - type: 'params', + type: "params", properties: { did: { - type: 'string', - description: 'The DID or handle of the actor', - format: 'at-identifier', + type: "string", + description: "The DID or handle of the actor", + format: "at-identifier", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.actor.defs#profileViewDetailed', + type: "ref", + ref: "lex:app.rocksky.actor.defs#profileViewDetailed", }, }, }, @@ -387,53 +387,53 @@ export const schemaDict = { }, AppBskyActorProfile: { lexicon: 1, - id: 'app.bsky.actor.profile', + id: "app.bsky.actor.profile", defs: { main: { - type: 'record', - description: 'A declaration of a Bluesky account profile.', - key: 'literal:self', + type: "record", + description: "A declaration of a Bluesky account profile.", + key: "literal:self", record: { - type: 'object', + type: "object", properties: { displayName: { - type: 'string', + type: "string", maxGraphemes: 64, maxLength: 640, }, description: { - type: 'string', - description: 'Free-form profile description text.', + type: "string", + description: "Free-form profile description text.", maxGraphemes: 256, maxLength: 2560, }, avatar: { - type: 'blob', + type: "blob", description: "Small image to be displayed next to posts from account. AKA, 'profile picture'", - accept: ['image/png', 'image/jpeg'], + accept: ["image/png", "image/jpeg"], maxSize: 1000000, }, banner: { - type: 'blob', + type: "blob", description: - 'Larger horizontal image to display behind profile view.', - accept: ['image/png', 'image/jpeg'], + "Larger horizontal image to display behind profile view.", + accept: ["image/png", "image/jpeg"], maxSize: 10000000, }, labels: { - type: 'union', + type: "union", description: - 'Self-label values, specific to the Bluesky application, on the overall account.', - refs: ['lex:com.atproto.label.defs#selfLabels'], + "Self-label values, specific to the Bluesky application, on the overall account.", + refs: ["lex:com.atproto.label.defs#selfLabels"], }, joinedViaStarterPack: { - type: 'ref', - ref: 'lex:com.atproto.repo.strongRef', + type: "ref", + ref: "lex:com.atproto.repo.strongRef", }, createdAt: { - type: 'string', - format: 'datetime', + type: "string", + format: "datetime", }, }, }, @@ -442,85 +442,85 @@ export const schemaDict = { }, AppRockskyAlbum: { lexicon: 1, - id: 'app.rocksky.album', + id: "app.rocksky.album", defs: { main: { - type: 'record', - description: 'A declaration of an album.', - key: 'tid', + type: "record", + description: "A declaration of an album.", + key: "tid", record: { - type: 'object', - required: ['title', 'artist', 'createdAt'], + type: "object", + required: ["title", "artist", "createdAt"], properties: { title: { - type: 'string', - description: 'The title of the album.', + type: "string", + description: "The title of the album.", minLength: 1, maxLength: 512, }, artist: { - type: 'string', - description: 'The artist of the album.', + type: "string", + description: "The artist of the album.", minLength: 1, maxLength: 256, }, duration: { - type: 'integer', - description: 'The duration of the album in seconds.', + type: "integer", + description: "The duration of the album in seconds.", }, releaseDate: { - type: 'string', - description: 'The release date of the album.', - format: 'datetime', + type: "string", + description: "The release date of the album.", + format: "datetime", }, year: { - type: 'integer', - description: 'The year the album was released.', + type: "integer", + description: "The year the album was released.", }, genre: { - type: 'string', - description: 'The genre of the album.', + type: "string", + description: "The genre of the album.", maxLength: 256, }, albumArt: { - type: 'blob', - description: 'The album art of the album.', - accept: ['image/png', 'image/jpeg'], + type: "blob", + description: "The album art of the album.", + accept: ["image/png", "image/jpeg"], maxSize: 2000000, }, tags: { - type: 'array', - description: 'The tags of the album.', + type: "array", + description: "The tags of the album.", items: { - type: 'string', + type: "string", minLength: 1, maxLength: 256, }, }, youtubeLink: { - type: 'string', - description: 'The YouTube link of the album.', - format: 'uri', + type: "string", + description: "The YouTube link of the album.", + format: "uri", }, spotifyLink: { - type: 'string', - description: 'The Spotify link of the album.', - format: 'uri', + type: "string", + description: "The Spotify link of the album.", + format: "uri", }, tidalLink: { - type: 'string', - description: 'The tidal link of the album.', - format: 'uri', + type: "string", + description: "The tidal link of the album.", + format: "uri", }, appleMusicLink: { - type: 'string', - description: 'The Apple Music link of the album.', - format: 'uri', + type: "string", + description: "The Apple Music link of the album.", + format: "uri", }, createdAt: { - type: 'string', - description: 'The date and time when the album was created.', - format: 'datetime', + type: "string", + description: "The date and time when the album was created.", + format: "datetime", }, }, }, @@ -529,121 +529,121 @@ export const schemaDict = { }, AppRockskyAlbumDefs: { lexicon: 1, - id: 'app.rocksky.album.defs', + id: "app.rocksky.album.defs", defs: { albumViewBasic: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the album.', + type: "string", + description: "The unique identifier of the album.", }, uri: { - type: 'string', - description: 'The URI of the album.', - format: 'at-uri', + type: "string", + description: "The URI of the album.", + format: "at-uri", }, title: { - type: 'string', - description: 'The title of the album.', + type: "string", + description: "The title of the album.", }, artist: { - type: 'string', - description: 'The artist of the album.', + type: "string", + description: "The artist of the album.", }, artistUri: { - type: 'string', + type: "string", description: "The URI of the album's artist.", - format: 'at-uri', + format: "at-uri", }, year: { - type: 'integer', - description: 'The year the album was released.', + type: "integer", + description: "The year the album was released.", }, albumArt: { - type: 'string', - description: 'The URL of the album art image.', - format: 'uri', + type: "string", + description: "The URL of the album art image.", + format: "uri", }, releaseDate: { - type: 'string', - description: 'The release date of the album.', + type: "string", + description: "The release date of the album.", }, sha256: { - type: 'string', - description: 'The SHA256 hash of the album.', + type: "string", + description: "The SHA256 hash of the album.", }, playCount: { - type: 'integer', - description: 'The number of times the album has been played.', + type: "integer", + description: "The number of times the album has been played.", minimum: 0, }, uniqueListeners: { - type: 'integer', + type: "integer", description: - 'The number of unique listeners who have played the album.', + "The number of unique listeners who have played the album.", minimum: 0, }, }, }, albumViewDetailed: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the album.', + type: "string", + description: "The unique identifier of the album.", }, uri: { - type: 'string', - description: 'The URI of the album.', - format: 'at-uri', + type: "string", + description: "The URI of the album.", + format: "at-uri", }, title: { - type: 'string', - description: 'The title of the album.', + type: "string", + description: "The title of the album.", }, artist: { - type: 'string', - description: 'The artist of the album.', + type: "string", + description: "The artist of the album.", }, artistUri: { - type: 'string', + type: "string", description: "The URI of the album's artist.", - format: 'at-uri', + format: "at-uri", }, year: { - type: 'integer', - description: 'The year the album was released.', + type: "integer", + description: "The year the album was released.", }, albumArt: { - type: 'string', - description: 'The URL of the album art image.', - format: 'uri', + type: "string", + description: "The URL of the album art image.", + format: "uri", }, releaseDate: { - type: 'string', - description: 'The release date of the album.', + type: "string", + description: "The release date of the album.", }, sha256: { - type: 'string', - description: 'The SHA256 hash of the album.', + type: "string", + description: "The SHA256 hash of the album.", }, playCount: { - type: 'integer', - description: 'The number of times the album has been played.', + type: "integer", + description: "The number of times the album has been played.", minimum: 0, }, uniqueListeners: { - type: 'integer', + type: "integer", description: - 'The number of unique listeners who have played the album.', + "The number of unique listeners who have played the album.", minimum: 0, }, tracks: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.song.defs.songViewBasic', + type: "ref", + ref: "lex:app.rocksky.song.defs.songViewBasic", }, }, }, @@ -652,27 +652,27 @@ export const schemaDict = { }, AppRockskyAlbumGetAlbum: { lexicon: 1, - id: 'app.rocksky.album.getAlbum', + id: "app.rocksky.album.getAlbum", defs: { main: { - type: 'query', - description: 'Get detailed album view', + type: "query", + description: "Get detailed album view", parameters: { - type: 'params', - required: ['uri'], + type: "params", + required: ["uri"], properties: { uri: { - type: 'string', - description: 'The URI of the album to retrieve.', - format: 'at-uri', + type: "string", + description: "The URI of the album to retrieve.", + format: "at-uri", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.album.defs#albumViewDetailed', + type: "ref", + ref: "lex:app.rocksky.album.defs#albumViewDetailed", }, }, }, @@ -680,36 +680,36 @@ export const schemaDict = { }, AppRockskyAlbumGetAlbums: { lexicon: 1, - id: 'app.rocksky.album.getAlbums', + id: "app.rocksky.album.getAlbums", defs: { main: { - type: 'query', - description: 'Get albums', + type: "query", + description: "Get albums", parameters: { - type: 'params', + type: "params", properties: { limit: { - type: 'integer', - description: 'The maximum number of albums to return', + type: "integer", + description: "The maximum number of albums to return", minimum: 1, }, offset: { - type: 'integer', - description: 'The offset for pagination', + type: "integer", + description: "The offset for pagination", minimum: 0, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { albums: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.album.defs#albumViewBasic', + type: "ref", + ref: "lex:app.rocksky.album.defs#albumViewBasic", }, }, }, @@ -720,32 +720,32 @@ export const schemaDict = { }, AppRockskyAlbumGetAlbumTracks: { lexicon: 1, - id: 'app.rocksky.album.getAlbumTracks', + id: "app.rocksky.album.getAlbumTracks", defs: { main: { - type: 'query', - description: 'Get tracks for an album', + type: "query", + description: "Get tracks for an album", parameters: { - type: 'params', - required: ['uri'], + type: "params", + required: ["uri"], properties: { uri: { - type: 'string', - description: 'The URI of the album to retrieve tracks from', - format: 'at-uri', + type: "string", + description: "The URI of the album to retrieve tracks from", + format: "at-uri", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { tracks: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.song.defs#songViewBasic', + type: "ref", + ref: "lex:app.rocksky.song.defs#songViewBasic", }, }, }, @@ -756,33 +756,33 @@ export const schemaDict = { }, AppRockskyApikeyCreateApikey: { lexicon: 1, - id: 'app.rocksky.apikey.createApikey', + id: "app.rocksky.apikey.createApikey", defs: { main: { - type: 'procedure', - description: 'Create a new API key for the authenticated user', + type: "procedure", + description: "Create a new API key for the authenticated user", input: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', - required: ['name'], + type: "object", + required: ["name"], properties: { name: { - type: 'string', - description: 'The name of the API key.', + type: "string", + description: "The name of the API key.", }, description: { - type: 'string', - description: 'A description for the API key.', + type: "string", + description: "A description for the API key.", }, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.apikey.defs#apiKey', + type: "ref", + ref: "lex:app.rocksky.apikey.defs#apiKey", }, }, }, @@ -790,27 +790,27 @@ export const schemaDict = { }, AppRockskyApikeyDefs: { lexicon: 1, - id: 'app.rocksky.apikey.defs', + id: "app.rocksky.apikey.defs", defs: { apiKeyView: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the API key.', + type: "string", + description: "The unique identifier of the API key.", }, name: { - type: 'string', - description: 'The name of the API key.', + type: "string", + description: "The name of the API key.", }, description: { - type: 'string', - description: 'A description for the API key.', + type: "string", + description: "A description for the API key.", }, createdAt: { - type: 'string', - description: 'The date and time when the API key was created.', - format: 'datetime', + type: "string", + description: "The date and time when the API key was created.", + format: "datetime", }, }, }, @@ -818,40 +818,40 @@ export const schemaDict = { }, AppRockskyApikeysDefs: { lexicon: 1, - id: 'app.rocksky.apikeys.defs', + id: "app.rocksky.apikeys.defs", defs: {}, }, AppRockskyApikeyGetApikeys: { lexicon: 1, - id: 'app.rocksky.apikey.getApikeys', + id: "app.rocksky.apikey.getApikeys", defs: { main: { - type: 'query', - description: 'Get a list of API keys for the authenticated user', + type: "query", + description: "Get a list of API keys for the authenticated user", parameters: { - type: 'params', + type: "params", properties: { offset: { - type: 'integer', + type: "integer", description: - 'The number of API keys to skip before starting to collect the result set.', + "The number of API keys to skip before starting to collect the result set.", }, limit: { - type: 'integer', - description: 'The number of API keys to return per page.', + type: "integer", + description: "The number of API keys to return per page.", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { apiKeys: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.apikey.defs#apikeyView', + type: "ref", + ref: "lex:app.rocksky.apikey.defs#apikeyView", }, }, }, @@ -862,26 +862,26 @@ export const schemaDict = { }, AppRockskyApikeyRemoveApikey: { lexicon: 1, - id: 'app.rocksky.apikey.removeApikey', + id: "app.rocksky.apikey.removeApikey", defs: { main: { - type: 'procedure', - description: 'Remove an API key for the authenticated user', + type: "procedure", + description: "Remove an API key for the authenticated user", parameters: { - type: 'params', - required: ['id'], + type: "params", + required: ["id"], properties: { id: { - type: 'string', - description: 'The ID of the API key to remove.', + type: "string", + description: "The ID of the API key to remove.", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.apikey.defs#apiKey', + type: "ref", + ref: "lex:app.rocksky.apikey.defs#apiKey", }, }, }, @@ -889,37 +889,37 @@ export const schemaDict = { }, AppRockskyApikeyUpdateApikey: { lexicon: 1, - id: 'app.rocksky.apikey.updateApikey', + id: "app.rocksky.apikey.updateApikey", defs: { main: { - type: 'procedure', - description: 'Update an existing API key for the authenticated user', + type: "procedure", + description: "Update an existing API key for the authenticated user", input: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', - required: ['id', 'name'], + type: "object", + required: ["id", "name"], properties: { id: { - type: 'string', - description: 'The ID of the API key to update.', + type: "string", + description: "The ID of the API key to update.", }, name: { - type: 'string', - description: 'The new name of the API key.', + type: "string", + description: "The new name of the API key.", }, description: { - type: 'string', - description: 'A new description for the API key.', + type: "string", + description: "A new description for the API key.", }, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.apikey.defs#apiKey', + type: "ref", + ref: "lex:app.rocksky.apikey.defs#apiKey", }, }, }, @@ -927,61 +927,61 @@ export const schemaDict = { }, AppRockskyArtist: { lexicon: 1, - id: 'app.rocksky.artist', + id: "app.rocksky.artist", defs: { main: { - type: 'record', - description: 'A declaration of an artist.', - key: 'tid', + type: "record", + description: "A declaration of an artist.", + key: "tid", record: { - type: 'object', - required: ['name', 'createdAt'], + type: "object", + required: ["name", "createdAt"], properties: { name: { - type: 'string', - description: 'The name of the artist.', + type: "string", + description: "The name of the artist.", minLength: 1, maxLength: 512, }, bio: { - type: 'string', - description: 'The biography of the artist.', + type: "string", + description: "The biography of the artist.", maxLength: 1000, }, picture: { - type: 'blob', - description: 'The picture of the artist.', - accept: ['image/png', 'image/jpeg'], + type: "blob", + description: "The picture of the artist.", + accept: ["image/png", "image/jpeg"], maxSize: 2000000, }, tags: { - type: 'array', - description: 'The tags of the artist.', + type: "array", + description: "The tags of the artist.", items: { - type: 'string', + type: "string", minLength: 1, maxLength: 256, }, }, born: { - type: 'string', - description: 'The birth date of the artist.', - format: 'datetime', + type: "string", + description: "The birth date of the artist.", + format: "datetime", }, died: { - type: 'string', - description: 'The death date of the artist.', - format: 'datetime', + type: "string", + description: "The death date of the artist.", + format: "datetime", }, bornIn: { - type: 'string', - description: 'The birth place of the artist.', + type: "string", + description: "The birth place of the artist.", maxLength: 256, }, createdAt: { - type: 'string', - description: 'The date when the artist was created.', - format: 'datetime', + type: "string", + description: "The date when the artist was created.", + format: "datetime", }, }, }, @@ -990,78 +990,78 @@ export const schemaDict = { }, AppRockskyArtistDefs: { lexicon: 1, - id: 'app.rocksky.artist.defs', + id: "app.rocksky.artist.defs", defs: { artistViewBasic: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the artist.', + type: "string", + description: "The unique identifier of the artist.", }, uri: { - type: 'string', - description: 'The URI of the artist.', - format: 'at-uri', + type: "string", + description: "The URI of the artist.", + format: "at-uri", }, name: { - type: 'string', - description: 'The name of the artist.', + type: "string", + description: "The name of the artist.", }, picture: { - type: 'string', - description: 'The picture of the artist.', + type: "string", + description: "The picture of the artist.", }, sha256: { - type: 'string', - description: 'The SHA256 hash of the artist.', + type: "string", + description: "The SHA256 hash of the artist.", }, playCount: { - type: 'integer', - description: 'The number of times the artist has been played.', + type: "integer", + description: "The number of times the artist has been played.", minimum: 0, }, uniqueListeners: { - type: 'integer', + type: "integer", description: - 'The number of unique listeners who have played the artist.', + "The number of unique listeners who have played the artist.", minimum: 0, }, }, }, artistViewDetailed: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the artist.', + type: "string", + description: "The unique identifier of the artist.", }, uri: { - type: 'string', - description: 'The URI of the artist.', - format: 'at-uri', + type: "string", + description: "The URI of the artist.", + format: "at-uri", }, name: { - type: 'string', - description: 'The name of the artist.', + type: "string", + description: "The name of the artist.", }, picture: { - type: 'string', - description: 'The picture of the artist.', + type: "string", + description: "The picture of the artist.", }, sha256: { - type: 'string', - description: 'The SHA256 hash of the artist.', + type: "string", + description: "The SHA256 hash of the artist.", }, playCount: { - type: 'integer', - description: 'The number of times the artist has been played.', + type: "integer", + description: "The number of times the artist has been played.", minimum: 0, }, uniqueListeners: { - type: 'integer', + type: "integer", description: - 'The number of unique listeners who have played the artist.', + "The number of unique listeners who have played the artist.", minimum: 0, }, }, @@ -1070,32 +1070,32 @@ export const schemaDict = { }, AppRockskyArtistGetArtistAlbums: { lexicon: 1, - id: 'app.rocksky.artist.getArtistAlbums', + id: "app.rocksky.artist.getArtistAlbums", defs: { main: { - type: 'query', + type: "query", description: "Get artist's albums", parameters: { - type: 'params', - required: ['uri'], + type: "params", + required: ["uri"], properties: { uri: { - type: 'string', - description: 'The URI of the artist to retrieve albums from', - format: 'at-uri', + type: "string", + description: "The URI of the artist to retrieve albums from", + format: "at-uri", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { albums: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.album.defs#albumViewBasic', + type: "ref", + ref: "lex:app.rocksky.album.defs#albumViewBasic", }, }, }, @@ -1106,27 +1106,27 @@ export const schemaDict = { }, AppRockskyArtistGetArtist: { lexicon: 1, - id: 'app.rocksky.artist.getArtist', + id: "app.rocksky.artist.getArtist", defs: { main: { - type: 'query', - description: 'Get artist details', + type: "query", + description: "Get artist details", parameters: { - type: 'params', - required: ['uri'], + type: "params", + required: ["uri"], properties: { uri: { - type: 'string', - description: 'The URI of the artist to retrieve details from', - format: 'at-uri', + type: "string", + description: "The URI of the artist to retrieve details from", + format: "at-uri", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.artist.defs#artistViewDetailed', + type: "ref", + ref: "lex:app.rocksky.artist.defs#artistViewDetailed", }, }, }, @@ -1134,36 +1134,36 @@ export const schemaDict = { }, AppRockskyArtistGetArtists: { lexicon: 1, - id: 'app.rocksky.artist.getArtists', + id: "app.rocksky.artist.getArtists", defs: { main: { - type: 'query', - description: 'Get artists', + type: "query", + description: "Get artists", parameters: { - type: 'params', + type: "params", properties: { limit: { - type: 'integer', - description: 'The maximum number of artists to return', + type: "integer", + description: "The maximum number of artists to return", minimum: 1, }, offset: { - type: 'integer', - description: 'The offset for pagination', + type: "integer", + description: "The offset for pagination", minimum: 0, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { artists: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.artist.defs#artistViewBasic', + type: "ref", + ref: "lex:app.rocksky.artist.defs#artistViewBasic", }, }, }, @@ -1174,41 +1174,41 @@ export const schemaDict = { }, AppRockskyArtistGetArtistTracks: { lexicon: 1, - id: 'app.rocksky.artist.getArtistTracks', + id: "app.rocksky.artist.getArtistTracks", defs: { main: { - type: 'query', + type: "query", description: "Get artist's tracks", parameters: { - type: 'params', + type: "params", properties: { uri: { - type: 'string', - description: 'The URI of the artist to retrieve albums from', - format: 'at-uri', + type: "string", + description: "The URI of the artist to retrieve albums from", + format: "at-uri", }, limit: { - type: 'integer', - description: 'The maximum number of tracks to return', + type: "integer", + description: "The maximum number of tracks to return", minimum: 1, }, offset: { - type: 'integer', - description: 'The offset for pagination', + type: "integer", + description: "The offset for pagination", minimum: 0, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { tracks: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.song.defs#songViewBasic', + type: "ref", + ref: "lex:app.rocksky.song.defs#songViewBasic", }, }, }, @@ -1219,31 +1219,31 @@ export const schemaDict = { }, AppRockskyChartsDefs: { lexicon: 1, - id: 'app.rocksky.charts.defs', + id: "app.rocksky.charts.defs", defs: { chartsView: { - type: 'object', + type: "object", properties: { scrobbles: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.charts.defs#scrobbleViewBasic', + type: "ref", + ref: "lex:app.rocksky.charts.defs#scrobbleViewBasic", }, }, }, }, scrobbleViewBasic: { - type: 'object', + type: "object", properties: { date: { - type: 'string', - description: 'The date of the scrobble.', - format: 'datetime', + type: "string", + description: "The date of the scrobble.", + format: "datetime", }, count: { - type: 'integer', - description: 'The number of scrobbles on this date.', + type: "integer", + description: "The number of scrobbles on this date.", }, }, }, @@ -1251,41 +1251,41 @@ export const schemaDict = { }, AppRockskyChartsGetScrobblesChart: { lexicon: 1, - id: 'app.rocksky.charts.getScrobblesChart', + id: "app.rocksky.charts.getScrobblesChart", defs: { main: { - type: 'query', - description: 'Get the scrobbles chart', + type: "query", + description: "Get the scrobbles chart", parameters: { - type: 'params', + type: "params", properties: { did: { - type: 'string', - description: 'The DID or handle of the actor', - format: 'at-identifier', + type: "string", + description: "The DID or handle of the actor", + format: "at-identifier", }, artisturi: { - type: 'string', - description: 'The URI of the artist to filter by', - format: 'at-uri', + type: "string", + description: "The URI of the artist to filter by", + format: "at-uri", }, albumuri: { - type: 'string', - description: 'The URI of the album to filter by', - format: 'at-uri', + type: "string", + description: "The URI of the album to filter by", + format: "at-uri", }, songuri: { - type: 'string', - description: 'The URI of the track to filter by', - format: 'at-uri', + type: "string", + description: "The URI of the track to filter by", + format: "at-uri", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.charts.defs#chartsView', + type: "ref", + ref: "lex:app.rocksky.charts.defs#chartsView", }, }, }, @@ -1293,61 +1293,61 @@ export const schemaDict = { }, AppRockskyDropboxDefs: { lexicon: 1, - id: 'app.rocksky.dropbox.defs', + id: "app.rocksky.dropbox.defs", defs: { fileView: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the file.', + type: "string", + description: "The unique identifier of the file.", }, name: { - type: 'string', - description: 'The name of the file.', + type: "string", + description: "The name of the file.", }, pathLower: { - type: 'string', - description: 'The lowercased path of the file.', + type: "string", + description: "The lowercased path of the file.", }, pathDisplay: { - type: 'string', - description: 'The display path of the file.', + type: "string", + description: "The display path of the file.", }, clientModified: { - type: 'string', + type: "string", description: - 'The last modified date and time of the file on the client.', - format: 'datetime', + "The last modified date and time of the file on the client.", + format: "datetime", }, serverModified: { - type: 'string', + type: "string", description: - 'The last modified date and time of the file on the server.', - format: 'datetime', + "The last modified date and time of the file on the server.", + format: "datetime", }, }, }, fileListView: { - type: 'object', + type: "object", properties: { files: { - type: 'array', - description: 'A list of files in the Dropbox.', + type: "array", + description: "A list of files in the Dropbox.", items: { - type: 'ref', - ref: 'lex:app.rocksky.dropbox.defs#fileView', + type: "ref", + ref: "lex:app.rocksky.dropbox.defs#fileView", }, }, }, }, temporaryLinkView: { - type: 'object', + type: "object", properties: { link: { - type: 'string', - description: 'The temporary link to access the file.', - format: 'uri', + type: "string", + description: "The temporary link to access the file.", + format: "uri", }, }, }, @@ -1355,48 +1355,48 @@ export const schemaDict = { }, AppRockskyDropboxDownloadFile: { lexicon: 1, - id: 'app.rocksky.dropbox.downloadFile', + id: "app.rocksky.dropbox.downloadFile", defs: { main: { - type: 'query', - description: 'Download a file from Dropbox by its unique identifier', + type: "query", + description: "Download a file from Dropbox by its unique identifier", parameters: { - type: 'params', - required: ['fileId'], + type: "params", + required: ["fileId"], properties: { fileId: { - type: 'string', - description: 'The unique identifier of the file to download', + type: "string", + description: "The unique identifier of the file to download", }, }, }, output: { - encoding: 'application/octet-stream', + encoding: "application/octet-stream", }, }, }, }, AppRockskyDropboxGetFiles: { lexicon: 1, - id: 'app.rocksky.dropbox.getFiles', + id: "app.rocksky.dropbox.getFiles", defs: { main: { - type: 'query', - description: 'Retrieve a list of files from Dropbox', + type: "query", + description: "Retrieve a list of files from Dropbox", parameters: { - type: 'params', + type: "params", properties: { at: { - type: 'string', - description: 'Path to the Dropbox folder or root directory', + type: "string", + description: "Path to the Dropbox folder or root directory", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.dropbox.defs#fileListView', + type: "ref", + ref: "lex:app.rocksky.dropbox.defs#fileListView", }, }, }, @@ -1404,26 +1404,26 @@ export const schemaDict = { }, AppRockskyDropboxGetMetadata: { lexicon: 1, - id: 'app.rocksky.dropbox.getMetadata', + id: "app.rocksky.dropbox.getMetadata", defs: { main: { - type: 'query', - description: 'Retrieve metadata of a file or folder in Dropbox', + type: "query", + description: "Retrieve metadata of a file or folder in Dropbox", parameters: { - type: 'params', - required: ['path'], + type: "params", + required: ["path"], properties: { path: { - type: 'string', - description: 'Path to the file or folder in Dropbox', + type: "string", + description: "Path to the file or folder in Dropbox", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.dropbox.defs#fileView', + type: "ref", + ref: "lex:app.rocksky.dropbox.defs#fileView", }, }, }, @@ -1431,26 +1431,26 @@ export const schemaDict = { }, AppRockskyDropboxGetTemporaryLink: { lexicon: 1, - id: 'app.rocksky.dropbox.getTemporaryLink', + id: "app.rocksky.dropbox.getTemporaryLink", defs: { main: { - type: 'query', - description: 'Retrieve a temporary link to access a file in Dropbox', + type: "query", + description: "Retrieve a temporary link to access a file in Dropbox", parameters: { - type: 'params', - required: ['path'], + type: "params", + required: ["path"], properties: { path: { - type: 'string', - description: 'Path to the file in Dropbox', + type: "string", + description: "Path to the file in Dropbox", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.dropbox.defs#temporaryLinkView', + type: "ref", + ref: "lex:app.rocksky.dropbox.defs#temporaryLinkView", }, }, }, @@ -1458,103 +1458,103 @@ export const schemaDict = { }, AppRockskyFeedDefs: { lexicon: 1, - id: 'app.rocksky.feed.defs', + id: "app.rocksky.feed.defs", defs: { searchResultsView: { - type: 'object', + type: "object", properties: { hits: { - type: 'array', + type: "array", items: { - type: 'union', + type: "union", refs: [ - 'lex:app.rocksky.song.defs#songViewBasic', - 'lex:app.rocksky.album.defs#albumViewBasic', - 'lex:app.rocksky.artist.defs#artistViewBasic', - 'lex:app.rocksky.playlist.defs#playlistViewBasic', - 'lex:app.rocksky.actor.defs#profileViewBasic', + "lex:app.rocksky.song.defs#songViewBasic", + "lex:app.rocksky.album.defs#albumViewBasic", + "lex:app.rocksky.artist.defs#artistViewBasic", + "lex:app.rocksky.playlist.defs#playlistViewBasic", + "lex:app.rocksky.actor.defs#profileViewBasic", ], }, }, processingTimeMs: { - type: 'integer', + type: "integer", }, limit: { - type: 'integer', + type: "integer", }, offset: { - type: 'integer', + type: "integer", }, estimatedTotalHits: { - type: 'integer', + type: "integer", }, }, }, nowPlayingView: { - type: 'object', + type: "object", properties: { album: { - type: 'string', + type: "string", }, albumArt: { - type: 'string', - format: 'uri', + type: "string", + format: "uri", }, albumArtist: { - type: 'string', + type: "string", }, albumUri: { - type: 'string', - format: 'at-uri', + type: "string", + format: "at-uri", }, artist: { - type: 'string', + type: "string", }, artistUri: { - type: 'string', - format: 'at-uri', + type: "string", + format: "at-uri", }, avatar: { - type: 'string', - format: 'uri', + type: "string", + format: "uri", }, createdAt: { - type: 'string', + type: "string", }, did: { - type: 'string', - format: 'at-identifier', + type: "string", + format: "at-identifier", }, handle: { - type: 'string', + type: "string", }, id: { - type: 'string', + type: "string", }, title: { - type: 'string', + type: "string", }, trackId: { - type: 'string', + type: "string", }, trackUri: { - type: 'string', - format: 'at-uri', + type: "string", + format: "at-uri", }, uri: { - type: 'string', - format: 'at-uri', + type: "string", + format: "at-uri", }, }, }, nowPlayingsView: { - type: 'object', + type: "object", properties: { nowPlayings: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.feed.defs#nowPlayingView', + type: "ref", + ref: "lex:app.rocksky.feed.defs#nowPlayingView", }, }, }, @@ -1563,27 +1563,27 @@ export const schemaDict = { }, AppRockskyFeedGetNowPlayings: { lexicon: 1, - id: 'app.rocksky.feed.getNowPlayings', + id: "app.rocksky.feed.getNowPlayings", defs: { main: { - type: 'query', - description: 'Get all currently playing tracks by users', + type: "query", + description: "Get all currently playing tracks by users", parameters: { - type: 'params', + type: "params", properties: { size: { - type: 'integer', + type: "integer", description: - 'The maximum number of now playing tracks to return.', + "The maximum number of now playing tracks to return.", minimum: 1, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.feed.defs#nowPlayingsView', + type: "ref", + ref: "lex:app.rocksky.feed.defs#nowPlayingsView", }, }, }, @@ -1591,26 +1591,26 @@ export const schemaDict = { }, AppRockskyFeedSearch: { lexicon: 1, - id: 'app.rocksky.feed.search', + id: "app.rocksky.feed.search", defs: { main: { - type: 'query', - description: 'Search for content in the feed', + type: "query", + description: "Search for content in the feed", parameters: { - type: 'params', - required: ['query'], + type: "params", + required: ["query"], properties: { query: { - type: 'string', - description: 'The search query string', + type: "string", + description: "The search query string", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.feed.defs#searchResultsView', + type: "ref", + ref: "lex:app.rocksky.feed.defs#searchResultsView", }, }, }, @@ -1618,25 +1618,25 @@ export const schemaDict = { }, AppRockskyGoogledriveDefs: { lexicon: 1, - id: 'app.rocksky.googledrive.defs', + id: "app.rocksky.googledrive.defs", defs: { fileView: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the file.', + type: "string", + description: "The unique identifier of the file.", }, }, }, fileListView: { - type: 'object', + type: "object", properties: { files: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.googledrive.defs#fileView', + type: "ref", + ref: "lex:app.rocksky.googledrive.defs#fileView", }, }, }, @@ -1645,50 +1645,50 @@ export const schemaDict = { }, AppRockskyGoogledriveDownloadFile: { lexicon: 1, - id: 'app.rocksky.googledrive.downloadFile', + id: "app.rocksky.googledrive.downloadFile", defs: { main: { - type: 'query', + type: "query", description: - 'Download a file from Google Drive by its unique identifier', + "Download a file from Google Drive by its unique identifier", parameters: { - type: 'params', - required: ['fileId'], + type: "params", + required: ["fileId"], properties: { fileId: { - type: 'string', - description: 'The unique identifier of the file to download', + type: "string", + description: "The unique identifier of the file to download", }, }, }, output: { - encoding: 'application/octet-stream', + encoding: "application/octet-stream", }, }, }, }, AppRockskyGoogledriveGetFile: { lexicon: 1, - id: 'app.rocksky.googledrive.getFile', + id: "app.rocksky.googledrive.getFile", defs: { main: { - type: 'query', - description: 'Get a file from Google Drive by its unique identifier', + type: "query", + description: "Get a file from Google Drive by its unique identifier", parameters: { - type: 'params', - required: ['fileId'], + type: "params", + required: ["fileId"], properties: { fileId: { - type: 'string', - description: 'The unique identifier of the file to retrieve', + type: "string", + description: "The unique identifier of the file to retrieve", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.googledrive.defs#fileView', + type: "ref", + ref: "lex:app.rocksky.googledrive.defs#fileView", }, }, }, @@ -1696,25 +1696,25 @@ export const schemaDict = { }, AppRockskyGoogledriveGetFiles: { lexicon: 1, - id: 'app.rocksky.googledrive.getFiles', + id: "app.rocksky.googledrive.getFiles", defs: { main: { - type: 'query', - description: 'Get a list of files from Google Drive', + type: "query", + description: "Get a list of files from Google Drive", parameters: { - type: 'params', + type: "params", properties: { at: { - type: 'string', - description: 'Path to the Google Drive folder or root directory', + type: "string", + description: "Path to the Google Drive folder or root directory", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.googledrive.defs#fileListView', + type: "ref", + ref: "lex:app.rocksky.googledrive.defs#fileListView", }, }, }, @@ -1722,29 +1722,29 @@ export const schemaDict = { }, AppRockskyLikeDislikeShout: { lexicon: 1, - id: 'app.rocksky.like.dislikeShout', + id: "app.rocksky.like.dislikeShout", defs: { main: { - type: 'procedure', - description: 'Dislike a shout', + type: "procedure", + description: "Dislike a shout", input: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { uri: { - type: 'string', - description: 'The unique identifier of the shout to dislike', - format: 'at-uri', + type: "string", + description: "The unique identifier of the shout to dislike", + format: "at-uri", }, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.shout.defs#shoutView', + type: "ref", + ref: "lex:app.rocksky.shout.defs#shoutView", }, }, }, @@ -1752,29 +1752,29 @@ export const schemaDict = { }, AppRockskyLikeDislikeSong: { lexicon: 1, - id: 'app.rocksky.like.dislikeSong', + id: "app.rocksky.like.dislikeSong", defs: { main: { - type: 'procedure', - description: 'Dislike a song', + type: "procedure", + description: "Dislike a song", input: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { uri: { - type: 'string', - description: 'The unique identifier of the song to dislike', - format: 'at-uri', + type: "string", + description: "The unique identifier of the song to dislike", + format: "at-uri", }, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.song.defs#songViewDetailed', + type: "ref", + ref: "lex:app.rocksky.song.defs#songViewDetailed", }, }, }, @@ -1782,24 +1782,24 @@ export const schemaDict = { }, AppRockskyLike: { lexicon: 1, - id: 'app.rocksky.like', + id: "app.rocksky.like", defs: { main: { - type: 'record', - description: 'A declaration of a like.', - key: 'tid', + type: "record", + description: "A declaration of a like.", + key: "tid", record: { - type: 'object', - required: ['createdAt', 'subject'], + type: "object", + required: ["createdAt", "subject"], properties: { createdAt: { - type: 'string', - description: 'The date when the like was created.', - format: 'datetime', + type: "string", + description: "The date when the like was created.", + format: "datetime", }, subject: { - type: 'ref', - ref: 'lex:com.atproto.repo.strongRef', + type: "ref", + ref: "lex:com.atproto.repo.strongRef", }, }, }, @@ -1808,29 +1808,29 @@ export const schemaDict = { }, AppRockskyLikeLikeShout: { lexicon: 1, - id: 'app.rocksky.like.likeShout', + id: "app.rocksky.like.likeShout", defs: { main: { - type: 'procedure', - description: 'Like a shout', + type: "procedure", + description: "Like a shout", input: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { uri: { - type: 'string', - description: 'The unique identifier of the shout to like', - format: 'at-uri', + type: "string", + description: "The unique identifier of the shout to like", + format: "at-uri", }, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.shout.defs#shoutView', + type: "ref", + ref: "lex:app.rocksky.shout.defs#shoutView", }, }, }, @@ -1838,29 +1838,62 @@ export const schemaDict = { }, AppRockskyLikeLikeSong: { lexicon: 1, - id: 'app.rocksky.like.likeSong', + id: "app.rocksky.like.likeSong", defs: { main: { - type: 'procedure', - description: 'Like a song', + type: "procedure", + description: "Like a song", input: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { uri: { - type: 'string', - description: 'The unique identifier of the song to like', - format: 'at-uri', + type: "string", + description: "The unique identifier of the song to like", + format: "at-uri", }, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.song.defs#songViewDetailed', + type: "ref", + ref: "lex:app.rocksky.song.defs#songViewDetailed", + }, + }, + }, + }, + }, + AppRockskyPlayerAddDirectoryToQueue: { + lexicon: 1, + id: "app.rocksky.player.addDirectoryToQueue", + defs: { + main: { + type: "procedure", + description: "Add directory to the player's queue", + parameters: { + type: "params", + required: ["directory"], + properties: { + playerId: { + type: "string", + }, + directory: { + type: "string", + description: "The directory to add to the queue", + }, + position: { + type: "integer", + description: + "Position in the queue to insert the directory at, defaults to the end if not specified", + }, + shuffle: { + type: "boolean", + description: + "Whether to shuffle the added directory in the queue", + }, }, }, }, @@ -1868,33 +1901,33 @@ export const schemaDict = { }, AppRockskyPlayerAddItemsToQueue: { lexicon: 1, - id: 'app.rocksky.player.addItemsToQueue', + id: "app.rocksky.player.addItemsToQueue", defs: { main: { - type: 'procedure', + type: "procedure", description: "Add items to the player's queue", parameters: { - type: 'params', - required: ['items'], + type: "params", + required: ["items"], properties: { playerId: { - type: 'string', + type: "string", }, items: { - type: 'array', + type: "array", items: { - type: 'string', - description: 'List of file identifiers to add to the queue', + type: "string", + description: "List of file identifiers to add to the queue", }, }, position: { - type: 'integer', + type: "integer", description: - 'Position in the queue to insert the items at, defaults to the end if not specified', + "Position in the queue to insert the items at, defaults to the end if not specified", }, shuffle: { - type: 'boolean', - description: 'Whether to shuffle the added items in the queue', + type: "boolean", + description: "Whether to shuffle the added items in the queue", }, }, }, @@ -1903,25 +1936,25 @@ export const schemaDict = { }, AppRockskyPlayerDefs: { lexicon: 1, - id: 'app.rocksky.player.defs', + id: "app.rocksky.player.defs", defs: { currentlyPlayingViewDetailed: { - type: 'object', + type: "object", properties: { title: { - type: 'string', - description: 'The title of the currently playing track', + type: "string", + description: "The title of the currently playing track", }, }, }, playbackQueueViewDetailed: { - type: 'object', + type: "object", properties: { tracks: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.song.defs.songViewBasic', + type: "ref", + ref: "lex:app.rocksky.song.defs.songViewBasic", }, }, }, @@ -1930,30 +1963,30 @@ export const schemaDict = { }, AppRockskyPlayerGetCurrentlyPlaying: { lexicon: 1, - id: 'app.rocksky.player.getCurrentlyPlaying', + id: "app.rocksky.player.getCurrentlyPlaying", defs: { main: { - type: 'query', - description: 'Get the currently playing track', + type: "query", + description: "Get the currently playing track", parameters: { - type: 'params', + type: "params", properties: { playerId: { - type: 'string', + type: "string", }, actor: { - type: 'string', + type: "string", description: - 'Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user.', - format: 'at-identifier', + "Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user.", + format: "at-identifier", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.player.defs#currentlyPlayingViewDetailed', + type: "ref", + ref: "lex:app.rocksky.player.defs#currentlyPlayingViewDetailed", }, }, }, @@ -1961,24 +1994,24 @@ export const schemaDict = { }, AppRockskyPlayerGetPlaybackQueue: { lexicon: 1, - id: 'app.rocksky.player.getPlaybackQueue', + id: "app.rocksky.player.getPlaybackQueue", defs: { main: { - type: 'query', - description: 'Retrieve the current playback queue', + type: "query", + description: "Retrieve the current playback queue", parameters: { - type: 'params', + type: "params", properties: { playerId: { - type: 'string', + type: "string", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.player.defs#playbackQueueViewDetailed', + type: "ref", + ref: "lex:app.rocksky.player.defs#playbackQueueViewDetailed", }, }, }, @@ -1986,16 +2019,16 @@ export const schemaDict = { }, AppRockskyPlayerNext: { lexicon: 1, - id: 'app.rocksky.player.next', + id: "app.rocksky.player.next", defs: { main: { - type: 'procedure', - description: 'Play the next track in the queue', + type: "procedure", + description: "Play the next track in the queue", parameters: { - type: 'params', + type: "params", properties: { playerId: { - type: 'string', + type: "string", }, }, }, @@ -2004,16 +2037,16 @@ export const schemaDict = { }, AppRockskyPlayerPause: { lexicon: 1, - id: 'app.rocksky.player.pause', + id: "app.rocksky.player.pause", defs: { main: { - type: 'procedure', - description: 'Pause the currently playing track', + type: "procedure", + description: "Pause the currently playing track", parameters: { - type: 'params', + type: "params", properties: { playerId: { - type: 'string', + type: "string", }, }, }, @@ -2022,29 +2055,29 @@ export const schemaDict = { }, AppRockskyPlayerPlayDirectory: { lexicon: 1, - id: 'app.rocksky.player.playDirectory', + id: "app.rocksky.player.playDirectory", defs: { main: { - type: 'procedure', - description: 'Play all tracks in a directory', + type: "procedure", + description: "Play all tracks in a directory", parameters: { - type: 'params', - required: ['directoryId'], + type: "params", + required: ["directoryId"], properties: { playerId: { - type: 'string', + type: "string", }, directoryId: { - type: 'string', + type: "string", }, shuffle: { - type: 'boolean', + type: "boolean", }, recurse: { - type: 'boolean', + type: "boolean", }, position: { - type: 'integer', + type: "integer", }, }, }, @@ -2053,20 +2086,20 @@ export const schemaDict = { }, AppRockskyPlayerPlayFile: { lexicon: 1, - id: 'app.rocksky.player.playFile', + id: "app.rocksky.player.playFile", defs: { main: { - type: 'procedure', - description: 'Play a specific audio file', + type: "procedure", + description: "Play a specific audio file", parameters: { - type: 'params', - required: ['fileId'], + type: "params", + required: ["fileId"], properties: { playerId: { - type: 'string', + type: "string", }, fileId: { - type: 'string', + type: "string", }, }, }, @@ -2075,16 +2108,16 @@ export const schemaDict = { }, AppRockskyPlayerPlay: { lexicon: 1, - id: 'app.rocksky.player.play', + id: "app.rocksky.player.play", defs: { main: { - type: 'procedure', - description: 'Resume playback of the currently paused track', + type: "procedure", + description: "Resume playback of the currently paused track", parameters: { - type: 'params', + type: "params", properties: { playerId: { - type: 'string', + type: "string", }, }, }, @@ -2093,16 +2126,16 @@ export const schemaDict = { }, AppRockskyPlayerPrevious: { lexicon: 1, - id: 'app.rocksky.player.previous', + id: "app.rocksky.player.previous", defs: { main: { - type: 'procedure', - description: 'Play the previous track in the queue', + type: "procedure", + description: "Play the previous track in the queue", parameters: { - type: 'params', + type: "params", properties: { playerId: { - type: 'string', + type: "string", }, }, }, @@ -2111,22 +2144,22 @@ export const schemaDict = { }, AppRockskyPlayerSeek: { lexicon: 1, - id: 'app.rocksky.player.seek', + id: "app.rocksky.player.seek", defs: { main: { - type: 'procedure', + type: "procedure", description: - 'Seek to a specific position in the currently playing track', + "Seek to a specific position in the currently playing track", parameters: { - type: 'params', - required: ['position'], + type: "params", + required: ["position"], properties: { playerId: { - type: 'string', + type: "string", }, position: { - type: 'integer', - description: 'The position in seconds to seek to', + type: "integer", + description: "The position in seconds to seek to", }, }, }, @@ -2135,22 +2168,22 @@ export const schemaDict = { }, AppRockskyPlaylistCreatePlaylist: { lexicon: 1, - id: 'app.rocksky.playlist.createPlaylist', + id: "app.rocksky.playlist.createPlaylist", defs: { main: { - type: 'procedure', - description: 'Create a new playlist', + type: "procedure", + description: "Create a new playlist", parameters: { - type: 'params', - required: ['name'], + type: "params", + required: ["name"], properties: { name: { - type: 'string', - description: 'The name of the playlist', + type: "string", + description: "The name of the playlist", }, description: { - type: 'string', - description: 'A brief description of the playlist', + type: "string", + description: "A brief description of the playlist", }, }, }, @@ -2159,122 +2192,122 @@ export const schemaDict = { }, AppRockskyPlaylistDefs: { lexicon: 1, - id: 'app.rocksky.playlist.defs', + id: "app.rocksky.playlist.defs", defs: { playlistViewDetailed: { - type: 'object', + type: "object", description: - 'Detailed view of a playlist, including its tracks and metadata', + "Detailed view of a playlist, including its tracks and metadata", properties: { id: { - type: 'string', - description: 'The unique identifier of the playlist.', + type: "string", + description: "The unique identifier of the playlist.", }, title: { - type: 'string', - description: 'The title of the playlist.', + type: "string", + description: "The title of the playlist.", }, uri: { - type: 'string', - description: 'The URI of the playlist.', - format: 'at-uri', + type: "string", + description: "The URI of the playlist.", + format: "at-uri", }, curatorDid: { - type: 'string', - description: 'The DID of the curator of the playlist.', - format: 'at-identifier', + type: "string", + description: "The DID of the curator of the playlist.", + format: "at-identifier", }, curatorHandle: { - type: 'string', - description: 'The handle of the curator of the playlist.', - format: 'at-identifier', + type: "string", + description: "The handle of the curator of the playlist.", + format: "at-identifier", }, curatorName: { - type: 'string', - description: 'The name of the curator of the playlist.', + type: "string", + description: "The name of the curator of the playlist.", }, curatorAvatarUrl: { - type: 'string', - description: 'The URL of the avatar image of the curator.', - format: 'uri', + type: "string", + description: "The URL of the avatar image of the curator.", + format: "uri", }, description: { - type: 'string', - description: 'A description of the playlist.', + type: "string", + description: "A description of the playlist.", }, coverImageUrl: { - type: 'string', - description: 'The URL of the cover image for the playlist.', - format: 'uri', + type: "string", + description: "The URL of the cover image for the playlist.", + format: "uri", }, createdAt: { - type: 'string', - description: 'The date and time when the playlist was created.', - format: 'datetime', + type: "string", + description: "The date and time when the playlist was created.", + format: "datetime", }, tracks: { - type: 'array', - description: 'A list of tracks in the playlist.', + type: "array", + description: "A list of tracks in the playlist.", items: { - type: 'ref', - ref: 'lex:app.rocksky.song.defs#songViewBasic', + type: "ref", + ref: "lex:app.rocksky.song.defs#songViewBasic", }, }, }, }, playlistViewBasic: { - type: 'object', - description: 'Basic view of a playlist, including its metadata', + type: "object", + description: "Basic view of a playlist, including its metadata", properties: { id: { - type: 'string', - description: 'The unique identifier of the playlist.', + type: "string", + description: "The unique identifier of the playlist.", }, title: { - type: 'string', - description: 'The title of the playlist.', + type: "string", + description: "The title of the playlist.", }, uri: { - type: 'string', - description: 'The URI of the playlist.', - format: 'at-uri', + type: "string", + description: "The URI of the playlist.", + format: "at-uri", }, curatorDid: { - type: 'string', - description: 'The DID of the curator of the playlist.', - format: 'at-identifier', + type: "string", + description: "The DID of the curator of the playlist.", + format: "at-identifier", }, curatorHandle: { - type: 'string', - description: 'The handle of the curator of the playlist.', - format: 'at-identifier', + type: "string", + description: "The handle of the curator of the playlist.", + format: "at-identifier", }, curatorName: { - type: 'string', - description: 'The name of the curator of the playlist.', + type: "string", + description: "The name of the curator of the playlist.", }, curatorAvatarUrl: { - type: 'string', - description: 'The URL of the avatar image of the curator.', - format: 'uri', + type: "string", + description: "The URL of the avatar image of the curator.", + format: "uri", }, description: { - type: 'string', - description: 'A description of the playlist.', + type: "string", + description: "A description of the playlist.", }, coverImageUrl: { - type: 'string', - description: 'The URL of the cover image for the playlist.', - format: 'uri', + type: "string", + description: "The URL of the cover image for the playlist.", + format: "uri", }, createdAt: { - type: 'string', - description: 'The date and time when the playlist was created.', - format: 'datetime', + type: "string", + description: "The date and time when the playlist was created.", + format: "datetime", }, trackCount: { - type: 'integer', - description: 'The number of tracks in the playlist.', + type: "integer", + description: "The number of tracks in the playlist.", minimum: 0, }, }, @@ -2283,27 +2316,27 @@ export const schemaDict = { }, AppRockskyPlaylistGetPlaylist: { lexicon: 1, - id: 'app.rocksky.playlist.getPlaylist', + id: "app.rocksky.playlist.getPlaylist", defs: { main: { - type: 'query', - description: 'Retrieve a playlist by its ID', + type: "query", + description: "Retrieve a playlist by its ID", parameters: { - type: 'params', - required: ['uri'], + type: "params", + required: ["uri"], properties: { uri: { - type: 'string', - description: 'The URI of the playlist to retrieve.', - format: 'at-uri', + type: "string", + description: "The URI of the playlist to retrieve.", + format: "at-uri", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.playlist.defs#playlistViewDetailed', + type: "ref", + ref: "lex:app.rocksky.playlist.defs#playlistViewDetailed", }, }, }, @@ -2311,35 +2344,35 @@ export const schemaDict = { }, AppRockskyPlaylistGetPlaylists: { lexicon: 1, - id: 'app.rocksky.playlist.getPlaylists', + id: "app.rocksky.playlist.getPlaylists", defs: { main: { - type: 'query', - description: 'Retrieve a list of playlists', + type: "query", + description: "Retrieve a list of playlists", parameters: { - type: 'params', + type: "params", properties: { limit: { - type: 'integer', - description: 'The maximum number of playlists to return.', + type: "integer", + description: "The maximum number of playlists to return.", }, offset: { - type: 'integer', + type: "integer", description: - 'The offset for pagination, used to skip a number of playlists.', + "The offset for pagination, used to skip a number of playlists.", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { playlists: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.playlist.defs#playlistViewBasic', + type: "ref", + ref: "lex:app.rocksky.playlist.defs#playlistViewBasic", }, }, }, @@ -2350,28 +2383,28 @@ export const schemaDict = { }, AppRockskyPlaylistInsertDirectory: { lexicon: 1, - id: 'app.rocksky.playlist.insertDirectory', + id: "app.rocksky.playlist.insertDirectory", defs: { main: { - type: 'procedure', - description: 'Insert a directory into a playlist', + type: "procedure", + description: "Insert a directory into a playlist", parameters: { - type: 'params', - required: ['uri', 'directory'], + type: "params", + required: ["uri", "directory"], properties: { uri: { - type: 'string', - description: 'The URI of the playlist to start', - format: 'at-uri', + type: "string", + description: "The URI of the playlist to start", + format: "at-uri", }, directory: { - type: 'string', - description: 'The directory (id) to insert into the playlist', + type: "string", + description: "The directory (id) to insert into the playlist", }, position: { - type: 'integer', + type: "integer", description: - 'The position in the playlist to insert the directory at, if not specified, the directory will be appended', + "The position in the playlist to insert the directory at, if not specified, the directory will be appended", }, }, }, @@ -2380,31 +2413,31 @@ export const schemaDict = { }, AppRockskyPlaylistInsertFiles: { lexicon: 1, - id: 'app.rocksky.playlist.insertFiles', + id: "app.rocksky.playlist.insertFiles", defs: { main: { - type: 'procedure', - description: 'Insert files into a playlist', + type: "procedure", + description: "Insert files into a playlist", parameters: { - type: 'params', - required: ['uri', 'files'], + type: "params", + required: ["uri", "files"], properties: { uri: { - type: 'string', - description: 'The URI of the playlist to start', - format: 'at-uri', + type: "string", + description: "The URI of the playlist to start", + format: "at-uri", }, files: { - type: 'array', + type: "array", items: { - type: 'string', - description: 'List of file (id) to insert into the playlist', + type: "string", + description: "List of file (id) to insert into the playlist", }, }, position: { - type: 'integer', + type: "integer", description: - 'The position in the playlist to insert the files at, if not specified, files will be appended', + "The position in the playlist to insert the files at, if not specified, files will be appended", }, }, }, @@ -2413,62 +2446,62 @@ export const schemaDict = { }, AppRockskyPlaylist: { lexicon: 1, - id: 'app.rocksky.playlist', + id: "app.rocksky.playlist", defs: { main: { - type: 'record', - description: 'A declaration of a playlist.', - key: 'tid', + type: "record", + description: "A declaration of a playlist.", + key: "tid", record: { - type: 'object', - required: ['name', 'createdAt'], + type: "object", + required: ["name", "createdAt"], properties: { name: { - type: 'string', - description: 'The name of the playlist.', + type: "string", + description: "The name of the playlist.", minLength: 1, maxLength: 512, }, description: { - type: 'string', - description: 'The playlist description.', + type: "string", + description: "The playlist description.", minLength: 1, maxLength: 256, }, picture: { - type: 'blob', - description: 'The picture of the playlist.', - accept: ['image/png', 'image/jpeg'], + type: "blob", + description: "The picture of the playlist.", + accept: ["image/png", "image/jpeg"], maxSize: 2000000, }, tracks: { - type: 'array', - description: 'The tracks in the playlist.', + type: "array", + description: "The tracks in the playlist.", items: { - type: 'ref', - ref: 'lex:app.rocksky.song#record', + type: "ref", + ref: "lex:app.rocksky.song#record", }, }, createdAt: { - type: 'string', - description: 'The date the playlist was created.', - format: 'datetime', + type: "string", + description: "The date the playlist was created.", + format: "datetime", }, spotifyLink: { - type: 'string', - description: 'The Spotify link of the playlist.', + type: "string", + description: "The Spotify link of the playlist.", }, tidalLink: { - type: 'string', - description: 'The Tidal link of the playlist.', + type: "string", + description: "The Tidal link of the playlist.", }, youtubeLink: { - type: 'string', - description: 'The YouTube link of the playlist.', + type: "string", + description: "The YouTube link of the playlist.", }, appleMusicLink: { - type: 'string', - description: 'The Apple Music link of the playlist.', + type: "string", + description: "The Apple Music link of the playlist.", }, }, }, @@ -2477,19 +2510,19 @@ export const schemaDict = { }, AppRockskyPlaylistRemovePlaylist: { lexicon: 1, - id: 'app.rocksky.playlist.removePlaylist', + id: "app.rocksky.playlist.removePlaylist", defs: { main: { - type: 'procedure', - description: 'Remove a playlist', + type: "procedure", + description: "Remove a playlist", parameters: { - type: 'params', - required: ['uri'], + type: "params", + required: ["uri"], properties: { uri: { - type: 'string', - description: 'The URI of the playlist to remove', - format: 'at-uri', + type: "string", + description: "The URI of the playlist to remove", + format: "at-uri", }, }, }, @@ -2498,24 +2531,24 @@ export const schemaDict = { }, AppRockskyPlaylistRemoveTrack: { lexicon: 1, - id: 'app.rocksky.playlist.removeTrack', + id: "app.rocksky.playlist.removeTrack", defs: { main: { - type: 'procedure', - description: 'Remove a track from a playlist', + type: "procedure", + description: "Remove a track from a playlist", parameters: { - type: 'params', - required: ['uri', 'position'], + type: "params", + required: ["uri", "position"], properties: { uri: { - type: 'string', - description: 'The URI of the playlist to remove the track from', - format: 'at-uri', + type: "string", + description: "The URI of the playlist to remove the track from", + format: "at-uri", }, position: { - type: 'integer', + type: "integer", description: - 'The position of the track to remove in the playlist', + "The position of the track to remove in the playlist", }, }, }, @@ -2524,28 +2557,28 @@ export const schemaDict = { }, AppRockskyPlaylistStartPlaylist: { lexicon: 1, - id: 'app.rocksky.playlist.startPlaylist', + id: "app.rocksky.playlist.startPlaylist", defs: { main: { - type: 'procedure', - description: 'Start a playlist', + type: "procedure", + description: "Start a playlist", parameters: { - type: 'params', - required: ['uri'], + type: "params", + required: ["uri"], properties: { uri: { - type: 'string', - description: 'The URI of the playlist to start', - format: 'at-uri', + type: "string", + description: "The URI of the playlist to start", + format: "at-uri", }, shuffle: { - type: 'boolean', - description: 'Whether to shuffle the playlist when starting it', + type: "boolean", + description: "Whether to shuffle the playlist when starting it", }, position: { - type: 'integer', + type: "integer", description: - 'The position in the playlist to start from, if not specified, starts from the beginning', + "The position in the playlist to start from, if not specified, starts from the beginning", }, }, }, @@ -2554,67 +2587,67 @@ export const schemaDict = { }, AppRockskyRadioDefs: { lexicon: 1, - id: 'app.rocksky.radio.defs', + id: "app.rocksky.radio.defs", defs: { radioViewBasic: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the radio.', + type: "string", + description: "The unique identifier of the radio.", }, name: { - type: 'string', - description: 'The name of the radio.', + type: "string", + description: "The name of the radio.", }, description: { - type: 'string', - description: 'A brief description of the radio.', + type: "string", + description: "A brief description of the radio.", }, createdAt: { - type: 'string', - description: 'The date and time when the radio was created.', - format: 'datetime', + type: "string", + description: "The date and time when the radio was created.", + format: "datetime", }, }, }, radioViewDetailed: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the radio.', + type: "string", + description: "The unique identifier of the radio.", }, name: { - type: 'string', - description: 'The name of the radio.', + type: "string", + description: "The name of the radio.", }, description: { - type: 'string', - description: 'A brief description of the radio.', + type: "string", + description: "A brief description of the radio.", }, website: { - type: 'string', - description: 'The website of the radio.', - format: 'uri', + type: "string", + description: "The website of the radio.", + format: "uri", }, url: { - type: 'string', - description: 'The streaming URL of the radio.', - format: 'uri', + type: "string", + description: "The streaming URL of the radio.", + format: "uri", }, genre: { - type: 'string', - description: 'The genre of the radio.', + type: "string", + description: "The genre of the radio.", }, logo: { - type: 'string', - description: 'The logo of the radio station.', + type: "string", + description: "The logo of the radio station.", }, createdAt: { - type: 'string', - description: 'The date and time when the radio was created.', - format: 'datetime', + type: "string", + description: "The date and time when the radio was created.", + format: "datetime", }, }, }, @@ -2622,54 +2655,54 @@ export const schemaDict = { }, AppRockskyRadio: { lexicon: 1, - id: 'app.rocksky.radio', + id: "app.rocksky.radio", defs: { main: { - type: 'record', - description: 'A declaration of a radio station.', - key: 'tid', + type: "record", + description: "A declaration of a radio station.", + key: "tid", record: { - type: 'object', - required: ['name', 'url', 'createdAt'], + type: "object", + required: ["name", "url", "createdAt"], properties: { name: { - type: 'string', - description: 'The name of the radio station.', + type: "string", + description: "The name of the radio station.", minLength: 1, maxLength: 512, }, url: { - type: 'string', - description: 'The URL of the radio station.', - format: 'uri', + type: "string", + description: "The URL of the radio station.", + format: "uri", }, description: { - type: 'string', - description: 'A description of the radio station.', + type: "string", + description: "A description of the radio station.", minLength: 1, maxLength: 1000, }, genre: { - type: 'string', - description: 'The genre of the radio station.', + type: "string", + description: "The genre of the radio station.", minLength: 1, maxLength: 256, }, logo: { - type: 'blob', - description: 'The logo of the radio station.', - accept: ['image/png', 'image/jpeg'], + type: "blob", + description: "The logo of the radio station.", + accept: ["image/png", "image/jpeg"], maxSize: 2000000, }, website: { - type: 'string', - description: 'The website of the radio station.', - format: 'uri', + type: "string", + description: "The website of the radio station.", + format: "uri", }, createdAt: { - type: 'string', - description: 'The date when the radio station was created.', - format: 'datetime', + type: "string", + description: "The date when the radio station was created.", + format: "datetime", }, }, }, @@ -2678,125 +2711,125 @@ export const schemaDict = { }, AppRockskyScrobbleCreateScrobble: { lexicon: 1, - id: 'app.rocksky.scrobble.createScrobble', + id: "app.rocksky.scrobble.createScrobble", defs: { main: { - type: 'procedure', - description: 'Create a new scrobble', + type: "procedure", + description: "Create a new scrobble", input: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', - required: ['title', 'artist'], + type: "object", + required: ["title", "artist"], properties: { title: { - type: 'string', - description: 'The title of the track being scrobbled', + type: "string", + description: "The title of the track being scrobbled", }, artist: { - type: 'string', - description: 'The artist of the track being scrobbled', + type: "string", + description: "The artist of the track being scrobbled", }, album: { - type: 'string', - description: 'The album of the track being scrobbled', + type: "string", + description: "The album of the track being scrobbled", }, duration: { - type: 'integer', - description: 'The duration of the track in seconds', + type: "integer", + description: "The duration of the track in seconds", }, mbId: { - type: 'string', - description: 'The MusicBrainz ID of the track, if available', + type: "string", + description: "The MusicBrainz ID of the track, if available", }, albumArt: { - type: 'string', - description: 'The URL of the album art for the track', - format: 'uri', + type: "string", + description: "The URL of the album art for the track", + format: "uri", }, trackNumber: { - type: 'integer', - description: 'The track number of the track in the album', + type: "integer", + description: "The track number of the track in the album", }, releaseDate: { - type: 'string', + type: "string", description: - 'The release date of the track, formatted as YYYY-MM-DD', + "The release date of the track, formatted as YYYY-MM-DD", }, year: { - type: 'integer', - description: 'The year the track was released', + type: "integer", + description: "The year the track was released", }, discNumber: { - type: 'integer', + type: "integer", description: - 'The disc number of the track in the album, if applicable', + "The disc number of the track in the album, if applicable", }, lyrics: { - type: 'string', - description: 'The lyrics of the track, if available', + type: "string", + description: "The lyrics of the track, if available", }, composer: { - type: 'string', - description: 'The composer of the track, if available', + type: "string", + description: "The composer of the track, if available", }, copyrightMessage: { - type: 'string', + type: "string", description: - 'The copyright message for the track, if available', + "The copyright message for the track, if available", }, label: { - type: 'string', - description: 'The record label of the track, if available', + type: "string", + description: "The record label of the track, if available", }, artistPicture: { - type: 'string', + type: "string", description: "The URL of the artist's picture, if available", - format: 'uri', + format: "uri", }, spotifyLink: { - type: 'string', - description: 'The Spotify link for the track, if available', - format: 'uri', + type: "string", + description: "The Spotify link for the track, if available", + format: "uri", }, lastfmLink: { - type: 'string', - description: 'The Last.fm link for the track, if available', - format: 'uri', + type: "string", + description: "The Last.fm link for the track, if available", + format: "uri", }, tidalLink: { - type: 'string', - description: 'The Tidal link for the track, if available', - format: 'uri', + type: "string", + description: "The Tidal link for the track, if available", + format: "uri", }, appleMusicLink: { - type: 'string', - description: 'The Apple Music link for the track, if available', - format: 'uri', + type: "string", + description: "The Apple Music link for the track, if available", + format: "uri", }, youtubeLink: { - type: 'string', - description: 'The Youtube link for the track, if available', - format: 'uri', + type: "string", + description: "The Youtube link for the track, if available", + format: "uri", }, deezerLink: { - type: 'string', - description: 'The Deezer link for the track, if available', - format: 'uri', + type: "string", + description: "The Deezer link for the track, if available", + format: "uri", }, timestamp: { - type: 'integer', + type: "integer", description: - 'The timestamp of the scrobble in milliseconds since epoch', + "The timestamp of the scrobble in milliseconds since epoch", }, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.scrobble.defs#scrobbleViewBasic', + type: "ref", + ref: "lex:app.rocksky.scrobble.defs#scrobbleViewBasic", }, }, }, @@ -2804,121 +2837,121 @@ export const schemaDict = { }, AppRockskyScrobbleDefs: { lexicon: 1, - id: 'app.rocksky.scrobble.defs', + id: "app.rocksky.scrobble.defs", defs: { scrobbleViewBasic: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the scrobble.', + type: "string", + description: "The unique identifier of the scrobble.", }, user: { - type: 'string', - description: 'The handle of the user who created the scrobble.', + type: "string", + description: "The handle of the user who created the scrobble.", }, title: { - type: 'string', - description: 'The title of the scrobble.', + type: "string", + description: "The title of the scrobble.", }, artist: { - type: 'string', - description: 'The artist of the song.', + type: "string", + description: "The artist of the song.", }, artistUri: { - type: 'string', - description: 'The URI of the artist.', - format: 'at-uri', + type: "string", + description: "The URI of the artist.", + format: "at-uri", }, album: { - type: 'string', - description: 'The album of the song.', + type: "string", + description: "The album of the song.", }, albumUri: { - type: 'string', - description: 'The URI of the album.', - format: 'at-uri', + type: "string", + description: "The URI of the album.", + format: "at-uri", }, cover: { - type: 'string', - description: 'The album art URL of the song.', - format: 'uri', + type: "string", + description: "The album art URL of the song.", + format: "uri", }, date: { - type: 'string', - description: 'The timestamp when the scrobble was created.', - format: 'datetime', + type: "string", + description: "The timestamp when the scrobble was created.", + format: "datetime", }, uri: { - type: 'string', - description: 'The URI of the scrobble.', - format: 'uri', + type: "string", + description: "The URI of the scrobble.", + format: "uri", }, sha256: { - type: 'string', - description: 'The SHA256 hash of the scrobble data.', + type: "string", + description: "The SHA256 hash of the scrobble data.", }, }, }, scrobbleViewDetailed: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the scrobble.', + type: "string", + description: "The unique identifier of the scrobble.", }, user: { - type: 'string', - description: 'The handle of the user who created the scrobble.', + type: "string", + description: "The handle of the user who created the scrobble.", }, title: { - type: 'string', - description: 'The title of the scrobble.', + type: "string", + description: "The title of the scrobble.", }, artist: { - type: 'string', - description: 'The artist of the song.', + type: "string", + description: "The artist of the song.", }, artistUri: { - type: 'string', - description: 'The URI of the artist.', - format: 'at-uri', + type: "string", + description: "The URI of the artist.", + format: "at-uri", }, album: { - type: 'string', - description: 'The album of the song.', + type: "string", + description: "The album of the song.", }, albumUri: { - type: 'string', - description: 'The URI of the album.', - format: 'at-uri', + type: "string", + description: "The URI of the album.", + format: "at-uri", }, cover: { - type: 'string', - description: 'The album art URL of the song.', - format: 'uri', + type: "string", + description: "The album art URL of the song.", + format: "uri", }, date: { - type: 'string', - description: 'The timestamp when the scrobble was created.', - format: 'datetime', + type: "string", + description: "The timestamp when the scrobble was created.", + format: "datetime", }, uri: { - type: 'string', - description: 'The URI of the scrobble.', - format: 'uri', + type: "string", + description: "The URI of the scrobble.", + format: "uri", }, sha256: { - type: 'string', - description: 'The SHA256 hash of the scrobble data.', + type: "string", + description: "The SHA256 hash of the scrobble data.", }, listeners: { - type: 'integer', - description: 'The number of listeners', + type: "integer", + description: "The number of listeners", }, scrobbles: { - type: 'integer', - description: 'The number of scrobbles for this song', + type: "integer", + description: "The number of scrobbles for this song", }, }, }, @@ -2926,27 +2959,27 @@ export const schemaDict = { }, AppRockskyScrobbleGetScrobble: { lexicon: 1, - id: 'app.rocksky.scrobble.getScrobble', + id: "app.rocksky.scrobble.getScrobble", defs: { main: { - type: 'query', - description: 'Get a scrobble by its unique identifier', + type: "query", + description: "Get a scrobble by its unique identifier", parameters: { - type: 'params', - required: ['uri'], + type: "params", + required: ["uri"], properties: { uri: { - type: 'string', - description: 'The unique identifier of the scrobble', - format: 'at-uri', + type: "string", + description: "The unique identifier of the scrobble", + format: "at-uri", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.scrobble.defs#scrobbleViewDetailed', + type: "ref", + ref: "lex:app.rocksky.scrobble.defs#scrobbleViewDetailed", }, }, }, @@ -2954,41 +2987,41 @@ export const schemaDict = { }, AppRockskyScrobbleGetScrobbles: { lexicon: 1, - id: 'app.rocksky.scrobble.getScrobbles', + id: "app.rocksky.scrobble.getScrobbles", defs: { main: { - type: 'query', - description: 'Get scrobbles all scrobbles', + type: "query", + description: "Get scrobbles all scrobbles", parameters: { - type: 'params', + type: "params", properties: { did: { - type: 'string', - description: 'The DID or handle of the actor', - format: 'at-identifier', + type: "string", + description: "The DID or handle of the actor", + format: "at-identifier", }, limit: { - type: 'integer', - description: 'The maximum number of scrobbles to return', + type: "integer", + description: "The maximum number of scrobbles to return", minimum: 1, }, offset: { - type: 'integer', - description: 'The offset for pagination', + type: "integer", + description: "The offset for pagination", minimum: 0, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { scrobbles: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.scrobble.defs#scrobbleViewBasic', + type: "ref", + ref: "lex:app.rocksky.scrobble.defs#scrobbleViewBasic", }, }, }, @@ -2999,143 +3032,143 @@ export const schemaDict = { }, AppRockskyScrobble: { lexicon: 1, - id: 'app.rocksky.scrobble', + id: "app.rocksky.scrobble", defs: { main: { - type: 'record', - description: 'A declaration of a scrobble.', - key: 'tid', + type: "record", + description: "A declaration of a scrobble.", + key: "tid", record: { - type: 'object', + type: "object", required: [ - 'title', - 'artist', - 'album', - 'albumArtist', - 'duration', - 'createdAt', + "title", + "artist", + "album", + "albumArtist", + "duration", + "createdAt", ], properties: { title: { - type: 'string', - description: 'The title of the song.', + type: "string", + description: "The title of the song.", minLength: 1, maxLength: 512, }, artist: { - type: 'string', - description: 'The artist of the song.', + type: "string", + description: "The artist of the song.", minLength: 1, maxLength: 256, }, albumArtist: { - type: 'string', - description: 'The album artist of the song.', + type: "string", + description: "The album artist of the song.", minLength: 1, maxLength: 256, }, album: { - type: 'string', - description: 'The album of the song.', + type: "string", + description: "The album of the song.", minLength: 1, maxLength: 256, }, duration: { - type: 'integer', - description: 'The duration of the song in seconds.', + type: "integer", + description: "The duration of the song in seconds.", minimum: 1, }, trackNumber: { - type: 'integer', - description: 'The track number of the song in the album.', + type: "integer", + description: "The track number of the song in the album.", minimum: 1, }, discNumber: { - type: 'integer', - description: 'The disc number of the song in the album.', + type: "integer", + description: "The disc number of the song in the album.", minimum: 1, }, releaseDate: { - type: 'string', - description: 'The release date of the song.', - format: 'datetime', + type: "string", + description: "The release date of the song.", + format: "datetime", }, year: { - type: 'integer', - description: 'The year the song was released.', + type: "integer", + description: "The year the song was released.", }, genre: { - type: 'string', - description: 'The genre of the song.', + type: "string", + description: "The genre of the song.", maxLength: 256, }, tags: { - type: 'array', - description: 'The tags of the song.', + type: "array", + description: "The tags of the song.", items: { - type: 'string', + type: "string", minLength: 1, maxLength: 256, }, }, composer: { - type: 'string', - description: 'The composer of the song.', + type: "string", + description: "The composer of the song.", maxLength: 256, }, lyrics: { - type: 'string', - description: 'The lyrics of the song.', + type: "string", + description: "The lyrics of the song.", maxLength: 10000, }, copyrightMessage: { - type: 'string', - description: 'The copyright message of the song.', + type: "string", + description: "The copyright message of the song.", maxLength: 256, }, wiki: { - type: 'string', - description: 'Informations about the song', + type: "string", + description: "Informations about the song", maxLength: 10000, }, albumArt: { - type: 'blob', - description: 'The album art of the song.', - accept: ['image/png', 'image/jpeg'], + type: "blob", + description: "The album art of the song.", + accept: ["image/png", "image/jpeg"], maxSize: 2000000, }, youtubeLink: { - type: 'string', - description: 'The YouTube link of the song.', - format: 'uri', + type: "string", + description: "The YouTube link of the song.", + format: "uri", }, spotifyLink: { - type: 'string', - description: 'The Spotify link of the song.', - format: 'uri', + type: "string", + description: "The Spotify link of the song.", + format: "uri", }, tidalLink: { - type: 'string', - description: 'The Tidal link of the song.', - format: 'uri', + type: "string", + description: "The Tidal link of the song.", + format: "uri", }, appleMusicLink: { - type: 'string', - description: 'The Apple Music link of the song.', - format: 'uri', + type: "string", + description: "The Apple Music link of the song.", + format: "uri", }, createdAt: { - type: 'string', - description: 'The date when the song was created.', - format: 'datetime', + type: "string", + description: "The date when the song was created.", + format: "datetime", }, mbid: { - type: 'string', - description: 'The MusicBrainz ID of the song.', + type: "string", + description: "The MusicBrainz ID of the song.", }, label: { - type: 'string', - description: 'The label of the song.', + type: "string", + description: "The label of the song.", maxLength: 256, }, }, @@ -3145,29 +3178,29 @@ export const schemaDict = { }, AppRockskyShoutCreateShout: { lexicon: 1, - id: 'app.rocksky.shout.createShout', + id: "app.rocksky.shout.createShout", defs: { main: { - type: 'procedure', - description: 'Create a new shout', + type: "procedure", + description: "Create a new shout", input: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { message: { - type: 'string', - description: 'The content of the shout', + type: "string", + description: "The content of the shout", minLength: 1, }, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.shout.defs#shoutView', + type: "ref", + ref: "lex:app.rocksky.shout.defs#shoutView", }, }, }, @@ -3175,61 +3208,61 @@ export const schemaDict = { }, AppRockskyShoutDefs: { lexicon: 1, - id: 'app.rocksky.shout.defs', + id: "app.rocksky.shout.defs", defs: { author: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the author.', + type: "string", + description: "The unique identifier of the author.", }, did: { - type: 'string', - description: 'The decentralized identifier (DID) of the author.', - format: 'at-identifier', + type: "string", + description: "The decentralized identifier (DID) of the author.", + format: "at-identifier", }, handle: { - type: 'string', - description: 'The handle of the author.', - format: 'at-identifier', + type: "string", + description: "The handle of the author.", + format: "at-identifier", }, displayName: { - type: 'string', - description: 'The display name of the author.', + type: "string", + description: "The display name of the author.", }, avatar: { - type: 'string', + type: "string", description: "The URL of the author's avatar image.", - format: 'uri', + format: "uri", }, }, }, shoutView: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the shout.', + type: "string", + description: "The unique identifier of the shout.", }, message: { - type: 'string', - description: 'The content of the shout.', + type: "string", + description: "The content of the shout.", }, parent: { - type: 'string', + type: "string", description: - 'The ID of the parent shout if this is a reply, otherwise null.', + "The ID of the parent shout if this is a reply, otherwise null.", }, createdAt: { - type: 'string', - description: 'The date and time when the shout was created.', - format: 'datetime', + type: "string", + description: "The date and time when the shout was created.", + format: "datetime", }, author: { - type: 'ref', - description: 'The author of the shout.', - ref: 'lex:app.rocksky.shout.defs#author', + type: "ref", + description: "The author of the shout.", + ref: "lex:app.rocksky.shout.defs#author", }, }, }, @@ -3237,44 +3270,44 @@ export const schemaDict = { }, AppRockskyShoutGetAlbumShouts: { lexicon: 1, - id: 'app.rocksky.shout.getAlbumShouts', + id: "app.rocksky.shout.getAlbumShouts", defs: { main: { - type: 'query', - description: 'Get shouts for an album', + type: "query", + description: "Get shouts for an album", parameters: { - type: 'params', - required: ['uri'], + type: "params", + required: ["uri"], properties: { uri: { - type: 'string', + type: "string", description: - 'The unique identifier of the album to retrieve shouts for', - format: 'at-uri', + "The unique identifier of the album to retrieve shouts for", + format: "at-uri", }, limit: { - type: 'integer', - description: 'The maximum number of shouts to return', + type: "integer", + description: "The maximum number of shouts to return", minimum: 1, }, offset: { - type: 'integer', + type: "integer", description: - 'The number of shouts to skip before starting to collect the result set', + "The number of shouts to skip before starting to collect the result set", minimum: 0, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { shouts: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.shout.defs#shoutViewBasic', + type: "ref", + ref: "lex:app.rocksky.shout.defs#shoutViewBasic", }, }, }, @@ -3285,43 +3318,43 @@ export const schemaDict = { }, AppRockskyShoutGetArtistShouts: { lexicon: 1, - id: 'app.rocksky.shout.getArtistShouts', + id: "app.rocksky.shout.getArtistShouts", defs: { main: { - type: 'query', - description: 'Get shouts for an artist', + type: "query", + description: "Get shouts for an artist", parameters: { - type: 'params', - required: ['uri'], + type: "params", + required: ["uri"], properties: { uri: { - type: 'string', - description: 'The URI of the artist to retrieve shouts for', - format: 'at-uri', + type: "string", + description: "The URI of the artist to retrieve shouts for", + format: "at-uri", }, limit: { - type: 'integer', - description: 'The maximum number of shouts to return', + type: "integer", + description: "The maximum number of shouts to return", minimum: 1, }, offset: { - type: 'integer', + type: "integer", description: - 'The number of shouts to skip before starting to collect the result set', + "The number of shouts to skip before starting to collect the result set", minimum: 0, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { shouts: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.shout.defs#shoutViewBasic', + type: "ref", + ref: "lex:app.rocksky.shout.defs#shoutViewBasic", }, }, }, @@ -3332,42 +3365,42 @@ export const schemaDict = { }, AppRockskyShoutGetProfileShouts: { lexicon: 1, - id: 'app.rocksky.shout.getProfileShouts', + id: "app.rocksky.shout.getProfileShouts", defs: { main: { - type: 'query', + type: "query", description: "Get the shouts of an actor's profile", parameters: { - type: 'params', - required: ['did'], + type: "params", + required: ["did"], properties: { did: { - type: 'string', - description: 'The DID or handle of the actor', - format: 'at-identifier', + type: "string", + description: "The DID or handle of the actor", + format: "at-identifier", }, offset: { - type: 'integer', - description: 'The offset for pagination', + type: "integer", + description: "The offset for pagination", minimum: 0, }, limit: { - type: 'integer', - description: 'The maximum number of shouts to return', + type: "integer", + description: "The maximum number of shouts to return", minimum: 1, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { shouts: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.shout.defs#shoutViewBasic', + type: "ref", + ref: "lex:app.rocksky.shout.defs#shoutViewBasic", }, }, }, @@ -3378,43 +3411,43 @@ export const schemaDict = { }, AppRockskyShoutGetShoutReplies: { lexicon: 1, - id: 'app.rocksky.shout.getShoutReplies', + id: "app.rocksky.shout.getShoutReplies", defs: { main: { - type: 'query', - description: 'Get replies to a shout', + type: "query", + description: "Get replies to a shout", parameters: { - type: 'params', - required: ['uri'], + type: "params", + required: ["uri"], properties: { uri: { - type: 'string', - description: 'The URI of the shout to retrieve replies for', - format: 'at-uri', + type: "string", + description: "The URI of the shout to retrieve replies for", + format: "at-uri", }, limit: { - type: 'integer', - description: 'The maximum number of shouts to return', + type: "integer", + description: "The maximum number of shouts to return", minimum: 1, }, offset: { - type: 'integer', + type: "integer", description: - 'The number of shouts to skip before starting to collect the result set', + "The number of shouts to skip before starting to collect the result set", minimum: 0, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { shouts: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.shout.defs#shoutViewBasic', + type: "ref", + ref: "lex:app.rocksky.shout.defs#shoutViewBasic", }, }, }, @@ -3425,32 +3458,32 @@ export const schemaDict = { }, AppRockskyShoutGetTrackShouts: { lexicon: 1, - id: 'app.rocksky.shout.getTrackShouts', + id: "app.rocksky.shout.getTrackShouts", defs: { main: { - type: 'query', - description: 'Get all shouts for a specific track', + type: "query", + description: "Get all shouts for a specific track", parameters: { - type: 'params', - required: ['uri'], + type: "params", + required: ["uri"], properties: { uri: { - type: 'string', - description: 'The URI of the track to retrieve shouts for', - format: 'at-uri', + type: "string", + description: "The URI of the track to retrieve shouts for", + format: "at-uri", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { shouts: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.shout.defs#shoutViewBasic', + type: "ref", + ref: "lex:app.rocksky.shout.defs#shoutViewBasic", }, }, }, @@ -3461,26 +3494,26 @@ export const schemaDict = { }, AppRockskyShoutRemoveShout: { lexicon: 1, - id: 'app.rocksky.shout.removeShout', + id: "app.rocksky.shout.removeShout", defs: { main: { - type: 'procedure', - description: 'Remove a shout by its ID', + type: "procedure", + description: "Remove a shout by its ID", parameters: { - type: 'params', - required: ['id'], + type: "params", + required: ["id"], properties: { id: { - type: 'string', - description: 'The ID of the shout to be removed', + type: "string", + description: "The ID of the shout to be removed", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.shout.defs#shoutView', + type: "ref", + ref: "lex:app.rocksky.shout.defs#shoutView", }, }, }, @@ -3488,34 +3521,34 @@ export const schemaDict = { }, AppRockskyShoutReplyShout: { lexicon: 1, - id: 'app.rocksky.shout.replyShout', + id: "app.rocksky.shout.replyShout", defs: { main: { - type: 'procedure', - description: 'Reply to a shout', + type: "procedure", + description: "Reply to a shout", input: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', - required: ['shoutId', 'message'], + type: "object", + required: ["shoutId", "message"], properties: { shoutId: { - type: 'string', - description: 'The unique identifier of the shout to reply to', + type: "string", + description: "The unique identifier of the shout to reply to", }, message: { - type: 'string', - description: 'The content of the reply', + type: "string", + description: "The content of the reply", minLength: 1, }, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.shout.defs#shoutView', + type: "ref", + ref: "lex:app.rocksky.shout.defs#shoutView", }, }, }, @@ -3523,34 +3556,34 @@ export const schemaDict = { }, AppRockskyShoutReportShout: { lexicon: 1, - id: 'app.rocksky.shout.reportShout', + id: "app.rocksky.shout.reportShout", defs: { main: { - type: 'procedure', - description: 'Report a shout for moderation', + type: "procedure", + description: "Report a shout for moderation", input: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', - required: ['shoutId'], + type: "object", + required: ["shoutId"], properties: { shoutId: { - type: 'string', - description: 'The unique identifier of the shout to report', + type: "string", + description: "The unique identifier of the shout to report", }, reason: { - type: 'string', - description: 'The reason for reporting the shout', + type: "string", + description: "The reason for reporting the shout", minLength: 1, }, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.shout.defs#shoutView', + type: "ref", + ref: "lex:app.rocksky.shout.defs#shoutView", }, }, }, @@ -3558,34 +3591,34 @@ export const schemaDict = { }, AppRockskyShout: { lexicon: 1, - id: 'app.rocksky.shout', + id: "app.rocksky.shout", defs: { main: { - type: 'record', - description: 'A declaration of a shout.', - key: 'tid', + type: "record", + description: "A declaration of a shout.", + key: "tid", record: { - type: 'object', - required: ['message', 'createdAt', 'subject'], + type: "object", + required: ["message", "createdAt", "subject"], properties: { message: { - type: 'string', - description: 'The message of the shout.', + type: "string", + description: "The message of the shout.", minLength: 1, maxLength: 1000, }, createdAt: { - type: 'string', - description: 'The date when the shout was created.', - format: 'datetime', + type: "string", + description: "The date when the shout was created.", + format: "datetime", }, parent: { - type: 'ref', - ref: 'lex:com.atproto.repo.strongRef', + type: "ref", + ref: "lex:com.atproto.repo.strongRef", }, subject: { - type: 'ref', - ref: 'lex:com.atproto.repo.strongRef', + type: "ref", + ref: "lex:com.atproto.repo.strongRef", }, }, }, @@ -3594,78 +3627,78 @@ export const schemaDict = { }, AppRockskySongCreateSong: { lexicon: 1, - id: 'app.rocksky.song.createSong', + id: "app.rocksky.song.createSong", defs: { main: { - type: 'procedure', - description: 'Create a new song', + type: "procedure", + description: "Create a new song", input: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', - required: ['title', 'artist', 'album', 'albumArtist'], + type: "object", + required: ["title", "artist", "album", "albumArtist"], properties: { title: { - type: 'string', - description: 'The title of the song', + type: "string", + description: "The title of the song", }, artist: { - type: 'string', - description: 'The artist of the song', + type: "string", + description: "The artist of the song", }, albumArtist: { - type: 'string', + type: "string", description: - 'The album artist of the song, if different from the main artist', + "The album artist of the song, if different from the main artist", }, album: { - type: 'string', - description: 'The album of the song, if applicable', + type: "string", + description: "The album of the song, if applicable", }, duration: { - type: 'integer', - description: 'The duration of the song in seconds', + type: "integer", + description: "The duration of the song in seconds", }, mbId: { - type: 'string', - description: 'The MusicBrainz ID of the song, if available', + type: "string", + description: "The MusicBrainz ID of the song, if available", }, albumArt: { - type: 'string', - description: 'The URL of the album art for the song', - format: 'uri', + type: "string", + description: "The URL of the album art for the song", + format: "uri", }, trackNumber: { - type: 'integer', + type: "integer", description: - 'The track number of the song in the album, if applicable', + "The track number of the song in the album, if applicable", }, releaseDate: { - type: 'string', + type: "string", description: - 'The release date of the song, formatted as YYYY-MM-DD', + "The release date of the song, formatted as YYYY-MM-DD", }, year: { - type: 'integer', - description: 'The year the song was released', + type: "integer", + description: "The year the song was released", }, discNumber: { - type: 'integer', + type: "integer", description: - 'The disc number of the song in the album, if applicable', + "The disc number of the song in the album, if applicable", }, lyrics: { - type: 'string', - description: 'The lyrics of the song, if available', + type: "string", + description: "The lyrics of the song, if available", }, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.song.defs#songViewDetailed', + type: "ref", + ref: "lex:app.rocksky.song.defs#songViewDetailed", }, }, }, @@ -3673,159 +3706,159 @@ export const schemaDict = { }, AppRockskySongDefs: { lexicon: 1, - id: 'app.rocksky.song.defs', + id: "app.rocksky.song.defs", defs: { songViewBasic: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the song.', + type: "string", + description: "The unique identifier of the song.", }, title: { - type: 'string', - description: 'The title of the song.', + type: "string", + description: "The title of the song.", }, artist: { - type: 'string', - description: 'The artist of the song.', + type: "string", + description: "The artist of the song.", }, albumArtist: { - type: 'string', - description: 'The artist of the album the song belongs to.', + type: "string", + description: "The artist of the album the song belongs to.", }, albumArt: { - type: 'string', - description: 'The URL of the album art image.', - format: 'uri', + type: "string", + description: "The URL of the album art image.", + format: "uri", }, uri: { - type: 'string', - description: 'The URI of the song.', - format: 'at-uri', + type: "string", + description: "The URI of the song.", + format: "at-uri", }, album: { - type: 'string', - description: 'The album of the song.', + type: "string", + description: "The album of the song.", }, duration: { - type: 'integer', - description: 'The duration of the song in milliseconds.', + type: "integer", + description: "The duration of the song in milliseconds.", }, trackNumber: { - type: 'integer', - description: 'The track number of the song in the album.', + type: "integer", + description: "The track number of the song in the album.", }, discNumber: { - type: 'integer', - description: 'The disc number of the song in the album.', + type: "integer", + description: "The disc number of the song in the album.", }, playCount: { - type: 'integer', - description: 'The number of times the song has been played.', + type: "integer", + description: "The number of times the song has been played.", minimum: 0, }, uniqueListeners: { - type: 'integer', + type: "integer", description: - 'The number of unique listeners who have played the song.', + "The number of unique listeners who have played the song.", minimum: 0, }, albumUri: { - type: 'string', - description: 'The URI of the album the song belongs to.', - format: 'at-uri', + type: "string", + description: "The URI of the album the song belongs to.", + format: "at-uri", }, artistUri: { - type: 'string', - description: 'The URI of the artist of the song.', - format: 'at-uri', + type: "string", + description: "The URI of the artist of the song.", + format: "at-uri", }, sha256: { - type: 'string', - description: 'The SHA256 hash of the song.', + type: "string", + description: "The SHA256 hash of the song.", }, createdAt: { - type: 'string', - description: 'The timestamp when the song was created.', - format: 'datetime', + type: "string", + description: "The timestamp when the song was created.", + format: "datetime", }, }, }, songViewDetailed: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the song.', + type: "string", + description: "The unique identifier of the song.", }, title: { - type: 'string', - description: 'The title of the song.', + type: "string", + description: "The title of the song.", }, artist: { - type: 'string', - description: 'The artist of the song.', + type: "string", + description: "The artist of the song.", }, albumArtist: { - type: 'string', - description: 'The artist of the album the song belongs to.', + type: "string", + description: "The artist of the album the song belongs to.", }, albumArt: { - type: 'string', - description: 'The URL of the album art image.', - format: 'uri', + type: "string", + description: "The URL of the album art image.", + format: "uri", }, uri: { - type: 'string', - description: 'The URI of the song.', - format: 'at-uri', + type: "string", + description: "The URI of the song.", + format: "at-uri", }, album: { - type: 'string', - description: 'The album of the song.', + type: "string", + description: "The album of the song.", }, duration: { - type: 'integer', - description: 'The duration of the song in milliseconds.', + type: "integer", + description: "The duration of the song in milliseconds.", }, trackNumber: { - type: 'integer', - description: 'The track number of the song in the album.', + type: "integer", + description: "The track number of the song in the album.", }, discNumber: { - type: 'integer', - description: 'The disc number of the song in the album.', + type: "integer", + description: "The disc number of the song in the album.", }, playCount: { - type: 'integer', - description: 'The number of times the song has been played.', + type: "integer", + description: "The number of times the song has been played.", minimum: 0, }, uniqueListeners: { - type: 'integer', + type: "integer", description: - 'The number of unique listeners who have played the song.', + "The number of unique listeners who have played the song.", minimum: 0, }, albumUri: { - type: 'string', - description: 'The URI of the album the song belongs to.', - format: 'at-uri', + type: "string", + description: "The URI of the album the song belongs to.", + format: "at-uri", }, artistUri: { - type: 'string', - description: 'The URI of the artist of the song.', - format: 'at-uri', + type: "string", + description: "The URI of the artist of the song.", + format: "at-uri", }, sha256: { - type: 'string', - description: 'The SHA256 hash of the song.', + type: "string", + description: "The SHA256 hash of the song.", }, createdAt: { - type: 'string', - description: 'The timestamp when the song was created.', - format: 'datetime', + type: "string", + description: "The timestamp when the song was created.", + format: "datetime", }, }, }, @@ -3833,27 +3866,27 @@ export const schemaDict = { }, AppRockskySongGetSong: { lexicon: 1, - id: 'app.rocksky.song.getSong', + id: "app.rocksky.song.getSong", defs: { main: { - type: 'query', - description: 'Get a song by its uri', + type: "query", + description: "Get a song by its uri", parameters: { - type: 'params', - required: ['uri'], + type: "params", + required: ["uri"], properties: { uri: { - type: 'string', - description: 'The unique identifier of the song to retrieve', - format: 'at-uri', + type: "string", + description: "The unique identifier of the song to retrieve", + format: "at-uri", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.song.defs#songViewDetailed', + type: "ref", + ref: "lex:app.rocksky.song.defs#songViewDetailed", }, }, }, @@ -3861,36 +3894,36 @@ export const schemaDict = { }, AppRockskySongGetSongs: { lexicon: 1, - id: 'app.rocksky.song.getSongs', + id: "app.rocksky.song.getSongs", defs: { main: { - type: 'query', - description: 'Get songs', + type: "query", + description: "Get songs", parameters: { - type: 'params', + type: "params", properties: { limit: { - type: 'integer', - description: 'The maximum number of songs to return', + type: "integer", + description: "The maximum number of songs to return", minimum: 1, }, offset: { - type: 'integer', - description: 'The offset for pagination', + type: "integer", + description: "The offset for pagination", minimum: 0, }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'object', + type: "object", properties: { songs: { - type: 'array', + type: "array", items: { - type: 'ref', - ref: 'lex:app.rocksky.song.defs#songViewBasic', + type: "ref", + ref: "lex:app.rocksky.song.defs#songViewBasic", }, }, }, @@ -3901,144 +3934,144 @@ export const schemaDict = { }, AppRockskySong: { lexicon: 1, - id: 'app.rocksky.song', + id: "app.rocksky.song", defs: { main: { - type: 'record', - description: 'A declaration of a song.', - key: 'tid', + type: "record", + description: "A declaration of a song.", + key: "tid", record: { - type: 'object', + type: "object", required: [ - 'title', - 'artist', - 'album', - 'albumArtist', - 'duration', - 'createdAt', + "title", + "artist", + "album", + "albumArtist", + "duration", + "createdAt", ], properties: { title: { - type: 'string', - description: 'The title of the song.', + type: "string", + description: "The title of the song.", minLength: 1, maxLength: 512, }, artist: { - type: 'string', - description: 'The artist of the song.', + type: "string", + description: "The artist of the song.", minLength: 1, maxLength: 256, }, albumArtist: { - type: 'string', - description: 'The album artist of the song.', + type: "string", + description: "The album artist of the song.", minLength: 1, maxLength: 256, }, album: { - type: 'string', - description: 'The album of the song.', + type: "string", + description: "The album of the song.", minLength: 1, maxLength: 256, }, duration: { - type: 'integer', - description: 'The duration of the song in seconds.', + type: "integer", + description: "The duration of the song in seconds.", minimum: 1, }, trackNumber: { - type: 'integer', - description: 'The track number of the song in the album.', + type: "integer", + description: "The track number of the song in the album.", minimum: 1, }, discNumber: { - type: 'integer', - description: 'The disc number of the song in the album.', + type: "integer", + description: "The disc number of the song in the album.", minimum: 1, }, releaseDate: { - type: 'string', - description: 'The release date of the song.', - format: 'datetime', + type: "string", + description: "The release date of the song.", + format: "datetime", }, year: { - type: 'integer', - description: 'The year the song was released.', + type: "integer", + description: "The year the song was released.", }, genre: { - type: 'string', - description: 'The genre of the song.', + type: "string", + description: "The genre of the song.", minLength: 1, maxLength: 256, }, tags: { - type: 'array', - description: 'The tags of the song.', + type: "array", + description: "The tags of the song.", items: { - type: 'string', + type: "string", minLength: 1, maxLength: 256, }, }, composer: { - type: 'string', - description: 'The composer of the song.', + type: "string", + description: "The composer of the song.", maxLength: 256, }, lyrics: { - type: 'string', - description: 'The lyrics of the song.', + type: "string", + description: "The lyrics of the song.", maxLength: 10000, }, copyrightMessage: { - type: 'string', - description: 'The copyright message of the song.', + type: "string", + description: "The copyright message of the song.", maxLength: 256, }, wiki: { - type: 'string', - description: 'Informations about the song', + type: "string", + description: "Informations about the song", maxLength: 10000, }, albumArt: { - type: 'blob', - description: 'The album art of the song.', - accept: ['image/png', 'image/jpeg'], + type: "blob", + description: "The album art of the song.", + accept: ["image/png", "image/jpeg"], maxSize: 2000000, }, youtubeLink: { - type: 'string', - description: 'The YouTube link of the song.', - format: 'uri', + type: "string", + description: "The YouTube link of the song.", + format: "uri", }, spotifyLink: { - type: 'string', - description: 'The Spotify link of the song.', - format: 'uri', + type: "string", + description: "The Spotify link of the song.", + format: "uri", }, tidalLink: { - type: 'string', - description: 'The Tidal link of the song.', - format: 'uri', + type: "string", + description: "The Tidal link of the song.", + format: "uri", }, appleMusicLink: { - type: 'string', - description: 'The Apple Music link of the song.', - format: 'uri', + type: "string", + description: "The Apple Music link of the song.", + format: "uri", }, createdAt: { - type: 'string', - description: 'The date when the song was created.', - format: 'datetime', + type: "string", + description: "The date when the song was created.", + format: "datetime", }, mbid: { - type: 'string', - description: 'The MusicBrainz ID of the song.', + type: "string", + description: "The MusicBrainz ID of the song.", }, label: { - type: 'string', - description: 'The label of the song.', + type: "string", + description: "The label of the song.", maxLength: 256, }, }, @@ -4048,34 +4081,34 @@ export const schemaDict = { }, AppRockskySpotifyDefs: { lexicon: 1, - id: 'app.rocksky.spotify.defs', + id: "app.rocksky.spotify.defs", defs: { spotifyTrackView: { - type: 'object', + type: "object", properties: { id: { - type: 'string', - description: 'The unique identifier of the Spotify track.', + type: "string", + description: "The unique identifier of the Spotify track.", }, name: { - type: 'string', - description: 'The name of the track.', + type: "string", + description: "The name of the track.", }, artist: { - type: 'string', - description: 'The name of the artist.', + type: "string", + description: "The name of the artist.", }, album: { - type: 'string', - description: 'The name of the album.', + type: "string", + description: "The name of the album.", }, duration: { - type: 'integer', - description: 'The duration of the track in milliseconds.', + type: "integer", + description: "The duration of the track in milliseconds.", }, previewUrl: { - type: 'string', - description: 'A URL to a preview of the track.', + type: "string", + description: "A URL to a preview of the track.", }, }, }, @@ -4083,27 +4116,27 @@ export const schemaDict = { }, AppRockskySpotifyGetCurrentlyPlaying: { lexicon: 1, - id: 'app.rocksky.spotify.getCurrentlyPlaying', + id: "app.rocksky.spotify.getCurrentlyPlaying", defs: { main: { - type: 'query', - description: 'Get the currently playing track', + type: "query", + description: "Get the currently playing track", parameters: { - type: 'params', + type: "params", properties: { actor: { - type: 'string', + type: "string", description: - 'Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user.', - format: 'at-identifier', + "Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user.", + format: "at-identifier", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.player.defs#currentlyPlayingViewDetailed', + type: "ref", + ref: "lex:app.rocksky.player.defs#currentlyPlayingViewDetailed", }, }, }, @@ -4111,59 +4144,59 @@ export const schemaDict = { }, AppRockskySpotifyNext: { lexicon: 1, - id: 'app.rocksky.spotify.next', + id: "app.rocksky.spotify.next", defs: { main: { - type: 'procedure', - description: 'Play the next track in the queue', + type: "procedure", + description: "Play the next track in the queue", }, }, }, AppRockskySpotifyPause: { lexicon: 1, - id: 'app.rocksky.spotify.pause', + id: "app.rocksky.spotify.pause", defs: { main: { - type: 'procedure', - description: 'Pause the currently playing track', + type: "procedure", + description: "Pause the currently playing track", }, }, }, AppRockskySpotifyPlay: { lexicon: 1, - id: 'app.rocksky.spotify.play', + id: "app.rocksky.spotify.play", defs: { main: { - type: 'procedure', - description: 'Resume playback of the currently paused track', + type: "procedure", + description: "Resume playback of the currently paused track", }, }, }, AppRockskySpotifyPrevious: { lexicon: 1, - id: 'app.rocksky.spotify.previous', + id: "app.rocksky.spotify.previous", defs: { main: { - type: 'procedure', - description: 'Play the previous track in the queue', + type: "procedure", + description: "Play the previous track in the queue", }, }, }, AppRockskySpotifySeek: { lexicon: 1, - id: 'app.rocksky.spotify.seek', + id: "app.rocksky.spotify.seek", defs: { main: { - type: 'procedure', + type: "procedure", description: - 'Seek to a specific position in the currently playing track', + "Seek to a specific position in the currently playing track", parameters: { - type: 'params', - required: ['position'], + type: "params", + required: ["position"], properties: { position: { - type: 'integer', - description: 'The position in seconds to seek to', + type: "integer", + description: "The position in seconds to seek to", }, }, }, @@ -4172,30 +4205,30 @@ export const schemaDict = { }, AppRockskyStatsDefs: { lexicon: 1, - id: 'app.rocksky.stats.defs', + id: "app.rocksky.stats.defs", defs: { statsView: { - type: 'object', + type: "object", properties: { scrobbles: { - type: 'integer', - description: 'The total number of scrobbles.', + type: "integer", + description: "The total number of scrobbles.", }, artists: { - type: 'integer', - description: 'The total number of unique artists scrobbled.', + type: "integer", + description: "The total number of unique artists scrobbled.", }, lovedTracks: { - type: 'integer', - description: 'The total number of tracks marked as loved.', + type: "integer", + description: "The total number of tracks marked as loved.", }, albums: { - type: 'integer', - description: 'The total number of unique albums scrobbled.', + type: "integer", + description: "The total number of unique albums scrobbled.", }, tracks: { - type: 'integer', - description: 'The total number of unique tracks scrobbled.', + type: "integer", + description: "The total number of unique tracks scrobbled.", }, }, }, @@ -4203,26 +4236,26 @@ export const schemaDict = { }, AppRockskyStatsGetStats: { lexicon: 1, - id: 'app.rocksky.stats.getStats', + id: "app.rocksky.stats.getStats", defs: { main: { - type: 'query', + type: "query", parameters: { - type: 'params', - required: ['did'], + type: "params", + required: ["did"], properties: { did: { - type: 'string', - description: 'The DID or handle of the user to get stats for.', - format: 'at-identifier', + type: "string", + description: "The DID or handle of the user to get stats for.", + format: "at-identifier", }, }, }, output: { - encoding: 'application/json', + encoding: "application/json", schema: { - type: 'ref', - ref: 'lex:app.rocksky.stats.defs#statsView', + type: "ref", + ref: "lex:app.rocksky.stats.defs#statsView", }, }, }, @@ -4230,128 +4263,129 @@ export const schemaDict = { }, ComAtprotoRepoStrongRef: { lexicon: 1, - id: 'com.atproto.repo.strongRef', - description: 'A URI with a content-hash fingerprint.', + id: "com.atproto.repo.strongRef", + description: "A URI with a content-hash fingerprint.", defs: { main: { - type: 'object', - required: ['uri', 'cid'], + type: "object", + required: ["uri", "cid"], properties: { uri: { - type: 'string', - format: 'at-uri', + type: "string", + format: "at-uri", }, cid: { - type: 'string', - format: 'cid', + type: "string", + format: "cid", }, }, }, }, }, -} as const satisfies Record +} as const satisfies Record; -export const schemas = Object.values(schemaDict) -export const lexicons: Lexicons = new Lexicons(schemas) +export const schemas = Object.values(schemaDict); +export const lexicons: Lexicons = new Lexicons(schemas); export const ids = { - AppRockskyActorDefs: 'app.rocksky.actor.defs', - AppRockskyActorGetActorAlbums: 'app.rocksky.actor.getActorAlbums', - AppRockskyActorGetActorArtists: 'app.rocksky.actor.getActorArtists', - AppRockskyActorGetActorLovedSongs: 'app.rocksky.actor.getActorLovedSongs', - AppRockskyActorGetActorPlaylists: 'app.rocksky.actor.getActorPlaylists', - AppRockskyActorGetActorScrobbles: 'app.rocksky.actor.getActorScrobbles', - AppRockskyActorGetActorSongs: 'app.rocksky.actor.getActorSongs', - AppRockskyActorGetProfile: 'app.rocksky.actor.getProfile', - AppBskyActorProfile: 'app.bsky.actor.profile', - AppRockskyAlbum: 'app.rocksky.album', - AppRockskyAlbumDefs: 'app.rocksky.album.defs', - AppRockskyAlbumGetAlbum: 'app.rocksky.album.getAlbum', - AppRockskyAlbumGetAlbums: 'app.rocksky.album.getAlbums', - AppRockskyAlbumGetAlbumTracks: 'app.rocksky.album.getAlbumTracks', - AppRockskyApikeyCreateApikey: 'app.rocksky.apikey.createApikey', - AppRockskyApikeyDefs: 'app.rocksky.apikey.defs', - AppRockskyApikeysDefs: 'app.rocksky.apikeys.defs', - AppRockskyApikeyGetApikeys: 'app.rocksky.apikey.getApikeys', - AppRockskyApikeyRemoveApikey: 'app.rocksky.apikey.removeApikey', - AppRockskyApikeyUpdateApikey: 'app.rocksky.apikey.updateApikey', - AppRockskyArtist: 'app.rocksky.artist', - AppRockskyArtistDefs: 'app.rocksky.artist.defs', - AppRockskyArtistGetArtistAlbums: 'app.rocksky.artist.getArtistAlbums', - AppRockskyArtistGetArtist: 'app.rocksky.artist.getArtist', - AppRockskyArtistGetArtists: 'app.rocksky.artist.getArtists', - AppRockskyArtistGetArtistTracks: 'app.rocksky.artist.getArtistTracks', - AppRockskyChartsDefs: 'app.rocksky.charts.defs', - AppRockskyChartsGetScrobblesChart: 'app.rocksky.charts.getScrobblesChart', - AppRockskyDropboxDefs: 'app.rocksky.dropbox.defs', - AppRockskyDropboxDownloadFile: 'app.rocksky.dropbox.downloadFile', - AppRockskyDropboxGetFiles: 'app.rocksky.dropbox.getFiles', - AppRockskyDropboxGetMetadata: 'app.rocksky.dropbox.getMetadata', - AppRockskyDropboxGetTemporaryLink: 'app.rocksky.dropbox.getTemporaryLink', - AppRockskyFeedDefs: 'app.rocksky.feed.defs', - AppRockskyFeedGetNowPlayings: 'app.rocksky.feed.getNowPlayings', - AppRockskyFeedSearch: 'app.rocksky.feed.search', - AppRockskyGoogledriveDefs: 'app.rocksky.googledrive.defs', - AppRockskyGoogledriveDownloadFile: 'app.rocksky.googledrive.downloadFile', - AppRockskyGoogledriveGetFile: 'app.rocksky.googledrive.getFile', - AppRockskyGoogledriveGetFiles: 'app.rocksky.googledrive.getFiles', - AppRockskyLikeDislikeShout: 'app.rocksky.like.dislikeShout', - AppRockskyLikeDislikeSong: 'app.rocksky.like.dislikeSong', - AppRockskyLike: 'app.rocksky.like', - AppRockskyLikeLikeShout: 'app.rocksky.like.likeShout', - AppRockskyLikeLikeSong: 'app.rocksky.like.likeSong', - AppRockskyPlayerAddItemsToQueue: 'app.rocksky.player.addItemsToQueue', - AppRockskyPlayerDefs: 'app.rocksky.player.defs', - AppRockskyPlayerGetCurrentlyPlaying: 'app.rocksky.player.getCurrentlyPlaying', - AppRockskyPlayerGetPlaybackQueue: 'app.rocksky.player.getPlaybackQueue', - AppRockskyPlayerNext: 'app.rocksky.player.next', - AppRockskyPlayerPause: 'app.rocksky.player.pause', - AppRockskyPlayerPlayDirectory: 'app.rocksky.player.playDirectory', - AppRockskyPlayerPlayFile: 'app.rocksky.player.playFile', - AppRockskyPlayerPlay: 'app.rocksky.player.play', - AppRockskyPlayerPrevious: 'app.rocksky.player.previous', - AppRockskyPlayerSeek: 'app.rocksky.player.seek', - AppRockskyPlaylistCreatePlaylist: 'app.rocksky.playlist.createPlaylist', - AppRockskyPlaylistDefs: 'app.rocksky.playlist.defs', - AppRockskyPlaylistGetPlaylist: 'app.rocksky.playlist.getPlaylist', - AppRockskyPlaylistGetPlaylists: 'app.rocksky.playlist.getPlaylists', - AppRockskyPlaylistInsertDirectory: 'app.rocksky.playlist.insertDirectory', - AppRockskyPlaylistInsertFiles: 'app.rocksky.playlist.insertFiles', - AppRockskyPlaylist: 'app.rocksky.playlist', - AppRockskyPlaylistRemovePlaylist: 'app.rocksky.playlist.removePlaylist', - AppRockskyPlaylistRemoveTrack: 'app.rocksky.playlist.removeTrack', - AppRockskyPlaylistStartPlaylist: 'app.rocksky.playlist.startPlaylist', - AppRockskyRadioDefs: 'app.rocksky.radio.defs', - AppRockskyRadio: 'app.rocksky.radio', - AppRockskyScrobbleCreateScrobble: 'app.rocksky.scrobble.createScrobble', - AppRockskyScrobbleDefs: 'app.rocksky.scrobble.defs', - AppRockskyScrobbleGetScrobble: 'app.rocksky.scrobble.getScrobble', - AppRockskyScrobbleGetScrobbles: 'app.rocksky.scrobble.getScrobbles', - AppRockskyScrobble: 'app.rocksky.scrobble', - AppRockskyShoutCreateShout: 'app.rocksky.shout.createShout', - AppRockskyShoutDefs: 'app.rocksky.shout.defs', - AppRockskyShoutGetAlbumShouts: 'app.rocksky.shout.getAlbumShouts', - AppRockskyShoutGetArtistShouts: 'app.rocksky.shout.getArtistShouts', - AppRockskyShoutGetProfileShouts: 'app.rocksky.shout.getProfileShouts', - AppRockskyShoutGetShoutReplies: 'app.rocksky.shout.getShoutReplies', - AppRockskyShoutGetTrackShouts: 'app.rocksky.shout.getTrackShouts', - AppRockskyShoutRemoveShout: 'app.rocksky.shout.removeShout', - AppRockskyShoutReplyShout: 'app.rocksky.shout.replyShout', - AppRockskyShoutReportShout: 'app.rocksky.shout.reportShout', - AppRockskyShout: 'app.rocksky.shout', - AppRockskySongCreateSong: 'app.rocksky.song.createSong', - AppRockskySongDefs: 'app.rocksky.song.defs', - AppRockskySongGetSong: 'app.rocksky.song.getSong', - AppRockskySongGetSongs: 'app.rocksky.song.getSongs', - AppRockskySong: 'app.rocksky.song', - AppRockskySpotifyDefs: 'app.rocksky.spotify.defs', + AppRockskyActorDefs: "app.rocksky.actor.defs", + AppRockskyActorGetActorAlbums: "app.rocksky.actor.getActorAlbums", + AppRockskyActorGetActorArtists: "app.rocksky.actor.getActorArtists", + AppRockskyActorGetActorLovedSongs: "app.rocksky.actor.getActorLovedSongs", + AppRockskyActorGetActorPlaylists: "app.rocksky.actor.getActorPlaylists", + AppRockskyActorGetActorScrobbles: "app.rocksky.actor.getActorScrobbles", + AppRockskyActorGetActorSongs: "app.rocksky.actor.getActorSongs", + AppRockskyActorGetProfile: "app.rocksky.actor.getProfile", + AppBskyActorProfile: "app.bsky.actor.profile", + AppRockskyAlbum: "app.rocksky.album", + AppRockskyAlbumDefs: "app.rocksky.album.defs", + AppRockskyAlbumGetAlbum: "app.rocksky.album.getAlbum", + AppRockskyAlbumGetAlbums: "app.rocksky.album.getAlbums", + AppRockskyAlbumGetAlbumTracks: "app.rocksky.album.getAlbumTracks", + AppRockskyApikeyCreateApikey: "app.rocksky.apikey.createApikey", + AppRockskyApikeyDefs: "app.rocksky.apikey.defs", + AppRockskyApikeysDefs: "app.rocksky.apikeys.defs", + AppRockskyApikeyGetApikeys: "app.rocksky.apikey.getApikeys", + AppRockskyApikeyRemoveApikey: "app.rocksky.apikey.removeApikey", + AppRockskyApikeyUpdateApikey: "app.rocksky.apikey.updateApikey", + AppRockskyArtist: "app.rocksky.artist", + AppRockskyArtistDefs: "app.rocksky.artist.defs", + AppRockskyArtistGetArtistAlbums: "app.rocksky.artist.getArtistAlbums", + AppRockskyArtistGetArtist: "app.rocksky.artist.getArtist", + AppRockskyArtistGetArtists: "app.rocksky.artist.getArtists", + AppRockskyArtistGetArtistTracks: "app.rocksky.artist.getArtistTracks", + AppRockskyChartsDefs: "app.rocksky.charts.defs", + AppRockskyChartsGetScrobblesChart: "app.rocksky.charts.getScrobblesChart", + AppRockskyDropboxDefs: "app.rocksky.dropbox.defs", + AppRockskyDropboxDownloadFile: "app.rocksky.dropbox.downloadFile", + AppRockskyDropboxGetFiles: "app.rocksky.dropbox.getFiles", + AppRockskyDropboxGetMetadata: "app.rocksky.dropbox.getMetadata", + AppRockskyDropboxGetTemporaryLink: "app.rocksky.dropbox.getTemporaryLink", + AppRockskyFeedDefs: "app.rocksky.feed.defs", + AppRockskyFeedGetNowPlayings: "app.rocksky.feed.getNowPlayings", + AppRockskyFeedSearch: "app.rocksky.feed.search", + AppRockskyGoogledriveDefs: "app.rocksky.googledrive.defs", + AppRockskyGoogledriveDownloadFile: "app.rocksky.googledrive.downloadFile", + AppRockskyGoogledriveGetFile: "app.rocksky.googledrive.getFile", + AppRockskyGoogledriveGetFiles: "app.rocksky.googledrive.getFiles", + AppRockskyLikeDislikeShout: "app.rocksky.like.dislikeShout", + AppRockskyLikeDislikeSong: "app.rocksky.like.dislikeSong", + AppRockskyLike: "app.rocksky.like", + AppRockskyLikeLikeShout: "app.rocksky.like.likeShout", + AppRockskyLikeLikeSong: "app.rocksky.like.likeSong", + AppRockskyPlayerAddDirectoryToQueue: "app.rocksky.player.addDirectoryToQueue", + AppRockskyPlayerAddItemsToQueue: "app.rocksky.player.addItemsToQueue", + AppRockskyPlayerDefs: "app.rocksky.player.defs", + AppRockskyPlayerGetCurrentlyPlaying: "app.rocksky.player.getCurrentlyPlaying", + AppRockskyPlayerGetPlaybackQueue: "app.rocksky.player.getPlaybackQueue", + AppRockskyPlayerNext: "app.rocksky.player.next", + AppRockskyPlayerPause: "app.rocksky.player.pause", + AppRockskyPlayerPlayDirectory: "app.rocksky.player.playDirectory", + AppRockskyPlayerPlayFile: "app.rocksky.player.playFile", + AppRockskyPlayerPlay: "app.rocksky.player.play", + AppRockskyPlayerPrevious: "app.rocksky.player.previous", + AppRockskyPlayerSeek: "app.rocksky.player.seek", + AppRockskyPlaylistCreatePlaylist: "app.rocksky.playlist.createPlaylist", + AppRockskyPlaylistDefs: "app.rocksky.playlist.defs", + AppRockskyPlaylistGetPlaylist: "app.rocksky.playlist.getPlaylist", + AppRockskyPlaylistGetPlaylists: "app.rocksky.playlist.getPlaylists", + AppRockskyPlaylistInsertDirectory: "app.rocksky.playlist.insertDirectory", + AppRockskyPlaylistInsertFiles: "app.rocksky.playlist.insertFiles", + AppRockskyPlaylist: "app.rocksky.playlist", + AppRockskyPlaylistRemovePlaylist: "app.rocksky.playlist.removePlaylist", + AppRockskyPlaylistRemoveTrack: "app.rocksky.playlist.removeTrack", + AppRockskyPlaylistStartPlaylist: "app.rocksky.playlist.startPlaylist", + AppRockskyRadioDefs: "app.rocksky.radio.defs", + AppRockskyRadio: "app.rocksky.radio", + AppRockskyScrobbleCreateScrobble: "app.rocksky.scrobble.createScrobble", + AppRockskyScrobbleDefs: "app.rocksky.scrobble.defs", + AppRockskyScrobbleGetScrobble: "app.rocksky.scrobble.getScrobble", + AppRockskyScrobbleGetScrobbles: "app.rocksky.scrobble.getScrobbles", + AppRockskyScrobble: "app.rocksky.scrobble", + AppRockskyShoutCreateShout: "app.rocksky.shout.createShout", + AppRockskyShoutDefs: "app.rocksky.shout.defs", + AppRockskyShoutGetAlbumShouts: "app.rocksky.shout.getAlbumShouts", + AppRockskyShoutGetArtistShouts: "app.rocksky.shout.getArtistShouts", + AppRockskyShoutGetProfileShouts: "app.rocksky.shout.getProfileShouts", + AppRockskyShoutGetShoutReplies: "app.rocksky.shout.getShoutReplies", + AppRockskyShoutGetTrackShouts: "app.rocksky.shout.getTrackShouts", + AppRockskyShoutRemoveShout: "app.rocksky.shout.removeShout", + AppRockskyShoutReplyShout: "app.rocksky.shout.replyShout", + AppRockskyShoutReportShout: "app.rocksky.shout.reportShout", + AppRockskyShout: "app.rocksky.shout", + AppRockskySongCreateSong: "app.rocksky.song.createSong", + AppRockskySongDefs: "app.rocksky.song.defs", + AppRockskySongGetSong: "app.rocksky.song.getSong", + AppRockskySongGetSongs: "app.rocksky.song.getSongs", + AppRockskySong: "app.rocksky.song", + AppRockskySpotifyDefs: "app.rocksky.spotify.defs", AppRockskySpotifyGetCurrentlyPlaying: - 'app.rocksky.spotify.getCurrentlyPlaying', - AppRockskySpotifyNext: 'app.rocksky.spotify.next', - AppRockskySpotifyPause: 'app.rocksky.spotify.pause', - AppRockskySpotifyPlay: 'app.rocksky.spotify.play', - AppRockskySpotifyPrevious: 'app.rocksky.spotify.previous', - AppRockskySpotifySeek: 'app.rocksky.spotify.seek', - AppRockskyStatsDefs: 'app.rocksky.stats.defs', - AppRockskyStatsGetStats: 'app.rocksky.stats.getStats', - ComAtprotoRepoStrongRef: 'com.atproto.repo.strongRef', -} + "app.rocksky.spotify.getCurrentlyPlaying", + AppRockskySpotifyNext: "app.rocksky.spotify.next", + AppRockskySpotifyPause: "app.rocksky.spotify.pause", + AppRockskySpotifyPlay: "app.rocksky.spotify.play", + AppRockskySpotifyPrevious: "app.rocksky.spotify.previous", + AppRockskySpotifySeek: "app.rocksky.spotify.seek", + AppRockskyStatsDefs: "app.rocksky.stats.defs", + AppRockskyStatsGetStats: "app.rocksky.stats.getStats", + ComAtprotoRepoStrongRef: "com.atproto.repo.strongRef", +}; diff --git a/apps/api/src/lexicon/types/app/bsky/actor/profile.ts b/apps/api/src/lexicon/types/app/bsky/actor/profile.ts index 9fd9b737..119a7fb1 100644 --- a/apps/api/src/lexicon/types/app/bsky/actor/profile.ts +++ b/apps/api/src/lexicon/types/app/bsky/actor/profile.ts @@ -1,38 +1,38 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs' -import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef' +import type { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs"; +import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef"; export interface Record { - displayName?: string + displayName?: string; /** Free-form profile description text. */ - description?: string + description?: string; /** Small image to be displayed next to posts from account. AKA, 'profile picture' */ - avatar?: BlobRef + avatar?: BlobRef; /** Larger horizontal image to display behind profile view. */ - banner?: BlobRef + banner?: BlobRef; labels?: | ComAtprotoLabelDefs.SelfLabels - | { $type: string; [k: string]: unknown } - joinedViaStarterPack?: ComAtprotoRepoStrongRef.Main - createdAt?: string - [k: string]: unknown + | { $type: string; [k: string]: unknown }; + joinedViaStarterPack?: ComAtprotoRepoStrongRef.Main; + createdAt?: string; + [k: string]: unknown; } export function isRecord(v: unknown): v is Record { return ( isObj(v) && - hasProp(v, '$type') && - (v.$type === 'app.bsky.actor.profile#main' || - v.$type === 'app.bsky.actor.profile') - ) + hasProp(v, "$type") && + (v.$type === "app.bsky.actor.profile#main" || + v.$type === "app.bsky.actor.profile") + ); } export function validateRecord(v: unknown): ValidationResult { - return lexicons.validate('app.bsky.actor.profile#main', v) + return lexicons.validate("app.bsky.actor.profile#main", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/actor/defs.ts b/apps/api/src/lexicon/types/app/rocksky/actor/defs.ts index c369ffd0..3275091e 100644 --- a/apps/api/src/lexicon/types/app/rocksky/actor/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/actor/defs.ts @@ -1,67 +1,67 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; export interface ProfileViewDetailed { /** The unique identifier of the actor. */ - id?: string + id?: string; /** The DID of the actor. */ - did?: string + did?: string; /** The handle of the actor. */ - handle?: string + handle?: string; /** The display name of the actor. */ - displayName?: string + displayName?: string; /** The URL of the actor's avatar image. */ - avatar?: string + avatar?: string; /** The date and time when the actor was created. */ - createdAt?: string + createdAt?: string; /** The date and time when the actor was last updated. */ - updatedAt?: string - [k: string]: unknown + updatedAt?: string; + [k: string]: unknown; } export function isProfileViewDetailed(v: unknown): v is ProfileViewDetailed { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.actor.defs#profileViewDetailed' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.actor.defs#profileViewDetailed" + ); } export function validateProfileViewDetailed(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.actor.defs#profileViewDetailed', v) + return lexicons.validate("app.rocksky.actor.defs#profileViewDetailed", v); } export interface ProfileViewBasic { /** The unique identifier of the actor. */ - id?: string + id?: string; /** The DID of the actor. */ - did?: string + did?: string; /** The handle of the actor. */ - handle?: string + handle?: string; /** The display name of the actor. */ - displayName?: string + displayName?: string; /** The URL of the actor's avatar image. */ - avatar?: string + avatar?: string; /** The date and time when the actor was created. */ - createdAt?: string + createdAt?: string; /** The date and time when the actor was last updated. */ - updatedAt?: string - [k: string]: unknown + updatedAt?: string; + [k: string]: unknown; } export function isProfileViewBasic(v: unknown): v is ProfileViewBasic { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.actor.defs#profileViewBasic' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.actor.defs#profileViewBasic" + ); } export function validateProfileViewBasic(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.actor.defs#profileViewBasic', v) + return lexicons.validate("app.rocksky.actor.defs#profileViewBasic", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/actor/getActorAlbums.ts b/apps/api/src/lexicon/types/app/rocksky/actor/getActorAlbums.ts index ebb36170..91b9d83e 100644 --- a/apps/api/src/lexicon/types/app/rocksky/actor/getActorAlbums.ts +++ b/apps/api/src/lexicon/types/app/rocksky/actor/getActorAlbums.ts @@ -1,52 +1,52 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyAlbumDefs from '../album/defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyAlbumDefs from "../album/defs"; export interface QueryParams { /** The DID or handle of the actor */ - did: string + did: string; /** The maximum number of albums to return */ - limit?: number + limit?: number; /** The offset for pagination */ - offset?: number + offset?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - albums?: AppRockskyAlbumDefs.AlbumViewBasic[] - [k: string]: unknown + albums?: AppRockskyAlbumDefs.AlbumViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/actor/getActorArtists.ts b/apps/api/src/lexicon/types/app/rocksky/actor/getActorArtists.ts index 4c56bf04..ec112805 100644 --- a/apps/api/src/lexicon/types/app/rocksky/actor/getActorArtists.ts +++ b/apps/api/src/lexicon/types/app/rocksky/actor/getActorArtists.ts @@ -1,52 +1,52 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyArtistDefs from '../artist/defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyArtistDefs from "../artist/defs"; export interface QueryParams { /** The DID or handle of the actor */ - did: string + did: string; /** The maximum number of albums to return */ - limit?: number + limit?: number; /** The offset for pagination */ - offset?: number + offset?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - artists?: AppRockskyArtistDefs.ArtistViewBasic[] - [k: string]: unknown + artists?: AppRockskyArtistDefs.ArtistViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/actor/getActorLovedSongs.ts b/apps/api/src/lexicon/types/app/rocksky/actor/getActorLovedSongs.ts index cc1a8128..b77438ca 100644 --- a/apps/api/src/lexicon/types/app/rocksky/actor/getActorLovedSongs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/actor/getActorLovedSongs.ts @@ -1,52 +1,52 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskySongDefs from '../song/defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskySongDefs from "../song/defs"; export interface QueryParams { /** The DID or handle of the actor */ - did: string + did: string; /** The maximum number of albums to return */ - limit?: number + limit?: number; /** The offset for pagination */ - offset?: number + offset?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - tracks?: AppRockskySongDefs.SongViewBasic[] - [k: string]: unknown + tracks?: AppRockskySongDefs.SongViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/actor/getActorPlaylists.ts b/apps/api/src/lexicon/types/app/rocksky/actor/getActorPlaylists.ts index 8efd9ec3..4f3edadc 100644 --- a/apps/api/src/lexicon/types/app/rocksky/actor/getActorPlaylists.ts +++ b/apps/api/src/lexicon/types/app/rocksky/actor/getActorPlaylists.ts @@ -1,52 +1,52 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyPlaylistDefs from '../playlist/defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyPlaylistDefs from "../playlist/defs"; export interface QueryParams { /** The DID or handle of the actor */ - did: string + did: string; /** The maximum number of albums to return */ - limit?: number + limit?: number; /** The offset for pagination */ - offset?: number + offset?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - playlists?: AppRockskyPlaylistDefs.PlaylistViewBasic[] - [k: string]: unknown + playlists?: AppRockskyPlaylistDefs.PlaylistViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/actor/getActorScrobbles.ts b/apps/api/src/lexicon/types/app/rocksky/actor/getActorScrobbles.ts index f16bfaee..2fcf11a8 100644 --- a/apps/api/src/lexicon/types/app/rocksky/actor/getActorScrobbles.ts +++ b/apps/api/src/lexicon/types/app/rocksky/actor/getActorScrobbles.ts @@ -1,52 +1,52 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyScrobbleDefs from '../scrobble/defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyScrobbleDefs from "../scrobble/defs"; export interface QueryParams { /** The DID or handle of the actor */ - did: string + did: string; /** The maximum number of albums to return */ - limit?: number + limit?: number; /** The offset for pagination */ - offset?: number + offset?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - scrobbles?: AppRockskyScrobbleDefs.ScrobbleViewBasic[] - [k: string]: unknown + scrobbles?: AppRockskyScrobbleDefs.ScrobbleViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/actor/getActorSongs.ts b/apps/api/src/lexicon/types/app/rocksky/actor/getActorSongs.ts index 2142fd21..cc79c110 100644 --- a/apps/api/src/lexicon/types/app/rocksky/actor/getActorSongs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/actor/getActorSongs.ts @@ -1,52 +1,52 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskySongDefs from '../song/defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskySongDefs from "../song/defs"; export interface QueryParams { /** The DID or handle of the actor */ - did: string + did: string; /** The maximum number of albums to return */ - limit?: number + limit?: number; /** The offset for pagination */ - offset?: number + offset?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - songs?: AppRockskySongDefs.SongViewBasic[] - [k: string]: unknown + songs?: AppRockskySongDefs.SongViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/actor/getProfile.ts b/apps/api/src/lexicon/types/app/rocksky/actor/getProfile.ts index 3b2e62fe..ed78b3d2 100644 --- a/apps/api/src/lexicon/types/app/rocksky/actor/getProfile.ts +++ b/apps/api/src/lexicon/types/app/rocksky/actor/getProfile.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyActorDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyActorDefs from "./defs"; export interface QueryParams { /** The DID or handle of the actor */ - did?: string + did?: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyActorDefs.ProfileViewDetailed -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyActorDefs.ProfileViewDetailed; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/album.ts b/apps/api/src/lexicon/types/app/rocksky/album.ts index ac170a4c..3f9661c9 100644 --- a/apps/api/src/lexicon/types/app/rocksky/album.ts +++ b/apps/api/src/lexicon/types/app/rocksky/album.ts @@ -1,49 +1,49 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../lexicons' -import { isObj, hasProp } from '../../../util' -import { CID } from 'multiformats/cid' +import type { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../lexicons"; +import { isObj, hasProp } from "../../../util"; +import { CID } from "multiformats/cid"; export interface Record { /** The title of the album. */ - title: string + title: string; /** The artist of the album. */ - artist: string + artist: string; /** The duration of the album in seconds. */ - duration?: number + duration?: number; /** The release date of the album. */ - releaseDate?: string + releaseDate?: string; /** The year the album was released. */ - year?: number + year?: number; /** The genre of the album. */ - genre?: string + genre?: string; /** The album art of the album. */ - albumArt?: BlobRef + albumArt?: BlobRef; /** The tags of the album. */ - tags?: string[] + tags?: string[]; /** The YouTube link of the album. */ - youtubeLink?: string + youtubeLink?: string; /** The Spotify link of the album. */ - spotifyLink?: string + spotifyLink?: string; /** The tidal link of the album. */ - tidalLink?: string + tidalLink?: string; /** The Apple Music link of the album. */ - appleMusicLink?: string + appleMusicLink?: string; /** The date and time when the album was created. */ - createdAt: string - [k: string]: unknown + createdAt: string; + [k: string]: unknown; } export function isRecord(v: unknown): v is Record { return ( isObj(v) && - hasProp(v, '$type') && - (v.$type === 'app.rocksky.album#main' || v.$type === 'app.rocksky.album') - ) + hasProp(v, "$type") && + (v.$type === "app.rocksky.album#main" || v.$type === "app.rocksky.album") + ); } export function validateRecord(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.album#main', v) + return lexicons.validate("app.rocksky.album#main", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/album/defs.ts b/apps/api/src/lexicon/types/app/rocksky/album/defs.ts index 43b0a717..3e48dc0b 100644 --- a/apps/api/src/lexicon/types/app/rocksky/album/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/album/defs.ts @@ -1,85 +1,85 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import * as AppRockskySongDefsSongViewBasic from '../song/defs/songViewBasic' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type * as AppRockskySongDefsSongViewBasic from "../song/defs/songViewBasic"; export interface AlbumViewBasic { /** The unique identifier of the album. */ - id?: string + id?: string; /** The URI of the album. */ - uri?: string + uri?: string; /** The title of the album. */ - title?: string + title?: string; /** The artist of the album. */ - artist?: string + artist?: string; /** The URI of the album's artist. */ - artistUri?: string + artistUri?: string; /** The year the album was released. */ - year?: number + year?: number; /** The URL of the album art image. */ - albumArt?: string + albumArt?: string; /** The release date of the album. */ - releaseDate?: string + releaseDate?: string; /** The SHA256 hash of the album. */ - sha256?: string + sha256?: string; /** The number of times the album has been played. */ - playCount?: number + playCount?: number; /** The number of unique listeners who have played the album. */ - uniqueListeners?: number - [k: string]: unknown + uniqueListeners?: number; + [k: string]: unknown; } export function isAlbumViewBasic(v: unknown): v is AlbumViewBasic { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.album.defs#albumViewBasic' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.album.defs#albumViewBasic" + ); } export function validateAlbumViewBasic(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.album.defs#albumViewBasic', v) + return lexicons.validate("app.rocksky.album.defs#albumViewBasic", v); } export interface AlbumViewDetailed { /** The unique identifier of the album. */ - id?: string + id?: string; /** The URI of the album. */ - uri?: string + uri?: string; /** The title of the album. */ - title?: string + title?: string; /** The artist of the album. */ - artist?: string + artist?: string; /** The URI of the album's artist. */ - artistUri?: string + artistUri?: string; /** The year the album was released. */ - year?: number + year?: number; /** The URL of the album art image. */ - albumArt?: string + albumArt?: string; /** The release date of the album. */ - releaseDate?: string + releaseDate?: string; /** The SHA256 hash of the album. */ - sha256?: string + sha256?: string; /** The number of times the album has been played. */ - playCount?: number + playCount?: number; /** The number of unique listeners who have played the album. */ - uniqueListeners?: number - tracks?: AppRockskySongDefsSongViewBasic.Main[] - [k: string]: unknown + uniqueListeners?: number; + tracks?: AppRockskySongDefsSongViewBasic.Main[]; + [k: string]: unknown; } export function isAlbumViewDetailed(v: unknown): v is AlbumViewDetailed { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.album.defs#albumViewDetailed' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.album.defs#albumViewDetailed" + ); } export function validateAlbumViewDetailed(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.album.defs#albumViewDetailed', v) + return lexicons.validate("app.rocksky.album.defs#albumViewDetailed", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/album/getAlbum.ts b/apps/api/src/lexicon/types/app/rocksky/album/getAlbum.ts index 89f0be90..0b1c2f51 100644 --- a/apps/api/src/lexicon/types/app/rocksky/album/getAlbum.ts +++ b/apps/api/src/lexicon/types/app/rocksky/album/getAlbum.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyAlbumDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyAlbumDefs from "./defs"; export interface QueryParams { /** The URI of the album to retrieve. */ - uri: string + uri: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyAlbumDefs.AlbumViewDetailed -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyAlbumDefs.AlbumViewDetailed; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/album/getAlbumTracks.ts b/apps/api/src/lexicon/types/app/rocksky/album/getAlbumTracks.ts index 3a32b5bc..c23ccd50 100644 --- a/apps/api/src/lexicon/types/app/rocksky/album/getAlbumTracks.ts +++ b/apps/api/src/lexicon/types/app/rocksky/album/getAlbumTracks.ts @@ -1,48 +1,48 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskySongDefs from '../song/defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskySongDefs from "../song/defs"; export interface QueryParams { /** The URI of the album to retrieve tracks from */ - uri: string + uri: string; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - tracks?: AppRockskySongDefs.SongViewBasic[] - [k: string]: unknown + tracks?: AppRockskySongDefs.SongViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/album/getAlbums.ts b/apps/api/src/lexicon/types/app/rocksky/album/getAlbums.ts index 3b914f80..d64cacb1 100644 --- a/apps/api/src/lexicon/types/app/rocksky/album/getAlbums.ts +++ b/apps/api/src/lexicon/types/app/rocksky/album/getAlbums.ts @@ -1,50 +1,50 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyAlbumDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyAlbumDefs from "./defs"; export interface QueryParams { /** The maximum number of albums to return */ - limit?: number + limit?: number; /** The offset for pagination */ - offset?: number + offset?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - albums?: AppRockskyAlbumDefs.AlbumViewBasic[] - [k: string]: unknown + albums?: AppRockskyAlbumDefs.AlbumViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/apikey/createApikey.ts b/apps/api/src/lexicon/types/app/rocksky/apikey/createApikey.ts index 68490540..361b4902 100644 --- a/apps/api/src/lexicon/types/app/rocksky/apikey/createApikey.ts +++ b/apps/api/src/lexicon/types/app/rocksky/apikey/createApikey.ts @@ -1,51 +1,51 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyApikeyDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyApikeyDefs from "./defs"; -export interface QueryParams {} +export type QueryParams = {} export interface InputSchema { /** The name of the API key. */ - name: string + name: string; /** A description for the API key. */ - description?: string - [k: string]: unknown + description?: string; + [k: string]: unknown; } -export type OutputSchema = AppRockskyApikeyDefs.ApiKey +export type OutputSchema = AppRockskyApikeyDefs.ApiKey; export interface HandlerInput { - encoding: 'application/json' - body: InputSchema + encoding: "application/json"; + body: InputSchema; } export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/apikey/defs.ts b/apps/api/src/lexicon/types/app/rocksky/apikey/defs.ts index 5ff984d9..2ffbe945 100644 --- a/apps/api/src/lexicon/types/app/rocksky/apikey/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/apikey/defs.ts @@ -1,31 +1,31 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; export interface ApiKeyView { /** The unique identifier of the API key. */ - id?: string + id?: string; /** The name of the API key. */ - name?: string + name?: string; /** A description for the API key. */ - description?: string + description?: string; /** The date and time when the API key was created. */ - createdAt?: string - [k: string]: unknown + createdAt?: string; + [k: string]: unknown; } export function isApiKeyView(v: unknown): v is ApiKeyView { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.apikey.defs#apiKeyView' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.apikey.defs#apiKeyView" + ); } export function validateApiKeyView(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.apikey.defs#apiKeyView', v) + return lexicons.validate("app.rocksky.apikey.defs#apiKeyView", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/apikey/getApikeys.ts b/apps/api/src/lexicon/types/app/rocksky/apikey/getApikeys.ts index f0429569..dd82a755 100644 --- a/apps/api/src/lexicon/types/app/rocksky/apikey/getApikeys.ts +++ b/apps/api/src/lexicon/types/app/rocksky/apikey/getApikeys.ts @@ -1,50 +1,50 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyApikeyDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyApikeyDefs from "./defs"; export interface QueryParams { /** The number of API keys to skip before starting to collect the result set. */ - offset?: number + offset?: number; /** The number of API keys to return per page. */ - limit?: number + limit?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - apiKeys?: AppRockskyApikeyDefs.ApikeyView[] - [k: string]: unknown + apiKeys?: AppRockskyApikeyDefs.ApikeyView[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/apikey/removeApikey.ts b/apps/api/src/lexicon/types/app/rocksky/apikey/removeApikey.ts index 3ec6a1c0..f84c6257 100644 --- a/apps/api/src/lexicon/types/app/rocksky/apikey/removeApikey.ts +++ b/apps/api/src/lexicon/types/app/rocksky/apikey/removeApikey.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyApikeyDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyApikeyDefs from "./defs"; export interface QueryParams { /** The ID of the API key to remove. */ - id: string + id: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyApikeyDefs.ApiKey -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyApikeyDefs.ApiKey; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/apikey/updateApikey.ts b/apps/api/src/lexicon/types/app/rocksky/apikey/updateApikey.ts index 46ccc6cd..98edcefb 100644 --- a/apps/api/src/lexicon/types/app/rocksky/apikey/updateApikey.ts +++ b/apps/api/src/lexicon/types/app/rocksky/apikey/updateApikey.ts @@ -1,53 +1,53 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyApikeyDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyApikeyDefs from "./defs"; -export interface QueryParams {} +export type QueryParams = {} export interface InputSchema { /** The ID of the API key to update. */ - id: string + id: string; /** The new name of the API key. */ - name: string + name: string; /** A new description for the API key. */ - description?: string - [k: string]: unknown + description?: string; + [k: string]: unknown; } -export type OutputSchema = AppRockskyApikeyDefs.ApiKey +export type OutputSchema = AppRockskyApikeyDefs.ApiKey; export interface HandlerInput { - encoding: 'application/json' - body: InputSchema + encoding: "application/json"; + body: InputSchema; } export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/apikeys/defs.ts b/apps/api/src/lexicon/types/app/rocksky/apikeys/defs.ts index 3943ee36..4c2e0c7e 100644 --- a/apps/api/src/lexicon/types/app/rocksky/apikeys/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/apikeys/defs.ts @@ -1,7 +1,7 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; diff --git a/apps/api/src/lexicon/types/app/rocksky/artist.ts b/apps/api/src/lexicon/types/app/rocksky/artist.ts index 4b2ba0fa..41bd4196 100644 --- a/apps/api/src/lexicon/types/app/rocksky/artist.ts +++ b/apps/api/src/lexicon/types/app/rocksky/artist.ts @@ -1,39 +1,39 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../lexicons' -import { isObj, hasProp } from '../../../util' -import { CID } from 'multiformats/cid' +import type { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../lexicons"; +import { isObj, hasProp } from "../../../util"; +import { CID } from "multiformats/cid"; export interface Record { /** The name of the artist. */ - name: string + name: string; /** The biography of the artist. */ - bio?: string + bio?: string; /** The picture of the artist. */ - picture?: BlobRef + picture?: BlobRef; /** The tags of the artist. */ - tags?: string[] + tags?: string[]; /** The birth date of the artist. */ - born?: string + born?: string; /** The death date of the artist. */ - died?: string + died?: string; /** The birth place of the artist. */ - bornIn?: string + bornIn?: string; /** The date when the artist was created. */ - createdAt: string - [k: string]: unknown + createdAt: string; + [k: string]: unknown; } export function isRecord(v: unknown): v is Record { return ( isObj(v) && - hasProp(v, '$type') && - (v.$type === 'app.rocksky.artist#main' || v.$type === 'app.rocksky.artist') - ) + hasProp(v, "$type") && + (v.$type === "app.rocksky.artist#main" || v.$type === "app.rocksky.artist") + ); } export function validateRecord(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.artist#main', v) + return lexicons.validate("app.rocksky.artist#main", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/artist/defs.ts b/apps/api/src/lexicon/types/app/rocksky/artist/defs.ts index d7257954..d2b664fd 100644 --- a/apps/api/src/lexicon/types/app/rocksky/artist/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/artist/defs.ts @@ -1,67 +1,67 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; export interface ArtistViewBasic { /** The unique identifier of the artist. */ - id?: string + id?: string; /** The URI of the artist. */ - uri?: string + uri?: string; /** The name of the artist. */ - name?: string + name?: string; /** The picture of the artist. */ - picture?: string + picture?: string; /** The SHA256 hash of the artist. */ - sha256?: string + sha256?: string; /** The number of times the artist has been played. */ - playCount?: number + playCount?: number; /** The number of unique listeners who have played the artist. */ - uniqueListeners?: number - [k: string]: unknown + uniqueListeners?: number; + [k: string]: unknown; } export function isArtistViewBasic(v: unknown): v is ArtistViewBasic { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.artist.defs#artistViewBasic' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.artist.defs#artistViewBasic" + ); } export function validateArtistViewBasic(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.artist.defs#artistViewBasic', v) + return lexicons.validate("app.rocksky.artist.defs#artistViewBasic", v); } export interface ArtistViewDetailed { /** The unique identifier of the artist. */ - id?: string + id?: string; /** The URI of the artist. */ - uri?: string + uri?: string; /** The name of the artist. */ - name?: string + name?: string; /** The picture of the artist. */ - picture?: string + picture?: string; /** The SHA256 hash of the artist. */ - sha256?: string + sha256?: string; /** The number of times the artist has been played. */ - playCount?: number + playCount?: number; /** The number of unique listeners who have played the artist. */ - uniqueListeners?: number - [k: string]: unknown + uniqueListeners?: number; + [k: string]: unknown; } export function isArtistViewDetailed(v: unknown): v is ArtistViewDetailed { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.artist.defs#artistViewDetailed' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.artist.defs#artistViewDetailed" + ); } export function validateArtistViewDetailed(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.artist.defs#artistViewDetailed', v) + return lexicons.validate("app.rocksky.artist.defs#artistViewDetailed", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/artist/getArtist.ts b/apps/api/src/lexicon/types/app/rocksky/artist/getArtist.ts index b3d0a5ff..2c46caa1 100644 --- a/apps/api/src/lexicon/types/app/rocksky/artist/getArtist.ts +++ b/apps/api/src/lexicon/types/app/rocksky/artist/getArtist.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyArtistDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyArtistDefs from "./defs"; export interface QueryParams { /** The URI of the artist to retrieve details from */ - uri: string + uri: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyArtistDefs.ArtistViewDetailed -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyArtistDefs.ArtistViewDetailed; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/artist/getArtistAlbums.ts b/apps/api/src/lexicon/types/app/rocksky/artist/getArtistAlbums.ts index 681ef9c9..6030c2b3 100644 --- a/apps/api/src/lexicon/types/app/rocksky/artist/getArtistAlbums.ts +++ b/apps/api/src/lexicon/types/app/rocksky/artist/getArtistAlbums.ts @@ -1,48 +1,48 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyAlbumDefs from '../album/defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyAlbumDefs from "../album/defs"; export interface QueryParams { /** The URI of the artist to retrieve albums from */ - uri: string + uri: string; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - albums?: AppRockskyAlbumDefs.AlbumViewBasic[] - [k: string]: unknown + albums?: AppRockskyAlbumDefs.AlbumViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/artist/getArtistTracks.ts b/apps/api/src/lexicon/types/app/rocksky/artist/getArtistTracks.ts index db1f6497..11e30249 100644 --- a/apps/api/src/lexicon/types/app/rocksky/artist/getArtistTracks.ts +++ b/apps/api/src/lexicon/types/app/rocksky/artist/getArtistTracks.ts @@ -1,52 +1,52 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskySongDefs from '../song/defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskySongDefs from "../song/defs"; export interface QueryParams { /** The URI of the artist to retrieve albums from */ - uri?: string + uri?: string; /** The maximum number of tracks to return */ - limit?: number + limit?: number; /** The offset for pagination */ - offset?: number + offset?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - tracks?: AppRockskySongDefs.SongViewBasic[] - [k: string]: unknown + tracks?: AppRockskySongDefs.SongViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/artist/getArtists.ts b/apps/api/src/lexicon/types/app/rocksky/artist/getArtists.ts index 483a57b8..86c3f04d 100644 --- a/apps/api/src/lexicon/types/app/rocksky/artist/getArtists.ts +++ b/apps/api/src/lexicon/types/app/rocksky/artist/getArtists.ts @@ -1,50 +1,50 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyArtistDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyArtistDefs from "./defs"; export interface QueryParams { /** The maximum number of artists to return */ - limit?: number + limit?: number; /** The offset for pagination */ - offset?: number + offset?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - artists?: AppRockskyArtistDefs.ArtistViewBasic[] - [k: string]: unknown + artists?: AppRockskyArtistDefs.ArtistViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/charts/defs.ts b/apps/api/src/lexicon/types/app/rocksky/charts/defs.ts index 4f54fc53..7e671a00 100644 --- a/apps/api/src/lexicon/types/app/rocksky/charts/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/charts/defs.ts @@ -1,44 +1,44 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; export interface ChartsView { - scrobbles?: ScrobbleViewBasic[] - [k: string]: unknown + scrobbles?: ScrobbleViewBasic[]; + [k: string]: unknown; } export function isChartsView(v: unknown): v is ChartsView { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.charts.defs#chartsView' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.charts.defs#chartsView" + ); } export function validateChartsView(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.charts.defs#chartsView', v) + return lexicons.validate("app.rocksky.charts.defs#chartsView", v); } export interface ScrobbleViewBasic { /** The date of the scrobble. */ - date?: string + date?: string; /** The number of scrobbles on this date. */ - count?: number - [k: string]: unknown + count?: number; + [k: string]: unknown; } export function isScrobbleViewBasic(v: unknown): v is ScrobbleViewBasic { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.charts.defs#scrobbleViewBasic' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.charts.defs#scrobbleViewBasic" + ); } export function validateScrobbleViewBasic(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.charts.defs#scrobbleViewBasic', v) + return lexicons.validate("app.rocksky.charts.defs#scrobbleViewBasic", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/charts/getScrobblesChart.ts b/apps/api/src/lexicon/types/app/rocksky/charts/getScrobblesChart.ts index b814f99e..bf91da35 100644 --- a/apps/api/src/lexicon/types/app/rocksky/charts/getScrobblesChart.ts +++ b/apps/api/src/lexicon/types/app/rocksky/charts/getScrobblesChart.ts @@ -1,49 +1,49 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyChartsDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyChartsDefs from "./defs"; export interface QueryParams { /** The DID or handle of the actor */ - did?: string + did?: string; /** The URI of the artist to filter by */ - artisturi?: string + artisturi?: string; /** The URI of the album to filter by */ - albumuri?: string + albumuri?: string; /** The URI of the track to filter by */ - songuri?: string + songuri?: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyChartsDefs.ChartsView -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyChartsDefs.ChartsView; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/dropbox/defs.ts b/apps/api/src/lexicon/types/app/rocksky/dropbox/defs.ts index a451452e..222ebf1d 100644 --- a/apps/api/src/lexicon/types/app/rocksky/dropbox/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/dropbox/defs.ts @@ -1,71 +1,71 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; export interface FileView { /** The unique identifier of the file. */ - id?: string + id?: string; /** The name of the file. */ - name?: string + name?: string; /** The lowercased path of the file. */ - pathLower?: string + pathLower?: string; /** The display path of the file. */ - pathDisplay?: string + pathDisplay?: string; /** The last modified date and time of the file on the client. */ - clientModified?: string + clientModified?: string; /** The last modified date and time of the file on the server. */ - serverModified?: string - [k: string]: unknown + serverModified?: string; + [k: string]: unknown; } export function isFileView(v: unknown): v is FileView { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.dropbox.defs#fileView' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.dropbox.defs#fileView" + ); } export function validateFileView(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.dropbox.defs#fileView', v) + return lexicons.validate("app.rocksky.dropbox.defs#fileView", v); } export interface FileListView { /** A list of files in the Dropbox. */ - files?: FileView[] - [k: string]: unknown + files?: FileView[]; + [k: string]: unknown; } export function isFileListView(v: unknown): v is FileListView { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.dropbox.defs#fileListView' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.dropbox.defs#fileListView" + ); } export function validateFileListView(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.dropbox.defs#fileListView', v) + return lexicons.validate("app.rocksky.dropbox.defs#fileListView", v); } export interface TemporaryLinkView { /** The temporary link to access the file. */ - link?: string - [k: string]: unknown + link?: string; + [k: string]: unknown; } export function isTemporaryLinkView(v: unknown): v is TemporaryLinkView { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.dropbox.defs#temporaryLinkView' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.dropbox.defs#temporaryLinkView" + ); } export function validateTemporaryLinkView(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.dropbox.defs#temporaryLinkView', v) + return lexicons.validate("app.rocksky.dropbox.defs#temporaryLinkView", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/dropbox/downloadFile.ts b/apps/api/src/lexicon/types/app/rocksky/dropbox/downloadFile.ts index 271eab55..4f2023cd 100644 --- a/apps/api/src/lexicon/types/app/rocksky/dropbox/downloadFile.ts +++ b/apps/api/src/lexicon/types/app/rocksky/dropbox/downloadFile.ts @@ -1,42 +1,42 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import stream from 'stream' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import type stream from "stream"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { /** The unique identifier of the file to download */ - fileId: string + fileId: string; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/octet-stream' - body: Uint8Array | stream.Readable - headers?: { [key: string]: string } + encoding: "application/octet-stream"; + body: Uint8Array | stream.Readable; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/dropbox/getFiles.ts b/apps/api/src/lexicon/types/app/rocksky/dropbox/getFiles.ts index 9f432db0..b6e92e56 100644 --- a/apps/api/src/lexicon/types/app/rocksky/dropbox/getFiles.ts +++ b/apps/api/src/lexicon/types/app/rocksky/dropbox/getFiles.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyDropboxDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyDropboxDefs from "./defs"; export interface QueryParams { /** Path to the Dropbox folder or root directory */ - at?: string + at?: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyDropboxDefs.FileListView -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyDropboxDefs.FileListView; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/dropbox/getMetadata.ts b/apps/api/src/lexicon/types/app/rocksky/dropbox/getMetadata.ts index 267f0576..ea57a3da 100644 --- a/apps/api/src/lexicon/types/app/rocksky/dropbox/getMetadata.ts +++ b/apps/api/src/lexicon/types/app/rocksky/dropbox/getMetadata.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyDropboxDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyDropboxDefs from "./defs"; export interface QueryParams { /** Path to the file or folder in Dropbox */ - path: string + path: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyDropboxDefs.FileView -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyDropboxDefs.FileView; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/dropbox/getTemporaryLink.ts b/apps/api/src/lexicon/types/app/rocksky/dropbox/getTemporaryLink.ts index ac51e328..710abd88 100644 --- a/apps/api/src/lexicon/types/app/rocksky/dropbox/getTemporaryLink.ts +++ b/apps/api/src/lexicon/types/app/rocksky/dropbox/getTemporaryLink.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyDropboxDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyDropboxDefs from "./defs"; export interface QueryParams { /** Path to the file in Dropbox */ - path: string + path: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyDropboxDefs.TemporaryLinkView -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyDropboxDefs.TemporaryLinkView; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/feed/defs.ts b/apps/api/src/lexicon/types/app/rocksky/feed/defs.ts index c132e6ef..6db0f337 100644 --- a/apps/api/src/lexicon/types/app/rocksky/feed/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/feed/defs.ts @@ -1,15 +1,15 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import * as AppRockskySongDefs from '../song/defs' -import * as AppRockskyAlbumDefs from '../album/defs' -import * as AppRockskyArtistDefs from '../artist/defs' -import * as AppRockskyPlaylistDefs from '../playlist/defs' -import * as AppRockskyActorDefs from '../actor/defs' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type * as AppRockskySongDefs from "../song/defs"; +import type * as AppRockskyAlbumDefs from "../album/defs"; +import type * as AppRockskyArtistDefs from "../artist/defs"; +import type * as AppRockskyPlaylistDefs from "../playlist/defs"; +import type * as AppRockskyActorDefs from "../actor/defs"; export interface SearchResultsView { hits?: ( @@ -19,70 +19,70 @@ export interface SearchResultsView { | AppRockskyPlaylistDefs.PlaylistViewBasic | AppRockskyActorDefs.ProfileViewBasic | { $type: string; [k: string]: unknown } - )[] - processingTimeMs?: number - limit?: number - offset?: number - estimatedTotalHits?: number - [k: string]: unknown + )[]; + processingTimeMs?: number; + limit?: number; + offset?: number; + estimatedTotalHits?: number; + [k: string]: unknown; } export function isSearchResultsView(v: unknown): v is SearchResultsView { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.feed.defs#searchResultsView' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.feed.defs#searchResultsView" + ); } export function validateSearchResultsView(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.feed.defs#searchResultsView', v) + return lexicons.validate("app.rocksky.feed.defs#searchResultsView", v); } export interface NowPlayingView { - album?: string - albumArt?: string - albumArtist?: string - albumUri?: string - artist?: string - artistUri?: string - avatar?: string - createdAt?: string - did?: string - handle?: string - id?: string - title?: string - trackId?: string - trackUri?: string - uri?: string - [k: string]: unknown + album?: string; + albumArt?: string; + albumArtist?: string; + albumUri?: string; + artist?: string; + artistUri?: string; + avatar?: string; + createdAt?: string; + did?: string; + handle?: string; + id?: string; + title?: string; + trackId?: string; + trackUri?: string; + uri?: string; + [k: string]: unknown; } export function isNowPlayingView(v: unknown): v is NowPlayingView { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.feed.defs#nowPlayingView' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.feed.defs#nowPlayingView" + ); } export function validateNowPlayingView(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.feed.defs#nowPlayingView', v) + return lexicons.validate("app.rocksky.feed.defs#nowPlayingView", v); } export interface NowPlayingsView { - nowPlayings?: NowPlayingView[] - [k: string]: unknown + nowPlayings?: NowPlayingView[]; + [k: string]: unknown; } export function isNowPlayingsView(v: unknown): v is NowPlayingsView { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.feed.defs#nowPlayingsView' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.feed.defs#nowPlayingsView" + ); } export function validateNowPlayingsView(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.feed.defs#nowPlayingsView', v) + return lexicons.validate("app.rocksky.feed.defs#nowPlayingsView", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/feed/getNowPlayings.ts b/apps/api/src/lexicon/types/app/rocksky/feed/getNowPlayings.ts index b16b579c..dd108561 100644 --- a/apps/api/src/lexicon/types/app/rocksky/feed/getNowPlayings.ts +++ b/apps/api/src/lexicon/types/app/rocksky/feed/getNowPlayings.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyFeedDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyFeedDefs from "./defs"; export interface QueryParams { /** The maximum number of now playing tracks to return. */ - size?: number + size?: number; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyFeedDefs.NowPlayingsView -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyFeedDefs.NowPlayingsView; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/feed/search.ts b/apps/api/src/lexicon/types/app/rocksky/feed/search.ts index 1209fec8..8cf409fa 100644 --- a/apps/api/src/lexicon/types/app/rocksky/feed/search.ts +++ b/apps/api/src/lexicon/types/app/rocksky/feed/search.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyFeedDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyFeedDefs from "./defs"; export interface QueryParams { /** The search query string */ - query: string + query: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyFeedDefs.SearchResultsView -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyFeedDefs.SearchResultsView; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/googledrive/defs.ts b/apps/api/src/lexicon/types/app/rocksky/googledrive/defs.ts index 7d93cc5c..34777d01 100644 --- a/apps/api/src/lexicon/types/app/rocksky/googledrive/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/googledrive/defs.ts @@ -1,42 +1,42 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; export interface FileView { /** The unique identifier of the file. */ - id?: string - [k: string]: unknown + id?: string; + [k: string]: unknown; } export function isFileView(v: unknown): v is FileView { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.googledrive.defs#fileView' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.googledrive.defs#fileView" + ); } export function validateFileView(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.googledrive.defs#fileView', v) + return lexicons.validate("app.rocksky.googledrive.defs#fileView", v); } export interface FileListView { - files?: FileView[] - [k: string]: unknown + files?: FileView[]; + [k: string]: unknown; } export function isFileListView(v: unknown): v is FileListView { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.googledrive.defs#fileListView' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.googledrive.defs#fileListView" + ); } export function validateFileListView(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.googledrive.defs#fileListView', v) + return lexicons.validate("app.rocksky.googledrive.defs#fileListView", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/googledrive/downloadFile.ts b/apps/api/src/lexicon/types/app/rocksky/googledrive/downloadFile.ts index 271eab55..4f2023cd 100644 --- a/apps/api/src/lexicon/types/app/rocksky/googledrive/downloadFile.ts +++ b/apps/api/src/lexicon/types/app/rocksky/googledrive/downloadFile.ts @@ -1,42 +1,42 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import stream from 'stream' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import type stream from "stream"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { /** The unique identifier of the file to download */ - fileId: string + fileId: string; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/octet-stream' - body: Uint8Array | stream.Readable - headers?: { [key: string]: string } + encoding: "application/octet-stream"; + body: Uint8Array | stream.Readable; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/googledrive/getFile.ts b/apps/api/src/lexicon/types/app/rocksky/googledrive/getFile.ts index c8ce3937..f10d3c5e 100644 --- a/apps/api/src/lexicon/types/app/rocksky/googledrive/getFile.ts +++ b/apps/api/src/lexicon/types/app/rocksky/googledrive/getFile.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyGoogledriveDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyGoogledriveDefs from "./defs"; export interface QueryParams { /** The unique identifier of the file to retrieve */ - fileId: string + fileId: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyGoogledriveDefs.FileView -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyGoogledriveDefs.FileView; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/googledrive/getFiles.ts b/apps/api/src/lexicon/types/app/rocksky/googledrive/getFiles.ts index 9fc99f61..0d4b1c64 100644 --- a/apps/api/src/lexicon/types/app/rocksky/googledrive/getFiles.ts +++ b/apps/api/src/lexicon/types/app/rocksky/googledrive/getFiles.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyGoogledriveDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyGoogledriveDefs from "./defs"; export interface QueryParams { /** Path to the Google Drive folder or root directory */ - at?: string + at?: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyGoogledriveDefs.FileListView -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyGoogledriveDefs.FileListView; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/like.ts b/apps/api/src/lexicon/types/app/rocksky/like.ts index e58657aa..21035e90 100644 --- a/apps/api/src/lexicon/types/app/rocksky/like.ts +++ b/apps/api/src/lexicon/types/app/rocksky/like.ts @@ -1,27 +1,27 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../lexicons' -import { isObj, hasProp } from '../../../util' -import { CID } from 'multiformats/cid' -import * as ComAtprotoRepoStrongRef from '../../com/atproto/repo/strongRef' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../lexicons"; +import { isObj, hasProp } from "../../../util"; +import { CID } from "multiformats/cid"; +import type * as ComAtprotoRepoStrongRef from "../../com/atproto/repo/strongRef"; export interface Record { /** The date when the like was created. */ - createdAt: string - subject: ComAtprotoRepoStrongRef.Main - [k: string]: unknown + createdAt: string; + subject: ComAtprotoRepoStrongRef.Main; + [k: string]: unknown; } export function isRecord(v: unknown): v is Record { return ( isObj(v) && - hasProp(v, '$type') && - (v.$type === 'app.rocksky.like#main' || v.$type === 'app.rocksky.like') - ) + hasProp(v, "$type") && + (v.$type === "app.rocksky.like#main" || v.$type === "app.rocksky.like") + ); } export function validateRecord(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.like#main', v) + return lexicons.validate("app.rocksky.like#main", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/like/dislikeShout.ts b/apps/api/src/lexicon/types/app/rocksky/like/dislikeShout.ts index 5e5a140f..666c305a 100644 --- a/apps/api/src/lexicon/types/app/rocksky/like/dislikeShout.ts +++ b/apps/api/src/lexicon/types/app/rocksky/like/dislikeShout.ts @@ -1,49 +1,49 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyShoutDefs from '../shout/defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyShoutDefs from "../shout/defs"; -export interface QueryParams {} +export type QueryParams = {} export interface InputSchema { /** The unique identifier of the shout to dislike */ - uri?: string - [k: string]: unknown + uri?: string; + [k: string]: unknown; } -export type OutputSchema = AppRockskyShoutDefs.ShoutView +export type OutputSchema = AppRockskyShoutDefs.ShoutView; export interface HandlerInput { - encoding: 'application/json' - body: InputSchema + encoding: "application/json"; + body: InputSchema; } export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/like/dislikeSong.ts b/apps/api/src/lexicon/types/app/rocksky/like/dislikeSong.ts index fb31df74..2e7efea3 100644 --- a/apps/api/src/lexicon/types/app/rocksky/like/dislikeSong.ts +++ b/apps/api/src/lexicon/types/app/rocksky/like/dislikeSong.ts @@ -1,49 +1,49 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskySongDefs from '../song/defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskySongDefs from "../song/defs"; -export interface QueryParams {} +export type QueryParams = {} export interface InputSchema { /** The unique identifier of the song to dislike */ - uri?: string - [k: string]: unknown + uri?: string; + [k: string]: unknown; } -export type OutputSchema = AppRockskySongDefs.SongViewDetailed +export type OutputSchema = AppRockskySongDefs.SongViewDetailed; export interface HandlerInput { - encoding: 'application/json' - body: InputSchema + encoding: "application/json"; + body: InputSchema; } export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/like/likeShout.ts b/apps/api/src/lexicon/types/app/rocksky/like/likeShout.ts index 07174581..46307d1d 100644 --- a/apps/api/src/lexicon/types/app/rocksky/like/likeShout.ts +++ b/apps/api/src/lexicon/types/app/rocksky/like/likeShout.ts @@ -1,49 +1,49 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyShoutDefs from '../shout/defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyShoutDefs from "../shout/defs"; -export interface QueryParams {} +export type QueryParams = {} export interface InputSchema { /** The unique identifier of the shout to like */ - uri?: string - [k: string]: unknown + uri?: string; + [k: string]: unknown; } -export type OutputSchema = AppRockskyShoutDefs.ShoutView +export type OutputSchema = AppRockskyShoutDefs.ShoutView; export interface HandlerInput { - encoding: 'application/json' - body: InputSchema + encoding: "application/json"; + body: InputSchema; } export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/like/likeSong.ts b/apps/api/src/lexicon/types/app/rocksky/like/likeSong.ts index 68655fcd..b0f4d600 100644 --- a/apps/api/src/lexicon/types/app/rocksky/like/likeSong.ts +++ b/apps/api/src/lexicon/types/app/rocksky/like/likeSong.ts @@ -1,49 +1,49 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskySongDefs from '../song/defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskySongDefs from "../song/defs"; -export interface QueryParams {} +export type QueryParams = {} export interface InputSchema { /** The unique identifier of the song to like */ - uri?: string - [k: string]: unknown + uri?: string; + [k: string]: unknown; } -export type OutputSchema = AppRockskySongDefs.SongViewDetailed +export type OutputSchema = AppRockskySongDefs.SongViewDetailed; export interface HandlerInput { - encoding: 'application/json' - body: InputSchema + encoding: "application/json"; + body: InputSchema; } export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/player/addDirectoryToQueue.ts b/apps/api/src/lexicon/types/app/rocksky/player/addDirectoryToQueue.ts new file mode 100644 index 00000000..585d9326 --- /dev/null +++ b/apps/api/src/lexicon/types/app/rocksky/player/addDirectoryToQueue.ts @@ -0,0 +1,40 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; + +export interface QueryParams { + playerId?: string; + /** The directory to add to the queue */ + directory: string; + /** Position in the queue to insert the directory at, defaults to the end if not specified */ + position?: number; + /** Whether to shuffle the added directory in the queue */ + shuffle?: boolean; +} + +export type InputSchema = undefined; +export type HandlerInput = undefined; + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; +export type HandlerReqCtx = { + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/player/addItemsToQueue.ts b/apps/api/src/lexicon/types/app/rocksky/player/addItemsToQueue.ts index 9388d3ab..06971d3c 100644 --- a/apps/api/src/lexicon/types/app/rocksky/player/addItemsToQueue.ts +++ b/apps/api/src/lexicon/types/app/rocksky/player/addItemsToQueue.ts @@ -1,39 +1,39 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { - playerId?: string - items: string[] + playerId?: string; + items: string[]; /** Position in the queue to insert the items at, defaults to the end if not specified */ - position?: number + position?: number; /** Whether to shuffle the added items in the queue */ - shuffle?: boolean + shuffle?: boolean; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/player/defs.ts b/apps/api/src/lexicon/types/app/rocksky/player/defs.ts index 4b198ece..a31fa2cc 100644 --- a/apps/api/src/lexicon/types/app/rocksky/player/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/player/defs.ts @@ -1,16 +1,16 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import * as AppRockskySongDefsSongViewBasic from '../song/defs/songViewBasic' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type * as AppRockskySongDefsSongViewBasic from "../song/defs/songViewBasic"; export interface CurrentlyPlayingViewDetailed { /** The title of the currently playing track */ - title?: string - [k: string]: unknown + title?: string; + [k: string]: unknown; } export function isCurrentlyPlayingViewDetailed( @@ -18,23 +18,23 @@ export function isCurrentlyPlayingViewDetailed( ): v is CurrentlyPlayingViewDetailed { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.player.defs#currentlyPlayingViewDetailed' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.player.defs#currentlyPlayingViewDetailed" + ); } export function validateCurrentlyPlayingViewDetailed( v: unknown, ): ValidationResult { return lexicons.validate( - 'app.rocksky.player.defs#currentlyPlayingViewDetailed', + "app.rocksky.player.defs#currentlyPlayingViewDetailed", v, - ) + ); } export interface PlaybackQueueViewDetailed { - tracks?: AppRockskySongDefsSongViewBasic.Main[] - [k: string]: unknown + tracks?: AppRockskySongDefsSongViewBasic.Main[]; + [k: string]: unknown; } export function isPlaybackQueueViewDetailed( @@ -42,16 +42,16 @@ export function isPlaybackQueueViewDetailed( ): v is PlaybackQueueViewDetailed { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.player.defs#playbackQueueViewDetailed' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.player.defs#playbackQueueViewDetailed" + ); } export function validatePlaybackQueueViewDetailed( v: unknown, ): ValidationResult { return lexicons.validate( - 'app.rocksky.player.defs#playbackQueueViewDetailed', + "app.rocksky.player.defs#playbackQueueViewDetailed", v, - ) + ); } diff --git a/apps/api/src/lexicon/types/app/rocksky/player/getCurrentlyPlaying.ts b/apps/api/src/lexicon/types/app/rocksky/player/getCurrentlyPlaying.ts index d8839126..2fc8b155 100644 --- a/apps/api/src/lexicon/types/app/rocksky/player/getCurrentlyPlaying.ts +++ b/apps/api/src/lexicon/types/app/rocksky/player/getCurrentlyPlaying.ts @@ -1,44 +1,44 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyPlayerDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyPlayerDefs from "./defs"; export interface QueryParams { - playerId?: string + playerId?: string; /** Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. */ - actor?: string + actor?: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyPlayerDefs.CurrentlyPlayingViewDetailed -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyPlayerDefs.CurrentlyPlayingViewDetailed; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/player/getPlaybackQueue.ts b/apps/api/src/lexicon/types/app/rocksky/player/getPlaybackQueue.ts index c8538f72..c9ba27d8 100644 --- a/apps/api/src/lexicon/types/app/rocksky/player/getPlaybackQueue.ts +++ b/apps/api/src/lexicon/types/app/rocksky/player/getPlaybackQueue.ts @@ -1,42 +1,42 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyPlayerDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyPlayerDefs from "./defs"; export interface QueryParams { - playerId?: string + playerId?: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyPlayerDefs.PlaybackQueueViewDetailed -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyPlayerDefs.PlaybackQueueViewDetailed; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/player/next.ts b/apps/api/src/lexicon/types/app/rocksky/player/next.ts index 6538f68b..156fd6b1 100644 --- a/apps/api/src/lexicon/types/app/rocksky/player/next.ts +++ b/apps/api/src/lexicon/types/app/rocksky/player/next.ts @@ -1,34 +1,34 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { - playerId?: string + playerId?: string; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/player/pause.ts b/apps/api/src/lexicon/types/app/rocksky/player/pause.ts index 6538f68b..156fd6b1 100644 --- a/apps/api/src/lexicon/types/app/rocksky/player/pause.ts +++ b/apps/api/src/lexicon/types/app/rocksky/player/pause.ts @@ -1,34 +1,34 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { - playerId?: string + playerId?: string; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/player/play.ts b/apps/api/src/lexicon/types/app/rocksky/player/play.ts index 6538f68b..156fd6b1 100644 --- a/apps/api/src/lexicon/types/app/rocksky/player/play.ts +++ b/apps/api/src/lexicon/types/app/rocksky/player/play.ts @@ -1,34 +1,34 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { - playerId?: string + playerId?: string; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/player/playDirectory.ts b/apps/api/src/lexicon/types/app/rocksky/player/playDirectory.ts index 1ebbc34e..bd12386e 100644 --- a/apps/api/src/lexicon/types/app/rocksky/player/playDirectory.ts +++ b/apps/api/src/lexicon/types/app/rocksky/player/playDirectory.ts @@ -1,38 +1,38 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { - playerId?: string - directoryId: string - shuffle?: boolean - recurse?: boolean - position?: number + playerId?: string; + directoryId: string; + shuffle?: boolean; + recurse?: boolean; + position?: number; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/player/playFile.ts b/apps/api/src/lexicon/types/app/rocksky/player/playFile.ts index a9f4b490..c54f183a 100644 --- a/apps/api/src/lexicon/types/app/rocksky/player/playFile.ts +++ b/apps/api/src/lexicon/types/app/rocksky/player/playFile.ts @@ -1,35 +1,35 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { - playerId?: string - fileId: string + playerId?: string; + fileId: string; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/player/previous.ts b/apps/api/src/lexicon/types/app/rocksky/player/previous.ts index 6538f68b..156fd6b1 100644 --- a/apps/api/src/lexicon/types/app/rocksky/player/previous.ts +++ b/apps/api/src/lexicon/types/app/rocksky/player/previous.ts @@ -1,34 +1,34 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { - playerId?: string + playerId?: string; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/player/seek.ts b/apps/api/src/lexicon/types/app/rocksky/player/seek.ts index b80265c9..cd90d0dd 100644 --- a/apps/api/src/lexicon/types/app/rocksky/player/seek.ts +++ b/apps/api/src/lexicon/types/app/rocksky/player/seek.ts @@ -1,36 +1,36 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { - playerId?: string + playerId?: string; /** The position in seconds to seek to */ - position: number + position: number; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/playlist.ts b/apps/api/src/lexicon/types/app/rocksky/playlist.ts index 7b2786a8..6e9510b2 100644 --- a/apps/api/src/lexicon/types/app/rocksky/playlist.ts +++ b/apps/api/src/lexicon/types/app/rocksky/playlist.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../lexicons' -import { isObj, hasProp } from '../../../util' -import { CID } from 'multiformats/cid' -import * as AppRockskySong from './song' +import type { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../lexicons"; +import { isObj, hasProp } from "../../../util"; +import { CID } from "multiformats/cid"; +import type * as AppRockskySong from "./song"; export interface Record { /** The name of the playlist. */ - name: string + name: string; /** The playlist description. */ - description?: string + description?: string; /** The picture of the playlist. */ - picture?: BlobRef + picture?: BlobRef; /** The tracks in the playlist. */ - tracks?: AppRockskySong.Record[] + tracks?: AppRockskySong.Record[]; /** The date the playlist was created. */ - createdAt: string + createdAt: string; /** The Spotify link of the playlist. */ - spotifyLink?: string + spotifyLink?: string; /** The Tidal link of the playlist. */ - tidalLink?: string + tidalLink?: string; /** The YouTube link of the playlist. */ - youtubeLink?: string + youtubeLink?: string; /** The Apple Music link of the playlist. */ - appleMusicLink?: string - [k: string]: unknown + appleMusicLink?: string; + [k: string]: unknown; } export function isRecord(v: unknown): v is Record { return ( isObj(v) && - hasProp(v, '$type') && - (v.$type === 'app.rocksky.playlist#main' || - v.$type === 'app.rocksky.playlist') - ) + hasProp(v, "$type") && + (v.$type === "app.rocksky.playlist#main" || + v.$type === "app.rocksky.playlist") + ); } export function validateRecord(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.playlist#main', v) + return lexicons.validate("app.rocksky.playlist#main", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/playlist/createPlaylist.ts b/apps/api/src/lexicon/types/app/rocksky/playlist/createPlaylist.ts index 2cd02341..a3e7d89a 100644 --- a/apps/api/src/lexicon/types/app/rocksky/playlist/createPlaylist.ts +++ b/apps/api/src/lexicon/types/app/rocksky/playlist/createPlaylist.ts @@ -1,37 +1,37 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { /** The name of the playlist */ - name: string + name: string; /** A brief description of the playlist */ - description?: string + description?: string; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/playlist/defs.ts b/apps/api/src/lexicon/types/app/rocksky/playlist/defs.ts index bad166b9..d8c839f8 100644 --- a/apps/api/src/lexicon/types/app/rocksky/playlist/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/playlist/defs.ts @@ -1,86 +1,86 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import * as AppRockskySongDefs from '../song/defs' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type * as AppRockskySongDefs from "../song/defs"; /** Detailed view of a playlist, including its tracks and metadata */ export interface PlaylistViewDetailed { /** The unique identifier of the playlist. */ - id?: string + id?: string; /** The title of the playlist. */ - title?: string + title?: string; /** The URI of the playlist. */ - uri?: string + uri?: string; /** The DID of the curator of the playlist. */ - curatorDid?: string + curatorDid?: string; /** The handle of the curator of the playlist. */ - curatorHandle?: string + curatorHandle?: string; /** The name of the curator of the playlist. */ - curatorName?: string + curatorName?: string; /** The URL of the avatar image of the curator. */ - curatorAvatarUrl?: string + curatorAvatarUrl?: string; /** A description of the playlist. */ - description?: string + description?: string; /** The URL of the cover image for the playlist. */ - coverImageUrl?: string + coverImageUrl?: string; /** The date and time when the playlist was created. */ - createdAt?: string + createdAt?: string; /** A list of tracks in the playlist. */ - tracks?: AppRockskySongDefs.SongViewBasic[] - [k: string]: unknown + tracks?: AppRockskySongDefs.SongViewBasic[]; + [k: string]: unknown; } export function isPlaylistViewDetailed(v: unknown): v is PlaylistViewDetailed { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.playlist.defs#playlistViewDetailed' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.playlist.defs#playlistViewDetailed" + ); } export function validatePlaylistViewDetailed(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.playlist.defs#playlistViewDetailed', v) + return lexicons.validate("app.rocksky.playlist.defs#playlistViewDetailed", v); } /** Basic view of a playlist, including its metadata */ export interface PlaylistViewBasic { /** The unique identifier of the playlist. */ - id?: string + id?: string; /** The title of the playlist. */ - title?: string + title?: string; /** The URI of the playlist. */ - uri?: string + uri?: string; /** The DID of the curator of the playlist. */ - curatorDid?: string + curatorDid?: string; /** The handle of the curator of the playlist. */ - curatorHandle?: string + curatorHandle?: string; /** The name of the curator of the playlist. */ - curatorName?: string + curatorName?: string; /** The URL of the avatar image of the curator. */ - curatorAvatarUrl?: string + curatorAvatarUrl?: string; /** A description of the playlist. */ - description?: string + description?: string; /** The URL of the cover image for the playlist. */ - coverImageUrl?: string + coverImageUrl?: string; /** The date and time when the playlist was created. */ - createdAt?: string + createdAt?: string; /** The number of tracks in the playlist. */ - trackCount?: number - [k: string]: unknown + trackCount?: number; + [k: string]: unknown; } export function isPlaylistViewBasic(v: unknown): v is PlaylistViewBasic { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.playlist.defs#playlistViewBasic' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.playlist.defs#playlistViewBasic" + ); } export function validatePlaylistViewBasic(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.playlist.defs#playlistViewBasic', v) + return lexicons.validate("app.rocksky.playlist.defs#playlistViewBasic", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/playlist/getPlaylist.ts b/apps/api/src/lexicon/types/app/rocksky/playlist/getPlaylist.ts index 93225239..09739b6e 100644 --- a/apps/api/src/lexicon/types/app/rocksky/playlist/getPlaylist.ts +++ b/apps/api/src/lexicon/types/app/rocksky/playlist/getPlaylist.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyPlaylistDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyPlaylistDefs from "./defs"; export interface QueryParams { /** The URI of the playlist to retrieve. */ - uri: string + uri: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyPlaylistDefs.PlaylistViewDetailed -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyPlaylistDefs.PlaylistViewDetailed; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/playlist/getPlaylists.ts b/apps/api/src/lexicon/types/app/rocksky/playlist/getPlaylists.ts index 71988caa..1b5973d5 100644 --- a/apps/api/src/lexicon/types/app/rocksky/playlist/getPlaylists.ts +++ b/apps/api/src/lexicon/types/app/rocksky/playlist/getPlaylists.ts @@ -1,50 +1,50 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyPlaylistDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyPlaylistDefs from "./defs"; export interface QueryParams { /** The maximum number of playlists to return. */ - limit?: number + limit?: number; /** The offset for pagination, used to skip a number of playlists. */ - offset?: number + offset?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - playlists?: AppRockskyPlaylistDefs.PlaylistViewBasic[] - [k: string]: unknown + playlists?: AppRockskyPlaylistDefs.PlaylistViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/playlist/insertDirectory.ts b/apps/api/src/lexicon/types/app/rocksky/playlist/insertDirectory.ts index 7e99d000..ad8a2c41 100644 --- a/apps/api/src/lexicon/types/app/rocksky/playlist/insertDirectory.ts +++ b/apps/api/src/lexicon/types/app/rocksky/playlist/insertDirectory.ts @@ -1,39 +1,39 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { /** The URI of the playlist to start */ - uri: string + uri: string; /** The directory (id) to insert into the playlist */ - directory: string + directory: string; /** The position in the playlist to insert the directory at, if not specified, the directory will be appended */ - position?: number + position?: number; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/playlist/insertFiles.ts b/apps/api/src/lexicon/types/app/rocksky/playlist/insertFiles.ts index 12b9112f..fffa06c6 100644 --- a/apps/api/src/lexicon/types/app/rocksky/playlist/insertFiles.ts +++ b/apps/api/src/lexicon/types/app/rocksky/playlist/insertFiles.ts @@ -1,38 +1,38 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { /** The URI of the playlist to start */ - uri: string - files: string[] + uri: string; + files: string[]; /** The position in the playlist to insert the files at, if not specified, files will be appended */ - position?: number + position?: number; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/playlist/removePlaylist.ts b/apps/api/src/lexicon/types/app/rocksky/playlist/removePlaylist.ts index b04267fa..bfa03748 100644 --- a/apps/api/src/lexicon/types/app/rocksky/playlist/removePlaylist.ts +++ b/apps/api/src/lexicon/types/app/rocksky/playlist/removePlaylist.ts @@ -1,35 +1,35 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { /** The URI of the playlist to remove */ - uri: string + uri: string; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/playlist/removeTrack.ts b/apps/api/src/lexicon/types/app/rocksky/playlist/removeTrack.ts index f7929ff3..4f7d33a2 100644 --- a/apps/api/src/lexicon/types/app/rocksky/playlist/removeTrack.ts +++ b/apps/api/src/lexicon/types/app/rocksky/playlist/removeTrack.ts @@ -1,37 +1,37 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { /** The URI of the playlist to remove the track from */ - uri: string + uri: string; /** The position of the track to remove in the playlist */ - position: number + position: number; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/playlist/startPlaylist.ts b/apps/api/src/lexicon/types/app/rocksky/playlist/startPlaylist.ts index 8b783c8c..ef30d1cd 100644 --- a/apps/api/src/lexicon/types/app/rocksky/playlist/startPlaylist.ts +++ b/apps/api/src/lexicon/types/app/rocksky/playlist/startPlaylist.ts @@ -1,39 +1,39 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { /** The URI of the playlist to start */ - uri: string + uri: string; /** Whether to shuffle the playlist when starting it */ - shuffle?: boolean + shuffle?: boolean; /** The position in the playlist to start from, if not specified, starts from the beginning */ - position?: number + position?: number; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/radio.ts b/apps/api/src/lexicon/types/app/rocksky/radio.ts index 68b5d3b4..210375b5 100644 --- a/apps/api/src/lexicon/types/app/rocksky/radio.ts +++ b/apps/api/src/lexicon/types/app/rocksky/radio.ts @@ -1,37 +1,37 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../lexicons' -import { isObj, hasProp } from '../../../util' -import { CID } from 'multiformats/cid' +import type { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../lexicons"; +import { isObj, hasProp } from "../../../util"; +import { CID } from "multiformats/cid"; export interface Record { /** The name of the radio station. */ - name: string + name: string; /** The URL of the radio station. */ - url: string + url: string; /** A description of the radio station. */ - description?: string + description?: string; /** The genre of the radio station. */ - genre?: string + genre?: string; /** The logo of the radio station. */ - logo?: BlobRef + logo?: BlobRef; /** The website of the radio station. */ - website?: string + website?: string; /** The date when the radio station was created. */ - createdAt: string - [k: string]: unknown + createdAt: string; + [k: string]: unknown; } export function isRecord(v: unknown): v is Record { return ( isObj(v) && - hasProp(v, '$type') && - (v.$type === 'app.rocksky.radio#main' || v.$type === 'app.rocksky.radio') - ) + hasProp(v, "$type") && + (v.$type === "app.rocksky.radio#main" || v.$type === "app.rocksky.radio") + ); } export function validateRecord(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.radio#main', v) + return lexicons.validate("app.rocksky.radio#main", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/radio/defs.ts b/apps/api/src/lexicon/types/app/rocksky/radio/defs.ts index 05ad0d89..f03f75bc 100644 --- a/apps/api/src/lexicon/types/app/rocksky/radio/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/radio/defs.ts @@ -1,63 +1,63 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; export interface RadioViewBasic { /** The unique identifier of the radio. */ - id?: string + id?: string; /** The name of the radio. */ - name?: string + name?: string; /** A brief description of the radio. */ - description?: string + description?: string; /** The date and time when the radio was created. */ - createdAt?: string - [k: string]: unknown + createdAt?: string; + [k: string]: unknown; } export function isRadioViewBasic(v: unknown): v is RadioViewBasic { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.radio.defs#radioViewBasic' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.radio.defs#radioViewBasic" + ); } export function validateRadioViewBasic(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.radio.defs#radioViewBasic', v) + return lexicons.validate("app.rocksky.radio.defs#radioViewBasic", v); } export interface RadioViewDetailed { /** The unique identifier of the radio. */ - id?: string + id?: string; /** The name of the radio. */ - name?: string + name?: string; /** A brief description of the radio. */ - description?: string + description?: string; /** The website of the radio. */ - website?: string + website?: string; /** The streaming URL of the radio. */ - url?: string + url?: string; /** The genre of the radio. */ - genre?: string + genre?: string; /** The logo of the radio station. */ - logo?: string + logo?: string; /** The date and time when the radio was created. */ - createdAt?: string - [k: string]: unknown + createdAt?: string; + [k: string]: unknown; } export function isRadioViewDetailed(v: unknown): v is RadioViewDetailed { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.radio.defs#radioViewDetailed' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.radio.defs#radioViewDetailed" + ); } export function validateRadioViewDetailed(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.radio.defs#radioViewDetailed', v) + return lexicons.validate("app.rocksky.radio.defs#radioViewDetailed", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/scrobble.ts b/apps/api/src/lexicon/types/app/rocksky/scrobble.ts index 0385b73f..535b1e43 100644 --- a/apps/api/src/lexicon/types/app/rocksky/scrobble.ts +++ b/apps/api/src/lexicon/types/app/rocksky/scrobble.ts @@ -1,70 +1,70 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../lexicons' -import { isObj, hasProp } from '../../../util' -import { CID } from 'multiformats/cid' +import type { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../lexicons"; +import { isObj, hasProp } from "../../../util"; +import { CID } from "multiformats/cid"; export interface Record { /** The title of the song. */ - title: string + title: string; /** The artist of the song. */ - artist: string + artist: string; /** The album artist of the song. */ - albumArtist: string + albumArtist: string; /** The album of the song. */ - album: string + album: string; /** The duration of the song in seconds. */ - duration: number + duration: number; /** The track number of the song in the album. */ - trackNumber?: number + trackNumber?: number; /** The disc number of the song in the album. */ - discNumber?: number + discNumber?: number; /** The release date of the song. */ - releaseDate?: string + releaseDate?: string; /** The year the song was released. */ - year?: number + year?: number; /** The genre of the song. */ - genre?: string + genre?: string; /** The tags of the song. */ - tags?: string[] + tags?: string[]; /** The composer of the song. */ - composer?: string + composer?: string; /** The lyrics of the song. */ - lyrics?: string + lyrics?: string; /** The copyright message of the song. */ - copyrightMessage?: string + copyrightMessage?: string; /** Informations about the song */ - wiki?: string + wiki?: string; /** The album art of the song. */ - albumArt?: BlobRef + albumArt?: BlobRef; /** The YouTube link of the song. */ - youtubeLink?: string + youtubeLink?: string; /** The Spotify link of the song. */ - spotifyLink?: string + spotifyLink?: string; /** The Tidal link of the song. */ - tidalLink?: string + tidalLink?: string; /** The Apple Music link of the song. */ - appleMusicLink?: string + appleMusicLink?: string; /** The date when the song was created. */ - createdAt: string + createdAt: string; /** The MusicBrainz ID of the song. */ - mbid?: string + mbid?: string; /** The label of the song. */ - label?: string - [k: string]: unknown + label?: string; + [k: string]: unknown; } export function isRecord(v: unknown): v is Record { return ( isObj(v) && - hasProp(v, '$type') && - (v.$type === 'app.rocksky.scrobble#main' || - v.$type === 'app.rocksky.scrobble') - ) + hasProp(v, "$type") && + (v.$type === "app.rocksky.scrobble#main" || + v.$type === "app.rocksky.scrobble") + ); } export function validateRecord(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.scrobble#main', v) + return lexicons.validate("app.rocksky.scrobble#main", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/scrobble/createScrobble.ts b/apps/api/src/lexicon/types/app/rocksky/scrobble/createScrobble.ts index 112361e4..b746c4ea 100644 --- a/apps/api/src/lexicon/types/app/rocksky/scrobble/createScrobble.ts +++ b/apps/api/src/lexicon/types/app/rocksky/scrobble/createScrobble.ts @@ -1,91 +1,91 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyScrobbleDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyScrobbleDefs from "./defs"; -export interface QueryParams {} +export type QueryParams = {} export interface InputSchema { /** The title of the track being scrobbled */ - title: string + title: string; /** The artist of the track being scrobbled */ - artist: string + artist: string; /** The album of the track being scrobbled */ - album?: string + album?: string; /** The duration of the track in seconds */ - duration?: number + duration?: number; /** The MusicBrainz ID of the track, if available */ - mbId?: string + mbId?: string; /** The URL of the album art for the track */ - albumArt?: string + albumArt?: string; /** The track number of the track in the album */ - trackNumber?: number + trackNumber?: number; /** The release date of the track, formatted as YYYY-MM-DD */ - releaseDate?: string + releaseDate?: string; /** The year the track was released */ - year?: number + year?: number; /** The disc number of the track in the album, if applicable */ - discNumber?: number + discNumber?: number; /** The lyrics of the track, if available */ - lyrics?: string + lyrics?: string; /** The composer of the track, if available */ - composer?: string + composer?: string; /** The copyright message for the track, if available */ - copyrightMessage?: string + copyrightMessage?: string; /** The record label of the track, if available */ - label?: string + label?: string; /** The URL of the artist's picture, if available */ - artistPicture?: string + artistPicture?: string; /** The Spotify link for the track, if available */ - spotifyLink?: string + spotifyLink?: string; /** The Last.fm link for the track, if available */ - lastfmLink?: string + lastfmLink?: string; /** The Tidal link for the track, if available */ - tidalLink?: string + tidalLink?: string; /** The Apple Music link for the track, if available */ - appleMusicLink?: string + appleMusicLink?: string; /** The Youtube link for the track, if available */ - youtubeLink?: string + youtubeLink?: string; /** The Deezer link for the track, if available */ - deezerLink?: string + deezerLink?: string; /** The timestamp of the scrobble in milliseconds since epoch */ - timestamp?: number - [k: string]: unknown + timestamp?: number; + [k: string]: unknown; } -export type OutputSchema = AppRockskyScrobbleDefs.ScrobbleViewBasic +export type OutputSchema = AppRockskyScrobbleDefs.ScrobbleViewBasic; export interface HandlerInput { - encoding: 'application/json' - body: InputSchema + encoding: "application/json"; + body: InputSchema; } export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/scrobble/defs.ts b/apps/api/src/lexicon/types/app/rocksky/scrobble/defs.ts index e6c88073..8c7d6618 100644 --- a/apps/api/src/lexicon/types/app/rocksky/scrobble/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/scrobble/defs.ts @@ -1,87 +1,87 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; export interface ScrobbleViewBasic { /** The unique identifier of the scrobble. */ - id?: string + id?: string; /** The handle of the user who created the scrobble. */ - user?: string + user?: string; /** The title of the scrobble. */ - title?: string + title?: string; /** The artist of the song. */ - artist?: string + artist?: string; /** The URI of the artist. */ - artistUri?: string + artistUri?: string; /** The album of the song. */ - album?: string + album?: string; /** The URI of the album. */ - albumUri?: string + albumUri?: string; /** The album art URL of the song. */ - cover?: string + cover?: string; /** The timestamp when the scrobble was created. */ - date?: string + date?: string; /** The URI of the scrobble. */ - uri?: string + uri?: string; /** The SHA256 hash of the scrobble data. */ - sha256?: string - [k: string]: unknown + sha256?: string; + [k: string]: unknown; } export function isScrobbleViewBasic(v: unknown): v is ScrobbleViewBasic { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.scrobble.defs#scrobbleViewBasic' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.scrobble.defs#scrobbleViewBasic" + ); } export function validateScrobbleViewBasic(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.scrobble.defs#scrobbleViewBasic', v) + return lexicons.validate("app.rocksky.scrobble.defs#scrobbleViewBasic", v); } export interface ScrobbleViewDetailed { /** The unique identifier of the scrobble. */ - id?: string + id?: string; /** The handle of the user who created the scrobble. */ - user?: string + user?: string; /** The title of the scrobble. */ - title?: string + title?: string; /** The artist of the song. */ - artist?: string + artist?: string; /** The URI of the artist. */ - artistUri?: string + artistUri?: string; /** The album of the song. */ - album?: string + album?: string; /** The URI of the album. */ - albumUri?: string + albumUri?: string; /** The album art URL of the song. */ - cover?: string + cover?: string; /** The timestamp when the scrobble was created. */ - date?: string + date?: string; /** The URI of the scrobble. */ - uri?: string + uri?: string; /** The SHA256 hash of the scrobble data. */ - sha256?: string + sha256?: string; /** The number of listeners */ - listeners?: number + listeners?: number; /** The number of scrobbles for this song */ - scrobbles?: number - [k: string]: unknown + scrobbles?: number; + [k: string]: unknown; } export function isScrobbleViewDetailed(v: unknown): v is ScrobbleViewDetailed { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.scrobble.defs#scrobbleViewDetailed' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.scrobble.defs#scrobbleViewDetailed" + ); } export function validateScrobbleViewDetailed(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.scrobble.defs#scrobbleViewDetailed', v) + return lexicons.validate("app.rocksky.scrobble.defs#scrobbleViewDetailed", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/scrobble/getScrobble.ts b/apps/api/src/lexicon/types/app/rocksky/scrobble/getScrobble.ts index 7be8fa29..cf6c8bd0 100644 --- a/apps/api/src/lexicon/types/app/rocksky/scrobble/getScrobble.ts +++ b/apps/api/src/lexicon/types/app/rocksky/scrobble/getScrobble.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyScrobbleDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyScrobbleDefs from "./defs"; export interface QueryParams { /** The unique identifier of the scrobble */ - uri: string + uri: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyScrobbleDefs.ScrobbleViewDetailed -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyScrobbleDefs.ScrobbleViewDetailed; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/scrobble/getScrobbles.ts b/apps/api/src/lexicon/types/app/rocksky/scrobble/getScrobbles.ts index 989a6229..9064e2ba 100644 --- a/apps/api/src/lexicon/types/app/rocksky/scrobble/getScrobbles.ts +++ b/apps/api/src/lexicon/types/app/rocksky/scrobble/getScrobbles.ts @@ -1,52 +1,52 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyScrobbleDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyScrobbleDefs from "./defs"; export interface QueryParams { /** The DID or handle of the actor */ - did?: string + did?: string; /** The maximum number of scrobbles to return */ - limit?: number + limit?: number; /** The offset for pagination */ - offset?: number + offset?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - scrobbles?: AppRockskyScrobbleDefs.ScrobbleViewBasic[] - [k: string]: unknown + scrobbles?: AppRockskyScrobbleDefs.ScrobbleViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/shout.ts b/apps/api/src/lexicon/types/app/rocksky/shout.ts index 351d5200..893db47e 100644 --- a/apps/api/src/lexicon/types/app/rocksky/shout.ts +++ b/apps/api/src/lexicon/types/app/rocksky/shout.ts @@ -1,30 +1,30 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../lexicons' -import { isObj, hasProp } from '../../../util' -import { CID } from 'multiformats/cid' -import * as ComAtprotoRepoStrongRef from '../../com/atproto/repo/strongRef' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../lexicons"; +import { isObj, hasProp } from "../../../util"; +import { CID } from "multiformats/cid"; +import type * as ComAtprotoRepoStrongRef from "../../com/atproto/repo/strongRef"; export interface Record { /** The message of the shout. */ - message: string + message: string; /** The date when the shout was created. */ - createdAt: string - parent?: ComAtprotoRepoStrongRef.Main - subject: ComAtprotoRepoStrongRef.Main - [k: string]: unknown + createdAt: string; + parent?: ComAtprotoRepoStrongRef.Main; + subject: ComAtprotoRepoStrongRef.Main; + [k: string]: unknown; } export function isRecord(v: unknown): v is Record { return ( isObj(v) && - hasProp(v, '$type') && - (v.$type === 'app.rocksky.shout#main' || v.$type === 'app.rocksky.shout') - ) + hasProp(v, "$type") && + (v.$type === "app.rocksky.shout#main" || v.$type === "app.rocksky.shout") + ); } export function validateRecord(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.shout#main', v) + return lexicons.validate("app.rocksky.shout#main", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/shout/createShout.ts b/apps/api/src/lexicon/types/app/rocksky/shout/createShout.ts index f465e7c1..b51daaa3 100644 --- a/apps/api/src/lexicon/types/app/rocksky/shout/createShout.ts +++ b/apps/api/src/lexicon/types/app/rocksky/shout/createShout.ts @@ -1,49 +1,49 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyShoutDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyShoutDefs from "./defs"; -export interface QueryParams {} +export type QueryParams = {} export interface InputSchema { /** The content of the shout */ - message?: string - [k: string]: unknown + message?: string; + [k: string]: unknown; } -export type OutputSchema = AppRockskyShoutDefs.ShoutView +export type OutputSchema = AppRockskyShoutDefs.ShoutView; export interface HandlerInput { - encoding: 'application/json' - body: InputSchema + encoding: "application/json"; + body: InputSchema; } export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/shout/defs.ts b/apps/api/src/lexicon/types/app/rocksky/shout/defs.ts index 14d3404a..028473ba 100644 --- a/apps/api/src/lexicon/types/app/rocksky/shout/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/shout/defs.ts @@ -1,58 +1,58 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; export interface Author { /** The unique identifier of the author. */ - id?: string + id?: string; /** The decentralized identifier (DID) of the author. */ - did?: string + did?: string; /** The handle of the author. */ - handle?: string + handle?: string; /** The display name of the author. */ - displayName?: string + displayName?: string; /** The URL of the author's avatar image. */ - avatar?: string - [k: string]: unknown + avatar?: string; + [k: string]: unknown; } export function isAuthor(v: unknown): v is Author { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.shout.defs#author' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.shout.defs#author" + ); } export function validateAuthor(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.shout.defs#author', v) + return lexicons.validate("app.rocksky.shout.defs#author", v); } export interface ShoutView { /** The unique identifier of the shout. */ - id?: string + id?: string; /** The content of the shout. */ - message?: string + message?: string; /** The ID of the parent shout if this is a reply, otherwise null. */ - parent?: string + parent?: string; /** The date and time when the shout was created. */ - createdAt?: string - author?: Author - [k: string]: unknown + createdAt?: string; + author?: Author; + [k: string]: unknown; } export function isShoutView(v: unknown): v is ShoutView { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.shout.defs#shoutView' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.shout.defs#shoutView" + ); } export function validateShoutView(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.shout.defs#shoutView', v) + return lexicons.validate("app.rocksky.shout.defs#shoutView", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/shout/getAlbumShouts.ts b/apps/api/src/lexicon/types/app/rocksky/shout/getAlbumShouts.ts index 842c20f8..be939325 100644 --- a/apps/api/src/lexicon/types/app/rocksky/shout/getAlbumShouts.ts +++ b/apps/api/src/lexicon/types/app/rocksky/shout/getAlbumShouts.ts @@ -1,52 +1,52 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyShoutDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyShoutDefs from "./defs"; export interface QueryParams { /** The unique identifier of the album to retrieve shouts for */ - uri: string + uri: string; /** The maximum number of shouts to return */ - limit?: number + limit?: number; /** The number of shouts to skip before starting to collect the result set */ - offset?: number + offset?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - shouts?: AppRockskyShoutDefs.ShoutViewBasic[] - [k: string]: unknown + shouts?: AppRockskyShoutDefs.ShoutViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/shout/getArtistShouts.ts b/apps/api/src/lexicon/types/app/rocksky/shout/getArtistShouts.ts index 67e6f27b..a64d0529 100644 --- a/apps/api/src/lexicon/types/app/rocksky/shout/getArtistShouts.ts +++ b/apps/api/src/lexicon/types/app/rocksky/shout/getArtistShouts.ts @@ -1,52 +1,52 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyShoutDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyShoutDefs from "./defs"; export interface QueryParams { /** The URI of the artist to retrieve shouts for */ - uri: string + uri: string; /** The maximum number of shouts to return */ - limit?: number + limit?: number; /** The number of shouts to skip before starting to collect the result set */ - offset?: number + offset?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - shouts?: AppRockskyShoutDefs.ShoutViewBasic[] - [k: string]: unknown + shouts?: AppRockskyShoutDefs.ShoutViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/shout/getProfileShouts.ts b/apps/api/src/lexicon/types/app/rocksky/shout/getProfileShouts.ts index 3a7b308c..958a1449 100644 --- a/apps/api/src/lexicon/types/app/rocksky/shout/getProfileShouts.ts +++ b/apps/api/src/lexicon/types/app/rocksky/shout/getProfileShouts.ts @@ -1,52 +1,52 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyShoutDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyShoutDefs from "./defs"; export interface QueryParams { /** The DID or handle of the actor */ - did: string + did: string; /** The offset for pagination */ - offset?: number + offset?: number; /** The maximum number of shouts to return */ - limit?: number + limit?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - shouts?: AppRockskyShoutDefs.ShoutViewBasic[] - [k: string]: unknown + shouts?: AppRockskyShoutDefs.ShoutViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/shout/getShoutReplies.ts b/apps/api/src/lexicon/types/app/rocksky/shout/getShoutReplies.ts index 7776b3cd..1c2e5c5b 100644 --- a/apps/api/src/lexicon/types/app/rocksky/shout/getShoutReplies.ts +++ b/apps/api/src/lexicon/types/app/rocksky/shout/getShoutReplies.ts @@ -1,52 +1,52 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyShoutDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyShoutDefs from "./defs"; export interface QueryParams { /** The URI of the shout to retrieve replies for */ - uri: string + uri: string; /** The maximum number of shouts to return */ - limit?: number + limit?: number; /** The number of shouts to skip before starting to collect the result set */ - offset?: number + offset?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - shouts?: AppRockskyShoutDefs.ShoutViewBasic[] - [k: string]: unknown + shouts?: AppRockskyShoutDefs.ShoutViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/shout/getTrackShouts.ts b/apps/api/src/lexicon/types/app/rocksky/shout/getTrackShouts.ts index 4059f75e..41367003 100644 --- a/apps/api/src/lexicon/types/app/rocksky/shout/getTrackShouts.ts +++ b/apps/api/src/lexicon/types/app/rocksky/shout/getTrackShouts.ts @@ -1,48 +1,48 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyShoutDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyShoutDefs from "./defs"; export interface QueryParams { /** The URI of the track to retrieve shouts for */ - uri: string + uri: string; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - shouts?: AppRockskyShoutDefs.ShoutViewBasic[] - [k: string]: unknown + shouts?: AppRockskyShoutDefs.ShoutViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/shout/removeShout.ts b/apps/api/src/lexicon/types/app/rocksky/shout/removeShout.ts index b09720f2..52c0bd11 100644 --- a/apps/api/src/lexicon/types/app/rocksky/shout/removeShout.ts +++ b/apps/api/src/lexicon/types/app/rocksky/shout/removeShout.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyShoutDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyShoutDefs from "./defs"; export interface QueryParams { /** The ID of the shout to be removed */ - id: string + id: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyShoutDefs.ShoutView -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyShoutDefs.ShoutView; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/shout/replyShout.ts b/apps/api/src/lexicon/types/app/rocksky/shout/replyShout.ts index 4c703c9c..83800a07 100644 --- a/apps/api/src/lexicon/types/app/rocksky/shout/replyShout.ts +++ b/apps/api/src/lexicon/types/app/rocksky/shout/replyShout.ts @@ -1,51 +1,51 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyShoutDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyShoutDefs from "./defs"; -export interface QueryParams {} +export type QueryParams = {} export interface InputSchema { /** The unique identifier of the shout to reply to */ - shoutId: string + shoutId: string; /** The content of the reply */ - message: string - [k: string]: unknown + message: string; + [k: string]: unknown; } -export type OutputSchema = AppRockskyShoutDefs.ShoutView +export type OutputSchema = AppRockskyShoutDefs.ShoutView; export interface HandlerInput { - encoding: 'application/json' - body: InputSchema + encoding: "application/json"; + body: InputSchema; } export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/shout/reportShout.ts b/apps/api/src/lexicon/types/app/rocksky/shout/reportShout.ts index db43497b..fb808117 100644 --- a/apps/api/src/lexicon/types/app/rocksky/shout/reportShout.ts +++ b/apps/api/src/lexicon/types/app/rocksky/shout/reportShout.ts @@ -1,51 +1,51 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyShoutDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyShoutDefs from "./defs"; -export interface QueryParams {} +export type QueryParams = {} export interface InputSchema { /** The unique identifier of the shout to report */ - shoutId: string + shoutId: string; /** The reason for reporting the shout */ - reason?: string - [k: string]: unknown + reason?: string; + [k: string]: unknown; } -export type OutputSchema = AppRockskyShoutDefs.ShoutView +export type OutputSchema = AppRockskyShoutDefs.ShoutView; export interface HandlerInput { - encoding: 'application/json' - body: InputSchema + encoding: "application/json"; + body: InputSchema; } export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/song.ts b/apps/api/src/lexicon/types/app/rocksky/song.ts index 685648f1..6d68b18d 100644 --- a/apps/api/src/lexicon/types/app/rocksky/song.ts +++ b/apps/api/src/lexicon/types/app/rocksky/song.ts @@ -1,69 +1,69 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../lexicons' -import { isObj, hasProp } from '../../../util' -import { CID } from 'multiformats/cid' +import type { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../lexicons"; +import { isObj, hasProp } from "../../../util"; +import { CID } from "multiformats/cid"; export interface Record { /** The title of the song. */ - title: string + title: string; /** The artist of the song. */ - artist: string + artist: string; /** The album artist of the song. */ - albumArtist: string + albumArtist: string; /** The album of the song. */ - album: string + album: string; /** The duration of the song in seconds. */ - duration: number + duration: number; /** The track number of the song in the album. */ - trackNumber?: number + trackNumber?: number; /** The disc number of the song in the album. */ - discNumber?: number + discNumber?: number; /** The release date of the song. */ - releaseDate?: string + releaseDate?: string; /** The year the song was released. */ - year?: number + year?: number; /** The genre of the song. */ - genre?: string + genre?: string; /** The tags of the song. */ - tags?: string[] + tags?: string[]; /** The composer of the song. */ - composer?: string + composer?: string; /** The lyrics of the song. */ - lyrics?: string + lyrics?: string; /** The copyright message of the song. */ - copyrightMessage?: string + copyrightMessage?: string; /** Informations about the song */ - wiki?: string + wiki?: string; /** The album art of the song. */ - albumArt?: BlobRef + albumArt?: BlobRef; /** The YouTube link of the song. */ - youtubeLink?: string + youtubeLink?: string; /** The Spotify link of the song. */ - spotifyLink?: string + spotifyLink?: string; /** The Tidal link of the song. */ - tidalLink?: string + tidalLink?: string; /** The Apple Music link of the song. */ - appleMusicLink?: string + appleMusicLink?: string; /** The date when the song was created. */ - createdAt: string + createdAt: string; /** The MusicBrainz ID of the song. */ - mbid?: string + mbid?: string; /** The label of the song. */ - label?: string - [k: string]: unknown + label?: string; + [k: string]: unknown; } export function isRecord(v: unknown): v is Record { return ( isObj(v) && - hasProp(v, '$type') && - (v.$type === 'app.rocksky.song#main' || v.$type === 'app.rocksky.song') - ) + hasProp(v, "$type") && + (v.$type === "app.rocksky.song#main" || v.$type === "app.rocksky.song") + ); } export function validateRecord(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.song#main', v) + return lexicons.validate("app.rocksky.song#main", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/song/createSong.ts b/apps/api/src/lexicon/types/app/rocksky/song/createSong.ts index d957f159..f196c2e4 100644 --- a/apps/api/src/lexicon/types/app/rocksky/song/createSong.ts +++ b/apps/api/src/lexicon/types/app/rocksky/song/createSong.ts @@ -1,71 +1,71 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskySongDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskySongDefs from "./defs"; -export interface QueryParams {} +export type QueryParams = {} export interface InputSchema { /** The title of the song */ - title: string + title: string; /** The artist of the song */ - artist: string + artist: string; /** The album artist of the song, if different from the main artist */ - albumArtist: string + albumArtist: string; /** The album of the song, if applicable */ - album: string + album: string; /** The duration of the song in seconds */ - duration?: number + duration?: number; /** The MusicBrainz ID of the song, if available */ - mbId?: string + mbId?: string; /** The URL of the album art for the song */ - albumArt?: string + albumArt?: string; /** The track number of the song in the album, if applicable */ - trackNumber?: number + trackNumber?: number; /** The release date of the song, formatted as YYYY-MM-DD */ - releaseDate?: string + releaseDate?: string; /** The year the song was released */ - year?: number + year?: number; /** The disc number of the song in the album, if applicable */ - discNumber?: number + discNumber?: number; /** The lyrics of the song, if available */ - lyrics?: string - [k: string]: unknown + lyrics?: string; + [k: string]: unknown; } -export type OutputSchema = AppRockskySongDefs.SongViewDetailed +export type OutputSchema = AppRockskySongDefs.SongViewDetailed; export interface HandlerInput { - encoding: 'application/json' - body: InputSchema + encoding: "application/json"; + body: InputSchema; } export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/song/defs.ts b/apps/api/src/lexicon/types/app/rocksky/song/defs.ts index a6f6577d..d31f333d 100644 --- a/apps/api/src/lexicon/types/app/rocksky/song/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/song/defs.ts @@ -1,103 +1,103 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; export interface SongViewBasic { /** The unique identifier of the song. */ - id?: string + id?: string; /** The title of the song. */ - title?: string + title?: string; /** The artist of the song. */ - artist?: string + artist?: string; /** The artist of the album the song belongs to. */ - albumArtist?: string + albumArtist?: string; /** The URL of the album art image. */ - albumArt?: string + albumArt?: string; /** The URI of the song. */ - uri?: string + uri?: string; /** The album of the song. */ - album?: string + album?: string; /** The duration of the song in milliseconds. */ - duration?: number + duration?: number; /** The track number of the song in the album. */ - trackNumber?: number + trackNumber?: number; /** The disc number of the song in the album. */ - discNumber?: number + discNumber?: number; /** The number of times the song has been played. */ - playCount?: number + playCount?: number; /** The number of unique listeners who have played the song. */ - uniqueListeners?: number + uniqueListeners?: number; /** The URI of the album the song belongs to. */ - albumUri?: string + albumUri?: string; /** The URI of the artist of the song. */ - artistUri?: string + artistUri?: string; /** The SHA256 hash of the song. */ - sha256?: string + sha256?: string; /** The timestamp when the song was created. */ - createdAt?: string - [k: string]: unknown + createdAt?: string; + [k: string]: unknown; } export function isSongViewBasic(v: unknown): v is SongViewBasic { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.song.defs#songViewBasic' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.song.defs#songViewBasic" + ); } export function validateSongViewBasic(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.song.defs#songViewBasic', v) + return lexicons.validate("app.rocksky.song.defs#songViewBasic", v); } export interface SongViewDetailed { /** The unique identifier of the song. */ - id?: string + id?: string; /** The title of the song. */ - title?: string + title?: string; /** The artist of the song. */ - artist?: string + artist?: string; /** The artist of the album the song belongs to. */ - albumArtist?: string + albumArtist?: string; /** The URL of the album art image. */ - albumArt?: string + albumArt?: string; /** The URI of the song. */ - uri?: string + uri?: string; /** The album of the song. */ - album?: string + album?: string; /** The duration of the song in milliseconds. */ - duration?: number + duration?: number; /** The track number of the song in the album. */ - trackNumber?: number + trackNumber?: number; /** The disc number of the song in the album. */ - discNumber?: number + discNumber?: number; /** The number of times the song has been played. */ - playCount?: number + playCount?: number; /** The number of unique listeners who have played the song. */ - uniqueListeners?: number + uniqueListeners?: number; /** The URI of the album the song belongs to. */ - albumUri?: string + albumUri?: string; /** The URI of the artist of the song. */ - artistUri?: string + artistUri?: string; /** The SHA256 hash of the song. */ - sha256?: string + sha256?: string; /** The timestamp when the song was created. */ - createdAt?: string - [k: string]: unknown + createdAt?: string; + [k: string]: unknown; } export function isSongViewDetailed(v: unknown): v is SongViewDetailed { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.song.defs#songViewDetailed' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.song.defs#songViewDetailed" + ); } export function validateSongViewDetailed(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.song.defs#songViewDetailed', v) + return lexicons.validate("app.rocksky.song.defs#songViewDetailed", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/song/getSong.ts b/apps/api/src/lexicon/types/app/rocksky/song/getSong.ts index 9cd6a7d8..578be0e4 100644 --- a/apps/api/src/lexicon/types/app/rocksky/song/getSong.ts +++ b/apps/api/src/lexicon/types/app/rocksky/song/getSong.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskySongDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskySongDefs from "./defs"; export interface QueryParams { /** The unique identifier of the song to retrieve */ - uri: string + uri: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskySongDefs.SongViewDetailed -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskySongDefs.SongViewDetailed; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/song/getSongs.ts b/apps/api/src/lexicon/types/app/rocksky/song/getSongs.ts index 49e95225..7c209584 100644 --- a/apps/api/src/lexicon/types/app/rocksky/song/getSongs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/song/getSongs.ts @@ -1,50 +1,50 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskySongDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskySongDefs from "./defs"; export interface QueryParams { /** The maximum number of songs to return */ - limit?: number + limit?: number; /** The offset for pagination */ - offset?: number + offset?: number; } -export type InputSchema = undefined +export type InputSchema = undefined; export interface OutputSchema { - songs?: AppRockskySongDefs.SongViewBasic[] - [k: string]: unknown + songs?: AppRockskySongDefs.SongViewBasic[]; + [k: string]: unknown; } -export type HandlerInput = undefined +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/spotify/defs.ts b/apps/api/src/lexicon/types/app/rocksky/spotify/defs.ts index 946729cd..86a590f6 100644 --- a/apps/api/src/lexicon/types/app/rocksky/spotify/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/spotify/defs.ts @@ -1,35 +1,35 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; export interface SpotifyTrackView { /** The unique identifier of the Spotify track. */ - id?: string + id?: string; /** The name of the track. */ - name?: string + name?: string; /** The name of the artist. */ - artist?: string + artist?: string; /** The name of the album. */ - album?: string + album?: string; /** The duration of the track in milliseconds. */ - duration?: number + duration?: number; /** A URL to a preview of the track. */ - previewUrl?: string - [k: string]: unknown + previewUrl?: string; + [k: string]: unknown; } export function isSpotifyTrackView(v: unknown): v is SpotifyTrackView { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.spotify.defs#spotifyTrackView' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.spotify.defs#spotifyTrackView" + ); } export function validateSpotifyTrackView(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.spotify.defs#spotifyTrackView', v) + return lexicons.validate("app.rocksky.spotify.defs#spotifyTrackView", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/spotify/getCurrentlyPlaying.ts b/apps/api/src/lexicon/types/app/rocksky/spotify/getCurrentlyPlaying.ts index 41b8ff7c..c6be7e31 100644 --- a/apps/api/src/lexicon/types/app/rocksky/spotify/getCurrentlyPlaying.ts +++ b/apps/api/src/lexicon/types/app/rocksky/spotify/getCurrentlyPlaying.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyPlayerDefs from '../player/defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyPlayerDefs from "../player/defs"; export interface QueryParams { /** Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. */ - actor?: string + actor?: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyPlayerDefs.CurrentlyPlayingViewDetailed -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyPlayerDefs.CurrentlyPlayingViewDetailed; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/spotify/next.ts b/apps/api/src/lexicon/types/app/rocksky/spotify/next.ts index 7620d0ab..66110356 100644 --- a/apps/api/src/lexicon/types/app/rocksky/spotify/next.ts +++ b/apps/api/src/lexicon/types/app/rocksky/spotify/next.ts @@ -1,32 +1,32 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; -export interface QueryParams {} +export type QueryParams = {} -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/spotify/pause.ts b/apps/api/src/lexicon/types/app/rocksky/spotify/pause.ts index 7620d0ab..66110356 100644 --- a/apps/api/src/lexicon/types/app/rocksky/spotify/pause.ts +++ b/apps/api/src/lexicon/types/app/rocksky/spotify/pause.ts @@ -1,32 +1,32 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; -export interface QueryParams {} +export type QueryParams = {} -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/spotify/play.ts b/apps/api/src/lexicon/types/app/rocksky/spotify/play.ts index 7620d0ab..66110356 100644 --- a/apps/api/src/lexicon/types/app/rocksky/spotify/play.ts +++ b/apps/api/src/lexicon/types/app/rocksky/spotify/play.ts @@ -1,32 +1,32 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; -export interface QueryParams {} +export type QueryParams = {} -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/spotify/previous.ts b/apps/api/src/lexicon/types/app/rocksky/spotify/previous.ts index 7620d0ab..66110356 100644 --- a/apps/api/src/lexicon/types/app/rocksky/spotify/previous.ts +++ b/apps/api/src/lexicon/types/app/rocksky/spotify/previous.ts @@ -1,32 +1,32 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; -export interface QueryParams {} +export type QueryParams = {} -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/spotify/seek.ts b/apps/api/src/lexicon/types/app/rocksky/spotify/seek.ts index dd93805e..7b47acff 100644 --- a/apps/api/src/lexicon/types/app/rocksky/spotify/seek.ts +++ b/apps/api/src/lexicon/types/app/rocksky/spotify/seek.ts @@ -1,35 +1,35 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; export interface QueryParams { /** The position in seconds to seek to */ - position: number + position: number; } -export type InputSchema = undefined -export type HandlerInput = undefined +export type InputSchema = undefined; +export type HandlerInput = undefined; export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | void +export type HandlerOutput = HandlerError | void; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/app/rocksky/stats/defs.ts b/apps/api/src/lexicon/types/app/rocksky/stats/defs.ts index 61adfa97..e24d1a4c 100644 --- a/apps/api/src/lexicon/types/app/rocksky/stats/defs.ts +++ b/apps/api/src/lexicon/types/app/rocksky/stats/defs.ts @@ -1,33 +1,33 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; export interface StatsView { /** The total number of scrobbles. */ - scrobbles?: number + scrobbles?: number; /** The total number of unique artists scrobbled. */ - artists?: number + artists?: number; /** The total number of tracks marked as loved. */ - lovedTracks?: number + lovedTracks?: number; /** The total number of unique albums scrobbled. */ - albums?: number + albums?: number; /** The total number of unique tracks scrobbled. */ - tracks?: number - [k: string]: unknown + tracks?: number; + [k: string]: unknown; } export function isStatsView(v: unknown): v is StatsView { return ( isObj(v) && - hasProp(v, '$type') && - v.$type === 'app.rocksky.stats.defs#statsView' - ) + hasProp(v, "$type") && + v.$type === "app.rocksky.stats.defs#statsView" + ); } export function validateStatsView(v: unknown): ValidationResult { - return lexicons.validate('app.rocksky.stats.defs#statsView', v) + return lexicons.validate("app.rocksky.stats.defs#statsView", v); } diff --git a/apps/api/src/lexicon/types/app/rocksky/stats/getStats.ts b/apps/api/src/lexicon/types/app/rocksky/stats/getStats.ts index 6b863af8..5c1a3ced 100644 --- a/apps/api/src/lexicon/types/app/rocksky/stats/getStats.ts +++ b/apps/api/src/lexicon/types/app/rocksky/stats/getStats.ts @@ -1,43 +1,43 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import express from 'express' -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' -import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' -import * as AppRockskyStatsDefs from './defs' +import type express from "express"; +import { ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; +import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server"; +import type * as AppRockskyStatsDefs from "./defs"; export interface QueryParams { /** The DID or handle of the user to get stats for. */ - did: string + did: string; } -export type InputSchema = undefined -export type OutputSchema = AppRockskyStatsDefs.StatsView -export type HandlerInput = undefined +export type InputSchema = undefined; +export type OutputSchema = AppRockskyStatsDefs.StatsView; +export type HandlerInput = undefined; export interface HandlerSuccess { - encoding: 'application/json' - body: OutputSchema - headers?: { [key: string]: string } + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; } export interface HandlerError { - status: number - message?: string + status: number; + message?: string; } -export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough; export type HandlerReqCtx = { - auth: HA - params: QueryParams - input: HandlerInput - req: express.Request - res: express.Response - resetRouteRateLimits: () => Promise -} + auth: HA; + params: QueryParams; + input: HandlerInput; + req: express.Request; + res: express.Response; + resetRouteRateLimits: () => Promise; +}; export type Handler = ( ctx: HandlerReqCtx, -) => Promise | HandlerOutput +) => Promise | HandlerOutput; diff --git a/apps/api/src/lexicon/types/com/atproto/repo/strongRef.ts b/apps/api/src/lexicon/types/com/atproto/repo/strongRef.ts index 8b21a6dd..089fdb69 100644 --- a/apps/api/src/lexicon/types/com/atproto/repo/strongRef.ts +++ b/apps/api/src/lexicon/types/com/atproto/repo/strongRef.ts @@ -1,26 +1,26 @@ /** * GENERATED CODE - DO NOT MODIFY */ -import { ValidationResult, BlobRef } from '@atproto/lexicon' -import { lexicons } from '../../../../lexicons' -import { isObj, hasProp } from '../../../../util' -import { CID } from 'multiformats/cid' +import { type ValidationResult, BlobRef } from "@atproto/lexicon"; +import { lexicons } from "../../../../lexicons"; +import { isObj, hasProp } from "../../../../util"; +import { CID } from "multiformats/cid"; export interface Main { - uri: string - cid: string - [k: string]: unknown + uri: string; + cid: string; + [k: string]: unknown; } export function isMain(v: unknown): v is Main { return ( isObj(v) && - hasProp(v, '$type') && - (v.$type === 'com.atproto.repo.strongRef#main' || - v.$type === 'com.atproto.repo.strongRef') - ) + hasProp(v, "$type") && + (v.$type === "com.atproto.repo.strongRef#main" || + v.$type === "com.atproto.repo.strongRef") + ); } export function validateMain(v: unknown): ValidationResult { - return lexicons.validate('com.atproto.repo.strongRef#main', v) + return lexicons.validate("com.atproto.repo.strongRef#main", v); } diff --git a/apps/api/src/lexicon/util.ts b/apps/api/src/lexicon/util.ts index d7e70440..e5546559 100644 --- a/apps/api/src/lexicon/util.ts +++ b/apps/api/src/lexicon/util.ts @@ -2,12 +2,12 @@ * GENERATED CODE - DO NOT MODIFY */ export function isObj(v: unknown): v is Record { - return typeof v === 'object' && v !== null + return typeof v === "object" && v !== null; } export function hasProp( data: object, prop: K, ): data is Record { - return prop in data + return prop in data; } diff --git a/apps/api/src/lib/agent.ts b/apps/api/src/lib/agent.ts index 3c7310ce..45f055f3 100644 --- a/apps/api/src/lib/agent.ts +++ b/apps/api/src/lib/agent.ts @@ -1,9 +1,9 @@ import { Agent } from "@atproto/api"; -import { NodeOAuthClient } from "@atproto/oauth-client-node"; +import type { NodeOAuthClient } from "@atproto/oauth-client-node"; export async function createAgent( oauthClient: NodeOAuthClient, - did: string + did: string, ): Promise { let agent = null; let retry = 0; diff --git a/apps/api/src/lib/authVerifier.ts b/apps/api/src/lib/authVerifier.ts index ce1693f4..5c90c0c2 100644 --- a/apps/api/src/lib/authVerifier.ts +++ b/apps/api/src/lib/authVerifier.ts @@ -1,5 +1,5 @@ -import { AuthOutput } from "@atproto/xrpc-server"; -import express from "express"; +import type { AuthOutput } from "@atproto/xrpc-server"; +import type express from "express"; import jwt from "jsonwebtoken"; import { env } from "./env"; diff --git a/apps/api/src/lib/crypto.ts b/apps/api/src/lib/crypto.ts index 69609470..d74912c8 100644 --- a/apps/api/src/lib/crypto.ts +++ b/apps/api/src/lib/crypto.ts @@ -6,7 +6,7 @@ export function encrypt(text: string, key: string) { const cipher = crypto.createCipheriv( "aes-256-ctr", Buffer.from(key, "hex"), - iv + iv, ); const encrypted = Buffer.concat([ cipher.update(text, "utf8"), @@ -21,7 +21,7 @@ export function decrypt(encrypted: string, key: string) { const decipher = crypto.createDecipheriv( "aes-256-ctr", Buffer.from(key, "hex"), - iv + iv, ); const decrypted = Buffer.concat([decipher.update(content), decipher.final()]); return decrypted.toString("utf8"); diff --git a/apps/api/src/lib/didUnstorageCache.ts b/apps/api/src/lib/didUnstorageCache.ts index 403eea54..7a7b3f0c 100644 --- a/apps/api/src/lib/didUnstorageCache.ts +++ b/apps/api/src/lib/didUnstorageCache.ts @@ -1,7 +1,7 @@ -import { - type CacheResult, - type DidCache, - type DidDocument, +import type { + CacheResult, + DidCache, + DidDocument, } from "@atproto/identity"; import type { Storage } from "unstorage"; @@ -44,7 +44,7 @@ export class StorageCache implements DidCache { async refreshCache( did: string, - getDoc: () => Promise + getDoc: () => Promise, ): Promise { const doc = await getDoc(); if (doc) { diff --git a/apps/api/src/lib/downloadImage.ts b/apps/api/src/lib/downloadImage.ts index ec7fc6ba..90c02085 100644 --- a/apps/api/src/lib/downloadImage.ts +++ b/apps/api/src/lib/downloadImage.ts @@ -6,7 +6,7 @@ export async function getContentType(url: string): Promise { } export default async function downloadImage( - url?: string | null + url?: string | null, ): Promise { if (!url) { return null; diff --git a/apps/api/src/lib/idResolver.ts b/apps/api/src/lib/idResolver.ts index 3cff20e4..51ed79d1 100644 --- a/apps/api/src/lib/idResolver.ts +++ b/apps/api/src/lib/idResolver.ts @@ -37,11 +37,11 @@ export function createBidirectionalResolver(resolver: IdResolver) { }, async resolveDidsToHandles( - dids: string[] + dids: string[], ): Promise> { const didHandleMap: Record = {}; const resolves = await Promise.all( - dids.map((did) => this.resolveDidToHandle(did).catch((_) => did)) + dids.map((did) => this.resolveDidToHandle(did).catch((_) => did)), ); for (let i = 0; i < dids.length; i++) { didHandleMap[dids[i]] = resolves[i]; diff --git a/apps/api/src/lib/index.ts b/apps/api/src/lib/index.ts index 21b172fe..1fda5763 100644 --- a/apps/api/src/lib/index.ts +++ b/apps/api/src/lib/index.ts @@ -33,9 +33,9 @@ export const deepCamelCaseKeys = (obj: T): any => { R.toPairs, R.map( ([key, value]) => - [_.camelCase(String(key)), deepCamelCaseKeys(value)] as [string, any] + [_.camelCase(String(key)), deepCamelCaseKeys(value)] as [string, any], ), - R.fromPairs + R.fromPairs, )(obj as object); } return obj; @@ -49,9 +49,9 @@ export const deepSnakeCaseKeys = (obj: T): any => { R.toPairs, R.map( ([key, value]) => - [_.snakeCase(String(key)), deepSnakeCaseKeys(value)] as [string, any] + [_.snakeCase(String(key)), deepSnakeCaseKeys(value)] as [string, any], ), - R.fromPairs + R.fromPairs, )(obj as object); } return obj; diff --git a/apps/api/src/lovedtracks/lovedtracks.service.ts b/apps/api/src/lovedtracks/lovedtracks.service.ts index 17bf7f2a..1bf9a078 100644 --- a/apps/api/src/lovedtracks/lovedtracks.service.ts +++ b/apps/api/src/lovedtracks/lovedtracks.service.ts @@ -1,17 +1,17 @@ -import { Agent } from "@atproto/api"; +import type { Agent } from "@atproto/api"; import { TID } from "@atproto/common"; import { equals } from "@xata.io/client"; -import { Context } from "context"; +import type { Context } from "context"; import { createHash } from "crypto"; import * as LikeLexicon from "lexicon/types/app/rocksky/like"; import { validateMain } from "lexicon/types/com/atproto/repo/strongRef"; -import { Track } from "types/track"; +import type { Track } from "types/track"; export async function likeTrack( ctx: Context, track: Track, user, - agent: Agent + agent: Agent, ) { const existingTrack = await ctx.client.db.tracks .filter( @@ -19,10 +19,10 @@ export async function likeTrack( equals( createHash("sha256") .update( - `${track.title} - ${track.artist} - ${track.album}`.toLowerCase() + `${track.title} - ${track.artist} - ${track.album}`.toLowerCase(), ) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); @@ -43,10 +43,10 @@ export async function likeTrack( // compute sha256 (lowercase(title + artist + album)) sha256: createHash("sha256") .update( - `${track.title} - ${track.artist} - ${track.album}`.toLowerCase() + `${track.title} - ${track.artist} - ${track.album}`.toLowerCase(), ) .digest("hex"), - } + }, ); const existingArtist = await ctx.client.db.artists @@ -55,8 +55,8 @@ export async function likeTrack( equals( createHash("sha256") .update(track.albumArtist.toLocaleLowerCase()) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); const { xata_id: artist_id } = await ctx.client.db.artists.createOrUpdate( @@ -67,7 +67,7 @@ export async function likeTrack( sha256: createHash("sha256") .update(track.albumArtist.toLowerCase()) .digest("hex"), - } + }, ); const existingAlbum = await ctx.client.db.albums @@ -76,8 +76,8 @@ export async function likeTrack( equals( createHash("sha256") .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); @@ -95,7 +95,7 @@ export async function likeTrack( sha256: createHash("sha256") .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) .digest("hex"), - } + }, ); const existingAlbumTrack = await ctx.client.db.album_tracks @@ -118,7 +118,7 @@ export async function likeTrack( { artist_id, track_id, - } + }, ); const existingArtistAlbum = await ctx.client.db.artist_albums @@ -131,7 +131,7 @@ export async function likeTrack( { artist_id, album_id, - } + }, ); const lovedTrack = await ctx.client.db.loved_tracks @@ -144,7 +144,7 @@ export async function likeTrack( { user_id: user.xata_id, track_id, - } + }, ); if (existingTrack.uri) { @@ -206,7 +206,7 @@ export async function unLikeTrack( ctx: Context, trackSha256: string, user, - agent: Agent + agent: Agent, ) { const track = await ctx.client.db.tracks .filter("sha256", equals(trackSha256)) @@ -244,7 +244,7 @@ export async function getLovedTracks( ctx: Context, user, size = 10, - offset = 0 + offset = 0, ) { const lovedTracks = await ctx.client.db.loved_tracks .select(["track_id.*"]) diff --git a/apps/api/src/nowplaying/nowplaying.service.ts b/apps/api/src/nowplaying/nowplaying.service.ts index d3694485..0a90f3b1 100644 --- a/apps/api/src/nowplaying/nowplaying.service.ts +++ b/apps/api/src/nowplaying/nowplaying.service.ts @@ -14,7 +14,7 @@ import { Track } from "types/track"; export async function putArtistRecord( track: Track, - agent: Agent + agent: Agent, ): Promise { const rkey = TID.nextStr(); const record: { @@ -61,7 +61,7 @@ export async function putArtistRecord( export async function putAlbumRecord( track: Track, - agent: Agent + agent: Agent, ): Promise { const rkey = TID.nextStr(); let albumArt = undefined; @@ -121,7 +121,7 @@ export async function putAlbumRecord( export async function putSongRecord( track: Track, - agent: Agent + agent: Agent, ): Promise { const rkey = TID.nextStr(); let albumArt = undefined; @@ -188,7 +188,7 @@ export async function putSongRecord( async function putScrobbleRecord( track: Track, - agent: Agent + agent: Agent, ): Promise { const rkey = TID.nextStr(); let albumArt = undefined; @@ -365,7 +365,7 @@ export async function scrobbleTrack( ctx: Context, track: Track, agent: Agent, - userDid: string + userDid: string, ): Promise { let existingTrack = await ctx.client.db.tracks .filter( @@ -373,10 +373,10 @@ export async function scrobbleTrack( equals( createHash("sha256") .update( - `${track.title} - ${track.artist} - ${track.album}`.toLowerCase() + `${track.title} - ${track.artist} - ${track.album}`.toLowerCase(), ) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); @@ -387,8 +387,8 @@ export async function scrobbleTrack( equals( createHash("sha256") .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); if (album) { @@ -405,8 +405,8 @@ export async function scrobbleTrack( equals( createHash("sha256") .update(track.albumArtist.toLowerCase()) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); if (artist) { @@ -433,8 +433,8 @@ export async function scrobbleTrack( equals( createHash("sha256") .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); @@ -447,10 +447,10 @@ export async function scrobbleTrack( equals( createHash("sha256") .update( - `${track.title} - ${track.artist} - ${track.album}`.toLowerCase() + `${track.title} - ${track.artist} - ${track.album}`.toLowerCase(), ) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); await new Promise((resolve) => setTimeout(resolve, 1000)); @@ -463,7 +463,7 @@ export async function scrobbleTrack( if (existingTrack) { console.log( - `Song found: ${chalk.cyan(existingTrack.xata_id)} - ${track.title}, after ${chalk.magenta(tries)} tries` + `Song found: ${chalk.cyan(existingTrack.xata_id)} - ${track.title}, after ${chalk.magenta(tries)} tries`, ); } @@ -513,10 +513,10 @@ export async function scrobbleTrack( equals( createHash("sha256") .update( - `${track.title} - ${track.artist} - ${track.album}`.toLowerCase() + `${track.title} - ${track.artist} - ${track.album}`.toLowerCase(), ) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); @@ -526,7 +526,7 @@ export async function scrobbleTrack( tries < 30 ) { console.log( - `Artist uri not ready, trying again: ${chalk.magenta(tries + 1)}` + `Artist uri not ready, trying again: ${chalk.magenta(tries + 1)}`, ); existingTrack = await ctx.client.db.tracks .filter( @@ -534,10 +534,10 @@ export async function scrobbleTrack( equals( createHash("sha256") .update( - `${track.title} - ${track.artist} - ${track.album}`.toLowerCase() + `${track.title} - ${track.artist} - ${track.album}`.toLowerCase(), ) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); @@ -549,8 +549,8 @@ export async function scrobbleTrack( equals( createHash("sha256") .update(track.albumArtist.toLowerCase()) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); if (artist) { @@ -569,8 +569,8 @@ export async function scrobbleTrack( equals( createHash("sha256") .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); if (album) { @@ -597,7 +597,7 @@ export async function scrobbleTrack( if (existingTrack?.artist_uri) { console.log( - `Artist uri ready: ${chalk.cyan(existingTrack.xata_id)} - ${track.title}, after ${chalk.magenta(tries)} tries` + `Artist uri ready: ${chalk.cyan(existingTrack.xata_id)} - ${track.title}, after ${chalk.magenta(tries)} tries`, ); } diff --git a/apps/api/src/ratelimiter.ts b/apps/api/src/ratelimiter.ts index 5869a28b..9ae32a3a 100644 --- a/apps/api/src/ratelimiter.ts +++ b/apps/api/src/ratelimiter.ts @@ -1,5 +1,5 @@ import { ctx } from "context"; -import { Context, MiddlewareHandler } from "hono"; +import type { Context, MiddlewareHandler } from "hono"; type RateLimitOptions = { limit: number; // max requests diff --git a/apps/api/src/schema/album-tracks.ts b/apps/api/src/schema/album-tracks.ts index 06c5c625..4b86aeda 100644 --- a/apps/api/src/schema/album-tracks.ts +++ b/apps/api/src/schema/album-tracks.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { integer, pgTable, text, timestamp } from "drizzle-orm/pg-core"; import albums from "./albums"; import tracks from "./tracks"; diff --git a/apps/api/src/schema/albums.ts b/apps/api/src/schema/albums.ts index 874b92f5..e5685927 100644 --- a/apps/api/src/schema/albums.ts +++ b/apps/api/src/schema/albums.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { integer, pgTable, text, timestamp } from "drizzle-orm/pg-core"; const albums = pgTable("albums", { diff --git a/apps/api/src/schema/api-keys.ts b/apps/api/src/schema/api-keys.ts index e28cfe1a..7713b681 100644 --- a/apps/api/src/schema/api-keys.ts +++ b/apps/api/src/schema/api-keys.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { boolean, pgTable, text, timestamp } from "drizzle-orm/pg-core"; import users from "./users"; diff --git a/apps/api/src/schema/artist-albums.ts b/apps/api/src/schema/artist-albums.ts index 35bf0dbe..338c8aca 100644 --- a/apps/api/src/schema/artist-albums.ts +++ b/apps/api/src/schema/artist-albums.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { integer, pgTable, text, timestamp } from "drizzle-orm/pg-core"; import albums from "./albums"; import artists from "./artists"; diff --git a/apps/api/src/schema/artist-tracks.ts b/apps/api/src/schema/artist-tracks.ts index 853cbc20..0be4d8e7 100644 --- a/apps/api/src/schema/artist-tracks.ts +++ b/apps/api/src/schema/artist-tracks.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { integer, pgTable, text, timestamp } from "drizzle-orm/pg-core"; import artists from "./artists"; import tracks from "./tracks"; diff --git a/apps/api/src/schema/artists.ts b/apps/api/src/schema/artists.ts index 8d6c9a3a..fc2dda1e 100644 --- a/apps/api/src/schema/artists.ts +++ b/apps/api/src/schema/artists.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { integer, pgTable, text, timestamp } from "drizzle-orm/pg-core"; const artists = pgTable("artists", { diff --git a/apps/api/src/schema/dropbox-accounts.ts b/apps/api/src/schema/dropbox-accounts.ts index 1a7f830b..fa7cc79d 100644 --- a/apps/api/src/schema/dropbox-accounts.ts +++ b/apps/api/src/schema/dropbox-accounts.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { boolean, pgTable, text, timestamp } from "drizzle-orm/pg-core"; import users from "./users"; diff --git a/apps/api/src/schema/dropbox-directories.ts b/apps/api/src/schema/dropbox-directories.ts index d49b66dc..76aae58c 100644 --- a/apps/api/src/schema/dropbox-directories.ts +++ b/apps/api/src/schema/dropbox-directories.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; const dropboxDirectories = pgTable("dropbox_directories", { diff --git a/apps/api/src/schema/dropbox-paths.ts b/apps/api/src/schema/dropbox-paths.ts index 5c0f8c15..2fe2c8ea 100644 --- a/apps/api/src/schema/dropbox-paths.ts +++ b/apps/api/src/schema/dropbox-paths.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; import dropboxDirectories from "./dropbox-directories"; diff --git a/apps/api/src/schema/dropbox-tokens.ts b/apps/api/src/schema/dropbox-tokens.ts index bcdffd35..8affe1f2 100644 --- a/apps/api/src/schema/dropbox-tokens.ts +++ b/apps/api/src/schema/dropbox-tokens.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; const dropboxTokens = pgTable("dropbox_tokens", { diff --git a/apps/api/src/schema/dropbox.ts b/apps/api/src/schema/dropbox.ts index 2f4dffd8..ea2fd523 100644 --- a/apps/api/src/schema/dropbox.ts +++ b/apps/api/src/schema/dropbox.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; import dropboxTokens from "./dropbox-tokens"; import users from "./users"; diff --git a/apps/api/src/schema/google-drive-accounts.ts b/apps/api/src/schema/google-drive-accounts.ts index f5de199d..0bbb1bcb 100644 --- a/apps/api/src/schema/google-drive-accounts.ts +++ b/apps/api/src/schema/google-drive-accounts.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { boolean, pgTable, text, timestamp } from "drizzle-orm/pg-core"; import users from "./users"; diff --git a/apps/api/src/schema/google-drive-directories.ts b/apps/api/src/schema/google-drive-directories.ts index 483425c4..a18ee26b 100644 --- a/apps/api/src/schema/google-drive-directories.ts +++ b/apps/api/src/schema/google-drive-directories.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; const googleDriveDirectories = pgTable("google_drive_directories", { diff --git a/apps/api/src/schema/google-drive-paths.ts b/apps/api/src/schema/google-drive-paths.ts index f6f9ed7f..a985196d 100644 --- a/apps/api/src/schema/google-drive-paths.ts +++ b/apps/api/src/schema/google-drive-paths.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; import googleDriveDirectories from "./google-drive-directories"; diff --git a/apps/api/src/schema/google-drive-tokens.ts b/apps/api/src/schema/google-drive-tokens.ts index 6789ffdd..25017dc1 100644 --- a/apps/api/src/schema/google-drive-tokens.ts +++ b/apps/api/src/schema/google-drive-tokens.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; const googleDriveTokens = pgTable("google_drive_tokens", { diff --git a/apps/api/src/schema/googledrive.ts b/apps/api/src/schema/googledrive.ts index ee3df466..be8b5a01 100644 --- a/apps/api/src/schema/googledrive.ts +++ b/apps/api/src/schema/googledrive.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; import googleDriveTokens from "./google-drive-tokens"; import users from "./users"; diff --git a/apps/api/src/schema/loved-tracks.ts b/apps/api/src/schema/loved-tracks.ts index 7640ebbe..f3a760c7 100644 --- a/apps/api/src/schema/loved-tracks.ts +++ b/apps/api/src/schema/loved-tracks.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; import tracks from "./tracks"; import users from "./users"; diff --git a/apps/api/src/schema/playlist-tracks.ts b/apps/api/src/schema/playlist-tracks.ts index 72487e68..70ff6f2c 100644 --- a/apps/api/src/schema/playlist-tracks.ts +++ b/apps/api/src/schema/playlist-tracks.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; import playlists from "./playlists"; import tracks from "./tracks"; diff --git a/apps/api/src/schema/playlists.ts b/apps/api/src/schema/playlists.ts index a4668cae..0190b332 100644 --- a/apps/api/src/schema/playlists.ts +++ b/apps/api/src/schema/playlists.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; import users from "./users"; diff --git a/apps/api/src/schema/profile-shouts.ts b/apps/api/src/schema/profile-shouts.ts index 047f99f5..ec249593 100644 --- a/apps/api/src/schema/profile-shouts.ts +++ b/apps/api/src/schema/profile-shouts.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; import shouts from "./shouts"; import users from "./users"; diff --git a/apps/api/src/schema/queue-tracks.ts b/apps/api/src/schema/queue-tracks.ts index 3a8fc3be..83ab9732 100644 --- a/apps/api/src/schema/queue-tracks.ts +++ b/apps/api/src/schema/queue-tracks.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { integer, pgTable, text, timestamp } from "drizzle-orm/pg-core"; import tracks from "./tracks"; import users from "./users"; diff --git a/apps/api/src/schema/scrobbles.ts b/apps/api/src/schema/scrobbles.ts index fc8b8de3..39f2f3d5 100644 --- a/apps/api/src/schema/scrobbles.ts +++ b/apps/api/src/schema/scrobbles.ts @@ -1,6 +1,6 @@ import { integer, pgTable, text, timestamp } from "drizzle-orm/pg-core"; -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import albums from "./albums"; import artists from "./artists"; import tracks from "./tracks"; diff --git a/apps/api/src/schema/shout-likes.ts b/apps/api/src/schema/shout-likes.ts index 424c0c5e..de569727 100644 --- a/apps/api/src/schema/shout-likes.ts +++ b/apps/api/src/schema/shout-likes.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; import shouts from "./shouts"; import users from "./users"; diff --git a/apps/api/src/schema/shout-reports.ts b/apps/api/src/schema/shout-reports.ts index 4f208bc8..aa5db34d 100644 --- a/apps/api/src/schema/shout-reports.ts +++ b/apps/api/src/schema/shout-reports.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; import shouts from "./shouts"; import users from "./users"; diff --git a/apps/api/src/schema/shouts.ts b/apps/api/src/schema/shouts.ts index 37f3c272..d1de12b8 100644 --- a/apps/api/src/schema/shouts.ts +++ b/apps/api/src/schema/shouts.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; import albums from "./albums"; import scrobbles from "./scrobbles"; diff --git a/apps/api/src/schema/spotify-accounts.ts b/apps/api/src/schema/spotify-accounts.ts index 96853486..5cb928bc 100644 --- a/apps/api/src/schema/spotify-accounts.ts +++ b/apps/api/src/schema/spotify-accounts.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { boolean, integer, diff --git a/apps/api/src/schema/spotify-tokens.ts b/apps/api/src/schema/spotify-tokens.ts index 89c30a87..0315f646 100644 --- a/apps/api/src/schema/spotify-tokens.ts +++ b/apps/api/src/schema/spotify-tokens.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { integer, pgTable, text, timestamp } from "drizzle-orm/pg-core"; import users from "./users"; diff --git a/apps/api/src/schema/tracks.ts b/apps/api/src/schema/tracks.ts index 213952c0..3d83371c 100644 --- a/apps/api/src/schema/tracks.ts +++ b/apps/api/src/schema/tracks.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { integer, pgTable, text, timestamp } from "drizzle-orm/pg-core"; const tracks = pgTable("tracks", { diff --git a/apps/api/src/schema/user-albums.ts b/apps/api/src/schema/user-albums.ts index 730c20e3..b90e8680 100644 --- a/apps/api/src/schema/user-albums.ts +++ b/apps/api/src/schema/user-albums.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { integer, pgTable, text, timestamp } from "drizzle-orm/pg-core"; import albums from "./albums"; import users from "./users"; diff --git a/apps/api/src/schema/user-artists.ts b/apps/api/src/schema/user-artists.ts index 7ff69e1e..fba5d21c 100644 --- a/apps/api/src/schema/user-artists.ts +++ b/apps/api/src/schema/user-artists.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { integer, pgTable, text, timestamp } from "drizzle-orm/pg-core"; import artists from "./artists"; import users from "./users"; diff --git a/apps/api/src/schema/user-playlists.ts b/apps/api/src/schema/user-playlists.ts index bc2ab261..72479362 100644 --- a/apps/api/src/schema/user-playlists.ts +++ b/apps/api/src/schema/user-playlists.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; import tracks from "./tracks"; import users from "./users"; diff --git a/apps/api/src/schema/user-tracks.ts b/apps/api/src/schema/user-tracks.ts index 42bfc279..4c0ea927 100644 --- a/apps/api/src/schema/user-tracks.ts +++ b/apps/api/src/schema/user-tracks.ts @@ -1,4 +1,4 @@ -import { InferInsertModel, InferSelectModel } from "drizzle-orm"; +import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; import { integer, pgTable, text, timestamp } from "drizzle-orm/pg-core"; import tracks from "./tracks"; import users from "./users"; diff --git a/apps/api/src/schema/users.ts b/apps/api/src/schema/users.ts index 5aadfead..7d13c3a5 100644 --- a/apps/api/src/schema/users.ts +++ b/apps/api/src/schema/users.ts @@ -1,4 +1,4 @@ -import { InferSelectModel } from "drizzle-orm"; +import type { InferSelectModel } from "drizzle-orm"; import { integer, pgTable, text, timestamp } from "drizzle-orm/pg-core"; const users = pgTable("users", { diff --git a/apps/api/src/schema/webscrobblers.ts b/apps/api/src/schema/webscrobblers.ts index 54e37f17..4bf55af5 100644 --- a/apps/api/src/schema/webscrobblers.ts +++ b/apps/api/src/schema/webscrobblers.ts @@ -1,4 +1,4 @@ -import { InferSelectModel } from "drizzle-orm"; +import type { InferSelectModel } from "drizzle-orm"; import { boolean, pgTable, text, timestamp } from "drizzle-orm/pg-core"; import users from "./users"; diff --git a/apps/api/src/scripts/avatar.ts b/apps/api/src/scripts/avatar.ts index f0a47e55..423ff00f 100644 --- a/apps/api/src/scripts/avatar.ts +++ b/apps/api/src/scripts/avatar.ts @@ -18,7 +18,7 @@ for (const did of args) { } const plc = await fetch(`https://plc.directory/${user.did}`).then((res) => - res.json() + res.json(), ); const serviceEndpoint = _.get(plc, "service.0.serviceEndpoint"); @@ -28,7 +28,7 @@ for (const did of args) { } const profile = await fetch( - `${serviceEndpoint}/xrpc/com.atproto.repo.getRecord?repo=${user.did}&collection=app.bsky.actor.profile&rkey=self` + `${serviceEndpoint}/xrpc/com.atproto.repo.getRecord?repo=${user.did}&collection=app.bsky.actor.profile&rkey=self`, ).then((res) => res.json()); const ref = _.get(profile, "value.avatar.ref.$link"); const type = _.get(profile, "value.avatar.mimeType").split("/")[1]; diff --git a/apps/api/src/scripts/meili.ts b/apps/api/src/scripts/meili.ts index 599221ef..0e0cbe4a 100644 --- a/apps/api/src/scripts/meili.ts +++ b/apps/api/src/scripts/meili.ts @@ -23,8 +23,8 @@ await main(); async function createAlbums() { const { meilisearch } = ctx; - let skip = 0; - let size = 100; + const skip = 0; + const size = 100; const total = await ctx.db .select({ value: count() }) .from(tables.albums) @@ -42,7 +42,7 @@ async function createAlbums() { async function createArtists() { const { meilisearch } = ctx; - let size = 100; + const size = 100; const total = await ctx.db .select({ value: count() }) .from(tables.artists) @@ -51,7 +51,7 @@ async function createArtists() { for (let i = 0; i < total; i += size) { const skip = i; console.log( - `Processing ${chalk.magentaBright("artists")}: ${chalk.magentaBright(skip)} to ${chalk.magentaBright(skip + size)}` + `Processing ${chalk.magentaBright("artists")}: ${chalk.magentaBright(skip)} to ${chalk.magentaBright(skip + size)}`, ); const results = await ctx.db .select() @@ -66,7 +66,7 @@ async function createArtists() { async function createTracks() { const { meilisearch } = ctx; - let size = 100; + const size = 100; const total = await ctx.db .select({ value: count() }) .from(tables.tracks) @@ -75,7 +75,7 @@ async function createTracks() { for (let i = 0; i < total; i += size) { const skip = i; console.log( - `Processing ${chalk.magentaBright("tracks")}: ${chalk.magentaBright(skip)} to ${chalk.magentaBright(skip + size)}` + `Processing ${chalk.magentaBright("tracks")}: ${chalk.magentaBright(skip)} to ${chalk.magentaBright(skip + size)}`, ); const results = await ctx.db .select() @@ -90,7 +90,7 @@ async function createTracks() { async function createUsers() { const { meilisearch } = ctx; - let size = 100; + const size = 100; const total = await ctx.db .select({ value: count() }) .from(tables.users) @@ -100,7 +100,7 @@ async function createUsers() { for (let i = 0; i < total; i += size) { const skip = i; console.log( - `Processing ${chalk.magentaBright("users")}: ${chalk.magentaBright(skip)} to ${chalk.magentaBright(skip + size)}` + `Processing ${chalk.magentaBright("users")}: ${chalk.magentaBright(skip)} to ${chalk.magentaBright(skip + size)}`, ); const results = await ctx.db .select() diff --git a/apps/api/src/scripts/sync-library.ts b/apps/api/src/scripts/sync-library.ts index 7e77f841..923f38e9 100644 --- a/apps/api/src/scripts/sync-library.ts +++ b/apps/api/src/scripts/sync-library.ts @@ -2,9 +2,9 @@ import chalk from "chalk"; import { ctx } from "context"; import { and, count, eq } from "drizzle-orm"; import tables from "schema"; -import { InsertArtistAlbum } from "schema/artist-albums"; +import type { InsertArtistAlbum } from "schema/artist-albums"; -let size = 100; +const size = 100; const total = await ctx.db .select({ value: count() }) .from(tables.tracks) @@ -16,7 +16,7 @@ console.log(`Total tracks to process: ${chalk.magentaBright(total)}`); for (let i = 0; i < total; i += size) { const skip = i; console.log( - `Processing ${chalk.magentaBright("tracks")}: ${chalk.magentaBright(skip)} to ${chalk.magentaBright(skip + size)}` + `Processing ${chalk.magentaBright("tracks")}: ${chalk.magentaBright(skip)} to ${chalk.magentaBright(skip + size)}`, ); const results = await ctx.db .select() @@ -28,7 +28,7 @@ for (let i = 0; i < total; i += size) { for (const track of results) { if (!track.artistUri || !track.albumUri) { console.log( - `Skipping track ${chalk.cyan(track.title)} due to missing artist or album URI` + `Skipping track ${chalk.cyan(track.title)} due to missing artist or album URI`, ); console.log("artistUri", track.artistUri); console.log("albumUri", track.albumUri); @@ -40,17 +40,17 @@ for (let i = 0; i < total; i += size) { .from(tables.artistAlbums) .leftJoin( tables.artists, - eq(tables.artistAlbums.artistId, tables.artists.id) + eq(tables.artistAlbums.artistId, tables.artists.id), ) .leftJoin( tables.albums, - eq(tables.artistAlbums.albumId, tables.albums.id) + eq(tables.artistAlbums.albumId, tables.albums.id), ) .where( and( eq(tables.artists.uri, track.artistUri), - eq(tables.albums.uri, track.albumUri) - ) + eq(tables.albums.uri, track.albumUri), + ), ) .limit(1) .execute() @@ -77,7 +77,7 @@ for (let i = 0; i < total; i += size) { if (!artist || !album) { console.error( - `Artist or album not found for track: ${track.uri}. Skipping...` + `Artist or album not found for track: ${track.uri}. Skipping...`, ); console.log("artist", artist); console.log("album", album); diff --git a/apps/api/src/scripts/sync.ts b/apps/api/src/scripts/sync.ts index e49ae259..e628bbad 100644 --- a/apps/api/src/scripts/sync.ts +++ b/apps/api/src/scripts/sync.ts @@ -25,10 +25,10 @@ async function updateUris(did: string) { equals( createHash("sha256") .update( - `${track.title} - ${track.artist} - ${track.album}`.toLowerCase() + `${track.title} - ${track.artist} - ${track.album}`.toLowerCase(), ) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); @@ -40,8 +40,8 @@ async function updateUris(did: string) { equals( createHash("sha256") .update(`${track.album} - ${track.album_artist}`.toLowerCase()) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); if (album) { @@ -59,8 +59,8 @@ async function updateUris(did: string) { equals( createHash("sha256") .update(track.album_artist.toLowerCase()) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); if (artist) { @@ -76,8 +76,8 @@ async function updateUris(did: string) { equals( createHash("sha256") .update(`${track.album} - ${track.album_artist}`.toLowerCase()) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); @@ -89,8 +89,8 @@ async function updateUris(did: string) { equals( createHash("sha256") .update(track.album_artist.toLowerCase()) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); if (artist) { diff --git a/apps/api/src/server.ts b/apps/api/src/server.ts index 0a5e110a..ac49d239 100644 --- a/apps/api/src/server.ts +++ b/apps/api/src/server.ts @@ -29,6 +29,6 @@ app.use(proxyMiddleware); app.listen(process.env.ROCKSKY_XPRC_PORT || 3004, () => { console.log( - `Rocksky XRPC API is running on port ${process.env.ROCKSKY_XRPC_PORT || 3004}` + `Rocksky XRPC API is running on port ${process.env.ROCKSKY_XRPC_PORT || 3004}`, ); }); diff --git a/apps/api/src/shouts/shouts.service.ts b/apps/api/src/shouts/shouts.service.ts index 0f57dc99..8d9b6b82 100644 --- a/apps/api/src/shouts/shouts.service.ts +++ b/apps/api/src/shouts/shouts.service.ts @@ -1,18 +1,18 @@ -import { Agent, AtpAgent } from "@atproto/api"; +import { type Agent, AtpAgent } from "@atproto/api"; import { TID } from "@atproto/common"; -import { Context } from "context"; +import type { Context } from "context"; import * as LikeLexicon from "lexicon/types/app/rocksky/like"; import * as ShoutLexicon from "lexicon/types/app/rocksky/shout"; import { validateMain } from "lexicon/types/com/atproto/repo/strongRef"; import _ from "lodash"; -import { Shout } from "types/shout"; +import type { Shout } from "types/shout"; export async function createShout( ctx: Context, shout: Shout, uri: string, user, - agent: Agent + agent: Agent, ) { let album, artist, track, scrobble, profile, collection; if (uri.includes("app.rocksky.song")) { @@ -105,7 +105,7 @@ export async function replyShout( reply: Shout, shoutUri: string, user, - agent: Agent + agent: Agent, ) { const shout = await ctx.client.db.shouts .select(["track_id.*", "album_id.*", "artist_id.*", "scrobble_id.*", "uri"]) @@ -147,7 +147,7 @@ export async function replyShout( profileRecord.uri; let service = await fetch( - `https://plc.directory/${subjectUri.split("/").slice(0, 3).join("/").split("at://")[1]}` + `https://plc.directory/${subjectUri.split("/").slice(0, 3).join("/").split("at://")[1]}`, ) .then((res) => res.json()) .then((data) => data.service); @@ -171,7 +171,7 @@ export async function replyShout( } service = await fetch( - `https://plc.directory/${shoutUri.split("/").slice(0, 3).join("/").split("at://")[1]}` + `https://plc.directory/${shoutUri.split("/").slice(0, 3).join("/").split("at://")[1]}`, ) .then((res) => res.json()) .then((data) => data.service); @@ -254,7 +254,7 @@ export async function likeShout( ctx: Context, shoutUri: string, user, - agent: Agent + agent: Agent, ) { const rkey = TID.nextStr(); const likes = await ctx.client.db.shout_likes @@ -269,7 +269,7 @@ export async function likeShout( } const { service } = await fetch( - `https://plc.directory/${shoutUri.split("/").slice(0, 3).join("/").split("at://")[1]}` + `https://plc.directory/${shoutUri.split("/").slice(0, 3).join("/").split("at://")[1]}`, ).then((res) => res.json()); const atpAgent = new AtpAgent({ @@ -333,7 +333,7 @@ export async function unlikeShout( ctx: Context, shoutUri: string, user, - agent: Agent + agent: Agent, ) { const likes = await ctx.client.db.shout_likes .filter({ diff --git a/apps/api/src/spotify/app.ts b/apps/api/src/spotify/app.ts index f8f65667..ef20c936 100644 --- a/apps/api/src/spotify/app.ts +++ b/apps/api/src/spotify/app.ts @@ -17,7 +17,7 @@ app.use( limit: 10, // max Spotify API calls window: 15, // per 10 seconds keyPrefix: "spotify-ratelimit", - }) + }), ); app.get("/login", async (c) => { @@ -44,7 +44,7 @@ app.get("/login", async (c) => { const redirectUrl = `https://accounts.spotify.com/en/authorize?client_id=${env.SPOTIFY_CLIENT_ID}&response_type=code&redirect_uri=${env.SPOTIFY_REDIRECT_URI}&scope=user-read-private%20user-read-email%20user-read-playback-state%20user-read-currently-playing%20user-modify-playback-state%20playlist-modify-public%20playlist-modify-private%20playlist-read-private%20playlist-read-collaborative&state=${state}`; c.header( "Set-Cookie", - `session-id=${state}; Path=/; HttpOnly; SameSite=Strict; Secure` + `session-id=${state}; Path=/; HttpOnly; SameSite=Strict; Secure`, ); return c.json({ redirectUrl }); }); @@ -210,7 +210,7 @@ app.get("/currently-playing", async (c) => { const sha256 = createHash("sha256") .update( - `${track.item.name} - ${track.item.artists.map((x) => x.name).join(", ")} - ${track.item.album.name}`.toLowerCase() + `${track.item.name} - ${track.item.artists.map((x) => x.name).join(", ")} - ${track.item.album.name}`.toLowerCase(), ) .digest("hex"); @@ -264,7 +264,7 @@ app.put("/pause", async (c) => { const refreshToken = decrypt( spotifyToken.refresh_token, - env.SPOTIFY_ENCRYPTION_KEY + env.SPOTIFY_ENCRYPTION_KEY, ); // get new access token @@ -330,7 +330,7 @@ app.put("/play", async (c) => { const refreshToken = decrypt( spotifyToken.refresh_token, - env.SPOTIFY_ENCRYPTION_KEY + env.SPOTIFY_ENCRYPTION_KEY, ); // get new access token @@ -396,7 +396,7 @@ app.post("/next", async (c) => { const refreshToken = decrypt( spotifyToken.refresh_token, - env.SPOTIFY_ENCRYPTION_KEY + env.SPOTIFY_ENCRYPTION_KEY, ); // get new access token @@ -462,7 +462,7 @@ app.post("/previous", async (c) => { const refreshToken = decrypt( spotifyToken.refresh_token, - env.SPOTIFY_ENCRYPTION_KEY + env.SPOTIFY_ENCRYPTION_KEY, ); // get new access token @@ -488,7 +488,7 @@ app.post("/previous", async (c) => { headers: { Authorization: `Bearer ${access_token}`, }, - } + }, ); if (response.status === 403) { @@ -531,7 +531,7 @@ app.put("/seek", async (c) => { const refreshToken = decrypt( spotifyToken.refresh_token, - env.SPOTIFY_ENCRYPTION_KEY + env.SPOTIFY_ENCRYPTION_KEY, ); // get new access token @@ -558,7 +558,7 @@ app.put("/seek", async (c) => { headers: { Authorization: `Bearer ${access_token}`, }, - } + }, ); if (response.status === 403) { diff --git a/apps/api/src/sqliteKv.ts b/apps/api/src/sqliteKv.ts index 487f3ccc..fab414df 100644 --- a/apps/api/src/sqliteKv.ts +++ b/apps/api/src/sqliteKv.ts @@ -100,7 +100,7 @@ export default defineDriver< oc.column("id").doUpdateSet({ value, updated_at: now, - }) + }), ) .execute(); }, @@ -125,10 +125,10 @@ export default defineDriver< oc.column("id").doUpdateSet({ value, updated_at: now, - }) + }), ) .execute(); - }) + }), ); }); }, @@ -169,5 +169,5 @@ export default defineDriver< await getDb().destroy(); }, }; - } + }, ); diff --git a/apps/api/src/subscribers/index.ts b/apps/api/src/subscribers/index.ts index 019d7ecb..2f01c4a3 100644 --- a/apps/api/src/subscribers/index.ts +++ b/apps/api/src/subscribers/index.ts @@ -1,4 +1,4 @@ -import { Context } from "context"; +import type { Context } from "context"; import { onNewPlaylist } from "./playlist"; import { onNewTrack } from "./track"; import { onNewUser } from "./user"; diff --git a/apps/api/src/subscribers/playlist.ts b/apps/api/src/subscribers/playlist.ts index f0acfa16..ba290622 100644 --- a/apps/api/src/subscribers/playlist.ts +++ b/apps/api/src/subscribers/playlist.ts @@ -1,7 +1,7 @@ import { TID } from "@atproto/common"; -import { BlobRef } from "@atproto/lexicon"; +import type { BlobRef } from "@atproto/lexicon"; import chalk from "chalk"; -import { Context } from "context"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import * as Playlist from "lexicon/types/app/rocksky/playlist"; import { createAgent } from "lib/agent"; @@ -19,7 +19,7 @@ export function onNewPlaylist(ctx: Context) { did: string; } = JSON.parse(sc.decode(m.data)); console.log( - `New playlist: ${chalk.cyan(payload.did)} - ${chalk.greenBright(payload.id)}` + `New playlist: ${chalk.cyan(payload.did)} - ${chalk.greenBright(payload.id)}`, ); await putPlaylistRecord(ctx, payload); } @@ -28,13 +28,13 @@ export function onNewPlaylist(ctx: Context) { async function putPlaylistRecord( ctx: Context, - payload: { id: string; did: string } + payload: { id: string; did: string }, ) { const agent = await createAgent(ctx.oauthClient, payload.did); if (!agent) { console.error( - `Failed to create agent, skipping playlist: ${chalk.cyan(payload.id)} for ${chalk.greenBright(payload.did)}` + `Failed to create agent, skipping playlist: ${chalk.cyan(payload.id)} for ${chalk.greenBright(payload.did)}`, ); return; } @@ -110,6 +110,6 @@ async function putPlaylistRecord( await ctx.meilisearch.post( `indexes/playlists/documents?primaryKey=id`, - updatedPlaylist + updatedPlaylist, ); } diff --git a/apps/api/src/subscribers/track.ts b/apps/api/src/subscribers/track.ts index ff5545bf..48e27a05 100644 --- a/apps/api/src/subscribers/track.ts +++ b/apps/api/src/subscribers/track.ts @@ -1,5 +1,5 @@ import chalk from "chalk"; -import { Context } from "context"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import _ from "lodash"; import { StringCodec } from "nats"; @@ -42,7 +42,7 @@ export function onNewTrack(ctx: Context) { ctx.meilisearch.post(`indexes/albums/documents?primaryKey=id`, albums), ctx.meilisearch.post( `indexes/artists/documents?primaryKey=id`, - artists + artists, ), ctx.meilisearch.post(`indexes/tracks/documents?primaryKey=id`, tracks), ]); diff --git a/apps/api/src/subscribers/user.ts b/apps/api/src/subscribers/user.ts index d03702aa..86a86496 100644 --- a/apps/api/src/subscribers/user.ts +++ b/apps/api/src/subscribers/user.ts @@ -1,5 +1,5 @@ import chalk from "chalk"; -import { Context } from "context"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import _ from "lodash"; import { StringCodec } from "nats"; @@ -23,7 +23,7 @@ export function onNewUser(ctx: Context) { await ctx.meilisearch.post( `/indexes/users/documents?primaryKey=id`, - results + results, ); } })(); diff --git a/apps/api/src/tracks/tracks.service.ts b/apps/api/src/tracks/tracks.service.ts index 96eb0ffb..e2f17197 100644 --- a/apps/api/src/tracks/tracks.service.ts +++ b/apps/api/src/tracks/tracks.service.ts @@ -1,13 +1,13 @@ -import { Agent } from "@atproto/api"; +import type { Agent } from "@atproto/api"; import { equals } from "@xata.io/client"; -import { Context } from "context"; +import type { Context } from "context"; import { createHash } from "crypto"; import { putAlbumRecord, putArtistRecord, putSongRecord, } from "nowplaying/nowplaying.service"; -import { Track } from "types/track"; +import type { Track } from "types/track"; export async function saveTrack(ctx: Context, track: Track, agent: Agent) { const existingTrack = await ctx.client.db.tracks @@ -16,10 +16,10 @@ export async function saveTrack(ctx: Context, track: Track, agent: Agent) { equals( createHash("sha256") .update( - `${track.title} - ${track.artist} - ${track.album}`.toLowerCase() + `${track.title} - ${track.artist} - ${track.album}`.toLowerCase(), ) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); @@ -36,8 +36,8 @@ export async function saveTrack(ctx: Context, track: Track, agent: Agent) { equals( createHash("sha256") .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); if (album) { @@ -54,8 +54,8 @@ export async function saveTrack(ctx: Context, track: Track, agent: Agent) { equals( createHash("sha256") .update(track.albumArtist.toLowerCase()) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); if (artist) { @@ -72,8 +72,8 @@ export async function saveTrack(ctx: Context, track: Track, agent: Agent) { equals( createHash("sha256") .update(track.albumArtist.toLocaleLowerCase()) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); @@ -88,8 +88,8 @@ export async function saveTrack(ctx: Context, track: Track, agent: Agent) { equals( createHash("sha256") .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) - .digest("hex") - ) + .digest("hex"), + ), ) .getFirst(); @@ -116,7 +116,7 @@ export async function saveTrack(ctx: Context, track: Track, agent: Agent) { if (!track_id || !album_id || !artist_id) { console.log( "Track not yet saved (uri not saved), retrying...", - tries + 1 + tries + 1, ); await new Promise((resolve) => setTimeout(resolve, 1000)); tries += 1; diff --git a/apps/api/src/users/app.ts b/apps/api/src/users/app.ts index 282b7f06..5a382c03 100644 --- a/apps/api/src/users/app.ts +++ b/apps/api/src/users/app.ts @@ -1,4 +1,4 @@ -import { BlobRef } from "@atproto/lexicon"; +import type { BlobRef } from "@atproto/lexicon"; import { equals } from "@xata.io/client"; import { ctx } from "context"; import { @@ -28,7 +28,7 @@ import { unlikeShout, } from "shouts/shouts.service"; import { shoutSchema } from "types/shout"; -import { Track } from "types/track"; +import type { Track } from "types/track"; import { dedupeTracksKeepLyrics } from "./utils"; const app = new Hono(); @@ -131,7 +131,7 @@ app.get("/:did/tracks", async (c) => { data.map((item) => ({ ...item, tags: [], - })) + })), ); }); @@ -161,7 +161,7 @@ app.get("/:did/playlists", async (c) => { results.map((x) => ({ ...x.playlists, trackCount: +x.trackCount, - })) + })), ); }); @@ -335,7 +335,7 @@ app.get("/:did/app.rocksky.album/:rkey", async (c) => { scrobbles: _.get(scrobbles.summaries, "0.total", 1), label: _.get(tracks, "0.track_id.label", ""), tracks: dedupeTracksKeepLyrics(tracks.map((track) => track.track_id)).sort( - (a, b) => a.track_number - b.track_number + (a, b) => a.track_number - b.track_number, ), tags: [], }); @@ -426,7 +426,7 @@ app.get("/:did/app.rocksky.artist/:rkey/tracks", async (c) => { ...R.omit(["xata_id"], item.track_id), id: item.track_id.xata_id, xata_version: item.xata_version, - })) + })), ); }); @@ -460,8 +460,8 @@ app.get("/:did/app.rocksky.artist/:rkey/albums", async (c) => { ...R.omit(["xata_id"], item.album_id), id: item.album_id.xata_id, xata_version: item.xata_version, - })) - ) + })), + ), ); }); @@ -491,11 +491,11 @@ app.get("/:did/app.rocksky.playlist/:rkey", async (c) => { .from(tables.playlistTracks) .leftJoin( tables.playlists, - eq(tables.playlistTracks.playlistId, tables.playlists.id) + eq(tables.playlistTracks.playlistId, tables.playlists.id), ) .leftJoin( tables.tracks, - eq(tables.playlistTracks.trackId, tables.tracks.id) + eq(tables.playlistTracks.trackId, tables.tracks.id), ) .where(eq(tables.playlists.uri, uri)) .groupBy( @@ -539,7 +539,7 @@ app.get("/:did/app.rocksky.playlist/:rkey", async (c) => { tables.playlists.picture, tables.playlists.spotifyLink, tables.playlists.tidalLink, - tables.playlists.appleMusicLink + tables.playlists.appleMusicLink, ) .orderBy(asc(tables.playlistTracks.createdAt)) .execute(); @@ -653,7 +653,7 @@ app.post("/:did/app.rocksky.artist/:rkey/shouts", async (c) => { parsed.data, `at://${did}/app.rocksky.artist/${rkey}`, user, - agent + agent, ); return c.json({}); }); @@ -698,7 +698,7 @@ app.post("/:did/app.rocksky.album/:rkey/shouts", async (c) => { parsed.data, `at://${did}/app.rocksky.album/${rkey}`, user, - agent + agent, ); return c.json({}); }); @@ -743,7 +743,7 @@ app.post("/:did/app.rocksky.song/:rkey/shouts", async (c) => { parsed.data, `at://${did}/app.rocksky.song/${rkey}`, user, - agent + agent, ); return c.json({}); @@ -789,7 +789,7 @@ app.post("/:did/app.rocksky.scrobble/:rkey/shouts", async (c) => { parsed.data, `at://${did}/app.rocksky.scrobble/${rkey}`, user, - agent + agent, ); return c.json({}); @@ -1038,7 +1038,7 @@ app.post("/:did/app.rocksky.shout/:rkey/replies", async (c) => { parsed.data, `at://${did}/app.rocksky.shout/${rkey}`, user, - agent + agent, ); return c.json({}); }); @@ -1103,7 +1103,7 @@ app.get("/:did/app.rocksky.artist/:rkey/shouts", async (c) => { .leftJoin(tables.artists, eq(tables.shouts.artistId, tables.artists.id)) .leftJoin( tables.shoutLikes, - eq(tables.shouts.id, tables.shoutLikes.shoutId) + eq(tables.shouts.id, tables.shoutLikes.shoutId), ) .where(eq(tables.artists.uri, `at://${did}/app.rocksky.artist/${rkey}`)) .groupBy( @@ -1116,7 +1116,7 @@ app.get("/:did/app.rocksky.artist/:rkey/shouts", async (c) => { tables.users.did, tables.users.handle, tables.users.displayName, - tables.users.avatar + tables.users.avatar, ) .orderBy(desc(tables.shouts.createdAt)) .execute(); @@ -1184,7 +1184,7 @@ app.get("/:did/app.rocksky.album/:rkey/shouts", async (c) => { .leftJoin(tables.albums, eq(tables.shouts.albumId, tables.albums.id)) .leftJoin( tables.shoutLikes, - eq(tables.shouts.id, tables.shoutLikes.shoutId) + eq(tables.shouts.id, tables.shoutLikes.shoutId), ) .where(eq(tables.albums.uri, `at://${did}/app.rocksky.album/${rkey}`)) .groupBy( @@ -1197,7 +1197,7 @@ app.get("/:did/app.rocksky.album/:rkey/shouts", async (c) => { tables.users.did, tables.users.handle, tables.users.displayName, - tables.users.avatar + tables.users.avatar, ) .orderBy(desc(tables.shouts.createdAt)) .execute(); @@ -1265,7 +1265,7 @@ app.get("/:did/app.rocksky.song/:rkey/shouts", async (c) => { .leftJoin(tables.tracks, eq(tables.shouts.trackId, tables.tracks.id)) .leftJoin( tables.shoutLikes, - eq(tables.shouts.id, tables.shoutLikes.shoutId) + eq(tables.shouts.id, tables.shoutLikes.shoutId), ) .where(eq(tables.tracks.uri, `at://${did}/app.rocksky.song/${rkey}`)) .groupBy( @@ -1278,7 +1278,7 @@ app.get("/:did/app.rocksky.song/:rkey/shouts", async (c) => { tables.users.did, tables.users.handle, tables.users.displayName, - tables.users.avatar + tables.users.avatar, ) .orderBy(desc(tables.shouts.createdAt)) .execute(); @@ -1345,11 +1345,11 @@ app.get("/:did/app.rocksky.scrobble/:rkey/shouts", async (c) => { .leftJoin(tables.users, eq(tables.shouts.authorId, tables.users.id)) .leftJoin( tables.scrobbles, - eq(tables.shouts.scrobbleId, tables.scrobbles.id) + eq(tables.shouts.scrobbleId, tables.scrobbles.id), ) .leftJoin( tables.shoutLikes, - eq(tables.shouts.id, tables.shoutLikes.shoutId) + eq(tables.shouts.id, tables.shoutLikes.shoutId), ) .where(eq(tables.scrobbles.uri, `at://${did}/app.rocksky.scrobble/${rkey}`)) .groupBy( @@ -1362,7 +1362,7 @@ app.get("/:did/app.rocksky.scrobble/:rkey/shouts", async (c) => { tables.users.did, tables.users.handle, tables.users.displayName, - tables.users.avatar + tables.users.avatar, ) .orderBy(desc(tables.shouts.createdAt)) .execute(); @@ -1437,12 +1437,12 @@ app.get("/:did/shouts", async (c) => { .leftJoin(tables.shouts, eq(tables.profileShouts.shoutId, tables.shouts.id)) .leftJoin( aliasedTable(tables.users, "authors"), - eq(tables.shouts.authorId, aliasedTable(tables.users, "authors").id) + eq(tables.shouts.authorId, aliasedTable(tables.users, "authors").id), ) .leftJoin(tables.users, eq(tables.profileShouts.userId, tables.users.id)) .leftJoin( tables.shoutLikes, - eq(tables.shouts.id, tables.shoutLikes.shoutId) + eq(tables.shouts.id, tables.shoutLikes.shoutId), ) .groupBy( tables.profileShouts.id, @@ -1461,7 +1461,7 @@ app.get("/:did/shouts", async (c) => { aliasedTable(tables.users, "authors").did, aliasedTable(tables.users, "authors").handle, aliasedTable(tables.users, "authors").displayName, - aliasedTable(tables.users, "authors").avatar + aliasedTable(tables.users, "authors").avatar, ) .orderBy(desc(tables.profileShouts.createdAt)) .execute(); diff --git a/apps/api/src/webscrobbler/app.ts b/apps/api/src/webscrobbler/app.ts index a3451437..a805cb78 100644 --- a/apps/api/src/webscrobbler/app.ts +++ b/apps/api/src/webscrobbler/app.ts @@ -90,7 +90,7 @@ app.put("/:id", async (c) => { uuid: id, user_id: user.xata_id, name: "webscrobbler", - } + }, ); return c.json(record); diff --git a/apps/api/src/websocket/handler.ts b/apps/api/src/websocket/handler.ts index dfeae35b..5dd6baef 100644 --- a/apps/api/src/websocket/handler.ts +++ b/apps/api/src/websocket/handler.ts @@ -2,7 +2,7 @@ import chalk from "chalk"; import { ctx } from "context"; import { createHash } from "crypto"; import { and, eq } from "drizzle-orm"; -import { Context } from "hono"; +import type { Context } from "hono"; import jwt from "jsonwebtoken"; import { env } from "lib/env"; import lovedTracks from "schema/loved-tracks"; @@ -70,7 +70,7 @@ function handleWebsocket(c: Context) { if (data.type === "track") { const sha256 = createHash("sha256") .update( - `${data.title} - ${data.artist} - ${data.album}`.toLowerCase() + `${data.title} - ${data.artist} - ${data.album}`.toLowerCase(), ) .digest("hex"); const [cachedTrack, cachedLikes] = await Promise.all([ @@ -93,7 +93,7 @@ function handleWebsocket(c: Context) { await ctx.redis.setEx( `likes:${did}:${sha256}`, 2, - JSON.stringify({ liked: data.liked }) + JSON.stringify({ liked: data.liked }), ); } @@ -113,7 +113,7 @@ function handleWebsocket(c: Context) { ...data, sha256, liked: data.liked, - }) + }), ); } else { const [track] = await ctx.db @@ -136,7 +136,7 @@ function handleWebsocket(c: Context) { albumUri: track.albumUri, artistUri: track.artistUri, liked: data.liked, - }) + }), ), ctx.redis.setEx( `nowplaying:${did}`, @@ -145,7 +145,7 @@ function handleWebsocket(c: Context) { ...data, sha256, liked: data.liked, - }) + }), ), ]); } @@ -154,7 +154,7 @@ function handleWebsocket(c: Context) { await ctx.redis.setEx( `nowplaying:${did}:status`, 3, - `${data.status}` + `${data.status}`, ); } @@ -163,7 +163,7 @@ function handleWebsocket(c: Context) { type: "message", data, device_id, - }) + }), ); } }); @@ -175,7 +175,7 @@ function handleWebsocket(c: Context) { ignoreExpiration: true, }); console.log( - `Control message: ${chalk.greenBright(type)}, ${chalk.greenBright(target)}, ${chalk.greenBright(action)}, ${chalk.greenBright(args)}, ${chalk.greenBright("***")}` + `Control message: ${chalk.greenBright(type)}, ${chalk.greenBright(target)}, ${chalk.greenBright(action)}, ${chalk.greenBright(args)}, ${chalk.greenBright("***")}`, ); // Handle control message const deviceId = userDevices[did]?.find((id) => id === target); @@ -184,7 +184,7 @@ function handleWebsocket(c: Context) { if (targetDevice) { targetDevice.send(JSON.stringify({ type, action, args })); console.log( - `Control message sent to device: ${chalk.greenBright(deviceId)}, ${chalk.greenBright(target)}` + `Control message sent to device: ${chalk.greenBright(deviceId)}, ${chalk.greenBright(target)}`, ); return; } @@ -196,7 +196,7 @@ function handleWebsocket(c: Context) { if (targetDevice) { targetDevice.send(JSON.stringify({ type, action, args })); console.log( - `Control message sent to all devices: ${chalk.greenBright(id)}, ${chalk.greenBright(target)}` + `Control message sent to all devices: ${chalk.greenBright(id)}, ${chalk.greenBright(target)}`, ); } }); @@ -208,7 +208,7 @@ function handleWebsocket(c: Context) { if (registerMessage.success) { const { type, clientName, token } = registerMessage.data; console.log( - `Register message: ${chalk.greenBright(type)}, ${chalk.greenBright(clientName)}, ${chalk.greenBright("****")}` + `Register message: ${chalk.greenBright(type)}, ${chalk.greenBright(clientName)}, ${chalk.greenBright("****")}`, ); // Handle register Message const { did } = jwt.verify(token, env.JWT_SECRET, { @@ -221,7 +221,7 @@ function handleWebsocket(c: Context) { deviceNames[deviceId] = clientName; userDevices[did] = [...(userDevices[did] || []), deviceId]; console.log( - `Device registered: ${chalk.greenBright(deviceId)}, ${chalk.greenBright(clientName)}` + `Device registered: ${chalk.greenBright(deviceId)}, ${chalk.greenBright(clientName)}`, ); // broadcast to all devices @@ -235,7 +235,7 @@ function handleWebsocket(c: Context) { type: "device_registered", deviceId, clientName, - }) + }), ); } }); @@ -266,7 +266,7 @@ function handleWebsocket(c: Context) { const clientName = deviceNames[deviceId]; delete deviceNames[deviceId]; console.log( - `Device name removed: ${chalk.redBright(deviceId)}, ${chalk.redBright(clientName)}` + `Device name removed: ${chalk.redBright(deviceId)}, ${chalk.redBright(clientName)}`, ); } }, diff --git a/apps/api/src/xata.ts b/apps/api/src/xata.ts index bae3cba7..bad314a6 100644 --- a/apps/api/src/xata.ts +++ b/apps/api/src/xata.ts @@ -4732,7 +4732,7 @@ export class XataClient extends DatabaseClient { } } -let instance: XataClient | undefined = undefined; +let instance: XataClient | undefined ; export const getXataClient = () => { if (instance) return instance; diff --git a/apps/api/src/xrpc/app/rocksky/actor/getActorAlbums.ts b/apps/api/src/xrpc/app/rocksky/actor/getActorAlbums.ts index 11dd3a36..09fef458 100644 --- a/apps/api/src/xrpc/app/rocksky/actor/getActorAlbums.ts +++ b/apps/api/src/xrpc/app/rocksky/actor/getActorAlbums.ts @@ -1,8 +1,8 @@ -import { Context } from "context"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/actor/getActorAlbums"; -import { AlbumViewBasic } from "lexicon/types/app/rocksky/album/defs"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/actor/getActorAlbums"; +import type { AlbumViewBasic } from "lexicon/types/app/rocksky/album/defs"; import { deepCamelCaseKeys } from "lib"; export default function (server: Server, ctx: Context) { @@ -16,7 +16,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ artists: [] }); - }) + }), ); server.app.rocksky.actor.getActorAlbums({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/actor/getActorArtists.ts b/apps/api/src/xrpc/app/rocksky/actor/getActorArtists.ts index 90162e67..cae45b10 100644 --- a/apps/api/src/xrpc/app/rocksky/actor/getActorArtists.ts +++ b/apps/api/src/xrpc/app/rocksky/actor/getActorArtists.ts @@ -1,8 +1,8 @@ -import { Context } from "context"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/actor/getActorArtists"; -import { ArtistViewBasic } from "lexicon/types/app/rocksky/artist/defs"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/actor/getActorArtists"; +import type { ArtistViewBasic } from "lexicon/types/app/rocksky/artist/defs"; import { deepCamelCaseKeys } from "lib"; export default function (server: Server, ctx: Context) { @@ -16,7 +16,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ artists: [] }); - }) + }), ); server.app.rocksky.actor.getActorArtists({ handler: async ({ params }) => { diff --git a/apps/api/src/xrpc/app/rocksky/actor/getActorLovedSongs.ts b/apps/api/src/xrpc/app/rocksky/actor/getActorLovedSongs.ts index d45e219a..c4d15cdc 100644 --- a/apps/api/src/xrpc/app/rocksky/actor/getActorLovedSongs.ts +++ b/apps/api/src/xrpc/app/rocksky/actor/getActorLovedSongs.ts @@ -1,11 +1,11 @@ -import { Context } from "context"; +import type { Context } from "context"; import { desc, eq, or } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/actor/getActorLovedSongs"; -import { SongViewBasic } from "lexicon/types/app/rocksky/song/defs"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/actor/getActorLovedSongs"; +import type { SongViewBasic } from "lexicon/types/app/rocksky/song/defs"; import tables from "schema"; -import { SelectTrack } from "schema/tracks"; +import type { SelectTrack } from "schema/tracks"; export default function (server: Server, ctx: Context) { const getActorLovedSongs = (params) => @@ -18,7 +18,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ tracks: [] }); - }) + }), ); server.app.rocksky.actor.getActorLovedSongs({ handler: async ({ params }) => { @@ -45,14 +45,14 @@ const retrieve = ({ .from(tables.lovedTracks) .leftJoin( tables.tracks, - eq(tables.lovedTracks.trackId, tables.tracks.id) + eq(tables.lovedTracks.trackId, tables.tracks.id), ) .leftJoin(tables.users, eq(tables.lovedTracks.userId, tables.users.id)) .where( or( eq(tables.users.did, params.did), - eq(tables.users.handle, params.did) - ) + eq(tables.users.handle, params.did), + ), ) .limit(params.limit ?? 10) .offset(params.offset ?? 0) @@ -62,14 +62,14 @@ const retrieve = ({ rows.map((row) => ({ ...row.tracks, createdAt: row.loved_tracks.createdAt, - })) + })), ), catch: (error) => new Error(`Failed to retrieve loved songs: ${error}`), }); }; const presentation = ( - data: SelectTrack[] + data: SelectTrack[], ): Effect.Effect<{ tracks: SongViewBasic[] }, never> => { return Effect.sync(() => ({ tracks: data.map((track) => ({ diff --git a/apps/api/src/xrpc/app/rocksky/actor/getActorPlaylists.ts b/apps/api/src/xrpc/app/rocksky/actor/getActorPlaylists.ts index e7d87f87..dde3a010 100644 --- a/apps/api/src/xrpc/app/rocksky/actor/getActorPlaylists.ts +++ b/apps/api/src/xrpc/app/rocksky/actor/getActorPlaylists.ts @@ -1,11 +1,11 @@ -import { Context } from "context"; +import type { Context } from "context"; import { eq, or, sql } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/actor/getActorPlaylists"; -import { PlaylistViewBasic } from "lexicon/types/app/rocksky/playlist/defs"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/actor/getActorPlaylists"; +import type { PlaylistViewBasic } from "lexicon/types/app/rocksky/playlist/defs"; import tables from "schema"; -import { SelectPlaylist } from "schema/playlists"; +import type { SelectPlaylist } from "schema/playlists"; export default function (server: Server, ctx: Context) { const getActorPlaylists = (params) => @@ -18,7 +18,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ playlists: [] }); - }) + }), ); server.app.rocksky.actor.getActorPlaylists({ handler: async ({ params }) => { @@ -55,8 +55,8 @@ const retrieve = ({ .where( or( eq(tables.users.did, params.did), - eq(tables.users.handle, params.did) - ) + eq(tables.users.handle, params.did), + ), ) .offset(params.offset) .limit(params.limit) @@ -71,14 +71,14 @@ const retrieve = ({ curatorName: row.users.displayName, curatorAvatarUrl: row.users.avatar, curatorHandle: row.users.handle, - })) + })), ), catch: (error) => new Error(`Failed to retrieve user playlists: ${error}`), }); }; const presentation = ( - playlists: Playlist[] + playlists: Playlist[], ): Effect.Effect<{ playlists: PlaylistViewBasic[] }, never> => { return Effect.sync(() => ({ playlists: playlists.map((playlist) => ({ diff --git a/apps/api/src/xrpc/app/rocksky/actor/getActorScrobbles.ts b/apps/api/src/xrpc/app/rocksky/actor/getActorScrobbles.ts index 12e3f359..85365422 100644 --- a/apps/api/src/xrpc/app/rocksky/actor/getActorScrobbles.ts +++ b/apps/api/src/xrpc/app/rocksky/actor/getActorScrobbles.ts @@ -1,8 +1,8 @@ -import { Context } from "context"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/actor/getActorScrobbles"; -import { ScrobbleViewBasic } from "lexicon/types/app/rocksky/scrobble/defs"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/actor/getActorScrobbles"; +import type { ScrobbleViewBasic } from "lexicon/types/app/rocksky/scrobble/defs"; import { deepCamelCaseKeys } from "lib"; export default function (server: Server, ctx: Context) { @@ -16,7 +16,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ scrobbles: [] }); - }) + }), ); server.app.rocksky.actor.getActorScrobbles({ handler: async ({ params }) => { diff --git a/apps/api/src/xrpc/app/rocksky/actor/getActorSongs.ts b/apps/api/src/xrpc/app/rocksky/actor/getActorSongs.ts index d2aabc08..f4c02197 100644 --- a/apps/api/src/xrpc/app/rocksky/actor/getActorSongs.ts +++ b/apps/api/src/xrpc/app/rocksky/actor/getActorSongs.ts @@ -1,8 +1,8 @@ -import { Context } from "context"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/actor/getActorSongs"; -import { SongViewBasic } from "lexicon/types/app/rocksky/song/defs"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/actor/getActorSongs"; +import type { SongViewBasic } from "lexicon/types/app/rocksky/song/defs"; import { deepCamelCaseKeys } from "lib"; export default function (server: Server, ctx: Context) { @@ -16,7 +16,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ tracks: [] }); - }) + }), ); server.app.rocksky.actor.getActorSongs({ handler: async ({ params }) => { diff --git a/apps/api/src/xrpc/app/rocksky/actor/getProfile.ts b/apps/api/src/xrpc/app/rocksky/actor/getProfile.ts index 12e310df..1909f574 100644 --- a/apps/api/src/xrpc/app/rocksky/actor/getProfile.ts +++ b/apps/api/src/xrpc/app/rocksky/actor/getProfile.ts @@ -1,21 +1,21 @@ -import { Agent, AtpAgent } from "@atproto/api"; -import { OutputSchema } from "@atproto/api/dist/client/types/com/atproto/repo/getRecord"; -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import { type Agent, AtpAgent } from "@atproto/api"; +import type { OutputSchema } from "@atproto/api/dist/client/types/com/atproto/repo/getRecord"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { ProfileViewDetailed } from "lexicon/types/app/rocksky/actor/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/actor/getProfile"; +import type { Server } from "lexicon"; +import type { ProfileViewDetailed } from "lexicon/types/app/rocksky/actor/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/actor/getProfile"; import { createAgent } from "lib/agent"; import _ from "lodash"; import * as R from "ramda"; import tables from "schema"; -import { SelectDropboxAccounts } from "schema/dropbox-accounts"; -import { SelectGoogleDriveAccounts } from "schema/google-drive-accounts"; -import { SelectSpotifyAccount } from "schema/spotify-accounts"; -import { SelectSpotifyToken } from "schema/spotify-tokens"; -import { SelectUser } from "schema/users"; +import type { SelectDropboxAccounts } from "schema/dropbox-accounts"; +import type { SelectGoogleDriveAccounts } from "schema/google-drive-accounts"; +import type { SelectSpotifyAccount } from "schema/spotify-accounts"; +import type { SelectSpotifyToken } from "schema/spotify-tokens"; +import type { SelectUser } from "schema/users"; export default function (server: Server, ctx: Context) { const getActorProfile = (params, auth: HandlerAuth) => @@ -33,7 +33,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.actor.getProfile({ auth: ctx.authVerifier, @@ -192,7 +192,7 @@ const retrieveProfile = ({ .from(tables.spotifyAccounts) .leftJoin( tables.users, - eq(tables.spotifyAccounts.userId, tables.users.id) + eq(tables.spotifyAccounts.userId, tables.users.id), ) .where(eq(tables.users.did, did)) .execute() @@ -202,7 +202,7 @@ const retrieveProfile = ({ .from(tables.spotifyTokens) .leftJoin( tables.users, - eq(tables.spotifyTokens.userId, tables.users.id) + eq(tables.spotifyTokens.userId, tables.users.id), ) .where(eq(tables.users.did, did)) .execute() @@ -212,7 +212,7 @@ const retrieveProfile = ({ .from(tables.googleDriveAccounts) .leftJoin( tables.users, - eq(tables.googleDriveAccounts.userId, tables.users.id) + eq(tables.googleDriveAccounts.userId, tables.users.id), ) .where(eq(tables.users.did, did)) .execute() @@ -222,7 +222,7 @@ const retrieveProfile = ({ .from(tables.dropboxAccounts) .leftJoin( tables.users, - eq(tables.dropboxAccounts.userId, tables.users.id) + eq(tables.dropboxAccounts.userId, tables.users.id), ) .where(eq(tables.users.did, did)) .execute() diff --git a/apps/api/src/xrpc/app/rocksky/album/getAlbum.ts b/apps/api/src/xrpc/app/rocksky/album/getAlbum.ts index 31c42a46..3e13392a 100644 --- a/apps/api/src/xrpc/app/rocksky/album/getAlbum.ts +++ b/apps/api/src/xrpc/app/rocksky/album/getAlbum.ts @@ -1,14 +1,14 @@ -import { Context } from "context"; +import type { Context } from "context"; import { asc, count, eq, or } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { AlbumViewDetailed } from "lexicon/types/app/rocksky/album/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/album/getAlbum"; +import type { Server } from "lexicon"; +import type { AlbumViewDetailed } from "lexicon/types/app/rocksky/album/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/album/getAlbum"; import { dedupeTracksKeepLyrics } from "lib"; import * as R from "ramda"; import tables from "schema"; -import { SelectAlbum } from "schema/albums"; -import { SelectTrack } from "schema/tracks"; +import type { SelectAlbum } from "schema/albums"; +import type { SelectTrack } from "schema/tracks"; export default function (server: Server, ctx: Context) { const getAlbum = (params) => @@ -21,7 +21,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.album.getAlbum({ handler: async ({ params }) => { @@ -42,13 +42,13 @@ const retrieve = ({ params, ctx }: { params: QueryParams; ctx: Context }) => { .from(tables.userAlbums) .leftJoin( tables.albums, - eq(tables.userAlbums.albumId, tables.albums.id) + eq(tables.userAlbums.albumId, tables.albums.id), ) .where( or( eq(tables.userAlbums.uri, params.uri), - eq(tables.albums.uri, params.uri) - ) + eq(tables.albums.uri, params.uri), + ), ) .execute() .then((rows) => rows[0]?.albums); @@ -59,12 +59,12 @@ const retrieve = ({ params, ctx }: { params: QueryParams; ctx: Context }) => { .from(tables.albumTracks) .leftJoin( tables.tracks, - eq(tables.albumTracks.trackId, tables.tracks.id) + eq(tables.albumTracks.trackId, tables.tracks.id), ) .where(eq(tables.albumTracks.albumId, album?.id)) .orderBy( asc(tables.tracks.discNumber), - asc(tables.tracks.trackNumber) + asc(tables.tracks.trackNumber), ) .execute() .then((rows) => rows.map((data) => data.tracks)) @@ -74,7 +74,7 @@ const retrieve = ({ params, ctx }: { params: QueryParams; ctx: Context }) => { ...R.omit(["lyrics"], track), createdAt: track.createdAt.toISOString(), updatedAt: track.updatedAt.toISOString(), - })) + })), ), ctx.db .select({ count: count() }) diff --git a/apps/api/src/xrpc/app/rocksky/album/getAlbumTracks.ts b/apps/api/src/xrpc/app/rocksky/album/getAlbumTracks.ts index a289abc7..0996c1eb 100644 --- a/apps/api/src/xrpc/app/rocksky/album/getAlbumTracks.ts +++ b/apps/api/src/xrpc/app/rocksky/album/getAlbumTracks.ts @@ -1,9 +1,9 @@ -import { Context } from "context"; +import type { Context } from "context"; import { asc, eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/album/getAlbumTracks"; -import { SongViewBasic } from "lexicon/types/app/rocksky/song/defs"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/album/getAlbumTracks"; +import type { SongViewBasic } from "lexicon/types/app/rocksky/song/defs"; import { dedupeTracksKeepLyrics } from "lib"; import * as R from "ramda"; import tables from "schema"; @@ -19,7 +19,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.album.getAlbumTracks({ handler: async ({ params }) => { @@ -40,15 +40,15 @@ const retrieve = ({ params, ctx }: { params: QueryParams; ctx: Context }) => { .from(tables.albumTracks) .leftJoin( tables.tracks, - eq(tables.albumTracks.trackId, tables.tracks.id) + eq(tables.albumTracks.trackId, tables.tracks.id), ) .leftJoin( tables.albums, - eq(tables.albumTracks.albumId, tables.albums.id) + eq(tables.albumTracks.albumId, tables.albums.id), ) .leftJoin( tables.userAlbums, - eq(tables.albums.id, tables.userAlbums.albumId) + eq(tables.albums.id, tables.userAlbums.albumId), ) .where(eq(tables.userAlbums.uri, params.uri)) .orderBy(asc(tables.tracks.discNumber), asc(tables.tracks.trackNumber)) @@ -60,14 +60,14 @@ const retrieve = ({ params, ctx }: { params: QueryParams; ctx: Context }) => { ...R.omit(["lyrics"], track), createdAt: track.createdAt.toISOString(), updatedAt: track.updatedAt.toISOString(), - })) + })), ), catch: (error) => new Error(`Failed to retrieve album tracks: ${error}`), }); }; const presentation = ( - tracks + tracks, ): Effect.Effect<{ tracks: SongViewBasic[] }, never> => { return Effect.sync(() => ({ tracks })); }; diff --git a/apps/api/src/xrpc/app/rocksky/album/getAlbums.ts b/apps/api/src/xrpc/app/rocksky/album/getAlbums.ts index 4e3e661e..d4cb17a3 100644 --- a/apps/api/src/xrpc/app/rocksky/album/getAlbums.ts +++ b/apps/api/src/xrpc/app/rocksky/album/getAlbums.ts @@ -1,8 +1,8 @@ -import { Context } from "context"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { AlbumViewBasic } from "lexicon/types/app/rocksky/album/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/album/getAlbums"; +import type { Server } from "lexicon"; +import type { AlbumViewBasic } from "lexicon/types/app/rocksky/album/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/album/getAlbums"; import { deepCamelCaseKeys } from "lib"; export default function (server: Server, ctx: Context) { @@ -16,7 +16,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ albums: [] }); - }) + }), ); server.app.rocksky.album.getAlbums({ handler: async ({ params }) => { diff --git a/apps/api/src/xrpc/app/rocksky/apikey/createApikey.ts b/apps/api/src/xrpc/app/rocksky/apikey/createApikey.ts index aef8dcec..dfceea12 100644 --- a/apps/api/src/xrpc/app/rocksky/apikey/createApikey.ts +++ b/apps/api/src/xrpc/app/rocksky/apikey/createApikey.ts @@ -1,9 +1,9 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { InputSchema } from "lexicon/types/app/rocksky/apikey/createApikey"; +import type { Server } from "lexicon"; +import type { InputSchema } from "lexicon/types/app/rocksky/apikey/createApikey"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -17,7 +17,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.apikey.createApikey({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/apikey/getApikeys.ts b/apps/api/src/xrpc/app/rocksky/apikey/getApikeys.ts index d29ceaff..b7cc4035 100644 --- a/apps/api/src/xrpc/app/rocksky/apikey/getApikeys.ts +++ b/apps/api/src/xrpc/app/rocksky/apikey/getApikeys.ts @@ -1,7 +1,7 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; +import type { Server } from "lexicon"; export default function (server: Server, ctx: Context) { const getApikeys = (params, auth: HandlerAuth) => @@ -14,7 +14,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.apikey.getApikeys({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/apikey/removeApikey.ts b/apps/api/src/xrpc/app/rocksky/apikey/removeApikey.ts index 7ae5b4cc..c086ce25 100644 --- a/apps/api/src/xrpc/app/rocksky/apikey/removeApikey.ts +++ b/apps/api/src/xrpc/app/rocksky/apikey/removeApikey.ts @@ -1,9 +1,9 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/apikey/removeApikey"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/apikey/removeApikey"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -17,7 +17,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.apikey.removeApikey({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/apikey/updateApikey.ts b/apps/api/src/xrpc/app/rocksky/apikey/updateApikey.ts index 2a8a6cb4..1093a163 100644 --- a/apps/api/src/xrpc/app/rocksky/apikey/updateApikey.ts +++ b/apps/api/src/xrpc/app/rocksky/apikey/updateApikey.ts @@ -1,8 +1,8 @@ -import { Context } from "context"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { InputSchema } from "lexicon/types/app/rocksky/apikey/updateApikey"; +import type { Server } from "lexicon"; +import type { InputSchema } from "lexicon/types/app/rocksky/apikey/updateApikey"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -16,7 +16,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.apikey.updateApikey({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/artist/getArtist.ts b/apps/api/src/xrpc/app/rocksky/artist/getArtist.ts index 457c3db5..49b40502 100644 --- a/apps/api/src/xrpc/app/rocksky/artist/getArtist.ts +++ b/apps/api/src/xrpc/app/rocksky/artist/getArtist.ts @@ -1,11 +1,11 @@ -import { Context } from "context"; +import type { Context } from "context"; import { count, eq, or } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { ArtistViewDetailed } from "lexicon/types/app/rocksky/artist/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/artist/getArtist"; +import type { Server } from "lexicon"; +import type { ArtistViewDetailed } from "lexicon/types/app/rocksky/artist/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/artist/getArtist"; import tables from "schema"; -import { SelectArtist } from "schema/artists"; +import type { SelectArtist } from "schema/artists"; export default function (server: Server, ctx: Context) { const getArtist = (params) => @@ -18,7 +18,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.artist.getArtist({ handler: async ({ params }) => { @@ -39,13 +39,13 @@ const retrieve = ({ params, ctx }: { params: QueryParams; ctx: Context }) => { .from(tables.userArtists) .leftJoin( tables.artists, - eq(tables.userArtists.artistId, tables.artists.id) + eq(tables.userArtists.artistId, tables.artists.id), ) .where( or( eq(tables.userArtists.uri, params.uri), - eq(tables.artists.uri, params.uri) - ) + eq(tables.artists.uri, params.uri), + ), ) .execute() .then(([row]) => row?.artists); diff --git a/apps/api/src/xrpc/app/rocksky/artist/getArtistAlbums.ts b/apps/api/src/xrpc/app/rocksky/artist/getArtistAlbums.ts index 28b03f14..43245eef 100644 --- a/apps/api/src/xrpc/app/rocksky/artist/getArtistAlbums.ts +++ b/apps/api/src/xrpc/app/rocksky/artist/getArtistAlbums.ts @@ -1,8 +1,8 @@ -import { Context } from "context"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { AlbumViewBasic } from "lexicon/types/app/rocksky/album/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/artist/getArtistAlbums"; +import type { Server } from "lexicon"; +import type { AlbumViewBasic } from "lexicon/types/app/rocksky/album/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/artist/getArtistAlbums"; import { deepCamelCaseKeys } from "lib"; export default function (server: Server, ctx: Context) { @@ -16,7 +16,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ albums: [] }); - }) + }), ); server.app.rocksky.artist.getArtistAlbums({ handler: async ({ params }) => { diff --git a/apps/api/src/xrpc/app/rocksky/artist/getArtistTracks.ts b/apps/api/src/xrpc/app/rocksky/artist/getArtistTracks.ts index d3cde319..94fb93e1 100644 --- a/apps/api/src/xrpc/app/rocksky/artist/getArtistTracks.ts +++ b/apps/api/src/xrpc/app/rocksky/artist/getArtistTracks.ts @@ -1,8 +1,8 @@ -import { Context } from "context"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/artist/getArtistTracks"; -import { SongViewBasic } from "lexicon/types/app/rocksky/song/defs"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/artist/getArtistTracks"; +import type { SongViewBasic } from "lexicon/types/app/rocksky/song/defs"; import { deepCamelCaseKeys } from "lib"; export default function (server: Server, ctx: Context) { @@ -16,7 +16,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ tracks: [] }); - }) + }), ); server.app.rocksky.artist.getArtistTracks({ handler: async ({ params }) => { diff --git a/apps/api/src/xrpc/app/rocksky/artist/getArtists.ts b/apps/api/src/xrpc/app/rocksky/artist/getArtists.ts index 4ac98e69..54687af3 100644 --- a/apps/api/src/xrpc/app/rocksky/artist/getArtists.ts +++ b/apps/api/src/xrpc/app/rocksky/artist/getArtists.ts @@ -1,8 +1,8 @@ -import { Context } from "context"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { ArtistViewBasic } from "lexicon/types/app/rocksky/artist/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/artist/getArtists"; +import type { Server } from "lexicon"; +import type { ArtistViewBasic } from "lexicon/types/app/rocksky/artist/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/artist/getArtists"; import { deepCamelCaseKeys } from "lib"; export default function (server: Server, ctx: Context) { @@ -16,7 +16,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ artists: [] }); - }) + }), ); server.app.rocksky.artist.getArtists({ handler: async ({ params }) => { diff --git a/apps/api/src/xrpc/app/rocksky/charts/getScrobblesChart.ts b/apps/api/src/xrpc/app/rocksky/charts/getScrobblesChart.ts index a76f4905..e8582ab5 100644 --- a/apps/api/src/xrpc/app/rocksky/charts/getScrobblesChart.ts +++ b/apps/api/src/xrpc/app/rocksky/charts/getScrobblesChart.ts @@ -1,9 +1,9 @@ -import { Context } from "context"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, Match, pipe } from "effect"; -import { Server } from "lexicon"; -import { ChartsView } from "lexicon/types/app/rocksky/charts/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/charts/getScrobblesChart"; +import type { Server } from "lexicon"; +import type { ChartsView } from "lexicon/types/app/rocksky/charts/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/charts/getScrobblesChart"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -17,7 +17,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ scrobbles: [] }); - }) + }), ); server.app.rocksky.charts.getScrobblesChart({ handler: async ({ params }) => { @@ -37,17 +37,17 @@ const retrieve = ({ params, ctx }: { params: QueryParams; ctx: Context }) => { Match.when({ did: (did) => !!did }, ({ did }) => ctx.analytics.post("library.getScrobblesPerDay", { user_did: did, - }) + }), ), Match.when({ artisturi: (uri) => !!uri }, ({ artisturi }) => ctx.analytics.post("library.getArtistScrobbles", { artist_id: artisturi, - }) + }), ), Match.when({ albumuri: (uri) => !!uri }, ({ albumuri }) => ctx.analytics.post("library.getAlbumScrobbles", { album_id: albumuri, - }) + }), ), Match.when( { songuri: (uri) => !!uri && uri.includes("app.rocksky.scrobble") }, @@ -57,7 +57,7 @@ const retrieve = ({ params, ctx }: { params: QueryParams; ctx: Context }) => { .from(tables.scrobbles) .leftJoin( tables.tracks, - eq(tables.scrobbles.trackId, tables.tracks.id) + eq(tables.scrobbles.trackId, tables.tracks.id), ) .where(eq(tables.scrobbles.uri, songuri)) .execute() @@ -65,17 +65,19 @@ const retrieve = ({ params, ctx }: { params: QueryParams; ctx: Context }) => { .then((uri) => ctx.analytics.post("library.getTrackScrobbles", { track_id: uri, - }) - ) + }), + ), ), Match.when( { songuri: (uri) => !!uri && !uri.includes("app.rocksky.scrobble") }, ({ songuri }) => ctx.analytics.post("library.getTrackScrobbles", { track_id: songuri, - }) + }), + ), + Match.orElse(() => + ctx.analytics.post("library.getScrobblesPerDay", {}), ), - Match.orElse(() => ctx.analytics.post("library.getScrobblesPerDay", {})) ); return match(params); diff --git a/apps/api/src/xrpc/app/rocksky/dropbox/downloadFile.ts b/apps/api/src/xrpc/app/rocksky/dropbox/downloadFile.ts index 7b64c1e6..b2c955f1 100644 --- a/apps/api/src/xrpc/app/rocksky/dropbox/downloadFile.ts +++ b/apps/api/src/xrpc/app/rocksky/dropbox/downloadFile.ts @@ -1,8 +1,8 @@ -import { Context } from "context"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/dropbox/downloadFile"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/dropbox/downloadFile"; import tables from "schema"; export default function (server: Server, ctx: Context) { diff --git a/apps/api/src/xrpc/app/rocksky/dropbox/getFiles.ts b/apps/api/src/xrpc/app/rocksky/dropbox/getFiles.ts index a857e864..3fca9087 100644 --- a/apps/api/src/xrpc/app/rocksky/dropbox/getFiles.ts +++ b/apps/api/src/xrpc/app/rocksky/dropbox/getFiles.ts @@ -1,10 +1,10 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { and, asc, eq, or } from "drizzle-orm"; import { alias } from "drizzle-orm/pg-core"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/dropbox/getFiles"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/dropbox/getFiles"; import _ from "lodash"; import * as R from "ramda"; import tables from "schema"; @@ -20,7 +20,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ files: [], directories: [] }); - }) + }), ); server.app.rocksky.dropbox.getFiles({ auth: ctx.authVerifier, @@ -53,12 +53,12 @@ const retrieve = ({ .from(tables.dropboxDirectories) .leftJoin( tables.dropbox, - eq(tables.dropbox.id, tables.dropboxDirectories.dropboxId) + eq(tables.dropbox.id, tables.dropboxDirectories.dropboxId), ) .leftJoin(tables.users, eq(tables.dropbox.userId, tables.users.id)) .leftJoin( parentAlias, - eq(parentAlias.id, tables.dropboxDirectories.parentId) + eq(parentAlias.id, tables.dropboxDirectories.parentId), ) .leftJoin(parentDirAlias, eq(parentDirAlias.id, parentAlias.parentId)) .where( @@ -67,11 +67,11 @@ const retrieve = ({ or( eq( parentAlias.path, - _.get(params, "at", "/Music").replace(/\/$/, "").trim() + _.get(params, "at", "/Music").replace(/\/$/, "").trim(), ), - eq(parentAlias.fileId, _.get(params, "at", "").trim()) - ) - ) + eq(parentAlias.fileId, _.get(params, "at", "").trim()), + ), + ), ) .orderBy(asc(tables.dropboxDirectories.name)) .execute(), @@ -80,12 +80,12 @@ const retrieve = ({ .from(tables.dropboxPaths) .leftJoin( parentAlias, - eq(parentAlias.id, tables.dropboxPaths.directoryId) + eq(parentAlias.id, tables.dropboxPaths.directoryId), ) .leftJoin(parentDirAlias, eq(parentDirAlias.id, parentAlias.parentId)) .leftJoin( tables.dropbox, - eq(tables.dropbox.id, tables.dropboxPaths.dropboxId) + eq(tables.dropbox.id, tables.dropboxPaths.dropboxId), ) .leftJoin(tables.users, eq(tables.dropbox.userId, tables.users.id)) .where( @@ -94,11 +94,11 @@ const retrieve = ({ or( eq( parentAlias.path, - _.get(params, "at", "/Music").replace(/\/$/, "").trim() + _.get(params, "at", "/Music").replace(/\/$/, "").trim(), ), - eq(parentAlias.fileId, _.get(params, "at", "").trim()) - ) - ) + eq(parentAlias.fileId, _.get(params, "at", "").trim()), + ), + ), ) .orderBy(asc(tables.dropboxPaths.name)) .execute(), @@ -112,16 +112,17 @@ const retrieve = ({ }; const presentation = ( - data: [Directories, Files] + data: [Directories, Files], ): Effect.Effect => { return Effect.sync(() => ({ directory: R.omit( ["createdAt", "updatedAt", "xataVersion"], - _.get(data, "0.0.parent", null) || _.get(data, "1.0.parent", null) + _.get(data, "0.0.parent", null) || _.get(data, "1.0.parent", null), ), parentDirectory: R.omit( ["createdAt", "updatedAt", "xataVersion"], - _.get(data, "0.0.parent_dir", null) || _.get(data, "1.0.parent_dir", null) + _.get(data, "0.0.parent_dir", null) || + _.get(data, "1.0.parent_dir", null), ), directories: data[0].map((item) => ({ id: item.dropbox_directories.id, diff --git a/apps/api/src/xrpc/app/rocksky/dropbox/getMetadata.ts b/apps/api/src/xrpc/app/rocksky/dropbox/getMetadata.ts index 3cb137cd..13ee22e6 100644 --- a/apps/api/src/xrpc/app/rocksky/dropbox/getMetadata.ts +++ b/apps/api/src/xrpc/app/rocksky/dropbox/getMetadata.ts @@ -1,9 +1,9 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/dropbox/getMetadata"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/dropbox/getMetadata"; import tables from "schema"; export default function (server: Server, ctx: Context) { diff --git a/apps/api/src/xrpc/app/rocksky/dropbox/getTemporaryLink.ts b/apps/api/src/xrpc/app/rocksky/dropbox/getTemporaryLink.ts index b4aeeb12..eb9636f8 100644 --- a/apps/api/src/xrpc/app/rocksky/dropbox/getTemporaryLink.ts +++ b/apps/api/src/xrpc/app/rocksky/dropbox/getTemporaryLink.ts @@ -1,9 +1,9 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/dropbox/getTemporaryLink"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/dropbox/getTemporaryLink"; import tables from "schema"; export default function (server: Server, ctx: Context) { diff --git a/apps/api/src/xrpc/app/rocksky/feed/getNowPlayings.ts b/apps/api/src/xrpc/app/rocksky/feed/getNowPlayings.ts index 1bf77c5e..bd884c69 100644 --- a/apps/api/src/xrpc/app/rocksky/feed/getNowPlayings.ts +++ b/apps/api/src/xrpc/app/rocksky/feed/getNowPlayings.ts @@ -1,8 +1,8 @@ -import { Context } from "context"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { NowPlayingView } from "lexicon/types/app/rocksky/feed/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/feed/getNowPlayings"; +import type { Server } from "lexicon"; +import type { NowPlayingView } from "lexicon/types/app/rocksky/feed/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/feed/getNowPlayings"; import { deepCamelCaseKeys } from "lib"; export default function (server: Server, ctx: Context) { @@ -16,7 +16,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.feed.getNowPlayings({ handler: async ({ params }) => { diff --git a/apps/api/src/xrpc/app/rocksky/feed/search.ts b/apps/api/src/xrpc/app/rocksky/feed/search.ts index eff06741..51e946e7 100644 --- a/apps/api/src/xrpc/app/rocksky/feed/search.ts +++ b/apps/api/src/xrpc/app/rocksky/feed/search.ts @@ -1,13 +1,13 @@ -import { Context } from "context"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { ProfileViewBasic } from "lexicon/types/app/rocksky/actor/defs"; -import { AlbumViewBasic } from "lexicon/types/app/rocksky/album/defs"; -import { ArtistViewBasic } from "lexicon/types/app/rocksky/artist/defs"; -import { SearchResultsView } from "lexicon/types/app/rocksky/feed/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/feed/search"; -import { PlaylistViewBasic } from "lexicon/types/app/rocksky/playlist/defs"; -import { SongViewBasic } from "lexicon/types/app/rocksky/song/defs"; +import type { Server } from "lexicon"; +import type { ProfileViewBasic } from "lexicon/types/app/rocksky/actor/defs"; +import type { AlbumViewBasic } from "lexicon/types/app/rocksky/album/defs"; +import type { ArtistViewBasic } from "lexicon/types/app/rocksky/artist/defs"; +import type { SearchResultsView } from "lexicon/types/app/rocksky/feed/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/feed/search"; +import type { PlaylistViewBasic } from "lexicon/types/app/rocksky/playlist/defs"; +import type { SongViewBasic } from "lexicon/types/app/rocksky/song/defs"; export default function (server: Server, ctx: Context) { const search = (params) => @@ -51,12 +51,12 @@ const retrieve = ({ params, ctx }: { params: QueryParams; ctx: Context }) => { }, ], }) - .then((res) => res.data) + .then((res) => res.data), ); }; const presentation = ( - results: SearchResults + results: SearchResults, ): Effect.Effect => { return Effect.succeed(results); }; diff --git a/apps/api/src/xrpc/app/rocksky/googledrive/downloadFile.ts b/apps/api/src/xrpc/app/rocksky/googledrive/downloadFile.ts index 607f00bd..2fb65a7b 100644 --- a/apps/api/src/xrpc/app/rocksky/googledrive/downloadFile.ts +++ b/apps/api/src/xrpc/app/rocksky/googledrive/downloadFile.ts @@ -1,5 +1,5 @@ -import { Context } from "context"; -import { Server } from "lexicon"; +import type { Context } from "context"; +import type { Server } from "lexicon"; export default function (server: Server, ctx: Context) { server.app.rocksky.googledrive.downloadFile({ diff --git a/apps/api/src/xrpc/app/rocksky/googledrive/getFile.ts b/apps/api/src/xrpc/app/rocksky/googledrive/getFile.ts index c286d9d9..79442631 100644 --- a/apps/api/src/xrpc/app/rocksky/googledrive/getFile.ts +++ b/apps/api/src/xrpc/app/rocksky/googledrive/getFile.ts @@ -1,6 +1,6 @@ -import { Context } from "context"; +import type { Context } from "context"; import { pipe } from "effect"; -import { Server } from "lexicon"; +import type { Server } from "lexicon"; export default function (server: Server, ctx: Context) { const getFile = (params) => pipe(params, retrieve, presentation); diff --git a/apps/api/src/xrpc/app/rocksky/googledrive/getFiles.ts b/apps/api/src/xrpc/app/rocksky/googledrive/getFiles.ts index e1a2306a..55680e8c 100644 --- a/apps/api/src/xrpc/app/rocksky/googledrive/getFiles.ts +++ b/apps/api/src/xrpc/app/rocksky/googledrive/getFiles.ts @@ -1,9 +1,9 @@ -import { Context } from "context"; +import type { Context } from "context"; import { and, asc, eq, or } from "drizzle-orm"; import { alias } from "drizzle-orm/pg-core"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/googledrive/getFiles"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/googledrive/getFiles"; import _ from "lodash"; import * as R from "ramda"; import tables from "schema"; @@ -19,7 +19,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ files: [], directories: [] }); - }) + }), ); server.app.rocksky.googledrive.getFiles({ auth: ctx.authVerifier, @@ -54,16 +54,16 @@ const retrieve = ({ tables.googleDrive, eq( tables.googleDrive.id, - tables.googleDriveDirectories.googleDriveId - ) + tables.googleDriveDirectories.googleDriveId, + ), ) .leftJoin( tables.users, - eq(tables.googleDrive.userId, tables.users.id) + eq(tables.googleDrive.userId, tables.users.id), ) .leftJoin( parentAlias, - eq(parentAlias.id, tables.googleDriveDirectories.parentId) + eq(parentAlias.id, tables.googleDriveDirectories.parentId), ) .leftJoin(parentDirAlias, eq(parentDirAlias.id, parentAlias.parentId)) .where( @@ -72,11 +72,11 @@ const retrieve = ({ or( eq( parentAlias.path, - _.get(params, "at", "/Music").replace(/\/$/, "").trim() + _.get(params, "at", "/Music").replace(/\/$/, "").trim(), ), - eq(parentAlias.fileId, _.get(params, "at", "").trim()) - ) - ) + eq(parentAlias.fileId, _.get(params, "at", "").trim()), + ), + ), ) .orderBy(asc(tables.googleDriveDirectories.name)) .execute(), @@ -85,16 +85,16 @@ const retrieve = ({ .from(tables.googleDrivePaths) .leftJoin( parentAlias, - eq(tables.googleDrivePaths.directoryId, parentAlias.id) + eq(tables.googleDrivePaths.directoryId, parentAlias.id), ) .leftJoin(parentDirAlias, eq(parentDirAlias.id, parentAlias.parentId)) .leftJoin( tables.googleDrive, - eq(tables.googleDrive.id, tables.googleDrivePaths.googleDriveId) + eq(tables.googleDrive.id, tables.googleDrivePaths.googleDriveId), ) .leftJoin( tables.users, - eq(tables.googleDrive.userId, tables.users.id) + eq(tables.googleDrive.userId, tables.users.id), ) .where( and( @@ -102,11 +102,11 @@ const retrieve = ({ or( eq( parentAlias.path, - _.get(params, "at", "/Music").replace(/\/$/, "").trim() + _.get(params, "at", "/Music").replace(/\/$/, "").trim(), ), - eq(parentAlias.fileId, _.get(params, "at", "").trim()) - ) - ) + eq(parentAlias.fileId, _.get(params, "at", "").trim()), + ), + ), ) .orderBy(asc(tables.googleDrivePaths.name)) .execute(), @@ -120,16 +120,17 @@ const retrieve = ({ }; const presentation = ( - data: [Directories, Files] + data: [Directories, Files], ): Effect.Effect => { return Effect.sync(() => ({ directory: R.omit( ["createdAt", "updatedAt", "xataVersion"], - _.get(data, "0.0.parent", null) || _.get(data, "1.0.parent", null) + _.get(data, "0.0.parent", null) || _.get(data, "1.0.parent", null), ), parentDirectory: R.omit( ["createdAt", "updatedAt"], - _.get(data, "0.0.parent_dir", null) || _.get(data, "1.0.parent_dir", null) + _.get(data, "0.0.parent_dir", null) || + _.get(data, "1.0.parent_dir", null), ), directories: data[0].map((item) => ({ id: item.google_drive_directories.id, diff --git a/apps/api/src/xrpc/app/rocksky/like/dislikeShout.ts b/apps/api/src/xrpc/app/rocksky/like/dislikeShout.ts index 75696dc5..cc083613 100644 --- a/apps/api/src/xrpc/app/rocksky/like/dislikeShout.ts +++ b/apps/api/src/xrpc/app/rocksky/like/dislikeShout.ts @@ -1,9 +1,9 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/like/dislikeShout"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/like/dislikeShout"; import tables from "schema"; export default function (server: Server, ctx: Context) { diff --git a/apps/api/src/xrpc/app/rocksky/like/dislikeSong.ts b/apps/api/src/xrpc/app/rocksky/like/dislikeSong.ts index ba1f8f02..1979e175 100644 --- a/apps/api/src/xrpc/app/rocksky/like/dislikeSong.ts +++ b/apps/api/src/xrpc/app/rocksky/like/dislikeSong.ts @@ -1,9 +1,9 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/like/dislikeSong"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/like/dislikeSong"; import tables from "schema"; export default function (server: Server, ctx: Context) { diff --git a/apps/api/src/xrpc/app/rocksky/like/likeShout.ts b/apps/api/src/xrpc/app/rocksky/like/likeShout.ts index e8950c76..6479c0a4 100644 --- a/apps/api/src/xrpc/app/rocksky/like/likeShout.ts +++ b/apps/api/src/xrpc/app/rocksky/like/likeShout.ts @@ -1,9 +1,9 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/like/likeShout"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/like/likeShout"; import tables from "schema"; export default function (server: Server, ctx: Context) { diff --git a/apps/api/src/xrpc/app/rocksky/like/likeSong.ts b/apps/api/src/xrpc/app/rocksky/like/likeSong.ts index b97dbf80..ec98b2d5 100644 --- a/apps/api/src/xrpc/app/rocksky/like/likeSong.ts +++ b/apps/api/src/xrpc/app/rocksky/like/likeSong.ts @@ -1,9 +1,9 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/like/likeSong"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/like/likeSong"; import tables from "schema"; export default function (server: Server, ctx: Context) { diff --git a/apps/api/src/xrpc/app/rocksky/player/addDirectoryToQueue.ts b/apps/api/src/xrpc/app/rocksky/player/addDirectoryToQueue.ts new file mode 100644 index 00000000..e69de29b diff --git a/apps/api/src/xrpc/app/rocksky/player/addItemsToQueue.ts b/apps/api/src/xrpc/app/rocksky/player/addItemsToQueue.ts index 446de9e6..52c1da4e 100644 --- a/apps/api/src/xrpc/app/rocksky/player/addItemsToQueue.ts +++ b/apps/api/src/xrpc/app/rocksky/player/addItemsToQueue.ts @@ -1,8 +1,11 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; +import { inArray } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/player/addItemsToQueue"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/player/addItemsToQueue"; +import * as R from "ramda"; +import tables from "schema"; export default function (server: Server, ctx: Context) { const addItemsToQueue = (params, auth: HandlerAuth) => @@ -19,7 +22,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.player.addItemsToQueue({ auth: ctx.authVerifier, @@ -40,10 +43,39 @@ const handleAddItemsToQueue = ({ }) => Effect.tryPromise({ try: async () => { + if (!did) { + throw new Error("Authentication required"); + } + await ctx.db.transaction(async (tx) => { // await tx.select().from(tables.queueTracks).execute(); // Logic to add items to the queue would go here - // await ctx.tracklist.post("/tracklist.addTrack"); + // verify items exist in googleDrivePaths + // items can starts with "gdrive://", "dropbox://" + // group items by prefix and query separately + const items = R.groupBy((item: string) => { + if (item.startsWith("gdrive://")) return "gdrive"; + if (item.startsWith("dropbox://")) return "dropbox"; + return "other"; + }, params.items); + + await Promise.all([ + tx + .select() + .from(tables.googleDrivePaths) + .where(inArray(tables.googleDrivePaths, items.gdrive || [])) + .execute(), + tx + .select() + .from(tables.dropboxPaths) + .where(inArray(tables.dropboxPaths, items.dropbox || [])) + .execute(), + ]); + const track_ids = []; + await ctx.tracklist.post("/tracklist.addTracks", { + did, + track_ids: params.items, + }); }); }, catch: (err) => { diff --git a/apps/api/src/xrpc/app/rocksky/player/getCurrentlyPlaying.ts b/apps/api/src/xrpc/app/rocksky/player/getCurrentlyPlaying.ts index dde8f572..b307ae44 100644 --- a/apps/api/src/xrpc/app/rocksky/player/getCurrentlyPlaying.ts +++ b/apps/api/src/xrpc/app/rocksky/player/getCurrentlyPlaying.ts @@ -1,9 +1,9 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/player/getCurrentlyPlaying"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/player/getCurrentlyPlaying"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -17,7 +17,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.player.getCurrentlyPlaying({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/player/getPlaybackQueue.ts b/apps/api/src/xrpc/app/rocksky/player/getPlaybackQueue.ts index 407ac280..cad77663 100644 --- a/apps/api/src/xrpc/app/rocksky/player/getPlaybackQueue.ts +++ b/apps/api/src/xrpc/app/rocksky/player/getPlaybackQueue.ts @@ -1,8 +1,8 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/player/getPlaybackQueue"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/player/getPlaybackQueue"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -20,7 +20,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.player.getPlaybackQueue({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/player/next.ts b/apps/api/src/xrpc/app/rocksky/player/next.ts index f07b3f31..f10e3af8 100644 --- a/apps/api/src/xrpc/app/rocksky/player/next.ts +++ b/apps/api/src/xrpc/app/rocksky/player/next.ts @@ -1,9 +1,9 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/player/next"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/player/next"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -17,7 +17,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.player.next({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/player/pause.ts b/apps/api/src/xrpc/app/rocksky/player/pause.ts index b0b1e2c2..ffcc0523 100644 --- a/apps/api/src/xrpc/app/rocksky/player/pause.ts +++ b/apps/api/src/xrpc/app/rocksky/player/pause.ts @@ -1,9 +1,9 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/player/pause"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/player/pause"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -17,7 +17,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.player.pause({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/player/play.ts b/apps/api/src/xrpc/app/rocksky/player/play.ts index 2407fdd4..ae21093c 100644 --- a/apps/api/src/xrpc/app/rocksky/player/play.ts +++ b/apps/api/src/xrpc/app/rocksky/player/play.ts @@ -1,9 +1,9 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/player/play"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/player/play"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -17,7 +17,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.player.play({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/player/playDirectory.ts b/apps/api/src/xrpc/app/rocksky/player/playDirectory.ts index b7f70780..a16f28dc 100644 --- a/apps/api/src/xrpc/app/rocksky/player/playDirectory.ts +++ b/apps/api/src/xrpc/app/rocksky/player/playDirectory.ts @@ -1,8 +1,8 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/player/playFile"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/player/playFile"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -20,7 +20,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.player.playDirectory({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/player/playFile.ts b/apps/api/src/xrpc/app/rocksky/player/playFile.ts index c4d03f31..2cc9ac13 100644 --- a/apps/api/src/xrpc/app/rocksky/player/playFile.ts +++ b/apps/api/src/xrpc/app/rocksky/player/playFile.ts @@ -1,8 +1,8 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/player/playFile"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/player/playFile"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -20,7 +20,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.player.playFile({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/player/previous.ts b/apps/api/src/xrpc/app/rocksky/player/previous.ts index a5ce7a3d..fe32f43b 100644 --- a/apps/api/src/xrpc/app/rocksky/player/previous.ts +++ b/apps/api/src/xrpc/app/rocksky/player/previous.ts @@ -1,9 +1,9 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/player/previous"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/player/previous"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -17,7 +17,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.player.previous({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/player/seek.ts b/apps/api/src/xrpc/app/rocksky/player/seek.ts index 3b25e3f9..44d63e53 100644 --- a/apps/api/src/xrpc/app/rocksky/player/seek.ts +++ b/apps/api/src/xrpc/app/rocksky/player/seek.ts @@ -1,9 +1,9 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/player/seek"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/player/seek"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -17,7 +17,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.player.seek({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/playlist/createPlaylist.ts b/apps/api/src/xrpc/app/rocksky/playlist/createPlaylist.ts index 9d048ef3..3cd92a3a 100644 --- a/apps/api/src/xrpc/app/rocksky/playlist/createPlaylist.ts +++ b/apps/api/src/xrpc/app/rocksky/playlist/createPlaylist.ts @@ -1,8 +1,8 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/playlist/createPlaylist"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/playlist/createPlaylist"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -20,7 +20,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.playlist.createPlaylist({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/playlist/getPlaylist.ts b/apps/api/src/xrpc/app/rocksky/playlist/getPlaylist.ts index 282eb1f9..1f5389c4 100644 --- a/apps/api/src/xrpc/app/rocksky/playlist/getPlaylist.ts +++ b/apps/api/src/xrpc/app/rocksky/playlist/getPlaylist.ts @@ -1,14 +1,14 @@ -import { Context } from "context"; +import type { Context } from "context"; import { asc, eq, sql } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { PlaylistViewDetailed } from "lexicon/types/app/rocksky/playlist/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/playlist/getPlaylist"; +import type { Server } from "lexicon"; +import type { PlaylistViewDetailed } from "lexicon/types/app/rocksky/playlist/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/playlist/getPlaylist"; import * as R from "ramda"; import tables from "schema"; -import { SelectPlaylist } from "schema/playlists"; -import { SelectTrack } from "schema/tracks"; -import { SelectUser } from "schema/users"; +import type { SelectPlaylist } from "schema/playlists"; +import type { SelectTrack } from "schema/tracks"; +import type { SelectUser } from "schema/users"; export default function (server: Server, ctx: Context) { const getPlaylist = (params) => @@ -21,7 +21,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.playlist.getPlaylist({ handler: async ({ params }) => { @@ -57,11 +57,11 @@ const retrieve = ({ .from(tables.userPlaylists) .leftJoin( tables.playlists, - eq(tables.userPlaylists.playlistId, tables.playlists.id) + eq(tables.userPlaylists.playlistId, tables.playlists.id), ) .leftJoin( tables.users, - eq(tables.userPlaylists.userId, tables.users.id) + eq(tables.userPlaylists.userId, tables.users.id), ) .where(eq(tables.playlists.uri, params.uri)) .execute() @@ -71,11 +71,11 @@ const retrieve = ({ .from(tables.playlistTracks) .leftJoin( tables.tracks, - eq(tables.playlistTracks.trackId, tables.tracks.id) + eq(tables.playlistTracks.trackId, tables.tracks.id), ) .leftJoin( tables.playlists, - eq(tables.playlistTracks.playlistId, tables.playlists.id) + eq(tables.playlistTracks.playlistId, tables.playlists.id), ) .where(eq(tables.playlists.uri, params.uri)) .orderBy(asc(tables.playlistTracks.createdAt)) diff --git a/apps/api/src/xrpc/app/rocksky/playlist/getPlaylists.ts b/apps/api/src/xrpc/app/rocksky/playlist/getPlaylists.ts index 3851fd11..86c183f5 100644 --- a/apps/api/src/xrpc/app/rocksky/playlist/getPlaylists.ts +++ b/apps/api/src/xrpc/app/rocksky/playlist/getPlaylists.ts @@ -1,13 +1,13 @@ -import { Context } from "context"; +import type { Context } from "context"; import { desc, eq, sql } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { PlaylistViewBasic } from "lexicon/types/app/rocksky/playlist/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/playlist/getPlaylists"; +import type { Server } from "lexicon"; +import type { PlaylistViewBasic } from "lexicon/types/app/rocksky/playlist/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/playlist/getPlaylists"; import * as R from "ramda"; import tables from "schema"; -import { SelectPlaylist } from "schema/playlists"; -import { SelectUser } from "schema/users"; +import type { SelectPlaylist } from "schema/playlists"; +import type { SelectUser } from "schema/users"; export default function (server: Server, ctx: Context) { const getPlaylists = (params) => @@ -20,7 +20,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ playlists: [] }); - }) + }), ); server.app.rocksky.playlist.getPlaylists({ handler: async ({ params }) => { @@ -55,11 +55,11 @@ const retrieve = ({ .from(tables.userPlaylists) .leftJoin( tables.playlists, - eq(tables.userPlaylists.playlistId, tables.playlists.id) + eq(tables.userPlaylists.playlistId, tables.playlists.id), ) .leftJoin( tables.users, - eq(tables.userPlaylists.userId, tables.users.id) + eq(tables.userPlaylists.userId, tables.users.id), ) .orderBy(desc(tables.playlists.createdAt)) .limit(params.limit || 20) @@ -70,7 +70,7 @@ const retrieve = ({ }; const presentation = ( - data: Playlists + data: Playlists, ): Effect.Effect<{ playlists: PlaylistViewBasic[] }, never> => { return Effect.sync(() => ({ playlists: data.map((playlist) => ({ diff --git a/apps/api/src/xrpc/app/rocksky/playlist/insertDirectory.ts b/apps/api/src/xrpc/app/rocksky/playlist/insertDirectory.ts index 33e9f9fe..7521952d 100644 --- a/apps/api/src/xrpc/app/rocksky/playlist/insertDirectory.ts +++ b/apps/api/src/xrpc/app/rocksky/playlist/insertDirectory.ts @@ -1,8 +1,8 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/playlist/insertDirectory"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/playlist/insertDirectory"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -20,7 +20,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.playlist.insertDirectory({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/playlist/insertFiles.ts b/apps/api/src/xrpc/app/rocksky/playlist/insertFiles.ts index 705b8e92..d61c0aa7 100644 --- a/apps/api/src/xrpc/app/rocksky/playlist/insertFiles.ts +++ b/apps/api/src/xrpc/app/rocksky/playlist/insertFiles.ts @@ -1,8 +1,8 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/playlist/insertFiles"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/playlist/insertFiles"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -20,7 +20,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.playlist.insertFiles({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/playlist/removePlaylist.ts b/apps/api/src/xrpc/app/rocksky/playlist/removePlaylist.ts index ac3ea04a..aba136a8 100644 --- a/apps/api/src/xrpc/app/rocksky/playlist/removePlaylist.ts +++ b/apps/api/src/xrpc/app/rocksky/playlist/removePlaylist.ts @@ -1,8 +1,8 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/playlist/removePlaylist"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/playlist/removePlaylist"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -20,7 +20,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.playlist.removePlaylist({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/playlist/startPlaylist.ts b/apps/api/src/xrpc/app/rocksky/playlist/startPlaylist.ts index 6f15836c..6a49a774 100644 --- a/apps/api/src/xrpc/app/rocksky/playlist/startPlaylist.ts +++ b/apps/api/src/xrpc/app/rocksky/playlist/startPlaylist.ts @@ -1,8 +1,8 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/playlist/startPlaylist"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/playlist/startPlaylist"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -20,7 +20,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.playlist.startPlaylist({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/scrobble/createScrobble.ts b/apps/api/src/xrpc/app/rocksky/scrobble/createScrobble.ts index 81cde6e9..72aa62b7 100644 --- a/apps/api/src/xrpc/app/rocksky/scrobble/createScrobble.ts +++ b/apps/api/src/xrpc/app/rocksky/scrobble/createScrobble.ts @@ -38,9 +38,9 @@ export default function (server: Server, ctx: Context) { pipe( scrobbleTrack(ctx, track, agent, did), Effect.tap(() => - Effect.logInfo(`Scrobble created for ${chalk.cyan(track.title)}`) - ) - ) + Effect.logInfo(`Scrobble created for ${chalk.cyan(track.title)}`), + ), + ), ), Effect.flatMap(presentation), Effect.retry({ times: 3 }), @@ -48,7 +48,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.scrobble.createScrobble({ auth: ctx.authVerifier, @@ -82,11 +82,11 @@ const withAgent = ({ ctx, did, input, - })) + })), ), Match.orElse(() => { throw new Error("Authentication required to create a scrobble"); - }) + }), ), catch: (error) => new Error(`Failed to create agent: ${error}`), }); @@ -138,23 +138,23 @@ const uploadImage = (url: string, agent: Agent) => Effect.flatMap(([imageBuffer, options]) => pipe( Effect.tryPromise(() => agent.uploadBlob(imageBuffer, options)), - Effect.map((uploadResponse) => uploadResponse.data.blob) - ) + Effect.map((uploadResponse) => uploadResponse.data.blob), + ), ), - Effect.catchAll(() => Effect.succeed(undefined as BlobRef | undefined)) + Effect.catchAll(() => Effect.succeed(undefined as BlobRef | undefined)), ); const putRecord = ( agent: Agent, collection: string, record: T, - validate: (record: T) => { success: boolean } + validate: (record: T) => { success: boolean }, ) => pipe( Effect.succeed(record), Effect.filterOrFail( (rec) => validate(rec).success, - () => new Error("Invalid record") + () => new Error("Invalid record"), ), Effect.flatMap(() => pipe( @@ -167,19 +167,19 @@ const putRecord = ( rkey, record, validate: false, - }) - ) + }), + ), ), Effect.tap((res) => - Effect.logInfo(`Record created at ${res.data.uri}`) + Effect.logInfo(`Record created at ${res.data.uri}`), ), - Effect.map((res) => res.data.uri) - ) + Effect.map((res) => res.data.uri), + ), ), Effect.catchAll((error) => { console.error(`Error creating ${collection} record`, error); return Effect.succeed(null); - }) + }), ); const putArtistRecord = (track: Track, agent: Agent) => @@ -194,8 +194,8 @@ const putArtistRecord = (track: Track, agent: Agent) => picture, })), Effect.flatMap((record) => - putRecord(agent, "app.rocksky.artist", record, Artist.validateRecord) - ) + putRecord(agent, "app.rocksky.artist", record, Artist.validateRecord), + ), ); const putAlbumRecord = (track: Track, agent: Agent) => @@ -203,9 +203,9 @@ const putAlbumRecord = (track: Track, agent: Agent) => Match.value(track.albumArt).pipe( Match.when( (url) => !!url, - (url) => uploadImage(url, agent) + (url) => uploadImage(url, agent), ), - Match.orElse(() => Effect.succeed(undefined as BlobRef | undefined)) + Match.orElse(() => Effect.succeed(undefined as BlobRef | undefined)), ), Effect.map((albumArt) => ({ $type: "app.rocksky.album", @@ -219,8 +219,8 @@ const putAlbumRecord = (track: Track, agent: Agent) => albumArt, })), Effect.flatMap((record) => - putRecord(agent, "app.rocksky.album", record, Album.validateRecord) - ) + putRecord(agent, "app.rocksky.album", record, Album.validateRecord), + ), ); const putSongRecord = (track: Track, agent: Agent) => @@ -228,9 +228,9 @@ const putSongRecord = (track: Track, agent: Agent) => Match.value(track.albumArt).pipe( Match.when( (url) => !!url, - (url) => uploadImage(url, agent) + (url) => uploadImage(url, agent), ), - Match.orElse(() => Effect.succeed(undefined as BlobRef | undefined)) + Match.orElse(() => Effect.succeed(undefined as BlobRef | undefined)), ), Effect.map((albumArt) => ({ $type: "app.rocksky.song", @@ -253,8 +253,8 @@ const putSongRecord = (track: Track, agent: Agent) => spotifyLink: track.spotifyLink ?? undefined, })), Effect.flatMap((record) => - putRecord(agent, "app.rocksky.song", record, Song.validateRecord) - ) + putRecord(agent, "app.rocksky.song", record, Song.validateRecord), + ), ); const putScrobbleRecord = (track: Track, agent: Agent) => @@ -262,9 +262,9 @@ const putScrobbleRecord = (track: Track, agent: Agent) => Match.value(track.albumArt).pipe( Match.when( (url) => !!url, - (url) => uploadImage(url, agent) + (url) => uploadImage(url, agent), ), - Match.orElse(() => Effect.succeed(undefined as BlobRef | undefined)) + Match.orElse(() => Effect.succeed(undefined as BlobRef | undefined)), ), Effect.map((albumArt) => ({ $type: "app.rocksky.scrobble", @@ -289,8 +289,8 @@ const putScrobbleRecord = (track: Track, agent: Agent) => spotifyLink: track.spotifyLink ?? undefined, })), Effect.flatMap((record) => - putRecord(agent, "app.rocksky.scrobble", record, Scrobble.validateRecord) - ) + putRecord(agent, "app.rocksky.scrobble", record, Scrobble.validateRecord), + ), ); const getScrobble = ({ ctx, id }: { ctx: Context; id: string }) => @@ -302,12 +302,12 @@ const getScrobble = ({ ctx, id }: { ctx: Context; id: string }) => .leftJoin(tables.albums, eq(tables.albums.id, tables.scrobbles.albumId)) .leftJoin( tables.artists, - eq(tables.artists.id, tables.scrobbles.artistId) + eq(tables.artists.id, tables.scrobbles.artistId), ) .leftJoin(tables.users, eq(tables.users.id, tables.scrobbles.userId)) .where(eq(tables.scrobbles.id, id)) .execute() - .then(([row]) => row) + .then(([row]) => row), ); const getUserAlbum = ( @@ -317,7 +317,7 @@ const getUserAlbum = ( artists: SelectArtist; users: SelectUser; tracks: SelectTrack; - } + }, ) => Effect.tryPromise(() => ctx.db @@ -325,7 +325,7 @@ const getUserAlbum = ( .from(tables.userAlbums) .where(eq(tables.userAlbums.albumId, scrobble.albums.id)) .execute() - .then(([row]) => row) + .then(([row]) => row), ); const getUserArtist = ( @@ -335,7 +335,7 @@ const getUserArtist = ( artists: SelectArtist; users: SelectUser; tracks: SelectTrack; - } + }, ) => Effect.tryPromise(() => ctx.db @@ -343,7 +343,7 @@ const getUserArtist = ( .from(tables.userArtists) .where(eq(tables.userArtists.id, scrobble.artists.id)) .execute() - .then(([row]) => row) + .then(([row]) => row), ); const getUserTrack = ( @@ -353,7 +353,7 @@ const getUserTrack = ( artists: SelectArtist; users: SelectUser; tracks: SelectTrack; - } + }, ) => Effect.tryPromise(() => ctx.db @@ -361,7 +361,7 @@ const getUserTrack = ( .from(tables.userTracks) .where(eq(tables.userTracks.id, scrobble.tracks.id)) .execute() - .then(([row]) => row) + .then(([row]) => row), ); const getAlbumTrack = ( @@ -371,7 +371,7 @@ const getAlbumTrack = ( artists: SelectArtist; users: SelectUser; tracks: SelectTrack; - } + }, ) => Effect.tryPromise(() => ctx.db @@ -379,7 +379,7 @@ const getAlbumTrack = ( .from(tables.albumTracks) .where(eq(tables.albumTracks.trackId, scrobble.tracks.id)) .execute() - .then(([row]) => row) + .then(([row]) => row), ); const getArtistTrack = ( @@ -389,7 +389,7 @@ const getArtistTrack = ( artists: SelectArtist; users: SelectUser; tracks: SelectTrack; - } + }, ) => Effect.tryPromise(() => ctx.db @@ -397,7 +397,7 @@ const getArtistTrack = ( .from(tables.artistTracks) .where(eq(tables.artistTracks.trackId, scrobble.tracks.id)) .execute() - .then(([row]) => row) + .then(([row]) => row), ); const getArtistAlbum = ( @@ -407,7 +407,7 @@ const getArtistAlbum = ( artists: SelectArtist; users: SelectUser; tracks: SelectTrack; - } + }, ) => Effect.tryPromise(() => ctx.db @@ -416,10 +416,10 @@ const getArtistAlbum = ( .where( and( eq(tables.artistAlbums.albumId, scrobble.albums.id), - eq(tables.artistAlbums.artistId, scrobble.artists.id) - ) + eq(tables.artistAlbums.artistId, scrobble.artists.id), + ), ) - .then(([row]) => row) + .then(([row]) => row), ); const createUserArtist = ( @@ -429,7 +429,7 @@ const createUserArtist = ( artists: SelectArtist; users: SelectUser; tracks: SelectTrack; - } + }, ) => pipe( Effect.tryPromise(() => @@ -441,7 +441,7 @@ const createUserArtist = ( uri: scrobble.artists.uri, scrobbles: 1, } as InsertUserArtist) - .execute() + .execute(), ), Effect.flatMap(() => Effect.tryPromise(() => @@ -450,9 +450,9 @@ const createUserArtist = ( .from(tables.userArtists) .where(eq(tables.userArtists.artistId, scrobble.artists.id)) .execute() - .then(([row]) => row) - ) - ) + .then(([row]) => row), + ), + ), ); const createUserAlbum = ( @@ -462,7 +462,7 @@ const createUserAlbum = ( artists: SelectArtist; users: SelectUser; tracks: SelectTrack; - } + }, ) => pipe( Effect.tryPromise(() => @@ -474,7 +474,7 @@ const createUserAlbum = ( uri: scrobble.albums.uri, scrobbles: 1, } as InsertUserAlbum) - .execute() + .execute(), ), Effect.flatMap(() => Effect.tryPromise(() => @@ -483,9 +483,9 @@ const createUserAlbum = ( .from(tables.userAlbums) .where(eq(tables.userAlbums.albumId, scrobble.albums.id)) .execute() - .then(([row]) => row) - ) - ) + .then(([row]) => row), + ), + ), ); const createUserTrack = ( @@ -495,7 +495,7 @@ const createUserTrack = ( artists: SelectArtist; users: SelectUser; tracks: SelectTrack; - } + }, ) => pipe( Effect.tryPromise(() => @@ -507,7 +507,7 @@ const createUserTrack = ( uri: scrobble.tracks.uri, scrobbles: 1, } as InsertUserTrack) - .execute() + .execute(), ), Effect.flatMap(() => Effect.tryPromise(() => @@ -515,9 +515,9 @@ const createUserTrack = ( .select() .from(tables.userTracks) .where(eq(tables.userTracks.trackId, scrobble.tracks.id)) - .then(([row]) => row) - ) - ) + .then(([row]) => row), + ), + ), ); const publishScrobble = (ctx: Context, id: string) => @@ -688,50 +688,50 @@ const publishScrobble = (ctx: Context, id: string) => xata_updatedat: artistAlbum.updatedAt.toISOString(), xata_version: artistAlbum.xataVersion, }, - }) - ) - ) - ) - ) + }), + ), + ), + ), + ), ), Effect.flatMap((data) => Effect.try(() => ctx.nc.publish( "rocksky.scrobble", Buffer.from( - JSON.stringify(data).replaceAll("sha_256", "sha256") - ) - ) - ) - ) - ) - ) - ) - ) + JSON.stringify(data).replaceAll("sha_256", "sha256"), + ), + ), + ), + ), + ), + ), + ), + ), ); const computeTrackHash = (track: Track): Effect.Effect => Effect.succeed( createHash("sha256") .update(`${track.title} - ${track.artist} - ${track.album}`.toLowerCase()) - .digest("hex") + .digest("hex"), ); const computeAlbumHash = (track: Track): Effect.Effect => Effect.succeed( createHash("sha256") .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) - .digest("hex") + .digest("hex"), ); const computeArtistHash = (track: Track): Effect.Effect => Effect.succeed( - createHash("sha256").update(track.albumArtist.toLowerCase()).digest("hex") + createHash("sha256").update(track.albumArtist.toLowerCase()).digest("hex"), ); const fetchExistingTrack = ( ctx: Context, - trackHash: string + trackHash: string, ): Effect.Effect => Effect.tryPromise(() => ctx.db @@ -739,14 +739,14 @@ const fetchExistingTrack = ( .from(tables.tracks) .where(eq(tables.tracks.sha256, trackHash)) .execute() - .then(([row]) => row) + .then(([row]) => row), ); // Update track metadata (album_uri and artist_uri) const updateTrackMetadata = ( ctx: Context, track: Track, - trackRecord: SelectTrack + trackRecord: SelectTrack, ) => pipe( Effect.succeed(trackRecord), @@ -761,8 +761,8 @@ const updateTrackMetadata = ( .from(tables.albums) .where(eq(tables.albums.sha256, albumHash)) .execute() - .then(([row]) => row) - ) + .then(([row]) => row), + ), ), Effect.flatMap((album) => album @@ -773,12 +773,12 @@ const updateTrackMetadata = ( albumUri: album.uri, }) .where(eq(tables.tracks.id, trackRecord.id)) - .execute() + .execute(), ) - : Effect.succeed(undefined) - ) + : Effect.succeed(undefined), + ), ) - : Effect.succeed(undefined) + : Effect.succeed(undefined), ), Effect.tap((trackRecord) => !trackRecord.artistUri @@ -791,8 +791,8 @@ const updateTrackMetadata = ( .from(tables.artists) .where(eq(tables.artists.sha256, artistHash)) .execute() - .then(([row]) => row) - ) + .then(([row]) => row), + ), ), Effect.flatMap((artist) => artist @@ -803,13 +803,13 @@ const updateTrackMetadata = ( artistUri: artist.uri, }) .where(eq(tables.tracks.id, trackRecord.id)) - .execute() + .execute(), ) - : Effect.succeed(undefined) - ) + : Effect.succeed(undefined), + ), ) - : Effect.succeed(undefined) - ) + : Effect.succeed(undefined), + ), ); // Ensure track exists or create it @@ -818,7 +818,7 @@ const ensureTrack = ( track: Track, agent: Agent, userDid: string, - existingTrack: SelectTrack | undefined + existingTrack: SelectTrack | undefined, ) => pipe( Effect.succeed(existingTrack), @@ -826,10 +826,10 @@ const ensureTrack = ( Match.value(trackOpt).pipe( Match.when( (value) => !!value, - () => updateTrackMetadata(ctx, track, trackOpt) + () => updateTrackMetadata(ctx, track, trackOpt), ), - Match.orElse(() => Effect.succeed(undefined)) - ) + Match.orElse(() => Effect.succeed(undefined)), + ), ), Effect.flatMap((trackOpt) => pipe( @@ -839,29 +839,29 @@ const ensureTrack = ( .from(tables.userTracks) .leftJoin( tables.tracks, - eq(tables.userTracks.trackId, tables.tracks.id) + eq(tables.userTracks.trackId, tables.tracks.id), ) .leftJoin( tables.users, - eq(tables.userTracks.userId, tables.users.id) + eq(tables.userTracks.userId, tables.users.id), ) .where( and( eq(tables.tracks.id, trackOpt?.id), - eq(tables.users.did, userDid) - ) + eq(tables.users.did, userDid), + ), ) .execute() - .then(([row]) => row.user_tracks) + .then(([row]) => row.user_tracks), ), Effect.flatMap((userTrack) => Option.isNone(Option.fromNullable(userTrack)) || !userTrack?.uri?.includes(userDid) ? putSongRecord(track, agent) - : Effect.succeed(null) - ) - ) - ) + : Effect.succeed(null), + ), + ), + ), ); // Ensure album exists or create it @@ -869,7 +869,7 @@ const ensureAlbum = ( ctx: Context, track: Track, agent: Agent, - userDid: string + userDid: string, ) => pipe( computeAlbumHash(track), @@ -880,8 +880,8 @@ const ensureAlbum = ( .from(tables.albums) .where(eq(tables.albums.sha256, albumHash)) .execute() - .then(([row]) => row) - ) + .then(([row]) => row), + ), ), Effect.flatMap((existingAlbum) => pipe( @@ -893,31 +893,31 @@ const ensureAlbum = ( .from(tables.userAlbums) .leftJoin( tables.albums, - eq(tables.userAlbums.albumId, tables.albums.id) + eq(tables.userAlbums.albumId, tables.albums.id), ) .leftJoin( tables.users, - eq(tables.userAlbums.userId, tables.users.id) + eq(tables.userAlbums.userId, tables.users.id), ) .where( and( eq(tables.albums.id, album.id), - eq(tables.users.did, userDid) - ) + eq(tables.users.did, userDid), + ), ) .execute() - .then(([row]) => row.user_albums) - ) + .then(([row]) => row.user_albums), + ), ), Effect.flatMap((userAlbum) => Option.isNone(Option.fromNullable(existingAlbum)) || Option.isNone(Option.fromNullable(userAlbum)) || !userAlbum?.uri?.includes(userDid) ? putAlbumRecord(track, agent) - : Effect.succeed(null) - ) - ) - ) + : Effect.succeed(null), + ), + ), + ), ); // Ensure artist exists or create it @@ -925,7 +925,7 @@ const ensureArtist = ( ctx: Context, track: Track, agent: Agent, - userDid: string + userDid: string, ) => pipe( computeArtistHash(track), @@ -936,8 +936,8 @@ const ensureArtist = ( .from(tables.artists) .where(eq(tables.artists.sha256, artistHash)) .execute() - .then(([row]) => row) - ) + .then(([row]) => row), + ), ), Effect.flatMap((existingArtist) => pipe( @@ -949,21 +949,21 @@ const ensureArtist = ( .from(tables.userArtists) .leftJoin( tables.artists, - eq(tables.userArtists.artistId, tables.artists.id) + eq(tables.userArtists.artistId, tables.artists.id), ) .leftJoin( tables.users, - eq(tables.userArtists.userId, tables.users.id) + eq(tables.userArtists.userId, tables.users.id), ) .where( and( eq(tables.artists.id, artist.id), - eq(tables.users.did, userDid) - ) + eq(tables.users.did, userDid), + ), ) .execute() - .then(([row]) => row.user_artists) - ) + .then(([row]) => row.user_artists), + ), ), Effect.flatMap((userArtist) => Effect.if( @@ -973,18 +973,18 @@ const ensureArtist = ( { onTrue: () => putArtistRecord(track, agent), onFalse: () => Effect.succeed(null), - } - ) - ) - ) - ) + }, + ), + ), + ), + ), ); // Retry fetching track until metadata is ready const retryFetchTrack = ( ctx: Context, trackHash: string, - initialTrack: SelectTrack | undefined + initialTrack: SelectTrack | undefined, ) => pipe( Effect.iterate( @@ -1000,38 +1000,38 @@ const retryFetchTrack = ( .from(tables.tracks) .where(eq(tables.tracks.sha256, trackHash)) .execute() - .then(([row]) => row) + .then(([row]) => row), ), Effect.flatMap((trackRecord) => Option.fromNullable(trackRecord).pipe( Effect.flatMap((track) => - updateTrackMetadata(ctx, track, trackRecord) - ) - ) + updateTrackMetadata(ctx, track, trackRecord), + ), + ), ), Effect.tap((trackRecord) => Effect.logInfo( trackRecord ? `Track metadata ready: ${chalk.cyan(trackRecord.id)} - ${track.title}, after ${chalk.magenta(tries + 1)} tries` - : `Retrying track fetch: ${chalk.magenta(tries + 1)}` - ) + : `Retrying track fetch: ${chalk.magenta(tries + 1)}`, + ), ), Effect.map((trackRecord) => ({ tries: tries + 1, track: trackRecord, })), - Effect.delay("1 second") + Effect.delay("1 second"), ), - } + }, ), Effect.tap(({ tries, track }) => tries >= 30 && !(track?.artistUri && track?.albumUri) ? Effect.logError( - `Track metadata not ready after ${chalk.magenta("30 tries")}` + `Track metadata not ready after ${chalk.magenta("30 tries")}`, ) - : Effect.succeed(undefined) + : Effect.succeed(undefined), ), - Effect.map(({ track }) => track) + Effect.map(({ track }) => track), ); // Retry fetching scrobble until complete @@ -1069,23 +1069,23 @@ const retryFetchScrobble = (ctx: Context, scrobbleUri: string) => .from(tables.scrobbles) .leftJoin( tables.tracks, - eq(tables.scrobbles.trackId, tables.tracks.id) + eq(tables.scrobbles.trackId, tables.tracks.id), ) .leftJoin( tables.albums, - eq(tables.scrobbles.albumId, tables.albums.id) + eq(tables.scrobbles.albumId, tables.albums.id), ) .leftJoin( tables.artists, - eq(tables.scrobbles.artistId, tables.artists.id) + eq(tables.scrobbles.artistId, tables.artists.id), ) .leftJoin( tables.users, - eq(tables.scrobbles.userId, tables.users.id) + eq(tables.scrobbles.userId, tables.users.id), ) .where(eq(tables.scrobbles.uri, scrobbleUri)) .execute() - .then(([row]) => row) + .then(([row]) => row), ), Effect.tap((scrobble) => Effect.if( @@ -1102,11 +1102,11 @@ const retryFetchScrobble = (ctx: Context, scrobbleUri: string) => artistUri: scrobble.artists.uri, }) .where(eq(tables.albums.id, scrobble.albums.id)) - .execute() + .execute(), ), onFalse: () => Effect.succeed(undefined), - } - ) + }, + ), ), Effect.flatMap(() => Effect.tryPromise(() => @@ -1115,24 +1115,24 @@ const retryFetchScrobble = (ctx: Context, scrobbleUri: string) => .from(tables.scrobbles) .leftJoin( tables.tracks, - eq(tables.scrobbles.trackId, tables.tracks.id) + eq(tables.scrobbles.trackId, tables.tracks.id), ) .leftJoin( tables.albums, - eq(tables.scrobbles.albumId, tables.albums.id) + eq(tables.scrobbles.albumId, tables.albums.id), ) .leftJoin( tables.artists, - eq(tables.scrobbles.artistId, tables.artists.id) + eq(tables.scrobbles.artistId, tables.artists.id), ) .leftJoin( tables.users, - eq(tables.scrobbles.userId, tables.users.id) + eq(tables.scrobbles.userId, tables.users.id), ) .where(eq(tables.scrobbles.uri, scrobbleUri)) .execute() - .then(([row]) => row) - ) + .then(([row]) => row), + ), ), Effect.map((scrobble) => ({ tries: tries + 1, @@ -1149,12 +1149,12 @@ const retryFetchScrobble = (ctx: Context, scrobbleUri: string) => scrobble.tracks.albumUri && scrobble.scrobbles ? `Scrobble found after ${chalk.magenta(tries + 1)} tries` - : `Scrobble not found, trying again: ${chalk.magenta(tries + 1)}` - ) + : `Scrobble not found, trying again: ${chalk.magenta(tries + 1)}`, + ), ), - Effect.delay("1 second") + Effect.delay("1 second"), ), - } + }, ), Effect.tap(({ tries, scrobble }) => tries >= 30 && @@ -1168,18 +1168,18 @@ const retryFetchScrobble = (ctx: Context, scrobbleUri: string) => scrobble.tracks.albumUri ) ? Effect.logError( - `Scrobble not found after ${chalk.magenta("30 tries")}` + `Scrobble not found after ${chalk.magenta("30 tries")}`, ) - : Effect.succeed(undefined) + : Effect.succeed(undefined), ), - Effect.map(({ scrobble }) => scrobble) + Effect.map(({ scrobble }) => scrobble), ); export const scrobbleTrack = ( ctx: Context, track: Track, agent: Agent, - userDid: string + userDid: string, ) => pipe( computeTrackHash(track), @@ -1192,7 +1192,7 @@ export const scrobbleTrack = ( Effect.flatMap(() => ensureAlbum(ctx, track, agent, userDid)), Effect.flatMap(() => ensureArtist(ctx, track, agent, userDid)), Effect.flatMap(() => - retryFetchTrack(ctx, trackHash, existingTrack) + retryFetchTrack(ctx, trackHash, existingTrack), ), Effect.flatMap(() => pipe( @@ -1212,17 +1212,17 @@ export const scrobbleTrack = ( ? pipe( publishScrobble(ctx, scrobble.scrobbles.id), Effect.tap(() => - Effect.logInfo("Scrobble published") - ) + Effect.logInfo("Scrobble published"), + ), ) - : Effect.succeed(undefined) - ) - ) - ) - ) - ) - ) - ) - ) - ) + : Effect.succeed(undefined), + ), + ), + ), + ), + ), + ), + ), + ), + ), ); diff --git a/apps/api/src/xrpc/app/rocksky/scrobble/getScrobble.ts b/apps/api/src/xrpc/app/rocksky/scrobble/getScrobble.ts index a2366f40..9c272fad 100644 --- a/apps/api/src/xrpc/app/rocksky/scrobble/getScrobble.ts +++ b/apps/api/src/xrpc/app/rocksky/scrobble/getScrobble.ts @@ -1,14 +1,14 @@ -import { Context } from "context"; +import type { Context } from "context"; import { count, countDistinct, eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { ScrobbleViewDetailed } from "lexicon/types/app/rocksky/scrobble/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/scrobble/getScrobble"; +import type { Server } from "lexicon"; +import type { ScrobbleViewDetailed } from "lexicon/types/app/rocksky/scrobble/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/scrobble/getScrobble"; import * as R from "ramda"; import tables from "schema"; -import { SelectScrobble } from "schema/scrobbles"; -import { SelectTrack } from "schema/tracks"; -import { SelectUser } from "schema/users"; +import type { SelectScrobble } from "schema/scrobbles"; +import type { SelectTrack } from "schema/tracks"; +import type { SelectUser } from "schema/users"; export default function (server: Server, ctx: Context) { const getScrobble = (params) => @@ -21,7 +21,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error("Error retrieving scrobble:", err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.scrobble.getScrobble({ handler: async ({ params }) => { @@ -61,7 +61,7 @@ const retrieve = ({ .from(tables.scrobbles) .leftJoin( tables.tracks, - eq(tables.tracks.id, tables.scrobbles.trackId) + eq(tables.tracks.id, tables.scrobbles.trackId), ) .leftJoin(tables.users, eq(tables.scrobbles.userId, tables.users.id)) .where(eq(tables.scrobbles.trackId, scrobble?.tracks.id)) @@ -73,7 +73,7 @@ const retrieve = ({ .from(tables.scrobbles) .leftJoin( tables.tracks, - eq(tables.scrobbles.trackId, tables.tracks.id) + eq(tables.scrobbles.trackId, tables.tracks.id), ) .where(eq(tables.scrobbles.trackId, scrobble?.tracks.id)) .execute() diff --git a/apps/api/src/xrpc/app/rocksky/scrobble/getScrobbles.ts b/apps/api/src/xrpc/app/rocksky/scrobble/getScrobbles.ts index 059bc127..30b97a1c 100644 --- a/apps/api/src/xrpc/app/rocksky/scrobble/getScrobbles.ts +++ b/apps/api/src/xrpc/app/rocksky/scrobble/getScrobbles.ts @@ -21,7 +21,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error("Error retrieving scrobbles:", err); return Effect.succeed({ scrobbles: [] }); - }) + }), ); server.app.rocksky.scrobble.getScrobbles({ handler: async ({ params }) => { @@ -58,7 +58,7 @@ const retrieve = ({ }; const presentation = ( - data: Scrobbles + data: Scrobbles, ): Effect.Effect<{ scrobbles: ScrobbleViewBasic[] }, never> => { return Effect.sync(() => ({ scrobbles: data.map(({ scrobbles, tracks, users }) => ({ diff --git a/apps/api/src/xrpc/app/rocksky/shout/createShout.ts b/apps/api/src/xrpc/app/rocksky/shout/createShout.ts index c6eb62dc..fee1262d 100644 --- a/apps/api/src/xrpc/app/rocksky/shout/createShout.ts +++ b/apps/api/src/xrpc/app/rocksky/shout/createShout.ts @@ -1,13 +1,13 @@ -import { Agent } from "@atproto/api"; -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { Agent } from "@atproto/api"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { InputSchema } from "lexicon/types/app/rocksky/shout/createShout"; +import type { Server } from "lexicon"; +import type { InputSchema } from "lexicon/types/app/rocksky/shout/createShout"; import { createAgent } from "lib/agent"; import tables from "schema"; -import { SelectUser } from "schema/users"; +import type { SelectUser } from "schema/users"; export default function (server: Server, ctx: Context) { const createShout = (input, auth: HandlerAuth) => @@ -23,7 +23,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.shout.createShout({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/shout/getAlbumShouts.ts b/apps/api/src/xrpc/app/rocksky/shout/getAlbumShouts.ts index db5f2244..9a629a46 100644 --- a/apps/api/src/xrpc/app/rocksky/shout/getAlbumShouts.ts +++ b/apps/api/src/xrpc/app/rocksky/shout/getAlbumShouts.ts @@ -1,13 +1,13 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { count, desc, eq } from "drizzle-orm"; import { sql } from "drizzle-orm/sql"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { ShoutView } from "lexicon/types/app/rocksky/shout/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/shout/getAlbumShouts"; +import type { Server } from "lexicon"; +import type { ShoutView } from "lexicon/types/app/rocksky/shout/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/shout/getAlbumShouts"; import tables from "schema"; -import { SelectUser } from "schema/users"; +import type { SelectUser } from "schema/users"; export default function (server: Server, ctx: Context) { const getAlbumShouts = (params, auth: HandlerAuth) => @@ -21,7 +21,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ shouts: [] }); - }) + }), ); server.app.rocksky.shout.getAlbumShouts({ auth: ctx.authVerifier, @@ -106,7 +106,7 @@ const retrieve = ({ .leftJoin(tables.albums, eq(tables.shouts.albumId, tables.albums.id)) .leftJoin( tables.shoutLikes, - eq(tables.shouts.id, tables.shoutLikes.shoutId) + eq(tables.shouts.id, tables.shoutLikes.shoutId), ) .where(eq(tables.albums.uri, params.uri)) .groupBy( @@ -119,7 +119,7 @@ const retrieve = ({ tables.users.did, tables.users.handle, tables.users.displayName, - tables.users.avatar + tables.users.avatar, ) .orderBy(desc(tables.shouts.createdAt)) .execute(), @@ -131,7 +131,7 @@ const presentation = ( data: { shouts: Shouts; users: Users; - }[] + }[], ): Effect.Effect => { return Effect.sync(() => ({ shouts: data.map((item) => ({ diff --git a/apps/api/src/xrpc/app/rocksky/shout/getArtistShouts.ts b/apps/api/src/xrpc/app/rocksky/shout/getArtistShouts.ts index 84c820d6..44942386 100644 --- a/apps/api/src/xrpc/app/rocksky/shout/getArtistShouts.ts +++ b/apps/api/src/xrpc/app/rocksky/shout/getArtistShouts.ts @@ -1,12 +1,12 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { count, desc, eq, sql } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { ShoutView } from "lexicon/types/app/rocksky/shout/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/shout/getArtistShouts"; +import type { Server } from "lexicon"; +import type { ShoutView } from "lexicon/types/app/rocksky/shout/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/shout/getArtistShouts"; import tables from "schema"; -import { SelectUser } from "schema/users"; +import type { SelectUser } from "schema/users"; export default function (server: Server, ctx: Context) { const getArtistShouts = (params, auth: HandlerAuth) => @@ -20,7 +20,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ shouts: [] }); - }) + }), ); server.app.rocksky.shout.getArtistShouts({ auth: ctx.authVerifier, @@ -105,7 +105,7 @@ const retrieve = ({ .leftJoin(tables.artists, eq(tables.shouts.artistId, tables.artists.id)) .leftJoin( tables.shoutLikes, - eq(tables.shouts.id, tables.shoutLikes.shoutId) + eq(tables.shouts.id, tables.shoutLikes.shoutId), ) .where(eq(tables.artists.uri, params.uri)) .groupBy( @@ -118,7 +118,7 @@ const retrieve = ({ tables.users.did, tables.users.handle, tables.users.displayName, - tables.users.avatar + tables.users.avatar, ) .orderBy(desc(tables.shouts.createdAt)) .execute(), @@ -130,7 +130,7 @@ const presentation = ( data: { shouts: Shouts; users: Users; - }[] + }[], ): Effect.Effect => { return Effect.sync(() => ({ shouts: data.map((item) => ({ diff --git a/apps/api/src/xrpc/app/rocksky/shout/getProfileShouts.ts b/apps/api/src/xrpc/app/rocksky/shout/getProfileShouts.ts index df63119e..e94f943f 100644 --- a/apps/api/src/xrpc/app/rocksky/shout/getProfileShouts.ts +++ b/apps/api/src/xrpc/app/rocksky/shout/getProfileShouts.ts @@ -1,9 +1,9 @@ -import { Context } from "context"; +import type { Context } from "context"; import { aliasedTable, count, desc, eq, or, sql } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { ShoutView } from "lexicon/types/app/rocksky/shout/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/shout/getProfileShouts"; +import type { Server } from "lexicon"; +import type { ShoutView } from "lexicon/types/app/rocksky/shout/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/shout/getProfileShouts"; import tables from "schema"; export default function (server: Server, ctx: Context) { @@ -17,7 +17,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ shouts: [] }); - }) + }), ); server.app.rocksky.shout.getProfileShouts({ auth: ctx.authVerifier, @@ -46,8 +46,8 @@ const retrieve = ({ .where( or( eq(tables.users.did, params.did), - eq(tables.users.handle, params.did) - ) + eq(tables.users.handle, params.did), + ), ) .execute(); return ctx.db @@ -99,24 +99,24 @@ const retrieve = ({ .where( or( eq(tables.users.did, params.did), - eq(tables.users.handle, params.did) - ) + eq(tables.users.handle, params.did), + ), ) .leftJoin( tables.shouts, - eq(tables.profileShouts.shoutId, tables.shouts.id) + eq(tables.profileShouts.shoutId, tables.shouts.id), ) .leftJoin( aliasedTable(tables.users, "authors"), - eq(tables.shouts.authorId, aliasedTable(tables.users, "authors").id) + eq(tables.shouts.authorId, aliasedTable(tables.users, "authors").id), ) .leftJoin( tables.users, - eq(tables.profileShouts.userId, tables.users.id) + eq(tables.profileShouts.userId, tables.users.id), ) .leftJoin( tables.shoutLikes, - eq(tables.shouts.id, tables.shoutLikes.shoutId) + eq(tables.shouts.id, tables.shoutLikes.shoutId), ) .groupBy( tables.profileShouts.id, @@ -135,7 +135,7 @@ const retrieve = ({ aliasedTable(tables.users, "authors").did, aliasedTable(tables.users, "authors").handle, aliasedTable(tables.users, "authors").displayName, - aliasedTable(tables.users, "authors").avatar + aliasedTable(tables.users, "authors").avatar, ) .orderBy(desc(tables.profileShouts.createdAt)) .execute(); @@ -148,7 +148,7 @@ const presentation = ( data: { shouts: Shouts; users: Users; - }[] + }[], ): Effect.Effect => { return Effect.sync(() => ({ shouts: data.map((item) => ({ diff --git a/apps/api/src/xrpc/app/rocksky/shout/getShoutReplies.ts b/apps/api/src/xrpc/app/rocksky/shout/getShoutReplies.ts index 6be60eef..d9bf2115 100644 --- a/apps/api/src/xrpc/app/rocksky/shout/getShoutReplies.ts +++ b/apps/api/src/xrpc/app/rocksky/shout/getShoutReplies.ts @@ -19,7 +19,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ shouts: [] }); - }) + }), ); server.app.rocksky.shout.getShoutReplies({ auth: ctx.authVerifier, @@ -57,7 +57,7 @@ const retrieve = ({ }; const presentation = ( - data: { shouts: SelectShout; users: SelectUser }[] + data: { shouts: SelectShout; users: SelectUser }[], ): Effect.Effect => { return Effect.sync(() => ({ shouts: data.map((item) => ({ diff --git a/apps/api/src/xrpc/app/rocksky/shout/getTrackShouts.ts b/apps/api/src/xrpc/app/rocksky/shout/getTrackShouts.ts index 18c3fa1d..48adab14 100644 --- a/apps/api/src/xrpc/app/rocksky/shout/getTrackShouts.ts +++ b/apps/api/src/xrpc/app/rocksky/shout/getTrackShouts.ts @@ -17,7 +17,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ shouts: [] }); - }) + }), ); server.app.rocksky.shout.getTrackShouts({ auth: ctx.authVerifier, @@ -84,7 +84,7 @@ const retrieve = ({ .leftJoin(tables.tracks, eq(tables.shouts.trackId, tables.tracks.id)) .leftJoin( tables.shoutLikes, - eq(tables.shouts.id, tables.shoutLikes.shoutId) + eq(tables.shouts.id, tables.shoutLikes.shoutId), ) .where(eq(tables.tracks.uri, params.uri)) .groupBy( @@ -97,7 +97,7 @@ const retrieve = ({ tables.users.did, tables.users.handle, tables.users.displayName, - tables.users.avatar + tables.users.avatar, ) .orderBy(desc(tables.shouts.createdAt)) .execute(); @@ -110,7 +110,7 @@ const presentation = ( data: { shouts: Shouts; users: Users; - }[] + }[], ): Effect.Effect => { return Effect.sync(() => ({ shouts: data.map((item) => ({ diff --git a/apps/api/src/xrpc/app/rocksky/shout/removeShout.ts b/apps/api/src/xrpc/app/rocksky/shout/removeShout.ts index cb96d3f4..64b6a86a 100644 --- a/apps/api/src/xrpc/app/rocksky/shout/removeShout.ts +++ b/apps/api/src/xrpc/app/rocksky/shout/removeShout.ts @@ -17,7 +17,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.shout.removeShout({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/shout/replyShout.ts b/apps/api/src/xrpc/app/rocksky/shout/replyShout.ts index 537f207d..90614c51 100644 --- a/apps/api/src/xrpc/app/rocksky/shout/replyShout.ts +++ b/apps/api/src/xrpc/app/rocksky/shout/replyShout.ts @@ -17,7 +17,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ albums: [] }); - }) + }), ); server.app.rocksky.shout.replyShout({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/shout/reportShout.ts b/apps/api/src/xrpc/app/rocksky/shout/reportShout.ts index eb744d73..e4d532a5 100644 --- a/apps/api/src/xrpc/app/rocksky/shout/reportShout.ts +++ b/apps/api/src/xrpc/app/rocksky/shout/reportShout.ts @@ -1,7 +1,7 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; +import type { Server } from "lexicon"; export default function (server: Server, ctx: Context) { const reportShout = (params, auth: HandlerAuth) => @@ -14,7 +14,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.shout.reportShout({ auth: ctx.authVerifier, diff --git a/apps/api/src/xrpc/app/rocksky/song/createSong.ts b/apps/api/src/xrpc/app/rocksky/song/createSong.ts index d228e7fc..0e0e238b 100644 --- a/apps/api/src/xrpc/app/rocksky/song/createSong.ts +++ b/apps/api/src/xrpc/app/rocksky/song/createSong.ts @@ -38,7 +38,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.song.createSong({ auth: ctx.authVerifier, @@ -72,11 +72,11 @@ const withAgent = ({ ctx, did, input, - })) + })), ), Match.orElse(() => { throw new Error("Authentication required to create a song"); - }) + }), ), catch: (error) => new Error(`Failed to create agent: ${error}`), }); @@ -145,24 +145,24 @@ const computeTrackHash = (track: Track): Effect.Effect => Effect.succeed( createHash("sha256") .update(`${track.title} - ${track.artist} - ${track.album}`.toLowerCase()) - .digest("hex") + .digest("hex"), ); const computeAlbumHash = (track: Track): Effect.Effect => Effect.succeed( createHash("sha256") .update(`${track.album} - ${track.albumArtist}`.toLowerCase()) - .digest("hex") + .digest("hex"), ); const computeArtistHash = (track: Track): Effect.Effect => Effect.succeed( - createHash("sha256").update(track.albumArtist.toLowerCase()).digest("hex") + createHash("sha256").update(track.albumArtist.toLowerCase()).digest("hex"), ); const fetchExistingTrack = ( ctx: Context, - trackHash: string + trackHash: string, ): Effect.Effect => Effect.tryPromise(() => ctx.db @@ -170,7 +170,7 @@ const fetchExistingTrack = ( .from(tables.tracks) .where(eq(tables.tracks.sha256, trackHash)) .execute() - .then(([row]) => row) + .then(([row]) => row), ); const uploadImage = (url: string, agent: Agent) => @@ -190,10 +190,10 @@ const uploadImage = (url: string, agent: Agent) => Effect.flatMap(([imageBuffer, options]) => pipe( Effect.tryPromise(() => agent.uploadBlob(imageBuffer, options)), - Effect.map((uploadResponse) => uploadResponse.data.blob) - ) + Effect.map((uploadResponse) => uploadResponse.data.blob), + ), ), - Effect.catchAll(() => Effect.succeed(undefined as BlobRef | undefined)) + Effect.catchAll(() => Effect.succeed(undefined as BlobRef | undefined)), ); const generateRkey = Effect.succeed(TID.nextStr()); @@ -202,13 +202,13 @@ const putRecord = ( agent: Agent, collection: string, record: T, - validate: (record: T) => { success: boolean } + validate: (record: T) => { success: boolean }, ): Effect.Effect => pipe( Effect.succeed(record), Effect.filterOrFail( (rec) => validate(rec).success, - () => new Error("Invalid record") + () => new Error("Invalid record"), ), Effect.flatMap(() => pipe( @@ -221,19 +221,19 @@ const putRecord = ( rkey, record, validate: false, - }) - ) + }), + ), ), Effect.tap((res) => - Effect.logInfo(`Record created at ${res.data.uri}`) + Effect.logInfo(`Record created at ${res.data.uri}`), ), - Effect.map((res) => res.data.uri) - ) + Effect.map((res) => res.data.uri), + ), ), Effect.catchAll((error) => { console.error(`Error creating ${collection} record`, error); return Effect.fail(error); - }) + }), ); const putArtistRecord = (track: Track, agent: Agent) => @@ -248,8 +248,8 @@ const putArtistRecord = (track: Track, agent: Agent) => picture, })), Effect.flatMap((record) => - putRecord(agent, "app.rocksky.artist", record, Artist.validateRecord) - ) + putRecord(agent, "app.rocksky.artist", record, Artist.validateRecord), + ), ); const putAlbumRecord = (track: Track, agent: Agent) => @@ -257,9 +257,9 @@ const putAlbumRecord = (track: Track, agent: Agent) => Match.value(track.albumArt).pipe( Match.when( (url) => !!url, - (url) => uploadImage(url, agent) + (url) => uploadImage(url, agent), ), - Match.orElse(() => Effect.succeed(undefined as BlobRef | undefined)) + Match.orElse(() => Effect.succeed(undefined as BlobRef | undefined)), ), Effect.map((albumArt) => ({ $type: "app.rocksky.album", @@ -273,8 +273,8 @@ const putAlbumRecord = (track: Track, agent: Agent) => albumArt, })), Effect.flatMap((record) => - putRecord(agent, "app.rocksky.album", record, Album.validateRecord) - ) + putRecord(agent, "app.rocksky.album", record, Album.validateRecord), + ), ); const putSongRecord = (track: Track, agent: Agent) => @@ -282,9 +282,9 @@ const putSongRecord = (track: Track, agent: Agent) => Match.value(track.albumArt).pipe( Match.when( (url) => !!url, - (url) => uploadImage(url, agent) + (url) => uploadImage(url, agent), ), - Match.orElse(() => Effect.succeed(undefined as BlobRef | undefined)) + Match.orElse(() => Effect.succeed(undefined as BlobRef | undefined)), ), Effect.map((albumArt) => ({ $type: "app.rocksky.song", @@ -307,8 +307,8 @@ const putSongRecord = (track: Track, agent: Agent) => spotifyLink: track.spotifyLink ?? undefined, })), Effect.flatMap((record) => - putRecord(agent, "app.rocksky.song", record, Song.validateRecord) - ) + putRecord(agent, "app.rocksky.song", record, Song.validateRecord), + ), ); const ensureTrack = (ctx: Context, track: Track, agent: Agent) => @@ -323,24 +323,24 @@ const ensureTrack = (ctx: Context, track: Track, agent: Agent) => Effect.tap((trackOpt) => trackOpt ? updateTrackMetadata(ctx, track, trackOpt) - : Effect.succeed(undefined) + : Effect.succeed(undefined), ), Effect.flatMap((trackOpt) => trackOpt.uri ? Effect.succeed(trackOpt.uri) - : putSongRecord(track, agent) - ) - ) - ) - ) - ) + : putSongRecord(track, agent), + ), + ), + ), + ), + ), ); // Update track metadata (album_uri and artist_uri) const updateTrackMetadata = ( ctx: Context, track: Track, - trackRecord: SelectTrack + trackRecord: SelectTrack, ) => pipe( Effect.succeed(trackRecord), @@ -355,8 +355,8 @@ const updateTrackMetadata = ( .from(tables.albums) .where(eq(tables.albums.sha256, albumHash)) .execute() - .then(([row]) => row) - ) + .then(([row]) => row), + ), ), Effect.flatMap((album) => Option.fromNullable(album).pipe( @@ -366,14 +366,14 @@ const updateTrackMetadata = ( .update(tables.tracks) .set({ albumUri: album.uri }) .where(eq(tables.tracks.id, trackRecord.id)) - .execute() - ) + .execute(), + ), ), - Effect.catchAll(() => Effect.succeed(undefined)) - ) - ) + Effect.catchAll(() => Effect.succeed(undefined)), + ), + ), ) - : Effect.succeed(undefined) + : Effect.succeed(undefined), ), Effect.tap((trackRecord) => !trackRecord.artistUri @@ -386,8 +386,8 @@ const updateTrackMetadata = ( .from(tables.artists) .where(eq(tables.artists.sha256, artistHash)) .execute() - .then(([row]) => row) - ) + .then(([row]) => row), + ), ), Effect.flatMap((artist) => Option.fromNullable(artist).pipe( @@ -397,15 +397,15 @@ const updateTrackMetadata = ( .update(tables.tracks) .set({ artistUri: artist.uri }) .where(eq(tables.tracks.id, trackRecord.id)) - .execute() - ) + .execute(), + ), ), - Effect.catchAll(() => Effect.succeed(undefined)) - ) - ) + Effect.catchAll(() => Effect.succeed(undefined)), + ), + ), ) - : Effect.succeed(undefined) - ) + : Effect.succeed(undefined), + ), ); // Ensure artist exists or create it @@ -420,7 +420,7 @@ const ensureArtist = (ctx: Context, track: Track, agent: Agent) => .from(tables.artists) .where(eq(tables.artists.sha256, artistHash)) .execute() - .then(([row]) => row) + .then(([row]) => row), ), Effect.flatMap((existingArtist) => pipe( @@ -428,12 +428,12 @@ const ensureArtist = (ctx: Context, track: Track, agent: Agent) => Effect.flatMap((artistOpt) => artistOpt.uri ? Effect.succeed(artistOpt.uri) - : putArtistRecord(track, agent) - ) - ) - ) - ) - ) + : putArtistRecord(track, agent), + ), + ), + ), + ), + ), ); // Ensure album exists or create it @@ -448,7 +448,7 @@ const ensureAlbum = (ctx: Context, track: Track, agent: Agent) => .from(tables.albums) .where(eq(tables.albums.sha256, albumHash)) .execute() - .then(([row]) => row) + .then(([row]) => row), ), Effect.flatMap((existingAlbum) => pipe( @@ -456,12 +456,12 @@ const ensureAlbum = (ctx: Context, track: Track, agent: Agent) => Effect.flatMap((albumOpt) => albumOpt.uri ? Effect.succeed(albumOpt.uri) - : putAlbumRecord(track, agent) - ) - ) - ) - ) - ) + : putAlbumRecord(track, agent), + ), + ), + ), + ), + ), ); // Fetch track, album, and artist by URIs @@ -469,7 +469,7 @@ const fetchRecordsByUris = ( ctx: Context, trackUri: string, albumUri: string, - artistUri: string + artistUri: string, ): Effect.Effect< { track: SelectTrack | null; @@ -485,7 +485,7 @@ const fetchRecordsByUris = ( .from(tables.tracks) .where(eq(tables.tracks.uri, trackUri)) .execute() - .then(([row]) => row) + .then(([row]) => row), ), album: Effect.tryPromise(() => ctx.db @@ -493,7 +493,7 @@ const fetchRecordsByUris = ( .from(tables.albums) .where(eq(tables.albums.uri, albumUri)) .execute() - .then(([row]) => row) + .then(([row]) => row), ), artist: Effect.tryPromise(() => ctx.db @@ -501,7 +501,7 @@ const fetchRecordsByUris = ( .from(tables.artists) .where(eq(tables.artists.uri, artistUri)) .execute() - .then(([row]) => row) + .then(([row]) => row), ), }); @@ -510,7 +510,7 @@ const ensureRelationships = ( ctx: Context, track: SelectTrack, album: SelectAlbum, - artist: SelectArtist + artist: SelectArtist, ) => pipe( Effect.all({ @@ -521,11 +521,11 @@ const ensureRelationships = ( .where( and( eq(tables.albumTracks.albumId, album.id), - eq(tables.albumTracks.trackId, track.id) - ) + eq(tables.albumTracks.trackId, track.id), + ), ) .execute() - .then(([row]) => row) + .then(([row]) => row), ), artistTrack: Effect.tryPromise(() => @@ -535,11 +535,11 @@ const ensureRelationships = ( .where( and( eq(tables.artistTracks.artistId, artist.id), - eq(tables.artistTracks.trackId, track.id) - ) + eq(tables.artistTracks.trackId, track.id), + ), ) .execute() - .then(([row]) => row) + .then(([row]) => row), ), artistAlbum: Effect.tryPromise(() => ctx.db @@ -548,11 +548,11 @@ const ensureRelationships = ( .where( and( eq(tables.artistAlbums.artistId, artist.id), - eq(tables.artistAlbums.albumId, album.id) - ) + eq(tables.artistAlbums.albumId, album.id), + ), ) .execute() - .then(([row]) => row) + .then(([row]) => row), ), }), Effect.flatMap(({ albumTrack, artistTrack, artistAlbum }) => @@ -570,9 +570,9 @@ const ensureRelationships = ( } as InsertAlbumTrack) .returning() .execute() - .then(([row]) => row) - ) - ) + .then(([row]) => row), + ), + ), ), pipe( Option.fromNullable(artistTrack), @@ -586,9 +586,9 @@ const ensureRelationships = ( } as InsertArtistTrack) .returning() .execute() - .then(([row]) => row) - ) - ) + .then(([row]) => row), + ), + ), ), pipe( Option.fromNullable(artistAlbum), @@ -602,18 +602,18 @@ const ensureRelationships = ( } as InsertArtistAlbum) .returning() .execute() - .then(([row]) => row) - ) - ) + .then(([row]) => row), + ), + ), ), ]), Effect.map(([albumTrack, artistTrack, artistAlbum]) => ({ albumTrack, artistTrack, artistAlbum, - })) - ) - ) + })), + ), + ), ); // Update track with album and artist URIs if missing @@ -621,7 +621,7 @@ const updateTrackUris = ( ctx: Context, track: SelectTrack, album: SelectAlbum, - artist: SelectArtist + artist: SelectArtist, ) => pipe( Effect.succeed(track), @@ -634,9 +634,9 @@ const updateTrackUris = ( albumUri: album.uri, }) .where(eq(tables.tracks.id, trackRecord.id)) - .execute() + .execute(), ) - : Effect.succeed(undefined) + : Effect.succeed(undefined), ), Effect.tap((trackRecord) => !trackRecord.artistUri @@ -647,10 +647,10 @@ const updateTrackUris = ( artistUri: artist.uri, }) .where(eq(tables.tracks.id, trackRecord.id)) - .execute() + .execute(), ) - : Effect.succeed(undefined) - ) + : Effect.succeed(undefined), + ), ); const publishTrack = ( @@ -658,7 +658,7 @@ const publishTrack = ( track: SelectTrack, albumTrack: SelectAlbumTrack, artistTrack: SelectArtistTrack, - artistAlbum: SelectArtistAlbum + artistAlbum: SelectArtistAlbum, ) => pipe( Effect.succeed( @@ -708,16 +708,16 @@ const publishTrack = ( xata_updatedat: artistAlbum.updatedAt.toISOString(), xata_version: artistAlbum.xataVersion, }, - }) + }), ), Effect.flatMap((message) => Effect.try(() => ctx.nc.publish( "rocksky.track", - Buffer.from(JSON.stringify(message).replaceAll("sha_256", "sha256")) - ) - ) - ) + Buffer.from(JSON.stringify(message).replaceAll("sha_256", "sha256")), + ), + ), + ), ); export const saveTrack = (ctx: Context, track: Track, agent: Agent) => @@ -770,29 +770,29 @@ export const saveTrack = (ctx: Context, track: Track, agent: Agent) => Effect.filterOrFail( () => !!track, () => - new Error(`Track not found for uri: ${trackUri}`) - ) + new Error(`Track not found for uri: ${trackUri}`), + ), ), Option.fromNullable(album).pipe( Effect.filterOrFail( () => !!album, () => - new Error(`Album not found for uri: ${albumUri}`) - ) + new Error(`Album not found for uri: ${albumUri}`), + ), ), Option.fromNullable(artist).pipe( Effect.filterOrFail( () => !!artist, () => - new Error(`Artist not found for uri: ${artistUri}`) - ) + new Error(`Artist not found for uri: ${artistUri}`), + ), ), ]), Effect.flatMap(([track, album, artist]) => pipe( updateTrackUris(ctx, track, album, artist), Effect.flatMap(() => - ensureRelationships(ctx, track, album, artist) + ensureRelationships(ctx, track, album, artist), ), Effect.map( ({ albumTrack, artistTrack, artistAlbum }) => ({ @@ -803,11 +803,11 @@ export const saveTrack = (ctx: Context, track: Track, agent: Agent) => albumTrack, artistTrack, artistAlbum, - }) - ) - ) - ) - ) + }), + ), + ), + ), + ), ), Effect.tap( ({ @@ -829,8 +829,8 @@ export const saveTrack = (ctx: Context, track: Track, agent: Agent) => track.albumUri && track.artistUri ? `Track saved successfully after ${chalk.magenta(tries + 1)} tries` - : `Track not yet saved, retrying... ${chalk.magenta(tries + 1)}` - ) + : `Track not yet saved, retrying... ${chalk.magenta(tries + 1)}`, + ), ), Effect.tap( ({ @@ -845,25 +845,25 @@ export const saveTrack = (ctx: Context, track: Track, agent: Agent) => tries === 15 ? pipe( Effect.logError( - "Failed to save track after 15 tries" + "Failed to save track after 15 tries", ), Effect.tap(() => Effect.logDebug( - `Debug info: track=${JSON.stringify(track)}, album=${JSON.stringify(album)}, artist=${JSON.stringify(artist)}, albumTrack=${JSON.stringify(albumTrack)}, artistTrack=${JSON.stringify(artistTrack)}, artistAlbum=${JSON.stringify(artistAlbum)}` - ) - ) + `Debug info: track=${JSON.stringify(track)}, album=${JSON.stringify(album)}, artist=${JSON.stringify(artist)}, albumTrack=${JSON.stringify(albumTrack)}, artistTrack=${JSON.stringify(artistTrack)}, artistAlbum=${JSON.stringify(artistAlbum)}`, + ), + ), ) - : Effect.succeed(undefined) + : Effect.succeed(undefined), ), - Effect.delay("1 second") + Effect.delay("1 second"), ), - } + }, ), Effect.tap(({ tries, track, albumTrack, artistTrack, artistAlbum }) => tries < 15 && track && albumTrack && artistTrack && artistAlbum ? publishTrack(ctx, track, albumTrack, artistTrack, artistAlbum) - : Effect.succeed(undefined) - ) - ) - ) + : Effect.succeed(undefined), + ), + ), + ), ); diff --git a/apps/api/src/xrpc/app/rocksky/song/getSong.ts b/apps/api/src/xrpc/app/rocksky/song/getSong.ts index fb8355d0..6b15d5f1 100644 --- a/apps/api/src/xrpc/app/rocksky/song/getSong.ts +++ b/apps/api/src/xrpc/app/rocksky/song/getSong.ts @@ -1,11 +1,11 @@ -import { Context } from "context"; +import type { Context } from "context"; import { count, eq, or } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { SongViewDetailed } from "lexicon/types/app/rocksky/song/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/song/getSong"; +import type { Server } from "lexicon"; +import type { SongViewDetailed } from "lexicon/types/app/rocksky/song/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/song/getSong"; import tables from "schema"; -import { SelectTrack } from "schema/tracks"; +import type { SelectTrack } from "schema/tracks"; export default function (server: Server, ctx: Context) { const getSong = (params) => @@ -18,7 +18,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.song.getSong({ handler: async ({ params }) => { @@ -39,13 +39,13 @@ const retrieve = ({ params, ctx }: { params: QueryParams; ctx: Context }) => { .from(tables.userTracks) .leftJoin( tables.tracks, - eq(tables.userTracks.trackId, tables.tracks.id) + eq(tables.userTracks.trackId, tables.tracks.id), ) .where( or( eq(tables.userTracks.uri, params.uri), - eq(tables.tracks.uri, params.uri) - ) + eq(tables.tracks.uri, params.uri), + ), ) .execute() .then(([row]) => row?.tracks); diff --git a/apps/api/src/xrpc/app/rocksky/song/getSongs.ts b/apps/api/src/xrpc/app/rocksky/song/getSongs.ts index bf977174..98d5873f 100644 --- a/apps/api/src/xrpc/app/rocksky/song/getSongs.ts +++ b/apps/api/src/xrpc/app/rocksky/song/getSongs.ts @@ -1,8 +1,8 @@ -import { Context } from "context"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { SongViewBasic } from "lexicon/types/app/rocksky/song/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/song/getSongs"; +import type { Server } from "lexicon"; +import type { SongViewBasic } from "lexicon/types/app/rocksky/song/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/song/getSongs"; import { deepCamelCaseKeys } from "lib"; export default function (server: Server, ctx: Context) { @@ -16,7 +16,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({ songs: [] }); - }) + }), ); server.app.rocksky.song.getSongs({ handler: async ({ params }) => { diff --git a/apps/api/src/xrpc/app/rocksky/spotify/getCurrentlyPlaying.ts b/apps/api/src/xrpc/app/rocksky/spotify/getCurrentlyPlaying.ts index 4ff0d61d..ec918e69 100644 --- a/apps/api/src/xrpc/app/rocksky/spotify/getCurrentlyPlaying.ts +++ b/apps/api/src/xrpc/app/rocksky/spotify/getCurrentlyPlaying.ts @@ -1,13 +1,13 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { and, eq, or } from "drizzle-orm"; import { Effect, Match, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/spotify/getCurrentlyPlaying"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/spotify/getCurrentlyPlaying"; import { createHash } from "node:crypto"; import tables from "schema"; -import { SelectSpotifyAccount } from "schema/spotify-accounts"; -import { SelectUser } from "schema/users"; +import type { SelectSpotifyAccount } from "schema/spotify-accounts"; +import type { SelectUser } from "schema/users"; export default function (server: Server, ctx: Context) { const getCurrentlyPlaying = (params, auth: HandlerAuth) => @@ -23,7 +23,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.spotify.getCurrentlyPlaying({ auth: ctx.authVerifier, @@ -54,8 +54,8 @@ const withUser = ({ .where( or( eq(tables.users.did, params.actor || did), - eq(tables.users.handle, params.actor || did) - ) + eq(tables.users.handle, params.actor || did), + ), ) .execute() .then((users) => ({ user: users[0], ctx, params, did })), @@ -90,13 +90,13 @@ const withSpotifyAccount = ({ .from(tables.spotifyAccounts) .leftJoin( tables.users, - eq(tables.users.id, tables.spotifyAccounts.userId) + eq(tables.users.id, tables.spotifyAccounts.userId), ) .where( or( eq(tables.users.did, params.actor || did), - eq(tables.users.handle, params.actor || did) - ) + eq(tables.users.handle, params.actor || did), + ), ) .execute() .then(([results]) => ({ @@ -129,8 +129,8 @@ const retrieve = ({ Match.value(cached).pipe( Match.when(null, () => ({})), Match.when(undefined, () => ({})), - Match.orElse(() => JSON.parse(cached)) - ) + Match.orElse(() => JSON.parse(cached)), + ), ) .then((cached) => [cached, ctx, user]), catch: (error) => @@ -143,7 +143,7 @@ const withUriAndLikes = ([track, ctx, user]: [any, Context, SelectUser]) => { try: async () => { const sha256 = createHash("sha256") .update( - `${track.item.name} - ${track.item.artists.map((x) => x.name).join(", ")} - ${track.item.album.name}`.toLowerCase() + `${track.item.name} - ${track.item.artists.map((x) => x.name).join(", ")} - ${track.item.album.name}`.toLowerCase(), ) .digest("hex"); const [record] = await ctx.db @@ -156,18 +156,18 @@ const withUriAndLikes = ([track, ctx, user]: [any, Context, SelectUser]) => { .from(tables.lovedTracks) .leftJoin( tables.tracks, - eq(tables.lovedTracks.trackId, tables.tracks.id) + eq(tables.lovedTracks.trackId, tables.tracks.id), ) .leftJoin(tables.users, eq(tables.lovedTracks.userId, tables.users.id)) .where( - and(eq(tables.tracks.sha256, sha256), eq(tables.users.did, user.did)) + and(eq(tables.tracks.sha256, sha256), eq(tables.users.did, user.did)), ) .execute() .then((results) => Match.value(track).pipe( Match.when( (t) => !Object.keys(t).length, - () => ({}) + () => ({}), ), Match.orElse(() => ({ ...track, @@ -175,8 +175,8 @@ const withUriAndLikes = ([track, ctx, user]: [any, Context, SelectUser]) => { artistUri: record?.artistUri, albumUri: record?.albumUri, liked: results.length > 0, - })) - ) + })), + ), ); }, catch: (error) => new Error(`Failed to retrieve URI and likes: ${error}`), diff --git a/apps/api/src/xrpc/app/rocksky/spotify/next.ts b/apps/api/src/xrpc/app/rocksky/spotify/next.ts index f44568ac..807be015 100644 --- a/apps/api/src/xrpc/app/rocksky/spotify/next.ts +++ b/apps/api/src/xrpc/app/rocksky/spotify/next.ts @@ -1,13 +1,13 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/spotify/next"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/spotify/next"; import { decrypt } from "lib/crypto"; import { env } from "lib/env"; import tables from "schema"; -import { SelectUser } from "schema/users"; +import type { SelectUser } from "schema/users"; export default function (server: Server, ctx: Context) { const next = (params, auth: HandlerAuth) => @@ -23,7 +23,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.spotify.next({ auth: ctx.authVerifier, @@ -72,7 +72,7 @@ const withSpotifyRefreshToken = ({ .where(eq(tables.spotifyTokens.userId, user.id)) .execute() .then(([spotifyToken]) => - decrypt(spotifyToken.refreshToken, env.SPOTIFY_ENCRYPTION_KEY) + decrypt(spotifyToken.refreshToken, env.SPOTIFY_ENCRYPTION_KEY), ) .then((refreshToken) => ({ user, diff --git a/apps/api/src/xrpc/app/rocksky/spotify/pause.ts b/apps/api/src/xrpc/app/rocksky/spotify/pause.ts index 1d0b42af..1375db48 100644 --- a/apps/api/src/xrpc/app/rocksky/spotify/pause.ts +++ b/apps/api/src/xrpc/app/rocksky/spotify/pause.ts @@ -1,13 +1,13 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/spotify/pause"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/spotify/pause"; import { decrypt } from "lib/crypto"; import { env } from "lib/env"; import tables from "schema"; -import { SelectUser } from "schema/users"; +import type { SelectUser } from "schema/users"; export default function (server: Server, ctx: Context) { const pause = (params, auth: HandlerAuth) => diff --git a/apps/api/src/xrpc/app/rocksky/spotify/play.ts b/apps/api/src/xrpc/app/rocksky/spotify/play.ts index 1f080618..6421e4ca 100644 --- a/apps/api/src/xrpc/app/rocksky/spotify/play.ts +++ b/apps/api/src/xrpc/app/rocksky/spotify/play.ts @@ -1,13 +1,13 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/spotify/play"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/spotify/play"; import { decrypt } from "lib/crypto"; import { env } from "lib/env"; import tables from "schema"; -import { SelectUser } from "schema/users"; +import type { SelectUser } from "schema/users"; export default function (server: Server, ctx: Context) { const play = (params, auth: HandlerAuth) => @@ -23,7 +23,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.spotify.play({ auth: ctx.authVerifier, @@ -72,7 +72,7 @@ const withSpotifyRefreshToken = ({ .where(eq(tables.spotifyTokens.userId, user.id)) .execute() .then(([spotifyToken]) => - decrypt(spotifyToken.refreshToken, env.SPOTIFY_ENCRYPTION_KEY) + decrypt(spotifyToken.refreshToken, env.SPOTIFY_ENCRYPTION_KEY), ) .then((refreshToken) => ({ user, diff --git a/apps/api/src/xrpc/app/rocksky/spotify/previous.ts b/apps/api/src/xrpc/app/rocksky/spotify/previous.ts index 2073bb11..9c9df550 100644 --- a/apps/api/src/xrpc/app/rocksky/spotify/previous.ts +++ b/apps/api/src/xrpc/app/rocksky/spotify/previous.ts @@ -1,13 +1,13 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/spotify/previous"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/spotify/previous"; import { decrypt } from "lib/crypto"; import { env } from "lib/env"; import tables from "schema"; -import { SelectUser } from "schema/users"; +import type { SelectUser } from "schema/users"; export default function (server: Server, ctx: Context) { const previous = (params, auth: HandlerAuth) => @@ -23,7 +23,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.spotify.previous({ auth: ctx.authVerifier, @@ -72,7 +72,7 @@ const withSpotifyRefreshToken = ({ .where(eq(tables.spotifyTokens.userId, user.id)) .execute() .then(([spotifyToken]) => - decrypt(spotifyToken.refreshToken, env.SPOTIFY_ENCRYPTION_KEY) + decrypt(spotifyToken.refreshToken, env.SPOTIFY_ENCRYPTION_KEY), ) .then((refreshToken) => ({ refreshToken, diff --git a/apps/api/src/xrpc/app/rocksky/spotify/seek.ts b/apps/api/src/xrpc/app/rocksky/spotify/seek.ts index 20914331..a41b9cc8 100644 --- a/apps/api/src/xrpc/app/rocksky/spotify/seek.ts +++ b/apps/api/src/xrpc/app/rocksky/spotify/seek.ts @@ -1,13 +1,13 @@ -import { HandlerAuth } from "@atproto/xrpc-server"; -import { Context } from "context"; +import type { HandlerAuth } from "@atproto/xrpc-server"; +import type { Context } from "context"; import { eq } from "drizzle-orm"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { QueryParams } from "lexicon/types/app/rocksky/spotify/seek"; +import type { Server } from "lexicon"; +import type { QueryParams } from "lexicon/types/app/rocksky/spotify/seek"; import { decrypt } from "lib/crypto"; import { env } from "lib/env"; import tables from "schema"; -import { SelectUser } from "schema/users"; +import type { SelectUser } from "schema/users"; export default function (server: Server, ctx: Context) { const seek = (params, auth: HandlerAuth) => @@ -23,7 +23,7 @@ export default function (server: Server, ctx: Context) { Effect.catchAll((err) => { console.error(err); return Effect.succeed({}); - }) + }), ); server.app.rocksky.spotify.seek({ auth: ctx.authVerifier, @@ -75,7 +75,7 @@ const withSpotifyRefreshToken = ({ .where(eq(tables.spotifyTokens.userId, user.id)) .execute() .then(([spotifyToken]) => - decrypt(spotifyToken.refreshToken, env.SPOTIFY_ENCRYPTION_KEY) + decrypt(spotifyToken.refreshToken, env.SPOTIFY_ENCRYPTION_KEY), ) .then((refreshToken) => ({ refreshToken, @@ -132,7 +132,7 @@ const handleSeek = ({ headers: { Authorization: `Bearer ${accessToken}`, }, - } + }, ).then((res) => res.status), catch: (error) => new Error(`Failed to handle next action: ${error}`), }); diff --git a/apps/api/src/xrpc/app/rocksky/stats/getStats.ts b/apps/api/src/xrpc/app/rocksky/stats/getStats.ts index c0338a2e..dc6e6a88 100644 --- a/apps/api/src/xrpc/app/rocksky/stats/getStats.ts +++ b/apps/api/src/xrpc/app/rocksky/stats/getStats.ts @@ -1,8 +1,8 @@ -import { Context } from "context"; +import type { Context } from "context"; import { Effect, pipe } from "effect"; -import { Server } from "lexicon"; -import { StatsView } from "lexicon/types/app/rocksky/stats/defs"; -import { QueryParams } from "lexicon/types/app/rocksky/stats/getStats"; +import type { Server } from "lexicon"; +import type { StatsView } from "lexicon/types/app/rocksky/stats/defs"; +import type { QueryParams } from "lexicon/types/app/rocksky/stats/getStats"; import { deepCamelCaseKeys } from "lib"; export default function (server: Server, ctx: Context) { @@ -13,7 +13,7 @@ export default function (server: Server, ctx: Context) { Effect.flatMap(presentation), Effect.retry({ times: 3 }), Effect.timeout("10 seconds"), - Effect.catchAll(() => Effect.succeed(defaultStats)) + Effect.catchAll(() => Effect.succeed(defaultStats)), ); server.app.rocksky.stats.getStats({ handler: async ({ params }) => { diff --git a/apps/api/src/xrpc/index.ts b/apps/api/src/xrpc/index.ts index ace21baf..8ab54e35 100644 --- a/apps/api/src/xrpc/index.ts +++ b/apps/api/src/xrpc/index.ts @@ -1,5 +1,5 @@ -import { Context } from "context"; -import { Server } from "lexicon"; +import type { Context } from "context"; +import type { Server } from "lexicon"; import getActorAlbums from "./app/rocksky/actor/getActorAlbums"; import getActorArtists from "./app/rocksky/actor/getActorArtists"; import getActorLovedSongs from "./app/rocksky/actor/getActorLovedSongs"; diff --git a/apps/app/biome.json b/apps/app/biome.json new file mode 100644 index 00000000..29daa5ec --- /dev/null +++ b/apps/app/biome.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.2.3/schema.json", + "vcs": { + "enabled": false, + "clientKind": "git", + "useIgnoreFile": false + }, + "files": { + "ignoreUnknown": false + }, + "formatter": { + "enabled": true, + "indentStyle": "space" + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + }, + "javascript": { + "formatter": { + "quoteStyle": "double" + } + }, + "assist": { + "enabled": true, + "actions": { + "source": { + "organizeImports": "on" + } + } + } +} \ No newline at end of file diff --git a/apps/app/bun.lock b/apps/app/bun.lock index 82f8b880..97e7c1fc 100644 --- a/apps/app/bun.lock +++ b/apps/app/bun.lock @@ -60,6 +60,7 @@ }, "devDependencies": { "@babel/core": "^7.25.2", + "@biomejs/biome": "^2.2.3", "@gorhom/bottom-sheet": "^5.1.4", "@react-native-community/datetimepicker": "^8.3.0", "@react-native-community/slider": "^4.5.6", @@ -286,6 +287,24 @@ "@bcoe/v8-coverage": ["@bcoe/v8-coverage@0.2.3", "", {}, "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw=="], + "@biomejs/biome": ["@biomejs/biome@2.2.3", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.2.3", "@biomejs/cli-darwin-x64": "2.2.3", "@biomejs/cli-linux-arm64": "2.2.3", "@biomejs/cli-linux-arm64-musl": "2.2.3", "@biomejs/cli-linux-x64": "2.2.3", "@biomejs/cli-linux-x64-musl": "2.2.3", "@biomejs/cli-win32-arm64": "2.2.3", "@biomejs/cli-win32-x64": "2.2.3" }, "bin": { "biome": "bin/biome" } }, "sha512-9w0uMTvPrIdvUrxazZ42Ib7t8Y2yoGLKLdNne93RLICmaHw7mcLv4PPb5LvZLJF3141gQHiCColOh/v6VWlWmg=="], + + "@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.2.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-OrqQVBpadB5eqzinXN4+Q6honBz+tTlKVCsbEuEpljK8ASSItzIRZUA02mTikl3H/1nO2BMPFiJ0nkEZNy3B1w=="], + + "@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.2.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-OCdBpb1TmyfsTgBAM1kPMXyYKTohQ48WpiN9tkt9xvU6gKVKHY4oVwteBebiOqyfyzCNaSiuKIPjmHjUZ2ZNMg=="], + + "@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-g/Uta2DqYpECxG+vUmTAmUKlVhnGEcY7DXWgKP8ruLRa8Si1QHsWknPY3B/wCo0KgYiFIOAZ9hjsHfNb9L85+g=="], + + "@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.2.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-q3w9jJ6JFPZPeqyvwwPeaiS/6NEszZ+pXKF+IczNo8Xj6fsii45a4gEEicKyKIytalV+s829ACZujQlXAiVLBQ=="], + + "@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-LEtyYL1fJsvw35CxrbQ0gZoxOG3oZsAjzfRdvRBRHxOpQ91Q5doRVjvWW/wepgSdgk5hlaNzfeqpyGmfSD0Eyw=="], + + "@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.2.3", "", { "os": "linux", "cpu": "x64" }, "sha512-y76Dn4vkP1sMRGPFlNc+OTETBhGPJ90jY3il6jAfur8XWrYBQV3swZ1Jo0R2g+JpOeeoA0cOwM7mJG6svDz79w=="], + + "@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.2.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-Ms9zFYzjcJK7LV+AOMYnjN3pV3xL8Prxf9aWdDVL74onLn5kcvZ1ZMQswE5XHtnd/r/0bnUd928Rpbs14BzVmA=="], + + "@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.2.3", "", { "os": "win32", "cpu": "x64" }, "sha512-gvCpewE7mBwBIpqk1YrUqNR4mCiyJm6UI3YWQQXkedSSEwzRdodRpaKhbdbHw1/hmTWOVXQ+Eih5Qctf4TCVOQ=="], + "@egjs/hammerjs": ["@egjs/hammerjs@2.0.17", "", { "dependencies": { "@types/hammerjs": "^2.0.36" } }, "sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A=="], "@emnapi/core": ["@emnapi/core@1.4.3", "", { "dependencies": { "@emnapi/wasi-threads": "1.0.2", "tslib": "^2.4.0" } }, "sha512-4m62DuCE07lw01soJwPiBGC0nAww0Q+RY70VZ+n49yDIO13yyinhbWCeNnaob0lakDtWQzSdtNWzJeOJt2ma+g=="], diff --git a/apps/app/package.json b/apps/app/package.json index bb15880e..6615cd07 100644 --- a/apps/app/package.json +++ b/apps/app/package.json @@ -8,12 +8,13 @@ "android": "expo run:android", "ios": "expo run:ios", "web": "expo start --web", - "lint": "expo lint", + "lint": "biome lint src", "storybook-generate": "sb-rn-get-stories", "storybook": "STORYBOOK_ENABLED='true' expo start", "storybook:android": "STORYBOOK_ENABLED='true' expo run:android", "test": "jest", - "adb:reverse": "adb reverse tcp:8081 tcp:8081" + "adb:reverse": "adb reverse tcp:8081 tcp:8081", + "format": "biome format src" }, "jest": { "preset": "react-native" @@ -75,6 +76,7 @@ }, "devDependencies": { "@babel/core": "^7.25.2", + "@biomejs/biome": "^2.2.3", "@gorhom/bottom-sheet": "^5.1.4", "@react-native-community/datetimepicker": "^8.3.0", "@react-native-community/slider": "^4.5.6", diff --git a/apps/app/src/api/charts.ts b/apps/app/src/api/charts.ts index 9d88b8b0..47eaaec5 100644 --- a/apps/app/src/api/charts.ts +++ b/apps/app/src/api/charts.ts @@ -7,7 +7,7 @@ export const getScrobblesChart = () => { export const getSongChart = async (uri: string) => { const response = await axios.get( - `${API_URL}/public/scrobbleschart?songuri=${uri}` + `${API_URL}/public/scrobbleschart?songuri=${uri}`, ); if (response.status !== 200) { return []; @@ -17,7 +17,7 @@ export const getSongChart = async (uri: string) => { export const getArtistChart = async (uri: string) => { const response = await axios.get( - `${API_URL}/public/scrobbleschart?artisturi=${uri}` + `${API_URL}/public/scrobbleschart?artisturi=${uri}`, ); if (response.status !== 200) { return []; @@ -27,7 +27,7 @@ export const getArtistChart = async (uri: string) => { export const getAlbumChart = async (uri: string) => { const response = await axios.get( - `${API_URL}/public/scrobbleschart?albumuri=${uri}` + `${API_URL}/public/scrobbleschart?albumuri=${uri}`, ); if (response.status !== 200) { return []; @@ -37,7 +37,7 @@ export const getAlbumChart = async (uri: string) => { export const getProfileChart = async (did: string) => { const response = await axios.get( - `${API_URL}/public/scrobbleschart?did=${did}` + `${API_URL}/public/scrobbleschart?did=${did}`, ); if (response.status !== 200) { return []; diff --git a/apps/app/src/api/library.ts b/apps/app/src/api/library.ts index 5bd94b03..c1a126a5 100644 --- a/apps/app/src/api/library.ts +++ b/apps/app/src/api/library.ts @@ -24,7 +24,7 @@ export const getSongByUri = async (uri: string) => { export const getArtistTracks = async ( uri: string, - limit = 10 + limit = 10, ): Promise< { id: string; @@ -39,14 +39,14 @@ export const getArtistTracks = async ( }[] > => { const response = await axios.get( - `${API_URL}/users/${uri}/tracks?size=${limit}` + `${API_URL}/users/${uri}/tracks?size=${limit}`, ); return response.data; }; export const getArtistAlbums = async ( uri: string, - limit = 10 + limit = 10, ): Promise< { id: string; @@ -58,14 +58,14 @@ export const getArtistAlbums = async ( }[] > => { const response = await axios.get( - `${API_URL}/users/${uri}/albums?size=${limit}` + `${API_URL}/users/${uri}/albums?size=${limit}`, ); return response.data; }; export const getArtists = async (did: string, offset = 0, limit = 30) => { const response = await axios.get( - `${API_URL}/users/${did}/artists?size=${limit}&offset=${offset}` + `${API_URL}/users/${did}/artists?size=${limit}&offset=${offset}`, ); // eslint-disable-next-line @typescript-eslint/no-explicit-any return response.data.map((x: any) => ({ ...x, scrobbles: x.play_count })); @@ -73,7 +73,7 @@ export const getArtists = async (did: string, offset = 0, limit = 30) => { export const getAlbums = async (did: string, offset = 0, limit = 12) => { const response = await axios.get( - `${API_URL}/users/${did}/albums?size=${limit}&offset=${offset}` + `${API_URL}/users/${did}/albums?size=${limit}&offset=${offset}`, ); // eslint-disable-next-line @typescript-eslint/no-explicit-any return response.data.map((x: any) => ({ @@ -84,7 +84,7 @@ export const getAlbums = async (did: string, offset = 0, limit = 12) => { export const getTracks = async (did: string, offset = 0, limit = 20) => { const response = await axios.get( - `${API_URL}/users/${did}/tracks?size=${limit}&offset=${offset}` + `${API_URL}/users/${did}/tracks?size=${limit}&offset=${offset}`, ); // eslint-disable-next-line @typescript-eslint/no-explicit-any return response.data.map((x: any) => ({ ...x, scrobbles: x.play_count })); @@ -92,21 +92,21 @@ export const getTracks = async (did: string, offset = 0, limit = 20) => { export const getLovedTracks = async (did: string, offset = 0, limit = 20) => { const response = await axios.get( - `${API_URL}/users/${did}/likes?size=${limit}&offset=${offset}` + `${API_URL}/users/${did}/likes?size=${limit}&offset=${offset}`, ); return response.data; }; export const getAlbum = async (did: string, rkey: string) => { const response = await axios.get( - `${API_URL}/users/${did}/app.rocksky.album/${rkey}` + `${API_URL}/users/${did}/app.rocksky.album/${rkey}`, ); return response.data; }; export const getArtist = async (did: string, rkey: string) => { const response = await axios.get( - `${API_URL}/users/${did}/app.rocksky.artist/${rkey}` + `${API_URL}/users/${did}/app.rocksky.artist/${rkey}`, ); return response.data; }; diff --git a/apps/app/src/api/playlists.ts b/apps/app/src/api/playlists.ts index fcdaa018..082f1021 100644 --- a/apps/app/src/api/playlists.ts +++ b/apps/app/src/api/playlists.ts @@ -2,7 +2,7 @@ import axios from "axios"; import { API_URL } from "../consts"; export const getPlaylists = async ( - did: string + did: string, ): Promise< { id: string; @@ -22,7 +22,7 @@ export const getPlaylists = async ( export const getPlaylist = async ( did: string, - rkey: string + rkey: string, ): Promise<{ id: string; name: string; @@ -57,7 +57,7 @@ export const getPlaylist = async ( }[]; }> => { const response = await axios.get( - `${API_URL}/users/${did}/app.rocksky.playlist/${rkey}` + `${API_URL}/users/${did}/app.rocksky.playlist/${rkey}`, ); return response.data; }; diff --git a/apps/app/src/api/profile.ts b/apps/app/src/api/profile.ts index 050b8f0e..6b5b2a32 100644 --- a/apps/app/src/api/profile.ts +++ b/apps/app/src/api/profile.ts @@ -15,10 +15,10 @@ export const getProfileStatsByDid = async (did: string) => { export const getRecentTracksByDid = async ( did: string, offset = 0, - size = 10 + size = 10, ): Promise => { const response = await axios.get( - `${API_URL}/users/${did}/scrobbles?size=${size}&offset=${offset}` + `${API_URL}/users/${did}/scrobbles?size=${size}&offset=${offset}`, ); return response.data; }; diff --git a/apps/app/src/api/search.ts b/apps/app/src/api/search.ts index ab46d841..f00651b6 100644 --- a/apps/app/src/api/search.ts +++ b/apps/app/src/api/search.ts @@ -4,7 +4,7 @@ import { SearchResponse } from "../types/search"; export const search = async (query: string) => { const response = await axios.get( - `${API_URL}/search?q=${query}&size=100` + `${API_URL}/search?q=${query}&size=100`, ); return response.data; }; diff --git a/apps/app/src/api/spotify.ts b/apps/app/src/api/spotify.ts index 556ba7d4..1740fdc1 100644 --- a/apps/app/src/api/spotify.ts +++ b/apps/app/src/api/spotify.ts @@ -10,7 +10,7 @@ export const play = async () => { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -24,7 +24,7 @@ export const pause = async () => { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -38,7 +38,7 @@ export const next = async () => { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -52,7 +52,7 @@ export const previous = async () => { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -69,7 +69,7 @@ export const seek = async (position_ms: number) => { params: { position_ms, }, - } + }, ); return response.data; }; diff --git a/apps/app/src/atoms/did.ts b/apps/app/src/atoms/did.ts index 40dcefab..34180f71 100644 --- a/apps/app/src/atoms/did.ts +++ b/apps/app/src/atoms/did.ts @@ -1,5 +1,5 @@ import { atom } from "jotai"; export const didAtom = atom( - "did:plc:7vdlgi2bflelz7mmuxoqjfcr" + "did:plc:7vdlgi2bflelz7mmuxoqjfcr", ); diff --git a/apps/app/src/components/Avatar/AvatarWithData.tsx b/apps/app/src/components/Avatar/AvatarWithData.tsx index 641ffd1e..3b7718d4 100644 --- a/apps/app/src/components/Avatar/AvatarWithData.tsx +++ b/apps/app/src/components/Avatar/AvatarWithData.tsx @@ -12,7 +12,7 @@ const AvatarWithData = () => { const setDid = useSetAtom(didAtom); const { data, isLoading } = useProfileByDidQuery( - handle || "did:plc:7vdlgi2bflelz7mmuxoqjfcr" + handle || "did:plc:7vdlgi2bflelz7mmuxoqjfcr", ); useEffect(() => { @@ -32,7 +32,7 @@ const AvatarWithData = () => { did={data.did} onOpenBlueskyProfile={(handle: string) => { Linking.openURL( - `https://bsky.app/profile/${handle.replace("@", "")}` + `https://bsky.app/profile/${handle.replace("@", "")}`, ); }} onViewOnPdsls={(did: string) => { diff --git a/apps/app/src/hooks/useChart.tsx b/apps/app/src/hooks/useChart.tsx index 8a2699ae..a8ca81d2 100644 --- a/apps/app/src/hooks/useChart.tsx +++ b/apps/app/src/hooks/useChart.tsx @@ -51,7 +51,7 @@ function useChart() { const getSongChart = async (uri: string) => { const response = await axios.get( - `${API_URL}/public/scrobbleschart?songuri=${uri}` + `${API_URL}/public/scrobbleschart?songuri=${uri}`, ); if (response.status !== 200) { return []; @@ -61,7 +61,7 @@ function useChart() { const getArtistChart = async (uri: string) => { const response = await axios.get( - `${API_URL}/public/scrobbleschart?artisturi=${uri}` + `${API_URL}/public/scrobbleschart?artisturi=${uri}`, ); if (response.status !== 200) { return []; @@ -71,7 +71,7 @@ function useChart() { const getAlbumChart = async (uri: string) => { const response = await axios.get( - `${API_URL}/public/scrobbleschart?albumuri=${uri}` + `${API_URL}/public/scrobbleschart?albumuri=${uri}`, ); if (response.status !== 200) { return []; @@ -81,7 +81,7 @@ function useChart() { const getProfileChart = async (did: string) => { const response = await axios.get( - `${API_URL}/public/scrobbleschart?did=${did}` + `${API_URL}/public/scrobbleschart?did=${did}`, ); if (response.status !== 200) { return []; diff --git a/apps/app/src/hooks/useFeed.tsx b/apps/app/src/hooks/useFeed.tsx index 16e97aea..99467944 100644 --- a/apps/app/src/hooks/useFeed.tsx +++ b/apps/app/src/hooks/useFeed.tsx @@ -21,7 +21,7 @@ export const useFeedInfiniteQuery = (size = 20) => `${API_URL}/public/scrobbles?size=${size}&offset=${pageParam * size}`, { method: "GET", - } + }, ).then((res) => res.json()); return { feed: data, diff --git a/apps/app/src/hooks/useLike.tsx b/apps/app/src/hooks/useLike.tsx index af3bf272..e3d67cb0 100644 --- a/apps/app/src/hooks/useLike.tsx +++ b/apps/app/src/hooks/useLike.tsx @@ -29,7 +29,7 @@ const useLike = () => { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -40,13 +40,13 @@ const useLike = () => { headers: { Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; const getLikes = async (uri: string) => { const response = await axios.get( - `${API_URL}/users/${uri.replace("at://", "")}/likes` + `${API_URL}/users/${uri.replace("at://", "")}/likes`, ); return response.data; }; diff --git a/apps/app/src/hooks/useNowPlaying.tsx b/apps/app/src/hooks/useNowPlaying.tsx index 016971d8..1adfbb59 100644 --- a/apps/app/src/hooks/useNowPlaying.tsx +++ b/apps/app/src/hooks/useNowPlaying.tsx @@ -50,7 +50,7 @@ export const useNowPlaying = (did: string) => { queryKey: ["now-playing", "spotify", did], queryFn: () => fetch(`${API_URL}/spotify/currently-playing?did=${did}`).then((res) => - res.json() + res.json(), ), refetchInterval: 15000, enabled: !!did, diff --git a/apps/app/src/hooks/usePlaylists.tsx b/apps/app/src/hooks/usePlaylists.tsx index 03322dfb..e0ae4cca 100644 --- a/apps/app/src/hooks/usePlaylists.tsx +++ b/apps/app/src/hooks/usePlaylists.tsx @@ -17,7 +17,7 @@ export const usePlaylistQuery = (did: string, rkey: string) => const usePlaylists = () => { const getPlaylists = async ( - did: string + did: string, ): Promise< { id: string; @@ -37,7 +37,7 @@ const usePlaylists = () => { const getPlaylist = async ( did: string, - rkey: string + rkey: string, ): Promise<{ id: string; name: string; @@ -72,7 +72,7 @@ const usePlaylists = () => { }[]; }> => { const response = await axios.get( - `${API_URL}/users/${did}/app.rocksky.playlist/${rkey}` + `${API_URL}/users/${did}/app.rocksky.playlist/${rkey}`, ); return response.data; }; diff --git a/apps/app/src/providers/NowPlayingProvider.tsx b/apps/app/src/providers/NowPlayingProvider.tsx index bfbcf687..eb15eb0d 100644 --- a/apps/app/src/providers/NowPlayingProvider.tsx +++ b/apps/app/src/providers/NowPlayingProvider.tsx @@ -14,7 +14,7 @@ export const NowPlayingProvider = ({ children }: { children: ReactNode }) => { const memoizedNowPlaying = useMemo( () => nowPlaying, - [nowPlaying?.uri, nowPlaying?.isPlaying, nowPlaying?.liked] + [nowPlaying?.uri, nowPlaying?.isPlaying, nowPlaying?.liked], ); return ( diff --git a/apps/app/src/screens/ArtistDetails/ArtistDetailsWithData.tsx b/apps/app/src/screens/ArtistDetails/ArtistDetailsWithData.tsx index d136c994..90976e7d 100644 --- a/apps/app/src/screens/ArtistDetails/ArtistDetailsWithData.tsx +++ b/apps/app/src/screens/ArtistDetails/ArtistDetailsWithData.tsx @@ -27,10 +27,10 @@ const ArtistDetailsWithData: FC = (props) => { const rkey = route?.params?.uri?.split("at://")[1]?.split("/")[2]; const artistResult = useArtistQuery(did!, rkey!); const tracksResult = useArtistTracksQuery( - route?.params?.uri?.split("at://")[1]! + route?.params?.uri?.split("at://")[1]!, ); const albumsResult = useArtistAlbumsQuery( - route?.params?.uri?.split("at://")[1]! + route?.params?.uri?.split("at://")[1]!, ); return ( { date: item.date, uri: item.uri, albumUri: item.albumUri, - })) + })), ); }, [data?.pages]); // Only depend on data.pages instead of all of data const handleSongPress = useCallback( (uri: string) => navigation.navigate("SongDetails", { uri }), - [navigation] + [navigation], ); const handleProfilePress = useCallback( (handle: string) => navigation.navigate("UserProfile", { handle }), - [navigation] + [navigation], ); const handleAlbumPress = useCallback( (uri: string) => navigation.navigate("AlbumDetails", { uri }), - [navigation] + [navigation], ); const renderItem = useCallback( @@ -134,12 +134,12 @@ const Home = () => { onPressAlbum={handleAlbumPress} /> ), - [handleSongPress, handleProfilePress, handleAlbumPress] + [handleSongPress, handleProfilePress, handleAlbumPress], ); const renderFooter = useCallback( () => , - [isLoading, isFetchingNextPage] + [isLoading, isFetchingNextPage], ); const handleRefresh = useCallback(async () => { diff --git a/apps/app/src/screens/Home/Stories/Stories.tsx b/apps/app/src/screens/Home/Stories/Stories.tsx index 2c5a2ca0..14284437 100644 --- a/apps/app/src/screens/Home/Stories/Stories.tsx +++ b/apps/app/src/screens/Home/Stories/Stories.tsx @@ -25,7 +25,7 @@ const StoryItem = memo( className="mr-[10px]" onPress={onPress} /> - ) + ), ); const Stories: FC = (props) => { diff --git a/apps/app/src/screens/Library/Albums/Albums.tsx b/apps/app/src/screens/Library/Albums/Albums.tsx index 52706eb1..aa80f70d 100644 --- a/apps/app/src/screens/Library/Albums/Albums.tsx +++ b/apps/app/src/screens/Library/Albums/Albums.tsx @@ -53,7 +53,7 @@ const AlbumItem = memo( did="" row /> - ) + ), ); const FooterLoader = memo(({ isLoading }: { isLoading: boolean }) => ( @@ -90,12 +90,12 @@ const Albums: FC = (props) => { className="mt-[15px]" /> ), - [onPressAlbum] + [onPressAlbum], ); const renderFooter = useCallback( () => , - [isLoading, isFetchingMore] + [isLoading, isFetchingMore], ); return ( diff --git a/apps/app/src/screens/Library/Albums/AlbumsWithData.tsx b/apps/app/src/screens/Library/Albums/AlbumsWithData.tsx index bfbad4e5..7a3fa34b 100644 --- a/apps/app/src/screens/Library/Albums/AlbumsWithData.tsx +++ b/apps/app/src/screens/Library/Albums/AlbumsWithData.tsx @@ -46,7 +46,7 @@ const AlbumsWithData: FC = (props) => { cover: album.album_art, uri: album.uri, rank: index + 1, - })) + })), ); }, [data]); diff --git a/apps/app/src/screens/Library/Artists/Artists.tsx b/apps/app/src/screens/Library/Artists/Artists.tsx index f02c1611..0884ee1b 100644 --- a/apps/app/src/screens/Library/Artists/Artists.tsx +++ b/apps/app/src/screens/Library/Artists/Artists.tsx @@ -49,7 +49,7 @@ const ArtistItem = memo( did="" row /> - ) + ), ); const FooterLoader = memo(({ isLoading }: { isLoading: boolean }) => ( @@ -85,12 +85,12 @@ const Artists: FC = (props) => { className="mt-[10px]" /> ), - [onPressArtist] + [onPressArtist], ); const renderFooter = useCallback( () => , - [isLoading, isFetchingMore] + [isLoading, isFetchingMore], ); return ( diff --git a/apps/app/src/screens/Library/Artists/ArtistsWithData.tsx b/apps/app/src/screens/Library/Artists/ArtistsWithData.tsx index cf1abe0d..807e09a2 100644 --- a/apps/app/src/screens/Library/Artists/ArtistsWithData.tsx +++ b/apps/app/src/screens/Library/Artists/ArtistsWithData.tsx @@ -45,7 +45,7 @@ const ArtistsWithData: FC = (props) => { image: artist.picture, uri: artist.uri, rank: index + 1, - })) + })), ); }, [data]); diff --git a/apps/app/src/screens/Library/Scrobbles/Scrobbles.tsx b/apps/app/src/screens/Library/Scrobbles/Scrobbles.tsx index 106df9ea..54d1cd0a 100644 --- a/apps/app/src/screens/Library/Scrobbles/Scrobbles.tsx +++ b/apps/app/src/screens/Library/Scrobbles/Scrobbles.tsx @@ -60,7 +60,7 @@ const SongItem = memo( listeningDate={listeningDate} did="" /> - ) + ), ); const FooterLoader = memo(({ isLoading }: { isLoading: boolean }) => ( @@ -100,12 +100,12 @@ const Scrobbles: FC = (props) => { albumUri={item.albumUri} /> ), - [onPressTrack, onPressAlbum] + [onPressTrack, onPressAlbum], ); const renderFooter = useCallback( () => , - [isLoading, isFetchingMore] + [isLoading, isFetchingMore], ); const getItemLayout = useCallback( @@ -114,7 +114,7 @@ const Scrobbles: FC = (props) => { offset: 70 * index, index, }), - [] + [], ); const handleEndReached = useCallback(() => { diff --git a/apps/app/src/screens/Library/Scrobbles/ScrobblesWithData.tsx b/apps/app/src/screens/Library/Scrobbles/ScrobblesWithData.tsx index a2eed630..a914a98b 100644 --- a/apps/app/src/screens/Library/Scrobbles/ScrobblesWithData.tsx +++ b/apps/app/src/screens/Library/Scrobbles/ScrobblesWithData.tsx @@ -50,7 +50,7 @@ const ScrobblesWithData: FC = (props) => { listeningDate: dayjs.utc(scrobble.created_at).local().fromNow(), uri: scrobble.uri, albumUri: scrobble.album_uri, - })) + })), ); }, [data]); diff --git a/apps/app/src/screens/Library/Tracks/Tracks.tsx b/apps/app/src/screens/Library/Tracks/Tracks.tsx index 3e216d24..0a91e0b7 100644 --- a/apps/app/src/screens/Library/Tracks/Tracks.tsx +++ b/apps/app/src/screens/Library/Tracks/Tracks.tsx @@ -60,7 +60,7 @@ const SongItem = memo( className={className} did="" /> - ) + ), ); const FooterLoader = memo(({ isLoading }: { isLoading: boolean }) => ( @@ -100,12 +100,12 @@ const Tracks: FC = (props) => { albumUri={item.albumUri} /> ), - [onPressTrack, onPressAlbum] + [onPressTrack, onPressAlbum], ); const renderFooter = useCallback( () => , - [isLoading, isFetchingMore] + [isLoading, isFetchingMore], ); const getItemLayout = useCallback( @@ -114,7 +114,7 @@ const Tracks: FC = (props) => { offset: 70 * index, index, }), - [] + [], ); const handleEndReached = useCallback(() => { diff --git a/apps/app/src/screens/Profile/LovedTracks/LovedTracksWithData.tsx b/apps/app/src/screens/Profile/LovedTracks/LovedTracksWithData.tsx index db7e69d2..3e3a2ffb 100644 --- a/apps/app/src/screens/Profile/LovedTracks/LovedTracksWithData.tsx +++ b/apps/app/src/screens/Profile/LovedTracks/LovedTracksWithData.tsx @@ -23,7 +23,7 @@ const LovedTracksWithData = () => { uri: track.uri, albumUri: track.album_uri, date: xata_createdat, - }) + }), ) ?? [] } total={data?.lovedTracks ?? 0} diff --git a/apps/app/src/screens/Search/SearchWithData.tsx b/apps/app/src/screens/Search/SearchWithData.tsx index 8dd212f0..c2076a90 100644 --- a/apps/app/src/screens/Search/SearchWithData.tsx +++ b/apps/app/src/screens/Search/SearchWithData.tsx @@ -39,11 +39,13 @@ const SearchWithData = () => { setResults( R.pipe( R.prop("records"), - R.sort(R.descend((item) => R.path(["record", "xata_score"], item) ?? 0)) + R.sort( + R.descend((item) => R.path(["record", "xata_score"], item) ?? 0), + ), )(data) as { record: any; table: string; - }[] + }[], ); }, [data]); diff --git a/apps/app/src/screens/SongDetails/SongDetailsWithData.tsx b/apps/app/src/screens/SongDetails/SongDetailsWithData.tsx index e385d6d4..4729b230 100644 --- a/apps/app/src/screens/SongDetails/SongDetailsWithData.tsx +++ b/apps/app/src/screens/SongDetails/SongDetailsWithData.tsx @@ -23,14 +23,14 @@ const SongDetailsWithData: FC = (props) => { useNavigation>(); const songResult = useSongByUriQuery(route?.params?.uri?.split("at://")[1]!); const scrobbleResult = useFeedByUriQuery( - route?.params?.uri?.split("at://")[1]! + route?.params?.uri?.split("at://")[1]!, ); const song = songResult.data?.title ? songResult.data : scrobbleResult.data; const artistTracksResult = useArtistTracksQuery( - song?.artistUri?.split("at://")[1]! + song?.artistUri?.split("at://")[1]!, ); const artistAlbumsResult = useArtistAlbumsQuery( - song?.artistUri?.split("at://")[1]! + song?.artistUri?.split("at://")[1]!, ); return ( <> diff --git a/apps/web/biome.json b/apps/web/biome.json new file mode 100644 index 00000000..754a95e8 --- /dev/null +++ b/apps/web/biome.json @@ -0,0 +1,325 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.2.3/schema.json", + "vcs": { + "enabled": false, + "clientKind": "git", + "useIgnoreFile": false + }, + "files": { + "ignoreUnknown": false + }, + "formatter": { + "enabled": true, + "indentStyle": "space" + }, + "linter": { + "enabled": true, + "rules": { + "recommended": false + }, + "includes": [ + "**", + "!dist" + ] + }, + "javascript": { + "formatter": { + "quoteStyle": "double" + } + }, + "overrides": [ + { + "includes": [ + "**/*.{ts,tsx}" + ], + "linter": { + "rules": { + "complexity": { + "noAdjacentSpacesInRegex": "error", + "noExtraBooleanCast": "error", + "noUselessCatch": "error", + "noUselessEscapeInRegex": "error" + }, + "correctness": { + "noConstAssign": "error", + "noConstantCondition": "error", + "noEmptyCharacterClassInRegex": "error", + "noEmptyPattern": "error", + "noGlobalObjectCalls": "error", + "noInvalidBuiltinInstantiation": "error", + "noInvalidConstructorSuper": "error", + "noNonoctalDecimalEscape": "error", + "noPrecisionLoss": "error", + "noSelfAssign": "error", + "noSetterReturn": "error", + "noSwitchDeclarations": "error", + "noUndeclaredVariables": "error", + "noUnreachable": "error", + "noUnreachableSuper": "error", + "noUnsafeFinally": "error", + "noUnsafeOptionalChaining": "error", + "noUnusedLabels": "error", + "noUnusedPrivateClassMembers": "error", + "noUnusedVariables": "error", + "useIsNan": "error", + "useValidForDirection": "error", + "useValidTypeof": "error", + "useYield": "error" + }, + "suspicious": { + "noAsyncPromiseExecutor": "error", + "noCatchAssign": "error", + "noClassAssign": "error", + "noCompareNegZero": "error", + "noConstantBinaryExpressions": "error", + "noControlCharactersInRegex": "error", + "noDebugger": "error", + "noDuplicateCase": "error", + "noDuplicateClassMembers": "error", + "noDuplicateElseIf": "error", + "noDuplicateObjectKeys": "error", + "noDuplicateParameters": "error", + "noEmptyBlockStatements": "error", + "noFallthroughSwitchClause": "error", + "noFunctionAssign": "error", + "noGlobalAssign": "error", + "noImportAssign": "error", + "noIrregularWhitespace": "error", + "noMisleadingCharacterClass": "error", + "noPrototypeBuiltins": "error", + "noRedeclare": "error", + "noShadowRestrictedNames": "error", + "noSparseArray": "error", + "noUnsafeNegation": "error", + "noUselessRegexBackrefs": "error", + "noWith": "error", + "useGetterReturn": "error" + } + } + } + }, + { + "includes": [ + "**/*.{ts,tsx}" + ], + "javascript": { + "globals": [] + } + }, + { + "includes": [ + "**/*.{ts,tsx}" + ], + "linter": { + "rules": { + "complexity": { + "noArguments": "error" + }, + "correctness": { + "noConstAssign": "off", + "noGlobalObjectCalls": "off", + "noInvalidBuiltinInstantiation": "off", + "noInvalidConstructorSuper": "off", + "noSetterReturn": "off", + "noUndeclaredVariables": "off", + "noUnreachable": "off", + "noUnreachableSuper": "off" + }, + "style": { + "useConst": "error" + }, + "suspicious": { + "noClassAssign": "off", + "noDuplicateClassMembers": "off", + "noDuplicateObjectKeys": "off", + "noDuplicateParameters": "off", + "noFunctionAssign": "off", + "noImportAssign": "off", + "noRedeclare": "off", + "noUnsafeNegation": "off", + "noVar": "error", + "noWith": "off", + "useGetterReturn": "off" + } + } + } + }, + { + "includes": [ + "**/*.{ts,tsx}" + ], + "linter": { + "rules": { + "complexity": { + "noUselessTypeConstraint": "error" + }, + "correctness": { + "noUnusedVariables": "error" + }, + "style": { + "noCommonJs": "error", + "noNamespace": "error", + "useArrayLiterals": "error", + "useAsConstAssertion": "error" + }, + "suspicious": { + "noExplicitAny": "error", + "noExtraNonNullAssertion": "error", + "noMisleadingInstantiator": "error", + "noUnsafeDeclarationMerging": "error", + "useNamespaceKeyword": "error" + } + } + } + }, + { + "includes": [ + "**/*.{ts,tsx}" + ], + "javascript": { + "globals": [ + "onanimationend", + "ongamepadconnected", + "onlostpointercapture", + "onanimationiteration", + "onkeyup", + "onmousedown", + "onanimationstart", + "onslotchange", + "onprogress", + "ontransitionstart", + "onpause", + "onended", + "onpointerover", + "onscrollend", + "onformdata", + "ontransitionrun", + "onanimationcancel", + "ondrag", + "onchange", + "onbeforeinstallprompt", + "onbeforexrselect", + "onmessage", + "ontransitioncancel", + "onpointerdown", + "onabort", + "onpointerout", + "oncuechange", + "ongotpointercapture", + "onscrollsnapchanging", + "onsearch", + "onsubmit", + "onstalled", + "onsuspend", + "onreset", + "onerror", + "onmouseenter", + "ongamepaddisconnected", + "onresize", + "ondragover", + "onbeforetoggle", + "onmouseover", + "onpagehide", + "onmousemove", + "onratechange", + "onmessageerror", + "onwheel", + "ondevicemotion", + "onauxclick", + "ontransitionend", + "onpaste", + "onpageswap", + "ononline", + "ondeviceorientationabsolute", + "onkeydown", + "onclose", + "onselect", + "onpageshow", + "onpointercancel", + "onbeforematch", + "onpointerrawupdate", + "ondragleave", + "onscrollsnapchange", + "onseeked", + "onwaiting", + "onbeforeunload", + "onplaying", + "onvolumechange", + "ondragend", + "onstorage", + "onloadeddata", + "onfocus", + "onoffline", + "onplay", + "onafterprint", + "onclick", + "oncut", + "onmouseout", + "ondblclick", + "oncanplay", + "onloadstart", + "onappinstalled", + "onpointermove", + "ontoggle", + "oncontextmenu", + "onblur", + "oncancel", + "onbeforeprint", + "oncontextrestored", + "onloadedmetadata", + "onpointerup", + "onlanguagechange", + "oncopy", + "onselectstart", + "onscroll", + "onload", + "ondragstart", + "onbeforeinput", + "oncanplaythrough", + "oninput", + "oninvalid", + "ontimeupdate", + "ondurationchange", + "onselectionchange", + "onmouseup", + "location", + "onkeypress", + "onpointerleave", + "oncontextlost", + "ondrop", + "onsecuritypolicyviolation", + "oncontentvisibilityautostatechange", + "ondeviceorientation", + "onseeking", + "onrejectionhandled", + "onunload", + "onmouseleave", + "onhashchange", + "onpointerenter", + "onmousewheel", + "onunhandledrejection", + "ondragenter", + "onpopstate", + "onpagereveal", + "onemptied" + ] + }, + "linter": { + "rules": { + "correctness": { + "useExhaustiveDependencies": "warn", + "useHookAtTopLevel": "error" + } + } + } + } + ], + "assist": { + "enabled": true, + "actions": { + "source": { + "organizeImports": "on" + } + } + } +} \ No newline at end of file diff --git a/apps/web/package.json b/apps/web/package.json index d1852289..c90697ef 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -8,11 +8,12 @@ "prod": "vite --mode prod", "build": "tsc -b && vite build", "build:prod": "tsc -b && vite build --mode prod", - "lint": "eslint .", + "lint": "biome lint src", "preview": "bun run build && wrangler pages dev ./dist", "deploy": "bun run build && wrangler pages deploy ./dist", "storybook": "storybook dev -p 6006", - "build-storybook": "storybook build" + "build-storybook": "storybook build", + "format": "biome format src" }, "dependencies": { "@emotion/react": "^11.14.0", @@ -70,6 +71,7 @@ "zod": "^3.24.2" }, "devDependencies": { + "@biomejs/biome": "^2.2.3", "@chromatic-com/storybook": "^3.2.4", "@cloudflare/workers-types": "^4.20250124.3", "@eslint/js": "^9.17.0", diff --git a/apps/web/src/api/apikeys.ts b/apps/web/src/api/apikeys.ts index 4ec01454..6a5f5736 100644 --- a/apps/web/src/api/apikeys.ts +++ b/apps/web/src/api/apikeys.ts @@ -10,7 +10,7 @@ export const createApiKey = async (name: string, description?: string) => { return await axios.post( `${API_URL}/apikeys`, { name, description }, - { headers } + { headers }, ); }; @@ -32,11 +32,11 @@ export const updateApiKey = async ( id: string, enabled: boolean, name?: string, - description?: string + description?: string, ) => { return await axios.put( `${API_URL}/apikeys/${id}`, { name, description, enabled }, - { headers } + { headers }, ); }; diff --git a/apps/web/src/api/beta.ts b/apps/web/src/api/beta.ts index 0acc4226..decba8c2 100644 --- a/apps/web/src/api/beta.ts +++ b/apps/web/src/api/beta.ts @@ -10,19 +10,19 @@ export const joinBeta = async (email: string, platform: string) => { return await axios.post( `${API_URL}/spotify/join`, { email }, - { headers } + { headers }, ); case "google": return await axios.post( `${API_URL}/googledrive/join`, { email }, - { headers } + { headers }, ); case "dropbox": return await axios.post( `${API_URL}/dropbox/join`, { email }, - { headers } + { headers }, ); default: return; diff --git a/apps/web/src/api/charts.ts b/apps/web/src/api/charts.ts index 39ff3cce..e0032ddf 100644 --- a/apps/web/src/api/charts.ts +++ b/apps/web/src/api/charts.ts @@ -7,7 +7,7 @@ export const getScrobblesChart = () => { export const getSongChart = async (uri: string) => { const response = await axios.get( - `${API_URL}/xrpc/app.rocksky.charts.getScrobblesChart?songuri=${uri}` + `${API_URL}/xrpc/app.rocksky.charts.getScrobblesChart?songuri=${uri}`, ); if (response.status !== 200) { return []; @@ -17,7 +17,7 @@ export const getSongChart = async (uri: string) => { export const getArtistChart = async (uri: string) => { const response = await axios.get( - `${API_URL}/xrpc/app.rocksky.charts.getScrobblesChart?artisturi=${uri}` + `${API_URL}/xrpc/app.rocksky.charts.getScrobblesChart?artisturi=${uri}`, ); if (response.status !== 200) { return []; @@ -27,7 +27,7 @@ export const getArtistChart = async (uri: string) => { export const getAlbumChart = async (uri: string) => { const response = await axios.get( - `${API_URL}/xrpc/app.rocksky.charts.getScrobblesChart?albumuri=${uri}` + `${API_URL}/xrpc/app.rocksky.charts.getScrobblesChart?albumuri=${uri}`, ); if (response.status !== 200) { return []; @@ -37,7 +37,7 @@ export const getAlbumChart = async (uri: string) => { export const getProfileChart = async (did: string) => { const response = await axios.get( - `${API_URL}/xrpc/app.rocksky.charts.getScrobblesChart?did=${did}` + `${API_URL}/xrpc/app.rocksky.charts.getScrobblesChart?did=${did}`, ); if (response.status !== 200) { return []; diff --git a/apps/web/src/api/library.ts b/apps/web/src/api/library.ts index 6613a4f2..93d94669 100644 --- a/apps/web/src/api/library.ts +++ b/apps/web/src/api/library.ts @@ -29,7 +29,7 @@ export const getSongByUri = async (uri: string) => { export const getArtistTracks = async ( uri: string, - limit = 10 + limit = 10, ): Promise< { id: string; @@ -45,14 +45,14 @@ export const getArtistTracks = async ( > => { const response = await client.get( "/xrpc/app.rocksky.artist.getArtistTracks", - { params: { uri, limit } } + { params: { uri, limit } }, ); return response.data.tracks; }; export const getArtistAlbums = async ( uri: string, - limit = 10 + limit = 10, ): Promise< { id: string; @@ -65,7 +65,7 @@ export const getArtistAlbums = async ( > => { const response = await client.get( "/xrpc/app.rocksky.artist.getArtistAlbums", - { params: { uri, limit } } + { params: { uri, limit } }, ); return response.data.albums; }; @@ -96,7 +96,7 @@ export const getLovedTracks = async (did: string, offset = 0, limit = 20) => { "/xrpc/app.rocksky.actor.getActorLovedSongs", { params: { did, limit, offset }, - } + }, ); return response.data.tracks; }; diff --git a/apps/web/src/api/likes.ts b/apps/web/src/api/likes.ts index 3971cd25..09db0cbf 100644 --- a/apps/web/src/api/likes.ts +++ b/apps/web/src/api/likes.ts @@ -10,7 +10,7 @@ export const like = async (uri: string) => { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -21,13 +21,13 @@ export const unlike = async (uri: string) => { headers: { Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; export const getLikes = async (uri: string) => { const response = await axios.get( - `${API_URL}/users/${uri.replace("at://", "")}/likes` + `${API_URL}/users/${uri.replace("at://", "")}/likes`, ); return response.data; }; diff --git a/apps/web/src/api/playlists.ts b/apps/web/src/api/playlists.ts index d099be0b..e7c03e46 100644 --- a/apps/web/src/api/playlists.ts +++ b/apps/web/src/api/playlists.ts @@ -1,7 +1,7 @@ import { client } from "."; export const getPlaylists = async ( - did: string + did: string, ): Promise< { id: string; @@ -19,14 +19,14 @@ export const getPlaylists = async ( "/xrpc/app.rocksky.actor.getActorPlaylists", { params: { did }, - } + }, ); return response.data.playlists; }; export const getPlaylist = async ( did: string, - rkey: string + rkey: string, ): Promise<{ id: string; name: string; diff --git a/apps/web/src/api/profile.ts b/apps/web/src/api/profile.ts index ba25a4d6..7ca41a10 100644 --- a/apps/web/src/api/profile.ts +++ b/apps/web/src/api/profile.ts @@ -18,13 +18,13 @@ export const getProfileStatsByDid = async (did: string) => { export const getRecentTracksByDid = async ( did: string, offset = 0, - limit = 10 + limit = 10, ): Promise => { const response = await client.get<{ scrobbles: Scrobble[] }>( "/xrpc/app.rocksky.actor.getActorScrobbles", { params: { did, offset, limit }, - } + }, ); return response.data.scrobbles || []; }; diff --git a/apps/web/src/api/search.ts b/apps/web/src/api/search.ts index 19dae4d8..d1f96cf2 100644 --- a/apps/web/src/api/search.ts +++ b/apps/web/src/api/search.ts @@ -3,7 +3,7 @@ import { API_URL } from "../consts"; export const search = async (query: string) => { const response = await axios.get( - `${API_URL}/xrpc/app.rocksky.feed.search?query=${query}&size=100` + `${API_URL}/xrpc/app.rocksky.feed.search?query=${query}&size=100`, ); return response.data; }; diff --git a/apps/web/src/api/shouts.ts b/apps/web/src/api/shouts.ts index da3b5235..164f9c3a 100644 --- a/apps/web/src/api/shouts.ts +++ b/apps/web/src/api/shouts.ts @@ -10,7 +10,7 @@ export const shout = async (uri: string, message: string) => { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -22,7 +22,7 @@ export const getShouts = async (uri: string) => { headers: { Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -36,14 +36,14 @@ export const reply = async (uri: string, message: string) => { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; export const getReplies = async (uri: string) => { const response = await axios.get( - `${API_URL}/users/${uri.replace("at://", "")}/replies` + `${API_URL}/users/${uri.replace("at://", "")}/replies`, ); return response.data; }; @@ -56,7 +56,7 @@ export const reportShout = async (uri: string) => { headers: { Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -68,7 +68,7 @@ export const deleteShout = async (uri: string) => { headers: { Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -80,7 +80,7 @@ export const cancelReport = async (uri: string) => { headers: { Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; diff --git a/apps/web/src/api/spotify.ts b/apps/web/src/api/spotify.ts index 556ba7d4..1740fdc1 100644 --- a/apps/web/src/api/spotify.ts +++ b/apps/web/src/api/spotify.ts @@ -10,7 +10,7 @@ export const play = async () => { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -24,7 +24,7 @@ export const pause = async () => { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -38,7 +38,7 @@ export const next = async () => { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -52,7 +52,7 @@ export const previous = async () => { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -69,7 +69,7 @@ export const seek = async (position_ms: number) => { params: { position_ms, }, - } + }, ); return response.data; }; diff --git a/apps/web/src/components/Handle/styles.tsx b/apps/web/src/components/Handle/styles.tsx index 8b137891..e69de29b 100644 --- a/apps/web/src/components/Handle/styles.tsx +++ b/apps/web/src/components/Handle/styles.tsx @@ -1 +0,0 @@ - diff --git a/apps/web/src/components/ScrobblesAreaChart/ScrobblesAreaChart.tsx b/apps/web/src/components/ScrobblesAreaChart/ScrobblesAreaChart.tsx index 9ae82307..ac1064b8 100644 --- a/apps/web/src/components/ScrobblesAreaChart/ScrobblesAreaChart.tsx +++ b/apps/web/src/components/ScrobblesAreaChart/ScrobblesAreaChart.tsx @@ -64,7 +64,7 @@ function ScrobblesAreaChart() { if (pathname.includes("/artist/")) { const charts = await getArtistChart( - `at://${did}/app.rocksky.artist/${rkey}` + `at://${did}/app.rocksky.artist/${rkey}`, ); setData(charts); return; @@ -72,7 +72,7 @@ function ScrobblesAreaChart() { if (pathname.includes("/album/")) { const charts = await getAlbumChart( - `at://${did}/app.rocksky.album/${rkey}` + `at://${did}/app.rocksky.album/${rkey}`, ); setData(charts); return; @@ -80,7 +80,7 @@ function ScrobblesAreaChart() { if (pathname.includes("/song/")) { const charts = await getSongChart( - `at://${did}/app.rocksky.song/${rkey}` + `at://${did}/app.rocksky.song/${rkey}`, ); setData(charts); return; @@ -88,7 +88,7 @@ function ScrobblesAreaChart() { if (pathname.includes("/scrobble/")) { const charts = await getSongChart( - `at://${did}/app.rocksky.scrobble/${rkey}` + `at://${did}/app.rocksky.scrobble/${rkey}`, ); setData(charts); return; diff --git a/apps/web/src/components/Shout/ShoutList/Shout/Shout.tsx b/apps/web/src/components/Shout/ShoutList/Shout/Shout.tsx index fd9043f7..ef1a9920 100644 --- a/apps/web/src/components/Shout/ShoutList/Shout/Shout.tsx +++ b/apps/web/src/components/Shout/ShoutList/Shout/Shout.tsx @@ -192,7 +192,7 @@ function Shout(props: ShoutProps) {
= ({ columns, files }) => { ? null : flexRender( header.column.columnDef.header, - header.getContext() + header.getContext(), )} ))} diff --git a/apps/web/src/hooks/useBeta.tsx b/apps/web/src/hooks/useBeta.tsx index 0a47d83d..ff688b28 100644 --- a/apps/web/src/hooks/useBeta.tsx +++ b/apps/web/src/hooks/useBeta.tsx @@ -19,19 +19,19 @@ function useBeta() { return await axios.post( `${API_URL}/spotify/join`, { email }, - { headers } + { headers }, ); case "google": return await axios.post( `${API_URL}/googledrive/join`, { email }, - { headers } + { headers }, ); case "dropbox": return await axios.post( `${API_URL}/dropbox/join`, { email }, - { headers } + { headers }, ); default: return; diff --git a/apps/web/src/hooks/useChart.tsx b/apps/web/src/hooks/useChart.tsx index 81654b81..003e08c5 100644 --- a/apps/web/src/hooks/useChart.tsx +++ b/apps/web/src/hooks/useChart.tsx @@ -52,7 +52,7 @@ function useChart() { const { data: scrobblesChart } = useSWR( "/xrpc/app.rocksky.charts.getScrobblesChart", - fetcher + fetcher, ); const getScrobblesChart = () => { @@ -62,7 +62,7 @@ function useChart() { const getSongChart = async (uri: string) => { const response = await client.get( "/xrpc/app.rocksky.charts.getScrobblesChart", - { params: { songuri: uri } } + { params: { songuri: uri } }, ); if (response.status !== 200) { return []; @@ -73,7 +73,7 @@ function useChart() { const getArtistChart = async (uri: string) => { const response = await client.get( "/xrpc/app.rocksky.charts.getScrobblesChart", - { params: { artisturi: uri } } + { params: { artisturi: uri } }, ); if (response.status !== 200) { return []; @@ -84,7 +84,7 @@ function useChart() { const getAlbumChart = async (uri: string) => { const response = await client.get( "/xrpc/app.rocksky.charts.getScrobblesChart", - { params: { albumuri: uri } } + { params: { albumuri: uri } }, ); if (response.status !== 200) { return []; @@ -95,7 +95,7 @@ function useChart() { const getProfileChart = async (did: string) => { const response = await client.get( "/xrpc/app.rocksky.charts.getScrobblesChart", - { params: { did } } + { params: { did } }, ); if (response.status !== 200) { return []; diff --git a/apps/web/src/hooks/useLike.tsx b/apps/web/src/hooks/useLike.tsx index af3bf272..e3d67cb0 100644 --- a/apps/web/src/hooks/useLike.tsx +++ b/apps/web/src/hooks/useLike.tsx @@ -29,7 +29,7 @@ const useLike = () => { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -40,13 +40,13 @@ const useLike = () => { headers: { Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; const getLikes = async (uri: string) => { const response = await axios.get( - `${API_URL}/users/${uri.replace("at://", "")}/likes` + `${API_URL}/users/${uri.replace("at://", "")}/likes`, ); return response.data; }; diff --git a/apps/web/src/hooks/useNowPlaying.tsx b/apps/web/src/hooks/useNowPlaying.tsx index 970f14f7..cdb63c4d 100644 --- a/apps/web/src/hooks/useNowPlaying.tsx +++ b/apps/web/src/hooks/useNowPlaying.tsx @@ -22,7 +22,7 @@ export const useNowPlayingsQuery = () => queryFn: () => client.get<{ nowPlayings: NowPlayings }>( "/xrpc/app.rocksky.feed.getNowPlayings", - { params: { size: 7 } } + { params: { size: 7 } }, ), refetchInterval: 6000, select: (res) => res.data.nowPlayings || [], diff --git a/apps/web/src/hooks/usePlaylists.tsx b/apps/web/src/hooks/usePlaylists.tsx index 03322dfb..e0ae4cca 100644 --- a/apps/web/src/hooks/usePlaylists.tsx +++ b/apps/web/src/hooks/usePlaylists.tsx @@ -17,7 +17,7 @@ export const usePlaylistQuery = (did: string, rkey: string) => const usePlaylists = () => { const getPlaylists = async ( - did: string + did: string, ): Promise< { id: string; @@ -37,7 +37,7 @@ const usePlaylists = () => { const getPlaylist = async ( did: string, - rkey: string + rkey: string, ): Promise<{ id: string; name: string; @@ -72,7 +72,7 @@ const usePlaylists = () => { }[]; }> => { const response = await axios.get( - `${API_URL}/users/${did}/app.rocksky.playlist/${rkey}` + `${API_URL}/users/${did}/app.rocksky.playlist/${rkey}`, ); return response.data; }; diff --git a/apps/web/src/hooks/useProfile.tsx b/apps/web/src/hooks/useProfile.tsx index 9f52dad3..385e4c89 100644 --- a/apps/web/src/hooks/useProfile.tsx +++ b/apps/web/src/hooks/useProfile.tsx @@ -49,7 +49,7 @@ function useProfile(token?: string | null) { headers: { Authorization: `Bearer ${token}`, }, - } + }, ).then((res) => res.text()); setData(response); setError(null); diff --git a/apps/web/src/hooks/useShout.tsx b/apps/web/src/hooks/useShout.tsx index 5068b168..b360556a 100644 --- a/apps/web/src/hooks/useShout.tsx +++ b/apps/web/src/hooks/useShout.tsx @@ -55,7 +55,7 @@ function useShout() { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -67,7 +67,7 @@ function useShout() { headers: { Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }, []); @@ -81,14 +81,14 @@ function useShout() { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; const getReplies = useCallback(async (uri: string) => { const response = await axios.get( - `${API_URL}/users/${uri.replace("at://", "")}/replies` + `${API_URL}/users/${uri.replace("at://", "")}/replies`, ); return response.data; }, []); @@ -101,7 +101,7 @@ function useShout() { headers: { Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -113,7 +113,7 @@ function useShout() { headers: { Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -125,7 +125,7 @@ function useShout() { headers: { Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; diff --git a/apps/web/src/hooks/useSpotify.tsx b/apps/web/src/hooks/useSpotify.tsx index 1ddd7692..3afc0726 100644 --- a/apps/web/src/hooks/useSpotify.tsx +++ b/apps/web/src/hooks/useSpotify.tsx @@ -38,7 +38,7 @@ function useSpotify() { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -52,7 +52,7 @@ function useSpotify() { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -66,7 +66,7 @@ function useSpotify() { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -80,7 +80,7 @@ function useSpotify() { "Content-Type": "application/json", Authorization: `Bearer ${localStorage.getItem("token")}`, }, - } + }, ); return response.data; }; @@ -97,7 +97,7 @@ function useSpotify() { params: { position_ms, }, - } + }, ); return response.data; }; diff --git a/apps/web/src/index.css b/apps/web/src/index.css index 255329bc..b2591237 100644 --- a/apps/web/src/index.css +++ b/apps/web/src/index.css @@ -1,47 +1,61 @@ - @tailwind utilities; @font-face { - font-family: 'RockfordSansLight'; - src: local('RockfordSansLight'), url(./assets/fonts/RockfordSans-Light.otf) format('opentype'); + font-family: "RockfordSansLight"; + src: + local("RockfordSansLight"), + url(./assets/fonts/RockfordSans-Light.otf) format("opentype"); } @font-face { - font-family: 'RockfordSansRegular'; - src: local('RockfordSans'), url(./assets/fonts/RockfordSans-Regular.otf) format('opentype'); + font-family: "RockfordSansRegular"; + src: + local("RockfordSans"), + url(./assets/fonts/RockfordSans-Regular.otf) format("opentype"); } @font-face { - font-family: 'RockfordSansMedium'; - src: local('RockfordSans'), url(./assets/fonts/RockfordSans-Medium.otf) format('opentype'); + font-family: "RockfordSansMedium"; + src: + local("RockfordSans"), + url(./assets/fonts/RockfordSans-Medium.otf) format("opentype"); } @font-face { - font-family: 'RockfordSansBold'; + font-family: "RockfordSansBold"; font-weight: 900; - src: local('RockfordSans'), url(./assets/fonts/RockfordSans-Bold.otf) format('opentype'); + src: + local("RockfordSans"), + url(./assets/fonts/RockfordSans-Bold.otf) format("opentype"); } @font-face { - font-family: 'RockfordSansExtraBold'; + font-family: "RockfordSansExtraBold"; font-weight: 900; - src: local('RockfordSans'), url(./assets/fonts/RockfordSans-ExtraBold.otf) format('opentype'); + src: + local("RockfordSans"), + url(./assets/fonts/RockfordSans-ExtraBold.otf) format("opentype"); } @font-face { - font-family: 'UberMove'; - src: local('RockfordSans'), url(./assets/fonts/RockfordSans-Light.otf) format('opentype'); + font-family: "UberMove"; + src: + local("RockfordSans"), + url(./assets/fonts/RockfordSans-Light.otf) format("opentype"); } @font-face { - font-family: 'UberMoveText'; - src: local('RockfordSans'), url(./assets/fonts/RockfordSans-Regular.otf) format('opentype'); + font-family: "UberMoveText"; + src: + local("RockfordSans"), + url(./assets/fonts/RockfordSans-Regular.otf) format("opentype"); } body { margin: 0; - font-family: RockfordSansLight, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + font-family: + RockfordSansLight, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", + "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -72,7 +86,7 @@ body { .dark { --color-background: #130825; - --color-text: oklch(95.07% .028 338.58); + --color-text: oklch(95.07% 0.028 338.58); --color-primary: #ff2876; --color-text-muted: rgb(191 174 195 / 65%); --color-border: #310e64; @@ -100,8 +114,8 @@ td > div { color: var(--color-text-muted) !important; } - - * { - transition: background-color 0.1s ease, color 0.1s ease; -} \ No newline at end of file + transition: + background-color 0.1s ease, + color 0.1s ease; +} diff --git a/apps/web/src/layouts/Navbar/Navbar.tsx b/apps/web/src/layouts/Navbar/Navbar.tsx index 816c8e00..04178a5b 100644 --- a/apps/web/src/layouts/Navbar/Navbar.tsx +++ b/apps/web/src/layouts/Navbar/Navbar.tsx @@ -53,7 +53,7 @@ function Navbar() { const jwt = localStorage.getItem("token"); const { enqueue } = useSnackbar(); const profileStats = useProfileStatsByDidQuery( - R.propOr(undefined, "did", profile) + R.propOr(undefined, "did", profile), ); const { data } = useQuery({ @@ -83,7 +83,7 @@ function Navbar() { { message: "Spotify account connected successfully!", }, - DURATION.long + DURATION.long, ); } }, [enqueue, profile]); @@ -201,7 +201,7 @@ function Navbar() { }); localStorage.setItem( "darkMode", - e.target.checked ? "true" : "false" + e.target.checked ? "true" : "false", ); }} labelPlacement={LABEL_PLACEMENT.right} diff --git a/apps/web/src/layouts/Search/Search.tsx b/apps/web/src/layouts/Search/Search.tsx index 5a694930..ea2d988b 100644 --- a/apps/web/src/layouts/Search/Search.tsx +++ b/apps/web/src/layouts/Search/Search.tsx @@ -238,7 +238,7 @@ function Search() { /> )} {["artists", "albums", "tracks"].includes( - item._federation.indexUid + item._federation.indexUid, ) && (
diff --git a/apps/web/src/layouts/SpotifyLogin/SpotifyLogin.tsx b/apps/web/src/layouts/SpotifyLogin/SpotifyLogin.tsx index 1fb1cba1..9c449763 100644 --- a/apps/web/src/layouts/SpotifyLogin/SpotifyLogin.tsx +++ b/apps/web/src/layouts/SpotifyLogin/SpotifyLogin.tsx @@ -75,7 +75,7 @@ function SpotifyLogin() { message: "Your request to join the beta program has been submitted. We'll notify you once you're approved!", }, - DURATION.long + DURATION.long, ); close(); diff --git a/apps/web/src/lib/player.ts b/apps/web/src/lib/player.ts index 50545375..a2c780c8 100644 --- a/apps/web/src/lib/player.ts +++ b/apps/web/src/lib/player.ts @@ -23,7 +23,7 @@ class AudioPlayer { this.buffer = this.audioContext.createBuffer( channels, pcmData.length / channels, - sampleRate + sampleRate, ); for (let i = 0; i < channels; i++) { diff --git a/apps/web/src/main.tsx b/apps/web/src/main.tsx index a9e6f945..c6bc289e 100644 --- a/apps/web/src/main.tsx +++ b/apps/web/src/main.tsx @@ -52,6 +52,6 @@ createRoot(document.getElementById("root")!).render( - + , // ); diff --git a/apps/web/src/pages/apikeys/ApiKeys.tsx b/apps/web/src/pages/apikeys/ApiKeys.tsx index ef26db01..514ddb5f 100644 --- a/apps/web/src/pages/apikeys/ApiKeys.tsx +++ b/apps/web/src/pages/apikeys/ApiKeys.tsx @@ -63,7 +63,7 @@ function ApiKeys() { onSuccess: async () => { apiKeys = await apiKeys.refetch(); }, - } + }, ); setIsOpen(false); @@ -82,7 +82,7 @@ function ApiKeys() { onSuccess: async () => { apiKeys = await apiKeys.refetch(); }, - } + }, ); }; @@ -97,7 +97,7 @@ function ApiKeys() { onSuccess: async () => { apiKeys = await apiKeys.refetch(); }, - } + }, ); }; diff --git a/apps/web/src/pages/artist/Artist.tsx b/apps/web/src/pages/artist/Artist.tsx index 1ed8e965..345ad605 100644 --- a/apps/web/src/pages/artist/Artist.tsx +++ b/apps/web/src/pages/artist/Artist.tsx @@ -97,7 +97,7 @@ const Artist = () => { artistTracksResult.data.map((track) => ({ ...track, scrobbles: track.playCount || 1, - })) + })), ); }, [ artistTracksResult.data, diff --git a/apps/web/src/pages/home/feed/Feed.tsx b/apps/web/src/pages/home/feed/Feed.tsx index 84272d7b..4961324d 100644 --- a/apps/web/src/pages/home/feed/Feed.tsx +++ b/apps/web/src/pages/home/feed/Feed.tsx @@ -94,7 +94,7 @@ function Feed() { ( - _.get(props, "activeKey", "0").split("/")[0] + _.get(props, "activeKey", "0").split("/")[0], ); const { did } = useParams({ strict: false }); const profile = useProfileByDidQuery(did!); diff --git a/apps/web/src/pages/profile/library/Library.tsx b/apps/web/src/pages/profile/library/Library.tsx index d69ed608..04853024 100644 --- a/apps/web/src/pages/profile/library/Library.tsx +++ b/apps/web/src/pages/profile/library/Library.tsx @@ -14,7 +14,7 @@ export type LibraryProps = { function Library(props: LibraryProps) { const [activeKey, setActiveKey] = useState( - _.get(props, "activeKey", "0") + _.get(props, "activeKey", "0"), ); const { tab } = useSearch({ strict: false }); console.log("tab", tab); diff --git a/apps/web/src/pages/profile/library/albums/Albums.tsx b/apps/web/src/pages/profile/library/albums/Albums.tsx index e1b6d867..f08fe0bd 100644 --- a/apps/web/src/pages/profile/library/albums/Albums.tsx +++ b/apps/web/src/pages/profile/library/albums/Albums.tsx @@ -86,7 +86,7 @@ function Albums(props: AlbumsProps) { artistUri: x.artistUri, uri: x.uri, scrobbles: x.scrobbles, - })) + })), ); // eslint-disable-next-line react-hooks/exhaustive-deps }, [albumsResult.data, albumsResult.isLoading, albumsResult.isError, did]); diff --git a/apps/web/src/pages/profile/lovedtracks/LovedTracks.tsx b/apps/web/src/pages/profile/lovedtracks/LovedTracks.tsx index 7d614fa1..538eb438 100644 --- a/apps/web/src/pages/profile/lovedtracks/LovedTracks.tsx +++ b/apps/web/src/pages/profile/lovedtracks/LovedTracks.tsx @@ -45,7 +45,7 @@ function LovedTracks() { const lovedTracksResult = useLovedTracksQuery( did!, (currentPage - 1) * size, - size + size, ); const user = useAtomValue(userAtom); const profileStats = useProfileStatsByDidQuery(did!); @@ -70,7 +70,7 @@ function LovedTracks() { lovedTracksResult.data.map((item: any) => ({ ...item, date: item.createdAt, - })) + })), ); // eslint-disable-next-line react-hooks/exhaustive-deps }, [ diff --git a/apps/web/src/pages/profile/overview/recenttracks/RecentTracks.tsx b/apps/web/src/pages/profile/overview/recenttracks/RecentTracks.tsx index a4ed6b76..5e1349a7 100644 --- a/apps/web/src/pages/profile/overview/recenttracks/RecentTracks.tsx +++ b/apps/web/src/pages/profile/overview/recenttracks/RecentTracks.tsx @@ -69,7 +69,7 @@ function RecentTracks(props: RecentTracksProps) { const recentTracksResult = useRecentTracksByDidQuery( did!, (currentPage - 1) * props.size!, - props.size! + props.size!, ); const setRecentTracks = useSetAtom(recentTracksAtom); const recentTracks = useAtomValue(recentTracksAtom); @@ -105,7 +105,7 @@ function RecentTracks(props: RecentTracksProps) { scrobbleUri: item.uri, albumUri: item.albumUri, artistUri: item.artistUri, - })) + })), ); // eslint-disable-next-line react-hooks/exhaustive-deps diff --git a/apps/web/src/pages/profile/overview/toptracks/TopTracks.tsx b/apps/web/src/pages/profile/overview/toptracks/TopTracks.tsx index 18764936..7adc6361 100644 --- a/apps/web/src/pages/profile/overview/toptracks/TopTracks.tsx +++ b/apps/web/src/pages/profile/overview/toptracks/TopTracks.tsx @@ -69,7 +69,7 @@ function TopTracks(props: TopTracksProps) { const tracksResult = useTracksQuery( did!, (currentPage - 1) * props.size!, - props.size! + props.size!, ); const user = useAtomValue(userAtom); const pages = useMemo(() => { diff --git a/apps/web/src/pages/song/Song.tsx b/apps/web/src/pages/song/Song.tsx index ac4f4089..f06d3ba1 100644 --- a/apps/web/src/pages/song/Song.tsx +++ b/apps/web/src/pages/song/Song.tsx @@ -79,11 +79,11 @@ const Song = () => { const artistTracksResult = useArtistTracksQuery( songResult.data?.artistUri || scrobbleResult.data?.artistUri, - 5 + 5, ); const artistAlbumResult = useArtistAlbumsQuery( songResult.data?.artistUri || scrobbleResult.data?.artistUri, - 10 + 10, ); const song = useAtomValue(songAtom); @@ -175,7 +175,7 @@ const Song = () => { artistUri: x.artistUri, albumUri: x.albumUri, scrobbles: x.playCount, - })) + })), ); // eslint-disable-next-line react-hooks/exhaustive-deps }, [artistTracksResult.data, artistTracksResult.isLoading]); @@ -318,12 +318,14 @@ const Song = () => {
- {// eslint-disable-next-line @typescript-eslint/no-explicit-any - song?.tags.map((tag: any) => ( - - {tag} - - ))} + { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + song?.tags.map((tag: any) => ( + + {tag} + + )) + } {song?.lyrics && ( <> diff --git a/apps/web/src/routeTree.gen.ts b/apps/web/src/routeTree.gen.ts index 8a60e90c..8bf95b0f 100644 --- a/apps/web/src/routeTree.gen.ts +++ b/apps/web/src/routeTree.gen.ts @@ -8,470 +8,470 @@ // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. -import { Route as rootRouteImport } from './routes/__root' -import { Route as ScrobbleRouteImport } from './routes/scrobble' -import { Route as LoadingRouteImport } from './routes/loading' -import { Route as ApikeysRouteImport } from './routes/apikeys' -import { Route as IndexRouteImport } from './routes/index' -import { Route as GoogledriveIndexRouteImport } from './routes/googledrive/index' -import { Route as DropboxIndexRouteImport } from './routes/dropbox/index' -import { Route as GoogledriveIdRouteImport } from './routes/googledrive/$id' -import { Route as DropboxIdRouteImport } from './routes/dropbox/$id' -import { Route as ProfileDidIndexRouteImport } from './routes/profile/$did/index' -import { Route as ProfileDidTracksRouteImport } from './routes/profile/$did/tracks' -import { Route as ProfileDidTagsRouteImport } from './routes/profile/$did/tags' -import { Route as ProfileDidScrobblesRouteImport } from './routes/profile/$did/scrobbles' -import { Route as ProfileDidPlaylistsRouteImport } from './routes/profile/$did/playlists' -import { Route as ProfileDidLikesRouteImport } from './routes/profile/$did/likes' -import { Route as ProfileDidLibraryRouteImport } from './routes/profile/$did/library' -import { Route as ProfileDidArtistsRouteImport } from './routes/profile/$did/artists' -import { Route as ProfileDidAlbumsRouteImport } from './routes/profile/$did/albums' -import { Route as DidSongRkeyRouteImport } from './routes/$did.song.$rkey' -import { Route as DidScrobbleRkeyRouteImport } from './routes/$did.scrobble.$rkey' -import { Route as DidPlaylistRkeyRouteImport } from './routes/$did.playlist.$rkey' -import { Route as DidArtistRkeyRouteImport } from './routes/$did.artist.$rkey' -import { Route as DidAlbumRkeyRouteImport } from './routes/$did.album.$rkey' +import { Route as rootRouteImport } from "./routes/__root"; +import { Route as ScrobbleRouteImport } from "./routes/scrobble"; +import { Route as LoadingRouteImport } from "./routes/loading"; +import { Route as ApikeysRouteImport } from "./routes/apikeys"; +import { Route as IndexRouteImport } from "./routes/index"; +import { Route as GoogledriveIndexRouteImport } from "./routes/googledrive/index"; +import { Route as DropboxIndexRouteImport } from "./routes/dropbox/index"; +import { Route as GoogledriveIdRouteImport } from "./routes/googledrive/$id"; +import { Route as DropboxIdRouteImport } from "./routes/dropbox/$id"; +import { Route as ProfileDidIndexRouteImport } from "./routes/profile/$did/index"; +import { Route as ProfileDidTracksRouteImport } from "./routes/profile/$did/tracks"; +import { Route as ProfileDidTagsRouteImport } from "./routes/profile/$did/tags"; +import { Route as ProfileDidScrobblesRouteImport } from "./routes/profile/$did/scrobbles"; +import { Route as ProfileDidPlaylistsRouteImport } from "./routes/profile/$did/playlists"; +import { Route as ProfileDidLikesRouteImport } from "./routes/profile/$did/likes"; +import { Route as ProfileDidLibraryRouteImport } from "./routes/profile/$did/library"; +import { Route as ProfileDidArtistsRouteImport } from "./routes/profile/$did/artists"; +import { Route as ProfileDidAlbumsRouteImport } from "./routes/profile/$did/albums"; +import { Route as DidSongRkeyRouteImport } from "./routes/$did.song.$rkey"; +import { Route as DidScrobbleRkeyRouteImport } from "./routes/$did.scrobble.$rkey"; +import { Route as DidPlaylistRkeyRouteImport } from "./routes/$did.playlist.$rkey"; +import { Route as DidArtistRkeyRouteImport } from "./routes/$did.artist.$rkey"; +import { Route as DidAlbumRkeyRouteImport } from "./routes/$did.album.$rkey"; const ScrobbleRoute = ScrobbleRouteImport.update({ - id: '/scrobble', - path: '/scrobble', + id: "/scrobble", + path: "/scrobble", getParentRoute: () => rootRouteImport, -} as any) +} as any); const LoadingRoute = LoadingRouteImport.update({ - id: '/loading', - path: '/loading', + id: "/loading", + path: "/loading", getParentRoute: () => rootRouteImport, -} as any) +} as any); const ApikeysRoute = ApikeysRouteImport.update({ - id: '/apikeys', - path: '/apikeys', + id: "/apikeys", + path: "/apikeys", getParentRoute: () => rootRouteImport, -} as any) +} as any); const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', + id: "/", + path: "/", getParentRoute: () => rootRouteImport, -} as any) +} as any); const GoogledriveIndexRoute = GoogledriveIndexRouteImport.update({ - id: '/googledrive/', - path: '/googledrive/', + id: "/googledrive/", + path: "/googledrive/", getParentRoute: () => rootRouteImport, -} as any) +} as any); const DropboxIndexRoute = DropboxIndexRouteImport.update({ - id: '/dropbox/', - path: '/dropbox/', + id: "/dropbox/", + path: "/dropbox/", getParentRoute: () => rootRouteImport, -} as any) +} as any); const GoogledriveIdRoute = GoogledriveIdRouteImport.update({ - id: '/googledrive/$id', - path: '/googledrive/$id', + id: "/googledrive/$id", + path: "/googledrive/$id", getParentRoute: () => rootRouteImport, -} as any) +} as any); const DropboxIdRoute = DropboxIdRouteImport.update({ - id: '/dropbox/$id', - path: '/dropbox/$id', + id: "/dropbox/$id", + path: "/dropbox/$id", getParentRoute: () => rootRouteImport, -} as any) +} as any); const ProfileDidIndexRoute = ProfileDidIndexRouteImport.update({ - id: '/profile/$did/', - path: '/profile/$did/', + id: "/profile/$did/", + path: "/profile/$did/", getParentRoute: () => rootRouteImport, -} as any) +} as any); const ProfileDidTracksRoute = ProfileDidTracksRouteImport.update({ - id: '/profile/$did/tracks', - path: '/profile/$did/tracks', + id: "/profile/$did/tracks", + path: "/profile/$did/tracks", getParentRoute: () => rootRouteImport, -} as any) +} as any); const ProfileDidTagsRoute = ProfileDidTagsRouteImport.update({ - id: '/profile/$did/tags', - path: '/profile/$did/tags', + id: "/profile/$did/tags", + path: "/profile/$did/tags", getParentRoute: () => rootRouteImport, -} as any) +} as any); const ProfileDidScrobblesRoute = ProfileDidScrobblesRouteImport.update({ - id: '/profile/$did/scrobbles', - path: '/profile/$did/scrobbles', + id: "/profile/$did/scrobbles", + path: "/profile/$did/scrobbles", getParentRoute: () => rootRouteImport, -} as any) +} as any); const ProfileDidPlaylistsRoute = ProfileDidPlaylistsRouteImport.update({ - id: '/profile/$did/playlists', - path: '/profile/$did/playlists', + id: "/profile/$did/playlists", + path: "/profile/$did/playlists", getParentRoute: () => rootRouteImport, -} as any) +} as any); const ProfileDidLikesRoute = ProfileDidLikesRouteImport.update({ - id: '/profile/$did/likes', - path: '/profile/$did/likes', + id: "/profile/$did/likes", + path: "/profile/$did/likes", getParentRoute: () => rootRouteImport, -} as any) +} as any); const ProfileDidLibraryRoute = ProfileDidLibraryRouteImport.update({ - id: '/profile/$did/library', - path: '/profile/$did/library', + id: "/profile/$did/library", + path: "/profile/$did/library", getParentRoute: () => rootRouteImport, -} as any) +} as any); const ProfileDidArtistsRoute = ProfileDidArtistsRouteImport.update({ - id: '/profile/$did/artists', - path: '/profile/$did/artists', + id: "/profile/$did/artists", + path: "/profile/$did/artists", getParentRoute: () => rootRouteImport, -} as any) +} as any); const ProfileDidAlbumsRoute = ProfileDidAlbumsRouteImport.update({ - id: '/profile/$did/albums', - path: '/profile/$did/albums', + id: "/profile/$did/albums", + path: "/profile/$did/albums", getParentRoute: () => rootRouteImport, -} as any) +} as any); const DidSongRkeyRoute = DidSongRkeyRouteImport.update({ - id: '/$did/song/$rkey', - path: '/$did/song/$rkey', + id: "/$did/song/$rkey", + path: "/$did/song/$rkey", getParentRoute: () => rootRouteImport, -} as any) +} as any); const DidScrobbleRkeyRoute = DidScrobbleRkeyRouteImport.update({ - id: '/$did/scrobble/$rkey', - path: '/$did/scrobble/$rkey', + id: "/$did/scrobble/$rkey", + path: "/$did/scrobble/$rkey", getParentRoute: () => rootRouteImport, -} as any) +} as any); const DidPlaylistRkeyRoute = DidPlaylistRkeyRouteImport.update({ - id: '/$did/playlist/$rkey', - path: '/$did/playlist/$rkey', + id: "/$did/playlist/$rkey", + path: "/$did/playlist/$rkey", getParentRoute: () => rootRouteImport, -} as any) +} as any); const DidArtistRkeyRoute = DidArtistRkeyRouteImport.update({ - id: '/$did/artist/$rkey', - path: '/$did/artist/$rkey', + id: "/$did/artist/$rkey", + path: "/$did/artist/$rkey", getParentRoute: () => rootRouteImport, -} as any) +} as any); const DidAlbumRkeyRoute = DidAlbumRkeyRouteImport.update({ - id: '/$did/album/$rkey', - path: '/$did/album/$rkey', + id: "/$did/album/$rkey", + path: "/$did/album/$rkey", getParentRoute: () => rootRouteImport, -} as any) +} as any); export interface FileRoutesByFullPath { - '/': typeof IndexRoute - '/apikeys': typeof ApikeysRoute - '/loading': typeof LoadingRoute - '/scrobble': typeof ScrobbleRoute - '/dropbox/$id': typeof DropboxIdRoute - '/googledrive/$id': typeof GoogledriveIdRoute - '/dropbox': typeof DropboxIndexRoute - '/googledrive': typeof GoogledriveIndexRoute - '/$did/album/$rkey': typeof DidAlbumRkeyRoute - '/$did/artist/$rkey': typeof DidArtistRkeyRoute - '/$did/playlist/$rkey': typeof DidPlaylistRkeyRoute - '/$did/scrobble/$rkey': typeof DidScrobbleRkeyRoute - '/$did/song/$rkey': typeof DidSongRkeyRoute - '/profile/$did/albums': typeof ProfileDidAlbumsRoute - '/profile/$did/artists': typeof ProfileDidArtistsRoute - '/profile/$did/library': typeof ProfileDidLibraryRoute - '/profile/$did/likes': typeof ProfileDidLikesRoute - '/profile/$did/playlists': typeof ProfileDidPlaylistsRoute - '/profile/$did/scrobbles': typeof ProfileDidScrobblesRoute - '/profile/$did/tags': typeof ProfileDidTagsRoute - '/profile/$did/tracks': typeof ProfileDidTracksRoute - '/profile/$did': typeof ProfileDidIndexRoute + "/": typeof IndexRoute; + "/apikeys": typeof ApikeysRoute; + "/loading": typeof LoadingRoute; + "/scrobble": typeof ScrobbleRoute; + "/dropbox/$id": typeof DropboxIdRoute; + "/googledrive/$id": typeof GoogledriveIdRoute; + "/dropbox": typeof DropboxIndexRoute; + "/googledrive": typeof GoogledriveIndexRoute; + "/$did/album/$rkey": typeof DidAlbumRkeyRoute; + "/$did/artist/$rkey": typeof DidArtistRkeyRoute; + "/$did/playlist/$rkey": typeof DidPlaylistRkeyRoute; + "/$did/scrobble/$rkey": typeof DidScrobbleRkeyRoute; + "/$did/song/$rkey": typeof DidSongRkeyRoute; + "/profile/$did/albums": typeof ProfileDidAlbumsRoute; + "/profile/$did/artists": typeof ProfileDidArtistsRoute; + "/profile/$did/library": typeof ProfileDidLibraryRoute; + "/profile/$did/likes": typeof ProfileDidLikesRoute; + "/profile/$did/playlists": typeof ProfileDidPlaylistsRoute; + "/profile/$did/scrobbles": typeof ProfileDidScrobblesRoute; + "/profile/$did/tags": typeof ProfileDidTagsRoute; + "/profile/$did/tracks": typeof ProfileDidTracksRoute; + "/profile/$did": typeof ProfileDidIndexRoute; } export interface FileRoutesByTo { - '/': typeof IndexRoute - '/apikeys': typeof ApikeysRoute - '/loading': typeof LoadingRoute - '/scrobble': typeof ScrobbleRoute - '/dropbox/$id': typeof DropboxIdRoute - '/googledrive/$id': typeof GoogledriveIdRoute - '/dropbox': typeof DropboxIndexRoute - '/googledrive': typeof GoogledriveIndexRoute - '/$did/album/$rkey': typeof DidAlbumRkeyRoute - '/$did/artist/$rkey': typeof DidArtistRkeyRoute - '/$did/playlist/$rkey': typeof DidPlaylistRkeyRoute - '/$did/scrobble/$rkey': typeof DidScrobbleRkeyRoute - '/$did/song/$rkey': typeof DidSongRkeyRoute - '/profile/$did/albums': typeof ProfileDidAlbumsRoute - '/profile/$did/artists': typeof ProfileDidArtistsRoute - '/profile/$did/library': typeof ProfileDidLibraryRoute - '/profile/$did/likes': typeof ProfileDidLikesRoute - '/profile/$did/playlists': typeof ProfileDidPlaylistsRoute - '/profile/$did/scrobbles': typeof ProfileDidScrobblesRoute - '/profile/$did/tags': typeof ProfileDidTagsRoute - '/profile/$did/tracks': typeof ProfileDidTracksRoute - '/profile/$did': typeof ProfileDidIndexRoute + "/": typeof IndexRoute; + "/apikeys": typeof ApikeysRoute; + "/loading": typeof LoadingRoute; + "/scrobble": typeof ScrobbleRoute; + "/dropbox/$id": typeof DropboxIdRoute; + "/googledrive/$id": typeof GoogledriveIdRoute; + "/dropbox": typeof DropboxIndexRoute; + "/googledrive": typeof GoogledriveIndexRoute; + "/$did/album/$rkey": typeof DidAlbumRkeyRoute; + "/$did/artist/$rkey": typeof DidArtistRkeyRoute; + "/$did/playlist/$rkey": typeof DidPlaylistRkeyRoute; + "/$did/scrobble/$rkey": typeof DidScrobbleRkeyRoute; + "/$did/song/$rkey": typeof DidSongRkeyRoute; + "/profile/$did/albums": typeof ProfileDidAlbumsRoute; + "/profile/$did/artists": typeof ProfileDidArtistsRoute; + "/profile/$did/library": typeof ProfileDidLibraryRoute; + "/profile/$did/likes": typeof ProfileDidLikesRoute; + "/profile/$did/playlists": typeof ProfileDidPlaylistsRoute; + "/profile/$did/scrobbles": typeof ProfileDidScrobblesRoute; + "/profile/$did/tags": typeof ProfileDidTagsRoute; + "/profile/$did/tracks": typeof ProfileDidTracksRoute; + "/profile/$did": typeof ProfileDidIndexRoute; } export interface FileRoutesById { - __root__: typeof rootRouteImport - '/': typeof IndexRoute - '/apikeys': typeof ApikeysRoute - '/loading': typeof LoadingRoute - '/scrobble': typeof ScrobbleRoute - '/dropbox/$id': typeof DropboxIdRoute - '/googledrive/$id': typeof GoogledriveIdRoute - '/dropbox/': typeof DropboxIndexRoute - '/googledrive/': typeof GoogledriveIndexRoute - '/$did/album/$rkey': typeof DidAlbumRkeyRoute - '/$did/artist/$rkey': typeof DidArtistRkeyRoute - '/$did/playlist/$rkey': typeof DidPlaylistRkeyRoute - '/$did/scrobble/$rkey': typeof DidScrobbleRkeyRoute - '/$did/song/$rkey': typeof DidSongRkeyRoute - '/profile/$did/albums': typeof ProfileDidAlbumsRoute - '/profile/$did/artists': typeof ProfileDidArtistsRoute - '/profile/$did/library': typeof ProfileDidLibraryRoute - '/profile/$did/likes': typeof ProfileDidLikesRoute - '/profile/$did/playlists': typeof ProfileDidPlaylistsRoute - '/profile/$did/scrobbles': typeof ProfileDidScrobblesRoute - '/profile/$did/tags': typeof ProfileDidTagsRoute - '/profile/$did/tracks': typeof ProfileDidTracksRoute - '/profile/$did/': typeof ProfileDidIndexRoute + __root__: typeof rootRouteImport; + "/": typeof IndexRoute; + "/apikeys": typeof ApikeysRoute; + "/loading": typeof LoadingRoute; + "/scrobble": typeof ScrobbleRoute; + "/dropbox/$id": typeof DropboxIdRoute; + "/googledrive/$id": typeof GoogledriveIdRoute; + "/dropbox/": typeof DropboxIndexRoute; + "/googledrive/": typeof GoogledriveIndexRoute; + "/$did/album/$rkey": typeof DidAlbumRkeyRoute; + "/$did/artist/$rkey": typeof DidArtistRkeyRoute; + "/$did/playlist/$rkey": typeof DidPlaylistRkeyRoute; + "/$did/scrobble/$rkey": typeof DidScrobbleRkeyRoute; + "/$did/song/$rkey": typeof DidSongRkeyRoute; + "/profile/$did/albums": typeof ProfileDidAlbumsRoute; + "/profile/$did/artists": typeof ProfileDidArtistsRoute; + "/profile/$did/library": typeof ProfileDidLibraryRoute; + "/profile/$did/likes": typeof ProfileDidLikesRoute; + "/profile/$did/playlists": typeof ProfileDidPlaylistsRoute; + "/profile/$did/scrobbles": typeof ProfileDidScrobblesRoute; + "/profile/$did/tags": typeof ProfileDidTagsRoute; + "/profile/$did/tracks": typeof ProfileDidTracksRoute; + "/profile/$did/": typeof ProfileDidIndexRoute; } export interface FileRouteTypes { - fileRoutesByFullPath: FileRoutesByFullPath + fileRoutesByFullPath: FileRoutesByFullPath; fullPaths: - | '/' - | '/apikeys' - | '/loading' - | '/scrobble' - | '/dropbox/$id' - | '/googledrive/$id' - | '/dropbox' - | '/googledrive' - | '/$did/album/$rkey' - | '/$did/artist/$rkey' - | '/$did/playlist/$rkey' - | '/$did/scrobble/$rkey' - | '/$did/song/$rkey' - | '/profile/$did/albums' - | '/profile/$did/artists' - | '/profile/$did/library' - | '/profile/$did/likes' - | '/profile/$did/playlists' - | '/profile/$did/scrobbles' - | '/profile/$did/tags' - | '/profile/$did/tracks' - | '/profile/$did' - fileRoutesByTo: FileRoutesByTo + | "/" + | "/apikeys" + | "/loading" + | "/scrobble" + | "/dropbox/$id" + | "/googledrive/$id" + | "/dropbox" + | "/googledrive" + | "/$did/album/$rkey" + | "/$did/artist/$rkey" + | "/$did/playlist/$rkey" + | "/$did/scrobble/$rkey" + | "/$did/song/$rkey" + | "/profile/$did/albums" + | "/profile/$did/artists" + | "/profile/$did/library" + | "/profile/$did/likes" + | "/profile/$did/playlists" + | "/profile/$did/scrobbles" + | "/profile/$did/tags" + | "/profile/$did/tracks" + | "/profile/$did"; + fileRoutesByTo: FileRoutesByTo; to: - | '/' - | '/apikeys' - | '/loading' - | '/scrobble' - | '/dropbox/$id' - | '/googledrive/$id' - | '/dropbox' - | '/googledrive' - | '/$did/album/$rkey' - | '/$did/artist/$rkey' - | '/$did/playlist/$rkey' - | '/$did/scrobble/$rkey' - | '/$did/song/$rkey' - | '/profile/$did/albums' - | '/profile/$did/artists' - | '/profile/$did/library' - | '/profile/$did/likes' - | '/profile/$did/playlists' - | '/profile/$did/scrobbles' - | '/profile/$did/tags' - | '/profile/$did/tracks' - | '/profile/$did' + | "/" + | "/apikeys" + | "/loading" + | "/scrobble" + | "/dropbox/$id" + | "/googledrive/$id" + | "/dropbox" + | "/googledrive" + | "/$did/album/$rkey" + | "/$did/artist/$rkey" + | "/$did/playlist/$rkey" + | "/$did/scrobble/$rkey" + | "/$did/song/$rkey" + | "/profile/$did/albums" + | "/profile/$did/artists" + | "/profile/$did/library" + | "/profile/$did/likes" + | "/profile/$did/playlists" + | "/profile/$did/scrobbles" + | "/profile/$did/tags" + | "/profile/$did/tracks" + | "/profile/$did"; id: - | '__root__' - | '/' - | '/apikeys' - | '/loading' - | '/scrobble' - | '/dropbox/$id' - | '/googledrive/$id' - | '/dropbox/' - | '/googledrive/' - | '/$did/album/$rkey' - | '/$did/artist/$rkey' - | '/$did/playlist/$rkey' - | '/$did/scrobble/$rkey' - | '/$did/song/$rkey' - | '/profile/$did/albums' - | '/profile/$did/artists' - | '/profile/$did/library' - | '/profile/$did/likes' - | '/profile/$did/playlists' - | '/profile/$did/scrobbles' - | '/profile/$did/tags' - | '/profile/$did/tracks' - | '/profile/$did/' - fileRoutesById: FileRoutesById + | "__root__" + | "/" + | "/apikeys" + | "/loading" + | "/scrobble" + | "/dropbox/$id" + | "/googledrive/$id" + | "/dropbox/" + | "/googledrive/" + | "/$did/album/$rkey" + | "/$did/artist/$rkey" + | "/$did/playlist/$rkey" + | "/$did/scrobble/$rkey" + | "/$did/song/$rkey" + | "/profile/$did/albums" + | "/profile/$did/artists" + | "/profile/$did/library" + | "/profile/$did/likes" + | "/profile/$did/playlists" + | "/profile/$did/scrobbles" + | "/profile/$did/tags" + | "/profile/$did/tracks" + | "/profile/$did/"; + fileRoutesById: FileRoutesById; } export interface RootRouteChildren { - IndexRoute: typeof IndexRoute - ApikeysRoute: typeof ApikeysRoute - LoadingRoute: typeof LoadingRoute - ScrobbleRoute: typeof ScrobbleRoute - DropboxIdRoute: typeof DropboxIdRoute - GoogledriveIdRoute: typeof GoogledriveIdRoute - DropboxIndexRoute: typeof DropboxIndexRoute - GoogledriveIndexRoute: typeof GoogledriveIndexRoute - DidAlbumRkeyRoute: typeof DidAlbumRkeyRoute - DidArtistRkeyRoute: typeof DidArtistRkeyRoute - DidPlaylistRkeyRoute: typeof DidPlaylistRkeyRoute - DidScrobbleRkeyRoute: typeof DidScrobbleRkeyRoute - DidSongRkeyRoute: typeof DidSongRkeyRoute - ProfileDidAlbumsRoute: typeof ProfileDidAlbumsRoute - ProfileDidArtistsRoute: typeof ProfileDidArtistsRoute - ProfileDidLibraryRoute: typeof ProfileDidLibraryRoute - ProfileDidLikesRoute: typeof ProfileDidLikesRoute - ProfileDidPlaylistsRoute: typeof ProfileDidPlaylistsRoute - ProfileDidScrobblesRoute: typeof ProfileDidScrobblesRoute - ProfileDidTagsRoute: typeof ProfileDidTagsRoute - ProfileDidTracksRoute: typeof ProfileDidTracksRoute - ProfileDidIndexRoute: typeof ProfileDidIndexRoute + IndexRoute: typeof IndexRoute; + ApikeysRoute: typeof ApikeysRoute; + LoadingRoute: typeof LoadingRoute; + ScrobbleRoute: typeof ScrobbleRoute; + DropboxIdRoute: typeof DropboxIdRoute; + GoogledriveIdRoute: typeof GoogledriveIdRoute; + DropboxIndexRoute: typeof DropboxIndexRoute; + GoogledriveIndexRoute: typeof GoogledriveIndexRoute; + DidAlbumRkeyRoute: typeof DidAlbumRkeyRoute; + DidArtistRkeyRoute: typeof DidArtistRkeyRoute; + DidPlaylistRkeyRoute: typeof DidPlaylistRkeyRoute; + DidScrobbleRkeyRoute: typeof DidScrobbleRkeyRoute; + DidSongRkeyRoute: typeof DidSongRkeyRoute; + ProfileDidAlbumsRoute: typeof ProfileDidAlbumsRoute; + ProfileDidArtistsRoute: typeof ProfileDidArtistsRoute; + ProfileDidLibraryRoute: typeof ProfileDidLibraryRoute; + ProfileDidLikesRoute: typeof ProfileDidLikesRoute; + ProfileDidPlaylistsRoute: typeof ProfileDidPlaylistsRoute; + ProfileDidScrobblesRoute: typeof ProfileDidScrobblesRoute; + ProfileDidTagsRoute: typeof ProfileDidTagsRoute; + ProfileDidTracksRoute: typeof ProfileDidTracksRoute; + ProfileDidIndexRoute: typeof ProfileDidIndexRoute; } -declare module '@tanstack/react-router' { +declare module "@tanstack/react-router" { interface FileRoutesByPath { - '/scrobble': { - id: '/scrobble' - path: '/scrobble' - fullPath: '/scrobble' - preLoaderRoute: typeof ScrobbleRouteImport - parentRoute: typeof rootRouteImport - } - '/loading': { - id: '/loading' - path: '/loading' - fullPath: '/loading' - preLoaderRoute: typeof LoadingRouteImport - parentRoute: typeof rootRouteImport - } - '/apikeys': { - id: '/apikeys' - path: '/apikeys' - fullPath: '/apikeys' - preLoaderRoute: typeof ApikeysRouteImport - parentRoute: typeof rootRouteImport - } - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/googledrive/': { - id: '/googledrive/' - path: '/googledrive' - fullPath: '/googledrive' - preLoaderRoute: typeof GoogledriveIndexRouteImport - parentRoute: typeof rootRouteImport - } - '/dropbox/': { - id: '/dropbox/' - path: '/dropbox' - fullPath: '/dropbox' - preLoaderRoute: typeof DropboxIndexRouteImport - parentRoute: typeof rootRouteImport - } - '/googledrive/$id': { - id: '/googledrive/$id' - path: '/googledrive/$id' - fullPath: '/googledrive/$id' - preLoaderRoute: typeof GoogledriveIdRouteImport - parentRoute: typeof rootRouteImport - } - '/dropbox/$id': { - id: '/dropbox/$id' - path: '/dropbox/$id' - fullPath: '/dropbox/$id' - preLoaderRoute: typeof DropboxIdRouteImport - parentRoute: typeof rootRouteImport - } - '/profile/$did/': { - id: '/profile/$did/' - path: '/profile/$did' - fullPath: '/profile/$did' - preLoaderRoute: typeof ProfileDidIndexRouteImport - parentRoute: typeof rootRouteImport - } - '/profile/$did/tracks': { - id: '/profile/$did/tracks' - path: '/profile/$did/tracks' - fullPath: '/profile/$did/tracks' - preLoaderRoute: typeof ProfileDidTracksRouteImport - parentRoute: typeof rootRouteImport - } - '/profile/$did/tags': { - id: '/profile/$did/tags' - path: '/profile/$did/tags' - fullPath: '/profile/$did/tags' - preLoaderRoute: typeof ProfileDidTagsRouteImport - parentRoute: typeof rootRouteImport - } - '/profile/$did/scrobbles': { - id: '/profile/$did/scrobbles' - path: '/profile/$did/scrobbles' - fullPath: '/profile/$did/scrobbles' - preLoaderRoute: typeof ProfileDidScrobblesRouteImport - parentRoute: typeof rootRouteImport - } - '/profile/$did/playlists': { - id: '/profile/$did/playlists' - path: '/profile/$did/playlists' - fullPath: '/profile/$did/playlists' - preLoaderRoute: typeof ProfileDidPlaylistsRouteImport - parentRoute: typeof rootRouteImport - } - '/profile/$did/likes': { - id: '/profile/$did/likes' - path: '/profile/$did/likes' - fullPath: '/profile/$did/likes' - preLoaderRoute: typeof ProfileDidLikesRouteImport - parentRoute: typeof rootRouteImport - } - '/profile/$did/library': { - id: '/profile/$did/library' - path: '/profile/$did/library' - fullPath: '/profile/$did/library' - preLoaderRoute: typeof ProfileDidLibraryRouteImport - parentRoute: typeof rootRouteImport - } - '/profile/$did/artists': { - id: '/profile/$did/artists' - path: '/profile/$did/artists' - fullPath: '/profile/$did/artists' - preLoaderRoute: typeof ProfileDidArtistsRouteImport - parentRoute: typeof rootRouteImport - } - '/profile/$did/albums': { - id: '/profile/$did/albums' - path: '/profile/$did/albums' - fullPath: '/profile/$did/albums' - preLoaderRoute: typeof ProfileDidAlbumsRouteImport - parentRoute: typeof rootRouteImport - } - '/$did/song/$rkey': { - id: '/$did/song/$rkey' - path: '/$did/song/$rkey' - fullPath: '/$did/song/$rkey' - preLoaderRoute: typeof DidSongRkeyRouteImport - parentRoute: typeof rootRouteImport - } - '/$did/scrobble/$rkey': { - id: '/$did/scrobble/$rkey' - path: '/$did/scrobble/$rkey' - fullPath: '/$did/scrobble/$rkey' - preLoaderRoute: typeof DidScrobbleRkeyRouteImport - parentRoute: typeof rootRouteImport - } - '/$did/playlist/$rkey': { - id: '/$did/playlist/$rkey' - path: '/$did/playlist/$rkey' - fullPath: '/$did/playlist/$rkey' - preLoaderRoute: typeof DidPlaylistRkeyRouteImport - parentRoute: typeof rootRouteImport - } - '/$did/artist/$rkey': { - id: '/$did/artist/$rkey' - path: '/$did/artist/$rkey' - fullPath: '/$did/artist/$rkey' - preLoaderRoute: typeof DidArtistRkeyRouteImport - parentRoute: typeof rootRouteImport - } - '/$did/album/$rkey': { - id: '/$did/album/$rkey' - path: '/$did/album/$rkey' - fullPath: '/$did/album/$rkey' - preLoaderRoute: typeof DidAlbumRkeyRouteImport - parentRoute: typeof rootRouteImport - } + "/scrobble": { + id: "/scrobble"; + path: "/scrobble"; + fullPath: "/scrobble"; + preLoaderRoute: typeof ScrobbleRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/loading": { + id: "/loading"; + path: "/loading"; + fullPath: "/loading"; + preLoaderRoute: typeof LoadingRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/apikeys": { + id: "/apikeys"; + path: "/apikeys"; + fullPath: "/apikeys"; + preLoaderRoute: typeof ApikeysRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/": { + id: "/"; + path: "/"; + fullPath: "/"; + preLoaderRoute: typeof IndexRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/googledrive/": { + id: "/googledrive/"; + path: "/googledrive"; + fullPath: "/googledrive"; + preLoaderRoute: typeof GoogledriveIndexRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/dropbox/": { + id: "/dropbox/"; + path: "/dropbox"; + fullPath: "/dropbox"; + preLoaderRoute: typeof DropboxIndexRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/googledrive/$id": { + id: "/googledrive/$id"; + path: "/googledrive/$id"; + fullPath: "/googledrive/$id"; + preLoaderRoute: typeof GoogledriveIdRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/dropbox/$id": { + id: "/dropbox/$id"; + path: "/dropbox/$id"; + fullPath: "/dropbox/$id"; + preLoaderRoute: typeof DropboxIdRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/profile/$did/": { + id: "/profile/$did/"; + path: "/profile/$did"; + fullPath: "/profile/$did"; + preLoaderRoute: typeof ProfileDidIndexRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/profile/$did/tracks": { + id: "/profile/$did/tracks"; + path: "/profile/$did/tracks"; + fullPath: "/profile/$did/tracks"; + preLoaderRoute: typeof ProfileDidTracksRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/profile/$did/tags": { + id: "/profile/$did/tags"; + path: "/profile/$did/tags"; + fullPath: "/profile/$did/tags"; + preLoaderRoute: typeof ProfileDidTagsRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/profile/$did/scrobbles": { + id: "/profile/$did/scrobbles"; + path: "/profile/$did/scrobbles"; + fullPath: "/profile/$did/scrobbles"; + preLoaderRoute: typeof ProfileDidScrobblesRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/profile/$did/playlists": { + id: "/profile/$did/playlists"; + path: "/profile/$did/playlists"; + fullPath: "/profile/$did/playlists"; + preLoaderRoute: typeof ProfileDidPlaylistsRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/profile/$did/likes": { + id: "/profile/$did/likes"; + path: "/profile/$did/likes"; + fullPath: "/profile/$did/likes"; + preLoaderRoute: typeof ProfileDidLikesRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/profile/$did/library": { + id: "/profile/$did/library"; + path: "/profile/$did/library"; + fullPath: "/profile/$did/library"; + preLoaderRoute: typeof ProfileDidLibraryRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/profile/$did/artists": { + id: "/profile/$did/artists"; + path: "/profile/$did/artists"; + fullPath: "/profile/$did/artists"; + preLoaderRoute: typeof ProfileDidArtistsRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/profile/$did/albums": { + id: "/profile/$did/albums"; + path: "/profile/$did/albums"; + fullPath: "/profile/$did/albums"; + preLoaderRoute: typeof ProfileDidAlbumsRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/$did/song/$rkey": { + id: "/$did/song/$rkey"; + path: "/$did/song/$rkey"; + fullPath: "/$did/song/$rkey"; + preLoaderRoute: typeof DidSongRkeyRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/$did/scrobble/$rkey": { + id: "/$did/scrobble/$rkey"; + path: "/$did/scrobble/$rkey"; + fullPath: "/$did/scrobble/$rkey"; + preLoaderRoute: typeof DidScrobbleRkeyRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/$did/playlist/$rkey": { + id: "/$did/playlist/$rkey"; + path: "/$did/playlist/$rkey"; + fullPath: "/$did/playlist/$rkey"; + preLoaderRoute: typeof DidPlaylistRkeyRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/$did/artist/$rkey": { + id: "/$did/artist/$rkey"; + path: "/$did/artist/$rkey"; + fullPath: "/$did/artist/$rkey"; + preLoaderRoute: typeof DidArtistRkeyRouteImport; + parentRoute: typeof rootRouteImport; + }; + "/$did/album/$rkey": { + id: "/$did/album/$rkey"; + path: "/$did/album/$rkey"; + fullPath: "/$did/album/$rkey"; + preLoaderRoute: typeof DidAlbumRkeyRouteImport; + parentRoute: typeof rootRouteImport; + }; } } @@ -498,7 +498,7 @@ const rootRouteChildren: RootRouteChildren = { ProfileDidTagsRoute: ProfileDidTagsRoute, ProfileDidTracksRoute: ProfileDidTracksRoute, ProfileDidIndexRoute: ProfileDidIndexRoute, -} +}; export const routeTree = rootRouteImport ._addFileChildren(rootRouteChildren) - ._addFileTypes() + ._addFileTypes(); diff --git a/apps/web/src/stories/Button.stories.ts b/apps/web/src/stories/Button.stories.ts index 2a05e01b..07c1f386 100644 --- a/apps/web/src/stories/Button.stories.ts +++ b/apps/web/src/stories/Button.stories.ts @@ -1,21 +1,21 @@ -import type { Meta, StoryObj } from '@storybook/react'; -import { fn } from '@storybook/test'; +import type { Meta, StoryObj } from "@storybook/react"; +import { fn } from "@storybook/test"; -import { Button } from './Button'; +import { Button } from "./Button"; // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export const meta = { - title: 'Example/Button', + title: "Example/Button", component: Button, parameters: { // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout - layout: 'centered', + layout: "centered", }, // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs - tags: ['autodocs'], + tags: ["autodocs"], // More on argTypes: https://storybook.js.org/docs/api/argtypes argTypes: { - backgroundColor: { control: 'color' }, + backgroundColor: { control: "color" }, }, // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args args: { onClick: fn() }, @@ -28,26 +28,26 @@ type Story = StoryObj; export const Primary: Story = { args: { primary: true, - label: 'Button', + label: "Button", }, }; export const Secondary: Story = { args: { - label: 'Button', + label: "Button", }, }; export const Large: Story = { args: { - size: 'large', - label: 'Button', + size: "large", + label: "Button", }, }; export const Small: Story = { args: { - size: 'small', - label: 'Button', + size: "small", + label: "Button", }, }; diff --git a/apps/web/src/stories/Button.tsx b/apps/web/src/stories/Button.tsx index 474e05a6..3d969882 100644 --- a/apps/web/src/stories/Button.tsx +++ b/apps/web/src/stories/Button.tsx @@ -28,7 +28,7 @@ export const Button = ({