@rocksky/cli 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +270 -1
- package/TOOLS.md +194 -0
- package/bun.lock +28 -0
- package/dist/drizzle/0000_parallel_paper_doll.sql +220 -0
- package/dist/drizzle/meta/0000_snapshot.json +1559 -0
- package/dist/drizzle/meta/_journal.json +13 -0
- package/dist/index.js +8718 -165
- package/drizzle/0000_parallel_paper_doll.sql +220 -0
- package/drizzle/meta/0000_snapshot.json +1559 -0
- package/drizzle/meta/_journal.json +13 -0
- package/drizzle.config.ts +18 -0
- package/package.json +34 -4
- package/src/client.ts +32 -14
- package/src/cmd/mcp.ts +8 -0
- package/src/cmd/scrobble-api.ts +457 -0
- package/src/cmd/scrobble.ts +14 -61
- package/src/cmd/search.ts +27 -25
- package/src/cmd/sync.ts +812 -0
- package/src/cmd/whoami.ts +36 -7
- package/src/context.ts +24 -0
- package/src/drizzle.ts +53 -0
- package/src/index.ts +72 -23
- package/src/jetstream.ts +285 -0
- package/src/lexicon/index.ts +1321 -0
- package/src/lexicon/lexicons.ts +5453 -0
- package/src/lexicon/types/app/bsky/actor/profile.ts +38 -0
- package/src/lexicon/types/app/rocksky/actor/defs.ts +146 -0
- package/src/lexicon/types/app/rocksky/actor/getActorAlbums.ts +56 -0
- package/src/lexicon/types/app/rocksky/actor/getActorArtists.ts +56 -0
- package/src/lexicon/types/app/rocksky/actor/getActorCompatibility.ts +48 -0
- package/src/lexicon/types/app/rocksky/actor/getActorLovedSongs.ts +52 -0
- package/src/lexicon/types/app/rocksky/actor/getActorNeighbours.ts +48 -0
- package/src/lexicon/types/app/rocksky/actor/getActorPlaylists.ts +52 -0
- package/src/lexicon/types/app/rocksky/actor/getActorScrobbles.ts +52 -0
- package/src/lexicon/types/app/rocksky/actor/getActorSongs.ts +56 -0
- package/src/lexicon/types/app/rocksky/actor/getProfile.ts +43 -0
- package/src/lexicon/types/app/rocksky/album/defs.ts +85 -0
- package/src/lexicon/types/app/rocksky/album/getAlbum.ts +43 -0
- package/src/lexicon/types/app/rocksky/album/getAlbumTracks.ts +48 -0
- package/src/lexicon/types/app/rocksky/album/getAlbums.ts +50 -0
- package/src/lexicon/types/app/rocksky/album.ts +51 -0
- package/src/lexicon/types/app/rocksky/apikey/createApikey.ts +51 -0
- package/src/lexicon/types/app/rocksky/apikey/defs.ts +31 -0
- package/src/lexicon/types/app/rocksky/apikey/getApikeys.ts +50 -0
- package/src/lexicon/types/app/rocksky/apikey/removeApikey.ts +43 -0
- package/src/lexicon/types/app/rocksky/apikey/updateApikey.ts +53 -0
- package/src/lexicon/types/app/rocksky/apikeys/defs.ts +7 -0
- package/src/lexicon/types/app/rocksky/artist/defs.ts +140 -0
- package/src/lexicon/types/app/rocksky/artist/getArtist.ts +43 -0
- package/src/lexicon/types/app/rocksky/artist/getArtistAlbums.ts +48 -0
- package/src/lexicon/types/app/rocksky/artist/getArtistListeners.ts +52 -0
- package/src/lexicon/types/app/rocksky/artist/getArtistTracks.ts +52 -0
- package/src/lexicon/types/app/rocksky/artist/getArtists.ts +52 -0
- package/src/lexicon/types/app/rocksky/artist.ts +41 -0
- package/src/lexicon/types/app/rocksky/charts/defs.ts +44 -0
- package/src/lexicon/types/app/rocksky/charts/getScrobblesChart.ts +49 -0
- package/src/lexicon/types/app/rocksky/dropbox/defs.ts +71 -0
- package/src/lexicon/types/app/rocksky/dropbox/downloadFile.ts +42 -0
- package/src/lexicon/types/app/rocksky/dropbox/getFiles.ts +43 -0
- package/src/lexicon/types/app/rocksky/dropbox/getMetadata.ts +43 -0
- package/src/lexicon/types/app/rocksky/dropbox/getTemporaryLink.ts +43 -0
- package/src/lexicon/types/app/rocksky/feed/defs.ts +182 -0
- package/src/lexicon/types/app/rocksky/feed/describeFeedGenerator.ts +48 -0
- package/src/lexicon/types/app/rocksky/feed/generator.ts +29 -0
- package/src/lexicon/types/app/rocksky/feed/getFeed.ts +47 -0
- package/src/lexicon/types/app/rocksky/feed/getFeedGenerator.ts +48 -0
- package/src/lexicon/types/app/rocksky/feed/getFeedGenerators.ts +43 -0
- package/src/lexicon/types/app/rocksky/feed/getFeedSkeleton.ts +56 -0
- package/src/lexicon/types/app/rocksky/feed/getNowPlayings.ts +43 -0
- package/src/lexicon/types/app/rocksky/feed/search.ts +43 -0
- package/src/lexicon/types/app/rocksky/googledrive/defs.ts +42 -0
- package/src/lexicon/types/app/rocksky/googledrive/downloadFile.ts +42 -0
- package/src/lexicon/types/app/rocksky/googledrive/getFile.ts +43 -0
- package/src/lexicon/types/app/rocksky/googledrive/getFiles.ts +43 -0
- package/src/lexicon/types/app/rocksky/graph/defs.ts +47 -0
- package/src/lexicon/types/app/rocksky/graph/follow.ts +28 -0
- package/src/lexicon/types/app/rocksky/graph/followAccount.ts +50 -0
- package/src/lexicon/types/app/rocksky/graph/getFollowers.ts +56 -0
- package/src/lexicon/types/app/rocksky/graph/getFollows.ts +56 -0
- package/src/lexicon/types/app/rocksky/graph/getKnownFollowers.ts +52 -0
- package/src/lexicon/types/app/rocksky/graph/unfollowAccount.ts +50 -0
- package/src/lexicon/types/app/rocksky/like/dislikeShout.ts +49 -0
- package/src/lexicon/types/app/rocksky/like/dislikeSong.ts +49 -0
- package/src/lexicon/types/app/rocksky/like/likeShout.ts +49 -0
- package/src/lexicon/types/app/rocksky/like/likeSong.ts +49 -0
- package/src/lexicon/types/app/rocksky/like.ts +27 -0
- package/src/lexicon/types/app/rocksky/player/addDirectoryToQueue.ts +40 -0
- package/src/lexicon/types/app/rocksky/player/addItemsToQueue.ts +39 -0
- package/src/lexicon/types/app/rocksky/player/defs.ts +57 -0
- package/src/lexicon/types/app/rocksky/player/getCurrentlyPlaying.ts +44 -0
- package/src/lexicon/types/app/rocksky/player/getPlaybackQueue.ts +42 -0
- package/src/lexicon/types/app/rocksky/player/next.ts +34 -0
- package/src/lexicon/types/app/rocksky/player/pause.ts +34 -0
- package/src/lexicon/types/app/rocksky/player/play.ts +34 -0
- package/src/lexicon/types/app/rocksky/player/playDirectory.ts +38 -0
- package/src/lexicon/types/app/rocksky/player/playFile.ts +35 -0
- package/src/lexicon/types/app/rocksky/player/previous.ts +34 -0
- package/src/lexicon/types/app/rocksky/player/seek.ts +36 -0
- package/src/lexicon/types/app/rocksky/playlist/createPlaylist.ts +37 -0
- package/src/lexicon/types/app/rocksky/playlist/defs.ts +86 -0
- package/src/lexicon/types/app/rocksky/playlist/getPlaylist.ts +43 -0
- package/src/lexicon/types/app/rocksky/playlist/getPlaylists.ts +50 -0
- package/src/lexicon/types/app/rocksky/playlist/insertDirectory.ts +39 -0
- package/src/lexicon/types/app/rocksky/playlist/insertFiles.ts +38 -0
- package/src/lexicon/types/app/rocksky/playlist/removePlaylist.ts +35 -0
- package/src/lexicon/types/app/rocksky/playlist/removeTrack.ts +37 -0
- package/src/lexicon/types/app/rocksky/playlist/startPlaylist.ts +39 -0
- package/src/lexicon/types/app/rocksky/playlist.ts +43 -0
- package/src/lexicon/types/app/rocksky/radio/defs.ts +63 -0
- package/src/lexicon/types/app/rocksky/radio.ts +37 -0
- package/src/lexicon/types/app/rocksky/scrobble/createScrobble.ts +91 -0
- package/src/lexicon/types/app/rocksky/scrobble/defs.ts +93 -0
- package/src/lexicon/types/app/rocksky/scrobble/getScrobble.ts +43 -0
- package/src/lexicon/types/app/rocksky/scrobble/getScrobbles.ts +54 -0
- package/src/lexicon/types/app/rocksky/scrobble.ts +75 -0
- package/src/lexicon/types/app/rocksky/shout/createShout.ts +49 -0
- package/src/lexicon/types/app/rocksky/shout/defs.ts +58 -0
- package/src/lexicon/types/app/rocksky/shout/getAlbumShouts.ts +52 -0
- package/src/lexicon/types/app/rocksky/shout/getArtistShouts.ts +52 -0
- package/src/lexicon/types/app/rocksky/shout/getProfileShouts.ts +52 -0
- package/src/lexicon/types/app/rocksky/shout/getShoutReplies.ts +52 -0
- package/src/lexicon/types/app/rocksky/shout/getTrackShouts.ts +48 -0
- package/src/lexicon/types/app/rocksky/shout/removeShout.ts +43 -0
- package/src/lexicon/types/app/rocksky/shout/replyShout.ts +51 -0
- package/src/lexicon/types/app/rocksky/shout/reportShout.ts +51 -0
- package/src/lexicon/types/app/rocksky/shout.ts +30 -0
- package/src/lexicon/types/app/rocksky/song/createSong.ts +71 -0
- package/src/lexicon/types/app/rocksky/song/defs.ts +103 -0
- package/src/lexicon/types/app/rocksky/song/getSong.ts +43 -0
- package/src/lexicon/types/app/rocksky/song/getSongs.ts +50 -0
- package/src/lexicon/types/app/rocksky/song.ts +74 -0
- package/src/lexicon/types/app/rocksky/spotify/defs.ts +35 -0
- package/src/lexicon/types/app/rocksky/spotify/getCurrentlyPlaying.ts +43 -0
- package/src/lexicon/types/app/rocksky/spotify/next.ts +32 -0
- package/src/lexicon/types/app/rocksky/spotify/pause.ts +32 -0
- package/src/lexicon/types/app/rocksky/spotify/play.ts +32 -0
- package/src/lexicon/types/app/rocksky/spotify/previous.ts +32 -0
- package/src/lexicon/types/app/rocksky/spotify/seek.ts +35 -0
- package/src/lexicon/types/app/rocksky/stats/defs.ts +33 -0
- package/src/lexicon/types/app/rocksky/stats/getStats.ts +43 -0
- package/src/lexicon/types/com/atproto/repo/strongRef.ts +26 -0
- package/src/lexicon/util.ts +13 -0
- package/src/lib/agent.ts +56 -0
- package/src/lib/cleanUpJetstreamLock.ts +66 -0
- package/src/lib/cleanUpSyncLock.ts +56 -0
- package/src/lib/didUnstorageCache.ts +72 -0
- package/src/lib/env.ts +25 -0
- package/src/lib/extractPdsFromDid.ts +33 -0
- package/src/lib/getDidAndHandle.ts +39 -0
- package/src/lib/idResolver.ts +52 -0
- package/src/lib/lastfm.ts +26 -0
- package/src/lib/matchTrack.ts +47 -0
- package/src/logger.ts +18 -0
- package/src/mcp/index.ts +269 -0
- package/src/mcp/tools/albums.ts +13 -0
- package/src/mcp/tools/artists.ts +17 -0
- package/src/mcp/tools/create.ts +27 -0
- package/src/mcp/tools/myscrobbles.ts +42 -0
- package/src/mcp/tools/nowplaying.ts +53 -0
- package/src/mcp/tools/scrobbles.ts +39 -0
- package/src/mcp/tools/search.ts +88 -0
- package/src/mcp/tools/stats.ts +40 -0
- package/src/mcp/tools/tracks.ts +15 -0
- package/src/mcp/tools/whoami.ts +27 -0
- package/src/schema/album-tracks.ts +30 -0
- package/src/schema/albums.ts +29 -0
- package/src/schema/artist-albums.ts +29 -0
- package/src/schema/artist-genres.ts +17 -0
- package/src/schema/artist-tracks.ts +29 -0
- package/src/schema/artists.ts +30 -0
- package/src/schema/auth-session.ts +18 -0
- package/src/schema/genres.ts +18 -0
- package/src/schema/index.ts +33 -0
- package/src/schema/loved-tracks.ts +27 -0
- package/src/schema/scrobbles.ts +30 -0
- package/src/schema/tracks.ts +39 -0
- package/src/schema/user-albums.ts +31 -0
- package/src/schema/user-artists.ts +32 -0
- package/src/schema/user-tracks.ts +31 -0
- package/src/schema/users.ts +21 -0
- package/src/scrobble.ts +410 -0
- package/src/sqliteKv.ts +173 -0
- package/src/types.ts +308 -0
- package/tsconfig.json +26 -29
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
/** The URI of the playlist to start */
|
|
13
|
+
uri: string
|
|
14
|
+
/** The directory (id) to insert into the playlist */
|
|
15
|
+
directory: string
|
|
16
|
+
/** The position in the playlist to insert the directory at, if not specified, the directory will be appended */
|
|
17
|
+
position?: number
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type InputSchema = undefined
|
|
21
|
+
export type HandlerInput = undefined
|
|
22
|
+
|
|
23
|
+
export interface HandlerError {
|
|
24
|
+
status: number
|
|
25
|
+
message?: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type HandlerOutput = HandlerError | void
|
|
29
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
30
|
+
auth: HA
|
|
31
|
+
params: QueryParams
|
|
32
|
+
input: HandlerInput
|
|
33
|
+
req: express.Request
|
|
34
|
+
res: express.Response
|
|
35
|
+
resetRouteRateLimits: () => Promise<void>
|
|
36
|
+
}
|
|
37
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
38
|
+
ctx: HandlerReqCtx<HA>,
|
|
39
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
/** The URI of the playlist to start */
|
|
13
|
+
uri: string
|
|
14
|
+
files: string[]
|
|
15
|
+
/** The position in the playlist to insert the files at, if not specified, files will be appended */
|
|
16
|
+
position?: number
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type InputSchema = undefined
|
|
20
|
+
export type HandlerInput = undefined
|
|
21
|
+
|
|
22
|
+
export interface HandlerError {
|
|
23
|
+
status: number
|
|
24
|
+
message?: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type HandlerOutput = HandlerError | void
|
|
28
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
29
|
+
auth: HA
|
|
30
|
+
params: QueryParams
|
|
31
|
+
input: HandlerInput
|
|
32
|
+
req: express.Request
|
|
33
|
+
res: express.Response
|
|
34
|
+
resetRouteRateLimits: () => Promise<void>
|
|
35
|
+
}
|
|
36
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
37
|
+
ctx: HandlerReqCtx<HA>,
|
|
38
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
/** The URI of the playlist to remove */
|
|
13
|
+
uri: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type InputSchema = undefined
|
|
17
|
+
export type HandlerInput = undefined
|
|
18
|
+
|
|
19
|
+
export interface HandlerError {
|
|
20
|
+
status: number
|
|
21
|
+
message?: string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type HandlerOutput = HandlerError | void
|
|
25
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
26
|
+
auth: HA
|
|
27
|
+
params: QueryParams
|
|
28
|
+
input: HandlerInput
|
|
29
|
+
req: express.Request
|
|
30
|
+
res: express.Response
|
|
31
|
+
resetRouteRateLimits: () => Promise<void>
|
|
32
|
+
}
|
|
33
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
34
|
+
ctx: HandlerReqCtx<HA>,
|
|
35
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
/** The URI of the playlist to remove the track from */
|
|
13
|
+
uri: string
|
|
14
|
+
/** The position of the track to remove in the playlist */
|
|
15
|
+
position: number
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type InputSchema = undefined
|
|
19
|
+
export type HandlerInput = undefined
|
|
20
|
+
|
|
21
|
+
export interface HandlerError {
|
|
22
|
+
status: number
|
|
23
|
+
message?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type HandlerOutput = HandlerError | void
|
|
27
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
28
|
+
auth: HA
|
|
29
|
+
params: QueryParams
|
|
30
|
+
input: HandlerInput
|
|
31
|
+
req: express.Request
|
|
32
|
+
res: express.Response
|
|
33
|
+
resetRouteRateLimits: () => Promise<void>
|
|
34
|
+
}
|
|
35
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
36
|
+
ctx: HandlerReqCtx<HA>,
|
|
37
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
/** The URI of the playlist to start */
|
|
13
|
+
uri: string
|
|
14
|
+
/** Whether to shuffle the playlist when starting it */
|
|
15
|
+
shuffle?: boolean
|
|
16
|
+
/** The position in the playlist to start from, if not specified, starts from the beginning */
|
|
17
|
+
position?: number
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type InputSchema = undefined
|
|
21
|
+
export type HandlerInput = undefined
|
|
22
|
+
|
|
23
|
+
export interface HandlerError {
|
|
24
|
+
status: number
|
|
25
|
+
message?: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type HandlerOutput = HandlerError | void
|
|
29
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
30
|
+
auth: HA
|
|
31
|
+
params: QueryParams
|
|
32
|
+
input: HandlerInput
|
|
33
|
+
req: express.Request
|
|
34
|
+
res: express.Response
|
|
35
|
+
resetRouteRateLimits: () => Promise<void>
|
|
36
|
+
}
|
|
37
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
38
|
+
ctx: HandlerReqCtx<HA>,
|
|
39
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { lexicons } from '../../../lexicons'
|
|
6
|
+
import { isObj, hasProp } from '../../../util'
|
|
7
|
+
import { CID } from 'multiformats/cid'
|
|
8
|
+
import * as AppRockskySong from './song'
|
|
9
|
+
|
|
10
|
+
export interface Record {
|
|
11
|
+
/** The name of the playlist. */
|
|
12
|
+
name: string
|
|
13
|
+
/** The playlist description. */
|
|
14
|
+
description?: string
|
|
15
|
+
/** The picture of the playlist. */
|
|
16
|
+
picture?: BlobRef
|
|
17
|
+
/** The tracks in the playlist. */
|
|
18
|
+
tracks?: AppRockskySong.Record[]
|
|
19
|
+
/** The date the playlist was created. */
|
|
20
|
+
createdAt: string
|
|
21
|
+
/** The Spotify link of the playlist. */
|
|
22
|
+
spotifyLink?: string
|
|
23
|
+
/** The Tidal link of the playlist. */
|
|
24
|
+
tidalLink?: string
|
|
25
|
+
/** The YouTube link of the playlist. */
|
|
26
|
+
youtubeLink?: string
|
|
27
|
+
/** The Apple Music link of the playlist. */
|
|
28
|
+
appleMusicLink?: string
|
|
29
|
+
[k: string]: unknown
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function isRecord(v: unknown): v is Record {
|
|
33
|
+
return (
|
|
34
|
+
isObj(v) &&
|
|
35
|
+
hasProp(v, '$type') &&
|
|
36
|
+
(v.$type === 'app.rocksky.playlist#main' ||
|
|
37
|
+
v.$type === 'app.rocksky.playlist')
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function validateRecord(v: unknown): ValidationResult {
|
|
42
|
+
return lexicons.validate('app.rocksky.playlist#main', v)
|
|
43
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { lexicons } from '../../../../lexicons'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { CID } from 'multiformats/cid'
|
|
8
|
+
|
|
9
|
+
export interface RadioViewBasic {
|
|
10
|
+
/** The unique identifier of the radio. */
|
|
11
|
+
id?: string
|
|
12
|
+
/** The name of the radio. */
|
|
13
|
+
name?: string
|
|
14
|
+
/** A brief description of the radio. */
|
|
15
|
+
description?: string
|
|
16
|
+
/** The date and time when the radio was created. */
|
|
17
|
+
createdAt?: string
|
|
18
|
+
[k: string]: unknown
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function isRadioViewBasic(v: unknown): v is RadioViewBasic {
|
|
22
|
+
return (
|
|
23
|
+
isObj(v) &&
|
|
24
|
+
hasProp(v, '$type') &&
|
|
25
|
+
v.$type === 'app.rocksky.radio.defs#radioViewBasic'
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function validateRadioViewBasic(v: unknown): ValidationResult {
|
|
30
|
+
return lexicons.validate('app.rocksky.radio.defs#radioViewBasic', v)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface RadioViewDetailed {
|
|
34
|
+
/** The unique identifier of the radio. */
|
|
35
|
+
id?: string
|
|
36
|
+
/** The name of the radio. */
|
|
37
|
+
name?: string
|
|
38
|
+
/** A brief description of the radio. */
|
|
39
|
+
description?: string
|
|
40
|
+
/** The website of the radio. */
|
|
41
|
+
website?: string
|
|
42
|
+
/** The streaming URL of the radio. */
|
|
43
|
+
url?: string
|
|
44
|
+
/** The genre of the radio. */
|
|
45
|
+
genre?: string
|
|
46
|
+
/** The logo of the radio station. */
|
|
47
|
+
logo?: string
|
|
48
|
+
/** The date and time when the radio was created. */
|
|
49
|
+
createdAt?: string
|
|
50
|
+
[k: string]: unknown
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function isRadioViewDetailed(v: unknown): v is RadioViewDetailed {
|
|
54
|
+
return (
|
|
55
|
+
isObj(v) &&
|
|
56
|
+
hasProp(v, '$type') &&
|
|
57
|
+
v.$type === 'app.rocksky.radio.defs#radioViewDetailed'
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function validateRadioViewDetailed(v: unknown): ValidationResult {
|
|
62
|
+
return lexicons.validate('app.rocksky.radio.defs#radioViewDetailed', v)
|
|
63
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { lexicons } from '../../../lexicons'
|
|
6
|
+
import { isObj, hasProp } from '../../../util'
|
|
7
|
+
import { CID } from 'multiformats/cid'
|
|
8
|
+
|
|
9
|
+
export interface Record {
|
|
10
|
+
/** The name of the radio station. */
|
|
11
|
+
name: string
|
|
12
|
+
/** The URL of the radio station. */
|
|
13
|
+
url: string
|
|
14
|
+
/** A description of the radio station. */
|
|
15
|
+
description?: string
|
|
16
|
+
/** The genre of the radio station. */
|
|
17
|
+
genre?: string
|
|
18
|
+
/** The logo of the radio station. */
|
|
19
|
+
logo?: BlobRef
|
|
20
|
+
/** The website of the radio station. */
|
|
21
|
+
website?: string
|
|
22
|
+
/** The date when the radio station was created. */
|
|
23
|
+
createdAt: string
|
|
24
|
+
[k: string]: unknown
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function isRecord(v: unknown): v is Record {
|
|
28
|
+
return (
|
|
29
|
+
isObj(v) &&
|
|
30
|
+
hasProp(v, '$type') &&
|
|
31
|
+
(v.$type === 'app.rocksky.radio#main' || v.$type === 'app.rocksky.radio')
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function validateRecord(v: unknown): ValidationResult {
|
|
36
|
+
return lexicons.validate('app.rocksky.radio#main', v)
|
|
37
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskyScrobbleDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {}
|
|
13
|
+
|
|
14
|
+
export interface InputSchema {
|
|
15
|
+
/** The title of the track being scrobbled */
|
|
16
|
+
title: string
|
|
17
|
+
/** The artist of the track being scrobbled */
|
|
18
|
+
artist: string
|
|
19
|
+
/** The album of the track being scrobbled */
|
|
20
|
+
album?: string
|
|
21
|
+
/** The duration of the track in seconds */
|
|
22
|
+
duration?: number
|
|
23
|
+
/** The MusicBrainz ID of the track, if available */
|
|
24
|
+
mbId?: string
|
|
25
|
+
/** The URL of the album art for the track */
|
|
26
|
+
albumArt?: string
|
|
27
|
+
/** The track number of the track in the album */
|
|
28
|
+
trackNumber?: number
|
|
29
|
+
/** The release date of the track, formatted as YYYY-MM-DD */
|
|
30
|
+
releaseDate?: string
|
|
31
|
+
/** The year the track was released */
|
|
32
|
+
year?: number
|
|
33
|
+
/** The disc number of the track in the album, if applicable */
|
|
34
|
+
discNumber?: number
|
|
35
|
+
/** The lyrics of the track, if available */
|
|
36
|
+
lyrics?: string
|
|
37
|
+
/** The composer of the track, if available */
|
|
38
|
+
composer?: string
|
|
39
|
+
/** The copyright message for the track, if available */
|
|
40
|
+
copyrightMessage?: string
|
|
41
|
+
/** The record label of the track, if available */
|
|
42
|
+
label?: string
|
|
43
|
+
/** The URL of the artist's picture, if available */
|
|
44
|
+
artistPicture?: string
|
|
45
|
+
/** The Spotify link for the track, if available */
|
|
46
|
+
spotifyLink?: string
|
|
47
|
+
/** The Last.fm link for the track, if available */
|
|
48
|
+
lastfmLink?: string
|
|
49
|
+
/** The Tidal link for the track, if available */
|
|
50
|
+
tidalLink?: string
|
|
51
|
+
/** The Apple Music link for the track, if available */
|
|
52
|
+
appleMusicLink?: string
|
|
53
|
+
/** The Youtube link for the track, if available */
|
|
54
|
+
youtubeLink?: string
|
|
55
|
+
/** The Deezer link for the track, if available */
|
|
56
|
+
deezerLink?: string
|
|
57
|
+
/** The timestamp of the scrobble in milliseconds since epoch */
|
|
58
|
+
timestamp?: number
|
|
59
|
+
[k: string]: unknown
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export type OutputSchema = AppRockskyScrobbleDefs.ScrobbleViewBasic
|
|
63
|
+
|
|
64
|
+
export interface HandlerInput {
|
|
65
|
+
encoding: 'application/json'
|
|
66
|
+
body: InputSchema
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface HandlerSuccess {
|
|
70
|
+
encoding: 'application/json'
|
|
71
|
+
body: OutputSchema
|
|
72
|
+
headers?: { [key: string]: string }
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface HandlerError {
|
|
76
|
+
status: number
|
|
77
|
+
message?: string
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
81
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
82
|
+
auth: HA
|
|
83
|
+
params: QueryParams
|
|
84
|
+
input: HandlerInput
|
|
85
|
+
req: express.Request
|
|
86
|
+
res: express.Response
|
|
87
|
+
resetRouteRateLimits: () => Promise<void>
|
|
88
|
+
}
|
|
89
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
90
|
+
ctx: HandlerReqCtx<HA>,
|
|
91
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { lexicons } from '../../../../lexicons'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { CID } from 'multiformats/cid'
|
|
8
|
+
|
|
9
|
+
export interface ScrobbleViewBasic {
|
|
10
|
+
/** The unique identifier of the scrobble. */
|
|
11
|
+
id?: string
|
|
12
|
+
/** The handle of the user who created the scrobble. */
|
|
13
|
+
user?: string
|
|
14
|
+
/** The display name of the user who created the scrobble. */
|
|
15
|
+
userDisplayName?: string
|
|
16
|
+
/** The avatar URL of the user who created the scrobble. */
|
|
17
|
+
userAvatar?: string
|
|
18
|
+
/** The title of the scrobble. */
|
|
19
|
+
title?: string
|
|
20
|
+
/** The artist of the song. */
|
|
21
|
+
artist?: string
|
|
22
|
+
/** The URI of the artist. */
|
|
23
|
+
artistUri?: string
|
|
24
|
+
/** The album of the song. */
|
|
25
|
+
album?: string
|
|
26
|
+
/** The URI of the album. */
|
|
27
|
+
albumUri?: string
|
|
28
|
+
/** The album art URL of the song. */
|
|
29
|
+
cover?: string
|
|
30
|
+
/** The timestamp when the scrobble was created. */
|
|
31
|
+
date?: string
|
|
32
|
+
/** The URI of the scrobble. */
|
|
33
|
+
uri?: string
|
|
34
|
+
/** The SHA256 hash of the scrobble data. */
|
|
35
|
+
sha256?: string
|
|
36
|
+
liked?: boolean
|
|
37
|
+
likesCount?: number
|
|
38
|
+
[k: string]: unknown
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function isScrobbleViewBasic(v: unknown): v is ScrobbleViewBasic {
|
|
42
|
+
return (
|
|
43
|
+
isObj(v) &&
|
|
44
|
+
hasProp(v, '$type') &&
|
|
45
|
+
v.$type === 'app.rocksky.scrobble.defs#scrobbleViewBasic'
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function validateScrobbleViewBasic(v: unknown): ValidationResult {
|
|
50
|
+
return lexicons.validate('app.rocksky.scrobble.defs#scrobbleViewBasic', v)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface ScrobbleViewDetailed {
|
|
54
|
+
/** The unique identifier of the scrobble. */
|
|
55
|
+
id?: string
|
|
56
|
+
/** The handle of the user who created the scrobble. */
|
|
57
|
+
user?: string
|
|
58
|
+
/** The title of the scrobble. */
|
|
59
|
+
title?: string
|
|
60
|
+
/** The artist of the song. */
|
|
61
|
+
artist?: string
|
|
62
|
+
/** The URI of the artist. */
|
|
63
|
+
artistUri?: string
|
|
64
|
+
/** The album of the song. */
|
|
65
|
+
album?: string
|
|
66
|
+
/** The URI of the album. */
|
|
67
|
+
albumUri?: string
|
|
68
|
+
/** The album art URL of the song. */
|
|
69
|
+
cover?: string
|
|
70
|
+
/** The timestamp when the scrobble was created. */
|
|
71
|
+
date?: string
|
|
72
|
+
/** The URI of the scrobble. */
|
|
73
|
+
uri?: string
|
|
74
|
+
/** The SHA256 hash of the scrobble data. */
|
|
75
|
+
sha256?: string
|
|
76
|
+
/** The number of listeners */
|
|
77
|
+
listeners?: number
|
|
78
|
+
/** The number of scrobbles for this song */
|
|
79
|
+
scrobbles?: number
|
|
80
|
+
[k: string]: unknown
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function isScrobbleViewDetailed(v: unknown): v is ScrobbleViewDetailed {
|
|
84
|
+
return (
|
|
85
|
+
isObj(v) &&
|
|
86
|
+
hasProp(v, '$type') &&
|
|
87
|
+
v.$type === 'app.rocksky.scrobble.defs#scrobbleViewDetailed'
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function validateScrobbleViewDetailed(v: unknown): ValidationResult {
|
|
92
|
+
return lexicons.validate('app.rocksky.scrobble.defs#scrobbleViewDetailed', v)
|
|
93
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskyScrobbleDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The unique identifier of the scrobble */
|
|
14
|
+
uri: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
export type OutputSchema = AppRockskyScrobbleDefs.ScrobbleViewDetailed
|
|
19
|
+
export type HandlerInput = undefined
|
|
20
|
+
|
|
21
|
+
export interface HandlerSuccess {
|
|
22
|
+
encoding: 'application/json'
|
|
23
|
+
body: OutputSchema
|
|
24
|
+
headers?: { [key: string]: string }
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface HandlerError {
|
|
28
|
+
status: number
|
|
29
|
+
message?: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
33
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
34
|
+
auth: HA
|
|
35
|
+
params: QueryParams
|
|
36
|
+
input: HandlerInput
|
|
37
|
+
req: express.Request
|
|
38
|
+
res: express.Response
|
|
39
|
+
resetRouteRateLimits: () => Promise<void>
|
|
40
|
+
}
|
|
41
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
42
|
+
ctx: HandlerReqCtx<HA>,
|
|
43
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskyScrobbleDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The DID or handle of the actor */
|
|
14
|
+
did?: string
|
|
15
|
+
/** If true, only return scrobbles from actors the viewer is following. */
|
|
16
|
+
following?: boolean
|
|
17
|
+
/** The maximum number of scrobbles to return */
|
|
18
|
+
limit?: number
|
|
19
|
+
/** The offset for pagination */
|
|
20
|
+
offset?: number
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type InputSchema = undefined
|
|
24
|
+
|
|
25
|
+
export interface OutputSchema {
|
|
26
|
+
scrobbles?: AppRockskyScrobbleDefs.ScrobbleViewBasic[]
|
|
27
|
+
[k: string]: unknown
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type HandlerInput = undefined
|
|
31
|
+
|
|
32
|
+
export interface HandlerSuccess {
|
|
33
|
+
encoding: 'application/json'
|
|
34
|
+
body: OutputSchema
|
|
35
|
+
headers?: { [key: string]: string }
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface HandlerError {
|
|
39
|
+
status: number
|
|
40
|
+
message?: string
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
44
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
45
|
+
auth: HA
|
|
46
|
+
params: QueryParams
|
|
47
|
+
input: HandlerInput
|
|
48
|
+
req: express.Request
|
|
49
|
+
res: express.Response
|
|
50
|
+
resetRouteRateLimits: () => Promise<void>
|
|
51
|
+
}
|
|
52
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
53
|
+
ctx: HandlerReqCtx<HA>,
|
|
54
|
+
) => Promise<HandlerOutput> | HandlerOutput
|