···11+{
22+ "lexicon": 1,
33+ "id": "app.rocksky.song.matchSong",
44+ "defs": {
55+ "main": {
66+ "type": "query",
77+ "description": "Get a song by its uri",
88+ "parameters": {
99+ "type": "params",
1010+ "required": [
1111+ "title",
1212+ "artist"
1313+ ],
1414+ "properties": {
1515+ "title": {
1616+ "type": "string",
1717+ "description": "The title of the song to retrieve"
1818+ },
1919+ "artist": {
2020+ "type": "string",
2121+ "description": "The artist of the song to retrieve"
2222+ }
2323+ }
2424+ },
2525+ "output": {
2626+ "encoding": "application/json",
2727+ "schema": {
2828+ "type": "ref",
2929+ "ref": "app.rocksky.song.defs#songViewDetailed"
3030+ }
3131+ }
3232+ }
3333+ }
3434+}
+28
apps/api/pkl/defs/song/matchSong.pkl
···11+amends "../../schema/lexicon.pkl"
22+33+lexicon = 1
44+id = "app.rocksky.song.matchSong"
55+defs = new Mapping<String, Query> {
66+ ["main"] {
77+ type = "query"
88+ description = "Get a song by its uri"
99+ parameters = new Params {
1010+ required = List("title", "artist")
1111+ properties {
1212+ ["title"] = new StringType {
1313+ description = "The title of the song to retrieve"
1414+ }
1515+ ["artist"] = new StringType {
1616+ description = "The artist of the song to retrieve"
1717+ }
1818+ }
1919+ }
2020+ output {
2121+ encoding = "application/json"
2222+ schema = new Ref {
2323+ type = "ref"
2424+ ref = "app.rocksky.song.defs#songViewDetailed"
2525+ }
2626+ }
2727+ }
2828+}
+12
apps/api/src/lexicon/index.ts
···9393import type * as AppRockskySongCreateSong from "./types/app/rocksky/song/createSong";
9494import type * as AppRockskySongGetSong from "./types/app/rocksky/song/getSong";
9595import type * as AppRockskySongGetSongs from "./types/app/rocksky/song/getSongs";
9696+import type * as AppRockskySongMatchSong from "./types/app/rocksky/song/matchSong";
9697import type * as AppRockskySpotifyGetCurrentlyPlaying from "./types/app/rocksky/spotify/getCurrentlyPlaying";
9798import type * as AppRockskySpotifyNext from "./types/app/rocksky/spotify/next";
9899import type * as AppRockskySpotifyPause from "./types/app/rocksky/spotify/pause";
···12611262 >,
12621263 ) {
12631264 const nsid = "app.rocksky.song.getSongs"; // @ts-ignore
12651265+ return this._server.xrpc.method(nsid, cfg);
12661266+ }
12671267+12681268+ matchSong<AV extends AuthVerifier>(
12691269+ cfg: ConfigOf<
12701270+ AV,
12711271+ AppRockskySongMatchSong.Handler<ExtractAuth<AV>>,
12721272+ AppRockskySongMatchSong.HandlerReqCtx<ExtractAuth<AV>>
12731273+ >,
12741274+ ) {
12751275+ const nsid = "app.rocksky.song.matchSong"; // @ts-ignore
12641276 return this._server.xrpc.method(nsid, cfg);
12651277 }
12661278}
+32
apps/api/src/lexicon/lexicons.ts
···55485548 },
55495549 },
55505550 },
55515551+ AppRockskySongMatchSong: {
55525552+ lexicon: 1,
55535553+ id: "app.rocksky.song.matchSong",
55545554+ defs: {
55555555+ main: {
55565556+ type: "query",
55575557+ description: "Get a song by its uri",
55585558+ parameters: {
55595559+ type: "params",
55605560+ required: ["title", "artist"],
55615561+ properties: {
55625562+ title: {
55635563+ type: "string",
55645564+ description: "The title of the song to retrieve",
55655565+ },
55665566+ artist: {
55675567+ type: "string",
55685568+ description: "The artist of the song to retrieve",
55695569+ },
55705570+ },
55715571+ },
55725572+ output: {
55735573+ encoding: "application/json",
55745574+ schema: {
55755575+ type: "ref",
55765576+ ref: "lex:app.rocksky.song.defs#songViewDetailed",
55775577+ },
55785578+ },
55795579+ },
55805580+ },
55815581+ },
55515582 AppRockskySong: {
55525583 lexicon: 1,
55535584 id: "app.rocksky.song",
···60326063 AppRockskySongDefs: "app.rocksky.song.defs",
60336064 AppRockskySongGetSong: "app.rocksky.song.getSong",
60346065 AppRockskySongGetSongs: "app.rocksky.song.getSongs",
60666066+ AppRockskySongMatchSong: "app.rocksky.song.matchSong",
60356067 AppRockskySong: "app.rocksky.song",
60366068 AppRockskySpotifyDefs: "app.rocksky.spotify.defs",
60376069 AppRockskySpotifyGetCurrentlyPlaying: