@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,75 @@
|
|
|
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 AppRockskyArtistDefs from './artist/defs'
|
|
9
|
+
|
|
10
|
+
export interface Record {
|
|
11
|
+
/** The title of the song. */
|
|
12
|
+
title: string
|
|
13
|
+
/** The artist of the song. */
|
|
14
|
+
artist: string
|
|
15
|
+
/** The artists of the song with MusicBrainz IDs. */
|
|
16
|
+
artists?: AppRockskyArtistDefs.ArtistMbid[]
|
|
17
|
+
/** The album artist of the song. */
|
|
18
|
+
albumArtist: string
|
|
19
|
+
/** The album of the song. */
|
|
20
|
+
album: string
|
|
21
|
+
/** The duration of the song in seconds. */
|
|
22
|
+
duration: number
|
|
23
|
+
/** The track number of the song in the album. */
|
|
24
|
+
trackNumber?: number
|
|
25
|
+
/** The disc number of the song in the album. */
|
|
26
|
+
discNumber?: number
|
|
27
|
+
/** The release date of the song. */
|
|
28
|
+
releaseDate?: string
|
|
29
|
+
/** The year the song was released. */
|
|
30
|
+
year?: number
|
|
31
|
+
/** The genre of the song. */
|
|
32
|
+
genre?: string
|
|
33
|
+
/** The tags of the song. */
|
|
34
|
+
tags?: string[]
|
|
35
|
+
/** The composer of the song. */
|
|
36
|
+
composer?: string
|
|
37
|
+
/** The lyrics of the song. */
|
|
38
|
+
lyrics?: string
|
|
39
|
+
/** The copyright message of the song. */
|
|
40
|
+
copyrightMessage?: string
|
|
41
|
+
/** Informations about the song */
|
|
42
|
+
wiki?: string
|
|
43
|
+
/** The album art of the song. */
|
|
44
|
+
albumArt?: BlobRef
|
|
45
|
+
/** The URL of the album art of the song. */
|
|
46
|
+
albumArtUrl?: string
|
|
47
|
+
/** The YouTube link of the song. */
|
|
48
|
+
youtubeLink?: string
|
|
49
|
+
/** The Spotify link of the song. */
|
|
50
|
+
spotifyLink?: string
|
|
51
|
+
/** The Tidal link of the song. */
|
|
52
|
+
tidalLink?: string
|
|
53
|
+
/** The Apple Music link of the song. */
|
|
54
|
+
appleMusicLink?: string
|
|
55
|
+
/** The date when the song was created. */
|
|
56
|
+
createdAt: string
|
|
57
|
+
/** The MusicBrainz ID of the song. */
|
|
58
|
+
mbid?: string
|
|
59
|
+
/** The label of the song. */
|
|
60
|
+
label?: string
|
|
61
|
+
[k: string]: unknown
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function isRecord(v: unknown): v is Record {
|
|
65
|
+
return (
|
|
66
|
+
isObj(v) &&
|
|
67
|
+
hasProp(v, '$type') &&
|
|
68
|
+
(v.$type === 'app.rocksky.scrobble#main' ||
|
|
69
|
+
v.$type === 'app.rocksky.scrobble')
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function validateRecord(v: unknown): ValidationResult {
|
|
74
|
+
return lexicons.validate('app.rocksky.scrobble#main', v)
|
|
75
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskyShoutDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {}
|
|
13
|
+
|
|
14
|
+
export interface InputSchema {
|
|
15
|
+
/** The content of the shout */
|
|
16
|
+
message?: string
|
|
17
|
+
[k: string]: unknown
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type OutputSchema = AppRockskyShoutDefs.ShoutView
|
|
21
|
+
|
|
22
|
+
export interface HandlerInput {
|
|
23
|
+
encoding: 'application/json'
|
|
24
|
+
body: InputSchema
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface HandlerSuccess {
|
|
28
|
+
encoding: 'application/json'
|
|
29
|
+
body: OutputSchema
|
|
30
|
+
headers?: { [key: string]: string }
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface HandlerError {
|
|
34
|
+
status: number
|
|
35
|
+
message?: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
39
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
40
|
+
auth: HA
|
|
41
|
+
params: QueryParams
|
|
42
|
+
input: HandlerInput
|
|
43
|
+
req: express.Request
|
|
44
|
+
res: express.Response
|
|
45
|
+
resetRouteRateLimits: () => Promise<void>
|
|
46
|
+
}
|
|
47
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
48
|
+
ctx: HandlerReqCtx<HA>,
|
|
49
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { lexicons } from '../../../../lexicons'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { CID } from 'multiformats/cid'
|
|
8
|
+
|
|
9
|
+
export interface Author {
|
|
10
|
+
/** The unique identifier of the author. */
|
|
11
|
+
id?: string
|
|
12
|
+
/** The decentralized identifier (DID) of the author. */
|
|
13
|
+
did?: string
|
|
14
|
+
/** The handle of the author. */
|
|
15
|
+
handle?: string
|
|
16
|
+
/** The display name of the author. */
|
|
17
|
+
displayName?: string
|
|
18
|
+
/** The URL of the author's avatar image. */
|
|
19
|
+
avatar?: string
|
|
20
|
+
[k: string]: unknown
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function isAuthor(v: unknown): v is Author {
|
|
24
|
+
return (
|
|
25
|
+
isObj(v) &&
|
|
26
|
+
hasProp(v, '$type') &&
|
|
27
|
+
v.$type === 'app.rocksky.shout.defs#author'
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function validateAuthor(v: unknown): ValidationResult {
|
|
32
|
+
return lexicons.validate('app.rocksky.shout.defs#author', v)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ShoutView {
|
|
36
|
+
/** The unique identifier of the shout. */
|
|
37
|
+
id?: string
|
|
38
|
+
/** The content of the shout. */
|
|
39
|
+
message?: string
|
|
40
|
+
/** The ID of the parent shout if this is a reply, otherwise null. */
|
|
41
|
+
parent?: string
|
|
42
|
+
/** The date and time when the shout was created. */
|
|
43
|
+
createdAt?: string
|
|
44
|
+
author?: Author
|
|
45
|
+
[k: string]: unknown
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function isShoutView(v: unknown): v is ShoutView {
|
|
49
|
+
return (
|
|
50
|
+
isObj(v) &&
|
|
51
|
+
hasProp(v, '$type') &&
|
|
52
|
+
v.$type === 'app.rocksky.shout.defs#shoutView'
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function validateShoutView(v: unknown): ValidationResult {
|
|
57
|
+
return lexicons.validate('app.rocksky.shout.defs#shoutView', v)
|
|
58
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskyShoutDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The unique identifier of the album to retrieve shouts for */
|
|
14
|
+
uri: string
|
|
15
|
+
/** The maximum number of shouts to return */
|
|
16
|
+
limit?: number
|
|
17
|
+
/** The number of shouts to skip before starting to collect the result set */
|
|
18
|
+
offset?: number
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type InputSchema = undefined
|
|
22
|
+
|
|
23
|
+
export interface OutputSchema {
|
|
24
|
+
shouts?: AppRockskyShoutDefs.ShoutViewBasic[]
|
|
25
|
+
[k: string]: unknown
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type HandlerInput = undefined
|
|
29
|
+
|
|
30
|
+
export interface HandlerSuccess {
|
|
31
|
+
encoding: 'application/json'
|
|
32
|
+
body: OutputSchema
|
|
33
|
+
headers?: { [key: string]: string }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface HandlerError {
|
|
37
|
+
status: number
|
|
38
|
+
message?: string
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
42
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
43
|
+
auth: HA
|
|
44
|
+
params: QueryParams
|
|
45
|
+
input: HandlerInput
|
|
46
|
+
req: express.Request
|
|
47
|
+
res: express.Response
|
|
48
|
+
resetRouteRateLimits: () => Promise<void>
|
|
49
|
+
}
|
|
50
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
51
|
+
ctx: HandlerReqCtx<HA>,
|
|
52
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskyShoutDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The URI of the artist to retrieve shouts for */
|
|
14
|
+
uri: string
|
|
15
|
+
/** The maximum number of shouts to return */
|
|
16
|
+
limit?: number
|
|
17
|
+
/** The number of shouts to skip before starting to collect the result set */
|
|
18
|
+
offset?: number
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type InputSchema = undefined
|
|
22
|
+
|
|
23
|
+
export interface OutputSchema {
|
|
24
|
+
shouts?: AppRockskyShoutDefs.ShoutViewBasic[]
|
|
25
|
+
[k: string]: unknown
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type HandlerInput = undefined
|
|
29
|
+
|
|
30
|
+
export interface HandlerSuccess {
|
|
31
|
+
encoding: 'application/json'
|
|
32
|
+
body: OutputSchema
|
|
33
|
+
headers?: { [key: string]: string }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface HandlerError {
|
|
37
|
+
status: number
|
|
38
|
+
message?: string
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
42
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
43
|
+
auth: HA
|
|
44
|
+
params: QueryParams
|
|
45
|
+
input: HandlerInput
|
|
46
|
+
req: express.Request
|
|
47
|
+
res: express.Response
|
|
48
|
+
resetRouteRateLimits: () => Promise<void>
|
|
49
|
+
}
|
|
50
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
51
|
+
ctx: HandlerReqCtx<HA>,
|
|
52
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskyShoutDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The DID or handle of the actor */
|
|
14
|
+
did: string
|
|
15
|
+
/** The offset for pagination */
|
|
16
|
+
offset?: number
|
|
17
|
+
/** The maximum number of shouts to return */
|
|
18
|
+
limit?: number
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type InputSchema = undefined
|
|
22
|
+
|
|
23
|
+
export interface OutputSchema {
|
|
24
|
+
shouts?: AppRockskyShoutDefs.ShoutViewBasic[]
|
|
25
|
+
[k: string]: unknown
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type HandlerInput = undefined
|
|
29
|
+
|
|
30
|
+
export interface HandlerSuccess {
|
|
31
|
+
encoding: 'application/json'
|
|
32
|
+
body: OutputSchema
|
|
33
|
+
headers?: { [key: string]: string }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface HandlerError {
|
|
37
|
+
status: number
|
|
38
|
+
message?: string
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
42
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
43
|
+
auth: HA
|
|
44
|
+
params: QueryParams
|
|
45
|
+
input: HandlerInput
|
|
46
|
+
req: express.Request
|
|
47
|
+
res: express.Response
|
|
48
|
+
resetRouteRateLimits: () => Promise<void>
|
|
49
|
+
}
|
|
50
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
51
|
+
ctx: HandlerReqCtx<HA>,
|
|
52
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskyShoutDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The URI of the shout to retrieve replies for */
|
|
14
|
+
uri: string
|
|
15
|
+
/** The maximum number of shouts to return */
|
|
16
|
+
limit?: number
|
|
17
|
+
/** The number of shouts to skip before starting to collect the result set */
|
|
18
|
+
offset?: number
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type InputSchema = undefined
|
|
22
|
+
|
|
23
|
+
export interface OutputSchema {
|
|
24
|
+
shouts?: AppRockskyShoutDefs.ShoutViewBasic[]
|
|
25
|
+
[k: string]: unknown
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type HandlerInput = undefined
|
|
29
|
+
|
|
30
|
+
export interface HandlerSuccess {
|
|
31
|
+
encoding: 'application/json'
|
|
32
|
+
body: OutputSchema
|
|
33
|
+
headers?: { [key: string]: string }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface HandlerError {
|
|
37
|
+
status: number
|
|
38
|
+
message?: string
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
42
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
43
|
+
auth: HA
|
|
44
|
+
params: QueryParams
|
|
45
|
+
input: HandlerInput
|
|
46
|
+
req: express.Request
|
|
47
|
+
res: express.Response
|
|
48
|
+
resetRouteRateLimits: () => Promise<void>
|
|
49
|
+
}
|
|
50
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
51
|
+
ctx: HandlerReqCtx<HA>,
|
|
52
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskyShoutDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The URI of the track to retrieve shouts for */
|
|
14
|
+
uri: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
|
|
19
|
+
export interface OutputSchema {
|
|
20
|
+
shouts?: AppRockskyShoutDefs.ShoutViewBasic[]
|
|
21
|
+
[k: string]: unknown
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type HandlerInput = undefined
|
|
25
|
+
|
|
26
|
+
export interface HandlerSuccess {
|
|
27
|
+
encoding: 'application/json'
|
|
28
|
+
body: OutputSchema
|
|
29
|
+
headers?: { [key: string]: string }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface HandlerError {
|
|
33
|
+
status: number
|
|
34
|
+
message?: string
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
38
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
39
|
+
auth: HA
|
|
40
|
+
params: QueryParams
|
|
41
|
+
input: HandlerInput
|
|
42
|
+
req: express.Request
|
|
43
|
+
res: express.Response
|
|
44
|
+
resetRouteRateLimits: () => Promise<void>
|
|
45
|
+
}
|
|
46
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
47
|
+
ctx: HandlerReqCtx<HA>,
|
|
48
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -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 AppRockskyShoutDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The ID of the shout to be removed */
|
|
14
|
+
id: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
export type OutputSchema = AppRockskyShoutDefs.ShoutView
|
|
19
|
+
export type HandlerInput = undefined
|
|
20
|
+
|
|
21
|
+
export interface HandlerSuccess {
|
|
22
|
+
encoding: 'application/json'
|
|
23
|
+
body: OutputSchema
|
|
24
|
+
headers?: { [key: string]: string }
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface HandlerError {
|
|
28
|
+
status: number
|
|
29
|
+
message?: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
33
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
34
|
+
auth: HA
|
|
35
|
+
params: QueryParams
|
|
36
|
+
input: HandlerInput
|
|
37
|
+
req: express.Request
|
|
38
|
+
res: express.Response
|
|
39
|
+
resetRouteRateLimits: () => Promise<void>
|
|
40
|
+
}
|
|
41
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
42
|
+
ctx: HandlerReqCtx<HA>,
|
|
43
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskyShoutDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {}
|
|
13
|
+
|
|
14
|
+
export interface InputSchema {
|
|
15
|
+
/** The unique identifier of the shout to reply to */
|
|
16
|
+
shoutId: string
|
|
17
|
+
/** The content of the reply */
|
|
18
|
+
message: string
|
|
19
|
+
[k: string]: unknown
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type OutputSchema = AppRockskyShoutDefs.ShoutView
|
|
23
|
+
|
|
24
|
+
export interface HandlerInput {
|
|
25
|
+
encoding: 'application/json'
|
|
26
|
+
body: InputSchema
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface HandlerSuccess {
|
|
30
|
+
encoding: 'application/json'
|
|
31
|
+
body: OutputSchema
|
|
32
|
+
headers?: { [key: string]: string }
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface HandlerError {
|
|
36
|
+
status: number
|
|
37
|
+
message?: string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
41
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
42
|
+
auth: HA
|
|
43
|
+
params: QueryParams
|
|
44
|
+
input: HandlerInput
|
|
45
|
+
req: express.Request
|
|
46
|
+
res: express.Response
|
|
47
|
+
resetRouteRateLimits: () => Promise<void>
|
|
48
|
+
}
|
|
49
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
50
|
+
ctx: HandlerReqCtx<HA>,
|
|
51
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskyShoutDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {}
|
|
13
|
+
|
|
14
|
+
export interface InputSchema {
|
|
15
|
+
/** The unique identifier of the shout to report */
|
|
16
|
+
shoutId: string
|
|
17
|
+
/** The reason for reporting the shout */
|
|
18
|
+
reason?: string
|
|
19
|
+
[k: string]: unknown
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type OutputSchema = AppRockskyShoutDefs.ShoutView
|
|
23
|
+
|
|
24
|
+
export interface HandlerInput {
|
|
25
|
+
encoding: 'application/json'
|
|
26
|
+
body: InputSchema
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface HandlerSuccess {
|
|
30
|
+
encoding: 'application/json'
|
|
31
|
+
body: OutputSchema
|
|
32
|
+
headers?: { [key: string]: string }
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface HandlerError {
|
|
36
|
+
status: number
|
|
37
|
+
message?: string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
41
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
42
|
+
auth: HA
|
|
43
|
+
params: QueryParams
|
|
44
|
+
input: HandlerInput
|
|
45
|
+
req: express.Request
|
|
46
|
+
res: express.Response
|
|
47
|
+
resetRouteRateLimits: () => Promise<void>
|
|
48
|
+
}
|
|
49
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
50
|
+
ctx: HandlerReqCtx<HA>,
|
|
51
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { lexicons } from '../../../lexicons'
|
|
6
|
+
import { isObj, hasProp } from '../../../util'
|
|
7
|
+
import { CID } from 'multiformats/cid'
|
|
8
|
+
import * as ComAtprotoRepoStrongRef from '../../com/atproto/repo/strongRef'
|
|
9
|
+
|
|
10
|
+
export interface Record {
|
|
11
|
+
/** The message of the shout. */
|
|
12
|
+
message: string
|
|
13
|
+
/** The date when the shout was created. */
|
|
14
|
+
createdAt: string
|
|
15
|
+
parent?: ComAtprotoRepoStrongRef.Main
|
|
16
|
+
subject: ComAtprotoRepoStrongRef.Main
|
|
17
|
+
[k: string]: unknown
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function isRecord(v: unknown): v is Record {
|
|
21
|
+
return (
|
|
22
|
+
isObj(v) &&
|
|
23
|
+
hasProp(v, '$type') &&
|
|
24
|
+
(v.$type === 'app.rocksky.shout#main' || v.$type === 'app.rocksky.shout')
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function validateRecord(v: unknown): ValidationResult {
|
|
29
|
+
return lexicons.validate('app.rocksky.shout#main', v)
|
|
30
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskySongDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {}
|
|
13
|
+
|
|
14
|
+
export interface InputSchema {
|
|
15
|
+
/** The title of the song */
|
|
16
|
+
title: string
|
|
17
|
+
/** The artist of the song */
|
|
18
|
+
artist: string
|
|
19
|
+
/** The album artist of the song, if different from the main artist */
|
|
20
|
+
albumArtist: string
|
|
21
|
+
/** The album of the song, if applicable */
|
|
22
|
+
album: string
|
|
23
|
+
/** The duration of the song in seconds */
|
|
24
|
+
duration?: number
|
|
25
|
+
/** The MusicBrainz ID of the song, if available */
|
|
26
|
+
mbId?: string
|
|
27
|
+
/** The URL of the album art for the song */
|
|
28
|
+
albumArt?: string
|
|
29
|
+
/** The track number of the song in the album, if applicable */
|
|
30
|
+
trackNumber?: number
|
|
31
|
+
/** The release date of the song, formatted as YYYY-MM-DD */
|
|
32
|
+
releaseDate?: string
|
|
33
|
+
/** The year the song was released */
|
|
34
|
+
year?: number
|
|
35
|
+
/** The disc number of the song in the album, if applicable */
|
|
36
|
+
discNumber?: number
|
|
37
|
+
/** The lyrics of the song, if available */
|
|
38
|
+
lyrics?: string
|
|
39
|
+
[k: string]: unknown
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type OutputSchema = AppRockskySongDefs.SongViewDetailed
|
|
43
|
+
|
|
44
|
+
export interface HandlerInput {
|
|
45
|
+
encoding: 'application/json'
|
|
46
|
+
body: InputSchema
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface HandlerSuccess {
|
|
50
|
+
encoding: 'application/json'
|
|
51
|
+
body: OutputSchema
|
|
52
|
+
headers?: { [key: string]: string }
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface HandlerError {
|
|
56
|
+
status: number
|
|
57
|
+
message?: string
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
61
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
62
|
+
auth: HA
|
|
63
|
+
params: QueryParams
|
|
64
|
+
input: HandlerInput
|
|
65
|
+
req: express.Request
|
|
66
|
+
res: express.Response
|
|
67
|
+
resetRouteRateLimits: () => Promise<void>
|
|
68
|
+
}
|
|
69
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
70
|
+
ctx: HandlerReqCtx<HA>,
|
|
71
|
+
) => Promise<HandlerOutput> | HandlerOutput
|