@rocksky/cli 0.2.0 → 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 +21 -9
- 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 +8280 -254
- 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 +31 -3
- package/src/client.ts +32 -14
- 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 +66 -26
- 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/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
|
+
playerId?: string
|
|
13
|
+
items: string[]
|
|
14
|
+
/** Position in the queue to insert the items at, defaults to the end if not specified */
|
|
15
|
+
position?: number
|
|
16
|
+
/** Whether to shuffle the added items in the queue */
|
|
17
|
+
shuffle?: boolean
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type InputSchema = undefined
|
|
21
|
+
export type HandlerInput = undefined
|
|
22
|
+
|
|
23
|
+
export interface HandlerError {
|
|
24
|
+
status: number
|
|
25
|
+
message?: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type HandlerOutput = HandlerError | void
|
|
29
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
30
|
+
auth: HA
|
|
31
|
+
params: QueryParams
|
|
32
|
+
input: HandlerInput
|
|
33
|
+
req: express.Request
|
|
34
|
+
res: express.Response
|
|
35
|
+
resetRouteRateLimits: () => Promise<void>
|
|
36
|
+
}
|
|
37
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
38
|
+
ctx: HandlerReqCtx<HA>,
|
|
39
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { lexicons } from '../../../../lexicons'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { CID } from 'multiformats/cid'
|
|
8
|
+
import * as AppRockskySongDefsSongViewBasic from '../song/defs/songViewBasic'
|
|
9
|
+
|
|
10
|
+
export interface CurrentlyPlayingViewDetailed {
|
|
11
|
+
/** The title of the currently playing track */
|
|
12
|
+
title?: string
|
|
13
|
+
[k: string]: unknown
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function isCurrentlyPlayingViewDetailed(
|
|
17
|
+
v: unknown,
|
|
18
|
+
): v is CurrentlyPlayingViewDetailed {
|
|
19
|
+
return (
|
|
20
|
+
isObj(v) &&
|
|
21
|
+
hasProp(v, '$type') &&
|
|
22
|
+
v.$type === 'app.rocksky.player.defs#currentlyPlayingViewDetailed'
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function validateCurrentlyPlayingViewDetailed(
|
|
27
|
+
v: unknown,
|
|
28
|
+
): ValidationResult {
|
|
29
|
+
return lexicons.validate(
|
|
30
|
+
'app.rocksky.player.defs#currentlyPlayingViewDetailed',
|
|
31
|
+
v,
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface PlaybackQueueViewDetailed {
|
|
36
|
+
tracks?: AppRockskySongDefsSongViewBasic.Main[]
|
|
37
|
+
[k: string]: unknown
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function isPlaybackQueueViewDetailed(
|
|
41
|
+
v: unknown,
|
|
42
|
+
): v is PlaybackQueueViewDetailed {
|
|
43
|
+
return (
|
|
44
|
+
isObj(v) &&
|
|
45
|
+
hasProp(v, '$type') &&
|
|
46
|
+
v.$type === 'app.rocksky.player.defs#playbackQueueViewDetailed'
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function validatePlaybackQueueViewDetailed(
|
|
51
|
+
v: unknown,
|
|
52
|
+
): ValidationResult {
|
|
53
|
+
return lexicons.validate(
|
|
54
|
+
'app.rocksky.player.defs#playbackQueueViewDetailed',
|
|
55
|
+
v,
|
|
56
|
+
)
|
|
57
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskyPlayerDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
playerId?: string
|
|
14
|
+
/** Handle or DID of the actor to retrieve the currently playing track for. If not provided, defaults to the current user. */
|
|
15
|
+
actor?: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type InputSchema = undefined
|
|
19
|
+
export type OutputSchema = AppRockskyPlayerDefs.CurrentlyPlayingViewDetailed
|
|
20
|
+
export type HandlerInput = undefined
|
|
21
|
+
|
|
22
|
+
export interface HandlerSuccess {
|
|
23
|
+
encoding: 'application/json'
|
|
24
|
+
body: OutputSchema
|
|
25
|
+
headers?: { [key: string]: string }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface HandlerError {
|
|
29
|
+
status: number
|
|
30
|
+
message?: string
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
34
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
35
|
+
auth: HA
|
|
36
|
+
params: QueryParams
|
|
37
|
+
input: HandlerInput
|
|
38
|
+
req: express.Request
|
|
39
|
+
res: express.Response
|
|
40
|
+
resetRouteRateLimits: () => Promise<void>
|
|
41
|
+
}
|
|
42
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
43
|
+
ctx: HandlerReqCtx<HA>,
|
|
44
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskyPlayerDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
playerId?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type InputSchema = undefined
|
|
17
|
+
export type OutputSchema = AppRockskyPlayerDefs.PlaybackQueueViewDetailed
|
|
18
|
+
export type HandlerInput = undefined
|
|
19
|
+
|
|
20
|
+
export interface HandlerSuccess {
|
|
21
|
+
encoding: 'application/json'
|
|
22
|
+
body: OutputSchema
|
|
23
|
+
headers?: { [key: string]: string }
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface HandlerError {
|
|
27
|
+
status: number
|
|
28
|
+
message?: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
32
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
33
|
+
auth: HA
|
|
34
|
+
params: QueryParams
|
|
35
|
+
input: HandlerInput
|
|
36
|
+
req: express.Request
|
|
37
|
+
res: express.Response
|
|
38
|
+
resetRouteRateLimits: () => Promise<void>
|
|
39
|
+
}
|
|
40
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
41
|
+
ctx: HandlerReqCtx<HA>,
|
|
42
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
playerId?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type InputSchema = undefined
|
|
16
|
+
export type HandlerInput = undefined
|
|
17
|
+
|
|
18
|
+
export interface HandlerError {
|
|
19
|
+
status: number
|
|
20
|
+
message?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type HandlerOutput = HandlerError | void
|
|
24
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
25
|
+
auth: HA
|
|
26
|
+
params: QueryParams
|
|
27
|
+
input: HandlerInput
|
|
28
|
+
req: express.Request
|
|
29
|
+
res: express.Response
|
|
30
|
+
resetRouteRateLimits: () => Promise<void>
|
|
31
|
+
}
|
|
32
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
33
|
+
ctx: HandlerReqCtx<HA>,
|
|
34
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
playerId?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type InputSchema = undefined
|
|
16
|
+
export type HandlerInput = undefined
|
|
17
|
+
|
|
18
|
+
export interface HandlerError {
|
|
19
|
+
status: number
|
|
20
|
+
message?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type HandlerOutput = HandlerError | void
|
|
24
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
25
|
+
auth: HA
|
|
26
|
+
params: QueryParams
|
|
27
|
+
input: HandlerInput
|
|
28
|
+
req: express.Request
|
|
29
|
+
res: express.Response
|
|
30
|
+
resetRouteRateLimits: () => Promise<void>
|
|
31
|
+
}
|
|
32
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
33
|
+
ctx: HandlerReqCtx<HA>,
|
|
34
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
playerId?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type InputSchema = undefined
|
|
16
|
+
export type HandlerInput = undefined
|
|
17
|
+
|
|
18
|
+
export interface HandlerError {
|
|
19
|
+
status: number
|
|
20
|
+
message?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type HandlerOutput = HandlerError | void
|
|
24
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
25
|
+
auth: HA
|
|
26
|
+
params: QueryParams
|
|
27
|
+
input: HandlerInput
|
|
28
|
+
req: express.Request
|
|
29
|
+
res: express.Response
|
|
30
|
+
resetRouteRateLimits: () => Promise<void>
|
|
31
|
+
}
|
|
32
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
33
|
+
ctx: HandlerReqCtx<HA>,
|
|
34
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -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
|
+
playerId?: string
|
|
13
|
+
directoryId: string
|
|
14
|
+
shuffle?: boolean
|
|
15
|
+
recurse?: boolean
|
|
16
|
+
position?: number
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type InputSchema = undefined
|
|
20
|
+
export type HandlerInput = undefined
|
|
21
|
+
|
|
22
|
+
export interface HandlerError {
|
|
23
|
+
status: number
|
|
24
|
+
message?: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type HandlerOutput = HandlerError | void
|
|
28
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
29
|
+
auth: HA
|
|
30
|
+
params: QueryParams
|
|
31
|
+
input: HandlerInput
|
|
32
|
+
req: express.Request
|
|
33
|
+
res: express.Response
|
|
34
|
+
resetRouteRateLimits: () => Promise<void>
|
|
35
|
+
}
|
|
36
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
37
|
+
ctx: HandlerReqCtx<HA>,
|
|
38
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -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
|
+
playerId?: string
|
|
13
|
+
fileId: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type InputSchema = undefined
|
|
17
|
+
export type HandlerInput = undefined
|
|
18
|
+
|
|
19
|
+
export interface HandlerError {
|
|
20
|
+
status: number
|
|
21
|
+
message?: string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type HandlerOutput = HandlerError | void
|
|
25
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
26
|
+
auth: HA
|
|
27
|
+
params: QueryParams
|
|
28
|
+
input: HandlerInput
|
|
29
|
+
req: express.Request
|
|
30
|
+
res: express.Response
|
|
31
|
+
resetRouteRateLimits: () => Promise<void>
|
|
32
|
+
}
|
|
33
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
34
|
+
ctx: HandlerReqCtx<HA>,
|
|
35
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
playerId?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type InputSchema = undefined
|
|
16
|
+
export type HandlerInput = undefined
|
|
17
|
+
|
|
18
|
+
export interface HandlerError {
|
|
19
|
+
status: number
|
|
20
|
+
message?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type HandlerOutput = HandlerError | void
|
|
24
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
25
|
+
auth: HA
|
|
26
|
+
params: QueryParams
|
|
27
|
+
input: HandlerInput
|
|
28
|
+
req: express.Request
|
|
29
|
+
res: express.Response
|
|
30
|
+
resetRouteRateLimits: () => Promise<void>
|
|
31
|
+
}
|
|
32
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
33
|
+
ctx: HandlerReqCtx<HA>,
|
|
34
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
playerId?: string
|
|
13
|
+
/** The position in seconds to seek to */
|
|
14
|
+
position: number
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
export type HandlerInput = undefined
|
|
19
|
+
|
|
20
|
+
export interface HandlerError {
|
|
21
|
+
status: number
|
|
22
|
+
message?: string
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type HandlerOutput = HandlerError | void
|
|
26
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
27
|
+
auth: HA
|
|
28
|
+
params: QueryParams
|
|
29
|
+
input: HandlerInput
|
|
30
|
+
req: express.Request
|
|
31
|
+
res: express.Response
|
|
32
|
+
resetRouteRateLimits: () => Promise<void>
|
|
33
|
+
}
|
|
34
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
35
|
+
ctx: HandlerReqCtx<HA>,
|
|
36
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -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 name of the playlist */
|
|
13
|
+
name: string
|
|
14
|
+
/** A brief description of the playlist */
|
|
15
|
+
description?: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type InputSchema = undefined
|
|
19
|
+
export type HandlerInput = undefined
|
|
20
|
+
|
|
21
|
+
export interface HandlerError {
|
|
22
|
+
status: number
|
|
23
|
+
message?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type HandlerOutput = HandlerError | void
|
|
27
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
28
|
+
auth: HA
|
|
29
|
+
params: QueryParams
|
|
30
|
+
input: HandlerInput
|
|
31
|
+
req: express.Request
|
|
32
|
+
res: express.Response
|
|
33
|
+
resetRouteRateLimits: () => Promise<void>
|
|
34
|
+
}
|
|
35
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
36
|
+
ctx: HandlerReqCtx<HA>,
|
|
37
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { lexicons } from '../../../../lexicons'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { CID } from 'multiformats/cid'
|
|
8
|
+
import * as AppRockskySongDefs from '../song/defs'
|
|
9
|
+
|
|
10
|
+
/** Detailed view of a playlist, including its tracks and metadata */
|
|
11
|
+
export interface PlaylistViewDetailed {
|
|
12
|
+
/** The unique identifier of the playlist. */
|
|
13
|
+
id?: string
|
|
14
|
+
/** The title of the playlist. */
|
|
15
|
+
title?: string
|
|
16
|
+
/** The URI of the playlist. */
|
|
17
|
+
uri?: string
|
|
18
|
+
/** The DID of the curator of the playlist. */
|
|
19
|
+
curatorDid?: string
|
|
20
|
+
/** The handle of the curator of the playlist. */
|
|
21
|
+
curatorHandle?: string
|
|
22
|
+
/** The name of the curator of the playlist. */
|
|
23
|
+
curatorName?: string
|
|
24
|
+
/** The URL of the avatar image of the curator. */
|
|
25
|
+
curatorAvatarUrl?: string
|
|
26
|
+
/** A description of the playlist. */
|
|
27
|
+
description?: string
|
|
28
|
+
/** The URL of the cover image for the playlist. */
|
|
29
|
+
coverImageUrl?: string
|
|
30
|
+
/** The date and time when the playlist was created. */
|
|
31
|
+
createdAt?: string
|
|
32
|
+
/** A list of tracks in the playlist. */
|
|
33
|
+
tracks?: AppRockskySongDefs.SongViewBasic[]
|
|
34
|
+
[k: string]: unknown
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function isPlaylistViewDetailed(v: unknown): v is PlaylistViewDetailed {
|
|
38
|
+
return (
|
|
39
|
+
isObj(v) &&
|
|
40
|
+
hasProp(v, '$type') &&
|
|
41
|
+
v.$type === 'app.rocksky.playlist.defs#playlistViewDetailed'
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function validatePlaylistViewDetailed(v: unknown): ValidationResult {
|
|
46
|
+
return lexicons.validate('app.rocksky.playlist.defs#playlistViewDetailed', v)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Basic view of a playlist, including its metadata */
|
|
50
|
+
export interface PlaylistViewBasic {
|
|
51
|
+
/** The unique identifier of the playlist. */
|
|
52
|
+
id?: string
|
|
53
|
+
/** The title of the playlist. */
|
|
54
|
+
title?: string
|
|
55
|
+
/** The URI of the playlist. */
|
|
56
|
+
uri?: string
|
|
57
|
+
/** The DID of the curator of the playlist. */
|
|
58
|
+
curatorDid?: string
|
|
59
|
+
/** The handle of the curator of the playlist. */
|
|
60
|
+
curatorHandle?: string
|
|
61
|
+
/** The name of the curator of the playlist. */
|
|
62
|
+
curatorName?: string
|
|
63
|
+
/** The URL of the avatar image of the curator. */
|
|
64
|
+
curatorAvatarUrl?: string
|
|
65
|
+
/** A description of the playlist. */
|
|
66
|
+
description?: string
|
|
67
|
+
/** The URL of the cover image for the playlist. */
|
|
68
|
+
coverImageUrl?: string
|
|
69
|
+
/** The date and time when the playlist was created. */
|
|
70
|
+
createdAt?: string
|
|
71
|
+
/** The number of tracks in the playlist. */
|
|
72
|
+
trackCount?: number
|
|
73
|
+
[k: string]: unknown
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function isPlaylistViewBasic(v: unknown): v is PlaylistViewBasic {
|
|
77
|
+
return (
|
|
78
|
+
isObj(v) &&
|
|
79
|
+
hasProp(v, '$type') &&
|
|
80
|
+
v.$type === 'app.rocksky.playlist.defs#playlistViewBasic'
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function validatePlaylistViewBasic(v: unknown): ValidationResult {
|
|
85
|
+
return lexicons.validate('app.rocksky.playlist.defs#playlistViewBasic', v)
|
|
86
|
+
}
|
|
@@ -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 AppRockskyPlaylistDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The URI of the playlist to retrieve. */
|
|
14
|
+
uri: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
export type OutputSchema = AppRockskyPlaylistDefs.PlaylistViewDetailed
|
|
19
|
+
export type HandlerInput = undefined
|
|
20
|
+
|
|
21
|
+
export interface HandlerSuccess {
|
|
22
|
+
encoding: 'application/json'
|
|
23
|
+
body: OutputSchema
|
|
24
|
+
headers?: { [key: string]: string }
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface HandlerError {
|
|
28
|
+
status: number
|
|
29
|
+
message?: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
33
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
34
|
+
auth: HA
|
|
35
|
+
params: QueryParams
|
|
36
|
+
input: HandlerInput
|
|
37
|
+
req: express.Request
|
|
38
|
+
res: express.Response
|
|
39
|
+
resetRouteRateLimits: () => Promise<void>
|
|
40
|
+
}
|
|
41
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
42
|
+
ctx: HandlerReqCtx<HA>,
|
|
43
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskyPlaylistDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The maximum number of playlists to return. */
|
|
14
|
+
limit?: number
|
|
15
|
+
/** The offset for pagination, used to skip a number of playlists. */
|
|
16
|
+
offset?: number
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type InputSchema = undefined
|
|
20
|
+
|
|
21
|
+
export interface OutputSchema {
|
|
22
|
+
playlists?: AppRockskyPlaylistDefs.PlaylistViewBasic[]
|
|
23
|
+
[k: string]: unknown
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type HandlerInput = undefined
|
|
27
|
+
|
|
28
|
+
export interface HandlerSuccess {
|
|
29
|
+
encoding: 'application/json'
|
|
30
|
+
body: OutputSchema
|
|
31
|
+
headers?: { [key: string]: string }
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface HandlerError {
|
|
35
|
+
status: number
|
|
36
|
+
message?: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
40
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
41
|
+
auth: HA
|
|
42
|
+
params: QueryParams
|
|
43
|
+
input: HandlerInput
|
|
44
|
+
req: express.Request
|
|
45
|
+
res: express.Response
|
|
46
|
+
resetRouteRateLimits: () => Promise<void>
|
|
47
|
+
}
|
|
48
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
49
|
+
ctx: HandlerReqCtx<HA>,
|
|
50
|
+
) => Promise<HandlerOutput> | HandlerOutput
|