tangled
alpha
login
or
join now
t1c.dev
/
rocksky
forked from
rocksky.app/rocksky
2
fork
atom
A decentralized music tracking and discovery platform built on AT Protocol 🎵
2
fork
atom
overview
issues
pulls
pipelines
update scrobble lexicon
tsiry-sandratraina.com
2 months ago
b0148079
f860ae82
+173
-152
6 changed files
expand all
collapse all
unified
split
apps
api
lexicons
scrobble
defs.json
pkl
defs
scrobble
defs.pkl
src
lexicon
index.ts
lexicons.ts
types
app
rocksky
scrobble
defs.ts
xrpc
app
rocksky
actor
getActorCompatibility.ts
+6
apps/api/lexicons/scrobble/defs.json
···
62
62
"sha256": {
63
63
"type": "string",
64
64
"description": "The SHA256 hash of the scrobble data."
65
65
+
},
66
66
+
"liked": {
67
67
+
"type": "boolean"
68
68
+
},
69
69
+
"likesCount": {
70
70
+
"type": "integer"
65
71
}
66
72
}
67
73
},
+8
-1
apps/api/pkl/defs/scrobble/defs.pkl
···
73
73
description = "The SHA256 hash of the scrobble data."
74
74
}
75
75
76
76
+
["liked"] = new BooleanType {
77
77
+
type = "boolean"
78
78
+
}
79
79
+
80
80
+
["likesCount"] = new IntegerType {
81
81
+
type = "integer"
82
82
+
}
76
83
}
77
84
}
78
85
···
148
155
}
149
156
}
150
157
}
151
151
-
}
158
158
+
}
+33
-33
apps/api/src/lexicon/index.ts
···
30
30
import type * as AppRockskyApikeyGetApikeys from "./types/app/rocksky/apikey/getApikeys";
31
31
import type * as AppRockskyApikeyRemoveApikey from "./types/app/rocksky/apikey/removeApikey";
32
32
import type * as AppRockskyApikeyUpdateApikey from "./types/app/rocksky/apikey/updateApikey";
33
33
-
import type * as AppRockskyArtistGetArtist from "./types/app/rocksky/artist/getArtist";
34
33
import type * as AppRockskyArtistGetArtistAlbums from "./types/app/rocksky/artist/getArtistAlbums";
34
34
+
import type * as AppRockskyArtistGetArtist from "./types/app/rocksky/artist/getArtist";
35
35
import type * as AppRockskyArtistGetArtistListeners from "./types/app/rocksky/artist/getArtistListeners";
36
36
import type * as AppRockskyArtistGetArtists from "./types/app/rocksky/artist/getArtists";
37
37
import type * as AppRockskyArtistGetArtistTracks from "./types/app/rocksky/artist/getArtistTracks";
···
41
41
import type * as AppRockskyDropboxGetMetadata from "./types/app/rocksky/dropbox/getMetadata";
42
42
import type * as AppRockskyDropboxGetTemporaryLink from "./types/app/rocksky/dropbox/getTemporaryLink";
43
43
import type * as AppRockskyFeedDescribeFeedGenerator from "./types/app/rocksky/feed/describeFeedGenerator";
44
44
-
import type * as AppRockskyFeedGetFeed from "./types/app/rocksky/feed/getFeed";
45
44
import type * as AppRockskyFeedGetFeedGenerator from "./types/app/rocksky/feed/getFeedGenerator";
46
45
import type * as AppRockskyFeedGetFeedGenerators from "./types/app/rocksky/feed/getFeedGenerators";
46
46
+
import type * as AppRockskyFeedGetFeed from "./types/app/rocksky/feed/getFeed";
47
47
import type * as AppRockskyFeedGetFeedSkeleton from "./types/app/rocksky/feed/getFeedSkeleton";
48
48
import type * as AppRockskyFeedGetNowPlayings from "./types/app/rocksky/feed/getNowPlayings";
49
49
import type * as AppRockskyFeedSearch from "./types/app/rocksky/feed/search";
···
65
65
import type * as AppRockskyPlayerGetPlaybackQueue from "./types/app/rocksky/player/getPlaybackQueue";
66
66
import type * as AppRockskyPlayerNext from "./types/app/rocksky/player/next";
67
67
import type * as AppRockskyPlayerPause from "./types/app/rocksky/player/pause";
68
68
-
import type * as AppRockskyPlayerPlay from "./types/app/rocksky/player/play";
69
68
import type * as AppRockskyPlayerPlayDirectory from "./types/app/rocksky/player/playDirectory";
70
69
import type * as AppRockskyPlayerPlayFile from "./types/app/rocksky/player/playFile";
70
70
+
import type * as AppRockskyPlayerPlay from "./types/app/rocksky/player/play";
71
71
import type * as AppRockskyPlayerPrevious from "./types/app/rocksky/player/previous";
72
72
import type * as AppRockskyPlayerSeek from "./types/app/rocksky/player/seek";
73
73
import type * as AppRockskyPlaylistCreatePlaylist from "./types/app/rocksky/playlist/createPlaylist";
···
483
483
this._server = server;
484
484
}
485
485
486
486
-
getArtist<AV extends AuthVerifier>(
486
486
+
getArtistAlbums<AV extends AuthVerifier>(
487
487
cfg: ConfigOf<
488
488
AV,
489
489
-
AppRockskyArtistGetArtist.Handler<ExtractAuth<AV>>,
490
490
-
AppRockskyArtistGetArtist.HandlerReqCtx<ExtractAuth<AV>>
489
489
+
AppRockskyArtistGetArtistAlbums.Handler<ExtractAuth<AV>>,
490
490
+
AppRockskyArtistGetArtistAlbums.HandlerReqCtx<ExtractAuth<AV>>
491
491
>,
492
492
) {
493
493
-
const nsid = "app.rocksky.artist.getArtist"; // @ts-ignore
493
493
+
const nsid = "app.rocksky.artist.getArtistAlbums"; // @ts-ignore
494
494
return this._server.xrpc.method(nsid, cfg);
495
495
}
496
496
497
497
-
getArtistAlbums<AV extends AuthVerifier>(
497
497
+
getArtist<AV extends AuthVerifier>(
498
498
cfg: ConfigOf<
499
499
AV,
500
500
-
AppRockskyArtistGetArtistAlbums.Handler<ExtractAuth<AV>>,
501
501
-
AppRockskyArtistGetArtistAlbums.HandlerReqCtx<ExtractAuth<AV>>
500
500
+
AppRockskyArtistGetArtist.Handler<ExtractAuth<AV>>,
501
501
+
AppRockskyArtistGetArtist.HandlerReqCtx<ExtractAuth<AV>>
502
502
>,
503
503
) {
504
504
-
const nsid = "app.rocksky.artist.getArtistAlbums"; // @ts-ignore
504
504
+
const nsid = "app.rocksky.artist.getArtist"; // @ts-ignore
505
505
return this._server.xrpc.method(nsid, cfg);
506
506
}
507
507
···
625
625
>,
626
626
) {
627
627
const nsid = "app.rocksky.feed.describeFeedGenerator"; // @ts-ignore
628
628
-
return this._server.xrpc.method(nsid, cfg);
629
629
-
}
630
630
-
631
631
-
getFeed<AV extends AuthVerifier>(
632
632
-
cfg: ConfigOf<
633
633
-
AV,
634
634
-
AppRockskyFeedGetFeed.Handler<ExtractAuth<AV>>,
635
635
-
AppRockskyFeedGetFeed.HandlerReqCtx<ExtractAuth<AV>>
636
636
-
>,
637
637
-
) {
638
638
-
const nsid = "app.rocksky.feed.getFeed"; // @ts-ignore
639
628
return this._server.xrpc.method(nsid, cfg);
640
629
}
641
630
···
661
650
return this._server.xrpc.method(nsid, cfg);
662
651
}
663
652
653
653
+
getFeed<AV extends AuthVerifier>(
654
654
+
cfg: ConfigOf<
655
655
+
AV,
656
656
+
AppRockskyFeedGetFeed.Handler<ExtractAuth<AV>>,
657
657
+
AppRockskyFeedGetFeed.HandlerReqCtx<ExtractAuth<AV>>
658
658
+
>,
659
659
+
) {
660
660
+
const nsid = "app.rocksky.feed.getFeed"; // @ts-ignore
661
661
+
return this._server.xrpc.method(nsid, cfg);
662
662
+
}
663
663
+
664
664
getFeedSkeleton<AV extends AuthVerifier>(
665
665
cfg: ConfigOf<
666
666
AV,
···
924
924
return this._server.xrpc.method(nsid, cfg);
925
925
}
926
926
927
927
-
play<AV extends AuthVerifier>(
928
928
-
cfg: ConfigOf<
929
929
-
AV,
930
930
-
AppRockskyPlayerPlay.Handler<ExtractAuth<AV>>,
931
931
-
AppRockskyPlayerPlay.HandlerReqCtx<ExtractAuth<AV>>
932
932
-
>,
933
933
-
) {
934
934
-
const nsid = "app.rocksky.player.play"; // @ts-ignore
935
935
-
return this._server.xrpc.method(nsid, cfg);
936
936
-
}
937
937
-
938
927
playDirectory<AV extends AuthVerifier>(
939
928
cfg: ConfigOf<
940
929
AV,
···
954
943
>,
955
944
) {
956
945
const nsid = "app.rocksky.player.playFile"; // @ts-ignore
946
946
+
return this._server.xrpc.method(nsid, cfg);
947
947
+
}
948
948
+
949
949
+
play<AV extends AuthVerifier>(
950
950
+
cfg: ConfigOf<
951
951
+
AV,
952
952
+
AppRockskyPlayerPlay.Handler<ExtractAuth<AV>>,
953
953
+
AppRockskyPlayerPlay.HandlerReqCtx<ExtractAuth<AV>>
954
954
+
>,
955
955
+
) {
956
956
+
const nsid = "app.rocksky.player.play"; // @ts-ignore
957
957
return this._server.xrpc.method(nsid, cfg);
958
958
}
959
959
+123
-117
apps/api/src/lexicon/lexicons.ts
···
1912
1912
},
1913
1913
},
1914
1914
},
1915
1915
-
AppRockskyArtistGetArtist: {
1916
1916
-
lexicon: 1,
1917
1917
-
id: "app.rocksky.artist.getArtist",
1918
1918
-
defs: {
1919
1919
-
main: {
1920
1920
-
type: "query",
1921
1921
-
description: "Get artist details",
1922
1922
-
parameters: {
1923
1923
-
type: "params",
1924
1924
-
required: ["uri"],
1925
1925
-
properties: {
1926
1926
-
uri: {
1927
1927
-
type: "string",
1928
1928
-
description: "The URI of the artist to retrieve details from",
1929
1929
-
format: "at-uri",
1930
1930
-
},
1931
1931
-
},
1932
1932
-
},
1933
1933
-
output: {
1934
1934
-
encoding: "application/json",
1935
1935
-
schema: {
1936
1936
-
type: "ref",
1937
1937
-
ref: "lex:app.rocksky.artist.defs#artistViewDetailed",
1938
1938
-
},
1939
1939
-
},
1940
1940
-
},
1941
1941
-
},
1942
1942
-
},
1943
1915
AppRockskyArtistGetArtistAlbums: {
1944
1916
lexicon: 1,
1945
1917
id: "app.rocksky.artist.getArtistAlbums",
···
1971
1943
},
1972
1944
},
1973
1945
},
1946
1946
+
},
1947
1947
+
},
1948
1948
+
},
1949
1949
+
},
1950
1950
+
},
1951
1951
+
AppRockskyArtistGetArtist: {
1952
1952
+
lexicon: 1,
1953
1953
+
id: "app.rocksky.artist.getArtist",
1954
1954
+
defs: {
1955
1955
+
main: {
1956
1956
+
type: "query",
1957
1957
+
description: "Get artist details",
1958
1958
+
parameters: {
1959
1959
+
type: "params",
1960
1960
+
required: ["uri"],
1961
1961
+
properties: {
1962
1962
+
uri: {
1963
1963
+
type: "string",
1964
1964
+
description: "The URI of the artist to retrieve details from",
1965
1965
+
format: "at-uri",
1966
1966
+
},
1967
1967
+
},
1968
1968
+
},
1969
1969
+
output: {
1970
1970
+
encoding: "application/json",
1971
1971
+
schema: {
1972
1972
+
type: "ref",
1973
1973
+
ref: "lex:app.rocksky.artist.defs#artistViewDetailed",
1974
1974
},
1975
1975
},
1976
1976
},
···
2603
2603
},
2604
2604
},
2605
2605
},
2606
2606
-
AppRockskyFeedGetFeed: {
2607
2607
-
lexicon: 1,
2608
2608
-
id: "app.rocksky.feed.getFeed",
2609
2609
-
defs: {
2610
2610
-
main: {
2611
2611
-
type: "query",
2612
2612
-
description: "Get the feed by uri",
2613
2613
-
parameters: {
2614
2614
-
type: "params",
2615
2615
-
required: ["feed"],
2616
2616
-
properties: {
2617
2617
-
feed: {
2618
2618
-
type: "string",
2619
2619
-
description: "The feed URI.",
2620
2620
-
format: "at-uri",
2621
2621
-
},
2622
2622
-
limit: {
2623
2623
-
type: "integer",
2624
2624
-
description: "The maximum number of scrobbles to return",
2625
2625
-
minimum: 1,
2626
2626
-
},
2627
2627
-
cursor: {
2628
2628
-
type: "string",
2629
2629
-
description: "The cursor for pagination",
2630
2630
-
},
2631
2631
-
},
2632
2632
-
},
2633
2633
-
output: {
2634
2634
-
encoding: "application/json",
2635
2635
-
schema: {
2636
2636
-
type: "ref",
2637
2637
-
ref: "lex:app.rocksky.feed.defs#feedView",
2638
2638
-
},
2639
2639
-
},
2640
2640
-
},
2641
2641
-
},
2642
2642
-
},
2643
2606
AppRockskyFeedGetFeedGenerator: {
2644
2607
lexicon: 1,
2645
2608
id: "app.rocksky.feed.getFeedGenerator",
···
2695
2658
schema: {
2696
2659
type: "ref",
2697
2660
ref: "lex:app.rocksky.feed.defs#feedGeneratorsView",
2661
2661
+
},
2662
2662
+
},
2663
2663
+
},
2664
2664
+
},
2665
2665
+
},
2666
2666
+
AppRockskyFeedGetFeed: {
2667
2667
+
lexicon: 1,
2668
2668
+
id: "app.rocksky.feed.getFeed",
2669
2669
+
defs: {
2670
2670
+
main: {
2671
2671
+
type: "query",
2672
2672
+
description: "Get the feed by uri",
2673
2673
+
parameters: {
2674
2674
+
type: "params",
2675
2675
+
required: ["feed"],
2676
2676
+
properties: {
2677
2677
+
feed: {
2678
2678
+
type: "string",
2679
2679
+
description: "The feed URI.",
2680
2680
+
format: "at-uri",
2681
2681
+
},
2682
2682
+
limit: {
2683
2683
+
type: "integer",
2684
2684
+
description: "The maximum number of scrobbles to return",
2685
2685
+
minimum: 1,
2686
2686
+
},
2687
2687
+
cursor: {
2688
2688
+
type: "string",
2689
2689
+
description: "The cursor for pagination",
2690
2690
+
},
2691
2691
+
},
2692
2692
+
},
2693
2693
+
output: {
2694
2694
+
encoding: "application/json",
2695
2695
+
schema: {
2696
2696
+
type: "ref",
2697
2697
+
ref: "lex:app.rocksky.feed.defs#feedView",
2698
2698
},
2699
2699
},
2700
2700
},
···
2956
2956
},
2957
2957
},
2958
2958
},
2959
2959
-
AppRockskyGraphFollow: {
2960
2960
-
lexicon: 1,
2961
2961
-
id: "app.rocksky.graph.follow",
2962
2962
-
defs: {
2963
2963
-
main: {
2964
2964
-
type: "record",
2965
2965
-
description:
2966
2966
-
"Record declaring a social 'follow' relationship of another account.",
2967
2967
-
key: "tid",
2968
2968
-
record: {
2969
2969
-
type: "object",
2970
2970
-
required: ["createdAt", "subject"],
2971
2971
-
properties: {
2972
2972
-
createdAt: {
2973
2973
-
type: "string",
2974
2974
-
format: "datetime",
2975
2975
-
},
2976
2976
-
subject: {
2977
2977
-
type: "string",
2978
2978
-
format: "did",
2979
2979
-
},
2980
2980
-
via: {
2981
2981
-
type: "ref",
2982
2982
-
ref: "lex:com.atproto.repo.strongRef",
2983
2983
-
},
2984
2984
-
},
2985
2985
-
},
2986
2986
-
},
2987
2987
-
},
2988
2988
-
},
2989
2959
AppRockskyGraphFollowAccount: {
2990
2960
lexicon: 1,
2991
2961
id: "app.rocksky.graph.followAccount",
···
3032
3002
},
3033
3003
},
3034
3004
},
3005
3005
+
AppRockskyGraphFollow: {
3006
3006
+
lexicon: 1,
3007
3007
+
id: "app.rocksky.graph.follow",
3008
3008
+
defs: {
3009
3009
+
main: {
3010
3010
+
type: "record",
3011
3011
+
description:
3012
3012
+
"Record declaring a social 'follow' relationship of another account.",
3013
3013
+
key: "tid",
3014
3014
+
record: {
3015
3015
+
type: "object",
3016
3016
+
required: ["createdAt", "subject"],
3017
3017
+
properties: {
3018
3018
+
createdAt: {
3019
3019
+
type: "string",
3020
3020
+
format: "datetime",
3021
3021
+
},
3022
3022
+
subject: {
3023
3023
+
type: "string",
3024
3024
+
format: "did",
3025
3025
+
},
3026
3026
+
via: {
3027
3027
+
type: "ref",
3028
3028
+
ref: "lex:com.atproto.repo.strongRef",
3029
3029
+
},
3030
3030
+
},
3031
3031
+
},
3032
3032
+
},
3033
3033
+
},
3034
3034
+
},
3035
3035
AppRockskyGraphGetFollowers: {
3036
3036
lexicon: 1,
3037
3037
id: "app.rocksky.graph.getFollowers",
···
3602
3602
},
3603
3603
},
3604
3604
},
3605
3605
-
AppRockskyPlayerPlay: {
3606
3606
-
lexicon: 1,
3607
3607
-
id: "app.rocksky.player.play",
3608
3608
-
defs: {
3609
3609
-
main: {
3610
3610
-
type: "procedure",
3611
3611
-
description: "Resume playback of the currently paused track",
3612
3612
-
parameters: {
3613
3613
-
type: "params",
3614
3614
-
properties: {
3615
3615
-
playerId: {
3616
3616
-
type: "string",
3617
3617
-
},
3618
3618
-
},
3619
3619
-
},
3620
3620
-
},
3621
3621
-
},
3622
3622
-
},
3623
3605
AppRockskyPlayerPlayDirectory: {
3624
3606
lexicon: 1,
3625
3607
id: "app.rocksky.player.playDirectory",
···
3673
3655
},
3674
3656
},
3675
3657
},
3658
3658
+
AppRockskyPlayerPlay: {
3659
3659
+
lexicon: 1,
3660
3660
+
id: "app.rocksky.player.play",
3661
3661
+
defs: {
3662
3662
+
main: {
3663
3663
+
type: "procedure",
3664
3664
+
description: "Resume playback of the currently paused track",
3665
3665
+
parameters: {
3666
3666
+
type: "params",
3667
3667
+
properties: {
3668
3668
+
playerId: {
3669
3669
+
type: "string",
3670
3670
+
},
3671
3671
+
},
3672
3672
+
},
3673
3673
+
},
3674
3674
+
},
3675
3675
+
},
3676
3676
AppRockskyPlayerPrevious: {
3677
3677
lexicon: 1,
3678
3678
id: "app.rocksky.player.previous",
···
4449
4449
sha256: {
4450
4450
type: "string",
4451
4451
description: "The SHA256 hash of the scrobble data.",
4452
4452
+
},
4453
4453
+
liked: {
4454
4454
+
type: "boolean",
4455
4455
+
},
4456
4456
+
likesCount: {
4457
4457
+
type: "integer",
4452
4458
},
4453
4459
},
4454
4460
},
···
5912
5918
AppRockskyApikeyUpdateApikey: "app.rocksky.apikey.updateApikey",
5913
5919
AppRockskyArtist: "app.rocksky.artist",
5914
5920
AppRockskyArtistDefs: "app.rocksky.artist.defs",
5915
5915
-
AppRockskyArtistGetArtist: "app.rocksky.artist.getArtist",
5916
5921
AppRockskyArtistGetArtistAlbums: "app.rocksky.artist.getArtistAlbums",
5922
5922
+
AppRockskyArtistGetArtist: "app.rocksky.artist.getArtist",
5917
5923
AppRockskyArtistGetArtistListeners: "app.rocksky.artist.getArtistListeners",
5918
5924
AppRockskyArtistGetArtists: "app.rocksky.artist.getArtists",
5919
5925
AppRockskyArtistGetArtistTracks: "app.rocksky.artist.getArtistTracks",
···
5927
5933
AppRockskyFeedDefs: "app.rocksky.feed.defs",
5928
5934
AppRockskyFeedDescribeFeedGenerator: "app.rocksky.feed.describeFeedGenerator",
5929
5935
AppRockskyFeedGenerator: "app.rocksky.feed.generator",
5930
5930
-
AppRockskyFeedGetFeed: "app.rocksky.feed.getFeed",
5931
5936
AppRockskyFeedGetFeedGenerator: "app.rocksky.feed.getFeedGenerator",
5932
5937
AppRockskyFeedGetFeedGenerators: "app.rocksky.feed.getFeedGenerators",
5938
5938
+
AppRockskyFeedGetFeed: "app.rocksky.feed.getFeed",
5933
5939
AppRockskyFeedGetFeedSkeleton: "app.rocksky.feed.getFeedSkeleton",
5934
5940
AppRockskyFeedGetNowPlayings: "app.rocksky.feed.getNowPlayings",
5935
5941
AppRockskyFeedSearch: "app.rocksky.feed.search",
···
5938
5944
AppRockskyGoogledriveGetFile: "app.rocksky.googledrive.getFile",
5939
5945
AppRockskyGoogledriveGetFiles: "app.rocksky.googledrive.getFiles",
5940
5946
AppRockskyGraphDefs: "app.rocksky.graph.defs",
5941
5941
-
AppRockskyGraphFollow: "app.rocksky.graph.follow",
5942
5947
AppRockskyGraphFollowAccount: "app.rocksky.graph.followAccount",
5948
5948
+
AppRockskyGraphFollow: "app.rocksky.graph.follow",
5943
5949
AppRockskyGraphGetFollowers: "app.rocksky.graph.getFollowers",
5944
5950
AppRockskyGraphGetFollows: "app.rocksky.graph.getFollows",
5945
5951
AppRockskyGraphGetKnownFollowers: "app.rocksky.graph.getKnownFollowers",
···
5956
5962
AppRockskyPlayerGetPlaybackQueue: "app.rocksky.player.getPlaybackQueue",
5957
5963
AppRockskyPlayerNext: "app.rocksky.player.next",
5958
5964
AppRockskyPlayerPause: "app.rocksky.player.pause",
5959
5959
-
AppRockskyPlayerPlay: "app.rocksky.player.play",
5960
5965
AppRockskyPlayerPlayDirectory: "app.rocksky.player.playDirectory",
5961
5966
AppRockskyPlayerPlayFile: "app.rocksky.player.playFile",
5967
5967
+
AppRockskyPlayerPlay: "app.rocksky.player.play",
5962
5968
AppRockskyPlayerPrevious: "app.rocksky.player.previous",
5963
5969
AppRockskyPlayerSeek: "app.rocksky.player.seek",
5964
5970
AppRockskyPlaylistCreatePlaylist: "app.rocksky.playlist.createPlaylist",
+2
apps/api/src/lexicon/types/app/rocksky/scrobble/defs.ts
···
33
33
uri?: string;
34
34
/** The SHA256 hash of the scrobble data. */
35
35
sha256?: string;
36
36
+
liked?: boolean;
37
37
+
likesCount?: number;
36
38
[k: string]: unknown;
37
39
}
38
40
+1
-1
apps/api/src/xrpc/app/rocksky/actor/getActorCompatibility.ts
···
6
6
import { deepCamelCaseKeys } from "lib";
7
7
import users from "schema/users";
8
8
import { eq, or } from "drizzle-orm";
9
9
-
import { HandlerAuth } from "@atproto/xrpc-server";
9
9
+
import type { HandlerAuth } from "@atproto/xrpc-server";
10
10
11
11
export default function (server: Server, ctx: Context) {
12
12
const getActorCompatibility = (params: QueryParams, auth: HandlerAuth) =>