@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,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { lexicons } from '../../../../lexicons'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { CID } from 'multiformats/cid'
|
|
8
|
+
import * as AppRockskySongDefs from '../song/defs'
|
|
9
|
+
import * as AppRockskyAlbumDefs from '../album/defs'
|
|
10
|
+
import * as AppRockskyArtistDefs from '../artist/defs'
|
|
11
|
+
import * as AppRockskyPlaylistDefs from '../playlist/defs'
|
|
12
|
+
import * as AppRockskyActorDefs from '../actor/defs'
|
|
13
|
+
import * as AppRockskyScrobbleDefs from '../scrobble/defs'
|
|
14
|
+
|
|
15
|
+
export interface SearchResultsView {
|
|
16
|
+
hits?: (
|
|
17
|
+
| AppRockskySongDefs.SongViewBasic
|
|
18
|
+
| AppRockskyAlbumDefs.AlbumViewBasic
|
|
19
|
+
| AppRockskyArtistDefs.ArtistViewBasic
|
|
20
|
+
| AppRockskyPlaylistDefs.PlaylistViewBasic
|
|
21
|
+
| AppRockskyActorDefs.ProfileViewBasic
|
|
22
|
+
| { $type: string; [k: string]: unknown }
|
|
23
|
+
)[]
|
|
24
|
+
processingTimeMs?: number
|
|
25
|
+
limit?: number
|
|
26
|
+
offset?: number
|
|
27
|
+
estimatedTotalHits?: number
|
|
28
|
+
[k: string]: unknown
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function isSearchResultsView(v: unknown): v is SearchResultsView {
|
|
32
|
+
return (
|
|
33
|
+
isObj(v) &&
|
|
34
|
+
hasProp(v, '$type') &&
|
|
35
|
+
v.$type === 'app.rocksky.feed.defs#searchResultsView'
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function validateSearchResultsView(v: unknown): ValidationResult {
|
|
40
|
+
return lexicons.validate('app.rocksky.feed.defs#searchResultsView', v)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface NowPlayingView {
|
|
44
|
+
album?: string
|
|
45
|
+
albumArt?: string
|
|
46
|
+
albumArtist?: string
|
|
47
|
+
albumUri?: string
|
|
48
|
+
artist?: string
|
|
49
|
+
artistUri?: string
|
|
50
|
+
avatar?: string
|
|
51
|
+
createdAt?: string
|
|
52
|
+
did?: string
|
|
53
|
+
handle?: string
|
|
54
|
+
id?: string
|
|
55
|
+
title?: string
|
|
56
|
+
trackId?: string
|
|
57
|
+
trackUri?: string
|
|
58
|
+
uri?: string
|
|
59
|
+
[k: string]: unknown
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function isNowPlayingView(v: unknown): v is NowPlayingView {
|
|
63
|
+
return (
|
|
64
|
+
isObj(v) &&
|
|
65
|
+
hasProp(v, '$type') &&
|
|
66
|
+
v.$type === 'app.rocksky.feed.defs#nowPlayingView'
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function validateNowPlayingView(v: unknown): ValidationResult {
|
|
71
|
+
return lexicons.validate('app.rocksky.feed.defs#nowPlayingView', v)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface NowPlayingsView {
|
|
75
|
+
nowPlayings?: NowPlayingView[]
|
|
76
|
+
[k: string]: unknown
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function isNowPlayingsView(v: unknown): v is NowPlayingsView {
|
|
80
|
+
return (
|
|
81
|
+
isObj(v) &&
|
|
82
|
+
hasProp(v, '$type') &&
|
|
83
|
+
v.$type === 'app.rocksky.feed.defs#nowPlayingsView'
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function validateNowPlayingsView(v: unknown): ValidationResult {
|
|
88
|
+
return lexicons.validate('app.rocksky.feed.defs#nowPlayingsView', v)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface FeedGeneratorsView {
|
|
92
|
+
feeds?: FeedGeneratorView[]
|
|
93
|
+
[k: string]: unknown
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function isFeedGeneratorsView(v: unknown): v is FeedGeneratorsView {
|
|
97
|
+
return (
|
|
98
|
+
isObj(v) &&
|
|
99
|
+
hasProp(v, '$type') &&
|
|
100
|
+
v.$type === 'app.rocksky.feed.defs#feedGeneratorsView'
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function validateFeedGeneratorsView(v: unknown): ValidationResult {
|
|
105
|
+
return lexicons.validate('app.rocksky.feed.defs#feedGeneratorsView', v)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface FeedGeneratorView {
|
|
109
|
+
id?: string
|
|
110
|
+
name?: string
|
|
111
|
+
description?: string
|
|
112
|
+
uri?: string
|
|
113
|
+
avatar?: string
|
|
114
|
+
creator?: AppRockskyActorDefs.ProfileViewBasic
|
|
115
|
+
[k: string]: unknown
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function isFeedGeneratorView(v: unknown): v is FeedGeneratorView {
|
|
119
|
+
return (
|
|
120
|
+
isObj(v) &&
|
|
121
|
+
hasProp(v, '$type') &&
|
|
122
|
+
v.$type === 'app.rocksky.feed.defs#feedGeneratorView'
|
|
123
|
+
)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function validateFeedGeneratorView(v: unknown): ValidationResult {
|
|
127
|
+
return lexicons.validate('app.rocksky.feed.defs#feedGeneratorView', v)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface FeedUriView {
|
|
131
|
+
/** The feed URI. */
|
|
132
|
+
uri?: string
|
|
133
|
+
[k: string]: unknown
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function isFeedUriView(v: unknown): v is FeedUriView {
|
|
137
|
+
return (
|
|
138
|
+
isObj(v) &&
|
|
139
|
+
hasProp(v, '$type') &&
|
|
140
|
+
v.$type === 'app.rocksky.feed.defs#feedUriView'
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function validateFeedUriView(v: unknown): ValidationResult {
|
|
145
|
+
return lexicons.validate('app.rocksky.feed.defs#feedUriView', v)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export interface FeedItemView {
|
|
149
|
+
scrobble?: AppRockskyScrobbleDefs.ScrobbleViewBasic
|
|
150
|
+
[k: string]: unknown
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function isFeedItemView(v: unknown): v is FeedItemView {
|
|
154
|
+
return (
|
|
155
|
+
isObj(v) &&
|
|
156
|
+
hasProp(v, '$type') &&
|
|
157
|
+
v.$type === 'app.rocksky.feed.defs#feedItemView'
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function validateFeedItemView(v: unknown): ValidationResult {
|
|
162
|
+
return lexicons.validate('app.rocksky.feed.defs#feedItemView', v)
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface FeedView {
|
|
166
|
+
feed?: FeedItemView[]
|
|
167
|
+
/** The pagination cursor for the next set of results. */
|
|
168
|
+
cursor?: string
|
|
169
|
+
[k: string]: unknown
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export function isFeedView(v: unknown): v is FeedView {
|
|
173
|
+
return (
|
|
174
|
+
isObj(v) &&
|
|
175
|
+
hasProp(v, '$type') &&
|
|
176
|
+
v.$type === 'app.rocksky.feed.defs#feedView'
|
|
177
|
+
)
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export function validateFeedView(v: unknown): ValidationResult {
|
|
181
|
+
return lexicons.validate('app.rocksky.feed.defs#feedView', v)
|
|
182
|
+
}
|
|
@@ -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 AppRockskyFeedDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {}
|
|
13
|
+
|
|
14
|
+
export type InputSchema = undefined
|
|
15
|
+
|
|
16
|
+
export interface OutputSchema {
|
|
17
|
+
/** The DID of the feed generator. */
|
|
18
|
+
did?: string
|
|
19
|
+
/** List of feed URIs generated by this feed generator. */
|
|
20
|
+
feeds?: AppRockskyFeedDefs.FeedUriView[]
|
|
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,29 @@
|
|
|
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
|
+
did: string
|
|
11
|
+
avatar?: BlobRef
|
|
12
|
+
displayName: string
|
|
13
|
+
description?: string
|
|
14
|
+
createdAt: string
|
|
15
|
+
[k: string]: unknown
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function isRecord(v: unknown): v is Record {
|
|
19
|
+
return (
|
|
20
|
+
isObj(v) &&
|
|
21
|
+
hasProp(v, '$type') &&
|
|
22
|
+
(v.$type === 'app.rocksky.feed.generator#main' ||
|
|
23
|
+
v.$type === 'app.rocksky.feed.generator')
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function validateRecord(v: unknown): ValidationResult {
|
|
28
|
+
return lexicons.validate('app.rocksky.feed.generator#main', v)
|
|
29
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskyFeedDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The feed URI. */
|
|
14
|
+
feed: string
|
|
15
|
+
/** The maximum number of scrobbles to return */
|
|
16
|
+
limit?: number
|
|
17
|
+
/** The cursor for pagination */
|
|
18
|
+
cursor?: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type InputSchema = undefined
|
|
22
|
+
export type OutputSchema = AppRockskyFeedDefs.FeedView
|
|
23
|
+
export type HandlerInput = undefined
|
|
24
|
+
|
|
25
|
+
export interface HandlerSuccess {
|
|
26
|
+
encoding: 'application/json'
|
|
27
|
+
body: OutputSchema
|
|
28
|
+
headers?: { [key: string]: string }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface HandlerError {
|
|
32
|
+
status: number
|
|
33
|
+
message?: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
37
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
38
|
+
auth: HA
|
|
39
|
+
params: QueryParams
|
|
40
|
+
input: HandlerInput
|
|
41
|
+
req: express.Request
|
|
42
|
+
res: express.Response
|
|
43
|
+
resetRouteRateLimits: () => Promise<void>
|
|
44
|
+
}
|
|
45
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
46
|
+
ctx: HandlerReqCtx<HA>,
|
|
47
|
+
) => 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 AppRockskyFeedDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** AT-URI of the feed generator record. */
|
|
14
|
+
feed: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
|
|
19
|
+
export interface OutputSchema {
|
|
20
|
+
view?: AppRockskyFeedDefs.FeedGeneratorView
|
|
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 AppRockskyFeedDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The maximum number of feed generators to return. */
|
|
14
|
+
size?: number
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
export type OutputSchema = AppRockskyFeedDefs.FeedGeneratorsView
|
|
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,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { lexicons } from '../../../../lexicons'
|
|
7
|
+
import { isObj, hasProp } from '../../../../util'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
+
import * as AppRockskyScrobbleDefs from '../scrobble/defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The feed URI. */
|
|
14
|
+
feed: string
|
|
15
|
+
/** The maximum number of scrobbles to return */
|
|
16
|
+
limit?: number
|
|
17
|
+
/** The offset for pagination */
|
|
18
|
+
offset?: number
|
|
19
|
+
/** The pagination cursor. */
|
|
20
|
+
cursor?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type InputSchema = undefined
|
|
24
|
+
|
|
25
|
+
export interface OutputSchema {
|
|
26
|
+
scrobbles?: AppRockskyScrobbleDefs.ScrobbleViewBasic[]
|
|
27
|
+
/** The pagination cursor for the next set of results. */
|
|
28
|
+
cursor?: string
|
|
29
|
+
[k: string]: unknown
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type HandlerInput = undefined
|
|
33
|
+
|
|
34
|
+
export interface HandlerSuccess {
|
|
35
|
+
encoding: 'application/json'
|
|
36
|
+
body: OutputSchema
|
|
37
|
+
headers?: { [key: string]: string }
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface HandlerError {
|
|
41
|
+
status: number
|
|
42
|
+
message?: string
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
46
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
47
|
+
auth: HA
|
|
48
|
+
params: QueryParams
|
|
49
|
+
input: HandlerInput
|
|
50
|
+
req: express.Request
|
|
51
|
+
res: express.Response
|
|
52
|
+
resetRouteRateLimits: () => Promise<void>
|
|
53
|
+
}
|
|
54
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
55
|
+
ctx: HandlerReqCtx<HA>,
|
|
56
|
+
) => 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 AppRockskyFeedDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The maximum number of now playing tracks to return. */
|
|
14
|
+
size?: number
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
export type OutputSchema = AppRockskyFeedDefs.NowPlayingsView
|
|
19
|
+
export type HandlerInput = undefined
|
|
20
|
+
|
|
21
|
+
export interface HandlerSuccess {
|
|
22
|
+
encoding: 'application/json'
|
|
23
|
+
body: OutputSchema
|
|
24
|
+
headers?: { [key: string]: string }
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface HandlerError {
|
|
28
|
+
status: number
|
|
29
|
+
message?: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
33
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
34
|
+
auth: HA
|
|
35
|
+
params: QueryParams
|
|
36
|
+
input: HandlerInput
|
|
37
|
+
req: express.Request
|
|
38
|
+
res: express.Response
|
|
39
|
+
resetRouteRateLimits: () => Promise<void>
|
|
40
|
+
}
|
|
41
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
42
|
+
ctx: HandlerReqCtx<HA>,
|
|
43
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -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 AppRockskyFeedDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The search query string */
|
|
14
|
+
query: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
export type OutputSchema = AppRockskyFeedDefs.SearchResultsView
|
|
19
|
+
export type HandlerInput = undefined
|
|
20
|
+
|
|
21
|
+
export interface HandlerSuccess {
|
|
22
|
+
encoding: 'application/json'
|
|
23
|
+
body: OutputSchema
|
|
24
|
+
headers?: { [key: string]: string }
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface HandlerError {
|
|
28
|
+
status: number
|
|
29
|
+
message?: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
33
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
34
|
+
auth: HA
|
|
35
|
+
params: QueryParams
|
|
36
|
+
input: HandlerInput
|
|
37
|
+
req: express.Request
|
|
38
|
+
res: express.Response
|
|
39
|
+
resetRouteRateLimits: () => Promise<void>
|
|
40
|
+
}
|
|
41
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
42
|
+
ctx: HandlerReqCtx<HA>,
|
|
43
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { lexicons } from '../../../../lexicons'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { CID } from 'multiformats/cid'
|
|
8
|
+
|
|
9
|
+
export interface FileView {
|
|
10
|
+
/** The unique identifier of the file. */
|
|
11
|
+
id?: string
|
|
12
|
+
[k: string]: unknown
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function isFileView(v: unknown): v is FileView {
|
|
16
|
+
return (
|
|
17
|
+
isObj(v) &&
|
|
18
|
+
hasProp(v, '$type') &&
|
|
19
|
+
v.$type === 'app.rocksky.googledrive.defs#fileView'
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function validateFileView(v: unknown): ValidationResult {
|
|
24
|
+
return lexicons.validate('app.rocksky.googledrive.defs#fileView', v)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface FileListView {
|
|
28
|
+
files?: FileView[]
|
|
29
|
+
[k: string]: unknown
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function isFileListView(v: unknown): v is FileListView {
|
|
33
|
+
return (
|
|
34
|
+
isObj(v) &&
|
|
35
|
+
hasProp(v, '$type') &&
|
|
36
|
+
v.$type === 'app.rocksky.googledrive.defs#fileListView'
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function validateFileListView(v: unknown): ValidationResult {
|
|
41
|
+
return lexicons.validate('app.rocksky.googledrive.defs#fileListView', v)
|
|
42
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import express from 'express'
|
|
5
|
+
import stream from 'stream'
|
|
6
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { isObj, hasProp } from '../../../../util'
|
|
9
|
+
import { CID } from 'multiformats/cid'
|
|
10
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The unique identifier of the file to download */
|
|
14
|
+
fileId: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
export type HandlerInput = undefined
|
|
19
|
+
|
|
20
|
+
export interface HandlerSuccess {
|
|
21
|
+
encoding: 'application/octet-stream'
|
|
22
|
+
body: Uint8Array | stream.Readable
|
|
23
|
+
headers?: { [key: string]: string }
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface HandlerError {
|
|
27
|
+
status: number
|
|
28
|
+
message?: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
32
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
33
|
+
auth: HA
|
|
34
|
+
params: QueryParams
|
|
35
|
+
input: HandlerInput
|
|
36
|
+
req: express.Request
|
|
37
|
+
res: express.Response
|
|
38
|
+
resetRouteRateLimits: () => Promise<void>
|
|
39
|
+
}
|
|
40
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
41
|
+
ctx: HandlerReqCtx<HA>,
|
|
42
|
+
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -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 AppRockskyGoogledriveDefs from './defs'
|
|
11
|
+
|
|
12
|
+
export interface QueryParams {
|
|
13
|
+
/** The unique identifier of the file to retrieve */
|
|
14
|
+
fileId: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
export type OutputSchema = AppRockskyGoogledriveDefs.FileView
|
|
19
|
+
export type HandlerInput = undefined
|
|
20
|
+
|
|
21
|
+
export interface HandlerSuccess {
|
|
22
|
+
encoding: 'application/json'
|
|
23
|
+
body: OutputSchema
|
|
24
|
+
headers?: { [key: string]: string }
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface HandlerError {
|
|
28
|
+
status: number
|
|
29
|
+
message?: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
33
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
34
|
+
auth: HA
|
|
35
|
+
params: QueryParams
|
|
36
|
+
input: HandlerInput
|
|
37
|
+
req: express.Request
|
|
38
|
+
res: express.Response
|
|
39
|
+
resetRouteRateLimits: () => Promise<void>
|
|
40
|
+
}
|
|
41
|
+
export type Handler<HA extends HandlerAuth = never> = (
|
|
42
|
+
ctx: HandlerReqCtx<HA>,
|
|
43
|
+
) => Promise<HandlerOutput> | HandlerOutput
|